agentfootprint 10.8.1 → 10.10.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 (263) hide show
  1. package/CAPABILITIES.md +3 -0
  2. package/dist/core/Agent.js +27 -30
  3. package/dist/core/Agent.js.map +1 -1
  4. package/dist/core/agent/AgentBuilder.js +12 -16
  5. package/dist/core/agent/AgentBuilder.js.map +1 -1
  6. package/dist/core/agent/buildAgentChart.js +3 -17
  7. package/dist/core/agent/buildAgentChart.js.map +1 -1
  8. package/dist/core/agent/buildDynamicAgentChart.js +2 -12
  9. package/dist/core/agent/buildDynamicAgentChart.js.map +1 -1
  10. package/dist/core/agent/composeRequest.js +5 -2
  11. package/dist/core/agent/composeRequest.js.map +1 -1
  12. package/dist/core/agent/evidence/frames.js +3 -1
  13. package/dist/core/agent/evidence/frames.js.map +1 -1
  14. package/dist/core/agent/findings/admission.js +140 -0
  15. package/dist/core/agent/findings/admission.js.map +1 -0
  16. package/dist/core/agent/findings/answerAdmission.js +90 -0
  17. package/dist/core/agent/findings/answerAdmission.js.map +1 -0
  18. package/dist/core/agent/findings/context.js +163 -0
  19. package/dist/core/agent/findings/context.js.map +1 -0
  20. package/dist/core/agent/findings/instruction.js +26 -0
  21. package/dist/core/agent/findings/instruction.js.map +1 -0
  22. package/dist/core/agent/findings/ledger.js +17 -5
  23. package/dist/core/agent/findings/ledger.js.map +1 -1
  24. package/dist/core/agent/findings/offer.js +9 -57
  25. package/dist/core/agent/findings/offer.js.map +1 -1
  26. package/dist/core/agent/findings/peel.js +12 -1
  27. package/dist/core/agent/findings/peel.js.map +1 -1
  28. package/dist/core/agent/findings/refusal.js +68 -0
  29. package/dist/core/agent/findings/refusal.js.map +1 -0
  30. package/dist/core/agent/findings/reserved.js +12 -83
  31. package/dist/core/agent/findings/reserved.js.map +1 -1
  32. package/dist/core/agent/findings/serve.js +3 -10
  33. package/dist/core/agent/findings/serve.js.map +1 -1
  34. package/dist/core/agent/findings/ticket.js +13 -0
  35. package/dist/core/agent/findings/ticket.js.map +1 -0
  36. package/dist/core/agent/honesty/mounts.js +42 -26
  37. package/dist/core/agent/honesty/mounts.js.map +1 -1
  38. package/dist/core/agent/stages/callLLM.js +55 -47
  39. package/dist/core/agent/stages/callLLM.js.map +1 -1
  40. package/dist/core/agent/stages/reliabilityExecution.js +2 -0
  41. package/dist/core/agent/stages/reliabilityExecution.js.map +1 -1
  42. package/dist/core/agent/stages/route.js +29 -28
  43. package/dist/core/agent/stages/route.js.map +1 -1
  44. package/dist/core/agent/stages/seed.js +6 -20
  45. package/dist/core/agent/stages/seed.js.map +1 -1
  46. package/dist/core/agent/stages/toolCalls.js +124 -73
  47. package/dist/core/agent/stages/toolCalls.js.map +1 -1
  48. package/dist/core/runCheckpoint.js +4 -1
  49. package/dist/core/runCheckpoint.js.map +1 -1
  50. package/dist/core/slots/buildToolsSlot.js +3 -24
  51. package/dist/core/slots/buildToolsSlot.js.map +1 -1
  52. package/dist/esm/core/Agent.js +12 -15
  53. package/dist/esm/core/Agent.js.map +1 -1
  54. package/dist/esm/core/agent/AgentBuilder.d.ts +0 -8
  55. package/dist/esm/core/agent/AgentBuilder.js +7 -11
  56. package/dist/esm/core/agent/AgentBuilder.js.map +1 -1
  57. package/dist/esm/core/agent/buildAgentChart.d.ts +3 -12
  58. package/dist/esm/core/agent/buildAgentChart.js +3 -17
  59. package/dist/esm/core/agent/buildAgentChart.js.map +1 -1
  60. package/dist/esm/core/agent/buildDynamicAgentChart.js +2 -12
  61. package/dist/esm/core/agent/buildDynamicAgentChart.js.map +1 -1
  62. package/dist/esm/core/agent/composeRequest.d.ts +2 -1
  63. package/dist/esm/core/agent/composeRequest.js +5 -2
  64. package/dist/esm/core/agent/composeRequest.js.map +1 -1
  65. package/dist/esm/core/agent/evidence/frames.js +4 -2
  66. package/dist/esm/core/agent/evidence/frames.js.map +1 -1
  67. package/dist/esm/core/agent/findings/admission.d.ts +26 -0
  68. package/dist/esm/core/agent/findings/admission.js +134 -0
  69. package/dist/esm/core/agent/findings/admission.js.map +1 -0
  70. package/dist/esm/core/agent/findings/answerAdmission.d.ts +13 -0
  71. package/dist/esm/core/agent/findings/answerAdmission.js +61 -0
  72. package/dist/esm/core/agent/findings/answerAdmission.js.map +1 -0
  73. package/dist/esm/core/agent/findings/context.d.ts +13 -0
  74. package/dist/esm/core/agent/findings/context.js +158 -0
  75. package/dist/esm/core/agent/findings/context.js.map +1 -0
  76. package/dist/esm/core/agent/findings/instruction.d.ts +12 -0
  77. package/dist/esm/core/agent/findings/instruction.js +22 -0
  78. package/dist/esm/core/agent/findings/instruction.js.map +1 -0
  79. package/dist/esm/core/agent/findings/ledger.d.ts +4 -1
  80. package/dist/esm/core/agent/findings/ledger.js +17 -5
  81. package/dist/esm/core/agent/findings/ledger.js.map +1 -1
  82. package/dist/esm/core/agent/findings/offer.d.ts +9 -57
  83. package/dist/esm/core/agent/findings/offer.js +9 -57
  84. package/dist/esm/core/agent/findings/offer.js.map +1 -1
  85. package/dist/esm/core/agent/findings/peel.d.ts +6 -1
  86. package/dist/esm/core/agent/findings/peel.js +12 -1
  87. package/dist/esm/core/agent/findings/peel.js.map +1 -1
  88. package/dist/esm/core/agent/findings/refusal.d.ts +15 -0
  89. package/dist/esm/core/agent/findings/refusal.js +63 -0
  90. package/dist/esm/core/agent/findings/refusal.js.map +1 -0
  91. package/dist/esm/core/agent/findings/reserved.d.ts +7 -31
  92. package/dist/esm/core/agent/findings/reserved.js +12 -83
  93. package/dist/esm/core/agent/findings/reserved.js.map +1 -1
  94. package/dist/esm/core/agent/findings/serve.d.ts +2 -12
  95. package/dist/esm/core/agent/findings/serve.js +1 -8
  96. package/dist/esm/core/agent/findings/serve.js.map +1 -1
  97. package/dist/esm/core/agent/findings/ticket.d.ts +13 -0
  98. package/dist/esm/core/agent/findings/ticket.js +9 -0
  99. package/dist/esm/core/agent/findings/ticket.js.map +1 -0
  100. package/dist/esm/core/agent/findings/types.d.ts +1 -1
  101. package/dist/esm/core/agent/honesty/mounts.d.ts +2 -62
  102. package/dist/esm/core/agent/honesty/mounts.js +17 -1
  103. package/dist/esm/core/agent/honesty/mounts.js.map +1 -1
  104. package/dist/esm/core/agent/stages/callLLM.d.ts +1 -0
  105. package/dist/esm/core/agent/stages/callLLM.js +56 -48
  106. package/dist/esm/core/agent/stages/callLLM.js.map +1 -1
  107. package/dist/esm/core/agent/stages/reliabilityExecution.d.ts +2 -0
  108. package/dist/esm/core/agent/stages/reliabilityExecution.js +2 -0
  109. package/dist/esm/core/agent/stages/reliabilityExecution.js.map +1 -1
  110. package/dist/esm/core/agent/stages/route.d.ts +4 -1
  111. package/dist/esm/core/agent/stages/route.js +28 -27
  112. package/dist/esm/core/agent/stages/route.js.map +1 -1
  113. package/dist/esm/core/agent/stages/seed.d.ts +1 -0
  114. package/dist/esm/core/agent/stages/seed.js +6 -20
  115. package/dist/esm/core/agent/stages/seed.js.map +1 -1
  116. package/dist/esm/core/agent/stages/toolCalls.d.ts +0 -51
  117. package/dist/esm/core/agent/stages/toolCalls.js +99 -48
  118. package/dist/esm/core/agent/stages/toolCalls.js.map +1 -1
  119. package/dist/esm/core/agent/types.d.ts +12 -0
  120. package/dist/esm/core/runCheckpoint.js +4 -1
  121. package/dist/esm/core/runCheckpoint.js.map +1 -1
  122. package/dist/esm/core/slots/buildToolsSlot.d.ts +2 -10
  123. package/dist/esm/core/slots/buildToolsSlot.js +3 -24
  124. package/dist/esm/core/slots/buildToolsSlot.js.map +1 -1
  125. package/dist/esm/hosting/standingAgent.js +3 -0
  126. package/dist/esm/hosting/standingAgent.js.map +1 -1
  127. package/dist/esm/lib/saidByPerson.d.ts +2 -0
  128. package/dist/esm/lib/saidByPerson.js +3 -0
  129. package/dist/esm/lib/saidByPerson.js.map +1 -1
  130. package/dist/esm/provider-contract/requestObserver.d.ts +9 -0
  131. package/dist/esm/provider-contract/requestObserver.js +39 -0
  132. package/dist/esm/provider-contract/requestObserver.js.map +1 -0
  133. package/dist/esm/provider-contract/types.d.ts +9 -0
  134. package/dist/esm/provider-contract/types.js.map +1 -1
  135. package/dist/esm/redaction/conversation.js +1 -0
  136. package/dist/esm/redaction/conversation.js.map +1 -1
  137. package/dist/esm/redaction/knownStrings.js +3 -0
  138. package/dist/esm/redaction/knownStrings.js.map +1 -1
  139. package/dist/esm/resilience/withFallback.js +37 -9
  140. package/dist/esm/resilience/withFallback.js.map +1 -1
  141. package/dist/esm/resilience/withRetry.js +16 -5
  142. package/dist/esm/resilience/withRetry.js.map +1 -1
  143. package/dist/esm/time-travel/servedView.d.ts +1 -1
  144. package/dist/esm/time-travel/servedView.js +44 -154
  145. package/dist/esm/time-travel/servedView.js.map +1 -1
  146. package/dist/esm/trace-toolpack/causeCapture.d.ts +17 -0
  147. package/dist/esm/trace-toolpack/causeCapture.js +96 -0
  148. package/dist/esm/trace-toolpack/causeCapture.js.map +1 -0
  149. package/dist/esm/trace-toolpack/causeControl.d.ts +6 -0
  150. package/dist/esm/trace-toolpack/causeControl.js +45 -0
  151. package/dist/esm/trace-toolpack/causeControl.js.map +1 -0
  152. package/dist/esm/trace-toolpack/causeReader.js +11 -9
  153. package/dist/esm/trace-toolpack/causeReader.js.map +1 -1
  154. package/dist/esm/trace-toolpack/causeResponse.d.ts +3 -2
  155. package/dist/esm/trace-toolpack/causeResponse.js +27 -7
  156. package/dist/esm/trace-toolpack/causeResponse.js.map +1 -1
  157. package/dist/esm/trace-toolpack/causeSnapshot.d.ts +6 -1
  158. package/dist/esm/trace-toolpack/causeSnapshot.js +26 -15
  159. package/dist/esm/trace-toolpack/causeSnapshot.js.map +1 -1
  160. package/dist/esm/trace-toolpack/causeTools.js +1 -1
  161. package/dist/esm/trace-toolpack/causeTools.js.map +1 -1
  162. package/dist/hosting/standingAgent.js +3 -0
  163. package/dist/hosting/standingAgent.js.map +1 -1
  164. package/dist/lib/saidByPerson.js +4 -1
  165. package/dist/lib/saidByPerson.js.map +1 -1
  166. package/dist/provider-contract/requestObserver.js +44 -0
  167. package/dist/provider-contract/requestObserver.js.map +1 -0
  168. package/dist/provider-contract/types.js.map +1 -1
  169. package/dist/redaction/conversation.js +1 -0
  170. package/dist/redaction/conversation.js.map +1 -1
  171. package/dist/redaction/knownStrings.js +3 -0
  172. package/dist/redaction/knownStrings.js.map +1 -1
  173. package/dist/resilience/withFallback.js +37 -9
  174. package/dist/resilience/withFallback.js.map +1 -1
  175. package/dist/resilience/withRetry.js +16 -5
  176. package/dist/resilience/withRetry.js.map +1 -1
  177. package/dist/time-travel/servedView.js +44 -154
  178. package/dist/time-travel/servedView.js.map +1 -1
  179. package/dist/trace-toolpack/causeCapture.js +103 -0
  180. package/dist/trace-toolpack/causeCapture.js.map +1 -0
  181. package/dist/trace-toolpack/causeControl.js +49 -0
  182. package/dist/trace-toolpack/causeControl.js.map +1 -0
  183. package/dist/trace-toolpack/causeReader.js +11 -9
  184. package/dist/trace-toolpack/causeReader.js.map +1 -1
  185. package/dist/trace-toolpack/causeResponse.js +27 -7
  186. package/dist/trace-toolpack/causeResponse.js.map +1 -1
  187. package/dist/trace-toolpack/causeSnapshot.js +31 -20
  188. package/dist/trace-toolpack/causeSnapshot.js.map +1 -1
  189. package/dist/trace-toolpack/causeTools.js +1 -1
  190. package/dist/trace-toolpack/causeTools.js.map +1 -1
  191. package/dist/types/core/Agent.d.ts.map +1 -1
  192. package/dist/types/core/agent/AgentBuilder.d.ts +0 -8
  193. package/dist/types/core/agent/AgentBuilder.d.ts.map +1 -1
  194. package/dist/types/core/agent/buildAgentChart.d.ts +3 -12
  195. package/dist/types/core/agent/buildAgentChart.d.ts.map +1 -1
  196. package/dist/types/core/agent/buildDynamicAgentChart.d.ts.map +1 -1
  197. package/dist/types/core/agent/composeRequest.d.ts +2 -1
  198. package/dist/types/core/agent/composeRequest.d.ts.map +1 -1
  199. package/dist/types/core/agent/evidence/frames.d.ts.map +1 -1
  200. package/dist/types/core/agent/findings/admission.d.ts +27 -0
  201. package/dist/types/core/agent/findings/admission.d.ts.map +1 -0
  202. package/dist/types/core/agent/findings/answerAdmission.d.ts +14 -0
  203. package/dist/types/core/agent/findings/answerAdmission.d.ts.map +1 -0
  204. package/dist/types/core/agent/findings/context.d.ts +14 -0
  205. package/dist/types/core/agent/findings/context.d.ts.map +1 -0
  206. package/dist/types/core/agent/findings/instruction.d.ts +13 -0
  207. package/dist/types/core/agent/findings/instruction.d.ts.map +1 -0
  208. package/dist/types/core/agent/findings/ledger.d.ts +4 -1
  209. package/dist/types/core/agent/findings/ledger.d.ts.map +1 -1
  210. package/dist/types/core/agent/findings/offer.d.ts +9 -57
  211. package/dist/types/core/agent/findings/offer.d.ts.map +1 -1
  212. package/dist/types/core/agent/findings/peel.d.ts +6 -1
  213. package/dist/types/core/agent/findings/peel.d.ts.map +1 -1
  214. package/dist/types/core/agent/findings/refusal.d.ts +16 -0
  215. package/dist/types/core/agent/findings/refusal.d.ts.map +1 -0
  216. package/dist/types/core/agent/findings/reserved.d.ts +7 -31
  217. package/dist/types/core/agent/findings/reserved.d.ts.map +1 -1
  218. package/dist/types/core/agent/findings/serve.d.ts +2 -12
  219. package/dist/types/core/agent/findings/serve.d.ts.map +1 -1
  220. package/dist/types/core/agent/findings/ticket.d.ts +14 -0
  221. package/dist/types/core/agent/findings/ticket.d.ts.map +1 -0
  222. package/dist/types/core/agent/findings/types.d.ts +1 -1
  223. package/dist/types/core/agent/findings/types.d.ts.map +1 -1
  224. package/dist/types/core/agent/honesty/mounts.d.ts +2 -62
  225. package/dist/types/core/agent/honesty/mounts.d.ts.map +1 -1
  226. package/dist/types/core/agent/stages/callLLM.d.ts +1 -0
  227. package/dist/types/core/agent/stages/callLLM.d.ts.map +1 -1
  228. package/dist/types/core/agent/stages/reliabilityExecution.d.ts +2 -0
  229. package/dist/types/core/agent/stages/reliabilityExecution.d.ts.map +1 -1
  230. package/dist/types/core/agent/stages/route.d.ts +4 -1
  231. package/dist/types/core/agent/stages/route.d.ts.map +1 -1
  232. package/dist/types/core/agent/stages/seed.d.ts +1 -0
  233. package/dist/types/core/agent/stages/seed.d.ts.map +1 -1
  234. package/dist/types/core/agent/stages/toolCalls.d.ts +0 -51
  235. package/dist/types/core/agent/stages/toolCalls.d.ts.map +1 -1
  236. package/dist/types/core/agent/types.d.ts +12 -0
  237. package/dist/types/core/agent/types.d.ts.map +1 -1
  238. package/dist/types/core/runCheckpoint.d.ts.map +1 -1
  239. package/dist/types/core/slots/buildToolsSlot.d.ts +2 -10
  240. package/dist/types/core/slots/buildToolsSlot.d.ts.map +1 -1
  241. package/dist/types/hosting/standingAgent.d.ts.map +1 -1
  242. package/dist/types/lib/saidByPerson.d.ts +2 -0
  243. package/dist/types/lib/saidByPerson.d.ts.map +1 -1
  244. package/dist/types/provider-contract/requestObserver.d.ts +10 -0
  245. package/dist/types/provider-contract/requestObserver.d.ts.map +1 -0
  246. package/dist/types/provider-contract/types.d.ts +9 -0
  247. package/dist/types/provider-contract/types.d.ts.map +1 -1
  248. package/dist/types/redaction/conversation.d.ts.map +1 -1
  249. package/dist/types/redaction/knownStrings.d.ts.map +1 -1
  250. package/dist/types/resilience/withFallback.d.ts.map +1 -1
  251. package/dist/types/resilience/withRetry.d.ts.map +1 -1
  252. package/dist/types/time-travel/servedView.d.ts +1 -1
  253. package/dist/types/time-travel/servedView.d.ts.map +1 -1
  254. package/dist/types/trace-toolpack/causeCapture.d.ts +18 -0
  255. package/dist/types/trace-toolpack/causeCapture.d.ts.map +1 -0
  256. package/dist/types/trace-toolpack/causeControl.d.ts +7 -0
  257. package/dist/types/trace-toolpack/causeControl.d.ts.map +1 -0
  258. package/dist/types/trace-toolpack/causeReader.d.ts.map +1 -1
  259. package/dist/types/trace-toolpack/causeResponse.d.ts +3 -2
  260. package/dist/types/trace-toolpack/causeResponse.d.ts.map +1 -1
  261. package/dist/types/trace-toolpack/causeSnapshot.d.ts +6 -1
  262. package/dist/types/trace-toolpack/causeSnapshot.d.ts.map +1 -1
  263. package/package.json +3 -2
