@remnic/core 1.1.2 → 1.1.3
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/abort-error.js +1 -0
- package/dist/abstraction-nodes.js +1 -0
- package/dist/access-audit.js +1 -0
- package/dist/access-cli.js +70 -45
- package/dist/access-cli.js.map +1 -1
- package/dist/access-http.d.ts +50 -5
- package/dist/access-http.js +37 -15
- package/dist/access-idempotency.js +1 -0
- package/dist/access-mcp.d.ts +10 -5
- package/dist/access-mcp.js +36 -13
- package/dist/access-schema.d.ts +133 -13
- package/dist/access-schema.js +20 -1
- package/dist/access-service-_AEUMVyX.d.ts +1981 -0
- package/dist/access-service.d.ts +11 -6
- package/dist/access-service.js +38 -14
- package/dist/active-memory-bridge.js +1 -0
- package/dist/active-recall.js +1 -0
- package/dist/active-recall.js.map +1 -1
- package/dist/behavior-learner.js +1 -0
- package/dist/behavior-learner.js.map +1 -1
- package/dist/behavior-signals.js +1 -0
- package/dist/bootstrap.d.ts +6 -4
- package/dist/bootstrap.js +1 -0
- package/dist/boxes.js +1 -0
- package/dist/briefing.d.ts +9 -5
- package/dist/briefing.js +9 -6
- package/dist/buffer-surprise-report.js +1 -0
- package/dist/buffer-surprise.js +1 -0
- package/dist/buffer.d.ts +1 -1
- package/dist/buffer.js +1 -0
- package/dist/calibration.d.ts +8 -1
- package/dist/calibration.js +10 -2
- package/dist/calibration.js.map +1 -1
- package/dist/capsule-cli.d.ts +137 -0
- package/dist/capsule-cli.js +34 -0
- package/dist/capsule-crypto-5CYAGVC5.js +18 -0
- package/dist/capsule-export-NZQPOTQ4.js +17 -0
- package/dist/capsule-export-NZQPOTQ4.js.map +1 -0
- package/dist/capsule-import-SDCUXLEV.js +16 -0
- package/dist/capsule-import-SDCUXLEV.js.map +1 -0
- package/dist/capsule-merge-DI7PNQ2H.js +189 -0
- package/dist/capsule-merge-DI7PNQ2H.js.map +1 -0
- package/dist/causal-behavior.js +1 -0
- package/dist/causal-behavior.js.map +1 -1
- package/dist/causal-chain.js +1 -0
- package/dist/causal-consolidation.js +11 -8
- package/dist/causal-consolidation.js.map +1 -1
- package/dist/causal-retrieval.js +2 -1
- package/dist/causal-retrieval.js.map +1 -1
- package/dist/causal-trajectory-graph.js +4 -1
- package/dist/causal-trajectory-graph.js.map +1 -1
- package/dist/causal-trajectory.js +2 -1
- package/dist/chunk-2LSZVONP.js +67 -0
- package/dist/chunk-2LSZVONP.js.map +1 -0
- package/dist/chunk-32KD5IHZ.js +245 -0
- package/dist/chunk-32KD5IHZ.js.map +1 -0
- package/dist/{chunk-VDX363PS.js → chunk-34F3PLWZ.js} +10 -3
- package/dist/chunk-34F3PLWZ.js.map +1 -0
- package/dist/chunk-3KIS4VGT.js +228 -0
- package/dist/chunk-3KIS4VGT.js.map +1 -0
- package/dist/chunk-3LCWFNVS.js +350 -0
- package/dist/chunk-3LCWFNVS.js.map +1 -0
- package/dist/chunk-43EKP2UK.js +26 -0
- package/dist/chunk-43EKP2UK.js.map +1 -0
- package/dist/chunk-457A4P3L.js +119 -0
- package/dist/chunk-457A4P3L.js.map +1 -0
- package/dist/{chunk-TMYO7B5P.js → chunk-47WOM4YW.js} +2 -2
- package/dist/{chunk-OC5OXUQ4.js → chunk-4PLGJRBV.js} +653 -17
- package/dist/chunk-4PLGJRBV.js.map +1 -0
- package/dist/{chunk-PVICZTKG.js → chunk-55FXRRSJ.js} +5 -5
- package/dist/{chunk-PVICZTKG.js.map → chunk-55FXRRSJ.js.map} +1 -1
- package/dist/{chunk-ULYOGL6R.js → chunk-5HRY2WRF.js} +7 -3
- package/dist/chunk-5HRY2WRF.js.map +1 -0
- package/dist/chunk-6TBWYBJ3.js +236 -0
- package/dist/chunk-6TBWYBJ3.js.map +1 -0
- package/dist/chunk-74EMIVE4.js +329 -0
- package/dist/chunk-74EMIVE4.js.map +1 -0
- package/dist/chunk-74WWN7ZW.js +82 -0
- package/dist/chunk-74WWN7ZW.js.map +1 -0
- package/dist/{chunk-6YJHX2DL.js → chunk-7GCMLT7J.js} +242 -22
- package/dist/chunk-7GCMLT7J.js.map +1 -0
- package/dist/chunk-A6XUJE5D.js +126 -0
- package/dist/chunk-A6XUJE5D.js.map +1 -0
- package/dist/chunk-AJA46VX5.js +393 -0
- package/dist/chunk-AJA46VX5.js.map +1 -0
- package/dist/{chunk-UWB5LMWY.js → chunk-AKUCB2OG.js} +525 -24
- package/dist/chunk-AKUCB2OG.js.map +1 -0
- package/dist/chunk-ASIQZXYO.js +277 -0
- package/dist/chunk-ASIQZXYO.js.map +1 -0
- package/dist/{chunk-DG6YMRDC.js → chunk-B2TL6GA2.js} +2 -2
- package/dist/chunk-BJMBJZ2Y.js +290 -0
- package/dist/chunk-BJMBJZ2Y.js.map +1 -0
- package/dist/chunk-BT7NVCML.js +79 -0
- package/dist/chunk-BT7NVCML.js.map +1 -0
- package/dist/chunk-CK5NTM2S.js +454 -0
- package/dist/chunk-CK5NTM2S.js.map +1 -0
- package/dist/{chunk-AYXIPSZO.js → chunk-CRU27Q4J.js} +2 -2
- package/dist/{chunk-F5VP6YCB.js → chunk-DCE6SQLA.js} +572 -155
- package/dist/chunk-DCE6SQLA.js.map +1 -0
- package/dist/{chunk-CUPFXL3J.js → chunk-DHRQHX36.js} +4 -4
- package/dist/chunk-DHRQHX36.js.map +1 -0
- package/dist/{chunk-STGWEHYR.js → chunk-DR7MCMPS.js} +981 -61
- package/dist/chunk-DR7MCMPS.js.map +1 -0
- package/dist/chunk-FP2373TW.js +149 -0
- package/dist/chunk-FP2373TW.js.map +1 -0
- package/dist/{chunk-RBBWYEFJ.js → chunk-G2WADRQ3.js} +1 -1
- package/dist/chunk-G7D6GZ5J.js +48 -0
- package/dist/chunk-G7D6GZ5J.js.map +1 -0
- package/dist/chunk-H7XKCNR6.js +60 -0
- package/dist/chunk-H7XKCNR6.js.map +1 -0
- package/dist/{chunk-3YGHKTBF.js → chunk-IM3JSE73.js} +953 -322
- package/dist/chunk-IM3JSE73.js.map +1 -0
- package/dist/chunk-IXEJRKCZ.js +18 -0
- package/dist/chunk-IXEJRKCZ.js.map +1 -0
- package/dist/chunk-IYY4MCPG.js +275 -0
- package/dist/chunk-IYY4MCPG.js.map +1 -0
- package/dist/{chunk-BECYBZLX.js → chunk-JWSENLQI.js} +502 -22
- package/dist/chunk-JWSENLQI.js.map +1 -0
- package/dist/chunk-KNKUID7G.js +183 -0
- package/dist/chunk-KNKUID7G.js.map +1 -0
- package/dist/chunk-L2IO2QPY.js +2036 -0
- package/dist/chunk-L2IO2QPY.js.map +1 -0
- package/dist/{chunk-SPI27QT6.js → chunk-L5IIGA5V.js} +9 -4
- package/dist/chunk-L5IIGA5V.js.map +1 -0
- package/dist/{chunk-XXVWLXSG.js → chunk-LVYGDT5V.js} +56 -82
- package/dist/chunk-LVYGDT5V.js.map +1 -0
- package/dist/{chunk-ZAIM4TUE.js → chunk-LW2NMHDW.js} +46 -1
- package/dist/chunk-LW2NMHDW.js.map +1 -0
- package/dist/{chunk-3OGMS3PE.js → chunk-LZRYQK6L.js} +3 -2
- package/dist/chunk-LZRYQK6L.js.map +1 -0
- package/dist/chunk-MDYG7VI7.js +48 -0
- package/dist/chunk-MDYG7VI7.js.map +1 -0
- package/dist/chunk-MXC3AP5I.js +74 -0
- package/dist/chunk-MXC3AP5I.js.map +1 -0
- package/dist/{chunk-DIXB44VE.js → chunk-N7X62G74.js} +25 -10
- package/dist/chunk-N7X62G74.js.map +1 -0
- package/dist/chunk-NN3TS5BM.js +147 -0
- package/dist/chunk-NN3TS5BM.js.map +1 -0
- package/dist/chunk-OA3L7BFR.js +183 -0
- package/dist/chunk-OA3L7BFR.js.map +1 -0
- package/dist/chunk-OZHRDTDX.js +240 -0
- package/dist/chunk-OZHRDTDX.js.map +1 -0
- package/dist/chunk-PCUKNJAZ.js +165 -0
- package/dist/chunk-PCUKNJAZ.js.map +1 -0
- package/dist/{chunk-6PFRXT4K.js → chunk-PFV5C235.js} +11 -6
- package/dist/chunk-PFV5C235.js.map +1 -0
- package/dist/chunk-PZ5AY32C.js +10 -0
- package/dist/chunk-PZ5AY32C.js.map +1 -0
- package/dist/{chunk-Y7R2XJ5Q.js → chunk-Q7FJ5ZHM.js} +6 -2
- package/dist/chunk-Q7FJ5ZHM.js.map +1 -0
- package/dist/{chunk-NBVAS5MT.js → chunk-R2L7SUX2.js} +6 -6
- package/dist/{chunk-WCLICCGB.js → chunk-RILIVK4O.js} +91 -4
- package/dist/chunk-RILIVK4O.js.map +1 -0
- package/dist/{chunk-C2EFFULQ.js → chunk-RK2Y4XOM.js} +163 -20
- package/dist/chunk-RK2Y4XOM.js.map +1 -0
- package/dist/{chunk-TP4FZJIZ.js → chunk-RULE4VG5.js} +5 -1
- package/dist/chunk-RULE4VG5.js.map +1 -0
- package/dist/{chunk-PVPWZSSI.js → chunk-SMA4IMHV.js} +19 -3
- package/dist/chunk-SMA4IMHV.js.map +1 -0
- package/dist/{chunk-L7IXWRYE.js → chunk-SS253RXF.js} +22 -13
- package/dist/chunk-SS253RXF.js.map +1 -0
- package/dist/chunk-TUFG6VXY.js +875 -0
- package/dist/chunk-TUFG6VXY.js.map +1 -0
- package/dist/chunk-TYEOAFH3.js +251 -0
- package/dist/chunk-TYEOAFH3.js.map +1 -0
- package/dist/chunk-UKJAGEXH.js +260 -0
- package/dist/chunk-UKJAGEXH.js.map +1 -0
- package/dist/{chunk-KVBLZUKV.js → chunk-USFPPRAF.js} +93 -3
- package/dist/chunk-USFPPRAF.js.map +1 -0
- package/dist/{chunk-GA5P7RST.js → chunk-VTJVUHRK.js} +22 -36
- package/dist/chunk-VTJVUHRK.js.map +1 -0
- package/dist/chunk-WIICJPET.js +45 -0
- package/dist/chunk-WIICJPET.js.map +1 -0
- package/dist/{chunk-VBVG2M5G.js → chunk-WPGJYVUH.js} +6 -2
- package/dist/chunk-WPGJYVUH.js.map +1 -0
- package/dist/{chunk-4HQS2HPX.js → chunk-WSZIHQBK.js} +29 -9
- package/dist/{chunk-4HQS2HPX.js.map → chunk-WSZIHQBK.js.map} +1 -1
- package/dist/{chunk-NZLQTHS5.js → chunk-WW3QQF4H.js} +4 -1
- package/dist/chunk-WW3QQF4H.js.map +1 -0
- package/dist/{chunk-FVA6TGI3.js → chunk-Y3WQ4ZWK.js} +42 -2
- package/dist/chunk-Y3WQ4ZWK.js.map +1 -0
- package/dist/chunk-YNJHCGDT.js +309 -0
- package/dist/chunk-YNJHCGDT.js.map +1 -0
- package/dist/{chunk-LOIMBRDE.js → chunk-ZGXSCMQN.js} +1993 -411
- package/dist/chunk-ZGXSCMQN.js.map +1 -0
- package/dist/{chunk-W6SL7OFG.js → chunk-ZTSE2ZJ6.js} +12 -2
- package/dist/{chunk-W6SL7OFG.js.map → chunk-ZTSE2ZJ6.js.map} +1 -1
- package/dist/chunking.js +1 -0
- package/dist/cipher-GVE2GQ5H.js +28 -0
- package/dist/cipher-GVE2GQ5H.js.map +1 -0
- package/dist/citations.js +1 -0
- package/dist/{cli-BkeRaYfk.d.ts → cli-x2APT9a6.d.ts} +26 -7
- package/dist/cli.d.ts +11 -6
- package/dist/cli.js +67 -33
- package/dist/codex-thread-key.js +1 -0
- package/dist/commitment-ledger.js +1 -0
- package/dist/compression-optimizer.js +1 -0
- package/dist/config.d.ts +2 -1
- package/dist/config.js +4 -1
- package/dist/connectors-cli-DFGtY2DB.d.ts +257 -0
- package/dist/connectors-cli.d.ts +2 -0
- package/dist/connectors-cli.js +22 -0
- package/dist/connectors-cli.js.map +1 -0
- package/dist/consolidation-operator.d.ts +65 -5
- package/dist/consolidation-operator.js +6 -1
- package/dist/consolidation-provenance-check.d.ts +1 -1
- package/dist/consolidation-provenance-check.js +3 -2
- package/dist/consolidation-undo.d.ts +1 -1
- package/dist/consolidation-undo.js +1 -0
- package/dist/consolidation-undo.js.map +1 -1
- package/dist/{contradiction-review-WIUBAR52.js → contradiction-review-5LTTVDQV.js} +2 -1
- package/dist/contradiction-review-5LTTVDQV.js.map +1 -0
- package/dist/{contradiction-scan-E3GJTI4F.js → contradiction-scan-3Z6YW7YA.js} +2 -1
- package/dist/{contradiction-scan-E3GJTI4F.js.map → contradiction-scan-3Z6YW7YA.js.map} +1 -1
- package/dist/cross-namespace-budget.js +1 -0
- package/dist/cue-anchors.js +1 -0
- package/dist/dashboard-runtime.js +1 -0
- package/dist/day-summary.js +1 -0
- package/dist/delinearize.js +1 -0
- package/dist/direct-answer-wiring.js +1 -0
- package/dist/direct-answer.js +1 -0
- package/dist/dreams-ledger-LR2NBAZE.js +286 -0
- package/dist/dreams-ledger-LR2NBAZE.js.map +1 -0
- package/dist/embedding-fallback.js +1 -0
- package/dist/{engine-72LSIWQP.js → engine-ICC2DSQF.js} +10 -7
- package/dist/engine-ICC2DSQF.js.map +1 -0
- package/dist/entity-retrieval.d.ts +1 -1
- package/dist/entity-retrieval.js +9 -6
- package/dist/entity-schema.js +1 -0
- package/dist/evals.js +1 -0
- package/dist/evidence-pack.d.ts +16 -0
- package/dist/evidence-pack.js +8 -0
- package/dist/evidence-pack.js.map +1 -0
- package/dist/explicit-capture.d.ts +6 -4
- package/dist/explicit-capture.js +1 -0
- package/dist/extraction-judge-telemetry.js +1 -0
- package/dist/extraction-judge-training.js +1 -0
- package/dist/extraction-judge.js +1 -0
- package/dist/extraction.js +7 -6
- package/dist/fallback-llm.js +3 -2
- package/dist/first-start-migration-4MHQEOSD.js +263 -0
- package/dist/first-start-migration-4MHQEOSD.js.map +1 -0
- package/dist/forget-PLR6J5DN.js +69 -0
- package/dist/forget-PLR6J5DN.js.map +1 -0
- package/dist/framework-CyHYDcri.d.ts +153 -0
- package/dist/fs-utils-IRVUFB6G.js +30 -0
- package/dist/fs-utils-IRVUFB6G.js.map +1 -0
- package/dist/graph-dashboard-diff.js +1 -0
- package/dist/graph-dashboard-key.js +1 -0
- package/dist/graph-dashboard-parser.js +1 -0
- package/dist/graph-edge-decay-PWB63GRE.js +207 -0
- package/dist/graph-edge-decay-PWB63GRE.js.map +1 -0
- package/dist/graph-edge-reinforcement.d.ts +81 -0
- package/dist/graph-edge-reinforcement.js +24 -0
- package/dist/graph-edge-reinforcement.js.map +1 -0
- package/dist/graph-events.d.ts +87 -0
- package/dist/graph-events.js +14 -0
- package/dist/graph-events.js.map +1 -0
- package/dist/graph-recall.js +1 -0
- package/dist/graph-retrieval.js +1 -0
- package/dist/graph-snapshot.d.ts +112 -0
- package/dist/graph-snapshot.js +19 -0
- package/dist/graph-snapshot.js.map +1 -0
- package/dist/graph.d.ts +105 -7
- package/dist/graph.js +20 -3
- package/dist/harmonic-retrieval.js +1 -0
- package/dist/himem.js +1 -0
- package/dist/hygiene.js +1 -0
- package/dist/identity-continuity.js +1 -0
- package/dist/importance.js +1 -0
- package/dist/index.d.ts +562 -13
- package/dist/index.js +329 -67
- package/dist/index.js.map +1 -1
- package/dist/intent.js +1 -0
- package/dist/json-extract.js +1 -0
- package/dist/json-store.js +1 -0
- package/dist/kdf-7S6RWKLZ.js +26 -0
- package/dist/kdf-7S6RWKLZ.js.map +1 -0
- package/dist/legacy-hook-compat.js +1 -0
- package/dist/legacy-hook-compat.js.map +1 -1
- package/dist/lifecycle.js +1 -0
- package/dist/live-connectors-runner.d.ts +48 -0
- package/dist/live-connectors-runner.js +17 -0
- package/dist/live-connectors-runner.js.map +1 -0
- package/dist/local-llm.js +1 -0
- package/dist/logger.js +1 -0
- package/dist/memory-action-policy.js +1 -0
- package/dist/memory-cache.d.ts +2 -1
- package/dist/memory-cache.js +4 -1
- package/dist/memory-governance-KG52RITE.js +37 -0
- package/dist/memory-governance-KG52RITE.js.map +1 -0
- package/dist/memory-lifecycle-ledger-utils.d.ts +2 -1
- package/dist/memory-lifecycle-ledger-utils.js +4 -1
- package/dist/memory-projection-format.js +1 -0
- package/dist/{memory-projection-store-DeSXPh1j.d.ts → memory-projection-store-D3vBHS4J.d.ts} +1 -0
- package/dist/memory-projection-store.d.ts +1 -1
- package/dist/memory-projection-store.js +1 -0
- package/dist/memory-worth-bench.js +1 -0
- package/dist/memory-worth-bench.js.map +1 -1
- package/dist/memory-worth-filter.js +1 -0
- package/dist/memory-worth-outcomes.d.ts +1 -1
- package/dist/memory-worth-outcomes.js +1 -0
- package/dist/memory-worth.js +1 -0
- package/dist/metadata-FC3XPDRQ.js +21 -0
- package/dist/metadata-FC3XPDRQ.js.map +1 -0
- package/dist/migrate-from-identity-anchor-TTEDEJGX.js +8 -0
- package/dist/migrate-from-identity-anchor-TTEDEJGX.js.map +1 -0
- package/dist/model-registry.js +1 -0
- package/dist/models-json.js +1 -0
- package/dist/native-knowledge.js +1 -0
- package/dist/negative.js +1 -0
- package/dist/objective-state-writers.js +1 -0
- package/dist/objective-state-writers.js.map +1 -1
- package/dist/objective-state.js +1 -0
- package/dist/openai-chat-compat.js +1 -0
- package/dist/operator-toolkit.d.ts +46 -2
- package/dist/operator-toolkit.js +28 -16
- package/dist/opik-exporter.js +1 -0
- package/dist/opik-exporter.js.map +1 -1
- package/dist/{orchestrator-CmJ-NTdJ.d.ts → orchestrator-ChkesB8U.d.ts} +177 -13
- package/dist/orchestrator.d.ts +6 -4
- package/dist/orchestrator.js +55 -39
- package/dist/page-versioning.js +1 -0
- package/dist/path-RMTY5Y5A.js +9 -0
- package/dist/path-RMTY5Y5A.js.map +1 -0
- package/dist/patterns-cli.d.ts +160 -0
- package/dist/patterns-cli.js +29 -0
- package/dist/patterns-cli.js.map +1 -0
- package/dist/peers-6OSQ3NK6.js +44 -0
- package/dist/peers-6OSQ3NK6.js.map +1 -0
- package/dist/plugin-id.js +1 -0
- package/dist/policy-runtime.js +1 -0
- package/dist/{port-BADbLZU5.d.ts → port-hqGnoStS.d.ts} +6 -0
- package/dist/profiling.js +1 -0
- package/dist/purge-6ATBGT77.js +205 -0
- package/dist/purge-6ATBGT77.js.map +1 -0
- package/dist/qmd-recall-cache.d.ts +1 -1
- package/dist/qmd-recall-cache.js +1 -0
- package/dist/qmd.d.ts +2 -1
- package/dist/qmd.js +4 -3
- package/dist/reasoning-trace-recall.js +1 -0
- package/dist/reasoning-trace-types.js +1 -0
- package/dist/recall-audit-anomaly.js +1 -0
- package/dist/recall-audit.js +1 -0
- package/dist/recall-disclosure-escalation.d.ts +84 -0
- package/dist/recall-disclosure-escalation.js +14 -0
- package/dist/recall-disclosure-escalation.js.map +1 -0
- package/dist/recall-explain-renderer.js +4 -1
- package/dist/recall-mmr.js +1 -0
- package/dist/recall-qos.js +1 -0
- package/dist/recall-query-policy.js +1 -0
- package/dist/recall-state.d.ts +7 -0
- package/dist/recall-state.js +2 -1
- package/dist/recall-tag-filter.d.ts +56 -0
- package/dist/recall-tag-filter.js +14 -0
- package/dist/recall-tag-filter.js.map +1 -0
- package/dist/recall-tokenization.js +1 -0
- package/dist/recall-xray-cli.d.ts +9 -2
- package/dist/recall-xray-cli.js +9 -4
- package/dist/recall-xray-renderer.js +4 -1
- package/dist/recall-xray.d.ts +116 -2
- package/dist/recall-xray.js +9 -3
- package/dist/reconstruct.js +1 -0
- package/dist/release-changelog.js +2 -0
- package/dist/release-changelog.js.map +1 -1
- package/dist/relevance.js +1 -0
- package/dist/rerank.js +1 -0
- package/dist/{resolution-QBTDHTG7.js → resolution-YGIBORXI.js} +2 -1
- package/dist/{resolution-QBTDHTG7.js.map → resolution-YGIBORXI.js.map} +1 -1
- package/dist/resolve-auth-token.d.ts +51 -0
- package/dist/resolve-auth-token.js +12 -0
- package/dist/resolve-auth-token.js.map +1 -0
- package/dist/resolve-provider-secret.d.ts +9 -1
- package/dist/resolve-provider-secret.js +4 -1
- package/dist/resume-bundles.js +4 -3
- package/dist/retrieval-agents.d.ts +1 -1
- package/dist/retrieval-agents.js +1 -0
- package/dist/retrieval-tiers.js +1 -0
- package/dist/retrieval.js +1 -0
- package/dist/sanitize.js +1 -0
- package/dist/schemas.d.ts +37 -24
- package/dist/schemas.js +2 -1
- package/dist/sdk-compat.js +1 -0
- package/dist/sdk-compat.js.map +1 -1
- package/dist/secure-store-4R2GSO7S.js +156 -0
- package/dist/secure-store-4R2GSO7S.js.map +1 -0
- package/dist/semantic-chunking.js +1 -0
- package/dist/{semantic-consolidation-CxJU6MJk.d.ts → semantic-consolidation-ByBXb-sf.d.ts} +3 -3
- package/dist/semantic-consolidation.d.ts +2 -2
- package/dist/semantic-consolidation.js +11 -6
- package/dist/semantic-rule-promotion.d.ts +1 -1
- package/dist/semantic-rule-promotion.js +9 -6
- package/dist/semantic-rule-verifier.d.ts +1 -1
- package/dist/semantic-rule-verifier.js +9 -6
- package/dist/session-integrity.js +1 -0
- package/dist/session-observer-bands.js +1 -0
- package/dist/session-observer-state.js +1 -0
- package/dist/session-toggles.js +2 -0
- package/dist/session-toggles.js.map +1 -1
- package/dist/signal.js +1 -0
- package/dist/skills-registry.js +2 -0
- package/dist/skills-registry.js.map +1 -1
- package/dist/source-attribution.js +1 -0
- package/dist/state-NCHQ4TRG.js +8 -0
- package/dist/state-NCHQ4TRG.js.map +1 -0
- package/dist/state-store-3EH7HYIN.js +16 -0
- package/dist/state-store-3EH7HYIN.js.map +1 -0
- package/dist/storage.d.ts +76 -2
- package/dist/storage.js +8 -5
- package/dist/store-contract.js +1 -0
- package/dist/summarizer.js +5 -4
- package/dist/summary-snapshot.js +1 -0
- package/dist/temporal-index.js +1 -0
- package/dist/temporal-supersession.d.ts +1 -1
- package/dist/temporal-supersession.js +2 -1
- package/dist/temporal-validity.d.ts +52 -0
- package/dist/temporal-validity.js +14 -0
- package/dist/temporal-validity.js.map +1 -0
- package/dist/threading.js +1 -0
- package/dist/tier-migration.d.ts +2 -2
- package/dist/tier-migration.js +1 -0
- package/dist/tier-routing.js +1 -0
- package/dist/tier-stats-62ZVDFKS.js +152 -0
- package/dist/tier-stats-62ZVDFKS.js.map +1 -0
- package/dist/tmt.js +1 -0
- package/dist/tokens.js +1 -0
- package/dist/topics.js +1 -0
- package/dist/trace-C5ETWBEF.js +290 -0
- package/dist/trace-C5ETWBEF.js.map +1 -0
- package/dist/transcript.js +1 -0
- package/dist/trust-zones.js +1 -0
- package/dist/tui-RI7P6PBS.js +13 -0
- package/dist/tui-RI7P6PBS.js.map +1 -0
- package/dist/types-V3FJ26TF.js +30 -0
- package/dist/types-V3FJ26TF.js.map +1 -0
- package/dist/types.d.ts +634 -9
- package/dist/types.js +10 -3
- package/dist/utility-learner.js +1 -0
- package/dist/utility-runtime.js +1 -0
- package/dist/utility-telemetry.js +1 -0
- package/dist/verified-recall.js +9 -6
- package/dist/version-utils.js +1 -0
- package/dist/whitespace.js +1 -0
- package/dist/work-product-ledger.js +1 -0
- package/package.json +2 -1
- package/dist/access-service-Br8ZydTK.d.ts +0 -827
- package/dist/chunk-3OGMS3PE.js.map +0 -1
- package/dist/chunk-3YGHKTBF.js.map +0 -1
- package/dist/chunk-6PFRXT4K.js.map +0 -1
- package/dist/chunk-6YJHX2DL.js.map +0 -1
- package/dist/chunk-BECYBZLX.js.map +0 -1
- package/dist/chunk-C2EFFULQ.js.map +0 -1
- package/dist/chunk-CUPFXL3J.js.map +0 -1
- package/dist/chunk-DIXB44VE.js.map +0 -1
- package/dist/chunk-F5VP6YCB.js.map +0 -1
- package/dist/chunk-FVA6TGI3.js.map +0 -1
- package/dist/chunk-GA5P7RST.js.map +0 -1
- package/dist/chunk-KVBLZUKV.js.map +0 -1
- package/dist/chunk-L7IXWRYE.js.map +0 -1
- package/dist/chunk-LOIMBRDE.js.map +0 -1
- package/dist/chunk-LTCGGW2D.js +0 -14
- package/dist/chunk-LTCGGW2D.js.map +0 -1
- package/dist/chunk-NZLQTHS5.js.map +0 -1
- package/dist/chunk-OC5OXUQ4.js.map +0 -1
- package/dist/chunk-PVPWZSSI.js.map +0 -1
- package/dist/chunk-SPI27QT6.js.map +0 -1
- package/dist/chunk-STGWEHYR.js.map +0 -1
- package/dist/chunk-TP4FZJIZ.js.map +0 -1
- package/dist/chunk-ULYOGL6R.js.map +0 -1
- package/dist/chunk-UWB5LMWY.js.map +0 -1
- package/dist/chunk-VBVG2M5G.js.map +0 -1
- package/dist/chunk-VDX363PS.js.map +0 -1
- package/dist/chunk-WCLICCGB.js.map +0 -1
- package/dist/chunk-X6GF3FX2.js +0 -26
- package/dist/chunk-X6GF3FX2.js.map +0 -1
- package/dist/chunk-XXVWLXSG.js.map +0 -1
- package/dist/chunk-Y7R2XJ5Q.js.map +0 -1
- package/dist/chunk-ZAIM4TUE.js.map +0 -1
- /package/dist/{contradiction-review-WIUBAR52.js.map → capsule-cli.js.map} +0 -0
- /package/dist/{engine-72LSIWQP.js.map → capsule-crypto-5CYAGVC5.js.map} +0 -0
- /package/dist/{chunk-TMYO7B5P.js.map → chunk-47WOM4YW.js.map} +0 -0
- /package/dist/{chunk-DG6YMRDC.js.map → chunk-B2TL6GA2.js.map} +0 -0
- /package/dist/{chunk-AYXIPSZO.js.map → chunk-CRU27Q4J.js.map} +0 -0
- /package/dist/{chunk-RBBWYEFJ.js.map → chunk-G2WADRQ3.js.map} +0 -0
- /package/dist/{chunk-NBVAS5MT.js.map → chunk-R2L7SUX2.js.map} +0 -0
|
@@ -0,0 +1,160 @@
|
|
|
1
|
+
import { MemoryCategory, MemoryFile } from './types.js';
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* `remnic patterns` CLI helpers (issue #687 PR 4/4).
|
|
5
|
+
*
|
|
6
|
+
* Pure functions that:
|
|
7
|
+
*
|
|
8
|
+
* 1. Validate `--limit`, `--category`, `--since`, `--format` for
|
|
9
|
+
* `remnic patterns list` and `--format` for
|
|
10
|
+
* `remnic patterns explain <id>` (CLAUDE.md rules 14 + 51 — flags
|
|
11
|
+
* throw listed-options errors instead of silently defaulting).
|
|
12
|
+
*
|
|
13
|
+
* 2. Filter the memory corpus to canonical memories produced by the
|
|
14
|
+
* pattern-reinforcement maintenance job from issue #687 PR 2/4
|
|
15
|
+
* (`reinforcement_count > 0`) and sort them by reinforcement
|
|
16
|
+
* count, with `last_reinforced_at` (then `id`) as stable
|
|
17
|
+
* tiebreakers (CLAUDE.md rule 19).
|
|
18
|
+
*
|
|
19
|
+
* 3. Reconstruct a single canonical's full picture: its
|
|
20
|
+
* `derived_from` provenance chain (PR 2/4 stamps these), the
|
|
21
|
+
* cluster members it absorbed (memories pointing at it via
|
|
22
|
+
* `supersededBy`), and the canonical body so operators can read
|
|
23
|
+
* it inline.
|
|
24
|
+
*
|
|
25
|
+
* 4. Render `text` (default) / `markdown` / `json` output for both
|
|
26
|
+
* commands. The CLI handler in `cli.ts` stays thin and delegates
|
|
27
|
+
* formatting here so HTTP / MCP surfaces (if added later) can
|
|
28
|
+
* reuse the same renderers (CLAUDE.md rule 22 — never fork
|
|
29
|
+
* formatting).
|
|
30
|
+
*/
|
|
31
|
+
|
|
32
|
+
declare const PATTERNS_OUTPUT_FORMATS: readonly ["text", "markdown", "json"];
|
|
33
|
+
type PatternsOutputFormat = (typeof PATTERNS_OUTPUT_FORMATS)[number];
|
|
34
|
+
/**
|
|
35
|
+
* Validate `--format <fmt>`. Throws a listed-options error for any
|
|
36
|
+
* value not in `PATTERNS_OUTPUT_FORMATS`. Returns `"text"` when the
|
|
37
|
+
* value is `undefined` (no flag supplied).
|
|
38
|
+
*/
|
|
39
|
+
declare function parsePatternsFormat(value: unknown): PatternsOutputFormat;
|
|
40
|
+
/**
|
|
41
|
+
* Validate `--limit <N>`. Must be a positive integer. Returns
|
|
42
|
+
* `undefined` when the flag is absent (the caller falls back to a
|
|
43
|
+
* default).
|
|
44
|
+
*/
|
|
45
|
+
declare function parsePatternsLimit(value: unknown): number | undefined;
|
|
46
|
+
/**
|
|
47
|
+
* Validate `--category <list>`. Accepts a comma-separated list of
|
|
48
|
+
* non-empty trimmed tokens. Returns the deduplicated list, or
|
|
49
|
+
* `undefined` when no flag was supplied. CLAUDE.md rules 14 + 51:
|
|
50
|
+
* `--category` with no value or with a value that resolves to zero
|
|
51
|
+
* tokens is rejected.
|
|
52
|
+
*/
|
|
53
|
+
declare function parsePatternsCategory(value: unknown): string[] | undefined;
|
|
54
|
+
/**
|
|
55
|
+
* Validate `--since <ISO>`. Delegates to `parseStrictCliDate` which
|
|
56
|
+
* enforces a strict ISO 8601 shape and rejects calendar overflows and
|
|
57
|
+
* non-ISO formats (e.g. "12/25/2026", "Dec 25 2026") that bare
|
|
58
|
+
* `Date.parse()` would silently accept. Returns the canonical ISO
|
|
59
|
+
* string (round-trip through `toISOString`) so downstream comparisons
|
|
60
|
+
* use a consistent form.
|
|
61
|
+
*/
|
|
62
|
+
declare function parsePatternsSince(value: unknown): string | undefined;
|
|
63
|
+
interface ParsedPatternsListOptions {
|
|
64
|
+
format: PatternsOutputFormat;
|
|
65
|
+
limit?: number;
|
|
66
|
+
categories?: string[];
|
|
67
|
+
sinceIso?: string;
|
|
68
|
+
}
|
|
69
|
+
interface ParsedPatternsExplainOptions {
|
|
70
|
+
format: PatternsOutputFormat;
|
|
71
|
+
}
|
|
72
|
+
/**
|
|
73
|
+
* Validate the full option bag for `remnic patterns list`. Extracted
|
|
74
|
+
* from the CLI handler so validation can be unit-tested without
|
|
75
|
+
* booting an orchestrator (CLAUDE.md rules 14 + 51).
|
|
76
|
+
*/
|
|
77
|
+
declare function parsePatternsListOptions(options: Record<string, unknown>): ParsedPatternsListOptions;
|
|
78
|
+
/**
|
|
79
|
+
* Validate `remnic patterns explain` options + positional id. Throws
|
|
80
|
+
* when `<memoryId>` is missing or empty.
|
|
81
|
+
*/
|
|
82
|
+
declare function parsePatternsExplainOptions(rawId: unknown, options: Record<string, unknown>): {
|
|
83
|
+
id: string;
|
|
84
|
+
} & ParsedPatternsExplainOptions;
|
|
85
|
+
interface PatternListRow {
|
|
86
|
+
id: string;
|
|
87
|
+
category: MemoryCategory;
|
|
88
|
+
reinforcementCount: number;
|
|
89
|
+
lastReinforcedAt?: string;
|
|
90
|
+
status: string;
|
|
91
|
+
/** First non-empty content line, trimmed to ~120 chars for the table. */
|
|
92
|
+
preview: string;
|
|
93
|
+
/** Full path on disk (relative to memoryDir) for operators who want to inspect the file. */
|
|
94
|
+
path: string;
|
|
95
|
+
}
|
|
96
|
+
/**
|
|
97
|
+
* Filter, sort, and slice the memory corpus down to the rows the
|
|
98
|
+
* `remnic patterns list` command should print.
|
|
99
|
+
*
|
|
100
|
+
* Rules (each one is exercised by `tests/cli/patterns.test.ts`):
|
|
101
|
+
*
|
|
102
|
+
* - Memories without `reinforcement_count` (or with a count <= 0) are
|
|
103
|
+
* dropped — these are not pattern canonicals.
|
|
104
|
+
* - When `categories` is supplied, only memories whose
|
|
105
|
+
* `frontmatter.category` is in the list survive.
|
|
106
|
+
* - When `sinceIso` is supplied, only memories whose
|
|
107
|
+
* `last_reinforced_at` is `>= sinceIso` survive. Memories without
|
|
108
|
+
* `last_reinforced_at` are dropped under `--since` (PR 2/4 always
|
|
109
|
+
* stamps the timestamp alongside the count, so a missing timestamp
|
|
110
|
+
* means a malformed file the operator should not see in this view).
|
|
111
|
+
* - Sort by `reinforcement_count DESC`, then `last_reinforced_at
|
|
112
|
+
* DESC`, then `id ASC` for a stable, deterministic order
|
|
113
|
+
* (CLAUDE.md rule 19).
|
|
114
|
+
* - Apply `limit` (default 50).
|
|
115
|
+
*/
|
|
116
|
+
declare function collectPatternMemories(memories: readonly MemoryFile[], opts: ParsedPatternsListOptions): PatternListRow[];
|
|
117
|
+
interface PatternDerivedFromEntry {
|
|
118
|
+
/** Raw `"<path>:<version>"` reference exactly as stored in `derived_from`. */
|
|
119
|
+
ref: string;
|
|
120
|
+
/** Source memory id, or the path component for older `path:version` references. */
|
|
121
|
+
path: string;
|
|
122
|
+
/** Page-version number component for older `path:version` references. */
|
|
123
|
+
version: number | null;
|
|
124
|
+
/** True when an older path-version reference had an invalid version component. */
|
|
125
|
+
malformed?: boolean;
|
|
126
|
+
}
|
|
127
|
+
interface PatternClusterMember {
|
|
128
|
+
id: string;
|
|
129
|
+
status: string;
|
|
130
|
+
supersededAt?: string;
|
|
131
|
+
path: string;
|
|
132
|
+
preview: string;
|
|
133
|
+
}
|
|
134
|
+
interface PatternExplainDetail {
|
|
135
|
+
id: string;
|
|
136
|
+
category: MemoryCategory;
|
|
137
|
+
reinforcementCount: number;
|
|
138
|
+
lastReinforcedAt?: string;
|
|
139
|
+
status: string;
|
|
140
|
+
derivedVia?: string;
|
|
141
|
+
/** Full canonical body (frontmatter stripped). */
|
|
142
|
+
canonicalContent: string;
|
|
143
|
+
canonicalPath: string;
|
|
144
|
+
/** Parsed `derived_from` chain — empty when PR 2/4 did not stamp it. */
|
|
145
|
+
derivedFrom: PatternDerivedFromEntry[];
|
|
146
|
+
/** Memories whose `supersededBy === <id>`, sorted by `supersededAt DESC` then `id ASC`. */
|
|
147
|
+
clusterMembers: PatternClusterMember[];
|
|
148
|
+
}
|
|
149
|
+
/**
|
|
150
|
+
* Build the structured detail object for a single canonical. Returns
|
|
151
|
+
* `null` when the memory is not found or has never been touched by
|
|
152
|
+
* pattern reinforcement (i.e., no `reinforcement_count`). The CLI
|
|
153
|
+
* handler then prints a clean "not a pattern" error rather than
|
|
154
|
+
* leaking an empty document.
|
|
155
|
+
*/
|
|
156
|
+
declare function explainPatternMemory(memories: readonly MemoryFile[], id: string): PatternExplainDetail | null;
|
|
157
|
+
declare function renderPatternsList(rows: readonly PatternListRow[], format: PatternsOutputFormat): string;
|
|
158
|
+
declare function renderPatternExplain(detail: PatternExplainDetail, format: PatternsOutputFormat): string;
|
|
159
|
+
|
|
160
|
+
export { PATTERNS_OUTPUT_FORMATS, type ParsedPatternsExplainOptions, type ParsedPatternsListOptions, type PatternClusterMember, type PatternDerivedFromEntry, type PatternExplainDetail, type PatternListRow, type PatternsOutputFormat, collectPatternMemories, explainPatternMemory, parsePatternsCategory, parsePatternsExplainOptions, parsePatternsFormat, parsePatternsLimit, parsePatternsListOptions, parsePatternsSince, renderPatternExplain, renderPatternsList };
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
import {
|
|
2
|
+
PATTERNS_OUTPUT_FORMATS,
|
|
3
|
+
collectPatternMemories,
|
|
4
|
+
explainPatternMemory,
|
|
5
|
+
parsePatternsCategory,
|
|
6
|
+
parsePatternsExplainOptions,
|
|
7
|
+
parsePatternsFormat,
|
|
8
|
+
parsePatternsLimit,
|
|
9
|
+
parsePatternsListOptions,
|
|
10
|
+
parsePatternsSince,
|
|
11
|
+
renderPatternExplain,
|
|
12
|
+
renderPatternsList
|
|
13
|
+
} from "./chunk-AJA46VX5.js";
|
|
14
|
+
import "./chunk-G7D6GZ5J.js";
|
|
15
|
+
import "./chunk-PZ5AY32C.js";
|
|
16
|
+
export {
|
|
17
|
+
PATTERNS_OUTPUT_FORMATS,
|
|
18
|
+
collectPatternMemories,
|
|
19
|
+
explainPatternMemory,
|
|
20
|
+
parsePatternsCategory,
|
|
21
|
+
parsePatternsExplainOptions,
|
|
22
|
+
parsePatternsFormat,
|
|
23
|
+
parsePatternsLimit,
|
|
24
|
+
parsePatternsListOptions,
|
|
25
|
+
parsePatternsSince,
|
|
26
|
+
renderPatternExplain,
|
|
27
|
+
renderPatternsList
|
|
28
|
+
};
|
|
29
|
+
//# sourceMappingURL=patterns-cli.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":[],"sourcesContent":[],"mappings":"","names":[]}
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
import {
|
|
2
|
+
buildPeerProfileReasonerPrompt,
|
|
3
|
+
parsePeerProfileReasonerResponse,
|
|
4
|
+
runPeerProfileReasoner
|
|
5
|
+
} from "./chunk-3LCWFNVS.js";
|
|
6
|
+
import {
|
|
7
|
+
PEERS_DIR_NAME,
|
|
8
|
+
PEER_ID_MAX_LENGTH,
|
|
9
|
+
PEER_ID_PATTERN,
|
|
10
|
+
appendInteractionLog,
|
|
11
|
+
assertValidPeerId,
|
|
12
|
+
deletePeer,
|
|
13
|
+
forgetPeer,
|
|
14
|
+
listPeers,
|
|
15
|
+
migrateFromIdentityAnchor,
|
|
16
|
+
readInteractionLogRaw,
|
|
17
|
+
readPeer,
|
|
18
|
+
readPeerInteractionLog,
|
|
19
|
+
readPeerProfile,
|
|
20
|
+
writePeer,
|
|
21
|
+
writePeerProfile
|
|
22
|
+
} from "./chunk-TUFG6VXY.js";
|
|
23
|
+
import "./chunk-PZ5AY32C.js";
|
|
24
|
+
export {
|
|
25
|
+
PEERS_DIR_NAME,
|
|
26
|
+
PEER_ID_MAX_LENGTH,
|
|
27
|
+
PEER_ID_PATTERN,
|
|
28
|
+
appendInteractionLog,
|
|
29
|
+
assertValidPeerId,
|
|
30
|
+
buildPeerProfileReasonerPrompt,
|
|
31
|
+
deletePeer,
|
|
32
|
+
forgetPeer,
|
|
33
|
+
listPeers,
|
|
34
|
+
migrateFromIdentityAnchor,
|
|
35
|
+
parsePeerProfileReasonerResponse,
|
|
36
|
+
readInteractionLogRaw,
|
|
37
|
+
readPeer,
|
|
38
|
+
readPeerInteractionLog,
|
|
39
|
+
readPeerProfile,
|
|
40
|
+
runPeerProfileReasoner,
|
|
41
|
+
writePeer,
|
|
42
|
+
writePeerProfile
|
|
43
|
+
};
|
|
44
|
+
//# sourceMappingURL=peers-6OSQ3NK6.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":[],"sourcesContent":[],"mappings":"","names":[]}
|
package/dist/plugin-id.js
CHANGED
package/dist/policy-runtime.js
CHANGED
|
@@ -33,6 +33,12 @@ interface SearchBackend {
|
|
|
33
33
|
hybridSearch(query: string, collection?: string, maxResults?: number, execution?: SearchExecutionOptions): Promise<SearchResult[]>;
|
|
34
34
|
update(execution?: SearchExecutionOptions): Promise<void>;
|
|
35
35
|
updateCollection(collection: string, execution?: SearchExecutionOptions): Promise<void>;
|
|
36
|
+
/**
|
|
37
|
+
* Optional strict refresh used by callers that must know whether a collection
|
|
38
|
+
* was actually refreshed before writing success markers. Ordinary update
|
|
39
|
+
* calls remain fail-open for migration/maintenance resilience.
|
|
40
|
+
*/
|
|
41
|
+
updateCollectionStrict?(collection: string, execution?: SearchExecutionOptions): Promise<void>;
|
|
36
42
|
embed(): Promise<void>;
|
|
37
43
|
embedCollection(collection: string): Promise<void>;
|
|
38
44
|
ensureCollection(memoryDir: string): Promise<"present" | "missing" | "unknown" | "skipped">;
|
package/dist/profiling.js
CHANGED
|
@@ -0,0 +1,205 @@
|
|
|
1
|
+
import "./chunk-PZ5AY32C.js";
|
|
2
|
+
|
|
3
|
+
// src/maintenance/purge.ts
|
|
4
|
+
import path from "path";
|
|
5
|
+
import { appendFile, mkdir, unlink } from "fs/promises";
|
|
6
|
+
function hasErrorCode(err, code) {
|
|
7
|
+
return typeof err === "object" && err !== null && "code" in err && err.code === code;
|
|
8
|
+
}
|
|
9
|
+
function resolveTimestamp(memory) {
|
|
10
|
+
const fm = memory.frontmatter;
|
|
11
|
+
const updated = typeof fm.updated === "string" ? fm.updated : "";
|
|
12
|
+
const created = typeof fm.created === "string" ? fm.created : "";
|
|
13
|
+
return updated.length > 0 ? updated : created;
|
|
14
|
+
}
|
|
15
|
+
async function logPurgeAudit(storage, candidates, now, event = "PURGE_HARD_DELETE") {
|
|
16
|
+
if (candidates.length === 0) return;
|
|
17
|
+
const ledgerDir = path.join(storage.dir, "state", "observation-ledger");
|
|
18
|
+
await mkdir(ledgerDir, { recursive: true });
|
|
19
|
+
const ledgerPath = path.join(ledgerDir, "purge-audit.jsonl");
|
|
20
|
+
const entries = candidates.map(
|
|
21
|
+
(c) => JSON.stringify({
|
|
22
|
+
event,
|
|
23
|
+
timestamp: now.toISOString(),
|
|
24
|
+
memoryId: c.id,
|
|
25
|
+
path: c.path,
|
|
26
|
+
tier: c.tier,
|
|
27
|
+
status: c.status,
|
|
28
|
+
updatedOrCreated: c.updatedOrCreated
|
|
29
|
+
})
|
|
30
|
+
);
|
|
31
|
+
if (entries.length > 0) {
|
|
32
|
+
await appendFile(ledgerPath, `${entries.join("\n")}
|
|
33
|
+
`, "utf-8");
|
|
34
|
+
}
|
|
35
|
+
}
|
|
36
|
+
async function purgeMemories(options) {
|
|
37
|
+
const {
|
|
38
|
+
storage,
|
|
39
|
+
olderThanMs,
|
|
40
|
+
tier = "cold",
|
|
41
|
+
forgottenOnly = false,
|
|
42
|
+
dryRun = true,
|
|
43
|
+
qmd,
|
|
44
|
+
hotCollection = "openclaw-engram",
|
|
45
|
+
coldCollection = "openclaw-engram-cold"
|
|
46
|
+
} = options;
|
|
47
|
+
if (!Number.isFinite(olderThanMs) || olderThanMs <= 0) {
|
|
48
|
+
throw new Error("olderThanMs must be a finite positive number");
|
|
49
|
+
}
|
|
50
|
+
const now = (options.now ?? (() => /* @__PURE__ */ new Date()))();
|
|
51
|
+
const nowMs = now.getTime();
|
|
52
|
+
const [hotMemories, coldMemories, archivedMemories] = await Promise.all([
|
|
53
|
+
tier === "all" ? storage.readAllMemories() : Promise.resolve([]),
|
|
54
|
+
storage.readAllColdMemories(),
|
|
55
|
+
tier === "all" ? storage.readArchivedMemories() : Promise.resolve([])
|
|
56
|
+
]);
|
|
57
|
+
const poolEntries = [];
|
|
58
|
+
if (tier === "all") {
|
|
59
|
+
for (const m of hotMemories) {
|
|
60
|
+
poolEntries.push({ memory: m, resolvedTier: "hot" });
|
|
61
|
+
}
|
|
62
|
+
for (const m of archivedMemories) {
|
|
63
|
+
poolEntries.push({ memory: m, resolvedTier: "archive" });
|
|
64
|
+
}
|
|
65
|
+
}
|
|
66
|
+
for (const m of coldMemories) {
|
|
67
|
+
poolEntries.push({ memory: m, resolvedTier: "cold" });
|
|
68
|
+
}
|
|
69
|
+
const candidates = [];
|
|
70
|
+
const candidateMemoriesById = /* @__PURE__ */ new Map();
|
|
71
|
+
for (const { memory, resolvedTier } of poolEntries) {
|
|
72
|
+
const ts = resolveTimestamp(memory);
|
|
73
|
+
if (ts.length === 0) continue;
|
|
74
|
+
const tsMs = Date.parse(ts);
|
|
75
|
+
if (!Number.isFinite(tsMs)) continue;
|
|
76
|
+
const ageMs = nowMs - tsMs;
|
|
77
|
+
if (ageMs < olderThanMs) continue;
|
|
78
|
+
const fm = memory.frontmatter;
|
|
79
|
+
const status = typeof fm.status === "string" ? fm.status : "active";
|
|
80
|
+
if (forgottenOnly && status !== "forgotten") continue;
|
|
81
|
+
candidates.push({
|
|
82
|
+
id: memory.frontmatter.id,
|
|
83
|
+
path: memory.path,
|
|
84
|
+
tier: resolvedTier,
|
|
85
|
+
status,
|
|
86
|
+
updatedOrCreated: ts,
|
|
87
|
+
ageMs
|
|
88
|
+
});
|
|
89
|
+
candidateMemoriesById.set(memory.frontmatter.id, memory);
|
|
90
|
+
}
|
|
91
|
+
if (dryRun) {
|
|
92
|
+
return {
|
|
93
|
+
dryRun: true,
|
|
94
|
+
tier,
|
|
95
|
+
olderThanMs,
|
|
96
|
+
candidates,
|
|
97
|
+
purgedCount: 0,
|
|
98
|
+
alreadyAbsentCount: 0,
|
|
99
|
+
errorCount: 0,
|
|
100
|
+
errors: []
|
|
101
|
+
};
|
|
102
|
+
}
|
|
103
|
+
const errors = [];
|
|
104
|
+
try {
|
|
105
|
+
await logPurgeAudit(storage, candidates, now, "PURGE_DELETE_INTENT");
|
|
106
|
+
} catch (auditErr) {
|
|
107
|
+
errors.push({
|
|
108
|
+
id: "(purge-audit)",
|
|
109
|
+
path: path.join(storage.dir, "state", "observation-ledger", "purge-audit.jsonl"),
|
|
110
|
+
error: auditErr instanceof Error ? auditErr.message : String(auditErr)
|
|
111
|
+
});
|
|
112
|
+
}
|
|
113
|
+
const actuallyPurged = [];
|
|
114
|
+
const alreadyAbsent = [];
|
|
115
|
+
const collectionsToUpdate = /* @__PURE__ */ new Set();
|
|
116
|
+
const addCollectionForCandidate = (candidate) => {
|
|
117
|
+
if (candidate.tier === "cold") {
|
|
118
|
+
collectionsToUpdate.add(coldCollection);
|
|
119
|
+
} else if (candidate.tier === "hot") {
|
|
120
|
+
collectionsToUpdate.add(hotCollection);
|
|
121
|
+
}
|
|
122
|
+
};
|
|
123
|
+
for (const candidate of candidates) {
|
|
124
|
+
try {
|
|
125
|
+
await unlink(candidate.path);
|
|
126
|
+
actuallyPurged.push(candidate);
|
|
127
|
+
addCollectionForCandidate(candidate);
|
|
128
|
+
} catch (err) {
|
|
129
|
+
const message = err instanceof Error ? err.message : String(err);
|
|
130
|
+
if (hasErrorCode(err, "ENOENT")) {
|
|
131
|
+
alreadyAbsent.push(candidate);
|
|
132
|
+
addCollectionForCandidate(candidate);
|
|
133
|
+
} else {
|
|
134
|
+
errors.push({ id: candidate.id, path: candidate.path, error: message });
|
|
135
|
+
}
|
|
136
|
+
}
|
|
137
|
+
}
|
|
138
|
+
const recordPostDeleteAudit = async (purgedCandidates, event) => {
|
|
139
|
+
try {
|
|
140
|
+
await logPurgeAudit(storage, purgedCandidates, now, event);
|
|
141
|
+
} catch (auditErr) {
|
|
142
|
+
errors.push({
|
|
143
|
+
id: "(purge-audit)",
|
|
144
|
+
path: path.join(storage.dir, "state", "observation-ledger", "purge-audit.jsonl"),
|
|
145
|
+
error: auditErr instanceof Error ? auditErr.message : String(auditErr)
|
|
146
|
+
});
|
|
147
|
+
}
|
|
148
|
+
};
|
|
149
|
+
await recordPostDeleteAudit(actuallyPurged, "PURGE_HARD_DELETE");
|
|
150
|
+
await recordPostDeleteAudit(alreadyAbsent, "PURGE_ALREADY_ABSENT");
|
|
151
|
+
const resolvedPurges = [...actuallyPurged, ...alreadyAbsent];
|
|
152
|
+
const invalidateTierCaches = storage.invalidateMemoryCachesForTiers;
|
|
153
|
+
if (typeof invalidateTierCaches === "function") {
|
|
154
|
+
invalidateTierCaches.call(storage, new Set(resolvedPurges.map((candidate) => candidate.tier)));
|
|
155
|
+
} else if (typeof storage.invalidateAllMemoriesCacheForDir === "function") {
|
|
156
|
+
storage.invalidateAllMemoriesCacheForDir();
|
|
157
|
+
}
|
|
158
|
+
if (qmd) {
|
|
159
|
+
for (const collection of collectionsToUpdate) {
|
|
160
|
+
try {
|
|
161
|
+
if (typeof qmd.updateCollectionStrict === "function") {
|
|
162
|
+
await qmd.updateCollectionStrict(collection, { signal: options.signal });
|
|
163
|
+
} else {
|
|
164
|
+
await qmd.updateCollection(collection, { signal: options.signal });
|
|
165
|
+
}
|
|
166
|
+
} catch (indexErr) {
|
|
167
|
+
errors.push({
|
|
168
|
+
id: "(qmd-update)",
|
|
169
|
+
path: collection,
|
|
170
|
+
error: indexErr instanceof Error ? indexErr.message : String(indexErr)
|
|
171
|
+
});
|
|
172
|
+
}
|
|
173
|
+
}
|
|
174
|
+
}
|
|
175
|
+
const purgedFactMemories = resolvedPurges.map((candidate) => candidateMemoriesById.get(candidate.id)).filter((memory) => memory?.frontmatter.category === "fact");
|
|
176
|
+
if (purgedFactMemories.length > 0) {
|
|
177
|
+
const removeFactHashes = storage.removeFactContentHashesForMemories;
|
|
178
|
+
if (typeof removeFactHashes === "function") {
|
|
179
|
+
try {
|
|
180
|
+
await removeFactHashes.call(storage, purgedFactMemories);
|
|
181
|
+
await options.afterFactHashRemoval?.();
|
|
182
|
+
} catch (hashErr) {
|
|
183
|
+
errors.push({
|
|
184
|
+
id: "(fact-hash-index)",
|
|
185
|
+
path: path.join(storage.dir, "state", "fact-hashes.txt"),
|
|
186
|
+
error: hashErr instanceof Error ? hashErr.message : String(hashErr)
|
|
187
|
+
});
|
|
188
|
+
}
|
|
189
|
+
}
|
|
190
|
+
}
|
|
191
|
+
return {
|
|
192
|
+
dryRun: false,
|
|
193
|
+
tier,
|
|
194
|
+
olderThanMs,
|
|
195
|
+
candidates,
|
|
196
|
+
purgedCount: actuallyPurged.length,
|
|
197
|
+
alreadyAbsentCount: alreadyAbsent.length,
|
|
198
|
+
errorCount: errors.length,
|
|
199
|
+
errors
|
|
200
|
+
};
|
|
201
|
+
}
|
|
202
|
+
export {
|
|
203
|
+
purgeMemories
|
|
204
|
+
};
|
|
205
|
+
//# sourceMappingURL=purge-6ATBGT77.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../src/maintenance/purge.ts"],"sourcesContent":["/**\n * Operator-facing bulk hard-delete (issue #686 retention-completion).\n *\n * `purgeMemories(opts)` hard-deletes memories that are:\n * - older than `olderThanMs` (measured against `updated ?? created`), AND\n * - in the specified tier (`\"cold\"` or `\"all\"`), AND\n * - optionally in `status: \"forgotten\"` only (when `forgottenOnly` is true)\n *\n * Hard-delete means:\n * 1. Remove the file from disk.\n * 2. Trigger a QMD collection update so the index no longer contains it.\n * 3. Append a purge audit entry to the observation ledger.\n *\n * `dryRun: true` (the default) reports what *would* be deleted without\n * actually removing anything — callers must opt into mutations by\n * setting `dryRun: false`.\n *\n * The CLI surface enforces an explicit `--confirm yes` guard and\n * defaults to `--dry-run` to make accidental data loss impossible.\n */\n\nimport path from \"node:path\";\nimport { appendFile, mkdir, unlink } from \"node:fs/promises\";\nimport type { StorageManager } from \"../storage.js\";\nimport type { MemoryFile } from \"../types.js\";\nimport type { SearchBackend } from \"../search/port.js\";\n\nexport type PurgeTierFilter = \"cold\" | \"all\";\n\nexport interface PurgeMemoriesOptions {\n storage: StorageManager;\n /**\n * Only memories whose `updated ?? created` timestamp is older than this\n * value (in milliseconds, Unix epoch) will be candidates.\n */\n olderThanMs: number;\n /**\n * `\"cold\"` — only memories in the cold tier (files under `.../cold/`).\n * `\"all\"` — memories in any tier (hot, cold, or archived).\n * Default: `\"cold\"`.\n */\n tier?: PurgeTierFilter;\n /**\n * When `true`, only memories with `status === \"forgotten\"` are candidates.\n * Default: `false` (purge by age + tier regardless of status).\n */\n forgottenOnly?: boolean;\n /** When `true` (default), report candidates but do not delete. */\n dryRun?: boolean;\n /**\n * Optional QMD backend. When supplied and `dryRun === false`, a\n * `updateCollection` call is issued after each deletion so the index stays\n * consistent. Pass `undefined` or omit to skip index maintenance (e.g. in\n * tests that don't have a live QMD instance).\n */\n qmd?: SearchBackend;\n /** Hot-tier QMD collection name (default: `\"openclaw-engram\"`). */\n hotCollection?: string;\n /** Cold-tier QMD collection name (default: `\"openclaw-engram-cold\"`). */\n coldCollection?: string;\n /** Optional hook for long-lived hosts to clear their live dedupe mirror after purge hash cleanup. */\n afterFactHashRemoval?: () => void | Promise<void>;\n /** Optional shutdown signal forwarded to QMD collection refreshes. */\n signal?: AbortSignal;\n /** Override clock for tests. */\n now?: () => Date;\n}\n\nexport interface PurgeCandidate {\n id: string;\n path: string;\n tier: \"hot\" | \"cold\" | \"archive\";\n status: string;\n updatedOrCreated: string;\n ageMs: number;\n}\n\nexport interface PurgeMemoriesResult {\n dryRun: boolean;\n tier: PurgeTierFilter;\n olderThanMs: number;\n candidates: PurgeCandidate[];\n purgedCount: number;\n alreadyAbsentCount: number;\n errorCount: number;\n errors: Array<{ id: string; path: string; error: string }>;\n}\n\nfunction hasErrorCode(err: unknown, code: string): boolean {\n return typeof err === \"object\" && err !== null && \"code\" in err && (err as { code?: unknown }).code === code;\n}\n\nfunction resolveTimestamp(memory: MemoryFile): string {\n const fm = memory.frontmatter as unknown as Record<string, unknown>;\n const updated = typeof fm.updated === \"string\" ? (fm.updated as string) : \"\";\n const created = typeof fm.created === \"string\" ? (fm.created as string) : \"\";\n return updated.length > 0 ? updated : created;\n}\n\nasync function logPurgeAudit(\n storage: StorageManager,\n candidates: PurgeCandidate[],\n now: Date,\n event: \"PURGE_DELETE_INTENT\" | \"PURGE_HARD_DELETE\" | \"PURGE_ALREADY_ABSENT\" = \"PURGE_HARD_DELETE\",\n): Promise<void> {\n if (candidates.length === 0) return;\n const ledgerDir = path.join(storage.dir, \"state\", \"observation-ledger\");\n await mkdir(ledgerDir, { recursive: true });\n const ledgerPath = path.join(ledgerDir, \"purge-audit.jsonl\");\n const entries = candidates.map((c) =>\n JSON.stringify({\n event,\n timestamp: now.toISOString(),\n memoryId: c.id,\n path: c.path,\n tier: c.tier,\n status: c.status,\n updatedOrCreated: c.updatedOrCreated,\n }),\n );\n if (entries.length > 0) {\n await appendFile(ledgerPath, `${entries.join(\"\\n\")}\\n`, \"utf-8\");\n }\n}\n\nexport async function purgeMemories(\n options: PurgeMemoriesOptions,\n): Promise<PurgeMemoriesResult> {\n const {\n storage,\n olderThanMs,\n tier = \"cold\",\n forgottenOnly = false,\n dryRun = true,\n qmd,\n hotCollection = \"openclaw-engram\",\n coldCollection = \"openclaw-engram-cold\",\n } = options;\n\n if (!Number.isFinite(olderThanMs) || olderThanMs <= 0) {\n throw new Error(\"olderThanMs must be a finite positive number\");\n }\n\n const now = (options.now ?? (() => new Date()))();\n const nowMs = now.getTime();\n\n // Collect all memories from applicable tiers\n const [hotMemories, coldMemories, archivedMemories] = await Promise.all([\n tier === \"all\" ? storage.readAllMemories() : Promise.resolve([]),\n storage.readAllColdMemories(),\n tier === \"all\" ? storage.readArchivedMemories() : Promise.resolve([]),\n ]);\n\n const poolEntries: Array<{ memory: MemoryFile; resolvedTier: \"hot\" | \"cold\" | \"archive\" }> = [];\n\n if (tier === \"all\") {\n for (const m of hotMemories) {\n poolEntries.push({ memory: m, resolvedTier: \"hot\" });\n }\n for (const m of archivedMemories) {\n poolEntries.push({ memory: m, resolvedTier: \"archive\" });\n }\n }\n for (const m of coldMemories) {\n poolEntries.push({ memory: m, resolvedTier: \"cold\" });\n }\n\n // Build candidate list\n const candidates: PurgeCandidate[] = [];\n const candidateMemoriesById = new Map<string, MemoryFile>();\n for (const { memory, resolvedTier } of poolEntries) {\n const ts = resolveTimestamp(memory);\n if (ts.length === 0) continue;\n\n const tsMs = Date.parse(ts);\n if (!Number.isFinite(tsMs)) continue;\n\n const ageMs = nowMs - tsMs;\n if (ageMs < olderThanMs) continue;\n\n const fm = memory.frontmatter as unknown as Record<string, unknown>;\n const status: string =\n typeof fm.status === \"string\" ? (fm.status as string) : \"active\";\n\n if (forgottenOnly && status !== \"forgotten\") continue;\n\n candidates.push({\n id: memory.frontmatter.id,\n path: memory.path,\n tier: resolvedTier,\n status,\n updatedOrCreated: ts,\n ageMs,\n });\n candidateMemoriesById.set(memory.frontmatter.id, memory);\n }\n\n if (dryRun) {\n return {\n dryRun: true,\n tier,\n olderThanMs,\n candidates,\n purgedCount: 0,\n alreadyAbsentCount: 0,\n errorCount: 0,\n errors: [],\n };\n }\n\n // Hard-delete phase\n const errors: Array<{ id: string; path: string; error: string }> = [];\n try {\n await logPurgeAudit(storage, candidates, now, \"PURGE_DELETE_INTENT\");\n } catch (auditErr) {\n errors.push({\n id: \"(purge-audit)\",\n path: path.join(storage.dir, \"state\", \"observation-ledger\", \"purge-audit.jsonl\"),\n error: auditErr instanceof Error ? auditErr.message : String(auditErr),\n });\n }\n\n const actuallyPurged: PurgeCandidate[] = [];\n const alreadyAbsent: PurgeCandidate[] = [];\n const collectionsToUpdate = new Set<string>();\n const addCollectionForCandidate = (candidate: PurgeCandidate) => {\n if (candidate.tier === \"cold\") {\n collectionsToUpdate.add(coldCollection);\n } else if (candidate.tier === \"hot\") {\n collectionsToUpdate.add(hotCollection);\n }\n };\n\n for (const candidate of candidates) {\n try {\n await unlink(candidate.path);\n actuallyPurged.push(candidate);\n addCollectionForCandidate(candidate);\n } catch (err) {\n const message = err instanceof Error ? err.message : String(err);\n // ENOENT is fine — already gone\n if (hasErrorCode(err, \"ENOENT\")) {\n alreadyAbsent.push(candidate);\n addCollectionForCandidate(candidate);\n } else {\n errors.push({ id: candidate.id, path: candidate.path, error: message });\n }\n }\n }\n\n const recordPostDeleteAudit = async (\n purgedCandidates: PurgeCandidate[],\n event: \"PURGE_HARD_DELETE\" | \"PURGE_ALREADY_ABSENT\",\n ) => {\n try {\n await logPurgeAudit(storage, purgedCandidates, now, event);\n } catch (auditErr) {\n errors.push({\n id: \"(purge-audit)\",\n path: path.join(storage.dir, \"state\", \"observation-ledger\", \"purge-audit.jsonl\"),\n error: auditErr instanceof Error ? auditErr.message : String(auditErr),\n });\n }\n };\n await recordPostDeleteAudit(actuallyPurged, \"PURGE_HARD_DELETE\");\n await recordPostDeleteAudit(alreadyAbsent, \"PURGE_ALREADY_ABSENT\");\n\n const resolvedPurges = [...actuallyPurged, ...alreadyAbsent];\n\n const invalidateTierCaches = (\n storage as unknown as {\n invalidateMemoryCachesForTiers?: (tiers: Iterable<\"hot\" | \"cold\" | \"archive\">) => void;\n }\n ).invalidateMemoryCachesForTiers;\n if (typeof invalidateTierCaches === \"function\") {\n invalidateTierCaches.call(storage, new Set(resolvedPurges.map((candidate) => candidate.tier)));\n } else if (typeof (storage as unknown as { invalidateAllMemoriesCacheForDir?: () => void }).invalidateAllMemoriesCacheForDir === \"function\") {\n (storage as unknown as { invalidateAllMemoriesCacheForDir: () => void }).invalidateAllMemoriesCacheForDir();\n }\n\n // Update QMD index for affected collections\n if (qmd) {\n for (const collection of collectionsToUpdate) {\n try {\n if (typeof qmd.updateCollectionStrict === \"function\") {\n await qmd.updateCollectionStrict(collection, { signal: options.signal });\n } else {\n await qmd.updateCollection(collection, { signal: options.signal });\n }\n } catch (indexErr) {\n // Non-fatal — operator can re-index manually\n errors.push({\n id: \"(qmd-update)\",\n path: collection,\n error: indexErr instanceof Error ? indexErr.message : String(indexErr),\n });\n }\n }\n }\n\n const purgedFactMemories = resolvedPurges\n .map((candidate) => candidateMemoriesById.get(candidate.id))\n .filter((memory): memory is MemoryFile => memory?.frontmatter.category === \"fact\");\n if (purgedFactMemories.length > 0) {\n const removeFactHashes = (\n storage as unknown as {\n removeFactContentHashesForMemories?: (memories: MemoryFile[]) => Promise<void>;\n }\n ).removeFactContentHashesForMemories;\n if (typeof removeFactHashes === \"function\") {\n try {\n await removeFactHashes.call(storage, purgedFactMemories);\n await options.afterFactHashRemoval?.();\n } catch (hashErr) {\n errors.push({\n id: \"(fact-hash-index)\",\n path: path.join(storage.dir, \"state\", \"fact-hashes.txt\"),\n error: hashErr instanceof Error ? hashErr.message : String(hashErr),\n });\n }\n }\n }\n\n return {\n dryRun: false,\n tier,\n olderThanMs,\n candidates,\n purgedCount: actuallyPurged.length,\n alreadyAbsentCount: alreadyAbsent.length,\n errorCount: errors.length,\n errors,\n };\n}\n"],"mappings":";;;AAqBA,OAAO,UAAU;AACjB,SAAS,YAAY,OAAO,cAAc;AAkE1C,SAAS,aAAa,KAAc,MAAuB;AACzD,SAAO,OAAO,QAAQ,YAAY,QAAQ,QAAQ,UAAU,OAAQ,IAA2B,SAAS;AAC1G;AAEA,SAAS,iBAAiB,QAA4B;AACpD,QAAM,KAAK,OAAO;AAClB,QAAM,UAAU,OAAO,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B,eAAO,KAAK;AAAA,UACV,IAAI;AAAA,UACJ,MAAM,KAAK,KAAK,QAAQ,KAAK,SAAS,iBAAiB;AAAA,UACvD,OAAO,mBAAmB,QAAQ,QAAQ,UAAU,OAAO,OAAO;AAAA,QACpE,CAAC;AAAA,MACH;AAAA,IACF;AAAA,EACF;AAEA,SAAO;AAAA,IACL,QAAQ;AAAA,IACR;AAAA,IACA;AAAA,IACA;AAAA,IACA,aAAa,eAAe;AAAA,IAC5B,oBAAoB,cAAc;AAAA,IAClC,YAAY,OAAO;AAAA,IACnB;AAAA,EACF;AACF;","names":[]}
|
package/dist/qmd-recall-cache.js
CHANGED
package/dist/qmd.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { QmdSearchResult, QmdSearchExplain } from './types.js';
|
|
2
|
-
import { S as SearchBackend, a as SearchQueryOptions, b as SearchExecutionOptions } from './port-
|
|
2
|
+
import { S as SearchBackend, a as SearchQueryOptions, b as SearchExecutionOptions } from './port-hqGnoStS.js';
|
|
3
3
|
|
|
4
4
|
interface QmdClientOptions {
|
|
5
5
|
slowLog?: {
|
|
@@ -101,6 +101,7 @@ declare class QmdClient implements SearchBackend {
|
|
|
101
101
|
private searchGlobalViaSubprocess;
|
|
102
102
|
update(execution?: SearchExecutionOptions): Promise<void>;
|
|
103
103
|
updateCollection(collection: string, execution?: SearchExecutionOptions): Promise<void>;
|
|
104
|
+
updateCollectionStrict(collection: string, execution?: SearchExecutionOptions): Promise<void>;
|
|
104
105
|
private runUpdateForCollection;
|
|
105
106
|
embed(): Promise<void>;
|
|
106
107
|
embedCollection(collection: string): Promise<void>;
|
package/dist/qmd.js
CHANGED
|
@@ -1,12 +1,13 @@
|
|
|
1
1
|
import {
|
|
2
2
|
QmdClient,
|
|
3
3
|
parseQmdExplain
|
|
4
|
-
} from "./chunk-
|
|
5
|
-
import "./chunk-OR64ZGRZ.js";
|
|
4
|
+
} from "./chunk-WSZIHQBK.js";
|
|
6
5
|
import "./chunk-PVGDJXVK.js";
|
|
7
|
-
import "./chunk-
|
|
6
|
+
import "./chunk-OR64ZGRZ.js";
|
|
7
|
+
import "./chunk-PFV5C235.js";
|
|
8
8
|
import "./chunk-MARWOCVP.js";
|
|
9
9
|
import "./chunk-2ODBA7MQ.js";
|
|
10
|
+
import "./chunk-PZ5AY32C.js";
|
|
10
11
|
export {
|
|
11
12
|
QmdClient,
|
|
12
13
|
parseQmdExplain
|