@telora/daemon 0.24.7 → 0.24.8
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 +10 -3
- package/dist/backends/agent-backend.d.ts +10 -0
- package/dist/backends/agent-backend.d.ts.map +1 -1
- package/dist/backends/claude/claude-backend.d.ts +19 -0
- package/dist/backends/claude/claude-backend.d.ts.map +1 -1
- package/dist/backends/claude/claude-backend.js +41 -1
- package/dist/backends/claude/claude-backend.js.map +1 -1
- package/dist/backends/codex/codex-backend.d.ts.map +1 -1
- package/dist/backends/codex/codex-backend.js +50 -20
- package/dist/backends/codex/codex-backend.js.map +1 -1
- package/dist/backends/index.js +1 -1
- package/dist/completion/review-exit/review-exit-phase.d.ts.map +1 -1
- package/dist/completion/review-exit/review-exit-phase.js +11 -22
- package/dist/completion/review-exit/review-exit-phase.js.map +1 -1
- package/dist/composition/execution-migrations-context.js +1 -1
- package/dist/composition/runtime-poll-context.d.ts +7 -1
- package/dist/composition/runtime-poll-context.d.ts.map +1 -1
- package/dist/composition/runtime-poll-context.js +14 -2
- package/dist/composition/runtime-poll-context.js.map +1 -1
- package/dist/delivery/delivery-reconciler.d.ts +10 -15
- package/dist/delivery/delivery-reconciler.d.ts.map +1 -1
- package/dist/delivery/delivery-reconciler.js +17 -30
- package/dist/delivery/delivery-reconciler.js.map +1 -1
- package/dist/focus/focus-executor.d.ts.map +1 -1
- package/dist/focus/focus-executor.js +2 -6
- package/dist/focus/focus-executor.js.map +1 -1
- package/dist/focus/verify-routing-passes.d.ts +5 -1
- package/dist/focus/verify-routing-passes.d.ts.map +1 -1
- package/dist/focus/verify-routing-passes.js +1 -0
- package/dist/focus/verify-routing-passes.js.map +1 -1
- package/dist/host-control/load.d.ts.map +1 -1
- package/dist/host-control/load.js +2 -1
- package/dist/host-control/load.js.map +1 -1
- package/dist/prompt/team-prompt-base.d.ts +31 -2
- package/dist/prompt/team-prompt-base.d.ts.map +1 -1
- package/dist/prompt/team-prompt-base.js +52 -2
- package/dist/prompt/team-prompt-base.js.map +1 -1
- package/dist/prompt-sections/persona-sections.d.ts +7 -6
- package/dist/prompt-sections/persona-sections.d.ts.map +1 -1
- package/dist/prompt-sections/persona-sections.js +17 -13
- package/dist/prompt-sections/persona-sections.js.map +1 -1
- package/dist/prompt-sections/role-sections.d.ts +12 -1
- package/dist/prompt-sections/role-sections.d.ts.map +1 -1
- package/dist/prompt-sections/role-sections.js +42 -1
- package/dist/prompt-sections/role-sections.js.map +1 -1
- package/dist/prompt-sections/shared.js +1 -1
- package/dist/queries/deliveries/falsified-effect-reopens.d.ts +33 -0
- package/dist/queries/deliveries/falsified-effect-reopens.d.ts.map +1 -0
- package/dist/queries/deliveries/falsified-effect-reopens.js +36 -0
- package/dist/queries/deliveries/falsified-effect-reopens.js.map +1 -0
- package/dist/resolvers/assembly-engine.js +1 -1
- package/dist/resolvers/git-diff-against-base.d.ts.map +1 -1
- package/dist/resolvers/git-diff-against-base.js +2 -1
- package/dist/resolvers/git-diff-against-base.js.map +1 -1
- package/dist/session/session-lineage.d.ts +15 -6
- package/dist/session/session-lineage.d.ts.map +1 -1
- package/dist/session/session-lineage.js +17 -5
- package/dist/session/session-lineage.js.map +1 -1
- package/dist/spawn/model-routing.d.ts +1 -1
- package/dist/spawn/model-routing.d.ts.map +1 -1
- package/dist/spawn/model-routing.js +6 -4
- package/dist/spawn/model-routing.js.map +1 -1
- package/dist/spawn/prompt-assembly.d.ts +0 -9
- package/dist/spawn/prompt-assembly.d.ts.map +1 -1
- package/dist/spawn/prompt-assembly.js +61 -65
- package/dist/spawn/prompt-assembly.js.map +1 -1
- package/dist/spawn/spawn-decision.d.ts +8 -1
- package/dist/spawn/spawn-decision.d.ts.map +1 -1
- package/dist/spawn/spawn-decision.js +10 -3
- package/dist/spawn/spawn-decision.js.map +1 -1
- package/dist/testing/fixtures/index.js +1 -1
- package/dist/types/index.js +1 -1
- package/dist/verify/effect-reconciliation/verify-reconciliation.d.ts +34 -5
- package/dist/verify/effect-reconciliation/verify-reconciliation.d.ts.map +1 -1
- package/dist/verify/effect-reconciliation/verify-reconciliation.js +106 -27
- package/dist/verify/effect-reconciliation/verify-reconciliation.js.map +1 -1
- package/dist/verify/outcome-routing/falsified-effect-reopen.d.ts +17 -0
- package/dist/verify/outcome-routing/falsified-effect-reopen.d.ts.map +1 -0
- package/dist/verify/outcome-routing/falsified-effect-reopen.js +76 -0
- package/dist/verify/outcome-routing/falsified-effect-reopen.js.map +1 -0
- package/package.json +2 -2
|
@@ -1,13 +1,22 @@
|
|
|
1
1
|
import { type JudgeCheckout, type JudgeCitationResolver, type JudgeScope } from './judge-workspace.js';
|
|
2
2
|
import type { UnresolvedEvidenceRef } from '../shortfalls/ruling-evidence-resolution.js';
|
|
3
3
|
import type { UnjudgedShortfallKind } from '../../queries/delivery-gate-state/shortfall-judgment-record.js';
|
|
4
|
+
/** How much of an unparseable answer is kept: its TAIL, where a broken or cut-off object ends. */
|
|
5
|
+
export declare const RAW_ANSWER_TAIL_CHARS = 1000;
|
|
6
|
+
/** The bounded tail of a judge's raw answer. Pure. */
|
|
7
|
+
export declare function rawAnswerTail(raw: string): string;
|
|
4
8
|
/**
|
|
5
|
-
* The judge answered, but nothing in its answer parsed as a judgment
|
|
9
|
+
* The judge answered, but nothing in its answer parsed as a judgment -- not its
|
|
10
|
+
* first answer and not the correction turn's (module header). Thrown by
|
|
6
11
|
* reconcileAchievedEffect; the shortfall it is signed as carries `unjudged:
|
|
7
12
|
* 'no_parseable_judgment'` (unjudgedShortfallKindOf).
|
|
8
13
|
*/
|
|
9
14
|
export declare class UnparseableJudgment extends Error {
|
|
10
|
-
|
|
15
|
+
/** Why the last answer did not parse: the JSON.parse error, or what the parsed value lacks. */
|
|
16
|
+
readonly parseError: string;
|
|
17
|
+
/** A bounded tail of the last answer's raw text (rawAnswerTail). */
|
|
18
|
+
readonly rawTail: string;
|
|
19
|
+
constructor(parseError: string, rawTail: string);
|
|
11
20
|
}
|
|
12
21
|
/**
|
|
13
22
|
* Which kind of NO judgment a non-ModelUnavailable reconciliation throw leaves on
|
|
@@ -89,7 +98,7 @@ export interface ReconcileJudgment {
|
|
|
89
98
|
/** 'tree' when the declared future is a claim about the whole tree (it must rest on a tree check); unset when the judge declared none. */
|
|
90
99
|
scope?: JudgeScope;
|
|
91
100
|
}
|
|
92
|
-
export declare const RECONCILE_SYSTEM_PROMPT = "You reconcile a software delivery's DECLARED desired effect against what the delivered code actually accomplishes, for a Goldratt reality-tree flip.\n\nYou are working in a read-only export of the tree of the commit being judged (your working directory), with an export of the BASE tree -- the state before the delivery's change -- beside it when there is one. Both are plain files: there is no git and no shell. You will NOT be given the diff. You are 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- The commit range the delivery's change spans, the changed-file list and the diff stat. Read the change yourself with the Read, Grep and Glob tools: a changed file in the judged tree, and the same path in the base tree to see what it was. Read only what the question needs; you do not need to read every changed file.\n- Check output (tests / lint / types) and inspection findings, when there are any: corroborating evidence only. Never conclude a shortfall from test output alone.\n- The approving review's citations, when there are any: starting points you READ AND WEIGH YOURSELF, never a verdict to copy.\n\nState the SCOPE of the declared effect:\n- \"change\": a claim about what this change does -- judge it from the change.\n- \"tree\": a claim about the whole tree (e.g. \"no module in X does Y\", \"every Z has W\", \"X is free of Y\", \"only Z can do W\"). No slice of the diff can establish it: establish it with a TREE-WIDE CHECK over the judged tree and cite that check.\n\nDo THREE things:\n1. Author the ACHIEVED desired effect: ONE concrete positive sentence describing what the code you read shows was accomplished. Derive it from what you read, NOT from the declared sentence.\n2. Classify how the achieved outcome compares to the declared desired effect:\n - \"match\": the achieved outcome realizes the declared intent.\n - \"legitimate_divergence\": a valid, defensible different result. Give a one-sentence reason naming the gap.\n - \"shortfall\": the achieved outcome falls short -- it does less, is incomplete, or the code does not support the declaration. Give a one-sentence reason naming what is missing, and name the changed file/hunk you inspected in diffCitation when there is one (OMIT the field otherwise -- never write absence prose into it).\n3. CITE what your verdict rests on, in \"citations\" (at least one). Every citation is checked against the judged commit, and a verdict whose citations do not resolve is DISCARDED. Use exactly these forms:\n - \"path/to/file.ts\" -- a file that exists at the judged commit;\n - \"path/to/file.ts:LINE\" -- a line (hunk) you read; the file must have at least LINE lines;\n - \"path/to/file.test.ts::test name\" -- a test whose name appears in that file;\n - \"grep:<count>:<extended regex>\" -- a tree-wide check the daemon RUNS: `git grep -E` over every file of the judged tree, hidden ones included, must find exactly <count> matching lines (e.g. \"grep:0
|
|
101
|
+
export declare const RECONCILE_SYSTEM_PROMPT = "You reconcile a software delivery's DECLARED desired effect against what the delivered code actually accomplishes, for a Goldratt reality-tree flip.\n\nYou are working in a read-only export of the tree of the commit being judged (your working directory), with an export of the BASE tree -- the state before the delivery's change -- beside it when there is one. Both are plain files: there is no git and no shell. You will NOT be given the diff. You are 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- The commit range the delivery's change spans, the changed-file list and the diff stat. Read the change yourself with the Read, Grep and Glob tools: a changed file in the judged tree, and the same path in the base tree to see what it was. Read only what the question needs; you do not need to read every changed file.\n- Check output (tests / lint / types) and inspection findings, when there are any: corroborating evidence only. Never conclude a shortfall from test output alone.\n- The approving review's citations, when there are any: starting points you READ AND WEIGH YOURSELF, never a verdict to copy.\n\nState the SCOPE of the declared effect:\n- \"change\": a claim about what this change does -- judge it from the change.\n- \"tree\": a claim about the whole tree (e.g. \"no module in X does Y\", \"every Z has W\", \"X is free of Y\", \"only Z can do W\"). No slice of the diff can establish it: establish it with a TREE-WIDE CHECK over the judged tree and cite that check.\n\nDo THREE things:\n1. Author the ACHIEVED desired effect: ONE concrete positive sentence describing what the code you read shows was accomplished. Derive it from what you read, NOT from the declared sentence.\n2. Classify how the achieved outcome compares to the declared desired effect:\n - \"match\": the achieved outcome realizes the declared intent.\n - \"legitimate_divergence\": a valid, defensible different result. Give a one-sentence reason naming the gap.\n - \"shortfall\": the achieved outcome falls short -- it does less, is incomplete, or the code does not support the declaration. Give a one-sentence reason naming what is missing, and name the changed file/hunk you inspected in diffCitation when there is one (OMIT the field otherwise -- never write absence prose into it).\n3. CITE what your verdict rests on, in \"citations\" (at least one). Every citation is checked against the judged commit, and a verdict whose citations do not resolve is DISCARDED. Use exactly these forms:\n - \"path/to/file.ts\" -- a file that exists at the judged commit;\n - \"path/to/file.ts:LINE\" -- a line (hunk) you read; the file must have at least LINE lines;\n - \"path/to/file.test.ts::test name\" -- a test whose name appears in that file;\n - \"grep:<count>:<extended regex>\" -- a tree-wide check the daemon RUNS: `git grep -E` over every file of the judged tree, hidden ones included, must find exactly <count> matching lines (e.g. \"grep:0:\\\\?\\\\? *default\" for a claim that no line has the pattern). The citation is a JSON string, so a backslash in the regex is written DOUBLED inside it: the regex \\?\\? *default is cited as \"grep:0:\\\\?\\\\? *default\". A single backslash is not a JSON escape, and it makes your whole answer unparseable. Count it yourself first with the Grep tool (output_mode \"count\", summed over files) so the count you cite is the count you observed.\n EVERY verdict MUST cite at least one grep: check, or it is discarded: for a claim about the whole tree, the check that establishes it; for a claim about the change, a count that locates what you judged (e.g. \"grep:1:export function handleRetry\").\n Whether the checks you cite establish the claim is YOUR judgement: the daemon confirms only that each resolves. Cite the check that bears on the claim -- one whose count the delivery's change moved and whose pattern names what the claim asserts -- and if what you observed disproves the claim, say so in a shortfall.\n\nRespond with ONE JSON object and nothing else:\n{\"achievedStatement\": \"<one sentence>\", \"classification\": \"match\" | \"legitimate_divergence\" | \"shortfall\", \"divergenceReason\": \"<one sentence; omit on match>\", \"diffCitation\": \"<OPTIONAL, shortfall only>\", \"scope\": \"change\" | \"tree\", \"citations\": [\"<citation>\", \"...\"]}";
|
|
93
102
|
export declare function buildReconcileSystemPrompt(): string;
|
|
94
103
|
/**
|
|
95
104
|
* Render the judge's question into the user message: the declared future, the
|
|
@@ -125,7 +134,21 @@ export declare function judgeEvidenceIsEmpty(ev: VerifyEvidence): boolean;
|
|
|
125
134
|
* diffCitation rather than a sentence asserting absence.
|
|
126
135
|
*/
|
|
127
136
|
export declare function citationReferencesEvidence(citation: string, ev: VerifyEvidence): boolean;
|
|
128
|
-
/**
|
|
137
|
+
/** A judge answer read as a verdict: the judgment, or why it is not one. */
|
|
138
|
+
export type ReconcileParse = {
|
|
139
|
+
ok: true;
|
|
140
|
+
judgment: ReconcileJudgment;
|
|
141
|
+
} | {
|
|
142
|
+
ok: false;
|
|
143
|
+
error: string;
|
|
144
|
+
};
|
|
145
|
+
/**
|
|
146
|
+
* Read the model's answer as a JSON judgment, naming why when it is not one (the
|
|
147
|
+
* JSON.parse error, or the field the object lacks). Tolerates code fences /
|
|
148
|
+
* surrounding prose; never rewrites the JSON itself (module header).
|
|
149
|
+
*/
|
|
150
|
+
export declare function parseReconcileAnswer(raw: string): ReconcileParse;
|
|
151
|
+
/** Parse the model's JSON judgment, or null when it is not one (parseReconcileAnswer names why). */
|
|
129
152
|
export declare function parseReconcileJson(raw: string): ReconcileJudgment | null;
|
|
130
153
|
/**
|
|
131
154
|
* The correction turn's user message: each unresolved citation with the
|
|
@@ -133,13 +156,19 @@ export declare function parseReconcileJson(raw: string): ReconcileJudgment | nul
|
|
|
133
156
|
* holds the question and its own first answer (module header). Pure.
|
|
134
157
|
*/
|
|
135
158
|
export declare function buildCitationCorrectionMessage(sha: string, unresolved: readonly UnresolvedEvidenceRef[]): string;
|
|
159
|
+
/**
|
|
160
|
+
* The parse correction turn's user message: the parse error, and the ask for the
|
|
161
|
+
* verdict again as valid JSON. Sent as the next turn of the SAME session. Pure.
|
|
162
|
+
*/
|
|
163
|
+
export declare function buildParseCorrectionMessage(parseError: string): string;
|
|
136
164
|
/**
|
|
137
165
|
* Reconcile the declared desired effect against the delivered code.
|
|
138
166
|
*
|
|
139
167
|
* One bounded judge session (at most one correction turn within it) in the pinned checkout. Throws ModelUnavailable when
|
|
140
168
|
* the judge cannot run (no pinned checkout, or the session itself could not) or
|
|
141
169
|
* its verdict cannot be vouched for (unresolved citations); throws
|
|
142
|
-
* UnparseableJudgment
|
|
170
|
+
* UnparseableJudgment when neither the first answer nor its correction turn
|
|
171
|
+
* parses. The verify caller never
|
|
143
172
|
* flips an injection it could not reconcile.
|
|
144
173
|
*/
|
|
145
174
|
export declare function reconcileAchievedEffect(inputs: ReconcileInputs, openJudge: JudgeSessionOpener, resolveCitations: JudgeCitationResolver): Promise<ReconcileJudgment>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"verify-reconciliation.d.ts","sourceRoot":"","sources":["../../../src/verify/effect-reconciliation/verify-reconciliation.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"verify-reconciliation.d.ts","sourceRoot":"","sources":["../../../src/verify/effect-reconciliation/verify-reconciliation.ts"],"names":[],"mappings":"AAyEA,OAAO,EAAqB,KAAK,aAAa,EAAE,KAAK,qBAAqB,EAAE,KAAK,UAAU,EAAE,MAAM,sBAAsB,CAAC;AAE1H,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,6CAA6C,CAAC;AACzF,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,gEAAgE,CAAC;AAQ5G,kGAAkG;AAClG,eAAO,MAAM,qBAAqB,OAAO,CAAC;AAE1C,sDAAsD;AACtD,wBAAgB,aAAa,CAAC,GAAG,EAAE,MAAM,GAAG,MAAM,CAEjD;AAED;;;;;GAKG;AACH,qBAAa,mBAAoB,SAAQ,KAAK;IAC5C,+FAA+F;IAC/F,QAAQ,CAAC,UAAU,EAAE,MAAM,CAAC;IAC5B,oEAAoE;IACpE,QAAQ,CAAC,OAAO,EAAE,MAAM,CAAC;gBAEb,UAAU,EAAE,MAAM,EAAE,OAAO,EAAE,MAAM;CAMhD;AAED;;;;GAIG;AACH,wBAAgB,uBAAuB,CAAC,GAAG,EAAE,OAAO,GAAG,qBAAqB,CAE3E;AAED,4FAA4F;AAC5F,MAAM,WAAW,YAAY;IAC3B,GAAG,CAAC,WAAW,EAAE,MAAM,GAAG,OAAO,CAAC,MAAM,CAAC,CAAC;IA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BD;;;;;;;;;GASG;AACH,wBAAsB,uBAAuB,CAC3C,MAAM,EAAE,eAAe,EACvB,SAAS,EAAE,kBAAkB,EAC7B,gBAAgB,EAAE,qBAAqB,GACtC,OAAO,CAAC,iBAAiB,CAAC,CA0C5B"}
|
|
@@ -55,6 +55,17 @@
|
|
|
55
55
|
* is a claim and must be true -- the judge is only given the chance to make it
|
|
56
56
|
* true.
|
|
57
57
|
*
|
|
58
|
+
* AN ANSWER THAT DOES NOT PARSE gets that same one turn. The turn names the JSON.parse
|
|
59
|
+
* error and asks for the verdict again as valid JSON; UnparseableJudgment is
|
|
60
|
+
* thrown only when that answer still does not parse. ONE turn per session is
|
|
61
|
+
* the budget for both reasons together: an answer the parse turn recovers is
|
|
62
|
+
* checked for citations like any answer, but a citation that does not resolve
|
|
63
|
+
* there is held as unresolved_citations at once -- the turn is spent. Every
|
|
64
|
+
* answer that does not parse is logged with its JSON.parse error and a bounded
|
|
65
|
+
* tail of its raw text (the session keeps no transcript), and
|
|
66
|
+
* UnparseableJudgment carries the same tail. No lenient parser rewrites the
|
|
67
|
+
* answer: a slip is corrected by the judge, never hidden by the daemon.
|
|
68
|
+
*
|
|
58
69
|
* @module verify-reconciliation
|
|
59
70
|
*/
|
|
60
71
|
import { ModelUnavailable } from '../../backends/claude/one-shot-model.js';
|
|
@@ -64,15 +75,28 @@ import { createLogger } from '../../log/daemon-log.js';
|
|
|
64
75
|
const log = createLogger({ module: 'verification' });
|
|
65
76
|
/** The name UnparseableJudgment carries; read by name (a duck-typed check survives the test mock loader). */
|
|
66
77
|
const UNPARSEABLE_JUDGMENT = 'UnparseableJudgment';
|
|
78
|
+
/** How much of an unparseable answer is kept: its TAIL, where a broken or cut-off object ends. */
|
|
79
|
+
export const RAW_ANSWER_TAIL_CHARS = 1000;
|
|
80
|
+
/** The bounded tail of a judge's raw answer. Pure. */
|
|
81
|
+
export function rawAnswerTail(raw) {
|
|
82
|
+
return boundedText(raw, RAW_ANSWER_TAIL_CHARS, 'tail');
|
|
83
|
+
}
|
|
67
84
|
/**
|
|
68
|
-
* The judge answered, but nothing in its answer parsed as a judgment
|
|
85
|
+
* The judge answered, but nothing in its answer parsed as a judgment -- not its
|
|
86
|
+
* first answer and not the correction turn's (module header). Thrown by
|
|
69
87
|
* reconcileAchievedEffect; the shortfall it is signed as carries `unjudged:
|
|
70
88
|
* 'no_parseable_judgment'` (unjudgedShortfallKindOf).
|
|
71
89
|
*/
|
|
72
90
|
export class UnparseableJudgment extends Error {
|
|
73
|
-
|
|
74
|
-
|
|
91
|
+
/** Why the last answer did not parse: the JSON.parse error, or what the parsed value lacks. */
|
|
92
|
+
parseError;
|
|
93
|
+
/** A bounded tail of the last answer's raw text (rawAnswerTail). */
|
|
94
|
+
rawTail;
|
|
95
|
+
constructor(parseError, rawTail) {
|
|
96
|
+
super(`verify-reconciliation produced no parseable judgment: ${parseError}`);
|
|
75
97
|
this.name = UNPARSEABLE_JUDGMENT;
|
|
98
|
+
this.parseError = parseError;
|
|
99
|
+
this.rawTail = rawTail;
|
|
76
100
|
}
|
|
77
101
|
}
|
|
78
102
|
/**
|
|
@@ -105,7 +129,7 @@ Do THREE things:
|
|
|
105
129
|
- "path/to/file.ts" -- a file that exists at the judged commit;
|
|
106
130
|
- "path/to/file.ts:LINE" -- a line (hunk) you read; the file must have at least LINE lines;
|
|
107
131
|
- "path/to/file.test.ts::test name" -- a test whose name appears in that file;
|
|
108
|
-
- "grep:<count>:<extended regex>" -- a tree-wide check the daemon RUNS: \`git grep -E\` over every file of the judged tree, hidden ones included, must find exactly <count> matching lines (e.g. "grep:0
|
|
132
|
+
- "grep:<count>:<extended regex>" -- a tree-wide check the daemon RUNS: \`git grep -E\` over every file of the judged tree, hidden ones included, must find exactly <count> matching lines (e.g. "grep:0:\\\\?\\\\? *default" for a claim that no line has the pattern). The citation is a JSON string, so a backslash in the regex is written DOUBLED inside it: the regex \\?\\? *default is cited as "grep:0:\\\\?\\\\? *default". A single backslash is not a JSON escape, and it makes your whole answer unparseable. Count it yourself first with the Grep tool (output_mode "count", summed over files) so the count you cite is the count you observed.
|
|
109
133
|
EVERY verdict MUST cite at least one grep: check, or it is discarded: for a claim about the whole tree, the check that establishes it; for a claim about the change, a count that locates what you judged (e.g. "grep:1:export function handleRetry").
|
|
110
134
|
Whether the checks you cite establish the claim is YOUR judgement: the daemon confirms only that each resolves. Cite the check that bears on the claim -- one whose count the delivery's change moved and whose pattern names what the claim asserts -- and if what you observed disproves the claim, say so in a shortfall.
|
|
111
135
|
|
|
@@ -222,12 +246,11 @@ export function citationReferencesEvidence(citation, ev) {
|
|
|
222
246
|
}
|
|
223
247
|
return false;
|
|
224
248
|
}
|
|
225
|
-
/**
|
|
226
|
-
|
|
227
|
-
const stripped = raw.replace(/```(?:json)?\s*/g, '').replace(/```/g, '');
|
|
249
|
+
/** The first balanced JSON object in the answer's text, or why there is none. Pure. */
|
|
250
|
+
function firstJsonObject(stripped) {
|
|
228
251
|
const firstBrace = stripped.indexOf('{');
|
|
229
252
|
if (firstBrace < 0)
|
|
230
|
-
return
|
|
253
|
+
return { ok: false, error: 'the answer holds no JSON object' };
|
|
231
254
|
let depth = 0;
|
|
232
255
|
let endIdx = -1;
|
|
233
256
|
for (let i = firstBrace; i < stripped.length; i += 1) {
|
|
@@ -243,25 +266,36 @@ export function parseReconcileJson(raw) {
|
|
|
243
266
|
}
|
|
244
267
|
}
|
|
245
268
|
if (endIdx < 0)
|
|
246
|
-
return
|
|
269
|
+
return { ok: false, error: 'the JSON object is never closed' };
|
|
270
|
+
return { ok: true, text: stripped.slice(firstBrace, endIdx + 1) };
|
|
271
|
+
}
|
|
272
|
+
/**
|
|
273
|
+
* Read the model's answer as a JSON judgment, naming why when it is not one (the
|
|
274
|
+
* JSON.parse error, or the field the object lacks). Tolerates code fences /
|
|
275
|
+
* surrounding prose; never rewrites the JSON itself (module header).
|
|
276
|
+
*/
|
|
277
|
+
export function parseReconcileAnswer(raw) {
|
|
278
|
+
const object = firstJsonObject(raw.replace(/```(?:json)?\s*/g, '').replace(/```/g, ''));
|
|
279
|
+
if (!object.ok)
|
|
280
|
+
return object;
|
|
247
281
|
let parsed;
|
|
248
282
|
try {
|
|
249
|
-
parsed = JSON.parse(
|
|
283
|
+
parsed = JSON.parse(object.text);
|
|
250
284
|
}
|
|
251
|
-
catch {
|
|
252
|
-
return
|
|
285
|
+
catch (err) {
|
|
286
|
+
return { ok: false, error: `JSON.parse: ${err instanceof Error ? err.message : String(err)}` };
|
|
253
287
|
}
|
|
254
288
|
if (!parsed || typeof parsed !== 'object')
|
|
255
|
-
return
|
|
289
|
+
return { ok: false, error: 'the JSON value is not an object' };
|
|
256
290
|
const obj = parsed;
|
|
257
291
|
const achieved = typeof obj.achievedStatement === 'string' ? obj.achievedStatement.trim() : '';
|
|
258
292
|
if (achieved === '')
|
|
259
|
-
return
|
|
293
|
+
return { ok: false, error: 'achievedStatement is missing or empty' };
|
|
260
294
|
const classification = obj.classification;
|
|
261
295
|
if (classification !== 'match' &&
|
|
262
296
|
classification !== 'legitimate_divergence' &&
|
|
263
297
|
classification !== 'shortfall') {
|
|
264
|
-
return
|
|
298
|
+
return { ok: false, error: `classification ${JSON.stringify(classification) ?? 'undefined'} is not "match", "legitimate_divergence" or "shortfall"` };
|
|
265
299
|
}
|
|
266
300
|
const reasonRaw = typeof obj.divergenceReason === 'string' ? obj.divergenceReason.trim() : '';
|
|
267
301
|
const citationRaw = typeof obj.diffCitation === 'string' ? obj.diffCitation.trim() : '';
|
|
@@ -282,7 +316,21 @@ export function parseReconcileJson(raw) {
|
|
|
282
316
|
if (classification === 'shortfall' && citationRaw !== '') {
|
|
283
317
|
judgment.diffCitation = citationRaw;
|
|
284
318
|
}
|
|
285
|
-
return judgment;
|
|
319
|
+
return { ok: true, judgment };
|
|
320
|
+
}
|
|
321
|
+
/** Parse the model's JSON judgment, or null when it is not one (parseReconcileAnswer names why). */
|
|
322
|
+
export function parseReconcileJson(raw) {
|
|
323
|
+
const parsed = parseReconcileAnswer(raw);
|
|
324
|
+
return parsed.ok ? parsed.judgment : null;
|
|
325
|
+
}
|
|
326
|
+
function readJudgeAnswer(raw, which) {
|
|
327
|
+
const parsed = parseReconcileAnswer(raw);
|
|
328
|
+
if (parsed.ok)
|
|
329
|
+
return parsed;
|
|
330
|
+
const rawTail = rawAnswerTail(raw);
|
|
331
|
+
log.warn(`[verification] verify-reconciliation: the judge's ${which} did not parse (${parsed.error}); `
|
|
332
|
+
+ `raw answer (${raw.length} characters), tail:\n${rawTail}`);
|
|
333
|
+
return { ok: false, error: parsed.error, rawTail };
|
|
286
334
|
}
|
|
287
335
|
/** What in a verdict's citations does not resolve at the judged commit, or is missing (no concrete citation, no grep: check). */
|
|
288
336
|
async function unresolvedCitations(judgment, workspace, resolveCitations) {
|
|
@@ -330,13 +378,46 @@ async function withCorrectionTurn(first, workspace, session, resolveCitations) {
|
|
|
330
378
|
return first;
|
|
331
379
|
log.info(`[verification] verify-reconciliation: ${unresolved.length} citation(s) do not resolve at ${workspace.sha.slice(0, 12)} `
|
|
332
380
|
+ '-- the judge gets its one correction turn, in the same session, before the verdict is held');
|
|
333
|
-
const corrected =
|
|
334
|
-
if (!corrected)
|
|
335
|
-
throw unresolvedCitationsHold(first, workspace, unresolved,
|
|
336
|
-
|
|
381
|
+
const corrected = readJudgeAnswer(await session.ask(buildCitationCorrectionMessage(workspace.sha, unresolved)), 'citation correction');
|
|
382
|
+
if (!corrected.ok) {
|
|
383
|
+
throw unresolvedCitationsHold(first, workspace, unresolved, `its correction turn returned no parseable verdict: ${corrected.error}`);
|
|
384
|
+
}
|
|
385
|
+
const still = await unresolvedCitations(corrected.judgment, workspace, resolveCitations);
|
|
337
386
|
if (still.length > 0)
|
|
338
|
-
throw unresolvedCitationsHold(corrected, workspace, still, 'still unresolved after its correction turn');
|
|
339
|
-
return corrected;
|
|
387
|
+
throw unresolvedCitationsHold(corrected.judgment, workspace, still, 'still unresolved after its correction turn');
|
|
388
|
+
return corrected.judgment;
|
|
389
|
+
}
|
|
390
|
+
/**
|
|
391
|
+
* The parse correction turn's user message: the parse error, and the ask for the
|
|
392
|
+
* verdict again as valid JSON. Sent as the next turn of the SAME session. Pure.
|
|
393
|
+
*/
|
|
394
|
+
export function buildParseCorrectionMessage(parseError) {
|
|
395
|
+
return [
|
|
396
|
+
`The daemon could not read your answer as the JSON verdict: ${parseError}.`,
|
|
397
|
+
'Inside a JSON string a backslash begins an escape, so a backslash in a grep: regex is written doubled '
|
|
398
|
+
+ '(the regex \\( is written \\\\( inside the string). '
|
|
399
|
+
+ 'Respond with the complete verdict again as ONE valid JSON object and nothing else.',
|
|
400
|
+
].join('\n\n');
|
|
401
|
+
}
|
|
402
|
+
/**
|
|
403
|
+
* The session's verdict (module header): a first answer that parses goes to the
|
|
404
|
+
* citation check with its correction turn; one that does not spends the turn on
|
|
405
|
+
* the parse, so the recovered answer's citations must resolve as they stand.
|
|
406
|
+
* Throws UnparseableJudgment when the recovered answer still does not parse.
|
|
407
|
+
*/
|
|
408
|
+
async function sessionVerdict(inputs, workspace, session, resolveCitations) {
|
|
409
|
+
const first = readJudgeAnswer(await session.ask(buildReconcileUserMessage(inputs)), 'first answer');
|
|
410
|
+
if (first.ok)
|
|
411
|
+
return withCorrectionTurn(first.judgment, workspace, session, resolveCitations);
|
|
412
|
+
log.info('[verification] verify-reconciliation: the judge gets its one correction turn, in the same session, to answer as valid JSON');
|
|
413
|
+
const corrected = readJudgeAnswer(await session.ask(buildParseCorrectionMessage(first.error)), 'parse correction');
|
|
414
|
+
if (!corrected.ok)
|
|
415
|
+
throw new UnparseableJudgment(corrected.error, corrected.rawTail);
|
|
416
|
+
const unresolved = await unresolvedCitations(corrected.judgment, workspace, resolveCitations);
|
|
417
|
+
if (unresolved.length > 0) {
|
|
418
|
+
throw unresolvedCitationsHold(corrected.judgment, workspace, unresolved, 'unresolved after the correction turn its unparseable first answer spent');
|
|
419
|
+
}
|
|
420
|
+
return corrected.judgment;
|
|
340
421
|
}
|
|
341
422
|
/**
|
|
342
423
|
* Reconcile the declared desired effect against the delivered code.
|
|
@@ -344,7 +425,8 @@ async function withCorrectionTurn(first, workspace, session, resolveCitations) {
|
|
|
344
425
|
* One bounded judge session (at most one correction turn within it) in the pinned checkout. Throws ModelUnavailable when
|
|
345
426
|
* the judge cannot run (no pinned checkout, or the session itself could not) or
|
|
346
427
|
* its verdict cannot be vouched for (unresolved citations); throws
|
|
347
|
-
* UnparseableJudgment
|
|
428
|
+
* UnparseableJudgment when neither the first answer nor its correction turn
|
|
429
|
+
* parses. The verify caller never
|
|
348
430
|
* flips an injection it could not reconcile.
|
|
349
431
|
*/
|
|
350
432
|
export async function reconcileAchievedEffect(inputs, openJudge, resolveCitations) {
|
|
@@ -368,10 +450,7 @@ export async function reconcileAchievedEffect(inputs, openJudge, resolveCitation
|
|
|
368
450
|
const session = openJudge(buildReconcileSystemPrompt(), workspace);
|
|
369
451
|
let judgment;
|
|
370
452
|
try {
|
|
371
|
-
|
|
372
|
-
if (!first)
|
|
373
|
-
throw new UnparseableJudgment();
|
|
374
|
-
judgment = await withCorrectionTurn(first, workspace, session, resolveCitations);
|
|
453
|
+
judgment = await sessionVerdict(inputs, workspace, session, resolveCitations);
|
|
375
454
|
}
|
|
376
455
|
finally {
|
|
377
456
|
session.close();
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"verify-reconciliation.js","sourceRoot":"","sources":["../../../src/verify/effect-reconciliation/verify-reconciliation.ts"],"names":[],"mappings":"AAAA,8FAA8F;AAC9F,2EAA2E;AAC3E,6EAA6E;AAC7E,8EAA8E;AAC9E,wFAAwF;AACxF,oFAAoF;AACpF,iFAAiF;AACjF,mEAAmE;AACnE,oEAAoE;AACpE,gBAAgB;AAEhB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAgDG;AAEH,OAAO,EAAE,gBAAgB,EAAE,MAAM,yCAAyC,CAAC;AAC3E,OAAO,EAAE,iBAAiB,EAAmE,MAAM,sBAAsB,CAAC;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KAAK,WAAW;QACvC,QAAQ,CAAC,YAAY;QACrB,CAAC,0BAA0B,CAAC,QAAQ,CAAC,YAAY,EAAE,MAAM,CAAC,QAAQ,CAAC,EACnE,CAAC;QACD,OAAO,QAAQ,CAAC,YAAY,CAAC;IAC/B,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"}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import type { DaemonConfig } from '../../types/index.js';
|
|
2
|
+
import type { FalsifiedEffectReopenCandidate } from '../../queries/deliveries/falsified-effect-reopens.js';
|
|
3
|
+
import type { GateReworkStatusWrite } from './gate-rework-reopen.js';
|
|
4
|
+
/** The re-open's collaborators, every one required. */
|
|
5
|
+
export interface FalsifiedEffectReopenDeps {
|
|
6
|
+
/** The product's done deliveries carrying an open falsifying Bug. */
|
|
7
|
+
listCandidates: (productId: string) => Promise<ReadonlyArray<FalsifiedEffectReopenCandidate>>;
|
|
8
|
+
resolveStageId: (deliveryId: string, statusName: string) => Promise<string | undefined>;
|
|
9
|
+
/** The applier's advancer status writer (composition/delivery-advancers-context.ts), bound at the root. */
|
|
10
|
+
updateDeliveryStatus: GateReworkStatusWrite;
|
|
11
|
+
}
|
|
12
|
+
/**
|
|
13
|
+
* Re-open each done delivery of `config`'s product that carries an open
|
|
14
|
+
* falsifying Bug. Returns the ids re-opened. Never throws.
|
|
15
|
+
*/
|
|
16
|
+
export declare function reopenFalsifiedDoneDeliveries(config: DaemonConfig, deps: FalsifiedEffectReopenDeps): Promise<string[]>;
|
|
17
|
+
//# sourceMappingURL=falsified-effect-reopen.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"falsified-effect-reopen.d.ts","sourceRoot":"","sources":["../../../src/verify/outcome-routing/falsified-effect-reopen.ts"],"names":[],"mappings":"AA+BA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,sBAAsB,CAAC;AAEzD,OAAO,KAAK,EAAE,8BAA8B,EAAE,MAAM,sDAAsD,CAAC;AAE3G,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,yBAAyB,CAAC;AAIrE,uDAAuD;AACvD,MAAM,WAAW,yBAAyB;IACxC,qEAAqE;IACrE,cAAc,EAAE,CAAC,SAAS,EAAE,MAAM,KAAK,OAAO,CAAC,aAAa,CAAC,8BAA8B,CAAC,CAAC,CAAC;IAC9F,cAAc,EAAE,CAAC,UAAU,EAAE,MAAM,EAAE,UAAU,EAAE,MAAM,KAAK,OAAO,CAAC,MAAM,GAAG,SAAS,CAAC,CAAC;IACxF,2GAA2G;IAC3G,oBAAoB,EAAE,qBAAqB,CAAC;CAC7C;AAED;;;GAGG;AACH,wBAAsB,6BAA6B,CACjD,MAAM,EAAE,YAAY,EACpB,IAAI,EAAE,yBAAyB,GAC9B,OAAO,CAAC,MAAM,EAAE,CAAC,CAoCnB"}
|
|
@@ -0,0 +1,76 @@
|
|
|
1
|
+
// PINNED-BY-BEGIN (generated by gen:pinned-by -- do not hand-edit; checked by lint:pinned-by)
|
|
2
|
+
// Pinned by: packages/daemon/src/verify/outcome-routing/falsified-effect-reopen.test.ts
|
|
3
|
+
// PINNED-BY-END
|
|
4
|
+
/**
|
|
5
|
+
* A DONE delivery carrying an open Bug that names the met effects it falsifies
|
|
6
|
+
* is RE-OPENED with it, so a coding pass picks the Bug up.
|
|
7
|
+
*
|
|
8
|
+
* Filing such a Bug says verify was wrong (docs/DECISIONS.md, "Work found after
|
|
9
|
+
* done goes where the tree says"). product-api demotes the named
|
|
10
|
+
* effects when the Bug is filed (handlers/issue-done-delivery.ts), but the
|
|
11
|
+
* delivery's status has one writer -- this daemon's reconciler -- so the open
|
|
12
|
+
* Bug is the reopen SIGNAL and this pass is the write: done -> verify_failed,
|
|
13
|
+
* through the single-writer reconciler's falsifiedEffectBugOpen fact
|
|
14
|
+
* (delivery/delivery-reconciler.ts). The walk from there is the normal one --
|
|
15
|
+
* verify_failed -> queued, and the coding pass the open Bug draws (on the next
|
|
16
|
+
* arm, for a focus no human has armed).
|
|
17
|
+
*
|
|
18
|
+
* The reconciler is shown ONLY the delivery's falsifying Bugs, so the re-open
|
|
19
|
+
* is decided on exactly "an open falsifying Bug sits on it": a closed Bug
|
|
20
|
+
* re-opens nothing, and an unrelated open issue never does either.
|
|
21
|
+
*
|
|
22
|
+
* Runs once per product per poll in the verify-routing phase
|
|
23
|
+
* (focus/verify-routing-passes.ts). Best-effort: a failed read or write is
|
|
24
|
+
* logged and the next poll retries it. Effects only through the injected seams;
|
|
25
|
+
* the production binding is composition/runtime-poll-context.ts.
|
|
26
|
+
*
|
|
27
|
+
* @module verify/outcome-routing/falsified-effect-reopen
|
|
28
|
+
*/
|
|
29
|
+
import { DELIVERY_STATUS } from '@telora/daemon-core';
|
|
30
|
+
import { resolveReconciledWrite } from '../../delivery/delivery-reconciler-apply.js';
|
|
31
|
+
import { createLogger } from '../../log/daemon-log.js';
|
|
32
|
+
const log = createLogger({ module: 'verification' });
|
|
33
|
+
/**
|
|
34
|
+
* Re-open each done delivery of `config`'s product that carries an open
|
|
35
|
+
* falsifying Bug. Returns the ids re-opened. Never throws.
|
|
36
|
+
*/
|
|
37
|
+
export async function reopenFalsifiedDoneDeliveries(config, deps) {
|
|
38
|
+
if (!config.productId)
|
|
39
|
+
return [];
|
|
40
|
+
let candidates;
|
|
41
|
+
try {
|
|
42
|
+
candidates = await deps.listCandidates(config.productId);
|
|
43
|
+
}
|
|
44
|
+
catch (err) {
|
|
45
|
+
log.warn(`[verification] falsified-effect reopen: candidate read failed, retried next poll: ${String(err)}`);
|
|
46
|
+
return [];
|
|
47
|
+
}
|
|
48
|
+
const reopened = [];
|
|
49
|
+
for (const c of candidates) {
|
|
50
|
+
if (c.executionStatus !== DELIVERY_STATUS.DONE)
|
|
51
|
+
continue;
|
|
52
|
+
const decision = resolveReconciledWrite({
|
|
53
|
+
input: {
|
|
54
|
+
currentStatus: c.executionStatus,
|
|
55
|
+
issues: c.bugs.map((b) => ({ status: b.status, issueType: b.issueType })),
|
|
56
|
+
gitState: { worktreeCommitted: true },
|
|
57
|
+
guardVerdict: null,
|
|
58
|
+
reviewState: null,
|
|
59
|
+
falsifiedEffectBugOpen: true,
|
|
60
|
+
},
|
|
61
|
+
});
|
|
62
|
+
if (decision.target === c.executionStatus)
|
|
63
|
+
continue;
|
|
64
|
+
try {
|
|
65
|
+
const stageId = await deps.resolveStageId(c.deliveryId, decision.target);
|
|
66
|
+
await deps.updateDeliveryStatus(c.deliveryId, decision.target, stageId, undefined, undefined, { organizationId: config.organizationId, fromStatus: c.executionStatus });
|
|
67
|
+
reopened.push(c.deliveryId);
|
|
68
|
+
log.info(`[verification] falsified-effect reopen: re-opened done delivery "${c.deliveryName}" (${c.deliveryId}) to ${decision.target} -- an open Bug falsifies a met effect`);
|
|
69
|
+
}
|
|
70
|
+
catch (err) {
|
|
71
|
+
log.warn(`[verification] falsified-effect reopen: write failed for ${c.deliveryId}, retried next poll: ${String(err)}`);
|
|
72
|
+
}
|
|
73
|
+
}
|
|
74
|
+
return reopened;
|
|
75
|
+
}
|
|
76
|
+
//# sourceMappingURL=falsified-effect-reopen.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"falsified-effect-reopen.js","sourceRoot":"","sources":["../../../src/verify/outcome-routing/falsified-effect-reopen.ts"],"names":[],"mappings":"AAAA,8FAA8F;AAC9F,wFAAwF;AACxF,gBAAgB;AAEhB;;;;;;;;;;;;;;;;;;;;;;;;GAwBG;AAEH,OAAO,EAAE,eAAe,EAAwB,MAAM,qBAAqB,CAAC;AAE5E,OAAO,EAAE,sBA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S;QACpD,IAAI,CAAC;YACH,MAAM,OAAO,GAAG,MAAM,IAAI,CAAC,cAAc,CAAC,CAAC,CAAC,UAAU,EAAE,QAAQ,CAAC,MAAM,CAAC,CAAC;YACzE,MAAM,IAAI,CAAC,oBAAoB,CAC7B,CAAC,CAAC,UAAU,EAAE,QAAQ,CAAC,MAAM,EAAE,OAAO,EAAE,SAAS,EAAE,SAAS,EAC5D,EAAE,cAAc,EAAE,MAAM,CAAC,cAAc,EAAE,UAAU,EAAE,CAAC,CAAC,eAAe,EAAE,CACzE,CAAC;YACF,QAAQ,CAAC,IAAI,CAAC,CAAC,CAAC,UAAU,CAAC,CAAC;YAC5B,GAAG,CAAC,IAAI,CAAC,oEAAoE,CAAC,CAAC,YAAY,MAAM,CAAC,CAAC,UAAU,QAAQ,QAAQ,CAAC,MAAM,wCAAwC,CAAC,CAAC;QAChL,CAAC;QAAC,OAAO,GAAG,EAAE,CAAC;YACb,GAAG,CAAC,IAAI,CAAC,4DAA4D,CAAC,CAAC,UAAU,wBAAwB,MAAM,CAAC,GAAG,CAAC,EAAE,CAAC,CAAC;QAC1H,CAAC;IACH,CAAC;IACD,OAAO,QAAQ,CAAC;AAClB,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@telora/daemon",
|
|
3
|
-
"version": "0.24.
|
|
3
|
+
"version": "0.24.8",
|
|
4
4
|
"description": "Agent orchestration daemon for Telora - spawns and manages Claude Code instances",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"bin": {
|
|
@@ -41,7 +41,7 @@
|
|
|
41
41
|
"//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. Test files live beside the modules they exercise (owner-directory layout); the runner discovers them recursively.",
|
|
42
42
|
"dependencies": {
|
|
43
43
|
"@telora/daemon-core": "^0.3.1",
|
|
44
|
-
"@telora/mcp-products": "^0.23.
|
|
44
|
+
"@telora/mcp-products": "^0.23.5",
|
|
45
45
|
"commander": "^14.0.3",
|
|
46
46
|
"yaml": "^2.4.0",
|
|
47
47
|
"zod": "^4.3.6"
|