@remnic/core 9.65.6 → 9.65.7
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-admin-ops-surface.d.ts +11 -11
- package/dist/access-admin-ops-surface.js +31 -31
- package/dist/access-audit.js +2 -2
- package/dist/access-authorization-probe.d.ts +11 -11
- package/dist/access-authorization-probe.js +32 -32
- package/dist/access-boundary.d.ts +11 -11
- package/dist/access-boundary.js +31 -31
- package/dist/access-cli.js +111 -106
- package/dist/access-cli.js.map +1 -1
- package/dist/access-coding-context-resolution.d.ts +1 -1
- package/dist/access-extraction-force-flush.d.ts +11 -11
- package/dist/access-extraction-force-flush.js +31 -31
- package/dist/access-health-types.d.ts +1 -1
- package/dist/access-http-lcm-compaction.d.ts +11 -11
- package/dist/access-http-lifecycle-flush.d.ts +11 -11
- package/dist/access-http-offline-stream.d.ts +11 -11
- package/dist/access-http-query.d.ts +2 -2
- package/dist/access-http-query.js +33 -33
- package/dist/access-http.d.ts +13 -18
- package/dist/access-http.js +50 -48
- package/dist/access-identity-continuity-surface.d.ts +9 -9
- package/dist/access-identity-continuity-surface.js +31 -31
- package/dist/access-lcm-surface.d.ts +11 -11
- package/dist/access-lcm-surface.js +31 -31
- package/dist/access-mcp-output-schemas.js +1 -1
- package/dist/access-mcp.d.ts +11 -11
- package/dist/access-mcp.js +42 -40
- package/dist/access-memory-search-fanout.d.ts +2 -2
- package/dist/{access-namespace-preflight-D_6mo8ms.d.ts → access-namespace-preflight-8VYKmRX0.d.ts} +1 -1
- package/dist/access-namespace-preflight.d.ts +3 -3
- package/dist/access-namespace-preflight.js +31 -31
- package/dist/access-observe-write-surface.d.ts +11 -11
- package/dist/access-observe-write-surface.js +31 -31
- package/dist/access-offline-manifest.d.ts +9 -9
- package/dist/access-operations-batch.js +34 -34
- package/dist/access-operations.d.ts +12 -12
- package/dist/access-operations.js +39 -37
- package/dist/access-recall-concurrency.d.ts +11 -11
- package/dist/access-recall-concurrency.js +31 -31
- package/dist/access-recall-response.d.ts +11 -11
- package/dist/access-recall-response.js +31 -31
- package/dist/access-recall-surface.d.ts +11 -11
- package/dist/access-recall-surface.js +31 -31
- package/dist/access-schema.js +3 -3
- package/dist/{access-service-sbiNS5UB.d.ts → access-service-Crk__Git.d.ts} +8 -8
- package/dist/access-service-helpers.d.ts +11 -11
- package/dist/access-service.d.ts +11 -11
- package/dist/access-service.js +31 -31
- package/dist/access-surface-catalog.d.ts +11 -11
- package/dist/access-surface-catalog.js +43 -33
- package/dist/access-surface-catalog.js.map +1 -1
- package/dist/access-wearables-meetings-surface.d.ts +3 -3
- 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/active-recall.js +4 -4
- package/dist/adapters/index.js +4 -4
- package/dist/adapters/registry.js +2 -2
- package/dist/ambient-provenance.d.ts +1 -1
- package/dist/artifact-search.d.ts +1 -1
- package/dist/behavior-learner.d.ts +1 -1
- package/dist/behavior-signals.d.ts +1 -1
- package/dist/bootstrap.d.ts +9 -9
- package/dist/briefing-window.d.ts +2 -2
- package/dist/briefing.d.ts +2 -2
- package/dist/briefing.js +10 -10
- package/dist/buffer-surprise-report.d.ts +1 -1
- package/dist/buffer-turn-helpers.d.ts +1 -1
- package/dist/buffer.d.ts +2 -2
- package/dist/bulk-import/index.d.ts +3 -3
- 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/{catalog-DO_7zfkv.d.ts → catalog-DybwVNW3.d.ts} +1 -1
- package/dist/causal-behavior.d.ts +1 -1
- package/dist/causal-behavior.js +2 -2
- package/dist/causal-chain.js +2 -2
- package/dist/causal-consolidation.d.ts +1 -1
- package/dist/causal-consolidation.js +13 -13
- package/dist/causal-retrieval.js +2 -2
- package/dist/causal-trajectory-graph.d.ts +1 -1
- package/dist/causal-trajectory-graph.js +2 -2
- package/dist/causal-trajectory.js +1 -1
- package/dist/{chunk-OWHERGF2.js → chunk-2NLLXCJG.js} +2 -2
- package/dist/{chunk-NZPFCP5A.js → chunk-2PSX5BJU.js} +2 -2
- package/dist/chunk-3BCULS4U.js +1093 -0
- package/dist/chunk-3BCULS4U.js.map +1 -0
- package/dist/{chunk-W6J4POB6.js → chunk-3RI5Y7KU.js} +2 -2
- package/dist/{chunk-H7BZBSP6.js → chunk-52II7PB6.js} +4 -4
- package/dist/{chunk-IF4EY26E.js → chunk-5DH6PG4B.js} +2 -2
- package/dist/{chunk-M4AHBM72.js → chunk-5HERQ5FX.js} +10 -10
- package/dist/{chunk-IRXMJLTW.js → chunk-5HK3CJAR.js} +2 -2
- package/dist/{chunk-XAWIL7TC.js → chunk-5S4LQOPE.js} +2 -2
- package/dist/{chunk-IDQ6DKXC.js → chunk-5VPQSRQO.js} +3 -3
- package/dist/{chunk-ROEAEANL.js → chunk-6CPUQ5D6.js} +10 -10
- package/dist/{chunk-SR7JIRAR.js → chunk-7F27PCSN.js} +2 -2
- package/dist/{chunk-7OZSHBWK.js → chunk-7TCGNUVP.js} +2 -2
- package/dist/{chunk-KBOG7FJV.js → chunk-7WR462EM.js} +2 -2
- package/dist/{chunk-AYAZWXJI.js → chunk-A32YEQAM.js} +2 -2
- package/dist/{chunk-5GIZM4RX.js → chunk-ACOC27BB.js} +2 -2
- package/dist/{chunk-5W7MKXMU.js → chunk-AFR6AIM4.js} +144 -78
- package/dist/chunk-AFR6AIM4.js.map +1 -0
- package/dist/{chunk-OMZLBT4B.js → chunk-ANJXPFRS.js} +47 -26
- package/dist/chunk-ANJXPFRS.js.map +1 -0
- package/dist/{chunk-FC7TIRFS.js → chunk-AX7UXCHJ.js} +6 -1
- package/dist/chunk-AX7UXCHJ.js.map +1 -0
- package/dist/{chunk-6LS5OX3U.js → chunk-BJTHRFFC.js} +6 -6
- package/dist/chunk-BWGCOLEL.js +61 -0
- package/dist/chunk-BWGCOLEL.js.map +1 -0
- package/dist/{chunk-PGW64IFQ.js → chunk-CFGU52XJ.js} +2 -2
- package/dist/{chunk-DPNXADEI.js → chunk-D4QVPP3G.js} +2 -2
- package/dist/{chunk-2RXUZVPU.js → chunk-EOHKUWXW.js} +2 -2
- package/dist/{chunk-YNDLCWXS.js → chunk-EZ25VE3G.js} +4 -4
- package/dist/{chunk-ZK4BFABK.js → chunk-F635GAL7.js} +4 -4
- package/dist/{chunk-HWVNYNIV.js → chunk-F6QHHRWP.js} +2 -2
- package/dist/{chunk-YUTTMSC7.js → chunk-FMQ4MOQO.js} +89 -26
- package/dist/chunk-FMQ4MOQO.js.map +1 -0
- package/dist/{chunk-LDBFXD4F.js → chunk-FP7YTTVO.js} +3 -1
- package/dist/chunk-FP7YTTVO.js.map +1 -0
- package/dist/{chunk-O4BAGJDN.js → chunk-GEPACVWN.js} +2 -2
- package/dist/{chunk-XZBXINXZ.js → chunk-GIC6BASP.js} +4 -4
- package/dist/{chunk-PP7R754B.js → chunk-GPFZFCRN.js} +1 -1
- package/dist/{chunk-LSYD7GHZ.js → chunk-GTSVEEP3.js} +2 -2
- package/dist/{chunk-RQ2EQRRR.js → chunk-I4343FIA.js} +79 -6
- package/dist/chunk-I4343FIA.js.map +1 -0
- package/dist/{chunk-YWBOOBDP.js → chunk-I7EX6KSH.js} +58 -58
- package/dist/{chunk-3I22VWB3.js → chunk-IP4ZNT4U.js} +2 -2
- package/dist/{chunk-AXGFOFNY.js → chunk-IY7UXD3J.js} +2 -2
- package/dist/{chunk-6FUMA6AA.js → chunk-JAQXUGLN.js} +2 -2
- package/dist/{chunk-RKNJBZ55.js → chunk-JBPKEARU.js} +4 -4
- package/dist/chunk-JCCWJHOP.js +240 -0
- package/dist/chunk-JCCWJHOP.js.map +1 -0
- package/dist/{chunk-5W7CTZ2E.js → chunk-KQAFEZQX.js} +4 -4
- package/dist/{chunk-D2YNNDML.js → chunk-KWIGDKM2.js} +2 -2
- package/dist/{chunk-2JHRCWHT.js → chunk-LLQCM2U2.js} +85 -85
- package/dist/{chunk-OLBZ2WGG.js → chunk-LTBKKSCX.js} +2 -2
- package/dist/{chunk-RACZB5HT.js → chunk-N37X5RU7.js} +4 -4
- package/dist/{chunk-FEO2CDXR.js → chunk-NG3MBQV4.js} +2 -2
- package/dist/{chunk-AG46P24C.js → chunk-NNBZS3DY.js} +4 -4
- package/dist/{chunk-JGG5HVI2.js → chunk-OPGL46PX.js} +2 -2
- package/dist/{chunk-OUKBMQ2O.js → chunk-PD66CVSD.js} +2 -2
- package/dist/{chunk-7SSRXEZJ.js → chunk-PDDSFELN.js} +2 -2
- package/dist/{chunk-MVIYRRVJ.js → chunk-PMVPCZJZ.js} +5 -5
- package/dist/{chunk-D35XLYQ7.js → chunk-RGCF4XNH.js} +9 -9
- package/dist/{chunk-PNAGNVGK.js → chunk-RQE4TITU.js} +35 -30
- package/dist/chunk-RQE4TITU.js.map +1 -0
- package/dist/{chunk-X2DWBWOX.js → chunk-S3K2CIK5.js} +2 -2
- package/dist/{chunk-TWBQQ3FT.js → chunk-SEA6M7SS.js} +2 -2
- package/dist/{chunk-DYO24BNB.js → chunk-SVVIASVX.js} +2 -2
- package/dist/{chunk-7K5Q6COX.js → chunk-TVVEYCNW.js} +4 -4
- package/dist/{chunk-4K7IW3F7.js → chunk-UD7UNYRD.js} +34 -3
- package/dist/chunk-UD7UNYRD.js.map +1 -0
- package/dist/chunk-ULM7JCDH.js +154 -0
- package/dist/chunk-ULM7JCDH.js.map +1 -0
- package/dist/{chunk-NLUCDKLT.js → chunk-VKCAHCBI.js} +2 -2
- package/dist/{chunk-BXXOPKT5.js → chunk-VXVZ2GM3.js} +2 -2
- package/dist/chunk-W2UOAATB.js +521 -0
- package/dist/chunk-W2UOAATB.js.map +1 -0
- package/dist/{chunk-JFWZRUKP.js → chunk-WTOZBZNN.js} +3 -3
- package/dist/{chunk-UVYI6VIX.js → chunk-X7Y7WX73.js} +1 -1
- package/dist/{chunk-5TG4MU2U.js → chunk-YKWFK7XA.js} +5 -5
- package/dist/{chunk-BIJAWZYW.js → chunk-YMOPYG3K.js} +6 -6
- package/dist/{chunk-XUZ5CIEE.js → chunk-YRVAKONL.js} +1 -1
- package/dist/{chunk-53MZQEBD.js → chunk-YWSQD2IB.js} +2 -2
- package/dist/{chunk-US4IRASK.js → chunk-Z4U3UN56.js} +2 -2
- package/dist/{chunk-QMZY3GG6.js → chunk-ZAOHJDKH.js} +3 -3
- package/dist/{chunk-ZXUZ54Z5.js → chunk-ZIJDI4CP.js} +2 -2
- package/dist/{cli-Bfgo0n1L.d.ts → cli-B322UMvB.d.ts} +5 -5
- package/dist/cli.d.ts +13 -13
- package/dist/cli.js +75 -74
- package/dist/coding/pre-action-gate.d.ts +1 -1
- package/dist/coding/pre-action-gate.js +2 -2
- package/dist/compounding/engine.d.ts +2 -2
- package/dist/compounding/engine.js +10 -10
- 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/config.js +4 -4
- package/dist/connectors/codex-materialize-runner.d.ts +1 -1
- package/dist/connectors/codex-materialize-runner.js +10 -10
- package/dist/connectors/codex-materialize.d.ts +1 -1
- package/dist/connectors/index.d.ts +1 -1
- package/dist/connectors/index.js +10 -10
- package/dist/consolidation-provenance-check.d.ts +2 -2
- package/dist/consolidation-undo.d.ts +2 -2
- package/dist/contradiction/index.d.ts +3 -3
- package/dist/converge-config.d.ts +1 -1
- package/dist/convergence-refresh.d.ts +2 -2
- package/dist/convergence-refresh.js +12 -12
- 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/corpus-watermark.d.ts +1 -1
- package/dist/corpus-watermark.js +12 -12
- package/dist/cross-lingual-recall.d.ts +1 -1
- package/dist/dashboard-runtime.js +2 -2
- package/dist/day-summary.d.ts +1 -1
- package/dist/delinearize.d.ts +1 -1
- package/dist/dependency-propagation-config.d.ts +1 -1
- package/dist/{dependency-propagation-delivery-D23_x-s5.d.ts → dependency-propagation-delivery-BGcNairQ.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-origin-fields.d.ts +1 -1
- package/dist/entity-retrieval.d.ts +2 -2
- package/dist/entity-retrieval.js +10 -10
- package/dist/entity-schema.d.ts +1 -1
- package/dist/episodic-context.d.ts +1 -1
- package/dist/eval-trajectory-contracts.d.ts +256 -0
- package/dist/eval-trajectory-contracts.js +56 -0
- package/dist/eval-trajectory-store.d.ts +39 -0
- package/dist/eval-trajectory-store.js +19 -0
- package/dist/eval-trajectory-store.js.map +1 -0
- package/dist/eval-trajectory.d.ts +67 -0
- package/dist/eval-trajectory.js +46 -0
- package/dist/eval-trajectory.js.map +1 -0
- package/dist/event-order-recall.js +2 -2
- package/dist/explicit-capture.d.ts +9 -9
- package/dist/external-wiki-access.d.ts +11 -11
- package/dist/external-wiki-access.js +32 -32
- package/dist/external-wiki-collection-registration.d.ts +1 -1
- package/dist/external-wiki-collection.d.ts +1 -1
- package/dist/external-wiki-mcp-tools.d.ts +11 -11
- package/dist/extraction-error-classification.d.ts +1 -1
- 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-liveness.d.ts +1 -1
- package/dist/extraction-normalization.d.ts +1 -1
- package/dist/extraction-prompt.d.ts +1 -1
- package/dist/extraction-source-grounding-rules.d.ts +1 -1
- package/dist/extraction-source-grounding.d.ts +1 -1
- package/dist/extraction.d.ts +1 -1
- package/dist/extraction.js +12 -12
- package/dist/fallback-llm.d.ts +1 -1
- package/dist/graph-dashboard-diff.d.ts +1 -1
- package/dist/graph-dashboard-key.d.ts +1 -1
- package/dist/graph-dashboard-parser.d.ts +1 -1
- package/dist/{graph-edge-decay-FXGELBFA.js → graph-edge-decay-A4SDFMMS.js} +4 -4
- package/dist/graph-edge-decay-A4SDFMMS.js.map +1 -0
- package/dist/graph-edge-reinforcement.d.ts +1 -1
- package/dist/graph-path-reconstruction.d.ts +1 -1
- package/dist/graph-path-scoring.d.ts +1 -1
- package/dist/graph-snapshot.d.ts +1 -1
- package/dist/graph-snapshot.js +3 -3
- package/dist/graph.d.ts +1 -1
- package/dist/graph.js +3 -3
- package/dist/harmonic-retrieval.js +1 -1
- package/dist/importance.d.ts +1 -1
- package/dist/importers/index.d.ts +1 -1
- package/dist/in-flight-reads.d.ts +1 -1
- package/dist/{index--QhGIXF2.d.ts → index-By2QUAMh.d.ts} +2 -2
- package/dist/index.d.ts +26 -23
- package/dist/index.js +184 -142
- package/dist/intent.d.ts +1 -1
- package/dist/lcm/engine.d.ts +1 -1
- package/dist/lcm/engine.js +4 -4
- package/dist/lcm/index.d.ts +1 -1
- package/dist/lcm/index.js +13 -13
- 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/local-model-endpoint.d.ts +1 -1
- package/dist/location/index.d.ts +128 -1
- package/dist/location/index.js +60 -750
- package/dist/location/index.js.map +1 -1
- package/dist/maintenance/memory-governance.d.ts +1 -1
- package/dist/maintenance/memory-governance.js +10 -10
- package/dist/maintenance/rebuild-memory-lifecycle-ledger.d.ts +2 -2
- package/dist/maintenance/rebuild-memory-lifecycle-ledger.js +10 -10
- package/dist/maintenance/rebuild-memory-projection.d.ts +2 -2
- package/dist/maintenance/rebuild-memory-projection.js +11 -11
- package/dist/{maintenance-PFvY1Pw_.d.ts → maintenance-Dm2McrIx.d.ts} +4 -3
- package/dist/mcp-memory-inspector-app.d.ts +11 -11
- package/dist/mcp-read-only-tools.js +1 -1
- package/dist/memory-action-policy.d.ts +1 -1
- package/dist/memory-cache.d.ts +1 -1
- package/dist/memory-controller.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-snapshot.d.ts +1 -1
- package/dist/memory-subject-cli.d.ts +11 -11
- package/dist/memory-subject.d.ts +11 -11
- package/dist/memory-worth-outcomes.d.ts +47 -3
- package/dist/memory-worth-outcomes.js +5 -3
- package/dist/models-json.d.ts +1 -1
- package/dist/namespaces/migrate.d.ts +3 -3
- 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 +7 -7
- package/dist/namespaces/storage.d.ts +3 -3
- package/dist/namespaces/storage.js +10 -10
- package/dist/native-knowledge.d.ts +1 -1
- package/dist/offline-sync-impression-drain.d.ts +1 -1
- package/dist/operator-doctor-corpus.d.ts +1 -1
- package/dist/operator-doctor-corpus.js +13 -13
- package/dist/operator-doctor-replica.d.ts +1 -1
- package/dist/operator-toolkit.d.ts +3 -3
- package/dist/operator-toolkit.js +24 -24
- package/dist/orchestration/compression-guideline-coordinator.d.ts +2 -2
- package/dist/orchestration/maintenance.d.ts +4 -4
- package/dist/orchestration/maintenance.js +18 -16
- package/dist/{orchestrator-4wzJrPVm.d.ts → orchestrator-Co1DyfuP.d.ts} +8 -8
- package/dist/orchestrator.d.ts +9 -9
- package/dist/orchestrator.js +111 -106
- package/dist/patterns-cli.d.ts +1 -1
- package/dist/{pipeline-CgXgdIrF.d.ts → pipeline-DotMnb6y.d.ts} +1 -1
- package/dist/policy-runtime.d.ts +1 -1
- package/dist/proactive-contention.d.ts +1 -1
- package/dist/provenance.d.ts +1 -1
- package/dist/{public-http-BP3VQDl5.d.ts → public-http-PJRtnSi-.d.ts} +1 -1
- package/dist/{qmd-BppGGxsi.d.ts → qmd-BP0n11fR.d.ts} +1 -1
- package/dist/qmd-preflight.d.ts +2 -2
- package/dist/qmd-recall-cache.d.ts +1 -1
- package/dist/qmd.d.ts +2 -2
- package/dist/recall-concurrency-config.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-memory-map.d.ts +1 -1
- 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-timings.d.ts +1 -1
- package/dist/recall-xray-cli.d.ts +1 -1
- package/dist/recall-xray-renderer.d.ts +1 -1
- package/dist/recall-xray.d.ts +1 -1
- package/dist/reconcile/cursor.d.ts +1 -1
- package/dist/reconcile/manifest.d.ts +1 -1
- package/dist/reconcile/plan.d.ts +1 -1
- package/dist/replay/normalizers/chatgpt.d.ts +1 -1
- package/dist/replay/normalizers/claude.d.ts +1 -1
- package/dist/replay/normalizers/openclaw.d.ts +1 -1
- package/dist/replay/normalizers/shared.d.ts +1 -1
- package/dist/replay/runner.d.ts +1 -1
- package/dist/replay/types.d.ts +1 -1
- package/dist/replica-divergence.d.ts +1 -1
- package/dist/replica-peers-config.d.ts +1 -1
- package/dist/resolve-auth-token.d.ts +1 -1
- package/dist/resume-bundles.js +5 -5
- package/dist/retrieval-agents.d.ts +2 -2
- 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/salvage-envelope.d.ts +1 -1
- package/dist/{scope-profiles-ChZUtxDU.d.ts → scope-profiles-6ChZKTy-.d.ts} +1 -1
- package/dist/search/embed-helper.d.ts +1 -1
- package/dist/search/factory.d.ts +1 -1
- package/dist/search/factory.js +6 -6
- package/dist/search/index.d.ts +1 -1
- package/dist/search/index.js +10 -10
- package/dist/search/lancedb-backend.d.ts +1 -1
- package/dist/search/lancedb-backend.js +2 -2
- package/dist/search/meilisearch-backend.d.ts +1 -1
- package/dist/search/meilisearch-backend.js +2 -2
- package/dist/search/noop-backend.d.ts +1 -1
- package/dist/search/orama-backend.d.ts +1 -1
- package/dist/search/orama-backend.js +2 -2
- package/dist/search/port.d.ts +1 -1
- package/dist/search/remote-backend.d.ts +1 -1
- package/dist/{semantic-consolidation-mSPwQSmF.d.ts → semantic-consolidation-DziYcW5J.d.ts} +1 -1
- package/dist/semantic-consolidation.d.ts +2 -2
- package/dist/semantic-consolidation.js +11 -11
- package/dist/semantic-rule-promotion.js +10 -10
- package/dist/semantic-rule-verifier.d.ts +1 -1
- package/dist/semantic-rule-verifier.js +10 -10
- package/dist/{service-BICWLwSP.d.ts → service-C7rIBuK_.d.ts} +2 -2
- 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/source-agent-qualifier.d.ts +1 -1
- package/dist/source-agent-qualifier.js +10 -10
- package/dist/{storage-B7urx1K3.d.ts → storage-B1hEx8Xg.d.ts} +1 -1
- package/dist/storage.d.ts +2 -2
- package/dist/storage.js +9 -9
- package/dist/subject-config.d.ts +1 -1
- package/dist/summarizer.d.ts +1 -1
- package/dist/summary-snapshot.d.ts +1 -1
- package/dist/support-passport/index.d.ts +14 -14
- package/dist/support-passport/index.js +34 -34
- package/dist/temporal-supersession.d.ts +2 -2
- package/dist/temporal-timeline-recall.d.ts +1 -1
- package/dist/temporal-validity.d.ts +1 -1
- package/dist/threading.d.ts +1 -1
- package/dist/tier-migration.d.ts +2 -2
- 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/trust-score-stage.d.ts +1 -1
- package/dist/trust-score.d.ts +1 -1
- package/dist/{types-ETU5N6nB.d.ts → types-BHDNxGTT.d.ts} +1 -1
- package/dist/types.d.ts +1 -1
- package/dist/utility-runtime.d.ts +1 -1
- package/dist/verified-recall.js +10 -10
- package/dist/who-knows-cli.d.ts +11 -11
- package/dist/who-knows-cli.js +11 -11
- package/dist/who-knows.d.ts +11 -11
- package/dist/who-knows.js +10 -10
- package/dist/write-envelope.d.ts +1 -1
- package/package.json +2 -2
- package/src/access-boundary.ts +5 -0
- package/src/access-http.ts +15 -16
- package/src/access-mcp-output-schemas.ts +5 -0
- package/src/access-mcp.ts +6 -6
- package/src/access-operations.ts +2 -0
- package/src/access-surface-catalog.ts +10 -0
- package/src/eval-trajectory-contracts.ts +411 -0
- package/src/eval-trajectory-store.ts +306 -0
- package/src/eval-trajectory.test.ts +534 -0
- package/src/eval-trajectory.ts +773 -0
- package/src/index.ts +2 -0
- package/src/location/access-operations.ts +84 -0
- package/src/location/http-glue.test.ts +100 -0
- package/src/location/http-glue.ts +85 -0
- package/src/location/index.ts +3 -0
- package/src/location/mcp-tools.ts +82 -0
- package/src/location/provider-setup.test.ts +106 -0
- package/src/location/provider-setup.ts +103 -0
- package/src/location/scheduler.test.ts +113 -0
- package/src/location/scheduler.ts +98 -0
- package/src/location/surfaces.test.ts +241 -0
- package/src/location/surfaces.ts +329 -0
- package/src/maintenance/day-summary-cron.ts +45 -0
- package/src/mcp-read-only-tools.ts +2 -0
- package/src/memory-worth-outcomes.test.ts +53 -18
- package/src/memory-worth-outcomes.ts +91 -9
- package/src/orchestration/maintenance.ts +22 -30
- package/src/wearables/http-glue.ts +28 -0
- package/dist/chunk-4K7IW3F7.js.map +0 -1
- package/dist/chunk-5W7MKXMU.js.map +0 -1
- package/dist/chunk-FC7TIRFS.js.map +0 -1
- package/dist/chunk-LDBFXD4F.js.map +0 -1
- package/dist/chunk-OMZLBT4B.js.map +0 -1
- package/dist/chunk-PNAGNVGK.js.map +0 -1
- package/dist/chunk-RQ2EQRRR.js.map +0 -1
- package/dist/chunk-YUTTMSC7.js.map +0 -1
- /package/dist/{capsule-crypto-GWVG7LGC.js.map → capsule-crypto-7FJQINUR.js.map} +0 -0
- /package/dist/{chunk-OWHERGF2.js.map → chunk-2NLLXCJG.js.map} +0 -0
- /package/dist/{chunk-NZPFCP5A.js.map → chunk-2PSX5BJU.js.map} +0 -0
- /package/dist/{chunk-W6J4POB6.js.map → chunk-3RI5Y7KU.js.map} +0 -0
- /package/dist/{chunk-H7BZBSP6.js.map → chunk-52II7PB6.js.map} +0 -0
- /package/dist/{chunk-IF4EY26E.js.map → chunk-5DH6PG4B.js.map} +0 -0
- /package/dist/{chunk-M4AHBM72.js.map → chunk-5HERQ5FX.js.map} +0 -0
- /package/dist/{chunk-IRXMJLTW.js.map → chunk-5HK3CJAR.js.map} +0 -0
- /package/dist/{chunk-XAWIL7TC.js.map → chunk-5S4LQOPE.js.map} +0 -0
- /package/dist/{chunk-IDQ6DKXC.js.map → chunk-5VPQSRQO.js.map} +0 -0
- /package/dist/{chunk-ROEAEANL.js.map → chunk-6CPUQ5D6.js.map} +0 -0
- /package/dist/{chunk-SR7JIRAR.js.map → chunk-7F27PCSN.js.map} +0 -0
- /package/dist/{chunk-7OZSHBWK.js.map → chunk-7TCGNUVP.js.map} +0 -0
- /package/dist/{chunk-KBOG7FJV.js.map → chunk-7WR462EM.js.map} +0 -0
- /package/dist/{chunk-AYAZWXJI.js.map → chunk-A32YEQAM.js.map} +0 -0
- /package/dist/{chunk-5GIZM4RX.js.map → chunk-ACOC27BB.js.map} +0 -0
- /package/dist/{chunk-6LS5OX3U.js.map → chunk-BJTHRFFC.js.map} +0 -0
- /package/dist/{chunk-PGW64IFQ.js.map → chunk-CFGU52XJ.js.map} +0 -0
- /package/dist/{chunk-DPNXADEI.js.map → chunk-D4QVPP3G.js.map} +0 -0
- /package/dist/{chunk-2RXUZVPU.js.map → chunk-EOHKUWXW.js.map} +0 -0
- /package/dist/{chunk-YNDLCWXS.js.map → chunk-EZ25VE3G.js.map} +0 -0
- /package/dist/{chunk-ZK4BFABK.js.map → chunk-F635GAL7.js.map} +0 -0
- /package/dist/{chunk-HWVNYNIV.js.map → chunk-F6QHHRWP.js.map} +0 -0
- /package/dist/{chunk-O4BAGJDN.js.map → chunk-GEPACVWN.js.map} +0 -0
- /package/dist/{chunk-XZBXINXZ.js.map → chunk-GIC6BASP.js.map} +0 -0
- /package/dist/{chunk-PP7R754B.js.map → chunk-GPFZFCRN.js.map} +0 -0
- /package/dist/{chunk-LSYD7GHZ.js.map → chunk-GTSVEEP3.js.map} +0 -0
- /package/dist/{chunk-YWBOOBDP.js.map → chunk-I7EX6KSH.js.map} +0 -0
- /package/dist/{chunk-3I22VWB3.js.map → chunk-IP4ZNT4U.js.map} +0 -0
- /package/dist/{chunk-AXGFOFNY.js.map → chunk-IY7UXD3J.js.map} +0 -0
- /package/dist/{chunk-6FUMA6AA.js.map → chunk-JAQXUGLN.js.map} +0 -0
- /package/dist/{chunk-RKNJBZ55.js.map → chunk-JBPKEARU.js.map} +0 -0
- /package/dist/{chunk-5W7CTZ2E.js.map → chunk-KQAFEZQX.js.map} +0 -0
- /package/dist/{chunk-D2YNNDML.js.map → chunk-KWIGDKM2.js.map} +0 -0
- /package/dist/{chunk-2JHRCWHT.js.map → chunk-LLQCM2U2.js.map} +0 -0
- /package/dist/{chunk-OLBZ2WGG.js.map → chunk-LTBKKSCX.js.map} +0 -0
- /package/dist/{chunk-RACZB5HT.js.map → chunk-N37X5RU7.js.map} +0 -0
- /package/dist/{chunk-FEO2CDXR.js.map → chunk-NG3MBQV4.js.map} +0 -0
- /package/dist/{chunk-AG46P24C.js.map → chunk-NNBZS3DY.js.map} +0 -0
- /package/dist/{chunk-JGG5HVI2.js.map → chunk-OPGL46PX.js.map} +0 -0
- /package/dist/{chunk-OUKBMQ2O.js.map → chunk-PD66CVSD.js.map} +0 -0
- /package/dist/{chunk-7SSRXEZJ.js.map → chunk-PDDSFELN.js.map} +0 -0
- /package/dist/{chunk-MVIYRRVJ.js.map → chunk-PMVPCZJZ.js.map} +0 -0
- /package/dist/{chunk-D35XLYQ7.js.map → chunk-RGCF4XNH.js.map} +0 -0
- /package/dist/{chunk-X2DWBWOX.js.map → chunk-S3K2CIK5.js.map} +0 -0
- /package/dist/{chunk-TWBQQ3FT.js.map → chunk-SEA6M7SS.js.map} +0 -0
- /package/dist/{chunk-DYO24BNB.js.map → chunk-SVVIASVX.js.map} +0 -0
- /package/dist/{chunk-7K5Q6COX.js.map → chunk-TVVEYCNW.js.map} +0 -0
- /package/dist/{chunk-NLUCDKLT.js.map → chunk-VKCAHCBI.js.map} +0 -0
- /package/dist/{chunk-BXXOPKT5.js.map → chunk-VXVZ2GM3.js.map} +0 -0
- /package/dist/{chunk-JFWZRUKP.js.map → chunk-WTOZBZNN.js.map} +0 -0
- /package/dist/{chunk-UVYI6VIX.js.map → chunk-X7Y7WX73.js.map} +0 -0
- /package/dist/{chunk-5TG4MU2U.js.map → chunk-YKWFK7XA.js.map} +0 -0
- /package/dist/{chunk-BIJAWZYW.js.map → chunk-YMOPYG3K.js.map} +0 -0
- /package/dist/{chunk-XUZ5CIEE.js.map → chunk-YRVAKONL.js.map} +0 -0
- /package/dist/{chunk-53MZQEBD.js.map → chunk-YWSQD2IB.js.map} +0 -0
- /package/dist/{chunk-US4IRASK.js.map → chunk-Z4U3UN56.js.map} +0 -0
- /package/dist/{chunk-QMZY3GG6.js.map → chunk-ZAOHJDKH.js.map} +0 -0
- /package/dist/{chunk-ZXUZ54Z5.js.map → chunk-ZIJDI4CP.js.map} +0 -0
- /package/dist/{graph-edge-decay-FXGELBFA.js.map → eval-trajectory-contracts.js.map} +0 -0
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../src/location/registry.ts","../../src/location/intervals.ts","../../src/location/store.ts","../../src/location/pipeline.ts","../../src/location/cli.ts"],"sourcesContent":["/**\n * Location provider registry (issue #2044).\n *\n * In-memory only: host adapters register provider implementations at startup.\n * Core never statically imports an optional provider package — the registry\n * holds whatever the host wired in, and a configured source whose provider is\n * not registered is skipped (not an error), so partial installs keep working.\n */\n\nimport type { LocationProvider } from \"./types.js\";\n\nconst PROVIDER_ID_PATTERN = /^[a-z0-9][a-z0-9-]*$/;\n\nconst providers = new Map<string, LocationProvider>();\n\nfunction assertValidProvider(provider: LocationProvider): void {\n if (typeof provider !== \"object\" || provider === null) {\n throw new TypeError(\"location provider must be an object\");\n }\n if (typeof provider.id !== \"string\" || !PROVIDER_ID_PATTERN.test(provider.id)) {\n throw new RangeError(\n \"location provider id must be a non-empty lowercase kebab string (a-z, 0-9, hyphens)\",\n );\n }\n if (typeof provider.displayName !== \"string\" || provider.displayName.trim().length === 0) {\n throw new TypeError(`location provider '${provider.id}' must declare a non-empty displayName`);\n }\n if (typeof provider.verify !== \"function\" || typeof provider.fetchObservations !== \"function\") {\n throw new TypeError(\n `location provider '${provider.id}' must implement verify() and fetchObservations()`,\n );\n }\n}\n\nexport function registerLocationProvider(provider: LocationProvider): void {\n assertValidProvider(provider);\n if (providers.has(provider.id)) {\n throw new Error(`location provider '${provider.id}' is already registered`);\n }\n providers.set(provider.id, provider);\n}\n\nexport function getLocationProvider(id: string): LocationProvider | undefined {\n return typeof id === \"string\" ? providers.get(id) : undefined;\n}\n\nexport function listLocationProviders(): string[] {\n return [...providers.keys()].sort((a, b) => (a < b ? -1 : a > b ? 1 : 0));\n}\n\n/** Test-only: reset the registry between cases. */\nexport function clearLocationProviders(): void {\n providers.clear();\n}\n","/**\n * Location interval math (issue #2044).\n *\n * Pure, deterministic helpers over UTC ISO-8601 instants: half-open\n * [start, end) day windows (reusing the DST-correct activity day-window), IANA\n * local-day bucketing, overlap, observation→segment dwell, and dominant-place\n * selection with stable tie-breaking. No IO, no clocks, no randomness.\n */\n\nimport { activityDayWindow, isValidActivityDate } from \"../activity/digest.js\";\nimport type { LocationObservation, LocationPlace, LocationSegment } from \"./types.js\";\n\nexport function isValidLocationDate(date: string): boolean {\n return isValidActivityDate(date);\n}\n\n/** Half-open [start, end) UTC ISO bounds of a local day. */\nexport function locationDayWindow(date: string, timezone: string): { startUtc: string; endUtc: string } {\n if (!isValidActivityDate(date)) {\n throw new RangeError(`Invalid location date \"${date}\"; expected a real YYYY-MM-DD day.`);\n }\n return activityDayWindow(date, timezone);\n}\n\nfunction assertFiniteInstant(iso: string, what: string): number {\n const ms = Date.parse(iso);\n if (typeof iso !== \"string\" || !Number.isFinite(ms)) {\n throw new RangeError(`${what} must be a UTC ISO-8601 instant; got \"${String(iso)}\"`);\n }\n return ms;\n}\n\n/** The IANA local calendar day (YYYY-MM-DD) an instant falls in. */\nexport function localDayKey(instantUtc: string, timezone: string): string {\n assertFiniteInstant(instantUtc, \"instantUtc\");\n return new Intl.DateTimeFormat(\"en-CA\", {\n timeZone: timezone,\n year: \"numeric\",\n month: \"2-digit\",\n day: \"2-digit\",\n }).format(new Date(instantUtc));\n}\n\nfunction compareObservations(a: LocationObservation, b: LocationObservation): number {\n if (a.observedAtUtc !== b.observedAtUtc) {\n return a.observedAtUtc < b.observedAtUtc ? -1 : 1;\n }\n // Total comparator (§12): equal-key observations fall back to place id so\n // ordering — and therefore dwell attribution — is deterministic.\n if (a.place.id !== b.place.id) {\n return a.place.id < b.place.id ? -1 : 1;\n }\n return 0;\n}\n\n/** Bucket observations into their IANA local days, sorted within each day. */\nexport function bucketObservationsByDay(\n observations: readonly LocationObservation[],\n timezone: string,\n): Map<string, LocationObservation[]> {\n const buckets = new Map<string, LocationObservation[]>();\n for (const observation of observations) {\n assertFiniteInstant(observation.observedAtUtc, \"observation observedAtUtc\");\n const key = localDayKey(observation.observedAtUtc, timezone);\n const bucket = buckets.get(key);\n if (bucket === undefined) buckets.set(key, [observation]);\n else bucket.push(observation);\n }\n for (const bucket of buckets.values()) bucket.sort(compareObservations);\n return buckets;\n}\n\n/** Overlap in ms of two half-open intervals; 0 when disjoint. */\nexport function intervalOverlapMs(\n a: { startUtc: string; endUtc: string },\n b: { startUtc: string; endUtc: string },\n): number {\n const overlap =\n Math.min(Date.parse(a.endUtc), Date.parse(b.endUtc)) - Math.max(Date.parse(a.startUtc), Date.parse(b.startUtc));\n return Math.max(0, overlap);\n}\n\nfunction placeForSegment(place: LocationPlace, retainCoordinates: boolean): LocationPlace {\n if (retainCoordinates || place.latitude === undefined || place.longitude === undefined) {\n return place;\n }\n return {\n id: place.id,\n label: place.label,\n ...(place.kind === undefined ? {} : { kind: place.kind }),\n };\n}\n\n/**\n * Derive place-visit segments from a day's observations: each observation\n * covers [its instant, the next observation's instant ∩ window end). The last\n * observation is capped by the window end, so dwell never crosses the day\n * boundary. Out-of-window observations are a provider contract violation and\n * are rejected loudly rather than silently reshaping the day. Coordinates are\n * stripped unless `retainCoordinates` is set.\n */\nexport function observationSegments(\n observations: readonly LocationObservation[],\n window: { startUtc: string; endUtc: string },\n options: { retainCoordinates: boolean },\n): LocationSegment[] {\n const startMs = assertFiniteInstant(window.startUtc, \"window startUtc\");\n const endMs = assertFiniteInstant(window.endUtc, \"window endUtc\");\n if (startMs >= endMs) {\n throw new RangeError(\"location window must satisfy startUtc < endUtc\");\n }\n const ordered = [...observations].sort(compareObservations);\n const segments: LocationSegment[] = [];\n for (let index = 0; index < ordered.length; index += 1) {\n const current = ordered[index]!;\n const currentMs = Date.parse(current.observedAtUtc);\n if (currentMs < startMs || currentMs >= endMs) {\n throw new RangeError(\n `location observation at \"${current.observedAtUtc}\" falls outside the requested [${window.startUtc}, ${window.endUtc}) window`,\n );\n }\n const nextMs =\n index + 1 < ordered.length ? Date.parse(ordered[index + 1]!.observedAtUtc) : endMs;\n const segmentEndMs = Math.min(nextMs, endMs);\n if (currentMs >= segmentEndMs) continue;\n segments.push({\n startUtc: new Date(currentMs).toISOString(),\n endUtc: new Date(segmentEndMs).toISOString(),\n place: placeForSegment(current.place, options.retainCoordinates),\n });\n }\n return segments;\n}\n\n/** Total time a place was occupied (union of its segment intervals, ms). */\nexport interface PlaceDuration {\n place: LocationPlace;\n totalMs: number;\n /** Earliest segment start contributing to this place's total. */\n firstStartUtc: string;\n}\n\nfunction unionIntervalMs(segments: readonly LocationSegment[]): number {\n // Merge overlapping [start, end) intervals per place so two providers\n // observing the same visit do not double-count its duration.\n const bounds = segments\n .map((segment) => ({ start: Date.parse(segment.startUtc), end: Date.parse(segment.endUtc) }))\n .sort((a, b) => (a.start !== b.start ? a.start - b.start : a.end - b.end));\n let total = 0;\n let sweepStart: number | null = null;\n let sweepEnd = 0;\n for (const bound of bounds) {\n if (sweepStart === null || bound.start > sweepEnd) {\n if (sweepStart !== null) total += sweepEnd - sweepStart;\n sweepStart = bound.start;\n sweepEnd = bound.end;\n } else if (bound.end > sweepEnd) {\n sweepEnd = bound.end;\n }\n }\n if (sweepStart !== null) total += sweepEnd - sweepStart;\n return total;\n}\n\n/** Per-place totals across every segment given (multi-source safe). */\nexport function placeDurations(segments: readonly LocationSegment[]): PlaceDuration[] {\n const byPlace = new Map<string, { place: LocationPlace; segments: LocationSegment[]; firstStartUtc: string }>();\n for (const segment of segments) {\n const existing = byPlace.get(segment.place.id);\n if (existing === undefined) {\n byPlace.set(segment.place.id, { place: segment.place, segments: [segment], firstStartUtc: segment.startUtc });\n continue;\n }\n existing.segments.push(segment);\n if (segment.startUtc < existing.firstStartUtc) existing.firstStartUtc = segment.startUtc;\n // Two providers may label the same place id differently; keep the\n // lexicographically smallest label so rendering stays deterministic.\n if (segment.place.label < existing.place.label) existing.place = segment.place;\n }\n const durations: PlaceDuration[] = [...byPlace.values()].map((entry) => ({\n place: entry.place,\n totalMs: unionIntervalMs(entry.segments),\n firstStartUtc: entry.firstStartUtc,\n }));\n durations.sort((a, b) => {\n if (a.place.id !== b.place.id) return a.place.id < b.place.id ? -1 : 1;\n return 0;\n });\n return durations;\n}\n\nexport interface DominantPlaceResult {\n place: LocationPlace;\n totalMs: number;\n}\n\n/**\n * The place with the longest total occupancy. Ties are stable and\n * deterministic: earlier first start wins, then the lexicographically smaller\n * place id — never insertion order.\n */\nexport function dominantPlace(segments: readonly LocationSegment[]): DominantPlaceResult | null {\n const durations = placeDurations(segments);\n let best: PlaceDuration | null = null;\n for (const duration of durations) {\n if (best === null) {\n best = duration;\n continue;\n }\n if (duration.totalMs !== best.totalMs) {\n if (duration.totalMs > best.totalMs) best = duration;\n continue;\n }\n if (duration.firstStartUtc !== best.firstStartUtc) {\n if (duration.firstStartUtc < best.firstStartUtc) best = duration;\n continue;\n }\n if (duration.place.id < best.place.id) best = duration;\n }\n return best === null ? null : { place: best.place, totalMs: best.totalMs };\n}\n","/**\n * Location day-file + sync-state store (issue #2044).\n *\n * Day documents live at `<memoryDir>/locations/<YYYY-MM-DD>.md` — OUTSIDE the\n * memory scan roots (facts/, entities/, …) so raw location history never\n * surfaces as a memory in recall or governance passes, and INSIDE the QMD\n * collection root so the markdown stays full-text searchable once an index\n * update runs. Per-source sync state lives at\n * `<memoryDir>/state/locations/sync.json` and is written only after the day\n * document is durable (see pipeline.ts).\n *\n * Both writes are atomic (temp file + rename) and containment-checked: a\n * symlinked `locations/` root or day file is rejected even when it resolves\n * inside the memory dir (AGENTS.md pattern #3), and a path that escapes the\n * memory dir is refused outright.\n */\n\nimport { createHash } from \"node:crypto\";\nimport { lstat, mkdir, readFile, readdir, realpath } from \"node:fs/promises\";\nimport path from \"node:path\";\n\nimport { writeFileAtomically } from \"../maintenance/atomic-file.js\";\nimport { pathIsInside } from \"../utils/path-containment.js\";\nimport { isValidLocationDate, placeDurations } from \"./intervals.js\";\nimport type { LocationSegment } from \"./types.js\";\n\nexport const LOCATIONS_DIR_NAME = \"locations\";\nexport const LOCATION_DAY_KIND = \"location-day\";\nexport const LOCATION_DAY_FORMAT_VERSION = 1;\n\n/** Cap on remembered day payloads per source (~3 months of days). */\nconst MAX_TRACKED_LOCATION_DAYS = 90;\n\nconst DAY_FILE_NAME_PATTERN = /^\\d{4}-\\d{2}-\\d{2}\\.md$/;\n\n// Serializes state load→mutate→save sections per state file so two sources\n// syncing concurrently cannot lose-update each other's entries.\nconst stateLocks = new Map<string, Promise<unknown>>();\n\nfunction withStateLock<T>(key: string, fn: () => Promise<T>): Promise<T> {\n const prior = stateLocks.get(key) ?? Promise.resolve();\n const next = prior.then(fn, fn);\n const tail = next.then(\n () => undefined,\n () => undefined,\n );\n stateLocks.set(key, tail);\n void tail.then(() => {\n if (stateLocks.get(key) === tail) stateLocks.delete(key);\n });\n return next;\n}\n\nexport function locationDayFilePath(memoryDir: string, date: string): string {\n if (!isValidLocationDate(date)) {\n // Never interpolate an unvalidated date into a filesystem path (a `../`\n // would escape <memoryDir>/locations/). Reject loudly.\n throw new RangeError(`Invalid location date \"${date}\"; expected a real YYYY-MM-DD day.`);\n }\n return path.join(memoryDir, LOCATIONS_DIR_NAME, `${date}.md`);\n}\n\nexport function locationSyncStateFilePath(memoryDir: string): string {\n return path.join(memoryDir, \"state\", \"locations\", \"sync.json\");\n}\n\n/** A source's derived day payload, kept in sync state for multi-source merges. */\nexport interface LocationSourceDayPayload {\n observationCount: number;\n segments: LocationSegment[];\n providerDisplayName?: string;\n}\n\nexport interface LocationSourceSyncState {\n lastSyncedAtUtc?: string;\n days?: Record<string, LocationSourceDayPayload>;\n}\n\nexport interface LocationSyncStateFile {\n version: 1;\n sources: Record<string, LocationSourceSyncState>;\n}\n\nexport function emptyLocationSyncState(): LocationSyncStateFile {\n return { version: 1, sources: {} };\n}\n\nexport async function loadLocationSyncState(memoryDir: string): Promise<LocationSyncStateFile> {\n let raw: string;\n try {\n raw = await readFile(locationSyncStateFilePath(memoryDir), \"utf-8\");\n } catch (err) {\n if ((err as NodeJS.ErrnoException).code === \"ENOENT\") return emptyLocationSyncState();\n throw err;\n }\n let parsed: unknown;\n try {\n parsed = JSON.parse(raw);\n } catch {\n // A corrupt state file must not brick syncing forever; treat it as a cold\n // start. The worst case is re-syncing days already on disk, and the day\n // file's contentHash makes that rewrite idempotent.\n return emptyLocationSyncState();\n }\n if (\n typeof parsed !== \"object\" ||\n parsed === null ||\n Array.isArray(parsed) ||\n typeof (parsed as LocationSyncStateFile).sources !== \"object\" ||\n (parsed as LocationSyncStateFile).sources === null\n ) {\n return emptyLocationSyncState();\n }\n return { version: 1, sources: (parsed as LocationSyncStateFile).sources };\n}\n\nexport async function saveLocationSyncState(\n memoryDir: string,\n state: LocationSyncStateFile,\n): Promise<void> {\n await mkdir(path.dirname(locationSyncStateFilePath(memoryDir)), { recursive: true, mode: 0o700 });\n await writeFileAtomically(\n locationSyncStateFilePath(memoryDir),\n `${JSON.stringify(state, null, 2)}\\n`,\n );\n}\n\nfunction pruneSourceDays(source: LocationSourceSyncState): void {\n const days = source.days;\n if (days === undefined) return;\n const keys = Object.keys(days).sort((a, b) => (a < b ? -1 : a > b ? 1 : 0));\n for (const key of keys.slice(0, Math.max(0, keys.length - MAX_TRACKED_LOCATION_DAYS))) {\n delete days[key];\n }\n}\n\n/**\n * Record one source's completed day sync. Runs the whole read-modify-write\n * under the per-directory state lock so concurrent sources cannot clobber\n * each other, and prunes day payloads beyond the retention cap.\n */\nexport async function updateLocationSourceDay(\n memoryDir: string,\n sourceId: string,\n date: string,\n payload: LocationSourceDayPayload,\n completedAtUtc: string,\n): Promise<LocationSyncStateFile> {\n if (!isValidLocationDate(date)) {\n throw new RangeError(`Invalid location date \"${date}\"; expected a real YYYY-MM-DD day.`);\n }\n return withStateLock(locationSyncStateFilePath(memoryDir), async () => {\n const state = await loadLocationSyncState(memoryDir);\n const source = state.sources[sourceId] ?? {};\n const days = source.days ?? {};\n days[date] = payload;\n source.days = days;\n source.lastSyncedAtUtc = completedAtUtc;\n state.sources[sourceId] = source;\n for (const candidate of Object.values(state.sources)) pruneSourceDays(candidate);\n await saveLocationSyncState(memoryDir, state);\n return state;\n });\n}\n/** Frontmatter persisted on a rendered day document. */\nexport interface LocationDayMeta {\n kind: typeof LOCATION_DAY_KIND;\n date: string;\n timezone: string;\n formatVersion: number;\n sources: string[];\n observationCount: number;\n /** SHA-256 of the rendered body (rebuild idempotency). */\n contentHash: string;\n}\n\n/** A parsed day document (frontmatter + rendered body). */\nexport interface LocationDayDocument {\n meta: LocationDayMeta;\n body: string;\n}\n\n/** The per-source view a day document is composed from. */\nexport interface LocationDaySourceEntry extends LocationSourceDayPayload {\n /** Provider display name for the timeline heading; falls back to the id. */\n providerDisplayName?: string;\n}\n\nexport function hashLocationBody(body: string): string {\n return createHash(\"sha256\").update(body, \"utf8\").digest(\"hex\");\n}\n\nfunction clockHhMm(iso: string, timezone: string): string {\n return new Intl.DateTimeFormat(\"en-GB\", {\n timeZone: timezone,\n hour: \"2-digit\",\n minute: \"2-digit\",\n hour12: false,\n }).format(new Date(iso));\n}\n\nfunction formatDuration(ms: number): string {\n const totalMinutes = Math.round(ms / 60_000);\n const hours = Math.floor(totalMinutes / 60);\n const minutes = totalMinutes % 60;\n if (hours <= 0) return `${minutes}m`;\n return `${hours}h ${String(minutes).padStart(2, \"0\")}m`;\n}\n\n/** Collapse whitespace and strip markdown emphasis/backticks from a label. */\nfunction safeLabel(label: string): string {\n return label.replace(/\\s+/g, \" \").replace(/[`*_]/g, \"\").trim();\n}\n\nfunction formatPlaceLabel(segment: LocationSegment): string {\n const label = safeLabel(segment.place.label);\n return segment.place.kind === undefined ? label : `${label} (${segment.place.kind})`;\n}\n\nfunction formatCoordinates(segment: LocationSegment): string {\n if (segment.place.latitude === undefined || segment.place.longitude === undefined) return \"\";\n return ` @ ${segment.place.latitude.toFixed(4)},${segment.place.longitude.toFixed(4)}`;\n}\n\nexport function composeLocationDayBody(\n date: string,\n timezone: string,\n sources: Record<string, LocationDaySourceEntry>,\n): string {\n const lines: string[] = [`# Location day — ${date} (${timezone})`, \"\"];\n const allSegments: LocationSegment[] = [];\n let observationCount = 0;\n for (const entry of Object.values(sources)) {\n allSegments.push(...entry.segments);\n observationCount += entry.observationCount;\n }\n\n lines.push(\"## Summary\", \"\");\n if (observationCount === 0) {\n lines.push(\"No location observations recorded.\", \"\");\n } else {\n const durations = placeDurations(allSegments).sort((a, b) => b.totalMs - a.totalMs);\n lines.push(\n `- Places visited: ${durations.length}`,\n ...durations.map(\n (duration) => `- ${safeLabel(duration.place.label)}: ${formatDuration(duration.totalMs)}`,\n ),\n \"\",\n );\n }\n\n const sourceIds = Object.keys(sources).sort((a, b) => (a < b ? -1 : a > b ? 1 : 0));\n for (const sourceId of sourceIds) {\n const entry = sources[sourceId]!;\n lines.push(`## Timeline — ${safeLabel(entry.providerDisplayName ?? sourceId)}`, \"\");\n if (entry.segments.length === 0) {\n lines.push(\"No observations.\", \"\");\n continue;\n }\n for (const segment of entry.segments) {\n lines.push(\n `- ${clockHhMm(segment.startUtc, timezone)}–${clockHhMm(segment.endUtc, timezone)} — ${formatPlaceLabel(segment)}${formatCoordinates(segment)}`,\n );\n }\n lines.push(\"\");\n }\n return `${lines.join(\"\\n\").trimEnd()}\\n`;\n}\n\nexport function composeLocationDayMeta(\n date: string,\n timezone: string,\n sources: Record<string, LocationDaySourceEntry>,\n body: string,\n): LocationDayMeta {\n let observationCount = 0;\n for (const entry of Object.values(sources)) observationCount += entry.observationCount;\n return {\n kind: LOCATION_DAY_KIND,\n date,\n timezone,\n formatVersion: LOCATION_DAY_FORMAT_VERSION,\n sources: Object.keys(sources).sort((a, b) => (a < b ? -1 : a > b ? 1 : 0)),\n observationCount,\n contentHash: hashLocationBody(body),\n };\n}\n\nfunction frontmatterScalar(key: string, value: string | number): string {\n return `${key}: ${typeof value === \"number\" ? value : JSON.stringify(value)}`;\n}\n\nfunction frontmatterList(key: string, values: readonly string[]): string[] {\n if (values.length === 0) return [`${key}: []`];\n const lines = [`${key}:`];\n for (const value of values) lines.push(` - ${JSON.stringify(value)}`);\n return lines;\n}\n\nexport function serializeLocationDay(meta: LocationDayMeta, body: string): string {\n const lines: string[] = [\"---\"];\n lines.push(frontmatterScalar(\"kind\", meta.kind));\n lines.push(frontmatterScalar(\"date\", meta.date));\n lines.push(frontmatterScalar(\"timezone\", meta.timezone));\n lines.push(frontmatterScalar(\"formatVersion\", meta.formatVersion));\n lines.push(...frontmatterList(\"sources\", meta.sources));\n lines.push(frontmatterScalar(\"observationCount\", meta.observationCount));\n lines.push(frontmatterScalar(\"contentHash\", meta.contentHash));\n lines.push(\"---\", \"\", body);\n return lines.join(\"\\n\");\n}\n\nfunction parseScalar(raw: string): string {\n try {\n const parsed = JSON.parse(raw);\n return typeof parsed === \"string\" ? parsed : raw;\n } catch {\n return raw;\n }\n}\n\n/** A day document's frontmatter, parsed for idempotency checks and status. */\nexport interface LocationDaySummary {\n date: string;\n timezone: string;\n sources: string[];\n observationCount: number;\n contentHash: string;\n}\n\n/**\n * Parse a day document's frontmatter. Returns null when the content is not a\n * location day document (wrong kind, missing frontmatter) so callers can\n * distinguish a foreign file from a corrupt one.\n */\nexport function parseLocationDaySummary(raw: string): LocationDaySummary | null {\n if (!raw.startsWith(\"---\\n\")) return null;\n const closeIndex = raw.indexOf(\"\\n---\\n\", 4);\n if (closeIndex === -1) return null;\n const scalars: Record<string, string> = {};\n const lists: Record<string, string[]> = {};\n let currentList: string | null = null;\n for (const line of raw.slice(4, closeIndex).split(\"\\n\")) {\n const listItem = /^ {2}- (.*)$/.exec(line);\n if (listItem !== null && currentList !== null) {\n lists[currentList]!.push(parseScalar(listItem[1]!));\n continue;\n }\n currentList = null;\n const separator = line.indexOf(\":\");\n if (separator === -1) continue;\n const key = line.slice(0, separator);\n const value = line.slice(separator + 1).trim();\n if (value === \"\" || value === \"[]\") {\n lists[key] = [];\n currentList = key;\n continue;\n }\n if (value.startsWith(\"[\")) {\n lists[key] = [parseScalar(value)];\n currentList = key;\n continue;\n }\n scalars[key] = value;\n }\n if (scalars.kind === undefined || parseScalar(scalars.kind) !== LOCATION_DAY_KIND) return null;\n if (scalars.date === undefined || scalars.contentHash === undefined) return null;\n return {\n date: parseScalar(scalars.date),\n timezone: scalars.timezone === undefined ? \"UTC\" : parseScalar(scalars.timezone),\n sources: lists.sources ?? [],\n observationCount: scalars.observationCount === undefined ? 0 : Number(scalars.observationCount) || 0,\n contentHash: parseScalar(scalars.contentHash),\n };\n}\n\n// ── Containment-checked day-file IO ─────────────────────────────────────────\n\nfunction isErrnoCode(err: unknown, code: string): boolean {\n return err instanceof Error && (err as NodeJS.ErrnoException).code === code;\n}\n\nasync function assertNotSymlink(target: string, kind: \"directory\" | \"day file\"): Promise<void> {\n let stat: { isSymbolicLink(): boolean };\n try {\n stat = await lstat(target);\n } catch (err) {\n if (isErrnoCode(err, \"ENOENT\")) return;\n throw err;\n }\n if (stat.isSymbolicLink()) {\n throw new Error(\n `locations ${kind} '${path.basename(target)}' is a symbolic link — refusing to follow it even when it resolves inside the memory dir (AGENTS.md pattern #3)`,\n );\n }\n}\n\nasync function assertNoEscape(rootReal: string, candidate: string): Promise<void> {\n let candidateReal: string;\n try {\n candidateReal = await realpath(candidate);\n } catch {\n return;\n }\n if (!pathIsInside(rootReal, candidateReal)) {\n throw new Error(\n \"location day path resolves outside the memory dir — refusing to follow a symlink/traversal (AGENTS.md pattern #3)\",\n );\n }\n}\n\nasync function assertDayPathContained(memoryDir: string, targetPath: string): Promise<void> {\n let rootReal: string;\n try {\n rootReal = await realpath(memoryDir);\n } catch {\n rootReal = path.resolve(memoryDir);\n }\n const locationsDir = path.join(memoryDir, LOCATIONS_DIR_NAME);\n await assertNoEscape(rootReal, locationsDir);\n await assertNoEscape(rootReal, targetPath);\n // Reject a symlinked locations root or day file outright — even when the\n // link resolves inside the memory dir (aliasing / tampering) — before IO.\n await assertNotSymlink(locationsDir, \"directory\");\n await assertNotSymlink(targetPath, \"day file\");\n}\n\n/**\n * Idempotently persist a day document: skip the write when the on-disk\n * contentHash already matches. The write is atomic and containment-checked;\n * the caller (pipeline) advances sync state only after this resolves.\n */\nexport async function writeLocationDay(\n memoryDir: string,\n date: string,\n serialized: string,\n): Promise<boolean> {\n const target = locationDayFilePath(memoryDir, date);\n await assertDayPathContained(memoryDir, target);\n try {\n if ((await readFile(target, \"utf-8\")) === serialized) return false;\n } catch (err) {\n if (!isErrnoCode(err, \"ENOENT\")) throw err;\n }\n await mkdir(path.dirname(target), { recursive: true, mode: 0o700 });\n await writeFileAtomically(target, serialized);\n return true;\n}\n\n/** Read a stored day document's raw markdown; null when absent. */\nexport async function readLocationDay(memoryDir: string, date: string): Promise<string | null> {\n const target = locationDayFilePath(memoryDir, date);\n await assertDayPathContained(memoryDir, target);\n try {\n return await readFile(target, \"utf-8\");\n } catch (err) {\n if (isErrnoCode(err, \"ENOENT\")) return null;\n throw err;\n }\n}\n\n/** List dates that have a stored day document, newest first. */\nexport async function listLocationDayDates(memoryDir: string): Promise<string[]> {\n const locationsDir = path.join(memoryDir, LOCATIONS_DIR_NAME);\n await assertDayPathContained(memoryDir, locationsDir);\n let entries: string[];\n try {\n entries = await readdir(locationsDir);\n } catch (err) {\n if (isErrnoCode(err, \"ENOENT\")) return [];\n throw err;\n }\n const dates = entries\n .filter((entry) => DAY_FILE_NAME_PATTERN.test(entry))\n .map((entry) => entry.slice(0, -3));\n dates.sort((a, b) => (a > b ? -1 : a < b ? 1 : 0));\n return dates;\n}\n","/**\n * Location day-sync pipeline (issue #2044).\n *\n * For one local day, each configured (enabled, registered) provider's\n * observations are fetched over the day's half-open UTC window, folded into\n * place-visit segments, merged with the other sources' last-known day\n * payloads from sync state, and rendered to the day document. Sync state\n * advances only AFTER the day document (when any) is durable, so a failed\n * write never moves the watermark past data that did not land. An empty\n * fetch is a successful sync — never conflated with a provider failure\n * (AGENTS.md rule 22).\n */\n\nimport { getLocationProvider } from \"./registry.js\";\nimport { locationDayWindow, observationSegments } from \"./intervals.js\";\nimport {\n composeLocationDayBody,\n composeLocationDayMeta,\n loadLocationSyncState,\n serializeLocationDay,\n updateLocationSourceDay,\n writeLocationDay,\n type LocationDaySourceEntry,\n} from \"./store.js\";\nimport type { LocationConfig, LocationObservation, LocationProvider, LocationSegment } from \"./types.js\";\n\nconst MAX_SYNC_PAGES = 10_000;\n\nexport interface LocationDaySyncOptions {\n config: LocationConfig;\n memoryDir: string;\n date: string;\n signal?: AbortSignal;\n /** Runaway-pagination guard; defaults to MAX_SYNC_PAGES. */\n maxPages?: number;\n now?: () => Date;\n /** Provider lookup seam (defaults to the registry); tests inject doubles. */\n getProvider?: (id: string) => LocationProvider | undefined;\n}\n\nexport interface LocationSourceSyncResult {\n sourceId: string;\n status: \"synced\" | \"skipped\" | \"failed\";\n skipReason?: \"source-disabled\" | \"provider-not-registered\";\n fetched: number;\n dayWritten: boolean;\n stateSaved: boolean;\n /** Sanitized provider error (no tokens, URLs, or coordinates). */\n error?: string;\n}\n\n/** Redact credential, URL query, and coordinate shapes from a provider error. */\nexport function sanitizeProviderError(error: unknown): string {\n const raw = error instanceof Error ? error.message : String(error);\n return raw\n .replace(/Bearer\\s+[A-Za-z0-9._~+/=-]+/gi, \"Bearer [redacted]\")\n .replace(/[?#][^ \\t\"']*/g, \"[redacted]\")\n .replace(/[+-]?\\d+\\.\\d{3,},\\s?[+-]?\\d+\\.\\d{3,}/g, \"[coordinates]\")\n .slice(0, 300);\n}\n\nfunction assertValidObservation(observation: LocationObservation): void {\n if (typeof observation !== \"object\" || observation === null) {\n throw new TypeError(\"location provider returned a non-object observation\");\n }\n if (typeof observation.observedAtUtc !== \"string\" || !Number.isFinite(Date.parse(observation.observedAtUtc))) {\n throw new TypeError(\"location provider returned an observation with an invalid observedAtUtc\");\n }\n const place = observation.place;\n if (typeof place !== \"object\" || place === null || typeof place.id !== \"string\" || place.id.length === 0) {\n throw new TypeError(\"location provider returned an observation without a valid place\");\n }\n if (typeof place.label !== \"string\" || place.label.trim().length === 0) {\n throw new TypeError(`location provider returned place '${place.id}' without a label`);\n }\n}\n\n/** Fetch every observation one provider holds for the window, all pages. */\nasync function fetchWindow(\n provider: LocationProvider,\n window: { startUtc: string; endUtc: string },\n options: LocationDaySyncOptions,\n): Promise<LocationObservation[]> {\n const maxPages = options.maxPages ?? MAX_SYNC_PAGES;\n if (!Number.isInteger(maxPages) || maxPages < 1) {\n throw new RangeError(\"location sync maxPages must be a positive integer\");\n }\n const observations: LocationObservation[] = [];\n const seenCursors = new Set<string>();\n let cursor: string | null = null;\n let pages = 0;\n let completed = false;\n while (pages < maxPages) {\n options.signal?.throwIfAborted();\n const page = await provider.fetchObservations({\n startUtc: window.startUtc,\n endUtc: window.endUtc,\n cursor,\n signal: options.signal,\n });\n pages += 1;\n for (const observation of page.observations) assertValidObservation(observation);\n observations.push(...page.observations);\n if (page.nextCursor === null) {\n completed = true;\n break;\n }\n if (typeof page.nextCursor !== \"string\" || page.nextCursor.length === 0) {\n throw new TypeError(\"location provider returned an invalid cursor\");\n }\n if (seenCursors.has(page.nextCursor)) {\n throw new Error(\"location provider returned a repeated cursor\");\n }\n seenCursors.add(page.nextCursor);\n cursor = page.nextCursor;\n }\n // Only a loop that ran out of its page budget without a terminal null\n // cursor is a runaway; completing on the final allowed page is normal.\n if (!completed) {\n throw new Error(`location provider exceeded ${maxPages} pages`);\n }\n return observations;\n}\n\n/**\n * Sync every configured source for one local day. The master gate\n * (`config.enabled === false`) short-circuits every path: no providers are\n * contacted and nothing touches the filesystem. A provider failure fails\n * that source only (state not advanced) and never blocks the others.\n */\nexport async function syncLocationDay(options: LocationDaySyncOptions): Promise<LocationSourceSyncResult[]> {\n if (!options.config.enabled) return [];\n const window = locationDayWindow(options.date, options.config.timezone);\n const now = options.now ?? (() => new Date());\n const resolveProvider = options.getProvider ?? getLocationProvider;\n\n const results: LocationSourceSyncResult[] = [];\n for (const source of options.config.sources) {\n if (!source.enabled) {\n results.push({\n sourceId: source.id,\n status: \"skipped\",\n skipReason: \"source-disabled\",\n fetched: 0,\n dayWritten: false,\n stateSaved: false,\n });\n continue;\n }\n const provider = resolveProvider(source.id);\n if (provider === undefined) {\n results.push({\n sourceId: source.id,\n status: \"skipped\",\n skipReason: \"provider-not-registered\",\n fetched: 0,\n dayWritten: false,\n stateSaved: false,\n });\n continue;\n }\n\n let observations: LocationObservation[];\n try {\n observations = await fetchWindow(provider, window, options);\n } catch (error) {\n results.push({\n sourceId: source.id,\n status: \"failed\",\n fetched: 0,\n dayWritten: false,\n stateSaved: false,\n ...(error instanceof Error && error.name === \"AbortError\"\n ? { error: \"aborted\" }\n : { error: sanitizeProviderError(error) }),\n });\n continue;\n }\n\n try {\n options.signal?.throwIfAborted();\n const segments = observationSegments(observations, window, {\n retainCoordinates: options.config.retainCoordinates,\n });\n const payload = { observationCount: observations.length, segments, providerDisplayName: provider.displayName };\n const merged = await mergeDaySources(options.memoryDir, source.id, options.date, payload);\n let dayWritten = false;\n if (Object.values(merged).some((entry) => entry.observationCount > 0)) {\n const body = composeLocationDayBody(options.date, options.config.timezone, merged);\n const meta = composeLocationDayMeta(options.date, options.config.timezone, merged, body);\n dayWritten = await writeLocationDay(options.memoryDir, options.date, serializeLocationDay(meta, body));\n }\n // State advances only after the durable day write above succeeded.\n await updateLocationSourceDay(\n options.memoryDir,\n source.id,\n options.date,\n payload,\n now().toISOString(),\n );\n results.push({\n sourceId: source.id,\n status: \"synced\",\n fetched: observations.length,\n dayWritten,\n stateSaved: true,\n });\n } catch (error) {\n results.push({\n sourceId: source.id,\n status: \"failed\",\n fetched: observations.length,\n dayWritten: false,\n stateSaved: false,\n ...(error instanceof Error && error.name === \"AbortError\"\n ? { error: \"aborted\" }\n : { error: sanitizeProviderError(error) }),\n });\n }\n }\n return results;\n}\n\n/**\n * The day-document source map: this source's fresh payload plus every OTHER\n * source's last-known payload from sync state. Rendered documents therefore\n * survive a re-sync of one source without re-fetching the others.\n */\nasync function mergeDaySources(\n memoryDir: string,\n sourceId: string,\n date: string,\n payload: { observationCount: number; segments: LocationSegment[] },\n): Promise<Record<string, LocationDaySourceEntry>> {\n const state = await loadLocationSyncState(memoryDir);\n const merged: Record<string, LocationDaySourceEntry> = {};\n for (const [otherId, otherState] of Object.entries(state.sources)) {\n if (otherId === sourceId) continue;\n const day = otherState.days?.[date];\n if (day === undefined) continue;\n merged[otherId] = { ...day, segments: [...day.segments] };\n }\n merged[sourceId] = payload;\n return merged;\n}\n","/**\n * Location surface helpers (issue #2044): status, provider health checks, and\n * multi-day sync. Pure `@remnic/core` — no optional packages, no host CLI\n * wiring; a host adapter (or the core CLI, in a later slice) renders these\n * structured results into its own command surface.\n */\n\nimport { getLocationProvider } from \"./registry.js\";\nimport { isValidLocationDate, localDayKey } from \"./intervals.js\";\nimport { listLocationDayDates, loadLocationSyncState, parseLocationDaySummary, readLocationDay } from \"./store.js\";\nimport { syncLocationDay, type LocationDaySyncOptions, type LocationSourceSyncResult } from \"./pipeline.js\";\nimport type { LocationConfig, LocationProvider } from \"./types.js\";\n\nexport interface LocationSourceStatus {\n id: string;\n enabled: boolean;\n providerRegistered: boolean;\n lastSyncedAtUtc?: string;\n trackedDays: number;\n}\n\nexport interface LocationDayStatus {\n date: string;\n sources: string[];\n observationCount: number;\n}\n\nexport interface LocationStatusReport {\n enabled: boolean;\n timezone: string;\n sources: LocationSourceStatus[];\n /** Stored day documents, newest first (at most `maxDays`). */\n recentDays: LocationDayStatus[];\n}\n\nexport interface LocationStatusOptions {\n /** Provider lookup seam (defaults to the registry); tests inject doubles. */\n getProvider?: (id: string) => LocationProvider | undefined;\n /** Cap on day documents listed; defaults to 7. */\n maxDays?: number;\n now?: () => Date;\n}\n\nexport async function locationStatus(\n config: LocationConfig,\n memoryDir: string,\n options: LocationStatusOptions = {},\n): Promise<LocationStatusReport> {\n const resolveProvider = options.getProvider ?? getLocationProvider;\n const state = await loadLocationSyncState(memoryDir);\n const sources: LocationSourceStatus[] = config.sources.map((source) => {\n const sourceState = state.sources[source.id];\n return {\n id: source.id,\n enabled: source.enabled,\n providerRegistered: resolveProvider(source.id) !== undefined,\n ...(sourceState?.lastSyncedAtUtc === undefined ? {} : { lastSyncedAtUtc: sourceState.lastSyncedAtUtc }),\n trackedDays: Object.keys(sourceState?.days ?? {}).length,\n };\n });\n\n const maxDays = options.maxDays ?? 7;\n const recentDays: LocationDayStatus[] = [];\n for (const date of (await listLocationDayDates(memoryDir)).slice(0, Math.max(0, maxDays))) {\n const raw = await readLocationDay(memoryDir, date);\n const summary = raw === null ? null : parseLocationDaySummary(raw);\n recentDays.push({\n date,\n sources: summary?.sources ?? [],\n observationCount: summary?.observationCount ?? 0,\n });\n }\n return { enabled: config.enabled, timezone: config.timezone, sources, recentDays };\n}\n\nexport interface LocationSourceCheckResult {\n id: string;\n ok: boolean;\n detail?: string;\n skipped?: \"location-disabled\" | \"source-disabled\" | \"provider-not-registered\";\n}\n\nexport interface LocationCheckOptions {\n signal?: AbortSignal;\n getProvider?: (id: string) => LocationProvider | undefined;\n}\n\n/** Probe every configured provider's health. The master gate short-circuits. */\nexport async function checkLocationSources(\n config: LocationConfig,\n options: LocationCheckOptions = {},\n): Promise<LocationSourceCheckResult[]> {\n if (!config.enabled) {\n return config.sources.map((source) => ({ id: source.id, ok: false, skipped: \"location-disabled\" as const }));\n }\n const resolveProvider = options.getProvider ?? getLocationProvider;\n const results: LocationSourceCheckResult[] = [];\n for (const source of config.sources) {\n if (!source.enabled) {\n results.push({ id: source.id, ok: false, skipped: \"source-disabled\" });\n continue;\n }\n const provider = resolveProvider(source.id);\n if (provider === undefined) {\n results.push({ id: source.id, ok: false, skipped: \"provider-not-registered\" });\n continue;\n }\n try {\n const check = await provider.verify(options.signal);\n results.push({\n id: source.id,\n ok: check.ok,\n ...(check.detail === undefined || check.detail.length === 0 ? {} : { detail: check.detail }),\n });\n } catch (error) {\n results.push({ id: source.id, ok: false, detail: error instanceof Error ? error.name : \"provider error\" });\n }\n }\n return results;\n}\n\nfunction shiftIsoDate(date: string, days: number): string {\n const parsed = new Date(`${date}T00:00:00Z`);\n parsed.setUTCDate(parsed.getUTCDate() + days);\n return parsed.toISOString().slice(0, 10);\n}\n\nexport interface LocationSyncRunOptions\n extends Omit<LocationDaySyncOptions, \"config\" | \"date\" | \"memoryDir\"> {\n config: LocationConfig;\n memoryDir: string;\n /** Exclusive end date (local YYYY-MM-DD); defaults to today in config.timezone. */\n endDate?: string;\n /** Number of days to sync ending at endDate; defaults to config.syncDays. */\n days?: number;\n now?: () => Date;\n}\n/**\n * Sync the trailing `days` local days ending AT `endDate` (inclusive).\n * `endDate` defaults to yesterday in config.timezone (today is incomplete);\n * days run oldest-first so a failure stops before newer days, matching the\n * incremental-sync intent of `syncDays`.\n */\nexport async function syncLocation(\n options: LocationSyncRunOptions,\n): Promise<Array<{ date: string; results: LocationSourceSyncResult[] }>> {\n const { config, memoryDir, endDate, days, ...rest } = options;\n if (endDate !== undefined && !isValidLocationDate(endDate)) {\n throw new RangeError(`Invalid location endDate \"${endDate}\"; expected a real YYYY-MM-DD day.`);\n }\n const now = rest.now ?? (() => new Date());\n const end = endDate ?? shiftIsoDate(localDayKey(now().toISOString(), config.timezone), -1);\n const count = days ?? config.syncDays;\n if (!Number.isInteger(count) || count < 1 || count > 90) {\n throw new RangeError(\"location sync days must be an integer from 1 to 90\");\n }\n const runs: Array<{ date: string; results: LocationSourceSyncResult[] }> = [];\n for (let offset = count; offset >= 1; offset -= 1) {\n const date = shiftIsoDate(end, -(offset - 1));\n runs.push({ date, results: await syncLocationDay({ ...rest, config, memoryDir, date, now }) });\n }\n return runs;\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;AAWA,IAAM,sBAAsB;AAE5B,IAAM,YAAY,oBAAI,IAA8B;AAEpD,SAAS,oBAAoB,UAAkC;AAC7D,MAAI,OAAO,aAAa,YAAY,aAAa,MAAM;AACrD,UAAM,IAAI,UAAU,qCAAqC;AAAA,EAC3D;AACA,MAAI,OAAO,SAAS,OAAO,YAAY,CAAC,oBAAoB,KAAK,SAAS,EAAE,GAAG;AAC7E,UAAM,IAAI;AAAA,MACR;AAAA,IACF;AAAA,EACF;AACA,MAAI,OAAO,SAAS,gBAAgB,YAAY,SAAS,YAAY,KAAK,EAAE,WAAW,GAAG;AACxF,UAAM,IAAI,UAAU,sBAAsB,SAAS,EAAE,wCAAwC;AAAA,EAC/F;AACA,MAAI,OAAO,SAAS,WAAW,cAAc,OAAO,SAAS,sBAAsB,YAAY;AAC7F,UAAM,IAAI;AAAA,MACR,sBAAsB,SAAS,EAAE;AAAA,IACnC;AAAA,EACF;AACF;AAEO,SAA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AAM,OAAO,iBAAiB,CAAC;AAAA,IAC3G;AAAA,EACF;AACA,SAAO;AACT;AAEA,SAAS,aAAa,MAAc,MAAsB;AACxD,QAAM,SAAS,oBAAI,KAAK,GAAG,IAAI,YAAY;AAC3C,SAAO,WAAW,OAAO,WAAW,IAAI,IAAI;AAC5C,SAAO,OAAO,YAAY,EAAE,MAAM,GAAG,EAAE;AACzC;AAkBA,eAAsB,aACpB,SACuE;AACvE,QAAM,EAAE,QAAQ,WAAW,SAAS,MAAM,GAAG,KAAK,IAAI;AACtD,MAAI,YAAY,UAAa,CAAC,oBAAoB,OAAO,GAAG;AAC1D,UAAM,IAAI,WAAW,6BAA6B,OAAO,oCAAoC;AAAA,EAC/F;AACA,QAAM,MAAM,KAAK,QAAQ,MAAM,oBAAI,KAAK;AACxC,QAAM,MAAM,WAAW,aAAa,YAAY,IAAI,EAAE,YAAY,GAAG,OAAO,QAAQ,GAAG,EAAE;AACzF,QAAM,QAAQ,QAAQ,OAAO;AAC7B,MAAI,CAAC,OAAO,UAAU,KAAK,KAAK,QAAQ,KAAK,QAAQ,IAAI;AACvD,UAAM,IAAI,WAAW,oDAAoD;AAAA,EAC3E;AACA,QAAM,OAAqE,CAAC;AAC5E,WAAS,SAAS,OAAO,UAAU,GAAG,UAAU,GAAG;AACjD,UAAM,OAAO,aAAa,KAAK,EAAE,SAAS,EAAE;AAC5C,SAAK,KAAK,EAAE,MAAM,SAAS,MAAM,gBAAgB,EAAE,GAAG,MAAM,QAAQ,WAAW,MAAM,IAAI,CAAC,EAAE,CAAC;AAAA,EAC/F;AACA,SAAO;AACT;","names":[]}
|
|
1
|
+
{"version":3,"sources":[],"sourcesContent":[],"mappings":"","names":[]}
|
|
@@ -7,30 +7,30 @@ import {
|
|
|
7
7
|
readMemoryGovernanceRunArtifact,
|
|
8
8
|
restoreMemoryGovernanceRun,
|
|
9
9
|
runMemoryGovernance
|
|
10
|
-
} from "../chunk-
|
|
11
|
-
import "../chunk-
|
|
10
|
+
} from "../chunk-SVVIASVX.js";
|
|
11
|
+
import "../chunk-BJTHRFFC.js";
|
|
12
12
|
import "../chunk-UHVXE24Y.js";
|
|
13
13
|
import "../chunk-46WM6JX2.js";
|
|
14
14
|
import "../chunk-SXIMQLGV.js";
|
|
15
|
-
import "../chunk-
|
|
16
|
-
import "../chunk-
|
|
15
|
+
import "../chunk-JAQXUGLN.js";
|
|
16
|
+
import "../chunk-RGCF4XNH.js";
|
|
17
|
+
import "../chunk-CYEPCZN5.js";
|
|
18
|
+
import "../chunk-GIC6BASP.js";
|
|
17
19
|
import "../chunk-YQNNHLCG.js";
|
|
18
20
|
import "../chunk-6KTXE6A3.js";
|
|
19
|
-
import "../chunk-
|
|
20
|
-
import "../chunk-
|
|
21
|
-
import "../chunk-CYEPCZN5.js";
|
|
22
|
-
import "../chunk-XZBXINXZ.js";
|
|
23
|
-
import "../chunk-GUMZC2BO.js";
|
|
21
|
+
import "../chunk-N37X5RU7.js";
|
|
22
|
+
import "../chunk-NNBZS3DY.js";
|
|
24
23
|
import "../chunk-W7IGLX4G.js";
|
|
24
|
+
import "../chunk-GUMZC2BO.js";
|
|
25
25
|
import "../chunk-227UFSEQ.js";
|
|
26
26
|
import "../chunk-ET356KSB.js";
|
|
27
27
|
import "../chunk-72A4L5JJ.js";
|
|
28
28
|
import "../chunk-A7Q43EUZ.js";
|
|
29
29
|
import "../chunk-S2V7RUCL.js";
|
|
30
30
|
import "../chunk-LBFFNDFM.js";
|
|
31
|
+
import "../chunk-PO7NXBG2.js";
|
|
31
32
|
import "../chunk-S2HLHAZ4.js";
|
|
32
33
|
import "../chunk-SCU65EZI.js";
|
|
33
|
-
import "../chunk-PO7NXBG2.js";
|
|
34
34
|
import "../chunk-DM2T26WE.js";
|
|
35
35
|
import "../chunk-LDXUBPMO.js";
|
|
36
36
|
import "../chunk-UG6VXIOK.js";
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { S as StorageManager } from '../storage-
|
|
2
|
-
import { K as MemoryLifecycleEvent } from '../types-
|
|
1
|
+
import { S as StorageManager } from '../storage-B1hEx8Xg.js';
|
|
2
|
+
import { K as MemoryLifecycleEvent } from '../types-BHDNxGTT.js';
|
|
3
3
|
import { HeldFileLockOptions } from '../utils/serialize-mutations.js';
|
|
4
4
|
import '../corpus-read-cancellation.js';
|
|
5
5
|
import '../artifact-search.js';
|
|
@@ -2,31 +2,31 @@ import {
|
|
|
2
2
|
backupExistingLedger,
|
|
3
3
|
boundLifecycleEventsToByteCap,
|
|
4
4
|
rebuildMemoryLifecycleLedger
|
|
5
|
-
} from "../chunk-
|
|
5
|
+
} from "../chunk-7WR462EM.js";
|
|
6
6
|
import "../chunk-KJTKLXTH.js";
|
|
7
|
-
import "../chunk-
|
|
7
|
+
import "../chunk-BJTHRFFC.js";
|
|
8
8
|
import "../chunk-UHVXE24Y.js";
|
|
9
9
|
import "../chunk-46WM6JX2.js";
|
|
10
10
|
import "../chunk-SXIMQLGV.js";
|
|
11
|
-
import "../chunk-
|
|
12
|
-
import "../chunk-
|
|
11
|
+
import "../chunk-JAQXUGLN.js";
|
|
12
|
+
import "../chunk-RGCF4XNH.js";
|
|
13
|
+
import "../chunk-CYEPCZN5.js";
|
|
14
|
+
import "../chunk-GIC6BASP.js";
|
|
13
15
|
import "../chunk-YQNNHLCG.js";
|
|
14
16
|
import "../chunk-6KTXE6A3.js";
|
|
15
|
-
import "../chunk-
|
|
16
|
-
import "../chunk-
|
|
17
|
-
import "../chunk-CYEPCZN5.js";
|
|
18
|
-
import "../chunk-XZBXINXZ.js";
|
|
19
|
-
import "../chunk-GUMZC2BO.js";
|
|
17
|
+
import "../chunk-N37X5RU7.js";
|
|
18
|
+
import "../chunk-NNBZS3DY.js";
|
|
20
19
|
import "../chunk-W7IGLX4G.js";
|
|
20
|
+
import "../chunk-GUMZC2BO.js";
|
|
21
21
|
import "../chunk-227UFSEQ.js";
|
|
22
22
|
import "../chunk-ET356KSB.js";
|
|
23
23
|
import "../chunk-72A4L5JJ.js";
|
|
24
24
|
import "../chunk-A7Q43EUZ.js";
|
|
25
25
|
import "../chunk-S2V7RUCL.js";
|
|
26
26
|
import "../chunk-LBFFNDFM.js";
|
|
27
|
+
import "../chunk-PO7NXBG2.js";
|
|
27
28
|
import "../chunk-S2HLHAZ4.js";
|
|
28
29
|
import "../chunk-SCU65EZI.js";
|
|
29
|
-
import "../chunk-PO7NXBG2.js";
|
|
30
30
|
import "../chunk-DM2T26WE.js";
|
|
31
31
|
import "../chunk-LDXUBPMO.js";
|
|
32
32
|
import "../chunk-UG6VXIOK.js";
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { S as StorageManager } from '../storage-
|
|
2
|
-
import '../types-
|
|
1
|
+
import { S as StorageManager } from '../storage-B1hEx8Xg.js';
|
|
2
|
+
import '../types-BHDNxGTT.js';
|
|
3
3
|
import '../message-parts/index.js';
|
|
4
4
|
import '../bounded-jsonl-state.js';
|
|
5
5
|
import '../types-CM86alG1.js';
|
|
@@ -3,33 +3,33 @@ import {
|
|
|
3
3
|
rebuildMemoryProjection,
|
|
4
4
|
repairMemoryProjection,
|
|
5
5
|
verifyMemoryProjection
|
|
6
|
-
} from "../chunk-
|
|
6
|
+
} from "../chunk-WTOZBZNN.js";
|
|
7
7
|
import "../chunk-KJTKLXTH.js";
|
|
8
8
|
import "../chunk-2DQ2XREU.js";
|
|
9
|
-
import "../chunk-
|
|
10
|
-
import "../chunk-
|
|
9
|
+
import "../chunk-SVVIASVX.js";
|
|
10
|
+
import "../chunk-BJTHRFFC.js";
|
|
11
11
|
import "../chunk-UHVXE24Y.js";
|
|
12
12
|
import "../chunk-46WM6JX2.js";
|
|
13
13
|
import "../chunk-SXIMQLGV.js";
|
|
14
|
-
import "../chunk-
|
|
15
|
-
import "../chunk-
|
|
14
|
+
import "../chunk-JAQXUGLN.js";
|
|
15
|
+
import "../chunk-RGCF4XNH.js";
|
|
16
|
+
import "../chunk-CYEPCZN5.js";
|
|
17
|
+
import "../chunk-GIC6BASP.js";
|
|
16
18
|
import "../chunk-YQNNHLCG.js";
|
|
17
19
|
import "../chunk-6KTXE6A3.js";
|
|
18
|
-
import "../chunk-
|
|
19
|
-
import "../chunk-
|
|
20
|
-
import "../chunk-CYEPCZN5.js";
|
|
21
|
-
import "../chunk-XZBXINXZ.js";
|
|
22
|
-
import "../chunk-GUMZC2BO.js";
|
|
20
|
+
import "../chunk-N37X5RU7.js";
|
|
21
|
+
import "../chunk-NNBZS3DY.js";
|
|
23
22
|
import "../chunk-W7IGLX4G.js";
|
|
23
|
+
import "../chunk-GUMZC2BO.js";
|
|
24
24
|
import "../chunk-227UFSEQ.js";
|
|
25
25
|
import "../chunk-ET356KSB.js";
|
|
26
26
|
import "../chunk-72A4L5JJ.js";
|
|
27
27
|
import "../chunk-A7Q43EUZ.js";
|
|
28
28
|
import "../chunk-S2V7RUCL.js";
|
|
29
29
|
import "../chunk-LBFFNDFM.js";
|
|
30
|
+
import "../chunk-PO7NXBG2.js";
|
|
30
31
|
import "../chunk-S2HLHAZ4.js";
|
|
31
32
|
import "../chunk-SCU65EZI.js";
|
|
32
|
-
import "../chunk-PO7NXBG2.js";
|
|
33
33
|
import "../chunk-DM2T26WE.js";
|
|
34
34
|
import "../chunk-LDXUBPMO.js";
|
|
35
35
|
import "../chunk-UG6VXIOK.js";
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { aN as ActivitySnapshot, aO as ActivityConfig, aP as ActivitySourceConfig, aQ as ActivitySourceClient, P as PluginConfig } from './types-BHDNxGTT.js';
|
|
2
2
|
import { SearchBackend } from './search/port.js';
|
|
3
|
-
import { S as StorageManager } from './storage-
|
|
4
|
-
import { a as NamespaceCatalog } from './catalog-
|
|
3
|
+
import { S as StorageManager } from './storage-B1hEx8Xg.js';
|
|
4
|
+
import { a as NamespaceCatalog } from './catalog-DybwVNW3.js';
|
|
5
5
|
import { NamespaceSearchRouter } from './namespaces/search.js';
|
|
6
6
|
import { BetterSqlite3Database } from './runtime/better-sqlite.js';
|
|
7
7
|
|
|
@@ -217,6 +217,7 @@ declare class MaintenanceScheduler {
|
|
|
217
217
|
private lifecycleLedgerMaxBytes;
|
|
218
218
|
private readonly projectionRebuild;
|
|
219
219
|
private readonly activityRegistrar;
|
|
220
|
+
private locationAutoSync;
|
|
220
221
|
constructor(deps: MaintenanceSchedulerDeps);
|
|
221
222
|
/**
|
|
222
223
|
* Register every cron job the daemon should run, gated by its config flag.
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { G as EngramAccessRecallResponse } from './access-service-
|
|
1
|
+
import { G as EngramAccessRecallResponse } from './access-service-Crk__Git.js';
|
|
2
2
|
import { ActionConfidenceRequest } from './access-schema.js';
|
|
3
3
|
import { RecallXraySnapshot } from './recall-xray.js';
|
|
4
4
|
import { ActionConfidenceResult } from './action-confidence.js';
|
|
5
|
-
import './types-
|
|
5
|
+
import './types-BHDNxGTT.js';
|
|
6
6
|
import './message-parts/index.js';
|
|
7
7
|
import './bounded-jsonl-state.js';
|
|
8
8
|
import './types-CM86alG1.js';
|
|
@@ -13,13 +13,13 @@ import './graph-path-scoring-config.js';
|
|
|
13
13
|
import './causal-trajectory.js';
|
|
14
14
|
import './objective-state.js';
|
|
15
15
|
import './types-continuity.js';
|
|
16
|
-
import './orchestrator-
|
|
16
|
+
import './orchestrator-Co1DyfuP.js';
|
|
17
17
|
import './recall-state.js';
|
|
18
18
|
import './utils/serialize-mutations.js';
|
|
19
19
|
import './search/port.js';
|
|
20
20
|
import './included-memories.js';
|
|
21
21
|
import './briefing.js';
|
|
22
|
-
import './storage-
|
|
22
|
+
import './storage-B1hEx8Xg.js';
|
|
23
23
|
import './corpus-read-cancellation.js';
|
|
24
24
|
import './artifact-search.js';
|
|
25
25
|
import './entity-id-normalization.js';
|
|
@@ -40,8 +40,8 @@ import './resolve-provider-secret.js';
|
|
|
40
40
|
import './transcript.js';
|
|
41
41
|
import './session-integrity.js';
|
|
42
42
|
import './summarizer.js';
|
|
43
|
-
import './maintenance-
|
|
44
|
-
import './catalog-
|
|
43
|
+
import './maintenance-Dm2McrIx.js';
|
|
44
|
+
import './catalog-DybwVNW3.js';
|
|
45
45
|
import './namespaces/search.js';
|
|
46
46
|
import './compounding/engine.js';
|
|
47
47
|
import './shared-context/manager.js';
|
|
@@ -51,7 +51,7 @@ import './utility-runtime.js';
|
|
|
51
51
|
import './tier-routing.js';
|
|
52
52
|
import './lifecycle.js';
|
|
53
53
|
import './orchestration/compression-guideline-coordinator.js';
|
|
54
|
-
import './semantic-consolidation-
|
|
54
|
+
import './semantic-consolidation-DziYcW5J.js';
|
|
55
55
|
import './connectors/codex-materialize.js';
|
|
56
56
|
import './logger.js';
|
|
57
57
|
import './embedding-fallback.js';
|
|
@@ -73,10 +73,10 @@ import './conversation-index/chunker.js';
|
|
|
73
73
|
import './conversation-index/backend.js';
|
|
74
74
|
import './faiss-adapter-BHecI1fF.js';
|
|
75
75
|
import './runtime/child-process.js';
|
|
76
|
-
import './dependency-propagation-delivery-
|
|
76
|
+
import './dependency-propagation-delivery-BGcNairQ.js';
|
|
77
77
|
import './namespaces/storage.js';
|
|
78
78
|
import './threading.js';
|
|
79
|
-
import './scope-profiles-
|
|
79
|
+
import './scope-profiles-6ChZKTy-.js';
|
|
80
80
|
import './graph-444E-DrF.js';
|
|
81
81
|
import './recall-context-composition.js';
|
|
82
82
|
import './live-connectors-runner.js';
|
|
@@ -86,7 +86,7 @@ import './negative.js';
|
|
|
86
86
|
import './session-observer-state.js';
|
|
87
87
|
import './semantic-BalR6EXU.js';
|
|
88
88
|
import './replay/types.js';
|
|
89
|
-
import './service-
|
|
89
|
+
import './service-C7rIBuK_.js';
|
|
90
90
|
import './extraction-judge.js';
|
|
91
91
|
import './lcm/engine.js';
|
|
92
92
|
import './lcm/archive.js';
|
|
@@ -107,7 +107,7 @@ import './recall-audit.js';
|
|
|
107
107
|
import './types-B1VHaf2w.js';
|
|
108
108
|
import './transfer/capsule-import.js';
|
|
109
109
|
import './transfer/types.js';
|
|
110
|
-
import './access-namespace-preflight-
|
|
110
|
+
import './access-namespace-preflight-8VYKmRX0.js';
|
|
111
111
|
import './access-token-capabilities.js';
|
|
112
112
|
import 'node:async_hooks';
|
|
113
113
|
import './recall-explain-renderer.js';
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { ai as MemoryActionType,
|
|
1
|
+
import { ai as MemoryActionType, ay as MemoryActionEligibilityContext, az as MemoryActionPolicyResult } from './types-BHDNxGTT.js';
|
|
2
2
|
import './message-parts/index.js';
|
|
3
3
|
import './bounded-jsonl-state.js';
|
|
4
4
|
import './types-CM86alG1.js';
|
package/dist/memory-cache.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { RuntimePolicyValues } from './policy-runtime.js';
|
|
2
2
|
import { UtilityRuntimeValues } from './utility-runtime.js';
|
|
3
|
-
import { ai as MemoryActionType,
|
|
3
|
+
import { ai as MemoryActionType, ay as MemoryActionEligibilityContext, R as RecallPlanMode } from './types-BHDNxGTT.js';
|
|
4
4
|
import './message-parts/index.js';
|
|
5
5
|
import './bounded-jsonl-state.js';
|
|
6
6
|
import './types-CM86alG1.js';
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { aA as MemoryLifecycleEventType, M as MemoryFile, K as MemoryLifecycleEvent, m as MemoryFrontmatter, w as MemoryStatus, aB as MemoryLifecycleStateSummary } from './types-BHDNxGTT.js';
|
|
2
2
|
import './message-parts/index.js';
|
|
3
3
|
import './bounded-jsonl-state.js';
|
|
4
4
|
import './types-CM86alG1.js';
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { MemoryGovernanceReviewQueueEntry, MemoryGovernanceAppliedAction, MemoryGovernanceSummary, MemoryGovernanceMetrics } from './maintenance/memory-governance.js';
|
|
2
|
-
import { y as MemoryCategory, w as MemoryStatus, J as MemoryProjectionCurrentState, K as MemoryLifecycleEvent } from './types-
|
|
2
|
+
import { y as MemoryCategory, w as MemoryStatus, J as MemoryProjectionCurrentState, K as MemoryLifecycleEvent } from './types-BHDNxGTT.js';
|
|
3
3
|
import { openBetterSqlite3, BetterSqlite3Database } from './runtime/better-sqlite.js';
|
|
4
4
|
import './message-parts/index.js';
|
|
5
5
|
import './bounded-jsonl-state.js';
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { w as MemoryStatus, W as LifecycleState, X as VerificationState, Y as PolicyClass, m as MemoryFrontmatter, M as MemoryFile } from './types-
|
|
1
|
+
import { w as MemoryStatus, W as LifecycleState, X as VerificationState, Y as PolicyClass, m as MemoryFrontmatter, M as MemoryFile } from './types-BHDNxGTT.js';
|
|
2
2
|
import { UserContextScope } from './user-model.js';
|
|
3
3
|
import './message-parts/index.js';
|
|
4
4
|
import './bounded-jsonl-state.js';
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { P as PromotionCandidatesResult, S as SubjectBackfillReport } from './access-service-
|
|
2
|
-
import './types-
|
|
1
|
+
import { P as PromotionCandidatesResult, S as SubjectBackfillReport } from './access-service-Crk__Git.js';
|
|
2
|
+
import './types-BHDNxGTT.js';
|
|
3
3
|
import './message-parts/index.js';
|
|
4
4
|
import './bounded-jsonl-state.js';
|
|
5
5
|
import './types-CM86alG1.js';
|
|
@@ -10,13 +10,13 @@ import './graph-path-scoring-config.js';
|
|
|
10
10
|
import './causal-trajectory.js';
|
|
11
11
|
import './objective-state.js';
|
|
12
12
|
import './types-continuity.js';
|
|
13
|
-
import './orchestrator-
|
|
13
|
+
import './orchestrator-Co1DyfuP.js';
|
|
14
14
|
import './recall-state.js';
|
|
15
15
|
import './utils/serialize-mutations.js';
|
|
16
16
|
import './search/port.js';
|
|
17
17
|
import './included-memories.js';
|
|
18
18
|
import './briefing.js';
|
|
19
|
-
import './storage-
|
|
19
|
+
import './storage-B1hEx8Xg.js';
|
|
20
20
|
import './corpus-read-cancellation.js';
|
|
21
21
|
import './artifact-search.js';
|
|
22
22
|
import './entity-id-normalization.js';
|
|
@@ -37,8 +37,8 @@ import './resolve-provider-secret.js';
|
|
|
37
37
|
import './transcript.js';
|
|
38
38
|
import './session-integrity.js';
|
|
39
39
|
import './summarizer.js';
|
|
40
|
-
import './maintenance-
|
|
41
|
-
import './catalog-
|
|
40
|
+
import './maintenance-Dm2McrIx.js';
|
|
41
|
+
import './catalog-DybwVNW3.js';
|
|
42
42
|
import './namespaces/search.js';
|
|
43
43
|
import './compounding/engine.js';
|
|
44
44
|
import './shared-context/manager.js';
|
|
@@ -48,7 +48,7 @@ import './utility-runtime.js';
|
|
|
48
48
|
import './tier-routing.js';
|
|
49
49
|
import './lifecycle.js';
|
|
50
50
|
import './orchestration/compression-guideline-coordinator.js';
|
|
51
|
-
import './semantic-consolidation-
|
|
51
|
+
import './semantic-consolidation-DziYcW5J.js';
|
|
52
52
|
import './connectors/codex-materialize.js';
|
|
53
53
|
import './logger.js';
|
|
54
54
|
import './embedding-fallback.js';
|
|
@@ -70,10 +70,10 @@ import './conversation-index/chunker.js';
|
|
|
70
70
|
import './conversation-index/backend.js';
|
|
71
71
|
import './faiss-adapter-BHecI1fF.js';
|
|
72
72
|
import './runtime/child-process.js';
|
|
73
|
-
import './dependency-propagation-delivery-
|
|
73
|
+
import './dependency-propagation-delivery-BGcNairQ.js';
|
|
74
74
|
import './namespaces/storage.js';
|
|
75
75
|
import './threading.js';
|
|
76
|
-
import './scope-profiles-
|
|
76
|
+
import './scope-profiles-6ChZKTy-.js';
|
|
77
77
|
import './graph-444E-DrF.js';
|
|
78
78
|
import './recall-xray.js';
|
|
79
79
|
import './memory-provenance.js';
|
|
@@ -86,7 +86,7 @@ import './negative.js';
|
|
|
86
86
|
import './session-observer-state.js';
|
|
87
87
|
import './semantic-BalR6EXU.js';
|
|
88
88
|
import './replay/types.js';
|
|
89
|
-
import './service-
|
|
89
|
+
import './service-C7rIBuK_.js';
|
|
90
90
|
import './extraction-judge.js';
|
|
91
91
|
import './lcm/engine.js';
|
|
92
92
|
import './lcm/archive.js';
|
|
@@ -109,7 +109,7 @@ import './recall-audit.js';
|
|
|
109
109
|
import './types-B1VHaf2w.js';
|
|
110
110
|
import './transfer/capsule-import.js';
|
|
111
111
|
import './transfer/types.js';
|
|
112
|
-
import './access-namespace-preflight-
|
|
112
|
+
import './access-namespace-preflight-8VYKmRX0.js';
|
|
113
113
|
import './access-token-capabilities.js';
|
|
114
114
|
import 'node:async_hooks';
|
|
115
115
|
import './recall-explain-renderer.js';
|
package/dist/memory-subject.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
export { T as PROMOTION_CANDIDATES_DEFAULT_MIN_ACCESS, U as PROMOTION_CANDIDATES_MCP_TOOLS, a4 as PromotionCandidate, P as PromotionCandidatesResult, a5 as PromotionReuseSignal, ag as SUBJECT_GUARD_MODES, ah as SUBJECT_GUARD_OVERRIDE_FLAG, ai as SUBJECT_VALUES, S as SubjectBackfillReport, ap as SubjectBackfillStorage, aq as SubjectGuardDecision, bL as backfillMemorySubjects, bQ as computePromotionCandidates, bX as evaluateSubjectGuard, b$ as isMemorySubject, c0 as isSharedPromotionTarget, c1 as isSubjectGuardMode, c4 as promotionCandidateKey, c6 as resolveWriteSubject, c8 as subjectDefaultForCategory } from './access-service-
|
|
2
|
-
import './types-
|
|
3
|
-
import './orchestrator-
|
|
1
|
+
export { T as PROMOTION_CANDIDATES_DEFAULT_MIN_ACCESS, U as PROMOTION_CANDIDATES_MCP_TOOLS, a4 as PromotionCandidate, P as PromotionCandidatesResult, a5 as PromotionReuseSignal, ag as SUBJECT_GUARD_MODES, ah as SUBJECT_GUARD_OVERRIDE_FLAG, ai as SUBJECT_VALUES, S as SubjectBackfillReport, ap as SubjectBackfillStorage, aq as SubjectGuardDecision, bL as backfillMemorySubjects, bQ as computePromotionCandidates, bX as evaluateSubjectGuard, b$ as isMemorySubject, c0 as isSharedPromotionTarget, c1 as isSubjectGuardMode, c4 as promotionCandidateKey, c6 as resolveWriteSubject, c8 as subjectDefaultForCategory } from './access-service-Crk__Git.js';
|
|
2
|
+
import './types-BHDNxGTT.js';
|
|
3
|
+
import './orchestrator-Co1DyfuP.js';
|
|
4
4
|
import './recall-state.js';
|
|
5
5
|
import './utils/serialize-mutations.js';
|
|
6
6
|
import './search/port.js';
|
|
@@ -16,7 +16,7 @@ import './objective-state.js';
|
|
|
16
16
|
import './types-continuity.js';
|
|
17
17
|
import './included-memories.js';
|
|
18
18
|
import './briefing.js';
|
|
19
|
-
import './storage-
|
|
19
|
+
import './storage-B1hEx8Xg.js';
|
|
20
20
|
import './corpus-read-cancellation.js';
|
|
21
21
|
import './artifact-search.js';
|
|
22
22
|
import './entity-id-normalization.js';
|
|
@@ -37,8 +37,8 @@ import './resolve-provider-secret.js';
|
|
|
37
37
|
import './transcript.js';
|
|
38
38
|
import './session-integrity.js';
|
|
39
39
|
import './summarizer.js';
|
|
40
|
-
import './maintenance-
|
|
41
|
-
import './catalog-
|
|
40
|
+
import './maintenance-Dm2McrIx.js';
|
|
41
|
+
import './catalog-DybwVNW3.js';
|
|
42
42
|
import './namespaces/search.js';
|
|
43
43
|
import './compounding/engine.js';
|
|
44
44
|
import './shared-context/manager.js';
|
|
@@ -48,7 +48,7 @@ import './utility-runtime.js';
|
|
|
48
48
|
import './tier-routing.js';
|
|
49
49
|
import './lifecycle.js';
|
|
50
50
|
import './orchestration/compression-guideline-coordinator.js';
|
|
51
|
-
import './semantic-consolidation-
|
|
51
|
+
import './semantic-consolidation-DziYcW5J.js';
|
|
52
52
|
import './connectors/codex-materialize.js';
|
|
53
53
|
import './logger.js';
|
|
54
54
|
import './embedding-fallback.js';
|
|
@@ -70,10 +70,10 @@ import './conversation-index/chunker.js';
|
|
|
70
70
|
import './conversation-index/backend.js';
|
|
71
71
|
import './faiss-adapter-BHecI1fF.js';
|
|
72
72
|
import './runtime/child-process.js';
|
|
73
|
-
import './dependency-propagation-delivery-
|
|
73
|
+
import './dependency-propagation-delivery-BGcNairQ.js';
|
|
74
74
|
import './namespaces/storage.js';
|
|
75
75
|
import './threading.js';
|
|
76
|
-
import './scope-profiles-
|
|
76
|
+
import './scope-profiles-6ChZKTy-.js';
|
|
77
77
|
import './graph-444E-DrF.js';
|
|
78
78
|
import './recall-xray.js';
|
|
79
79
|
import './memory-provenance.js';
|
|
@@ -86,7 +86,7 @@ import './negative.js';
|
|
|
86
86
|
import './session-observer-state.js';
|
|
87
87
|
import './semantic-BalR6EXU.js';
|
|
88
88
|
import './replay/types.js';
|
|
89
|
-
import './service-
|
|
89
|
+
import './service-C7rIBuK_.js';
|
|
90
90
|
import './extraction-judge.js';
|
|
91
91
|
import './lcm/engine.js';
|
|
92
92
|
import './lcm/archive.js';
|
|
@@ -109,7 +109,7 @@ import './recall-audit.js';
|
|
|
109
109
|
import './types-B1VHaf2w.js';
|
|
110
110
|
import './transfer/capsule-import.js';
|
|
111
111
|
import './transfer/types.js';
|
|
112
|
-
import './access-namespace-preflight-
|
|
112
|
+
import './access-namespace-preflight-8VYKmRX0.js';
|
|
113
113
|
import './access-token-capabilities.js';
|
|
114
114
|
import 'node:async_hooks';
|
|
115
115
|
import './recall-explain-renderer.js';
|