agentfootprint 6.44.0 → 7.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/AGENTS.md +4 -0
- package/CLAUDE.md +4 -0
- package/README.md +141 -167
- package/ai-instructions/claude-code/SKILL.md +11 -0
- package/ai-instructions/setup.sh +0 -0
- package/dist/adapters/llm/BrowserOpenAIProvider.js +1 -1
- package/dist/adapters/llm/MockProvider.js +2 -1
- package/dist/adapters/llm/MockProvider.js.map +1 -1
- package/dist/core/agent/buildAgentChart.js +2 -1
- package/dist/core/agent/buildAgentChart.js.map +1 -1
- package/dist/core/agent/buildDynamicAgentChart.js +3 -1
- package/dist/core/agent/buildDynamicAgentChart.js.map +1 -1
- package/dist/core/agent/stages/pickEntry.js +3 -1
- package/dist/core/agent/stages/pickEntry.js.map +1 -1
- package/dist/debug/finders.js +29 -0
- package/dist/debug/finders.js.map +1 -0
- package/dist/debug.js +134 -0
- package/dist/debug.js.map +1 -0
- package/dist/esm/adapters/identity/agentcore.d.ts +100 -0
- package/dist/esm/adapters/llm/AnthropicProvider.d.ts +130 -0
- package/dist/esm/adapters/llm/BedrockProvider.d.ts +100 -0
- package/dist/esm/adapters/llm/BrowserAnthropicProvider.d.ts +41 -0
- package/dist/esm/adapters/llm/BrowserOpenAIProvider.d.ts +95 -0
- package/dist/esm/adapters/llm/BrowserOpenAIProvider.js +1 -1
- package/dist/esm/adapters/llm/MockProvider.d.ts +154 -0
- package/dist/esm/adapters/llm/MockProvider.js +2 -1
- package/dist/esm/adapters/llm/MockProvider.js.map +1 -1
- package/dist/esm/adapters/llm/OpenAIProvider.d.ts +220 -0
- package/dist/esm/adapters/llm/createProvider.d.ts +85 -0
- package/dist/esm/adapters/memory/agentcore.d.ts +146 -0
- package/dist/esm/adapters/memory/bedrockAgentMemory.d.ts +95 -0
- package/dist/esm/adapters/memory/redis.d.ts +127 -0
- package/dist/esm/adapters/observability/agentcore.d.ts +67 -0
- package/dist/esm/adapters/observability/audit.d.ts +254 -0
- package/dist/esm/adapters/observability/cloudwatch.d.ts +96 -0
- package/dist/esm/adapters/observability/otel.d.ts +237 -0
- package/dist/esm/adapters/observability/xray.d.ts +88 -0
- package/dist/esm/adapters/types.d.ts +378 -0
- package/dist/esm/bridge/eventMeta.d.ts +59 -0
- package/dist/esm/cache/CacheDecisionSubflow.d.ts +85 -0
- package/dist/esm/cache/CacheGateDecider.d.ts +127 -0
- package/dist/esm/cache/applyCachePolicy.d.ts +37 -0
- package/dist/esm/cache/cacheRecorder.d.ts +85 -0
- package/dist/esm/cache/index.d.ts +33 -0
- package/dist/esm/cache/strategies/AnthropicCacheStrategy.d.ts +38 -0
- package/dist/esm/cache/strategies/BedrockCacheStrategy.d.ts +33 -0
- package/dist/esm/cache/strategies/NoOpCacheStrategy.d.ts +29 -0
- package/dist/esm/cache/strategies/OpenAICacheStrategy.d.ts +36 -0
- package/dist/esm/cache/strategyRegistry.d.ts +45 -0
- package/dist/esm/cache/types.d.ts +243 -0
- package/dist/esm/conventions.d.ts +203 -0
- package/dist/esm/core/Agent.d.ts +355 -0
- package/dist/esm/core/LLMCall.d.ts +139 -0
- package/dist/esm/core/RunnerBase.d.ts +267 -0
- package/dist/esm/core/agent/AgentBuilder.d.ts +565 -0
- package/dist/esm/core/agent/buildAgentChart.d.ts +109 -0
- package/dist/esm/core/agent/buildAgentChart.js +2 -1
- package/dist/esm/core/agent/buildAgentChart.js.map +1 -1
- package/dist/esm/core/agent/buildAgentMessageApiChart.d.ts +40 -0
- package/dist/esm/core/agent/buildCacheSubflow.d.ts +35 -0
- package/dist/esm/core/agent/buildDynamicAgentChart.d.ts +56 -0
- package/dist/esm/core/agent/buildDynamicAgentChart.js +3 -1
- package/dist/esm/core/agent/buildDynamicAgentChart.js.map +1 -1
- package/dist/esm/core/agent/buildMessageApiChart.d.ts +47 -0
- package/dist/esm/core/agent/buildToolRegistry.d.ts +61 -0
- package/dist/esm/core/agent/memoryRecallInjections.d.ts +8 -0
- package/dist/esm/core/agent/stages/breakFinal.d.ts +22 -0
- package/dist/esm/core/agent/stages/callLLM.d.ts +74 -0
- package/dist/esm/core/agent/stages/pickEntry.d.ts +19 -0
- package/dist/esm/core/agent/stages/pickEntry.js +3 -1
- package/dist/esm/core/agent/stages/pickEntry.js.map +1 -1
- package/dist/esm/core/agent/stages/prepareFinal.d.ts +19 -0
- package/dist/esm/core/agent/stages/reliabilityExecution.d.ts +135 -0
- package/dist/esm/core/agent/stages/route.d.ts +18 -0
- package/dist/esm/core/agent/stages/seed.d.ts +53 -0
- package/dist/esm/core/agent/stages/toolCalls.d.ts +76 -0
- package/dist/esm/core/agent/toolArgsValidation.d.ts +62 -0
- package/dist/esm/core/agent/types.d.ts +382 -0
- package/dist/esm/core/agent/validators.d.ts +52 -0
- package/dist/esm/core/cost.d.ts +38 -0
- package/dist/esm/core/flowchartAsTool.d.ts +200 -0
- package/dist/esm/core/humanizeLLMError.d.ts +23 -0
- package/dist/esm/core/outputFallback.d.ts +139 -0
- package/dist/esm/core/outputSchema.d.ts +127 -0
- package/dist/esm/core/pause.d.ts +74 -0
- package/dist/esm/core/runCheckpoint.d.ts +179 -0
- package/dist/esm/core/runner.d.ts +203 -0
- package/dist/esm/core/slots/buildMessagesSlot.d.ts +40 -0
- package/dist/esm/core/slots/buildSystemPromptSlot.d.ts +41 -0
- package/dist/esm/core/slots/buildThinkingSubflow.d.ts +40 -0
- package/dist/esm/core/slots/buildToolsSlot.d.ts +60 -0
- package/dist/esm/core/slots/helpers.d.ts +27 -0
- package/dist/esm/core/toolContract.d.ts +43 -0
- package/dist/esm/core/tools.d.ts +90 -0
- package/dist/esm/core/translator.d.ts +94 -0
- package/dist/esm/core-flow/Conditional.d.ts +119 -0
- package/dist/esm/core-flow/Loop.d.ts +160 -0
- package/dist/esm/core-flow/Parallel.d.ts +360 -0
- package/dist/esm/core-flow/Sequence.d.ts +133 -0
- package/dist/esm/debug/finders.d.ts +12 -0
- package/dist/esm/debug/finders.js +13 -0
- package/dist/esm/debug/finders.js.map +1 -0
- package/dist/esm/debug.d.ts +25 -0
- package/dist/esm/debug.js +54 -0
- package/dist/esm/debug.js.map +1 -0
- package/dist/esm/events/dispatcher.d.ts +134 -0
- package/dist/esm/events/payloads.d.ts +761 -0
- package/dist/esm/events/registry.d.ts +198 -0
- package/dist/esm/events/types.d.ts +70 -0
- package/dist/esm/events.d.ts +18 -0
- package/dist/esm/events.js +22 -0
- package/dist/esm/events.js.map +1 -0
- package/dist/esm/identity/kinds.d.ts +36 -0
- package/dist/esm/identity/staticTokens.d.ts +28 -0
- package/dist/esm/identity/types.d.ts +113 -0
- package/dist/esm/identity/withCredentialRetry.d.ts +64 -0
- package/dist/esm/identity.d.ts +31 -0
- package/dist/esm/index.d.ts +44 -0
- package/dist/esm/index.js +7 -52
- package/dist/esm/index.js.map +1 -1
- package/dist/esm/injection-engine.d.ts +4 -0
- package/dist/esm/lib/canonicalJson.d.ts +56 -0
- package/dist/esm/lib/context-bisect/ablation.d.ts +109 -0
- package/dist/esm/lib/context-bisect/bisect.d.ts +75 -0
- package/dist/esm/lib/context-bisect/cost.d.ts +37 -0
- package/dist/esm/lib/context-bisect/index.d.ts +31 -0
- package/dist/esm/lib/context-bisect/index.js +3 -0
- package/dist/esm/lib/context-bisect/index.js.map +1 -1
- package/dist/esm/lib/context-bisect/llmEdgeWeigher.d.ts +124 -0
- package/dist/esm/lib/context-bisect/localize.d.ts +152 -0
- package/dist/esm/lib/context-bisect/localize.js +2 -0
- package/dist/esm/lib/context-bisect/localize.js.map +1 -1
- package/dist/esm/lib/context-bisect/loop-recall.d.ts +97 -0
- package/dist/esm/lib/context-bisect/missingContext.d.ts +71 -0
- package/dist/esm/lib/context-bisect/restoration.d.ts +39 -0
- package/dist/esm/lib/context-bisect/toBacktrackTrace.d.ts +138 -0
- package/dist/esm/lib/context-bisect/trajectory.d.ts +168 -0
- package/dist/esm/lib/context-bisect/types.d.ts +448 -0
- package/dist/esm/lib/context-bisect/walk-to-root.d.ts +103 -0
- package/dist/esm/lib/influence-core/attributability.d.ts +72 -0
- package/dist/esm/lib/influence-core/cache.d.ts +94 -0
- package/dist/esm/lib/influence-core/contrastive.d.ts +26 -0
- package/dist/esm/lib/influence-core/index.d.ts +34 -0
- package/dist/esm/lib/influence-core/margin.d.ts +33 -0
- package/dist/esm/lib/influence-core/signals.d.ts +128 -0
- package/dist/esm/lib/influence-core/similarity.d.ts +25 -0
- package/dist/esm/lib/influence-core/types.d.ts +252 -0
- package/dist/esm/lib/injection-engine/SkillRegistry.d.ts +147 -0
- package/dist/esm/lib/injection-engine/buildInjectionEngineSubflow.d.ts +110 -0
- package/dist/esm/lib/injection-engine/buildInjectionEngineSubflow.js +1 -0
- package/dist/esm/lib/injection-engine/buildInjectionEngineSubflow.js.map +1 -1
- package/dist/esm/lib/injection-engine/entryScorer.d.ts +93 -0
- package/dist/esm/lib/injection-engine/entryScorer.js +172 -0
- package/dist/esm/lib/injection-engine/entryScorer.js.map +1 -0
- package/dist/esm/lib/injection-engine/evaluator.d.ts +24 -0
- package/dist/esm/lib/injection-engine/factories/defineFact.d.ts +60 -0
- package/dist/esm/lib/injection-engine/factories/defineInjection.d.ts +41 -0
- package/dist/esm/lib/injection-engine/factories/defineInstruction.d.ts +78 -0
- package/dist/esm/lib/injection-engine/factories/defineRelevanceHint.d.ts +26 -0
- package/dist/esm/lib/injection-engine/factories/defineSkill.d.ts +160 -0
- package/dist/esm/lib/injection-engine/factories/defineSteering.d.ts +39 -0
- package/dist/esm/lib/injection-engine/index.d.ts +22 -0
- package/dist/esm/lib/injection-engine/index.js +2 -1
- package/dist/esm/lib/injection-engine/index.js.map +1 -1
- package/dist/esm/lib/injection-engine/skillContract.d.ts +29 -0
- package/dist/esm/lib/injection-engine/skillGraph.d.ts +290 -0
- package/dist/esm/lib/injection-engine/skillGraph.js +38 -43
- package/dist/esm/lib/injection-engine/skillGraph.js.map +1 -1
- package/dist/esm/lib/injection-engine/skillGraphCheckup.d.ts +49 -0
- package/dist/esm/lib/injection-engine/skillTools.d.ts +72 -0
- package/dist/esm/lib/injection-engine/softmax.d.ts +11 -0
- package/dist/esm/lib/injection-engine/types.d.ts +229 -0
- package/dist/esm/lib/injection-engine/types.js.map +1 -1
- package/dist/esm/lib/lazyRequire.d.ts +29 -0
- package/dist/esm/lib/mcp/index.d.ts +9 -0
- package/dist/esm/lib/mcp/mcpClient.d.ts +46 -0
- package/dist/esm/lib/mcp/mockMcpClient.d.ts +65 -0
- package/dist/esm/lib/mcp/types.d.ts +133 -0
- package/dist/esm/lib/rag/defineRAG.d.ts +139 -0
- package/dist/esm/lib/rag/defineRAG.js +3 -3
- package/dist/esm/lib/rag/index.d.ts +7 -0
- package/dist/esm/lib/rag/indexDocuments.d.ts +106 -0
- package/dist/esm/lib/rag/indexDocuments.js +2 -1
- package/dist/esm/lib/rag/indexDocuments.js.map +1 -1
- package/dist/esm/lib/tool-lint/analyze.d.ts +83 -0
- package/dist/esm/lib/tool-lint/cli.d.ts +43 -0
- package/dist/esm/lib/tool-lint/format.d.ts +18 -0
- package/dist/esm/lib/tool-lint/index.d.ts +23 -0
- package/dist/esm/lib/tool-lint/rules.d.ts +85 -0
- package/dist/esm/lib/tool-lint/types.d.ts +155 -0
- package/dist/esm/lib/trace-toolpack/bounded.d.ts +47 -0
- package/dist/esm/lib/trace-toolpack/debugPrompt.d.ts +19 -0
- package/dist/esm/lib/trace-toolpack/index.d.ts +20 -0
- package/dist/esm/lib/trace-toolpack/lazyToolpack.d.ts +35 -0
- package/dist/esm/lib/trace-toolpack/selfExplain.d.ts +100 -0
- package/dist/esm/lib/trace-toolpack/traceDebugAgent.d.ts +42 -0
- package/dist/esm/lib/trace-toolpack/traceToolpack.d.ts +69 -0
- package/dist/esm/lib/trace-toolpack/types.d.ts +59 -0
- package/dist/esm/llm-providers.d.ts +26 -0
- package/dist/esm/locales/index.d.ts +141 -0
- package/dist/esm/locales/index.js +7 -0
- package/dist/esm/locales/index.js.map +1 -1
- package/dist/esm/memory/beats/extractBeats.d.ts +61 -0
- package/dist/esm/memory/beats/extractor.d.ts +47 -0
- package/dist/esm/memory/beats/formatAsNarrative.d.ts +62 -0
- package/dist/esm/memory/beats/heuristicExtractor.d.ts +37 -0
- package/dist/esm/memory/beats/index.d.ts +12 -0
- package/dist/esm/memory/beats/llmExtractor.d.ts +56 -0
- package/dist/esm/memory/beats/types.d.ts +60 -0
- package/dist/esm/memory/beats/writeBeats.d.ts +22 -0
- package/dist/esm/memory/causal/evidenceRecorder.d.ts +66 -0
- package/dist/esm/memory/causal/index.d.ts +6 -0
- package/dist/esm/memory/causal/loadSnapshot.d.ts +51 -0
- package/dist/esm/memory/causal/snapshotPipeline.d.ts +35 -0
- package/dist/esm/memory/causal/types.d.ts +134 -0
- package/dist/esm/memory/causal/types.js.map +1 -1
- package/dist/esm/memory/causal/writeSnapshot.d.ts +73 -0
- package/dist/esm/memory/define.d.ts +63 -0
- package/dist/esm/memory/define.types.d.ts +278 -0
- package/dist/esm/memory/define.types.js +6 -4
- package/dist/esm/memory/define.types.js.map +1 -1
- package/dist/esm/memory/embedding/cosine.d.ts +18 -0
- package/dist/esm/memory/embedding/embedMessages.d.ts +58 -0
- package/dist/esm/memory/embedding/index.d.ts +8 -0
- package/dist/esm/memory/embedding/loadRelevant.d.ts +51 -0
- package/dist/esm/memory/embedding/mockEmbedder.d.ts +22 -0
- package/dist/esm/memory/embedding/types.d.ts +46 -0
- package/dist/esm/memory/entry/decay.d.ts +36 -0
- package/dist/esm/memory/entry/index.d.ts +2 -0
- package/dist/esm/memory/entry/types.d.ts +140 -0
- package/dist/esm/memory/facts/extractFacts.d.ts +50 -0
- package/dist/esm/memory/facts/extractor.d.ts +33 -0
- package/dist/esm/memory/facts/formatFacts.d.ts +60 -0
- package/dist/esm/memory/facts/index.d.ts +14 -0
- package/dist/esm/memory/facts/llmFactExtractor.d.ts +64 -0
- package/dist/esm/memory/facts/loadFacts.d.ts +43 -0
- package/dist/esm/memory/facts/patternFactExtractor.d.ts +2 -0
- package/dist/esm/memory/facts/types.d.ts +68 -0
- package/dist/esm/memory/facts/writeFacts.d.ts +19 -0
- package/dist/esm/memory/identity/index.d.ts +2 -0
- package/dist/esm/memory/identity/types.d.ts +49 -0
- package/dist/esm/memory/index.d.ts +19 -0
- package/dist/esm/memory/pipeline/auto.d.ts +59 -0
- package/dist/esm/memory/pipeline/default.d.ts +49 -0
- package/dist/esm/memory/pipeline/ephemeral.d.ts +28 -0
- package/dist/esm/memory/pipeline/fact.d.ts +26 -0
- package/dist/esm/memory/pipeline/index.d.ts +13 -0
- package/dist/esm/memory/pipeline/narrative.d.ts +35 -0
- package/dist/esm/memory/pipeline/semantic.d.ts +37 -0
- package/dist/esm/memory/pipeline/types.d.ts +31 -0
- package/dist/esm/memory/stages/formatDefault.d.ts +64 -0
- package/dist/esm/memory/stages/index.d.ts +13 -0
- package/dist/esm/memory/stages/loadRecent.d.ts +49 -0
- package/dist/esm/memory/stages/pickByBudget.d.ts +63 -0
- package/dist/esm/memory/stages/summarize.d.ts +87 -0
- package/dist/esm/memory/stages/tokenize.d.ts +43 -0
- package/dist/esm/memory/stages/types.d.ts +75 -0
- package/dist/esm/memory/stages/writeMessages.d.ts +71 -0
- package/dist/esm/memory/store/InMemoryStore.d.ts +62 -0
- package/dist/esm/memory/store/index.d.ts +2 -0
- package/dist/esm/memory/store/types.d.ts +223 -0
- package/dist/esm/memory/wire/index.d.ts +2 -0
- package/dist/esm/memory/wire/mountMemoryPipeline.d.ts +108 -0
- package/dist/esm/memory-providers.d.ts +37 -0
- package/dist/esm/observability/contextError/finders/compareFinders.d.ts +19 -0
- package/dist/esm/observability/contextError/finders/index.d.ts +22 -0
- package/dist/esm/observability/contextError/finders/rankSuspects.d.ts +2 -0
- package/dist/esm/observability/contextError/finders/removeAndRetry.d.ts +11 -0
- package/dist/esm/observability/contextError/finders/shrinkToCause.d.ts +11 -0
- package/dist/esm/observability/contextError/finders/testManyCombos.d.ts +11 -0
- package/dist/esm/observability/contextError/finders/traceSteps.d.ts +2 -0
- package/dist/esm/observability/contextError/finders/types.d.ts +88 -0
- package/dist/esm/observability-providers.d.ts +46 -0
- package/dist/esm/observe.d.ts +57 -0
- package/dist/esm/observe.js +7 -36
- package/dist/esm/observe.js.map +1 -1
- package/dist/esm/patterns/Debate.d.ts +39 -0
- package/dist/esm/patterns/MapReduce.d.ts +66 -0
- package/dist/esm/patterns/Reflection.d.ts +51 -0
- package/dist/esm/patterns/SelfConsistency.d.ts +43 -0
- package/dist/esm/patterns/Swarm.d.ts +60 -0
- package/dist/esm/patterns/ToT.d.ts +53 -0
- package/dist/esm/patterns/index.d.ts +22 -0
- package/dist/esm/providers.d.ts +33 -0
- package/dist/esm/providers.js +1 -1
- package/dist/esm/providers.js.map +1 -1
- package/dist/esm/recorders/core/AgentRecorder.d.ts +15 -0
- package/dist/esm/recorders/core/CompositionRecorder.d.ts +17 -0
- package/dist/esm/recorders/core/ContextEvaluatedRecorder.d.ts +23 -0
- package/dist/esm/recorders/core/ContextRecorder.d.ts +47 -0
- package/dist/esm/recorders/core/CostRecorder.d.ts +14 -0
- package/dist/esm/recorders/core/EmitBridge.d.ts +30 -0
- package/dist/esm/recorders/core/ErrorBridge.d.ts +38 -0
- package/dist/esm/recorders/core/EvalRecorder.d.ts +16 -0
- package/dist/esm/recorders/core/MemoryRecorder.d.ts +17 -0
- package/dist/esm/recorders/core/PermissionRecorder.d.ts +16 -0
- package/dist/esm/recorders/core/ReliabilityRecorder.d.ts +24 -0
- package/dist/esm/recorders/core/SkillRecorder.d.ts +14 -0
- package/dist/esm/recorders/core/StreamRecorder.d.ts +15 -0
- package/dist/esm/recorders/core/ToolsRecorder.d.ts +18 -0
- package/dist/esm/recorders/core/ValidationRecorder.d.ts +16 -0
- package/dist/esm/recorders/core/contextEngineering.d.ts +136 -0
- package/dist/esm/recorders/core/typedEmit.d.ts +34 -0
- package/dist/esm/recorders/core/types.d.ts +97 -0
- package/dist/esm/recorders/observability/AgentThinkingTraceRecorder.d.ts +117 -0
- package/dist/esm/recorders/observability/BoundaryRecorder.d.ts +546 -0
- package/dist/esm/recorders/observability/FlowchartRecorder.d.ts +220 -0
- package/dist/esm/recorders/observability/LiveStateRecorder.d.ts +250 -0
- package/dist/esm/recorders/observability/LoggingRecorder.d.ts +91 -0
- package/dist/esm/recorders/observability/RouteRecorder.d.ts +83 -0
- package/dist/esm/recorders/observability/RunStepRecorder.d.ts +231 -0
- package/dist/esm/recorders/observability/StatusRecorder.d.ts +36 -0
- package/dist/esm/recorders/observability/ToolChoiceRecorder.d.ts +164 -0
- package/dist/esm/recorders/observability/ToolLineageRecorder.d.ts +71 -0
- package/dist/esm/recorders/observability/commentary/commentaryTemplates.d.ts +105 -0
- package/dist/esm/recorders/observability/internal/ActorArrowClassifier.d.ts +25 -0
- package/dist/esm/recorders/observability/internal/CandidateAnswerBuffer.d.ts +28 -0
- package/dist/esm/recorders/observability/internal/ForkTracker.d.ts +60 -0
- package/dist/esm/recorders/observability/internal/RootInferrer.d.ts +51 -0
- package/dist/esm/recorders/observability/internal/SequenceSiblingTracker.d.ts +24 -0
- package/dist/esm/recorders/observability/localObservability.d.ts +48 -0
- package/dist/esm/recorders/observability/observeRunId.d.ts +36 -0
- package/dist/esm/recorders/observability/status/statusTemplates.d.ts +106 -0
- package/dist/esm/recorders/observability/trace.d.ts +119 -0
- package/dist/esm/reliability/CircuitBreaker.d.ts +75 -0
- package/dist/esm/reliability/buildReliabilityGateChart.d.ts +53 -0
- package/dist/esm/reliability/classifyError.d.ts +28 -0
- package/dist/esm/reliability/index.d.ts +35 -0
- package/dist/esm/reliability/types.d.ts +327 -0
- package/dist/esm/resilience/fallbackProvider.d.ts +33 -0
- package/dist/esm/resilience/index.d.ts +21 -0
- package/dist/esm/resilience/withCircuitBreaker.d.ts +129 -0
- package/dist/esm/resilience/withFallback.d.ts +45 -0
- package/dist/esm/resilience/withRetry.d.ts +71 -0
- package/dist/esm/security/PermissionPolicy.d.ts +124 -0
- package/dist/esm/security/PolicyHaltError.d.ts +72 -0
- package/dist/esm/security/extractSequence.d.ts +46 -0
- package/dist/esm/security/index.d.ts +44 -0
- package/dist/esm/security/thinkingRedaction.d.ts +50 -0
- package/dist/esm/status.d.ts +54 -0
- package/dist/esm/status.js +13 -4
- package/dist/esm/status.js.map +1 -1
- package/dist/esm/strategies/attach.d.ts +47 -0
- package/dist/esm/strategies/compose.d.ts +48 -0
- package/dist/esm/strategies/defaults/chatBubbleLiveStatus.d.ts +36 -0
- package/dist/esm/strategies/defaults/consoleObservability.d.ts +42 -0
- package/dist/esm/strategies/defaults/inMemorySinkCost.d.ts +50 -0
- package/dist/esm/strategies/defaults/index.d.ts +30 -0
- package/dist/esm/strategies/defaults/noopLens.d.ts +28 -0
- package/dist/esm/strategies/index.d.ts +36 -0
- package/dist/esm/strategies/registry.d.ts +70 -0
- package/dist/esm/strategies/types.d.ts +303 -0
- package/dist/esm/stream.d.ts +82 -0
- package/dist/esm/thinking/AnthropicThinkingHandler.d.ts +42 -0
- package/dist/esm/thinking/MockThinkingHandler.d.ts +50 -0
- package/dist/esm/thinking/OpenAIThinkingHandler.d.ts +37 -0
- package/dist/esm/thinking/index.d.ts +51 -0
- package/dist/esm/thinking/registry.d.ts +33 -0
- package/dist/esm/thinking/types.d.ts +162 -0
- package/dist/esm/tool-providers/gatedTools.d.ts +36 -0
- package/dist/esm/tool-providers/index.d.ts +41 -0
- package/dist/esm/tool-providers/skillScopedTools.d.ts +45 -0
- package/dist/esm/tool-providers/staticTools.d.ts +21 -0
- package/dist/esm/tool-providers/types.d.ts +138 -0
- package/dist/events.js +42 -0
- package/dist/events.js.map +1 -0
- package/dist/index.js +7 -117
- package/dist/index.js.map +1 -1
- package/dist/lib/context-bisect/index.js +3 -0
- package/dist/lib/context-bisect/index.js.map +1 -1
- package/dist/lib/context-bisect/localize.js +2 -0
- package/dist/lib/context-bisect/localize.js.map +1 -1
- package/dist/lib/injection-engine/buildInjectionEngineSubflow.js +1 -0
- package/dist/lib/injection-engine/buildInjectionEngineSubflow.js.map +1 -1
- package/dist/lib/injection-engine/entryScorer.js +178 -0
- package/dist/lib/injection-engine/entryScorer.js.map +1 -0
- package/dist/lib/injection-engine/index.js +6 -2
- package/dist/lib/injection-engine/index.js.map +1 -1
- package/dist/lib/injection-engine/skillGraph.js +40 -45
- package/dist/lib/injection-engine/skillGraph.js.map +1 -1
- package/dist/lib/injection-engine/types.js.map +1 -1
- package/dist/lib/rag/defineRAG.js +3 -3
- package/dist/lib/rag/indexDocuments.js +2 -1
- package/dist/lib/rag/indexDocuments.js.map +1 -1
- package/dist/locales/index.js +2 -1
- package/dist/locales/index.js.map +1 -1
- package/dist/memory/causal/types.js.map +1 -1
- package/dist/memory/define.types.js +6 -4
- package/dist/memory/define.types.js.map +1 -1
- package/dist/observe.js +22 -115
- package/dist/observe.js.map +1 -1
- package/dist/providers.js +3 -1
- package/dist/providers.js.map +1 -1
- package/dist/status.js +13 -5
- package/dist/status.js.map +1 -1
- package/dist/types/adapters/llm/BrowserOpenAIProvider.d.ts +1 -1
- package/dist/types/adapters/llm/MockProvider.d.ts +2 -1
- package/dist/types/adapters/llm/MockProvider.d.ts.map +1 -1
- package/dist/types/core/agent/buildAgentChart.d.ts.map +1 -1
- package/dist/types/core/agent/buildDynamicAgentChart.d.ts.map +1 -1
- package/dist/types/core/agent/stages/pickEntry.d.ts.map +1 -1
- package/dist/types/core/agent/types.d.ts +8 -4
- package/dist/types/core/agent/types.d.ts.map +1 -1
- package/dist/types/debug/finders.d.ts +13 -0
- package/dist/types/debug/finders.d.ts.map +1 -0
- package/dist/types/debug.d.ts +26 -0
- package/dist/types/debug.d.ts.map +1 -0
- package/dist/types/events.d.ts +19 -0
- package/dist/types/events.d.ts.map +1 -0
- package/dist/types/index.d.ts +4 -24
- package/dist/types/index.d.ts.map +1 -1
- package/dist/types/lib/context-bisect/index.d.ts +3 -0
- package/dist/types/lib/context-bisect/index.d.ts.map +1 -1
- package/dist/types/lib/context-bisect/localize.d.ts +2 -0
- package/dist/types/lib/context-bisect/localize.d.ts.map +1 -1
- package/dist/types/lib/injection-engine/buildInjectionEngineSubflow.d.ts.map +1 -1
- package/dist/types/lib/injection-engine/entryScorer.d.ts +94 -0
- package/dist/types/lib/injection-engine/entryScorer.d.ts.map +1 -0
- package/dist/types/lib/injection-engine/index.d.ts +2 -1
- package/dist/types/lib/injection-engine/index.d.ts.map +1 -1
- package/dist/types/lib/injection-engine/skillGraph.d.ts +24 -26
- package/dist/types/lib/injection-engine/skillGraph.d.ts.map +1 -1
- package/dist/types/lib/injection-engine/types.d.ts +9 -4
- package/dist/types/lib/injection-engine/types.d.ts.map +1 -1
- package/dist/types/lib/rag/defineRAG.d.ts +3 -3
- package/dist/types/lib/rag/indexDocuments.d.ts +2 -1
- package/dist/types/lib/rag/indexDocuments.d.ts.map +1 -1
- package/dist/types/locales/index.d.ts +9 -0
- package/dist/types/locales/index.d.ts.map +1 -1
- package/dist/types/memory/causal/types.d.ts +13 -9
- package/dist/types/memory/causal/types.d.ts.map +1 -1
- package/dist/types/memory/define.types.d.ts +6 -4
- package/dist/types/memory/define.types.d.ts.map +1 -1
- package/dist/types/observe.d.ts +1 -6
- package/dist/types/observe.d.ts.map +1 -1
- package/dist/types/providers.d.ts +2 -2
- package/dist/types/providers.d.ts.map +1 -1
- package/dist/types/status.d.ts +10 -4
- package/dist/types/status.d.ts.map +1 -1
- package/dist/types/tool-providers/index.d.ts +1 -1
- package/dist/types/tool-providers/index.d.ts.map +1 -1
- package/package.json +261 -57
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Reflection — iterative self-refinement via critic + revise.
|
|
3
|
+
*
|
|
4
|
+
* Paper: "Self-Refine: Iterative Refinement with Self-Feedback" —
|
|
5
|
+
* Madaan et al., 2023 (https://arxiv.org/abs/2303.17651).
|
|
6
|
+
*
|
|
7
|
+
* Pattern: Factory (GoF) → produces a `Runner` built from a `Loop`
|
|
8
|
+
* whose body is `Sequence(Propose → Critique → Revise)`.
|
|
9
|
+
* Role: patterns/ layer. Pure composition — no new abstractions.
|
|
10
|
+
* Emits: Loop's composition.iteration_start / iteration_exit plus
|
|
11
|
+
* every inner LLMCall's stream.llm_start/end.
|
|
12
|
+
*/
|
|
13
|
+
import type { LLMProvider } from '../adapters/types.js';
|
|
14
|
+
import type { Runner } from '../core/runner.js';
|
|
15
|
+
export interface ReflectionOptions {
|
|
16
|
+
readonly provider: LLMProvider;
|
|
17
|
+
readonly model: string;
|
|
18
|
+
/** System prompt for the initial / revision proposer. */
|
|
19
|
+
readonly proposerPrompt: string;
|
|
20
|
+
/**
|
|
21
|
+
* System prompt for the critic. Should instruct the critic to return
|
|
22
|
+
* "DONE" (or a consumer-chosen sentinel) when the proposal is good
|
|
23
|
+
* enough — that string is checked by `untilCritiqueContains` to stop
|
|
24
|
+
* the refinement loop.
|
|
25
|
+
*/
|
|
26
|
+
readonly criticPrompt: string;
|
|
27
|
+
/**
|
|
28
|
+
* Stop string the critic should emit when satisfied. When the critic's
|
|
29
|
+
* response contains this substring, the loop exits and the last
|
|
30
|
+
* proposal is returned. Default: 'DONE'.
|
|
31
|
+
*/
|
|
32
|
+
readonly untilCritiqueContains?: string;
|
|
33
|
+
/** Max refinement iterations. Default 3. */
|
|
34
|
+
readonly maxIterations?: number;
|
|
35
|
+
readonly temperature?: number;
|
|
36
|
+
readonly maxTokens?: number;
|
|
37
|
+
readonly name?: string;
|
|
38
|
+
readonly id?: string;
|
|
39
|
+
}
|
|
40
|
+
/**
|
|
41
|
+
* Build a Reflection Runner. Each iteration:
|
|
42
|
+
* 1. Propose — LLMCall writes a candidate answer based on the input
|
|
43
|
+
* 2. Critique — LLMCall judges the candidate; exit marker stops loop
|
|
44
|
+
* 3. Revise — next iteration's propose sees the previous critique
|
|
45
|
+
*
|
|
46
|
+
* Each iteration's output (the candidate proposal) becomes the next
|
|
47
|
+
* iteration's input. The final iteration's proposal is returned.
|
|
48
|
+
*/
|
|
49
|
+
export declare function reflection(opts: ReflectionOptions): Runner<{
|
|
50
|
+
message: string;
|
|
51
|
+
}, string>;
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* SelfConsistency — sample N answers, pick the majority.
|
|
3
|
+
*
|
|
4
|
+
* Paper: "Self-Consistency Improves Chain of Thought Reasoning in
|
|
5
|
+
* Language Models" — Wang et al., 2022 (https://arxiv.org/abs/2203.11171).
|
|
6
|
+
*
|
|
7
|
+
* Pattern: Factory (GoF) → produces a `Runner` that composes `Parallel`
|
|
8
|
+
* of N `LLMCall` branches with a majority-vote merge function.
|
|
9
|
+
* Role: patterns/ layer. Pure composition of core primitives +
|
|
10
|
+
* core-flow compositions — no new abstractions.
|
|
11
|
+
* Emits: Everything `Parallel` + `LLMCall` emit (stream / composition /
|
|
12
|
+
* context). No pattern-specific event domain needed; consumers
|
|
13
|
+
* observe via the standard typed listeners.
|
|
14
|
+
*/
|
|
15
|
+
import type { LLMProvider } from '../adapters/types.js';
|
|
16
|
+
import type { Runner } from '../core/runner.js';
|
|
17
|
+
export interface SelfConsistencyOptions {
|
|
18
|
+
readonly provider: LLMProvider;
|
|
19
|
+
readonly model: string;
|
|
20
|
+
readonly systemPrompt: string;
|
|
21
|
+
/** Number of parallel samples. 3 / 5 are typical; paper uses up to 40. */
|
|
22
|
+
readonly samples: number;
|
|
23
|
+
/** Sampling temperature. Defaults to a higher value (0.7) to get diverse samples. */
|
|
24
|
+
readonly temperature?: number;
|
|
25
|
+
readonly maxTokens?: number;
|
|
26
|
+
/**
|
|
27
|
+
* Consumer-provided extractor: given a full LLM response, return the
|
|
28
|
+
* "vote token" (e.g., the final answer stripped of the chain-of-thought
|
|
29
|
+
* preamble). Defaults to returning the trimmed string.
|
|
30
|
+
*/
|
|
31
|
+
readonly extract?: (response: string) => string;
|
|
32
|
+
readonly name?: string;
|
|
33
|
+
readonly id?: string;
|
|
34
|
+
}
|
|
35
|
+
/**
|
|
36
|
+
* Build a SelfConsistency Runner. Given a system prompt, the Runner
|
|
37
|
+
* runs `samples` parallel LLMCalls with the same input, extracts each
|
|
38
|
+
* response's vote token, then returns the most-frequent token. Ties
|
|
39
|
+
* are broken by the first response's extract.
|
|
40
|
+
*/
|
|
41
|
+
export declare function selfConsistency(opts: SelfConsistencyOptions): Runner<{
|
|
42
|
+
message: string;
|
|
43
|
+
}, string>;
|
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Swarm — multi-agent handoff. At each step, an LLM-driven routing
|
|
3
|
+
* decision picks which agent handles the next turn.
|
|
4
|
+
*
|
|
5
|
+
* Origin: OpenAI Swarm experiment (2024). Useful for specialist
|
|
6
|
+
* routing — each agent has a narrow role + its own tools.
|
|
7
|
+
*
|
|
8
|
+
* Pattern: Factory → produces a `Runner` built from
|
|
9
|
+
* `Loop(Conditional(route-to-agent))`.
|
|
10
|
+
* Role: patterns/ layer. Pure composition over existing primitives.
|
|
11
|
+
* Agent roster is FIXED at build time; the routing decision
|
|
12
|
+
* is made at runtime by a consumer-supplied `route(input)`
|
|
13
|
+
* function (sync — pure over `{ message }`).
|
|
14
|
+
*
|
|
15
|
+
* For LLM-driven routing (the classic Swarm style), the consumer
|
|
16
|
+
* composes a "router" LLMCall as the first step of each iteration and
|
|
17
|
+
* parses its response in their `route()` function.
|
|
18
|
+
*/
|
|
19
|
+
import type { Runner } from '../core/runner.js';
|
|
20
|
+
export interface SwarmAgent {
|
|
21
|
+
/** Stable id used in events + routing decisions. */
|
|
22
|
+
readonly id: string;
|
|
23
|
+
/** Display name for topology / narrative. */
|
|
24
|
+
readonly name?: string;
|
|
25
|
+
/** The runner that handles a turn when selected. */
|
|
26
|
+
readonly runner: Runner<{
|
|
27
|
+
message: string;
|
|
28
|
+
}, string>;
|
|
29
|
+
}
|
|
30
|
+
export interface SwarmOptions {
|
|
31
|
+
/**
|
|
32
|
+
* The fixed agent roster. Must contain >= 2 agents. The order doesn't
|
|
33
|
+
* matter — the `route` function selects by id.
|
|
34
|
+
*/
|
|
35
|
+
readonly agents: readonly SwarmAgent[];
|
|
36
|
+
/**
|
|
37
|
+
* Routing function — receives the current message and returns the
|
|
38
|
+
* selected agent's id. Pure sync; evaluated before each iteration's
|
|
39
|
+
* chosen agent runs. Return `undefined` or an unknown id to halt
|
|
40
|
+
* the swarm (the loop's `until` guard fires).
|
|
41
|
+
*/
|
|
42
|
+
readonly route: (input: {
|
|
43
|
+
readonly message: string;
|
|
44
|
+
}) => string | undefined;
|
|
45
|
+
/** Max hand-offs before the loop halts. Default 10. */
|
|
46
|
+
readonly maxHandoffs?: number;
|
|
47
|
+
readonly name?: string;
|
|
48
|
+
readonly id?: string;
|
|
49
|
+
}
|
|
50
|
+
/**
|
|
51
|
+
* Build a Swarm Runner. Each iteration:
|
|
52
|
+
* 1. Router evaluates `route(input)` to pick an agent id.
|
|
53
|
+
* 2. Conditional dispatches to that agent's runner.
|
|
54
|
+
* 3. Agent's output becomes the next iteration's input.
|
|
55
|
+
* Loop halts when `route` returns a halt-sentinel id (or unknown id
|
|
56
|
+
* falling to the `done` branch) OR when `maxHandoffs` is reached.
|
|
57
|
+
*/
|
|
58
|
+
export declare function swarm(opts: SwarmOptions): Runner<{
|
|
59
|
+
message: string;
|
|
60
|
+
}, string>;
|
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* ToT — Tree of Thoughts: breadth-first iterative expansion + pruning.
|
|
3
|
+
*
|
|
4
|
+
* Paper: "Tree of Thoughts: Deliberate Problem Solving with Large
|
|
5
|
+
* Language Models" — Yao et al., 2023
|
|
6
|
+
* (https://arxiv.org/abs/2305.10601).
|
|
7
|
+
*
|
|
8
|
+
* Pattern: Factory → produces a `Runner` built from `Loop(depth times,
|
|
9
|
+
* Parallel(K thought branches) + prune-to-top-M)`.
|
|
10
|
+
* Role: patterns/ layer. Pure composition over existing primitives.
|
|
11
|
+
* Build-time-fixed depth + branching factor; runtime frontier
|
|
12
|
+
* is pruned to `beamWidth` per level via a consumer-supplied
|
|
13
|
+
* scorer.
|
|
14
|
+
*
|
|
15
|
+
* Tradeoff vs. full DFS: this shipped variant is BFS with constant
|
|
16
|
+
* width. True DFS with backtracking or adaptive branching factor would
|
|
17
|
+
* need runtime-variable Parallel (DynamicParallel) or recursion.
|
|
18
|
+
*/
|
|
19
|
+
import type { LLMProvider } from '../adapters/types.js';
|
|
20
|
+
import type { Runner } from '../core/runner.js';
|
|
21
|
+
export interface ToTOptions {
|
|
22
|
+
readonly provider: LLMProvider;
|
|
23
|
+
readonly model: string;
|
|
24
|
+
/** System prompt for the thought-generation LLMCall. */
|
|
25
|
+
readonly thoughtPrompt: string;
|
|
26
|
+
/** Depth of the tree (number of expansion iterations). */
|
|
27
|
+
readonly depth: number;
|
|
28
|
+
/** Branching factor — K thoughts generated per frontier node per iteration. */
|
|
29
|
+
readonly branchingFactor: number;
|
|
30
|
+
/**
|
|
31
|
+
* Scorer: given a thought, return a numeric score. Higher is better.
|
|
32
|
+
* The top `beamWidth` thoughts survive each level; the rest are pruned.
|
|
33
|
+
* Synchronous so pruning is deterministic.
|
|
34
|
+
*/
|
|
35
|
+
readonly score: (thought: string) => number;
|
|
36
|
+
/** Beam width — how many thoughts survive after each level. Default 1 (greedy). */
|
|
37
|
+
readonly beamWidth?: number;
|
|
38
|
+
readonly temperature?: number;
|
|
39
|
+
readonly maxTokens?: number;
|
|
40
|
+
readonly name?: string;
|
|
41
|
+
readonly id?: string;
|
|
42
|
+
}
|
|
43
|
+
/**
|
|
44
|
+
* Build a ToT Runner. At run time:
|
|
45
|
+
* 1. Seed — treat the input message as the initial frontier of 1 thought.
|
|
46
|
+
* 2. For each of `depth` iterations:
|
|
47
|
+
* a. Parallel fan-out: generate `branchingFactor` new thoughts.
|
|
48
|
+
* b. Score all new thoughts, keep top `beamWidth`, pass to next iteration.
|
|
49
|
+
* 3. Return the single best-scoring thought from the final frontier.
|
|
50
|
+
*/
|
|
51
|
+
export declare function tot(opts: ToTOptions): Runner<{
|
|
52
|
+
message: string;
|
|
53
|
+
}, string>;
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* patterns/ — factory functions that compose primitives + core-flow
|
|
3
|
+
* into well-known agent patterns from the research literature.
|
|
4
|
+
*
|
|
5
|
+
* Each pattern is:
|
|
6
|
+
* - A factory function returning a `Runner` — drops into any
|
|
7
|
+
* `Sequence.step()`, `Parallel.branch()`, etc.
|
|
8
|
+
* - Purely composed — no new primitives, no state machinery beyond
|
|
9
|
+
* what the underlying compositions provide.
|
|
10
|
+
* - Documented with the canonical paper reference.
|
|
11
|
+
*
|
|
12
|
+
* Build-time-fixed cardinality: all patterns take a FIXED
|
|
13
|
+
* shard/branch/agent count at build time. Run-time-variable branching
|
|
14
|
+
* is a separate (not-yet-shipped) feature and would need a
|
|
15
|
+
* `DynamicParallel` primitive.
|
|
16
|
+
*/
|
|
17
|
+
export { selfConsistency, type SelfConsistencyOptions } from './SelfConsistency.js';
|
|
18
|
+
export { reflection, type ReflectionOptions } from './Reflection.js';
|
|
19
|
+
export { debate, type DebateOptions } from './Debate.js';
|
|
20
|
+
export { mapReduce, type MapReduceOptions } from './MapReduce.js';
|
|
21
|
+
export { tot, type ToTOptions } from './ToT.js';
|
|
22
|
+
export { swarm, type SwarmOptions, type SwarmAgent } from './Swarm.js';
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* LLM provider adapters — implementation behind the `agentfootprint/llm-providers`
|
|
3
|
+
* subpath (which re-exports this file).
|
|
4
|
+
*
|
|
5
|
+
* The standalone `agentfootprint/providers` subpath alias was removed in 4.0.0.
|
|
6
|
+
* Import from the canonical subpath:
|
|
7
|
+
*
|
|
8
|
+
* import { mock, anthropic, openai } from 'agentfootprint/llm-providers';
|
|
9
|
+
*
|
|
10
|
+
* Pattern: Adapter (GoF) — concrete `LLMProvider` implementations that
|
|
11
|
+
* translate the agentfootprint port to a specific vendor SDK.
|
|
12
|
+
* Role: Outer ring (Hexagonal). Swappable at runtime; the Agent
|
|
13
|
+
* knows nothing about vendor specifics.
|
|
14
|
+
*
|
|
15
|
+
* What's here today:
|
|
16
|
+
* • `mock` / `MockProvider` — deterministic + realistic-mode mock
|
|
17
|
+
* • `anthropic` / `AnthropicProvider` — real provider (Claude)
|
|
18
|
+
* • `openai` / `OpenAIProvider` — real provider (GPT)
|
|
19
|
+
*
|
|
20
|
+
* Bring your own (BYO):
|
|
21
|
+
* For Bedrock / Ollama / Cohere / on-prem / fine-tuned models,
|
|
22
|
+
* implement the `LLMProvider` interface (see `LLMProvider` exported
|
|
23
|
+
* from the main barrel) — `complete()` is required, `stream()` is
|
|
24
|
+
* optional. The `MockProvider` source is the canonical reference.
|
|
25
|
+
*/
|
|
26
|
+
export { MockProvider, mock, type MockProviderOptions, type MockReply, type LatencyMs, } from './adapters/llm/MockProvider.js';
|
|
27
|
+
export { anthropic, AnthropicProvider, type AnthropicProviderOptions, } from './adapters/llm/AnthropicProvider.js';
|
|
28
|
+
export { openai, OpenAIProvider, ollama, azureOpenai, type OpenAIProviderOptions, type AzureOpenAIProviderOptions, } from './adapters/llm/OpenAIProvider.js';
|
|
29
|
+
export { bedrock, BedrockProvider, type BedrockProviderOptions, } from './adapters/llm/BedrockProvider.js';
|
|
30
|
+
export { browserAnthropic, BrowserAnthropicProvider, type BrowserAnthropicProviderOptions, } from './adapters/llm/BrowserAnthropicProvider.js';
|
|
31
|
+
export { browserOpenai, BrowserOpenAIProvider, type BrowserOpenAIProviderOptions, browserAzureOpenai, BrowserAzureOpenAIProvider, type BrowserAzureOpenAIProviderOptions, } from './adapters/llm/BrowserOpenAIProvider.js';
|
|
32
|
+
export { createProvider, type ProviderKind, type CreateProviderOptions, } from './adapters/llm/createProvider.js';
|
|
33
|
+
export type { LLMProvider, LLMRequest, LLMResponse, LLMChunk, LLMMessage, LLMToolSchema, } from './adapters/types.js';
|
package/dist/esm/providers.js
CHANGED
|
@@ -28,6 +28,6 @@ export { anthropic, AnthropicProvider, } from './adapters/llm/AnthropicProvider.
|
|
|
28
28
|
export { openai, OpenAIProvider, ollama, azureOpenai, } from './adapters/llm/OpenAIProvider.js';
|
|
29
29
|
export { bedrock, BedrockProvider, } from './adapters/llm/BedrockProvider.js';
|
|
30
30
|
export { browserAnthropic, BrowserAnthropicProvider, } from './adapters/llm/BrowserAnthropicProvider.js';
|
|
31
|
-
export { browserOpenai, BrowserOpenAIProvider, } from './adapters/llm/BrowserOpenAIProvider.js';
|
|
31
|
+
export { browserOpenai, BrowserOpenAIProvider, browserAzureOpenai, BrowserAzureOpenAIProvider, } from './adapters/llm/BrowserOpenAIProvider.js';
|
|
32
32
|
export { createProvider, } from './adapters/llm/createProvider.js';
|
|
33
33
|
//# sourceMappingURL=providers.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"providers.js","sourceRoot":"","sources":["../../src/providers.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;GAwBG;AAEH,OAAO,EACL,YAAY,EACZ,IAAI,
|
|
1
|
+
{"version":3,"file":"providers.js","sourceRoot":"","sources":["../../src/providers.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;GAwBG;AAEH,OAAO,EACL,YAAY,EACZ,IAAI,GAIL,MAAM,gCAAgC,CAAC;AAExC,OAAO,EACL,SAAS,EACT,iBAAiB,GAElB,MAAM,qCAAqC,CAAC;AAE7C,OAAO,EACL,MAAM,EACN,cAAc,EACd,MAAM,EACN,WAAW,GAGZ,MAAM,kCAAkC,CAAC;AAE1C,OAAO,EACL,OAAO,EACP,eAAe,GAEhB,MAAM,mCAAmC,CAAC;AAE3C,OAAO,EACL,gBAAgB,EAChB,wBAAwB,GAEzB,MAAM,4CAA4C,CAAC;AAEpD,OAAO,EACL,aAAa,EACb,qBAAqB,EAErB,kBAAkB,EAClB,0BAA0B,GAE3B,MAAM,yCAAyC,CAAC;AAEjD,OAAO,EACL,cAAc,GAGf,MAAM,kCAAkC,CAAC"}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* AgentRecorder — forwards `agentfootprint.agent.*` emits to the dispatcher.
|
|
3
|
+
*
|
|
4
|
+
* Pattern: Factory (GoF) returning an EmitBridge instance.
|
|
5
|
+
* Role: Convenience constructor for the agent-lifecycle bridge recorder.
|
|
6
|
+
* Same mechanics as StreamRecorder, scoped to agent.* events
|
|
7
|
+
* (turns + iterations + route decisions + handoffs).
|
|
8
|
+
* Emits: agentfootprint.agent.turn_start / turn_end / iteration_start /
|
|
9
|
+
* iteration_end / route_decided / handoff
|
|
10
|
+
*/
|
|
11
|
+
import { EmitBridge, type EmitBridgeOptions } from './EmitBridge.js';
|
|
12
|
+
export type AgentRecorderOptions = Omit<EmitBridgeOptions, 'id' | 'prefix'> & {
|
|
13
|
+
readonly id?: string;
|
|
14
|
+
};
|
|
15
|
+
export declare function agentRecorder(options: AgentRecorderOptions): EmitBridge;
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* CompositionRecorder — forwards `agentfootprint.composition.*` emits to the dispatcher.
|
|
3
|
+
*
|
|
4
|
+
* Pattern: Factory (GoF) returning an EmitBridge instance.
|
|
5
|
+
* Role: Convenience constructor for the composition-domain bridge recorder.
|
|
6
|
+
* Compositions (Sequence, Parallel, Conditional, Loop) typedEmit
|
|
7
|
+
* composition.enter/exit/fork_start/branch_complete/merge_end/
|
|
8
|
+
* route_decided/iteration_start/iteration_exit from their internal
|
|
9
|
+
* stages; this recorder observes via footprintjs's EmitRecorder
|
|
10
|
+
* channel and re-dispatches with typed payloads + meta.
|
|
11
|
+
* Emits: agentfootprint.composition.*
|
|
12
|
+
*/
|
|
13
|
+
import { EmitBridge, type EmitBridgeOptions } from './EmitBridge.js';
|
|
14
|
+
export type CompositionRecorderOptions = Omit<EmitBridgeOptions, 'id' | 'prefix'> & {
|
|
15
|
+
readonly id?: string;
|
|
16
|
+
};
|
|
17
|
+
export declare function compositionRecorder(options: CompositionRecorderOptions): EmitBridge;
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* ContextEvaluatedRecorder — forwards the `agentfootprint.context.evaluated`
|
|
3
|
+
* emit to the dispatcher.
|
|
4
|
+
*
|
|
5
|
+
* Pattern: Factory (GoF) returning an EmitBridge instance.
|
|
6
|
+
* Role: The InjectionEngine `typedEmit`s `context.evaluated` (the
|
|
7
|
+
* "what was considered / active / skipped + why" summary). Unlike the
|
|
8
|
+
* other `context.*` events — which `ContextRecorder` DISPATCHES by
|
|
9
|
+
* observing scope writes — this one is emitted complete by the stage,
|
|
10
|
+
* so it just needs forwarding (the EmitBridge pass-through pattern,
|
|
11
|
+
* same as StreamRecorder / AgentRecorder).
|
|
12
|
+
* Why a full-name prefix: scoped to EXACTLY `agentfootprint.context.evaluated`
|
|
13
|
+
* (not the whole `context.*` domain) so it never double-dispatches
|
|
14
|
+
* `context.slot_composed`, which IS `typedEmit`'d in the viz chart
|
|
15
|
+
* (`buildMessageApiChart`) while ALSO being dispatched by
|
|
16
|
+
* `ContextRecorder` from writes in the runtime charts.
|
|
17
|
+
* Emits: agentfootprint.context.evaluated
|
|
18
|
+
*/
|
|
19
|
+
import { EmitBridge, type EmitBridgeOptions } from './EmitBridge.js';
|
|
20
|
+
export type ContextEvaluatedRecorderOptions = Omit<EmitBridgeOptions, 'id' | 'prefix'> & {
|
|
21
|
+
readonly id?: string;
|
|
22
|
+
};
|
|
23
|
+
export declare function contextEvaluatedRecorder(options: ContextEvaluatedRecorderOptions): EmitBridge;
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* ContextRecorder — observes footprintjs subflow + scope events, emits
|
|
3
|
+
* grouped `context.*` domain events via the EventDispatcher.
|
|
4
|
+
*
|
|
5
|
+
* Pattern: Observer (GoF) + Pipes & Filters (Hohpe & Woolf, 2003).
|
|
6
|
+
* Role: Core semantic grouping layer for the 3-slot model. Watches
|
|
7
|
+
* slot subflows (sf-system-prompt / sf-messages / sf-tools) and
|
|
8
|
+
* translates raw writes into context.injected / evicted /
|
|
9
|
+
* slot_composed / budget_pressure events.
|
|
10
|
+
* Emits: agentfootprint.context.injected
|
|
11
|
+
* agentfootprint.context.evicted
|
|
12
|
+
* agentfootprint.context.slot_composed
|
|
13
|
+
* agentfootprint.context.budget_pressure
|
|
14
|
+
*/
|
|
15
|
+
import type { CombinedRecorder, FlowSubflowEvent, WriteEvent } from 'footprintjs';
|
|
16
|
+
import type { EventDispatcher } from '../../events/dispatcher.js';
|
|
17
|
+
import { type RunContext } from '../../bridge/eventMeta.js';
|
|
18
|
+
/**
|
|
19
|
+
* Supplies the recorder with run-level context. Passed at construction
|
|
20
|
+
* time (static fields) OR updated via `updateRunContext` between runs
|
|
21
|
+
* when reusing one recorder across multiple executor runs.
|
|
22
|
+
*/
|
|
23
|
+
export interface ContextRecorderOptions {
|
|
24
|
+
readonly dispatcher: EventDispatcher;
|
|
25
|
+
readonly id?: string;
|
|
26
|
+
readonly getRunContext: () => RunContext;
|
|
27
|
+
}
|
|
28
|
+
export declare class ContextRecorder implements CombinedRecorder {
|
|
29
|
+
readonly id: string;
|
|
30
|
+
private readonly dispatcher;
|
|
31
|
+
private readonly getRunContext;
|
|
32
|
+
private readonly seenInjections;
|
|
33
|
+
constructor(options: ContextRecorderOptions);
|
|
34
|
+
onSubflowEntry(event: FlowSubflowEvent): void;
|
|
35
|
+
onSubflowExit(event: FlowSubflowEvent): void;
|
|
36
|
+
onWrite(event: WriteEvent): void;
|
|
37
|
+
private handleInjectionsWrite;
|
|
38
|
+
private handleSlotComposedWrite;
|
|
39
|
+
private handleEvictionsWrite;
|
|
40
|
+
private handleBudgetPressureWrite;
|
|
41
|
+
private emitInjected;
|
|
42
|
+
private dispatch;
|
|
43
|
+
private asInjectionArray;
|
|
44
|
+
private asSlotComposition;
|
|
45
|
+
private asEvictionArray;
|
|
46
|
+
private asPressureArray;
|
|
47
|
+
}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* CostRecorder — forwards `agentfootprint.cost.*` emits to the dispatcher.
|
|
3
|
+
*
|
|
4
|
+
* Pattern: Factory (GoF) returning an EmitBridge instance.
|
|
5
|
+
* Role: Bridges `cost.tick` + `cost.limit_hit` emits from LLMCall / Agent
|
|
6
|
+
* stages (via `emitCostTick`) to the EventDispatcher so typed
|
|
7
|
+
* consumer listeners fire.
|
|
8
|
+
* Emits: agentfootprint.cost.tick / cost.limit_hit
|
|
9
|
+
*/
|
|
10
|
+
import { EmitBridge, type EmitBridgeOptions } from './EmitBridge.js';
|
|
11
|
+
export type CostRecorderOptions = Omit<EmitBridgeOptions, 'id' | 'prefix'> & {
|
|
12
|
+
readonly id?: string;
|
|
13
|
+
};
|
|
14
|
+
export declare function costRecorder(options: CostRecorderOptions): EmitBridge;
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* EmitBridge — forwards footprintjs emits whose name starts with a given
|
|
3
|
+
* prefix to the EventDispatcher, enriched with EventMeta.
|
|
4
|
+
*
|
|
5
|
+
* Pattern: Adapter (GoF) + Pipes & Filters (Hohpe & Woolf, 2003).
|
|
6
|
+
* Role: Single reusable translation layer for every "pass-through"
|
|
7
|
+
* prefix recorder (StreamRecorder, AgentRecorder, and any
|
|
8
|
+
* future domain whose events are emitted via typedEmit()).
|
|
9
|
+
* Emits: Any event whose name matches `prefix` — type derived from the
|
|
10
|
+
* emit name and validated by the consumer's EventMap subscription.
|
|
11
|
+
*/
|
|
12
|
+
import type { CombinedRecorder, EmitEvent } from 'footprintjs';
|
|
13
|
+
import type { EventDispatcher } from '../../events/dispatcher.js';
|
|
14
|
+
import { type RunContext } from '../../bridge/eventMeta.js';
|
|
15
|
+
export interface EmitBridgeOptions {
|
|
16
|
+
readonly dispatcher: EventDispatcher;
|
|
17
|
+
/** Recorder id — must be unique among attached recorders. */
|
|
18
|
+
readonly id: string;
|
|
19
|
+
/** Event-name prefix this bridge forwards (e.g. 'agentfootprint.stream.'). */
|
|
20
|
+
readonly prefix: string;
|
|
21
|
+
readonly getRunContext: () => RunContext;
|
|
22
|
+
}
|
|
23
|
+
export declare class EmitBridge implements CombinedRecorder {
|
|
24
|
+
readonly id: string;
|
|
25
|
+
private readonly dispatcher;
|
|
26
|
+
private readonly prefix;
|
|
27
|
+
private readonly getRunContext;
|
|
28
|
+
constructor(options: EmitBridgeOptions);
|
|
29
|
+
onEmit(event: EmitEvent): void;
|
|
30
|
+
}
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* ErrorBridge — translates footprintjs's STRUCTURAL `onRunFailed` (the
|
|
3
|
+
* terminal run-boundary event fired when a run throws a non-pause error)
|
|
4
|
+
* into agentfootprint's TYPED `agentfootprint.error.fatal` domain event.
|
|
5
|
+
*
|
|
6
|
+
* Pattern: Adapter (GoF) — same role as EmitBridge, different channel.
|
|
7
|
+
* Role: Close the "failed run is invisible" gap. footprintjs fires
|
|
8
|
+
* `onError` (stage-level) + `onRunFailed` (run-level) on the
|
|
9
|
+
* FlowRecorder channel, but agentfootprint's typed consumers
|
|
10
|
+
* (LiveStateRecorder clearing in-flight, monitors setting
|
|
11
|
+
* status) listen on the DISPATCHER. Without a bridge, a thrown
|
|
12
|
+
* LLM call left `isLLMInFlight()` stuck true ("Chatbot is
|
|
13
|
+
* thinking…" forever) and downstream STATUS showed "ok". This
|
|
14
|
+
* re-dispatches one terminal typed event so every consumer
|
|
15
|
+
* reacts uniformly.
|
|
16
|
+
* Emits: agentfootprint.error.fatal (once per failed top-level run).
|
|
17
|
+
*
|
|
18
|
+
* Fires at the TOP LEVEL only — footprintjs `onRunFailed` is a run
|
|
19
|
+
* boundary, not a per-stage event. Subflow errors propagate up and
|
|
20
|
+
* surface here once.
|
|
21
|
+
*/
|
|
22
|
+
import type { CombinedRecorder, FlowRunFailedEvent } from 'footprintjs';
|
|
23
|
+
import type { EventDispatcher } from '../../events/dispatcher.js';
|
|
24
|
+
import { type RunContext } from '../../bridge/eventMeta.js';
|
|
25
|
+
export interface ErrorBridgeOptions {
|
|
26
|
+
readonly dispatcher: EventDispatcher;
|
|
27
|
+
/** Recorder id — must be unique among attached recorders. */
|
|
28
|
+
readonly id?: string;
|
|
29
|
+
readonly getRunContext: () => RunContext;
|
|
30
|
+
}
|
|
31
|
+
export declare class ErrorBridge implements CombinedRecorder {
|
|
32
|
+
readonly id: string;
|
|
33
|
+
private readonly dispatcher;
|
|
34
|
+
private readonly getRunContext;
|
|
35
|
+
constructor(options: ErrorBridgeOptions);
|
|
36
|
+
onRunFailed(event: FlowRunFailedEvent): void;
|
|
37
|
+
}
|
|
38
|
+
export declare function errorBridge(options: ErrorBridgeOptions): ErrorBridge;
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* EvalRecorder — forwards `agentfootprint.eval.*` emits to the dispatcher.
|
|
3
|
+
*
|
|
4
|
+
* Pattern: Factory over EmitBridge.
|
|
5
|
+
* Role: Bridges consumer-emitted `eval.score` + `eval.threshold_crossed`
|
|
6
|
+
* events to typed listeners. Evaluation is a consumer concern
|
|
7
|
+
* (LLM-based grading, heuristic checks, reference-output diffs),
|
|
8
|
+
* so the library only provides transport — not any built-in
|
|
9
|
+
* evaluators.
|
|
10
|
+
* Emits: agentfootprint.eval.score / eval.threshold_crossed
|
|
11
|
+
*/
|
|
12
|
+
import { EmitBridge, type EmitBridgeOptions } from './EmitBridge.js';
|
|
13
|
+
export type EvalRecorderOptions = Omit<EmitBridgeOptions, 'id' | 'prefix'> & {
|
|
14
|
+
readonly id?: string;
|
|
15
|
+
};
|
|
16
|
+
export declare function evalRecorder(options: EvalRecorderOptions): EmitBridge;
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* MemoryRecorder — forwards `agentfootprint.memory.*` emits to the dispatcher.
|
|
3
|
+
*
|
|
4
|
+
* Pattern: Factory over EmitBridge.
|
|
5
|
+
* Role: Bridges memory-layer events (strategy_applied, attached,
|
|
6
|
+
* detached, written) emitted by consumer memory adapters.
|
|
7
|
+
* The library does not ship a memory implementation; consumers
|
|
8
|
+
* plug in their own store and emit these events where relevant
|
|
9
|
+
* (e.g., before/after sliding-window summarization).
|
|
10
|
+
* Emits: agentfootprint.memory.strategy_applied / attached /
|
|
11
|
+
* detached / written
|
|
12
|
+
*/
|
|
13
|
+
import { EmitBridge, type EmitBridgeOptions } from './EmitBridge.js';
|
|
14
|
+
export type MemoryRecorderOptions = Omit<EmitBridgeOptions, 'id' | 'prefix'> & {
|
|
15
|
+
readonly id?: string;
|
|
16
|
+
};
|
|
17
|
+
export declare function memoryRecorder(options: MemoryRecorderOptions): EmitBridge;
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* PermissionRecorder — forwards `agentfootprint.permission.*` emits
|
|
3
|
+
* to the dispatcher.
|
|
4
|
+
*
|
|
5
|
+
* Pattern: Factory over EmitBridge.
|
|
6
|
+
* Role: Bridges permission.check, permission.gate_opened, and
|
|
7
|
+
* permission.gate_closed emits into the typed dispatcher so
|
|
8
|
+
* consumer `.on('agentfootprint.permission.check', ...)`
|
|
9
|
+
* listeners fire.
|
|
10
|
+
* Emits: agentfootprint.permission.check / gate_opened / gate_closed
|
|
11
|
+
*/
|
|
12
|
+
import { EmitBridge, type EmitBridgeOptions } from './EmitBridge.js';
|
|
13
|
+
export type PermissionRecorderOptions = Omit<EmitBridgeOptions, 'id' | 'prefix'> & {
|
|
14
|
+
readonly id?: string;
|
|
15
|
+
};
|
|
16
|
+
export declare function permissionRecorder(options: PermissionRecorderOptions): EmitBridge;
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* ReliabilityRecorder — forwards `agentfootprint.reliability.*` emits to
|
|
3
|
+
* the dispatcher.
|
|
4
|
+
*
|
|
5
|
+
* Pattern: Factory (GoF) returning an EmitBridge instance.
|
|
6
|
+
* Role: Bridges the rules-based reliability loop's telemetry
|
|
7
|
+
* (`reliability.fail_fast` / `reliability.retried` /
|
|
8
|
+
* `reliability.recovered`, emitted from `executeWithReliability`
|
|
9
|
+
* via `typedEmit`) to the EventDispatcher so typed consumer
|
|
10
|
+
* listeners (`agent.on('agentfootprint.reliability.retried', …)`)
|
|
11
|
+
* fire. Without this bridge those emits hit the footprintjs emit
|
|
12
|
+
* channel but never reach the dispatcher.
|
|
13
|
+
* Emits: agentfootprint.reliability.fail_fast / retried / recovered
|
|
14
|
+
*
|
|
15
|
+
* NOTE: this is the RULES-LOOP family. The generic `error.retried` /
|
|
16
|
+
* `error.recovered` events are reserved for the standalone provider
|
|
17
|
+
* decorators (withRetry/withFallback) and are NOT bridged here — see
|
|
18
|
+
* docs/MENTAL_MODEL.md §14.
|
|
19
|
+
*/
|
|
20
|
+
import { EmitBridge, type EmitBridgeOptions } from './EmitBridge.js';
|
|
21
|
+
export type ReliabilityRecorderOptions = Omit<EmitBridgeOptions, 'id' | 'prefix'> & {
|
|
22
|
+
readonly id?: string;
|
|
23
|
+
};
|
|
24
|
+
export declare function reliabilityRecorder(options: ReliabilityRecorderOptions): EmitBridge;
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* SkillRecorder — forwards `agentfootprint.skill.*` emits to the dispatcher.
|
|
3
|
+
*
|
|
4
|
+
* Pattern: Factory over EmitBridge.
|
|
5
|
+
* Role: Bridges skill lifecycle events (activated, deactivated) emitted
|
|
6
|
+
* by consumer skill-management code. Skills are a consumer-owned
|
|
7
|
+
* context-engineering concern; the library only provides transport.
|
|
8
|
+
* Emits: agentfootprint.skill.activated / skill.deactivated
|
|
9
|
+
*/
|
|
10
|
+
import { EmitBridge, type EmitBridgeOptions } from './EmitBridge.js';
|
|
11
|
+
export type SkillRecorderOptions = Omit<EmitBridgeOptions, 'id' | 'prefix'> & {
|
|
12
|
+
readonly id?: string;
|
|
13
|
+
};
|
|
14
|
+
export declare function skillRecorder(options: SkillRecorderOptions): EmitBridge;
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* StreamRecorder — forwards `agentfootprint.stream.*` emits to the dispatcher.
|
|
3
|
+
*
|
|
4
|
+
* Pattern: Factory (GoF) returning an EmitBridge instance.
|
|
5
|
+
* Role: Convenience constructor for the stream-domain bridge recorder.
|
|
6
|
+
* Stage code in LLMCall/Agent calls `typedEmit(scope, 'agentfootprint.stream.llm_start', {...})`;
|
|
7
|
+
* this recorder observes via footprintjs's EmitRecorder channel
|
|
8
|
+
* and re-dispatches with typed payloads + enriched meta.
|
|
9
|
+
* Emits: agentfootprint.stream.llm_start / llm_end / token / tool_start / tool_end
|
|
10
|
+
*/
|
|
11
|
+
import { EmitBridge, type EmitBridgeOptions } from './EmitBridge.js';
|
|
12
|
+
export type StreamRecorderOptions = Omit<EmitBridgeOptions, 'id' | 'prefix'> & {
|
|
13
|
+
readonly id?: string;
|
|
14
|
+
};
|
|
15
|
+
export declare function streamRecorder(options: StreamRecorderOptions): EmitBridge;
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* ToolsRecorder — forwards `agentfootprint.tools.*` emits to the dispatcher.
|
|
3
|
+
*
|
|
4
|
+
* Pattern: Factory over EmitBridge.
|
|
5
|
+
* Role: Bridges tool-domain events. Today: discovery_failed (emitted by
|
|
6
|
+
* buildToolsSlot when an external `ToolProvider.list(ctx)` throws
|
|
7
|
+
* or rejects). The other tools.* events (offered/activated/
|
|
8
|
+
* deactivated) are declared in the registry for consumer code
|
|
9
|
+
* that wants to emit them; the same prefix bridge forwards all
|
|
10
|
+
* of them.
|
|
11
|
+
* Emits: agentfootprint.tools.offered / tools.activated / tools.deactivated
|
|
12
|
+
* / tools.discovery_failed
|
|
13
|
+
*/
|
|
14
|
+
import { EmitBridge, type EmitBridgeOptions } from './EmitBridge.js';
|
|
15
|
+
export type ToolsRecorderOptions = Omit<EmitBridgeOptions, 'id' | 'prefix'> & {
|
|
16
|
+
readonly id?: string;
|
|
17
|
+
};
|
|
18
|
+
export declare function toolsRecorder(options: ToolsRecorderOptions): EmitBridge;
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* ValidationRecorder — forwards `agentfootprint.validation.*` emits to the
|
|
3
|
+
* dispatcher.
|
|
4
|
+
*
|
|
5
|
+
* Pattern: Factory over EmitBridge.
|
|
6
|
+
* Role: Bridges tool-args validation events (#9) emitted by the
|
|
7
|
+
* toolCalls stage when LLM-produced args fail the tool's declared
|
|
8
|
+
* `inputSchema` — so consumers observe rejected/warned calls via
|
|
9
|
+
* `agent.on('agentfootprint.validation.args_invalid', ...)`.
|
|
10
|
+
* Emits: agentfootprint.validation.args_invalid
|
|
11
|
+
*/
|
|
12
|
+
import { EmitBridge, type EmitBridgeOptions } from './EmitBridge.js';
|
|
13
|
+
export type ValidationRecorderOptions = Omit<EmitBridgeOptions, 'id' | 'prefix'> & {
|
|
14
|
+
readonly id?: string;
|
|
15
|
+
};
|
|
16
|
+
export declare function validationRecorder(options: ValidationRecorderOptions): EmitBridge;
|