chatroom-cli 1.130.2 → 1.131.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 CHANGED
@@ -168,6 +168,14 @@ The chatroom handoff command is of this format:
168
168
  chatroom handoff --chatroom-id=<id> --role=<role> --next-role=<role>
169
169
  ```
170
170
 
171
+ The chatroom notify-user command (interim update, no task transition) is of this format:
172
+
173
+ ```
174
+ chatroom notify-user --chatroom-id=<id> --role=<role> << 'CHATROOM_NOTIFY_END'
175
+ <update>
176
+ CHATROOM_NOTIFY_END
177
+ ```
178
+
171
179
  **Non-production only** (local dev, preview): prefix commands with `CHATROOM_CONVEX_URL=<convex-url> `.
172
180
 
173
181
  ### CRITICAL: Execution Rules for Chatroom Commands
@@ -178,7 +186,7 @@ The correct session loop is:
178
186
 
179
187
  1. **Immediately run** `get-next-task` via `bash` and block until a task arrives
180
188
  2. **Process** the task
181
- 3. **Run** `handoff` via `bash` to signal completion and pass control
189
+ 3. **Run** `handoff` via `bash` to signal completion and pass control. Run `handoff` exactly once per task
182
190
  4. **Immediately run** `get-next-task` again to wait for the next task
183
191
 
184
192
  **Common mistakes to avoid:**
package/dist/index.js CHANGED
@@ -2165,6 +2165,7 @@ __export(exports_stdin_heredoc, {
2165
2165
  validateStdinHeredocBody: () => validateStdinHeredocBody,
2166
2166
  formatStdinHeredocCommand: () => formatStdinHeredocCommand,
2167
2167
  findReservedDelimiterLines: () => findReservedDelimiterLines,
2168
+ NOTIFY_USER_STDIN_DELIMITER: () => NOTIFY_USER_STDIN_DELIMITER,
2168
2169
  HANDOFF_STDIN_DELIMITER: () => HANDOFF_STDIN_DELIMITER,
2169
2170
  HANDOFF_MESSAGE_MARKER: () => HANDOFF_MESSAGE_MARKER,
2170
2171
  ENHANCER_STDIN_DELIMITER: () => ENHANCER_STDIN_DELIMITER,
@@ -2206,13 +2207,14 @@ function findReservedDelimiterLines(content) {
2206
2207
  }
2207
2208
  return hits;
2208
2209
  }
2209
- var HANDOFF_STDIN_DELIMITER = "CHATROOM_HANDOFF_END", CONTEXT_STDIN_DELIMITER = "CHATROOM_CONTEXT_END", BACKLOG_STDIN_DELIMITER = "CHATROOM_BACKLOG_END", AGENTIC_QUERY_STDIN_DELIMITER = "CHATROOM_AGENTIC_QUERY_END", ENHANCER_STDIN_DELIMITER = "CHATROOM_ENHANCER_END", CLASSIFY_STDIN_DELIMITER = "CHATROOM_CLASSIFY_END", HANDOFF_MESSAGE_MARKER = "---MESSAGE---", RESERVED_STDIN_HEREDOC_DELIMITERS, RESERVED_STRUCTURED_PARAM_MARKERS;
2210
+ var HANDOFF_STDIN_DELIMITER = "CHATROOM_HANDOFF_END", CONTEXT_STDIN_DELIMITER = "CHATROOM_CONTEXT_END", BACKLOG_STDIN_DELIMITER = "CHATROOM_BACKLOG_END", AGENTIC_QUERY_STDIN_DELIMITER = "CHATROOM_AGENTIC_QUERY_END", NOTIFY_USER_STDIN_DELIMITER = "CHATROOM_NOTIFY_END", ENHANCER_STDIN_DELIMITER = "CHATROOM_ENHANCER_END", CLASSIFY_STDIN_DELIMITER = "CHATROOM_CLASSIFY_END", HANDOFF_MESSAGE_MARKER = "---MESSAGE---", RESERVED_STDIN_HEREDOC_DELIMITERS, RESERVED_STRUCTURED_PARAM_MARKERS;
2210
2211
  var init_stdin_heredoc = __esm(() => {
2211
2212
  RESERVED_STDIN_HEREDOC_DELIMITERS = [
2212
2213
  HANDOFF_STDIN_DELIMITER,
2213
2214
  CONTEXT_STDIN_DELIMITER,
2214
2215
  BACKLOG_STDIN_DELIMITER,
2215
2216
  AGENTIC_QUERY_STDIN_DELIMITER,
2217
+ NOTIFY_USER_STDIN_DELIMITER,
2216
2218
  ENHANCER_STDIN_DELIMITER,
2217
2219
  CLASSIFY_STDIN_DELIMITER
2218
2220
  ];
@@ -35800,6 +35802,7 @@ var init_errorCodes = __esm(() => {
35800
35802
  INVALID_TASK_ENVELOPE: "INVALID_TASK_ENVELOPE",
35801
35803
  TOO_MANY_ATTACHMENTS: "TOO_MANY_ATTACHMENTS",
35802
35804
  INVALID_ANCHOR: "INVALID_ANCHOR",
35805
+ NO_ACTIVE_TASK: "NO_ACTIVE_TASK",
35803
35806
  CONTENT_TOO_LONG: "CONTENT_TOO_LONG",
35804
35807
  EMPTY_PROMPT: "EMPTY_PROMPT",
35805
35808
  INVALID_SCHEDULE: "INVALID_SCHEDULE",
@@ -35908,6 +35911,7 @@ var init_errorCodes = __esm(() => {
35908
35911
  BACKEND_ERROR_CODES.INVALID_TASK_ENVELOPE,
35909
35912
  BACKEND_ERROR_CODES.TOO_MANY_ATTACHMENTS,
35910
35913
  BACKEND_ERROR_CODES.INVALID_ANCHOR,
35914
+ BACKEND_ERROR_CODES.NO_ACTIVE_TASK,
35911
35915
  BACKEND_ERROR_CODES.CONTENT_TOO_LONG,
35912
35916
  BACKEND_ERROR_CODES.EMPTY_PROMPT,
35913
35917
  BACKEND_ERROR_CODES.INVALID_SCHEDULE,
@@ -58155,7 +58159,7 @@ get-next-task → do work → handoff → get-next-task → repeat
58155
58159
 
58156
58160
  1. **Run \`get-next-task\`** immediately via \`bash\` — block until task arrives
58157
58161
  2. **Process** the task
58158
- 3. **Run \`handoff\`** to signal completion
58162
+ 3. **Run \`handoff\`** to signal completion. Run \`handoff\` exactly once per task
58159
58163
  4. **Run \`get-next-task\`** again to wait for next task
58160
58164
 
58161
58165
  ### Reliability
@@ -58175,6 +58179,7 @@ This ensures you never forget to pass control back — just copy the command fro
58175
58179
  |--------|---------|
58176
58180
  | Fetch next task | \`chatroom get-next-task --chatroom-id=<id> --role=<role>\` |
58177
58181
  | Pass control | \`chatroom handoff --chatroom-id=<id> --role=<role> --next-role=<role>\` |
58182
+ | Update the user without completing the task | \`chatroom notify-user --chatroom-id=<id> --role=<role> << 'CHATROOM_NOTIFY_END'\` |
58178
58183
  | Refresh system prompt (after compaction) | \`chatroom get-system-prompt --chatroom-id=<id> --role=<role>\` |
58179
58184
 
58180
58185
  **Non-production only** (local dev, preview): prefix commands with \`CHATROOM_CONVEX_URL=<convex-url> \` (e.g. \`CHATROOM_CONVEX_URL=http://127.0.0.1:3210 chatroom get-next-task ...\`).
@@ -99489,14 +99494,14 @@ var init_task_started = __esm(() => {
99489
99494
 
99490
99495
  // ../../services/backend/prompts/cli/get-next-task/reminder.ts
99491
99496
  function getNextTaskReminder() {
99492
- return "A foreground `get-next-task` blocks until the user or team message is ready, then resolves with that message as a chatroom task—infer what to do from the message, not only from numbered next-steps. Message availability requires exactly one such blocking tool call; the harness delivers chatroom tasks only while it blocks. Duplicate or backgrounded listeners can acknowledge tasks early and trigger grace-period cooldowns where your active session receives nothing.";
99497
+ return "A foreground `get-next-task` blocks until the user or team message is ready, then resolves with that message as a chatroom task—treat the message content as the source of truth for what to do. Message availability requires exactly one such blocking tool call; the harness delivers chatroom tasks only while it blocks. Duplicate or backgrounded listeners can acknowledge tasks early and trigger grace-period cooldowns where your active session receives nothing.";
99493
99498
  }
99494
99499
  function getNextTaskGuidance() {
99495
99500
  return `\uD83D\uDD17 STAYING CONNECTED TO YOUR TEAM
