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,139 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* defineRAG — sugar factory for retrieval-augmented generation.
|
|
3
|
+
*
|
|
4
|
+
* RAG is a context-engineering flavor: embed the user's question,
|
|
5
|
+
* retrieve top-K semantically similar chunks from a vector store,
|
|
6
|
+
* inject those chunks into the messages slot of the next LLM call.
|
|
7
|
+
* It's the same plumbing as `defineMemory({ type: SEMANTIC,
|
|
8
|
+
* strategy: TOP_K })` — the rename is for intent + ergonomics.
|
|
9
|
+
*
|
|
10
|
+
* defineMemory ─┬─► EPISODIC (raw conversation)
|
|
11
|
+
* ├─► SEMANTIC (extracted facts / RAG chunks)
|
|
12
|
+
* ├─► NARRATIVE (beats / summaries)
|
|
13
|
+
* └─► CAUSAL (footprintjs decision snapshots)
|
|
14
|
+
*
|
|
15
|
+
* defineRAG ─► SEMANTIC + TOP_K with RAG-specific defaults
|
|
16
|
+
* (asRole='user', threshold=0.7, no LLM-extract)
|
|
17
|
+
*
|
|
18
|
+
* Pattern: Composition over duplication — defineRAG returns a
|
|
19
|
+
* MemoryDefinition produced by defineMemory. No new engine
|
|
20
|
+
* code, no new slot subflow, no new event type.
|
|
21
|
+
*
|
|
22
|
+
* Role: Layer-3 context-engineering primitive. Lives next to
|
|
23
|
+
* defineSkill / defineSteering / defineInstruction / defineFact
|
|
24
|
+
* but resolves to a memory subflow rather than an Injection
|
|
25
|
+
* (RAG content is computed at runtime via async retrieval —
|
|
26
|
+
* can't fit the synchronous Injection.inject shape).
|
|
27
|
+
*
|
|
28
|
+
* Emits: Indirectly — the underlying memory pipeline emits
|
|
29
|
+
* `agentfootprint.context.injected` when retrieved chunks
|
|
30
|
+
* land in the messages slot.
|
|
31
|
+
*
|
|
32
|
+
* @see ./indexDocuments.ts for the seeding helper
|
|
33
|
+
* @see ../../memory/define.ts for the underlying factory
|
|
34
|
+
*
|
|
35
|
+
* @example Basic usage
|
|
36
|
+
* ```ts
|
|
37
|
+
* import { * Agent, defineRAG, indexDocuments, * } from 'agentfootprint'
|
|
38
|
+
import { InMemoryStore, mockEmbedder } from 'agentfootprint/memory'
|
|
39
|
+
import { mock } from 'agentfootprint/llm-providers';
|
|
40
|
+
*
|
|
41
|
+
* const embedder = mockEmbedder();
|
|
42
|
+
* const store = new InMemoryStore();
|
|
43
|
+
*
|
|
44
|
+
* // Seed the store once at startup
|
|
45
|
+
* await indexDocuments(store, embedder, [
|
|
46
|
+
* { id: 'doc1', content: 'Refunds are processed within 3 business days.' },
|
|
47
|
+
* { id: 'doc2', content: 'Pro plan costs $20/month.' },
|
|
48
|
+
* ]);
|
|
49
|
+
*
|
|
50
|
+
* const docs = defineRAG({
|
|
51
|
+
* id: 'product-docs',
|
|
52
|
+
* description: 'Retrieve product documentation chunks',
|
|
53
|
+
* store,
|
|
54
|
+
* embedder,
|
|
55
|
+
* topK: 3,
|
|
56
|
+
* threshold: 0.6,
|
|
57
|
+
* });
|
|
58
|
+
*
|
|
59
|
+
* const agent = Agent.create({ provider: mock({ reply: 'ok' }), model: 'mock' })
|
|
60
|
+
* .rag(docs)
|
|
61
|
+
* .build();
|
|
62
|
+
* ```
|
|
63
|
+
*/
|
|
64
|
+
import type { ContextRole } from '../../events/types.js';
|
|
65
|
+
import type { Embedder } from '../../memory/embedding/index.js';
|
|
66
|
+
import type { MemoryStore } from '../../memory/store/index.js';
|
|
67
|
+
import type { MemoryDefinition } from '../../memory/define.types.js';
|
|
68
|
+
export interface DefineRAGOptions {
|
|
69
|
+
/** Stable id. Becomes the scope-key suffix and the Lens label. */
|
|
70
|
+
readonly id: string;
|
|
71
|
+
/**
|
|
72
|
+
* Human-readable description. Surfaces in narrative + Lens hover.
|
|
73
|
+
* Recommend describing the *corpus* (e.g., "Product documentation
|
|
74
|
+
* chunks indexed weekly from docs.example.com").
|
|
75
|
+
*/
|
|
76
|
+
readonly description?: string;
|
|
77
|
+
/**
|
|
78
|
+
* Vector-capable store containing the indexed corpus. Must implement
|
|
79
|
+
* `search()`. Use `indexDocuments(store, embedder, docs)` at startup
|
|
80
|
+
* to populate it. Ships with `InMemoryStore` for dev/tests; swap to
|
|
81
|
+
* `pgvector` / Pinecone / Qdrant adapters in production.
|
|
82
|
+
*/
|
|
83
|
+
readonly store: MemoryStore;
|
|
84
|
+
/**
|
|
85
|
+
* Embedder used for the read-side query. Pass the SAME embedder
|
|
86
|
+
* instance (or one with the same `name`) that was used for indexing
|
|
87
|
+
* — cross-model similarity scores are not comparable.
|
|
88
|
+
*/
|
|
89
|
+
readonly embedder: Embedder;
|
|
90
|
+
/**
|
|
91
|
+
* Stable id of the embedder. Stored on entries during indexing
|
|
92
|
+
* (via `indexDocuments`) and filtered at search time so a later
|
|
93
|
+
* embedder swap doesn't pollute results.
|
|
94
|
+
*/
|
|
95
|
+
readonly embedderId?: string;
|
|
96
|
+
/**
|
|
97
|
+
* Top-K chunks to retrieve per turn. Default 3 (balanced —
|
|
98
|
+
* defends against lost-in-the-middle while giving multiple
|
|
99
|
+
* perspectives). Increase for richer context, decrease for cost.
|
|
100
|
+
*/
|
|
101
|
+
readonly topK?: number;
|
|
102
|
+
/**
|
|
103
|
+
* Minimum cosine similarity to inject. **Strict** — when no chunk
|
|
104
|
+
* meets the threshold, NO injection happens (no fallback that would
|
|
105
|
+
* pollute the prompt with weak matches). Default 0.7.
|
|
106
|
+
*
|
|
107
|
+
* Tuning note: 0.7 is a high bar for some embedders. Sentence-BERT
|
|
108
|
+
* relatives (`all-MiniLM-L6-v2`, etc.) often score 0.4–0.6 even on
|
|
109
|
+
* relevant chunks. If you see frequent zero-result silent skips,
|
|
110
|
+
* lower to ~0.5 and observe the `agentfootprint.context.injected`
|
|
111
|
+
* stream. OpenAI `text-embedding-3-*` and Cohere embed-v3 typically
|
|
112
|
+
* sit comfortably with 0.7.
|
|
113
|
+
*/
|
|
114
|
+
readonly threshold?: number;
|
|
115
|
+
/**
|
|
116
|
+
* Role to use when injecting retrieved chunks into the messages
|
|
117
|
+
* slot. Default `'user'`.
|
|
118
|
+
*
|
|
119
|
+
* Why `'user'`: in tool-using ReAct loops, retrieved chunks
|
|
120
|
+
* conceptually "augment what the user asked." Anthropic's tool-use
|
|
121
|
+
* cookbook and OpenAI's RAG cookbook both show retrieved context
|
|
122
|
+
* inside user-turn messages.
|
|
123
|
+
*
|
|
124
|
+
* Use `'system'` for authoritative reference docs that should
|
|
125
|
+
* outweigh user instruction (policy / compliance / brand-voice
|
|
126
|
+
* corpora). Use `'assistant'` only if you've persisted prior agent
|
|
127
|
+
* turns as context — rare.
|
|
128
|
+
*/
|
|
129
|
+
readonly asRole?: ContextRole;
|
|
130
|
+
}
|
|
131
|
+
/**
|
|
132
|
+
* Build a RAG context-engineering definition. The returned
|
|
133
|
+
* `MemoryDefinition` is registered on the Agent via `.rag(definition)`
|
|
134
|
+
* (or, equivalently, `.memory(definition)` — same plumbing).
|
|
135
|
+
*
|
|
136
|
+
* @throws when `store` does not implement `search()`. RAG requires a
|
|
137
|
+
* vector-capable adapter.
|
|
138
|
+
*/
|
|
139
|
+
export declare function defineRAG(opts: DefineRAGOptions): MemoryDefinition;
|
|
@@ -34,9 +34,9 @@
|
|
|
34
34
|
*
|
|
35
35
|
* @example Basic usage
|
|
36
36
|
* ```ts
|
|
37
|
-
* import {
|
|
38
|
-
|
|
39
|
-
|
|
37
|
+
* import { * Agent, defineRAG, indexDocuments, * } from 'agentfootprint'
|
|
38
|
+
import { InMemoryStore, mockEmbedder } from 'agentfootprint/memory'
|
|
39
|
+
import { mock } from 'agentfootprint/llm-providers';
|
|
40
40
|
*
|
|
41
41
|
* const embedder = mockEmbedder();
|
|
42
42
|
* const store = new InMemoryStore();
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* RAG — retrieval-augmented generation as a context-engineering
|
|
3
|
+
* flavor. ONE factory + ONE seeding helper. Composes over the memory
|
|
4
|
+
* subsystem (semantic + top-K + strict threshold).
|
|
5
|
+
*/
|
|
6
|
+
export { defineRAG, type DefineRAGOptions } from './defineRAG.js';
|
|
7
|
+
export { indexDocuments, type IndexDocumentsOptions, type RagDocument } from './indexDocuments.js';
|
|
@@ -0,0 +1,106 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* indexDocuments — seed a vector-capable MemoryStore with documents.
|
|
3
|
+
*
|
|
4
|
+
* Embeds each document, builds a `MemoryEntry<{content, metadata?}>`,
|
|
5
|
+
* batches into `store.putMany()`. Used at application startup to
|
|
6
|
+
* populate a RAG store before the first agent run.
|
|
7
|
+
*
|
|
8
|
+
* Pattern: Bulk-write helper. Not a flowchart stage — it runs once
|
|
9
|
+
* at boot, not per-iteration.
|
|
10
|
+
* Role: Layer-3 RAG pipeline starter. Pairs with `defineRAG()`
|
|
11
|
+
* which only does the read side.
|
|
12
|
+
* Emits: N/A — startup-time batch write, not part of the agent run.
|
|
13
|
+
*
|
|
14
|
+
* @example
|
|
15
|
+
* ```ts
|
|
16
|
+
* import { Agent, indexDocuments, defineRAG } from 'agentfootprint'
|
|
17
|
+
import { InMemoryStore, mockEmbedder } from 'agentfootprint/memory';
|
|
18
|
+
*
|
|
19
|
+
* const store = new InMemoryStore();
|
|
20
|
+
* const embedder = mockEmbedder();
|
|
21
|
+
*
|
|
22
|
+
* await indexDocuments(store, embedder, [
|
|
23
|
+
* { id: 'doc1', content: 'Refunds processed within 3 business days.' },
|
|
24
|
+
* { id: 'doc2', content: 'Pro plan: $20/mo, includes priority support.', metadata: { tier: 'pro' } },
|
|
25
|
+
* { id: 'doc3', content: 'Free plan: limited to 100 calls/month.' },
|
|
26
|
+
* ]);
|
|
27
|
+
*
|
|
28
|
+
* const docs = defineRAG({ id: 'product-docs', store, embedder });
|
|
29
|
+
* const agent = Agent.create({ provider }).rag(docs).build();
|
|
30
|
+
* ```
|
|
31
|
+
*/
|
|
32
|
+
import type { Embedder } from '../../memory/embedding/index.js';
|
|
33
|
+
import type { MemoryStore } from '../../memory/store/index.js';
|
|
34
|
+
import type { MemoryIdentity } from '../../memory/identity/index.js';
|
|
35
|
+
/** A document to index. `id` must be unique within the store + identity. */
|
|
36
|
+
export interface RagDocument {
|
|
37
|
+
readonly id: string;
|
|
38
|
+
readonly content: string;
|
|
39
|
+
readonly metadata?: Readonly<Record<string, unknown>>;
|
|
40
|
+
}
|
|
41
|
+
export interface IndexDocumentsOptions {
|
|
42
|
+
/**
|
|
43
|
+
* Identity scope to write under. Default: a single shared
|
|
44
|
+
* `{ conversationId: '_global' }` namespace, suitable for app-wide
|
|
45
|
+
* corpora.
|
|
46
|
+
*
|
|
47
|
+
* **Multi-tenant footgun:** the read side (`agent.run({ identity })`)
|
|
48
|
+
* queries within whichever identity is passed at request time.
|
|
49
|
+
* If you index here under `_global` but query under
|
|
50
|
+
* `{ tenant: 'acme' }`, you'll get ZERO results — silently. Either:
|
|
51
|
+
* 1. Index every document under each tenant's identity (duplicated
|
|
52
|
+
* storage, but isolated), or
|
|
53
|
+
* 2. Index under `_global` AND query under `_global` (shared
|
|
54
|
+
* corpus across tenants — fine for product docs, NOT for
|
|
55
|
+
* tenant-private data), or
|
|
56
|
+
* 3. Use a vector store adapter that supports multi-namespace
|
|
57
|
+
* reads at query time (Pinecone, Qdrant — outside this helper's
|
|
58
|
+
* scope).
|
|
59
|
+
*/
|
|
60
|
+
readonly identity?: MemoryIdentity;
|
|
61
|
+
/**
|
|
62
|
+
* Stable id of the embedder. Stored on each entry so a future
|
|
63
|
+
* embedder swap doesn't silently mix similarity scores. Default:
|
|
64
|
+
* `'default-embedder'` — pass an explicit id when you may rotate
|
|
65
|
+
* embedders.
|
|
66
|
+
*/
|
|
67
|
+
readonly embedderId?: string;
|
|
68
|
+
/**
|
|
69
|
+
* Optional tier tag to attach to indexed entries (`'hot'` /
|
|
70
|
+
* `'warm'` / `'cold'`). Useful when read-side `defineRAG` should
|
|
71
|
+
* filter to a subset of the corpus.
|
|
72
|
+
*/
|
|
73
|
+
readonly tier?: 'hot' | 'warm' | 'cold';
|
|
74
|
+
/**
|
|
75
|
+
* Optional TTL in milliseconds from indexing time. Useful for
|
|
76
|
+
* compliance retention windows (e.g., re-index quarterly).
|
|
77
|
+
*/
|
|
78
|
+
readonly ttlMs?: number;
|
|
79
|
+
/**
|
|
80
|
+
* Optional abort signal — embedders making network calls thread
|
|
81
|
+
* this through to abort batch indexing on shutdown / timeout.
|
|
82
|
+
*/
|
|
83
|
+
readonly signal?: AbortSignal;
|
|
84
|
+
/**
|
|
85
|
+
* Max number of concurrent embed calls when the embedder doesn't
|
|
86
|
+
* implement `embedBatch`. Default `8`. Without this cap, a 10K-doc
|
|
87
|
+
* corpus would fire 10K parallel embed calls and trigger rate limits.
|
|
88
|
+
* Ignored when `embedBatch` is available (the embedder controls
|
|
89
|
+
* its own batching).
|
|
90
|
+
*/
|
|
91
|
+
readonly maxConcurrency?: number;
|
|
92
|
+
}
|
|
93
|
+
/**
|
|
94
|
+
* Embed + persist documents. Returns the count actually indexed
|
|
95
|
+
* (skips duplicates if the store rejects them). Throws on embedder
|
|
96
|
+
* failure or store error — fail loud at startup is desirable.
|
|
97
|
+
*
|
|
98
|
+
* **Re-indexing semantics:** entries are written with `version: 1` and
|
|
99
|
+
* `putMany` (most adapters: last-write-wins). Re-running this helper
|
|
100
|
+
* after the store has been mutated by other writers may stomp their
|
|
101
|
+
* versions. For idempotent corpus refresh, either delete-then-index
|
|
102
|
+
* or use a custom upsert via `store.putIfVersion()` per document. A
|
|
103
|
+
* first-class `mode: 'upsert' | 'replace'` API is planned for a
|
|
104
|
+
* future release.
|
|
105
|
+
*/
|
|
106
|
+
export declare function indexDocuments(store: MemoryStore, embedder: Embedder, documents: readonly RagDocument[], options?: IndexDocumentsOptions): Promise<number>;
|
|
@@ -13,7 +13,8 @@
|
|
|
13
13
|
*
|
|
14
14
|
* @example
|
|
15
15
|
* ```ts
|
|
16
|
-
* import { Agent,
|
|
16
|
+
* import { Agent, indexDocuments, defineRAG } from 'agentfootprint'
|
|
17
|
+
import { InMemoryStore, mockEmbedder } from 'agentfootprint/memory';
|
|
17
18
|
*
|
|
18
19
|
* const store = new InMemoryStore();
|
|
19
20
|
* const embedder = mockEmbedder();
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"indexDocuments.js","sourceRoot":"","sources":["../../../../src/lib/rag/indexDocuments.ts"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"indexDocuments.js","sourceRoot":"","sources":["../../../../src/lib/rag/indexDocuments.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA8BG;AAwEH,MAAM,gBAAgB,GAAmB,EAAE,cAAc,EAAE,SAAS,EAAE,CAAC;AAEvE;;;;;;;;;;;;GAYG;AACH,MAAM,CAAC,KAAK,UAAU,cAAc,CAClC,KAAkB,EAClB,QAAkB,EAClB,SAAiC,EACjC,UAAiC,EAAE;IAEnC,IAAI,CAAC,KAAK;QAAE,MAAM,IAAI,KAAK,CAAC,sCAAsC,CAAC,CAAC;IACpE,IAAI,CAAC,QAAQ;QAAE,MAAM,IAAI,KAAK,CAAC,yCAAyC,CAAC,CAAC;IAC1E,IAAI,CAAC,KAAK,CAAC,OAAO,CAAC,SAAS,CAAC,IAAI,SAAS,CAAC,MAAM,KAAK,CAAC;QAAE,OAAO,CAAC,CAAC;IAElE,MAAM,QAAQ,GAAG,OAAO,CAAC,QAAQ,IAAI,gBAAgB,CAAC;IACtD,MAAM,UAAU,GAAG,OAAO,CAAC,UAAU,IAAI,kBAAkB,CAAC;IAC5D,MAAM,GAAG,GAAG,IAAI,CAAC,GAAG,EAAE,CAAC;IACvB,MAAM,GAAG,GAAG,OAAO,CAAC,KAAK,CAAC,CAAC,CAAC,GAAG,GAAG,OAAO,CAAC,KAAK,CAAC,CAAC,CAAC,SAAS,CAAC;IAE5D,sEAAsE;IACtE,8DAA8D;IAC9D,oDAAoD;IACpD,MAAM,KAAK,GAAG,SAAS,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,OAAO,CAAC,CAAC;IAC9C,IAAI,OAAuC,CAAC;IAC5C,IAAI,QAAQ,CAAC,UAAU,EAAE,CAAC;QACxB,OAAO,GAAG,MAAM,QAAQ,CAAC,UAAU,CAAC;YAClC,KAAK;YACL,GAAG,CAAC,OAAO,CAAC,MAAM,IAAI,EAAE,MAAM,EAAE,OAAO,CAAC,MAAM,EAAE,CAAC;SAClD,CAAC,CAAC;IACL,CAAC;SAAM,CAAC;QACN,MAAM,KAAK,GAAG,IAAI,CAAC,GAAG,CAAC,CAAC,EAAE,OAAO,CAAC,cAAc,IAAI,CAAC,CAAC,CAAC;QACvD,OAAO,GAAG,MAAM,oBAAoB,CAAC,QAAQ,EAAE,KAAK,EAAE,KAAK,EAAE,OAAO,CAAC,MAAM,CAAC,CAAC;IAC/E,CAAC;IAED,MAAM,OAAO,GAA+B,SAAS,CAAC,GAAG,CAAC,CAAC,GAAG,EAAE,CAAC,EAAE,EAAE;QACnE,MAAM,GAAG,GAAG,OAAO,CAAC,CAAC,CAAC,CAAC;QACvB,OAAO;YACL,EAAE,EAAE,GAAG,CAAC,EAAE;YACV,KAAK,EAAE,GAAG;YACV,OAAO,EAAE,CAAC;YACV,SAAS,EAAE,GAAG;YACd,SAAS,EAAE,GAAG;YACd,cAAc,EAAE,GAAG;YACnB,WAAW,EAAE,CAAC;YACd,GAAG,CAAC,GAAG,IAAI,GAAG,CAAC,MAAM,GAAG,CAAC,IAAI,EAAE,SAAS,EAAE,CAAC,GAAG,GAAG,CAAC,EAAE,CAAC;YACrD,cAAc,EAAE,UAAU;YAC1B,GAAG,CAAC,GAAG,KAAK,SAAS,IAAI,EAAE,GAAG,EAAE,CAAC;YACjC,GAAG,CAAC,OAAO,CAAC,IAAI,IAAI,EAAE,IAAI,EAAE,OAAO,CAAC,IAAI,EAAE,CAAC;YAC3C,MAAM,EAAE,EAAE,IAAI,EAAE,CAAC,EAAE,QAAQ,EAAE;SAC9B,CAAC;IACJ,CAAC,CAAC,CAAC;IAEH,MAAM,KAAK,CAAC,OAAO,CAAC,QAAQ,EAAE,OAAO,CAAC,CAAC;IACvC,OAAO,OAAO,CAAC,MAAM,CAAC;AACxB,CAAC;AAED,KAAK,UAAU,oBAAoB,CACjC,QAAkB,EAClB,KAAwB,EACxB,KAAa,EACb,MAAoB;IAEpB,MAAM,OAAO,GAA0B,IAAI,KAAK,CAAC,KAAK,CAAC,MAAM,CAAC,CAAC;IAC/D,IAAI,IAAI,GAAG,CAAC,CAAC;IACb,MAAM,OAAO,GAAG,KAAK,CAAC,IAAI,CAAC,EAAE,MAAM,EAAE,IAAI,CAAC,GAAG,CAAC,KAAK,EAAE,KAAK,CAAC,MAAM,CAAC,EAAE,EAAE,KAAK,IAAI,EAAE;QAC/E,SAAS,CAAC;YACR,MAAM,CAAC,GAAG,IAAI,EAAE,CAAC;YACjB,IAAI,CAAC,IAAI,KAAK,CAAC,MAAM;gBAAE,OAAO;YAC9B,wDAAwD;YACxD,oEAAoE;YACpE,MAAM,IAAI,GAAG,KAAK,CAAC,CAAC,CAAE,CAAC;YACvB,OAAO,CAAC,CAAC,CAAC,GAAG,MAAM,QAAQ,CAAC,KAAK,CAAC;gBAChC,IAAI;gBACJ,GAAG,CAAC,MAAM,IAAI,EAAE,MAAM,EAAE,CAAC;aAC1B,CAAC,CAAC;QACL,CAAC;IACH,CAAC,CAAC,CAAC;IACH,MAAM,OAAO,CAAC,GAAG,CAAC,OAAO,CAAC,CAAC;IAC3B,OAAO,OAAO,CAAC;AACjB,CAAC"}
|
|
@@ -0,0 +1,83 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* analyzeToolCatalog — the tool-catalog confusability lint
|
|
3
|
+
* (RFC-002 block C1, the adoption front door).
|
|
4
|
+
*
|
|
5
|
+
* Pattern: policy layer over `pairwiseSimilarity` (influence-core) — the
|
|
6
|
+
* geometry is computed there; thresholds, verdicts, hints and
|
|
7
|
+
* the structural rule pack live here. Everything is consumer-
|
|
8
|
+
* injectable with our defaults (the plug-and-play meta-pattern).
|
|
9
|
+
* Role: `src/lib/tool-lint/`. ZERO stack buy-in — plain
|
|
10
|
+
* `{ name, description?, inputSchema? }[]` in, report out.
|
|
11
|
+
* `catalogFromTools` adapts the library's own `Tool[]`;
|
|
12
|
+
* `coerceCatalog` (cli.ts) normalizes OpenAI/Anthropic/MCP
|
|
13
|
+
* shapes.
|
|
14
|
+
*
|
|
15
|
+
* ## What is embedded (and why)
|
|
16
|
+
*
|
|
17
|
+
* `confusabilityText(tool)` = tokenized name + ': ' + description. The
|
|
18
|
+
* model differentiates tools by name AND description together, so two
|
|
19
|
+
* tools with near-identical names and overlapping descriptions ARE the
|
|
20
|
+
* confusability case (`get_fcns_database` vs `influx_get_fcns_database`)
|
|
21
|
+
* — embedding only the prose would miss the name signal.
|
|
22
|
+
*
|
|
23
|
+
* ## Calibration (RFC-002 §3 — read this before trusting verdicts)
|
|
24
|
+
*
|
|
25
|
+
* Absolute cosine ranges are PER-EMBEDDER. The default threshold (0.85)
|
|
26
|
+
* is a starting point for real sentence embedders. The test/demo
|
|
27
|
+
* `mockEmbedder` (character-frequency) compresses unrelated prose into
|
|
28
|
+
* ~0.85–0.97 — with it, use `MOCK_EMBEDDER_CALIBRATION` and trust only
|
|
29
|
+
* the RELATIVE ordering in `report.similarity.ranked` (the acceptance
|
|
30
|
+
* fixtures assert ordering, never absolute scores).
|
|
31
|
+
*/
|
|
32
|
+
import type { Tool } from '../../core/tools.js';
|
|
33
|
+
import type { AnalyzeToolCatalogOptions, CatalogTool, ToolCatalogReport } from './types.js';
|
|
34
|
+
/** Default `confusabilityThreshold` — a starting point for REAL sentence
|
|
35
|
+
* embedders (unrelated tool descriptions typically land 0.3–0.7).
|
|
36
|
+
* Calibrate per embedder; meaningless for the mock (see below). */
|
|
37
|
+
export declare const DEFAULT_CONFUSABILITY_THRESHOLD = 0.85;
|
|
38
|
+
/** Default `watchBand` below the threshold. */
|
|
39
|
+
export declare const DEFAULT_WATCH_BAND = 0.05;
|
|
40
|
+
/**
|
|
41
|
+
* Threshold/band calibrated for the char-frequency `mockEmbedder` on
|
|
42
|
+
* realistic tool prose (seed corpus: the Neo SAN catalog). The mock
|
|
43
|
+
* compresses unrelated descriptions into ~0.85–0.97 cosine, so expect
|
|
44
|
+
* false positives even at 0.94 — with the mock, the RELATIVE ordering
|
|
45
|
+
* of `report.similarity.ranked` is the trustworthy signal; absolute
|
|
46
|
+
* verdicts are only honest with a real embedder + per-embedder
|
|
47
|
+
* calibration.
|
|
48
|
+
*/
|
|
49
|
+
export declare const MOCK_EMBEDDER_CALIBRATION: Readonly<{
|
|
50
|
+
confusabilityThreshold: 0.94;
|
|
51
|
+
watchBand: 0.02;
|
|
52
|
+
}>;
|
|
53
|
+
/**
|
|
54
|
+
* Adapt the library's `Tool[]` (from `defineTool` / `Agent.tool`) to the
|
|
55
|
+
* lint's plain catalog shape. Trivial on purpose: `Tool.schema` already
|
|
56
|
+
* IS `{ name, description, inputSchema }`.
|
|
57
|
+
*/
|
|
58
|
+
export declare function catalogFromTools(tools: readonly Tool[]): readonly CatalogTool[];
|
|
59
|
+
/**
|
|
60
|
+
* The text the confusability analysis embeds for one tool: the name with
|
|
61
|
+
* `_`/`-`/camelCase boundaries opened into words, then the description.
|
|
62
|
+
* Exported so consumers can reproduce or replace the construction.
|
|
63
|
+
*/
|
|
64
|
+
export declare function confusabilityText(tool: CatalogTool): string;
|
|
65
|
+
/**
|
|
66
|
+
* Lint a tool catalog: pairwise confusability over what the model reads
|
|
67
|
+
* (when an embedder is supplied) + the structural rule pack. Returns a
|
|
68
|
+
* report whose `ok` is the CI gate.
|
|
69
|
+
*
|
|
70
|
+
* Duplicate tool names are themselves reported as structural errors
|
|
71
|
+
* (rule `duplicate-name`, built-in precondition — a catalog where two
|
|
72
|
+
* tools share a name is broken before any similarity question); the
|
|
73
|
+
* duplicates are dropped from the similarity analysis (first one wins).
|
|
74
|
+
*/
|
|
75
|
+
export declare function analyzeToolCatalog(tools: readonly CatalogTool[], options?: AnalyzeToolCatalogOptions): Promise<ToolCatalogReport>;
|
|
76
|
+
/**
|
|
77
|
+
* Suggest the DIFFERENTIATING AXIS for a flagged pair. Heuristic: when
|
|
78
|
+
* the names are near-twins (≤2 distinct tokens), the qualifier IS the
|
|
79
|
+
* axis — the descriptions must say when to choose each variant. When the
|
|
80
|
+
* names differ, surface the few description terms each tool does NOT
|
|
81
|
+
* share, as the place to anchor an explicit choice condition.
|
|
82
|
+
*/
|
|
83
|
+
export declare function differentiationHint(a: CatalogTool, b: CatalogTool): string;
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Tool-lint CLI core (RFC-002 block C3 — the CI gate).
|
|
3
|
+
*
|
|
4
|
+
* Pattern: humble shell — `bin/agentfootprint-lint-tools.mjs` is a
|
|
5
|
+
* 3-line wrapper; ALL behavior (arg parsing, catalog coercion,
|
|
6
|
+
* report, exit code) lives here so it is unit-testable without
|
|
7
|
+
* spawning a process.
|
|
8
|
+
* Role: `src/lib/tool-lint/`. Reads ONE JSON file of tools, prints a
|
|
9
|
+
* report, returns the process exit code:
|
|
10
|
+
* 0 — report.ok
|
|
11
|
+
* 1 — findings failed the gate (!ok)
|
|
12
|
+
* 2 — usage / input error (bad flags, unreadable file,
|
|
13
|
+
* unrecognized JSON shape)
|
|
14
|
+
*
|
|
15
|
+
* ## Embedder & gating honesty
|
|
16
|
+
*
|
|
17
|
+
* The CLI has no way to receive a consumer embedder, so it uses the
|
|
18
|
+
* built-in deterministic mock (char-frequency, offline, dependency-free)
|
|
19
|
+
* for the similarity RANKING — and, by default, does NOT gate on it:
|
|
20
|
+
* without `--threshold`, similarity is report-only (relative ordering +
|
|
21
|
+
* watch hints) and the exit code reflects structural findings alone.
|
|
22
|
+
* Pass `--threshold` to make confusable pairs fail the gate — you own
|
|
23
|
+
* the calibration at that point (start from
|
|
24
|
+
* `MOCK_EMBEDDER_CALIBRATION.confusabilityThreshold` = 0.94). For real
|
|
25
|
+
* embedder gating, use `analyzeToolCatalog` from
|
|
26
|
+
* `agentfootprint/observe` in a small script instead.
|
|
27
|
+
*/
|
|
28
|
+
import type { CatalogTool } from './types.js';
|
|
29
|
+
export interface ToolLintCliIO {
|
|
30
|
+
readonly stdout: (line: string) => void;
|
|
31
|
+
readonly stderr: (line: string) => void;
|
|
32
|
+
}
|
|
33
|
+
/**
|
|
34
|
+
* Normalize any of the recognized tool-list JSON shapes to the lint's
|
|
35
|
+
* plain catalog. Throws (with a shape description) on unrecognized
|
|
36
|
+
* input — the CLI maps that to exit code 2.
|
|
37
|
+
*/
|
|
38
|
+
export declare function coerceCatalog(json: unknown): readonly CatalogTool[];
|
|
39
|
+
/**
|
|
40
|
+
* Run the lint CLI. Returns the exit code (never calls `process.exit` —
|
|
41
|
+
* the bin wrapper assigns it to `process.exitCode`).
|
|
42
|
+
*/
|
|
43
|
+
export declare function runToolLintCli(argv: readonly string[], io?: ToolLintCliIO): Promise<number>;
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* formatToolCatalogReport — human-readable rendering of a lint report.
|
|
3
|
+
*
|
|
4
|
+
* Pattern: pure presenter. One report → one string; used verbatim by the
|
|
5
|
+
* CLI (`agentfootprint-lint-tools`) and the examples so output
|
|
6
|
+
* stays byte-identical across surfaces.
|
|
7
|
+
* Role: `src/lib/tool-lint/` leaf. No I/O.
|
|
8
|
+
*/
|
|
9
|
+
import type { ToolCatalogReport } from './types.js';
|
|
10
|
+
export interface FormatReportOptions {
|
|
11
|
+
/** How many ranked pairs to show in the relative-ordering section.
|
|
12
|
+
* Default 10. 0 hides the section. */
|
|
13
|
+
readonly topPairs?: number;
|
|
14
|
+
/** How many WATCH pairs to print before eliding the rest (the report
|
|
15
|
+
* object always carries all of them). Default 10. */
|
|
16
|
+
readonly maxWatch?: number;
|
|
17
|
+
}
|
|
18
|
+
export declare function formatToolCatalogReport(report: ToolCatalogReport, options?: FormatReportOptions): string;
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* tool-lint — the tool-catalog confusability lint (RFC-002 tier 1,
|
|
3
|
+
* blocks C1–C3).
|
|
4
|
+
*
|
|
5
|
+
* Build-time, CI-gateable, framework-agnostic: a plain
|
|
6
|
+
* `{ name, description?, inputSchema? }[]` in (any OpenAI / Anthropic /
|
|
7
|
+
* LangChain / MCP tool list coerces to it), a report with a CI-gateable
|
|
8
|
+
* `ok` out. The embedding geometry comes from influence-core
|
|
9
|
+
* (`pairwiseSimilarity`); this module is the policy layer — thresholds,
|
|
10
|
+
* verdicts, hints, and the pluggable structural rule pack.
|
|
11
|
+
*
|
|
12
|
+
* Surfaces:
|
|
13
|
+
* - `analyzeToolCatalog(tools, opts)` — the API (C1)
|
|
14
|
+
* - `defaultStructuralRules` + rule factories — the rule pack (C2)
|
|
15
|
+
* - `runToolLintCli` / bin `agentfootprint-lint-tools` — the gate (C3)
|
|
16
|
+
*
|
|
17
|
+
* Front-door guide: docs/guides/tool-catalog-lint.md
|
|
18
|
+
*/
|
|
19
|
+
export type { AnalyzeToolCatalogOptions, CatalogTool, ConfusablePairFinding, LintRule, LintSeverity, PairVerdict, SimilarityReport, StructuralFinding, ToolCatalogReport, } from './types.js';
|
|
20
|
+
export { analyzeToolCatalog, catalogFromTools, confusabilityText, differentiationHint, DEFAULT_CONFUSABILITY_THRESHOLD, DEFAULT_WATCH_BAND, MOCK_EMBEDDER_CALIBRATION, } from './analyze.js';
|
|
21
|
+
export { defaultStructuralRules, descriptionRule, enumInProseRule, optionalParamRule, saysWhatNotWhenRule, DEFAULT_OMISSION_CUES, DEFAULT_WHEN_CUES, type DescriptionRuleOptions, type OptionalParamRuleOptions, type SaysWhatNotWhenRuleOptions, } from './rules.js';
|
|
22
|
+
export { formatToolCatalogReport, type FormatReportOptions } from './format.js';
|
|
23
|
+
export { coerceCatalog, runToolLintCli, type ToolLintCliIO } from './cli.js';
|
|
@@ -0,0 +1,85 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Structural lint rules (RFC-002 block C2) — the PLUGGABLE RULE PACK.
|
|
3
|
+
*
|
|
4
|
+
* Pattern: Strategy list — each rule is a plain `{ id, check }` object;
|
|
5
|
+
* `defaultStructuralRules` is OUR pack, and consumers add /
|
|
6
|
+
* remove / replace freely via `AnalyzeToolCatalogOptions.rules`.
|
|
7
|
+
* Parameterizable rules ship as FACTORIES (`descriptionRule`,
|
|
8
|
+
* `saysWhatNotWhenRule`, …) returning a configured `LintRule`.
|
|
9
|
+
* Role: `src/lib/tool-lint/` leaf. Pure functions over `CatalogTool`;
|
|
10
|
+
* no embedder, no I/O.
|
|
11
|
+
*
|
|
12
|
+
* Every rule encodes a FIELD FINDING from real catalogs (the Neo SAN
|
|
13
|
+
* triage agent's 29-tool catalog was the seed corpus):
|
|
14
|
+
*
|
|
15
|
+
* 1. description-missing-or-short — the model can only guess from a name.
|
|
16
|
+
* 2. says-what-not-when — describes WHAT the tool returns but gives the
|
|
17
|
+
* model no cue for WHEN to pick it over a sibling (the #1 cause of
|
|
18
|
+
* twin-tool confusion: 'get_fcns_database' vs 'influx_get_fcns_database').
|
|
19
|
+
* 3. enum-in-prose — string params whose legal values are listed in prose
|
|
20
|
+
* ("avg_iops | peak_iops | mbps") instead of a JSON-Schema `enum` the
|
|
21
|
+
* model (and validators, see #9 tool-args validation) can act on.
|
|
22
|
+
* 4. optional-param-undocumented — optional params whose omission has
|
|
23
|
+
* meaning (fabric-wide sweep vs one switch) but whose schema never
|
|
24
|
+
* says so; the model can't reason about leaving them out.
|
|
25
|
+
*
|
|
26
|
+
* Honest claim: these are token/regex HEURISTICS. They flag review
|
|
27
|
+
* prompts, not certainties — expect (rare) false positives and tune via
|
|
28
|
+
* the factory options instead of deleting the rule.
|
|
29
|
+
*/
|
|
30
|
+
import type { LintRule } from './types.js';
|
|
31
|
+
export interface DescriptionRuleOptions {
|
|
32
|
+
/** Descriptions shorter than this (in chars) get a `warn`. Default 40. */
|
|
33
|
+
readonly minChars?: number;
|
|
34
|
+
}
|
|
35
|
+
/**
|
|
36
|
+
* Missing description → `error` (the model can only guess from the
|
|
37
|
+
* name). Present but shorter than `minChars` → `warn` (too short to
|
|
38
|
+
* differentiate from siblings).
|
|
39
|
+
*/
|
|
40
|
+
export declare function descriptionRule(options?: DescriptionRuleOptions): LintRule;
|
|
41
|
+
/** RFC-002 C2 heuristic cue list — temporal/conditional words whose
|
|
42
|
+
* presence suggests the description says WHEN to use the tool. */
|
|
43
|
+
export declare const DEFAULT_WHEN_CUES: readonly string[];
|
|
44
|
+
export interface SaysWhatNotWhenRuleOptions {
|
|
45
|
+
/** Cue tokens (whole-word, case-insensitive). Default `DEFAULT_WHEN_CUES`. */
|
|
46
|
+
readonly cueTokens?: readonly string[];
|
|
47
|
+
}
|
|
48
|
+
/**
|
|
49
|
+
* A description with NO temporal/conditional cue token usually describes
|
|
50
|
+
* WHAT the tool returns but never WHEN to pick it — the #1 cause of
|
|
51
|
+
* twin-tool confusion. Heuristic by design: tune `cueTokens` rather than
|
|
52
|
+
* dropping the rule. Skips tools with no description (rule 1's finding).
|
|
53
|
+
*/
|
|
54
|
+
export declare function saysWhatNotWhenRule(options?: SaysWhatNotWhenRuleOptions): LintRule;
|
|
55
|
+
/**
|
|
56
|
+
* A string param whose description enumerates its legal values in prose
|
|
57
|
+
* (pipe-separated literals, or comma lists behind "one of"/"allowed
|
|
58
|
+
* values") should declare a JSON-Schema `enum` instead — the model picks
|
|
59
|
+
* reliably from enums, and arg validators (#9) can enforce them. The
|
|
60
|
+
* field case: Neo's `influx_get_port_ranking.metric` =
|
|
61
|
+
* `"avg_iops | peak_iops | mbps"`.
|
|
62
|
+
*/
|
|
63
|
+
export declare function enumInProseRule(): LintRule;
|
|
64
|
+
/** Words that signal the description DOES say what omission means. */
|
|
65
|
+
export declare const DEFAULT_OMISSION_CUES: readonly string[];
|
|
66
|
+
export interface OptionalParamRuleOptions {
|
|
67
|
+
/** Cue tokens that satisfy the rule. Default `DEFAULT_OMISSION_CUES`. */
|
|
68
|
+
readonly omissionCues?: readonly string[];
|
|
69
|
+
}
|
|
70
|
+
/**
|
|
71
|
+
* An optional param's omission usually MEANS something (Neo:
|
|
72
|
+
* `influx_get_interface_counters` without `switch_name` = fabric-wide
|
|
73
|
+
* sweep) — but the model can only reason about leaving a param out if
|
|
74
|
+
* the description says so. No description at all, or one with no
|
|
75
|
+
* omission cue, gets a `warn`.
|
|
76
|
+
*/
|
|
77
|
+
export declare function optionalParamRule(options?: OptionalParamRuleOptions): LintRule;
|
|
78
|
+
/**
|
|
79
|
+
* OUR rule pack, built with default options. Compose your own:
|
|
80
|
+
*
|
|
81
|
+
* rules: [...defaultStructuralRules, myRule] // add
|
|
82
|
+
* rules: defaultStructuralRules.filter(r => r.id !== '…') // remove
|
|
83
|
+
* rules: [descriptionRule({ minChars: 80 }), …] // re-tune
|
|
84
|
+
*/
|
|
85
|
+
export declare const defaultStructuralRules: readonly LintRule[];
|