@mrciphersmith/roomyx 0.12.1 → 0.12.3

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 (44) hide show
  1. package/CHANGELOG.md +129 -0
  2. package/README.md +140 -12
  3. package/package.json +11 -10
  4. package/src/bin/launch.mjs +1 -1
  5. package/src/bundled-personas/groups.md +3 -3
  6. package/src/bundled-skills/startup-room/reference/roomyx.md +5 -0
  7. package/src/cli/client.ts +12 -0
  8. package/src/cli/experiment.ts +67 -0
  9. package/src/cli/init.ts +149 -0
  10. package/src/cli/mcp.ts +54 -0
  11. package/src/cli/personas.ts +40 -0
  12. package/src/cli/room-append.ts +357 -0
  13. package/src/cli/room.ts +91 -0
  14. package/src/cli/rooms.ts +65 -0
  15. package/src/cli/serve.ts +84 -0
  16. package/src/cli/shared.ts +71 -0
  17. package/src/cli/skills.ts +58 -0
  18. package/src/cli/specs.ts +1 -0
  19. package/src/cli.ts +29 -884
  20. package/src/client/index.ts +16 -3
  21. package/src/client/mcp-client.ts +106 -7
  22. package/src/client/shutdown.ts +29 -6
  23. package/src/experiment/manifest.ts +151 -0
  24. package/src/installer/init-apply.ts +38 -7
  25. package/src/installer/init.ts +5 -2
  26. package/src/installer/registry.ts +38 -6
  27. package/src/installer/resolve-connection.ts +54 -8
  28. package/src/installer/room-tool.ts +6 -3
  29. package/src/installer/skill-sync.ts +86 -3
  30. package/src/installer/skill-targets.ts +7 -3
  31. package/src/lockfile.ts +13 -2
  32. package/src/log/schema.ts +108 -38
  33. package/src/log/store.ts +1 -0
  34. package/src/log/types.ts +8 -1
  35. package/src/log/write.ts +115 -6
  36. package/src/mcp-management/server.ts +30 -4
  37. package/src/room-token.ts +129 -0
  38. package/src/server/http-transport.ts +43 -0
  39. package/src/server/index.ts +76 -3
  40. package/src/server/log-watcher.ts +80 -0
  41. package/src/server/owner-queue.ts +7 -1
  42. package/src/server/serve.ts +112 -30
  43. package/src/server/shutdown.ts +33 -7
  44. package/src/writer-lease.ts +161 -14
package/CHANGELOG.md CHANGED
@@ -13,6 +13,135 @@ patch and never a minor. The rule, the reason, and an audit of the four of seven
13
13
  releases that followed it are in
14
14
  [`docs/roomyx/versioning.md`](docs/roomyx/versioning.md) and decision D-13.
15
15
 
