agentfootprint 6.43.0 → 6.45.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 (397) hide show
  1. package/ai-instructions/setup.sh +0 -0
  2. package/dist/core/RunnerBase.js +7 -0
  3. package/dist/core/RunnerBase.js.map +1 -1
  4. package/dist/core/agent/buildAgentChart.js +2 -1
  5. package/dist/core/agent/buildAgentChart.js.map +1 -1
  6. package/dist/core/agent/buildDynamicAgentChart.js +3 -1
  7. package/dist/core/agent/buildDynamicAgentChart.js.map +1 -1
  8. package/dist/core/agent/stages/pickEntry.js +3 -1
  9. package/dist/core/agent/stages/pickEntry.js.map +1 -1
  10. package/dist/esm/adapters/identity/agentcore.d.ts +100 -0
  11. package/dist/esm/adapters/llm/AnthropicProvider.d.ts +130 -0
  12. package/dist/esm/adapters/llm/BedrockProvider.d.ts +100 -0
  13. package/dist/esm/adapters/llm/BrowserAnthropicProvider.d.ts +41 -0
  14. package/dist/esm/adapters/llm/BrowserOpenAIProvider.d.ts +95 -0
  15. package/dist/esm/adapters/llm/MockProvider.d.ts +153 -0
  16. package/dist/esm/adapters/llm/OpenAIProvider.d.ts +220 -0
  17. package/dist/esm/adapters/llm/createProvider.d.ts +85 -0
  18. package/dist/esm/adapters/memory/agentcore.d.ts +146 -0
  19. package/dist/esm/adapters/memory/bedrockAgentMemory.d.ts +95 -0
  20. package/dist/esm/adapters/memory/redis.d.ts +127 -0
  21. package/dist/esm/adapters/observability/agentcore.d.ts +67 -0
  22. package/dist/esm/adapters/observability/audit.d.ts +254 -0
  23. package/dist/esm/adapters/observability/cloudwatch.d.ts +96 -0
  24. package/dist/esm/adapters/observability/otel.d.ts +237 -0
  25. package/dist/esm/adapters/observability/xray.d.ts +88 -0
  26. package/dist/esm/adapters/types.d.ts +378 -0
  27. package/dist/esm/bridge/eventMeta.d.ts +59 -0
  28. package/dist/esm/cache/CacheDecisionSubflow.d.ts +85 -0
  29. package/dist/esm/cache/CacheGateDecider.d.ts +127 -0
  30. package/dist/esm/cache/applyCachePolicy.d.ts +37 -0
  31. package/dist/esm/cache/cacheRecorder.d.ts +85 -0
  32. package/dist/esm/cache/index.d.ts +33 -0
  33. package/dist/esm/cache/strategies/AnthropicCacheStrategy.d.ts +38 -0
  34. package/dist/esm/cache/strategies/BedrockCacheStrategy.d.ts +33 -0
  35. package/dist/esm/cache/strategies/NoOpCacheStrategy.d.ts +29 -0
  36. package/dist/esm/cache/strategies/OpenAICacheStrategy.d.ts +36 -0
  37. package/dist/esm/cache/strategyRegistry.d.ts +45 -0
  38. package/dist/esm/cache/types.d.ts +243 -0
  39. package/dist/esm/conventions.d.ts +203 -0
  40. package/dist/esm/core/Agent.d.ts +355 -0
  41. package/dist/esm/core/LLMCall.d.ts +139 -0
  42. package/dist/esm/core/RunnerBase.d.ts +267 -0
  43. package/dist/esm/core/RunnerBase.js +7 -0
  44. package/dist/esm/core/RunnerBase.js.map +1 -1
  45. package/dist/esm/core/agent/AgentBuilder.d.ts +565 -0
  46. package/dist/esm/core/agent/buildAgentChart.d.ts +109 -0
  47. package/dist/esm/core/agent/buildAgentChart.js +2 -1
  48. package/dist/esm/core/agent/buildAgentChart.js.map +1 -1
  49. package/dist/esm/core/agent/buildAgentMessageApiChart.d.ts +40 -0
  50. package/dist/esm/core/agent/buildCacheSubflow.d.ts +35 -0
  51. package/dist/esm/core/agent/buildDynamicAgentChart.d.ts +56 -0
  52. package/dist/esm/core/agent/buildDynamicAgentChart.js +3 -1
  53. package/dist/esm/core/agent/buildDynamicAgentChart.js.map +1 -1
  54. package/dist/esm/core/agent/buildMessageApiChart.d.ts +47 -0
  55. package/dist/esm/core/agent/buildToolRegistry.d.ts +61 -0
  56. package/dist/esm/core/agent/memoryRecallInjections.d.ts +8 -0
  57. package/dist/esm/core/agent/stages/breakFinal.d.ts +22 -0
  58. package/dist/esm/core/agent/stages/callLLM.d.ts +74 -0
  59. package/dist/esm/core/agent/stages/pickEntry.d.ts +19 -0
  60. package/dist/esm/core/agent/stages/pickEntry.js +3 -1
  61. package/dist/esm/core/agent/stages/pickEntry.js.map +1 -1
  62. package/dist/esm/core/agent/stages/prepareFinal.d.ts +19 -0
  63. package/dist/esm/core/agent/stages/reliabilityExecution.d.ts +135 -0
  64. package/dist/esm/core/agent/stages/route.d.ts +18 -0
  65. package/dist/esm/core/agent/stages/seed.d.ts +53 -0
  66. package/dist/esm/core/agent/stages/toolCalls.d.ts +76 -0
  67. package/dist/esm/core/agent/toolArgsValidation.d.ts +62 -0
  68. package/dist/esm/core/agent/types.d.ts +382 -0
  69. package/dist/esm/core/agent/validators.d.ts +52 -0
  70. package/dist/esm/core/cost.d.ts +38 -0
  71. package/dist/esm/core/flowchartAsTool.d.ts +200 -0
  72. package/dist/esm/core/humanizeLLMError.d.ts +23 -0
  73. package/dist/esm/core/outputFallback.d.ts +139 -0
  74. package/dist/esm/core/outputSchema.d.ts +127 -0
  75. package/dist/esm/core/pause.d.ts +74 -0
  76. package/dist/esm/core/runCheckpoint.d.ts +179 -0
  77. package/dist/esm/core/runner.d.ts +203 -0
  78. package/dist/esm/core/slots/buildMessagesSlot.d.ts +40 -0
  79. package/dist/esm/core/slots/buildSystemPromptSlot.d.ts +41 -0
  80. package/dist/esm/core/slots/buildThinkingSubflow.d.ts +40 -0
  81. package/dist/esm/core/slots/buildToolsSlot.d.ts +60 -0
  82. package/dist/esm/core/slots/helpers.d.ts +27 -0
  83. package/dist/esm/core/toolContract.d.ts +43 -0
  84. package/dist/esm/core/tools.d.ts +90 -0
  85. package/dist/esm/core/translator.d.ts +94 -0
  86. package/dist/esm/core-flow/Conditional.d.ts +119 -0
  87. package/dist/esm/core-flow/Loop.d.ts +160 -0
  88. package/dist/esm/core-flow/Parallel.d.ts +360 -0
  89. package/dist/esm/core-flow/Sequence.d.ts +133 -0
  90. package/dist/esm/events/dispatcher.d.ts +134 -0
  91. package/dist/esm/events/payloads.d.ts +761 -0
  92. package/dist/esm/events/registry.d.ts +198 -0
  93. package/dist/esm/events/types.d.ts +70 -0
  94. package/dist/esm/identity/kinds.d.ts +36 -0
  95. package/dist/esm/identity/staticTokens.d.ts +28 -0
  96. package/dist/esm/identity/types.d.ts +113 -0
  97. package/dist/esm/identity/withCredentialRetry.d.ts +64 -0
  98. package/dist/esm/identity.d.ts +31 -0
  99. package/dist/esm/index.d.ts +64 -0
  100. package/dist/esm/index.js +2 -0
  101. package/dist/esm/index.js.map +1 -1
  102. package/dist/esm/injection-engine.d.ts +4 -0
  103. package/dist/esm/lib/canonicalJson.d.ts +56 -0
  104. package/dist/esm/lib/context-bisect/ablation.d.ts +109 -0
  105. package/dist/esm/lib/context-bisect/bisect.d.ts +75 -0
  106. package/dist/esm/lib/context-bisect/cost.d.ts +37 -0
  107. package/dist/esm/lib/context-bisect/index.d.ts +31 -0
  108. package/dist/esm/lib/context-bisect/index.js +3 -0
  109. package/dist/esm/lib/context-bisect/index.js.map +1 -1
  110. package/dist/esm/lib/context-bisect/llmEdgeWeigher.d.ts +124 -0
  111. package/dist/esm/lib/context-bisect/localize.d.ts +152 -0
  112. package/dist/esm/lib/context-bisect/localize.js +2 -0
  113. package/dist/esm/lib/context-bisect/localize.js.map +1 -1
  114. package/dist/esm/lib/context-bisect/loop-recall.d.ts +97 -0
  115. package/dist/esm/lib/context-bisect/missingContext.d.ts +71 -0
  116. package/dist/esm/lib/context-bisect/restoration.d.ts +39 -0
  117. package/dist/esm/lib/context-bisect/toBacktrackTrace.d.ts +138 -0
  118. package/dist/esm/lib/context-bisect/trajectory.d.ts +168 -0
  119. package/dist/esm/lib/context-bisect/types.d.ts +448 -0
  120. package/dist/esm/lib/context-bisect/walk-to-root.d.ts +103 -0
  121. package/dist/esm/lib/influence-core/attributability.d.ts +72 -0
  122. package/dist/esm/lib/influence-core/cache.d.ts +94 -0
  123. package/dist/esm/lib/influence-core/contrastive.d.ts +26 -0
  124. package/dist/esm/lib/influence-core/index.d.ts +34 -0
  125. package/dist/esm/lib/influence-core/margin.d.ts +33 -0
  126. package/dist/esm/lib/influence-core/signals.d.ts +128 -0
  127. package/dist/esm/lib/influence-core/similarity.d.ts +25 -0
  128. package/dist/esm/lib/influence-core/types.d.ts +252 -0
  129. package/dist/esm/lib/injection-engine/SkillRegistry.d.ts +147 -0
  130. package/dist/esm/lib/injection-engine/buildInjectionEngineSubflow.d.ts +110 -0
  131. package/dist/esm/lib/injection-engine/buildInjectionEngineSubflow.js +1 -0
  132. package/dist/esm/lib/injection-engine/buildInjectionEngineSubflow.js.map +1 -1
  133. package/dist/esm/lib/injection-engine/entryScorer.d.ts +93 -0
  134. package/dist/esm/lib/injection-engine/entryScorer.js +172 -0
  135. package/dist/esm/lib/injection-engine/entryScorer.js.map +1 -0
  136. package/dist/esm/lib/injection-engine/evaluator.d.ts +24 -0
  137. package/dist/esm/lib/injection-engine/factories/defineFact.d.ts +60 -0
  138. package/dist/esm/lib/injection-engine/factories/defineInjection.d.ts +41 -0
  139. package/dist/esm/lib/injection-engine/factories/defineInstruction.d.ts +78 -0
  140. package/dist/esm/lib/injection-engine/factories/defineRelevanceHint.d.ts +26 -0
  141. package/dist/esm/lib/injection-engine/factories/defineSkill.d.ts +160 -0
  142. package/dist/esm/lib/injection-engine/factories/defineSteering.d.ts +39 -0
  143. package/dist/esm/lib/injection-engine/index.d.ts +22 -0
  144. package/dist/esm/lib/injection-engine/index.js +1 -0
  145. package/dist/esm/lib/injection-engine/index.js.map +1 -1
  146. package/dist/esm/lib/injection-engine/skillContract.d.ts +29 -0
  147. package/dist/esm/lib/injection-engine/skillGraph.d.ts +289 -0
  148. package/dist/esm/lib/injection-engine/skillGraph.js +35 -41
  149. package/dist/esm/lib/injection-engine/skillGraph.js.map +1 -1
  150. package/dist/esm/lib/injection-engine/skillGraphCheckup.d.ts +49 -0
  151. package/dist/esm/lib/injection-engine/skillTools.d.ts +72 -0
  152. package/dist/esm/lib/injection-engine/softmax.d.ts +11 -0
  153. package/dist/esm/lib/injection-engine/types.d.ts +229 -0
  154. package/dist/esm/lib/injection-engine/types.js.map +1 -1
  155. package/dist/esm/lib/lazyRequire.d.ts +29 -0
  156. package/dist/esm/lib/mcp/index.d.ts +9 -0
  157. package/dist/esm/lib/mcp/mcpClient.d.ts +46 -0
  158. package/dist/esm/lib/mcp/mockMcpClient.d.ts +65 -0
  159. package/dist/esm/lib/mcp/types.d.ts +133 -0
  160. package/dist/esm/lib/rag/defineRAG.d.ts +139 -0
  161. package/dist/esm/lib/rag/index.d.ts +7 -0
  162. package/dist/esm/lib/rag/indexDocuments.d.ts +105 -0
  163. package/dist/esm/lib/tool-lint/analyze.d.ts +83 -0
  164. package/dist/esm/lib/tool-lint/cli.d.ts +43 -0
  165. package/dist/esm/lib/tool-lint/format.d.ts +18 -0
  166. package/dist/esm/lib/tool-lint/index.d.ts +23 -0
  167. package/dist/esm/lib/tool-lint/rules.d.ts +85 -0
  168. package/dist/esm/lib/tool-lint/types.d.ts +155 -0
  169. package/dist/esm/lib/trace-toolpack/bounded.d.ts +47 -0
  170. package/dist/esm/lib/trace-toolpack/debugPrompt.d.ts +19 -0
  171. package/dist/esm/lib/trace-toolpack/index.d.ts +20 -0
  172. package/dist/esm/lib/trace-toolpack/lazyToolpack.d.ts +35 -0
  173. package/dist/esm/lib/trace-toolpack/selfExplain.d.ts +100 -0
  174. package/dist/esm/lib/trace-toolpack/traceDebugAgent.d.ts +42 -0
  175. package/dist/esm/lib/trace-toolpack/traceToolpack.d.ts +69 -0
  176. package/dist/esm/lib/trace-toolpack/types.d.ts +59 -0
  177. package/dist/esm/llm-providers.d.ts +26 -0
  178. package/dist/esm/locales/index.d.ts +132 -0
  179. package/dist/esm/memory/beats/extractBeats.d.ts +61 -0
  180. package/dist/esm/memory/beats/extractor.d.ts +47 -0
  181. package/dist/esm/memory/beats/formatAsNarrative.d.ts +62 -0
  182. package/dist/esm/memory/beats/heuristicExtractor.d.ts +37 -0
  183. package/dist/esm/memory/beats/index.d.ts +12 -0
  184. package/dist/esm/memory/beats/llmExtractor.d.ts +56 -0
  185. package/dist/esm/memory/beats/types.d.ts +60 -0
  186. package/dist/esm/memory/beats/writeBeats.d.ts +22 -0
  187. package/dist/esm/memory/causal/evidenceRecorder.d.ts +66 -0
  188. package/dist/esm/memory/causal/index.d.ts +6 -0
  189. package/dist/esm/memory/causal/loadSnapshot.d.ts +51 -0
  190. package/dist/esm/memory/causal/snapshotPipeline.d.ts +35 -0
  191. package/dist/esm/memory/causal/types.d.ts +130 -0
  192. package/dist/esm/memory/causal/writeSnapshot.d.ts +73 -0
  193. package/dist/esm/memory/define.d.ts +63 -0
  194. package/dist/esm/memory/define.types.d.ts +276 -0
  195. package/dist/esm/memory/define.types.js +1 -1
  196. package/dist/esm/memory/embedding/cosine.d.ts +18 -0
  197. package/dist/esm/memory/embedding/embedMessages.d.ts +58 -0
  198. package/dist/esm/memory/embedding/index.d.ts +8 -0
  199. package/dist/esm/memory/embedding/loadRelevant.d.ts +51 -0
  200. package/dist/esm/memory/embedding/mockEmbedder.d.ts +22 -0
  201. package/dist/esm/memory/embedding/types.d.ts +46 -0
  202. package/dist/esm/memory/entry/decay.d.ts +36 -0
  203. package/dist/esm/memory/entry/index.d.ts +2 -0
  204. package/dist/esm/memory/entry/types.d.ts +140 -0
  205. package/dist/esm/memory/facts/extractFacts.d.ts +50 -0
  206. package/dist/esm/memory/facts/extractor.d.ts +33 -0
  207. package/dist/esm/memory/facts/formatFacts.d.ts +60 -0
  208. package/dist/esm/memory/facts/index.d.ts +14 -0
  209. package/dist/esm/memory/facts/llmFactExtractor.d.ts +64 -0
  210. package/dist/esm/memory/facts/loadFacts.d.ts +43 -0
  211. package/dist/esm/memory/facts/patternFactExtractor.d.ts +2 -0
  212. package/dist/esm/memory/facts/types.d.ts +68 -0
  213. package/dist/esm/memory/facts/writeFacts.d.ts +19 -0
  214. package/dist/esm/memory/identity/index.d.ts +2 -0
  215. package/dist/esm/memory/identity/types.d.ts +49 -0
  216. package/dist/esm/memory/index.d.ts +19 -0
  217. package/dist/esm/memory/pipeline/auto.d.ts +59 -0
  218. package/dist/esm/memory/pipeline/default.d.ts +49 -0
  219. package/dist/esm/memory/pipeline/ephemeral.d.ts +28 -0
  220. package/dist/esm/memory/pipeline/fact.d.ts +26 -0
  221. package/dist/esm/memory/pipeline/index.d.ts +13 -0
  222. package/dist/esm/memory/pipeline/narrative.d.ts +35 -0
  223. package/dist/esm/memory/pipeline/semantic.d.ts +37 -0
  224. package/dist/esm/memory/pipeline/types.d.ts +31 -0
  225. package/dist/esm/memory/stages/formatDefault.d.ts +64 -0
  226. package/dist/esm/memory/stages/index.d.ts +13 -0
  227. package/dist/esm/memory/stages/loadRecent.d.ts +49 -0
  228. package/dist/esm/memory/stages/pickByBudget.d.ts +63 -0
  229. package/dist/esm/memory/stages/summarize.d.ts +87 -0
  230. package/dist/esm/memory/stages/tokenize.d.ts +43 -0
  231. package/dist/esm/memory/stages/types.d.ts +75 -0
  232. package/dist/esm/memory/stages/writeMessages.d.ts +71 -0
  233. package/dist/esm/memory/store/InMemoryStore.d.ts +62 -0
  234. package/dist/esm/memory/store/index.d.ts +2 -0
  235. package/dist/esm/memory/store/types.d.ts +223 -0
  236. package/dist/esm/memory/wire/index.d.ts +2 -0
  237. package/dist/esm/memory/wire/mountMemoryPipeline.d.ts +108 -0
  238. package/dist/esm/memory-providers.d.ts +37 -0
  239. package/dist/esm/observability/contextError/finders/compareFinders.d.ts +19 -0
  240. package/dist/esm/observability/contextError/finders/index.d.ts +22 -0
  241. package/dist/esm/observability/contextError/finders/rankSuspects.d.ts +2 -0
  242. package/dist/esm/observability/contextError/finders/removeAndRetry.d.ts +11 -0
  243. package/dist/esm/observability/contextError/finders/shrinkToCause.d.ts +11 -0
  244. package/dist/esm/observability/contextError/finders/testManyCombos.d.ts +11 -0
  245. package/dist/esm/observability/contextError/finders/traceSteps.d.ts +2 -0
  246. package/dist/esm/observability/contextError/finders/types.d.ts +88 -0
  247. package/dist/esm/observability-providers.d.ts +46 -0
  248. package/dist/esm/observe.d.ts +62 -0
  249. package/dist/esm/observe.js +7 -1
  250. package/dist/esm/observe.js.map +1 -1
  251. package/dist/esm/patterns/Debate.d.ts +39 -0
  252. package/dist/esm/patterns/MapReduce.d.ts +66 -0
  253. package/dist/esm/patterns/Reflection.d.ts +51 -0
  254. package/dist/esm/patterns/SelfConsistency.d.ts +43 -0
  255. package/dist/esm/patterns/Swarm.d.ts +60 -0
  256. package/dist/esm/patterns/ToT.d.ts +53 -0
  257. package/dist/esm/patterns/index.d.ts +22 -0
  258. package/dist/esm/providers.d.ts +33 -0
  259. package/dist/esm/recorders/core/AgentRecorder.d.ts +15 -0
  260. package/dist/esm/recorders/core/CompositionRecorder.d.ts +17 -0
  261. package/dist/esm/recorders/core/ContextEvaluatedRecorder.d.ts +23 -0
  262. package/dist/esm/recorders/core/ContextRecorder.d.ts +47 -0
  263. package/dist/esm/recorders/core/CostRecorder.d.ts +14 -0
  264. package/dist/esm/recorders/core/EmitBridge.d.ts +30 -0
  265. package/dist/esm/recorders/core/ErrorBridge.d.ts +38 -0
  266. package/dist/esm/recorders/core/EvalRecorder.d.ts +16 -0
  267. package/dist/esm/recorders/core/MemoryRecorder.d.ts +17 -0
  268. package/dist/esm/recorders/core/PermissionRecorder.d.ts +16 -0
  269. package/dist/esm/recorders/core/ReliabilityRecorder.d.ts +24 -0
  270. package/dist/esm/recorders/core/SkillRecorder.d.ts +14 -0
  271. package/dist/esm/recorders/core/StreamRecorder.d.ts +15 -0
  272. package/dist/esm/recorders/core/ToolsRecorder.d.ts +18 -0
  273. package/dist/esm/recorders/core/ValidationRecorder.d.ts +16 -0
  274. package/dist/esm/recorders/core/contextEngineering.d.ts +136 -0
  275. package/dist/esm/recorders/core/typedEmit.d.ts +34 -0
  276. package/dist/esm/recorders/core/types.d.ts +97 -0
  277. package/dist/esm/recorders/observability/AgentThinkingTraceRecorder.d.ts +117 -0
  278. package/dist/esm/recorders/observability/BoundaryRecorder.d.ts +546 -0
  279. package/dist/esm/recorders/observability/FlowchartRecorder.d.ts +220 -0
  280. package/dist/esm/recorders/observability/FlowchartRecorder.js +10 -2
  281. package/dist/esm/recorders/observability/FlowchartRecorder.js.map +1 -1
  282. package/dist/esm/recorders/observability/LiveStateRecorder.d.ts +250 -0
  283. package/dist/esm/recorders/observability/LoggingRecorder.d.ts +91 -0
  284. package/dist/esm/recorders/observability/RouteRecorder.d.ts +83 -0
  285. package/dist/esm/recorders/observability/RunStepRecorder.d.ts +231 -0
  286. package/dist/esm/recorders/observability/StatusRecorder.d.ts +36 -0
  287. package/dist/esm/recorders/observability/ToolChoiceRecorder.d.ts +164 -0
  288. package/dist/esm/recorders/observability/ToolLineageRecorder.d.ts +71 -0
  289. package/dist/esm/recorders/observability/commentary/commentaryTemplates.d.ts +105 -0
  290. package/dist/esm/recorders/observability/internal/ActorArrowClassifier.d.ts +25 -0
  291. package/dist/esm/recorders/observability/internal/CandidateAnswerBuffer.d.ts +28 -0
  292. package/dist/esm/recorders/observability/internal/ForkTracker.d.ts +60 -0
  293. package/dist/esm/recorders/observability/internal/RootInferrer.d.ts +51 -0
  294. package/dist/esm/recorders/observability/internal/SequenceSiblingTracker.d.ts +24 -0
  295. package/dist/esm/recorders/observability/localObservability.d.ts +48 -0
  296. package/dist/esm/recorders/observability/localObservability.js +54 -0
  297. package/dist/esm/recorders/observability/localObservability.js.map +1 -0
  298. package/dist/esm/recorders/observability/observeRunId.d.ts +36 -0
  299. package/dist/esm/recorders/observability/status/statusTemplates.d.ts +106 -0
  300. package/dist/esm/recorders/observability/trace.d.ts +119 -0
  301. package/dist/esm/recorders/observability/trace.js +99 -0
  302. package/dist/esm/recorders/observability/trace.js.map +1 -0
  303. package/dist/esm/reliability/CircuitBreaker.d.ts +75 -0
  304. package/dist/esm/reliability/buildReliabilityGateChart.d.ts +53 -0
  305. package/dist/esm/reliability/classifyError.d.ts +28 -0
  306. package/dist/esm/reliability/index.d.ts +35 -0
  307. package/dist/esm/reliability/types.d.ts +327 -0
  308. package/dist/esm/resilience/fallbackProvider.d.ts +33 -0
  309. package/dist/esm/resilience/index.d.ts +21 -0
  310. package/dist/esm/resilience/withCircuitBreaker.d.ts +129 -0
  311. package/dist/esm/resilience/withFallback.d.ts +45 -0
  312. package/dist/esm/resilience/withRetry.d.ts +71 -0
  313. package/dist/esm/security/PermissionPolicy.d.ts +124 -0
  314. package/dist/esm/security/PolicyHaltError.d.ts +72 -0
  315. package/dist/esm/security/extractSequence.d.ts +46 -0
  316. package/dist/esm/security/index.d.ts +44 -0
  317. package/dist/esm/security/thinkingRedaction.d.ts +50 -0
  318. package/dist/esm/status.d.ts +48 -0
  319. package/dist/esm/strategies/attach.d.ts +47 -0
  320. package/dist/esm/strategies/compose.d.ts +48 -0
  321. package/dist/esm/strategies/defaults/chatBubbleLiveStatus.d.ts +36 -0
  322. package/dist/esm/strategies/defaults/consoleObservability.d.ts +42 -0
  323. package/dist/esm/strategies/defaults/inMemorySinkCost.d.ts +50 -0
  324. package/dist/esm/strategies/defaults/index.d.ts +30 -0
  325. package/dist/esm/strategies/defaults/noopLens.d.ts +28 -0
  326. package/dist/esm/strategies/index.d.ts +36 -0
  327. package/dist/esm/strategies/registry.d.ts +70 -0
  328. package/dist/esm/strategies/types.d.ts +303 -0
  329. package/dist/esm/stream.d.ts +82 -0
  330. package/dist/esm/thinking/AnthropicThinkingHandler.d.ts +42 -0
  331. package/dist/esm/thinking/MockThinkingHandler.d.ts +50 -0
  332. package/dist/esm/thinking/OpenAIThinkingHandler.d.ts +37 -0
  333. package/dist/esm/thinking/index.d.ts +51 -0
  334. package/dist/esm/thinking/registry.d.ts +33 -0
  335. package/dist/esm/thinking/types.d.ts +162 -0
  336. package/dist/esm/tool-providers/gatedTools.d.ts +36 -0
  337. package/dist/esm/tool-providers/index.d.ts +41 -0
  338. package/dist/esm/tool-providers/skillScopedTools.d.ts +45 -0
  339. package/dist/esm/tool-providers/staticTools.d.ts +21 -0
  340. package/dist/esm/tool-providers/types.d.ts +138 -0
  341. package/dist/index.js +6 -2
  342. package/dist/index.js.map +1 -1
  343. package/dist/lib/context-bisect/index.js +3 -0
  344. package/dist/lib/context-bisect/index.js.map +1 -1
  345. package/dist/lib/context-bisect/localize.js +2 -0
  346. package/dist/lib/context-bisect/localize.js.map +1 -1
  347. package/dist/lib/injection-engine/buildInjectionEngineSubflow.js +1 -0
  348. package/dist/lib/injection-engine/buildInjectionEngineSubflow.js.map +1 -1
  349. package/dist/lib/injection-engine/entryScorer.js +178 -0
  350. package/dist/lib/injection-engine/entryScorer.js.map +1 -0
  351. package/dist/lib/injection-engine/index.js +5 -1
  352. package/dist/lib/injection-engine/index.js.map +1 -1
  353. package/dist/lib/injection-engine/skillGraph.js +35 -41
  354. package/dist/lib/injection-engine/skillGraph.js.map +1 -1
  355. package/dist/lib/injection-engine/types.js.map +1 -1
  356. package/dist/memory/define.types.js +1 -1
  357. package/dist/observe.js +14 -3
  358. package/dist/observe.js.map +1 -1
  359. package/dist/recorders/observability/FlowchartRecorder.js +12 -3
  360. package/dist/recorders/observability/FlowchartRecorder.js.map +1 -1
  361. package/dist/recorders/observability/localObservability.js +58 -0
  362. package/dist/recorders/observability/localObservability.js.map +1 -0
  363. package/dist/recorders/observability/trace.js +105 -0
  364. package/dist/recorders/observability/trace.js.map +1 -0
  365. package/dist/types/core/RunnerBase.d.ts.map +1 -1
  366. package/dist/types/core/agent/buildAgentChart.d.ts.map +1 -1
  367. package/dist/types/core/agent/buildDynamicAgentChart.d.ts.map +1 -1
  368. package/dist/types/core/agent/stages/pickEntry.d.ts.map +1 -1
  369. package/dist/types/core/agent/types.d.ts +8 -4
  370. package/dist/types/core/agent/types.d.ts.map +1 -1
  371. package/dist/types/core/runner.d.ts +12 -0
  372. package/dist/types/core/runner.d.ts.map +1 -1
  373. package/dist/types/index.d.ts +1 -1
  374. package/dist/types/index.d.ts.map +1 -1
  375. package/dist/types/lib/context-bisect/index.d.ts +3 -0
  376. package/dist/types/lib/context-bisect/index.d.ts.map +1 -1
  377. package/dist/types/lib/context-bisect/localize.d.ts +2 -0
  378. package/dist/types/lib/context-bisect/localize.d.ts.map +1 -1
  379. package/dist/types/lib/injection-engine/buildInjectionEngineSubflow.d.ts.map +1 -1
  380. package/dist/types/lib/injection-engine/entryScorer.d.ts +94 -0
  381. package/dist/types/lib/injection-engine/entryScorer.d.ts.map +1 -0
  382. package/dist/types/lib/injection-engine/index.d.ts +1 -0
  383. package/dist/types/lib/injection-engine/index.d.ts.map +1 -1
  384. package/dist/types/lib/injection-engine/skillGraph.d.ts +21 -24
  385. package/dist/types/lib/injection-engine/skillGraph.d.ts.map +1 -1
  386. package/dist/types/lib/injection-engine/types.d.ts +9 -4
  387. package/dist/types/lib/injection-engine/types.d.ts.map +1 -1
  388. package/dist/types/memory/define.types.d.ts +1 -1
  389. package/dist/types/observe.d.ts +3 -1
  390. package/dist/types/observe.d.ts.map +1 -1
  391. package/dist/types/recorders/observability/FlowchartRecorder.d.ts +8 -1
  392. package/dist/types/recorders/observability/FlowchartRecorder.d.ts.map +1 -1
  393. package/dist/types/recorders/observability/localObservability.d.ts +49 -0
  394. package/dist/types/recorders/observability/localObservability.d.ts.map +1 -0
  395. package/dist/types/recorders/observability/trace.d.ts +120 -0
  396. package/dist/types/recorders/observability/trace.d.ts.map +1 -0
  397. package/package.json +203 -56
