@telora/daemon 0.20.21 → 0.20.32
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/build-info.json +4 -3
- package/dist/audit-phase.d.ts +43 -6
- package/dist/audit-phase.d.ts.map +1 -1
- package/dist/audit-phase.js +124 -23
- package/dist/audit-phase.js.map +1 -1
- package/dist/auto-update.d.ts +87 -0
- package/dist/auto-update.d.ts.map +1 -1
- package/dist/auto-update.js +142 -8
- package/dist/auto-update.js.map +1 -1
- package/dist/cascade-restatement.d.ts +13 -147
- package/dist/cascade-restatement.d.ts.map +1 -1
- package/dist/cascade-restatement.js +13 -429
- package/dist/cascade-restatement.js.map +1 -1
- package/dist/focus-engine.d.ts.map +1 -1
- package/dist/focus-engine.js +15 -0
- package/dist/focus-engine.js.map +1 -1
- package/dist/focus-loop-registry.d.ts.map +1 -1
- package/dist/focus-loop-registry.js +43 -90
- package/dist/focus-loop-registry.js.map +1 -1
- package/dist/focus-loop.d.ts +0 -2
- package/dist/focus-loop.d.ts.map +1 -1
- package/dist/focus-loop.js +33 -25
- package/dist/focus-loop.js.map +1 -1
- package/dist/focus-phase.d.ts +26 -0
- package/dist/focus-phase.d.ts.map +1 -1
- package/dist/focus-phase.js +38 -0
- package/dist/focus-phase.js.map +1 -1
- package/dist/focus-prompt-builder.d.ts.map +1 -1
- package/dist/focus-prompt-builder.js +5 -1
- package/dist/focus-prompt-builder.js.map +1 -1
- package/dist/listener.d.ts.map +1 -1
- package/dist/listener.js +40 -9
- package/dist/listener.js.map +1 -1
- package/dist/loops/llm-client.d.ts.map +1 -1
- package/dist/loops/llm-client.js +17 -4
- package/dist/loops/llm-client.js.map +1 -1
- package/dist/prompt-listing.d.ts +25 -0
- package/dist/prompt-listing.d.ts.map +1 -1
- package/dist/prompt-listing.js +61 -0
- package/dist/prompt-listing.js.map +1 -1
- package/dist/queries/audit-runs.d.ts +56 -2
- package/dist/queries/audit-runs.d.ts.map +1 -1
- package/dist/queries/audit-runs.js +40 -0
- package/dist/queries/audit-runs.js.map +1 -1
- package/dist/queries/deliveries.d.ts +27 -0
- package/dist/queries/deliveries.d.ts.map +1 -1
- package/dist/queries/deliveries.js.map +1 -1
- package/dist/queries/focuses.d.ts +0 -9
- package/dist/queries/focuses.d.ts.map +1 -1
- package/dist/queries/focuses.js +0 -14
- package/dist/queries/focuses.js.map +1 -1
- package/dist/resolvers/index.d.ts +1 -1
- package/dist/resolvers/index.d.ts.map +1 -1
- package/dist/resolvers/index.js +1 -1
- package/dist/resolvers/index.js.map +1 -1
- package/dist/resolvers/shared/audit.d.ts +5 -0
- package/dist/resolvers/shared/audit.d.ts.map +1 -1
- package/dist/resolvers/shared/audit.js +8 -3
- package/dist/resolvers/shared/audit.js.map +1 -1
- package/dist/resolvers/shared/git-diff.d.ts +13 -0
- package/dist/resolvers/shared/git-diff.d.ts.map +1 -1
- package/dist/resolvers/shared/git-diff.js +30 -0
- package/dist/resolvers/shared/git-diff.js.map +1 -1
- package/dist/security-scan-engine.d.ts +9 -1
- package/dist/security-scan-engine.d.ts.map +1 -1
- package/dist/security-scan-engine.js +25 -2
- package/dist/security-scan-engine.js.map +1 -1
- package/dist/spawn/review-role-fallback.d.ts +74 -0
- package/dist/spawn/review-role-fallback.d.ts.map +1 -0
- package/dist/spawn/review-role-fallback.js +62 -0
- package/dist/spawn/review-role-fallback.js.map +1 -0
- package/dist/staleness-sensor.d.ts +153 -0
- package/dist/staleness-sensor.d.ts.map +1 -0
- package/dist/staleness-sensor.js +308 -0
- package/dist/staleness-sensor.js.map +1 -0
- package/dist/unified-shell.d.ts.map +1 -1
- package/dist/unified-shell.js +11 -0
- package/dist/unified-shell.js.map +1 -1
- package/dist/verification-engine.d.ts +17 -1
- package/dist/verification-engine.d.ts.map +1 -1
- package/dist/verification-engine.js +143 -104
- package/dist/verification-engine.js.map +1 -1
- package/dist/verification-feedback.d.ts +68 -1
- package/dist/verification-feedback.d.ts.map +1 -1
- package/dist/verification-feedback.js +175 -0
- package/dist/verification-feedback.js.map +1 -1
- package/dist/verify-reconciliation.d.ts +16 -1
- package/dist/verify-reconciliation.d.ts.map +1 -1
- package/dist/verify-reconciliation.js +18 -2
- package/dist/verify-reconciliation.js.map +1 -1
- package/dist/verify-restatement.d.ts +7 -0
- package/dist/verify-restatement.d.ts.map +1 -1
- package/dist/verify-restatement.js +1 -0
- package/dist/verify-restatement.js.map +1 -1
- package/dist/version-check.d.ts +6 -0
- package/dist/version-check.d.ts.map +1 -1
- package/dist/version-check.js +1 -1
- package/dist/version-check.js.map +1 -1
- package/package.json +2 -2
- package/dist/drift-ratify-loop.d.ts +0 -68
- package/dist/drift-ratify-loop.d.ts.map +0 -1
- package/dist/drift-ratify-loop.js +0 -161
- package/dist/drift-ratify-loop.js.map +0 -1
- package/dist/negative-branch.d.ts +0 -136
- package/dist/negative-branch.d.ts.map +0 -1
- package/dist/negative-branch.js +0 -241
- package/dist/negative-branch.js.map +0 -1
- package/dist/shortfall-disposition-config.d.ts +0 -34
- package/dist/shortfall-disposition-config.d.ts.map +0 -1
- package/dist/shortfall-disposition-config.js +0 -46
- package/dist/shortfall-disposition-config.js.map +0 -1
- package/dist/shortfall-disposition-loop.d.ts +0 -86
- package/dist/shortfall-disposition-loop.d.ts.map +0 -1
- package/dist/shortfall-disposition-loop.js +0 -309
- package/dist/shortfall-disposition-loop.js.map +0 -1
|
@@ -17,12 +17,21 @@
|
|
|
17
17
|
*/
|
|
18
18
|
import { DELIVERY_STATUS, sendMessage } from '@telora/daemon-core';
|
|
19
19
|
import { updateDeliveryStatus, } from './queries/deliveries.js';
|
|
20
|
+
import { resolveReconciledWrite } from './delivery-reconciler-apply.js';
|
|
20
21
|
import { getActiveTeams } from './focus-team-state.js';
|
|
21
22
|
import { parseFailingTests } from './verification-failure-parser.js';
|
|
22
23
|
import { createLogger } from './log.js';
|
|
23
24
|
const log = createLogger({ module: 'verification' });
|
|
24
25
|
/** gate_state guard name a deterministic verification failure reports under. */
|
|
25
26
|
export const DETERMINISTIC_VERIFICATION_GUARD = 'deterministic_verification';
|
|
27
|
+
/**
|
|
28
|
+
* gate_state guard name a verify-SHORTFALL reconciliation hold reports under.
|
|
29
|
+
* Distinct from the deterministic guard: a shortfall hold means the declared
|
|
30
|
+
* desired effect was not realized by the diff, NOT that a shell command failed.
|
|
31
|
+
* A reader must never see this conflated with a passed:false
|
|
32
|
+
* deterministic_verification whose exitCode is 0.
|
|
33
|
+
*/
|
|
34
|
+
export const SHORTFALL_RECONCILIATION_GUARD = 'verify_shortfall_reconciliation';
|
|
26
35
|
/** Build the gate_state for a failed deterministic run. Pure -- exported for testing. */
|
|
27
36
|
export function buildVerificationFailureGateState(detail) {
|
|
28
37
|
return {
|
|
@@ -109,4 +118,170 @@ export async function deliverVerificationFailureFeedback(v, result, organization
|
|
|
109
118
|
}
|
|
110
119
|
return { gateWritten, injected, detail };
|
|
111
120
|
}
|
|
121
|
+
// ---------------------------------------------------------------------------
|
|
122
|
+
// Shortfall-reconciliation gate hold (distinct origin from a deterministic run)
|
|
123
|
+
// ---------------------------------------------------------------------------
|
|
124
|
+
/** Build the gate_state for a verify-shortfall reconciliation hold. Pure -- exported for testing. */
|
|
125
|
+
export function buildShortfallGateState(detail) {
|
|
126
|
+
return {
|
|
127
|
+
blocking: [{ guardName: SHORTFALL_RECONCILIATION_GUARD, passed: false }],
|
|
128
|
+
warnings: [],
|
|
129
|
+
evaluatedAt: detail.heldAt,
|
|
130
|
+
shortfallReconciliation: detail,
|
|
131
|
+
};
|
|
132
|
+
}
|
|
133
|
+
/** Build the message injected into a live team for a shortfall hold. Pure -- exported for testing. */
|
|
134
|
+
export function buildShortfallInjectMessage(deliveryName, detail) {
|
|
135
|
+
const lines = [
|
|
136
|
+
`VERIFY HELD for delivery "${deliveryName}": the achieved outcome falls short of the declared desired effect.`,
|
|
137
|
+
'',
|
|
138
|
+
'This is NOT a failing-test failure -- the deterministic check is not the blocker. The verify ' +
|
|
139
|
+
'reconciliation compared what your diff delivered against the declared intent for each targeted ' +
|
|
140
|
+
'node and found a gap. Close the gap in the diff, then commit.',
|
|
141
|
+
'',
|
|
142
|
+
`Declared-vs-achieved gap(s) (${detail.shortfalls.length}):`,
|
|
143
|
+
];
|
|
144
|
+
for (const s of detail.shortfalls) {
|
|
145
|
+
lines.push(`- node ${s.nodeId}`, ` declared: ${s.declared}`, ` achieved: ${s.achieved}`, ` shortfall: ${s.reason}`);
|
|
146
|
+
if (s.diffCitation)
|
|
147
|
+
lines.push(` diff citation: ${s.diffCitation}`);
|
|
148
|
+
}
|
|
149
|
+
return lines.join('\n');
|
|
150
|
+
}
|
|
151
|
+
/**
|
|
152
|
+
* Deliver failure feedback for a verify-SHORTFALL reconciliation hold: write
|
|
153
|
+
* gate_state under the shortfall guard (never the deterministic guard) and
|
|
154
|
+
* inject the declared-vs-achieved gap into the live coding team when one is
|
|
155
|
+
* running. Best-effort throughout -- a feedback failure must never crash the
|
|
156
|
+
* verification tick.
|
|
157
|
+
*/
|
|
158
|
+
export async function deliverShortfallFailureFeedback(v, shortfalls, organizationId, deps = {}) {
|
|
159
|
+
const d = { ...defaultDeps(), ...deps };
|
|
160
|
+
const detail = {
|
|
161
|
+
heldAt: d.now(),
|
|
162
|
+
shortfalls: shortfalls.map((s) => ({
|
|
163
|
+
nodeId: s.nodeId,
|
|
164
|
+
declared: s.declaredStatement,
|
|
165
|
+
achieved: s.achievedStatement,
|
|
166
|
+
reason: s.reason,
|
|
167
|
+
...(s.diffCitation ? { diffCitation: s.diffCitation } : {}),
|
|
168
|
+
})),
|
|
169
|
+
};
|
|
170
|
+
const gateState = buildShortfallGateState(detail);
|
|
171
|
+
let gateWritten = false;
|
|
172
|
+
try {
|
|
173
|
+
await d.writeGateState(v.deliveryId, gateState, organizationId);
|
|
174
|
+
gateWritten = true;
|
|
175
|
+
}
|
|
176
|
+
catch (err) {
|
|
177
|
+
log.warn(`failed to write shortfall gate_state for delivery ${v.deliveryId}:`, err.message);
|
|
178
|
+
}
|
|
179
|
+
let injected = false;
|
|
180
|
+
if (v.focusId) {
|
|
181
|
+
const team = d.getActiveTeams().get(v.focusId);
|
|
182
|
+
// Do not retask a live review team (parity with directive inject guard).
|
|
183
|
+
if (team && team.leadStdin && team.sessionType !== 'review') {
|
|
184
|
+
try {
|
|
185
|
+
d.sendMessage(team.leadStdin, buildShortfallInjectMessage(v.deliveryName, detail));
|
|
186
|
+
injected = true;
|
|
187
|
+
}
|
|
188
|
+
catch (err) {
|
|
189
|
+
log.warn(`failed to inject shortfall hold to team ${v.focusId}:`, err.message);
|
|
190
|
+
}
|
|
191
|
+
}
|
|
192
|
+
}
|
|
193
|
+
return { gateWritten, injected, detail };
|
|
194
|
+
}
|
|
195
|
+
const defaultRequeueDeps = () => ({
|
|
196
|
+
...defaultDeps(),
|
|
197
|
+
transitionDelivery: async (deliveryId, target, gateState, transition) => {
|
|
198
|
+
await updateDeliveryStatus(deliveryId, target, undefined, gateState, undefined, transition);
|
|
199
|
+
},
|
|
200
|
+
resolveReconciledWrite,
|
|
201
|
+
});
|
|
202
|
+
/**
|
|
203
|
+
* Re-enter a verify SHORTFALL as bounded re-work instead of a human inbox item.
|
|
204
|
+
*
|
|
205
|
+
* A measured declared-vs-achieved shortfall is an EXECUTION gap the team that
|
|
206
|
+
* produced it can close -- not an intent question for a human. So rather than
|
|
207
|
+
* filing a needs_intent escalation, this routes the delivery verify ->
|
|
208
|
+
* verify_failed through the SAME single-writer reconciler the open-issues
|
|
209
|
+
* back-path uses (listener-auto-advance). The reconciler then steps
|
|
210
|
+
* verify_failed -> queued -> coding (delivery-reconciler), and the server-side
|
|
211
|
+
* iteration_count increment on the verify->verify_failed transition makes the
|
|
212
|
+
* EXISTING verify_failed iteration cap (TELORA_VERIFY_FAILED_ITERATION_CAP ->
|
|
213
|
+
* verify_gate_unclearable, needs_operator) bound the re-work. That cap is the
|
|
214
|
+
* sole genuine human residue: closing the gap autonomously never becomes
|
|
215
|
+
* spending forever on an unclearable one.
|
|
216
|
+
*
|
|
217
|
+
* A shortfall is a differential-side `gaps_found`: the reconciler already routes
|
|
218
|
+
* a gaps_found verify delivery to verify_failed, so we feed it that signal (and
|
|
219
|
+
* the legacy target verify_failed) -- apply-mode and legacy agree, no
|
|
220
|
+
* divergence. `issues: []` is accurate for the VERIFY branch (a shortfall
|
|
221
|
+
* delivery has no blocking open work; that is why it reached verify).
|
|
222
|
+
*
|
|
223
|
+
* The declared/achieved/reason detail rides in gate_state (shortfall guard) so
|
|
224
|
+
* the re-queued team's resume/wake prompt carries the specific gap; when a
|
|
225
|
+
* coding team is still live we also inject it immediately (best-effort fast
|
|
226
|
+
* path). Best-effort throughout -- a feedback failure must never crash the tick.
|
|
227
|
+
*/
|
|
228
|
+
export async function requeueShortfallAsRework(v, shortfalls, organizationId, deps = {}) {
|
|
229
|
+
const d = { ...defaultRequeueDeps(), ...deps };
|
|
230
|
+
const detail = {
|
|
231
|
+
heldAt: d.now(),
|
|
232
|
+
shortfalls: shortfalls.map((s) => ({
|
|
233
|
+
nodeId: s.nodeId,
|
|
234
|
+
declared: s.declaredStatement,
|
|
235
|
+
achieved: s.achievedStatement,
|
|
236
|
+
reason: s.reason,
|
|
237
|
+
...(s.diffCitation ? { diffCitation: s.diffCitation } : {}),
|
|
238
|
+
})),
|
|
239
|
+
};
|
|
240
|
+
const gateState = buildShortfallGateState(detail);
|
|
241
|
+
const decision = d.resolveReconciledWrite({
|
|
242
|
+
site: 'verify-shortfall',
|
|
243
|
+
deliveryId: v.deliveryId,
|
|
244
|
+
deliveryName: v.deliveryName,
|
|
245
|
+
legacyTarget: DELIVERY_STATUS.VERIFY_FAILED,
|
|
246
|
+
input: {
|
|
247
|
+
currentStatus: DELIVERY_STATUS.VERIFY,
|
|
248
|
+
issues: [],
|
|
249
|
+
gitState: { worktreeCommitted: true },
|
|
250
|
+
guardVerdict: null,
|
|
251
|
+
reviewState: {
|
|
252
|
+
outcome: 'gaps_found',
|
|
253
|
+
reviewRequested: true,
|
|
254
|
+
reportExists: false,
|
|
255
|
+
sessionType: 'coding',
|
|
256
|
+
succeeded: false,
|
|
257
|
+
},
|
|
258
|
+
},
|
|
259
|
+
});
|
|
260
|
+
let transitioned = false;
|
|
261
|
+
try {
|
|
262
|
+
await d.transitionDelivery(v.deliveryId, decision.target, gateState, {
|
|
263
|
+
organizationId,
|
|
264
|
+
fromStatus: DELIVERY_STATUS.VERIFY,
|
|
265
|
+
});
|
|
266
|
+
transitioned = true;
|
|
267
|
+
}
|
|
268
|
+
catch (err) {
|
|
269
|
+
log.warn(`failed to requeue shortfall as re-work for delivery ${v.deliveryId}:`, err.message);
|
|
270
|
+
}
|
|
271
|
+
let injected = false;
|
|
272
|
+
if (v.focusId) {
|
|
273
|
+
const team = d.getActiveTeams().get(v.focusId);
|
|
274
|
+
// Do not retask a live review team (parity with directive inject guard).
|
|
275
|
+
if (team && team.leadStdin && team.sessionType !== 'review') {
|
|
276
|
+
try {
|
|
277
|
+
d.sendMessage(team.leadStdin, buildShortfallInjectMessage(v.deliveryName, detail));
|
|
278
|
+
injected = true;
|
|
279
|
+
}
|
|
280
|
+
catch (err) {
|
|
281
|
+
log.warn(`failed to inject shortfall re-work to team ${v.focusId}:`, err.message);
|
|
282
|
+
}
|
|
283
|
+
}
|
|
284
|
+
}
|
|
285
|
+
return { transitioned, injected, detail };
|
|
286
|
+
}
|
|
112
287
|
//# sourceMappingURL=verification-feedback.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"verification-feedback.js","sourceRoot":"","sources":["../src/verification-feedback.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;GAgBG;AAEH,OAAO,EAAE,eAAe,EAAE,WAAW,EAAE,MAAM,qBAAqB,CAAC;AACnE,OAAO,EACL,oBAAoB,
|
|
1
|
+
{"version":3,"file":"verification-feedback.js","sourceRoot":"","sources":["../src/verification-feedback.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;GAgBG;AAEH,OAAO,EAAE,eAAe,EAAE,WAAW,E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AAC,IAAI,CAAC,uDAAuD,CAAC,CAAC,UAAU,GAAG,EAAG,GAAa,CAAC,OAAO,CAAC,CAAC;IAC3G,CAAC;IAED,IAAI,QAAQ,GAAG,KAAK,CAAC;IACrB,IAAI,CAAC,CAAC,OAAO,EAAE,CAAC;QACd,MAAM,IAAI,GAAG,CAAC,CAAC,cAAc,EAAE,CAAC,GAAG,CAAC,CAAC,CAAC,OAAO,CAAC,CAAC;QAC/C,yEAAyE;QACzE,IAAI,IAAI,IAAI,IAAI,CAAC,SAAS,IAAI,IAAI,CAAC,WAAW,KAAK,QAAQ,EAAE,CAAC;YAC5D,IAAI,CAAC;gBACH,CAAC,CAAC,WAAW,CAAC,IAAI,CAAC,SAAS,EAAE,2BAA2B,CAAC,CAAC,CAAC,YAAY,EAAE,MAAM,CAAC,CAAC,CAAC;gBACnF,QAAQ,GAAG,IAAI,CAAC;YAClB,CAAC;YAAC,OAAO,GAAG,EAAE,CAAC;gBACb,GAAG,CAAC,IAAI,CAAC,8CAA8C,CAAC,CAAC,OAAO,GAAG,EAAG,GAAa,CAAC,OAAO,CAAC,CAAC;YAC/F,CAAC;QACH,CAAC;IACH,CAAC;IAED,OAAO,EAAE,YAAY,EAAE,QAAQ,EAAE,MAAM,EAAE,CAAC;AAC5C,CAAC"}
|
|
@@ -31,6 +31,14 @@ export type VerifyClassification = 'match' | 'legitimate_divergence' | 'shortfal
|
|
|
31
31
|
export interface VerifyEvidence {
|
|
32
32
|
/** Delivery diff against the integration branch, when available. */
|
|
33
33
|
diff?: string;
|
|
34
|
+
/**
|
|
35
|
+
* Files changed between the integration base and the delivery HEAD
|
|
36
|
+
* (name-only). Structured signal so the judge sees WHICH files changed
|
|
37
|
+
* without parsing the raw diff.
|
|
38
|
+
*/
|
|
39
|
+
changedFiles?: string[];
|
|
40
|
+
/** `git diff --stat` summary between the integration base and HEAD. */
|
|
41
|
+
diffStat?: string;
|
|
34
42
|
/** Captured stdout from a deterministic check (tests/lint/types). */
|
|
35
43
|
testStdout?: string;
|
|
36
44
|
/** Captured stderr from a deterministic check. */
|
|
@@ -54,9 +62,16 @@ export interface ReconcileJudgment {
|
|
|
54
62
|
classification: VerifyClassification;
|
|
55
63
|
/** Populated only on legitimate_divergence / shortfall: what the gap is. */
|
|
56
64
|
divergenceReason?: string;
|
|
65
|
+
/**
|
|
66
|
+
* REQUIRED on a shortfall: the diff evidence (file / hunk) whose absence
|
|
67
|
+
* justifies marking the declared node short. A shortfall grounded only in
|
|
68
|
+
* test output or verdict rationale -- not the diff -- is not a valid
|
|
69
|
+
* shortfall. Omitted on match / legitimate_divergence.
|
|
70
|
+
*/
|
|
71
|
+
diffCitation?: string;
|
|
57
72
|
}
|
|
58
73
|
export type ReconcileOptions = RestatementOptions;
|
|
59
|
-
export declare const RECONCILE_SYSTEM_PROMPT = "You reconcile a software delivery's DECLARED desired effect against what its worktree EVIDENCE actually shows was accomplished, for a Goldratt reality-tree flip.\n\nYou will be given:\n- The DECLARED desired effect: the outcome the work was supposed to realize. This is the intent of record. Do NOT lower it.\n- EVIDENCE from the worktree: the code diff, test/lint/type output, and/or an inspection finding. This is the only ground truth for what was actually achieved.\n\nDo TWO things:\n1. Author the ACHIEVED desired effect: ONE concrete positive sentence describing what the EVIDENCE shows was accomplished. Derive it from the evidence, NOT from the declared sentence -- if the evidence accomplished something different from or narrower than the declaration, the achieved sentence must say what the evidence shows, not echo the declaration.\n2. Classify how the achieved outcome compares to the declared desired effect:\n - \"match\": the achieved outcome realizes the declared intent.\n - \"legitimate_divergence\": the achieved outcome differs from the declared intent but is a valid, defensible result (e.g. a better approach, an equivalent substitution). Give a one-sentence reason naming the gap.\n - \"shortfall\": the achieved outcome falls short of the declared intent -- it does less, is incomplete, or the evidence does not support the declaration. Give a one-sentence reason naming what is missing.\n\nRespond with ONE JSON object and nothing else:\n{\"achievedStatement\": \"<one sentence>\", \"classification\": \"match\" | \"legitimate_divergence\" | \"shortfall\", \"divergenceReason\": \"<one sentence, omit or empty when classification is match>\"}";
|
|
74
|
+
export declare const RECONCILE_SYSTEM_PROMPT = "You reconcile a software delivery's DECLARED desired effect against what its worktree EVIDENCE actually shows was accomplished, for a Goldratt reality-tree flip.\n\nYou will be given:\n- The DECLARED desired effect: the outcome the work was supposed to realize. This is the intent of record. Do NOT lower it.\n- EVIDENCE from the worktree: the code diff, test/lint/type output, and/or an inspection finding. This is the only ground truth for what was actually achieved.\n\nThe CODE DIFF is the PRIMARY evidence for what was delivered. Ground your judgment in it. Test/lint output and inspection findings are corroborating evidence -- they show that code RUNS, not WHICH declared behavior it implements. Never conclude a shortfall from test output alone: if the diff implements the declared behavior, it is not short even if the tests you see are about something else.\n\nDo TWO things:\n1. Author the ACHIEVED desired effect: ONE concrete positive sentence describing what the EVIDENCE shows was accomplished. Derive it from the evidence, NOT from the declared sentence -- if the evidence accomplished something different from or narrower than the declaration, the achieved sentence must say what the evidence shows, not echo the declaration.\n2. Classify how the achieved outcome compares to the declared desired effect:\n - \"match\": the achieved outcome realizes the declared intent.\n - \"legitimate_divergence\": the achieved outcome differs from the declared intent but is a valid, defensible result (e.g. a better approach, an equivalent substitution). Give a one-sentence reason naming the gap.\n - \"shortfall\": the achieved outcome falls short of the declared intent -- it does less, is incomplete, or the evidence does not support the declaration. Give a one-sentence reason naming what is missing, AND cite the diff: name the changed file(s)/hunk you inspected whose content fails to satisfy the declared node (or state that the diff contains no change addressing it). A shortfall MUST be grounded in the diff -- if you cannot locate the declared behavior's absence in the diff, it is not a shortfall.\n\nRespond with ONE JSON object and nothing else:\n{\"achievedStatement\": \"<one sentence>\", \"classification\": \"match\" | \"legitimate_divergence\" | \"shortfall\", \"divergenceReason\": \"<one sentence, omit or empty when classification is match>\", \"diffCitation\": \"<REQUIRED on shortfall: the file/hunk in the diff whose absence justifies the shortfall; omit on match/legitimate_divergence>\"}";
|
|
60
75
|
export declare function buildReconcileSystemPrompt(): string;
|
|
61
76
|
/** Render the cited evidence into the user message. Evidence-only -- the UDE text is never included. */
|
|
62
77
|
export declare function buildReconcileUserMessage(inputs: ReconcileInputs): string;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"verify-reconciliation.d.ts","sourceRoot":"","sources":["../src/verify-reconciliation.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;GAyBG;AAEH,OAAO,EAEL,KAAK,kBAAkB,EACxB,MAAM,qBAAqB,CAAC;AAE7B,uEAAuE;AACvE,MAAM,MAAM,oBAAoB,GAAG,OAAO,GAAG,uBAAuB,GAAG,WAAW,CAAC;AAEnF,2EAA2E;AAC3E,MAAM,WAAW,cAAc;IAC7B,oEAAoE;IACpE,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,qEAAqE;IACrE,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,kDAAkD;IAClD,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,oDAAoD;IACpD,QAAQ,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IACzB,gEAAgE;IAChE,mBAAmB,CAAC,EAAE,MAAM,CAAC;IAC7B,sEAAsE;IACtE,gBAAgB,CAAC,EAAE,MAAM,CAAC;CAC3B;AAED,MAAM,WAAW,eAAe;IAC9B,kEAAkE;IAClE,iBAAiB,EAAE,MAAM,CAAC;IAC1B,kFAAkF;IAClF,QAAQ,EAAE,cAAc,CAAC;CAC1B;AAED,MAAM,WAAW,iBAAiB;IAChC,qEAAqE;IACrE,iBAAiB,EAAE,MAAM,CAAC;IAC1B,cAAc,EAAE,oBAAoB,CAAC;IACrC,4EAA4E;IAC5E,gBAAgB,CAAC,EAAE,MAAM,CAAC;
|
|
1
|
+
{"version":3,"file":"verify-reconciliation.d.ts","sourceRoot":"","sources":["../src/verify-reconciliation.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;GAyBG;AAEH,OAAO,EAEL,KAAK,kBAAkB,EACxB,MAAM,qBAAqB,CAAC;AAE7B,uEAAuE;AACvE,MAAM,MAAM,oBAAoB,GAAG,OAAO,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I,CAsDxE;AAED;;;;;;GAMG;AACH,wBAAsB,uBAAuB,CAC3C,MAAM,EAAE,eAAe,EACvB,IAAI,GAAE,gBAAqB,GAC1B,OAAO,CAAC,iBAAiB,CAAC,CAkB5B"}
|
|
@@ -31,15 +31,17 @@ You will be given:
|
|
|
31
31
|
- The DECLARED desired effect: the outcome the work was supposed to realize. This is the intent of record. Do NOT lower it.
|
|
32
32
|
- EVIDENCE from the worktree: the code diff, test/lint/type output, and/or an inspection finding. This is the only ground truth for what was actually achieved.
|
|
33
33
|
|
|
34
|
+
The CODE DIFF is the PRIMARY evidence for what was delivered. Ground your judgment in it. Test/lint output and inspection findings are corroborating evidence -- they show that code RUNS, not WHICH declared behavior it implements. Never conclude a shortfall from test output alone: if the diff implements the declared behavior, it is not short even if the tests you see are about something else.
|
|
35
|
+
|
|
34
36
|
Do TWO things:
|
|
35
37
|
1. Author the ACHIEVED desired effect: ONE concrete positive sentence describing what the EVIDENCE shows was accomplished. Derive it from the evidence, NOT from the declared sentence -- if the evidence accomplished something different from or narrower than the declaration, the achieved sentence must say what the evidence shows, not echo the declaration.
|
|
36
38
|
2. Classify how the achieved outcome compares to the declared desired effect:
|
|
37
39
|
- "match": the achieved outcome realizes the declared intent.
|
|
38
40
|
- "legitimate_divergence": the achieved outcome differs from the declared intent but is a valid, defensible result (e.g. a better approach, an equivalent substitution). Give a one-sentence reason naming the gap.
|
|
39
|
-
- "shortfall": the achieved outcome falls short of the declared intent -- it does less, is incomplete, or the evidence does not support the declaration. Give a one-sentence reason naming what is missing.
|
|
41
|
+
- "shortfall": the achieved outcome falls short of the declared intent -- it does less, is incomplete, or the evidence does not support the declaration. Give a one-sentence reason naming what is missing, AND cite the diff: name the changed file(s)/hunk you inspected whose content fails to satisfy the declared node (or state that the diff contains no change addressing it). A shortfall MUST be grounded in the diff -- if you cannot locate the declared behavior's absence in the diff, it is not a shortfall.
|
|
40
42
|
|
|
41
43
|
Respond with ONE JSON object and nothing else:
|
|
42
|
-
{"achievedStatement": "<one sentence>", "classification": "match" | "legitimate_divergence" | "shortfall", "divergenceReason": "<one sentence, omit or empty when classification is match>"}`;
|
|
44
|
+
{"achievedStatement": "<one sentence>", "classification": "match" | "legitimate_divergence" | "shortfall", "divergenceReason": "<one sentence, omit or empty when classification is match>", "diffCitation": "<REQUIRED on shortfall: the file/hunk in the diff whose absence justifies the shortfall; omit on match/legitimate_divergence>"}`;
|
|
43
45
|
export function buildReconcileSystemPrompt() {
|
|
44
46
|
return RECONCILE_SYSTEM_PROMPT;
|
|
45
47
|
}
|
|
@@ -48,6 +50,14 @@ export function buildReconcileUserMessage(inputs) {
|
|
|
48
50
|
const parts = [`Declared desired effect:\n${inputs.declaredStatement}`];
|
|
49
51
|
const ev = inputs.evidence;
|
|
50
52
|
const evidenceSections = [];
|
|
53
|
+
// Structured diff signals FIRST -- the judge can see which files/tests
|
|
54
|
+
// changed without parsing the full diff.
|
|
55
|
+
if (ev.changedFiles && ev.changedFiles.length > 0) {
|
|
56
|
+
evidenceSections.push(`Changed files (${ev.changedFiles.length}):\n${ev.changedFiles.map((f) => `- ${f}`).join('\n')}`);
|
|
57
|
+
}
|
|
58
|
+
if (ev.diffStat && ev.diffStat.trim() !== '') {
|
|
59
|
+
evidenceSections.push(`Diff stat:\n${ev.diffStat.trim()}`);
|
|
60
|
+
}
|
|
51
61
|
if (ev.diff && ev.diff.trim() !== '') {
|
|
52
62
|
evidenceSections.push(`Code diff (against integration):\n${ev.diff}`);
|
|
53
63
|
}
|
|
@@ -126,6 +136,7 @@ export function parseReconcileJson(raw) {
|
|
|
126
136
|
return null;
|
|
127
137
|
}
|
|
128
138
|
const reasonRaw = typeof obj.divergenceReason === 'string' ? obj.divergenceReason.trim() : '';
|
|
139
|
+
const citationRaw = typeof obj.diffCitation === 'string' ? obj.diffCitation.trim() : '';
|
|
129
140
|
const judgment = {
|
|
130
141
|
achievedStatement: achieved,
|
|
131
142
|
classification,
|
|
@@ -133,6 +144,11 @@ export function parseReconcileJson(raw) {
|
|
|
133
144
|
if (classification !== 'match' && reasonRaw !== '') {
|
|
134
145
|
judgment.divergenceReason = reasonRaw;
|
|
135
146
|
}
|
|
147
|
+
// The diff citation is meaningful only on a shortfall (it grounds the
|
|
148
|
+
// withheld flip in the diff). Carry it through when the judge supplied one.
|
|
149
|
+
if (classification === 'shortfall' && citationRaw !== '') {
|
|
150
|
+
judgment.diffCitation = citationRaw;
|
|
151
|
+
}
|
|
136
152
|
return judgment;
|
|
137
153
|
}
|
|
138
154
|
/**
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"verify-reconciliation.js","sourceRoot":"","sources":["../src/verify-reconciliation.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;GAyBG;AAEH,OAAO,EACL,eAAe,GAEhB,MAAM,qBAAqB,CAAC;
|
|
1
|
+
{"version":3,"file":"verify-reconciliation.js","sourceRoot":"","sources":["../src/verify-reconciliation.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;GAyBG;AAEH,OAAO,EACL,eAAe,GAEhB,MAAM,qBAAqB,CAAC;AAqD7B,MAAM,CAAC,MAAM,uBAAuB,GAAG;;;;;;;;;;;;;;;;8UAgBuS,CAAC;AAE/U,MAAM,UAAU,0BAA0B;IACxC,OAAO,uBAAuB,CAAC;AACjC,CAAC;AAED,wGAAwG;AACxG,MAAM,UAAU,yBAAyB,CAAC,MAAuB;IAC/D,MAAM,KAAK,GAAa,CAAC,6BAA6B,MAAM,CAAC,iBAAiB,EAAE,CAAC,CAAC;IAClF,MAAM,EAAE,GAAG,MAAM,CAAC,QAAQ,CAAC;IAC3B,MAAM,gBAAgB,GAAa,EAAE,CAAC;IAEtC,uEAAuE;IACvE,yCAAyC;IACzC,IAAI,EAAE,CAAC,YAAY,IAAI,EAAE,CAAC,YAAY,CAAC,MAAM,GAAG,CAAC,EAAE,CAAC;QAClD,gBAAgB,CAAC,IAAI,CACnB,kBAAkB,EAAE,CAAC,YA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,IAAI,CAAC,CAAC,GAAG,EAAE,GAAG,EAAE,EAAE,CAAC,eAAe,CAAC,GAAG,EAAE,GAAG,EAAE,IAAI,CAAC,CAAC,CAAC;IACnF,MAAM,GAAG,GAAG,MAAM,MAAM,CAAC,YAAY,EAAE,WAAW,CAAC,CAAC;IACpD,MAAM,QAAQ,GAAG,kBAAkB,CAAC,GAAG,CAAC,CAAC;IACzC,IAAI,CAAC,QAAQ,EAAE,CAAC;QACd,MAAM,IAAI,KAAK,CAAC,sDAAsD,CAAC,CAAC;IAC1E,CAAC;IACD,6EAA6E;IAC7E,iEAAiE;IACjE,IAAI,QAAQ,CAAC,cAAc,KAAK,OAAO,IAAI,CAAC,QAAQ,CAAC,gBAAgB,EAAE,CAAC;QACtE,QAAQ,CAAC,gBAAgB;YACvB,QAAQ,CAAC,cAAc,KAAK,WAAW;gBACrC,CAAC,CAAC,8DAA8D;gBAChE,CAAC,CAAC,6DAA6D,CAAC;IACtE,CAAC;IACD,OAAO,QAAQ,CAAC;AAClB,CAAC"}
|
|
@@ -58,6 +58,13 @@ export interface TargetShortfall {
|
|
|
58
58
|
achievedStatement: string;
|
|
59
59
|
/** Why the achieved outcome falls short. */
|
|
60
60
|
reason: string;
|
|
61
|
+
/**
|
|
62
|
+
* The diff evidence (file / hunk) whose absence grounds the shortfall, when
|
|
63
|
+
* the reconciliation supplied one. A shortfall grounded only in test output
|
|
64
|
+
* -- not the diff -- leaves this undefined; readers should treat an
|
|
65
|
+
* un-cited shortfall as weaker signal than a cited one.
|
|
66
|
+
*/
|
|
67
|
+
diffCitation?: string;
|
|
61
68
|
}
|
|
62
69
|
export interface ReconcileTargetsResult {
|
|
63
70
|
/** match / legitimate_divergence -- safe to carry into verify. */
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"verify-restatement.d.ts","sourceRoot":"","sources":["../src/verify-restatement.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;GA2BG;AAGH,OAAO,E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AAe;IAC9B,MAAM,EAAE,MAAM,CAAC;IACf,+DAA+D;IAC/D,iBAAiB,EAAE,MAAM,CAAC;IAC1B,2DAA2D;IAC3D,iBAAiB,EAAE,MAAM,CAAC;IAC1B,4CAA4C;IAC5C,MAAM,EAAE,MAAM,CAAC;IACf;;;;;OAKG;IACH,YAAY,CAAC,EAAE,MAAM,CAAC;CACvB;AAED,MAAM,WAAW,sBAAsB;IACrC,kEAAkE;IAClE,YAAY,EAAE,iBAAiB,EAAE,CAAC;IAClC,gEAAgE;IAChE,UAAU,EAAE,eAAe,EAAE,CAAC;IAC9B;;;;;;OAMG;IACH,aAAa,CAAC,EAAE,MAAM,CAAC;CACxB;AAED,MAAM,MAAM,WAAW,GAAG,CACxB,MAAM,EAAE,eAAe,EACvB,IAAI,CAAC,EAAE,gBAAgB,KACpB,OAAO,CAAC,iBAAiB,CAAC,CAAC;AAEhC,MAAM,WAAW,4BAA4B;IAC3C,OAAO,CAAC,EAAE,CAAC,CAAC,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,KAAK,OAAO,CAAC,CAAC,CAAC,CAAC;IAC9E,oGAAoG;IACpG,SAAS,CAAC,EAAE,WAAW,CAAC;CACzB;AAED;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA+BG;AACH,wBAAsB,wBAAwB,CAC5C,eAAe,EAAE,MAAM,EACvB,OAAO,EAAE,MAAM,GAAG,IAAI,EACtB,QAAQ,EAAE,cAAc,EACxB,IAAI,GAAE,4BAAiC,GACtC,OAAO,CAAC,sBAAsB,CAAC,CA0FjC"}
|
|
@@ -126,6 +126,7 @@ export async function authorTargetRestatements(injectionNodeId, focusId, evidenc
|
|
|
126
126
|
achievedStatement: judgment.achievedStatement,
|
|
127
127
|
reason: judgment.divergenceReason
|
|
128
128
|
?? 'Achieved outcome falls short of the declared desired effect.',
|
|
129
|
+
...(judgment.diffCitation ? { diffCitation: judgment.diffCitation } : {}),
|
|
129
130
|
});
|
|
130
131
|
continue;
|
|
131
132
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"verify-restatement.js","sourceRoot":"","sources":["../src/verify-restatement.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;GA2BG;AAEH,OAAO,EAAE,OAAO,IAAI,cAAc,EAAE,MAAM,qBAAqB,CAAC;AAChE,OAAO,EACL,uBAAuB,IAAI,gBAAgB,GAM5C,MAAM,4BAA4B,CAAC;
|
|
1
|
+
{"version":3,"file":"verify-restatement.js","sourceRoot":"","sources":["../src/verify-restatement.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;GA2BG;AAEH,OAAO,EAAE,OAAO,IAAI,cAAc,EAAE,MAAM,qBAAqB,CAAC;AAChE,OAAO,EACL,uBAAuB,IAAI,gBAAgB,GAM5C,MAAM,4BAA4B,CAAC;AA6EpC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA+BG;AACH,MAAM,CAAC,KAAK,UAAU,wBAAwB,CAC5C,eAAuB,EACvB,OAAsB,EACtB,QAAwB,EACxB,OAAqC,EAAE;IAEvC,MAAM,OAAO,GAAG,IAAI,CAAC,OAAO,IAAI,cAAc,CAAC;IAC/C,MAAM,SAAS,GAAG,IAAI,CAAC,SAAS,IAAI,gBAAgB,CAAC;IACrD,MAAM,MAAM,GAA2B,EAAE,YAAY,EAAE,EAAE,EAAE,UAAU,EAAE,EAAE,EAAE,CAAC;IAC5E,IAAI,CAAC,OAAO;QAAE,OAAO,MAAM,CAAC;IAE5B,MAAM,SAAS,GAAG,MAAM,OAAO,CAA0B,mBAAmB,EAAE,EAAE,OAAO,EAAE,CAAC,CAAC;IAC3F,MAAM,KAAK,GAAG,CAAC,SAAS,CAAC,KAAK,IAAI,EAAE,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,MAAM,KAAK,QAAQ,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AAC,YAAY,EAAE,CAAC,CAAC,CAAC,EAAE,CAAC;iBAC1E,CAAC,CAAC;gBACH,SAAS;YACX,CAAC;YAED,MAAM,KAAK,GAAsB;gBAC/B,MAAM,EAAE,MAAM,CAAC,EAAE;gBACjB,SAAS,EAAE,QAAQ,CAAC,iBAAiB;gBACrC,cAAc;gBACd,aAAa;aACd,CAAC;YACF,IAAI,cAAc,KAAK,uBAAuB,IAAI,QAAQ,CAAC,gBAAgB,EAAE,CAAC;gBAC5E,KAAK,CAAC,gBAAgB,GAAG,QAAQ,CAAC,gBAAgB,CAAC;YACrD,CAAC;YACD,MAAM,CAAC,YAAY,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC;QAClC,CAAC;QACD,OAAO,MAAM,CAAC,CAAC,gCAAgC;IACjD,CAAC;IAED,OAAO,MAAM,CAAC;AAChB,CAAC"}
|
package/dist/version-check.d.ts
CHANGED
|
@@ -10,6 +10,12 @@ export interface VersionCheckResult {
|
|
|
10
10
|
latestVersion: string;
|
|
11
11
|
updateAvailable: boolean;
|
|
12
12
|
}
|
|
13
|
+
/**
|
|
14
|
+
* Parse a semver string's numeric major.minor.patch core, ignoring any
|
|
15
|
+
* pre-release / build suffix (e.g. "1.2.3-beta.1" -> [1, 2, 3]).
|
|
16
|
+
* Returns null when the core cannot be parsed.
|
|
17
|
+
*/
|
|
18
|
+
export declare function parseVersionCore(version: string): [number, number, number] | null;
|
|
13
19
|
/**
|
|
14
20
|
* True when `candidate` is a strictly greater semver than `current`
|
|
15
21
|
* (major.minor.patch compare). Falls back to string inequality only when
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"version-check.d.ts","sourceRoot":"","sources":["../src/version-check.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAUH,MAAM,WAAW,kBAAkB;IACjC,aAAa,EAAE,MAAM,CAAC;IACtB,eAAe,EAAE,OAAO,CAAC;CAC1B;
|
|
1
|
+
{"version":3,"file":"version-check.d.ts","sourceRoot":"","sources":["../src/version-check.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAUH,MAAM,WAAW,kBAAkB;IACjC,aAAa,EAAE,MAAM,CAAC;IACtB,eAAe,EAAE,OAAO,CAAC;CAC1B;AAkBD;;;;GAIG;AACH,wBAAgB,gBAAgB,CAAC,OAAO,EAAE,MAAM,GAAG,CAAC,MAAM,EAAE,MAAM,EAAE,MAAM,CAAC,GAAG,IAAI,CAWjF;AAED;;;;GAIG;AACH,wBAAgB,cAAc,CAAC,SAAS,EAAE,MAAM,EAAE,OAAO,EAAE,MAAM,GAAG,OAAO,CAS1E;AAED;;;;;;;;GAQG;AACH,wBAAsB,eAAe,CAAC,cAAc,EAAE,MAAM,EAAE,WAAW,SAAmB,GAAG,OAAO,CAAC,kBAAkB,GAAG,IAAI,CAAC,CAoDhI"}
|
package/dist/version-check.js
CHANGED
|
@@ -30,7 +30,7 @@ function getRegistryUrl() {
|
|
|
30
30
|
* pre-release / build suffix (e.g. "1.2.3-beta.1" -> [1, 2, 3]).
|
|
31
31
|
* Returns null when the core cannot be parsed.
|
|
32
32
|
*/
|
|
33
|
-
function parseVersionCore(version) {
|
|
33
|
+
export function parseVersionCore(version) {
|
|
34
34
|
const core = version.trim().replace(/^v/, '').split(/[-+]/)[0];
|
|
35
35
|
const parts = core.split('.');
|
|
36
36
|
if (parts.length < 1)
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"version-check.js","sourceRoot":"","sources":["../src/version-check.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAEH,OAAO,EAAE,aAAa,EAAE,MAAM,qBAAqB,CAAC;AACpD,OAAO,EAAE,YAAY,EAAE,MAAM,UAAU,CAAC;AAExC,MAAM,GAAG,GAAG,YAAY,CAAC,EAAE,MAAM,EAAE,aAAa,EAAE,CAAC,CAAC;AAGpD,MAAM,gBAAgB,GAAG,IAAI,CAAC;AAO9B;;;;;;;;GAQG;AACH,SAAS,cAAc;IACrB,4EAA4E;IAC5E,4EAA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CAAC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@telora/daemon",
|
|
3
|
-
"version": "0.20.
|
|
3
|
+
"version": "0.20.32",
|
|
4
4
|
"description": "Agent orchestration daemon for Telora - spawns and manages Claude Code instances",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"bin": {
|
|
@@ -38,7 +38,7 @@
|
|
|
38
38
|
"//testRunner": "Uses Node.js built-in test runner (node:test) via tsx for TypeScript support. The root package uses Vitest; this is a deliberate choice for the daemon package to avoid framework dependencies. See src/__tests__/ for test files.",
|
|
39
39
|
"dependencies": {
|
|
40
40
|
"@telora/daemon": "^0.20.0",
|
|
41
|
-
"@telora/daemon-core": "^0.2.
|
|
41
|
+
"@telora/daemon-core": "^0.2.73",
|
|
42
42
|
"@telora/mcp-products": "^0.22.104",
|
|
43
43
|
"commander": "^14.0.3",
|
|
44
44
|
"yaml": "^2.4.0",
|
|
@@ -1,68 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Periodic drift auto-ratification tick.
|
|
3
|
-
*
|
|
4
|
-
* Lists `proposed` drift proposals per product, runs each through the
|
|
5
|
-
* fail-closed policy in `drift-ratify-policy.ts`, and ratifies the ones the
|
|
6
|
-
* daemon is sanctioned to ratify unattended. Proposals the policy routes to a
|
|
7
|
-
* review session (`review_dispose`) or refuses to classify (`hold`) are left
|
|
8
|
-
* in `proposed`, untouched.
|
|
9
|
-
*
|
|
10
|
-
* WHAT THIS CLOSES. Drift proposals pooled in `proposed` faster than a human
|
|
11
|
-
* could ratify them, so the reality tree lagged observed reality and every
|
|
12
|
-
* consumer of the graph (audit assembly, propose_injections, focus.context)
|
|
13
|
-
* computed against a stale intent model. The ledger is unchanged -- this only
|
|
14
|
-
* changes WHO ratifies. Ratified proposals still reach the graph exclusively
|
|
15
|
-
* via the existing realign_crt phase (`applyRatifiedProposals`), which this
|
|
16
|
-
* module does not touch.
|
|
17
|
-
*
|
|
18
|
-
* WHAT THIS MUST NEVER DO. Ratify an inward shortfall. That is the machine
|
|
19
|
-
* rewriting a claim its own work failed to meet. The policy module owns that
|
|
20
|
-
* decision; this tick owns only list -> classify -> ratify-the-safe-ones, and
|
|
21
|
-
* deliberately contains no safe-kind rules of its own. If you find yourself
|
|
22
|
-
* adding kind logic here, it belongs in drift-ratify-policy.ts.
|
|
23
|
-
*
|
|
24
|
-
* ACTOR STAMP. The tick calls `crt_drift_proposal_ratify` with no session id.
|
|
25
|
-
* The edge handler resolves the actor from the caller's credential kind, so a
|
|
26
|
-
* tracker-authenticated daemon call is recorded as `ratified_by_kind='system'`
|
|
27
|
-
* with `ratified_by=NULL` automatically. Passing a session id would instead
|
|
28
|
-
* stamp `review_session` -- that is the review-disposition path, not this one.
|
|
29
|
-
*
|
|
30
|
-
* Activation: opt-out via TELORA_DRIFT_RATIFY_LOOP=0. See `shouldRunLoop()` in
|
|
31
|
-
* focus-engine.ts.
|
|
32
|
-
*
|
|
33
|
-
* @module drift-ratify-loop
|
|
34
|
-
*/
|
|
35
|
-
import type { DaemonConfig } from './types.js';
|
|
36
|
-
export interface DriftRatifyTickResult {
|
|
37
|
-
productsScanned: number;
|
|
38
|
-
/** Products skipped this tick because they are within a list-failure backoff window. */
|
|
39
|
-
productsSkipped: number;
|
|
40
|
-
proposalsExamined: number;
|
|
41
|
-
/** Ratified by the daemon with the system actor stamp. */
|
|
42
|
-
ratified: number;
|
|
43
|
-
/** Left proposed: the shortfall channel, owed to an independent review session. */
|
|
44
|
-
leftForReview: number;
|
|
45
|
-
/** Left proposed: fail-closed (unknown kind, malformed metadata, inconsistent row). */
|
|
46
|
-
held: number;
|
|
47
|
-
errors: number;
|
|
48
|
-
}
|
|
49
|
-
export interface DriftRatifyLoopDeps {
|
|
50
|
-
callApi: <T>(action: string, params?: Record<string, unknown>) => Promise<T>;
|
|
51
|
-
/** Clock seam (epoch ms) for the per-product list-failure backoff. */
|
|
52
|
-
now: () => number;
|
|
53
|
-
/** Backoff window applied to a product after a list failure. */
|
|
54
|
-
listBackoffMs: number;
|
|
55
|
-
}
|
|
56
|
-
/** Test-only: clear the per-product list-failure backoff state. */
|
|
57
|
-
export declare function __resetDriftRatifyBackoffForTesting(): void;
|
|
58
|
-
/**
|
|
59
|
-
* Run one auto-ratification tick across every product in the daemon config.
|
|
60
|
-
*
|
|
61
|
-
* Per-proposal failures are counted and skipped, never aborting the batch --
|
|
62
|
-
* one unratifiable proposal must not strand the rest of the stream (mirrors
|
|
63
|
-
* `applyRatifiedProposals`, realign-apply.ts:403-416).
|
|
64
|
-
*
|
|
65
|
-
* Returns counters useful for log lines and tests.
|
|
66
|
-
*/
|
|
67
|
-
export declare function runDriftRatifyTick(config: DaemonConfig, depOverrides?: Partial<DriftRatifyLoopDeps>): Promise<DriftRatifyTickResult>;
|
|
68
|
-
//# sourceMappingURL=drift-ratify-loop.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"drift-ratify-loop.d.ts","sourceRoot":"","sources":["../src/drift-ratify-loop.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAiCG;AAGH,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,YAAY,CAAC;AA0B/C,MAAM,WAAW,qBAAqB;IACpC,eAAe,EAAE,MAAM,CAAC;IACxB,wFAAwF;IACxF,eAAe,EAAE,MAAM,CAAC;IACxB,iBAAiB,EAAE,MAAM,CAAC;IAC1B,0DAA0D;IAC1D,QAAQ,EAAE,MAAM,CAAC;IACjB,mFAAmF;IACnF,aAAa,EAAE,MAAM,CAAC;IACtB,uFAAuF;IACvF,IAAI,EAAE,MAAM,CAAC;IACb,MAAM,EAAE,MAAM,CAAC;CAChB;AAED,MAAM,WAAW,mBAAmB;IAClC,OAAO,EAAE,CAAC,CAAC,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,KAAK,OAAO,CAAC,CAAC,CAAC,CAAC;IAC7E,sEAAsE;IACtE,GAAG,EAAE,MAAM,MAAM,CAAC;IAClB,gEAAgE;IAChE,aAAa,EAAE,MAAM,CAAC;CACvB;AA4BD,mEAAmE;AACnE,wBAAgB,mCAAmC,IAAI,IAAI,CAE1D;AAUD;;;;;;;;GAQG;AACH,wBAAsB,kBAAkB,CACtC,MAAM,EAAE,YAAY,EACpB,YAAY,GAAE,OAAO,CAAC,mBAAmB,CAAM,GAC9C,OAAO,CAAC,qBAAqB,CAAC,CA6FhC"}
|