@xemahq/worker-runtime-opencode
v0.6.0
Published
Opencode WorkerRuntime driver — wraps the workspace-proxy control-session handshake and the opencode SSE event stream behind the kernel WorkerRuntime contract.
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 protocol it already exposes — no new wire format. A runtime instance is bound to a single worker at construction time and translates pod specs, session bundles, and pause/resume 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);
const bundle = await runtime.buildSessionBundle(input);
await runtime.applySessionBundle(bundle);License
Apache-2.0 © Xema — xema.dev
