@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,84 @@
|
|
|
1
|
+
import { RecallDisclosure } from './types.js';
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* Recall disclosure auto-escalation policy (issue #677 PR 4/4).
|
|
5
|
+
*
|
|
6
|
+
* Pure helper that decides the *effective* disclosure depth for a recall
|
|
7
|
+
* given the configured policy and the observed top-K confidence. Lives
|
|
8
|
+
* outside `access-service.ts` so the decision logic can be unit-tested
|
|
9
|
+
* exhaustively without booting an orchestrator.
|
|
10
|
+
*
|
|
11
|
+
* Policy summary:
|
|
12
|
+
*
|
|
13
|
+
* manual (default):
|
|
14
|
+
* The caller's `disclosure` is honored verbatim. Auto-escalation
|
|
15
|
+
* does not run.
|
|
16
|
+
*
|
|
17
|
+
* auto:
|
|
18
|
+
* If the caller did NOT explicitly specify a disclosure (i.e. the
|
|
19
|
+
* value in use is the system default) AND the recall's top-K
|
|
20
|
+
* confidence falls below the configured threshold, escalate from
|
|
21
|
+
* `chunk` to `section`. `raw` is never auto-selected — it requires
|
|
22
|
+
* an explicit caller request because of its higher cost and the
|
|
23
|
+
* LCM-archive read paths it activates. If the caller explicitly
|
|
24
|
+
* passed a disclosure (even `chunk`), the policy respects that
|
|
25
|
+
* choice and does not escalate.
|
|
26
|
+
*
|
|
27
|
+
* The threshold compares against `final` from the top result's score
|
|
28
|
+
* decomposition. When the snapshot has no results or no scores, no
|
|
29
|
+
* escalation fires (`undefined` confidence is treated as "skip" rather
|
|
30
|
+
* than "always escalate").
|
|
31
|
+
*/
|
|
32
|
+
|
|
33
|
+
type DisclosureEscalationMode = "manual" | "auto";
|
|
34
|
+
declare const DISCLOSURE_ESCALATION_MODES: readonly DisclosureEscalationMode[];
|
|
35
|
+
declare function isDisclosureEscalationMode(value: unknown): value is DisclosureEscalationMode;
|
|
36
|
+
/**
|
|
37
|
+
* Threshold defaults — applied when config-side coercion produces an
|
|
38
|
+
* out-of-range or missing value. 0.5 is a deliberate midpoint:
|
|
39
|
+
* confidently-served recalls (top-K >= 0.5) stay on the cheap chunk
|
|
40
|
+
* tier; ambiguous recalls escalate to section.
|
|
41
|
+
*/
|
|
42
|
+
declare const DEFAULT_DISCLOSURE_ESCALATION_THRESHOLD = 0.5;
|
|
43
|
+
interface DisclosureEscalationDecision {
|
|
44
|
+
/** The disclosure depth the caller should use to shape the response. */
|
|
45
|
+
effective: RecallDisclosure;
|
|
46
|
+
/**
|
|
47
|
+
* `true` when the policy escalated from the original disclosure;
|
|
48
|
+
* `false` when the original was kept (either by manual mode, by
|
|
49
|
+
* caller explicit choice, or because confidence stayed above the
|
|
50
|
+
* threshold).
|
|
51
|
+
*/
|
|
52
|
+
escalated: boolean;
|
|
53
|
+
/**
|
|
54
|
+
* Human-readable reason for the decision. Always populated; surfaces
|
|
55
|
+
* in operator-facing telemetry / debug paths.
|
|
56
|
+
*/
|
|
57
|
+
reason: string;
|
|
58
|
+
}
|
|
59
|
+
interface DecideDisclosureEscalationInput {
|
|
60
|
+
/** The mode from config (`manual` | `auto`). */
|
|
61
|
+
mode: DisclosureEscalationMode;
|
|
62
|
+
/** Threshold in [0, 1]; values outside this range fall back to the default. */
|
|
63
|
+
threshold: number;
|
|
64
|
+
/** Disclosure resolved at request time (after default-fill). */
|
|
65
|
+
originalDisclosure: RecallDisclosure;
|
|
66
|
+
/**
|
|
67
|
+
* Whether the caller explicitly specified a disclosure value. Auto
|
|
68
|
+
* mode only acts when the caller did NOT specify, so explicit
|
|
69
|
+
* `chunk` requests are not silently upgraded.
|
|
70
|
+
*/
|
|
71
|
+
callerProvidedDisclosure: boolean;
|
|
72
|
+
/**
|
|
73
|
+
* Top-K confidence (`final` score from the highest-ranked result),
|
|
74
|
+
* or `undefined` when the snapshot has no scored results.
|
|
75
|
+
*/
|
|
76
|
+
topKConfidence: number | undefined;
|
|
77
|
+
}
|
|
78
|
+
/**
|
|
79
|
+
* Decide whether to escalate disclosure depth based on policy + signals.
|
|
80
|
+
* Pure function — no IO, no state.
|
|
81
|
+
*/
|
|
82
|
+
declare function decideDisclosureEscalation(input: DecideDisclosureEscalationInput): DisclosureEscalationDecision;
|
|
83
|
+
|
|
84
|
+
export { DEFAULT_DISCLOSURE_ESCALATION_THRESHOLD, DISCLOSURE_ESCALATION_MODES, type DecideDisclosureEscalationInput, type DisclosureEscalationDecision, type DisclosureEscalationMode, decideDisclosureEscalation, isDisclosureEscalationMode };
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import {
|
|
2
|
+
DEFAULT_DISCLOSURE_ESCALATION_THRESHOLD,
|
|
3
|
+
DISCLOSURE_ESCALATION_MODES,
|
|
4
|
+
decideDisclosureEscalation,
|
|
5
|
+
isDisclosureEscalationMode
|
|
6
|
+
} from "./chunk-H7XKCNR6.js";
|
|
7
|
+
import "./chunk-PZ5AY32C.js";
|
|
8
|
+
export {
|
|
9
|
+
DEFAULT_DISCLOSURE_ESCALATION_THRESHOLD,
|
|
10
|
+
DISCLOSURE_ESCALATION_MODES,
|
|
11
|
+
decideDisclosureEscalation,
|
|
12
|
+
isDisclosureEscalationMode
|
|
13
|
+
};
|
|
14
|
+
//# sourceMappingURL=recall-disclosure-escalation.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":[],"sourcesContent":[],"mappings":"","names":[]}
|
|
@@ -5,8 +5,11 @@ import {
|
|
|
5
5
|
toRecallExplainJson,
|
|
6
6
|
toRecallExplainText,
|
|
7
7
|
toRecallXraySnapshotFromLegacy
|
|
8
|
-
} from "./chunk-
|
|
8
|
+
} from "./chunk-LW2NMHDW.js";
|
|
9
9
|
import "./chunk-SOBJ6NEY.js";
|
|
10
|
+
import "./chunk-USFPPRAF.js";
|
|
11
|
+
import "./chunk-43EKP2UK.js";
|
|
12
|
+
import "./chunk-PZ5AY32C.js";
|
|
10
13
|
export {
|
|
11
14
|
parseRecallExplainFormat,
|
|
12
15
|
renderRecallExplain,
|
package/dist/recall-mmr.js
CHANGED
package/dist/recall-qos.js
CHANGED
package/dist/recall-state.d.ts
CHANGED
|
@@ -57,6 +57,13 @@ interface GraphRecallExpandedEntry {
|
|
|
57
57
|
hopDepth: number;
|
|
58
58
|
decayedWeight: number;
|
|
59
59
|
graphType: "entity" | "time" | "causal";
|
|
60
|
+
/**
|
|
61
|
+
* Issue #681 PR 3/3 — confidence of the edge that produced this entry's
|
|
62
|
+
* recorded provenance (strongest edge along the chosen entry path).
|
|
63
|
+
* Range `[0, 1]`. Optional so persisted snapshots from older builds
|
|
64
|
+
* round-trip through `clampGraphRecallExpandedEntries` without dropping.
|
|
65
|
+
*/
|
|
66
|
+
edgeConfidence?: number;
|
|
60
67
|
}
|
|
61
68
|
declare function clampGraphRecallExpandedEntries(entries: unknown, maxEntries?: number): GraphRecallExpandedEntry[];
|
|
62
69
|
interface TierMigrationCycleSummary {
|
package/dist/recall-state.js
CHANGED
|
@@ -2,8 +2,9 @@ import {
|
|
|
2
2
|
LastRecallStore,
|
|
3
3
|
TierMigrationStatusStore,
|
|
4
4
|
clampGraphRecallExpandedEntries
|
|
5
|
-
} from "./chunk-
|
|
5
|
+
} from "./chunk-WPGJYVUH.js";
|
|
6
6
|
import "./chunk-2ODBA7MQ.js";
|
|
7
|
+
import "./chunk-PZ5AY32C.js";
|
|
7
8
|
export {
|
|
8
9
|
LastRecallStore,
|
|
9
10
|
TierMigrationStatusStore,
|
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
import { RecallFilterTrace } from './recall-xray.js';
|
|
2
|
+
import './types.js';
|
|
3
|
+
|
|
4
|
+
type TagMatchMode = "any" | "all";
|
|
5
|
+
/**
|
|
6
|
+
* Coerce a caller-supplied `tagMatch` value to the allowed enum.
|
|
7
|
+
*
|
|
8
|
+
* - `undefined` / `null` → `undefined` (caller didn't ask).
|
|
9
|
+
* - Valid string → narrowed `TagMatchMode`.
|
|
10
|
+
* - Invalid string → throws (CLAUDE.md rule 51 — never silently default).
|
|
11
|
+
*/
|
|
12
|
+
declare function parseTagMatch(value: unknown): TagMatchMode | undefined;
|
|
13
|
+
/**
|
|
14
|
+
* Coerce a caller-supplied `tags` value into a clean string[].
|
|
15
|
+
*
|
|
16
|
+
* Accepts `string[]` and discards non-string / empty entries. Returns
|
|
17
|
+
* `undefined` when no usable tags remain so downstream callers can treat
|
|
18
|
+
* "no filter" and "empty filter" identically.
|
|
19
|
+
*/
|
|
20
|
+
declare function normalizeTags(value: unknown): string[] | undefined;
|
|
21
|
+
interface TagFilterInput {
|
|
22
|
+
tags: string[] | undefined;
|
|
23
|
+
tagMatch: TagMatchMode | undefined;
|
|
24
|
+
}
|
|
25
|
+
interface TagFilterDecision {
|
|
26
|
+
/** Whether the candidate's tags satisfy the filter. */
|
|
27
|
+
admitted: boolean;
|
|
28
|
+
}
|
|
29
|
+
/**
|
|
30
|
+
* Decide whether a single result's tags satisfy the filter.
|
|
31
|
+
*
|
|
32
|
+
* `any` (default) admits when the result has at least one of the filter
|
|
33
|
+
* tags. `all` admits only when every filter tag is present on the result.
|
|
34
|
+
* Returns `admitted: true` whenever no filter tags are configured.
|
|
35
|
+
*/
|
|
36
|
+
declare function evaluateTagFilter(candidateTags: string[] | undefined, filter: TagFilterInput): TagFilterDecision;
|
|
37
|
+
interface TaggedResult {
|
|
38
|
+
tags: string[];
|
|
39
|
+
}
|
|
40
|
+
/**
|
|
41
|
+
* Apply the tag filter to an array of recall results.
|
|
42
|
+
*
|
|
43
|
+
* Returns `{results, trace}`:
|
|
44
|
+
* - `results` is the filtered array (or the original when no filter).
|
|
45
|
+
* - `trace` is a `RecallFilterTrace` capturing how many candidates were
|
|
46
|
+
* seen vs admitted, suitable for surfacing in X-ray output.
|
|
47
|
+
*
|
|
48
|
+
* `trace` is `null` when no filter tags were configured so callers can
|
|
49
|
+
* skip emitting an empty trace entry.
|
|
50
|
+
*/
|
|
51
|
+
declare function applyTagFilter<T extends TaggedResult>(results: T[], filter: TagFilterInput): {
|
|
52
|
+
results: T[];
|
|
53
|
+
trace: RecallFilterTrace | null;
|
|
54
|
+
};
|
|
55
|
+
|
|
56
|
+
export { type TagFilterDecision, type TagFilterInput, type TagMatchMode, type TaggedResult, applyTagFilter, evaluateTagFilter, normalizeTags, parseTagMatch };
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import {
|
|
2
|
+
applyTagFilter,
|
|
3
|
+
evaluateTagFilter,
|
|
4
|
+
normalizeTags,
|
|
5
|
+
parseTagMatch
|
|
6
|
+
} from "./chunk-BT7NVCML.js";
|
|
7
|
+
import "./chunk-PZ5AY32C.js";
|
|
8
|
+
export {
|
|
9
|
+
applyTagFilter,
|
|
10
|
+
evaluateTagFilter,
|
|
11
|
+
normalizeTags,
|
|
12
|
+
parseTagMatch
|
|
13
|
+
};
|
|
14
|
+
//# sourceMappingURL=recall-tag-filter.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":[],"sourcesContent":[],"mappings":"","names":[]}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { RecallXrayFormat } from './recall-xray-renderer.js';
|
|
2
|
+
import { RecallDisclosure } from './types.js';
|
|
2
3
|
import './recall-xray.js';
|
|
3
|
-
import './types.js';
|
|
4
4
|
|
|
5
5
|
/**
|
|
6
6
|
* Input-validation helpers for the `remnic xray` CLI command (issue
|
|
@@ -22,7 +22,14 @@ interface ParsedXrayCliOptions {
|
|
|
22
22
|
namespace?: string;
|
|
23
23
|
/** Trimmed, tilde-unexpanded output path, or undefined when stdout. */
|
|
24
24
|
outPath?: string;
|
|
25
|
+
/** Disclosure depth for X-ray telemetry, or undefined when not specified. */
|
|
26
|
+
disclosure?: RecallDisclosure;
|
|
25
27
|
}
|
|
28
|
+
/**
|
|
29
|
+
* Validate and coerce `--disclosure <level>`. Must be one of the
|
|
30
|
+
* canonical levels; throws a listed-options error otherwise.
|
|
31
|
+
*/
|
|
32
|
+
declare function parseXrayDisclosureFlag(value: unknown): RecallDisclosure | undefined;
|
|
26
33
|
/**
|
|
27
34
|
* Validate and coerce `--budget <chars>`. Must be a positive integer;
|
|
28
35
|
* throws a listed-options error otherwise.
|
|
@@ -37,4 +44,4 @@ declare function parseXrayCliOptions(rawQuery: unknown, options: Record<string,
|
|
|
37
44
|
query: string;
|
|
38
45
|
} & ParsedXrayCliOptions;
|
|
39
46
|
|
|
40
|
-
export { type ParsedXrayCliOptions, parseXrayBudgetFlag, parseXrayCliOptions };
|
|
47
|
+
export { type ParsedXrayCliOptions, parseXrayBudgetFlag, parseXrayCliOptions, parseXrayDisclosureFlag };
|
package/dist/recall-xray-cli.js
CHANGED
|
@@ -1,11 +1,16 @@
|
|
|
1
1
|
import {
|
|
2
2
|
parseXrayBudgetFlag,
|
|
3
|
-
parseXrayCliOptions
|
|
4
|
-
|
|
5
|
-
|
|
3
|
+
parseXrayCliOptions,
|
|
4
|
+
parseXrayDisclosureFlag
|
|
5
|
+
} from "./chunk-SMA4IMHV.js";
|
|
6
|
+
import "./chunk-LW2NMHDW.js";
|
|
6
7
|
import "./chunk-SOBJ6NEY.js";
|
|
8
|
+
import "./chunk-USFPPRAF.js";
|
|
9
|
+
import "./chunk-43EKP2UK.js";
|
|
10
|
+
import "./chunk-PZ5AY32C.js";
|
|
7
11
|
export {
|
|
8
12
|
parseXrayBudgetFlag,
|
|
9
|
-
parseXrayCliOptions
|
|
13
|
+
parseXrayCliOptions,
|
|
14
|
+
parseXrayDisclosureFlag
|
|
10
15
|
};
|
|
11
16
|
//# sourceMappingURL=recall-xray-cli.js.map
|
|
@@ -5,8 +5,11 @@ import {
|
|
|
5
5
|
renderXrayJson,
|
|
6
6
|
renderXrayMarkdown,
|
|
7
7
|
renderXrayText
|
|
8
|
-
} from "./chunk-
|
|
8
|
+
} from "./chunk-LW2NMHDW.js";
|
|
9
9
|
import "./chunk-SOBJ6NEY.js";
|
|
10
|
+
import "./chunk-USFPPRAF.js";
|
|
11
|
+
import "./chunk-43EKP2UK.js";
|
|
12
|
+
import "./chunk-PZ5AY32C.js";
|
|
10
13
|
export {
|
|
11
14
|
RECALL_XRAY_FORMATS,
|
|
12
15
|
parseXrayFormat,
|
package/dist/recall-xray.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { RecallTierExplain } from './types.js';
|
|
1
|
+
import { RecallTierExplain, RecallDisclosure } from './types.js';
|
|
2
2
|
|
|
3
3
|
/**
|
|
4
4
|
* Recall X-ray snapshot schema (issue #570, PR 1).
|
|
@@ -19,6 +19,38 @@ import { RecallTierExplain } from './types.js';
|
|
|
19
19
|
* fork formatting logic into other surfaces; extend the renderer.
|
|
20
20
|
*/
|
|
21
21
|
|
|
22
|
+
/**
|
|
23
|
+
* Estimate token cost of a payload at the rough ~4 chars/token English
|
|
24
|
+
* heuristic. Non-negative integer; returns 0 for empty / null input.
|
|
25
|
+
* Used by recall surfaces to attach `estimatedTokens` to X-ray results
|
|
26
|
+
* (issue #677 PR 3/4). Identical to the private heuristic in
|
|
27
|
+
* `chunking.ts`; kept self-contained here so X-ray callers don't pull
|
|
28
|
+
* in chunking internals.
|
|
29
|
+
*/
|
|
30
|
+
declare function estimateRecallTokens(text: string | null | undefined): number;
|
|
31
|
+
/**
|
|
32
|
+
* Aggregated per-disclosure token spend summary, computed by the
|
|
33
|
+
* renderer from a snapshot's results. Non-negative integers.
|
|
34
|
+
*/
|
|
35
|
+
interface RecallXrayDisclosureSummary {
|
|
36
|
+
chunk: {
|
|
37
|
+
count: number;
|
|
38
|
+
estimatedTokens: number;
|
|
39
|
+
};
|
|
40
|
+
section: {
|
|
41
|
+
count: number;
|
|
42
|
+
estimatedTokens: number;
|
|
43
|
+
};
|
|
44
|
+
raw: {
|
|
45
|
+
count: number;
|
|
46
|
+
estimatedTokens: number;
|
|
47
|
+
};
|
|
48
|
+
/** Number of results without a recorded disclosure level. */
|
|
49
|
+
unspecified: {
|
|
50
|
+
count: number;
|
|
51
|
+
estimatedTokens: number;
|
|
52
|
+
};
|
|
53
|
+
}
|
|
22
54
|
/**
|
|
23
55
|
* Which retrieval source produced a given result. This is the X-ray
|
|
24
56
|
* tier ladder called out in issue #570 and is *distinct* from the
|
|
@@ -46,6 +78,8 @@ interface RecallXrayScoreDecomposition {
|
|
|
46
78
|
importance?: number;
|
|
47
79
|
mmrPenalty?: number;
|
|
48
80
|
tierPrior?: number;
|
|
81
|
+
/** Additive boost from `reinforcement_count` frontmatter (issue #687 PR 3/4). */
|
|
82
|
+
reinforcementBoost?: number;
|
|
49
83
|
final: number;
|
|
50
84
|
}
|
|
51
85
|
/**
|
|
@@ -57,6 +91,17 @@ interface RecallXrayResult {
|
|
|
57
91
|
servedBy: RecallXrayServedBy;
|
|
58
92
|
scoreDecomposition: RecallXrayScoreDecomposition;
|
|
59
93
|
graphPath?: string[];
|
|
94
|
+
/**
|
|
95
|
+
* Issue #681 PR 3/3 — per-edge confidence values aligned with
|
|
96
|
+
* `graphPath`. When present, `graphEdgeConfidences[i]` is the
|
|
97
|
+
* confidence of the edge between `graphPath[i]` and `graphPath[i+1]`,
|
|
98
|
+
* so the array length is one less than `graphPath`. Legacy edges
|
|
99
|
+
* without a recorded confidence render as `1.0`. Operators use this
|
|
100
|
+
* to attribute floor-pruning and PageRank ranking decisions back to
|
|
101
|
+
* specific edges. The renderer drops the line when the array is
|
|
102
|
+
* empty or absent so legacy snapshots round-trip cleanly.
|
|
103
|
+
*/
|
|
104
|
+
graphEdgeConfidences?: number[];
|
|
60
105
|
auditEntryId?: string;
|
|
61
106
|
/** Human-readable list of filters the candidate *passed*. */
|
|
62
107
|
admittedBy: string[];
|
|
@@ -67,6 +112,32 @@ interface RecallXrayResult {
|
|
|
67
112
|
* before the rejecting gate; consumers should render both.
|
|
68
113
|
*/
|
|
69
114
|
rejectedBy?: string;
|
|
115
|
+
/**
|
|
116
|
+
* Disclosure depth used to render this result's payload (issue #677
|
|
117
|
+
* PR 3/4). Mirrors the per-result disclosure already exposed in the
|
|
118
|
+
* recall response so X-ray consumers can attribute token spend to
|
|
119
|
+
* the depth that produced it.
|
|
120
|
+
*/
|
|
121
|
+
disclosure?: RecallDisclosure;
|
|
122
|
+
/**
|
|
123
|
+
* Estimated token cost of the rendered payload at the chosen
|
|
124
|
+
* disclosure depth. Non-negative integer. Computed by callers via
|
|
125
|
+
* `estimateRecallTokens(text)`; the renderer aggregates these into
|
|
126
|
+
* a per-disclosure summary so operators can see where their budget
|
|
127
|
+
* went.
|
|
128
|
+
*/
|
|
129
|
+
estimatedTokens?: number;
|
|
130
|
+
/**
|
|
131
|
+
* Free-form tags from the memory's YAML frontmatter (issue #689 PR 3/3).
|
|
132
|
+
* Populated by the X-ray capture path when the caller passes a `tags`
|
|
133
|
+
* filter so per-result tags are available alongside the filter trace
|
|
134
|
+
* in `snapshot.filters`. Also populated without a filter when the
|
|
135
|
+
* orchestrator decorates results via `xrayCapture: true` so all X-ray
|
|
136
|
+
* consumers can inspect memory labels without a separate storage read.
|
|
137
|
+
* Absent (not `[]`) when the frontmatter has no tags or the memory
|
|
138
|
+
* could not be read.
|
|
139
|
+
*/
|
|
140
|
+
tags?: string[];
|
|
70
141
|
}
|
|
71
142
|
/**
|
|
72
143
|
* Trace entry for a filter the orchestrator evaluated during recall.
|
|
@@ -81,6 +152,27 @@ interface RecallFilterTrace {
|
|
|
81
152
|
/** Optional human-readable reason for any rejections. */
|
|
82
153
|
reason?: string;
|
|
83
154
|
}
|
|
155
|
+
/**
|
|
156
|
+
* Peer-profile injection annotation (issue #679 completion).
|
|
157
|
+
*
|
|
158
|
+
* When `peerProfileRecallEnabled` is true and a peer is registered for
|
|
159
|
+
* the session, the orchestrator injects a `## Peer Profile` section into
|
|
160
|
+
* the recall context. This annotation records which peer was injected and
|
|
161
|
+
* how many profile fields were included so operators can correlate
|
|
162
|
+
* retrieval quality with peer-context enrichment.
|
|
163
|
+
*
|
|
164
|
+
* `null` means no peer profile was injected (peer not registered, feature
|
|
165
|
+
* disabled, or peer has no profile fields).
|
|
166
|
+
*/
|
|
167
|
+
interface RecallXrayPeerProfileInjection {
|
|
168
|
+
/** The peer id whose profile was injected. */
|
|
169
|
+
peerId: string;
|
|
170
|
+
/**
|
|
171
|
+
* Number of profile fields included after the `peerProfileRecallMaxFields`
|
|
172
|
+
* cap was applied. Zero means the profile existed but had no fields.
|
|
173
|
+
*/
|
|
174
|
+
fieldsInjected: number;
|
|
175
|
+
}
|
|
84
176
|
/**
|
|
85
177
|
* The unified X-ray snapshot. CLI, HTTP, and MCP surfaces all render
|
|
86
178
|
* this same shape through the shared renderer (CLAUDE.md rule 22).
|
|
@@ -114,6 +206,13 @@ interface RecallXraySnapshot {
|
|
|
114
206
|
sessionKey?: string;
|
|
115
207
|
namespace?: string;
|
|
116
208
|
traceId?: string;
|
|
209
|
+
/**
|
|
210
|
+
* Peer-profile injection metadata (issue #679 completion).
|
|
211
|
+
* Non-null when `peerProfileRecallEnabled` is true and a peer profile
|
|
212
|
+
* was successfully injected into this recall's context. `null` (or
|
|
213
|
+
* absent) means no peer profile was injected.
|
|
214
|
+
*/
|
|
215
|
+
peerProfileInjection?: RecallXrayPeerProfileInjection | null;
|
|
117
216
|
}
|
|
118
217
|
interface BuildXraySnapshotInput {
|
|
119
218
|
query: string;
|
|
@@ -127,6 +226,8 @@ interface BuildXraySnapshotInput {
|
|
|
127
226
|
sessionKey?: string;
|
|
128
227
|
namespace?: string;
|
|
129
228
|
traceId?: string;
|
|
229
|
+
/** Peer-profile injection metadata (issue #679 completion). */
|
|
230
|
+
peerProfileInjection?: RecallXrayPeerProfileInjection | null;
|
|
130
231
|
/** Optional injected timestamp for deterministic tests. */
|
|
131
232
|
now?: () => number;
|
|
132
233
|
/** Optional injected id generator for deterministic tests. */
|
|
@@ -155,6 +256,7 @@ declare class RecallXrayBuilder {
|
|
|
155
256
|
private readonly filters;
|
|
156
257
|
private budgetChars;
|
|
157
258
|
private budgetUsed;
|
|
259
|
+
private peerProfileInjection;
|
|
158
260
|
constructor(opts: {
|
|
159
261
|
query: string;
|
|
160
262
|
sessionKey?: string;
|
|
@@ -168,6 +270,12 @@ declare class RecallXrayBuilder {
|
|
|
168
270
|
chars?: number;
|
|
169
271
|
used?: number;
|
|
170
272
|
}): void;
|
|
273
|
+
/**
|
|
274
|
+
* Record peer-profile injection metadata for this recall snapshot
|
|
275
|
+
* (issue #679 completion). Pass `null` to explicitly record that no
|
|
276
|
+
* injection happened (feature enabled but no peer / no profile fields).
|
|
277
|
+
*/
|
|
278
|
+
setPeerProfileInjection(injection: RecallXrayPeerProfileInjection | null): void;
|
|
171
279
|
recordResult(result: RecallXrayResult): void;
|
|
172
280
|
recordFilter(filter: RecallFilterTrace): void;
|
|
173
281
|
build(opts?: {
|
|
@@ -175,5 +283,11 @@ declare class RecallXrayBuilder {
|
|
|
175
283
|
snapshotIdGenerator?: () => string;
|
|
176
284
|
}): RecallXraySnapshot;
|
|
177
285
|
}
|
|
286
|
+
/**
|
|
287
|
+
* Summarize per-disclosure token spend across an X-ray snapshot's
|
|
288
|
+
* results. Pure helper — used by the markdown renderer to print a
|
|
289
|
+
* "per-disclosure token spend" line and exposed for tests / surfaces.
|
|
290
|
+
*/
|
|
291
|
+
declare function summarizeDisclosureTokens(results: ReadonlyArray<RecallXrayResult>): RecallXrayDisclosureSummary;
|
|
178
292
|
|
|
179
|
-
export { type BuildXraySnapshotInput, RECALL_XRAY_SERVED_BY_VALUES, type RecallFilterTrace, RecallXrayBuilder, type RecallXrayResult, type RecallXrayScoreDecomposition, type RecallXrayServedBy, type RecallXraySnapshot, buildXraySnapshot, isRecallXrayServedBy };
|
|
293
|
+
export { type BuildXraySnapshotInput, RECALL_XRAY_SERVED_BY_VALUES, type RecallFilterTrace, RecallXrayBuilder, type RecallXrayDisclosureSummary, type RecallXrayPeerProfileInjection, type RecallXrayResult, type RecallXrayScoreDecomposition, type RecallXrayServedBy, type RecallXraySnapshot, buildXraySnapshot, estimateRecallTokens, isRecallXrayServedBy, summarizeDisclosureTokens };
|
package/dist/recall-xray.js
CHANGED
|
@@ -2,12 +2,18 @@ import {
|
|
|
2
2
|
RECALL_XRAY_SERVED_BY_VALUES,
|
|
3
3
|
RecallXrayBuilder,
|
|
4
4
|
buildXraySnapshot,
|
|
5
|
-
|
|
6
|
-
|
|
5
|
+
estimateRecallTokens,
|
|
6
|
+
isRecallXrayServedBy,
|
|
7
|
+
summarizeDisclosureTokens
|
|
8
|
+
} from "./chunk-USFPPRAF.js";
|
|
9
|
+
import "./chunk-43EKP2UK.js";
|
|
10
|
+
import "./chunk-PZ5AY32C.js";
|
|
7
11
|
export {
|
|
8
12
|
RECALL_XRAY_SERVED_BY_VALUES,
|
|
9
13
|
RecallXrayBuilder,
|
|
10
14
|
buildXraySnapshot,
|
|
11
|
-
|
|
15
|
+
estimateRecallTokens,
|
|
16
|
+
isRecallXrayServedBy,
|
|
17
|
+
summarizeDisclosureTokens
|
|
12
18
|
};
|
|
13
19
|
//# sourceMappingURL=recall-xray.js.map
|
package/dist/reconstruct.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/release-changelog.ts"],"sourcesContent":["export interface PromoteUnreleasedChangelogOptions {\n version: string;\n date: string;\n}\n\nexport function promoteUnreleasedChangelog(\n changelog: string,\n options: PromoteUnreleasedChangelogOptions,\n): string {\n const unreleasedMarker = \"## [Unreleased]\";\n const unreleasedIndex = changelog.indexOf(unreleasedMarker);\n if (unreleasedIndex === -1) {\n throw new Error(\"CHANGELOG.md is missing the Unreleased section\");\n }\n\n const afterMarker = changelog.slice(unreleasedIndex + unreleasedMarker.length);\n const nextSectionMatch = afterMarker.match(/\\n## \\[/);\n const unreleasedEnd =\n nextSectionMatch == null\n ? changelog.length\n : unreleasedIndex + unreleasedMarker.length + (nextSectionMatch.index ?? 0);\n\n const before = changelog.slice(0, unreleasedIndex + unreleasedMarker.length);\n const unreleasedBody = changelog.slice(unreleasedIndex + unreleasedMarker.length, unreleasedEnd);\n const after = changelog.slice(unreleasedEnd);\n\n if (unreleasedBody.trim().length === 0) {\n return changelog;\n }\n\n const normalizedVersion = options.version.replace(/^v/i, \"\");\n const normalizedBody = unreleasedBody.replace(/^\\n+/, \"\").replace(/\\n+$/, \"\");\n const releaseSection = `\\n\\n## [v${normalizedVersion}] - ${options.date}\\n\\n${normalizedBody}\\n`;\n return `${before}${releaseSection}${after}`;\n}\n"],"mappings":"
|
|
1
|
+
{"version":3,"sources":["../src/release-changelog.ts"],"sourcesContent":["export interface PromoteUnreleasedChangelogOptions {\n version: string;\n date: string;\n}\n\nexport function promoteUnreleasedChangelog(\n changelog: string,\n options: PromoteUnreleasedChangelogOptions,\n): string {\n const unreleasedMarker = \"## [Unreleased]\";\n const unreleasedIndex = changelog.indexOf(unreleasedMarker);\n if (unreleasedIndex === -1) {\n throw new Error(\"CHANGELOG.md is missing the Unreleased section\");\n }\n\n const afterMarker = changelog.slice(unreleasedIndex + unreleasedMarker.length);\n const nextSectionMatch = afterMarker.match(/\\n## \\[/);\n const unreleasedEnd =\n nextSectionMatch == null\n ? changelog.length\n : unreleasedIndex + unreleasedMarker.length + (nextSectionMatch.index ?? 0);\n\n const before = changelog.slice(0, unreleasedIndex + unreleasedMarker.length);\n const unreleasedBody = changelog.slice(unreleasedIndex + unreleasedMarker.length, unreleasedEnd);\n const after = changelog.slice(unreleasedEnd);\n\n if (unreleasedBody.trim().length === 0) {\n return changelog;\n }\n\n const normalizedVersion = options.version.replace(/^v/i, \"\");\n const normalizedBody = unreleasedBody.replace(/^\\n+/, \"\").replace(/\\n+$/, \"\");\n const releaseSection = `\\n\\n## [v${normalizedVersion}] - ${options.date}\\n\\n${normalizedBody}\\n`;\n return `${before}${releaseSection}${after}`;\n}\n"],"mappings":";;;AAKO,SAAS,2BACd,WACA,SACQ;AACR,QAAM,mBAAmB;AACzB,QAAM,kBAAkB,UAAU,QAAQ,gBAAgB;AAC1D,MAAI,oBAAoB,IAAI;AAC1B,UAAM,IAAI,MAAM,gDAAgD;AAAA,EAClE;AAEA,QAAM,cAAc,UAAU,MAAM,kBAAkB,iBAAiB,MAAM;AAC7E,QAAM,mBAAmB,YAAY,MAAM,SAAS;AACpD,QAAM,gBACJ,oBAAoB,OAChB,UAAU,SACV,kBAAkB,iBAAiB,UAAU,iBAAiB,SAAS;AAE7E,QAAM,SAAS,UAAU,MAAM,GAAG,kBAAkB,iBAAiB,MAAM;AAC3E,QAAM,iBAAiB,UAAU,MAAM,kBAAkB,iBAAiB,QAAQ,aAAa;AAC/F,QAAM,QAAQ,UAAU,MAAM,aAAa;AAE3C,MAAI,eAAe,KAAK,EAAE,WAAW,GAAG;AACtC,WAAO;AAAA,EACT;AAEA,QAAM,oBAAoB,QAAQ,QAAQ,QAAQ,OAAO,EAAE;AAC3D,QAAM,iBAAiB,eAAe,QAAQ,QAAQ,EAAE,EAAE,QAAQ,QAAQ,EAAE;AAC5E,QAAM,iBAAiB;AAAA;AAAA,OAAY,iBAAiB,OAAO,QAAQ,IAAI;AAAA;AAAA,EAAO,cAAc;AAAA;AAC5F,SAAO,GAAG,MAAM,GAAG,cAAc,GAAG,KAAK;AAC3C;","names":[]}
|
package/dist/relevance.js
CHANGED
package/dist/rerank.js
CHANGED
|
@@ -5,6 +5,7 @@ import {
|
|
|
5
5
|
import {
|
|
6
6
|
log
|
|
7
7
|
} from "./chunk-2ODBA7MQ.js";
|
|
8
|
+
import "./chunk-PZ5AY32C.js";
|
|
8
9
|
|
|
9
10
|
// src/contradiction/resolution.ts
|
|
10
11
|
var VALID_VERBS = ["keep-a", "keep-b", "merge", "both-valid", "needs-more-context"];
|
|
@@ -97,4 +98,4 @@ export {
|
|
|
97
98
|
executeResolution,
|
|
98
99
|
isValidResolutionVerb
|
|
99
100
|
};
|
|
100
|
-
//# sourceMappingURL=resolution-
|
|
101
|
+
//# sourceMappingURL=resolution-YGIBORXI.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/contradiction/resolution.ts"],"sourcesContent":["/**\n * Resolution Verbs — executes user-chosen resolution actions on contradiction pairs (issue #520).\n *\n * All resolution paths delegate to StorageManager.supersedeMemory. Do not\n * reimplement supersession logic here (rule 22: deduplicate resolution).\n */\n\nimport type { StorageManager } from \"../storage.js\";\nimport type { ResolutionVerb } from \"./contradiction-review.js\";\nimport { resolvePair, readPair } from \"./contradiction-review.js\";\nimport { log } from \"../logger.js\";\n\nexport interface ResolutionResult {\n pairId: string;\n verb: ResolutionVerb;\n /** Memory IDs affected by the resolution. */\n affectedIds: string[];\n /** Human-readable status. */\n message: string;\n}\n\nconst VALID_VERBS: ResolutionVerb[] = [\"keep-a\", \"keep-b\", \"merge\", \"both-valid\", \"needs-more-context\"];\n\nexport function isValidResolutionVerb(value: string): value is ResolutionVerb {\n return VALID_VERBS.includes(value as ResolutionVerb);\n}\n\n/**\n * Execute a resolution verb on a contradiction pair.\n *\n * - `keep-a`: Supersede B, keep A active.\n * - `keep-b`: Supersede A, keep B active.\n * - `merge`: Mark both as superseded by a synthetic merged ID.\n * - `both-valid`: Mark pair as reviewed; no memories are superseded.\n * - `needs-more-context`: Defer; no action, short cooldown.\n */\nexport async function executeResolution(\n memoryDir: string,\n storage: StorageManager,\n pairId: string,\n verb: ResolutionVerb,\n): Promise<ResolutionResult> {\n const pair = readPair(memoryDir, pairId);\n if (!pair) {\n return { pairId, verb, affectedIds: [], message: `Pair ${pairId} not found` };\n }\n\n if (pair.resolution) {\n return { pairId, verb, affectedIds: [], message: `Pair already resolved with verb \"${pair.resolution}\"` };\n }\n\n const [idA, idB] = pair.memoryIds;\n const affectedIds: string[] = [];\n let message = \"\";\n let supersedeFailed = false;\n\n switch (verb) {\n case \"keep-a\": {\n const ok = await supersedeSafe(storage, idB, idA, \"contradiction-resolution:keep-a\");\n if (ok) { affectedIds.push(idB); message = `Kept ${idA}, superseded ${idB}`; }\n else { supersedeFailed = true; message = `Supersede failed for ${idB}; not resolving`; }\n break;\n }\n case \"keep-b\": {\n const ok = await supersedeSafe(storage, idA, idB, \"contradiction-resolution:keep-b\");\n if (ok) { affectedIds.push(idA); message = `Kept ${idB}, superseded ${idA}`; }\n else { supersedeFailed = true; message = `Supersede failed for ${idA}; not resolving`; }\n break;\n }\n case \"merge\": {\n const mergedId = `merged-${pairId}`;\n const okA = await supersedeSafe(storage, idA, mergedId, \"contradiction-resolution:merge\");\n const okB = await supersedeSafe(storage, idB, mergedId, \"contradiction-resolution:merge\");\n if (okA) affectedIds.push(idA);\n if (okB) affectedIds.push(idB);\n if (!okA || !okB) {\n supersedeFailed = true;\n message = `Merge incomplete: ${affectedIds.length}/2 superseded; not resolving to allow retry`;\n } else {\n message = `Both memories superseded by merged ${mergedId}`;\n }\n break;\n }\n case \"both-valid\": {\n message = \"Pair marked as both-valid; cooldown applied\";\n break;\n }\n case \"needs-more-context\": {\n message = \"Deferred; no action taken, short cooldown applied\";\n break;\n }\n }\n\n if (!supersedeFailed) {\n resolvePair(memoryDir, pairId, verb);\n }\n log.info(\"[contradiction-resolution] pair=%s verb=%s affected=%d\", pairId, verb, affectedIds.length);\n return { pairId, verb, affectedIds, message };\n}\n\nasync function supersedeSafe(\n storage: StorageManager,\n oldId: string,\n newId: string,\n reason: string,\n): Promise<boolean> {\n try {\n const result = await storage.supersedeMemory(oldId, newId, reason);\n if (result === false) {\n log.warn(\"[contradiction-resolution] supersede returned false for %s → %s\", oldId, newId);\n return false;\n }\n return true;\n } catch (err) {\n log.warn(\n \"[contradiction-resolution] supersede failed %s → %s: %s\",\n oldId,\n newId,\n err instanceof Error ? err.message : err,\n );\n return false;\n }\n}\n"],"mappings":"
|
|
1
|
+
{"version":3,"sources":["../src/contradiction/resolution.ts"],"sourcesContent":["/**\n * Resolution Verbs — executes user-chosen resolution actions on contradiction pairs (issue #520).\n *\n * All resolution paths delegate to StorageManager.supersedeMemory. Do not\n * reimplement supersession logic here (rule 22: deduplicate resolution).\n */\n\nimport type { StorageManager } from \"../storage.js\";\nimport type { ResolutionVerb } from \"./contradiction-review.js\";\nimport { resolvePair, readPair } from \"./contradiction-review.js\";\nimport { log } from \"../logger.js\";\n\nexport interface ResolutionResult {\n pairId: string;\n verb: ResolutionVerb;\n /** Memory IDs affected by the resolution. */\n affectedIds: string[];\n /** Human-readable status. */\n message: string;\n}\n\nconst VALID_VERBS: ResolutionVerb[] = [\"keep-a\", \"keep-b\", \"merge\", \"both-valid\", \"needs-more-context\"];\n\nexport function isValidResolutionVerb(value: string): value is ResolutionVerb {\n return VALID_VERBS.includes(value as ResolutionVerb);\n}\n\n/**\n * Execute a resolution verb on a contradiction pair.\n *\n * - `keep-a`: Supersede B, keep A active.\n * - `keep-b`: Supersede A, keep B active.\n * - `merge`: Mark both as superseded by a synthetic merged ID.\n * - `both-valid`: Mark pair as reviewed; no memories are superseded.\n * - `needs-more-context`: Defer; no action, short cooldown.\n */\nexport async function executeResolution(\n memoryDir: string,\n storage: StorageManager,\n pairId: string,\n verb: ResolutionVerb,\n): Promise<ResolutionResult> {\n const pair = readPair(memoryDir, pairId);\n if (!pair) {\n return { pairId, verb, affectedIds: [], message: `Pair ${pairId} not found` };\n }\n\n if (pair.resolution) {\n return { pairId, verb, affectedIds: [], message: `Pair already resolved with verb \"${pair.resolution}\"` };\n }\n\n const [idA, idB] = pair.memoryIds;\n const affectedIds: string[] = [];\n let message = \"\";\n let supersedeFailed = false;\n\n switch (verb) {\n case \"keep-a\": {\n const ok = await supersedeSafe(storage, idB, idA, \"contradiction-resolution:keep-a\");\n if (ok) { affectedIds.push(idB); message = `Kept ${idA}, superseded ${idB}`; }\n else { supersedeFailed = true; message = `Supersede failed for ${idB}; not resolving`; }\n break;\n }\n case \"keep-b\": {\n const ok = await supersedeSafe(storage, idA, idB, \"contradiction-resolution:keep-b\");\n if (ok) { affectedIds.push(idA); message = `Kept ${idB}, superseded ${idA}`; }\n else { supersedeFailed = true; message = `Supersede failed for ${idA}; not resolving`; }\n break;\n }\n case \"merge\": {\n const mergedId = `merged-${pairId}`;\n const okA = await supersedeSafe(storage, idA, mergedId, \"contradiction-resolution:merge\");\n const okB = await supersedeSafe(storage, idB, mergedId, \"contradiction-resolution:merge\");\n if (okA) affectedIds.push(idA);\n if (okB) affectedIds.push(idB);\n if (!okA || !okB) {\n supersedeFailed = true;\n message = `Merge incomplete: ${affectedIds.length}/2 superseded; not resolving to allow retry`;\n } else {\n message = `Both memories superseded by merged ${mergedId}`;\n }\n break;\n }\n case \"both-valid\": {\n message = \"Pair marked as both-valid; cooldown applied\";\n break;\n }\n case \"needs-more-context\": {\n message = \"Deferred; no action taken, short cooldown applied\";\n break;\n }\n }\n\n if (!supersedeFailed) {\n resolvePair(memoryDir, pairId, verb);\n }\n log.info(\"[contradiction-resolution] pair=%s verb=%s affected=%d\", pairId, verb, affectedIds.length);\n return { pairId, verb, affectedIds, message };\n}\n\nasync function supersedeSafe(\n storage: StorageManager,\n oldId: string,\n newId: string,\n reason: string,\n): Promise<boolean> {\n try {\n const result = await storage.supersedeMemory(oldId, newId, reason);\n if (result === false) {\n log.warn(\"[contradiction-resolution] supersede returned false for %s → %s\", oldId, newId);\n return false;\n }\n return true;\n } catch (err) {\n log.warn(\n \"[contradiction-resolution] supersede failed %s → %s: %s\",\n oldId,\n newId,\n err instanceof Error ? err.message : err,\n );\n return false;\n }\n}\n"],"mappings":";;;;;;;;;;AAqBA,IAAM,cAAgC,CAAC,UAAU,UAAU,SAAS,cAAc,oBAAoB;AAE/F,SAAS,sBAAsB,OAAwC;AAC5E,SAAO,YAAY,SAAS,KAAuB;AACrD;AAWA,eAAsB,kBACpB,WACA,SACA,QACA,MAC2B;AAC3B,QAAM,OAAO,SAAS,WAAW,MAAM;AACvC,MAAI,CAAC,MAAM;AACT,WAAO,EAAE,QAAQ,MAAM,aAAa,CAAC,GAAG,SAAS,QAAQ,MAAM,aAAa;AAAA,EAC9E;AAEA,MAAI,KAAK,YAAY;AACnB,WAAO,EAAE,QAAQ,MAAM,aAAa,CAAC,GAAG,SAAS,oCAAoC,KAAK,UAAU,IAAI;AAAA,EAC1G;AAEA,QAAM,CAAC,KAAK,GAAG,IAAI,KAAK;AACxB,QAAM,cAAwB,CAAC;AAC/B,MAAI,UAAU;AACd,MAAI,kBAAkB;AAEtB,UAAQ,MAAM;AAAA,IACZ,KAAK,UAAU;AACb,YAAM,KAAK,MAAM,cAAc,SAAS,KAAK,KAAK,iCAAiC;AACnF,UAAI,IAAI;AAAE,oBAAY,KAAK,GAAG;AAAG,kBAAU,QAAQ,GAAG,gBAAgB,GAAG;AAAA,MAAI,OACxE;AAAE,0BAAkB;AAAM,kBAAU,wBAAwB,GAAG;AAAA,MAAmB;AACvF;AAAA,IACF;AAAA,IACA,KAAK,UAAU;AACb,YAAM,KAAK,MAAM,cAAc,SAAS,KAAK,KAAK,iCAAiC;AACnF,UAAI,IAAI;AAAE,oBAAY,KAAK,GAAG;AAAG,kBAAU,QAAQ,GAAG,gBAAgB,GAAG;AAAA,MAAI,OACxE;AAAE,0BAAkB;AAAM,kBAAU,wBAAwB,GAAG;AAAA,MAAmB;AACvF;AAAA,IACF;AAAA,IACA,KAAK,SAAS;AACZ,YAAM,WAAW,UAAU,MAAM;AACjC,YAAM,MAAM,MAAM,cAAc,SAAS,KAAK,UAAU,gCAAgC;AACxF,YAAM,MAAM,MAAM,cAAc,SAAS,KAAK,UAAU,gCAAgC;AACxF,UAAI,IAAK,aAAY,KAAK,GAAG;AAC7B,UAAI,IAAK,aAAY,KAAK,GAAG;AAC7B,UAAI,CAAC,OAAO,CAAC,KAAK;AAChB,0BAAkB;AAClB,kBAAU,qBAAqB,YAAY,MAAM;AAAA,MACnD,OAAO;AACL,kBAAU,sCAAsC,QAAQ;AAAA,MAC1D;AACA;AAAA,IACF;AAAA,IACA,KAAK,cAAc;AACjB,gBAAU;AACV;AAAA,IACF;AAAA,IACA,KAAK,sBAAsB;AACzB,gBAAU;AACV;AAAA,IACF;AAAA,EACF;AAEA,MAAI,CAAC,iBAAiB;AACpB,gBAAY,WAAW,QAAQ,IAAI;AAAA,EACrC;AACA,MAAI,KAAK,0DAA0D,QAAQ,MAAM,YAAY,MAAM;AACnG,SAAO,EAAE,QAAQ,MAAM,aAAa,QAAQ;AAC9C;AAEA,eAAe,cACb,SACA,OACA,OACA,QACkB;AAClB,MAAI;AACF,UAAM,SAAS,MAAM,QAAQ,gBAAgB,OAAO,OAAO,MAAM;AACjE,QAAI,WAAW,OAAO;AACpB,UAAI,KAAK,wEAAmE,OAAO,KAAK;AACxF,aAAO;AAAA,IACT;AACA,WAAO;AAAA,EACT,SAAS,KAAK;AACZ,QAAI;AAAA,MACF;AAAA,MACA;AAAA,MACA;AAAA,MACA,eAAe,QAAQ,IAAI,UAAU;AAAA,IACvC;AACA,WAAO;AAAA,EACT;AACF;","names":[]}
|