Seam
Socket, plug, and lamp
A seam has three roles: define an interface, implement it, and consume it. Replace the provider without changing consumers.
Every corner of the triangle matters
Socket, plug, and lamp must all exist. A socket alone is not a capability.
A Service Definition declares the ctx key; a Provider implements it; a Consumer uses it. Extensions depend on definitions, never concrete providers.
Move the execution world as a pair
Hands and feet must enter the same room.
fs and subprocess share an execution world. Point both at E2B and Bash, PTY, and LSP follow without provider-specific forks.
A fence is not a move
A safety gate is not the same as moving the playroom to a cabin.
ctx.sandbox.confine wraps local argv. A remote sandbox is another fs/subprocess provider pair.
Swap one piece and the city follows
That is why the seam exists.
Tool schemas stay stable for the model. Policies attach to fs/* and tools/* events without importing the loop.
Choose a seam
Definition
The shape of the socket
@deepseek-ai/dsh-llm · LlmRuntime
Change the teacher without changing the classroom.
Provider
Which building provides the plug
dsh-llm-deepseek
Official DeepSeek adapter
dsh-llm-pi-ai
Multiple providers activated through settings
dsh-llm-replay
Replay recorded logs for keyless tests
Consumer
The lamp does not change
dsh-agent-loop
llm/stream
dsh-compaction-basic
Calls the model again for summaries
The loop knows only GenerateOptions and StreamChunk. Replacing the adapter does not change the session log shape.
Moving demo: home ↔ cloud cabin
Stays put
- agent-loop
- session log
- llm calls
- skills
Execution world at home
- fs-local / fs-sandbox
- subprocess-local
- sandbox-local fence
Tools that follow unchanged
- tool-bash / bash-sandbox
- terminal-bash (PTY)
- lsp-stdio
- tool-fs