99496
99501
 
99497
99502
  Your primary directive: Stay available to receive chatroom tasks from your team.
99498
99503
 
99499
- When the user or team is ready, your blocking \`get-next-task\` resolves and delivers their message as the next chatroom task. That message is the source of truth for what to do—numbered next-steps in task delivery are typical role patterns, not a rigid script.
99504
+ When the user or team is ready, your blocking \`get-next-task\` resolves and delivers their message as the next chatroom task. That message content is the source of truth for what to do.
99500
99505
 
99501
99506
  The harness delivers the next chatroom task only through a single foreground \`get-next-task\` that blocks as a tool call. After completing work and handing off, that blocking listener is what keeps you connected to your team.
99502
99507
 
@@ -100243,24 +100248,34 @@ var init_command2 = __esm(() => {
100243
100248
  });
100244
100249
 
100245
100250
  // ../../services/backend/prompts/native/handoff-visibility.ts
100246
- function recipientLabel(toRole) {
100247
- return toRole.toLowerCase() === "user" ? "The user" : `The \`${toRole}\` agent`;
100248
- }
100249
100251
  function getHandoffRecipientVisibilityCallout(toRole) {
100250
- const recipient = recipientLabel(toRole);
100251
- const sessionExample = toRole.toLowerCase() === "user" ? ' (including direct replies like "Hello!")' : "";
100252
+ if (toRole.toLowerCase() === "user") {
100253
+ return `---
100254
+
100255
+ ⚠️ **CRITICAL — Recipient visibility**
100256
+
100257
+ The user receives the text inside your \`handoff --next-role="user"\` command, plus any \`notify-user\` notices you sent earlier in this task.
100258
+
100259
+ They **cannot** see:
100260
+ - Anything you write in this agent session (including direct replies like "Hello!")
100261
+ - Tool output
100262
+
100263
+ When you write this handoff, put your **complete** deliverable in the handoff message. Do not rely on session text or on earlier notices.
100264
+
100265
+ ---`;
100266
+ }
100252
100267
  return `---
100253
100268
 
100254
100269
  ⚠️ **CRITICAL — Recipient visibility**
100255
100270
 
100256
- ${recipient} **only** receives the text inside your \`handoff --next-role="${toRole}"\` command.
100271
+ The \`${toRole}\` agent **only** receives the text inside your \`handoff --next-role="${toRole}"\` command.
100257
100272
 
100258
100273
  They **cannot** see:
100259
- - Anything you write in this agent session${sessionExample}
100260
- - Progress reports
100274
+ - Anything you write in this agent session
100275
+ - \`notify-user\` notices (notices go to the user only)
100261
100276
  - Tool output
100262
100277
 
100263
- Put your **complete** deliverable in the handoff message — not in session text.
100278
+ When you write this handoff, put your **complete** deliverable in the handoff message — not in session text.
100264
100279
 
100265
100280
  ---`;
100266
100281
  }
