@xemahq/worker-runtime-opencode
v0.1.5
Published
Opencode WorkerRuntime driver — wraps the workspace-proxy /control/session-bundle handshake and the opencode SSE event stream behind the kernel WorkerRuntime contract (Phase A.4 of xema-os-plan §1 WorkerRuntime).
Readme
@xemahq/worker-runtime-opencode
Opencode driver for the worker-runtime contract
Overview
An Opencode driver implementing the kernel worker-runtime contract. It is a thin adapter over the existing workspace control plane, speaking the same HTTP and SSE protocol it already exposes — no new wire format. A runtime instance is bound to a single worker at construction time and translates session bundles, user messages, and the event stream into the shared runtime interface so orchestration stays runtime-agnostic.
When to use it
- Use it to drive an Opencode-backed agent session behind the shared worker-runtime interface.
Installation
pnpm add @xemahq/worker-runtime-opencodeUsage
import { createOpencodeWorkerRuntime } from '@xemahq/worker-runtime-opencode';
const runtime = createOpencodeWorkerRuntime(config);
await runtime.sendUserMessage(message);License
Apache-2.0 © Xema — xema.dev