16
+ ## [Unreleased]
17
+
18
+ ## [0.12.3] — 2026-11-30
19
+
20
+ ### Security
21
+
22
+ - **The room registry, which holds each room's token, is now written 0600.** It was
23
+ written with `writeFileSync`'s default (`0666 & ~umask`), so on a shared host
24
+ any local user could read the token and drive the room. The directory is 0700
25
+ when roomyx creates it, whether through `roomyx init` or by registering a room. A registry written by an older version stays loose until
26
+ its next write replaces it; `chmod 600` it by hand to close the window sooner.
27
+
28
+ ### Added
29
+
30
+ - **A room tells its clients when the log grows, instead of each client asking every second.**
31
+ The room server now advertises `resources.subscribe` and sends
32
+ `notifications/resources/updated` for a new resource, `room://log`, when the log
33
+ gets longer — however it got longer, including a message appended by another
34
+ process. `roomyx-client` subscribes and fetches the moment it is told; its polls
35
+ become a 15-second backstop. One file check per room replaces one
36
+ `room.get_transcript` per client per second. Against a room that cannot
37
+ subscribe (an older roomyx, or a refused subscription) the client polls exactly
38
+ as before. Decision D-23.
39
+
40
+ - **`roomyx experiment plan` / `roomyx experiment new`: an experiment manifest and a grid of rooms.**
41
+ A `.yaml` (or `.json`) manifest names the goal, roster, model, seed and
42
+ variables; every list-valued variable is a grid axis, `repeats` multiplies it,
43
+ and `{{name}}` in the goal takes the cell's value. `plan` prints the rooms
44
+ without writing; `new --out <dir>` creates one log per cell, each header
45
+ recording its variables, seed and the manifest's digest (`experiment`, an
46
+ optional header field, so older logs and readers are unaffected). roomyx still
47
+ does not run agents: a dispatcher runs each room. YAML needs Bun 1.2.21 or
48
+ newer (the floor in `engines` is unchanged; use `.json` below it). Decision D-22.
49
+
50
+ - **`roomyx room append --read-through <seq>`: refuse a message written without seeing the others.**
51
+ Parallel agents each answer the round they were shown while a sibling's message
52
+ lands, and integration fails. The dispatcher says how far the author had read;
53
+ if another participant wrote past that, the append is refused, names what was
54
+ missed, and writes nothing (`--allow-unread` writes anyway; the position is kept
55
+ in the message as `read_through`). Optional everywhere, so a dispatcher that
56
+ cannot say what it showed is unaffected. Decision D-21.
57
+
58
+ ### Fixed
59
+
60
+ - **`bun run soak` finishes again.** It built its client without the room token the
61
+ server has required since 0.12, so the client never connected, no state poll
62
+ ever counted, and the harness waited for ever (it was never wired into CI for
63
+ that reason). It now sends the token, and fails after 30 seconds without a poll
64
+ (`--stall-seconds`) instead of hanging. The nightly stress run now includes it.
65
+
66
+ ### Changed
67
+
68
+ - **CI and the stress workflow declare `permissions: contents: read`.** They ran PR code
69
+ with whatever the repository's default token scope was; the release workflow already
70
+ asked only for what it needs.
71
+ - **CI and the release workflow pin Bun instead of tracking `latest`.** `.bun-version`
72
+ names the Bun the project is developed with; CI also runs the lowest supported
73
+ Bun, so a Bun release can no longer break a tagged release with no code change.
74
+ - **`engines.bun` is now `>=1.2.15`, not `>=1.1.0`.** The old floor was never tested;
75
+ 1.2.0 and below fail the launcher tests. The range is advisory (npm does not enforce
76
+ it for Bun), and the launcher's missing-Bun message states the same floor.
77
+
78
+ - **CI now runs the log fuzzer and replays every archived room log on each PR,**
79
+ and the fuzzer again nightly on a fresh seed. They existed in `scripts/` but ran
80
+ nowhere.
81
+
82
+ - **Dependencies moved to the newest versions their ranges allow:** the MCP SDK
83
+ (1.30.0 to 1.32.2), zod (4.6.7), `@opentui/core` (0.5.17), eslint and
84
+ typescript-eslint. `@opentui/core` 0.9 and TypeScript 7 are major jumps and are
85
+ deliberately left out.
86
+
87
+ - **A test now pins the unauthenticated management endpoint to its two reporting
88
+ tools,** and checks that `roomyx.skills.sync` over it leaves every target exactly
89
+ as it was. The endpoint takes no credential, which holds only while nothing on it
90
+ acts; a new tool, or a `yes` flag, now fails a test instead of passing silently.
91
+
92
+ - **`bun run check` and CI fail when `CHANGELOG.md` has no entry for the version in
93
+ `package.json`,** so a version bump cannot ship without its notes.
94
+
95
+ - **`src/cli.ts` is split into one module per command under `src/cli/`.** An internal
96
+ refactor with no behaviour change: `src/cli.ts` keeps the dispatcher, the version
97
+ and the help, and every command's flags, output and exit codes are as before.
98
+
99
+ - **The project wiki now records why the writer lease, `seq` allocation and the
100
+ per-room token work the way they do,** and its `src/cli` page reflects the split.
101
+ Internal documentation under `.metaproject/wiki/`; nothing shipped changes.
102
+
103
+ - **`roomyx init` now says that room logs are committed with the repository,** when it
104
+ creates the logs directory, and how to keep them out. It still ignores only the
105
+ registry and lockfiles; the transcript is deliberately kept.
106
+
107
+ ## [0.12.2] — 2026-09-12
108
+
109
+ A documentation patch, and the defect it fixes was on the first screen anyone
110
+ reads.
111
+
112
+ ### Fixed
113
+
114
+ - **The README said `append` refuses when a live room is serving the log. It does
115
+ not.** A reviewer in this project's own room found it by running it, which is
116
+ the only way it could have been found — the claim had been there since the
117
+ writer rule was first written down, and nothing tested prose.
118
+
119
+ What is true is narrower: `append` refuses when it can *see* another writer —
120
+ a held writer lease, or a room reporting an attached dispatcher. An embedder
121
+ that dispatches in-process is visible that way. An agent dispatcher runs
122
+ `roomyx serve` and appends from a separate process each time, so it holds no
123
+ lease and the room reports nothing; there, `append` prints a note naming the
124
+ serving room and writes. The log is safe either way — `seq` allocation is
125
+ locked, and three writers racing it are tested. What the discipline protects
126
+ is the conversation, not the file.
127
+
128
+ - **The flag table advertised `--force` on `room append`.** That flag was removed
129
+ when `--take-over` replaced it, and the table never caught up — so the README
130
+ documented a flag the binary would reject.
131
+
132
+ - **Three commands were missing from the README entirely** — `room delta`,
133
+ `room commands` and `room ack`, the ones a dispatcher uses to read its own
134
+ room. Found by auditing every command in `cli.ts` against the README rather
135
+ than by re-reading it; all fourteen are now documented.
136
+
137
+ ### Changed
138
+
139
+ - The personas section says the library is in English and why each name carries
140
+ both spellings.
141
+ - Decision D-19 is annotated rather than rewritten. It recorded a Russian
142
+ library as part of the cost of shipping the corpus; that cost has since been
143
+ paid, which belongs under the decision and not in place of it.
144
+
16
145
  ## [0.12.1] — 2026-09-12
