agentfootprint 2.14.5 → 3.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 (219) hide show
  1. package/dist/cache/CacheDecisionSubflow.js +3 -1
  2. package/dist/cache/CacheDecisionSubflow.js.map +1 -1
  3. package/dist/conventions.js +3 -2
  4. package/dist/conventions.js.map +1 -1
  5. package/dist/core/Agent.js +69 -23
  6. package/dist/core/Agent.js.map +1 -1
  7. package/dist/core/LLMCall.js +44 -5
  8. package/dist/core/LLMCall.js.map +1 -1
  9. package/dist/core/RunnerBase.js +173 -0
  10. package/dist/core/RunnerBase.js.map +1 -1
  11. package/dist/core/agent/buildAgentChart.js +12 -2
  12. package/dist/core/agent/buildAgentChart.js.map +1 -1
  13. package/dist/core/runner.js +4 -3
  14. package/dist/core/runner.js.map +1 -1
  15. package/dist/core/slots/buildMessagesSlot.js +1 -1
  16. package/dist/core/slots/buildMessagesSlot.js.map +1 -1
  17. package/dist/core/slots/buildSystemPromptSlot.js +1 -1
  18. package/dist/core/slots/buildSystemPromptSlot.js.map +1 -1
  19. package/dist/core/slots/buildThinkingSubflow.js +1 -1
  20. package/dist/core/slots/buildThinkingSubflow.js.map +1 -1
  21. package/dist/core/slots/buildToolsSlot.js +3 -1
  22. package/dist/core/slots/buildToolsSlot.js.map +1 -1
  23. package/dist/core/translator.js +32 -0
  24. package/dist/core/translator.js.map +1 -0
  25. package/dist/core-flow/Conditional.js +72 -10
  26. package/dist/core-flow/Conditional.js.map +1 -1
  27. package/dist/core-flow/Loop.js +59 -16
  28. package/dist/core-flow/Loop.js.map +1 -1
  29. package/dist/core-flow/Parallel.js +239 -92
  30. package/dist/core-flow/Parallel.js.map +1 -1
  31. package/dist/core-flow/Sequence.js +50 -8
  32. package/dist/core-flow/Sequence.js.map +1 -1
  33. package/dist/esm/cache/CacheDecisionSubflow.js +3 -1
  34. package/dist/esm/cache/CacheDecisionSubflow.js.map +1 -1
  35. package/dist/esm/conventions.js +3 -2
  36. package/dist/esm/conventions.js.map +1 -1
  37. package/dist/esm/core/Agent.js +69 -23
  38. package/dist/esm/core/Agent.js.map +1 -1
  39. package/dist/esm/core/LLMCall.js +44 -5
  40. package/dist/esm/core/LLMCall.js.map +1 -1
  41. package/dist/esm/core/RunnerBase.js +173 -0
  42. package/dist/esm/core/RunnerBase.js.map +1 -1
  43. package/dist/esm/core/agent/buildAgentChart.js +12 -2
  44. package/dist/esm/core/agent/buildAgentChart.js.map +1 -1
  45. package/dist/esm/core/runner.js +4 -3
  46. package/dist/esm/core/runner.js.map +1 -1
  47. package/dist/esm/core/slots/buildMessagesSlot.js +1 -1
  48. package/dist/esm/core/slots/buildMessagesSlot.js.map +1 -1
  49. package/dist/esm/core/slots/buildSystemPromptSlot.js +1 -1
  50. package/dist/esm/core/slots/buildSystemPromptSlot.js.map +1 -1
  51. package/dist/esm/core/slots/buildThinkingSubflow.js +1 -1
  52. package/dist/esm/core/slots/buildThinkingSubflow.js.map +1 -1
  53. package/dist/esm/core/slots/buildToolsSlot.js +3 -1
  54. package/dist/esm/core/slots/buildToolsSlot.js.map +1 -1
  55. package/dist/esm/core/translator.js +31 -0
  56. package/dist/esm/core/translator.js.map +1 -0
  57. package/dist/esm/core-flow/Conditional.js +72 -10
  58. package/dist/esm/core-flow/Conditional.js.map +1 -1
  59. package/dist/esm/core-flow/Loop.js +59 -16
  60. package/dist/esm/core-flow/Loop.js.map +1 -1
  61. package/dist/esm/core-flow/Parallel.js +240 -93
  62. package/dist/esm/core-flow/Parallel.js.map +1 -1
  63. package/dist/esm/core-flow/Sequence.js +50 -8
  64. package/dist/esm/core-flow/Sequence.js.map +1 -1
  65. package/dist/esm/index.js +1 -0
  66. package/dist/esm/index.js.map +1 -1
  67. package/dist/esm/lib/injection-engine/buildInjectionEngineSubflow.js +1 -1
  68. package/dist/esm/lib/injection-engine/buildInjectionEngineSubflow.js.map +1 -1
  69. package/dist/esm/memory/causal/snapshotPipeline.js +6 -2
  70. package/dist/esm/memory/causal/snapshotPipeline.js.map +1 -1
  71. package/dist/esm/memory/pipeline/auto.js +2 -2
  72. package/dist/esm/memory/pipeline/auto.js.map +1 -1
  73. package/dist/esm/memory/pipeline/default.js +4 -2
  74. package/dist/esm/memory/pipeline/default.js.map +1 -1
  75. package/dist/esm/memory/pipeline/ephemeral.js +3 -1
  76. package/dist/esm/memory/pipeline/ephemeral.js.map +1 -1
  77. package/dist/esm/memory/pipeline/fact.js +4 -2
  78. package/dist/esm/memory/pipeline/fact.js.map +1 -1
  79. package/dist/esm/memory/pipeline/narrative.js +4 -2
  80. package/dist/esm/memory/pipeline/narrative.js.map +1 -1
  81. package/dist/esm/memory/pipeline/semantic.js +2 -2
  82. package/dist/esm/memory/pipeline/semantic.js.map +1 -1
  83. package/dist/esm/observe.js +1 -1
  84. package/dist/esm/observe.js.map +1 -1
  85. package/dist/esm/patterns/MapReduce.js +5 -5
  86. package/dist/esm/patterns/MapReduce.js.map +1 -1
  87. package/dist/esm/patterns/Swarm.js +1 -1
  88. package/dist/esm/patterns/Swarm.js.map +1 -1
  89. package/dist/esm/recorders/observability/BoundaryRecorder.js +315 -36
  90. package/dist/esm/recorders/observability/BoundaryRecorder.js.map +1 -1
  91. package/dist/esm/recorders/observability/FlowchartRecorder.js +10 -0
  92. package/dist/esm/recorders/observability/FlowchartRecorder.js.map +1 -1
  93. package/dist/esm/recorders/observability/LiveStateRecorder.js +112 -21
  94. package/dist/esm/recorders/observability/LiveStateRecorder.js.map +1 -1
  95. package/dist/esm/recorders/observability/RunStepRecorder.js +652 -0
  96. package/dist/esm/recorders/observability/RunStepRecorder.js.map +1 -0
  97. package/dist/esm/recorders/observability/internal/ActorArrowClassifier.js +34 -0
  98. package/dist/esm/recorders/observability/internal/ActorArrowClassifier.js.map +1 -0
  99. package/dist/esm/recorders/observability/internal/CandidateAnswerBuffer.js +32 -0
  100. package/dist/esm/recorders/observability/internal/CandidateAnswerBuffer.js.map +1 -0
  101. package/dist/esm/recorders/observability/internal/ForkTracker.js +84 -0
  102. package/dist/esm/recorders/observability/internal/ForkTracker.js.map +1 -0
  103. package/dist/esm/recorders/observability/internal/RootInferrer.js +114 -0
  104. package/dist/esm/recorders/observability/internal/RootInferrer.js.map +1 -0
  105. package/dist/esm/recorders/observability/internal/SequenceSiblingTracker.js +31 -0
  106. package/dist/esm/recorders/observability/internal/SequenceSiblingTracker.js.map +1 -0
  107. package/dist/esm/recorders/observability/observeRunId.js +21 -0
  108. package/dist/esm/recorders/observability/observeRunId.js.map +1 -0
  109. package/dist/esm/reliability/buildReliabilityGateChart.js +1 -1
  110. package/dist/esm/reliability/buildReliabilityGateChart.js.map +1 -1
  111. package/dist/index.js +7 -3
  112. package/dist/index.js.map +1 -1
  113. package/dist/lib/injection-engine/buildInjectionEngineSubflow.js +1 -1
  114. package/dist/lib/injection-engine/buildInjectionEngineSubflow.js.map +1 -1
  115. package/dist/memory/causal/snapshotPipeline.js +6 -2
  116. package/dist/memory/causal/snapshotPipeline.js.map +1 -1
  117. package/dist/memory/pipeline/auto.js +2 -2
  118. package/dist/memory/pipeline/auto.js.map +1 -1
  119. package/dist/memory/pipeline/default.js +4 -2
  120. package/dist/memory/pipeline/default.js.map +1 -1
  121. package/dist/memory/pipeline/ephemeral.js +3 -1
  122. package/dist/memory/pipeline/ephemeral.js.map +1 -1
  123. package/dist/memory/pipeline/fact.js +4 -2
  124. package/dist/memory/pipeline/fact.js.map +1 -1
  125. package/dist/memory/pipeline/narrative.js +4 -2
  126. package/dist/memory/pipeline/narrative.js.map +1 -1
  127. package/dist/memory/pipeline/semantic.js +2 -2
  128. package/dist/memory/pipeline/semantic.js.map +1 -1
  129. package/dist/observe.js +1 -1
  130. package/dist/observe.js.map +1 -1
  131. package/dist/patterns/MapReduce.js +5 -5
  132. package/dist/patterns/MapReduce.js.map +1 -1
  133. package/dist/patterns/Swarm.js +1 -1
  134. package/dist/patterns/Swarm.js.map +1 -1
  135. package/dist/recorders/observability/BoundaryRecorder.js +314 -35
  136. package/dist/recorders/observability/BoundaryRecorder.js.map +1 -1
  137. package/dist/recorders/observability/FlowchartRecorder.js +10 -0
  138. package/dist/recorders/observability/FlowchartRecorder.js.map +1 -1
  139. package/dist/recorders/observability/LiveStateRecorder.js +111 -20
  140. package/dist/recorders/observability/LiveStateRecorder.js.map +1 -1
  141. package/dist/recorders/observability/RunStepRecorder.js +658 -0
  142. package/dist/recorders/observability/RunStepRecorder.js.map +1 -0
  143. package/dist/recorders/observability/internal/ActorArrowClassifier.js +38 -0
  144. package/dist/recorders/observability/internal/ActorArrowClassifier.js.map +1 -0
  145. package/dist/recorders/observability/internal/CandidateAnswerBuffer.js +36 -0
  146. package/dist/recorders/observability/internal/CandidateAnswerBuffer.js.map +1 -0
  147. package/dist/recorders/observability/internal/ForkTracker.js +88 -0
  148. package/dist/recorders/observability/internal/ForkTracker.js.map +1 -0
  149. package/dist/recorders/observability/internal/RootInferrer.js +118 -0
  150. package/dist/recorders/observability/internal/RootInferrer.js.map +1 -0
  151. package/dist/recorders/observability/internal/SequenceSiblingTracker.js +35 -0
  152. package/dist/recorders/observability/internal/SequenceSiblingTracker.js.map +1 -0
  153. package/dist/recorders/observability/observeRunId.js +25 -0
  154. package/dist/recorders/observability/observeRunId.js.map +1 -0
  155. package/dist/reliability/buildReliabilityGateChart.js +1 -1
  156. package/dist/reliability/buildReliabilityGateChart.js.map +1 -1
  157. package/dist/types/cache/CacheDecisionSubflow.d.ts.map +1 -1
  158. package/dist/types/conventions.d.ts.map +1 -1
  159. package/dist/types/core/Agent.d.ts +20 -18
  160. package/dist/types/core/Agent.d.ts.map +1 -1
  161. package/dist/types/core/LLMCall.d.ts +28 -2
  162. package/dist/types/core/LLMCall.d.ts.map +1 -1
  163. package/dist/types/core/RunnerBase.d.ts +124 -4
  164. package/dist/types/core/RunnerBase.d.ts.map +1 -1
  165. package/dist/types/core/agent/buildAgentChart.d.ts +7 -1
  166. package/dist/types/core/agent/buildAgentChart.d.ts.map +1 -1
  167. package/dist/types/core/agent/types.d.ts +29 -0
  168. package/dist/types/core/agent/types.d.ts.map +1 -1
  169. package/dist/types/core/runner.d.ts +51 -5
  170. package/dist/types/core/runner.d.ts.map +1 -1
  171. package/dist/types/core/slots/buildMessagesSlot.d.ts.map +1 -1
  172. package/dist/types/core/slots/buildSystemPromptSlot.d.ts.map +1 -1
  173. package/dist/types/core/slots/buildThinkingSubflow.d.ts.map +1 -1
  174. package/dist/types/core/slots/buildToolsSlot.d.ts.map +1 -1
  175. package/dist/types/core/translator.d.ts +95 -0
  176. package/dist/types/core/translator.d.ts.map +1 -0
  177. package/dist/types/core-flow/Conditional.d.ts +48 -4
  178. package/dist/types/core-flow/Conditional.d.ts.map +1 -1
  179. package/dist/types/core-flow/Loop.d.ts +42 -3
  180. package/dist/types/core-flow/Loop.d.ts.map +1 -1
  181. package/dist/types/core-flow/Parallel.d.ts +99 -4
  182. package/dist/types/core-flow/Parallel.d.ts.map +1 -1
  183. package/dist/types/core-flow/Sequence.d.ts +49 -3
  184. package/dist/types/core-flow/Sequence.d.ts.map +1 -1
  185. package/dist/types/events/payloads.d.ts +15 -1
  186. package/dist/types/events/payloads.d.ts.map +1 -1
  187. package/dist/types/index.d.ts +4 -2
  188. package/dist/types/index.d.ts.map +1 -1
  189. package/dist/types/lib/injection-engine/buildInjectionEngineSubflow.d.ts.map +1 -1
  190. package/dist/types/memory/causal/snapshotPipeline.d.ts.map +1 -1
  191. package/dist/types/memory/pipeline/auto.d.ts.map +1 -1
  192. package/dist/types/memory/pipeline/default.d.ts.map +1 -1
  193. package/dist/types/memory/pipeline/ephemeral.d.ts.map +1 -1
  194. package/dist/types/memory/pipeline/fact.d.ts.map +1 -1
  195. package/dist/types/memory/pipeline/narrative.d.ts.map +1 -1
  196. package/dist/types/memory/pipeline/semantic.d.ts.map +1 -1
  197. package/dist/types/observe.d.ts +2 -2
  198. package/dist/types/observe.d.ts.map +1 -1
  199. package/dist/types/recorders/observability/BoundaryRecorder.d.ts +160 -6
  200. package/dist/types/recorders/observability/BoundaryRecorder.d.ts.map +1 -1
  201. package/dist/types/recorders/observability/FlowchartRecorder.d.ts.map +1 -1
  202. package/dist/types/recorders/observability/LiveStateRecorder.d.ts +42 -6
  203. package/dist/types/recorders/observability/LiveStateRecorder.d.ts.map +1 -1
  204. package/dist/types/recorders/observability/RunStepRecorder.d.ts +232 -0
  205. package/dist/types/recorders/observability/RunStepRecorder.d.ts.map +1 -0
  206. package/dist/types/recorders/observability/internal/ActorArrowClassifier.d.ts +26 -0
  207. package/dist/types/recorders/observability/internal/ActorArrowClassifier.d.ts.map +1 -0
  208. package/dist/types/recorders/observability/internal/CandidateAnswerBuffer.d.ts +29 -0
  209. package/dist/types/recorders/observability/internal/CandidateAnswerBuffer.d.ts.map +1 -0
  210. package/dist/types/recorders/observability/internal/ForkTracker.d.ts +61 -0
  211. package/dist/types/recorders/observability/internal/ForkTracker.d.ts.map +1 -0
  212. package/dist/types/recorders/observability/internal/RootInferrer.d.ts +52 -0
  213. package/dist/types/recorders/observability/internal/RootInferrer.d.ts.map +1 -0
  214. package/dist/types/recorders/observability/internal/SequenceSiblingTracker.d.ts +25 -0
  215. package/dist/types/recorders/observability/internal/SequenceSiblingTracker.d.ts.map +1 -0
  216. package/dist/types/recorders/observability/observeRunId.d.ts +37 -0
  217. package/dist/types/recorders/observability/observeRunId.d.ts.map +1 -0
  218. package/dist/types/reliability/buildReliabilityGateChart.d.ts.map +1 -1
  219. package/package.json +3 -3
