@telora/daemon 0.20.60 → 0.20.89

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.
Files changed (163) hide show
  1. package/build-info.json +4 -3
  2. package/dist/ai-inspection-context.d.ts.map +1 -1
  3. package/dist/ai-inspection-context.js +4 -2
  4. package/dist/ai-inspection-context.js.map +1 -1
  5. package/dist/audit-phase.d.ts +12 -18
  6. package/dist/audit-phase.d.ts.map +1 -1
  7. package/dist/audit-phase.js +17 -60
  8. package/dist/audit-phase.js.map +1 -1
  9. package/dist/audit-prompt.d.ts +44 -0
  10. package/dist/audit-prompt.d.ts.map +1 -0
  11. package/dist/audit-prompt.js +198 -0
  12. package/dist/audit-prompt.js.map +1 -0
  13. package/dist/ci-sensor-loop.d.ts +38 -1
  14. package/dist/ci-sensor-loop.d.ts.map +1 -1
  15. package/dist/ci-sensor-loop.js +49 -5
  16. package/dist/ci-sensor-loop.js.map +1 -1
  17. package/dist/completion/completion-decision.d.ts +3 -29
  18. package/dist/completion/completion-decision.d.ts.map +1 -1
  19. package/dist/completion/completion-decision.js +3 -15
  20. package/dist/completion/completion-decision.js.map +1 -1
  21. package/dist/completion/event-phases.d.ts +0 -8
  22. package/dist/completion/event-phases.d.ts.map +1 -1
  23. package/dist/completion/event-phases.js +4 -52
  24. package/dist/completion/event-phases.js.map +1 -1
  25. package/dist/completion/event.d.ts +1 -11
  26. package/dist/completion/event.d.ts.map +1 -1
  27. package/dist/completion/event.js +1 -3
  28. package/dist/completion/event.js.map +1 -1
  29. package/dist/delivery-artifacts.d.ts.map +1 -1
  30. package/dist/delivery-artifacts.js +9 -8
  31. package/dist/delivery-artifacts.js.map +1 -1
  32. package/dist/delivery-reconciler.d.ts +3 -0
  33. package/dist/delivery-reconciler.d.ts.map +1 -1
  34. package/dist/delivery-reconciler.js +16 -0
  35. package/dist/delivery-reconciler.js.map +1 -1
  36. package/dist/focus-engine.d.ts.map +1 -1
  37. package/dist/focus-engine.js +12 -1
  38. package/dist/focus-engine.js.map +1 -1
  39. package/dist/focus-executor.d.ts.map +1 -1
  40. package/dist/focus-executor.js +4 -1
  41. package/dist/focus-executor.js.map +1 -1
  42. package/dist/focus-merge.d.ts.map +1 -1
  43. package/dist/focus-merge.js +37 -3
  44. package/dist/focus-merge.js.map +1 -1
  45. package/dist/focus-stage-lifecycle/wedge-watchdog.d.ts.map +1 -1
  46. package/dist/focus-stage-lifecycle/wedge-watchdog.js +9 -1
  47. package/dist/focus-stage-lifecycle/wedge-watchdog.js.map +1 -1
  48. package/dist/listener-auto-advance.d.ts.map +1 -1
  49. package/dist/listener-auto-advance.js +58 -10
  50. package/dist/listener-auto-advance.js.map +1 -1
  51. package/dist/merge-back-loop.d.ts +8 -2
  52. package/dist/merge-back-loop.d.ts.map +1 -1
  53. package/dist/merge-back-loop.js +17 -11
  54. package/dist/merge-back-loop.js.map +1 -1
  55. package/dist/merge-failure-classify.d.ts +39 -0
  56. package/dist/merge-failure-classify.d.ts.map +1 -0
  57. package/dist/merge-failure-classify.js +58 -0
  58. package/dist/merge-failure-classify.js.map +1 -0
  59. package/dist/prompt-sections/execution-sections.d.ts +20 -14
  60. package/dist/prompt-sections/execution-sections.d.ts.map +1 -1
  61. package/dist/prompt-sections/execution-sections.js +97 -141
  62. package/dist/prompt-sections/execution-sections.js.map +1 -1
  63. package/dist/prompt-sections/scoping-sections.d.ts +30 -0
  64. package/dist/prompt-sections/scoping-sections.d.ts.map +1 -0
  65. package/dist/prompt-sections/scoping-sections.js +187 -0
  66. package/dist/prompt-sections/scoping-sections.js.map +1 -0
  67. package/dist/prompt-sections/shared.d.ts +7 -0
  68. package/dist/prompt-sections/shared.d.ts.map +1 -1
  69. package/dist/prompt-sections/shared.js.map +1 -1
  70. package/dist/queries/agent-resolvable-promotion.d.ts +87 -0
  71. package/dist/queries/agent-resolvable-promotion.d.ts.map +1 -0
  72. package/dist/queries/agent-resolvable-promotion.js +152 -0
  73. package/dist/queries/agent-resolvable-promotion.js.map +1 -0
  74. package/dist/queries/cause-key.d.ts +64 -0
  75. package/dist/queries/cause-key.d.ts.map +1 -0
  76. package/dist/queries/cause-key.js +79 -0
  77. package/dist/queries/cause-key.js.map +1 -0
  78. package/dist/queries/deliveries.d.ts +20 -153
  79. package/dist/queries/deliveries.d.ts.map +1 -1
  80. package/dist/queries/deliveries.js +26 -0
  81. package/dist/queries/deliveries.js.map +1 -1
  82. package/dist/queries/delivery-gate-state.d.ts +192 -0
  83. package/dist/queries/delivery-gate-state.d.ts.map +1 -0
  84. package/dist/queries/delivery-gate-state.js +23 -0
  85. package/dist/queries/delivery-gate-state.js.map +1 -0
  86. package/dist/queries/escalation-suppression.d.ts +89 -0
  87. package/dist/queries/escalation-suppression.d.ts.map +1 -0
  88. package/dist/queries/escalation-suppression.js +98 -0
  89. package/dist/queries/escalation-suppression.js.map +1 -0
  90. package/dist/queries/holds.d.ts +52 -59
  91. package/dist/queries/holds.d.ts.map +1 -1
  92. package/dist/queries/holds.js +60 -68
  93. package/dist/queries/holds.js.map +1 -1
  94. package/dist/queries/issues.d.ts +40 -2
  95. package/dist/queries/issues.d.ts.map +1 -1
  96. package/dist/queries/issues.js +55 -2
  97. package/dist/queries/issues.js.map +1 -1
  98. package/dist/queries/verification.d.ts +11 -0
  99. package/dist/queries/verification.d.ts.map +1 -1
  100. package/dist/queries/verification.js.map +1 -1
  101. package/dist/reality-pole.d.ts +5 -3
  102. package/dist/reality-pole.d.ts.map +1 -1
  103. package/dist/reality-pole.js +13 -4
  104. package/dist/reality-pole.js.map +1 -1
  105. package/dist/resolvers/git-diff-against-base.d.ts.map +1 -1
  106. package/dist/resolvers/git-diff-against-base.js +12 -5
  107. package/dist/resolvers/git-diff-against-base.js.map +1 -1
  108. package/dist/resolvers/index.d.ts +1 -1
  109. package/dist/resolvers/index.d.ts.map +1 -1
  110. package/dist/resolvers/index.js +1 -1
  111. package/dist/resolvers/index.js.map +1 -1
  112. package/dist/resolvers/shared/git-diff.d.ts +152 -10
  113. package/dist/resolvers/shared/git-diff.d.ts.map +1 -1
  114. package/dist/resolvers/shared/git-diff.js +292 -14
  115. package/dist/resolvers/shared/git-diff.js.map +1 -1
  116. package/dist/spawn/prompt-assembly.d.ts +3 -0
  117. package/dist/spawn/prompt-assembly.d.ts.map +1 -1
  118. package/dist/spawn/prompt-assembly.js +2 -1
  119. package/dist/spawn/prompt-assembly.js.map +1 -1
  120. package/dist/spawn/worktree-session.d.ts +2 -0
  121. package/dist/spawn/worktree-session.d.ts.map +1 -1
  122. package/dist/spawn/worktree-session.js +20 -1
  123. package/dist/spawn/worktree-session.js.map +1 -1
  124. package/dist/staleness-sensor.d.ts +24 -1
  125. package/dist/staleness-sensor.d.ts.map +1 -1
  126. package/dist/staleness-sensor.js +31 -4
  127. package/dist/staleness-sensor.js.map +1 -1
  128. package/dist/stall-detectors.d.ts +13 -9
  129. package/dist/stall-detectors.d.ts.map +1 -1
  130. package/dist/stall-detectors.js +14 -13
  131. package/dist/stall-detectors.js.map +1 -1
  132. package/dist/team-prompt-base.d.ts +1 -1
  133. package/dist/team-prompt-base.d.ts.map +1 -1
  134. package/dist/team-prompt-base.js +4 -2
  135. package/dist/team-prompt-base.js.map +1 -1
  136. package/dist/templates/claude-md.d.ts +1 -1
  137. package/dist/templates/claude-md.d.ts.map +1 -1
  138. package/dist/templates/claude-md.js +20 -0
  139. package/dist/templates/claude-md.js.map +1 -1
  140. package/dist/verification-default-on.d.ts.map +1 -1
  141. package/dist/verification-default-on.js +5 -0
  142. package/dist/verification-default-on.js.map +1 -1
  143. package/dist/verification-deps.d.ts +151 -0
  144. package/dist/verification-deps.d.ts.map +1 -0
  145. package/dist/verification-deps.js +19 -0
  146. package/dist/verification-deps.js.map +1 -0
  147. package/dist/verification-engine.d.ts +18 -112
  148. package/dist/verification-engine.d.ts.map +1 -1
  149. package/dist/verification-engine.js +90 -103
  150. package/dist/verification-engine.js.map +1 -1
  151. package/dist/verification-evidence.d.ts +106 -0
  152. package/dist/verification-evidence.d.ts.map +1 -0
  153. package/dist/verification-evidence.js +158 -0
  154. package/dist/verification-evidence.js.map +1 -0
  155. package/dist/verification-feedback.d.ts +31 -26
  156. package/dist/verification-feedback.d.ts.map +1 -1
  157. package/dist/verification-feedback.js +77 -76
  158. package/dist/verification-feedback.js.map +1 -1
  159. package/dist/verify-restatement.d.ts +12 -9
  160. package/dist/verify-restatement.d.ts.map +1 -1
  161. package/dist/verify-restatement.js +11 -9
  162. package/dist/verify-restatement.js.map +1 -1
  163. package/package.json +3 -3
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/resolvers/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;GAkBG;AAyFH;;;;;;;;;GASG;AACH,wBAAgB,aAAa,IAAI,MAAM,EAAE,CAgBxC;AAGD,OAAO,EACL,cAAc,EACd,UAAU,EACV,kBAAkB,EAClB,eAAe,EACf,eAAe,EACf,eAAe,EACf,gBAAgB,EAChB,oBAAoB,EACpB,uBAAuB,EACvB,wBAAwB,EACxB,eAAe,GAChB,MAAM,sBAAsB,CAAC;AAC9B,OAAO,EACL,qBAAqB,EACrB,qBAAqB,EACrB,8BAA8B,GAC/B,MAAM,0BAA0B,CAAC;AAClC,YAAY,EACV,cAAc,EACd,uBAAuB,EACvB,cAAc,EACd,cAAc,EACd,gBAAgB,EAChB,gBAAgB,GACjB,MAAM,0BAA0B,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/resolvers/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;GAkBG;AAyFH;;;;;;;;;GASG;AACH,wBAAgB,aAAa,IAAI,MAAM,EAAE,CAgBxC;AAGD,OAAO,EACL,cAAc,EACd,UAAU,EACV,kBAAkB,EAClB,eAAe,EACf,eAAe,EACf,eAAe,EACf,gBAAgB,EAChB,oBAAoB,EACpB,uBAAuB,EACvB,yBAAyB,EACzB,0BAA0B,EAC1B,gBAAgB,EAChB,wBAAwB,EACxB,yBAAyB,EACzB,yBAAyB,EACzB,iCAAiC,EACjC,6BAA6B,EAC7B,iBAAiB,EACjB,eAAe,EACf,mBAAmB,EACnB,uBAAuB,EACvB,oBAAoB,GACrB,MAAM,sBAAsB,CAAC;AAC9B,OAAO,EACL,qBAAqB,EACrB,qBAAqB,EACrB,8BAA8B,GAC/B,MAAM,0BAA0B,CAAC;AAClC,YAAY,EACV,cAAc,EACd,uBAAuB,EACvB,cAAc,EACd,cAAc,EACd,gBAAgB,EAChB,gBAAgB,GACjB,MAAM,0BAA0B,CAAC"}
@@ -125,6 +125,6 @@ export function initResolvers() {
125
125
  return keys;
126
126
  }
