@remnic/core 9.66.0 → 9.66.1
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 +22 -22
- package/dist/access-authorization-probe.d.ts +11 -11
- package/dist/access-authorization-probe.js +23 -23
- package/dist/access-boundary.d.ts +11 -11
- package/dist/access-boundary.js +22 -22
- package/dist/access-cli.js +86 -84
- 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 +22 -22
- 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 +24 -24
- package/dist/access-http.d.ts +12 -12
- package/dist/access-http.js +39 -39
- package/dist/access-identity-continuity-surface.d.ts +9 -9
- package/dist/access-identity-continuity-surface.js +22 -22
- package/dist/access-lcm-surface.d.ts +11 -11
- package/dist/access-lcm-surface.js +22 -22
- package/dist/access-mcp.d.ts +11 -11
- package/dist/access-mcp.js +29 -29
- package/dist/access-memory-search-fanout.d.ts +2 -2
- package/dist/{access-namespace-preflight-CLWUoMyW.d.ts → access-namespace-preflight-50VIkPhB.d.ts} +1 -1
- package/dist/access-namespace-preflight.d.ts +3 -3
- package/dist/access-namespace-preflight.js +22 -22
- package/dist/access-observe-write-surface.d.ts +11 -11
- package/dist/access-observe-write-surface.js +22 -22
- package/dist/access-offline-manifest.d.ts +9 -9
- package/dist/access-operations-batch.js +24 -24
- package/dist/access-operations.d.ts +16 -16
- package/dist/access-operations.js +28 -28
- package/dist/access-recall-concurrency.d.ts +11 -11
- package/dist/access-recall-concurrency.js +22 -22
- package/dist/access-recall-response.d.ts +11 -11
- package/dist/access-recall-response.js +22 -22
- package/dist/access-recall-surface.d.ts +11 -11
- package/dist/access-recall-surface.js +22 -22
- package/dist/access-schema.d.ts +89 -89
- package/dist/access-schema.js +3 -3
- package/dist/{access-service-CEUE1Isj.d.ts → access-service-C2tV2-uL.d.ts} +65 -65
- package/dist/access-service-helpers.d.ts +11 -11
- package/dist/access-service.d.ts +11 -11
- package/dist/access-service.js +22 -22
- package/dist/access-surface-catalog.d.ts +11 -11
- package/dist/access-surface-catalog.js +24 -24
- 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 +2 -2
- package/dist/adapters/index.js +7 -7
- package/dist/adapters/registry.js +3 -3
- 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 +9 -9
- 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/{catalog-D1HgugTA.d.ts → catalog-C2jA-gLm.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 +10 -10
- package/dist/causal-trajectory-graph.d.ts +1 -1
- package/dist/{chunk-J3OND5QT.js → chunk-2FA7U5XY.js} +2 -2
- package/dist/{chunk-GEJKYA7D.js → chunk-2ITZ74A6.js} +9 -9
- package/dist/{chunk-2LBAFHOQ.js → chunk-2X6BGKQL.js} +8 -8
- package/dist/{chunk-KODXCHXJ.js → chunk-46XR5FNZ.js} +39 -3
- package/dist/chunk-46XR5FNZ.js.map +1 -0
- package/dist/{chunk-4STAANV7.js → chunk-4XLTUR6R.js} +3 -3
- package/dist/{chunk-FTTJRVB7.js → chunk-65JOGLIS.js} +2 -2
- package/dist/{chunk-FESUGFIL.js → chunk-7UOXCCCI.js} +2 -2
- package/dist/{chunk-PEBH5DCK.js → chunk-AF5H7TKI.js} +100 -18
- package/dist/chunk-AF5H7TKI.js.map +1 -0
- package/dist/{chunk-6CEGSTBD.js → chunk-B4AOWRYF.js} +4 -4
- package/dist/{chunk-FYWLSFFS.js → chunk-C5IUOBCN.js} +2 -2
- package/dist/{chunk-FKKGCGYL.js → chunk-CHGG74CY.js} +2 -2
- package/dist/{chunk-H7VDIF2V.js → chunk-CX4OLNIH.js} +2 -2
- package/dist/{chunk-Z3YEGSR4.js → chunk-D3UXGE5D.js} +10 -10
- package/dist/{chunk-7XOG75AU.js → chunk-D6Q5EPOV.js} +2 -2
- package/dist/{chunk-MJRGVXPQ.js → chunk-EH65UV2Z.js} +2 -2
- package/dist/{chunk-VQ4AMTGZ.js → chunk-EWKVYCFP.js} +1 -1
- package/dist/{chunk-23CVL7HS.js → chunk-FFUMTH27.js} +2 -2
- package/dist/{chunk-GX6FTSYH.js → chunk-GAJK3DQ5.js} +2 -2
- package/dist/{chunk-O57GM3FR.js → chunk-GBEOUCBB.js} +2 -2
- package/dist/{chunk-DMEHOEC7.js → chunk-H2IRSXZN.js} +3 -3
- package/dist/{chunk-CFVTRUR3.js → chunk-H6RSANGQ.js} +2 -2
- package/dist/chunk-HVAEXYPL.js +98 -0
- package/dist/chunk-HVAEXYPL.js.map +1 -0
- package/dist/{chunk-OAJMQKQR.js → chunk-IGZCAHFL.js} +2 -2
- package/dist/{chunk-CN4VKV3S.js → chunk-INUBU6I5.js} +2 -2
- package/dist/{chunk-CTCGHNWN.js → chunk-J2R275FN.js} +4 -4
- package/dist/{chunk-2QSZNTDO.js → chunk-JBPKEARU.js} +7 -7
- package/dist/{chunk-VQNRICAQ.js → chunk-JKTV3JNX.js} +3 -3
- package/dist/{chunk-33MFRY25.js → chunk-KI64TTBL.js} +2 -2
- package/dist/{chunk-VCKWULAK.js → chunk-KJXCD7VR.js} +5 -5
- package/dist/{chunk-7LCGFUMB.js → chunk-KQAFEZQX.js} +4 -4
- package/dist/{chunk-GSKINLAK.js → chunk-LJABGXC4.js} +3 -3
- package/dist/{chunk-NPIBN2VL.js → chunk-LK4TOYPU.js} +2 -2
- package/dist/{chunk-EZSCW4EM.js → chunk-LYUUA6QB.js} +2 -2
- package/dist/{chunk-I5VB44ZK.js → chunk-M5ERTI4I.js} +2 -2
- package/dist/{chunk-IHGMRDEE.js → chunk-MUEGIKKY.js} +227 -144
- package/dist/chunk-MUEGIKKY.js.map +1 -0
- package/dist/{chunk-QCRJMU5V.js → chunk-NFP4KPTA.js} +2 -2
- package/dist/{chunk-YXFCALVT.js → chunk-NSTNGMSS.js} +8 -8
- package/dist/{chunk-L4X4PJYK.js → chunk-NUF7VSEX.js} +2 -2
- package/dist/{chunk-IVIAHQBR.js → chunk-OJUEUQDJ.js} +2 -2
- package/dist/{chunk-ZW4VXELZ.js → chunk-OMX6TKXH.js} +2 -2
- package/dist/{chunk-EFQCDJZ2.js → chunk-QBNE55VA.js} +2 -2
- package/dist/{chunk-6QDXA26G.js → chunk-RPIS5FQ7.js} +47 -47
- package/dist/{chunk-HJXA6ZM7.js → chunk-S4CDUXQY.js} +2 -2
- package/dist/{chunk-72OIT7KS.js → chunk-S4Z2OBTX.js} +3 -3
- package/dist/{chunk-4FHRZD5T.js → chunk-SZMYGDSM.js} +2 -2
- package/dist/{chunk-MAH64N55.js → chunk-TBCDF556.js} +4 -4
- package/dist/{chunk-56IV4J5W.js → chunk-TCF4MU7L.js} +443 -58
- package/dist/chunk-TCF4MU7L.js.map +1 -0
- package/dist/{chunk-K66OY4EI.js → chunk-TCQRIIIN.js} +2 -2
- package/dist/{chunk-KXIXO76C.js → chunk-U65VJSCJ.js} +14 -14
- package/dist/{chunk-HNPE66LB.js → chunk-U6NGKS32.js} +7 -7
- package/dist/{chunk-WKJFIMVN.js → chunk-UW4RYPWC.js} +2 -2
- package/dist/{chunk-MN5NOOI7.js → chunk-VG4SSPAW.js} +2 -2
- package/dist/chunk-WFCWP4XU.js +17 -0
- package/dist/chunk-WFCWP4XU.js.map +1 -0
- package/dist/{chunk-UNUMFURP.js → chunk-X5PIDJ3L.js} +3 -3
- package/dist/{chunk-RZ3IZIJG.js → chunk-XOHYGIWF.js} +2 -2
- package/dist/{chunk-MINHJ55X.js → chunk-XXW32OL7.js} +1 -1
- package/dist/{chunk-MINHJ55X.js.map → chunk-XXW32OL7.js.map} +1 -1
- package/dist/{chunk-6RUHELWR.js → chunk-YWPLOJ7T.js} +2 -2
- package/dist/{chunk-ZJPM7GZ3.js → chunk-ZPS724LT.js} +2 -2
- package/dist/{chunk-7UTDHQZ5.js → chunk-ZZZWEDF4.js} +2 -2
- package/dist/{cli-BEkm2MEf.d.ts → cli-CsfFMe6n.d.ts} +5 -5
- package/dist/cli.d.ts +13 -13
- package/dist/cli.js +63 -63
- package/dist/coding/export-okf-codegraph.d.ts +1 -1
- package/dist/coding/export-okf-codegraph.js +9 -9
- package/dist/coding/pre-action-gate.d.ts +1 -1
- package/dist/compounding/engine.d.ts +2 -2
- package/dist/compounding/engine.js +9 -9
- 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 +2 -2
- package/dist/connectors/codex-materialize-runner.d.ts +1 -1
- package/dist/connectors/codex-materialize-runner.js +9 -9
- package/dist/connectors/codex-materialize.d.ts +1 -1
- package/dist/connectors/index.d.ts +1 -1
- package/dist/connectors/index.js +9 -9
- 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 +11 -11
- 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 +11 -11
- package/dist/cross-lingual-recall.d.ts +1 -1
- 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-BCpeo14F.d.ts → dependency-propagation-delivery-D4WMbOwA.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 +9 -9
- package/dist/entity-schema.d.ts +1 -1
- package/dist/episodic-context.d.ts +1 -1
- package/dist/eval-trajectory-contracts.d.ts +1 -1
- package/dist/eval-trajectory-store.d.ts +1 -1
- package/dist/eval-trajectory.d.ts +1 -1
- package/dist/explicit-capture.d.ts +9 -9
- package/dist/external-wiki-access.d.ts +11 -11
- package/dist/external-wiki-access.js +23 -23
- 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 +9 -9
- 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_pyMUaP.d.ts → index-DuJnzwHv.d.ts} +2 -2
- package/dist/index.d.ts +807 -698
- package/dist/index.js +130 -102
- 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 +10 -10
- 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 +3 -3
- package/dist/location/index.js +11 -11
- package/dist/maintenance/memory-governance.d.ts +1 -1
- package/dist/maintenance/memory-governance.js +9 -9
- package/dist/maintenance/rebuild-memory-lifecycle-ledger.d.ts +2 -2
- package/dist/maintenance/rebuild-memory-lifecycle-ledger.js +9 -9
- package/dist/maintenance/rebuild-memory-projection.d.ts +2 -2
- package/dist/maintenance/rebuild-memory-projection.js +10 -10
- package/dist/{maintenance-DDUX9d6D.d.ts → maintenance-BBeaeYRR.d.ts} +3 -3
- package/dist/mcp-memory-inspector-app.d.ts +11 -11
- 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 +2 -2
- package/dist/models-json.d.ts +1 -1
- package/dist/namespaces/migrate.d.ts +3 -3
- package/dist/namespaces/migrate.js +10 -10
- package/dist/namespaces/principal.d.ts +1 -1
- package/dist/namespaces/search.d.ts +1 -1
- package/dist/namespaces/search.js +5 -5
- package/dist/namespaces/storage.d.ts +3 -3
- package/dist/namespaces/storage.js +9 -9
- 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 +12 -12
- 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 +18 -18
- package/dist/{orchestrator-3F4jihCo.d.ts → orchestrator-CaqnwNwM.d.ts} +8 -8
- package/dist/orchestrator.d.ts +9 -9
- package/dist/orchestrator.js +86 -84
- package/dist/patterns-cli.d.ts +1 -1
- package/dist/{pipeline-CB1dj6Uh.d.ts → pipeline-CrxVjlJr.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-34-JIAGQ.d.ts → public-http-Cwvl4QZr.d.ts} +1 -1
- package/dist/{qmd-edLLZXc5.d.ts → qmd-BZgbJm0g.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-deep.d.ts +37 -0
- package/dist/recall-deep.js +81 -0
- package/dist/recall-deep.js.map +1 -0
- 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-navigate.d.ts +70 -0
- package/dist/recall-navigate.js +51 -0
- package/dist/recall-navigate.js.map +1 -0
- package/dist/recall-planner-llm.d.ts +1 -1
- package/dist/recall-state-view-wire.d.ts +14 -0
- package/dist/recall-state-view-wire.js +11 -0
- package/dist/recall-state-view-wire.js.map +1 -0
- package/dist/recall-state-view.d.ts +25 -0
- package/dist/recall-state-view.js +22 -0
- package/dist/recall-state-view.js.map +1 -0
- 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 +3 -3
- 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/schemas.d.ts +152 -152
- package/dist/{scope-profiles-BF2lu81V.d.ts → scope-profiles-DFaojvoP.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 +4 -4
- 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/meilisearch-backend.d.ts +1 -1
- package/dist/search/noop-backend.d.ts +1 -1
- package/dist/search/orama-backend.d.ts +1 -1
- package/dist/search/port.d.ts +1 -1
- package/dist/search/remote-backend.d.ts +1 -1
- package/dist/{semantic-consolidation-5OuWXBRt.d.ts → semantic-consolidation-BiX68wZA.d.ts} +1 -1
- package/dist/semantic-consolidation.d.ts +2 -2
- package/dist/semantic-consolidation.js +10 -10
- package/dist/semantic-rule-promotion.js +9 -9
- package/dist/semantic-rule-verifier.d.ts +1 -1
- package/dist/semantic-rule-verifier.js +9 -9
- package/dist/{service-CrqEhLXD.d.ts → service-D5h2zZ0M.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 +7 -7
- package/dist/signal.d.ts +1 -1
- package/dist/source-agent-qualifier.d.ts +1 -1
- package/dist/source-agent-qualifier.js +9 -9
- package/dist/{storage-BQn-xnxm.d.ts → storage-CtsaojWD.d.ts} +1 -1
- package/dist/storage.d.ts +2 -2
- package/dist/storage.js +8 -8
- 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 +25 -25
- 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/capsule-export.js +2 -2
- package/dist/transfer/capsule-import.js +2 -2
- package/dist/transfer/export-okf.d.ts +1 -1
- package/dist/transfer/export-okf.js +10 -10
- package/dist/transfer/types.d.ts +78 -78
- package/dist/trust-score-stage.d.ts +1 -1
- package/dist/trust-score.d.ts +1 -1
- package/dist/{types-BRpcNjHZ.d.ts → types-CIpfYz1I.d.ts} +16 -11
- 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 +9 -9
- package/dist/who-knows-cli.d.ts +11 -11
- package/dist/who-knows-cli.js +10 -10
- package/dist/who-knows.d.ts +11 -11
- package/dist/who-knows.js +9 -9
- package/dist/write-envelope.d.ts +1 -1
- package/package.json +2 -2
- package/src/activity/config.test.ts +1 -1
- package/src/activity/config.ts +48 -3
- package/src/activity/index.ts +2 -0
- package/src/activity/journal.test.ts +97 -0
- package/src/activity/journal.ts +113 -0
- package/src/activity/privacy.test.ts +53 -0
- package/src/activity/privacy.ts +80 -0
- package/src/activity/timeline/index.ts +2 -0
- package/src/activity/timeline/journal-recap.test.ts +113 -0
- package/src/activity/timeline/journal-recap.ts +130 -0
- package/src/activity/timeline/query.test.ts +198 -0
- package/src/activity/timeline/query.ts +313 -0
- package/src/activity/timeline/weekly.test.ts +215 -0
- package/src/activity/timeline/weekly.ts +234 -0
- package/src/activity/types.ts +14 -0
- package/src/activity/vault-publish.test.ts +166 -0
- package/src/activity/vault-publish.ts +101 -0
- package/src/config.test.ts +1 -1
- package/src/config.ts +2 -22
- package/src/dedup/merge-on-write.test.ts +91 -0
- package/src/dedup/merge-on-write.ts +75 -0
- package/src/dedup/novelty-gate.test.ts +143 -0
- package/src/dedup/novelty-gate.ts +163 -0
- package/src/location/recall-exclusion.test.ts +1 -0
- package/src/orchestration/extraction-persist.ts +22 -23
- package/src/orchestration/generic-recall-paths.ts +11 -0
- package/src/orchestration/recall-entry.ts +8 -3
- package/src/recall-deep.test.ts +72 -0
- package/src/recall-deep.ts +113 -0
- package/src/recall-navigate.test.ts +84 -0
- package/src/recall-navigate.ts +100 -0
- package/src/recall-state-view-wire.test.ts +35 -0
- package/src/recall-state-view-wire.ts +28 -0
- package/src/recall-state-view.test.ts +131 -0
- package/src/recall-state-view.ts +138 -0
- package/src/shared-context/governance.test.ts +53 -0
- package/src/shared-context/governance.ts +86 -0
- package/src/types.ts +3 -10
- package/dist/chunk-56IV4J5W.js.map +0 -1
- package/dist/chunk-IHGMRDEE.js.map +0 -1
- package/dist/chunk-KODXCHXJ.js.map +0 -1
- package/dist/chunk-PEBH5DCK.js.map +0 -1
- /package/dist/{chunk-J3OND5QT.js.map → chunk-2FA7U5XY.js.map} +0 -0
- /package/dist/{chunk-GEJKYA7D.js.map → chunk-2ITZ74A6.js.map} +0 -0
- /package/dist/{chunk-2LBAFHOQ.js.map → chunk-2X6BGKQL.js.map} +0 -0
- /package/dist/{chunk-4STAANV7.js.map → chunk-4XLTUR6R.js.map} +0 -0
- /package/dist/{chunk-FTTJRVB7.js.map → chunk-65JOGLIS.js.map} +0 -0
- /package/dist/{chunk-FESUGFIL.js.map → chunk-7UOXCCCI.js.map} +0 -0
- /package/dist/{chunk-6CEGSTBD.js.map → chunk-B4AOWRYF.js.map} +0 -0
- /package/dist/{chunk-FYWLSFFS.js.map → chunk-C5IUOBCN.js.map} +0 -0
- /package/dist/{chunk-FKKGCGYL.js.map → chunk-CHGG74CY.js.map} +0 -0
- /package/dist/{chunk-H7VDIF2V.js.map → chunk-CX4OLNIH.js.map} +0 -0
- /package/dist/{chunk-Z3YEGSR4.js.map → chunk-D3UXGE5D.js.map} +0 -0
- /package/dist/{chunk-7XOG75AU.js.map → chunk-D6Q5EPOV.js.map} +0 -0
- /package/dist/{chunk-MJRGVXPQ.js.map → chunk-EH65UV2Z.js.map} +0 -0
- /package/dist/{chunk-VQ4AMTGZ.js.map → chunk-EWKVYCFP.js.map} +0 -0
- /package/dist/{chunk-23CVL7HS.js.map → chunk-FFUMTH27.js.map} +0 -0
- /package/dist/{chunk-GX6FTSYH.js.map → chunk-GAJK3DQ5.js.map} +0 -0
- /package/dist/{chunk-O57GM3FR.js.map → chunk-GBEOUCBB.js.map} +0 -0
- /package/dist/{chunk-DMEHOEC7.js.map → chunk-H2IRSXZN.js.map} +0 -0
- /package/dist/{chunk-CFVTRUR3.js.map → chunk-H6RSANGQ.js.map} +0 -0
- /package/dist/{chunk-OAJMQKQR.js.map → chunk-IGZCAHFL.js.map} +0 -0
- /package/dist/{chunk-CN4VKV3S.js.map → chunk-INUBU6I5.js.map} +0 -0
- /package/dist/{chunk-CTCGHNWN.js.map → chunk-J2R275FN.js.map} +0 -0
- /package/dist/{chunk-2QSZNTDO.js.map → chunk-JBPKEARU.js.map} +0 -0
- /package/dist/{chunk-VQNRICAQ.js.map → chunk-JKTV3JNX.js.map} +0 -0
- /package/dist/{chunk-33MFRY25.js.map → chunk-KI64TTBL.js.map} +0 -0
- /package/dist/{chunk-VCKWULAK.js.map → chunk-KJXCD7VR.js.map} +0 -0
- /package/dist/{chunk-7LCGFUMB.js.map → chunk-KQAFEZQX.js.map} +0 -0
- /package/dist/{chunk-GSKINLAK.js.map → chunk-LJABGXC4.js.map} +0 -0
- /package/dist/{chunk-NPIBN2VL.js.map → chunk-LK4TOYPU.js.map} +0 -0
- /package/dist/{chunk-EZSCW4EM.js.map → chunk-LYUUA6QB.js.map} +0 -0
- /package/dist/{chunk-I5VB44ZK.js.map → chunk-M5ERTI4I.js.map} +0 -0
- /package/dist/{chunk-QCRJMU5V.js.map → chunk-NFP4KPTA.js.map} +0 -0
- /package/dist/{chunk-YXFCALVT.js.map → chunk-NSTNGMSS.js.map} +0 -0
- /package/dist/{chunk-L4X4PJYK.js.map → chunk-NUF7VSEX.js.map} +0 -0
- /package/dist/{chunk-IVIAHQBR.js.map → chunk-OJUEUQDJ.js.map} +0 -0
- /package/dist/{chunk-ZW4VXELZ.js.map → chunk-OMX6TKXH.js.map} +0 -0
- /package/dist/{chunk-EFQCDJZ2.js.map → chunk-QBNE55VA.js.map} +0 -0
- /package/dist/{chunk-6QDXA26G.js.map → chunk-RPIS5FQ7.js.map} +0 -0
- /package/dist/{chunk-HJXA6ZM7.js.map → chunk-S4CDUXQY.js.map} +0 -0
- /package/dist/{chunk-72OIT7KS.js.map → chunk-S4Z2OBTX.js.map} +0 -0
- /package/dist/{chunk-4FHRZD5T.js.map → chunk-SZMYGDSM.js.map} +0 -0
- /package/dist/{chunk-MAH64N55.js.map → chunk-TBCDF556.js.map} +0 -0
- /package/dist/{chunk-K66OY4EI.js.map → chunk-TCQRIIIN.js.map} +0 -0
- /package/dist/{chunk-KXIXO76C.js.map → chunk-U65VJSCJ.js.map} +0 -0
- /package/dist/{chunk-HNPE66LB.js.map → chunk-U6NGKS32.js.map} +0 -0
- /package/dist/{chunk-WKJFIMVN.js.map → chunk-UW4RYPWC.js.map} +0 -0
- /package/dist/{chunk-MN5NOOI7.js.map → chunk-VG4SSPAW.js.map} +0 -0
- /package/dist/{chunk-UNUMFURP.js.map → chunk-X5PIDJ3L.js.map} +0 -0
- /package/dist/{chunk-RZ3IZIJG.js.map → chunk-XOHYGIWF.js.map} +0 -0
- /package/dist/{chunk-6RUHELWR.js.map → chunk-YWPLOJ7T.js.map} +0 -0
- /package/dist/{chunk-ZJPM7GZ3.js.map → chunk-ZPS724LT.js.map} +0 -0
- /package/dist/{chunk-7UTDHQZ5.js.map → chunk-ZZZWEDF4.js.map} +0 -0
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { a as GraphEdge } from './graph-444E-DrF.js';
|
|
2
2
|
import { CausalTrajectoryRecord } from './causal-trajectory.js';
|
|
3
3
|
import './capabilities.js';
|
|
4
|
-
import './types-
|
|
4
|
+
import './types-CIpfYz1I.js';
|
|
5
5
|
import './message-parts/index.js';
|
|
6
6
|
import './bounded-jsonl-state.js';
|
|
7
7
|
import './operator-doctor-types.js';
|
|
@@ -3,7 +3,7 @@ import {
|
|
|
3
3
|
} from "./chunk-KJTKLXTH.js";
|
|
4
4
|
import {
|
|
5
5
|
StorageManager
|
|
6
|
-
} from "./chunk-
|
|
6
|
+
} from "./chunk-2ITZ74A6.js";
|
|
7
7
|
import {
|
|
8
8
|
copyExistingFileToBackup,
|
|
9
9
|
writeFileAtomically
|
|
@@ -260,4 +260,4 @@ export {
|
|
|
260
260
|
backupExistingLedger,
|
|
261
261
|
rebuildMemoryLifecycleLedger
|
|
262
262
|
};
|
|
263
|
-
//# sourceMappingURL=chunk-
|
|
263
|
+
//# sourceMappingURL=chunk-2FA7U5XY.js.map
|
|
@@ -1,3 +1,9 @@
|
|
|
1
|
+
import {
|
|
2
|
+
TombstoneStore,
|
|
3
|
+
applyTombstoneResurrectionGate,
|
|
4
|
+
buildRetiredFactTombstoneInputs,
|
|
5
|
+
collectRetiredMemoriesForRebuild
|
|
6
|
+
} from "./chunk-4ZWCQJNM.js";
|
|
1
7
|
import {
|
|
2
8
|
WEARABLES_DIR_NAME,
|
|
3
9
|
escapeSegmentText,
|
|
@@ -9,22 +15,16 @@ import {
|
|
|
9
15
|
unescapeSegmentText,
|
|
10
16
|
unescapeSpeakerLabel
|
|
11
17
|
} from "./chunk-UHVXE24Y.js";
|
|
12
|
-
import {
|
|
13
|
-
TombstoneStore,
|
|
14
|
-
applyTombstoneResurrectionGate,
|
|
15
|
-
buildRetiredFactTombstoneInputs,
|
|
16
|
-
collectRetiredMemoriesForRebuild
|
|
17
|
-
} from "./chunk-4ZWCQJNM.js";
|
|
18
18
|
import {
|
|
19
19
|
normalizeQmdResultPath
|
|
20
|
-
} from "./chunk-
|
|
20
|
+
} from "./chunk-C5IUOBCN.js";
|
|
21
21
|
import {
|
|
22
22
|
withholdToolScopedFromSharedNamespace
|
|
23
23
|
} from "./chunk-S2V7RUCL.js";
|
|
24
24
|
import {
|
|
25
25
|
SPECULATIVE_TTL_DAYS,
|
|
26
26
|
confidenceTier
|
|
27
|
-
} from "./chunk-
|
|
27
|
+
} from "./chunk-XXW32OL7.js";
|
|
28
28
|
import {
|
|
29
29
|
normalizeProjectionPreview,
|
|
30
30
|
normalizeProjectionTags
|
|
@@ -11374,4 +11374,4 @@ export {
|
|
|
11374
11374
|
isValidBufferSurpriseEvent,
|
|
11375
11375
|
StorageManager3 as StorageManager
|
|
11376
11376
|
};
|
|
11377
|
-
//# sourceMappingURL=chunk-
|
|
11377
|
+
//# sourceMappingURL=chunk-2ITZ74A6.js.map
|
|
@@ -3,7 +3,7 @@ import {
|
|
|
3
3
|
readNamespaceMaintenanceLastRanStatuses,
|
|
4
4
|
readNamespaceMaintenanceStatuses,
|
|
5
5
|
runNamespaceMaintenancePlan
|
|
6
|
-
} from "./chunk-
|
|
6
|
+
} from "./chunk-S4Z2OBTX.js";
|
|
7
7
|
import {
|
|
8
8
|
analyzeSessionIntegrity,
|
|
9
9
|
applySessionRepair,
|
|
@@ -14,7 +14,7 @@ import {
|
|
|
14
14
|
} from "./chunk-CMTINOFS.js";
|
|
15
15
|
import {
|
|
16
16
|
summarizeCorpusAndReplica
|
|
17
|
-
} from "./chunk-
|
|
17
|
+
} from "./chunk-EH65UV2Z.js";
|
|
18
18
|
import {
|
|
19
19
|
readJudgeVerdictStats
|
|
20
20
|
} from "./chunk-OZKOPQCM.js";
|
|
@@ -38,23 +38,23 @@ import {
|
|
|
38
38
|
} from "./chunk-YBPYIAA5.js";
|
|
39
39
|
import {
|
|
40
40
|
parseConfig
|
|
41
|
-
} from "./chunk-
|
|
41
|
+
} from "./chunk-AF5H7TKI.js";
|
|
42
42
|
import {
|
|
43
43
|
readAggregateExtractionWatermark
|
|
44
|
-
} from "./chunk-
|
|
44
|
+
} from "./chunk-OMX6TKXH.js";
|
|
45
45
|
import {
|
|
46
46
|
listNamespaces
|
|
47
|
-
} from "./chunk-
|
|
47
|
+
} from "./chunk-4XLTUR6R.js";
|
|
48
48
|
import {
|
|
49
49
|
listMemoryGovernanceRuns,
|
|
50
50
|
readMemoryGovernanceRunArtifact
|
|
51
|
-
} from "./chunk-
|
|
51
|
+
} from "./chunk-QBNE55VA.js";
|
|
52
52
|
import {
|
|
53
53
|
analyzeGraphHealth
|
|
54
54
|
} from "./chunk-YMOPYG3K.js";
|
|
55
55
|
import {
|
|
56
56
|
StorageManager
|
|
57
|
-
} from "./chunk-
|
|
57
|
+
} from "./chunk-2ITZ74A6.js";
|
|
58
58
|
import {
|
|
59
59
|
lintWorkspaceFiles
|
|
60
60
|
} from "./chunk-DM2T26WE.js";
|
|
@@ -1683,4 +1683,4 @@ export {
|
|
|
1683
1683
|
runBenchmarkRecall,
|
|
1684
1684
|
runOperatorRepair
|
|
1685
1685
|
};
|
|
1686
|
-
//# sourceMappingURL=chunk-
|
|
1686
|
+
//# sourceMappingURL=chunk-2X6BGKQL.js.map
|
|
@@ -24,7 +24,7 @@ function defaultActivityConfig() {
|
|
|
24
24
|
minConfidence: 0.7,
|
|
25
25
|
minImportance: "normal",
|
|
26
26
|
maxMemoriesPerDay: 0,
|
|
27
|
-
timeline: { enabled: false }
|
|
27
|
+
timeline: { enabled: false, journal: { enabled: false }, qa: { enabled: false, maxRangeDays: 31 } }
|
|
28
28
|
};
|
|
29
29
|
}
|
|
30
30
|
function asRecord(value, name) {
|
|
@@ -154,7 +154,7 @@ function parseActivityConfig(raw) {
|
|
|
154
154
|
};
|
|
155
155
|
}
|
|
156
156
|
function parseTimelineConfig(raw) {
|
|
157
|
-
if (raw === void 0) return { enabled: false };
|
|
157
|
+
if (raw === void 0) return { enabled: false, journal: { enabled: false }, qa: parseTimelineQaConfig(void 0) };
|
|
158
158
|
if (typeof raw !== "object" || raw === null || Array.isArray(raw)) {
|
|
159
159
|
throw new TypeError("activity.timeline must be an object");
|
|
160
160
|
}
|
|
@@ -163,12 +163,48 @@ function parseTimelineConfig(raw) {
|
|
|
163
163
|
if (timeline.enabled !== void 0 && enabledValue === void 0) {
|
|
164
164
|
throw new TypeError("activity.timeline.enabled must be a boolean");
|
|
165
165
|
}
|
|
166
|
+
return {
|
|
167
|
+
enabled: enabledValue ?? false,
|
|
168
|
+
journal: parseTimelineJournalConfig(timeline.journal),
|
|
169
|
+
qa: parseTimelineQaConfig(timeline.qa)
|
|
170
|
+
};
|
|
171
|
+
}
|
|
172
|
+
function parseTimelineJournalConfig(raw) {
|
|
173
|
+
if (raw === void 0) return { enabled: false };
|
|
174
|
+
if (typeof raw !== "object" || raw === null || Array.isArray(raw)) {
|
|
175
|
+
throw new TypeError("activity.timeline.journal must be an object");
|
|
176
|
+
}
|
|
177
|
+
const journal = raw;
|
|
178
|
+
const enabledValue = coerceBooleanLike(journal.enabled, "activity.timeline.journal.enabled");
|
|
179
|
+
if (journal.enabled !== void 0 && enabledValue === void 0) {
|
|
180
|
+
throw new TypeError("activity.timeline.journal.enabled must be a boolean");
|
|
181
|
+
}
|
|
166
182
|
return { enabled: enabledValue ?? false };
|
|
167
183
|
}
|
|
184
|
+
function parseTimelineQaConfig(raw) {
|
|
185
|
+
if (raw === void 0) return { enabled: false, maxRangeDays: 31 };
|
|
186
|
+
if (typeof raw !== "object" || raw === null || Array.isArray(raw)) {
|
|
187
|
+
throw new TypeError("activity.timeline.qa must be an object");
|
|
188
|
+
}
|
|
189
|
+
const qa = raw;
|
|
190
|
+
const enabledValue = coerceBooleanLike(qa.enabled, "activity.timeline.qa.enabled");
|
|
191
|
+
if (qa.enabled !== void 0 && enabledValue === void 0) {
|
|
192
|
+
throw new TypeError("activity.timeline.qa.enabled must be a boolean");
|
|
193
|
+
}
|
|
194
|
+
const maxRangeDaysValue = coerceNumber(qa.maxRangeDays, "activity.timeline.qa.maxRangeDays");
|
|
195
|
+
if (qa.maxRangeDays !== void 0 && maxRangeDaysValue === void 0) {
|
|
196
|
+
throw new TypeError("activity.timeline.qa.maxRangeDays must be an integer from 1 to 366");
|
|
197
|
+
}
|
|
198
|
+
const maxRangeDays = maxRangeDaysValue ?? 31;
|
|
199
|
+
if (!Number.isInteger(maxRangeDays) || maxRangeDays < 1 || maxRangeDays > 366) {
|
|
200
|
+
throw new RangeError("activity.timeline.qa.maxRangeDays must be an integer from 1 to 366");
|
|
201
|
+
}
|
|
202
|
+
return { enabled: enabledValue ?? false, maxRangeDays };
|
|
203
|
+
}
|
|
168
204
|
|
|
169
205
|
export {
|
|
170
206
|
defaultActivityConfig,
|
|
171
207
|
validateActivityBaseUrl,
|
|
172
208
|
parseActivityConfig
|
|
173
209
|
};
|
|
174
|
-
//# sourceMappingURL=chunk-
|
|
210
|
+
//# sourceMappingURL=chunk-46XR5FNZ.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../src/activity/config.ts"],"sourcesContent":["import { coerceBooleanLike, coerceNumber } from \"../connectors/coerce.js\";\nimport { assertValidTimezone } from \"./digest.js\";\nimport type { ImportanceLevel } from \"../types.js\";\nimport type {\n ActivityConfig,\n ActivityExtractionMode,\n ActivitySourceConfig,\n ActivityTimelineConfig,\n ActivityTimelineJournalConfig,\n ActivityTimelineQaConfig,\n} from \"./types.js\";\n\nconst EXTRACTION_MODES: readonly ActivityExtractionMode[] = [\"off\", \"smart\"];\nconst IMPORTANCE_LEVELS: readonly ImportanceLevel[] = [\"critical\", \"high\", \"normal\", \"low\", \"trivial\"];\nconst LOOPBACK_HOSTS: Record<string, true> = { localhost: true, \"127.0.0.1\": true, \"::1\": true };\n\n/** The inert default: disabled, search-only, no sources, no extraction. */\nexport function defaultActivityConfig(): ActivityConfig {\n return {\n enabled: false,\n timezone: \"UTC\",\n syncDays: 1,\n autoSyncIntervalMinutes: 15,\n sources: [],\n extractionMode: \"off\",\n sourceTrust: 0.6,\n autoApproveTrust: 0.8,\n reviewTrust: 0.5,\n minConfidence: 0.7,\n minImportance: \"normal\",\n maxMemoriesPerDay: 0,\n timeline: { enabled: false, journal: { enabled: false }, qa: { enabled: false, maxRangeDays: 31 } },\n };\n}\n\nfunction asRecord(value: unknown, name: string): Record<string, unknown> {\n if (typeof value !== \"object\" || value === null || Array.isArray(value)) {\n throw new TypeError(`${name} must be an object`);\n }\n return value as Record<string, unknown>;\n}\n\nfunction optionalString(value: unknown, name: string): string | undefined {\n if (value === undefined) return undefined;\n if (typeof value !== \"string\" || value.length === 0) throw new TypeError(`${name} must be a non-empty string`);\n return value;\n}\n\nfunction parseUnitInterval(value: unknown, key: string, fallback: number): number {\n if (value === undefined) return fallback;\n const parsed = coerceNumber(value);\n if (parsed === undefined || !Number.isFinite(parsed) || parsed < 0 || parsed > 1) {\n throw new RangeError(`activity.${key} must be a number in [0, 1]`);\n }\n return parsed;\n}\n\n/**\n * Parse, protocol-check, and confine an activity source base URL to a local\n * loopback host. Shared with ActivityHttpSourceClient so config-load and client\n * construction reject the exact same shapes with the same prefixed message. The\n * bearer token travels in an Authorization header, so a non-loopback baseUrl\n * would exfiltrate it; the subsystem contract is local capture daemons only.\n */\nexport function validateActivityBaseUrl(baseUrl: string): URL {\n let parsed: URL;\n try {\n parsed = new URL(baseUrl);\n } catch {\n throw new RangeError(`activity source baseUrl must be a valid URL: ${baseUrl}`);\n }\n if (parsed.protocol !== \"http:\" && parsed.protocol !== \"https:\") {\n throw new RangeError(\"activity source baseUrl must use HTTP or HTTPS\");\n }\n // URL keeps IPv6 hosts bracketed (e.g. \"[::1]\"); normalize before the lookup.\n const host = parsed.hostname.replace(/^\\[|\\]$/g, \"\");\n if (LOOPBACK_HOSTS[host] !== true && !/^127\\.\\d{1,3}\\.\\d{1,3}\\.\\d{1,3}$/.test(host)) {\n throw new RangeError(`activity source baseUrl must target a loopback host (got ${parsed.hostname})`);\n }\n return parsed;\n}\n\nfunction parseSource(value: unknown): ActivitySourceConfig {\n const raw = asRecord(value, \"activity source\");\n const machineLabel = optionalString(raw.machineLabel, \"activity source machineLabel\");\n const baseUrl = optionalString(raw.baseUrl, \"activity source baseUrl\");\n if (machineLabel === undefined || baseUrl === undefined) {\n throw new TypeError(\"activity source requires machineLabel and baseUrl\");\n }\n // Reject whitespace-only labels here so config-load fails loudly rather than\n // parsing clean and then failing on the first sync (the client and pipeline\n // both reject a blank label via trim()).\n if (machineLabel.trim().length === 0) {\n throw new RangeError(\"activity source machineLabel must not be blank\");\n }\n validateActivityBaseUrl(baseUrl);\n const token = optionalString(raw.token, \"activity source token\");\n return { machineLabel, baseUrl, ...(token === undefined ? {} : { token }) };\n}\n\n/**\n * Parse the unified `activity.*` block. `enabled` gates source ingestion (and\n * requires at least one source); `extractionMode` independently gates durable\n * trust-gated memory extraction (default `off`, i.e. search-only).\n */\nexport function parseActivityConfig(raw: unknown): ActivityConfig {\n const defaults = defaultActivityConfig();\n if (raw === undefined || raw === null) {\n return { ...defaults };\n }\n const config = asRecord(raw, \"activity\");\n const enabledValue = coerceBooleanLike(config.enabled, \"activity.enabled\");\n if (config.enabled !== undefined && enabledValue === undefined) {\n throw new TypeError(\"activity.enabled must be a boolean\");\n }\n const timezone = optionalString(config.timezone, \"activity.timezone\") ?? \"UTC\";\n // Validate the IANA zone at parse so a typo fails before any daemon is\n // contacted; otherwise activityDayWindow() throws mid-sync after snapshot\n // pages may already be persisted, and every retry replays the same window.\n assertValidTimezone(timezone);\n const syncDaysValue = coerceNumber(config.syncDays, \"activity.syncDays\");\n if (config.syncDays !== undefined && syncDaysValue === undefined) {\n throw new TypeError(\"activity.syncDays must be a finite number\");\n }\n const syncDays = syncDaysValue ?? 1;\n if (!Number.isInteger(syncDays) || syncDays < 1 || syncDays > 90) {\n throw new RangeError(\"activity.syncDays must be an integer from 1 to 90\");\n }\n const intervalValue = coerceNumber(config.autoSyncIntervalMinutes, \"activity.autoSyncIntervalMinutes\");\n if (config.autoSyncIntervalMinutes !== undefined && intervalValue === undefined) {\n throw new TypeError(\"activity.autoSyncIntervalMinutes must be a finite number\");\n }\n const autoSyncIntervalMinutes = intervalValue ?? 15;\n if (!Number.isInteger(autoSyncIntervalMinutes) || autoSyncIntervalMinutes < 1 || autoSyncIntervalMinutes > 1440) {\n throw new RangeError(\"activity.autoSyncIntervalMinutes must be an integer from 1 to 1440\");\n }\n if (config.sources !== undefined && !Array.isArray(config.sources)) {\n throw new TypeError(\"activity.sources must be an array\");\n }\n const sources = (config.sources ?? []).map(parseSource);\n // Cursors and row dedup are keyed on machineLabel alone; two sources sharing\n // a label would share a cursor and dedup namespace, silently skipping or\n // conflating snapshots. Reject the collision at parse.\n const labels = new Set<string>();\n for (const source of sources) {\n if (labels.has(source.machineLabel)) {\n throw new RangeError(`activity source machineLabel must be unique: ${source.machineLabel}`);\n }\n labels.add(source.machineLabel);\n }\n const enabled = enabledValue ?? false;\n if (enabled && sources.length === 0) throw new RangeError(\"activity.enabled requires at least one source\");\n\n // Extraction gate (independent of `enabled` ingestion). Default `off`.\n // Default only for a missing key; an explicit null/non-string is a malformed\n // enum and must fail rather than silently disabling extraction.\n const extractionMode = config.extractionMode === undefined ? defaults.extractionMode : config.extractionMode;\n if (typeof extractionMode !== \"string\" || !EXTRACTION_MODES.includes(extractionMode as ActivityExtractionMode)) {\n throw new RangeError(`activity.extractionMode must be one of: ${EXTRACTION_MODES.join(\", \")}`);\n }\n const minImportance = config.minImportance === undefined ? defaults.minImportance : config.minImportance;\n if (typeof minImportance !== \"string\" || !IMPORTANCE_LEVELS.includes(minImportance as ImportanceLevel)) {\n throw new RangeError(`activity.minImportance must be one of: ${IMPORTANCE_LEVELS.join(\", \")}`);\n }\n // Default only for a missing key; an explicit null/unparseable value must fail\n // rather than silently uncapping (parity with the enum/unit-interval fields).\n const rawMaxMemoriesPerDay =\n config.maxMemoriesPerDay === undefined ? defaults.maxMemoriesPerDay : config.maxMemoriesPerDay;\n const maxMemoriesPerDay = coerceNumber(rawMaxMemoriesPerDay);\n if (maxMemoriesPerDay === undefined || !Number.isInteger(maxMemoriesPerDay) || maxMemoriesPerDay < 0) {\n throw new RangeError(\"activity.maxMemoriesPerDay must be a non-negative integer\");\n }\n const autoApproveTrust = parseUnitInterval(config.autoApproveTrust, \"autoApproveTrust\", defaults.autoApproveTrust);\n const reviewTrust = parseUnitInterval(config.reviewTrust, \"reviewTrust\", defaults.reviewTrust);\n if (reviewTrust >= autoApproveTrust) {\n throw new RangeError(\n `activity.reviewTrust (${reviewTrust}) must be below autoApproveTrust (${autoApproveTrust})`,\n );\n }\n return {\n enabled,\n timezone,\n syncDays,\n autoSyncIntervalMinutes,\n sources,\n extractionMode: extractionMode as ActivityExtractionMode,\n sourceTrust: parseUnitInterval(config.sourceTrust, \"sourceTrust\", defaults.sourceTrust),\n autoApproveTrust,\n reviewTrust,\n minConfidence: parseUnitInterval(config.minConfidence, \"minConfidence\", defaults.minConfidence),\n minImportance: minImportance as ImportanceLevel,\n maxMemoriesPerDay,\n timeline: parseTimelineConfig(config.timeline),\n };\n}\n\n/**\n * Parse the `activity.timeline.*` block. `enabled` is the master gate for\n * timeline-card derivation (issue #2049); default false. A non-object block\n * is malformed and must fail rather than silently disabling the layer.\n */\nfunction parseTimelineConfig(raw: unknown): ActivityTimelineConfig {\n if (raw === undefined) return { enabled: false, journal: { enabled: false }, qa: parseTimelineQaConfig(undefined) };\n if (typeof raw !== \"object\" || raw === null || Array.isArray(raw)) {\n throw new TypeError(\"activity.timeline must be an object\");\n }\n const timeline = raw as Record<string, unknown>;\n const enabledValue = coerceBooleanLike(timeline.enabled, \"activity.timeline.enabled\");\n if (timeline.enabled !== undefined && enabledValue === undefined) {\n throw new TypeError(\"activity.timeline.enabled must be a boolean\");\n }\n return {\n enabled: enabledValue ?? false,\n journal: parseTimelineJournalConfig(timeline.journal),\n qa: parseTimelineQaConfig(timeline.qa),\n };\n}\n\nfunction parseTimelineJournalConfig(raw: unknown): ActivityTimelineJournalConfig {\n if (raw === undefined) return { enabled: false };\n if (typeof raw !== \"object\" || raw === null || Array.isArray(raw)) {\n throw new TypeError(\"activity.timeline.journal must be an object\");\n }\n const journal = raw as Record<string, unknown>;\n const enabledValue = coerceBooleanLike(journal.enabled, \"activity.timeline.journal.enabled\");\n if (journal.enabled !== undefined && enabledValue === undefined) {\n throw new TypeError(\"activity.timeline.journal.enabled must be a boolean\");\n }\n return { enabled: enabledValue ?? false };\n}\n\nfunction parseTimelineQaConfig(raw: unknown): ActivityTimelineQaConfig {\n if (raw === undefined) return { enabled: false, maxRangeDays: 31 };\n if (typeof raw !== \"object\" || raw === null || Array.isArray(raw)) {\n throw new TypeError(\"activity.timeline.qa must be an object\");\n }\n const qa = raw as Record<string, unknown>;\n const enabledValue = coerceBooleanLike(qa.enabled, \"activity.timeline.qa.enabled\");\n if (qa.enabled !== undefined && enabledValue === undefined) {\n throw new TypeError(\"activity.timeline.qa.enabled must be a boolean\");\n }\n const maxRangeDaysValue = coerceNumber(qa.maxRangeDays, \"activity.timeline.qa.maxRangeDays\");\n if (qa.maxRangeDays !== undefined && maxRangeDaysValue === undefined) {\n throw new TypeError(\"activity.timeline.qa.maxRangeDays must be an integer from 1 to 366\");\n }\n const maxRangeDays = maxRangeDaysValue ?? 31;\n if (!Number.isInteger(maxRangeDays) || maxRangeDays < 1 || maxRangeDays > 366) {\n throw new RangeError(\"activity.timeline.qa.maxRangeDays must be an integer from 1 to 366\");\n }\n return { enabled: enabledValue ?? false, maxRangeDays };\n}\n"],"mappings":";;;;;;;;;AAYA,IAAM,mBAAsD,CAAC,OAAO,OAAO;AAC3E,IAAM,oBAAgD,CAAC,YAAY,QAAQ,UAAU,OAAO,SAAS;AACrG,IAAM,iBAAuC,EAAE,WAAW,MAAM,aAAa,MAAM,OAAO,KAAK;AAGxF,SAAS,wBAAwC;AACtD,SAAO;AAAA,IACL,SAAS;AAAA,IACT,UAAU;AAAA,IACV,UAAU;AAAA,IACV,yBAAyB;AAAA,IACzB,SAAS,CAAC;AAAA,IACV,gBAAgB;AAAA,IAChB,aAAa;AAAA,IACb,kBAAkB;AAAA,IAClB,aAAa;AAAA,IACb,eAAe;AAAA,IACf,eAAe;AAAA,IACf,mBAAmB;AAAA,IACnB,UAAU,EAAE,SAAS,OAAO,SAAS,EAAE,SAAS,MAAM,GAAG,IAAI,EAAE,SAAS,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YAAY,UAAa,iBAAiB,QAAW;AAC/D,UAAM,IAAI,UAAU,qDAAqD;AAAA,EAC3E;AACA,SAAO,EAAE,SAAS,gBAAgB,MAAM;AAC1C;AAEA,SAAS,sBAAsB,KAAwC;AACrE,MAAI,QAAQ,OAAW,QAAO,EAAE,SAAS,OAAO,cAAc,GAAG;AACjE,MAAI,OAAO,QAAQ,YAAY,QAAQ,QAAQ,MAAM,QAAQ,GAAG,GAAG;AACjE,UAAM,IAAI,UAAU,wCAAwC;AAAA,EAC9D;AACA,QAAM,KAAK;AACX,QAAM,eAAe,kBAAkB,GAAG,SAAS,8BAA8B;AACjF,MAAI,GAAG,YAAY,UAAa,iBAAiB,QAAW;AAC1D,UAAM,IAAI,UAAU,gDAAgD;AAAA,EACtE;AACA,QAAM,oBAAoB,aAAa,GAAG,cAAc,mCAAmC;AAC3F,MAAI,GAAG,iBAAiB,UAAa,sBAAsB,QAAW;AACpE,UAAM,IAAI,UAAU,oEAAoE;AAAA,EAC1F;AACA,QAAM,eAAe,qBAAqB;AAC1C,MAAI,CAAC,OAAO,UAAU,YAAY,KAAK,eAAe,KAAK,eAAe,KAAK;AAC7E,UAAM,IAAI,WAAW,oEAAoE;AAAA,EAC3F;AACA,SAAO,EAAE,SAAS,gBAAgB,OAAO,aAAa;AACxD;","names":[]}
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import {
|
|
2
2
|
NamespaceStorageRouter
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-S4CDUXQY.js";
|
|
4
4
|
import {
|
|
5
5
|
namespaceCollectionName
|
|
6
|
-
} from "./chunk-
|
|
6
|
+
} from "./chunk-C5IUOBCN.js";
|
|
7
7
|
import {
|
|
8
8
|
isSafeRouteNamespace
|
|
9
9
|
} from "./chunk-PCXDUHQH.js";
|
|
@@ -213,4 +213,4 @@ export {
|
|
|
213
213
|
verifyNamespaces,
|
|
214
214
|
runNamespaceMigration
|
|
215
215
|
};
|
|
216
|
-
//# sourceMappingURL=chunk-
|
|
216
|
+
//# sourceMappingURL=chunk-4XLTUR6R.js.map
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import {
|
|
2
2
|
runLocationSync
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-JKTV3JNX.js";
|
|
4
4
|
import {
|
|
5
5
|
log
|
|
6
6
|
} from "./chunk-3WCASNQZ.js";
|
|
@@ -58,4 +58,4 @@ export {
|
|
|
58
58
|
LOCATION_SYNC_DEFAULT_INTERVAL_MS,
|
|
59
59
|
startLocationAutoSync
|
|
60
60
|
};
|
|
61
|
-
//# sourceMappingURL=chunk-
|
|
61
|
+
//# sourceMappingURL=chunk-65JOGLIS.js.map
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import {
|
|
2
2
|
StorageManager
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-2ITZ74A6.js";
|
|
4
4
|
import {
|
|
5
5
|
normalizeEntityName
|
|
6
6
|
} from "./chunk-YXZG5TVN.js";
|
|
@@ -957,4 +957,4 @@ export {
|
|
|
957
957
|
resolveBriefingSaveDir,
|
|
958
958
|
briefingFilename
|
|
959
959
|
};
|
|
960
|
-
//# sourceMappingURL=chunk-
|
|
960
|
+
//# sourceMappingURL=chunk-7UOXCCCI.js.map
|
|
@@ -7,7 +7,7 @@ import {
|
|
|
7
7
|
} from "./chunk-62OKGIJA.js";
|
|
8
8
|
import {
|
|
9
9
|
parseActivityConfig
|
|
10
|
-
} from "./chunk-
|
|
10
|
+
} from "./chunk-46XR5FNZ.js";
|
|
11
11
|
import {
|
|
12
12
|
parseLocationConfig
|
|
13
13
|
} from "./chunk-TEZ2HTC7.js";
|
|
@@ -259,6 +259,101 @@ function parseDriftDetectionConfig(raw) {
|
|
|
259
259
|
};
|
|
260
260
|
}
|
|
261
261
|
|
|
262
|
+
// src/dedup/novelty-gate.ts
|
|
263
|
+
var DEFAULT_NOVELTY_ADD_THRESHOLD = 0.55;
|
|
264
|
+
var DEFAULT_NOVELTY_NOOP_THRESHOLD = 0.15;
|
|
265
|
+
var DEFAULT_NOVELTY_K = 5;
|
|
266
|
+
function clamp01(value, fallback) {
|
|
267
|
+
return value !== void 0 && Number.isFinite(value) ? Math.min(1, Math.max(0, value)) : fallback;
|
|
268
|
+
}
|
|
269
|
+
function cosine(a, b) {
|
|
270
|
+
if (a.length === 0 || a.length !== b.length) return 0;
|
|
271
|
+
let dot = 0;
|
|
272
|
+
let magA = 0;
|
|
273
|
+
let magB = 0;
|
|
274
|
+
for (let i = 0; i < a.length; i++) {
|
|
275
|
+
dot += a[i] * b[i];
|
|
276
|
+
magA += a[i] * a[i];
|
|
277
|
+
magB += b[i] * b[i];
|
|
278
|
+
}
|
|
279
|
+
const denom = Math.sqrt(magA) * Math.sqrt(magB);
|
|
280
|
+
if (denom === 0) return 0;
|
|
281
|
+
const raw = dot / denom;
|
|
282
|
+
if (!Number.isFinite(raw)) return 0;
|
|
283
|
+
if (raw < 0) return 0;
|
|
284
|
+
if (raw > 1) return 1;
|
|
285
|
+
return raw;
|
|
286
|
+
}
|
|
287
|
+
function parseWritePathDedupConfig(cfg) {
|
|
288
|
+
const rawCandidates = coerceNumber(cfg.semanticDedupCandidates, "semanticDedupCandidates");
|
|
289
|
+
let semanticDedupCandidates = 5;
|
|
290
|
+
if (rawCandidates !== void 0 && rawCandidates >= 0) {
|
|
291
|
+
const n = Math.floor(rawCandidates);
|
|
292
|
+
semanticDedupCandidates = rawCandidates > 0 && n === 0 ? 1 : n;
|
|
293
|
+
}
|
|
294
|
+
return {
|
|
295
|
+
semanticDedupEnabled: coerceBooleanLike(cfg.semanticDedupEnabled, "semanticDedupEnabled") !== false,
|
|
296
|
+
semanticDedupThreshold: clamp01(
|
|
297
|
+
coerceNumber(cfg.semanticDedupThreshold, "semanticDedupThreshold"),
|
|
298
|
+
0.92
|
|
299
|
+
),
|
|
300
|
+
semanticDedupCandidates,
|
|
301
|
+
noveltyGateEnabled: coerceBooleanLike(cfg.noveltyGateEnabled, "noveltyGateEnabled") === true,
|
|
302
|
+
noveltyAddThreshold: clamp01(
|
|
303
|
+
coerceNumber(cfg.noveltyAddThreshold, "noveltyAddThreshold"),
|
|
304
|
+
DEFAULT_NOVELTY_ADD_THRESHOLD
|
|
305
|
+
),
|
|
306
|
+
noveltyNoopThreshold: clamp01(
|
|
307
|
+
coerceNumber(cfg.noveltyNoopThreshold, "noveltyNoopThreshold"),
|
|
308
|
+
DEFAULT_NOVELTY_NOOP_THRESHOLD
|
|
309
|
+
)
|
|
310
|
+
};
|
|
311
|
+
}
|
|
312
|
+
function embeddingsFromCosineHits(hits, opts = {}) {
|
|
313
|
+
const candidateConnector = opts.candidateConnector?.trim() || void 0;
|
|
314
|
+
const scoped = candidateConnector ? hits.filter((hit) => (hit.sourceConnector?.trim() || void 0) === candidateConnector) : hits;
|
|
315
|
+
return {
|
|
316
|
+
embedding: [1, 0],
|
|
317
|
+
neighborhood: scoped.map((hit) => {
|
|
318
|
+
const s = Number.isFinite(hit.score) ? Math.min(1, Math.max(-1, hit.score)) : 0;
|
|
319
|
+
return { id: hit.id, embedding: [s, Math.sqrt(Math.max(0, 1 - s * s))] };
|
|
320
|
+
})
|
|
321
|
+
};
|
|
322
|
+
}
|
|
323
|
+
function scoreNovelty(embedding, neighborhood, thresholds = {}) {
|
|
324
|
+
const addThreshold = clamp01(thresholds.addThreshold ?? DEFAULT_NOVELTY_ADD_THRESHOLD, DEFAULT_NOVELTY_ADD_THRESHOLD);
|
|
325
|
+
const noopThreshold = clamp01(thresholds.noopThreshold ?? DEFAULT_NOVELTY_NOOP_THRESHOLD, DEFAULT_NOVELTY_NOOP_THRESHOLD);
|
|
326
|
+
const k = thresholds.k !== void 0 && Number.isFinite(thresholds.k) && thresholds.k > 0 ? Math.floor(thresholds.k) : DEFAULT_NOVELTY_K;
|
|
327
|
+
if (neighborhood.length === 0) {
|
|
328
|
+
return { score: 1, decision: "add" };
|
|
329
|
+
}
|
|
330
|
+
const ranked = neighborhood.map((neighbor) => ({
|
|
331
|
+
id: neighbor.id,
|
|
332
|
+
cosine: cosine(embedding, neighbor.embedding)
|
|
333
|
+
})).sort((a, b) => b.cosine - a.cosine);
|
|
334
|
+
const nearest = ranked.slice(0, Math.max(1, k));
|
|
335
|
+
const density = nearest.reduce((sum, row) => sum + row.cosine, 0) / nearest.length;
|
|
336
|
+
const score = 1 - density;
|
|
337
|
+
const neighborId = ranked[0]?.id;
|
|
338
|
+
if (score >= addThreshold) return { score, decision: "add", neighborId };
|
|
339
|
+
if (score <= noopThreshold) return { score, decision: "noop", neighborId };
|
|
340
|
+
return { score, decision: "uncertain", neighborId };
|
|
341
|
+
}
|
|
342
|
+
async function applyNoveltyGate(opts) {
|
|
343
|
+
if (!opts.enabled) {
|
|
344
|
+
return { score: 0, decision: "uncertain" };
|
|
345
|
+
}
|
|
346
|
+
try {
|
|
347
|
+
const { embedding, neighborhood } = await opts.lookup();
|
|
348
|
+
return scoreNovelty(embedding, neighborhood, {
|
|
349
|
+
addThreshold: opts.addThreshold,
|
|
350
|
+
noopThreshold: opts.noopThreshold
|
|
351
|
+
});
|
|
352
|
+
} catch {
|
|
353
|
+
return { score: 0, decision: "uncertain" };
|
|
354
|
+
}
|
|
355
|
+
}
|
|
356
|
+
|
|
262
357
|
// src/wearables/config.ts
|
|
263
358
|
var KNOWN_WEARABLE_SOURCE_IDS = ["limitless", "bee", "omi"];
|
|
264
359
|
var MEMORY_MODES = ["off", "review", "auto", "smart"];
|
|
@@ -3570,22 +3665,7 @@ function parseConfig(raw, rawOperatorConfig, runtimeSet) {
|
|
|
3570
3665
|
qmdExplainEnabled: cfg.qmdExplainEnabled === true,
|
|
3571
3666
|
// v6.0 Fact deduplication & archival
|
|
3572
3667
|
factDeduplicationEnabled: cfg.factDeduplicationEnabled !== false,
|
|
3573
|
-
|
|
3574
|
-
semanticDedupEnabled: cfg.semanticDedupEnabled !== false,
|
|
3575
|
-
// Guard against NaN / Infinity — Number.isFinite rejects both and falls
|
|
3576
|
-
// back to the documented default so the semantic dedup guard cannot be
|
|
3577
|
-
// silently disabled by a malformed config value.
|
|
3578
|
-
semanticDedupThreshold: typeof cfg.semanticDedupThreshold === "number" && Number.isFinite(cfg.semanticDedupThreshold) ? Math.min(1, Math.max(0, cfg.semanticDedupThreshold)) : 0.92,
|
|
3579
|
-
// Zero is a valid "disable candidate lookup" signal and must be preserved.
|
|
3580
|
-
// Only negative or non-finite values fall back to the default of 5.
|
|
3581
|
-
// Fractional values in (0, 1) floor to 0, which would silently disable
|
|
3582
|
-
// semantic dedup despite a clearly non-zero operator intent — clamp to 1.
|
|
3583
|
-
semanticDedupCandidates: (() => {
|
|
3584
|
-
const raw2 = cfg.semanticDedupCandidates;
|
|
3585
|
-
if (typeof raw2 !== "number" || !Number.isFinite(raw2) || raw2 < 0) return 5;
|
|
3586
|
-
const n = Math.floor(raw2);
|
|
3587
|
-
return raw2 > 0 && n === 0 ? 1 : n;
|
|
3588
|
-
})(),
|
|
3668
|
+
...parseWritePathDedupConfig(cfg),
|
|
3589
3669
|
factArchivalEnabled: cfg.factArchivalEnabled === true,
|
|
3590
3670
|
factArchivalAgeDays: typeof cfg.factArchivalAgeDays === "number" ? cfg.factArchivalAgeDays : 90,
|
|
3591
3671
|
factArchivalMaxImportance: typeof cfg.factArchivalMaxImportance === "number" ? cfg.factArchivalMaxImportance : 0.3,
|
|
@@ -4426,6 +4506,8 @@ function parseTrustScoreWeights(value) {
|
|
|
4426
4506
|
export {
|
|
4427
4507
|
DRIFT_DETECTION_DEFAULTS,
|
|
4428
4508
|
parseDriftDetectionConfig,
|
|
4509
|
+
embeddingsFromCosineHits,
|
|
4510
|
+
applyNoveltyGate,
|
|
4429
4511
|
KNOWN_WEARABLE_SOURCE_IDS,
|
|
4430
4512
|
defaultWearableCleanupSettings,
|
|
4431
4513
|
defaultWearableSourceSettings,
|
|
@@ -4452,4 +4534,4 @@ export {
|
|
|
4452
4534
|
VALID_MEMORY_CATEGORIES,
|
|
4453
4535
|
parseConfig
|
|
4454
4536
|
};
|
|
4455
|
-
//# sourceMappingURL=chunk-
|
|
4537
|
+
//# sourceMappingURL=chunk-AF5H7TKI.js.map
|