17
146
 
18
147
  A patch: the library reads in English now. No code changed.
package/README.md CHANGED
@@ -15,8 +15,40 @@ on.
15
15
 
16
16
  `roomyx room new` and `roomyx room append` do write, and that is not an
17
17
  exception to the rule: creating a log nobody serves takes the writer count from
18
- zero to one, and `append` refuses outright when the registry shows a live room
19
- serving that path. See D-01a.
18
+ zero to one.
19
+
20
+ **What roomyx enforces is narrower than the rule, and it is worth being exact
21
+ about which.** `append` refuses when it can *see* another writer — a held writer
22
+ lease, or a room reporting an attached dispatcher. An embedder that dispatches
23
+ in-process is visible that way. An agent dispatcher is not: it runs `roomyx
24
+ serve` and writes with `roomyx room append`, a fresh process each time, so it
25
+ holds no lease and the room reports no dispatcher. In that arrangement `append`
26
+ notes on stderr that a live room is serving the log, and proceeds.
27
+
28
+ So the single-writer rule is a discipline the dispatcher keeps, and roomyx
29
+ enforces it only where it has evidence. The log itself is safe either way —
30
+ `seq` allocation is under a lock, and three writers racing it are tested. What
31
+ is at risk without the discipline is the conversation: two dispatchers produce a
32
+ transcript where every message is intact and the discussion is nonsense. See
33
+ D-01a, and `docs/roomyx/skill-review-2026-09-11.md` for why closing the gap
34
+ needs a dispatcher identity that survives across processes.
35
+
36
+ ## What is in this repository
37
+
38
+ | | |
39
+ | --- | --- |
40
+ | `src/` | The package. `src/*.ts` is the shipped artefact — there is no build step. |
41
+ | `src/bundled-skills/` | The `startup-room` skill, as installed by `roomyx skills sync`. |
42
+ | `src/bundled-personas/` | The persona library and the 50-question interview script. |
43
+ | `test/` | 58 files. `bun test` runs them; `bun run test:e2e` adds the ones that start a real server. |
44
+ | `scripts/` | Three harnesses that are not unit tests: `soak`, `fuzz`, `replay`. See **Testing** below. |
45
+ | `docs/roomyx/decisions.md` | Every design decision, numbered, with the alternative that was rejected. |
46
+ | `docs/roomyx/ACTIONS.md` | What is outstanding, with evidence per item. |
47
+ | `docs/roomyx/rooms/` | Archived rooms — transcripts, logs and rendered frames. |
48
+ | `docs/roomyx/planning/` | The PRD, architecture and roadmap this was built from. |
49
+
50
+ `AGENTS.md` and `CLAUDE.md` are at the root because that is where coding agents
51
+ look for them; they are instructions for tooling, not documentation for readers.
20
52
 
