chatroom-cli 1.70.6 → 1.72.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/dist/index.js CHANGED
@@ -77178,6 +77178,14 @@ var init_handoff_quality_principles = __esm(() => {
77178
77178
  ];
77179
77179
  });
77180
77180
 
77181
+ // ../../services/backend/prompts/utils/handoff-section-guidance.ts
77182
+ function getHandoffReportTemplateIntro(templateLabel) {
77183
+ return `**${templateLabel}** — include every section that applies to this handoff. **Omit sections that do not apply** — do not write \`Not Applicable\` as filler:`;
77184
+ }
77185
+ function getDelegationBriefIntro() {
77186
+ return `**Delegation Brief (Planner → Builder)** — paste into the handoff message. Include every field that applies. **Omit fields that do not apply** — do not write \`Not Applicable\` as filler.`;
77187
+ }
77188
+
77181
77189
  // ../../services/backend/prompts/cli/role-guidance/command.ts
77182
77190
  function roleGuidanceCommand(params = {}) {
77183
77191
  const prefix = params.cliEnvPrefix ?? "";
@@ -77202,7 +77210,7 @@ var init_role_guidance_disclosure = () => {};
77202
77210
  function getBuilderToPlannerHandoffTemplate(roleGuidanceContext) {
77203
77211
  return `${getHandoffRecipientVisibilityCallout("planner")}
77204
77212
 
77205
- **Handoff Template (Builder → Planner)** — paste into the handoff message. Fill in EVERY section below. If a section does not apply, write \`Not Applicable\` (do not delete the section):
77213
+ ${getHandoffReportTemplateIntro("Handoff Template (Builder → Planner)")}
77206
77214
 
77207
77215
  \`\`\`markdown
77208
77216
  ## Summary
@@ -77225,10 +77233,10 @@ ${getFileReferenceProofOfCompletionExample()}
77225
77233
  ${CODE_CHANGE_VERIFICATION_CONFIRMATION}
77226
77234
 
77227
77235
  ## Blockers / questions
77228
- <anything needing planner decision, or "Not Applicable">
77236
+ <anything needing planner decision. Omit if none.>
77229
77237
 
77230
77238
  ## Notes for review
77231
- <specific areas for planner to check, or "Not Applicable">
77239
+ <specific areas for planner to check. Omit if none.>
77232
77240
  \`\`\``;
77233
77241
  }
77234
77242
  var init_builder_to_planner = __esm(() => {
@@ -77241,7 +77249,7 @@ function getPlannerToBuilderHandoffTemplate(nativeIntegration = false) {
77241
77249
  const sessionManagement = nativeIntegration ? `\`compact\` runs in-session context compaction via the SDK runtime. \`new_session\` starts a completely new session within the same process (not compaction). \`none\` continues the prior session. Tasks continue via injection.` : `\`compact\` is NOT supported — use \`none\` or \`new_session\`. \`new_session\` requires a hard restart (daemon stops agent, cold-starts, agent rejoins via \`get-next-task\`). \`none\` resumes prior session (\`wantResume=true\`).`;
77242
77250
  return `${getHandoffRecipientVisibilityCallout("builder")}
77243
77251
 
77244
- **Delegation Brief (Planner → Builder)** — paste into the handoff message and fill in EVERY field. No field is optional: if a section does not apply, write \`Not Applicable\` (do not delete the section).
77252
+ ${getDelegationBriefIntro()}
77245
77253
 
77246
77254
  **Division of labor:** You (planner) own architecture and API shape. The builder implements exactly what you specify and does not redesign or invent alternatives unless blocked.
77247
77255
 
@@ -77282,7 +77290,7 @@ ${getFileReferenceGuidanceComment()}
77282
77290
  (Add one ### block per file. If this slice touches only one file, still use the ### header.)
77283
77291
 
77284
77292
  ## Shared contracts (planner-owned)
77285
- Cross-file types, interfaces, or patterns that apply beyond a single file. Write \`Not Applicable\` if everything is already specified per-file above.
77293
+ Cross-file types, interfaces, or patterns that apply beyond a single file. Omit if everything is already specified per-file above.
77286
77294
 
77287
77295
  ### Interfaces & types
77288
77296
  \`\`\`typescript
@@ -77299,13 +77307,13 @@ Cross-file types, interfaces, or patterns that apply beyond a single file. Write
77299
77307
 
77300
77308
  ## What to avoid
77301
77309
  - <anti-patterns, recurring mistakes, or scope creep for this slice — be explicit>
77302
- - <e.g. "Do not add new abstractions", "Do not refactor unrelated files", "Do not change existing public APIs", or "Not Applicable">
77310
+ - <e.g. "Do not add new abstractions", "Do not refactor unrelated files", "Do not change existing public APIs">
77303
77311
 
77304
77312
  ## Skills to activate
77305
- - <e.g. chatroom skill activate code-review --chatroom-id=<id> --role=builder, or "Not Applicable">
77313
+ - <e.g. chatroom skill activate code-review --chatroom-id=<id> --role=builder>
77306
77314
 
77307
77315
  ## Out of scope
77308
- - <files or areas the builder must NOT touch in this slice, or "Not Applicable">
77316
+ - <files or areas the builder must NOT touch in this slice>
77309
77317
 
77310
77318
  ## Session Augmentation
77311
77319
  Valid values: \`none\` | \`compact\` | \`new_session\`
@@ -77343,16 +77351,16 @@ var init_context_disclosure = () => {};
77343
77351
  // ../../services/backend/prompts/utils/unresolved-decisions.ts
77344
77352
  function getUnresolvedDecisionsSectionBlock() {
77345
77353
  return `## Unresolved Decisions
77346
- <!-- Decisions that need user input before work can proceed. -->
77347
- - <decision or question — options considered, recommendation if any, or "Not Applicable">
77348
- <Carry forward decisions still open from earlier handoffs in this chatroom. Remove items the user has resolved. Do not decide on the user's behalf unless they explicitly asked you to. Write \`Not Applicable\` only when there are truly no open decisions.>`;
77354
+ <!-- Decisions that need user input before work can proceed. Omit this section when there are no open decisions. -->
77355
+ - <decision or question — options considered, recommendation if any>
77356
+ <Carry forward decisions still open from earlier handoffs in this chatroom. Remove items the user has resolved. Do not decide on the user's behalf unless they explicitly asked you to.>`;
77349
77357
  }
77350
77358
 
77351
77359
  // ../../services/backend/prompts/teams/duo/handoff-templates/planner-to-user.ts
77352
77360
  function getPlannerToUserReportTemplate(roleGuidanceContext) {
77353
77361
  return `${getHandoffRecipientVisibilityCallout("user")}
77354
77362
 
77355
- **Report Template (Planner → User)** — fill in EVERY section below in your handoff message. If a section does not apply, write \`Not Applicable\` (do not delete the section):
77363
+ ${getHandoffReportTemplateIntro("Report Template (Planner → User)")}
77356
77364
 
77357
77365
  \`\`\`markdown
77358
77366
  ## Summary
@@ -77366,7 +77374,7 @@ ${getRoleGuidanceDisclosureBlock(roleGuidanceContext)}
77366
77374
  <!-- Demonstrate the goal was decomposed into actionable steps with clear outcomes before implementation. -->
77367
77375
  - <step 1: concrete artifact or outcome>
77368
77376
  - <step 2: concrete artifact or outcome>
77369
- <List the planned slices/steps the planner defined (or would have defined) before delegating. Each step should name a verifiable deliverable — not vague layers like "backend work". Write \`Not Applicable\` only for trivial single-step tasks.>
77377
+ <Omit for trivial single-step tasks.>
77370
77378
 
77371
77379
  ## What changed
77372
77380
  <high-level view of what changed since the user's message before the detailed proofs below>
@@ -77382,24 +77390,24 @@ ${getFileReferenceProofOfCompletionExample()}
77382
77390
 
77383
77391
  ## Backlog Tasks Implemented
77384
77392
  - \`backlog-item-id\` — <backlog item title/summary and how this work addresses it>
77385
- <List every backlog item this work implemented. Write \`Not Applicable\` if no backlog items were in scope.>
77393
+ <Omit if no backlog items were in scope.>
77386
77394
 
77387
77395
  ## Backlog Pending User Review Confirmation
77388
77396
  - [ ] I confirm that every backlog item implemented in this work has been moved to \`pending_user_review\` via \`chatroom backlog mark-for-review\` because a PR has been raised for user review
77389
- - PR URL(s): <link to PR(s), or \`Not Applicable\` if no PR was raised>
77390
- - If no backlog items apply, write \`Not Applicable\` for the checkbox and explain in one line
77397
+ - PR URL(s): <link to PR(s)>
77398
+ <Omit this section if no backlog items apply.>
77391
77399
 
77392
77400
  ## Key Technical Decisions
77393
- - <schema design, modules, interfaces, domain entities — what you chose and why, or "Not Applicable">
77401
+ - <schema design, modules, interfaces, domain entities — what you chose and why>
77394
77402
 
77395
77403
  ## Key Tradeoffs
77396
- - <what was weighed against what, and why you chose this path, or "Not Applicable">
77404
+ - <what was weighed against what, and why you chose this path>
77397
77405
 
77398
77406
  ## Tech Debt Observed
77399
- - <issues noticed but intentionally left out of scope of this change, or "Not Applicable">
77407
+ - <issues noticed but intentionally left out of scope of this change>
77400
77408
 
77401
77409
  ## System Design
77402
- <include a mermaid diagram when the change has non-trivial structure; write "Not Applicable" for trivial changes>
77410
+ <include a mermaid diagram when the change has non-trivial structure; omit for trivial changes>
77403
77411
 
77404
77412
  \`\`\`mermaid
77405
77413
  flowchart TD
@@ -77412,7 +77420,7 @@ ${CODE_CHANGE_VERIFICATION_CONFIRMATION}
77412
77420
  ${getUnresolvedDecisionsSectionBlock()}
77413
77421
 
77414
77422
  ## Notes / Next steps
77415
- <anything the user should know, follow-ups, or open questions, or "Not Applicable">
77423
+ <anything the user should know, follow-ups, or open questions>
77416
77424
  \`\`\``;
77417
77425
  }
77418
77426
  var init_planner_to_user = __esm(() => {
@@ -77450,7 +77458,7 @@ var init_handoff_templates = __esm(() => {
77450
77458
  function getSoloToUserReportTemplate(roleGuidanceContext) {
77451
77459
  return `${getHandoffRecipientVisibilityCallout("user")}
77452
77460
 
77453
- **Report Template (Solo → User)** — fill in EVERY section below in your handoff message. If a section does not apply, write \`Not Applicable\` (do not delete the section):
77461
+ ${getHandoffReportTemplateIntro("Report Template (Solo → User)")}
77454
77462
 
77455
77463
  \`\`\`markdown
77456
77464
  ## Summary
@@ -77464,7 +77472,7 @@ ${getRoleGuidanceDisclosureBlock(roleGuidanceContext)}
77464
77472
  <!-- Demonstrate the goal was decomposed into actionable steps with clear outcomes before implementation. -->
77465
77473
  - <step 1: concrete artifact or outcome>
77466
77474
  - <step 2: concrete artifact or outcome>
77467
- <List the planned steps you defined before implementing. Each step should name a verifiable deliverable — not vague layers like "backend work". Write \`Not Applicable\` only for trivial single-step tasks.>
77475
+ <Omit for trivial single-step tasks.>
77468
77476
 
77469
77477
  ## What changed
77470
77478
  <high-level view of what changed since the user's message before the detailed proofs below>
@@ -77480,24 +77488,24 @@ ${getFileReferenceProofOfCompletionExample()}
77480
77488
 
77481
77489
  ## Backlog Tasks Implemented
77482
77490
  - \`backlog-item-id\` — <backlog item title/summary and how this work addresses it>
77483
- <List every backlog item this work implemented. Write \`Not Applicable\` if no backlog items were in scope.>
77491
+ <Omit if no backlog items were in scope.>
77484
77492
 
77485
77493
  ## Backlog Pending User Review Confirmation
77486
77494
  - [ ] I confirm that every backlog item implemented in this work has been moved to \`pending_user_review\` via \`chatroom backlog mark-for-review\` because a PR has been raised for user review
77487
- - PR URL(s): <link to PR(s), or \`Not Applicable\` if no PR was raised>
77488
- - If no backlog items apply, write \`Not Applicable\` for the checkbox and explain in one line
77495
+ - PR URL(s): <link to PR(s)>
77496
+ <Omit this section if no backlog items apply.>
77489
77497
 
77490
77498
  ## Key Technical Decisions
77491
- - <schema design, modules, interfaces, domain entities — what you chose and why, or "Not Applicable">
77499
+ - <schema design, modules, interfaces, domain entities — what you chose and why>
77492
77500
 
77493
77501
  ## Key Tradeoffs
77494
- - <what was weighed against what, and why you chose this path, or "Not Applicable">
77502
+ - <what was weighed against what, and why you chose this path>
77495
77503
 
77496
77504
  ## Tech Debt Observed
77497
- - <issues noticed but intentionally left out of scope of this change, or "Not Applicable">
77505
+ - <issues noticed but intentionally left out of scope of this change>
77498
77506
 
77499
77507
  ## System Design
77500
- <include a mermaid diagram when the change has non-trivial structure; write "Not Applicable" for trivial changes>
77508
+ <include a mermaid diagram when the change has non-trivial structure; omit for trivial changes>
77501
77509
 
77502
77510
  \`\`\`mermaid
77503
77511
  flowchart TD
@@ -77510,7 +77518,7 @@ ${CODE_CHANGE_VERIFICATION_CONFIRMATION}
77510
77518
  ${getUnresolvedDecisionsSectionBlock()}
77511
77519
 
77512
77520
  ## Notes / Next steps
77513
- <anything the user should know, follow-ups, or open questions, or "Not Applicable">
77521
+ <anything the user should know, follow-ups, or open questions>
77514
77522
  \`\`\``;
77515
77523
  }
77516
77524
  var init_solo_to_user = __esm(() => {
@@ -108848,6 +108856,21 @@ var init_harness_spawning = __esm(() => {
108848
108856
  init_rate_limiter();
108849
108857
  });
108850
108858
 
108859
+ // src/utils/cli-command-formatting.ts
108860
+ function formatAuthLoginCommand(convexUrl, env2 = process.env) {
108861
+ if (isProductionConvexUrl(convexUrl)) {
108862
+ return "chatroom auth login";
108863
+ }
108864
+ const webUrl = env2.CHATROOM_WEB_URL;
108865
+ if (webUrl) {
108866
+ return `CHATROOM_WEB_URL=${webUrl} CHATROOM_CONVEX_URL=${convexUrl} chatroom auth login`;
108867
+ }
108868
+ return `CHATROOM_CONVEX_URL=${convexUrl} chatroom auth login`;
108869
+ }
108870
+ var init_cli_command_formatting = __esm(() => {
108871
+ init_env();
108872
+ });
108873
+
108851
108874
  // src/commands/machine/daemon-start/handlers/daemon-startup-log.ts
108852
108875
  var logStartupEffect = (cachedModels) => exports_Effect.gen(function* () {
108853
108876
  const session2 = yield* DaemonSessionService;
@@ -109036,7 +109059,7 @@ var discoverModelsEffect = (agentServices) => exports_Effect.gen(function* () {
109036
109059
  }
109037
109060
  }
109038
109061
  console.error(`
109039
- Run: chatroom auth login`);
109062
+ Run: ${formatAuthLoginCommand(convexUrl)}`);
109040
109063
  console.log(`
109041
109064
  ⏳ Waiting for authentication (timeout: 5 minutes)...`);
109042
109065
  return yield* waitForAuthenticationEffect(convexUrl);
@@ -109050,7 +109073,7 @@ Run: chatroom auth login`);
109050
109073
  }
109051
109074
  console.error(`❌ Session invalid: ${validation.reason}`);
109052
109075
  console.error(`
109053
- Run: chatroom auth login`);
109076
+ Run: ${formatAuthLoginCommand(convexUrl)}`);
109054
109077
  console.log(`
109055
109078
  ⏳ Waiting for re-authentication (timeout: 5 minutes)...`);
109056
109079
  const newSessionId2 = yield* waitForAuthenticationEffect(convexUrl);
@@ -109062,6 +109085,8 @@ Run: chatroom auth login`);
109062
109085
  if (!revalidation.valid) {
109063
109086
  return yield* exports_Effect.sync(() => {
109064
109087
  console.error(`❌ New session is also invalid: ${revalidation.reason}`);
109088
+ console.error(`
109089
+ Run: ${formatAuthLoginCommand(convexUrl)}`);
109065
109090
  releaseLock();
109066
109091
  process.exit(1);
109067
109092
  });
@@ -109179,6 +109204,7 @@ var init_init2 = __esm(() => {
109179
109204
  init_agent_process_manager();
109180
109205
  init_harness_spawning();
109181
109206
  init_remote_agents();
109207
+ init_cli_command_formatting();
109182
109208
  init_convex_error();
109183
109209
  init_error_formatting();
109184
109210
  init_pid();
@@ -113427,4 +113453,4 @@ program2.hook("preAction", async (_thisCommand, actionCommand) => {
113427
113453
  });
113428
113454
  program2.parse();
113429
113455
 
113430
- //# debugId=7CC1598E61EBEDA564756E2164756E21
113456
+ //# debugId=70E245B4BCF61FFE64756E2164756E21