@@ -3,7 +3,7 @@
3
3
  *
4
4
  * Pattern: Observer (GoF) — pluggable, fire-and-forget event listeners
5
5
  * for the agent's typed event stream.
6
- * Role: Outer ring (Hexagonal). Attach via `runner.attachRecorder()`;
6
+ * Role: Outer ring (Hexagonal). Attach via `runner.attachScopeRecorder()`;
7
7
  * the runner emits events, recorders accumulate state.
8
8
  *
9
9
  * Three tiers (progressive disclosure):
@@ -34,7 +34,7 @@ export { ContextRecorder, type ContextRecorderOptions } from './recorders/core/C
34
34
  export { streamRecorder, type StreamRecorderOptions } from './recorders/core/StreamRecorder.js';
35
35
  export { compositionRecorder, type CompositionRecorderOptions, } from './recorders/core/CompositionRecorder.js';
36
36
  export { agentRecorder, type AgentRecorderOptions } from './recorders/core/AgentRecorder.js';
37
- export { boundaryRecorder, BoundaryRecorder, type BoundaryAggregate, type DomainEvent, type DomainLLMEndEvent, type DomainLLMStartEvent, type DomainToolStartEvent, type DomainToolEndEvent, type DomainSubflowEvent, type DomainLoopIterationEvent, } from './recorders/observability/BoundaryRecorder.js';
37
+ export { boundaryRecorder, BoundaryRecorder, type BoundaryAggregate, type BoundaryRecorderOptions, type BoundaryRangeLabel, type DomainEvent, type DomainLLMEndEvent, type DomainLLMStartEvent, type DomainToolStartEvent, type DomainToolEndEvent, type DomainSubflowEvent, type DomainLoopIterationEvent, } from './recorders/observability/BoundaryRecorder.js';
38
38
  export { attachFlowchart, buildStepGraph, type StepGraph, type StepNode, type StepEdge, type SlotBoundary, type ContextInjection, type FlowchartOptions, type FlowchartHandle, } from './recorders/observability/FlowchartRecorder.js';
