Distinguish services from scripts with type system and runtime tracking

This commit is contained in:
Mohamed Boudra
2026-04-09 23:45:00 +07:00
parent c7399084a4
commit b1b85833bb
27 changed files with 1265 additions and 493 deletions
@@ -155,11 +155,13 @@ describe("workspace message schemas", () => {
expect(parsed.payload.workspace.scripts).toEqual([
{
scriptName: "web",
type: "service",
hostname: "web.localhost",
port: 3000,
url: "http://web.localhost:6767",
lifecycle: "running",
health: "healthy",
exitCode: null,
},
]);
});
@@ -213,6 +215,10 @@ describe("workspace message schemas", () => {
expect(parsed.type).toBe("script_status_update");
expect(parsed.payload.workspaceId).toBe("/repo");
expect(parsed.payload.scripts[0]).toMatchObject({
type: "service",
exitCode: null,
});
});
test("parses workspace_setup_progress payload", () => {