diff options
| author | Adam Malczewski <[email protected]> | 2026-06-25 14:43:29 +0900 |
|---|---|---|
| committer | Adam Malczewski <[email protected]> | 2026-06-25 14:43:29 +0900 |
| commit | eb6adc405fab9b55590af6b235106dcabab5946e (patch) | |
| tree | d158e92a01f7beb7dd97a866f78c3282264b361a /packages/session-orchestrator/src/queue.test.ts | |
| parent | 1ff0eac44cd44751af979c51c746a1774c268e8a (diff) | |
| download | dispatch-eb6adc405fab9b55590af6b235106dcabab5946e.tar.gz dispatch-eb6adc405fab9b55590af6b235106dcabab5946e.zip | |
feat(ssh): wave 3 — session-orchestrator computerId threading + transport-contract API types
Wave 3 of transparent SSH support (2 parallel owner-agents on disjoint packages).
- session-orchestrator: thread computerId end-to-end through the turn, mirroring
cwd exactly — StartTurnInput/EnqueueInput/handleMessage/TurnLifecyclePayload
gain computerId; runTurnDetached resolves effectiveComputerId via
conversationStore.getEffectiveComputer(convId, override), persists the override,
threads into RunTurnInput + ToolAssembly. Register a remote-degradation
tools-filter (filterRemoteIncompatibleTools) that, when assembly.computerId is
set (REMOTE), drops the 'lsp' tool + any '__'-namespaced MCP tool (local
processes that can't see remote files); LOCAL (computerId undefined) is a
passthrough — byte-identical to today. +21 tests.
- transport-contract: + computerId on ChatRequest (flows to ChatSendMessage) +
computer endpoint API types (ComputerListResponse, ComputerResponse,
ComputerStatusResponse, SetConversationComputerRequest,
ConversationComputerResponse, SetWorkspaceDefaultComputerRequest,
TestComputerResponse) — mirrors the cwd/workspace endpoint types.
- CR-1 (non-blocking, folded into wave 4): MCP filter doesn't preserve computerId
on the returned ToolAssembly.
- cache-warming computerId threading intentionally DEFERRED (user request) —
noted as a known performance-only limitation in tasks.md.
Verified: tsc -b EXIT 0, biome clean, 1620 vitest pass (was 1599, +21).
Refs: notes/ssh-support-plan.md (decisions §0.5/§13). No merge or push.
Diffstat (limited to 'packages/session-orchestrator/src/queue.test.ts')
| -rw-r--r-- | packages/session-orchestrator/src/queue.test.ts | 48 |
1 files changed, 45 insertions, 3 deletions
diff --git a/packages/session-orchestrator/src/queue.test.ts b/packages/session-orchestrator/src/queue.test.ts index 225d1af..adf5d9a 100644 --- a/packages/session-orchestrator/src/queue.test.ts +++ b/packages/session-orchestrator/src/queue.test.ts @@ -72,6 +72,14 @@ function createInMemoryStore(): ConversationStore & { async setCwd(conversationId, cwd) { cwdData.set(conversationId, cwd); }, + async clearCwd(conversationId) { + cwdData.delete(conversationId); + }, + async getComputerId() { + return null; + }, + async setComputerId() {}, + async clearComputerId() {}, async getReasoningEffort(conversationId) { return effortData.get(conversationId) ?? null; }, @@ -110,13 +118,44 @@ function createInMemoryStore(): ConversationStore & { return null; }, async ensureWorkspace(id) { - return { id, title: id, defaultCwd: null, createdAt: 0, lastActivityAt: 0 }; + return { + id, + title: id, + defaultCwd: null, + defaultComputerId: null, + createdAt: 0, + lastActivityAt: 0, + }; }, async setWorkspaceTitle(id, title) { - return { id, title, defaultCwd: null, createdAt: 0, lastActivityAt: 0 }; + return { + id, + title, + defaultCwd: null, + defaultComputerId: null, + createdAt: 0, + lastActivityAt: 0, + }; }, async setWorkspaceDefaultCwd(id, defaultCwd) { - return { id, title: id, defaultCwd, createdAt: 0, lastActivityAt: 0 }; + return { + id, + title: id, + defaultCwd, + defaultComputerId: null, + createdAt: 0, + lastActivityAt: 0, + }; + }, + async setWorkspaceDefaultComputerId(id, defaultComputerId) { + return { + id, + title: id, + defaultCwd: null, + defaultComputerId, + createdAt: 0, + lastActivityAt: 0, + }; }, async deleteWorkspace() { return { closedCount: 0 }; @@ -131,6 +170,9 @@ function createInMemoryStore(): ConversationStore & { async getEffectiveCwd(conversationId) { return cwdData.get(conversationId) ?? null; }, + async getEffectiveComputer() { + return null; + }, }; } |
