chatroom-cli 1.77.2 → 1.77.5
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 +254 -160
- package/dist/index.js.map +21 -19
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -77251,7 +77251,7 @@ function getDelegationBriefDisclosureBlock() {
|
|
|
77251
77251
|
return `${DELEGATION_BRIEF_DISCLOSURE_CHECKBOX}
|
|
77252
77252
|
${getDelegationBriefDisclosureComment()}`;
|
|
77253
77253
|
}
|
|
77254
|
-
var DELEGATION_BRIEF_DISCLOSURE_CHECKBOX = "- [ ] I confirm
|
|
77254
|
+
var DELEGATION_BRIEF_DISCLOSURE_CHECKBOX = "- [ ] I confirm the delegation brief is fully met: all (Required) files done, verified end-to-end, acceptance criteria pass";
|
|
77255
77255
|
|
|
77256
77256
|
// ../../services/backend/prompts/utils/file-reference-guidance.ts
|
|
77257
77257
|
function getFileReferenceGuidanceComment() {
|
|
@@ -77263,14 +77263,21 @@ function getFileReferenceProofOfCompletionExample() {
|
|
|
77263
77263
|
}
|
|
77264
77264
|
|
|
77265
77265
|
// ../../services/backend/prompts/utils/handoff-quality-principles.ts
|
|
77266
|
-
function
|
|
77267
|
-
const
|
|
77268
|
-
|
|
77269
|
-
|
|
77270
|
-
|
|
77271
|
-
|
|
77266
|
+
function getHandoffQualityPrinciplesTemplateBlock() {
|
|
77267
|
+
const lines = HANDOFF_QUALITY_PRINCIPLES.flatMap((p) => [
|
|
77268
|
+
`- **${p.name}:** <how this work demonstrates ${p.name.toLowerCase()}, or Not Applicable>`,
|
|
77269
|
+
`<!-- ${p.name}: ${p.description} -->`,
|
|
77270
|
+
""
|
|
77271
|
+
]);
|
|
77272
|
+
return lines.join(`
|
|
77273
|
+
`).trimEnd();
|
|
77272
77274
|
}
|
|
77273
|
-
|
|
77275
|
+
function getHandoffQualityPrinciplesSectionBlock() {
|
|
77276
|
+
return `${PROOF_OF_PRINCIPLES_HEADING_H2}
|
|
77277
|
+
${PROOF_OF_PRINCIPLES_MANDATORY_COMMENT}
|
|
77278
|
+
${getHandoffQualityPrinciplesTemplateBlock()}`;
|
|
77279
|
+
}
|
|
77280
|
+
var HANDOFF_QUALITY_PRINCIPLES, PROOF_OF_PRINCIPLES_HEADING_H2 = "## Proof of Principles", PROOF_OF_PRINCIPLES_MANDATORY_COMMENT = '<!-- REQUIRED: Complete every principle below. Write an explanation or "Not Applicable" for each — do not omit this section or skip any principle bullet. -->';
|
|
77274
77281
|
var init_handoff_quality_principles = __esm(() => {
|
|
77275
77282
|
HANDOFF_QUALITY_PRINCIPLES = [
|
|
77276
77283
|
{
|
|
@@ -77302,7 +77309,7 @@ var init_handoff_quality_principles = __esm(() => {
|
|
|
77302
77309
|
|
|
77303
77310
|
// ../../services/backend/prompts/utils/handoff-section-guidance.ts
|
|
77304
77311
|
function getHandoffReportTemplateIntro(templateLabel) {
|
|
77305
|
-
return `**${templateLabel}** —
|
|
77312
|
+
return `**${templateLabel}** — complete every section below. Do not omit sections, principles, or XML wrappers:`;
|
|
77306
77313
|
}
|
|
77307
77314
|
function getDelegationBriefIntro() {
|
|
77308
77315
|
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.`;
|
|
@@ -77342,9 +77349,7 @@ ${getHandoffReportTemplateIntro("Handoff Template (Builder → Planner)")}
|
|
|
77342
77349
|
- [ ] I confirm that I have seen this template at the start of this task, before implementing or modifying any code
|
|
77343
77350
|
${getRoleGuidanceDisclosureBlock(roleGuidanceContext)}
|
|
77344
77351
|
|
|
77345
|
-
${
|
|
77346
|
-
${getHandoffQualityPrinciplesCommentBlock()}
|
|
77347
|
-
<how this work follows the principles above — localized changes, readable structure, correctness provable from source then tests>
|
|
77352
|
+
${getHandoffQualityPrinciplesSectionBlock()}
|
|
77348
77353
|
|
|
77349
77354
|
## Proof of Completion
|
|
77350
77355
|
${getDelegationBriefDisclosureBlock()}
|
|
@@ -77355,10 +77360,12 @@ ${getFileReferenceProofOfCompletionExample()}
|
|
|
77355
77360
|
${CODE_CHANGE_VERIFICATION_CONFIRMATION}
|
|
77356
77361
|
|
|
77357
77362
|
## Blockers / questions
|
|
77358
|
-
|
|
77363
|
+
<!-- REQUIRED. List blockers, or write "Not Applicable". Do not omit this section. -->
|
|
77364
|
+
<anything needing planner decision>
|
|
77359
77365
|
|
|
77360
77366
|
## Notes for review
|
|
77361
|
-
|
|
77367
|
+
<!-- REQUIRED. List review notes, or write "Not Applicable". Do not omit this section. -->
|
|
77368
|
+
<specific areas for planner to check>
|
|
77362
77369
|
\`\`\``;
|
|
77363
77370
|
}
|
|
77364
77371
|
var init_builder_to_planner = __esm(() => {
|
|
@@ -77372,26 +77379,29 @@ function getEnhancerToPlannerHandoffTemplate() {
|
|
|
77372
77379
|
|
|
77373
77380
|
${getHandoffReportTemplateIntro("Planning Feedback (Enhancer → Planner)")}
|
|
77374
77381
|
|
|
77375
|
-
The planner sent you three XML sections
|
|
77382
|
+
The planner sent you three XML sections. Your job is **advisory adversarial review** — raise risks, challenge assumptions, and help the planner align with user intent. **Do not prescribe file-level changes or rewrite their builder brief.** The planner makes the final call.
|
|
77376
77383
|
|
|
77377
77384
|
\`\`\`markdown
|
|
77378
77385
|
## Summary
|
|
77379
|
-
<one paragraph: overall assessment
|
|
77386
|
+
<one paragraph: overall assessment — strengths, main risks, and whether the approach is sound>
|
|
77387
|
+
|
|
77388
|
+
## User intent alignment
|
|
77389
|
+
<does the planner's reading of the user request match what was asked? misreadings or missing constraints?>
|
|
77380
77390
|
|
|
77381
|
-
##
|
|
77382
|
-
<
|
|
77391
|
+
## Risks & failure modes
|
|
77392
|
+
<what could go wrong if they proceed as planned? common pitfalls for this kind of work?>
|
|
77383
77393
|
|
|
77384
77394
|
## Knowledge gaps
|
|
77385
|
-
<facts, context, or research the planner
|
|
77395
|
+
<facts, context, or research the planner should verify — advisory questions, not answers from codebase>
|
|
77386
77396
|
|
|
77387
|
-
## Reasoning
|
|
77388
|
-
<logical errors, weak inference
|
|
77397
|
+
## Reasoning review
|
|
77398
|
+
<logical errors, weak inference, contradictions — challenge assumptions>
|
|
77389
77399
|
|
|
77390
|
-
##
|
|
77391
|
-
<
|
|
77400
|
+
## Questions for the planner
|
|
77401
|
+
<specific questions they should answer before delegating — not instructions disguised as questions>
|
|
77392
77402
|
|
|
77393
|
-
##
|
|
77394
|
-
<
|
|
77403
|
+
## Alignment with eventual user handoff
|
|
77404
|
+
<will this approach produce a credible planner→user report? what's missing for user-facing completeness?>
|
|
77395
77405
|
\`\`\`
|
|
77396
77406
|
|
|
77397
77407
|
Return only the feedback markdown — no preamble. Follow this structure; omit sections that truly do not apply.`;
|
|
@@ -77423,7 +77433,7 @@ ${getDelegationBriefIntro()}
|
|
|
77423
77433
|
<choices that greatly simplify the solution while preserving long-term maintainability — reuse existing abstractions, avoid unnecessary layers, leverage platform conventions>
|
|
77424
77434
|
|
|
77425
77435
|
## Files to implement (exhaustive, file-level)
|
|
77426
|
-
List **every** file in this slice. For each file, state the exact change and paste the code the builder should match (no guessing).
|
|
77436
|
+
List **every** file in this slice. Mark each file **(Required)** or **(Optional)** — all Required files must land before PR. For each file, state the exact change and paste the code the builder should match (no guessing).
|
|
77427
77437
|
${getFileReferenceGuidanceComment()}
|
|
77428
77438
|
|
|
77429
77439
|
### \`apps/webapp/src/path/to/file.ts\`
|
|
@@ -77458,6 +77468,7 @@ Cross-file types, interfaces, or patterns that apply beyond a single file. Omit
|
|
|
77458
77468
|
|
|
77459
77469
|
## Requirements (acceptance criteria)
|
|
77460
77470
|
- <verifiable outcome the builder can self-check>
|
|
77471
|
+
- Include at least one check that the feature is **verified end-to-end**. Unit tests alone are insufficient for new features.
|
|
77461
77472
|
|
|
77462
77473
|
## What to avoid
|
|
77463
77474
|
- <anti-patterns, recurring mistakes, or scope creep for this slice — be explicit>
|
|
@@ -77509,11 +77520,11 @@ ${getFileReferenceGuidanceComment()}
|
|
|
77509
77520
|
<builder-handoff>
|
|
77510
77521
|
<your complete, filled-in Delegation Brief for builder review — every section with real content, not placeholders>
|
|
77511
77522
|
|
|
77512
|
-
Follow the **Handoff to \`builder\`** template structure (Summary, Goal,
|
|
77523
|
+
Follow the **Handoff to \`builder\`** template structure (Summary, Goal, approach, Requirements, etc.). The enhancer reviews **approach and scope** — not line-by-line file edits. Keep file references for context, but expect advisory feedback on risks and gaps, not a rewritten brief.
|
|
77513
77524
|
</builder-handoff>
|
|
77514
77525
|
\`\`\`
|
|
77515
77526
|
|
|
77516
|
-
After the enhancer returns feedback, you
|
|
77527
|
+
After the enhancer returns **advisory** feedback, you make the **final call** — incorporate valid critiques, ignore what doesn't apply, then proceed to \`builder\` or \`user\`. Do not re-check with the enhancer for this slice; one round only.`;
|
|
77517
77528
|
}
|
|
77518
77529
|
var init_planner_to_enhancer = () => {};
|
|
77519
77530
|
|
|
@@ -77540,84 +77551,113 @@ var init_context_disclosure = () => {};
|
|
|
77540
77551
|
// ../../services/backend/prompts/utils/unresolved-decisions.ts
|
|
77541
77552
|
function getUnresolvedDecisionsSectionBlock() {
|
|
77542
77553
|
return `## Unresolved Decisions
|
|
77543
|
-
<!--
|
|
77554
|
+
<!-- REQUIRED. List open decisions needing user input, or write "Not Applicable" if none. Do not omit this section. -->
|
|
77544
77555
|
- <decision or question — options considered, recommendation if any>
|
|
77545
77556
|
<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.>`;
|
|
77546
77557
|
}
|
|
77547
77558
|
|
|
77548
|
-
// ../../services/backend/prompts/
|
|
77549
|
-
function
|
|
77550
|
-
return
|
|
77551
|
-
|
|
77552
|
-
${getHandoffReportTemplateIntro("Report Template (Planner → User)")}
|
|
77553
|
-
|
|
77554
|
-
\`\`\`markdown
|
|
77559
|
+
// ../../services/backend/prompts/utils/handoff-report-template-body.ts
|
|
77560
|
+
function getHandoffReportTemplateBody(roleGuidanceContext) {
|
|
77561
|
+
return `<handoff-overview>
|
|
77555
77562
|
## Summary
|
|
77556
77563
|
<what was accomplished, in plain terms — no references to prior messages>
|
|
77557
77564
|
|
|
77565
|
+
## What changed
|
|
77566
|
+
<high-level view of what changed since the user's message>
|
|
77567
|
+
</handoff-overview>
|
|
77568
|
+
|
|
77569
|
+
<!-- UI collapses proofs, direction, and notes by default; overview and action required are expanded -->
|
|
77570
|
+
|
|
77571
|
+
<handoff-proofs>
|
|
77558
77572
|
## Template Disclosure Confirmation
|
|
77559
77573
|
- [ ] I confirm that I have seen this template at the start of any planning, before working on or delegating any task to the team
|
|
77560
77574
|
${getRoleGuidanceDisclosureBlock(roleGuidanceContext)}
|
|
77561
77575
|
|
|
77562
77576
|
## Proof of Planning
|
|
77563
|
-
<!--
|
|
77577
|
+
<!-- REQUIRED. List planning steps, or write "Not Applicable" for trivial single-step tasks. Do not omit this section. -->
|
|
77564
77578
|
- <step 1: concrete artifact or outcome>
|
|
77565
77579
|
- <step 2: concrete artifact or outcome>
|
|
77566
|
-
<Omit for trivial single-step tasks.>
|
|
77567
77580
|
|
|
77568
|
-
|
|
77569
|
-
<high-level view of what changed since the user's message before the detailed proofs below>
|
|
77570
|
-
|
|
77571
|
-
${PROOF_OF_PRINCIPLES_HEADING_H3}
|
|
77572
|
-
${getHandoffQualityPrinciplesCommentBlock()}
|
|
77573
|
-
<how this work follows the principles above — localized changes, readable structure, correctness provable from source then tests>
|
|
77581
|
+
${getHandoffQualityPrinciplesSectionBlock()}
|
|
77574
77582
|
|
|
77575
|
-
|
|
77583
|
+
## Proof of Completion
|
|
77576
77584
|
${getContextReadDisclosureBlock(roleGuidanceContext)}
|
|
77577
77585
|
${getFileReferenceProofOfCompletionExample()}
|
|
77578
77586
|
<evidence the goal was met — list every file you (or the builder) modified>
|
|
77579
77587
|
|
|
77580
77588
|
## Backlog Tasks Implemented
|
|
77589
|
+
<!-- REQUIRED. List backlog items addressed, or write "Not Applicable" if none were in scope. Do not omit this section. -->
|
|
77581
77590
|
- \`backlog-item-id\` — <backlog item title/summary and how this work addresses it>
|
|
77582
|
-
<Omit if no backlog items were in scope.>
|
|
77583
77591
|
|
|
77584
77592
|
## Backlog Pending User Review Confirmation
|
|
77585
|
-
|
|
77593
|
+
<!-- REQUIRED. Complete the attestation, or write "Not Applicable" if no backlog items apply. Do not omit this section. -->
|
|
77594
|
+
- [ ] I confirm that every backlog item implemented in this work has been moved to \`pending_user_review\` via \`chatroom backlog mark-for-review\` after the feature was verified end-to-end and a PR was raised for user review
|
|
77586
77595
|
- PR URL(s): <link to PR(s)>
|
|
77587
|
-
|
|
77596
|
+
|
|
77597
|
+
## Code Change Verification
|
|
77598
|
+
${CODE_CHANGE_VERIFICATION_CONFIRMATION}
|
|
77599
|
+
</handoff-proofs>
|
|
77600
|
+
|
|
77601
|
+
<handoff-direction>
|
|
77602
|
+
## What exists today
|
|
77603
|
+
<!-- REQUIRED. Describe current state after this work, or write "Not Applicable". Do not omit this section. -->
|
|
77604
|
+
<current state after this work — what the user can now do, what is in place, how the system behaves>
|
|
77588
77605
|
|
|
77589
77606
|
## Key Technical Decisions
|
|
77607
|
+
<!-- REQUIRED. List decisions, or write "Not Applicable". Do not omit this section. -->
|
|
77590
77608
|
- <schema design, modules, interfaces, domain entities — what you chose and why>
|
|
77591
77609
|
|
|
77592
77610
|
## Key Tradeoffs
|
|
77611
|
+
<!-- REQUIRED. List tradeoffs, or write "Not Applicable". Do not omit this section. -->
|
|
77593
77612
|
- <what was weighed against what, and why you chose this path>
|
|
77594
77613
|
|
|
77595
|
-
## Tech Debt Observed
|
|
77596
|
-
- <issues noticed but intentionally left out of scope of this change>
|
|
77597
|
-
|
|
77598
77614
|
## System Design
|
|
77599
|
-
|
|
77615
|
+
<!-- REQUIRED. Include a mermaid diagram when the change has non-trivial structure, or write "Not Applicable". Do not omit this section. -->
|
|
77600
77616
|
|
|
77601
77617
|
\`\`\`mermaid
|
|
77602
77618
|
flowchart TD
|
|
77603
77619
|
A[Component] --> B[Component]
|
|
77604
77620
|
\`\`\`
|
|
77621
|
+
</handoff-direction>
|
|
77605
77622
|
|
|
77606
|
-
|
|
77607
|
-
|
|
77623
|
+
<handoff-notes>
|
|
77624
|
+
## Notes
|
|
77625
|
+
<!-- REQUIRED. Write notes, or "Not Applicable" if none. Do not omit this section. -->
|
|
77626
|
+
<anything the user should know — context, caveats, or observations not covered above>
|
|
77627
|
+
</handoff-notes>
|
|
77628
|
+
|
|
77629
|
+
<handoff-action>
|
|
77630
|
+
## Tech Debt Observed
|
|
77631
|
+
<!-- REQUIRED. List tech debt, or write "Not Applicable". Do not omit this section. -->
|
|
77632
|
+
- <issues noticed but intentionally left out of scope of this change>
|
|
77608
77633
|
|
|
77609
77634
|
${getUnresolvedDecisionsSectionBlock()}
|
|
77610
77635
|
|
|
77611
|
-
##
|
|
77612
|
-
|
|
77613
|
-
|
|
77636
|
+
## Manual steps
|
|
77637
|
+
<!-- REQUIRED. List manual steps outside the system, or write "Not Applicable". Do not omit this section. -->
|
|
77638
|
+
<steps the user must take outside the system — deploy, configure credentials, run commands, verify in production, etc.>
|
|
77639
|
+
</handoff-action>`;
|
|
77614
77640
|
}
|
|
77615
|
-
var
|
|
77641
|
+
var init_handoff_report_template_body = __esm(() => {
|
|
77616
77642
|
init_context_disclosure();
|
|
77617
77643
|
init_handoff_quality_principles();
|
|
77618
77644
|
init_role_guidance_disclosure();
|
|
77619
77645
|
});
|
|
77620
77646
|
|
|
77647
|
+
// ../../services/backend/prompts/teams/duo/handoff-templates/planner-to-user.ts
|
|
77648
|
+
function getPlannerToUserReportTemplate(roleGuidanceContext) {
|
|
77649
|
+
return `${getHandoffRecipientVisibilityCallout("user")}
|
|
77650
|
+
|
|
77651
|
+
${getHandoffReportTemplateIntro("Report Template (Planner → User)")}
|
|
77652
|
+
|
|
77653
|
+
\`\`\`markdown
|
|
77654
|
+
${getHandoffReportTemplateBody(roleGuidanceContext)}
|
|
77655
|
+
\`\`\``;
|
|
77656
|
+
}
|
|
77657
|
+
var init_planner_to_user = __esm(() => {
|
|
77658
|
+
init_handoff_report_template_body();
|
|
77659
|
+
});
|
|
77660
|
+
|
|
77621
77661
|
// ../../services/backend/prompts/teams/duo/handoff-templates/index.ts
|
|
77622
77662
|
function getDuoHandoffTemplate(query) {
|
|
77623
77663
|
const getter = DUO_HANDOFF_TEMPLATES[`${query.fromRole.toLowerCase()}:${query.toRole.toLowerCase()}`];
|
|
@@ -77654,70 +77694,11 @@ function getSoloToUserReportTemplate(roleGuidanceContext) {
|
|
|
77654
77694
|
${getHandoffReportTemplateIntro("Report Template (Solo → User)")}
|
|
77655
77695
|
|
|
77656
77696
|
\`\`\`markdown
|
|
77657
|
-
|
|
77658
|
-
<what was accomplished, in plain terms — no references to prior messages>
|
|
77659
|
-
|
|
77660
|
-
## Template Disclosure Confirmation
|
|
77661
|
-
- [ ] I confirm that I have seen this template at the start of any planning, before implementing any code for this task
|
|
77662
|
-
${getRoleGuidanceDisclosureBlock(roleGuidanceContext)}
|
|
77663
|
-
|
|
77664
|
-
## Proof of Planning
|
|
77665
|
-
<!-- Demonstrate the goal was decomposed into actionable steps with clear outcomes before implementation. -->
|
|
77666
|
-
- <step 1: concrete artifact or outcome>
|
|
77667
|
-
- <step 2: concrete artifact or outcome>
|
|
77668
|
-
<Omit for trivial single-step tasks.>
|
|
77669
|
-
|
|
77670
|
-
## What changed
|
|
77671
|
-
<high-level view of what changed since the user's message before the detailed proofs below>
|
|
77672
|
-
|
|
77673
|
-
${PROOF_OF_PRINCIPLES_HEADING_H3}
|
|
77674
|
-
${getHandoffQualityPrinciplesCommentBlock()}
|
|
77675
|
-
<how this work follows the principles above — localized changes, readable structure, correctness provable from source then tests>
|
|
77676
|
-
|
|
77677
|
-
### Proof of Completion
|
|
77678
|
-
${getContextReadDisclosureBlock(roleGuidanceContext)}
|
|
77679
|
-
${getFileReferenceProofOfCompletionExample()}
|
|
77680
|
-
<evidence the goal was met — list every file you modified>
|
|
77681
|
-
|
|
77682
|
-
## Backlog Tasks Implemented
|
|
77683
|
-
- \`backlog-item-id\` — <backlog item title/summary and how this work addresses it>
|
|
77684
|
-
<Omit if no backlog items were in scope.>
|
|
77685
|
-
|
|
77686
|
-
## Backlog Pending User Review Confirmation
|
|
77687
|
-
- [ ] 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
|
|
77688
|
-
- PR URL(s): <link to PR(s)>
|
|
77689
|
-
<Omit this section if no backlog items apply.>
|
|
77690
|
-
|
|
77691
|
-
## Key Technical Decisions
|
|
77692
|
-
- <schema design, modules, interfaces, domain entities — what you chose and why>
|
|
77693
|
-
|
|
77694
|
-
## Key Tradeoffs
|
|
77695
|
-
- <what was weighed against what, and why you chose this path>
|
|
77696
|
-
|
|
77697
|
-
## Tech Debt Observed
|
|
77698
|
-
- <issues noticed but intentionally left out of scope of this change>
|
|
77699
|
-
|
|
77700
|
-
## System Design
|
|
77701
|
-
<include a mermaid diagram when the change has non-trivial structure; omit for trivial changes>
|
|
77702
|
-
|
|
77703
|
-
\`\`\`mermaid
|
|
77704
|
-
flowchart TD
|
|
77705
|
-
A[Component] --> B[Component]
|
|
77706
|
-
\`\`\`
|
|
77707
|
-
|
|
77708
|
-
## Code Change Verification
|
|
77709
|
-
${CODE_CHANGE_VERIFICATION_CONFIRMATION}
|
|
77710
|
-
|
|
77711
|
-
${getUnresolvedDecisionsSectionBlock()}
|
|
77712
|
-
|
|
77713
|
-
## Notes
|
|
77714
|
-
<anything the user should know — context, caveats, or observations not covered above. Omit if none.>
|
|
77697
|
+
${getHandoffReportTemplateBody(roleGuidanceContext)}
|
|
77715
77698
|
\`\`\``;
|
|
77716
77699
|
}
|
|
77717
77700
|
var init_solo_to_user = __esm(() => {
|
|
77718
|
-
|
|
77719
|
-
init_handoff_quality_principles();
|
|
77720
|
-
init_role_guidance_disclosure();
|
|
77701
|
+
init_handoff_report_template_body();
|
|
77721
77702
|
});
|
|
77722
77703
|
|
|
77723
77704
|
// ../../services/backend/prompts/teams/solo/handoff-templates/index.ts
|
|
@@ -78808,6 +78789,10 @@ ${getBuilderFlowMermaid(nativeIntegration, codeChangesTarget, questionTarget)}
|
|
|
78808
78789
|
- Follow established patterns and best practices from the codebase
|
|
78809
78790
|
- Handle edge cases and error scenarios
|
|
78810
78791
|
- Commit work with descriptive, atomic commit messages
|
|
78792
|
+
|
|
78793
|
+
**Completion gates (before PR or handoff):**
|
|
78794
|
+
- All **(Required)** files done; **verified end-to-end** (user-facing entry point works: CLI command runnable, API reachable, or UI action functional)
|
|
78795
|
+
- If blocked → ## Blockers / questions to planner. No PR or \`mark-for-review\` until gates pass — unless the user explicitly requested a draft or incremental PR
|
|
78811
78796
|
`;
|
|
78812
78797
|
}
|
|
78813
78798
|
var init_builder = () => {};
|
|
@@ -78879,13 +78864,14 @@ flowchart TD
|
|
|
78879
78864
|
- **Spell out what to avoid** — anti-patterns and recurring mistakes you have seen from builders on similar work (scope creep, wrong abstractions, forbidden refactors).
|
|
78880
78865
|
- **One slice ≈ one focused review surface.** If you can't imagine reviewing it in one sitting, split it.
|
|
78881
78866
|
- **Order by dependency**, not by team convention. A slice should be runnable/testable when its dependencies are done.
|
|
78867
|
+
- **A slice is shippable only when verified end-to-end** — infra/helper files alone are not a complete slice.
|
|
78882
78868
|
- **Skip phases that don't apply** (e.g., no frontend for a backend-only change, no schema for a pure refactor).
|
|
78883
78869
|
|
|
78884
78870
|
**Code review:** For code-producing work, review before delivering. Activate the review framework with: ${cmd("skill activate code-review")}.
|
|
78885
78871
|
|
|
78886
78872
|
**Backlog items:** When the task originates from a backlog item, activate the backlog skill: ${cmd("skill activate backlog")}.
|
|
78887
78873
|
|
|
78888
|
-
**If stuck:** After 2 failed rework attempts →
|
|
78874
|
+
**If stuck:** After 2 failed rework attempts → replan or hand back to planner as blocked. No partial PR, \`mark-for-review\`, or user delivery.
|
|
78889
78875
|
|
|
78890
78876
|
**Review loop:**
|
|
78891
78877
|
- Review completed work before moving to the next slice.
|
|
@@ -78929,7 +78915,7 @@ var init_handoff_rules = () => {};
|
|
|
78929
78915
|
|
|
78930
78916
|
// ../../services/backend/prompts/cli/sections/when-work-comes-back.ts
|
|
78931
78917
|
function getWhenWorkComesBackSection(config3) {
|
|
78932
|
-
const reworkLine = config3.hasBuilder ? "3. If requirements are NOT met → hand back to `builder` for rework" : "3. If requirements are NOT met
|
|
78918
|
+
const reworkLine = config3.hasBuilder ? "3. If requirements are NOT met (including partial work) → hand back to `builder` for rework" : "3. If requirements are NOT met (including partial work) → revise and re-validate";
|
|
78933
78919
|
return `**When you receive work back from team members:**
|
|
78934
78920
|
1. Review the completed work against the original user request
|
|
78935
78921
|
2. If requirements are met → deliver to \`user\`
|
|
@@ -82330,7 +82316,7 @@ function renderBacklogAttachments(items, ctx) {
|
|
|
82330
82316
|
for (const item of items) {
|
|
82331
82317
|
lines.push(` <attachment type="backlog" backlog-item-id="${escapeXmlAttribute(item._id)}">`);
|
|
82332
82318
|
lines.push(...xmlTextElement("content", item.content, " "));
|
|
82333
|
-
lines.push(` <hint>Work on this item.
|
|
82319
|
+
lines.push(` <hint>Work on this item. Verified end-to-end + PR ready: chatroom backlog mark-for-review --chatroom-id="${escapeXmlAttribute(ctx.chatroomId)}" --role="${escapeXmlAttribute(ctx.role)}" --backlog-item-id=${item._id}</hint>`);
|
|
82334
82320
|
lines.push(` </attachment>`);
|
|
82335
82321
|
}
|
|
82336
82322
|
return lines;
|
|
@@ -82436,7 +82422,7 @@ function renderContextSection(input, chatroomId, role) {
|
|
|
82436
82422
|
"</context>"
|
|
82437
82423
|
];
|
|
82438
82424
|
if (ctx.triggerMessageContent) {
|
|
82439
|
-
lines.push(`(
|
|
82425
|
+
lines.push(`(Trigger: chatroom context read --chatroom-id="${chatroomId}" --role="${role}")`);
|
|
82440
82426
|
}
|
|
82441
82427
|
lines.push(...renderStalenessNotice(ctx.elapsedHours));
|
|
82442
82428
|
return lines;
|
|
@@ -82448,7 +82434,7 @@ function renderTaskPrompt(input) {
|
|
|
82448
82434
|
lines.push(` Task ID: ${taskId}`);
|
|
82449
82435
|
lines.push(` Status: ${status3}`);
|
|
82450
82436
|
if (input.context) {
|
|
82451
|
-
lines.push("On conflict,
|
|
82437
|
+
lines.push("On conflict, message wins over background context.");
|
|
82452
82438
|
}
|
|
82453
82439
|
lines.push(...renderDivergenceWarnings(input));
|
|
82454
82440
|
lines.push(`
|
|
@@ -82745,14 +82731,58 @@ var init_skill = __esm(() => {
|
|
|
82745
82731
|
init_convex_error();
|
|
82746
82732
|
});
|
|
82747
82733
|
|
|
82734
|
+
// src/commands/messages/messages-fs-service.ts
|
|
82735
|
+
import * as nodeFs2 from "node:fs/promises";
|
|
82736
|
+
function buildMessageMarkdown(msg) {
|
|
82737
|
+
const ts = new Date(msg._creationTime).toISOString();
|
|
82738
|
+
const parts2 = [];
|
|
82739
|
+
parts2.push("---");
|
|
82740
|
+
parts2.push(`id: ${msg._id}`);
|
|
82741
|
+
parts2.push(`createdAt: ${ts}`);
|
|
82742
|
+
parts2.push(`senderRole: ${msg.senderRole}`);
|
|
82743
|
+
parts2.push(`type: ${msg.type}`);
|
|
82744
|
+
if (msg.targetRole)
|
|
82745
|
+
parts2.push(`targetRole: ${msg.targetRole}`);
|
|
82746
|
+
if (msg.classification)
|
|
82747
|
+
parts2.push(`classification: ${msg.classification}`);
|
|
82748
|
+
if (msg.taskStatus)
|
|
82749
|
+
parts2.push(`taskStatus: ${msg.taskStatus}`);
|
|
82750
|
+
if (msg.featureTitle)
|
|
82751
|
+
parts2.push(`featureTitle: ${msg.featureTitle}`);
|
|
82752
|
+
parts2.push("---");
|
|
82753
|
+
parts2.push("");
|
|
82754
|
+
parts2.push(msg.content);
|
|
82755
|
+
return parts2.join(`
|
|
82756
|
+
`);
|
|
82757
|
+
}
|
|
82758
|
+
var MessagesFsService, MessagesFsServiceLive;
|
|
82759
|
+
var init_messages_fs_service = __esm(() => {
|
|
82760
|
+
init_esm();
|
|
82761
|
+
MessagesFsService = class MessagesFsService extends exports_Context.Tag("MessagesFsService")() {
|
|
82762
|
+
};
|
|
82763
|
+
MessagesFsServiceLive = exports_Layer.succeed(MessagesFsService, {
|
|
82764
|
+
writeFile: (path3, data) => exports_Effect.tryPromise({
|
|
82765
|
+
try: () => nodeFs2.writeFile(path3, data, "utf-8"),
|
|
82766
|
+
catch: (e) => e instanceof Error ? e : new Error(String(e))
|
|
82767
|
+
}),
|
|
82768
|
+
mkdir: (path3, opts) => exports_Effect.tryPromise({
|
|
82769
|
+
try: () => nodeFs2.mkdir(path3, opts),
|
|
82770
|
+
catch: (e) => e instanceof Error ? e : new Error(String(e))
|
|
82771
|
+
})
|
|
82772
|
+
});
|
|
82773
|
+
});
|
|
82774
|
+
|
|
82748
82775
|
// src/commands/messages/index.ts
|
|
82749
82776
|
var exports_messages = {};
|
|
82750
82777
|
__export(exports_messages, {
|
|
82751
82778
|
listSinceMessageEffect: () => listSinceMessageEffect,
|
|
82752
82779
|
listSinceMessage: () => listSinceMessage,
|
|
82753
82780
|
listBySenderRoleEffect: () => listBySenderRoleEffect,
|
|
82754
|
-
listBySenderRole: () => listBySenderRole
|
|
82781
|
+
listBySenderRole: () => listBySenderRole,
|
|
82782
|
+
exportMessagesEffect: () => exportMessagesEffect,
|
|
82783
|
+
exportMessages: () => exportMessages
|
|
82755
82784
|
});
|
|
82785
|
+
import * as nodePath2 from "node:path";
|
|
82756
82786
|
async function createDefaultDeps14() {
|
|
82757
82787
|
const client4 = await getConvexClient();
|
|
82758
82788
|
return {
|
|
@@ -82823,6 +82853,20 @@ async function listSinceMessage(chatroomId, options, deps) {
|
|
|
82823
82853
|
const layer = commandServicesLayerFromDeps(d);
|
|
82824
82854
|
await exports_Effect.runPromise(listSinceMessageEffect(chatroomId, options).pipe(exports_Effect.catchAll((err) => handleMessagesError(err)), exports_Effect.provide(layer)));
|
|
82825
82855
|
}
|
|
82856
|
+
async function exportMessages(chatroomId, options, deps) {
|
|
82857
|
+
const d = deps ?? await createDefaultDeps14();
|
|
82858
|
+
const layer = commandServicesLayerFromDeps(d);
|
|
82859
|
+
await exports_Effect.runPromise(exportMessagesEffect(chatroomId, options).pipe(exports_Effect.catchAll((err) => {
|
|
82860
|
+
if ("_tag" in err) {
|
|
82861
|
+
return handleMessagesError(err);
|
|
82862
|
+
}
|
|
82863
|
+
return exports_Effect.sync(() => {
|
|
82864
|
+
console.error(`
|
|
82865
|
+
❌ Export failed: ${err.message}`);
|
|
82866
|
+
process.exit(1);
|
|
82867
|
+
});
|
|
82868
|
+
}), exports_Effect.provide(exports_Layer.mergeAll(layer, MessagesFsServiceLive))));
|
|
82869
|
+
}
|
|
82826
82870
|
var listBySenderRoleEffect = (chatroomId, options) => exports_Effect.gen(function* () {
|
|
82827
82871
|
const backend2 = yield* BackendService;
|
|
82828
82872
|
const sessionId = yield* requireSessionIdEffect((a) => ({
|
|
@@ -82913,9 +82957,59 @@ ${roleIndicator} ${message.senderRole}${message.targetRole ? ` → ${message.tar
|
|
|
82913
82957
|
` + "─".repeat(60));
|
|
82914
82958
|
console.log(`\uD83D\uDCA1 Use --full to see complete message content`);
|
|
82915
82959
|
});
|
|
82960
|
+
}), exportMessagesEffect = (chatroomId, options) => exports_Effect.gen(function* () {
|
|
82961
|
+
const backend2 = yield* BackendService;
|
|
82962
|
+
const fs11 = yield* MessagesFsService;
|
|
82963
|
+
const sessionId = yield* requireSessionIdEffect((a) => ({
|
|
82964
|
+
_tag: "NotAuthenticated",
|
|
82965
|
+
convexUrl: a.convexUrl,
|
|
82966
|
+
otherUrls: a.otherUrls
|
|
82967
|
+
}));
|
|
82968
|
+
yield* validateChatroomIdEffect(chatroomId, (id3) => ({
|
|
82969
|
+
_tag: "InvalidChatroomId",
|
|
82970
|
+
id: id3
|
|
82971
|
+
}));
|
|
82972
|
+
const messagesResult = yield* exports_Effect.either(backend2.query(api.messages.listBySenderRole, {
|
|
82973
|
+
sessionId,
|
|
82974
|
+
chatroomId,
|
|
82975
|
+
senderRole: options.senderRole || "planner",
|
|
82976
|
+
limit: options.limit
|
|
82977
|
+
}));
|
|
82978
|
+
if (messagesResult._tag === "Left") {
|
|
82979
|
+
return yield* exports_Effect.fail({
|
|
82980
|
+
_tag: "QueryFailed",
|
|
82981
|
+
cause: messagesResult.left
|
|
82982
|
+
});
|
|
82983
|
+
}
|
|
82984
|
+
const messages = messagesResult.right;
|
|
82985
|
+
if (messages.length === 0) {
|
|
82986
|
+
yield* exports_Effect.sync(() => console.log("No messages to export."));
|
|
82987
|
+
return;
|
|
82988
|
+
}
|
|
82989
|
+
const dir = options.exportPath || `.chatroom/exports/messages/${chatroomId}`;
|
|
82990
|
+
yield* fs11.mkdir(dir, { recursive: true });
|
|
82991
|
+
const manifest = [];
|
|
82992
|
+
for (const msg of messages) {
|
|
82993
|
+
const filename = `${msg._creationTime}-${msg.senderRole}-${msg._id.slice(0, 8)}.md`;
|
|
82994
|
+
const markdown = buildMessageMarkdown(msg);
|
|
82995
|
+
yield* fs11.writeFile(nodePath2.join(dir, filename), markdown);
|
|
82996
|
+
manifest.push({
|
|
82997
|
+
id: msg._id,
|
|
82998
|
+
senderRole: msg.senderRole,
|
|
82999
|
+
createdAt: msg._creationTime,
|
|
83000
|
+
filename
|
|
83001
|
+
});
|
|
83002
|
+
}
|
|
83003
|
+
yield* fs11.writeFile(nodePath2.join(dir, "manifest.json"), JSON.stringify(manifest, null, 2));
|
|
83004
|
+
yield* exports_Effect.sync(() => {
|
|
83005
|
+
console.log(`
|
|
83006
|
+
\uD83D\uDCE8 Exported ${messages.length} messages to ${dir}`);
|
|
83007
|
+
console.log(` Manifest: ${dir}/manifest.json`);
|
|
83008
|
+
});
|
|
82916
83009
|
});
|
|
82917
83010
|
var init_messages = __esm(() => {
|
|
82918
83011
|
init_esm();
|
|
83012
|
+
init_messages_fs_service();
|
|
82919
83013
|
init_api3();
|
|
82920
83014
|
init_storage();
|
|
82921
83015
|
init_client2();
|
|
@@ -99678,17 +99772,17 @@ import {
|
|
|
99678
99772
|
writeFileSync as writeFileSync3
|
|
99679
99773
|
} from "node:fs";
|
|
99680
99774
|
import { homedir as homedir5 } from "node:os";
|
|
99681
|
-
import { join as
|
|
99775
|
+
import { join as join16 } from "node:path";
|
|
99682
99776
|
function getUrlHash() {
|
|
99683
99777
|
const url3 = getConvexUrl();
|
|
99684
99778
|
return createHash2("sha256").update(url3).digest("hex").substring(0, 8);
|
|
99685
99779
|
}
|
|
99686
99780
|
function getChildPidsFilePath() {
|
|
99687
|
-
const dir =
|
|
99688
|
-
return
|
|
99781
|
+
const dir = join16(homedir5(), ".chatroom");
|
|
99782
|
+
return join16(dir, `daemon-children-${getUrlHash()}.pids`);
|
|
99689
99783
|
}
|
|
99690
99784
|
function ensureChatroomDir2() {
|
|
99691
|
-
const dir =
|
|
99785
|
+
const dir = join16(homedir5(), ".chatroom");
|
|
99692
99786
|
if (!existsSync5(dir)) {
|
|
99693
99787
|
mkdirSync4(dir, { recursive: true, mode: 448 });
|
|
99694
99788
|
}
|
|
@@ -100018,9 +100112,9 @@ var init_log_observer_sync = __esm(() => {
|
|
|
100018
100112
|
});
|
|
100019
100113
|
|
|
100020
100114
|
// src/commands/machine/daemon-start/handlers/process/output-store.ts
|
|
100021
|
-
import { appendFile as appendFile2, mkdir as
|
|
100115
|
+
import { appendFile as appendFile2, mkdir as mkdir8, readFile as readFile6, rm } from "node:fs/promises";
|
|
100022
100116
|
import { tmpdir } from "node:os";
|
|
100023
|
-
import { join as
|
|
100117
|
+
import { join as join17 } from "node:path";
|
|
100024
100118
|
|
|
100025
100119
|
class TempFileOutputStore {
|
|
100026
100120
|
state;
|
|
@@ -100083,11 +100177,11 @@ function createOutputStore(runId) {
|
|
|
100083
100177
|
if (!RUN_ID_RE.test(runId)) {
|
|
100084
100178
|
throw new Error(`Invalid runId: ${runId}`);
|
|
100085
100179
|
}
|
|
100086
|
-
const filePath =
|
|
100180
|
+
const filePath = join17(TEMP_DIR, `${runId}.log`);
|
|
100087
100181
|
return new TempFileOutputStore(filePath);
|
|
100088
100182
|
}
|
|
100089
100183
|
async function ensureTempDir() {
|
|
100090
|
-
await
|
|
100184
|
+
await mkdir8(TEMP_DIR, { recursive: true });
|
|
100091
100185
|
}
|
|
100092
100186
|
async function cleanOrphanTempFiles() {
|
|
100093
100187
|
try {
|
|
@@ -100097,7 +100191,7 @@ async function cleanOrphanTempFiles() {
|
|
|
100097
100191
|
var TAIL_WINDOW_BYTES, TEMP_DIR, RUN_ID_RE, MAX_TAIL_LINES_V2 = 50;
|
|
100098
100192
|
var init_output_store = __esm(() => {
|
|
100099
100193
|
TAIL_WINDOW_BYTES = 32 * 1024;
|
|
100100
|
-
TEMP_DIR =
|
|
100194
|
+
TEMP_DIR = join17(tmpdir(), "chatroom-cli", "runs");
|
|
100101
100195
|
RUN_ID_RE = /^[a-z0-9]+$/i;
|
|
100102
100196
|
});
|
|
100103
100197
|
|
|
@@ -100788,7 +100882,7 @@ var init_pick_folder = () => {};
|
|
|
100788
100882
|
import { createHash as createHash3 } from "node:crypto";
|
|
100789
100883
|
import { existsSync as existsSync6, readFileSync as readFileSync8, writeFileSync as writeFileSync4, unlinkSync as unlinkSync2, mkdirSync as mkdirSync5 } from "node:fs";
|
|
100790
100884
|
import { homedir as homedir6 } from "node:os";
|
|
100791
|
-
import { join as
|
|
100885
|
+
import { join as join18 } from "node:path";
|
|
100792
100886
|
function getUrlHash2() {
|
|
100793
100887
|
const url3 = getConvexUrl();
|
|
100794
100888
|
return createHash3("sha256").update(url3).digest("hex").substring(0, 8);
|
|
@@ -100802,7 +100896,7 @@ function ensureChatroomDir3() {
|
|
|
100802
100896
|
}
|
|
100803
100897
|
}
|
|
100804
100898
|
function getPidFilePath() {
|
|
100805
|
-
return
|
|
100899
|
+
return join18(CHATROOM_DIR4, getPidFileName());
|
|
100806
100900
|
}
|
|
100807
100901
|
function isProcessRunning(pid) {
|
|
100808
100902
|
try {
|
|
@@ -100899,7 +100993,7 @@ function releaseLock() {
|
|
|
100899
100993
|
var CHATROOM_DIR4, LOCK_RETRY_INTERVAL_MS = 500, LOCK_RETRY_MAX_WAIT_MS = 15000;
|
|
100900
100994
|
var init_pid = __esm(() => {
|
|
100901
100995
|
init_client2();
|
|
100902
|
-
CHATROOM_DIR4 =
|
|
100996
|
+
CHATROOM_DIR4 = join18(homedir6(), ".chatroom");
|
|
100903
100997
|
});
|
|
100904
100998
|
|
|
100905
100999
|
// src/infrastructure/harnesses/claude-sdk/claude-session.ts
|
|
@@ -107548,7 +107642,7 @@ function diffPathIndexes(previous, next4) {
|
|
|
107548
107642
|
import { createHash as createHash6, randomUUID as randomUUID8 } from "node:crypto";
|
|
107549
107643
|
import * as fs11 from "node:fs/promises";
|
|
107550
107644
|
import { homedir as homedir7 } from "node:os";
|
|
107551
|
-
import { join as
|
|
107645
|
+
import { join as join21 } from "node:path";
|
|
107552
107646
|
function workspaceKeyFor(workingDir) {
|
|
107553
107647
|
const normalized = normalizeWorkingDirForLookup(workingDir);
|
|
107554
107648
|
return createHash6("sha256").update(normalized).digest("hex").slice(0, 16);
|
|
@@ -107562,10 +107656,10 @@ function buildPathIndex(entries2) {
|
|
|
107562
107656
|
}
|
|
107563
107657
|
function manifestPath(machineId, workingDir) {
|
|
107564
107658
|
const key = workspaceKeyFor(workingDir);
|
|
107565
|
-
return
|
|
107659
|
+
return join21(SYNC_STATE_DIR, machineId, key, "manifest.json");
|
|
107566
107660
|
}
|
|
107567
107661
|
async function ensureDir(filePath) {
|
|
107568
|
-
await fs11.mkdir(
|
|
107662
|
+
await fs11.mkdir(join21(filePath, ".."), { recursive: true, mode: 448 });
|
|
107569
107663
|
}
|
|
107570
107664
|
async function loadWorkspaceSyncManifest(machineId, workingDir) {
|
|
107571
107665
|
try {
|
|
@@ -107625,7 +107719,7 @@ function entriesFromPathIndex(paths) {
|
|
|
107625
107719
|
}
|
|
107626
107720
|
var SYNC_STATE_VERSION = "2", SYNC_STATE_DIR;
|
|
107627
107721
|
var init_workspace_sync_state = __esm(() => {
|
|
107628
|
-
SYNC_STATE_DIR =
|
|
107722
|
+
SYNC_STATE_DIR = join21(homedir7(), ".chatroom", "sync-state");
|
|
107629
107723
|
});
|
|
107630
107724
|
|
|
107631
107725
|
// src/infrastructure/services/workspace/workspace-file-tree-coordinator.ts
|
|
@@ -108100,7 +108194,7 @@ function unsupportedFileWriteOperationMessage(operation) {
|
|
|
108100
108194
|
}
|
|
108101
108195
|
|
|
108102
108196
|
// src/commands/machine/daemon-start/file-write-fulfillment.ts
|
|
108103
|
-
import { access as access4, mkdir as
|
|
108197
|
+
import { access as access4, mkdir as mkdir10, rename as rename4, rm as rm3, writeFile as writeFile9 } from "node:fs/promises";
|
|
108104
108198
|
import { dirname as dirname11 } from "node:path";
|
|
108105
108199
|
function isTerminalFileWriteError(errorMessage) {
|
|
108106
108200
|
const terminalMessages = new Set([
|
|
@@ -108153,9 +108247,9 @@ async function validateWriteOperation(operation, absolutePath) {
|
|
|
108153
108247
|
}
|
|
108154
108248
|
async function writePayloadToDisk(absolutePath, operation, content) {
|
|
108155
108249
|
if (operation === "create") {
|
|
108156
|
-
await
|
|
108250
|
+
await mkdir10(dirname11(absolutePath), { recursive: true });
|
|
108157
108251
|
}
|
|
108158
|
-
await
|
|
108252
|
+
await writeFile9(absolutePath, content);
|
|
108159
108253
|
}
|
|
108160
108254
|
async function fulfillOneFileWriteRequest(session2, request2) {
|
|
108161
108255
|
const startTime = Date.now();
|
|
@@ -108216,7 +108310,7 @@ async function fulfillOneFileWriteRequest(session2, request2) {
|
|
|
108216
108310
|
});
|
|
108217
108311
|
return;
|
|
108218
108312
|
}
|
|
108219
|
-
await
|
|
108313
|
+
await mkdir10(dirname11(targetResolved.absolutePath), { recursive: true });
|
|
108220
108314
|
await rename4(resolved.absolutePath, targetResolved.absolutePath);
|
|
108221
108315
|
await completeWriteRequest(session2, request2._id, { status: "done" });
|
|
108222
108316
|
const elapsed4 = Date.now() - startTime;
|
|
@@ -108232,7 +108326,7 @@ async function fulfillOneFileWriteRequest(session2, request2) {
|
|
|
108232
108326
|
});
|
|
108233
108327
|
return;
|
|
108234
108328
|
}
|
|
108235
|
-
await
|
|
108329
|
+
await mkdir10(resolved.absolutePath, { recursive: true });
|
|
108236
108330
|
await completeWriteRequest(session2, request2._id, { status: "done" });
|
|
108237
108331
|
const elapsed4 = Date.now() - startTime;
|
|
108238
108332
|
console.log(`[${formatTimestamp()}] ✏️ Directory mkdir fulfilled: ${filePath} (${elapsed4}ms)`);
|
|
@@ -112956,16 +113050,16 @@ var init_jsonc = __esm(() => {
|
|
|
112956
113050
|
|
|
112957
113051
|
// src/infrastructure/services/workspace/workspace-resolver.ts
|
|
112958
113052
|
import { readFile as readFile10, readdir as readdir3, stat as stat6 } from "node:fs/promises";
|
|
112959
|
-
import { join as
|
|
113053
|
+
import { join as join22, basename as basename4, resolve as resolve7 } from "node:path";
|
|
112960
113054
|
async function resolveGlobPatternStar(rootDir, cleaned) {
|
|
112961
|
-
const parentDir =
|
|
113055
|
+
const parentDir = join22(rootDir, cleaned.slice(0, -2));
|
|
112962
113056
|
try {
|
|
112963
113057
|
const entries2 = await readdir3(parentDir, { withFileTypes: true });
|
|
112964
113058
|
const dirs = [];
|
|
112965
113059
|
for (const entry of entries2) {
|
|
112966
113060
|
if (!entry.isDirectory())
|
|
112967
113061
|
continue;
|
|
112968
|
-
const dirPath =
|
|
113062
|
+
const dirPath = join22(parentDir, entry.name);
|
|
112969
113063
|
if (resolve7(dirPath).startsWith(resolve7(rootDir))) {
|
|
112970
113064
|
dirs.push(dirPath);
|
|
112971
113065
|
}
|
|
@@ -112976,7 +113070,7 @@ async function resolveGlobPatternStar(rootDir, cleaned) {
|
|
|
112976
113070
|
}
|
|
112977
113071
|
}
|
|
112978
113072
|
async function resolveLiteralPath(rootDir, cleaned) {
|
|
112979
|
-
const dir =
|
|
113073
|
+
const dir = join22(rootDir, cleaned);
|
|
112980
113074
|
try {
|
|
112981
113075
|
if (!resolve7(dir).startsWith(resolve7(rootDir)))
|
|
112982
113076
|
return [];
|
|
@@ -112996,7 +113090,7 @@ async function resolveGlobPattern(rootDir, pattern) {
|
|
|
112996
113090
|
}
|
|
112997
113091
|
async function readPackageJson(dir) {
|
|
112998
113092
|
try {
|
|
112999
|
-
const content = await readFile10(
|
|
113093
|
+
const content = await readFile10(join22(dir, "package.json"), "utf-8");
|
|
113000
113094
|
const pkg = JSON.parse(content);
|
|
113001
113095
|
return {
|
|
113002
113096
|
name: pkg.name || basename4(dir),
|
|
@@ -113008,7 +113102,7 @@ async function readPackageJson(dir) {
|
|
|
113008
113102
|
}
|
|
113009
113103
|
async function readPnpmWorkspacePatterns(rootDir) {
|
|
113010
113104
|
try {
|
|
113011
|
-
const content = await readFile10(
|
|
113105
|
+
const content = await readFile10(join22(rootDir, "pnpm-workspace.yaml"), "utf-8");
|
|
113012
113106
|
const patterns = [];
|
|
113013
113107
|
let inPackages = false;
|
|
113014
113108
|
for (const line of content.split(`
|
|
@@ -113035,7 +113129,7 @@ async function readPnpmWorkspacePatterns(rootDir) {
|
|
|
113035
113129
|
}
|
|
113036
113130
|
async function readPackageJsonWorkspacePatterns(rootDir) {
|
|
113037
113131
|
try {
|
|
113038
|
-
const content = await readFile10(
|
|
113132
|
+
const content = await readFile10(join22(rootDir, "package.json"), "utf-8");
|
|
113039
113133
|
const pkg = JSON.parse(content);
|
|
113040
113134
|
if (!pkg.workspaces)
|
|
113041
113135
|
return [];
|
|
@@ -113116,11 +113210,11 @@ var MAX_NAME_LENGTH = 256;
|
|
|
113116
113210
|
|
|
113117
113211
|
// src/infrastructure/services/workspace/command-discovery.ts
|
|
113118
113212
|
import { access as access5, readFile as readFile11 } from "node:fs/promises";
|
|
113119
|
-
import { join as
|
|
113213
|
+
import { join as join23, relative as relative4, basename as basename5 } from "node:path";
|
|
113120
113214
|
async function detectPackageManager(workingDir) {
|
|
113121
113215
|
for (const { file: file2, manager } of LOCKFILE_MAP) {
|
|
113122
113216
|
try {
|
|
113123
|
-
await access5(
|
|
113217
|
+
await access5(join23(workingDir, file2));
|
|
113124
113218
|
return manager;
|
|
113125
113219
|
} catch {}
|
|
113126
113220
|
}
|
|
@@ -113189,7 +113283,7 @@ function collectRootScriptCommands(scripts, pm, scriptPrefix, rootSw) {
|
|
|
113189
113283
|
}
|
|
113190
113284
|
async function readRootPackageJson(workingDir, pm, scriptPrefix) {
|
|
113191
113285
|
let rootPackageName = basename5(workingDir);
|
|
113192
|
-
const pkg = await readJsonFile(
|
|
113286
|
+
const pkg = await readJsonFile(join23(workingDir, "package.json"), "root package.json");
|
|
113193
113287
|
if (!pkg)
|
|
113194
113288
|
return { commands: [], rootPackageName };
|
|
113195
113289
|
if (pkg.name)
|
|
@@ -113205,7 +113299,7 @@ async function readRootPackageJson(workingDir, pm, scriptPrefix) {
|
|
|
113205
113299
|
}
|
|
113206
113300
|
async function readTurboJson(workingDir, _turboPrefix, _rootSubWorkspace) {
|
|
113207
113301
|
const turboTaskNames = [];
|
|
113208
|
-
const turbo = await readJsonFile(
|
|
113302
|
+
const turbo = await readJsonFile(join23(workingDir, "turbo.json"), "turbo.json");
|
|
113209
113303
|
if (!turbo?.tasks || typeof turbo.tasks !== "object")
|
|
113210
113304
|
return turboTaskNames;
|
|
113211
113305
|
for (const taskName of Object.keys(turbo.tasks)) {
|
|
@@ -113218,7 +113312,7 @@ async function readTurboJson(workingDir, _turboPrefix, _rootSubWorkspace) {
|
|
|
113218
113312
|
async function readDenoJson(workingDir) {
|
|
113219
113313
|
const commands = [];
|
|
113220
113314
|
for (const fileName of ["deno.json", "deno.jsonc"]) {
|
|
113221
|
-
const deno = await readJsonFile(
|
|
113315
|
+
const deno = await readJsonFile(join23(workingDir, fileName), fileName);
|
|
113222
113316
|
if (!deno?.tasks || typeof deno.tasks !== "object")
|
|
113223
113317
|
continue;
|
|
113224
113318
|
const pkgName = deno.name ?? basename5(workingDir);
|
|
@@ -113241,7 +113335,7 @@ async function readMakefile(workingDir) {
|
|
|
113241
113335
|
const commands = [];
|
|
113242
113336
|
for (const fileName of ["Makefile", "makefile"]) {
|
|
113243
113337
|
try {
|
|
113244
|
-
const content = await readFile11(
|
|
113338
|
+
const content = await readFile11(join23(workingDir, fileName), "utf-8");
|
|
113245
113339
|
const targets = parseMakefileTargets(content);
|
|
113246
113340
|
if (targets.length === 0)
|
|
113247
113341
|
continue;
|
|
@@ -116265,4 +116359,4 @@ program2.hook("preAction", async (_thisCommand, actionCommand) => {
|
|
|
116265
116359
|
});
|
|
116266
116360
|
program2.parse();
|
|
116267
116361
|
|
|
116268
|
-
//# debugId=
|
|
116362
|
+
//# debugId=139534CD91C868F464756E2164756E21
|