agentfootprint 9.40.0 → 9.43.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 +4 -1
- package/ai-instructions/claude-code/SKILL.md +31 -1
- package/dist/adapters/hosting/agentcore.js +71 -10
- 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/adapters/memory/agentcore.js +3 -1
- package/dist/adapters/memory/agentcore.js.map +1 -1
- package/dist/artifacts/conformance/cases.js +840 -0
- package/dist/artifacts/conformance/cases.js.map +1 -0
- package/dist/artifacts/conformance/index.js +18 -0
- package/dist/artifacts/conformance/index.js.map +1 -0
- package/dist/artifacts/conformance/run.js +223 -0
- package/dist/artifacts/conformance/run.js.map +1 -0
- package/dist/artifacts/conformance/types.js +11 -0
- package/dist/artifacts/conformance/types.js.map +1 -0
- package/dist/artifacts/index.js +10 -1
- package/dist/artifacts/index.js.map +1 -1
- package/dist/core/Agent.js +100 -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/runManifest.js +102 -0
- package/dist/core/agent/runManifest.js.map +1 -0
- 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/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 +71 -10
- 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/adapters/memory/agentcore.js +3 -1
- package/dist/esm/adapters/memory/agentcore.js.map +1 -1
- package/dist/esm/artifacts/conformance/cases.d.ts +23 -0
- package/dist/esm/artifacts/conformance/cases.js +837 -0
- package/dist/esm/artifacts/conformance/cases.js.map +1 -0
- package/dist/esm/artifacts/conformance/index.d.ts +11 -0
- package/dist/esm/artifacts/conformance/index.js +11 -0
- package/dist/esm/artifacts/conformance/index.js.map +1 -0
- package/dist/esm/artifacts/conformance/run.d.ts +47 -0
- package/dist/esm/artifacts/conformance/run.js +217 -0
- package/dist/esm/artifacts/conformance/run.js.map +1 -0
- package/dist/esm/artifacts/conformance/types.d.ts +197 -0
- package/dist/esm/artifacts/conformance/types.js +10 -0
- package/dist/esm/artifacts/conformance/types.js.map +1 -0
- package/dist/esm/artifacts/index.d.ts +1 -0
- package/dist/esm/artifacts/index.js +5 -0
- package/dist/esm/artifacts/index.js.map +1 -1
- package/dist/esm/core/Agent.d.ts +34 -1
- package/dist/esm/core/Agent.js +100 -1
- 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/runManifest.d.ts +80 -0
- package/dist/esm/core/agent/runManifest.js +98 -0
- package/dist/esm/core/agent/runManifest.js.map +1 -0
- 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/debug.d.ts +1 -0
- package/dist/esm/debug.js +7 -0
- package/dist/esm/debug.js.map +1 -1
- package/dist/esm/events/payloads.d.ts +205 -0
- package/dist/esm/events/registry.d.ts +7 -1
- package/dist/esm/events/registry.js +6 -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 +88 -2
- 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 +2 -0
- package/dist/esm/index.js +25 -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/esm/memory/define.js +12 -0
- package/dist/esm/memory/define.js.map +1 -1
- package/dist/esm/memory/define.types.d.ts +27 -0
- package/dist/esm/memory/define.types.js.map +1 -1
- package/dist/esm/strategies/attach.js.map +1 -1
- package/dist/events/registry.js +6 -0
- package/dist/events/registry.js.map +1 -1
- package/dist/hosting/conformance/cases.js +88 -2
- 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 +78 -38
- 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/memory/define.js +12 -0
- package/dist/memory/define.js.map +1 -1
- package/dist/memory/define.types.js.map +1 -1
- package/dist/strategies/attach.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/adapters/memory/agentcore.d.ts.map +1 -1
- package/dist/types/artifacts/conformance/cases.d.ts +24 -0
- package/dist/types/artifacts/conformance/cases.d.ts.map +1 -0
- package/dist/types/artifacts/conformance/index.d.ts +12 -0
- package/dist/types/artifacts/conformance/index.d.ts.map +1 -0
- package/dist/types/artifacts/conformance/run.d.ts +48 -0
- package/dist/types/artifacts/conformance/run.d.ts.map +1 -0
- package/dist/types/artifacts/conformance/types.d.ts +198 -0
- package/dist/types/artifacts/conformance/types.d.ts.map +1 -0
- package/dist/types/artifacts/index.d.ts +1 -0
- package/dist/types/artifacts/index.d.ts.map +1 -1
- package/dist/types/core/Agent.d.ts +34 -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/runManifest.d.ts +81 -0
- package/dist/types/core/agent/runManifest.d.ts.map +1 -0
- 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/debug.d.ts +1 -0
- package/dist/types/debug.d.ts.map +1 -1
- package/dist/types/events/payloads.d.ts +205 -0
- package/dist/types/events/payloads.d.ts.map +1 -1
- package/dist/types/events/registry.d.ts +7 -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 +2 -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/dist/types/memory/define.d.ts.map +1 -1
- package/dist/types/memory/define.types.d.ts +27 -0
- package/dist/types/memory/define.types.d.ts.map +1 -1
- package/package.json +1 -1
package/AGENTS.md
CHANGED
|
@@ -475,7 +475,36 @@ Resilience decorators live on the `agentfootprint/resilience` subpath
|
|
|
475
475
|
(not the main barrel). Each preserves the `LLMProvider` interface and
|
|
476
476
|
stacks freely.
|
|
477
477
|
|
|
478
|
-
###
|
|
478
|
+
### Result primitives — an absence that names itself, a limit that travels
|
|
479
|
+
|
|
480
|
+
```typescript
|
|
481
|
+
import { absent, coverage } from 'agentfootprint';
|
|
482
|
+
|
|
483
|
+
// A tool that found nothing, in a shape no model can read as "I could not look".
|
|
484
|
+
return absent({
|
|
485
|
+
what: `FLOGI entries on ${port}`,
|
|
486
|
+
checked: [`${sw}: the live fcns database`, 'window: the last 24h'],
|
|
487
|
+
cannotCover: [{ what: 'the peer fabric', why: 'this collector is scoped to one fabric' }],
|
|
488
|
+
tryInstead: 'Ask for a different interface, or query the peer fabric by name.',
|
|
489
|
+
});
|
|
490
|
+
|
|
491
|
+
// A verdict with its own boundary attached.
|
|
492
|
+
return coverage(verdict, {
|
|
493
|
+
checked: ['SRDF pair state on all 4 arrays'],
|
|
494
|
+
notChecked: [{ what: 'NDM migration sessions', why: 'the API timed out' }],
|
|
495
|
+
cannotCover: [{ what: 'host-side multipathing', why: 'no collector on the ESX hosts' }],
|
|
496
|
+
});
|
|
497
|
+
```
|
|
498
|
+
|
|
499
|
+
An absence carries the delivered status `'absent'` (routable by `onToolStatus`),
|
|
500
|
+
files `agentfootprint.tools.absent`, and grounds only its coverage in the
|
|
501
|
+
evidence gate. It is never an error — nothing retries or refuses it. A ledger
|
|
502
|
+
files `agentfootprint.tools.coverage_declared`; with
|
|
503
|
+
`.limitsTravelWithTheAnswer()` the framework appends the run's declared limits
|
|
504
|
+
to the final answer, which is how a limit survives a model that would rather not
|
|
505
|
+
mention it.
|
|
506
|
+
|
|
507
|
+
### Observability — 96 typed events across 21 domains
|
|
479
508
|
|
|
480
509
|
```typescript
|
|
481
510
|
agent.on('agentfootprint.context.injected', (e) =>
|
package/CLAUDE.md
CHANGED
|
@@ -10,6 +10,7 @@ Entry points — THIRTEEN doors, and `package.json` `exports` is exhaustive, so
|
|
|
10
10
|
|---|---|
|
|
11
11
|
| core/ | primitives: Agent.ts (ReAct runner), LLMCall.ts, RunnerBase.ts (dispatcher + attach + enable.*), tools.ts (defineTool), pause.ts, runCheckpoint.ts |
|
|
12
12
|
| core/agent/evidence/ | (9.35.0) the evidence gate — `.namesAndNumbersFromEvidence()`. Pure + deterministic BY LAW (no model, no embedding: a guard that needed a bigger model to police a smaller one inverts the library's thesis). normalize (one spelling per value, both sides) → extract (which tokens are DATA — conservative, justified clause by clause) → evidenceIndex (STRUCTURAL walk of `role:'tool'` results; the exempt corpus is user message + user/system turns + `systemPromptInjections`, MINUS the library's own frames — see frames.ts, the laundering bug) → gate (resolve/judge/sentences) → errors (`UnsupportedValuesError`). Fabrication detector, NOT a correctness judge: a false claim built from real values passes |
|
|
13
|
+
| core/agent/coverage/ | the two FIELD-INVENTED result primitives. `absent()` = an absence that names its own coverage (checked / not checked / cannot cover) and says a retry returns the same; `coverage(result, …)` = the ledger of what a clean verdict does NOT rule out. Both RECOGNIZED (reserved `af_absent`/`af_coverage` keys, the effects-envelope strictness law), not conventions. Pure; the moving parts are `declareCoverage` in stages/toolCalls.ts, the whitelist in evidence/evidenceIndex.ts, and `prepareFinalWithLimitsStage` |
|
|
13
14
|
| core/agent/ | chart assembly: buildAgentChart / buildDynamicAgentChart (picked by reactMode, Agent.ts:1145-1147), buildToolRegistry, stages/ (seed, callLLM, route, toolCalls, prepareFinal, breakFinal, reliabilityExecution), window/ (the `.window()` strategy family), middleware/ (the `.toolMiddleware()` / `.messageMiddleware()` chains — outcomes are a CLOSED union with no `result` arm; three call sites walk it via runChain.ts: toolCalls dispatch, seed `'input'`, route `'output'`, plus mcpServe) |
|
|
14
15
|
| core/slots/ | the 3 context-slot subflow builders + thinking subflow — intentionally NOT exported |
|
|
15
16
|
| core-flow/ | Sequence/Parallel/Conditional/Loop — RunnerBase subclasses with own charts |
|
|
@@ -62,6 +63,7 @@ Traps: `src/observability/` holds the finder IMPLEMENTATIONS (canonical home; `d
|
|
|
62
63
|
- **Code staging-in (9.26.0)**: `CodeSession.stageInputs?(inputs) → StagedCodeInput[]` — OPTIONAL, feature-detected via `canStageCodeInputs`, and its contract is TWO promises: the payloads are readable at the returned paths, AND every later `execute` exposes the manifest as `STAGED_INPUTS_ENV` (`AF_STAGED_INPUTS`, `name → path`). `CodeInput.name` is the MANIFEST KEY (the wants arg name, so a static description can name it) and `fileName` is the on-disk name — separate fields so the two cannot drift. `codeRunnerTool({ wants })` composes the schema properties + the description clause and refuses BY NAME on a non-staging runner. Implemented by localCodeRunner only.
|
|
63
64
|
- **Repeated-call nudge (9.26.0)**: `core/agent/repeatedCall.ts` (pure `noteRepeatedCall` + `repeatedCallLedgers()`) + the ONE batch-loop hook in toolCalls. Fingerprints (FNV-1a) of stable-stringified args and the tool's OWN delivered result — never values. **The counters are NOT tracked state**: they live in a bounded run-keyed map held by `buildToolCallsHandler` and keyed by `deps.currentRun().runId`, so a turn that repeats nothing is byte-identical in state, commit log, narrative and recordings (a scope key would have changed all four for every agent that merely upgraded); the repeat itself rides `agentfootprint.tools.repeated_call`, the emit channel per-attempt facts belong on. A resume mints a new runId ⇒ counting restarts. Fires at the SECOND identical landing, once. `AgentOptions.repeatedCallNudge: false` disables (threaded value-conditionally; ON is the default). Deliberately NOT applied on the pause-resume dispatch paths.
|
|
64
65
|
- **Evidence gate (9.35.0)** — `.namesAndNumbersFromEvidence({ posture, shapes, exempt, minDigits })`: every name/number in the final answer must appear in a `role:'tool'` result. Postures reuse the routing VOCABULARY (`assist`|`guard`|`rails`) as a SEPARATE option — routing authority ≠ evidence discipline, and overloading `skillGraphCascade.strictness` would deny "strict routing, loose evidence". Wiring is the stepNudge blast radius verbatim: `ResolvedEvidenceGate` (builder-resolved, refusals at the CALL SITE) → Agent ctor trailing param → `buildRouteDeciderStage`'s 4th arg (`judgeEvidence` runs LAST of the three judges — schema > steps > evidence — and NOT on a denied or schema-exhausted answer) → `evidenceRecheckStage` branch (`{loopTo}`, mounted only for a revising posture) → `STAGE_IDS.EVIDENCE_RECHECK` + BOUNDARY_LOCAL_IDS + milestoneFor. TWO deps flags, and the second is the one a reader misses: `evidenceRecheckStage` (branch) AND `hasEvidenceGate` (bubbles `systemPromptInjections` out of sf-llm-call in the GROUPED chart — without it the gate flags the app's own prompt). Per-check facts ride `agentfootprint.agent.evidence_checked` (emit channel); only the terminal verdict is committed (`unsupportedValues`), because the boundary raises off it. `UnsupportedValuesError` joins the TERMINAL-typed-error list in `run()`'s catch (a verdict is not a crash — no retry handle for a wall).
|
|
66
|
+
- **Coverage primitives (this release)** — `absent()` / `coverage()`, both copied from FIELD USE. THE argument is the direction of the error: a *nothing-found* misread as an *outage* costs an investigation, an *outage* misread as *nothing-found* declares a system healthy that was never checked — so the two must not share a shape. Blast radius, and it is the `resultCeiling` radius verbatim: `readCoverageResult` called by `declareCoverage` at BOTH execute boundaries in toolCalls.ts (batch loop + `resolveCredentialAndExecute`), on the UNWRAPPED content and BEFORE the ceiling. FOUR downstream changes and no more: (1) `ToolResultStatus` gained a SEVENTH word `'absent'` — routable by `onToolStatus`, because folding it into `'failure'` is the confusion itself and into `'success'` leaves nothing to route on; (2) two events (`tools.absent`, `tools.coverage_declared`); (3) tracked `AgentState.coverageDeclared` — a limit is a fact about the ANSWER, not about an attempt, which is why it is state and the repeated-call counters are not; (4) the evidence corpus indexes an absence's COVERAGE ONLY (`coverage/evidence.ts` — a failed lookup is the cheapest laundering machine, and `absent()` would have made it cheaper: this is frames.ts's argument on the tool side). Deliberately UNCHANGED: no `error: true`, no retry, no refusal, no gate flag. Survival into the answer is `.limitsTravelWithTheAnswer()` → `attachCoverageLimits` dep → BOTH builders swap the final branch's first stage for `prepareFinalWithLimitsStage` (same id, same position). It APPENDS rather than judges: a check for "did the model state its limits?" needs a second model to decide what counts, which is what evidence/README.md forbids.
|
|
65
67
|
- **Closed seams**: Agent chart internals (AgentChartDeps not exported — extend via injections/tools/memory/thinking, never by adding a ReAct stage); ContextSlot (3 slots fixed); ProviderKind factory; dormant ports with no consumer (ContextSourceAdapter, EmbeddingProvider, RiskDetector — adapters/types.ts only); reserved tool names under selfExplain — 8.16.0 made the list DERIVED: `TRACE_TOOL_NAMES` (traceToolpack.ts, 10 names since 8.17.0: run_overview/find_in_trace/trace_node/trace_slice/backtrack/who_wrote/get_value/inspect_tool_call/inspect_tool_run/read_narrative) is what AgentBuilder.ts:~1560 reserves in inline mode (`explain_run` in delegate mode), so a NEW toolpack tool joins ONE list and the reservation follows — but it must ALSO join the lazy template's mounted set (lazyToolpack builds over `{narrative: [], events: []}` so the catalog shape is fixed at build time) and the count assertion in test/lib/trace-toolpack/selfExplainAgent.test.ts. **8.17.0 `inspect_tool_run`** is the descent THROUGH the tool boundary: `flowchartAsTool({ keepRecord: true })` files each invocation's record in a bounded LRU store (lib/trace-toolpack/innerRunRecords.ts) keyed by the executing `ctx.toolCallId`, riding the `Tool` under the `INNER_RUN_RECORDS` registry symbol; `AgentBuilder.build()` → `collectInnerRuns(registry, injections)` → `SelfExplainSource.getInnerRuns` → `TraceToolpackArtifacts.innerRuns`. The inner views are the pack ITSELF re-run over `openRecording(record.recording)` — do not add a second query implementation. Provider-delivered tools are NOT collected (no build-time list); inner runtimeStageIds are a SEPARATE namespace and only `inspect_tool_run` accepts them.
|
|
66
68
|
|
|
67
69
|
## Change-impact map
|
|
@@ -71,7 +73,8 @@ Traps: `src/observability/` holds the finder IMPLEMENTATIONS (canonical home; `d
|
|
|
71
73
|
- **Embedder fingerprint** (8.9.0) → `Embedder.id` (optional; every shipped embedder sets one, and NONE include dims — the store appends `@<dims>` itself, so an id carrying its own size double-stamps) + `indexDocuments` defaulting `embedderId` to it + `SqliteVectorStore.reconcileFingerprint` (the only comparison site). Rule: dimensions ALWAYS decide, model ids decide only when BOTH sides named themselves — refusing on an absent name would block the majority of callers who never pass `embedderId`.
|
|
72
74
|
- **Retrieval record** (8.8.0) → FOUR stages write one object in sequence: `loadRelevant` (candidates+scores+threshold verdicts) → `pickByBudget` (re-marks admitted→over-budget/over-max-entries) → `formatDefault` (`promptFragment` + `promptPosition`) → the read mount's outputMapper lifts it to root as `retrievalEvidence_<id>`. `memoryRecallInjections` then splits ONE recall into one ActiveInjection PER CHUNK — guarded by a byte-equality check (`fragments.join('\n\n') === systemContent`) that falls back to the single injection rather than change the prompt. `rank` (score order) and `promptPosition` (picker order) are DIFFERENT and both load-bearing: joining fragments in rank order reproduces the right bytes in a sequence the model never saw.
|
|
73
75
|
- **AgentState** → all 8 stages/ files, both builders' mappers, memory-wire STRING-TYPED keys ('runIdentity'/'turnNumber'/… buildAgentChart.ts:177-180 — not refactor-safe), finalizeResult's `reliabilityFail*`/`policyHalt*` reads (rename silently kills the typed errors).
|
|
74
|
-
- **events/** →
|
|
76
|
+
- **events/** → 96 typed events across 21 domains (counts anti-drift-tested against this file — update BOTH when adding events): ALL_EVENT_TYPES exhaustiveness tests, DomainWildcard hand-list, ~42 importers (recorders, strategies, stream, commentary).
|
|
77
|
+
- **Run-configuration manifest (9.41.0)** → `agentfootprint.agent.run_configured`, the JOIN KEY that turns N runs into N labelled ARMS: one event naming the adapters/strategies in play (provider+model, reactMode, each memory's declared strategy/retrieval/embedder, window, graph posture+classifier, evidence posture, artifacts-present). Composed by the PURE `core/agent/runManifest.ts`, dispatched from `Agent.emitRunManifest()` at the END of `createExecutor` — the ONE funnel `run()` AND `resume()` share, both of which mint a fresh runId. Direct `dispatcher.dispatch` with a STATED pseudo-stage (`run-configured#0`), the `emitToolSessionReport` precedent — there is no stage yet, and `minimalMeta()` would make the one joinable-by-design event unjoinable. TWO laws, both tested: NAMES ONLY (a store is reported PRESENT and unnamed rather than identified by a directory/endpoint — `MemoryStore` and `ArtifactStore` declare no id), and ABSENT means "not configured", never a guessed `'default'`. Graph presence is read off `skillGraphNextSkill`, NOT `skillGraphCascade` (a 9.16-style mount sets no cascade and would read as "no graph"). `MemoryDefinition` gained `strategy`/`retrieval`/`embedderId` for it — declared names the compiled pipeline had closed over, the `store`-in-the-open precedent.
|
|
75
78
|
- **adapters/types.ts LLMMessage/LLMRequest** → 62 importers: tool_use round-trip (toolCalls.ts:115-135), wire assembly (callLLM.ts:150-160), providers, cache strategies, security/extractSequence, reliability loop.
|
|
76
79
|
- **Cache** → strategy registration is a MODULE SIDE EFFECT (src/index.ts:15-17); an entry point skipping that import silently falls back to NoOp. Resolved once per Agent at construction (Agent.ts:347).
|
|
77
80
|
- **Injection engine eval semantics** → Evaluate stage cursor keystone (buildInjectionEngineSubflow.ts:214-222), Route stage MIRRORS slot filters (keep in sync with buildSystemPromptSlot), read_skill gate (toolCalls.ts:747). The gate's allowed set is TWO kinds of id (8.4.0): a HOP (`deps.allowedSkillIds` = `graph.reachableSkills(cursor)` — activates AND moves the cursor) ∪ an OPEN skill (`deps.openSkillIds` = `Agent.openSkillIds()`, Agent.ts:1052 — a registered skill whose trigger is `llm-activated` AND that the graph declares no incoming edge to; activates, never moves the cursor). Both clauses are load-bearing: the trigger test is "read_skill can really activate this", the edge test keeps a bare model edge `.route(a,m)` from-gated. **8.5.0** extends the SAME trigger test three ways: a decision `tree()` returns `[]` from `reachableSkills` (leaves compile to `rule` triggers, so a pick could only be accepted then dropped — the gate refuses with a tree-specific message, `deps.skillGraphIsTree`, derived in AgentBuilder from `graph.nodes.some(kind==='predicate')`); `surfaceMode:'tool-only'` is refused at agent build for any skill whose trigger is not `llm-activated` (skillBodyDelivery.ts — the read_skill tool result is the only channel that mode has, and the graph never calls read_skill); and `read_skill`'s DESCRIPTION is rebuilt per iteration from `reachableSkills(cursor) ∪ open` (Agent.readSkillOfferFor → buildToolsSlot's `readSkillFor`). **The read_skill ENUM must stay the full catalog** — `toolArgValidation` defaults to `'enforce'` and runs at toolCalls.ts:570, BEFORE the gate at :765, and sets `error = true` which the gate skips; narrowing the enum silently retires the teaching refusal, `skill.rejected`, routeRecorder's rejection hops and the rejected-cap governor.
|
|
@@ -193,6 +193,36 @@ const calculator = defineTool({
|
|
|
193
193
|
});
|
|
194
194
|
```
|
|
195
195
|
|
|
196
|
+
### When a tool finds nothing, and what a clean result does not cover
|
|
197
|
+
|
|
198
|
+
```typescript
|
|
199
|
+
import { absent, coverage, defineTool } from 'agentfootprint';
|
|
200
|
+
|
|
201
|
+
// "I looked and there is nothing" — never readable as "I could not look".
|
|
202
|
+
execute: ({ port }) => rows.length ? rows : absent({
|
|
203
|
+
what: `FLOGI entries on ${port}`,
|
|
204
|
+
checked: ['shq-fab-a: the live fcns database', 'window: the last 24h'],
|
|
205
|
+
notChecked: [{ what: 'the archived history', why: 'older than the 24h window' }],
|
|
206
|
+
cannotCover: [{ what: 'the peer fabric', why: 'this collector is scoped to one fabric' }],
|
|
207
|
+
tryInstead: 'Ask for a different interface, or query the peer fabric by name.',
|
|
208
|
+
}),
|
|
209
|
+
|
|
210
|
+
// A verdict WITH its boundary — what "fine" does and does not rule out.
|
|
211
|
+
execute: async () => coverage(await checkReplication(), {
|
|
212
|
+
checked: ['SRDF pair state on all 4 arrays'],
|
|
213
|
+
cannotCover: [{ what: 'host-side multipathing', why: 'no collector on the ESX hosts' }],
|
|
214
|
+
}),
|
|
215
|
+
```
|
|
216
|
+
|
|
217
|
+
An absence gets the delivered status `'absent'` (route it with
|
|
218
|
+
`onToolStatus: 'absent'`), files `agentfootprint.tools.absent`, and grounds only
|
|
219
|
+
its COVERAGE in the evidence gate — so an id the model invented does not become
|
|
220
|
+
grounded by one lookup that found nothing. It is never an error: nothing retries
|
|
221
|
+
it, nothing refuses it, no `error: true`. A ledger files
|
|
222
|
+
`agentfootprint.tools.coverage_declared`; add `.limitsTravelWithTheAnswer()` on
|
|
223
|
+
the agent and the framework APPENDS the run's limits to the final answer, so the
|
|
224
|
+
model cannot drop what it never wrote.
|
|
225
|
+
|
|
196
226
|
## Observing a run
|
|
197
227
|
|
|
198
228
|
```typescript
|
|
@@ -205,7 +235,7 @@ const agent = Agent.create({ provider, model })
|
|
|
205
235
|
agent.on('agentfootprint.context.evaluated', (e) => console.log(e.payload.activeIds));
|
|
206
236
|
```
|
|
207
237
|
|
|
208
|
-
**
|
|
238
|
+
**96 typed events across 21 domains.** Two subscription shapes and no third:
|
|
209
239
|
`'*'` (every event) and `'agentfootprint.<domain>.*'` (one domain). **`'agentfootprint.*'`
|
|
210
240
|
is not a pattern** — TypeScript rejects it, and at runtime it would match nothing.
|
|
211
241
|
|
|
@@ -100,6 +100,7 @@ const artifactWire_js_1 = require("../../hosting/artifactWire.js");
|
|
|
100
100
|
const sessionWire_js_1 = require("../../hosting/sessionWire.js");
|
|
101
101
|
const envelope_js_1 = require("../../hosting/envelope.js");
|
|
102
102
|
const httpHost_js_1 = require("../../hosting/httpHost.js");
|
|
103
|
+
const types_js_1 = require("../../hosting/types.js");
|
|
103
104
|
const lazyRequire_js_1 = require("../../lib/lazyRequire.js");
|
|
104
105
|
// ─── The runtime host ────────────────────────────────────────────────
|
|
105
106
|
const HOST_NAME = 'agentCoreRuntimeHost';
|
|
@@ -468,6 +469,14 @@ exports.DEFAULT_SESSION_STORAGE_PATH = '/tmp/agentcore-session';
|
|
|
468
469
|
* refused by name too (`UnreadableEnvelopeError`), never answered with a fresh
|
|
469
470
|
* start. Only a session that was never written hydrates as `undefined`.
|
|
470
471
|
*
|
|
472
|
+
* **The two modes differ on retention (9.42.0), and the difference is
|
|
473
|
+
* reported rather than smoothed over.** `'session-storage'` owns its file, so
|
|
474
|
+
* it implements the port's optional `retention()` as a sweep you call.
|
|
475
|
+
* `'memory'` appends events to a service whose expiry belongs to the memory
|
|
476
|
+
* resource an operator configured, and this shim has no delete on its surface
|
|
477
|
+
* — so it implements no retention member at all, and `sessionRetention()`
|
|
478
|
+
* refuses BY NAME rather than reporting a sweep that would delete nothing.
|
|
479
|
+
*
|
|
471
480
|
* @example Survive a stop/resume, no AWS SDK required
|
|
472
481
|
* agentCoreSessions({ store: 'session-storage' });
|
|
473
482
|
*
|
|
@@ -480,6 +489,17 @@ function agentCoreSessions(options) {
|
|
|
480
489
|
exports.agentCoreSessions = agentCoreSessions;
|
|
481
490
|
function fileSessions(options) {
|
|
482
491
|
const path = options.path ?? exports.DEFAULT_SESSION_STORAGE_PATH;
|
|
492
|
+
/** Write the whole file the way `persist` does — one temp file, one rename. */
|
|
493
|
+
async function writeFileAtomically(next) {
|
|
494
|
+
const { writeFile, rename, mkdir } = await Promise.resolve().then(() => __importStar(require('node:fs/promises')));
|
|
495
|
+
const { dirname } = await Promise.resolve().then(() => __importStar(require('node:path')));
|
|
496
|
+
await mkdir(dirname(path), { recursive: true }).catch(() => undefined);
|
|
497
|
+
// Write-then-rename: a container killed mid-write leaves the previous
|
|
498
|
+
// conversations intact rather than a truncated file that refuses to parse.
|
|
499
|
+
const temporary = `${path}.${process.pid}.tmp`;
|
|
500
|
+
await writeFile(temporary, JSON.stringify(next), 'utf8');
|
|
501
|
+
await rename(temporary, path);
|
|
502
|
+
}
|
|
483
503
|
async function readFile() {
|
|
484
504
|
const { readFile: read } = await Promise.resolve().then(() => __importStar(require('node:fs/promises')));
|
|
485
505
|
let raw;
|
|
@@ -518,20 +538,61 @@ function fileSessions(options) {
|
|
|
518
538
|
return (0, envelope_js_1.checkEnvelope)(stored, sessionId);
|
|
519
539
|
},
|
|
520
540
|
async persist(sessionId, envelope) {
|
|
521
|
-
const { writeFile, rename, mkdir } = await Promise.resolve().then(() => __importStar(require('node:fs/promises')));
|
|
522
|
-
const { dirname } = await Promise.resolve().then(() => __importStar(require('node:path')));
|
|
523
541
|
const file = await readFile();
|
|
524
|
-
|
|
542
|
+
await writeFileAtomically({
|
|
525
543
|
version: 1,
|
|
526
544
|
sessions: { ...file.sessions, [sessionId]: envelope },
|
|
527
|
-
};
|
|
528
|
-
await mkdir(dirname(path), { recursive: true }).catch(() => undefined);
|
|
529
|
-
// Write-then-rename: a container killed mid-write leaves the previous
|
|
530
|
-
// conversation intact rather than a truncated file that refuses to parse.
|
|
531
|
-
const temporary = `${path}.${process.pid}.tmp`;
|
|
532
|
-
await writeFile(temporary, JSON.stringify(next), 'utf8');
|
|
533
|
-
await rename(temporary, path);
|
|
545
|
+
});
|
|
534
546
|
},
|
|
547
|
+
// ── Retention (9.42.0) ──────────────────────────────────────────────
|
|
548
|
+
//
|
|
549
|
+
// `'this-store'`: the conversations are one JSON file this container owns,
|
|
550
|
+
// and nothing else is going to trim it. Worth having even though the
|
|
551
|
+
// runtime reclaims a session's storage when the session ends — one file
|
|
552
|
+
// holds every session this container has seen, so a long-lived container
|
|
553
|
+
// accumulates conversations that ended hours ago, and `/tmp` filling up
|
|
554
|
+
// inside a container is a failure that arrives as something else entirely.
|
|
555
|
+
//
|
|
556
|
+
// The sibling `{ store: 'memory' }` mode implements NO retention member,
|
|
557
|
+
// and that absence is deliberate rather than unfinished: it appends events
|
|
558
|
+
// to a service whose expiry belongs to the memory resource an operator
|
|
559
|
+
// configured, and this shim's surface has no delete on it. Claiming a
|
|
560
|
+
// sweep it cannot perform, or a backend policy nobody here has verified,
|
|
561
|
+
// would be worse than the refusal an absent member produces.
|
|
562
|
+
retention: () => ({
|
|
563
|
+
deletedBy: 'this-store',
|
|
564
|
+
forgetOlderThan: async (before, sweepOptions) => {
|
|
565
|
+
const limit = Math.max(1, Math.floor(sweepOptions?.limit ?? types_js_1.DEFAULT_SWEEP_LIMIT));
|
|
566
|
+
const file = await readFile();
|
|
567
|
+
const kept = {};
|
|
568
|
+
let forgotten = 0;
|
|
569
|
+
let more = false;
|
|
570
|
+
for (const [sessionId, envelope] of Object.entries(file.sessions)) {
|
|
571
|
+
// A row this store cannot read the timestamp of is KEPT. A sweep
|
|
572
|
+
// deletes on evidence; "I could not tell how old this is" is not
|
|
573
|
+
// evidence, and the one mistake a retention job must not make is
|
|
574
|
+
// deleting a conversation it did not understand.
|
|
575
|
+
const savedAt = envelope?.savedAt;
|
|
576
|
+
const expired = typeof savedAt === 'number' && savedAt < before;
|
|
577
|
+
if (!expired) {
|
|
578
|
+
kept[sessionId] = envelope;
|
|
579
|
+
}
|
|
580
|
+
else if (forgotten >= limit) {
|
|
581
|
+
kept[sessionId] = envelope;
|
|
582
|
+
more = true;
|
|
583
|
+
}
|
|
584
|
+
else {
|
|
585
|
+
forgotten += 1;
|
|
586
|
+
}
|
|
587
|
+
}
|
|
588
|
+
// One write, and only when something actually goes: a sweep that found
|
|
589
|
+
// nothing must not rewrite the file every minute, because the rename
|
|
590
|
+
// is the moment a crash can cost a turn.
|
|
591
|
+
if (forgotten > 0)
|
|
592
|
+
await writeFileAtomically({ version: 1, sessions: kept });
|
|
593
|
+
return { forgotten, more };
|
|
594
|
+
},
|
|
595
|
+
}),
|
|
535
596
|
};
|
|
536
597
|
}
|
|
537
598
|
// ─── 'memory': one AgentCore Memory event per persist ────────────────
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"agentcore.js","sourceRoot":"","sources":["../../../src/adapters/hosting/agentcore.ts"],"names":[],"mappings":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AE;gBACrE,QAAQ;gBACR,OAAO;gBACP,SAAS;gBACT,eAAe,EAAE,IAAI;gBACrB,GAAG,CAAC,UAAU,KAAK,SAAS,IAAI,EAAE,UAAU,EAAE,CAAC;aAChD,CAAC,CAA+E,CAAC;YAClF,MAAM,MAAM,GAA4B,CAAC,MAAM,EAAE,MAAM,IAAI,EAAE,CAAC,CAAC,GAAG,CAAC,CAAC,KAAK,EAAE,EAAE,CAAC,CAAC;gBAC7E,OAAO,EAAE,KAAK,CAAC,OAAO,IAAI,EAAE;gBAC5B,QAAQ,EAAE,mBAAmB,CAAC,KAAK,CAAC,OAAO,CAAC;aAC7C,CAAC,CAAC,CAAC;YACJ,OAAO,EAAE,MAAM,EAAE,CAAC;QACpB,CAAC;KACF,CAAC;AACJ,CAAC"}
|
|
@@ -12,9 +12,9 @@
|
|
|
12
12
|
* containers, one conversation" answer Google has.
|
|
13
13
|
*
|
|
14
14
|
* ── The shape, said plainly ─────────────────────────────────────────────────
|
|
15
|
-
* One collection. One document per session.
|
|
15
|
+
* One collection. One document per session. Seven fields:
|
|
16
16
|
*
|
|
17
|
-
* sessionId · format · savedAt · envelope · owner · messageCount
|
|
17
|
+
* sessionId · format · savedAt · envelope · owner · messageCount · expiresAt
|
|
18
18
|
*
|
|
19
19
|
* That is the SQLite table, moved. It is deliberately the same shape, because
|
|
20
20
|
* the two stores implement the same port under the same laws, and a reader who
|
|
@@ -96,6 +96,45 @@
|
|
|
96
96
|
* in, and names those fields rather than restating the service's message — see
|
|
97
97
|
* {@link firestoreFailure} for why no Google text is ever echoed here.
|
|
98
98
|
*
|
|
99
|
+
* ── Retention: a SECOND timestamp, not a converted one (9.42.0) ─────────────
|
|
100
|
+
* A native Firestore TTL policy deletes a document when a field of type
|
|
101
|
+
* **Timestamp** is in the past. `savedAt` is a NUMBER — epoch milliseconds —
|
|
102
|
+
* so until this release an operator could not point a policy at this
|
|
103
|
+
* collection at all without a library change. The fix is a second field,
|
|
104
|
+
* `expiresAt`, written as a `Date` (the client stores one as a Timestamp) on
|
|
105
|
+
* every persist, holding `savedAt + expireAfterMs`. Give the store no
|
|
106
|
+
* `expireAfterMs` and the field is written as `null`, which a TTL policy
|
|
107
|
+
* ignores, and nothing about this release changes.
|
|
108
|
+
*
|
|
109
|
+
* **`savedAt` was NOT converted, and that is the load-bearing decision.** It is
|
|
110
|
+
* the ordering key of the composite index, the field the listing sorts by, and
|
|
111
|
+
* the first half of every cursor this store has ever minted (`<savedAt>:<docId>`,
|
|
112
|
+
* parsed with `parseFloat` and handed back to `startAfter` as a number).
|
|
113
|
+
* Converting it would have meant a new index, a new cursor grammar, and every
|
|
114
|
+
* pagination token issued by an earlier release becoming unreadable — but the
|
|
115
|
+
* decisive one is quieter: **Firestore's value ordering sorts by TYPE first.**
|
|
116
|
+
* Every number sorts before every timestamp. A collection holding old
|
|
117
|
+
* number-`savedAt` documents beside new timestamp-`savedAt` ones would list
|
|
118
|
+
* them in two blocks, all of one type then all of the other, with a person's
|
|
119
|
+
* conversations silently out of order by the type of the field rather than by
|
|
120
|
+
* when they were written. A second field costs one small write per turn and
|
|
121
|
+
* has no such shadow.
|
|
122
|
+
*
|
|
123
|
+
* So the migration consequence, plainly:
|
|
124
|
+
*
|
|
125
|
+
* • **Every document already stored stays readable and listable.** Nothing
|
|
126
|
+
* about `savedAt`, the index, the cursor or the query changed, and a
|
|
127
|
+
* document written by 9.33–9.41 is read by this release unchanged.
|
|
128
|
+
* • **Old documents do not start expiring.** They carry no `expiresAt`, and
|
|
129
|
+
* a TTL policy ignores a document whose field is missing. A conversation
|
|
130
|
+
* that is still being used gains one on its next turn; a conversation
|
|
131
|
+
* nobody ever writes to again keeps living. If those matter, delete them
|
|
132
|
+
* by hand once (a query on `savedAt` plus `forget`, or a `gcloud`
|
|
133
|
+
* bulk-delete) — this adapter will not walk your collection behind your
|
|
134
|
+
* back.
|
|
135
|
+
* • **The policy is still yours to create.** `retention().enableWith` prints
|
|
136
|
+
* the exact command with your collection and database in it.
|
|
137
|
+
*
|
|
99
138
|
* ── The ceiling, since a store should name its own ──────────────────────────
|
|
100
139
|
* A Firestore document is capped at 1 MiB. A conversation whose stored envelope
|
|
101
140
|
* approaches that is refused BY NAME before the write
|
|
@@ -123,8 +162,29 @@
|
|
|
123
162
|
* for it. So the write is a transaction.
|
|
124
163
|
*
|
|
125
164
|
* ── How much of this is verified ────────────────────────────────────────────
|
|
126
|
-
* **
|
|
127
|
-
* against a
|
|
165
|
+
* **Field-validated except the ownership refusal (2026-08).** An independent
|
|
166
|
+
* field trial ran THIS adapter against a real Firestore and exercised seven of
|
|
167
|
+
* its eight areas live: the round trip, the server-side indexed listing with
|
|
168
|
+
* its document-name tiebreak and real cursor, the missing-index refusal, the
|
|
169
|
+
* hashed document name, the size ceiling, ownership derived from the envelope,
|
|
170
|
+
* and `forget`.
|
|
171
|
+
*
|
|
172
|
+
* The eighth is named because under-claiming and over-claiming are the same
|
|
173
|
+
* defect: **the refusal of a turn signed by somebody else** — the
|
|
174
|
+
* `resolveSessionOwner` conflict this file's `persist` raises out of the
|
|
175
|
+
* transaction — was NOT exercised, because it did not exist when the trial
|
|
176
|
+
* ran. It is held by tests here, including the contested-write case of the
|
|
177
|
+
* shared conformance battery, and by nothing in the field. Two writers racing
|
|
178
|
+
* for one fresh session against a real Firestore, with the real client's
|
|
179
|
+
* transaction retry underneath, is exactly the shape a double models by
|
|
180
|
+
* assumption; the sibling Vertex adapter's equivalent was found in the field
|
|
181
|
+
* and not in a test suite.
|
|
182
|
+
*
|
|
183
|
+
* This section said "NOT field-validated. Nothing here has been run against a
|
|
184
|
+
* live Firestore" for two releases after that stopped being true. Under-claiming
|
|
185
|
+
* is the safe direction and it is still the same defect class the trials keep
|
|
186
|
+
* reporting: a status that does not track the evidence is a status nobody can
|
|
187
|
+
* use, whichever way it is wrong.
|
|
128
188
|
*
|
|
129
189
|
* The pin is the `firestoreSessions` row of `GOOGLE_SURFACE_PINS` in
|
|
130
190
|
* `test/adapters/google/googlePin.ts`, asserted by
|
|
@@ -149,7 +209,8 @@
|
|
|
149
209
|
* everywhere. That the row spells those members the way Google does is held by a
|
|
150
210
|
* hand check against a real install, not by a test that runs here.
|
|
151
211
|
*
|
|
152
|
-
* The DESIGN
|
|
212
|
+
* The DESIGN was informed, before any of that, by an EARLIER and separate trial
|
|
213
|
+
* of a DIFFERENT Firestore
|
|
153
214
|
* session adapter, which ran against a real Firestore and passed eight ownership
|
|
154
215
|
* and history checks — and whose own report named the defect this adapter does
|
|
155
216
|
* not reproduce: that adapter read every document for one owner, sorted them in
|
|
@@ -160,7 +221,7 @@
|
|
|
160
221
|
* or index, because that adapter had none of them.
|
|
161
222
|
*/
|
|
162
223
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
163
|
-
exports.firestoreFailure = exports.isFailedPrecondition = exports.grpcStatusOf = exports.documentIdFor = exports.firestoreSessions = exports.EnvelopeTooLargeError = exports.FirestoreIndexMissingError = exports.FIRESTORE_MAX_ENVELOPE_BYTES = exports.FIRESTORE_MAX_DOCUMENT_BYTES = exports.DEFAULT_SESSION_COLLECTION = void 0;
|
|
224
|
+
exports.firestoreFailure = exports.isFailedPrecondition = exports.grpcStatusOf = exports.documentIdFor = exports.firestoreSessions = exports.EnvelopeTooLargeError = exports.FirestoreIndexMissingError = exports.FIRESTORE_MAX_ENVELOPE_BYTES = exports.FIRESTORE_MAX_DOCUMENT_BYTES = exports.ttlPolicyCommand = exports.EXPIRES_AT_FIELD = exports.DEFAULT_SESSION_COLLECTION = void 0;
|
|
164
225
|
const node_crypto_1 = require("node:crypto");
|
|
165
226
|
const envelope_js_1 = require("../../hosting/envelope.js");
|
|
166
227
|
const errors_js_1 = require("../../hosting/errors.js");
|
|
@@ -169,6 +230,43 @@ const lazyRequire_js_1 = require("../../lib/lazyRequire.js");
|
|
|
169
230
|
const ADAPTER = 'firestoreSessions';
|
|
170
231
|
/** Where sessions live when the caller names no collection. */
|
|
171
232
|
exports.DEFAULT_SESSION_COLLECTION = 'agentfootprint_sessions';
|
|
233
|
+
/**
|
|
234
|
+
* The document field a native TTL policy is configured against (9.42.0).
|
|
235
|
+
*
|
|
236
|
+
* A SECOND field beside `savedAt`, never a change to it — see the module
|
|
237
|
+
* header for why converting the ordering key would have re-sorted every
|
|
238
|
+
* conversation already in the collection.
|
|
239
|
+
*
|
|
240
|
+
* Exported because an operator has to type this name into the console or the
|
|
241
|
+
* `gcloud` line, and a field name that lives only inside a string literal is a
|
|
242
|
+
* field name somebody will mistype at 2am.
|
|
243
|
+
*/
|
|
244
|
+
exports.EXPIRES_AT_FIELD = 'expiresAt';
|
|
245
|
+
/**
|
|
246
|
+
* The one step that turns the TTL policy on, with this store's own collection
|
|
247
|
+
* and database already in it.
|
|
248
|
+
*
|
|
249
|
+
* One spelling, shared by the retention answer and the documentation that
|
|
250
|
+
* quotes it, for the same reason the missing-index refusal prints the whole
|
|
251
|
+
* `gcloud` line: the person reading it can fix this in sixty seconds, and only
|
|
252
|
+
* if nobody makes them go and look up the flags first.
|
|
253
|
+
*
|
|
254
|
+
* `--database` is always printed, including for `(default)`, where gcloud
|
|
255
|
+
* would have assumed it — a project may hold several databases, and a policy
|
|
256
|
+
* created on the wrong one leaves conversations living forever with nothing to
|
|
257
|
+
* suggest why. Single-quoted, because `(default)` is bare parentheses and a
|
|
258
|
+
* syntax error in every shell this will be pasted into.
|
|
259
|
+
*/
|
|
260
|
+
function ttlPolicyCommand(collection, database) {
|
|
261
|
+
const flagValue = `'${database ?? '<the database your Firestore client was built for>'}'`;
|
|
262
|
+
return (`gcloud firestore fields ttls update ${exports.EXPIRES_AT_FIELD} ` +
|
|
263
|
+
`--collection-group=${collection} --enable-ttl --database=${flagValue}` +
|
|
264
|
+
(database === undefined
|
|
265
|
+
? ` (this store did not build the Firestore client, so it cannot name the database — ` +
|
|
266
|
+
`fill that flag in from wherever the client was constructed)`
|
|
267
|
+
: ``));
|
|
268
|
+
}
|
|
269
|
+
exports.ttlPolicyCommand = ttlPolicyCommand;
|
|
172
270
|
/** How many rows one `listByUser` page carries when the caller names no limit. */
|
|
173
271
|
const DEFAULT_PAGE = 50;
|
|
174
272
|
/**
|
|
@@ -299,20 +397,31 @@ exports.EnvelopeTooLargeError = EnvelopeTooLargeError;
|
|
|
299
397
|
* Conversations in Firestore — a fleet-shared session store with no instance to
|
|
300
398
|
* run.
|
|
301
399
|
*
|
|
302
|
-
* **Status:
|
|
303
|
-
*
|
|
304
|
-
*
|
|
305
|
-
*
|
|
306
|
-
*
|
|
307
|
-
*
|
|
308
|
-
*
|
|
309
|
-
*
|
|
400
|
+
* **Status: field-validated except the ownership refusal (2026-08).** An
|
|
401
|
+
* independent field trial ran this adapter against a real Firestore and
|
|
402
|
+
* exercised seven of its eight areas live — round trip, indexed and cursored
|
|
403
|
+
* listing, the missing-index refusal, the hashed document name, the size
|
|
404
|
+
* ceiling, derived ownership and `forget`. The eighth, the refusal of a turn
|
|
405
|
+
* signed by somebody ELSE, was added after the trial and is held by tests
|
|
406
|
+
* here and by nothing in the field. Every SDK member it calls was read off a
|
|
407
|
+
* real install of `@google-cloud/firestore` 9.0.0 and hand-verified there; the
|
|
408
|
+
* test that re-checks those names against the real package SKIPS in this
|
|
409
|
+
* repository, because the package is deliberately not installed here. What
|
|
410
|
+
* runs in CI is the dispatch pin. See the module header for the full account.
|
|
310
411
|
*
|
|
311
412
|
* @throws FirestoreIndexMissingError from `listByUser` until the composite index
|
|
312
413
|
* exists — see the module header for the exact index.
|
|
313
414
|
* @throws EnvelopeTooLargeError from `persist` for a conversation above
|
|
314
415
|
* {@link FIRESTORE_MAX_ENVELOPE_BYTES}. Never truncated.
|
|
315
416
|
*
|
|
417
|
+
* @example Conversations that expire 30 days after their last turn
|
|
418
|
+
* const sessions = firestoreSessions({
|
|
419
|
+
* project: 'my-project',
|
|
420
|
+
* expireAfterMs: 30 * 24 * 60 * 60 * 1000,
|
|
421
|
+
* });
|
|
422
|
+
* // Then, ONCE, as an operator — the store prints the exact command:
|
|
423
|
+
* console.log(sessions.retention().enableWith);
|
|
424
|
+
*
|
|
316
425
|
* @example A standing agent whose conversations are shared across instances
|
|
317
426
|
* import { standingAgent, nodeHost } from 'agentfootprint/hosting';
|
|
318
427
|
* import { firestoreSessions } from 'agentfootprint/hosting';
|
|
@@ -364,6 +473,16 @@ function firestoreSessions(options = {}) {
|
|
|
364
473
|
};
|
|
365
474
|
const collection = () => db.collection(collectionName);
|
|
366
475
|
const docFor = (sessionId) => collection().doc(documentIdFor(sessionId));
|
|
476
|
+
/**
|
|
477
|
+
* When this conversation should expire, or `null` for a store that was not
|
|
478
|
+
* given a retention setting.
|
|
479
|
+
*
|
|
480
|
+
* Idle expiry, measured from the envelope's own `savedAt`: every turn moves
|
|
481
|
+
* it, so a live conversation never expires underneath somebody.
|
|
482
|
+
*/
|
|
483
|
+
const expiresAtFor = (savedAt) => options.expireAfterMs === undefined || !Number.isFinite(options.expireAfterMs)
|
|
484
|
+
? null
|
|
485
|
+
: new Date(savedAt + options.expireAfterMs);
|
|
367
486
|
/** The stored row, read back without trusting any of its types. */
|
|
368
487
|
const readRow = async (sessionId, operation) => {
|
|
369
488
|
let snapshot;
|
|
@@ -428,6 +547,27 @@ function firestoreSessions(options = {}) {
|
|
|
428
547
|
savedAt: checked.savedAt,
|
|
429
548
|
envelope: json,
|
|
430
549
|
messageCount: (0, envelope_js_1.envelopeTranscript)(checked).length,
|
|
550
|
+
// The TTL field (9.42.0) — a SECOND field, never a change to
|
|
551
|
+
// `savedAt`. See the module header: `savedAt` is the ordering key of
|
|
552
|
+
// the composite index and the first half of every cursor this store
|
|
553
|
+
// has ever minted, and Firestore sorts values by TYPE before value, so
|
|
554
|
+
// making it a timestamp would have put every document written from now
|
|
555
|
+
// on into a different sort bucket from every document already stored.
|
|
556
|
+
//
|
|
557
|
+
// A `Date`, which the client converts to a Timestamp on write — and a
|
|
558
|
+
// TTL policy acts only on a Timestamp. Writing one this way rather
|
|
559
|
+
// than through `Timestamp.fromMillis` is deliberate: it adds no member
|
|
560
|
+
// to the SDK surface this adapter dispatches (so the pin row is
|
|
561
|
+
// unchanged and no new name had to be hand-verified against a real
|
|
562
|
+
// install), and it works identically for a caller who passed their own
|
|
563
|
+
// client.
|
|
564
|
+
//
|
|
565
|
+
// `null` when nothing was configured, never `undefined`: the default
|
|
566
|
+
// client throws on `undefined`, and a TTL policy ignores a field that
|
|
567
|
+
// is null or missing — so an unconfigured store writes an inert field
|
|
568
|
+
// rather than an absent one, exactly as `owner` does one line down and
|
|
569
|
+
// for the same reason.
|
|
570
|
+
[exports.EXPIRES_AT_FIELD]: expiresAtFor(checked.savedAt),
|
|
431
571
|
};
|
|
432
572
|
// WRITE ONCE for the owner, LAST WRITE WINS for everything else — the one
|
|
433
573
|
// rule every store in this package shares, and since 9.36.1 the one
|
|
@@ -607,6 +747,36 @@ function firestoreSessions(options = {}) {
|
|
|
607
747
|
throw firestoreFailure('forgetting a session', collectionName, err);
|
|
608
748
|
}
|
|
609
749
|
},
|
|
750
|
+
// ── Retention (9.42.0) ──────────────────────────────────────────────
|
|
751
|
+
//
|
|
752
|
+
// `'the-backend'`, and the honest answer rather than the convenient one.
|
|
753
|
+
// This store COULD have offered a sweep — query the old documents, delete
|
|
754
|
+
// them one at a time — and it would have been a worse answer at every
|
|
755
|
+
// scale: a full index read plus one write per document, billed, repeated
|
|
756
|
+
// nightly, to do a job the service already does for free and does not
|
|
757
|
+
// charge a delete for. A port member exists so a caller can find out what
|
|
758
|
+
// a store really does; a store that implemented the OTHER arm because it
|
|
759
|
+
// was implementable would be answering a different question.
|
|
760
|
+
//
|
|
761
|
+
// It works on a closed store on purpose — it reads no document and calls
|
|
762
|
+
// no SDK member. An operator asking "what expires these, and how do I turn
|
|
763
|
+
// it on?" during a shutdown or an incident should get the answer, not the
|
|
764
|
+
// refusal that guards the data plane.
|
|
765
|
+
retention: () => ({
|
|
766
|
+
deletedBy: 'the-backend',
|
|
767
|
+
// Whether this store is really stamping the field, which is a different
|
|
768
|
+
// fact from whether the mechanism exists. Reported rather than implied:
|
|
769
|
+
// "there is a TTL field" and "conversations are expiring" are the two
|
|
770
|
+
// things an auditor must not be allowed to confuse.
|
|
771
|
+
active: options.expireAfterMs !== undefined && Number.isFinite(options.expireAfterMs),
|
|
772
|
+
expiresOn: exports.EXPIRES_AT_FIELD,
|
|
773
|
+
enableWith: `${ttlPolicyCommand(collectionName, databaseName)} — or Firestore console → ` +
|
|
774
|
+
`Time-to-live (TTL) → Create policy, on collection '${collectionName}' and field ` +
|
|
775
|
+
`'${exports.EXPIRES_AT_FIELD}'. The policy deletes a document within 24 hours of the ` +
|
|
776
|
+
`instant in that field; it is not a hard deadline and the service says so. ` +
|
|
777
|
+
`Documents stored before 'expireAfterMs' was configured carry no such field and ` +
|
|
778
|
+
`are never deleted by it — they expire only once they are written again.`,
|
|
779
|
+
}),
|
|
610
780
|
async close() {
|
|
611
781
|
if (closed)
|
|
612
782
|
return;
|