@@ -100962,7 +100977,7 @@ var init_unresolved_decisions = () => {};
100962
100977
  // ../../services/backend/prompts/utils/handoff-report-template-body.ts
100963
100978
  function getHandoffReportTemplateBody(roleGuidanceContext, options = {}) {
100964
100979
  return `<handoff-overview>
100965
- <!-- For informational tasks (summaries, feedback, Q&amp;A with no code changes): put the complete primary answer in Summary and What changed — the user only sees this handoff. -->
100980
+ <!-- When the task is informational (summaries, feedback, Q&amp;A with no code changes): put the complete primary answer in Summary and What changed. Do not rely on earlier \`notify-user\` notices or session text. -->
100966
100981
  ## Summary
100967
100982
  <what was accomplished, in plain terms — no references to prior messages>
100968
100983
 
@@ -101915,17 +101930,18 @@ function formatDecodeError(error51) {
101915
101930
 
101916
101931
  // ../../services/backend/prompts/native/session-continuity.ts
101917
101932
  function getNativeHandoffTurnEndGuidance(nextRole) {
101918
- return getHandoffTurnEndGuidance(nextRole);
101933
+ return getHandoffTurnEndGuidance(nextRole, true);
101919
101934
  }
101920
- function getHandoffTurnEndGuidance(nextRole) {
101935
+ function getHandoffTurnEndGuidance(nextRole, nativeIntegration = false) {
101936
+ const delivery = nativeIntegration ? "the system sends it to you when it is ready" : "your blocking `get-next-task` returns it";
101921
101937
  const lines = [
101922
- "",
101923
- "**Handoff complete. End your turn now — stop tool calls. The system will send you a message when further action is required.**"
101938
+ nativeIntegration ? "**Handoff complete. End your turn now — stop tool calls. When the harness supports native integration: the system sends you a message when further action is required.**" : "**Handoff complete. When the harness does not support native integration: run `get-next-task` in the foreground now; it blocks until the next chatroom task is ready.**",
101939
+ "After a successful handoff, do not run `handoff` or `notify-user` again for this task."
101924
101940
  ];
101925
101941
  if (nextRole.toLowerCase() === "user") {
101926
- lines.push("The system delivers the next chatroom task when the user sends one.");
101942
+ lines.push(`When the next task arrives: the user sends it, and ${delivery}.`);
101927
101943
  } else {
101928
- lines.push(`The system delivers \`${nextRole}\`'s handback when they finish — do not poll \`messages download\` while waiting. For history reconstruction tasks, \`messages download\` is the correct tool.`);
101944
+ lines.push(`When you are waiting for \`${nextRole}\`'s handback: do not poll \`messages download\`; ${delivery}.`, "When you need the history of how this task was done: `messages download` is the correct tool.");
101929
101945
  }