21
53
  ## Requirements
22
54
 
@@ -163,12 +195,64 @@ Creates a room log, and appends messages to one.
163
195
  | `--roster id:Name,...` | Participants. `id` is what `room.get_agent_detail` takes. |
164
196
  | `--from <id>` / `--body <s>` | Required by `append`. |
165
197
  | `--kind <k>` / `--in-reply-to <n>` | Optional message structure. |
166
- | `--force` | Append anyway when a live room is serving that log. |
198
+ | `--read-through <n>` / `--allow-unread` | The highest `seq` the author had seen; the append is refused if another participant wrote past it (D-21). |
199
+ | `--take-over` | Write when the room is live but its writer is provably gone. |
167
200
 
168
201
  `new` refuses to overwrite an existing log — it is append-only, and clobbering
169
- one loses a session. `append` refuses when the registry shows a live room
170
- serving that path, because that room's dispatcher is the log's single writer
171
- (D-01a). `--force` is for when you know the room is gone.
202
+ one loses a session.
203
+
204
+ `append` refuses only when it can see another writer: a held writer lease, or a
205
+ room reporting an attached dispatcher. When it cannot — which is the case for an
206
+ agent dispatcher running `roomyx serve` and appending from a separate process —
207
+ it prints a note naming the room that is serving the log, and writes. There is
208
+ no flag that overrides a writer that is really there; the only honest move is to
209
+ stop it.
210
+
211
+ `--take-over` is for a room whose writer is **provably gone** — its server has
212
+ stopped, or the lease it left has expired without being refreshed. It records
213
+ the take-over in the log, naming whose lease it took.
214
+
215
+ ### `roomyx experiment plan <manifest>` / `roomyx experiment new <manifest> --out <dir>`
216
+
217
+ Expands an experiment manifest into rooms — one per cell of the variable grid.
218
+
219
+ ```yaml
220
+ name: pricing
221
+ goal: "Pick a price for the {{tier}} tier"
222
+ roster: [ada:Ada, ben]
223
+ model: sonnet # recorded, never called
224
+ seed: 10 # a cell's seed is seed + its repeat
225
+ repeats: 2
226
+ variables:
227
+ tier: [free, pro] # a list is a grid axis
228
+ region: eu # a scalar is held constant
229
+ ```
230
+
231
+ `plan` prints the cells and writes nothing; `new` writes one log per cell into
232
+ `--out` and refuses, writing nothing, if any of them exists. Each log's header
233
+ records the cell's variables, seed and the manifest's SHA-256 (`experiment`),
234
+ which is what makes a finished room comparable with its siblings. roomyx does
235
+ not run agents — a dispatcher runs each room. A grid over 500 cells is refused.
236
+ YAML needs Bun 1.2.21 or newer; a `.json` manifest works everywhere.
237
+
238
+ ### `roomyx room delta <log> --for <id>` / `roomyx room commands <log>` / `roomyx room ack <log> <id>`
239
+
240
+ What a dispatcher needs from a room that is already running. All three read the
241
+ room's **own** MCP server, so the room has to be live — they resolve its port
242
+ through the registry, the same way `append` finds a live room.
243
+
244
+ | | |
245
+ | --- | --- |
246
+ | `room delta <log> --for <id>` | The messages that participant has not seen, never including their own. Reports `since_seq` and `cursor_from`, so an empty delta is distinguishable from a wrong cursor. `--since <seq>` overrides the cursor. |
247
+ | `room commands <log>` | Owner commands waiting in the room's queue. The owner posts these from the TUI with `o`; nothing pushes them, so a dispatcher has to look. |
248
+ | `room ack <log> <id>` | Marks one as dealt with, so `pending` keeps meaning "not yet handled" instead of growing forever. |
249
+
250
+ They exist because the bundled skill told dispatchers to call three MCP tools
251
+ that nothing could reach: no command exposed them, `.mcp.json` registers the
252
+ *management* server rather than a room, and a room's own server binds an
253
+ ephemeral port recorded only in the registry. Measured at ~220 ms per call,
254
+ against ~225 ms for the runtime to start at all — so calling one every turn
255
+ costs a dispatcher nothing.
172
256
 
