antechamber 1.0.41 → 2.0.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (52) hide show
  1. package/CHANGELOG.md +97 -0
  2. package/README.md +88 -141
  3. package/bin/opencode-antechamber +14 -4
  4. package/dist/cli.d.ts +1 -1
  5. package/dist/cli.js +1 -1
  6. package/dist/commands/context.d.ts +5 -2
  7. package/dist/commands/context.js +8 -4
  8. package/dist/commands/doctor.js +4 -3
  9. package/dist/commands/setup.js +9 -28
  10. package/dist/config.d.ts +6 -2
  11. package/dist/config.js +18 -4
  12. package/dist/latency.d.ts +10 -0
  13. package/dist/latency.js +115 -0
  14. package/dist/misc-routes.js +2 -10
  15. package/dist/route-services.d.ts +0 -2
  16. package/dist/routes-v1.d.ts +1 -1
  17. package/dist/routes-v1.js +29 -418
  18. package/dist/routes-v2.js +1 -1
  19. package/dist/self-update.d.ts +2 -1
  20. package/dist/self-update.js +5 -1
  21. package/dist/server.d.ts +1 -3
  22. package/dist/server.js +9 -12
  23. package/dist/session-store.d.ts +12 -10
  24. package/dist/session-store.js +238 -128
  25. package/dist/session-tree.js +2 -2
  26. package/dist/sse.d.ts +0 -2
  27. package/dist/sse.js +13 -46
  28. package/dist/tool-map.js +1 -3
  29. package/dist/work-status.js +1 -1
  30. package/extensions/antechamber/README.md +100 -0
  31. package/extensions/antechamber/bin/opencode-antechamber +42 -0
  32. package/extensions/{omo-dag/docs/DESIGN.md → antechamber/docs/GRAPH.md} +5 -5
  33. package/extensions/{omo-work/docs/DESIGN.md → antechamber/docs/WORK.md} +3 -3
  34. package/extensions/antechamber/package.json +60 -0
  35. package/extensions/{omo-dag → antechamber}/panel/index.html +8 -1
  36. package/extensions/antechamber/panel/main.js +261 -0
  37. package/extensions/antechamber/runtime/launcher.js +201 -0
  38. package/extensions/antechamber/service/main.js +884 -0
  39. package/package.json +75 -26
  40. package/extensions/omo-compat/README.md +0 -48
  41. package/extensions/omo-compat/icon.svg +0 -1
  42. package/extensions/omo-compat/package.json +0 -43
  43. package/extensions/omo-dag/README.md +0 -167
  44. package/extensions/omo-dag/package.json +0 -33
  45. package/extensions/omo-dag/panel/main.js +0 -176
  46. package/extensions/omo-dag/service/main.js +0 -457
  47. package/extensions/omo-work/README.md +0 -88
  48. package/extensions/omo-work/package.json +0 -30
  49. package/extensions/omo-work/service/main.js +0 -149
  50. /package/extensions/{omo-dag → antechamber}/icon.svg +0 -0
  51. /package/extensions/{omo-work → antechamber}/status/index.html +0 -0
  52. /package/extensions/{omo-work → antechamber}/status/main.js +0 -0
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "antechamber",
3
- "version": "1.0.41",
3
+ "version": "2.0.1",
4
4
  "description": "OpenCode-compatible HTTP/SSE server that lets OpenChamber drive the pi coding agent (and OmO) over RPC",
5
5
  "type": "module",
6
6
  "license": "MIT",
@@ -28,22 +28,18 @@
28
28
  "dist",
29
29
  "bin/opencode-antechamber",
30
30
  "bin/opencode-pi",
