agentfootprint 9.61.1 → 9.63.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/dist/core/agent/evidence/gate.js +13 -0
- package/dist/core/agent/evidence/gate.js.map +1 -1
- package/dist/core/agent/repeatedCall.js +70 -11
- package/dist/core/agent/repeatedCall.js.map +1 -1
- package/dist/core/agent/stages/callLLM.js +47 -0
- package/dist/core/agent/stages/callLLM.js.map +1 -1
- package/dist/core/agent/stages/toolCalls.js +27 -1
- package/dist/core/agent/stages/toolCalls.js.map +1 -1
- package/dist/core/slots/buildToolsSlot.js +22 -3
- package/dist/core/slots/buildToolsSlot.js.map +1 -1
- package/dist/core/tools.js +1 -0
- package/dist/core/tools.js.map +1 -1
- package/dist/esm/core/agent/evidence/gate.d.ts +13 -0
- package/dist/esm/core/agent/evidence/gate.js +13 -0
- package/dist/esm/core/agent/evidence/gate.js.map +1 -1
- package/dist/esm/core/agent/repeatedCall.d.ts +45 -2
- package/dist/esm/core/agent/repeatedCall.js +70 -11
- package/dist/esm/core/agent/repeatedCall.js.map +1 -1
- package/dist/esm/core/agent/stages/callLLM.d.ts +7 -1
- package/dist/esm/core/agent/stages/callLLM.js +47 -0
- package/dist/esm/core/agent/stages/callLLM.js.map +1 -1
- package/dist/esm/core/agent/stages/toolCalls.js +27 -1
- package/dist/esm/core/agent/stages/toolCalls.js.map +1 -1
- package/dist/esm/core/slots/buildToolsSlot.js +22 -3
- package/dist/esm/core/slots/buildToolsSlot.js.map +1 -1
- package/dist/esm/core/tools.d.ts +53 -0
- package/dist/esm/core/tools.js +1 -0
- package/dist/esm/core/tools.js.map +1 -1
- package/dist/esm/events/payloads.d.ts +14 -0
- package/dist/esm/integrity/disposition/lifecycle.d.ts +13 -2
- package/dist/esm/integrity/disposition/lifecycle.js +77 -12
- package/dist/esm/integrity/disposition/lifecycle.js.map +1 -1
- package/dist/esm/integrity/unsupported-argument/check.d.ts +95 -0
- package/dist/esm/integrity/unsupported-argument/check.js +190 -0
- package/dist/esm/integrity/unsupported-argument/check.js.map +1 -0
- package/dist/esm/lib/trace-toolpack/traceToolpack.js +7 -5
- package/dist/esm/lib/trace-toolpack/traceToolpack.js.map +1 -1
- package/dist/esm/recorders/observability/commentary/commentaryTemplates.js +15 -1
- package/dist/esm/recorders/observability/commentary/commentaryTemplates.js.map +1 -1
- package/dist/integrity/disposition/lifecycle.js +79 -14
- package/dist/integrity/disposition/lifecycle.js.map +1 -1
- package/dist/integrity/unsupported-argument/check.js +195 -0
- package/dist/integrity/unsupported-argument/check.js.map +1 -0
- package/dist/lib/trace-toolpack/traceToolpack.js +7 -5
- package/dist/lib/trace-toolpack/traceToolpack.js.map +1 -1
- package/dist/recorders/observability/commentary/commentaryTemplates.js +15 -1
- package/dist/recorders/observability/commentary/commentaryTemplates.js.map +1 -1
- package/dist/types/core/agent/evidence/gate.d.ts +13 -0
- package/dist/types/core/agent/evidence/gate.d.ts.map +1 -1
- package/dist/types/core/agent/repeatedCall.d.ts +45 -2
- package/dist/types/core/agent/repeatedCall.d.ts.map +1 -1
- package/dist/types/core/agent/stages/callLLM.d.ts +7 -1
- package/dist/types/core/agent/stages/callLLM.d.ts.map +1 -1
- package/dist/types/core/agent/stages/toolCalls.d.ts.map +1 -1
- package/dist/types/core/slots/buildToolsSlot.d.ts.map +1 -1
- package/dist/types/core/tools.d.ts +53 -0
- package/dist/types/core/tools.d.ts.map +1 -1
- package/dist/types/events/payloads.d.ts +14 -0
- package/dist/types/events/payloads.d.ts.map +1 -1
- package/dist/types/integrity/disposition/lifecycle.d.ts +13 -2
- package/dist/types/integrity/disposition/lifecycle.d.ts.map +1 -1
- package/dist/types/integrity/unsupported-argument/check.d.ts +96 -0
- package/dist/types/integrity/unsupported-argument/check.d.ts.map +1 -0
- package/dist/types/lib/trace-toolpack/traceToolpack.d.ts.map +1 -1
- package/dist/types/recorders/observability/commentary/commentaryTemplates.d.ts.map +1 -1
- package/package.json +1 -1
|
@@ -8,8 +8,11 @@
|
|
|
8
8
|
* Role: a check is registered exactly when its preconditions exist on
|
|
9
9
|
* THIS agent (wire: always — every run calls the model;
|
|
10
10
|
* compose-invariant: a mount kernel is configured; dangling: at
|
|
11
|
-
* least one tool declared `argumentsFrom
|
|
12
|
-
*
|
|
11
|
+
* least one tool declared `argumentsFrom`, which arms BOTH the
|
|
12
|
+
* compose-seam dangling-reference check and the choice-seam
|
|
13
|
+
* unsupported-argument check off the same declaration).
|
|
14
|
+
* Registration is what makes silence auditable — an unregistered
|
|
15
|
+
* check is honest
|
|
13
16
|
* absence, a registered one that never notes is the wiring rot
|
|
14
17
|
* `assertAlive` exists to name.
|
|
15
18
|
*
|
|
@@ -26,6 +29,14 @@ export type IntegrityPosture = 'observe' | 'dev';
|
|
|
26
29
|
export interface IntegrityChecksPresent {
|
|
27
30
|
readonly wire: boolean;
|
|
28
31
|
readonly composeInvariant: boolean;
|
|
32
|
+
/**
|
|
33
|
+
* At least one tool declared `Tool.argumentsFrom`. ONE FLAG, TWO CHECKS
|
|
34
|
+
* (9.63.0): the same declaration arms `dangling-reference` at the compose
|
|
35
|
+
* seam and `unsupported-argument` at the choice seam — one asks whether the
|
|
36
|
+
* ground is still in reach while the tool is offered, the other whether the
|
|
37
|
+
* value the model chose came from that ground when it was called. They are
|
|
38
|
+
* not separated here because nothing can arm one without arming the other.
|
|
39
|
+
*/
|
|
29
40
|
readonly dangling: boolean;
|
|
30
41
|
/** A `.claims()` contract is declared (9.61.0). */
|
|
31
42
|
readonly claim?: boolean;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"lifecycle.d.ts","sourceRoot":"","sources":["../../../../src/integrity/disposition/lifecycle.ts"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"lifecycle.d.ts","sourceRoot":"","sources":["../../../../src/integrity/disposition/lifecycle.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;GAwBG;AAEH,OAAO,EAAqB,KAAK,iBAAiB,EAAE,MAAM,aAAa,CAAC;AASxE,MAAM,MAAM,gBAAgB,GAAG,SAAS,GAAG,KAAK,CAAC;AAEjD,gEAAgE;AAChE,MAAM,WAAW,sBAAsB;IACrC,QAAQ,CAAC,IAAI,EAAE,OAAO,CAAC;IACvB,QAAQ,CAAC,gBAAgB,EAAE,OAAO,CAAC;IACnC;;;;;;;OAOG;IACH,QAAQ,CAAC,QAAQ,EAAE,OAAO,CAAC;IAC3B,mDAAmD;IACnD,QAAQ,CAAC,KAAK,CAAC,EAAE,OAAO,CAAC;CAC1B;AAED;;;GAGG;AACH,wBAAgB,iBAAiB,CAC/B,OAAO,EAAE,sBAAsB,EAC/B,OAAO,EAAE,gBAAgB,GACxB,iBAAiB,CA4HnB"}
|
|
@@ -0,0 +1,96 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* unsupported-argument — the model ACTED on a value nothing served, at the
|
|
3
|
+
* CHOICE seam.
|
|
4
|
+
*
|
|
5
|
+
* Pattern: pure function over (the calls, the frame they were chosen from);
|
|
6
|
+
* the domain check.
|
|
7
|
+
* Role: the decidable fragment of "did the model bind this reference to
|
|
8
|
+
* something the run actually served?". The measured failure: on the
|
|
9
|
+
* second turn of a triage conversation the window had dropped the
|
|
10
|
+
* user message carrying the true entity id and kept the assistant's
|
|
11
|
+
* own rendered answer. Asked for the status of "that machine", the
|
|
12
|
+
* model resolved the reference out of its OWN prior prose, took a
|
|
13
|
+
* truncated job-name fragment for a machine name, called the lookup
|
|
14
|
+
* tool with it, got an honest "nothing found", and told the person
|
|
15
|
+
* their protected machine had no backup record. Every shipped rail
|
|
16
|
+
* passed honestly — the coverage envelope, the absence envelope and
|
|
17
|
+
* the evidence gate all held, because every value in the answer
|
|
18
|
+
* really WAS grounded. The defect was the REFERENT, bound wrong at
|
|
19
|
+
* the argument, and the argument was the one seam with no check.
|
|
20
|
+
*
|
|
21
|
+
* DECLARED, NEVER INFERRED — the `argumentsFrom` precedent, second use. A
|
|
22
|
+
* tool is this check's subject only because its author said its arguments
|
|
23
|
+
* come from another tool's results; a tool that declares nothing is never
|
|
24
|
+
* examined, which is the whole zero-delta story. One declaration now arms two
|
|
25
|
+
* seams: `dangling-reference` asks whether the ground is still in reach when
|
|
26
|
+
* the tool is OFFERED, this asks whether the value the model chose came from
|
|
27
|
+
* that ground when the tool is CALLED.
|
|
28
|
+
*
|
|
29
|
+
* ASSISTANT TEXT IS NOT GROUND, and that is the entire idea. The system
|
|
30
|
+
* prompt, the user's messages and every tool result are things the RUN put in
|
|
31
|
+
* front of the model. Its own earlier turns are things it wrote. A value whose
|
|
32
|
+
* only source is the model's own rendered prose has been re-derived from a
|
|
33
|
+
* rendering rather than read from evidence, and re-deriving is exactly how a
|
|
34
|
+
* truncated job name becomes a machine name.
|
|
35
|
+
*
|
|
36
|
+
* THE FENCES, stated because they are the check's honesty:
|
|
37
|
+
* - NON-STRINGS ARE NEVER CHECKED. Numbers, booleans and null are not
|
|
38
|
+
* identifier-shaped, and substring-grounding them would accuse every
|
|
39
|
+
* literal the model legitimately computed.
|
|
40
|
+
* - VALUES UNDER FOUR CHARACTERS ARE NEVER CHECKED. Below that, substring
|
|
41
|
+
* matching is noise in both directions — 'up' and 'a1' land inside
|
|
42
|
+
* unrelated words in any corpus.
|
|
43
|
+
* - SERVED ANYWHERE PASSES, case-insensitively. The value need only appear
|
|
44
|
+
* inside SOME served string; see the README's stated leniency.
|
|
45
|
+
* - DECLARED VOCABULARY PASSES. A value the tool's own `inputSchema` lists in
|
|
46
|
+
* an `enum` was served BY THE SCHEMA — the model read it off the tool
|
|
47
|
+
* definition, not out of its own prose.
|
|
48
|
+
* Two states remain, and they file DIFFERENT messages because they call for
|
|
49
|
+
* different fixes: grounded only in the model's own prose (re-fetch the real
|
|
50
|
+
* ground), and grounded nowhere in the window at all (nothing served it).
|
|
51
|
+
*
|
|
52
|
+
* Detection only. Nothing here blocks, rewrites or delays a call.
|
|
53
|
+
*/
|
|
54
|
+
import type { ContextError } from '../finding/types.js';
|
|
55
|
+
/** One tool call the model chose to make, with the arming that makes it checkable. */
|
|
56
|
+
export interface ArgumentChoice {
|
|
57
|
+
readonly toolName: string;
|
|
58
|
+
/** The provider's id for this call — what the witness points a reader at. */
|
|
59
|
+
readonly toolCallId: string;
|
|
60
|
+
readonly args: Readonly<Record<string, unknown>>;
|
|
61
|
+
/** `Tool.argumentsFrom` — the tools whose results were meant to ground these arguments. */
|
|
62
|
+
readonly argumentsFrom: readonly string[];
|
|
63
|
+
/**
|
|
64
|
+
* Values the tool's own `inputSchema` declares in an `enum`. Best-effort and
|
|
65
|
+
* FLAT (see {@link declaredEnumValuesOf}): a value declared for one field
|
|
66
|
+
* excuses that value at any field of the same tool. Deliberately lenient on
|
|
67
|
+
* an accusation boundary.
|
|
68
|
+
*/
|
|
69
|
+
readonly declaredEnums?: ReadonlySet<string>;
|
|
70
|
+
}
|
|
71
|
+
/** The frame the model chose from, split by whether it can GROUND anything. */
|
|
72
|
+
export interface ChoiceCorpus {
|
|
73
|
+
/** System prompt, user messages, tool results — everything the RUN served. */
|
|
74
|
+
readonly grounded: readonly string[];
|
|
75
|
+
/** The model's own earlier turns. Never ground: this is what the defect is made of. */
|
|
76
|
+
readonly assistant: readonly string[];
|
|
77
|
+
}
|
|
78
|
+
/**
|
|
79
|
+
* Best-effort: every string an `enum` array declares anywhere in a tool's
|
|
80
|
+
* `inputSchema`. Flat by design — a per-path map would be more precise, and on
|
|
81
|
+
* an accusation boundary the lenient direction is the safe one. An absent or
|
|
82
|
+
* non-object schema yields an empty set, which simply means no enum fence.
|
|
83
|
+
*/
|
|
84
|
+
export declare function declaredEnumValuesOf(schema: unknown): ReadonlySet<string>;
|
|
85
|
+
/**
|
|
86
|
+
* Check every armed call's identifier-like string arguments against the frame
|
|
87
|
+
* the model chose from.
|
|
88
|
+
*
|
|
89
|
+
* @param calls the ARMED tool calls of one response — a caller filters by
|
|
90
|
+
* `argumentsFrom` before calling; nothing here re-decides who is a subject.
|
|
91
|
+
* @param corpus the exact request this response was assembled from, split into
|
|
92
|
+
* what the run served and what the model itself wrote.
|
|
93
|
+
* @param epoch the run iteration, stamped on every witness.
|
|
94
|
+
*/
|
|
95
|
+
export declare function unsupportedArgumentsOf(calls: readonly ArgumentChoice[], corpus: ChoiceCorpus, epoch: number): readonly ContextError[];
|
|
96
|
+
//# sourceMappingURL=check.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"check.d.ts","sourceRoot":"","sources":["../../../../src/integrity/unsupported-argument/check.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAoDG;AAGH,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,qBAAqB,CAAC;AAExD,sFAAsF;AACtF,MAAM,WAAW,cAAc;IAC7B,QAAQ,CAAC,QAAQ,EAAE,MAAM,CAAC;IAC1B,6EAA6E;IAC7E,QAAQ,CAAC,UAAU,EAAE,MAAM,CAAC;IAC5B,QAAQ,CAAC,IAAI,EAAE,QAAQ,CAAC,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC,CAAC;IACjD,2FAA2F;IAC3F,QAAQ,CAAC,aAAa,EAAE,SAAS,MAAM,EAAE,CAAC;IAC1C;;;;;OAKG;IACH,QAAQ,CAAC,aAAa,CAAC,EAAE,WAAW,CAAC,MAAM,CAAC,CAAC;CAC9C;AAED,+EAA+E;AAC/E,MAAM,WAAW,YAAY;IAC3B,8EAA8E;IAC9E,QAAQ,CAAC,QAAQ,EAAE,SAAS,MAAM,EAAE,CAAC;IACrC,uFAAuF;IACvF,QAAQ,CAAC,SAAS,EAAE,SAAS,MAAM,EAAE,CAAC;CACvC;AAkCD;;;;;GAKG;AACH,wBAAgB,oBAAoB,CAAC,MAAM,EAAE,OAAO,GAAG,WAAW,CAAC,MAAM,CAAC,CAgBzE;AAED;;;;;;;;;GASG;AACH,wBAAgB,sBAAsB,CACpC,KAAK,EAAE,SAAS,cAAc,EAAE,EAChC,MAAM,EAAE,YAAY,EACpB,KAAK,EAAE,MAAM,GACZ,SAAS,YAAY,EAAE,CAwEzB"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"traceToolpack.d.ts","sourceRoot":"","sources":["../../../../src/lib/trace-toolpack/traceToolpack.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAkCG;AASH,OAAO,EAAc,KAAK,IAAI,EAA6B,MAAM,qBAAqB,CAAC;AAcvF,OAAO,EAIL,KAAK,sBAAsB,EAC3B,KAAK,oBAAoB,EAC1B,MAAM,YAAY,CAAC;AAuQpB;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA4BG;AACH,wBAAgB,aAAa,CAC3B,SAAS,EAAE,sBAAsB,EACjC,OAAO,CAAC,EAAE,oBAAoB,GAC7B,IAAI,EAAE,CA0BR;AAED;;;;;;;GAOG;AACH,eAAO,MAAM,gBAAgB,kMAYnB,CAAC;
|
|
1
|
+
{"version":3,"file":"traceToolpack.d.ts","sourceRoot":"","sources":["../../../../src/lib/trace-toolpack/traceToolpack.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAkCG;AASH,OAAO,EAAc,KAAK,IAAI,EAA6B,MAAM,qBAAqB,CAAC;AAcvF,OAAO,EAIL,KAAK,sBAAsB,EAC3B,KAAK,oBAAoB,EAC1B,MAAM,YAAY,CAAC;AAuQpB;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA4BG;AACH,wBAAgB,aAAa,CAC3B,SAAS,EAAE,sBAAsB,EACjC,OAAO,CAAC,EAAE,oBAAoB,GAC7B,IAAI,EAAE,CA0BR;AAED;;;;;;;GAOG;AACH,eAAO,MAAM,gBAAgB,kMAYnB,CAAC;AAopEX;;;;;GAKG;AACH,wBAAsB,aAAa,CACjC,KAAK,EAAE,SAAS,IAAI,EAAE,EACtB,IAAI,EAAE,MAAM,EACZ,IAAI,GAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAM,GACjC,OAAO,CAAC,MAAM,CAAC,CASjB"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"commentaryTemplates.d.ts","sourceRoot":"","sources":["../../../../../src/recorders/observability/commentary/commentaryTemplates.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAwCG;AAEH,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,6BAA6B,CAAC;AAUvE;;;2EAG2E;AAC3E,MAAM,MAAM,mBAAmB,GAAG,QAAQ,CAAC,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC,CAAC;AAcnE;;;;GAIG;AACH,eAAO,MAAM,0BAA0B,EAAE,
|
|
1
|
+
{"version":3,"file":"commentaryTemplates.d.ts","sourceRoot":"","sources":["../../../../../src/recorders/observability/commentary/commentaryTemplates.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAwCG;AAEH,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,6BAA6B,CAAC;AAUvE;;;2EAG2E;AAC3E,MAAM,MAAM,mBAAmB,GAAG,QAAQ,CAAC,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC,CAAC;AAcnE;;;;GAIG;AACH,eAAO,MAAM,0BAA0B,EAAE,mBAoTxC,CAAC;AAEF;;6CAE6C;AAC7C,MAAM,WAAW,iBAAiB;IAChC;6EACyE;IACzE,QAAQ,CAAC,OAAO,EAAE,MAAM,CAAC;IACzB;;;2EAGuE;IACvE,QAAQ,CAAC,kBAAkB,CAAC,EAAE,CAAC,QAAQ,EAAE,MAAM,KAAK,MAAM,GAAG,SAAS,CAAC;CACxE;AAED;;;;;;;GAOG;AACH,wBAAgB,mBAAmB,CAAC,KAAK,EAAE,mBAAmB,GAAG,MAAM,GAAG,IAAI,GAAG,SAAS,CA6OzF;AAmBD;;;;;;;;GAQG;AACH,wBAAgB,qBAAqB,CACnC,KAAK,EAAE,mBAAmB,EAC1B,GAAG,EAAE,iBAAiB,EACtB,SAAS,GAAE,mBAAgD,GAC1D,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CA0YxB;AAgCD;;;;;;;;GAQG;AACH,wBAAgB,gBAAgB,CAAC,KAAK,EAAE,mBAAmB,EAAE,GAAG,EAAE,iBAAiB,GAAG,MAAM,CAS3F;AAED;;;;;;;;GAQG;AACH,wBAAgB,gBAAgB,CAAC,QAAQ,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,GAAG,MAAM,CAEvF"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "agentfootprint",
|
|
3
|
-
"version": "9.
|
|
3
|
+
"version": "9.63.0",
|
|
4
4
|
"description": "The explainable agent framework — backtrack a wrong answer to the exact context that caused it (evidence, not guesses). Built on footprintjs.",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"type": "commonjs",
|