@@ -0,0 +1,139 @@
1
+ /**
2
+ * LLMCall — the leaf primitive for a single LLM invocation (no tools).
3
+ *
4
+ * Pattern: Builder (GoF) → produces a Runner backed by a footprintjs FlowChart.
5
+ *
6
+ * Chart shape — outer client wrapper around an inner llm-subflow:
7
+ *
8
+ * Client → sf-llm-call → loopTo(client)
9
+ *
10
+ * Outer `Client` stage:
11
+ * - First visit: receives args, writes userMessage to scope.
12
+ * - Second visit (after the loop completes): $break()s with
13
+ * scope.answer as the chart's TraversalResult.
14
+ *
15
+ * Inner `sf-llm-call` subflow (drill-down view):
16
+ * Initialize → sf-system-prompt → sf-messages → call-llm
17
+ * → [sf-thinking if handler] → extract-final
18
+ *
19
+ * NO `sf-tools` slot — LLMCall has no tools by design (that's Agent's
20
+ * territory). Atomic LLMCall's lens chart is a clean 3-node top-level
21
+ * view (Client + LLM + loop edge) that drills into the real flowchart
22
+ * below.
23
+ *
24
+ * Loop semantics: LLMCall is one-shot. The loop fires once; the
25
+ * second Client visit immediately breaks. The shape is identical to
26
+ * chat-mode (future): swap `$break()` for `pause()` and the same
27
+ * chart supports multi-turn conversation.
28
+ *
29
+ * Slot subflows write convention-keyed injections observed by
30
+ * ContextRecorder. The call-llm stage typedEmits stream.llm_start
31
+ * and stream.llm_end observed by StreamRecorder. When a
32
+ * `ThinkingHandler` resolves for the provider, `sf-thinking` mounts
33
+ * automatically (auto-wired by provider.name — same convention Agent
34
+ * uses).
35
+ *
36
+ * Emits (through internally-attached recorders):
37
+ * agentfootprint.stream.llm_start / llm_end
38
+ * agentfootprint.context.injected / slot_composed
39
+ * agentfootprint.stream.thinking_end (when sf-thinking mounted)
40
+ */
41
+ import { type FlowchartCheckpoint, type RunOptions, type StructureRecorder } from 'footprintjs';
42
+ import type { GroupMetadata, GroupTranslator } from './translator.js';
43
+ import type { RunnerPauseOutcome } from './pause.js';
44
+ import type { LLMProvider, PricingTable } from '../adapters/types.js';
45
+ import { RunnerBase } from './RunnerBase.js';
46
+ export interface LLMCallOptions {
47
+ readonly provider: LLMProvider;
48
+ /** Human-friendly name shown in events/metrics. Default: 'LLMCall'. */
49
+ readonly name?: string;
50
+ /** Stable id used for topology + events. Default: 'llm-call'. */
51
+ readonly id?: string;
52
+ /** Model to request from the provider. */
53
+ readonly model: string;
54
+ /** Optional sampling temperature. */
55
+ readonly temperature?: number;
56
+ /** Optional max output tokens. */
57
+ readonly maxTokens?: number;
58
+ /**
59
+ * Pricing adapter. When set, LLMCall emits `agentfootprint.cost.tick`
60
+ * after every LLM response with per-call and cumulative USD. Run-scoped
61
+ * — the cumulative resets on each `.run()`.
62
+ */
63
+ readonly pricingTable?: PricingTable;
64
+ /**
65
+ * Cumulative USD budget per run. When provided along with `pricingTable`,
66
+ * LLMCall emits `agentfootprint.cost.limit_hit` with `action: 'warn'`
67
+ * the first time cumulative USD crosses the budget. Execution continues
68
+ * — consumers choose whether to abort by listening to the event.
69
+ */
70
+ readonly costBudget?: number;
71
+ /**
72
+ * Optional build-time recorders threaded into footprintjs's
73
+ * `flowChart()` factory. Each recorder observes per-node build
74
+ * events (`onStageAdded` / `onSubflowMounted` / etc.) for this
75
+ * LLMCall's internal chart (Initialize + slot mounts + CallLLM). When
76
+ * omitted, no build-time observation is wired up.
77
+ */
78
+ readonly structureRecorders?: readonly StructureRecorder[];
79
+ /**
80
+ * Optional per-COMPOSITION translator (UI-agnostic). See
81
+ * `core/translator.ts`. When attached, `runner.getUIGroup()` invokes
82
+ * it with the LLMCall's `GroupMetadata` (kind `'LLMCall'`, id, name,
83
+ * empty `members[]`, plus `extra.slots` with the three slot ids —
84
+ * `system-prompt`, `messages`, `tools` — so Lens can render the slot
85
+ * cards inside an LLMCall card without inspecting `buildTimeStructure`).
86
+ * Returns `undefined` when omitted.
87
+ */
88
+ readonly groupTranslator?: GroupTranslator;
89
+ }
90
+ export interface LLMCallInput {
91
+ readonly message: string;
92
+ }
93
+ export type LLMCallOutput = string;
94
+ export declare class LLMCall extends RunnerBase<LLMCallInput, LLMCallOutput> {
95
+ readonly name: string;
96
+ readonly id: string;
97
+ private readonly provider;
98
+ private readonly model;
99
+ private readonly temperature?;
100
+ private readonly maxTokens?;
101
+ private readonly systemPromptValue;
102
+ private readonly pricingTable?;
103
+ private readonly costBudget?;
104
+ private readonly structureRecorders?;
105
+ private readonly groupTranslator?;
106
+ /** Auto-resolved from provider.name at construction time (same
107
+ * convention Agent uses — see findThinkingHandler). When undefined,
108
+ * sf-thinking is NOT mounted and the chart has zero thinking
109
+ * overhead (build-time conditional mount). */
110
+ private readonly thinkingHandler?;
111
+ private currentRunContext;
112
+ constructor(opts: LLMCallOptions, systemPromptValue: string);
113
+ static create(opts: LLMCallOptions): LLMCallBuilder;
114
+ protected getGroupTranslator(): GroupTranslator | undefined;
115
+ /** LLMCall has no nested-runner members (slots are subflows of
116
+ * the LLMCall's own chart, not Runner instances). The slot ids
117
+ * are surfaced via `extra` so Lens can render the slot cards
118
+ * inside an LLMCall card without inspecting `buildTimeStructure`.
119
+ *
120
+ * TWO slots only — LLMCall does not have tools (that's Agent's
121
+ * affordance). Atomic LLMCall renders as a clean 2-pill card in
122
+ * collapsed (top-level) view. */
123
+ protected buildUIGroupMetadata(): GroupMetadata;
124
+ run(input: LLMCallInput, options?: RunOptions): Promise<LLMCallOutput | RunnerPauseOutcome>;
125
+ resume(checkpoint: FlowchartCheckpoint, input?: unknown, options?: RunOptions): Promise<LLMCallOutput | RunnerPauseOutcome>;
126
+ private createExecutor;
127
+ private finalizeResult;
128
+ private buildChart;
129
+ }
130
+ /**
131
+ * Tiny fluent builder. Validates required fields at build() time.
132
+ */
133
+ export declare class LLMCallBuilder {
134
+ private readonly opts;
135
+ private systemPromptValue;
136
+ constructor(opts: LLMCallOptions);
137
+ system(prompt: string): this;
138
+ build(): LLMCall;
139
+ }
@@ -0,0 +1,267 @@
1
+ /**
2
+ * RunnerBase — shared implementation of the Runner interface.
3
+ *
4
+ * Pattern: Template Method (GoF). Subclasses override `buildChart()` and
5
+ * optionally `onBeforeRun()` / `onAfterRun()`; the base handles
6
+ * dispatcher, recorder attachment, custom emit, and subscription.
7
+ * Role: Base class for LLMCall, Agent, Sequence, Parallel, Conditional, Loop.
8
+ * Emits: Nothing directly — its attached recorders do.
9
+ */
10
+ import type { CombinedRecorder, FlowChart, FlowChartExecutor, FlowchartCheckpoint, RunOptions } from 'footprintjs';
11
+ import { EventDispatcher } from '../events/dispatcher.js';
12
+ import type { RunnerPauseOutcome } from './pause.js';
13
+ import type { EventListener, ListenOptions, Unsubscribe, WildcardListener, WildcardSubscription } from '../events/dispatcher.js';
14
+ import type { AgentfootprintEventType } from '../events/registry.js';
15
+ import type { EventMeta } from '../events/types.js';
16
+ import type { EnableNamespace, Runner } from './runner.js';
17
+ /**
18
+ * Make a unique run id. Exported for tests; internal use normally.
19
+ */
20
+ export declare function makeRunId(): string;
21
+ export declare abstract class RunnerBase<TIn = unknown, TOut = unknown> implements Runner<TIn, TOut> {
22
+ protected readonly dispatcher: EventDispatcher;
23
+ protected readonly attachedRecorders: CombinedRecorder[];
24
+ /**
25
+ * The most recently used FlowChartExecutor — set by subclasses in
26
+ * `run()` so consumers can read the canonical structural snapshot
27
+ * via `getLastSnapshot()`. Single source of structural truth: this
28
+ * is footprintjs's snapshot, NOT a domain re-derivation.
29
+ */
30
+ protected lastExecutor: FlowChartExecutor | undefined;
31
+ /**
32
+ * Cached footprintjs FlowChart, built ONCE at construction time via
33
+ * `initChart()`. Subsequent `getSpec()` calls return this same
34
+ * object — reference-stable across all consumers (Lens spec memos,
35
+ * footprintjs's OpenAPI/MCP caches, recorder-side correlation).
36
+ *
37
+ * Set via `initChart(builder)`, called from the subclass constructor
38
+ * AFTER all instance fields are populated. Read via `getSpec()`.
39
+ *
40
+ * Why eager construction: the `StructureRecorder` contract is
41
+ * "fires once per node at build time" — lazy construction would
42
+ * fire each recorder every `getSpec()` / `run()` call (2N invocations
43
+ * per run instead of N), break reference equality, and trigger
44
+ * `_mergeStageMap` false-positive collisions on second build.
45
+ * See `RunnerBase.initChart` for details.
46
+ *
47
+ * Visibility note: `private` (not `protected`) so subclasses cannot
48
+ * bypass the `initChart()` double-init guard by writing the field
49
+ * directly. All legitimate access goes through `getSpec()` and
50
+ * `initChart()`.
51
+ */
52
+ private chart;
53
+ /**
54
+ * Returns the footprintjs snapshot from the most recent run (or
55
+ * undefined if no run has completed). The snapshot is the CANONICAL
56
+ * STRUCTURE: nodes, edges, executionTree, runtimeStageId, commitLog.
57
+ *
58
+ * Domain consumers (Lens, Trace, dashboards) read this for shape
59
+ * and join their own per-stage payload by `runtimeStageId`. They
60
+ * MUST NOT re-derive structure from typed events — that's the
61
+ * design footprintjs's CLAUDE.md Convention 1 explicitly forbids.
62
+ *
63
+ * Returns `undefined` before the first `run()` completes. After,
64
+ * always returns the snapshot of the most recent run (including
65
+ * across multi-turn reuse of the same runner instance).
66
+ */
67
+ getLastSnapshot(): ReturnType<FlowChartExecutor['getSnapshot']> | undefined;
68
+ /**
69
+ * Alias for `getLastSnapshot()` that mirrors `FlowChartExecutor.getSnapshot()`
70
+ * so consumers (lens, playground, ExplainableShell) can read the live or
71
+ * just-completed snapshot through the same method name they'd use on a
72
+ * footprintjs executor — without having to know whether they're holding
73
+ * an agentfootprint Runner or a raw executor.
74
+ *
75
+ * During an active run, returns the live snapshot (commit log + execution
76
+ * tree built incrementally as stages execute). Between runs, returns the
77
+ * last completed run's snapshot. Undefined before any run has started.
78
+ */
79
+ getSnapshot(): ReturnType<FlowChartExecutor['getSnapshot']> | undefined;
80
+ /**
81
+ * Return the footprintjs FlowChart for this runner — the canonical
82
+ * design-time blueprint. STABLE REFERENCE across calls (`getSpec()
83
+ * === getSpec()`). Set once at construction via `initChart()`.
84
+ *
85
+ * Pairs with the run-time getters (`getLastSnapshot`,
86
+ * `getCommitCount`) and matches `ExplainableShell.spec` +
87
+ * `specToReactFlow(spec, ...)` consumer conventions.
88
+ *
89
+ * DO NOT OVERRIDE in subclasses — the reference-identity contract
90
+ * (Lens / OpenAPI / MCP caches memo on this returning the same
91
+ * object) depends on the inherited body returning `this.chart`
92
+ * directly. To customise build behaviour, override `buildChart()`
93
+ * instead; this getter must remain a thin cache-read.
94
+ */
95
+ getSpec(): FlowChart;
96
+ /**
97
+ * Cached `getUIGroup()` output. Computed lazily on first read so the
98
+ * subclass constructor doesn't need to run the translator before all
99
+ * its members exist (e.g., Parallel builds its branches list mid-
100
+ * construction). After first invocation, subsequent calls return the
101
+ * same reference — reference-stable, matches the `getSpec()` contract.
102
+ *
103
+ * `null` (not `undefined`) is the explicit "computed; result was
104
+ * undefined" marker so we can distinguish from "not yet computed."
105
+ * Consumers see `undefined` when no translator was attached.
106
+ */
107
+ private uiGroupCache;
108
+ /**
109
+ * Return the consumer-shaped UI group for this composition — produced
110
+ * by invoking the consumer's `groupTranslator` (if attached) with this
111
+ * runner's `GroupMetadata`. Returns `undefined` when no translator was
112
+ * attached.
113
+ *
114
+ * STABLE REFERENCE across calls. Computed on first access and cached;
115
+ * subsequent calls return the same value. Pairs with `getSpec()` —
116
+ * library shape on one side, consumer-shaped UI on the other.
117
+ *
118
+ * Subclasses MUST override `buildUIGroupMetadata()` (the next hook) to
119
+ * supply the `GroupMetadata` for their composition kind. This method
120
+ * (the public surface) is `final`-by-convention — do not override.
121
+ */
122
+ getUIGroup<T = unknown>(): T | undefined;
123
+ /**
124
+ * Subclass hook — returns the consumer's translator if one was
125
+ * provided at construction time. Default: no translator (returns
126
+ * undefined). Each composition overrides to surface its own
127
+ * `opts.groupTranslator`.
128
+ */
129
+ protected getGroupTranslator(): import('./translator.js').GroupTranslator | undefined;
130
+ /**
131
+ * Translate this runner's group metadata with a CALLER-SUPPLIED
132
+ * translator that overrides the runner's own default. Used by
133
+ * parent compositions to apply per-method translator overrides.
134
+ * See the `Runner.getUIGroupWith` JSDoc for the contract.
135
+ */
136
+ getUIGroupWith<T = unknown>(override: import('./translator.js').GroupTranslator): T | undefined;
137
+ /**
138
+ * Subclass hook — returns the `GroupMetadata` for this composition.
139
+ * Default: undefined, meaning "no group translation for this runner
140
+ * kind." Compositions override to supply their members + kind. Called
141
+ * AT MOST ONCE per runner (result is cached by `getUIGroup()`).
142
+ */
143
+ protected buildUIGroupMetadata(): import('./translator.js').GroupMetadata | undefined;
144
+ /**
145
+ * Build + cache the runner's `FlowChart` exactly once. Called by the
146
+ * subclass constructor AFTER all instance fields are set, so the
147
+ * builder lambda can close over them safely.
148
+ *
149
+ * Throws if called twice on the same instance — the chart is meant
150
+ * to be immutable post-construction. Each `run()` reuses the same
151
+ * chart in a fresh `FlowChartExecutor`.
152
+ *
153
+ * Implementation invariant (per footprintjs inventor review):
154
+ * each attached `StructureRecorder` fires exactly N times per
155
+ * construction (N = node count). Two `getSpec()` calls return the
156
+ * same `FlowChart` object reference. `_mergeStageMap` collision
157
+ * guards never see false-positives because each child runner's
158
+ * stage functions are created once and reused.
159
+ */
160
+ protected initChart(builder: () => FlowChart): void;
161
+ /**
162
+ * Execute the runner. Subclass may override for specialized input
163
+ * mapping, but default invokes getSpec() + FlowChartExecutor.
164
+ */
165
+ abstract run(input: TIn, options?: RunOptions): Promise<TOut | RunnerPauseOutcome>;
166
+ /**
167
+ * Resume a paused run from its checkpoint. Default behavior: rebuild the
168
+ * chart, wire the same core recorders + consumer recorders, call
169
+ * `executor.resume(checkpoint, input)`, and emit `pause.resume` before
170
+ * returning. Subclass overrides only if it needs specialized behavior.
171
+ */
172
+ abstract resume(checkpoint: FlowchartCheckpoint, input?: unknown, options?: RunOptions): Promise<TOut | RunnerPauseOutcome>;
173
+ /**
174
+ * Inspect an executor result. On pause, emits `pause.request` and returns
175
+ * a `RunnerPauseOutcome`. Otherwise returns `undefined` and the subclass
176
+ * continues its normal result-shape handling (string vs BranchResults vs
177
+ * Error).
178
+ *
179
+ * Subclasses call this BEFORE their own type checks, so pause is never
180
+ * misinterpreted as "unexpected result shape".
181
+ */
182
+ protected detectPause(executor: FlowChartExecutor, result: unknown): RunnerPauseOutcome | undefined;
183
+ /**
184
+ * Emit `agentfootprint.pause.request` through the dispatcher. Called by
185
+ * `detectPause()`. Subclasses should not emit this directly.
186
+ */
187
+ private emitPauseRequest;
188
+ /**
189
+ * Emit `agentfootprint.pause.resume` through the dispatcher. Called from
190
+ * concrete runners' `resume()` BEFORE invoking `executor.resume()`.
191
+ */
192
+ protected emitPauseResume(checkpoint: FlowchartCheckpoint, input: unknown): void;
193
+ on<K extends AgentfootprintEventType>(type: K, listener: EventListener<K>, options?: ListenOptions): Unsubscribe;
194
+ on(type: WildcardSubscription, listener: WildcardListener, options?: ListenOptions): Unsubscribe;
195
+ off<K extends AgentfootprintEventType>(type: K, listener: EventListener<K>): void;
196
+ off(type: WildcardSubscription, listener: WildcardListener): void;
197
+ once<K extends AgentfootprintEventType>(type: K, listener: EventListener<K>, options?: Omit<ListenOptions, 'once'>): Unsubscribe;
198
+ once(type: WildcardSubscription, listener: WildcardListener, options?: Omit<ListenOptions, 'once'>): Unsubscribe;
199
+ /**
200
+ * Lifecycle escape hatch — drop EVERY event listener on this runner in
201
+ * one call (typed, domain-wildcard, and `'*'`). Delegates to
202
+ * `EventDispatcher.removeAllListeners()`.
203
+ *
204
+ * For long-lived runners on servers: when you can't thread an
205
+ * AbortSignal or keep every Unsubscribe handle, call this between
206
+ * requests to guarantee zero residual subscriptions. Note it also
207
+ * removes listeners wired by `enable.*` strategies — re-enable after
208
+ * calling if you still want them. Does NOT touch attached recorders
209
+ * (see `attach()` — recorders have their own Unsubscribe).
210
+ */
211
+ removeAllListeners(): void;
212
+ /**
213
+ * Diagnostic — how many event listeners this runner currently retains.
214
+ * No argument = total across all buckets (the leak-detection number);
215
+ * with a subscription key = that bucket only. Delegates to
216
+ * `EventDispatcher.listenerCount()`.
217
+ */
218
+ listenerCount(type?: AgentfootprintEventType | WildcardSubscription): number;
219
+ /**
220
+ * Attach a footprintjs CombinedRecorder to observe every subsequent run.
221
+ *
222
+ * LIFECYCLE CONTRACT (who owns cleanup):
223
+ * - Attached recorders live for the RUNNER's lifetime, not a run's.
224
+ * NOTHING auto-expires per-run — a recorder attached once observes
225
+ * every later `run()` until you call the returned Unsubscribe.
226
+ * - The CALLER owns cleanup. Keep the Unsubscribe and call it when the
227
+ * observer's life ends (request scope, UI unmount, test teardown).
228
+ * - Event listeners (`on()` / `once()`) follow the same rule, with two
229
+ * extra outs: pass `{ signal }` for AbortSignal auto-cleanup, or call
230
+ * `removeAllListeners()` to bulk-drop listeners (listeners ONLY —
231
+ * recorders are not affected).
232
+ * - `once()` listeners are the only self-expiring subscription.
233
+ *
234
+ * attach() is NOT idempotent: every call pushes another entry. (At run
235
+ * time footprintjs's executor dedupes recorders by ID, so same-ID
236
+ * duplicates won't double-fire — but the runner-side array still
237
+ * grows.) Attaching in a per-run loop without detaching is the classic
238
+ * server leak; attach once, or detach per-run.
239
+ */
240
+ attach(recorder: CombinedRecorder): Unsubscribe;
241
+ readonly enable: EnableNamespace;
242
+ /**
243
+ * Emit a consumer-defined custom event.
244
+ *
245
+ * If `name` matches a registered event type, this routes exactly like a
246
+ * library-emitted event (via the typed EventMap). Otherwise it flows
247
+ * through to wildcard listeners (`'*'`) as an opaque CustomEvent with
248
+ * minimal meta. Library events remain reserved under `agentfootprint.*`.
249
+ */
250
+ emit(name: string, payload: Record<string, unknown>): void;
251
+ /**
252
+ * Build a minimal EventMeta for a consumer-level emit OUTSIDE a stage
253
+ * context. Real stage code uses `buildEventMeta` with a TraversalContext.
254
+ */
255
+ protected minimalMeta(): EventMeta;
256
+ /**
257
+ * Composition ancestry for this runner. Subclass may override to append
258
+ * its own identity (e.g. `'Sequence:bot'`).
259
+ */
260
+ protected compositionPath(): readonly string[];
261
+ /**
262
+ * Provide access to the internal dispatcher for internal recorders.
263
+ * NOT part of the public Runner contract — internal recorders (e.g.
264
+ * ContextRecorder) receive this at construction.
265
+ */
266
+ protected getDispatcher(): EventDispatcher;
267
+ }
@@ -10,6 +10,7 @@
10
10
  import { EventDispatcher } from '../events/dispatcher.js';
