@telora/daemon 0.22.137 → 0.22.146

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 (78) hide show
  1. package/build-info.json +13 -3
  2. package/dist/audit/audit-phase.d.ts +34 -1
  3. package/dist/audit/audit-phase.d.ts.map +1 -1
  4. package/dist/audit/audit-phase.js +92 -9
  5. package/dist/audit/audit-phase.js.map +1 -1
  6. package/dist/audit/audit-prompt.d.ts +174 -0
  7. package/dist/audit/audit-prompt.d.ts.map +1 -1
  8. package/dist/audit/audit-prompt.js +365 -2
  9. package/dist/audit/audit-prompt.js.map +1 -1
  10. package/dist/completion/review-coverage-shas.d.ts +49 -0
  11. package/dist/completion/review-coverage-shas.d.ts.map +1 -0
  12. package/dist/completion/review-coverage-shas.js +128 -0
  13. package/dist/completion/review-coverage-shas.js.map +1 -0
  14. package/dist/completion/review-exit-deps.d.ts +15 -2
  15. package/dist/completion/review-exit-deps.d.ts.map +1 -1
  16. package/dist/completion/review-exit-deps.js +9 -3
  17. package/dist/completion/review-exit-deps.js.map +1 -1
  18. package/dist/delivery/delivery-review-coverage.d.ts +216 -0
  19. package/dist/delivery/delivery-review-coverage.d.ts.map +1 -0
  20. package/dist/delivery/delivery-review-coverage.js +208 -0
  21. package/dist/delivery/delivery-review-coverage.js.map +1 -0
  22. package/dist/queries/focus-branch-work-evidence.d.ts +55 -0
  23. package/dist/queries/focus-branch-work-evidence.d.ts.map +1 -0
  24. package/dist/queries/focus-branch-work-evidence.js +65 -0
  25. package/dist/queries/focus-branch-work-evidence.js.map +1 -0
  26. package/dist/queries/focus-criteria-standing.d.ts +138 -0
  27. package/dist/queries/focus-criteria-standing.d.ts.map +1 -0
  28. package/dist/queries/focus-criteria-standing.js +98 -0
  29. package/dist/queries/focus-criteria-standing.js.map +1 -0
  30. package/dist/queries/focus-review-watermark.d.ts +35 -0
  31. package/dist/queries/focus-review-watermark.d.ts.map +1 -0
  32. package/dist/queries/focus-review-watermark.js +47 -0
  33. package/dist/queries/focus-review-watermark.js.map +1 -0
  34. package/dist/queries/focuses.d.ts +0 -9
  35. package/dist/queries/focuses.d.ts.map +1 -1
  36. package/dist/queries/focuses.js +0 -14
  37. package/dist/queries/focuses.js.map +1 -1
  38. package/dist/queries/shared.js +1 -1
  39. package/dist/queries/verification.d.ts +23 -25
  40. package/dist/queries/verification.d.ts.map +1 -1
  41. package/dist/queries/verification.js +66 -45
  42. package/dist/queries/verification.js.map +1 -1
  43. package/dist/resolvers/assembly-engine.d.ts +51 -0
  44. package/dist/resolvers/assembly-engine.d.ts.map +1 -1
  45. package/dist/resolvers/assembly-engine.js +10 -20
  46. package/dist/resolvers/assembly-engine.js.map +1 -1
  47. package/dist/resolvers/branch-work-arming.d.ts +133 -0
  48. package/dist/resolvers/branch-work-arming.d.ts.map +1 -0
  49. package/dist/resolvers/branch-work-arming.js +67 -0
  50. package/dist/resolvers/branch-work-arming.js.map +1 -0
  51. package/dist/resolvers/focus-criteria-standing.d.ts +24 -0
  52. package/dist/resolvers/focus-criteria-standing.d.ts.map +1 -0
  53. package/dist/resolvers/focus-criteria-standing.js +234 -0
  54. package/dist/resolvers/focus-criteria-standing.js.map +1 -0
  55. package/dist/resolvers/focus-review-coverage.d.ts +189 -0
  56. package/dist/resolvers/focus-review-coverage.d.ts.map +1 -0
  57. package/dist/resolvers/focus-review-coverage.js +516 -0
  58. package/dist/resolvers/focus-review-coverage.js.map +1 -0
  59. package/dist/resolvers/git-diff-against-base.d.ts.map +1 -1
  60. package/dist/resolvers/git-diff-against-base.js +11 -0
  61. package/dist/resolvers/git-diff-against-base.js.map +1 -1
  62. package/dist/resolvers/index.d.ts.map +1 -1
  63. package/dist/resolvers/index.js +7 -1
  64. package/dist/resolvers/index.js.map +1 -1
  65. package/dist/resolvers/reality-tree-snapshot.d.ts +9 -4
  66. package/dist/resolvers/reality-tree-snapshot.d.ts.map +1 -1
  67. package/dist/resolvers/reality-tree-snapshot.js +64 -17
  68. package/dist/resolvers/reality-tree-snapshot.js.map +1 -1
  69. package/dist/resolvers/shared/branch-fact-provenance.d.ts +258 -0
  70. package/dist/resolvers/shared/branch-fact-provenance.d.ts.map +1 -0
  71. package/dist/resolvers/shared/branch-fact-provenance.js +571 -0
  72. package/dist/resolvers/shared/branch-fact-provenance.js.map +1 -0
  73. package/dist/resolvers/shared/reality-tree-arrival.d.ts +71 -0
  74. package/dist/resolvers/shared/reality-tree-arrival.d.ts.map +1 -0
  75. package/dist/resolvers/shared/reality-tree-arrival.js +129 -0
  76. package/dist/resolvers/shared/reality-tree-arrival.js.map +1 -0
  77. package/dist/testing/fixtures/index.js +1 -1
  78. package/package.json +2 -2
@@ -49,19 +49,56 @@ async function callVerifyInjectionIdempotent(call, body) {
49
49
  }
50
50
  }
