@remnic/core 9.3.704 → 9.3.706
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/dist/access-boundary.d.ts +6 -6
- package/dist/access-boundary.js +29 -29
- package/dist/access-cli.js +59 -57
- package/dist/access-cli.js.map +1 -1
- package/dist/access-http.d.ts +5 -5
- package/dist/access-http.js +34 -33
- package/dist/access-mcp.d.ts +5 -5
- package/dist/access-mcp.js +33 -32
- package/dist/access-operations-batch.d.ts +2 -0
- package/dist/access-operations-batch.js +120 -0
- package/dist/access-operations.d.ts +6 -5
- package/dist/access-operations.js +32 -31
- package/dist/access-schema.js +3 -3
- package/dist/{access-service-C8hc8N2i.d.ts → access-service-j1c1gptF.d.ts} +3 -3
- package/dist/access-service.d.ts +5 -5
- package/dist/access-service.js +28 -28
- package/dist/access-surface-catalog.d.ts +5 -5
- package/dist/access-surface-catalog.js +57 -54
- package/dist/access-surface-catalog.js.map +1 -1
- package/dist/action-confidence.d.ts +1 -1
- package/dist/active-memory-bridge.d.ts +1 -1
- package/dist/active-recall.d.ts +1 -1
- package/dist/{auto-sync-3AAP25FV.js → auto-sync-24NNS3GU.js} +3 -3
- package/dist/behavior-learner.d.ts +1 -1
- package/dist/behavior-signals.d.ts +1 -1
- package/dist/bootstrap.d.ts +4 -4
- package/dist/briefing.d.ts +1 -1
- package/dist/briefing.js +7 -7
- package/dist/buffer-surprise-report.d.ts +1 -1
- package/dist/buffer.d.ts +1 -1
- package/dist/calibration.d.ts +1 -1
- package/dist/capabilities.d.ts +1 -1
- package/dist/{capsule-crypto-GWVG7LGC.js → capsule-crypto-7FJQINUR.js} +2 -2
- package/dist/capsule-crypto-7FJQINUR.js.map +1 -0
- package/dist/{catalog-CAeU0e1C.d.ts → catalog-CKxilpzS.d.ts} +1 -1
- package/dist/causal-behavior.d.ts +1 -1
- package/dist/causal-behavior.js +5 -5
- package/dist/causal-chain.js +3 -3
- package/dist/causal-consolidation.d.ts +1 -1
- package/dist/causal-consolidation.js +11 -11
- package/dist/causal-retrieval.js +3 -3
- package/dist/causal-trajectory-graph.js +2 -2
- package/dist/causal-trajectory.js +1 -1
- package/dist/{chunk-CTY6QSLZ.js → chunk-24FGNOQS.js} +4 -4
- package/dist/{chunk-CTY6QSLZ.js.map → chunk-24FGNOQS.js.map} +1 -1
- package/dist/{chunk-OWHERGF2.js → chunk-2NLLXCJG.js} +2 -2
- package/dist/{chunk-NMW3T6T6.js → chunk-2VQYHHWB.js} +17 -11
- package/dist/chunk-2VQYHHWB.js.map +1 -0
- package/dist/{chunk-7G4KPGR3.js → chunk-3PTOZJOI.js} +2 -2
- package/dist/{chunk-PJ5MDXOF.js → chunk-4DZATVK5.js} +10 -10
- package/dist/{chunk-UOIRJ45Z.js → chunk-4E2QCH46.js} +2 -2
- package/dist/{chunk-KKK7YTYN.js → chunk-5GSUBCZM.js} +6 -2
- package/dist/chunk-5GSUBCZM.js.map +1 -0
- package/dist/{chunk-RYDT7LAI.js → chunk-66TSLESZ.js} +2 -2
- package/dist/chunk-66TSLESZ.js.map +1 -0
- package/dist/{chunk-IREVVFTM.js → chunk-6CIAGZ6X.js} +9 -1
- package/dist/chunk-6CIAGZ6X.js.map +1 -0
- package/dist/{chunk-QHNJVWF6.js → chunk-6HPJMR5I.js} +6 -6
- package/dist/{chunk-4NFVPDIL.js → chunk-74MYJSKB.js} +5 -5
- package/dist/{chunk-PKMQK2WY.js → chunk-773DPI6T.js} +4 -4
- package/dist/{chunk-AGNBY3VG.js → chunk-APJQ6UEA.js} +4 -4
- package/dist/{chunk-UNNDFYUX.js → chunk-ARV3AUOM.js} +5 -5
- package/dist/{chunk-XXDOJ5NL.js → chunk-BGAHTI4C.js} +7 -7
- package/dist/{chunk-6GHWF4QH.js → chunk-C63MK3WL.js} +2 -2
- package/dist/{chunk-VKJHM6PL.js → chunk-DGTDRIUO.js} +5 -5
- package/dist/{chunk-25FHSOEB.js → chunk-EJDAXR7O.js} +60 -6
- package/dist/chunk-EJDAXR7O.js.map +1 -0
- package/dist/{chunk-K7QRDDSR.js → chunk-ESMY4RJ4.js} +5 -5
- package/dist/{chunk-YLB7NMLD.js → chunk-GKI6LX5L.js} +2 -2
- package/dist/{chunk-TUPNAHHQ.js → chunk-HIV5E57C.js} +2 -2
- package/dist/{chunk-YOI3ELXF.js → chunk-IF362TF6.js} +2 -2
- package/dist/{chunk-SFOAQQDJ.js → chunk-IONFO7UK.js} +3 -3
- package/dist/{chunk-AE3C4PY6.js → chunk-IVCQW4C4.js} +2 -2
- package/dist/{chunk-6AFVIOVZ.js → chunk-K22IJO4R.js} +2 -2
- package/dist/{chunk-5W7CTZ2E.js → chunk-KQAFEZQX.js} +4 -4
- package/dist/chunk-M7R5R6OJ.js +355 -0
- package/dist/chunk-M7R5R6OJ.js.map +1 -0
- package/dist/{chunk-IX3UQT4H.js → chunk-MLLTU5FX.js} +1 -1
- package/dist/chunk-MLLTU5FX.js.map +1 -0
- package/dist/{chunk-ORXVO6TH.js → chunk-MRX6ZXHZ.js} +6 -6
- package/dist/chunk-N75N5SNX.js +1303 -0
- package/dist/chunk-N75N5SNX.js.map +1 -0
- package/dist/{chunk-S24J5LLQ.js → chunk-NM6TSEGQ.js} +3 -3
- package/dist/{chunk-QDIVMS25.js → chunk-NUWZFSKC.js} +2 -2
- package/dist/{chunk-53EEQYE5.js → chunk-OMSTU233.js} +4 -4
- package/dist/{chunk-R64MNFPV.js → chunk-PDJQVAGM.js} +114 -77
- package/dist/chunk-PDJQVAGM.js.map +1 -0
- package/dist/{chunk-WAHI7SPK.js → chunk-RH2OSRQY.js} +2 -2
- package/dist/{chunk-YTMDF6S7.js → chunk-SPETAWFE.js} +2 -2
- package/dist/{chunk-ZXFNSKPY.js → chunk-STYMKPFT.js} +34 -34
- package/dist/{chunk-OMNTQPZO.js → chunk-TKZ3AL5V.js} +2 -2
- package/dist/{chunk-ABCGDW3A.js → chunk-VYZNWH4J.js} +40 -9
- package/dist/chunk-VYZNWH4J.js.map +1 -0
- package/dist/{chunk-QV5WFNZ2.js → chunk-W2S3Z5MT.js} +2 -2
- package/dist/{chunk-OCFNG4LB.js → chunk-W2WQ4LE7.js} +2 -2
- package/dist/{chunk-DE2OPIQD.js → chunk-WDH3KUZU.js} +6 -6
- package/dist/{chunk-3EHCV6YV.js → chunk-WQADZ3ZY.js} +67 -67
- package/dist/{chunk-OOEVMJK4.js → chunk-WSWYIKXX.js} +6 -6
- package/dist/{chunk-UVYI6VIX.js → chunk-X7Y7WX73.js} +1 -1
- package/dist/{chunk-WN4GHSDH.js → chunk-XKMDDM7P.js} +2 -2
- package/dist/{chunk-6Q7JFY4P.js → chunk-Y6YHAGQP.js} +2 -2
- package/dist/{chunk-KF74X62T.js → chunk-YGKUAX2B.js} +4 -4
- package/dist/{chunk-YN4ZT4CW.js → chunk-YI7RZO7Y.js} +1 -1
- package/dist/{cli-ChE0XlJY.d.ts → cli-CbT-pyM4.d.ts} +3 -3
- package/dist/cli.d.ts +6 -6
- package/dist/cli.js +58 -57
- package/dist/compounding/engine.d.ts +1 -1
- package/dist/compounding/engine.js +7 -7
- package/dist/compounding/preference-consolidator.d.ts +1 -1
- package/dist/compression-optimizer.d.ts +1 -1
- package/dist/config.d.ts +1 -1
- package/dist/connectors/codex-materialize-runner.d.ts +1 -1
- package/dist/connectors/codex-materialize-runner.js +7 -7
- package/dist/connectors/codex-materialize.d.ts +1 -1
- package/dist/connectors/index.d.ts +1 -1
- package/dist/connectors/index.js +7 -7
- package/dist/consolidation-provenance-check.d.ts +1 -1
- package/dist/consolidation-undo.d.ts +1 -1
- package/dist/contradiction/index.d.ts +1 -1
- package/dist/conversation-index/backend.d.ts +1 -1
- package/dist/conversation-index/chunker.d.ts +1 -1
- package/dist/conversation-index/faiss-adapter.d.ts +1 -1
- package/dist/conversation-index/indexer.d.ts +1 -1
- package/dist/conversation-index/search.d.ts +1 -1
- package/dist/day-summary.d.ts +1 -1
- package/dist/delinearize.d.ts +1 -1
- package/dist/direct-answer-wiring.d.ts +1 -1
- package/dist/direct-answer.d.ts +1 -1
- package/dist/embedding-fallback.d.ts +1 -1
- package/dist/enrichment/index.d.ts +1 -1
- package/dist/entity-retrieval.d.ts +1 -1
- package/dist/entity-retrieval.js +7 -7
- package/dist/entity-schema.d.ts +1 -1
- package/dist/event-time.d.ts +35 -1
- package/dist/event-time.js +6 -320
- package/dist/event-time.js.map +1 -1
- package/dist/explicit-capture.d.ts +4 -4
- package/dist/extraction-faithfulness.d.ts +1 -1
- package/dist/extraction-judge-telemetry.d.ts +1 -1
- package/dist/extraction-judge-training.d.ts +1 -1
- package/dist/extraction-judge.d.ts +1 -1
- package/dist/extraction.d.ts +10 -1
- package/dist/extraction.js +3 -3
- package/dist/fallback-llm.d.ts +1 -1
- package/dist/{forget-6SOIPUMQ.js → forget-U66KPDPY.js} +3 -3
- package/dist/{graph-edge-decay-D7OESCBR.js → graph-edge-decay-JLOF3YW4.js} +3 -3
- package/dist/graph-snapshot.js +3 -3
- package/dist/graph.js +2 -2
- package/dist/identity-continuity.d.ts +1 -1
- package/dist/importance.d.ts +1 -1
- package/dist/index.d.ts +9 -9
- package/dist/index.js +103 -101
- package/dist/index.js.map +1 -1
- package/dist/intent.d.ts +1 -1
- package/dist/lcm/engine.d.ts +1 -1
- package/dist/lcm/engine.js +2 -2
- package/dist/lcm/index.d.ts +1 -1
- package/dist/lcm/index.js +4 -4
- package/dist/lcm/tools.d.ts +1 -1
- package/dist/lifecycle.d.ts +1 -1
- package/dist/live-connectors-runner.d.ts +1 -1
- package/dist/local-llm.d.ts +1 -1
- package/dist/maintenance/memory-governance.d.ts +1 -1
- package/dist/maintenance/memory-governance.js +8 -8
- package/dist/maintenance/rebuild-memory-lifecycle-ledger.js +7 -7
- package/dist/maintenance/rebuild-memory-projection.js +9 -9
- package/dist/mcp-memory-inspector-app.d.ts +5 -5
- package/dist/memory-action-policy.d.ts +1 -1
- package/dist/memory-cache.d.ts +1 -1
- package/dist/memory-lifecycle-ledger-utils.d.ts +1 -1
- package/dist/memory-projection-store.d.ts +1 -1
- package/dist/memory-provenance.d.ts +1 -1
- package/dist/memory-worth-outcomes.d.ts +1 -1
- package/dist/models-json.d.ts +1 -1
- package/dist/namespaces/migrate.d.ts +2 -2
- package/dist/namespaces/migrate.js +11 -11
- package/dist/namespaces/principal.d.ts +1 -1
- package/dist/namespaces/search.d.ts +1 -1
- package/dist/namespaces/search.js +3 -3
- package/dist/namespaces/storage.d.ts +2 -2
- package/dist/namespaces/storage.js +7 -7
- package/dist/native-knowledge.d.ts +1 -1
- package/dist/operator-toolkit.d.ts +1 -1
- package/dist/operator-toolkit.js +18 -18
- package/dist/orchestration/maintenance.d.ts +2 -2
- package/dist/orchestration/maintenance.js +9 -9
- package/dist/{orchestrator-m_PnhyHj.d.ts → orchestrator-D4ovYV3x.d.ts} +3 -3
- package/dist/orchestrator.d.ts +4 -4
- package/dist/orchestrator.js +46 -45
- package/dist/patterns-cli.d.ts +1 -1
- package/dist/policy-runtime.d.ts +1 -1
- package/dist/provenance.d.ts +1 -1
- package/dist/qmd-recall-cache.d.ts +1 -1
- package/dist/qmd.d.ts +1 -1
- package/dist/recall-disclosure-escalation.d.ts +1 -1
- package/dist/recall-explain-renderer.d.ts +1 -1
- package/dist/recall-explain-renderer.js +3 -3
- package/dist/recall-planner-llm.d.ts +1 -1
- package/dist/recall-state.d.ts +1 -1
- package/dist/recall-tag-filter.d.ts +1 -1
- package/dist/recall-xray-cli.d.ts +1 -1
- package/dist/recall-xray-cli.js +4 -4
- package/dist/recall-xray-renderer.d.ts +1 -1
- package/dist/recall-xray-renderer.js +3 -3
- package/dist/recall-xray.d.ts +1 -1
- package/dist/recall-xray.js +2 -2
- package/dist/resolve-auth-token.d.ts +1 -1
- package/dist/resume-bundles.js +1 -1
- package/dist/retrieval-agents.d.ts +1 -1
- package/dist/retrieval-tiers.d.ts +1 -1
- package/dist/routing/engine.d.ts +1 -1
- package/dist/routing/store.d.ts +1 -1
- package/dist/schemas.d.ts +38 -0
- package/dist/schemas.js +1 -1
- package/dist/search/embed-helper.d.ts +1 -1
- package/dist/search/factory.d.ts +1 -1
- package/dist/search/factory.js +2 -2
- package/dist/search/index.d.ts +1 -1
- package/dist/search/index.js +4 -4
- package/dist/search/lancedb-backend.d.ts +1 -1
- package/dist/search/meilisearch-backend.d.ts +1 -1
- package/dist/search/noop-backend.d.ts +1 -1
- package/dist/search/orama-backend.d.ts +1 -1
- package/dist/search/port.d.ts +1 -1
- package/dist/search/remote-backend.d.ts +1 -1
- package/dist/{semantic-consolidation-DVBbq6Wr.d.ts → semantic-consolidation-DyMUCsfN.d.ts} +1 -1
- package/dist/semantic-consolidation.d.ts +2 -2
- package/dist/semantic-consolidation.js +9 -9
- package/dist/semantic-rule-promotion.js +7 -7
- package/dist/semantic-rule-verifier.d.ts +1 -1
- package/dist/semantic-rule-verifier.js +8 -8
- package/dist/session-observer-bands.d.ts +1 -1
- package/dist/session-observer-state.d.ts +1 -1
- package/dist/shared-context/manager.d.ts +1 -1
- package/dist/signal.d.ts +1 -1
- package/dist/storage.d.ts +5 -1
- package/dist/storage.js +6 -6
- package/dist/summarizer.d.ts +1 -1
- package/dist/summary-snapshot.d.ts +1 -1
- package/dist/temporal-supersession.d.ts +1 -1
- package/dist/temporal-supersession.js +2 -2
- package/dist/temporal-validity.d.ts +2 -2
- package/dist/temporal-validity.js +1 -1
- package/dist/threading.d.ts +1 -1
- package/dist/tier-migration.d.ts +1 -1
- package/dist/tier-routing.d.ts +1 -1
- package/dist/topics.d.ts +1 -1
- package/dist/transcript.d.ts +1 -1
- package/dist/transfer/backup.js +2 -2
- package/dist/transfer/capsule-export.js +2 -2
- package/dist/transfer/capsule-import.js +2 -2
- package/dist/transfer/import-sqlite.js +2 -2
- package/dist/{types-CJrvHJjx.d.ts → types-Couvz-L3.d.ts} +12 -2
- package/dist/types.d.ts +1 -1
- package/dist/types.js +1 -1
- package/dist/utility-runtime.d.ts +1 -1
- package/dist/verified-recall.js +8 -8
- package/package.json +2 -2
- package/src/access-boundary.ts +102 -1
- package/src/access-http.ts +54 -0
- package/src/access-operations-batch.ts +1468 -0
- package/src/access-operations.ts +4 -0
- package/src/access-surface-catalog.test.ts +17 -1
- package/src/access-surface-catalog.ts +57 -54
- package/src/event-time.ts +73 -0
- package/src/extraction-eventtime-wiring.test.ts +269 -0
- package/src/extraction.ts +50 -3
- package/src/orchestrator.ts +71 -17
- package/src/schemas.ts +12 -0
- package/src/storage-contract/atomicity.test.ts +113 -0
- package/src/storage-contract/cache-coherence.test.ts +100 -0
- package/src/storage-contract/content-hash.test.ts +102 -0
- package/src/storage-contract/failure-semantics.test.ts +108 -0
- package/src/storage-contract/harness.ts +148 -0
- package/src/storage-contract/namespace-routing.test.ts +135 -0
- package/src/storage-contract/round-trip.test.ts +226 -0
- package/src/storage-contract/surface.test.ts +90 -0
- package/src/storage-contract/versioning.test.ts +139 -0
- package/src/storage.ts +13 -2
- package/src/temporal-validity.test.ts +33 -0
- package/src/temporal-validity.ts +24 -1
- package/src/types.ts +12 -2
- package/dist/chunk-25FHSOEB.js.map +0 -1
- package/dist/chunk-ABCGDW3A.js.map +0 -1
- package/dist/chunk-IREVVFTM.js.map +0 -1
- package/dist/chunk-IX3UQT4H.js.map +0 -1
- package/dist/chunk-KKK7YTYN.js.map +0 -1
- package/dist/chunk-NMW3T6T6.js.map +0 -1
- package/dist/chunk-R64MNFPV.js.map +0 -1
- package/dist/chunk-RYDT7LAI.js.map +0 -1
- /package/dist/{capsule-crypto-GWVG7LGC.js.map → access-operations-batch.js.map} +0 -0
- /package/dist/{auto-sync-3AAP25FV.js.map → auto-sync-24NNS3GU.js.map} +0 -0
- /package/dist/{chunk-OWHERGF2.js.map → chunk-2NLLXCJG.js.map} +0 -0
- /package/dist/{chunk-7G4KPGR3.js.map → chunk-3PTOZJOI.js.map} +0 -0
- /package/dist/{chunk-PJ5MDXOF.js.map → chunk-4DZATVK5.js.map} +0 -0
- /package/dist/{chunk-UOIRJ45Z.js.map → chunk-4E2QCH46.js.map} +0 -0
- /package/dist/{chunk-QHNJVWF6.js.map → chunk-6HPJMR5I.js.map} +0 -0
- /package/dist/{chunk-4NFVPDIL.js.map → chunk-74MYJSKB.js.map} +0 -0
- /package/dist/{chunk-PKMQK2WY.js.map → chunk-773DPI6T.js.map} +0 -0
- /package/dist/{chunk-AGNBY3VG.js.map → chunk-APJQ6UEA.js.map} +0 -0
- /package/dist/{chunk-UNNDFYUX.js.map → chunk-ARV3AUOM.js.map} +0 -0
- /package/dist/{chunk-XXDOJ5NL.js.map → chunk-BGAHTI4C.js.map} +0 -0
- /package/dist/{chunk-6GHWF4QH.js.map → chunk-C63MK3WL.js.map} +0 -0
- /package/dist/{chunk-VKJHM6PL.js.map → chunk-DGTDRIUO.js.map} +0 -0
- /package/dist/{chunk-K7QRDDSR.js.map → chunk-ESMY4RJ4.js.map} +0 -0
- /package/dist/{chunk-YLB7NMLD.js.map → chunk-GKI6LX5L.js.map} +0 -0
- /package/dist/{chunk-TUPNAHHQ.js.map → chunk-HIV5E57C.js.map} +0 -0
- /package/dist/{chunk-YOI3ELXF.js.map → chunk-IF362TF6.js.map} +0 -0
- /package/dist/{chunk-SFOAQQDJ.js.map → chunk-IONFO7UK.js.map} +0 -0
- /package/dist/{chunk-AE3C4PY6.js.map → chunk-IVCQW4C4.js.map} +0 -0
- /package/dist/{chunk-6AFVIOVZ.js.map → chunk-K22IJO4R.js.map} +0 -0
- /package/dist/{chunk-5W7CTZ2E.js.map → chunk-KQAFEZQX.js.map} +0 -0
- /package/dist/{chunk-ORXVO6TH.js.map → chunk-MRX6ZXHZ.js.map} +0 -0
- /package/dist/{chunk-S24J5LLQ.js.map → chunk-NM6TSEGQ.js.map} +0 -0
- /package/dist/{chunk-QDIVMS25.js.map → chunk-NUWZFSKC.js.map} +0 -0
- /package/dist/{chunk-53EEQYE5.js.map → chunk-OMSTU233.js.map} +0 -0
- /package/dist/{chunk-WAHI7SPK.js.map → chunk-RH2OSRQY.js.map} +0 -0
- /package/dist/{chunk-YTMDF6S7.js.map → chunk-SPETAWFE.js.map} +0 -0
- /package/dist/{chunk-ZXFNSKPY.js.map → chunk-STYMKPFT.js.map} +0 -0
- /package/dist/{chunk-OMNTQPZO.js.map → chunk-TKZ3AL5V.js.map} +0 -0
- /package/dist/{chunk-QV5WFNZ2.js.map → chunk-W2S3Z5MT.js.map} +0 -0
- /package/dist/{chunk-OCFNG4LB.js.map → chunk-W2WQ4LE7.js.map} +0 -0
- /package/dist/{chunk-DE2OPIQD.js.map → chunk-WDH3KUZU.js.map} +0 -0
- /package/dist/{chunk-3EHCV6YV.js.map → chunk-WQADZ3ZY.js.map} +0 -0
- /package/dist/{chunk-OOEVMJK4.js.map → chunk-WSWYIKXX.js.map} +0 -0
- /package/dist/{chunk-UVYI6VIX.js.map → chunk-X7Y7WX73.js.map} +0 -0
- /package/dist/{chunk-WN4GHSDH.js.map → chunk-XKMDDM7P.js.map} +0 -0
- /package/dist/{chunk-6Q7JFY4P.js.map → chunk-Y6YHAGQP.js.map} +0 -0
- /package/dist/{chunk-KF74X62T.js.map → chunk-YGKUAX2B.js.map} +0 -0
- /package/dist/{chunk-YN4ZT4CW.js.map → chunk-YI7RZO7Y.js.map} +0 -0
- /package/dist/{forget-6SOIPUMQ.js.map → forget-U66KPDPY.js.map} +0 -0
- /package/dist/{graph-edge-decay-D7OESCBR.js.map → graph-edge-decay-JLOF3YW4.js.map} +0 -0
|
@@ -4,7 +4,7 @@ import {
|
|
|
4
4
|
} from "./chunk-ZFXCQPNO.js";
|
|
5
5
|
import {
|
|
6
6
|
StorageManager
|
|
7
|
-
} from "./chunk-
|
|
7
|
+
} from "./chunk-2VQYHHWB.js";
|
|
8
8
|
import {
|
|
9
9
|
MutationSerializer
|
|
10
10
|
} from "./chunk-LTJAMRGI.js";
|
|
@@ -336,4 +336,4 @@ export {
|
|
|
336
336
|
resolveNamespaceStorageRoot,
|
|
337
337
|
NamespaceStorageRouter
|
|
338
338
|
};
|
|
339
|
-
//# sourceMappingURL=chunk-
|
|
339
|
+
//# sourceMappingURL=chunk-3PTOZJOI.js.map
|
|
@@ -10,10 +10,17 @@ import {
|
|
|
10
10
|
import {
|
|
11
11
|
listMemoryGovernanceRuns,
|
|
12
12
|
readMemoryGovernanceRunArtifact
|
|
13
|
-
} from "./chunk-
|
|
13
|
+
} from "./chunk-ESMY4RJ4.js";
|
|
14
14
|
import {
|
|
15
15
|
StorageManager
|
|
16
|
-
} from "./chunk-
|
|
16
|
+
} from "./chunk-2VQYHHWB.js";
|
|
17
|
+
import {
|
|
18
|
+
MEMORY_LIFECYCLE_EVENT_SORT_ORDER,
|
|
19
|
+
buildLifecycleEventsForMemory,
|
|
20
|
+
inferMemoryStatus,
|
|
21
|
+
sortMemoryLifecycleEvents,
|
|
22
|
+
toMemoryPathRel
|
|
23
|
+
} from "./chunk-RULE4VG5.js";
|
|
17
24
|
import {
|
|
18
25
|
normalizeProjectionPreview,
|
|
19
26
|
normalizeProjectionTags
|
|
@@ -32,13 +39,6 @@ import {
|
|
|
32
39
|
import {
|
|
33
40
|
openBetterSqlite3
|
|
34
41
|
} from "./chunk-6KYMPV2O.js";
|
|
35
|
-
import {
|
|
36
|
-
MEMORY_LIFECYCLE_EVENT_SORT_ORDER,
|
|
37
|
-
buildLifecycleEventsForMemory,
|
|
38
|
-
inferMemoryStatus,
|
|
39
|
-
sortMemoryLifecycleEvents,
|
|
40
|
-
toMemoryPathRel
|
|
41
|
-
} from "./chunk-RULE4VG5.js";
|
|
42
42
|
|
|
43
43
|
// src/maintenance/rebuild-memory-projection.ts
|
|
44
44
|
import path from "path";
|
|
@@ -929,4 +929,4 @@ export {
|
|
|
929
929
|
verifyMemoryProjection,
|
|
930
930
|
repairMemoryProjection
|
|
931
931
|
};
|
|
932
|
-
//# sourceMappingURL=chunk-
|
|
932
|
+
//# sourceMappingURL=chunk-4DZATVK5.js.map
|
|
@@ -7,7 +7,7 @@ import {
|
|
|
7
7
|
} from "./chunk-3UXOZBHV.js";
|
|
8
8
|
import {
|
|
9
9
|
StorageManager
|
|
10
|
-
} from "./chunk-
|
|
10
|
+
} from "./chunk-2VQYHHWB.js";
|
|
11
11
|
import {
|
|
12
12
|
isSafeRouteNamespace
|
|
13
13
|
} from "./chunk-U3PN77QT.js";
|
|
@@ -118,4 +118,4 @@ export {
|
|
|
118
118
|
runCodexMaterialize,
|
|
119
119
|
runPostConsolidationMaterialize
|
|
120
120
|
};
|
|
121
|
-
//# sourceMappingURL=chunk-
|
|
121
|
+
//# sourceMappingURL=chunk-4E2QCH46.js.map
|
|
@@ -91,7 +91,11 @@ var ExtractedFactSchema = z.object({
|
|
|
91
91
|
{ message: "reasoningTrace requires finalAnswer (or final_answer)" }
|
|
92
92
|
).optional().nullable().describe(
|
|
93
93
|
'For category "reasoning_trace" only: a stored solution chain with ordered steps, a final answer, and an optional observed outcome. Require at least two steps.'
|
|
94
|
-
)
|
|
94
|
+
),
|
|
95
|
+
eventTime: z.string().optional().nullable().describe(
|
|
96
|
+
'Optional event-time expression for bi-temporal validity (#1578). An ISO date ("2025-03-01") or a relative expression verbatim ("last March", "yesterday", "since 2024", "until 2025-06-01"). Resolved against the source turn timestamp at write time \u2014 NOT wall-clock. Omit when the fact has no explicit temporal anchor.'
|
|
97
|
+
),
|
|
98
|
+
event_time: z.string().optional().nullable().describe("Alias for eventTime (snake_case). Gateway-tolerance shim (#1578).")
|
|
95
99
|
}).superRefine((value, ctx) => {
|
|
96
100
|
if (value.category === "procedure" && (!Array.isArray(value.procedureSteps) || value.procedureSteps.length < 2)) {
|
|
97
101
|
ctx.addIssue({
|
|
@@ -271,4 +275,4 @@ export {
|
|
|
271
275
|
BehaviorLoopAdjustmentSchema,
|
|
272
276
|
BehaviorLoopPolicyStateSchema
|
|
273
277
|
};
|
|
274
|
-
//# sourceMappingURL=chunk-
|
|
278
|
+
//# sourceMappingURL=chunk-5GSUBCZM.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../src/schemas.ts"],"sourcesContent":["import { z } from \"zod\";\n\nexport const MemoryActionTypeSchema = z.enum([\n \"store_episode\",\n \"store_note\",\n \"update_note\",\n \"create_artifact\",\n \"summarize_node\",\n \"discard\",\n \"link_graph\",\n]);\n\nexport const MemoryActionEligibilityContextSchema = z\n .object({\n confidence: z.number().min(0).max(1),\n lifecycleState: z.enum([\"active\", \"validated\", \"candidate\", \"stale\", \"archived\"]),\n importance: z.number().min(0).max(1),\n source: z.enum([\"extraction\", \"consolidation\", \"replay\", \"manual\", \"unknown\"]),\n })\n .strict();\n\nexport function parseMemoryActionType(value: unknown): z.infer<typeof MemoryActionTypeSchema> {\n const parsed = MemoryActionTypeSchema.safeParse(value);\n return parsed.success ? parsed.data : \"discard\";\n}\n\nexport function parseMemoryActionEligibilityContext(\n value: unknown,\n): z.infer<typeof MemoryActionEligibilityContextSchema> {\n const parsed = MemoryActionEligibilityContextSchema.safeParse(value);\n if (parsed.success) return parsed.data;\n return {\n confidence: 0,\n lifecycleState: \"candidate\",\n importance: 0,\n source: \"unknown\",\n };\n}\n\nexport const ProcedureStepExtractSchema = z.object({\n order: z.number(),\n intent: z.string(),\n toolCall: z\n .object({\n kind: z.string(),\n signature: z.string(),\n })\n .optional()\n .nullable(),\n expectedOutcome: z.string().optional().nullable(),\n optional: z.boolean().optional().nullable(),\n});\n\nexport const ExtractedFactSchema = z.object({\n category: z.enum([\n \"fact\",\n \"preference\",\n \"correction\",\n \"entity\",\n \"decision\",\n \"relationship\",\n \"principle\",\n \"commitment\",\n \"moment\",\n \"skill\",\n \"rule\",\n \"procedure\",\n \"reasoning_trace\",\n ]),\n content: z\n .string()\n .describe(\"The memory content — a clear, standalone statement\"),\n confidence: z\n .number()\n .min(0)\n .max(1)\n .describe(\"How confident are you this is correct (0-1)\"),\n tags: z.array(z.string()).describe(\"Relevant tags for categorization\"),\n entityRef: z\n .string()\n .optional()\n .nullable()\n .describe(\"If about an entity, its normalized name (e.g. person-jane-doe)\"),\n promptedByQuestion: z\n .string()\n .optional()\n .nullable()\n .describe(\"Optional proactive follow-up question that surfaced this fact.\"),\n scope: z\n .enum([\"project\", \"global\"])\n .optional()\n .nullable()\n .describe(\n 'Scope classification: \"global\" for cross-project knowledge (framework bugs, library behavior, API patterns, user preferences, tool configs, general coding patterns); \"project\" for project-specific knowledge (file paths, env configs, deployment details, project workarounds). Defaults to \"project\" when a coding context is active.',\n ),\n quote: z\n .string()\n .optional()\n .nullable()\n .describe(\n \"The EXACT verbatim words from the conversation that support this fact. Copy a contiguous span from a single speaker turn (not a paraphrase). Cap at ~300 characters. This is the grounding evidence for downstream faithfulness verification (issue #1575).\",\n ),\n structuredAttributes: z\n .record(z.string(), z.string())\n .optional()\n .nullable()\n .describe(\"Structured key-value attributes when the fact contains measurable or categorical data (e.g., {\\\"price\\\": \\\"29.99\\\", \\\"color\\\": \\\"blue\\\", \\\"date\\\": \\\"2024-03-15\\\"}).\"),\n procedureSteps: z\n .array(ProcedureStepExtractSchema)\n .optional()\n .nullable()\n .describe(\n 'For category \"procedure\" only: ordered steps (intent per step). At least two steps; include explicit trigger phrasing in content (e.g. \"When you deploy…\").',\n ),\n reasoningTrace: z\n .object({\n steps: z\n .array(\n z.object({\n order: z.number(),\n description: z.string(),\n }),\n )\n // Prompts and normalizer require >=2 ordered steps; enforce it at\n // the schema layer so gateway-path parsing rejects malformed traces\n // rather than persisting them (local/direct-client normalization\n // already enforces this, keeping the two paths symmetric).\n .min(2)\n .describe(\"Ordered reasoning steps the user walked through (require >=2).\"),\n // Accept snake_case aliases so a loose gateway model using\n // `final_answer` / `observed_outcome` does not fail schema parsing\n // and drop the entire extraction result. Local/direct-client\n // normalization already tolerates these keys; the gateway path must\n // too. Zod's `union` keeps the parse successful either way.\n finalAnswer: z\n .string()\n .optional()\n .nullable()\n .describe(\"The conclusion, decision, or answer the chain arrived at.\"),\n final_answer: z\n .string()\n .optional()\n .nullable()\n .describe(\"Alias for finalAnswer (snake_case). Gateway-tolerance shim.\"),\n observedOutcome: z\n .string()\n .optional()\n .nullable()\n .describe(\"Optional note about how the answer actually played out.\"),\n observed_outcome: z\n .string()\n .optional()\n .nullable()\n .describe(\"Alias for observedOutcome (snake_case). Gateway-tolerance shim.\"),\n })\n // Either finalAnswer OR final_answer must be present — enforce here so\n // the rest of the pipeline can assume a usable string downstream.\n .refine(\n (v) =>\n (typeof v.finalAnswer === \"string\" && v.finalAnswer.trim().length > 0) ||\n (typeof v.final_answer === \"string\" && v.final_answer.trim().length > 0),\n { message: \"reasoningTrace requires finalAnswer (or final_answer)\" },\n )\n .optional()\n .nullable()\n .describe(\n 'For category \"reasoning_trace\" only: a stored solution chain with ordered steps, a final answer, and an optional observed outcome. Require at least two steps.',\n ),\n eventTime: z\n .string()\n .optional()\n .nullable()\n .describe(\n 'Optional event-time expression for bi-temporal validity (#1578). An ISO date (\"2025-03-01\") or a relative expression verbatim (\"last March\", \"yesterday\", \"since 2024\", \"until 2025-06-01\"). Resolved against the source turn timestamp at write time — NOT wall-clock. Omit when the fact has no explicit temporal anchor.',\n ),\n event_time: z\n .string()\n .optional()\n .nullable()\n .describe(\"Alias for eventTime (snake_case). Gateway-tolerance shim (#1578).\"),\n}).superRefine((value, ctx) => {\n if (value.category === \"procedure\" && (!Array.isArray(value.procedureSteps) || value.procedureSteps.length < 2)) {\n ctx.addIssue({\n code: z.ZodIssueCode.custom,\n path: [\"procedureSteps\"],\n message: \"procedure facts require at least two procedureSteps\",\n });\n }\n\n if (value.category === \"reasoning_trace\" && value.reasoningTrace == null) {\n ctx.addIssue({\n code: z.ZodIssueCode.custom,\n path: [\"reasoningTrace\"],\n message: \"reasoning_trace facts require reasoningTrace\",\n });\n }\n});\n\nexport const EntityMentionSchema = z.object({\n name: z\n .string()\n .describe(\"Normalized entity name (e.g. jane-doe, acme-corp, my-project)\"),\n type: z.enum([\"person\", \"project\", \"tool\", \"company\", \"place\", \"other\"]),\n facts: z\n .array(z.string())\n .describe(\"New facts learned about this entity in this conversation\"),\n promptedByQuestion: z\n .string()\n .optional()\n .nullable()\n .describe(\"Optional proactive follow-up question that surfaced this entity.\"),\n structuredSections: z\n .array(z.object({\n key: z.string(),\n title: z.string(),\n facts: z.array(z.string()),\n }))\n .optional()\n .nullable()\n .describe(\"Optional named sections for entity-specific facts. Use when facts clearly belong under a durable heading such as Beliefs or Building / Working On.\"),\n});\n\nexport const ExtractedQuestionSchema = z.object({\n question: z.string().describe(\"A genuine question the AI is curious about based on this conversation\"),\n context: z.string().describe(\"Why this question matters or what prompted it\"),\n priority: z.number().min(0).max(1).describe(\"How important/urgent this question is (0-1)\"),\n});\n\nexport const ProactiveQuestionsResultSchema = z.object({\n questions: z\n .array(ExtractedQuestionSchema)\n .describe(\"Additional follow-up questions discovered in a proactive second-pass extraction.\"),\n});\n\nexport const ExtractedRelationshipSchema = z.object({\n source: z.string().describe(\"Source entity name (normalized, e.g. person-jane-doe)\"),\n target: z.string().describe(\"Target entity name (normalized, e.g. company-acme-corp)\"),\n label: z.string().describe(\"Relationship label (e.g. 'works at', 'created', 'manages')\"),\n promptedByQuestion: z\n .string()\n .optional()\n .nullable()\n .describe(\"Optional proactive follow-up question that surfaced this relationship.\"),\n});\n\nexport const ProactiveExtractionResultSchema = z.object({\n facts: z\n .array(ExtractedFactSchema)\n .describe(\n \"Additional high-confidence memories recovered only after answering proactive follow-up questions from the same buffered conversation.\",\n ),\n profileUpdates: z\n .array(z.string())\n .describe(\n \"Additional profile updates directly supported by the buffered conversation. Omit anything speculative.\",\n ),\n entities: z\n .array(EntityMentionSchema)\n .describe(\n \"Additional entities or entity facts surfaced by the proactive follow-up pass.\",\n ),\n relationships: z\n .array(ExtractedRelationshipSchema)\n .optional()\n .nullable()\n .describe(\n \"Additional relationships surfaced by the proactive follow-up pass.\",\n ),\n});\n\nexport const ExtractionResultSchema = z.object({\n facts: z\n .array(ExtractedFactSchema)\n .describe(\n \"Extracted memories from the conversation. Include facts, preferences, corrections, and decisions. Only extract genuinely new, durable information — skip transient task state.\",\n ),\n profileUpdates: z\n .array(z.string())\n .describe(\n \"Updates to the user's behavioral profile. Each string is a standalone statement about the user's preferences, habits, or personality. Only include genuinely new insights.\",\n ),\n entities: z\n .array(EntityMentionSchema)\n .describe(\n \"Entities mentioned in the conversation with new facts about them.\",\n ),\n questions: z\n .array(ExtractedQuestionSchema)\n .describe(\n \"1-3 genuine questions you're curious about from this conversation. These should be things you'd actually want to know the answer to in future sessions.\",\n ),\n identityReflection: z\n .string()\n .optional()\n .nullable()\n .describe(\n \"A brief reflection on what you learned about yourself as an agent in this interaction — patterns in your behavior, growth, things you did well or could improve.\",\n ),\n relationships: z\n .array(ExtractedRelationshipSchema)\n .optional()\n .nullable()\n .describe(\n \"Relationships between entities discovered in this conversation. Max 5 per extraction. Format: {source, target, label}.\",\n ),\n});\n\nexport const ConsolidationItemSchema = z.object({\n existingId: z\n .string()\n .describe(\"The ID of the existing memory being evaluated\"),\n action: z.enum([\"ADD\", \"MERGE\", \"UPDATE\", \"INVALIDATE\", \"SKIP\"]),\n mergeWith: z\n .string()\n .optional()\n .nullable()\n .describe(\"If MERGE, the ID of the memory to merge with\"),\n updatedContent: z\n .string()\n .optional()\n .nullable()\n .describe(\"If UPDATE or MERGE, the new content\"),\n reason: z.string().describe(\"Brief reason for this decision\"),\n});\n\nexport const ConsolidationResultSchema = z.object({\n items: z\n .array(ConsolidationItemSchema)\n .describe(\n \"Decisions for each existing memory: ADD (keep as-is), MERGE (combine with another), UPDATE (revise content), INVALIDATE (mark as outdated/wrong), SKIP (no action needed)\",\n ),\n profileUpdates: z\n .array(z.string())\n .describe(\"New profile statements to add or update\"),\n entityUpdates: z\n .array(EntityMentionSchema)\n .describe(\"Entity updates from consolidation analysis\"),\n});\n\nexport function buildProfileConsolidationResultSchema(targetLines: number) {\n return z.object({\n consolidatedProfile: z\n .string()\n .describe(\n `The full consolidated profile as markdown. Preserve all ## section headers. Merge duplicate or near-duplicate bullets into single clear statements. Remove stale or superseded information. Keep the most important and durable observations. Target roughly ${targetLines} lines.`,\n ),\n removedCount: z\n .number()\n .describe(\"Number of bullets removed or merged during consolidation\"),\n summary: z\n .string()\n .describe(\"Brief summary of what was consolidated\"),\n });\n}\n\nexport const ProfileConsolidationResultSchema = buildProfileConsolidationResultSchema(50);\n\nexport const IdentityConsolidationResultSchema = z.object({\n learnedPatterns: z\n .array(z.string())\n .describe(\n \"Consolidated behavioral patterns and lessons learned, each a concise standalone statement\",\n ),\n summary: z\n .string()\n .describe(\n \"A brief paragraph summarizing the agent's core identity insights\",\n ),\n});\n\nexport type IdentityConsolidationResultParsed = z.infer<\n typeof IdentityConsolidationResultSchema\n>;\n\n// Contradiction Verification (Phase 2B)\nexport const ContradictionVerificationSchema = z.object({\n isContradiction: z\n .boolean()\n .describe(\"Whether the two memories truly contradict each other\"),\n confidence: z\n .number()\n .min(0)\n .max(1)\n .describe(\"How confident are you in this assessment (0-1)\"),\n reasoning: z\n .string()\n .describe(\"Explanation of why these are or are not contradictory\"),\n whichIsNewer: z\n .enum([\"first\", \"second\", \"unclear\"])\n .describe(\"Which memory represents the more recent/current state\"),\n});\n\nexport type ContradictionVerificationResult = z.infer<\n typeof ContradictionVerificationSchema\n>;\n\n// Memory Linking (Phase 3A)\nexport const MemoryLinkSchema = z.object({\n targetId: z\n .string()\n .describe(\"The ID of the memory this links to\"),\n linkType: z\n .enum([\"follows\", \"references\", \"contradicts\", \"supports\", \"related\"])\n .describe(\"The type of relationship\"),\n strength: z\n .number()\n .min(0)\n .max(1)\n .describe(\"How strong is this relationship (0-1)\"),\n reason: z\n .string()\n .optional()\n .nullable()\n .describe(\"Why this link exists\"),\n});\n\nexport const SuggestedLinksSchema = z.object({\n links: z\n .array(MemoryLinkSchema)\n .describe(\"Suggested links between memories based on semantic analysis\"),\n});\n\nexport type MemoryLink = z.infer<typeof MemoryLinkSchema>;\nexport type SuggestedLinks = z.infer<typeof SuggestedLinksSchema>;\n\n// Memory Summarization (Phase 4A)\nexport const MemorySummarySchema = z.object({\n summaryText: z\n .string()\n .describe(\"A concise summary of the batch of memories\"),\n keyFacts: z\n .array(z.string())\n .describe(\"The most important facts extracted from these memories\"),\n keyEntities: z\n .array(z.string())\n .describe(\"Key entities mentioned across these memories\"),\n});\n\nexport type MemorySummaryResult = z.infer<typeof MemorySummarySchema>;\n\nexport const DaySummaryResultSchema = z.object({\n summary: z.string().min(1).describe(\"A concise end-of-day summary paragraph.\"),\n bullets: z.array(z.string()).default([]).describe(\"The most important moments from the day.\"),\n next_actions: z.array(z.string()).default([]).describe(\"Concrete next actions for tomorrow.\"),\n risks_or_open_loops: z.array(z.string()).default([]).describe(\"Open loops, blockers, or fragile assumptions still needing attention.\"),\n});\n\n// v8.15 behavior-loop auto-tuning state contracts\nexport const BehaviorLoopAdjustmentSchema = z.object({\n parameter: z.string().min(1),\n previousValue: z.number(),\n nextValue: z.number(),\n delta: z.number(),\n evidenceCount: z.number().int().min(0),\n confidence: z.number().min(0).max(1),\n reason: z.string(),\n appliedAt: z.string(),\n});\n\nexport const BehaviorLoopPolicyStateSchema = z.object({\n version: z.number().int().min(0),\n windowDays: z.number().int().min(0),\n minSignalCount: z.number().int().min(0),\n maxDeltaPerCycle: z.number().min(0).max(1),\n protectedParams: z.array(z.string()),\n adjustments: z.array(BehaviorLoopAdjustmentSchema),\n updatedAt: z.string(),\n});\n\nexport type BehaviorLoopAdjustmentParsed = z.infer<typeof BehaviorLoopAdjustmentSchema>;\nexport type BehaviorLoopPolicyStateParsed = z.infer<typeof BehaviorLoopPolicyStateSchema>;\n\nexport type MemoryActionTypeParsed = z.infer<typeof MemoryActionTypeSchema>;\nexport type MemoryActionEligibilityContextParsed = z.infer<typeof MemoryActionEligibilityContextSchema>;\nexport type ExtractedFactParsed = z.infer<typeof ExtractedFactSchema>;\nexport type EntityMentionParsed = z.infer<typeof EntityMentionSchema>;\nexport type ExtractedQuestionParsed = z.infer<typeof ExtractedQuestionSchema>;\nexport type ProactiveQuestionsResultParsed = z.infer<typeof ProactiveQuestionsResultSchema>;\nexport type ExtractionResultParsed = z.infer<typeof ExtractionResultSchema>;\nexport type ConsolidationItemParsed = z.infer<typeof ConsolidationItemSchema>;\nexport type ConsolidationResultParsed = z.infer<\n typeof ConsolidationResultSchema\n>;\n"],"mappings":";AAAA,SAAS,SAAS;AAEX,IAAM,yBAAyB,EAAE,KAAK;AAAA,EAC3C;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AACF,CAAC;AAEM,IAAM,uCAAuC,EACjD,OAAO;AAAA,EACN,YAAY,EAAE,OAAO,EAAE,IAAI,CAAC,EAAE,IAAI,CAAC;AAAA,EACnC,gBAAgB,EAAE,KAAK,CAAC,UAAU,aAAa,aAAa,SAAS,UAAU,CAAC;AAAA,EAChF,YAAY,EAAE,OAAO,EAAE,IAAI,CAAC,EAAE,IAAI,CAAC;AAAA,EACnC,QAAQ,EAAE,KAAK,CAAC,cAAc,iBAAiB,UAAU,UAAU,SAAS,CAAC;AAC/E,CAAC,EACA,OAAO;AAEH,SAAS,sBAAsB,OAAwD;AAC5F,QAAM,SAAS,uBAAuB,UAAU,KAAK;AACrD,SAAO,OAAO,UAAU,OAAO,OAAO;AACxC;AAEO,SAAS,oCACd,OACsD;AACtD,QAAM,SAAS,qCAAqC,UAAU,KAAK;AACnE,MAAI,OAAO,QAAS,QAAO,OAAO;AAClC,SAAO;AAAA,IACL,YAAY;AAAA,IACZ,gBAAgB;AAAA,IAChB,YAAY;AAAA,IACZ,QAAQ;AAAA,EACV;AACF;AAEO,IAAM,6BAA6B,EAAE,OAAO;AAAA,EACjD,OAAO,EAAE,OAAO;AAAA,EAChB,QAAQ,EAAE,OAAO;AAAA,EACjB,UAAU,EACP,OAAO;AAAA,IACN,MAAM,EAAE,OAAO;AAAA,IACf,WAAW,EAAE,OAAO;AAAA,EACtB,CAAC,EACA,SAAS,EACT,SAAS;AAAA,EACZ,iBAAiB,EAAE,OAAO,EAAE,SAAS,EAAE,SAAS;AAAA,EAChD,UAAU,EAAE,QAAQ,EAAE,SAAS,EAAE,SAAS;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AI,CAAC;AAAA,EACzC,iBAAiB,EAAE,MAAM,EAAE,OAAO,CAAC;AAAA,EACnC,aAAa,EAAE,MAAM,4BAA4B;AAAA,EACjD,WAAW,EAAE,OAAO;AACtB,CAAC;","names":[]}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import {
|
|
2
2
|
EngramAccessInputError
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-STYMKPFT.js";
|
|
4
4
|
import {
|
|
5
5
|
expandTildePath
|
|
6
6
|
} from "./chunk-EYIEWJNI.js";
|
|
@@ -104,4 +104,4 @@ export {
|
|
|
104
104
|
listRegisteredOperations,
|
|
105
105
|
__resetRegistryForTest
|
|
106
106
|
};
|
|
107
|
-
//# sourceMappingURL=chunk-
|
|
107
|
+
//# sourceMappingURL=chunk-66TSLESZ.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../src/access-boundary.ts"],"sourcesContent":["/**\n * Single input-validation and error boundary for the CLI/MCP/HTTP access\n * surfaces (issue #1525, epic #1520 Phase 1).\n *\n * Every operation that crosses the access-service facade passes through ONE\n * registry entry: a zod-validated request envelope, a shared error mapper,\n * and the \"reject invalid input and list valid options\" behavior that\n * CLAUDE.md rules 14/17/24/28/36/48/51 previously had to be re-implemented\n * per handler. The three surfaces become thin adapters — one operation\n * definition, three transports — so a validation fix lands everywhere at\n * once.\n *\n * Host-agnostic (rule 31): operation names carry no `openclaw-*`/`engram-*`\n * prefix. Session/namespace tenancy stays in the handler layer (resolved via\n * ScopePlan #1521); the boundary validates SHAPE, not tenancy.\n */\n\nimport { z } from \"zod\";\nimport { EngramAccessInputError, type EngramAccessService } from \"./access-service.js\";\nimport { expandTildePath } from \"./utils/path.js\";\n\n// ---------------------------------------------------------------------------\n// Canonical operation names — host-agnostic (rule 31)\n// ---------------------------------------------------------------------------\n\n/**\n * Canonical operation ids. One id is shared by the MCP tool, the HTTP route,\n * and the CLI command that expose the same operation. Add to this union as\n * each domain-group migration PR (memory ops → connectors → namespaces …)\n * lands; the fitness test in `access-surface-catalog.test.ts` treats the\n * registered set as the migration state.\n */\nexport type OperationName =\n | \"memory_get\"\n | \"memory_search\"\n | \"memory_store\"\n | \"coding_decision\"\n | \"coding_architecture\"\n // codegraph parity tools (issue #1554) -- each maps to one codegraph_*\n // boundary operation that delegates to the surface handler in\n // coding/codegraph-surfaces.ts. Names match the external tool suffixes.\n | \"codegraph_index\"\n | \"codegraph_list_projects\"\n | \"codegraph_delete_project\"\n | \"codegraph_index_status\"\n | \"codegraph_search_graph\"\n | \"codegraph_trace_path\"\n | \"codegraph_detect_changes\"\n | \"codegraph_query_graph\"\n | \"codegraph_get_schema\"\n | \"codegraph_get_snippet\"\n | \"codegraph_get_architecture\"\n | \"codegraph_search_code\"\n | \"codegraph_manage_adr\"\n | \"codegraph_ingest_traces\"\n | \"coding_delta\"\n // Remaining MCP/HTTP handlers migrated through the boundary (issue #1525).\n | \"recall\"\n | \"recall_explain\"\n | \"set_coding_context\"\n | \"recall_tier_explain\"\n | \"recall_xray\"\n | \"wearables_status\"\n | \"wearables_sync\"\n | \"transcript_day\"\n | \"transcript_search\"\n | \"transcript_memories\"\n | \"action_confidence\"\n | \"chatgpt_memory_inspector\"\n | \"day_summary\"\n | \"capsule_export\"\n | \"capsule_import\"\n | \"capsule_list\"\n | \"memory_governance_run\"\n | \"procedure_mining_run\"\n | \"pattern_reinforcement_run\"\n | \"procedural_stats\"\n | \"memory_timeline\"\n | \"suggestion_submit\"\n | \"entity_get\"\n | \"review_queue_list\"\n | \"observe\"\n | \"lcm_search\"\n | \"lcm_compaction_flush\"\n | \"lcm_compaction_record\"\n | \"continuity_audit_generate\"\n | \"continuity_incident_open\"\n | \"continuity_incident_close\"\n | \"continuity_incident_list\"\n | \"continuity_loop_add_or_update\"\n | \"continuity_loop_review\"\n | \"identity_anchor_get\"\n | \"identity_anchor_update\"\n | \"memory_identity\"\n | \"work_task\"\n | \"work_project\"\n | \"work_board\"\n | \"shared_context_write_output\"\n | \"shared_feedback_record\"\n | \"shared_priorities_append\"\n | \"shared_context_cross_signals_run\"\n | \"shared_context_curate_daily\"\n | \"compounding_weekly_synthesize\"\n | \"compounding_promote_candidate\"\n | \"compression_guidelines_optimize\"\n | \"compression_guidelines_activate\"\n | \"memory_profile\"\n | \"memory_entities_list\"\n | \"memory_questions\"\n | \"memory_last_recall\"\n | \"memory_intent_debug\"\n | \"memory_qmd_debug\"\n | \"memory_graph_explain\"\n | \"graph_snapshot\"\n | \"memory_feedback\"\n | \"memory_promote\"\n | \"memory_outcome\"\n | \"memory_action_apply\"\n | \"context_checkpoint\"\n | \"briefing\"\n | \"review_list\"\n | \"review_resolve\"\n | \"contradiction_scan_run\"\n | \"memory_summarize_hourly\"\n | \"conversation_index_update\"\n | \"profiling_report\"\n | \"graph_edge_decay_run\"\n | \"live_connectors_run\"\n | \"peer_list\"\n | \"peer_get\"\n | \"peer_set\"\n | \"peer_delete\"\n | \"peer_profile_get\"\n | \"peer_forget\"\n | \"console_state\"\n | \"dreams_status\"\n | \"dreams_run\"\n // HTTP-only routes (no direct MCP tool equivalent).\n | \"offline_sync_snapshot\"\n | \"offline_sync_snapshot_stream\"\n | \"offline_sync_files\"\n | \"offline_sync_file_content\"\n | \"offline_sync_apply_file_content\"\n | \"offline_sync_apply\"\n | \"lcm_status\"\n | \"memory_list\"\n | \"entity_list\"\n | \"maintenance_status\"\n | \"quality_status\"\n | \"trust_zones_status\"\n | \"trust_zones_records\"\n | \"review_disposition\"\n | \"trust_zones_promote\"\n | \"trust_zones_demo_seed\"\n | \"citations_observed\"\n | \"contradiction_detail\"\n | \"graph_events\";\n\n// ---------------------------------------------------------------------------\n// Operation context — what every handler receives\n// ---------------------------------------------------------------------------\n\n/**\n * Per-call context. `service` is the facade the handler delegates to; the\n * boundary never reaches past it. `authenticatedPrincipal` is resolved by\n * the SURFACE (MCP header / HTTP identity / CLI flag) before the boundary\n * runs, so handlers stay principal-source-agnostic. `hooks` carries\n * transport-level callbacks (e.g. HTTP write-quota enforcement) that must\n * fire atomically inside the service call; surfaces that have no such hook\n * leave it undefined.\n */\nexport interface OperationContext {\n readonly service: EngramAccessService;\n readonly authenticatedPrincipal?: string;\n readonly hooks?: OperationHooks;\n}\n\n/**\n * Transport-level callbacks a handler forwards into the service call. Kept\n * narrow on purpose: the boundary owns validation + dispatch shape, not\n * transport policy. Add fields here only when a surface genuinely needs a\n * callback the service itself consumes.\n */\nexport interface OperationHooks {\n /** HTTP write-quota gate; throws to reject the write when exhausted. */\n readonly enforceWriteQuota?: () => void | Promise<void>;\n}\n\n// ---------------------------------------------------------------------------\n// Operation spec + bound operation\n// ---------------------------------------------------------------------------\n\nexport interface OperationSpec<In, Out> {\n /** Canonical operation id; matches an {@link OperationName}. */\n readonly name: OperationName;\n readonly description: string;\n /** Zod schema validating the raw request envelope. */\n readonly schema: z.ZodType<In>;\n /** Handler invoked with the parsed input; throws EngramAccessInputError for domain faults. */\n readonly handler: (input: In, ctx: OperationContext) => Promise<Out>;\n}\n\nexport interface BoundOperation<In = unknown, Out = unknown> {\n readonly spec: OperationSpec<In, Out>;\n /** Validate the raw envelope, then invoke the handler. Throws EngramAccessInputError on any validation failure. */\n readonly run: (rawInput: unknown, ctx: OperationContext) => Promise<Out>;\n}\n\n// ---------------------------------------------------------------------------\n// Shared normalizers the boundary owns (rules 17, 28, 36, 48, 51)\n// ---------------------------------------------------------------------------\n\n/**\n * Coerce boolean-like strings at the edge (rule 36). Accepts actual booleans\n * and the string spellings clients send (\"true\"/\"false\"/\"1\"/\"0\"/\"yes\"/\"no\"/\n * \"on\"/\"off\", case-insensitive). Rejects anything else loudly — `Boolean(\"false\")`\n * would silently be `true`, which is the bug rule 36 exists to prevent.\n *\n * `undefined`/`null`/`\"\"` → `undefined`, so callers can keep treating an\n * absent flag as \"use the default\" without a separate presence check.\n */\nexport function coerceBooleanLike(value: unknown): boolean | undefined {\n if (value === undefined || value === null || value === \"\") return undefined;\n if (typeof value === \"boolean\") return value;\n if (typeof value === \"string\") {\n const lower = value.trim().toLowerCase();\n if (lower === \"true\" || lower === \"1\" || lower === \"yes\" || lower === \"on\") return true;\n if (lower === \"false\" || lower === \"0\" || lower === \"no\" || lower === \"off\") return false;\n }\n throw new EngramAccessInputError(\n `expected a boolean-like value (true|false|1|0|yes|no|on|off); got ${JSON.stringify(value)}`,\n );\n}\n\n/**\n * Coerce + validate a positive integer from a numeric string or number\n * (rule 28). Loosely-typed MCP/CLI clients send `\"5\"`; `typeof saved === \"number\"`\n * on read-back would reject it later, so we coerce at the edge and reject\n * booleans/objects loudly (`Number(true) === 1` would silently pass otherwise).\n *\n * `undefined`/`null`/`\"\"` → `undefined`.\n */\nexport function coercePositiveInteger(value: unknown, label: string): number | undefined {\n if (value === undefined || value === null || value === \"\") return undefined;\n if (typeof value === \"number\") {\n if (!Number.isFinite(value) || value <= 0 || !Number.isInteger(value)) {\n throw new EngramAccessInputError(`${label} expects a positive integer; got ${JSON.stringify(value)}`);\n }\n return value;\n }\n if (typeof value === \"string\") {\n const trimmed = value.trim();\n if (!/^[+-]?\\d+$/.test(trimmed)) {\n throw new EngramAccessInputError(`${label} expects a positive integer; got ${JSON.stringify(value)}`);\n }\n const parsed = Number(trimmed);\n if (!Number.isSafeInteger(parsed) || parsed <= 0) {\n throw new EngramAccessInputError(`${label} expects a positive integer; got ${JSON.stringify(value)}`);\n }\n return parsed;\n }\n throw new EngramAccessInputError(`${label} expects a positive integer; got ${JSON.stringify(value)}`);\n}\n\n/**\n * Expand `~` in a path-shaped input (rule 17). Node `fs` does NOT expand `~`;\n * ad-hoc regex drifts. `undefined`/`null`/`\"\"` → `undefined`.\n */\nexport function normalizeOptionalPath(value: unknown): string | undefined {\n if (value === undefined || value === null || value === \"\") return undefined;\n if (typeof value !== \"string\") {\n throw new EngramAccessInputError(`expected a path string; got ${JSON.stringify(value)}`);\n }\n return expandTildePath(value);\n}\n\n// ---------------------------------------------------------------------------\n// Error formatting — rule 51: list valid options, never silently default\n// ---------------------------------------------------------------------------\n\n/**\n * Turn a zod failure into an {@link EngramAccessInputError} whose message\n * names the offending field and — for enum/union issues — lists the valid\n * options, so the caller can correct rather than guess (rule 51).\n */\nexport function formatZodIssues(error: z.ZodError): string {\n const parts: string[] = [];\n for (const issue of error.issues) {\n const path = issue.path.length > 0 ? issue.path.join(\".\") : \"(root)\";\n const options = enumOptionsFromIssue(issue);\n const suffix = options ? `. Valid: ${options.join(\", \")}` : \"\";\n parts.push(`${path}: ${issue.message}${suffix}`);\n }\n return parts.length > 0\n ? `request validation failed: ${parts.join(\"; \")}`\n : \"request validation failed\";\n}\n\nfunction enumOptionsFromIssue(issue: z.ZodIssue): readonly string[] | undefined {\n // zod exposes accepted enum values on the issue for ZodEnum / ZodNativeEnum\n // and on the options of invalid_union discriminators. Reading them here\n // keeps \"list valid options\" in ONE place rather than per handler.\n if (issue.code === z.ZodIssueCode.invalid_enum_value) {\n const rawOptions = (issue as { options?: unknown }).options;\n if (Array.isArray(rawOptions)) {\n return rawOptions.map((opt) => String(opt));\n }\n }\n return undefined;\n}\n\n// ---------------------------------------------------------------------------\n// Registry\n// ---------------------------------------------------------------------------\n\nconst registry = new Map<OperationName, BoundOperation>();\n\n/**\n * Register an operation. Throws if the name is already registered — duplicate\n * registration is a programming error, not a runtime input fault, so it throws\n * a plain Error (not the input-error class surfaces translate for clients).\n */\nexport function defineOperation<In, Out>(spec: OperationSpec<In, Out>): BoundOperation<In, Out> {\n if (registry.has(spec.name)) {\n throw new Error(`access-boundary: operation already registered: ${spec.name}`);\n }\n const bound: BoundOperation<In, Out> = {\n spec,\n run: async (rawInput, ctx) => {\n const parseResult = spec.schema.safeParse(rawInput);\n if (!parseResult.success) {\n throw new EngramAccessInputError(formatZodIssues(parseResult.error));\n }\n return spec.handler(parseResult.data, ctx);\n },\n };\n // Store under the canonical name; the cast is safe because In/Out are\n // erased at the registry boundary and recovered by callers via getOperation.\n registry.set(spec.name, bound as unknown as BoundOperation);\n return bound;\n}\n\n/** Look up a registered operation by canonical name. */\nexport function getOperation(name: OperationName): BoundOperation | undefined {\n return registry.get(name);\n}\n\n/** All registered operation names. */\nexport function listRegisteredOperations(): readonly OperationName[] {\n return [...registry.keys()];\n}\n\n/** Test-only: clear the registry so pilot definitions can be re-registered. */\nexport function __resetRegistryForTest(): void {\n registry.clear();\n}\n"],"mappings":";;;;;;;;AAiBA,SAAS,SAAS;AA4MX,SAAS,kBAAkB,OAAqC;AACrE,MAAI,UAAU,UAAa,UAAU,QAAQ,UAAU,GAAI,QAAO;AAClE,MAAI,OAAO,UAAU,UAAW,QAAO;AACvC,MAAI,OAAO,UAAU,UAAU;AAC7B,UAAM,QAAQ,MAAM,KAAK,EAAE,YAAY;AACvC,QAAI,UAAU,UAAU,UAAU,OAAO,UAAU,SAAS,UAAU,KAAM,QAAO;AACnF,QAAI,UAAU,WAAW,UAAU,OAAO,UAAU,QAAQ,UAAU,MAAO,QAAO;AAAA,EACtF;AACA,QAAM,IAAI;AAAA,IACR,qEAAqE,KAAK,UAAU,KAAK,CAAC;AAAA,EAC5F;AACF;AAUO,SAAS,sBAAsB,OAAgB,OAAmC;AACvF,MAAI,UAAU,UAAa,UAAU,QAAQ,UAAU,GAAI,QAAO;AAClE,MAAI,OAAO,UAAU,UAAU;AAC7B,QAAI,CAAC,OAAO,SAAS,KAAK,KAAK,SAAS,KAAK,CAAC,OAAO,UAAU,KAAK,GAAG;AACrE,YAAM,IAAI,uBAAuB,GAAG,KAAK,oCAAoC,KAAK,UAAU,KAAK,CAAC,EAAE;AAAA,IACtG;AACA,WAAO;AAAA,EACT;AACA,MAAI,OAAO,UAAU,UAAU;AAC7B,UAAM,UAAU,MAAM,KAAK;AAC3B,QAAI,CAAC,aAAa,KAAK,OAAO,GAAG;AAC/B,YAAM,IAAI,uBAAuB,GAAG,KAAK,oCAAoC,KAAK,UAAU,KAAK,CAAC,EAAE;AAAA,IACtG;AACA,UAAM,SAAS,OAAO,OAAO;AAC7B,QAAI,CAAC,OAAO,cAAc,MAAM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AA,EAC/E;AACA,QAAM,QAAiC;AAAA,IACrC;AAAA,IACA,KAAK,OAAO,UAAU,QAAQ;AAC5B,YAAM,cAAc,KAAK,OAAO,UAAU,QAAQ;AAClD,UAAI,CAAC,YAAY,SAAS;AACxB,cAAM,IAAI,uBAAuB,gBAAgB,YAAY,KAAK,CAAC;AAAA,MACrE;AACA,aAAO,KAAK,QAAQ,YAAY,MAAM,GAAG;AAAA,IAC3C;AAAA,EACF;AAGA,WAAS,IAAI,KAAK,MAAM,KAAkC;AAC1D,SAAO;AACT;AAGO,SAAS,aAAa,MAAiD;AAC5E,SAAO,SAAS,IAAI,IAAI;AAC1B;AAGO,SAAS,2BAAqD;AACnE,SAAO,CAAC,GAAG,SAAS,KAAK,CAAC;AAC5B;AAGO,SAAS,yBAA+B;AAC7C,WAAS,MAAM;AACjB;","names":[]}
|
|
@@ -15,6 +15,14 @@ function effectiveInvalidAt(fm) {
|
|
|
15
15
|
}
|
|
16
16
|
function isValidAsOf(fm, asOfMs) {
|
|
17
17
|
if (!Number.isFinite(asOfMs)) return true;
|
|
18
|
+
const explicitValidAt = fm.valid_at?.trim();
|
|
19
|
+
if ((!explicitValidAt || explicitValidAt.length === 0) && fm.eventTimeSource === "extracted") {
|
|
20
|
+
const invalidAt2 = effectiveInvalidAt(fm);
|
|
21
|
+
if (invalidAt2 !== void 0) {
|
|
22
|
+
const invalidAtMs2 = Date.parse(invalidAt2);
|
|
23
|
+
if (Number.isFinite(invalidAtMs2)) return invalidAtMs2 > asOfMs;
|
|
24
|
+
}
|
|
25
|
+
}
|
|
18
26
|
const validAtMs = Date.parse(effectiveValidAt(fm));
|
|
19
27
|
if (!Number.isFinite(validAtMs)) return false;
|
|
20
28
|
if (validAtMs > asOfMs) return false;
|
|
@@ -54,4 +62,4 @@ export {
|
|
|
54
62
|
isValidityExpiredNow,
|
|
55
63
|
parseAsOfTimestamp
|
|
56
64
|
};
|
|
57
|
-
//# sourceMappingURL=chunk-
|
|
65
|
+
//# sourceMappingURL=chunk-6CIAGZ6X.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../src/temporal-validity.ts"],"sourcesContent":["/**\n * Temporal validity helpers (issue #680).\n *\n * `valid_at` / `invalid_at` are explicit ISO 8601 timestamps that mark when a\n * fact begins and ends being authoritative. These helpers centralize the\n * read-time defaulting rules so every call site (recall filter, supersession\n * write, tests) agrees on the canonical semantics:\n *\n * - `effectiveValidAt(fm)` — the moment this fact starts being true.\n * Falls back to `created` when `valid_at` is absent so legacy memories\n * written before #680 still participate in `as_of` filtering without\n * a backfill migration.\n * - `effectiveInvalidAt(fm)` — the moment this fact stops being true.\n * Returns `undefined` when no `invalid_at` is set; supersession logic\n * populates it on the older fact when a newer one replaces it.\n * - `isValidAsOf(fm, asOfMs)` — true when the fact was authoritative at\n * `asOfMs` (a numeric timestamp in ms). Half-open interval semantics:\n * `valid_at <= asOf < invalid_at`. Strings are parsed via\n * `Date.parse()` so timezone-suffixed ISO strings compare correctly\n * (CLAUDE.md gotcha — never compare ISO strings lexicographically).\n *\n * Boundary case: when `invalid_at === asOf`, the fact is treated as NOT\n * valid (the upper bound is exclusive), which matches the supersession\n * model — at the instant a successor's `valid_at` fires, the predecessor\n * is no longer authoritative.\n */\nimport type { MemoryFrontmatter } from \"./types.js\";\n\nexport function effectiveValidAt(fm: Pick<MemoryFrontmatter, \"valid_at\" | \"created\">): string {\n // `created` is required on every memory (see types.ts), so the fallback\n // chain always terminates. Trimming guards against whitespace-only\n // overrides written by legacy tooling.\n const explicit = fm.valid_at?.trim();\n if (explicit && explicit.length > 0) return explicit;\n return fm.created;\n}\n\nexport function effectiveInvalidAt(\n fm: Pick<MemoryFrontmatter, \"invalid_at\" | \"supersededAt\" | \"status\">,\n): string | undefined {\n const explicit = fm.invalid_at?.trim();\n if (explicit && explicit.length > 0) return explicit;\n // Cursor Medium rounds 1+2 on PR #713: legacy data written before\n // #680 has `status: superseded` and `supersededAt` populated, but\n // no `invalid_at`. With the new `as_of` filter bypassing the\n // supersession status check, those legacy predecessors would\n // otherwise be treated as \"always valid\" and surface alongside\n // their successors at every historical pin. Fall back to\n // `supersededAt` so the half-open `[valid_at, invalid_at)`\n // interval still terminates for legacy supersedes without\n // requiring a backfill migration.\n //\n // BOUNDARY APPROXIMATION: `supersededAt` is when the supersession\n // write fired, which may post-date the successor's true\n // `valid_at` (consolidation runs on its own cadence). So the\n // legacy predecessor stays visible from `valid_at` through\n // `supersededAt` rather than the tighter `valid_at` through\n // successor-`valid_at` window. We accept this intentionally: the\n // alternative — successor-aware coordination — would require\n // threading the successor through every call site, and \"show the\n // legacy fact a bit too long\" is a clear win over \"drop legacy\n // facts entirely from `as_of`\". New data (post-#680) writes\n // `invalid_at` directly and is unaffected.\n if (fm.status === \"superseded\") {\n const legacy = fm.supersededAt?.trim();\n if (legacy && legacy.length > 0) return legacy;\n }\n return undefined;\n}\n\n/**\n * Returns true when the fact was authoritative at `asOfMs` (parsed\n * milliseconds since epoch). Half-open semantics: a fact is valid in\n * `[valid_at, invalid_at)`.\n *\n * If `valid_at` cannot be parsed, the fact is conservatively treated as\n * NOT valid at the requested point — we never silently default a corrupt\n * timestamp to \"always true\" because that would let bad data leak past\n * the historical filter (CLAUDE.md gotcha #34: distinguish empty from\n * malformed).\n */\nexport function isValidAsOf(\n fm: Pick<\n MemoryFrontmatter,\n | \"valid_at\"\n | \"invalid_at\"\n | \"created\"\n | \"supersededAt\"\n | \"status\"\n | \"eventTimeSource\"\n >,\n asOfMs: number,\n): boolean {\n if (!Number.isFinite(asOfMs)) return true;\n // Open-start bi-temporal interval (#1578 r3): an extracted end-only bound\n // (eventTimeSource \"extracted\", no valid_at, has invalid_at) is true from\n // the indefinite past. Without this, effectiveValidAt falls back to\n // `created` and a historical as_of before ingestion hides a fact that was\n // actually true up until invalid_at (chatgpt-codex thread on\n // orchestrator.ts:15533). Gated on eventTimeSource so legacy memories\n // (no bi-temporal provenance) keep the created-anchor fallback.\n const explicitValidAt = fm.valid_at?.trim();\n if (\n (!explicitValidAt || explicitValidAt.length === 0) &&\n fm.eventTimeSource === \"extracted\"\n ) {\n const invalidAt = effectiveInvalidAt(fm);\n if (invalidAt !== undefined) {\n const invalidAtMs = Date.parse(invalidAt);\n if (Number.isFinite(invalidAtMs)) return invalidAtMs > asOfMs;\n }\n }\n const validAtMs = Date.parse(effectiveValidAt(fm));\n if (!Number.isFinite(validAtMs)) return false;\n if (validAtMs > asOfMs) return false;\n const invalidAt = effectiveInvalidAt(fm);\n if (invalidAt === undefined) return true;\n const invalidAtMs = Date.parse(invalidAt);\n // Unparseable invalid_at — conservatively keep the fact (we can read\n // valid_at, so we know the fact was at some point true; corrupt\n // invalid_at is not a reason to hide it).\n if (!Number.isFinite(invalidAtMs)) return true;\n // Half-open: at exactly invalid_at, the fact is no longer valid.\n return invalidAtMs > asOfMs;\n}\n\n/**\n * Bi-temporal injection filter (issue #1578).\n *\n * Returns `true` when the fact's event-time interval has already ended before\n * `nowMs` — i.e. it is no longer *true in the world* and should leave the\n * default injection candidate set (it remains findable by explicit search\n * and `as_of` queries, mirroring the lifecycle-filter escape-hatch principle\n * in AGENTS.md §16). Gated by `temporalBiTemporal`; the escape hatch\n * `temporalExpiredInInjection` re-admits expired facts when a deployment\n * prefers the older always-inject behavior.\n *\n * Semantics: a fact is expired-now when `invalid_at` is present and\n * `invalid_at <= nowMs` (the exclusive upper bound has passed). Absent\n * `invalid_at` means \"still valid\" — never expired. This is the\n * status-orthogonal complement of `isValidAsOf` for the wall-clock instant:\n * an `active` memory can be validity-expired, and a `superseded` one can\n * still be validity-valid within its historical window (issue pitfall: the\n * filter is status-orthogonal).\n */\nexport function isValidityExpiredNow(\n fm: Pick<MemoryFrontmatter, \"invalid_at\">,\n nowMs: number,\n): boolean {\n if (!Number.isFinite(nowMs)) return false;\n const invalidAt = fm.invalid_at?.trim();\n if (!invalidAt || invalidAt.length === 0) return false;\n const invalidAtMs = Date.parse(invalidAt);\n // Unparseable invalid_at — conservatively keep the fact (do not filter on\n // corrupt data; the as_of path already handles malformed bounds).\n if (!Number.isFinite(invalidAtMs)) return false;\n // Half-open interval end has passed: [valid_at, invalid_at) ended.\n return invalidAtMs <= nowMs;\n}\n\n/**\n * Parse and validate an `as_of` value supplied at an input boundary\n * (CLI flag, HTTP query param, MCP field). Returns parsed milliseconds\n * on success; throws a `RangeError` with a helpful message on malformed\n * input. CLAUDE.md rule 51 — never silently default invalid input.\n */\nexport function parseAsOfTimestamp(raw: unknown): number {\n if (typeof raw !== \"string\" || raw.trim().length === 0) {\n throw new RangeError(\n `as_of must be a non-empty ISO 8601 timestamp string (got: ${typeof raw === \"string\" ? `\"${raw}\"` : typeof raw})`,\n );\n }\n const ms = Date.parse(raw);\n if (!Number.isFinite(ms)) {\n throw new RangeError(\n `as_of must be a parseable ISO 8601 timestamp (got: \"${raw}\")`,\n );\n }\n return ms;\n}\n"],"mappings":";AA4BO,SAAS,iBAAiB,IAA6D;AAI5F,QAAM,WAAW,GAAG,UAAU,KAAK;AACnC,MAAI,YAAY,SAAS,SAAS,EAAG,QAAO;AAC5C,SAAO,GAAG;AACZ;AAEO,SAAS,mBACd,IACoB;AACpB,QAAM,WAAW,GAAG,YAAY,KAAK;AACrC,MAAI,YAAY,SAAS,SAAS,EAAG,QAAO;AAsB5C,MAAI,GAAG,WAAW,cAAc;AAC9B,UAAM,SAAS,GAAG,cAAc,KAAK;AACrC,QAAI,UAAU,OAAO,SAAS,EAAG,QAAO;AAAA,EAC1C;AACA,SAAO;AACT;AAaO,SAAS,YACd,IASA,QACS;AACT,MAAI,CAAC,OAAO,SAAS,MAAM,EAAG,QAAO;AAQrC,QAAM,kBAAkB,GAAG,UAAU,KAAK;AAC1C,OACG,CAAC,mBAAmB,gBAAgB,WAAW,MAChD,GAAG,oBAAoB,aACvB;AACA,UAAMA,aAAY,mBAAmB,EAAE;AACvC,QAAIA,eAAc,QAAW;AAC3B,YAAMC,eAAc,KAAK,MAAMD,UAAS;AACxC,UAAI,OAAO,SAASC,YAAW,EAAG,QAAOA,eAAc;AAAA,IACzD;AAAA,EACF;AACA,QAAM,YAAY,KAAK,MAAM,iBAAiB,EAAE,CAAC;AACjD,MAAI,CAAC,OAAO,SAAS,SAAS,EAAG,QAAO;AACxC,MAAI,YAAY,OAAQ,QAAO;AAC/B,QAAM,YAAY,mBAAmB,EAAE;AACvC,MAAI,cAAc,OAAW,QAAO;AACpC,QAAM,cAAc,KAAK,MAAM,SAAS;AAIxC,MAAI,CAAC,OAAO,SAAS,WAAW,EAAG,QAAO;AAE1C,SAAO,cAAc;AACvB;AAqBO,SAAS,qBACd,IACA,OACS;AACT,MAAI,CAAC,OAAO,SAAS,KAAK,EAAG,QAAO;AACpC,QAAM,YAAY,GAAG,YAAY,KAAK;AACtC,MAAI,CAAC,aAAa,UAAU,WAAW,EAAG,QAAO;AACjD,QAAM,cAAc,KAAK,MAAM,SAAS;AAGxC,MAAI,CAAC,OAAO,SAAS,WAAW,EAAG,QAAO;AAE1C,SAAO,eAAe;AACxB;AAQO,SAAS,mBAAmB,KAAsB;AACvD,MAAI,OAAO,QAAQ,YAAY,IAAI,KAAK,EAAE,WAAW,GAAG;AACtD,UAAM,IAAI;AAAA,MACR,6DAA6D,OAAO,QAAQ,WAAW,IAAI,GAAG,MAAM,OAAO,GAAG;AAAA,IAChH;AAAA,EACF;AACA,QAAM,KAAK,KAAK,MAAM,GAAG;AACzB,MAAI,CAAC,OAAO,SAAS,EAAE,GAAG;AACxB,UAAM,IAAI;AAAA,MACR,uDAAuD,GAAG;AAAA,IAC5D;AAAA,EACF;AACA,SAAO;AACT;","names":["invalidAt","invalidAtMs"]}
|
|
@@ -1,14 +1,14 @@
|
|
|
1
|
+
import {
|
|
2
|
+
countRecallTokenOverlap,
|
|
3
|
+
normalizeRecallTokens
|
|
4
|
+
} from "./chunk-ZBJMUXZH.js";
|
|
1
5
|
import {
|
|
2
6
|
StorageManager
|
|
3
|
-
} from "./chunk-
|
|
7
|
+
} from "./chunk-2VQYHHWB.js";
|
|
4
8
|
import {
|
|
5
9
|
getCachedRuleMemories,
|
|
6
10
|
setCachedRuleMemories
|
|
7
11
|
} from "./chunk-AWJ2FHCF.js";
|
|
8
|
-
import {
|
|
9
|
-
countRecallTokenOverlap,
|
|
10
|
-
normalizeRecallTokens
|
|
11
|
-
} from "./chunk-ZBJMUXZH.js";
|
|
12
12
|
|
|
13
13
|
// src/semantic-rule-verifier.ts
|
|
14
14
|
var DEFAULT_MIN_EFFECTIVE_CONFIDENCE = 0.45;
|
|
@@ -117,4 +117,4 @@ export {
|
|
|
117
117
|
compareVerifiedSemanticRuleResults,
|
|
118
118
|
searchVerifiedSemanticRules
|
|
119
119
|
};
|
|
120
|
-
//# sourceMappingURL=chunk-
|
|
120
|
+
//# sourceMappingURL=chunk-6HPJMR5I.js.map
|
|
@@ -3,13 +3,13 @@ import {
|
|
|
3
3
|
} from "./chunk-7FL4CNPV.js";
|
|
4
4
|
import {
|
|
5
5
|
resolveCausalTrajectoryStoreDir
|
|
6
|
-
} from "./chunk-
|
|
7
|
-
import {
|
|
8
|
-
log
|
|
9
|
-
} from "./chunk-NU3CSQ4H.js";
|
|
6
|
+
} from "./chunk-YI7RZO7Y.js";
|
|
10
7
|
import {
|
|
11
8
|
normalizeRecallTokens
|
|
12
9
|
} from "./chunk-ZBJMUXZH.js";
|
|
10
|
+
import {
|
|
11
|
+
log
|
|
12
|
+
} from "./chunk-NU3CSQ4H.js";
|
|
13
13
|
import {
|
|
14
14
|
assertIsoRecordedAt,
|
|
15
15
|
assertString,
|
|
@@ -339,4 +339,4 @@ export {
|
|
|
339
339
|
scoreStitchCandidate,
|
|
340
340
|
stitchCausalChain
|
|
341
341
|
};
|
|
342
|
-
//# sourceMappingURL=chunk-
|
|
342
|
+
//# sourceMappingURL=chunk-74MYJSKB.js.map
|
|
@@ -1,3 +1,6 @@
|
|
|
1
|
+
import {
|
|
2
|
+
LcmDag
|
|
3
|
+
} from "./chunk-7N4KAIGN.js";
|
|
1
4
|
import {
|
|
2
5
|
LcmWorkQueue
|
|
3
6
|
} from "./chunk-TPDBFYEG.js";
|
|
@@ -14,9 +17,6 @@ import {
|
|
|
14
17
|
import {
|
|
15
18
|
LcmArchive
|
|
16
19
|
} from "./chunk-HW5EF6LV.js";
|
|
17
|
-
import {
|
|
18
|
-
LcmDag
|
|
19
|
-
} from "./chunk-7N4KAIGN.js";
|
|
20
20
|
import {
|
|
21
21
|
log
|
|
22
22
|
} from "./chunk-NU3CSQ4H.js";
|
|
@@ -513,4 +513,4 @@ export {
|
|
|
513
513
|
extractLcmConfig,
|
|
514
514
|
LcmEngine
|
|
515
515
|
};
|
|
516
|
-
//# sourceMappingURL=chunk-
|
|
516
|
+
//# sourceMappingURL=chunk-773DPI6T.js.map
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import {
|
|
2
|
-
SQLITE_SCHEMA_VERSION
|
|
3
|
-
} from "./chunk-Z734BLO3.js";
|
|
4
1
|
import {
|
|
5
2
|
parseConflictPolicy,
|
|
6
3
|
validateManifestRecords
|
|
7
4
|
} from "./chunk-G4IAEX6D.js";
|
|
5
|
+
import {
|
|
6
|
+
SQLITE_SCHEMA_VERSION
|
|
7
|
+
} from "./chunk-Z734BLO3.js";
|
|
8
8
|
import {
|
|
9
9
|
openBetterSqlite3
|
|
10
10
|
} from "./chunk-6KYMPV2O.js";
|
|
@@ -84,4 +84,4 @@ async function importSqlite(opts) {
|
|
|
84
84
|
export {
|
|
85
85
|
importSqlite
|
|
86
86
|
};
|
|
87
|
-
//# sourceMappingURL=chunk-
|
|
87
|
+
//# sourceMappingURL=chunk-APJQ6UEA.js.map
|
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
import {
|
|
2
2
|
createVersion
|
|
3
3
|
} from "./chunk-VF4XKTX3.js";
|
|
4
|
-
import {
|
|
5
|
-
decryptCapsuleFileInMemory,
|
|
6
|
-
isEncryptedCapsuleFile
|
|
7
|
-
} from "./chunk-UVYI6VIX.js";
|
|
8
4
|
import {
|
|
9
5
|
parseExportBundle
|
|
10
6
|
} from "./chunk-WEHSQBFR.js";
|
|
7
|
+
import {
|
|
8
|
+
decryptCapsuleFileInMemory,
|
|
9
|
+
isEncryptedCapsuleFile
|
|
10
|
+
} from "./chunk-X7Y7WX73.js";
|
|
11
11
|
import {
|
|
12
12
|
assertIsDirectoryNotSymlink,
|
|
13
13
|
assertRealpathInsideRoot,
|
|
@@ -227,4 +227,4 @@ function mintForkId(capsuleId, originalId, now) {
|
|
|
227
227
|
export {
|
|
228
228
|
importCapsule
|
|
229
229
|
};
|
|
230
|
-
//# sourceMappingURL=chunk-
|
|
230
|
+
//# sourceMappingURL=chunk-ARV3AUOM.js.map
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import {
|
|
2
2
|
listNamespaces
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-NM6TSEGQ.js";
|
|
4
4
|
import {
|
|
5
5
|
runConsolidationProvenanceCheck
|
|
6
6
|
} from "./chunk-7XH7VJN4.js";
|
|
@@ -9,7 +9,7 @@ import {
|
|
|
9
9
|
} from "./chunk-YBPYIAA5.js";
|
|
10
10
|
import {
|
|
11
11
|
summarizeNamespaceMaintenanceHealth
|
|
12
|
-
} from "./chunk-
|
|
12
|
+
} from "./chunk-Y6YHAGQP.js";
|
|
13
13
|
import {
|
|
14
14
|
analyzeSessionIntegrity,
|
|
15
15
|
applySessionRepair,
|
|
@@ -39,13 +39,13 @@ import {
|
|
|
39
39
|
import {
|
|
40
40
|
listMemoryGovernanceRuns,
|
|
41
41
|
readMemoryGovernanceRunArtifact
|
|
42
|
-
} from "./chunk-
|
|
42
|
+
} from "./chunk-ESMY4RJ4.js";
|
|
43
43
|
import {
|
|
44
44
|
analyzeGraphHealth
|
|
45
|
-
} from "./chunk-
|
|
45
|
+
} from "./chunk-YGKUAX2B.js";
|
|
46
46
|
import {
|
|
47
47
|
StorageManager
|
|
48
|
-
} from "./chunk-
|
|
48
|
+
} from "./chunk-2VQYHHWB.js";
|
|
49
49
|
import {
|
|
50
50
|
lintWorkspaceFiles
|
|
51
51
|
} from "./chunk-DM2T26WE.js";
|
|
@@ -789,7 +789,7 @@ async function summarizeBufferSurpriseDistribution(storage, config) {
|
|
|
789
789
|
}
|
|
790
790
|
}
|
|
791
791
|
async function summarizeGraphEdgeDecayStatus(config) {
|
|
792
|
-
const { readGraphEdgeDecayStatus } = await import("./graph-edge-decay-
|
|
792
|
+
const { readGraphEdgeDecayStatus } = await import("./graph-edge-decay-JLOF3YW4.js");
|
|
793
793
|
const enabled = config.graphEdgeDecayEnabled === true;
|
|
794
794
|
if (!enabled) {
|
|
795
795
|
return {
|
|
@@ -1395,4 +1395,4 @@ export {
|
|
|
1395
1395
|
runBenchmarkRecall,
|
|
1396
1396
|
runOperatorRepair
|
|
1397
1397
|
};
|
|
1398
|
-
//# sourceMappingURL=chunk-
|
|
1398
|
+
//# sourceMappingURL=chunk-BGAHTI4C.js.map
|
|
@@ -10,7 +10,7 @@ import {
|
|
|
10
10
|
import {
|
|
11
11
|
planNamespaceMaintenance,
|
|
12
12
|
runNamespaceMaintenanceBatchPlan
|
|
13
|
-
} from "./chunk-
|
|
13
|
+
} from "./chunk-W2S3Z5MT.js";
|
|
14
14
|
import {
|
|
15
15
|
resolveHomeDir
|
|
16
16
|
} from "./chunk-JUC24CTX.js";
|
|
@@ -441,4 +441,4 @@ var MaintenanceScheduler = class {
|
|
|
441
441
|
export {
|
|
442
442
|
MaintenanceScheduler
|
|
443
443
|
};
|
|
444
|
-
//# sourceMappingURL=chunk-
|
|
444
|
+
//# sourceMappingURL=chunk-C63MK3WL.js.map
|
|
@@ -16,6 +16,10 @@ import {
|
|
|
16
16
|
WearablesInputError,
|
|
17
17
|
describeErrorForOperator
|
|
18
18
|
} from "./chunk-7WV3F5DQ.js";
|
|
19
|
+
import {
|
|
20
|
+
countRecallTokenOverlap,
|
|
21
|
+
normalizeRecallTokens
|
|
22
|
+
} from "./chunk-ZBJMUXZH.js";
|
|
19
23
|
import {
|
|
20
24
|
composeDayTranscriptBody,
|
|
21
25
|
composeDayTranscriptMeta,
|
|
@@ -25,10 +29,6 @@ import {
|
|
|
25
29
|
resolveSpeaker,
|
|
26
30
|
serializeDayTranscript
|
|
27
31
|
} from "./chunk-M7XQSUBB.js";
|
|
28
|
-
import {
|
|
29
|
-
countRecallTokenOverlap,
|
|
30
|
-
normalizeRecallTokens
|
|
31
|
-
} from "./chunk-ZBJMUXZH.js";
|
|
32
32
|
|
|
33
33
|
// src/wearables/trust.ts
|
|
34
34
|
var TRUST_JUDGE_ACCEPT_BOOST = 0.15;
|
|
@@ -1161,4 +1161,4 @@ export {
|
|
|
1161
1161
|
syncWearableSource,
|
|
1162
1162
|
defaultTimezone
|
|
1163
1163
|
};
|
|
1164
|
-
//# sourceMappingURL=chunk-
|
|
1164
|
+
//# sourceMappingURL=chunk-DGTDRIUO.js.map
|