Skip to content

About

Use the most mature agentic desktop app (OpenChamber) with the best-in-class harness (OmO senpi)

Topics

Resources

Code of conduct

Contributing

Security policy

Stars

1 star

Watchers

0 watching

Forks

Repository files navigation

antechamber

A local OpenCode-compatible HTTP/SSE server that lets OpenChamber drive OmO instead of OpenCode. Plain pi also works as an opt-in backend.

CI License

What it is

OpenChamber only speaks the OpenCode HTTP/SSE API. OmO (and pi, which it builds on) are headless agents with their own RPC protocol (JSONL over stdio). antechamber sits between them: it implements the subset of the OpenCode API that OpenChamber actually uses, and translates every call into an OmO RPC session.

OpenChamber (UI)  --OpenCode API (HTTP/SSE)-->  antechamber  --JSONL/stdio-->  omo --mode rpc
                                                                                (one process per session)

No fork of OpenChamber or pi is required. Point OpenChamber at antechamber as an external OpenCode server and sessions run on OmO.

Features

  • Session create/list/rename/archive/delete, prompt streaming (text and reasoning deltas), and abort, mapped onto pi/OmO RPC sessions.
  • Tool calls rendered as native OpenChamber tool parts (bash, write, edit, and so on), including subagent/task cards.
  • Approvals and questions bridged through pi's extension-UI protocol.
  • Todo list bridging from pi/OmO's todo tool to OpenChamber's task panel.
  • Fork, revert, and unrevert backed by the agent's session tree, not a filesystem snapshot. Reverting changes conversation context only; it never touches files on disk.
  • Session diff endpoint (unified patch) independent of OpenChamber's own git integration.
  • Session persistence and revival across connector restarts, with explicit ownership tracking for detached task-host processes it spawned.
  • Idle reaping and a live-process cap (ANTECHAMBER_MAX_LIVE) so long-running deployments don't accumulate agent processes.
  • An optional OpenChamber extension, OmO Graph, that draws the OmO sub-agents behind the open session as a live, clickable graph (see OpenChamber extension).

Supported backends

Backend Status
OmO (omo, package omo-ai) default and supported: titles, steering, subagent cards, structured questions, and private task-host teardown are built and tested against it
pi (@earendil-works/pi-coding-agent) opt-in, best effort: set ANTECHAMBER_PI_BINARY=pi; OmO-specific features are unavailable

antechamber spawns omo from PATH unless ANTECHAMBER_PI_BINARY names another executable (see docs/configuration.md).

Compatibility

OpenChamber API Status
>= 2.0.4 v2 (@opencode-ai/sdk/v2) primary target; antechamber advertises opencode v2.0.20 on --version
1.24.x v1 supported
other versions - not tested

OpenChamber changes which OpenCode API calls it makes between releases. If a feature breaks on a newer OpenChamber, run npm run smoke to see which check failed, then open an issue with the output. See docs/api-surface.md for the maintained route, response, and event-stream inventory.

Quick start

Needs Node.js 22+ and OmO's omo command on PATH (bun add -g omo-ai).

npm i -g antechamber
# or: bun add -g antechamber
antechamber doctor
antechamber setup --auto-update

setup updates OpenChamber's opencodeBinary, preserves all other settings, and backs up an existing settings file before changing it. Restart OpenChamber after setup. Preview changes with antechamber setup --dry-run.

--auto-update keeps antechamber current without any action from you. It writes a small launcher, ~/.config/antechamber/opencode-antechamber, and points OpenChamber at it. Each time OpenChamber starts antechamber, the launcher checks npm for a newer release once the server is up and installs it with the package manager that owns the global install. The new version runs from the next start; startup never waits on the network, and an offline start just skips the check. It needs a global npm or bun install, so it is refused for source checkouts and npx. Drop the flag (plain antechamber setup) to point OpenChamber back at the antechamber bin and stop auto-updates.

Optionally, add the bundled OmO Graph extension: setup ends by printing its folder ($(npm root -g)/antechamber/extensions/omo-dag). In OpenChamber, open Settings → Extensions → Add → Folder, paste that path, and approve the two permissions it asks for. The folder is updated in place by npm update -g.

For an isolated OpenChamber instance, leaving your main settings untouched:

antechamber setup --profile ~/.config/antechamber-openchamber
# setup prints the command for this profile:
OPENCHAMBER_DATA_DIR=~/.config/antechamber-openchamber openchamber serve --port 57124

For a systemd-managed OpenChamber, also capture the shell's PATH and the absolute OmO executable in a user service drop-in:

antechamber setup --systemd
# default unit: openchamber.service; another unit: --systemd my-openchamber.service
systemctl --user daemon-reload && systemctl --user restart openchamber.service
# or explicitly let setup run those commands:
antechamber setup --systemd --restart