127
127
  // ── Shared public surface (re-exports for external consumers) ─────────
128
- export { MAX_DIFF_BYTES, getGitDiff, getDiffStatSummary, getChangedFiles, getCommitsAhead, getGitDiffRange, getDiffStatRange, getChangedFilesRange, findDeliveryMergeCommit, resolveDeliveryDiffRange, getDeliveryDiff, } from './shared/git-diff.js';
128
+ export { MAX_DIFF_BYTES, getGitDiff, getDiffStatSummary, getChangedFiles, getCommitsAhead, getGitDiffRange, getDiffStatRange, getChangedFilesRange, findDeliveryMergeCommit, resolveRecordedMergeRange, resolveRecordedCommitRange, listRangeCommits, resolveDeliveryDiffRange, resolveDeliveryDiffSource, getDeliveryDiffFromSource, getDeliveryChangedFilesFromSource, getDeliveryDiffStatFromSource, listSourceCommits, getDeliveryDiff, readDeliveryTrailer, filterCommitsByDelivery, DELIVERY_TRAILER_KEY, } from './shared/git-diff.js';
129
129
  export { CRT_DUMP_BUDGET_CHARS, renderRealityTreeDump, FOCUS_REALITY_TREE_EMPTY_STATE, } from './shared/reality-tree.js';
