opencode::on-config-change
Internal: reload opencode configuration when it changes.
OpenCode as an iii worker — opencode::* functions run headless OpenCode turns, mirror raw JSON events onto opencode::events, and stream AgentEvent frames onto agent::events.
exact versions are immutable; binary and bundle artifacts are digest-pinned.
Internal: reload opencode configuration when it changes.
Run one OpenCode turn and wait for the result. Accepts `prompt` or a `messages` array; streams raw OpenCode JSON events onto opencode::events, AgentEvent frames onto agent::events, 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; watch agent::events (group_id = 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
Point-in-time status of an OpenCode session.
iii session id returned by opencode::run / opencode::start
Interrupt 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