173
257
  ### `roomyx serve <logPath> [flags]`
174
258
 
@@ -187,6 +271,28 @@ Multiple independent MCP client sessions against one `serve` process are
187
271
  supported: each new session gets its own transport and server instance, keyed by
188
272
  `mcp-session-id`.
189
273
 
274
+ **Every request must present the room's token.** `serve` mints one per room, per
275
+ process start, and writes it into the room's registry entry beside the port —
276
+ never to stdout, because stdout is a scrollback and a CI log. A request without
277
+ it, or with the wrong one, is refused with `401` before the MCP layer sees it;
278
+ the refusal never quotes the expected value. Present it as a standard
279
+ `Authorization: Bearer <token>` header:
280
+
281
+ ```bash
282
+ TOKEN=$(jq -r '.rooms[0].token' .roomyx/rooms/registry.json)
283
+ curl -H "authorization: Bearer $TOKEN" ... http://127.0.0.1:4319/mcp
284
+ ```
285
+
286
+ Every in-tree caller — the TUI, `roomyx room delta|commands|ack`, `rooms list`'s
287
+ liveness probe — reads it from that entry and needs no flag. **This is not
288
+ authentication of a person.** Nobody signs in, and it records nothing about who
289
+ called. What it does is stop a process that knows only the port from driving the
290
+ room: reaching the endpoint means reading the transcript *and* queueing owner
291
+ commands to an agent that is holding tools, so knowing the port is no longer
292
+ enough. A process that can read the registry file is still inside the boundary.
293
+ `roomyx mcp`, the management server, has no token — a different surface, no
294
+ owner-command queue, and its tools report rather than act.
295
+
190
296
  ### `roomyx rooms list`
191
297
 
192
298
  Lists rooms that are **confirmed live**, not merely present in the registry —
@@ -229,8 +335,13 @@ offers the same thing as a ticked box.
229
335
  A room is built out of these — the `startup-room` skill casts its participants
230
336
  from this directory. It looks in `.roomyx/personas/` first and falls back to
231
337
  `~/.roomyx/personas/`, so a project copy overrides the machine-wide one — the
232
- same order every runtime uses for skills. The 50-criteria scoring rubric travels inside the skill
233
- itself.
338
+ same order every runtime uses for skills. The 50-criteria scoring rubric travels
339
+ inside the skill, in `reference/goal-startup-idea.md`.
340
+
341
+ Every profile is in English, with the persona's name carrying its original
342
+ Cyrillic in parentheses — `Ngozi Adeagbo (Нгози Адеагбо)`. The library and the
343
+ rubric were written in Russian and shipped that way until `0.12.1`; the names
344
+ keep both spellings so rooms cast before the translation stay findable.
234
345
 
235
346
  | Flag | Default | Meaning |
236
347
  | --- | --- | --- |
@@ -314,7 +425,8 @@ lifetime from `serve`/`mcp`.
314
425
  | Flag | Meaning |
315
426
  | --- | --- |
316
427
  | `--room <id>` | Attach to a specific live room by id. |
317
- | `--connect <url>` | Attach to an explicit MCP URL. Wins outright; the registry is not consulted. |
428
+ | `--connect <url>` | Attach to an explicit MCP URL. The address wins outright; the registry is consulted only to find that port's token. |
429
+ | `--token <token>` | The room's token, when `--connect` names a room this registry does not know. |
318
430
  | `--registry <path>` | Registry file to resolve rooms from. |
319
431
  | `--archive` | Pick a closed room from the history index and open it read-only. |
320
432
  | `--open <logPath>` | Reread one closed room directly, read-only. No server needed. |
@@ -322,6 +434,22 @@ lifetime from `serve`/`mcp`.
322
434
  With no flags it auto-attaches when exactly one room is live, and refuses with a
323
435
  list of candidate ids when more than one is.
324
436
 
