agentfootprint 9.59.1 → 9.60.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.
Files changed (143) hide show
  1. package/AGENTS.md +1 -1
  2. package/CLAUDE.md +1 -1
  3. package/ai-instructions/claude-code/SKILL.md +1 -1
  4. package/dist/adapters/llm/AnthropicProvider.js +9 -2
  5. package/dist/adapters/llm/AnthropicProvider.js.map +1 -1
  6. package/dist/adapters/llm/BrowserAnthropicProvider.js +5 -1
  7. package/dist/adapters/llm/BrowserAnthropicProvider.js.map +1 -1
  8. package/dist/adapters/llm/MockProvider.js +4 -0
  9. package/dist/adapters/llm/MockProvider.js.map +1 -1
  10. package/dist/adapters/llm/wireManifest.js +38 -0
  11. package/dist/adapters/llm/wireManifest.js.map +1 -0
  12. package/dist/adapters/types.js.map +1 -1
  13. package/dist/core/Agent.js +129 -1
  14. package/dist/core/Agent.js.map +1 -1
  15. package/dist/core/agent/buildAgentChart.js +11 -0
  16. package/dist/core/agent/buildAgentChart.js.map +1 -1
  17. package/dist/core/agent/buildDynamicAgentChart.js +23 -0
  18. package/dist/core/agent/buildDynamicAgentChart.js.map +1 -1
  19. package/dist/core/agent/stages/callLLM.js +83 -0
  20. package/dist/core/agent/stages/callLLM.js.map +1 -1
  21. package/dist/core/slots/buildToolsSlot.js +64 -3
  22. package/dist/core/slots/buildToolsSlot.js.map +1 -1
  23. package/dist/core/tools.js +34 -0
  24. package/dist/core/tools.js.map +1 -1
  25. package/dist/esm/adapters/llm/AnthropicProvider.js +9 -2
  26. package/dist/esm/adapters/llm/AnthropicProvider.js.map +1 -1
  27. package/dist/esm/adapters/llm/BrowserAnthropicProvider.js +5 -1
  28. package/dist/esm/adapters/llm/BrowserAnthropicProvider.js.map +1 -1
  29. package/dist/esm/adapters/llm/MockProvider.js +4 -0
  30. package/dist/esm/adapters/llm/MockProvider.js.map +1 -1
  31. package/dist/esm/adapters/llm/wireManifest.d.ts +29 -0
  32. package/dist/esm/adapters/llm/wireManifest.js +34 -0
  33. package/dist/esm/adapters/llm/wireManifest.js.map +1 -0
  34. package/dist/esm/adapters/types.d.ts +20 -0
  35. package/dist/esm/adapters/types.js.map +1 -1
  36. package/dist/esm/core/Agent.d.ts +27 -0
  37. package/dist/esm/core/Agent.js +129 -1
  38. package/dist/esm/core/Agent.js.map +1 -1
  39. package/dist/esm/core/agent/buildAgentChart.js +11 -0
  40. package/dist/esm/core/agent/buildAgentChart.js.map +1 -1
  41. package/dist/esm/core/agent/buildDynamicAgentChart.js +23 -0
  42. package/dist/esm/core/agent/buildDynamicAgentChart.js.map +1 -1
  43. package/dist/esm/core/agent/stages/callLLM.d.ts +15 -0
  44. package/dist/esm/core/agent/stages/callLLM.js +83 -0
  45. package/dist/esm/core/agent/stages/callLLM.js.map +1 -1
  46. package/dist/esm/core/agent/types.d.ts +17 -0
  47. package/dist/esm/core/slots/buildToolsSlot.d.ts +24 -0
  48. package/dist/esm/core/slots/buildToolsSlot.js +64 -3
  49. package/dist/esm/core/slots/buildToolsSlot.js.map +1 -1
  50. package/dist/esm/core/tools.d.ts +36 -0
  51. package/dist/esm/core/tools.js +34 -0
  52. package/dist/esm/core/tools.js.map +1 -1
  53. package/dist/esm/events/dispatcher.d.ts +1 -1
  54. package/dist/esm/events/dispatcher.js.map +1 -1
  55. package/dist/esm/events/payloads.d.ts +27 -0
  56. package/dist/esm/events/registry.d.ts +7 -1
  57. package/dist/esm/events/registry.js +6 -0
  58. package/dist/esm/events/registry.js.map +1 -1
  59. package/dist/esm/integrity/assertion/conflicts.d.ts +35 -0
  60. package/dist/esm/integrity/assertion/conflicts.js +74 -0
  61. package/dist/esm/integrity/assertion/conflicts.js.map +1 -0
  62. package/dist/esm/integrity/assertion/types.d.ts +74 -0
  63. package/dist/esm/integrity/assertion/types.js +0 -0
  64. package/dist/esm/integrity/assertion/types.js.map +1 -0
  65. package/dist/esm/integrity/dangling-reference/check.d.ts +45 -0
  66. package/dist/esm/integrity/dangling-reference/check.js +68 -0
  67. package/dist/esm/integrity/dangling-reference/check.js.map +1 -0
  68. package/dist/esm/integrity/disposition/lifecycle.d.ts +35 -0
  69. package/dist/esm/integrity/disposition/lifecycle.js +63 -0
  70. package/dist/esm/integrity/disposition/lifecycle.js.map +1 -0
  71. package/dist/esm/integrity/finding/types.d.ts +57 -0
  72. package/dist/esm/integrity/finding/types.js +47 -0
  73. package/dist/esm/integrity/finding/types.js.map +1 -0
  74. package/dist/esm/integrity/invariant-violation/check.d.ts +52 -0
  75. package/dist/esm/integrity/invariant-violation/check.js +82 -0
  76. package/dist/esm/integrity/invariant-violation/check.js.map +1 -0
  77. package/dist/esm/integrity/invariant-violation/wire.d.ts +43 -0
  78. package/dist/esm/integrity/invariant-violation/wire.js +93 -0
  79. package/dist/esm/integrity/invariant-violation/wire.js.map +1 -0
  80. package/dist/esm/recorders/core/IntegrityRecorder.d.ts +20 -0
  81. package/dist/esm/recorders/core/IntegrityRecorder.js +25 -0
  82. package/dist/esm/recorders/core/IntegrityRecorder.js.map +1 -0
  83. package/dist/events/dispatcher.js.map +1 -1
  84. package/dist/events/registry.js +6 -0
  85. package/dist/events/registry.js.map +1 -1
  86. package/dist/integrity/assertion/conflicts.js +78 -0
  87. package/dist/integrity/assertion/conflicts.js.map +1 -0
  88. package/dist/integrity/assertion/types.js +0 -0
  89. package/dist/integrity/assertion/types.js.map +1 -0
  90. package/dist/integrity/dangling-reference/check.js +72 -0
  91. package/dist/integrity/dangling-reference/check.js.map +1 -0
  92. package/dist/integrity/disposition/lifecycle.js +67 -0
  93. package/dist/integrity/disposition/lifecycle.js.map +1 -0
  94. package/dist/integrity/finding/types.js +52 -0
  95. package/dist/integrity/finding/types.js.map +1 -0
  96. package/dist/integrity/invariant-violation/check.js +86 -0
  97. package/dist/integrity/invariant-violation/check.js.map +1 -0
  98. package/dist/integrity/invariant-violation/wire.js +97 -0
  99. package/dist/integrity/invariant-violation/wire.js.map +1 -0
  100. package/dist/recorders/core/IntegrityRecorder.js +29 -0
  101. package/dist/recorders/core/IntegrityRecorder.js.map +1 -0
  102. package/dist/types/adapters/llm/AnthropicProvider.d.ts.map +1 -1
  103. package/dist/types/adapters/llm/BrowserAnthropicProvider.d.ts.map +1 -1
  104. package/dist/types/adapters/llm/MockProvider.d.ts.map +1 -1
  105. package/dist/types/adapters/llm/wireManifest.d.ts +30 -0
  106. package/dist/types/adapters/llm/wireManifest.d.ts.map +1 -0
  107. package/dist/types/adapters/types.d.ts +20 -0
  108. package/dist/types/adapters/types.d.ts.map +1 -1
  109. package/dist/types/core/Agent.d.ts +27 -0
  110. package/dist/types/core/Agent.d.ts.map +1 -1
  111. package/dist/types/core/agent/buildAgentChart.d.ts.map +1 -1
  112. package/dist/types/core/agent/buildDynamicAgentChart.d.ts.map +1 -1
  113. package/dist/types/core/agent/stages/callLLM.d.ts +15 -0
  114. package/dist/types/core/agent/stages/callLLM.d.ts.map +1 -1
  115. package/dist/types/core/agent/types.d.ts +17 -0
  116. package/dist/types/core/agent/types.d.ts.map +1 -1
  117. package/dist/types/core/slots/buildToolsSlot.d.ts +24 -0
  118. package/dist/types/core/slots/buildToolsSlot.d.ts.map +1 -1
  119. package/dist/types/core/tools.d.ts +36 -0
  120. package/dist/types/core/tools.d.ts.map +1 -1
  121. package/dist/types/events/dispatcher.d.ts +1 -1
  122. package/dist/types/events/dispatcher.d.ts.map +1 -1
  123. package/dist/types/events/payloads.d.ts +27 -0
  124. package/dist/types/events/payloads.d.ts.map +1 -1
  125. package/dist/types/events/registry.d.ts +7 -1
  126. package/dist/types/events/registry.d.ts.map +1 -1
  127. package/dist/types/integrity/assertion/conflicts.d.ts +36 -0
  128. package/dist/types/integrity/assertion/conflicts.d.ts.map +1 -0
  129. package/dist/types/integrity/assertion/types.d.ts +75 -0
  130. package/dist/types/integrity/assertion/types.d.ts.map +1 -0
  131. package/dist/types/integrity/dangling-reference/check.d.ts +46 -0
  132. package/dist/types/integrity/dangling-reference/check.d.ts.map +1 -0
  133. package/dist/types/integrity/disposition/lifecycle.d.ts +36 -0
  134. package/dist/types/integrity/disposition/lifecycle.d.ts.map +1 -0
  135. package/dist/types/integrity/finding/types.d.ts +58 -0
  136. package/dist/types/integrity/finding/types.d.ts.map +1 -0
  137. package/dist/types/integrity/invariant-violation/check.d.ts +53 -0
  138. package/dist/types/integrity/invariant-violation/check.d.ts.map +1 -0
  139. package/dist/types/integrity/invariant-violation/wire.d.ts +44 -0
  140. package/dist/types/integrity/invariant-violation/wire.d.ts.map +1 -0
  141. package/dist/types/recorders/core/IntegrityRecorder.d.ts +21 -0
  142. package/dist/types/recorders/core/IntegrityRecorder.d.ts.map +1 -0
  143. package/package.json +1 -1
