You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Commit f65de52
Browse filesBrowse the repository at this point in the historyBrowse files
feat(craft): opencode-serve transport with PodEventBus
Replaces the per-message opencode-acp subprocess with a long-lived
opencode-serve per sandbox pod, driven from the api server via an
in-process event multiplexer (PodEventBus). Fixes packet drops and
dead streams from the prior ACP path.
- Migration: add opencode_session_id, agent_provider, agent_model on
BuildSession. agent_provider/agent_model become the per-prompt
override on opencode's prompt_async — opencode-serve loads config
once at startup and does not hot-reload (anomalyco/opencode#22213), so we
can't change provider config in flight.
- opencode.json multi-provider: every configured LLM provider is
pre-loaded into the pod via OPENCODE_CONFIG_CONTENT (per-pod K8s
Secret value, surfaced as env var). Without this, opencode falls
back to its built-in opencode/big-pickle default and silently
ignores the user's selected provider.
- entrypoint.sh gates on AGENT_TRANSPORT so the ACP rollback path
doesn't share XDG_DATA_HOME with a live opencode-serve (would
corrupt the SQLite session store).
- PodEventBus: one /event SSE subscription per pod, fanned out to
per-session subscriber queues. Tracks parent/child sessions for
subagent navigation. Aggressive reconnect with a give-up cap so
orphan pods don't leak reader threads.
- Subagent infrastructure: list_subagents / subscribe_to_opencode_session
on SandboxManager; per-prompt model override threaded end-to-end.
Tests: 138 new unit tests covering the translator, bus, send_message,
and multi-provider opencode_config, plus a live external-dependency
probe against the kind cluster.
Co-Authored-By: Claude Opus 4.7 (1M context) <[email protected]>
0 commit comments