opencode::on-config-change
Internal: reload opencode configuration when it changes.
OpenCode as an iii worker — opencode::* functions run headless OpenCode turns, deliver raw JSON events on the opencode::raw-event trigger type and AgentEvent frames on opencode::agent-event.
exact versions are immutable; binary and bundle artifacts are digest-pinned.
Internal: reload opencode configuration when it changes.
Run one OpenCode coding-agent turn and wait for the result. Accepts `prompt` or a `messages` array; delivers raw events on the opencode::raw-event trigger and AgentEvent frames on opencode::agent-event (bind with { session_id }), and returns {session_id, result, usage, total_cost_usd}.
OpenCode agent to use
Working directory the turn runs in
Prepend the iii runtime discovery context (engine catalog via the iii CLI)
Alternative to prompt: role/content messages; the last user entry becomes the prompt
Model as "provider/model"; empty = OpenCode default
The user prompt for this turn
iii session id; reuse to resume the same OpenCode conversation
Reserved for callers; not forwarded
List every OpenCode session this worker has run.
Start an OpenCode turn and return immediately; bind opencode::agent-event with { session_id } for progress and turn_end.
OpenCode agent to use
Working directory the turn runs in
Prepend the iii runtime discovery context (engine catalog via the iii CLI)
Alternative to prompt: role/content messages; the last user entry becomes the prompt
Model as "provider/model"; empty = OpenCode default
The user prompt for this turn
iii session id; reuse to resume the same OpenCode conversation
Reserved for callers; not forwarded
Check the status of an OpenCode session.
iii session id returned by opencode::run / opencode::start
Stop a live OpenCode run for a session.
iii session id returned by opencode::run / opencode::start
Alias for opencode::run under the shared agent entrypoint: run a turn for {session_id, messages} and return when it ends.
OpenCode agent to use
Working directory the turn runs in
Prepend the iii runtime discovery context (engine catalog via the iii CLI)
Alternative to prompt: role/content messages; the last user entry becomes the prompt
Model as "provider/model"; empty = OpenCode default
The user prompt for this turn
iii session id; reuse to resume the same OpenCode conversation
Reserved for callers; not forwarded
Translated AgentEvent frames of one OpenCode session. Config: { session_id, metadata? }. Payload: { session_id, event_id, seq, epoch, source, event }. Ephemeral: not stored or replayed.
Raw OpenCode JSON events (verbatim `opencode run --format json` lines) of one session. Config: { session_id, metadata? }. Payload: { session_id, event_id, seq, epoch, source, event }. Ephemeral: not stored or replayed.