@@ -1 +1 @@
1
- {"version":3,"file":"MockProvider.js","sourceRoot":"","sources":["../../../../src/adapters/llm/MockProvider.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;GAqBG;AAiFH;;;;;;;GAOG;AACH,MAAM,mBAAmB,GAAwB,MAAM,CAAC,MAAM,CAAC,CAAC,QAAQ,EAAE,MAAM,EAAE,WAAW,CAAC,CAAC,CAAC;AAEhG,MAAM,OAAO,YAAY;IACd,IAAI,CAAS;IACb,iBAAiB,GAAG,mBAAmB,CAAC;IACjD;;;;;;;OAOG;IACM,uBAAuB,GAAG,IAAI,CAAC;IACvB,KAAK,CAAU;IACf,OAAO,CAAwB;IACxC,aAAa,GAAG,CAAC,CAAC;IACT,OAAO,CAAqD;IAC5D,UAAU,CAAY;IACtB,YAAY,CAAY;IACxB,UAAU,CAAS;IACnB,aAAa,CAA+B;IAE7D,YAAY,UAA+B,EAAE;QAC3C,IAAI,CAAC,IAAI,GAAG,OAAO,CAAC,IAAI,IAAI,MAAM,CAAC;QACnC,IAAI,CAAC,KAAK,GAAG,OAAO,CAAC,KAAK,CAAC;QAC3B,IAAI,CAAC,OAAO,GAAG,OAAO,CAAC,OAAO,CAAC;QAC/B,IAAI,CAAC,OAAO;YACV,OAAO,CAAC,OAAO;gBACf,CAAC,CAAC,GAAG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C;QACjD,CAAC,CAAC;QACF,MAAM,EAAE,gBAAgB,CAAC,OAAO,EAAE,OAAO,EAAE,EAAE,IAAI,EAAE,IAAI,EAAE,CAAC,CAAC;IAC7D,CAAC,CAAC,CAAC;AACL,CAAC;AAED;2EAC2E;AAC3E,SAAS,aAAa,CAAC,OAAe;IACpC,IAAI,OAAO,CAAC,MAAM,KAAK,CAAC;QAAE,OAAO,EAAE,CAAC;IACpC,mEAAmE;IACnE,mDAAmD;IACnD,MAAM,GAAG,GAAa,EAAE,CAAC;IACzB,KAAK,MAAM,CAAC,IAAI,OAAO,CAAC,QAAQ,CAAC,SAAS,CAAC;QAAE,GAAG,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;IAC5D,uDAAuD;IACvD,MAAM,aAAa,GAAG,OAAO,CAAC,MAAM,CAAC,IAAI,CAAC,CAAC;IAC3C,IAAI,aAAa,GAAG,CAAC;QAAE,GAAG,CAAC,OAAO,CAAC,OAAO,CAAC,KAAK,CAAC,CAAC,EAAE,aAAa,CAAC,CAAC,CAAC;IACpE,OAAO,GAAG,CAAC;AACb,CAAC;AAED,SAAS,aAAa,CAAC,QAAgC;IACrD,IAAI,CAAC,GAAG,CAAC,CAAC;IACV,KAAK,MAAM,CAAC,IAAI,QAAQ;QAAE,CAAC,IAAI,CAAC,CAAC,OAAO,CAAC,MAAM,CAAC;IAChD,OAAO,CAAC,CAAC;AACX,CAAC"}
@@ -0,0 +1,29 @@
1
+ /**
2
+ * wireManifest — what ACTUALLY crossed the wire, read back from the
3
+ * serialized request body itself.
4
+ *
5
+ * Pattern: one tiny extractor, shared by every adapter that states a
6
+ * manifest (the anthropicCacheWire precedent).
7
+ * Role: the wire seam's evidence. The recorded defect this exists for:
8
+ * the internal frame said a subsystem's tools were removed, and
9
+ * the adapter still serialized four schemas. A check that reads
10
+ * only the pre-serialization IR CANNOT see that bug — the IR was
11
+ * clean. So the manifest is read from the FINAL request body,
12
+ * after every transform (tool mapping, cache markers, tool_choice
13
+ * guards), at the last moment the adapter still holds it.
14
+ *
15
+ * HONEST ABSENCE: a provider that does not state a manifest simply leaves
16
+ * `LLMResponse.wireManifest` undefined, and the wire check treats that as
17
+ * incomparable — never as "nothing crossed". An EMPTY manifest is the
18
+ * opposite: a stated fact that zero tools rode the request.
19
+ */
20
+ import type { WireToolManifest } from '../types.js';
21
+ export type { WireToolManifest };
22
+ /**
23
+ * Read the manifest off the final request body's tools array. `undefined`
24
+ * tools (the field never written — Anthropic rejects an empty array, so
25
+ * adapters omit it) is a stated zero: no tools crossed.
26
+ */
27
+ export declare function toolManifestOf(tools: ReadonlyArray<{
28
+ readonly name?: unknown;
29
+ }> | undefined): WireToolManifest;
@@ -0,0 +1,34 @@
1
+ /**
2
+ * wireManifest — what ACTUALLY crossed the wire, read back from the
3
+ * serialized request body itself.
4
+ *
5
+ * Pattern: one tiny extractor, shared by every adapter that states a
6
+ * manifest (the anthropicCacheWire precedent).
7
+ * Role: the wire seam's evidence. The recorded defect this exists for:
8
+ * the internal frame said a subsystem's tools were removed, and
9
+ * the adapter still serialized four schemas. A check that reads
10
+ * only the pre-serialization IR CANNOT see that bug — the IR was
11
+ * clean. So the manifest is read from the FINAL request body,
12
+ * after every transform (tool mapping, cache markers, tool_choice
13
+ * guards), at the last moment the adapter still holds it.
14
+ *
15
+ * HONEST ABSENCE: a provider that does not state a manifest simply leaves
16
+ * `LLMResponse.wireManifest` undefined, and the wire check treats that as
17
+ * incomparable — never as "nothing crossed". An EMPTY manifest is the
18
+ * opposite: a stated fact that zero tools rode the request.
19
+ */
20
+ /**
21
+ * Read the manifest off the final request body's tools array. `undefined`
22
+ * tools (the field never written — Anthropic rejects an empty array, so
23
+ * adapters omit it) is a stated zero: no tools crossed.
24
+ */
25
+ export function toolManifestOf(tools) {
26
+ if (tools === undefined)
27
+ return { toolNames: [] };
28
+ return {
29
+ toolNames: tools
30
+ .map((t) => t.name)
31
+ .filter((name) => typeof name === 'string'),
32
+ };
33
+ }
34
+ //# sourceMappingURL=wireManifest.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"wireManifest.js","sourceRoot":"","sources":["../../../../src/adapters/llm/wireManifest.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;GAkBG;AAMH;;;;GAIG;AACH,MAAM,UAAU,cAAc,CAC5B,KAA6D;IAE7D,IAAI,KAAK,KAAK,SAAS;QAAE,OAAO,EAAE,SAAS,EAAE,EAAE,EAAE,CAAC;IAClD,OAAO;QACL,SAAS,EAAE,KAAK;aACb,GAAG,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,IAAI,CAAC;aAClB,MAAM,CAAC,CAAC,IAAI,EAAkB,EAAE,CAAC,OAAO,IAAI,KAAK,QAAQ,CAAC;KAC9D,CAAC;AACJ,CAAC"}
@@ -272,6 +272,26 @@ export interface LLMResponse {
272
272
  * etc.). The thinking subflow's stage early-returns in this case.
273
273
  */
274
274
  readonly rawThinking?: unknown;
275
+ /**
276
+ * 9.60.0 — what this request ACTUALLY carried, read back from the
277
+ * serialized body after every transform (see adapters/llm/wireManifest.ts,
278
+ * which builds it; the SHAPE lives here because it is part of the provider
279
+ * port, and the skill-graph fence rightly refuses this file reaching
280
+ * anything past the port).
281
+ *
282
+ * The wire seam's evidence: the recorded defect was an adapter still
283
+ * serializing four tool schemas after the internal frame said they were
284
+ * removed — invisible to any check that reads only the pre-serialization
285
+ * IR. Absent when the adapter states no manifest, and the wire check then
286
+ * treats the request as INCOMPARABLE (never as "nothing crossed"); an
287
+ * empty `toolNames` is the opposite — a stated zero.
288
+ */
289
+ readonly wireManifest?: WireToolManifest;
290
+ }
291
+ /** The structural record of what one request actually carried on the wire. */
292
+ export interface WireToolManifest {
293
+ /** Tool names as they appear in the serialized body, in wire order. */
294
+ readonly toolNames: readonly string[];
275
295
  }
