Skip to content

Latest commit

 

History

History
120 lines (84 loc) · 3.67 KB

File metadata and controls

120 lines (84 loc) · 3.67 KB

COMMITS.md — chio-open-code-plugin

Native OpenCode plugin (@<NPM_SCOPE>/opencode-plugin). Scaffolds, wraps, and ships bonded agents without leaving the TUI. OpenCode's plugin API has no slash-command surface — commands surface as first-class custom tools. Target first ship tag: v0.2.0.


1. chore: scaffold OpenCode plugin package

Body. package.json (@chio/opencode-plugin, exports the ChioPlugin default), tsconfig.json, LICENSE, .gitignore, bun.lock. Depends on @chio/bridge via workspace and @opencode-ai/plugin as the plugin API peer. Wave 1.

Files.

  • package.json, bun.lock
  • tsconfig.json
  • LICENSE, .gitignore

2. feat: eight custom tools backed by ChioBridge

Body. Exposes eight chio_* tools via the OpenCode custom-tool API: chio_init, chio_wrap (wraps an MCP server via chio mcp serve-http -- <cmd>), chio_guard_add, chio_policy_lint, chio_replay, chio_deploy, chio_doctor, chio_status. Each maps to a real ChioBridge call or a real chio subprocess. tool.execute.before intercepts every tool invocation and calls ChioBridge.check — deny stamps args + surfaces through tool.execute.after. Bond status is prefixed into every mediated tool result's title (OpenCode's plugin API exposes no status-bar primitive). Wave 1 rewrite against the host schema.

Files.

  • src/index.ts — plugin entry + lifecycle hooks.
  • src/tools/*.ts — one file per custom tool.
  • src/hooks/*.tstool.execute.before, tool.execute.after, session.autobond.
  • src/lib/*.ts — bridge construction, status-line renderer, receipts.db helper.
  • templates/ — six preset policies (tool-agent, code-agent, research-agent, support-agent, trader, release-engineer).

3. test: unit coverage and chio-backed smoke

Body. Unit tests cover each tool's argument parsing, the tool.execute.before fail-closed path, status-line rendering, and preset-policy HushSpec parse. smoke.sh registers the plugin with a local opencode.json, bonds a session, drives chio_initchio_wrapchio_replay end-to-end against chio-test-harness. Wave 1 + ST.2.x.

Files.

  • test/*.test.ts
  • smoke/ — manual smoke fixtures.
  • smoke.sh
  • SMOKE.md

4. feat: chio rename, CHIO_MODE env, extensions.chio presets

Body. Imports + bridge construction switch to ChioBridge / ChioClient. Env var ladder CHIO_MODE=daemon|cli + CHIO_MCP_EDGE_URL + CHIO_TRUST_URL + CHIO_TRUST_TOKEN. Preset policies move velocity, human_in_loop, market_hours, signing, k8s_namespaces, rollback, capability, budget under extensions.chio.* until upstream chio accepts them as first-class rule keys (see ARC_UPSTREAM_PROPOSAL.md). Wave 5.0.

Files.

  • src/index.ts, src/lib/*.ts — bridge construction rename.
  • templates/*.yaml — preset migration.

5. ci: lint, typecheck, and chio-backed smoke

Body. GitHub Actions workflow parallel to the other plugins' ci.yml. Wave 5.1.

Files.

  • .github/workflows/ci.yml

6. ci: add SLSA L3 release workflow

Body. Tag-triggered npm publish --provenance to @<NPM_SCOPE>/opencode-plugin with SLSA L3 attestation via the publish-chio composite. Wave 5.5.

Files.

  • .github/workflows/release.yml

7. docs: README with plugin contract, custom-tool table, preset map

Body. Documents the install flow (cargo install --path crates/chio-cli or brew install chio-protocol/tap/chio once the tap ships), the custom-tool table, the six presets, the status-line convention, and the real Plugin contract against @opencode-ai/plugin@1.14.19. Wave 5.2.

Files.

  • README.md
  • VERIFY.md