31
- "extensions/omo-dag/package.json",
32
- "extensions/omo-dag/icon.svg",
33
- "extensions/omo-dag/panel/index.html",
34
- "extensions/omo-dag/panel/main.js",
35
- "extensions/omo-dag/service/main.js",
36
- "extensions/omo-dag/README.md",
37
- "extensions/omo-dag/docs/DESIGN.md",
38
- "extensions/omo-work/package.json",
39
- "extensions/omo-work/status/index.html",
40
- "extensions/omo-work/status/main.js",
41
- "extensions/omo-work/service/main.js",
42
- "extensions/omo-work/README.md",
43
- "extensions/omo-work/docs/DESIGN.md",
44
- "extensions/omo-compat/package.json",
45
- "extensions/omo-compat/icon.svg",
46
- "extensions/omo-compat/README.md",
31
+ "extensions/antechamber/package.json",
32
+ "extensions/antechamber/icon.svg",
33
+ "extensions/antechamber/bin/opencode-antechamber",
34
+ "extensions/antechamber/panel/index.html",
35
+ "extensions/antechamber/panel/main.js",
36
+ "extensions/antechamber/status/index.html",
37
+ "extensions/antechamber/status/main.js",
38
+ "extensions/antechamber/service/main.js",
39
+ "extensions/antechamber/runtime/launcher.js",
40
+ "extensions/antechamber/README.md",
41
+ "extensions/antechamber/docs/GRAPH.md",
42
+ "extensions/antechamber/docs/WORK.md",
47
43
  "README.md",
48
44
  "LICENSE",
49
45
  "CHANGELOG.md"
@@ -53,17 +49,16 @@
53
49
  },
54
50
  "scripts": {
55
51
  "build": "tsc -p tsconfig.json && node --input-type=module -e \"import { chmodSync } from 'node:fs'; chmodSync('dist/cli.js', 0o755)\" && npm run build:extension",
56
- "build:extension": "tsx extensions/omo-dag/scripts/build.ts && tsx extensions/omo-work/scripts/build.ts",
57
- "pack:extension": "tsx extensions/omo-dag/scripts/pack.ts",
58
- "pack:work-extension": "tsx extensions/omo-work/scripts/pack.ts",
52
+ "build:extension": "tsx extensions/antechamber/scripts/build.ts",
53
+ "pack:extension": "tsx extensions/antechamber/scripts/pack.ts",
59
54
  "prepack": "npm run build",
60
- "dev": "tsx src/cli.ts",
61
- "typecheck": "tsc -p tsconfig.check.json && tsc -p extensions/omo-dag/tsconfig.json && tsc -p extensions/omo-work/tsconfig.json",
55
+ "dev": "bun src/cli.ts",
56
+ "typecheck": "tsc -p tsconfig.check.json && tsc -p extensions/antechamber/tsconfig.json",
62
57
  "lint": "biome lint . --error-on-warnings",
63
58
  "format": "biome format --write .",
64
59
  "format:check": "biome format .",
65
60
  "check": "npm run typecheck && npm run lint && npm run format:check && npm test",
66
- "test": "tsx --test --import ./test/setup.ts test/*.test.ts extensions/*/test/*.test.ts",
61
+ "test": "tsx --test --import ./test/setup.ts test/*.test.ts extensions/*/test/*.test.ts extensions/*/test/*/*.test.ts",
67
62
  "probe": "tsx contrib/probe.ts",
68
63
  "smoke": "tsx contrib/smoke.ts",
69
64
  "omo-smoke": "tsx contrib/omo/omo-smoke.ts",
@@ -75,7 +70,7 @@
75
70
  "esbuild@0.28.2": true
76
71
  },
77
72
  "engines": {
78
- "node": ">=22"
73
+ "bun": ">=1.4.0"
79
74
  },
80
75
  "publishConfig": {
81
76
  "access": "public",
@@ -83,12 +78,66 @@
83
78
  },
