agentfootprint 9.41.0 → 9.44.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 +30 -1
- package/CLAUDE.md +3 -1
- package/ai-instructions/claude-code/SKILL.md +31 -1
- package/dist/adapters/hosting/agentcore.js +163 -23
- package/dist/adapters/hosting/agentcore.js.map +1 -1
- package/dist/adapters/hosting/firestoreSessions.js +184 -14
- package/dist/adapters/hosting/firestoreSessions.js.map +1 -1
- package/dist/adapters/hosting/googleAgentEngine.js +29 -0
- package/dist/adapters/hosting/googleAgentEngine.js.map +1 -1
- package/dist/artifacts/conformance/cases.js +20 -0
- package/dist/artifacts/conformance/cases.js.map +1 -1
- package/dist/artifacts/scopePath.js +41 -1
- package/dist/artifacts/scopePath.js.map +1 -1
- package/dist/core/Agent.js +17 -1
- package/dist/core/Agent.js.map +1 -1
- package/dist/core/agent/AgentBuilder.js +56 -1
- package/dist/core/agent/AgentBuilder.js.map +1 -1
- package/dist/core/agent/buildAgentChart.js +5 -1
- package/dist/core/agent/buildAgentChart.js.map +1 -1
- package/dist/core/agent/buildDynamicAgentChart.js +5 -1
- package/dist/core/agent/buildDynamicAgentChart.js.map +1 -1
- package/dist/core/agent/coverage/absent.js +163 -0
- package/dist/core/agent/coverage/absent.js.map +1 -0
- package/dist/core/agent/coverage/answer.js +90 -0
- package/dist/core/agent/coverage/answer.js.map +1 -0
- package/dist/core/agent/coverage/evidence.js +90 -0
- package/dist/core/agent/coverage/evidence.js.map +1 -0
- package/dist/core/agent/coverage/index.js +37 -0
- package/dist/core/agent/coverage/index.js.map +1 -0
- package/dist/core/agent/coverage/items.js +91 -0
- package/dist/core/agent/coverage/items.js.map +1 -0
- package/dist/core/agent/coverage/ledger.js +131 -0
- package/dist/core/agent/coverage/ledger.js.map +1 -0
- package/dist/core/agent/coverage/read.js +56 -0
- package/dist/core/agent/coverage/read.js.map +1 -0
- package/dist/core/agent/coverage/types.js +15 -0
- package/dist/core/agent/coverage/types.js.map +1 -0
- package/dist/core/agent/evidence/evidenceIndex.js +18 -1
- package/dist/core/agent/evidence/evidenceIndex.js.map +1 -1
- package/dist/core/agent/stages/prepareFinal.js +44 -3
- package/dist/core/agent/stages/prepareFinal.js.map +1 -1
- package/dist/core/agent/stages/toolCalls.js +109 -3
- package/dist/core/agent/stages/toolCalls.js.map +1 -1
- package/dist/core/agent/toolEffects.js +1 -1
- package/dist/core/outputFallback.js.map +1 -1
- package/dist/debug.js +49 -25
- package/dist/debug.js.map +1 -1
- package/dist/esm/adapters/hosting/agentcore.d.ts +8 -0
- package/dist/esm/adapters/hosting/agentcore.js +163 -23
- package/dist/esm/adapters/hosting/agentcore.js.map +1 -1
- package/dist/esm/adapters/hosting/firestoreSessions.d.ts +162 -14
- package/dist/esm/adapters/hosting/firestoreSessions.js +182 -13
- package/dist/esm/adapters/hosting/firestoreSessions.js.map +1 -1
- package/dist/esm/adapters/hosting/googleAgentEngine.d.ts +16 -1
- package/dist/esm/adapters/hosting/googleAgentEngine.js +29 -0
- package/dist/esm/adapters/hosting/googleAgentEngine.js.map +1 -1
- package/dist/esm/artifacts/conformance/cases.js +20 -0
- package/dist/esm/artifacts/conformance/cases.js.map +1 -1
- package/dist/esm/artifacts/scopePath.d.ts +31 -0
- package/dist/esm/artifacts/scopePath.js +41 -1
- package/dist/esm/artifacts/scopePath.js.map +1 -1
- package/dist/esm/core/Agent.d.ts +8 -1
- package/dist/esm/core/Agent.js +18 -2
- package/dist/esm/core/Agent.js.map +1 -1
- package/dist/esm/core/agent/AgentBuilder.d.ts +43 -0
- package/dist/esm/core/agent/AgentBuilder.js +56 -1
- package/dist/esm/core/agent/AgentBuilder.js.map +1 -1
- package/dist/esm/core/agent/buildAgentChart.d.ts +9 -0
- package/dist/esm/core/agent/buildAgentChart.js +6 -2
- package/dist/esm/core/agent/buildAgentChart.js.map +1 -1
- package/dist/esm/core/agent/buildDynamicAgentChart.js +6 -2
- package/dist/esm/core/agent/buildDynamicAgentChart.js.map +1 -1
- package/dist/esm/core/agent/coverage/absent.d.ts +104 -0
- package/dist/esm/core/agent/coverage/absent.js +157 -0
- package/dist/esm/core/agent/coverage/absent.js.map +1 -0
- package/dist/esm/core/agent/coverage/answer.d.ts +46 -0
- package/dist/esm/core/agent/coverage/answer.js +86 -0
- package/dist/esm/core/agent/coverage/answer.js.map +1 -0
- package/dist/esm/core/agent/coverage/evidence.d.ts +68 -0
- package/dist/esm/core/agent/coverage/evidence.js +86 -0
- package/dist/esm/core/agent/coverage/evidence.js.map +1 -0
- package/dist/esm/core/agent/coverage/index.d.ts +17 -0
- package/dist/esm/core/agent/coverage/index.js +17 -0
- package/dist/esm/core/agent/coverage/index.js.map +1 -0
- package/dist/esm/core/agent/coverage/items.d.ts +35 -0
- package/dist/esm/core/agent/coverage/items.js +85 -0
- package/dist/esm/core/agent/coverage/items.js.map +1 -0
- package/dist/esm/core/agent/coverage/ledger.d.ts +80 -0
- package/dist/esm/core/agent/coverage/ledger.js +125 -0
- package/dist/esm/core/agent/coverage/ledger.js.map +1 -0
- package/dist/esm/core/agent/coverage/read.d.ts +51 -0
- package/dist/esm/core/agent/coverage/read.js +52 -0
- package/dist/esm/core/agent/coverage/read.js.map +1 -0
- package/dist/esm/core/agent/coverage/types.d.ts +142 -0
- package/dist/esm/core/agent/coverage/types.js +14 -0
- package/dist/esm/core/agent/coverage/types.js.map +1 -0
- package/dist/esm/core/agent/evidence/evidenceIndex.d.ts +7 -0
- package/dist/esm/core/agent/evidence/evidenceIndex.js +18 -1
- package/dist/esm/core/agent/evidence/evidenceIndex.js.map +1 -1
- package/dist/esm/core/agent/stages/prepareFinal.d.ts +18 -0
- package/dist/esm/core/agent/stages/prepareFinal.js +42 -2
- package/dist/esm/core/agent/stages/prepareFinal.js.map +1 -1
- package/dist/esm/core/agent/stages/toolCalls.js +109 -3
- package/dist/esm/core/agent/stages/toolCalls.js.map +1 -1
- package/dist/esm/core/agent/toolEffects.d.ts +2 -2
- package/dist/esm/core/agent/toolEffects.js +1 -1
- package/dist/esm/core/agent/types.d.ts +14 -0
- package/dist/esm/core/outputFallback.d.ts +15 -1
- package/dist/esm/core/outputFallback.js.map +1 -1
- package/dist/esm/debug.d.ts +1 -0
- package/dist/esm/debug.js +7 -0
- package/dist/esm/debug.js.map +1 -1
- package/dist/esm/events/dispatcher.d.ts +1 -1
- package/dist/esm/events/dispatcher.js.map +1 -1
- package/dist/esm/events/payloads.d.ts +82 -0
- package/dist/esm/events/registry.d.ts +11 -1
- package/dist/esm/events/registry.js +10 -0
- package/dist/esm/events/registry.js.map +1 -1
- package/dist/esm/hosting/conformance/cases.d.ts +2 -1
- package/dist/esm/hosting/conformance/cases.js +229 -22
- package/dist/esm/hosting/conformance/cases.js.map +1 -1
- package/dist/esm/hosting/conformance/types.d.ts +7 -7
- package/dist/esm/hosting/errors.d.ts +28 -0
- package/dist/esm/hosting/errors.js +40 -0
- package/dist/esm/hosting/errors.js.map +1 -1
- package/dist/esm/hosting/index.d.ts +11 -3
- package/dist/esm/hosting/index.js +15 -2
- package/dist/esm/hosting/index.js.map +1 -1
- package/dist/esm/hosting/memorySessions.js +39 -0
- package/dist/esm/hosting/memorySessions.js.map +1 -1
- package/dist/esm/hosting/sessionRetention.d.ts +56 -0
- package/dist/esm/hosting/sessionRetention.js +69 -0
- package/dist/esm/hosting/sessionRetention.js.map +1 -0
- package/dist/esm/hosting/sqliteSessions.d.ts +11 -1
- package/dist/esm/hosting/sqliteSessions.js +51 -0
- package/dist/esm/hosting/sqliteSessions.js.map +1 -1
- package/dist/esm/hosting/types.d.ts +184 -0
- package/dist/esm/hosting/types.js +9 -0
- package/dist/esm/hosting/types.js.map +1 -1
- package/dist/esm/hosting-providers.d.ts +15 -11
- package/dist/esm/hosting-providers.js +21 -11
- package/dist/esm/hosting-providers.js.map +1 -1
- package/dist/esm/index.d.ts +1 -0
- package/dist/esm/index.js +18 -0
- package/dist/esm/index.js.map +1 -1
- package/dist/esm/lib/context-bisect/arms/apply.d.ts +54 -0
- package/dist/esm/lib/context-bisect/arms/apply.js +41 -0
- package/dist/esm/lib/context-bisect/arms/apply.js.map +1 -0
- package/dist/esm/lib/context-bisect/arms/compare.d.ts +27 -0
- package/dist/esm/lib/context-bisect/arms/compare.js +112 -0
- package/dist/esm/lib/context-bisect/arms/compare.js.map +1 -0
- package/dist/esm/lib/context-bisect/arms/index.d.ts +16 -0
- package/dist/esm/lib/context-bisect/arms/index.js +16 -0
- package/dist/esm/lib/context-bisect/arms/index.js.map +1 -0
- package/dist/esm/lib/context-bisect/arms/manifest.d.ts +79 -0
- package/dist/esm/lib/context-bisect/arms/manifest.js +199 -0
- package/dist/esm/lib/context-bisect/arms/manifest.js.map +1 -0
- package/dist/esm/lib/context-bisect/arms/probe.d.ts +54 -0
- package/dist/esm/lib/context-bisect/arms/probe.js +125 -0
- package/dist/esm/lib/context-bisect/arms/probe.js.map +1 -0
- package/dist/esm/lib/context-bisect/arms/types.d.ts +319 -0
- package/dist/esm/lib/context-bisect/arms/types.js +67 -0
- package/dist/esm/lib/context-bisect/arms/types.js.map +1 -0
- package/dist/esm/lib/context-bisect/arms/validate.d.ts +26 -0
- package/dist/esm/lib/context-bisect/arms/validate.js +122 -0
- package/dist/esm/lib/context-bisect/arms/validate.js.map +1 -0
- package/dist/esm/lib/context-bisect/arms/verdict.d.ts +53 -0
- package/dist/esm/lib/context-bisect/arms/verdict.js +103 -0
- package/dist/esm/lib/context-bisect/arms/verdict.js.map +1 -0
- package/dist/esm/lib/context-bisect/index.d.ts +1 -0
- package/dist/esm/lib/context-bisect/index.js +5 -0
- package/dist/esm/lib/context-bisect/index.js.map +1 -1
- package/dist/esm/lib/injection-engine/index.d.ts +1 -1
- package/dist/esm/lib/injection-engine/index.js +3 -1
- package/dist/esm/lib/injection-engine/index.js.map +1 -1
- package/dist/esm/lib/injection-engine/skillExamples.d.ts +16 -13
- package/dist/esm/lib/injection-engine/skillExamples.js +16 -60
- package/dist/esm/lib/injection-engine/skillExamples.js.map +1 -1
- package/dist/esm/lib/injection-engine/skillGraph.d.ts +50 -0
- package/dist/esm/lib/injection-engine/skillGraph.js +52 -1
- package/dist/esm/lib/injection-engine/skillGraph.js.map +1 -1
- package/dist/esm/lib/injection-engine/skillGraphCheckup.d.ts +6 -5
- package/dist/esm/lib/injection-engine/skillGraphCheckup.js.map +1 -1
- package/dist/esm/lib/injection-engine/skillNeverRoutes.d.ts +131 -0
- package/dist/esm/lib/injection-engine/skillNeverRoutes.js +228 -0
- package/dist/esm/lib/injection-engine/skillNeverRoutes.js.map +1 -0
- package/dist/esm/lib/injection-engine/skillPartition.d.ts +69 -0
- package/dist/esm/lib/injection-engine/skillPartition.js +273 -0
- package/dist/esm/lib/injection-engine/skillPartition.js.map +1 -0
- package/dist/esm/lib/injection-engine/skillsFromDir.d.ts +83 -3
- package/dist/esm/lib/injection-engine/skillsFromDir.js +118 -7
- package/dist/esm/lib/injection-engine/skillsFromDir.js.map +1 -1
- package/dist/esm/lib/injection-engine/skillsFromDirRoutes.d.ts +105 -0
- package/dist/esm/lib/injection-engine/skillsFromDirRoutes.js +169 -0
- package/dist/esm/lib/injection-engine/skillsFromDirRoutes.js.map +1 -0
- package/dist/esm/lib/injection-engine/startRuleClaim.d.ts +91 -0
- package/dist/esm/lib/injection-engine/startRuleClaim.js +78 -0
- package/dist/esm/lib/injection-engine/startRuleClaim.js.map +1 -0
- package/dist/esm/lib/injection-engine/toolOutcome.d.ts +12 -3
- package/dist/esm/lib/injection-engine/toolOutcome.js +2 -1
- package/dist/esm/lib/injection-engine/toolOutcome.js.map +1 -1
- package/dist/events/dispatcher.js.map +1 -1
- package/dist/events/registry.js +10 -0
- package/dist/events/registry.js.map +1 -1
- package/dist/hosting/conformance/cases.js +229 -22
- package/dist/hosting/conformance/cases.js.map +1 -1
- package/dist/hosting/errors.js +42 -1
- package/dist/hosting/errors.js.map +1 -1
- package/dist/hosting/index.js +18 -2
- package/dist/hosting/index.js.map +1 -1
- package/dist/hosting/memorySessions.js +39 -0
- package/dist/hosting/memorySessions.js.map +1 -1
- package/dist/hosting/sessionRetention.js +73 -0
- package/dist/hosting/sessionRetention.js.map +1 -0
- package/dist/hosting/sqliteSessions.js +51 -0
- package/dist/hosting/sqliteSessions.js.map +1 -1
- package/dist/hosting/types.js +10 -1
- package/dist/hosting/types.js.map +1 -1
- package/dist/hosting-providers.js +21 -11
- package/dist/hosting-providers.js.map +1 -1
- package/dist/index.js +72 -43
- package/dist/index.js.map +1 -1
- package/dist/lib/context-bisect/arms/apply.js +45 -0
- package/dist/lib/context-bisect/arms/apply.js.map +1 -0
- package/dist/lib/context-bisect/arms/compare.js +116 -0
- package/dist/lib/context-bisect/arms/compare.js.map +1 -0
- package/dist/lib/context-bisect/arms/index.js +35 -0
- package/dist/lib/context-bisect/arms/index.js.map +1 -0
- package/dist/lib/context-bisect/arms/manifest.js +207 -0
- package/dist/lib/context-bisect/arms/manifest.js.map +1 -0
- package/dist/lib/context-bisect/arms/probe.js +132 -0
- package/dist/lib/context-bisect/arms/probe.js.map +1 -0
- package/dist/lib/context-bisect/arms/types.js +68 -0
- package/dist/lib/context-bisect/arms/types.js.map +1 -0
- package/dist/lib/context-bisect/arms/validate.js +128 -0
- package/dist/lib/context-bisect/arms/validate.js.map +1 -0
- package/dist/lib/context-bisect/arms/verdict.js +107 -0
- package/dist/lib/context-bisect/arms/verdict.js.map +1 -0
- package/dist/lib/context-bisect/index.js +23 -1
- package/dist/lib/context-bisect/index.js.map +1 -1
- package/dist/lib/injection-engine/index.js +4 -1
- package/dist/lib/injection-engine/index.js.map +1 -1
- package/dist/lib/injection-engine/skillExamples.js +24 -68
- package/dist/lib/injection-engine/skillExamples.js.map +1 -1
- package/dist/lib/injection-engine/skillGraph.js +52 -1
- package/dist/lib/injection-engine/skillGraph.js.map +1 -1
- package/dist/lib/injection-engine/skillGraphCheckup.js.map +1 -1
- package/dist/lib/injection-engine/skillNeverRoutes.js +234 -0
- package/dist/lib/injection-engine/skillNeverRoutes.js.map +1 -0
- package/dist/lib/injection-engine/skillPartition.js +277 -0
- package/dist/lib/injection-engine/skillPartition.js.map +1 -0
- package/dist/lib/injection-engine/skillsFromDir.js +121 -9
- package/dist/lib/injection-engine/skillsFromDir.js.map +1 -1
- package/dist/lib/injection-engine/skillsFromDirRoutes.js +174 -0
- package/dist/lib/injection-engine/skillsFromDirRoutes.js.map +1 -0
- package/dist/lib/injection-engine/startRuleClaim.js +85 -0
- package/dist/lib/injection-engine/startRuleClaim.js.map +1 -0
- package/dist/lib/injection-engine/toolOutcome.js +2 -1
- package/dist/lib/injection-engine/toolOutcome.js.map +1 -1
- package/dist/types/adapters/hosting/agentcore.d.ts +8 -0
- package/dist/types/adapters/hosting/agentcore.d.ts.map +1 -1
- package/dist/types/adapters/hosting/firestoreSessions.d.ts +162 -14
- package/dist/types/adapters/hosting/firestoreSessions.d.ts.map +1 -1
- package/dist/types/adapters/hosting/googleAgentEngine.d.ts +16 -1
- package/dist/types/adapters/hosting/googleAgentEngine.d.ts.map +1 -1
- package/dist/types/artifacts/conformance/cases.d.ts.map +1 -1
- package/dist/types/artifacts/scopePath.d.ts +31 -0
- package/dist/types/artifacts/scopePath.d.ts.map +1 -1
- package/dist/types/core/Agent.d.ts +8 -1
- package/dist/types/core/Agent.d.ts.map +1 -1
- package/dist/types/core/agent/AgentBuilder.d.ts +43 -0
- package/dist/types/core/agent/AgentBuilder.d.ts.map +1 -1
- package/dist/types/core/agent/buildAgentChart.d.ts +9 -0
- 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/coverage/absent.d.ts +105 -0
- package/dist/types/core/agent/coverage/absent.d.ts.map +1 -0
- package/dist/types/core/agent/coverage/answer.d.ts +47 -0
- package/dist/types/core/agent/coverage/answer.d.ts.map +1 -0
- package/dist/types/core/agent/coverage/evidence.d.ts +69 -0
- package/dist/types/core/agent/coverage/evidence.d.ts.map +1 -0
- package/dist/types/core/agent/coverage/index.d.ts +18 -0
- package/dist/types/core/agent/coverage/index.d.ts.map +1 -0
- package/dist/types/core/agent/coverage/items.d.ts +36 -0
- package/dist/types/core/agent/coverage/items.d.ts.map +1 -0
- package/dist/types/core/agent/coverage/ledger.d.ts +81 -0
- package/dist/types/core/agent/coverage/ledger.d.ts.map +1 -0
- package/dist/types/core/agent/coverage/read.d.ts +52 -0
- package/dist/types/core/agent/coverage/read.d.ts.map +1 -0
- package/dist/types/core/agent/coverage/types.d.ts +143 -0
- package/dist/types/core/agent/coverage/types.d.ts.map +1 -0
- package/dist/types/core/agent/evidence/evidenceIndex.d.ts +7 -0
- package/dist/types/core/agent/evidence/evidenceIndex.d.ts.map +1 -1
- package/dist/types/core/agent/stages/prepareFinal.d.ts +18 -0
- package/dist/types/core/agent/stages/prepareFinal.d.ts.map +1 -1
- package/dist/types/core/agent/stages/toolCalls.d.ts.map +1 -1
- package/dist/types/core/agent/toolEffects.d.ts +2 -2
- package/dist/types/core/agent/types.d.ts +14 -0
- package/dist/types/core/agent/types.d.ts.map +1 -1
- package/dist/types/core/outputFallback.d.ts +15 -1
- package/dist/types/core/outputFallback.d.ts.map +1 -1
- package/dist/types/debug.d.ts +1 -0
- package/dist/types/debug.d.ts.map +1 -1
- package/dist/types/events/dispatcher.d.ts +1 -1
- package/dist/types/events/dispatcher.d.ts.map +1 -1
- package/dist/types/events/payloads.d.ts +82 -0
- package/dist/types/events/payloads.d.ts.map +1 -1
- package/dist/types/events/registry.d.ts +11 -1
- package/dist/types/events/registry.d.ts.map +1 -1
- package/dist/types/hosting/conformance/cases.d.ts +2 -1
- package/dist/types/hosting/conformance/cases.d.ts.map +1 -1
- package/dist/types/hosting/conformance/types.d.ts +7 -7
- package/dist/types/hosting/conformance/types.d.ts.map +1 -1
- package/dist/types/hosting/errors.d.ts +28 -0
- package/dist/types/hosting/errors.d.ts.map +1 -1
- package/dist/types/hosting/index.d.ts +11 -3
- package/dist/types/hosting/index.d.ts.map +1 -1
- package/dist/types/hosting/memorySessions.d.ts.map +1 -1
- package/dist/types/hosting/sessionRetention.d.ts +57 -0
- package/dist/types/hosting/sessionRetention.d.ts.map +1 -0
- package/dist/types/hosting/sqliteSessions.d.ts +11 -1
- package/dist/types/hosting/sqliteSessions.d.ts.map +1 -1
- package/dist/types/hosting/types.d.ts +184 -0
- package/dist/types/hosting/types.d.ts.map +1 -1
- package/dist/types/hosting-providers.d.ts +15 -11
- package/dist/types/hosting-providers.d.ts.map +1 -1
- package/dist/types/index.d.ts +1 -0
- package/dist/types/index.d.ts.map +1 -1
- package/dist/types/lib/context-bisect/arms/apply.d.ts +55 -0
- package/dist/types/lib/context-bisect/arms/apply.d.ts.map +1 -0
- package/dist/types/lib/context-bisect/arms/compare.d.ts +28 -0
- package/dist/types/lib/context-bisect/arms/compare.d.ts.map +1 -0
- package/dist/types/lib/context-bisect/arms/index.d.ts +17 -0
- package/dist/types/lib/context-bisect/arms/index.d.ts.map +1 -0
- package/dist/types/lib/context-bisect/arms/manifest.d.ts +80 -0
- package/dist/types/lib/context-bisect/arms/manifest.d.ts.map +1 -0
- package/dist/types/lib/context-bisect/arms/probe.d.ts +55 -0
- package/dist/types/lib/context-bisect/arms/probe.d.ts.map +1 -0
- package/dist/types/lib/context-bisect/arms/types.d.ts +320 -0
- package/dist/types/lib/context-bisect/arms/types.d.ts.map +1 -0
- package/dist/types/lib/context-bisect/arms/validate.d.ts +27 -0
- package/dist/types/lib/context-bisect/arms/validate.d.ts.map +1 -0
- package/dist/types/lib/context-bisect/arms/verdict.d.ts +54 -0
- package/dist/types/lib/context-bisect/arms/verdict.d.ts.map +1 -0
- package/dist/types/lib/context-bisect/index.d.ts +1 -0
- package/dist/types/lib/context-bisect/index.d.ts.map +1 -1
- package/dist/types/lib/injection-engine/index.d.ts +1 -1
- package/dist/types/lib/injection-engine/index.d.ts.map +1 -1
- package/dist/types/lib/injection-engine/skillExamples.d.ts +16 -13
- package/dist/types/lib/injection-engine/skillExamples.d.ts.map +1 -1
- package/dist/types/lib/injection-engine/skillGraph.d.ts +50 -0
- package/dist/types/lib/injection-engine/skillGraph.d.ts.map +1 -1
- package/dist/types/lib/injection-engine/skillGraphCheckup.d.ts +6 -5
- package/dist/types/lib/injection-engine/skillGraphCheckup.d.ts.map +1 -1
- package/dist/types/lib/injection-engine/skillNeverRoutes.d.ts +132 -0
- package/dist/types/lib/injection-engine/skillNeverRoutes.d.ts.map +1 -0
- package/dist/types/lib/injection-engine/skillPartition.d.ts +70 -0
- package/dist/types/lib/injection-engine/skillPartition.d.ts.map +1 -0
- package/dist/types/lib/injection-engine/skillsFromDir.d.ts +83 -3
- package/dist/types/lib/injection-engine/skillsFromDir.d.ts.map +1 -1
- package/dist/types/lib/injection-engine/skillsFromDirRoutes.d.ts +106 -0
- package/dist/types/lib/injection-engine/skillsFromDirRoutes.d.ts.map +1 -0
- package/dist/types/lib/injection-engine/startRuleClaim.d.ts +92 -0
- package/dist/types/lib/injection-engine/startRuleClaim.d.ts.map +1 -0
- package/dist/types/lib/injection-engine/toolOutcome.d.ts +12 -3
- package/dist/types/lib/injection-engine/toolOutcome.d.ts.map +1 -1
- package/package.json +1 -1
|
@@ -0,0 +1,128 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/**
|
|
3
|
+
* Arm validation — the teaching refusals.
|
|
4
|
+
*
|
|
5
|
+
* Every refusal here fires BEFORE a single model call. That is the whole design
|
|
6
|
+
* rule: an incoherent comparison must cost nothing. The engine's other refusals
|
|
7
|
+
* (an unstable baseline, an arm that did not take effect) can only be known
|
|
8
|
+
* after the runs, and those refuse a VERDICT rather than throw — refusing after
|
|
9
|
+
* spending N model calls would be hostile. These six can be known from the
|
|
10
|
+
* declaration alone, so they throw.
|
|
11
|
+
*/
|
|
12
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
13
|
+
exports.validateStrategyArms = exports.declaredFacetCount = exports.armConfigKey = void 0;
|
|
14
|
+
/** Message prefix — every refusal names the door the caller used. */
|
|
15
|
+
const PREFIX = 'compareStrategyArms:';
|
|
16
|
+
/**
|
|
17
|
+
* A canonical key for one arm's CONFIGURATION (facets + removals), used only to
|
|
18
|
+
* detect two arms that are secretly the same arm. Hand-rolled rather than
|
|
19
|
+
* `JSON.stringify` because key order in an object literal is authoring
|
|
20
|
+
* accident, and two arms written `{model, scorer}` and `{scorer, model}` are
|
|
21
|
+
* the same arm.
|
|
22
|
+
*/
|
|
23
|
+
function armConfigKey(arm) {
|
|
24
|
+
const facets = canonical(arm.facets ?? {});
|
|
25
|
+
const ablations = [...(arm.ablations ?? [])].map(canonical).sort().join('|');
|
|
26
|
+
return `${facets}::${ablations}`;
|
|
27
|
+
}
|
|
28
|
+
exports.armConfigKey = armConfigKey;
|
|
29
|
+
/** Stable, sorted, depth-first rendering of a plain value. */
|
|
30
|
+
function canonical(value) {
|
|
31
|
+
if (value === undefined)
|
|
32
|
+
return 'undefined';
|
|
33
|
+
if (value === null || typeof value !== 'object')
|
|
34
|
+
return JSON.stringify(value);
|
|
35
|
+
if (Array.isArray(value)) {
|
|
36
|
+
// Spec arrays (`ignoredTools`, `excludeInjectionIds`) are SETS in meaning —
|
|
37
|
+
// two arms differing only in the order they list two tool names are one arm.
|
|
38
|
+
return `[${value.map(canonical).sort().join(',')}]`;
|
|
39
|
+
}
|
|
40
|
+
const entries = Object.entries(value)
|
|
41
|
+
.filter(([, v]) => v !== undefined)
|
|
42
|
+
.sort(([a], [b]) => (a < b ? -1 : a > b ? 1 : 0))
|
|
43
|
+
.map(([k, v]) => `${k}:${canonical(v)}`);
|
|
44
|
+
return `{${entries.join(',')}}`;
|
|
45
|
+
}
|
|
46
|
+
/** How many facet leaves an arm declares — 0 means it names no configuration. */
|
|
47
|
+
function declaredFacetCount(facets) {
|
|
48
|
+
if (facets === undefined)
|
|
49
|
+
return 0;
|
|
50
|
+
let count = 0;
|
|
51
|
+
for (const [key, value] of Object.entries(facets)) {
|
|
52
|
+
if (value === undefined)
|
|
53
|
+
continue;
|
|
54
|
+
if (key === 'memory' && typeof value === 'object') {
|
|
55
|
+
count += Object.values(value).filter((v) => v !== undefined).length;
|
|
56
|
+
continue;
|
|
57
|
+
}
|
|
58
|
+
count += 1;
|
|
59
|
+
}
|
|
60
|
+
return count;
|
|
61
|
+
}
|
|
62
|
+
exports.declaredFacetCount = declaredFacetCount;
|
|
63
|
+
/**
|
|
64
|
+
* Refuse every comparison that cannot mean anything, and resolve which arm is
|
|
65
|
+
* the incumbent. Returns the resolved baseline arm id.
|
|
66
|
+
*/
|
|
67
|
+
function validateStrategyArms(arms, baselineArmId) {
|
|
68
|
+
// 1. A comparison needs two sides. One arm re-run N times is a VARIANCE
|
|
69
|
+
// measurement, and the library already has a door for it.
|
|
70
|
+
if (arms.length < 2) {
|
|
71
|
+
throw new Error(`${PREFIX} a comparison needs at least two arms — got ${arms.length}. To measure one ` +
|
|
72
|
+
`configuration's own run-to-run variance, probe it with runAblationProbe(config, []) ` +
|
|
73
|
+
`instead; to remove a source from one configuration, use rerunWithoutSources.`);
|
|
74
|
+
}
|
|
75
|
+
// 2 + 3. Ids are the readout's primary key and every verdict sentence's
|
|
76
|
+
// subject. A blank or repeated one makes the result unreadable.
|
|
77
|
+
const seen = new Set();
|
|
78
|
+
for (const arm of arms) {
|
|
79
|
+
if (typeof arm.id !== 'string' || arm.id.trim() === '') {
|
|
80
|
+
throw new Error(`${PREFIX} every arm needs a non-empty id — it names the arm in each verdict and keys ` +
|
|
81
|
+
`the readout. Give each configuration a short label ('topK', 'rerank').`);
|
|
82
|
+
}
|
|
83
|
+
if (seen.has(arm.id)) {
|
|
84
|
+
throw new Error(`${PREFIX} two arms share the id '${arm.id}' — arms are reported one row per id, so the ` +
|
|
85
|
+
`second would overwrite the first. Give them distinct labels.`);
|
|
86
|
+
}
|
|
87
|
+
seen.add(arm.id);
|
|
88
|
+
}
|
|
89
|
+
// 4. The incumbent must exist: it is the reference AND the null band.
|
|
90
|
+
const resolved = baselineArmId ?? arms[0].id;
|
|
91
|
+
if (!seen.has(resolved)) {
|
|
92
|
+
throw new Error(`${PREFIX} baselineArmId '${resolved}' matches no arm — declared arms: ` +
|
|
93
|
+
`[${arms.map((a) => a.id).join(', ')}]. The baseline arm is the incumbent: the one the ` +
|
|
94
|
+
`others are compared against, and the one whose own reruns form the null band.`);
|
|
95
|
+
}
|
|
96
|
+
// 5. A challenger that names no configuration cannot be checked against the
|
|
97
|
+
// run manifest and cannot be told apart from the incumbent. The BASELINE
|
|
98
|
+
// arm may name nothing — "the configuration as it stands" is a real arm,
|
|
99
|
+
// and it is the factual one.
|
|
100
|
+
for (const arm of arms) {
|
|
101
|
+
if (arm.id === resolved)
|
|
102
|
+
continue;
|
|
103
|
+
if (declaredFacetCount(arm.facets) === 0 && (arm.ablations ?? []).length === 0) {
|
|
104
|
+
throw new Error(`${PREFIX} arm '${arm.id}' declares no configuration — no facets and no ablations. An ` +
|
|
105
|
+
`arm that names nothing cannot be checked against the run manifest and cannot be told ` +
|
|
106
|
+
`apart from the baseline arm '${resolved}'. Declare at least one facet (e.g. ` +
|
|
107
|
+
`{ memory: { retrieval: 'rerank' } }) or an ablation.`);
|
|
108
|
+
}
|
|
109
|
+
}
|
|
110
|
+
// 6. THE incoherent-spec refusal: two arms that are the same configuration.
|
|
111
|
+
// Comparing an arm with itself measures seed variance and would report it
|
|
112
|
+
// as a difference between strategies.
|
|
113
|
+
const byConfig = new Map();
|
|
114
|
+
for (const arm of arms) {
|
|
115
|
+
const key = armConfigKey(arm);
|
|
116
|
+
const twin = byConfig.get(key);
|
|
117
|
+
if (twin !== undefined) {
|
|
118
|
+
throw new Error(`${PREFIX} arms '${twin}' and '${arm.id}' declare the SAME configuration — comparing an ` +
|
|
119
|
+
`arm with itself measures seed-to-seed variance, not a difference between strategies. ` +
|
|
120
|
+
`Change one arm's facets, or raise \`samples\` on a single arm if variance is what you ` +
|
|
121
|
+
`want to see.`);
|
|
122
|
+
}
|
|
123
|
+
byConfig.set(key, arm.id);
|
|
124
|
+
}
|
|
125
|
+
return resolved;
|
|
126
|
+
}
|
|
127
|
+
exports.validateStrategyArms = validateStrategyArms;
|
|
128
|
+
//# sourceMappingURL=validate.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"validate.js","sourceRoot":"","sources":["../../../../src/lib/context-bisect/arms/validate.ts"],"names":[],"mappings":";AAAA;;;;;;;;;GASG;;;AAIH,qEAAqE;AACrE,MAAM,MAAM,GAAG,sBAAsB,CAAC;AAEtC;;;;;;GAMG;AACH,SAAgB,YAAY,CAAC,GAAgB;IAC3C,MAAM,MAAM,GAAG,SAAS,CAAC,GAAG,CAAC,MAAM,IAAI,EAAE,CAAC,CAAC;IAC3C,MAAM,SAAS,GAAG,CAAC,GAAG,CAAC,GAAG,CAAC,SAAS,IAAI,EAAE,CAAC,CAAC,CAAC,GAAG,CAAC,SAAS,CAAC,CAAC,IAAI,EAAE,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC;IAC7E,OAAO,GAAG,MAAM,KAAK,SAAS,EAAE,CAAC;AACnC,CAAC;AAJD,oCAIC;AAED,8DAA8D;AAC9D,SAAS,SAAS,CAAC,KAAc;IAC/B,IAAI,KAAK,KAAK,SAAS;QAAE,OAAO,WAAW,CAAC;IAC5C,IAAI,KAAK,KAAK,IAAI,IAAI,OAAO,KAAK,KAAK,QAAQ;QAAE,OAAO,IAAI,CAAC,SAAS,CAAC,KAAK,CAAC,CAAC;IAC9E,IAAI,KAAK,CAAC,OAAO,CAAC,KAAK,CAAC,EAAE,CAAC;QACzB,4EAA4E;QAC5E,6EAA6E;QAC7E,OAAO,IAAI,KAAK,CAAC,GAAG,CAAC,SAAS,CAAC,CAAC,IAAI,EAAE,CAAC,IAAI,CAAC,GAAG,CAAC,GAAG,CAAC;IACtD,CAAC;IACD,MAAM,OAAO,GAAG,MAAM,CAAC,OAAO,CAAC,KAAgC,CAAC;SAC7D,MAAM,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,KAAK,SAAS,C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,QAAQ;YAAE,SAAS;QAClC,IAAI,kBAAkB,CAAC,GAAG,CAAC,MAAM,CAAC,KAAK,CAAC,IAAI,CAAC,GAAG,CAAC,SAAS,IAAI,EAAE,CAAC,CAAC,MAAM,KAAK,CAAC,EAAE,CAAC;YAC/E,MAAM,IAAI,KAAK,CACb,GAAG,MAAM,SAAS,GAAG,CAAC,EAAE,+DAA+D;gBACrF,uFAAuF;gBACvF,gCAAgC,QAAQ,sCAAsC;gBAC9E,sDAAsD,CACzD,CAAC;QACJ,CAAC;IACH,CAAC;IAED,4EAA4E;IAC5E,6EAA6E;IAC7E,yCAAyC;IACzC,MAAM,QAAQ,GAAG,IAAI,GAAG,EAAkB,CAAC;IAC3C,KAAK,MAAM,GAAG,IAAI,IAAI,EAAE,CAAC;QACvB,MAAM,GAAG,GAAG,YAAY,CAAC,GAAG,CAAC,CAAC;QAC9B,MAAM,IAAI,GAAG,QAAQ,CAAC,GAAG,CAAC,GAAG,CAAC,CAAC;QAC/B,IAAI,IAAI,KAAK,SAAS,EAAE,CAAC;YACvB,MAAM,IAAI,KAAK,CACb,GAAG,MAAM,UAAU,IAAI,UAAU,GAAG,CAAC,EAAE,kDAAkD;gBACvF,uFAAuF;gBACvF,wFAAwF;gBACxF,cAAc,CACjB,CAAC;QACJ,CAAC;QACD,QAAQ,CAAC,GAAG,CAAC,GAAG,EAAE,GAAG,CAAC,EAAE,CAAC,CAAC;IAC5B,CAAC;IAED,OAAO,QAAQ,CAAC;AAClB,CAAC;AA9ED,oDA8EC"}
|
|
@@ -0,0 +1,107 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/**
|
|
3
|
+
* The arm verdict — the same three tiers, phrased for a substitution.
|
|
4
|
+
*
|
|
5
|
+
* ## Why not widen `verdictFor`
|
|
6
|
+
*
|
|
7
|
+
* `verdictFor` already carries an `action` word (`'ablating'` | `'restoring'`)
|
|
8
|
+
* and a third would have been one line. It ends its NOT-CONFIRMED sentence with
|
|
9
|
+
* "its ranking remains a correlational proxy only" — true of a suspect, which
|
|
10
|
+
* was RANKED before it was probed, and meaningless for an arm, which was never
|
|
11
|
+
* ranked at all. Widening the union would have forced that sentence onto the
|
|
12
|
+
* new tier or edited a string three existing tests pin byte-for-byte. So the
|
|
13
|
+
* tier LOGIC is shared (`probeFlipped`, the majority rule, the zero-tolerance
|
|
14
|
+
* baseline gate) and only the prose is new.
|
|
15
|
+
*
|
|
16
|
+
* ## The tiers, in refusal order
|
|
17
|
+
*
|
|
18
|
+
* 1. **Unstable baseline** → inconclusive. The incumbent could not reproduce
|
|
19
|
+
* the reference answer across its own seeds, so a difference measured
|
|
20
|
+
* against it is measuring the scenario, not the arm. Zero tolerance, exactly
|
|
21
|
+
* as `bisect.ts` and `localize.ts` apply it: ONE un-intervened flip is
|
|
22
|
+
* enough, because the majority rule would let a 1-in-3 flaky scenario reach
|
|
23
|
+
* a causal verdict.
|
|
24
|
+
* 2. **Arm did not take effect** → inconclusive. The run manifest contradicted
|
|
25
|
+
* what the arm declared. Any difference here is evidence about a
|
|
26
|
+
* configuration nobody meant to test.
|
|
27
|
+
* 3. **Inside the null band** → inconclusive. A majority flip whose mean
|
|
28
|
+
* similarity still sits within the baseline arm's own seed-to-seed spread is
|
|
29
|
+
* not separable from noise. Only applied when the flip comparator and the
|
|
30
|
+
* band are the same instrument (see `NullBand.gates`).
|
|
31
|
+
* 4. **Majority flip, outside the band, stable baseline** → confirmed. This is
|
|
32
|
+
* a causal claim of the same tier an ablation verdict makes: a
|
|
33
|
+
* counterfactual intervention, seeded reruns, variance reported, and a
|
|
34
|
+
* baseline that held.
|
|
35
|
+
* 5. **Minority flips** → inconclusive. 6. **No flips** → not-confirmed.
|
|
36
|
+
*
|
|
37
|
+
* Every claim is bounded by the scenario and the comparator, and says so — an
|
|
38
|
+
* arm confirmed on one question has been confirmed on one question.
|
|
39
|
+
*/
|
|
40
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
41
|
+
exports.verdictForArm = void 0;
|
|
42
|
+
const ablation_js_1 = require("../ablation.js");
|
|
43
|
+
/** Translate one arm's probe evidence into its verdict. See module docs. */
|
|
44
|
+
function verdictForArm(armId, stats, context) {
|
|
45
|
+
const { baselineArmId, band } = context;
|
|
46
|
+
// 1. An unstable incumbent invalidates every comparison against it.
|
|
47
|
+
if (!context.baselineStable) {
|
|
48
|
+
return {
|
|
49
|
+
verdict: 'inconclusive',
|
|
50
|
+
claim: `INCONCLUSIVE: the baseline arm '${baselineArmId}' did not reproduce the reference answer ` +
|
|
51
|
+
`across its own seeded reruns (${context.baselineStats.flips}/${context.baselineStats.samples} ` +
|
|
52
|
+
`changed) — no arm-comparison verdict for '${armId}' is trustworthy on an unstable scenario.`,
|
|
53
|
+
};
|
|
54
|
+
}
|
|
55
|
+
// 2. The run manifest says this arm is not the arm that ran.
|
|
56
|
+
if (context.application.checked && !context.application.applied) {
|
|
57
|
+
const first = context.application.mismatches[0];
|
|
58
|
+
const observed = first?.observed ?? 'nothing (the manifest does not name it)';
|
|
59
|
+
return {
|
|
60
|
+
verdict: 'inconclusive',
|
|
61
|
+
claim: `INCONCLUSIVE: arm '${armId}' declared ${first?.facet ?? 'a facet'}=${first?.declared ?? '?'} but the run manifest reported ${observed} — the arm did not take effect, so any ` +
|
|
62
|
+
`difference measured here is not evidence about it.`,
|
|
63
|
+
};
|
|
64
|
+
}
|
|
65
|
+
const flipped = (0, ablation_js_1.probeFlipped)(stats);
|
|
66
|
+
const mean = stats.similarity.mean.toFixed(3);
|
|
67
|
+
// 3. Flipped, but not further than the incumbent drifts from itself.
|
|
68
|
+
if (flipped && band.gates && !context.outsideNullBand) {
|
|
69
|
+
return {
|
|
70
|
+
verdict: 'inconclusive',
|
|
71
|
+
claim: `INCONCLUSIVE: switching to arm '${armId}' changed the answer in ${stats.flips}/${stats.samples} ` +
|
|
72
|
+
`seeded reruns, but its mean similarity to the reference (${mean}) sits INSIDE the baseline ` +
|
|
73
|
+
`arm's own seed-to-seed band (floor ${band.floor.toFixed(3)}) — not separable from run-to-run ` +
|
|
74
|
+
`noise. Raise samples, or compare on a domain comparator.`,
|
|
75
|
+
};
|
|
76
|
+
}
|
|
77
|
+
// 4. The causal tier.
|
|
78
|
+
if (flipped) {
|
|
79
|
+
const bandClause = band.gates
|
|
80
|
+
? `, outside the baseline arm's own band (floor ${band.floor.toFixed(3)})`
|
|
81
|
+
: '';
|
|
82
|
+
return {
|
|
83
|
+
verdict: 'confirmed',
|
|
84
|
+
claim: `CAUSAL: switching from baseline arm '${baselineArmId}' to '${armId}' changed the answer in ` +
|
|
85
|
+
`${stats.flips}/${stats.samples} seeded reruns (mean similarity to the reference ${mean} ± ` +
|
|
86
|
+
`${stats.similarity.stdev.toFixed(3)})${bandClause}, on a baseline that reproduced. Bounded ` +
|
|
87
|
+
`by this scenario and this comparator.`,
|
|
88
|
+
};
|
|
89
|
+
}
|
|
90
|
+
// 5. Minority — real movement, not a majority.
|
|
91
|
+
if (stats.flips > 0) {
|
|
92
|
+
return {
|
|
93
|
+
verdict: 'inconclusive',
|
|
94
|
+
claim: `INCONCLUSIVE: switching to arm '${armId}' changed the answer in only ${stats.flips}/${stats.samples} ` +
|
|
95
|
+
`seeded reruns — below majority; raise samples or check scenario stability.`,
|
|
96
|
+
};
|
|
97
|
+
}
|
|
98
|
+
// 6. No movement at all.
|
|
99
|
+
return {
|
|
100
|
+
verdict: 'not-confirmed',
|
|
101
|
+
claim: `NOT CONFIRMED: switching to arm '${armId}' did not change the answer in ${stats.samples} seeded ` +
|
|
102
|
+
`reruns — on this scenario, by this comparator, it is not distinguishable from baseline arm ` +
|
|
103
|
+
`'${baselineArmId}'. That is a finding about this scenario, not about the strategies.`,
|
|
104
|
+
};
|
|
105
|
+
}
|
|
106
|
+
exports.verdictForArm = verdictForArm;
|
|
107
|
+
//# sourceMappingURL=verdict.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"verdict.js","sourceRoot":"","sources":["../../../../src/lib/context-bisect/arms/verdict.ts"],"names":[],"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|
21
21
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
22
|
-
exports.
|
|
22
|
+
exports.bucketByAnchors = exports.assembleTrajectory = exports.variableToBacktrackTrace = exports.traceVariable = exports.joinVariableSlice = exports.buildWriterFrameIndex = exports.walkTrajectory = exports.walkToRoot = exports.DEFAULT_RECENCY_DECAY = exports.shortlistEarlyCulprits = exports.verdictForArm = exports.validateStrategyArms = exports.scoreArmRuns = exports.RUN_CONFIGURED_EVENT = exports.nullBandFrom = exports.matchArm = exports.manifestFromEvents = exports.declaredFacetCount = exports.compareStrategyArms = exports.collectArmRuns = exports.checkArmApplied = exports.checkArmApplication = exports.armLabel = exports.armFacetsFromManifest = exports.armConfigKey = exports.applyArm = exports.rerunWithoutSources = exports.removableSources = exports.MIN_LOOPS_SAVED = exports.classifySuspect = exports.assignCostVerdicts = exports.verdictFor = exports.runAblationProbe = exports.probeFlipped = exports.median = exports.defaultOutcomeComparator = exports.costStatsFrom = exports.applyAblations = exports.ablationForSuspect = exports.sliceToBacktrackTrace = exports.toBacktrackTrace = exports.suspectLabel = exports.localizeContextBug = exports.llmCallIdsFromEvents = exports.formatContextBugReport = exports.defaultSuspectClassifier = exports.runRestorationProbe = exports.findDroppedContext = exports.stepOutputText = exports.llmEdgeWeigher = void 0;
|
|
23
|
+
exports.CONTEXT_BISECT_DEFAULTS = exports.bisectCulprits = exports.findLoopHeads = void 0;
|
|
23
24
|
var llmEdgeWeigher_js_1 = require("./llmEdgeWeigher.js");
|
|
24
25
|
Object.defineProperty(exports, "llmEdgeWeigher", { enumerable: true, get: function () { return llmEdgeWeigher_js_1.llmEdgeWeigher; } });
|
|
25
26
|
Object.defineProperty(exports, "stepOutputText", { enumerable: true, get: function () { return llmEdgeWeigher_js_1.stepOutputText; } });
|
|
@@ -59,6 +60,27 @@ Object.defineProperty(exports, "MIN_LOOPS_SAVED", { enumerable: true, get: funct
|
|
|
59
60
|
var rerun_js_1 = require("./rerun.js");
|
|
60
61
|
Object.defineProperty(exports, "removableSources", { enumerable: true, get: function () { return rerun_js_1.removableSources; } });
|
|
61
62
|
Object.defineProperty(exports, "rerunWithoutSources", { enumerable: true, get: function () { return rerun_js_1.rerunWithoutSources; } });
|
|
63
|
+
// Strategy arms — the SUBSTITUTION tier. Ablation removes; an arm REPLACES, so
|
|
64
|
+
// it is a sibling spec type rather than a fifth `AblationSpec` kind (the union
|
|
65
|
+
// feeds a subset search that substitutions do not compose under). Statistics
|
|
66
|
+
// shared, search machinery not. See src/lib/context-bisect/arms/README.md.
|
|
67
|
+
var index_js_1 = require("./arms/index.js");
|
|
68
|
+
Object.defineProperty(exports, "applyArm", { enumerable: true, get: function () { return index_js_1.applyArm; } });
|
|
69
|
+
Object.defineProperty(exports, "armConfigKey", { enumerable: true, get: function () { return index_js_1.armConfigKey; } });
|
|
70
|
+
Object.defineProperty(exports, "armFacetsFromManifest", { enumerable: true, get: function () { return index_js_1.armFacetsFromManifest; } });
|
|
71
|
+
Object.defineProperty(exports, "armLabel", { enumerable: true, get: function () { return index_js_1.armLabel; } });
|
|
72
|
+
Object.defineProperty(exports, "checkArmApplication", { enumerable: true, get: function () { return index_js_1.checkArmApplication; } });
|
|
73
|
+
Object.defineProperty(exports, "checkArmApplied", { enumerable: true, get: function () { return index_js_1.checkArmApplied; } });
|
|
74
|
+
Object.defineProperty(exports, "collectArmRuns", { enumerable: true, get: function () { return index_js_1.collectArmRuns; } });
|
|
75
|
+
Object.defineProperty(exports, "compareStrategyArms", { enumerable: true, get: function () { return index_js_1.compareStrategyArms; } });
|
|
76
|
+
Object.defineProperty(exports, "declaredFacetCount", { enumerable: true, get: function () { return index_js_1.declaredFacetCount; } });
|
|
77
|
+
Object.defineProperty(exports, "manifestFromEvents", { enumerable: true, get: function () { return index_js_1.manifestFromEvents; } });
|
|
78
|
+
Object.defineProperty(exports, "matchArm", { enumerable: true, get: function () { return index_js_1.matchArm; } });
|
|
79
|
+
Object.defineProperty(exports, "nullBandFrom", { enumerable: true, get: function () { return index_js_1.nullBandFrom; } });
|
|
80
|
+
Object.defineProperty(exports, "RUN_CONFIGURED_EVENT", { enumerable: true, get: function () { return index_js_1.RUN_CONFIGURED_EVENT; } });
|
|
81
|
+
Object.defineProperty(exports, "scoreArmRuns", { enumerable: true, get: function () { return index_js_1.scoreArmRuns; } });
|
|
82
|
+
Object.defineProperty(exports, "validateStrategyArms", { enumerable: true, get: function () { return index_js_1.validateStrategyArms; } });
|
|
83
|
+
Object.defineProperty(exports, "verdictForArm", { enumerable: true, get: function () { return index_js_1.verdictForArm; } });
|
|
62
84
|
// Per-loop recall shortlist (proposal 006, L3): rescue early culprits → narrow before ablation.
|
|
63
85
|
var loop_recall_js_1 = require("./loop-recall.js");
|
|
64
86
|
Object.defineProperty(exports, "shortlistEarlyCulprits", { enumerable: true, get: function () { return loop_recall_js_1.shortlistEarlyCulprits; } });
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/lib/context-bisect/index.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;;;;;GAkBG
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/lib/context-bisect/index.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;;;;;GAkBG;;;;AAEH,yDAM6B;AAL3B,mHAAA,cAAc,OAAA;AACd,mHAAA,cAAc,OAAA;AAMhB,oFAAoF;AACpF,yDAK6B;AAJ3B,uHAAA,kBAAkB,OAAA;AAKpB,mDAK0B;AAJxB,qHAAA,mBAAmB,OAAA;AAMrB,6CAUuB;AATrB,uHAAA,wBAAwB,OAAA;AACxB,qHAAA,sBAAsB,OAAA;AACtB,mHAAA,oBAAoB,OAAA;AACpB,iHAAA,kBAAkB,OAAA;AAClB,2GAAA,YAAY,OAAA;AAOd,6DAQ+B;AAP7B,uHAAA,gBAAgB,OAAA;AAQlB,yEAAyE;AACzE,qEAAqE;AACrE,uEAGoC;AAFlC,iIAAA,qBAAqB,OAAA;AAIvB,6CA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AAQf,6EAGuC;AAFrC,uIAAA,wBAAwB,OAAA;AAI1B,4EAA4E;AAC5E,6CAA6C;AAC7C,iDAUyB;AATvB,mHAAA,kBAAkB,OAAA;AAClB,gHAAA,eAAe,OAAA;AACf,8GAAA,aAAa,OAAA;AASf,yCAKqB;AAJnB,2GAAA,cAAc,OAAA;AAMhB,uCA2BoB;AA1BlB,mHAAA,uBAAuB,OAAA"}
|
|
@@ -7,7 +7,7 @@
|
|
|
7
7
|
* factories. See `README.md` in this folder for the full concept.
|
|
8
8
|
*/
|
|
9
9
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
10
|
-
exports.skillToolNames = exports.checkSkillContracts = exports.checkSkillContract = exports.menuOutstanding = exports.decideTier2 = exports.DEFAULT_ROUTING_POLICY = exports.MENU_SIZE = exports.NEAR_TIE_MARGIN = exports.constrainedEnumPick = exports.llmClassifier = exports.validateIntentScores = exports.rankEntries = exports.embeddingScorer = exports.keywordScorer = exports.SKILL_GRAPH_DEFERRED_CONTRACT_KEY = exports.SKILL_GRAPH_METADATA_KEY = exports.formatCheckup = exports.decideSkill = exports.skillGraph = exports.defineInjection = exports.defineFact = exports.defineSteering = exports.useSkillGraphDevMode = exports.TOOL_RESULT_STATUSES = exports.readSkillDescriptor = exports.listSkillsDescriptor = exports.buildSkipStepTool = exports.buildReadSkillTool = exports.buildListSkillsTool = exports.skillsFromDir = exports.SkillRegistry = exports.vocabularyOf = exports.checkArtifactVocabularies = exports.STEPS_HINT_METADATA_KEY = exports.defineStepsHint = exports.skipStepDescriptor = exports.SKIP_STEP_TOOL_NAME = exports.pointerOf = exports.resolveSurfaceMode = exports.defineSkill = exports.MENU_HINT_METADATA_KEY = exports.defineMenuHint = exports.READS_ENTRY_SCORES_METADATA_KEY = exports.defineRelevanceHint = exports.defineInstruction = exports.buildInjectionEngineSubflow = exports.evaluateInjections = exports.toolResultsOf = exports.projectActiveInjection = void 0;
|
|
10
|
+
exports.skillToolNames = exports.checkSkillContracts = exports.checkSkillContract = exports.menuOutstanding = exports.decideTier2 = exports.DEFAULT_ROUTING_POLICY = exports.MENU_SIZE = exports.NEAR_TIE_MARGIN = exports.constrainedEnumPick = exports.llmClassifier = exports.validateIntentScores = exports.rankEntries = exports.embeddingScorer = exports.keywordScorer = exports.SKILL_GRAPH_DEFERRED_CONTRACT_KEY = exports.SKILL_GRAPH_METADATA_KEY = exports.formatCheckup = exports.decideSkill = exports.skillGraph = exports.defineInjection = exports.defineFact = exports.defineSteering = exports.useSkillGraphDevMode = exports.TOOL_RESULT_STATUSES = exports.readSkillDescriptor = exports.listSkillsDescriptor = exports.buildSkipStepTool = exports.buildReadSkillTool = exports.buildListSkillsTool = exports.runbookFromDir = exports.skillsFromDir = exports.SkillRegistry = exports.vocabularyOf = exports.checkArtifactVocabularies = exports.STEPS_HINT_METADATA_KEY = exports.defineStepsHint = exports.skipStepDescriptor = exports.SKIP_STEP_TOOL_NAME = exports.pointerOf = exports.resolveSurfaceMode = exports.defineSkill = exports.MENU_HINT_METADATA_KEY = exports.defineMenuHint = exports.READS_ENTRY_SCORES_METADATA_KEY = exports.defineRelevanceHint = exports.defineInstruction = exports.buildInjectionEngineSubflow = exports.evaluateInjections = exports.toolResultsOf = exports.projectActiveInjection = void 0;
|
|
11
11
|
// Bind the pure core's dev-warn seam to footprintjs's `isDevMode` (9.34.0).
|
|
12
12
|
// Side-effect import, on purpose: the skill-graph core no longer imports the
|
|
13
13
|
// engine, so SOMEONE has to hand it the dev flag, and this barrel is on every
|
|
@@ -67,8 +67,11 @@ Object.defineProperty(exports, "SkillRegistry", { enumerable: true, get: functio
|
|
|
67
67
|
// File-authored skills — a loader over `defineSkill`, not a second mechanism.
|
|
68
68
|
// Node-only (reads the filesystem); node:fs is imported lazily inside the call
|
|
69
69
|
// so this barrel stays safe to import from a browser bundle.
|
|
70
|
+
// `runbookFromDir` is the same loader read as a whole runbook — skills PLUS the
|
|
71
|
+
// edges each file's `routes:` declares, ready for `skillGraph({ ...runbook })`.
|
|
70
72
|
var skillsFromDir_js_1 = require("./skillsFromDir.js");
|
|
71
73
|
Object.defineProperty(exports, "skillsFromDir", { enumerable: true, get: function () { return skillsFromDir_js_1.skillsFromDir; } });
|
|
74
|
+
Object.defineProperty(exports, "runbookFromDir", { enumerable: true, get: function () { return skillsFromDir_js_1.runbookFromDir; } });
|
|
72
75
|
// Skill-tool builders — used by SkillRegistry.toTools() and the Agent's
|
|
73
76
|
// auto-attach path. Exported so consumers building custom tool wiring
|
|
74
77
|
// (e.g., gatedTools chains) can compose the same `list_skills` /
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/lib/injection-engine/index.ts"],"names":[],"mappings":";AAAA;;;;;;GAMG;;;AAEH,4EAA4E;AAC5E,6EAA6E;AAC7E,8EAA8E;AAC9E,sEAAsE;AACtE,2EAA2E;AAC3E,4EAA4E;AAC5E,2CAA2C;AAC3C,4BAA0B;AAY1B,+DAA+D;AAC/D,uCAAoD;AAA3C,kHAAA,sBAAsB,OAAA;AAE/B,uEAAuE;AACvE,8EAA8E;AAC9E,mFAAmF;AACnF,uCAA2C;AAAlC,yGAAA,aAAa,OAAA;AAEtB,SAAS;AACT,+CAAoD;AAA3C,kHAAA,kBAAkB,OAAA;AAC3B,mFAG0C;AAFxC,6IAAA,2BAA2B,OAAA;AAI7B,gFAAgF;AAChF,yEAAoG;AAA3F,yHAAA,iBAAiB,OAAA;AAC1B,6EAI4C;AAH1C,6HAAA,mBAAmB,OAAA;AACnB,yIAAA,+BAA+B,OAAA;AAGjC,mEAIuC;AAHrC,mHAAA,cAAc,OAAA;AACd,2HAAA,sBAAsB,OAAA;AAIxB,6DAOoC;AANlC,6GAAA,WAAW,OAAA;AACX,oHAAA,kBAAkB,OAAA;AAOpB,6EAA6E;AAC7E,8EAA8E;AAC9E,4EAA4E;AAC5E,6EAA6E;AAC7E,4EAA4E;AAC5E,iDASyB;AARvB,0GAAA,SAAS,OAAA;AACT,oHAAA,mBAAm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B,+EAA+E;AAC/E,+EAA+E;AAC/E,qEAAqE;AACrE,6EAA6E;AAC7E,uFAAuF;AACvF,kIAAA,iCAAiC,OAAA;AASnC,mDAO0B;AANxB,+GAAA,aAAa,OAAA;AACb,iHAAA,eAAe,OAAA;AACf,6GAAA,WAAW,OAAA;AAKb,2EAA2E;AAC3E,0EAA0E;AAC1E,6EAA6E;AAC7E,sDAAsD;AACtD,qDAM2B;AALzB,uHAAA,oBAAoB,OAAA;AAMtB,uDAA8E;AAArE,iHAAA,aAAa,OAAA;AACtB,sEAAsE;AACtE,4EAA4E;AAC5E,mEAIkC;AAHhC,6HAAA,mBAAmB,OAAA;AAIrB,uDAU4B;AAT1B,mHAAA,eAAe,OAAA;AACf,6GAAA,SAAS,OAAA;AACT,0HAAA,sBAAsB,OAAA;AACtB,+GAAA,WAAW,OAAA;AACX,mHAAA,eAAe,OAAA;AAOjB,uDAK4B;AAJ1B,sHAAA,kBAAkB,OAAA;AAClB,uHAAA,mBAAmB,OAAA;AACnB,kHAAA,cAAc,OAAA"}
|
|
@@ -94,13 +94,23 @@
|
|
|
94
94
|
* visible wherever the graph reports its problems — because a reader who meets
|
|
95
95
|
* it only in prose docs will meet a clean report first.
|
|
96
96
|
*
|
|
97
|
+
* ## The opposite assertion lives next door
|
|
98
|
+
*
|
|
99
|
+
* Everything here is POSITIVE: this rule claims this phrase. The negative form
|
|
100
|
+
* — a phrase that must claim NO skill, which is the assertion that catches
|
|
101
|
+
* over-triggering — is `skillNeverRoutes.ts`, declared on the GRAPH rather than
|
|
102
|
+
* on a rule (a phrase that must route nowhere belongs to no skill). Both ask
|
|
103
|
+
* `startRuleClaim.ts` the same question and differ only in which answer is a
|
|
104
|
+
* defect; a phrase declared BOTH ways is reported there as the contradiction it
|
|
105
|
+
* is.
|
|
106
|
+
*
|
|
97
107
|
* Composed into `graph.checkup()` by `skillGraph.ts`, exactly like
|
|
98
108
|
* `skillContract`/`skillIntent`/`skillVocabulary`: this module owns the rule
|
|
99
109
|
* AND its boundaries, and reports in the shared `GraphProblem` voice.
|
|
100
110
|
*/
|
|
101
111
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
102
112
|
exports.checkStartRuleExamples = exports.validateStartRuleExamples = exports.EXAMPLES_ORDER_NOT_CHECKED = exports.EXAMPLES_BOUNDARY = void 0;
|
|
103
|
-
const
|
|
113
|
+
const startRuleClaim_js_1 = require("./startRuleClaim.js");
|
|
104
114
|
/**
|
|
105
115
|
* The statement the check-up makes about its own reach, carried on
|
|
106
116
|
* `GraphCheckup.notes` whenever any rule declared examples. Same voice as the
|
|
@@ -187,24 +197,11 @@ function checkStartRuleExamples(input) {
|
|
|
187
197
|
if (!entries.some((e) => e.examples !== undefined && e.examples.length > 0))
|
|
188
198
|
return NOTHING;
|
|
189
199
|
// WHO CAN CLAIM A PHRASE — both routing laws, mirrored, not re-invented (see
|
|
190
|
-
// this file's header
|
|
191
|
-
//
|
|
192
|
-
//
|
|
193
|
-
//
|
|
194
|
-
|
|
195
|
-
// position onward.
|
|
196
|
-
// • CASCADE tier 1 (`firstRuleMatch`, mounted by `.classify()` OR by
|
|
197
|
-
// `continuity: 'conversation'`): the CONDITIONAL non-intent entries only.
|
|
198
|
-
//
|
|
199
|
-
// With a classifier the cascade is certain, so it is the only law consulted.
|
|
200
|
-
// Without one, EITHER may be mounted — both are computed, and where they
|
|
201
|
-
// disagree the report says so instead of picking one.
|
|
202
|
-
const nonIntent = entries
|
|
203
|
-
.map((entry, index) => ({ entry, index }))
|
|
204
|
-
.filter(({ entry }) => entry.match?.kind !== 'intent');
|
|
205
|
-
const ruleClaimants = nonIntent.filter(({ entry }) => entry.when !== undefined);
|
|
206
|
-
const claimUnderCascade = (phrase) => ruleClaimants.find(({ entry }) => runsOn(entry, phrase) === 'match');
|
|
207
|
-
const claimUnderColdWalk = (phrase) => nonIntent.find(({ entry }) => runsOn(entry, phrase) === 'match');
|
|
200
|
+
// this file's header and `startRuleClaim.ts`, which owns them). With a
|
|
201
|
+
// classifier the cascade is certain, so it is the only law consulted. Without
|
|
202
|
+
// one, EITHER may be mounted — both are computed, and where they disagree the
|
|
203
|
+
// report says so instead of picking one.
|
|
204
|
+
const { underCascade: claimUnderCascade, underColdWalk: claimUnderColdWalk } = (0, startRuleClaim_js_1.claimLaws)(entries);
|
|
208
205
|
const problems = [];
|
|
209
206
|
for (const [index, entry] of entries.entries()) {
|
|
210
207
|
const examples = entry.examples;
|
|
@@ -219,7 +216,7 @@ function checkStartRuleExamples(input) {
|
|
|
219
216
|
// and claim the phrase on a later turn, which this check cannot run —
|
|
220
217
|
// WARNING, with the judged context named. A throw is an ERROR either
|
|
221
218
|
// way: turn 1 really hands it that context.
|
|
222
|
-
const own = runsOn(entry, phrase);
|
|
219
|
+
const own = (0, startRuleClaim_js_1.runsOn)(entry, phrase);
|
|
223
220
|
if (own !== 'match') {
|
|
224
221
|
const provable = own === 'threw' || entry.match !== undefined;
|
|
225
222
|
problems.push({
|
|
@@ -247,7 +244,7 @@ function checkStartRuleExamples(input) {
|
|
|
247
244
|
kind: 'warning',
|
|
248
245
|
code: 'example-unclaimed',
|
|
249
246
|
message: `No start rule claims the example "${phrase}" (declared on "${entry.id}") — every ` +
|
|
250
|
-
`rule's condition was run against it in declaration order on ${COLD_CONTEXT_PHRASE} ` +
|
|
247
|
+
`rule's condition was run against it in declaration order on ${startRuleClaim_js_1.COLD_CONTEXT_PHRASE} ` +
|
|
251
248
|
`and none matched, so a turn phrased that way ${hasClassifier
|
|
252
249
|
? 'falls past tier 1 to the classifier, and on a near-tie to a menu the model ' +
|
|
253
250
|
'resolves'
|
|
@@ -283,7 +280,7 @@ function checkStartRuleExamples(input) {
|
|
|
283
280
|
kind: 'error',
|
|
284
281
|
code: 'example-shadowed-by-earlier',
|
|
285
282
|
message: `Start rule for "${entry.id}" declares the example "${phrase}", but the EARLIER ` +
|
|
286
|
-
`rule for "${winner.entry.id}" claims it first (${describeCondition(winner.entry)} matches the phrase) — the first matching rule in declaration order wins the ` +
|
|
283
|
+
`rule for "${winner.entry.id}" claims it first (${(0, startRuleClaim_js_1.describeCondition)(winner.entry)} matches the phrase) — the first matching rule in declaration order wins the ` +
|
|
287
284
|
`turn start, so that message starts on "${winner.entry.id}", never on ` +
|
|
288
285
|
`"${entry.id}". Reorder the rules (declare "${entry.id}" before ` +
|
|
289
286
|
`"${winner.entry.id}"), or narrow "${winner.entry.id}"'s matcher so it stops ` +
|
|
@@ -314,10 +311,10 @@ function checkStartRuleExamples(input) {
|
|
|
314
311
|
`entry claims it under BOTH start laws, so that message never starts on ` +
|
|
315
312
|
`"${entry.id}". Mounted the default way (continuity: 'turn'), the ` +
|
|
316
313
|
`declaration-order cold start stops at "${winner.entry.id}", which ` +
|
|
317
|
-
`${describeCondition(winner.entry)}. Mounted with a classifier or with ` +
|
|
314
|
+
`${(0, startRuleClaim_js_1.describeCondition)(winner.entry)}. Mounted with a classifier or with ` +
|
|
318
315
|
`continuity: 'conversation', the turn-start cascade reads the conditional rules ` +
|
|
319
316
|
`only, and "${byRules.entry.id}" claims it first ` +
|
|
320
|
-
`(${describeCondition(byRules.entry)} matches the phrase). Declare "${entry.id}" ` +
|
|
317
|
+
`(${(0, startRuleClaim_js_1.describeCondition)(byRules.entry)} matches the phrase). Declare "${entry.id}" ` +
|
|
321
318
|
`before both, or narrow "${byRules.entry.id}"'s matcher and give ` +
|
|
322
319
|
`"${winner.entry.id}" a condition (or declare it last — a default entry belongs ` +
|
|
323
320
|
`after the rules it must not swallow). (Proved by running the declared conditions ` +
|
|
@@ -367,43 +364,13 @@ function checkStartRuleExamples(input) {
|
|
|
367
364
|
};
|
|
368
365
|
}
|
|
369
366
|
exports.checkStartRuleExamples = checkStartRuleExamples;
|
|
370
|
-
/**
|
|
371
|
-
* Run one entry's condition over one phrase, on a COLD-START context — the
|
|
372
|
-
* context a turn's first iteration really hands a start rule: iteration 1, the
|
|
373
|
-
* phrase as `userMessage`, no history, no cursor, no tool results. A throw is
|
|
374
|
-
* reported as `'threw'` and treated as a no-match by every caller, which is
|
|
375
|
-
* exactly what the cursor resolver does with it at run time (so a claim made
|
|
376
|
-
* here stays true of the run).
|
|
377
|
-
*
|
|
378
|
-
* An entry with NO condition matches everything: that is the cold walk's law
|
|
379
|
-
* (`if (!e.when) return { to: e.id }`), not a shortcut.
|
|
380
|
-
*/
|
|
381
|
-
function runsOn(entry, phrase) {
|
|
382
|
-
if (entry.when === undefined)
|
|
383
|
-
return 'match';
|
|
384
|
-
try {
|
|
385
|
-
return entry.when(coldContext(phrase)) ? 'match' : 'no-match';
|
|
386
|
-
}
|
|
387
|
-
catch {
|
|
388
|
-
return 'threw';
|
|
389
|
-
}
|
|
390
|
-
}
|
|
391
|
-
function coldContext(userMessage) {
|
|
392
|
-
return { iteration: 1, userMessage, history: [], activatedInjectionIds: [] };
|
|
393
|
-
}
|
|
394
|
-
/** The one context every predicate here is judged on, spelled out for the
|
|
395
|
-
* reader of a message — a check that names its own inputs can be argued with;
|
|
396
|
-
* one that hides them can only be guessed at. Kept as ONE string so every
|
|
397
|
-
* message describes the SAME context {@link coldContext} really builds. */
|
|
398
|
-
const COLD_CONTEXT_PHRASE = 'a COLD-START context (iteration 1, the phrase as `userMessage`, empty `history`, no ' +
|
|
399
|
-
'cursor and no activated injections)';
|
|
400
367
|
/** The `example-misses-own-rule` sentence. Two readings, and the message says
|
|
401
368
|
* which one it is: a data matcher's no-match holds under every context, an
|
|
402
369
|
* opaque `when`'s holds only under the context it was run on. */
|
|
403
370
|
function selfMissMessage(entry, phrase, own) {
|
|
404
371
|
const head = `Start rule for "${entry.id}" declares the example "${phrase}", but `;
|
|
405
372
|
if (own === 'threw') {
|
|
406
|
-
return (`${head}${describeCondition(entry)} THREW when run on ${COLD_CONTEXT_PHRASE} — a ` +
|
|
373
|
+
return (`${head}${(0, startRuleClaim_js_1.describeCondition)(entry)} THREW when run on ${startRuleClaim_js_1.COLD_CONTEXT_PHRASE} — a ` +
|
|
407
374
|
`predicate must be pure and total, and a turn's first iteration really hands it that ` +
|
|
408
375
|
`context, so it throws in production too. Routing treats a throw as no-match (this ` +
|
|
409
376
|
`check does the same), so the rule cannot claim the phrasing it says it claims. Make ` +
|
|
@@ -411,13 +378,13 @@ function selfMissMessage(entry, phrase, own) {
|
|
|
411
378
|
`really claims the phrase. (Proved by running this rule's own predicate on that context.)`);
|
|
412
379
|
}
|
|
413
380
|
if (entry.match !== undefined) {
|
|
414
|
-
return (`${head}${describeCondition(entry)} does not match it — so the rule cannot claim the ` +
|
|
381
|
+
return (`${head}${(0, startRuleClaim_js_1.describeCondition)(entry)} does not match it — so the rule cannot claim the ` +
|
|
415
382
|
`phrasing it says it claims. Fix the matcher so it covers the phrase, or move the ` +
|
|
416
383
|
`example to the rule that really claims it. (Proved by running this rule's own compiled ` +
|
|
417
384
|
`matcher on the phrase: a data matcher reads the user message and nothing else, so no ` +
|
|
418
385
|
`conversation state makes it true later.)`);
|
|
419
386
|
}
|
|
420
|
-
return (`${head}${describeCondition(entry)} returned false when run on ${COLD_CONTEXT_PHRASE} — the ` +
|
|
387
|
+
return (`${head}${(0, startRuleClaim_js_1.describeCondition)(entry)} returned false when run on ${startRuleClaim_js_1.COLD_CONTEXT_PHRASE} — the ` +
|
|
421
388
|
`context a turn's FIRST iteration hands a start rule. A \`when\` predicate is opaque code ` +
|
|
422
389
|
`and may legitimately be gated on conversation state (e.g. \`ctx.history.length > 0\`) and ` +
|
|
423
390
|
`claim this phrase on a LATER turn, which this check cannot run — that is why this is a ` +
|
|
@@ -426,15 +393,4 @@ function selfMissMessage(entry, phrase, own) {
|
|
|
426
393
|
`example to the rule that claims the phrase cold — a rule-level \`examples\` list is only ` +
|
|
427
394
|
`ever run on the context named above. (Proved by running this rule's own predicate on it.)`);
|
|
428
395
|
}
|
|
429
|
-
/** How a rule's condition is named in a message: the data matcher quoted back,
|
|
430
|
-
* the honest word for opaque code — or, for an entry that declares neither,
|
|
431
|
-
* what having no condition MEANS. Naming a `when` predicate an unconditional
|
|
432
|
-
* entry does not have is how a report describes a graph nobody wrote. */
|
|
433
|
-
function describeCondition(entry) {
|
|
434
|
-
if (entry.match !== undefined)
|
|
435
|
-
return `its matcher \`${(0, skillMatch_js_1.plainMatchCaption)(entry.match)}\``;
|
|
436
|
-
return entry.when === undefined
|
|
437
|
-
? 'declares no `match` and no `when`, so it claims every message'
|
|
438
|
-
: 'its `when` predicate';
|
|
439
|
-
}
|
|
440
396
|
//# sourceMappingURL=skillExamples.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"skillExamples.js","sourceRoot":"","sources":["../../../src/lib/injection-engine/skillExamples.ts"],"names":[],"mappings":";AAAA
|
|
1
|
+
{"version":3,"file":"skillExamples.js","sourceRoot":"","sources":["../../../src/lib/injection-engine/skillExamples.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA4GG;;;AAEH,2DAM6B;AAG7B;;;;;GAKG;AACU,QAAA,iBAAiB,GAC5B,qFAAqF;IACrF,kEAAkE,CAAC;AAErE;+DAC+D;AAClD,QAAA,0BAA0B,GACrC,0FAA0F;IAC1F,4FAA4F;IAC5F,iEAAiE,CAAC;AAoBpE,MAAM,OAAO,GAAoB,MAAM,CAAC,MAAM,CAAC;IAC7C,QAAQ,EAAE,MAAM,CAAC,MAAM,CAAC,EAAE,CAA4B;IACtD,KAAK,EAAE,MAAM,CAAC,MAAM,CAAC,EAAE,CAAsB;CAC9C,CAAC,CAAC;AAEH;;;;;;;;;;;;;;GAcG;AACH,SAAgB,yBAAyB,CACvC,QAAiB,EACjB,KAAa,EACb,IAAoE;IAEpE,IAAI,QAAQ,KAAK,SAAS;QAAE,OAAO,SAAS,CAAC;IAC7C,IAAI,CAAC,KAAK,CAAC,OAAO,CAAC,QAAQ,CAAC,IAAI,QAAQ,CAAC,MAAM,KAAK,CAAC,EAAE,CAA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