--pi-binary /absolute/path/to/omo overrides backend discovery for the drop-in. Other drop-ins setting ANTECHAMBER_* or OCPI_* produce a warning: later files can override the generated configuration. setup never runs systemctl unless --restart is passed.

OpenChamber spawns whatever settings.opencodeBinary points at as serve --hostname H --port P, waits for the stdout line opencode server listening on <url>, then health-checks /global/health. The installed antechamber bin implements this contract itself, including the --version compatibility probe. bin/opencode-antechamber is only needed for source checkouts; bin/opencode-pi remains a deprecated compatibility shim.

You can also run antechamber directly, outside of OpenChamber's managed lifecycle:

antechamber --port 4096 --host 127.0.0.1 --directory /path/to/project
# or, OpenCode-compatible:
antechamber serve --hostname 127.0.0.1 --port 4096

Commands

Command Purpose / options
antechamber serve OpenCode-compatible server; --hostname/--host, --port, --directory. Bare antechamber also starts the server.
antechamber setup Configure OpenChamber; --settings <file>, --profile <dir>, --binary <path>, --dry-run, --systemd [unit], --pi-binary <path>, --restart, --auto-update.
antechamber doctor Read-only Node, backend, agent/state directories, teardown, OpenChamber and auth checks; --json, --settings <file>, --profile <dir>. Exits 1 on any FAIL; warnings do not fail.
antechamber upgrade Install the latest release over a global npm or bun install, with the package manager that owns it. Refused for source checkouts and npx.
antechamber version Package version plus OpenCode API contract version. --version/-v deliberately print exactly opencode v2.0.20 for OpenChamber.
antechamber help Usage and options; also --help/-h.

Upgrade, uninstall and rollback

With setup --auto-update there is nothing to do: each start installs the latest release for the next one. Otherwise:

antechamber upgrade
# equivalent: npm update -g antechamber (or: bun add -g antechamber)

Restart OpenChamber, or systemctl --user restart openchamber.service for a managed service. Run antechamber doctor again. If the executable moved, rerun antechamber setup.

OpenChamber 2.3.2 shows an "OpenCode update" notice because antechamber reports OpenCode API 2.0.20, the minimum OpenChamber accepts. The notice names an OpenCode version, but its Update button runs <opencodeBinary> upgrade, which upgrades antechamber itself (a no-op when it is already current). Click Reload OpenCode afterwards to restart onto the new version. OpenChamber 1.x shows no notice; its POST /global/upgrade call upgrades antechamber the same way.

To roll back wiring, copy the backup printed by setup over the settings file:

cp /path/settings.json.bak-antechamber-YYYYMMDDHHMMSS /path/settings.json

If you used --systemd, restore the printed antechamber.conf backup, or remove only that generated drop-in if there was no previous file. Then run systemctl --user daemon-reload and restart OpenChamber/the service. Restore the old opencodeBinary before uninstalling:

npm uninstall -g antechamber
# or: bun remove -g antechamber

From source

git clone https://github.com/eliottness/antechamber.git
cd antechamber
npm ci
npm run build
node dist/cli.js doctor
node dist/cli.js setup --binary "$PWD/bin/opencode-antechamber"
# isolated alternative:
node dist/cli.js setup --profile ~/.config/antechamber-openchamber \
  --binary "$PWD/bin/opencode-antechamber"

The source launcher requires the built dist/cli.js. Pull updates, run npm ci && npm run build, and restart OpenChamber.

npm run build also builds the OmO Graph extension; setup prints its folder ($PWD/extensions/omo-dag) to add in Settings → Extensions → Add → Folder.

OpenChamber extension: OmO Graph

extensions/omo-dag is an OpenChamber extension that ships with antechamber and is built by npm run build. With the default OmO backend, it adds a rail panel showing the open session's orchestrator and every sub-agent OmO launched, grouped in waves:

  • each card shows the sub-agent's live state, duration, agent and model;
  • hovering a card highlights its input and output edges;
  • clicking a card opens that sub-agent's session.

It reads OmO's task store and antechamber's session registry read-only, through a small local service that OpenChamber starts.

Install it from OpenChamber's Settings → Extensions → Add, using whichever source fits where OpenChamber runs:

OpenChamber runs Add Value
on the machine where antechamber is installed Folder the path antechamber setup prints: $(npm root -g)/antechamber/extensions/omo-dag for npm installs, <checkout>/extensions/omo-dag after npm run build from source
anywhere (remote host, browser-only access) URL https://github.com/eliottness/antechamber/releases/latest/download/antechamber-omo-graph.zip (attached to every GitHub release)
anywhere, offline ZIP file that same antechamber-omo-graph.zip, downloaded, or built with npm run build && npm run pack:extension -- antechamber-omo-graph.zip