51
51
  /**
52
- * Compound op: retires the injection and promotes its FRT overlay to CRT.
52
+ * Build the SINGLE `reality_tree_verify_injection` body: the injection id, the
53
+ * restatement entries (key omitted when there are none, so a plain flip sends
54
+ * the body it always did), and the evidence.
55
+ *
56
+ * EVIDENCE RIDES THIS BODY rather than a preceding `reality_tree_node_update`,
57
+ * and that is the whole point of the collapse. The earned-promotion gate lives
58
+ * INSIDE the verify action
59
+ * (`supabase/functions/product-api/handlers/reality-tree/graph-verification.ts`
60
+ * `verifyInjectionImpl`), so
61
+ * any write issued before it is a write an ordinary refusal -- the common case
62
+ * the gate exists to produce -- has already made and cannot take back. Nor is
63
+ * the answer to reorder the two calls: a verify that succeeded followed by an
64
+ * evidence write that failed leaves a verified injection citing nothing, which
65
+ * inverts the defect instead of closing it. The edge now persists `evidence` in
66
+ * the SAME update that flips `injection_status='verified'` and `status=
67
+ * 'retired'`, strictly after the gate, so a refusal of ANY kind
68
+ * (`unearned_promotion`, `override_reason_required`, a bad lifecycle status,
69
+ * unreadable anchors) leaves the injection byte-for-byte as it found it. The
70
+ * MCP tool `telora_reality_tree_injection_verify` was collapsed onto the same
71
+ * action first (f5527c3c1); this is the same fix on the busier caller.
72
+ *
73
+ * A blank/absent citation sends NO `evidence` key, mirroring the edge's own
74
+ * rule: an absent value writes no column rather than blanking the citation
75
+ * already there. Several callers (the plain stamp with no evidence resolved)
76
+ * legitimately have none, and treating that as "erase what is there" would
77
+ * destroy evidence on a path that never had any to offer.
78
+ */
79
+ function buildVerifyInjectionBody(injectionNodeId, entries, evidence) {
80
+ const body = { injectionNodeId };
81
+ if (entries.length > 0)
82
+ body.restatements = entries;
83
+ // Trimmed, because the edge trims before deciding whether to write -- sending
84
+ // the trimmed text keeps client and server reading the same citation.
85
+ const cited = typeof evidence === 'string' ? evidence.trim() : '';
86
+ if (cited.length > 0)
87
+ body.evidence = cited;
88
+ return body;
89
+ }
90
+ /**
91
+ * Compound op: retires the injection, persists the evidence that justifies it,
92
+ * and promotes its FRT overlay to CRT -- in ONE gated call.
53
93
  * Idempotent: an injection already 'verified' is a success, not an error.
54
94
  * Optional per-target restatements (authored on the passing verdict) are
55
95
  * applied by the edge as each targeted UDE's new base statement; the edge
56
96
  * never authors prose itself.
57
97
  *
58
- * When `evidence` is supplied it is stamped onto the injection node FIRST (a
59
- * `reality_tree_node_update` write), mirroring the two-step write the MCP
60
- * `telora_reality_tree_injection_verify` tool performs, so a
61
- * verification-retired injection carries a non-null citation of the files and
62
- * tests it was verified on (rather than evidence=null). An empty/blank evidence
63
- * string is skipped -- the retire still happens, but only a real citation is
64
- * written.
98
+ * `evidence`, when a real citation, is carried on the verify body and written
99
+ * by the edge in the same update that retires the node -- never by a preceding
100
+ * `reality_tree_node_update`, which a refused verify could not take back. See
101
+ * `buildVerifyInjectionBody`. A blank/absent value writes nothing.
65
102
  *
66
103
  * `withheldNodeIds` are targets that must NOT flip with the injection: nodes an
67
104
  * operator EXCUSED from a shortfall (verify/shortfall-rulings.ts) -- cleared from
@@ -72,36 +109,25 @@ async function callVerifyInjectionIdempotent(call, body) {
72
109
  */
73
110
  export async function verifyInjectionOnPass(injectionNodeId, restatements, evidence, withheldNodeIds = [], deps = {}) {
74
111
  const call = deps.callApi ?? callApi;
75
- if (evidence && evidence.trim().length > 0) {
76
- await call('reality_tree_node_update', { nodeId: injectionNodeId, evidence });
77
- }
78
112
  const withheld = withheldNodeIds.map((nodeId) => ({ nodeId, classification: 'shortfall' }));
79
113
  const entries = [...(restatements ?? []), ...withheld];
80
- const body = { injectionNodeId };
81
- if (entries.length > 0)
82
- body.restatements = entries;
83
- await callVerifyInjectionIdempotent(call, body);
114
+ await callVerifyInjectionIdempotent(call, buildVerifyInjectionBody(injectionNodeId, entries, evidence));
84
115
  }
85
116
  /**
86
- * Same compound op as `verifyInjectionOnPass` but captures evidence text on
87
- * the injection node first. Mirrors the two-step write that the MCP
88
- * `telora_reality_tree_injection_verify` tool performs:
89
- *
90
- * 1. `reality_tree_node_update` writes the evidence rationale onto the
91
- * injection node so audit reads can later see why the verify was made.
92
- * 2. `reality_tree_verify_injection` flips injection_status to 'verified',
93
- * deletes targets edges, and promotes FRT overlays.
117
+ * Same compound op as `verifyInjectionOnPass`, for a caller that always has a
118
+ * citation: ONE `reality_tree_verify_injection` call carrying `evidence`, which
119
+ * the edge persists in the same update that flips injection_status to
120
+ * 'verified', retains targets edges, and promotes FRT overlays.
94
121
  *
95
122
  * Used by the focus-level close-loop injection sweep so the rationale
96
123
  * (which closed delivery anchored the realization) is persisted alongside
97
- * the verify decision.
124
+ * the verify decision -- and, because it is one gated call, persisted if and
125
+ * only if that decision was actually made. See `buildVerifyInjectionBody` for
126
+ * why the evidence cannot be a separate preceding write.
98
127
  */
