agentfootprint 13.0.0 → 14.0.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 (2280) hide show
  1. package/AGENTS.md +1 -1
  2. package/CAPABILITIES.md +2 -2
  3. package/README.md +7 -3
  4. package/ai-instructions/claude-code/SKILL.md +1 -1
  5. package/ai-instructions/setup.sh +0 -0
  6. package/bin/agentfootprint-index.mjs +0 -0
  7. package/bin/agentfootprint-lint-tools.mjs +0 -0
  8. package/dist/adapters/observability/auditShapes.js +9 -31
  9. package/dist/adapters/observability/auditShapes.js.map +1 -1
  10. package/dist/bridge/eventMeta.js +1 -1
  11. package/dist/bridge/eventMeta.js.map +1 -1
  12. package/dist/context-bisect/ablation.js +1 -1
  13. package/dist/context-bisect/ablation.js.map +1 -1
  14. package/dist/context-bisect/arms/probe.js +1 -1
  15. package/dist/context-bisect/arms/probe.js.map +1 -1
  16. package/dist/context-bisect/restoration.js +1 -1
  17. package/dist/context-bisect/restoration.js.map +1 -1
  18. package/dist/core/Agent.js +799 -1144
  19. package/dist/core/Agent.js.map +1 -1
  20. package/dist/core/LLMCall.js +47 -86
  21. package/dist/core/LLMCall.js.map +1 -1
  22. package/dist/core/RunnerBase.js +139 -213
  23. package/dist/core/RunnerBase.js.map +1 -1
  24. package/dist/core/agent/arguments/answerRows.js +85 -0
  25. package/dist/core/agent/arguments/answerRows.js.map +1 -0
  26. package/dist/core/agent/arguments/ask.js +28 -91
  27. package/dist/core/agent/arguments/ask.js.map +1 -1
  28. package/dist/core/agent/arguments/dispatch.js +26 -9
  29. package/dist/core/agent/arguments/dispatch.js.map +1 -1
  30. package/dist/core/agent/arguments/kept.js +1 -1
  31. package/dist/core/agent/arguments/partialWindow.js +1 -1
  32. package/dist/core/agent/arguments/partialWindow.js.map +1 -1
  33. package/dist/core/agent/arguments/pendingPrivateAsk.js +123 -0
  34. package/dist/core/agent/arguments/pendingPrivateAsk.js.map +1 -0
  35. package/dist/core/agent/arguments/privateAnswers.js +213 -0
  36. package/dist/core/agent/arguments/privateAnswers.js.map +1 -0
  37. package/dist/core/agent/arguments/resolutionRows.js +175 -0
  38. package/dist/core/agent/arguments/resolutionRows.js.map +1 -0
  39. package/dist/core/agent/arguments/resolve.js +8 -144
  40. package/dist/core/agent/arguments/resolve.js.map +1 -1
  41. package/dist/core/agent/arguments/serve.js +3 -13
  42. package/dist/core/agent/arguments/serve.js.map +1 -1
  43. package/dist/core/agent/arguments/subflow.js +7 -1
  44. package/dist/core/agent/arguments/subflow.js.map +1 -1
  45. package/dist/core/agent/buildAgentChart.js.map +1 -1
  46. package/dist/core/agent/buildToolRegistry.js +1 -1
  47. package/dist/core/agent/callerIdentity.js +21 -106
  48. package/dist/core/agent/callerIdentity.js.map +1 -1
  49. package/dist/core/agent/chartContract.js +4 -0
  50. package/dist/core/agent/chartContract.js.map +1 -0
  51. package/dist/core/agent/checkpointDomain.js +59 -0
  52. package/dist/core/agent/checkpointDomain.js.map +1 -0
  53. package/dist/core/agent/componentObservers.js +134 -0
  54. package/dist/core/agent/componentObservers.js.map +1 -0
  55. package/dist/core/agent/componentResources.js +114 -0
  56. package/dist/core/agent/componentResources.js.map +1 -0
  57. package/dist/core/agent/evidence/evidenceIndex.js +1 -1
  58. package/dist/core/agent/evidence/evidenceIndex.js.map +1 -1
  59. package/dist/core/agent/evidence/frames.js +2 -1
  60. package/dist/core/agent/evidence/frames.js.map +1 -1
  61. package/dist/core/agent/evidence/servedJson.js +1 -1
  62. package/dist/core/agent/findings/contingent.js +1 -1
  63. package/dist/core/agent/findings/judge.js +1 -1
  64. package/dist/core/agent/findings/unsettled.js +3 -3
  65. package/dist/core/agent/honesty/inputsMountContract.js +3 -0
  66. package/dist/core/agent/honesty/inputsMountContract.js.map +1 -0
  67. package/dist/core/agent/honesty/mounts.js +42 -30
  68. package/dist/core/agent/honesty/mounts.js.map +1 -1
  69. package/dist/core/agent/hostTurn.js +40 -0
  70. package/dist/core/agent/hostTurn.js.map +1 -0
  71. package/dist/core/agent/pauseOwnership.js +105 -0
  72. package/dist/core/agent/pauseOwnership.js.map +1 -0
  73. package/dist/core/agent/presentTool.js +1 -1
  74. package/dist/core/agent/resultCeiling.js +1 -1
  75. package/dist/core/agent/resumeAnswer.js +49 -0
  76. package/dist/core/agent/resumeAnswer.js.map +1 -0
  77. package/dist/core/agent/resumeCheckpoint.js +40 -0
  78. package/dist/core/agent/resumeCheckpoint.js.map +1 -0
  79. package/dist/core/agent/resumeError.js +15 -0
  80. package/dist/core/agent/resumeError.js.map +1 -0
  81. package/dist/core/agent/run/clocks.js +88 -0
  82. package/dist/core/agent/run/clocks.js.map +1 -0
  83. package/dist/core/agent/run/commitRunRedaction.js +16 -0
  84. package/dist/core/agent/run/commitRunRedaction.js.map +1 -0
  85. package/dist/core/agent/run/eventStageIds.js +44 -0
  86. package/dist/core/agent/run/eventStageIds.js.map +1 -0
  87. package/dist/core/agent/run/injectionDelivery.js +30 -0
  88. package/dist/core/agent/run/injectionDelivery.js.map +1 -0
  89. package/dist/core/agent/run/ledgerFacts.js +36 -0
  90. package/dist/core/agent/run/ledgerFacts.js.map +1 -0
  91. package/dist/core/agent/run/resumeRedaction.js +41 -0
  92. package/dist/core/agent/run/resumeRedaction.js.map +1 -0
  93. package/dist/core/agent/run/withoutTime.js +17 -0
  94. package/dist/core/agent/run/withoutTime.js.map +1 -0
  95. package/dist/core/agent/runValues.js +18 -0
  96. package/dist/core/agent/runValues.js.map +1 -0
  97. package/dist/core/agent/scripts/rows.js +1 -1
  98. package/dist/core/agent/selfCallNotice.js +1 -1
  99. package/dist/core/agent/selfCallNotice.js.map +1 -1
  100. package/dist/core/agent/stages/argumentAsk.js +39 -10
  101. package/dist/core/agent/stages/argumentAsk.js.map +1 -1
  102. package/dist/core/agent/stages/argumentParties.js +54 -0
  103. package/dist/core/agent/stages/argumentParties.js.map +1 -0
  104. package/dist/core/agent/stages/batchParties.js +88 -0
  105. package/dist/core/agent/stages/batchParties.js.map +1 -0
  106. package/dist/core/agent/stages/callLLM.js +3 -3
  107. package/dist/core/agent/stages/callLLM.js.map +1 -1
  108. package/dist/core/agent/stages/finalStageContract.js +4 -0
  109. package/dist/core/agent/stages/finalStageContract.js.map +1 -0
  110. package/dist/core/agent/stages/prepareFinal.js +10 -1
  111. package/dist/core/agent/stages/prepareFinal.js.map +1 -1
  112. package/dist/core/agent/stages/searchCoverage.js +1 -1
  113. package/dist/core/agent/stages/seed.js +16 -32
  114. package/dist/core/agent/stages/seed.js.map +1 -1
  115. package/dist/core/agent/stages/servedParties.js +220 -0
  116. package/dist/core/agent/stages/servedParties.js.map +1 -0
  117. package/dist/core/agent/stages/timeLayer.js +2 -2
  118. package/dist/core/agent/stages/toolCallShape.js +22 -0
  119. package/dist/core/agent/stages/toolCallShape.js.map +1 -0
  120. package/dist/core/agent/stages/toolCalls/access/argumentGate.js +48 -0
  121. package/dist/core/agent/stages/toolCalls/access/argumentGate.js.map +1 -0
  122. package/dist/core/agent/stages/toolCalls/access/argumentValidation.js +33 -0
  123. package/dist/core/agent/stages/toolCalls/access/argumentValidation.js.map +1 -0
  124. package/dist/core/agent/stages/toolCalls/access/bindings.js +98 -0
  125. package/dist/core/agent/stages/toolCalls/access/bindings.js.map +1 -0
  126. package/dist/core/agent/stages/toolCalls/access/callState.js +79 -0
  127. package/dist/core/agent/stages/toolCalls/access/callState.js.map +1 -0
  128. package/dist/core/agent/stages/toolCalls/access/capabilityQuestion.js +81 -0
  129. package/dist/core/agent/stages/toolCalls/access/capabilityQuestion.js.map +1 -0
  130. package/dist/core/agent/stages/toolCalls/access/checkInAdmission.js +144 -0
  131. package/dist/core/agent/stages/toolCalls/access/checkInAdmission.js.map +1 -0
  132. package/dist/core/agent/stages/toolCalls/access/heldAnswer.js +39 -0
  133. package/dist/core/agent/stages/toolCalls/access/heldAnswer.js.map +1 -0
  134. package/dist/core/agent/stages/toolCalls/access/middlewareAdmission.js +141 -0
  135. package/dist/core/agent/stages/toolCalls/access/middlewareAdmission.js.map +1 -0
  136. package/dist/core/agent/stages/toolCalls/access/toolPermission.js +103 -0
  137. package/dist/core/agent/stages/toolCalls/access/toolPermission.js.map +1 -0
  138. package/dist/core/agent/stages/toolCalls/batch/completion.js +28 -0
  139. package/dist/core/agent/stages/toolCalls/batch/completion.js.map +1 -0
  140. package/dist/core/agent/stages/toolCalls/batch/dispatchContext.js +137 -0
  141. package/dist/core/agent/stages/toolCalls/batch/dispatchContext.js.map +1 -0
  142. package/dist/core/agent/stages/toolCalls/batch/execute.js +181 -0
  143. package/dist/core/agent/stages/toolCalls/batch/execute.js.map +1 -0
  144. package/dist/core/agent/stages/toolCalls/batch/findingsAdmission.js +52 -0
  145. package/dist/core/agent/stages/toolCalls/batch/findingsAdmission.js.map +1 -0
  146. package/dist/core/agent/stages/toolCalls/batch/inputResolutions.js +22 -0
  147. package/dist/core/agent/stages/toolCalls/batch/inputResolutions.js.map +1 -0
  148. package/dist/core/agent/stages/toolCalls/batch/paused.js +93 -0
  149. package/dist/core/agent/stages/toolCalls/batch/paused.js.map +1 -0
  150. package/dist/core/agent/stages/toolCalls/batch/refusal.js +36 -0
  151. package/dist/core/agent/stages/toolCalls/batch/refusal.js.map +1 -0
  152. package/dist/core/agent/stages/toolCalls/batch/settle.js +69 -0
  153. package/dist/core/agent/stages/toolCalls/batch/settle.js.map +1 -0
  154. package/dist/core/agent/stages/toolCalls/batch/settlementOperations.js +107 -0
  155. package/dist/core/agent/stages/toolCalls/batch/settlementOperations.js.map +1 -0
  156. package/dist/core/agent/stages/toolCalls/compose.js +353 -0
  157. package/dist/core/agent/stages/toolCalls/compose.js.map +1 -0
  158. package/dist/core/agent/stages/toolCalls/contracts/access.js +3 -0
  159. package/dist/core/agent/stages/toolCalls/contracts/access.js.map +1 -0
  160. package/dist/core/agent/stages/toolCalls/contracts/artifacts.js +3 -0
  161. package/dist/core/agent/stages/toolCalls/contracts/artifacts.js.map +1 -0
  162. package/dist/core/agent/stages/toolCalls/contracts/batchCall.js +3 -0
  163. package/dist/core/agent/stages/toolCalls/contracts/batchCall.js.map +1 -0
  164. package/dist/core/agent/stages/toolCalls/contracts/callCells.js +3 -0
  165. package/dist/core/agent/stages/toolCalls/contracts/callCells.js.map +1 -0
  166. package/dist/core/agent/stages/toolCalls/contracts/callFacts.js +3 -0
  167. package/dist/core/agent/stages/toolCalls/contracts/callFacts.js.map +1 -0
  168. package/dist/core/agent/stages/toolCalls/contracts/catalog.js +3 -0
  169. package/dist/core/agent/stages/toolCalls/contracts/catalog.js.map +1 -0
  170. package/dist/core/agent/stages/toolCalls/contracts/dispatchBatch.js +3 -0
  171. package/dist/core/agent/stages/toolCalls/contracts/dispatchBatch.js.map +1 -0
  172. package/dist/core/agent/stages/toolCalls/contracts/dispatchCall.js +3 -0
  173. package/dist/core/agent/stages/toolCalls/contracts/dispatchCall.js.map +1 -0
  174. package/dist/core/agent/stages/toolCalls/contracts/evidence.js +3 -0
  175. package/dist/core/agent/stages/toolCalls/contracts/evidence.js.map +1 -0
  176. package/dist/core/agent/stages/toolCalls/contracts/handlerDeps.js +3 -0
  177. package/dist/core/agent/stages/toolCalls/contracts/handlerDeps.js.map +1 -0
  178. package/dist/core/agent/stages/toolCalls/contracts/inputsDispatch.js +10 -0
  179. package/dist/core/agent/stages/toolCalls/contracts/inputsDispatch.js.map +1 -0
  180. package/dist/core/agent/stages/toolCalls/contracts/invocationInputs.js +3 -0
  181. package/dist/core/agent/stages/toolCalls/contracts/invocationInputs.js.map +1 -0
  182. package/dist/core/agent/stages/toolCalls/contracts/observation.js +3 -0
  183. package/dist/core/agent/stages/toolCalls/contracts/observation.js.map +1 -0
  184. package/dist/core/agent/stages/toolCalls/contracts/operations/artifacts.js +3 -0
  185. package/dist/core/agent/stages/toolCalls/contracts/operations/artifacts.js.map +1 -0
  186. package/dist/core/agent/stages/toolCalls/contracts/operations/catalog.js +3 -0
  187. package/dist/core/agent/stages/toolCalls/contracts/operations/catalog.js.map +1 -0
  188. package/dist/core/agent/stages/toolCalls/contracts/operations/context.js +3 -0
  189. package/dist/core/agent/stages/toolCalls/contracts/operations/context.js.map +1 -0
  190. package/dist/core/agent/stages/toolCalls/contracts/operations/coverage.js +3 -0
  191. package/dist/core/agent/stages/toolCalls/contracts/operations/coverage.js.map +1 -0
  192. package/dist/core/agent/stages/toolCalls/contracts/operations/credentials.js +3 -0
  193. package/dist/core/agent/stages/toolCalls/contracts/operations/credentials.js.map +1 -0
  194. package/dist/core/agent/stages/toolCalls/contracts/operations/effects.js +3 -0
  195. package/dist/core/agent/stages/toolCalls/contracts/operations/effects.js.map +1 -0
  196. package/dist/core/agent/stages/toolCalls/contracts/operations/integrity.js +3 -0
  197. package/dist/core/agent/stages/toolCalls/contracts/operations/integrity.js.map +1 -0
  198. package/dist/core/agent/stages/toolCalls/contracts/operations/limits.js +3 -0
  199. package/dist/core/agent/stages/toolCalls/contracts/operations/limits.js.map +1 -0
  200. package/dist/core/agent/stages/toolCalls/contracts/operations/middleware.js +3 -0
  201. package/dist/core/agent/stages/toolCalls/contracts/operations/middleware.js.map +1 -0
  202. package/dist/core/agent/stages/toolCalls/contracts/operations/observations.js +3 -0
  203. package/dist/core/agent/stages/toolCalls/contracts/operations/observations.js.map +1 -0
  204. package/dist/core/agent/stages/toolCalls/contracts/operations/progress.js +3 -0
  205. package/dist/core/agent/stages/toolCalls/contracts/operations/progress.js.map +1 -0
  206. package/dist/core/agent/stages/toolCalls/contracts/operations/resources.js +3 -0
  207. package/dist/core/agent/stages/toolCalls/contracts/operations/resources.js.map +1 -0
  208. package/dist/core/agent/stages/toolCalls/contracts/operations/resumedInvocation.js +3 -0
  209. package/dist/core/agent/stages/toolCalls/contracts/operations/resumedInvocation.js.map +1 -0
  210. package/dist/core/agent/stages/toolCalls/contracts/operations/scripts.js +3 -0
  211. package/dist/core/agent/stages/toolCalls/contracts/operations/scripts.js.map +1 -0
  212. package/dist/core/agent/stages/toolCalls/contracts/operations/semantics.js +3 -0
  213. package/dist/core/agent/stages/toolCalls/contracts/operations/semantics.js.map +1 -0
  214. package/dist/core/agent/stages/toolCalls/contracts/operations/settlement.js +3 -0
  215. package/dist/core/agent/stages/toolCalls/contracts/operations/settlement.js.map +1 -0
  216. package/dist/core/agent/stages/toolCalls/contracts/operations/steps.js +3 -0
  217. package/dist/core/agent/stages/toolCalls/contracts/operations/steps.js.map +1 -0
  218. package/dist/core/agent/stages/toolCalls/contracts/resources.js +3 -0
  219. package/dist/core/agent/stages/toolCalls/contracts/resources.js.map +1 -0
  220. package/dist/core/agent/stages/toolCalls/contracts/results.js +3 -0
  221. package/dist/core/agent/stages/toolCalls/contracts/results.js.map +1 -0
  222. package/dist/core/agent/stages/toolCalls/contracts/resumeFrames.js +3 -0
  223. package/dist/core/agent/stages/toolCalls/contracts/resumeFrames.js.map +1 -0
  224. package/dist/core/agent/stages/toolCalls/contracts/routing.js +3 -0
  225. package/dist/core/agent/stages/toolCalls/contracts/routing.js.map +1 -0
  226. package/dist/core/agent/stages/toolCalls/decorators/limitsOperations.js +84 -0
  227. package/dist/core/agent/stages/toolCalls/decorators/limitsOperations.js.map +1 -0
  228. package/dist/core/agent/stages/toolCalls/decorators/middlewareOperations.js +87 -0
  229. package/dist/core/agent/stages/toolCalls/decorators/middlewareOperations.js.map +1 -0
  230. package/dist/core/agent/stages/toolCalls/decorators/reportingCredentials.js +53 -0
  231. package/dist/core/agent/stages/toolCalls/decorators/reportingCredentials.js.map +1 -0
  232. package/dist/core/agent/stages/toolCalls/evidence/coverageOperations.js +236 -0
  233. package/dist/core/agent/stages/toolCalls/evidence/coverageOperations.js.map +1 -0
  234. package/dist/core/agent/stages/toolCalls/evidence/integrityOperations.js +141 -0
  235. package/dist/core/agent/stages/toolCalls/evidence/integrityOperations.js.map +1 -0
  236. package/dist/core/agent/stages/toolCalls/evidence/judgeLanded.js +59 -0
  237. package/dist/core/agent/stages/toolCalls/evidence/judgeLanded.js.map +1 -0
  238. package/dist/core/agent/stages/toolCalls/evidence/madeInRun.js +7 -0
  239. package/dist/core/agent/stages/toolCalls/evidence/madeInRun.js.map +1 -0
  240. package/dist/core/agent/stages/toolCalls/evidence/producerCorpus.js +38 -0
  241. package/dist/core/agent/stages/toolCalls/evidence/producerCorpus.js.map +1 -0
  242. package/dist/core/agent/stages/toolCalls/evidence/scriptsOperations.js +160 -0
  243. package/dist/core/agent/stages/toolCalls/evidence/scriptsOperations.js.map +1 -0
  244. package/dist/core/agent/stages/toolCalls/evidence/semanticsOperations.js +94 -0
  245. package/dist/core/agent/stages/toolCalls/evidence/semanticsOperations.js.map +1 -0
  246. package/dist/core/agent/stages/toolCalls/evidence/sourceClock.js +22 -0
  247. package/dist/core/agent/stages/toolCalls/evidence/sourceClock.js.map +1 -0
  248. package/dist/core/agent/stages/toolCalls/evidence/towers.js +42 -0
  249. package/dist/core/agent/stages/toolCalls/evidence/towers.js.map +1 -0
  250. package/dist/core/agent/stages/toolCalls/execution/artifactsOperations.js +265 -0
  251. package/dist/core/agent/stages/toolCalls/execution/artifactsOperations.js.map +1 -0
  252. package/dist/core/agent/stages/toolCalls/execution/callStart.js +107 -0
  253. package/dist/core/agent/stages/toolCalls/execution/callStart.js.map +1 -0
  254. package/dist/core/agent/stages/toolCalls/execution/catalogOperations.js +200 -0
  255. package/dist/core/agent/stages/toolCalls/execution/catalogOperations.js.map +1 -0
  256. package/dist/core/agent/stages/toolCalls/execution/contextOperations.js +190 -0
  257. package/dist/core/agent/stages/toolCalls/execution/contextOperations.js.map +1 -0
  258. package/dist/core/agent/stages/toolCalls/execution/credentialAdmission.js +128 -0
  259. package/dist/core/agent/stages/toolCalls/execution/credentialAdmission.js.map +1 -0
  260. package/dist/core/agent/stages/toolCalls/execution/credentialsOperations.js +15 -0
  261. package/dist/core/agent/stages/toolCalls/execution/credentialsOperations.js.map +1 -0
  262. package/dist/core/agent/stages/toolCalls/execution/deliveredResult.js +172 -0
  263. package/dist/core/agent/stages/toolCalls/execution/deliveredResult.js.map +1 -0
  264. package/dist/core/agent/stages/toolCalls/execution/dispatchCall.js +515 -0
  265. package/dist/core/agent/stages/toolCalls/execution/dispatchCall.js.map +1 -0
  266. package/dist/core/agent/stages/toolCalls/execution/initialInvocation.js +368 -0
  267. package/dist/core/agent/stages/toolCalls/execution/initialInvocation.js.map +1 -0
  268. package/dist/core/agent/stages/toolCalls/execution/resourcesOperations.js +90 -0
  269. package/dist/core/agent/stages/toolCalls/execution/resourcesOperations.js.map +1 -0
  270. package/dist/core/agent/stages/toolCalls/execution/resumedInvocation.js +429 -0
  271. package/dist/core/agent/stages/toolCalls/execution/resumedInvocation.js.map +1 -0
  272. package/dist/core/agent/stages/toolCalls/execution/wantedArguments.js +18 -0
  273. package/dist/core/agent/stages/toolCalls/execution/wantedArguments.js.map +1 -0
  274. package/dist/core/agent/stages/toolCalls/helpers/dedupeIds.js +10 -0
  275. package/dist/core/agent/stages/toolCalls/helpers/dedupeIds.js.map +1 -0
  276. package/dist/core/agent/stages/toolCalls/helpers/dispatchRefusals.js +83 -0
  277. package/dist/core/agent/stages/toolCalls/helpers/dispatchRefusals.js.map +1 -0
  278. package/dist/core/agent/stages/toolCalls/helpers/mountedCursor.js +46 -0
  279. package/dist/core/agent/stages/toolCalls/helpers/mountedCursor.js.map +1 -0
  280. package/dist/core/agent/stages/toolCalls/helpers/periodWarnings.js +60 -0
  281. package/dist/core/agent/stages/toolCalls/helpers/periodWarnings.js.map +1 -0
  282. package/dist/core/agent/stages/toolCalls/helpers/readSkillRefusal.js +141 -0
  283. package/dist/core/agent/stages/toolCalls/helpers/readSkillRefusal.js.map +1 -0
  284. package/dist/core/agent/stages/toolCalls/helpers/sourceNote.js +10 -0
  285. package/dist/core/agent/stages/toolCalls/helpers/sourceNote.js.map +1 -0
  286. package/dist/core/agent/stages/toolCalls/helpers/unscopedRun.js +15 -0
  287. package/dist/core/agent/stages/toolCalls/helpers/unscopedRun.js.map +1 -0
  288. package/dist/core/agent/stages/toolCalls/index.js +33 -0
  289. package/dist/core/agent/stages/toolCalls/index.js.map +1 -0
  290. package/dist/core/agent/stages/toolCalls/observation/callSettlement.js +48 -0
  291. package/dist/core/agent/stages/toolCalls/observation/callSettlement.js.map +1 -0
  292. package/dist/core/agent/stages/toolCalls/observation/observationsOperations.js +61 -0
  293. package/dist/core/agent/stages/toolCalls/observation/observationsOperations.js.map +1 -0
  294. package/dist/core/agent/stages/toolCalls/observation/progressOperations.js +32 -0
  295. package/dist/core/agent/stages/toolCalls/observation/progressOperations.js.map +1 -0
  296. package/dist/core/agent/stages/toolCalls/resume/ask.js +427 -0
  297. package/dist/core/agent/stages/toolCalls/resume/ask.js.map +1 -0
  298. package/dist/core/agent/stages/toolCalls/resume/checkIn.js +193 -0
  299. package/dist/core/agent/stages/toolCalls/resume/checkIn.js.map +1 -0
  300. package/dist/core/agent/stages/toolCalls/resume/credential.js +139 -0
  301. package/dist/core/agent/stages/toolCalls/resume/credential.js.map +1 -0
  302. package/dist/core/agent/stages/toolCalls/resume/handler.js +175 -0
  303. package/dist/core/agent/stages/toolCalls/resume/handler.js.map +1 -0
  304. package/dist/core/agent/stages/toolCalls/resume/plain.js +144 -0
  305. package/dist/core/agent/stages/toolCalls/resume/plain.js.map +1 -0
  306. package/dist/core/agent/stages/toolCalls/routing/effectsOperations.js +264 -0
  307. package/dist/core/agent/stages/toolCalls/routing/effectsOperations.js.map +1 -0
  308. package/dist/core/agent/stages/toolCalls/routing/policyHalt.js +40 -0
  309. package/dist/core/agent/stages/toolCalls/routing/policyHalt.js.map +1 -0
  310. package/dist/core/agent/stages/toolCalls/routing/readSkillRoute.js +238 -0
  311. package/dist/core/agent/stages/toolCalls/routing/readSkillRoute.js.map +1 -0
  312. package/dist/core/agent/stages/toolCalls/routing/skillActivation.js +52 -0
  313. package/dist/core/agent/stages/toolCalls/routing/skillActivation.js.map +1 -0
  314. package/dist/core/agent/stages/toolCalls/routing/stepsOperations.js +149 -0
  315. package/dist/core/agent/stages/toolCalls/routing/stepsOperations.js.map +1 -0
  316. package/dist/core/agent/stages/toolResolver.js +84 -38
  317. package/dist/core/agent/stages/toolResolver.js.map +1 -1
  318. package/dist/core/agent/toolChoice/pick.js +1 -1
  319. package/dist/core/agent/toolResultCap.js +0 -0
  320. package/dist/core/agent/types.js +0 -3
  321. package/dist/core/agent/types.js.map +1 -1
  322. package/dist/core/agent/window/toolNames.js +3 -3
  323. package/dist/core/answerConsumption.js +16 -0
  324. package/dist/core/answerConsumption.js.map +1 -0
  325. package/dist/core/checkin.js +1 -1
  326. package/dist/core/codeRunnerTool.js +1 -1
  327. package/dist/core/consentLedger.js +124 -0
  328. package/dist/core/consentLedger.js.map +1 -0
  329. package/dist/core/consentRequest.js +38 -156
  330. package/dist/core/consentRequest.js.map +1 -1
  331. package/dist/core/conversation.js +15 -48
  332. package/dist/core/conversation.js.map +1 -1
  333. package/dist/core/memberRun.js +2 -1
  334. package/dist/core/memberRun.js.map +1 -1
  335. package/dist/core/pause.js +5 -5
  336. package/dist/core/pauseRecord.js +23 -0
  337. package/dist/core/pauseRecord.js.map +1 -0
  338. package/dist/core/runEntry.js +30 -0
  339. package/dist/core/runEntry.js.map +1 -0
  340. package/dist/core/runnerCoreValues.js +3 -0
  341. package/dist/core/runnerCoreValues.js.map +1 -0
  342. package/dist/core/runnerExecution.js +175 -0
  343. package/dist/core/runnerExecution.js.map +1 -0
  344. package/dist/core/runnerLive.js.map +1 -1
  345. package/dist/core/slots/buildThinkingSubflow.js +2 -2
  346. package/dist/core/slots/buildThinkingSubflow.js.map +1 -1
  347. package/dist/core/slots/buildToolsSlot.js +25 -102
  348. package/dist/core/slots/buildToolsSlot.js.map +1 -1
  349. package/dist/core/slots/discoverTools.js +99 -0
  350. package/dist/core/slots/discoverTools.js.map +1 -0
  351. package/dist/core-flow/Conditional.js +25 -72
  352. package/dist/core-flow/Conditional.js.map +1 -1
  353. package/dist/core-flow/Graph.js +63 -120
  354. package/dist/core-flow/Graph.js.map +1 -1
  355. package/dist/core-flow/Loop.js +28 -82
  356. package/dist/core-flow/Loop.js.map +1 -1
  357. package/dist/core-flow/Parallel.js +58 -148
  358. package/dist/core-flow/Parallel.js.map +1 -1
  359. package/dist/core-flow/Sequence.js +25 -73
  360. package/dist/core-flow/Sequence.js.map +1 -1
  361. package/dist/core-flow/Workflow.js +24 -72
  362. package/dist/core-flow/Workflow.js.map +1 -1
  363. package/dist/esm/adapters/observability/auditShapes.d.ts +5 -31
  364. package/dist/esm/adapters/observability/auditShapes.js +9 -31
  365. package/dist/esm/adapters/observability/auditShapes.js.map +1 -1
  366. package/dist/esm/adapters/observability/otel.d.ts +1 -1
  367. package/dist/esm/bridge/eventMeta.d.ts +2 -0
  368. package/dist/esm/bridge/eventMeta.js +1 -1
  369. package/dist/esm/bridge/eventMeta.js.map +1 -1
  370. package/dist/esm/context-bisect/ablation.js +1 -1
  371. package/dist/esm/context-bisect/ablation.js.map +1 -1
  372. package/dist/esm/context-bisect/arms/probe.js +1 -1
  373. package/dist/esm/context-bisect/arms/probe.js.map +1 -1
  374. package/dist/esm/context-bisect/restoration.js +1 -1
  375. package/dist/esm/context-bisect/restoration.js.map +1 -1
  376. package/dist/esm/core/Agent.d.ts +18 -121
  377. package/dist/esm/core/Agent.js +800 -1145
  378. package/dist/esm/core/Agent.js.map +1 -1
  379. package/dist/esm/core/LLMCall.d.ts +1 -4
  380. package/dist/esm/core/LLMCall.js +49 -88
  381. package/dist/esm/core/LLMCall.js.map +1 -1
  382. package/dist/esm/core/RunnerBase.d.ts +42 -114
  383. package/dist/esm/core/RunnerBase.js +140 -210
  384. package/dist/esm/core/RunnerBase.js.map +1 -1
  385. package/dist/esm/core/agent/arguments/answerRows.d.ts +26 -0
  386. package/dist/esm/core/agent/arguments/answerRows.js +78 -0
  387. package/dist/esm/core/agent/arguments/answerRows.js.map +1 -0
  388. package/dist/esm/core/agent/arguments/ask.d.ts +5 -11
  389. package/dist/esm/core/agent/arguments/ask.js +24 -87
  390. package/dist/esm/core/agent/arguments/ask.js.map +1 -1
  391. package/dist/esm/core/agent/arguments/dispatch.d.ts +4 -4
  392. package/dist/esm/core/agent/arguments/dispatch.js +27 -10
  393. package/dist/esm/core/agent/arguments/dispatch.js.map +1 -1
  394. package/dist/esm/core/agent/arguments/kept.d.ts +1 -1
  395. package/dist/esm/core/agent/arguments/kept.js +1 -1
  396. package/dist/esm/core/agent/arguments/partialWindow.d.ts +2 -1
  397. package/dist/esm/core/agent/arguments/partialWindow.js +1 -1
  398. package/dist/esm/core/agent/arguments/partialWindow.js.map +1 -1
  399. package/dist/esm/core/agent/arguments/pendingPrivateAsk.d.ts +37 -0
  400. package/dist/esm/core/agent/arguments/pendingPrivateAsk.js +114 -0
  401. package/dist/esm/core/agent/arguments/pendingPrivateAsk.js.map +1 -0
  402. package/dist/esm/core/agent/arguments/privateAnswers.d.ts +46 -0
  403. package/dist/esm/core/agent/arguments/privateAnswers.js +198 -0
  404. package/dist/esm/core/agent/arguments/privateAnswers.js.map +1 -0
  405. package/dist/esm/core/agent/arguments/resolutionRows.d.ts +29 -0
  406. package/dist/esm/core/agent/arguments/resolutionRows.js +171 -0
  407. package/dist/esm/core/agent/arguments/resolutionRows.js.map +1 -0
  408. package/dist/esm/core/agent/arguments/resolve.d.ts +2 -13
  409. package/dist/esm/core/agent/arguments/resolve.js +8 -144
  410. package/dist/esm/core/agent/arguments/resolve.js.map +1 -1
  411. package/dist/esm/core/agent/arguments/serve.d.ts +0 -5
  412. package/dist/esm/core/agent/arguments/serve.js +3 -12
  413. package/dist/esm/core/agent/arguments/serve.js.map +1 -1
  414. package/dist/esm/core/agent/arguments/subflow.js +7 -1
  415. package/dist/esm/core/agent/arguments/subflow.js.map +1 -1
  416. package/dist/esm/core/agent/buildAgentChart.d.ts +3 -326
  417. package/dist/esm/core/agent/buildAgentChart.js.map +1 -1
  418. package/dist/esm/core/agent/buildToolRegistry.d.ts +1 -1
  419. package/dist/esm/core/agent/buildToolRegistry.js +1 -1
  420. package/dist/esm/core/agent/callerIdentity.d.ts +9 -64
  421. package/dist/esm/core/agent/callerIdentity.js +21 -106
  422. package/dist/esm/core/agent/callerIdentity.js.map +1 -1
  423. package/dist/esm/core/agent/chartContract.d.ts +327 -0
  424. package/dist/esm/core/agent/chartContract.js +3 -0
  425. package/dist/esm/core/agent/chartContract.js.map +1 -0
  426. package/dist/esm/core/agent/checkpointDomain.d.ts +11 -0
  427. package/dist/esm/core/agent/checkpointDomain.js +53 -0
  428. package/dist/esm/core/agent/checkpointDomain.js.map +1 -0
  429. package/dist/esm/core/agent/componentObservers.d.ts +14 -0
  430. package/dist/esm/core/agent/componentObservers.js +129 -0
  431. package/dist/esm/core/agent/componentObservers.js.map +1 -0
  432. package/dist/esm/core/agent/componentResources.d.ts +39 -0
  433. package/dist/esm/core/agent/componentResources.js +110 -0
  434. package/dist/esm/core/agent/componentResources.js.map +1 -0
  435. package/dist/esm/core/agent/evidence/evidenceIndex.js +1 -1
  436. package/dist/esm/core/agent/evidence/evidenceIndex.js.map +1 -1
  437. package/dist/esm/core/agent/evidence/frames.js +3 -2
  438. package/dist/esm/core/agent/evidence/frames.js.map +1 -1
  439. package/dist/esm/core/agent/evidence/servedJson.d.ts +1 -1
  440. package/dist/esm/core/agent/evidence/servedJson.js +1 -1
  441. package/dist/esm/core/agent/findings/contingent.d.ts +1 -1
  442. package/dist/esm/core/agent/findings/contingent.js +1 -1
  443. package/dist/esm/core/agent/findings/judge.d.ts +1 -1
  444. package/dist/esm/core/agent/findings/judge.js +1 -1
  445. package/dist/esm/core/agent/findings/types.d.ts +1 -1
  446. package/dist/esm/core/agent/findings/unsettled.d.ts +3 -3
  447. package/dist/esm/core/agent/findings/unsettled.js +3 -3
  448. package/dist/esm/core/agent/honesty/inputsMountContract.d.ts +66 -0
  449. package/dist/esm/core/agent/honesty/inputsMountContract.js +2 -0
  450. package/dist/esm/core/agent/honesty/inputsMountContract.js.map +1 -0
  451. package/dist/esm/core/agent/honesty/mounts.d.ts +4 -66
  452. package/dist/esm/core/agent/honesty/mounts.js +42 -30
  453. package/dist/esm/core/agent/honesty/mounts.js.map +1 -1
  454. package/dist/esm/core/agent/hostTurn.d.ts +17 -0
  455. package/dist/esm/core/agent/hostTurn.js +36 -0
  456. package/dist/esm/core/agent/hostTurn.js.map +1 -0
  457. package/dist/esm/core/agent/pauseOwnership.d.ts +24 -0
  458. package/dist/esm/core/agent/pauseOwnership.js +97 -0
  459. package/dist/esm/core/agent/pauseOwnership.js.map +1 -0
  460. package/dist/esm/core/agent/presentTool.d.ts +1 -1
  461. package/dist/esm/core/agent/presentTool.js +1 -1
  462. package/dist/esm/core/agent/resultCeiling.d.ts +1 -1
  463. package/dist/esm/core/agent/resultCeiling.js +1 -1
  464. package/dist/esm/core/agent/resumeAnswer.d.ts +10 -0
  465. package/dist/esm/core/agent/resumeAnswer.js +43 -0
  466. package/dist/esm/core/agent/resumeAnswer.js.map +1 -0
  467. package/dist/esm/core/agent/resumeCheckpoint.d.ts +12 -0
  468. package/dist/esm/core/agent/resumeCheckpoint.js +34 -0
  469. package/dist/esm/core/agent/resumeCheckpoint.js.map +1 -0
  470. package/dist/esm/core/agent/resumeError.d.ts +8 -0
  471. package/dist/esm/core/agent/resumeError.js +11 -0
  472. package/dist/esm/core/agent/resumeError.js.map +1 -0
  473. package/dist/esm/core/agent/run/clocks.d.ts +44 -0
  474. package/dist/esm/core/agent/run/clocks.js +81 -0
  475. package/dist/esm/core/agent/run/clocks.js.map +1 -0
  476. package/dist/esm/core/agent/run/commitRunRedaction.d.ts +4 -0
  477. package/dist/esm/core/agent/run/commitRunRedaction.js +12 -0
  478. package/dist/esm/core/agent/run/commitRunRedaction.js.map +1 -0
  479. package/dist/esm/core/agent/run/eventStageIds.d.ts +40 -0
  480. package/dist/esm/core/agent/run/eventStageIds.js +41 -0
  481. package/dist/esm/core/agent/run/eventStageIds.js.map +1 -0
  482. package/dist/esm/core/agent/run/injectionDelivery.d.ts +4 -0
  483. package/dist/esm/core/agent/run/injectionDelivery.js +26 -0
  484. package/dist/esm/core/agent/run/injectionDelivery.js.map +1 -0
  485. package/dist/esm/core/agent/run/ledgerFacts.d.ts +8 -0
  486. package/dist/esm/core/agent/run/ledgerFacts.js +31 -0
  487. package/dist/esm/core/agent/run/ledgerFacts.js.map +1 -0
  488. package/dist/esm/core/agent/run/resumeRedaction.d.ts +6 -0
  489. package/dist/esm/core/agent/run/resumeRedaction.js +36 -0
  490. package/dist/esm/core/agent/run/resumeRedaction.js.map +1 -0
  491. package/dist/esm/core/agent/run/withoutTime.d.ts +8 -0
  492. package/dist/esm/core/agent/run/withoutTime.js +13 -0
  493. package/dist/esm/core/agent/run/withoutTime.js.map +1 -0
  494. package/dist/esm/core/agent/runValues.d.ts +71 -0
  495. package/dist/esm/core/agent/runValues.js +14 -0
  496. package/dist/esm/core/agent/runValues.js.map +1 -0
  497. package/dist/esm/core/agent/scripts/rows.d.ts +1 -1
  498. package/dist/esm/core/agent/scripts/rows.js +1 -1
  499. package/dist/esm/core/agent/scripts/types.d.ts +1 -1
  500. package/dist/esm/core/agent/selfCallNotice.js +1 -1
  501. package/dist/esm/core/agent/selfCallNotice.js.map +1 -1
  502. package/dist/esm/core/agent/stages/argumentAsk.d.ts +7 -1
  503. package/dist/esm/core/agent/stages/argumentAsk.js +39 -10
  504. package/dist/esm/core/agent/stages/argumentAsk.js.map +1 -1
  505. package/dist/esm/core/agent/stages/argumentParties.d.ts +3 -0
  506. package/dist/esm/core/agent/stages/argumentParties.js +50 -0
  507. package/dist/esm/core/agent/stages/argumentParties.js.map +1 -0
  508. package/dist/esm/core/agent/stages/batchParties.d.ts +21 -0
  509. package/dist/esm/core/agent/stages/batchParties.js +81 -0
  510. package/dist/esm/core/agent/stages/batchParties.js.map +1 -0
  511. package/dist/esm/core/agent/stages/callLLM.js +3 -3
  512. package/dist/esm/core/agent/stages/callLLM.js.map +1 -1
  513. package/dist/esm/core/agent/stages/finalStageContract.d.ts +45 -0
  514. package/dist/esm/core/agent/stages/finalStageContract.js +3 -0
  515. package/dist/esm/core/agent/stages/finalStageContract.js.map +1 -0
  516. package/dist/esm/core/agent/stages/prepareFinal.d.ts +2 -45
  517. package/dist/esm/core/agent/stages/prepareFinal.js +9 -0
  518. package/dist/esm/core/agent/stages/prepareFinal.js.map +1 -1
  519. package/dist/esm/core/agent/stages/searchCoverage.d.ts +1 -1
  520. package/dist/esm/core/agent/stages/searchCoverage.js +1 -1
  521. package/dist/esm/core/agent/stages/seed.js +15 -31
  522. package/dist/esm/core/agent/stages/seed.js.map +1 -1
  523. package/dist/esm/core/agent/stages/servedParties.d.ts +39 -0
  524. package/dist/esm/core/agent/stages/servedParties.js +214 -0
  525. package/dist/esm/core/agent/stages/servedParties.js.map +1 -0
  526. package/dist/esm/core/agent/stages/timeLayer.d.ts +3 -3
  527. package/dist/esm/core/agent/stages/timeLayer.js +2 -2
  528. package/dist/esm/core/agent/stages/toolCallShape.d.ts +7 -0
  529. package/dist/esm/core/agent/stages/toolCallShape.js +18 -0
  530. package/dist/esm/core/agent/stages/toolCallShape.js.map +1 -0
  531. package/dist/esm/core/agent/stages/toolCalls/access/argumentGate.d.ts +21 -0
  532. package/dist/esm/core/agent/stages/toolCalls/access/argumentGate.js +44 -0
  533. package/dist/esm/core/agent/stages/toolCalls/access/argumentGate.js.map +1 -0
  534. package/dist/esm/core/agent/stages/toolCalls/access/argumentValidation.d.ts +10 -0
  535. package/dist/esm/core/agent/stages/toolCalls/access/argumentValidation.js +29 -0
  536. package/dist/esm/core/agent/stages/toolCalls/access/argumentValidation.js.map +1 -0
  537. package/dist/esm/core/agent/stages/toolCalls/access/bindings.d.ts +61 -0
  538. package/dist/esm/core/agent/stages/toolCalls/access/bindings.js +88 -0
  539. package/dist/esm/core/agent/stages/toolCalls/access/bindings.js.map +1 -0
  540. package/dist/esm/core/agent/stages/toolCalls/access/callState.d.ts +14 -0
  541. package/dist/esm/core/agent/stages/toolCalls/access/callState.js +75 -0
  542. package/dist/esm/core/agent/stages/toolCalls/access/callState.js.map +1 -0
  543. package/dist/esm/core/agent/stages/toolCalls/access/capabilityQuestion.d.ts +28 -0
  544. package/dist/esm/core/agent/stages/toolCalls/access/capabilityQuestion.js +77 -0
  545. package/dist/esm/core/agent/stages/toolCalls/access/capabilityQuestion.js.map +1 -0
  546. package/dist/esm/core/agent/stages/toolCalls/access/checkInAdmission.d.ts +44 -0
  547. package/dist/esm/core/agent/stages/toolCalls/access/checkInAdmission.js +140 -0
  548. package/dist/esm/core/agent/stages/toolCalls/access/checkInAdmission.js.map +1 -0
  549. package/dist/esm/core/agent/stages/toolCalls/access/heldAnswer.d.ts +8 -0
  550. package/dist/esm/core/agent/stages/toolCalls/access/heldAnswer.js +35 -0
  551. package/dist/esm/core/agent/stages/toolCalls/access/heldAnswer.js.map +1 -0
  552. package/dist/esm/core/agent/stages/toolCalls/access/middlewareAdmission.d.ts +50 -0
  553. package/dist/esm/core/agent/stages/toolCalls/access/middlewareAdmission.js +137 -0
  554. package/dist/esm/core/agent/stages/toolCalls/access/middlewareAdmission.js.map +1 -0
  555. package/dist/esm/core/agent/stages/toolCalls/access/toolPermission.d.ts +24 -0
  556. package/dist/esm/core/agent/stages/toolCalls/access/toolPermission.js +99 -0
  557. package/dist/esm/core/agent/stages/toolCalls/access/toolPermission.js.map +1 -0
  558. package/dist/esm/core/agent/stages/toolCalls/batch/completion.d.ts +18 -0
  559. package/dist/esm/core/agent/stages/toolCalls/batch/completion.js +24 -0
  560. package/dist/esm/core/agent/stages/toolCalls/batch/completion.js.map +1 -0
  561. package/dist/esm/core/agent/stages/toolCalls/batch/dispatchContext.d.ts +36 -0
  562. package/dist/esm/core/agent/stages/toolCalls/batch/dispatchContext.js +133 -0
  563. package/dist/esm/core/agent/stages/toolCalls/batch/dispatchContext.js.map +1 -0
  564. package/dist/esm/core/agent/stages/toolCalls/batch/execute.d.ts +7 -0
  565. package/dist/esm/core/agent/stages/toolCalls/batch/execute.js +154 -0
  566. package/dist/esm/core/agent/stages/toolCalls/batch/execute.js.map +1 -0
  567. package/dist/esm/core/agent/stages/toolCalls/batch/findingsAdmission.d.ts +18 -0
  568. package/dist/esm/core/agent/stages/toolCalls/batch/findingsAdmission.js +48 -0
  569. package/dist/esm/core/agent/stages/toolCalls/batch/findingsAdmission.js.map +1 -0
  570. package/dist/esm/core/agent/stages/toolCalls/batch/inputResolutions.d.ts +6 -0
  571. package/dist/esm/core/agent/stages/toolCalls/batch/inputResolutions.js +18 -0
  572. package/dist/esm/core/agent/stages/toolCalls/batch/inputResolutions.js.map +1 -0
  573. package/dist/esm/core/agent/stages/toolCalls/batch/paused.d.ts +65 -0
  574. package/dist/esm/core/agent/stages/toolCalls/batch/paused.js +88 -0
  575. package/dist/esm/core/agent/stages/toolCalls/batch/paused.js.map +1 -0
  576. package/dist/esm/core/agent/stages/toolCalls/batch/refusal.d.ts +5 -0
  577. package/dist/esm/core/agent/stages/toolCalls/batch/refusal.js +32 -0
  578. package/dist/esm/core/agent/stages/toolCalls/batch/refusal.js.map +1 -0
  579. package/dist/esm/core/agent/stages/toolCalls/batch/settle.d.ts +66 -0
  580. package/dist/esm/core/agent/stages/toolCalls/batch/settle.js +63 -0
  581. package/dist/esm/core/agent/stages/toolCalls/batch/settle.js.map +1 -0
  582. package/dist/esm/core/agent/stages/toolCalls/batch/settlementOperations.d.ts +17 -0
  583. package/dist/esm/core/agent/stages/toolCalls/batch/settlementOperations.js +103 -0
  584. package/dist/esm/core/agent/stages/toolCalls/batch/settlementOperations.js.map +1 -0
  585. package/dist/esm/core/agent/stages/toolCalls/compose.d.ts +239 -0
  586. package/dist/esm/core/agent/stages/toolCalls/compose.js +349 -0
  587. package/dist/esm/core/agent/stages/toolCalls/compose.js.map +1 -0
  588. package/dist/esm/core/agent/stages/toolCalls/contracts/access.d.ts +110 -0
  589. package/dist/esm/core/agent/stages/toolCalls/contracts/access.js +2 -0
  590. package/dist/esm/core/agent/stages/toolCalls/contracts/access.js.map +1 -0
  591. package/dist/esm/core/agent/stages/toolCalls/contracts/artifacts.d.ts +26 -0
  592. package/dist/esm/core/agent/stages/toolCalls/contracts/artifacts.js +2 -0
  593. package/dist/esm/core/agent/stages/toolCalls/contracts/artifacts.js.map +1 -0
  594. package/dist/esm/core/agent/stages/toolCalls/contracts/batchCall.d.ts +8 -0
  595. package/dist/esm/core/agent/stages/toolCalls/contracts/batchCall.js +2 -0
  596. package/dist/esm/core/agent/stages/toolCalls/contracts/batchCall.js.map +1 -0
  597. package/dist/esm/core/agent/stages/toolCalls/contracts/callCells.d.ts +43 -0
  598. package/dist/esm/core/agent/stages/toolCalls/contracts/callCells.js +2 -0
  599. package/dist/esm/core/agent/stages/toolCalls/contracts/callCells.js.map +1 -0
  600. package/dist/esm/core/agent/stages/toolCalls/contracts/callFacts.d.ts +50 -0
  601. package/dist/esm/core/agent/stages/toolCalls/contracts/callFacts.js +2 -0
  602. package/dist/esm/core/agent/stages/toolCalls/contracts/callFacts.js.map +1 -0
  603. package/dist/esm/core/agent/stages/toolCalls/contracts/catalog.d.ts +56 -0
  604. package/dist/esm/core/agent/stages/toolCalls/contracts/catalog.js +2 -0
  605. package/dist/esm/core/agent/stages/toolCalls/contracts/catalog.js.map +1 -0
  606. package/dist/esm/core/agent/stages/toolCalls/contracts/dispatchBatch.d.ts +17 -0
  607. package/dist/esm/core/agent/stages/toolCalls/contracts/dispatchBatch.js +2 -0
  608. package/dist/esm/core/agent/stages/toolCalls/contracts/dispatchBatch.js.map +1 -0
  609. package/dist/esm/core/agent/stages/toolCalls/contracts/dispatchCall.d.ts +14 -0
  610. package/dist/esm/core/agent/stages/toolCalls/contracts/dispatchCall.js +2 -0
  611. package/dist/esm/core/agent/stages/toolCalls/contracts/dispatchCall.js.map +1 -0
  612. package/dist/esm/core/agent/stages/toolCalls/contracts/evidence.d.ts +211 -0
  613. package/dist/esm/core/agent/stages/toolCalls/contracts/evidence.js +2 -0
  614. package/dist/esm/core/agent/stages/toolCalls/contracts/evidence.js.map +1 -0
  615. package/dist/esm/core/agent/stages/toolCalls/contracts/handlerDeps.d.ts +11 -0
  616. package/dist/esm/core/agent/stages/toolCalls/contracts/handlerDeps.js +2 -0
  617. package/dist/esm/core/agent/stages/toolCalls/contracts/handlerDeps.js.map +1 -0
  618. package/dist/esm/core/agent/stages/toolCalls/contracts/inputsDispatch.d.ts +2 -0
  619. package/dist/esm/core/agent/stages/toolCalls/contracts/inputsDispatch.js +9 -0
  620. package/dist/esm/core/agent/stages/toolCalls/contracts/inputsDispatch.js.map +1 -0
  621. package/dist/esm/core/agent/stages/toolCalls/contracts/invocationInputs.d.ts +11 -0
  622. package/dist/esm/core/agent/stages/toolCalls/contracts/invocationInputs.js +2 -0
  623. package/dist/esm/core/agent/stages/toolCalls/contracts/invocationInputs.js.map +1 -0
  624. package/dist/esm/core/agent/stages/toolCalls/contracts/observation.d.ts +24 -0
  625. package/dist/esm/core/agent/stages/toolCalls/contracts/observation.js +2 -0
  626. package/dist/esm/core/agent/stages/toolCalls/contracts/observation.js.map +1 -0
  627. package/dist/esm/core/agent/stages/toolCalls/contracts/operations/artifacts.d.ts +37 -0
  628. package/dist/esm/core/agent/stages/toolCalls/contracts/operations/artifacts.js +2 -0
  629. package/dist/esm/core/agent/stages/toolCalls/contracts/operations/artifacts.js.map +1 -0
  630. package/dist/esm/core/agent/stages/toolCalls/contracts/operations/catalog.d.ts +31 -0
  631. package/dist/esm/core/agent/stages/toolCalls/contracts/operations/catalog.js +2 -0
  632. package/dist/esm/core/agent/stages/toolCalls/contracts/operations/catalog.js.map +1 -0
  633. package/dist/esm/core/agent/stages/toolCalls/contracts/operations/context.d.ts +14 -0
  634. package/dist/esm/core/agent/stages/toolCalls/contracts/operations/context.js +2 -0
  635. package/dist/esm/core/agent/stages/toolCalls/contracts/operations/context.js.map +1 -0
  636. package/dist/esm/core/agent/stages/toolCalls/contracts/operations/coverage.d.ts +23 -0
  637. package/dist/esm/core/agent/stages/toolCalls/contracts/operations/coverage.js +2 -0
  638. package/dist/esm/core/agent/stages/toolCalls/contracts/operations/coverage.js.map +1 -0
  639. package/dist/esm/core/agent/stages/toolCalls/contracts/operations/credentials.d.ts +5 -0
  640. package/dist/esm/core/agent/stages/toolCalls/contracts/operations/credentials.js +2 -0
  641. package/dist/esm/core/agent/stages/toolCalls/contracts/operations/credentials.js.map +1 -0
  642. package/dist/esm/core/agent/stages/toolCalls/contracts/operations/effects.d.ts +14 -0
  643. package/dist/esm/core/agent/stages/toolCalls/contracts/operations/effects.js +2 -0
  644. package/dist/esm/core/agent/stages/toolCalls/contracts/operations/effects.js.map +1 -0
  645. package/dist/esm/core/agent/stages/toolCalls/contracts/operations/integrity.d.ts +16 -0
  646. package/dist/esm/core/agent/stages/toolCalls/contracts/operations/integrity.js +2 -0
  647. package/dist/esm/core/agent/stages/toolCalls/contracts/operations/integrity.js.map +1 -0
  648. package/dist/esm/core/agent/stages/toolCalls/contracts/operations/limits.d.ts +19 -0
  649. package/dist/esm/core/agent/stages/toolCalls/contracts/operations/limits.js +2 -0
  650. package/dist/esm/core/agent/stages/toolCalls/contracts/operations/limits.js.map +1 -0
  651. package/dist/esm/core/agent/stages/toolCalls/contracts/operations/middleware.d.ts +25 -0
  652. package/dist/esm/core/agent/stages/toolCalls/contracts/operations/middleware.js +2 -0
  653. package/dist/esm/core/agent/stages/toolCalls/contracts/operations/middleware.js.map +1 -0
  654. package/dist/esm/core/agent/stages/toolCalls/contracts/operations/observations.d.ts +8 -0
  655. package/dist/esm/core/agent/stages/toolCalls/contracts/operations/observations.js +2 -0
  656. package/dist/esm/core/agent/stages/toolCalls/contracts/operations/observations.js.map +1 -0
  657. package/dist/esm/core/agent/stages/toolCalls/contracts/operations/progress.d.ts +11 -0
  658. package/dist/esm/core/agent/stages/toolCalls/contracts/operations/progress.js +2 -0
  659. package/dist/esm/core/agent/stages/toolCalls/contracts/operations/progress.js.map +1 -0
  660. package/dist/esm/core/agent/stages/toolCalls/contracts/operations/resources.d.ts +12 -0
  661. package/dist/esm/core/agent/stages/toolCalls/contracts/operations/resources.js +2 -0
  662. package/dist/esm/core/agent/stages/toolCalls/contracts/operations/resources.js.map +1 -0
  663. package/dist/esm/core/agent/stages/toolCalls/contracts/operations/resumedInvocation.d.ts +30 -0
  664. package/dist/esm/core/agent/stages/toolCalls/contracts/operations/resumedInvocation.js +2 -0
  665. package/dist/esm/core/agent/stages/toolCalls/contracts/operations/resumedInvocation.js.map +1 -0
  666. package/dist/esm/core/agent/stages/toolCalls/contracts/operations/scripts.d.ts +40 -0
  667. package/dist/esm/core/agent/stages/toolCalls/contracts/operations/scripts.js +2 -0
  668. package/dist/esm/core/agent/stages/toolCalls/contracts/operations/scripts.js.map +1 -0
  669. package/dist/esm/core/agent/stages/toolCalls/contracts/operations/semantics.d.ts +10 -0
  670. package/dist/esm/core/agent/stages/toolCalls/contracts/operations/semantics.js +2 -0
  671. package/dist/esm/core/agent/stages/toolCalls/contracts/operations/semantics.js.map +1 -0
  672. package/dist/esm/core/agent/stages/toolCalls/contracts/operations/settlement.d.ts +13 -0
  673. package/dist/esm/core/agent/stages/toolCalls/contracts/operations/settlement.js +2 -0
  674. package/dist/esm/core/agent/stages/toolCalls/contracts/operations/settlement.js.map +1 -0
  675. package/dist/esm/core/agent/stages/toolCalls/contracts/operations/steps.d.ts +26 -0
  676. package/dist/esm/core/agent/stages/toolCalls/contracts/operations/steps.js +2 -0
  677. package/dist/esm/core/agent/stages/toolCalls/contracts/operations/steps.js.map +1 -0
  678. package/dist/esm/core/agent/stages/toolCalls/contracts/resources.d.ts +67 -0
  679. package/dist/esm/core/agent/stages/toolCalls/contracts/resources.js +2 -0
  680. package/dist/esm/core/agent/stages/toolCalls/contracts/resources.js.map +1 -0
  681. package/dist/esm/core/agent/stages/toolCalls/contracts/results.d.ts +26 -0
  682. package/dist/esm/core/agent/stages/toolCalls/contracts/results.js +2 -0
  683. package/dist/esm/core/agent/stages/toolCalls/contracts/results.js.map +1 -0
  684. package/dist/esm/core/agent/stages/toolCalls/contracts/resumeFrames.d.ts +14 -0
  685. package/dist/esm/core/agent/stages/toolCalls/contracts/resumeFrames.js +2 -0
  686. package/dist/esm/core/agent/stages/toolCalls/contracts/resumeFrames.js.map +1 -0
  687. package/dist/esm/core/agent/stages/toolCalls/contracts/routing.d.ts +114 -0
  688. package/dist/esm/core/agent/stages/toolCalls/contracts/routing.js +2 -0
  689. package/dist/esm/core/agent/stages/toolCalls/contracts/routing.js.map +1 -0
  690. package/dist/esm/core/agent/stages/toolCalls/decorators/limitsOperations.d.ts +4 -0
  691. package/dist/esm/core/agent/stages/toolCalls/decorators/limitsOperations.js +80 -0
  692. package/dist/esm/core/agent/stages/toolCalls/decorators/limitsOperations.js.map +1 -0
  693. package/dist/esm/core/agent/stages/toolCalls/decorators/middlewareOperations.d.ts +4 -0
  694. package/dist/esm/core/agent/stages/toolCalls/decorators/middlewareOperations.js +83 -0
  695. package/dist/esm/core/agent/stages/toolCalls/decorators/middlewareOperations.js.map +1 -0
  696. package/dist/esm/core/agent/stages/toolCalls/decorators/reportingCredentials.d.ts +29 -0
  697. package/dist/esm/core/agent/stages/toolCalls/decorators/reportingCredentials.js +48 -0
  698. package/dist/esm/core/agent/stages/toolCalls/decorators/reportingCredentials.js.map +1 -0
  699. package/dist/esm/core/agent/stages/toolCalls/evidence/coverageOperations.d.ts +9 -0
  700. package/dist/esm/core/agent/stages/toolCalls/evidence/coverageOperations.js +232 -0
  701. package/dist/esm/core/agent/stages/toolCalls/evidence/coverageOperations.js.map +1 -0
  702. package/dist/esm/core/agent/stages/toolCalls/evidence/integrityOperations.d.ts +4 -0
  703. package/dist/esm/core/agent/stages/toolCalls/evidence/integrityOperations.js +137 -0
  704. package/dist/esm/core/agent/stages/toolCalls/evidence/integrityOperations.js.map +1 -0
  705. package/dist/esm/core/agent/stages/toolCalls/evidence/judgeLanded.d.ts +29 -0
  706. package/dist/esm/core/agent/stages/toolCalls/evidence/judgeLanded.js +32 -0
  707. package/dist/esm/core/agent/stages/toolCalls/evidence/judgeLanded.js.map +1 -0
  708. package/dist/esm/core/agent/stages/toolCalls/evidence/madeInRun.d.ts +6 -0
  709. package/dist/esm/core/agent/stages/toolCalls/evidence/madeInRun.js +3 -0
  710. package/dist/esm/core/agent/stages/toolCalls/evidence/madeInRun.js.map +1 -0
  711. package/dist/esm/core/agent/stages/toolCalls/evidence/producerCorpus.d.ts +22 -0
  712. package/dist/esm/core/agent/stages/toolCalls/evidence/producerCorpus.js +34 -0
  713. package/dist/esm/core/agent/stages/toolCalls/evidence/producerCorpus.js.map +1 -0
  714. package/dist/esm/core/agent/stages/toolCalls/evidence/scriptsOperations.d.ts +11 -0
  715. package/dist/esm/core/agent/stages/toolCalls/evidence/scriptsOperations.js +156 -0
  716. package/dist/esm/core/agent/stages/toolCalls/evidence/scriptsOperations.js.map +1 -0
  717. package/dist/esm/core/agent/stages/toolCalls/evidence/semanticsOperations.d.ts +4 -0
  718. package/dist/esm/core/agent/stages/toolCalls/evidence/semanticsOperations.js +90 -0
  719. package/dist/esm/core/agent/stages/toolCalls/evidence/semanticsOperations.js.map +1 -0
  720. package/dist/esm/core/agent/stages/toolCalls/evidence/sourceClock.d.ts +11 -0
  721. package/dist/esm/core/agent/stages/toolCalls/evidence/sourceClock.js +18 -0
  722. package/dist/esm/core/agent/stages/toolCalls/evidence/sourceClock.js.map +1 -0
  723. package/dist/esm/core/agent/stages/toolCalls/evidence/towers.d.ts +18 -0
  724. package/dist/esm/core/agent/stages/toolCalls/evidence/towers.js +38 -0
  725. package/dist/esm/core/agent/stages/toolCalls/evidence/towers.js.map +1 -0
  726. package/dist/esm/core/agent/stages/toolCalls/execution/artifactsOperations.d.ts +12 -0
  727. package/dist/esm/core/agent/stages/toolCalls/execution/artifactsOperations.js +261 -0
  728. package/dist/esm/core/agent/stages/toolCalls/execution/artifactsOperations.js.map +1 -0
  729. package/dist/esm/core/agent/stages/toolCalls/execution/callStart.d.ts +35 -0
  730. package/dist/esm/core/agent/stages/toolCalls/execution/callStart.js +103 -0
  731. package/dist/esm/core/agent/stages/toolCalls/execution/callStart.js.map +1 -0
  732. package/dist/esm/core/agent/stages/toolCalls/execution/catalogOperations.d.ts +17 -0
  733. package/dist/esm/core/agent/stages/toolCalls/execution/catalogOperations.js +173 -0
  734. package/dist/esm/core/agent/stages/toolCalls/execution/catalogOperations.js.map +1 -0
  735. package/dist/esm/core/agent/stages/toolCalls/execution/contextOperations.d.ts +15 -0
  736. package/dist/esm/core/agent/stages/toolCalls/execution/contextOperations.js +186 -0
  737. package/dist/esm/core/agent/stages/toolCalls/execution/contextOperations.js.map +1 -0
  738. package/dist/esm/core/agent/stages/toolCalls/execution/credentialAdmission.d.ts +48 -0
  739. package/dist/esm/core/agent/stages/toolCalls/execution/credentialAdmission.js +124 -0
  740. package/dist/esm/core/agent/stages/toolCalls/execution/credentialAdmission.js.map +1 -0
  741. package/dist/esm/core/agent/stages/toolCalls/execution/credentialsOperations.d.ts +9 -0
  742. package/dist/esm/core/agent/stages/toolCalls/execution/credentialsOperations.js +11 -0
  743. package/dist/esm/core/agent/stages/toolCalls/execution/credentialsOperations.js.map +1 -0
  744. package/dist/esm/core/agent/stages/toolCalls/execution/deliveredResult.d.ts +40 -0
  745. package/dist/esm/core/agent/stages/toolCalls/execution/deliveredResult.js +168 -0
  746. package/dist/esm/core/agent/stages/toolCalls/execution/deliveredResult.js.map +1 -0
  747. package/dist/esm/core/agent/stages/toolCalls/execution/dispatchCall.d.ts +5 -0
  748. package/dist/esm/core/agent/stages/toolCalls/execution/dispatchCall.js +511 -0
  749. package/dist/esm/core/agent/stages/toolCalls/execution/dispatchCall.js.map +1 -0
  750. package/dist/esm/core/agent/stages/toolCalls/execution/initialInvocation.d.ts +70 -0
  751. package/dist/esm/core/agent/stages/toolCalls/execution/initialInvocation.js +341 -0
  752. package/dist/esm/core/agent/stages/toolCalls/execution/initialInvocation.js.map +1 -0
  753. package/dist/esm/core/agent/stages/toolCalls/execution/resourcesOperations.d.ts +9 -0
  754. package/dist/esm/core/agent/stages/toolCalls/execution/resourcesOperations.js +86 -0
  755. package/dist/esm/core/agent/stages/toolCalls/execution/resourcesOperations.js.map +1 -0
  756. package/dist/esm/core/agent/stages/toolCalls/execution/resumedInvocation.d.ts +42 -0
  757. package/dist/esm/core/agent/stages/toolCalls/execution/resumedInvocation.js +402 -0
  758. package/dist/esm/core/agent/stages/toolCalls/execution/resumedInvocation.js.map +1 -0
  759. package/dist/esm/core/agent/stages/toolCalls/execution/wantedArguments.d.ts +19 -0
  760. package/dist/esm/core/agent/stages/toolCalls/execution/wantedArguments.js +14 -0
  761. package/dist/esm/core/agent/stages/toolCalls/execution/wantedArguments.js.map +1 -0
  762. package/dist/esm/core/agent/stages/toolCalls/helpers/dedupeIds.d.ts +3 -0
  763. package/dist/esm/core/agent/stages/toolCalls/helpers/dedupeIds.js +6 -0
  764. package/dist/esm/core/agent/stages/toolCalls/helpers/dedupeIds.js.map +1 -0
  765. package/dist/esm/core/agent/stages/toolCalls/helpers/dispatchRefusals.d.ts +61 -0
  766. package/dist/esm/core/agent/stages/toolCalls/helpers/dispatchRefusals.js +78 -0
  767. package/dist/esm/core/agent/stages/toolCalls/helpers/dispatchRefusals.js.map +1 -0
  768. package/dist/esm/core/agent/stages/toolCalls/helpers/mountedCursor.d.ts +41 -0
  769. package/dist/esm/core/agent/stages/toolCalls/helpers/mountedCursor.js +42 -0
  770. package/dist/esm/core/agent/stages/toolCalls/helpers/mountedCursor.js.map +1 -0
  771. package/dist/esm/core/agent/stages/toolCalls/helpers/periodWarnings.d.ts +23 -0
  772. package/dist/esm/core/agent/stages/toolCalls/helpers/periodWarnings.js +54 -0
  773. package/dist/esm/core/agent/stages/toolCalls/helpers/periodWarnings.js.map +1 -0
  774. package/dist/esm/core/agent/stages/toolCalls/helpers/readSkillRefusal.d.ts +87 -0
  775. package/dist/esm/core/agent/stages/toolCalls/helpers/readSkillRefusal.js +137 -0
  776. package/dist/esm/core/agent/stages/toolCalls/helpers/readSkillRefusal.js.map +1 -0
  777. package/dist/esm/core/agent/stages/toolCalls/helpers/sourceNote.d.ts +8 -0
  778. package/dist/esm/core/agent/stages/toolCalls/helpers/sourceNote.js +7 -0
  779. package/dist/esm/core/agent/stages/toolCalls/helpers/sourceNote.js.map +1 -0
  780. package/dist/esm/core/agent/stages/toolCalls/helpers/unscopedRun.d.ts +11 -0
  781. package/dist/esm/core/agent/stages/toolCalls/helpers/unscopedRun.js +12 -0
  782. package/dist/esm/core/agent/stages/toolCalls/helpers/unscopedRun.js.map +1 -0
  783. package/dist/esm/core/agent/stages/toolCalls/index.d.ts +14 -0
  784. package/dist/esm/core/agent/stages/toolCalls/index.js +21 -0
  785. package/dist/esm/core/agent/stages/toolCalls/index.js.map +1 -0
  786. package/dist/esm/core/agent/stages/toolCalls/observation/callSettlement.d.ts +29 -0
  787. package/dist/esm/core/agent/stages/toolCalls/observation/callSettlement.js +44 -0
  788. package/dist/esm/core/agent/stages/toolCalls/observation/callSettlement.js.map +1 -0
  789. package/dist/esm/core/agent/stages/toolCalls/observation/observationsOperations.d.ts +4 -0
  790. package/dist/esm/core/agent/stages/toolCalls/observation/observationsOperations.js +57 -0
  791. package/dist/esm/core/agent/stages/toolCalls/observation/observationsOperations.js.map +1 -0
  792. package/dist/esm/core/agent/stages/toolCalls/observation/progressOperations.d.ts +7 -0
  793. package/dist/esm/core/agent/stages/toolCalls/observation/progressOperations.js +28 -0
  794. package/dist/esm/core/agent/stages/toolCalls/observation/progressOperations.js.map +1 -0
  795. package/dist/esm/core/agent/stages/toolCalls/resume/ask.d.ts +44 -0
  796. package/dist/esm/core/agent/stages/toolCalls/resume/ask.js +400 -0
  797. package/dist/esm/core/agent/stages/toolCalls/resume/ask.js.map +1 -0
  798. package/dist/esm/core/agent/stages/toolCalls/resume/checkIn.d.ts +39 -0
  799. package/dist/esm/core/agent/stages/toolCalls/resume/checkIn.js +189 -0
  800. package/dist/esm/core/agent/stages/toolCalls/resume/checkIn.js.map +1 -0
  801. package/dist/esm/core/agent/stages/toolCalls/resume/credential.d.ts +37 -0
  802. package/dist/esm/core/agent/stages/toolCalls/resume/credential.js +135 -0
  803. package/dist/esm/core/agent/stages/toolCalls/resume/credential.js.map +1 -0
  804. package/dist/esm/core/agent/stages/toolCalls/resume/handler.d.ts +6 -0
  805. package/dist/esm/core/agent/stages/toolCalls/resume/handler.js +148 -0
  806. package/dist/esm/core/agent/stages/toolCalls/resume/handler.js.map +1 -0
  807. package/dist/esm/core/agent/stages/toolCalls/resume/plain.d.ts +32 -0
  808. package/dist/esm/core/agent/stages/toolCalls/resume/plain.js +140 -0
  809. package/dist/esm/core/agent/stages/toolCalls/resume/plain.js.map +1 -0
  810. package/dist/esm/core/agent/stages/toolCalls/routing/effectsOperations.d.ts +4 -0
  811. package/dist/esm/core/agent/stages/toolCalls/routing/effectsOperations.js +260 -0
  812. package/dist/esm/core/agent/stages/toolCalls/routing/effectsOperations.js.map +1 -0
  813. package/dist/esm/core/agent/stages/toolCalls/routing/policyHalt.d.ts +17 -0
  814. package/dist/esm/core/agent/stages/toolCalls/routing/policyHalt.js +36 -0
  815. package/dist/esm/core/agent/stages/toolCalls/routing/policyHalt.js.map +1 -0
  816. package/dist/esm/core/agent/stages/toolCalls/routing/readSkillRoute.d.ts +20 -0
  817. package/dist/esm/core/agent/stages/toolCalls/routing/readSkillRoute.js +234 -0
  818. package/dist/esm/core/agent/stages/toolCalls/routing/readSkillRoute.js.map +1 -0
  819. package/dist/esm/core/agent/stages/toolCalls/routing/skillActivation.d.ts +15 -0
  820. package/dist/esm/core/agent/stages/toolCalls/routing/skillActivation.js +48 -0
  821. package/dist/esm/core/agent/stages/toolCalls/routing/skillActivation.js.map +1 -0
  822. package/dist/esm/core/agent/stages/toolCalls/routing/stepsOperations.d.ts +4 -0
  823. package/dist/esm/core/agent/stages/toolCalls/routing/stepsOperations.js +145 -0
  824. package/dist/esm/core/agent/stages/toolCalls/routing/stepsOperations.js.map +1 -0
  825. package/dist/esm/core/agent/stages/toolResolver.d.ts +3 -2
  826. package/dist/esm/core/agent/stages/toolResolver.js +84 -38
  827. package/dist/esm/core/agent/stages/toolResolver.js.map +1 -1
  828. package/dist/esm/core/agent/toolChoice/pick.d.ts +1 -1
  829. package/dist/esm/core/agent/toolChoice/pick.js +1 -1
  830. package/dist/esm/core/agent/toolResultCap.d.ts +1 -1
  831. package/dist/esm/core/agent/toolResultCap.js +0 -0
  832. package/dist/esm/core/agent/types.d.ts +16 -27
  833. package/dist/esm/core/agent/types.js +0 -3
  834. package/dist/esm/core/agent/types.js.map +1 -1
  835. package/dist/esm/core/agent/window/toolNames.d.ts +3 -3
  836. package/dist/esm/core/agent/window/toolNames.js +3 -3
  837. package/dist/esm/core/answerConsumption.d.ts +7 -0
  838. package/dist/esm/core/answerConsumption.js +12 -0
  839. package/dist/esm/core/answerConsumption.js.map +1 -0
  840. package/dist/esm/core/checkin.d.ts +1 -1
  841. package/dist/esm/core/checkin.js +1 -1
  842. package/dist/esm/core/codeRunnerTool.d.ts +1 -1
  843. package/dist/esm/core/codeRunnerTool.js +1 -1
  844. package/dist/esm/core/consentLedger.d.ts +21 -0
  845. package/dist/esm/core/consentLedger.js +116 -0
  846. package/dist/esm/core/consentLedger.js.map +1 -0
  847. package/dist/esm/core/consentRequest.d.ts +35 -54
  848. package/dist/esm/core/consentRequest.js +34 -153
  849. package/dist/esm/core/consentRequest.js.map +1 -1
  850. package/dist/esm/core/conversation.d.ts +8 -29
  851. package/dist/esm/core/conversation.js +14 -47
  852. package/dist/esm/core/conversation.js.map +1 -1
  853. package/dist/esm/core/memberRun.d.ts +1 -0
  854. package/dist/esm/core/memberRun.js +1 -1
  855. package/dist/esm/core/memberRun.js.map +1 -1
  856. package/dist/esm/core/pause.d.ts +5 -5
  857. package/dist/esm/core/pause.js +5 -5
  858. package/dist/esm/core/pauseRecord.d.ts +13 -0
  859. package/dist/esm/core/pauseRecord.js +19 -0
  860. package/dist/esm/core/pauseRecord.js.map +1 -0
  861. package/dist/esm/core/runEntry.d.ts +8 -0
  862. package/dist/esm/core/runEntry.js +26 -0
  863. package/dist/esm/core/runEntry.js.map +1 -0
  864. package/dist/esm/core/runnerCoreValues.d.ts +16 -0
  865. package/dist/esm/core/runnerCoreValues.js +2 -0
  866. package/dist/esm/core/runnerCoreValues.js.map +1 -0
  867. package/dist/esm/core/runnerExecution.d.ts +71 -0
  868. package/dist/esm/core/runnerExecution.js +170 -0
  869. package/dist/esm/core/runnerExecution.js.map +1 -0
  870. package/dist/esm/core/runnerLive.d.ts +32 -1
  871. package/dist/esm/core/runnerLive.js.map +1 -1
  872. package/dist/esm/core/slots/buildThinkingSubflow.d.ts +1 -1
  873. package/dist/esm/core/slots/buildThinkingSubflow.js +2 -2
  874. package/dist/esm/core/slots/buildThinkingSubflow.js.map +1 -1
  875. package/dist/esm/core/slots/buildToolsSlot.d.ts +27 -56
  876. package/dist/esm/core/slots/buildToolsSlot.js +25 -102
  877. package/dist/esm/core/slots/buildToolsSlot.js.map +1 -1
  878. package/dist/esm/core/slots/discoverTools.d.ts +21 -0
  879. package/dist/esm/core/slots/discoverTools.js +94 -0
  880. package/dist/esm/core/slots/discoverTools.js.map +1 -0
  881. package/dist/esm/core-flow/Conditional.d.ts +0 -2
  882. package/dist/esm/core-flow/Conditional.js +28 -75
  883. package/dist/esm/core-flow/Conditional.js.map +1 -1
  884. package/dist/esm/core-flow/Graph.d.ts +18 -23
  885. package/dist/esm/core-flow/Graph.js +66 -123
  886. package/dist/esm/core-flow/Graph.js.map +1 -1
  887. package/dist/esm/core-flow/Loop.d.ts +0 -2
  888. package/dist/esm/core-flow/Loop.js +29 -83
  889. package/dist/esm/core-flow/Loop.js.map +1 -1
  890. package/dist/esm/core-flow/Parallel.d.ts +11 -40
  891. package/dist/esm/core-flow/Parallel.js +61 -151
  892. package/dist/esm/core-flow/Parallel.js.map +1 -1
  893. package/dist/esm/core-flow/Sequence.d.ts +0 -2
  894. package/dist/esm/core-flow/Sequence.js +28 -76
  895. package/dist/esm/core-flow/Sequence.js.map +1 -1
  896. package/dist/esm/core-flow/Workflow.d.ts +0 -2
  897. package/dist/esm/core-flow/Workflow.js +27 -75
  898. package/dist/esm/core-flow/Workflow.js.map +1 -1
  899. package/dist/esm/events/dispatcher.d.ts +2 -2
  900. package/dist/esm/events/dispatcher.js +2 -2
  901. package/dist/esm/events/payloads/access.d.ts +88 -0
  902. package/dist/esm/events/payloads/access.js +2 -0
  903. package/dist/esm/events/payloads/access.js.map +1 -0
  904. package/dist/esm/events/payloads/agent.d.ts +241 -0
  905. package/dist/esm/events/payloads/agent.js +2 -0
  906. package/dist/esm/events/payloads/agent.js.map +1 -0
  907. package/dist/esm/events/payloads/answer.d.ts +95 -0
  908. package/dist/esm/events/payloads/answer.js +2 -0
  909. package/dist/esm/events/payloads/answer.js.map +1 -0
  910. package/dist/esm/events/payloads/artifacts.d.ts +139 -0
  911. package/dist/esm/events/payloads/artifacts.js +2 -0
  912. package/dist/esm/events/payloads/artifacts.js.map +1 -0
  913. package/dist/esm/events/payloads/consent.d.ts +86 -0
  914. package/dist/esm/events/payloads/consent.js +2 -0
  915. package/dist/esm/events/payloads/consent.js.map +1 -0
  916. package/dist/esm/events/payloads/context.d.ts +276 -0
  917. package/dist/esm/events/payloads/context.js +2 -0
  918. package/dist/esm/events/payloads/context.js.map +1 -0
  919. package/dist/esm/events/payloads/cost.d.ts +40 -0
  920. package/dist/esm/events/payloads/cost.js +2 -0
  921. package/dist/esm/events/payloads/cost.js.map +1 -0
  922. package/dist/esm/events/payloads/dependencyTypes.d.ts +18 -0
  923. package/dist/esm/events/payloads/dependencyTypes.js +2 -0
  924. package/dist/esm/events/payloads/dependencyTypes.js.map +1 -0
  925. package/dist/esm/events/payloads/evaluation.d.ts +297 -0
  926. package/dist/esm/events/payloads/evaluation.js +2 -0
  927. package/dist/esm/events/payloads/evaluation.js.map +1 -0
  928. package/dist/esm/events/payloads/fallback.d.ts +6 -0
  929. package/dist/esm/events/payloads/fallback.js +2 -0
  930. package/dist/esm/events/payloads/fallback.js.map +1 -0
  931. package/dist/esm/events/payloads/findings.d.ts +243 -0
  932. package/dist/esm/events/payloads/findings.js +2 -0
  933. package/dist/esm/events/payloads/findings.js.map +1 -0
  934. package/dist/esm/events/payloads/flow.d.ts +68 -0
  935. package/dist/esm/events/payloads/flow.js +2 -0
  936. package/dist/esm/events/payloads/flow.js.map +1 -0
  937. package/dist/esm/events/payloads/integrity.d.ts +48 -0
  938. package/dist/esm/events/payloads/integrity.js +3 -0
  939. package/dist/esm/events/payloads/integrity.js.map +1 -0
  940. package/dist/esm/events/payloads/maps.d.ts +47 -0
  941. package/dist/esm/events/payloads/maps.js +3 -0
  942. package/dist/esm/events/payloads/maps.js.map +1 -0
  943. package/dist/esm/events/payloads/mcpRequests.d.ts +327 -0
  944. package/dist/esm/events/payloads/mcpRequests.js +3 -0
  945. package/dist/esm/events/payloads/mcpRequests.js.map +1 -0
  946. package/dist/esm/events/payloads/memory.d.ts +117 -0
  947. package/dist/esm/events/payloads/memory.js +3 -0
  948. package/dist/esm/events/payloads/memory.js.map +1 -0
  949. package/dist/esm/events/payloads/reliability.d.ts +149 -0
  950. package/dist/esm/events/payloads/reliability.js +2 -0
  951. package/dist/esm/events/payloads/reliability.js.map +1 -0
  952. package/dist/esm/events/payloads/runConfiguration.d.ts +224 -0
  953. package/dist/esm/events/payloads/runConfiguration.js +2 -0
  954. package/dist/esm/events/payloads/runConfiguration.js.map +1 -0
  955. package/dist/esm/events/payloads/skills.d.ts +359 -0
  956. package/dist/esm/events/payloads/skills.js +2 -0
  957. package/dist/esm/events/payloads/skills.js.map +1 -0
  958. package/dist/esm/events/payloads/stream.d.ts +230 -0
  959. package/dist/esm/events/payloads/stream.js +2 -0
  960. package/dist/esm/events/payloads/stream.js.map +1 -0
  961. package/dist/esm/events/payloads/thinking.d.ts +118 -0
  962. package/dist/esm/events/payloads/thinking.js +2 -0
  963. package/dist/esm/events/payloads/thinking.js.map +1 -0
  964. package/dist/esm/events/payloads/toolCatalog.d.ts +157 -0
  965. package/dist/esm/events/payloads/toolCatalog.js +2 -0
  966. package/dist/esm/events/payloads/toolCatalog.js.map +1 -0
  967. package/dist/esm/events/payloads/toolChoice.d.ts +65 -0
  968. package/dist/esm/events/payloads/toolChoice.js +2 -0
  969. package/dist/esm/events/payloads/toolChoice.js.map +1 -0
  970. package/dist/esm/events/payloads/toolEffects.d.ts +329 -0
  971. package/dist/esm/events/payloads/toolEffects.js +2 -0
  972. package/dist/esm/events/payloads/toolEffects.js.map +1 -0
  973. package/dist/esm/events/payloads/toolSemantics.d.ts +68 -0
  974. package/dist/esm/events/payloads/toolSemantics.js +2 -0
  975. package/dist/esm/events/payloads/toolSemantics.js.map +1 -0
  976. package/dist/esm/events/payloads/toolSessionPayloads.d.ts +50 -0
  977. package/dist/esm/events/payloads/toolSessionPayloads.js +17 -0
  978. package/dist/esm/events/payloads/toolSessionPayloads.js.map +1 -0
  979. package/dist/esm/events/payloads/validation.d.ts +29 -0
  980. package/dist/esm/events/payloads/validation.js +2 -0
  981. package/dist/esm/events/payloads/validation.js.map +1 -0
  982. package/dist/esm/events/payloads.d.ts +26 -3888
  983. package/dist/esm/events/registry.d.ts +8 -15
  984. package/dist/esm/events/registry.js +5 -15
  985. package/dist/esm/events/registry.js.map +1 -1
  986. package/dist/esm/hosting/answeredPause.d.ts +9 -23
  987. package/dist/esm/hosting/answeredPause.js +15 -27
  988. package/dist/esm/hosting/answeredPause.js.map +1 -1
  989. package/dist/esm/hosting/durability.d.ts +10 -7
  990. package/dist/esm/hosting/durability.js +10 -8
  991. package/dist/esm/hosting/durability.js.map +1 -1
  992. package/dist/esm/hosting/standingAgent.d.ts +4 -14
  993. package/dist/esm/hosting/standingAgent.js +73 -109
  994. package/dist/esm/hosting/standingAgent.js.map +1 -1
  995. package/dist/esm/hosting/stream.d.ts +3 -3
  996. package/dist/esm/hosting/stream.js +2 -5
  997. package/dist/esm/hosting/stream.js.map +1 -1
  998. package/dist/esm/hosting/streamHandler.js +5 -5
  999. package/dist/esm/hosting/streamHandler.js.map +1 -1
  1000. package/dist/esm/index.d.ts +2 -1
  1001. package/dist/esm/index.js +2 -4
  1002. package/dist/esm/index.js.map +1 -1
  1003. package/dist/esm/influence-core/attribute.js +1 -1
  1004. package/dist/esm/influence-core/attribute.js.map +1 -1
  1005. package/dist/esm/influence-core/contrastive.js +1 -1
  1006. package/dist/esm/influence-core/contrastive.js.map +1 -1
  1007. package/dist/esm/influence-core/margin.js +1 -1
  1008. package/dist/esm/influence-core/margin.js.map +1 -1
  1009. package/dist/esm/influence-core/signals.js +1 -1
  1010. package/dist/esm/influence-core/signals.js.map +1 -1
  1011. package/dist/esm/influence-core/similarity.js +1 -1
  1012. package/dist/esm/influence-core/similarity.js.map +1 -1
  1013. package/dist/esm/injection-engine/buildInjectionEngineSubflow.js +1 -1
  1014. package/dist/esm/injection-engine/buildInjectionEngineSubflow.js.map +1 -1
  1015. package/dist/esm/injection-engine/devWarn.d.ts +3 -2
  1016. package/dist/esm/injection-engine/devWarn.js +3 -2
  1017. package/dist/esm/injection-engine/devWarn.js.map +1 -1
  1018. package/dist/esm/injection-engine/entryScorer.js +1 -1
  1019. package/dist/esm/injection-engine/entryScorer.js.map +1 -1
  1020. package/dist/esm/injection-engine/hostContract.d.ts +3 -3
  1021. package/dist/esm/injection-engine/skillExamples.d.ts +1 -1
  1022. package/dist/esm/injection-engine/skillGraph/cursorEvidence.d.ts +48 -0
  1023. package/dist/esm/injection-engine/skillGraph/cursorEvidence.js +54 -0
  1024. package/dist/esm/injection-engine/skillGraph/cursorEvidence.js.map +1 -0
  1025. package/dist/esm/injection-engine/skillGraph/cursorResolution.d.ts +4 -0
  1026. package/dist/esm/injection-engine/skillGraph/cursorResolution.js +241 -0
  1027. package/dist/esm/injection-engine/skillGraph/cursorResolution.js.map +1 -0
  1028. package/dist/esm/injection-engine/skillGraph/decision.d.ts +21 -0
  1029. package/dist/esm/injection-engine/skillGraph/decision.js +10 -0
  1030. package/dist/esm/injection-engine/skillGraph/decision.js.map +1 -0
  1031. package/dist/esm/injection-engine/skillGraph/entryScores.d.ts +14 -0
  1032. package/dist/esm/injection-engine/skillGraph/entryScores.js +30 -0
  1033. package/dist/esm/injection-engine/skillGraph/entryScores.js.map +1 -0
  1034. package/dist/esm/injection-engine/skillGraph/entrySuppression.d.ts +23 -0
  1035. package/dist/esm/injection-engine/skillGraph/entrySuppression.js +46 -0
  1036. package/dist/esm/injection-engine/skillGraph/entrySuppression.js.map +1 -0
  1037. package/dist/esm/injection-engine/skillGraph/graphConfig.d.ts +39 -0
  1038. package/dist/esm/injection-engine/skillGraph/graphConfig.js +2 -0
  1039. package/dist/esm/injection-engine/skillGraph/graphConfig.js.map +1 -0
  1040. package/dist/esm/injection-engine/skillGraph/graphContracts.d.ts +479 -0
  1041. package/dist/esm/injection-engine/skillGraph/graphContracts.js +14 -0
  1042. package/dist/esm/injection-engine/skillGraph/graphContracts.js.map +1 -0
  1043. package/dist/esm/injection-engine/skillGraph/graphCursor.d.ts +125 -0
  1044. package/dist/esm/injection-engine/skillGraph/graphCursor.js +2 -0
  1045. package/dist/esm/injection-engine/skillGraph/graphCursor.js.map +1 -0
  1046. package/dist/esm/injection-engine/skillGraph/graphDrawing.d.ts +2 -0
  1047. package/dist/esm/injection-engine/skillGraph/graphDrawing.js +31 -0
  1048. package/dist/esm/injection-engine/skillGraph/graphDrawing.js.map +1 -0
  1049. package/dist/esm/injection-engine/skillGraph/graphRoutes.d.ts +269 -0
  1050. package/dist/esm/injection-engine/skillGraph/graphRoutes.js +2 -0
  1051. package/dist/esm/injection-engine/skillGraph/graphRoutes.js.map +1 -0
  1052. package/dist/esm/injection-engine/skillGraph/passMemo.d.ts +24 -0
  1053. package/dist/esm/injection-engine/skillGraph/passMemo.js +37 -0
  1054. package/dist/esm/injection-engine/skillGraph/passMemo.js.map +1 -0
  1055. package/dist/esm/injection-engine/skillGraph/reachability.d.ts +71 -0
  1056. package/dist/esm/injection-engine/skillGraph/reachability.js +62 -0
  1057. package/dist/esm/injection-engine/skillGraph/reachability.js.map +1 -0
  1058. package/dist/esm/injection-engine/skillGraph/routePredicates.d.ts +36 -0
  1059. package/dist/esm/injection-engine/skillGraph/routePredicates.js +57 -0
  1060. package/dist/esm/injection-engine/skillGraph/routePredicates.js.map +1 -0
  1061. package/dist/esm/injection-engine/skillGraph/routingView.d.ts +3 -0
  1062. package/dist/esm/injection-engine/skillGraph/routingView.js +24 -0
  1063. package/dist/esm/injection-engine/skillGraph/routingView.js.map +1 -0
  1064. package/dist/esm/injection-engine/skillGraph/treeCompilation.d.ts +38 -0
  1065. package/dist/esm/injection-engine/skillGraph/treeCompilation.js +153 -0
  1066. package/dist/esm/injection-engine/skillGraph/treeCompilation.js.map +1 -0
  1067. package/dist/esm/injection-engine/skillGraph/triggerCompilation.d.ts +16 -0
  1068. package/dist/esm/injection-engine/skillGraph/triggerCompilation.js +75 -0
  1069. package/dist/esm/injection-engine/skillGraph/triggerCompilation.js.map +1 -0
  1070. package/dist/esm/injection-engine/skillGraph.d.ts +12 -948
  1071. package/dist/esm/injection-engine/skillGraph.js +22 -816
  1072. package/dist/esm/injection-engine/skillGraph.js.map +1 -1
  1073. package/dist/esm/injection-engine/skillIntent.d.ts +1 -1
  1074. package/dist/esm/injection-engine/skillMatch.d.ts +2 -1
  1075. package/dist/esm/injection-engine/skillMatch.js +2 -1
  1076. package/dist/esm/injection-engine/skillMatch.js.map +1 -1
  1077. package/dist/esm/injection-engine/skillToolDescriptors.js +2 -2
  1078. package/dist/esm/injection-engine/skillToolDescriptors.js.map +1 -1
  1079. package/dist/esm/injection-engine/startRuleClaim.d.ts +1 -1
  1080. package/dist/esm/injection-engine/types.d.ts +1 -1
  1081. package/dist/esm/lib/cosine.js.map +1 -0
  1082. package/dist/esm/lib/iterationBudget.d.ts +3 -0
  1083. package/dist/esm/lib/iterationBudget.js +7 -0
  1084. package/dist/esm/lib/iterationBudget.js.map +1 -1
  1085. package/dist/esm/lib/saidByPerson.d.ts +1 -0
  1086. package/dist/esm/lib/saidByPerson.js +2 -0
  1087. package/dist/esm/lib/saidByPerson.js.map +1 -1
  1088. package/dist/esm/lib/spokenIds.js +2 -2
  1089. package/dist/esm/lib/spokenIds.js.map +1 -1
  1090. package/dist/esm/lib/toolBytes.d.ts +1 -1
  1091. package/dist/esm/lib/toolBytes.js +2 -2
  1092. package/dist/esm/lib/toolBytes.js.map +1 -1
  1093. package/dist/esm/maps/engagement/lease.js +1 -1
  1094. package/dist/esm/maps/engagement/lease.js.map +1 -1
  1095. package/dist/esm/memory/causal/evidenceRecorder.d.ts +8 -56
  1096. package/dist/esm/memory/causal/evidenceRecorder.js +221 -213
  1097. package/dist/esm/memory/causal/evidenceRecorder.js.map +1 -1
  1098. package/dist/esm/memory/causal/loadSnapshot.js +16 -59
  1099. package/dist/esm/memory/causal/loadSnapshot.js.map +1 -1
  1100. package/dist/esm/memory/causal/observation.d.ts +72 -0
  1101. package/dist/esm/memory/causal/observation.js +13 -0
  1102. package/dist/esm/memory/causal/observation.js.map +1 -0
  1103. package/dist/esm/memory/causal/snapshotProjection.d.ts +5 -0
  1104. package/dist/esm/memory/causal/snapshotProjection.js +61 -0
  1105. package/dist/esm/memory/causal/snapshotProjection.js.map +1 -0
  1106. package/dist/esm/memory/causal/snapshotSchema.d.ts +8 -0
  1107. package/dist/esm/memory/causal/snapshotSchema.js +168 -0
  1108. package/dist/esm/memory/causal/snapshotSchema.js.map +1 -0
  1109. package/dist/esm/memory/causal/types.d.ts +5 -82
  1110. package/dist/esm/memory/causal/types.js +0 -18
  1111. package/dist/esm/memory/causal/types.js.map +1 -1
  1112. package/dist/esm/memory/causal/writeSnapshot.js +17 -14
  1113. package/dist/esm/memory/causal/writeSnapshot.js.map +1 -1
  1114. package/dist/esm/memory/embedding/index.d.ts +1 -1
  1115. package/dist/esm/memory/embedding/index.js +1 -1
  1116. package/dist/esm/memory/embedding/index.js.map +1 -1
  1117. package/dist/esm/memory/stages/types.d.ts +1 -1
  1118. package/dist/esm/memory/store/InMemoryStore.js +1 -1
  1119. package/dist/esm/memory/store/InMemoryStore.js.map +1 -1
  1120. package/dist/esm/memory/store/staticVectorStore.js +1 -1
  1121. package/dist/esm/memory/store/staticVectorStore.js.map +1 -1
  1122. package/dist/esm/memory/wire/mountMemoryPipeline.d.ts +7 -7
  1123. package/dist/esm/memory/wire/mountMemoryPipeline.js +8 -2
  1124. package/dist/esm/memory/wire/mountMemoryPipeline.js.map +1 -1
  1125. package/dist/esm/patterns/LlmRouter.d.ts +11 -149
  1126. package/dist/esm/patterns/LlmRouter.js +51 -179
  1127. package/dist/esm/patterns/LlmRouter.js.map +1 -1
  1128. package/dist/esm/patterns/LlmSwarm.d.ts +5 -49
  1129. package/dist/esm/patterns/LlmSwarm.js +7 -70
  1130. package/dist/esm/patterns/LlmSwarm.js.map +1 -1
  1131. package/dist/esm/patterns/MapReduce.js +33 -23
  1132. package/dist/esm/patterns/MapReduce.js.map +1 -1
  1133. package/dist/esm/patterns/Swarm.d.ts +14 -45
  1134. package/dist/esm/patterns/Swarm.js +230 -76
  1135. package/dist/esm/patterns/Swarm.js.map +1 -1
  1136. package/dist/esm/patterns/index.d.ts +1 -1
  1137. package/dist/esm/patterns/index.js.map +1 -1
  1138. package/dist/esm/patterns/routing.d.ts +15 -0
  1139. package/dist/esm/patterns/routing.js +18 -0
  1140. package/dist/esm/patterns/routing.js.map +1 -0
  1141. package/dist/esm/provider-contract/types.d.ts +5 -5
  1142. package/dist/esm/recorders/core/CompactionMeter.d.ts +1 -1
  1143. package/dist/esm/recorders/observability/BoundaryRecorder.d.ts +13 -427
  1144. package/dist/esm/recorders/observability/BoundaryRecorder.js +7 -283
  1145. package/dist/esm/recorders/observability/BoundaryRecorder.js.map +1 -1
  1146. package/dist/esm/recorders/observability/boundaryRecorder/agentInternal.d.ts +13 -0
  1147. package/dist/esm/recorders/observability/boundaryRecorder/agentInternal.js +58 -0
  1148. package/dist/esm/recorders/observability/boundaryRecorder/agentInternal.js.map +1 -0
  1149. package/dist/esm/recorders/observability/boundaryRecorder/domainEvents.d.ts +210 -0
  1150. package/dist/esm/recorders/observability/boundaryRecorder/domainEvents.js +2 -0
  1151. package/dist/esm/recorders/observability/boundaryRecorder/domainEvents.js.map +1 -0
  1152. package/dist/esm/recorders/observability/boundaryRecorder/eventBuilders.d.ts +11 -0
  1153. package/dist/esm/recorders/observability/boundaryRecorder/eventBuilders.js +77 -0
  1154. package/dist/esm/recorders/observability/boundaryRecorder/eventBuilders.js.map +1 -0
  1155. package/dist/esm/recorders/observability/boundaryRecorder/flowEvents.d.ts +12 -0
  1156. package/dist/esm/recorders/observability/boundaryRecorder/flowEvents.js +2 -0
  1157. package/dist/esm/recorders/observability/boundaryRecorder/flowEvents.js.map +1 -0
  1158. package/dist/esm/recorders/observability/boundaryRecorder/leanContent.d.ts +52 -0
  1159. package/dist/esm/recorders/observability/boundaryRecorder/leanContent.js +52 -0
  1160. package/dist/esm/recorders/observability/boundaryRecorder/leanContent.js.map +1 -0
  1161. package/dist/esm/recorders/observability/boundaryRecorder/options.d.ts +95 -0
  1162. package/dist/esm/recorders/observability/boundaryRecorder/options.js +2 -0
  1163. package/dist/esm/recorders/observability/boundaryRecorder/options.js.map +1 -0
  1164. package/dist/esm/recorders/observability/boundaryRecorder/rangeLabels.d.ts +33 -0
  1165. package/dist/esm/recorders/observability/boundaryRecorder/rangeLabels.js +39 -0
  1166. package/dist/esm/recorders/observability/boundaryRecorder/rangeLabels.js.map +1 -0
  1167. package/dist/esm/recorders/observability/boundaryRecorder/rollups.d.ts +53 -0
  1168. package/dist/esm/recorders/observability/boundaryRecorder/rollups.js +69 -0
  1169. package/dist/esm/recorders/observability/boundaryRecorder/rollups.js.map +1 -0
  1170. package/dist/esm/recorders/observability/fileRecordingSink.d.ts +2 -4
  1171. package/dist/esm/recorders/observability/fileRecordingSink.js +2 -4
  1172. package/dist/esm/recorders/observability/fileRecordingSink.js.map +1 -1
  1173. package/dist/esm/recorders/observability/recordingEnvelope.d.ts +6 -10
  1174. package/dist/esm/recorders/observability/recordingEnvelope.js +6 -10
  1175. package/dist/esm/recorders/observability/recordingEnvelope.js.map +1 -1
  1176. package/dist/esm/redaction/coverage.d.ts +5 -3
  1177. package/dist/esm/redaction/coverage.js +5 -3
  1178. package/dist/esm/redaction/coverage.js.map +1 -1
  1179. package/dist/esm/redaction/declared.d.ts +4 -0
  1180. package/dist/esm/redaction/declared.js +15 -2
  1181. package/dist/esm/redaction/declared.js.map +1 -1
  1182. package/dist/esm/redaction/knownStrings.d.ts +5 -34
  1183. package/dist/esm/redaction/knownStrings.js +10 -34
  1184. package/dist/esm/redaction/knownStrings.js.map +1 -1
  1185. package/dist/esm/redaction/marker.d.ts +1 -1
  1186. package/dist/esm/redaction/marker.js +1 -1
  1187. package/dist/esm/redaction/privateCaller.d.ts +43 -0
  1188. package/dist/esm/redaction/privateCaller.js +74 -0
  1189. package/dist/esm/redaction/privateCaller.js.map +1 -0
  1190. package/dist/esm/redaction/privateCheckpoint.d.ts +22 -0
  1191. package/dist/esm/redaction/privateCheckpoint.js +89 -0
  1192. package/dist/esm/redaction/privateCheckpoint.js.map +1 -0
  1193. package/dist/esm/redaction/privateFields.d.ts +28 -0
  1194. package/dist/esm/redaction/privateFields.js +152 -0
  1195. package/dist/esm/redaction/privateFields.js.map +1 -0
  1196. package/dist/esm/redaction/privateRun.d.ts +32 -0
  1197. package/dist/esm/redaction/privateRun.js +105 -0
  1198. package/dist/esm/redaction/privateRun.js.map +1 -0
  1199. package/dist/esm/redaction/runRedaction.d.ts +47 -41
  1200. package/dist/esm/redaction/runRedaction.js +134 -91
  1201. package/dist/esm/redaction/runRedaction.js.map +1 -1
  1202. package/dist/esm/redaction/served.d.ts +10 -4
  1203. package/dist/esm/redaction/served.js +28 -7
  1204. package/dist/esm/redaction/served.js.map +1 -1
  1205. package/dist/esm/resilience/withCircuitBreaker.d.ts +1 -1
  1206. package/dist/esm/resilience/withCircuitBreaker.js +1 -1
  1207. package/dist/esm/security/extractSequence.js +1 -1
  1208. package/dist/esm/semantics/coverage/answer.js +1 -1
  1209. package/dist/esm/semantics/coverage/answer.js.map +1 -1
  1210. package/dist/esm/semantics/coverage/composedCoverage.d.ts +1 -1
  1211. package/dist/esm/semantics/coverage/composedCoverage.js +1 -1
  1212. package/dist/esm/semantics/coverage/items.d.ts +1 -1
  1213. package/dist/esm/semantics/coverage/items.js +1 -1
  1214. package/dist/esm/semantics/coverage/read.d.ts +3 -3
  1215. package/dist/esm/semantics/coverage/read.js +3 -3
  1216. package/dist/esm/semantics/types.d.ts +1 -1
  1217. package/dist/esm/semantics/types.js +1 -1
  1218. package/dist/esm/time/drift.d.ts +1 -1
  1219. package/dist/esm/time/drift.js +1 -1
  1220. package/dist/esm/time-travel/servedView/assembly.d.ts +4 -0
  1221. package/dist/esm/time-travel/servedView/assembly.js +44 -0
  1222. package/dist/esm/time-travel/servedView/assembly.js.map +1 -0
  1223. package/dist/esm/time-travel/servedView/conversation.d.ts +8 -0
  1224. package/dist/esm/time-travel/servedView/conversation.js +30 -0
  1225. package/dist/esm/time-travel/servedView/conversation.js.map +1 -0
  1226. package/dist/esm/time-travel/servedView/findings.d.ts +11 -0
  1227. package/dist/esm/time-travel/servedView/findings.js +68 -0
  1228. package/dist/esm/time-travel/servedView/findings.js.map +1 -0
  1229. package/dist/esm/time-travel/servedView/gaps.d.ts +76 -0
  1230. package/dist/esm/time-travel/servedView/gaps.js +476 -0
  1231. package/dist/esm/time-travel/servedView/gaps.js.map +1 -0
  1232. package/dist/esm/time-travel/servedView/ontology.d.ts +4 -0
  1233. package/dist/esm/time-travel/servedView/ontology.js +60 -0
  1234. package/dist/esm/time-travel/servedView/ontology.js.map +1 -0
  1235. package/dist/esm/time-travel/servedView/recordReads.d.ts +44 -0
  1236. package/dist/esm/time-travel/servedView/recordReads.js +73 -0
  1237. package/dist/esm/time-travel/servedView/recordReads.js.map +1 -0
  1238. package/dist/esm/time-travel/servedView/requestOnly.d.ts +6 -0
  1239. package/dist/esm/time-travel/servedView/requestOnly.js +67 -0
  1240. package/dist/esm/time-travel/servedView/requestOnly.js.map +1 -0
  1241. package/dist/esm/time-travel/servedView/system.d.ts +15 -0
  1242. package/dist/esm/time-travel/servedView/system.js +36 -0
  1243. package/dist/esm/time-travel/servedView/system.js.map +1 -0
  1244. package/dist/esm/time-travel/servedView/tools.d.ts +9 -0
  1245. package/dist/esm/time-travel/servedView/tools.js +36 -0
  1246. package/dist/esm/time-travel/servedView/tools.js.map +1 -0
  1247. package/dist/esm/time-travel/servedView/value.d.ts +38 -0
  1248. package/dist/esm/time-travel/servedView/value.js +57 -0
  1249. package/dist/esm/time-travel/servedView/value.js.map +1 -0
  1250. package/dist/esm/time-travel/servedView.d.ts +5 -65
  1251. package/dist/esm/time-travel/servedView.js +155 -877
  1252. package/dist/esm/time-travel/servedView.js.map +1 -1
  1253. package/dist/esm/tools/displayName.d.ts +6 -0
  1254. package/dist/esm/tools/displayName.js +15 -0
  1255. package/dist/esm/tools/displayName.js.map +1 -0
  1256. package/dist/esm/tools/finiteLabel.d.ts +16 -0
  1257. package/dist/esm/tools/finiteLabel.js +28 -0
  1258. package/dist/esm/tools/finiteLabel.js.map +1 -0
  1259. package/dist/esm/tools/inputRequest.d.ts +1 -1
  1260. package/dist/esm/tools/inputRequest.js +2 -2
  1261. package/dist/esm/tools/toolParty.d.ts +17 -0
  1262. package/dist/esm/tools/toolParty.js +40 -0
  1263. package/dist/esm/tools/toolParty.js.map +1 -0
  1264. package/dist/esm/tools/toolProvider.d.ts +1 -0
  1265. package/dist/esm/tools/toolResourceOwner.d.ts +27 -0
  1266. package/dist/esm/tools/toolResourceOwner.js +79 -0
  1267. package/dist/esm/tools/toolResourceOwner.js.map +1 -0
  1268. package/dist/esm/tools/toolSessions/contracts.d.ts +130 -0
  1269. package/dist/esm/tools/toolSessions/contracts.js +7 -0
  1270. package/dist/esm/tools/toolSessions/contracts.js.map +1 -0
  1271. package/dist/esm/tools/toolSessions/keys.d.ts +53 -0
  1272. package/dist/esm/tools/toolSessions/keys.js +113 -0
  1273. package/dist/esm/tools/toolSessions/keys.js.map +1 -0
  1274. package/dist/esm/tools/toolSessions/localStatus.d.ts +7 -0
  1275. package/dist/esm/tools/toolSessions/localStatus.js +9 -0
  1276. package/dist/esm/tools/toolSessions/localStatus.js.map +1 -0
  1277. package/dist/esm/tools/toolSessions.d.ts +30 -178
  1278. package/dist/esm/tools/toolSessions.js +138 -119
  1279. package/dist/esm/tools/toolSessions.js.map +1 -1
  1280. package/dist/esm/tools/tools.d.ts +6 -8
  1281. package/dist/esm/tools/tools.js +5 -15
  1282. package/dist/esm/tools/tools.js.map +1 -1
  1283. package/dist/esm/trace-toolpack/traceToolpack/artifactFacts.d.ts +15 -0
  1284. package/dist/esm/trace-toolpack/traceToolpack/artifactFacts.js +14 -0
  1285. package/dist/esm/trace-toolpack/traceToolpack/artifactFacts.js.map +1 -0
  1286. package/dist/esm/trace-toolpack/traceToolpack/backtrackView.d.ts +17 -0
  1287. package/dist/esm/trace-toolpack/traceToolpack/backtrackView.js +117 -0
  1288. package/dist/esm/trace-toolpack/traceToolpack/backtrackView.js.map +1 -0
  1289. package/dist/esm/trace-toolpack/traceToolpack/contextErrors.d.ts +43 -0
  1290. package/dist/esm/trace-toolpack/traceToolpack/contextErrors.js +354 -0
  1291. package/dist/esm/trace-toolpack/traceToolpack/contextErrors.js.map +1 -0
  1292. package/dist/esm/trace-toolpack/traceToolpack/findInTrace.d.ts +26 -0
  1293. package/dist/esm/trace-toolpack/traceToolpack/findInTrace.js +178 -0
  1294. package/dist/esm/trace-toolpack/traceToolpack/findInTrace.js.map +1 -0
  1295. package/dist/esm/trace-toolpack/traceToolpack/findingEvidence.d.ts +73 -0
  1296. package/dist/esm/trace-toolpack/traceToolpack/findingEvidence.js +176 -0
  1297. package/dist/esm/trace-toolpack/traceToolpack/findingEvidence.js.map +1 -0
  1298. package/dist/esm/trace-toolpack/traceToolpack/innerRecords.d.ts +11 -0
  1299. package/dist/esm/trace-toolpack/traceToolpack/innerRecords.js +88 -0
  1300. package/dist/esm/trace-toolpack/traceToolpack/innerRecords.js.map +1 -0
  1301. package/dist/esm/trace-toolpack/traceToolpack/narrativeView.d.ts +3 -0
  1302. package/dist/esm/trace-toolpack/traceToolpack/narrativeView.js +44 -0
  1303. package/dist/esm/trace-toolpack/traceToolpack/narrativeView.js.map +1 -0
  1304. package/dist/esm/trace-toolpack/traceToolpack/navigationHints.d.ts +6 -0
  1305. package/dist/esm/trace-toolpack/traceToolpack/navigationHints.js +42 -0
  1306. package/dist/esm/trace-toolpack/traceToolpack/navigationHints.js.map +1 -0
  1307. package/dist/esm/trace-toolpack/traceToolpack/nodeView.d.ts +5 -0
  1308. package/dist/esm/trace-toolpack/traceToolpack/nodeView.js +130 -0
  1309. package/dist/esm/trace-toolpack/traceToolpack/nodeView.js.map +1 -0
  1310. package/dist/esm/trace-toolpack/traceToolpack/packIndex.d.ts +69 -0
  1311. package/dist/esm/trace-toolpack/traceToolpack/packIndex.js +155 -0
  1312. package/dist/esm/trace-toolpack/traceToolpack/packIndex.js.map +1 -0
  1313. package/dist/esm/trace-toolpack/traceToolpack/parameterSchemas.d.ts +10 -0
  1314. package/dist/esm/trace-toolpack/traceToolpack/parameterSchemas.js +36 -0
  1315. package/dist/esm/trace-toolpack/traceToolpack/parameterSchemas.js.map +1 -0
  1316. package/dist/esm/trace-toolpack/traceToolpack/recursiveFactory.d.ts +40 -0
  1317. package/dist/esm/trace-toolpack/traceToolpack/recursiveFactory.js +392 -0
  1318. package/dist/esm/trace-toolpack/traceToolpack/recursiveFactory.js.map +1 -0
  1319. package/dist/esm/trace-toolpack/traceToolpack/runOverview.d.ts +5 -0
  1320. package/dist/esm/trace-toolpack/traceToolpack/runOverview.js +114 -0
  1321. package/dist/esm/trace-toolpack/traceToolpack/runOverview.js.map +1 -0
  1322. package/dist/esm/trace-toolpack/traceToolpack/sliceView.d.ts +5 -0
  1323. package/dist/esm/trace-toolpack/traceToolpack/sliceView.js +87 -0
  1324. package/dist/esm/trace-toolpack/traceToolpack/sliceView.js.map +1 -0
  1325. package/dist/esm/trace-toolpack/traceToolpack/structuralLimits.d.ts +41 -0
  1326. package/dist/esm/trace-toolpack/traceToolpack/structuralLimits.js +44 -0
  1327. package/dist/esm/trace-toolpack/traceToolpack/structuralLimits.js.map +1 -0
  1328. package/dist/esm/trace-toolpack/traceToolpack/toolCallJournal.d.ts +105 -0
  1329. package/dist/esm/trace-toolpack/traceToolpack/toolCallJournal.js +384 -0
  1330. package/dist/esm/trace-toolpack/traceToolpack/toolCallJournal.js.map +1 -0
  1331. package/dist/esm/trace-toolpack/traceToolpack/valueLines.d.ts +29 -0
  1332. package/dist/esm/trace-toolpack/traceToolpack/valueLines.js +52 -0
  1333. package/dist/esm/trace-toolpack/traceToolpack/valueLines.js.map +1 -0
  1334. package/dist/esm/trace-toolpack/traceToolpack/valueQueries.d.ts +6 -0
  1335. package/dist/esm/trace-toolpack/traceToolpack/valueQueries.js +122 -0
  1336. package/dist/esm/trace-toolpack/traceToolpack/valueQueries.js.map +1 -0
  1337. package/dist/esm/trace-toolpack/traceToolpack/writerHints.d.ts +13 -0
  1338. package/dist/esm/trace-toolpack/traceToolpack/writerHints.js +43 -0
  1339. package/dist/esm/trace-toolpack/traceToolpack/writerHints.js.map +1 -0
  1340. package/dist/esm/trace-toolpack/traceToolpack.d.ts +15 -40
  1341. package/dist/esm/trace-toolpack/traceToolpack.js +15 -2452
  1342. package/dist/esm/trace-toolpack/traceToolpack.js.map +1 -1
  1343. package/dist/events/dispatcher.js +2 -2
  1344. package/dist/events/payloads/access.js +3 -0
  1345. package/dist/events/payloads/access.js.map +1 -0
  1346. package/dist/events/payloads/agent.js +3 -0
  1347. package/dist/events/payloads/agent.js.map +1 -0
  1348. package/dist/events/payloads/answer.js +3 -0
  1349. package/dist/events/payloads/answer.js.map +1 -0
  1350. package/dist/events/payloads/artifacts.js +3 -0
  1351. package/dist/events/payloads/artifacts.js.map +1 -0
  1352. package/dist/events/payloads/consent.js +3 -0
  1353. package/dist/events/payloads/consent.js.map +1 -0
  1354. package/dist/events/payloads/context.js +3 -0
  1355. package/dist/events/payloads/context.js.map +1 -0
  1356. package/dist/events/payloads/cost.js +3 -0
  1357. package/dist/events/payloads/cost.js.map +1 -0
  1358. package/dist/events/payloads/dependencyTypes.js +3 -0
  1359. package/dist/events/payloads/dependencyTypes.js.map +1 -0
  1360. package/dist/events/payloads/evaluation.js +3 -0
  1361. package/dist/events/payloads/evaluation.js.map +1 -0
  1362. package/dist/events/payloads/fallback.js +3 -0
  1363. package/dist/events/payloads/fallback.js.map +1 -0
  1364. package/dist/events/payloads/findings.js +3 -0
  1365. package/dist/events/payloads/findings.js.map +1 -0
  1366. package/dist/events/payloads/flow.js +3 -0
  1367. package/dist/events/payloads/flow.js.map +1 -0
  1368. package/dist/events/payloads/integrity.js +4 -0
  1369. package/dist/events/payloads/integrity.js.map +1 -0
  1370. package/dist/events/payloads/maps.js +4 -0
  1371. package/dist/events/payloads/maps.js.map +1 -0
  1372. package/dist/events/payloads/mcpRequests.js +4 -0
  1373. package/dist/events/payloads/mcpRequests.js.map +1 -0
  1374. package/dist/events/payloads/memory.js +4 -0
  1375. package/dist/events/payloads/memory.js.map +1 -0
  1376. package/dist/events/payloads/reliability.js +3 -0
  1377. package/dist/events/payloads/reliability.js.map +1 -0
  1378. package/dist/events/payloads/runConfiguration.js +3 -0
  1379. package/dist/events/payloads/runConfiguration.js.map +1 -0
  1380. package/dist/events/payloads/skills.js +3 -0
  1381. package/dist/events/payloads/skills.js.map +1 -0
  1382. package/dist/events/payloads/stream.js +3 -0
  1383. package/dist/events/payloads/stream.js.map +1 -0
  1384. package/dist/events/payloads/thinking.js +3 -0
  1385. package/dist/events/payloads/thinking.js.map +1 -0
  1386. package/dist/events/payloads/toolCatalog.js +3 -0
  1387. package/dist/events/payloads/toolCatalog.js.map +1 -0
  1388. package/dist/events/payloads/toolChoice.js +3 -0
  1389. package/dist/events/payloads/toolChoice.js.map +1 -0
  1390. package/dist/events/payloads/toolEffects.js +3 -0
  1391. package/dist/events/payloads/toolEffects.js.map +1 -0
  1392. package/dist/events/payloads/toolSemantics.js +3 -0
  1393. package/dist/events/payloads/toolSemantics.js.map +1 -0
  1394. package/dist/events/payloads/toolSessionPayloads.js +18 -0
  1395. package/dist/events/payloads/toolSessionPayloads.js.map +1 -0
  1396. package/dist/events/payloads/validation.js +3 -0
  1397. package/dist/events/payloads/validation.js.map +1 -0
  1398. package/dist/events/registry.js +5 -15
  1399. package/dist/events/registry.js.map +1 -1
  1400. package/dist/hosting/answeredPause.js +16 -28
  1401. package/dist/hosting/answeredPause.js.map +1 -1
  1402. package/dist/hosting/durability.js +10 -8
  1403. package/dist/hosting/durability.js.map +1 -1
  1404. package/dist/hosting/standingAgent.js +72 -108
  1405. package/dist/hosting/standingAgent.js.map +1 -1
  1406. package/dist/hosting/stream.js +2 -5
  1407. package/dist/hosting/stream.js.map +1 -1
  1408. package/dist/hosting/streamHandler.js +5 -5
  1409. package/dist/hosting/streamHandler.js.map +1 -1
  1410. package/dist/index.js +7 -10
  1411. package/dist/index.js.map +1 -1
  1412. package/dist/influence-core/attribute.js +1 -1
  1413. package/dist/influence-core/attribute.js.map +1 -1
  1414. package/dist/influence-core/contrastive.js +1 -1
  1415. package/dist/influence-core/contrastive.js.map +1 -1
  1416. package/dist/influence-core/margin.js +1 -1
  1417. package/dist/influence-core/margin.js.map +1 -1
  1418. package/dist/influence-core/signals.js +1 -1
  1419. package/dist/influence-core/signals.js.map +1 -1
  1420. package/dist/influence-core/similarity.js +1 -1
  1421. package/dist/influence-core/similarity.js.map +1 -1
  1422. package/dist/injection-engine/buildInjectionEngineSubflow.js +1 -1
  1423. package/dist/injection-engine/buildInjectionEngineSubflow.js.map +1 -1
  1424. package/dist/injection-engine/devWarn.js +3 -2
  1425. package/dist/injection-engine/devWarn.js.map +1 -1
  1426. package/dist/injection-engine/entryScorer.js +1 -1
  1427. package/dist/injection-engine/entryScorer.js.map +1 -1
  1428. package/dist/injection-engine/skillGraph/cursorEvidence.js +58 -0
  1429. package/dist/injection-engine/skillGraph/cursorEvidence.js.map +1 -0
  1430. package/dist/injection-engine/skillGraph/cursorResolution.js +245 -0
  1431. package/dist/injection-engine/skillGraph/cursorResolution.js.map +1 -0
  1432. package/dist/injection-engine/skillGraph/decision.js +15 -0
  1433. package/dist/injection-engine/skillGraph/decision.js.map +1 -0
  1434. package/dist/injection-engine/skillGraph/entryScores.js +34 -0
  1435. package/dist/injection-engine/skillGraph/entryScores.js.map +1 -0
  1436. package/dist/injection-engine/skillGraph/entrySuppression.js +50 -0
  1437. package/dist/injection-engine/skillGraph/entrySuppression.js.map +1 -0
  1438. package/dist/injection-engine/skillGraph/graphConfig.js +3 -0
  1439. package/dist/injection-engine/skillGraph/graphConfig.js.map +1 -0
  1440. package/dist/injection-engine/skillGraph/graphContracts.js +17 -0
  1441. package/dist/injection-engine/skillGraph/graphContracts.js.map +1 -0
  1442. package/dist/injection-engine/skillGraph/graphCursor.js +3 -0
  1443. package/dist/injection-engine/skillGraph/graphCursor.js.map +1 -0
  1444. package/dist/injection-engine/skillGraph/graphDrawing.js +35 -0
  1445. package/dist/injection-engine/skillGraph/graphDrawing.js.map +1 -0
  1446. package/dist/injection-engine/skillGraph/graphRoutes.js +3 -0
  1447. package/dist/injection-engine/skillGraph/graphRoutes.js.map +1 -0
  1448. package/dist/injection-engine/skillGraph/passMemo.js +42 -0
  1449. package/dist/injection-engine/skillGraph/passMemo.js.map +1 -0
  1450. package/dist/injection-engine/skillGraph/reachability.js +67 -0
  1451. package/dist/injection-engine/skillGraph/reachability.js.map +1 -0
  1452. package/dist/injection-engine/skillGraph/routePredicates.js +66 -0
  1453. package/dist/injection-engine/skillGraph/routePredicates.js.map +1 -0
  1454. package/dist/injection-engine/skillGraph/routingView.js +28 -0
  1455. package/dist/injection-engine/skillGraph/routingView.js.map +1 -0
  1456. package/dist/injection-engine/skillGraph/treeCompilation.js +158 -0
  1457. package/dist/injection-engine/skillGraph/treeCompilation.js.map +1 -0
  1458. package/dist/injection-engine/skillGraph/triggerCompilation.js +79 -0
  1459. package/dist/injection-engine/skillGraph/triggerCompilation.js.map +1 -0
  1460. package/dist/injection-engine/skillGraph.js +40 -832
  1461. package/dist/injection-engine/skillGraph.js.map +1 -1
  1462. package/dist/injection-engine/skillMatch.js +2 -1
  1463. package/dist/injection-engine/skillMatch.js.map +1 -1
  1464. package/dist/injection-engine/skillToolDescriptors.js +2 -2
  1465. package/dist/injection-engine/skillToolDescriptors.js.map +1 -1
  1466. package/dist/lib/cosine.js.map +1 -0
  1467. package/dist/lib/iterationBudget.js +9 -1
  1468. package/dist/lib/iterationBudget.js.map +1 -1
  1469. package/dist/lib/saidByPerson.js +3 -1
  1470. package/dist/lib/saidByPerson.js.map +1 -1
  1471. package/dist/lib/spokenIds.js +2 -2
  1472. package/dist/lib/spokenIds.js.map +1 -1
  1473. package/dist/lib/toolBytes.js +2 -2
  1474. package/dist/lib/toolBytes.js.map +1 -1
  1475. package/dist/maps/engagement/lease.js +1 -1
  1476. package/dist/maps/engagement/lease.js.map +1 -1
  1477. package/dist/memory/causal/evidenceRecorder.js +221 -213
  1478. package/dist/memory/causal/evidenceRecorder.js.map +1 -1
  1479. package/dist/memory/causal/loadSnapshot.js +16 -59
  1480. package/dist/memory/causal/loadSnapshot.js.map +1 -1
  1481. package/dist/memory/causal/observation.js +16 -0
  1482. package/dist/memory/causal/observation.js.map +1 -0
  1483. package/dist/memory/causal/snapshotProjection.js +65 -0
  1484. package/dist/memory/causal/snapshotProjection.js.map +1 -0
  1485. package/dist/memory/causal/snapshotSchema.js +172 -0
  1486. package/dist/memory/causal/snapshotSchema.js.map +1 -0
  1487. package/dist/memory/causal/types.js +0 -18
  1488. package/dist/memory/causal/types.js.map +1 -1
  1489. package/dist/memory/causal/writeSnapshot.js +17 -14
  1490. package/dist/memory/causal/writeSnapshot.js.map +1 -1
  1491. package/dist/memory/embedding/index.js +1 -1
  1492. package/dist/memory/embedding/index.js.map +1 -1
  1493. package/dist/memory/store/InMemoryStore.js +1 -1
  1494. package/dist/memory/store/InMemoryStore.js.map +1 -1
  1495. package/dist/memory/store/staticVectorStore.js +1 -1
  1496. package/dist/memory/store/staticVectorStore.js.map +1 -1
  1497. package/dist/memory/wire/mountMemoryPipeline.js +8 -2
  1498. package/dist/memory/wire/mountMemoryPipeline.js.map +1 -1
  1499. package/dist/patterns/LlmRouter.js +49 -177
  1500. package/dist/patterns/LlmRouter.js.map +1 -1
  1501. package/dist/patterns/LlmSwarm.js +7 -70
  1502. package/dist/patterns/LlmSwarm.js.map +1 -1
  1503. package/dist/patterns/MapReduce.js +30 -20
  1504. package/dist/patterns/MapReduce.js.map +1 -1
  1505. package/dist/patterns/Swarm.js +233 -79
  1506. package/dist/patterns/Swarm.js.map +1 -1
  1507. package/dist/patterns/index.js.map +1 -1
  1508. package/dist/patterns/routing.js +22 -0
  1509. package/dist/patterns/routing.js.map +1 -0
  1510. package/dist/recorders/observability/BoundaryRecorder.js +23 -299
  1511. package/dist/recorders/observability/BoundaryRecorder.js.map +1 -1
  1512. package/dist/recorders/observability/boundaryRecorder/agentInternal.js +61 -0
  1513. package/dist/recorders/observability/boundaryRecorder/agentInternal.js.map +1 -0
  1514. package/dist/recorders/observability/boundaryRecorder/domainEvents.js +3 -0
  1515. package/dist/recorders/observability/boundaryRecorder/domainEvents.js.map +1 -0
  1516. package/dist/recorders/observability/boundaryRecorder/eventBuilders.js +84 -0
  1517. package/dist/recorders/observability/boundaryRecorder/eventBuilders.js.map +1 -0
  1518. package/dist/recorders/observability/boundaryRecorder/flowEvents.js +3 -0
  1519. package/dist/recorders/observability/boundaryRecorder/flowEvents.js.map +1 -0
  1520. package/dist/recorders/observability/boundaryRecorder/leanContent.js +55 -0
  1521. package/dist/recorders/observability/boundaryRecorder/leanContent.js.map +1 -0
  1522. package/dist/recorders/observability/boundaryRecorder/options.js +3 -0
  1523. package/dist/recorders/observability/boundaryRecorder/options.js.map +1 -0
  1524. package/dist/recorders/observability/boundaryRecorder/rangeLabels.js +43 -0
  1525. package/dist/recorders/observability/boundaryRecorder/rangeLabels.js.map +1 -0
  1526. package/dist/recorders/observability/boundaryRecorder/rollups.js +72 -0
  1527. package/dist/recorders/observability/boundaryRecorder/rollups.js.map +1 -0
  1528. package/dist/recorders/observability/fileRecordingSink.js +2 -4
  1529. package/dist/recorders/observability/fileRecordingSink.js.map +1 -1
  1530. package/dist/recorders/observability/recordingEnvelope.js +6 -10
  1531. package/dist/recorders/observability/recordingEnvelope.js.map +1 -1
  1532. package/dist/redaction/coverage.js +5 -3
  1533. package/dist/redaction/coverage.js.map +1 -1
  1534. package/dist/redaction/declared.js +18 -3
  1535. package/dist/redaction/declared.js.map +1 -1
  1536. package/dist/redaction/knownStrings.js +10 -34
  1537. package/dist/redaction/knownStrings.js.map +1 -1
  1538. package/dist/redaction/marker.js +1 -1
  1539. package/dist/redaction/privateCaller.js +84 -0
  1540. package/dist/redaction/privateCaller.js.map +1 -0
  1541. package/dist/redaction/privateCheckpoint.js +99 -0
  1542. package/dist/redaction/privateCheckpoint.js.map +1 -0
  1543. package/dist/redaction/privateFields.js +159 -0
  1544. package/dist/redaction/privateFields.js.map +1 -0
  1545. package/dist/redaction/privateRun.js +112 -0
  1546. package/dist/redaction/privateRun.js.map +1 -0
  1547. package/dist/redaction/runRedaction.js +141 -93
  1548. package/dist/redaction/runRedaction.js.map +1 -1
  1549. package/dist/redaction/served.js +28 -7
  1550. package/dist/redaction/served.js.map +1 -1
  1551. package/dist/resilience/withCircuitBreaker.js +1 -1
  1552. package/dist/security/extractSequence.js +1 -1
  1553. package/dist/semantics/coverage/answer.js +1 -1
  1554. package/dist/semantics/coverage/answer.js.map +1 -1
  1555. package/dist/semantics/coverage/composedCoverage.js +1 -1
  1556. package/dist/semantics/coverage/items.js +1 -1
  1557. package/dist/semantics/coverage/read.js +3 -3
  1558. package/dist/semantics/types.js +1 -1
  1559. package/dist/time/drift.js +1 -1
  1560. package/dist/time-travel/servedView/assembly.js +48 -0
  1561. package/dist/time-travel/servedView/assembly.js.map +1 -0
  1562. package/dist/time-travel/servedView/conversation.js +34 -0
  1563. package/dist/time-travel/servedView/conversation.js.map +1 -0
  1564. package/dist/time-travel/servedView/findings.js +72 -0
  1565. package/dist/time-travel/servedView/findings.js.map +1 -0
  1566. package/dist/time-travel/servedView/gaps.js +480 -0
  1567. package/dist/time-travel/servedView/gaps.js.map +1 -0
  1568. package/dist/time-travel/servedView/ontology.js +64 -0
  1569. package/dist/time-travel/servedView/ontology.js.map +1 -0
  1570. package/dist/time-travel/servedView/recordReads.js +79 -0
  1571. package/dist/time-travel/servedView/recordReads.js.map +1 -0
  1572. package/dist/time-travel/servedView/requestOnly.js +71 -0
  1573. package/dist/time-travel/servedView/requestOnly.js.map +1 -0
  1574. package/dist/time-travel/servedView/system.js +41 -0
  1575. package/dist/time-travel/servedView/system.js.map +1 -0
  1576. package/dist/time-travel/servedView/tools.js +40 -0
  1577. package/dist/time-travel/servedView/tools.js.map +1 -0
  1578. package/dist/time-travel/servedView/value.js +62 -0
  1579. package/dist/time-travel/servedView/value.js.map +1 -0
  1580. package/dist/time-travel/servedView.js +161 -882
  1581. package/dist/time-travel/servedView.js.map +1 -1
  1582. package/dist/tools/displayName.js +19 -0
  1583. package/dist/tools/displayName.js.map +1 -0
  1584. package/dist/tools/finiteLabel.js +36 -0
  1585. package/dist/tools/finiteLabel.js.map +1 -0
  1586. package/dist/tools/inputRequest.js +2 -2
  1587. package/dist/tools/toolParty.js +45 -0
  1588. package/dist/tools/toolParty.js.map +1 -0
  1589. package/dist/tools/toolResourceOwner.js +87 -0
  1590. package/dist/tools/toolResourceOwner.js.map +1 -0
  1591. package/dist/tools/toolSessions/contracts.js +10 -0
  1592. package/dist/tools/toolSessions/contracts.js.map +1 -0
  1593. package/dist/tools/toolSessions/keys.js +120 -0
  1594. package/dist/tools/toolSessions/keys.js.map +1 -0
  1595. package/dist/tools/toolSessions/localStatus.js +13 -0
  1596. package/dist/tools/toolSessions/localStatus.js.map +1 -0
  1597. package/dist/tools/toolSessions.js +151 -127
  1598. package/dist/tools/toolSessions.js.map +1 -1
  1599. package/dist/tools/tools.js +18 -17
  1600. package/dist/tools/tools.js.map +1 -1
  1601. package/dist/trace-toolpack/traceToolpack/artifactFacts.js +18 -0
  1602. package/dist/trace-toolpack/traceToolpack/artifactFacts.js.map +1 -0
  1603. package/dist/trace-toolpack/traceToolpack/backtrackView.js +120 -0
  1604. package/dist/trace-toolpack/traceToolpack/backtrackView.js.map +1 -0
  1605. package/dist/trace-toolpack/traceToolpack/contextErrors.js +357 -0
  1606. package/dist/trace-toolpack/traceToolpack/contextErrors.js.map +1 -0
  1607. package/dist/trace-toolpack/traceToolpack/findInTrace.js +181 -0
  1608. package/dist/trace-toolpack/traceToolpack/findInTrace.js.map +1 -0
  1609. package/dist/trace-toolpack/traceToolpack/findingEvidence.js +189 -0
  1610. package/dist/trace-toolpack/traceToolpack/findingEvidence.js.map +1 -0
  1611. package/dist/trace-toolpack/traceToolpack/innerRecords.js +94 -0
  1612. package/dist/trace-toolpack/traceToolpack/innerRecords.js.map +1 -0
  1613. package/dist/trace-toolpack/traceToolpack/narrativeView.js +47 -0
  1614. package/dist/trace-toolpack/traceToolpack/narrativeView.js.map +1 -0
  1615. package/dist/trace-toolpack/traceToolpack/navigationHints.js +47 -0
  1616. package/dist/trace-toolpack/traceToolpack/navigationHints.js.map +1 -0
  1617. package/dist/trace-toolpack/traceToolpack/nodeView.js +133 -0
  1618. package/dist/trace-toolpack/traceToolpack/nodeView.js.map +1 -0
  1619. package/dist/trace-toolpack/traceToolpack/packIndex.js +160 -0
  1620. package/dist/trace-toolpack/traceToolpack/packIndex.js.map +1 -0
  1621. package/dist/trace-toolpack/traceToolpack/parameterSchemas.js +40 -0
  1622. package/dist/trace-toolpack/traceToolpack/parameterSchemas.js.map +1 -0
  1623. package/dist/trace-toolpack/traceToolpack/recursiveFactory.js +397 -0
  1624. package/dist/trace-toolpack/traceToolpack/recursiveFactory.js.map +1 -0
  1625. package/dist/trace-toolpack/traceToolpack/runOverview.js +117 -0
  1626. package/dist/trace-toolpack/traceToolpack/runOverview.js.map +1 -0
  1627. package/dist/trace-toolpack/traceToolpack/sliceView.js +90 -0
  1628. package/dist/trace-toolpack/traceToolpack/sliceView.js.map +1 -0
  1629. package/dist/trace-toolpack/traceToolpack/structuralLimits.js +71 -0
  1630. package/dist/trace-toolpack/traceToolpack/structuralLimits.js.map +1 -0
  1631. package/dist/trace-toolpack/traceToolpack/toolCallJournal.js +388 -0
  1632. package/dist/trace-toolpack/traceToolpack/toolCallJournal.js.map +1 -0
  1633. package/dist/trace-toolpack/traceToolpack/valueLines.js +60 -0
  1634. package/dist/trace-toolpack/traceToolpack/valueLines.js.map +1 -0
  1635. package/dist/trace-toolpack/traceToolpack/valueQueries.js +126 -0
  1636. package/dist/trace-toolpack/traceToolpack/valueQueries.js.map +1 -0
  1637. package/dist/trace-toolpack/traceToolpack/writerHints.js +47 -0
  1638. package/dist/trace-toolpack/traceToolpack/writerHints.js.map +1 -0
  1639. package/dist/trace-toolpack/traceToolpack.js +18 -2455
  1640. package/dist/trace-toolpack/traceToolpack.js.map +1 -1
  1641. package/dist/types/adapters/observability/auditShapes.d.ts +5 -31
  1642. package/dist/types/adapters/observability/auditShapes.d.ts.map +1 -1
  1643. package/dist/types/adapters/observability/otel.d.ts +1 -1
  1644. package/dist/types/bridge/eventMeta.d.ts +2 -0
  1645. package/dist/types/bridge/eventMeta.d.ts.map +1 -1
  1646. package/dist/types/core/Agent.d.ts +18 -121
  1647. package/dist/types/core/Agent.d.ts.map +1 -1
  1648. package/dist/types/core/LLMCall.d.ts +1 -4
  1649. package/dist/types/core/LLMCall.d.ts.map +1 -1
  1650. package/dist/types/core/RunnerBase.d.ts +42 -114
  1651. package/dist/types/core/RunnerBase.d.ts.map +1 -1
  1652. package/dist/types/core/agent/arguments/answerRows.d.ts +27 -0
  1653. package/dist/types/core/agent/arguments/answerRows.d.ts.map +1 -0
  1654. package/dist/types/core/agent/arguments/ask.d.ts +5 -11
  1655. package/dist/types/core/agent/arguments/ask.d.ts.map +1 -1
  1656. package/dist/types/core/agent/arguments/dispatch.d.ts +4 -4
  1657. package/dist/types/core/agent/arguments/dispatch.d.ts.map +1 -1
  1658. package/dist/types/core/agent/arguments/kept.d.ts +1 -1
  1659. package/dist/types/core/agent/arguments/partialWindow.d.ts +2 -1
  1660. package/dist/types/core/agent/arguments/partialWindow.d.ts.map +1 -1
  1661. package/dist/types/core/agent/arguments/pendingPrivateAsk.d.ts +38 -0
  1662. package/dist/types/core/agent/arguments/pendingPrivateAsk.d.ts.map +1 -0
  1663. package/dist/types/core/agent/arguments/privateAnswers.d.ts +47 -0
  1664. package/dist/types/core/agent/arguments/privateAnswers.d.ts.map +1 -0
  1665. package/dist/types/core/agent/arguments/resolutionRows.d.ts +30 -0
  1666. package/dist/types/core/agent/arguments/resolutionRows.d.ts.map +1 -0
  1667. package/dist/types/core/agent/arguments/resolve.d.ts +2 -13
  1668. package/dist/types/core/agent/arguments/resolve.d.ts.map +1 -1
  1669. package/dist/types/core/agent/arguments/serve.d.ts +0 -5
  1670. package/dist/types/core/agent/arguments/serve.d.ts.map +1 -1
  1671. package/dist/types/core/agent/arguments/subflow.d.ts.map +1 -1
  1672. package/dist/types/core/agent/buildAgentChart.d.ts +3 -326
  1673. package/dist/types/core/agent/buildAgentChart.d.ts.map +1 -1
  1674. package/dist/types/core/agent/buildToolRegistry.d.ts +1 -1
  1675. package/dist/types/core/agent/callerIdentity.d.ts +9 -64
  1676. package/dist/types/core/agent/callerIdentity.d.ts.map +1 -1
  1677. package/dist/types/core/agent/chartContract.d.ts +328 -0
  1678. package/dist/types/core/agent/chartContract.d.ts.map +1 -0
  1679. package/dist/types/core/agent/checkpointDomain.d.ts +12 -0
  1680. package/dist/types/core/agent/checkpointDomain.d.ts.map +1 -0
  1681. package/dist/types/core/agent/componentObservers.d.ts +15 -0
  1682. package/dist/types/core/agent/componentObservers.d.ts.map +1 -0
  1683. package/dist/types/core/agent/componentResources.d.ts +40 -0
  1684. package/dist/types/core/agent/componentResources.d.ts.map +1 -0
  1685. package/dist/types/core/agent/evidence/frames.d.ts.map +1 -1
  1686. package/dist/types/core/agent/evidence/servedJson.d.ts +1 -1
  1687. package/dist/types/core/agent/findings/contingent.d.ts +1 -1
  1688. package/dist/types/core/agent/findings/judge.d.ts +1 -1
  1689. package/dist/types/core/agent/findings/types.d.ts +1 -1
  1690. package/dist/types/core/agent/findings/unsettled.d.ts +3 -3
  1691. package/dist/types/core/agent/honesty/inputsMountContract.d.ts +67 -0
  1692. package/dist/types/core/agent/honesty/inputsMountContract.d.ts.map +1 -0
  1693. package/dist/types/core/agent/honesty/mounts.d.ts +4 -66
  1694. package/dist/types/core/agent/honesty/mounts.d.ts.map +1 -1
  1695. package/dist/types/core/agent/hostTurn.d.ts +18 -0
  1696. package/dist/types/core/agent/hostTurn.d.ts.map +1 -0
  1697. package/dist/types/core/agent/pauseOwnership.d.ts +25 -0
  1698. package/dist/types/core/agent/pauseOwnership.d.ts.map +1 -0
  1699. package/dist/types/core/agent/presentTool.d.ts +1 -1
  1700. package/dist/types/core/agent/resultCeiling.d.ts +1 -1
  1701. package/dist/types/core/agent/resumeAnswer.d.ts +11 -0
  1702. package/dist/types/core/agent/resumeAnswer.d.ts.map +1 -0
  1703. package/dist/types/core/agent/resumeCheckpoint.d.ts +13 -0
  1704. package/dist/types/core/agent/resumeCheckpoint.d.ts.map +1 -0
  1705. package/dist/types/core/agent/resumeError.d.ts +9 -0
  1706. package/dist/types/core/agent/resumeError.d.ts.map +1 -0
  1707. package/dist/types/core/agent/run/clocks.d.ts +45 -0
  1708. package/dist/types/core/agent/run/clocks.d.ts.map +1 -0
  1709. package/dist/types/core/agent/run/commitRunRedaction.d.ts +5 -0
  1710. package/dist/types/core/agent/run/commitRunRedaction.d.ts.map +1 -0
  1711. package/dist/types/core/agent/run/eventStageIds.d.ts +41 -0
  1712. package/dist/types/core/agent/run/eventStageIds.d.ts.map +1 -0
  1713. package/dist/types/core/agent/run/injectionDelivery.d.ts +5 -0
  1714. package/dist/types/core/agent/run/injectionDelivery.d.ts.map +1 -0
  1715. package/dist/types/core/agent/run/ledgerFacts.d.ts +9 -0
  1716. package/dist/types/core/agent/run/ledgerFacts.d.ts.map +1 -0
  1717. package/dist/types/core/agent/run/resumeRedaction.d.ts +7 -0
  1718. package/dist/types/core/agent/run/resumeRedaction.d.ts.map +1 -0
  1719. package/dist/types/core/agent/run/withoutTime.d.ts +9 -0
  1720. package/dist/types/core/agent/run/withoutTime.d.ts.map +1 -0
  1721. package/dist/types/core/agent/runValues.d.ts +72 -0
  1722. package/dist/types/core/agent/runValues.d.ts.map +1 -0
  1723. package/dist/types/core/agent/scripts/rows.d.ts +1 -1
  1724. package/dist/types/core/agent/scripts/types.d.ts +1 -1
  1725. package/dist/types/core/agent/stages/argumentAsk.d.ts +7 -1
  1726. package/dist/types/core/agent/stages/argumentAsk.d.ts.map +1 -1
  1727. package/dist/types/core/agent/stages/argumentParties.d.ts +4 -0
  1728. package/dist/types/core/agent/stages/argumentParties.d.ts.map +1 -0
  1729. package/dist/types/core/agent/stages/batchParties.d.ts +22 -0
  1730. package/dist/types/core/agent/stages/batchParties.d.ts.map +1 -0
  1731. package/dist/types/core/agent/stages/finalStageContract.d.ts +46 -0
  1732. package/dist/types/core/agent/stages/finalStageContract.d.ts.map +1 -0
  1733. package/dist/types/core/agent/stages/prepareFinal.d.ts +2 -45
  1734. package/dist/types/core/agent/stages/prepareFinal.d.ts.map +1 -1
  1735. package/dist/types/core/agent/stages/searchCoverage.d.ts +1 -1
  1736. package/dist/types/core/agent/stages/seed.d.ts.map +1 -1
  1737. package/dist/types/core/agent/stages/servedParties.d.ts +40 -0
  1738. package/dist/types/core/agent/stages/servedParties.d.ts.map +1 -0
  1739. package/dist/types/core/agent/stages/timeLayer.d.ts +3 -3
  1740. package/dist/types/core/agent/stages/timeLayer.d.ts.map +1 -1
  1741. package/dist/types/core/agent/stages/toolCallShape.d.ts +8 -0
  1742. package/dist/types/core/agent/stages/toolCallShape.d.ts.map +1 -0
  1743. package/dist/types/core/agent/stages/toolCalls/access/argumentGate.d.ts +22 -0
  1744. package/dist/types/core/agent/stages/toolCalls/access/argumentGate.d.ts.map +1 -0
  1745. package/dist/types/core/agent/stages/toolCalls/access/argumentValidation.d.ts +11 -0
  1746. package/dist/types/core/agent/stages/toolCalls/access/argumentValidation.d.ts.map +1 -0
  1747. package/dist/types/core/agent/stages/toolCalls/access/bindings.d.ts +62 -0
  1748. package/dist/types/core/agent/stages/toolCalls/access/bindings.d.ts.map +1 -0
  1749. package/dist/types/core/agent/stages/toolCalls/access/callState.d.ts +15 -0
  1750. package/dist/types/core/agent/stages/toolCalls/access/callState.d.ts.map +1 -0
  1751. package/dist/types/core/agent/stages/toolCalls/access/capabilityQuestion.d.ts +29 -0
  1752. package/dist/types/core/agent/stages/toolCalls/access/capabilityQuestion.d.ts.map +1 -0
  1753. package/dist/types/core/agent/stages/toolCalls/access/checkInAdmission.d.ts +45 -0
  1754. package/dist/types/core/agent/stages/toolCalls/access/checkInAdmission.d.ts.map +1 -0
  1755. package/dist/types/core/agent/stages/toolCalls/access/heldAnswer.d.ts +9 -0
  1756. package/dist/types/core/agent/stages/toolCalls/access/heldAnswer.d.ts.map +1 -0
  1757. package/dist/types/core/agent/stages/toolCalls/access/middlewareAdmission.d.ts +51 -0
  1758. package/dist/types/core/agent/stages/toolCalls/access/middlewareAdmission.d.ts.map +1 -0
  1759. package/dist/types/core/agent/stages/toolCalls/access/toolPermission.d.ts +25 -0
  1760. package/dist/types/core/agent/stages/toolCalls/access/toolPermission.d.ts.map +1 -0
  1761. package/dist/types/core/agent/stages/toolCalls/batch/completion.d.ts +19 -0
  1762. package/dist/types/core/agent/stages/toolCalls/batch/completion.d.ts.map +1 -0
  1763. package/dist/types/core/agent/stages/toolCalls/batch/dispatchContext.d.ts +37 -0
  1764. package/dist/types/core/agent/stages/toolCalls/batch/dispatchContext.d.ts.map +1 -0
  1765. package/dist/types/core/agent/stages/toolCalls/batch/execute.d.ts +8 -0
  1766. package/dist/types/core/agent/stages/toolCalls/batch/execute.d.ts.map +1 -0
  1767. package/dist/types/core/agent/stages/toolCalls/batch/findingsAdmission.d.ts +19 -0
  1768. package/dist/types/core/agent/stages/toolCalls/batch/findingsAdmission.d.ts.map +1 -0
  1769. package/dist/types/core/agent/stages/toolCalls/batch/inputResolutions.d.ts +7 -0
  1770. package/dist/types/core/agent/stages/toolCalls/batch/inputResolutions.d.ts.map +1 -0
  1771. package/dist/types/core/agent/stages/toolCalls/batch/paused.d.ts +66 -0
  1772. package/dist/types/core/agent/stages/toolCalls/batch/paused.d.ts.map +1 -0
  1773. package/dist/types/core/agent/stages/toolCalls/batch/refusal.d.ts +6 -0
  1774. package/dist/types/core/agent/stages/toolCalls/batch/refusal.d.ts.map +1 -0
  1775. package/dist/types/core/agent/stages/toolCalls/batch/settle.d.ts +67 -0
  1776. package/dist/types/core/agent/stages/toolCalls/batch/settle.d.ts.map +1 -0
  1777. package/dist/types/core/agent/stages/toolCalls/batch/settlementOperations.d.ts +18 -0
  1778. package/dist/types/core/agent/stages/toolCalls/batch/settlementOperations.d.ts.map +1 -0
  1779. package/dist/types/core/agent/stages/toolCalls/compose.d.ts +240 -0
  1780. package/dist/types/core/agent/stages/toolCalls/compose.d.ts.map +1 -0
  1781. package/dist/types/core/agent/stages/toolCalls/contracts/access.d.ts +111 -0
  1782. package/dist/types/core/agent/stages/toolCalls/contracts/access.d.ts.map +1 -0
  1783. package/dist/types/core/agent/stages/toolCalls/contracts/artifacts.d.ts +27 -0
  1784. package/dist/types/core/agent/stages/toolCalls/contracts/artifacts.d.ts.map +1 -0
  1785. package/dist/types/core/agent/stages/toolCalls/contracts/batchCall.d.ts +9 -0
  1786. package/dist/types/core/agent/stages/toolCalls/contracts/batchCall.d.ts.map +1 -0
  1787. package/dist/types/core/agent/stages/toolCalls/contracts/callCells.d.ts +44 -0
  1788. package/dist/types/core/agent/stages/toolCalls/contracts/callCells.d.ts.map +1 -0
  1789. package/dist/types/core/agent/stages/toolCalls/contracts/callFacts.d.ts +51 -0
  1790. package/dist/types/core/agent/stages/toolCalls/contracts/callFacts.d.ts.map +1 -0
  1791. package/dist/types/core/agent/stages/toolCalls/contracts/catalog.d.ts +57 -0
  1792. package/dist/types/core/agent/stages/toolCalls/contracts/catalog.d.ts.map +1 -0
  1793. package/dist/types/core/agent/stages/toolCalls/contracts/dispatchBatch.d.ts +18 -0
  1794. package/dist/types/core/agent/stages/toolCalls/contracts/dispatchBatch.d.ts.map +1 -0
  1795. package/dist/types/core/agent/stages/toolCalls/contracts/dispatchCall.d.ts +15 -0
  1796. package/dist/types/core/agent/stages/toolCalls/contracts/dispatchCall.d.ts.map +1 -0
  1797. package/dist/types/core/agent/stages/toolCalls/contracts/evidence.d.ts +212 -0
  1798. package/dist/types/core/agent/stages/toolCalls/contracts/evidence.d.ts.map +1 -0
  1799. package/dist/types/core/agent/stages/toolCalls/contracts/handlerDeps.d.ts +12 -0
  1800. package/dist/types/core/agent/stages/toolCalls/contracts/handlerDeps.d.ts.map +1 -0
  1801. package/dist/types/core/agent/stages/toolCalls/contracts/inputsDispatch.d.ts +3 -0
  1802. package/dist/types/core/agent/stages/toolCalls/contracts/inputsDispatch.d.ts.map +1 -0
  1803. package/dist/types/core/agent/stages/toolCalls/contracts/invocationInputs.d.ts +12 -0
  1804. package/dist/types/core/agent/stages/toolCalls/contracts/invocationInputs.d.ts.map +1 -0
  1805. package/dist/types/core/agent/stages/toolCalls/contracts/observation.d.ts +25 -0
  1806. package/dist/types/core/agent/stages/toolCalls/contracts/observation.d.ts.map +1 -0
  1807. package/dist/types/core/agent/stages/toolCalls/contracts/operations/artifacts.d.ts +38 -0
  1808. package/dist/types/core/agent/stages/toolCalls/contracts/operations/artifacts.d.ts.map +1 -0
  1809. package/dist/types/core/agent/stages/toolCalls/contracts/operations/catalog.d.ts +32 -0
  1810. package/dist/types/core/agent/stages/toolCalls/contracts/operations/catalog.d.ts.map +1 -0
  1811. package/dist/types/core/agent/stages/toolCalls/contracts/operations/context.d.ts +15 -0
  1812. package/dist/types/core/agent/stages/toolCalls/contracts/operations/context.d.ts.map +1 -0
  1813. package/dist/types/core/agent/stages/toolCalls/contracts/operations/coverage.d.ts +24 -0
  1814. package/dist/types/core/agent/stages/toolCalls/contracts/operations/coverage.d.ts.map +1 -0
  1815. package/dist/types/core/agent/stages/toolCalls/contracts/operations/credentials.d.ts +6 -0
  1816. package/dist/types/core/agent/stages/toolCalls/contracts/operations/credentials.d.ts.map +1 -0
  1817. package/dist/types/core/agent/stages/toolCalls/contracts/operations/effects.d.ts +15 -0
  1818. package/dist/types/core/agent/stages/toolCalls/contracts/operations/effects.d.ts.map +1 -0
  1819. package/dist/types/core/agent/stages/toolCalls/contracts/operations/integrity.d.ts +17 -0
  1820. package/dist/types/core/agent/stages/toolCalls/contracts/operations/integrity.d.ts.map +1 -0
  1821. package/dist/types/core/agent/stages/toolCalls/contracts/operations/limits.d.ts +20 -0
  1822. package/dist/types/core/agent/stages/toolCalls/contracts/operations/limits.d.ts.map +1 -0
  1823. package/dist/types/core/agent/stages/toolCalls/contracts/operations/middleware.d.ts +26 -0
  1824. package/dist/types/core/agent/stages/toolCalls/contracts/operations/middleware.d.ts.map +1 -0
  1825. package/dist/types/core/agent/stages/toolCalls/contracts/operations/observations.d.ts +9 -0
  1826. package/dist/types/core/agent/stages/toolCalls/contracts/operations/observations.d.ts.map +1 -0
  1827. package/dist/types/core/agent/stages/toolCalls/contracts/operations/progress.d.ts +12 -0
  1828. package/dist/types/core/agent/stages/toolCalls/contracts/operations/progress.d.ts.map +1 -0
  1829. package/dist/types/core/agent/stages/toolCalls/contracts/operations/resources.d.ts +13 -0
  1830. package/dist/types/core/agent/stages/toolCalls/contracts/operations/resources.d.ts.map +1 -0
  1831. package/dist/types/core/agent/stages/toolCalls/contracts/operations/resumedInvocation.d.ts +31 -0
  1832. package/dist/types/core/agent/stages/toolCalls/contracts/operations/resumedInvocation.d.ts.map +1 -0
  1833. package/dist/types/core/agent/stages/toolCalls/contracts/operations/scripts.d.ts +41 -0
  1834. package/dist/types/core/agent/stages/toolCalls/contracts/operations/scripts.d.ts.map +1 -0
  1835. package/dist/types/core/agent/stages/toolCalls/contracts/operations/semantics.d.ts +11 -0
  1836. package/dist/types/core/agent/stages/toolCalls/contracts/operations/semantics.d.ts.map +1 -0
  1837. package/dist/types/core/agent/stages/toolCalls/contracts/operations/settlement.d.ts +14 -0
  1838. package/dist/types/core/agent/stages/toolCalls/contracts/operations/settlement.d.ts.map +1 -0
  1839. package/dist/types/core/agent/stages/toolCalls/contracts/operations/steps.d.ts +27 -0
  1840. package/dist/types/core/agent/stages/toolCalls/contracts/operations/steps.d.ts.map +1 -0
  1841. package/dist/types/core/agent/stages/toolCalls/contracts/resources.d.ts +68 -0
  1842. package/dist/types/core/agent/stages/toolCalls/contracts/resources.d.ts.map +1 -0
  1843. package/dist/types/core/agent/stages/toolCalls/contracts/results.d.ts +27 -0
  1844. package/dist/types/core/agent/stages/toolCalls/contracts/results.d.ts.map +1 -0
  1845. package/dist/types/core/agent/stages/toolCalls/contracts/resumeFrames.d.ts +15 -0
  1846. package/dist/types/core/agent/stages/toolCalls/contracts/resumeFrames.d.ts.map +1 -0
  1847. package/dist/types/core/agent/stages/toolCalls/contracts/routing.d.ts +115 -0
  1848. package/dist/types/core/agent/stages/toolCalls/contracts/routing.d.ts.map +1 -0
  1849. package/dist/types/core/agent/stages/toolCalls/decorators/limitsOperations.d.ts +5 -0
  1850. package/dist/types/core/agent/stages/toolCalls/decorators/limitsOperations.d.ts.map +1 -0
  1851. package/dist/types/core/agent/stages/toolCalls/decorators/middlewareOperations.d.ts +5 -0
  1852. package/dist/types/core/agent/stages/toolCalls/decorators/middlewareOperations.d.ts.map +1 -0
  1853. package/dist/types/core/agent/stages/toolCalls/decorators/reportingCredentials.d.ts +30 -0
  1854. package/dist/types/core/agent/stages/toolCalls/decorators/reportingCredentials.d.ts.map +1 -0
  1855. package/dist/types/core/agent/stages/toolCalls/evidence/coverageOperations.d.ts +10 -0
  1856. package/dist/types/core/agent/stages/toolCalls/evidence/coverageOperations.d.ts.map +1 -0
  1857. package/dist/types/core/agent/stages/toolCalls/evidence/integrityOperations.d.ts +5 -0
  1858. package/dist/types/core/agent/stages/toolCalls/evidence/integrityOperations.d.ts.map +1 -0
  1859. package/dist/types/core/agent/stages/toolCalls/evidence/judgeLanded.d.ts +30 -0
  1860. package/dist/types/core/agent/stages/toolCalls/evidence/judgeLanded.d.ts.map +1 -0
  1861. package/dist/types/core/agent/stages/toolCalls/evidence/madeInRun.d.ts +7 -0
  1862. package/dist/types/core/agent/stages/toolCalls/evidence/madeInRun.d.ts.map +1 -0
  1863. package/dist/types/core/agent/stages/toolCalls/evidence/producerCorpus.d.ts +23 -0
  1864. package/dist/types/core/agent/stages/toolCalls/evidence/producerCorpus.d.ts.map +1 -0
  1865. package/dist/types/core/agent/stages/toolCalls/evidence/scriptsOperations.d.ts +12 -0
  1866. package/dist/types/core/agent/stages/toolCalls/evidence/scriptsOperations.d.ts.map +1 -0
  1867. package/dist/types/core/agent/stages/toolCalls/evidence/semanticsOperations.d.ts +5 -0
  1868. package/dist/types/core/agent/stages/toolCalls/evidence/semanticsOperations.d.ts.map +1 -0
  1869. package/dist/types/core/agent/stages/toolCalls/evidence/sourceClock.d.ts +12 -0
  1870. package/dist/types/core/agent/stages/toolCalls/evidence/sourceClock.d.ts.map +1 -0
  1871. package/dist/types/core/agent/stages/toolCalls/evidence/towers.d.ts +19 -0
  1872. package/dist/types/core/agent/stages/toolCalls/evidence/towers.d.ts.map +1 -0
  1873. package/dist/types/core/agent/stages/toolCalls/execution/artifactsOperations.d.ts +13 -0
  1874. package/dist/types/core/agent/stages/toolCalls/execution/artifactsOperations.d.ts.map +1 -0
  1875. package/dist/types/core/agent/stages/toolCalls/execution/callStart.d.ts +36 -0
  1876. package/dist/types/core/agent/stages/toolCalls/execution/callStart.d.ts.map +1 -0
  1877. package/dist/types/core/agent/stages/toolCalls/execution/catalogOperations.d.ts +18 -0
  1878. package/dist/types/core/agent/stages/toolCalls/execution/catalogOperations.d.ts.map +1 -0
  1879. package/dist/types/core/agent/stages/toolCalls/execution/contextOperations.d.ts +16 -0
  1880. package/dist/types/core/agent/stages/toolCalls/execution/contextOperations.d.ts.map +1 -0
  1881. package/dist/types/core/agent/stages/toolCalls/execution/credentialAdmission.d.ts +49 -0
  1882. package/dist/types/core/agent/stages/toolCalls/execution/credentialAdmission.d.ts.map +1 -0
  1883. package/dist/types/core/agent/stages/toolCalls/execution/credentialsOperations.d.ts +10 -0
  1884. package/dist/types/core/agent/stages/toolCalls/execution/credentialsOperations.d.ts.map +1 -0
  1885. package/dist/types/core/agent/stages/toolCalls/execution/deliveredResult.d.ts +41 -0
  1886. package/dist/types/core/agent/stages/toolCalls/execution/deliveredResult.d.ts.map +1 -0
  1887. package/dist/types/core/agent/stages/toolCalls/execution/dispatchCall.d.ts +6 -0
  1888. package/dist/types/core/agent/stages/toolCalls/execution/dispatchCall.d.ts.map +1 -0
  1889. package/dist/types/core/agent/stages/toolCalls/execution/initialInvocation.d.ts +71 -0
  1890. package/dist/types/core/agent/stages/toolCalls/execution/initialInvocation.d.ts.map +1 -0
  1891. package/dist/types/core/agent/stages/toolCalls/execution/resourcesOperations.d.ts +10 -0
  1892. package/dist/types/core/agent/stages/toolCalls/execution/resourcesOperations.d.ts.map +1 -0
  1893. package/dist/types/core/agent/stages/toolCalls/execution/resumedInvocation.d.ts +43 -0
  1894. package/dist/types/core/agent/stages/toolCalls/execution/resumedInvocation.d.ts.map +1 -0
  1895. package/dist/types/core/agent/stages/toolCalls/execution/wantedArguments.d.ts +20 -0
  1896. package/dist/types/core/agent/stages/toolCalls/execution/wantedArguments.d.ts.map +1 -0
  1897. package/dist/types/core/agent/stages/toolCalls/helpers/dedupeIds.d.ts +4 -0
  1898. package/dist/types/core/agent/stages/toolCalls/helpers/dedupeIds.d.ts.map +1 -0
  1899. package/dist/types/core/agent/stages/toolCalls/helpers/dispatchRefusals.d.ts +62 -0
  1900. package/dist/types/core/agent/stages/toolCalls/helpers/dispatchRefusals.d.ts.map +1 -0
  1901. package/dist/types/core/agent/stages/toolCalls/helpers/mountedCursor.d.ts +42 -0
  1902. package/dist/types/core/agent/stages/toolCalls/helpers/mountedCursor.d.ts.map +1 -0
  1903. package/dist/types/core/agent/stages/toolCalls/helpers/periodWarnings.d.ts +24 -0
  1904. package/dist/types/core/agent/stages/toolCalls/helpers/periodWarnings.d.ts.map +1 -0
  1905. package/dist/types/core/agent/stages/toolCalls/helpers/readSkillRefusal.d.ts +88 -0
  1906. package/dist/types/core/agent/stages/toolCalls/helpers/readSkillRefusal.d.ts.map +1 -0
  1907. package/dist/types/core/agent/stages/toolCalls/helpers/sourceNote.d.ts +9 -0
  1908. package/dist/types/core/agent/stages/toolCalls/helpers/sourceNote.d.ts.map +1 -0
  1909. package/dist/types/core/agent/stages/toolCalls/helpers/unscopedRun.d.ts +12 -0
  1910. package/dist/types/core/agent/stages/toolCalls/helpers/unscopedRun.d.ts.map +1 -0
  1911. package/dist/types/core/agent/stages/toolCalls/index.d.ts +15 -0
  1912. package/dist/types/core/agent/stages/toolCalls/index.d.ts.map +1 -0
  1913. package/dist/types/core/agent/stages/toolCalls/observation/callSettlement.d.ts +30 -0
  1914. package/dist/types/core/agent/stages/toolCalls/observation/callSettlement.d.ts.map +1 -0
  1915. package/dist/types/core/agent/stages/toolCalls/observation/observationsOperations.d.ts +5 -0
  1916. package/dist/types/core/agent/stages/toolCalls/observation/observationsOperations.d.ts.map +1 -0
  1917. package/dist/types/core/agent/stages/toolCalls/observation/progressOperations.d.ts +8 -0
  1918. package/dist/types/core/agent/stages/toolCalls/observation/progressOperations.d.ts.map +1 -0
  1919. package/dist/types/core/agent/stages/toolCalls/resume/ask.d.ts +45 -0
  1920. package/dist/types/core/agent/stages/toolCalls/resume/ask.d.ts.map +1 -0
  1921. package/dist/types/core/agent/stages/toolCalls/resume/checkIn.d.ts +40 -0
  1922. package/dist/types/core/agent/stages/toolCalls/resume/checkIn.d.ts.map +1 -0
  1923. package/dist/types/core/agent/stages/toolCalls/resume/credential.d.ts +38 -0
  1924. package/dist/types/core/agent/stages/toolCalls/resume/credential.d.ts.map +1 -0
  1925. package/dist/types/core/agent/stages/toolCalls/resume/handler.d.ts +7 -0
  1926. package/dist/types/core/agent/stages/toolCalls/resume/handler.d.ts.map +1 -0
  1927. package/dist/types/core/agent/stages/toolCalls/resume/plain.d.ts +33 -0
  1928. package/dist/types/core/agent/stages/toolCalls/resume/plain.d.ts.map +1 -0
  1929. package/dist/types/core/agent/stages/toolCalls/routing/effectsOperations.d.ts +5 -0
  1930. package/dist/types/core/agent/stages/toolCalls/routing/effectsOperations.d.ts.map +1 -0
  1931. package/dist/types/core/agent/stages/toolCalls/routing/policyHalt.d.ts +18 -0
  1932. package/dist/types/core/agent/stages/toolCalls/routing/policyHalt.d.ts.map +1 -0
  1933. package/dist/types/core/agent/stages/toolCalls/routing/readSkillRoute.d.ts +21 -0
  1934. package/dist/types/core/agent/stages/toolCalls/routing/readSkillRoute.d.ts.map +1 -0
  1935. package/dist/types/core/agent/stages/toolCalls/routing/skillActivation.d.ts +16 -0
  1936. package/dist/types/core/agent/stages/toolCalls/routing/skillActivation.d.ts.map +1 -0
  1937. package/dist/types/core/agent/stages/toolCalls/routing/stepsOperations.d.ts +5 -0
  1938. package/dist/types/core/agent/stages/toolCalls/routing/stepsOperations.d.ts.map +1 -0
  1939. package/dist/types/core/agent/stages/toolResolver.d.ts +3 -2
  1940. package/dist/types/core/agent/stages/toolResolver.d.ts.map +1 -1
  1941. package/dist/types/core/agent/toolChoice/pick.d.ts +1 -1
  1942. package/dist/types/core/agent/toolResultCap.d.ts +1 -1
  1943. package/dist/types/core/agent/types.d.ts +16 -27
  1944. package/dist/types/core/agent/types.d.ts.map +1 -1
  1945. package/dist/types/core/agent/window/toolNames.d.ts +3 -3
  1946. package/dist/types/core/answerConsumption.d.ts +8 -0
  1947. package/dist/types/core/answerConsumption.d.ts.map +1 -0
  1948. package/dist/types/core/checkin.d.ts +1 -1
  1949. package/dist/types/core/codeRunnerTool.d.ts +1 -1
  1950. package/dist/types/core/consentLedger.d.ts +22 -0
  1951. package/dist/types/core/consentLedger.d.ts.map +1 -0
  1952. package/dist/types/core/consentRequest.d.ts +35 -54
  1953. package/dist/types/core/consentRequest.d.ts.map +1 -1
  1954. package/dist/types/core/conversation.d.ts +8 -29
  1955. package/dist/types/core/conversation.d.ts.map +1 -1
  1956. package/dist/types/core/memberRun.d.ts +1 -0
  1957. package/dist/types/core/memberRun.d.ts.map +1 -1
  1958. package/dist/types/core/pause.d.ts +5 -5
  1959. package/dist/types/core/pauseRecord.d.ts +14 -0
  1960. package/dist/types/core/pauseRecord.d.ts.map +1 -0
  1961. package/dist/types/core/runEntry.d.ts +9 -0
  1962. package/dist/types/core/runEntry.d.ts.map +1 -0
  1963. package/dist/types/core/runnerCoreValues.d.ts +17 -0
  1964. package/dist/types/core/runnerCoreValues.d.ts.map +1 -0
  1965. package/dist/types/core/runnerExecution.d.ts +72 -0
  1966. package/dist/types/core/runnerExecution.d.ts.map +1 -0
  1967. package/dist/types/core/runnerLive.d.ts +32 -1
  1968. package/dist/types/core/runnerLive.d.ts.map +1 -1
  1969. package/dist/types/core/slots/buildThinkingSubflow.d.ts +1 -1
  1970. package/dist/types/core/slots/buildToolsSlot.d.ts +27 -56
  1971. package/dist/types/core/slots/buildToolsSlot.d.ts.map +1 -1
  1972. package/dist/types/core/slots/discoverTools.d.ts +22 -0
  1973. package/dist/types/core/slots/discoverTools.d.ts.map +1 -0
  1974. package/dist/types/core-flow/Conditional.d.ts +0 -2
  1975. package/dist/types/core-flow/Conditional.d.ts.map +1 -1
  1976. package/dist/types/core-flow/Graph.d.ts +18 -23
  1977. package/dist/types/core-flow/Graph.d.ts.map +1 -1
  1978. package/dist/types/core-flow/Loop.d.ts +0 -2
  1979. package/dist/types/core-flow/Loop.d.ts.map +1 -1
  1980. package/dist/types/core-flow/Parallel.d.ts +11 -40
  1981. package/dist/types/core-flow/Parallel.d.ts.map +1 -1
  1982. package/dist/types/core-flow/Sequence.d.ts +0 -2
  1983. package/dist/types/core-flow/Sequence.d.ts.map +1 -1
  1984. package/dist/types/core-flow/Workflow.d.ts +0 -2
  1985. package/dist/types/core-flow/Workflow.d.ts.map +1 -1
  1986. package/dist/types/events/dispatcher.d.ts +2 -2
  1987. package/dist/types/events/payloads/access.d.ts +89 -0
  1988. package/dist/types/events/payloads/access.d.ts.map +1 -0
  1989. package/dist/types/events/payloads/agent.d.ts +242 -0
  1990. package/dist/types/events/payloads/agent.d.ts.map +1 -0
  1991. package/dist/types/events/payloads/answer.d.ts +96 -0
  1992. package/dist/types/events/payloads/answer.d.ts.map +1 -0
  1993. package/dist/types/events/payloads/artifacts.d.ts +140 -0
  1994. package/dist/types/events/payloads/artifacts.d.ts.map +1 -0
  1995. package/dist/types/events/payloads/consent.d.ts +87 -0
  1996. package/dist/types/events/payloads/consent.d.ts.map +1 -0
  1997. package/dist/types/events/payloads/context.d.ts +277 -0
  1998. package/dist/types/events/payloads/context.d.ts.map +1 -0
  1999. package/dist/types/events/payloads/cost.d.ts +41 -0
  2000. package/dist/types/events/payloads/cost.d.ts.map +1 -0
  2001. package/dist/types/events/payloads/dependencyTypes.d.ts +19 -0
  2002. package/dist/types/events/payloads/dependencyTypes.d.ts.map +1 -0
  2003. package/dist/types/events/payloads/evaluation.d.ts +298 -0
  2004. package/dist/types/events/payloads/evaluation.d.ts.map +1 -0
  2005. package/dist/types/events/payloads/fallback.d.ts +7 -0
  2006. package/dist/types/events/payloads/fallback.d.ts.map +1 -0
  2007. package/dist/types/events/payloads/findings.d.ts +244 -0
  2008. package/dist/types/events/payloads/findings.d.ts.map +1 -0
  2009. package/dist/types/events/payloads/flow.d.ts +69 -0
  2010. package/dist/types/events/payloads/flow.d.ts.map +1 -0
  2011. package/dist/types/events/payloads/integrity.d.ts +49 -0
  2012. package/dist/types/events/payloads/integrity.d.ts.map +1 -0
  2013. package/dist/types/events/payloads/maps.d.ts +48 -0
  2014. package/dist/types/events/payloads/maps.d.ts.map +1 -0
  2015. package/dist/types/events/payloads/mcpRequests.d.ts +328 -0
  2016. package/dist/types/events/payloads/mcpRequests.d.ts.map +1 -0
  2017. package/dist/types/events/payloads/memory.d.ts +118 -0
  2018. package/dist/types/events/payloads/memory.d.ts.map +1 -0
  2019. package/dist/types/events/payloads/reliability.d.ts +150 -0
  2020. package/dist/types/events/payloads/reliability.d.ts.map +1 -0
  2021. package/dist/types/events/payloads/runConfiguration.d.ts +225 -0
  2022. package/dist/types/events/payloads/runConfiguration.d.ts.map +1 -0
  2023. package/dist/types/events/payloads/skills.d.ts +360 -0
  2024. package/dist/types/events/payloads/skills.d.ts.map +1 -0
  2025. package/dist/types/events/payloads/stream.d.ts +231 -0
  2026. package/dist/types/events/payloads/stream.d.ts.map +1 -0
  2027. package/dist/types/events/payloads/thinking.d.ts +119 -0
  2028. package/dist/types/events/payloads/thinking.d.ts.map +1 -0
  2029. package/dist/types/events/payloads/toolCatalog.d.ts +158 -0
  2030. package/dist/types/events/payloads/toolCatalog.d.ts.map +1 -0
  2031. package/dist/types/events/payloads/toolChoice.d.ts +66 -0
  2032. package/dist/types/events/payloads/toolChoice.d.ts.map +1 -0
  2033. package/dist/types/events/payloads/toolEffects.d.ts +330 -0
  2034. package/dist/types/events/payloads/toolEffects.d.ts.map +1 -0
  2035. package/dist/types/events/payloads/toolSemantics.d.ts +69 -0
  2036. package/dist/types/events/payloads/toolSemantics.d.ts.map +1 -0
  2037. package/dist/types/events/payloads/toolSessionPayloads.d.ts +51 -0
  2038. package/dist/types/events/payloads/toolSessionPayloads.d.ts.map +1 -0
  2039. package/dist/types/events/payloads/validation.d.ts +30 -0
  2040. package/dist/types/events/payloads/validation.d.ts.map +1 -0
  2041. package/dist/types/events/payloads.d.ts +26 -3888
  2042. package/dist/types/events/payloads.d.ts.map +1 -1
  2043. package/dist/types/events/registry.d.ts +8 -15
  2044. package/dist/types/events/registry.d.ts.map +1 -1
  2045. package/dist/types/hosting/answeredPause.d.ts +9 -23
  2046. package/dist/types/hosting/answeredPause.d.ts.map +1 -1
  2047. package/dist/types/hosting/durability.d.ts +10 -7
  2048. package/dist/types/hosting/durability.d.ts.map +1 -1
  2049. package/dist/types/hosting/standingAgent.d.ts +4 -14
  2050. package/dist/types/hosting/standingAgent.d.ts.map +1 -1
  2051. package/dist/types/hosting/stream.d.ts +3 -3
  2052. package/dist/types/hosting/stream.d.ts.map +1 -1
  2053. package/dist/types/hosting/streamHandler.d.ts.map +1 -1
  2054. package/dist/types/index.d.ts +2 -1
  2055. package/dist/types/index.d.ts.map +1 -1
  2056. package/dist/types/injection-engine/devWarn.d.ts +3 -2
  2057. package/dist/types/injection-engine/devWarn.d.ts.map +1 -1
  2058. package/dist/types/injection-engine/hostContract.d.ts +3 -3
  2059. package/dist/types/injection-engine/skillExamples.d.ts +1 -1
  2060. package/dist/types/injection-engine/skillGraph/cursorEvidence.d.ts +49 -0
  2061. package/dist/types/injection-engine/skillGraph/cursorEvidence.d.ts.map +1 -0
  2062. package/dist/types/injection-engine/skillGraph/cursorResolution.d.ts +5 -0
  2063. package/dist/types/injection-engine/skillGraph/cursorResolution.d.ts.map +1 -0
  2064. package/dist/types/injection-engine/skillGraph/decision.d.ts +22 -0
  2065. package/dist/types/injection-engine/skillGraph/decision.d.ts.map +1 -0
  2066. package/dist/types/injection-engine/skillGraph/entryScores.d.ts +15 -0
  2067. package/dist/types/injection-engine/skillGraph/entryScores.d.ts.map +1 -0
  2068. package/dist/types/injection-engine/skillGraph/entrySuppression.d.ts +24 -0
  2069. package/dist/types/injection-engine/skillGraph/entrySuppression.d.ts.map +1 -0
  2070. package/dist/types/injection-engine/skillGraph/graphConfig.d.ts +40 -0
  2071. package/dist/types/injection-engine/skillGraph/graphConfig.d.ts.map +1 -0
  2072. package/dist/types/injection-engine/skillGraph/graphContracts.d.ts +480 -0
  2073. package/dist/types/injection-engine/skillGraph/graphContracts.d.ts.map +1 -0
  2074. package/dist/types/injection-engine/skillGraph/graphCursor.d.ts +126 -0
  2075. package/dist/types/injection-engine/skillGraph/graphCursor.d.ts.map +1 -0
  2076. package/dist/types/injection-engine/skillGraph/graphDrawing.d.ts +3 -0
  2077. package/dist/types/injection-engine/skillGraph/graphDrawing.d.ts.map +1 -0
  2078. package/dist/types/injection-engine/skillGraph/graphRoutes.d.ts +270 -0
  2079. package/dist/types/injection-engine/skillGraph/graphRoutes.d.ts.map +1 -0
  2080. package/dist/types/injection-engine/skillGraph/passMemo.d.ts +25 -0
  2081. package/dist/types/injection-engine/skillGraph/passMemo.d.ts.map +1 -0
  2082. package/dist/types/injection-engine/skillGraph/reachability.d.ts +72 -0
  2083. package/dist/types/injection-engine/skillGraph/reachability.d.ts.map +1 -0
  2084. package/dist/types/injection-engine/skillGraph/routePredicates.d.ts +37 -0
  2085. package/dist/types/injection-engine/skillGraph/routePredicates.d.ts.map +1 -0
  2086. package/dist/types/injection-engine/skillGraph/routingView.d.ts +4 -0
  2087. package/dist/types/injection-engine/skillGraph/routingView.d.ts.map +1 -0
  2088. package/dist/types/injection-engine/skillGraph/treeCompilation.d.ts +39 -0
  2089. package/dist/types/injection-engine/skillGraph/treeCompilation.d.ts.map +1 -0
  2090. package/dist/types/injection-engine/skillGraph/triggerCompilation.d.ts +17 -0
  2091. package/dist/types/injection-engine/skillGraph/triggerCompilation.d.ts.map +1 -0
  2092. package/dist/types/injection-engine/skillGraph.d.ts +12 -948
  2093. package/dist/types/injection-engine/skillGraph.d.ts.map +1 -1
  2094. package/dist/types/injection-engine/skillIntent.d.ts +1 -1
  2095. package/dist/types/injection-engine/skillIntent.d.ts.map +1 -1
  2096. package/dist/types/injection-engine/skillMatch.d.ts +2 -1
  2097. package/dist/types/injection-engine/skillMatch.d.ts.map +1 -1
  2098. package/dist/types/injection-engine/startRuleClaim.d.ts +1 -1
  2099. package/dist/types/injection-engine/types.d.ts +1 -1
  2100. package/dist/types/lib/cosine.d.ts.map +1 -0
  2101. package/dist/types/lib/iterationBudget.d.ts +3 -0
  2102. package/dist/types/lib/iterationBudget.d.ts.map +1 -1
  2103. package/dist/types/lib/saidByPerson.d.ts +1 -0
  2104. package/dist/types/lib/saidByPerson.d.ts.map +1 -1
  2105. package/dist/types/lib/toolBytes.d.ts +1 -1
  2106. package/dist/types/memory/causal/evidenceRecorder.d.ts +8 -56
  2107. package/dist/types/memory/causal/evidenceRecorder.d.ts.map +1 -1
  2108. package/dist/types/memory/causal/loadSnapshot.d.ts.map +1 -1
  2109. package/dist/types/memory/causal/observation.d.ts +73 -0
  2110. package/dist/types/memory/causal/observation.d.ts.map +1 -0
  2111. package/dist/types/memory/causal/snapshotProjection.d.ts +6 -0
  2112. package/dist/types/memory/causal/snapshotProjection.d.ts.map +1 -0
  2113. package/dist/types/memory/causal/snapshotSchema.d.ts +9 -0
  2114. package/dist/types/memory/causal/snapshotSchema.d.ts.map +1 -0
  2115. package/dist/types/memory/causal/types.d.ts +5 -82
  2116. package/dist/types/memory/causal/types.d.ts.map +1 -1
  2117. package/dist/types/memory/causal/writeSnapshot.d.ts.map +1 -1
  2118. package/dist/types/memory/embedding/index.d.ts +1 -1
  2119. package/dist/types/memory/embedding/index.d.ts.map +1 -1
  2120. package/dist/types/memory/stages/types.d.ts +1 -1
  2121. package/dist/types/memory/wire/mountMemoryPipeline.d.ts +7 -7
  2122. package/dist/types/memory/wire/mountMemoryPipeline.d.ts.map +1 -1
  2123. package/dist/types/patterns/LlmRouter.d.ts +11 -149
  2124. package/dist/types/patterns/LlmRouter.d.ts.map +1 -1
  2125. package/dist/types/patterns/LlmSwarm.d.ts +5 -49
  2126. package/dist/types/patterns/LlmSwarm.d.ts.map +1 -1
  2127. package/dist/types/patterns/MapReduce.d.ts.map +1 -1
  2128. package/dist/types/patterns/Swarm.d.ts +14 -45
  2129. package/dist/types/patterns/Swarm.d.ts.map +1 -1
  2130. package/dist/types/patterns/index.d.ts +1 -1
  2131. package/dist/types/patterns/index.d.ts.map +1 -1
  2132. package/dist/types/patterns/routing.d.ts +16 -0
  2133. package/dist/types/patterns/routing.d.ts.map +1 -0
  2134. package/dist/types/provider-contract/types.d.ts +5 -5
  2135. package/dist/types/recorders/core/CompactionMeter.d.ts +1 -1
  2136. package/dist/types/recorders/observability/BoundaryRecorder.d.ts +13 -427
  2137. package/dist/types/recorders/observability/BoundaryRecorder.d.ts.map +1 -1
  2138. package/dist/types/recorders/observability/boundaryRecorder/agentInternal.d.ts +14 -0
  2139. package/dist/types/recorders/observability/boundaryRecorder/agentInternal.d.ts.map +1 -0
  2140. package/dist/types/recorders/observability/boundaryRecorder/domainEvents.d.ts +211 -0
  2141. package/dist/types/recorders/observability/boundaryRecorder/domainEvents.d.ts.map +1 -0
  2142. package/dist/types/recorders/observability/boundaryRecorder/eventBuilders.d.ts +12 -0
  2143. package/dist/types/recorders/observability/boundaryRecorder/eventBuilders.d.ts.map +1 -0
  2144. package/dist/types/recorders/observability/boundaryRecorder/flowEvents.d.ts +13 -0
  2145. package/dist/types/recorders/observability/boundaryRecorder/flowEvents.d.ts.map +1 -0
  2146. package/dist/types/recorders/observability/boundaryRecorder/leanContent.d.ts +53 -0
  2147. package/dist/types/recorders/observability/boundaryRecorder/leanContent.d.ts.map +1 -0
  2148. package/dist/types/recorders/observability/boundaryRecorder/options.d.ts +96 -0
  2149. package/dist/types/recorders/observability/boundaryRecorder/options.d.ts.map +1 -0
  2150. package/dist/types/recorders/observability/boundaryRecorder/rangeLabels.d.ts +34 -0
  2151. package/dist/types/recorders/observability/boundaryRecorder/rangeLabels.d.ts.map +1 -0
  2152. package/dist/types/recorders/observability/boundaryRecorder/rollups.d.ts +54 -0
  2153. package/dist/types/recorders/observability/boundaryRecorder/rollups.d.ts.map +1 -0
  2154. package/dist/types/recorders/observability/fileRecordingSink.d.ts +2 -4
  2155. package/dist/types/recorders/observability/fileRecordingSink.d.ts.map +1 -1
  2156. package/dist/types/recorders/observability/recordingEnvelope.d.ts +6 -10
  2157. package/dist/types/recorders/observability/recordingEnvelope.d.ts.map +1 -1
  2158. package/dist/types/redaction/coverage.d.ts +5 -3
  2159. package/dist/types/redaction/coverage.d.ts.map +1 -1
  2160. package/dist/types/redaction/declared.d.ts +4 -0
  2161. package/dist/types/redaction/declared.d.ts.map +1 -1
  2162. package/dist/types/redaction/knownStrings.d.ts +5 -34
  2163. package/dist/types/redaction/knownStrings.d.ts.map +1 -1
  2164. package/dist/types/redaction/marker.d.ts +1 -1
  2165. package/dist/types/redaction/privateCaller.d.ts +44 -0
  2166. package/dist/types/redaction/privateCaller.d.ts.map +1 -0
  2167. package/dist/types/redaction/privateCheckpoint.d.ts +23 -0
  2168. package/dist/types/redaction/privateCheckpoint.d.ts.map +1 -0
  2169. package/dist/types/redaction/privateFields.d.ts +29 -0
  2170. package/dist/types/redaction/privateFields.d.ts.map +1 -0
  2171. package/dist/types/redaction/privateRun.d.ts +33 -0
  2172. package/dist/types/redaction/privateRun.d.ts.map +1 -0
  2173. package/dist/types/redaction/runRedaction.d.ts +47 -41
  2174. package/dist/types/redaction/runRedaction.d.ts.map +1 -1
  2175. package/dist/types/redaction/served.d.ts +10 -4
  2176. package/dist/types/redaction/served.d.ts.map +1 -1
  2177. package/dist/types/resilience/withCircuitBreaker.d.ts +1 -1
  2178. package/dist/types/semantics/coverage/composedCoverage.d.ts +1 -1
  2179. package/dist/types/semantics/coverage/items.d.ts +1 -1
  2180. package/dist/types/semantics/coverage/read.d.ts +3 -3
  2181. package/dist/types/semantics/types.d.ts +1 -1
  2182. package/dist/types/time/drift.d.ts +1 -1
  2183. package/dist/types/time-travel/servedView/assembly.d.ts +5 -0
  2184. package/dist/types/time-travel/servedView/assembly.d.ts.map +1 -0
  2185. package/dist/types/time-travel/servedView/conversation.d.ts +9 -0
  2186. package/dist/types/time-travel/servedView/conversation.d.ts.map +1 -0
  2187. package/dist/types/time-travel/servedView/findings.d.ts +12 -0
  2188. package/dist/types/time-travel/servedView/findings.d.ts.map +1 -0
  2189. package/dist/types/time-travel/servedView/gaps.d.ts +77 -0
  2190. package/dist/types/time-travel/servedView/gaps.d.ts.map +1 -0
  2191. package/dist/types/time-travel/servedView/ontology.d.ts +5 -0
  2192. package/dist/types/time-travel/servedView/ontology.d.ts.map +1 -0
  2193. package/dist/types/time-travel/servedView/recordReads.d.ts +45 -0
  2194. package/dist/types/time-travel/servedView/recordReads.d.ts.map +1 -0
  2195. package/dist/types/time-travel/servedView/requestOnly.d.ts +7 -0
  2196. package/dist/types/time-travel/servedView/requestOnly.d.ts.map +1 -0
  2197. package/dist/types/time-travel/servedView/system.d.ts +16 -0
  2198. package/dist/types/time-travel/servedView/system.d.ts.map +1 -0
  2199. package/dist/types/time-travel/servedView/tools.d.ts +10 -0
  2200. package/dist/types/time-travel/servedView/tools.d.ts.map +1 -0
  2201. package/dist/types/time-travel/servedView/value.d.ts +39 -0
  2202. package/dist/types/time-travel/servedView/value.d.ts.map +1 -0
  2203. package/dist/types/time-travel/servedView.d.ts +5 -65
  2204. package/dist/types/time-travel/servedView.d.ts.map +1 -1
  2205. package/dist/types/tools/displayName.d.ts +7 -0
  2206. package/dist/types/tools/displayName.d.ts.map +1 -0
  2207. package/dist/types/tools/finiteLabel.d.ts +17 -0
  2208. package/dist/types/tools/finiteLabel.d.ts.map +1 -0
  2209. package/dist/types/tools/inputRequest.d.ts +1 -1
  2210. package/dist/types/tools/toolParty.d.ts +18 -0
  2211. package/dist/types/tools/toolParty.d.ts.map +1 -0
  2212. package/dist/types/tools/toolProvider.d.ts +1 -0
  2213. package/dist/types/tools/toolProvider.d.ts.map +1 -1
  2214. package/dist/types/tools/toolResourceOwner.d.ts +28 -0
  2215. package/dist/types/tools/toolResourceOwner.d.ts.map +1 -0
  2216. package/dist/types/tools/toolSessions/contracts.d.ts +131 -0
  2217. package/dist/types/tools/toolSessions/contracts.d.ts.map +1 -0
  2218. package/dist/types/tools/toolSessions/keys.d.ts +54 -0
  2219. package/dist/types/tools/toolSessions/keys.d.ts.map +1 -0
  2220. package/dist/types/tools/toolSessions/localStatus.d.ts +8 -0
  2221. package/dist/types/tools/toolSessions/localStatus.d.ts.map +1 -0
  2222. package/dist/types/tools/toolSessions.d.ts +30 -178
  2223. package/dist/types/tools/toolSessions.d.ts.map +1 -1
  2224. package/dist/types/tools/tools.d.ts +6 -8
  2225. package/dist/types/tools/tools.d.ts.map +1 -1
  2226. package/dist/types/trace-toolpack/traceToolpack/artifactFacts.d.ts +16 -0
  2227. package/dist/types/trace-toolpack/traceToolpack/artifactFacts.d.ts.map +1 -0
  2228. package/dist/types/trace-toolpack/traceToolpack/backtrackView.d.ts +18 -0
  2229. package/dist/types/trace-toolpack/traceToolpack/backtrackView.d.ts.map +1 -0
  2230. package/dist/types/trace-toolpack/traceToolpack/contextErrors.d.ts +44 -0
  2231. package/dist/types/trace-toolpack/traceToolpack/contextErrors.d.ts.map +1 -0
  2232. package/dist/types/trace-toolpack/traceToolpack/findInTrace.d.ts +27 -0
  2233. package/dist/types/trace-toolpack/traceToolpack/findInTrace.d.ts.map +1 -0
  2234. package/dist/types/trace-toolpack/traceToolpack/findingEvidence.d.ts +74 -0
  2235. package/dist/types/trace-toolpack/traceToolpack/findingEvidence.d.ts.map +1 -0
  2236. package/dist/types/trace-toolpack/traceToolpack/innerRecords.d.ts +12 -0
  2237. package/dist/types/trace-toolpack/traceToolpack/innerRecords.d.ts.map +1 -0
  2238. package/dist/types/trace-toolpack/traceToolpack/narrativeView.d.ts +4 -0
  2239. package/dist/types/trace-toolpack/traceToolpack/narrativeView.d.ts.map +1 -0
  2240. package/dist/types/trace-toolpack/traceToolpack/navigationHints.d.ts +7 -0
  2241. package/dist/types/trace-toolpack/traceToolpack/navigationHints.d.ts.map +1 -0
  2242. package/dist/types/trace-toolpack/traceToolpack/nodeView.d.ts +6 -0
  2243. package/dist/types/trace-toolpack/traceToolpack/nodeView.d.ts.map +1 -0
  2244. package/dist/types/trace-toolpack/traceToolpack/packIndex.d.ts +70 -0
  2245. package/dist/types/trace-toolpack/traceToolpack/packIndex.d.ts.map +1 -0
  2246. package/dist/types/trace-toolpack/traceToolpack/parameterSchemas.d.ts +11 -0
  2247. package/dist/types/trace-toolpack/traceToolpack/parameterSchemas.d.ts.map +1 -0
  2248. package/dist/types/trace-toolpack/traceToolpack/recursiveFactory.d.ts +41 -0
  2249. package/dist/types/trace-toolpack/traceToolpack/recursiveFactory.d.ts.map +1 -0
  2250. package/dist/types/trace-toolpack/traceToolpack/runOverview.d.ts +6 -0
  2251. package/dist/types/trace-toolpack/traceToolpack/runOverview.d.ts.map +1 -0
  2252. package/dist/types/trace-toolpack/traceToolpack/sliceView.d.ts +6 -0
  2253. package/dist/types/trace-toolpack/traceToolpack/sliceView.d.ts.map +1 -0
  2254. package/dist/types/trace-toolpack/traceToolpack/structuralLimits.d.ts +42 -0
  2255. package/dist/types/trace-toolpack/traceToolpack/structuralLimits.d.ts.map +1 -0
  2256. package/dist/types/trace-toolpack/traceToolpack/toolCallJournal.d.ts +106 -0
  2257. package/dist/types/trace-toolpack/traceToolpack/toolCallJournal.d.ts.map +1 -0
  2258. package/dist/types/trace-toolpack/traceToolpack/valueLines.d.ts +30 -0
  2259. package/dist/types/trace-toolpack/traceToolpack/valueLines.d.ts.map +1 -0
  2260. package/dist/types/trace-toolpack/traceToolpack/valueQueries.d.ts +7 -0
  2261. package/dist/types/trace-toolpack/traceToolpack/valueQueries.d.ts.map +1 -0
  2262. package/dist/types/trace-toolpack/traceToolpack/writerHints.d.ts +14 -0
  2263. package/dist/types/trace-toolpack/traceToolpack/writerHints.d.ts.map +1 -0
  2264. package/dist/types/trace-toolpack/traceToolpack.d.ts +15 -40
  2265. package/dist/types/trace-toolpack/traceToolpack.d.ts.map +1 -1
  2266. package/package.json +7 -6
  2267. package/dist/core/agent/stages/toolCalls.js +0 -6194
  2268. package/dist/core/agent/stages/toolCalls.js.map +0 -1
  2269. package/dist/esm/core/agent/stages/toolCalls.d.ts +0 -895
  2270. package/dist/esm/core/agent/stages/toolCalls.js +0 -6159
  2271. package/dist/esm/core/agent/stages/toolCalls.js.map +0 -1
  2272. package/dist/esm/memory/embedding/cosine.js.map +0 -1
  2273. package/dist/memory/embedding/cosine.js.map +0 -1
  2274. package/dist/types/core/agent/stages/toolCalls.d.ts +0 -896
  2275. package/dist/types/core/agent/stages/toolCalls.d.ts.map +0 -1
  2276. package/dist/types/memory/embedding/cosine.d.ts.map +0 -1
  2277. /package/dist/esm/{memory/embedding → lib}/cosine.d.ts +0 -0
  2278. /package/dist/esm/{memory/embedding → lib}/cosine.js +0 -0
  2279. /package/dist/{memory/embedding → lib}/cosine.js +0 -0
  2280. /package/dist/types/{memory/embedding → lib}/cosine.d.ts +0 -0
@@ -1,20 +1,14 @@
1
+ import { refuseFollowUpIdentity, refuseKnownSpentAnswer, refuseMissingPlainAnswer, } from './agent/resumeAnswer.js';
2
+ import { hostedTurns } from './agent/hostTurn.js';
3
+ import { componentResources } from './agent/componentResources.js';
4
+ import { resumeStateOf, resumeSessionOf } from './agent/resumeCheckpoint.js';
5
+ import { capturePauseOwnership, pendingQuestionOf, preservePendingQuestion, abandonStoredPause, abandonPendingQuestion, } from './agent/pauseOwnership.js';
6
+ import { registerRunnerLive, runnerLive } from './runnerLive.js';
7
+ import { agentComponentObservers, componentEvidence } from './agent/componentObservers.js';
8
+ import { bindScopeComputation, captureLateEmitter } from '../redaction/runRedaction.js';
9
+ import { createAgentRunValues } from './agent/runValues.js';
10
+ import { bindRunnerStage, } from './runnerExecution.js';
1
11
  import { findingsContextBytes } from './agent/findings/context.js';
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
- import { FlowChartExecutor, } from 'footprintjs';
18
12
  import { ReliabilityFailFastError } from '../reliability/types.js';
19
13
  import { extractSequence } from '../security/extractSequence.js';
20
14
  import { PolicyHaltError } from '../security/PolicyHaltError.js';
@@ -28,8 +22,8 @@ import { assistantReplayFields } from './agent/assistantReplay.js';
28
22
  import { buildBrainFor, describeServingBrain } from './agent/skillBrains.js';
29
23
  import { SUBFLOW_IDS } from '../lib/conventions.js';
30
24
  import { readDisplayName } from '../lib/displayName.js';
31
- import { DecisionRequiredError, ResumeDecisionError, assertDecisionIsNotStale, isPaused, pauseDemandsDecision, } from './pause.js';
32
- import { checkDecisionAgainst, noteDecisionTakenUp, pausedRequestIdOf, processDecisionLedger, registerConsentLedger, registerConsentRules, } from './consentRequest.js';
25
+ import { assertDecisionIsNotStale, isPaused, pauseDemandsDecision, } from './pause.js';
26
+ import { checkDecisionAgainst, processDecisionLedger, registerConsentLedger, registerConsentRules, } from './consentRequest.js';
33
27
  import { assertArtifactPlacement } from '../artifacts/placement.js';
34
28
  import { recordingPutInput } from '../artifacts/recordingArtifact.js';
35
29
  import { recordRunWhere } from '../recorders/observability/recordRun.js';
@@ -54,76 +48,33 @@ import { toolsRecorder } from '../recorders/core/ToolsRecorder.js';
54
48
  import { reliabilityRecorder } from '../recorders/core/ReliabilityRecorder.js';
55
49
  import { resilienceRecorder } from '../recorders/core/ResilienceRecorder.js';
56
50
  import { checkInEventsBridge } from '../recorders/core/CheckInRecorder.js';
57
- import { compactionMeter } from '../recorders/core/CompactionMeter.js';
58
- import { assertRedactionPolicy, CarriedPolicyError, carriedVocabularyOf, policyFromCarried, policyOfMarks, unionRedactionPolicies, } from '../redaction/policy.js';
59
- import { coverageOfExecutor } from '../redaction/runRedaction.js';
51
+ import { assertRedactionPolicy, unionRedactionPolicies } from '../redaction/policy.js';
60
52
  import { policyOfCoverage } from '../redaction/coverage.js';
61
53
  import { ResumeRedactionError } from './conversation.js';
62
- import { declareRedaction, redactionDeclaredBy } from '../redaction/declared.js';
63
- import { carriedRunPolicy, conversationRedaction, withCurrentVocabulary, } from '../redaction/conversation.js';
64
- import { createEvictedTurnsHandle } from './agent/window/evictedTurns.js';
65
- import { createReceiptDigests } from './agent/receipt/receiptDigests.js';
54
+ import { privateResumeOf } from '../redaction/privateCheckpoint.js';
55
+ import { declareRedaction, redactionDeclaredBy, declarePrivateFields, } from '../redaction/declared.js';
56
+ import { carriedRunPolicy, conversationRedaction } from '../redaction/conversation.js';
66
57
  import { packRecording } from '../recorders/observability/recordingPack.js';
67
58
  import { pendingDurableWrite } from './durabilityBarrier.js';
68
59
  import { ToolSessionTier, TOOL_TEARDOWN_TIMEOUT_MS, } from '../tools/toolSessions.js';
69
60
  import { buildEventMeta, eventBelongsToRun } from '../bridge/eventMeta.js';
70
- import { assertIdentityShape, callerIdentityOf, pausedSessionOf, restoredIdentityOf, sameIdentity, } from './agent/callerIdentity.js';
61
+ import { assertIdentityShape, callerIdentityOf, restoredIdentityOf, sameIdentity, } from './agent/callerIdentity.js';
71
62
  import { hostedConversationKey, hostedConversationOf, registerServingConversation, sessionConversationKey, } from './agent/servingConversation.js';
72
63
  import { buildRunManifest } from './agent/runManifest.js';
73
64
  import { beginIntegrityRun } from '../integrity/disposition/lifecycle.js';
74
- /**
75
- * The pseudo-stage a tool-teardown event is stamped with.
76
- *
77
- * `session_closed` and `session_close_failed` fire after the run's last stage
78
- * has committed — there is no runtimeStageId to inherit, and inventing one that
79
- * looked like a real stage would put a fictitious node in every consumer's step
80
- * strip. This says plainly where it came from, the way `'<stageId>#paused'`
81
- * does at the pause boundary. Their two siblings, `session_started` and
82
- * `session_reused`, happen inside a real stage and carry its real id.
83
- */
84
- const TOOL_TEARDOWN_STAGE_ID = 'tool-teardown#0';
85
- /**
86
- * The pseudo-stage a LATE artifact fact is stamped with — one that lands after
87
- * the run its binding was made in had ended (a tool's floating upload). Its
88
- * stage is long gone; like the teardown events it says plainly where it came
89
- * from, and carries the run it belongs to rather than the one that is live.
90
- */
91
- const LATE_ARTIFACT_FACT_STAGE_ID = 'artifact-late#0';
92
- /**
93
- * The pseudo-stage the run-configuration manifest is stamped with (9.41.0).
94
- *
95
- * Same reasoning as the teardown id above, at the other end of the run: the
96
- * manifest is dispatched before the chart starts, so there is no stage to
97
- * inherit and inventing a plausible one would put a node in every step strip
98
- * that no traversal ever visited. This says plainly where it came from.
99
- */
100
- const RUN_MANIFEST_STAGE_ID = 'run-configured#0';
101
- /**
102
- * Pseudo-stage for `agentfootprint.integrity.disposition` (9.60.0) — the
103
- * ledger is filed at the run boundary, after the last stage committed, so it
104
- * states where it came from exactly as the teardown id above does.
105
- */
106
- const INTEGRITY_DISPOSITION_STAGE_ID = 'integrity-disposition#0';
107
- /**
108
- * Pseudo-stage for `agentfootprint.skill.graph_declared` (9.50.0) — same
109
- * reasoning as the manifest id directly above: dispatched before the chart
110
- * starts, so it states where it came from instead of inheriting a stage no
111
- * traversal visited.
112
- */
113
- const GRAPH_DECLARED_STAGE_ID = 'graph-declared#0';
114
65
  import { EmitBridge } from '../recorders/core/EmitBridge.js';
115
66
  import { buildWindowStage } from './agent/stages/window.js';
116
67
  import { requireKeepLastToolResults } from './agent/window/options.js';
117
- import { assertDeliverableRole, buildDeliverStage } from './agent/stages/deliver.js';
68
+ import { buildDeliverStage } from './agent/stages/deliver.js';
118
69
  import { providerTargets } from './agent/providerTargets.js';
119
- import { messagesContentRefusal } from '../injection-engine/messagesSlotRefusal.js';
70
+ import { assertInjectionDelivery } from './agent/run/injectionDelivery.js';
120
71
  import { CompactionUnmeasurableError } from './agent/window/errors.js';
121
72
  import { resolveCheckInConfig, } from './checkin.js';
122
73
  import { assertCostBudgetHasPricing, resolveCostBudget } from './cost.js';
123
- import { causalEvidenceRecorder, } from '../memory/causal/evidenceRecorder.js';
124
74
  import { buildSystemPromptSlot } from './slots/buildSystemPromptSlot.js';
125
75
  import { buildMessagesSlot } from './slots/buildMessagesSlot.js';
126
- import { buildToolsSlot, } from './slots/buildToolsSlot.js';
76
+ import { buildToolsSlot } from './slots/buildToolsSlot.js';
77
+ import { ensureDiscoveredTools } from './slots/discoverTools.js';
127
78
  import { isDevMode } from 'footprintjs';
128
79
  import { buildReadSkillTool } from '../injection-engine/skillTools.js';
129
80
  import { foldStepPlans } from '../injection-engine/skillSteps.js';
@@ -144,14 +95,14 @@ import { makeRouteTurnStage } from './agent/stages/routeTurn.js';
144
95
  import { applyOutputFallback, } from './outputFallback.js';
145
96
  import { assertContinuable, buildCheckpoint, checkpointReplayHistory, retainReplayRetirements, classifyFailurePhase, RunCheckpointError, validateCheckpoint, } from './runCheckpoint.js';
146
97
  import { requireVerificationOnResume } from './agent/findings/verificationCheckpoint.js';
147
- import { NoConversationError, PendingQuestionError, ResumeIdentityConflictError, RunInFlightError, } from './conversation.js';
98
+ import { NoConversationError, PendingQuestionError, ResumeIdentityConflictError, } from './conversation.js';
148
99
  import { applyInputResponse, readAwaitingInput, } from '../tools/inputRequest.js';
149
100
  import { applyOutputSchema, OutputSchemaError, } from '../answer-validation/outputSchema.js';
150
101
  import { InvalidRunInputError, normalizeRunInput } from './runInput.js';
151
- import { clockOf } from '../time/rows.js';
152
- import { draftClock, readRunTime, readTimeOptions, } from '../time/clock.js';
102
+ import '../time/rows.js';
103
+ import { draftClock, readTimeOptions, } from '../time/clock.js';
153
104
  import { buildOutputRetryStage } from './agent/stages/outputRetry.js';
154
- import { RunnerBase, makeRunId, runSignalOf } from './RunnerBase.js';
105
+ import { RunnerBase } from './RunnerBase.js';
155
106
  import { clampIterations, validateMemoryIdUniqueness, validateToolNameUniqueness, } from './agent/validators.js';
156
107
  import { buildRouteDeciderStage } from './agent/stages/route.js';
157
108
  import { negativeCheckpointOf } from './agent/negativeClaims/checkpoint.js';
@@ -163,7 +114,7 @@ import { withAnswerCoverage } from './agent/stages/answerCoverage.js';
163
114
  import { AnswerValidationError, resolveAnswerValidation, } from '../answer-validation/index.js';
164
115
  import { buildSeedStage } from './agent/stages/seed.js';
165
116
  import { buildCallLLMStage } from './agent/stages/callLLM.js';
166
- import { buildToolCallsHandler, notServedResult } from './agent/stages/toolCalls.js';
117
+ import { buildToolCallsHandler, notServedResult } from './agent/stages/toolCalls/index.js';
167
118
  import { buildToolResolver } from './agent/stages/toolResolver.js';
168
119
  import { answeredValuesOf, declaredDefaultsFrom } from './agent/stages/route.js';
169
120
  import { isRefused, rulesOf } from '../tools/declare.js';
@@ -180,40 +131,15 @@ import { buildToolRegistry } from './agent/buildToolRegistry.js';
180
131
  import { AgentBuilder } from './agent/AgentBuilder.js';
181
132
  import { buildThinkingSubflow } from './slots/buildThinkingSubflow.js';
182
133
  import { thinkingForProviders } from '../thinking/dispatch.js';
134
+ import { TOOL_TEARDOWN_STAGE_ID, LATE_ARTIFACT_FACT_STAGE_ID, RUN_MANIFEST_STAGE_ID, INTEGRITY_DISPOSITION_STAGE_ID, GRAPH_DECLARED_STAGE_ID, } from './agent/run/eventStageIds.js';
135
+ import { requireKeepLedgerFacts, resolveKeepLedgerFacts } from './agent/run/ledgerFacts.js';
136
+ import { withoutTime } from './agent/run/withoutTime.js';
137
+ import { resumeRedactionOf } from './agent/run/resumeRedaction.js';
138
+ import { draftAgentClock, clockForSeed, readAgentTime, agentTimeAnswerContext, } from './agent/run/clocks.js';
183
139
  export { AgentBuilder };
184
140
  // Public types (AgentOptions, AgentInput, AgentOutput) extracted to
185
141
  // ./agent/types.ts and re-exported above (v2.11.1).
186
142
  // AgentState extracted to ./agent/types.ts (v2.11.1).
187
- /**
188
- * The ledger-fact hold's default ceiling (9.102.0): how many fact turns the
189
- * window holds beyond `keepRecentTurns` when `.findings()` and a window
190
- * strategy are both configured and nobody named a number. Resolved in the
191
- * constructor, ONCE, and threaded to `buildWindowStage` as a plain number —
192
- * the stage applies no default of its own (absent = unarmed = no hold), so a
193
- * reader has one place to look. `window/options.ts ·
194
- * DEFAULT_KEEP_LAST_TOOL_RESULTS` is the pin's twin of this constant.
195
- */
196
- const DEFAULT_KEEP_LEDGER_FACTS = 4;
197
- /**
198
- * Validate the `keepLedgerFacts` dial — `window/options.ts ·
199
- * requireKeepLastToolResults`'s twin: the same rule, the same moment.
200
- * Refused at construction, never mid-run.
201
- */
202
- function requireKeepLedgerFacts(value, label) {
203
- if (value === false)
204
- return;
205
- if (!Number.isInteger(value) || value < 0) {
206
- throw new Error(`${label}: keepLedgerFacts must be a whole number >= 0, or false, got ` +
207
- `${String(value)}. It is how many fact turns the window holds beyond ` +
208
- `keepRecentTurns under .findings(); 0 and false both switch the hold off.`);
209
- }
210
- }
211
- /** `false` → `0`; a number as named; nothing named → the default. */
212
- function resolveKeepLedgerFacts(named) {
213
- if (named === false)
214
- return 0;
215
- return named ?? DEFAULT_KEEP_LEDGER_FACTS;
216
- }
217
143
  export class Agent extends RunnerBase {
218
144
  name;
219
145
  id;
@@ -316,7 +242,6 @@ export class Agent extends RunnerBase {
316
242
  skillGraphCascade;
317
243
  /** Side channel for the conversation's inherited skill cursor (SG-C) —
318
244
  * stashed by `applyContinuation`, consumed-and-cleared by seed. */
319
- pendingResumeSkillCursor;
320
245
  pricingTable;
321
246
  /** Normalized at construction: a bare number is `{ usd, onExceed: 'warn' }`. */
322
247
  costBudget;
@@ -383,18 +308,15 @@ export class Agent extends RunnerBase {
383
308
  * cleared when `run()` ends, so a later turn this agent did not start (its
384
309
  * chart mounted in a composition) never stamps a clock nobody declared for
385
310
  * it (`seedClockDraft`). */
386
- runClockDraft;
387
311
  /** The incoming request each of this agent's OWN scopes serves — recorded
388
312
  * by the executor that made the scope (`createExecutor`), so a scope keeps
389
313
  * ITS run's request for as long as it lives: a stage still running after
390
314
  * its run was aborted can never be served the next run's request. A stage
391
315
  * mounted in another runner's executor reads its run's request by link
392
316
  * (`memberRun.ts`). Never written to scope. */
393
- scopeRequests = new WeakMap();
394
317
  /** The `time` the CURRENT resume passed, as read — TAKEN once by the first
395
318
  * ToolCalls pass of the resumed leg (`ToolCallsHandlerDeps.time`), and
396
319
  * cleared when `run()` or `resume()` ends. */
397
- resumePassedTime;
398
320
  /** Tool choice by classifier (9.105.0, `.toolChoice()`): the classifier,
399
321
  * the serve dial and the app's own doors. Threaded to the tools slot (the
400
322
  * pick and the narrowing), to call-llm (`toolChoice: true`, the outcome
@@ -438,13 +360,6 @@ export class Agent extends RunnerBase {
438
360
  /** The message chain (`.messageMiddleware()`), in declaration order. Empty
439
361
  * keeps seed synchronous and prepare-final untouched. */
440
362
  messageMiddleware;
441
- /** The instrument the window stage reads mid-run (adapter-reported usage +
442
- * per-message provenance). Only ever created alongside a strategy. */
443
- compactionMeterHandle;
444
- /** The window stage's seam to the receipt (9.93.0): what left the window at
445
- * this iteration's head, read by the call-llm mint in the same iteration.
446
- * Only ever created alongside a strategy, like the meter. */
447
- evictedTurnsHandle;
448
363
  /** Snapshot read-tracking policy (#18/#14) — forwarded to the internal
449
364
  * executor. Agent default is `'summary'` (cheap markers), NOT
450
365
  * footprintjs's `'full'`. See AgentOptions.readTracking. */
@@ -494,9 +409,6 @@ export class Agent extends RunnerBase {
494
409
  * plumbing, never scope state). `run()` resets it; the run boundary
495
410
  * files its report and clears it.
496
411
  */
497
- integrityLedgerHolder = {
498
- current: undefined,
499
- };
500
412
  /** Set at chart build: whether any tool in the FULL declared catalog
501
413
  * (static registry + skill-carried tools) declared `argumentsFrom`. */
502
414
  integrityDanglingPresent = false;
@@ -531,9 +443,6 @@ export class Agent extends RunnerBase {
531
443
  * every `run()` / `resume()` so one run can never raise on another's block,
532
444
  * and cleared per service the moment that credential is issued.
533
445
  */
534
- consentOutstanding = new Map();
535
- /** Evidence bridge (#5) — present iff a CAUSAL memory is mounted. */
536
- causalEvidence;
537
446
  /** Observer delivery tier (RFC-001 Block 10). `'inline'` (default) is
538
447
  * byte-identical to pre-10 releases; `'deferred'` routes the bridge
539
448
  * recorders + consumer attachments through footprintjs's bounded
@@ -552,11 +461,6 @@ export class Agent extends RunnerBase {
552
461
  appName;
553
462
  commentaryTemplates;
554
463
  thinkingTemplates;
555
- currentRunContext = {
556
- runStartMs: 0,
557
- runId: 'pending',
558
- compositionPath: [],
559
- };
560
464
  /**
561
465
  * The typed ask the CURRENT run's resume answered — set by
562
466
  * `resume()` when a person's answer completed an `awaitingInput`, cleared
@@ -565,8 +469,6 @@ export class Agent extends RunnerBase {
565
469
  * `ToolCallsHandlerDeps.answeredAsk`. The count crosses checkpoints on the
566
470
  * awaiting-input shape itself (`repeat.count`), not here.
567
471
  */
568
- answeredAsk;
569
- // `lastExecutor` is now inherited as a protected field from RunnerBase
570
472
  // (single canonical source for footprintjs snapshot access across all
571
473
  // runners). Agent's `getLastSnapshot()` delegates to the inherited
572
474
  // implementation but is kept here for the JSDoc + clearer return type.
@@ -610,28 +512,21 @@ export class Agent extends RunnerBase {
610
512
  * instead of starting fresh, and appends this turn's user entry when
611
513
  * `appendsUserTurn` says so. Cleared on first read so subsequent runs
612
514
  * start clean. */
613
- pendingResumeHistory;
614
515
  /** Retried request's repair state; never inherited by a new human turn. */
615
- pendingEvidenceRecovery;
616
516
  /** Its sibling for the folded spans. A restored conversation that dropped
617
517
  * them would carry summaries nobody could unpack — the evidence would be
618
518
  * destroyed by the act of continuing, which is the one thing retention
619
519
  * exists to prevent. Cleared on first read, exactly like the history. */
620
- pendingResumeFolded;
621
520
  /** Its sibling for the findings ledger (9.101.0) — the model's standings
622
521
  * on results this process never saw, carried by the checkpoint and
623
522
  * restored as a stored record. Cleared on first read, like the history. */
624
- pendingResumeFindingsLedger;
625
523
  /** The last completed run's final answer — see `checkpoint()` for why it is
626
524
  * kept here rather than read back from the recording. Undefined after a run
627
525
  * that failed or paused. */
628
- lastRunAnswer;
629
526
  /** Last run's checkpoint owner, including explicit replay edits from a failed child stage. */
630
- checkpointTracker;
631
527
  /** Whether any run on this instance got past input admission — so a
632
528
  * refused FIRST turn is reported as 'never-run', never as "continue from
633
529
  * your earlier accepted checkpoint" when there is none. */
634
- hadAdmittedRun = false;
635
530
  /** The id the CONSUMER chose, or undefined when they took the default.
636
531
  * `this.id` cannot answer that question — it is `'agent'` either way — and
637
532
  * the stored-conversation fingerprint refuses only on ids somebody picked
@@ -647,28 +542,22 @@ export class Agent extends RunnerBase {
647
542
  * paused run's own record (`agent/callerIdentity.ts · callerIdentityOf`).
648
543
  * A resume that inherited it instead stored another person's identity on
649
544
  * a shared agent and none on a rebuilt pooled one. */
650
- lastRunIdentity;
651
545
  /** Run ids this instance minted, most recent last (bounded) — evidence that a
652
546
  * checkpoint's `{ conversationId: '<runId>' }` is the per-run default
653
547
  * (`agent/callerIdentity.ts`). */
654
- mintedRunIds = new Set();
655
548
  /** The self-explain evidence key of the run in flight (or served last):
656
549
  * its session, else a host's per-request key, else undefined
657
550
  * (`agent/servingConversation.ts`). */
658
- servingConversation;
659
551
  /** How long ONE tool teardown may take before the runner stops waiting.
660
552
  * See `AgentOptions.toolTeardownTimeoutMs`. */
661
553
  toolTeardownTimeoutMs;
662
554
  /** The run in flight, by id — the whole of the one-turn-at-a-time guard.
663
555
  * Set before the executor is built and cleared in `finally`, so a run that
664
556
  * throws does not leave the agent permanently refusing. */
665
- inFlightRunId;
666
557
  /** The scopes this agent's OWN executors made — see the `isOwnRun` seed dep. */
667
- ownScopes = new WeakSet();
668
558
  /** The question a person still owes this agent an answer to. Set when a run
669
559
  * ends paused, cleared by `resume()`, `abandonPause()`, or a run that
670
560
  * completes. Read by the `run()` guard — see `PendingQuestionError`. */
671
- pendingQuestion;
672
561
  /** The `.selfExplain()` binding, when the builder mounted one. Held so
673
562
  * `canExplain()` can answer the same question the trace tools answer, from
674
563
  * the same fact. Undefined on every agent that never called `.selfExplain()`. */
@@ -741,9 +630,6 @@ export class Agent extends RunnerBase {
741
630
  /** `AgentOptions.recordReceipt` (9.88.0) — ON by default. `false` declines
742
631
  * the mint at `callLLM`; nothing else about the run changes. */
743
632
  recordReceiptValue = true;
744
- /** The receipt memo every call of a run mints through — one per agent,
745
- * rebinding itself to each run id (`core/agent/receipt/receiptDigests.ts`). */
746
- receiptDigests = createReceiptDigests();
747
633
  answerValidationConfig;
748
634
  negativeClaimsConfig;
749
635
  typedNegativeClaimsConfig;
@@ -753,11 +639,15 @@ export class Agent extends RunnerBase {
753
639
  // Which conversation this instance's self-explain evidence belongs to —
754
640
  // held in a module registry, not on the class, so it is not public API
755
641
  // (`agent/servingConversation.ts`).
756
- registerServingConversation(this, () => ({
757
- conversation: this.servingConversation,
758
- runId: this.currentRunContext.runId,
759
- ...(this.servingConversation?.startsWith('hosted:') === true && { oneShot: true }),
760
- }));
642
+ registerServingConversation(this, () => {
643
+ const selected = this.runExecution().selected();
644
+ const conversation = selected?.value.servingConversation;
645
+ return {
646
+ conversation,
647
+ runId: selected?.context.runId ?? 'pending',
648
+ ...(conversation?.startsWith('hosted:') === true && { oneShot: true }),
649
+ };
650
+ });
761
651
  this.negativeClaimsConfig = negativeClaimsConfig;
762
652
  this.typedNegativeClaimsConfig =
763
653
  negativeClaimsConfig?.mode === 'typed' ? negativeClaimsConfig : undefined;
@@ -850,20 +740,6 @@ export class Agent extends RunnerBase {
850
740
  // Eager validation: memory ids must be unique so per-id scope keys
851
741
  // (`memoryInjection_${id}`) don't collide.
852
742
  validateMemoryIdUniqueness(memories);
853
- // Evidence bridge (#5): a CAUSAL memory gets a run-scoped harvest recorder
854
- // (decisions/toolCalls/iterations/duration/tokens). Attached per run below;
855
- // its `collect` is threaded into the write mount via chartDeps.
856
- if (memories.some((m) => m.type === 'causal')) {
857
- const evidence = causalEvidenceRecorder();
858
- this.causalEvidence = evidence;
859
- // A causal memory is working state: its store keeps what a later run
860
- // replays to the MODEL, so its tool calls are read on the real-value
861
- // path, never off the served events — a policy keeps a run's records
862
- // clean, never what the agent will compute on (`src/redaction/`). The
863
- // decisions it keeps come from footprintjs's flow channel, which serves
864
- // them under the policy (a named limit in `src/redaction/README.md`).
865
- this.dispatcher.onRealEvent((event) => evidence.onEmit({ name: event.type, payload: event.payload }));
866
- }
867
743
  // A dial without its switch — refused rather than run as a no-op (8.13.0).
868
744
  // Same policy as `observerDeliveryOptions` below; the message and the check
869
745
  // are shared with LLMCall, which takes the identical pair.
@@ -958,20 +834,8 @@ export class Agent extends RunnerBase {
958
834
  // (attached per run, cleared between runs like every other recorder)
959
835
  // because the window stage closes over it at chart-build time — and the
960
836
  // chart is built once.
961
- if (windowStrategy !== undefined) {
837
+ if (windowStrategy !== undefined)
962
838
  this.windowStrategy = windowStrategy;
963
- const meter = compactionMeter();
964
- this.compactionMeterHandle = meter;
965
- this.evictedTurnsHandle = createEvictedTurnsHandle();
966
- // The provider's token count is a MEASUREMENT the window decides on, so
967
- // the meter reads it on the real-value path, never off the served event:
968
- // a redaction pattern that happens to match `input` must not switch
969
- // compaction off (`src/redaction/runRedaction.ts`).
970
- this.dispatcher.onRealEvent((event) => {
971
- if (event.type === 'agentfootprint.stream.llm_end')
972
- meter.noteLlmEnd(event.payload);
973
- });
974
- }
975
839
  // The two governance chains. Empty arrays (not undefined) so every read
976
840
  // site is a plain `.length > 0` test rather than an optional dance.
977
841
  this.toolMiddleware = toolMiddleware ?? [];
@@ -1200,20 +1064,60 @@ export class Agent extends RunnerBase {
1200
1064
  this.appName = voice.appName;
1201
1065
  this.commentaryTemplates = voice.commentaryTemplates;
1202
1066
  this.thinkingTemplates = voice.thinkingTemplates;
1203
- // Eager chart construction — see `RunnerBase.initChart` JSDoc.
1204
- // Note re Agent specifics (footprintjs inventor's review):
1205
- // - `providerToolCache: { current: Tool[] }` is closed over by the
1206
- // chart's Discover + dispatch stages. It's shared across
1207
- // sequential runs of this Agent instance, but the Discover stage
1208
- // overwrites `current` at the start of every iteration (line 158
1209
- // of `buildToolsSlot.ts`), so stale data never reaches a tool
1210
- // call. Concurrent runs on the SAME Agent instance already share
1211
- // `currentRunContext` and the recorder dispatcher — eager build
1212
- // doesn't change that constraint.
1213
- // - `currentRunContext` is read by the per-stage `getRunCtx`
1214
- // lambda at execution time (not at chart-build time), so a fresh
1215
- // value per run still flows through correctly.
1216
- this.initChart(() => this.buildChart());
1067
+ // Build the chart once. Private executable tool catalogs and their domain
1068
+ // handlers are initialized in the actual native component, shared with
1069
+ // its internal charts and isolated from other mounts and admissions.
1070
+ this.initChart(() => this.buildChart(), {
1071
+ runnerId: this.id,
1072
+ compositionPath: [`Agent:${this.id}`],
1073
+ initialize: () => {
1074
+ const values = createAgentRunValues({ window: this.windowStrategy !== undefined });
1075
+ this.beginIntegrityLedger(values);
1076
+ return values;
1077
+ },
1078
+ options: {
1079
+ readTracking: this.readTracking,
1080
+ commitValues: this.commitValues,
1081
+ writeProvenance: this.writeProvenance,
1082
+ },
1083
+ componentSetup: (component, value, entry) => {
1084
+ value.resources = componentResources(component, () => this.toolSessions());
1085
+ if (entry?.kind === 'resume')
1086
+ value.resources.expectAnswer();
1087
+ const observers = agentComponentObservers(component, value, entry, {
1088
+ causal: this.memories.some((memory) => memory.type === 'causal'),
1089
+ window: this.windowStrategy !== undefined,
1090
+ });
1091
+ return {
1092
+ recorder: observers.recorder,
1093
+ bindScope: (scope) => {
1094
+ const run = this.runExecution().forScope(scope);
1095
+ value.resources?.bindReporter((status) => captureLateEmitter(scope, TOOL_TEARDOWN_STAGE_ID)?.('agentfootprint.tools.resource_restore', status));
1096
+ bindScopeComputation(scope, {
1097
+ owner: component,
1098
+ retired: () => run.retired,
1099
+ emit: observers.emit,
1100
+ });
1101
+ },
1102
+ };
1103
+ },
1104
+ });
1105
+ const live = runnerLive(this);
1106
+ if (live === undefined)
1107
+ throw new TypeError('Agent live taps were not initialized');
1108
+ registerRunnerLive(this, {
1109
+ ...live,
1110
+ turn: hostedTurns(this.runExecution(), {
1111
+ run: (run, input, options) => this.runOwned(run, input, options),
1112
+ resume: (run, checkpoint, input, options) => this.resumeOwned(run, checkpoint, input, options),
1113
+ prepareResume: (checkpoint) => this.noteResumeTakenUp(checkpoint),
1114
+ checkpoint: (run) => this.checkpointFor(run),
1115
+ }),
1116
+ pause: {
1117
+ capture: (outcome) => capturePauseOwnership(this.runExecution().selected()?.value, outcome),
1118
+ abandon: (checkpoint) => this.runExecution().withRun(() => abandonStoredPause(checkpoint, () => this.toolSessions())),
1119
+ },
1120
+ });
1217
1121
  }
1218
1122
  static create(opts) {
1219
1123
  return new AgentBuilder(opts);
@@ -1259,13 +1163,26 @@ export class Agent extends RunnerBase {
1259
1163
  * The one difference is the timeline's filter: a recording filed FOR a
1260
1164
  * person keeps only the events of that person's run.
1261
1165
  */
1262
- startRunRecording() {
1166
+ startRunRecording(invocation) {
1263
1167
  if (this.artifactRecordings === undefined || this.artifactStore === undefined)
1264
1168
  return undefined;
1265
1169
  // Only THIS run's events: on an instance serving several sessions, the
1266
1170
  // hosting door emits facts for other sessions while this run is in flight,
1267
1171
  // and a recording is redeemable by the person it was filed for.
1268
- return recordRunWhere(this, (event) => this.ownsEvent(event));
1172
+ const recording = recordRunWhere(this, (event) => invocation.run.origin !== undefined && eventBelongsToRun(event.meta, invocation.context()));
1173
+ let outcome;
1174
+ // Registered before component setup. Native reverse finalization joins
1175
+ // resource cleanup first, then files this recording, then detaches it.
1176
+ invocation.run.onFinalize(() => recording.stop());
1177
+ invocation.run.onFinalize(async () => {
1178
+ if (outcome !== undefined)
1179
+ await this.fileRunRecording(invocation, recording, outcome);
1180
+ });
1181
+ return {
1182
+ complete(value) {
1183
+ outcome = value;
1184
+ },
1185
+ };
1269
1186
  }
1270
1187
  /**
1271
1188
  * Does `event` belong to the run this agent is serving (or served last)? The
@@ -1276,13 +1193,14 @@ export class Agent extends RunnerBase {
1276
1193
  * @internal
1277
1194
  */
1278
1195
  ownsEvent(event) {
1279
- return eventBelongsToRun(event.meta, this.currentRunContext);
1196
+ const selected = this.runExecution().selected();
1197
+ return selected !== undefined && eventBelongsToRun(event.meta, selected.context);
1280
1198
  }
1281
1199
  /**
1282
1200
  * File the finished recording into the artifact store.
1283
1201
  *
1284
1202
  * ── When ────────────────────────────────────────────────────────────────
1285
- * After the answer is composed, and only for a run that COMPLETED. A pause
1203
+ * After the answer and joined component resource cleanup, only for a run that COMPLETED. A pause
1286
1204
  * is not a finished run (the turn continues, and the resume mints its own);
1287
1205
  * a throw never reaches here at all.
1288
1206
  *
@@ -1306,14 +1224,14 @@ export class Agent extends RunnerBase {
1306
1224
  * The recording is FROZEN before the mint, so it can never contain the
1307
1225
  * `artifacts.minted` event describing itself.
1308
1226
  */
1309
- async fileRunRecording(recorder, outcome) {
1227
+ async fileRunRecording(invocation, recorder, outcome) {
1310
1228
  const store = this.artifactStore;
1311
1229
  if (recorder === undefined || store === undefined || this.artifactRecordings === undefined) {
1312
1230
  return;
1313
1231
  }
1314
1232
  if (isPaused(outcome))
1315
1233
  return;
1316
- const runId = this.currentRunContext?.runId;
1234
+ const runId = invocation.context().runId;
1317
1235
  let input;
1318
1236
  try {
1319
1237
  const recording = recorder.toRecording();
@@ -1329,7 +1247,7 @@ export class Agent extends RunnerBase {
1329
1247
  return;
1330
1248
  }
1331
1249
  try {
1332
- const result = await store.put(this.runArtifactScope(), input);
1250
+ const result = await store.put(this.runArtifactScope(invocation), input);
1333
1251
  // Sweeps ride the put result, so retention that evicted an older
1334
1252
  // recording to make room says so on the record — the same law a tool's
1335
1253
  // own mint follows.
@@ -1373,14 +1291,14 @@ export class Agent extends RunnerBase {
1373
1291
  * the one the run's tools used, and a recording filed in a different scope
1374
1292
  * from the artifacts it describes is a recording nobody can find.
1375
1293
  */
1376
- runArtifactScope() {
1377
- const identity = this.liveSnapshot()?.sharedState
1294
+ runArtifactScope(invocation) {
1295
+ const identity = invocation.view.snapshot()?.sharedState
1378
1296
  ?.runIdentity;
1379
1297
  if (identity === undefined) {
1380
1298
  // No state to read means no run happened, which this path cannot reach —
1381
1299
  // but a scope is required and inventing a tenant would be worse than a
1382
1300
  // conversation id that names the run itself.
1383
- return { conversationId: this.currentRunContext?.runId ?? 'unknown' };
1301
+ return { conversationId: invocation.context().runId };
1384
1302
  }
1385
1303
  return {
1386
1304
  conversationId: identity.conversationId,
@@ -1426,14 +1344,13 @@ export class Agent extends RunnerBase {
1426
1344
  * read or write of a selected key reads `[REDACTED]`, and an `[emit]` line
1427
1345
  * shows the event's served payload (`src/redaction/runRedaction.ts`).
1428
1346
  */
1347
+ /** Empty during preparation before native origin; capture prior entries before the next call. */
1429
1348
  getLastNarrativeEntries() {
1430
- if (this.lastExecutor === undefined)
1431
- return [];
1432
- // The snapshot's terms: an executor no run of this agent opened serves
1433
- // nothing — its narrative was written under no rule anyone knows.
1434
- if (coverageOfExecutor(this.lastExecutor).state === 'unknown')
1349
+ const selected = this.runExecution().selected();
1350
+ const coverage = selected?.value.redaction?.coverage;
1351
+ if (selected === undefined || coverage === undefined || coverage.state === 'unknown')
1435
1352
  return [];
1436
- return this.lastExecutor.getNarrativeEntries();
1353
+ return selected.view.getNarrativeEntries();
1437
1354
  }
1438
1355
  /**
1439
1356
  * The FlowChart compiled for the most recent run (or a freshly-built
@@ -1518,7 +1435,7 @@ export class Agent extends RunnerBase {
1518
1435
  * `OutputSchemaError` — hand it to the 3-tier fallback. The one settle for
1519
1436
  * `parseOutputAsync`'s parse failure and `runTyped`'s native stop failure.
1520
1437
  */
1521
- async settleTypedFailure(raw, err) {
1438
+ async settleTypedFailure(raw, err, invocation) {
1522
1439
  const parser = this.outputSchemaParser;
1523
1440
  if (!this.outputFallbackCfg || !(err instanceof OutputSchemaError))
1524
1441
  throw err;
@@ -1534,13 +1451,16 @@ export class Agent extends RunnerBase {
1534
1451
  type: eventType,
1535
1452
  timestamp: Date.now(),
1536
1453
  payload,
1454
+ ...(invocation !== undefined && {
1455
+ meta: buildEventMeta({ runtimeStageId: '__typed_output__' }, invocation.context()),
1456
+ }),
1537
1457
  });
1538
1458
  }
1539
1459
  catch {
1540
1460
  /* observability errors must not poison the fallback path */
1541
1461
  }
1542
1462
  };
1543
- return applyOutputFallback(raw, parser, this.outputFallbackCfg, emit, err, this.lastRunRetriesSpent());
1463
+ return applyOutputFallback(raw, parser, this.outputFallbackCfg, emit, err, invocation === undefined ? undefined : this.retriesSpent(invocation));
1544
1464
  }
1545
1465
  /**
1546
1466
  * Corrective re-asks the agent's LAST run paid for, read off its own ledger.
@@ -1549,8 +1469,8 @@ export class Agent extends RunnerBase {
1549
1469
  * any string, including one that never came from this agent, and reporting
1550
1470
  * `0` for "I do not know" would be an invented fact in an event payload.
1551
1471
  */
1552
- lastRunRetriesSpent() {
1553
- const state = this.liveSnapshot()?.sharedState;
1472
+ retriesSpent(invocation) {
1473
+ const state = invocation.view.snapshot()?.sharedState;
1554
1474
  if (state === undefined)
1555
1475
  return undefined;
1556
1476
  return Math.max(0, (state.outputAttempts?.length ?? 1) - 1);
@@ -1571,36 +1491,43 @@ export class Agent extends RunnerBase {
1571
1491
  * `agent.answerCoverage()`.
1572
1492
  */
1573
1493
  async runTyped(input, options) {
1574
- if (!this.outputSchemaParser) {
1575
- throw new Error(`Agent.runTyped: this agent has no outputSchema. Use ` +
1576
- `Agent.create({...}).outputSchema(parser).build() to enable typed output.`);
1577
- }
1578
- const out = await this.run(input, options);
1579
- if (typeof out !== 'string') {
1580
- throw new Error('Agent.runTyped: run paused — typed mode does not support pauses. ' +
1581
- 'Use agent.run() + agent.parseOutput(...) after resume.');
1582
- }
1583
- // `strategy: 'native'`: an answer whose last attempt failed on a refusal
1584
- // or truncation stop is refused here even when its text parses — the
1585
- // format did not hold for it (outputEnforcement.ts · nativeStopFailure).
1586
- // FIRST, before any delivery path. It takes the same path a parse failure
1587
- // takes, `.outputFallback()` included.
1588
- const stopped = this.outputEnforcement?.outputFormat !== undefined ? this.outputContractUnmet() : undefined;
1589
- if (stopped?.stopReason !== undefined) {
1590
- return this.settleTypedFailure(out, new OutputSchemaError(stopped.error, { rawOutput: out, stage: stopped.stage }));
1591
- }
1592
- if (this.answerValidationConfig !== undefined) {
1593
- // The validator judged the schema's JSON output. Do not run a transforming
1594
- // or stateful parser again and hand back a value the validator never saw.
1595
- if (this.answerValidation()?.schemaAccepted !== true) {
1596
- throw new OutputSchemaError('Answer validation could not establish a JSON schema result.', {
1597
- rawOutput: out,
1598
- stage: 'schema-validate',
1599
- });
1494
+ return this.runExecution().withRun(async (invocation) => {
1495
+ if (!this.outputSchemaParser) {
1496
+ throw new Error(`Agent.runTyped: this agent has no outputSchema. Use ` +
1497
+ `Agent.create({...}).outputSchema(parser).build() to enable typed output.`);
1600
1498
  }
1601
- return applyOutputSchema(out, { parse: (value) => value });
1602
- }
1603
- return this.parseOutputAsync(out);
1499
+ const out = await this.runOwned(invocation, input, options);
1500
+ if (typeof out !== 'string') {
1501
+ throw new Error('Agent.runTyped: run paused — typed mode does not support pauses. ' +
1502
+ 'Use agent.run() + agent.parseOutput(...) after resume.');
1503
+ }
1504
+ // `strategy: 'native'`: an answer whose last attempt failed on a refusal
1505
+ // or truncation stop is refused here even when its text parses — the
1506
+ // format did not hold for it (outputEnforcement.ts · nativeStopFailure).
1507
+ // FIRST, before any delivery path. It takes the same path a parse failure
1508
+ // takes, `.outputFallback()` included.
1509
+ const stopped = this.outputEnforcement?.outputFormat !== undefined ? this.outputContractUnmet() : undefined;
1510
+ if (stopped?.stopReason !== undefined) {
1511
+ return this.settleTypedFailure(out, new OutputSchemaError(stopped.error, { rawOutput: out, stage: stopped.stage }), invocation);
1512
+ }
1513
+ if (this.answerValidationConfig !== undefined) {
1514
+ // The validator judged the schema's JSON output. Do not run a transforming
1515
+ // or stateful parser again and hand back a value the validator never saw.
1516
+ if (this.answerValidation()?.schemaAccepted !== true) {
1517
+ throw new OutputSchemaError('Answer validation could not establish a JSON schema result.', {
1518
+ rawOutput: out,
1519
+ stage: 'schema-validate',
1520
+ });
1521
+ }
1522
+ return applyOutputSchema(out, { parse: (value) => value });
1523
+ }
1524
+ try {
1525
+ return applyOutputSchema(out, this.outputSchemaParser);
1526
+ }
1527
+ catch (error) {
1528
+ return this.settleTypedFailure(out, error, invocation);
1529
+ }
1530
+ });
1604
1531
  }
1605
1532
  /**
1606
1533
  * Answer one turn.
@@ -1640,6 +1567,10 @@ export class Agent extends RunnerBase {
1640
1567
  * ```
1641
1568
  */
1642
1569
  async run(input, options) {
1570
+ return this.runExecution().withRun((invocation) => this.runOwned(invocation, input, options));
1571
+ }
1572
+ async runOwned(invocation, input, options) {
1573
+ invocation.value.hadAdmitted = invocation.previous?.value.hadAdmitted === true;
1643
1574
  // Normalize or refuse BEFORE anything is created. A bare string is the
1644
1575
  // message; anything that is not a message is named and refused here
1645
1576
  // rather than becoming `content: undefined` inside the messages slot.
@@ -1669,13 +1600,12 @@ export class Agent extends RunnerBase {
1669
1600
  // never on the server's zone.
1670
1601
  const clockDraft = this.clockDraftFor(runInput.time ?? options?.time, 'Agent.run');
1671
1602
  // The engine's options; the run's signal (and its deadline) is armed just
1672
- // before the run starts and released in its `finally` (`runSignalOf`).
1603
+ // before native execution, whose lifecycle releases it.
1673
1604
  const engineOptions = withoutTime(options);
1674
1605
  // Timing next, and before the executor exists: both of these refuse a call
1675
1606
  // that would have SUCCEEDED into corrupted per-instance state or an
1676
1607
  // orphaned human question. See ./conversation.ts for why they are throws.
1677
- this.assertNotRunning('Agent.run');
1678
- this.assertNoPendingQuestion('Agent.run');
1608
+ this.assertNoPendingQuestion('Agent.run', invocation.previous?.value);
1679
1609
  // A conversation handed in continues through the same side channel
1680
1610
  // `resumeOnError` uses — one restoration path, so the two doors cannot
1681
1611
  // drift about what "continue" means. This turn's message IS appended:
@@ -1684,97 +1614,98 @@ export class Agent extends RunnerBase {
1684
1614
  let continued;
1685
1615
  if (runInput.continueFrom !== undefined) {
1686
1616
  continued = validateCheckpoint(runInput.continueFrom);
1687
- this.applyContinuation(continued, 'Agent.run({ continueFrom })', true);
1617
+ this.applyContinuation(invocation.value, continued, 'Agent.run({ continueFrom })', true);
1688
1618
  }
1689
1619
  // Only an EXPLICIT identity is remembered for `checkpoint()`; see the
1690
1620
  // field's note. `input.identity` wins over `options.identity` because the
1691
1621
  // input bag is where a caller looks first, and both win over the stored
1692
1622
  // conversation's — but the conversation's is used when neither was given,
1693
1623
  // so a continued turn stays in the namespace it started in.
1694
- this.lastRunIdentity =
1624
+ invocation.value.identity =
1695
1625
  runInput.identity ?? options?.identity ?? (continued ? continued.identity : undefined);
1696
1626
  // Recordings-as-artifacts (9.26.0). BEFORE `createExecutor`, because
1697
1627
  // `attach()` collects recorders for the executor that has not been built
1698
1628
  // yet — a recording started one line later would be missing its
1699
1629
  // boundaries, which is the failure mode `recordRun` exists to prevent.
1700
1630
  // Returns `undefined` (and touches nothing) unless the dial is on.
1701
- const recording = this.startRunRecording();
1631
+ const recording = this.startRunRecording(invocation);
1702
1632
  // (helper used in the catch block below — module-private function
1703
1633
  // declared at file end via hoisting)
1704
- this.answeredAsk = undefined;
1705
- this.resumePassedTime = undefined;
1706
- const executor = this.createExecutor(engineOptions, runRequest);
1707
- this.inFlightRunId = this.currentRunContext.runId;
1634
+ invocation.value.answeredAsk = undefined;
1635
+ invocation.value.resumePassedTime = undefined;
1636
+ const prepared = this.prepareAgentRun(invocation, engineOptions, runRequest);
1708
1637
  // One disposition ledger per run (9.60.0) — registration mirrors what
1709
1638
  // this agent's configuration makes applicable; dev posture runs the
1710
1639
  // canaries here, BEFORE any real work, so a dead check is named first.
1711
- this.beginIntegrityLedger();
1712
1640
  // Auto-checkpoint at iteration boundaries — captures the latest
1713
1641
  // conversation history into a per-run tracker. On error, we
1714
1642
  // wrap the underlying error in `RunCheckpointError` carrying
1715
1643
  // this checkpoint so `agent.resumeOnError(checkpoint)` can
1716
1644
  // continue from the last good iteration.
1717
1645
  const tracker = {
1718
- runId: this.currentRunContext?.runId ?? 'unknown',
1646
+ get runId() {
1647
+ return invocation.context().runId;
1648
+ },
1719
1649
  originalInput: { message: runInput.message },
1720
1650
  history: [],
1721
1651
  lastCompletedIteration: 0,
1722
1652
  };
1723
- this.checkpointTracker = tracker;
1724
- const stopTracking = this.installCheckpointTracker(tracker);
1653
+ invocation.value.checkpointTracker = tracker;
1725
1654
  // The answer this run produces is the only place the final assistant turn
1726
1655
  // exists (nothing writes it back into `scope.history`), so `checkpoint()`
1727
1656
  // keeps it. Cleared here so a failed or paused run cannot hand back the
1728
1657
  // previous run's answer.
1729
- this.lastRunAnswer = undefined;
1658
+ invocation.value.answer = undefined;
1730
1659
  // One run can never raise on another run's consent block.
1731
- this.consentOutstanding.clear();
1660
+ invocation.value.consentOutstanding.clear();
1732
1661
  // Set here, beside the `try` whose `finally` clears it, so no exit path
1733
1662
  // can leave it behind for a turn this `run()` did not start.
1734
- this.runClockDraft = clockDraft;
1663
+ invocation.value.clockDraft = clockDraft;
1735
1664
  // Armed here, beside the `try` whose `finally` releases it: no refused
1736
1665
  // call above can leave a deadline running.
1737
- const runSignal = runSignalOf(engineOptions);
1738
1666
  try {
1739
- const result = await executor.run({
1740
- input: {
1741
- message: runInput.message,
1742
- ...(this.lastRunIdentity !== undefined && { identity: this.lastRunIdentity }),
1743
- // A composed message reaches seed only on an agent that reads it
1744
- // (declared sources, or the time layer's reader) — every other run's
1745
- // input is the bytes it was.
1746
- ...(messageFrom === 'composed' &&
1747
- (this.argumentSourcesArmed === true || this.timeOptions?.reader !== undefined) && {
1748
- messageFrom: 'composed',
1749
- }),
1667
+ const result = await invocation.execute({
1668
+ kind: 'run',
1669
+ options: {
1670
+ input: {
1671
+ message: runInput.message,
1672
+ ...(invocation.value.identity !== undefined && {
1673
+ identity: invocation.value.identity,
1674
+ }),
1675
+ // A composed message reaches seed only on an agent that reads it
1676
+ // (declared sources, or the time layer's reader) — every other run's
1677
+ // input is the bytes it was.
1678
+ ...(messageFrom === 'composed' &&
1679
+ (this.argumentSourcesArmed === true || this.timeOptions?.reader !== undefined) && {
1680
+ messageFrom: 'composed',
1681
+ }),
1682
+ },
1683
+ // Co-engineered boundary (#16): the engine's loop-iteration limit
1684
+ // (footprintjs 9 default 1000) must never fire BELOW the agent's own
1685
+ // budget — give it headroom (×2 + 10 covers double-hop loop shapes).
1686
+ // Consumer-provided options win.
1687
+ maxIterations: this.maxIterations * 2 + 10,
1688
+ ...(engineOptions ?? {}),
1750
1689
  },
1751
- // Co-engineered boundary (#16): the engine's loop-iteration limit
1752
- // (footprintjs 9 default 1000) must never fire BELOW the agent's own
1753
- // budget — give it headroom (×2 + 10 covers double-hop loop shapes).
1754
- // Consumer-provided options win.
1755
- maxIterations: this.maxIterations * 2 + 10,
1756
- ...(runSignal.options ?? {}),
1757
- });
1758
- const finalized = this.finalizeResult(executor, result);
1690
+ }, prepared.setup, prepared.binding);
1691
+ const finalized = this.finalizeResult(invocation, result);
1759
1692
  if (typeof finalized === 'string')
1760
- this.lastRunAnswer = finalized;
1761
- this.recordPendingQuestion(finalized);
1762
- await this.endRunToolSessions(finalized);
1693
+ invocation.value.answer = finalized;
1694
+ this.recordPendingQuestion(invocation.value, finalized);
1763
1695
  // The answer is FINISHED before this line and cannot be changed by it.
1764
1696
  // The liveness theorems (9.60.0, dev posture only) — a run that would
1765
1697
  // return green while its registered checkers demonstrably never ran
1766
1698
  // fails HERE instead, before the recording is filed. A finished run is
1767
1699
  // itself the proof work existed: the loop cannot finish without at
1768
1700
  // least one model call.
1769
- this.assertIntegrityAlive();
1701
+ this.assertIntegrityAlive(invocation);
1770
1702
  // See `fileRunRecording` for why the write is awaited rather than left
1771
1703
  // in flight, and why it can never fail the run.
1772
- await this.fileRunRecording(recording, finalized);
1704
+ recording?.complete(finalized);
1773
1705
  return finalized;
1774
1706
  }
1775
1707
  catch (cause) {
1776
1708
  // A THROWN pause is still a pause — see `endRunToolSessions`.
1777
- await this.endRunToolSessions(cause);
1778
1709
  // Wrap recoverable errors with the last-known-good checkpoint.
1779
1710
  // Don't wrap intentional terminal signals — let them propagate as
1780
1711
  // their typed shapes so callers can `instanceof` them:
@@ -1813,7 +1744,10 @@ export class Agent extends RunnerBase {
1813
1744
  // 9.60.0 — a dead checker is a WIRING verdict on this build, not a
1814
1745
  // recoverable run state: resuming would run the same dead wiring.
1815
1746
  cause.name === 'CheckerDeadError');
1816
- if (cause instanceof Error && !isTerminalTypedError && tracker.history.length > 0) {
1747
+ if (cause instanceof Error &&
1748
+ !isTerminalTypedError &&
1749
+ !invocation.value.checkpointObservationFailed &&
1750
+ tracker.history.length > 0) {
1817
1751
  // Observation beats the heuristic: if a bracket was open, it says
1818
1752
  // exactly what the run was doing. `classifyFailurePhase` only decides
1819
1753
  // when nothing was — a failure between brackets, where the error's own
@@ -1835,7 +1769,7 @@ export class Agent extends RunnerBase {
1835
1769
  // resuming after a crash would be the one path that still lost the
1836
1770
  // identity, and the memory written after the recovery would land
1837
1771
  // where nothing could read it.
1838
- this.conversationOwner(),
1772
+ this.conversationOwner(invocation.value),
1839
1773
  // …and the same graph cursor (SG-C), from the same snapshot reader —
1840
1774
  // one reader, two carriers, so neither can lose what the other keeps.
1841
1775
  this.continuityCursorOf(this.liveSnapshot()?.sharedState), this.evidenceRecoveryOf(this.liveSnapshot()?.sharedState),
@@ -1852,32 +1786,28 @@ export class Agent extends RunnerBase {
1852
1786
  throw cause;
1853
1787
  }
1854
1788
  finally {
1855
- // The run's deadline and signal links end with the run (`runSignalOf`).
1856
- runSignal.release();
1789
+ // Native admission owns deadlines, signal links and final joining.
1857
1790
  // The time layer's per-run inputs end with the run: a stale draft would
1858
1791
  // be stamped by the next seed this agent did not start (a composition
1859
1792
  // mounting its chart) as if the app had declared it.
1860
- this.runClockDraft = undefined;
1861
- this.resumePassedTime = undefined;
1793
+ invocation.value.clockDraft = undefined;
1794
+ invocation.value.resumePassedTime = undefined;
1862
1795
  // The run's disposition rows, on EVERY path — success, failure, pause —
1863
1796
  // and BEFORE the recording stops, so a recording carries its run's
1864
1797
  // checker accounting (9.60.0).
1865
- this.fileIntegrityDisposition();
1798
+ this.fileIntegrityDisposition(invocation);
1866
1799
  // Always released: a recording left subscribed would keep listening
1867
1800
  // through the next run and grow a tail nobody reads.
1868
- this.noteAdmittedRun();
1869
- recording?.stop();
1870
- stopTracking();
1871
- this.inFlightRunId = undefined;
1801
+ this.noteAdmittedRun(invocation);
1872
1802
  // `seed` consumes the restored conversation on its way past. A run that
1873
1803
  // died BEFORE seed never did, and a history left armed here would be
1874
1804
  // picked up by the next run — which would then continue a conversation
1875
1805
  // nobody asked it to. One run, one continuation.
1876
- this.pendingResumeHistory = undefined;
1877
- this.pendingResumeFolded = undefined;
1878
- this.pendingResumeFindingsLedger = undefined;
1879
- this.pendingResumeSkillCursor = undefined;
1880
- this.pendingEvidenceRecovery = undefined;
1806
+ invocation.value.pendingResumeHistory = undefined;
1807
+ invocation.value.pendingResumeFolded = undefined;
1808
+ invocation.value.pendingResumeFindingsLedger = undefined;
1809
+ invocation.value.pendingResumeSkillCursor = undefined;
1810
+ invocation.value.pendingEvidenceRecovery = undefined;
1881
1811
  }
1882
1812
  }
1883
1813
  /**
@@ -1913,17 +1843,24 @@ export class Agent extends RunnerBase {
1913
1843
  * ```
1914
1844
  */
1915
1845
  async followUp(message, options) {
1916
- // Refuse BEFORE the timing guards, so "there is nothing to follow up on"
1917
- // is never reported as "a run is in flight" for an agent that has simply
1918
- // not run yet.
1919
- if (this.liveSnapshot() === undefined || (this.lastInputRefused() && !this.hadAdmittedRun)) {
1920
- throw new NoConversationError('Agent.followUp', 'never-run');
1921
- }
1922
- const conversation = this.checkpoint();
1923
- if (conversation === undefined || conversation.history.length === 0) {
1924
- throw new NoConversationError('Agent.followUp', this.lastInputRefused() ? 'last-input-refused' : 'last-run-unfinished');
1925
- }
1926
- return this.run({ message, continueFrom: conversation }, options);
1846
+ return this.runExecution().withRun(async (invocation) => {
1847
+ assertIdentityShape(options?.identity, 'Agent.followUp');
1848
+ // A continuation must exist before any history can be selected.
1849
+ if (invocation.previous?.view.snapshot() === undefined ||
1850
+ (this.lastInputRefused(invocation.previous?.view) &&
1851
+ !invocation.previous?.value.hadAdmitted)) {
1852
+ throw new NoConversationError('Agent.followUp', 'never-run');
1853
+ }
1854
+ const conversation = this.checkpointFor(invocation.previous);
1855
+ if (conversation === undefined || conversation.history.length === 0) {
1856
+ throw new NoConversationError('Agent.followUp', this.lastInputRefused(invocation.previous?.view)
1857
+ ? 'last-input-refused'
1858
+ : 'last-run-unfinished');
1859
+ }
1860
+ if (conversation.identity !== undefined)
1861
+ refuseFollowUpIdentity(options?.identity, conversation.identity);
1862
+ return this.runOwned(invocation, { message, continueFrom: conversation }, options);
1863
+ });
1927
1864
  }
1928
1865
  /**
1929
1866
  * Drop the question this agent's last run paused to ask, on the record.
@@ -1940,10 +1877,8 @@ export class Agent extends RunnerBase {
1940
1877
  * does not touch the paused run's checkpoint: if you still hold that, it
1941
1878
  * remains resumable.
1942
1879
  */
1943
- abandonPause() {
1944
- const dropped = this.pendingQuestion;
1945
- this.pendingQuestion = undefined;
1946
- return dropped;
1880
+ async abandonPause() {
1881
+ return this.runExecution().withRun((invocation) => abandonPendingQuestion(invocation.previous?.value));
1947
1882
  }
1948
1883
  /**
1949
1884
  * Whether {@link Agent.selfExplain}'s why-questions have a run to answer
@@ -2011,32 +1946,33 @@ export class Agent extends RunnerBase {
2011
1946
  * ```
2012
1947
  */
2013
1948
  async resumeOnError(checkpoint, options) {
2014
- const cp = validateCheckpoint(checkpoint);
2015
- // The timing guards run HERE, not only inside `run()`, because the line
2016
- // below writes the side channel: a refusal after that write would leave a
2017
- // restored history armed and the NEXT run would silently continue somebody
2018
- // else's conversation.
2019
- this.assertNotRunning('Agent.resumeOnError');
2020
- this.assertNoPendingQuestion('Agent.resumeOnError');
2021
- // A request `run()` would refuse is refused HERE, before the side channel
2022
- // below is armed — a refusal after it would leave the restored history for
2023
- // the next, unrelated run.
2024
- requestOf(options, 'Agent.resumeOnError');
2025
- // Stash the checkpointed history on the side channel; the seed function
2026
- // reads + clears it before scope.history initializes. No message is
2027
- // appended — the failing run's message is already the last user turn in
2028
- // that history, and adding it again would ask twice.
2029
- this.applyContinuation(cp, 'Agent.resumeOnError', false);
2030
- return this.run({
2031
- message: cp.originalInput.message,
2032
- // The conversation's own identity, unless this call named one. Until
2033
- // 9.2.0 there was no way to pass either, so a recovered run silently
2034
- // re-namespaced its memory under a fresh runId and wrote turn two
2035
- // where turn three could not read it.
2036
- ...(this.identityFor(options, cp) !== undefined && {
2037
- identity: this.identityFor(options, cp),
2038
- }),
2039
- }, options);
1949
+ return this.runExecution().withRun(async (invocation) => {
1950
+ const cp = validateCheckpoint(checkpoint);
1951
+ // The timing guards run HERE, not only inside `run()`, because the line
1952
+ // below writes the side channel: a refusal after that write would leave a
1953
+ // restored history armed and the NEXT run would silently continue somebody
1954
+ // else's conversation.
1955
+ this.assertNoPendingQuestion('Agent.resumeOnError', invocation.previous?.value);
1956
+ // A request `run()` would refuse is refused HERE, before the side channel
1957
+ // below is armed — a refusal after it would leave the restored history for
1958
+ // the next, unrelated run.
1959
+ requestOf(options, 'Agent.resumeOnError');
1960
+ // Stash the checkpointed history on the side channel; the seed function
1961
+ // reads + clears it before scope.history initializes. No message is
1962
+ // appended — the failing run's message is already the last user turn in
1963
+ // that history, and adding it again would ask twice.
1964
+ this.applyContinuation(invocation.value, cp, 'Agent.resumeOnError', false);
1965
+ return this.runOwned(invocation, {
1966
+ message: cp.originalInput.message,
1967
+ // The conversation's own identity, unless this call named one. Until
1968
+ // 9.2.0 there was no way to pass either, so a recovered run silently
1969
+ // re-namespaced its memory under a fresh runId and wrote turn two
1970
+ // where turn three could not read it.
1971
+ ...(this.identityFor(options, cp) !== undefined && {
1972
+ identity: this.identityFor(options, cp),
1973
+ }),
1974
+ }, options);
1975
+ });
2040
1976
  }
2041
1977
  /**
2042
1978
  * Which identity a continued turn runs under: the caller's if they named
@@ -2047,141 +1983,21 @@ export class Agent extends RunnerBase {
2047
1983
  identityFor(options, cp) {
2048
1984
  return options?.identity ?? cp.identity;
2049
1985
  }
2050
- /**
2051
- * A run's `time`, read into the turn's clock draft (the time layer) — or
2052
- * refused, before the turn starts: `time` on an agent without `.time()` or
2053
- * a malformed value. No zone anywhere (the run's, else the builder's) is no
2054
- * refusal: the zone is UNKNOWN (`zoneSource: 'unknown'`, G15) — never the
2055
- * server's, never guessed; the person is asked it before any time they
2056
- * wrote is read. `undefined` on an agent without the layer.
2057
- *
2058
- * @internal
2059
- */
2060
1986
  clockDraftFor(time, runner) {
2061
- const passed = this.passedTimeFor(time, runner);
2062
- if (this.timeOptions === undefined)
2063
- return undefined;
2064
- return draftClock(passed, this.timeOptions);
1987
+ return draftAgentClock(time, runner, this.timeOptions);
2065
1988
  }
2066
- /**
2067
- * The clock draft seed stamps (the time layer): the one `run()` read — or,
2068
- * for a turn this agent's `run()` did not start (its chart mounted in a
2069
- * composition, which passes no `time`), the builder's fallback zone with
2070
- * the turn's start as `now` (`zoneSource: 'builder'`, `nowSource:
2071
- * 'default'` — the same record a `run()` with no `time` files). With no
2072
- * fallback zone that turn's zone is unknown, as a `run()`'s is (G15): the
2073
- * server's zone is never used.
2074
- *
2075
- * @internal
2076
- */
2077
- seedClockDraft() {
2078
- if (this.runClockDraft !== undefined)
2079
- return this.runClockDraft;
2080
- return draftClock(undefined, this.timeOptions ?? {});
1989
+ seedClockDraft(values) {
1990
+ return clockForSeed(values, this.timeOptions);
2081
1991
  }
2082
- /**
2083
- * A `time` passed to a run or a resume, read — or refused by name: passed to
2084
- * an agent without `.time()` (a door that ignored it would look configured
2085
- * and do nothing), or malformed.
2086
- *
2087
- * @internal
2088
- */
2089
1992
  passedTimeFor(time, runner) {
2090
- if (time === undefined)
2091
- return undefined;
2092
- if (this.timeOptions === undefined) {
2093
- throw new InvalidRunInputError({
2094
- runner,
2095
- received: 'time',
2096
- hint: 'this agent reads no clock — arm the time layer with .time() to pass time',
2097
- });
2098
- }
2099
- const read = readRunTime(time);
2100
- if ('problem' in read) {
2101
- throw new InvalidRunInputError({ runner, received: 'a malformed time', hint: read.problem });
2102
- }
2103
- return read.value;
2104
- }
2105
- /**
2106
- * Install a per-run checkpoint tracker. Listens for the agent's own
2107
- * iteration and stream brackets and snapshots the conversation history into
2108
- * the tracker. Returns a stop function.
2109
- *
2110
- * It listens on the REAL-value path (`EventDispatcher · onRealEvent`), never
2111
- * on the served one: the crash checkpoint it builds is what
2112
- * `resumeOnError` replays to the model, and a resume checkpoint keeps real
2113
- * values — a redaction policy that names `history` must not turn the
2114
- * conversation a crash resumes into placeholders (`src/redaction/`).
2115
- *
2116
- * @internal
2117
- */
2118
- installCheckpointTracker(tracker) {
2119
- return this.dispatcher.onRealEvent((event) => {
2120
- switch (event.type) {
2121
- case 'agentfootprint.agent.iteration_start': {
2122
- const p = event.payload;
2123
- if (typeof p?.iterIndex === 'number')
2124
- tracker.inFlightIteration = p.iterIndex;
2125
- return;
2126
- }
2127
- // Phase OBSERVATION (8.14.0) — the run's own stream brackets. A crash
2128
- // inside one of these is attributable without asking the error to
2129
- // describe itself. `'call-llm'` is a literal and `toolName` is a name
2130
- // the app declared: no URL, no credential, no payload ever reaches the
2131
- // checkpoint.
2132
- case 'agentfootprint.stream.llm_start':
2133
- tracker.inFlightPhase = { phase: 'llm', stage: 'call-llm' };
2134
- return;
2135
- case 'agentfootprint.stream.llm_end':
2136
- tracker.inFlightPhase = undefined;
2137
- return;
2138
- // A bracket carrying `notDispatched` (9.113.0) is a call a paused batch
2139
- // never dispatched: nothing of it was ever in flight, so it neither
2140
- // opens nor clears the phase. Nothing observable depends on this today
2141
- // — the settlement emits both halves back to back with no await between
2142
- // them (`toolCalls.ts` · `bracketSettled`), so a crash can never land
2143
- // inside one — it keeps the phase true to the marker should that ever
2144
- // change.
2145
- case 'agentfootprint.stream.tool_start': {
2146
- const p = event.payload;
2147
- if (p?.notDispatched !== undefined)
2148
- return;
2149
- const name = p?.toolName;
2150
- tracker.inFlightPhase = {
2151
- phase: 'tool',
2152
- stage: typeof name === 'string' ? name : 'tool',
2153
- };
2154
- return;
2155
- }
2156
- case 'agentfootprint.stream.tool_end': {
2157
- const p = event.payload;
2158
- if (p?.notDispatched !== undefined)
2159
- return;
2160
- tracker.inFlightPhase = undefined;
2161
- return;
2162
- }
2163
- case 'agentfootprint.agent.iteration_end': {
2164
- const p = event.payload;
2165
- if (typeof p?.iterIndex === 'number')
2166
- tracker.lastCompletedIteration = p.iterIndex;
2167
- if (Array.isArray(p?.history)) {
2168
- tracker.history = p.history;
2169
- }
2170
- tracker.inFlightIteration = undefined;
2171
- tracker.inFlightPhase = undefined;
2172
- return;
2173
- }
2174
- default:
2175
- return;
2176
- }
2177
- });
1993
+ return readAgentTime(time, runner, this.timeOptions);
2178
1994
  }
2179
1995
  /**
2180
1996
  * Continue a run that paused to ask a person something, with their answer.
2181
1997
  *
2182
1998
  * WHO the resumed run is for is the paused run's caller, read off the
2183
1999
  * checkpoint (`agent/callerIdentity.ts`) — never whatever this instance ran
2184
- * last; which SESSION, the call's `sessionId`, else the paused run's. A
2000
+ * last; the session is the paused run's. A supplied `sessionId` must match. A
2185
2001
  * checkpoint names who it is for; it is not proof: a host that lets
2186
2002
  * checkpoints leave its trust boundary signs them or keeps them
2187
2003
  * server-side, and passes the identity it verified as `options.identity`.
@@ -2204,11 +2020,15 @@ export class Agent extends RunnerBase {
2204
2020
  * ```
2205
2021
  */
2206
2022
  async resume(checkpoint, input, options) {
2023
+ this.noteResumeTakenUp(checkpoint);
2024
+ return this.runExecution().withRun((invocation) => preservePendingQuestion(invocation.previous?.value, () => invocation.value.resources?.answer.consumed === true, () => this.resumeOwned(invocation, checkpoint, input, options)));
2025
+ }
2026
+ async resumeOwned(invocation, checkpoint, input, options) {
2207
2027
  // Taken up, before anything can refuse: from here every use of a consent
2208
2028
  // decision passes through the one spend a door watching this pause sees
2209
2029
  // (`consentRequest.ts` · `watchDecisionUse`) — so a resume that fails
2210
2030
  // without reaching it, refused or aborted, used nothing.
2211
- noteDecisionTakenUp(pausedRequestIdOf(checkpoint));
2031
+ resumeStateOf(checkpoint);
2212
2032
  // ── A consent gate is answered with a DECISION (8.13.0) ─────────────
2213
2033
  // Refused HERE, before the engine is handed the checkpoint, so nothing
2214
2034
  // executes and the checkpoint is unchanged — the caller can answer the same
@@ -2226,8 +2046,6 @@ export class Agent extends RunnerBase {
2226
2046
  // The incoming request is the RESUMING caller's — never the paused one's:
2227
2047
  // a checkpoint carries no request, and a resume without one serves none.
2228
2048
  const resumeRequest = requestOf(options, 'Agent.resume');
2229
- // Native guard lands with the new checkpoint protocol, before its runtime
2230
- // opt-in is mounted. Until then no Agent is armed to consume this carrier.
2231
2049
  requireVerificationOnResume(checkpoint.sharedState ?? {}, false);
2232
2050
  if (this.negativeClaimsConfig !== undefined) {
2233
2051
  const prior = negativeCheckpointOf(checkpoint.sharedState ?? {});
@@ -2245,6 +2063,7 @@ export class Agent extends RunnerBase {
2245
2063
  options?.redact,
2246
2064
  conversationRedaction(),
2247
2065
  ]);
2066
+ Object.assign(invocation.value, privateResumeOf(checkpoint));
2248
2067
  // A resume's `time` (the time layer) is read or refused before anything
2249
2068
  // moves; it is never applied — the paused turn's clock is kept, and a
2250
2069
  // differing value is recorded by the ToolCalls resume door.
@@ -2259,10 +2078,7 @@ export class Agent extends RunnerBase {
2259
2078
  // principal and stored ownership. A checkpoint names who it is for; it is
2260
2079
  // not proof — a host that lets checkpoints leave its trust boundary signs
2261
2080
  // them or keeps them server-side, and passes the identity it verified here.
2262
- const pausedFor = callerIdentityOf(checkpoint.sharedState, {
2263
- ...(this.lastRunIdentity !== undefined && { named: this.lastRunIdentity }),
2264
- minted: this.mintedRunIds,
2265
- });
2081
+ const pausedFor = callerIdentityOf(checkpoint.sharedState);
2266
2082
  // The identity the run's memory namespace and credentials are restored
2267
2083
  // from, WHATEVER its source (a caller's, the session rung, the per-run
2268
2084
  // default). One run, one identity: a call that names an identity must
@@ -2275,6 +2091,9 @@ export class Agent extends RunnerBase {
2275
2091
  (restored === undefined || !sameIdentity(options.identity, restored)))) {
2276
2092
  throw new ResumeIdentityConflictError();
2277
2093
  }
2094
+ const sessionId = resumeSessionOf(checkpoint);
2095
+ if (options?.sessionId !== undefined && options.sessionId !== sessionId)
2096
+ throw new ResumeIdentityConflictError('session');
2278
2097
  // …and the decision must be for THIS request and this exact call
2279
2098
  // (`core/consentRequest.ts`): refused here, before anything moves, when it
2280
2099
  // names no request, another request, a call the checkpoint no longer
@@ -2287,11 +2106,12 @@ export class Agent extends RunnerBase {
2287
2106
  // A request minted under a ledger that can prove is spent only there.
2288
2107
  this.decisionLedger ?? processDecisionLedger());
2289
2108
  }
2109
+ if (gate !== undefined)
2110
+ await refuseKnownSpentAnswer(this.decisionLedger ?? processDecisionLedger(), input, gate, options?.signal, options?.env?.signal);
2290
2111
  // Typed data collection is not consent. Validate before changing any run state.
2291
2112
  const awaitingInput = gate === undefined ? readAwaitingInput(checkpoint.pauseData) : undefined;
2292
2113
  let answeredAsk;
2293
2114
  if (awaitingInput !== undefined) {
2294
- this.assertNotRunning('Agent.resume');
2295
2115
  const answered = applyInputResponse(awaitingInput, input, this.timeAnswerContextOf(checkpoint.sharedState));
2296
2116
  if ('cancel' in answered) {
2297
2117
  throw new TypeError('[input request] Cancel a hosted request through its host, or abandonPause() before starting another run.');
@@ -2308,7 +2128,7 @@ export class Agent extends RunnerBase {
2308
2128
  pauseData,
2309
2129
  awaitingInput: answered,
2310
2130
  };
2311
- this.recordPendingQuestion(outcome);
2131
+ this.recordPendingQuestion(invocation.value, outcome);
2312
2132
  return outcome;
2313
2133
  }
2314
2134
  answeredAsk = {
@@ -2329,77 +2149,62 @@ export class Agent extends RunnerBase {
2329
2149
  // the same door and before any state moves, because a resume that has begun
2330
2150
  // is a resume that has already used the value.
2331
2151
  assertDecisionIsNotStale(checkpoint.pauseData, input);
2332
- // The same one-turn-at-a-time guard `run()` carries: a resume writes the
2333
- // same per-instance state a run does. Answering the question is what this
2334
- // door is FOR, so it never checks `pendingQuestion` — it clears it.
2335
- this.assertNotRunning('Agent.resume');
2336
- // Settled the moment the answer is handed over, not when the resumed run
2337
- // finishes: a resume that then FAILS must not leave the agent refusing
2338
- // every later message on behalf of a question that has been answered.
2339
- // Kept to put back when the run refuses the answer itself (a replay of a
2340
- // request already answered): that resume answered nothing.
2341
- const questionBefore = this.pendingQuestion;
2342
- this.pendingQuestion = undefined;
2343
- // WHO this resumed run is for — set BEFORE the executor exists, because the
2344
- // run context's principal (every event's `EventMeta.principal`), a tool's
2345
- // `ctx.identity` and `checkpoint()` all read it: the identity the PAUSED
2346
- // run's caller named (a named `options.identity` was checked equal to the
2347
- // restored one at the top of this method) — never the identity of whatever
2348
- // this instance ran last, which on a shared or pooled agent is another
2349
- // person's, or nobody's (`callerIdentity.ts`).
2350
- this.lastRunIdentity = options?.identity ?? pausedFor;
2351
- // …and WHICH session: the call's, else the one the paused run recorded in
2352
- // its own state (`runSessionId`, or the session rung's) — one source, no
2353
- // instance memory — so a host that resumes without repeating the session
2354
- // does not file the resumed turn (its tool teardown, its events, its
2355
- // self-explain evidence) as sessionless.
2356
- const sessionId = options?.sessionId ?? pausedSessionOf(checkpoint.sharedState);
2152
+ if (gate === undefined && awaitingInput === undefined)
2153
+ refuseMissingPlainAnswer(checkpoint, input);
2154
+ // A native-admitted answer settles the old question even if its leg fails.
2155
+ // The outer pause-ownership boundary restores pre-origin refusals; named
2156
+ // unanswered refusals after origin are restored below.
2157
+ const questionBefore = invocation.previous?.value.pendingQuestion;
2158
+ // Capture this paused conversation's identity before native origin; selected readers
2159
+ // on a shared instance can belong to another conversation (`callerIdentity.ts`).
2160
+ invocation.value.identity = options?.identity ?? pausedFor;
2161
+ // Resume retains the paused transport session; an override was checked equal above.
2357
2162
  const sessionResumeOptions = sessionId !== undefined && options?.sessionId === undefined
2358
2163
  ? { ...options, sessionId }
2359
2164
  : options;
2360
2165
  // The leg's policy — the carried one, the caller's, and the paused leg's
2361
2166
  // marks — comes back from the emitter and goes to THIS leg's executor
2362
- // (`createExecutor` → `openRunRedaction`); nothing per-run is held on the instance.
2167
+ // (native setup → `prepareRunRedaction`); nothing per-run is held on the instance.
2363
2168
  const resumeLeg = this.emitPauseResume(checkpoint, input, unionRedactionPolicies(carriedRedaction, sessionResumeOptions?.redact));
2364
2169
  const resumeOptions = resumeLeg === sessionResumeOptions?.redact
2365
2170
  ? sessionResumeOptions
2366
2171
  : { ...sessionResumeOptions, redact: resumeLeg };
2367
- // Fresh executor — footprintjs 4.17.0+ seeds the runtime from
2368
- // `checkpoint.sharedState` (and nested subflow states) automatically
2369
- // on a fresh executor's `resume()`. No need to retain a paused
2370
- // executor between run/resume.
2371
- // Recorded on the same terms a fresh run is (9.26.0) — and the recording
2372
- // covers the RESUMED run, which is what the recorder saw. A turn that
2373
- // paused and resumed is two runs, and each mints its own recording when
2374
- // (and only when) it completes.
2375
- const recording = this.startRunRecording();
2376
- this.answeredAsk = answeredAsk;
2377
- const executor = this.createExecutor(resumeOptions, resumeRequest);
2172
+ // Fresh native execution restores its checkpoint; no paused executor is retained.
2173
+ // Each resumed native leg files its own recording when it completes.
2174
+ const recording = this.startRunRecording(invocation);
2175
+ invocation.value.answeredAsk = answeredAsk;
2176
+ const prepared = this.prepareAgentRun(invocation, resumeOptions, resumeRequest);
2378
2177
  // The leg's WHOLE policy rides its own state too (`runRedaction`), so a
2379
2178
  // later pause carries what this leg was covered by — names the resume
2380
2179
  // added included — and a third leg is never less covered than this one.
2381
2180
  // `createExecutor` opened this executor's run; one it did not is refused
2382
2181
  // before anything is held or runs — a leg whose policy nothing knows must
2383
2182
  // not start.
2384
- const legCoverage = coverageOfExecutor(executor);
2183
+ const legCoverage = invocation.value.redaction?.coverage;
2184
+ if (legCoverage === undefined)
2185
+ throw new ResumeRedactionError('unreadable');
2385
2186
  if (legCoverage.state === 'unknown')
2386
2187
  throw new ResumeRedactionError('unreadable');
2387
2188
  const leg = { policy: policyOfCoverage(legCoverage) };
2388
- this.inFlightRunId = this.currentRunContext.runId;
2389
2189
  // A resumed turn is two runs, and each keeps its own ledger — exactly
2390
2190
  // the recording's terms one comment up.
2391
- this.beginIntegrityLedger();
2392
- this.lastRunAnswer = undefined;
2393
- this.checkpointTracker = {
2394
- runId: this.currentRunContext.runId,
2395
- originalInput: { message: '' },
2396
- history: [],
2397
- lastCompletedIteration: 0,
2398
- };
2191
+ invocation.value.answer = undefined;
2192
+ const resumedMessage = checkpoint.sharedState.userMessage;
2193
+ invocation.value.checkpointTracker =
2194
+ typeof resumedMessage === 'string'
2195
+ ? {
2196
+ get runId() {
2197
+ return invocation.context().runId;
2198
+ },
2199
+ originalInput: { message: resumedMessage },
2200
+ history: [],
2201
+ lastCompletedIteration: 0,
2202
+ }
2203
+ : undefined;
2399
2204
  // One run can never raise on another run's consent block.
2400
- this.consentOutstanding.clear();
2205
+ invocation.value.consentOutstanding.clear();
2401
2206
  // Beside the `try` whose `finally` clears it (the fresh-run path's terms).
2402
- this.resumePassedTime = passedTime;
2207
+ invocation.value.resumePassedTime = passedTime;
2403
2208
  const legCheckpoint = leg.policy === undefined
2404
2209
  ? checkpoint
2405
2210
  : {
@@ -2409,81 +2214,38 @@ export class Agent extends RunnerBase {
2409
2214
  runRedaction: carriedRunPolicy(leg.policy),
2410
2215
  },
2411
2216
  };
2412
- // A resume arms its own run signal and deadline (`runSignalOf`), released in
2413
- // the `finally` below.
2414
- const runSignal = runSignalOf(resumeOptions);
2217
+ // The native resumed leg owns its signal and deadline.
2415
2218
  try {
2416
- const result = await executor.resume(legCheckpoint, input, runSignal.options);
2417
- const finalized = this.finalizeResult(executor, result);
2219
+ const result = await invocation.execute({ kind: 'resume', mode: 'fresh', checkpoint: legCheckpoint, input, options: resumeOptions }, prepared.setup, prepared.binding);
2220
+ const finalized = this.finalizeResult(invocation, result);
2418
2221
  if (typeof finalized === 'string')
2419
- this.lastRunAnswer = finalized;
2222
+ invocation.value.answer = finalized;
2420
2223
  // The question this resume answered is settled; a resume that paused
2421
2224
  // AGAIN has asked a new one, and that one is outstanding from here.
2422
- this.recordPendingQuestion(finalized);
2423
- await this.endRunToolSessions(finalized);
2225
+ this.recordPendingQuestion(invocation.value, finalized);
2424
2226
  // Same liveness gate the fresh-run path applies (9.60.0).
2425
- this.assertIntegrityAlive();
2426
- await this.fileRunRecording(recording, finalized);
2227
+ this.assertIntegrityAlive(invocation);
2228
+ recording?.complete(finalized);
2427
2229
  return finalized;
2428
2230
  }
2429
- catch (cause) {
2430
- // An answer the run refused ran nothing and answered nothing: the
2431
- // question this agent was waiting on (if any) is still outstanding, and
2432
- // no tool session ended — a replayed decision must not tear down the
2433
- // sandbox a live pause is holding.
2434
- if (cause instanceof ResumeDecisionError || cause instanceof DecisionRequiredError) {
2435
- this.pendingQuestion = questionBefore;
2436
- throw cause;
2437
- }
2438
- await this.endRunToolSessions(cause);
2439
- throw cause;
2440
- }
2441
2231
  finally {
2442
- runSignal.release();
2232
+ if (invocation.value.resources?.answer.consumed === true) {
2233
+ if (invocation.previous !== undefined)
2234
+ invocation.previous.value.pendingQuestion = undefined;
2235
+ }
2236
+ else {
2237
+ invocation.value.pendingQuestion = questionBefore;
2238
+ if (invocation.previous !== undefined)
2239
+ invocation.previous.value.pendingQuestion = questionBefore;
2240
+ }
2443
2241
  // A resume's passed `time` ends with the resume (the fresh-run path's terms).
2444
- this.resumePassedTime = undefined;
2242
+ invocation.value.resumePassedTime = undefined;
2445
2243
  // Same terms as the fresh-run path: rows on every exit, before the
2446
2244
  // recording stops (9.60.0).
2447
- this.fileIntegrityDisposition();
2448
- this.noteAdmittedRun();
2449
- recording?.stop();
2450
- this.inFlightRunId = undefined;
2245
+ this.fileIntegrityDisposition(invocation);
2246
+ this.noteAdmittedRun(invocation);
2451
2247
  }
2452
2248
  }
2453
- /**
2454
- * Fire `'run'`-scoped tool teardown — IF this run really ended.
2455
- *
2456
- * **Not on `finally`, and that is the whole point.** `finally` runs on every
2457
- * exit including a pause, and a pause exits TWO ways: a returned
2458
- * `RunnerPauseOutcome` and a thrown `PauseSignal`. A check-in on a
2459
- * code-interpreter call pauses the run so a person can approve the code —
2460
- * tearing the sandbox down there destroys the exact state the resume needs,
2461
- * and it fails QUIETLY, as a resumed run that "just re-ran everything".
2462
- * Both shapes are discriminated here and both are skipped.
2463
- *
2464
- * An error IS a terminal: the run is over, nobody is coming back, and a
2465
- * sandbox held by a run that crashed is the clearest kind of leak. Only a
2466
- * pause survives.
2467
- *
2468
- * Fired for the TURN, not for `currentRunContext.runId` — `resume()` mints a
2469
- * fresh run id, so a pause and its resume are one turn across two runs, and
2470
- * filtering on the id would leave everything a paused turn opened alive
2471
- * forever. Hosted turns are scoped to their session, preserving other pauses. See `ToolSessionTier.fireRun`.
2472
- *
2473
- * @param outcome what `run()`/`resume()` is about to return, or about to throw.
2474
- */
2475
- async endRunToolSessions(outcome) {
2476
- if (!this.toolSessionTier)
2477
- return;
2478
- if (isPaused(outcome))
2479
- return;
2480
- if (outcome instanceof Error && outcome.name === 'PauseSignal')
2481
- return;
2482
- if (this.currentRunContext.sessionId !== undefined)
2483
- await this.toolSessionTier.fireSessionRuns(this.currentRunContext.sessionId);
2484
- else
2485
- await this.toolSessionTier.fireRun();
2486
- }
2487
2249
  /**
2488
2250
  * The conversation this agent's LAST completed run leaves behind, packed as
2489
2251
  * the same `AgentRunCheckpoint` that `resumeOnError(...)` accepts. Store it,
@@ -2538,35 +2300,39 @@ export class Agent extends RunnerBase {
2538
2300
  * // it does not rewrite entries manually appended to that history.
2539
2301
  * ```
2540
2302
  */
2303
+ /** During preparation before native origin this is undefined; capture before the next call. */
2541
2304
  checkpoint() {
2542
- const snapshot = this.liveSnapshot();
2305
+ return this.checkpointFor(this.runExecution().selected());
2306
+ }
2307
+ checkpointFor(selected) {
2308
+ const snapshot = selected?.view.snapshot();
2543
2309
  if (!snapshot)
2544
2310
  return undefined;
2545
2311
  const state = snapshot.sharedState;
2546
2312
  // Admission is decided by seed, before any conversation state is written.
2547
2313
  // Do not manufacture a blank replay carrier for an unadmitted attempt.
2548
- if (this.lastInputRefused())
2314
+ if (this.lastInputRefused(selected?.view))
2549
2315
  return undefined;
2550
2316
  const recorded = (state?.history ?? []);
2551
2317
  const history = [...recorded];
2552
- if (this.lastRunAnswer !== undefined &&
2553
- (this.lastRunAnswer.length > 0 || state?.llmLatestReplay !== undefined)) {
2318
+ if (selected.value.answer !== undefined &&
2319
+ (selected.value.answer.length > 0 || state?.llmLatestReplay !== undefined)) {
2554
2320
  history.push({
2555
2321
  role: 'assistant',
2556
- content: this.lastRunAnswer,
2322
+ content: selected.value.answer,
2557
2323
  ...assistantReplayFields(state ?? {}),
2558
2324
  });
2559
2325
  }
2560
2326
  const folded = this.foldedSpansOf(state);
2561
- const owner = this.conversationOwner();
2327
+ const owner = this.conversationOwner(selected.value);
2562
2328
  const skillCursor = this.continuityCursorOf(state);
2563
2329
  const evidenceRecovery = this.evidenceRecoveryOf(state);
2564
2330
  const findingsLedger = this.findingsLedgerOf(state);
2565
2331
  const turnNumber = this.turnNumberOf(state);
2566
2332
  return {
2567
2333
  version: 1,
2568
- runId: this.currentRunContext.runId,
2569
- history: structuredClone(checkpointReplayHistory(history, this.checkpointTracker)),
2334
+ runId: selected.context.runId,
2335
+ history: structuredClone(checkpointReplayHistory(history, selected.value.checkpointTracker)),
2570
2336
  lastCompletedIteration: typeof state?.iteration === 'number' ? state.iteration : 0,
2571
2337
  originalInput: { message: typeof state?.userMessage === 'string' ? state.userMessage : '' },
2572
2338
  checkpointedAt: Date.now(),
@@ -2594,9 +2360,9 @@ export class Agent extends RunnerBase {
2594
2360
  };
2595
2361
  }
2596
2362
  /** Called as each run/resume ends: remember a run that got past input admission. */
2597
- noteAdmittedRun() {
2598
- if (this.liveSnapshot() !== undefined && !this.lastInputRefused()) {
2599
- this.hadAdmittedRun = true;
2363
+ noteAdmittedRun(invocation) {
2364
+ if (invocation.view.snapshot() !== undefined && !this.lastInputRefused(invocation.view)) {
2365
+ invocation.value.hadAdmitted = true;
2600
2366
  }
2601
2367
  }
2602
2368
  /**
@@ -2610,8 +2376,8 @@ export class Agent extends RunnerBase {
2610
2376
  this.evidenceGate?.toolsOffAfterRevision === true);
2611
2377
  }
2612
2378
  /** Whether input middleware refused the last run's message — the one reading both doors ask. */
2613
- lastInputRefused() {
2614
- const state = this.liveSnapshot()?.sharedState;
2379
+ lastInputRefused(view) {
2380
+ const state = view?.snapshot()?.sharedState;
2615
2381
  return state?.messageDeniedPhase === 'input';
2616
2382
  }
2617
2383
  /** Both checkpoint doors keep the repair budget separately from conversation text. */
@@ -2668,27 +2434,8 @@ export class Agent extends RunnerBase {
2668
2434
  return undefined;
2669
2435
  return structuredClone(spans);
2670
2436
  }
2671
- /**
2672
- * What the resume door checks a time field's answer with (the time design
2673
- * § 6.2, step T4): the paused turn's clock zone — the kept `clock` row, so
2674
- * a resume that passes another `time` changes nothing — and the app's
2675
- * catalog overrides. `undefined` without `.time()`: a `format` field is
2676
- * then judged for shape, order and offset only, in the default words.
2677
- *
2678
- * @internal
2679
- */
2680
2437
  timeAnswerContextOf(state) {
2681
- if (this.timeOptions === undefined)
2682
- return undefined;
2683
- const ledger = state?.findingsLedger;
2684
- const clock = clockOf(Array.isArray(ledger) ? ledger : undefined);
2685
- // An unknown zone (G15) judges no wall time: `zone` is then only the UTC spelling.
2686
- const zone = clock?.zoneSource === 'unknown' ? undefined : clock?.zone;
2687
- const messages = this.timeOptions.messages;
2688
- return {
2689
- ...(zone !== undefined && { zone }),
2690
- ...(messages !== undefined && { messages }),
2691
- };
2438
+ return agentTimeAnswerContext(state, this.timeOptions);
2692
2439
  }
2693
2440
  /**
2694
2441
  * The findings ledger for a checkpoint (9.101.0) — `foldedSpansOf`'s twin:
@@ -2732,9 +2479,9 @@ export class Agent extends RunnerBase {
2732
2479
  *
2733
2480
  * @internal
2734
2481
  */
2735
- conversationOwner() {
2482
+ conversationOwner(values) {
2736
2483
  return {
2737
- ...(this.lastRunIdentity !== undefined && { identity: this.lastRunIdentity }),
2484
+ ...(values.identity !== undefined && { identity: values.identity }),
2738
2485
  ...(this.explicitId !== undefined && { agentId: this.explicitId }),
2739
2486
  };
2740
2487
  }
@@ -2761,12 +2508,12 @@ export class Agent extends RunnerBase {
2761
2508
  *
2762
2509
  * @internal
2763
2510
  */
2764
- applyContinuation(cp, door, appendsUserTurn) {
2511
+ applyContinuation(values, cp, door, appendsUserTurn) {
2765
2512
  assertContinuable(cp, this.explicitId, door);
2766
2513
  requireVerificationOnResume(cp, false);
2767
2514
  if (this.negativeClaimsConfig === undefined && negativeCheckpointOf(cp) !== undefined)
2768
2515
  throw new TypeError('Continuation requires the negative-claims setting used by the recording agent.');
2769
- this.pendingResumeHistory = {
2516
+ values.pendingResumeHistory = {
2770
2517
  history: cp.history,
2771
2518
  appendsUserTurn,
2772
2519
  // The turn the stored history ends on (honesty layers) — seed continues
@@ -2777,36 +2524,30 @@ export class Agent extends RunnerBase {
2777
2524
  // The folded spans beside it. A conversation stored before 8.2 has none,
2778
2525
  // and `undefined` is the right answer there — it means "this conversation
2779
2526
  // recorded no folds", which is exactly true.
2780
- this.pendingResumeFolded = cp.folded;
2527
+ values.pendingResumeFolded = cp.folded;
2781
2528
  // The findings ledger beside it (9.101.0). Stashed whether or not THIS
2782
2529
  // agent is armed: seed restores it only under `.findings()` (the deps
2783
2530
  // gate), and an unarmed continuation consumes and ignores it — exactly
2784
2531
  // like a `folded` field on an agent that never folds.
2785
- this.pendingResumeFindingsLedger = cp.findingsLedger;
2532
+ values.pendingResumeFindingsLedger = cp.findingsLedger;
2786
2533
  // The conversation's skill cursor (SG-C). Stashed unconditionally —
2787
2534
  // whether it is HONORED is seed's `restoreSkillCursor` gate, which reads
2788
2535
  // the mounted graph's `continuity` declaration; a checkpoint written by a
2789
2536
  // continuity graph and continued on a `'turn'` one is consumed and
2790
2537
  // ignored, exactly like a `folded` field on an agent that never folds.
2791
- this.pendingResumeSkillCursor = cp.skillCursor;
2538
+ values.pendingResumeSkillCursor = cp.skillCursor;
2792
2539
  // Same failed request retains its single repair budget. A new user turn
2793
2540
  // receives neither the rejected draft nor a spent retry allowance.
2794
- this.pendingEvidenceRecovery =
2541
+ values.pendingEvidenceRecovery =
2795
2542
  !appendsUserTurn && cp.evidenceRecovery !== undefined
2796
2543
  ? structuredClone(cp.evidenceRecovery)
2797
2544
  : undefined;
2798
2545
  }
2799
- /** One turn at a time — see `RunInFlightError`. @internal */
2800
- assertNotRunning(door) {
2801
- if (this.inFlightRunId !== undefined) {
2802
- throw new RunInFlightError(door, this.id, this.inFlightRunId);
2803
- }
2804
- }
2805
2546
  /** A person's unanswered question outranks a new message — see
2806
2547
  * `PendingQuestionError`. @internal */
2807
- assertNoPendingQuestion(door) {
2808
- if (this.pendingQuestion !== undefined) {
2809
- throw new PendingQuestionError(door, this.pendingQuestion);
2548
+ assertNoPendingQuestion(door, values) {
2549
+ if (values?.pendingQuestion !== undefined) {
2550
+ throw new PendingQuestionError(door, values.pendingQuestion);
2810
2551
  }
2811
2552
  }
2812
2553
  /**
@@ -2819,17 +2560,14 @@ export class Agent extends RunnerBase {
2819
2560
  *
2820
2561
  * @internal
2821
2562
  */
2822
- recordPendingQuestion(outcome) {
2563
+ recordPendingQuestion(values, outcome) {
2823
2564
  if (typeof outcome === 'string') {
2824
- this.pendingQuestion = undefined;
2565
+ values.pauseOutcome = undefined;
2566
+ values.pendingQuestion = undefined;
2825
2567
  return;
2826
2568
  }
2827
- const data = outcome.pauseData;
2828
- this.pendingQuestion = {
2829
- ...(typeof data?.toolName === 'string' && { toolName: data.toolName }),
2830
- ...(typeof data?.toolCallId === 'string' && { toolCallId: data.toolCallId }),
2831
- ...(typeof data?.question === 'string' && { question: data.question }),
2832
- };
2569
+ values.pauseOutcome = outcome;
2570
+ values.pendingQuestion = pendingQuestionOf(outcome.pauseData);
2833
2571
  }
2834
2572
  /**
2835
2573
  * Hand the `.selfExplain()` binding to the agent that owns it.
@@ -2897,21 +2635,21 @@ export class Agent extends RunnerBase {
2897
2635
  * is withheld here for that reason — `sessionId` beside it is the fact the
2898
2636
  * transport really delivered.
2899
2637
  */
2900
- toolRunFacts() {
2638
+ toolRunFacts(run) {
2901
2639
  return {
2902
- runContext: { ...this.currentRunContext },
2903
- runId: this.currentRunContext.runId,
2904
- ...(this.currentRunContext.sessionId !== undefined && {
2905
- sessionId: this.currentRunContext.sessionId,
2640
+ runContext: { ...run.context },
2641
+ runId: run.context.runId,
2642
+ ...(run.context.sessionId !== undefined && {
2643
+ sessionId: run.context.sessionId,
2906
2644
  }),
2907
- ...(this.lastRunIdentity !== undefined && { identity: this.lastRunIdentity }),
2645
+ ...(run.value.identity !== undefined && { identity: run.value.identity }),
2908
2646
  };
2909
2647
  }
2910
2648
  /**
2911
- * The teardown tier, built on FIRST registration.
2649
+ * The existing teardown tier, built on first component resource admission.
2912
2650
  *
2913
- * An agent whose tools never hold a session never allocates one, and its
2914
- * terminals stay a single `undefined` check.
2651
+ * Admission precedes tool resource effects so restored owners cannot be
2652
+ * borrowed concurrently. Components without tool admission do not allocate it.
2915
2653
  */
2916
2654
  toolSessions() {
2917
2655
  if (!this.toolSessionTier) {
@@ -2953,14 +2691,18 @@ export class Agent extends RunnerBase {
2953
2691
  const type = report.kind === 'closed'
2954
2692
  ? 'agentfootprint.tools.session_closed'
2955
2693
  : 'agentfootprint.tools.session_close_failed';
2694
+ const { kind: _kind, ...payload } = report;
2695
+ if (origin.emit !== undefined) {
2696
+ origin.emit(type, payload);
2697
+ return;
2698
+ }
2956
2699
  const dispatcher = this.getDispatcher();
2957
2700
  if (!dispatcher.hasListenersFor(type))
2958
2701
  return;
2959
- const { kind: _kind, ...payload } = report;
2960
2702
  dispatcher.dispatch({
2961
2703
  type,
2962
2704
  payload,
2963
- meta: buildEventMeta({ runtimeStageId: TOOL_TEARDOWN_STAGE_ID }, origin.runContext ?? this.currentRunContext),
2705
+ meta: buildEventMeta({ runtimeStageId: TOOL_TEARDOWN_STAGE_ID }, origin.runContext ?? { runId: 'consumer-scope', runStartMs: 0, compositionPath: [] }),
2964
2706
  });
2965
2707
  }
2966
2708
  openSkillIds() {
@@ -3091,7 +2833,8 @@ export class Agent extends RunnerBase {
3091
2833
  return async (scope) => {
3092
2834
  // The caller of THIS run: the instance's caller on its own run, the
3093
2835
  // member's run (never the instance's last caller) on a mount.
3094
- const identity = this.ownScopes.has(scope) ? this.lastRunIdentity : memberIdentityIn(scope);
2836
+ const run = this.runExecution().forScope(scope);
2837
+ const identity = run.own ? run.value.identity : memberIdentityIn(scope);
3095
2838
  const hidden = [];
3096
2839
  for (const id of skillIds) {
3097
2840
  let allowed = false;
@@ -3118,27 +2861,7 @@ export class Agent extends RunnerBase {
3118
2861
  };
3119
2862
  }
3120
2863
  assertDeliverableRoles() {
3121
- const providers = providerTargets(this.provider, this.model, this.reliabilityConfig?.providers).map((target) => target.provider);
3122
- for (const inj of this.injections) {
3123
- for (const msg of inj.inject?.messages ?? []) {
3124
- assertDeliverableRole(providers, msg.role, `Agent injection '${inj.id}'`);
3125
- // Content, judged at the same funnel as role (8.18.0). The named
3126
- // factories refuse empty content; a hand-built Injection reached the
3127
- // delivery stage unchecked and put a contentless turn on the wire.
3128
- const content = msg.content;
3129
- if (typeof content !== 'string' || content.trim() === '') {
3130
- throw new Error(messagesContentRefusal({
3131
- site: `Agent injection '${inj.id}'`,
3132
- role: msg.role,
3133
- received: typeof content !== 'string'
3134
- ? content === undefined
3135
- ? 'missing'
3136
- : `a ${content === null ? 'null' : typeof content}`
3137
- : 'empty',
3138
- }));
3139
- }
3140
- }
3141
- }
2864
+ assertInjectionDelivery(this.injections, providerTargets(this.provider, this.model, this.reliabilityConfig?.providers).map((target) => target.provider));
3142
2865
  }
3143
2866
  /**
3144
2867
  * Refuse, at run start, a `'tool-forced'` output strategy on a provider
@@ -3206,7 +2929,7 @@ export class Agent extends RunnerBase {
3206
2929
  `not in this release. Use { strategy: 'instruct', retries: N } on this provider — it ` +
3207
2930
  `works on every wire — or run the native strategy on a provider that declares it.`);
3208
2931
  }
3209
- createExecutor(runOptions, request) {
2932
+ prepareAgentRun(invocation, runOptions, request) {
3210
2933
  this.assertDeliverableRoles();
3211
2934
  this.assertForcedToolChoiceSupported();
3212
2935
  this.assertNativeOutputSchemaSupported();
@@ -3228,71 +2951,33 @@ export class Agent extends RunnerBase {
3228
2951
  // is exactly the string an auditor must not read as "who did this".
3229
2952
  // `conversationId` is deliberately not carried: it is a thread, not a
3230
2953
  // person, and `sessionId` beside it is the fact the transport delivered.
3231
- const actor = runOptions?.identity ?? this.lastRunIdentity;
2954
+ const actor = runOptions?.identity ?? invocation.value.identity;
2955
+ invocation.value.request = request;
3232
2956
  // A fresh run starts with no evictions filed — the previous run's last
3233
2957
  // visit must not be read as this run's (`window/evictedTurns.ts`).
3234
- this.evictedTurnsHandle?.clear();
3235
- const runId = makeRunId();
3236
- this.mintedRunIds.add(runId);
3237
- boundInsertionOrder(this.mintedRunIds, MAX_REMEMBERED_RUNS);
3238
2958
  const hosted = hostedConversationOf(runOptions);
3239
- this.servingConversation =
2959
+ invocation.value.servingConversation =
3240
2960
  sessionId !== undefined
3241
2961
  ? sessionConversationKey(sessionId)
3242
2962
  : hosted !== undefined
3243
2963
  ? hostedConversationKey(hosted)
3244
2964
  : undefined;
3245
- this.currentRunContext = {
3246
- runStartMs: Date.now(),
3247
- runId,
2965
+ const metadata = {
3248
2966
  compositionPath: [`Agent:${this.id}`],
3249
2967
  ...(correlationId !== undefined && { correlationId }),
3250
2968
  ...(traceId !== undefined && { traceId }),
3251
- // Session identity rides beside runId, not instead of it: one session
3252
- // produces many runs, and an event needs to say which of each it is.
3253
2969
  ...(sessionId !== undefined && { sessionId }),
3254
2970
  ...(actor?.principal !== undefined && { principal: actor.principal }),
3255
2971
  ...(actor?.tenant !== undefined && { tenant: actor.tenant }),
3256
2972
  };
3257
- const getRunCtx = () => this.currentRunContext;
2973
+ const getRunCtx = () => invocation.context();
3258
2974
  // The run's redaction (`src/redaction/`): this agent's `redact` joined
3259
2975
  // with any policy the caller handed down for this run (a tool's
3260
2976
  // `ctx.redact`). Opened for EVERY run — with no policy the serving is the
3261
2977
  // identity, but the stages' scopes still feed the real-value path the
3262
2978
  // crash checkpoint and the window's meter read.
3263
- const redaction = this.openRunRedaction(runOptions?.redact, getRunCtx);
3264
- // Reuse the cached chart built at constructor time.
3265
- // The Agent's executor dials: readTracking (#18/#14, snapshot stageReads),
3266
- // commitValues (#13c-B, commit-log value encoding) and writeProvenance
3267
- // (#P1, per-write read provenance — the exact-dataflow debugging dial).
3268
- const spec = this.getSpec();
3269
- // Every scope THIS executor makes is marked as the agent's own, so a stage
3270
- // can tell its own run from a mount in another runner's executor
3271
- // (`memberRun.ts`) — per scope, never by instance state.
3272
- const scopeFactory = redaction.scopeFactoryFor(spec);
3273
- const ownScopes = this.ownScopes;
3274
- const scopeRequests = this.scopeRequests;
3275
- const executor = new FlowChartExecutor(spec, {
3276
- readTracking: this.readTracking,
3277
- commitValues: this.commitValues,
3278
- writeProvenance: this.writeProvenance,
3279
- scopeFactory: (...args) => {
3280
- const scope = scopeFactory(...args);
3281
- if (scope !== null && typeof scope === 'object') {
3282
- ownScopes.add(scope);
3283
- // THIS executor's request, bound to the scope for its whole life.
3284
- if (request !== undefined)
3285
- scopeRequests.set(scope, request);
3286
- }
3287
- return scope;
3288
- },
3289
- });
3290
- redaction.applyTo(executor);
3291
- // Enable structured narrative so `getLastNarrativeEntries()` can
3292
- // hand a populated array to consumer Trace views (ExplainableShell).
3293
- // Cheap when no consumer reads it; the recorder accumulates only.
3294
- executor.enableNarrative();
3295
- this.lastExecutor = executor;
2979
+ const redaction = this.prepareRunRedaction(invocation, runOptions?.redact);
2980
+ const attachments = redaction.recorders.map((recorder) => ({ recorder }));
3296
2981
  const dispatcher = this.getDispatcher();
3297
2982
  // RFC-001 Block 10 — observer delivery tier. With 'deferred', every
3298
2983
  // bridge below is attached onto footprintjs's bounded capture queue
@@ -3304,35 +2989,11 @@ export class Agent extends RunnerBase {
3304
2989
  ? { delivery: 'deferred', ...this.observerDeliveryOptions }
3305
2990
  : undefined;
3306
2991
  const attachObserver = (rec) => {
3307
- if (deferredOpts)
3308
- executor.attachCombinedRecorder(rec, deferredOpts);
3309
- else
3310
- executor.attachCombinedRecorder(rec);
2992
+ attachments.push({ recorder: rec, ...(deferredOpts && { options: deferredOpts }) });
3311
2993
  };
3312
2994
  attachObserver(new ContextRecorder({ dispatcher, getRunContext: getRunCtx, realWrites: redaction }));
3313
- // Evidence bridge (#5): harvest decisions/toolCalls/tokens for causal snapshots.
3314
- // ALWAYS INLINE — never routed through the deferred queue: the memory
3315
- // write stage consumes its accumulators MID-run (`collect()` via
3316
- // `evidenceSource`, mountMemoryPipeline). Deferred delivery would run
3317
- // `collect()` before the queue flushed the turn's tool/token/decision
3318
- // events, persisting an incomplete causal snapshot.
3319
- if (this.causalEvidence) {
3320
- // Its emits arrive on the real-value path (constructor); the executor
3321
- // feeds it the flow channel's decisions and the per-run reset only.
3322
- const evidence = this.causalEvidence;
3323
- executor.attachCombinedRecorder({
3324
- id: evidence.id,
3325
- onDecision: (event) => evidence.onDecision(event),
3326
- onSelected: (event) => evidence.onSelected(event),
3327
- clear: () => evidence.clear(),
3328
- });
3329
- }
3330
- // Compaction's instrument. ALWAYS INLINE, for the same reason the evidence
3331
- // bridge is: the compaction stage reads it MID-run, at the loop head, to
3332
- // decide whether this iteration's window is over budget. A measurement
3333
- // delivered one beat behind would be a measurement of the wrong window.
3334
- if (this.compactionMeterHandle) {
3335
- executor.attachCombinedRecorder(this.compactionMeterHandle);
2995
+ // Computational observers belong to native component setup, always inline.
2996
+ if (this.windowStrategy !== undefined) {
3336
2997
  // Folds speak the context vocabulary consumers already subscribe to
3337
2998
  // (`context.evicted` / `context.budget_pressure`) — no new event types.
3338
2999
  // ContextRecorder only dispatches those from writes INSIDE a slot
@@ -3489,17 +3150,30 @@ export class Agent extends RunnerBase {
3489
3150
  // `{ id, delivery: 'inline', ...hooks }` stays inline under an
3490
3151
  // observerDelivery: 'deferred' agent, and vice versa.
3491
3152
  if (r.delivery !== undefined)
3492
- executor.attachCombinedRecorder(r);
3153
+ attachments.push({ recorder: r });
3493
3154
  else
3494
3155
  attachObserver(r);
3495
3156
  }
3496
- // LAST, so the manifest describes a fully-wired run — and so it is the
3497
- // first event of this runId that any listener sees.
3498
- this.emitRunManifest();
3499
- // …then the declared skill map (9.50.0), so a recording opens with the
3500
- // arm's configuration and the author's topology before any stage event.
3501
- this.emitSkillGraphDeclared();
3502
- return executor;
3157
+ return {
3158
+ setup: {
3159
+ redaction: redaction.recordPolicy,
3160
+ narrative: {},
3161
+ attachments,
3162
+ onOrigin: () => {
3163
+ // Native is the only ID/clock authority. Remaining domain consumers
3164
+ // still migrate to captured component values; no private ID is minted.
3165
+ this.bindRunServing(invocation);
3166
+ this.emitRunManifest(invocation.context());
3167
+ this.emitSkillGraphDeclared(invocation.context());
3168
+ },
3169
+ },
3170
+ binding: {
3171
+ metadata,
3172
+ bindScope: (scope, context) => {
3173
+ redaction.bindScope(scope, context);
3174
+ },
3175
+ },
3176
+ };
3503
3177
  }
3504
3178
  /**
3505
3179
  * File the run-configuration manifest (9.41.0) — which adapters and
@@ -3527,8 +3201,8 @@ export class Agent extends RunnerBase {
3527
3201
  * with `'*'` before the run starts, so every recording carries one.
3528
3202
  */
3529
3203
  /** Fresh per-run ledger — see AgentOptions.integrityPosture (9.60.0). */
3530
- beginIntegrityLedger() {
3531
- this.integrityLedgerHolder.current = beginIntegrityRun({
3204
+ beginIntegrityLedger(values) {
3205
+ values.integrityLedger.current = beginIntegrityRun({
3532
3206
  wire: true,
3533
3207
  composeInvariant: this.mapsPlan !== undefined,
3534
3208
  dangling: this.integrityDanglingPresent,
@@ -3554,11 +3228,11 @@ export class Agent extends RunnerBase {
3554
3228
  * uncaught. Called on the SUCCESS path before the recording files, so the
3555
3229
  * failure is the run's result, never a masked afterthought.
3556
3230
  */
3557
- assertIntegrityAlive() {
3231
+ assertIntegrityAlive(invocation) {
3558
3232
  if (this.integrityPosture !== 'dev')
3559
3233
  return;
3560
- this.integrityLedgerHolder.current?.assertAlive({
3561
- workExisted: this.integrityWorkExisted(),
3234
+ invocation.value.integrityLedger.current?.assertAlive({
3235
+ workExisted: this.integrityWorkExisted(invocation),
3562
3236
  });
3563
3237
  }
3564
3238
  /**
@@ -3573,8 +3247,8 @@ export class Agent extends RunnerBase {
3573
3247
  * circular: an unhooked check would report "no work existed" and silence
3574
3248
  * the very alarm it should be tripping.
3575
3249
  */
3576
- integrityWorkExisted() {
3577
- const state = this.liveSnapshot()?.sharedState;
3250
+ integrityWorkExisted(invocation) {
3251
+ const state = invocation.view.snapshot()?.sharedState;
3578
3252
  return state !== undefined && state.llmLatestContent !== undefined;
3579
3253
  }
3580
3254
  /**
@@ -3583,9 +3257,9 @@ export class Agent extends RunnerBase {
3583
3257
  * before the recording stops. Listener-gated like every typed event, and
3584
3258
  * deliberately throw-proof: accounting must never change a run's outcome.
3585
3259
  */
3586
- fileIntegrityDisposition() {
3587
- const ledger = this.integrityLedgerHolder.current;
3588
- this.integrityLedgerHolder.current = undefined;
3260
+ fileIntegrityDisposition(invocation) {
3261
+ const ledger = invocation.value.integrityLedger.current;
3262
+ invocation.value.integrityLedger.current = undefined;
3589
3263
  if (ledger === undefined)
3590
3264
  return;
3591
3265
  try {
@@ -3597,17 +3271,17 @@ export class Agent extends RunnerBase {
3597
3271
  type,
3598
3272
  payload: {
3599
3273
  posture: this.integrityPosture,
3600
- workExisted: this.integrityWorkExisted(),
3274
+ workExisted: this.integrityWorkExisted(invocation),
3601
3275
  rows: ledger.report(),
3602
3276
  },
3603
- meta: buildEventMeta({ runtimeStageId: INTEGRITY_DISPOSITION_STAGE_ID }, this.currentRunContext),
3277
+ meta: buildEventMeta({ runtimeStageId: INTEGRITY_DISPOSITION_STAGE_ID }, invocation.context()),
3604
3278
  });
3605
3279
  }
3606
3280
  catch {
3607
3281
  // Recorder/dispatcher failures never abort a run — the house rule.
3608
3282
  }
3609
3283
  }
3610
- emitRunManifest() {
3284
+ emitRunManifest(context) {
3611
3285
  const type = 'agentfootprint.agent.run_configured';
3612
3286
  const dispatcher = this.getDispatcher();
3613
3287
  if (!dispatcher.hasListenersFor(type))
@@ -3658,7 +3332,7 @@ export class Agent extends RunnerBase {
3658
3332
  },
3659
3333
  }),
3660
3334
  }),
3661
- meta: buildEventMeta({ runtimeStageId: RUN_MANIFEST_STAGE_ID }, this.currentRunContext),
3335
+ meta: buildEventMeta({ runtimeStageId: RUN_MANIFEST_STAGE_ID }, context),
3662
3336
  });
3663
3337
  }
3664
3338
  /**
@@ -3677,7 +3351,7 @@ export class Agent extends RunnerBase {
3677
3351
  * No graph, or a graph that could not state its map ⇒ no event — absent,
3678
3352
  * never guessed.
3679
3353
  */
3680
- emitSkillGraphDeclared() {
3354
+ emitSkillGraphDeclared(context) {
3681
3355
  if (this.skillGraphDeclared === undefined)
3682
3356
  return;
3683
3357
  const type = 'agentfootprint.skill.graph_declared';
@@ -3687,7 +3361,7 @@ export class Agent extends RunnerBase {
3687
3361
  dispatcher.dispatch({
3688
3362
  type,
3689
3363
  payload: this.skillGraphDeclared,
3690
- meta: buildEventMeta({ runtimeStageId: GRAPH_DECLARED_STAGE_ID }, this.currentRunContext),
3364
+ meta: buildEventMeta({ runtimeStageId: GRAPH_DECLARED_STAGE_ID }, context),
3691
3365
  });
3692
3366
  }
3693
3367
  /**
@@ -3711,9 +3385,10 @@ export class Agent extends RunnerBase {
3711
3385
  * ```
3712
3386
  */
3713
3387
  drainObservers(opts) {
3714
- if (!this.lastExecutor)
3388
+ const view = this.runExecution().view();
3389
+ if (view === undefined)
3715
3390
  return Promise.resolve({ done: 0, failed: 0, pending: 0 });
3716
- return this.lastExecutor.drainObservers(opts);
3391
+ return view.drainObservers(opts);
3717
3392
  }
3718
3393
  /**
3719
3394
  * Did the last turn stop because a LIMIT cut it short — and if so, which?
@@ -3959,15 +3634,16 @@ export class Agent extends RunnerBase {
3959
3634
  * ```
3960
3635
  */
3961
3636
  async assessment(declarations) {
3962
- const snapshot = this.liveSnapshot();
3637
+ const selected = this.runExecution().selected();
3638
+ const snapshot = selected?.view.snapshot();
3963
3639
  if (snapshot === undefined)
3964
3640
  return undefined;
3965
3641
  // Settled before the fold, which cannot tell a crash from its committed state: an answer
3966
3642
  // this run RETURNED (`lastRunAnswer`, cleared at every run's start), or a pause — the fold
3967
3643
  // reads that one from the committed state itself. Read BEFORE the import resolves, so a
3968
3644
  // run started meanwhile cannot change which run is assessed.
3969
- const paused = this.lastExecutor?.isPaused() === true;
3970
- if (!paused && this.lastRunAnswer === undefined)
3645
+ const paused = selected?.view.isPaused() === true;
3646
+ if (!paused && selected?.value.answer === undefined)
3971
3647
  return undefined;
3972
3648
  // Loaded on first use, off the default graph (the findings/peel.ts precedent).
3973
3649
  // The live state, read as values — never as a served record (`assess.ts` · `assessLive`).
@@ -4102,11 +3778,13 @@ export class Agent extends RunnerBase {
4102
3778
  }
4103
3779
  return undefined;
4104
3780
  }
4105
- finalizeResult(executor, result) {
4106
- const paused = this.detectPause(executor, result);
3781
+ finalizeResult(invocation, result) {
3782
+ const paused = this.detectPause(invocation, result);
4107
3783
  if (paused)
4108
3784
  return paused;
4109
- const snap = executor.getSnapshot();
3785
+ const snap = invocation.view.snapshot();
3786
+ if (snap === undefined)
3787
+ throw new TypeError('The native execution has no ready snapshot');
4110
3788
  const state = snap.sharedState;
4111
3789
  const refusal = this.refusalVerdictOf(state);
4112
3790
  if (refusal !== undefined) {
@@ -4122,7 +3800,7 @@ export class Agent extends RunnerBase {
4122
3800
  stage: '__output_admission__',
4123
3801
  scope: 'run',
4124
3802
  },
4125
- meta: buildEventMeta({ runtimeStageId: '__output_admission__' }, this.currentRunContext),
3803
+ meta: buildEventMeta({ runtimeStageId: '__output_admission__' }, invocation.context()),
4126
3804
  });
4127
3805
  }
4128
3806
  // The verdict was decoded from the LIVE state above; the snapshot a
@@ -4143,10 +3821,10 @@ export class Agent extends RunnerBase {
4143
3821
  // `'pause'` this is unreachable for the first block (the run pauses and
4144
3822
  // `detectPause` returned above); it still fires if a RESUME found consent
4145
3823
  // ungranted and the model then finished the turn on its own.
4146
- if (this.consentOutstanding.size > 0) {
4147
- const [record] = [...this.consentOutstanding.values()];
3824
+ if (invocation.value.consentOutstanding.size > 0) {
3825
+ const [record] = [...invocation.value.consentOutstanding.values()];
4148
3826
  if (record) {
4149
- this.consentOutstanding.clear();
3827
+ invocation.value.consentOutstanding.clear();
4150
3828
  throw new CredentialConsentRequiredError(record);
4151
3829
  }
4152
3830
  }
@@ -4227,163 +3905,177 @@ export class Agent extends RunnerBase {
4227
3905
  // keep them. Negative-claim observations also persist independently of those
4228
3906
  // layers. Still value-conditional inside seed (only when rows exist).
4229
3907
  let ledgerRestoreArmed = this.findingsOptions !== undefined || this.negativeClaimsConfig !== undefined;
4230
- const consumeResumeLedger = () => {
4231
- const l = this.pendingResumeFindingsLedger;
4232
- this.pendingResumeFindingsLedger = undefined;
4233
- return l;
4234
- };
4235
- const seed = buildSeedStage({
4236
- maxIterations,
4237
- // The forced-output tool's name (9.88.0) — a build-time constant, put on
4238
- // the record once so a rebuild can name it without reading a receipt.
4239
- ...(this.outputEnforcement?.schemaTool !== undefined && {
4240
- forcedOutputToolName: this.outputEnforcement.schemaTool.name,
4241
- }),
4242
- cachingDisabled,
4243
- ...(costBudget !== undefined && { costBudgetOnExceed: costBudget.onExceed }),
4244
- get toolSchemas() {
4245
- return toolSchemasResolved;
4246
- },
4247
- get toolWantsByName() {
4248
- return seededToolWants;
4249
- },
4250
- get ruledTools() {
4251
- return seededRuledTools;
4252
- },
4253
- get honestyLayers() {
4254
- return seededHonestyLayers;
4255
- },
4256
- // The time layer's clock: the draft `run()` read (refusing a run with no
4257
- // zone), stamped by seed as the turn's one `clock` row. Absent → the
4258
- // deps object seed always had.
4259
- // The caller's clock belongs to the agent's OWN run: a member (another
4260
- // runner's executor) gets the builder's fallback, never a concurrent
4261
- // direct caller's `time` (`memberRun.ts`).
4262
- ...(this.timeOptions !== undefined && {
4263
- timeClock: (scope) => this.ownScopes.has(scope)
4264
- ? this.seedClockDraft()
4265
- : draftClock(undefined, this.timeOptions ?? {}),
4266
- }),
4267
- // The time layer's reader: seed reads the person's words once per turn,
4268
- // after the clock. Absent → nothing is read.
4269
- ...(this.timeOptions?.reader !== undefined &&
4270
- this.timeOptions.policy !== undefined && {
4271
- timeReader: { reader: this.timeOptions.reader, policy: this.timeOptions.policy },
4272
- }),
4273
- // Declared sources (honesty layer 2): the seed twin plants `_findings.from`
4274
- // on ruled tools, and the run's `messageFrom` constant is written — only
4275
- // under the arm (refused at build without the inputs layer).
4276
- ...(this.argumentSourcesArmed === true && { argumentSources: true }),
4277
- // The answer check's tool-call ledger — value-conditional, so an agent
4278
- // without answer validation or negative claims keeps its prior shape.
4279
- ...((this.answerValidationConfig !== undefined ||
4280
- this.negativeClaimsConfig !== undefined) && { toolCallLedger: true }),
4281
- ...(this.negativeClaimsConfig !== undefined && { negativeClaimsArmed: true }),
4282
- get consumePendingResumeFindingsLedger() {
4283
- return ledgerRestoreArmed ? consumeResumeLedger : undefined;
4284
- },
4285
- consumePendingResumeHistory: () => {
4286
- const h = this.pendingResumeHistory;
4287
- this.pendingResumeHistory = undefined;
4288
- return h;
4289
- },
4290
- ...(this.evidenceGate !== undefined &&
4291
- this.evidenceGate.posture !== 'assist' && {
4292
- consumePendingEvidenceRecovery: () => {
4293
- const recovery = this.pendingEvidenceRecovery;
4294
- this.pendingEvidenceRecovery = undefined;
4295
- return recovery;
3908
+ const seedFor = (run) => {
3909
+ const consumeResumeLedger = () => {
3910
+ const l = run.value.pendingResumeFindingsLedger;
3911
+ run.value.pendingResumeFindingsLedger = undefined;
3912
+ return l;
3913
+ };
3914
+ return buildSeedStage({
3915
+ maxIterations,
3916
+ // The forced-output tool's name (9.88.0) — a build-time constant, put on
3917
+ // the record once so a rebuild can name it without reading a receipt.
3918
+ ...(this.outputEnforcement?.schemaTool !== undefined && {
3919
+ forcedOutputToolName: this.outputEnforcement.schemaTool.name,
3920
+ }),
3921
+ cachingDisabled,
3922
+ ...(costBudget !== undefined && { costBudgetOnExceed: costBudget.onExceed }),
3923
+ get toolSchemas() {
3924
+ return toolSchemasResolved;
4296
3925
  },
4297
- }),
4298
- consumePendingResumeFolded: () => {
4299
- const f = this.pendingResumeFolded;
4300
- this.pendingResumeFolded = undefined;
4301
- return f;
4302
- },
4303
- // The findings ledger (9.101.0): the arm, the serve mode it puts on the
4304
- // record (the `forcedOutputToolName` precedent — a build-time constant
4305
- // the rebuild reads instead of the receipt), and the continued
4306
- // conversation's rows, all under the one gate — an unarmed agent hands
4307
- // seed exactly the deps object it always did.
4308
- ...(this.findingsOptions !== undefined && {
4309
- findings: true,
4310
- findingsServe: this.findingsOptions.serve ?? 'ledger-and-facts',
4311
- findingsContextBytes: this.findingsOptions.maxContextBytes,
4312
- // The answer-turn ask (9.103.0): VALUE-conditional inside the arm —
4313
- // the default `'none'` threads nothing and writes no key.
4314
- ...(this.findingsOptions.answerAsk === 'quote-facts' && {
4315
- findingsAnswerAsk: 'quote-facts',
3926
+ get toolWantsByName() {
3927
+ return seededToolWants;
3928
+ },
3929
+ get ruledTools() {
3930
+ return seededRuledTools;
3931
+ },
3932
+ get honestyLayers() {
3933
+ return seededHonestyLayers;
3934
+ },
3935
+ // The time layer's clock: the draft `run()` read (refusing a run with no
3936
+ // zone), stamped by seed as the turn's one `clock` row. Absent → the
3937
+ // deps object seed always had.
3938
+ // The caller's clock belongs to the agent's OWN run: a member (another
3939
+ // runner's executor) gets the builder's fallback, never a concurrent
3940
+ // direct caller's `time` (`memberRun.ts`).
3941
+ ...(this.timeOptions !== undefined && {
3942
+ timeClock: () => run.own
3943
+ ? this.seedClockDraft(run.value)
3944
+ : draftClock(undefined, this.timeOptions ?? {}),
4316
3945
  }),
4317
- }),
4318
- // The declared ontology (9.106.0): the whole frozen map, which seed
4319
- // writes ONCE as the run constant `ontology` — the `findingsServe`
4320
- // precedent, a build-time fact the rebuild reads from the RECORD. An
4321
- // unarmed agent hands seed exactly the deps object it always did.
4322
- ...(this.ontology !== undefined && {
4323
- ontology: this.ontology,
4324
- ontologyTools: () => this.ontologyTools,
4325
- }),
4326
- // The conversation's inherited skill cursor (SG-C). Consumed (cleared)
4327
- // on every run; HONORED only when the mounted graph declared
4328
- // `continuity: 'conversation'` — the same one-option-one-behavior gate
4329
- // the write side (`checkpoint()`) applies.
4330
- consumePendingResumeSkillCursor: () => {
4331
- const c = this.pendingResumeSkillCursor;
4332
- this.pendingResumeSkillCursor = undefined;
4333
- return c;
4334
- },
4335
- restoreSkillCursor: this.skillGraphCascade?.continuity === 'conversation',
4336
- // Steps (9.18.0): gate the per-run stepPointer/stepNudgeSpent reset on
4337
- // the feature, so every other agent seeds exactly the keys it always did.
4338
- ...(stepPlanFor !== undefined && { hasSteps: true }),
4339
- // Escalation (9.19.0): same gate discipline — the per-run counter/flip
4340
- // reset exists only when the policy does (de-escalation IS the seed).
4341
- ...(this.skillBrains?.escalation !== undefined && { hasEscalation: true }),
4342
- // The evidence gate's one bounded revision (9.35.0) — a per-turn budget,
4343
- // reset here. Only a posture that can revise writes the key.
4344
- ...((this.typedNegativeClaimsConfig !== undefined ||
4345
- (this.evidenceGate !== undefined && this.evidenceGate.posture !== 'assist')) && {
4346
- hasEvidenceRevision: true,
4347
- }),
4348
- // Under an enforcing answer validation the tools stay off for a run
4349
- // resumed after its revision was asked (`toolsOffAfterRevision`).
4350
- ...(this.revisionWithholdsTools() && { toolsOffAfterRevision: true }),
4351
- getCurrentRunId: () => this.currentRunContext?.runId,
4352
- // WHO this run is for, when the caller named nobody (9.10.0). Seed uses
4353
- // it for exactly one rung of the identity ladder — see `seedFrom` — and
4354
- // an explicit identity outranks it there. Read through an accessor for
4355
- // the same reason the runId is: the chart is built once, and this
4356
- // changes every run.
4357
- getCurrentSessionId: () => this.currentRunContext?.sessionId,
4358
- // Whether this stage runs in THIS agent's own executor, or inside another
4359
- // runner's (a composition, a chart a caller built) — where the accessors
4360
- // above describe some other run (`memberRun.ts`). Asked per scope.
4361
- isOwnRun: (scope) => this.ownScopes.has(scope),
4362
- // WHICH TURN THIS IS (9.6.0). Only memories that WRITE the conversation
4363
- // are consulted: they are the ones whose entry ids are turn-stamped, and
4364
- // a corpus (`.rag(...)`, which reads under its own namespace) has no
4365
- // turns at all. Empty list → seed stays synchronous and makes no store
4366
- // call, so an agent without memory is unchanged.
4367
- ...(conversationStores.length > 0 && { conversationStores }),
4368
- // The `'input'` half of the message chain, run BEFORE `userMessage` and
4369
- // `history` are committed — see SeedStageDeps.messageMiddleware.
4370
- ...(this.messageMiddleware.length > 0 && { messageMiddleware: this.messageMiddleware }),
4371
- // `.configure()` — seed is where run-level facts are decided and
4372
- // committed, so the resolver rides that commit. The closure supplies
4373
- // the build-time defaults so a resolver can decide RELATIVE to them
4374
- // ("upgrade the model when the message is long") instead of having to
4375
- // restate them.
4376
- ...(this.runConfigFn && {
4377
- resolveRunConfig: (input) => {
4378
- const ctx = {
4379
- message: input.message,
4380
- ...(input.identity !== undefined && { identity: input.identity }),
4381
- runId: this.currentRunContext?.runId ?? 'unknown',
4382
- defaults: { model, instructions: systemPromptValue },
4383
- };
4384
- return this.runConfigFn?.(ctx);
3946
+ // The time layer's reader: seed reads the person's words once per turn,
3947
+ // after the clock. Absent → nothing is read.
3948
+ ...(this.timeOptions?.reader !== undefined &&
3949
+ this.timeOptions.policy !== undefined && {
3950
+ timeReader: { reader: this.timeOptions.reader, policy: this.timeOptions.policy },
3951
+ }),
3952
+ // Declared sources (honesty layer 2): the seed twin plants `_findings.from`
3953
+ // on ruled tools, and the run's `messageFrom` constant is written — only
3954
+ // under the arm (refused at build without the inputs layer).
3955
+ ...(this.argumentSourcesArmed === true && { argumentSources: true }),
3956
+ // The answer check's tool-call ledger — value-conditional, so an agent
3957
+ // without answer validation or negative claims keeps its prior shape.
3958
+ ...((this.answerValidationConfig !== undefined ||
3959
+ this.negativeClaimsConfig !== undefined) && { toolCallLedger: true }),
3960
+ ...(this.negativeClaimsConfig !== undefined && { negativeClaimsArmed: true }),
3961
+ get consumePendingResumeFindingsLedger() {
3962
+ return ledgerRestoreArmed ? consumeResumeLedger : undefined;
4385
3963
  },
4386
- }),
3964
+ consumePendingResumeHistory: () => {
3965
+ const h = run.value.pendingResumeHistory;
3966
+ run.value.pendingResumeHistory = undefined;
3967
+ return h;
3968
+ },
3969
+ ...(this.evidenceGate !== undefined &&
3970
+ this.evidenceGate.posture !== 'assist' && {
3971
+ consumePendingEvidenceRecovery: () => {
3972
+ const recovery = run.value.pendingEvidenceRecovery;
3973
+ run.value.pendingEvidenceRecovery = undefined;
3974
+ return recovery;
3975
+ },
3976
+ }),
3977
+ consumePendingResumeFolded: () => {
3978
+ const f = run.value.pendingResumeFolded;
3979
+ run.value.pendingResumeFolded = undefined;
3980
+ return f;
3981
+ },
3982
+ // The findings ledger (9.101.0): the arm, the serve mode it puts on the
3983
+ // record (the `forcedOutputToolName` precedent — a build-time constant
3984
+ // the rebuild reads instead of the receipt), and the continued
3985
+ // conversation's rows, all under the one gate — an unarmed agent hands
3986
+ // seed exactly the deps object it always did.
3987
+ ...(this.findingsOptions !== undefined && {
3988
+ findings: true,
3989
+ findingsServe: this.findingsOptions.serve ?? 'ledger-and-facts',
3990
+ findingsContextBytes: this.findingsOptions.maxContextBytes,
3991
+ // The answer-turn ask (9.103.0): VALUE-conditional inside the arm —
3992
+ // the default `'none'` threads nothing and writes no key.
3993
+ ...(this.findingsOptions.answerAsk === 'quote-facts' && {
3994
+ findingsAnswerAsk: 'quote-facts',
3995
+ }),
3996
+ }),
3997
+ // The declared ontology (9.106.0): the whole frozen map, which seed
3998
+ // writes ONCE as the run constant `ontology` — the `findingsServe`
3999
+ // precedent, a build-time fact the rebuild reads from the RECORD. An
4000
+ // unarmed agent hands seed exactly the deps object it always did.
4001
+ ...(this.ontology !== undefined && {
4002
+ ontology: this.ontology,
4003
+ ontologyTools: () => this.ontologyTools,
4004
+ }),
4005
+ // The conversation's inherited skill cursor (SG-C). Consumed (cleared)
4006
+ // on every run; HONORED only when the mounted graph declared
4007
+ // `continuity: 'conversation'` — the same one-option-one-behavior gate
4008
+ // the write side (`checkpoint()`) applies.
4009
+ consumePendingResumeSkillCursor: () => {
4010
+ const c = run.value.pendingResumeSkillCursor;
4011
+ run.value.pendingResumeSkillCursor = undefined;
4012
+ return c;
4013
+ },
4014
+ restoreSkillCursor: this.skillGraphCascade?.continuity === 'conversation',
4015
+ // Steps (9.18.0): gate the per-run stepPointer/stepNudgeSpent reset on
4016
+ // the feature, so every other agent seeds exactly the keys it always did.
4017
+ ...(stepPlanFor !== undefined && { hasSteps: true }),
4018
+ // Escalation (9.19.0): same gate discipline — the per-run counter/flip
4019
+ // reset exists only when the policy does (de-escalation IS the seed).
4020
+ ...(this.skillBrains?.escalation !== undefined && { hasEscalation: true }),
4021
+ // The evidence gate's one bounded revision (9.35.0) — a per-turn budget,
4022
+ // reset here. Only a posture that can revise writes the key.
4023
+ ...((this.typedNegativeClaimsConfig !== undefined ||
4024
+ (this.evidenceGate !== undefined && this.evidenceGate.posture !== 'assist')) && {
4025
+ hasEvidenceRevision: true,
4026
+ }),
4027
+ // Under an enforcing answer validation the tools stay off for a run
4028
+ // resumed after its revision was asked (`toolsOffAfterRevision`).
4029
+ ...(this.revisionWithholdsTools() && { toolsOffAfterRevision: true }),
4030
+ getCurrentRunId: () => run.context.runId,
4031
+ // WHO this run is for, when the caller named nobody (9.10.0). Seed uses
4032
+ // it for exactly one rung of the identity ladder — see `seedFrom` — and
4033
+ // an explicit identity outranks it there. Read through an accessor for
4034
+ // the same reason the runId is: the chart is built once, and this
4035
+ // changes every run.
4036
+ getCurrentSessionId: () => run.context.sessionId,
4037
+ // Whether this stage runs in THIS agent's own executor, or inside another
4038
+ // runner's (a composition, a chart a caller built) — where the accessors
4039
+ // above describe some other run (`memberRun.ts`). Asked per scope.
4040
+ isOwnRun: () => run.own,
4041
+ // WHICH TURN THIS IS (9.6.0). Only memories that WRITE the conversation
4042
+ // are consulted: they are the ones whose entry ids are turn-stamped, and
4043
+ // a corpus (`.rag(...)`, which reads under its own namespace) has no
4044
+ // turns at all. Empty list → seed stays synchronous and makes no store
4045
+ // call, so an agent without memory is unchanged.
4046
+ ...(conversationStores.length > 0 && { conversationStores }),
4047
+ // The `'input'` half of the message chain, run BEFORE `userMessage` and
4048
+ // `history` are committed — see SeedStageDeps.messageMiddleware.
4049
+ ...(this.messageMiddleware.length > 0 && { messageMiddleware: this.messageMiddleware }),
4050
+ // `.configure()` — seed is where run-level facts are decided and
4051
+ // committed, so the resolver rides that commit. The closure supplies
4052
+ // the build-time defaults so a resolver can decide RELATIVE to them
4053
+ // ("upgrade the model when the message is long") instead of having to
4054
+ // restate them.
4055
+ ...(this.runConfigFn && {
4056
+ resolveRunConfig: (input) => {
4057
+ const ctx = {
4058
+ message: input.message,
4059
+ ...(input.identity !== undefined && { identity: input.identity }),
4060
+ runId: run.context.runId ?? 'unknown',
4061
+ defaults: { model, instructions: systemPromptValue },
4062
+ };
4063
+ return this.runConfigFn?.(ctx);
4064
+ },
4065
+ }),
4066
+ });
4067
+ };
4068
+ const seed = bindRunnerStage((scope) => this.runExecution().forScope(scope), (run) => (scope) => {
4069
+ run.value.resources?.seed(scope);
4070
+ // Mounted runs have no Agent.run() admission. Seed's actual input is
4071
+ // their original message; never read another run's selected values.
4072
+ run.value.checkpointTracker ??= {
4073
+ runId: run.context.runId,
4074
+ originalInput: { message: scope.$getArgs().message },
4075
+ history: [],
4076
+ lastCompletedIteration: 0,
4077
+ };
4078
+ return (run.value.seed ??= seedFor(run))(scope);
4387
4079
  });
4388
4080
  // Tool registry composition extracted to ./agent/buildToolRegistry.ts.
4389
4081
  // Composes static .tool() registry + auto-attached read_skill (+ the
@@ -4399,6 +4091,8 @@ export class Agent extends RunnerBase {
4399
4091
  // plants `_findings.from` on it and its sentences name that argument.
4400
4092
  ...(this.argumentSourcesArmed === true && { argumentSources: true }),
4401
4093
  });
4094
+ if ([...registryByName.values()].some(carriesArgumentView))
4095
+ declarePrivateFields(this);
4402
4096
  // The declared ontology's tool edges (9.106.0): every name a node's `via`
4403
4097
  // names must be a tool this registry can dispatch — the static registry,
4404
4098
  // the framework's doors and every skill's tools, `registryByName` being
@@ -4646,44 +4340,22 @@ export class Agent extends RunnerBase {
4646
4340
  const messagesSubflow = buildMessagesSlot({
4647
4341
  ...(budget?.messages !== undefined && { budgetCap: budget.messages }),
4648
4342
  });
4649
- // Cache shared between buildToolsSlot (writer, each iteration) and
4650
- // buildToolCallsHandler (reader, same iteration). Holds the resolved
4651
- // Tool[] from `provider.list(ctx)` so dispatch doesn't re-invoke `list()`
4652
- // — vital for async network providers.
4653
- //
4654
- // LIFETIME, stated correctly (9.92.0): the chart is built ONCE, at
4655
- // construction (`initChart`), and reused by every `run()` and `resume()`
4656
- // of this Agent — so this cache and the record below outlive a run. They
4657
- // are safe because one Agent runs one turn at a time and the slot
4658
- // overwrites them every iteration before dispatch reads them. What that
4659
- // does NOT cover is a resume in a FRESH instance, whose closure is empty
4660
- // and whose Compose never re-runs before the resumed dispatch — which is
4661
- // why the pause paths carry `pausedToolParty` on the checkpoint.
4662
- const providerToolCache = { current: [] };
4663
- // Who put each name on the wire (9.92.0) — the same closure-shared shape,
4664
- // written by the tools slot's merge and read by dispatch so the party
4665
- // whose contract the model read is the party that answers. `lastServed`
4666
- // is the run's memory of the same fact, for a name that left the wire.
4667
- const servedTools = { current: new Map(), lastServed: new Map() };
4668
- // THE ONE DISPATCH RESOLVER, for the inputs layer (honesty layer 2): built
4669
- // from the SAME deps objects the dispatch handler builds its own from, so
4670
- // the layer reads a call's rules off the implementation that will answer.
4671
- const resolveForLayer = buildToolResolver({
4343
+ // Every reader binds the same native component's private catalog.
4344
+ const resolverForValues = (values) => buildToolResolver({
4672
4345
  registryByName,
4673
4346
  ...(this.externalToolProvider && { externalToolProvider: this.externalToolProvider }),
4674
- ...(this.externalToolProvider && { providerToolCache }),
4675
- servedTools,
4347
+ ...(this.externalToolProvider && { providerToolCache: values.providerToolCache }),
4348
+ servedTools: values.servedTools,
4676
4349
  toolClaimants,
4677
4350
  notServed: notServedResult,
4678
4351
  });
4679
- // A tool's `displayName` — the app's words for a call, read by a person — read
4680
- // through the same resolver, so a ToolProvider's tool is read as well, and through
4681
- // the one rule (`lib/displayName.ts` · `readDisplayName`), so a value nobody vetted
4682
- // is never printed. Wired only where a tool can declare one: on every other agent
4683
- // the final branch is the one it always was.
4684
- const displayNameOf = this.externalToolProvider !== undefined ||
4352
+ const resolveForLayer = (scope) => resolverForValues(this.runExecution().forScope(scope).value);
4353
+ const displayNameOfFor = this.externalToolProvider !== undefined ||
4685
4354
  [...registryByName.values()].some((tool) => tool.displayName !== undefined)
4686
- ? (toolName) => readDisplayName(resolveForLayer(toolName).tool?.displayName)
4355
+ ? (scope) => {
4356
+ const resolve = resolveForLayer(scope);
4357
+ return (toolName) => readDisplayName(resolve(toolName).tool?.displayName);
4358
+ }
4687
4359
  : undefined;
4688
4360
  const readSkillFor = this.readSkillOfferFor();
4689
4361
  // Per-role skill visibility. The Injection Engine resolves the ids once per
@@ -4692,9 +4364,9 @@ export class Agent extends RunnerBase {
4692
4364
  // mount. Since 9.86.0 the description is NOT the only reader — the read_skill gate's refusals, the
4693
4365
  // `skill.rejected` payload, the propose-transition refusal and the dispatch
4694
4366
  // roster all filter through that published set
4695
- // (`stages/toolCalls.ts` · "── Skill-graph read_skill GATE" the gate, `toolCalls.ts` ·
4367
+ // (`stages/toolCalls/routing/readSkillRoute.ts` · `applyReadSkillRoute` the gate, `toolCalls/routing/effectsOperations.ts` ·
4696
4368
  // "── THE REFUSAL SPEAKS WITH THE FILTERED SETS" the propose-transition refusal,
4697
- // `toolCalls.ts` · `dispatchRoster`). Nothing is cached here: an
4369
+ // `toolCalls/execution/catalogOperations.ts` · `dispatchRoster`). Nothing is cached here: an
4698
4370
  // earlier draft of 9.84.0 cached the resolved ids so the gate could filter
4699
4371
  // the self-call notice's move offer through them; the notice no longer names
4700
4372
  // a destination at all (see `selfCallNotice`), so there is nothing left to
@@ -4762,17 +4434,20 @@ export class Agent extends RunnerBase {
4762
4434
  ...(this.mapsPlan !== undefined && {
4763
4435
  mountedMaps: this.mapsPlan.maps.map((m) => ({ id: m.id, toolNames: m.toolNames })),
4764
4436
  }),
4765
- integrityLedger: this.integrityLedgerHolder,
4437
+ runtime: (scope) => {
4438
+ const value = this.runExecution().forScope(scope).value;
4439
+ return { ...value, integrityLedger: value.integrityLedger };
4440
+ },
4766
4441
  ...(this.externalToolProvider && { toolProvider: this.externalToolProvider }),
4767
- ...(this.externalToolProvider && { providerToolCache }),
4768
4442
  // The caller of THIS run, for `ToolDispatchContext.callerIdentity`: the
4769
4443
  // instance's caller on its own run, the member's run on a mount — never a
4770
4444
  // derived identity (the `hiddenSkillIdsNow` precedent).
4771
4445
  ...(this.externalToolProvider && {
4772
- callerIdentity: (scope) => this.ownScopes.has(scope) ? this.lastRunIdentity : memberIdentityIn(scope),
4446
+ callerIdentity: (scope) => this.runExecution().forScope(scope).own
4447
+ ? this.runExecution().forScope(scope).value.identity
4448
+ : memberIdentityIn(scope),
4773
4449
  }),
4774
4450
  toolClaimants,
4775
- servedTools,
4776
4451
  ...(readSkillFor && { readSkillFor }),
4777
4452
  ...(budget?.tools !== undefined && { budgetCap: budget.tools }),
4778
4453
  // Steps (9.18.0): per-step narrowing + banner + the skip_step offer.
@@ -4815,11 +4490,11 @@ export class Agent extends RunnerBase {
4815
4490
  });
4816
4491
  // callLLM extracted to ./agent/stages/callLLM.ts (v2.11.2). Same
4817
4492
  // late-binding pattern as seed for toolSchemas (computed below).
4818
- const callLLM = buildCallLLMStage({
4493
+ const callLLMFor = (run) => buildCallLLMStage({
4819
4494
  onReplayPrepared: (preparation) => {
4820
- if (this.checkpointTracker !== undefined &&
4821
- this.inFlightRunId === this.checkpointTracker.runId)
4822
- retainReplayRetirements(this.checkpointTracker, preparation);
4495
+ if (run.value.checkpointTracker !== undefined &&
4496
+ run.context.runId === run.value.checkpointTracker.runId)
4497
+ retainReplayRetirements(run.value.checkpointTracker, preparation);
4823
4498
  },
4824
4499
  ...((this.typedNegativeClaimsConfig !== undefined ||
4825
4500
  (this.evidenceGate !== undefined && this.evidenceGate.posture !== 'assist')) && {
@@ -4865,17 +4540,19 @@ export class Agent extends RunnerBase {
4865
4540
  // layer). Step T8: the same line carries the turn's time limits.
4866
4541
  ...(this.timeOptions !== undefined && { timeLine: true }),
4867
4542
  // The receipt's salt (9.88.0) — read per call, like seed's own accessor.
4868
- getRunId: () => this.currentRunContext?.runId,
4543
+ getRunId: () => run.context.runId,
4869
4544
  // …and its off switch. Value-conditional, so an agent on the default
4870
4545
  // hands `callLLM` exactly the dep bag it always did.
4871
4546
  ...(this.recordReceiptValue === false && { recordReceipt: false }),
4872
4547
  // …and the window's evictions for `omittedForAttention` (9.93.0) — only
4873
4548
  // an agent with a window strategy has any, and only it hands the seam.
4874
- ...(this.evictedTurnsHandle !== undefined && { evictedTurns: this.evictedTurnsHandle }),
4549
+ ...(run.value.evictedTurnsHandle !== undefined && {
4550
+ evictedTurns: run.value.evictedTurnsHandle,
4551
+ }),
4875
4552
  // …and the receipt memo, so a run hashes each message once rather than
4876
4553
  // once per call (`core/agent/receipt/receiptDigests.ts`). Only where a
4877
4554
  // receipt is minted at all.
4878
- ...(this.recordReceiptValue !== false && { receiptDigests: this.receiptDigests }),
4555
+ ...(this.recordReceiptValue !== false && { receiptDigests: run.value.receiptDigests }),
4879
4556
  provider,
4880
4557
  model,
4881
4558
  ...(temperature !== undefined && { temperature }),
@@ -4908,7 +4585,7 @@ export class Agent extends RunnerBase {
4908
4585
  // was called this response" not-applicable notes.
4909
4586
  ...(this.checkColumnTypes !== 'off' &&
4910
4587
  toolColumns.size > 0 && { columnDeclaringTools: new Set(toolColumns.keys()) }),
4911
- integrityLedger: this.integrityLedgerHolder,
4588
+ integrityLedger: run.value.integrityLedger,
4912
4589
  ...(this.reliabilityConfig !== undefined && { reliability: this.reliabilityConfig }),
4913
4590
  ...(this.outputSchemaParser !== undefined && {
4914
4591
  outputSchemaParser: this.outputSchemaParser,
@@ -4955,18 +4632,20 @@ export class Agent extends RunnerBase {
4955
4632
  // it becomes the ReAct loop target (see the chart builders), so it runs
4956
4633
  // once per iteration boundary with the previous call's adapter-reported
4957
4634
  // usage already measured by the meter.
4958
- const windowStage = this.windowStrategy && this.compactionMeterHandle
4635
+ const callLLM = bindRunnerStage((scope) => this.runExecution().forScope(scope), (run) => (run.value.callLLM ??= callLLMFor(run)));
4636
+ const configuredWindow = this.windowStrategy;
4637
+ const windowStage = configuredWindow
4959
4638
  ? {
4960
4639
  strategyName: this.windowStrategy.name,
4961
- run: buildWindowStage({
4962
- strategy: this.windowStrategy,
4963
- meter: this.compactionMeterHandle,
4964
- ...(this.evictedTurnsHandle !== undefined && {
4965
- evictedTurns: this.evictedTurnsHandle,
4640
+ run: bindRunnerStage((scope) => this.runExecution().forScope(scope), (run) => (run.value.window ??= buildWindowStage({
4641
+ strategy: configuredWindow,
4642
+ meter: run.value.compactionMeter,
4643
+ ...(run.value.evictedTurnsHandle !== undefined && {
4644
+ evictedTurns: run.value.evictedTurnsHandle,
4966
4645
  }),
4967
4646
  agentModel: model,
4968
4647
  providerName: provider.name,
4969
- getRunId: () => this.currentRunContext?.runId,
4648
+ getRunId: () => run.context.runId,
4970
4649
  // Value-conditional (the `repeatedCallNudge` precedent): an
4971
4650
  // agent on the default hands the stage exactly the deps object
4972
4651
  // it always did.
@@ -4985,7 +4664,7 @@ export class Agent extends RunnerBase {
4985
4664
  }),
4986
4665
  ...(pricingTable !== undefined && { pricingTable }),
4987
4666
  ...(costBudget !== undefined && { costBudget }),
4988
- }),
4667
+ }))),
4989
4668
  }
4990
4669
  : undefined;
4991
4670
  // routeDecider extracted to ./agent/stages/route.ts (v2.11.2).
@@ -5016,82 +4695,87 @@ export class Agent extends RunnerBase {
5016
4695
  // question a build-time mount can answer.
5017
4696
  const canCallTools = registryByName.size > 0 || this.externalToolProvider !== undefined;
5018
4697
  const hasWrapUp = canCallTools && this.wrapUpAtMaxIterations !== false;
5019
- const baseRouteDecider = buildRouteDeciderStage(this.messageMiddleware, this.outputEnforcement, stepPlanFor, this.evidenceGate, hasWrapUp, this.claimContract, this.integrityLedgerHolder,
5020
- // THE CLAIM SEAM'S RECENCY READ (9.83.0). Value-conditional on both
5021
- // halves, so an agent that armed neither hands the decider builder
5022
- // exactly the arguments it always did — and `buildRouteDeciderStage`'s
5023
- // no-judge fast path still returns the very function reference every
5024
- // pre-9.83.0 chart was given.
5025
- this.noticePriorTurnEvidence && this.evidenceGate !== undefined ? true : undefined,
5026
- // THE ANSWER TURN'S STANDINGS (9.101.0) — the same value-conditional
5027
- // trailing positional, for the same reason: an unarmed agent hands the
5028
- // builder exactly the arguments it always did.
5029
- this.findingsOptions !== undefined ? true : undefined,
5030
- // THE INPUTS LAYER (honesty layer 2) — the same value-conditional
5031
- // trailing positional: the rows this decider files carry the turn
5032
- // stamp, and with the evidence gate armed too, the gate's exempt corpus
5033
- // gains this turn's assumed values, read from the tools' declarations,
5034
- // and the values the person gave the layer's batch ask (step 4). The
5035
- // results layer (step 7b) arms the stamp alone — "while any layer is
5036
- // armed, the one writer stamps the turn" — and nothing else.
5037
- inputsArmed || resultsArmed
5038
- ? {
5039
- ...(inputsArmed &&
5040
- this.evidenceGate !== undefined && {
5041
- declaredDefaults: declaredDefaultsFrom((toolName, argument) => {
5042
- const rules = rulesOf(resolveForLayer(toolName).tool);
5043
- if (rules === undefined || isRefused(rules))
5044
- return undefined;
5045
- return rules.ruled.find((r) => r.argument === argument)?.assume;
5046
- }),
5047
- answeredValues: answeredValuesOf,
5048
- // Under `.time()` (step T7): the turn's time spellings by
5049
- // lineage — said ones exempt, derived ones filed, not flagged.
5050
- ...(this.timeOptions !== undefined && { timeLineage: true }),
5051
- }),
5052
- }
5053
- : undefined,
5054
- // THE ANSWER LAYER (honesty layer 4) — the same value-conditional
5055
- // trailing positional: the judges file the answer's witness rows, and
5056
- // every row this decider files carries the turn stamp.
5057
- answerArmed ? true : undefined);
5058
- const validatedRouteDecider = this.answerValidationConfig === undefined
5059
- ? baseRouteDecider
5060
- : withAnswerValidation(baseRouteDecider, this.answerValidationConfig, this.outputSchemaParser, artifactStore, () => this.consentOutstanding.size > 0, this.outputEnforcement?.outputFormat !== undefined,
5061
- // Read only when `agentChecks` lists 'claims' (the agent's own rows).
5062
- this.claimContract, this.typedNegativeClaimsConfig === undefined
5063
- ? undefined
5064
- : {
5065
- config: this.typedNegativeClaimsConfig,
5066
- phrases: this.typedNegativeClaimsConfig.phrases,
5067
- applicationValidation: this.applicationAnswerValidation,
5068
- runId: () => this.currentRunContext.runId,
5069
- });
5070
- const routeDecider = this.negativeClaimsConfig?.mode === 'prose'
5071
- ? withNegativeProse(validatedRouteDecider, {
5072
- runId: () => this.currentRunContext.runId,
5073
- hasOutstandingConsent: () => this.consentOutstanding.size > 0,
5074
- structured: this.outputSchemaParser !== undefined,
5075
- phrases: this.negativeClaimsConfig.phrases,
5076
- })
5077
- : validatedRouteDecider;
5078
- // `.limitsTravelWithTheAnswer()` on a TYPED answer — decided once, here.
5079
- // An output schema makes the answer JSON, and the appended block would
5080
- // make it JSON followed by prose, which `runTyped()` cannot parse. So the
5081
- // limits travel as DATA: the Route decider's terminal decision commits the
5082
- // fold (`withAnswerCoverage`) and the Final branch projects it onto
5083
- // `turn_end`. A prose answer keeps the block; an agent that asked for
5084
- // neither is handed the decider it always had.
5085
4698
  const limitsAsData = this.limitsTravelWithTheAnswerValue && this.outputSchemaParser !== undefined;
5086
- // With the inputs layer armed, the typed answer's limits carry this
5087
- // turn's assumed values too — the same rows the prose "Assumed" block
5088
- // prints (`withAnswerCoverage`'s second argument); a rewrite by a
5089
- // before-tool chain is read only when the agent has one.
5090
- const terminalRouteDecider = limitsAsData
5091
- ? withAnswerCoverage(routeDecider, inputsArmed ? { rewrites: this.toolMiddleware.length > 0 } : undefined)
5092
- : routeDecider;
5093
- // toolCallsHandler extracted to ./agent/stages/toolCalls.ts (v2.11.2).
5094
- const toolCallsHandler = buildToolCallsHandler({
4699
+ const routeFor = (run) => {
4700
+ const resolve = resolverForValues(run.value);
4701
+ const baseRouteDecider = buildRouteDeciderStage(this.messageMiddleware, this.outputEnforcement, stepPlanFor, this.evidenceGate, hasWrapUp, this.claimContract, run.value.integrityLedger,
4702
+ // THE CLAIM SEAM'S RECENCY READ (9.83.0). Value-conditional on both
4703
+ // halves, so an agent that armed neither hands the decider builder
4704
+ // exactly the arguments it always did — and `buildRouteDeciderStage`'s
4705
+ // no-judge fast path still returns the very function reference every
4706
+ // pre-9.83.0 chart was given.
4707
+ this.noticePriorTurnEvidence && this.evidenceGate !== undefined ? true : undefined,
4708
+ // THE ANSWER TURN'S STANDINGS (9.101.0) — the same value-conditional
4709
+ // trailing positional, for the same reason: an unarmed agent hands the
4710
+ // builder exactly the arguments it always did.
4711
+ this.findingsOptions !== undefined ? true : undefined,
4712
+ // THE INPUTS LAYER (honesty layer 2) — the same value-conditional
4713
+ // trailing positional: the rows this decider files carry the turn
4714
+ // stamp, and with the evidence gate armed too, the gate's exempt corpus
4715
+ // gains this turn's assumed values, read from the tools' declarations,
4716
+ // and the values the person gave the layer's batch ask (step 4). The
4717
+ // results layer (step 7b) arms the stamp alone — "while any layer is
4718
+ // armed, the one writer stamps the turn" — and nothing else.
4719
+ inputsArmed || resultsArmed
4720
+ ? {
4721
+ ...(inputsArmed &&
4722
+ this.evidenceGate !== undefined && {
4723
+ declaredDefaults: declaredDefaultsFrom((toolName, argument) => {
4724
+ const rules = rulesOf(resolve(toolName).tool);
4725
+ if (rules === undefined || isRefused(rules))
4726
+ return undefined;
4727
+ return rules.ruled.find((r) => r.argument === argument)?.assume;
4728
+ }),
4729
+ answeredValues: answeredValuesOf,
4730
+ // Under `.time()` (step T7): the turn's time spellings by
4731
+ // lineage — said ones exempt, derived ones filed, not flagged.
4732
+ ...(this.timeOptions !== undefined && { timeLineage: true }),
4733
+ }),
4734
+ }
4735
+ : undefined,
4736
+ // THE ANSWER LAYER (honesty layer 4) — the same value-conditional
4737
+ // trailing positional: the judges file the answer's witness rows, and
4738
+ // every row this decider files carries the turn stamp.
4739
+ answerArmed ? true : undefined);
4740
+ const validatedRouteDecider = this.answerValidationConfig === undefined
4741
+ ? baseRouteDecider
4742
+ : withAnswerValidation(baseRouteDecider, this.answerValidationConfig, this.outputSchemaParser, artifactStore, () => run.value.consentOutstanding.size > 0, this.outputEnforcement?.outputFormat !== undefined,
4743
+ // Read only when `agentChecks` lists 'claims' (the agent's own rows).
4744
+ this.claimContract, this.typedNegativeClaimsConfig === undefined
4745
+ ? undefined
4746
+ : {
4747
+ config: this.typedNegativeClaimsConfig,
4748
+ phrases: this.typedNegativeClaimsConfig.phrases,
4749
+ applicationValidation: this.applicationAnswerValidation,
4750
+ runId: () => run.context.runId,
4751
+ });
4752
+ const routeDecider = this.negativeClaimsConfig?.mode === 'prose'
4753
+ ? withNegativeProse(validatedRouteDecider, {
4754
+ runId: () => run.context.runId,
4755
+ hasOutstandingConsent: () => run.value.consentOutstanding.size > 0,
4756
+ structured: this.outputSchemaParser !== undefined,
4757
+ phrases: this.negativeClaimsConfig.phrases,
4758
+ })
4759
+ : validatedRouteDecider;
4760
+ // `.limitsTravelWithTheAnswer()` on a TYPED answer — decided once, here.
4761
+ // An output schema makes the answer JSON, and the appended block would
4762
+ // make it JSON followed by prose, which `runTyped()` cannot parse. So the
4763
+ // limits travel as DATA: the Route decider's terminal decision commits the
4764
+ // fold (`withAnswerCoverage`) and the Final branch projects it onto
4765
+ // `turn_end`. A prose answer keeps the block; an agent that asked for
4766
+ // neither is handed the decider it always had.
4767
+ // With the inputs layer armed, the typed answer's limits carry this
4768
+ // turn's assumed values too — the same rows the prose "Assumed" block
4769
+ // prints (`withAnswerCoverage`'s second argument); a rewrite by a
4770
+ // before-tool chain is read only when the agent has one.
4771
+ const terminalRouteDecider = limitsAsData
4772
+ ? withAnswerCoverage(routeDecider, inputsArmed ? { rewrites: this.toolMiddleware.length > 0 } : undefined)
4773
+ : routeDecider;
4774
+ // toolCallsHandler extracted to ./agent/stages/toolCalls/index.ts (v2.11.2).
4775
+ return terminalRouteDecider;
4776
+ };
4777
+ const terminalRouteDecider = bindRunnerStage((scope) => this.runExecution().forScope(scope), (run) => (run.value.route ??= routeFor(run)));
4778
+ const toolCallsFor = (run) => buildToolCallsHandler({
5095
4779
  registryByName,
5096
4780
  // WHICH SKILLS DECLARE EACH TOOL NAME (9.86.0) — read by the unknown-tool
5097
4781
  // roster so a role that may not see a skill is not told the names of the
@@ -5146,7 +4830,7 @@ export class Agent extends RunnerBase {
5146
4830
  ...(this.noticeEmptyLookups &&
5147
4831
  toolGrounding.size > 0 && {
5148
4832
  emptyLookupGrounding: toolGrounding,
5149
- integrityLedger: this.integrityLedgerHolder,
4833
+ integrityLedger: run.value.integrityLedger,
5150
4834
  }),
5151
4835
  // THE WRITE SEAM'S other check (9.78.0) — the column-type contract.
5152
4836
  // Value-conditional on both halves for the same reason, so an agent
@@ -5156,11 +4840,21 @@ export class Agent extends RunnerBase {
5156
4840
  toolColumns.size > 0 && {
5157
4841
  columnDeclarations: toolColumns,
5158
4842
  columnCheckMode: this.checkColumnTypes,
5159
- integrityLedger: this.integrityLedgerHolder,
4843
+ integrityLedger: run.value.integrityLedger,
5160
4844
  }),
5161
4845
  ...(this.externalToolProvider && { externalToolProvider: this.externalToolProvider }),
5162
- ...(this.externalToolProvider && { providerToolCache }),
5163
- servedTools,
4846
+ ...(this.externalToolProvider && {
4847
+ providerToolCache: run.value.providerToolCache,
4848
+ prepareProviderTools: (scope) => ensureDiscoveredTools(scope, {
4849
+ provider: this.externalToolProvider,
4850
+ cache: run.value.providerToolCache,
4851
+ callerIdentity: run.own ? run.value.identity : memberIdentityIn(scope),
4852
+ get iteration() {
4853
+ return scope.iteration ?? 1;
4854
+ },
4855
+ }),
4856
+ }),
4857
+ servedTools: run.value.servedTools,
5164
4858
  toolClaimants,
5165
4859
  ...(permissionChecker && { permissionChecker }),
5166
4860
  ...(credentialProvider && { credentialProvider }),
@@ -5168,7 +4862,7 @@ export class Agent extends RunnerBase {
5168
4862
  // or — on a mount — the run its link names (`memberRun.ts`). An accessor,
5169
4863
  // because the chart is built once and the request is per run.
5170
4864
  ...(credentialProvider && {
5171
- currentRequest: (scope) => this.ownScopes.has(scope) ? this.scopeRequests.get(scope) : memberRequestIn(scope),
4865
+ currentRequest: (scope) => (run.own ? run.value.request : memberRequestIn(scope)),
5172
4866
  }),
5173
4867
  // The claim-check store (9.21.0). Absent → not one new line runs in
5174
4868
  // dispatch: `ctx.artifacts` is the fail-closed teacher and no artifact
@@ -5242,7 +4936,8 @@ export class Agent extends RunnerBase {
5242
4936
  // injections exist; nothing runs until a tool returns an effect.
5243
4937
  ...(this.injections.length > 0 && {
5244
4938
  leaseTargets: new Map(this.injections.map((inj) => {
5245
- const surfaceMode = inj.metadata?.surfaceMode;
4939
+ const surfaceMode = inj.metadata
4940
+ ?.surfaceMode;
5246
4941
  return [inj.id, { ...(surfaceMode !== undefined && { surfaceMode }) }];
5247
4942
  })),
5248
4943
  }),
@@ -5265,19 +4960,20 @@ export class Agent extends RunnerBase {
5265
4960
  // at construction, and a captured value would be run #1's forever. The
5266
4961
  // tier one is lazy on top of that — an agent whose tools hold no sessions
5267
4962
  // never allocates it.
5268
- currentRun: () => this.toolRunFacts(),
5269
- isOwnRun: (scope) => this.ownScopes.has(scope),
5270
- answeredAsk: () => this.answeredAsk,
4963
+ currentRun: () => this.toolRunFacts(run),
4964
+ isRunRetired: () => run.retired,
4965
+ isOwnRun: () => run.own,
4966
+ answeredAsk: () => run.value.answeredAsk,
5271
4967
  // The time layer: each dispatched call files its `call` row, and the
5272
4968
  // resume door compares a resume's passed `time` with the kept clock.
5273
4969
  ...(this.timeOptions !== undefined && {
5274
4970
  time: {
5275
- takePassedOnResume: (scope) => {
4971
+ takePassedOnResume: () => {
5276
4972
  // Only the agent's own resumed leg takes it — never a member's.
5277
- if (!this.ownScopes.has(scope))
4973
+ if (!run.own)
5278
4974
  return undefined;
5279
- const passed = this.resumePassedTime;
5280
- this.resumePassedTime = undefined;
4975
+ const passed = run.value.resumePassedTime;
4976
+ run.value.resumePassedTime = undefined;
5281
4977
  return passed;
5282
4978
  },
5283
4979
  ...(this.timeOptions.zone !== undefined && { appZone: this.timeOptions.zone }),
@@ -5294,7 +4990,7 @@ export class Agent extends RunnerBase {
5294
4990
  },
5295
4991
  }),
5296
4992
  emitForRun: (type, payload, runContext) => this.emitLateFact(type, payload, runContext),
5297
- toolSessions: () => this.toolSessions(),
4993
+ resources: run.value.resources,
5298
4994
  // 8.6.0 — what a run does when a declared credential needs 3LO consent.
5299
4995
  onAuthorizationRequired: this.onAuthorizationRequired,
5300
4996
  // The `'tell-model'` consent record travels OFF tracked state (a tracked
@@ -5302,10 +4998,10 @@ export class Agent extends RunnerBase {
5302
4998
  // these two callbacks are its whole route to the caller. Cleared at the
5303
4999
  // top of every run; read in `finalizeResult`.
5304
5000
  reportConsentOutstanding: (record) => {
5305
- this.consentOutstanding.set(record.service, record);
5001
+ run.value.consentOutstanding.set(record.service, record);
5306
5002
  },
5307
5003
  clearConsentOutstanding: (service) => {
5308
- this.consentOutstanding.delete(service);
5004
+ run.value.consentOutstanding.delete(service);
5309
5005
  },
5310
5006
  });
5311
5007
  // v2.14 — Build the NormalizeThinking sub-subflow only when a
@@ -5313,6 +5009,11 @@ export class Agent extends RunnerBase {
5313
5009
  // explicitly set via .thinkingHandler()). Conditional mount ensures
5314
5010
  // zero overhead for non-thinking agents — the chart has zero extra
5315
5011
  // stages when undefined.
5012
+ const handlerFor = (run) => (run.value.toolCalls ??= toolCallsFor(run));
5013
+ const toolCallsHandler = {
5014
+ execute: bindRunnerStage((scope) => this.runExecution().forScope(scope), (run) => (scope) => handlerFor(run).execute(scope)),
5015
+ resume: bindRunnerStage((scope) => this.runExecution().forScope(scope), (run) => (scope, input) => handlerFor(run).resume(scope, input)),
5016
+ };
5316
5017
  const thinkingSubflow = this.thinkingHandler
5317
5018
  ? buildThinkingSubflow(this.thinkingHandler, this.provider.name)
5318
5019
  : undefined;
@@ -5322,7 +5023,9 @@ export class Agent extends RunnerBase {
5322
5023
  const chartDeps = {
5323
5024
  memories: this.memories,
5324
5025
  // Evidence bridge (#5): closure hand-off to the CAUSAL write mounts.
5325
- ...(this.causalEvidence && { causalEvidenceSource: this.causalEvidence.collect }),
5026
+ ...(this.memories.some((memory) => memory.type === 'causal') && {
5027
+ causalEvidenceSource: (binding) => componentEvidence(this.runExecution().forScope(binding).value, binding),
5028
+ }),
5326
5029
  systemPromptCachePolicy,
5327
5030
  maxIterations,
5328
5031
  seed,
@@ -5386,7 +5089,10 @@ export class Agent extends RunnerBase {
5386
5089
  // Route's sixth dispatch value, read only by an agent whose revision
5387
5090
  // turns the tools off (an enforcing answer validation).
5388
5091
  ...(this.revisionWithholdsTools() && { toolsOffAfterRevision: true }),
5389
- toolOf: (toolName) => resolveForLayer(toolName).tool,
5092
+ toolOfFor: (scope) => {
5093
+ const resolve = resolveForLayer(scope);
5094
+ return (toolName) => resolve(toolName).tool;
5095
+ },
5390
5096
  ...(this.toolMiddleware.length > 0 && { rewrites: true }),
5391
5097
  // The time layer (step T5a): a tool whose period declares forms is filled from the
5392
5098
  // turn's one window, bound to the person's window, or recorded as the model's.
@@ -5424,7 +5130,12 @@ export class Agent extends RunnerBase {
5424
5130
  // head, in both builders through one helper, reading each call's
5425
5131
  // `ToolPeriod` off the implementation that answered it; absent → untouched.
5426
5132
  ...(resultsArmed && {
5427
- resultsLayer: { toolOf: (toolName) => resolveForLayer(toolName).tool },
5133
+ resultsLayer: {
5134
+ toolOfFor: (scope) => {
5135
+ const resolve = resolveForLayer(scope);
5136
+ return (toolName) => resolve(toolName).tool;
5137
+ },
5138
+ },
5428
5139
  }),
5429
5140
  // The answer layer (honesty layer 4): its stage heads the final branch
5430
5141
  // in both builders through one helper, reading only the committed keys
@@ -5442,11 +5153,11 @@ export class Agent extends RunnerBase {
5442
5153
  standingLine: this.answerLayerOption.standingLine,
5443
5154
  }),
5444
5155
  ...(this.answerValidationConfig !== undefined && { validated: true }),
5445
- ...(displayNameOf !== undefined && { displayNameOf }),
5156
+ ...(displayNameOfFor !== undefined && { displayNameOfFor }),
5446
5157
  },
5447
5158
  }),
5448
5159
  // The prose limits block names an item's calls in the app's words — under the same wiring.
5449
- ...(displayNameOf !== undefined && { displayNameOf }),
5160
+ ...(displayNameOfFor !== undefined && { displayNameOfFor }),
5450
5161
  // Tool choice by classifier (9.105.0): the mount args on the Tools
5451
5162
  // branch and the key across the sf-llm-call boundary, under the arm.
5452
5163
  ...(this.toolChoiceOptions !== undefined && { hasToolChoice: true }),
@@ -5536,60 +5247,4 @@ export class Agent extends RunnerBase {
5536
5247
  // AgentBuilder extracted to ./agent/AgentBuilder.ts (v2.11.2).
5537
5248
  // Re-export so the 28+ existing import sites continue to work unchanged.
5538
5249
  // Validators + helpers extracted to ./agent/validators.ts (v2.11.1).
5539
- /** How many run ids one instance remembers. */
5540
- const MAX_REMEMBERED_RUNS = 256;
5541
- /** Drop the oldest entries of an insertion-ordered Set or Map past `max`. */
5542
- function boundInsertionOrder(held, max) {
5543
- while (held.size > max) {
5544
- const oldest = held.keys().next();
5545
- if (oldest.done === true)
5546
- return;
5547
- held.delete(oldest.value);
5548
- }
5549
- }
5550
- /**
5551
- * The run options without the time layer's `time` — what the engine is handed.
5552
- * The SAME object when it carries no `time` key, so a run that passed none
5553
- * hands the executor exactly the options it always did.
5554
- */
5555
- function withoutTime(options) {
5556
- if (options === undefined || !('time' in options))
5557
- return options;
5558
- const { time: _time, ...rest } = options;
5559
- void _time;
5560
- return rest;
5561
- }
5562
- /**
5563
- * The policy a paused agent run was covered by, read off its own checkpoint
5564
- * (`AgentState.runRedaction`, committed by seed and by every resumed leg) —
5565
- * FAIL CLOSED: a value this library did not write, or a checkpoint whose run
5566
- * kept names out of its records (`redactionMarks`) but carries no policy,
5567
- * refuses the resume (`ResumeRedactionError`) before anything moves. A leg its
5568
- * policy could not keep covered must never start.
5569
- */
5570
- function resumeRedactionOf(checkpoint, trusted) {
5571
- const state = checkpoint.sharedState;
5572
- let carried;
5573
- try {
5574
- // A carried pattern is a reference to one the resuming side holds — never
5575
- // compiled from the checkpoint (`redaction/policy.ts` · `policyFromCarried`).
5576
- carried = policyFromCarried(state?.runRedaction, 'Agent.resume', trusted);
5577
- // A policy built under ANOTHER vocabulary version is joined with the
5578
- // current list — the leg is never covered by an older list alone.
5579
- carried = withCurrentVocabulary(carried, carriedVocabularyOf(state?.runRedaction));
5580
- }
5581
- catch (refusal) {
5582
- throw new ResumeRedactionError(refusal instanceof CarriedPolicyError && refusal.refusal === 'unknown-pattern'
5583
- ? 'unknown-pattern'
5584
- : 'unreadable');
5585
- }
5586
- // Every leg of a covered run writes its policy into its checkpoint's state
5587
- // (seed, and `resume` for a resumed leg), so a checkpoint whose run kept
5588
- // names out but carries none was altered — refused even when the resume
5589
- // names a policy, which cannot stand in for the one the run was covered by.
5590
- if (carried === undefined && policyOfMarks(checkpoint.redactionMarks) !== undefined) {
5591
- throw new ResumeRedactionError('missing');
5592
- }
5593
- return carried;
5594
- }
5595
5250
  //# sourceMappingURL=Agent.js.map