{ "_comment": [ "dsh-proof on OpenCode — copy into your project as opencode.json, or merge the keys into an existing one. JSON has no comments, hence this key; OpenCode ignores unknown keys.", "Two pieces cooperate:", "1) 'plugin' loads the OpenCode adapter (dsh-proof/lib/adapters/opencode/plugin.js in the npm-installed form used below). It enforces what MCP cannot: the evidence-store guard and baseline gate hold risky tool calls via tool.execute.before, tool.execute.after fingerprints what tool calls actually moved (drift detection), and chat.params appends the proof:policy system-prompt section. The adapter probes each surface at runtime and degrades to a no-op with one stderr line when OpenCode's API shifts — the MCP tools below are unaffected.", "2) 'mcp.proof' spawns the dsh-proof MCP stdio server (the package's dsh-proof-mcp bin) exposing the thirteen conformance tools: proof_status, proof_baseline, proof_verify, proof_claim, proof_bundle, proof_publish, proof_log_verify, proof_delegate, proof_delegate_submit, proof_task, proof_training_export, proof_economics, proof_sla_quote.", "Checkout instead of npm install: point 'plugin' at the compiled file inside your dsh-proof checkout, e.g. \"./tools/dsh-proof/lib/adapters/opencode/plugin.js\" (run `npm run build` there first — OpenCode loads compiled JS, not the .ts sources). The path is real package surface: package.json exports ./lib/*, so both the npm form and a checkout resolve.", "Where environment variables land — read this before moving the evidence store: the plugin runs INSIDE the OpenCode host process and reads the HOST process environment; 'mcp.environment' configures only the MCP server SUBPROCESS. Setting DSH_PROOF_EVIDENCE_STORE under mcp.environment moves the server's store while the plugin's gates keep the host-process value — set the DSH_PROOF_* variables at the host level (the shell or launcher that starts OpenCode) when you want gates and tools to guard the same store. All three faces parse the same DSH_PROOF_* contract; only make sure the values actually reach each process.", "Baseline policy defaults to warn (mutation tools pass, model gets a corrective notice). Set DSH_PROOF_REQUIRE_BASELINE=ask to hold baseline-less mutations instead — see the adapter's README section for every option." ], "plugin": [ "dsh-proof/lib/adapters/opencode/plugin.js" ], "mcp": { "proof": { "type": "local", "command": [ "dsh-proof-mcp" ], "environment": { "DSH_PROOF_EVIDENCE_STORE": "host" } } } }