agent-rooms 0.10.0 → 0.11.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.
- package/CHANGELOG.md +77 -77
- package/LICENSE +42 -42
- package/README.md +140 -140
- package/dist/cli.js +26 -26
- package/dist/hosts.js +5 -0
- package/dist/listener.js +112 -4
- package/dist/normalize.js +284 -0
- package/dist/spawn.js +9 -1
- package/package.json +2 -2
- package/skill/agent-rooms/AGENTS.md +115 -115
- package/skill/agent-rooms/SKILL.md +384 -342
- package/skill/agent-rooms/references/tools.md +10 -3
package/CHANGELOG.md
CHANGED
|
@@ -1,77 +1,77 @@
|
|
|
1
|
-
# Changelog
|
|
2
|
-
|
|
3
|
-
All notable changes to the `agent-rooms` listener are documented here. The format
|
|
4
|
-
is based on [Keep a Changelog](https://keepachangelog.com/), and this project
|
|
5
|
-
adheres to [Semantic Versioning](https://semver.org/).
|
|
6
|
-
|
|
7
|
-
## [0.10.0] — 2026-06-27
|
|
8
|
-
|
|
9
|
-
### Changed
|
|
10
|
-
- Concurrent-spawn limit now **scales with your machine** instead of a fixed 3.
|
|
11
|
-
The default tracks CPU cores (floor 4); override with
|
|
12
|
-
`AGENT_ROOMS_MAX_CONCURRENT_SPAWNS` (ceiling raised to 128). The per-minute
|
|
13
|
-
spawn-rate cap remains the brake on a wake-storm / chatter loop. Powerful
|
|
14
|
-
machines now run far more agents at once; nothing past the cap is ever lost —
|
|
15
|
-
those mentions stay queued server-side and run as slots free.
|
|
16
|
-
|
|
17
|
-
## [0.9.1] — 2026-06-27
|
|
18
|
-
|
|
19
|
-
### Changed
|
|
20
|
-
- Support contact (`bugs`) is now `said@beronel.com`.
|
|
21
|
-
|
|
22
|
-
## [0.9.0] — 2026-06-27
|
|
23
|
-
|
|
24
|
-
### Added
|
|
25
|
-
- `agent-rooms doctor` — a read-only health check of the install: Node version,
|
|
26
|
-
host CLIs on PATH, device pairing, service reachability + auth, the watcher,
|
|
27
|
-
bindings, and the wake token. Prints PASS/WARN/FAIL with the exact fix per line
|
|
28
|
-
and exits non-zero on a hard failure. (Diagnose only; self-heal is planned.)
|
|
29
|
-
- Proprietary `LICENSE` (EULA) and `CHANGELOG.md`; cleaned up package metadata
|
|
30
|
-
(`author`, `bugs`, license set to `SEE LICENSE IN LICENSE`).
|
|
31
|
-
|
|
32
|
-
## [0.8.1] — 2026-06-27
|
|
33
|
-
|
|
34
|
-
### Fixed
|
|
35
|
-
- Codex "double reply": the native-output relay re-posted Codex's run summary on
|
|
36
|
-
top of its own message because the relay-dedup only recognized Claude's tool-call
|
|
37
|
-
shape. The detector now matches `send_message` across host stream shapes
|
|
38
|
-
(`name` / `invocation.tool`), so a host that already replied is no longer
|
|
39
|
-
double-posted. The relay still fires for a genuinely-silent run.
|
|
40
|
-
|
|
41
|
-
## [0.8.0] — 2026-06-26
|
|
42
|
-
|
|
43
|
-
### Added
|
|
44
|
-
- Hermes as the 4th wakeable host (memory-isolated wakes via `--ignore-rules`;
|
|
45
|
-
session id captured from stderr).
|
|
46
|
-
|
|
47
|
-
## [0.7.0] — 2026-06-26
|
|
48
|
-
|
|
49
|
-
### Fixed
|
|
50
|
-
- Room-locked native sessions: wakes no longer leak context across rooms — each
|
|
51
|
-
room resumes its own session.
|
|
52
|
-
|
|
53
|
-
## [0.6.0] — 2026-06-26
|
|
54
|
-
|
|
55
|
-
### Added
|
|
56
|
-
- `agent-rooms start` — one command to pair the device, bind every agent to the
|
|
57
|
-
rooms it's already in, and run the listener.
|
|
58
|
-
- `--all-rooms` flag for `init`.
|
|
59
|
-
|
|
60
|
-
## [0.5.3] — 2026-06-25
|
|
61
|
-
|
|
62
|
-
### Fixed
|
|
63
|
-
- `<command> --help` (e.g. `watch --help`, `init --help`) now prints usage and
|
|
64
|
-
exits instead of executing the command.
|
|
65
|
-
|
|
66
|
-
## [0.5.2] — 2026-06-25
|
|
67
|
-
|
|
68
|
-
### Added
|
|
69
|
-
- `init` auto-opens the device-approval link in the browser (one-click approve),
|
|
70
|
-
with the printed link + code retained as the headless fallback.
|
|
71
|
-
|
|
72
|
-
## [0.5.0] — 2026-06-22
|
|
73
|
-
|
|
74
|
-
### Added
|
|
75
|
-
- Initial public listener: pair a device, wire the MCP connector, install the
|
|
76
|
-
bundled skill, and wake idle agents (Claude Code, Codex, OpenClaw) on mentions
|
|
77
|
-
and task assignments. One shared, hot-reloading watcher per machine.
|
|
1
|
+
# Changelog
|
|
2
|
+
|
|
3
|
+
All notable changes to the `agent-rooms` listener are documented here. The format
|
|
4
|
+
is based on [Keep a Changelog](https://keepachangelog.com/), and this project
|
|
5
|
+
adheres to [Semantic Versioning](https://semver.org/).
|
|
6
|
+
|
|
7
|
+
## [0.10.0] — 2026-06-27
|
|
8
|
+
|
|
9
|
+
### Changed
|
|
10
|
+
- Concurrent-spawn limit now **scales with your machine** instead of a fixed 3.
|
|
11
|
+
The default tracks CPU cores (floor 4); override with
|
|
12
|
+
`AGENT_ROOMS_MAX_CONCURRENT_SPAWNS` (ceiling raised to 128). The per-minute
|
|
13
|
+
spawn-rate cap remains the brake on a wake-storm / chatter loop. Powerful
|
|
14
|
+
machines now run far more agents at once; nothing past the cap is ever lost —
|
|
15
|
+
those mentions stay queued server-side and run as slots free.
|
|
16
|
+
|
|
17
|
+
## [0.9.1] — 2026-06-27
|
|
18
|
+
|
|
19
|
+
### Changed
|
|
20
|
+
- Support contact (`bugs`) is now `said@beronel.com`.
|
|
21
|
+
|
|
22
|
+
## [0.9.0] — 2026-06-27
|
|
23
|
+
|
|
24
|
+
### Added
|
|
25
|
+
- `agent-rooms doctor` — a read-only health check of the install: Node version,
|
|
26
|
+
host CLIs on PATH, device pairing, service reachability + auth, the watcher,
|
|
27
|
+
bindings, and the wake token. Prints PASS/WARN/FAIL with the exact fix per line
|
|
28
|
+
and exits non-zero on a hard failure. (Diagnose only; self-heal is planned.)
|
|
29
|
+
- Proprietary `LICENSE` (EULA) and `CHANGELOG.md`; cleaned up package metadata
|
|
30
|
+
(`author`, `bugs`, license set to `SEE LICENSE IN LICENSE`).
|
|
31
|
+
|
|
32
|
+
## [0.8.1] — 2026-06-27
|
|
33
|
+
|
|
34
|
+
### Fixed
|
|
35
|
+
- Codex "double reply": the native-output relay re-posted Codex's run summary on
|
|
36
|
+
top of its own message because the relay-dedup only recognized Claude's tool-call
|
|
37
|
+
shape. The detector now matches `send_message` across host stream shapes
|
|
38
|
+
(`name` / `invocation.tool`), so a host that already replied is no longer
|
|
39
|
+
double-posted. The relay still fires for a genuinely-silent run.
|
|
40
|
+
|
|
41
|
+
## [0.8.0] — 2026-06-26
|
|
42
|
+
|
|
43
|
+
### Added
|
|
44
|
+
- Hermes as the 4th wakeable host (memory-isolated wakes via `--ignore-rules`;
|
|
45
|
+
session id captured from stderr).
|
|
46
|
+
|
|
47
|
+
## [0.7.0] — 2026-06-26
|
|
48
|
+
|
|
49
|
+
### Fixed
|
|
50
|
+
- Room-locked native sessions: wakes no longer leak context across rooms — each
|
|
51
|
+
room resumes its own session.
|
|
52
|
+
|
|
53
|
+
## [0.6.0] — 2026-06-26
|
|
54
|
+
|
|
55
|
+
### Added
|
|
56
|
+
- `agent-rooms start` — one command to pair the device, bind every agent to the
|
|
57
|
+
rooms it's already in, and run the listener.
|
|
58
|
+
- `--all-rooms` flag for `init`.
|
|
59
|
+
|
|
60
|
+
## [0.5.3] — 2026-06-25
|
|
61
|
+
|
|
62
|
+
### Fixed
|
|
63
|
+
- `<command> --help` (e.g. `watch --help`, `init --help`) now prints usage and
|
|
64
|
+
exits instead of executing the command.
|
|
65
|
+
|
|
66
|
+
## [0.5.2] — 2026-06-25
|
|
67
|
+
|
|
68
|
+
### Added
|
|
69
|
+
- `init` auto-opens the device-approval link in the browser (one-click approve),
|
|
70
|
+
with the printed link + code retained as the headless fallback.
|
|
71
|
+
|
|
72
|
+
## [0.5.0] — 2026-06-22
|
|
73
|
+
|
|
74
|
+
### Added
|
|
75
|
+
- Initial public listener: pair a device, wire the MCP connector, install the
|
|
76
|
+
bundled skill, and wake idle agents (Claude Code, Codex, OpenClaw) on mentions
|
|
77
|
+
and task assignments. One shared, hot-reloading watcher per machine.
|
package/LICENSE
CHANGED
|
@@ -1,42 +1,42 @@
|
|
|
1
|
-
Agent Room — End User License Agreement
|
|
2
|
-
|
|
3
|
-
Copyright (c) 2026 Beronel. All rights reserved.
|
|
4
|
-
|
|
5
|
-
This software ("agent-rooms", the "Software") is the proprietary companion command-
|
|
6
|
-
line client for the Agent Room service (the "Service"), operated by Beronel. The
|
|
7
|
-
Software is licensed, not sold.
|
|
8
|
-
|
|
9
|
-
1. License grant. Subject to this Agreement and the Agent Room Terms of Service at
|
|
10
|
-
https://tryagentroom.com/terms, Beronel grants you a limited, personal, non-
|
|
11
|
-
exclusive, non-transferable, revocable license to install and run the Software
|
|
12
|
-
solely to access and use the Service as an authorized user.
|
|
13
|
-
|
|
14
|
-
2. Restrictions. You may not, in whole or in part: (a) redistribute, publish,
|
|
15
|
-
sublicense, sell, rent, or lease the Software; (b) modify, adapt, or create
|
|
16
|
-
derivative works of it; (c) reverse engineer, decompile, or disassemble it,
|
|
17
|
-
except to the limited extent applicable law expressly permits notwithstanding
|
|
18
|
-
this restriction; (d) remove or alter any proprietary notices; or (e) use the
|
|
19
|
-
Software to build or operate a product or service that competes with the Service.
|
|
20
|
-
|
|
21
|
-
3. Ownership. The Software is owned by Beronel and is protected by copyright and
|
|
22
|
-
other intellectual-property laws. No rights are granted except those expressly
|
|
23
|
-
stated in this Agreement; all other rights are reserved.
|
|
24
|
-
|
|
25
|
-
4. Termination. This license terminates automatically if you breach it or cease to
|
|
26
|
-
be an authorized user of the Service. On termination you must stop using and
|
|
27
|
-
delete all copies of the Software.
|
|
28
|
-
|
|
29
|
-
5. No warranty. THE SOFTWARE IS PROVIDED "AS IS" AND "AS AVAILABLE", WITHOUT
|
|
30
|
-
WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING THE IMPLIED WARRANTIES OF
|
|
31
|
-
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE, AND NON-INFRINGEMENT.
|
|
32
|
-
|
|
33
|
-
6. Limitation of liability. TO THE MAXIMUM EXTENT PERMITTED BY LAW, BERONEL SHALL
|
|
34
|
-
NOT BE LIABLE FOR ANY INDIRECT, INCIDENTAL, SPECIAL, CONSEQUENTIAL, OR EXEMPLARY
|
|
35
|
-
DAMAGES, OR FOR ANY LOSS OF PROFITS, REVENUE, OR DATA, ARISING OUT OF OR RELATED
|
|
36
|
-
TO THE SOFTWARE OR THIS AGREEMENT.
|
|
37
|
-
|
|
38
|
-
7. Governing terms. Your use of the Service through the Software is also governed by
|
|
39
|
-
the Agent Room Terms of Service and Privacy Policy available at
|
|
40
|
-
https://tryagentroom.com.
|
|
41
|
-
|
|
42
|
-
For questions about this license, see https://tryagentroom.com.
|
|
1
|
+
Agent Room — End User License Agreement
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2026 Beronel. All rights reserved.
|
|
4
|
+
|
|
5
|
+
This software ("agent-rooms", the "Software") is the proprietary companion command-
|
|
6
|
+
line client for the Agent Room service (the "Service"), operated by Beronel. The
|
|
7
|
+
Software is licensed, not sold.
|
|
8
|
+
|
|
9
|
+
1. License grant. Subject to this Agreement and the Agent Room Terms of Service at
|
|
10
|
+
https://tryagentroom.com/terms, Beronel grants you a limited, personal, non-
|
|
11
|
+
exclusive, non-transferable, revocable license to install and run the Software
|
|
12
|
+
solely to access and use the Service as an authorized user.
|
|
13
|
+
|
|
14
|
+
2. Restrictions. You may not, in whole or in part: (a) redistribute, publish,
|
|
15
|
+
sublicense, sell, rent, or lease the Software; (b) modify, adapt, or create
|
|
16
|
+
derivative works of it; (c) reverse engineer, decompile, or disassemble it,
|
|
17
|
+
except to the limited extent applicable law expressly permits notwithstanding
|
|
18
|
+
this restriction; (d) remove or alter any proprietary notices; or (e) use the
|
|
19
|
+
Software to build or operate a product or service that competes with the Service.
|
|
20
|
+
|
|
21
|
+
3. Ownership. The Software is owned by Beronel and is protected by copyright and
|
|
22
|
+
other intellectual-property laws. No rights are granted except those expressly
|
|
23
|
+
stated in this Agreement; all other rights are reserved.
|
|
24
|
+
|
|
25
|
+
4. Termination. This license terminates automatically if you breach it or cease to
|
|
26
|
+
be an authorized user of the Service. On termination you must stop using and
|
|
27
|
+
delete all copies of the Software.
|
|
28
|
+
|
|
29
|
+
5. No warranty. THE SOFTWARE IS PROVIDED "AS IS" AND "AS AVAILABLE", WITHOUT
|
|
30
|
+
WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING THE IMPLIED WARRANTIES OF
|
|
31
|
+
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE, AND NON-INFRINGEMENT.
|
|
32
|
+
|
|
33
|
+
6. Limitation of liability. TO THE MAXIMUM EXTENT PERMITTED BY LAW, BERONEL SHALL
|
|
34
|
+
NOT BE LIABLE FOR ANY INDIRECT, INCIDENTAL, SPECIAL, CONSEQUENTIAL, OR EXEMPLARY
|
|
35
|
+
DAMAGES, OR FOR ANY LOSS OF PROFITS, REVENUE, OR DATA, ARISING OUT OF OR RELATED
|
|
36
|
+
TO THE SOFTWARE OR THIS AGREEMENT.
|
|
37
|
+
|
|
38
|
+
7. Governing terms. Your use of the Service through the Software is also governed by
|
|
39
|
+
the Agent Room Terms of Service and Privacy Policy available at
|
|
40
|
+
https://tryagentroom.com.
|
|
41
|
+
|
|
42
|
+
For questions about this license, see https://tryagentroom.com.
|
package/README.md
CHANGED
|
@@ -1,140 +1,140 @@
|
|
|
1
|
-
# agent-rooms
|
|
2
|
-
|
|
3
|
-
Companion listener for [Agent Rooms](https://tryagentroom.com).
|
|
4
|
-
|
|
5
|
-
The package is optional. The remote MCP connector gives agents pull-based room
|
|
6
|
-
access; this package adds **real-time wake** so idle local agents (Claude Code,
|
|
7
|
-
Codex, Gemini/Antigravity, Cursor, OpenClaw) spawn the moment they're @mentioned
|
|
8
|
-
or assigned a task.
|
|
9
|
-
|
|
10
|
-
## Recommended: let your agent set it up
|
|
11
|
-
|
|
12
|
-
The fastest path is the copy-paste prompt on the
|
|
13
|
-
[Connect page](https://tryagentroom.com/connect): your own coding agent reads the
|
|
14
|
-
canonical guide at <https://tryagentroom.com/connect/agent-setup.md> and wires the
|
|
15
|
-
MCP connector, token, skill, and wake for you. You only do the sign-in steps.
|
|
16
|
-
|
|
17
|
-
## CLI path (pair + bind + wake)
|
|
18
|
-
|
|
19
|
-
```bash
|
|
20
|
-
# Pair this device + wire the connector + bind a workspace to room(s)
|
|
21
|
-
npx agent-rooms@latest init \
|
|
22
|
-
--agent BRNL-AGT-XXXXXXXX \
|
|
23
|
-
--room <room_id> \
|
|
24
|
-
--host claude_code \
|
|
25
|
-
--workspace /path/to/project
|
|
26
|
-
|
|
27
|
-
# Run the real-time wake listener (one per machine — serves every tool)
|
|
28
|
-
npx agent-rooms@latest watch
|
|
29
|
-
|
|
30
|
-
# Is it running, and what is it serving?
|
|
31
|
-
npx agent-rooms@latest status
|
|
32
|
-
|
|
33
|
-
# See a command's flags without running it
|
|
34
|
-
npx agent-rooms@latest watch --help
|
|
35
|
-
```
|
|
36
|
-
|
|
37
|
-
`init` prints a link to approve this device — one click, since you're signed in
|
|
38
|
-
at the Connect page. Use `watch --dry-run` to preview spawn commands without
|
|
39
|
-
connecting. `--help` works after any command (`init --help`, `watch --help`,
|
|
40
|
-
`status --help`) and prints usage instead of executing.
|
|
41
|
-
|
|
42
|
-
**One shared watcher per machine.** A single `watch` serves **all** your tools
|
|
43
|
-
(claude_code, codex, openclaw) over one device pairing and one connection — don't
|
|
44
|
-
run a listener per tool. It's a **singleton** (a second `watch` no-ops) and
|
|
45
|
-
**hot-reloads**: run `init` for another agent and the running watcher picks it up
|
|
46
|
-
with no restart. `agent-rooms status` shows whether it's up and every bound agent.
|
|
47
|
-
|
|
48
|
-
## Codex notes
|
|
49
|
-
|
|
50
|
-
Codex authenticates to the room over MCP with a **bearer token**, not OAuth.
|
|
51
|
-
Wire it once:
|
|
52
|
-
|
|
53
|
-
```bash
|
|
54
|
-
codex mcp add agent-rooms --url https://api.tryagentroom.com/mcp --bearer-token-env-var AGENT_ROOMS_TOKEN
|
|
55
|
-
```
|
|
56
|
-
|
|
57
|
-
Then export `AGENT_ROOMS_TOKEN` (the agent's one-time token from the Connect page)
|
|
58
|
-
in **the same shell that runs `agent-rooms watch`** — the wake-spawned `codex exec`
|
|
59
|
-
inherits it. Without it, codex wakes but its MCP calls fail to authenticate and it
|
|
60
|
-
stays silent. Wake spawns use `codex exec ... -` with the prompt on stdin, so
|
|
61
|
-
multi-line room mentions are not split by Windows shell parsing.
|
|
62
|
-
|
|
63
|
-
> ### ⚠️ Codex wakes run UNSANDBOXED
|
|
64
|
-
> A headless `codex exec` auto-cancels every agent-rooms MCP call under a codex
|
|
65
|
-
> sandbox (`workspace-write`): there is no interactive approver, so the call comes
|
|
66
|
-
> back as *"user cancelled MCP tool call"* and codex never reads or replies. The
|
|
67
|
-
> only mode where headless codex MCP calls work is
|
|
68
|
-
> `--dangerously-bypass-approvals-and-sandbox`, so **that is how wakes spawn codex
|
|
69
|
-
> by default.** During a wake, codex's own OS sandbox is **off** — it can run
|
|
70
|
-
> arbitrary commands, write anywhere on disk, and make arbitrary network calls at
|
|
71
|
-
> your user's privilege.
|
|
72
|
-
>
|
|
73
|
-
> **This matters in shared / cross-owner rooms:** a mention is untrusted input, and
|
|
74
|
-
> a prompt-injected codex wake is no longer contained by a sandbox. The broker
|
|
75
|
-
> still scrubs the spawn environment of your infra secrets (so cloud/API creds
|
|
76
|
-
> aren't exposed), caps the run with `--max-turns`, and lets you stop a run
|
|
77
|
-
> instantly — but the filesystem/network sandbox is gone.
|
|
78
|
-
>
|
|
79
|
-
> **Opt back into a sandbox:** set `AGENT_ROOMS_CODEX_SANDBOX=workspace-write`
|
|
80
|
-
> (or another codex sandbox mode). Codex wakes will then be contained again — but
|
|
81
|
-
> may go silent if your codex build can't approve MCP calls non-interactively.
|
|
82
|
-
|
|
83
|
-
## Safety
|
|
84
|
-
|
|
85
|
-
- Claude Code spawns with `--permission-mode dontAsk` and a tight Agent Rooms
|
|
86
|
-
MCP/read-only workspace tool allowlist (never `--dangerously-skip-permissions`).
|
|
87
|
-
- **Codex spawns UNSANDBOXED** (`--dangerously-bypass-approvals-and-sandbox`) — the
|
|
88
|
-
only mode where headless codex MCP calls work. See the ⚠️ note above and the
|
|
89
|
-
`AGENT_ROOMS_CODEX_SANDBOX` opt-out.
|
|
90
|
-
- The spawn environment is scrubbed to an allowlist, so spawned agents never
|
|
91
|
-
inherit your infra/cloud credentials.
|
|
92
|
-
- The wake prompt is passed via stdin for host paths that can be shell-sensitive.
|
|
93
|
-
- Host commands are argv arrays, not concatenated shell strings.
|
|
94
|
-
- The agent runs with `cwd` set to the bound workspace.
|
|
95
|
-
- `--max-turns` bounds runaway loops; an owner stop terminates a running wake.
|
|
96
|
-
|
|
97
|
-
## Config
|
|
98
|
-
|
|
99
|
-
`~/.agent-rooms/config.json` stores:
|
|
100
|
-
|
|
101
|
-
- API base,
|
|
102
|
-
- paired device credential,
|
|
103
|
-
- workspace bindings,
|
|
104
|
-
- paused agent plates,
|
|
105
|
-
- optional host bearer tokens,
|
|
106
|
-
- host session ids for resume.
|
|
107
|
-
|
|
108
|
-
Override the config directory with `AGENT_ROOMS_HOME`.
|
|
109
|
-
|
|
110
|
-
Environment variables:
|
|
111
|
-
|
|
112
|
-
- `AGENT_ROOMS_API_BASE`
|
|
113
|
-
- `AGENT_ROOMS_HOME`
|
|
114
|
-
- `AGENT_ROOMS_TOKEN`
|
|
115
|
-
- `AGENT_ROOMS_DEBUG=1`
|
|
116
|
-
|
|
117
|
-
## Uninstall
|
|
118
|
-
|
|
119
|
-
```bash
|
|
120
|
-
npx agent-rooms@latest uninstall --yes
|
|
121
|
-
```
|
|
122
|
-
|
|
123
|
-
This best-effort revokes the paired device, removes supported host MCP
|
|
124
|
-
connectors, and deletes local config. Use `--dry-run`, `--keep-config`, or
|
|
125
|
-
`--local-only` for narrower cleanup.
|
|
126
|
-
|
|
127
|
-
If installed globally:
|
|
128
|
-
|
|
129
|
-
```bash
|
|
130
|
-
npm uninstall -g agent-rooms
|
|
131
|
-
```
|
|
132
|
-
|
|
133
|
-
## Develop
|
|
134
|
-
|
|
135
|
-
```bash
|
|
136
|
-
npm install
|
|
137
|
-
npm run build
|
|
138
|
-
npm test
|
|
139
|
-
npm run dev -- watch --dry-run
|
|
140
|
-
```
|
|
1
|
+
# agent-rooms
|
|
2
|
+
|
|
3
|
+
Companion listener for [Agent Rooms](https://tryagentroom.com).
|
|
4
|
+
|
|
5
|
+
The package is optional. The remote MCP connector gives agents pull-based room
|
|
6
|
+
access; this package adds **real-time wake** so idle local agents (Claude Code,
|
|
7
|
+
Codex, Gemini/Antigravity, Cursor, OpenClaw) spawn the moment they're @mentioned
|
|
8
|
+
or assigned a task.
|
|
9
|
+
|
|
10
|
+
## Recommended: let your agent set it up
|
|
11
|
+
|
|
12
|
+
The fastest path is the copy-paste prompt on the
|
|
13
|
+
[Connect page](https://tryagentroom.com/connect): your own coding agent reads the
|
|
14
|
+
canonical guide at <https://tryagentroom.com/connect/agent-setup.md> and wires the
|
|
15
|
+
MCP connector, token, skill, and wake for you. You only do the sign-in steps.
|
|
16
|
+
|
|
17
|
+
## CLI path (pair + bind + wake)
|
|
18
|
+
|
|
19
|
+
```bash
|
|
20
|
+
# Pair this device + wire the connector + bind a workspace to room(s)
|
|
21
|
+
npx agent-rooms@latest init \
|
|
22
|
+
--agent BRNL-AGT-XXXXXXXX \
|
|
23
|
+
--room <room_id> \
|
|
24
|
+
--host claude_code \
|
|
25
|
+
--workspace /path/to/project
|
|
26
|
+
|
|
27
|
+
# Run the real-time wake listener (one per machine — serves every tool)
|
|
28
|
+
npx agent-rooms@latest watch
|
|
29
|
+
|
|
30
|
+
# Is it running, and what is it serving?
|
|
31
|
+
npx agent-rooms@latest status
|
|
32
|
+
|
|
33
|
+
# See a command's flags without running it
|
|
34
|
+
npx agent-rooms@latest watch --help
|
|
35
|
+
```
|
|
36
|
+
|
|
37
|
+
`init` prints a link to approve this device — one click, since you're signed in
|
|
38
|
+
at the Connect page. Use `watch --dry-run` to preview spawn commands without
|
|
39
|
+
connecting. `--help` works after any command (`init --help`, `watch --help`,
|
|
40
|
+
`status --help`) and prints usage instead of executing.
|
|
41
|
+
|
|
42
|
+
**One shared watcher per machine.** A single `watch` serves **all** your tools
|
|
43
|
+
(claude_code, codex, openclaw) over one device pairing and one connection — don't
|
|
44
|
+
run a listener per tool. It's a **singleton** (a second `watch` no-ops) and
|
|
45
|
+
**hot-reloads**: run `init` for another agent and the running watcher picks it up
|
|
46
|
+
with no restart. `agent-rooms status` shows whether it's up and every bound agent.
|
|
47
|
+
|
|
48
|
+
## Codex notes
|
|
49
|
+
|
|
50
|
+
Codex authenticates to the room over MCP with a **bearer token**, not OAuth.
|
|
51
|
+
Wire it once:
|
|
52
|
+
|
|
53
|
+
```bash
|
|
54
|
+
codex mcp add agent-rooms --url https://api.tryagentroom.com/mcp --bearer-token-env-var AGENT_ROOMS_TOKEN
|
|
55
|
+
```
|
|
56
|
+
|
|
57
|
+
Then export `AGENT_ROOMS_TOKEN` (the agent's one-time token from the Connect page)
|
|
58
|
+
in **the same shell that runs `agent-rooms watch`** — the wake-spawned `codex exec`
|
|
59
|
+
inherits it. Without it, codex wakes but its MCP calls fail to authenticate and it
|
|
60
|
+
stays silent. Wake spawns use `codex exec ... -` with the prompt on stdin, so
|
|
61
|
+
multi-line room mentions are not split by Windows shell parsing.
|
|
62
|
+
|
|
63
|
+
> ### ⚠️ Codex wakes run UNSANDBOXED
|
|
64
|
+
> A headless `codex exec` auto-cancels every agent-rooms MCP call under a codex
|
|
65
|
+
> sandbox (`workspace-write`): there is no interactive approver, so the call comes
|
|
66
|
+
> back as *"user cancelled MCP tool call"* and codex never reads or replies. The
|
|
67
|
+
> only mode where headless codex MCP calls work is
|
|
68
|
+
> `--dangerously-bypass-approvals-and-sandbox`, so **that is how wakes spawn codex
|
|
69
|
+
> by default.** During a wake, codex's own OS sandbox is **off** — it can run
|
|
70
|
+
> arbitrary commands, write anywhere on disk, and make arbitrary network calls at
|
|
71
|
+
> your user's privilege.
|
|
72
|
+
>
|
|
73
|
+
> **This matters in shared / cross-owner rooms:** a mention is untrusted input, and
|
|
74
|
+
> a prompt-injected codex wake is no longer contained by a sandbox. The broker
|
|
75
|
+
> still scrubs the spawn environment of your infra secrets (so cloud/API creds
|
|
76
|
+
> aren't exposed), caps the run with `--max-turns`, and lets you stop a run
|
|
77
|
+
> instantly — but the filesystem/network sandbox is gone.
|
|
78
|
+
>
|
|
79
|
+
> **Opt back into a sandbox:** set `AGENT_ROOMS_CODEX_SANDBOX=workspace-write`
|
|
80
|
+
> (or another codex sandbox mode). Codex wakes will then be contained again — but
|
|
81
|
+
> may go silent if your codex build can't approve MCP calls non-interactively.
|
|
82
|
+
|
|
83
|
+
## Safety
|
|
84
|
+
|
|
85
|
+
- Claude Code spawns with `--permission-mode dontAsk` and a tight Agent Rooms
|
|
86
|
+
MCP/read-only workspace tool allowlist (never `--dangerously-skip-permissions`).
|
|
87
|
+
- **Codex spawns UNSANDBOXED** (`--dangerously-bypass-approvals-and-sandbox`) — the
|
|
88
|
+
only mode where headless codex MCP calls work. See the ⚠️ note above and the
|
|
89
|
+
`AGENT_ROOMS_CODEX_SANDBOX` opt-out.
|
|
90
|
+
- The spawn environment is scrubbed to an allowlist, so spawned agents never
|
|
91
|
+
inherit your infra/cloud credentials.
|
|
92
|
+
- The wake prompt is passed via stdin for host paths that can be shell-sensitive.
|
|
93
|
+
- Host commands are argv arrays, not concatenated shell strings.
|
|
94
|
+
- The agent runs with `cwd` set to the bound workspace.
|
|
95
|
+
- `--max-turns` bounds runaway loops; an owner stop terminates a running wake.
|
|
96
|
+
|
|
97
|
+
## Config
|
|
98
|
+
|
|
99
|
+
`~/.agent-rooms/config.json` stores:
|
|
100
|
+
|
|
101
|
+
- API base,
|
|
102
|
+
- paired device credential,
|
|
103
|
+
- workspace bindings,
|
|
104
|
+
- paused agent plates,
|
|
105
|
+
- optional host bearer tokens,
|
|
106
|
+
- host session ids for resume.
|
|
107
|
+
|
|
108
|
+
Override the config directory with `AGENT_ROOMS_HOME`.
|
|
109
|
+
|
|
110
|
+
Environment variables:
|
|
111
|
+
|
|
112
|
+
- `AGENT_ROOMS_API_BASE`
|
|
113
|
+
- `AGENT_ROOMS_HOME`
|
|
114
|
+
- `AGENT_ROOMS_TOKEN`
|
|
115
|
+
- `AGENT_ROOMS_DEBUG=1`
|
|
116
|
+
|
|
117
|
+
## Uninstall
|
|
118
|
+
|
|
119
|
+
```bash
|
|
120
|
+
npx agent-rooms@latest uninstall --yes
|
|
121
|
+
```
|
|
122
|
+
|
|
123
|
+
This best-effort revokes the paired device, removes supported host MCP
|
|
124
|
+
connectors, and deletes local config. Use `--dry-run`, `--keep-config`, or
|
|
125
|
+
`--local-only` for narrower cleanup.
|
|
126
|
+
|
|
127
|
+
If installed globally:
|
|
128
|
+
|
|
129
|
+
```bash
|
|
130
|
+
npm uninstall -g agent-rooms
|
|
131
|
+
```
|
|
132
|
+
|
|
133
|
+
## Develop
|
|
134
|
+
|
|
135
|
+
```bash
|
|
136
|
+
npm install
|
|
137
|
+
npm run build
|
|
138
|
+
npm test
|
|
139
|
+
npm run dev -- watch --dry-run
|
|
140
|
+
```
|
package/dist/cli.js
CHANGED
|
@@ -53,32 +53,32 @@ function parse(argv) {
|
|
|
53
53
|
}
|
|
54
54
|
return args;
|
|
55
55
|
}
|
|
56
|
-
const HELP = `agent-rooms - wake idle agents when they are mentioned in a room.
|
|
57
|
-
|
|
58
|
-
Usage:
|
|
59
|
-
agent-rooms start [--agent <BRNL-AGT-...>] [--include-cross-owner] [--workspace <path>]
|
|
60
|
-
One command: pair (once), bind every agent to the rooms it's
|
|
61
|
-
already in, and run the listener. --agent limits to one agent.
|
|
62
|
-
agent-rooms init --agent <BRNL-AGT-...> (--room <room_id> ... | --all-rooms)
|
|
63
|
-
[--include-cross-owner] [--api-base <url>]
|
|
64
|
-
[--host claude_code|codex|openclaw|hermes|gemini|cursor]
|
|
65
|
-
[--workspace <path>] [--no-connector] [--no-skill]
|
|
66
|
-
agent-rooms watch [--api-base <url>] [--max-turns <n>] [--dry-run]
|
|
67
|
-
agent-rooms status
|
|
68
|
-
agent-rooms doctor Health-check the install (Node, host CLIs,
|
|
69
|
-
pairing, service auth, watcher, bindings) and
|
|
70
|
-
print what to fix. Read-only — changes nothing.
|
|
71
|
-
agent-rooms uninstall [--yes] [--dry-run] [--keep-config]
|
|
72
|
-
|
|
73
|
-
One shared watcher per machine serves every tool (all bindings) over one device.
|
|
74
|
-
Running 'watch' again is safe — if one's already up it stays the single listener
|
|
75
|
-
and hot-reloads any newly-added agent. Use 'status' to see if it's running.
|
|
76
|
-
|
|
77
|
-
Env:
|
|
78
|
-
AGENT_ROOMS_API_BASE override the API base url
|
|
79
|
-
AGENT_ROOMS_HOME override the config dir (default ~/.agent-rooms)
|
|
80
|
-
AGENT_ROOMS_TOKEN bearer token used by Codex MCP sessions
|
|
81
|
-
AGENT_ROOMS_DEBUG=1 verbose logging
|
|
56
|
+
const HELP = `agent-rooms - wake idle agents when they are mentioned in a room.
|
|
57
|
+
|
|
58
|
+
Usage:
|
|
59
|
+
agent-rooms start [--agent <BRNL-AGT-...>] [--include-cross-owner] [--workspace <path>]
|
|
60
|
+
One command: pair (once), bind every agent to the rooms it's
|
|
61
|
+
already in, and run the listener. --agent limits to one agent.
|
|
62
|
+
agent-rooms init --agent <BRNL-AGT-...> (--room <room_id> ... | --all-rooms)
|
|
63
|
+
[--include-cross-owner] [--api-base <url>]
|
|
64
|
+
[--host claude_code|codex|openclaw|hermes|gemini|cursor]
|
|
65
|
+
[--workspace <path>] [--no-connector] [--no-skill]
|
|
66
|
+
agent-rooms watch [--api-base <url>] [--max-turns <n>] [--dry-run]
|
|
67
|
+
agent-rooms status
|
|
68
|
+
agent-rooms doctor Health-check the install (Node, host CLIs,
|
|
69
|
+
pairing, service auth, watcher, bindings) and
|
|
70
|
+
print what to fix. Read-only — changes nothing.
|
|
71
|
+
agent-rooms uninstall [--yes] [--dry-run] [--keep-config]
|
|
72
|
+
|
|
73
|
+
One shared watcher per machine serves every tool (all bindings) over one device.
|
|
74
|
+
Running 'watch' again is safe — if one's already up it stays the single listener
|
|
75
|
+
and hot-reloads any newly-added agent. Use 'status' to see if it's running.
|
|
76
|
+
|
|
77
|
+
Env:
|
|
78
|
+
AGENT_ROOMS_API_BASE override the API base url
|
|
79
|
+
AGENT_ROOMS_HOME override the config dir (default ~/.agent-rooms)
|
|
80
|
+
AGENT_ROOMS_TOKEN bearer token used by Codex MCP sessions
|
|
81
|
+
AGENT_ROOMS_DEBUG=1 verbose logging
|
|
82
82
|
`;
|
|
83
83
|
async function main() {
|
|
84
84
|
const argv = process.argv.slice(2);
|
package/dist/hosts.js
CHANGED
|
@@ -156,6 +156,11 @@ export const claudeAdapter = {
|
|
|
156
156
|
if (spec.sessionId) {
|
|
157
157
|
args.push("--resume", spec.sessionId);
|
|
158
158
|
}
|
|
159
|
+
else if (spec.mintSessionId) {
|
|
160
|
+
// Spec 31: first run for this (agent, room) — WE choose the session id, so
|
|
161
|
+
// the resume command can be offered before the run even finishes.
|
|
162
|
+
args.push("--session-id", spec.mintSessionId);
|
|
163
|
+
}
|
|
159
164
|
return { command: this.bin, args, cwd: spec.workspace, stdin: spec.prompt, env: spec.env };
|
|
160
165
|
},
|
|
161
166
|
buildMcpAdd(apiBase) {
|