agentfootprint 9.76.1 → 9.78.0
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/CHANGELOG.md +188 -0
- package/CLAUDE.md +2 -0
- package/dist/core/Agent.js +86 -0
- package/dist/core/Agent.js.map +1 -1
- package/dist/core/agent/integrityFindings.js +47 -0
- package/dist/core/agent/integrityFindings.js.map +1 -0
- package/dist/core/agent/stages/callLLM.js +28 -29
- package/dist/core/agent/stages/callLLM.js.map +1 -1
- package/dist/core/agent/stages/toolCalls.js +184 -0
- package/dist/core/agent/stages/toolCalls.js.map +1 -1
- package/dist/core/tools.js +9 -1
- package/dist/core/tools.js.map +1 -1
- package/dist/esm/core/Agent.d.ts +10 -0
- package/dist/esm/core/Agent.js +86 -0
- package/dist/esm/core/Agent.js.map +1 -1
- package/dist/esm/core/agent/integrityFindings.d.ts +27 -0
- package/dist/esm/core/agent/integrityFindings.js +43 -0
- package/dist/esm/core/agent/integrityFindings.js.map +1 -0
- package/dist/esm/core/agent/stages/callLLM.d.ts +25 -0
- package/dist/esm/core/agent/stages/callLLM.js +25 -26
- package/dist/esm/core/agent/stages/callLLM.js.map +1 -1
- package/dist/esm/core/agent/stages/toolCalls.d.ts +43 -0
- package/dist/esm/core/agent/stages/toolCalls.js +185 -1
- package/dist/esm/core/agent/stages/toolCalls.js.map +1 -1
- package/dist/esm/core/agent/types.d.ts +112 -0
- package/dist/esm/core/tools.d.ts +63 -0
- package/dist/esm/core/tools.js +17 -0
- package/dist/esm/core/tools.js.map +1 -1
- package/dist/esm/index.d.ts +3 -0
- package/dist/esm/index.js +18 -0
- package/dist/esm/index.js.map +1 -1
- package/dist/esm/integrity/argumentLeaves.d.ts +33 -0
- package/dist/esm/integrity/argumentLeaves.js +49 -0
- package/dist/esm/integrity/argumentLeaves.js.map +1 -0
- package/dist/esm/integrity/column-types/check.d.ts +156 -0
- package/dist/esm/integrity/column-types/check.js +363 -0
- package/dist/esm/integrity/column-types/check.js.map +1 -0
- package/dist/esm/integrity/column-types/types.d.ts +121 -0
- package/dist/esm/integrity/column-types/types.js +107 -0
- package/dist/esm/integrity/column-types/types.js.map +1 -0
- package/dist/esm/integrity/disposition/lifecycle.d.ts +31 -1
- package/dist/esm/integrity/disposition/lifecycle.js +54 -1
- package/dist/esm/integrity/disposition/lifecycle.js.map +1 -1
- package/dist/esm/integrity/empty-lookup/check.d.ts +140 -0
- package/dist/esm/integrity/empty-lookup/check.js +212 -0
- package/dist/esm/integrity/empty-lookup/check.js.map +1 -0
- package/dist/esm/integrity/finding/types.d.ts +23 -2
- package/dist/esm/integrity/finding/types.js.map +1 -1
- package/dist/esm/integrity/unsupported-argument/check.js +11 -27
- package/dist/esm/integrity/unsupported-argument/check.js.map +1 -1
- package/dist/esm/lib/mcp/toolExtras.d.ts +17 -2
- package/dist/esm/lib/mcp/toolExtras.js +5 -2
- package/dist/esm/lib/mcp/toolExtras.js.map +1 -1
- package/dist/esm/lib/trace-toolpack/traceToolpack.js +8 -4
- package/dist/esm/lib/trace-toolpack/traceToolpack.js.map +1 -1
- package/dist/index.js +26 -3
- package/dist/index.js.map +1 -1
- package/dist/integrity/argumentLeaves.js +54 -0
- package/dist/integrity/argumentLeaves.js.map +1 -0
- package/dist/integrity/column-types/check.js +368 -0
- package/dist/integrity/column-types/check.js.map +1 -0
- package/dist/integrity/column-types/types.js +112 -0
- package/dist/integrity/column-types/types.js.map +1 -0
- package/dist/integrity/disposition/lifecycle.js +54 -1
- package/dist/integrity/disposition/lifecycle.js.map +1 -1
- package/dist/integrity/empty-lookup/check.js +217 -0
- package/dist/integrity/empty-lookup/check.js.map +1 -0
- package/dist/integrity/finding/types.js.map +1 -1
- package/dist/integrity/unsupported-argument/check.js +13 -29
- package/dist/integrity/unsupported-argument/check.js.map +1 -1
- package/dist/lib/mcp/toolExtras.js +4 -1
- package/dist/lib/mcp/toolExtras.js.map +1 -1
- package/dist/lib/trace-toolpack/traceToolpack.js +8 -4
- package/dist/lib/trace-toolpack/traceToolpack.js.map +1 -1
- package/dist/types/core/Agent.d.ts +10 -0
- package/dist/types/core/Agent.d.ts.map +1 -1
- package/dist/types/core/agent/integrityFindings.d.ts +28 -0
- package/dist/types/core/agent/integrityFindings.d.ts.map +1 -0
- package/dist/types/core/agent/stages/callLLM.d.ts +25 -0
- package/dist/types/core/agent/stages/callLLM.d.ts.map +1 -1
- package/dist/types/core/agent/stages/toolCalls.d.ts +43 -0
- package/dist/types/core/agent/stages/toolCalls.d.ts.map +1 -1
- package/dist/types/core/agent/types.d.ts +112 -0
- package/dist/types/core/agent/types.d.ts.map +1 -1
- package/dist/types/core/tools.d.ts +63 -0
- package/dist/types/core/tools.d.ts.map +1 -1
- package/dist/types/index.d.ts +3 -0
- package/dist/types/index.d.ts.map +1 -1
- package/dist/types/integrity/argumentLeaves.d.ts +34 -0
- package/dist/types/integrity/argumentLeaves.d.ts.map +1 -0
- package/dist/types/integrity/column-types/check.d.ts +157 -0
- package/dist/types/integrity/column-types/check.d.ts.map +1 -0
- package/dist/types/integrity/column-types/types.d.ts +122 -0
- package/dist/types/integrity/column-types/types.d.ts.map +1 -0
- package/dist/types/integrity/disposition/lifecycle.d.ts +31 -1
- package/dist/types/integrity/disposition/lifecycle.d.ts.map +1 -1
- package/dist/types/integrity/empty-lookup/check.d.ts +141 -0
- package/dist/types/integrity/empty-lookup/check.d.ts.map +1 -0
- package/dist/types/integrity/finding/types.d.ts +23 -2
- package/dist/types/integrity/finding/types.d.ts.map +1 -1
- package/dist/types/integrity/unsupported-argument/check.d.ts.map +1 -1
- package/dist/types/lib/mcp/toolExtras.d.ts +17 -2
- package/dist/types/lib/mcp/toolExtras.d.ts.map +1 -1
- package/dist/types/lib/trace-toolpack/traceToolpack.d.ts.map +1 -1
- package/package.json +1 -1
|
@@ -10,7 +10,14 @@
|
|
|
10
10
|
* compose-invariant: a mount kernel is configured; dangling: at
|
|
11
11
|
* least one tool declared `argumentsFrom`, which arms BOTH the
|
|
12
12
|
* compose-seam dangling-reference check and the choice-seam
|
|
13
|
-
* unsupported-argument check off the same declaration
|
|
13
|
+
* unsupported-argument check off the same declaration;
|
|
14
|
+
* empty-lookup: that same declaration AND the operator's
|
|
15
|
+
* `noticeEmptyLookups` dial — two halves, because an advisory that
|
|
16
|
+
* armed itself off a declaration made for something else would not
|
|
17
|
+
* be opt-in at all; column-types: `Tool.resultColumns` AND the
|
|
18
|
+
* operator's `checkColumnTypes` dial off `'off'` — the same two
|
|
19
|
+
* halves, arming BOTH `column-type-mismatch` and `missing-column`
|
|
20
|
+
* off the one declaration).
|
|
14
21
|
* Registration is what makes silence auditable — an unregistered
|
|
15
22
|
* check is honest
|
|
16
23
|
* absence, a registered one that never notes is the wiring rot
|
|
@@ -29,6 +36,8 @@ import { wireViolationsOf } from '../invariant-violation/wire.js';
|
|
|
29
36
|
import { danglingReferencesOf } from '../dangling-reference/check.js';
|
|
30
37
|
import { unsupportedArgumentsOf } from '../unsupported-argument/check.js';
|
|
31
38
|
import { unsupportedClaimsOf } from '../unsupported-claim/check.js';
|
|
39
|
+
import { emptyLookupOf, readLookupResult } from '../empty-lookup/check.js';
|
|
40
|
+
import { columnTypesOf, readRowset } from '../column-types/check.js';
|
|
32
41
|
/**
|
|
33
42
|
* Start one run's ledger: register the present checks and, in dev posture,
|
|
34
43
|
* prove each can still catch its own synthetic defect.
|
|
@@ -73,6 +82,9 @@ export function beginIntegrityRun(present, posture) {
|
|
|
73
82
|
armed('dangling-reference', 'compose', present.dangling === true);
|
|
74
83
|
armed('unsupported-argument', 'choice', present.dangling === true);
|
|
75
84
|
armed('unsupported-claim', 'claim', present.claim === true);
|
|
85
|
+
armed('empty-lookup', 'write', present.emptyLookup === true);
|
|
86
|
+
armed('column-type-mismatch', 'write', present.columnTypes === true);
|
|
87
|
+
armed('missing-column', 'write', present.columnTypes === true);
|
|
76
88
|
if (posture !== 'dev')
|
|
77
89
|
return ledger;
|
|
78
90
|
// The canaries — one known-bad fixture per REGISTERED check, through the
|
|
@@ -142,6 +154,47 @@ export function beginIntegrityRun(present, posture) {
|
|
|
142
154
|
if (caught.findings.length > 0)
|
|
143
155
|
ledger.noteSynthetic('unsupported-claim', 'claim', 'caught');
|
|
144
156
|
}
|
|
157
|
+
{
|
|
158
|
+
// The write-seam canary (9.77.0): a lookup whose argument the fixture's
|
|
159
|
+
// PRODUCER really did serve, answering with a zero-row rowset. Both
|
|
160
|
+
// halves of the join are deliberately load-bearing — remove the ground
|
|
161
|
+
// and the value is not the run's own; make the rowset non-empty and
|
|
162
|
+
// there is nothing to notice — so a check that finds nothing here has
|
|
163
|
+
// lost one of the two facts it exists to pair.
|
|
164
|
+
ledger.noteSynthetic('empty-lookup', 'write', 'minted');
|
|
165
|
+
const caught = emptyLookupOf({
|
|
166
|
+
toolName: 'canary_tool',
|
|
167
|
+
toolCallId: 'canary',
|
|
168
|
+
args: { id: 'canary-grounded-id' },
|
|
169
|
+
argumentsFrom: ['canary_ground'],
|
|
170
|
+
reading: readLookupResult([], false),
|
|
171
|
+
}, [{ toolName: 'canary_ground', text: 'canary: served canary-grounded-id' }], -1);
|
|
172
|
+
if (caught.findings.length > 0)
|
|
173
|
+
ledger.noteSynthetic('empty-lookup', 'write', 'caught');
|
|
174
|
+
}
|
|
175
|
+
{
|
|
176
|
+
// The column-type canaries (9.78.0). ONE fixture, deliberately, because
|
|
177
|
+
// one rowset carries both defects at once and that is the honest shape of
|
|
178
|
+
// the field failure: a numeric column arriving as text AND a declared
|
|
179
|
+
// column nobody delivered, in the same result. Each check reads its own
|
|
180
|
+
// findings out of the shared verdict, so a canary that catches one and
|
|
181
|
+
// not the other names exactly which half died.
|
|
182
|
+
ledger.noteSynthetic('column-type-mismatch', 'write', 'minted');
|
|
183
|
+
ledger.noteSynthetic('missing-column', 'write', 'minted');
|
|
184
|
+
const caught = columnTypesOf({
|
|
185
|
+
toolName: 'canary_tool',
|
|
186
|
+
toolCallId: 'canary',
|
|
187
|
+
columns: { canary_measure: 'number', canary_absent: 'string' },
|
|
188
|
+
reading: readRowset([{ canary_measure: '1240' }]),
|
|
189
|
+
mode: 'warn',
|
|
190
|
+
}, -1);
|
|
191
|
+
if (caught.findings.some((f) => f.kind === 'column-type-mismatch')) {
|
|
192
|
+
ledger.noteSynthetic('column-type-mismatch', 'write', 'caught');
|
|
193
|
+
}
|
|
194
|
+
if (caught.findings.some((f) => f.kind === 'missing-column')) {
|
|
195
|
+
ledger.noteSynthetic('missing-column', 'write', 'caught');
|
|
196
|
+
}
|
|
197
|
+
}
|
|
145
198
|
return ledger;
|
|
146
199
|
}
|
|
147
200
|
//# sourceMappingURL=lifecycle.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"lifecycle.js","sourceRoot":"","sources":["../../../../src/integrity/disposition/lifecycle.ts"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"lifecycle.js","sourceRoot":"","sources":["../../../../src/integrity/disposition/lifecycle.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA+BG;AAEH,OAAO,EAAE,iBAAiB,EAA0B,MAAM,aAAa,CAAC;AAGxE,OAAO,EAAE,qBAAqB,EAAE,MAAM,iCAAiC,CAAC;AACxE,OAAO,EAAE,gBAAgB,EAAE,MAAM,gCAAgC,CAAC;AAClE,OAAO,EAAE,oBAAoB,EAAE,MAAM,gCAAgC,CAAC;AACtE,OAAO,EAAE,sBAAsB,EAAE,MAAM,kCAAkC,CAAC;AAC1E,OAAO,EAAE,mBAAmB,EAAE,MAAM,+BAA+B,CAAC;AACpE,OAAO,EAAE,aAAa,EAAE,gBAAgB,EAAE,MAAM,0BAA0B,CAAC;AAC3E,OAAO,EAAE,aAAa,EAAE,UAAU,EAAE,MAAM,0BAA0B,CAAC;AAiDrE;;;GAGG;AACH,MAAM,UAAU,iBAAiB,CAC/B,OAA+B,EAC/B,OAAyB;IAEzB,MAAM,MAAM,GAAG,iBAAiB,EAAE,CAAC;IACnC,IAAI,OAAO,CAA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;QACxE,uEAAuE;QACvE,+CAA+C;QAC/C,MAAM,CAAC,aAAa,CAAC,sBAAsB,EAAE,OAAO,EAAE,QAAQ,CAAC,CAAC;QAChE,MAAM,CAAC,aAAa,CAAC,gBAAgB,EAAE,OAAO,EAAE,QAAQ,CAAC,CAAC;QAC1D,MAAM,MAAM,GAAG,aAAa,CAC1B;YACE,QAAQ,EAAE,aAAa;YACvB,UAAU,EAAE,QAAQ;YACpB,OAAO,EAAE,EAAE,cAAc,EAAE,QAAQ,EAAE,aAAa,EAAE,QAAQ,EAAE;YAC9D,OAAO,EAAE,UAAU,CAAC,CAAC,EAAE,cAAc,EAAE,MAAM,EAAE,CAAC,CAAC;YACjD,IAAI,EAAE,MAAM;SACb,EACD,CAAC,CAAC,CACH,CAAC;QACF,IAAI,MAAM,CAAC,QAAQ,CAAC,IAAI,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,IAAI,KAAK,sBAAsB,CAAC,EAAE,CAAC;YACnE,MAAM,CAAC,aAAa,CAAC,sBAAsB,EAAE,OAAO,EAAE,QAAQ,CAAC,CAAC;QAClE,CAAC;QACD,IAAI,MAAM,CAAC,QAAQ,CAAC,IAAI,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,IAAI,KAAK,gBAAgB,CAAC,EAAE,CAAC;YAC7D,MAAM,CAAC,aAAa,CAAC,gBAAgB,EAAE,OAAO,EAAE,QAAQ,CAAC,CAAC;QAC5D,CAAC;IACH,CAAC;IACD,OAAO,MAAM,CAAC;AAChB,CAAC"}
|
|
@@ -0,0 +1,140 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* empty-lookup — the run itself produced this identifier, and the lookup for
|
|
3
|
+
* it found nothing. Filed at the WRITE seam, as an advisory, never an
|
|
4
|
+
* accusation.
|
|
5
|
+
*
|
|
6
|
+
* Pattern: pure function over (one finished call, the results its declared
|
|
7
|
+
* producers served); the domain check, one seam later than
|
|
8
|
+
* `unsupported-argument`.
|
|
9
|
+
* Role: the decidable fragment of "did this tool answer, or did it only
|
|
10
|
+
* appear to answer?".
|
|
11
|
+
*
|
|
12
|
+
* THE MEASURED FAILURE. A triage agent's reverse-lookup tool filtered a
|
|
13
|
+
* column before a pivot, so the column did not exist yet and EVERY reverse
|
|
14
|
+
* lookup returned an empty result — for every identifier, always. The tool
|
|
15
|
+
* then answered SUCCESSFULLY with an empty list, and the agent reported in a
|
|
16
|
+
* table, with confidence, that the device was "not currently logged in to any
|
|
17
|
+
* port on the collected switches" and advised checking physical cabling. It
|
|
18
|
+
* was logged in the whole time. Nothing in the framework noticed, because an
|
|
19
|
+
* empty result from a broken filter is byte-identical to an empty result from
|
|
20
|
+
* a genuine absence.
|
|
21
|
+
*
|
|
22
|
+
* WHAT THE LIBRARY ALREADY KNOWS, and this check is nothing more than the
|
|
23
|
+
* join of the two:
|
|
24
|
+
* (a) the identifier was GROUNDED — it came out of an earlier tool result
|
|
25
|
+
* in THIS run, from a tool the consumer's author named in
|
|
26
|
+
* `Tool.argumentsFrom`;
|
|
27
|
+
* (b) the lookup keyed on it came back EMPTY.
|
|
28
|
+
* When the run produced the identifier and the lookup for it finds nothing,
|
|
29
|
+
* that is worth filing. It is not worth accusing anyone of.
|
|
30
|
+
*
|
|
31
|
+
* THE CEILING, and it is the whole reason this is an advisory: an empty
|
|
32
|
+
* answer can be perfectly true. The device may exist and simply have no
|
|
33
|
+
* logins right now. NOTHING IN THIS FILE CAN TELL THOSE APART, and nothing in
|
|
34
|
+
* this file pretends to — the finding says "here is a pair worth a look", the
|
|
35
|
+
* record carries the ceiling sentence verbatim, and the same finding is filed
|
|
36
|
+
* for the true absence and the broken filter alike. A check that guessed
|
|
37
|
+
* which one it was looking at would be inventing the certainty the field
|
|
38
|
+
* failure was made of.
|
|
39
|
+
*
|
|
40
|
+
* DECLARED, NEVER INFERRED — the `argumentsFrom` precedent, THIRD use. A tool
|
|
41
|
+
* is this check's subject only because its author said its arguments come
|
|
42
|
+
* from another tool's results. One declaration now arms three seams:
|
|
43
|
+
* `dangling-reference` asks whether the ground is still in reach when the
|
|
44
|
+
* tool is OFFERED, `unsupported-argument` whether the value the model chose
|
|
45
|
+
* came from that ground when the tool was CALLED, and this whether the ground
|
|
46
|
+
* the run really did serve then found anything when the tool ANSWERED.
|
|
47
|
+
*
|
|
48
|
+
* WHAT COUNTS AS EMPTY — and what this refuses to judge. See
|
|
49
|
+
* {@link readLookupResult}. A rowset is counted, never interpreted; an
|
|
50
|
+
* absence is read from the marker its own helper mints. Every other shape a
|
|
51
|
+
* tool has ever returned — a sentence, an object, a `null`, a claim ticket —
|
|
52
|
+
* is BESPOKE: the library cannot see whether it holds rows, so the encounter
|
|
53
|
+
* is `not-applicable` and says so in the ledger. That row is the point. A
|
|
54
|
+
* check that silently skipped what it could not read would be the decoration
|
|
55
|
+
* the disposition family exists to make impossible.
|
|
56
|
+
*
|
|
57
|
+
* Detection only. Nothing here blocks, retries, rewrites or delays anything;
|
|
58
|
+
* the result the model reads is the result the tool returned.
|
|
59
|
+
*/
|
|
60
|
+
import type { Disposition } from '../disposition/types.js';
|
|
61
|
+
import type { ContextError } from '../finding/types.js';
|
|
62
|
+
/**
|
|
63
|
+
* THE CEILING, as one string with one owner.
|
|
64
|
+
*
|
|
65
|
+
* Quoted verbatim into every finding's message, into the check's README and
|
|
66
|
+
* into its docs page, so the bound cannot drift out of one of them and leave
|
|
67
|
+
* a reader thinking the library knows more than it does.
|
|
68
|
+
*/
|
|
69
|
+
export declare const EMPTY_LOOKUP_CEILING: string;
|
|
70
|
+
/** What the library could read about a finished lookup's result. */
|
|
71
|
+
export interface LookupResultReading {
|
|
72
|
+
/** `'rowset'` — an array, counted. `'absence'` — the `absent()` envelope. */
|
|
73
|
+
readonly shape: 'rowset' | 'absence';
|
|
74
|
+
readonly empty: boolean;
|
|
75
|
+
/** Rows counted, for a rowset. Absent for an absence, which declares itself. */
|
|
76
|
+
readonly rows?: number;
|
|
77
|
+
}
|
|
78
|
+
/**
|
|
79
|
+
* READ a finished result's shape, or decline to.
|
|
80
|
+
*
|
|
81
|
+
* The two readable shapes, and why only these two:
|
|
82
|
+
*
|
|
83
|
+
* • a **rowset** — an array. Its length is COUNTED, not interpreted: zero
|
|
84
|
+
* rows is zero rows, and no judgement about what the tool meant is
|
|
85
|
+
* involved. This is the shape the recorded failure actually returned.
|
|
86
|
+
* • an **absence** — the `absent()` envelope, whose author said in so many
|
|
87
|
+
* words "the search ran and matched nothing".
|
|
88
|
+
*
|
|
89
|
+
* Everything else returns `undefined`, which the caller files as
|
|
90
|
+
* `not-applicable`. A prose sentence, a bespoke `{ rows: [...] }` wrapper, a
|
|
91
|
+
* `null`, a placement claim ticket — the library cannot see rows in any of
|
|
92
|
+
* them, and guessing is how a checker starts lying.
|
|
93
|
+
*
|
|
94
|
+
* @param value the tool's own answer, as it returned it.
|
|
95
|
+
* @param declaredAbsence whether `readAbsence` recognized the value. PASSED
|
|
96
|
+
* IN rather than re-derived here on purpose: the `af_absent` marker has
|
|
97
|
+
* exactly one owner (`core/agent/coverage/absent.ts`), a second spelling of
|
|
98
|
+
* a reserved word would eventually disagree with the first, and
|
|
99
|
+
* `src/integrity/` stays a leaf that imports no agent code.
|
|
100
|
+
*/
|
|
101
|
+
export declare function readLookupResult(value: unknown, declaredAbsence: boolean): LookupResultReading | undefined;
|
|
102
|
+
/** One finished call to a tool whose author declared where its arguments come from. */
|
|
103
|
+
export interface EmptyLookupCall {
|
|
104
|
+
/** The CONSUMER — the tool that was called and answered. */
|
|
105
|
+
readonly toolName: string;
|
|
106
|
+
/** The provider's id for this call — what the witness points a reader at. */
|
|
107
|
+
readonly toolCallId: string;
|
|
108
|
+
readonly args: Readonly<Record<string, unknown>>;
|
|
109
|
+
/** `Tool.argumentsFrom` — the tools whose results were meant to ground these arguments. */
|
|
110
|
+
readonly argumentsFrom: readonly string[];
|
|
111
|
+
/** What the library could read about the result — `undefined` = bespoke shape. */
|
|
112
|
+
readonly reading: LookupResultReading | undefined;
|
|
113
|
+
}
|
|
114
|
+
/** One earlier tool result this run served, with the tool that produced it. */
|
|
115
|
+
export interface ProducedResult {
|
|
116
|
+
readonly toolName: string;
|
|
117
|
+
/** The result exactly as the run served it into the conversation. */
|
|
118
|
+
readonly text: string;
|
|
119
|
+
}
|
|
120
|
+
/** One encounter's outcome: the findings, and the disposition it earns. */
|
|
121
|
+
export interface EmptyLookupEncounter {
|
|
122
|
+
readonly findings: readonly ContextError[];
|
|
123
|
+
/**
|
|
124
|
+
* The ledger row this encounter files — computed HERE, beside the rules
|
|
125
|
+
* that decide it, so "the library refused to judge this shape" is provable
|
|
126
|
+
* without a live agent.
|
|
127
|
+
*/
|
|
128
|
+
readonly disposition: Disposition;
|
|
129
|
+
}
|
|
130
|
+
/**
|
|
131
|
+
* Judge one finished call to an armed tool.
|
|
132
|
+
*
|
|
133
|
+
* @param call the call and what the library could read of its result. The
|
|
134
|
+
* caller has already established the tool declared `argumentsFrom`;
|
|
135
|
+
* nothing here re-decides who is a subject.
|
|
136
|
+
* @param produced every tool result this run served BEFORE this call, with
|
|
137
|
+
* the tool that produced each. Filtered to the declared producers here.
|
|
138
|
+
* @param epoch the run iteration, stamped on every witness.
|
|
139
|
+
*/
|
|
140
|
+
export declare function emptyLookupOf(call: EmptyLookupCall, produced: readonly ProducedResult[], epoch: number): EmptyLookupEncounter;
|
|
@@ -0,0 +1,212 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* empty-lookup — the run itself produced this identifier, and the lookup for
|
|
3
|
+
* it found nothing. Filed at the WRITE seam, as an advisory, never an
|
|
4
|
+
* accusation.
|
|
5
|
+
*
|
|
6
|
+
* Pattern: pure function over (one finished call, the results its declared
|
|
7
|
+
* producers served); the domain check, one seam later than
|
|
8
|
+
* `unsupported-argument`.
|
|
9
|
+
* Role: the decidable fragment of "did this tool answer, or did it only
|
|
10
|
+
* appear to answer?".
|
|
11
|
+
*
|
|
12
|
+
* THE MEASURED FAILURE. A triage agent's reverse-lookup tool filtered a
|
|
13
|
+
* column before a pivot, so the column did not exist yet and EVERY reverse
|
|
14
|
+
* lookup returned an empty result — for every identifier, always. The tool
|
|
15
|
+
* then answered SUCCESSFULLY with an empty list, and the agent reported in a
|
|
16
|
+
* table, with confidence, that the device was "not currently logged in to any
|
|
17
|
+
* port on the collected switches" and advised checking physical cabling. It
|
|
18
|
+
* was logged in the whole time. Nothing in the framework noticed, because an
|
|
19
|
+
* empty result from a broken filter is byte-identical to an empty result from
|
|
20
|
+
* a genuine absence.
|
|
21
|
+
*
|
|
22
|
+
* WHAT THE LIBRARY ALREADY KNOWS, and this check is nothing more than the
|
|
23
|
+
* join of the two:
|
|
24
|
+
* (a) the identifier was GROUNDED — it came out of an earlier tool result
|
|
25
|
+
* in THIS run, from a tool the consumer's author named in
|
|
26
|
+
* `Tool.argumentsFrom`;
|
|
27
|
+
* (b) the lookup keyed on it came back EMPTY.
|
|
28
|
+
* When the run produced the identifier and the lookup for it finds nothing,
|
|
29
|
+
* that is worth filing. It is not worth accusing anyone of.
|
|
30
|
+
*
|
|
31
|
+
* THE CEILING, and it is the whole reason this is an advisory: an empty
|
|
32
|
+
* answer can be perfectly true. The device may exist and simply have no
|
|
33
|
+
* logins right now. NOTHING IN THIS FILE CAN TELL THOSE APART, and nothing in
|
|
34
|
+
* this file pretends to — the finding says "here is a pair worth a look", the
|
|
35
|
+
* record carries the ceiling sentence verbatim, and the same finding is filed
|
|
36
|
+
* for the true absence and the broken filter alike. A check that guessed
|
|
37
|
+
* which one it was looking at would be inventing the certainty the field
|
|
38
|
+
* failure was made of.
|
|
39
|
+
*
|
|
40
|
+
* DECLARED, NEVER INFERRED — the `argumentsFrom` precedent, THIRD use. A tool
|
|
41
|
+
* is this check's subject only because its author said its arguments come
|
|
42
|
+
* from another tool's results. One declaration now arms three seams:
|
|
43
|
+
* `dangling-reference` asks whether the ground is still in reach when the
|
|
44
|
+
* tool is OFFERED, `unsupported-argument` whether the value the model chose
|
|
45
|
+
* came from that ground when the tool was CALLED, and this whether the ground
|
|
46
|
+
* the run really did serve then found anything when the tool ANSWERED.
|
|
47
|
+
*
|
|
48
|
+
* WHAT COUNTS AS EMPTY — and what this refuses to judge. See
|
|
49
|
+
* {@link readLookupResult}. A rowset is counted, never interpreted; an
|
|
50
|
+
* absence is read from the marker its own helper mints. Every other shape a
|
|
51
|
+
* tool has ever returned — a sentence, an object, a `null`, a claim ticket —
|
|
52
|
+
* is BESPOKE: the library cannot see whether it holds rows, so the encounter
|
|
53
|
+
* is `not-applicable` and says so in the ledger. That row is the point. A
|
|
54
|
+
* check that silently skipped what it could not read would be the decoration
|
|
55
|
+
* the disposition family exists to make impossible.
|
|
56
|
+
*
|
|
57
|
+
* Detection only. Nothing here blocks, retries, rewrites or delays anything;
|
|
58
|
+
* the result the model reads is the result the tool returned.
|
|
59
|
+
*/
|
|
60
|
+
import { MIN_CHECKED_LENGTH, clipValue, stringLeaves } from '../argumentLeaves.js';
|
|
61
|
+
/**
|
|
62
|
+
* THE CEILING, as one string with one owner.
|
|
63
|
+
*
|
|
64
|
+
* Quoted verbatim into every finding's message, into the check's README and
|
|
65
|
+
* into its docs page, so the bound cannot drift out of one of them and leave
|
|
66
|
+
* a reader thinking the library knows more than it does.
|
|
67
|
+
*/
|
|
68
|
+
export const EMPTY_LOOKUP_CEILING = 'An empty result can be perfectly true — the thing may exist and simply have nothing to show ' +
|
|
69
|
+
'right now — so this is a place to look, never a verdict that anything is wrong.';
|
|
70
|
+
/**
|
|
71
|
+
* READ a finished result's shape, or decline to.
|
|
72
|
+
*
|
|
73
|
+
* The two readable shapes, and why only these two:
|
|
74
|
+
*
|
|
75
|
+
* • a **rowset** — an array. Its length is COUNTED, not interpreted: zero
|
|
76
|
+
* rows is zero rows, and no judgement about what the tool meant is
|
|
77
|
+
* involved. This is the shape the recorded failure actually returned.
|
|
78
|
+
* • an **absence** — the `absent()` envelope, whose author said in so many
|
|
79
|
+
* words "the search ran and matched nothing".
|
|
80
|
+
*
|
|
81
|
+
* Everything else returns `undefined`, which the caller files as
|
|
82
|
+
* `not-applicable`. A prose sentence, a bespoke `{ rows: [...] }` wrapper, a
|
|
83
|
+
* `null`, a placement claim ticket — the library cannot see rows in any of
|
|
84
|
+
* them, and guessing is how a checker starts lying.
|
|
85
|
+
*
|
|
86
|
+
* @param value the tool's own answer, as it returned it.
|
|
87
|
+
* @param declaredAbsence whether `readAbsence` recognized the value. PASSED
|
|
88
|
+
* IN rather than re-derived here on purpose: the `af_absent` marker has
|
|
89
|
+
* exactly one owner (`core/agent/coverage/absent.ts`), a second spelling of
|
|
90
|
+
* a reserved word would eventually disagree with the first, and
|
|
91
|
+
* `src/integrity/` stays a leaf that imports no agent code.
|
|
92
|
+
*/
|
|
93
|
+
export function readLookupResult(value, declaredAbsence) {
|
|
94
|
+
if (declaredAbsence)
|
|
95
|
+
return { shape: 'absence', empty: true };
|
|
96
|
+
if (Array.isArray(value))
|
|
97
|
+
return { shape: 'rowset', empty: value.length === 0, rows: value.length };
|
|
98
|
+
return undefined;
|
|
99
|
+
}
|
|
100
|
+
/**
|
|
101
|
+
* Judge one finished call to an armed tool.
|
|
102
|
+
*
|
|
103
|
+
* @param call the call and what the library could read of its result. The
|
|
104
|
+
* caller has already established the tool declared `argumentsFrom`;
|
|
105
|
+
* nothing here re-decides who is a subject.
|
|
106
|
+
* @param produced every tool result this run served BEFORE this call, with
|
|
107
|
+
* the tool that produced each. Filtered to the declared producers here.
|
|
108
|
+
* @param epoch the run iteration, stamped on every witness.
|
|
109
|
+
*/
|
|
110
|
+
export function emptyLookupOf(call, produced, epoch) {
|
|
111
|
+
// A shape the library cannot read is not a pass and not a fail. It is the
|
|
112
|
+
// check looking at a subject that is out of its scope BY RULE, which is
|
|
113
|
+
// exactly what `not-applicable` was minted for.
|
|
114
|
+
if (call.reading === undefined)
|
|
115
|
+
return { findings: [], disposition: 'not-applicable' };
|
|
116
|
+
// The lookup found something. Nothing to say — and a `checked-pass` rather
|
|
117
|
+
// than silence, because a check that only speaks when it fires cannot be
|
|
118
|
+
// told apart from one that was never wired.
|
|
119
|
+
if (!call.reading.empty)
|
|
120
|
+
return { findings: [], disposition: 'checked-pass' };
|
|
121
|
+
// Only the DECLARED producers ground anything here. The choice seam asks
|
|
122
|
+
// the broader question (did ANYTHING the run served carry this value); this
|
|
123
|
+
// one is narrower on purpose — `argumentsFrom` says where the value was
|
|
124
|
+
// supposed to come from, and "it came from exactly there, and the lookup
|
|
125
|
+
// still found nothing" is the pair worth a person's attention.
|
|
126
|
+
const grounds = produced
|
|
127
|
+
.filter((p) => call.argumentsFrom.includes(p.toolName) && p.text.length > 0)
|
|
128
|
+
.map((p) => ({ toolName: p.toolName, lowered: p.text.toLowerCase() }));
|
|
129
|
+
// The declared ground served nothing at all in this run, so there is no
|
|
130
|
+
// corpus to join against and no identity edge between the two tools. Not a
|
|
131
|
+
// pass — the check could not run. `unreachable` is the family's word for
|
|
132
|
+
// exactly that, and it is the falsification instrument: an `empty-lookup`
|
|
133
|
+
// row dominated by `unreachable` means apps are calling consumers before
|
|
134
|
+
// their declared producers, and this check is watching a seam that is not
|
|
135
|
+
// where their identifiers come from.
|
|
136
|
+
if (grounds.length === 0)
|
|
137
|
+
return { findings: [], disposition: 'unreachable' };
|
|
138
|
+
const consumer = { kind: 'tool', id: call.toolName };
|
|
139
|
+
const emptyPhrase = call.reading.shape === 'absence'
|
|
140
|
+
? 'a declared absence — the tool said the search ran and matched nothing'
|
|
141
|
+
: 'a rowset with zero rows';
|
|
142
|
+
const findings = [];
|
|
143
|
+
for (const leaf of stringLeaves(call.args, '')) {
|
|
144
|
+
const value = leaf.value.trim();
|
|
145
|
+
// The same fences as the choice seam, for the same reasons and from the
|
|
146
|
+
// same file: non-strings are never identifier-shaped, and below four
|
|
147
|
+
// characters substring matching is noise in both directions.
|
|
148
|
+
if (value.length < MIN_CHECKED_LENGTH)
|
|
149
|
+
continue;
|
|
150
|
+
const needle = value.toLowerCase();
|
|
151
|
+
// Substring, case-insensitive — deliberately THE SAME rule the choice
|
|
152
|
+
// seam grounds by. The two checks must agree about what "this value came
|
|
153
|
+
// from that tool" means, or a value could fall between them and be seen
|
|
154
|
+
// by neither.
|
|
155
|
+
const ground = grounds.find((g) => g.lowered.includes(needle));
|
|
156
|
+
if (ground === undefined)
|
|
157
|
+
continue;
|
|
158
|
+
const producer = { kind: 'tool', id: ground.toolName };
|
|
159
|
+
const witnesses = [
|
|
160
|
+
{
|
|
161
|
+
subject: consumer,
|
|
162
|
+
predicate: leaf.path,
|
|
163
|
+
value: leaf.value,
|
|
164
|
+
epoch,
|
|
165
|
+
stratum: 'asserted',
|
|
166
|
+
provenance: `tool call ${call.toolCallId}: argument '${leaf.path}' as the model chose it`,
|
|
167
|
+
},
|
|
168
|
+
{
|
|
169
|
+
subject: producer,
|
|
170
|
+
predicate: leaf.path,
|
|
171
|
+
value: 'served this value earlier in this run',
|
|
172
|
+
epoch,
|
|
173
|
+
stratum: 'asserted',
|
|
174
|
+
provenance: `'${ground.toolName}' is a declared ground of '${call.toolName}' ` +
|
|
175
|
+
`(Tool.argumentsFrom) and one of its results in this run carries the value`,
|
|
176
|
+
},
|
|
177
|
+
{
|
|
178
|
+
subject: consumer,
|
|
179
|
+
predicate: leaf.path,
|
|
180
|
+
value: `found nothing — ${emptyPhrase}`,
|
|
181
|
+
epoch,
|
|
182
|
+
stratum: 'asserted',
|
|
183
|
+
provenance: `tool call ${call.toolCallId}: the result, as the tool returned it`,
|
|
184
|
+
},
|
|
185
|
+
];
|
|
186
|
+
findings.push({
|
|
187
|
+
kind: 'empty-lookup',
|
|
188
|
+
seam: 'write',
|
|
189
|
+
subjects: [consumer, producer],
|
|
190
|
+
// The dot-path IS the discriminator, exactly as at the choice seam: two
|
|
191
|
+
// arguments of one call are two notices. The stated limit is the same
|
|
192
|
+
// one — the SAME argument re-chosen with a different value stays one
|
|
193
|
+
// finding, and the ledger's `findings` count is what says how often.
|
|
194
|
+
predicate: leaf.path,
|
|
195
|
+
witnesses,
|
|
196
|
+
epoch,
|
|
197
|
+
// Doubt, not contradiction. Counted apart from real defects everywhere
|
|
198
|
+
// the family reports, because this check can never know it found one.
|
|
199
|
+
advisory: true,
|
|
200
|
+
message: `'${call.toolName}' was called with ${leaf.path} = "${clipValue(value)}" — a value ` +
|
|
201
|
+
`this run itself produced, in a result from '${ground.toolName}', which ` +
|
|
202
|
+
`'${call.toolName}' declares as where its arguments come from — and the lookup came ` +
|
|
203
|
+
`back with ${emptyPhrase}. That pairing is what makes it worth a look: the run had ` +
|
|
204
|
+
`the identifier, so an empty answer is either a true absence or a lookup that could ` +
|
|
205
|
+
`never have matched, and those two are byte-identical from here. ` +
|
|
206
|
+
`${EMPTY_LOOKUP_CEILING} Call id ${call.toolCallId}. Nothing here blocked the call, ` +
|
|
207
|
+
`changed the result, or retried anything.`,
|
|
208
|
+
});
|
|
209
|
+
}
|
|
210
|
+
return { findings, disposition: findings.length > 0 ? 'checked-fail' : 'checked-pass' };
|
|
211
|
+
}
|
|
212
|
+
//# sourceMappingURL=check.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"check.js","sourceRoot":"","sources":["../../../../src/integrity/empty-lookup/check.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA0DG;AAEH,OAAO,EAAE,kBAAkB,EAAE,SAAS,EAAE,YAAY,EAAE,MAAM,sBAAsB,CAAC;AAKnF;;;;;;GAMG;AACH,MAAM,CAAC,MAAM,oBAAoB,GAC/B,8FAA8F;IAC9F,iFAAiF,CAAC;AAWpF;;;;;;;;;;;;;;;;;;;;;;GAsBG;AACH,MAAM,UAAU,gBAAgB,CAC9B,KAAc,EACd,eAAwB;IAExB,IAAI,eAAe;QAAE,OAAO,EAAE,KAAK,EAAE,SAAS,EAAE,KAAK,EAAE,IAAI,EAAE,CAAC;IAC9D,IAAI,KAAK,CAAC,OAAO,CAAC,KAAK,CAAC;QACtB,OAAO,EAAE,KAAK,EAAE,QAAQ,EA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
|
import type { IntegritySeam } from '../disposition/types.js';
|
|
22
22
|
/**
|
|
23
|
-
* The
|
|
23
|
+
* The eight defect classes, by their plain names:
|
|
24
24
|
*
|
|
25
25
|
* | kind | means | mechanism |
|
|
26
26
|
* |---|---|---|
|
|
@@ -29,8 +29,29 @@ import type { IntegritySeam } from '../disposition/types.js';
|
|
|
29
29
|
* | `dangling-reference` | offered an action whose inputs are no longer available | closure |
|
|
30
30
|
* | `duplicate-execution` | did settled work again | once |
|
|
31
31
|
* | `unsupported-claim` | stated something the record does not support | grounding |
|
|
32
|
+
* | `empty-lookup` | the run produced this value, and the lookup for it found nothing | join |
|
|
33
|
+
* | `column-type-mismatch` | a column holds something other than the type its tool declared | type |
|
|
34
|
+
* | `missing-column` | a column the tool declared is in none of its rows | presence |
|
|
35
|
+
*
|
|
36
|
+
* `empty-lookup` is the one class that is ADVISORY BY CONSTRUCTION (9.77.0) —
|
|
37
|
+
* every finding it files carries `advisory: true`, because an empty result
|
|
38
|
+
* can be perfectly true and nothing in the library can tell a true absence
|
|
39
|
+
* from a lookup that could never have matched. It is a place to look, not a
|
|
40
|
+
* defect that was proven. It is deliberately NOT `dangling-reference`, whose
|
|
41
|
+
* meaning is the opposite: there the ground has left reach, here the ground
|
|
42
|
+
* is in reach and the lookup came back with nothing.
|
|
43
|
+
*
|
|
44
|
+
* `column-type-mismatch` and `missing-column` (9.78.0) are two classes rather
|
|
45
|
+
* than one ON PURPOSE, and the field failure they come from is the argument:
|
|
46
|
+
* a LUN of 0 stored as `''` and a LUN column that was never delivered send a
|
|
47
|
+
* person to two different files, and a checker that said only "something is
|
|
48
|
+
* off with logical_unit_number" would have helped with neither. Unlike
|
|
49
|
+
* `empty-lookup`, neither is advisory: a column declared `number` that holds
|
|
50
|
+
* a string is not a place to look, it is a broken promise — though what the
|
|
51
|
+
* check can see about it is bounded, and the bound ships as
|
|
52
|
+
* `COLUMN_TYPE_CEILING` in every message.
|
|
32
53
|
*/
|
|
33
|
-
export type ContextErrorKind = 'invariant-violation' | 'unsupported-argument' | 'dangling-reference' | 'duplicate-execution' | 'unsupported-claim';
|
|
54
|
+
export type ContextErrorKind = 'invariant-violation' | 'unsupported-argument' | 'dangling-reference' | 'duplicate-execution' | 'unsupported-claim' | 'empty-lookup' | 'column-type-mismatch' | 'missing-column';
|
|
34
55
|
/** One detected context error — a labelled instance, automatically. */
|
|
35
56
|
export interface ContextError {
|
|
36
57
|
readonly kind: ContextErrorKind;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.js","sourceRoot":"","sources":["../../../../src/integrity/finding/types.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;GAkBG;
|
|
1
|
+
{"version":3,"file":"types.js","sourceRoot":"","sources":["../../../../src/integrity/finding/types.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;GAkBG;AAyFH;;;;;GAKG;AACH,MAAM,UAAU,oBAAoB,CAAC,CAAe;IAClD,MAAM,QAAQ,GAAG,CAAC,CAAC,QAAQ;SACxB,GAAG,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,GAAG,CAAC,CAAC,IAAI,IAAI,CAAC,CAAC,EAAE,EAAE,CAAC;SAC/B,IAAI,EAAE;SACN,IAAI,CAAC,KAAK,CAAC,CAAC;IACf,MAAM,KAAK,GAAG,CAAC,CAAC,KAAK,KAAK,SAAS,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC;IAC3D,oEAAoE;IACpE,wEAAwE;IACxE,mDAAmD;IACnD,MAAM,SAAS,GAAG,CAAC,CAAC,SAAS,IAAI,EAAE,CAAC;IACpC,OAAO,GAAG,CAAC,CAAC,IAAI,KAAK,CAAC,CAAC,IAAI,KAAK,QAAQ,KAAK,SAAS,IAAI,KAAK,EAAE,CAAC;AACpE,CAAC;AAED,8DAA8D;AAC9D,MAAM,UAAU,mBAAmB,CAAC,MAA+B;IACjE,MAAM,IAAI,GAAG,IAAI,GAAG,EAAU,CAAC;IAC/B,MAAM,IAAI,GAAmB,EAAE,CAAC;IAChC,KAAK,MAAM,CAAC,IAAI,MAAM,EAAE,CAAC;QACvB,MAAM,EAAE,GAAG,oBAAoB,CAAC,CAAC,CAAC,CAAC;QACnC,IAAI,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC;YAAE,SAAS;QAC3B,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,CAAC;QACb,IAAI,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;IACf,CAAC;IACD,OAAO,IAAI,CAAC;AACd,CAAC"}
|
|
@@ -61,33 +61,17 @@
|
|
|
61
61
|
*
|
|
62
62
|
* Detection only. Nothing here blocks, rewrites or delays a call.
|
|
63
63
|
*/
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
64
|
+
import { MIN_CHECKED_LENGTH, clipValue, stringLeaves } from '../argumentLeaves.js';
|
|
65
|
+
/**
|
|
66
|
+
* The value fence, the quoting length and the argument walk moved to
|
|
67
|
+
* `../argumentLeaves.ts` when the write seam's `empty-lookup` check landed
|
|
68
|
+
* (9.77.0). Two checks now read one call's arguments and must agree, to the
|
|
69
|
+
* character, about which leaves are candidates and what their dot-paths are —
|
|
70
|
+
* the second check's whole job is to notice something about a value this one
|
|
71
|
+
* already excused.
|
|
72
|
+
*/
|
|
68
73
|
/** Deepest a schema is walked for `enum` declarations. */
|
|
69
74
|
const MAX_SCHEMA_DEPTH = 8;
|
|
70
|
-
function clip(value) {
|
|
71
|
-
return value.length <= MAX_QUOTED_CHARS ? value : `${value.slice(0, MAX_QUOTED_CHARS - 1)}…`;
|
|
72
|
-
}
|
|
73
|
-
/** Every string leaf of an arguments object, with its dot-path. */
|
|
74
|
-
function* stringLeaves(node, path) {
|
|
75
|
-
if (typeof node === 'string') {
|
|
76
|
-
yield { path, value: node };
|
|
77
|
-
return;
|
|
78
|
-
}
|
|
79
|
-
if (Array.isArray(node)) {
|
|
80
|
-
for (let i = 0; i < node.length; i++) {
|
|
81
|
-
yield* stringLeaves(node[i], path === '' ? String(i) : `${path}.${String(i)}`);
|
|
82
|
-
}
|
|
83
|
-
return;
|
|
84
|
-
}
|
|
85
|
-
if (node !== null && typeof node === 'object') {
|
|
86
|
-
for (const [key, value] of Object.entries(node)) {
|
|
87
|
-
yield* stringLeaves(value, path === '' ? key : `${path}.${key}`);
|
|
88
|
-
}
|
|
89
|
-
}
|
|
90
|
-
}
|
|
91
75
|
/**
|
|
92
76
|
* Best-effort: every string an `enum` array declares anywhere in a tool's
|
|
93
77
|
* `inputSchema`. Flat by design — a per-path map would be more precise, and on
|
|
@@ -211,12 +195,12 @@ export function unsupportedArgumentsOf(calls, corpus, epoch) {
|
|
|
211
195
|
witnesses,
|
|
212
196
|
epoch,
|
|
213
197
|
message: selfReferenced
|
|
214
|
-
? `'${call.toolName}' was called with ${leaf.path} = "${
|
|
198
|
+
? `'${call.toolName}' was called with ${leaf.path} = "${clipValue(value)}", and the only ` +
|
|
215
199
|
`place that value appears in the frame the model chose from is the model’s own ` +
|
|
216
200
|
`earlier answer. Rendered text is not evidence — a value re-read out of prose can ` +
|
|
217
201
|
`be a fragment of something else entirely. To ground it, ${refetch}. Nothing here ` +
|
|
218
202
|
`blocked the call.`
|
|
219
|
-
: `'${call.toolName}' was called with ${leaf.path} = "${
|
|
203
|
+
: `'${call.toolName}' was called with ${leaf.path} = "${clipValue(value)}", and that value ` +
|
|
220
204
|
`appears nowhere in the frame the model chose from — not in the instructions, not ` +
|
|
221
205
|
`in any message from the user, not in any tool result. Nothing served it, so ` +
|
|
222
206
|
`nothing in this run can say what it refers to. To ground it, ${refetch}. Nothing ` +
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"check.js","sourceRoot":"","sources":["../../../../src/integrity/unsupported-argument/check.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;G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