@clawdstrike/opencode
v0.2.7
Published
In-process tool boundary hooks for OpenCode-style coding assistants
Downloads
301
Maintainers
Readme
@clawdstrike/opencode
In-process tool-boundary hooks for OpenCode-style coding assistants.
See Enforcement Tiers & Integration Contract for what this does and does not prevent (and what requires a sandbox/broker).
Install
npm install @clawdstrike/opencode @clawdstrike/engine-localUsage
import { createStrikeCell } from '@clawdstrike/engine-local';
import { OpenCodeToolBoundary, wrapOpenCodeToolDispatcher } from '@clawdstrike/opencode';
const engine = createStrikeCell({ policyRef: 'default' });
const boundary = new OpenCodeToolBoundary({ engine });
const dispatchTool = wrapOpenCodeToolDispatcher(boundary, async (toolName, input, runId) => {
// ...execute the tool...
return { toolName, input, runId };
});
await dispatchTool('write_file', { path: './out.txt', content: 'hi' }, 'run-1');