@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,1981 @@
|
|
|
1
|
+
import { StorageManager } from './storage.js';
|
|
2
|
+
import { RecallXraySnapshot } from './recall-xray.js';
|
|
3
|
+
import { RecallExplainJsonPayload } from './recall-explain-renderer.js';
|
|
4
|
+
import { PluginConfig, DaySummaryResult, RecallPlanMode, RecallDisclosure, MemoryFile, MemoryLifecycleEvent, EntityFile, MemoryStatus, DreamsStatusResult, DreamsPhase, DreamsRunResult } from './types.js';
|
|
5
|
+
import { AnomalyDetectorResult } from './recall-audit-anomaly.js';
|
|
6
|
+
import { ExplicitCaptureInput } from './explicit-capture.js';
|
|
7
|
+
import { BudgetDecision } from './cross-namespace-budget.js';
|
|
8
|
+
import { r as readMemoryGovernanceRunArtifact } from './memory-projection-store-D3vBHS4J.js';
|
|
9
|
+
import { O as Orchestrator, I as IntentDebugSnapshot, G as GraphRecallSnapshot, P as PatternReinforcementResult, S as SemanticDedupLookup } from './orchestrator-ChkesB8U.js';
|
|
10
|
+
import { LiveConnectorsRunSummary } from './live-connectors-runner.js';
|
|
11
|
+
import { LastRecallSnapshot } from './recall-state.js';
|
|
12
|
+
import { GraphSnapshotRequest, GraphSnapshotResponse } from './graph-snapshot.js';
|
|
13
|
+
import { TrustZoneStoreStatus, TrustZoneName, TrustZoneRecordKind, TrustZoneSourceClass, TrustZoneProvenanceScore, TrustZonePromotionResult, TrustZoneDemoSeedResult } from './trust-zones.js';
|
|
14
|
+
import { LocalLlmClient } from './local-llm.js';
|
|
15
|
+
import { FallbackLlmClient } from './fallback-llm.js';
|
|
16
|
+
import { MemoryOutcomeKind, RecordMemoryOutcomeResult } from './memory-worth-outcomes.js';
|
|
17
|
+
import { VersioningConfig, VersioningLogger } from './page-versioning.js';
|
|
18
|
+
import { z } from 'zod';
|
|
19
|
+
import { CapsuleListEntry } from './capsule-cli.js';
|
|
20
|
+
|
|
21
|
+
/**
|
|
22
|
+
* Peer registry types — issue #679 PR 1/5.
|
|
23
|
+
*
|
|
24
|
+
* Generalizes the singular identity-anchor model to a multi-peer registry.
|
|
25
|
+
* Every party Remnic interacts with — humans, agents, integrations, and
|
|
26
|
+
* "self" — is represented as a `Peer` with an evolving cognitive profile.
|
|
27
|
+
*
|
|
28
|
+
* This module defines pure types only. Storage primitives live in
|
|
29
|
+
* `./storage.ts`. Reasoner integration, recall injection, CLI/HTTP/MCP
|
|
30
|
+
* surfaces, and migration of existing identity-anchor data ship in later
|
|
31
|
+
* PRs (2/5 — 5/5).
|
|
32
|
+
*/
|
|
33
|
+
/**
|
|
34
|
+
* Kind of peer.
|
|
35
|
+
*
|
|
36
|
+
* - `self` — the current Remnic operator (replaces singular identity-anchor).
|
|
37
|
+
* - `human` — another human collaborator distinct from self.
|
|
38
|
+
* - `agent` — another AI agent (Claude Code, Codex, Hermes, etc.).
|
|
39
|
+
* - `integration` — non-conversational integration (cron, webhook, importer).
|
|
40
|
+
*/
|
|
41
|
+
type PeerKind = "self" | "human" | "agent" | "integration";
|
|
42
|
+
/**
|
|
43
|
+
* Stable, slow-changing facts about a peer.
|
|
44
|
+
*
|
|
45
|
+
* `id` matches `^[A-Za-z0-9](?:[A-Za-z0-9._-]*[A-Za-z0-9])?$`, 1-64 chars,
|
|
46
|
+
* with no leading/trailing/consecutive dots or dashes. Stored on disk under
|
|
47
|
+
* `peers/{id}/identity.md` as YAML frontmatter + markdown body.
|
|
48
|
+
*/
|
|
49
|
+
interface Peer {
|
|
50
|
+
/** Stable, opaque identifier. See PEER_ID_PATTERN. */
|
|
51
|
+
readonly id: string;
|
|
52
|
+
/** Kind of peer. Drives default profile schema and recall posture. */
|
|
53
|
+
readonly kind: PeerKind;
|
|
54
|
+
/** Human-readable display name. Distinct from `id`; mutable. */
|
|
55
|
+
readonly displayName: string;
|
|
56
|
+
/** ISO-8601 timestamp of first registration. */
|
|
57
|
+
readonly createdAt: string;
|
|
58
|
+
/** ISO-8601 timestamp of most recent update to identity. */
|
|
59
|
+
readonly updatedAt: string;
|
|
60
|
+
/** Optional free-form markdown body for the identity kernel. */
|
|
61
|
+
readonly notes?: string;
|
|
62
|
+
}
|
|
63
|
+
/**
|
|
64
|
+
* Evolving cognitive profile for a peer.
|
|
65
|
+
*
|
|
66
|
+
* Updated by the async profile reasoner (PR 2/5) from observable session
|
|
67
|
+
* signals. Every field carries provenance back to its originating session
|
|
68
|
+
* and signal. This PR only defines the shape — population is deferred.
|
|
69
|
+
*/
|
|
70
|
+
interface PeerProfile {
|
|
71
|
+
/** Peer this profile belongs to. */
|
|
72
|
+
readonly peerId: string;
|
|
73
|
+
/** ISO-8601 timestamp of most recent profile mutation. */
|
|
74
|
+
readonly updatedAt: string;
|
|
75
|
+
/**
|
|
76
|
+
* Arbitrary key/value profile fields. Values are markdown strings.
|
|
77
|
+
* Keys are stable section identifiers (e.g. `communication_style`,
|
|
78
|
+
* `recurring_concerns`). The reasoner is responsible for choosing
|
|
79
|
+
* keys; this PR does not constrain them beyond requiring strings.
|
|
80
|
+
*/
|
|
81
|
+
readonly fields: Record<string, string>;
|
|
82
|
+
/**
|
|
83
|
+
* Per-field provenance. Maps field key → list of provenance entries.
|
|
84
|
+
* A field may have multiple sources (the reasoner accumulates evidence
|
|
85
|
+
* across sessions before promoting a field).
|
|
86
|
+
*/
|
|
87
|
+
readonly provenance: Record<string, ReadonlyArray<PeerProfileFieldProvenance>>;
|
|
88
|
+
}
|
|
89
|
+
/**
|
|
90
|
+
* Provenance for a single profile-field mutation.
|
|
91
|
+
*
|
|
92
|
+
* Reasoner output (PR 2/5) attaches one of these every time it touches a
|
|
93
|
+
* field, so the user can audit exactly why a profile claim exists.
|
|
94
|
+
*/
|
|
95
|
+
interface PeerProfileFieldProvenance {
|
|
96
|
+
/** ISO-8601 timestamp the field was set/updated by this signal. */
|
|
97
|
+
readonly observedAt: string;
|
|
98
|
+
/** Originating session id (or other source identifier). */
|
|
99
|
+
readonly sourceSessionId?: string;
|
|
100
|
+
/** Short label for the signal type (e.g. "explicit_preference"). */
|
|
101
|
+
readonly signal: string;
|
|
102
|
+
/** Optional free-form note explaining the inference. */
|
|
103
|
+
readonly note?: string;
|
|
104
|
+
}
|
|
105
|
+
/**
|
|
106
|
+
* One row of the append-only interaction log for a peer.
|
|
107
|
+
*
|
|
108
|
+
* Stored on disk under `peers/{id}/interactions.log.md` as a sequence of
|
|
109
|
+
* markdown bullet entries with a leading ISO-8601 timestamp. Append-only
|
|
110
|
+
* by contract — the reasoner reads this log to derive profile updates.
|
|
111
|
+
*/
|
|
112
|
+
interface PeerInteractionLogEntry {
|
|
113
|
+
/** ISO-8601 timestamp the interaction occurred. */
|
|
114
|
+
readonly timestamp: string;
|
|
115
|
+
/** Originating session id, if any. */
|
|
116
|
+
readonly sessionId?: string;
|
|
117
|
+
/** Short kind label (e.g. "message", "tool_call", "preference_set"). */
|
|
118
|
+
readonly kind: string;
|
|
119
|
+
/** Free-form markdown summary of the interaction. */
|
|
120
|
+
readonly summary: string;
|
|
121
|
+
}
|
|
122
|
+
/**
|
|
123
|
+
* Regex enforced on `Peer.id`. Exported so callers can mirror validation
|
|
124
|
+
* before constructing a `Peer`.
|
|
125
|
+
*
|
|
126
|
+
* Rules:
|
|
127
|
+
* - 1-64 characters total
|
|
128
|
+
* - First and last character must be `[A-Za-z0-9]`
|
|
129
|
+
* - Interior may contain `.`, `_`, `-` in addition to alphanumerics
|
|
130
|
+
* - No leading or trailing dot/dash/underscore
|
|
131
|
+
* - No consecutive separators (`..`, `--`, `__`, `.-`, etc.)
|
|
132
|
+
*
|
|
133
|
+
* Cursor Medium: previously the regex allowed `a..b` even though the
|
|
134
|
+
* docs claimed otherwise — a separate JS-side check enforced the rule
|
|
135
|
+
* but the standalone PATTERN was wrong for any external consumer
|
|
136
|
+
* relying on it. Tighten the regex itself so PEER_ID_PATTERN is the
|
|
137
|
+
* single source of truth: an alphanumeric, optionally followed by
|
|
138
|
+
* groups of (one separator + one-or-more alphanumerics), with the
|
|
139
|
+
* final group ending on an alphanumeric. Negative lookahead-free so
|
|
140
|
+
* it works in any JS engine.
|
|
141
|
+
*/
|
|
142
|
+
declare const PEER_ID_PATTERN: RegExp;
|
|
143
|
+
/** Maximum length for `Peer.id`. */
|
|
144
|
+
declare const PEER_ID_MAX_LENGTH = 64;
|
|
145
|
+
|
|
146
|
+
interface ConsoleBufferState {
|
|
147
|
+
/** Number of turns currently held in the default buffer slot. */
|
|
148
|
+
turnsCount: number;
|
|
149
|
+
/** Approximate byte size of buffered content (UTF-8). */
|
|
150
|
+
byteCount: number;
|
|
151
|
+
}
|
|
152
|
+
interface ConsoleExtractionVerdict {
|
|
153
|
+
/** ISO-8601 timestamp the verdict was recorded. */
|
|
154
|
+
ts: string;
|
|
155
|
+
/** Verdict kind — typically "accept" | "reject" | "defer". */
|
|
156
|
+
kind: string;
|
|
157
|
+
/** Optional short reason from the judge or fallback. */
|
|
158
|
+
reason?: string;
|
|
159
|
+
}
|
|
160
|
+
interface ConsoleExtractionQueueState {
|
|
161
|
+
/** Number of pending extraction tasks queued in the orchestrator. */
|
|
162
|
+
depth: number;
|
|
163
|
+
/** Most recent judge verdicts, newest last. Capped at 25 entries. */
|
|
164
|
+
recentVerdicts: ConsoleExtractionVerdict[];
|
|
165
|
+
}
|
|
166
|
+
interface ConsoleDedupDecision {
|
|
167
|
+
/** ISO-8601 timestamp the decision was recorded. */
|
|
168
|
+
ts: string;
|
|
169
|
+
/** Outcome of the dedup check — "duplicate" | "novel" | etc. */
|
|
170
|
+
decision: string;
|
|
171
|
+
/** Optional content fingerprint (first 16 chars of a hash). */
|
|
172
|
+
fingerprint?: string;
|
|
173
|
+
/** Optional similarity score that drove the decision. */
|
|
174
|
+
similarity?: number;
|
|
175
|
+
}
|
|
176
|
+
interface ConsoleMaintenanceLedgerEvent {
|
|
177
|
+
/** ISO-8601 timestamp from the ledger row. */
|
|
178
|
+
ts: string;
|
|
179
|
+
/** Event category (e.g. "EXTRACTION_JUDGE_VERDICT"). */
|
|
180
|
+
category: string;
|
|
181
|
+
/** Compact one-line summary. */
|
|
182
|
+
summary: string;
|
|
183
|
+
}
|
|
184
|
+
interface ConsoleQmdProbeState {
|
|
185
|
+
/** Whether QMD is reachable via CLI or daemon. */
|
|
186
|
+
available: boolean;
|
|
187
|
+
/** Whether the daemon transport is in use. */
|
|
188
|
+
daemonMode: boolean;
|
|
189
|
+
/** Raw debug-status string from `qmd.debugStatus()`. */
|
|
190
|
+
debug: string;
|
|
191
|
+
}
|
|
192
|
+
interface ConsoleDaemonInfo {
|
|
193
|
+
/** Process uptime in milliseconds. */
|
|
194
|
+
uptimeMs: number;
|
|
195
|
+
/** Package / daemon version (best-effort). */
|
|
196
|
+
version: string;
|
|
197
|
+
}
|
|
198
|
+
interface ConsoleStateSnapshot {
|
|
199
|
+
/** ISO-8601 capture timestamp. */
|
|
200
|
+
capturedAt: string;
|
|
201
|
+
bufferState: ConsoleBufferState;
|
|
202
|
+
extractionQueue: ConsoleExtractionQueueState;
|
|
203
|
+
dedupRecent: ConsoleDedupDecision[];
|
|
204
|
+
maintenanceLedgerTail: ConsoleMaintenanceLedgerEvent[];
|
|
205
|
+
qmdProbe: ConsoleQmdProbeState;
|
|
206
|
+
daemon: ConsoleDaemonInfo;
|
|
207
|
+
/**
|
|
208
|
+
* Subsystem read errors. One entry per failed reader keyed by
|
|
209
|
+
* subsystem name (e.g. `"bufferState: ..."`). An empty array means
|
|
210
|
+
* every section was read cleanly.
|
|
211
|
+
*/
|
|
212
|
+
errors: string[];
|
|
213
|
+
}
|
|
214
|
+
|
|
215
|
+
/**
|
|
216
|
+
* Procedural memory stats surface (issue #567 PR 5/5).
|
|
217
|
+
*
|
|
218
|
+
* Pure helper that tallies procedure memories by status and summarizes the
|
|
219
|
+
* current `procedural.*` config so operators (and the dashboard) can see,
|
|
220
|
+
* in one call, how procedural memory is behaving in a namespace.
|
|
221
|
+
*
|
|
222
|
+
* Consumed by:
|
|
223
|
+
* - CLI `remnic procedural stats`
|
|
224
|
+
* - HTTP `GET /engram/v1/procedural/stats`
|
|
225
|
+
* - MCP `remnic.procedural_stats` (+ `engram.procedural_stats` alias)
|
|
226
|
+
*/
|
|
227
|
+
|
|
228
|
+
interface ProcedureStatusCounts {
|
|
229
|
+
total: number;
|
|
230
|
+
active: number;
|
|
231
|
+
pending_review: number;
|
|
232
|
+
rejected: number;
|
|
233
|
+
quarantined: number;
|
|
234
|
+
superseded: number;
|
|
235
|
+
archived: number;
|
|
236
|
+
/** Any status the enum doesn't yet cover. */
|
|
237
|
+
other: number;
|
|
238
|
+
}
|
|
239
|
+
interface ProcedureStatsConfigSnapshot {
|
|
240
|
+
enabled: boolean;
|
|
241
|
+
minOccurrences: number;
|
|
242
|
+
successFloor: number;
|
|
243
|
+
autoPromoteOccurrences: number;
|
|
244
|
+
autoPromoteEnabled: boolean;
|
|
245
|
+
lookbackDays: number;
|
|
246
|
+
recallMaxProcedures: number;
|
|
247
|
+
}
|
|
248
|
+
interface ProcedureStatsRecent {
|
|
249
|
+
/** ISO 8601 timestamp of the most recent procedure write, or null. */
|
|
250
|
+
lastWriteAt: string | null;
|
|
251
|
+
/** Count of procedure files with `created` (or `updated`) in the last 7 days. */
|
|
252
|
+
writesLast7Days: number;
|
|
253
|
+
/** Count of procedures whose `source` is the procedure miner. */
|
|
254
|
+
minerSourced: number;
|
|
255
|
+
}
|
|
256
|
+
interface ProcedureStatsReport {
|
|
257
|
+
schemaVersion: 1;
|
|
258
|
+
generatedAt: string;
|
|
259
|
+
counts: ProcedureStatusCounts;
|
|
260
|
+
recent: ProcedureStatsRecent;
|
|
261
|
+
config: ProcedureStatsConfigSnapshot;
|
|
262
|
+
}
|
|
263
|
+
/**
|
|
264
|
+
* Read all memories from storage and tally procedures by status + recency.
|
|
265
|
+
* `nowMs` is injectable so tests can pin the "last 7 days" window.
|
|
266
|
+
*/
|
|
267
|
+
declare function computeProcedureStats(options: {
|
|
268
|
+
storage: StorageManager;
|
|
269
|
+
config: PluginConfig;
|
|
270
|
+
nowMs?: number;
|
|
271
|
+
}): Promise<ProcedureStatsReport>;
|
|
272
|
+
/**
|
|
273
|
+
* Render `ProcedureStatsReport` as a human-friendly plain-text block for CLI
|
|
274
|
+
* operators. Keep it deterministic — no colors, no ANSI. Used by `--format text`.
|
|
275
|
+
*/
|
|
276
|
+
declare function formatProcedureStatsText(report: ProcedureStatsReport): string;
|
|
277
|
+
|
|
278
|
+
/**
|
|
279
|
+
* Structured linkage to the capsule that was forked to produce this one.
|
|
280
|
+
*
|
|
281
|
+
* - `capsuleId` — the `id` field from the parent capsule's manifest block.
|
|
282
|
+
* - `version` — the `version` field from the parent capsule's manifest block
|
|
283
|
+
* at the time the fork was taken.
|
|
284
|
+
* - `forkRoot` — the posix-relative directory prefix under which the parent's
|
|
285
|
+
* records were planted inside the fork's memory root, e.g.
|
|
286
|
+
* `forks/parent-id`. Stored here so downstream tooling can
|
|
287
|
+
* locate the imported parent tree without re-parsing paths.
|
|
288
|
+
*/
|
|
289
|
+
declare const CapsuleParentSchema: z.ZodObject<{
|
|
290
|
+
capsuleId: z.ZodString;
|
|
291
|
+
version: z.ZodString;
|
|
292
|
+
/**
|
|
293
|
+
* Posix-relative path prefix under the fork's memory root where the parent
|
|
294
|
+
* capsule's records were placed. Typically `forks/<parent-capsule-id>`.
|
|
295
|
+
* Must be a non-empty string with no leading slash.
|
|
296
|
+
*/
|
|
297
|
+
forkRoot: z.ZodEffects<z.ZodString, string, string>;
|
|
298
|
+
}, "strip", z.ZodTypeAny, {
|
|
299
|
+
version: string;
|
|
300
|
+
capsuleId: string;
|
|
301
|
+
forkRoot: string;
|
|
302
|
+
}, {
|
|
303
|
+
version: string;
|
|
304
|
+
capsuleId: string;
|
|
305
|
+
forkRoot: string;
|
|
306
|
+
}>;
|
|
307
|
+
type CapsuleParent = z.infer<typeof CapsuleParentSchema>;
|
|
308
|
+
declare const CapsuleBlockSchema: z.ZodObject<{
|
|
309
|
+
id: z.ZodString;
|
|
310
|
+
version: z.ZodString;
|
|
311
|
+
/**
|
|
312
|
+
* Taxonomy schema version the capsule was authored against. Free-form for
|
|
313
|
+
* now; later PRs may tighten this to a known taxonomy registry.
|
|
314
|
+
*/
|
|
315
|
+
schemaVersion: z.ZodString;
|
|
316
|
+
/**
|
|
317
|
+
* Optional reference to the parent capsule this one was forked or derived
|
|
318
|
+
* from. `null` (not `undefined`) is the explicit "no parent" sentinel so
|
|
319
|
+
* that round-trips through JSON do not silently drop the field.
|
|
320
|
+
*
|
|
321
|
+
* @deprecated Prefer {@link parent} (structured). This field is preserved
|
|
322
|
+
* for backward compatibility with V2 manifests written before PR 4/6.
|
|
323
|
+
*/
|
|
324
|
+
parentCapsule: z.ZodNullable<z.ZodString>;
|
|
325
|
+
/**
|
|
326
|
+
* Structured fork-lineage pointer added in PR 4/6. When present, this
|
|
327
|
+
* capsule is a fork of the described parent. `null` is the explicit
|
|
328
|
+
* "not a fork" sentinel — round-trips through JSON cleanly without
|
|
329
|
+
* silently dropping the field.
|
|
330
|
+
*
|
|
331
|
+
* Defaults to `null` so that V2 manifests written before PR 4/6 (which
|
|
332
|
+
* omit this field) still parse without error. This preserves backward
|
|
333
|
+
* compatibility with the existing `makeV2Manifest()` test fixtures and
|
|
334
|
+
* any in-the-wild V2 archives produced by PR 2/6 and PR 3/6.
|
|
335
|
+
*
|
|
336
|
+
* Invariant: when `parent` is non-null, `parentCapsule` SHOULD equal
|
|
337
|
+
* `parent.capsuleId` for backward compatibility with readers that only
|
|
338
|
+
* understand the legacy field. `forkCapsule()` sets both.
|
|
339
|
+
*/
|
|
340
|
+
parent: z.ZodDefault<z.ZodNullable<z.ZodObject<{
|
|
341
|
+
capsuleId: z.ZodString;
|
|
342
|
+
version: z.ZodString;
|
|
343
|
+
/**
|
|
344
|
+
* Posix-relative path prefix under the fork's memory root where the parent
|
|
345
|
+
* capsule's records were placed. Typically `forks/<parent-capsule-id>`.
|
|
346
|
+
* Must be a non-empty string with no leading slash.
|
|
347
|
+
*/
|
|
348
|
+
forkRoot: z.ZodEffects<z.ZodString, string, string>;
|
|
349
|
+
}, "strip", z.ZodTypeAny, {
|
|
350
|
+
version: string;
|
|
351
|
+
capsuleId: string;
|
|
352
|
+
forkRoot: string;
|
|
353
|
+
}, {
|
|
354
|
+
version: string;
|
|
355
|
+
capsuleId: string;
|
|
356
|
+
forkRoot: string;
|
|
357
|
+
}>>>;
|
|
358
|
+
description: z.ZodString;
|
|
359
|
+
retrievalPolicy: z.ZodObject<{
|
|
360
|
+
/**
|
|
361
|
+
* Per-tier weight overrides applied during recall when the capsule is the
|
|
362
|
+
* active scope. Keys are tier names (e.g. `bm25`, `vector`, `graph`); values
|
|
363
|
+
* are non-negative finite multipliers. The set of valid keys is left open
|
|
364
|
+
* for now so future tiers do not break older manifests.
|
|
365
|
+
*/
|
|
366
|
+
tierWeights: z.ZodRecord<z.ZodString, z.ZodNumber>;
|
|
367
|
+
/**
|
|
368
|
+
* Whether the direct-answer fast path is allowed when this capsule is
|
|
369
|
+
* active. Operators may disable it for capsules whose contents should
|
|
370
|
+
* always flow through the full retrieval pipeline.
|
|
371
|
+
*/
|
|
372
|
+
directAnswerEnabled: z.ZodBoolean;
|
|
373
|
+
}, "strip", z.ZodTypeAny, {
|
|
374
|
+
tierWeights: Record<string, number>;
|
|
375
|
+
directAnswerEnabled: boolean;
|
|
376
|
+
}, {
|
|
377
|
+
tierWeights: Record<string, number>;
|
|
378
|
+
directAnswerEnabled: boolean;
|
|
379
|
+
}>;
|
|
380
|
+
includes: z.ZodObject<{
|
|
381
|
+
taxonomy: z.ZodBoolean;
|
|
382
|
+
identityAnchors: z.ZodBoolean;
|
|
383
|
+
peerProfiles: z.ZodBoolean;
|
|
384
|
+
procedural: z.ZodBoolean;
|
|
385
|
+
}, "strip", z.ZodTypeAny, {
|
|
386
|
+
procedural: boolean;
|
|
387
|
+
taxonomy: boolean;
|
|
388
|
+
identityAnchors: boolean;
|
|
389
|
+
peerProfiles: boolean;
|
|
390
|
+
}, {
|
|
391
|
+
procedural: boolean;
|
|
392
|
+
taxonomy: boolean;
|
|
393
|
+
identityAnchors: boolean;
|
|
394
|
+
peerProfiles: boolean;
|
|
395
|
+
}>;
|
|
396
|
+
}, "strip", z.ZodTypeAny, {
|
|
397
|
+
includes: {
|
|
398
|
+
procedural: boolean;
|
|
399
|
+
taxonomy: boolean;
|
|
400
|
+
identityAnchors: boolean;
|
|
401
|
+
peerProfiles: boolean;
|
|
402
|
+
};
|
|
403
|
+
schemaVersion: string;
|
|
404
|
+
id: string;
|
|
405
|
+
description: string;
|
|
406
|
+
version: string;
|
|
407
|
+
parentCapsule: string | null;
|
|
408
|
+
parent: {
|
|
409
|
+
version: string;
|
|
410
|
+
capsuleId: string;
|
|
411
|
+
forkRoot: string;
|
|
412
|
+
} | null;
|
|
413
|
+
retrievalPolicy: {
|
|
414
|
+
tierWeights: Record<string, number>;
|
|
415
|
+
directAnswerEnabled: boolean;
|
|
416
|
+
};
|
|
417
|
+
}, {
|
|
418
|
+
includes: {
|
|
419
|
+
procedural: boolean;
|
|
420
|
+
taxonomy: boolean;
|
|
421
|
+
identityAnchors: boolean;
|
|
422
|
+
peerProfiles: boolean;
|
|
423
|
+
};
|
|
424
|
+
schemaVersion: string;
|
|
425
|
+
id: string;
|
|
426
|
+
description: string;
|
|
427
|
+
version: string;
|
|
428
|
+
parentCapsule: string | null;
|
|
429
|
+
retrievalPolicy: {
|
|
430
|
+
tierWeights: Record<string, number>;
|
|
431
|
+
directAnswerEnabled: boolean;
|
|
432
|
+
};
|
|
433
|
+
parent?: {
|
|
434
|
+
version: string;
|
|
435
|
+
capsuleId: string;
|
|
436
|
+
forkRoot: string;
|
|
437
|
+
} | null | undefined;
|
|
438
|
+
}>;
|
|
439
|
+
type CapsuleBlock = z.infer<typeof CapsuleBlockSchema>;
|
|
440
|
+
declare const ExportManifestV2Schema: z.ZodObject<{
|
|
441
|
+
format: z.ZodLiteral<"openclaw-engram-export">;
|
|
442
|
+
schemaVersion: z.ZodLiteral<2>;
|
|
443
|
+
createdAt: z.ZodString;
|
|
444
|
+
pluginVersion: z.ZodString;
|
|
445
|
+
includesTranscripts: z.ZodBoolean;
|
|
446
|
+
files: z.ZodArray<z.ZodObject<{
|
|
447
|
+
path: z.ZodString;
|
|
448
|
+
sha256: z.ZodString;
|
|
449
|
+
bytes: z.ZodNumber;
|
|
450
|
+
}, "strip", z.ZodTypeAny, {
|
|
451
|
+
sha256: string;
|
|
452
|
+
path: string;
|
|
453
|
+
bytes: number;
|
|
454
|
+
}, {
|
|
455
|
+
sha256: string;
|
|
456
|
+
path: string;
|
|
457
|
+
bytes: number;
|
|
458
|
+
}>, "many">;
|
|
459
|
+
capsule: z.ZodObject<{
|
|
460
|
+
id: z.ZodString;
|
|
461
|
+
version: z.ZodString;
|
|
462
|
+
/**
|
|
463
|
+
* Taxonomy schema version the capsule was authored against. Free-form for
|
|
464
|
+
* now; later PRs may tighten this to a known taxonomy registry.
|
|
465
|
+
*/
|
|
466
|
+
schemaVersion: z.ZodString;
|
|
467
|
+
/**
|
|
468
|
+
* Optional reference to the parent capsule this one was forked or derived
|
|
469
|
+
* from. `null` (not `undefined`) is the explicit "no parent" sentinel so
|
|
470
|
+
* that round-trips through JSON do not silently drop the field.
|
|
471
|
+
*
|
|
472
|
+
* @deprecated Prefer {@link parent} (structured). This field is preserved
|
|
473
|
+
* for backward compatibility with V2 manifests written before PR 4/6.
|
|
474
|
+
*/
|
|
475
|
+
parentCapsule: z.ZodNullable<z.ZodString>;
|
|
476
|
+
/**
|
|
477
|
+
* Structured fork-lineage pointer added in PR 4/6. When present, this
|
|
478
|
+
* capsule is a fork of the described parent. `null` is the explicit
|
|
479
|
+
* "not a fork" sentinel — round-trips through JSON cleanly without
|
|
480
|
+
* silently dropping the field.
|
|
481
|
+
*
|
|
482
|
+
* Defaults to `null` so that V2 manifests written before PR 4/6 (which
|
|
483
|
+
* omit this field) still parse without error. This preserves backward
|
|
484
|
+
* compatibility with the existing `makeV2Manifest()` test fixtures and
|
|
485
|
+
* any in-the-wild V2 archives produced by PR 2/6 and PR 3/6.
|
|
486
|
+
*
|
|
487
|
+
* Invariant: when `parent` is non-null, `parentCapsule` SHOULD equal
|
|
488
|
+
* `parent.capsuleId` for backward compatibility with readers that only
|
|
489
|
+
* understand the legacy field. `forkCapsule()` sets both.
|
|
490
|
+
*/
|
|
491
|
+
parent: z.ZodDefault<z.ZodNullable<z.ZodObject<{
|
|
492
|
+
capsuleId: z.ZodString;
|
|
493
|
+
version: z.ZodString;
|
|
494
|
+
/**
|
|
495
|
+
* Posix-relative path prefix under the fork's memory root where the parent
|
|
496
|
+
* capsule's records were placed. Typically `forks/<parent-capsule-id>`.
|
|
497
|
+
* Must be a non-empty string with no leading slash.
|
|
498
|
+
*/
|
|
499
|
+
forkRoot: z.ZodEffects<z.ZodString, string, string>;
|
|
500
|
+
}, "strip", z.ZodTypeAny, {
|
|
501
|
+
version: string;
|
|
502
|
+
capsuleId: string;
|
|
503
|
+
forkRoot: string;
|
|
504
|
+
}, {
|
|
505
|
+
version: string;
|
|
506
|
+
capsuleId: string;
|
|
507
|
+
forkRoot: string;
|
|
508
|
+
}>>>;
|
|
509
|
+
description: z.ZodString;
|
|
510
|
+
retrievalPolicy: z.ZodObject<{
|
|
511
|
+
/**
|
|
512
|
+
* Per-tier weight overrides applied during recall when the capsule is the
|
|
513
|
+
* active scope. Keys are tier names (e.g. `bm25`, `vector`, `graph`); values
|
|
514
|
+
* are non-negative finite multipliers. The set of valid keys is left open
|
|
515
|
+
* for now so future tiers do not break older manifests.
|
|
516
|
+
*/
|
|
517
|
+
tierWeights: z.ZodRecord<z.ZodString, z.ZodNumber>;
|
|
518
|
+
/**
|
|
519
|
+
* Whether the direct-answer fast path is allowed when this capsule is
|
|
520
|
+
* active. Operators may disable it for capsules whose contents should
|
|
521
|
+
* always flow through the full retrieval pipeline.
|
|
522
|
+
*/
|
|
523
|
+
directAnswerEnabled: z.ZodBoolean;
|
|
524
|
+
}, "strip", z.ZodTypeAny, {
|
|
525
|
+
tierWeights: Record<string, number>;
|
|
526
|
+
directAnswerEnabled: boolean;
|
|
527
|
+
}, {
|
|
528
|
+
tierWeights: Record<string, number>;
|
|
529
|
+
directAnswerEnabled: boolean;
|
|
530
|
+
}>;
|
|
531
|
+
includes: z.ZodObject<{
|
|
532
|
+
taxonomy: z.ZodBoolean;
|
|
533
|
+
identityAnchors: z.ZodBoolean;
|
|
534
|
+
peerProfiles: z.ZodBoolean;
|
|
535
|
+
procedural: z.ZodBoolean;
|
|
536
|
+
}, "strip", z.ZodTypeAny, {
|
|
537
|
+
procedural: boolean;
|
|
538
|
+
taxonomy: boolean;
|
|
539
|
+
identityAnchors: boolean;
|
|
540
|
+
peerProfiles: boolean;
|
|
541
|
+
}, {
|
|
542
|
+
procedural: boolean;
|
|
543
|
+
taxonomy: boolean;
|
|
544
|
+
identityAnchors: boolean;
|
|
545
|
+
peerProfiles: boolean;
|
|
546
|
+
}>;
|
|
547
|
+
}, "strip", z.ZodTypeAny, {
|
|
548
|
+
includes: {
|
|
549
|
+
procedural: boolean;
|
|
550
|
+
taxonomy: boolean;
|
|
551
|
+
identityAnchors: boolean;
|
|
552
|
+
peerProfiles: boolean;
|
|
553
|
+
};
|
|
554
|
+
schemaVersion: string;
|
|
555
|
+
id: string;
|
|
556
|
+
description: string;
|
|
557
|
+
version: string;
|
|
558
|
+
parentCapsule: string | null;
|
|
559
|
+
parent: {
|
|
560
|
+
version: string;
|
|
561
|
+
capsuleId: string;
|
|
562
|
+
forkRoot: string;
|
|
563
|
+
} | null;
|
|
564
|
+
retrievalPolicy: {
|
|
565
|
+
tierWeights: Record<string, number>;
|
|
566
|
+
directAnswerEnabled: boolean;
|
|
567
|
+
};
|
|
568
|
+
}, {
|
|
569
|
+
includes: {
|
|
570
|
+
procedural: boolean;
|
|
571
|
+
taxonomy: boolean;
|
|
572
|
+
identityAnchors: boolean;
|
|
573
|
+
peerProfiles: boolean;
|
|
574
|
+
};
|
|
575
|
+
schemaVersion: string;
|
|
576
|
+
id: string;
|
|
577
|
+
description: string;
|
|
578
|
+
version: string;
|
|
579
|
+
parentCapsule: string | null;
|
|
580
|
+
retrievalPolicy: {
|
|
581
|
+
tierWeights: Record<string, number>;
|
|
582
|
+
directAnswerEnabled: boolean;
|
|
583
|
+
};
|
|
584
|
+
parent?: {
|
|
585
|
+
version: string;
|
|
586
|
+
capsuleId: string;
|
|
587
|
+
forkRoot: string;
|
|
588
|
+
} | null | undefined;
|
|
589
|
+
}>;
|
|
590
|
+
}, "strip", z.ZodTypeAny, {
|
|
591
|
+
schemaVersion: 2;
|
|
592
|
+
createdAt: string;
|
|
593
|
+
files: {
|
|
594
|
+
sha256: string;
|
|
595
|
+
path: string;
|
|
596
|
+
bytes: number;
|
|
597
|
+
}[];
|
|
598
|
+
format: "openclaw-engram-export";
|
|
599
|
+
pluginVersion: string;
|
|
600
|
+
includesTranscripts: boolean;
|
|
601
|
+
capsule: {
|
|
602
|
+
includes: {
|
|
603
|
+
procedural: boolean;
|
|
604
|
+
taxonomy: boolean;
|
|
605
|
+
identityAnchors: boolean;
|
|
606
|
+
peerProfiles: boolean;
|
|
607
|
+
};
|
|
608
|
+
schemaVersion: string;
|
|
609
|
+
id: string;
|
|
610
|
+
description: string;
|
|
611
|
+
version: string;
|
|
612
|
+
parentCapsule: string | null;
|
|
613
|
+
parent: {
|
|
614
|
+
version: string;
|
|
615
|
+
capsuleId: string;
|
|
616
|
+
forkRoot: string;
|
|
617
|
+
} | null;
|
|
618
|
+
retrievalPolicy: {
|
|
619
|
+
tierWeights: Record<string, number>;
|
|
620
|
+
directAnswerEnabled: boolean;
|
|
621
|
+
};
|
|
622
|
+
};
|
|
623
|
+
}, {
|
|
624
|
+
schemaVersion: 2;
|
|
625
|
+
createdAt: string;
|
|
626
|
+
files: {
|
|
627
|
+
sha256: string;
|
|
628
|
+
path: string;
|
|
629
|
+
bytes: number;
|
|
630
|
+
}[];
|
|
631
|
+
format: "openclaw-engram-export";
|
|
632
|
+
pluginVersion: string;
|
|
633
|
+
includesTranscripts: boolean;
|
|
634
|
+
capsule: {
|
|
635
|
+
includes: {
|
|
636
|
+
procedural: boolean;
|
|
637
|
+
taxonomy: boolean;
|
|
638
|
+
identityAnchors: boolean;
|
|
639
|
+
peerProfiles: boolean;
|
|
640
|
+
};
|
|
641
|
+
schemaVersion: string;
|
|
642
|
+
id: string;
|
|
643
|
+
description: string;
|
|
644
|
+
version: string;
|
|
645
|
+
parentCapsule: string | null;
|
|
646
|
+
retrievalPolicy: {
|
|
647
|
+
tierWeights: Record<string, number>;
|
|
648
|
+
directAnswerEnabled: boolean;
|
|
649
|
+
};
|
|
650
|
+
parent?: {
|
|
651
|
+
version: string;
|
|
652
|
+
capsuleId: string;
|
|
653
|
+
forkRoot: string;
|
|
654
|
+
} | null | undefined;
|
|
655
|
+
};
|
|
656
|
+
}>;
|
|
657
|
+
type ExportManifestV2 = z.infer<typeof ExportManifestV2Schema>;
|
|
658
|
+
|
|
659
|
+
/**
|
|
660
|
+
* Conflict-resolution mode for {@link importCapsule}. Inverse of the
|
|
661
|
+
* `mode` selector in PR 4/6's CLI surface.
|
|
662
|
+
*
|
|
663
|
+
* - `"skip"` (default) — when a target file already exists at the same
|
|
664
|
+
* relative path, leave it untouched. The corresponding record is reported
|
|
665
|
+
* via {@link ImportCapsuleResult.skipped}.
|
|
666
|
+
* - `"overwrite"` — when a target file exists, snapshot the prior content
|
|
667
|
+
* via {@link createVersion} (gotcha #54: write-before-delete; gotcha #25:
|
|
668
|
+
* don't destroy old state until new state is confirmed), then write the
|
|
669
|
+
* incoming content. The snapshot's `note` includes the source capsule id.
|
|
670
|
+
* - `"fork"` — never overwrite. Every record is rebased under
|
|
671
|
+
* `forks/<capsule-id>/<original-path>` and any YAML-frontmatter `id:`
|
|
672
|
+
* field is rewritten to a new fork-scoped value. The original tree is
|
|
673
|
+
* not touched.
|
|
674
|
+
*
|
|
675
|
+
* The mode is selected once per call and applied uniformly to every record
|
|
676
|
+
* in the bundle. Mixed-mode imports are not supported by design — that
|
|
677
|
+
* would let a single corrupted manifest silently land partial state.
|
|
678
|
+
*/
|
|
679
|
+
type ImportCapsuleMode = "skip" | "overwrite" | "fork";
|
|
680
|
+
/**
|
|
681
|
+
* Options accepted by {@link importCapsule}.
|
|
682
|
+
*
|
|
683
|
+
* `archivePath` — absolute or cwd-relative path to a `.capsule.json.gz`
|
|
684
|
+
* archive produced by `exportCapsule`. The archive must contain a V2
|
|
685
|
+
* bundle (`schemaVersion: 2`); V1 archives are rejected.
|
|
686
|
+
*
|
|
687
|
+
* `root` — absolute or cwd-relative path to the memory directory that
|
|
688
|
+
* will receive the records. Must be an existing directory.
|
|
689
|
+
*
|
|
690
|
+
* `mode` — see {@link ImportCapsuleMode}. Defaults to `"skip"`.
|
|
691
|
+
*
|
|
692
|
+
* `versioning` — optional page-versioning config used by `mode: "overwrite"`
|
|
693
|
+
* to snapshot prior content before replacing it. Snapshots are skipped when
|
|
694
|
+
* not provided or when `enabled === false`. Tests pass an enabled config
|
|
695
|
+
* to assert snapshot creation; production callers thread the
|
|
696
|
+
* orchestrator's resolved versioning config.
|
|
697
|
+
*
|
|
698
|
+
* `log` — optional logger forwarded to {@link createVersion}.
|
|
699
|
+
*
|
|
700
|
+
* `now` — optional clock override (ms epoch) used to derive deterministic
|
|
701
|
+
* fork ids in tests. Production callers omit this.
|
|
702
|
+
*/
|
|
703
|
+
interface ImportCapsuleOptions {
|
|
704
|
+
archivePath: string;
|
|
705
|
+
root: string;
|
|
706
|
+
mode?: ImportCapsuleMode;
|
|
707
|
+
versioning?: VersioningConfig;
|
|
708
|
+
log?: VersioningLogger;
|
|
709
|
+
now?: number;
|
|
710
|
+
/**
|
|
711
|
+
* Memory directory whose secure-store keyring is used when the archive is
|
|
712
|
+
* encrypted. Required when `archivePath` ends with `.enc` or when the file
|
|
713
|
+
* starts with the REMNIC-ENC magic header. If `memoryDir` is omitted and the
|
|
714
|
+
* archive turns out to be encrypted, `importCapsule` throws a clear error
|
|
715
|
+
* rather than silently failing.
|
|
716
|
+
*
|
|
717
|
+
* When provided and the archive is NOT encrypted, the value is ignored.
|
|
718
|
+
*/
|
|
719
|
+
memoryDir?: string;
|
|
720
|
+
}
|
|
721
|
+
interface ImportCapsuleSkippedRecord {
|
|
722
|
+
/** Original record path (capsule-relative, posix). */
|
|
723
|
+
path: string;
|
|
724
|
+
/**
|
|
725
|
+
* Why this record was not written.
|
|
726
|
+
*
|
|
727
|
+
* `"exists"` — the target path already existed and the mode was `"skip"`,
|
|
728
|
+
* OR the computed fork path already existed in fork mode.
|
|
729
|
+
*
|
|
730
|
+
* `"checksum_mismatch"` is intentionally absent: a checksum failure aborts
|
|
731
|
+
* the import entirely (fail-closed) rather than skipping the offending
|
|
732
|
+
* record, so no `ImportCapsuleSkippedRecord` is ever produced for it.
|
|
733
|
+
*/
|
|
734
|
+
reason: "exists";
|
|
735
|
+
}
|
|
736
|
+
interface ImportCapsuleImportedRecord {
|
|
737
|
+
/** Capsule-relative posix path the record carried. */
|
|
738
|
+
sourcePath: string;
|
|
739
|
+
/** Memory-dir-relative posix path the file was written to. */
|
|
740
|
+
targetPath: string;
|
|
741
|
+
/** Whether a prior version snapshot was taken (overwrite-mode only). */
|
|
742
|
+
snapshotted: boolean;
|
|
743
|
+
/** Whether the frontmatter `id:` field was rewritten (fork-mode only). */
|
|
744
|
+
rewroteId: boolean;
|
|
745
|
+
}
|
|
746
|
+
interface ImportCapsuleResult {
|
|
747
|
+
/** Records that landed on disk. */
|
|
748
|
+
imported: ImportCapsuleImportedRecord[];
|
|
749
|
+
/** Records that were not written. */
|
|
750
|
+
skipped: ImportCapsuleSkippedRecord[];
|
|
751
|
+
/** The manifest decoded from the archive. */
|
|
752
|
+
manifest: ExportManifestV2;
|
|
753
|
+
}
|
|
754
|
+
|
|
755
|
+
/**
|
|
756
|
+
* Options accepted by {@link exportCapsule}.
|
|
757
|
+
*
|
|
758
|
+
* `name` — capsule id, validated against {@link CAPSULE_ID_PATTERN}. The id
|
|
759
|
+
* also forms the manifest's `capsule.id` and the archive filename.
|
|
760
|
+
*
|
|
761
|
+
* `root` — absolute or cwd-relative path to the memory directory to export.
|
|
762
|
+
*
|
|
763
|
+
* `since` — optional ISO-8601 timestamp; only files with `mtime >= since`
|
|
764
|
+
* are included.
|
|
765
|
+
*
|
|
766
|
+
* `includeKinds` — optional allow-list of top-level subdirectory names
|
|
767
|
+
* (e.g. `facts`, `entities`, `corrections`, `transcripts`). When set, files
|
|
768
|
+
* directly under {@link root} are excluded and only files whose first path
|
|
769
|
+
* segment is in the allow-list are kept. Pass `transcripts` here explicitly
|
|
770
|
+
* to opt-in transcripts (they are excluded by default).
|
|
771
|
+
*
|
|
772
|
+
* `peerIds` — optional allow-list restricting the `peers/` tree to files
|
|
773
|
+
* under `peers/<peerId>/...`. When omitted the entire `peers/` tree is
|
|
774
|
+
* included (subject to {@link includeKinds}). When set to an empty array
|
|
775
|
+
* the `peers/` tree is excluded entirely.
|
|
776
|
+
*
|
|
777
|
+
* `outDir` — optional output directory. Defaults to `<root>/.capsules`.
|
|
778
|
+
*
|
|
779
|
+
* `pluginVersion` — recorded in the manifest. Defaults to `"0.0.0"` so
|
|
780
|
+
* tests do not need to thread a version through; production callers SHOULD
|
|
781
|
+
* pass the running plugin version.
|
|
782
|
+
*
|
|
783
|
+
* `capsule` — optional overrides for the manifest's `capsule` block. The
|
|
784
|
+
* caller may pass any subset; remaining fields are filled with conservative
|
|
785
|
+
* defaults documented inline below.
|
|
786
|
+
*
|
|
787
|
+
* `now` — optional clock override (ms epoch) used for `manifest.createdAt`.
|
|
788
|
+
* Tests pass a fixed value for deterministic output.
|
|
789
|
+
*
|
|
790
|
+
* `encrypt` — when `true`, encrypt the output archive using the secure-store
|
|
791
|
+
* master key for `memoryDir`. The keyring must be unlocked before calling
|
|
792
|
+
* (`remnic secure-store unlock`). The plaintext `.capsule.json.gz` is written
|
|
793
|
+
* first, then encrypted to `<name>.capsule.json.gz.enc`; the plaintext is
|
|
794
|
+
* removed after successful encryption. Requires `memoryDir` to be provided.
|
|
795
|
+
*
|
|
796
|
+
* `memoryDir` — required when `encrypt` is `true`. The memory directory whose
|
|
797
|
+
* secure-store keyring holds the master key.
|
|
798
|
+
*/
|
|
799
|
+
interface ExportCapsuleOptions {
|
|
800
|
+
name: string;
|
|
801
|
+
root: string;
|
|
802
|
+
since?: string;
|
|
803
|
+
includeKinds?: readonly string[];
|
|
804
|
+
peerIds?: readonly string[];
|
|
805
|
+
outDir?: string;
|
|
806
|
+
pluginVersion?: string;
|
|
807
|
+
capsule?: Partial<Omit<CapsuleBlock, "id">>;
|
|
808
|
+
now?: number;
|
|
809
|
+
/**
|
|
810
|
+
* When `true`, encrypt the output archive. Requires the secure-store to be
|
|
811
|
+
* unlocked and `memoryDir` to be set. The plaintext `.capsule.json.gz` is
|
|
812
|
+
* replaced by `<name>.capsule.json.gz.enc` on success.
|
|
813
|
+
*/
|
|
814
|
+
encrypt?: boolean;
|
|
815
|
+
/**
|
|
816
|
+
* Memory directory whose secure-store keyring holds the master key. Required
|
|
817
|
+
* when `encrypt` is `true`; ignored otherwise.
|
|
818
|
+
*/
|
|
819
|
+
memoryDir?: string;
|
|
820
|
+
/**
|
|
821
|
+
* When `true`, include the `transcripts/` directory in the export even
|
|
822
|
+
* though it is excluded by default. Using this flag avoids hard-coding an
|
|
823
|
+
* explicit `includeKinds` allow-list that would inadvertently drop other
|
|
824
|
+
* valid memory directories (`peers/`, `forks/`, etc.). (Cursor / #747)
|
|
825
|
+
*
|
|
826
|
+
* Ignored when `includeKinds` is provided and already contains
|
|
827
|
+
* `"transcripts"`.
|
|
828
|
+
*/
|
|
829
|
+
includeTranscripts?: boolean;
|
|
830
|
+
}
|
|
831
|
+
interface ExportCapsuleResult {
|
|
832
|
+
archivePath: string;
|
|
833
|
+
manifestPath: string;
|
|
834
|
+
manifest: ExportManifestV2;
|
|
835
|
+
/** When the export was encrypted, the `.enc` path. `null` when unencrypted. */
|
|
836
|
+
encryptedArchivePath: string | null;
|
|
837
|
+
}
|
|
838
|
+
|
|
839
|
+
declare class EngramAccessInputError extends Error {
|
|
840
|
+
}
|
|
841
|
+
declare const ENGRAM_ACCESS_WRITE_SCHEMA_VERSION = 1;
|
|
842
|
+
interface EngramAccessHealthResponse {
|
|
843
|
+
ok: true;
|
|
844
|
+
memoryDir: string;
|
|
845
|
+
namespacesEnabled: boolean;
|
|
846
|
+
defaultNamespace: string;
|
|
847
|
+
searchBackend: string;
|
|
848
|
+
qmdEnabled: boolean;
|
|
849
|
+
nativeKnowledgeEnabled: boolean;
|
|
850
|
+
projectionAvailable: boolean;
|
|
851
|
+
}
|
|
852
|
+
interface EngramAccessRecallRequest {
|
|
853
|
+
query: string;
|
|
854
|
+
sessionKey?: string;
|
|
855
|
+
namespace?: string;
|
|
856
|
+
topK?: number;
|
|
857
|
+
mode?: RecallPlanMode | "auto";
|
|
858
|
+
includeDebug?: boolean;
|
|
859
|
+
/**
|
|
860
|
+
* Recall disclosure depth (issue #677). Selects how much content each
|
|
861
|
+
* result returns: `"chunk"` (default), `"section"`, or `"raw"`. Omitting
|
|
862
|
+
* this field is equivalent to passing `"chunk"` and preserves pre-#677
|
|
863
|
+
* behavior. Surfaces (CLI / HTTP / MCP) and per-level token telemetry
|
|
864
|
+
* are wired in subsequent PRs of #677.
|
|
865
|
+
*/
|
|
866
|
+
disclosure?: RecallDisclosure;
|
|
867
|
+
/**
|
|
868
|
+
* Coding-agent context (issue #569). When a connector resolves a git
|
|
869
|
+
* context for the session's cwd, it passes it here and the access service
|
|
870
|
+
* attaches it to the orchestrator before recall so project- / branch-
|
|
871
|
+
* scoped namespace overlays apply.
|
|
872
|
+
*
|
|
873
|
+
* Keyed by `sessionKey`; ignored when `sessionKey` is absent.
|
|
874
|
+
*/
|
|
875
|
+
codingContext?: {
|
|
876
|
+
projectId: string;
|
|
877
|
+
branch: string | null;
|
|
878
|
+
rootPath: string;
|
|
879
|
+
defaultBranch: string | null;
|
|
880
|
+
} | null;
|
|
881
|
+
/**
|
|
882
|
+
* Working directory of the calling agent session. When provided and no
|
|
883
|
+
* `codingContext` is already attached to the session, the service resolves
|
|
884
|
+
* git context from this path and attaches it automatically. This enables
|
|
885
|
+
* Claude Code hooks (and any connector that knows its cwd) to get
|
|
886
|
+
* project-scoped memory without explicitly constructing a `codingContext`.
|
|
887
|
+
*/
|
|
888
|
+
cwd?: string;
|
|
889
|
+
/**
|
|
890
|
+
* Arbitrary project tag for non-git-based project scoping. When provided,
|
|
891
|
+
* creates a `CodingContext` with `projectId: "tag:<projectTag>"`.
|
|
892
|
+
* Useful for OpenClaw sessions where the whole workspace is one git repo
|
|
893
|
+
* but different conversations correspond to different client projects.
|
|
894
|
+
* Takes precedence over `cwd`-based git resolution but NOT over an
|
|
895
|
+
* explicit `codingContext`.
|
|
896
|
+
*/
|
|
897
|
+
projectTag?: string;
|
|
898
|
+
/**
|
|
899
|
+
* Historical recall pin (issue #680). ISO 8601 timestamp. When set,
|
|
900
|
+
* the orchestrator filters out memories whose `valid_at` is after this
|
|
901
|
+
* instant OR whose `invalid_at` is at-or-before this instant, so the
|
|
902
|
+
* caller sees the corpus as it existed at `asOf`. Invalid values are
|
|
903
|
+
* rejected here with `EngramAccessInputError` (CLAUDE.md rule 51).
|
|
904
|
+
*/
|
|
905
|
+
asOf?: string;
|
|
906
|
+
/**
|
|
907
|
+
* Free-form recall tag filter (issue #689). When non-empty, recall results
|
|
908
|
+
* whose frontmatter `tags` do not match are removed from the response.
|
|
909
|
+
* Comparison is case-sensitive exact match against tags stored on each
|
|
910
|
+
* memory's frontmatter (see `storage.ts` and `docs/tags.md`).
|
|
911
|
+
*/
|
|
912
|
+
tags?: string[];
|
|
913
|
+
/**
|
|
914
|
+
* Match mode for `tags` (issue #689). `"any"` (default when omitted)
|
|
915
|
+
* admits results that carry at least one filter tag. `"all"` requires
|
|
916
|
+
* every filter tag to be present. Ignored when `tags` is absent or empty.
|
|
917
|
+
*/
|
|
918
|
+
tagMatch?: "any" | "all";
|
|
919
|
+
/**
|
|
920
|
+
* Issue #681 — when `true`, bypasses the configured
|
|
921
|
+
* `graphTraversalConfidenceFloor` for this recall and includes graph edges
|
|
922
|
+
* below the floor in traversal. Useful for diagnostic queries that need to
|
|
923
|
+
* surface results pruned by confidence decay. Default `false`.
|
|
924
|
+
*/
|
|
925
|
+
includeLowConfidence?: boolean;
|
|
926
|
+
}
|
|
927
|
+
/**
|
|
928
|
+
* Standalone request to attach / clear the coding context for a session
|
|
929
|
+
* without performing a recall. Used by the Claude Code / Codex connectors
|
|
930
|
+
* at session start, and by the `remnic.set_coding_context` MCP tool (PR 7).
|
|
931
|
+
*/
|
|
932
|
+
interface EngramAccessSetCodingContextRequest {
|
|
933
|
+
sessionKey: string;
|
|
934
|
+
codingContext: {
|
|
935
|
+
projectId: string;
|
|
936
|
+
branch: string | null;
|
|
937
|
+
rootPath: string;
|
|
938
|
+
defaultBranch: string | null;
|
|
939
|
+
} | null;
|
|
940
|
+
}
|
|
941
|
+
interface EngramAccessRecallResponse {
|
|
942
|
+
query: string;
|
|
943
|
+
sessionKey?: string;
|
|
944
|
+
namespace: string;
|
|
945
|
+
context: string;
|
|
946
|
+
count: number;
|
|
947
|
+
memoryIds: string[];
|
|
948
|
+
results: EngramAccessMemorySummary[];
|
|
949
|
+
recordedAt?: string;
|
|
950
|
+
traceId?: string;
|
|
951
|
+
plannerMode?: RecallPlanMode;
|
|
952
|
+
fallbackUsed: boolean;
|
|
953
|
+
sourcesUsed: string[];
|
|
954
|
+
/**
|
|
955
|
+
* Disclosure depth applied to this recall (issue #677). Reflects the
|
|
956
|
+
* caller-requested level after defaulting; useful for surfaces that want
|
|
957
|
+
* to render a "served at depth X" hint without re-deriving it. PR 1 of
|
|
958
|
+
* #677 wires this end-to-end for plumbing only — section/raw payload
|
|
959
|
+
* shaping ships in later PRs.
|
|
960
|
+
*/
|
|
961
|
+
disclosure: RecallDisclosure;
|
|
962
|
+
budgetsApplied?: LastRecallSnapshot["budgetsApplied"];
|
|
963
|
+
auditAnomalies?: AnomalyDetectorResult;
|
|
964
|
+
budgetWarning?: BudgetDecision;
|
|
965
|
+
latencyMs?: number;
|
|
966
|
+
debug?: {
|
|
967
|
+
snapshot?: LastRecallSnapshot;
|
|
968
|
+
intent?: IntentDebugSnapshot | null;
|
|
969
|
+
graph?: GraphRecallSnapshot | null;
|
|
970
|
+
};
|
|
971
|
+
}
|
|
972
|
+
interface EngramAccessRecallExplainRequest {
|
|
973
|
+
sessionKey?: string;
|
|
974
|
+
namespace?: string;
|
|
975
|
+
}
|
|
976
|
+
interface EngramAccessRecallExplainResponse {
|
|
977
|
+
found: boolean;
|
|
978
|
+
snapshot?: LastRecallSnapshot;
|
|
979
|
+
intent?: IntentDebugSnapshot | null;
|
|
980
|
+
graph?: GraphRecallSnapshot | null;
|
|
981
|
+
}
|
|
982
|
+
interface EngramAccessDaySummaryRequest {
|
|
983
|
+
memories?: string;
|
|
984
|
+
sessionKey?: string;
|
|
985
|
+
namespace?: string;
|
|
986
|
+
}
|
|
987
|
+
/** Inputs accepted by the `remnic_briefing` MCP tool. */
|
|
988
|
+
interface EngramAccessBriefingRequest {
|
|
989
|
+
since?: string;
|
|
990
|
+
focus?: string;
|
|
991
|
+
namespace?: string;
|
|
992
|
+
format?: "markdown" | "json";
|
|
993
|
+
maxFollowups?: number;
|
|
994
|
+
/** Caller principal for namespace access checks. Transport-bound — never from untrusted payloads. */
|
|
995
|
+
principal?: string;
|
|
996
|
+
}
|
|
997
|
+
/** Response for `remnic_briefing`. */
|
|
998
|
+
interface EngramAccessBriefingResponse {
|
|
999
|
+
format: "markdown" | "json";
|
|
1000
|
+
window: {
|
|
1001
|
+
from: string;
|
|
1002
|
+
to: string;
|
|
1003
|
+
};
|
|
1004
|
+
namespace: string;
|
|
1005
|
+
markdown: string;
|
|
1006
|
+
json: Record<string, unknown>;
|
|
1007
|
+
followupsUnavailableReason?: string;
|
|
1008
|
+
}
|
|
1009
|
+
interface EngramAccessMemoryRecord {
|
|
1010
|
+
id: string;
|
|
1011
|
+
path: string;
|
|
1012
|
+
category: string;
|
|
1013
|
+
status?: string;
|
|
1014
|
+
created?: string;
|
|
1015
|
+
updated?: string;
|
|
1016
|
+
content: string;
|
|
1017
|
+
frontmatter: MemoryFile["frontmatter"];
|
|
1018
|
+
}
|
|
1019
|
+
interface EngramAccessMemorySummary {
|
|
1020
|
+
id: string;
|
|
1021
|
+
path: string;
|
|
1022
|
+
category: string;
|
|
1023
|
+
status: string;
|
|
1024
|
+
created?: string;
|
|
1025
|
+
updated?: string;
|
|
1026
|
+
tags: string[];
|
|
1027
|
+
entityRef?: string;
|
|
1028
|
+
preview: string;
|
|
1029
|
+
/**
|
|
1030
|
+
* Disclosure depth at which this result was served (issue #677). Set by
|
|
1031
|
+
* recall paths; omitted on non-recall surfaces (e.g. memory browse) where
|
|
1032
|
+
* the concept does not apply. PR 1 of #677 always reports the
|
|
1033
|
+
* request-level disclosure on recall results; per-result divergence is
|
|
1034
|
+
* reserved for the auto-escalation policy that ships in PR 4/4.
|
|
1035
|
+
*/
|
|
1036
|
+
disclosure?: RecallDisclosure;
|
|
1037
|
+
/**
|
|
1038
|
+
* Full memory content (markdown body) — populated when `disclosure` is
|
|
1039
|
+
* `"section"` or `"raw"` (issue #677 PR 2/4). At `"chunk"` depth callers
|
|
1040
|
+
* only receive the short `preview`, preserving the cheap-by-default
|
|
1041
|
+
* recall payload. Browse/non-recall paths leave `content` undefined.
|
|
1042
|
+
*/
|
|
1043
|
+
content?: string;
|
|
1044
|
+
/**
|
|
1045
|
+
* Raw transcript excerpts surfaced from the LCM archive when `disclosure`
|
|
1046
|
+
* is `"raw"` and the LCM engine is enabled (issue #677 PR 2/4). Each
|
|
1047
|
+
* entry is a per-message excerpt sized by the LCM archive's
|
|
1048
|
+
* configured excerpt window. Empty array when LCM is disabled or has
|
|
1049
|
+
* no matching transcript content. Always omitted at chunk/section.
|
|
1050
|
+
*/
|
|
1051
|
+
rawExcerpts?: Array<{
|
|
1052
|
+
turnIndex: number;
|
|
1053
|
+
role: string;
|
|
1054
|
+
content: string;
|
|
1055
|
+
sessionId: string;
|
|
1056
|
+
}>;
|
|
1057
|
+
}
|
|
1058
|
+
interface EngramAccessMemoryBrowseRequest {
|
|
1059
|
+
query?: string;
|
|
1060
|
+
status?: string;
|
|
1061
|
+
category?: string;
|
|
1062
|
+
namespace?: string;
|
|
1063
|
+
sort?: "updated_desc" | "updated_asc" | "created_desc" | "created_asc";
|
|
1064
|
+
limit?: number;
|
|
1065
|
+
offset?: number;
|
|
1066
|
+
}
|
|
1067
|
+
interface EngramAccessMemoryBrowseResponse {
|
|
1068
|
+
namespace: string;
|
|
1069
|
+
sort: "updated_desc" | "updated_asc" | "created_desc" | "created_asc";
|
|
1070
|
+
total: number;
|
|
1071
|
+
count: number;
|
|
1072
|
+
limit: number;
|
|
1073
|
+
offset: number;
|
|
1074
|
+
memories: EngramAccessMemorySummary[];
|
|
1075
|
+
}
|
|
1076
|
+
interface EngramAccessMemoryResponse {
|
|
1077
|
+
found: boolean;
|
|
1078
|
+
namespace: string;
|
|
1079
|
+
memory?: EngramAccessMemoryRecord;
|
|
1080
|
+
}
|
|
1081
|
+
interface EngramAccessTimelineResponse {
|
|
1082
|
+
found: boolean;
|
|
1083
|
+
namespace: string;
|
|
1084
|
+
count: number;
|
|
1085
|
+
timeline: MemoryLifecycleEvent[];
|
|
1086
|
+
}
|
|
1087
|
+
interface EngramAccessEntitySummary {
|
|
1088
|
+
name: string;
|
|
1089
|
+
type: string;
|
|
1090
|
+
updated: string;
|
|
1091
|
+
summary?: string;
|
|
1092
|
+
aliases: string[];
|
|
1093
|
+
}
|
|
1094
|
+
interface EngramAccessEntityListResponse {
|
|
1095
|
+
namespace: string;
|
|
1096
|
+
total: number;
|
|
1097
|
+
count: number;
|
|
1098
|
+
limit: number;
|
|
1099
|
+
offset: number;
|
|
1100
|
+
entities: EngramAccessEntitySummary[];
|
|
1101
|
+
}
|
|
1102
|
+
interface EngramAccessEntityResponse {
|
|
1103
|
+
found: boolean;
|
|
1104
|
+
namespace: string;
|
|
1105
|
+
entity?: EntityFile;
|
|
1106
|
+
}
|
|
1107
|
+
interface EngramAccessReviewQueueResponse {
|
|
1108
|
+
found: boolean;
|
|
1109
|
+
namespace?: string;
|
|
1110
|
+
runId?: string;
|
|
1111
|
+
summary?: Awaited<ReturnType<typeof readMemoryGovernanceRunArtifact>>["summary"];
|
|
1112
|
+
metrics?: Awaited<ReturnType<typeof readMemoryGovernanceRunArtifact>>["metrics"];
|
|
1113
|
+
qualityScore?: Awaited<ReturnType<typeof readMemoryGovernanceRunArtifact>>["qualityScore"];
|
|
1114
|
+
reviewQueue?: Awaited<ReturnType<typeof readMemoryGovernanceRunArtifact>>["reviewQueue"];
|
|
1115
|
+
appliedActions?: Awaited<ReturnType<typeof readMemoryGovernanceRunArtifact>>["appliedActions"];
|
|
1116
|
+
transitionReport?: Awaited<ReturnType<typeof readMemoryGovernanceRunArtifact>>["transitionReport"];
|
|
1117
|
+
report?: string;
|
|
1118
|
+
}
|
|
1119
|
+
interface EngramAccessMaintenanceResponse {
|
|
1120
|
+
namespace: string;
|
|
1121
|
+
health: EngramAccessHealthResponse;
|
|
1122
|
+
latestGovernanceRun: EngramAccessReviewQueueResponse;
|
|
1123
|
+
}
|
|
1124
|
+
interface EngramAccessTrustZoneStatusResponse {
|
|
1125
|
+
namespace: string;
|
|
1126
|
+
status: TrustZoneStoreStatus;
|
|
1127
|
+
}
|
|
1128
|
+
interface EngramAccessTrustZoneRecordSummary {
|
|
1129
|
+
recordId: string;
|
|
1130
|
+
filePath: string;
|
|
1131
|
+
zone: TrustZoneName;
|
|
1132
|
+
recordedAt: string;
|
|
1133
|
+
kind: TrustZoneRecordKind;
|
|
1134
|
+
summary: string;
|
|
1135
|
+
sourceClass: TrustZoneSourceClass;
|
|
1136
|
+
sessionKey?: string;
|
|
1137
|
+
sourceId?: string;
|
|
1138
|
+
evidenceHashPresent: boolean;
|
|
1139
|
+
anchored: boolean;
|
|
1140
|
+
entityRefs: string[];
|
|
1141
|
+
tags: string[];
|
|
1142
|
+
metadata?: Record<string, string>;
|
|
1143
|
+
trustScore?: TrustZoneProvenanceScore;
|
|
1144
|
+
nextPromotionTarget?: TrustZoneName;
|
|
1145
|
+
nextPromotionAllowed: boolean;
|
|
1146
|
+
nextPromotionReasons: string[];
|
|
1147
|
+
corroborationCount?: number;
|
|
1148
|
+
corroborationSourceClasses?: TrustZoneSourceClass[];
|
|
1149
|
+
}
|
|
1150
|
+
interface EngramAccessTrustZoneBrowseRequest {
|
|
1151
|
+
query?: string;
|
|
1152
|
+
zone?: TrustZoneName;
|
|
1153
|
+
kind?: TrustZoneRecordKind;
|
|
1154
|
+
sourceClass?: TrustZoneSourceClass;
|
|
1155
|
+
namespace?: string;
|
|
1156
|
+
limit?: number;
|
|
1157
|
+
offset?: number;
|
|
1158
|
+
}
|
|
1159
|
+
interface EngramAccessTrustZoneBrowseResponse {
|
|
1160
|
+
namespace: string;
|
|
1161
|
+
total: number;
|
|
1162
|
+
count: number;
|
|
1163
|
+
limit: number;
|
|
1164
|
+
offset: number;
|
|
1165
|
+
records: EngramAccessTrustZoneRecordSummary[];
|
|
1166
|
+
}
|
|
1167
|
+
interface EngramAccessTrustZonePromoteRequest {
|
|
1168
|
+
recordId: string;
|
|
1169
|
+
targetZone: TrustZoneName;
|
|
1170
|
+
promotionReason: string;
|
|
1171
|
+
recordedAt?: string;
|
|
1172
|
+
summary?: string;
|
|
1173
|
+
dryRun?: boolean;
|
|
1174
|
+
namespace?: string;
|
|
1175
|
+
authenticatedPrincipal?: string;
|
|
1176
|
+
}
|
|
1177
|
+
interface EngramAccessTrustZonePromoteResponse extends TrustZonePromotionResult {
|
|
1178
|
+
namespace: string;
|
|
1179
|
+
dryRun: boolean;
|
|
1180
|
+
}
|
|
1181
|
+
interface EngramAccessTrustZoneDemoSeedRequest {
|
|
1182
|
+
scenario?: string;
|
|
1183
|
+
recordedAt?: string;
|
|
1184
|
+
dryRun?: boolean;
|
|
1185
|
+
namespace?: string;
|
|
1186
|
+
authenticatedPrincipal?: string;
|
|
1187
|
+
}
|
|
1188
|
+
interface EngramAccessTrustZoneDemoSeedResponse extends TrustZoneDemoSeedResult {
|
|
1189
|
+
namespace: string;
|
|
1190
|
+
}
|
|
1191
|
+
interface EngramAccessQualityResponse {
|
|
1192
|
+
namespace: string;
|
|
1193
|
+
totalMemories: number;
|
|
1194
|
+
statusCounts: Record<string, number>;
|
|
1195
|
+
categoryCounts: Record<string, number>;
|
|
1196
|
+
confidenceTierCounts: Record<string, number>;
|
|
1197
|
+
ageBucketCounts: Record<string, number>;
|
|
1198
|
+
archivePressure: {
|
|
1199
|
+
pendingReview: number;
|
|
1200
|
+
quarantined: number;
|
|
1201
|
+
archived: number;
|
|
1202
|
+
staleActive: number;
|
|
1203
|
+
lowConfidenceActive: number;
|
|
1204
|
+
};
|
|
1205
|
+
latestGovernanceRun: {
|
|
1206
|
+
found: boolean;
|
|
1207
|
+
runId?: string;
|
|
1208
|
+
qualityScore?: EngramAccessReviewQueueResponse["qualityScore"];
|
|
1209
|
+
reviewQueueCount: number;
|
|
1210
|
+
};
|
|
1211
|
+
}
|
|
1212
|
+
interface EngramAccessCapsuleListResponse {
|
|
1213
|
+
namespace: string;
|
|
1214
|
+
capsulesDir: string;
|
|
1215
|
+
capsules: CapsuleListEntry[];
|
|
1216
|
+
}
|
|
1217
|
+
interface EngramAccessReviewDispositionRequest {
|
|
1218
|
+
memoryId: string;
|
|
1219
|
+
status: MemoryStatus | "archived";
|
|
1220
|
+
reasonCode: string;
|
|
1221
|
+
namespace?: string;
|
|
1222
|
+
/**
|
|
1223
|
+
* Trusted transport-bound principal. This must never come from untrusted client payloads.
|
|
1224
|
+
* When present, write authorization is evaluated against this principal instead of sessionKey.
|
|
1225
|
+
*/
|
|
1226
|
+
authenticatedPrincipal?: string;
|
|
1227
|
+
}
|
|
1228
|
+
interface EngramAccessReviewDispositionResponse {
|
|
1229
|
+
ok: boolean;
|
|
1230
|
+
namespace: string;
|
|
1231
|
+
memoryId: string;
|
|
1232
|
+
status: MemoryStatus | "archived";
|
|
1233
|
+
previousStatus: MemoryStatus;
|
|
1234
|
+
currentPath?: string;
|
|
1235
|
+
}
|
|
1236
|
+
interface EngramAccessWriteEnvelope {
|
|
1237
|
+
schemaVersion?: number;
|
|
1238
|
+
idempotencyKey?: string;
|
|
1239
|
+
dryRun?: boolean;
|
|
1240
|
+
sessionKey?: string;
|
|
1241
|
+
/**
|
|
1242
|
+
* Trusted transport-bound principal. This must never come from untrusted client payloads.
|
|
1243
|
+
* When present, write authorization is evaluated against this principal instead of sessionKey.
|
|
1244
|
+
*/
|
|
1245
|
+
authenticatedPrincipal?: string;
|
|
1246
|
+
}
|
|
1247
|
+
interface EngramAccessMemoryStoreRequest extends EngramAccessWriteEnvelope, ExplicitCaptureInput {
|
|
1248
|
+
}
|
|
1249
|
+
interface EngramAccessSuggestionSubmitRequest extends EngramAccessWriteEnvelope, ExplicitCaptureInput {
|
|
1250
|
+
}
|
|
1251
|
+
interface EngramAccessWriteResponse {
|
|
1252
|
+
schemaVersion: 1;
|
|
1253
|
+
operation: "memory_store" | "suggestion_submit";
|
|
1254
|
+
namespace: string;
|
|
1255
|
+
dryRun: boolean;
|
|
1256
|
+
accepted: boolean;
|
|
1257
|
+
queued: boolean;
|
|
1258
|
+
status: "validated" | "stored" | "duplicate" | "queued_for_review";
|
|
1259
|
+
memoryId?: string;
|
|
1260
|
+
duplicateOf?: string;
|
|
1261
|
+
idempotencyKey?: string;
|
|
1262
|
+
idempotencyReplay?: boolean;
|
|
1263
|
+
}
|
|
1264
|
+
interface EngramAccessObserveRequest {
|
|
1265
|
+
sessionKey: string;
|
|
1266
|
+
messages: Array<{
|
|
1267
|
+
role: "user" | "assistant";
|
|
1268
|
+
content: string;
|
|
1269
|
+
}>;
|
|
1270
|
+
namespace?: string;
|
|
1271
|
+
authenticatedPrincipal?: string;
|
|
1272
|
+
skipExtraction?: boolean;
|
|
1273
|
+
/**
|
|
1274
|
+
* Working directory of the calling agent session (issue #569 wiring).
|
|
1275
|
+
* When provided and no `codingContext` is attached for this session,
|
|
1276
|
+
* resolves git context from the path and attaches it so writes route to
|
|
1277
|
+
* the correct project namespace.
|
|
1278
|
+
*/
|
|
1279
|
+
cwd?: string;
|
|
1280
|
+
/**
|
|
1281
|
+
* Arbitrary project tag for non-git-based project scoping (issue #569).
|
|
1282
|
+
* Creates a `CodingContext` with `projectId: "tag:<projectTag>"`.
|
|
1283
|
+
*/
|
|
1284
|
+
projectTag?: string;
|
|
1285
|
+
}
|
|
1286
|
+
interface EngramAccessObserveResponse {
|
|
1287
|
+
accepted: number;
|
|
1288
|
+
sessionKey: string;
|
|
1289
|
+
namespace: string;
|
|
1290
|
+
lcmArchived: boolean;
|
|
1291
|
+
extractionQueued: boolean;
|
|
1292
|
+
}
|
|
1293
|
+
interface EngramAccessLcmSearchRequest {
|
|
1294
|
+
query: string;
|
|
1295
|
+
sessionKey?: string;
|
|
1296
|
+
namespace?: string;
|
|
1297
|
+
limit?: number;
|
|
1298
|
+
authenticatedPrincipal?: string;
|
|
1299
|
+
}
|
|
1300
|
+
interface EngramAccessLcmSearchResponse {
|
|
1301
|
+
query: string;
|
|
1302
|
+
namespace: string;
|
|
1303
|
+
results: Array<{
|
|
1304
|
+
sessionId: string;
|
|
1305
|
+
content: string;
|
|
1306
|
+
turnIndex?: number;
|
|
1307
|
+
}>;
|
|
1308
|
+
count: number;
|
|
1309
|
+
lcmEnabled: boolean;
|
|
1310
|
+
}
|
|
1311
|
+
interface EngramAccessLcmStatusResponse {
|
|
1312
|
+
enabled: boolean;
|
|
1313
|
+
archiveAvailable: boolean;
|
|
1314
|
+
stats?: {
|
|
1315
|
+
totalTurns?: number;
|
|
1316
|
+
};
|
|
1317
|
+
}
|
|
1318
|
+
type EngramAccessIdempotencyStatus = "miss" | "replay" | "conflict";
|
|
1319
|
+
/**
|
|
1320
|
+
* Pure helper that shapes a {@link EngramAccessMemorySummary} from a
|
|
1321
|
+
* {@link MemoryFile} based on the requested disclosure depth (issue #677
|
|
1322
|
+
* PR 2/4). Extracted so the shaping invariants — chunk emits preview
|
|
1323
|
+
* only, section attaches `content`, raw also surfaces `rawExcerpts` when
|
|
1324
|
+
* the caller passes them — can be unit-tested without booting an
|
|
1325
|
+
* orchestrator.
|
|
1326
|
+
*
|
|
1327
|
+
* Browse / non-recall paths pass `disclosure === undefined` so the
|
|
1328
|
+
* `disclosure`, `content`, and `rawExcerpts` fields are all omitted —
|
|
1329
|
+
* preserving the cheap-by-default browse projection.
|
|
1330
|
+
*/
|
|
1331
|
+
declare function shapeMemorySummary(memory: MemoryFile, baseDir: string, disclosure?: RecallDisclosure, rawExcerpts?: EngramAccessMemorySummary["rawExcerpts"]): EngramAccessMemorySummary;
|
|
1332
|
+
declare class EngramAccessService {
|
|
1333
|
+
private readonly orchestrator;
|
|
1334
|
+
private readonly idempotency;
|
|
1335
|
+
private readonly idempotencyLocks;
|
|
1336
|
+
private readonly budget;
|
|
1337
|
+
private readonly auditAdapter;
|
|
1338
|
+
constructor(orchestrator: Orchestrator);
|
|
1339
|
+
get briefingEnabled(): boolean;
|
|
1340
|
+
private resolveNamespace;
|
|
1341
|
+
private normalizeRecallMode;
|
|
1342
|
+
private resolveRecallNamespace;
|
|
1343
|
+
private resolveWritePrincipal;
|
|
1344
|
+
private resolveWritableNamespace;
|
|
1345
|
+
private resolveReadableNamespace;
|
|
1346
|
+
private buildRecallDebug;
|
|
1347
|
+
private serializeRecallResults;
|
|
1348
|
+
/**
|
|
1349
|
+
* Fetch raw transcript excerpts from the LCM archive for `disclosure ===
|
|
1350
|
+
* "raw"` recalls (issue #677 PR 2/4). Returns `null` for non-raw recall
|
|
1351
|
+
* depths, an empty array when LCM is disabled / not initialized / has no
|
|
1352
|
+
* matches, and an array of LCM-side excerpts otherwise. Errors are
|
|
1353
|
+
* swallowed and treated as "no excerpts" so a failing LCM never breaks
|
|
1354
|
+
* the recall response.
|
|
1355
|
+
*
|
|
1356
|
+
* Namespace handling: LCM archival prefixes non-default-namespace
|
|
1357
|
+
* sessions with `${namespace}:${sessionKey}` (see `observe()` around
|
|
1358
|
+
* line 2498), so the lookup must mirror that prefix or raw recalls in
|
|
1359
|
+
* non-default namespaces miss their own excerpts.
|
|
1360
|
+
*/
|
|
1361
|
+
private fetchRawExcerpts;
|
|
1362
|
+
private handleIdempotentWrite;
|
|
1363
|
+
private peekIdempotentWrite;
|
|
1364
|
+
private withIdempotencyLock;
|
|
1365
|
+
health(namespace?: string): Promise<EngramAccessHealthResponse>;
|
|
1366
|
+
daySummary(request: EngramAccessDaySummaryRequest): Promise<DaySummaryResult | null>;
|
|
1367
|
+
/**
|
|
1368
|
+
* Build a daily context briefing. Gracefully degrades when the OpenAI key
|
|
1369
|
+
* or Responses API is unavailable — never throws for LLM-related problems.
|
|
1370
|
+
*/
|
|
1371
|
+
briefing(request: EngramAccessBriefingRequest): Promise<EngramAccessBriefingResponse>;
|
|
1372
|
+
/**
|
|
1373
|
+
* Attach a coding context to a session (issue #569). Used by the Claude
|
|
1374
|
+
* Code / Codex / generic-MCP connectors at session start so that recall +
|
|
1375
|
+
* write paths can route to a project- / branch-scoped namespace.
|
|
1376
|
+
*
|
|
1377
|
+
* Validates the input shape and rejects malformed payloads rather than
|
|
1378
|
+
* silently accepting them (CLAUDE.md #51). Pass `codingContext: null` to
|
|
1379
|
+
* clear.
|
|
1380
|
+
*/
|
|
1381
|
+
setCodingContext(request: EngramAccessSetCodingContextRequest): void;
|
|
1382
|
+
/**
|
|
1383
|
+
* Auto-resolve and attach a coding context for a session when one is not
|
|
1384
|
+
* already present. Resolves from `projectTag` (highest priority after
|
|
1385
|
+
* explicit `codingContext`), then from `cwd` via git detection.
|
|
1386
|
+
*
|
|
1387
|
+
* This is a no-op when:
|
|
1388
|
+
* - `sessionKey` is missing
|
|
1389
|
+
* - the session already has a coding context attached
|
|
1390
|
+
* - codingMode.projectScope is disabled (CLAUDE.md #30)
|
|
1391
|
+
* - neither `cwd` nor `projectTag` is provided
|
|
1392
|
+
*
|
|
1393
|
+
* Never throws — git resolution failures are silently ignored because not
|
|
1394
|
+
* being in a repo is a normal runtime state.
|
|
1395
|
+
*/
|
|
1396
|
+
private maybeAttachCodingContext;
|
|
1397
|
+
recall(request: EngramAccessRecallRequest): Promise<EngramAccessRecallResponse>;
|
|
1398
|
+
recallExplain(request?: EngramAccessRecallExplainRequest): Promise<EngramAccessRecallExplainResponse>;
|
|
1399
|
+
recallTierExplain(sessionKey?: string, namespace?: string, authenticatedPrincipal?: string): Promise<RecallExplainJsonPayload>;
|
|
1400
|
+
/**
|
|
1401
|
+
* Recall X-ray (issue #570). Runs a recall with `xrayCapture: true`
|
|
1402
|
+
* and returns the resulting snapshot as structured JSON so every
|
|
1403
|
+
* surface (CLI / HTTP / MCP) gets the same payload. Namespace scope
|
|
1404
|
+
* is enforced before the recall fires (CLAUDE.md rule 42 — read and
|
|
1405
|
+
* write paths must resolve through the same namespace layer) so an
|
|
1406
|
+
* unauthorized principal cannot capture an x-ray for a namespace it
|
|
1407
|
+
* cannot read.
|
|
1408
|
+
*/
|
|
1409
|
+
recallXray(request: {
|
|
1410
|
+
query: string;
|
|
1411
|
+
sessionKey?: string;
|
|
1412
|
+
namespace?: string;
|
|
1413
|
+
budget?: number;
|
|
1414
|
+
authenticatedPrincipal?: string;
|
|
1415
|
+
/**
|
|
1416
|
+
* Disclosure depth used to shape per-result payload (issue #677
|
|
1417
|
+
* PR 3/4). When set, each X-ray result is decorated with the
|
|
1418
|
+
* matching `disclosure` field and `estimatedTokens` computed from
|
|
1419
|
+
* the actual rendered content at that depth, so the renderer's
|
|
1420
|
+
* "Token spend by disclosure" summary reflects real spend rather
|
|
1421
|
+
* than staying empty when no caller wires the depth knob through.
|
|
1422
|
+
*/
|
|
1423
|
+
disclosure?: RecallDisclosure;
|
|
1424
|
+
/**
|
|
1425
|
+
* Free-form recall tag filter (issue #689). Mirrors the field on
|
|
1426
|
+
* `EngramAccessRecallRequest`. When non-empty, the captured X-ray
|
|
1427
|
+
* snapshot's `results` are filtered down to memories whose
|
|
1428
|
+
* frontmatter tags satisfy `tagMatch` ("any" by default), and a
|
|
1429
|
+
* `tag-filter` entry is appended to `filters`.
|
|
1430
|
+
*/
|
|
1431
|
+
tags?: string[];
|
|
1432
|
+
/** Match mode for `tags`. See `EngramAccessRecallRequest.tagMatch`. */
|
|
1433
|
+
tagMatch?: "any" | "all";
|
|
1434
|
+
}): Promise<{
|
|
1435
|
+
snapshotFound: boolean;
|
|
1436
|
+
snapshot?: RecallXraySnapshot;
|
|
1437
|
+
}>;
|
|
1438
|
+
private xrayQueue;
|
|
1439
|
+
memoryStore(request: EngramAccessMemoryStoreRequest): Promise<EngramAccessWriteResponse>;
|
|
1440
|
+
peekMemoryStoreIdempotency(request: EngramAccessMemoryStoreRequest): Promise<EngramAccessIdempotencyStatus>;
|
|
1441
|
+
suggestionSubmit(request: EngramAccessSuggestionSubmitRequest): Promise<EngramAccessWriteResponse>;
|
|
1442
|
+
peekSuggestionSubmitIdempotency(request: EngramAccessSuggestionSubmitRequest): Promise<EngramAccessIdempotencyStatus>;
|
|
1443
|
+
private validateWriteCandidate;
|
|
1444
|
+
memoryGet(memoryId: string, namespace?: string, principal?: string): Promise<EngramAccessMemoryResponse>;
|
|
1445
|
+
memoryBrowse(request?: EngramAccessMemoryBrowseRequest): Promise<EngramAccessMemoryBrowseResponse>;
|
|
1446
|
+
memoryTimeline(memoryId: string, namespace?: string, limit?: number, principal?: string): Promise<EngramAccessTimelineResponse>;
|
|
1447
|
+
entityList(options?: {
|
|
1448
|
+
namespace?: string;
|
|
1449
|
+
query?: string;
|
|
1450
|
+
limit?: number;
|
|
1451
|
+
offset?: number;
|
|
1452
|
+
}): Promise<EngramAccessEntityListResponse>;
|
|
1453
|
+
entityGet(name: string, namespace?: string): Promise<EngramAccessEntityResponse>;
|
|
1454
|
+
reviewQueue(runId?: string, namespace?: string, principal?: string): Promise<EngramAccessReviewQueueResponse>;
|
|
1455
|
+
maintenance(namespace?: string, principal?: string): Promise<EngramAccessMaintenanceResponse>;
|
|
1456
|
+
quality(namespace?: string, principal?: string): Promise<EngramAccessQualityResponse>;
|
|
1457
|
+
governanceRun(request: {
|
|
1458
|
+
namespace?: string;
|
|
1459
|
+
mode?: "shadow" | "apply";
|
|
1460
|
+
recentDays?: number;
|
|
1461
|
+
maxMemories?: number;
|
|
1462
|
+
batchSize?: number;
|
|
1463
|
+
authenticatedPrincipal?: string;
|
|
1464
|
+
}, principal?: string): Promise<{
|
|
1465
|
+
namespace: string;
|
|
1466
|
+
runId: string;
|
|
1467
|
+
traceId: string;
|
|
1468
|
+
mode: "shadow" | "apply";
|
|
1469
|
+
reviewQueueCount: number;
|
|
1470
|
+
proposedActionCount: number;
|
|
1471
|
+
appliedActionCount: number;
|
|
1472
|
+
summaryPath: string;
|
|
1473
|
+
reportPath: string;
|
|
1474
|
+
}>;
|
|
1475
|
+
procedureMiningRun(request: {
|
|
1476
|
+
namespace?: string;
|
|
1477
|
+
authenticatedPrincipal?: string;
|
|
1478
|
+
}, principal?: string): Promise<{
|
|
1479
|
+
namespace: string;
|
|
1480
|
+
clustersProcessed: number;
|
|
1481
|
+
proceduresWritten: number;
|
|
1482
|
+
skippedReason?: string;
|
|
1483
|
+
}>;
|
|
1484
|
+
liveConnectorsRun(request?: {
|
|
1485
|
+
authenticatedPrincipal?: string;
|
|
1486
|
+
force?: boolean;
|
|
1487
|
+
}, principal?: string): Promise<LiveConnectorsRunSummary>;
|
|
1488
|
+
/**
|
|
1489
|
+
* Run the pattern-reinforcement maintenance job (issue #687 PR 2/4).
|
|
1490
|
+
*
|
|
1491
|
+
* Cluster duplicate non-procedural memories and reinforce the
|
|
1492
|
+
* canonical (most-recent) member. Gated on
|
|
1493
|
+
* `patternReinforcementEnabled` — when disabled, returns
|
|
1494
|
+
* `{ ran: false, skippedReason: "disabled" }` so the cron payload
|
|
1495
|
+
* surface in CI logs cleanly.
|
|
1496
|
+
*
|
|
1497
|
+
* Resolves the namespace via the same writable path used by
|
|
1498
|
+
* `procedureMiningRun` so cross-tenant writes are impossible
|
|
1499
|
+
* (CLAUDE.md rule 42).
|
|
1500
|
+
*
|
|
1501
|
+
* Delegates the run to `orchestrator.runPatternReinforcement` so
|
|
1502
|
+
* the cadence floor (`patternReinforcementCadenceMs`) is enforced
|
|
1503
|
+
* uniformly across cron + MCP paths (PR #730 review feedback,
|
|
1504
|
+
* Codex P2). Accepts `force: true` for ad-hoc operator runs that
|
|
1505
|
+
* must bypass the cadence floor — mirrors the pattern used by
|
|
1506
|
+
* other maintenance MCP tools.
|
|
1507
|
+
*/
|
|
1508
|
+
patternReinforcementRun(request?: {
|
|
1509
|
+
namespace?: string;
|
|
1510
|
+
authenticatedPrincipal?: string;
|
|
1511
|
+
force?: boolean;
|
|
1512
|
+
}, principal?: string): Promise<{
|
|
1513
|
+
namespace: string;
|
|
1514
|
+
ran: boolean;
|
|
1515
|
+
skippedReason?: "disabled" | "cadence";
|
|
1516
|
+
clustersFound: number;
|
|
1517
|
+
canonicalsUpdated: number;
|
|
1518
|
+
duplicatesSuperseded: number;
|
|
1519
|
+
result?: PatternReinforcementResult;
|
|
1520
|
+
}>;
|
|
1521
|
+
/**
|
|
1522
|
+
* Procedural memory stats (issue #567 PR 5/5). Read-only — resolves the
|
|
1523
|
+
* namespace via the same path used by `recallExplain` / `trustZoneStatus`
|
|
1524
|
+
* so cross-tenant reads are impossible (CLAUDE.md rule 42).
|
|
1525
|
+
*/
|
|
1526
|
+
procedureStats(request?: {
|
|
1527
|
+
namespace?: string;
|
|
1528
|
+
}, principal?: string): Promise<ProcedureStatsReport & {
|
|
1529
|
+
namespace: string;
|
|
1530
|
+
}>;
|
|
1531
|
+
trustZoneStatus(namespace?: string, principal?: string): Promise<EngramAccessTrustZoneStatusResponse>;
|
|
1532
|
+
trustZoneBrowse(request: EngramAccessTrustZoneBrowseRequest, principal?: string): Promise<EngramAccessTrustZoneBrowseResponse>;
|
|
1533
|
+
trustZonePromote(request: EngramAccessTrustZonePromoteRequest): Promise<EngramAccessTrustZonePromoteResponse>;
|
|
1534
|
+
trustZoneDemoSeed(request: EngramAccessTrustZoneDemoSeedRequest): Promise<EngramAccessTrustZoneDemoSeedResponse>;
|
|
1535
|
+
reviewDisposition(request: EngramAccessReviewDispositionRequest): Promise<EngramAccessReviewDispositionResponse>;
|
|
1536
|
+
private serializeMemory;
|
|
1537
|
+
private serializeMemorySummary;
|
|
1538
|
+
observe(request: EngramAccessObserveRequest): Promise<EngramAccessObserveResponse>;
|
|
1539
|
+
lcmSearch(request: EngramAccessLcmSearchRequest): Promise<EngramAccessLcmSearchResponse>;
|
|
1540
|
+
continuityAuditGenerate(request: {
|
|
1541
|
+
period?: "weekly" | "monthly";
|
|
1542
|
+
key?: string;
|
|
1543
|
+
}): Promise<{
|
|
1544
|
+
enabled: boolean;
|
|
1545
|
+
reason?: string;
|
|
1546
|
+
period?: string;
|
|
1547
|
+
key?: string;
|
|
1548
|
+
reportPath?: string;
|
|
1549
|
+
}>;
|
|
1550
|
+
continuityIncidentOpen(request: {
|
|
1551
|
+
symptom: string;
|
|
1552
|
+
namespace?: string;
|
|
1553
|
+
principal?: string;
|
|
1554
|
+
triggerWindow?: string;
|
|
1555
|
+
suspectedCause?: string;
|
|
1556
|
+
}): Promise<unknown>;
|
|
1557
|
+
continuityIncidentClose(request: {
|
|
1558
|
+
id: string;
|
|
1559
|
+
namespace?: string;
|
|
1560
|
+
principal?: string;
|
|
1561
|
+
fixApplied: string;
|
|
1562
|
+
verificationResult: string;
|
|
1563
|
+
preventiveRule?: string;
|
|
1564
|
+
}): Promise<unknown>;
|
|
1565
|
+
continuityIncidentList(request: {
|
|
1566
|
+
state?: "open" | "closed" | "all";
|
|
1567
|
+
namespace?: string;
|
|
1568
|
+
principal?: string;
|
|
1569
|
+
limit?: number;
|
|
1570
|
+
}): Promise<unknown>;
|
|
1571
|
+
continuityLoopAddOrUpdate(request: {
|
|
1572
|
+
id: string;
|
|
1573
|
+
cadence: "daily" | "weekly" | "monthly" | "quarterly";
|
|
1574
|
+
purpose: string;
|
|
1575
|
+
status: "active" | "paused" | "retired";
|
|
1576
|
+
killCondition: string;
|
|
1577
|
+
namespace?: string;
|
|
1578
|
+
principal?: string;
|
|
1579
|
+
lastReviewed?: string;
|
|
1580
|
+
notes?: string;
|
|
1581
|
+
}): Promise<unknown>;
|
|
1582
|
+
continuityLoopReview(request: {
|
|
1583
|
+
id: string;
|
|
1584
|
+
namespace?: string;
|
|
1585
|
+
principal?: string;
|
|
1586
|
+
status?: "active" | "paused" | "retired";
|
|
1587
|
+
notes?: string;
|
|
1588
|
+
reviewedAt?: string;
|
|
1589
|
+
}): Promise<unknown>;
|
|
1590
|
+
identityAnchorGet(request: {
|
|
1591
|
+
namespace?: string;
|
|
1592
|
+
principal?: string;
|
|
1593
|
+
}): Promise<unknown>;
|
|
1594
|
+
/**
|
|
1595
|
+
* @deprecated since issue #679 PR 5/5 — the identity-anchor model is
|
|
1596
|
+
* superseded by the peer registry. Use `peerSet({ id: "self", ... })` or
|
|
1597
|
+
* `remnic peer set self` to update the self peer's identity kernel, and
|
|
1598
|
+
* `remnic peer migrate` to seed `peers/self/identity.md` from existing
|
|
1599
|
+
* legacy anchor data. This method continues to function for backward
|
|
1600
|
+
* compatibility but will be removed in a future major version.
|
|
1601
|
+
*/
|
|
1602
|
+
identityAnchorUpdate(request: {
|
|
1603
|
+
namespace?: string;
|
|
1604
|
+
principal?: string;
|
|
1605
|
+
identityTraits?: string;
|
|
1606
|
+
communicationPreferences?: string;
|
|
1607
|
+
operatingPrinciples?: string;
|
|
1608
|
+
continuityNotes?: string;
|
|
1609
|
+
}): Promise<unknown>;
|
|
1610
|
+
memoryIdentity(request: {
|
|
1611
|
+
namespace?: string;
|
|
1612
|
+
principal?: string;
|
|
1613
|
+
}): Promise<unknown>;
|
|
1614
|
+
workTask(request: {
|
|
1615
|
+
action: "create" | "get" | "list" | "update" | "transition" | "delete";
|
|
1616
|
+
id?: string;
|
|
1617
|
+
title?: string;
|
|
1618
|
+
description?: string;
|
|
1619
|
+
status?: string;
|
|
1620
|
+
priority?: string;
|
|
1621
|
+
owner?: string;
|
|
1622
|
+
assignee?: string;
|
|
1623
|
+
projectId?: string;
|
|
1624
|
+
tags?: string[];
|
|
1625
|
+
dueAt?: string;
|
|
1626
|
+
}): Promise<unknown>;
|
|
1627
|
+
workProject(request: {
|
|
1628
|
+
action: "create" | "get" | "list" | "update" | "delete" | "link_task";
|
|
1629
|
+
id?: string;
|
|
1630
|
+
name?: string;
|
|
1631
|
+
description?: string;
|
|
1632
|
+
status?: string;
|
|
1633
|
+
owner?: string;
|
|
1634
|
+
tags?: string[];
|
|
1635
|
+
taskId?: string;
|
|
1636
|
+
projectId?: string;
|
|
1637
|
+
}): Promise<unknown>;
|
|
1638
|
+
workBoard(request: {
|
|
1639
|
+
action: "export_markdown" | "export_snapshot" | "import_snapshot";
|
|
1640
|
+
projectId?: string;
|
|
1641
|
+
snapshotJson?: string;
|
|
1642
|
+
linkToMemory?: boolean;
|
|
1643
|
+
}): Promise<unknown>;
|
|
1644
|
+
sharedContextWriteOutput(request: {
|
|
1645
|
+
agentId: string;
|
|
1646
|
+
title: string;
|
|
1647
|
+
content: string;
|
|
1648
|
+
}): Promise<unknown>;
|
|
1649
|
+
sharedFeedbackRecord(request: {
|
|
1650
|
+
agent: string;
|
|
1651
|
+
decision: "approved" | "approved_with_feedback" | "rejected";
|
|
1652
|
+
reason: string;
|
|
1653
|
+
date?: string;
|
|
1654
|
+
learning?: string;
|
|
1655
|
+
outcome?: string;
|
|
1656
|
+
severity?: "low" | "medium" | "high";
|
|
1657
|
+
confidence?: number;
|
|
1658
|
+
workflow?: string;
|
|
1659
|
+
tags?: string[];
|
|
1660
|
+
evidenceWindowStart?: string;
|
|
1661
|
+
evidenceWindowEnd?: string;
|
|
1662
|
+
refs?: string[];
|
|
1663
|
+
}): Promise<unknown>;
|
|
1664
|
+
sharedPrioritiesAppend(request: {
|
|
1665
|
+
agentId: string;
|
|
1666
|
+
text: string;
|
|
1667
|
+
}): Promise<unknown>;
|
|
1668
|
+
sharedContextCrossSignalsRun(request: {
|
|
1669
|
+
date?: string;
|
|
1670
|
+
}): Promise<unknown>;
|
|
1671
|
+
sharedContextCurateDaily(request: {
|
|
1672
|
+
date?: string;
|
|
1673
|
+
}): Promise<unknown>;
|
|
1674
|
+
compoundingWeeklySynthesize(request: {
|
|
1675
|
+
weekId?: string;
|
|
1676
|
+
}): Promise<unknown>;
|
|
1677
|
+
compoundingPromoteCandidate(request: {
|
|
1678
|
+
weekId: string;
|
|
1679
|
+
candidateId: string;
|
|
1680
|
+
dryRun?: boolean;
|
|
1681
|
+
}): Promise<unknown>;
|
|
1682
|
+
compressionGuidelinesOptimize(request: {
|
|
1683
|
+
dryRun?: boolean;
|
|
1684
|
+
eventLimit?: number;
|
|
1685
|
+
}): Promise<unknown>;
|
|
1686
|
+
compressionGuidelinesActivate(request: {
|
|
1687
|
+
expectedContentHash?: string;
|
|
1688
|
+
expectedGuidelineVersion?: number;
|
|
1689
|
+
}): Promise<unknown>;
|
|
1690
|
+
/** Conservative identity anchor section merge (matches tools.ts mergeIdentityAnchor logic). */
|
|
1691
|
+
private mergeIdentityAnchorSections;
|
|
1692
|
+
memorySearch(request: {
|
|
1693
|
+
query: string;
|
|
1694
|
+
namespace?: string;
|
|
1695
|
+
maxResults?: number;
|
|
1696
|
+
collection?: string;
|
|
1697
|
+
principal?: string;
|
|
1698
|
+
}): Promise<{
|
|
1699
|
+
query: string;
|
|
1700
|
+
results: Array<{
|
|
1701
|
+
path: string;
|
|
1702
|
+
score: number;
|
|
1703
|
+
snippet: string;
|
|
1704
|
+
}>;
|
|
1705
|
+
count: number;
|
|
1706
|
+
}>;
|
|
1707
|
+
memoryProfile(namespace?: string, principal?: string): Promise<Record<string, unknown>>;
|
|
1708
|
+
memoryEntitiesList(namespace?: string, principal?: string): Promise<{
|
|
1709
|
+
entities: string[];
|
|
1710
|
+
count: number;
|
|
1711
|
+
}>;
|
|
1712
|
+
memoryQuestions(namespace?: string, principal?: string): Promise<{
|
|
1713
|
+
questions: Array<{
|
|
1714
|
+
id: string;
|
|
1715
|
+
question: string;
|
|
1716
|
+
resolved: boolean;
|
|
1717
|
+
}>;
|
|
1718
|
+
count: number;
|
|
1719
|
+
}>;
|
|
1720
|
+
lastRecallSnapshot(sessionKey?: string): Promise<unknown>;
|
|
1721
|
+
intentDebug(namespace?: string): Promise<unknown>;
|
|
1722
|
+
qmdDebug(namespace?: string): Promise<unknown>;
|
|
1723
|
+
graphExplainLastRecall(namespace?: string): Promise<unknown>;
|
|
1724
|
+
/**
|
|
1725
|
+
* Read-only graph snapshot for the admin pane (issue #691 PR 2/5).
|
|
1726
|
+
*
|
|
1727
|
+
* Reads adjacency from the JSONL edge store written by `GraphIndex` and
|
|
1728
|
+
* resolves node metadata via the namespaced storage manager. Namespace
|
|
1729
|
+
* resolution mirrors the read-side path used by `recall` /
|
|
1730
|
+
* `procedureStats`, so multi-principal deployments can't leak edges from
|
|
1731
|
+
* a peer namespace (CLAUDE.md rule 42).
|
|
1732
|
+
*/
|
|
1733
|
+
graphSnapshot(request: GraphSnapshotRequest & {
|
|
1734
|
+
namespace?: string;
|
|
1735
|
+
}, authenticatedPrincipal?: string): Promise<GraphSnapshotResponse>;
|
|
1736
|
+
memoryFeedback(request: {
|
|
1737
|
+
memoryId: string;
|
|
1738
|
+
vote: "up" | "down";
|
|
1739
|
+
note?: string;
|
|
1740
|
+
}): Promise<{
|
|
1741
|
+
recorded: boolean;
|
|
1742
|
+
enabled?: boolean;
|
|
1743
|
+
reason?: string;
|
|
1744
|
+
}>;
|
|
1745
|
+
/**
|
|
1746
|
+
* Record a Memory Worth outcome observation (issue #560 PR 3).
|
|
1747
|
+
*
|
|
1748
|
+
* This is distinct from `memoryFeedback` — feedback is a human thumbs
|
|
1749
|
+
* up/down on whether a recalled memory was relevant; outcome is an
|
|
1750
|
+
* automated signal about whether the session that consumed the memory
|
|
1751
|
+
* ultimately succeeded or failed. Outcomes feed the Laplace-smoothed
|
|
1752
|
+
* worth score (`computeMemoryWorth`, PR 2) that PR 4 will use to
|
|
1753
|
+
* downweight memories correlated with bad sessions.
|
|
1754
|
+
*
|
|
1755
|
+
* The underlying writer only touches fact-category memories. Corrections,
|
|
1756
|
+
* procedures, and other kinds return `{ ok: false, reason:
|
|
1757
|
+
* "ineligible_category" }` so a ledger drainer doesn't need to pre-filter.
|
|
1758
|
+
*/
|
|
1759
|
+
memoryOutcome(request: {
|
|
1760
|
+
memoryId: string;
|
|
1761
|
+
outcome: MemoryOutcomeKind;
|
|
1762
|
+
namespace?: string;
|
|
1763
|
+
principal?: string;
|
|
1764
|
+
sessionKey?: string;
|
|
1765
|
+
timestamp?: string;
|
|
1766
|
+
}): Promise<RecordMemoryOutcomeResult>;
|
|
1767
|
+
memoryPromote(request: {
|
|
1768
|
+
memoryId: string;
|
|
1769
|
+
namespace?: string;
|
|
1770
|
+
principal?: string;
|
|
1771
|
+
sessionKey?: string;
|
|
1772
|
+
}): Promise<unknown>;
|
|
1773
|
+
contextCheckpoint(request: {
|
|
1774
|
+
sessionKey: string;
|
|
1775
|
+
context: string;
|
|
1776
|
+
namespace?: string;
|
|
1777
|
+
principal?: string;
|
|
1778
|
+
}): Promise<{
|
|
1779
|
+
saved: boolean;
|
|
1780
|
+
}>;
|
|
1781
|
+
lcmStatus(): Promise<EngramAccessLcmStatusResponse>;
|
|
1782
|
+
/**
|
|
1783
|
+
* Record citation usage from an observed oai-mem-citation block.
|
|
1784
|
+
* For each citation entry, extract the memory ID from the path and
|
|
1785
|
+
* increment its access tracking via the orchestrator. Returns the
|
|
1786
|
+
* count of submitted IDs and the count of IDs that matched real memories.
|
|
1787
|
+
*/
|
|
1788
|
+
recordCitationUsage(request: {
|
|
1789
|
+
sessionId?: string;
|
|
1790
|
+
namespace?: string;
|
|
1791
|
+
authenticatedPrincipal?: string;
|
|
1792
|
+
entries: Array<{
|
|
1793
|
+
path: string;
|
|
1794
|
+
lineStart: number;
|
|
1795
|
+
lineEnd: number;
|
|
1796
|
+
note: string;
|
|
1797
|
+
}>;
|
|
1798
|
+
rolloutIds: string[];
|
|
1799
|
+
}): Promise<{
|
|
1800
|
+
submitted: number;
|
|
1801
|
+
matched: number;
|
|
1802
|
+
}>;
|
|
1803
|
+
/**
|
|
1804
|
+
* Gather a point-in-time `ConsoleStateSnapshot` from the orchestrator.
|
|
1805
|
+
*
|
|
1806
|
+
* Principal-aware: `resolveReadableNamespace` enforces ACL before the
|
|
1807
|
+
* snapshot is gathered, so callers cannot read a namespace they don't
|
|
1808
|
+
* have read access to (CLAUDE.md rule 42). The resolved namespace's
|
|
1809
|
+
* storage directory is forwarded as `config.memoryDir` so the ledger-
|
|
1810
|
+
* tail reader in `gatherConsoleState` scans the correct namespace root
|
|
1811
|
+
* rather than the global root. Read-only — never mutates orchestrator state.
|
|
1812
|
+
*/
|
|
1813
|
+
consoleState(namespace?: string, principal?: string): Promise<ConsoleStateSnapshot>;
|
|
1814
|
+
/**
|
|
1815
|
+
* List all registered peers. Returns the array of `Peer` objects in
|
|
1816
|
+
* deterministic alphabetical order (mirroring `listPeers` storage semantics).
|
|
1817
|
+
*/
|
|
1818
|
+
peerList(): Promise<{
|
|
1819
|
+
peers: Peer[];
|
|
1820
|
+
}>;
|
|
1821
|
+
/**
|
|
1822
|
+
* Get a single peer by id. Returns `{ found: false }` when the peer does
|
|
1823
|
+
* not exist rather than throwing, matching the `memoryGet` / `entityGet`
|
|
1824
|
+
* pattern used throughout the service.
|
|
1825
|
+
*/
|
|
1826
|
+
peerGet(peerId: string): Promise<{
|
|
1827
|
+
found: true;
|
|
1828
|
+
peer: Peer;
|
|
1829
|
+
} | {
|
|
1830
|
+
found: false;
|
|
1831
|
+
}>;
|
|
1832
|
+
/**
|
|
1833
|
+
* Upsert a peer. Writes `peers/{id}/identity.md`. On first write the
|
|
1834
|
+
* `createdAt` timestamp is set to now; on subsequent writes only
|
|
1835
|
+
* `displayName` and `notes` are mutated (kind and createdAt are immutable
|
|
1836
|
+
* once set, per the storage contract).
|
|
1837
|
+
*
|
|
1838
|
+
* Returns `{ created: true }` on first write, `{ created: false }` on update.
|
|
1839
|
+
*/
|
|
1840
|
+
peerSet(input: {
|
|
1841
|
+
id: string;
|
|
1842
|
+
kind?: string;
|
|
1843
|
+
displayName?: string;
|
|
1844
|
+
notes?: string;
|
|
1845
|
+
}): Promise<{
|
|
1846
|
+
ok: true;
|
|
1847
|
+
created: boolean;
|
|
1848
|
+
peer: Peer;
|
|
1849
|
+
}>;
|
|
1850
|
+
/**
|
|
1851
|
+
* Delete a peer by removing `peers/{id}/identity.md`. If the file does not
|
|
1852
|
+
* exist the call is a no-op (idempotent). The peer directory itself
|
|
1853
|
+
* (`peers/{id}/`) is intentionally left in place — profile and interaction
|
|
1854
|
+
* log data are not destroyed.
|
|
1855
|
+
*/
|
|
1856
|
+
peerDelete(peerId: string): Promise<{
|
|
1857
|
+
ok: true;
|
|
1858
|
+
deleted: boolean;
|
|
1859
|
+
}>;
|
|
1860
|
+
/**
|
|
1861
|
+
* Destructively purge the entire peer directory for a given peerId —
|
|
1862
|
+
* `identity.md`, `profile.md`, `interactions.log.md`, and any other
|
|
1863
|
+
* files in `peers/{id}/`. Requires `confirm: "yes"` to prevent
|
|
1864
|
+
* accidental invocation.
|
|
1865
|
+
*
|
|
1866
|
+
* This is the DESTRUCTIVE counterpart to `peerDelete`, which only
|
|
1867
|
+
* removes `identity.md`. All companion files are permanently removed.
|
|
1868
|
+
*
|
|
1869
|
+
* Returns `{ ok: true, purged: true }` when the directory existed and
|
|
1870
|
+
* was removed; `{ ok: true, purged: false }` when the directory did
|
|
1871
|
+
* not exist (idempotent no-op).
|
|
1872
|
+
*/
|
|
1873
|
+
peerForget(peerId: string, opts: {
|
|
1874
|
+
confirm: string;
|
|
1875
|
+
}): Promise<{
|
|
1876
|
+
ok: true;
|
|
1877
|
+
purged: boolean;
|
|
1878
|
+
}>;
|
|
1879
|
+
/**
|
|
1880
|
+
* Get the evolving cognitive profile for a peer. Returns `{ found: false }`
|
|
1881
|
+
* when no profile file exists yet (profile is written by the async reasoner,
|
|
1882
|
+
* PR 2/5). The peer identity itself need not exist for a profile to exist,
|
|
1883
|
+
* but in practice the reasoner only writes profiles for registered peers.
|
|
1884
|
+
*/
|
|
1885
|
+
peerProfileGet(peerId: string): Promise<{
|
|
1886
|
+
found: true;
|
|
1887
|
+
profile: PeerProfile;
|
|
1888
|
+
} | {
|
|
1889
|
+
found: false;
|
|
1890
|
+
}>;
|
|
1891
|
+
get memoryDir(): string;
|
|
1892
|
+
/**
|
|
1893
|
+
* Resolve the storage directory for a given namespace. Used by the SSE
|
|
1894
|
+
* graph-event handler to subscribe to the correct per-namespace bus rather
|
|
1895
|
+
* than the global root (CLAUDE.md rule 42 — read/write paths must resolve
|
|
1896
|
+
* through the same namespace layer).
|
|
1897
|
+
*
|
|
1898
|
+
* `principal` must be the transport-bound request principal (from
|
|
1899
|
+
* `resolveRequestPrincipal`). When namespaces are enabled, an absent
|
|
1900
|
+
* principal causes `resolveReadableNamespace` to throw an auth error,
|
|
1901
|
+
* matching the behaviour of every other authenticated read path.
|
|
1902
|
+
*
|
|
1903
|
+
* Falls back to `this.memoryDir` when namespaces are disabled or the
|
|
1904
|
+
* namespace is absent, matching the behaviour of every other read path.
|
|
1905
|
+
*/
|
|
1906
|
+
getMemoryDirForNamespace(namespace?: string, principal?: string): Promise<string>;
|
|
1907
|
+
get storageRef(): StorageManager;
|
|
1908
|
+
get configRef(): PluginConfig;
|
|
1909
|
+
get localLlmRef(): LocalLlmClient | null;
|
|
1910
|
+
get fallbackLlmRef(): FallbackLlmClient | null;
|
|
1911
|
+
get embeddingLookupFactoryRef(): (storage: StorageManager) => SemanticDedupLookup | undefined;
|
|
1912
|
+
/**
|
|
1913
|
+
* Import a capsule archive into the orchestrator's memory directory.
|
|
1914
|
+
*
|
|
1915
|
+
* Delegates directly to the standalone {@link importCapsuleFn} function.
|
|
1916
|
+
* The `root` parameter defaults to the orchestrator's `memoryDir` when
|
|
1917
|
+
* omitted, so callers that only have access to the service do not need to
|
|
1918
|
+
* thread the config value through.
|
|
1919
|
+
*
|
|
1920
|
+
* `versioning` defaults to the orchestrator's page-versioning config so
|
|
1921
|
+
* `mode: "overwrite"` automatically snapshots prior content without the
|
|
1922
|
+
* caller having to construct the config object.
|
|
1923
|
+
*/
|
|
1924
|
+
capsuleImport(opts: Omit<ImportCapsuleOptions, "root" | "memoryDir"> & {
|
|
1925
|
+
root?: string;
|
|
1926
|
+
memoryDir?: string;
|
|
1927
|
+
namespace?: string;
|
|
1928
|
+
principal?: string;
|
|
1929
|
+
}): Promise<ImportCapsuleResult>;
|
|
1930
|
+
private validateCapsuleImportArchivePath;
|
|
1931
|
+
private isCapsuleImportPathInputFsError;
|
|
1932
|
+
private isCapsuleImportArchiveInputError;
|
|
1933
|
+
/**
|
|
1934
|
+
* Export a capsule archive from the orchestrator's memory directory.
|
|
1935
|
+
*
|
|
1936
|
+
* HTTP and future MCP surfaces use this rather than calling the transfer
|
|
1937
|
+
* helper directly so namespace ACL checks stay consistent with the archive
|
|
1938
|
+
* write side effect. The exporter still owns archive construction and
|
|
1939
|
+
* validation.
|
|
1940
|
+
*/
|
|
1941
|
+
capsuleExport(opts: Omit<ExportCapsuleOptions, "root" | "memoryDir"> & {
|
|
1942
|
+
root?: string;
|
|
1943
|
+
memoryDir?: string;
|
|
1944
|
+
namespace?: string;
|
|
1945
|
+
principal?: string;
|
|
1946
|
+
}): Promise<ExportCapsuleResult>;
|
|
1947
|
+
/**
|
|
1948
|
+
* List capsule archives in the namespace-scoped capsule store.
|
|
1949
|
+
*
|
|
1950
|
+
* MCP uses this access-layer method instead of reading arbitrary paths so
|
|
1951
|
+
* capsule discovery remains bound to the same namespace ACLs as export and
|
|
1952
|
+
* import.
|
|
1953
|
+
*/
|
|
1954
|
+
capsuleList(options?: {
|
|
1955
|
+
namespace?: string;
|
|
1956
|
+
principal?: string;
|
|
1957
|
+
}): Promise<EngramAccessCapsuleListResponse>;
|
|
1958
|
+
/**
|
|
1959
|
+
* Return per-phase Dreams telemetry for the last N hours (default 24).
|
|
1960
|
+
*/
|
|
1961
|
+
dreamsStatus(options?: {
|
|
1962
|
+
windowHours?: number;
|
|
1963
|
+
namespace?: string;
|
|
1964
|
+
principal?: string;
|
|
1965
|
+
}): Promise<DreamsStatusResult>;
|
|
1966
|
+
/**
|
|
1967
|
+
* Manually invoke a single Dreams phase pass (PR 4/4).
|
|
1968
|
+
*
|
|
1969
|
+
* Deep-sleep delegates to memory governance (shadow → dry-run, apply → live).
|
|
1970
|
+
* Light-sleep and REM scan the observation ledger and memory corpus
|
|
1971
|
+
* respectively, returning the same telemetry shape as a scheduled run.
|
|
1972
|
+
*/
|
|
1973
|
+
dreamsRun(options: {
|
|
1974
|
+
phase: DreamsPhase;
|
|
1975
|
+
dryRun?: boolean;
|
|
1976
|
+
namespace?: string;
|
|
1977
|
+
authenticatedPrincipal?: string;
|
|
1978
|
+
}): Promise<DreamsRunResult>;
|
|
1979
|
+
}
|
|
1980
|
+
|
|
1981
|
+
export { type EngramAccessTrustZoneDemoSeedResponse as $, type EngramAccessMaintenanceResponse as A, type EngramAccessMemoryBrowseRequest as B, type CapsuleParent as C, type EngramAccessMemoryBrowseResponse as D, EngramAccessService as E, type EngramAccessMemoryRecord as F, type EngramAccessMemoryResponse as G, type EngramAccessMemoryStoreRequest as H, type ImportCapsuleResult as I, type EngramAccessMemorySummary as J, type EngramAccessObserveRequest as K, type EngramAccessObserveResponse as L, type EngramAccessQualityResponse as M, type EngramAccessRecallExplainRequest as N, type EngramAccessRecallExplainResponse as O, type PeerInteractionLogEntry as P, type EngramAccessRecallRequest as Q, type EngramAccessRecallResponse as R, type EngramAccessReviewDispositionRequest as S, type EngramAccessReviewDispositionResponse as T, type EngramAccessReviewQueueResponse as U, type EngramAccessSetCodingContextRequest as V, type EngramAccessSuggestionSubmitRequest as W, type EngramAccessTimelineResponse as X, type EngramAccessTrustZoneBrowseRequest as Y, type EngramAccessTrustZoneBrowseResponse as Z, type EngramAccessTrustZoneDemoSeedRequest as _, type Peer as a, type EngramAccessTrustZonePromoteRequest as a0, type EngramAccessTrustZonePromoteResponse as a1, type EngramAccessTrustZoneRecordSummary as a2, type EngramAccessTrustZoneStatusResponse as a3, type EngramAccessWriteEnvelope as a4, type EngramAccessWriteResponse as a5, shapeMemorySummary as a6, type PeerProfile as b, type ExportManifestV2 as c, EngramAccessInputError as d, PEER_ID_MAX_LENGTH as e, PEER_ID_PATTERN as f, type PeerKind as g, type PeerProfileFieldProvenance as h, type ProcedureStatsConfigSnapshot as i, type ProcedureStatsRecent as j, type ProcedureStatsReport as k, type ProcedureStatusCounts as l, computeProcedureStats as m, formatProcedureStatsText as n, ENGRAM_ACCESS_WRITE_SCHEMA_VERSION as o, type EngramAccessBriefingRequest as p, type EngramAccessBriefingResponse as q, type EngramAccessCapsuleListResponse as r, type EngramAccessDaySummaryRequest as s, type EngramAccessEntityListResponse as t, type EngramAccessEntityResponse as u, type EngramAccessEntitySummary as v, type EngramAccessHealthResponse as w, type EngramAccessLcmSearchRequest as x, type EngramAccessLcmSearchResponse as y, type EngramAccessLcmStatusResponse as z };
|