@remnic/core 9.69.51 → 9.69.53
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 +14 -14
- package/dist/access-admin-ops-surface.js +46 -46
- package/dist/access-authorization-probe.d.ts +14 -14
- package/dist/access-authorization-probe.js +47 -47
- package/dist/access-boundary.d.ts +14 -14
- package/dist/access-boundary.js +46 -46
- package/dist/access-cli.js +92 -92
- package/dist/access-coding-context-resolution.d.ts +1 -1
- package/dist/access-extraction-force-flush.d.ts +14 -14
- package/dist/access-extraction-force-flush.js +46 -46
- package/dist/access-health-types.d.ts +1 -1
- package/dist/access-http-briefing.d.ts +14 -14
- package/dist/access-http-briefing.js +47 -47
- package/dist/access-http-lcm-compaction.d.ts +14 -14
- package/dist/access-http-lifecycle-flush.d.ts +14 -14
- package/dist/access-http-offline-stream.d.ts +14 -14
- package/dist/access-http-query.d.ts +2 -2
- package/dist/access-http-query.js +48 -48
- package/dist/access-http.d.ts +15 -15
- package/dist/access-http.js +62 -62
- package/dist/access-identity-continuity-surface.d.ts +11 -11
- package/dist/access-identity-continuity-surface.js +46 -46
- package/dist/access-lcm-surface.d.ts +14 -14
- package/dist/access-lcm-surface.js +46 -46
- package/dist/access-mcp-shared-context-tools.d.ts +14 -14
- package/dist/access-mcp.d.ts +14 -14
- package/dist/access-mcp.js +55 -55
- package/dist/access-memory-search-fanout.d.ts +2 -2
- package/dist/{access-namespace-preflight-C1q3XuAc.d.ts → access-namespace-preflight-U9RAdxqZ.d.ts} +1 -1
- package/dist/access-namespace-preflight.d.ts +3 -3
- package/dist/access-namespace-preflight.js +46 -46
- package/dist/access-observe-transcript.d.ts +11 -11
- package/dist/access-observe-write-category.d.ts +3 -3
- package/dist/access-observe-write-category.js +2 -2
- package/dist/access-observe-write-surface.d.ts +14 -14
- package/dist/access-observe-write-surface.js +46 -46
- package/dist/access-offline-manifest.d.ts +11 -11
- package/dist/access-offline-manifest.js +5 -5
- package/dist/access-operations-batch.js +47 -47
- package/dist/access-operations.d.ts +14 -14
- package/dist/access-operations.js +54 -54
- package/dist/access-recall-concurrency.d.ts +14 -14
- package/dist/access-recall-concurrency.js +46 -46
- package/dist/access-recall-response.d.ts +14 -14
- package/dist/access-recall-response.js +46 -46
- package/dist/access-recall-surface.d.ts +14 -14
- package/dist/access-recall-surface.js +46 -46
- package/dist/access-schema.d.ts +114 -114
- package/dist/{access-service-BZaC-RZw.d.ts → access-service-H-qEdnSs.d.ts} +73 -73
- package/dist/access-service-helpers.d.ts +14 -14
- package/dist/access-service.d.ts +14 -14
- package/dist/access-service.js +46 -46
- package/dist/access-surface-catalog.d.ts +14 -14
- package/dist/access-surface-catalog.js +48 -48
- package/dist/access-wearables-meetings-surface.d.ts +4 -4
- 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 +72 -1
- package/dist/active-recall.js.map +1 -1
- package/dist/activity/digest.d.ts +1 -1
- package/dist/ambient-provenance.d.ts +1 -1
- package/dist/artifact-search.d.ts +1 -1
- package/dist/{auto-sync-DG5KEOF5.js → auto-sync-CWSZDLLW.js} +6 -6
- package/dist/background-generation.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 +11 -11
- 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/buffer.js +4 -4
- 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-DK2eHhax.d.ts → catalog-BuMyYPUn.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 +16 -16
- package/dist/causal-trajectory-graph.d.ts +1 -1
- package/dist/{chunk-2ERLN25A.js → chunk-2HJKAVAS.js} +5 -5
- package/dist/{chunk-CKBA2MWS.js → chunk-2QZJ4P27.js} +2 -2
- package/dist/{chunk-ETNC6TT6.js → chunk-43IQRLEF.js} +2 -2
- package/dist/{chunk-PQWICTRO.js → chunk-4UVJ6EIT.js} +1 -1
- package/dist/chunk-4UVJ6EIT.js.map +1 -0
- package/dist/{chunk-DQSVGTKB.js → chunk-6UEM5EOB.js} +2 -2
- package/dist/{chunk-JGPG5UHM.js → chunk-7QVYVSEH.js} +2 -2
- package/dist/{chunk-HEKWNWNL.js → chunk-7RKAE6Y4.js} +3 -3
- package/dist/{chunk-UP3226JC.js → chunk-A4TQFNRX.js} +5 -5
- package/dist/{chunk-T73ZC7C5.js → chunk-AH44WTLJ.js} +2 -2
- package/dist/{chunk-SZ75IB2T.js → chunk-AQWGCHIV.js} +6 -6
- package/dist/{chunk-Q6OC4UUT.js → chunk-ARRKSBQU.js} +5 -5
- package/dist/{chunk-6Z4OLQUO.js → chunk-AYHNTYVG.js} +2 -2
- package/dist/{chunk-XHDQQ2TT.js → chunk-BCXZ4BDS.js} +2 -2
- package/dist/{chunk-VLR4S5GF.js → chunk-CO7KBRPF.js} +3 -3
- package/dist/{chunk-JHUODJRW.js → chunk-D2N3PMAE.js} +2 -2
- package/dist/{chunk-7SJCSDQ3.js → chunk-D7VT2LED.js} +2 -2
- package/dist/{chunk-X25NTN3W.js → chunk-DI52XAKG.js} +2 -2
- package/dist/{chunk-EUP4AXIW.js → chunk-DZP2XMZC.js} +2 -2
- package/dist/{chunk-BULK6DGB.js → chunk-EQNZC3BH.js} +2 -2
- package/dist/{chunk-OIK3YL2P.js → chunk-EVQ33D3N.js} +4 -4
- package/dist/{chunk-MNF6PTNL.js → chunk-EYK3UHAP.js} +2 -2
- package/dist/{chunk-VSN2DMQK.js → chunk-G2DF5MI7.js} +4 -4
- package/dist/{chunk-JIWZVOQM.js → chunk-G7S37WD4.js} +2 -2
- package/dist/{chunk-2G2CVN2T.js → chunk-HUQMVI3A.js} +147 -58
- package/dist/chunk-HUQMVI3A.js.map +1 -0
- package/dist/{chunk-6HCJWCA4.js → chunk-IEOBAOA6.js} +6 -6
- package/dist/{chunk-UDAUULK2.js → chunk-IGEZE6QB.js} +5 -5
- package/dist/{chunk-SGHGCFVV.js → chunk-JE334SIA.js} +10 -10
- package/dist/{chunk-XFXVIXDI.js → chunk-JE4H2QBO.js} +2 -2
- package/dist/{chunk-33SX6K3N.js → chunk-JMZQS6OS.js} +2 -2
- package/dist/{chunk-BMAYH7F4.js → chunk-K7FXR75S.js} +514 -381
- package/dist/chunk-K7FXR75S.js.map +1 -0
- package/dist/{chunk-3RABJOGD.js → chunk-KH2D26LQ.js} +5 -5
- package/dist/{chunk-AH3OIMS7.js → chunk-KQQEZTH6.js} +2 -2
- package/dist/{chunk-QRSC37NC.js → chunk-M7HFDWOS.js} +3 -3
- package/dist/{chunk-2EICZYIG.js → chunk-MTJUIIM4.js} +2 -2
- package/dist/{chunk-ST7FDKZT.js → chunk-MWVYHNSU.js} +2 -2
- package/dist/{chunk-NXSNFPYI.js → chunk-MXTCV3B5.js} +2 -2
- package/dist/{chunk-O4JFBEUL.js → chunk-O7OVWKT4.js} +2 -2
- package/dist/{chunk-RIP2AOZW.js → chunk-QWQB7TOB.js} +19 -19
- package/dist/{chunk-PYTSGD5M.js → chunk-RSMNPYBM.js} +2 -2
- package/dist/{chunk-MYDA2GA2.js → chunk-RUUJXAGT.js} +2 -2
- package/dist/{chunk-YJJMJH6J.js → chunk-SEQ6DWXD.js} +11 -11
- package/dist/{chunk-SCM4VYJW.js → chunk-SLGD36MM.js} +3 -3
- package/dist/{chunk-KAPYPTPS.js → chunk-SOOWBRMH.js} +13 -13
- package/dist/{chunk-JG4AP36X.js → chunk-SPFNGHHP.js} +2 -2
- package/dist/{chunk-7TTOX6NW.js → chunk-SPWNCGSM.js} +2 -2
- package/dist/{chunk-3QZRSEAM.js → chunk-SZ7IVZGD.js} +2 -2
- package/dist/{chunk-IGDEKECC.js → chunk-TQT4AOPO.js} +4 -4
- package/dist/{chunk-NVW5ISEJ.js → chunk-TS66MUUJ.js} +50 -50
- package/dist/{chunk-6ZMIASYT.js → chunk-U2SK45U3.js} +2 -2
- package/dist/{chunk-72AV2H3R.js → chunk-U3NBO4IX.js} +39 -3
- package/dist/chunk-U3NBO4IX.js.map +1 -0
- package/dist/{chunk-SMI2G3MA.js → chunk-UCH2RWFX.js} +2 -2
- package/dist/{chunk-A33DLYNY.js → chunk-UDJMJNBK.js} +2 -2
- package/dist/{chunk-DLXBMXIB.js → chunk-UJBIWY5M.js} +5 -5
- package/dist/{chunk-25HSEIEM.js → chunk-ULQVG6G3.js} +2 -2
- package/dist/{chunk-EBJL6HGR.js → chunk-UVZBDIJX.js} +211 -1
- package/dist/chunk-UVZBDIJX.js.map +1 -0
- package/dist/{chunk-XRUOO7OT.js → chunk-VGO57TU7.js} +5 -5
- package/dist/{chunk-LX7KIJQF.js → chunk-VMKAA5SU.js} +2 -2
- package/dist/{chunk-KBHDV7P3.js → chunk-VUV472VH.js} +12 -12
- package/dist/{chunk-LZI6FWZW.js → chunk-WH7RINGG.js} +4 -4
- package/dist/{chunk-FDDCZDBI.js → chunk-WN4HFL4K.js} +4 -4
- package/dist/{chunk-ISA5U5AP.js → chunk-WUJD4CHZ.js} +4 -4
- package/dist/{chunk-UVEBBXB5.js → chunk-X7WAM3IY.js} +2 -2
- package/dist/{chunk-NROI5XMG.js → chunk-XPFJSUOR.js} +5 -5
- package/dist/{chunk-2SZBCM2S.js → chunk-Y4G6LHJW.js} +2 -2
- package/dist/{chunk-JXSOB3SA.js → chunk-Y7LZ5V7N.js} +2 -2
- package/dist/{chunk-YSBYNCCN.js → chunk-YLPCEUXP.js} +3 -3
- package/dist/{chunk-RFIJH2OE.js → chunk-YUHGJBQK.js} +2 -2
- package/dist/{chunk-DX63RFDJ.js → chunk-ZADYEZY4.js} +2 -2
- package/dist/{chunk-TNFDWJRS.js → chunk-ZANEMAEV.js} +2 -2
- package/dist/{cli-BHDMJqJS.d.ts → cli-VGDSn2zY.d.ts} +5 -5
- package/dist/cli.d.ts +16 -16
- package/dist/cli.js +75 -75
- 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 +8 -8
- 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 +72 -1
- package/dist/connectors/codex-materialize-runner.d.ts +1 -1
- package/dist/connectors/codex-materialize-runner.js +12 -12
- package/dist/connectors/codex-materialize.d.ts +1 -1
- package/dist/connectors/index.d.ts +1 -1
- package/dist/connectors/index.js +16 -16
- package/dist/consolidation-provenance-check.d.ts +2 -2
- package/dist/consolidation-undo.d.ts +2 -2
- package/dist/contradiction/index.d.ts +4 -4
- package/dist/converge-config.d.ts +1 -1
- package/dist/convergence-refresh.d.ts +2 -2
- package/dist/convergence-refresh.js +10 -10
- 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 +10 -10
- package/dist/cross-lingual-recall.d.ts +1 -1
- package/dist/day-summary.d.ts +1 -1
- package/dist/deep-recall-http-glue.d.ts +14 -14
- package/dist/deep-recall-mcp-tools.d.ts +14 -14
- package/dist/deep-recall-policy-llm.d.ts +2 -2
- package/dist/deep-recall-seeds.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-BMkR4gmY.d.ts → dependency-propagation-delivery-BrhPjAHQ.d.ts} +1 -1
- package/dist/direct-answer-wiring.d.ts +1 -1
- package/dist/direct-answer.d.ts +1 -1
- package/dist/directory-sidecars.d.ts +30 -7
- package/dist/directory-sidecars.js +5 -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 +8 -8
- 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 +11 -11
- package/dist/external-wiki-access.d.ts +14 -14
- package/dist/external-wiki-access.js +47 -47
- 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 +14 -14
- package/dist/extraction-error-classification.d.ts +1 -1
- package/dist/extraction-evidence-class.d.ts +1 -1
- package/dist/extraction-faithfulness.d.ts +2 -2
- package/dist/extraction-judge-telemetry.d.ts +2 -2
- package/dist/extraction-judge-training.d.ts +2 -2
- package/dist/extraction-judge.d.ts +2 -2
- package/dist/extraction-judge.js +2 -2
- 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-span-config.d.ts +1 -1
- package/dist/extraction-span-materialize.d.ts +1 -1
- package/dist/extraction-span-wire.d.ts +1 -1
- package/dist/extraction.d.ts +2 -2
- package/dist/extraction.js +18 -18
- package/dist/fallback-llm-codex-subscription.d.ts +1 -1
- package/dist/fallback-llm.d.ts +1 -1
- package/dist/{generic-recall-paths-BCRtXU32.d.ts → generic-recall-paths-C0J1Oxb7.d.ts} +1 -1
- package/dist/graph-append-error.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-jsonl.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 +2 -2
- package/dist/importance.d.ts +1 -1
- package/dist/importers/index.d.ts +1 -1
- package/dist/importers/test-utils.d.ts +1 -1
- package/dist/in-flight-reads.d.ts +1 -1
- package/dist/{index-DMNTW4W6.d.ts → index-B735x-tK.d.ts} +3 -3
- package/dist/index.d.ts +702 -702
- package/dist/index.js +165 -165
- package/dist/intent.d.ts +1 -1
- package/dist/lcm/engine.d.ts +1 -1
- package/dist/lcm/index.d.ts +1 -1
- 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-BXYC-mbU.d.ts → local-llm-BkkEK9rn.d.ts} +1 -1
- package/dist/local-llm-helpers.d.ts +2 -2
- package/dist/local-llm.d.ts +2 -2
- package/dist/local-model-endpoint.d.ts +1 -1
- package/dist/location/index.d.ts +5 -5
- package/dist/location/index.js +12 -12
- package/dist/maintenance/memory-governance.d.ts +1 -1
- package/dist/maintenance/memory-governance.js +8 -8
- package/dist/maintenance/rebuild-memory-lifecycle-ledger.d.ts +2 -2
- package/dist/maintenance/rebuild-memory-lifecycle-ledger.js +8 -8
- package/dist/maintenance/rebuild-memory-projection.d.ts +2 -2
- package/dist/maintenance/rebuild-memory-projection.js +9 -9
- package/dist/{maintenance-zJiLsKBY.d.ts → maintenance-CLBIvVxg.d.ts} +3 -3
- package/dist/mcp-memory-inspector-app.d.ts +14 -14
- package/dist/memory-action-policy.d.ts +1 -1
- package/dist/memory-browse-http-glue.d.ts +14 -14
- package/dist/memory-browse-mcp-tools.d.ts +14 -14
- package/dist/memory-browse-operations.js +47 -47
- package/dist/memory-browse.d.ts +1 -1
- package/dist/memory-browse.js +5 -5
- 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 +14 -14
- package/dist/memory-subject.d.ts +14 -14
- 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 +9 -9
- package/dist/namespaces/principal.d.ts +1 -1
- package/dist/namespaces/search.d.ts +1 -1
- package/dist/namespaces/storage.d.ts +3 -3
- package/dist/namespaces/storage.js +8 -8
- package/dist/native-knowledge.d.ts +1 -1
- package/dist/offline-sync-impression-drain.d.ts +1 -1
- package/dist/offline-sync-impression-drain.js +3 -3
- 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 +36 -36
- package/dist/orchestration/compression-guideline-coordinator.d.ts +2 -2
- package/dist/orchestration/maintenance.d.ts +4 -4
- package/dist/orchestration/maintenance.js +19 -19
- package/dist/{orchestrator-BTqT3F6X.d.ts → orchestrator-iexgVLow.d.ts} +13 -11
- package/dist/orchestrator.d.ts +11 -11
- package/dist/orchestrator.js +92 -92
- package/dist/patterns-cli.d.ts +1 -1
- package/dist/{pipeline-CgO2Sd4O.d.ts → pipeline-DvtDtyo9.d.ts} +1 -1
- package/dist/policy-runtime.d.ts +1 -1
- package/dist/proactive-contention.d.ts +2 -2
- package/dist/provenance.d.ts +1 -1
- package/dist/{public-http-Dk1EA9ix.d.ts → public-http-P0cnHzYB.d.ts} +1 -1
- package/dist/{qmd-CwxtVz64.d.ts → qmd-CBYBJ6HW.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-navigate-access.d.ts +1 -1
- package/dist/recall-navigate-access.js +2 -2
- package/dist/recall-navigate-disclosure.d.ts +1 -1
- package/dist/recall-navigate-disclosure.js +2 -2
- package/dist/recall-navigate.d.ts +1 -1
- package/dist/recall-navigate.js +2 -2
- package/dist/recall-navigation-http-glue.d.ts +14 -14
- package/dist/recall-navigation-mcp-tools.d.ts +14 -14
- package/dist/recall-navigation-operations.js +47 -47
- package/dist/recall-navigation-renderer.d.ts +1 -1
- package/dist/recall-navigation.d.ts +1 -1
- package/dist/recall-navigation.js +46 -46
- package/dist/recall-planner-llm.d.ts +1 -1
- package/dist/recall-state-view-admission.d.ts +2 -2
- package/dist/recall-state-view-admission.js +5 -5
- package/dist/recall-state-view-anchors.d.ts +1 -1
- package/dist/recall-state-view-anchors.js +2 -2
- 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/manifest.js +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 +72 -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/schemas.d.ts +160 -160
- package/dist/{scope-profiles-Bg1rB-Dp.d.ts → scope-profiles-BN1Dgfha.d.ts} +1 -1
- package/dist/search/embed-helper.d.ts +1 -1
- package/dist/search/factory.d.ts +1 -1
- package/dist/search/index.d.ts +1 -1
- 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-DEzRyeyn.d.ts → semantic-consolidation-D--qe0eE.d.ts} +1 -1
- package/dist/semantic-consolidation.d.ts +2 -2
- package/dist/semantic-consolidation.js +13 -13
- package/dist/semantic-rule-promotion.js +8 -8
- package/dist/semantic-rule-verifier.d.ts +1 -1
- package/dist/semantic-rule-verifier.js +8 -8
- package/dist/{service-DGEIDOeD.d.ts → service-VealHeqO.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 +9 -9
- package/dist/signal.d.ts +1 -1
- package/dist/source-agent-qualifier.d.ts +1 -1
- package/dist/source-agent-qualifier.js +17 -17
- package/dist/standup/build.js +9 -9
- package/dist/{storage-DNQWtOSM.d.ts → storage-CMm-3aD3.d.ts} +1 -1
- package/dist/storage.d.ts +2 -2
- package/dist/storage.js +7 -7
- package/dist/subject-config.d.ts +1 -1
- package/dist/summarizer.d.ts +1 -1
- package/dist/summarizer.js +1 -1
- package/dist/summary-snapshot.d.ts +1 -1
- package/dist/support-passport/index.d.ts +17 -17
- package/dist/support-passport/index.js +49 -49
- package/dist/{tagging-CPVwgadt.d.ts → tagging-BjsNFKWz.d.ts} +2 -2
- 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/export-okf.d.ts +1 -1
- package/dist/transfer/export-okf.js +8 -8
- 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-DCB90q3g.d.ts → types-Du6VdoAg.d.ts} +22 -1
- package/dist/types.d.ts +1 -1
- package/dist/types.js +1 -1
- package/dist/utility-runtime.d.ts +1 -1
- package/dist/verified-recall.js +8 -8
- package/dist/who-knows-cli.d.ts +14 -14
- package/dist/who-knows-cli.js +9 -9
- package/dist/who-knows.d.ts +14 -14
- package/dist/who-knows.js +8 -8
- package/dist/write-envelope.d.ts +1 -1
- package/package.json +2 -2
- package/src/config.ts +3 -4
- package/src/directory-sidecars.test.ts +113 -0
- package/src/directory-sidecars.ts +70 -8
- package/src/experience/session-experience-mining.test.ts +186 -0
- package/src/experience/session-experience-mining.ts +90 -0
- package/src/lifecycle/seed-graduation-config-types.ts +22 -0
- package/src/lifecycle/seed-graduation.test.ts +160 -1
- package/src/lifecycle/seed-graduation.ts +7 -9
- package/src/orchestration/lifecycle-policy-coordinator.ts +12 -0
- package/src/orchestration/persistence-index.ts +50 -0
- package/src/orchestration/recall-recognition-index.test.ts +249 -0
- package/src/orchestration/recall-recognition-index.ts +169 -0
- package/src/orchestrator.ts +1 -0
- package/src/procedural/procedure-miner.ts +8 -6
- package/src/testing/subjects/recall-recognition-index.test.ts +97 -0
- package/src/types.ts +4 -6
- package/dist/chunk-2G2CVN2T.js.map +0 -1
- package/dist/chunk-72AV2H3R.js.map +0 -1
- package/dist/chunk-BMAYH7F4.js.map +0 -1
- package/dist/chunk-EBJL6HGR.js.map +0 -1
- package/dist/chunk-PQWICTRO.js.map +0 -1
- /package/dist/{auto-sync-DG5KEOF5.js.map → auto-sync-CWSZDLLW.js.map} +0 -0
- /package/dist/{chunk-2ERLN25A.js.map → chunk-2HJKAVAS.js.map} +0 -0
- /package/dist/{chunk-CKBA2MWS.js.map → chunk-2QZJ4P27.js.map} +0 -0
- /package/dist/{chunk-ETNC6TT6.js.map → chunk-43IQRLEF.js.map} +0 -0
- /package/dist/{chunk-DQSVGTKB.js.map → chunk-6UEM5EOB.js.map} +0 -0
- /package/dist/{chunk-JGPG5UHM.js.map → chunk-7QVYVSEH.js.map} +0 -0
- /package/dist/{chunk-HEKWNWNL.js.map → chunk-7RKAE6Y4.js.map} +0 -0
- /package/dist/{chunk-UP3226JC.js.map → chunk-A4TQFNRX.js.map} +0 -0
- /package/dist/{chunk-T73ZC7C5.js.map → chunk-AH44WTLJ.js.map} +0 -0
- /package/dist/{chunk-SZ75IB2T.js.map → chunk-AQWGCHIV.js.map} +0 -0
- /package/dist/{chunk-Q6OC4UUT.js.map → chunk-ARRKSBQU.js.map} +0 -0
- /package/dist/{chunk-6Z4OLQUO.js.map → chunk-AYHNTYVG.js.map} +0 -0
- /package/dist/{chunk-XHDQQ2TT.js.map → chunk-BCXZ4BDS.js.map} +0 -0
- /package/dist/{chunk-VLR4S5GF.js.map → chunk-CO7KBRPF.js.map} +0 -0
- /package/dist/{chunk-JHUODJRW.js.map → chunk-D2N3PMAE.js.map} +0 -0
- /package/dist/{chunk-7SJCSDQ3.js.map → chunk-D7VT2LED.js.map} +0 -0
- /package/dist/{chunk-X25NTN3W.js.map → chunk-DI52XAKG.js.map} +0 -0
- /package/dist/{chunk-EUP4AXIW.js.map → chunk-DZP2XMZC.js.map} +0 -0
- /package/dist/{chunk-BULK6DGB.js.map → chunk-EQNZC3BH.js.map} +0 -0
- /package/dist/{chunk-OIK3YL2P.js.map → chunk-EVQ33D3N.js.map} +0 -0
- /package/dist/{chunk-MNF6PTNL.js.map → chunk-EYK3UHAP.js.map} +0 -0
- /package/dist/{chunk-VSN2DMQK.js.map → chunk-G2DF5MI7.js.map} +0 -0
- /package/dist/{chunk-JIWZVOQM.js.map → chunk-G7S37WD4.js.map} +0 -0
- /package/dist/{chunk-6HCJWCA4.js.map → chunk-IEOBAOA6.js.map} +0 -0
- /package/dist/{chunk-UDAUULK2.js.map → chunk-IGEZE6QB.js.map} +0 -0
- /package/dist/{chunk-SGHGCFVV.js.map → chunk-JE334SIA.js.map} +0 -0
- /package/dist/{chunk-XFXVIXDI.js.map → chunk-JE4H2QBO.js.map} +0 -0
- /package/dist/{chunk-33SX6K3N.js.map → chunk-JMZQS6OS.js.map} +0 -0
- /package/dist/{chunk-3RABJOGD.js.map → chunk-KH2D26LQ.js.map} +0 -0
- /package/dist/{chunk-AH3OIMS7.js.map → chunk-KQQEZTH6.js.map} +0 -0
- /package/dist/{chunk-QRSC37NC.js.map → chunk-M7HFDWOS.js.map} +0 -0
- /package/dist/{chunk-2EICZYIG.js.map → chunk-MTJUIIM4.js.map} +0 -0
- /package/dist/{chunk-ST7FDKZT.js.map → chunk-MWVYHNSU.js.map} +0 -0
- /package/dist/{chunk-NXSNFPYI.js.map → chunk-MXTCV3B5.js.map} +0 -0
- /package/dist/{chunk-O4JFBEUL.js.map → chunk-O7OVWKT4.js.map} +0 -0
- /package/dist/{chunk-RIP2AOZW.js.map → chunk-QWQB7TOB.js.map} +0 -0
- /package/dist/{chunk-PYTSGD5M.js.map → chunk-RSMNPYBM.js.map} +0 -0
- /package/dist/{chunk-MYDA2GA2.js.map → chunk-RUUJXAGT.js.map} +0 -0
- /package/dist/{chunk-YJJMJH6J.js.map → chunk-SEQ6DWXD.js.map} +0 -0
- /package/dist/{chunk-SCM4VYJW.js.map → chunk-SLGD36MM.js.map} +0 -0
- /package/dist/{chunk-KAPYPTPS.js.map → chunk-SOOWBRMH.js.map} +0 -0
- /package/dist/{chunk-JG4AP36X.js.map → chunk-SPFNGHHP.js.map} +0 -0
- /package/dist/{chunk-7TTOX6NW.js.map → chunk-SPWNCGSM.js.map} +0 -0
- /package/dist/{chunk-3QZRSEAM.js.map → chunk-SZ7IVZGD.js.map} +0 -0
- /package/dist/{chunk-IGDEKECC.js.map → chunk-TQT4AOPO.js.map} +0 -0
- /package/dist/{chunk-NVW5ISEJ.js.map → chunk-TS66MUUJ.js.map} +0 -0
- /package/dist/{chunk-6ZMIASYT.js.map → chunk-U2SK45U3.js.map} +0 -0
- /package/dist/{chunk-SMI2G3MA.js.map → chunk-UCH2RWFX.js.map} +0 -0
- /package/dist/{chunk-A33DLYNY.js.map → chunk-UDJMJNBK.js.map} +0 -0
- /package/dist/{chunk-DLXBMXIB.js.map → chunk-UJBIWY5M.js.map} +0 -0
- /package/dist/{chunk-25HSEIEM.js.map → chunk-ULQVG6G3.js.map} +0 -0
- /package/dist/{chunk-XRUOO7OT.js.map → chunk-VGO57TU7.js.map} +0 -0
- /package/dist/{chunk-LX7KIJQF.js.map → chunk-VMKAA5SU.js.map} +0 -0
- /package/dist/{chunk-KBHDV7P3.js.map → chunk-VUV472VH.js.map} +0 -0
- /package/dist/{chunk-LZI6FWZW.js.map → chunk-WH7RINGG.js.map} +0 -0
- /package/dist/{chunk-FDDCZDBI.js.map → chunk-WN4HFL4K.js.map} +0 -0
- /package/dist/{chunk-ISA5U5AP.js.map → chunk-WUJD4CHZ.js.map} +0 -0
- /package/dist/{chunk-UVEBBXB5.js.map → chunk-X7WAM3IY.js.map} +0 -0
- /package/dist/{chunk-NROI5XMG.js.map → chunk-XPFJSUOR.js.map} +0 -0
- /package/dist/{chunk-2SZBCM2S.js.map → chunk-Y4G6LHJW.js.map} +0 -0
- /package/dist/{chunk-JXSOB3SA.js.map → chunk-Y7LZ5V7N.js.map} +0 -0
- /package/dist/{chunk-YSBYNCCN.js.map → chunk-YLPCEUXP.js.map} +0 -0
- /package/dist/{chunk-RFIJH2OE.js.map → chunk-YUHGJBQK.js.map} +0 -0
- /package/dist/{chunk-DX63RFDJ.js.map → chunk-ZADYEZY4.js.map} +0 -0
- /package/dist/{chunk-TNFDWJRS.js.map → chunk-ZANEMAEV.js.map} +0 -0
|
@@ -0,0 +1,249 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* recall-recognition-index.test.ts — issue #2975 write-path maintenance slice.
|
|
3
|
+
*
|
|
4
|
+
* Pins: when recallRecognitionTier is on, a namespace write upserts the
|
|
5
|
+
* memory id into state/index_recognition.json so loadRecognitionIndex
|
|
6
|
+
* sees a fresh entry. Gate-off is zero index I/O. Descriptions are the
|
|
7
|
+
* first non-empty body line (no recognition-trigger generation here).
|
|
8
|
+
*/
|
|
9
|
+
import assert from "node:assert/strict";
|
|
10
|
+
import { mock } from "node:test";
|
|
11
|
+
import os from "node:os";
|
|
12
|
+
import path from "node:path";
|
|
13
|
+
import { promises as fsp } from "node:fs";
|
|
14
|
+
import { mkdtemp, rm } from "node:fs/promises";
|
|
15
|
+
import test from "node:test";
|
|
16
|
+
|
|
17
|
+
import { parseConfig } from "../config.js";
|
|
18
|
+
import { loadRecognitionIndex, recognitionIndexPath } from "../recall-recognition-tier.js";
|
|
19
|
+
import { PersistenceIndexCoordinator } from "./persistence-index.js";
|
|
20
|
+
import { maintainRecognitionIndexAfterWrite } from "./recall-recognition-index.js";
|
|
21
|
+
import type { MemoryFile, PluginConfig } from "../types.js";
|
|
22
|
+
|
|
23
|
+
async function tmpNamespace(): Promise<string> {
|
|
24
|
+
return mkdtemp(path.join(os.tmpdir(), "remnic-recognition-index-"));
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
async function exists(filePath: string): Promise<boolean> {
|
|
28
|
+
try {
|
|
29
|
+
await fsp.stat(filePath);
|
|
30
|
+
return true;
|
|
31
|
+
} catch {
|
|
32
|
+
return false;
|
|
33
|
+
}
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
test("acceptance: gate-off write is zero index I/O", async () => {
|
|
37
|
+
const dir = await tmpNamespace();
|
|
38
|
+
const spies = [
|
|
39
|
+
mock.method(fsp, "readFile"),
|
|
40
|
+
mock.method(fsp, "writeFile"),
|
|
41
|
+
mock.method(fsp, "mkdir"),
|
|
42
|
+
mock.method(fsp, "open"),
|
|
43
|
+
mock.method(fsp, "rename"),
|
|
44
|
+
mock.method(fsp, "rm"),
|
|
45
|
+
mock.method(fsp, "unlink"),
|
|
46
|
+
mock.method(fsp, "stat"),
|
|
47
|
+
mock.method(fsp, "access"),
|
|
48
|
+
mock.method(fsp, "readdir"),
|
|
49
|
+
];
|
|
50
|
+
try {
|
|
51
|
+
await maintainRecognitionIndexAfterWrite({
|
|
52
|
+
memoryDir: dir,
|
|
53
|
+
enabled: false,
|
|
54
|
+
changes: [{ action: "upsert", id: "fact-001", content: "SSD inference chips in the lab rack.\nMore body." }],
|
|
55
|
+
});
|
|
56
|
+
for (const spy of spies) {
|
|
57
|
+
assert.equal(spy.mock.calls.length, 0, `${String(spy.mock.calls.length)} unexpected fs calls on the off path`);
|
|
58
|
+
}
|
|
59
|
+
assert.equal(await exists(recognitionIndexPath(dir)), false);
|
|
60
|
+
assert.equal(await loadRecognitionIndex(dir), null);
|
|
61
|
+
} finally {
|
|
62
|
+
for (const spy of spies) spy.mock.restore();
|
|
63
|
+
await rm(dir, { recursive: true, force: true });
|
|
64
|
+
}
|
|
65
|
+
});
|
|
66
|
+
|
|
67
|
+
test("acceptance: gate-on write upserts id so loadRecognitionIndex sees a fresh entry", async () => {
|
|
68
|
+
const dir = await tmpNamespace();
|
|
69
|
+
try {
|
|
70
|
+
await maintainRecognitionIndexAfterWrite({
|
|
71
|
+
memoryDir: dir,
|
|
72
|
+
enabled: true,
|
|
73
|
+
changes: [
|
|
74
|
+
{
|
|
75
|
+
action: "upsert",
|
|
76
|
+
id: "fact-001",
|
|
77
|
+
content: "SSD inference chips in the lab rack.\nRunning the model off a local tier.",
|
|
78
|
+
},
|
|
79
|
+
],
|
|
80
|
+
});
|
|
81
|
+
const index = await loadRecognitionIndex(dir);
|
|
82
|
+
assert.ok(index, "index must exist after an enabled write");
|
|
83
|
+
assert.deepEqual(index.entries, [
|
|
84
|
+
{ id: "fact-001", description: "SSD inference chips in the lab rack." },
|
|
85
|
+
]);
|
|
86
|
+
} finally {
|
|
87
|
+
await rm(dir, { recursive: true, force: true });
|
|
88
|
+
}
|
|
89
|
+
});
|
|
90
|
+
|
|
91
|
+
test("incremental write updates an existing id in place and appends a new id", async () => {
|
|
92
|
+
const dir = await tmpNamespace();
|
|
93
|
+
try {
|
|
94
|
+
await maintainRecognitionIndexAfterWrite({
|
|
95
|
+
memoryDir: dir,
|
|
96
|
+
enabled: true,
|
|
97
|
+
changes: [{ action: "upsert", id: "m-001", content: "first line original" }],
|
|
98
|
+
});
|
|
99
|
+
await maintainRecognitionIndexAfterWrite({
|
|
100
|
+
memoryDir: dir,
|
|
101
|
+
enabled: true,
|
|
102
|
+
changes: [
|
|
103
|
+
{ action: "upsert", id: "m-001", content: "first line rewritten\nbody" },
|
|
104
|
+
{ action: "upsert", id: "m-002", content: "second memory trigger" },
|
|
105
|
+
],
|
|
106
|
+
});
|
|
107
|
+
const index = await loadRecognitionIndex(dir);
|
|
108
|
+
assert.deepEqual(index?.entries, [
|
|
109
|
+
{ id: "m-001", description: "first line rewritten" },
|
|
110
|
+
{ id: "m-002", description: "second memory trigger" },
|
|
111
|
+
]);
|
|
112
|
+
} finally {
|
|
113
|
+
await rm(dir, { recursive: true, force: true });
|
|
114
|
+
}
|
|
115
|
+
});
|
|
116
|
+
|
|
117
|
+
test("remove drops the id; blank ids are ignored without writing", async () => {
|
|
118
|
+
const dir = await tmpNamespace();
|
|
119
|
+
try {
|
|
120
|
+
await maintainRecognitionIndexAfterWrite({
|
|
121
|
+
memoryDir: dir,
|
|
122
|
+
enabled: true,
|
|
123
|
+
changes: [
|
|
124
|
+
{ action: "upsert", id: "keep", content: "kept" },
|
|
125
|
+
{ action: "upsert", id: "drop", content: "gone" },
|
|
126
|
+
],
|
|
127
|
+
});
|
|
128
|
+
await maintainRecognitionIndexAfterWrite({
|
|
129
|
+
memoryDir: dir,
|
|
130
|
+
enabled: true,
|
|
131
|
+
changes: [{ action: "remove", id: "drop" }],
|
|
132
|
+
});
|
|
133
|
+
assert.deepEqual((await loadRecognitionIndex(dir))?.entries, [
|
|
134
|
+
{ id: "keep", description: "kept" },
|
|
135
|
+
]);
|
|
136
|
+
|
|
137
|
+
const before = await fsp.readFile(recognitionIndexPath(dir), "utf8");
|
|
138
|
+
await maintainRecognitionIndexAfterWrite({
|
|
139
|
+
memoryDir: dir,
|
|
140
|
+
enabled: true,
|
|
141
|
+
changes: [{ action: "upsert", id: " ", content: "blank id is dropped" }],
|
|
142
|
+
});
|
|
143
|
+
assert.equal(await fsp.readFile(recognitionIndexPath(dir), "utf8"), before);
|
|
144
|
+
} finally {
|
|
145
|
+
await rm(dir, { recursive: true, force: true });
|
|
146
|
+
}
|
|
147
|
+
});
|
|
148
|
+
|
|
149
|
+
function memory(id: string, content: string): MemoryFile {
|
|
150
|
+
return {
|
|
151
|
+
path: `/tmp/${id}.md`,
|
|
152
|
+
content,
|
|
153
|
+
frontmatter: { id, category: "fact", created: "2026-08-25T00:00:00.000Z", updated: "2026-08-25T00:00:00.000Z", source: "test", confidence: 1, confidenceTier: "explicit", tags: [] },
|
|
154
|
+
};
|
|
155
|
+
}
|
|
156
|
+
|
|
157
|
+
function stubCoordinator(config: PluginConfig) {
|
|
158
|
+
return new PersistenceIndexCoordinator({
|
|
159
|
+
config,
|
|
160
|
+
contentHashIndex: null,
|
|
161
|
+
contentHashIndexForStorage: async () => null,
|
|
162
|
+
contentHashIndexesByStorageDir: new Map(),
|
|
163
|
+
embeddingFallback: { isAvailable: async () => false } as never,
|
|
164
|
+
graphIndexFor: () => {
|
|
165
|
+
throw new Error("graph unused");
|
|
166
|
+
},
|
|
167
|
+
readAllMemoriesForNamespaces: async () => [],
|
|
168
|
+
semanticDedupScopeFor: () => ({}),
|
|
169
|
+
});
|
|
170
|
+
}
|
|
171
|
+
|
|
172
|
+
test("persist-path: enabled writes update the namespace index; disabled stays quiet", async () => {
|
|
173
|
+
const dir = await tmpNamespace();
|
|
174
|
+
const memories = new Map<string, MemoryFile>([
|
|
175
|
+
["fact-ssd", memory("fact-ssd", "Running the model off an SSD tier.\nDetails.")],
|
|
176
|
+
]);
|
|
177
|
+
const storage = {
|
|
178
|
+
dir,
|
|
179
|
+
getMemoryById: async (id: string) => memories.get(id) ?? null,
|
|
180
|
+
getMemoryByIdIncludingArchived: async (id: string) => memories.get(id) ?? null,
|
|
181
|
+
readAllMemories: async () => [...memories.values()],
|
|
182
|
+
readAllColdMemories: async () => [],
|
|
183
|
+
};
|
|
184
|
+
try {
|
|
185
|
+
const off = stubCoordinator(parseConfig({}));
|
|
186
|
+
await off.updateTemporalTagIndexes(storage as never, ["fact-ssd"]);
|
|
187
|
+
assert.equal(await exists(recognitionIndexPath(dir)), false, "off-path persist must not mint an index");
|
|
188
|
+
|
|
189
|
+
const on = stubCoordinator(parseConfig({ recallRecognitionTier: true }));
|
|
190
|
+
await on.updateTemporalTagIndexes(storage as never, ["fact-ssd"]);
|
|
191
|
+
const index = await loadRecognitionIndex(dir);
|
|
192
|
+
assert.deepEqual(index?.entries, [
|
|
193
|
+
{ id: "fact-ssd", description: "Running the model off an SSD tier." },
|
|
194
|
+
]);
|
|
195
|
+
} finally {
|
|
196
|
+
await rm(dir, { recursive: true, force: true });
|
|
197
|
+
}
|
|
198
|
+
});
|
|
199
|
+
|
|
200
|
+
test("persist-path: first post-enable persist bootstraps the active corpus, not just the write", async () => {
|
|
201
|
+
const dir = await tmpNamespace();
|
|
202
|
+
const memories = new Map<string, MemoryFile>([
|
|
203
|
+
["fact-old", memory("fact-old", "Existing SSD rack layout.\nOlder note.")],
|
|
204
|
+
["fact-ssd", memory("fact-ssd", "Running the model off an SSD tier.\nDetails.")],
|
|
205
|
+
]);
|
|
206
|
+
const storage = {
|
|
207
|
+
dir,
|
|
208
|
+
getMemoryById: async (id: string) => memories.get(id) ?? null,
|
|
209
|
+
getMemoryByIdIncludingArchived: async (id: string) => memories.get(id) ?? null,
|
|
210
|
+
readAllMemories: async () => [...memories.values()],
|
|
211
|
+
readAllColdMemories: async () => [],
|
|
212
|
+
};
|
|
213
|
+
try {
|
|
214
|
+
const on = stubCoordinator(parseConfig({ recallRecognitionTier: true }));
|
|
215
|
+
await on.updateTemporalTagIndexes(storage as never, ["fact-ssd"]);
|
|
216
|
+
const index = await loadRecognitionIndex(dir);
|
|
217
|
+
assert.deepEqual(
|
|
218
|
+
index?.entries.map((entry) => entry.id).sort(),
|
|
219
|
+
["fact-old", "fact-ssd"],
|
|
220
|
+
);
|
|
221
|
+
assert.deepEqual(
|
|
222
|
+
index?.entries.find((entry) => entry.id === "fact-old"),
|
|
223
|
+
{ id: "fact-old", description: "Existing SSD rack layout." },
|
|
224
|
+
);
|
|
225
|
+
} finally {
|
|
226
|
+
await rm(dir, { recursive: true, force: true });
|
|
227
|
+
}
|
|
228
|
+
});
|
|
229
|
+
|
|
230
|
+
test("stale recognition-index lock is broken so a later write can publish", async () => {
|
|
231
|
+
const dir = await tmpNamespace();
|
|
232
|
+
const lockDir = `${recognitionIndexPath(dir)}.lock.d`;
|
|
233
|
+
try {
|
|
234
|
+
await fsp.mkdir(lockDir, { recursive: true });
|
|
235
|
+
const stale = new Date(Date.now() - 120_000);
|
|
236
|
+
await fsp.utimes(lockDir, stale, stale);
|
|
237
|
+
await maintainRecognitionIndexAfterWrite({
|
|
238
|
+
memoryDir: dir,
|
|
239
|
+
enabled: true,
|
|
240
|
+
changes: [{ action: "upsert", id: "fact-001", content: "SSD inference chips in the lab rack." }],
|
|
241
|
+
});
|
|
242
|
+
const index = await loadRecognitionIndex(dir);
|
|
243
|
+
assert.deepEqual(index?.entries, [
|
|
244
|
+
{ id: "fact-001", description: "SSD inference chips in the lab rack." },
|
|
245
|
+
]);
|
|
246
|
+
} finally {
|
|
247
|
+
await rm(dir, { recursive: true, force: true });
|
|
248
|
+
}
|
|
249
|
+
});
|
|
@@ -0,0 +1,169 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Recognition-index write-path maintenance (issue #2975).
|
|
3
|
+
*
|
|
4
|
+
* Sibling of recall-recognition-search.ts at the memory write-path seam:
|
|
5
|
+
* when recallRecognitionTier is enabled, a namespace write upserts (or
|
|
6
|
+
* removes) that memory's id in `<memoryDir>/state/index_recognition.json`
|
|
7
|
+
* so the recall slice's loadRecognitionIndex sees a fresh entry. Off-path
|
|
8
|
+
* (`enabled !== true`) returns immediately — zero index I/O.
|
|
9
|
+
*
|
|
10
|
+
* Descriptions: layer 1 has no generator. This slice keeps ids current and
|
|
11
|
+
* fills description from the first non-empty body line (the compact
|
|
12
|
+
* `id: description` form the tier already renders). Discriminability
|
|
13
|
+
* rewrite is a later tidy pass.
|
|
14
|
+
*
|
|
15
|
+
* Serialization matches temporal-index: an in-process op chain per index
|
|
16
|
+
* path plus a directory lock around load → mutate → save. saveRecognitionIndex
|
|
17
|
+
* is single-writer and does not lock on its own.
|
|
18
|
+
*/
|
|
19
|
+
import { promises as fsp } from "node:fs";
|
|
20
|
+
import path from "node:path";
|
|
21
|
+
import { setTimeout as delay } from "node:timers/promises";
|
|
22
|
+
|
|
23
|
+
import {
|
|
24
|
+
buildRecognitionIndex,
|
|
25
|
+
loadRecognitionIndex,
|
|
26
|
+
recognitionIndexPath,
|
|
27
|
+
saveRecognitionIndex,
|
|
28
|
+
type RecognitionIndexEntry,
|
|
29
|
+
} from "../recall-recognition-tier.js";
|
|
30
|
+
|
|
31
|
+
export type RecognitionIndexChange =
|
|
32
|
+
| { readonly action: "upsert"; readonly id: string; readonly content: string }
|
|
33
|
+
| { readonly action: "remove"; readonly id: string };
|
|
34
|
+
|
|
35
|
+
const writeChains = new Map<string, Promise<void>>();
|
|
36
|
+
const LOCK_POLL_MS = 10;
|
|
37
|
+
const LOCK_ATTEMPTS = 50;
|
|
38
|
+
const LOCK_STALE_MS = 60_000;
|
|
39
|
+
|
|
40
|
+
/**
|
|
41
|
+
* First non-empty line of a memory body. Layer 1 has no description
|
|
42
|
+
* generator; this is the compact line the tier already renders.
|
|
43
|
+
*/
|
|
44
|
+
export function recognitionDescriptionFromContent(content: string): string {
|
|
45
|
+
const trimmed = content.trim();
|
|
46
|
+
if (trimmed.length === 0) return "";
|
|
47
|
+
const newline = trimmed.indexOf("\n");
|
|
48
|
+
return newline === -1 ? trimmed : trimmed.slice(0, newline).trimEnd();
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
function withIndexChain<T>(indexPath: string, op: () => Promise<T>): Promise<T> {
|
|
52
|
+
const previous = writeChains.get(indexPath) ?? Promise.resolve();
|
|
53
|
+
const run = previous.then(op, op);
|
|
54
|
+
const tail = run.then(() => undefined, () => undefined);
|
|
55
|
+
writeChains.set(indexPath, tail);
|
|
56
|
+
void tail.then(() => {
|
|
57
|
+
if (writeChains.get(indexPath) === tail) writeChains.delete(indexPath);
|
|
58
|
+
});
|
|
59
|
+
return run;
|
|
60
|
+
}
|
|
61
|
+
|
|
62
|
+
async function removeAbandonedRecognitionLock(
|
|
63
|
+
lockDir: string,
|
|
64
|
+
): Promise<"removed" | "wait" | "blocked"> {
|
|
65
|
+
try {
|
|
66
|
+
const info = await fsp.lstat(lockDir);
|
|
67
|
+
if (info.isSymbolicLink()) return "blocked";
|
|
68
|
+
if (!info.isDirectory()) {
|
|
69
|
+
await fsp.rm(lockDir, { force: true });
|
|
70
|
+
return "removed";
|
|
71
|
+
}
|
|
72
|
+
if (Date.now() - info.mtimeMs < LOCK_STALE_MS) return "wait";
|
|
73
|
+
await fsp.rm(lockDir, { recursive: true, force: true });
|
|
74
|
+
return "removed";
|
|
75
|
+
} catch (error) {
|
|
76
|
+
if ((error as NodeJS.ErrnoException)?.code === "ENOENT") return "removed";
|
|
77
|
+
return "blocked";
|
|
78
|
+
}
|
|
79
|
+
}
|
|
80
|
+
|
|
81
|
+
async function withRecognitionIndexLock<T>(memoryDir: string, op: () => Promise<T>): Promise<T> {
|
|
82
|
+
const lockDir = `${recognitionIndexPath(memoryDir)}.lock.d`;
|
|
83
|
+
for (let attempt = 0; attempt < LOCK_ATTEMPTS; attempt++) {
|
|
84
|
+
try {
|
|
85
|
+
await fsp.mkdir(lockDir);
|
|
86
|
+
try {
|
|
87
|
+
return await op();
|
|
88
|
+
} finally {
|
|
89
|
+
await fsp.rm(lockDir, { recursive: true, force: true }).catch(() => undefined);
|
|
90
|
+
}
|
|
91
|
+
} catch (error) {
|
|
92
|
+
const code = (error as NodeJS.ErrnoException)?.code;
|
|
93
|
+
if (code === "ENOENT") {
|
|
94
|
+
await fsp.mkdir(path.dirname(lockDir), { recursive: true }).catch(() => undefined);
|
|
95
|
+
continue;
|
|
96
|
+
}
|
|
97
|
+
if (code !== "EEXIST") throw error;
|
|
98
|
+
const cleanup = await removeAbandonedRecognitionLock(lockDir);
|
|
99
|
+
if (cleanup === "blocked") {
|
|
100
|
+
throw new Error(`recognition index lock blocked at ${lockDir}`);
|
|
101
|
+
}
|
|
102
|
+
if (cleanup === "removed") continue;
|
|
103
|
+
await delay(LOCK_POLL_MS);
|
|
104
|
+
}
|
|
105
|
+
}
|
|
106
|
+
throw new Error(`recognition index lock timed out at ${lockDir}`);
|
|
107
|
+
}
|
|
108
|
+
|
|
109
|
+
function applyChanges(
|
|
110
|
+
entries: readonly RecognitionIndexEntry[],
|
|
111
|
+
changes: readonly RecognitionIndexChange[],
|
|
112
|
+
): RecognitionIndexEntry[] {
|
|
113
|
+
const next = entries.map((entry) => ({ id: entry.id, description: entry.description }));
|
|
114
|
+
const byId = new Map(next.map((entry, index) => [entry.id, index]));
|
|
115
|
+
for (const change of changes) {
|
|
116
|
+
const id = change.id.trim();
|
|
117
|
+
if (id.length === 0) continue;
|
|
118
|
+
if (change.action === "remove") {
|
|
119
|
+
const index = byId.get(id);
|
|
120
|
+
if (index === undefined) continue;
|
|
121
|
+
next.splice(index, 1);
|
|
122
|
+
byId.delete(id);
|
|
123
|
+
for (const [key, value] of byId) {
|
|
124
|
+
if (value > index) byId.set(key, value - 1);
|
|
125
|
+
}
|
|
126
|
+
continue;
|
|
127
|
+
}
|
|
128
|
+
const description = recognitionDescriptionFromContent(change.content);
|
|
129
|
+
const existing = byId.get(id);
|
|
130
|
+
if (existing !== undefined) {
|
|
131
|
+
next[existing] = { id, description };
|
|
132
|
+
} else {
|
|
133
|
+
byId.set(id, next.length);
|
|
134
|
+
next.push({ id, description });
|
|
135
|
+
}
|
|
136
|
+
}
|
|
137
|
+
return next;
|
|
138
|
+
}
|
|
139
|
+
|
|
140
|
+
function meaningfulChanges(changes: readonly RecognitionIndexChange[]): RecognitionIndexChange[] {
|
|
141
|
+
return changes.filter((change) => change.id.trim().length > 0);
|
|
142
|
+
}
|
|
143
|
+
|
|
144
|
+
/**
|
|
145
|
+
* Incrementally maintain a namespace recognition index after memory writes.
|
|
146
|
+
* `enabled: false` is a proven no-op: no reads, no writes, no locks.
|
|
147
|
+
*/
|
|
148
|
+
export async function maintainRecognitionIndexAfterWrite(args: {
|
|
149
|
+
memoryDir: string;
|
|
150
|
+
enabled: boolean;
|
|
151
|
+
changes: readonly RecognitionIndexChange[];
|
|
152
|
+
}): Promise<void> {
|
|
153
|
+
if (args.enabled !== true) return;
|
|
154
|
+
const changes = meaningfulChanges(args.changes);
|
|
155
|
+
if (changes.length === 0) return;
|
|
156
|
+
|
|
157
|
+
const indexPath = recognitionIndexPath(args.memoryDir);
|
|
158
|
+
await withIndexChain(indexPath, () =>
|
|
159
|
+
withRecognitionIndexLock(args.memoryDir, async () => {
|
|
160
|
+
const loaded = await loadRecognitionIndex(args.memoryDir);
|
|
161
|
+
// `changes` is the full set the caller wants published. Persist-path
|
|
162
|
+
// bootstraps from the active corpus when the file is absent so a
|
|
163
|
+
// first post-enable write cannot mint a 1-id index that recall would
|
|
164
|
+
// treat as authoritative.
|
|
165
|
+
const entries = applyChanges(loaded?.entries ?? [], changes);
|
|
166
|
+
await saveRecognitionIndex(args.memoryDir, buildRecognitionIndex(entries));
|
|
167
|
+
}),
|
|
168
|
+
);
|
|
169
|
+
}
|
package/src/orchestrator.ts
CHANGED
|
@@ -1711,6 +1711,7 @@ export class Orchestrator {
|
|
|
1711
1711
|
removeContentHashForMemory: (targetStorage, memory, context) =>
|
|
1712
1712
|
this.removeContentHashForMemory(targetStorage, memory, context),
|
|
1713
1713
|
saveContentHashIndexes: () => this.saveContentHashIndexes(),
|
|
1714
|
+
getHandleHistory: () => this.handleHistory,
|
|
1714
1715
|
});
|
|
1715
1716
|
this.threading = new ThreadingManager(
|
|
1716
1717
|
path.join(config.memoryDir, "threads"),
|
|
@@ -4,14 +4,11 @@
|
|
|
4
4
|
|
|
5
5
|
import type { PluginConfig } from "../types.js";
|
|
6
6
|
import type { StorageManager } from "../storage.js";
|
|
7
|
-
import type { CausalTrajectoryRecord } from "../causal-trajectory.js";
|
|
8
7
|
import { createHash } from "node:crypto";
|
|
9
8
|
import { mkdir, rm, stat } from "node:fs/promises";
|
|
10
9
|
import path from "node:path";
|
|
11
|
-
import {
|
|
12
|
-
|
|
13
|
-
filterTrajectoriesByLookbackDays,
|
|
14
|
-
} from "../causal-trajectory.js";
|
|
10
|
+
import { readCausalTrajectoryRecords, type CausalTrajectoryRecord } from "../causal-trajectory.js";
|
|
11
|
+
import { collectProcedureMiningRecords } from "../experience/session-experience-mining.js";
|
|
15
12
|
import { buildProcedurePersistBody, normalizeProcedureSteps, type ProcedureStep } from "./procedure-types.js";
|
|
16
13
|
import { clusterByKey } from "./reinforcement-core.js";
|
|
17
14
|
import { log } from "../logger.js";
|
|
@@ -207,7 +204,12 @@ export async function runProcedureMining(options: {
|
|
|
207
204
|
memoryDir: options.memoryDir,
|
|
208
205
|
causalTrajectoryStoreDir: trajectoryDir,
|
|
209
206
|
});
|
|
210
|
-
const recent =
|
|
207
|
+
const recent = await collectProcedureMiningRecords({
|
|
208
|
+
trajectories,
|
|
209
|
+
lookbackDays: cfg.lookbackDays,
|
|
210
|
+
storage: options.storage,
|
|
211
|
+
experienceEnabled: options.config.sessionExperience?.enabled === true,
|
|
212
|
+
});
|
|
211
213
|
|
|
212
214
|
const clusters = clusterByKey(recent, clusterKey);
|
|
213
215
|
|
|
@@ -0,0 +1,97 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Recognition-index write-path subject for the scenario-matrix harness
|
|
3
|
+
* (issue #2975).
|
|
4
|
+
*
|
|
5
|
+
* Every canonical row drives the real maintainRecognitionIndexAfterWrite
|
|
6
|
+
* seam twice: gate off (zero index I/O, no index file) and gate on
|
|
7
|
+
* (the write's id is visible to loadRecognitionIndex). Restart rows
|
|
8
|
+
* reload from disk; replay rows prove an id upsert is idempotent.
|
|
9
|
+
*/
|
|
10
|
+
import assert from "node:assert/strict";
|
|
11
|
+
import os from "node:os";
|
|
12
|
+
import path from "node:path";
|
|
13
|
+
import { promises as fsp } from "node:fs";
|
|
14
|
+
import { mkdtemp, rm } from "node:fs/promises";
|
|
15
|
+
|
|
16
|
+
import { loadRecognitionIndex, recognitionIndexPath } from "../../recall-recognition-tier.js";
|
|
17
|
+
import { maintainRecognitionIndexAfterWrite } from "../../orchestration/recall-recognition-index.js";
|
|
18
|
+
import { type LifecycleSubject, type MatrixRow, runLifecycleMatrix } from "../lifecycle-matrix.js";
|
|
19
|
+
|
|
20
|
+
interface IndexState {
|
|
21
|
+
rowId: string;
|
|
22
|
+
dir: string;
|
|
23
|
+
restart: boolean;
|
|
24
|
+
dedupeOrReplay: boolean;
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
const subject: LifecycleSubject<IndexState> = {
|
|
28
|
+
async setup(row: MatrixRow): Promise<IndexState> {
|
|
29
|
+
const dir = await mkdtemp(path.join(os.tmpdir(), "remnic-recognition-index-subject-"));
|
|
30
|
+
return {
|
|
31
|
+
rowId: String(row.id),
|
|
32
|
+
dir,
|
|
33
|
+
restart: row.dimensions.restart,
|
|
34
|
+
dedupeOrReplay: row.dimensions.dedupeOrReplay,
|
|
35
|
+
};
|
|
36
|
+
},
|
|
37
|
+
|
|
38
|
+
async exercise(state): Promise<void> {
|
|
39
|
+
const id = `fact-${state.rowId}`;
|
|
40
|
+
await maintainRecognitionIndexAfterWrite({
|
|
41
|
+
memoryDir: state.dir,
|
|
42
|
+
enabled: false,
|
|
43
|
+
changes: [{ action: "upsert", id, content: `off-path body for ${state.rowId}` }],
|
|
44
|
+
});
|
|
45
|
+
assert.equal(await loadRecognitionIndex(state.dir), null);
|
|
46
|
+
try {
|
|
47
|
+
await fsp.access(recognitionIndexPath(state.dir));
|
|
48
|
+
assert.fail("off-path must not create the recognition index file");
|
|
49
|
+
} catch (err) {
|
|
50
|
+
assert.equal((err as NodeJS.ErrnoException).code, "ENOENT");
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
await maintainRecognitionIndexAfterWrite({
|
|
54
|
+
memoryDir: state.dir,
|
|
55
|
+
enabled: true,
|
|
56
|
+
changes: [{ action: "upsert", id, content: `SSD inference chips — ${state.rowId}\nbody` }],
|
|
57
|
+
});
|
|
58
|
+
if (state.dedupeOrReplay) {
|
|
59
|
+
await maintainRecognitionIndexAfterWrite({
|
|
60
|
+
memoryDir: state.dir,
|
|
61
|
+
enabled: true,
|
|
62
|
+
changes: [{ action: "upsert", id, content: `SSD inference chips — ${state.rowId} replayed\nbody` }],
|
|
63
|
+
});
|
|
64
|
+
}
|
|
65
|
+
},
|
|
66
|
+
|
|
67
|
+
async invariants(state): Promise<void> {
|
|
68
|
+
const id = `fact-${state.rowId}`;
|
|
69
|
+
const index = await loadRecognitionIndex(state.dir);
|
|
70
|
+
assert.ok(index, "enabled write must persist an index loadable after the row");
|
|
71
|
+
assert.equal(index.entries.length, 1);
|
|
72
|
+
assert.equal(index.entries[0]?.id, id);
|
|
73
|
+
const expected = state.dedupeOrReplay
|
|
74
|
+
? `SSD inference chips — ${state.rowId} replayed`
|
|
75
|
+
: `SSD inference chips — ${state.rowId}`;
|
|
76
|
+
assert.equal(index.entries[0]?.description, expected);
|
|
77
|
+
|
|
78
|
+
if (state.restart) {
|
|
79
|
+
const reloaded = await loadRecognitionIndex(state.dir);
|
|
80
|
+
assert.deepEqual(reloaded, index, "restart must see the same on-disk index");
|
|
81
|
+
}
|
|
82
|
+
|
|
83
|
+
const before = { ...index };
|
|
84
|
+
await maintainRecognitionIndexAfterWrite({
|
|
85
|
+
memoryDir: state.dir,
|
|
86
|
+
enabled: false,
|
|
87
|
+
changes: [{ action: "remove", id }],
|
|
88
|
+
});
|
|
89
|
+
assert.deepEqual(await loadRecognitionIndex(state.dir), before, "off-path after on-path must not mutate the index");
|
|
90
|
+
},
|
|
91
|
+
|
|
92
|
+
async teardown(state): Promise<void> {
|
|
93
|
+
await rm(state.dir, { recursive: true, force: true });
|
|
94
|
+
},
|
|
95
|
+
};
|
|
96
|
+
|
|
97
|
+
runLifecycleMatrix("recall-recognition-index", subject);
|
package/src/types.ts
CHANGED
|
@@ -23,6 +23,7 @@ import type {
|
|
|
23
23
|
import type { DeepRecallSettings } from "./deep-recall-config.js";
|
|
24
24
|
import type { RecallNavigationSettings } from "./recall-navigation-config.js";
|
|
25
25
|
import type { RecognitionTierSettings } from "./recall-recognition-tier.js";
|
|
26
|
+
import type { SeedGraduationSettings } from "./lifecycle/seed-graduation-config-types.js";
|
|
26
27
|
import type { ProceduralMaintenanceConfig } from "./procedural/maintenance-config.js";
|
|
27
28
|
import type { SkillProjectionConfig } from "./procedural/skill-projection.js";
|
|
28
29
|
import type { SessionExperienceConfig } from "./experience/session-experience-config.js";
|
|
@@ -698,6 +699,7 @@ export interface PluginConfig
|
|
|
698
699
|
DeepRecallSettings,
|
|
699
700
|
RecallNavigationSettings,
|
|
700
701
|
RecognitionTierSettings,
|
|
702
|
+
SeedGraduationSettings,
|
|
701
703
|
LocalLlmConfig {
|
|
702
704
|
openaiApiKey: string | undefined;
|
|
703
705
|
openaiBaseUrl: string | undefined;
|
|
@@ -3877,12 +3879,8 @@ export interface HourlySummary {
|
|
|
3877
3879
|
generatedAt: string;
|
|
3878
3880
|
}
|
|
3879
3881
|
|
|
3880
|
-
//
|
|
3881
|
-
//
|
|
3882
|
-
// ============================================================================
|
|
3883
|
-
// Re-export from the authoritative source to avoid duplicate definitions.
|
|
3884
|
-
// dreams-ledger.ts is the single source of truth; types.ts re-exports so
|
|
3885
|
-
// callers that import from types.js continue to work unchanged.
|
|
3882
|
+
// Dreams Pipeline Telemetry (issue #678 PR 3/4). Re-export from
|
|
3883
|
+
// dreams-ledger.ts so callers importing types.js stay unchanged.
|
|
3886
3884
|
export type {
|
|
3887
3885
|
DreamsPhase,
|
|
3888
3886
|
DreamsPhaseStatus,
|