99
- export async function verifyInjectionWithEvidence(injectionNodeId, evidence) {
100
- await callApi('reality_tree_node_update', {
101
- nodeId: injectionNodeId,
102
- evidence,
103
- });
104
- await callVerifyInjectionIdempotent(callApi, { injectionNodeId });
128
+ export async function verifyInjectionWithEvidence(injectionNodeId, evidence, deps = {}) {
129
+ const call = deps.callApi ?? callApi;
130
+ await callVerifyInjectionIdempotent(call, buildVerifyInjectionBody(injectionNodeId, [], evidence));
105
131
  }
106
132
  /**
107
133
  * Translate the pure `decideNodeWriteback` output into the verify call's
@@ -175,13 +201,15 @@ export function planNodeWritebackApply(writebacks) {
175
201
  * targeted carry an explicit match / legitimate_divergence status legible to a
176
202
  * later reader.
177
203
  *
178
- * Order of operations:
179
- * 1. `reality_tree_node_update` on the injection node -> persist evidence.
180
- * 2. `reality_tree_verify_injection` with the per-node restatements -> flips
181
- * the injection and promotes overlays, applying the classification (+
182
- * reason) to each targeted UDE atomically. Writebacks with no achieved
183
- * prose, and shortfalls, are skipped (logged) -- there is no edge path
184
- * that persists a classification without prose / a flip.
204
+ * ONE gated call does all of it: `reality_tree_verify_injection` carries the
205
+ * per-node restatements AND the evidence, so the edge flips the injection,
206
+ * promotes overlays, applies the classification (+ reason) to each targeted
207
+ * UDE, and persists the citation in a single post-gate update. Writebacks with
208
+ * no achieved prose, and shortfalls, are skipped (logged) -- there is no edge
209
+ * path that persists a classification without prose / a flip. The evidence is
210
+ * NOT a preceding `reality_tree_node_update`: see `buildVerifyInjectionBody`
211
+ * for why a write ahead of the earned-promotion gate is a write a refusal
212
+ * cannot take back.
185
213
  *
186
214
  * Non-destructive: only stamps status + evidence/reason on nodes the injection
187
215
  * owns; a match carries the declared desired effect forward unchanged. When
@@ -189,20 +217,13 @@ export function planNodeWritebackApply(writebacks) {
189
217
  */
190
218
  export async function verifyInjectionWithWriteback(injectionNodeId, evidence, writebacks, realityTreeId, deps = {}) {
191
219
  const call = deps.callApi ?? callApi;
192
- await call('reality_tree_node_update', {
193
- nodeId: injectionNodeId,
194
- evidence,
195
- });
196
220
  const { restatements, skipped } = planNodeWritebackApply(writebacks);
197
221
  if (skipped.length > 0) {
198
222
  log.warn(`[reality-writeback] injection ${injectionNodeId.slice(0, 8)}: ` +
199
223
  `${skipped.length} targeted node writeback(s) not stamped -- ` +
200
224
  skipped.map((s) => `${s.nodeId.slice(0, 8)} (${s.reason})`).join('; '));
201
225
  }
202
- const verifyBody = { injectionNodeId };
203
- if (restatements.length > 0)
204
- verifyBody.restatements = restatements;
205
- await callVerifyInjectionIdempotent(call, verifyBody);
226
+ await callVerifyInjectionIdempotent(call, buildVerifyInjectionBody(injectionNodeId, restatements, evidence));
206
227
  // Inward drift: any node reality CONTRADICTED (legitimate_divergence /
207
228
  // shortfall) is a claim the tree got wrong. Turn each one into an inward
208
229
  // crt_drift_proposal so the tree-owner can correct the asserting claim,
@@ -1 +1 @@
1
- {"version":3,"file":"verification.js","sourceRoot":"","sources":["../../src/queries/verification.ts"],"names":[],"mappings":"AAAA,8FAA8F;AAC9F,0GAA0G;AAC1G,gBAAgB;AAEhB;;;;;;GAMG;AAEH,OAAO,EAAE,OAAO,EAAoB,MAAM,aAAa,CAAC;AACxD,OAAO,EACL,mBAAmB,EACnB,iBAAiB,EACjB,kCAAkC,GAMnC,MAAM,iCAAiC,CAAC;AACzC,OAAO,EAAE,YAAY,EAAE,MAAM,iBAAiB,CAAC;AAG/C,MAAM,GAAG,GAAG,YAAY,CAAC,EAAE,MAAM,EAAE,mBAAmB,EAAE,CAAC,CAAC;AA2C1D,MAAM,CAAC,KAAK,UAAU,uBAAuB,CAC3C,SAAkB;IAElB,MAAM,QAAQ,GAAG,MAAM,OAAO,CAC5B,kCAAkC,EAClC,SAAS,CAAC,CAAC,CAAC,EAAE,SAAS,EAAE,CAAC,CAAC,CAAC,EAAE,CAC/B,CAAC;IACF,OAAO,QAAQ,CAAC,KAAK,IAAI,EAAE,CAAC;AAC9B,CAAC;AAED,MAAM,CAAC,KAAK,UAAU,iCAAiC,CACrD,UAAkB,EAClB,OAA4B;IAE5B,MAAM,OAAO,CAAC,6CAA6C,EAAE,EAAE,UAAU,EAAE,OAAO,EAAE,CAAC,CAAC;AACxF,CAAC;AAiBD;;;;;;;;;GASG;AACH,MAAM,UAAU,0BAA0B,CAAC,GAAY;IACrD,MAAM,OAAO,GAAG,GAAG,YAAY,KAAK,CAAC,CAAC,CAAC,GAAG,CAAC,OAAO,CAAC,CAAC,CAAC,OAAO,GAAG,KAAK,QAAQ,CAAC,CAAC,CA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W,CAAC,KAAK,KAAK,CAAC;QAClE,MAAM,UAAU,GAAG,mBAAmB,CAAC;YACrC,WAAW;YACX,aAAa;YACb,cAAc,EAAE,SAAS;YACzB,SAAS;YACT,QAAQ;SACT,CAAC,CAAC;QACH,0EAA0E;QAC1E,4EAA4E;QAC5E,4EAA4E;QAC5E,wEAAwE;QACxE,8CAA8C;QAC9C,MAAM,4BAA4B,CAAC,WAAW,EAAE,QAAQ,EAAE,UAAU,EAAE,MAAM,EAAE,IAAI,CAAC,CAAC;IACtF,CAAC,CAAC;AACJ,CAAC"}
@@ -32,6 +32,51 @@ export interface AssemblyContext {
32
32
  * full branch diff. Absent for every other caller -> integration base.
33
33
  */
34
34
  diffBaseOverride?: string;
35
+ /**
36
+ * The OUT-OF-BAND channel from a resolver back to the caller that requested
37
+ * this assembly. Set by `resolveAssemblyRecipeWithManifest` on the context
38
+ * it hands each resolver, and returned to the caller on the same run -- so a
39
+ * resolver's finding reaches the caller as a TYPED VALUE rather than as text
40
+ * the caller has to recognize in the composed prompt.
41
+ *
42
+ * Optional on the interface only so every existing caller's context literal
43
+ * still compiles; the engine always supplies one, so a resolver can treat it
44
+ * as present in practice and must still tolerate its absence (a resolver
45
+ * called directly by a test, say).
46
+ */
47
+ signals?: AssemblySignals;
48
+ }
49
+ /**
50
+ * Findings a resolver may report to its caller MECHANICALLY, alongside (never
51
+ * inside) the markdown it returns.
52
+ *
53
+ * WHY THIS EXISTS AS A SEPARATE CHANNEL. The composed prompt is the wrong
54
+ * carrier for a control decision. Most of what lands in it is authored
55
+ * elsewhere -- focus context, delivery names, acceptance criteria, session
56
+ * summaries, tree statements -- so any rule of the form "the caller scans the
57
+ * assembled text for X" can be satisfied by anyone who can put X into any of
58
+ * those. Worse, that content is STORED, so a forgery is re-assembled on every
59
+ * tick: a control that was meant to hold one cycle holds forever, which is a
60
+ * freeze rather than a conservative default. A substring match over text an
61
+ * untrusted party can influence is not a channel, it is a suggestion box.
62
+ *
63
+ * Nothing here is ever derived from resolved text. Each field is set by the
64
+ * resolver that PROVED the fact, in the same process and the same assembly run
65
+ * as the caller that reads it, which is the property that makes the signal
66
+ * worth anything: it needs no durable state and cannot be replayed.
67
+ */
68
+ export interface AssemblySignals {
69
+ /**
70
+ * Set ONLY by `focus.review_coverage`, and only when its branch read proved
71
+ * committed work for a delivery whose stored columns say it produced nothing
72
+ * AND the write that would have told the delivery-create gate failed. The
73
+ * audit phase consumes it as an ARMING decision. Full argument:
74
+ * `packages/daemon/src/resolvers/branch-work-arming.ts`.
75
+ */
76
+ unrecordedBranchWorkHold?: {
77
+ readonly provedDeliveryIds: readonly string[];
78
+ readonly cause: string;
79
+ };
35
80
  }
36
81
  /** A resolver function that hydrates a source reference into markdown. */
37
82
  export type SourceResolver = (context: AssemblyContext, params: Record<string, string>) => Promise<string>;
@@ -61,6 +106,12 @@ export interface ResolvedAssembly {
61
106
  content: string;
62
107
  /** One entry per recipe source, in recipe order. */
63
108
  manifest: AssemblyManifestEntry[];
109
+ /**
110
+ * Whatever the resolvers signalled out of band on THIS run (see
111
+ * AssemblySignals). Fresh per call -- never shared across assemblies -- so a
112
+ * signal cannot outlive the read that produced it and freeze a later tick.
113
+ */
114
+ signals: AssemblySignals;
64
115
  }
65
116
  /**
66
117
  * Rough token estimate for a resolved section: ceil(chars / 4).
@@ -1 +1 @@
1
- {"version":3,"file":"assembly-engine.d.ts","sourceRoot":"","sources":["../../src/resolvers/assembly-engine.ts"],"names":[],"mappings":"AAqBA;;;;;;;GAOG;AAEH,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,mBAAmB,CAAC;AAMtD,8DAA8D;AAC9D,MAAM,WAAW,eAAe;IAC9B,OAAO,EAAE,MAAM,CAAC;IAChB,WAAW,EAAE,MAAM,EAAE,CAAC;IACtB,YAAY,EAAE,MAAM,GAAG,IAAI,CAAC;IAC5B,MAAM,EAAE,YAAY,CAAC;IACrB,cAAc,EAAE,MAAM,CAAC;IACvB,SAAS,EAAE,MAAM,CAAC;IAClB;;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us-pushdown.test.ts,
3
- // packages/daemon/src/resolvers/assembly-engine.test.ts,
4
- // packages/daemon/src/resolvers/assembly-resolvers-loop.test.ts,
5
- // packages/daemon/src/resolvers/assembly-resolvers-security-advisory.test.ts,
6
- // packages/daemon/src/resolvers/audit-context-resolvers.test.ts,
7
- // packages/daemon/src/resolvers/delivery-listing-done-since-audit.test.ts,
8
- // packages/daemon/src/resolvers/drift-shortfall-proposals-resolver.test.ts,
9
- // packages/daemon/src/resolvers/escalation-answers-resolver.test.ts,
10
- // packages/daemon/src/resolvers/focus-anchoring-injections-resolver.test.ts,
11
- // packages/daemon/src/resolvers/focus-context-resolver.test.ts,
12
- // packages/daemon/src/resolvers/focus-endpoint-catalog.test.ts,
13
- // packages/daemon/src/resolvers/focus-injections-resolver.test.ts,
14
- // packages/daemon/src/resolvers/focus-last-review-report-resolver.test.ts,
15
- // packages/daemon/src/resolvers/focus-reality-tree-resolver.test.ts,
16
- // packages/daemon/src/resolvers/linear-linked-issues.test.ts,
17
- // packages/daemon/src/resolvers/prd-resolvers.test.ts,
18
- // packages/daemon/src/resolvers/shared/review-window-commits.test.ts,
19
- // packages/daemon/src/spawn/delivered-manifest.test.ts
2
+ // Pinned by: 21 tests -- run: npm run gen:pinned-by -- --list packages/daemon/src/resolvers/assembly-engine.ts
20
3
  // PINNED-BY-END
21
4
  import { createLogger } from '../shell/log.js';
22
5
  const log = createLogger({ module: 'assembly-engine' });
@@ -107,6 +90,13 @@ export async function resolveAssemblyRecipeWithManifest(recipe, context) {
107
90
  }
108
91
  const sections = [];
109
92
  const manifest = [];
93
+ // The out-of-band sink, created HERE and handed to every resolver on a copy
94
+ // of the context. The engine owns it rather than the caller so its lifetime
95
+ // is exactly one assembly run: a caller cannot hold one across ticks and
96
+ // read a stale finding, and a caller cannot pre-set one either (whatever it
97
+ // passed in is replaced below).
98
+ const signals = {};
99
+ const resolverContext = { ...context, signals };
110
100
  let ordinal = 0;
111
101
  for (const ref of recipe) {
112
102
  const { type, params } = parseSourceReference(ref);
@@ -122,7 +112,7 @@ export async function resolveAssemblyRecipeWithManifest(recipe, context) {
122
112
  }
123
113
  else {
124
114
  try {
125
- const content = await resolver(context, params);
115
+ const content = await resolver(resolverContext, params);
126
116
  if (content && content.trim()) {
127
117
  contributed = content;
128
118
  sections.push(contributed);
@@ -144,6 +134,6 @@ export async function resolveAssemblyRecipeWithManifest(recipe, context) {
144
134
  });
145
135
  ordinal += 1;
146
136
  }
147
- return { content: sections.join('\n\n'), manifest };
137
+ return { content: sections.join('\n\n'), manifest, signals };
148
138
  }
149
139
  //# sourceMappingURL=assembly-engine.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"assembly-engine.js","sourceRoot":"","sources":["../../src/resolvers/assembly-engine.ts"],"names":[],"mappings":"AAAA,8FAA8F;AAC9F,iEAAiE;AACjE,2DAA2D;AAC3D,mEAAmE;AACnE,gFAAgF;AAChF,mEAAmE;AACnE,6EAA6E;AAC7E,8EAA8E;AAC9E,uEAAuE;AACvE,+EAA+E;AAC/E,kEAAkE;AAClE,kEAAkE;AAClE,qEAAqE;AACrE,6EAA6E;AAC7E,uEAAuE;AACvE,gEAAgE;AAChE,yDAAyD;AACzD,wEAAwE;AACxE,yDAAyD;AACzD,gBAAgB;AAYhB,OAAO,EAAE,YAAY,EAAE,MAAM,iBAAiB,CAAC;AAE/C,MAAM,GAAG,GAAG,YAAY,CAAC,EAAE,MAAM,EAAE,iBAAiB,EAAE,CAAC,CAAC;AAiExD;;;GAGG;AACH,MAAM,UAAU,cAAc,CAAC,SAAiB;IAC9C,OAAO,SAAS,GAAG,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC,IAAI,CAAC,SAAS,GAAG,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;AACtD,CAAC;AAED,+BAA+B;AAC/B,MAAM,gBAAgB,GAAG,IAAI,GAAG,EAA0B,CAAC;AAE3D,0DAA0D;AAC1D,MAAM,UAAU,sBAAsB,CAAC,UAAkB,EAAE,QAAwB;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E,QAAQ,CAAC,IAAI,CAAC,WAAW,CAAC,CAAC;YAC3B,GAAG,CAAC,IAAI,CAAC,2CAA2C,IAAI,GAAG,CAAC,CAAC;QAC/D,CAAC;aAAM,CAAC;YACN,IAAI,CAAC;gBACH,MAAM,OAAO,GAAG,MAAM,QAAQ,CAAC,eAAe,EAAE,MAAM,CAAC,CAAC;gBACxD,IAAI,OAAO,IAAI,OAAO,CAAC,IAAI,EAAE,EAAE,CAAC;oBAC9B,WAAW,GAAG,OAAO,CAAC;oBACtB,QAAQ,CAAC,IAAI,CAAC,WAAW,CAAC,CAAC;gBAC7B,CAAC;YACH,CAAC;YAAC,OAAO,GAAG,EAAE,CAAC;gBACb,MAAM,OAAO,GAAI,GAAa,CAAC,OAAO,CAAC;gBACvC,WAAW,GAAG,qCAAqC,GAAG,MAAM,OAAO,MAAM,CAAC;gBAC1E,QAAQ,CAAC,IAAI,CAAC,WAAW,CAAC,CAAC;gBAC3B,GAAG,CAAC,IAAI,CAAC,6BAA6B,GAAG,MAAM,OAAO,EAAE,CAAC,CAAC;YAC5D,CAAC;QACH,CAAC;QAED,MAAM,SAAS,GAAG,WAAW,CAAC,MAAM,CAAC;QACrC,QAAQ,CAAC,IAAI,CAAC;YACZ,SAAS,EAAE,GAAG;YACd,OAAO;YACP,SAAS;YACT,eAAe,EAAE,cAAc,CAAC,SAAS,CAAC;SAC3C,CAAC,CAAC;QACH,OAAO,IAAI,CAAC,CAAC;IACf,CAAC;IAED,OAAO,EAAE,OAAO,EAAE,QAAQ,CAAC,IAAI,CAAC,MAAM,CAAC,EAAE,QAAQ,EAAE,OAAO,EAAE,CAAC;AAC/D,CAAC"}
@@ -0,0 +1,133 @@
1
+ /**
2
+ * The ARMING contract for the delivery-create residue gate: the one move left
3
+ * to the daemon when it has PROVED residue it cannot record.
4
+ *
5
+ * WHY THIS IS NOT AT THE GATE, AND CANNOT BE. The residue gate runs on the
6
+ * edge (`supabase/functions/_shared/delivery-review-coverage.ts`) and decides
7
+ * from stored state alone. At the moment of a create it has to separate two
8
+ * worlds:
9
+ *
10
+ * A. a queued delivery, `iteration_count = 0`, no `merge_commit_sha`, no id
11
+ * in `product_focuses.branch_work_delivery_ids` -- and a real
12
+ * `Telora-Delivery` commit sitting on the focus branch that the daemon
13
+ * has just found and could not write down;
14
+ * B. the same row, on the same focus, with a branch that genuinely carries
15
+ * nothing for it.
16
+ *
17
+ * Every column the edge can read is IDENTICAL in A and B. A commit is not a
18
+ * row write, so nothing moved when the residue appeared, and the one write
19
+ * that would have recorded it is the write that failed. No function of stored
20
+ * state separates identical inputs, so a rule that refuses A refuses B as
21
+ * well -- and refusing B holds every declared-but-unstarted delivery on every
22
+ * focus, which is the freeze, not a gate. That is an information problem, not
23
+ * a tuning problem: three rounds of fixes at the gate (a retraction write, a
24
+ * dated reading, a positive-only reading) each foundered on the same fact.
25
+ *
26
+ * WHO CAN SEPARATE THEM. Exactly one party -- the one holding the repository
27
+ * at the moment it decides. The daemon's review-coverage read
28
+ * (`packages/daemon/src/resolvers/focus-review-coverage.ts`) IS that party: it
29
+ * greps the branch for the trailer, and its answer is true in the same act
30
+ * that produced it, so it needs no durable state to survive in. The defect was
31
+ * never that reading. It was DELEGATION: having proved the residue, the daemon
32
+ * handed the create decision to an actor that does not hold the reading (the
33
+ * audit/scoping pass), through the channel that had just failed.
34
+ *
35
+ * SO THE RULE IS ABOUT ARMING, NOT ABOUT ROWS. When the read proves a hold the
36
+ * gate cannot be told about, the daemon does not arm a pass that can create.
37
+ * No write is required, which is precisely what makes the rule available in
38
+ * the failure it exists for: whether the pass runs at all is decided in the
39
+ * same process, in the same act, as the branch read.
40
+ *
41
+ * NOT A FREEZE, AND THE CONTROL IS THE PROOF. The condition is narrow and
42
+ * self-clearing. It fires only when the branch was READABLE, the trailer
43
+ * search FOUND a commit for a delivery whose own columns say it produced
44
+ * nothing, and the hand-off then failed. World B -- nothing found -- arms the
45
+ * pass normally and its create lands. A firing costs one audit cycle on a
46
+ * focus that demonstrably carries unreviewed residue, and it clears the moment
47
+ * the write channel returns (the next pass records the ids, and the gate then
48
+ * holds on its own evidence) or a completed review covers the delivery.
49
+ *
50
+ * THE CHANNEL IS A TYPED SIGNAL, NOT THE PROMPT TEXT -- AND THE FIRST CUT GOT
51
+ * THIS WRONG. It carried the decision as a sentinel STRING the audit phase
52
+ * looked for in the whole assembled prompt. That prompt is mostly content
53
+ * other parties author: focus context, delivery names, acceptance criteria,
54
+ * session summaries, tree statements. Any of them could carry the token with
55
+ * no branch proof and no failed write behind it, and the phase would refuse to
56
+ * arm. The first cut priced that as "costs one skipped cycle"; it does not.
57
+ * The forged text is STORED -- a delivery name is re-assembled on every tick --
58
+ * so the refusal repeats forever. That is a FREEZE, which is the one outcome
59
+ * this contract forbids, and it also puts the reason-bearing override out of
60
+ * reach because no pass runs to declare one. "Fails toward holding" is only
61
+ * safe while the hold can discharge.
62
+ *
63
+ * So the decision now travels as `AssemblySignals.unrecordedBranchWorkHold`
64
+ * (`packages/daemon/src/resolvers/assembly-engine.ts`), a field the assembly
65
+ * engine creates per run and hands to each resolver, and which only the
66
+ * review-coverage resolver's proved-and-unrecorded branch sets. Nothing
67
+ * derives it from resolved text, so no authored content can assert it. The
68
+ * lengthening/obfuscating alternative -- a rarer token -- is the same
69
+ * enumeration mistake one round later: a guess about what nobody will type is
70
+ * not an authentication.
71
+ *
72
+ * @module resolvers/branch-work-arming
73
+ */
74
+ import type { AssemblySignals } from './assembly-engine.js';
75
+ /**
76
+ * A proved-but-unrecordable branch-work hold, as the resolver reports it.
77
+ *
78
+ * `provedDeliveryIds` are the ids the trailer search actually found; `cause`
79
+ * is the write failure that stopped them reaching the gate. Both exist so the
80
+ * refusal is diagnosable, not so anything re-derives the decision from them.
81
+ */
82
+ export interface UnrecordedBranchWorkHold {
83
+ readonly provedDeliveryIds: readonly string[];
84
+ readonly cause: string;
85
+ }
86
+ /**
87
+ * The token the review-coverage section prints when it proved a hold the
88
+ * delivery-create gate will never see.
89
+ *
90
+ * PROSE ONLY. It is the human's handle on the event -- grep a captured prompt
91
+ * for it and the one line explaining why no pass ran comes back -- and it is
92
+ * deliberately NOT read by anything. No code matches on it; the arming
93
+ * decision reads `AssemblySignals.unrecordedBranchWorkHold` and nothing else.
94
+ * If a future reader is tempted to re-add a `assembled.includes(...)` check
95
+ * here: that is the defect this module was rewritten to remove, and the test
96
+ * `a delivery NAMED as the sentinel cannot forge the hold` in
97
+ * `packages/daemon/src/completion/review-coverage-seam.test.ts` exists to go
98
+ * red the moment it comes back.
99
+ */
100
+ export declare const UNRECORDED_BRANCH_WORK_HOLD_SENTINEL = "TELORA-UNRECORDED-BRANCH-WORK-HOLD";
101
+ /**
102
+ * The reason text for a review-coverage read whose PROVED branch-work evidence
103
+ * could not be handed to the delivery-create gate.
104
+ *
105
+ * Carries three things and nothing else: the sentinel (so a human grepping a
106
+ * captured prompt lands on this line), the delivery ids the branch search
107
+ * proved (so the claim is checkable against the repository), and the transport
108
+ * failure (so the outage is diagnosable rather than merely reported). It
109
+ * states the consequence in the imperative because the section it lands in is
110
+ * also the last thing written about this cycle: no pass is armed, so nothing
111
+ * downstream of it will elaborate. It EXPLAINS the refusal; the refusal itself
112
+ * is carried by the signal.
113
+ */
114
+ export declare function renderUnrecordedBranchWorkHold(provedDeliveryIds: readonly string[], cause: string): string;
115
+ /**
116
+ * Report the hold on the assembly's out-of-band channel.
117
+ *
118
+ * Tolerates a missing sink (a resolver invoked directly, outside the engine)
119
+ * because a resolver is a reading, not a control point: it renders its section
120
+ * either way and the caller that never offered a sink was never going to make
121
+ * an arming decision. Not a silent failure mode in production -- the engine
122
+ * always supplies one.
123
+ */
124
+ export declare function signalUnrecordedBranchWorkHold(signals: AssemblySignals | undefined, hold: UnrecordedBranchWorkHold): void;
125
+ /**
126
+ * Did the resolvers on this assembly run prove a hold the gate cannot enforce?
127
+ *
128
+ * The whole arming decision, and its entire input is a field no resolved text
129
+ * can reach. Returns the hold itself rather than a boolean so the caller can
130
+ * name the proved ids in its rationale without re-parsing anything.
131
+ */
132
+ export declare function readUnrecordedBranchWorkHold(signals: AssemblySignals | undefined): UnrecordedBranchWorkHold | null;
133
+ //# sourceMappingURL=branch-work-arming.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"branch-work-arming.d.ts","sourceRoot":"","sources":["../../src/resolvers/branch-work-arming.ts"],"names":[],"mappings":"AAIA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAwEG;AAEH,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,sBAAsB,CAAC;AAE5D;;;;;;GAMG;AACH,MAAM,WAAW,wBAAwB;IACvC,QAAQ,CAAC,iBAAiB,EAAE,SAAS,MAAM,EAAE,CAAC;IAC9C,QAAQ,CAAC,KAAK,EAAE,MAAM,CAAC;CACxB;AAED;;;;;;;;;;;;;GAaG;AACH,eAAO,MAAM,oCAAoC,uCAAuC,CAAC;AAEzF;;;;;;;;;;;;GAYG;AACH,wBAAgB,8BAA8B,CAC5C,iBAAiB,EAAE,SAAS,MAAM,EAAE,EACpC,KAAK,EAAE,MAAM,GACZ,MAAM,CAYR;AAED;;;;;;;;GAQG;AACH,wBAAgB,8BAA8B,CAC5C,OAAO,EAAE,eAAe,GAAG,SAAS,EACpC,IAAI,EAAE,wBAAwB,GAC7B,IAAI,CAGN;AAED;;;;;;GAMG;AACH,wBAAgB,4BAA4B,CAC1C,OAAO,EAAE,eAAe,GAAG,SAAS,GACnC,wBAAwB,GAAG,IAAI,CAEjC"}
@@ -0,0 +1,67 @@
1
+ // PINNED-BY-BEGIN (generated by gen:pinned-by -- do not hand-edit; checked by lint:pinned-by)
2
+ // Pinned by: packages/daemon/src/completion/review-coverage-seam.test.ts
3
+ // PINNED-BY-END
4
+ /**
5
+ * The token the review-coverage section prints when it proved a hold the
6
+ * delivery-create gate will never see.
7
+ *
8
+ * PROSE ONLY. It is the human's handle on the event -- grep a captured prompt
9
+ * for it and the one line explaining why no pass ran comes back -- and it is
10
+ * deliberately NOT read by anything. No code matches on it; the arming
11
+ * decision reads `AssemblySignals.unrecordedBranchWorkHold` and nothing else.
12
+ * If a future reader is tempted to re-add a `assembled.includes(...)` check
13
+ * here: that is the defect this module was rewritten to remove, and the test
14
+ * `a delivery NAMED as the sentinel cannot forge the hold` in
15
+ * `packages/daemon/src/completion/review-coverage-seam.test.ts` exists to go
16
+ * red the moment it comes back.
17
+ */
18
+ export const UNRECORDED_BRANCH_WORK_HOLD_SENTINEL = 'TELORA-UNRECORDED-BRANCH-WORK-HOLD';
19
+ /**
20
+ * The reason text for a review-coverage read whose PROVED branch-work evidence
21
+ * could not be handed to the delivery-create gate.
22
+ *
23
+ * Carries three things and nothing else: the sentinel (so a human grepping a
24
+ * captured prompt lands on this line), the delivery ids the branch search
25
+ * proved (so the claim is checkable against the repository), and the transport
26
+ * failure (so the outage is diagnosable rather than merely reported). It
27
+ * states the consequence in the imperative because the section it lands in is
28
+ * also the last thing written about this cycle: no pass is armed, so nothing
29
+ * downstream of it will elaborate. It EXPLAINS the refusal; the refusal itself
30
+ * is carried by the signal.
31
+ */
32
+ export function renderUnrecordedBranchWorkHold(provedDeliveryIds, cause) {
33
+ const ids = provedDeliveryIds.join(', ');
34
+ return (`${UNRECORDED_BRANCH_WORK_HOLD_SENTINEL} -- the branch search PROVED committed work for ` +
35
+ `delivery ${ids}, whose own columns say it produced nothing, and the hand-off to the ` +
36
+ `delivery-create gate failed (${cause}). The gate decides from stored columns, and those ` +
37
+ `columns are now identical to a focus whose branch is genuinely clean, so it cannot refuse ` +
38
+ `a sibling create over this residue and no rule it could be given would refuse this focus ` +
39
+ `without freezing every unstarted delivery everywhere. No create-capable pass is armed for ` +
40
+ `this cycle. It clears when the evidence write lands (the next read records the ids and the ` +
41
+ `gate holds on its own) or when a completed review covers the delivery.`);
42
+ }
43
+ /**
44
+ * Report the hold on the assembly's out-of-band channel.
45
+ *
46
+ * Tolerates a missing sink (a resolver invoked directly, outside the engine)
47
+ * because a resolver is a reading, not a control point: it renders its section
48
+ * either way and the caller that never offered a sink was never going to make
49
+ * an arming decision. Not a silent failure mode in production -- the engine
50
+ * always supplies one.
51
+ */
52
+ export function signalUnrecordedBranchWorkHold(signals, hold) {
53
+ if (!signals)
54
+ return;
55
+ signals.unrecordedBranchWorkHold = hold;
56
+ }
57
+ /**
58
+ * Did the resolvers on this assembly run prove a hold the gate cannot enforce?
59
+ *
60
+ * The whole arming decision, and its entire input is a field no resolved text
61
+ * can reach. Returns the hold itself rather than a boolean so the caller can
62
+ * name the proved ids in its rationale without re-parsing anything.
63
+ */
64
+ export function readUnrecordedBranchWorkHold(signals) {
65
+ return signals?.unrecordedBranchWorkHold ?? null;
66
+ }
67
+ //# sourceMappingURL=branch-work-arming.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"branch-work-arming.js","sourceRoot":"","sources":["../../src/resolvers/branch-work-arming.ts"],"names":[],"mappings":"AAAA,8FAA8F;AAC9F,yEAAyE;AACzE,gBAAgB;AA0FhB;;;;;;;;;;;;;GAaG;AACH,MAAM,CAAC,MAAM,oCAAoC,GAAG,oCAAoC,CAAC;AAEzF;;;;;;;;;;;;GAYG;AACH,MAAM,UAAU,8BAA8B,CAC5C,iBAAoC,EACpC,KAAa;IAEb,MAAM,GAAG,GAAG,iBAAiB,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;IACzC,OAAO,CACL,GAAG,oCAAoC,kDAAkD;QACzF,YAAY,GAAG,uEAAuE;QACtF,gCAAgC,KAAK,qDAAqD;QAC1F,4FAA4F;QAC5F,2FAA2F;QAC3F,4FAA4F;QAC5F,6FAA6F;QAC7F,wEAAwE,CACzE,CAAC;AACJ,CAAC;AAED;;;;;;;;GAQG;AACH,MAAM,UAAU,8BAA8B,CAC5C,OAAoC,EACpC,IAA8B;IAE9B,IAAI,CAAC,OAAO;QAAE,OAAO;IACrB,OAAO,CAAC,wBAAwB,GAAG,IAAI,CAAC;AAC1C,CAAC;AAED;;;;;;GAMG;AACH,MAAM,UAAU,4BAA4B,CAC1C,OAAoC;IAEpC,OAAO,OAAO,EAAE,wBAAwB,IAAI,IAAI,CAAC;AACnD,CAAC"}
@@ -0,0 +1,24 @@
1
+ import type { AssemblyContext } from './assembly-engine.js';
2
+ import type { FocusCriteriaStanding } from '../queries/focus-criteria-standing.js';
3
+ /** Section heading, shared by the rendered standing and the failure line. */
4
+ export declare const CRITERIA_STANDING_HEADING = "## Focus acceptance criteria standing (what did THIS focus declare it was for?)";
5
+ /** Render the standing. Never returns an empty string. */
6
+ export declare function renderFocusCriteriaStanding(standing: FocusCriteriaStanding): string;
7
+ /**
8
+ * Render the EXPLICIT failure line. Rendered instead of nothing on every read
9
+ * failure, because an absent section reads as "there is nothing left to
10
+ * address" -- a floor nobody measured.
11
+ */
12
+ export declare function renderFocusCriteriaStandingFailure(reason: string): string;
13
+ /** Injected seam; the default is the real product-api read. */
14
+ export interface FocusCriteriaStandingResolverDeps {
15
+ getStanding: (focusId: string) => Promise<FocusCriteriaStanding>;
16
+ }
17
+ /**
18
+ * Resolve the section. Exported (with an injectable deps seam) so tests drive
19
+ * it without registering a module mock.
20
+ */
21
+ export declare function resolveFocusCriteriaStanding(context: AssemblyContext, deps?: FocusCriteriaStandingResolverDeps): Promise<string>;
22
+ /** Register this module's resolver(s). Called from initResolvers() -- not an import side effect. */
23
+ export declare function registerFocusCriteriaStandingResolver(): void;
24
+ //# sourceMappingURL=focus-criteria-standing.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"focus-criteria-standing.d.ts","sourceRoot":"","sources":["../../src/resolvers/focus-criteria-standing.ts"],"names":[],"mappings":"AA8CA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,sBAAsB,CAAC;AAC5D,OAAO,KAAK,EAEV,qBAAqB,EACtB,MAAM,uCAAuC,CAAC;AAK/C,6EAA6E;AAC7E,eAAO,MAAM,yBAAyB,oFAC6C,CAAC;AAwFpF,0DAA0D;AAC1D,wBAAgB,2BAA2B,CAAC,QAAQ,EAAE,qBAAqB,GAAG,MAAM,CAmBnF;AAED;;;;GAIG;AACH,wBAAgB,kCAAkC,CAAC,MAAM,EAAE,MAAM,GAAG,MAAM,CAazE;AAID,+DAA+D;AAC/D,MAAM,WAAW,iCAAiC;IAChD,WAAW,EAAE,CAAC,OAAO,EAAE,MAAM,KAAK,OAAO,CAAC,qBAAqB,CAAC,CAAC;CAClE;AA+CD;;;GAGG;AACH,wBAAsB,4BAA4B,CAChD,OAAO,EAAE,eAAe,EACxB,IAAI,GAAE,iCAA+C,GACpD,OAAO,CAAC,MAAM,CAAC,CAkBjB;AAED,oGAAoG;AACpG,wBAAgB,qCAAqC,IAAI,IAAI,CAG5D"}