Files

OpenCode harness

Runs conversations on opencode (opencode run --standalone): GPT models on an account's ChatGPT login, or local models (provider-evox2) (evox2*/…) on a keyless account.

  • Sidecar driver (sidecar/driver.py): spawn, resume (keeps the session's own model and effort), native fork before a message, the device-code ChatGPT sign-in, logout, and the access token the hub's opencode proxy bills a worker's runs on.
  • Mirror (sidecar/mirror.py): each account's opencode.db → v1 transcripts under ~/.opencode-runner/transcripts/<account>/, append-only, deduped on ocKey.
  • Local models: the run config's evox2* providers come from the provider-evox2 plugin when the sidecar has it, else pi's models.json.
  • MCP servers (sidecar/mcp.py): the hub's MCP servers plugin's servers kept in a 0600 file per account and merged into each run's OPENCODE_CONFIG_CONTENT — opencode.json is never touched.
  • Accounts are SIDECAR_OPENCODE_ACCOUNTS (keyless ones in SIDECAR_OPENCODE_KEYLESS); usage % comes from the provider-openai plugin.

Owner only (guestAllowed: false); loaded by the sidecar's harness loader, no built-in fallback.