39
39
  export { liveStateRecorder, LiveStateRecorder, LiveLLMTracker, LiveToolTracker, LiveAgentTurnTracker, type LLMLiveState, type ToolLiveState, type AgentTurnLiveState, type LiveStateRunnerLike, } from './recorders/observability/LiveStateRecorder.js';
40
40
  export { costRecorder, type CostRecorderOptions } from './recorders/core/CostRecorder.js';
@@ -1 +1 @@
1
- {"version":3,"file":"observe.d.ts","sourceRoot":"","sources":["../../src/observe.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA+BG;AAGH,OAAO,EAAE,eAAe,EAAE,KAAK,sBAAsB,EAAE,MAAM,qCAAqC,CAAC;AACnG,OAAO,EAAE,cAAc,EAAE,KAAK,qBAAqB,EAAE,MAAM,oCAAoC,CAAC;AAGhG,OAAO,EACL,mBAAmB,EACnB,KAAK,0BAA0B,GAChC,MAAM,yCAAyC,CAAC;AACjD,OAAO,EAAE,aAAa,EAAE,KAAK,oBAA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AK,qBAAqB,EAAE,MAAM,oCAAoC,CAAC;AAChG,OAAO,EACL,kBAAkB,EAClB,KAAK,yBAAyB,GAC/B,MAAM,wCAAwC,CAAC;AAChD,OAAO,EAAE,aAAa,EAAE,KAAK,oBAAoB,EAAE,MAAM,mCAAmC,CAAC;AAC7F,OAAO,EACL,aAAa,EACb,cAAc,EACd,KAAK,aAAa,EAClB,KAAK,aAAa,EAClB,KAAK,cAAc,GACpB,MAAM,8CAA8C,CAAC;AACtD,OAAO,EACL,cAAc,EACd,KAAK,aAAa,EAClB,KAAK,eAAe,GACrB,MAAM,+CAA+C,CAAC;AAGvD,OAAO,EAAE,SAAS,EAAE,MAAM,+BAA+B,CAAC"}
@@ -75,7 +75,7 @@
75
75
  * }
