@remnic/core 9.64.0 → 9.64.2
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 +12 -11
- package/dist/access-admin-ops-surface.js +24 -23
- package/dist/access-authorization-probe.d.ts +12 -11
- package/dist/access-authorization-probe.js +25 -24
- package/dist/access-boundary.d.ts +13 -12
- package/dist/access-boundary.js +24 -23
- package/dist/access-cli.js +74 -72
- 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 +12 -11
- package/dist/access-extraction-force-flush.js +24 -23
- package/dist/access-health-types.d.ts +1 -1
- package/dist/access-http-lcm-compaction.d.ts +12 -11
- package/dist/access-http-lifecycle-flush.d.ts +12 -11
- package/dist/access-http-offline-stream.d.ts +12 -11
- package/dist/access-http-query.d.ts +2 -2
- package/dist/access-http-query.js +26 -25
- package/dist/access-http.d.ts +13 -12
- package/dist/access-http.js +41 -40
- package/dist/access-identity-continuity-surface.d.ts +9 -9
- package/dist/access-identity-continuity-surface.js +24 -23
- package/dist/access-lcm-surface.d.ts +12 -11
- package/dist/access-lcm-surface.js +24 -23
- package/dist/access-mcp-output-schemas.js +1 -1
- package/dist/access-mcp.d.ts +12 -186
- package/dist/access-mcp.js +33 -32
- package/dist/access-memory-search-fanout.d.ts +2 -2
- package/dist/{access-namespace-preflight-CrF0FKaz.d.ts → access-namespace-preflight-CYeI1R2_.d.ts} +1 -1
- package/dist/access-namespace-preflight.d.ts +3 -3
- package/dist/access-namespace-preflight.js +24 -23
- package/dist/access-observe-write-surface.d.ts +12 -11
- package/dist/access-observe-write-surface.js +24 -23
- package/dist/access-offline-manifest.d.ts +9 -9
- package/dist/access-operations-batch.js +27 -26
- package/dist/access-operations.d.ts +13 -12
- package/dist/access-operations.js +30 -29
- package/dist/access-recall-concurrency.d.ts +12 -11
- package/dist/access-recall-concurrency.js +24 -23
- package/dist/access-recall-response.d.ts +12 -11
- package/dist/access-recall-response.js +24 -23
- package/dist/access-recall-surface.d.ts +12 -11
- package/dist/access-recall-surface.js +24 -23
- package/dist/access-schema.js +3 -3
- package/dist/{access-service-BqF4UK8Z.d.ts → access-service-BKtdXnyk.d.ts} +294 -12
- package/dist/access-service-helpers.d.ts +12 -11
- package/dist/access-service.d.ts +12 -11
- package/dist/access-service.js +24 -23
- package/dist/access-surface-catalog.d.ts +12 -11
- package/dist/access-surface-catalog.js +28 -25
- 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 +1 -1
- 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/buffer.js +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-C0KIwZqR.d.ts → catalog-CLAqQO2L.d.ts} +1 -1
- package/dist/causal-behavior.d.ts +1 -1
- package/dist/causal-consolidation.d.ts +1 -1
- package/dist/causal-consolidation.js +11 -11
- package/dist/causal-trajectory-graph.d.ts +1 -1
- package/dist/{chunk-BTUIHRRR.js → chunk-246HFJVG.js} +2 -2
- package/dist/{chunk-OWHERGF2.js → chunk-2NLLXCJG.js} +2 -2
- package/dist/{chunk-5SZ6CLGJ.js → chunk-2QI2JBLQ.js} +360 -238
- package/dist/chunk-2QI2JBLQ.js.map +1 -0
- package/dist/{chunk-6NMZXEJ7.js → chunk-3A46U7XG.js} +2 -2
- package/dist/{chunk-S6KMN6MJ.js → chunk-3LOQN3TO.js} +10 -5
- package/dist/chunk-3LOQN3TO.js.map +1 -0
- package/dist/{chunk-Z3Q5I5F6.js → chunk-44DSGZFF.js} +2 -2
- package/dist/{chunk-VENMDW4U.js → chunk-55SJFHVD.js} +6 -6
- package/dist/{chunk-VCBG52MM.js → chunk-5HERQ5FX.js} +7 -7
- package/dist/{chunk-IRXMJLTW.js → chunk-5HK3CJAR.js} +2 -2
- package/dist/{chunk-KG2CT762.js → chunk-6LTCUN3T.js} +2 -2
- package/dist/{chunk-UUYQWKHO.js → chunk-7BVO64UC.js} +2 -2
- package/dist/{chunk-X6HNXVXS.js → chunk-7V3AZWWZ.js} +4 -4
- package/dist/{chunk-EHC3FIJ4.js → chunk-A2IBK3TG.js} +2 -2
- package/dist/{chunk-6BV6ZZZA.js → chunk-C6AKYOFO.js} +2 -2
- package/dist/{chunk-7ML7STOD.js → chunk-CKZHKFY3.js} +3 -3
- package/dist/{chunk-CUDSA46O.js → chunk-CUIAHZPZ.js} +2 -2
- package/dist/{chunk-QFPX7QZG.js → chunk-DA2O3F5V.js} +25 -11
- package/dist/chunk-DA2O3F5V.js.map +1 -0
- package/dist/{chunk-CTD5CPD2.js → chunk-DC4FJY2G.js} +22 -7
- package/dist/{chunk-CTD5CPD2.js.map → chunk-DC4FJY2G.js.map} +1 -1
- package/dist/{chunk-2BRCV2IV.js → chunk-DG6MJD7W.js} +2 -2
- package/dist/{chunk-YGSDWO3U.js → chunk-DHKV6E4A.js} +2 -2
- package/dist/{chunk-DZFPHARJ.js → chunk-EJDLQRUO.js} +2 -2
- package/dist/{chunk-VD2OT77P.js → chunk-GEULB2VI.js} +2 -1
- package/dist/chunk-GEULB2VI.js.map +1 -0
- package/dist/{chunk-BPLPGOUJ.js → chunk-GVRLED7R.js} +2 -2
- package/dist/{chunk-YINSSARY.js → chunk-H5CGAD7L.js} +1 -1
- package/dist/{chunk-QICOU4RY.js → chunk-IFK3PVM7.js} +2 -2
- package/dist/{chunk-E7MYSCSL.js → chunk-IJXECCUV.js} +2 -2
- package/dist/{chunk-RKNJBZ55.js → chunk-JBPKEARU.js} +4 -4
- package/dist/{chunk-WQ6TRWAE.js → chunk-JCSUNXYJ.js} +3 -3
- package/dist/{chunk-5W7CTZ2E.js → chunk-KQAFEZQX.js} +4 -4
- package/dist/{chunk-6IKXAAJI.js → chunk-KRPE7ANR.js} +2 -2
- package/dist/{chunk-FEP45MYY.js → chunk-LOETWOEB.js} +2 -2
- package/dist/{chunk-4IIDTPSK.js → chunk-LZKCMK3U.js} +2 -2
- package/dist/{chunk-ML4MI2RR.js → chunk-MJRVF7SF.js} +29 -28
- package/dist/chunk-MJRVF7SF.js.map +1 -0
- package/dist/{chunk-K547KS3X.js → chunk-ML3U4KPR.js} +4 -4
- package/dist/{chunk-HIEWDJ2O.js → chunk-MSTNSVXI.js} +2 -1
- package/dist/chunk-MSTNSVXI.js.map +1 -0
- package/dist/{chunk-BTBAHTQ5.js → chunk-NO7B6DRB.js} +2 -2
- package/dist/{chunk-G5F4MXXC.js → chunk-ON2P3SHG.js} +2 -2
- package/dist/{chunk-2Q4UAPLD.js → chunk-OQIRBGUU.js} +4 -4
- package/dist/{chunk-PQODT53H.js → chunk-PE76XIDM.js} +3 -3
- package/dist/{chunk-MVIYRRVJ.js → chunk-PMVPCZJZ.js} +5 -5
- package/dist/{chunk-CK3DZ6OE.js → chunk-PVIXAMWM.js} +2 -2
- package/dist/{chunk-BB2LH5JM.js → chunk-RNORDDD6.js} +11 -1
- package/dist/chunk-RNORDDD6.js.map +1 -0
- package/dist/{chunk-HZXO2CJ6.js → chunk-RWLRKMZK.js} +2 -2
- package/dist/{chunk-SYU5JOBQ.js → chunk-SB6YBB2V.js} +2 -2
- package/dist/{chunk-3F3CVVDS.js → chunk-SHQFYZTD.js} +2 -2
- package/dist/chunk-TKI2WOL5.js +256 -0
- package/dist/chunk-TKI2WOL5.js.map +1 -0
- package/dist/chunk-TY35YQ6E.js +77 -0
- package/dist/chunk-TY35YQ6E.js.map +1 -0
- package/dist/{chunk-R7XE5ZUR.js → chunk-UIYYS2YI.js} +2 -2
- package/dist/{chunk-ZWYXSF2T.js → chunk-UMDZXW5J.js} +118 -4
- package/dist/chunk-UMDZXW5J.js.map +1 -0
- package/dist/{chunk-G5OB4XZX.js → chunk-VANZKHTN.js} +4 -4
- package/dist/{chunk-QATILW4B.js → chunk-VLES5S4K.js} +271 -62
- package/dist/chunk-VLES5S4K.js.map +1 -0
- package/dist/{chunk-AR253JBM.js → chunk-VRYEXPRX.js} +1 -1
- package/dist/chunk-VRYEXPRX.js.map +1 -0
- package/dist/{chunk-7DRSWPUV.js → chunk-VUP47UJI.js} +3 -3
- package/dist/{chunk-65NQFK7D.js → chunk-WBM5NR4E.js} +2 -2
- package/dist/{chunk-UVYI6VIX.js → chunk-X7Y7WX73.js} +1 -1
- package/dist/{chunk-GIMQJ5RX.js → chunk-XACYILRA.js} +49 -14
- package/dist/chunk-XACYILRA.js.map +1 -0
- package/dist/{chunk-63JMI45N.js → chunk-XBRGJJK7.js} +2 -2
- package/dist/{chunk-WCWIV2JH.js → chunk-XH4IQVTN.js} +2 -2
- package/dist/{chunk-77E7LLMV.js → chunk-XZUCNVGE.js} +8 -8
- package/dist/{chunk-LJQGQUNS.js → chunk-YFQTDE7N.js} +2 -2
- package/dist/{chunk-5OOTHWGJ.js → chunk-YXGU3MDQ.js} +2 -2
- package/dist/{chunk-SRLQROQJ.js → chunk-Z6CJLYXT.js} +4 -4
- package/dist/{chunk-Z4UPRZR6.js → chunk-ZSYE2QVJ.js} +2 -2
- package/dist/{cli-BX0O688c.d.ts → cli-CLvBewKf.d.ts} +5 -5
- package/dist/cli.d.ts +13 -13
- package/dist/cli.js +57 -56
- package/dist/coding/pre-action-gate.d.ts +1 -1
- 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 +1 -1
- 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 +2 -2
- package/dist/contradiction/index.js +4 -4
- 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/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-Cph4PnBe.d.ts → dependency-propagation-delivery-DMqIw9Zh.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/explicit-capture.d.ts +9 -9
- package/dist/external-wiki-access.d.ts +12 -11
- package/dist/external-wiki-access.js +25 -24
- 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 +12 -13
- 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 +13 -13
- 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-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.d.ts +1 -1
- 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.d.ts +33 -24
- package/dist/index.js +120 -84
- package/dist/intent.d.ts +1 -1
- package/dist/lcm/engine.d.ts +1 -1
- package/dist/lcm/engine.js +3 -3
- package/dist/lcm/index.d.ts +1 -1
- package/dist/lcm/index.js +11 -11
- 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/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-BNq31xpo.d.ts → maintenance-DITiehFX.d.ts} +3 -3
- package/dist/mcp-memory-inspector-app.d.ts +12 -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-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-worth-outcomes.d.ts +2 -2
- 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 +19 -19
- package/dist/orchestration/compression-guideline-coordinator.d.ts +2 -2
- package/dist/orchestration/maintenance.d.ts +4 -4
- package/dist/orchestration/maintenance.js +16 -16
- package/dist/{orchestrator-CBuUOP2J.d.ts → orchestrator-6fPa2l9x.d.ts} +8 -8
- package/dist/orchestrator.d.ts +9 -9
- package/dist/orchestrator.js +74 -72
- package/dist/patterns-cli.d.ts +1 -1
- package/dist/{pipeline-CW_Q4WvX.d.ts → pipeline-DHpYtfM3.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-BeJ1_JI1.d.ts → public-http-BT36aBb-.d.ts} +1 -1
- package/dist/{qmd-q-cAzYuC.d.ts → qmd-BaX31tM0.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-explain-renderer.js +3 -3
- 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-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/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 +2 -2
- 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-CIr4mXgp.d.ts → scope-profiles-1hYWJ9bM.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-BZ6J46j-.d.ts → semantic-consolidation-Chmddvcg.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-CCl4iyyY.d.ts → service-DMs_dCCg.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 +12 -12
- package/dist/{storage-BPXmJKIt.d.ts → storage-CzorrpcN.d.ts} +12 -3
- package/dist/storage.d.ts +2 -2
- package/dist/storage.js +9 -9
- package/dist/summarizer.d.ts +1 -1
- package/dist/summary-snapshot.d.ts +1 -1
- package/dist/support-passport/index.d.ts +15 -14
- package/dist/support-passport/index.js +27 -26
- 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-CltSWcND.d.ts → types-BP5MC8UU.d.ts} +34 -8
- 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 +10 -10
- package/dist/who-knows-cli.d.ts +155 -0
- package/dist/who-knows-cli.js +109 -0
- package/dist/who-knows-cli.js.map +1 -0
- package/dist/who-knows.d.ts +127 -0
- package/dist/who-knows.js +118 -0
- package/dist/who-knows.js.map +1 -0
- package/dist/write-envelope.d.ts +1 -1
- package/package.json +2 -2
- package/src/access-boundary.ts +1 -0
- package/src/access-http.ts +15 -0
- package/src/access-mcp-output-schemas.ts +1 -0
- package/src/access-mcp.ts +3 -2
- package/src/access-operations-batch.ts +8 -0
- package/src/access-service.ts +26 -0
- package/src/access-surface-catalog.ts +2 -0
- package/src/cli/okf-commands.ts +23 -0
- package/src/cli.ts +2 -1
- package/src/config.ts +7 -7
- package/src/index.ts +3 -0
- package/src/location/cli.ts +163 -0
- package/src/location/config.test.ts +75 -0
- package/src/location/config.ts +105 -0
- package/src/location/intervals.test.ts +202 -0
- package/src/location/intervals.ts +221 -0
- package/src/location/parse-companions.ts +12 -0
- package/src/location/pipeline.test.ts +324 -0
- package/src/location/pipeline.ts +245 -0
- package/src/location/recall-exclusion.test.ts +36 -0
- package/src/location/registry.test.ts +74 -0
- package/src/location/registry.ts +54 -0
- package/src/location/store.test.ts +170 -0
- package/src/location/store.ts +478 -0
- package/src/location/types.ts +95 -0
- package/src/mcp-read-only-tools.ts +1 -0
- package/src/okf/cli.ts +42 -0
- package/src/okf/config.ts +34 -0
- package/src/okf/lint.ts +110 -0
- package/src/okf/sweep.ts +63 -0
- package/src/okf/type-mapping.test.ts +207 -0
- package/src/okf/type-mapping.ts +79 -0
- package/src/orchestration/generic-recall-paths.ts +17 -0
- package/src/orchestration/orchestrator-helpers.ts +22 -0
- package/src/orchestration/qmd-result-resolver.ts +1 -0
- package/src/orchestrator.ts +2 -0
- package/src/storage/entity-store.ts +9 -5
- package/src/storage/profile-header.ts +33 -9
- package/src/storage/questions-file.ts +50 -0
- package/src/storage.ts +76 -63
- package/src/types.ts +6 -8
- package/src/who-knows-cli.ts +96 -0
- package/src/who-knows.test.ts +257 -0
- package/src/who-knows.ts +364 -0
- package/dist/chunk-5SZ6CLGJ.js.map +0 -1
- package/dist/chunk-AR253JBM.js.map +0 -1
- package/dist/chunk-BB2LH5JM.js.map +0 -1
- package/dist/chunk-GIMQJ5RX.js.map +0 -1
- package/dist/chunk-HIEWDJ2O.js.map +0 -1
- package/dist/chunk-ML4MI2RR.js.map +0 -1
- package/dist/chunk-QATILW4B.js.map +0 -1
- package/dist/chunk-QFPX7QZG.js.map +0 -1
- package/dist/chunk-S6KMN6MJ.js.map +0 -1
- package/dist/chunk-VD2OT77P.js.map +0 -1
- package/dist/chunk-ZWYXSF2T.js.map +0 -1
- /package/dist/{capsule-crypto-GWVG7LGC.js.map → capsule-crypto-7FJQINUR.js.map} +0 -0
- /package/dist/{chunk-BTUIHRRR.js.map → chunk-246HFJVG.js.map} +0 -0
- /package/dist/{chunk-OWHERGF2.js.map → chunk-2NLLXCJG.js.map} +0 -0
- /package/dist/{chunk-6NMZXEJ7.js.map → chunk-3A46U7XG.js.map} +0 -0
- /package/dist/{chunk-Z3Q5I5F6.js.map → chunk-44DSGZFF.js.map} +0 -0
- /package/dist/{chunk-VENMDW4U.js.map → chunk-55SJFHVD.js.map} +0 -0
- /package/dist/{chunk-VCBG52MM.js.map → chunk-5HERQ5FX.js.map} +0 -0
- /package/dist/{chunk-IRXMJLTW.js.map → chunk-5HK3CJAR.js.map} +0 -0
- /package/dist/{chunk-KG2CT762.js.map → chunk-6LTCUN3T.js.map} +0 -0
- /package/dist/{chunk-UUYQWKHO.js.map → chunk-7BVO64UC.js.map} +0 -0
- /package/dist/{chunk-X6HNXVXS.js.map → chunk-7V3AZWWZ.js.map} +0 -0
- /package/dist/{chunk-EHC3FIJ4.js.map → chunk-A2IBK3TG.js.map} +0 -0
- /package/dist/{chunk-6BV6ZZZA.js.map → chunk-C6AKYOFO.js.map} +0 -0
- /package/dist/{chunk-7ML7STOD.js.map → chunk-CKZHKFY3.js.map} +0 -0
- /package/dist/{chunk-CUDSA46O.js.map → chunk-CUIAHZPZ.js.map} +0 -0
- /package/dist/{chunk-2BRCV2IV.js.map → chunk-DG6MJD7W.js.map} +0 -0
- /package/dist/{chunk-YGSDWO3U.js.map → chunk-DHKV6E4A.js.map} +0 -0
- /package/dist/{chunk-DZFPHARJ.js.map → chunk-EJDLQRUO.js.map} +0 -0
- /package/dist/{chunk-BPLPGOUJ.js.map → chunk-GVRLED7R.js.map} +0 -0
- /package/dist/{chunk-YINSSARY.js.map → chunk-H5CGAD7L.js.map} +0 -0
- /package/dist/{chunk-QICOU4RY.js.map → chunk-IFK3PVM7.js.map} +0 -0
- /package/dist/{chunk-E7MYSCSL.js.map → chunk-IJXECCUV.js.map} +0 -0
- /package/dist/{chunk-RKNJBZ55.js.map → chunk-JBPKEARU.js.map} +0 -0
- /package/dist/{chunk-WQ6TRWAE.js.map → chunk-JCSUNXYJ.js.map} +0 -0
- /package/dist/{chunk-5W7CTZ2E.js.map → chunk-KQAFEZQX.js.map} +0 -0
- /package/dist/{chunk-6IKXAAJI.js.map → chunk-KRPE7ANR.js.map} +0 -0
- /package/dist/{chunk-FEP45MYY.js.map → chunk-LOETWOEB.js.map} +0 -0
- /package/dist/{chunk-4IIDTPSK.js.map → chunk-LZKCMK3U.js.map} +0 -0
- /package/dist/{chunk-K547KS3X.js.map → chunk-ML3U4KPR.js.map} +0 -0
- /package/dist/{chunk-BTBAHTQ5.js.map → chunk-NO7B6DRB.js.map} +0 -0
- /package/dist/{chunk-G5F4MXXC.js.map → chunk-ON2P3SHG.js.map} +0 -0
- /package/dist/{chunk-2Q4UAPLD.js.map → chunk-OQIRBGUU.js.map} +0 -0
- /package/dist/{chunk-PQODT53H.js.map → chunk-PE76XIDM.js.map} +0 -0
- /package/dist/{chunk-MVIYRRVJ.js.map → chunk-PMVPCZJZ.js.map} +0 -0
- /package/dist/{chunk-CK3DZ6OE.js.map → chunk-PVIXAMWM.js.map} +0 -0
- /package/dist/{chunk-HZXO2CJ6.js.map → chunk-RWLRKMZK.js.map} +0 -0
- /package/dist/{chunk-SYU5JOBQ.js.map → chunk-SB6YBB2V.js.map} +0 -0
- /package/dist/{chunk-3F3CVVDS.js.map → chunk-SHQFYZTD.js.map} +0 -0
- /package/dist/{chunk-R7XE5ZUR.js.map → chunk-UIYYS2YI.js.map} +0 -0
- /package/dist/{chunk-G5OB4XZX.js.map → chunk-VANZKHTN.js.map} +0 -0
- /package/dist/{chunk-7DRSWPUV.js.map → chunk-VUP47UJI.js.map} +0 -0
- /package/dist/{chunk-65NQFK7D.js.map → chunk-WBM5NR4E.js.map} +0 -0
- /package/dist/{chunk-UVYI6VIX.js.map → chunk-X7Y7WX73.js.map} +0 -0
- /package/dist/{chunk-63JMI45N.js.map → chunk-XBRGJJK7.js.map} +0 -0
- /package/dist/{chunk-WCWIV2JH.js.map → chunk-XH4IQVTN.js.map} +0 -0
- /package/dist/{chunk-77E7LLMV.js.map → chunk-XZUCNVGE.js.map} +0 -0
- /package/dist/{chunk-LJQGQUNS.js.map → chunk-YFQTDE7N.js.map} +0 -0
- /package/dist/{chunk-5OOTHWGJ.js.map → chunk-YXGU3MDQ.js.map} +0 -0
- /package/dist/{chunk-SRLQROQJ.js.map → chunk-Z6CJLYXT.js.map} +0 -0
- /package/dist/{chunk-Z4UPRZR6.js.map → chunk-ZSYE2QVJ.js.map} +0 -0
package/src/access-mcp.ts
CHANGED
|
@@ -45,6 +45,7 @@ import { applyToolOutputSchemas } from "./access-mcp-output-schemas.js";
|
|
|
45
45
|
import { MCP_READ_ONLY_TOOL_SUFFIXES } from "./mcp-read-only-tools.js";
|
|
46
46
|
import { MEETINGS_MCP_TOOLS } from "./meetings/mcp-tools.js";
|
|
47
47
|
import { WEARABLES_MCP_TOOLS } from "./wearables/mcp-tools.js";
|
|
48
|
+
import { WHO_KNOWS_MCP_TOOLS } from "./who-knows.js";
|
|
48
49
|
import { EXTERNAL_WIKI_MCP_TOOLS } from "./external-wiki-mcp-tools.js";
|
|
49
50
|
import { abortError, isAbortError } from "./abort-error.js";
|
|
50
51
|
import { SUPPORT_PASSPORT_MCP_MIGRATED_OPERATIONS, SUPPORT_PASSPORT_MCP_TOOLS } from "./support-passport/mcp-tools.js";
|
|
@@ -186,7 +187,7 @@ const MCP_MIGRATED_OPERATIONS: Readonly<Record<string, OperationName>> = {
|
|
|
186
187
|
"engram.recall_explain": "recall_explain",
|
|
187
188
|
"engram.set_coding_context": "set_coding_context",
|
|
188
189
|
"engram.recall_tier_explain": "recall_tier_explain",
|
|
189
|
-
"engram.recall_xray": "recall_xray",
|
|
190
|
+
"engram.recall_xray": "recall_xray", "engram.who_knows": "who_knows",
|
|
190
191
|
"engram.wearables_status": "wearables_status",
|
|
191
192
|
"engram.wearables_sync": "wearables_sync",
|
|
192
193
|
"engram.transcript_day": "transcript_day",
|
|
@@ -705,7 +706,7 @@ export class EngramMcpServer {
|
|
|
705
706
|
additionalProperties: false,
|
|
706
707
|
},
|
|
707
708
|
},
|
|
708
|
-
...WEARABLES_MCP_TOOLS, ...MEETINGS_MCP_TOOLS,
|
|
709
|
+
...WEARABLES_MCP_TOOLS, ...MEETINGS_MCP_TOOLS, ...WHO_KNOWS_MCP_TOOLS,
|
|
709
710
|
...(service.supportPassportEnabled ? SUPPORT_PASSPORT_MCP_TOOLS : []),
|
|
710
711
|
{
|
|
711
712
|
name: "engram.action_confidence",
|
|
@@ -139,6 +139,14 @@ defineOperation({ name: "recall_xray", description: "X-ray recall.", schema: str
|
|
|
139
139
|
return { result: await ctx.service.recallXray({ query: defStr(input.query, ""), sessionKey: optStr(input.sessionKey), namespace: optStr(input.namespace), budget, authenticatedPrincipal: ctx.authenticatedPrincipal, sourceConnector: ctx.sourceConnector, ...(dr && dr !== "" ? { disclosure: dr as RecallDisclosure } : {}), ...(ctx.abortSignal ? { abortSignal: ctx.abortSignal } : {}) }) };
|
|
140
140
|
},
|
|
141
141
|
});
|
|
142
|
+
defineOperation({ name: "who_knows", description: "Rank entities by demonstrated expertise for a topic (#2057).", schema: strictSchema({ topic: S.str, limit: S.flexNum, namespace: S.str }),
|
|
143
|
+
handler: async (input, ctx) => {
|
|
144
|
+
const topic = defStr(input.topic, "");
|
|
145
|
+
let limit: number | undefined;
|
|
146
|
+
if (input.limit !== undefined) { const p = typeof input.limit === "number" ? input.limit : Number(input.limit); if (!Number.isInteger(p) || p < 1) throw new EngramAccessInputError("who_knows: limit expects a positive integer"); limit = p; }
|
|
147
|
+
return { result: await ctx.service.whoKnows({ topic, ...(limit !== undefined ? { limit } : {}), namespace: optStr(input.namespace), authenticatedPrincipal: ctx.authenticatedPrincipal }) };
|
|
148
|
+
},
|
|
149
|
+
});
|
|
142
150
|
defineOperation({ name: "namespace_writable", description: "Read-only preflight: is a namespace writable for the caller's principal?", allowedByOps: ["namespace_writable", "observe", "memory_store"], schema: strictSchema({ namespace: S.str, sessionKey: S.str, op: S.str, cwd: S.str, projectTag: S.str }), handler: async (input, ctx) => {
|
|
143
151
|
const writeOp = parseNamespacePreflightWriteOp(optStr(input.op));
|
|
144
152
|
const namespace = optStr(input.namespace);
|
package/src/access-service.ts
CHANGED
|
@@ -304,6 +304,7 @@ import { decideDisclosureEscalation } from "./recall-disclosure-escalation.js";
|
|
|
304
304
|
import { toRecallExplainJson } from "./recall-explain-renderer.js";
|
|
305
305
|
import { type TagMatchMode, applyTagFilter, normalizeTags, parseTagMatch } from "./recall-tag-filter.js";
|
|
306
306
|
import { type RecallXraySnapshot, estimateRecallTokens } from "./recall-xray.js";
|
|
307
|
+
import { computeWhoKnows, loadWhoKnowsEntities, validateWhoKnowsInput, WHO_KNOWS_DEFAULT_LIMIT, type WhoKnowsResult } from "./who-knows.js";
|
|
307
308
|
import { SupportPassportAccessServiceBase } from "./support-passport/access-service-base.js";
|
|
308
309
|
import {
|
|
309
310
|
type ExportCapsuleOptions,
|
|
@@ -2712,6 +2713,31 @@ export class EngramAccessService extends SupportPassportAccessServiceBase {
|
|
|
2712
2713
|
}> {
|
|
2713
2714
|
return this.accessRecallSurface.recallXray(request);
|
|
2714
2715
|
}
|
|
2716
|
+
|
|
2717
|
+
/**
|
|
2718
|
+
* Rank entities by demonstrated expertise for a topic (issue #2057).
|
|
2719
|
+
* Deterministic — no LLM, no QMD. Reads the namespace-scoped corpus and
|
|
2720
|
+
* entity files only; namespace resolution + ACL mirror recall semantics
|
|
2721
|
+
* (`resolveReadableNamespace`), so a principal cannot rank outside a
|
|
2722
|
+
* namespace it cannot read.
|
|
2723
|
+
*/
|
|
2724
|
+
async whoKnows(request: {
|
|
2725
|
+
topic: string;
|
|
2726
|
+
limit?: number;
|
|
2727
|
+
namespace?: string;
|
|
2728
|
+
authenticatedPrincipal?: string;
|
|
2729
|
+
}): Promise<WhoKnowsResult> {
|
|
2730
|
+
const topic = request.topic?.trim() ?? "";
|
|
2731
|
+
const limit = request.limit ?? WHO_KNOWS_DEFAULT_LIMIT;
|
|
2732
|
+
validateWhoKnowsInput(topic, limit);
|
|
2733
|
+
const resolvedNamespace = this.resolveReadableNamespace(request.namespace, request.authenticatedPrincipal);
|
|
2734
|
+
const storage = await this.orchestrator.getStorage(resolvedNamespace);
|
|
2735
|
+
const [memories, entities] = await Promise.all([
|
|
2736
|
+
storage.readAllMemories(),
|
|
2737
|
+
loadWhoKnowsEntities(storage, this.orchestrator.config.entitySchemas),
|
|
2738
|
+
]);
|
|
2739
|
+
return computeWhoKnows({ topic, limit, memories, entities });
|
|
2740
|
+
}
|
|
2715
2741
|
async memoryStore(
|
|
2716
2742
|
request: EngramAccessMemoryStoreRequest,
|
|
2717
2743
|
hooks?: { enforceWriteQuota?: () => void | Promise<void> }
|
|
@@ -56,6 +56,7 @@ export const MCP_TOOLS: readonly McpToolEntry[] = [
|
|
|
56
56
|
{ tool: "set_coding_context", operation: "set_coding_context" },
|
|
57
57
|
{ tool: "recall_tier_explain", operation: "recall_tier_explain" },
|
|
58
58
|
{ tool: "recall_xray", operation: "recall_xray" },
|
|
59
|
+
{ tool: "who_knows", operation: "who_knows" },
|
|
59
60
|
{ tool: "wearables_status", operation: "wearables_status" },
|
|
60
61
|
{ tool: "wearables_sync", operation: "wearables_sync" },
|
|
61
62
|
{ tool: "transcript_day", operation: "transcript_day" },
|
|
@@ -210,6 +211,7 @@ export const HTTP_ROUTES: readonly HttpRouteEntry[] = [
|
|
|
210
211
|
{ method: "POST", pathname: "/engram/v1/action-confidence", operation: "action_confidence" },
|
|
211
212
|
{ method: "GET", pathname: "/engram/v1/recall/tier-explain", operation: "recall_tier_explain" },
|
|
212
213
|
{ method: "GET", pathname: "/engram/v1/recall/xray", operation: "recall_xray" },
|
|
214
|
+
{ method: "GET", pathname: "/engram/v1/who-knows", operation: "who_knows" },
|
|
213
215
|
{ method: "GET", pathname: "/engram/v1/namespace/writable", operation: "namespace_writable" },
|
|
214
216
|
{ method: "GET", pathname: "/engram/v1/wearables/status", operation: "wearables_status" },
|
|
215
217
|
{ method: "POST", pathname: "/engram/v1/wearables/sync", operation: "wearables_sync" },
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import type { Orchestrator } from "../orchestrator.js";
|
|
2
|
+
import type { CliCommand } from "../cli.js";
|
|
3
|
+
import { runOkfCliCommand } from "../okf/cli.js";
|
|
4
|
+
|
|
5
|
+
export function registerOkfCommands(cmd: CliCommand, orchestrator: Orchestrator): void {
|
|
6
|
+
const okfCmd = cmd.command("okf").description("OKF v0.1 conformance (lint, sweep)");
|
|
7
|
+
const forward = async (argv: string[]): Promise<void> => {
|
|
8
|
+
const code = await runOkfCliCommand(argv, { stdout: process.stdout, stderr: process.stderr }, {
|
|
9
|
+
memoryDir: orchestrator.config.memoryDir,
|
|
10
|
+
conformanceEnabled: orchestrator.config.okf.conformanceEnabled,
|
|
11
|
+
sweepEnabled: orchestrator.config.okf.sweepEnabled,
|
|
12
|
+
});
|
|
13
|
+
if (code !== 0) process.exitCode = code;
|
|
14
|
+
};
|
|
15
|
+
okfCmd.command("lint").description("Report OKF conformance findings").option("--json", "JSON output").action(async (...args: unknown[]) => {
|
|
16
|
+
const options = (args[0] ?? {}) as Record<string, unknown>;
|
|
17
|
+
await forward(["lint", ...(options.json === true ? ["--json"] : [])]);
|
|
18
|
+
});
|
|
19
|
+
okfCmd.command("sweep").description("Add missing type fields without bumping updated").option("--json", "JSON output").action(async (...args: unknown[]) => {
|
|
20
|
+
const options = (args[0] ?? {}) as Record<string, unknown>;
|
|
21
|
+
await forward(["sweep", ...(options.json === true ? ["--json"] : [])]);
|
|
22
|
+
});
|
|
23
|
+
}
|
package/src/cli.ts
CHANGED
|
@@ -15,6 +15,7 @@ import { utcDayRange } from "./transcript.js";
|
|
|
15
15
|
import { padEndDisplay, truncateGraphemeSafe } from "./whitespace.js";
|
|
16
16
|
import { runWearablesCliCommand } from "./wearables/cli.js";
|
|
17
17
|
import { registerMeetingsCommands } from "./cli/meetings-commands.js";
|
|
18
|
+
import { registerOkfCommands } from "./cli/okf-commands.js";
|
|
18
19
|
import { registerResearchStatusCommands } from "./cli/research-status-commands.js";
|
|
19
20
|
import { registerCreationLedgerCommands } from "./cli/creation-ledger-commands.js";
|
|
20
21
|
import type {
|
|
@@ -6227,7 +6228,7 @@ export function registerCli(
|
|
|
6227
6228
|
|
|
6228
6229
|
registerResearchStatusCommands(cmd, orchestrator);
|
|
6229
6230
|
|
|
6230
|
-
registerCreationLedgerCommands(cmd, orchestrator); registerMeetingsCommands(cmd, orchestrator);
|
|
6231
|
+
registerCreationLedgerCommands(cmd, orchestrator); registerMeetingsCommands(cmd, orchestrator); registerOkfCommands(cmd, orchestrator);
|
|
6231
6232
|
|
|
6232
6233
|
cmd
|
|
6233
6234
|
.command("trust-zone-promote")
|
package/src/config.ts
CHANGED
|
@@ -61,9 +61,9 @@ import {
|
|
|
61
61
|
resolveNamespaceCatalogEnabled,
|
|
62
62
|
} from "./emit-legacy-tools.js";
|
|
63
63
|
import { parseWearablesConfig } from "./wearables/config.js";
|
|
64
|
-
import {
|
|
65
|
-
import {
|
|
66
|
-
import {
|
|
64
|
+
import { parseCaptureCompanionConfigs } from "./location/parse-companions.js";
|
|
65
|
+
import { parseLocationConfig } from "./location/config.js";
|
|
66
|
+
import { parseOkfConfig } from "./okf/config.js";
|
|
67
67
|
import { parseBoundedJsonlStateConfig } from "./bounded-jsonl-state.js";
|
|
68
68
|
import { parseCodingKnowledgeConfig } from "./coding/coding-knowledge-config.js";
|
|
69
69
|
import { parseChatConfig } from "./chat/chat-config.js";
|
|
@@ -516,7 +516,6 @@ function normalizeMemoryRelativeDir(raw: unknown, fallback: string): string {
|
|
|
516
516
|
return normalized.length > 0 ? normalized : fallback;
|
|
517
517
|
}
|
|
518
518
|
|
|
519
|
-
|
|
520
519
|
function parseSemanticChunkingConfig(
|
|
521
520
|
raw: unknown,
|
|
522
521
|
): Partial<SemanticChunkingConfigShape> {
|
|
@@ -1159,9 +1158,8 @@ export function parseConfig(
|
|
|
1159
1158
|
recallMaxProcedures,
|
|
1160
1159
|
};
|
|
1161
1160
|
const wearables = parseWearablesConfig(cfg.wearables);
|
|
1162
|
-
const activity =
|
|
1163
|
-
const
|
|
1164
|
-
const provenance = parseProvenanceConfig(cfg.provenance);
|
|
1161
|
+
const { activity, meetings, provenance } = parseCaptureCompanionConfigs(cfg);
|
|
1162
|
+
const location = parseLocationConfig(cfg.location);
|
|
1165
1163
|
// Coding-agent project/branch scoping (issue #569)
|
|
1166
1164
|
const rawCodingMode =
|
|
1167
1165
|
cfg.codingMode && typeof cfg.codingMode === "object" && !Array.isArray(cfg.codingMode)
|
|
@@ -2322,7 +2320,9 @@ export function parseConfig(
|
|
|
2322
2320
|
converge: parseConvergeConfig(cfg.converge),
|
|
2323
2321
|
wearables,
|
|
2324
2322
|
meetings,
|
|
2323
|
+
okf: parseOkfConfig(cfg.okf),
|
|
2325
2324
|
activity,
|
|
2325
|
+
location,
|
|
2326
2326
|
provenance,
|
|
2327
2327
|
// At-rest encryption (#690): coerceBool handles CLI string "true" (#36).
|
|
2328
2328
|
secureStoreEnabled: coerceBool(cfg.secureStoreEnabled) === true,
|
package/src/index.ts
CHANGED
|
@@ -499,6 +499,8 @@ export type {
|
|
|
499
499
|
RecallXrayServedBy,
|
|
500
500
|
RecallFilterTrace,
|
|
501
501
|
} from "./recall-xray.js";
|
|
502
|
+
export * from "./who-knows.js";
|
|
503
|
+
export * from "./who-knows-cli.js";
|
|
502
504
|
|
|
503
505
|
// ChatGPT Apps-compatible memory inspector demo.
|
|
504
506
|
export {
|
|
@@ -1215,6 +1217,7 @@ export { runAuditMemoryCliCommand, runBulkImportCliCommand, type BulkImportCliCo
|
|
|
1215
1217
|
export * from "./wearables/index.js";
|
|
1216
1218
|
export * from "./activity/index.js";
|
|
1217
1219
|
export * from "./meetings/index.js";
|
|
1220
|
+
export * from "./okf/cli.js";
|
|
1218
1221
|
|
|
1219
1222
|
// ---------------------------------------------------------------------------
|
|
1220
1223
|
// Shared importer base (issue #568)
|
|
@@ -0,0 +1,163 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Location surface helpers (issue #2044): status, provider health checks, and
|
|
3
|
+
* multi-day sync. Pure `@remnic/core` — no optional packages, no host CLI
|
|
4
|
+
* wiring; a host adapter (or the core CLI, in a later slice) renders these
|
|
5
|
+
* structured results into its own command surface.
|
|
6
|
+
*/
|
|
7
|
+
|
|
8
|
+
import { getLocationProvider } from "./registry.js";
|
|
9
|
+
import { isValidLocationDate, localDayKey } from "./intervals.js";
|
|
10
|
+
import { listLocationDayDates, loadLocationSyncState, parseLocationDaySummary, readLocationDay } from "./store.js";
|
|
11
|
+
import { syncLocationDay, type LocationDaySyncOptions, type LocationSourceSyncResult } from "./pipeline.js";
|
|
12
|
+
import type { LocationConfig, LocationProvider } from "./types.js";
|
|
13
|
+
|
|
14
|
+
export interface LocationSourceStatus {
|
|
15
|
+
id: string;
|
|
16
|
+
enabled: boolean;
|
|
17
|
+
providerRegistered: boolean;
|
|
18
|
+
lastSyncedAtUtc?: string;
|
|
19
|
+
trackedDays: number;
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
export interface LocationDayStatus {
|
|
23
|
+
date: string;
|
|
24
|
+
sources: string[];
|
|
25
|
+
observationCount: number;
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
export interface LocationStatusReport {
|
|
29
|
+
enabled: boolean;
|
|
30
|
+
timezone: string;
|
|
31
|
+
sources: LocationSourceStatus[];
|
|
32
|
+
/** Stored day documents, newest first (at most `maxDays`). */
|
|
33
|
+
recentDays: LocationDayStatus[];
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
export interface LocationStatusOptions {
|
|
37
|
+
/** Provider lookup seam (defaults to the registry); tests inject doubles. */
|
|
38
|
+
getProvider?: (id: string) => LocationProvider | undefined;
|
|
39
|
+
/** Cap on day documents listed; defaults to 7. */
|
|
40
|
+
maxDays?: number;
|
|
41
|
+
now?: () => Date;
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
export async function locationStatus(
|
|
45
|
+
config: LocationConfig,
|
|
46
|
+
memoryDir: string,
|
|
47
|
+
options: LocationStatusOptions = {},
|
|
48
|
+
): Promise<LocationStatusReport> {
|
|
49
|
+
const resolveProvider = options.getProvider ?? getLocationProvider;
|
|
50
|
+
const state = await loadLocationSyncState(memoryDir);
|
|
51
|
+
const sources: LocationSourceStatus[] = config.sources.map((source) => {
|
|
52
|
+
const sourceState = state.sources[source.id];
|
|
53
|
+
return {
|
|
54
|
+
id: source.id,
|
|
55
|
+
enabled: source.enabled,
|
|
56
|
+
providerRegistered: resolveProvider(source.id) !== undefined,
|
|
57
|
+
...(sourceState?.lastSyncedAtUtc === undefined ? {} : { lastSyncedAtUtc: sourceState.lastSyncedAtUtc }),
|
|
58
|
+
trackedDays: Object.keys(sourceState?.days ?? {}).length,
|
|
59
|
+
};
|
|
60
|
+
});
|
|
61
|
+
|
|
62
|
+
const maxDays = options.maxDays ?? 7;
|
|
63
|
+
const recentDays: LocationDayStatus[] = [];
|
|
64
|
+
for (const date of (await listLocationDayDates(memoryDir)).slice(0, Math.max(0, maxDays))) {
|
|
65
|
+
const raw = await readLocationDay(memoryDir, date);
|
|
66
|
+
const summary = raw === null ? null : parseLocationDaySummary(raw);
|
|
67
|
+
recentDays.push({
|
|
68
|
+
date,
|
|
69
|
+
sources: summary?.sources ?? [],
|
|
70
|
+
observationCount: summary?.observationCount ?? 0,
|
|
71
|
+
});
|
|
72
|
+
}
|
|
73
|
+
return { enabled: config.enabled, timezone: config.timezone, sources, recentDays };
|
|
74
|
+
}
|
|
75
|
+
|
|
76
|
+
export interface LocationSourceCheckResult {
|
|
77
|
+
id: string;
|
|
78
|
+
ok: boolean;
|
|
79
|
+
detail?: string;
|
|
80
|
+
skipped?: "location-disabled" | "source-disabled" | "provider-not-registered";
|
|
81
|
+
}
|
|
82
|
+
|
|
83
|
+
export interface LocationCheckOptions {
|
|
84
|
+
signal?: AbortSignal;
|
|
85
|
+
getProvider?: (id: string) => LocationProvider | undefined;
|
|
86
|
+
}
|
|
87
|
+
|
|
88
|
+
/** Probe every configured provider's health. The master gate short-circuits. */
|
|
89
|
+
export async function checkLocationSources(
|
|
90
|
+
config: LocationConfig,
|
|
91
|
+
options: LocationCheckOptions = {},
|
|
92
|
+
): Promise<LocationSourceCheckResult[]> {
|
|
93
|
+
if (!config.enabled) {
|
|
94
|
+
return config.sources.map((source) => ({ id: source.id, ok: false, skipped: "location-disabled" as const }));
|
|
95
|
+
}
|
|
96
|
+
const resolveProvider = options.getProvider ?? getLocationProvider;
|
|
97
|
+
const results: LocationSourceCheckResult[] = [];
|
|
98
|
+
for (const source of config.sources) {
|
|
99
|
+
if (!source.enabled) {
|
|
100
|
+
results.push({ id: source.id, ok: false, skipped: "source-disabled" });
|
|
101
|
+
continue;
|
|
102
|
+
}
|
|
103
|
+
const provider = resolveProvider(source.id);
|
|
104
|
+
if (provider === undefined) {
|
|
105
|
+
results.push({ id: source.id, ok: false, skipped: "provider-not-registered" });
|
|
106
|
+
continue;
|
|
107
|
+
}
|
|
108
|
+
try {
|
|
109
|
+
const check = await provider.verify(options.signal);
|
|
110
|
+
results.push({
|
|
111
|
+
id: source.id,
|
|
112
|
+
ok: check.ok,
|
|
113
|
+
...(check.detail === undefined || check.detail.length === 0 ? {} : { detail: check.detail }),
|
|
114
|
+
});
|
|
115
|
+
} catch (error) {
|
|
116
|
+
results.push({ id: source.id, ok: false, detail: error instanceof Error ? error.name : "provider error" });
|
|
117
|
+
}
|
|
118
|
+
}
|
|
119
|
+
return results;
|
|
120
|
+
}
|
|
121
|
+
|
|
122
|
+
function shiftIsoDate(date: string, days: number): string {
|
|
123
|
+
const parsed = new Date(`${date}T00:00:00Z`);
|
|
124
|
+
parsed.setUTCDate(parsed.getUTCDate() + days);
|
|
125
|
+
return parsed.toISOString().slice(0, 10);
|
|
126
|
+
}
|
|
127
|
+
|
|
128
|
+
export interface LocationSyncRunOptions
|
|
129
|
+
extends Omit<LocationDaySyncOptions, "config" | "date" | "memoryDir"> {
|
|
130
|
+
config: LocationConfig;
|
|
131
|
+
memoryDir: string;
|
|
132
|
+
/** Exclusive end date (local YYYY-MM-DD); defaults to today in config.timezone. */
|
|
133
|
+
endDate?: string;
|
|
134
|
+
/** Number of days to sync ending at endDate; defaults to config.syncDays. */
|
|
135
|
+
days?: number;
|
|
136
|
+
now?: () => Date;
|
|
137
|
+
}
|
|
138
|
+
/**
|
|
139
|
+
* Sync the trailing `days` local days ending AT `endDate` (inclusive).
|
|
140
|
+
* `endDate` defaults to yesterday in config.timezone (today is incomplete);
|
|
141
|
+
* days run oldest-first so a failure stops before newer days, matching the
|
|
142
|
+
* incremental-sync intent of `syncDays`.
|
|
143
|
+
*/
|
|
144
|
+
export async function syncLocation(
|
|
145
|
+
options: LocationSyncRunOptions,
|
|
146
|
+
): Promise<Array<{ date: string; results: LocationSourceSyncResult[] }>> {
|
|
147
|
+
const { config, memoryDir, endDate, days, ...rest } = options;
|
|
148
|
+
if (endDate !== undefined && !isValidLocationDate(endDate)) {
|
|
149
|
+
throw new RangeError(`Invalid location endDate "${endDate}"; expected a real YYYY-MM-DD day.`);
|
|
150
|
+
}
|
|
151
|
+
const now = rest.now ?? (() => new Date());
|
|
152
|
+
const end = endDate ?? shiftIsoDate(localDayKey(now().toISOString(), config.timezone), -1);
|
|
153
|
+
const count = days ?? config.syncDays;
|
|
154
|
+
if (!Number.isInteger(count) || count < 1 || count > 90) {
|
|
155
|
+
throw new RangeError("location sync days must be an integer from 1 to 90");
|
|
156
|
+
}
|
|
157
|
+
const runs: Array<{ date: string; results: LocationSourceSyncResult[] }> = [];
|
|
158
|
+
for (let offset = count; offset >= 1; offset -= 1) {
|
|
159
|
+
const date = shiftIsoDate(end, -(offset - 1));
|
|
160
|
+
runs.push({ date, results: await syncLocationDay({ ...rest, config, memoryDir, date, now }) });
|
|
161
|
+
}
|
|
162
|
+
return runs;
|
|
163
|
+
}
|
|
@@ -0,0 +1,75 @@
|
|
|
1
|
+
import assert from "node:assert/strict";
|
|
2
|
+
import test from "node:test";
|
|
3
|
+
|
|
4
|
+
import { defaultLocationConfig, parseLocationConfig } from "./config.js";
|
|
5
|
+
|
|
6
|
+
test("parseLocationConfig defaults to an inert configuration", () => {
|
|
7
|
+
assert.deepEqual(defaultLocationConfig(), {
|
|
8
|
+
enabled: false,
|
|
9
|
+
timezone: "UTC",
|
|
10
|
+
syncDays: 1,
|
|
11
|
+
retainCoordinates: false,
|
|
12
|
+
sources: [],
|
|
13
|
+
});
|
|
14
|
+
assert.deepEqual(parseLocationConfig(undefined), defaultLocationConfig());
|
|
15
|
+
assert.deepEqual(parseLocationConfig(null), defaultLocationConfig());
|
|
16
|
+
});
|
|
17
|
+
|
|
18
|
+
test("parseLocationConfig treats string false gates as disabled", () => {
|
|
19
|
+
assert.equal(parseLocationConfig({ enabled: "false", sources: [{ id: "reitti" }] }).enabled, false);
|
|
20
|
+
assert.equal(
|
|
21
|
+
parseLocationConfig({
|
|
22
|
+
enabled: true,
|
|
23
|
+
retainCoordinates: "0",
|
|
24
|
+
sources: [{ id: "reitti", enabled: "false" }],
|
|
25
|
+
}).retainCoordinates,
|
|
26
|
+
false,
|
|
27
|
+
);
|
|
28
|
+
});
|
|
29
|
+
|
|
30
|
+
test("parseLocationConfig rejects unrecognized gate values instead of defaulting", () => {
|
|
31
|
+
assert.throws(() => parseLocationConfig({ enabled: "maybe" }), TypeError);
|
|
32
|
+
assert.throws(() => parseLocationConfig({ retainCoordinates: 42 }), TypeError);
|
|
33
|
+
assert.throws(() => parseLocationConfig({ sources: [{ id: "reitti", enabled: "nope" }] }), TypeError);
|
|
34
|
+
});
|
|
35
|
+
|
|
36
|
+
test("parseLocationConfig validates the timezone at parse time", () => {
|
|
37
|
+
assert.throws(() => parseLocationConfig({ timezone: "Mars/Olympus" }), RangeError);
|
|
38
|
+
assert.equal(parseLocationConfig({ timezone: "America/Chicago" }).timezone, "America/Chicago");
|
|
39
|
+
assert.throws(() => parseLocationConfig({ timezone: "" }), TypeError);
|
|
40
|
+
});
|
|
41
|
+
|
|
42
|
+
test("parseLocationConfig enforces the syncDays integer range", () => {
|
|
43
|
+
assert.equal(parseLocationConfig({ syncDays: "3" }).syncDays, 3);
|
|
44
|
+
assert.throws(() => parseLocationConfig({ syncDays: 0 }), RangeError);
|
|
45
|
+
assert.throws(() => parseLocationConfig({ syncDays: 1.5 }), RangeError);
|
|
46
|
+
assert.throws(() => parseLocationConfig({ syncDays: 91 }), RangeError);
|
|
47
|
+
assert.throws(() => parseLocationConfig({ syncDays: "abc" }), TypeError);
|
|
48
|
+
});
|
|
49
|
+
|
|
50
|
+
test("parseLocationConfig requires a source when enabled", () => {
|
|
51
|
+
assert.throws(() => parseLocationConfig({ enabled: true }), RangeError);
|
|
52
|
+
assert.throws(() => parseLocationConfig({ enabled: true, sources: "reitti" }), TypeError);
|
|
53
|
+
const parsed = parseLocationConfig({ enabled: true, sources: [{ id: "reitti" }] });
|
|
54
|
+
assert.deepEqual(parsed.sources, [{ id: "reitti", enabled: true }]);
|
|
55
|
+
});
|
|
56
|
+
|
|
57
|
+
test("parseLocationConfig rejects malformed source entries", () => {
|
|
58
|
+
assert.throws(() => parseLocationConfig({ sources: [{ id: "" }] }), TypeError);
|
|
59
|
+
assert.throws(() => parseLocationConfig({ sources: [{}] }), TypeError);
|
|
60
|
+
assert.throws(() => parseLocationConfig({ sources: [{ id: "Bad_Id" }] }), RangeError);
|
|
61
|
+
assert.throws(() => parseLocationConfig({ sources: [{ id: "../escape" }] }), RangeError);
|
|
62
|
+
assert.throws(() => parseLocationConfig({ sources: ["reitti"] }), TypeError);
|
|
63
|
+
});
|
|
64
|
+
|
|
65
|
+
test("parseLocationConfig rejects duplicate source ids", () => {
|
|
66
|
+
assert.throws(
|
|
67
|
+
() => parseLocationConfig({ enabled: true, sources: [{ id: "reitti" }, { id: "reitti", enabled: false }] }),
|
|
68
|
+
RangeError,
|
|
69
|
+
);
|
|
70
|
+
});
|
|
71
|
+
|
|
72
|
+
test("parseLocationConfig rejects non-object blocks", () => {
|
|
73
|
+
assert.throws(() => parseLocationConfig("nope"), TypeError);
|
|
74
|
+
assert.throws(() => parseLocationConfig([1, 2]), TypeError);
|
|
75
|
+
});
|
|
@@ -0,0 +1,105 @@
|
|
|
1
|
+
import { coerceBooleanLike, coerceNumber } from "../connectors/coerce.js";
|
|
2
|
+
import { assertValidTimezone } from "../activity/digest.js";
|
|
3
|
+
import type { LocationConfig, LocationSourceConfig } from "./types.js";
|
|
4
|
+
|
|
5
|
+
const PROVIDER_ID_PATTERN = /^[a-z0-9][a-z0-9-]*$/;
|
|
6
|
+
|
|
7
|
+
/** The inert default: disabled, UTC days, one day per run, no sources, no coordinates. */
|
|
8
|
+
export function defaultLocationConfig(): LocationConfig {
|
|
9
|
+
return {
|
|
10
|
+
enabled: false,
|
|
11
|
+
timezone: "UTC",
|
|
12
|
+
syncDays: 1,
|
|
13
|
+
retainCoordinates: false,
|
|
14
|
+
sources: [],
|
|
15
|
+
};
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
function asRecord(value: unknown, name: string): Record<string, unknown> {
|
|
19
|
+
if (typeof value !== "object" || value === null || Array.isArray(value)) {
|
|
20
|
+
throw new TypeError(`${name} must be an object`);
|
|
21
|
+
}
|
|
22
|
+
return value as Record<string, unknown>;
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
function optionalNonEmptyString(value: unknown, name: string): string | undefined {
|
|
26
|
+
if (value === undefined) return undefined;
|
|
27
|
+
if (typeof value !== "string" || value.length === 0) throw new TypeError(`${name} must be a non-empty string`);
|
|
28
|
+
return value;
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
function parseLocationSource(value: unknown): LocationSourceConfig {
|
|
32
|
+
const raw = asRecord(value, "location source");
|
|
33
|
+
const id = optionalNonEmptyString(raw.id, "location source id");
|
|
34
|
+
if (id === undefined) {
|
|
35
|
+
throw new TypeError("location source requires id");
|
|
36
|
+
}
|
|
37
|
+
if (!PROVIDER_ID_PATTERN.test(id)) {
|
|
38
|
+
throw new RangeError(
|
|
39
|
+
`location source id must be a lowercase kebab string (a-z, 0-9, hyphens): got "${id}"`,
|
|
40
|
+
);
|
|
41
|
+
}
|
|
42
|
+
const enabledValue = coerceBooleanLike(raw.enabled, "location source enabled");
|
|
43
|
+
if (raw.enabled !== undefined && enabledValue === undefined) {
|
|
44
|
+
throw new TypeError(`location source '${id}' enabled must be a boolean`);
|
|
45
|
+
}
|
|
46
|
+
return { id, enabled: enabledValue ?? true };
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
/**
|
|
50
|
+
* Parse the unified `location.*` block. `enabled` gates everything and
|
|
51
|
+
* requires at least one source; a source's own `enabled` gates that source
|
|
52
|
+
* only. `retainCoordinates` defaults to `false` — coordinates are privacy
|
|
53
|
+
* data and are dropped everywhere unless explicitly retained.
|
|
54
|
+
*/
|
|
55
|
+
export function parseLocationConfig(raw: unknown): LocationConfig {
|
|
56
|
+
const defaults = defaultLocationConfig();
|
|
57
|
+
if (raw === undefined || raw === null) {
|
|
58
|
+
return { ...defaults };
|
|
59
|
+
}
|
|
60
|
+
const config = asRecord(raw, "location");
|
|
61
|
+
const enabledValue = coerceBooleanLike(config.enabled, "location.enabled");
|
|
62
|
+
if (config.enabled !== undefined && enabledValue === undefined) {
|
|
63
|
+
throw new TypeError("location.enabled must be a boolean");
|
|
64
|
+
}
|
|
65
|
+
const enabled = enabledValue ?? false;
|
|
66
|
+
|
|
67
|
+
const timezone = optionalNonEmptyString(config.timezone, "location.timezone") ?? "UTC";
|
|
68
|
+
// Validate the IANA zone at parse so a typo fails at config load, not
|
|
69
|
+
// mid-sync after some sources may already have advanced their state.
|
|
70
|
+
assertValidTimezone(timezone);
|
|
71
|
+
|
|
72
|
+
const syncDaysValue = coerceNumber(config.syncDays, "location.syncDays");
|
|
73
|
+
if (config.syncDays !== undefined && syncDaysValue === undefined) {
|
|
74
|
+
throw new TypeError("location.syncDays must be a finite number");
|
|
75
|
+
}
|
|
76
|
+
const syncDays = syncDaysValue ?? 1;
|
|
77
|
+
if (!Number.isInteger(syncDays) || syncDays < 1 || syncDays > 90) {
|
|
78
|
+
throw new RangeError("location.syncDays must be an integer from 1 to 90");
|
|
79
|
+
}
|
|
80
|
+
|
|
81
|
+
const retainCoordinatesValue = coerceBooleanLike(config.retainCoordinates, "location.retainCoordinates");
|
|
82
|
+
if (config.retainCoordinates !== undefined && retainCoordinatesValue === undefined) {
|
|
83
|
+
throw new TypeError("location.retainCoordinates must be a boolean");
|
|
84
|
+
}
|
|
85
|
+
const retainCoordinates = retainCoordinatesValue ?? false;
|
|
86
|
+
|
|
87
|
+
if (config.sources !== undefined && !Array.isArray(config.sources)) {
|
|
88
|
+
throw new TypeError("location.sources must be an array");
|
|
89
|
+
}
|
|
90
|
+
const sources = (config.sources ?? []).map(parseLocationSource);
|
|
91
|
+
// Day payloads and sync state are keyed on source id; two sources sharing
|
|
92
|
+
// an id would overwrite each other's state. Reject the collision at parse.
|
|
93
|
+
const ids = new Set<string>();
|
|
94
|
+
for (const source of sources) {
|
|
95
|
+
if (ids.has(source.id)) {
|
|
96
|
+
throw new RangeError(`location source id must be unique: ${source.id}`);
|
|
97
|
+
}
|
|
98
|
+
ids.add(source.id);
|
|
99
|
+
}
|
|
100
|
+
if (enabled && sources.length === 0) {
|
|
101
|
+
throw new RangeError("location.enabled requires at least one source");
|
|
102
|
+
}
|
|
103
|
+
|
|
104
|
+
return { enabled, timezone, syncDays, retainCoordinates, sources };
|
|
105
|
+
}
|