437
+ **The room's token.** A room requires the per-room token `roomyx serve` mints for
438
+ it, presented as `Authorization: Bearer <token>`. It is recorded in the room's
439
+ registry entry beside its port and is never printed, so `--room <id>` and
440
+ auto-attach find it for you and need no extra flag. `--token` exists for the one
441
+ case that cannot be looked up: `--connect` against a room registered somewhere
442
+ this client cannot read. Without a token the room answers 401, which the client
443
+ reports as `disconnected` — so it says so in one line rather than leaving that to
444
+ look like a room that is not running.
445
+
446
+ **Live updates.** A running room tells the client when its log grows (an MCP
447
+ resource subscription to `room://log`, D-23), and the client fetches at once; its
448
+ polls drop to one every 15 seconds as a backstop. Against a room that cannot
449
+ subscribe — an older roomyx — the client polls every second, as before. The
450
+ notification carries no message text, so nothing a subscriber learns is more than
451
+ `room.get_transcript` would have told it.
452
+
325
453
  **Read-only mode.** `--open` and `--archive` load a finished log once — no
326
454
  server, no polling, no reconnect. Scrolling, per-participant filtering, search,
327
455
  export and help behave exactly as in a live room; the owner command does not
@@ -351,7 +479,7 @@ and skill-sync — to any MCP client.
351
479
 
352
480
  | Tool | Input | Returns |
353
481
  | --- | --- | --- |
354
- | `roomyx.rooms.list` | — | Live, liveness-checked rooms. |
482
+ | `roomyx.rooms.list` | — | Live, liveness-checked rooms — id, port, log path, pid and start time. Never a room's token: this server takes no credential of its own, so echoing them here would hand every room's credential to the caller the token bounds. |
355
483
  | `roomyx.skills.sync` | `target: claude \| codex \| keryx \| all`, `dryRun?: boolean`, `yes?: boolean` | One result per target: whether it would write, whether it did, and where the backup went. |
356
484
 
357
485
  **Named targets only, deliberately.** This tool once accepted a literal
@@ -469,7 +597,7 @@ a whole. It is documented here because the tests in this package assume it.
469
597
 
470
598
  ```bash
471
599
  bun install
472
- bun run check # lint + typecheck + test
600
+ bun run check # lint + typecheck + changelog entry + test
473
601
  ```
474
602
 
475
603
  Releases are cut by pushing a `v*` tag whose version matches `package.json`; the
@@ -509,7 +637,7 @@ seconds and asserts a state.
509
637
 
510
638
  `scripts/soak.ts` compresses the clock by poll count rather than by wall time —
511
639
  the 2.7-hour death is 3275 state polls, which at a 20 ms interval is sixty-five
512
- seconds — and drives a real `ChatView` and a real `RoomClient` against a real
640
+ seconds — and drives a real `ChatView` and a real `RoomClient` (polling only — `subscribe: false`, since the poll count is what it compresses) against a real
513
641
  `roomyx serve`, through a proxy that counts every request. It reports **trends**,
514
642
  not thresholds: a threshold has to be guessed and is wrong on someone else's
515
643
  machine, while "the renderable count grew with the transcript and not with the
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@mrciphersmith/roomyx",
3
- "version": "0.12.1",
3
+ "version": "0.12.3",
4
4
  "description": "MCP server + terminal UI for startup-room: live room status, chat, per-agent modal, an installable room registry, and skill-sync.",
5
5
  "publishConfig": {
6
6
  "access": "public"
@@ -38,23 +38,24 @@
38
38
  "test:e2e": "ROOMYX_E2E=1 bun test test/cli-room-tools.test.ts",
39
39
  "typecheck": "tsc --noEmit",
40
40
  "lint": "eslint src test",
41
- "check": "bun run lint && bun run typecheck && bun test",
41
+ "check:changelog": "bun scripts/check-changelog.ts",
42
+ "check": "bun run lint && bun run typecheck && bun test && bun run check:changelog",
42
43
  "soak": "bun scripts/soak.ts",
43
44
  "fuzz": "bun scripts/fuzz-log.ts",
44
45
  "replay": "bun scripts/replay.ts"
45
46
  },
46
47
  "dependencies": {
47
- "@modelcontextprotocol/sdk": "^1.25.0",
48
- "@opentui/core": "^0.5.11",
49
- "zod": "^4.5.4"
48
+ "@modelcontextprotocol/sdk": "^1.32.2",
49
+ "@opentui/core": "^0.5.17",
50
+ "zod": "^4.6.7"
50
51
  },
