SDK-only OpenClaw plugin and context-engine bridge for OpenCode + OmO
简体中文 · Operations · Contributing · Security
omo claw connects OpenClaw threads to an isolated headless OpenCode + OmO runtime. It gives you a clean plugin entrypoint, a controlled bridge layer, replay-aware event reduction, permission flow management, and compatibility-aware operation without depending on ACP.
Tell your OpenCode or OpenClaw agent:
Install and configure omo claw by following the instructions here:
https://raw.githubusercontent.com/Her-xanadu/omo-claw/main/docs/guide/install.md
brew tap Her-xanadu/omo-claw https://github.com/Her-xanadu/omo-claw
brew install --HEAD omo-claw
omo-claw-install /path/to/your/openclaw/plugins/omo-clawnpm install -g github:Her-xanadu/omo-claw
omo-claw-install /path/to/your/openclaw/plugins/omo-clawgit clone https://github.com/Her-xanadu/omo-claw.git
cd omo-claw
./scripts/setup-local.shomo-claw-install clones the repository, runs local setup, and then prints the remaining OpenClaw registration steps.
Most integrations stop at “call an SDK and hope it works.” omo claw goes further:
- it isolates a dedicated headless
opencode serveruntime - it maps OpenClaw threads into a session tree
- it keeps permission flow, todo mirroring, summary reduction, and replay semantics in one bridge
- it adds compatibility snapshots, diff classification, and mode switching so upgrades are survivable
This makes it useful both as a real plugin and as a reference implementation for building serious OpenClaw ↔ OpenCode bridges.
| Layer | Responsibilities |
|---|---|
| OpenClaw | Plugin host, context-engine registration, gateway status, user entry |
| omo claw bridge core | Runtime management, SDK client, route engine, session graph, permission bridge, event reducer, replay, compatibility controller |
| Headless OpenCode + OmO | Agent execution, event stream, todo source of truth, compaction, permission requests |
- isolated
opencode serveruntime on port19222 - XDG-separated config / data / state
- Basic Auth protected bridge runtime
- thread → root session mapping
- command-first, agent-fallback routing
- message correlation for
promptAsync+ SSE flow
- event reduction
- summary cache
- todo mirror
- replay / rebind support
- compaction-friendly companion hook path
- capability snapshot collection
- diff classification
- mode switching (
full,compatible,safe,quarantine) - adapter registry plumbing
Before using omo claw, make sure you have:
- Bun
opencodeCLI available in PATH (or at~/.opencode/bin/opencode)- an OpenClaw installation that supports context-engine plugins
- permission to run a local headless service on
127.0.0.1:19222
| OS | Status | Notes |
|---|---|---|
| macOS | ✅ primary tested platform | recommended environment |
| Linux | only if your OpenClaw + OpenCode stack already works | |
| Windows | ❌ not documented | use at your own risk / not currently supported |
| Requirement | Why it is needed |
|---|---|
| Bun | install dependencies and run the TypeScript project scripts |
OpenCode CLI (opencode) |
starts the isolated headless runtime |
| OpenClaw | hosts the plugin / context-engine |
| Local filesystem access | stores runtime config, state, and generated definitions |
- confirm
bun --versionworks - confirm
opencode --helpworks, or~/.opencode/bin/opencodeexists - confirm OpenClaw can load plugins from your plugin workspace
- confirm port
19222is available
Homebrew and npm can bootstrap installation, but this repository is still an OpenClaw plugin project with a managed runtime bridge.
./integration/bridge-runtime/bridge-launcher.sh
./tests/live/runtime-health.smoke.shIf everything is wired correctly, the smoke check returns:
{"healthy": true, "version": "1.2.21"}- Place this repository into your OpenClaw plugin workspace.
- Register
openclaw.plugin.jsonwith your OpenClaw installation. - Configure the context-engine slot to use plugin id
omo-claw. - Start the bridge runtime with
./integration/bridge-runtime/bridge-launcher.sh. - Verify the runtime with
./tests/live/runtime-health.smoke.sh.
The main OpenClaw-facing identifiers are:
| Item | Value |
|---|---|
| Plugin id | omo-claw |
| Plugin name | omo claw |
| Gateway method | omo-claw.status |
| Status command | omo_claw_status |
./scripts/setup-local.sh
bun test
bun run typecheck
./tests/live/runtime-health.smoke.shUseful extra commands:
bun run compile:definitions
./scripts/publish-github.sh omo-claw Her-xanadu public| Path | Purpose |
|---|---|
src/ |
bridge implementation |
integration/bridge-runtime/ |
isolated runtime wrapper, config, launcher |
definitions/ |
single-source IR, compiler, generated manifests |
compatibility/ |
snapshots, diff classifier, adapter registry |
contracts/ |
machine-checkable bridge contracts |
tests/ |
unit, contract, e2e, smoke verification |
Formula/ |
Homebrew formula for the installer wrapper |
docs/guide/ |
agent-friendly install guides |
docs/assets/ |
README visual assets |
- never commit
integration/bridge-runtime/.bridge-secret - keep runtime state under ignored
integration/bridge-runtime/xdg/ - review generated artifacts before publishing if local metadata changes
- validate compatibility mode and event-directory filtering after upgrades
- OpenClaw for the plugin host and context-engine surface
- OpenCode for the SDK/runtime model that powers the bridge
MIT

