概览
dsh-deep-opencode
opencode serve so the free models resolve from inside OpenCode.README / ZH
插件文档
目录摘要
opencode serve so the free models resolve from inside OpenCode.dsh.pub 核对固定版本的组合包契约、运行时事实与分发语义;完整 README 请查看源仓库。
在 GitHub 阅读完整 READMELIMITATIONS
已知限制
- **Continuity is held by the provider, not the log.** A turn sends only what is new, because OpenCode keeps the conversation itself. If Harness rewrites a past message — a compaction, a fork — the cursor loses its anchor and the whole conversation is replayed into a fresh provider session. Continuity then resets to what was replayed. - **A fork starts a new provider session.** The inherited Harness transcript is replayed into that fresh session on its first request. - **Token accounting counts the whole conversation each turn.** The provider holds the history, so per-turn input tokens reflect everything it re-reads, while the Harness log only records what was sent. - **OpenCode owns the delegated agent loop.** DSH retains its session log and turn lifecycle and executes bridged plugin tools through its own runtime. Native OpenCode tools use OpenCode's configuration and permission flow. - **One managed server per project directory.** Each project gets its own `opencode serve`, and session creation passes the directory through OpenCode's native `location` field. Several projects cost several OpenCode processes. - **A session with no project directory falls back** to the `cwd` config field, or the harness's own working directory when that is unset. - **Replayed history is model context.** Inherited messages are restored with their roles through the companion rather than inserted into native storage. Existing native sessions created by older versions retain their saved text; start a new Harness chat after updating to get a clean native transcript. - **Standalone adapter callers must configure the companion transport** to forward Harness instructions, injected context, or replayed history. Missing transport fails with `NO_TOOL_BRIDGE`; the normal Cordis plugin configures it automatically, including when DSH tools are disabled. - **Only the free models are offered.** A paid OpenCode model is reachable through the harness's own `opencode`/`opencode-go` providers with a key; this route deliberately lists only zero-cost models, because a paid model reached through a free route would be a real charge. - **A model the installed OpenCode does not serve cannot be used here**, even if a catalogue lists it as free. Availability is whatever the running server reports, which is why the list is discovered rather than hard-coded. - **Native tool events use the event hook.** Bridged DSH calls and results are recorded in Harness's journal. Native OpenCode tool calls are observable through `deep-opencode/event`; they are not replayed as DSH tool calls. - **No reasoning-effort selection.** OpenCode chooses its own reasoning settings; this route does not expose the provider's effort levels. - **Image inputs are not forwarded.** Only text reaches the delegated turn, so a model that accepts images is still driven with text here. - **A missing or broken OpenCode install fails at request time**, not at mount: the route stays registered so a repaired install works without reloading the profile. Load-time discovery failure is logged as a warning. - **Reloading interrupts in-flight turns.** The plugin interrupts delegated runs, deletes its mapped sessions, then stops its managed servers.
