@remnic/core 9.65.8 → 9.66.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/access-admin-ops-surface.d.ts +11 -12
- package/dist/access-admin-ops-surface.js +54 -51
- package/dist/access-authorization-probe.d.ts +11 -12
- package/dist/access-authorization-probe.js +55 -52
- package/dist/access-boundary.d.ts +11 -12
- package/dist/access-boundary.js +54 -51
- package/dist/access-citation-namespace.js +3 -3
- package/dist/access-cli.js +132 -125
- package/dist/access-cli.js.map +1 -1
- package/dist/access-coding-context-resolution.d.ts +1 -2
- package/dist/access-coding-context-resolution.js +2 -2
- package/dist/access-extraction-force-flush.d.ts +11 -12
- package/dist/access-extraction-force-flush.js +54 -51
- package/dist/access-health-types.d.ts +1 -2
- package/dist/access-http-lcm-compaction.d.ts +11 -12
- package/dist/access-http-lifecycle-flush.d.ts +11 -12
- package/dist/access-http-offline-stream.d.ts +11 -12
- package/dist/access-http-query.d.ts +2 -3
- package/dist/access-http-query.js +56 -53
- package/dist/access-http.d.ts +12 -13
- package/dist/access-http.js +77 -74
- package/dist/access-identity-continuity-surface.d.ts +9 -10
- package/dist/access-identity-continuity-surface.js +54 -51
- package/dist/access-lcm-surface.d.ts +11 -12
- package/dist/access-lcm-surface.js +54 -51
- package/dist/access-mcp-output-schemas.js +1 -1
- package/dist/access-mcp.d.ts +11 -12
- package/dist/access-mcp.js +67 -64
- package/dist/access-memory-search-fanout.d.ts +2 -3
- package/dist/{access-namespace-preflight-CpAOrS-9.d.ts → access-namespace-preflight-50VIkPhB.d.ts} +1 -1
- package/dist/access-namespace-preflight.d.ts +3 -4
- package/dist/access-namespace-preflight.js +54 -51
- package/dist/access-observe-write-surface.d.ts +11 -12
- package/dist/access-observe-write-surface.js +54 -51
- package/dist/access-offline-manifest.d.ts +9 -10
- package/dist/access-offline-manifest.js +15 -15
- package/dist/access-operations-batch.js +59 -56
- package/dist/access-operations.d.ts +12 -13
- package/dist/access-operations.js +64 -61
- package/dist/access-recall-concurrency.d.ts +11 -12
- package/dist/access-recall-concurrency.js +54 -51
- package/dist/access-recall-response.d.ts +11 -12
- package/dist/access-recall-response.js +54 -51
- package/dist/access-recall-surface.d.ts +11 -12
- package/dist/access-recall-surface.js +54 -51
- package/dist/access-schema.d.ts +12 -12
- package/dist/access-schema.js +5 -5
- package/dist/{access-service-Diu61Cfv.d.ts → access-service-C2tV2-uL.d.ts} +8 -8
- package/dist/access-service-helpers.d.ts +11 -12
- package/dist/access-service.d.ts +11 -12
- package/dist/access-service.js +54 -51
- package/dist/access-surface-catalog.d.ts +11 -12
- package/dist/access-surface-catalog.js +58 -53
- package/dist/access-surface-catalog.js.map +1 -1
- package/dist/access-wearables-meetings-surface.d.ts +3 -4
- package/dist/action-confidence.d.ts +1 -2
- package/dist/active-memory-bridge.d.ts +1 -2
- package/dist/active-memory-bridge.js +2 -2
- package/dist/active-recall.d.ts +1 -2
- package/dist/active-recall.js +11 -11
- package/dist/adapters/index.js +7 -7
- package/dist/adapters/registry.js +3 -3
- package/dist/ambient-provenance.d.ts +1 -2
- package/dist/artifact-search.d.ts +1 -2
- package/dist/{auto-sync-2YPITIWN.js → auto-sync-Q6Q2FVSC.js} +9 -9
- package/dist/behavior-learner.d.ts +1 -2
- package/dist/behavior-signals.d.ts +1 -2
- package/dist/bootstrap.d.ts +9 -10
- package/dist/briefing-window.d.ts +2 -3
- package/dist/briefing.d.ts +2 -3
- package/dist/briefing.js +28 -28
- package/dist/buffer-surprise-report.d.ts +1 -2
- package/dist/buffer-turn-helpers.d.ts +1 -2
- package/dist/buffer.d.ts +2 -3
- package/dist/buffer.js +20 -4
- package/dist/bulk-import/index.d.ts +3 -4
- package/dist/calibration.d.ts +1 -2
- package/dist/calibration.js +1 -1
- package/dist/capabilities.d.ts +1 -2
- package/dist/{capsule-merge-SGIVB3WA.js → capsule-merge-SEHERWWP.js} +4 -4
- package/dist/{catalog-9f-vEQLS.d.ts → catalog-C2jA-gLm.d.ts} +1 -1
- package/dist/causal-behavior.d.ts +1 -2
- package/dist/causal-consolidation.d.ts +1 -2
- package/dist/causal-consolidation.js +29 -29
- package/dist/causal-trajectory-graph.d.ts +1 -2
- package/dist/{chunk-LEPOP46W.js → chunk-227UFSEQ.js} +4 -4
- package/dist/{chunk-TFR3HG4K.js → chunk-2FA7U5XY.js} +4 -4
- package/dist/{chunk-PO7NXBG2.js → chunk-2GF27PGH.js} +5 -5
- package/dist/{chunk-W2BAGGEW.js → chunk-2ITZ74A6.js} +40 -31
- package/dist/{chunk-W2BAGGEW.js.map → chunk-2ITZ74A6.js.map} +1 -1
- package/dist/{chunk-MY2BC6UE.js → chunk-2X6BGKQL.js} +11 -11
- package/dist/{chunk-UEBDCMOO.js → chunk-3TSU662L.js} +3 -3
- package/dist/{chunk-XAB6STPO.js → chunk-46XR5FNZ.js} +53 -3
- package/dist/chunk-46XR5FNZ.js.map +1 -0
- package/dist/{chunk-FP7YTTVO.js → chunk-4OFKZAJG.js} +2 -1
- package/dist/chunk-4OFKZAJG.js.map +1 -0
- package/dist/{chunk-S5XOSTYM.js → chunk-4XLTUR6R.js} +3 -3
- package/dist/{chunk-BWGCOLEL.js → chunk-65JOGLIS.js} +2 -2
- package/dist/{chunk-HMZKGHMD.js → chunk-7UOXCCCI.js} +3 -3
- package/dist/{chunk-7WOWGRAU.js → chunk-AF5H7TKI.js} +108 -23
- package/dist/chunk-AF5H7TKI.js.map +1 -0
- package/dist/{chunk-7BDZTALN.js → chunk-AJTG3CP7.js} +12 -2
- package/dist/chunk-AJTG3CP7.js.map +1 -0
- package/dist/{chunk-2LWQSV6A.js → chunk-AL3UYZ5N.js} +3 -2
- package/dist/chunk-AL3UYZ5N.js.map +1 -0
- package/dist/{chunk-4F4AQFWL.js → chunk-B4AOWRYF.js} +10 -10
- package/dist/{chunk-ODU2CNNX.js → chunk-C5IUOBCN.js} +2 -2
- package/dist/{chunk-3A2NJP2U.js → chunk-CHGG74CY.js} +3 -3
- package/dist/{chunk-76DIF5KT.js → chunk-CX4OLNIH.js} +2 -2
- package/dist/{chunk-Z3YEGSR4.js → chunk-D3UXGE5D.js} +10 -10
- package/dist/{chunk-5HK3CJAR.js → chunk-D6Q5EPOV.js} +2 -2
- package/dist/{chunk-EGBDFJ36.js → chunk-DD5JFCWM.js} +2 -2
- package/dist/{chunk-XBGHAAKR.js → chunk-DDX6KIXF.js} +2 -2
- package/dist/{chunk-JIYDRBVZ.js → chunk-DJORULH3.js} +2 -2
- package/dist/{chunk-7KQB4EBS.js → chunk-DUAJKRR2.js} +2 -2
- package/dist/{chunk-XDL5CYZN.js → chunk-EEOUMG3J.js} +2 -1
- package/dist/{chunk-XDL5CYZN.js.map → chunk-EEOUMG3J.js.map} +1 -1
- package/dist/{chunk-Q57GOHLF.js → chunk-EGALNSZ4.js} +3 -3
- package/dist/{chunk-DPCXDG7G.js → chunk-EH65UV2Z.js} +2 -2
- package/dist/{chunk-KCT36JAW.js → chunk-ESNFSSO4.js} +2 -2
- package/dist/{chunk-XQ3HXAQH.js → chunk-ET2CNMLD.js} +4 -4
- package/dist/{chunk-TUHBYJXL.js → chunk-EWKVYCFP.js} +1 -1
- package/dist/{chunk-NPFUNWNX.js → chunk-FFUMTH27.js} +2 -2
- package/dist/{chunk-3PKAS6VL.js → chunk-GAJK3DQ5.js} +2 -2
- package/dist/{chunk-DA7ITC5Z.js → chunk-GBEOUCBB.js} +2 -2
- package/dist/{chunk-UENKPWCS.js → chunk-H2IRSXZN.js} +6 -6
- package/dist/{chunk-CFVTRUR3.js → chunk-H6RSANGQ.js} +2 -2
- package/dist/chunk-HVAEXYPL.js +98 -0
- package/dist/chunk-HVAEXYPL.js.map +1 -0
- package/dist/{chunk-EUYWQ7TS.js → chunk-IEZ6CGTW.js} +2 -2
- package/dist/{chunk-3SZD4CYO.js → chunk-IGZCAHFL.js} +3 -3
- package/dist/{chunk-UPFNQJC7.js → chunk-INUBU6I5.js} +2 -2
- package/dist/{chunk-PMVPCZJZ.js → chunk-J2R275FN.js} +3 -3
- package/dist/{chunk-UW5NPZJ2.js → chunk-JALOAKSZ.js} +59 -7
- package/dist/chunk-JALOAKSZ.js.map +1 -0
- package/dist/{chunk-2QSZNTDO.js → chunk-JBPKEARU.js} +7 -7
- package/dist/{chunk-3BCULS4U.js → chunk-JKTV3JNX.js} +145 -507
- package/dist/chunk-JKTV3JNX.js.map +1 -0
- package/dist/{chunk-5ACCD4L7.js → chunk-JRRQ747T.js} +7 -7
- package/dist/{chunk-V4IDF3EZ.js → chunk-JTWZKNUH.js} +5 -5
- package/dist/{chunk-AZMLH5UT.js → chunk-KI64TTBL.js} +2 -2
- package/dist/{chunk-DEACDKE3.js → chunk-KJXCD7VR.js} +112 -87
- package/dist/chunk-KJXCD7VR.js.map +1 -0
- package/dist/chunk-LJABGXC4.js +267 -0
- package/dist/chunk-LJABGXC4.js.map +1 -0
- package/dist/{chunk-NPIBN2VL.js → chunk-LK4TOYPU.js} +2 -2
- package/dist/{chunk-UTQUEHC7.js → chunk-LUDBXTBJ.js} +8 -8
- package/dist/{chunk-PU56CXZA.js → chunk-LYUUA6QB.js} +2 -2
- package/dist/{chunk-P36Z4JRA.js → chunk-M5ERTI4I.js} +2 -2
- package/dist/{chunk-LDKPDODJ.js → chunk-ME35HVDJ.js} +2 -2
- package/dist/{chunk-773TRRGT.js → chunk-MJUCDM3C.js} +2 -2
- package/dist/{chunk-OXRRJXPR.js → chunk-MUEGIKKY.js} +476 -1796
- package/dist/chunk-MUEGIKKY.js.map +1 -0
- package/dist/{chunk-AHPIFKNG.js → chunk-N4F7ZSSG.js} +2 -2
- package/dist/{chunk-JOZUBF4A.js → chunk-NACLNNFQ.js} +2 -2
- package/dist/{chunk-LC2BDILZ.js → chunk-NBP4EX5N.js} +2 -2
- package/dist/{chunk-T7XP6IZE.js → chunk-NFP4KPTA.js} +2 -2
- package/dist/{chunk-ZVPVTPGI.js → chunk-NNZFPYYX.js} +4 -4
- package/dist/{chunk-LPNCR4QK.js → chunk-NSTNGMSS.js} +14 -14
- package/dist/{chunk-5RWZH6PH.js → chunk-NUF7VSEX.js} +2 -2
- package/dist/{chunk-7VZFRUQU.js → chunk-O7ERGZDA.js} +5 -5
- package/dist/{chunk-HSZMX3ZJ.js → chunk-ODW5GDFE.js} +2 -2
- package/dist/{chunk-5DHKCO52.js → chunk-OJUEUQDJ.js} +2 -2
- package/dist/{chunk-LOXHYCVS.js → chunk-OMX6TKXH.js} +2 -2
- package/dist/{chunk-J2WC5LF4.js → chunk-QBC33MPY.js} +2 -1
- package/dist/{chunk-SEEJOGQX.js → chunk-QBNE55VA.js} +4 -4
- package/dist/chunk-QJCWK2A7.js +1466 -0
- package/dist/chunk-QJCWK2A7.js.map +1 -0
- package/dist/{chunk-YEUXERJ6.js → chunk-RDGKVH6T.js} +7 -3
- package/dist/{chunk-YEUXERJ6.js.map → chunk-RDGKVH6T.js.map} +1 -1
- package/dist/{chunk-JYSN42VN.js → chunk-RPIS5FQ7.js} +237 -183
- package/dist/chunk-RPIS5FQ7.js.map +1 -0
- package/dist/{chunk-F7XUD3PL.js → chunk-S4CDUXQY.js} +2 -2
- package/dist/{chunk-WNXYT4MK.js → chunk-S4Z2OBTX.js} +4 -4
- package/dist/{chunk-UL4MKZHI.js → chunk-SN4JXNLL.js} +2 -2
- package/dist/{chunk-CAMNRAJF.js → chunk-SZMYGDSM.js} +2 -2
- package/dist/chunk-TB2MJRI6.js +866 -0
- package/dist/chunk-TB2MJRI6.js.map +1 -0
- package/dist/{chunk-XNWXSGHS.js → chunk-TBCDF556.js} +28 -10
- package/dist/chunk-TBCDF556.js.map +1 -0
- package/dist/{chunk-LKYIOCWL.js → chunk-TCF4MU7L.js} +967 -132
- package/dist/chunk-TCF4MU7L.js.map +1 -0
- package/dist/chunk-TCQRIIIN.js +202 -0
- package/dist/chunk-TCQRIIIN.js.map +1 -0
- package/dist/{chunk-7PHI6GUI.js → chunk-TEZ2HTC7.js} +42 -2
- package/dist/chunk-TEZ2HTC7.js.map +1 -0
- package/dist/{chunk-CPA5NBHN.js → chunk-TNGH4ZYI.js} +2 -2
- package/dist/{chunk-F3NVYTTA.js → chunk-TNXNECAN.js} +6 -6
- package/dist/{chunk-BEC4YBNA.js → chunk-TVW4C7PV.js} +2 -2
- package/dist/{chunk-UFKPQBXH.js → chunk-U62OK7BB.js} +2 -2
- package/dist/{chunk-KZIF6XHX.js → chunk-U65VJSCJ.js} +32 -19
- package/dist/chunk-U65VJSCJ.js.map +1 -0
- package/dist/{chunk-4QEYREAV.js → chunk-U6NGKS32.js} +8 -8
- package/dist/{chunk-HRHO3ZNG.js → chunk-UW4RYPWC.js} +2 -2
- package/dist/{chunk-AX7UXCHJ.js → chunk-UYA36DQ7.js} +2 -1
- package/dist/chunk-UYA36DQ7.js.map +1 -0
- package/dist/{chunk-T6ILXUAH.js → chunk-VG4SSPAW.js} +2 -2
- package/dist/chunk-VOSWUO3K.js +100 -0
- package/dist/chunk-VOSWUO3K.js.map +1 -0
- package/dist/chunk-WFCWP4XU.js +17 -0
- package/dist/chunk-WFCWP4XU.js.map +1 -0
- package/dist/{chunk-H2YSH3DG.js → chunk-WKAXBXVA.js} +2 -2
- package/dist/{chunk-SXIMQLGV.js → chunk-WVGXCBOC.js} +2 -2
- package/dist/{chunk-UNUMFURP.js → chunk-X5PIDJ3L.js} +3 -3
- package/dist/{chunk-CRML27CO.js → chunk-X5YYSAZX.js} +4 -4
- package/dist/{chunk-FZEEWOI2.js → chunk-XJJYSX6F.js} +2 -2
- package/dist/{chunk-U7EW2W4W.js → chunk-XKNHFDTT.js} +26 -6
- package/dist/chunk-XKNHFDTT.js.map +1 -0
- package/dist/{chunk-OA2O2GJ4.js → chunk-XOHYGIWF.js} +3 -3
- package/dist/{chunk-UG6VXIOK.js → chunk-XSTNGNJP.js} +2 -2
- package/dist/{chunk-MINHJ55X.js → chunk-XXW32OL7.js} +1 -1
- package/dist/{chunk-MINHJ55X.js.map → chunk-XXW32OL7.js.map} +1 -1
- package/dist/{chunk-YDPAE2RD.js → chunk-YFLLGRXO.js} +2 -2
- package/dist/{chunk-MDD2RINF.js → chunk-YWPLOJ7T.js} +3 -3
- package/dist/{chunk-Q4WONDMJ.js → chunk-YYGZJPOK.js} +2 -2
- package/dist/{chunk-GTO56JY5.js → chunk-ZPS724LT.js} +2 -2
- package/dist/{chunk-SNOIKAHM.js → chunk-ZZZWEDF4.js} +3 -3
- package/dist/{cli-O3F-ht3i.d.ts → cli-CsfFMe6n.d.ts} +5 -5
- package/dist/cli.d.ts +13 -14
- package/dist/cli.js +101 -96
- package/dist/coding/export-okf-codegraph.d.ts +56 -0
- package/dist/coding/export-okf-codegraph.js +526 -0
- package/dist/coding/export-okf-codegraph.js.map +1 -0
- package/dist/coding/pre-action-gate.d.ts +1 -2
- package/dist/compounding/engine.d.ts +2 -3
- package/dist/compounding/engine.js +29 -29
- package/dist/compounding/preference-consolidator.d.ts +1 -2
- package/dist/compression-optimizer.d.ts +1 -2
- package/dist/config.d.ts +1 -2
- package/dist/config.js +11 -11
- package/dist/connectors/codex-materialize-runner.d.ts +1 -2
- package/dist/connectors/codex-materialize-runner.js +28 -28
- package/dist/connectors/codex-materialize.d.ts +1 -2
- package/dist/connectors/index.d.ts +1 -2
- package/dist/connectors/index.js +28 -28
- package/dist/consolidation-provenance-check.d.ts +2 -3
- package/dist/consolidation-provenance-check.js +4 -4
- package/dist/consolidation-undo.d.ts +2 -3
- package/dist/consolidation-undo.js +3 -3
- package/dist/contradiction/index.d.ts +3 -4
- package/dist/contradiction/index.js +9 -9
- package/dist/{contradiction-scan-AKUWPX5N.js → contradiction-scan-NOYMFG66.js} +3 -3
- package/dist/converge-config.d.ts +1 -2
- package/dist/convergence-refresh.d.ts +2 -3
- package/dist/convergence-refresh.js +30 -30
- package/dist/conversation-index/backend.d.ts +1 -2
- package/dist/conversation-index/backend.js +2 -2
- package/dist/conversation-index/chunker.d.ts +1 -2
- package/dist/conversation-index/faiss-adapter.d.ts +1 -2
- package/dist/conversation-index/indexer.d.ts +1 -2
- package/dist/conversation-index/search.d.ts +1 -2
- package/dist/corpus-watermark.d.ts +1 -2
- package/dist/corpus-watermark.js +30 -30
- package/dist/cross-lingual-recall.d.ts +1 -2
- package/dist/day-summary.d.ts +1 -2
- package/dist/delinearize.d.ts +1 -2
- package/dist/dependency-propagation-config.d.ts +1 -2
- package/dist/{dependency-propagation-delivery-CL6RWXTA.d.ts → dependency-propagation-delivery-D4WMbOwA.d.ts} +1 -1
- package/dist/direct-answer-wiring.d.ts +1 -2
- package/dist/direct-answer.d.ts +1 -2
- package/dist/embedding-fallback.d.ts +1 -2
- package/dist/enrichment/index.d.ts +1 -2
- package/dist/entity-origin-fields.d.ts +1 -2
- package/dist/entity-retrieval.d.ts +2 -3
- package/dist/entity-retrieval.js +28 -28
- package/dist/entity-schema.d.ts +1 -2
- package/dist/episodic-context.d.ts +1 -2
- package/dist/eval-trajectory-contracts.d.ts +1 -2
- package/dist/eval-trajectory-store.d.ts +1 -2
- package/dist/eval-trajectory.d.ts +1 -2
- package/dist/explicit-capture.d.ts +9 -10
- package/dist/explicit-capture.js +11 -11
- package/dist/external-wiki-access.d.ts +11 -12
- package/dist/external-wiki-access.js +55 -52
- package/dist/external-wiki-collection-registration.d.ts +1 -2
- package/dist/external-wiki-collection.d.ts +1 -2
- package/dist/external-wiki-mcp-tools.d.ts +11 -12
- package/dist/extraction-error-classification.d.ts +1 -2
- package/dist/extraction-faithfulness.d.ts +1 -2
- package/dist/extraction-faithfulness.js +2 -2
- package/dist/extraction-judge-telemetry.d.ts +1 -2
- package/dist/extraction-judge-training.d.ts +1 -2
- package/dist/extraction-judge.d.ts +1 -2
- package/dist/extraction-judge.js +2 -2
- package/dist/extraction-liveness.d.ts +1 -2
- package/dist/extraction-normalization.d.ts +1 -2
- package/dist/extraction-prompt.d.ts +1 -2
- package/dist/extraction-source-grounding-rules.d.ts +1 -2
- package/dist/extraction-source-grounding.d.ts +1 -2
- package/dist/extraction.d.ts +1 -2
- package/dist/extraction.js +37 -34
- package/dist/fallback-llm.d.ts +7 -2
- package/dist/fallback-llm.js +1 -1
- package/dist/{first-start-migration-4NETATFF.js → first-start-migration-KHIMCBIC.js} +3 -3
- package/dist/graph-dashboard-diff.d.ts +1 -2
- package/dist/graph-dashboard-key.d.ts +1 -2
- package/dist/graph-dashboard-parser.d.ts +1 -2
- package/dist/graph-edge-reinforcement.d.ts +1 -2
- package/dist/graph-path-reconstruction.d.ts +1 -2
- package/dist/graph-path-scoring.d.ts +1 -2
- package/dist/graph-snapshot.d.ts +1 -2
- package/dist/graph.d.ts +1 -2
- package/dist/harmonic-retrieval.js +1 -1
- package/dist/importance.d.ts +1 -2
- package/dist/importers/index.d.ts +1 -2
- package/dist/in-flight-reads.d.ts +1 -2
- package/dist/{index-C7Xep6S9.d.ts → index-DuJnzwHv.d.ts} +2 -2
- package/dist/index.d.ts +364 -26
- package/dist/index.js +232 -169
- package/dist/intent.d.ts +1 -2
- package/dist/lcm/engine.d.ts +1 -2
- package/dist/lcm/engine.js +4 -4
- package/dist/lcm/index.d.ts +1 -2
- package/dist/lcm/index.js +10 -10
- package/dist/lcm/tools.d.ts +1 -2
- package/dist/lifecycle.d.ts +1 -2
- package/dist/live-connectors-runner.d.ts +1 -2
- package/dist/local-llm.d.ts +1 -2
- package/dist/local-model-endpoint.d.ts +1 -2
- package/dist/location/index.d.ts +315 -6
- package/dist/location/index.js +151 -19
- package/dist/maintenance/memory-governance.d.ts +1 -2
- package/dist/maintenance/memory-governance.js +28 -28
- package/dist/maintenance/rebuild-memory-lifecycle-ledger.d.ts +2 -3
- package/dist/maintenance/rebuild-memory-lifecycle-ledger.js +28 -28
- package/dist/maintenance/rebuild-memory-projection.d.ts +2 -3
- package/dist/maintenance/rebuild-memory-projection.js +29 -29
- package/dist/{maintenance-CJ-xqFp0.d.ts → maintenance-BBeaeYRR.d.ts} +3 -3
- package/dist/mcp-memory-inspector-app.d.ts +11 -12
- package/dist/mcp-read-only-tools.js +1 -1
- package/dist/memory-action-policy.d.ts +1 -2
- package/dist/memory-cache.d.ts +1 -2
- package/dist/memory-controller.d.ts +1 -2
- package/dist/memory-lifecycle-ledger-utils.d.ts +1 -2
- package/dist/memory-projection-mutations.js +3 -3
- package/dist/memory-projection-store.d.ts +1 -2
- package/dist/memory-projection-store.js +1 -1
- package/dist/memory-provenance.d.ts +1 -2
- package/dist/memory-snapshot.d.ts +1 -2
- package/dist/memory-subject-cli.d.ts +11 -12
- package/dist/memory-subject.d.ts +11 -12
- package/dist/memory-subject.js +4 -4
- package/dist/memory-worth-outcomes.d.ts +2 -3
- package/dist/models-json.d.ts +1 -2
- package/dist/namespaces/migrate.d.ts +3 -4
- package/dist/namespaces/migrate.js +29 -29
- package/dist/namespaces/principal.d.ts +1 -2
- package/dist/namespaces/search.d.ts +1 -2
- package/dist/namespaces/search.js +8 -8
- package/dist/namespaces/storage.d.ts +3 -4
- package/dist/namespaces/storage.js +28 -28
- package/dist/native-knowledge.d.ts +1 -2
- package/dist/offline-sync-file-io.js +3 -3
- package/dist/offline-sync-impression-drain.d.ts +1 -2
- package/dist/offline-sync-impression-drain.js +9 -9
- package/dist/offline-sync.js +4 -4
- package/dist/operator-doctor-corpus.d.ts +1 -2
- package/dist/operator-doctor-corpus.js +31 -31
- package/dist/operator-doctor-replica.d.ts +1 -2
- package/dist/operator-toolkit.d.ts +3 -4
- package/dist/operator-toolkit.js +47 -47
- package/dist/orchestration/compression-guideline-coordinator.d.ts +2 -3
- package/dist/orchestration/maintenance.d.ts +4 -5
- package/dist/orchestration/maintenance.js +42 -41
- package/dist/{orchestrator-BsntWxLy.d.ts → orchestrator-CaqnwNwM.d.ts} +8 -8
- package/dist/orchestrator.d.ts +9 -10
- package/dist/orchestrator.js +132 -125
- package/dist/page-versioning.js +3 -3
- package/dist/patterns-cli.d.ts +1 -2
- package/dist/{pipeline-CVoysPm2.d.ts → pipeline-CrxVjlJr.d.ts} +1 -1
- package/dist/policy-runtime.d.ts +1 -2
- package/dist/proactive-contention.d.ts +1 -2
- package/dist/provenance.d.ts +1 -2
- package/dist/{public-http-CuOxlTC2.d.ts → public-http-Cwvl4QZr.d.ts} +1 -1
- package/dist/{purge-GB7PZHT2.js → purge-OP6BEDFY.js} +2 -2
- package/dist/{qmd-DWMAGA5l.d.ts → qmd-BZgbJm0g.d.ts} +1 -1
- package/dist/qmd-preflight.d.ts +2 -3
- package/dist/qmd-recall-cache.d.ts +1 -2
- package/dist/qmd.d.ts +2 -3
- package/dist/recall-concurrency-config.d.ts +1 -2
- package/dist/recall-deep.d.ts +37 -0
- package/dist/recall-deep.js +81 -0
- package/dist/recall-deep.js.map +1 -0
- package/dist/recall-disclosure-escalation.d.ts +1 -2
- package/dist/recall-explain-renderer.d.ts +1 -2
- package/dist/recall-explain-renderer.js +3 -3
- package/dist/recall-memory-map.d.ts +1 -2
- package/dist/recall-navigate.d.ts +70 -0
- package/dist/recall-navigate.js +51 -0
- package/dist/recall-navigate.js.map +1 -0
- package/dist/recall-planner-llm.d.ts +1 -2
- package/dist/recall-planner-llm.js +1 -1
- package/dist/recall-state-view-wire.d.ts +14 -0
- package/dist/recall-state-view-wire.js +11 -0
- package/dist/recall-state-view.d.ts +25 -0
- package/dist/recall-state-view.js +22 -0
- package/dist/recall-state-view.js.map +1 -0
- package/dist/recall-state.d.ts +1 -2
- package/dist/recall-tag-filter.d.ts +1 -2
- package/dist/recall-timings.d.ts +1 -2
- package/dist/recall-xray-cli.d.ts +1 -2
- package/dist/recall-xray-cli.js +4 -4
- package/dist/recall-xray-renderer.d.ts +1 -2
- package/dist/recall-xray-renderer.js +3 -3
- package/dist/recall-xray.d.ts +1 -2
- package/dist/recall-xray.js +2 -2
- package/dist/reconcile/cursor.d.ts +1 -2
- package/dist/reconcile/manifest.d.ts +1 -2
- package/dist/reconcile/manifest.js +4 -4
- package/dist/reconcile/plan.d.ts +1 -2
- package/dist/replay/normalizers/chatgpt.d.ts +1 -2
- package/dist/replay/normalizers/claude.d.ts +1 -2
- package/dist/replay/normalizers/openclaw.d.ts +1 -2
- package/dist/replay/normalizers/shared.d.ts +1 -2
- package/dist/replay/runner.d.ts +1 -2
- package/dist/replay/types.d.ts +1 -2
- package/dist/replica-divergence.d.ts +1 -2
- package/dist/replica-peers-config.d.ts +1 -2
- package/dist/{resolution-XWBPKYFB.js → resolution-4DLI3IOR.js} +10 -10
- package/dist/resolution-4DLI3IOR.js.map +1 -0
- package/dist/resolve-auth-token.d.ts +1 -2
- package/dist/resume-bundles.js +12 -12
- package/dist/retrieval-agents.d.ts +2 -3
- package/dist/retrieval-tiers.d.ts +1 -2
- package/dist/routing/engine.d.ts +1 -2
- package/dist/routing/store.d.ts +1 -2
- package/dist/salvage-envelope.d.ts +1 -2
- package/dist/salvage-envelope.js +6 -6
- package/dist/schemas.d.ts +570 -105
- package/dist/schemas.js +3 -1
- package/dist/{scope-profiles-CPWkW_dI.d.ts → scope-profiles-DFaojvoP.d.ts} +1 -1
- package/dist/search/document-scanner.js +1 -1
- package/dist/search/embed-helper.d.ts +1 -2
- package/dist/search/factory.d.ts +1 -2
- package/dist/search/factory.js +7 -7
- package/dist/search/index.d.ts +1 -2
- package/dist/search/index.js +13 -13
- package/dist/search/lancedb-backend.d.ts +1 -2
- package/dist/search/lancedb-backend.js +1 -1
- package/dist/search/meilisearch-backend.d.ts +1 -2
- package/dist/search/meilisearch-backend.js +1 -1
- package/dist/search/noop-backend.d.ts +1 -2
- package/dist/search/orama-backend.d.ts +1 -2
- package/dist/search/orama-backend.js +1 -1
- package/dist/search/port.d.ts +1 -2
- package/dist/search/remote-backend.d.ts +1 -2
- package/dist/secure-store/index.js +3 -3
- package/dist/{semantic-consolidation-CNFVBXFc.d.ts → semantic-consolidation-BiX68wZA.d.ts} +1 -1
- package/dist/semantic-consolidation.d.ts +2 -3
- package/dist/semantic-consolidation.js +29 -29
- package/dist/semantic-rule-promotion.js +28 -28
- package/dist/semantic-rule-verifier.d.ts +1 -2
- package/dist/semantic-rule-verifier.js +28 -28
- package/dist/{service-Bb-JIdQ0.d.ts → service-D5h2zZ0M.d.ts} +2 -2
- package/dist/session-observer-bands.d.ts +1 -2
- package/dist/session-observer-state.d.ts +1 -2
- package/dist/shared-context/manager.d.ts +1 -2
- package/dist/signal.d.ts +1 -2
- package/dist/source-agent-qualifier.d.ts +1 -2
- package/dist/source-agent-qualifier.js +35 -32
- package/dist/standup/build.d.ts +16 -0
- package/dist/standup/build.js +17 -0
- package/dist/standup/build.js.map +1 -0
- package/dist/{storage-CukrlNKk.d.ts → storage-CtsaojWD.d.ts} +1 -1
- package/dist/storage.d.ts +2 -3
- package/dist/storage.js +27 -27
- package/dist/subject-config.d.ts +1 -2
- package/dist/subject-config.js +5 -5
- package/dist/summarizer.d.ts +1 -2
- package/dist/summarizer.js +2 -2
- package/dist/summary-snapshot.d.ts +1 -2
- package/dist/support-passport/index.d.ts +16 -17
- package/dist/support-passport/index.js +57 -54
- package/dist/temporal-supersession.d.ts +2 -3
- package/dist/temporal-timeline-recall.d.ts +1 -2
- package/dist/temporal-validity.d.ts +1 -2
- package/dist/threading.d.ts +1 -2
- package/dist/tier-migration.d.ts +2 -3
- package/dist/tier-routing.d.ts +1 -2
- package/dist/tier-routing.js +2 -2
- package/dist/{tier-stats-4B5IJ3NE.js → tier-stats-2TOW3QNL.js} +3 -3
- package/dist/topics.d.ts +1 -2
- package/dist/transcript.d.ts +1 -2
- package/dist/transfer/capsule-import.js +4 -4
- package/dist/transfer/export-okf.d.ts +39 -0
- package/dist/transfer/export-okf.js +112 -0
- package/dist/transfer/export-okf.js.map +1 -0
- package/dist/trust-score-stage.d.ts +1 -2
- package/dist/trust-score.d.ts +1 -2
- package/dist/{types-djxQlxJ7.d.ts → types-CIpfYz1I.d.ts} +132 -12
- package/dist/types.d.ts +1 -2
- package/dist/types.js +1 -1
- package/dist/utility-runtime.d.ts +1 -2
- package/dist/verified-recall.js +28 -28
- package/dist/who-knows-cli.d.ts +11 -12
- package/dist/who-knows-cli.js +29 -29
- package/dist/who-knows.d.ts +11 -12
- package/dist/who-knows.js +28 -28
- package/dist/write-envelope.d.ts +1 -2
- package/dist/write-envelope.js +5 -5
- package/package.json +34 -3
- package/src/access-admin-ops-surface.ts +6 -1
- package/src/access-boundary.ts +1 -0
- package/src/access-http.ts +3 -1
- package/src/access-mcp-output-schemas.ts +1 -0
- package/src/access-mcp.ts +3 -3
- package/src/access-operations.ts +1 -0
- package/src/access-service-offline-file-content.test.ts +63 -0
- package/src/access-surface-catalog.ts +2 -0
- package/src/activity/config.test.ts +1 -0
- package/src/activity/config.ts +66 -1
- package/src/activity/index.ts +3 -0
- package/src/activity/journal.test.ts +97 -0
- package/src/activity/journal.ts +113 -0
- package/src/activity/privacy.test.ts +53 -0
- package/src/activity/privacy.ts +80 -0
- package/src/activity/timeline/build.ts +279 -0
- package/src/activity/timeline/categories.ts +111 -0
- package/src/activity/timeline/classify.ts +110 -0
- package/src/activity/timeline/corrections.ts +145 -0
- package/src/activity/timeline/index.ts +8 -0
- package/src/activity/timeline/journal-recap.test.ts +113 -0
- package/src/activity/timeline/journal-recap.ts +130 -0
- package/src/activity/timeline/query.test.ts +198 -0
- package/src/activity/timeline/query.ts +313 -0
- package/src/activity/timeline/timeline.test.ts +277 -0
- package/src/activity/timeline/types.ts +106 -0
- package/src/activity/timeline/weekly.test.ts +215 -0
- package/src/activity/timeline/weekly.ts +234 -0
- package/src/activity/types.ts +20 -0
- package/src/activity/vault-publish.test.ts +166 -0
- package/src/activity/vault-publish.ts +101 -0
- package/src/cli/okf-commands.ts +45 -0
- package/src/cli.ts +2 -2
- package/src/coding/export-okf-codegraph.test.ts +381 -0
- package/src/coding/export-okf-codegraph.ts +565 -0
- package/src/config.test.ts +1 -0
- package/src/config.ts +2 -22
- package/src/dedup/merge-on-write.test.ts +91 -0
- package/src/dedup/merge-on-write.ts +75 -0
- package/src/dedup/novelty-gate.test.ts +143 -0
- package/src/dedup/novelty-gate.ts +163 -0
- package/src/extraction-prompt-safety.test.ts +14 -2
- package/src/extraction.ts +21 -1
- package/src/fallback-llm.test.ts +134 -0
- package/src/fallback-llm.ts +77 -5
- package/src/location/access-operations.ts +17 -8
- package/src/location/backfill.ts +137 -0
- package/src/location/config.test.ts +3 -0
- package/src/location/config.ts +46 -2
- package/src/location/http-glue.ts +1 -1
- package/src/location/index.ts +3 -0
- package/src/location/intervals.ts +1 -0
- package/src/location/matching.test.ts +65 -0
- package/src/location/matching.ts +354 -0
- package/src/location/mcp-tools.ts +2 -1
- package/src/location/recall-exclusion.test.ts +1 -0
- package/src/location/surfaces.test.ts +15 -2
- package/src/location/surfaces.ts +95 -18
- package/src/location/tagging.test.ts +119 -0
- package/src/location/tagging.ts +277 -0
- package/src/location/types.ts +23 -1
- package/src/mcp-read-only-tools.ts +1 -0
- package/src/memory-projection-store.ts +3 -1
- package/src/okf/cli.ts +18 -5
- package/src/okf/config.ts +5 -0
- package/src/okf/index-files.test.ts +60 -0
- package/src/okf/index-files.ts +114 -0
- package/src/okf/render.ts +133 -0
- package/src/okf/type-mapping.test.ts +3 -0
- package/src/okf/type-mapping.ts +2 -0
- package/src/orchestration/extraction-persist.ts +22 -23
- package/src/orchestration/extraction-run.ts +2 -1
- package/src/orchestration/generic-recall-paths.ts +15 -3
- package/src/orchestration/recall-entry.ts +8 -3
- package/src/recall-deep.test.ts +72 -0
- package/src/recall-deep.ts +113 -0
- package/src/recall-navigate.test.ts +84 -0
- package/src/recall-navigate.ts +100 -0
- package/src/recall-state-view-wire.test.ts +35 -0
- package/src/recall-state-view-wire.ts +28 -0
- package/src/recall-state-view.test.ts +131 -0
- package/src/recall-state-view.ts +138 -0
- package/src/schemas.ts +17 -1
- package/src/shared-context/governance.test.ts +53 -0
- package/src/shared-context/governance.ts +86 -0
- package/src/standup/access-operations.ts +14 -0
- package/src/standup/build.test.ts +34 -0
- package/src/standup/build.ts +115 -0
- package/src/standup/http-glue.ts +15 -0
- package/src/standup/mcp-tools.ts +16 -0
- package/src/support-passport/card-projection.ts +1 -0
- package/src/support-passport/card-service-commit-forwarding.test.ts +1 -0
- package/src/support-passport/card-service.test.ts +75 -1
- package/src/support-passport/card-service.ts +6 -3
- package/src/support-passport/card-state.ts +5 -1
- package/src/support-passport/offline-sync-guard.ts +14 -1
- package/src/transfer/export-okf.test.ts +164 -0
- package/src/transfer/export-okf.ts +286 -0
- package/src/types.ts +3 -10
- package/dist/chunk-2LWQSV6A.js.map +0 -1
- package/dist/chunk-3BCULS4U.js.map +0 -1
- package/dist/chunk-7BDZTALN.js.map +0 -1
- package/dist/chunk-7PHI6GUI.js.map +0 -1
- package/dist/chunk-7WOWGRAU.js.map +0 -1
- package/dist/chunk-AX7UXCHJ.js.map +0 -1
- package/dist/chunk-DEACDKE3.js.map +0 -1
- package/dist/chunk-FP7YTTVO.js.map +0 -1
- package/dist/chunk-JYSN42VN.js.map +0 -1
- package/dist/chunk-KZIF6XHX.js.map +0 -1
- package/dist/chunk-LKYIOCWL.js.map +0 -1
- package/dist/chunk-OXRRJXPR.js.map +0 -1
- package/dist/chunk-U7EW2W4W.js.map +0 -1
- package/dist/chunk-UW5NPZJ2.js.map +0 -1
- package/dist/chunk-XAB6STPO.js.map +0 -1
- package/dist/chunk-XNWXSGHS.js.map +0 -1
- package/dist/types-CM86alG1.d.ts +0 -89
- /package/dist/{auto-sync-2YPITIWN.js.map → auto-sync-Q6Q2FVSC.js.map} +0 -0
- /package/dist/{capsule-merge-SGIVB3WA.js.map → capsule-merge-SEHERWWP.js.map} +0 -0
- /package/dist/{chunk-LEPOP46W.js.map → chunk-227UFSEQ.js.map} +0 -0
- /package/dist/{chunk-TFR3HG4K.js.map → chunk-2FA7U5XY.js.map} +0 -0
- /package/dist/{chunk-PO7NXBG2.js.map → chunk-2GF27PGH.js.map} +0 -0
- /package/dist/{chunk-MY2BC6UE.js.map → chunk-2X6BGKQL.js.map} +0 -0
- /package/dist/{chunk-UEBDCMOO.js.map → chunk-3TSU662L.js.map} +0 -0
- /package/dist/{chunk-S5XOSTYM.js.map → chunk-4XLTUR6R.js.map} +0 -0
- /package/dist/{chunk-BWGCOLEL.js.map → chunk-65JOGLIS.js.map} +0 -0
- /package/dist/{chunk-HMZKGHMD.js.map → chunk-7UOXCCCI.js.map} +0 -0
- /package/dist/{chunk-4F4AQFWL.js.map → chunk-B4AOWRYF.js.map} +0 -0
- /package/dist/{chunk-ODU2CNNX.js.map → chunk-C5IUOBCN.js.map} +0 -0
- /package/dist/{chunk-3A2NJP2U.js.map → chunk-CHGG74CY.js.map} +0 -0
- /package/dist/{chunk-76DIF5KT.js.map → chunk-CX4OLNIH.js.map} +0 -0
- /package/dist/{chunk-Z3YEGSR4.js.map → chunk-D3UXGE5D.js.map} +0 -0
- /package/dist/{chunk-5HK3CJAR.js.map → chunk-D6Q5EPOV.js.map} +0 -0
- /package/dist/{chunk-EGBDFJ36.js.map → chunk-DD5JFCWM.js.map} +0 -0
- /package/dist/{chunk-XBGHAAKR.js.map → chunk-DDX6KIXF.js.map} +0 -0
- /package/dist/{chunk-JIYDRBVZ.js.map → chunk-DJORULH3.js.map} +0 -0
- /package/dist/{chunk-7KQB4EBS.js.map → chunk-DUAJKRR2.js.map} +0 -0
- /package/dist/{chunk-Q57GOHLF.js.map → chunk-EGALNSZ4.js.map} +0 -0
- /package/dist/{chunk-DPCXDG7G.js.map → chunk-EH65UV2Z.js.map} +0 -0
- /package/dist/{chunk-KCT36JAW.js.map → chunk-ESNFSSO4.js.map} +0 -0
- /package/dist/{chunk-XQ3HXAQH.js.map → chunk-ET2CNMLD.js.map} +0 -0
- /package/dist/{chunk-TUHBYJXL.js.map → chunk-EWKVYCFP.js.map} +0 -0
- /package/dist/{chunk-NPFUNWNX.js.map → chunk-FFUMTH27.js.map} +0 -0
- /package/dist/{chunk-3PKAS6VL.js.map → chunk-GAJK3DQ5.js.map} +0 -0
- /package/dist/{chunk-DA7ITC5Z.js.map → chunk-GBEOUCBB.js.map} +0 -0
- /package/dist/{chunk-UENKPWCS.js.map → chunk-H2IRSXZN.js.map} +0 -0
- /package/dist/{chunk-CFVTRUR3.js.map → chunk-H6RSANGQ.js.map} +0 -0
- /package/dist/{chunk-EUYWQ7TS.js.map → chunk-IEZ6CGTW.js.map} +0 -0
- /package/dist/{chunk-3SZD4CYO.js.map → chunk-IGZCAHFL.js.map} +0 -0
- /package/dist/{chunk-UPFNQJC7.js.map → chunk-INUBU6I5.js.map} +0 -0
- /package/dist/{chunk-PMVPCZJZ.js.map → chunk-J2R275FN.js.map} +0 -0
- /package/dist/{chunk-2QSZNTDO.js.map → chunk-JBPKEARU.js.map} +0 -0
- /package/dist/{chunk-5ACCD4L7.js.map → chunk-JRRQ747T.js.map} +0 -0
- /package/dist/{chunk-V4IDF3EZ.js.map → chunk-JTWZKNUH.js.map} +0 -0
- /package/dist/{chunk-AZMLH5UT.js.map → chunk-KI64TTBL.js.map} +0 -0
- /package/dist/{chunk-NPIBN2VL.js.map → chunk-LK4TOYPU.js.map} +0 -0
- /package/dist/{chunk-UTQUEHC7.js.map → chunk-LUDBXTBJ.js.map} +0 -0
- /package/dist/{chunk-PU56CXZA.js.map → chunk-LYUUA6QB.js.map} +0 -0
- /package/dist/{chunk-P36Z4JRA.js.map → chunk-M5ERTI4I.js.map} +0 -0
- /package/dist/{chunk-LDKPDODJ.js.map → chunk-ME35HVDJ.js.map} +0 -0
- /package/dist/{chunk-773TRRGT.js.map → chunk-MJUCDM3C.js.map} +0 -0
- /package/dist/{chunk-AHPIFKNG.js.map → chunk-N4F7ZSSG.js.map} +0 -0
- /package/dist/{chunk-JOZUBF4A.js.map → chunk-NACLNNFQ.js.map} +0 -0
- /package/dist/{chunk-LC2BDILZ.js.map → chunk-NBP4EX5N.js.map} +0 -0
- /package/dist/{chunk-T7XP6IZE.js.map → chunk-NFP4KPTA.js.map} +0 -0
- /package/dist/{chunk-ZVPVTPGI.js.map → chunk-NNZFPYYX.js.map} +0 -0
- /package/dist/{chunk-LPNCR4QK.js.map → chunk-NSTNGMSS.js.map} +0 -0
- /package/dist/{chunk-5RWZH6PH.js.map → chunk-NUF7VSEX.js.map} +0 -0
- /package/dist/{chunk-7VZFRUQU.js.map → chunk-O7ERGZDA.js.map} +0 -0
- /package/dist/{chunk-HSZMX3ZJ.js.map → chunk-ODW5GDFE.js.map} +0 -0
- /package/dist/{chunk-5DHKCO52.js.map → chunk-OJUEUQDJ.js.map} +0 -0
- /package/dist/{chunk-LOXHYCVS.js.map → chunk-OMX6TKXH.js.map} +0 -0
- /package/dist/{chunk-J2WC5LF4.js.map → chunk-QBC33MPY.js.map} +0 -0
- /package/dist/{chunk-SEEJOGQX.js.map → chunk-QBNE55VA.js.map} +0 -0
- /package/dist/{chunk-F7XUD3PL.js.map → chunk-S4CDUXQY.js.map} +0 -0
- /package/dist/{chunk-WNXYT4MK.js.map → chunk-S4Z2OBTX.js.map} +0 -0
- /package/dist/{chunk-UL4MKZHI.js.map → chunk-SN4JXNLL.js.map} +0 -0
- /package/dist/{chunk-CAMNRAJF.js.map → chunk-SZMYGDSM.js.map} +0 -0
- /package/dist/{chunk-CPA5NBHN.js.map → chunk-TNGH4ZYI.js.map} +0 -0
- /package/dist/{chunk-F3NVYTTA.js.map → chunk-TNXNECAN.js.map} +0 -0
- /package/dist/{chunk-BEC4YBNA.js.map → chunk-TVW4C7PV.js.map} +0 -0
- /package/dist/{chunk-UFKPQBXH.js.map → chunk-U62OK7BB.js.map} +0 -0
- /package/dist/{chunk-4QEYREAV.js.map → chunk-U6NGKS32.js.map} +0 -0
- /package/dist/{chunk-HRHO3ZNG.js.map → chunk-UW4RYPWC.js.map} +0 -0
- /package/dist/{chunk-T6ILXUAH.js.map → chunk-VG4SSPAW.js.map} +0 -0
- /package/dist/{chunk-H2YSH3DG.js.map → chunk-WKAXBXVA.js.map} +0 -0
- /package/dist/{chunk-SXIMQLGV.js.map → chunk-WVGXCBOC.js.map} +0 -0
- /package/dist/{chunk-UNUMFURP.js.map → chunk-X5PIDJ3L.js.map} +0 -0
- /package/dist/{chunk-CRML27CO.js.map → chunk-X5YYSAZX.js.map} +0 -0
- /package/dist/{chunk-FZEEWOI2.js.map → chunk-XJJYSX6F.js.map} +0 -0
- /package/dist/{chunk-OA2O2GJ4.js.map → chunk-XOHYGIWF.js.map} +0 -0
- /package/dist/{chunk-UG6VXIOK.js.map → chunk-XSTNGNJP.js.map} +0 -0
- /package/dist/{chunk-YDPAE2RD.js.map → chunk-YFLLGRXO.js.map} +0 -0
- /package/dist/{chunk-MDD2RINF.js.map → chunk-YWPLOJ7T.js.map} +0 -0
- /package/dist/{chunk-Q4WONDMJ.js.map → chunk-YYGZJPOK.js.map} +0 -0
- /package/dist/{chunk-GTO56JY5.js.map → chunk-ZPS724LT.js.map} +0 -0
- /package/dist/{chunk-SNOIKAHM.js.map → chunk-ZZZWEDF4.js.map} +0 -0
- /package/dist/{contradiction-scan-AKUWPX5N.js.map → contradiction-scan-NOYMFG66.js.map} +0 -0
- /package/dist/{first-start-migration-4NETATFF.js.map → first-start-migration-KHIMCBIC.js.map} +0 -0
- /package/dist/{purge-GB7PZHT2.js.map → purge-OP6BEDFY.js.map} +0 -0
- /package/dist/{resolution-XWBPKYFB.js.map → recall-state-view-wire.js.map} +0 -0
- /package/dist/{tier-stats-4B5IJ3NE.js.map → tier-stats-2TOW3QNL.js.map} +0 -0
|
@@ -0,0 +1,84 @@
|
|
|
1
|
+
import assert from "node:assert/strict";
|
|
2
|
+
import test from "node:test";
|
|
3
|
+
|
|
4
|
+
import {
|
|
5
|
+
expandRecallNode,
|
|
6
|
+
traverseRecallLink,
|
|
7
|
+
type RecallNavNode,
|
|
8
|
+
} from "./recall-navigate.js";
|
|
9
|
+
|
|
10
|
+
function node(extra: Partial<RecallNavNode> = {}): RecallNavNode {
|
|
11
|
+
return {
|
|
12
|
+
id: "m1",
|
|
13
|
+
disclosure: "chunk",
|
|
14
|
+
...extra,
|
|
15
|
+
};
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
test("expandRecallNode budget 0 is a no-op unavailable", () => {
|
|
19
|
+
const source = node({
|
|
20
|
+
payloads: { section: "full section body" },
|
|
21
|
+
});
|
|
22
|
+
const result = expandRecallNode(source, { budget: 0 });
|
|
23
|
+
assert.equal(result.status, "unavailable");
|
|
24
|
+
if (result.status === "unavailable") {
|
|
25
|
+
assert.equal(result.reason, "budget_off");
|
|
26
|
+
}
|
|
27
|
+
assert.equal("node" in result, false);
|
|
28
|
+
assert.equal(source.disclosure, "chunk");
|
|
29
|
+
});
|
|
30
|
+
|
|
31
|
+
test("traverseRecallLink budget 0 is a no-op unavailable", () => {
|
|
32
|
+
const result = traverseRecallLink(
|
|
33
|
+
node({
|
|
34
|
+
links: [{ targetId: "m2", linkType: "supports" }],
|
|
35
|
+
}),
|
|
36
|
+
"supports",
|
|
37
|
+
{ budget: 0 },
|
|
38
|
+
);
|
|
39
|
+
assert.equal(result.status, "unavailable");
|
|
40
|
+
if (result.status === "unavailable") {
|
|
41
|
+
assert.equal(result.reason, "budget_off");
|
|
42
|
+
}
|
|
43
|
+
assert.equal("neighbors" in result, false);
|
|
44
|
+
});
|
|
45
|
+
|
|
46
|
+
test("unknown linkType throws", () => {
|
|
47
|
+
assert.throws(
|
|
48
|
+
() => traverseRecallLink(node({ links: [] }), "related", { budget: 10 }),
|
|
49
|
+
/unknown recall nav linkType/,
|
|
50
|
+
);
|
|
51
|
+
});
|
|
52
|
+
|
|
53
|
+
test("traverseRecallLink returns neighbors in deterministic targetId order", () => {
|
|
54
|
+
const result = traverseRecallLink(
|
|
55
|
+
node({
|
|
56
|
+
links: [
|
|
57
|
+
{ targetId: "z-mem", linkType: "contradicts" },
|
|
58
|
+
{ targetId: "a-mem", linkType: "contradicts" },
|
|
59
|
+
{ targetId: "m-mem", linkType: "contradicts" },
|
|
60
|
+
{ targetId: "skip-me", linkType: "supports" },
|
|
61
|
+
],
|
|
62
|
+
}),
|
|
63
|
+
"contradicts",
|
|
64
|
+
{ budget: 100 },
|
|
65
|
+
);
|
|
66
|
+
assert.equal(result.status, "ok");
|
|
67
|
+
if (result.status !== "ok") return;
|
|
68
|
+
assert.deepEqual(
|
|
69
|
+
result.neighbors.map((row) => row.id),
|
|
70
|
+
["a-mem", "m-mem", "z-mem"],
|
|
71
|
+
);
|
|
72
|
+
});
|
|
73
|
+
|
|
74
|
+
test("no matching links is empty, not unavailable", () => {
|
|
75
|
+
const result = traverseRecallLink(
|
|
76
|
+
node({
|
|
77
|
+
links: [{ targetId: "x", linkType: "supports" }],
|
|
78
|
+
}),
|
|
79
|
+
"contradicts",
|
|
80
|
+
{ budget: 10 },
|
|
81
|
+
);
|
|
82
|
+
assert.equal(result.status, "empty");
|
|
83
|
+
assert.equal("neighbors" in result, false);
|
|
84
|
+
});
|
|
@@ -0,0 +1,100 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Recall navigation helpers (issue #1956 first slice).
|
|
3
|
+
*
|
|
4
|
+
* Pure expand/traverse over disclosure levels and typed links. No LLM, no IO.
|
|
5
|
+
* Surfaces (MCP/HTTP/CLI) and parseConfig wiring wait for a later PR —
|
|
6
|
+
* config.ts is at its fileSizeGrandfather ceiling.
|
|
7
|
+
*
|
|
8
|
+
* Budget 0 is off (unavailable). Empty means the step ran and found nothing.
|
|
9
|
+
*/
|
|
10
|
+
import {
|
|
11
|
+
RECALL_DISCLOSURE_LEVELS,
|
|
12
|
+
type RecallDisclosure,
|
|
13
|
+
} from "./types.js";
|
|
14
|
+
|
|
15
|
+
export const RECALL_NAV_LINK_TYPES = [
|
|
16
|
+
"supports",
|
|
17
|
+
"contradicts",
|
|
18
|
+
"elaborates",
|
|
19
|
+
"supersedes",
|
|
20
|
+
"causes",
|
|
21
|
+
] as const;
|
|
22
|
+
|
|
23
|
+
export type RecallNavLinkType = (typeof RECALL_NAV_LINK_TYPES)[number];
|
|
24
|
+
|
|
25
|
+
export interface RecallNavBudget {
|
|
26
|
+
budget: number;
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
export interface RecallNavEdge {
|
|
30
|
+
targetId: string;
|
|
31
|
+
linkType: string;
|
|
32
|
+
preview?: string;
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
export interface RecallNavNode {
|
|
36
|
+
id: string;
|
|
37
|
+
disclosure: RecallDisclosure;
|
|
38
|
+
payloads?: Partial<Record<RecallDisclosure, string>>;
|
|
39
|
+
links?: readonly RecallNavEdge[];
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
export interface RecallNavNeighbor {
|
|
43
|
+
id: string;
|
|
44
|
+
linkType: RecallNavLinkType;
|
|
45
|
+
preview?: string;
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
export type RecallNavExpandResult =
|
|
49
|
+
| { status: "ok"; node: { id: string; disclosure: RecallDisclosure; text: string } }
|
|
50
|
+
| { status: "empty" }
|
|
51
|
+
| { status: "unavailable"; reason: "budget_off" };
|
|
52
|
+
|
|
53
|
+
export type RecallNavTraverseResult =
|
|
54
|
+
| { status: "ok"; neighbors: readonly RecallNavNeighbor[] }
|
|
55
|
+
| { status: "empty" }
|
|
56
|
+
| { status: "unavailable"; reason: "budget_off" };
|
|
57
|
+
|
|
58
|
+
export function isRecallNavLinkType(value: unknown): value is RecallNavLinkType {
|
|
59
|
+
return typeof value === "string" && (RECALL_NAV_LINK_TYPES as readonly string[]).includes(value);
|
|
60
|
+
}
|
|
61
|
+
|
|
62
|
+
export function expandRecallNode(
|
|
63
|
+
node: RecallNavNode,
|
|
64
|
+
options: RecallNavBudget,
|
|
65
|
+
): RecallNavExpandResult {
|
|
66
|
+
if (!Number.isFinite(options.budget) || options.budget <= 0) {
|
|
67
|
+
return { status: "unavailable", reason: "budget_off" };
|
|
68
|
+
}
|
|
69
|
+
const current = RECALL_DISCLOSURE_LEVELS.indexOf(node.disclosure);
|
|
70
|
+
const next = current >= 0 ? RECALL_DISCLOSURE_LEVELS[current + 1] : undefined;
|
|
71
|
+
if (next === undefined) return { status: "empty" };
|
|
72
|
+
const text = node.payloads?.[next];
|
|
73
|
+
if (typeof text !== "string") return { status: "empty" };
|
|
74
|
+
return { status: "ok", node: { id: node.id, disclosure: next, text } };
|
|
75
|
+
}
|
|
76
|
+
|
|
77
|
+
export function traverseRecallLink(
|
|
78
|
+
from: RecallNavNode,
|
|
79
|
+
linkType: string,
|
|
80
|
+
options: RecallNavBudget,
|
|
81
|
+
): RecallNavTraverseResult {
|
|
82
|
+
if (!isRecallNavLinkType(linkType)) {
|
|
83
|
+
throw new Error(
|
|
84
|
+
`unknown recall nav linkType: ${JSON.stringify(linkType)}. Valid: ${RECALL_NAV_LINK_TYPES.join(", ")}`,
|
|
85
|
+
);
|
|
86
|
+
}
|
|
87
|
+
if (!Number.isFinite(options.budget) || options.budget <= 0) {
|
|
88
|
+
return { status: "unavailable", reason: "budget_off" };
|
|
89
|
+
}
|
|
90
|
+
const neighbors = (from.links ?? [])
|
|
91
|
+
.filter((link) => link.linkType === linkType)
|
|
92
|
+
.map((link) => {
|
|
93
|
+
const neighbor: RecallNavNeighbor = { id: link.targetId, linkType };
|
|
94
|
+
if (link.preview !== undefined) neighbor.preview = link.preview;
|
|
95
|
+
return neighbor;
|
|
96
|
+
})
|
|
97
|
+
.sort((a, b) => a.id.localeCompare(b.id, "en"));
|
|
98
|
+
if (neighbors.length === 0) return { status: "empty" };
|
|
99
|
+
return { status: "ok", neighbors };
|
|
100
|
+
}
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
import assert from "node:assert/strict";
|
|
2
|
+
import test from "node:test";
|
|
3
|
+
|
|
4
|
+
import { applyRecallStateViews } from "./recall-state-view-wire.js";
|
|
5
|
+
import type { StateViewResult } from "./recall-state-view.js";
|
|
6
|
+
|
|
7
|
+
function fact(id: string, extra: Partial<StateViewResult> = {}): StateViewResult {
|
|
8
|
+
return { id, ...extra };
|
|
9
|
+
}
|
|
10
|
+
|
|
11
|
+
const PAIR: StateViewResult[] = [
|
|
12
|
+
fact("new-job", { status: "active" }),
|
|
13
|
+
fact("old-job", { status: "superseded", supersededBy: "new-job", supersededAt: "2026-03-01" }),
|
|
14
|
+
];
|
|
15
|
+
|
|
16
|
+
test("recallStateViews false is identity (same array reference)", () => {
|
|
17
|
+
const input = PAIR.map((row) => ({ ...row }));
|
|
18
|
+
assert.equal(applyRecallStateViews(input, "when did the job title change", {}), input);
|
|
19
|
+
assert.equal(
|
|
20
|
+
applyRecallStateViews(input, "when did the job title change", { recallStateViews: false }),
|
|
21
|
+
input,
|
|
22
|
+
);
|
|
23
|
+
assert.equal(input[0]?.stateLabel, undefined);
|
|
24
|
+
});
|
|
25
|
+
|
|
26
|
+
test("change-intent query labels a synthetic superseded pair when recallStateViews is on", () => {
|
|
27
|
+
const labeled = applyRecallStateViews(PAIR, "when did the job title change", {
|
|
28
|
+
recallStateViews: true,
|
|
29
|
+
});
|
|
30
|
+
assert.equal(labeled.length, 2);
|
|
31
|
+
assert.equal(labeled[0]?.id, "new-job");
|
|
32
|
+
assert.equal(labeled[0]?.stateLabel, "current");
|
|
33
|
+
assert.equal(labeled[1]?.id, "old-job");
|
|
34
|
+
assert.equal(labeled[1]?.stateLabel, "historical");
|
|
35
|
+
});
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Recall inject seam for state views (issue #1952).
|
|
3
|
+
*
|
|
4
|
+
* parseConfig cannot grow (fileSizeGrandfather). Operators set
|
|
5
|
+
* `recallStateViews` on the live PluginConfig extra field. Default false
|
|
6
|
+
* is identity. Use parseRecallStateViews — do not read a scattered
|
|
7
|
+
* config flag property here.
|
|
8
|
+
*/
|
|
9
|
+
|
|
10
|
+
import {
|
|
11
|
+
annotateStateView,
|
|
12
|
+
parseRecallStateViews,
|
|
13
|
+
type StateViewResult,
|
|
14
|
+
} from "./recall-state-view.js";
|
|
15
|
+
|
|
16
|
+
export function applyRecallStateViews<T extends StateViewResult>(
|
|
17
|
+
results: T[],
|
|
18
|
+
query: string,
|
|
19
|
+
config: unknown,
|
|
20
|
+
): T[] {
|
|
21
|
+
const raw =
|
|
22
|
+
typeof config === "object" && config !== null && "recallStateViews" in config
|
|
23
|
+
? (config as { recallStateViews?: unknown }).recallStateViews
|
|
24
|
+
: undefined;
|
|
25
|
+
return annotateStateView(results, query, [], {
|
|
26
|
+
enabled: parseRecallStateViews(raw),
|
|
27
|
+
});
|
|
28
|
+
}
|
|
@@ -0,0 +1,131 @@
|
|
|
1
|
+
import assert from "node:assert/strict";
|
|
2
|
+
import test from "node:test";
|
|
3
|
+
|
|
4
|
+
import {
|
|
5
|
+
annotateStateView,
|
|
6
|
+
formatSupersededPrefix,
|
|
7
|
+
isChangeOrientedQuery,
|
|
8
|
+
parseRecallStateViews,
|
|
9
|
+
shouldWidenSuperseded,
|
|
10
|
+
type StateViewChain,
|
|
11
|
+
type StateViewResult,
|
|
12
|
+
} from "./recall-state-view.js";
|
|
13
|
+
|
|
14
|
+
function fact(id: string, extra: Partial<StateViewResult> = {}): StateViewResult {
|
|
15
|
+
return { id, ...extra };
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
const PAIR: StateViewChain[] = [{ predecessorId: "old-job", successorId: "new-job", supersededAt: "2026-03-01" }];
|
|
19
|
+
|
|
20
|
+
const PAIR_RESULTS: StateViewResult[] = [
|
|
21
|
+
fact("new-job", { status: "active" }),
|
|
22
|
+
fact("old-job", { status: "superseded", supersededBy: "new-job", supersededAt: "2026-03-01" }),
|
|
23
|
+
];
|
|
24
|
+
|
|
25
|
+
test("change-intent query labels both facts in a superseded pair", () => {
|
|
26
|
+
const labeled = annotateStateView(PAIR_RESULTS, "when did the job title change", PAIR, { enabled: true });
|
|
27
|
+
assert.equal(labeled.length, 2);
|
|
28
|
+
assert.equal(labeled[0]?.id, "new-job");
|
|
29
|
+
assert.equal(labeled[0]?.stateLabel, "current");
|
|
30
|
+
assert.equal(labeled[1]?.id, "old-job");
|
|
31
|
+
assert.equal(labeled[1]?.stateLabel, "historical");
|
|
32
|
+
});
|
|
33
|
+
|
|
34
|
+
test("change-intent conjugations fire the annotator", () => {
|
|
35
|
+
const phrases = [
|
|
36
|
+
"when did we switch",
|
|
37
|
+
"we used to",
|
|
38
|
+
"before the move",
|
|
39
|
+
"after the cutover",
|
|
40
|
+
"they switched vendors",
|
|
41
|
+
"she switches stacks",
|
|
42
|
+
"switching away from it",
|
|
43
|
+
"the title changed",
|
|
44
|
+
"it changes next week",
|
|
45
|
+
"they are changing providers",
|
|
46
|
+
];
|
|
47
|
+
for (const query of phrases) {
|
|
48
|
+
assert.equal(isChangeOrientedQuery(query), true, query);
|
|
49
|
+
const labeled = annotateStateView(PAIR_RESULTS, query, PAIR, { enabled: true });
|
|
50
|
+
assert.equal(labeled[0]?.stateLabel, "current", query);
|
|
51
|
+
assert.equal(labeled[1]?.stateLabel, "historical", query);
|
|
52
|
+
}
|
|
53
|
+
});
|
|
54
|
+
|
|
55
|
+
test("non-change query is identical (same array reference, no labels)", () => {
|
|
56
|
+
const input = PAIR_RESULTS.map((row) => ({ ...row }));
|
|
57
|
+
const out = annotateStateView(input, "what is the current job title", PAIR, { enabled: true });
|
|
58
|
+
assert.equal(out, input);
|
|
59
|
+
assert.equal(out[0]?.stateLabel, undefined);
|
|
60
|
+
assert.equal(out[1]?.stateLabel, undefined);
|
|
61
|
+
});
|
|
62
|
+
|
|
63
|
+
test("recallStateViews false is identity (same array reference)", () => {
|
|
64
|
+
const input = PAIR_RESULTS.map((row) => ({ ...row }));
|
|
65
|
+
assert.equal(annotateStateView(input, "when did the job title change", PAIR), input);
|
|
66
|
+
assert.equal(annotateStateView(input, "when did the job title change", PAIR, { enabled: false }), input);
|
|
67
|
+
assert.equal(input[0]?.stateLabel, undefined);
|
|
68
|
+
});
|
|
69
|
+
|
|
70
|
+
test("superseded never appears without its successor", () => {
|
|
71
|
+
const orphan = [fact("old-job", { status: "superseded", supersededBy: "new-job" })];
|
|
72
|
+
const out = annotateStateView(orphan, "when did this change", PAIR, { enabled: true });
|
|
73
|
+
assert.deepEqual(out, []);
|
|
74
|
+
assert.equal(shouldWidenSuperseded("new-job", new Set(["old-job"])), false);
|
|
75
|
+
assert.equal(shouldWidenSuperseded("new-job", new Set(["old-job", "new-job"])), true);
|
|
76
|
+
assert.equal(shouldWidenSuperseded(undefined, new Set(["new-job"])), false);
|
|
77
|
+
});
|
|
78
|
+
|
|
79
|
+
test("annotateStateView is sort-stable", () => {
|
|
80
|
+
const reversed = [PAIR_RESULTS[1]!, PAIR_RESULTS[0]!];
|
|
81
|
+
const labeled = annotateStateView(reversed, "when did the title change", PAIR, { enabled: true });
|
|
82
|
+
assert.deepEqual(
|
|
83
|
+
labeled.map((row) => row.id),
|
|
84
|
+
["old-job", "new-job"],
|
|
85
|
+
);
|
|
86
|
+
assert.equal(labeled[0]?.stateLabel, "historical");
|
|
87
|
+
assert.equal(labeled[1]?.stateLabel, "current");
|
|
88
|
+
});
|
|
89
|
+
|
|
90
|
+
test("middle hop of a three-node chain is transition", () => {
|
|
91
|
+
const chains: StateViewChain[] = [
|
|
92
|
+
{ predecessorId: "v1", successorId: "v2" },
|
|
93
|
+
{ predecessorId: "v2", successorId: "v3" },
|
|
94
|
+
];
|
|
95
|
+
const results = [
|
|
96
|
+
fact("v1", { status: "superseded", supersededBy: "v2" }),
|
|
97
|
+
fact("v2", { status: "superseded", supersededBy: "v3" }),
|
|
98
|
+
fact("v3", { status: "active" }),
|
|
99
|
+
];
|
|
100
|
+
const labeled = annotateStateView(results, "what changed", chains, { enabled: true });
|
|
101
|
+
assert.deepEqual(
|
|
102
|
+
labeled.map((row) => [row.id, row.stateLabel]),
|
|
103
|
+
[
|
|
104
|
+
["v1", "historical"],
|
|
105
|
+
["v2", "transition"],
|
|
106
|
+
["v3", "current"],
|
|
107
|
+
],
|
|
108
|
+
);
|
|
109
|
+
});
|
|
110
|
+
|
|
111
|
+
test("formatSupersededPrefix matches the injected-block contract", () => {
|
|
112
|
+
assert.equal(formatSupersededPrefix("2026-03-01", "new-job"), "[superseded 2026-03-01 by new-job]");
|
|
113
|
+
});
|
|
114
|
+
|
|
115
|
+
test("parseRecallStateViews honors 0/false and defaults off", () => {
|
|
116
|
+
assert.equal(parseRecallStateViews(undefined), false);
|
|
117
|
+
assert.equal(parseRecallStateViews(false), false);
|
|
118
|
+
assert.equal(parseRecallStateViews(0), false);
|
|
119
|
+
assert.equal(parseRecallStateViews("false"), false);
|
|
120
|
+
assert.equal(parseRecallStateViews("0"), false);
|
|
121
|
+
assert.equal(parseRecallStateViews(true), true);
|
|
122
|
+
assert.equal(parseRecallStateViews(1), true);
|
|
123
|
+
assert.equal(parseRecallStateViews("true"), true);
|
|
124
|
+
});
|
|
125
|
+
|
|
126
|
+
test("annotateStateView does not mutate input rows", () => {
|
|
127
|
+
const input = PAIR_RESULTS.map((row) => ({ ...row }));
|
|
128
|
+
annotateStateView(input, "when did this change", PAIR, { enabled: true });
|
|
129
|
+
assert.equal(input[0]?.stateLabel, undefined);
|
|
130
|
+
assert.equal(input[1]?.stateLabel, undefined);
|
|
131
|
+
});
|
|
@@ -0,0 +1,138 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Recall state views (issue #1952).
|
|
3
|
+
*
|
|
4
|
+
* Config key: `recallStateViews` (default false). When false, annotateStateView
|
|
5
|
+
* is identity: same array reference, no `stateLabel`. config.ts is at its
|
|
6
|
+
* fileSizeGrandfather ceiling, so parseConfig wiring waits for a later PR.
|
|
7
|
+
* Call `parseRecallStateViews` at the recall seam when that lands.
|
|
8
|
+
*
|
|
9
|
+
* Change-intent morphology lives here (do not grow intent.ts). A superseded
|
|
10
|
+
* memory is admitted only when its successor is also in the candidate set.
|
|
11
|
+
*/
|
|
12
|
+
import { coerceBooleanLike } from "./connectors/coerce.js";
|
|
13
|
+
|
|
14
|
+
export type StateLabel = "current" | "historical" | "transition";
|
|
15
|
+
|
|
16
|
+
export interface StateViewChain {
|
|
17
|
+
predecessorId: string;
|
|
18
|
+
successorId: string;
|
|
19
|
+
supersededAt?: string;
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
export interface StateViewResult {
|
|
23
|
+
id?: string;
|
|
24
|
+
docid?: string;
|
|
25
|
+
status?: string;
|
|
26
|
+
supersededBy?: string;
|
|
27
|
+
supersededAt?: string;
|
|
28
|
+
stateLabel?: StateLabel;
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
export const DEFAULT_RECALL_STATE_VIEWS = false;
|
|
32
|
+
|
|
33
|
+
const CHANGE_WORDS = ["before", "after", "switch", "switches", "switched", "switching", "change", "changes", "changed", "changing"];
|
|
34
|
+
|
|
35
|
+
export function parseRecallStateViews(raw: unknown): boolean {
|
|
36
|
+
return coerceBooleanLike(raw, "recallStateViews") === true;
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
export function isChangeOrientedQuery(query: string): boolean {
|
|
40
|
+
const lower = query.toLowerCase();
|
|
41
|
+
if (lower.includes("when did") || lower.includes("used to")) return true;
|
|
42
|
+
return CHANGE_WORDS.some((word) => {
|
|
43
|
+
const idx = lower.indexOf(word);
|
|
44
|
+
if (idx < 0) return false;
|
|
45
|
+
const before = idx === 0 || !/[a-z0-9]/.test(lower[idx - 1] ?? "");
|
|
46
|
+
const afterIdx = idx + word.length;
|
|
47
|
+
const after = afterIdx >= lower.length || !/[a-z0-9]/.test(lower[afterIdx] ?? "");
|
|
48
|
+
return before && after;
|
|
49
|
+
});
|
|
50
|
+
}
|
|
51
|
+
|
|
52
|
+
export function shouldWidenSuperseded(
|
|
53
|
+
successorId: string | undefined,
|
|
54
|
+
candidateIds: ReadonlySet<string>,
|
|
55
|
+
): boolean {
|
|
56
|
+
return typeof successorId === "string" && successorId.length > 0 && candidateIds.has(successorId);
|
|
57
|
+
}
|
|
58
|
+
|
|
59
|
+
export function formatSupersededPrefix(date: string, successorId: string): string {
|
|
60
|
+
return `[superseded ${date} by ${successorId}]`;
|
|
61
|
+
}
|
|
62
|
+
|
|
63
|
+
export function resultStateViewId(result: StateViewResult): string {
|
|
64
|
+
return result.id ?? result.docid ?? "";
|
|
65
|
+
}
|
|
66
|
+
|
|
67
|
+
function buildSuccessorMap(results: readonly StateViewResult[], chains: readonly StateViewChain[]): Map<string, string> {
|
|
68
|
+
const byPred = new Map<string, string>();
|
|
69
|
+
for (const chain of chains) {
|
|
70
|
+
if (chain.predecessorId && chain.successorId) {
|
|
71
|
+
byPred.set(chain.predecessorId, chain.successorId);
|
|
72
|
+
}
|
|
73
|
+
}
|
|
74
|
+
for (const result of results) {
|
|
75
|
+
const id = resultStateViewId(result);
|
|
76
|
+
if (id && result.supersededBy) byPred.set(id, result.supersededBy);
|
|
77
|
+
}
|
|
78
|
+
return byPred;
|
|
79
|
+
}
|
|
80
|
+
|
|
81
|
+
function labelFor(
|
|
82
|
+
id: string,
|
|
83
|
+
result: StateViewResult,
|
|
84
|
+
byPred: Map<string, string>,
|
|
85
|
+
admittedIds: ReadonlySet<string>,
|
|
86
|
+
): StateLabel {
|
|
87
|
+
const successorId = result.supersededBy ?? byPred.get(id);
|
|
88
|
+
const isPred = shouldWidenSuperseded(successorId, admittedIds);
|
|
89
|
+
let isSucc = false;
|
|
90
|
+
for (const [predId, succId] of byPred) {
|
|
91
|
+
if (succId === id && admittedIds.has(predId)) {
|
|
92
|
+
isSucc = true;
|
|
93
|
+
break;
|
|
94
|
+
}
|
|
95
|
+
}
|
|
96
|
+
if (isPred && isSucc) return "transition";
|
|
97
|
+
if (isPred) return "historical";
|
|
98
|
+
if (isSucc) return "current";
|
|
99
|
+
return result.status === "superseded" ? "historical" : "current";
|
|
100
|
+
}
|
|
101
|
+
|
|
102
|
+
export function annotateStateView<T extends StateViewResult>(
|
|
103
|
+
results: T[],
|
|
104
|
+
query: string,
|
|
105
|
+
chains: readonly StateViewChain[],
|
|
106
|
+
options: { enabled?: boolean } = {},
|
|
107
|
+
): T[] {
|
|
108
|
+
const enabled = options.enabled === true;
|
|
109
|
+
if (!enabled || !isChangeOrientedQuery(query)) return results;
|
|
110
|
+
|
|
111
|
+
const byPred = buildSuccessorMap(results, chains);
|
|
112
|
+
const candidateIds = new Set<string>();
|
|
113
|
+
for (const result of results) {
|
|
114
|
+
const id = resultStateViewId(result);
|
|
115
|
+
if (id) candidateIds.add(id);
|
|
116
|
+
}
|
|
117
|
+
|
|
118
|
+
const admitted: T[] = [];
|
|
119
|
+
for (const result of results) {
|
|
120
|
+
const id = resultStateViewId(result);
|
|
121
|
+
const successorId = result.supersededBy ?? byPred.get(id);
|
|
122
|
+
const superseded = result.status === "superseded" || Boolean(result.supersededBy) || byPred.has(id);
|
|
123
|
+
if (!superseded || shouldWidenSuperseded(successorId, candidateIds)) {
|
|
124
|
+
admitted.push(result);
|
|
125
|
+
}
|
|
126
|
+
}
|
|
127
|
+
|
|
128
|
+
const admittedIds = new Set<string>();
|
|
129
|
+
for (const result of admitted) {
|
|
130
|
+
const id = resultStateViewId(result);
|
|
131
|
+
if (id) admittedIds.add(id);
|
|
132
|
+
}
|
|
133
|
+
|
|
134
|
+
return admitted.map((result) => {
|
|
135
|
+
const id = resultStateViewId(result);
|
|
136
|
+
return { ...result, stateLabel: labelFor(id, result, byPred, admittedIds) };
|
|
137
|
+
});
|
|
138
|
+
}
|
package/src/schemas.ts
CHANGED
|
@@ -181,7 +181,7 @@ export const ExtractedFactSchema = z.object({
|
|
|
181
181
|
.optional()
|
|
182
182
|
.nullable()
|
|
183
183
|
.describe(
|
|
184
|
-
'For category "reasoning_trace" only: a stored solution chain with ordered steps, a final answer, and an optional observed outcome. Require at least two steps.',
|
|
184
|
+
'For category "reasoning_trace" only: a stored solution chain with ordered steps, a final answer, and an optional observed outcome. Require at least two steps. IMPORTANT: must include a non-empty finalAnswer (or final_answer) — the JSON Schema sent to providers cannot enforce this constraint.',
|
|
185
185
|
),
|
|
186
186
|
eventTime: z
|
|
187
187
|
.string()
|
|
@@ -350,6 +350,22 @@ export const ExtractionResultSchema = z.object({
|
|
|
350
350
|
),
|
|
351
351
|
});
|
|
352
352
|
|
|
353
|
+
/**
|
|
354
|
+
* Provider-facing extraction contract. Keep this free of transforms/refinements:
|
|
355
|
+
* JSON Schema generators cannot faithfully represent salvageArray's ZodEffects.
|
|
356
|
+
* ExtractionResultSchema remains the authoritative tolerant parser after the
|
|
357
|
+
* provider returns.
|
|
358
|
+
*/
|
|
359
|
+
export const ExtractionProviderOutputSchema = z.object({
|
|
360
|
+
facts: z.array(ExtractedFactSchema),
|
|
361
|
+
profileUpdates: z.array(z.string()),
|
|
362
|
+
entities: z.array(EntityMentionSchema),
|
|
363
|
+
questions: z.array(ExtractedQuestionSchema),
|
|
364
|
+
identityReflection: z.string().optional().nullable(),
|
|
365
|
+
episodeTitle: z.string().optional().nullable(),
|
|
366
|
+
relationships: z.array(ExtractedRelationshipSchema).optional().nullable(),
|
|
367
|
+
});
|
|
368
|
+
|
|
353
369
|
export const ConsolidationItemSchema = z.object({
|
|
354
370
|
existingId: z
|
|
355
371
|
.string()
|
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
import assert from "node:assert/strict";
|
|
2
|
+
import { test } from "node:test";
|
|
3
|
+
|
|
4
|
+
import {
|
|
5
|
+
applyDefaultEnvelope,
|
|
6
|
+
isExpired,
|
|
7
|
+
parseSharedEnvelope,
|
|
8
|
+
} from "./governance.js";
|
|
9
|
+
|
|
10
|
+
test("applyDefaultEnvelope defaults to informational with no expiry", () => {
|
|
11
|
+
assert.deepEqual(applyDefaultEnvelope(), { authority: "informational" });
|
|
12
|
+
assert.deepEqual(applyDefaultEnvelope({}), { authority: "informational" });
|
|
13
|
+
assert.deepEqual(applyDefaultEnvelope({ authority: "advisory", sharedBy: "agent-a" }), {
|
|
14
|
+
authority: "advisory",
|
|
15
|
+
sharedBy: "agent-a",
|
|
16
|
+
});
|
|
17
|
+
});
|
|
18
|
+
|
|
19
|
+
test("applyDefaultEnvelope rejects binding without an explicit flag", () => {
|
|
20
|
+
assert.throws(() => applyDefaultEnvelope({ authority: "binding" }), /binding/);
|
|
21
|
+
assert.deepEqual(applyDefaultEnvelope({ authority: "binding" }, { binding: true }), {
|
|
22
|
+
authority: "binding",
|
|
23
|
+
});
|
|
24
|
+
});
|
|
25
|
+
|
|
26
|
+
test("isExpired treats expiresAt as a half-open upper bound", () => {
|
|
27
|
+
const expiresAt = "2026-08-18T12:00:00.000Z";
|
|
28
|
+
const at = Date.parse(expiresAt);
|
|
29
|
+
const envelope = { authority: "informational" as const, expiresAt };
|
|
30
|
+
assert.equal(isExpired(envelope, at - 1), false);
|
|
31
|
+
assert.equal(isExpired(envelope, at), true);
|
|
32
|
+
assert.equal(isExpired({}, at), false);
|
|
33
|
+
});
|
|
34
|
+
|
|
35
|
+
test("parseSharedEnvelope treats a missing legacy envelope as informational with no expiry", () => {
|
|
36
|
+
assert.deepEqual(parseSharedEnvelope(undefined), { authority: "informational" });
|
|
37
|
+
assert.deepEqual(parseSharedEnvelope(null), { authority: "informational" });
|
|
38
|
+
assert.deepEqual(parseSharedEnvelope({ title: "legacy output" }), { authority: "informational" });
|
|
39
|
+
assert.deepEqual(
|
|
40
|
+
parseSharedEnvelope({
|
|
41
|
+
sharedBy: "agent-a",
|
|
42
|
+
authority: "advisory",
|
|
43
|
+
expiresAt: "2026-08-18T12:00:00.000Z",
|
|
44
|
+
supersedes: "item-1",
|
|
45
|
+
}),
|
|
46
|
+
{
|
|
47
|
+
sharedBy: "agent-a",
|
|
48
|
+
authority: "advisory",
|
|
49
|
+
expiresAt: "2026-08-18T12:00:00.000Z",
|
|
50
|
+
supersedes: "item-1",
|
|
51
|
+
},
|
|
52
|
+
);
|
|
53
|
+
});
|
|
@@ -0,0 +1,86 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Shared-item authority envelope (issue #1957).
|
|
3
|
+
*
|
|
4
|
+
* First slice: parse + default + expiry only. Write-path wiring and
|
|
5
|
+
* curation come later. Binding is never inferred.
|
|
6
|
+
*/
|
|
7
|
+
|
|
8
|
+
export const SHARED_AUTHORITIES = ["informational", "advisory", "binding"] as const;
|
|
9
|
+
export type SharedAuthority = (typeof SHARED_AUTHORITIES)[number];
|
|
10
|
+
|
|
11
|
+
export interface SharedEnvelope {
|
|
12
|
+
sharedBy?: string;
|
|
13
|
+
authority: SharedAuthority;
|
|
14
|
+
expiresAt?: string;
|
|
15
|
+
supersedes?: string;
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
export interface SharedEnvelopeInput {
|
|
19
|
+
sharedBy?: string;
|
|
20
|
+
authority?: string;
|
|
21
|
+
expiresAt?: string;
|
|
22
|
+
supersedes?: string;
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
export interface ApplyDefaultEnvelopeOptions {
|
|
26
|
+
binding?: boolean;
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
function isSharedAuthority(value: string): value is SharedAuthority {
|
|
30
|
+
return (SHARED_AUTHORITIES as readonly string[]).includes(value);
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
function optionalString(value: unknown): string | undefined {
|
|
34
|
+
if (typeof value !== "string") return undefined;
|
|
35
|
+
const trimmed = value.trim();
|
|
36
|
+
return trimmed.length > 0 ? trimmed : undefined;
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
function withOptionalFields(
|
|
40
|
+
authority: SharedAuthority,
|
|
41
|
+
source: { sharedBy?: unknown; expiresAt?: unknown; supersedes?: unknown },
|
|
42
|
+
): SharedEnvelope {
|
|
43
|
+
const envelope: SharedEnvelope = { authority };
|
|
44
|
+
const sharedBy = optionalString(source.sharedBy);
|
|
45
|
+
const expiresAt = optionalString(source.expiresAt);
|
|
46
|
+
const supersedes = optionalString(source.supersedes);
|
|
47
|
+
if (sharedBy) envelope.sharedBy = sharedBy;
|
|
48
|
+
if (expiresAt) envelope.expiresAt = expiresAt;
|
|
49
|
+
if (supersedes) envelope.supersedes = supersedes;
|
|
50
|
+
return envelope;
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
export function applyDefaultEnvelope(
|
|
54
|
+
input: SharedEnvelopeInput = {},
|
|
55
|
+
options: ApplyDefaultEnvelopeOptions = {},
|
|
56
|
+
): SharedEnvelope {
|
|
57
|
+
const requested = optionalString(input.authority);
|
|
58
|
+
if (requested !== undefined && !isSharedAuthority(requested)) {
|
|
59
|
+
throw new Error(
|
|
60
|
+
`applyDefaultEnvelope: authority must be informational, advisory, or binding; got ${JSON.stringify(requested)}`,
|
|
61
|
+
);
|
|
62
|
+
}
|
|
63
|
+
if (requested === "binding" && options.binding !== true) {
|
|
64
|
+
throw new Error("applyDefaultEnvelope: authority \"binding\" requires an explicit binding flag");
|
|
65
|
+
}
|
|
66
|
+
return withOptionalFields(requested ?? "informational", input);
|
|
67
|
+
}
|
|
68
|
+
|
|
69
|
+
export function parseSharedEnvelope(raw: unknown): SharedEnvelope {
|
|
70
|
+
if (typeof raw !== "object" || raw === null || Array.isArray(raw)) {
|
|
71
|
+
return { authority: "informational" };
|
|
72
|
+
}
|
|
73
|
+
const record = raw as Record<string, unknown>;
|
|
74
|
+
const requested = optionalString(record.authority);
|
|
75
|
+
const authority = requested !== undefined && isSharedAuthority(requested) ? requested : "informational";
|
|
76
|
+
return withOptionalFields(authority, record);
|
|
77
|
+
}
|
|
78
|
+
|
|
79
|
+
export function isExpired(envelope: Pick<SharedEnvelope, "expiresAt">, nowMs: number): boolean {
|
|
80
|
+
if (!Number.isFinite(nowMs)) return false;
|
|
81
|
+
const expiresAt = envelope.expiresAt?.trim();
|
|
82
|
+
if (!expiresAt) return false;
|
|
83
|
+
const expiresAtMs = Date.parse(expiresAt);
|
|
84
|
+
if (!Number.isFinite(expiresAtMs)) return false;
|
|
85
|
+
return expiresAtMs <= nowMs;
|
|
86
|
+
}
|