84
79
  "devDependencies": {
85
80
  "@biomejs/biome": "^2.5.15",
86
- "@openchamber/sdk": "1.24.2",
87
- "@openchamber/sdk-v2": "npm:@openchamber/sdk@2.5.0",
81
+ "@openchamber/sdk": "2.5.0",
88
82
  "@opencode-ai/sdk": "^1.18.31",
89
83
  "@types/node": "^22.0.0",
90
84
  "esbuild": "^0.28.2",
91
85
  "tsx": "^4.23.14",
92
86
  "typescript": "^7.0.2"
87
+ },
88
+ "dependencies": {
89
+ "omo-ai": "5.1.69"
90
+ },
91
+ "openchamber": {
92
+ "apiVersion": 1,
93
+ "engines": {
94
+ "openchamber": ">=2.3.2"
95
+ },
96
+ "contributes": {
97
+ "panel": {
98
+ "id": "antechamber",
99
+ "name": "OmO",
100
+ "icon": "extensions/antechamber/icon.svg",
101
+ "entry": "extensions/antechamber/panel/index.html"
102
+ },
103
+ "page": {
104
+ "entry": "extensions/antechamber/panel/index.html",
105
+ "title": "OmO Graph"
106
+ },
107
+ "statusSection": {
108
+ "entry": "extensions/antechamber/status/index.html",
109
+ "title": "OmO Work",
110
+ "height": 120
111
+ },
112
+ "capabilities": [
113
+ "sessions"
114
+ ],
115
+ "service": {
116
+ "entry": "extensions/antechamber/service/main.js",
117
+ "runtime": "host",
118
+ "permissions": {
119
+ "exec": [
120
+ "bun"
121
+ ]
122
+ }
123
+ },
124
+ "tools": [
125
+ {
126
+ "match": "shell",
127
+ "title": "{metadata.evalTitle}",
128
+ "subtitle": "{metadata.evalSubtitle}"
129
+ },
130
+ {
131
+ "match": "task",
132
+ "title": "{metadata.agentTitle}",
133
+ "subtitle": "{metadata.agentSubtitle}"
134
+ },
135
+ {
136
+ "match": "agent",
137
+ "title": "{metadata.agentTitle}",
138
+ "subtitle": "{metadata.agentSubtitle}"
139
+ }
140
+ ]
141
+ }
93
142
  }
94
143
  }