76
76
  * ```
77
77
  */
78
- import { SequenceRecorder } from 'footprintjs/trace';
78
+ import { CommitRangeIndex } from 'footprintjs/trace';
79
79
  import type { CombinedRecorder, FlowDecisionEvent, FlowForkEvent, FlowLoopEvent, FlowSubflowEvent, TraversalContext } from 'footprintjs';
80
80
  interface FlowRunEvent {
81
81
  readonly payload?: unknown;
@@ -95,6 +95,23 @@ interface DomainEventBase {
95
95
  readonly depth: number;
96
96
  /** Wall-clock ms at capture time. */
97
97
  readonly ts: number;
98
+ /** Commit count when this event fired. 0 if the recorder was
99
+ * constructed without `getCommitCount` (legacy mode). The boundary
100
+ * RANGE for an (entry, exit) pair is `[entry.commitIdxBefore,
101
+ * exit.commitIdxBefore]`. Phase 5 Layer 2 — see
102
+ * `docs/design/boundary-commit-ranges.md`. */
103
+ readonly commitIdxBefore: number;
104
+ /** RESERVED for future event types that trigger engine writes.
105
+ * CURRENT BEHAVIOR: always equals `commitIdxBefore` for every event
106
+ * emitted by today's BoundaryRecorder. Observer events don't write
107
+ * to scope, so the executor's commit count doesn't change between
108
+ * the moment the event is sampled and the moment it's recorded.
109
+ * Consumers should currently treat this as identical to
110
+ * `commitIdxBefore`; do NOT rely on it being strictly greater.
111
+ * The field exists for forward compatibility — if a future
112
+ * observer pattern triggers commits during its handler, this is
113
+ * where the post-effect count will land. */
114
+ readonly commitIdxAfter: number;
98
115
  }
99
116
  export interface DomainRunEvent extends DomainEventBase {
100
117
  readonly type: 'run.entry' | 'run.exit';
@@ -147,6 +164,33 @@ export interface DomainLoopIterationEvent extends DomainEventBase {
147
164
  readonly target: string;
148
165
  readonly iteration: number;
149
166
  }
167
+ /**
168
+ * Composition boundary event — fired for every composition primitive
169
+ * (Parallel / Sequence / Loop / Conditional). Mirrors `subflow.entry/exit`
170
+ * but for the COMPOSITION wrapper itself (the box that contains the
171
+ * branches / steps / iterations / chosen-branch).
172
+ *
173
+ * This pair OPENS and CLOSES a boundary range in `boundaryIndex`. Child
174
+ * subflows that fire between the pair nest naturally inside the
175
+ * composition's range.
176
+ *
177
+ * The `runtimeStageId` is the composition's own per-execution id —
178
+ * SAME format as any other runtimeStageId, with `#executionIndex`. The
179
+ * `kind` discriminates which composition primitive this is.
180
+ *
181
+ * For the Lens compound time axis, this group is what collapses
182
+ * parallel branches into ONE slider position at the parent's drill
183
+ * level. Drill into the composition to see its children as positions.
184
+ */
185
+ export interface DomainCompositionEvent extends DomainEventBase {
186
+ readonly type: 'composition.start' | 'composition.end';
187
+ readonly kind: 'Parallel' | 'Sequence' | 'Loop' | 'Conditional';
188
+ readonly compositionId: string;
189
+ readonly name: string;
190
+ /** On `composition.end`, the exit status reported by the composition. */
191
+ readonly status?: 'ok' | 'err' | 'break' | 'budget_exhausted';
192
+ readonly durationMs?: number;
193
+ }
150
194
  /**
151
195
  * The 4 actor arrows of a ReAct cycle. Tagged on `llm.start` / `llm.end`
152
196
  * at capture time so consumers (slider, run-flow renderer) dispatch by
@@ -217,7 +261,7 @@ export interface DomainContextInjectedEvent extends DomainEventBase {
217
261
  readonly budgetFraction?: number;
218
262
  }
219
263
  /** Discriminated union covering every observable moment in a run. */
220
- export type DomainEvent = DomainRunEvent | DomainSubflowEvent | DomainForkBranchEvent | DomainDecisionBranchEvent | DomainLoopIterationEvent | DomainLLMStartEvent | DomainLLMEndEvent | DomainToolStartEvent | DomainToolEndEvent | DomainContextInjectedEvent;
264
+ export type DomainEvent = DomainRunEvent | DomainSubflowEvent | DomainCompositionEvent | DomainForkBranchEvent | DomainDecisionBranchEvent | DomainLoopIterationEvent | DomainLLMStartEvent | DomainLLMEndEvent | DomainToolStartEvent | DomainToolEndEvent | DomainContextInjectedEvent;
221
265
  /**
222
266
  * Per-boundary rollup returned by
223
267
  * `BoundaryRecorder.aggregateForBoundary` and
@@ -265,6 +309,43 @@ export interface BoundaryAggregate {
265
309
  }
266
310
  export interface BoundaryRecorderOptions {
267
311
  readonly id?: string;
312
+ /**
313
+ * Live commit-count accessor — typically `() => executor.getCommitCount()`
314
+ * from footprintjs 5.1+. Inject from your runner. When provided:
315
+ * - Every DomainEvent gains `commitIdxBefore` / `commitIdxAfter`.
316
+ * - `recorder.boundaryIndex` is populated with open/close ranges
317
+ * keyed on each subflow's entry event.
318
+ * When omitted (legacy / pre-5.1 footprintjs): both fields are 0 on
319
+ * every event; `boundaryIndex` exists but is empty. Phase 5 Layer 2.
320
+ */
321
+ readonly getCommitCount?: () => number;
322
+ }
323
+ /**
324
+ * Stripped projection used as the LABEL for the commit-range index.
325
+ * Intentionally OMITS `payload` (security panel review YELLOW #1):
326
+ * `boundaryIndex.enclosing()` queries should not bypass redaction by
327
+ * exposing raw scope payloads through the range index. Consumers
328
+ * needing payload can join on `runtimeStageId` with the full event
329
+ * stream via `getEvents()` (which IS subject to redaction policy).
330
+ */
331
+ export interface BoundaryRangeLabel {
332
+ readonly type: 'subflow.entry' | 'run.entry' | 'composition.start';
333
+ readonly runtimeStageId: string;
334
+ readonly subflowPath: readonly string[];
335
+ readonly depth: number;
336
+ readonly ts: number;
337
+ /** Set on subflow entries; undefined on the synthetic run-root entry. */
338
+ readonly subflowId?: string;
339
+ readonly localSubflowId?: string;
340
+ readonly subflowName?: string;
341
+ readonly description?: string;
342
+ readonly primitiveKind?: string;
343
+ readonly slotKind?: ContextSlot;
344
+ readonly isAgentInternal?: boolean;
345
+ /** Composition primitive (Parallel/Sequence/Loop/Conditional) when the
346
+ * range was opened by a `composition.start` event. */
347
+ readonly compositionKind?: 'Parallel' | 'Sequence' | 'Loop' | 'Conditional';
348
+ readonly compositionName?: string;
268
349
  }
269
350
  /** Factory — matches the `inOutRecorder()` / `topologyRecorder()` style. */
270
351
  export declare function boundaryRecorder(options?: BoundaryRecorderOptions): BoundaryRecorder;
@@ -273,12 +354,35 @@ export declare function boundaryRecorder(options?: BoundaryRecorderOptions): Bou
273
354
  * attach to the executor's FlowRecorder channel; exposes `subscribe()`
274
355
  * to wire to the agentfootprint typed-event dispatcher.
275
356
  *