130
130
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/resolvers/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;GAkBG;AAEH,OAAO,EAAE,0BAA0B,EAAE,MAAM,uBAAuB,CAAC;AAEnE,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C;IACjC,mCAAmC;IACnC,0BAA0B;IAC1B,0BAA0B;IAC1B,oCAAoC;CACrC,CAAC;AAEF,IAAI,WAAW,GAAG,KAAK,CAAC;AAExB;;;;;;;;;GASG;AACH,MAAM,UAAU,aAAa;IAC3B,IAAI,CAAC,WAAW,EAAE,CAAC;QACjB,KAAK,MAAM,QAAQ,IAAI,kBAAkB,EAAE,CAAC;YAC1C,QAAQ,EAAE,CAAC;QACb,CAAC;QACD,WAAW,GAAG,IAAI,CAAC;IACrB,CAAC;IACD,MAAM,IAAI,GAAG,0BAA0B,EAAE,CAAC;IAC1C,IAAI,IAAI,CAAC,MAAM,KAAK,CAAC,EAAE,CAAC;QACtB,MAAM,IAAI,KAAK,CACb,2EAA2E;YAC3E,mEAAmE;YACnE,kEAAkE,CACnE,CAAC;IACJ,CAAC;IACD,OAAO,IAAI,CAAC;AACd,CAAC;AAED,yEAAyE;AACzE,OAAO,EACL,cAAc,EACd,UAAU,EACV,kBAAkB,EAClB,eAAe,EACf,eAAe,EACf,eAAe,EACf,gBAAgB,EAChB,oBAAoB,EACpB,uBAAuB,EACvB,yBAAyB,EACzB,0BAA0B,EAC1B,gBAAgB,EAChB,wBAAwB,EACxB,yBAAyB,EACzB,yBAAyB,EACzB,iCAAiC,EACjC,6BAA6B,EAC7B,iBAAiB,EACjB,eAAe,EACf,mBAAmB,EACnB,uBAAuB,EACvB,oBAAoB,GACrB,MAAM,sBAAsB,CAAC;AAC9B,OAAO,EACL,qBAAqB,EACrB,qBAAqB,EACrB,8BAA8B,GAC/B,MAAM,0BAA0B,CAAC"}
@@ -52,17 +52,159 @@ export declare function getCommitsAhead(worktreePath: string, baseBranch: string
52
52
  */
53
53
  export declare function findDeliveryMergeCommit(worktreePath: string, baseBranch: string): string | null;
54
54
  /**
55
- * Resolve the git range that contains a delivery's work, robust to the focus
56
- * branch having already merged into its base:
55
+ * Verify a commit sha exists locally AND is a real MERGE commit (>= 2 parents),
56
+ * and if so return the first-parent diff range that recovers its second-parent
57
+ * contribution (`<sha>^1...<sha>`).
57
58
  *
58
- * - branch AHEAD of base -> `base...HEAD` (historic behaviour,
59
- * byte-identical to the old getGitDiff)
60
- * - branch LEVEL/BEHIND after merge -> `<merge>^1...<merge>` (recovered from
61
- * the merge commit that brought it in)
62
- * - no attributable commits -> null (caller yields empty; the
63
- * instrument-fault path handles it)
64
- */
65
- export declare function resolveDeliveryDiffRange(worktreePath: string, baseBranch: string): string | null;
59
+ * Returns null when the sha is empty, malformed, not present in the repo (e.g.
60
+ * not yet fetched), OR has fewer than two parents. That last guard is
61
+ * load-bearing: the recorded merge_commit_sha was observed to be
62
+ * HEAD-at-stamp-time -- an ordinary sequential commit shared across several
63
+ * deliveries, NOT a per-delivery merge (and a FAST-FORWARDED merge-back leaves
64
+ * no merge commit at all). On such a sha `<sha>^1...<sha>` is that ONE commit's
65
+ * own diff -- WRONG attribution masquerading as a verdict, not the delivery's
66
+ * contribution. `^1...` only recovers a delivery's contribution when `<sha>` is
67
+ * a genuine merge whose non-first parent is the merged-in tip. Refusing it here
68
+ * makes the caller fall through to the recorded-commit-set range
69
+ * (resolveRecordedCommitRange) or live topology instead of judging a whole
70
+ * focus against a single trailing commit.
71
+ */
72
+ export declare function resolveRecordedMergeRange(worktreePath: string, mergeCommitSha: string | null | undefined): string | null;
73
+ /**
74
+ * Derive a diff range from a delivery's RECORDED constituent commit set
75
+ * (focus_merges.commit_shas -- the durable record the daemon writes at merge
76
+ * time via extractConstituentCommits/recordFocusMerge). The set is authored by
77
+ * `git log --format=%H <preMergeRef>..<branch>`, so it is newest-first and
78
+ * forms a contiguous first-parent chain for the ff / no-ff merge-back
79
+ * strategies the daemon uses. The range is `<oldest>^1...<newest>` -- the whole
80
+ * recorded set diffed against the commit just before it.
81
+ *
82
+ * Both boundaries (and the parent of the oldest) are verified reachable in the
83
+ * worktree; returns null when the set is empty or a boundary is absent (e.g. a
84
+ * --squash merge rewrote history, breaking the recorded shas' reachability, or
85
+ * the oldest commit is a root with no parent) so the caller falls through to
86
+ * its live-topology sources. This is the record-sourced path that survives a
87
+ * FAST-FORWARD (no merge marker to search for) and a REBASE (merge-base moved),
88
+ * both of which corrupt a topology-derived range.
89
+ */
90
+ export declare function resolveRecordedCommitRange(worktreePath: string, commitShas: string[] | null | undefined): string | null;
91
+ /**
92
+ * The git trailer key that attributes a commit to the delivery whose work it is.
93
+ * Stamped by agents at commit time (see execution-sections / the agent CLAUDE.md
94
+ * template). The value is the delivery UUID. The trailer travels with the commit
95
+ * object, so it survives fast-forward and rebase exactly like the recorded commit
96
+ * set -- reading it is reading a durable fact, not re-deriving from branch topology.
97
+ */
98
+ export declare const DELIVERY_TRAILER_KEY = "Telora-Delivery";
99
+ /**
100
+ * Read the `Telora-Delivery` trailer of a single commit. Returns the trimmed
101
+ * delivery id, or '' when the commit carries no such trailer (a merge-back / daemon
102
+ * commit, or an agent commit made before the convention). Empty on any git failure.
103
+ */
104
+ export declare function readDeliveryTrailer(worktreePath: string, sha: string): string;
105
+ /**
106
+ * Partition a RECORDED batch commit set (focus_merges.commit_shas, which spans
107
+ * every delivery merged together) down to the commits attributable to ONE
108
+ * delivery, using each commit's `Telora-Delivery` trailer.
109
+ *
110
+ * This is what gives a delivery merged alongside siblings its OWN commits instead
111
+ * of the batch's combined set: the trailer is the per-commit fact that a shared
112
+ * focus branch's interleaved commits cannot otherwise be partitioned by.
113
+ *
114
+ * GRACEFUL FALLBACK: when NO commit in the set carries a Telora-Delivery trailer
115
+ * (a legacy / pre-convention batch), the set cannot be partitioned, so the whole
116
+ * set is returned unchanged -- exactly today's behavior, no regression. When ANY
117
+ * commit is trailered, the set IS partitionable and only this delivery's commits
118
+ * are returned; untrailered commits (merge-back / daemon) fall out naturally, and
119
+ * a delivery with no trailered commits of its own correctly resolves to an empty
120
+ * set (which the completeness gate then treats as nothing-to-measure).
121
+ *
122
+ * Order is preserved (newest-first), so the result still forms the contiguous
123
+ * chain resolveRecordedCommitRange expects.
124
+ */
125
+ export declare function filterCommitsByDelivery(worktreePath: string, commitShas: string[] | null | undefined, deliveryId: string): string[];
126
+ /**
127
+ * The commit SHAs contained in a diff range (`git rev-list <range>`). Empty on
128
+ * failure. Used by the verify COMPLETENESS check to prove the resolved range
129
+ * actually covers a delivery's recorded commits before rendering a verdict.
130
+ */
131
+ export declare function listRangeCommits(worktreePath: string, range: string): string[];
132
+ /**
133
+ * How a delivery's evidence is produced from git.
134
+ *
135
+ * Most deliveries resolve to a single contiguous `range` (topology, a recorded
136
+ * merge commit, or a recorded commit set whose members happen to sit contiguously
137
+ * on the branch). But a delivery whose OWN recorded commits INTERLEAVE with a
138
+ * sibling's on a shared focus branch cannot be expressed as one `<a>^1...<b>`
139
+ * span -- that span's diff re-absorbs every sibling commit that lives between its
140
+ * endpoints. Such a set is carried as an explicit `commits` list and diffed
141
+ * commit-by-commit, so an interleaved sibling's commit never leaks into the
142
+ * delivery's evidence (the AC: "judged against its own commits only").
143
+ */
144
+ export type DeliveryDiffSource = {
145
+ readonly kind: 'range';
146
+ readonly range: string;
147
+ } | {
148
+ readonly kind: 'commits';
149
+ readonly commits: readonly string[];
150
+ };
151
+ /**
152
+ * Resolve HOW to produce a delivery's evidence, sourced from the DURABLE recorded
153
+ * attribution first and live branch topology only as a fallback (defects #2/#3).
154
+ * Order:
155
+ *
156
+ * 1. RECORDED commit set present, CONTIGUOUS -> `{range: <oldest>^1...<newest>}`
157
+ * from focus_merges.commit_shas (the delivery's own, trailer-filtered set) --
158
+ * the exact record written at merge time, immune to fast-forward and rebase.
159
+ * 1b. RECORDED commit set present, INTERLEAVED with a sibling's commits, OR its
160
+ * span boundary is unreachable (e.g. --squash rewrote history) but the
161
+ * commits themselves survive -> `{commits}` (diffed one by one, so the span
162
+ * never re-absorbs a sibling that sits between the endpoints).
163
+ * 2. RECORDED merge commit present -> `{range: <sha>^1...<sha>}`, ONLY for a real
164
+ * >=2-parent merge (single-parent ff commits are refused -- see
165
+ * resolveRecordedMergeRange).
166
+ * 3. branch AHEAD of base -> `{range: base...HEAD}` (an unmerged branch has no
167
+ * focus_merges row; topology is correct and byte-identical to the old path).
168
+ * 4. branch LEVEL/BEHIND after merge -> `{range: <merge>^1...<merge>}` (searched
169
+ * merge commit -- last-ditch when nothing was recorded).
170
+ * 5. no attributable commits -> null (caller yields empty; instrument-fault path).
171
+ *
172
+ * The recorded sources are preferred over `getCommitsAhead` so a merged-back
173
+ * branch that has since taken one new commit (routine: every spawn rebases onto
174
+ * integration) is NOT truncated to that single trailing commit.
175
+ *
176
+ * `recordedCommitShas` is the delivery's OWN commit set (focus_merges.commit_shas
177
+ * already partitioned per-delivery by the Telora-Delivery trailer); `recordedMergeSha`
178
+ * is the row's merge_commit_sha. Callers without a record (assembly resolvers) pass
179
+ * neither and get the topology path.
180
+ */
181
+ export declare function resolveDeliveryDiffSource(worktreePath: string, baseBranch: string, recordedMergeSha?: string | null, recordedCommitShas?: string[] | null): DeliveryDiffSource | null;
182
+ /**
183
+ * String-range view of {@link resolveDeliveryDiffSource}, for consumers that need
184
+ * a single range expression (assembly resolvers). Those callers pass no recorded
185
+ * commit set, so they always resolve to a `range` source; a `commits` source
186
+ * (interleaved per-delivery set) degrades to its best-effort span here -- only the
187
+ * verify path, which uses the source API directly, isolates interleaved commits.
188
+ */
189
+ export declare function resolveDeliveryDiffRange(worktreePath: string, baseBranch: string, recordedMergeSha?: string | null, recordedCommitShas?: string[] | null): string | null;
190
+ /**
191
+ * The delivery's diff, from a resolved source. A `range` source diffs the span
192
+ * directly (byte-identical to the old range path). A `commits` source sums each
193
+ * commit's own patch (oldest-first for readable order), so interleaved siblings
194
+ * never appear.
195
+ */
196
+ export declare function getDeliveryDiffFromSource(worktreePath: string, source: DeliveryDiffSource): string;
197
+ /** Changed-files for a source: the range's name-only list, or the UNION per commit. */
198
+ export declare function getDeliveryChangedFilesFromSource(worktreePath: string, source: DeliveryDiffSource): string[];
199
+ /** Diff-stat for a source: the range's stat, or per-commit stats concatenated. */
200
+ export declare function getDeliveryDiffStatFromSource(worktreePath: string, source: DeliveryDiffSource): string;
201
+ /**
202
+ * The commits a source actually diffs, for the completeness check. A `range`
203
+ * source lists the range; a `commits` source is exactly its (existing) commits --
204
+ * so a per-delivery commit set covers itself by construction and never reads as
205
+ * half-blind for interleaving alone.
206
+ */
207
+ export declare function listSourceCommits(worktreePath: string, source: DeliveryDiffSource): string[];
66
208
  /**
67
209
  * The delivery's diff, resolved from the range that actually contains its work
68
210
  * (see resolveDeliveryDiffRange). For a branch still ahead of base this is
@@ -1 +1 @@
1
- {"version":3,"file":"git-diff.d.ts","sourceRoot":"","sources":["../../../src/resolvers/shared/git-diff.ts"],"names":[],"mappings":"AAAA;;GAEG;AAIH,eAAO,MAAM,cAAc,QAAY,CAAC;AAExC;;;;GAIG;AACH,wBAAgB,eAAe,CAAC,YAAY,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,GAAG,MAAM,CAU3E;AAED,+EAA+E;AAC/E,wBAAgB,gBAAgB,CAAC,YAAY,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,GAAG,MAAM,CAS5E;AAED,0EAA0E;AAC1E,wBAAgB,oBAAoB,CAAC,YAAY,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,GAAG,MAAM,EAAE,CAUlF;AAED;;;GAGG;AACH,wBAAgB,UAAU,CAAC,YAAY,EAAE,MAAM,EAAE,UAAU,EAAE,MAAM,GAAG,MAAM,CAE3E;AAED;;GAEG;AACH,wBAAgB,kBAAkB,CAAC,YAAY,EAAE,MAAM,EAAE,UAAU,EAAE,MAAM,GAAG,MAAM,CAEnF;AAED;;;GAGG;AACH,wBAAgB,eAAe,CAAC,YAAY,EAAE,MAAM,EAAE,UAAU,EAAE,MAAM,GAAG,MAAM,EAAE,CAElF;AAED;;;;;;GAMG;AACH,wBAAgB,eAAe,CAAC,YAAY,EAAE,MAAM,EAAE,UAAU,EAAE,MAAM,GAAG,MAAM,CAWhF;AAKD;;;;;;;;;;;;;;;GAeG;AACH,wBAAgB,uBAAuB,CAAC,YA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,EAAE,MAAM,GAAG,IAAI,EAChC,kBAAkB,CAAC,EAAE,MAAM,EAAE,GAAG,IAAI,GACnC,kBAAkB,GAAG,IAAI,CAqB3B;AAED;;;;;;GAMG;AACH,wBAAgB,wBAAwB,CACtC,YAAY,EAAE,MAAM,EACpB,UAAU,EAAE,MAAM,EAClB,gBAAgB,CAAC,EAAE,MAAM,GAAG,IAAI,EAChC,kBAAkB,CAAC,EAAE,MAAM,EAAE,GAAG,IAAI,GACnC,MAAM,GAAG,IAAI,CAKf;AAOD;;;;;GAKG;AACH,wBAAgB,yBAAyB,CAAC,YAAY,EAAE,MAAM,EAAE,MAAM,EAAE,kBAAkB,GAAG,MAAM,CAOlG;AAED,uFAAuF;AACvF,wBAAgB,iCAAiC,CAAC,YAAY,EAAE,MAAM,EAAE,MAAM,EAAE,kBAAkB,GAAG,MAAM,EAAE,CAO5G;AAED,kFAAkF;AAClF,wBAAgB,6BAA6B,CAAC,YAAY,EAAE,MAAM,EAAE,MAAM,EAAE,kBAAkB,GAAG,MAAM,CAOtG;AAED;;;;;GAKG;AACH,wBAAgB,iBAAiB,CAAC,YAAY,EAAE,MAAM,EAAE,MAAM,EAAE,kBAAkB,GAAG,MAAM,EAAE,CAG5F;AAED;;;;;;GAMG;AACH,wBAAgB,eAAe,CAAC,YAAY,EAAE,MAAM,EAAE,UAAU,EAAE,MAAM,GAAG,MAAM,CAGhF"}
@@ -116,24 +116,302 @@ export function findDeliveryMergeCommit(worktreePath, baseBranch) {
116
116
  }
117
117
  }
118
118
  /**
119
- * Resolve the git range that contains a delivery's work, robust to the focus
120
- * branch having already merged into its base:
119
+ * Verify a commit sha exists locally AND is a real MERGE commit (>= 2 parents),
120
+ * and if so return the first-parent diff range that recovers its second-parent
121
+ * contribution (`<sha>^1...<sha>`).
121
122
  *
122
- * - branch AHEAD of base -> `base...HEAD` (historic behaviour,
123
- * byte-identical to the old getGitDiff)
124
- * - branch LEVEL/BEHIND after merge -> `<merge>^1...<merge>` (recovered from
125
- * the merge commit that brought it in)
126
- * - no attributable commits -> null (caller yields empty; the
127
- * instrument-fault path handles it)
128
- */
129
- export function resolveDeliveryDiffRange(worktreePath, baseBranch) {
123
+ * Returns null when the sha is empty, malformed, not present in the repo (e.g.
124
+ * not yet fetched), OR has fewer than two parents. That last guard is
125
+ * load-bearing: the recorded merge_commit_sha was observed to be
126
+ * HEAD-at-stamp-time -- an ordinary sequential commit shared across several
127
+ * deliveries, NOT a per-delivery merge (and a FAST-FORWARDED merge-back leaves
128
+ * no merge commit at all). On such a sha `<sha>^1...<sha>` is that ONE commit's
129
+ * own diff -- WRONG attribution masquerading as a verdict, not the delivery's
130
+ * contribution. `^1...` only recovers a delivery's contribution when `<sha>` is
131
+ * a genuine merge whose non-first parent is the merged-in tip. Refusing it here
132
+ * makes the caller fall through to the recorded-commit-set range
133
+ * (resolveRecordedCommitRange) or live topology instead of judging a whole
134
+ * focus against a single trailing commit.
135
+ */
136
+ export function resolveRecordedMergeRange(worktreePath, mergeCommitSha) {
137
+ const sha = (mergeCommitSha ?? '').trim();
138
+ if (sha === '')
139
+ return null;
140
+ let parentCount;
141
+ try {
142
+ // `--parents -n 1 <sha>^{commit}` confirms the object exists AND is a
143
+ // commit, and yields `<sha> <parent1> [<parent2> ...]` in one call.
144
+ const out = execSync(`git rev-list --parents -n 1 ${sha}^{commit}`, {
145
+ cwd: worktreePath, maxBuffer: 1024 * 1024, encoding: 'utf-8',
146
+ });
147
+ const parts = out.trim().split(/\s+/).filter((p) => p !== '');
148
+ parentCount = Math.max(0, parts.length - 1); // first token is the commit itself
149
+ }
150
+ catch {
151
+ return null;
152
+ }
153
+ if (parentCount < 2)
154
+ return null; // not a merge commit -> `^1...` is meaningless
155
+ return `${sha}^1...${sha}`;
156
+ }
157
+ /**
158
+ * Derive a diff range from a delivery's RECORDED constituent commit set
159
+ * (focus_merges.commit_shas -- the durable record the daemon writes at merge
160
+ * time via extractConstituentCommits/recordFocusMerge). The set is authored by
161
+ * `git log --format=%H <preMergeRef>..<branch>`, so it is newest-first and
162
+ * forms a contiguous first-parent chain for the ff / no-ff merge-back
163
+ * strategies the daemon uses. The range is `<oldest>^1...<newest>` -- the whole
164
+ * recorded set diffed against the commit just before it.
165
+ *
166
+ * Both boundaries (and the parent of the oldest) are verified reachable in the
167
+ * worktree; returns null when the set is empty or a boundary is absent (e.g. a
168
+ * --squash merge rewrote history, breaking the recorded shas' reachability, or
169
+ * the oldest commit is a root with no parent) so the caller falls through to
170
+ * its live-topology sources. This is the record-sourced path that survives a
171
+ * FAST-FORWARD (no merge marker to search for) and a REBASE (merge-base moved),
172
+ * both of which corrupt a topology-derived range.
173
+ */
174
+ export function resolveRecordedCommitRange(worktreePath, commitShas) {
175
+ const shas = (commitShas ?? []).map((s) => s.trim()).filter((s) => s !== '');
176
+ if (shas.length === 0)
177
+ return null;
178
+ const newest = shas[0];
179
+ const oldest = shas[shas.length - 1];
180
+ try {
181
+ for (const ref of [`${newest}^{commit}`, `${oldest}^{commit}`, `${oldest}^1^{commit}`]) {
182
+ execSync(`git rev-parse --verify --quiet ${ref}`, {
183
+ cwd: worktreePath, maxBuffer: 1024 * 1024, encoding: 'utf-8',
184
+ });
185
+ }
186
+ }
187
+ catch {
188
+ return null;
189
+ }
190
+ return `${oldest}^1...${newest}`;
191
+ }
192
+ /**
193
+ * The git trailer key that attributes a commit to the delivery whose work it is.
194
+ * Stamped by agents at commit time (see execution-sections / the agent CLAUDE.md
195
+ * template). The value is the delivery UUID. The trailer travels with the commit
196
+ * object, so it survives fast-forward and rebase exactly like the recorded commit
197
+ * set -- reading it is reading a durable fact, not re-deriving from branch topology.
198
+ */
199
+ export const DELIVERY_TRAILER_KEY = 'Telora-Delivery';
200
+ /**
201
+ * Read the `Telora-Delivery` trailer of a single commit. Returns the trimmed
202
+ * delivery id, or '' when the commit carries no such trailer (a merge-back / daemon
203
+ * commit, or an agent commit made before the convention). Empty on any git failure.
204
+ */
205
+ export function readDeliveryTrailer(worktreePath, sha) {
206
+ const clean = (sha ?? '').trim();
207
+ if (clean === '')
208
+ return '';
209
+ try {
210
+ // Single-quote the format: the `%(...)` parentheses are shell metacharacters.
211
+ const out = execSync(`git show -s '--format=%(trailers:key=${DELIVERY_TRAILER_KEY},valueonly)' ${clean}^{commit}`, { cwd: worktreePath, maxBuffer: 1024 * 1024, encoding: 'utf-8' });
212
+ // A commit can in principle carry several trailer lines; take the first
213
+ // non-empty value -- attribution is single-delivery by construction.
214
+ return out.split('\n').map((l) => l.trim()).find((l) => l !== '') ?? '';
215
+ }
216
+ catch {
217
+ return '';
218
+ }
219
+ }
220
+ /**
221
+ * Partition a RECORDED batch commit set (focus_merges.commit_shas, which spans
222
+ * every delivery merged together) down to the commits attributable to ONE
223
+ * delivery, using each commit's `Telora-Delivery` trailer.
224
+ *
225
+ * This is what gives a delivery merged alongside siblings its OWN commits instead
226
+ * of the batch's combined set: the trailer is the per-commit fact that a shared
227
+ * focus branch's interleaved commits cannot otherwise be partitioned by.
228
+ *
229
+ * GRACEFUL FALLBACK: when NO commit in the set carries a Telora-Delivery trailer
230
+ * (a legacy / pre-convention batch), the set cannot be partitioned, so the whole
231
+ * set is returned unchanged -- exactly today's behavior, no regression. When ANY
232
+ * commit is trailered, the set IS partitionable and only this delivery's commits
233
+ * are returned; untrailered commits (merge-back / daemon) fall out naturally, and
234
+ * a delivery with no trailered commits of its own correctly resolves to an empty
235
+ * set (which the completeness gate then treats as nothing-to-measure).
236
+ *
237
+ * Order is preserved (newest-first), so the result still forms the contiguous
238
+ * chain resolveRecordedCommitRange expects.
239
+ */
240
+ export function filterCommitsByDelivery(worktreePath, commitShas, deliveryId) {
241
+ const shas = (commitShas ?? []).map((s) => s.trim()).filter((s) => s !== '');
242
+ if (shas.length === 0)
243
+ return [];
244
+ const wanted = (deliveryId ?? '').trim();
245
+ const trailers = shas.map((sha) => ({ sha, delivery: readDeliveryTrailer(worktreePath, sha) }));
246
+ const anyTrailered = trailers.some((t) => t.delivery !== '');
247
+ if (!anyTrailered)
248
+ return shas; // un-partitionable legacy batch -> preserve current behavior
249
+ if (wanted === '')
250
+ return shas; // no delivery to filter by -> do not silently drop work
251
+ return trailers.filter((t) => t.delivery === wanted).map((t) => t.sha);
252
+ }
253
+ /**
254
+ * The commit SHAs contained in a diff range (`git rev-list <range>`). Empty on
255
+ * failure. Used by the verify COMPLETENESS check to prove the resolved range
256
+ * actually covers a delivery's recorded commits before rendering a verdict.
257
+ */
258
+ export function listRangeCommits(worktreePath, range) {
259
+ try {
260
+ const out = execSync(`git rev-list ${range}`, { cwd: worktreePath, maxBuffer: 10 * 1024 * 1024, encoding: 'utf-8' });
261
+ return out.split('\n').map((l) => l.trim()).filter((l) => l !== '');
262
+ }
263
+ catch {
264
+ return [];
265
+ }
266
+ }
267
+ /** Confirm a sha names a commit that exists locally. */
268
+ function commitExists(worktreePath, sha) {
269
+ const clean = (sha ?? '').trim();
270
+ if (clean === '')
271
+ return false;
272
+ try {
273
+ execSync(`git rev-parse --verify --quiet ${clean}^{commit}`, {
274
+ cwd: worktreePath, maxBuffer: 1024 * 1024, encoding: 'utf-8',
275
+ });
276
+ return true;
277
+ }
278
+ catch {
279
+ return false;
280
+ }
281
+ }
282
+ /**
283
+ * True when `span` (a `<oldest>^1...<newest>` range) contains EXACTLY the recorded
284
+ * set -- no interleaved foreign commits. When true the cheap span is exact; when
285
+ * false a sibling's commits sit between the endpoints and the set must be diffed
286
+ * commit-by-commit. `shas` is the delivery's own (already trailer-filtered) set.
287
+ */
288
+ function spanCoversRecordedExactly(worktreePath, span, shas) {
289
+ const inSpan = new Set(listRangeCommits(worktreePath, span));
290
+ return inSpan.size === shas.length && shas.every((s) => inSpan.has(s));
291
+ }
292
+ /**
293
+ * Resolve HOW to produce a delivery's evidence, sourced from the DURABLE recorded
294
+ * attribution first and live branch topology only as a fallback (defects #2/#3).
295
+ * Order:
296
+ *
297
+ * 1. RECORDED commit set present, CONTIGUOUS -> `{range: <oldest>^1...<newest>}`
298
+ * from focus_merges.commit_shas (the delivery's own, trailer-filtered set) --
299
+ * the exact record written at merge time, immune to fast-forward and rebase.
300
+ * 1b. RECORDED commit set present, INTERLEAVED with a sibling's commits, OR its
301
+ * span boundary is unreachable (e.g. --squash rewrote history) but the
302
+ * commits themselves survive -> `{commits}` (diffed one by one, so the span
303
+ * never re-absorbs a sibling that sits between the endpoints).
304
+ * 2. RECORDED merge commit present -> `{range: <sha>^1...<sha>}`, ONLY for a real
305
+ * >=2-parent merge (single-parent ff commits are refused -- see
306
+ * resolveRecordedMergeRange).
307
+ * 3. branch AHEAD of base -> `{range: base...HEAD}` (an unmerged branch has no
308
+ * focus_merges row; topology is correct and byte-identical to the old path).
309
+ * 4. branch LEVEL/BEHIND after merge -> `{range: <merge>^1...<merge>}` (searched
310
+ * merge commit -- last-ditch when nothing was recorded).
311
+ * 5. no attributable commits -> null (caller yields empty; instrument-fault path).
312
+ *
313
+ * The recorded sources are preferred over `getCommitsAhead` so a merged-back
314
+ * branch that has since taken one new commit (routine: every spawn rebases onto
315
+ * integration) is NOT truncated to that single trailing commit.
316
+ *
317
+ * `recordedCommitShas` is the delivery's OWN commit set (focus_merges.commit_shas
318
+ * already partitioned per-delivery by the Telora-Delivery trailer); `recordedMergeSha`
319
+ * is the row's merge_commit_sha. Callers without a record (assembly resolvers) pass
320
+ * neither and get the topology path.
321
+ */
322
+ export function resolveDeliveryDiffSource(worktreePath, baseBranch, recordedMergeSha, recordedCommitShas) {
323
+ const shas = (recordedCommitShas ?? []).map((s) => s.trim()).filter((s) => s !== '');
324
+ if (shas.length > 0) {
325
+ const span = resolveRecordedCommitRange(worktreePath, shas);
326
+ if (span) {
327
+ // A span is exact only when it re-lists ONLY the delivery's own commits.
328
+ // When a sibling interleaves, the span re-absorbs it -> diff commit-by-commit.
329
+ if (spanCoversRecordedExactly(worktreePath, span, shas))
330
+ return { kind: 'range', range: span };
331
+ return { kind: 'commits', commits: shas };
332
+ }
333
+ // Span boundary unreachable (e.g. --squash, or oldest is a root): if the
334
+ // commits themselves still exist, diff them directly; else fall through to
335
+ // topology rather than fabricate a range from missing commits.
336
+ if (shas.every((s) => commitExists(worktreePath, s)))
337
+ return { kind: 'commits', commits: shas };
338
+ }
339
+ const recordedMerge = resolveRecordedMergeRange(worktreePath, recordedMergeSha);
340
+ if (recordedMerge)
341
+ return { kind: 'range', range: recordedMerge };
130
342
  if (getCommitsAhead(worktreePath, baseBranch) > 0)
131
- return `${baseBranch}...HEAD`;
343
+ return { kind: 'range', range: `${baseBranch}...HEAD` };
132
344
  const merge = findDeliveryMergeCommit(worktreePath, baseBranch);
133
345
  if (merge)
134
- return `${merge}^1...${merge}`;
346
+ return { kind: 'range', range: `${merge}^1...${merge}` };
135
347
  return null;
136
348
  }
349
+ /**
350
+ * String-range view of {@link resolveDeliveryDiffSource}, for consumers that need
351
+ * a single range expression (assembly resolvers). Those callers pass no recorded
352
+ * commit set, so they always resolve to a `range` source; a `commits` source
353
+ * (interleaved per-delivery set) degrades to its best-effort span here -- only the
354
+ * verify path, which uses the source API directly, isolates interleaved commits.
355
+ */
356
+ export function resolveDeliveryDiffRange(worktreePath, baseBranch, recordedMergeSha, recordedCommitShas) {
357
+ const source = resolveDeliveryDiffSource(worktreePath, baseBranch, recordedMergeSha, recordedCommitShas);
358
+ if (!source)
359
+ return null;
360
+ if (source.kind === 'range')
361
+ return source.range;
362
+ return resolveRecordedCommitRange(worktreePath, [...source.commits]);
363
+ }
364
+ /** The per-commit patch range (`<sha>^ <sha>`) that yields a single commit's own diff. */
365
+ function commitDiffRange(sha) {
366
+ return `${sha}^ ${sha}`;
367
+ }
368
+ /**
369
+ * The delivery's diff, from a resolved source. A `range` source diffs the span
370
+ * directly (byte-identical to the old range path). A `commits` source sums each
371
+ * commit's own patch (oldest-first for readable order), so interleaved siblings
372
+ * never appear.
373
+ */
374
+ export function getDeliveryDiffFromSource(worktreePath, source) {
375
+ if (source.kind === 'range')
376
+ return getGitDiffRange(worktreePath, source.range);
377
+ return [...source.commits]
378
+ .reverse()
379
+ .map((sha) => getGitDiffRange(worktreePath, commitDiffRange(sha)))
380
+ .filter((p) => p !== '')
381
+ .join('\n');
382
+ }
383
+ /** Changed-files for a source: the range's name-only list, or the UNION per commit. */
384
+ export function getDeliveryChangedFilesFromSource(worktreePath, source) {
385
+ if (source.kind === 'range')
386
+ return getChangedFilesRange(worktreePath, source.range);
387
+ const files = new Set();
388
+ for (const sha of source.commits) {
389
+ for (const f of getChangedFilesRange(worktreePath, commitDiffRange(sha)))
390
+ files.add(f);
391
+ }
392
+ return [...files];
393
+ }
394
+ /** Diff-stat for a source: the range's stat, or per-commit stats concatenated. */
395
+ export function getDeliveryDiffStatFromSource(worktreePath, source) {
396
+ if (source.kind === 'range')
397
+ return getDiffStatRange(worktreePath, source.range);
398
+ return [...source.commits]
399
+ .reverse()
400
+ .map((sha) => getDiffStatRange(worktreePath, commitDiffRange(sha)))
401
+ .filter((s) => s.trim() !== '')
402
+ .join('\n');
403
+ }
404
+ /**
405
+ * The commits a source actually diffs, for the completeness check. A `range`
406
+ * source lists the range; a `commits` source is exactly its (existing) commits --
407
+ * so a per-delivery commit set covers itself by construction and never reads as
408
+ * half-blind for interleaving alone.
409
+ */
410
+ export function listSourceCommits(worktreePath, source) {
411
+ if (source.kind === 'range')
412
+ return listRangeCommits(worktreePath, source.range);
413
+ return source.commits.filter((sha) => commitExists(worktreePath, sha));
414
+ }
137
415
  /**
138
416
  * The delivery's diff, resolved from the range that actually contains its work
139
417
  * (see resolveDeliveryDiffRange). For a branch still ahead of base this is
@@ -142,7 +420,7 @@ export function resolveDeliveryDiffRange(worktreePath, baseBranch) {
142
420
  * with no attributable commits it returns ''.
143
421
  */
144
422
  export function getDeliveryDiff(worktreePath, baseBranch) {
145
- const range = resolveDeliveryDiffRange(worktreePath, baseBranch);
146
- return range ? getGitDiffRange(worktreePath, range) : '';
423
+ const source = resolveDeliveryDiffSource(worktreePath, baseBranch);
424
+ return source ? getDeliveryDiffFromSource(worktreePath, source) : '';
147
425
  }
148
426
  //# sourceMapp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,OAAO;QAAE,OAAO,gBAAgB,CAAC,YAAY,EAAE,MAAM,CAAC,KAAK,CAAC,CAAC;IACjF,OAAO,CAAC,GAAG,MAAM,CAAC,OAAO,CAAC;SACvB,OAAO,EAAE;SACT,GAAG,CAAC,CAAC,GAAG,EAAE,EAAE,CAAC,gBAAgB,CAAC,YAAY,EAAE,eAAe,CAAC,GAAG,CAAC,CAAC,CAAC;SAClE,MAAM,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,IAAI,EAAE,KAAK,EAAE,CAAC;SAC9B,IAAI,CAAC,IAAI,CAAC,CAAC;AAChB,CAAC;AAED;;;;;GAKG;AACH,MAAM,UAAU,iBAAiB,CAAC,YAAoB,EAAE,MAA0B;IAChF,IAAI,MAAM,CAAC,IAAI,KAAK,OAAO;QAAE,OAAO,gBAAgB,CAAC,YAAY,EAAE,MAAM,CAAC,KAAK,CAAC,CAAC;IACjF,OAAO,MAAM,CAAC,OAAO,CAAC,MAAM,CAAC,CAAC,GAAG,EAAE,EAAE,CAAC,YAAY,CAAC,YAAY,EAAE,GAAG,CAAC,CAAC,CAAC;AACzE,CAAC;AAED;;;;;;GAMG;AACH,MAAM,UAAU,eAAe,CAAC,YAAoB,EAAE,UAAkB;IACtE,MAAM,MAAM,GAAG,yBAAyB,CAAC,YAAY,EAAE,UAAU,CAAC,CAAC;IACnE,OAAO,MAAM,CAAC,CAAC,CAAC,yBAAyB,CAAC,YAAY,EAAE,MAAM,CAAC,CAAC,CAAC,CAAC,EAAE,CAAC;AACvE,CAAC"}
@@ -12,6 +12,7 @@
12
12
  */
13
13
  import type { DaemonConfig, AgentRole, FocusTeamState, PipelineConfig } from '../types.js';
14
14
  import { getFocusDeliveries, getFocusIssues } from '../queries/focuses.js';
15
+ import type { AgentResolvableItem } from '../queries/issues.js';
15
16
  import { type FocusTeamPromptContext } from '../team-prompt-base.js';
16
17
  import { resolveLineageSpec } from '../session-lineage.js';
17
18
  import { type AssemblyManifestEntry } from '../assembly-engine.js';
@@ -37,6 +38,8 @@ export declare function buildFocusPromptContext(args: {
37
38
  loopContext: string;
38
39
  reviewFiledOpenCount: number;
39
40
  engineId: string;
41
+ /** Open agent_resolvable filings for this focus, ridden into the spawn. */
42
+ agentResolvableItems: AgentResolvableItem[];
40
43
  }): FocusTeamPromptContext;
41
44
  /**
42
45
  * Phase C: compose the final team-lead message -- role framework + remediation
@@ -1 +1 @@
1
- {"version":3,"file":"prompt-assembly.d.ts","sourceRoot":"","sources":["../../src/spawn/prompt-assembly.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;GAWG;AAEH,OAAO,KAAK,EACV,YAAY,EACZ,SAAS,EACT,cAAc,EACd,cAAc,EACf,MAAM,aAAa,CAAC;AACrB,OAAO,EACL,kBAAkB,EAClB,cAAc,EACf,MAAM,uBAAuB,CAAC;AAG/B,OAAO,EAML,KAAK,sBAAsB,EAC5B,MAAM,wBAAwB,CAAC;AAEhC,OAAO,EAAE,kBAAkB,EAAE,MAAM,uBAAuB,CAAC;AAC3D,OAAO,EAA2D,KAAK,qBAAqB,EAAE,MAAM,uBAAuB,CAAC;AAC5H,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,aAAa,CAAC;AAMhD;;;;;GAKG;AACH,wBAAgB,uBAAuB,CAAC,IAAI,EAAE;IAC5C,MAAM,EAAE,YAAY,CAAC;IACrB,OAAO,EAAE,MAAM,CAAC;IAChB,SAAS,EAAE,MAAM,CAAC;IAClB,gBAAgB,EAAE,MAAM,GAAG,IAAI,CAAC;IAChC,UAAU,EAAE,OAAO,CAAC,UAAU,CAAC,OAAO,kBAAkB,CAAC,CAAC,CAAC;IAC3D,MAAM,EAAE,OAAO,CAAC,UAAU,CAAC,OAAO,cAAc,CAAC,CAAC,CAAC;IACnD,eAAe,EAAE,cAAc,CAAC,iBAAiB,CAAC,CAAC;IACnD,cAAc,EAAE,cAAc,GAAG,IAAI,CAAC;IACtC,yBAAyB,EAAE,YAAY,CAAC,2BAA2B,CAAC,CAAC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AAC,UAAU,CAAC,OAAO,cAAc,CAAC,CAAC,CAAC;IACnD,QAAQ,EAAE,MAAM,GAAG,IAAI,CAAC;CACzB,GAAG;IAAE,QAAQ,EAAE,MAAM,GAAG,IAAI,CAAC;IAAC,cAAc,EAAE,OAAO,CAAA;CAAE,CAQvD;AAED,wBAAgB,qCAAqC,CACnD,UAAU,EAAE,OAAO,CAAC,UAAU,CAAC,OAAO,kBAAkB,CAAC,CAAC,EAC1D,MAAM,EAAE,OAAO,CAAC,UAAU,CAAC,OAAO,cAAc,CAAC,CAAC,GACjD,OAAO,CAAC,UAAU,CAAC,OAAO,kBAAkB,CAAC,CAAC,CAWhD;AAED,wBAAgB,iCAAiC,CAAC,IAAI,EAAE;IACtD,OAAO,EAAE,MAAM,CAAC;IAChB,SAAS,EAAE,MAAM,CAAC;IAClB,UAAU,EAAE,OAAO,CAAC,UAAU,CAAC,OAAO,kBAAkB,CAAC,CAAC,CAAC;CAC5D,GAAG,MAAM,CA+BT"}
@@ -24,7 +24,7 @@ const log = createLogger({ module: 'focus-executor' });
24
24
  * phase calls rather than inlining the context shape.
25
25
  */
26
26
  export function buildFocusPromptContext(args) {
27
- const { config, focusId, focusName, focusDescription, deliveries, issues, executionConfig, pipelineConfig, deploymentProfileSnapshot, readOnly, loopContext, reviewFiledOpenCount, engineId, } = args;
27
+ const { config, focusId, focusName, focusDescription, deliveries, issues, executionConfig, pipelineConfig, deploymentProfileSnapshot, readOnly, loopContext, reviewFiledOpenCount, engineId, agentResolvableItems, } = args;
28
28
  return {
29
29
  focusId,
30
30
  focusName,
@@ -40,6 +40,7 @@ export function buildFocusPromptContext(args) {
40
40
  loopContext,
41
41
  reviewFiledOpenCount,
42
42
  engineId,
43
+ agentResolvableItems,
43
44
  };
44
45
  }
45
46
  /**