agentfootprint 9.76.0 → 9.77.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 +108 -0
- package/CLAUDE.md +2 -1
- package/dist/core/Agent.js +36 -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 +14 -29
- package/dist/core/agent/stages/callLLM.js.map +1 -1
- package/dist/core/agent/stages/toolCalls.js +77 -0
- package/dist/core/agent/stages/toolCalls.js.map +1 -1
- package/dist/core/runbook/report.js +69 -0
- package/dist/core/runbook/report.js.map +1 -0
- package/dist/core/runbook/runbookAsTool.js +38 -15
- package/dist/core/runbook/runbookAsTool.js.map +1 -1
- package/dist/esm/core/Agent.d.ts +3 -0
- package/dist/esm/core/Agent.js +36 -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 +14 -0
- package/dist/esm/core/agent/stages/callLLM.js +11 -26
- package/dist/esm/core/agent/stages/callLLM.js.map +1 -1
- package/dist/esm/core/agent/stages/toolCalls.d.ts +23 -0
- package/dist/esm/core/agent/stages/toolCalls.js +78 -1
- package/dist/esm/core/agent/stages/toolCalls.js.map +1 -1
- package/dist/esm/core/agent/types.d.ts +49 -0
- package/dist/esm/core/runbook/report.d.ts +52 -0
- package/dist/esm/core/runbook/report.js +64 -0
- package/dist/esm/core/runbook/report.js.map +1 -0
- package/dist/esm/core/runbook/runbookAsTool.d.ts +3 -1
- package/dist/esm/core/runbook/runbookAsTool.js +38 -15
- package/dist/esm/core/runbook/runbookAsTool.js.map +1 -1
- package/dist/esm/core/runbook/types.d.ts +8 -1
- package/dist/esm/index.d.ts +1 -0
- package/dist/esm/index.js +7 -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/disposition/lifecycle.d.ts +16 -1
- package/dist/esm/integrity/disposition/lifecycle.js +25 -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 +11 -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/trace-toolpack/traceToolpack.js +6 -4
- package/dist/esm/lib/trace-toolpack/traceToolpack.js.map +1 -1
- package/dist/index.js +11 -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/disposition/lifecycle.js +25 -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/trace-toolpack/traceToolpack.js +6 -4
- package/dist/lib/trace-toolpack/traceToolpack.js.map +1 -1
- package/dist/types/core/Agent.d.ts +3 -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 +14 -0
- package/dist/types/core/agent/stages/callLLM.d.ts.map +1 -1
- package/dist/types/core/agent/stages/toolCalls.d.ts +23 -0
- package/dist/types/core/agent/stages/toolCalls.d.ts.map +1 -1
- package/dist/types/core/agent/types.d.ts +49 -0
- package/dist/types/core/agent/types.d.ts.map +1 -1
- package/dist/types/core/runbook/report.d.ts +53 -0
- package/dist/types/core/runbook/report.d.ts.map +1 -0
- package/dist/types/core/runbook/runbookAsTool.d.ts +3 -1
- package/dist/types/core/runbook/runbookAsTool.d.ts.map +1 -1
- package/dist/types/core/runbook/types.d.ts +8 -1
- package/dist/types/core/runbook/types.d.ts.map +1 -1
- package/dist/types/index.d.ts +1 -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/disposition/lifecycle.d.ts +16 -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 +11 -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/trace-toolpack/traceToolpack.d.ts.map +1 -1
- package/package.json +1 -1
|
@@ -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,EAAE,KAAK,EAAE,KAAK,CAAC,MAAM,KAAK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,UAAU;gBACnB,UAAU,EACR,IAAI,MAAM,CAAC,QAAQ,8BAA8B,IAAI,CAAC,QAAQ,IAAI;oBAClE,2EAA2E;aAC9E;YACD;gBACE,OAAO,EAAE,QAAQ;gBACjB,SAAS,EAAE,IAAI,CAAC,IAAI;gBACpB,KAAK,EAAE,mBAAmB,WAAW,EAAE;gBACvC,KAAK;gBACL,OAAO,EAAE,UAAU;gBACnB,UAAU,EAAE,aAAa,IAAI,CAAC,UAAU,uCAAuC;aAChF;SACF,CAAC;QAEF,QAAQ,CAAC,IAAI,CAAC;YACZ,IAAI,EAAE,cAAc;YACpB,IAAI,EAAE,OAAO;YACb,QAAQ,EAAE,CAAC,QAAQ,EAAE,QAAQ,CAAC;YAC9B,wEAAwE;YACxE,sEAAsE;YACtE,qEAAqE;YACrE,qEAAqE;YACrE,SAAS,EAAE,IAAI,CAAC,IAAI;YACpB,SAAS;YACT,KAAK;YACL,uEAAuE;YACvE,sEAAsE;YACtE,QAAQ,EAAE,IAAI;YACd,OAAO,EACL,IAAI,IAAI,CAAC,QAAQ,qBAAqB,IAAI,CAAC,IAAI,OAAO,SAAS,CAAC,KAAK,CAAC,cAAc;gBACpF,+CAA+C,MAAM,CAAC,QAAQ,WAAW;gBACzE,IAAI,IAAI,CAAC,QAAQ,oEAAoE;gBACrF,aAAa,WAAW,4DAA4D;gBACpF,qFAAqF;gBACrF,kEAAkE;gBAClE,GAAG,oBAAoB,YAAY,IAAI,CAAC,UAAU,mCAAmC;gBACrF,0CAA0C;SAC7C,CAAC,CAAC;IACL,CAAC;IAED,OAAO,EAAE,QAAQ,EAAE,WAAW,EAAE,QAAQ,CAAC,MAAM,GAAG,CAAC,CAAC,CAAC,CAAC,cAAc,CAAC,CAAC,CAAC,cAAc,EAAE,CAAC;AAC1F,CAAC"}
|
|
@@ -20,7 +20,7 @@
|
|
|
20
20
|
import type { Assertion, SubjectRef } from '../assertion/types.js';
|
|
21
21
|
import type { IntegritySeam } from '../disposition/types.js';
|
|
22
22
|
/**
|
|
23
|
-
* The
|
|
23
|
+
* The six defect classes, by their plain names:
|
|
24
24
|
*
|
|
25
25
|
* | kind | means | mechanism |
|
|
26
26
|
* |---|---|---|
|
|
@@ -29,8 +29,17 @@ 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
|
+
*
|
|
34
|
+
* `empty-lookup` is the one class that is ADVISORY BY CONSTRUCTION (9.77.0) —
|
|
35
|
+
* every finding it files carries `advisory: true`, because an empty result
|
|
36
|
+
* can be perfectly true and nothing in the library can tell a true absence
|
|
37
|
+
* from a lookup that could never have matched. It is a place to look, not a
|
|
38
|
+
* defect that was proven. It is deliberately NOT `dangling-reference`, whose
|
|
39
|
+
* meaning is the opposite: there the ground has left reach, here the ground
|
|
40
|
+
* is in reach and the lookup came back with nothing.
|
|
32
41
|
*/
|
|
33
|
-
export type ContextErrorKind = 'invariant-violation' | 'unsupported-argument' | 'dangling-reference' | 'duplicate-execution' | 'unsupported-claim';
|
|
42
|
+
export type ContextErrorKind = 'invariant-violation' | 'unsupported-argument' | 'dangling-reference' | 'duplicate-execution' | 'unsupported-claim' | 'empty-lookup';
|
|
34
43
|
/** One detected context error — a labelled instance, automatically. */
|
|
35
44
|
export interface ContextError {
|
|
36
45
|
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;AA2EH;;;;;GA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ED_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;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA8DG;
|
|
1
|
+
{"version":3,"file":"check.js","sourceRoot":"","sources":["../../../../src/integrity/unsupported-argument/check.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA8DG;AAEH,OAAO,EAAE,kBAAkB,EAAE,SAAS,EAAE,YAAY,EAAE,MAAM,sBAAsB,CAAC;AAuEnF;;;;;;;GAOG;AAEH,0DAA0D;AAC1D,MAAM,gBAAgB,GAAG,CAAC,CAAC;AAE3B;;;;;GAKG;AACH,MAAM,UAAU,oBAAoB,CAAC,MAAe;IAClD,MAAM,MAAM,GAAG,IAAI,GAAG,EAAU,CAAC;IACjC,MAAM,IAAI,GAAG,CAAC,IAAa,EAAE,KAAa,EAAQ,EAAE;QAClD,IAAI,KAAK,GAAG,gBAAgB,IAAI,IAAI,KAAK,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 +442,7 @@ function buildRunOverview(artifacts, index) {
|
|
|
442
442
|
}
|
|
443
443
|
// ── find_context_errors ────────────────────────────────────────────────────
|
|
444
444
|
/**
|
|
445
|
-
* The
|
|
445
|
+
* The six ContextErrorKinds — each mapped to the check that can FILE it in
|
|
446
446
|
* this build, or `false` when no check ships for that class.
|
|
447
447
|
*
|
|
448
448
|
* Two jobs in one table:
|
|
@@ -451,8 +451,8 @@ function buildRunOverview(artifacts, index) {
|
|
|
451
451
|
* a kind added to the finding type without joining this list fails to
|
|
452
452
|
* compile HERE, rather than becoming a value the tool's enum silently
|
|
453
453
|
* rejects at run time.
|
|
454
|
-
* - the honesty gate. `ContextErrorKind` names
|
|
455
|
-
* `src/integrity/` ships
|
|
454
|
+
* - the honesty gate. `ContextErrorKind` names six defect classes;
|
|
455
|
+
* `src/integrity/` ships five checks. Offering the sixth in the
|
|
456
456
|
* schema enum invites a query whose only possible answer is a negative
|
|
457
457
|
* verdict about a class nothing in the library could have filed — the
|
|
458
458
|
* tool telling a model "no duplicate-execution errors" when nothing on
|
|
@@ -466,6 +466,7 @@ const CONTEXT_ERROR_KIND_CHECKS = {
|
|
|
466
466
|
'dangling-reference': 'src/integrity/dangling-reference (compose)',
|
|
467
467
|
'duplicate-execution': false,
|
|
468
468
|
'unsupported-claim': 'src/integrity/unsupported-claim (claim)',
|
|
469
|
+
'empty-lookup': 'src/integrity/empty-lookup (write)',
|
|
469
470
|
};
|
|
470
471
|
const ALL_CONTEXT_ERROR_KINDS = Object.keys(CONTEXT_ERROR_KIND_CHECKS);
|
|
471
472
|
/** The kinds the tool OFFERS — the ones a shipped check can actually file. */
|
|
@@ -754,7 +755,8 @@ function buildFindContextErrors(artifacts, index, reader, opts) {
|
|
|
754
755
|
name: 'find_context_errors',
|
|
755
756
|
description: 'What did this run CONTRADICT ITSELF about? Lists the Context Integrity findings the ' +
|
|
756
757
|
'library already caught — an invariant violated, an offered action whose inputs left ' +
|
|
757
|
-
'scope, an argument nothing served, a claim the record does not support
|
|
758
|
+
'scope, an argument nothing served, a claim the record does not support, a lookup for a ' +
|
|
759
|
+
'value this run produced that came back empty — each with the ' +
|
|
758
760
|
'step it was filed at and the ' +
|
|
759
761
|
'exact drill that opens the state behind it. Call it EARLY when an answer looks wrong: a ' +
|
|
760
762
|
'contradiction the library already caught beats re-deriving one. Reads only; nothing is ' +
|