chatroom-cli 1.0.85 → 1.2.0
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/README.md +82 -10
- package/dist/index.js +2085 -1336
- package/package.json +1 -2
package/README.md
CHANGED
|
@@ -33,12 +33,12 @@ In the web app, click **+ New** and select a team:
|
|
|
33
33
|
|
|
34
34
|
### 5. Initialize Agents
|
|
35
35
|
|
|
36
|
-
Copy the agent prompt from the web UI sidebar and paste it into your AI assistant. The prompt includes the `
|
|
36
|
+
Copy the agent prompt from the web UI sidebar and paste it into your AI assistant. The prompt includes the `get-next-task` command that the agent will use to join.
|
|
37
37
|
|
|
38
38
|
Each agent needs:
|
|
39
39
|
|
|
40
40
|
```bash
|
|
41
|
-
chatroom
|
|
41
|
+
chatroom get-next-task <chatroom-id> --role=<role>
|
|
42
42
|
```
|
|
43
43
|
|
|
44
44
|
### 6. Send a Task
|
|
@@ -69,7 +69,7 @@ Once all agents have joined (team shows as "ready"), type your task in the messa
|
|
|
69
69
|
|
|
70
70
|
| Command | Description |
|
|
71
71
|
| ------------------------------------------------------------------------ | -------------------------------- |
|
|
72
|
-
| `chatroom
|
|
72
|
+
| `chatroom get-next-task <id> --role=<role>` | Join chatroom and wait for tasks |
|
|
73
73
|
| `chatroom handoff <id> --role=<role> --message="..." --next-role=<role>` | Complete task and hand off |
|
|
74
74
|
|
|
75
75
|
### Backlog Commands
|
|
@@ -88,29 +88,29 @@ Manage task queues and backlogs within a chatroom.
|
|
|
88
88
|
|
|
89
89
|
Configure CLI behavior with these environment variables:
|
|
90
90
|
|
|
91
|
-
| Variable
|
|
92
|
-
|
|
|
93
|
-
| `CHATROOM_CONVEX_URL`
|
|
94
|
-
| `CHATROOM_ENABLE_CLIENT_LOGGING`
|
|
91
|
+
| Variable | Description | Default |
|
|
92
|
+
| -------------------------------- | ------------------------------------------------------------- | ------------------------------------- |
|
|
93
|
+
| `CHATROOM_CONVEX_URL` | Override the default Convex backend URL | `https://chatroom-cloud.duskfare.com` |
|
|
94
|
+
| `CHATROOM_ENABLE_CLIENT_LOGGING` | Enable Convex client logs (backend console.log) in CLI output | `false` |
|
|
95
95
|
|
|
96
96
|
### Examples
|
|
97
97
|
|
|
98
98
|
**Connect to local development backend:**
|
|
99
99
|
|
|
100
100
|
```bash
|
|
101
|
-
CHATROOM_CONVEX_URL=http://127.0.0.1:3210 chatroom
|
|
101
|
+
CHATROOM_CONVEX_URL=http://127.0.0.1:3210 chatroom get-next-task <id> --role=<role>
|
|
102
102
|
```
|
|
103
103
|
|
|
104
104
|
**Enable debug logging:**
|
|
105
105
|
|
|
106
106
|
```bash
|
|
107
|
-
CHATROOM_ENABLE_CLIENT_LOGGING=true chatroom
|
|
107
|
+
CHATROOM_ENABLE_CLIENT_LOGGING=true chatroom get-next-task <id> --role=<role>
|
|
108
108
|
```
|
|
109
109
|
|
|
110
110
|
**Combine multiple environment variables:**
|
|
111
111
|
|
|
112
112
|
```bash
|
|
113
|
-
CHATROOM_CONVEX_URL=http://127.0.0.1:3210 CHATROOM_ENABLE_CLIENT_LOGGING=true chatroom
|
|
113
|
+
CHATROOM_CONVEX_URL=http://127.0.0.1:3210 CHATROOM_ENABLE_CLIENT_LOGGING=true chatroom get-next-task <id> --role=<role>
|
|
114
114
|
```
|
|
115
115
|
|
|
116
116
|
---
|
|
@@ -144,6 +144,78 @@ Messages are routed by priority (lower = higher priority):
|
|
|
144
144
|
User → Builder → Reviewer → User
|
|
145
145
|
```
|
|
146
146
|
|
|
147
|
+
## Agent Integration Guide
|
|
148
|
+
|
|
149
|
+
This section is designed to be copied into your agent's `AGENTS.md` file or system prompt to enable chatroom participation and automatic crash recovery.
|
|
150
|
+
|
|
151
|
+
### Copy-Paste Template
|
|
152
|
+
|
|
153
|
+
````markdown
|
|
154
|
+
## 6. CHATROOM INTEGRATION
|
|
155
|
+
|
|
156
|
+
If you are given a role in the chatroom ecosystem, you MUST always direct your questions to the user via the chatroom handoff command with the user as the target chatroom.
|
|
157
|
+
|
|
158
|
+
The chatroom get-next-task command is of this format:
|
|
159
|
+
|
|
160
|
+
```
|
|
161
|
+
CHATROOM_CONVEX_URL=<endpoint> \
|
|
162
|
+
chatroom get-next-task --chatroom-id=<chatroom-id> --role=<role>
|
|
163
|
+
```
|
|
164
|
+
|
|
165
|
+
The chatroom handoff command is of this format:
|
|
166
|
+
|
|
167
|
+
```
|
|
168
|
+
CHATROOM_CONVEX_URL=<endpoint> \
|
|
169
|
+
chatroom handoff --chatroom-id=<id> --role=<role> --next-role=<role>
|
|
170
|
+
```
|
|
171
|
+
|
|
172
|
+
### CRITICAL: Execution Rules for Chatroom Commands
|
|
173
|
+
|
|
174
|
+
**`get-next-task` MUST be executed immediately via the `bash` tool — not documented, not deferred.**
|
|
175
|
+
|
|
176
|
+
The correct session loop is:
|
|
177
|
+
|
|
178
|
+
1. **Immediately run** `get-next-task` via `bash` and block until a task arrives
|
|
179
|
+
2. **Process** the task
|
|
180
|
+
3. **Run** `handoff` via `bash` to signal completion and pass control
|
|
181
|
+
4. **Immediately run** `get-next-task` again to wait for the next task
|
|
182
|
+
|
|
183
|
+
**Common mistakes to avoid:**
|
|
184
|
+
|
|
185
|
+
- ❌ Adding `get-next-task` to the todo list and then returning a summary to the user instead of running it
|
|
186
|
+
- ❌ Treating `get-next-task` as something to document rather than execute
|
|
187
|
+
- ❌ Skipping the `bash` tool call and just describing what you would do
|
|
188
|
+
|
|
189
|
+
The todo list is for _tracking_, not _executing_. The `bash` tool is what actually runs the command. Both must be used — add the task to the todo list AND call `bash` to execute it.
|
|
190
|
+
|
|
191
|
+
To ensure that you always get this right, even after compaction, you should always add executing the get-next-task as a todo item, with the full command example and CHATROOM_CONVEX_URL so that you never forget.
|
|
192
|
+
|
|
193
|
+
### Context Recovery After Compaction
|
|
194
|
+
|
|
195
|
+
**If you suspect context compaction or summarization has occurred** — for example, if your context window appears to contain only a high-level summary with next steps rather than the full conversation history — re-fetch your system prompt immediately before continuing:
|
|
196
|
+
|
|
197
|
+
```
|
|
198
|
+
CHATROOM_CONVEX_URL=<endpoint> \
|
|
199
|
+
chatroom get-system-prompt --chatroom-id=<chatroom-id> --role=<role>
|
|
200
|
+
```
|
|
201
|
+
|
|
202
|
+
This prints your complete role instructions to stdout. Read them carefully, then resume the session loop.
|
|
203
|
+
|
|
204
|
+
**Signs that compaction has occurred:**
|
|
205
|
+
|
|
206
|
+
- Your context begins with something like "Summary of prior conversation:" or "Context so far:"
|
|
207
|
+
- You are unsure of your role, responsibilities, or which commands to run
|
|
208
|
+
- You can see "next steps" but no actual conversation history leading up to them
|
|
209
|
+
|
|
210
|
+
**Recovery procedure:**
|
|
211
|
+
|
|
212
|
+
1. Run `get-system-prompt` to reload your full instructions
|
|
213
|
+
2. Check your todo list for the last known next step
|
|
214
|
+
3. Resume with `get-next-task` or `handoff` as appropriate
|
|
215
|
+
````
|
|
216
|
+
|
|
217
|
+
---
|
|
218
|
+
|
|
147
219
|
## License
|
|
148
220
|
|
|
149
221
|
MIT
|