summaryrefslogtreecommitdiffhomepage
path: root/packages/session-orchestrator/src/queue.test.ts
diff options
context:
space:
mode:
authorAdam Malczewski <[email protected]>2026-06-23 03:27:01 +0900
committerAdam Malczewski <[email protected]>2026-06-23 03:27:01 +0900
commitb346a50c3757b3df6086f11b995847144a5e07e8 (patch)
tree0119ff2a63e3ef9e9efb0190daeb20707e1c5f7a /packages/session-orchestrator/src/queue.test.ts
parent6d7b3923b40eb4baf3cefadfde236de646990713 (diff)
downloaddispatch-b346a50c3757b3df6086f11b995847144a5e07e8.tar.gz
dispatch-b346a50c3757b3df6086f11b995847144a5e07e8.zip
feat: workspaces — session-orchestrator + transport-http + transport-ws + cli (Wave 2+3)
session-orchestrator: workspaceId on StartTurnInput/EnqueueInput; effective cwd resolution (getCwd → getEffectiveCwd); auto-create workspace on turn start; warm parity (same effective cwd). 93 tests (+8). transport-http: workspace routes (GET/PUT/DELETE /workspaces, title, default-cwd); workspaceId threading on POST /chat + queue; ?workspaceId= filter on GET /conversations; DELETE /conversations/:id/cwd (clears explicit cwd); GET /conversations/:id/lsp uses effective cwd; slug validation. 166 tests. transport-ws: workspaceId threading on chat.send + chat.queue. 32 tests. cli: --workspace/-w flag; ConversationMeta test fakes fixed. 123 tests. Full typecheck EXIT 0, biome clean. 1283 vitest + 199 transport bun pass (1 pre-existing tool-shell failure unrelated to workspaces).
Diffstat (limited to 'packages/session-orchestrator/src/queue.test.ts')
-rw-r--r--packages/session-orchestrator/src/queue.test.ts25
1 files changed, 25 insertions, 0 deletions
diff --git a/packages/session-orchestrator/src/queue.test.ts b/packages/session-orchestrator/src/queue.test.ts
index 58de4a9..71b1fb4 100644
--- a/packages/session-orchestrator/src/queue.test.ts
+++ b/packages/session-orchestrator/src/queue.test.ts
@@ -93,6 +93,31 @@ function createInMemoryStore(): ConversationStore & {
async setCompactPercent() {},
async forkHistory() {},
async setCompactedFrom() {},
+ async getWorkspace() {
+ return null;
+ },
+ async ensureWorkspace(id) {
+ return { id, title: id, defaultCwd: null, createdAt: 0, lastActivityAt: 0 };
+ },
+ async setWorkspaceTitle(id, title) {
+ return { id, title, defaultCwd: null, createdAt: 0, lastActivityAt: 0 };
+ },
+ async setWorkspaceDefaultCwd(id, defaultCwd) {
+ return { id, title: id, defaultCwd, createdAt: 0, lastActivityAt: 0 };
+ },
+ async deleteWorkspace() {
+ return { closedCount: 0 };
+ },
+ async listWorkspaces() {
+ return [];
+ },
+ async getWorkspaceId() {
+ return "default";
+ },
+ async setWorkspaceId() {},
+ async getEffectiveCwd(conversationId) {
+ return cwdData.get(conversationId) ?? null;
+ },
};
}