101930
101946
  return lines.join(`
101931
101947
  `);
@@ -102041,19 +102057,29 @@ var init_general_knowledge = __esm(() => {
102041
102057
  init_proof_of_verification();
102042
102058
  });
102043
102059
 
102060
+ // ../../services/backend/prompts/cli/notify-user/command.ts
102061
+ var init_command4 = __esm(() => {
102062
+ init_stdin_heredoc();
102063
+ });
102064
+
102044
102065
  // ../../services/backend/prompts/sections/commands-reference.ts
102045
102066
  var init_commands_reference = __esm(() => {
102046
102067
  init_general_knowledge();
102047
102068
  init_command();
102048
102069
  init_reminder();
102049
102070
  init_command2();
102071
+ init_command4();
102050
102072
  init_utils3();
102051
102073
  });
102052
102074
  // ../../services/backend/prompts/cli/sections/core-responsibilities.ts
102053
102075
  var init_core_responsibilities = () => {};
102054
102076
  // ../../services/backend/prompts/cli/sections/inter-role-handoff-rule.ts
102055
102077
  function getInterRoleHandoffRule() {
102056
- return "- **To communicate with another team role** → Use `chatroom handoff` to that role, even for a short test or status message. Do not use `chatroom message(s) send`: those are user-ingress commands that persist `senderRole=user` and `type=message`.";
102078
+ return [
102079
+ "- **When you need to send any message to another team role (including a short test or status message)** → Run `chatroom handoff --next-role=<role>`. This completes your current task. Do not use `chatroom message(s) send`: those are user-ingress commands that persist `senderRole=user` and `type=message`.",
102080
+ "- **When you need to give the user an interim update and you still have work left on your current task** → Run `chatroom notify-user`. It posts a notice to the user and does not complete, reassign, or transition your task. Run it before you run `handoff`; after `handoff` it fails with `NO_ACTIVE_TASK`."
102081
+ ].join(`
102082
+ `);
102057
102083
  }
