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
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"skillGraph.d.ts","sourceRoot":"","sources":["../../../../src/lib/injection-engine/skillGraph.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA0DG;AAGH,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,kBAAkB,CAAC;AAEzD,OAAO,KAAK,EAAE,SAAS,EAAE,gBAAgB,EAAoB,MAAM,YAAY,CAAC;AAChF,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,iCAAiC,CAAC;AAChE,OAAO,KAAK,EAAE,UAAU,EAAE,YAAY,EAAE,WAAW,EAAE,MAAM,kBAAkB,CAAC;AAE9E,OAAO,EAIL,KAAK,YAAY,EAElB,MAAM,wBAAwB,CA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AAC,EAAE,iBAAiB,GAAG,iBAAiB,CAAC;IACrE,gFAAgF;IAChF,KAAK,CAAC,IAAI,EAAE,SAAS,EAAE,EAAE,EAAE,SAAS,EAAE,IAAI,CAAC,EAAE,iBAAiB,GAAG,iBAAiB,CAAC;IACnF;;;8EAG0E;IAC1E,IAAI,CAAC,IAAI,EAAE,YAAY,GAAG,SAAS,EAAE,IAAI,CAAC,EAAE,WAAW,GAAG,iBAAiB,CAAC;IAC5E;;;;;;;;OAQG;IACH,OAAO,CAAC,MAAM,EAAE,WAAW,GAAG,iBAAiB,CAAC;IAChD;;;;;OAKG;IACH,gBAAgB,CAAC,QAAQ,EAAE,QAAQ,GAAG,iBAAiB,CAAC;IACxD;;;;;;;;;;;;;OAaG;IACH,WAAW,IAAI,iBAAiB,CAAC;IACjC;;;;;;;;;;;;;;;;;;;;;OAqBG;IACH,QAAQ,CAAC,MAAM,EAAE,YAAY,EAAE,MAAM,CAAC,EAAE,OAAO,CAAC,aAAa,CAAC,GAAG,iBAAiB,CAAC;IACnF;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;OAkCG;IACH,WAAW,CAAC,OAAO,EAAE,MAAM,GAAG,SAAS,MAAM,EAAE,GAAG,iBAAiB,CAAC;IACpE,KAAK,CAAC,IAAI,CAAC,EAAE,YAAY,GAAG,UAAU,CAAC;CACxC;AA6DD,wBAAgB,UAAU,IAAI,iBAAiB,CAAC;AAChD,wBAAgB,UAAU,CAAC,MAAM,EAAE,gBAAgB,GAAG,UAAU,CAAC"}
|
|
@@ -34,7 +34,7 @@ import { type SkillMatchData } from './skillMatch.js';
|
|
|
34
34
|
* engine-type-free, which is what keeps that law intact here).
|
|
35
35
|
*/
|
|
36
36
|
export type CheckupTriggerKind = 'always' | 'rule' | 'on-tool-return' | 'llm-activated';
|
|
37
|
-
export type GraphProblemCode = 'unknown-skill' | 'no-entry' | 'unreachable-skill' | 'model-edge-only' | 'multi-entry-fanout' | 'dead-entry-step' | 'ambiguous-routes' | 'self-loop' | 'rule-id-exists' | 'overlapping-rules' | 'rules-shadowed-by-order' | 'intent-without-classify' | 'duplicate-intent-example' | 'overlapping-intents' | 'body-foreign-tool' | 'body-unknown-tool' | 'example-misses-own-rule' | 'example-shadowed-by-earlier' | 'example-shadowed-by-default' | 'example-unclaimed' | 'artifact-kind-unsatisfied';
|
|
37
|
+
export type GraphProblemCode = 'unknown-skill' | 'no-entry' | 'unreachable-skill' | 'model-edge-only' | 'multi-entry-fanout' | 'dead-entry-step' | 'ambiguous-routes' | 'self-loop' | 'rule-id-exists' | 'overlapping-rules' | 'rules-shadowed-by-order' | 'intent-without-classify' | 'duplicate-intent-example' | 'overlapping-intents' | 'body-foreign-tool' | 'body-unknown-tool' | 'example-misses-own-rule' | 'example-shadowed-by-earlier' | 'example-shadowed-by-default' | 'example-unclaimed' | 'never-routes-claimed' | 'never-routes-by-default' | 'never-routes-contradicts-example' | 'tools-share-prefix' | 'few-declared-edges' | 'skill-wraps-one-tool' | 'artifact-kind-unsatisfied';
|
|
38
38
|
/** One issue found by the check-up. `kind: 'error'` fails `ok` (and `'throw'`). */
|
|
39
39
|
export interface GraphProblem {
|
|
40
40
|
readonly kind: 'error' | 'warning';
|
|
@@ -45,10 +45,11 @@ export interface GraphProblem {
|
|
|
45
45
|
readonly from?: string;
|
|
46
46
|
readonly to?: string;
|
|
47
47
|
/**
|
|
48
|
-
* The declared
|
|
49
|
-
* `
|
|
50
|
-
* phrase
|
|
51
|
-
*
|
|
48
|
+
* The declared phrase this problem is about — present on the `example-*`
|
|
49
|
+
* codes and on the `never-routes-*` ones, the checks that reason about a
|
|
50
|
+
* concrete phrase (in the positive and the negative direction respectively).
|
|
51
|
+
* The message always quotes it too; this is the same string as data, so a
|
|
52
|
+
* tool can group by phrase without parsing prose.
|
|
52
53
|
*/
|
|
53
54
|
readonly example?: string;
|
|
54
55
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"skillGraphCheckup.d.ts","sourceRoot":"","sources":["../../../../src/lib/injection-engine/skillGraphCheckup.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;GA2BG;AAEH,OAAO,EAAmB,KAAK,cAAc,EAAE,MAAM,iBAAiB,CAAC;AAEvE;;;;;GAKG;AACH,MAAM,MAAM,kBAAkB,GAAG,QAAQ,GAAG,MAAM,GAAG,gBAAgB,GAAG,eAAe,CAAC;AAExF,MAAM,MAAM,gBAAgB,GACxB,eAAe,GACf,UAAU,GACV,mBAAmB,GACnB,iBAAiB,GACjB,oBAAoB,GACpB,iBAAiB,GACjB,kBAAkB,GAClB,WAAW,GAEX,gBAAgB,GAKhB,mBAAmB,GACnB,yBAAyB,GAIzB,yBAAyB,GAIzB,0BAA0B,GAG1B,qBAAqB,GAIrB,mBAAmB,GACnB,mBAAmB,GAInB,yBAAyB,GAKzB,6BAA6B,GAO7B,6BAA6B,GAO7B,mBAAmB,
|
|
1
|
+
{"version":3,"file":"skillGraphCheckup.d.ts","sourceRoot":"","sources":["../../../../src/lib/injection-engine/skillGraphCheckup.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;GA2BG;AAEH,OAAO,EAAmB,KAAK,cAAc,EAAE,MAAM,iBAAiB,CAAC;AAEvE;;;;;GAKG;AACH,MAAM,MAAM,kBAAkB,GAAG,QAAQ,GAAG,MAAM,GAAG,gBAAgB,GAAG,eAAe,CAAC;AAExF,MAAM,MAAM,gBAAgB,GACxB,eAAe,GACf,UAAU,GACV,mBAAmB,GACnB,iBAAiB,GACjB,oBAAoB,GACpB,iBAAiB,GACjB,kBAAkB,GAClB,WAAW,GAEX,gBAAgB,GAKhB,mBAAmB,GACnB,yBAAyB,GAIzB,yBAAyB,GAIzB,0BAA0B,GAG1B,qBAAqB,GAIrB,mBAAmB,GACnB,mBAAmB,GAInB,yBAAyB,GAKzB,6BAA6B,GAO7B,6BAA6B,GAO7B,mBAAmB,GAOnB,sBAAsB,GAKtB,yBAAyB,GAIzB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AAC,aAAa,EAAE,OAAO,CAAA;KAAE,CAAC,CAAC;IACzF,sFAAsF;IACtF,QAAQ,CAAC,MAAM,EAAE,OAAO,CAAC;IACzB;;;;OAIG;IACH,QAAQ,CAAC,gBAAgB,EAAE,OAAO,CAAC;IACnC;;;;;;;OAOG;IACH,QAAQ,CAAC,YAAY,EAAE,WAAW,CAAC,MAAM,EAAE,kBAAkB,CAAC,CAAC;IAC/D;;;;;;;;OAQG;IACH,QAAQ,CAAC,aAAa,CAAC,EAAE,OAAO,CAAC;CAClC;AAED,8BAA8B;AAC9B,wBAAgB,YAAY,CAAC,KAAK,EAAE,YAAY,GAAG,YAAY,CAwV9D;AA2CD;;;;;;GAMG;AACH,wBAAgB,aAAa,CAAC,OAAO,EAAE,YAAY,GAAG,MAAM,CAI3D"}
|
|
@@ -0,0 +1,132 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* skillNeverRoutes — the NEGATIVE routing row: a phrase this graph must claim
|
|
3
|
+
* NOWHERE.
|
|
4
|
+
*
|
|
5
|
+
* ## Why the negative form is the valuable one
|
|
6
|
+
*
|
|
7
|
+
* `skillExamples.ts` pins the positive assertion — this rule claims this
|
|
8
|
+
* phrasing — and it cannot state the opposite. Field use says the opposite is
|
|
9
|
+
* the one that catches the expensive failure. An UNDER-triggering skill costs a
|
|
10
|
+
* turn: the deterministic layer declines, the model tier picks, and the answer
|
|
11
|
+
* is usually still reachable. An OVER-triggering skill costs the whole answer:
|
|
12
|
+
* the wrong body enters the system prompt, the wrong tools enter the tools
|
|
13
|
+
* slot, and everything the model then says is shaped by a skill that had no
|
|
14
|
+
* business in the turn. One reviewer of a production graph had written his own
|
|
15
|
+
* harness for exactly this, outside the library, because the library could only
|
|
16
|
+
* express the cheap half.
|
|
17
|
+
*
|
|
18
|
+
* ## Where a negative row lives, and why it is NOT on a skill
|
|
19
|
+
*
|
|
20
|
+
* `examples` sits on the rule it is about. A negative row cannot: the phrase it
|
|
21
|
+
* describes belongs to NO skill, and hanging it on one would make three things
|
|
22
|
+
* wrong at once —
|
|
23
|
+
*
|
|
24
|
+
* • it would read as that skill's business ("weather questions, filed under
|
|
25
|
+
* billing") when the point is that it is nobody's;
|
|
26
|
+
* • the assertion is satisfied only when EVERY rule declines, so a row read
|
|
27
|
+
* as one rule's property would be checked against one rule and pass while
|
|
28
|
+
* another rule swallowed the phrase;
|
|
29
|
+
* • deleting the skill would delete the assertion — exactly when a graph is
|
|
30
|
+
* re-partitioned, which is exactly when over-triggering is introduced.
|
|
31
|
+
*
|
|
32
|
+
* A negative row is a property of the PARTITION, so it is declared at the graph
|
|
33
|
+
* level (`.neverRoutes([...])` / `neverRoutes: [...]`) and judged against every
|
|
34
|
+
* rule in declaration order.
|
|
35
|
+
*
|
|
36
|
+
* ## What is asserted — precisely, and what it does NOT cover
|
|
37
|
+
*
|
|
38
|
+
* The claim this module proves is: **no declared start RULE claims the
|
|
39
|
+
* phrase.** It runs the compiled conditions on a cold-start context, exactly as
|
|
40
|
+
* `skillExamples.ts` does, and reports the rule that says yes.
|
|
41
|
+
*
|
|
42
|
+
* It does NOT prove "no routing at all occurs", and could not without becoming
|
|
43
|
+
* a different kind of check:
|
|
44
|
+
*
|
|
45
|
+
* • an INTENT rule compiles to no sync predicate — a classifier judges it at
|
|
46
|
+
* run time, with a scorer (and, for `llmClassifier`, a model call). Running
|
|
47
|
+
* that would make the check async, non-deterministic, and in the LLM case
|
|
48
|
+
* billable — `graph.checkupIntents()` is where scorer-dependent auditing
|
|
49
|
+
* already lives;
|
|
50
|
+
* • a scorer menu (`.entryBy()`) and `.entryByRead()` RANK descriptions;
|
|
51
|
+
* there is no claim to run;
|
|
52
|
+
* • the model tier can open any open skill by name with `read_skill`, at
|
|
53
|
+
* which point no declaration is deciding anything.
|
|
54
|
+
*
|
|
55
|
+
* That statement ships on the report as {@link NEVER_ROUTES_BOUNDARY}, next to
|
|
56
|
+
* the problems, for the same reason the examples boundary does: a reader who
|
|
57
|
+
* meets a boundary only in prose docs meets a clean report first.
|
|
58
|
+
*
|
|
59
|
+
* A predicate that THROWS on the cold context counts as a no-match here, and is
|
|
60
|
+
* not reported — because routing itself treats a throw as a no-match, so the
|
|
61
|
+
* phrase really does not route through that rule. Its own rule's `examples`
|
|
62
|
+
* report the throw as an error (that is a defect in the rule, not in the
|
|
63
|
+
* partition).
|
|
64
|
+
*
|
|
65
|
+
* Composed into `graph.checkup()` by `skillGraph.ts`, like every other domain
|
|
66
|
+
* check, and reporting in the shared `GraphProblem` voice.
|
|
67
|
+
*
|
|
68
|
+
* Zone: PURE CORE. Pinned by
|
|
69
|
+
* `test/lib/injection-engine/skill-graph-fence.test.ts`.
|
|
70
|
+
*/
|
|
71
|
+
import type { GraphProblem } from './skillGraphCheckup.js';
|
|
72
|
+
import { type StartRuleDecl } from './startRuleClaim.js';
|
|
73
|
+
/**
|
|
74
|
+
* The statement the negative check makes about its own reach, carried on
|
|
75
|
+
* `GraphCheckup.notes` whenever a graph declared any negative row. Same voice
|
|
76
|
+
* as `EXAMPLES_BOUNDARY` (skillExamples.ts): silence here is evidence about the declared
|
|
77
|
+
* RULES, and about nothing downstream of them.
|
|
78
|
+
*/
|
|
79
|
+
export declare const NEVER_ROUTES_BOUNDARY: string;
|
|
80
|
+
/** The slice of an entry declaration this check reads: the shared claim shape,
|
|
81
|
+
* plus the POSITIVE phrases the same rule declared (a phrase asserted both
|
|
82
|
+
* ways is a contradiction the author wrote, and is reported as one). */
|
|
83
|
+
export interface NeverRoutesRuleDecl extends StartRuleDecl {
|
|
84
|
+
readonly examples?: readonly string[];
|
|
85
|
+
}
|
|
86
|
+
/** What {@link checkNeverRoutes} found, plus what it wants to say about its own
|
|
87
|
+
* reach. Both empty when the graph declared no negative row. */
|
|
88
|
+
export interface NeverRoutesCheckup {
|
|
89
|
+
readonly problems: readonly GraphProblem[];
|
|
90
|
+
readonly notes: readonly string[];
|
|
91
|
+
}
|
|
92
|
+
/** How two phrases are compared for "the same phrase": trimmed and
|
|
93
|
+
* case-folded, the same normalization `duplicate-intent-example` uses — an
|
|
94
|
+
* author who writes one row in two casings meant one row. Exported so the
|
|
95
|
+
* builder's accumulated-rows set is keyed the SAME way the refusal is; two
|
|
96
|
+
* spellings of one rule is how a duplicate slips through. */
|
|
97
|
+
export declare function neverRouteKey(phrase: string): string;
|
|
98
|
+
/**
|
|
99
|
+
* Validate a graph-level `neverRoutes` list at DECLARATION time, refusing every
|
|
100
|
+
* shape whose check-up answer could only mislead — each refusal naming the fix:
|
|
101
|
+
*
|
|
102
|
+
* • not an array / an EMPTY array — nothing to assert, and a check-up that
|
|
103
|
+
* passes in silence reads as coverage;
|
|
104
|
+
* • a non-string or blank entry — there is no phrase to run a matcher on;
|
|
105
|
+
* • a phrase already declared — a repeat asserts nothing the first one did
|
|
106
|
+
* not, and reads as if two different phrasings were meant.
|
|
107
|
+
*
|
|
108
|
+
* A single string is accepted and read as a one-row list: `.neverRoutes('what
|
|
109
|
+
* is the weather')` is the commonest call, and making the author type brackets
|
|
110
|
+
* for it buys nothing.
|
|
111
|
+
*
|
|
112
|
+
* Returns a frozen copy of the ROWS THIS CALL ADDS, so the stored list cannot
|
|
113
|
+
* drift from the validated one.
|
|
114
|
+
*/
|
|
115
|
+
export declare function validateNeverRoutes(phrases: unknown, where: string, alreadyDeclared: ReadonlySet<string>): readonly string[];
|
|
116
|
+
/**
|
|
117
|
+
* Run the negative rows against the declared start rules. Pure, and
|
|
118
|
+
* byte-identically silent when the graph declared none (one length check and
|
|
119
|
+
* out).
|
|
120
|
+
*
|
|
121
|
+
* Unlike the positive examples, this needs NO `orderDecides` gate: the
|
|
122
|
+
* assertion is "nobody claims it", which every rule has to satisfy, so the
|
|
123
|
+
* order they are read in cannot change the answer. That is also why it is the
|
|
124
|
+
* one phrase check that stays meaningful under a classifier — tier 1 is still
|
|
125
|
+
* read first there, and a rule that claims the phrase still takes the turn
|
|
126
|
+
* before any scorer runs.
|
|
127
|
+
*/
|
|
128
|
+
export declare function checkNeverRoutes(input: {
|
|
129
|
+
readonly entries: readonly NeverRoutesRuleDecl[];
|
|
130
|
+
readonly phrases: readonly string[];
|
|
131
|
+
}): NeverRoutesCheckup;
|
|
132
|
+
//# sourceMappingURL=skillNeverRoutes.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"skillNeverRoutes.d.ts","sourceRoot":"","sources":["../../../../src/lib/injection-engine/skillNeverRoutes.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAqEG;AAEH,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,wBAAwB,CAAC;AAC3D,OAAO,EAIL,KAAK,aAAa,EACnB,MAAM,qBAAqB,CAAC;AAE7B;;;;;GAKG;AACH,eAAO,MAAM,qBAAqB,QAI6B,CAAC;AAEhE;;yEAEyE;AACzE,MAAM,WAAW,mBAAoB,SAAQ,aAAa;IACxD,QAAQ,CAAC,QAAQ,CAAC,EAAE,SAAS,MAAM,EAAE,CAAC;CACvC;AAED;iEACiE;AACjE,MAAM,WAAW,kBAAkB;IACjC,QAAQ,CAAC,QAAQ,EAAE,SAAS,YAAY,EAAE,CAAC;IAC3C,QAAQ,CAAC,KAAK,EAAE,SAAS,MAAM,EAAE,CAAC;CACnC;AAOD;;;;8DAI8D;AAC9D,wBAAgB,aAAa,CAAC,MAAM,EAAE,MAAM,GAAG,MAAM,CAEpD;AAED;;;;;;;;;;;;;;;;GAgBG;AACH,wBAAgB,mBAAmB,CACjC,OAAO,EAAE,OAAO,EAChB,KAAK,EAAE,MAAM,EACb,eAAe,EAAE,WAAW,CAAC,MAAM,CAAC,GACnC,SAAS,MAAM,EAAE,CAsCnB;AAED;;;;;;;;;;;GAWG;AACH,wBAAgB,gBAAgB,CAAC,KAAK,EAAE;IACtC,QAAQ,CAAC,OAAO,EAAE,SAAS,mBAAmB,EAAE,CAAC;IACjD,QAAQ,CAAC,OAAO,EAAE,SAAS,MAAM,EAAE,CAAC;CACrC,GAAG,kBAAkB,CA0FrB"}
|
|
@@ -0,0 +1,70 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* skillPartition — three ADVISORY signals about the shape of the partition
|
|
3
|
+
* itself: how a graph cut the world into skills.
|
|
4
|
+
*
|
|
5
|
+
* ## Why the partition is worth a check at all
|
|
6
|
+
*
|
|
7
|
+
* Everything else the check-up reports is a wiring fact — an edge to a skill
|
|
8
|
+
* that is not there, a rule that can never win. The partition is upstream of
|
|
9
|
+
* all of it, and it is the decision with the most leverage: a graph whose
|
|
10
|
+
* skills follow SYSTEMS rather than CAPABILITIES makes one ordinary question
|
|
11
|
+
* cross four skills, and the capability the user actually wanted ends up
|
|
12
|
+
* implemented outside the graph, by hand, where nothing can see it. Field use
|
|
13
|
+
* produced exactly that shape — nineteen skills, ONE declared edge, and tool
|
|
14
|
+
* names carrying the system that owns them (`influx_*`, `pmax_*`, `pstore_*`,
|
|
15
|
+
* `rvtools_*`) with the skills following the prefixes.
|
|
16
|
+
*
|
|
17
|
+
* The important part: all three of those are visible from NAMES AND STRUCTURE
|
|
18
|
+
* ALONE, at build time, with no run and no model. So the runtime can say them.
|
|
19
|
+
*
|
|
20
|
+
* ## Why every one of them is an advisory, and stays one
|
|
21
|
+
*
|
|
22
|
+
* Each signal has a legitimate design behind it:
|
|
23
|
+
*
|
|
24
|
+
* • a skill really can be one system's capability (a weather skill wrapping a
|
|
25
|
+
* weather API is not a mistake);
|
|
26
|
+
* • a deliberately FLAT menu of independent skills really does declare almost
|
|
27
|
+
* no edges — a scorer or the model picks, and there is nothing to hand off;
|
|
28
|
+
* • a one-call capability really can be one tool with a short body.
|
|
29
|
+
*
|
|
30
|
+
* So none of them is ever an error, and none of them says "this is wrong". Each
|
|
31
|
+
* message states the SIGNAL AS A FACT the author can check against their own
|
|
32
|
+
* intent — "your 19 skills declare 1 route", "every tool in `powerstore` shares
|
|
33
|
+
* the prefix `pstore_`" — and then names the design each fact usually indicates
|
|
34
|
+
* and the design it is also consistent with. This library's check-up teaches;
|
|
35
|
+
* it does not grade.
|
|
36
|
+
*
|
|
37
|
+
* ## The thresholds, and why each one is where it is
|
|
38
|
+
*
|
|
39
|
+
* Named constants below, each with the argument beside it. They are chosen so a
|
|
40
|
+
* SMALL graph is silent (small graphs have no partition problem worth naming),
|
|
41
|
+
* so a trivially-true observation is never dressed up as a finding (one tool
|
|
42
|
+
* shares a prefix with itself), and so the commonest honest naming convention —
|
|
43
|
+
* a VERB first — never fires.
|
|
44
|
+
*
|
|
45
|
+
* Zone: PURE CORE. Pinned by
|
|
46
|
+
* `test/lib/injection-engine/skill-graph-fence.test.ts`.
|
|
47
|
+
*/
|
|
48
|
+
import type { GraphProblem } from './skillGraphCheckup.js';
|
|
49
|
+
import type { Injection } from './types.js';
|
|
50
|
+
/** What the partition check reads. Counts, because that is what the signals
|
|
51
|
+
* are about — no check here reasons about which edge goes where. */
|
|
52
|
+
export interface PartitionInput {
|
|
53
|
+
/** Every skill in the graph (wired or not). */
|
|
54
|
+
readonly skills: readonly Injection[];
|
|
55
|
+
/** Declared routes, of any kind (a bare/model edge is still a declared
|
|
56
|
+
* handoff — the signal is about handoffs that were never written down at
|
|
57
|
+
* all, not about how deterministic they are). */
|
|
58
|
+
readonly routeCount: number;
|
|
59
|
+
/** Declared entries — quoted in the ratio message so the fact is complete. */
|
|
60
|
+
readonly entryCount: number;
|
|
61
|
+
/** A decision `tree()` owns its own routing and declares no routes by
|
|
62
|
+
* construction, so the edge-ratio signal does not apply there. */
|
|
63
|
+
readonly isTree: boolean;
|
|
64
|
+
}
|
|
65
|
+
/**
|
|
66
|
+
* Run the three partition signals. Pure, and cheap: one pass over the skills
|
|
67
|
+
* and two integers. Every problem it produces is a WARNING.
|
|
68
|
+
*/
|
|
69
|
+
export declare function checkPartition(input: PartitionInput): GraphProblem[];
|
|
70
|
+
//# sourceMappingURL=skillPartition.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"skillPartition.d.ts","sourceRoot":"","sources":["../../../../src/lib/injection-engine/skillPartition.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA8CG;AAEH,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,wBAAwB,CAAC;AAE3D,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,YAAY,CAAC;AA+G5C;qEACqE;AACrE,MAAM,WAAW,cAAc;IAC7B,+CAA+C;IAC/C,QAAQ,CAAC,MAAM,EAAE,SAAS,SAAS,EAAE,CAAC;IACtC;;sDAEkD;IAClD,QAAQ,CAAC,UAAU,EAAE,MAAM,CAAC;IAC5B,8EAA8E;IAC9E,QAAQ,CAAC,UAAU,EAAE,MAAM,CAAC;IAC5B;uEACmE;IACnE,QAAQ,CAAC,MAAM,EAAE,OAAO,CAAC;CAC1B;AAED;;;GAGG;AACH,wBAAgB,cAAc,CAAC,KAAK,EAAE,cAAc,GAAG,YAAY,EAAE,CAsFpE"}
|
|
@@ -76,9 +76,36 @@
|
|
|
76
76
|
* others take `defineSkill`'s defaults.
|
|
77
77
|
* - unknown frontmatter keys are still IGNORED, not rejected, so a file
|
|
78
78
|
* carrying another tool's metadata still loads here. `name`,
|
|
79
|
-
* `description`, `tools`, `steps` and `
|
|
80
|
-
* that used one of those
|
|
81
|
-
* release can change, and it changes it loudly.
|
|
79
|
+
* `description`, `tools`, `steps`, `onSkip` and `routes` are the KNOWN
|
|
80
|
+
* keys — a file that used one of those six for something else is the one
|
|
81
|
+
* case a release can change, and it changes it loudly.
|
|
82
|
+
*
|
|
83
|
+
* ── The routing, and the door that reads it (9.43.0) ─────────────────────────
|
|
84
|
+
* A runbook says what to do, what to do it with, in what order — and where the
|
|
85
|
+
* work goes NEXT. That last part is the graph, and until now it had to be
|
|
86
|
+
* hand-wired in code even when the files said it plainly. `routes:` closes it:
|
|
87
|
+
*
|
|
88
|
+
* ---
|
|
89
|
+
* name: billing
|
|
90
|
+
* tools: lookup_order, issue_refund
|
|
91
|
+
* routes:
|
|
92
|
+
* - escalation: on issue_refund status=denied
|
|
93
|
+
* - receipts: on issue_refund
|
|
94
|
+
* ---
|
|
95
|
+
*
|
|
96
|
+
* const runbook = await runbookFromDir('./skills', { tools: [...] });
|
|
97
|
+
* const graph = skillGraph({ ...runbook, start: 'billing' });
|
|
98
|
+
*
|
|
99
|
+
* TWO DOORS, one truth: `skillsFromDir` returns skills and REFUSES a file that
|
|
100
|
+
* declares `routes:` (a door that dropped the routing would hand back a graph
|
|
101
|
+
* you believed was declared on disk); {@link runbookFromDir} returns
|
|
102
|
+
* `{ skills, steps }`. Same law as `tools:` — the file PICKS (a route names a
|
|
103
|
+
* skill id this directory declares; an unknown id is refused at load, by name,
|
|
104
|
+
* listing what is available), it never DEFINES. A guard is one of the two DATA
|
|
105
|
+
* conditions a route already has (`on <tool_name>`, `status=<outcome>`), and
|
|
106
|
+
* nothing else: a `when` predicate is CODE, no file can carry code, and that
|
|
107
|
+
* conditional stays in your source. See `skillsFromDirRoutes.ts` for the whole
|
|
108
|
+
* grammar and every refusal.
|
|
82
109
|
*
|
|
83
110
|
* A worked example feeding this into a graph:
|
|
84
111
|
* `examples/features/47-skills-from-dir-graph.ts`.
|
|
@@ -111,6 +138,7 @@
|
|
|
111
138
|
import type { Injection } from './types.js';
|
|
112
139
|
import type { Tool } from '../../core/tools.js';
|
|
113
140
|
import { type SurfaceMode } from './factories/defineSkill.js';
|
|
141
|
+
import type { SkillGraphStep } from './skillGraph.js';
|
|
114
142
|
export interface SkillsFromDirOptions {
|
|
115
143
|
/**
|
|
116
144
|
* Where a loaded skill's body lands once activated. Defaults to
|
|
@@ -133,6 +161,31 @@ export interface SkillsFromDirOptions {
|
|
|
133
161
|
*/
|
|
134
162
|
readonly tools?: readonly Tool[];
|
|
135
163
|
}
|
|
164
|
+
/**
|
|
165
|
+
* A whole runbook directory, read as the two things a graph is made of
|
|
166
|
+
* (9.43.0): the skills, and the edges between them.
|
|
167
|
+
*
|
|
168
|
+
* Spreads straight into the graph — the field names are the graph's own, so
|
|
169
|
+
* nothing has to be translated at the call site:
|
|
170
|
+
*
|
|
171
|
+
* const runbook = await runbookFromDir('./skills', { tools });
|
|
172
|
+
* const graph = skillGraph({ ...runbook, start: 'triage' });
|
|
173
|
+
*/
|
|
174
|
+
export interface DirRunbook {
|
|
175
|
+
/** Every `SKILL.md` under the directory, as Skill Injections — byte-identical
|
|
176
|
+
* to what `skillsFromDir` returns for the same directory. */
|
|
177
|
+
readonly skills: readonly Injection[];
|
|
178
|
+
/**
|
|
179
|
+
* The declared edges, ready for `skillGraph({ steps })`. In skill-name order,
|
|
180
|
+
* then file order, so a graph built from a directory is stable.
|
|
181
|
+
*
|
|
182
|
+
* NAME NOTE, because two different things are spelled `steps` in this
|
|
183
|
+
* library: a file's own `steps:` key is that SKILL's tool sequence (which
|
|
184
|
+
* rides on the skill, unchanged); these `steps` are the GRAPH's edges, read
|
|
185
|
+
* from each file's `routes:` key. They never meet.
|
|
186
|
+
*/
|
|
187
|
+
readonly steps: readonly SkillGraphStep[];
|
|
188
|
+
}
|
|
136
189
|
/**
|
|
137
190
|
* Load every `SKILL.md` under `dir` as a Skill Injection.
|
|
138
191
|
*
|
|
@@ -155,4 +208,31 @@ export interface SkillsFromDirOptions {
|
|
|
155
208
|
* does not carry, or sequences a tool the file itself did not declare.
|
|
156
209
|
*/
|
|
157
210
|
export declare function skillsFromDir(dir: string, opts?: SkillsFromDirOptions): Promise<readonly Injection[]>;
|
|
211
|
+
/**
|
|
212
|
+
* Load a directory as a whole RUNBOOK (9.43.0) — the skills AND the edges
|
|
213
|
+
* between them.
|
|
214
|
+
*
|
|
215
|
+
* `skillsFromDir` reads what one skill is; this reads what the skills are TO
|
|
216
|
+
* EACH OTHER, from each file's `routes:` key, and hands back both halves ready
|
|
217
|
+
* for `skillGraph({ ...runbook, start })`. Everything else is identical: same
|
|
218
|
+
* layouts, same frontmatter, same tool registry, same refusals.
|
|
219
|
+
*
|
|
220
|
+
* The routing a file may carry is deliberately small, and the boundary is a
|
|
221
|
+
* security property rather than a limitation — see `skillsFromDirRoutes.ts`:
|
|
222
|
+
* a route NAMES a skill this directory declares (an unknown id is refused at
|
|
223
|
+
* load, by name, listing what is available — never a half-graph), and a guard
|
|
224
|
+
* is one of the two DATA conditions a route already has (`on <tool>`,
|
|
225
|
+
* `status=<outcome>`). A `when` predicate is code, so no file can express one;
|
|
226
|
+
* that conditional stays in your source, where `skillGraph({ steps })` takes it.
|
|
227
|
+
*
|
|
228
|
+
* @param dir - A local filesystem path. Same rule as `skillsFromDir`.
|
|
229
|
+
* @param opts - Applied uniformly to every loaded skill.
|
|
230
|
+
*
|
|
231
|
+
* @throws everything `skillsFromDir` throws, plus: a route to an id no
|
|
232
|
+
* `SKILL.md` in the directory declares (the message lists what is
|
|
233
|
+
* available), a guard the grammar cannot express (the message quotes the
|
|
234
|
+
* whole grammar), a guard naming a tool the file itself does not declare,
|
|
235
|
+
* and a file routing to the same skill twice.
|
|
236
|
+
*/
|
|
237
|
+
export declare function runbookFromDir(dir: string, opts?: SkillsFromDirOptions): Promise<DirRunbook>;
|
|
158
238
|
//# sourceMappingURL=skillsFromDir.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"skillsFromDir.d.ts","sourceRoot":"","sources":["../../../../src/lib/injection-engine/skillsFromDir.ts"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"skillsFromDir.d.ts","sourceRoot":"","sources":["../../../../src/lib/injection-engine/skillsFromDir.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAwIG;AAEH,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,YAAY,CAAC;AAC5C,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,qBAAqB,CAAC;AAEhD,OAAO,EAAe,KAAK,WAAW,EAAE,MAAM,4BAA4B,CAAC;AAC3E,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,iBAAiB,CAAC;AAoBtD,MAAM,WAAW,oBAAoB;IACnC;;;OAGG;IACH,QAAQ,CAAC,WAAW,CAAC,EAAE,WAAW,CAAC;IACnC;;;;;;;;;;;;;OAaG;IACH,QAAQ,CAAC,KAAK,CAAC,EAAE,SAAS,IAAI,EAAE,CAAC;CAClC;AA2BD;;;;;;;;;GASG;AACH,MAAM,WAAW,UAAU;IACzB;kEAC8D;IAC9D,QAAQ,CAAC,MAAM,EAAE,SAAS,SAAS,EAAE,CAAC;IACtC;;;;;;;;OAQG;IACH,QAAQ,CAAC,KAAK,EAAE,SAAS,cAAc,EAAE,CAAC;CAC3C;AAED;;;;;;;;;;;;;;;;;;;;GAoBG;AACH,wBAAsB,aAAa,CACjC,GAAG,EAAE,MAAM,EACX,IAAI,GAAE,oBAAyB,GAC9B,OAAO,CAAC,SAAS,SAAS,EAAE,CAAC,CAoB/B;AAED;;;;;;;;;;;;;;;;;;;;;;;;;GAyBG;AACH,wBAAsB,cAAc,CAClC,GAAG,EAAE,MAAM,EACX,IAAI,GAAE,oBAAyB,GAC9B,OAAO,CAAC,UAAU,CAAC,CASrB"}
|
|
@@ -0,0 +1,106 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* skillsFromDirRoutes — the `routes:` half of the on-disk runbook grammar.
|
|
3
|
+
*
|
|
4
|
+
* ## What a file may say about routing, and why it is this little
|
|
5
|
+
*
|
|
6
|
+
* `skillsFromDir` reads prose, `tools:` and `steps:` — everything about ONE
|
|
7
|
+
* skill — and stopped exactly where the value was supposed to start: the
|
|
8
|
+
* routing. A directory of runbooks still had to be hand-wired into a graph in
|
|
9
|
+
* code, which is the work the graph exists to remove.
|
|
10
|
+
*
|
|
11
|
+
* This module adds the missing key under the SAME security law the tools list
|
|
12
|
+
* follows: **the file PICKS, it never DEFINES.**
|
|
13
|
+
*
|
|
14
|
+
* ---
|
|
15
|
+
* name: billing
|
|
16
|
+
* tools: lookup_order, issue_refund
|
|
17
|
+
* routes:
|
|
18
|
+
* - escalation: on issue_refund status=denied
|
|
19
|
+
* - receipts: on issue_refund
|
|
20
|
+
* - audit
|
|
21
|
+
* ---
|
|
22
|
+
*
|
|
23
|
+
* A route names a SKILL ID and, optionally, a guard. Both halves are picks:
|
|
24
|
+
*
|
|
25
|
+
* • the id is resolved against the skills THIS DIRECTORY declares — an id
|
|
26
|
+
* nothing here declares is refused at load, by name, listing what is
|
|
27
|
+
* available. Never a half-graph: one bad id fails the whole load, because
|
|
28
|
+
* a graph missing one edge routes silently wrong, which is worse than a
|
|
29
|
+
* graph that refuses to exist;
|
|
30
|
+
* • the guard is one of the two DATA conditions a route already has
|
|
31
|
+
* (`onToolReturn`, `onToolStatus`), and the tool it names must be one of
|
|
32
|
+
* this file's own `tools:` — the same law `steps:` follows, for the same
|
|
33
|
+
* reason (an edge out of this skill fires on this skill's work).
|
|
34
|
+
*
|
|
35
|
+
* Nothing is evaluated, imported or resolved as a path. The strings can only
|
|
36
|
+
* MATCH — against ids the loader already read off disk and against a closed
|
|
37
|
+
* status vocabulary.
|
|
38
|
+
*
|
|
39
|
+
* ## What a file CANNOT express, said plainly
|
|
40
|
+
*
|
|
41
|
+
* A `when:` predicate is CODE. There is no honest way for a markdown file to
|
|
42
|
+
* carry it: reading one would mean evaluating a string, which is the one thing
|
|
43
|
+
* this loader exists never to do. So the grammar has no `when` and no
|
|
44
|
+
* expression language of any kind — a conditional a file cannot express is a
|
|
45
|
+
* conditional that stays in code:
|
|
46
|
+
*
|
|
47
|
+
* skillGraph({ skills, steps: [{ from: 'billing', to: 'escalation',
|
|
48
|
+
* when: r => JSON.parse(r.result).tier > 2 }] });
|
|
49
|
+
*
|
|
50
|
+
* Anything that is not one of the three forms is refused with the whole grammar
|
|
51
|
+
* quoted, rather than half-understood by a parser inventing a mini-language.
|
|
52
|
+
*
|
|
53
|
+
* Zone: HOST (it belongs to the file loader). Pure over strings all the same —
|
|
54
|
+
* it reads no filesystem; `skillsFromDir.ts` hands it the parsed lines.
|
|
55
|
+
*/
|
|
56
|
+
import type { SkillGraphStep } from './skillGraph.js';
|
|
57
|
+
import { type ToolResultStatus } from './toolOutcome.js';
|
|
58
|
+
/**
|
|
59
|
+
* One frontmatter list item, structurally — `skillsFromDir`'s module-private
|
|
60
|
+
* `ListItem` satisfies it unchanged, so the two never import each other.
|
|
61
|
+
*/
|
|
62
|
+
export interface RouteItem {
|
|
63
|
+
/** Text before the first `:` — the target skill id. */
|
|
64
|
+
readonly key: string;
|
|
65
|
+
/** Text after the first `:` — the guard. Undefined when the item has none. */
|
|
66
|
+
readonly value?: string;
|
|
67
|
+
/** 1-based line number in the file. Every refusal quotes it. */
|
|
68
|
+
readonly line: number;
|
|
69
|
+
}
|
|
70
|
+
/** One route as the FILE declared it: a target id and a parsed guard. The id is
|
|
71
|
+
* still unresolved here — a file cannot know what the rest of the directory
|
|
72
|
+
* carries, so that refusal waits for {@link toGraphSteps}. */
|
|
73
|
+
export interface DeclaredRoute {
|
|
74
|
+
readonly to: string;
|
|
75
|
+
readonly onToolReturn?: string;
|
|
76
|
+
readonly onToolStatus?: readonly ToolResultStatus[];
|
|
77
|
+
readonly line: number;
|
|
78
|
+
}
|
|
79
|
+
/**
|
|
80
|
+
* Read one file's `routes:` items into declared routes, refusing every shape
|
|
81
|
+
* the grammar does not carry. Pure; every message names the file and the line,
|
|
82
|
+
* because "malformed routes" over a directory of forty runbooks has told the
|
|
83
|
+
* author nothing.
|
|
84
|
+
*
|
|
85
|
+
* @param items the `routes:` block-list items, in file order.
|
|
86
|
+
* @param file the path, quoted by every refusal.
|
|
87
|
+
* @param toolNames this file's own `tools:` — a guard may only name one of
|
|
88
|
+
* them (undefined when the file declared no tools at all).
|
|
89
|
+
*/
|
|
90
|
+
export declare function readDeclaredRoutes(items: readonly RouteItem[], file: string, toolNames: readonly string[] | undefined): readonly DeclaredRoute[];
|
|
91
|
+
/**
|
|
92
|
+
* Resolve one file's declared routes into graph steps, refusing an id no
|
|
93
|
+
* SKILL.md in the directory declares.
|
|
94
|
+
*
|
|
95
|
+
* The refusal lists what IS available and fails the whole load. A route to a
|
|
96
|
+
* name nothing declares is the one mistake that cannot be reported later: the
|
|
97
|
+
* loader would return a skill set the graph then wires with a missing edge, and
|
|
98
|
+
* a graph that silently does not route is exactly the failure the check-up
|
|
99
|
+
* exists to prevent. Half a graph is not a smaller version of the graph.
|
|
100
|
+
*
|
|
101
|
+
* @param from the id of the skill whose file declared these routes.
|
|
102
|
+
* @param file that skill's path, quoted by the refusal.
|
|
103
|
+
* @param known every skill id the directory declared.
|
|
104
|
+
*/
|
|
105
|
+
export declare function toGraphSteps(from: string, routes: readonly DeclaredRoute[], file: string, known: ReadonlySet<string>): readonly SkillGraphStep[];
|
|
106
|
+
//# sourceMappingURL=skillsFromDirRoutes.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"skillsFromDirRoutes.d.ts","sourceRoot":"","sources":["../../../../src/lib/injection-engine/skillsFromDirRoutes.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAsDG;AAEH,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,iBAAiB,CAAC;AACtD,OAAO,EAAwB,KAAK,gBAAgB,EAAE,MAAM,kBAAkB,CAAC;AAE/E;;;GAGG;AACH,MAAM,WAAW,SAAS;IACxB,uDAAuD;IACvD,QAAQ,CAAC,GAAG,EAAE,MAAM,CAAC;IACrB,8EAA8E;IAC9E,QAAQ,CAAC,KAAK,CAAC,EAAE,MAAM,CAAC;IACxB,gEAAgE;IAChE,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;CACvB;AAED;;+DAE+D;AAC/D,MAAM,WAAW,aAAa;IAC5B,QAAQ,CAAC,EAAE,EAAE,MAAM,CAAC;IACpB,QAAQ,CAAC,YAAY,CAAC,EAAE,MAAM,CAAC;IAC/B,QAAQ,CAAC,YAAY,CAAC,EAAE,SAAS,gBAAgB,EAAE,CAAC;IACpD,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;CACvB;AAeD;;;;;;;;;;GAUG;AACH,wBAAgB,kBAAkB,CAChC,KAAK,EAAE,SAAS,SAAS,EAAE,EAC3B,IAAI,EAAE,MAAM,EACZ,SAAS,EAAE,SAAS,MAAM,EAAE,GAAG,SAAS,GACvC,SAAS,aAAa,EAAE,CA4E1B;AAED;;;;;;;;;;;;;GAaG;AACH,wBAAgB,YAAY,CAC1B,IAAI,EAAE,MAAM,EACZ,MAAM,EAAE,SAAS,aAAa,EAAE,EAChC,IAAI,EAAE,MAAM,EACZ,KAAK,EAAE,WAAW,CAAC,MAAM,CAAC,GACzB,SAAS,cAAc,EAAE,CAmB3B"}
|
|
@@ -0,0 +1,92 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* startRuleClaim — WHO CLAIMS A PHRASE. The one place that answers it.
|
|
3
|
+
*
|
|
4
|
+
* Two check-ups ask the same question of a graph's start rules and want
|
|
5
|
+
* opposite answers:
|
|
6
|
+
*
|
|
7
|
+
* • `skillExamples.ts` declares a phrase and asserts THIS rule claims it;
|
|
8
|
+
* • `skillNeverRoutes.ts` declares a phrase and asserts NO rule claims it.
|
|
9
|
+
*
|
|
10
|
+
* The question underneath is identical — run the compiled conditions over one
|
|
11
|
+
* concrete phrase, on the context a turn's first iteration really hands a start
|
|
12
|
+
* rule, and see who says yes. Two copies of that would drift the moment one of
|
|
13
|
+
* them learned something about the router the other did not, and the two would
|
|
14
|
+
* then disagree about the same graph. So it lives here, once, and the modules
|
|
15
|
+
* that report keep only their own sentences.
|
|
16
|
+
*
|
|
17
|
+
* Nothing here decides SEVERITY or writes a message — that is the reporting
|
|
18
|
+
* module's job, because the same "no" means different things to a positive and
|
|
19
|
+
* a negative assertion. This module only runs predicates and names conditions.
|
|
20
|
+
*
|
|
21
|
+
* Zone: PURE CORE (no engine, no loop). Pinned by
|
|
22
|
+
* `test/lib/injection-engine/skill-graph-fence.test.ts`.
|
|
23
|
+
*/
|
|
24
|
+
import type { InjectionContext } from './types.js';
|
|
25
|
+
import { type SkillMatchData } from './skillMatch.js';
|
|
26
|
+
/**
|
|
27
|
+
* The slice of an entry declaration a claim question reads — structural, so
|
|
28
|
+
* `skillGraph.ts`'s module-private `EntryDecl` satisfies it unchanged (the same
|
|
29
|
+
* trick `skillIntent.ts` uses).
|
|
30
|
+
*/
|
|
31
|
+
export interface StartRuleDecl {
|
|
32
|
+
readonly id: string;
|
|
33
|
+
/** The compiled condition (from `match:`) or the author's `when`. Absent on
|
|
34
|
+
* an unconditional entry and on an intent rule (no sync predicate). */
|
|
35
|
+
readonly when?: (ctx: InjectionContext) => boolean;
|
|
36
|
+
/** The serializable matcher behind `when`, when declared as data — quoted
|
|
37
|
+
* back in the messages, and the one way to spot the intent arm. */
|
|
38
|
+
readonly match?: SkillMatchData;
|
|
39
|
+
}
|
|
40
|
+
/**
|
|
41
|
+
* Run one entry's condition over one phrase, on a COLD-START context — the
|
|
42
|
+
* context a turn's first iteration really hands a start rule: iteration 1, the
|
|
43
|
+
* phrase as `userMessage`, no history, no cursor, no tool results. A throw is
|
|
44
|
+
* reported as `'threw'` and treated as a no-match by every caller, which is
|
|
45
|
+
* exactly what the cursor resolver does with it at run time (so a claim made
|
|
46
|
+
* here stays true of the run).
|
|
47
|
+
*
|
|
48
|
+
* An entry with NO condition matches everything: that is the cold walk's law
|
|
49
|
+
* (`if (!e.when) return { to: e.id }`), not a shortcut.
|
|
50
|
+
*/
|
|
51
|
+
export declare function runsOn(entry: StartRuleDecl, phrase: string): 'match' | 'no-match' | 'threw';
|
|
52
|
+
/** The one context every predicate in a phrase check is judged on. */
|
|
53
|
+
export declare function coldContext(userMessage: string): InjectionContext;
|
|
54
|
+
/** The one context every predicate here is judged on, spelled out for the
|
|
55
|
+
* reader of a message — a check that names its own inputs can be argued with;
|
|
56
|
+
* one that hides them can only be guessed at. Kept as ONE string so every
|
|
57
|
+
* message describes the SAME context {@link coldContext} really builds. */
|
|
58
|
+
export declare const COLD_CONTEXT_PHRASE: string;
|
|
59
|
+
/** One claimant of a phrase: the entry, and its position in declaration order. */
|
|
60
|
+
export interface Claim {
|
|
61
|
+
readonly entry: StartRuleDecl;
|
|
62
|
+
readonly index: number;
|
|
63
|
+
}
|
|
64
|
+
/** How a rule's condition is named in a message: the data matcher quoted back,
|
|
65
|
+
* the honest word for opaque code — or, for an entry that declares neither,
|
|
66
|
+
* what having no condition MEANS. Naming a `when` predicate an unconditional
|
|
67
|
+
* entry does not have is how a report describes a graph nobody wrote. */
|
|
68
|
+
export declare function describeCondition(entry: StartRuleDecl): string;
|
|
69
|
+
/**
|
|
70
|
+
* The two claimant sets, mirroring the TWO start laws (see `skillExamples.ts`'s
|
|
71
|
+
* header for the whole statement) rather than re-inventing either:
|
|
72
|
+
*
|
|
73
|
+
* • COLD WALK (`makeResolveCursor`, the default mount): every non-intent
|
|
74
|
+
* entry, unconditional ones included — they claim everything from their
|
|
75
|
+
* position onward.
|
|
76
|
+
* • CASCADE tier 1 (`firstRuleMatch`, mounted by `.classify()` OR by
|
|
77
|
+
* `continuity: 'conversation'`): the CONDITIONAL non-intent entries only —
|
|
78
|
+
* an unconditional entry is a default, not a rule.
|
|
79
|
+
*
|
|
80
|
+
* Intent entries appear in NEITHER: they compile to no sync predicate at all,
|
|
81
|
+
* and the classifier judges them at run time with a scorer this pass does not
|
|
82
|
+
* run.
|
|
83
|
+
*/
|
|
84
|
+
export interface ClaimLaws {
|
|
85
|
+
/** First claimant under the declaration-order cold walk, or undefined. */
|
|
86
|
+
readonly underColdWalk: (phrase: string) => Claim | undefined;
|
|
87
|
+
/** First claimant under the turn-start cascade's tier 1, or undefined. */
|
|
88
|
+
readonly underCascade: (phrase: string) => Claim | undefined;
|
|
89
|
+
}
|
|
90
|
+
/** Build both laws' claim finders over one entry list, in declaration order. */
|
|
91
|
+
export declare function claimLaws(entries: readonly StartRuleDecl[]): ClaimLaws;
|
|
92
|
+
//# sourceMappingURL=startRuleClaim.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"startRuleClaim.d.ts","sourceRoot":"","sources":["../../../../src/lib/injection-engine/startRuleClaim.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;GAsBG;AAEH,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,YAAY,CAAC;AACnD,OAAO,EAAqB,KAAK,cAAc,EAAE,MAAM,iBAAiB,CAAC;AAEzE;;;;GAIG;AACH,MAAM,WAAW,aAAa;IAC5B,QAAQ,CAAC,EAAE,EAAE,MAAM,CAAC;IACpB;4EACwE;IACxE,QAAQ,CAAC,IAAI,CAAC,EAAE,CAAC,GAAG,EAAE,gBAAgB,KAAK,OAAO,CAAC;IACnD;wEACoE;IACpE,QAAQ,CAAC,KAAK,CAAC,EAAE,cAAc,CAAC;CACjC;AAED;;;;;;;;;;GAUG;AACH,wBAAgB,MAAM,CAAC,KAAK,EAAE,aAAa,EAAE,MAAM,EAAE,MAAM,GAAG,OAAO,GAAG,UAAU,GAAG,OAAO,CAO3F;AAED,sEAAsE;AACtE,wBAAgB,WAAW,CAAC,WAAW,EAAE,MAAM,GAAG,gBAAgB,CAEjE;AAED;;;4EAG4E;AAC5E,eAAO,MAAM,mBAAmB,QAEO,CAAC;AAExC,kFAAkF;AAClF,MAAM,WAAW,KAAK;IACpB,QAAQ,CAAC,KAAK,EAAE,aAAa,CAAC;IAC9B,QAAQ,CAAC,KAAK,EAAE,MAAM,CAAC;CACxB;AAED;;;0EAG0E;AAC1E,wBAAgB,iBAAiB,CAAC,KAAK,EAAE,aAAa,GAAG,MAAM,CAK9D;AAED;;;;;;;;;;;;;;GAcG;AACH,MAAM,WAAW,SAAS;IACxB,0EAA0E;IAC1E,QAAQ,CAAC,aAAa,EAAE,CAAC,M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