package/CAPABILITIES.md CHANGED
@@ -35,6 +35,7 @@ not in this table, search `src/index.ts` for the nearest noun before writing cod
35
35
  | replaying Anthropic thinking in its original content order; refusing known unsafe active-tool replay, observing each permitted completed-turn omission before sending, and retaining that decision across checkpoints | `LLMMessage.replay` + `UnsafeThinkingReplayError` + `LLMCallHooks.onReplayPrepared` + `agentfootprint.agent.thinking_omitted` | `src/adapters/llm/anthropicThinkingReplay.ts` | 10.1.0 |
36
36
  | keeping personal data out of an agent's saved records — snapshot, narrative, every event, recordings, bug reports, answer accounts, the exporters — while the model, the tools and the caller keep the real values; the library's own list of the names the conversation travels under (proven per feature), joined with the fields your tools name; it reaches compositions (members' policies adopted) and runs a tool starts (`ctx.redact`), and readers of the record say "kept out", never "not recorded" or "no tool ran" | `Agent.create({ redact })` (a footprintjs `RedactionPolicy`) + `conversationRedaction` + `ToolExecutionContext.redact` | `src/redaction/` | 9.140.0 |
37
37
  | prompt caching that keeps hitting behind `withRetry`, `withFallback` or your own provider wrapper — the cache strategy chosen from what the adapter DECLARES (explicit breakpoints / automatic / none), never from its name, plus a moving breakpoint on the conversation tail so each call reads back what the last one sent | `LLMProvider.promptCaching` (`PromptCaching`) + `cacheStrategyFor` + `BreakpointCacheStrategy` / `AutomaticCacheStrategy` / `NoOpCacheStrategy` | `src/cache/cacheStrategyFor.ts` | 9.138.0 |
38
+ | findings with stable tool contracts and immutable instructions, bounded late DATA outside cached history, unchanged citation admission, and call-scoped saved/resumed layout evidence | `.findings({ maxContextBytes })` + `findingsContext` + `servedAt` / `findings-layout` | `src/core/agent/findings/context.ts` | 10.10.0 |
38
39
  | Bedrock Converse prompt caching for exact verified models and geography profiles, field/TTL restrictions and four-checkpoint limit; cache read/write counts on both transports; model-aware capabilities through resilience decorators; one build warning and fixed run metadata when requested caching is unavailable; the meter accepts real engine events from `.watch()` | `bedrock` + `BedrockProvider` | `src/adapters/llm/BedrockProvider.ts` | 10.8.0 |
39
40
  | reading a static or model-aware prompt-cache capability before inspecting its mode, with unknown models failing closed | `promptCachingFor` | `src/cache/cacheStrategyFor.ts` | 10.8.0 |
40
41
  | asking a model to think in the shape THAT model takes — budget tokens on Claude 4.6 and earlier, adaptive on 4.7 and later (and on any id the table does not know), a build-time refusal for a model that cannot think; one table per wire, an adapter option for an id the table cannot read, forwarded by every wrapper, answered per side by `withFallback` | `.thinking({ budget })` + `LLMProvider.thinkingMode` + the adapters' `thinkingMode` option + `ThinkingMode` + `UnsupportedThinkingError` | `src/adapters/llm/anthropicModels.ts` | 9.141.0 |
@@ -95,6 +96,7 @@ not in this table, search `src/index.ts` for the nearest noun before writing cod
95
96
  | a value that must say how it knows itself — an unknown count that can never render as zero | `Claim<T>` (`known`/`unknown`/`notApplicable`) | `src/lib/claim/claim.ts` | 9.58.0 |
96
97
  | asking a debugging model "what did this run contradict itself about, and why?" — the Context Integrity findings, joined to the step that filed them | `find_context_errors` | `src/trace-toolpack/traceToolpack.ts` | 9.61.0 |
97
98
  | reading abnormal nodes, recorded dependency roots and downstream impact with bounded public Foottrace queries, scoped proof IDs and explicit unknown coverage; optional host-authorized storage graph, including inner tool and subflow questions | `attention_list` / `root_cause` / `impact` + `TraceToolpackArtifacts.cause` + `TraceToolpackOptions.cause` | `src/trace-toolpack/causeTools.ts` | 10.7.0 |
99
+ | admitting a completed native root-log capture for read-only cause tools without a custom graph; partial, legacy, child and resumed coverage stays uncertain with fixed reasons | `assessCapture` | `src/trace-toolpack/causeCapture.ts` | 10.10.0 |
98
100
  | the model inventing an id or a reading that no tool ever returned — a deterministic fabrication detector on the final answer, with a posture for how hard it pushes back | `.namesAndNumbersFromEvidence()` + `posture` (`'assist'` record+flag, the default / `'guard'` one revision then ship flagged / `'rails'` refuse instead) + `shapes` + `exempt` + `minDigits` (default 4) + `nudge` (default off) | `src/core/agent/evidence/` | 9.35.0 |
99
101
  | plain decimal readings honestly rounded at the written precision (opt-in; one carried number only, no new unitless arithmetic), and exactly-two numeric range endpoints checked after declared ID shapes; short bare endpoints retain minDigits | `AgentBuilder.namesAndNumbersFromEvidence` + `NamesAndNumbersOptions` + `EvidenceVerdict` + `ComputedFigure` | `src/core/agent/evidence/` | 10.8.0 |
100
102
  | counting a HUMAN-VERIFIED value as ground for the choice-seam check — the person clicked a row, the app verified the cells against the artifact, and the id the model takes from that selection is not fabricated; the source label travels onto the record | `externalGrounds` + `ExternalGround` + `external_ground_used` | `src/integrity/unsupported-argument/check.ts` | 9.72.0 |
@@ -139,6 +141,7 @@ not in this table, search `src/index.ts` for the nearest noun before writing cod
139
141
  | scoping a skill's tools so they reach the model only while it is active | `toolsFromActiveSkill` + a no-arg posture (default off) + the stamp `autoActivate: 'currentSkill'` (a default, never an override) | `src/core/agent/toolsFromActiveSkill.ts` | 9.36.0 |
140
142
  | subscribing to every event in one domain at once | `DomainWildcard` | `src/events/dispatcher.ts` | 9.4.0 |
141
143
  | pausing a run for a person and resuming it later | `checkInApproved` / `checkInDeclined` (`{ by, note?, value? }`; a decline is NOT an abort — the model gets a "declined by human" tool result and adapts in-loop) | `src/core/checkin.ts` | 7.5.0 |
144
+ | refusing unserved, ambiguous, malformed or known not-dispatched findings citations before host callbacks and tool execution, with request-local accepted-attempt evidence, bounded diagnostics and JSON-answer admission; no additional model call or cache-layout change | `captureFindingsRequest` + `findingsReferenceRefusal` (internal; enabled by `.findings()`) | `src/core/agent/findings/admission.ts` | 10.9.0 |
142
145
  | a SECOND source judging every tool result — a calibrated classifier asked what a result is worth for the declared proposition (never why the tool was called), its distribution and cost on the record beside the model's own standing, never merged, never served in its place (policy A) | `.findings({ judge })` + `Classifier` / `typesafe` / `mockClassifier` (`agentfootprint/classify`) + `JudgmentRow` / `JudgmentErrorRow` + `classifierScorer` (the scored entry choice, `agentfootprint/skill-graph`) | `src/classify/` | 9.104.0 |
143
146
  | a classifier's reading of WHICH TOOL beside every model call — the ranking, the pick and the cost on the record before the call, the model's call and the agreement after it; optionally the served list narrowed to the top-N plus the doors, on the committed record the receipt hashes and the served view rebuilds; a miss recorded and the full wire served next call, never a refusal, never an override | `.toolChoice({ classifier, serve, alwaysServe })` + `ToolChoiceRow` + `ToolChoiceOutcomeRow` + `ToolChoiceErrorRow` + `ALWAYS_SERVED_TOOLS` + `recordToolChoice` + `narrowServed` (events `agentfootprint.tool_choice.*`, bench `npm run bench:tool-choice`) | `src/core/agent/toolChoice/` | 9.105.0 |
144
147
  | a MAP of the domain the model can reason over when a result holds nothing — what each term IS (meaning, unit), how terms RELATE, which SOURCE holds a term (with the author's coverage sentence) and which registered TOOL reads it from there; declared once, validated against the tool registry at build, on the record as one run constant, served as one request-only system piece per call, never a fetch path and never inferred from | `defineOntology` + `.ontology(map)` (`AgentOptions.ontology`) + `AgentState.ontology` + `ontologyPiece` / `ONTOLOGY_INSTRUCTION` (`agentfootprint/ontology`) + `agentfootprint.ontology.served` | `src/ontology/` | 9.106.0 |
@@ -1,19 +1,4 @@
1
1
  "use strict";
2
- /**
3
- * Agent — ReAct primitive (LLM + tools + iteration loop).
4
- *
5
- * Pattern: Builder (GoF) → produces a Runner backed by a footprintjs FlowChart.
6
- * Role: Layer-5 primitive (core/). Assembles the 3-slot context
7
- * pipeline + callLLM + route decider + tool-calls subflow +
8
- * loopTo. Composition nestable anywhere that accepts a Runner.
9
- * Emits: Via internal recorders:
10
- * agentfootprint.agent.turn_start / turn_end
11
- * agentfootprint.agent.iteration_start / iteration_end
12
- * agentfootprint.agent.route_decided
13
- * agentfootprint.stream.llm_start / llm_end
14
- * agentfootprint.stream.tool_start / tool_end
15
- * agentfootprint.context.* (via ContextRecorder)
16
- */
17
2
  var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
18
3
  if (k2 === undefined) k2 = k;
19
4
  var desc = Object.getOwnPropertyDescriptor(m, k);
@@ -39,6 +24,22 @@ var __importStar = (this && this.__importStar) || function (mod) {
39
24
  };
40
25
  Object.defineProperty(exports, "__esModule", { value: true });
41
26
  exports.Agent = exports.AgentBuilder = void 0;
27
+ const context_js_1 = require("./agent/findings/context.js");
28
+ /**
29
+ * Agent — ReAct primitive (LLM + tools + iteration loop).
30
+ *
31
+ * Pattern: Builder (GoF) → produces a Runner backed by a footprintjs FlowChart.
32
+ * Role: Layer-5 primitive (core/). Assembles the 3-slot context
33
+ * pipeline + callLLM + route decider + tool-calls subflow +
34
+ * loopTo. Composition nestable anywhere that accepts a Runner.
35
+ * Emits: Via internal recorders:
36
+ * agentfootprint.agent.turn_start / turn_end
37
+ * agentfootprint.agent.iteration_start / iteration_end
38
+ * agentfootprint.agent.route_decided
39
+ * agentfootprint.stream.llm_start / llm_end
40
+ * agentfootprint.stream.tool_start / tool_end
41
+ * agentfootprint.context.* (via ContextRecorder)
42
+ */
42
43
  const footprintjs_1 = require("footprintjs");
43
44
  const types_js_1 = require("../reliability/types.js");
44
45
  const extractSequence_js_1 = require("../security/extractSequence.js");
@@ -867,7 +868,10 @@ class Agent extends RunnerBase_js_1.RunnerBase {
867
868
  if (opts.toolArgValidation !== undefined)
868
869
  this.toolArgValidation = opts.toolArgValidation;
869
870
  if (opts.findings !== undefined)
870
- this.findingsOptions = opts.findings;
871
+ this.findingsOptions = {
872
+ ...opts.findings,
873
+ maxContextBytes: (0, context_js_1.findingsContextBytes)(opts.findings.maxContextBytes),
874
+ };
871
875
  // The inputs layer's door (honesty layer 2): `true`, or `{ argumentSources }`
872
876
  // — either form mounts the layer; the object form may also arm declared
873
877
  // sources without the findings ledger.
@@ -1003,20 +1007,10 @@ class Agent extends RunnerBase_js_1.RunnerBase {
1003
1007
  if (opts.keepLedgerFacts !== undefined)
1004
1008
  requireKeepLedgerFacts(opts.keepLedgerFacts, 'Agent');
1005
1009
  if (this.findingsOptions !== undefined) {
1006
- // The ledger needs the tools slot recomposed every call: from the second
1007
- // call on, the served `_findings` property binds the ids the model may
1008
- // name (`findings/offer.ts · offeredResultIds`, bound at the Tools
1009
- // mount) — and on a hosted model that binding is what makes a standing
1010
- // resolve at all (docs/design/2026-09-findings-ledger-real-model.md).
1011
- // `reactMode: 'classic'` selects the Tools branch on turn 1 only, so an
1012
- // armed classic agent would serve the offer-less base on every call and
1013
- // file every standing as `unknownId`. Refused loud, here at build, the
1014
- // `AgentBuilder.selfExplain` twin — never a silent degrade.
1010
+ // Keep the supported findings execution modes explicit. This change
1011
+ // restores prefix caching; it does not add findings support to classic.
1015
1012
  if (this.reactMode === 'classic') {
1016
- throw new Error("Agent: .findings() requires per-iteration slot recomposition — reactMode 'classic' " +
1017
- 'caches the tools slot on turn 1, so the ids the model may name (bound into every ' +
1018
- 'served tool schema from the second call on) would never reach it and every standing ' +
1019
- "would file as unknownId. Use the default 'dynamic' mode (or 'dynamic-grouped').");
1013
+ throw new Error("Agent: .findings() is supported in 'dynamic' and 'dynamic-grouped' modes only; reactMode 'classic' is not supported.");
1020
1014
  }
1021
1015
  this.keepLedgerFacts = resolveKeepLedgerFacts(this.findingsOptions.keepLedgerFacts ?? opts.keepLedgerFacts);
1022
1016
  }
@@ -3937,7 +3931,7 @@ class Agent extends RunnerBase_js_1.RunnerBase {
3937
3931
  // Message-boundary refusal (7.18+) — a `messageMiddleware` returned
3938
3932
  // `deny`; a refusal must never be mistaken for an answer: at 'input' no
3939
3933
  // model was asked, and at 'output' the middleware declined to release it.
3940
- if (this.messageMiddleware.length > 0) {
3934
+ if (this.messageMiddleware.length > 0 || this.findingsOptions !== undefined) {
3941
3935
  const denied = state;
3942
3936
  if (denied.messageDeniedReason !== undefined) {
3943
3937
  return {
@@ -4204,6 +4198,7 @@ class Agent extends RunnerBase_js_1.RunnerBase {
4204
4198
  ...(this.findingsOptions !== undefined && {
4205
4199
  findings: true,
4206
4200
  findingsServe: this.findingsOptions.serve ?? 'ledger-and-facts',
4201
+ findingsContextBytes: this.findingsOptions.maxContextBytes,
4207
4202
  // The answer-turn ask (9.103.0): VALUE-conditional inside the arm —
4208
4203
  // the default `'none'` threads nothing and writes no key.
4209
4204
  ...(this.findingsOptions.answerAsk === 'quote-facts' && {
@@ -4706,6 +4701,7 @@ class Agent extends RunnerBase_js_1.RunnerBase {
4706
4701
  findings: true,
4707
4702
  hasFindingsLedger: true,
4708
4703
  findingsServe: this.findingsOptions.serve ?? 'ledger-and-facts',
4704
+ findingsContextBytes: this.findingsOptions.maxContextBytes,
4709
4705
  // The answer-turn ask (9.103.0): the same value seed records, so the
4710
4706
  // wire and the rebuild append it from one fact; absent on `'none'`.
4711
4707
  ...(this.findingsOptions.answerAsk === 'quote-facts' && {
@@ -5220,6 +5216,7 @@ class Agent extends RunnerBase_js_1.RunnerBase {
5220
5216
  // the chain's rewrites (a rewritten fill is not what the call ran with).
5221
5217
  ...(inputsArmed && {
5222
5218
  inputsLayer: {
5219
+ ...(this.findingsOptions !== undefined && { findings: true }),
5223
5220
  toolOf: (toolName) => resolveForLayer(toolName).tool,
5224
5221
  ...(this.toolMiddleware.length > 0 && { rewrites: true }),
5225
5222
  // The time layer (step T5a): a tool whose period declares forms is filled from the