diff options
| author | Adam Malczewski <[email protected]> | 2026-06-25 11:32:14 +0900 |
|---|---|---|
| committer | Adam Malczewski <[email protected]> | 2026-06-25 11:32:14 +0900 |
| commit | 0b154bdad4f75a091db3ca46424abd17fbbc23ff (patch) | |
| tree | c9c0f1feb7a46fc0a4e89f7d266b87efb3c027bf /packages/kernel/src/contracts/tool.ts | |
| parent | b870855aa7a3d8df963a36d0b5323dfcd642bcee (diff) | |
| download | dispatch-0b154bdad4f75a091db3ca46424abd17fbbc23ff.tar.gz dispatch-0b154bdad4f75a091db3ca46424abd17fbbc23ff.zip | |
feat(ssh): wave 0 — kernel contract seam (computerId)
Add additive optional `computerId` field to ToolExecuteContext + RunTurnInput.
The kernel never interprets it (forwards verbatim to tools, like cwd) — it never
enters the model prompt (no prompt-cache impact). When omitted/undefined,
execution is LOCAL (today's behavior), so this is fully backward compatible.
This is the orchestrator-authored seam (ORCHESTRATOR.md §2a) that lets Wave 1's
producers (wire Computer types, exec-backend contract) and the consumer
(kernel runtime threading) run in parallel against a fixed type.
Refs: notes/ssh-support-plan.md (decisions resolved in §0.5/§13).
No merge or push.
Diffstat (limited to 'packages/kernel/src/contracts/tool.ts')
| -rw-r--r-- | packages/kernel/src/contracts/tool.ts | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/packages/kernel/src/contracts/tool.ts b/packages/kernel/src/contracts/tool.ts index d5a835c..589fbd0 100644 --- a/packages/kernel/src/contracts/tool.ts +++ b/packages/kernel/src/contracts/tool.ts @@ -78,6 +78,18 @@ export interface ToolExecuteContext { * a tool has no conversation scope (e.g. a global tool). */ readonly conversationId?: string; + + /** + * The computer this tool-call executes on (SSH support). When + * omitted/undefined, execution is LOCAL (today's behavior — the tool uses + * the local node fs/child_process). When set, it is an SSH config alias + * (see `notes/ssh-support-plan.md` §3); a tool resolves a remote + * `ExecBackend` for it via its injected resolver. The kernel never + * interprets it — it forwards the value verbatim from + * `RunTurnInput.computerId`, exactly like `cwd`. It never enters the model + * prompt, so it does not affect prompt caching. + */ + readonly computerId?: string; } /** |