102058
102084
 
102059
102085
  // ../../services/backend/prompts/cli/sections/handoff-rules.ts
@@ -102197,7 +102223,7 @@ var init_verifier3 = __esm(() => {
102197
102223
  [ACHIEVED2, NOT_ACHIEVED2, INCONCLUSIVE2] = VERIFIER_VERDICTS;
102198
102224
  VERIFIER_GUIDANCE = `## Verifier Operating Model
102199
102225
 
102200
- You are the verifier. Your main job is to check whether the user's goal was accomplished, judged from chatroom logs. You are advisory and read-only: do not edit files, implement code, run builds or linters, run \`chatroom context new\`, or act as the planner or builder. The one exception to running nothing is the test rule below: it ${VERIFIER_TEST_RULE}.
102226
+ You are the verifier. Your main job is to check whether the user's goal was accomplished, judged from chatroom logs. You are advisory and read-only: do not edit files, implement code, run builds or linters, run \`chatroom context new\`, or act as the planner or builder. The one exception is test execution: it ${VERIFIER_TEST_RULE}.
102201
102227
 
102202
102228
  ${"{SESSION_CONTINUITY}"}
102203
102229
 
@@ -102208,9 +102234,9 @@ ${getInterRoleHandoffRule()}
102208
102234
  2a. Requested test runs: if the user's last message (or prior user messages for this objective) explicitly asks for tests to be run, run exactly those commands from the repository root, record the command and exit result, and count the output as evidence. Run no test the user did not ask for. If the request is absent, run nothing.
102209
102235
  3. Run \`chatroom context read --chatroom-id="<chatroom-id>" --role="verifier"\` and note any mismatch with the request's context id.
102210
102236
  4. Decompose the objective into numbered requirements R1..Rn. Split compound requests and ignore anything the user did not actually ask for.
102211
- 4a. User expectations: the user's handoff template (the section at the end of this prompt) defines what the user expects from the work. In a code mode, turn each applicable item that concerns the work into an expectation \`U1..Un\`: each requirement's evidence (PR, commit, or file), files changed, Code Change Verification, backlog items moved to \`pending_user_review\` after a verified end-to-end feature with a PR, and any manual steps or unresolved decisions the user must act on. Skip presentation-only items: template disclosure checkboxes, section order, collapsing, diagram format, and Proof of Planning. In \`chat\` mode the template asks only for a direct, concise answer, so add no expectations beyond the requirements.
102237
+ 4a. User expectations: the user's handoff template defines what the user expects from the work. In a code mode, turn each applicable item that concerns the work into a user expectation: each requirement's evidence (PR, commit, or file), files changed, Code Change Verification, backlog items moved to \`pending_user_review\` after a verified end-to-end feature with a PR, and any manual steps or unresolved decisions the user must act on. Skip presentation-only items: template disclosure checkboxes, section order, collapsing, diagram format, and Proof of Planning. In \`chat\` mode the template asks only for a direct, concise answer, so add no expectations beyond the requirements.
102212
102238
  5. Find evidence for every requirement in the logs alone: builder handoff reports, planner delegations, quoted test output, commits, and PRs. \`met\` requires concrete evidence in the logs. The planner's claimed outcome is a claim, not evidence. Silence means \`unverified\`. A contradiction, or a log showing the requirement was not done, means \`unmet\`. Never state that tests passed unless a log reports it, or you ran the requested tests yourself.
102213
- 6. Choose the verdict by the rules in the injected verdict template: exactly one of ${VERIFIER_VERDICTS.join(", ")}. ${ACHIEVED2} only if every requirement and every U-expectation is met; ${NOT_ACHIEVED2} if any is unmet; ${INCONCLUSIVE2} if none is unmet but any is unverified.
102239
+ 6. Choose exactly one verdict from ${VERIFIER_VERDICTS.join(", ")}: ${ACHIEVED2} only if every requirement and every user expectation is met; ${NOT_ACHIEVED2} if any requirement or user expectation is unmet; ${INCONCLUSIVE2} if none is unmet but any is unverified.
102214
102240
  7. Follow the injected \`<handoff-templates>\` verdict template exactly, in its order, and put the complete verdict in the handoff. Then hand off to the configured entry point with the normal command, then stop:
102215
102241
 
102216
102242
  \`\`\`bash
@@ -102462,11 +102488,10 @@ function generateHandoffOutput(params) {
102462
102488
  lines.push(getNativeHandoffTurnEndGuidance(nextRole));
102463
102489
  } else {
102464
102490
  lines.push("");
102465
- lines.push("✅ Level B complete (chatroom task handed off).");
102466
- lines.push("⏳ Level A continues (session is still active) — run get-next-task to stay connected:");
102491
+ lines.push("✅ Chatroom task complete (handoff sent).");
102492
+ lines.push(getHandoffTurnEndGuidance(nextRole, false));
102467
102493
  lines.push("");
102468
102494
  lines.push(`\`${getNextTaskCommand({ chatroomId, role, cliEnvPrefix })}\``);
102469
- lines.push(getHandoffTurnEndGuidance(nextRole));
102470
102495
  }