11
11
  import { attachObservabilityStrategy, attachCostStrategy, attachLiveStatusStrategy, } from '../strategies/attach.js';
12
12
  import { attachFlowchart, } from '../recorders/observability/FlowchartRecorder.js';
13
+ import { attachLocalObservability, } from '../recorders/observability/localObservability.js';
13
14
  let _runIdSeq = 0;
14
15
  /**
15
16
  * Make a unique run id. Exported for tests; internal use normally.
@@ -352,6 +353,12 @@ export class RunnerBase {
352
353
  // via the attach path AND subscribes to the event dispatcher
353
354
  // for ReAct step transitions (stream.llm_* / stream.tool_*).
354
355
  attachFlowchart((r) => this.attach(r), this.dispatcher, opts),
356
+ localObservability: (opts) => attachLocalObservability((r) => this.attach(r), this.dispatcher, opts, Date.now, () => {
357
+ // The serialized STATIC chart — lets the offline Trace rebuild the
358
+ // flowchart (Replay Option A). Captured lazily; spec is reference-stable.
359
+ const spec = this.getSpec();
360
+ return spec.buildTimeStructure;
361
+ }),
355
362
  // v2.8 grouped strategy enablers — see
356
363
  // `docs/inspiration/strategy-everywhere.md`.
357
364
  observability: (opts) => attachObservabilityStrategy(this.dispatcher, opts),
@@ -1 +1 @@
1
- {"version":3,"file":"RunnerBase.js","sourceRoot":"","sources":["../../../src/core/RunnerBase.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AASH,OAAO,EAAE,eAAe,EAAE,MAAM,yBAAyB,CAAC;AAe1D,OAAO,EACL,2BAA2B,EAC3B,kBAAkB,EAClB,wBAAwB,GACzB,MAAM,yBAAyB,CAAC;AACjC,OAAO,EACL,eAAe,GAGhB,MAAM,iDAAiD,CAAC;AAGzD,IAAI,SAAS,GAAG,CAAC,CAAC;AAElB;;GAEG;AACH,MAAM,UAAU,SAAS;IACvB,OAAO,OAAO,IAAI,CAAC,GAAG,EAAE,IAAI,EAAE,SAAS,EAAE,CAAC;AAC5C,CAAC;AAED,MAAM,OAAgB,UAAU;IACX,UAAU,GAAG,IAAI,eAAe,EAAE,CAAC;IACnC,iBAAiB,GAAuB,EAAE,CAAC;IAE9D;;;;;OAKG;IACO,YAAY,CAAgC;IAEtD;;;;;;;;;;;;;;;;;;;;OAoBG;IACK,KAAK,CAAwB;IAErC;;;;;;;;;;;;;OAaG;IACH,eAAe;QACb,OAAO,IAAI,CAAC,YAAY,EAAE,WAAW,EAAE,CAAC;IAC1C,CAAC;IAED;;;;;;;;;;OAUG;IACH,WAAW;QACT,OAAO,IAAI,CAAC,eAAe,EAAE,CAAC;IAChC,CAAC;IAED,kEAAkE;IAElE;;;;;;;;;;;;;;OAcG;IACH,OAAO;QACL,IAAI,IAAI,CAAC,KAAK,KAAK,SAAS,EAAE,CAAC;YAC7B,MAAM,IAAI,KAAK,CACb,GAAG,IAAI,CAAC,WAAW,CAAC,IAAI,uJAAuJ,CAChL,CAAC;QACJ,CAAC;QACD,OAAO,IAAI,CAAC,KAAK,CAAC;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