antechamber 1.0.23 → 1.0.25

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.
@@ -1,7 +1,11 @@
1
1
  # OmO Work: design
2
2
 
3
- OmO Work is an OpenChamber 2.x Work Status section for the background work of
4
- the open session. This document covers its parts, its data, its security
3
+ OmO Work is an OpenChamber 2.x Work Status section for the open session's work
4
+ that OpenChamber has no surface for: the todo list, the goal continuation timer
5
+ and other wake sources. Monitors, eval cells and background terminal sessions
6
+ are OpenChamber's own background commands, reported by antechamber as OpenCode
7
+ shells ([docs/architecture.md](../../../docs/architecture.md#omo-background-work-as-opencode-shells)),
8
+ so the section does not list them. This document covers its parts, its data, its security
5
9
  boundary and its limits. Where each field comes from in OmO is documented in
6
10
  [docs/architecture.md](../../../docs/architecture.md#omo-work-status-section).
7
11
 
@@ -10,7 +14,7 @@ boundary and its limits. Where each field comes from in OmO is documented in
10
14
  ```
11
15
  OpenChamber Work Status panel
12
16
  └─ section frame (status/index.html + status/main.js, sandboxed iframe)
13
- │ host.serviceRequest GET /status, GET /eval, POST /eval/stop, POST /goal/fire
17
+ │ host.serviceRequest GET /status, POST /goal/fire
14
18
  ▼
15
19
  OpenChamber host ── loopback + OPENCHAMBER_SERVICE_TOKEN ──▶ service/main.js (Node, on the host)
16
20
  │ reads <state dir>/run/<pid>.json
@@ -18,7 +22,7 @@ OpenChamber host ── loopback + OPENCHAMBER_SERVICE_TOKEN ──▶ service/m
18
22
  ▼
19
23
  antechamber /antechamber/work-status/<session>[...]
20
24
  │ snapshot from its bridges,
21
- ▼ eval_cells.* / goal RPC to OmO
25
+ ▼ goal RPC to OmO
22
26
  omo --mode rpc
23
27
  ```
24
28
 
@@ -42,7 +46,7 @@ OpenChamber host ── loopback + OPENCHAMBER_SERVICE_TOKEN ──▶ service/m
42
46
 
43
47
  | Field | Content |
44
48
  |---|---|
45
- | `live` | the session's agent process is running; peek, Stop and Fire now need it |
49
+ | `live` | the session's agent process is running; Fire now needs it |
46
50
  | `todo` | todo phases in OmO's order, each `{name, tasks: [{content, status}]}`, status `pending`, `in_progress`, `completed` or `cancelled` |
47
51
  | `monitors` | live watches (newest first), then the five most recently ended, each with its last 20 matched lines and, once ended, a readable reason |
48
52
  | `evalCells` | detached eval cells from `eval_cells.list`, or from the codemode wake source when the list is unavailable (`evalCellsListed: false`) |
@@ -50,27 +54,27 @@ OpenChamber host ── loopback + OPENCHAMBER_SERVICE_TOKEN ──▶ service/m
50
54
  | `goal` | the goal continuation timer (`armed`, `kind`, `dueAtMs`) and the wake-source counts it waits on, or `null` |
51
55
  | `wakeSources` | other active wake sources without a dedicated view |
52
56
 
53
- The frame checks the envelope (`src/model.ts`) and imports these types from the
54
- adapter, so a shape change on either side fails the typecheck.
57
+ The frame shows `todo`, `goal` and `wakeSources`. `monitors`, `evalCells` and
58
+ `background` stay in the snapshot, and the adapter keeps its
59
+ `/antechamber/work-status/<session>/eval/<cell>[/stop]` routes, for section
60
+ versions installed before these moved to OpenChamber's background commands
61
+ (ZIP installs never update). The frame checks the envelope (`src/model.ts`) and
62
+ imports these types from the adapter, so a shape change on either side fails
63
+ the typecheck.
55
64
 
56
65
  ## Refresh
57
66
 
58
67
  The frame polls `/status` one request at a time:
59
68
 
60
- - every 1.5 s while anything can change on its own (a live monitor, a running
61
- or queued cell, a background session, an armed timer, a task in progress);
69
+ - every 1.5 s while anything it shows can change on its own (an armed timer,
70
+ another wake source, a task in progress);
62
71
  - every 5 s otherwise, and while the page is hidden;
63
72
  - every 10 s after an error, keeping the last snapshot on screen with the
64
73
  error above it.
65
74
 
66
75
  A session switch bumps a generation counter, so a late answer for the previous
67
76
  session is dropped. Elapsed times and countdowns tick every second from the
68
- snapshot without refetching. An open eval cell's output is re-read on each
69
- poll while the cell runs, and once more when its state changes, so a finished
70
- cell shows its last lines.
71
-
72
- The adapter caches `eval_cells.list` for one second per session, so several
73
- open sections cost one RPC.
77
+ snapshot without refetching.
74
78
 
75
79
  ## Choosing the server
76
80
 
@@ -97,21 +101,13 @@ loopback.
97
101
  - **Frame**: the sandboxed iframe holds no token. It reaches the service only
98
102
  through the host, which adds its own per-service token. All text from OmO is
99
103
  inserted with `textContent`, never as HTML.
100
- - **Inputs**: session IDs must match `ses_[0-9A-Za-z]+` and cell IDs
101
- `[\w.:-]{1,128}`, in both the service and the adapter. Output peeks are
102
- capped at 64 KiB.
103
- - **Actions**: Stop and Fire now map to OmO's own RPC requests
104
- (`eval_cells.stop`, `goal_continuation_fire_now`). The extension kills no
105
- process itself.
104
+ - **Inputs**: session IDs must match `ses_[0-9A-Za-z]+`, in both the service
105
+ and the adapter.
106
+ - **Actions**: Fire now maps to OmO's own RPC request
107
+ (`goal_continuation_fire_now`). The extension kills no process itself.
106
108
 
107
109
  ## Limits
108
110
 
109
- - No Stop for monitors or background terminal sessions, and no continuation
110
- holds: OmO exposes neither over RPC.
111
- - Eval cells need OmO's codemode. Without it, or while the agent process is
112
- stopped, the section shows the cells OmO last reported, without output or
113
- Stop.
114
- - Background sessions come from OmO's terminal manifest, which OmO writes on
115
- start and exit; their command is shown but not their output.
111
+ - No continuation holds: OmO does not publish them over RPC.
116
112
  - The service must run on the machine that runs antechamber, since it reads
117
113
  the run records.
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "antechamber-omo-work",
3
- "version": "1.0.23",
3
+ "version": "1.0.25",
4
4
  "description": "OpenChamber 2.x Work Status section: OmO todo phases, monitors, eval cells and background work of the current session",
5
5
  "private": true,
6
6
  "type": "module",
@@ -52,7 +52,6 @@ function discoverServers(stateDirs, isAlive = alive) {
52
52
 
53
53
  // extensions/omo-work/src/service.ts
54
54
  var SESSION_ID = /^ses_[0-9A-Za-z]+$/;
55
- var CELL_ID = /^[\w.:-]{1,128}$/;
56
55
  var STATUS_TIMEOUT_MS = 5e3;
57
56
  var ACTION_TIMEOUT_MS = 15e3;
58
57
  async function call(server, method, path, timeoutMs) {
@@ -131,20 +130,11 @@ function createServer(options) {
131
130
  if (!SESSION_ID.test(session)) return fail(res, 400, "session query must be an OpenChamber session id");
132
131
  const custom = url.searchParams.get("stateDir")?.trim();
133
132
  const stateDirs = custom ? [resolve(expandHome(custom))] : defaultDirs();
134
- const cell = url.searchParams.get("cell") ?? "";
135
133
  const method = req.method ?? "GET";
136
134
  req.resume();
137
135
  if (url.pathname === "/status" && method === "GET") return void relayStatus(res, session, stateDirs);
138
136
  if (url.pathname === "/goal/fire" && method === "POST")
139
137
  return void relayAction(res, session, stateDirs, "POST", "goal/fire");
140
- if (url.pathname.startsWith("/eval")) {
141
- if (!CELL_ID.test(cell)) return fail(res, 400, "cell query must be an eval cell id");
142
- const tail = Number(url.searchParams.get("tailBytes") ?? 8192);
143
- if (url.pathname === "/eval" && method === "GET")
144
- return void relayAction(res, session, stateDirs, "GET", `eval/${encodeURIComponent(cell)}?tailBytes=${tail}`);
145
- if (url.pathname === "/eval/stop" && method === "POST")
146
- return void relayAction(res, session, stateDirs, "POST", `eval/${encodeURIComponent(cell)}/stop`);
147
- }
148
138
  return fail(res, 404, "not-found");
149
139
  });
150
140
  }