51
52
  "devDependencies": {
52
- "@types/bun": "^1.4.2",
53
- "eslint": "^10.10.0",
54
- "typescript": "^5.6.0",
55
- "typescript-eslint": "^8.0.0"
53
+ "@types/bun": "^1.4.5",
54
+ "eslint": "^10.16.0",
55
+ "typescript": "^5.9.3",
56
+ "typescript-eslint": "^8.74.0"
56
57
  },
57
58
  "engines": {
58
- "bun": ">=1.1.0"
59
+ "bun": ">=1.2.15"
59
60
  }
60
61
  }
@@ -24,7 +24,7 @@ import { fileURLToPath } from "node:url";
24
24
  * exactly the install-time network fetch that installer D-01 exists to refuse.
25
25
  */
26
26
 
27
- const MISSING_BUN = `roomyx needs Bun 1.1+ on your PATH.
27
+ const MISSING_BUN = `roomyx needs Bun 1.2.15+ on your PATH.
28
28
 
29
29
  It ships TypeScript and runs it directly — there is no build step, so Bun is
30
30
  the interpreter rather than a build-time dependency.
@@ -21,7 +21,7 @@ A registry of named groups for quickly launching a startup-room without re-expla
21
21
 
22
22
  **Known lineup limitation:** 4 of the 6 original participants (Viktor, Aigerim, Dmitry, Pavel) have a regulatory/compliance-heavy background — this systematically pulls the discussion toward "document workflow/registries/compliance" even after the topic is explicitly banned. When re-running for a genuinely different angle — keep these four in "comment only" mode, don't let them propose first, and explicitly ask Rohan/Wei/new participants to take the initiative.
23
23
 
24
- **Protocol:** `arena/brainstorm/startup-room-cis-asia-it.md`
24
+ **Protocol:** a transcript from an earlier run of this group (`startup-room-cis-asia-it`), kept in the project this library came from and not shipped here
25
25
 
26
26
  ---
27
27
 
@@ -38,7 +38,7 @@ A registry of named groups for quickly launching a startup-room without re-expla
38
38
  6. Vanessa Cruz — venture-backed, thesis of aggressive growth through AI agents (`founders/04-vanessa-blitzscaler-sf.md`) — reused
39
39
  7. David Kim — VC partner, scans funding rounds for AI startups (`panel/03-david-vc-financier.md`) — reused
40
40
 
41
- **Protocol:** `arena/brainstorm/startup-room-ai-trends.md` (paused — see goal contract v2 in the file header).
41
+ **Protocol:** a transcript from an earlier run of this group (`startup-room-ai-trends`), kept in the project this library came from and not shipped here (paused — see goal contract v2 in the file header).
42
42
 
43
43
  ---
44
44
 
@@ -60,7 +60,7 @@ A registry of named groups for quickly launching a startup-room without re-expla
60
60
  9. Elena Kovaleva — engineering manager, a real-world devtools buyer (`tech/09-elena-engineering-manager-buyer.md`)
61
61
  10. David Mbeki — competitive market analyst for AI devtools (`tech/10-david-competitive-analyst.md`)
62
62
 
63
- **Protocol:** `arena/brainstorm/tech-room-new-ux.md` (search for a new idea, until 2026-09-08) → `arena/reviews/keryx/product-review-transcript.md` (keryx product review, from 2026-09-08).
63
+ **Protocol:** a transcript from an earlier run of this group (`tech-room-new-ux`), kept in the project this library came from and not shipped here — first a search for a new idea, then a product review, both from 2026-09-08.
64
64
 
65
65
  ---
66
66
 
@@ -67,6 +67,11 @@ not understand.
67
67
  `research`; `--in-reply-to <seq>` records who was being answered. Both are
68
68
  optional and both make the transcript far easier to read later.
69
69
 
70
+ `--read-through <seq>` says how far the author had read when it wrote. If another
71
+ participant has written past that point, the append is refused and names what was
72
+ missed, so the agent can be shown it and write again. Use it when agents answer in
73
+ parallel; `--allow-unread` writes anyway, and the gap stays in the log.
74
+
70
75
  `--port 0` takes an ephemeral port, so several rooms can run at once without
71
76
  colliding. It prints the bound URL and a short room ID:
