agentfootprint 2.14.5 → 3.1.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.
- package/README.md +1 -1
- package/dist/cache/CacheDecisionSubflow.js +13 -16
- package/dist/cache/CacheDecisionSubflow.js.map +1 -1
- package/dist/cache/CacheGateDecider.js +18 -3
- package/dist/cache/CacheGateDecider.js.map +1 -1
- package/dist/cache/cacheRecorder.js +12 -3
- package/dist/cache/cacheRecorder.js.map +1 -1
- package/dist/conventions.js +155 -4
- package/dist/conventions.js.map +1 -1
- package/dist/core/Agent.js +115 -32
- package/dist/core/Agent.js.map +1 -1
- package/dist/core/LLMCall.js +213 -41
- package/dist/core/LLMCall.js.map +1 -1
- package/dist/core/RunnerBase.js +187 -0
- package/dist/core/RunnerBase.js.map +1 -1
- package/dist/core/agent/buildAgentChart.js +127 -48
- package/dist/core/agent/buildAgentChart.js.map +1 -1
- package/dist/core/agent/buildAgentMessageApiChart.js +201 -0
- package/dist/core/agent/buildAgentMessageApiChart.js.map +1 -0
- package/dist/core/agent/buildCacheSubflow.js +62 -0
- package/dist/core/agent/buildCacheSubflow.js.map +1 -0
- package/dist/core/agent/buildDynamicAgentChart.js +364 -0
- package/dist/core/agent/buildDynamicAgentChart.js.map +1 -0
- package/dist/core/agent/buildMessageApiChart.js +154 -0
- package/dist/core/agent/buildMessageApiChart.js.map +1 -0
- package/dist/core/agent/stages/callLLM.js +11 -0
- package/dist/core/agent/stages/callLLM.js.map +1 -1
- package/dist/core/agent/stages/reliabilityExecution.js +64 -9
- package/dist/core/agent/stages/reliabilityExecution.js.map +1 -1
- package/dist/core/humanizeLLMError.js +66 -0
- package/dist/core/humanizeLLMError.js.map +1 -0
- package/dist/core/runner.js +4 -3
- package/dist/core/runner.js.map +1 -1
- package/dist/core/slots/buildMessagesSlot.js +2 -2
- package/dist/core/slots/buildMessagesSlot.js.map +1 -1
- package/dist/core/slots/buildSystemPromptSlot.js +1 -1
- package/dist/core/slots/buildSystemPromptSlot.js.map +1 -1
- package/dist/core/slots/buildThinkingSubflow.js +1 -1
- package/dist/core/slots/buildThinkingSubflow.js.map +1 -1
- package/dist/core/slots/buildToolsSlot.js +3 -1
- package/dist/core/slots/buildToolsSlot.js.map +1 -1
- package/dist/core/translator.js +32 -0
- package/dist/core/translator.js.map +1 -0
- package/dist/core-flow/Conditional.js +72 -10
- package/dist/core-flow/Conditional.js.map +1 -1
- package/dist/core-flow/Loop.js +59 -16
- package/dist/core-flow/Loop.js.map +1 -1
- package/dist/core-flow/Parallel.js +239 -92
- package/dist/core-flow/Parallel.js.map +1 -1
- package/dist/core-flow/Sequence.js +50 -8
- package/dist/core-flow/Sequence.js.map +1 -1
- package/dist/esm/cache/CacheDecisionSubflow.js +11 -15
- package/dist/esm/cache/CacheDecisionSubflow.js.map +1 -1
- package/dist/esm/cache/CacheGateDecider.js +18 -3
- package/dist/esm/cache/CacheGateDecider.js.map +1 -1
- package/dist/esm/cache/cacheRecorder.js +12 -3
- package/dist/esm/cache/cacheRecorder.js.map +1 -1
- package/dist/esm/conventions.js +151 -3
- package/dist/esm/conventions.js.map +1 -1
- package/dist/esm/core/Agent.js +116 -33
- package/dist/esm/core/Agent.js.map +1 -1
- package/dist/esm/core/LLMCall.js +213 -41
- package/dist/esm/core/LLMCall.js.map +1 -1
- package/dist/esm/core/RunnerBase.js +187 -0
- package/dist/esm/core/RunnerBase.js.map +1 -1
- package/dist/esm/core/agent/buildAgentChart.js +128 -49
- package/dist/esm/core/agent/buildAgentChart.js.map +1 -1
- package/dist/esm/core/agent/buildAgentMessageApiChart.js +197 -0
- package/dist/esm/core/agent/buildAgentMessageApiChart.js.map +1 -0
- package/dist/esm/core/agent/buildCacheSubflow.js +58 -0
- package/dist/esm/core/agent/buildCacheSubflow.js.map +1 -0
- package/dist/esm/core/agent/buildDynamicAgentChart.js +360 -0
- package/dist/esm/core/agent/buildDynamicAgentChart.js.map +1 -0
- package/dist/esm/core/agent/buildMessageApiChart.js +150 -0
- package/dist/esm/core/agent/buildMessageApiChart.js.map +1 -0
- package/dist/esm/core/agent/stages/callLLM.js +11 -0
- package/dist/esm/core/agent/stages/callLLM.js.map +1 -1
- package/dist/esm/core/agent/stages/reliabilityExecution.js +64 -9
- package/dist/esm/core/agent/stages/reliabilityExecution.js.map +1 -1
- package/dist/esm/core/humanizeLLMError.js +61 -0
- package/dist/esm/core/humanizeLLMError.js.map +1 -0
- package/dist/esm/core/runner.js +4 -3
- package/dist/esm/core/runner.js.map +1 -1
- package/dist/esm/core/slots/buildMessagesSlot.js +2 -2
- package/dist/esm/core/slots/buildMessagesSlot.js.map +1 -1
- package/dist/esm/core/slots/buildSystemPromptSlot.js +1 -1
- package/dist/esm/core/slots/buildSystemPromptSlot.js.map +1 -1
- package/dist/esm/core/slots/buildThinkingSubflow.js +1 -1
- package/dist/esm/core/slots/buildThinkingSubflow.js.map +1 -1
- package/dist/esm/core/slots/buildToolsSlot.js +3 -1
- package/dist/esm/core/slots/buildToolsSlot.js.map +1 -1
- package/dist/esm/core/translator.js +31 -0
- package/dist/esm/core/translator.js.map +1 -0
- package/dist/esm/core-flow/Conditional.js +72 -10
- package/dist/esm/core-flow/Conditional.js.map +1 -1
- package/dist/esm/core-flow/Loop.js +59 -16
- package/dist/esm/core-flow/Loop.js.map +1 -1
- package/dist/esm/core-flow/Parallel.js +240 -93
- package/dist/esm/core-flow/Parallel.js.map +1 -1
- package/dist/esm/core-flow/Sequence.js +50 -8
- package/dist/esm/core-flow/Sequence.js.map +1 -1
- package/dist/esm/events/registry.js +10 -0
- package/dist/esm/events/registry.js.map +1 -1
- package/dist/esm/index.js +22 -1
- package/dist/esm/index.js.map +1 -1
- package/dist/esm/lib/injection-engine/buildInjectionEngineSubflow.js +16 -9
- package/dist/esm/lib/injection-engine/buildInjectionEngineSubflow.js.map +1 -1
- package/dist/esm/memory/causal/snapshotPipeline.js +6 -2
- package/dist/esm/memory/causal/snapshotPipeline.js.map +1 -1
- package/dist/esm/memory/pipeline/auto.js +2 -2
- package/dist/esm/memory/pipeline/auto.js.map +1 -1
- package/dist/esm/memory/pipeline/default.js +4 -2
- package/dist/esm/memory/pipeline/default.js.map +1 -1
- package/dist/esm/memory/pipeline/ephemeral.js +3 -1
- package/dist/esm/memory/pipeline/ephemeral.js.map +1 -1
- package/dist/esm/memory/pipeline/fact.js +4 -2
- package/dist/esm/memory/pipeline/fact.js.map +1 -1
- package/dist/esm/memory/pipeline/narrative.js +4 -2
- package/dist/esm/memory/pipeline/narrative.js.map +1 -1
- package/dist/esm/memory/pipeline/semantic.js +2 -2
- package/dist/esm/memory/pipeline/semantic.js.map +1 -1
- package/dist/esm/observe.js +1 -1
- package/dist/esm/observe.js.map +1 -1
- package/dist/esm/patterns/MapReduce.js +5 -5
- package/dist/esm/patterns/MapReduce.js.map +1 -1
- package/dist/esm/patterns/Swarm.js +1 -1
- package/dist/esm/patterns/Swarm.js.map +1 -1
- package/dist/esm/recorders/core/ContextEvaluatedRecorder.js +31 -0
- package/dist/esm/recorders/core/ContextEvaluatedRecorder.js.map +1 -0
- package/dist/esm/recorders/core/ContextRecorder.js +12 -14
- package/dist/esm/recorders/core/ContextRecorder.js.map +1 -1
- package/dist/esm/recorders/core/ErrorBridge.js +59 -0
- package/dist/esm/recorders/core/ErrorBridge.js.map +1 -0
- package/dist/esm/recorders/core/ReliabilityRecorder.js +29 -0
- package/dist/esm/recorders/core/ReliabilityRecorder.js.map +1 -0
- package/dist/esm/recorders/observability/BoundaryRecorder.js +338 -36
- package/dist/esm/recorders/observability/BoundaryRecorder.js.map +1 -1
- package/dist/esm/recorders/observability/FlowchartRecorder.js +10 -0
- package/dist/esm/recorders/observability/FlowchartRecorder.js.map +1 -1
- package/dist/esm/recorders/observability/LiveStateRecorder.js +120 -21
- package/dist/esm/recorders/observability/LiveStateRecorder.js.map +1 -1
- package/dist/esm/recorders/observability/RunStepRecorder.js +652 -0
- package/dist/esm/recorders/observability/RunStepRecorder.js.map +1 -0
- package/dist/esm/recorders/observability/commentary/commentaryTemplates.js +1 -0
- package/dist/esm/recorders/observability/commentary/commentaryTemplates.js.map +1 -1
- package/dist/esm/recorders/observability/internal/ActorArrowClassifier.js +34 -0
- package/dist/esm/recorders/observability/internal/ActorArrowClassifier.js.map +1 -0
- package/dist/esm/recorders/observability/internal/CandidateAnswerBuffer.js +32 -0
- package/dist/esm/recorders/observability/internal/CandidateAnswerBuffer.js.map +1 -0
- package/dist/esm/recorders/observability/internal/ForkTracker.js +84 -0
- package/dist/esm/recorders/observability/internal/ForkTracker.js.map +1 -0
- package/dist/esm/recorders/observability/internal/RootInferrer.js +114 -0
- package/dist/esm/recorders/observability/internal/RootInferrer.js.map +1 -0
- package/dist/esm/recorders/observability/internal/SequenceSiblingTracker.js +31 -0
- package/dist/esm/recorders/observability/internal/SequenceSiblingTracker.js.map +1 -0
- package/dist/esm/recorders/observability/observeRunId.js +21 -0
- package/dist/esm/recorders/observability/observeRunId.js.map +1 -0
- package/dist/esm/reliability/buildReliabilityGateChart.js +11 -5
- package/dist/esm/reliability/buildReliabilityGateChart.js.map +1 -1
- package/dist/events/registry.js +10 -0
- package/dist/events/registry.js.map +1 -1
- package/dist/index.js +30 -3
- package/dist/index.js.map +1 -1
- package/dist/lib/injection-engine/buildInjectionEngineSubflow.js +16 -9
- package/dist/lib/injection-engine/buildInjectionEngineSubflow.js.map +1 -1
- package/dist/memory/causal/snapshotPipeline.js +6 -2
- package/dist/memory/causal/snapshotPipeline.js.map +1 -1
- package/dist/memory/pipeline/auto.js +2 -2
- package/dist/memory/pipeline/auto.js.map +1 -1
- package/dist/memory/pipeline/default.js +4 -2
- package/dist/memory/pipeline/default.js.map +1 -1
- package/dist/memory/pipeline/ephemeral.js +3 -1
- package/dist/memory/pipeline/ephemeral.js.map +1 -1
- package/dist/memory/pipeline/fact.js +4 -2
- package/dist/memory/pipeline/fact.js.map +1 -1
- package/dist/memory/pipeline/narrative.js +4 -2
- package/dist/memory/pipeline/narrative.js.map +1 -1
- package/dist/memory/pipeline/semantic.js +2 -2
- package/dist/memory/pipeline/semantic.js.map +1 -1
- package/dist/observe.js +1 -1
- package/dist/observe.js.map +1 -1
- package/dist/patterns/MapReduce.js +5 -5
- package/dist/patterns/MapReduce.js.map +1 -1
- package/dist/patterns/Swarm.js +1 -1
- package/dist/patterns/Swarm.js.map +1 -1
- package/dist/recorders/core/ContextEvaluatedRecorder.js +35 -0
- package/dist/recorders/core/ContextEvaluatedRecorder.js.map +1 -0
- package/dist/recorders/core/ContextRecorder.js +11 -13
- package/dist/recorders/core/ContextRecorder.js.map +1 -1
- package/dist/recorders/core/ErrorBridge.js +64 -0
- package/dist/recorders/core/ErrorBridge.js.map +1 -0
- package/dist/recorders/core/ReliabilityRecorder.js +33 -0
- package/dist/recorders/core/ReliabilityRecorder.js.map +1 -0
- package/dist/recorders/observability/BoundaryRecorder.js +337 -35
- package/dist/recorders/observability/BoundaryRecorder.js.map +1 -1
- package/dist/recorders/observability/FlowchartRecorder.js +10 -0
- package/dist/recorders/observability/FlowchartRecorder.js.map +1 -1
- package/dist/recorders/observability/LiveStateRecorder.js +119 -20
- package/dist/recorders/observability/LiveStateRecorder.js.map +1 -1
- package/dist/recorders/observability/RunStepRecorder.js +658 -0
- package/dist/recorders/observability/RunStepRecorder.js.map +1 -0
- package/dist/recorders/observability/commentary/commentaryTemplates.js +1 -0
- package/dist/recorders/observability/commentary/commentaryTemplates.js.map +1 -1
- package/dist/recorders/observability/internal/ActorArrowClassifier.js +38 -0
- package/dist/recorders/observability/internal/ActorArrowClassifier.js.map +1 -0
- package/dist/recorders/observability/internal/CandidateAnswerBuffer.js +36 -0
- package/dist/recorders/observability/internal/CandidateAnswerBuffer.js.map +1 -0
- package/dist/recorders/observability/internal/ForkTracker.js +88 -0
- package/dist/recorders/observability/internal/ForkTracker.js.map +1 -0
- package/dist/recorders/observability/internal/RootInferrer.js +118 -0
- package/dist/recorders/observability/internal/RootInferrer.js.map +1 -0
- package/dist/recorders/observability/internal/SequenceSiblingTracker.js +35 -0
- package/dist/recorders/observability/internal/SequenceSiblingTracker.js.map +1 -0
- package/dist/recorders/observability/observeRunId.js +25 -0
- package/dist/recorders/observability/observeRunId.js.map +1 -0
- package/dist/reliability/buildReliabilityGateChart.js +11 -5
- package/dist/reliability/buildReliabilityGateChart.js.map +1 -1
- package/dist/types/cache/CacheDecisionSubflow.d.ts +7 -10
- package/dist/types/cache/CacheDecisionSubflow.d.ts.map +1 -1
- package/dist/types/cache/CacheGateDecider.d.ts +16 -2
- package/dist/types/cache/CacheGateDecider.d.ts.map +1 -1
- package/dist/types/cache/cacheRecorder.d.ts.map +1 -1
- package/dist/types/conventions.d.ts +101 -1
- package/dist/types/conventions.d.ts.map +1 -1
- package/dist/types/core/Agent.d.ts +28 -18
- package/dist/types/core/Agent.d.ts.map +1 -1
- package/dist/types/core/LLMCall.d.ts +73 -11
- package/dist/types/core/LLMCall.d.ts.map +1 -1
- package/dist/types/core/RunnerBase.d.ts +136 -4
- package/dist/types/core/RunnerBase.d.ts.map +1 -1
- package/dist/types/core/agent/buildAgentChart.d.ts +38 -19
- package/dist/types/core/agent/buildAgentChart.d.ts.map +1 -1
- package/dist/types/core/agent/buildAgentMessageApiChart.d.ts +41 -0
- package/dist/types/core/agent/buildAgentMessageApiChart.d.ts.map +1 -0
- package/dist/types/core/agent/buildCacheSubflow.d.ts +36 -0
- package/dist/types/core/agent/buildCacheSubflow.d.ts.map +1 -0
- package/dist/types/core/agent/buildDynamicAgentChart.d.ts +57 -0
- package/dist/types/core/agent/buildDynamicAgentChart.d.ts.map +1 -0
- package/dist/types/core/agent/buildMessageApiChart.d.ts +48 -0
- package/dist/types/core/agent/buildMessageApiChart.d.ts.map +1 -0
- package/dist/types/core/agent/stages/callLLM.d.ts.map +1 -1
- package/dist/types/core/agent/stages/reliabilityExecution.d.ts.map +1 -1
- package/dist/types/core/agent/types.d.ts +96 -0
- package/dist/types/core/agent/types.d.ts.map +1 -1
- package/dist/types/core/humanizeLLMError.d.ts +24 -0
- package/dist/types/core/humanizeLLMError.d.ts.map +1 -0
- package/dist/types/core/runner.d.ts +51 -5
- package/dist/types/core/runner.d.ts.map +1 -1
- package/dist/types/core/slots/buildMessagesSlot.d.ts.map +1 -1
- package/dist/types/core/slots/buildSystemPromptSlot.d.ts.map +1 -1
- package/dist/types/core/slots/buildThinkingSubflow.d.ts.map +1 -1
- package/dist/types/core/slots/buildToolsSlot.d.ts.map +1 -1
- package/dist/types/core/translator.d.ts +95 -0
- package/dist/types/core/translator.d.ts.map +1 -0
- package/dist/types/core-flow/Conditional.d.ts +48 -4
- package/dist/types/core-flow/Conditional.d.ts.map +1 -1
- package/dist/types/core-flow/Loop.d.ts +42 -3
- package/dist/types/core-flow/Loop.d.ts.map +1 -1
- package/dist/types/core-flow/Parallel.d.ts +99 -4
- package/dist/types/core-flow/Parallel.d.ts.map +1 -1
- package/dist/types/core-flow/Sequence.d.ts +49 -3
- package/dist/types/core-flow/Sequence.d.ts.map +1 -1
- package/dist/types/events/payloads.d.ts +99 -1
- package/dist/types/events/payloads.d.ts.map +1 -1
- package/dist/types/events/registry.d.ts +11 -1
- package/dist/types/events/registry.d.ts.map +1 -1
- package/dist/types/index.d.ts +8 -3
- package/dist/types/index.d.ts.map +1 -1
- package/dist/types/lib/injection-engine/buildInjectionEngineSubflow.d.ts.map +1 -1
- package/dist/types/memory/causal/snapshotPipeline.d.ts.map +1 -1
- package/dist/types/memory/pipeline/auto.d.ts.map +1 -1
- package/dist/types/memory/pipeline/default.d.ts.map +1 -1
- package/dist/types/memory/pipeline/ephemeral.d.ts.map +1 -1
- package/dist/types/memory/pipeline/fact.d.ts.map +1 -1
- package/dist/types/memory/pipeline/narrative.d.ts.map +1 -1
- package/dist/types/memory/pipeline/semantic.d.ts.map +1 -1
- package/dist/types/observe.d.ts +2 -2
- package/dist/types/observe.d.ts.map +1 -1
- package/dist/types/recorders/core/ContextEvaluatedRecorder.d.ts +24 -0
- package/dist/types/recorders/core/ContextEvaluatedRecorder.d.ts.map +1 -0
- package/dist/types/recorders/core/ContextRecorder.d.ts +0 -2
- package/dist/types/recorders/core/ContextRecorder.d.ts.map +1 -1
- package/dist/types/recorders/core/ErrorBridge.d.ts +39 -0
- package/dist/types/recorders/core/ErrorBridge.d.ts.map +1 -0
- package/dist/types/recorders/core/ReliabilityRecorder.d.ts +25 -0
- package/dist/types/recorders/core/ReliabilityRecorder.d.ts.map +1 -0
- package/dist/types/recorders/observability/BoundaryRecorder.d.ts +167 -6
- package/dist/types/recorders/observability/BoundaryRecorder.d.ts.map +1 -1
- package/dist/types/recorders/observability/FlowchartRecorder.d.ts.map +1 -1
- package/dist/types/recorders/observability/LiveStateRecorder.d.ts +42 -6
- package/dist/types/recorders/observability/LiveStateRecorder.d.ts.map +1 -1
- package/dist/types/recorders/observability/RunStepRecorder.d.ts +232 -0
- package/dist/types/recorders/observability/RunStepRecorder.d.ts.map +1 -0
- package/dist/types/recorders/observability/commentary/commentaryTemplates.d.ts.map +1 -1
- package/dist/types/recorders/observability/internal/ActorArrowClassifier.d.ts +26 -0
- package/dist/types/recorders/observability/internal/ActorArrowClassifier.d.ts.map +1 -0
- package/dist/types/recorders/observability/internal/CandidateAnswerBuffer.d.ts +29 -0
- package/dist/types/recorders/observability/internal/CandidateAnswerBuffer.d.ts.map +1 -0
- package/dist/types/recorders/observability/internal/ForkTracker.d.ts +61 -0
- package/dist/types/recorders/observability/internal/ForkTracker.d.ts.map +1 -0
- package/dist/types/recorders/observability/internal/RootInferrer.d.ts +52 -0
- package/dist/types/recorders/observability/internal/RootInferrer.d.ts.map +1 -0
- package/dist/types/recorders/observability/internal/SequenceSiblingTracker.d.ts +25 -0
- package/dist/types/recorders/observability/internal/SequenceSiblingTracker.d.ts.map +1 -0
- package/dist/types/recorders/observability/observeRunId.d.ts +37 -0
- package/dist/types/recorders/observability/observeRunId.d.ts.map +1 -0
- package/dist/types/reliability/buildReliabilityGateChart.d.ts.map +1 -1
- package/package.json +6 -5
- package/dist/core/agent/stages/iterationStart.js +0 -24
- package/dist/core/agent/stages/iterationStart.js.map +0 -1
- package/dist/esm/core/agent/stages/iterationStart.js +0 -20
- package/dist/esm/core/agent/stages/iterationStart.js.map +0 -1
- package/dist/types/core/agent/stages/iterationStart.d.ts +0 -16
- package/dist/types/core/agent/stages/iterationStart.d.ts.map +0 -1
|
@@ -75,12 +75,18 @@
|
|
|
75
75
|
* }
|
|
76
76
|
* ```
|
|
77
77
|
*/
|
|
78
|
-
import {
|
|
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;
|
|
82
82
|
readonly traversalContext?: TraversalContext;
|
|
83
83
|
}
|
|
84
|
+
interface FlowRunFailedEvent {
|
|
85
|
+
readonly structuredError: {
|
|
86
|
+
readonly message: string;
|
|
87
|
+
};
|
|
88
|
+
readonly traversalContext?: TraversalContext;
|
|
89
|
+
}
|
|
84
90
|
import type { EventDispatcher, Unsubscribe } from '../../events/dispatcher.js';
|
|
85
91
|
import type { ContextSlot } from '../../events/types.js';
|
|
86
92
|
/** Fields every domain event carries. */
|
|
@@ -95,6 +101,23 @@ interface DomainEventBase {
|
|
|
95
101
|
readonly depth: number;
|
|
96
102
|
/** Wall-clock ms at capture time. */
|
|
97
103
|
readonly ts: number;
|
|
104
|
+
/** Commit count when this event fired. 0 if the recorder was
|
|
105
|
+
* constructed without `getCommitCount` (legacy mode). The boundary
|
|
106
|
+
* RANGE for an (entry, exit) pair is `[entry.commitIdxBefore,
|
|
107
|
+
* exit.commitIdxBefore]`. Phase 5 Layer 2 — see
|
|
108
|
+
* `docs/design/boundary-commit-ranges.md`. */
|
|
109
|
+
readonly commitIdxBefore: number;
|
|
110
|
+
/** RESERVED for future event types that trigger engine writes.
|
|
111
|
+
* CURRENT BEHAVIOR: always equals `commitIdxBefore` for every event
|
|
112
|
+
* emitted by today's BoundaryRecorder. Observer events don't write
|
|
113
|
+
* to scope, so the executor's commit count doesn't change between
|
|
114
|
+
* the moment the event is sampled and the moment it's recorded.
|
|
115
|
+
* Consumers should currently treat this as identical to
|
|
116
|
+
* `commitIdxBefore`; do NOT rely on it being strictly greater.
|
|
117
|
+
* The field exists for forward compatibility — if a future
|
|
118
|
+
* observer pattern triggers commits during its handler, this is
|
|
119
|
+
* where the post-effect count will land. */
|
|
120
|
+
readonly commitIdxAfter: number;
|
|
98
121
|
}
|
|
99
122
|
export interface DomainRunEvent extends DomainEventBase {
|
|
100
123
|
readonly type: 'run.entry' | 'run.exit';
|
|
@@ -147,6 +170,33 @@ export interface DomainLoopIterationEvent extends DomainEventBase {
|
|
|
147
170
|
readonly target: string;
|
|
148
171
|
readonly iteration: number;
|
|
149
172
|
}
|
|
173
|
+
/**
|
|
174
|
+
* Composition boundary event — fired for every composition primitive
|
|
175
|
+
* (Parallel / Sequence / Loop / Conditional). Mirrors `subflow.entry/exit`
|
|
176
|
+
* but for the COMPOSITION wrapper itself (the box that contains the
|
|
177
|
+
* branches / steps / iterations / chosen-branch).
|
|
178
|
+
*
|
|
179
|
+
* This pair OPENS and CLOSES a boundary range in `boundaryIndex`. Child
|
|
180
|
+
* subflows that fire between the pair nest naturally inside the
|
|
181
|
+
* composition's range.
|
|
182
|
+
*
|
|
183
|
+
* The `runtimeStageId` is the composition's own per-execution id —
|
|
184
|
+
* SAME format as any other runtimeStageId, with `#executionIndex`. The
|
|
185
|
+
* `kind` discriminates which composition primitive this is.
|
|
186
|
+
*
|
|
187
|
+
* For the Lens compound time axis, this group is what collapses
|
|
188
|
+
* parallel branches into ONE slider position at the parent's drill
|
|
189
|
+
* level. Drill into the composition to see its children as positions.
|
|
190
|
+
*/
|
|
191
|
+
export interface DomainCompositionEvent extends DomainEventBase {
|
|
192
|
+
readonly type: 'composition.start' | 'composition.end';
|
|
193
|
+
readonly kind: 'Parallel' | 'Sequence' | 'Loop' | 'Conditional';
|
|
194
|
+
readonly compositionId: string;
|
|
195
|
+
readonly name: string;
|
|
196
|
+
/** On `composition.end`, the exit status reported by the composition. */
|
|
197
|
+
readonly status?: 'ok' | 'err' | 'break' | 'budget_exhausted';
|
|
198
|
+
readonly durationMs?: number;
|
|
199
|
+
}
|
|
150
200
|
/**
|
|
151
201
|
* The 4 actor arrows of a ReAct cycle. Tagged on `llm.start` / `llm.end`
|
|
152
202
|
* at capture time so consumers (slider, run-flow renderer) dispatch by
|
|
@@ -217,7 +267,7 @@ export interface DomainContextInjectedEvent extends DomainEventBase {
|
|
|
217
267
|
readonly budgetFraction?: number;
|
|
218
268
|
}
|
|
219
269
|
/** Discriminated union covering every observable moment in a run. */
|
|
220
|
-
export type DomainEvent = DomainRunEvent | DomainSubflowEvent | DomainForkBranchEvent | DomainDecisionBranchEvent | DomainLoopIterationEvent | DomainLLMStartEvent | DomainLLMEndEvent | DomainToolStartEvent | DomainToolEndEvent | DomainContextInjectedEvent;
|
|
270
|
+
export type DomainEvent = DomainRunEvent | DomainSubflowEvent | DomainCompositionEvent | DomainForkBranchEvent | DomainDecisionBranchEvent | DomainLoopIterationEvent | DomainLLMStartEvent | DomainLLMEndEvent | DomainToolStartEvent | DomainToolEndEvent | DomainContextInjectedEvent;
|
|
221
271
|
/**
|
|
222
272
|
* Per-boundary rollup returned by
|
|
223
273
|
* `BoundaryRecorder.aggregateForBoundary` and
|
|
@@ -265,6 +315,43 @@ export interface BoundaryAggregate {
|
|
|
265
315
|
}
|
|
266
316
|
export interface BoundaryRecorderOptions {
|
|
267
317
|
readonly id?: string;
|
|
318
|
+
/**
|
|
319
|
+
* Live commit-count accessor — typically `() => executor.getCommitCount()`
|
|
320
|
+
* from footprintjs 5.1+. Inject from your runner. When provided:
|
|
321
|
+
* - Every DomainEvent gains `commitIdxBefore` / `commitIdxAfter`.
|
|
322
|
+
* - `recorder.boundaryIndex` is populated with open/close ranges
|
|
323
|
+
* keyed on each subflow's entry event.
|
|
324
|
+
* When omitted (legacy / pre-5.1 footprintjs): both fields are 0 on
|
|
325
|
+
* every event; `boundaryIndex` exists but is empty. Phase 5 Layer 2.
|
|
326
|
+
*/
|
|
327
|
+
readonly getCommitCount?: () => number;
|
|
328
|
+
}
|
|
329
|
+
/**
|
|
330
|
+
* Stripped projection used as the LABEL for the commit-range index.
|
|
331
|
+
* Intentionally OMITS `payload` (security panel review YELLOW #1):
|
|
332
|
+
* `boundaryIndex.enclosing()` queries should not bypass redaction by
|
|
333
|
+
* exposing raw scope payloads through the range index. Consumers
|
|
334
|
+
* needing payload can join on `runtimeStageId` with the full event
|
|
335
|
+
* stream via `getEvents()` (which IS subject to redaction policy).
|
|
336
|
+
*/
|
|
337
|
+
export interface BoundaryRangeLabel {
|
|
338
|
+
readonly type: 'subflow.entry' | 'run.entry' | 'composition.start';
|
|
339
|
+
readonly runtimeStageId: string;
|
|
340
|
+
readonly subflowPath: readonly string[];
|
|
341
|
+
readonly depth: number;
|
|
342
|
+
readonly ts: number;
|
|
343
|
+
/** Set on subflow entries; undefined on the synthetic run-root entry. */
|
|
344
|
+
readonly subflowId?: string;
|
|
345
|
+
readonly localSubflowId?: string;
|
|
346
|
+
readonly subflowName?: string;
|
|
347
|
+
readonly description?: string;
|
|
348
|
+
readonly primitiveKind?: string;
|
|
349
|
+
readonly slotKind?: ContextSlot;
|
|
350
|
+
readonly isAgentInternal?: boolean;
|
|
351
|
+
/** Composition primitive (Parallel/Sequence/Loop/Conditional) when the
|
|
352
|
+
* range was opened by a `composition.start` event. */
|
|
353
|
+
readonly compositionKind?: 'Parallel' | 'Sequence' | 'Loop' | 'Conditional';
|
|
354
|
+
readonly compositionName?: string;
|
|
268
355
|
}
|
|
269
356
|
/** Factory — matches the `inOutRecorder()` / `topologyRecorder()` style. */
|
|
270
357
|
export declare function boundaryRecorder(options?: BoundaryRecorderOptions): BoundaryRecorder;
|
|
@@ -273,12 +360,35 @@ export declare function boundaryRecorder(options?: BoundaryRecorderOptions): Bou
|
|
|
273
360
|
* attach to the executor's FlowRecorder channel; exposes `subscribe()`
|
|
274
361
|
* to wire to the agentfootprint typed-event dispatcher.
|
|
275
362
|
*
|
|
276
|
-
*
|
|
277
|
-
*
|
|
278
|
-
*
|
|
363
|
+
* v5: composes a `SequenceStore<DomainEvent>` (storage) instead of
|
|
364
|
+
* extending the deprecated `SequenceRecorder<T>` base. Time-travel
|
|
365
|
+
* utilities (`getEntryRanges`, `accumulate`) are accessed through the
|
|
366
|
+
* store via the public read API on this class.
|
|
279
367
|
*/
|
|
280
|
-
export declare class BoundaryRecorder
|
|
368
|
+
export declare class BoundaryRecorder implements CombinedRecorder {
|
|
281
369
|
readonly id: string;
|
|
370
|
+
/** Composition: storage shelf. */
|
|
371
|
+
private readonly store;
|
|
372
|
+
/**
|
|
373
|
+
* Phase 5 Layer 2 — interval index over commit indices, populated
|
|
374
|
+
* live as boundary entry/exit pairs fire. Consumers (Lens) read
|
|
375
|
+
* `enclosing(commitIdx)` for breadcrumbs and `overlapping(slice)`
|
|
376
|
+
* for time-range queries. Empty when `getCommitCount` is not
|
|
377
|
+
* injected. See `docs/design/boundary-commit-ranges.md`.
|
|
378
|
+
*/
|
|
379
|
+
readonly boundaryIndex: CommitRangeIndex<BoundaryRangeLabel>;
|
|
380
|
+
/** Open-range tokens keyed by `runtimeStageId` so the matching exit
|
|
381
|
+
* can close the correct range. Pure side-table; cleared on runId
|
|
382
|
+
* reset. Not exposed externally. */
|
|
383
|
+
private readonly openTokens;
|
|
384
|
+
/** Live commit-count accessor injected by the runner. Sanitized
|
|
385
|
+
* (NaN/Infinity/negative → 0) before use. */
|
|
386
|
+
private readonly getCommitCount;
|
|
387
|
+
/** True when `getCommitCount` was explicitly injected. In LEGACY
|
|
388
|
+
* MODE (false), `boundaryIndex` is intentionally NOT populated —
|
|
389
|
+
* zero-width [0,0] ranges would mislead consumers querying the
|
|
390
|
+
* index. Multi-panel review flagged this footgun. */
|
|
391
|
+
private readonly hasCommitTracking;
|
|
282
392
|
/**
|
|
283
393
|
* Tracks whether the most recent `llm.end` had toolCalls. Used to
|
|
284
394
|
* classify the NEXT `llm.start` as `'tool→llm'` (vs `'user→llm'` if
|
|
@@ -286,10 +396,61 @@ export declare class BoundaryRecorder extends SequenceRecorder<DomainEvent> impl
|
|
|
286
396
|
* `llm.start` event after the classification is applied.
|
|
287
397
|
*/
|
|
288
398
|
private prevLLMEndHadTools;
|
|
399
|
+
/**
|
|
400
|
+
* Run-boundary observer — fires resetForNewRun() when
|
|
401
|
+
* traversalContext.runId changes between events AND no boundary is
|
|
402
|
+
* currently open. The "no open boundary" gate distinguishes:
|
|
403
|
+
*
|
|
404
|
+
* - **Legitimate new run** — consumer reuses one recorder across
|
|
405
|
+
* sequential `executor.run()` calls. All prior boundaries closed
|
|
406
|
+
* before the second run began; openTokens is empty when the new
|
|
407
|
+
* runId arrives → safe to wipe state so the second run doesn't
|
|
408
|
+
* alias with the first.
|
|
409
|
+
* - **Composition sub-run** — primitives like `LLMCall`, `Sequence`,
|
|
410
|
+
* and `Parallel` internally spawn their own `FlowChartExecutor`
|
|
411
|
+
* instances. Each sub-executor mints a NEW runId. When that
|
|
412
|
+
* sub-executor fires events on the SHARED recorder, the recorder
|
|
413
|
+
* is still inside the parent run — `openTokens` is non-empty.
|
|
414
|
+
* Resetting here would wipe the parent's boundary index mid-run
|
|
415
|
+
* (the bug Layer 4 surfaced in agentfootprint-lens fanout).
|
|
416
|
+
*
|
|
417
|
+
* The `openTokens.size === 0` check is the cleanest semantic signal:
|
|
418
|
+
* if nothing is in-flight, a runId change means "the consumer started
|
|
419
|
+
* fresh"; if something is open, the new runId is from a sub-executor
|
|
420
|
+
* nested inside the still-ongoing parent.
|
|
421
|
+
*/
|
|
422
|
+
private readonly runIdGuard;
|
|
289
423
|
constructor(options?: BoundaryRecorderOptions);
|
|
424
|
+
/**
|
|
425
|
+
* Reset all transient state.
|
|
426
|
+
*
|
|
427
|
+
* **Composition-safe gate (Phase 5 Layer 4):** if `openTokens.size > 0`
|
|
428
|
+
* the call is a no-op. Rationale: `FlowChartExecutor.run()` calls
|
|
429
|
+
* `r.clear?.()` on every attached recorder during its pre-run loop.
|
|
430
|
+
* When agentfootprint composition primitives (LLMCall, Sequence,
|
|
431
|
+
* Parallel, etc.) propagate the parent's recorders to nested
|
|
432
|
+
* sub-executors, EACH sub-executor's pre-run clear loop calls
|
|
433
|
+
* `clear()` on the SHARED parent recorder mid-run — wiping live
|
|
434
|
+
* parent state. The `openTokens.size > 0` check distinguishes:
|
|
435
|
+
*
|
|
436
|
+
* - **Legitimate reset** — consumer or executor calls `clear()`
|
|
437
|
+
* when no boundary is in-flight (`openTokens` empty). Safe to
|
|
438
|
+
* wipe; the recorder is idle.
|
|
439
|
+
* - **Composition wipe** — sub-executor's pre-run clear fires
|
|
440
|
+
* while the parent has open boundaries (`openTokens` non-empty).
|
|
441
|
+
* Skip the wipe; the parent's state must be preserved.
|
|
442
|
+
*
|
|
443
|
+
* If a consumer needs to forcibly wipe state even with open tokens
|
|
444
|
+
* (e.g., manual recovery after a crashed run), pair `clear()` with
|
|
445
|
+
* an explicit `forceClear()` (TODO — add when the use case shows up;
|
|
446
|
+
* today the recorder lifecycle pattern is "one recorder per logical
|
|
447
|
+
* run" so leaked tokens shouldn't occur).
|
|
448
|
+
*/
|
|
290
449
|
clear(): void;
|
|
450
|
+
private observeRunId;
|
|
291
451
|
onRunStart(event: FlowRunEvent): void;
|
|
292
452
|
onRunEnd(event: FlowRunEvent): void;
|
|
453
|
+
onRunFailed(event: FlowRunFailedEvent): void;
|
|
293
454
|
onSubflowEntry(event: FlowSubflowEvent): void;
|
|
294
455
|
onSubflowExit(event: FlowSubflowEvent): void;
|
|
295
456
|
onFork(event: FlowForkEvent): void;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"BoundaryRecorder.d.ts","sourceRoot":"","sources":["../../../../src/recorders/observability/BoundaryRecorder.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;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AAY,CAAC,EAAE,MAAM,CAAC;CAChC;AAED,MAAM,WAAW,gBAAgB;IAC/B;4EACwE;IACxE,QAAQ,CAAC,QAAQ,CAAC,EAAE,CAAC,KAAK,EAAE,SAAS,KAAK,IAAI,CAAC;CAChD;AAED,MAAM,WAAW,eAAe;IAC9B;uBACmB;IACnB,QAAQ,CAAC,WAAW,EAAE,MAAM,SAAS,CAAC;IACtC;;sBAEkB;IAClB,QAAQ,CAAC,QAAQ,EAAE,gBAAgB,CAAC;IACpC,oEAAoE;IACpE,QAAQ,CAAC,WAAW,EAAE,MAAM,IAAI,CAAC;CAClC;AAID;;;;;;;;;;;;GAYG;AACH,wBAAgB,eAAe,CAC7B,YAAY,EAAE,CAAC,QAAQ,EAAE,gBAAgB,KAAK,MAAM,IAAI,EACxD,UAAU,EAAE,eAAe,EAC3B,OAAO,GAAE,gBAAqB,GAC7B,eAAe,CAmCjB;AAwED;;;;;;;;;;;;;;;;;GAiBG;AACH,wBAAgB,cAAc,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
|
|
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
|
-
/**
|
|
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
|
|
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
|
|
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;
|
|
1
|
+
{"version":3,"file":"LiveStateRecorder.d.ts","sourceRoot":"","sources":["../../../../src/recorders/observability/LiveStateRecorder.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA6DG;AAGH,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,4BAA4B,CAAC;AAC9D,OAAO,KAAK,EAAE,mBAAmB,EAAE,uBAAuB,EAAE,MAAM,0BAA0B,CAAC;AAG7F;;;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,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iC;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
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"RunStepRecorder.d.ts","sourceRoot":"","sources":["../../../../src/recorders/observability/RunStepRecorder.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA4BG;AAQH,OAAO,KAAK,EACV,gBAAgB,EAChB,iBAAiB,EACjB,aA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;;OAQG;IACH,iBAAiB,CAAC,CAAC,EAAE,WAAW,GAAG,IAAI;IAwHvC;;;;;;;;;;;;OAYG;IACH,QAAQ,CAAC,SAAS,CAAC,EAAE,SAAS,MAAM,EAAE,GAAG,SAAS,OAAO,EAAE;IAkB3D;;6DAEyD;IACzD,OAAO,CAAC,oBAAoB;CAe7B;AAyBD,MAAM,WAAW,YAAY;IAC3B,QAAQ,CAAC,KAAK,EAAE,SAAS,OAAO,EAAE,CAAC;CACpC;AAED,MAAM,WAAW,oBAAoB;IACnC,QAAQ,CAAC,SAAS,CAAC,EAAE,SAAS,MAAM,EAAE,CAAC;CACxC;AAED;;;;;;;;;;GAUG;AACH,wBAAgB,aAAa,CAC3B,MAAM,EAAE,gBAAgB,GAAG,SAAS,WAAW,EAAE,EACjD,OAAO,GAAE,oBAAyB,GACjC,OAAO,EAAE,CA2CX"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"commentaryTemplates.d.ts","sourceRoot":"","sources":["../../../../../src/recorders/observability/commentary/commentaryTemplates.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAwCG;AAEH,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,6BAA6B,CAAC;AAEvE;;;2EAG2E;AAC3E,MAAM,MAAM,mBAAmB,GAAG,QAAQ,CAAC,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC,CAAC;AAEnE;;;;GAIG;AACH,eAAO,MAAM,0BAA0B,EAAE,mBA+ExC,CAAC;AAEF;;6CAE6C;AAC7C,MAAM,WAAW,iBAAiB;IAChC;6EACyE;IACzE,QAAQ,CAAC,OAAO,EAAE,MAAM,CAAC;IACzB;;;2EAGuE;IACvE,QAAQ,CAAC,kBAAkB,CAAC,EAAE,CAAC,QAAQ,EAAE,MAAM,KAAK,MAAM,GAAG,SAAS,CAAC;CACxE;AAED;;;;;;;GAOG;AACH,wBAAgB,mBAAmB,CAAC,KAAK,EAAE,mBAAmB,GAAG,MAAM,GAAG,IAAI,GAAG,SAAS,CA6FzF;AAED;;;;;;;;GAQG;AACH,wBAAgB,qBAAqB,CACnC,KAAK,EAAE,mBAAmB,EAC1B,GAAG,EAAE,iBAAiB,EACtB,SAAS,GAAE,mBAAgD,GAC1D,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAmDxB;
|
|
1
|
+
{"version":3,"file":"commentaryTemplates.d.ts","sourceRoot":"","sources":["../../../../../src/recorders/observability/commentary/commentaryTemplates.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAwCG;AAEH,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,6BAA6B,CAAC;AAEvE;;;2EAG2E;AAC3E,MAAM,MAAM,mBAAmB,GAAG,QAAQ,CAAC,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC,CAAC;AAEnE;;;;GAIG;AACH,eAAO,MAAM,0BAA0B,EAAE,mBA+ExC,CAAC;AAEF;;6CAE6C;AAC7C,MAAM,WAAW,iBAAiB;IAChC;6EACyE;IACzE,QAAQ,CAAC,OAAO,EAAE,MAAM,CAAC;IACzB;;;2EAGuE;IACvE,QAAQ,CAAC,kBAAkB,CAAC,EAAE,CAAC,QAAQ,EAAE,MAAM,KAAK,MAAM,GAAG,SAAS,CAAC;CACxE;AAED;;;;;;;GAOG;AACH,wBAAgB,mBAAmB,CAAC,KAAK,EAAE,mBAAmB,GAAG,MAAM,GAAG,IAAI,GAAG,SAAS,CA6FzF;AAED;;;;;;;;GAQG;AACH,wBAAgB,qBAAqB,CACnC,KAAK,EAAE,mBAAmB,EAC1B,GAAG,EAAE,iBAAiB,EACtB,SAAS,GAAE,mBAAgD,GAC1D,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAmDxB;AAgCD;;;;;;;;GAQG;AACH,wBAAgB,gBAAgB,CAAC,KAAK,EAAE,mBAAmB,EAAE,GAAG,EAAE,iBAAiB,GAAG,MAAM,CAS3F;AAED;;;;;;;;GAQG;AACH,wBAAgB,gBAAgB,CAAC,QAAQ,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,GAAG,MAAM,CAEvF"}
|