276
- * Internally stores events in a `SequenceRecorder<DomainEvent>` so the
277
- * usual time-travel utilities (`getEntryRanges`, `accumulate`) work
278
- * out of the box.
357
+ * v5: composes a `SequenceStore<DomainEvent>` (storage) instead of
358
+ * extending the deprecated `SequenceRecorder<T>` base. Time-travel
359
+ * utilities (`getEntryRanges`, `accumulate`) are accessed through the
360
+ * store via the public read API on this class.
279
361
  */
280
- export declare class BoundaryRecorder extends SequenceRecorder<DomainEvent> implements CombinedRecorder {
362
+ export declare class BoundaryRecorder implements CombinedRecorder {
281
363
  readonly id: string;
364
+ /** Composition: storage shelf. */
365
+ private readonly store;
366
+ /**
367
+ * Phase 5 Layer 2 — interval index over commit indices, populated
368
+ * live as boundary entry/exit pairs fire. Consumers (Lens) read
369
+ * `enclosing(commitIdx)` for breadcrumbs and `overlapping(slice)`
370
+ * for time-range queries. Empty when `getCommitCount` is not
371
+ * injected. See `docs/design/boundary-commit-ranges.md`.
372
+ */
373
+ readonly boundaryIndex: CommitRangeIndex<BoundaryRangeLabel>;
374
+ /** Open-range tokens keyed by `runtimeStageId` so the matching exit
375
+ * can close the correct range. Pure side-table; cleared on runId
376
+ * reset. Not exposed externally. */
377
+ private readonly openTokens;
378
+ /** Live commit-count accessor injected by the runner. Sanitized
379
+ * (NaN/Infinity/negative → 0) before use. */
380
+ private readonly getCommitCount;
381
+ /** True when `getCommitCount` was explicitly injected. In LEGACY
382
+ * MODE (false), `boundaryIndex` is intentionally NOT populated —
383
+ * zero-width [0,0] ranges would mislead consumers querying the
384
+ * index. Multi-panel review flagged this footgun. */
385
+ private readonly hasCommitTracking;
282
386
  /**
283
387
  * Tracks whether the most recent `llm.end` had toolCalls. Used to
284
388
  * classify the NEXT `llm.start` as `'tool→llm'` (vs `'user→llm'` if
@@ -286,8 +390,58 @@ export declare class BoundaryRecorder extends SequenceRecorder<DomainEvent> impl
286
390
  * `llm.start` event after the classification is applied.
287
391
  */
288
392
  private prevLLMEndHadTools;
393
+ /**
394
+ * Run-boundary observer — fires resetForNewRun() when
395
+ * traversalContext.runId changes between events AND no boundary is
396
+ * currently open. The "no open boundary" gate distinguishes:
397
+ *
398
+ * - **Legitimate new run** — consumer reuses one recorder across
399
+ * sequential `executor.run()` calls. All prior boundaries closed
400
+ * before the second run began; openTokens is empty when the new
401
+ * runId arrives → safe to wipe state so the second run doesn't
402
+ * alias with the first.
403
+ * - **Composition sub-run** — primitives like `LLMCall`, `Sequence`,
404
+ * and `Parallel` internally spawn their own `FlowChartExecutor`
405
+ * instances. Each sub-executor mints a NEW runId. When that
406
+ * sub-executor fires events on the SHARED recorder, the recorder
407
+ * is still inside the parent run — `openTokens` is non-empty.
408
+ * Resetting here would wipe the parent's boundary index mid-run
409
+ * (the bug Layer 4 surfaced in agentfootprint-lens fanout).
410
+ *
411
+ * The `openTokens.size === 0` check is the cleanest semantic signal:
412
+ * if nothing is in-flight, a runId change means "the consumer started
413
+ * fresh"; if something is open, the new runId is from a sub-executor
414
+ * nested inside the still-ongoing parent.
415
+ */
416
+ private readonly runIdGuard;
289
417
  constructor(options?: BoundaryRecorderOptions);
418
+ /**
419
+ * Reset all transient state.
420
+ *
421
+ * **Composition-safe gate (Phase 5 Layer 4):** if `openTokens.size > 0`
422
+ * the call is a no-op. Rationale: `FlowChartExecutor.run()` calls
423
+ * `r.clear?.()` on every attached recorder during its pre-run loop.
424
+ * When agentfootprint composition primitives (LLMCall, Sequence,
425
+ * Parallel, etc.) propagate the parent's recorders to nested
426
+ * sub-executors, EACH sub-executor's pre-run clear loop calls
427
+ * `clear()` on the SHARED parent recorder mid-run — wiping live
428
+ * parent state. The `openTokens.size > 0` check distinguishes:
429
+ *
430
+ * - **Legitimate reset** — consumer or executor calls `clear()`
431
+ * when no boundary is in-flight (`openTokens` empty). Safe to
432
+ * wipe; the recorder is idle.
433
+ * - **Composition wipe** — sub-executor's pre-run clear fires
434
+ * while the parent has open boundaries (`openTokens` non-empty).
435
+ * Skip the wipe; the parent's state must be preserved.
436
+ *
437
+ * If a consumer needs to forcibly wipe state even with open tokens
438
+ * (e.g., manual recovery after a crashed run), pair `clear()` with
439
+ * an explicit `forceClear()` (TODO — add when the use case shows up;
440
+ * today the recorder lifecycle pattern is "one recorder per logical
441
+ * run" so leaked tokens shouldn't occur).
442
+ */
290
443
  clear(): void;
444
+ private observeRunId;
291
445
  onRunStart(event: FlowRunEvent): void;
292
446
  onRunEnd(event: FlowRunEvent): void;
293
447
  onSubflowEntry(event: FlowSubflowEvent): void;
@@ -1 +1 @@
1
- {"version":3,"file":"BoundaryRecorder.d.ts","sourceRoot":"","sources":["../../../../src/recorders/observability/BoundaryRecorder.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA4EG;AAEH,OAAO,EAA0C,gBAAgB,EAAE,MAAM,mBAAmB,CAAC;AAC7F,OAAO,KAAK,EACV,gBAAgB,EAChB,iBAAiB,EACjB,aAAa,EACb,aAAa,EACb,gBAAgB,EAChB,gBAAgB,EACjB,MAAM,aAAa,CAAC;AAMrB,UAAU,YAAY;IACpB,QAAQ,CAAC,OAAO,CAAC,EAAE,OAAO,CAAC;IAC3B,QAAQ,CAAC,gBAAgB,CAAC,EAAE,gBAAgB,CAAC;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CAAC,QAAQ,EAAE,gBAAgB,GAAG,SAAS,CA0TpE"}
@@ -60,7 +60,6 @@
60
60
  * llm.getActive(rid)?.tokens; // tokens accumulated for one call
61
61
  * ```
62
62
  */
63
- import { BoundaryStateTracker } from 'footprintjs/trace';
64
63
  import type { Unsubscribe } from '../../events/dispatcher.js';
65
64
  import type { AgentfootprintEvent, AgentfootprintEventType } from '../../events/registry.js';
66
65
  /** Minimal Runner shape this recorder needs — only the public `on(...)`
@@ -110,12 +109,27 @@ export interface AgentTurnLiveState {
110
109
  * calls (Parallel composition with multiple branches) get distinct
111
110
  * keys and are tracked independently.
112
111
  */
113
- export declare class LiveLLMTracker extends BoundaryStateTracker<LLMLiveState> {
112
+ export declare class LiveLLMTracker {
114
113
  readonly id = "live-llm";
114
+ /** Composition: bracket-scoped storage primitive. */
115
+ private readonly store;
116
+ /** Wipes the store when a fresh run reuses identical runtimeStageId keys. */
117
+ private readonly runIdGuard;
118
+ private observeRunId;
115
119
  /** Subscribe to a runner's dispatcher. Returns an Unsubscribe. */
116
120
  subscribe(runner: LiveStateRunnerLike): Unsubscribe;
117
- /** True if any LLM call is currently in flight. Same as `hasActive`. */
121
+ /** Reset all transient state. Called by `LiveStateRecorder.clear()`. */
122
+ clear(): void;
123
+ /** True if any LLM call is currently in flight. */
118
124
  isInFlight(): boolean;
125
+ /** Same as `store.hasActive` — exposed for parity with the v4 API. */
126
+ get hasActive(): boolean;
127
+ /** Number of currently-active boundaries. */
128
+ get activeCount(): number;
129
+ /** Currently-active boundary state for one runtimeStageId. */
130
+ getActive(runtimeStageId: string): LLMLiveState | undefined;
131
+ /** All currently-active boundaries. */
132
+ getAllActive(): ReadonlyMap<string, LLMLiveState>;
119
133
  /** Accumulated partial content of the MOST RECENTLY started active
120
134
  * LLM call. Empty string when no call is active. Useful for the
121
135
  * classic "Chatbot is responding: …" live commentary line. */
@@ -129,11 +143,19 @@ export declare class LiveLLMTracker extends BoundaryStateTracker<LLMLiveState> {
129
143
  * Boundary key: `toolCallId` (more granular than `runtimeStageId` —
130
144
  * parallel tools share one calling stage but have distinct toolCallIds).
131
145
  */
132
- export declare class LiveToolTracker extends BoundaryStateTracker<ToolLiveState> {
146
+ export declare class LiveToolTracker {
133
147
  readonly id = "live-tool";
148
+ private readonly store;
149
+ private readonly runIdGuard;
150
+ private observeRunId;
134
151
  subscribe(runner: LiveStateRunnerLike): Unsubscribe;
152
+ clear(): void;
135
153
  /** True if any tool is currently executing. */
136
154
  isExecuting(): boolean;
155
+ get hasActive(): boolean;
156
+ get activeCount(): number;
157
+ getActive(toolCallId: string): ToolLiveState | undefined;
158
+ getAllActive(): ReadonlyMap<string, ToolLiveState>;
137
159
  /** Names of tools currently executing. Empty when none. */
138
160
  getExecutingToolNames(): readonly string[];
139
161
  }
@@ -145,11 +167,19 @@ export declare class LiveToolTracker extends BoundaryStateTracker<ToolLiveState>
145
167
  * Boundary key: stringified `turnIndex` from the payload — survives
146
168
  * across runner instances because turnIndex resets per-session.
147
169
  */
148
- export declare class LiveAgentTurnTracker extends BoundaryStateTracker<AgentTurnLiveState> {
170
+ export declare class LiveAgentTurnTracker {
149
171
  readonly id = "live-agent-turn";
172
+ private readonly store;
173
+ private readonly runIdGuard;
174
+ private observeRunId;
150
175
  subscribe(runner: LiveStateRunnerLike): Unsubscribe;
176
+ clear(): void;
151
177
  /** True if the agent is currently inside a turn. */
152
178
  isInTurn(): boolean;
179
+ get hasActive(): boolean;
180
+ get activeCount(): number;
181
+ getActive(turnIndex: string): AgentTurnLiveState | undefined;
182
+ getAllActive(): ReadonlyMap<string, AgentTurnLiveState>;
153
183
  /** Index of the most-recently started active turn (-1 if none). */
154
184
  getCurrentTurnIndex(): number;
155
185
  }
@@ -189,7 +219,13 @@ export declare class LiveStateRecorder {
189
219
  constructor();
190
220
  /** Subscribe all three trackers to one runner. Idempotent — calling
191
221
  * twice on the same recorder unsubscribes the prior subscription
192
- * first to avoid double-counting. */
222
+ * first to avoid double-counting.
223
+ *
224
+ * Adds a wildcard `*` listener that observes runId on EVERY event
225
+ * (regardless of which tracker subscribes to it) and calls
226
+ * `clear()` on all three trackers when the runId changes. This
227
+ * closes the gap where a tracker that never saw events in run 1
228
+ * would fail to reset in run 2. */
193
229
  subscribe(runner: LiveStateRunnerLike): Unsubscribe;
194
230
  /** Detach all three trackers from the current runner. Idempotent. */
195
231
  unsubscribe(): void;
@@ -1 +1 @@
1
- {"version":3,"file":"LiveStateRecorder.d.ts","sourceRoot":"","sources":["../../../../src/recorders/observability/LiveStateRecorder.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA6DG;AAEH,OAAO,EAAE,oBAAoB,EAAE,MAAM,mBAAmB,CAAC;AACzD,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,4BAA4B,CAAC;AAC9D,OAAO,KAAK,EAAE,mBAAmB,EAAE,uBAAuB,EAAE,MAAM,0BAA0B,CAAC;AAE7F;;;2BAG2B;AAC3B,MAAM,WAAW,mBAAmB;IAClC,EAAE,CAAC,CAAC,SAAS,uBAAuB,EAClC,IAAI,EAAE,CAAC,EACP,QAAQ,EAAE,CAAC,KAAK,EAAE,OAAO,CAAC,mBAAmB,EAAE;QAAE,IAAI,EAAE,CAAC,CAAA;KAAE,CAAC,KAAK,IAAI,GACnE,WAAW,CAAC;CAChB;AAID,sDAAsD;AACtD,MAAM,WAAW,YAAY;IAC3B,wEAAwE;IACxE,QAAQ,CAAC,OAAO,EAAE,MAAM,CAAC;IACzB,wCAAwC;IACxC,QAAQ,CAAC,MAAM,EAAE,MAAM,CAAC;IACxB,kDAAkD;IAClD,QAAQ,CAAC,SAAS,EAAE,MAAM,CAAC;IAC3B,mDAAmD;IACnD,QAAQ,CAAC,QAAQ,EAAE,MAAM,CAAC;IAC1B,gBAAgB;IAChB,QAAQ,CAAC,KAAK,EAAE,MAAM,CAAC;IACvB,0CAA0C;IAC1C,QAAQ,CAAC,WAAW,EA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oDAAoD;IACpD,QAAQ,IAAI,OAAO;IAInB,IAAI,SAAS,IAAI,OAAO,CAEvB;IAED,IAAI,WAAW,IAAI,MAAM,CAExB;IAED,SAAS,CAAC,SAAS,EAAE,MAAM,GAAG,kBAAkB,GAAG,SAAS;IAI5D,YAAY,IAAI,WAAW,CAAC,MAAM,EAAE,kBAAkB,CAAC;IAIvD,mEAAmE;IACnE,mBAAmB,IAAI,MAAM;CAY9B;AAID;;;;;;;;;;;;;;;;;;;;;;GAsBG;AACH,qBAAa,iBAAiB;IAC5B,QAAQ,CAAC,EAAE,gBAAgB;IAE3B,2BAA2B;IAC3B,QAAQ,CAAC,GAAG,EAAE,cAAc,CAAC;IAC7B,iCAAiC;IACjC,QAAQ,CAAC,IAAI,EAAE,eAAe,CAAC;IAC/B,6BAA6B;IAC7B,QAAQ,CAAC,IAAI,EAAE,oBAAoB,CAAC;IAEpC,gEAAgE;IAChE,OAAO,CAAC,MAAM,CAA0B;;IAQxC;;;;;;;;wCAQoC;IACpC,SAAS,CAAC,MAAM,EAAE,mBAAmB,GAAG,WAAW;IAkBnD,qEAAqE;IACrE,WAAW,IAAI,IAAI;IAOnB;4CACwC;IACxC,KAAK,IAAI,IAAI;IAQb,mDAAmD;IACnD,aAAa,IAAI,OAAO;IAIxB,yEAAyE;IACzE,aAAa,IAAI,MAAM;IAIvB,+CAA+C;IAC/C,eAAe,IAAI,OAAO;IAI1B,0CAA0C;IAC1C,qBAAqB,IAAI,SAAS,MAAM,EAAE;IAI1C,oDAAoD;IACpD,aAAa,IAAI,OAAO;IAIxB,gDAAgD;IAChD,mBAAmB,IAAI,MAAM;CAG9B;AAED;+DAC+D;AAC/D,wBAAgB,iBAAiB,IAAI,iBAAiB,CAErD"}
@@ -0,0 +1,232 @@
1
+ /**
2
+ * RunStepRecorder — slider-ready ordered list of RunSteps, BUILT
3
+ * INCREMENTALLY during traversal. Real-time recorder, not a walker.
4
+ *
5
+ * Pattern: extends `SequenceRecorder<RunStep>` (shared storage shelf)
6
+ * and implements `CombinedRecorder` (FlowRecorder hooks).
7
+ * Subscribes to the agentfootprint typed-event dispatcher
8
+ * for actor-arrow events. Each event handler decides whether
9
+ * to emit a step; state lives on the instance and persists
10
+ * across the run.
11
+ * Role: The single source of truth for "what slider positions
12
+ * exist in this run, and what transitions does each light
13
+ * up." Lens consumers attach the recorder once and read
14
+ * `getSteps()` — no per-render re-derivation.
15
+ *
16
+ * Why this matters: the older `buildRunSteps(events)` walker violated
17
+ * footprintjs's core principle ("collect during traversal, never
18
+ * post-process"). Each call walked the full event log multiple times;
19
+ * the playground triggered a full walk on every flowchart update,
20
+ * yielding O(N²) total work for a streaming run. The recorder pattern
21
+ * is O(N) — one handler call per event — and matches BoundaryRecorder /
22
+ * FlowchartRecorder / KeyedRecorder idioms throughout the library.
23
+ *
24
+ * The `buildRunSteps(...)` function is RETAINED as a thin compatibility
25
+ * shim that constructs a fresh recorder, replays events through it,
26
+ * and returns the resulting entries. Useful for snapshot-from-saved-
27
+ * events use cases (replay, testing, post-hoc analysis). Live consumers
28
+ * should attach the recorder directly via `runner.attach(rec)`.
29
+ */
30
+ import type { CombinedRecorder, FlowDecisionEvent, FlowForkEvent, FlowLoopEvent, FlowSubflowEvent, TraversalContext } from 'footprintjs';
31
+ interface FlowRunEvent {
32
+ readonly payload?: unknown;
33
+ readonly traversalContext?: TraversalContext;
34
+ }
35
+ import type { AgentfootprintEvent } from '../../events/registry.js';
36
+ import type { EventDispatcher, Unsubscribe } from '../../events/dispatcher.js';
37
+ import type { BoundaryRecorder, DomainEvent } from './BoundaryRecorder.js';
38
+ /**
39
+ * One slider position. The smallest scrubable unit of the run.
40
+ *
41
+ * `transitions` is 1+ — fan-out / merge steps light up multiple
42
+ * transitions at once; sequential / decide / react steps light up
43
+ * exactly one. Renderers iterate `transitions` to highlight edges;
44
+ * details panels read `anchor.runtimeStageId`.
45
+ */
46
+ export interface RunStep {
47
+ /** 0-based slider index (matches array position in `getSteps()`). */
48
+ readonly seq: number;
49
+ readonly kind: RunStepKind;
50
+ readonly transitions: readonly RunStepTransition[];
51
+ /**
52
+ * Per-step key — required by `SequenceRecorder<T>` for time-travel
53
+ * utilities (`getEntriesForStep`, `getEntryRanges`). Mirrors
54
+ * `anchor.runtimeStageId`; both fields point at the same value.
55
+ * Top-level placement satisfies the recorder's storage contract.
56
+ */
57
+ readonly runtimeStageId: string;
58
+ /** Anchor for commentary highlight + details pane lookup. */
59
+ readonly anchor: {
60
+ readonly runtimeStageId: string;
61
+ readonly subflowPath: readonly string[];
62
+ };
63
+ /** Human label — short, kind-specific. */
64
+ readonly label: string;
65
+ /** Wall-clock ms at which this step occurred. */
66
+ readonly tsMs: number;
67
+ /** Kind-specific decoration. Discriminate on `kind`. */
68
+ readonly meta?: RunStepMeta;
69
+ }
70
+ export type RunStepKind = 'sequential' | 'fork' | 'merge' | 'decide' | 'iteration' | 'iteration-exit' | 'react';
71
+ export interface RunStepTransition {
72
+ readonly from: string;
73
+ readonly to: string;
74
+ readonly via: 'next' | 'fork-branch' | 'decision-branch' | 'loop-iteration' | 'actor-arrow';
75
+ readonly label?: string;
76
+ }
77
+ export type RunStepMeta = {
78
+ readonly kind: 'decide';
79
+ readonly chosen: string;
80
+ readonly rationale?: string;
81
+ } | {
82
+ readonly kind: 'iteration';
83
+ readonly index: number;
84
+ readonly target: string;
85
+ } | {
86
+ readonly kind: 'iteration-exit';
87
+ readonly index: number;
88
+ readonly reason?: string;
89
+ } | {
90
+ readonly kind: 'fork';
91
+ readonly parentSubflowId: string;
92
+ } | {
93
+ readonly kind: 'merge';
94
+ readonly mergedCount: number;
95
+ } | {
96
+ readonly kind: 'react';
97
+ readonly actorArrow: 'user→llm' | 'tool→llm' | 'llm→tool' | 'llm→user';
98
+ };
99
+ export interface RunStepRecorderOptions {
100
+ readonly id?: string;
101
+ }
102
+ /** Factory — matches the `boundaryRecorder()` / `topologyRecorder()` style. */
103
+ export declare function runStepRecorder(options?: RunStepRecorderOptions): RunStepRecorder;
104
+ /**
105
+ * Real-time slider-step recorder. Emits a `RunStep` whenever an event
106
+ * marks a meaningful slider transition. State persists on the instance
107
+ * so successive events update bookkeeping in O(1).
108
+ *
109
+ * Attach via `runner.attach(rec)` for FlowRecorder events; call
110
+ * `rec.subscribe(runner.dispatcher)` for actor-arrow events. The
111
+ * `getSteps(drillPath?)` method returns the already-built list (no
112
+ * walking) with optional drill-scope filtering.
113
+ */
114
+ export declare class RunStepRecorder implements CombinedRecorder {
115
+ readonly id: string;
116
+ /** Composition: storage shelf for the slider-step sequence. */
117
+ private readonly store;
118
+ /** Run-boundary observer — fires this.clear() when traversalContext.runId
119
+ * changes between events. THIS IS THE FIX for the Parallel multi-run
120
+ * aliasing bug — without it `forkKey = ${parent}@${rid}` collides
121
+ * because rid resets to `seed#0` on each run. */
122
+ private readonly runIdGuard;
123
+ /** Stack of currently-open boundaries. The recorder owns this
124
+ * directly because it's a simple stack and frames are recorder-
125
+ * shaped. */
126
+ private boundaryStack;
127
+ /** Fork-emission coalescing + branch-exit tally. */
128
+ private readonly forks;
129
+ /** Tracks the most-recent leaf exit per depth → "forwards" handoff. */
130
+ private readonly siblings;
131
+ /** Buffers a "this MIGHT be the answer" leaf until onRunEnd. */
132
+ private readonly answerBuffer;
133
+ /** Run-root inference state machine (leaf vs composition). */
134
+ private readonly rootInferrer;
135
+ /** llm.start / llm.end actor-arrow classifier. */
136
+ private readonly actorArrows;
137
+ /** Has the first `asks` step fired? */
138
+ private asksEmitted;
139
+ constructor(options?: RunStepRecorderOptions);
140
+ /**
141
+ * Emit a RunStep, auto-mirroring `anchor.runtimeStageId` to the
142
+ * top-level `runtimeStageId` field that the keyed index uses. Single
143
+ * source of truth (the anchor) — never inconsistent with the storage
144
+ * key.
145
+ */
146
+ private push;
147
+ /** Internal seq-numbering helper — mirrors the store size so each
148
+ * RunStep gets a unique 0-based index in emit order. */
149
+ private get entryCount();
150
+ clear(): void;
151
+ /** Internal — wipe all per-run state WITHOUT resetting the runIdGuard
152
+ * itself. Called by `clear()` (which then resets the guard) AND by
153
+ * the runIdGuard's onNewRun callback (where the guard is mid-update
154
+ * and must NOT be reset, only the recorder's data should be).
155
+ *
156
+ * Note: each sub-tracker owns its OWN clear; the orchestrator just
157
+ * fans out. Adding new state to a sub-tracker requires no edit here. */
158
+ private resetForNewRun;
159
+ private observeRunId;
160
+ onRunStart(event: FlowRunEvent): void;
161
+ onRunEnd(event: FlowRunEvent): void;
162
+ onSubflowEntry(event: FlowSubflowEvent): void;
163
+ onSubflowExit(event: FlowSubflowEvent): void;
164
+ onFork(event: FlowForkEvent): void;
165
+ onDecision(event: FlowDecisionEvent): void;
166
+ onLoop(event: FlowLoopEvent): void;
167
+ /**
168
+ * Subscribe to the runner's typed-event dispatcher and emit a
169
+ * `react` RunStep on every `llm.start` / `llm.end`. The recorder
170
+ * classifies `actorArrow` locally (mirrors BoundaryRecorder's
171
+ * pattern) so consumers don't have to depend on BoundaryRecorder's
172
+ * own subscription order.
173
+ */
174
+ subscribe(dispatcher: EventDispatcher): Unsubscribe;
175
+ /** Internal — also called by `ingestDomainEvent` for shim replay.
176
+ *
177
+ * NOTE: deliberately does NOT call observeRunId(event.meta.runId).
178
+ * The agentfootprint dispatcher's runId is a DIFFERENT generator
179
+ * than footprintjs's traversalContext.runId — mixing them would
180
+ * toggle lastRunId on every event and trigger a false reset.
181
+ * Run-boundary detection happens reliably on the FlowRecorder side
182
+ * (onRunStart fires FIRST in any new run before any typed event). */
183
+ protected ingestTypedEvent(event: AgentfootprintEvent): void;
184
+ /**
185
+ * Feed a single recorded `DomainEvent` (from BoundaryRecorder) into
186
+ * this recorder as if it had fired live. Used by `buildRunSteps`
187
+ * for snapshot replay; tests use it for fixture-driven projection.
188
+ *
189
+ * Live consumers should use `runner.attach(rec)` +
190
+ * `rec.subscribe(dispatcher)` instead — the recorder's hooks fire
191
+ * naturally during traversal.
192
+ */
193
+ ingestDomainEvent(e: DomainEvent): void;
194
+ /**
195
+ * Read-only query — returns the already-built step list filtered to
196
+ * `drillPath` scope. O(1) per call when scope is empty; O(N) filter
197
+ * otherwise. Composition-vs-leaf root filter is applied so the
198
+ * slider semantics match the user's mental model:
199
+ *
200
+ * - **Leaf root** (single Agent / LLMCall): show `react` steps only.
201
+ * - **Composition root** (Sequence / Parallel / Conditional / Loop):
202
+ * show composition steps; hide intra-leaf `react` steps.
203
+ *
204
+ * Drill-down filters by `anchor.subflowPath` prefix and re-applies
205
+ * the leaf-vs-composition rule for the drilled scope.
206
+ */
207
+ getSteps(drillPath?: readonly string[]): readonly RunStep[];
208
+ /** Flush any deferred answer-candidate from the buffer. Called by
209
+ * `onRunEnd` so a single `answers` step appears for runs that end
210
+ * on a leaf exit (no further leaf entries followed). */
211
+ private flushCandidateAnswer;
212
+ }
213
+ export interface RunStepGraph {
214
+ readonly steps: readonly RunStep[];
215
+ }
216
+ export interface BuildRunStepsOptions {
217
+ readonly drillPath?: readonly string[];
218
+ }
219
+ /**
220
+ * Compatibility shim for snapshot-from-events use cases (replay,
221
+ * post-hoc analysis, tests). For LIVE use, prefer attaching a
222
+ * `RunStepRecorder` directly via `runner.attach(rec)` —
223
+ * `buildRunSteps(events)` constructs a fresh recorder, replays the
224
+ * events through its handlers, and returns the resulting entries.
225
+ *
226
+ * @deprecated Prefer `runStepRecorder()` + `runner.attach(rec)` for
227
+ * live consumers. This shim remains for offline / testing
228
+ * scenarios where only a recorded event list is available.
229
+ */
230
+ export declare function buildRunSteps(source: BoundaryRecorder | readonly DomainEvent[], options?: BuildRunStepsOptions): RunStep[];
231
+ export {};
232
+ //# sourceMappingURL=RunStepRecorder.d.ts.map