agentfootprint 2.14.4 → 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.
- package/dist/cache/CacheDecisionSubflow.js +3 -1
- package/dist/cache/CacheDecisionSubflow.js.map +1 -1
- package/dist/conventions.js +3 -2
- package/dist/conventions.js.map +1 -1
- package/dist/core/Agent.js +69 -23
- package/dist/core/Agent.js.map +1 -1
- package/dist/core/LLMCall.js +44 -5
- package/dist/core/LLMCall.js.map +1 -1
- package/dist/core/RunnerBase.js +173 -0
- package/dist/core/RunnerBase.js.map +1 -1
- package/dist/core/agent/buildAgentChart.js +12 -2
- package/dist/core/agent/buildAgentChart.js.map +1 -1
- package/dist/core/runner.js +4 -3
- package/dist/core/runner.js.map +1 -1
- package/dist/core/slots/buildMessagesSlot.js +1 -1
- 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 +73 -10
- package/dist/core-flow/Conditional.js.map +1 -1
- package/dist/core-flow/Loop.js +60 -16
- package/dist/core-flow/Loop.js.map +1 -1
- package/dist/core-flow/Parallel.js +241 -92
- package/dist/core-flow/Parallel.js.map +1 -1
- package/dist/core-flow/Sequence.js +51 -8
- package/dist/core-flow/Sequence.js.map +1 -1
- package/dist/esm/cache/CacheDecisionSubflow.js +3 -1
- package/dist/esm/cache/CacheDecisionSubflow.js.map +1 -1
- package/dist/esm/conventions.js +3 -2
- package/dist/esm/conventions.js.map +1 -1
- package/dist/esm/core/Agent.js +69 -23
- package/dist/esm/core/Agent.js.map +1 -1
- package/dist/esm/core/LLMCall.js +44 -5
- package/dist/esm/core/LLMCall.js.map +1 -1
- package/dist/esm/core/RunnerBase.js +173 -0
- package/dist/esm/core/RunnerBase.js.map +1 -1
- package/dist/esm/core/agent/buildAgentChart.js +12 -2
- package/dist/esm/core/agent/buildAgentChart.js.map +1 -1
- package/dist/esm/core/runner.js +4 -3
- package/dist/esm/core/runner.js.map +1 -1
- package/dist/esm/core/slots/buildMessagesSlot.js +1 -1
- 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 +73 -10
- package/dist/esm/core-flow/Conditional.js.map +1 -1
- package/dist/esm/core-flow/Loop.js +60 -16
- package/dist/esm/core-flow/Loop.js.map +1 -1
- package/dist/esm/core-flow/Parallel.js +242 -93
- package/dist/esm/core-flow/Parallel.js.map +1 -1
- package/dist/esm/core-flow/Sequence.js +51 -8
- package/dist/esm/core-flow/Sequence.js.map +1 -1
- package/dist/esm/index.js +1 -0
- package/dist/esm/index.js.map +1 -1
- package/dist/esm/lib/injection-engine/buildInjectionEngineSubflow.js +1 -1
- 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/observability/BoundaryRecorder.js +315 -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 +112 -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 +3 -4
- 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 +1 -1
- package/dist/esm/reliability/buildReliabilityGateChart.js.map +1 -1
- package/dist/index.js +7 -3
- package/dist/index.js.map +1 -1
- package/dist/lib/injection-engine/buildInjectionEngineSubflow.js +1 -1
- 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/observability/BoundaryRecorder.js +314 -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 +111 -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 +3 -4
- 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 +1 -1
- package/dist/reliability/buildReliabilityGateChart.js.map +1 -1
- package/dist/types/cache/CacheDecisionSubflow.d.ts.map +1 -1
- package/dist/types/conventions.d.ts.map +1 -1
- package/dist/types/core/Agent.d.ts +20 -18
- package/dist/types/core/Agent.d.ts.map +1 -1
- package/dist/types/core/LLMCall.d.ts +28 -2
- package/dist/types/core/LLMCall.d.ts.map +1 -1
- package/dist/types/core/RunnerBase.d.ts +124 -4
- package/dist/types/core/RunnerBase.d.ts.map +1 -1
- package/dist/types/core/agent/buildAgentChart.d.ts +7 -1
- package/dist/types/core/agent/buildAgentChart.d.ts.map +1 -1
- package/dist/types/core/agent/types.d.ts +29 -0
- package/dist/types/core/agent/types.d.ts.map +1 -1
- 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 +22 -1
- package/dist/types/events/payloads.d.ts.map +1 -1
- package/dist/types/index.d.ts +4 -2
- 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/observability/BoundaryRecorder.d.ts +160 -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 +3 -3
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Agent.d.ts","sourceRoot":"","sources":["../../../src/core/Agent.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAEH,OAAO,EAEL,KAAK,sBAAsB,
|
|
1
|
+
{"version":3,"file":"Agent.d.ts","sourceRoot":"","sources":["../../../src/core/Agent.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAEH,OAAO,EAEL,KAAK,sBAAsB,EAE3B,KAAK,mBAAmB,EACxB,KAAK,UAAU,EACf,KAAK,eAAe,EACrB,MAAM,aAAa,CAAC;AACrB,OAAO,KAAK,EAAE,WAAW,EAAE,aAAa,EAAE,MAAM,mBAAmB,CAAC;AACpE,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,yBAAyB,CAAC;AAWjE,OAAO,EAAE,KAAK,kBAAkB,EAAE,MAAM,YAAY,CAAC;AAkBrD,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,2BAA2B,CAAC;AAKlE,OAAO,KAAK,E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E,MAAM,GAAG,CAAC;IAUxC;;;;;;;;;OASG;IACG,gBAAgB,CAAC,CAAC,GAAG,OAAO,EAAE,GAAG,EAAE,MAAM,GAAG,OAAO,CAAC,CAAC,CAAC;IAoC5D;;;;;;;;;;OAUG;IACG,QAAQ,CAAC,CAAC,GAAG,OAAO,EAAE,KAAK,EAAE,UAAU,EAAE,OAAO,CAAC,EAAE,UAAU,GAAG,OAAO,CAAC,CAAC,CAAC;IAiB1E,GAAG,CAAC,KAAK,EAAE,UAAU,EAAE,OAAO,CAAC,EAAE,UAAU,GAAG,OAAO,CAAC,WAAW,GAAG,kBAAkB,CAAC;IAwD7F;;;;;;;;;;;;;;;;;;;;;;;;OAwBG;IACG,aAAa,CACjB,UAAU,EAAE,kBAAkB,GAAG,OAAO,EACxC,OAAO,CAAC,EAAE,UAAU,GACnB,OAAO,CAAC,WAAW,GAAG,kBAAkB,CAAC;IAQ5C;;;;;;OAMG;IACH,OAAO,CAAC,wBAAwB;IAyB1B,MAAM,CACV,UAAU,EAAE,mBAAmB,EAC/B,KAAK,CAAC,EAAE,OAAO,EACf,OAAO,CAAC,EAAE,UAAU,GACnB,OAAO,CAAC,WAAW,GAAG,kBAAkB,CAAC;IAW5C,OAAO,CAAC,cAAc;IAoCtB,OAAO,CAAC,cAAc;IA2FtB,OAAO,CAAC,UAAU;CA+InB"}
|
|
@@ -11,7 +11,8 @@
|
|
|
11
11
|
* agentfootprint.stream.llm_start / llm_end
|
|
12
12
|
* agentfootprint.context.injected / slot_composed
|
|
13
13
|
*/
|
|
14
|
-
import { type
|
|
14
|
+
import { type FlowchartCheckpoint, type RunOptions, type StructureRecorder } from 'footprintjs';
|
|
15
|
+
import type { GroupMetadata, GroupTranslator } from './translator.js';
|
|
15
16
|
import type { RunnerPauseOutcome } from './pause.js';
|
|
16
17
|
import type { LLMProvider, PricingTable } from '../adapters/types.js';
|
|
17
18
|
import { RunnerBase } from './RunnerBase.js';
|
|
@@ -40,6 +41,24 @@ export interface LLMCallOptions {
|
|
|
40
41
|
* — consumers choose whether to abort by listening to the event.
|
|
41
42
|
*/
|
|
42
43
|
readonly costBudget?: number;
|
|
44
|
+
/**
|
|
45
|
+
* Optional build-time recorders threaded into footprintjs's
|
|
46
|
+
* `flowChart()` factory. Each recorder observes per-node build
|
|
47
|
+
* events (`onStageAdded` / `onSubflowMounted` / etc.) for this
|
|
48
|
+
* LLMCall's internal chart (Seed + slot mounts + CallLLM). When
|
|
49
|
+
* omitted, no build-time observation is wired up.
|
|
50
|
+
*/
|
|
51
|
+
readonly structureRecorders?: readonly StructureRecorder[];
|
|
52
|
+
/**
|
|
53
|
+
* Optional per-COMPOSITION translator (UI-agnostic). See
|
|
54
|
+
* `core/translator.ts`. When attached, `runner.getUIGroup()` invokes
|
|
55
|
+
* it with the LLMCall's `GroupMetadata` (kind `'LLMCall'`, id, name,
|
|
56
|
+
* empty `members[]`, plus `extra.slots` with the three slot ids —
|
|
57
|
+
* `system-prompt`, `messages`, `tools` — so Lens can render the slot
|
|
58
|
+
* cards inside an LLMCall card without inspecting `buildTimeStructure`).
|
|
59
|
+
* Returns `undefined` when omitted.
|
|
60
|
+
*/
|
|
61
|
+
readonly groupTranslator?: GroupTranslator;
|
|
43
62
|
}
|
|
44
63
|
export interface LLMCallInput {
|
|
45
64
|
readonly message: string;
|
|
@@ -55,10 +74,17 @@ export declare class LLMCall extends RunnerBase<LLMCallInput, LLMCallOutput> {
|
|
|
55
74
|
private readonly systemPromptValue;
|
|
56
75
|
private readonly pricingTable?;
|
|
57
76
|
private readonly costBudget?;
|
|
77
|
+
private readonly structureRecorders?;
|
|
78
|
+
private readonly groupTranslator?;
|
|
58
79
|
private currentRunContext;
|
|
59
80
|
constructor(opts: LLMCallOptions, systemPromptValue: string);
|
|
60
81
|
static create(opts: LLMCallOptions): LLMCallBuilder;
|
|
61
|
-
|
|
82
|
+
protected getGroupTranslator(): GroupTranslator | undefined;
|
|
83
|
+
/** LLMCall has no nested-runner members (slots are subflows of
|
|
84
|
+
* the LLMCall's own chart, not Runner instances). The 3 slot ids
|
|
85
|
+
* are surfaced via `extra` so Lens can render the slot cards
|
|
86
|
+
* inside an LLMCall card without inspecting `buildTimeStructure`. */
|
|
87
|
+
protected buildUIGroupMetadata(): GroupMetadata;
|
|
62
88
|
run(input: LLMCallInput, options?: RunOptions): Promise<LLMCallOutput | RunnerPauseOutcome>;
|
|
63
89
|
resume(checkpoint: FlowchartCheckpoint, input?: unknown, options?: RunOptions): Promise<LLMCallOutput | RunnerPauseOutcome>;
|
|
64
90
|
private createExecutor;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"LLMCall.d.ts","sourceRoot":"","sources":["../../../src/core/LLMCall.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;GAYG;AAEH,OAAO,
|
|
1
|
+
{"version":3,"file":"LLMCall.d.ts","sourceRoot":"","sources":["../../../src/core/LLMCall.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;GAYG;AAEH,OAAO,EAIL,KAAK,mBAAmB,EACxB,KAAK,UAAU,EACf,KAAK,iBAAiB,EAEvB,MAAM,aAAa,CAAC;AACrB,OAAO,KAAK,EAAE,aAAa,EAAE,eAAe,EAAE,MAAM,iBAAiB,CAAC;AACtE,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,YAAY,CAAC;AAWrD,OAAO,KAAK,EAAE,WAAW,EAAE,YAAY,EAAE,MAAM,sBAAsB,CAAC;AAEtE,OAAO,EAAE,UAAU,EAAa,MAAM,iBAAiB,CAAC;AAKxD,MAAM,WAAW,cAAc;IAC7B,QAAQ,CAAC,QAAQ,EAAE,WAAW,CAAC;IAC/B,uEAAuE;IACvE,QAAQ,CAAC,IAAI,CAAC,EAAE,MAAM,CAAC;IACvB,iEAAiE;IACjE,QAAQ,CAAC,EAAE,CAAC,EAAE,MAAM,CAAC;IACrB,0CAA0C;IAC1C,QAAQ,CAAC,KAAK,EAAE,MAAM,CAAC;IACvB,qCAAqC;IACrC,QAAQ,CA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,GAAG,cAAc;cAQhC,kBAAkB,IAAI,eAAe,GAAG,SAAS;IAIpE;;;0EAGsE;cACnD,oBAAoB,IAAI,aAAa;IAYlD,GAAG,CACP,KAAK,EAAE,YAAY,EACnB,OAAO,CAAC,EAAE,UAAU,GACnB,OAAO,CAAC,aAAa,GAAG,kBAAkB,CAAC;IAUxC,MAAM,CACV,UAAU,EAAE,mBAAmB,EAC/B,KAAK,CAAC,EAAE,OAAO,EACf,OAAO,CAAC,EAAE,UAAU,GACnB,OAAO,CAAC,aAAa,GAAG,kBAAkB,CAAC;IAQ9C,OAAO,CAAC,cAAc;IA+BtB,OAAO,CAAC,cAAc;IAatB,OAAO,CAAC,UAAU;CAoInB;AAED;;GAEG;AACH,qBAAa,cAAc;IACzB,OAAO,CAAC,QAAQ,CAAC,IAAI,CAAiB;IACtC,OAAO,CAAC,iBAAiB,CAAM;gBAEnB,IAAI,EAAE,cAAc;IAIhC,MAAM,CAAC,MAAM,EAAE,MAAM,GAAG,IAAI;IAK5B,KAAK,IAAI,OAAO;CAGjB"}
|
|
@@ -22,13 +22,133 @@ export declare abstract class RunnerBase<TIn = unknown, TOut = unknown> implemen
|
|
|
22
22
|
protected readonly dispatcher: EventDispatcher;
|
|
23
23
|
protected readonly attachedRecorders: CombinedRecorder[];
|
|
24
24
|
/**
|
|
25
|
-
*
|
|
26
|
-
*
|
|
25
|
+
* The most recently used FlowChartExecutor — set by subclasses in
|
|
26
|
+
* `run()` so consumers can read the canonical structural snapshot
|
|
27
|
+
* via `getLastSnapshot()`. Single source of structural truth: this
|
|
28
|
+
* is footprintjs's snapshot, NOT a domain re-derivation.
|
|
27
29
|
*/
|
|
28
|
-
|
|
30
|
+
protected lastExecutor: FlowChartExecutor | undefined;
|
|
31
|
+
/**
|
|
32
|
+
* Cached footprintjs FlowChart, built ONCE at construction time via
|
|
33
|
+
* `initChart()`. Subsequent `getSpec()` calls return this same
|
|
34
|
+
* object — reference-stable across all consumers (Lens spec memos,
|
|
35
|
+
* footprintjs's OpenAPI/MCP caches, recorder-side correlation).
|
|
36
|
+
*
|
|
37
|
+
* Set via `initChart(builder)`, called from the subclass constructor
|
|
38
|
+
* AFTER all instance fields are populated. Read via `getSpec()`.
|
|
39
|
+
*
|
|
40
|
+
* Why eager construction: the `StructureRecorder` contract is
|
|
41
|
+
* "fires once per node at build time" — lazy construction would
|
|
42
|
+
* fire each recorder every `getSpec()` / `run()` call (2N invocations
|
|
43
|
+
* per run instead of N), break reference equality, and trigger
|
|
44
|
+
* `_mergeStageMap` false-positive collisions on second build.
|
|
45
|
+
* See `RunnerBase.initChart` for details.
|
|
46
|
+
*
|
|
47
|
+
* Visibility note: `private` (not `protected`) so subclasses cannot
|
|
48
|
+
* bypass the `initChart()` double-init guard by writing the field
|
|
49
|
+
* directly. All legitimate access goes through `getSpec()` and
|
|
50
|
+
* `initChart()`.
|
|
51
|
+
*/
|
|
52
|
+
private chart;
|
|
53
|
+
/**
|
|
54
|
+
* Returns the footprintjs snapshot from the most recent run (or
|
|
55
|
+
* undefined if no run has completed). The snapshot is the CANONICAL
|
|
56
|
+
* STRUCTURE: nodes, edges, executionTree, runtimeStageId, commitLog.
|
|
57
|
+
*
|
|
58
|
+
* Domain consumers (Lens, Trace, dashboards) read this for shape
|
|
59
|
+
* and join their own per-stage payload by `runtimeStageId`. They
|
|
60
|
+
* MUST NOT re-derive structure from typed events — that's the
|
|
61
|
+
* design footprintjs's CLAUDE.md Convention 1 explicitly forbids.
|
|
62
|
+
*
|
|
63
|
+
* Returns `undefined` before the first `run()` completes. After,
|
|
64
|
+
* always returns the snapshot of the most recent run (including
|
|
65
|
+
* across multi-turn reuse of the same runner instance).
|
|
66
|
+
*/
|
|
67
|
+
getLastSnapshot(): ReturnType<FlowChartExecutor['getSnapshot']> | undefined;
|
|
68
|
+
/**
|
|
69
|
+
* Return the footprintjs FlowChart for this runner — the canonical
|
|
70
|
+
* design-time blueprint. STABLE REFERENCE across calls (`getSpec()
|
|
71
|
+
* === getSpec()`). Set once at construction via `initChart()`.
|
|
72
|
+
*
|
|
73
|
+
* Pairs with the run-time getters (`getLastSnapshot`,
|
|
74
|
+
* `getCommitCount`) and matches `ExplainableShell.spec` +
|
|
75
|
+
* `specToReactFlow(spec, ...)` consumer conventions.
|
|
76
|
+
*
|
|
77
|
+
* DO NOT OVERRIDE in subclasses — the reference-identity contract
|
|
78
|
+
* (Lens / OpenAPI / MCP caches memo on this returning the same
|
|
79
|
+
* object) depends on the inherited body returning `this.chart`
|
|
80
|
+
* directly. To customise build behaviour, override `buildChart()`
|
|
81
|
+
* instead; this getter must remain a thin cache-read.
|
|
82
|
+
*/
|
|
83
|
+
getSpec(): FlowChart;
|
|
84
|
+
/**
|
|
85
|
+
* Cached `getUIGroup()` output. Computed lazily on first read so the
|
|
86
|
+
* subclass constructor doesn't need to run the translator before all
|
|
87
|
+
* its members exist (e.g., Parallel builds its branches list mid-
|
|
88
|
+
* construction). After first invocation, subsequent calls return the
|
|
89
|
+
* same reference — reference-stable, matches the `getSpec()` contract.
|
|
90
|
+
*
|
|
91
|
+
* `null` (not `undefined`) is the explicit "computed; result was
|
|
92
|
+
* undefined" marker so we can distinguish from "not yet computed."
|
|
93
|
+
* Consumers see `undefined` when no translator was attached.
|
|
94
|
+
*/
|
|
95
|
+
private uiGroupCache;
|
|
96
|
+
/**
|
|
97
|
+
* Return the consumer-shaped UI group for this composition — produced
|
|
98
|
+
* by invoking the consumer's `groupTranslator` (if attached) with this
|
|
99
|
+
* runner's `GroupMetadata`. Returns `undefined` when no translator was
|
|
100
|
+
* attached.
|
|
101
|
+
*
|
|
102
|
+
* STABLE REFERENCE across calls. Computed on first access and cached;
|
|
103
|
+
* subsequent calls return the same value. Pairs with `getSpec()` —
|
|
104
|
+
* library shape on one side, consumer-shaped UI on the other.
|
|
105
|
+
*
|
|
106
|
+
* Subclasses MUST override `buildUIGroupMetadata()` (the next hook) to
|
|
107
|
+
* supply the `GroupMetadata` for their composition kind. This method
|
|
108
|
+
* (the public surface) is `final`-by-convention — do not override.
|
|
109
|
+
*/
|
|
110
|
+
getUIGroup<T = unknown>(): T | undefined;
|
|
111
|
+
/**
|
|
112
|
+
* Subclass hook — returns the consumer's translator if one was
|
|
113
|
+
* provided at construction time. Default: no translator (returns
|
|
114
|
+
* undefined). Each composition overrides to surface its own
|
|
115
|
+
* `opts.groupTranslator`.
|
|
116
|
+
*/
|
|
117
|
+
protected getGroupTranslator(): import('./translator.js').GroupTranslator | undefined;
|
|
118
|
+
/**
|
|
119
|
+
* Translate this runner's group metadata with a CALLER-SUPPLIED
|
|
120
|
+
* translator that overrides the runner's own default. Used by
|
|
121
|
+
* parent compositions to apply per-method translator overrides.
|
|
122
|
+
* See the `Runner.getUIGroupWith` JSDoc for the contract.
|
|
123
|
+
*/
|
|
124
|
+
getUIGroupWith<T = unknown>(override: import('./translator.js').GroupTranslator): T | undefined;
|
|
125
|
+
/**
|
|
126
|
+
* Subclass hook — returns the `GroupMetadata` for this composition.
|
|
127
|
+
* Default: undefined, meaning "no group translation for this runner
|
|
128
|
+
* kind." Compositions override to supply their members + kind. Called
|
|
129
|
+
* AT MOST ONCE per runner (result is cached by `getUIGroup()`).
|
|
130
|
+
*/
|
|
131
|
+
protected buildUIGroupMetadata(): import('./translator.js').GroupMetadata | undefined;
|
|
132
|
+
/**
|
|
133
|
+
* Build + cache the runner's `FlowChart` exactly once. Called by the
|
|
134
|
+
* subclass constructor AFTER all instance fields are set, so the
|
|
135
|
+
* builder lambda can close over them safely.
|
|
136
|
+
*
|
|
137
|
+
* Throws if called twice on the same instance — the chart is meant
|
|
138
|
+
* to be immutable post-construction. Each `run()` reuses the same
|
|
139
|
+
* chart in a fresh `FlowChartExecutor`.
|
|
140
|
+
*
|
|
141
|
+
* Implementation invariant (per footprintjs inventor review):
|
|
142
|
+
* each attached `StructureRecorder` fires exactly N times per
|
|
143
|
+
* construction (N = node count). Two `getSpec()` calls return the
|
|
144
|
+
* same `FlowChart` object reference. `_mergeStageMap` collision
|
|
145
|
+
* guards never see false-positives because each child runner's
|
|
146
|
+
* stage functions are created once and reused.
|
|
147
|
+
*/
|
|
148
|
+
protected initChart(builder: () => FlowChart): void;
|
|
29
149
|
/**
|
|
30
150
|
* Execute the runner. Subclass may override for specialized input
|
|
31
|
-
* mapping, but default invokes
|
|
151
|
+
* mapping, but default invokes getSpec() + FlowChartExecutor.
|
|
32
152
|
*/
|
|
33
153
|
abstract run(input: TIn, options?: RunOptions): Promise<TOut | RunnerPauseOutcome>;
|
|
34
154
|
/**
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"RunnerBase.d.ts","sourceRoot":"","sources":["../../../src/core/RunnerBase.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAEH,OAAO,KAAK,EACV,gBAAgB,EAChB,SAAS,EACT,iBAAiB,EACjB,mBAAmB,EACnB,UAAU,EACX,MAAM,aAAa,CAAC;AACrB,OAAO,EAAE,eAAe,EAAE,MAAM,yBAAyB,CAAC;AAC1D,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,YAAY,CAAC;AACrD,OAAO,KAAK,EACV,aAAa,EACb,aAAa,EACb,WAAW,EACX,gBAAgB,EAChB,oBAAoB,EACrB,MAAM,yBAAyB,CAAC;AACjC,OAAO,KAAK,EAGV,uBAAuB,EACxB,MAAM,uBAAuB,CAAC;AAC/B,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,oBAAoB,CAAC;AAgBpD,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,EAAE,MAAM,aAAa,CAAC;AAI3D;;GAEG;AACH,wBAAgB,SAAS,IAAI,MAAM,CAElC;AAED,8BAAsB,UAAU,CAAC,GAAG,GAAG,OAAO,EAAE,IAAI,GAAG,OAAO,CAAE,YAAW,MAAM,CAAC,GAAG,EAAE,IAAI,CAAC;IAC1F,SAAS,CAAC,QAAQ,CAAC,UAAU,kBAAyB;IACtD,SAAS,CAAC,QAAQ,CAAC,iBAAiB,EAAE,gBAAgB,EAAE,CAAM;
|
|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,EAAE,oBAAoB,EAAE,QAAQ,EAAE,gBAAgB,EAAE,OAAO,CAAC,EAAE,aAAa,GAAG,WAAW;IAkBhG,GAAG,CAAC,CAAC,SAAS,uBAAuB,EAAE,IAAI,EAAE,CAAC,EAAE,QAAQ,EAAE,aAAa,CAAC,CAAC,CAAC,GAAG,IAAI;IACjF,GAAG,CAAC,IAAI,EAAE,oBAAoB,EAAE,QAAQ,EAAE,gBAAgB,GAAG,IAAI;IAUjE,IAAI,CAAC,CAAC,SAAS,uBAAuB,EAAE,IAAI,EAAE,CAAC,EAAE,QAAQ,EAAE,aAAa,CAAC,CAAC,CAAC,GAAG,WAAW;IACzF,IAAI,CAAC,IAAI,EAAE,oBAAoB,EAAE,QAAQ,EAAE,gBAAgB,GAAG,WAAW;IAYzE,MAAM,CAAC,QAAQ,EAAE,gBAAgB,GAAG,WAAW;IAU/C,QAAQ,CAAC,MAAM,EAAE,eAAe,CAe9B;IAIF;;;;;;;OAOG;IACH,IAAI,CAAC,IAAI,EAAE,MAAM,EAAE,OAAO,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAAG,IAAI;IAa1D;;;OAGG;IACH,SAAS,CAAC,WAAW,IAAI,SAAS;IAYlC;;;OAGG;IACH,SAAS,CAAC,eAAe,IAAI,SAAS,MAAM,EAAE;IAI9C;;;;OAIG;IACH,SAAS,CAAC,aAAa,IAAI,eAAe;CAG3C"}
|
|
@@ -37,7 +37,7 @@
|
|
|
37
37
|
* mounts as a subflow between IterationStart and CallLLM with a
|
|
38
38
|
* TranslateFailFast stage after it. Lands in the next commit.)
|
|
39
39
|
*/
|
|
40
|
-
import type { FlowChart } from 'footprintjs';
|
|
40
|
+
import type { FlowChart, StructureRecorder } from 'footprintjs';
|
|
41
41
|
import type { CachePolicy } from '../../cache/types.js';
|
|
42
42
|
import type { MemoryDefinition } from '../../memory/define.types.js';
|
|
43
43
|
/**
|
|
@@ -74,6 +74,12 @@ export interface AgentChartDeps {
|
|
|
74
74
|
readonly cacheDecisionSubflow: FlowChart;
|
|
75
75
|
readonly updateSkillHistoryStage: (scope: never) => void;
|
|
76
76
|
readonly cacheGateDecide: (scope: never) => unknown;
|
|
77
|
+
/** Structure recorders threaded into both `flowChart()` calls (the
|
|
78
|
+
* main chart and the PrepareFinal sub-chart). Each recorder
|
|
79
|
+
* observes per-node build events (`onStageAdded` /
|
|
80
|
+
* `onSubflowMounted` / etc.) for the Agent's chart. Undefined when
|
|
81
|
+
* the consumer didn't attach any. */
|
|
82
|
+
readonly structureRecorders?: readonly StructureRecorder[];
|
|
77
83
|
}
|
|
78
84
|
/**
|
|
79
85
|
* Build the agent's complete FlowChart from the supplied deps.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"buildAgentChart.d.ts","sourceRoot":"","sources":["../../../../src/core/agent/buildAgentChart.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAsCG;AAIH,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,aAAa,CAAC;
|
|
1
|
+
{"version":3,"file":"buildAgentChart.d.ts","sourceRoot":"","sources":["../../../../src/core/agent/buildAgentChart.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAsCG;AAIH,OAAO,KAAK,EAAE,SAAS,EAAE,iBAAiB,EAAE,MAAM,aAAa,CAAC;AAEhE,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,sBAAsB,CAAC;AAGxD,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,8BAA8B,CAAC;AAQrE;;;;GAIG;AACH,MAAM,WAAW,cAAc;IAC7B,oEAAoE;IACpE,QAAQ,CAAC,QAAQ,EAAE,SAAS,gBAAgB,EAAE,CAAC;IAE/C;uEACmE;IACnE,QAAQ,CAAC,uBAAuB,EAAE,WAAW,CAAC;IAE9C;kDAC8C;IAC9C,QAAQ,CAAC,aAAa,EAAE,MAAM,CAAC;IAG/B,QAAQ,CAAC,IAAI,EAAE,CAAC,KAAK,EAAE,KAAK,KAAK,IAAI,CAAC;IACtC,QAAQ,CAAC,cAAc,EAAE,CAAC,KAAK,EAAE,KAAK,KAAK,IAAI,CAAC;IAChD,QAAQ,CAAC,OAAO,EAAE,CAAC,KAAK,EAAE,KAAK,KAAK,OAAO,CAAC,IAAI,CAAC,CAAC;IAClD,QAAQ,CAAC,YAAY,EAAE,CAAC,KAAK,EAAE,KAAK,KAAK,YAAY,GAAG,OAAO,CAAC;IAChE,QAAQ,CAAC,gBAAgB,EAAE,OAAO,aAAa,EAAE,eAAe,CAAC,KAAK,CAAC,CAAC;IAGxE,QAAQ,CAAC,sBAAsB,EAAE,SAAS,CAAC;IAC3C,QAAQ,CAAC,mBAAmB,EAAE,SAAS,CAAC;IACxC,QAAQ,CAAC,eAAe,EAAE,SAAS,CAAC;IACpC,QAAQ,CAAC,YAAY,EAAE,SAAS,CAAC;IACjC;;;;;;OAMG;IACH,QAAQ,CAAC,eAAe,CAAC,EAAE,SAAS,CAAC;IAGrC,QAAQ,CAAC,oBAAoB,EAAE,SAAS,CAAC;IACzC,QAAQ,CAAC,uBAAuB,EAAE,CAAC,KAAK,EAAE,KAAK,KAAK,IAAI,CAAC;IACzD,QAAQ,CAAC,eAAe,EAAE,CAAC,KAAK,EAAE,KAAK,KAAK,OAAO,CAAC;IAGpD;;;;0CAIsC;IACtC,QAAQ,CAAC,kBAAkB,CAAC,EAAE,SAAS,iBAAiB,EAAE,CAAC;CAC5D;AAED;;GAEG;AACH,wBAAgB,eAAe,CAAC,IAAI,EAAE,cAAc,GAAG,SAAS,CA0P/D"}
|
|
@@ -7,6 +7,8 @@
|
|
|
7
7
|
* part of the v2.11.1 decomposition. `core/Agent.ts` re-exports them
|
|
8
8
|
* for back-compat (the 28+ existing import sites continue to work).
|
|
9
9
|
*/
|
|
10
|
+
import type { StructureRecorder } from 'footprintjs';
|
|
11
|
+
import type { GroupTranslator } from '../translator.js';
|
|
10
12
|
import type { LLMMessage, LLMProvider, LLMToolSchema, PermissionChecker, PricingTable } from '../../adapters/types.js';
|
|
11
13
|
import type { CacheMarker, CacheStrategy } from '../../cache/types.js';
|
|
12
14
|
import type { ActiveInjection } from '../../lib/injection-engine/types.js';
|
|
@@ -64,6 +66,33 @@ export interface AgentOptions {
|
|
|
64
66
|
* once those land in Phase 7+.
|
|
65
67
|
*/
|
|
66
68
|
readonly cacheStrategy?: CacheStrategy;
|
|
69
|
+
/**
|
|
70
|
+
* Optional build-time recorders threaded into footprintjs's
|
|
71
|
+
* `flowChart()` factory. Each recorder fires `onStageAdded` once per
|
|
72
|
+
* node in the Agent's internal chart (Seed, IterationStart, CallLLM,
|
|
73
|
+
* Route, tool handler, slot mounts, PrepareFinal, BreakFinal), and
|
|
74
|
+
* `onSubflowMounted` once per mounted subflow. Recorders own their
|
|
75
|
+
* own accumulators — agentfootprint just threads them through.
|
|
76
|
+
*
|
|
77
|
+
* Cascade: each slot subflow (system-prompt, messages, tools)
|
|
78
|
+
* was built earlier with its OWN recorders (or none).
|
|
79
|
+
* footprintjs does NOT propagate StructureRecorders into mounted
|
|
80
|
+
* subflows — attach the same recorders to every nested composition
|
|
81
|
+
* for full coverage.
|
|
82
|
+
*
|
|
83
|
+
* When omitted, no build-time observation is wired up.
|
|
84
|
+
*/
|
|
85
|
+
readonly structureRecorders?: readonly StructureRecorder[];
|
|
86
|
+
/**
|
|
87
|
+
* Optional per-COMPOSITION translator (UI-agnostic). See
|
|
88
|
+
* `core/translator.ts`. When attached, `agent.getUIGroup()` invokes
|
|
89
|
+
* it with the Agent's `GroupMetadata` (kind `'Agent'`, id, name,
|
|
90
|
+
* empty `members[]`, plus `extra.slots` and `extra.toolNames`).
|
|
91
|
+
* Tools are not `Runner` instances (they're function executors)
|
|
92
|
+
* so they're conveyed by name in `extra`, not as group members.
|
|
93
|
+
* Returns `undefined` when omitted.
|
|
94
|
+
*/
|
|
95
|
+
readonly groupTranslator?: GroupTranslator;
|
|
67
96
|
}
|
|
68
97
|
export interface AgentInput {
|
|
69
98
|
readonly message: string;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../../src/core/agent/types.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAEH,OAAO,KAAK,EACV,UAAU,EACV,WAAW,EACX,aAAa,EACb,iBAAiB,EACjB,YAAY,EACb,MAAM,yBAAyB,CAAC;AACjC,OAAO,KAAK,EAAE,WAAW,EAAE,aAAa,EAAE,MAAM,sBAAsB,CAAC;AACvE,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,qCAAqC,CAAC;AAC3E,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,+BAA+B,CAAC;AACrE,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,gCAAgC,CAAC;AACrE,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,yBAAyB,CAAC;AAI7D,MAAM,WAAW,YAAY;IAC3B,QAAQ,CAAC,QAAQ,EAAE,WAAW,CAAC;IAC/B,qEAAqE;IACrE,QAAQ,CAAC,IAAI,CAAC,EAAE,MAAM,CAAC;IACvB,8DAA8D;IAC9D,QAAQ,CAAC,EAAE,CAAC,EAAE,MAAM,CAAC;IACrB,QAAQ,CAAC,KAAK,EAAE,MAAM,CAAC;IACvB,QAAQ,CAAC,WAAW,CAAC,EAAE,MAAM,CAAC;IAC9B,QAAQ,CAAC,SAAS,CAAC,EAAE,MAAM,CAAC;IAC5B,kEAAkE;IAClE,QAAQ,CAAC,aAAa,CAAC,EAAE,MAAM,CAAC;IAChC;;;;OAIG;IACH,QAAQ,CAAC,YAAY,CAAC,EAAE,YAAY,CAAC;IACrC;;;;;OAKG;IACH,QAAQ,CAAC,UAAU,CAAC,EAAE,MAAM,CAAC;IAC7B;;;;;;;OAOG;IACH,QAAQ,CAAC,iBAAiB,CAAC,EAAE,iBAAiB,CAAC;IAC/C;;;;;;;;;OASG;IACH,QAAQ,CAAC,OAAO,CAAC,EAA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7B,kEAAkE;IAClE,mBAAmB,CAAC,EAAE,MAAM,CAAC;IAG7B;;;6EAGyE;IACzE,WAAW,CAAC,EAAE,OAAO,CAAC;IACtB;;;;0CAIsC;IACtC,cAAc,EAAE,SAAS,aAAa,EAAE,CAAC;CAC1C"}
|
|
@@ -1,10 +1,11 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* Runner — consumer-facing interface for every primitive/composition/pattern.
|
|
3
3
|
*
|
|
4
|
-
* Pattern: Facade (GoF) over
|
|
4
|
+
* Pattern: Facade (GoF) over the footprintjs FlowChart + EventDispatcher.
|
|
5
5
|
* Role: The one object consumers hold. Exposes:
|
|
6
|
-
* - `.run()`
|
|
7
|
-
*
|
|
6
|
+
* - `.run()` (execute)
|
|
7
|
+
* - `.getSpec()` (the design-time FlowChart blueprint —
|
|
8
|
+
* same value footprintjs's `addSubFlowChart*` accepts)
|
|
8
9
|
* - `.on() / .off() / .once()` (listener subscription)
|
|
9
10
|
* - `.attach()` (attach custom CombinedRecorder)
|
|
10
11
|
* - `.emit()` (consumer-defined custom events on the same
|
|
@@ -12,7 +13,7 @@
|
|
|
12
13
|
* Emits: N/A — this file defines the INTERFACE. Concrete runners
|
|
13
14
|
* (LLMCall, Agent, Sequence, etc.) implement it.
|
|
14
15
|
*/
|
|
15
|
-
import type { CombinedRecorder,
|
|
16
|
+
import type { CombinedRecorder, FlowChart, FlowchartCheckpoint, RunOptions } from 'footprintjs';
|
|
16
17
|
import type { RunnerPauseOutcome } from './pause.js';
|
|
17
18
|
import type { EventListener, ListenOptions, Unsubscribe, WildcardListener, WildcardSubscription } from '../events/dispatcher.js';
|
|
18
19
|
import type { AgentfootprintEvent, AgentfootprintEventType } from '../events/registry.js';
|
|
@@ -73,7 +74,52 @@ export interface EnableNamespace {
|
|
|
73
74
|
* That makes them freely nestable: any runner can be a child of any
|
|
74
75
|
* composition.
|
|
75
76
|
*/
|
|
76
|
-
export interface Runner<TIn = unknown, TOut = unknown>
|
|
77
|
+
export interface Runner<TIn = unknown, TOut = unknown> {
|
|
78
|
+
/**
|
|
79
|
+
* Return the footprintjs FlowChart for this runner — the canonical
|
|
80
|
+
* design-time blueprint. Stable across calls. Pairs with the run-time
|
|
81
|
+
* accessors (`getLastSnapshot`, `getCommitCount`) and matches
|
|
82
|
+
* `ExplainableShell.spec` + `specToReactFlow(spec, ...)` consumer
|
|
83
|
+
* conventions.
|
|
84
|
+
*
|
|
85
|
+
* Subflow mounting (footprintjs `addSubFlowChart*`) accepts the
|
|
86
|
+
* `FlowChart` value directly:
|
|
87
|
+
*
|
|
88
|
+
* parent.addSubFlowChartNext('sf-agent', child.getSpec(), 'Agent')
|
|
89
|
+
*/
|
|
90
|
+
getSpec(): FlowChart;
|
|
91
|
+
/**
|
|
92
|
+
* Return the consumer-shaped UI group for this runner — produced by
|
|
93
|
+
* invoking the `groupTranslator` (if one was attached at constructor
|
|
94
|
+
* time) with this composition's metadata. Returns `undefined` when no
|
|
95
|
+
* translator was attached.
|
|
96
|
+
*
|
|
97
|
+
* Companion of `getSpec()`: `getSpec()` is the canonical (UI-
|
|
98
|
+
* agnostic) blueprint; `getUIGroup()` is the consumer-shaped view.
|
|
99
|
+
* Both are stable post-construction.
|
|
100
|
+
*
|
|
101
|
+
* See `core/translator.ts` for the `GroupTranslator` /
|
|
102
|
+
* `GroupMetadata` types.
|
|
103
|
+
*/
|
|
104
|
+
getUIGroup<T = unknown>(): T | undefined;
|
|
105
|
+
/**
|
|
106
|
+
* Translate this runner's group metadata with a CALLER-SUPPLIED
|
|
107
|
+
* translator that OVERRIDES whatever translator (if any) the runner
|
|
108
|
+
* was constructed with. Used by parent compositions to apply
|
|
109
|
+
* per-method translator overrides (e.g.,
|
|
110
|
+
* `Parallel.create(...).branch('special', runner, { groupTranslator: ... })`
|
|
111
|
+
* — for the `'special'` branch only, this `override` runs against
|
|
112
|
+
* `runner`'s own `GroupMetadata` instead of the runner's default
|
|
113
|
+
* translator).
|
|
114
|
+
*
|
|
115
|
+
* NOT cached at the runner level. The caller invokes this exactly
|
|
116
|
+
* once per build (parent's `buildUIGroupMetadata`) and caches the
|
|
117
|
+
* resulting `uiGroup` via the parent's `RunnerBase.uiGroupCache`.
|
|
118
|
+
*
|
|
119
|
+
* Returns `undefined` when this runner has no group metadata to
|
|
120
|
+
* translate (i.e., `buildUIGroupMetadata()` returned `undefined`).
|
|
121
|
+
*/
|
|
122
|
+
getUIGroupWith<T = unknown>(override: import('./translator.js').GroupTranslator): T | undefined;
|
|
77
123
|
/**
|
|
78
124
|
* Execute the runner. On happy-path completion, resolves with `TOut`.
|
|
79
125
|
* If any stage (Agent tool via `pauseHere`, nested runner, or consumer
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"runner.d.ts","sourceRoot":"","sources":["../../../src/core/runner.ts"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"runner.d.ts","sourceRoot":"","sources":["../../../src/core/runner.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAEH,OAAO,KAAK,EAAE,gBAAgB,EAAE,SAAS,EAAE,mBAAmB,EAAE,UAAU,EAAE,MAAM,aAAa,CAAC;AAChG,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,YAAY,CAAC;AACrD,OAAO,KAAK,EACV,aAAa,EACb,aAAa,EACb,WAAW,EACX,gBAAgB,EAChB,oBAAoB,EACrB,MAAM,yBAAyB,CAAC;AACjC,OAAO,KAAK,EAAE,mBAAmB,EAAE,uBAAuB,EAAE,MAAM,uBAAuB,CAAC;AAC1F,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,+CAA+C,CAAC;AACpF,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,gDAAgD,CAAC;AACtF,OAAO,KAAK,EACV,eAAe,EACf,gBAAgB,EACjB,MAAM,iDAAiD,CAAC;AACzD,OAAO,KAAK,EACV,0BAA0B,EAC1B,iBAAiB,EACjB,uBAAuB,EACxB,MAAM,yBAAyB,CAAC;AAEjC;;;;GAI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","sourceRoot":"","sources":["../../../../src/core/slots/buildSystemPromptSlot.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;GAaG;AAGH,OAAO,KAAK,EAAE,SAAS,EAAc,MAAM,aAAa,CAAC;AAOzD;;;GAGG;AACH,MAAM,MAAM,cAAc,GAAG,CAAC,IAAI,EAAE;IAClC,QAAQ,CAAC,WAAW,CAAC,EAAE,MAAM,CAAC;IAC9B,QAAQ,CAAC,SAAS,CAAC,EAAE,MAAM,CAAC;CAC7B,KAAK,MAAM,GAAG,OAAO,CAAC,MAAM,CAAC,CAAC;AAE/B,MAAM,WAAW,sBAAsB;IACrC,4EAA4E;IAC5E,QAAQ,CAAC,MAAM,EAAE,MAAM,GAAG,cAAc,CAAC;IACzC,yCAAyC;IACzC,QAAQ,CAAC,SAAS,CAAC,EAAE,MAAM,CAAC;IAC5B,mFAAmF;IACnF,QAAQ,CAAC,MAAM,CAAC,EAAE,MAAM,CAAC;CAC1B;AAWD;;;;;;;;GAQG;AACH,wBAAgB,qBAAqB,CAAC,MAAM,EAAE,sBAAsB,GAAG,SAAS,
|
|
1
|
+
{"version":3,"file":"buildSystemPromptSlot.d.ts","sourceRoot":"","sources":["../../../../src/core/slots/buildSystemPromptSlot.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;GAaG;AAGH,OAAO,KAAK,EAAE,SAAS,EAAc,MAAM,aAAa,CAAC;AAOzD;;;GAGG;AACH,MAAM,MAAM,cAAc,GAAG,CAAC,IAAI,EAAE;IAClC,QAAQ,CAAC,WAAW,CAAC,EAAE,MAAM,CAAC;IAC9B,QAAQ,CAAC,SAAS,CAAC,EAAE,MAAM,CAAC;CAC7B,KAAK,MAAM,GAAG,OAAO,CAAC,MAAM,CAAC,CAAC;AAE/B,MAAM,WAAW,sBAAsB;IACrC,4EAA4E;IAC5E,QAAQ,CAAC,MAAM,EAAE,MAAM,GAAG,cAAc,CAAC;IACzC,yCAAyC;IACzC,QAAQ,CAAC,SAAS,CAAC,EAAE,MAAM,CAAC;IAC5B,mFAAmF;IACnF,QAAQ,CAAC,MAAM,CAAC,EAAE,MAAM,CAAC;CAC1B;AAWD;;;;;;;;GAQG;AACH,wBAAgB,qBAAqB,CAAC,MAAM,EAAE,sBAAsB,GAAG,SAAS,CAoE/E"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"buildThinkingSubflow.d.ts","sourceRoot":"","sources":["../../../../src/core/slots/buildThinkingSubflow.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;GAoBG;AAGH,OAAO,KAAK,EAAE,SAAS,EAAc,MAAM,aAAa,CAAC;AACzD,OAAO,KAAK,EAAiB,eAAe,EAAE,MAAM,yBAAyB,CAAC;AAU9E;;;;;;;;;;;;;;;GAeG;AACH,wBAAgB,oBAAoB,CAAC,OAAO,EAAE,eAAe,GAAG,SAAS,
|
|
1
|
+
{"version":3,"file":"buildThinkingSubflow.d.ts","sourceRoot":"","sources":["../../../../src/core/slots/buildThinkingSubflow.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;GAoBG;AAGH,OAAO,KAAK,EAAE,SAAS,EAAc,MAAM,aAAa,CAAC;AACzD,OAAO,KAAK,EAAiB,eAAe,EAAE,MAAM,yBAAyB,CAAC;AAU9E;;;;;;;;;;;;;;;GAeG;AACH,wBAAgB,oBAAoB,CAAC,OAAO,EAAE,eAAe,GAAG,SAAS,CA2ExE"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"buildToolsSlot.d.ts","sourceRoot":"","sources":["../../../../src/core/slots/buildToolsSlot.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;GAWG;AAGH,OAAO,KAAK,EAAE,SAAS,EAAc,MAAM,aAAa,CAAC;AACzD,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,yBAAyB,CAAC;AAM7D,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,aAAa,CAAC;AACxC,OAAO,KAAK,EAAE,YAAY,EAA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AM,CAAC;CAC7B;AAMD;;;;;;;;GAQG;AACH,wBAAgB,cAAc,CAAC,MAAM,EAAE,eAAe,GAAG,SAAS,CAkMjE"}
|
|
@@ -0,0 +1,95 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* GroupTranslator — UI-agnostic composition-level translator hook.
|
|
3
|
+
*
|
|
4
|
+
* Pattern: Visitor (GoF) at the composition boundary. Consumer supplies
|
|
5
|
+
* a translator function; each agentfootprint composition
|
|
6
|
+
* (Parallel, Sequence, Loop, Conditional, Agent, LLMCall)
|
|
7
|
+
* invokes it with composition-level metadata to produce a
|
|
8
|
+
* consumer-shaped UI output.
|
|
9
|
+
* Role: The per-COMPOSITION hook alongside footprintjs's per-NODE
|
|
10
|
+
* `StructureRecorder`. The two are independent — a consumer
|
|
11
|
+
* can attach either, both, or neither.
|
|
12
|
+
*
|
|
13
|
+
* - StructureRecorder observes ONE spec node at a time (record).
|
|
14
|
+
* - GroupTranslator sees the WHOLE composition (compose).
|
|
15
|
+
*
|
|
16
|
+
* For Lens's compound rendering (Parallel-as-container,
|
|
17
|
+
* Agent-as-drillable-card, LLMCall-as-card-with-slots),
|
|
18
|
+
* this is the right granularity: the translator knows the
|
|
19
|
+
* composition KIND and its full member list at once, so it
|
|
20
|
+
* can emit a single group-level shape with children pre-laid.
|
|
21
|
+
*
|
|
22
|
+
* Cascade: each composition that runs nested compositions exposes its
|
|
23
|
+
* members' OWN translated outputs via `GroupMember.uiGroup`.
|
|
24
|
+
* The consumer threads the same translator through every
|
|
25
|
+
* composition's construction (or per-method override via
|
|
26
|
+
* L1c) to get end-to-end coverage. No automatic propagation
|
|
27
|
+
* — propagation requires footprintjs-level changes which
|
|
28
|
+
* we're not making for this hook.
|
|
29
|
+
*/
|
|
30
|
+
import type { Runner } from './runner.js';
|
|
31
|
+
/**
|
|
32
|
+
* The composition KIND a translator sees in `GroupMetadata.kind`.
|
|
33
|
+
* Closed union — every agentfootprint composition declares exactly
|
|
34
|
+
* one of these via the literal string baked into its `buildChart()`
|
|
35
|
+
* description prefix and surfaced here in `GroupMetadata`.
|
|
36
|
+
*/
|
|
37
|
+
export type GroupKind = 'Parallel' | 'Sequence' | 'Loop' | 'Conditional' | 'Agent' | 'LLMCall';
|
|
38
|
+
/**
|
|
39
|
+
* One member of a composition. Shape is uniform across composition
|
|
40
|
+
* kinds — Parallel branches, Sequence steps, Loop body, Conditional
|
|
41
|
+
* branches, Agent tools/slots, LLMCall slots all map to this.
|
|
42
|
+
*
|
|
43
|
+
* `memberId` is the stable id the composition assigned (e.g. `legal`
|
|
44
|
+
* for a Parallel branch, `step-classify` for a Sequence step,
|
|
45
|
+
* `body` for a Loop). Consumers can correlate this with the
|
|
46
|
+
* SpecNode's `subflowId` / `id` to drill in.
|
|
47
|
+
*
|
|
48
|
+
* `runner` is the underlying `Runner` instance — useful for the
|
|
49
|
+
* consumer to call `member.runner.getSpec()` for the nested chart or
|
|
50
|
+
* `member.runner.getUIGroup()` for the nested translation result
|
|
51
|
+
* (when the same translator was threaded through that runner's
|
|
52
|
+
* construction).
|
|
53
|
+
*
|
|
54
|
+
* `uiGroup` is the member's already-translated output. Populated
|
|
55
|
+
* when the consumer threaded the same `groupTranslator` reference
|
|
56
|
+
* into each member's construction; `undefined` otherwise.
|
|
57
|
+
*/
|
|
58
|
+
export interface GroupMember {
|
|
59
|
+
readonly memberId: string;
|
|
60
|
+
readonly runner: Runner;
|
|
61
|
+
readonly uiGroup?: unknown;
|
|
62
|
+
}
|
|
63
|
+
/**
|
|
64
|
+
* What a composition hands to its `groupTranslator` at build time.
|
|
65
|
+
* All composition kinds emit the same shape — the `kind` discriminator
|
|
66
|
+
* + the `extra` bag carry per-composition specifics.
|
|
67
|
+
*/
|
|
68
|
+
export interface GroupMetadata {
|
|
69
|
+
readonly kind: GroupKind;
|
|
70
|
+
readonly id: string;
|
|
71
|
+
readonly name: string;
|
|
72
|
+
readonly members: ReadonlyArray<GroupMember>;
|
|
73
|
+
/**
|
|
74
|
+
* Composition-specific extras. Carried verbatim from the
|
|
75
|
+
* composition's own state — `Parallel` puts the merge strategy
|
|
76
|
+
* here, `Loop` puts iteration budgets, `Conditional` puts the
|
|
77
|
+
* fallback branch id, etc. Closed enough per kind that consumers
|
|
78
|
+
* can switch on `kind` to read it safely.
|
|
79
|
+
*/
|
|
80
|
+
readonly extra?: Readonly<Record<string, unknown>>;
|
|
81
|
+
}
|
|
82
|
+
/**
|
|
83
|
+
* The consumer-supplied translator. Pure function — no async, no
|
|
84
|
+
* side effects expected. Runs ONCE per composition at the moment
|
|
85
|
+
* `getUIGroup()` is first called (memoised behaviour is per
|
|
86
|
+
* composition's discretion).
|
|
87
|
+
*
|
|
88
|
+
* Output type `T` is whatever the consumer wants — a React Flow
|
|
89
|
+
* group node, a Mermaid string, a domain-specific layout object,
|
|
90
|
+
* anything. agentfootprint stays UI-agnostic.
|
|
91
|
+
*/
|
|
92
|
+
export interface GroupTranslator<T = unknown> {
|
|
93
|
+
(group: GroupMetadata): T;
|
|
94
|
+
}
|
|
95
|
+
//# sourceMappingURL=translator.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"translator.d.ts","sourceRoot":"","sources":["../../../src/core/translator.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA4BG;AAEH,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,aAAa,CAAC;AAE1C;;;;;GAKG;AACH,MAAM,MAAM,SAAS,GAAG,UAAU,GAAG,UAAU,GAAG,MAAM,GAAG,aAAa,GAAG,OAAO,GAAG,SAAS,CAAC;AAE/F;;;;;;;;;;;;;;;;;;;GAmBG;AACH,MAAM,WAAW,WAAW;IAC1B,QAAQ,CAAC,QAAQ,EAAE,MAAM,CAAC;IAC1B,QAAQ,CAAC,MAAM,EAAE,MAAM,CAAC;IACxB,QAAQ,CAAC,OAAO,CAAC,EAAE,OAAO,CAAC;CAC5B;AAED;;;;GAIG;AACH,MAAM,WAAW,aAAa;IAC5B,QAAQ,CAAC,IAAI,EAAE,SAAS,CAAC;IACzB,QAAQ,CAAC,EAAE,EAAE,MAAM,CAAC;IACpB,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;IACtB,QAAQ,CAAC,OAAO,EAAE,aAAa,CAAC,WAAW,CAAC,CAAC;IAC7C;;;;;;OAMG;IACH,QAAQ,CAAC,KAAK,CAAC,EAAE,QAAQ,CAAC,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC,CAAC;CACpD;AAED;;;;;;;;;GASG;AACH,MAAM,WAAW,eAAe,CAAC,CAAC,GAAG,OAAO;IAC1C,CAAC,KAAK,EAAE,aAAa,GAAG,CAAC,CAAC;CAC3B"}
|