102471
102496
  return lines.join(`
102472
102497
  `);
@@ -102651,6 +102676,79 @@ var init_handoff = __esm(() => {
102651
102676
  init_error_formatting();
102652
102677
  });
102653
102678
 
102679
+ // src/commands/notify-user/index.ts
102680
+ var exports_notify_user = {};
102681
+ __export(exports_notify_user, {
102682
+ notifyUserEffect: () => notifyUserEffect,
102683
+ notifyUser: () => notifyUser
102684
+ });
102685
+ function handleNotifyUserError(err) {
102686
+ return exports_Effect.sync(() => {
102687
+ if (err._tag === "NotAuthenticated") {
102688
+ formatAuthError(err.convexUrl, err.otherUrls);
102689
+ process.exit(1);
102690
+ } else if (err._tag === "InvalidChatroomId") {
102691
+ formatChatroomIdError(err.id);
102692
+ process.exit(1);
102693
+ } else if (err._tag === "NotifyUserFailed") {
102694
+ console.error(`
102695
+ ❌ ERROR: Notice not sent`);
102696
+ const message = err.errorData?.message ?? (err.cause instanceof Error ? err.cause.message : String(err.cause));
102697
+ console.error(`
102698
+ ${message}`);
102699
+ if (process.env.CHATROOM_DEBUG === "true") {
102700
+ console.error(`
102701
+ \uD83D\uDD0D Debug Info:`);
102702
+ console.error(JSON.stringify(err.errorData ?? err.cause, null, 2));
102703
+ }
102704
+ if (err.errorData?.code === "NO_ACTIVE_TASK") {
102705
+ console.error(`
102706
+ \uD83D\uDCA1 If you already ran handoff for this task, end your turn — do not hand off again.`);
102707
+ } else if (err.errorData?.code === "INVALID_ROLE") {
102708
+ console.error(`
102709
+ \uD83D\uDCA1 Check your team configuration and use a valid role`);
102710
+ }
102711
+ console.error(`
102712
+ \uD83D\uDCDA Need help? Check the docs or run:`);
102713
+ console.error(` chatroom notify-user --help`);
102714
+ process.exit(1);
102715
+ }
102716
+ });
102717
+ }
102718
+ async function notifyUser(chatroomId, options, deps) {
102719
+ const d = deps ?? await createConvexCommandDeps();
102720
+ await exports_Effect.runPromise(notifyUserEffect(chatroomId, options).pipe(exports_Effect.catch((err) => handleNotifyUserError(err)), exports_Effect.provide(commandServicesLayerFromDeps(d))));
102721
+ }
102722
+ var notifyUserEffect = (chatroomId, options) => exports_Effect.gen(function* () {
102723
+ const sessionId = yield* requireSessionForChatroomEffect({ chatroomId });
102724
+ const backend2 = yield* BackendService;
102725
+ const result3 = yield* backend2.mutation(api.messages.notifyUser, {
102726
+ sessionId,
102727
+ chatroomId,
102728
+ senderRole: options.role,
102729
+ content: options.message
102730
+ }).pipe(exports_Effect.mapError((cause) => {
102731
+ let errorData;
102732
+ if (cause instanceof ConvexError) {
102733
+ errorData = cause.data;
102734
+ }
102735
+ return { _tag: "NotifyUserFailed", cause, errorData };
102736
+ }));
102737
+ yield* exports_Effect.sync(() => {
102738
+ console.log("✅ Notice sent to user (task state unchanged)");
102739
+ console.log(` Message ID: ${result3.messageId}`);
102740
+ console.log("Continue working. Run `handoff` exactly once when this task is complete.");
102741
+ });
102742
+ });
102743
+ var init_notify_user = __esm(() => {
102744
+ init_values();
102745
+ init_dist();
102746
+ init_api3();
102747
+ init_create_convex_command_deps();
102748
+ init_services();
102749
+ init_error_formatting();
102750
+ });
102751
+
102654
102752
  // src/commands/agentic-query/complete.ts