Then approve its two permissions (follow sessions, run the local service) and open it from the rail icon. Don't install it from the repository's Git URL: OpenChamber clones the repository root, which is antechamber itself, not the extension, and refuses it as an invalid manifest. Details: extensions/omo-dag/README.md.

Configuration

Connector settings use the ANTECHAMBER_ prefix; the deprecated OCPI_ prefix is still accepted as a fallback. RPC capability passthrough also reads OMO_RPC_CLIENT_CAPABILITIES and SENPI_RPC_CLIENT_CAPABILITIES directly. Full reference, defaults, and units: docs/configuration.md.

Variable Purpose
ANTECHAMBER_PI_BINARY agent executable to spawn (default omo; set to pi for plain pi)
ANTECHAMBER_PI_ARGS extra whitespace-split args passed to that binary
ANTECHAMBER_STATE_DIR session registry directory
ANTECHAMBER_AGENT agent name override advertised to OpenChamber
ANTECHAMBER_IDLE_TIMEOUT_MS idle session reap timeout
ANTECHAMBER_MAX_LIVE cap on concurrent live agent processes
ANTECHAMBER_DEBUG / ANTECHAMBER_DEBUG_LOG request/event debug logging
OMO_RPC_CLIENT_CAPABILITIES / SENPI_RPC_CLIENT_CAPABILITIES inherited RPC capabilities merged for the agent process

Security

antechamber is a local development tool: by default it binds to loopback with no authentication, and it can run arbitrary shell commands on behalf of the agent. Treat it the same way you'd treat a local dev server with shell access, not a service to expose on a network.

Hardening controls (full reference in docs/configuration.md):

  • Optional HTTP Basic auth, matching OpenCode's own contract: OPENCODE_SERVER_PASSWORD (plus OPENCODE_SERVER_USERNAME, default opencode).
  • Without a password, browser origins are limited to the adapter's own origin, HTTP(S) loopback origins (including a different loopback port), and origins listed in ANTECHAMBER_ALLOWED_ORIGINS; other origins get 403. With a password, other origins may make authenticated requests but receive no CORS headers unless explicitly allowed.
  • Binding to a non-loopback host requires a password, ANTECHAMBER_ALLOW_INSECURE=1, or the --insecure-no-auth flag.
  • Request bodies are capped by ANTECHAMBER_MAX_BODY_BYTES (default 10 MiB); SSE subscribers, file search and agent RPC frames have fixed bounds.

Platform notes

Linux is the primary supported platform. OmO's private task-host teardown (killing detached supervisor processes antechamber spawned) needs Linux pidfds (os.pidfd_open, Linux 5.3+) and python3 on PATH; Node has no pidfd API. On other platforms that teardown step is skipped with one warning instead of crashing; antechamber never falls back to signalling numeric PIDs. macOS is untested.

Limitations / non-goals

  • Not a reimplementation of OpenChamber's own platform features (scheduler, relay, goals). Those stay in OpenChamber.
  • Not a way to use pi/OmO as an LLM provider inside OpenCode. pi/OmO are full agents with their own loop; antechamber adapts at the session-protocol level, not the model level.
  • Some OpenCode routes have no pi/OmO equivalent and are stubbed or return 400/501 (OAuth-based provider auth, MCP connect/disconnect, session share). See docs/api-surface.md for the maintained route and unsupported-response inventory.

Development

npm run typecheck
npm test
npm run build

The smoke scripts (npm run smoke, npm run omo-smoke, npm run probe, npm run model-smoke, npm run v2-smoke) drive a real omo (or pi) process end to end and cost model tokens; they are not part of npm test and are not run in CI. See docs/development.md.

Every commit on main is released as a new patch version: CI runs the checks, bumps the package and extension versions, tags, publishes to npm with provenance and creates the GitHub release from the CHANGELOG. See RELEASE.md.

Docs

Credits

antechamber began as a fork of openchamber-pi-connector by qingzhu521 (xiuli.qz), released under the MIT license, and was substantially extended from there (OpenCode v2 API support, OmO support, session fork/revert, subagent and task cards, approvals, todos, thinking levels, shell runs, diffs, session persistence, lifecycle caps, and more).

Also relies on OpenChamber, OmO by code-yeongyu, and pi by badlogic / earendil.

License

MIT. See LICENSE, which retains the original openchamber-pi-connector copyright notice alongside the antechamber one.

About

Use the most mature agentic desktop app (OpenChamber) with the best-in-class harness (OmO senpi)

Topics

Resources

Code of conduct

Contributing

Security policy

Stars

1 star

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages