@remnic/core 9.69.49 → 9.69.51
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 +15 -14
- package/dist/access-admin-ops-surface.js +33 -33
- package/dist/access-audit.d.ts +1 -0
- package/dist/access-audit.js +2 -2
- package/dist/access-authorization-probe.d.ts +15 -14
- package/dist/access-authorization-probe.js +34 -34
- package/dist/access-boundary.d.ts +15 -14
- package/dist/access-boundary.js +33 -33
- package/dist/access-cli.js +97 -95
- package/dist/access-cli.js.map +1 -1
- package/dist/access-coding-context-resolution.d.ts +2 -1
- package/dist/access-extraction-force-flush.d.ts +15 -14
- package/dist/access-extraction-force-flush.js +33 -33
- package/dist/access-health-types.d.ts +2 -1
- package/dist/access-http-briefing.d.ts +15 -14
- package/dist/access-http-briefing.js +34 -34
- package/dist/access-http-lcm-compaction.d.ts +15 -14
- package/dist/access-http-lifecycle-flush.d.ts +15 -14
- package/dist/access-http-offline-stream.d.ts +15 -14
- package/dist/access-http-query.d.ts +3 -2
- package/dist/access-http-query.js +35 -35
- package/dist/access-http.d.ts +16 -15
- package/dist/access-http.js +53 -53
- package/dist/access-identity-continuity-surface.d.ts +12 -11
- package/dist/access-identity-continuity-surface.js +33 -33
- package/dist/access-lcm-surface.d.ts +15 -14
- package/dist/access-lcm-surface.js +33 -33
- package/dist/access-mcp-output-schemas.js +1 -1
- package/dist/access-mcp-shared-context-tools.d.ts +15 -14
- package/dist/access-mcp.d.ts +15 -14
- package/dist/access-mcp.js +44 -44
- package/dist/access-memory-search-fanout.d.ts +3 -2
- package/dist/{access-namespace-preflight-DqRw_g-8.d.ts → access-namespace-preflight-C1q3XuAc.d.ts} +1 -1
- package/dist/access-namespace-preflight.d.ts +4 -3
- package/dist/access-namespace-preflight.js +33 -33
- package/dist/access-observe-transcript.d.ts +12 -11
- package/dist/access-observe-write-category.d.ts +4 -3
- package/dist/access-observe-write-category.js +4 -4
- package/dist/access-observe-write-surface.d.ts +15 -14
- package/dist/access-observe-write-surface.js +33 -33
- package/dist/access-offline-manifest.d.ts +12 -11
- package/dist/access-operations-batch.js +35 -35
- package/dist/access-operations.d.ts +15 -14
- package/dist/access-operations.js +42 -42
- package/dist/access-recall-concurrency.d.ts +15 -14
- package/dist/access-recall-concurrency.js +33 -33
- package/dist/access-recall-response.d.ts +15 -14
- package/dist/access-recall-response.js +33 -33
- package/dist/access-recall-surface.d.ts +16 -15
- package/dist/access-recall-surface.js +33 -33
- package/dist/access-schema.d.ts +2 -1
- package/dist/access-schema.js +3 -3
- package/dist/{access-service-70VHaltr.d.ts → access-service-BZaC-RZw.d.ts} +9 -9
- package/dist/access-service-helpers.d.ts +15 -14
- package/dist/access-service.d.ts +15 -14
- package/dist/access-service.js +33 -33
- package/dist/access-surface-catalog.d.ts +15 -14
- package/dist/access-surface-catalog.js +35 -35
- package/dist/access-wearables-meetings-surface.d.ts +5 -4
- package/dist/action-confidence.d.ts +2 -1
- package/dist/active-memory-bridge.d.ts +2 -1
- package/dist/active-recall.d.ts +2 -1
- package/dist/active-recall.js +3 -2
- package/dist/active-recall.js.map +1 -1
- package/dist/activity/digest.d.ts +2 -1
- package/dist/ambient-provenance.d.ts +2 -1
- package/dist/artifact-search.d.ts +2 -1
- package/dist/background-generation.d.ts +2 -1
- package/dist/behavior-learner.d.ts +2 -1
- package/dist/behavior-signals.d.ts +2 -1
- package/dist/bootstrap.d.ts +12 -11
- package/dist/briefing-window.d.ts +3 -2
- package/dist/briefing.d.ts +3 -2
- package/dist/briefing.js +8 -8
- package/dist/buffer-surprise-report.d.ts +2 -1
- package/dist/buffer-turn-helpers.d.ts +2 -1
- package/dist/buffer.d.ts +3 -2
- package/dist/bulk-import/index.d.ts +4 -3
- package/dist/calibration.d.ts +2 -1
- package/dist/capabilities.d.ts +2 -1
- package/dist/{capsule-crypto-7FJQINUR.js → capsule-crypto-YO5QJ6L3.js} +2 -2
- package/dist/{catalog-Byi9prz9.d.ts → catalog-DK2eHhax.d.ts} +1 -1
- package/dist/causal-behavior.d.ts +2 -1
- package/dist/causal-consolidation.d.ts +2 -1
- package/dist/causal-consolidation.js +9 -9
- package/dist/causal-trajectory-graph.d.ts +2 -1
- package/dist/{chunk-6DYCSSHN.js → chunk-25HSEIEM.js} +2 -2
- package/dist/{chunk-PAQ7YGJY.js → chunk-2EICZYIG.js} +2 -2
- package/dist/{chunk-2IVHOQRY.js → chunk-2ERLN25A.js} +2 -2
- package/dist/{chunk-TUSY4KRE.js → chunk-2G2CVN2T.js} +29 -28
- package/dist/{chunk-TUSY4KRE.js.map → chunk-2G2CVN2T.js.map} +1 -1
- package/dist/{chunk-EST3J4LX.js → chunk-2SZBCM2S.js} +2 -2
- package/dist/{chunk-UB4UVALS.js → chunk-33SX6K3N.js} +2 -2
- package/dist/{chunk-P36WML7L.js → chunk-3QZRSEAM.js} +2 -2
- package/dist/chunk-4KQIWY4A.js +197 -0
- package/dist/chunk-4KQIWY4A.js.map +1 -0
- package/dist/{chunk-LBLXEFWK.js → chunk-4MN27537.js} +1 -1
- package/dist/chunk-4MN27537.js.map +1 -0
- package/dist/{chunk-JI5Q6EOY.js → chunk-6HCJWCA4.js} +5 -5
- package/dist/chunk-6VITOSPL.js +69 -0
- package/dist/chunk-6VITOSPL.js.map +1 -0
- package/dist/{chunk-OTGIAJQ2.js → chunk-6Z4OLQUO.js} +2 -2
- package/dist/{chunk-DHTOYRDE.js → chunk-6ZMIASYT.js} +2 -2
- package/dist/{chunk-UD6W67JM.js → chunk-72AV2H3R.js} +76 -25
- package/dist/chunk-72AV2H3R.js.map +1 -0
- package/dist/{chunk-KHLNIDWB.js → chunk-7TTOX6NW.js} +2 -2
- package/dist/{chunk-7VTQETLT.js → chunk-A33DLYNY.js} +2 -2
- package/dist/{chunk-QQA6VTOY.js → chunk-AH3OIMS7.js} +2 -2
- package/dist/{chunk-T3F2HWIG.js → chunk-AIVRD66I.js} +2 -2
- package/dist/{chunk-RBHQA2UU.js → chunk-BMAYH7F4.js} +487 -343
- package/dist/chunk-BMAYH7F4.js.map +1 -0
- package/dist/{chunk-WHSNLCRO.js → chunk-BULK6DGB.js} +2 -2
- package/dist/{chunk-2NLLXCJG.js → chunk-BXLOS5AJ.js} +2 -2
- package/dist/{chunk-K26LFJE4.js → chunk-CKBA2MWS.js} +2 -2
- package/dist/{chunk-TVVEYCNW.js → chunk-DAOMWGO2.js} +2 -2
- package/dist/{chunk-E64HBW7M.js → chunk-DLXBMXIB.js} +2 -2
- package/dist/{chunk-X7Y7WX73.js → chunk-DQEMWVMT.js} +1 -1
- package/dist/{chunk-T3OLYUU6.js → chunk-DQSVGTKB.js} +2 -2
- package/dist/{chunk-4WSR7MYV.js → chunk-DX63RFDJ.js} +2 -2
- package/dist/{chunk-SNOAFXKX.js → chunk-EBJL6HGR.js} +12 -4
- package/dist/chunk-EBJL6HGR.js.map +1 -0
- package/dist/{chunk-LX32KV2C.js → chunk-ETNC6TT6.js} +2 -2
- package/dist/{chunk-UE7L4EDU.js → chunk-HEKWNWNL.js} +3 -3
- package/dist/{chunk-ZDGSHXJU.js → chunk-IGDEKECC.js} +1 -1
- package/dist/{chunk-YKWWG3CM.js → chunk-ISA5U5AP.js} +2 -2
- package/dist/{chunk-3MX4GWJO.js → chunk-JGPG5UHM.js} +2 -2
- package/dist/{chunk-U3ZRHNNG.js → chunk-JHUODJRW.js} +2 -2
- package/dist/{chunk-5WIGM42T.js → chunk-JXSOB3SA.js} +2 -2
- package/dist/{chunk-YOC3EEZH.js → chunk-KAPYPTPS.js} +16 -16
- package/dist/{chunk-AOMVOC2E.js → chunk-KBHDV7P3.js} +3 -3
- package/dist/{chunk-2WMXZYMS.js → chunk-LIAKZGOY.js} +2 -2
- package/dist/{chunk-A7GQBJP5.js → chunk-LVFI5LG7.js} +7 -7
- package/dist/{chunk-EHUUXLLA.js → chunk-LX7KIJQF.js} +2 -2
- package/dist/{chunk-BHXY5FXL.js → chunk-LZI6FWZW.js} +8 -2
- package/dist/chunk-LZI6FWZW.js.map +1 -0
- package/dist/{chunk-EBLKS57G.js → chunk-MNF6PTNL.js} +2 -2
- package/dist/{chunk-LE2UESGS.js → chunk-MYDA2GA2.js} +2 -2
- package/dist/{chunk-XQFHKPNB.js → chunk-NROI5XMG.js} +2 -2
- package/dist/{chunk-N57PUWUE.js → chunk-NVW5ISEJ.js} +40 -40
- package/dist/{chunk-PSQRBCGR.js → chunk-NXSNFPYI.js} +2 -2
- package/dist/{chunk-LLFMZYFS.js → chunk-O4JFBEUL.js} +2 -2
- package/dist/{chunk-JVM3CEGL.js → chunk-OIK3YL2P.js} +3 -3
- package/dist/{chunk-C3YEB7CR.js → chunk-PLJ2MQFT.js} +7 -7
- package/dist/{chunk-DNAD57VY.js → chunk-PQWICTRO.js} +1 -1
- package/dist/chunk-PQWICTRO.js.map +1 -0
- package/dist/{chunk-Z2OKRO3E.js → chunk-PYTSGD5M.js} +2 -2
- package/dist/{chunk-VBRS7Z3O.js → chunk-Q6OC4UUT.js} +2 -2
- package/dist/{chunk-ZYZW46HZ.js → chunk-QRSC37NC.js} +5 -5
- package/dist/{chunk-AJLQH4RO.js → chunk-RIP2AOZW.js} +9 -9
- package/dist/{chunk-SYJZUVTN.js → chunk-SCM4VYJW.js} +3 -3
- package/dist/{chunk-76RTJ533.js → chunk-SMI2G3MA.js} +3 -3
- package/dist/{chunk-6VLOKESS.js → chunk-ST7FDKZT.js} +12 -2
- package/dist/chunk-ST7FDKZT.js.map +1 -0
- package/dist/{chunk-WGCASEEQ.js → chunk-SZ75IB2T.js} +2 -2
- package/dist/{chunk-FLZJMXFV.js → chunk-T73ZC7C5.js} +2 -2
- package/dist/{chunk-FVRZDZ7J.js → chunk-TNFDWJRS.js} +2 -2
- package/dist/{chunk-WNMVUWI7.js → chunk-TTFJQ5B5.js} +2 -2
- package/dist/{chunk-HIBNECBQ.js → chunk-UP3226JC.js} +6 -6
- package/dist/{chunk-NDWBT2VV.js → chunk-UVEBBXB5.js} +2 -2
- package/dist/{chunk-KQAFEZQX.js → chunk-VDX2J7OX.js} +2 -2
- package/dist/{chunk-AIKUSXIS.js → chunk-VLR4S5GF.js} +7 -7
- package/dist/{chunk-ZHXSOMYH.js → chunk-VVX5PZFS.js} +2 -2
- package/dist/{chunk-HS75MCQF.js → chunk-WUUGE7QC.js} +4 -4
- package/dist/{chunk-RS53SDCA.js → chunk-X25NTN3W.js} +2 -2
- package/dist/{chunk-PZHN7R35.js → chunk-XFXVIXDI.js} +2 -2
- package/dist/{chunk-YA5M7OC4.js → chunk-XHDQQ2TT.js} +2 -2
- package/dist/{chunk-IIDXU2CY.js → chunk-XRUOO7OT.js} +2 -2
- package/dist/{chunk-WVI43D54.js → chunk-YEIKOBOW.js} +15 -2
- package/dist/chunk-YEIKOBOW.js.map +1 -0
- package/dist/{chunk-JUOJGZPV.js → chunk-YIIW2OH2.js} +2 -2
- package/dist/{chunk-SKYYPVBW.js → chunk-YJJMJH6J.js} +8 -8
- package/dist/{cli-CdJiBilM.d.ts → cli-BHDMJqJS.d.ts} +5 -5
- package/dist/cli.d.ts +17 -16
- package/dist/cli.js +76 -75
- package/dist/coding/export-okf-codegraph.d.ts +2 -1
- package/dist/coding/export-okf-codegraph.js +7 -7
- package/dist/coding/pre-action-gate.d.ts +2 -1
- package/dist/compounding/engine.d.ts +3 -2
- package/dist/compounding/engine.js +8 -8
- package/dist/compounding/preference-consolidator.d.ts +2 -1
- package/dist/compression-optimizer.d.ts +2 -1
- package/dist/config.d.ts +2 -1
- package/dist/config.js +3 -2
- package/dist/connectors/codex-materialize-runner.d.ts +2 -1
- package/dist/connectors/codex-materialize-runner.js +8 -8
- package/dist/connectors/codex-materialize.d.ts +2 -1
- package/dist/connectors/index.d.ts +2 -1
- package/dist/connectors/index.js +8 -8
- package/dist/consolidation-provenance-check.d.ts +3 -2
- package/dist/consolidation-undo.d.ts +3 -2
- package/dist/contradiction/index.d.ts +5 -4
- package/dist/converge-config.d.ts +2 -1
- package/dist/convergence-refresh.d.ts +3 -2
- package/dist/convergence-refresh.js +10 -10
- package/dist/conversation-index/backend.d.ts +2 -1
- package/dist/conversation-index/chunker.d.ts +2 -1
- package/dist/conversation-index/faiss-adapter.d.ts +2 -1
- package/dist/conversation-index/indexer.d.ts +2 -1
- package/dist/conversation-index/search.d.ts +2 -1
- package/dist/corpus-watermark.d.ts +2 -1
- package/dist/corpus-watermark.js +10 -10
- package/dist/cross-lingual-recall.d.ts +2 -1
- package/dist/day-summary.d.ts +2 -1
- package/dist/deep-recall-http-glue.d.ts +15 -14
- package/dist/deep-recall-http-glue.js +4 -4
- package/dist/deep-recall-mcp-tools.d.ts +15 -14
- package/dist/deep-recall-policy-llm.d.ts +3 -2
- package/dist/deep-recall-seeds.d.ts +2 -1
- package/dist/deep-recall.js +2 -2
- package/dist/delinearize.d.ts +2 -1
- package/dist/dependency-propagation-config.d.ts +2 -1
- package/dist/{dependency-propagation-delivery-BgHy44WX.d.ts → dependency-propagation-delivery-BMkR4gmY.d.ts} +1 -1
- package/dist/direct-answer-wiring.d.ts +2 -1
- package/dist/direct-answer.d.ts +2 -1
- package/dist/directory-sidecars.d.ts +28 -2
- package/dist/directory-sidecars.js +9 -1
- package/dist/embedding-fallback.d.ts +2 -1
- package/dist/enrichment/index.d.ts +2 -1
- package/dist/entity-origin-fields.d.ts +2 -1
- package/dist/entity-retrieval.d.ts +3 -2
- package/dist/entity-retrieval.js +8 -8
- package/dist/entity-schema.d.ts +2 -1
- package/dist/episodic-context.d.ts +2 -1
- package/dist/eval-trajectory-contracts.d.ts +2 -1
- package/dist/eval-trajectory-store.d.ts +2 -1
- package/dist/eval-trajectory.d.ts +2 -1
- package/dist/explicit-capture.d.ts +12 -11
- package/dist/external-wiki-access.d.ts +15 -14
- package/dist/external-wiki-access.js +34 -34
- package/dist/external-wiki-collection-registration.d.ts +2 -1
- package/dist/external-wiki-collection.d.ts +2 -1
- package/dist/external-wiki-mcp-tools.d.ts +15 -14
- package/dist/extraction-error-classification.d.ts +2 -1
- package/dist/extraction-evidence-class.d.ts +2 -1
- package/dist/extraction-faithfulness.d.ts +3 -2
- package/dist/extraction-judge-telemetry.d.ts +3 -2
- package/dist/extraction-judge-training.d.ts +3 -2
- package/dist/extraction-judge.d.ts +3 -2
- package/dist/extraction-liveness.d.ts +2 -1
- package/dist/extraction-normalization.d.ts +2 -1
- package/dist/extraction-prompt.d.ts +2 -1
- package/dist/extraction-source-grounding-rules.d.ts +2 -1
- package/dist/extraction-source-grounding.d.ts +2 -1
- package/dist/extraction-span-config.d.ts +2 -1
- package/dist/extraction-span-materialize.d.ts +2 -1
- package/dist/extraction-span-wire.d.ts +2 -1
- package/dist/extraction.d.ts +3 -2
- package/dist/extraction.js +8 -8
- package/dist/fallback-llm-codex-subscription.d.ts +2 -1
- package/dist/fallback-llm.d.ts +2 -1
- package/dist/{generic-recall-paths-BoueWXYr.d.ts → generic-recall-paths-BCRtXU32.d.ts} +1 -1
- package/dist/graph-append-error.d.ts +2 -1
- package/dist/graph-dashboard-diff.d.ts +2 -1
- package/dist/graph-dashboard-key.d.ts +2 -1
- package/dist/graph-dashboard-parser.d.ts +2 -1
- package/dist/graph-edge-reinforcement.d.ts +2 -1
- package/dist/graph-jsonl.d.ts +2 -1
- package/dist/graph-path-reconstruction.d.ts +2 -1
- package/dist/graph-path-scoring.d.ts +2 -1
- package/dist/graph-snapshot.d.ts +2 -1
- package/dist/graph.d.ts +2 -1
- package/dist/harmonic-retrieval.js +1 -1
- package/dist/importance.d.ts +2 -1
- package/dist/importers/index.d.ts +2 -1
- package/dist/importers/test-utils.d.ts +2 -1
- package/dist/in-flight-reads.d.ts +2 -1
- package/dist/{index-cwbrXoxe.d.ts → index-DMNTW4W6.d.ts} +3 -3
- package/dist/index.d.ts +29 -26
- package/dist/index.js +149 -103
- package/dist/intent.d.ts +2 -1
- package/dist/lcm/engine.d.ts +2 -1
- package/dist/lcm/engine.js +3 -3
- package/dist/lcm/index.d.ts +2 -1
- package/dist/lcm/index.js +11 -11
- package/dist/lcm/tools.d.ts +2 -1
- package/dist/lifecycle.d.ts +2 -1
- package/dist/live-connectors-runner.d.ts +2 -1
- package/dist/{local-llm-B0vd_rp9.d.ts → local-llm-BXYC-mbU.d.ts} +1 -1
- package/dist/local-llm-helpers.d.ts +3 -2
- package/dist/local-llm.d.ts +3 -2
- package/dist/local-model-endpoint.d.ts +2 -1
- package/dist/location/index.d.ts +6 -5
- package/dist/location/index.js +10 -10
- package/dist/maintenance/memory-governance.d.ts +2 -1
- package/dist/maintenance/memory-governance.js +8 -8
- package/dist/maintenance/rebuild-memory-lifecycle-ledger.d.ts +3 -2
- package/dist/maintenance/rebuild-memory-lifecycle-ledger.js +8 -8
- package/dist/maintenance/rebuild-memory-projection.d.ts +3 -2
- package/dist/maintenance/rebuild-memory-projection.js +9 -9
- package/dist/{maintenance-DJgQkoLh.d.ts → maintenance-zJiLsKBY.d.ts} +3 -3
- package/dist/mcp-memory-inspector-app.d.ts +15 -14
- package/dist/memory-action-policy.d.ts +2 -1
- package/dist/memory-browse-http-glue.d.ts +15 -14
- package/dist/memory-browse-mcp-tools.d.ts +15 -14
- package/dist/memory-browse-operations.js +34 -34
- package/dist/memory-browse.d.ts +2 -1
- package/dist/memory-browse.js +3 -3
- package/dist/memory-cache.d.ts +2 -1
- package/dist/memory-controller.d.ts +2 -1
- package/dist/memory-lifecycle-ledger-utils.d.ts +2 -1
- package/dist/memory-projection-store.d.ts +2 -1
- package/dist/memory-provenance.d.ts +2 -1
- package/dist/memory-snapshot.d.ts +2 -1
- package/dist/memory-subject-cli.d.ts +15 -14
- package/dist/memory-subject.d.ts +15 -14
- package/dist/memory-worth-outcomes.d.ts +3 -2
- package/dist/models-json.d.ts +2 -1
- package/dist/namespaces/migrate.d.ts +4 -3
- package/dist/namespaces/migrate.js +9 -9
- package/dist/namespaces/principal.d.ts +2 -1
- package/dist/namespaces/search.d.ts +2 -1
- package/dist/namespaces/search.js +4 -4
- package/dist/namespaces/storage.d.ts +4 -3
- package/dist/namespaces/storage.js +8 -8
- package/dist/native-knowledge.d.ts +2 -1
- package/dist/offline-sync-impression-drain.d.ts +2 -1
- package/dist/operator-doctor-corpus.d.ts +2 -1
- package/dist/operator-doctor-corpus.js +11 -11
- package/dist/operator-doctor-replica.d.ts +2 -1
- package/dist/operator-toolkit.d.ts +4 -3
- package/dist/operator-toolkit.js +19 -18
- package/dist/orchestration/compression-guideline-coordinator.d.ts +3 -2
- package/dist/orchestration/maintenance.d.ts +5 -4
- package/dist/orchestration/maintenance.js +16 -16
- package/dist/{orchestrator-Kx5zwNUm.d.ts → orchestrator-BTqT3F6X.d.ts} +10 -10
- package/dist/orchestrator.d.ts +12 -11
- package/dist/orchestrator.js +97 -95
- package/dist/patterns-cli.d.ts +2 -1
- package/dist/{pipeline-9SYxxign.d.ts → pipeline-CgO2Sd4O.d.ts} +1 -1
- package/dist/policy-runtime.d.ts +2 -1
- package/dist/proactive-contention.d.ts +3 -2
- package/dist/provenance.d.ts +2 -1
- package/dist/{public-http-Bvol6Jr4.d.ts → public-http-Dk1EA9ix.d.ts} +1 -1
- package/dist/{qmd-DjwuG9Xa.d.ts → qmd-CwxtVz64.d.ts} +1 -1
- package/dist/qmd-preflight.d.ts +3 -2
- package/dist/qmd-recall-cache.d.ts +2 -1
- package/dist/qmd.d.ts +3 -2
- package/dist/recall-audit-anomaly.d.ts +1 -0
- package/dist/recall-audit.d.ts +4 -0
- package/dist/recall-audit.js +1 -1
- package/dist/recall-composition-decision.d.ts +41 -0
- package/dist/recall-composition-decision.js +17 -0
- package/dist/recall-composition-decision.js.map +1 -0
- package/dist/recall-concurrency-config.d.ts +2 -1
- package/dist/recall-disclosure-escalation.d.ts +2 -1
- package/dist/recall-explain-renderer.d.ts +3 -1
- package/dist/recall-explain-renderer.js +3 -3
- package/dist/recall-memory-map.d.ts +2 -1
- package/dist/recall-navigate-access.d.ts +2 -1
- package/dist/recall-navigate-access.js +2 -2
- package/dist/recall-navigate-disclosure.d.ts +2 -1
- package/dist/recall-navigate-disclosure.js +2 -2
- package/dist/recall-navigate.d.ts +2 -1
- package/dist/recall-navigate.js +2 -2
- package/dist/recall-navigation-http-glue.d.ts +15 -14
- package/dist/recall-navigation-mcp-tools.d.ts +15 -14
- package/dist/recall-navigation-operations.js +34 -34
- package/dist/recall-navigation-renderer.d.ts +3 -1
- package/dist/recall-navigation.d.ts +3 -1
- package/dist/recall-navigation.js +33 -33
- package/dist/recall-planner-llm.d.ts +2 -1
- package/dist/recall-recognition-tier.d.ts +121 -0
- package/dist/recall-recognition-tier.js +42 -0
- package/dist/recall-recognition-tier.js.map +1 -0
- package/dist/recall-state-view-admission.d.ts +3 -2
- package/dist/recall-state-view-admission.js +3 -3
- package/dist/recall-state-view-anchors.d.ts +2 -1
- package/dist/recall-state.d.ts +2 -1
- package/dist/recall-tag-filter.d.ts +3 -1
- package/dist/recall-timings.d.ts +2 -1
- package/dist/recall-xray-cli.d.ts +3 -1
- package/dist/recall-xray-cli.js +4 -4
- package/dist/recall-xray-renderer.d.ts +3 -1
- package/dist/recall-xray-renderer.js +3 -3
- package/dist/recall-xray.d.ts +11 -1
- package/dist/recall-xray.js +2 -2
- package/dist/reconcile/cursor.d.ts +2 -1
- package/dist/reconcile/manifest.d.ts +2 -1
- package/dist/reconcile/plan.d.ts +2 -1
- package/dist/replay/normalizers/chatgpt.d.ts +2 -1
- package/dist/replay/normalizers/claude.d.ts +2 -1
- package/dist/replay/normalizers/openclaw.d.ts +2 -1
- package/dist/replay/normalizers/shared.d.ts +2 -1
- package/dist/replay/runner.d.ts +2 -1
- package/dist/replay/types.d.ts +2 -1
- package/dist/replica-divergence.d.ts +2 -1
- package/dist/replica-peers-config.d.ts +2 -1
- package/dist/resolve-auth-token.d.ts +2 -1
- package/dist/resume-bundles.js +4 -3
- package/dist/retrieval-agents.d.ts +3 -2
- package/dist/retrieval-tiers.d.ts +2 -1
- package/dist/routing/engine.d.ts +2 -1
- package/dist/routing/store.d.ts +2 -1
- package/dist/salvage-envelope.d.ts +2 -1
- package/dist/{scope-profiles-DPegZtRf.d.ts → scope-profiles-Bg1rB-Dp.d.ts} +1 -1
- package/dist/search/embed-helper.d.ts +2 -1
- package/dist/search/factory.d.ts +2 -1
- package/dist/search/factory.js +3 -3
- package/dist/search/index.d.ts +2 -1
- package/dist/search/index.js +7 -7
- package/dist/search/lancedb-backend.d.ts +2 -1
- package/dist/search/meilisearch-backend.d.ts +2 -1
- package/dist/search/noop-backend.d.ts +2 -1
- package/dist/search/orama-backend.d.ts +2 -1
- package/dist/search/port.d.ts +2 -1
- package/dist/search/remote-backend.d.ts +2 -1
- package/dist/{semantic-consolidation-DMzhKRYl.d.ts → semantic-consolidation-DEzRyeyn.d.ts} +1 -1
- package/dist/semantic-consolidation.d.ts +3 -2
- package/dist/semantic-consolidation.js +9 -9
- package/dist/semantic-rule-promotion.js +8 -8
- package/dist/semantic-rule-verifier.d.ts +2 -1
- package/dist/semantic-rule-verifier.js +8 -8
- package/dist/{service-E99KuPvi.d.ts → service-DGEIDOeD.d.ts} +2 -2
- package/dist/session-observer-bands.d.ts +2 -1
- package/dist/session-observer-state.d.ts +2 -1
- package/dist/shared-context/manager.d.ts +2 -1
- package/dist/signal.d.ts +2 -1
- package/dist/source-agent-qualifier.d.ts +2 -1
- package/dist/source-agent-qualifier.js +8 -8
- package/dist/standup/build.js +8 -8
- package/dist/{storage-BS7ux8F7.d.ts → storage-DNQWtOSM.d.ts} +1 -1
- package/dist/storage.d.ts +3 -2
- package/dist/storage.js +7 -7
- package/dist/subject-config.d.ts +2 -1
- package/dist/summarizer.d.ts +2 -1
- package/dist/summary-snapshot.d.ts +2 -1
- package/dist/support-passport/index.d.ts +18 -17
- package/dist/support-passport/index.js +36 -36
- package/dist/{tagging-BhOEcSXP.d.ts → tagging-CPVwgadt.d.ts} +2 -2
- package/dist/temporal-supersession.d.ts +3 -2
- package/dist/temporal-timeline-recall.d.ts +2 -1
- package/dist/temporal-validity.d.ts +2 -1
- package/dist/threading.d.ts +2 -1
- package/dist/tier-migration.d.ts +3 -2
- package/dist/tier-routing.d.ts +2 -1
- package/dist/topics.d.ts +2 -1
- package/dist/transcript.d.ts +2 -1
- package/dist/transfer/backup.js +2 -2
- package/dist/transfer/capsule-export.js +2 -2
- package/dist/transfer/capsule-import.js +2 -2
- package/dist/transfer/export-okf.d.ts +2 -1
- package/dist/transfer/export-okf.js +8 -8
- package/dist/trust-score-stage.d.ts +2 -1
- package/dist/trust-score.d.ts +2 -1
- package/dist/{types-DQ2H8gAC.d.ts → types-DCB90q3g.d.ts} +2 -1
- package/dist/types.d.ts +2 -1
- package/dist/types.js +1 -1
- package/dist/utility-runtime.d.ts +2 -1
- package/dist/verified-recall.js +8 -8
- package/dist/who-knows-cli.d.ts +15 -14
- package/dist/who-knows-cli.js +9 -9
- package/dist/who-knows.d.ts +15 -14
- package/dist/who-knows.js +8 -8
- package/dist/write-envelope.d.ts +2 -1
- package/package.json +2 -2
- package/src/access-mcp-output-schemas.ts +14 -1
- package/src/access-recall-response.ts +3 -0
- package/src/config.ts +5 -0
- package/src/directory-sidecars.test.ts +119 -0
- package/src/directory-sidecars.ts +110 -25
- package/src/experience/session-experience-recall.test.ts +228 -0
- package/src/experience/session-experience-recall.ts +60 -0
- package/src/index.ts +2 -0
- package/src/lifecycle/seed-graduation.test.ts +424 -0
- package/src/lifecycle/seed-graduation.ts +376 -0
- package/src/orchestration/recall-entry.ts +16 -2
- package/src/orchestration/recall-internal.ts +21 -18
- package/src/orchestration/recall-recognition-search.test.ts +290 -0
- package/src/orchestration/recall-recognition-search.ts +160 -0
- package/src/procedural/procedure-recall.ts +14 -3
- package/src/recall-audit.test.ts +34 -0
- package/src/recall-audit.ts +4 -0
- package/src/recall-composition-decision.test.ts +134 -0
- package/src/recall-composition-decision.ts +113 -0
- package/src/recall-recognition-tier.test.ts +306 -0
- package/src/recall-recognition-tier.ts +375 -0
- package/src/recall-xray-renderer.test.ts +17 -0
- package/src/recall-xray-renderer.ts +10 -0
- package/src/recall-xray.test.ts +28 -0
- package/src/recall-xray.ts +15 -0
- package/src/testing/subjects/recall-recognition-tier.test.ts +106 -0
- package/src/testing/subjects/seed-graduation.test.ts +128 -0
- package/src/types.ts +2 -0
- package/dist/chunk-6VLOKESS.js.map +0 -1
- package/dist/chunk-BHXY5FXL.js.map +0 -1
- package/dist/chunk-DNAD57VY.js.map +0 -1
- package/dist/chunk-LBLXEFWK.js.map +0 -1
- package/dist/chunk-RBHQA2UU.js.map +0 -1
- package/dist/chunk-SNOAFXKX.js.map +0 -1
- package/dist/chunk-UD6W67JM.js.map +0 -1
- package/dist/chunk-WVI43D54.js.map +0 -1
- /package/dist/{capsule-crypto-7FJQINUR.js.map → capsule-crypto-YO5QJ6L3.js.map} +0 -0
- /package/dist/{chunk-6DYCSSHN.js.map → chunk-25HSEIEM.js.map} +0 -0
- /package/dist/{chunk-PAQ7YGJY.js.map → chunk-2EICZYIG.js.map} +0 -0
- /package/dist/{chunk-2IVHOQRY.js.map → chunk-2ERLN25A.js.map} +0 -0
- /package/dist/{chunk-EST3J4LX.js.map → chunk-2SZBCM2S.js.map} +0 -0
- /package/dist/{chunk-UB4UVALS.js.map → chunk-33SX6K3N.js.map} +0 -0
- /package/dist/{chunk-P36WML7L.js.map → chunk-3QZRSEAM.js.map} +0 -0
- /package/dist/{chunk-JI5Q6EOY.js.map → chunk-6HCJWCA4.js.map} +0 -0
- /package/dist/{chunk-OTGIAJQ2.js.map → chunk-6Z4OLQUO.js.map} +0 -0
- /package/dist/{chunk-DHTOYRDE.js.map → chunk-6ZMIASYT.js.map} +0 -0
- /package/dist/{chunk-KHLNIDWB.js.map → chunk-7TTOX6NW.js.map} +0 -0
- /package/dist/{chunk-7VTQETLT.js.map → chunk-A33DLYNY.js.map} +0 -0
- /package/dist/{chunk-QQA6VTOY.js.map → chunk-AH3OIMS7.js.map} +0 -0
- /package/dist/{chunk-T3F2HWIG.js.map → chunk-AIVRD66I.js.map} +0 -0
- /package/dist/{chunk-WHSNLCRO.js.map → chunk-BULK6DGB.js.map} +0 -0
- /package/dist/{chunk-2NLLXCJG.js.map → chunk-BXLOS5AJ.js.map} +0 -0
- /package/dist/{chunk-K26LFJE4.js.map → chunk-CKBA2MWS.js.map} +0 -0
- /package/dist/{chunk-TVVEYCNW.js.map → chunk-DAOMWGO2.js.map} +0 -0
- /package/dist/{chunk-E64HBW7M.js.map → chunk-DLXBMXIB.js.map} +0 -0
- /package/dist/{chunk-X7Y7WX73.js.map → chunk-DQEMWVMT.js.map} +0 -0
- /package/dist/{chunk-T3OLYUU6.js.map → chunk-DQSVGTKB.js.map} +0 -0
- /package/dist/{chunk-4WSR7MYV.js.map → chunk-DX63RFDJ.js.map} +0 -0
- /package/dist/{chunk-LX32KV2C.js.map → chunk-ETNC6TT6.js.map} +0 -0
- /package/dist/{chunk-UE7L4EDU.js.map → chunk-HEKWNWNL.js.map} +0 -0
- /package/dist/{chunk-ZDGSHXJU.js.map → chunk-IGDEKECC.js.map} +0 -0
- /package/dist/{chunk-YKWWG3CM.js.map → chunk-ISA5U5AP.js.map} +0 -0
- /package/dist/{chunk-3MX4GWJO.js.map → chunk-JGPG5UHM.js.map} +0 -0
- /package/dist/{chunk-U3ZRHNNG.js.map → chunk-JHUODJRW.js.map} +0 -0
- /package/dist/{chunk-5WIGM42T.js.map → chunk-JXSOB3SA.js.map} +0 -0
- /package/dist/{chunk-YOC3EEZH.js.map → chunk-KAPYPTPS.js.map} +0 -0
- /package/dist/{chunk-AOMVOC2E.js.map → chunk-KBHDV7P3.js.map} +0 -0
- /package/dist/{chunk-2WMXZYMS.js.map → chunk-LIAKZGOY.js.map} +0 -0
- /package/dist/{chunk-A7GQBJP5.js.map → chunk-LVFI5LG7.js.map} +0 -0
- /package/dist/{chunk-EHUUXLLA.js.map → chunk-LX7KIJQF.js.map} +0 -0
- /package/dist/{chunk-EBLKS57G.js.map → chunk-MNF6PTNL.js.map} +0 -0
- /package/dist/{chunk-LE2UESGS.js.map → chunk-MYDA2GA2.js.map} +0 -0
- /package/dist/{chunk-XQFHKPNB.js.map → chunk-NROI5XMG.js.map} +0 -0
- /package/dist/{chunk-N57PUWUE.js.map → chunk-NVW5ISEJ.js.map} +0 -0
- /package/dist/{chunk-PSQRBCGR.js.map → chunk-NXSNFPYI.js.map} +0 -0
- /package/dist/{chunk-LLFMZYFS.js.map → chunk-O4JFBEUL.js.map} +0 -0
- /package/dist/{chunk-JVM3CEGL.js.map → chunk-OIK3YL2P.js.map} +0 -0
- /package/dist/{chunk-C3YEB7CR.js.map → chunk-PLJ2MQFT.js.map} +0 -0
- /package/dist/{chunk-Z2OKRO3E.js.map → chunk-PYTSGD5M.js.map} +0 -0
- /package/dist/{chunk-VBRS7Z3O.js.map → chunk-Q6OC4UUT.js.map} +0 -0
- /package/dist/{chunk-ZYZW46HZ.js.map → chunk-QRSC37NC.js.map} +0 -0
- /package/dist/{chunk-AJLQH4RO.js.map → chunk-RIP2AOZW.js.map} +0 -0
- /package/dist/{chunk-SYJZUVTN.js.map → chunk-SCM4VYJW.js.map} +0 -0
- /package/dist/{chunk-76RTJ533.js.map → chunk-SMI2G3MA.js.map} +0 -0
- /package/dist/{chunk-WGCASEEQ.js.map → chunk-SZ75IB2T.js.map} +0 -0
- /package/dist/{chunk-FLZJMXFV.js.map → chunk-T73ZC7C5.js.map} +0 -0
- /package/dist/{chunk-FVRZDZ7J.js.map → chunk-TNFDWJRS.js.map} +0 -0
- /package/dist/{chunk-WNMVUWI7.js.map → chunk-TTFJQ5B5.js.map} +0 -0
- /package/dist/{chunk-HIBNECBQ.js.map → chunk-UP3226JC.js.map} +0 -0
- /package/dist/{chunk-NDWBT2VV.js.map → chunk-UVEBBXB5.js.map} +0 -0
- /package/dist/{chunk-KQAFEZQX.js.map → chunk-VDX2J7OX.js.map} +0 -0
- /package/dist/{chunk-AIKUSXIS.js.map → chunk-VLR4S5GF.js.map} +0 -0
- /package/dist/{chunk-ZHXSOMYH.js.map → chunk-VVX5PZFS.js.map} +0 -0
- /package/dist/{chunk-HS75MCQF.js.map → chunk-WUUGE7QC.js.map} +0 -0
- /package/dist/{chunk-RS53SDCA.js.map → chunk-X25NTN3W.js.map} +0 -0
- /package/dist/{chunk-PZHN7R35.js.map → chunk-XFXVIXDI.js.map} +0 -0
- /package/dist/{chunk-YA5M7OC4.js.map → chunk-XHDQQ2TT.js.map} +0 -0
- /package/dist/{chunk-IIDXU2CY.js.map → chunk-XRUOO7OT.js.map} +0 -0
- /package/dist/{chunk-JUOJGZPV.js.map → chunk-YIIW2OH2.js.map} +0 -0
- /package/dist/{chunk-SKYYPVBW.js.map → chunk-YJJMJH6J.js.map} +0 -0
|
@@ -0,0 +1,376 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Corroboration-graduated seed memories (issue #2974) — foundation layer.
|
|
3
|
+
*
|
|
4
|
+
* A `pending_review` memory is a SEED: it must not enter active recall on its
|
|
5
|
+
* own say-so. This module decides, deterministically, when later evidence has
|
|
6
|
+
* corroborated a seed enough to graduate it to `active` in place:
|
|
7
|
+
*
|
|
8
|
+
* - corroboration is token-coverage similarity (same recall tokenizer the
|
|
9
|
+
* wearable trust pipeline uses — no LLM on this path),
|
|
10
|
+
* - the corroborating memory must come from an INDEPENDENT provenance: a
|
|
11
|
+
* different session than the seed's, a different source when session
|
|
12
|
+
* anchors are absent, and never a lineage descendant of the seed,
|
|
13
|
+
* - echo is suppressed: when the caller can show the evidence's session
|
|
14
|
+
* RECALLED the seed (the store's own content quoted back), that evidence
|
|
15
|
+
* never counts — otherwise recall would manufacture its own confirmation.
|
|
16
|
+
*
|
|
17
|
+
* Promotion itself reuses the existing in-place `pending_review -> active`
|
|
18
|
+
* machinery (`StorageManager.promoteWearableMemory`, the same status flip the
|
|
19
|
+
* wearable cross-device corroboration path uses) — no parallel write path.
|
|
20
|
+
* Every graduation stamps the corroborating evidence ids on the promoted row
|
|
21
|
+
* (audit surface; the lifecycle ledger already records the status transition).
|
|
22
|
+
*
|
|
23
|
+
* Foundation scope: the gate, the pass, and the config parser. Wiring the key
|
|
24
|
+
* into `parseConfig` (config.ts sits at its size ratchet), the conservative
|
|
25
|
+
* preset pin, scheduling inside the lifecycle sweep, contradiction holds, and
|
|
26
|
+
* the docs/manifest surface are follow-up layers on this issue.
|
|
27
|
+
*/
|
|
28
|
+
|
|
29
|
+
import { normalizeRecallTokens } from "../recall-tokenization.js";
|
|
30
|
+
import { stripAttributesSuffix } from "../storage.js";
|
|
31
|
+
import { STRUCTURED_ATTRIBUTE_LIMITS } from "../write-envelope.js";
|
|
32
|
+
import { excludeSupportPassportPrivateMemories } from "../support-passport/card-projection.js";
|
|
33
|
+
import type { MemoryFile, MemoryFrontmatter, MemoryStatus } from "../types.js";
|
|
34
|
+
|
|
35
|
+
// ---------------------------------------------------------------------------
|
|
36
|
+
// Config
|
|
37
|
+
// ---------------------------------------------------------------------------
|
|
38
|
+
|
|
39
|
+
export interface SeedGraduationConfig {
|
|
40
|
+
/** Master gate. Default false: review-mode stays the only promotion path. */
|
|
41
|
+
enabled: boolean;
|
|
42
|
+
/**
|
|
43
|
+
* Independent corroborating memories required before a seed graduates.
|
|
44
|
+
* `Infinity` is not a config value — `enabled: false` is the disabled state.
|
|
45
|
+
*/
|
|
46
|
+
minCorroborations: number;
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
export const SEED_GRADUATION_DEFAULTS: SeedGraduationConfig = {
|
|
50
|
+
enabled: false,
|
|
51
|
+
minCorroborations: 2,
|
|
52
|
+
};
|
|
53
|
+
|
|
54
|
+
const SEED_GRADUATION_MAX_CORROBORATIONS = 50;
|
|
55
|
+
|
|
56
|
+
const BOOLEAN_LIKE: Record<string, boolean> = {
|
|
57
|
+
true: true, "1": true, yes: true, on: true,
|
|
58
|
+
false: false, "0": false, no: false, off: false,
|
|
59
|
+
};
|
|
60
|
+
|
|
61
|
+
function parseFlag(src: Record<string, unknown>, key: string, fallback: boolean): boolean {
|
|
62
|
+
const raw = src[key];
|
|
63
|
+
if (raw === undefined || raw === null) return fallback;
|
|
64
|
+
if (typeof raw === "boolean") return raw;
|
|
65
|
+
const coerced = BOOLEAN_LIKE[String(raw).toLowerCase()];
|
|
66
|
+
if (coerced === undefined) {
|
|
67
|
+
throw new Error(
|
|
68
|
+
`seedGraduation.${key} must be a boolean or one of "true"/"false"/"1"/"0"/"yes"/"no"/"on"/"off" (got ${JSON.stringify(raw)}).`,
|
|
69
|
+
);
|
|
70
|
+
}
|
|
71
|
+
return coerced;
|
|
72
|
+
}
|
|
73
|
+
|
|
74
|
+
/**
|
|
75
|
+
* Strict parse (reject, never silently default — same contract as
|
|
76
|
+
* `driftDetection`). Invalid values throw at config load.
|
|
77
|
+
*/
|
|
78
|
+
export function parseSeedGraduationConfig(raw: unknown): SeedGraduationConfig {
|
|
79
|
+
if (raw === undefined || raw === null) return { ...SEED_GRADUATION_DEFAULTS };
|
|
80
|
+
if (typeof raw !== "object" || Array.isArray(raw)) {
|
|
81
|
+
throw new Error(
|
|
82
|
+
`seedGraduation must be an object (got ${JSON.stringify(raw)}). Omit the key to keep seed graduation disabled (issue #2974).`,
|
|
83
|
+
);
|
|
84
|
+
}
|
|
85
|
+
const src = raw as Record<string, unknown>;
|
|
86
|
+
const rawMin = src.minCorroborations;
|
|
87
|
+
let minCorroborations = SEED_GRADUATION_DEFAULTS.minCorroborations;
|
|
88
|
+
if (rawMin !== undefined && rawMin !== null) {
|
|
89
|
+
const n = typeof rawMin === "number" ? rawMin : Number(rawMin);
|
|
90
|
+
if (!Number.isInteger(n) || n < 1 || n > SEED_GRADUATION_MAX_CORROBORATIONS) {
|
|
91
|
+
throw new Error(
|
|
92
|
+
`seedGraduation.minCorroborations must be an integer in [1, ${SEED_GRADUATION_MAX_CORROBORATIONS}] (got ${JSON.stringify(rawMin)}). Use enabled: false to disable graduation.`,
|
|
93
|
+
);
|
|
94
|
+
}
|
|
95
|
+
minCorroborations = n;
|
|
96
|
+
}
|
|
97
|
+
return {
|
|
98
|
+
enabled: parseFlag(src, "enabled", SEED_GRADUATION_DEFAULTS.enabled),
|
|
99
|
+
minCorroborations,
|
|
100
|
+
};
|
|
101
|
+
}
|
|
102
|
+
|
|
103
|
+
// ---------------------------------------------------------------------------
|
|
104
|
+
// Gate
|
|
105
|
+
// ---------------------------------------------------------------------------
|
|
106
|
+
|
|
107
|
+
/**
|
|
108
|
+
* Fraction of the seed's tokens an evidence memory must carry to count as
|
|
109
|
+
* restating it. Mirrors the wearable trust pipeline's existing-memory
|
|
110
|
+
* support coverage (`MEMORY_SUPPORT_COVERAGE` = 0.7).
|
|
111
|
+
*/
|
|
112
|
+
const SEED_CORROBORATION_COVERAGE = 0.7;
|
|
113
|
+
|
|
114
|
+
/** Below this many distinct tokens a seed cannot be corroborated deterministically. */
|
|
115
|
+
const MIN_SEED_TOKENS = 4;
|
|
116
|
+
|
|
117
|
+
/** Structured-attribute key carrying the writing session's anchor, when known. */
|
|
118
|
+
const SESSION_ANCHOR_KEY = "sessionKey";
|
|
119
|
+
|
|
120
|
+
/** Reads a session anchor from frontmatter attributes; absent when unknown. */
|
|
121
|
+
function sessionAnchor(frontmatter: MemoryFrontmatter): string | undefined {
|
|
122
|
+
const value = frontmatter.structuredAttributes?.[SESSION_ANCHOR_KEY];
|
|
123
|
+
return typeof value === "string" && value.length > 0 ? value : undefined;
|
|
124
|
+
}
|
|
125
|
+
|
|
126
|
+
function createdMs(memory: MemoryFile): number {
|
|
127
|
+
const ms = Date.parse(memory.frontmatter.created);
|
|
128
|
+
return Number.isFinite(ms) ? ms : Number.NaN;
|
|
129
|
+
}
|
|
130
|
+
|
|
131
|
+
/** Evidence rows eligible to corroborate: active or also awaiting review. */
|
|
132
|
+
function isEvidenceStatus(status: MemoryStatus | undefined): boolean {
|
|
133
|
+
return status === undefined || status === "active" || status === "pending_review";
|
|
134
|
+
}
|
|
135
|
+
|
|
136
|
+
function hasLineageLink(seed: MemoryFile, evidence: MemoryFile): boolean {
|
|
137
|
+
const seedLineage = seed.frontmatter.lineage;
|
|
138
|
+
if (seedLineage !== undefined && seedLineage.includes(evidence.frontmatter.id)) return true;
|
|
139
|
+
const evidenceLineage = evidence.frontmatter.lineage;
|
|
140
|
+
if (evidenceLineage !== undefined && evidenceLineage.includes(seed.frontmatter.id)) return true;
|
|
141
|
+
return false;
|
|
142
|
+
}
|
|
143
|
+
|
|
144
|
+
/**
|
|
145
|
+
* Deterministic independence test. A seed can never corroborate itself, so
|
|
146
|
+
* every anchor the two rows share disqualifies the evidence (fail closed):
|
|
147
|
+
*
|
|
148
|
+
* - lineage descent either way is derivation, not corroboration;
|
|
149
|
+
* - when both rows carry session anchors, the SAME session that wrote the
|
|
150
|
+
* seed cannot corroborate it;
|
|
151
|
+
* - without session anchors, provenance identity falls back to the source
|
|
152
|
+
* string — identical provenance is never independent.
|
|
153
|
+
*/
|
|
154
|
+
function isIndependentProvenance(seed: MemoryFile, evidence: MemoryFile): boolean {
|
|
155
|
+
if (hasLineageLink(seed, evidence)) return false;
|
|
156
|
+
const seedSession = sessionAnchor(seed.frontmatter);
|
|
157
|
+
const evidenceSession = sessionAnchor(evidence.frontmatter);
|
|
158
|
+
if (seedSession !== undefined && evidenceSession !== undefined) {
|
|
159
|
+
return seedSession !== evidenceSession;
|
|
160
|
+
}
|
|
161
|
+
return evidence.frontmatter.source !== seed.frontmatter.source;
|
|
162
|
+
}
|
|
163
|
+
|
|
164
|
+
/** Reads the token coverage of `seed`'s tokens inside `evidence`'s body. */
|
|
165
|
+
function coverageOf(seedTokens: ReadonlySet<string>, evidence: MemoryFile): number {
|
|
166
|
+
if (seedTokens.size === 0) return 0;
|
|
167
|
+
const evidenceTokens = new Set(normalizeRecallTokens(stripAttributesSuffix(evidence.content)));
|
|
168
|
+
let matches = 0;
|
|
169
|
+
for (const token of seedTokens) {
|
|
170
|
+
if (evidenceTokens.has(token)) matches += 1;
|
|
171
|
+
}
|
|
172
|
+
return matches / seedTokens.size;
|
|
173
|
+
}
|
|
174
|
+
|
|
175
|
+
/**
|
|
176
|
+
* Per-session recall history seam, satisfied by
|
|
177
|
+
* `RecallHandleHistoryStore.recent(sessionKey)`: the memory-id sets a session
|
|
178
|
+
* has recalled, newest first. Used ONLY to suppress echo — a session that
|
|
179
|
+
* recalled the seed and then produced a lookalike memory confirmed nothing.
|
|
180
|
+
*/
|
|
181
|
+
export type SeedRecallEchoLookup = (sessionKey: string) => readonly (readonly string[])[];
|
|
182
|
+
|
|
183
|
+
export interface SeedGraduationEvidenceRef {
|
|
184
|
+
memoryId: string;
|
|
185
|
+
source: string;
|
|
186
|
+
}
|
|
187
|
+
|
|
188
|
+
export interface SeedGraduationEvaluation {
|
|
189
|
+
decision: "promote" | "hold";
|
|
190
|
+
corroborationCount: number;
|
|
191
|
+
corroborating: SeedGraduationEvidenceRef[];
|
|
192
|
+
/** Evidence that restated the seed but was excluded as echo/derivation. */
|
|
193
|
+
echoSuppressedCount: number;
|
|
194
|
+
reasons: string[];
|
|
195
|
+
}
|
|
196
|
+
|
|
197
|
+
export interface SeedGraduationGateOptions {
|
|
198
|
+
config?: SeedGraduationConfig;
|
|
199
|
+
recalledBySession?: SeedRecallEchoLookup;
|
|
200
|
+
}
|
|
201
|
+
|
|
202
|
+
export function evaluateSeedGraduation(
|
|
203
|
+
seed: MemoryFile,
|
|
204
|
+
evidence: readonly MemoryFile[],
|
|
205
|
+
options: SeedGraduationGateOptions = {},
|
|
206
|
+
): SeedGraduationEvaluation {
|
|
207
|
+
const config = options.config ?? SEED_GRADUATION_DEFAULTS;
|
|
208
|
+
if (!config.enabled) {
|
|
209
|
+
return {
|
|
210
|
+
decision: "hold",
|
|
211
|
+
corroborationCount: 0,
|
|
212
|
+
corroborating: [],
|
|
213
|
+
echoSuppressedCount: 0,
|
|
214
|
+
reasons: ["seed-graduation-disabled"],
|
|
215
|
+
};
|
|
216
|
+
}
|
|
217
|
+
const seedTokens = new Set(normalizeRecallTokens(stripAttributesSuffix(seed.content)));
|
|
218
|
+
if (seedTokens.size < MIN_SEED_TOKENS) {
|
|
219
|
+
return {
|
|
220
|
+
decision: "hold",
|
|
221
|
+
corroborationCount: 0,
|
|
222
|
+
corroborating: [],
|
|
223
|
+
echoSuppressedCount: 0,
|
|
224
|
+
reasons: ["seed-too-short-for-deterministic-corroboration"],
|
|
225
|
+
};
|
|
226
|
+
}
|
|
227
|
+
|
|
228
|
+
const seedCreated = createdMs(seed);
|
|
229
|
+
const corroborating: SeedGraduationEvidenceRef[] = [];
|
|
230
|
+
const reasons: string[] = [];
|
|
231
|
+
let echoSuppressedCount = 0;
|
|
232
|
+
|
|
233
|
+
for (const candidate of evidence) {
|
|
234
|
+
if (candidate.frontmatter.id === seed.frontmatter.id) continue;
|
|
235
|
+
// Only LATER evidence graduates a seed — anything written at or before
|
|
236
|
+
// the seed's creation is contemporaneous, not corroborating.
|
|
237
|
+
const candidateCreated = createdMs(candidate);
|
|
238
|
+
if (!Number.isFinite(seedCreated) || !Number.isFinite(candidateCreated)) continue;
|
|
239
|
+
if (candidateCreated <= seedCreated) continue;
|
|
240
|
+
if (!isEvidenceStatus(candidate.frontmatter.status)) continue;
|
|
241
|
+
if (coverageOf(seedTokens, candidate) < SEED_CORROBORATION_COVERAGE) continue;
|
|
242
|
+
|
|
243
|
+
if (!isIndependentProvenance(seed, candidate)) {
|
|
244
|
+
echoSuppressedCount += 1;
|
|
245
|
+
continue;
|
|
246
|
+
}
|
|
247
|
+
const evidenceSession = sessionAnchor(candidate.frontmatter);
|
|
248
|
+
if (
|
|
249
|
+
options.recalledBySession !== undefined &&
|
|
250
|
+
evidenceSession !== undefined &&
|
|
251
|
+
options
|
|
252
|
+
.recalledBySession(evidenceSession)
|
|
253
|
+
.some((recalledIds) => recalledIds.includes(seed.frontmatter.id))
|
|
254
|
+
) {
|
|
255
|
+
// The store's own recalled content quoted back never counts.
|
|
256
|
+
echoSuppressedCount += 1;
|
|
257
|
+
continue;
|
|
258
|
+
}
|
|
259
|
+
corroborating.push({ memoryId: candidate.frontmatter.id, source: candidate.frontmatter.source });
|
|
260
|
+
}
|
|
261
|
+
|
|
262
|
+
if (echoSuppressedCount > 0) reasons.push(`echo-suppressed:${echoSuppressedCount}`);
|
|
263
|
+
if (corroborating.length >= config.minCorroborations) {
|
|
264
|
+
return {
|
|
265
|
+
decision: "promote",
|
|
266
|
+
corroborationCount: corroborating.length,
|
|
267
|
+
corroborating,
|
|
268
|
+
echoSuppressedCount,
|
|
269
|
+
reasons,
|
|
270
|
+
};
|
|
271
|
+
}
|
|
272
|
+
reasons.push(`corroboration-below-min:${corroborating.length}/${config.minCorroborations}`);
|
|
273
|
+
return {
|
|
274
|
+
decision: "hold",
|
|
275
|
+
corroborationCount: corroborating.length,
|
|
276
|
+
corroborating,
|
|
277
|
+
echoSuppressedCount,
|
|
278
|
+
reasons,
|
|
279
|
+
};
|
|
280
|
+
}
|
|
281
|
+
|
|
282
|
+
// ---------------------------------------------------------------------------
|
|
283
|
+
// Pass
|
|
284
|
+
// ---------------------------------------------------------------------------
|
|
285
|
+
|
|
286
|
+
/**
|
|
287
|
+
* Narrow storage seam satisfied by `StorageManager`. Promotion reuses the
|
|
288
|
+
* existing in-place `pending_review -> active` machinery rather than adding
|
|
289
|
+
* a parallel write path.
|
|
290
|
+
*/
|
|
291
|
+
export interface SeedGraduationStorage {
|
|
292
|
+
promoteWearableMemory(
|
|
293
|
+
id: string,
|
|
294
|
+
attributeUpdates: Record<string, string>,
|
|
295
|
+
confidence?: number,
|
|
296
|
+
): Promise<boolean>;
|
|
297
|
+
}
|
|
298
|
+
|
|
299
|
+
export interface SeedGraduationPassInput {
|
|
300
|
+
/** Full memory corpus for the namespace being swept (same input the lifecycle policy pass takes). */
|
|
301
|
+
memories: readonly MemoryFile[];
|
|
302
|
+
storage: SeedGraduationStorage;
|
|
303
|
+
config?: SeedGraduationConfig;
|
|
304
|
+
recalledBySession?: SeedRecallEchoLookup;
|
|
305
|
+
}
|
|
306
|
+
|
|
307
|
+
export interface SeedGraduationPassSummary {
|
|
308
|
+
evaluated: number;
|
|
309
|
+
promoted: number;
|
|
310
|
+
held: number;
|
|
311
|
+
echoSuppressed: number;
|
|
312
|
+
disabled: boolean;
|
|
313
|
+
}
|
|
314
|
+
|
|
315
|
+
/** Audit attribute stamped on every graduated row, naming the evidence. */
|
|
316
|
+
function graduationAttributes(evaluation: SeedGraduationEvaluation): Record<string, string> {
|
|
317
|
+
const ids = evaluation.corroborating
|
|
318
|
+
.map((entry) => entry.memoryId)
|
|
319
|
+
.join(",")
|
|
320
|
+
.slice(0, STRUCTURED_ATTRIBUTE_LIMITS.maxValueLength);
|
|
321
|
+
return {
|
|
322
|
+
graduatedBy: "independent-corroboration",
|
|
323
|
+
corroborationCount: String(evaluation.corroborationCount),
|
|
324
|
+
corroboratingMemoryIds: ids,
|
|
325
|
+
};
|
|
326
|
+
}
|
|
327
|
+
|
|
328
|
+
/**
|
|
329
|
+
* Sweep every `pending_review` seed and graduate the corroborated ones.
|
|
330
|
+
* Zero behavior while disabled (default) — review-mode promotion is
|
|
331
|
+
* untouched until an operator opts in.
|
|
332
|
+
*/
|
|
333
|
+
export async function runSeedGraduationPass(
|
|
334
|
+
input: SeedGraduationPassInput,
|
|
335
|
+
): Promise<SeedGraduationPassSummary> {
|
|
336
|
+
const config = input.config ?? SEED_GRADUATION_DEFAULTS;
|
|
337
|
+
if (!config.enabled) {
|
|
338
|
+
return { evaluated: 0, promoted: 0, held: 0, echoSuppressed: 0, disabled: true };
|
|
339
|
+
}
|
|
340
|
+
const corpus = excludeSupportPassportPrivateMemories(input.memories);
|
|
341
|
+
const evidencePool = corpus.filter((memory) => isEvidenceStatus(memory.frontmatter.status));
|
|
342
|
+
|
|
343
|
+
let promoted = 0;
|
|
344
|
+
let held = 0;
|
|
345
|
+
let echoSuppressed = 0;
|
|
346
|
+
let evaluated = 0;
|
|
347
|
+
|
|
348
|
+
for (const seed of corpus) {
|
|
349
|
+
if (seed.frontmatter.status !== "pending_review") continue;
|
|
350
|
+
// Tombstone-blocked rows need revokeTombstone first; the promotion
|
|
351
|
+
// method refuses them anyway, so skip before evaluating.
|
|
352
|
+
if (seed.frontmatter.blockedBy !== undefined) continue;
|
|
353
|
+
evaluated += 1;
|
|
354
|
+
|
|
355
|
+
const evaluation = evaluateSeedGraduation(seed, evidencePool, {
|
|
356
|
+
config,
|
|
357
|
+
recalledBySession: input.recalledBySession,
|
|
358
|
+
});
|
|
359
|
+
echoSuppressed += evaluation.echoSuppressedCount;
|
|
360
|
+
|
|
361
|
+
if (evaluation.decision === "hold") {
|
|
362
|
+
held += 1;
|
|
363
|
+
continue;
|
|
364
|
+
}
|
|
365
|
+
// A concurrent review resolution wins: promoteWearableMemory returns
|
|
366
|
+
// false when the row is no longer pending_review.
|
|
367
|
+
const wrote = await input.storage.promoteWearableMemory(
|
|
368
|
+
seed.frontmatter.id,
|
|
369
|
+
graduationAttributes(evaluation),
|
|
370
|
+
);
|
|
371
|
+
if (wrote) promoted += 1;
|
|
372
|
+
else held += 1;
|
|
373
|
+
}
|
|
374
|
+
|
|
375
|
+
return { evaluated, promoted, held, echoSuppressed, disabled: false };
|
|
376
|
+
}
|
|
@@ -22,7 +22,12 @@ import type { RecallResultFormatter } from "./recall-result-formatter.js";
|
|
|
22
22
|
import type { IdentityInjectionMode, PluginConfig, QmdSearchResult } from "../types.js";
|
|
23
23
|
import { stateViewPacketActive } from "../recall-state-view-anchors.js";
|
|
24
24
|
import { resultStateViewKey, stateViewPacketKeys } from "../recall-state-view.js";
|
|
25
|
-
|
|
25
|
+
import { applyRecallStateViews } from "../recall-state-view-wire.js";
|
|
26
|
+
import { composeRecallContext } from "../recall-context-composition.js";
|
|
27
|
+
import {
|
|
28
|
+
notifyContextComposition,
|
|
29
|
+
recallFailureComposition,
|
|
30
|
+
} from "../recall-composition-decision.js";
|
|
26
31
|
|
|
27
32
|
export interface RecallEntryDeps {
|
|
28
33
|
appendRecallSection(
|
|
@@ -197,7 +202,16 @@ export class RecallEntryCoordinator {
|
|
|
197
202
|
// endTrace() is safe here: if no trace is active (disabled or already
|
|
198
203
|
// closed by recallInternal's try/finally), it returns null immediately.
|
|
199
204
|
this.deps.profiler.endTrace();
|
|
200
|
-
|
|
205
|
+
// Caller-cancelled recalls stay quiet: the failure was the caller's
|
|
206
|
+
// abort, not a recall degradation (issue #2972 contract).
|
|
207
|
+
const missing = options.abortSignal?.aborted
|
|
208
|
+
? null
|
|
209
|
+
: recallFailureComposition(err);
|
|
210
|
+
if (!missing) return "";
|
|
211
|
+
notifyContextComposition(options.onContextComposition, missing, (observerErr) => {
|
|
212
|
+
log.warn("recall: context composition observer failed open", observerErr);
|
|
213
|
+
});
|
|
214
|
+
return composeRecallContext(missing);
|
|
201
215
|
} finally {
|
|
202
216
|
options.abortSignal?.removeEventListener("abort", onAbort);
|
|
203
217
|
}
|
|
@@ -45,9 +45,14 @@ import { buildQmdRecallCacheKey, getCachedQmdRecall, setCachedQmdRecall } from "
|
|
|
45
45
|
import { MEMORY_ID_PATTERN } from "../recall-handles.js";
|
|
46
46
|
import { shouldRecordRecallAuthorityHistory } from "../recall-navigation-config.js";
|
|
47
47
|
import {
|
|
48
|
-
|
|
48
|
+
contextBudgetForFooter,
|
|
49
49
|
formatCuriosityFooter, renderAuthorityBoundContent, selectCuriosityQuestion,
|
|
50
50
|
} from "../recall-context-composition.js";
|
|
51
|
+
import {
|
|
52
|
+
compactRecallContextFromBuckets,
|
|
53
|
+
decideRecallContextComposition,
|
|
54
|
+
notifyContextComposition,
|
|
55
|
+
} from "../recall-composition-decision.js";
|
|
51
56
|
import {
|
|
52
57
|
createBoundedCoreSectionRunner,
|
|
53
58
|
createRecallSectionMetricRecorder,
|
|
@@ -110,6 +115,7 @@ import {
|
|
|
110
115
|
import type { RecallInternalDeps } from "./recall-internal-deps.js";
|
|
111
116
|
import { appendEpisodicContextSection } from "./episodic-context-section.js";
|
|
112
117
|
import { resolveCompositeProfileStorage } from "./recall-profile-storage.js";
|
|
118
|
+
import { fetchQmdMemoryResultsWithRecognitionSwap } from "./recall-recognition-search.js";
|
|
113
119
|
|
|
114
120
|
export class RecallInternalCoordinator {
|
|
115
121
|
private readonly securityCapabilities: SecurityCapabilitySet;
|
|
@@ -2141,7 +2147,8 @@ export class RecallInternalCoordinator {
|
|
|
2141
2147
|
|
|
2142
2148
|
try {
|
|
2143
2149
|
const filteredResults =
|
|
2144
|
-
await
|
|
2150
|
+
await fetchQmdMemoryResultsWithRecognitionSwap(
|
|
2151
|
+
this.deps,
|
|
2145
2152
|
retrievalQuery,
|
|
2146
2153
|
qmdFetchLimit,
|
|
2147
2154
|
qmdHybridFetchLimit,
|
|
@@ -4951,23 +4958,16 @@ export class RecallInternalCoordinator {
|
|
|
4951
4958
|
recalledMemoryNamespaces,
|
|
4952
4959
|
);
|
|
4953
4960
|
const recalledContext = assembledRecall.sections.join("\n\n---\n\n");
|
|
4954
|
-
const composition =
|
|
4955
|
-
|
|
4956
|
-
|
|
4957
|
-
|
|
4958
|
-
|
|
4959
|
-
|
|
4960
|
-
|
|
4961
|
-
|
|
4962
|
-
"recall: context composition observer rejected", err,
|
|
4963
|
-
));
|
|
4964
|
-
}
|
|
4965
|
-
} catch (err) {
|
|
4961
|
+
const { composition, context, truncated: compositionTruncated } =
|
|
4962
|
+
decideRecallContextComposition({
|
|
4963
|
+
context: recalledContext,
|
|
4964
|
+
compactContext: compactRecallContextFromBuckets(sectionBuckets),
|
|
4965
|
+
footer: curiosityFooter,
|
|
4966
|
+
maxChars: recallBudgetChars,
|
|
4967
|
+
});
|
|
4968
|
+
notifyContextComposition(options.onContextComposition, composition, (err) => {
|
|
4966
4969
|
log.warn("recall: context composition observer failed open", err);
|
|
4967
|
-
}
|
|
4968
|
-
const compositionTruncated = context.length < composeRecallContext({
|
|
4969
|
-
context: recalledContext, footer: curiosityFooter,
|
|
4970
|
-
}).length;
|
|
4970
|
+
});
|
|
4971
4971
|
const includedSections = [...assembledRecall.includedIds];
|
|
4972
4972
|
const omittedSections = [...assembledRecall.omittedIds];
|
|
4973
4973
|
if (composition.footer && !includedSections.includes("questions")) includedSections.push("questions");
|
|
@@ -5202,6 +5202,9 @@ export class RecallInternalCoordinator {
|
|
|
5202
5202
|
chars: this.deps.getRecallBudgetChars(options.budgetCharsOverride),
|
|
5203
5203
|
used: context.length,
|
|
5204
5204
|
},
|
|
5205
|
+
...(composition.degradation
|
|
5206
|
+
? { degradation: composition.degradation }
|
|
5207
|
+
: {}),
|
|
5205
5208
|
sessionKey,
|
|
5206
5209
|
namespace: selfNamespace,
|
|
5207
5210
|
traceId,
|