102655
102753
  var exports_complete = {};
102656
102754
  __export(exports_complete, {
@@ -138258,6 +138356,31 @@ handoffCommandGroup.option("--chatroom-id <id>", "Chatroom identifier").option("
138258
138356
  nextRole
138259
138357
  });
138260
138358
  });
138359
+ program2.command("notify-user").description("Send the user an update while you keep working (does not complete or transition your task)").requiredOption("--chatroom-id <id>", "Chatroom identifier").requiredOption("--role <role>", "Your role").action(async (options) => {
138360
+ await maybeRequireAuth();
138361
+ const { decode: decode5 } = await Promise.resolve().then(() => exports_decode);
138362
+ const stdinContent = await readStdin();
138363
+ let message;
138364
+ try {
138365
+ const { NOTIFY_USER_STDIN_DELIMITER: NOTIFY_USER_STDIN_DELIMITER2, validateStdinHeredocBody: validateStdinHeredocBody2 } = await Promise.resolve().then(() => (init_stdin_heredoc(), exports_stdin_heredoc));
138366
+ const result3 = decode5(stdinContent, { singleParam: "message" });
138367
+ message = result3.message;
138368
+ validateStdinHeredocBody2(message, NOTIFY_USER_STDIN_DELIMITER2);
138369
+ } catch (err) {
138370
+ console.error(`❌ Failed to decode stdin: ${err.message}`);
138371
+ process.exit(1);
138372
+ }
138373
+ if (!message || message.trim().length === 0) {
138374
+ console.error("❌ Message is empty");
138375
+ console.error(` Usage: chatroom notify-user --chatroom-id=<id> --role=<role> << 'CHATROOM_NOTIFY_END'`);
138376
+ process.exit(1);
138377
+ }
138378
+ const { notifyUser: notifyUser2 } = await Promise.resolve().then(() => (init_notify_user(), exports_notify_user));
138379
+ await notifyUser2(options.chatroomId, {
138380
+ role: options.role,
138381
+ message
138382
+ });
138383
+ });
138261
138384
  var agenticQueryCommand = program2.command("agentic-query").description("Agentic search/ask query commands");
138262
138385
  agenticQueryCommand.command("complete").description("Submit the structured agentic query result markdown").requiredOption("--chatroom-id <id>", "Chatroom identifier").requiredOption("--query-id <id>", "Agentic query identifier").action(async (options) => {
138263
138386
  await maybeRequireAuth();
@@ -138637,4 +138760,4 @@ program2.hook("preAction", async (_thisCommand, actionCommand) => {
138637
138760
  });
138638
138761
  program2.parse();
138639
138762
 
138640
- //# debugId=107270B63CF350A064756E2164756E21
138763
+ //# debugId=87F31BFD12DBC8AF64756E2164756E21