Documentation
¶
Overview ¶
Package opencode is the opencode adapter (Phase E, R-E1..R-E8): a stateless, goroutine-safe strategy object over the `opencode` CLI. Like every adapter it owns no process, fd, socket, or disk (core owns all lifecycle), so its only in-module dependencies are the contract package and internal/vt (the T-5 boundary).
opencode's real status surface is its own HTTP+SSE server: a SINGLE session.status event carrying a status payload (busy/idle/retry), plus separate permission/question request objects — not the per-transition typed events (turn/started, turn/completed, ...) the engine's exact-event-name + static-turn mapping expects today (that shape fits Codex's app-server, not opencode's single status event). Declaring invented flattened event names (e.g. "session.status.busy") would encode a fake wire schema, so SignalSources declares HEURISTICS ONLY (R-E4): the generic grid prompt-marker plus a busy-contains rule on "esc interrupt", the one stable footer marker the Phase B characterization (docs/verification/cli-duo-adapters-evidence.md) proved present across the ENTIRE busy window with zero gaps. That same characterization could not jointly satisfy a stable idle substring (R-B2b/c), so opencode declares NO idle rule — unknown at rest is the honest T-4 outcome, not a guessed-wrong idle. The typed-event path (a payload-to-turn subtype contract for session.status) is documented future work, not implemented here.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
This section is empty.