@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,101 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Managed-region vault publisher (issue #1985 first slice).
|
|
3
|
+
*
|
|
4
|
+
* Replaces only the bytes between `<!-- remnic:<name>:start -->` and
|
|
5
|
+
* `<!-- remnic:<name>:end -->`. Missing markers leave the file unchanged.
|
|
6
|
+
* `activity.timeline.vault.enabled` stays default-false until a later parse
|
|
7
|
+
* slice; this module does not read config.
|
|
8
|
+
*/
|
|
9
|
+
import { createHash, randomBytes } from "node:crypto";
|
|
10
|
+
import { readFileSync, renameSync, statSync, unlinkSync, writeFileSync } from "node:fs";
|
|
11
|
+
import path from "node:path";
|
|
12
|
+
|
|
13
|
+
import { expandTildePath } from "../utils/path.js";
|
|
14
|
+
|
|
15
|
+
export type ApplyManagedRegionResult =
|
|
16
|
+
| { ok: true; text: string }
|
|
17
|
+
| { ok: false; reason: "no_marker"; text: string };
|
|
18
|
+
|
|
19
|
+
export type PublishVaultRegionResult =
|
|
20
|
+
| { ok: true; status: "updated" | "unchanged" }
|
|
21
|
+
| { ok: false; reason: "no_marker" | "missing_file" | "not_directory" };
|
|
22
|
+
|
|
23
|
+
export function applyManagedRegion(
|
|
24
|
+
fileText: string,
|
|
25
|
+
opts: { strategy: "markers"; name: string; content: string },
|
|
26
|
+
): ApplyManagedRegionResult {
|
|
27
|
+
const startMarker = `<!-- remnic:${opts.name}:start -->`;
|
|
28
|
+
const endMarker = `<!-- remnic:${opts.name}:end -->`;
|
|
29
|
+
const startIdx = fileText.indexOf(startMarker);
|
|
30
|
+
if (startIdx === -1) return { ok: false, reason: "no_marker", text: fileText };
|
|
31
|
+
const endIdx = fileText.indexOf(endMarker, startIdx + startMarker.length);
|
|
32
|
+
if (endIdx === -1) return { ok: false, reason: "no_marker", text: fileText };
|
|
33
|
+
|
|
34
|
+
const eol = fileText.includes("\r\n") ? "\r\n" : "\n";
|
|
35
|
+
let body = opts.content.replace(/\r\n/g, "\n").replace(/\r/g, "\n");
|
|
36
|
+
if (eol === "\r\n") body = body.replace(/\n/g, "\r\n");
|
|
37
|
+
if (body.endsWith(eol)) body = body.slice(0, -eol.length);
|
|
38
|
+
|
|
39
|
+
return {
|
|
40
|
+
ok: true,
|
|
41
|
+
text: `${fileText.slice(0, startIdx + startMarker.length)}${eol}${body}${eol}${fileText.slice(endIdx)}`,
|
|
42
|
+
};
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
export function publishVaultRegion(input: {
|
|
46
|
+
vaultPath: string;
|
|
47
|
+
relativeFile: string;
|
|
48
|
+
name: string;
|
|
49
|
+
content: string;
|
|
50
|
+
}): PublishVaultRegionResult {
|
|
51
|
+
const vault = expandTildePath(input.vaultPath);
|
|
52
|
+
try {
|
|
53
|
+
if (!statSync(vault).isDirectory()) return { ok: false, reason: "not_directory" };
|
|
54
|
+
} catch {
|
|
55
|
+
return { ok: false, reason: "not_directory" };
|
|
56
|
+
}
|
|
57
|
+
|
|
58
|
+
if (input.relativeFile.length === 0 || path.isAbsolute(input.relativeFile)) {
|
|
59
|
+
return { ok: false, reason: "missing_file" };
|
|
60
|
+
}
|
|
61
|
+
const root = path.resolve(vault);
|
|
62
|
+
const dest = path.resolve(root, input.relativeFile);
|
|
63
|
+
const rel = path.relative(root, dest);
|
|
64
|
+
if (rel.length === 0 || rel.startsWith("..") || path.isAbsolute(rel)) {
|
|
65
|
+
return { ok: false, reason: "missing_file" };
|
|
66
|
+
}
|
|
67
|
+
|
|
68
|
+
let existing: string;
|
|
69
|
+
try {
|
|
70
|
+
if (!statSync(dest).isFile()) return { ok: false, reason: "missing_file" };
|
|
71
|
+
existing = readFileSync(dest, "utf8");
|
|
72
|
+
} catch (err) {
|
|
73
|
+
if ((err as NodeJS.ErrnoException).code === "ENOENT") return { ok: false, reason: "missing_file" };
|
|
74
|
+
throw err;
|
|
75
|
+
}
|
|
76
|
+
|
|
77
|
+
const applied = applyManagedRegion(existing, {
|
|
78
|
+
strategy: "markers",
|
|
79
|
+
name: input.name,
|
|
80
|
+
content: input.content,
|
|
81
|
+
});
|
|
82
|
+
if (!applied.ok) return { ok: false, reason: applied.reason };
|
|
83
|
+
|
|
84
|
+
const prevHash = createHash("sha256").update(existing, "utf8").digest("hex");
|
|
85
|
+
const nextHash = createHash("sha256").update(applied.text, "utf8").digest("hex");
|
|
86
|
+
if (prevHash === nextHash) return { ok: true, status: "unchanged" };
|
|
87
|
+
|
|
88
|
+
const tmpPath = path.join(path.dirname(dest), `.remnic-vault-${randomBytes(8).toString("hex")}.tmp`);
|
|
89
|
+
writeFileSync(tmpPath, applied.text);
|
|
90
|
+
try {
|
|
91
|
+
renameSync(tmpPath, dest);
|
|
92
|
+
} catch (renameErr) {
|
|
93
|
+
try {
|
|
94
|
+
unlinkSync(tmpPath);
|
|
95
|
+
} catch {
|
|
96
|
+
// temp cleanup is best-effort
|
|
97
|
+
}
|
|
98
|
+
throw renameErr;
|
|
99
|
+
}
|
|
100
|
+
return { ok: true, status: "updated" };
|
|
101
|
+
}
|
package/src/cli/okf-commands.ts
CHANGED
|
@@ -1,6 +1,8 @@
|
|
|
1
|
+
import path from "node:path";
|
|
1
2
|
import type { Orchestrator } from "../orchestrator.js";
|
|
2
3
|
import type { CliCommand } from "../cli.js";
|
|
3
4
|
import { runOkfCliCommand } from "../okf/cli.js";
|
|
5
|
+
import { exportOkfBundle, parseIncludeStatus } from "../transfer/export-okf.js";
|
|
4
6
|
|
|
5
7
|
export function registerOkfCommands(cmd: CliCommand, orchestrator: Orchestrator): void {
|
|
6
8
|
const okfCmd = cmd.command("okf").description("OKF v0.1 conformance (lint, sweep)");
|
|
@@ -9,6 +11,7 @@ export function registerOkfCommands(cmd: CliCommand, orchestrator: Orchestrator)
|
|
|
9
11
|
memoryDir: orchestrator.config.memoryDir,
|
|
10
12
|
conformanceEnabled: orchestrator.config.okf.conformanceEnabled,
|
|
11
13
|
sweepEnabled: orchestrator.config.okf.sweepEnabled,
|
|
14
|
+
indexFilesEnabled: orchestrator.config.okf.indexFilesEnabled,
|
|
12
15
|
});
|
|
13
16
|
if (code !== 0) process.exitCode = code;
|
|
14
17
|
};
|
|
@@ -21,3 +24,45 @@ export function registerOkfCommands(cmd: CliCommand, orchestrator: Orchestrator)
|
|
|
21
24
|
await forward(["sweep", ...(options.json === true ? ["--json"] : [])]);
|
|
22
25
|
});
|
|
23
26
|
}
|
|
27
|
+
|
|
28
|
+
export function registerExportOkfCommand(exportCmd: CliCommand, orchestrator: Orchestrator): void {
|
|
29
|
+
exportCmd
|
|
30
|
+
.command("okf")
|
|
31
|
+
.description("Export a portable OKF v0.1 knowledge bundle")
|
|
32
|
+
.requiredOption("--out <path>", "Output directory")
|
|
33
|
+
.option("--namespace <ns>", "Namespace to export")
|
|
34
|
+
.option("--include-status <status>", "Repeatable status allow-list (default: active)")
|
|
35
|
+
.option("--include-categories <categories>", "Comma-separated category allow-list")
|
|
36
|
+
.option("--exclude-tags <tags>", "Comma-separated tags to drop")
|
|
37
|
+
.option("--include-profile", "Include profile.md (default off)")
|
|
38
|
+
.option("--include-wearables", "Include wearable day transcripts (default off)")
|
|
39
|
+
.option("--log", "Write log.md from the lifecycle ledger")
|
|
40
|
+
.option("--force", "Replace a non-empty output directory")
|
|
41
|
+
.action(async (...args: unknown[]) => {
|
|
42
|
+
const options = (args[0] ?? {}) as Record<string, unknown>;
|
|
43
|
+
const out = options.out ? String(options.out) : "";
|
|
44
|
+
if (!out) throw new Error("Missing --out");
|
|
45
|
+
const includeStatus = parseIncludeStatus(options.includeStatus);
|
|
46
|
+
const namespace = options.namespace ? String(options.namespace) : "";
|
|
47
|
+
const memoryDir = namespace
|
|
48
|
+
? path.join(orchestrator.config.memoryDir, "namespaces", namespace)
|
|
49
|
+
: orchestrator.config.memoryDir;
|
|
50
|
+
const result = await exportOkfBundle({
|
|
51
|
+
memoryDir,
|
|
52
|
+
outDir: out,
|
|
53
|
+
includeStatus,
|
|
54
|
+
includeCategories: options.includeCategories ? String(options.includeCategories).split(",") : undefined,
|
|
55
|
+
excludeTags: options.excludeTags ? String(options.excludeTags).split(",") : undefined,
|
|
56
|
+
includeProfile: options.includeProfile === true,
|
|
57
|
+
includeWearables: options.includeWearables === true,
|
|
58
|
+
includeLog: options.log === true,
|
|
59
|
+
force: options.force === true,
|
|
60
|
+
});
|
|
61
|
+
if (result.plaintextWarning) {
|
|
62
|
+
console.log("PLAINTEXT EXPORT: the OKF bundle is unencrypted.");
|
|
63
|
+
}
|
|
64
|
+
console.log(
|
|
65
|
+
`OKF export: ${result.exported} concepts, ${result.excluded} excluded`,
|
|
66
|
+
);
|
|
67
|
+
});
|
|
68
|
+
}
|
package/src/cli.ts
CHANGED
|
@@ -15,7 +15,7 @@ import { utcDayRange } from "./transcript.js";
|
|
|
15
15
|
import { padEndDisplay, truncateGraphemeSafe } from "./whitespace.js";
|
|
16
16
|
import { runWearablesCliCommand } from "./wearables/cli.js";
|
|
17
17
|
import { registerMeetingsCommands } from "./cli/meetings-commands.js";
|
|
18
|
-
import { registerOkfCommands } from "./cli/okf-commands.js";
|
|
18
|
+
import { registerExportOkfCommand, registerOkfCommands } from "./cli/okf-commands.js";
|
|
19
19
|
import { registerSkillsCommands } from "./cli/skills-commands.js";
|
|
20
20
|
import { registerResearchStatusCommands } from "./cli/research-status-commands.js";
|
|
21
21
|
import { registerCreationLedgerCommands } from "./cli/creation-ledger-commands.js";
|
|
@@ -4367,7 +4367,7 @@ export function registerCli(
|
|
|
4367
4367
|
return;
|
|
4368
4368
|
}
|
|
4369
4369
|
console.log("OK");
|
|
4370
|
-
});
|
|
4370
|
+
}); registerExportOkfCommand(exportCmd, orchestrator);
|
|
4371
4371
|
|
|
4372
4372
|
const importCmd = cmd
|
|
4373
4373
|
.command("import")
|
|
@@ -0,0 +1,381 @@
|
|
|
1
|
+
// Focused regression for the codegraph OKF projection (issue #1950).
|
|
2
|
+
//
|
|
3
|
+
// Fixture: a two-file synthetic repo indexed into a real GraphStore via the
|
|
4
|
+
// optional-engine loader (never a static optional-package import), plus a
|
|
5
|
+
// supersede pair + one accepted ADR and an architecture-card memory in the
|
|
6
|
+
// project's coding namespace. Covers the issue's acceptance set: bundle
|
|
7
|
+
// shape + verbatim card, determinism, truncation with a legal broken link,
|
|
8
|
+
// the --symbols ladder, gating refusals, and store-byte immutability.
|
|
9
|
+
|
|
10
|
+
import assert from "node:assert/strict";
|
|
11
|
+
import { createHash } from "node:crypto";
|
|
12
|
+
import { existsSync, mkdirSync, readdirSync, readFileSync } from "node:fs";
|
|
13
|
+
import { mkdtemp, readFile, rm } from "node:fs/promises";
|
|
14
|
+
import os from "node:os";
|
|
15
|
+
import path from "node:path";
|
|
16
|
+
import test from "node:test";
|
|
17
|
+
|
|
18
|
+
import type { PluginConfig } from "../types.js";
|
|
19
|
+
import { StorageManager } from "../storage.js";
|
|
20
|
+
import { serializeDecisionRecord, type DecisionRecord } from "./decision-records.js";
|
|
21
|
+
import { getCodegraphStore, resolveCodegraphDbPath } from "./codegraph-runtime.js";
|
|
22
|
+
import { isCodingGraphInstalled } from "./optional-coding-graph.js";
|
|
23
|
+
|
|
24
|
+
import {
|
|
25
|
+
DEFAULT_OKF_CODEGRAPH_MAX_MODULE_CONCEPTS,
|
|
26
|
+
OKF_CODEGRAPH_TRUNCATION_MARKER,
|
|
27
|
+
exportCodegraphOkfBundle,
|
|
28
|
+
parseOkfCodegraphSymbolFilter,
|
|
29
|
+
} from "./export-okf-codegraph.js";
|
|
30
|
+
|
|
31
|
+
const PROJECT_ID = "p1";
|
|
32
|
+
const CARD_MARKDOWN = "# Demo Repo\n\nLanguages: typescript\n\nModules: 2\n";
|
|
33
|
+
|
|
34
|
+
const GATE_ON_CONFIG = {
|
|
35
|
+
codingKnowledge: {
|
|
36
|
+
enabled: true,
|
|
37
|
+
codegraphTools: true,
|
|
38
|
+
decisionRecords: true,
|
|
39
|
+
codegraphDbDir: "",
|
|
40
|
+
},
|
|
41
|
+
} as unknown as PluginConfig;
|
|
42
|
+
|
|
43
|
+
interface Fixture {
|
|
44
|
+
memoryDir: string;
|
|
45
|
+
repoDir: string;
|
|
46
|
+
dbPath: string;
|
|
47
|
+
sqliteBefore: string;
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
async function seedGraphStore(memoryDir: string): Promise<string> {
|
|
51
|
+
const dbPath = resolveCodegraphDbPath({
|
|
52
|
+
config: GATE_ON_CONFIG,
|
|
53
|
+
memoryDir,
|
|
54
|
+
principal: "default",
|
|
55
|
+
projectId: PROJECT_ID,
|
|
56
|
+
});
|
|
57
|
+
mkdirSync(path.dirname(dbPath), { recursive: true });
|
|
58
|
+
const store = await getCodegraphStore({
|
|
59
|
+
config: GATE_ON_CONFIG,
|
|
60
|
+
memoryDir,
|
|
61
|
+
principal: "default",
|
|
62
|
+
projectId: PROJECT_ID,
|
|
63
|
+
});
|
|
64
|
+
|
|
65
|
+
const big = await store.upsertFileBatch?.([
|
|
66
|
+
{
|
|
67
|
+
path: "src/big.ts",
|
|
68
|
+
language: "typescript" as const,
|
|
69
|
+
contentHash: "h-big",
|
|
70
|
+
symbols: [
|
|
71
|
+
{ kind: "function" as const, name: "alpha", qualifiedName: "big.alpha", span: { startByte: 0, endByte: 10 } },
|
|
72
|
+
{ kind: "function" as const, name: "beta", qualifiedName: "big.beta", span: { startByte: 10, endByte: 20 } },
|
|
73
|
+
{ kind: "type" as const, name: "internal", qualifiedName: "big.internal", span: { startByte: 20, endByte: 30 } },
|
|
74
|
+
],
|
|
75
|
+
exports: [{ name: "alpha", span: { startByte: 0, endByte: 5 } }],
|
|
76
|
+
edges: [
|
|
77
|
+
{
|
|
78
|
+
srcQualifiedName: "big.alpha",
|
|
79
|
+
dstQualifiedName: "small.zulu",
|
|
80
|
+
type: "CALLS",
|
|
81
|
+
confidence: 0.95,
|
|
82
|
+
provenance: "heuristic",
|
|
83
|
+
},
|
|
84
|
+
{
|
|
85
|
+
srcQualifiedName: "big.beta",
|
|
86
|
+
dstQualifiedName: "small.zulu",
|
|
87
|
+
type: "IMPORTS",
|
|
88
|
+
confidence: 0.4,
|
|
89
|
+
provenance: "heuristic",
|
|
90
|
+
},
|
|
91
|
+
],
|
|
92
|
+
},
|
|
93
|
+
{
|
|
94
|
+
path: "src/small.ts",
|
|
95
|
+
language: "typescript" as const,
|
|
96
|
+
contentHash: "h-small",
|
|
97
|
+
symbols: [
|
|
98
|
+
{ kind: "function" as const, name: "zulu", qualifiedName: "small.zulu", span: { startByte: 0, endByte: 8 } },
|
|
99
|
+
],
|
|
100
|
+
exports: [{ name: "zulu", span: { startByte: 0, endByte: 4 } }],
|
|
101
|
+
},
|
|
102
|
+
]);
|
|
103
|
+
assert.equal(big?.ok, true, `upsertFileBatch failed: ${JSON.stringify(big)}`);
|
|
104
|
+
return dbPath;
|
|
105
|
+
}
|
|
106
|
+
|
|
107
|
+
async function writeAdr(
|
|
108
|
+
storage: StorageManager,
|
|
109
|
+
record: DecisionRecord,
|
|
110
|
+
options: { status?: "archived" } = {},
|
|
111
|
+
): Promise<void> {
|
|
112
|
+
await storage.writeMemory("decision", serializeDecisionRecord(record), {
|
|
113
|
+
source: "coding-decision",
|
|
114
|
+
tags: ["decision-record"],
|
|
115
|
+
structuredAttributes: { decisionStatus: record.status },
|
|
116
|
+
...(options.status ? { status: options.status } : {}),
|
|
117
|
+
});
|
|
118
|
+
}
|
|
119
|
+
|
|
120
|
+
async function seedNamespace(memoryDir: string): Promise<void> {
|
|
121
|
+
const namespaceDir = path.join(memoryDir, "namespaces", "project-p1");
|
|
122
|
+
const storage = new StorageManager(namespaceDir);
|
|
123
|
+
await storage.ensureDirectories();
|
|
124
|
+
// Accepted ADR with an explicit id.
|
|
125
|
+
await writeAdr(storage, {
|
|
126
|
+
id: "ADR-0001",
|
|
127
|
+
title: "Use SQLite for the graph store",
|
|
128
|
+
status: "accepted",
|
|
129
|
+
context: "The graph needs a local queryable store.",
|
|
130
|
+
decision: "Store the code graph in per-project SQLite files.",
|
|
131
|
+
consequences: "Reads stay local; no server required.",
|
|
132
|
+
entityRefs: [],
|
|
133
|
+
});
|
|
134
|
+
// Supersede pair in the production shape: frontmatter id left EMPTY (the
|
|
135
|
+
// memory id is canonical) and the replacement carries `supersedes`.
|
|
136
|
+
await writeAdr(
|
|
137
|
+
storage,
|
|
138
|
+
{
|
|
139
|
+
id: "",
|
|
140
|
+
title: "Single-pass indexing",
|
|
141
|
+
status: "superseded",
|
|
142
|
+
context: "Initial indexing approach.",
|
|
143
|
+
decision: "Index everything in one pass.",
|
|
144
|
+
consequences: undefined,
|
|
145
|
+
entityRefs: [],
|
|
146
|
+
},
|
|
147
|
+
{ status: "archived" },
|
|
148
|
+
);
|
|
149
|
+
await writeAdr(storage, {
|
|
150
|
+
id: "",
|
|
151
|
+
title: "Incremental indexing",
|
|
152
|
+
status: "accepted",
|
|
153
|
+
context: "Single-pass reindexes were too slow.",
|
|
154
|
+
decision: "Index only files whose content hash changed.",
|
|
155
|
+
consequences: undefined,
|
|
156
|
+
entityRefs: [],
|
|
157
|
+
supersedes: "ADR-0002",
|
|
158
|
+
});
|
|
159
|
+
// Architecture card memory (surface classification: fact + tag + cardKind).
|
|
160
|
+
await storage.writeMemory("fact", CARD_MARKDOWN, {
|
|
161
|
+
source: "coding-architecture",
|
|
162
|
+
tags: ["architecture-card"],
|
|
163
|
+
structuredAttributes: { cardKind: "architecture" },
|
|
164
|
+
});
|
|
165
|
+
}
|
|
166
|
+
|
|
167
|
+
async function makeFixture(): Promise<Fixture> {
|
|
168
|
+
const memoryDir = await mkdtemp(path.join(os.tmpdir(), "remnic-okf-cg-mem-"));
|
|
169
|
+
const repoDir = await mkdtemp(path.join(os.tmpdir(), "remnic-okf-cg-repo-"));
|
|
170
|
+
const dbPath = await seedGraphStore(memoryDir);
|
|
171
|
+
await seedNamespace(memoryDir);
|
|
172
|
+
return {
|
|
173
|
+
memoryDir,
|
|
174
|
+
repoDir,
|
|
175
|
+
dbPath,
|
|
176
|
+
sqliteBefore: sha256File(dbPath),
|
|
177
|
+
};
|
|
178
|
+
}
|
|
179
|
+
|
|
180
|
+
async function requireEngine(t: { skip: (reason: string) => void }): Promise<boolean> {
|
|
181
|
+
if (await isCodingGraphInstalled()) return true;
|
|
182
|
+
t.skip("@remnic/coding-graph is optional and not installed");
|
|
183
|
+
return false;
|
|
184
|
+
}
|
|
185
|
+
|
|
186
|
+
|
|
187
|
+
function sha256File(file: string): string {
|
|
188
|
+
return createHash("sha256").update(readFileSync(file)).digest("hex");
|
|
189
|
+
}
|
|
190
|
+
|
|
191
|
+
function collectFiles(root: string, prefix = ""): string[] {
|
|
192
|
+
const out: string[] = [];
|
|
193
|
+
for (const entry of readdirSync(root, { withFileTypes: true }).sort((a, b) => a.name.localeCompare(b.name))) {
|
|
194
|
+
const rel = prefix ? `${prefix}/${entry.name}` : entry.name;
|
|
195
|
+
if (entry.isDirectory()) out.push(...collectFiles(path.join(root, entry.name), rel));
|
|
196
|
+
else out.push(rel);
|
|
197
|
+
}
|
|
198
|
+
return out.sort();
|
|
199
|
+
}
|
|
200
|
+
|
|
201
|
+
async function exportBundle(fx: Fixture, outDir: string, overrides: Record<string, unknown> = {}) {
|
|
202
|
+
return exportCodegraphOkfBundle({
|
|
203
|
+
config: GATE_ON_CONFIG,
|
|
204
|
+
memoryDir: fx.memoryDir,
|
|
205
|
+
projectId: PROJECT_ID,
|
|
206
|
+
outDir,
|
|
207
|
+
cwd: fx.repoDir,
|
|
208
|
+
...overrides,
|
|
209
|
+
} as Parameters<typeof exportCodegraphOkfBundle>[0]);
|
|
210
|
+
}
|
|
211
|
+
|
|
212
|
+
test("parseOkfCodegraphSymbolFilter defaults to exported and rejects unknowns", () => {
|
|
213
|
+
assert.equal(parseOkfCodegraphSymbolFilter(undefined), "exported");
|
|
214
|
+
assert.equal(parseOkfCodegraphSymbolFilter("ALL"), "all");
|
|
215
|
+
assert.equal(parseOkfCodegraphSymbolFilter("none"), "none");
|
|
216
|
+
assert.throws(() => parseOkfCodegraphSymbolFilter("some"), /allowed:/);
|
|
217
|
+
assert.equal(DEFAULT_OKF_CODEGRAPH_MAX_MODULE_CONCEPTS, 500);
|
|
218
|
+
});
|
|
219
|
+
|
|
220
|
+
test("exportCodegraphOkfBundle writes the full bundle: card verbatim, ADRs, modules, edges", async (t) => {
|
|
221
|
+
if (!(await requireEngine(t))) return;
|
|
222
|
+
const fx = await makeFixture();
|
|
223
|
+
const out = path.join(fx.memoryDir, "out-a");
|
|
224
|
+
try {
|
|
225
|
+
const result = await exportBundle(fx, out);
|
|
226
|
+
assert.equal(result.moduleConcepts, 2);
|
|
227
|
+
assert.equal(result.moduleFilesInGraph, 2);
|
|
228
|
+
assert.equal(result.truncated, false);
|
|
229
|
+
assert.equal(result.decisions, 3);
|
|
230
|
+
assert.equal(result.architectureCard, true);
|
|
231
|
+
|
|
232
|
+
// Root index carries the version stamp + counts.
|
|
233
|
+
const root = await readFile(path.join(out, "index.md"), "utf8");
|
|
234
|
+
assert.match(root, /okf_version: "0.1"/);
|
|
235
|
+
assert.match(root, /- code modules: 2 of 2 indexed files/);
|
|
236
|
+
assert.equal(root.includes(OKF_CODEGRAPH_TRUNCATION_MARKER), false);
|
|
237
|
+
|
|
238
|
+
// Architecture card: OKF type frontmatter + stored body verbatim
|
|
239
|
+
// (storage-layer attribute suffix stripped).
|
|
240
|
+
const arch = await readFile(path.join(out, "architecture.md"), "utf8");
|
|
241
|
+
assert.match(arch, /type: Architecture Card/);
|
|
242
|
+
assert.ok(arch.includes(CARD_MARKDOWN.trimEnd()), "card body must be verbatim");
|
|
243
|
+
assert.equal(arch.includes("[Attributes:"), false);
|
|
244
|
+
|
|
245
|
+
// Decisions: all three statuses exported with type + original keys.
|
|
246
|
+
const decisionFiles = collectFiles(path.join(out, "decisions")).sort();
|
|
247
|
+
assert.deepEqual(
|
|
248
|
+
decisionFiles.filter((f) => f !== "index.md"),
|
|
249
|
+
["ADR-0001.md", "ADR-0002.md", "ADR-0003.md"],
|
|
250
|
+
);
|
|
251
|
+
const adr1 = await readFile(path.join(out, "decisions", "ADR-0001.md"), "utf8");
|
|
252
|
+
assert.match(adr1, /type: Decision Record/);
|
|
253
|
+
assert.match(adr1, /title: Use SQLite for the graph store/);
|
|
254
|
+
assert.match(adr1, /status: accepted/);
|
|
255
|
+
assert.match(adr1, /# Decision/);
|
|
256
|
+
const adr3 = await readFile(path.join(out, "decisions", "ADR-0003.md"), "utf8");
|
|
257
|
+
assert.match(adr3, /- supersedes: \[ADR-0002\]\(\/decisions\/ADR-0002\.md\)/);
|
|
258
|
+
const decisionsIndex = await readFile(path.join(out, "decisions", "index.md"), "utf8");
|
|
259
|
+
// ACTIVE statuses listed before superseded.
|
|
260
|
+
assert.ok(decisionsIndex.indexOf("## Accepted") < decisionsIndex.indexOf("## Superseded"));
|
|
261
|
+
|
|
262
|
+
// Modules: one concept per file; symbols table (exported default);
|
|
263
|
+
// edges under # Dependencies with kind prose + bundle-relative links.
|
|
264
|
+
const big = await readFile(path.join(out, "modules", "src", "big.ts.md"), "utf8");
|
|
265
|
+
assert.match(big, /type: Code Module/);
|
|
266
|
+
assert.match(big, /title: src\/big\.ts/);
|
|
267
|
+
assert.match(big, /description: 3 symbols, typescript/);
|
|
268
|
+
assert.match(big, /tags:\n - typescript/);
|
|
269
|
+
assert.match(big, /# Symbols/);
|
|
270
|
+
assert.match(big, /\| alpha \| function \| 0-10 \|/);
|
|
271
|
+
assert.equal(big.includes("internal"), false, "unexported symbol hidden by default");
|
|
272
|
+
assert.match(big, /# Dependencies/);
|
|
273
|
+
assert.match(big, /- calls: \[zulu\(\) in src\/small\.ts\]\(\/modules\/src\/small\.ts\.md\) \(confidence: high\)/);
|
|
274
|
+
assert.match(big, /- imports: \[src\/small\.ts\]\(\/modules\/src\/small\.ts\.md\) \(confidence: low\)/);
|
|
275
|
+
const modulesIndex = await readFile(path.join(out, "modules", "index.md"), "utf8");
|
|
276
|
+
assert.match(modulesIndex, /## src/);
|
|
277
|
+
|
|
278
|
+
// Read-only guarantee: the store's bytes are unchanged.
|
|
279
|
+
assert.equal(sha256File(fx.dbPath), fx.sqliteBefore);
|
|
280
|
+
} finally {
|
|
281
|
+
await rm(fx.memoryDir, { recursive: true, force: true });
|
|
282
|
+
await rm(fx.repoDir, { recursive: true, force: true });
|
|
283
|
+
}
|
|
284
|
+
});
|
|
285
|
+
|
|
286
|
+
test("exportCodegraphOkfBundle is byte-stable for an unchanged graph", async (t) => {
|
|
287
|
+
if (!(await requireEngine(t))) return;
|
|
288
|
+
const fx = await makeFixture();
|
|
289
|
+
const outA = path.join(fx.memoryDir, "det-a");
|
|
290
|
+
const outB = path.join(fx.memoryDir, "det-b");
|
|
291
|
+
try {
|
|
292
|
+
await exportBundle(fx, outA);
|
|
293
|
+
await exportBundle(fx, outB);
|
|
294
|
+
assert.deepEqual(collectFiles(outA), collectFiles(outB));
|
|
295
|
+
for (const rel of collectFiles(outA)) {
|
|
296
|
+
assert.equal(
|
|
297
|
+
await readFile(path.join(outA, rel), "utf8"),
|
|
298
|
+
await readFile(path.join(outB, rel), "utf8"),
|
|
299
|
+
`${rel} must be byte-identical across exports`,
|
|
300
|
+
);
|
|
301
|
+
}
|
|
302
|
+
} finally {
|
|
303
|
+
await rm(fx.memoryDir, { recursive: true, force: true });
|
|
304
|
+
await rm(fx.repoDir, { recursive: true, force: true });
|
|
305
|
+
}
|
|
306
|
+
});
|
|
307
|
+
|
|
308
|
+
test("truncation keeps the most-symbolic file, notices in the root index, keeps broken links", async (t) => {
|
|
309
|
+
if (!(await requireEngine(t))) return;
|
|
310
|
+
const fx = await makeFixture();
|
|
311
|
+
const out = path.join(fx.memoryDir, "out-trunc");
|
|
312
|
+
try {
|
|
313
|
+
const result = await exportBundle(fx, out, { maxModuleConcepts: 1 });
|
|
314
|
+
assert.equal(result.moduleConcepts, 1);
|
|
315
|
+
assert.equal(result.moduleFilesInGraph, 2);
|
|
316
|
+
assert.equal(result.truncated, true);
|
|
317
|
+
assert.equal(existsSync(path.join(out, "modules", "src", "small.ts.md")), false);
|
|
318
|
+
const root = await readFile(path.join(out, "index.md"), "utf8");
|
|
319
|
+
assert.match(root, new RegExp(OKF_CODEGRAPH_TRUNCATION_MARKER.replace(/[.*+?^${}()|[\]\\]/g, "\\$&")));
|
|
320
|
+
// The edge to the truncated target survives as a legal broken link.
|
|
321
|
+
const big = await readFile(path.join(out, "modules", "src", "big.ts.md"), "utf8");
|
|
322
|
+
assert.match(big, /\(\/modules\/src\/small\.ts\.md\) \(confidence: high\) \(link target not exported\)/);
|
|
323
|
+
assert.equal(sha256File(fx.dbPath), fx.sqliteBefore);
|
|
324
|
+
} finally {
|
|
325
|
+
await rm(fx.memoryDir, { recursive: true, force: true });
|
|
326
|
+
await rm(fx.repoDir, { recursive: true, force: true });
|
|
327
|
+
}
|
|
328
|
+
});
|
|
329
|
+
|
|
330
|
+
test("--symbols none|all changes only the # Symbols tables", async (t) => {
|
|
331
|
+
if (!(await requireEngine(t))) return;
|
|
332
|
+
const fx = await makeFixture();
|
|
333
|
+
const outNone = path.join(fx.memoryDir, "sym-none");
|
|
334
|
+
const outAll = path.join(fx.memoryDir, "sym-all");
|
|
335
|
+
try {
|
|
336
|
+
await exportBundle(fx, outNone, { symbols: "none" });
|
|
337
|
+
await exportBundle(fx, outAll, { symbols: "all" });
|
|
338
|
+
const noneBig = await readFile(path.join(outNone, "modules", "src", "big.ts.md"), "utf8");
|
|
339
|
+
const allBig = await readFile(path.join(outAll, "modules", "src", "big.ts.md"), "utf8");
|
|
340
|
+
assert.equal(noneBig.includes("# Symbols"), false);
|
|
341
|
+
assert.match(allBig, /\| internal \| type \| 20-30 \|/);
|
|
342
|
+
// Frontmatter and Dependencies are identical across the two filters.
|
|
343
|
+
assert.equal(noneBig.split("# Dependencies")[0].split("# Symbols")[0], allBig.split("# Symbols")[0]);
|
|
344
|
+
assert.equal(
|
|
345
|
+
`# Dependencies${noneBig.split("# Dependencies")[1]}`,
|
|
346
|
+
`# Dependencies${allBig.split("# Dependencies")[1]}`,
|
|
347
|
+
);
|
|
348
|
+
} finally {
|
|
349
|
+
await rm(fx.memoryDir, { recursive: true, force: true });
|
|
350
|
+
await rm(fx.repoDir, { recursive: true, force: true });
|
|
351
|
+
}
|
|
352
|
+
});
|
|
353
|
+
|
|
354
|
+
test("gating: disabled config and unknown project produce tagged actionable refusals", async (t) => {
|
|
355
|
+
const out = path.join(os.tmpdir(), `okf-cg-gate-${process.pid}`);
|
|
356
|
+
await assert.rejects(
|
|
357
|
+
exportCodegraphOkfBundle({
|
|
358
|
+
config: { codingKnowledge: { enabled: false } } as unknown as PluginConfig,
|
|
359
|
+
memoryDir: os.tmpdir(),
|
|
360
|
+
projectId: PROJECT_ID,
|
|
361
|
+
outDir: out,
|
|
362
|
+
}),
|
|
363
|
+
(err: unknown) => err instanceof Error && "code" in err && (err as { code: string }).code === "disabled",
|
|
364
|
+
);
|
|
365
|
+
if (!(await requireEngine(t))) return;
|
|
366
|
+
const fx = await makeFixture();
|
|
367
|
+
try {
|
|
368
|
+
await assert.rejects(
|
|
369
|
+
exportBundle(fx, path.join(fx.memoryDir, "out-gate"), { projectId: "nope" }),
|
|
370
|
+
(err: unknown) =>
|
|
371
|
+
err instanceof Error &&
|
|
372
|
+
"code" in err &&
|
|
373
|
+
(err as { code: string }).code === "project_not_found" &&
|
|
374
|
+
/known projects: .*p1/.test(err.message),
|
|
375
|
+
);
|
|
376
|
+
} finally {
|
|
377
|
+
await rm(fx.memoryDir, { recursive: true, force: true });
|
|
378
|
+
await rm(fx.repoDir, { recursive: true, force: true });
|
|
379
|
+
}
|
|
380
|
+
});
|
|
381
|
+
|