72
77
 
@@ -0,0 +1,12 @@
1
+ import { CLIENT_FLAGS } from "./specs";
2
+ import type { Command } from "./shared";
3
+
4
+ export const clientCommand: Command = {
5
+ usage: "roomyx client [flags]",
6
+ summary: "attach the terminal UI (same as the roomyx-client binary)",
7
+ flags: CLIENT_FLAGS,
8
+ run: async ({ flags }) => {
9
+ const { runClient } = await import("../client/index");
10
+ await runClient(flags);
11
+ },
12
+ };
@@ -0,0 +1,67 @@
1
+ import { existsSync } from "node:fs";
2
+ import { join, resolve } from "node:path";
3
+ import { expand, loadManifest, ManifestError } from "../experiment/manifest";
4
+ import { createRoomLog } from "../log/write";
5
+ import { ArgError } from "./args";
6
+ import type { Command } from "./shared";
7
+
8
+ function plan(path: string) {
9
+ try {
10
+ const { manifest, digest } = loadManifest(resolve(path));
11
+ return { manifest, cells: expand(manifest, digest) };
12
+ } catch (error) {
13
+ if (error instanceof ManifestError) throw new ArgError(error.message);
14
+ throw error;
15
+ }
16
+ }
17
+
18
+ const NOTES =
19
+ "roomyx does not run agents. `new` makes the rooms; a dispatcher runs them, one per cell.\n Every cell's header records its variables, seed and manifest digest.";
20
+
21
+ export const experimentPlan: Command = {
22
+ usage: "roomyx experiment plan <manifest> [flags]",
23
+ summary: "list the rooms an experiment manifest expands to, writing nothing",
24
+ notes: NOTES,
25
+ flags: { json: { type: "boolean", describe: "Print the cells as JSON" } },
26
+ run: async ({ positionals, flags }) => {
27
+ const path = positionals[0];
28
+ if (!path) throw new ArgError("Missing <manifest> (.yaml, .yml or .json).");
29
+ const { cells } = plan(path);
30
+ if (flags.json === true) {
31
+ console.log(JSON.stringify(cells.map((c) => ({ id: c.id, goal: c.goal, ...c.header })), null, 2));
32
+ return;
33
+ }
34
+ for (const cell of cells) console.log(`${cell.id} ${JSON.stringify(cell.header.variables)}${cell.header.seed === undefined ? "" : ` seed=${cell.header.seed}`}`);
35
+ console.log(`${cells.length} room${cells.length === 1 ? "" : "s"}`);
36
+ },
37
+ };
38
+
39
+ export const experimentNew: Command = {
40
+ usage: "roomyx experiment new <manifest> --out <dir>",
41
+ summary: "create one room log per cell of an experiment manifest",
42
+ notes: `${NOTES}\n Refuses to overwrite: if any cell's log exists, nothing is written.`,
43
+ flags: { out: { type: "string", describe: "Required. Directory for the room logs" } },
44
+ run: async ({ positionals, flags }) => {
45
+ const path = positionals[0];
46
+ if (!path) throw new ArgError("Missing <manifest> (.yaml, .yml or .json).");
47
+ if (typeof flags.out !== "string" || flags.out === "") throw new ArgError("Missing --out <dir>.");
48
+ const { manifest, cells } = plan(path);
49
+ const out = resolve(flags.out);
50
+ const targets = cells.map((cell) => ({ cell, file: join(out, `${cell.id}.jsonl`) }));
51
+
52
+ const existing = targets.filter(({ file }) => existsSync(file));
53
+ if (existing.length > 0) {
54
+ throw new ArgError(`${existing[0]!.file} already exists${existing.length > 1 ? ` (and ${existing.length - 1} more)` : ""}. A room log is append-only; nothing was written.`);
55
+ }
56
+ for (const { cell, file } of targets) {
57
+ createRoomLog(file, {
58
+ goalStatement: cell.goal,
59
+ criteria: cell.criteria,
60
+ roster: manifest.roster,
61
+ experiment: cell.header,
62
+ });
63
+ console.log(`Created ${file}`);
64
+ }
65
+ console.log(`${cells.length} room${cells.length === 1 ? "" : "s"}; serve each with \`roomyx serve <file>\``);
66
+ },
67
+ };