@@ -1,48 +0,0 @@
1
- # OmO Compatibility
2
-
3
- An OpenChamber extension that ships with antechamber. It changes how OpenChamber
4
- displays some OmO tool calls, using only the display rules OpenChamber lets an
5
- extension declare. It has no panel, page, service or permissions.
6
-
7
- What it does today:
8
-
9
- - **Subagent card headers.** A subagent an eval cell started with `agent()` is shown as a `task` card. Its header
10
- reads the agent type and a short description (the call's label, the task's summary, or the prompt's first line)
11
- instead of the generic "Agent Task".
12
-
13
- - **Eval cell headers.** OpenChamber 1.24 streams live output only for shell
14
- cards, so antechamber shows OmO eval cells as shell cards (`bash` in OpenChamber
15
- 1.x, `shell` in 2.x). With this extension their header reads `JS Eval` (or
16
- `Python Eval`) and the cell's summary instead of "Shell Command" and the first
17
- line of code. Other shell cards keep their normal header.
18
-
19
- ## Requirements
20
-
21
- - OpenChamber **1.24 or newer** (the first release with `contributes.tools`).
22
- - antechamber as OpenChamber's backend. Without it the rules match nothing and
23
- change nothing.
24
-
25
- ## Install
26
-
27
- In OpenChamber, open **Settings → Extensions → Add**:
28
-
29
- - **Folder**, when OpenChamber runs on the machine where antechamber is
30
- installed. `antechamber setup` prints the path:
31
- `$(npm root -g)/antechamber/extensions/omo-compat` for an npm install, or
32
- `<checkout>/extensions/omo-compat` from a source checkout. It needs no build.
33
- - **URL**, from anywhere:
34
- `https://github.com/eliottness/antechamber#extension/omo-compat`, a Git
35
- install that OpenChamber offers to update after each release. Every GitHub
36
- release also attaches
37
- `https://github.com/eliottness/antechamber/releases/latest/download/antechamber-omo-compat.zip`,
38
- which installs by URL too, but OpenChamber never updates ZIP installs.
39
-
40
- There is nothing to approve and no rail icon. Reload open chats after
41
- installing so their cards pick up the new header.
42
-
43
- For a server you reach over HTTP:
44
-
45
- ```bash
46
- curl -sX POST "$OC/api/guests" -H 'content-type: application/json' \
47
- -d '{"path":"/abs/path/to/extensions/omo-compat"}'
48
- ```
@@ -1 +0,0 @@
1
- <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><title>OmO Compatibility</title><path d="M8 7 3 12l5 5"/><path d="m16 7 5 5-5 5"/><path d="M14 4l-4 16"/></svg>
@@ -1,43 +0,0 @@
1
- {
2
- "name": "antechamber-omo-compat",
3
- "version": "1.0.41",
4
- "description": "OpenChamber extension: displays OmO tool calls the way OmO means them when OpenChamber runs on antechamber",
5
- "private": true,
6
- "type": "module",
7
- "license": "MIT",
8
- "openchamber": {
9
- "apiVersion": 1,
10
- "engines": {
11
- "openchamber": ">=1.24.0"
12
- },
13
- "contributes": {
14
- "panel": {
15
- "id": "omo-compat",
16
- "name": "OmO Compatibility",
17
- "icon": "icon.svg"
18
- },
19
- "tools": [
20
- {
21
- "match": "bash",
22
- "title": "{metadata.evalTitle}",
23
- "subtitle": "{metadata.evalSubtitle}"
24
- },
25
- {
26
- "match": "shell",
27
- "title": "{metadata.evalTitle}",
28
- "subtitle": "{metadata.evalSubtitle}"
29
- },
30
- {
31
- "match": "task",
32
- "title": "{metadata.agentTitle}",
33
- "subtitle": "{metadata.agentSubtitle}"
34
- },
35
- {
36
- "match": "agent",
37
- "title": "{metadata.agentTitle}",
38
- "subtitle": "{metadata.agentSubtitle}"
39
- }
40
- ]
41
- }
42
- }
43
- }
@@ -1,167 +0,0 @@
1
- # OmO Graph: OpenChamber extension
2
-
3
- A live, interactive graph of the OmO sub-agents behind the OpenChamber session
4
- you are looking at. It ships with [antechamber](../../README.md) and runs in
5
- OpenChamber's extension sandbox, next to the antechamber server that runs your
6
- sessions on OmO.
7
-
8
- - **One graph per run.** Open any session and the panel shows its
9
- orchestrator plus every task OmO launched for it. Tasks are arranged in
10
- waves (columns), the way [omo.dev](https://omo.dev) draws a `mass ulw`
11
- workflow. Opening a sub-agent's own session shows the same run, with that
12
- sub-agent outlined.
13
- - **Live state on every card.** Each card shows a status dot, a status line
14
- such as `running · 2m 03s`, `completed · 41s` or `failed`, the agent or
15
- category, the model, and the first line of the result. Running cards glow,
16
- and their incoming edges carry a moving pulse. The rail icon shows a badge
17
- with the number of running agents.
18
- - **Hover to trace** (Archify-style focus). Hovering or keyboard-focusing a
19
- card highlights its **input edges** (amber) and **output edges** (accent).
20
- Its transitive upstream and downstream reach stays half-lit, and everything
21
- else dims. The inspector strip shows tokens, cost, tool calls, input and
22
- output counts, and the result or error.
23
- - **Click to open.** Clicking a card opens that sub-agent's session, or the
24
- orchestrator's, in the chat.
25
- - **Pan and zoom.** Drag the background, and scroll or pinch to zoom. `0`
26
- fits the graph; the target button centres on the current or first running
27
- agent.
28
- - Very large runs are sent within a bounded response size. When tasks are
29
- omitted to fit that limit, the panel shows the omitted-node count.
30
-
31
- The panel docks in the right rail. The same page is also available full
32
- screen from the sidebar's Extension pages menu.
33
-
34
- On OpenChamber 2.x, the bundled [OmO Work](../omo-work/README.md) section
35
- complements the graph with the session's todo phases, monitors, eval cells and
36
- other background work.
37
-
38
- ## Requirements
39
-
40
- - OpenChamber **1.22 or newer**, on web or desktop. It is verified against
41
- 1.24.2 and uses only the v1 extension API that 2.x hosts also accept. VS
42
- Code and mobile do not load extensions.
43
- - antechamber running its default OmO backend, so that sub-agent sessions
44
- exist in OpenChamber. A plain pi backend (`ANTECHAMBER_PI_BINARY=pi`) has no
45
- sub-agents to draw.
46
- - The OmO task store on the same machine as the OpenChamber server
47
- (`~/.omo/agent` by default).
48
-
49
- The built files run on OpenChamber's own runtime and need nothing else
50
- installed.
51
-
52
- ## Install
53
-
54
- In OpenChamber, open **Settings → Extensions → Add** and pick the source that
55
- fits where OpenChamber runs:
56
-
57
- - **Folder**, when OpenChamber runs on the machine where antechamber is
58
- installed. `antechamber setup` prints the path to paste:
59
- - npm install: `$(npm root -g)/antechamber/extensions/omo-dag`. The
60
- published package ships the built extension, and `npm update -g` updates
61
- the folder in place.
62
- - source checkout: `<checkout>/extensions/omo-dag`, after `npm run build`
63
- (which also writes `panel/main.js` and `service/main.js`).
64
- - **URL**, from anywhere, including a remote OpenChamber you only reach in a
65
- browser: `https://github.com/eliottness/antechamber#extension/omo-graph`.
66
- Every release commits the built extension to the `extension/omo-graph`
67
- branch, so OpenChamber offers it under **Update** in Settings → Extensions.
68
- To pin a version instead, install its release archive by URL,
69
- `https://github.com/eliottness/antechamber/releases/download/vX.Y.Z/antechamber-omo-graph.zip`;
70
- OpenChamber never updates ZIP installs.
71
- - **ZIP file**, for offline hosts: that archive, downloaded, or built with
72
- `npm run build && npm run pack:extension -- antechamber-omo-graph.zip`.
73
-
74
- Keep the `#extension/omo-graph` part of the URL. Without it OpenChamber clones
75
- the repository root, which is antechamber itself, and rejects it as
76
- `invalid-manifest`, which its toast words as "panel.id must be kebab-case".
77
-
78
- Approve the request. The extension asks for two things:
79
-
80
- - **sessions**, to follow the open session and open sub-agent sessions;
81
- - **a local service**, to read the OmO task store.
82
-
83
- Then open it from the rail icon.
84
-
85
- For a server you reach over HTTP:
86
-
87
- ```bash
88
- curl -sX POST "$OC/api/guests" -H 'content-type: application/json' \
89
- -d '{"path":"/abs/path/to/extensions/omo-dag"}'
90
- curl -sX PUT "$OC/api/guests/omo-dag/capabilities" -H 'content-type: application/json' \
91
- -d '{"granted":["sessions","service"]}'
92
- ```
93
-
94
- Add your UI auth if the instance has a password. A folder install serves the
95
- files in place: after `npm run build`, reopen the panel. To restart a running
96
- service, toggle the extension off and on.
97
-
98
- ## Deploying alongside antechamber
99
-
100
- 1. Build antechamber in the deployment checkout (`npm ci && npm run build`).
101
- That one build covers both the server and the extension.
102
- 2. Install `<checkout>/extensions/omo-dag` once in the OpenChamber instance
103
- and approve it.
104
- 3. If deployments move between checkouts, install a stable symlink once (for
105
- example `~/.local/share/antechamber/omo-dag -> <checkout>/extensions/omo-dag`)
106
- so an upgrade only re-points the link.
107
-
108
- When antechamber uses the default locations, the service needs no
109
- configuration (see [Data paths](#data-paths)). To roll back, pause or remove
110
- the extension. It never writes to the OmO store, the antechamber registry, or
111
- the server.
112
-
113
- ## Data paths
114
-
115
- By default the service reads:
116
-
117
- | What | Default |
118
- |---|---|
119
- | OmO agent directory | `~/.omo/agent`, then `~/.pi/agent` (both are scanned for tasks) |
120
- | antechamber state directory | `~/.config/antechamber`, then `~/.config/openchamber-pi-connector` (entries in the first win) |
121
-
122
- OpenChamber starts extension services with a minimal environment, so the
123
- service does not see `ANTECHAMBER_STATE_DIR` or the agent-directory variables
124
- (`OMO_CODING_AGENT_DIR`, `SENPI_CODING_AGENT_DIR`, `PI_CODING_AGENT_DIR`). If
125
- your deployment sets any of them, enter the same locations in the panel's
126
- **Data paths** popover (the sliders icon). They are saved in the extension's
127
- OpenChamber storage.
128
-
129
- ## How it works
130
-
131
- See [docs/DESIGN.md](docs/DESIGN.md) for the data model, the layout, and the
132
- security boundary. In short:
133
-
134
- ```
135
- panel (sandboxed iframe) ──serviceRequest GET /graph?session=ses_…──▶ OpenChamber host
136
- ▲ openSession / setBadge / onSession │ loopback + bearer
137
- │ ▼
138
- └──────────────── JSON graph ◀──────────── service/main.js (Node, read-only)
139
- reads ~/.omo/agent/projects/*/senpi-task/tasks/*.json
140
- and antechamber's sessions.json
141
- ```
142
-
143
- ## Development
144
-
145
- The extension is part of the antechamber repository's toolchain. All
146
- commands run from the repository root:
147
-
148
- | Command | What it covers for the extension |
149
- |---|---|
150
- | `npm run build:extension` | bundles `src/panel.ts` into `panel/main.js` (browser IIFE) and `src/service-main.ts` into `service/main.js` (Node ESM) with esbuild |
151
- | `npm test` | runs `extensions/*/test/*.test.ts` alongside the server tests |
152
- | `npm run typecheck` | checks `extensions/omo-dag/tsconfig.json` (DOM + Node) after the server |
153
- | `npm run lint` / `npm run format:check` | Biome, same rules as the rest of the repository |
154
-
155
- The sources are:
156
-
157
- - `src/graph.ts`: task records to graph, plus input validation;
158
- - `src/layout.ts`: columns, rows and edge routing;
159
- - `src/store.ts`: cached disk reads;
160
- - `src/service.ts`: HTTP;
161
- - `src/poller.ts`: the refresh loop, which runs one request at a time and
162
- drops stale answers after a session or path change;
163
- - `src/panel.ts` and `panel/index.html`: the UI.
164
-
165
- `test/connector-parity.test.ts` imports antechamber's own `ocIdFor` and
166
- `SessionRegistryEntry`, so a change to session ids or registry fields on the
167
- server side fails the test suite rather than breaking the graph silently.
@@ -1,33 +0,0 @@
1
- {
2
- "name": "antechamber-omo-graph",
3
- "version": "1.0.41",
4
- "description": "OpenChamber extension: live, interactive graph of the OmO sub-agents behind the current session",
5
- "private": true,
6
- "type": "module",
7
- "license": "MIT",
8
- "openchamber": {
9
- "apiVersion": 1,
10
- "engines": {
11
- "openchamber": ">=1.22.0"
12
- },
13
- "contributes": {
14
- "panel": {
15
- "id": "omo-dag",
16
- "name": "OmO Graph",
17
- "icon": "icon.svg",
18
- "entry": "panel/index.html"
19
- },
20
- "page": {
21
- "entry": "panel/index.html",
22
- "title": "OmO Graph"
23
- },
24
- "capabilities": [
25
- "sessions"
26
- ],
27
- "service": {
28
- "entry": "service/main.js",
29
- "runtime": "host"
30
- }
31
- }
32
- }
33
- }