276
296
  export interface LLMChunk {
277
297
  readonly tokenIndex: number;
@@ -1 +1 @@
1
- {"version":3,"file":"types.js","sourceRoot":"","sources":["../../../src/adapters/types.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;GAaG;AAsHH;;;;GAIG;AACH,MAAM,CAAC,MAAM,2BAA2B,GAAwB,MAAM,CAAC,MAAM,CAAC;IAC5E,MAAM;IACN,WAAW;CACZ,CAAC,CAAC;AAgrBH;;;;;;GAMG;AACH,MAAM,UAAU,cAAc,CAC5B,OAAsC,EACtC,UAAgC;IAEhC,IAAI,CAAC,OAAO;QAAE,OAAO,KAAK,CAAC;IAC3B,IAAI,UAAU,KAAK,WAAW;QAAE,OAAO,IAAI,CAAC;IAC5C,OAAO,OAAO,CAAC,OAAO,EAAE,QAAQ,CAAC,UAAU,CAAC,KAAK,IAAI,CAAC;AACxD,CAAC;AAqDD;;;;;;;;;GASG;AACH,MAAM,CAAC,MAAM,iBAAiB,GAAG,kBAAkB,CAAC;AAgGpD;uDACuD;AACvD,MAAM,UAAU,kBAAkB,CAChC,OAAoB;IAEpB,OAAO,OAAO,OAAO,CAAC,WAAW,KAAK,UAAU,CAAC;AACnD,CAAC"}
1
+ {"version":3,"file":"types.js","sourceRoot":"","sources":["../../../src/adapters/types.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;GAaG;AAsHH;;;;GAIG;AACH,MAAM,CAAC,MAAM,2BAA2B,GAAwB,MAAM,CAAC,MAAM,CAAC;IAC5E,MAAM;IACN,WAAW;CACZ,CAAC,CAAC;AAqsBH;;;;;;GAMG;AACH,MAAM,UAAU,cAAc,CAC5B,OAAsC,EACtC,UAAgC;IAEhC,IAAI,CAAC,OAAO;QAAE,OAAO,KAAK,CAAC;IAC3B,IAAI,UAAU,KAAK,WAAW;QAAE,OAAO,IAAI,CAAC;IAC5C,OAAO,OAAO,CAAC,OAAO,EAAE,QAAQ,CAAC,UAAU,CAAC,KAAK,IAAI,CAAC;AACxD,CAAC;AAqDD;;;;;;;;;GASG;AACH,MAAM,CAAC,MAAM,iBAAiB,GAAG,kBAAkB,CAAC;AAgGpD;uDACuD;AACvD,MAAM,UAAU,kBAAkB,CAChC,OAAoB;IAEpB,OAAO,OAAO,OAAO,CAAC,WAAW,KAAK,UAAU,CAAC;AACnD,CAAC"}
@@ -259,6 +259,17 @@ export declare class Agent extends RunnerBase<AgentInput, AgentOutput> {
259
259
  /** The last-tool-result pin (9.57.0) — set only when the operator named a
260
260
  * value other than the default 2. See AgentOptions.keepLastToolResults. */
261
261
  private readonly keepLastToolResults?;
262
+ /** See AgentOptions.integrityPosture (9.60.0). Default 'observe'. */
263
+ private readonly integrityPosture;
264
+ /**
265
+ * The per-run disposition ledger, shared with the check sites by
266
+ * REFERENCE through build-time closures (the ProviderToolCache pattern —
267
+ * plumbing, never scope state). `run()` resets it; the run boundary
268
+ * files its report and clears it.
269
+ */
270
+ private readonly integrityLedgerHolder;
271
+ /** Set at chart build: whether any registered tool declared `argumentsFrom`. */
272
+ private integrityDanglingPresent;
262
273
  /** What a run does when a declared credential needs 3LO consent (8.6.0).
263
274
  * Default `'pause'`. See AgentOptions.onAuthorizationRequired. */
264
275
  private readonly onAuthorizationRequired;
@@ -1099,6 +1110,22 @@ export declare class Agent extends RunnerBase<AgentInput, AgentOutput> {
1099
1110
  * there when anything is watching" — including `recordRun`, which subscribes
1100
1111
  * with `'*'` before the run starts, so every recording carries one.
1101
1112
  */
1113
+ /** Fresh per-run ledger — see AgentOptions.integrityPosture (9.60.0). */
1114
+ private beginIntegrityLedger;
1115
+ /**
1116
+ * Dev posture only: throw {@link CheckerDeadError} on a run whose
1117
+ * registered checkers demonstrably never ran, or whose canary went
1118
+ * uncaught. Called on the SUCCESS path before the recording files, so the
1119
+ * failure is the run's result, never a masked afterthought.
1120
+ */
1121
+ private assertIntegrityAlive;
1122
+ /**
1123
+ * File the run's disposition rows as ONE `integrity.disposition` event and
1124
+ * clear the ledger. On the finally path of both run doors — every exit,
1125
+ * before the recording stops. Listener-gated like every typed event, and
1126
+ * deliberately throw-proof: accounting must never change a run's outcome.
1127
+ */
1128
+ private fileIntegrityDisposition;
1102
1129
  private emitRunManifest;
1103
1130
  /**
1104
1131
  * File the DECLARED skill map (9.50.0) — `agentfootprint.skill.graph_declared`,
@@ -40,6 +40,7 @@ import { skillRecorder } from '../recorders/core/SkillRecorder.js';
40
40
  import { validationRecorder } from '../recorders/core/ValidationRecorder.js';
41
41
  import { credentialRecorder } from '../recorders/core/CredentialRecorder.js';
42
42
  import { mapRecorder } from '../recorders/core/MapRecorder.js';
43
+ import { integrityRecorder } from '../recorders/core/IntegrityRecorder.js';
43
44
  import { artifactsRecorder } from '../recorders/core/ArtifactsRecorder.js';
44
45
  import { toolsRecorder } from '../recorders/core/ToolsRecorder.js';
45
46
  import { reliabilityRecorder } from '../recorders/core/ReliabilityRecorder.js';
@@ -50,6 +51,7 @@ import { pendingDurableWrite } from './durabilityBarrier.js';
50
51
  import { ToolSessionTier, TOOL_TEARDOWN_TIMEOUT_MS, } from './toolSessions.js';
51
52
  import { buildEventMeta } from '../bridge/eventMeta.js';
52
53
  import { buildRunManifest } from './agent/runManifest.js';
54
+ import { beginIntegrityRun, } from '../integrity/disposition/lifecycle.js';
53
55
  /**
54
56
  * The pseudo-stage a tool-teardown event is stamped with.
55
57
  *
@@ -70,6 +72,12 @@ const TOOL_TEARDOWN_STAGE_ID = 'tool-teardown#0';
70
72
  * that no traversal ever visited. This says plainly where it came from.
71
73
  */
72
74
  const RUN_MANIFEST_STAGE_ID = 'run-configured#0';
75
+ /**
76
+ * Pseudo-stage for `agentfootprint.integrity.disposition` (9.60.0) — the
77
+ * ledger is filed at the run boundary, after the last stage committed, so it
78
+ * states where it came from exactly as the teardown id above does.
79
+ */
80
+ const INTEGRITY_DISPOSITION_STAGE_ID = 'integrity-disposition#0';
73
81
  /**
74
82
  * Pseudo-stage for `agentfootprint.skill.graph_declared` (9.50.0) — same
75
83
  * reasoning as the manifest id directly above: dispatched before the chart
@@ -286,6 +294,19 @@ export class Agent extends RunnerBase {
286
294
  /** The last-tool-result pin (9.57.0) — set only when the operator named a
287
295
  * value other than the default 2. See AgentOptions.keepLastToolResults. */
288
296
  keepLastToolResults;
297
+ /** See AgentOptions.integrityPosture (9.60.0). Default 'observe'. */
298
+ integrityPosture = 'observe';
299
+ /**
300
+ * The per-run disposition ledger, shared with the check sites by
301
+ * REFERENCE through build-time closures (the ProviderToolCache pattern —
302
+ * plumbing, never scope state). `run()` resets it; the run boundary
303
+ * files its report and clears it.
304
+ */
305
+ integrityLedgerHolder = {
306
+ current: undefined,
307
+ };
308
+ /** Set at chart build: whether any registered tool declared `argumentsFrom`. */
309
+ integrityDanglingPresent = false;
289
310
  /** What a run does when a declared credential needs 3LO consent (8.6.0).
290
311
  * Default `'pause'`. See AgentOptions.onAuthorizationRequired. */
291
312
  onAuthorizationRequired;
@@ -606,6 +627,16 @@ export class Agent extends RunnerBase {
606
627
  requireKeepLastToolResults(opts.keepLastToolResults, 'Agent');
607
628
  this.keepLastToolResults = opts.keepLastToolResults;
608
629
  }
630
+ // Refused at construction, never mid-run — a misspelled posture that was
631
+ // ignored would leave the liveness theorems switched off in an agent
632
+ // that believes they are on (the concurrency-mode precedent).
633
+ if (opts.integrityPosture !== undefined) {
634
+ if (opts.integrityPosture !== 'observe' && opts.integrityPosture !== 'dev') {
635
+ throw new Error(`Agent: integrityPosture must be 'observe' or 'dev', got ` +
636
+ `${JSON.stringify(opts.integrityPosture)}.`);
637
+ }
638
+ this.integrityPosture = opts.integrityPosture;
639
+ }
609
640
  // The claim-check seam (9.21.0). One store per agent, attached at
610
641
  // construction — idempotent by shape: there is no second door to attach a
611
642
  // competing one through, so "one per agent" is a fact of the type rather
@@ -1097,6 +1128,10 @@ export class Agent extends RunnerBase {
1097
1128
  // declared at file end via hoisting)
1098
1129
  const executor = this.createExecutor(options);
1099
1130
  this.inFlightRunId = this.currentRunContext.runId;
1131
+ // One disposition ledger per run (9.60.0) — registration mirrors what
1132
+ // this agent's configuration makes applicable; dev posture runs the
1133
+ // canaries here, BEFORE any real work, so a dead check is named first.
1134
+ this.beginIntegrityLedger();
1100
1135
  // Auto-checkpoint at iteration boundaries — captures the latest
1101
1136
  // conversation history into a per-run tracker. On error, we
1102
1137
  // wrap the underlying error in `RunCheckpointError` carrying
@@ -1135,6 +1170,12 @@ export class Agent extends RunnerBase {
1135
1170
  this.recordPendingQuestion(finalized);
1136
1171
  await this.endRunToolSessions(finalized);
1137
1172
  // The answer is FINISHED before this line and cannot be changed by it.
1173
+ // The liveness theorems (9.60.0, dev posture only) — a run that would
1174
+ // return green while its registered checkers demonstrably never ran
1175
+ // fails HERE instead, before the recording is filed. A finished run is
1176
+ // itself the proof work existed: the loop cannot finish without at
1177
+ // least one model call.
1178
+ this.assertIntegrityAlive();
1138
1179
  // See `fileRunRecording` for why the write is awaited rather than left
1139
1180
  // in flight, and why it can never fail the run.
1140
1181
  await this.fileRunRecording(recording, finalized);
@@ -1173,7 +1214,10 @@ export class Agent extends RunnerBase {
1173
1214
  // it would hand the caller a retry handle for a wall and bury the
1174
1215
  // named values one `.cause` deep, where the person deciding what to
1175
1216
  // do about them will not look.
1176
- cause instanceof UnsupportedValuesError);
1217
+ cause instanceof UnsupportedValuesError ||
1218
+ // 9.60.0 — a dead checker is a WIRING verdict on this build, not a
1219
+ // recoverable run state: resuming would run the same dead wiring.
1220
+ cause.name === 'CheckerDeadError');
1177
1221
  if (cause instanceof Error && !isTerminalTypedError && tracker.history.length > 0) {
1178
1222
  // Observation beats the heuristic: if a bracket was open, it says
1179
1223
  // exactly what the run was doing. `classifyFailurePhase` only decides
@@ -1205,6 +1249,10 @@ export class Agent extends RunnerBase {
1205
1249
  throw cause;
1206
1250
  }
1207
1251
  finally {
1252
+ // The run's disposition rows, on EVERY path — success, failure, pause —
1253
+ // and BEFORE the recording stops, so a recording carries its run's
1254
+ // checker accounting (9.60.0).
1255
+ this.fileIntegrityDisposition();
1208
1256
  // Always released: a recording left subscribed would keep listening
1209
1257
  // through the next run and grow a tail nobody reads.
1210
1258
  recording?.stop();
@@ -1467,6 +1515,9 @@ export class Agent extends RunnerBase {
1467
1515
  const recording = this.startRunRecording();
1468
1516
  const executor = this.createExecutor(options);
1469
1517
  this.inFlightRunId = this.currentRunContext.runId;
1518
+ // A resumed turn is two runs, and each keeps its own ledger — exactly
1519
+ // the recording's terms one comment up.
1520
+ this.beginIntegrityLedger();
1470
1521
  this.lastRunAnswer = undefined;
1471
1522
  // One run can never raise on another run's consent block.
1472
1523
  this.consentOutstanding.clear();
@@ -1479,6 +1530,8 @@ export class Agent extends RunnerBase {
1479
1530
  // AGAIN has asked a new one, and that one is outstanding from here.
1480
1531
  this.recordPendingQuestion(finalized);
1481
1532
  await this.endRunToolSessions(finalized);
1533
+ // Same liveness gate the fresh-run path applies (9.60.0).
1534
+ this.assertIntegrityAlive();
1482
1535
  await this.fileRunRecording(recording, finalized);
1483
1536
  return finalized;
1484
1537
  }
@@ -1487,6 +1540,9 @@ export class Agent extends RunnerBase {
1487
1540
  throw cause;
1488
1541
  }
1489
1542
  finally {
1543
+ // Same terms as the fresh-run path: rows on every exit, before the
1544
+ // recording stops (9.60.0).
1545
+ this.fileIntegrityDisposition();
1490
1546
  recording?.stop();
1491
1547
  this.inFlightRunId = undefined;
1492
1548
  }
@@ -2178,6 +2234,8 @@ export class Agent extends RunnerBase {
2178
2234
  attachObserver(credentialRecorder({ dispatcher, getRunContext: getRunCtx }));
2179
2235
  // Map engagement (9.58.0). Shipped WITH the domain, same lesson as above.
2180
2236
  attachObserver(mapRecorder({ dispatcher, getRunContext: getRunCtx }));
2237
+ // Context Integrity findings (9.60.0). Same lesson, applied again.
2238
+ attachObserver(integrityRecorder({ dispatcher, getRunContext: getRunCtx }));
2181
2239
  // Artifact lifecycle (9.21.0). Shipped WITH the domain — the credential
2182
2240
  // bridge above is the record of what waiting costs. Always-on and
2183
2241
  // zero-cost: with no store attached nothing emits, and the bridge drops
@@ -2256,6 +2314,55 @@ export class Agent extends RunnerBase {
2256
2314
  * there when anything is watching" — including `recordRun`, which subscribes
2257
2315
  * with `'*'` before the run starts, so every recording carries one.
2258
2316
  */
2317
+ /** Fresh per-run ledger — see AgentOptions.integrityPosture (9.60.0). */
2318
+ beginIntegrityLedger() {
2319
+ this.integrityLedgerHolder.current = beginIntegrityRun({
2320
+ wire: true,
2321
+ composeInvariant: this.mapsPlan !== undefined,
2322
+ dangling: this.integrityDanglingPresent,
2323
+ }, this.integrityPosture);
2324
+ }
2325
+ /**
2326
+ * Dev posture only: throw {@link CheckerDeadError} on a run whose
2327
+ * registered checkers demonstrably never ran, or whose canary went
2328
+ * uncaught. Called on the SUCCESS path before the recording files, so the
2329
+ * failure is the run's result, never a masked afterthought.
2330
+ */
2331
+ assertIntegrityAlive() {
2332
+ if (this.integrityPosture !== 'dev')
2333
+ return;
2334
+ this.integrityLedgerHolder.current?.assertAlive({ workExisted: true });
2335
+ }
2336
+ /**
2337
+ * File the run's disposition rows as ONE `integrity.disposition` event and
2338
+ * clear the ledger. On the finally path of both run doors — every exit,
2339
+ * before the recording stops. Listener-gated like every typed event, and
2340
+ * deliberately throw-proof: accounting must never change a run's outcome.
2341
+ */
2342
+ fileIntegrityDisposition() {
2343
+ const ledger = this.integrityLedgerHolder.current;
2344
+ this.integrityLedgerHolder.current = undefined;
2345
+ if (ledger === undefined)
2346
+ return;
2347
+ try {
2348
+ const type = 'agentfootprint.integrity.disposition';
2349
+ const dispatcher = this.getDispatcher();
2350
+ if (!dispatcher.hasListenersFor(type))
2351
+ return;
2352
+ dispatcher.dispatch({
2353
+ type,
2354
+ payload: {
2355
+ posture: this.integrityPosture,
2356
+ workExisted: true,
2357
+ rows: ledger.report(),
2358
+ },
2359
+ meta: buildEventMeta({ runtimeStageId: INTEGRITY_DISPOSITION_STAGE_ID }, this.currentRunContext),
2360
+ });
2361
+ }
2362
+ catch {
2363
+ // Recorder/dispatcher failures never abort a run — the house rule.
2364
+ }
2365
+ }
2259
2366
  emitRunManifest() {
2260
2367
  const type = 'agentfootprint.agent.run_configured';
2261
2368
  const dispatcher = this.getDispatcher();
@@ -2858,8 +2965,25 @@ export class Agent extends RunnerBase {
2858
2965
  const providerToolCache = { current: [] };
2859
2966
  const readSkillFor = this.readSkillOfferFor();
2860
2967
  const hiddenSkillIds = this.hiddenSkillIdsNow();
2968
+ // Registration-time owner stamps (9.60.0) — the identity edges the
2969
+ // integrity checks read. Built once per chart from the registry.
2970
+ const toolOwners = new Map(registry
2971
+ .filter((r) => r.tool.owner !== undefined)
2972
+ .map((r) => [r.name, r.tool.owner]));
2973
+ // The declared argument-ground edges (9.60.0) — same one-build harvest as
2974
+ // the owner stamps; read by callLLM's dangling-reference check.
2975
+ const toolGrounding = new Map(registry
2976
+ .filter((r) => r.tool.argumentsFrom !== undefined)
2977
+ .map((r) => [r.name, r.tool.argumentsFrom]));
2978
+ this.integrityDanglingPresent = toolGrounding.size > 0;
2861
2979
  const toolsSubflow = buildToolsSlot({
2862
2980
  tools: toolSchemas,
2981
+ ...(toolOwners.size > 0 && { toolOwners }),
2982
+ // The kernel's map cards, for the compose-seam integrity backstop.
2983
+ ...(this.mapsPlan !== undefined && {
2984
+ mountedMaps: this.mapsPlan.maps.map((m) => ({ id: m.id, toolNames: m.toolNames })),
2985
+ }),
2986
+ integrityLedger: this.integrityLedgerHolder,
2863
2987
  ...(this.externalToolProvider && { toolProvider: this.externalToolProvider }),
2864
2988
  ...(this.externalToolProvider && { providerToolCache }),
2865
2989
  ...(readSkillFor && { readSkillFor }),
@@ -2882,6 +3006,10 @@ export class Agent extends RunnerBase {
2882
3006
  get toolSchemas() {
2883
3007
  return toolSchemasResolved;
2884
3008
  },
3009
+ // The declared argument-ground edges (9.60.0) — value-conditional, so
3010
+ // an agent whose tools declare none runs the exact bytes it always did.
3011
+ ...(toolGrounding.size > 0 && { toolGrounding }),
3012
+ integrityLedger: this.integrityLedgerHolder,
2885
3013
  ...(this.reliabilityConfig !== undefined && { reliability: this.reliabilityConfig }),
2886
3014
  ...(this.outputSchemaParser !== undefined && {
2887
3015
  outputSchemaParser: this.outputSchemaParser,