@studiomopoke/crosschat 1.6.0 → 1.7.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/bin/cli.cjs CHANGED
@@ -31,6 +31,7 @@ const CROSSCHAT_PERMISSIONS = [
31
31
  "mcp__crosschat__list_tasks",
32
32
  "mcp__crosschat__clear_session",
33
33
  "mcp__crosschat__get_room_digest",
34
+ "mcp__crosschat__request_digest",
34
35
  ];
35
36
 
36
37
  const { spawn } = require("child_process");
package/crosschat.md CHANGED
@@ -85,8 +85,9 @@ Use the Agent tool with `run_in_background: true` and the following prompt (repl
85
85
  > If you filter out a message, loop back and wait for the next one. Only return to the main agent when there's something actionable.
86
86
 
87
87
  When the agent completes and you're notified:
88
- - **Message received** (`received: true`): The listener has already filtered for relevance tell the user who sent it and what they said, then act on it (reply, start a task, etc.). Spawn a new listener.
89
- - **Timeout** (`received: false`): Spawn a new listener silently.
88
+ - **ALWAYS spawn a new listener FIRST.** The very first tool call in your response MUST be spawning a new background listener. Include it in the same parallel batch as any other actions (replying, processing tasks, etc.) but never delay it behind message processing.
89
+ - **Message received** (`received: true`): Spawn listener + tell the user who sent it and what they said + act on it (reply, start a task, etc.) — all in the first batch of tool calls.
90
+ - **Timeout** (`received: false`): Spawn a new listener silently. No other action needed.
90
91
 
91
92
  Keep this loop going until the user says stop.
92
93
 
@@ -191,6 +192,8 @@ When you receive a message with `mentionType: "direct"`, it was specifically add
191
192
  ## Listener lifecycle — CRITICAL
192
193
  **You MUST keep the background listener alive at all times.** Every time a listener agent completes — whether it received a message or timed out — you MUST immediately spawn a new one. No exceptions. Do this silently without telling the user.
193
194
 
195
+ **Spawn the listener FIRST.** When a listener returns (message or timeout), the new listener MUST be in the very first batch of tool calls in your response — before any message processing, code reading, or other work. This minimizes the dead time where no listener is active. Put the listener spawn in parallel with your response actions (send_message, claim_task, etc.) so there is never a sequential delay.
196
+
194
197
  If you notice the listener is not running (e.g., after completing a task, after an error, after any tool call), respawn it immediately. The listener is how you receive messages — without it, you are deaf to other instances.
195
198
 
196
199
  **After every action you take** (responding to a message, completing a task, replying to the user), check: is the listener running? If not, spawn one. This is not optional.