feat: add AI Workspace Menu Bar App design and enhance MCP server with resource definitions and read functionality

This commit is contained in:
2026-05-20 15:22:37 -06:00
parent cfd61bdee3
commit b21889c4ab
8 changed files with 368 additions and 43 deletions

View File

@@ -119,6 +119,20 @@ class ServiceManagerTests(unittest.TestCase):
self.assertFalse(log.exists())
self.assertEqual(log.with_suffix(".log.1").read_text(encoding="utf-8"), "old")
def test_doctor_report_is_machine_readable(self) -> None:
with tempfile.TemporaryDirectory() as tmp:
root = Path(tmp)
with patch.object(services, "ROOT", root), \
patch.object(services, "RUNTIME_DIR", root / ".aiw" / "runtime"), \
patch.object(services, "PID_DIR", root / ".aiw" / "runtime" / "pids"), \
patch.object(services, "LOG_DIR", root / ".aiw" / "runtime" / "logs"), \
patch.object(services, "STATE_DIR", root / ".aiw" / "runtime" / "state"):
report = services.doctor_report("test", sample_manifest())
self.assertTrue(report["manifest_ok"])
self.assertEqual(report["services"][0]["name"], "alpha")
self.assertIn("health", report["services"][0])
def test_read_pid_ignores_invalid_pid_file(self) -> None:
with tempfile.TemporaryDirectory() as tmp:
pid_dir = Path(tmp) / "pids"