@fusedio/agentbridge-adapter-opencode
v0.1.3
Published
OpenCode CLI adapter for agentbridge: invocation, JSONL stream parsing, session resume, and environment checks.
Downloads
2,420
Readme
@fusedio/agentbridge-adapter-opencode
agentbridge adapter for the OpenCode
CLI (opencode). Parses its JSONL output into agentbridge's normalized
TranscriptEntry stream and a final ExecutionResult carrying token usage and costUsd.
Install
npm install @fusedio/agentbridge-hub @fusedio/agentbridge-adapter-opencodeRequires the opencode CLI on your PATH.
Usage
import { createAgentHub } from "@fusedio/agentbridge-hub";
import { createAdapter } from "@fusedio/agentbridge-adapter-opencode/server";
const hub = createAgentHub({ adapters: [createAdapter()] });
const run = hub.run({ adapter: "opencode", prompt: "…", cwd: process.cwd() });Two entry points:
.— metadata + the pure stdout-line parser (browser-safe, no Node imports)../server— Node-only execution: thecreateAdapter()factory,execute, andtestEnvironment.
ESM-only, Node >= 20.
License
MIT © Fused
