@remnic/core 1.1.1 → 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 +76 -51
- package/dist/access-cli.js.map +1 -1
- package/dist/access-http.d.ts +50 -5
- package/dist/access-http.js +38 -16
- package/dist/access-idempotency.js +1 -0
- package/dist/access-mcp.d.ts +10 -5
- package/dist/access-mcp.js +37 -14
- 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 +39 -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 +10 -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 +12 -9
- 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-KUB6JU6H.js → chunk-47WOM4YW.js} +2 -2
- package/dist/{chunk-HK3FGIEW.js → chunk-4PLGJRBV.js} +656 -20
- package/dist/chunk-4PLGJRBV.js.map +1 -0
- package/dist/{chunk-BGJGXLZ7.js → chunk-55FXRRSJ.js} +11 -8
- package/dist/chunk-55FXRRSJ.js.map +1 -0
- 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-B5WXLVDY.js → chunk-7GCMLT7J.js} +245 -25
- 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-DFTTJYSO.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-ZEM3OK2K.js → chunk-B2TL6GA2.js} +3 -3
- 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-3GXCSUXR.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-GKFXUTJ2.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-VYM3VWOF.js → chunk-IM3JSE73.js} +966 -329
- 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-BK2EFTE2.js → chunk-JWSENLQI.js} +508 -28
- 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-RGLL5SPU.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-S3EEFKNY.js → chunk-N7X62G74.js} +26 -11
- 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-LK6SGL53.js → chunk-OR64ZGRZ.js} +3 -2
- package/dist/chunk-OR64ZGRZ.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-XZ2TIKGC.js → chunk-Q7FJ5ZHM.js} +30 -10
- package/dist/chunk-Q7FJ5ZHM.js.map +1 -0
- package/dist/{chunk-7I7FKFZH.js → chunk-R2L7SUX2.js} +6 -6
- package/dist/{chunk-JL2PU6AI.js → chunk-R2XRID2N.js} +2 -2
- 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-WVVA7F5A.js → chunk-SS253RXF.js} +30 -16
- 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-EPQJM2GC.js → chunk-VTJVUHRK.js} +22 -36
- package/dist/chunk-VTJVUHRK.js.map +1 -0
- package/dist/{chunk-O5ETUNBT.js → chunk-VTU2B4VF.js} +7 -3
- package/dist/chunk-VTU2B4VF.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-YNQKWQT4.js → chunk-WSZIHQBK.js} +31 -11
- package/dist/{chunk-YNQKWQT4.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-ALXMCZEU.js → chunk-Z2E7VW55.js} +6 -3
- package/dist/chunk-Z2E7VW55.js.map +1 -0
- package/dist/{chunk-INXV5JBT.js → chunk-ZGXSCMQN.js} +1992 -410
- 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 +68 -34
- 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 +5 -2
- 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 +3 -1
- package/dist/{engine-F3GOXGE5.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 +9 -8
- 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 +365 -96
- 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 +3 -2
- 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 +29 -17
- 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 +58 -42
- 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 +13 -1
- package/dist/resolve-provider-secret.js +6 -1
- package/dist/resume-bundles.js +5 -4
- 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 +15 -2
- 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 +12 -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 +6 -5
- 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 +3 -1
- 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-6PFRXT4K.js.map +0 -1
- package/dist/chunk-ALXMCZEU.js.map +0 -1
- package/dist/chunk-B5WXLVDY.js.map +0 -1
- package/dist/chunk-BGJGXLZ7.js.map +0 -1
- package/dist/chunk-BK2EFTE2.js.map +0 -1
- package/dist/chunk-C2EFFULQ.js.map +0 -1
- package/dist/chunk-CUPFXL3J.js.map +0 -1
- package/dist/chunk-DFTTJYSO.js.map +0 -1
- package/dist/chunk-EPQJM2GC.js.map +0 -1
- package/dist/chunk-F5VP6YCB.js.map +0 -1
- package/dist/chunk-FVA6TGI3.js.map +0 -1
- package/dist/chunk-GKFXUTJ2.js.map +0 -1
- package/dist/chunk-HK3FGIEW.js.map +0 -1
- package/dist/chunk-INXV5JBT.js.map +0 -1
- package/dist/chunk-KVBLZUKV.js.map +0 -1
- package/dist/chunk-LK6SGL53.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-O5ETUNBT.js.map +0 -1
- package/dist/chunk-PVPWZSSI.js.map +0 -1
- package/dist/chunk-RGLL5SPU.js.map +0 -1
- package/dist/chunk-S3EEFKNY.js.map +0 -1
- package/dist/chunk-SPI27QT6.js.map +0 -1
- package/dist/chunk-TP4FZJIZ.js.map +0 -1
- package/dist/chunk-ULYOGL6R.js.map +0 -1
- package/dist/chunk-VBVG2M5G.js.map +0 -1
- package/dist/chunk-VDX363PS.js.map +0 -1
- package/dist/chunk-VYM3VWOF.js.map +0 -1
- package/dist/chunk-WCLICCGB.js.map +0 -1
- package/dist/chunk-WVVA7F5A.js.map +0 -1
- package/dist/chunk-X6GF3FX2.js +0 -26
- package/dist/chunk-X6GF3FX2.js.map +0 -1
- package/dist/chunk-XZ2TIKGC.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-F3GOXGE5.js.map → capsule-crypto-5CYAGVC5.js.map} +0 -0
- /package/dist/{chunk-KUB6JU6H.js.map → chunk-47WOM4YW.js.map} +0 -0
- /package/dist/{chunk-ZEM3OK2K.js.map → chunk-B2TL6GA2.js.map} +0 -0
- /package/dist/{chunk-3GXCSUXR.js.map → chunk-CRU27Q4J.js.map} +0 -0
- /package/dist/{chunk-RBBWYEFJ.js.map → chunk-G2WADRQ3.js.map} +0 -0
- /package/dist/{chunk-7I7FKFZH.js.map → chunk-R2L7SUX2.js.map} +0 -0
- /package/dist/{chunk-JL2PU6AI.js.map → chunk-R2XRID2N.js.map} +0 -0
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
import {
|
|
2
2
|
cloneDefaultSessionObserverBands
|
|
3
3
|
} from "./chunk-Z5LAYHGJ.js";
|
|
4
|
+
import {
|
|
5
|
+
normalizeEntitySchemas
|
|
6
|
+
} from "./chunk-4DJQYKMN.js";
|
|
4
7
|
import {
|
|
5
8
|
readEnvVar,
|
|
6
9
|
resolveHomeDir
|
|
7
10
|
} from "./chunk-MARWOCVP.js";
|
|
8
|
-
import {
|
|
9
|
-
normalizeEntitySchemas
|
|
10
|
-
} from "./chunk-4DJQYKMN.js";
|
|
11
11
|
import {
|
|
12
12
|
log
|
|
13
13
|
} from "./chunk-2ODBA7MQ.js";
|
|
@@ -54,6 +54,46 @@ var DEFAULT_WORKSPACE_DIR = path.join(
|
|
|
54
54
|
".openclaw",
|
|
55
55
|
"workspace"
|
|
56
56
|
);
|
|
57
|
+
function coerceBooleanLike(value) {
|
|
58
|
+
if (typeof value === "boolean") return value;
|
|
59
|
+
if (typeof value === "number") {
|
|
60
|
+
if (value === 1) return true;
|
|
61
|
+
if (value === 0) return false;
|
|
62
|
+
return void 0;
|
|
63
|
+
}
|
|
64
|
+
if (typeof value === "string") {
|
|
65
|
+
const normalized = value.trim().toLowerCase();
|
|
66
|
+
if (normalized === "true" || normalized === "1" || normalized === "yes" || normalized === "on") {
|
|
67
|
+
return true;
|
|
68
|
+
}
|
|
69
|
+
if (normalized === "false" || normalized === "0" || normalized === "no" || normalized === "off") {
|
|
70
|
+
return false;
|
|
71
|
+
}
|
|
72
|
+
}
|
|
73
|
+
return void 0;
|
|
74
|
+
}
|
|
75
|
+
function isSecretRefShape(value) {
|
|
76
|
+
if (!value || typeof value !== "object" || Array.isArray(value)) return false;
|
|
77
|
+
const obj = value;
|
|
78
|
+
return typeof obj.source === "string" && obj.source.trim().length > 0;
|
|
79
|
+
}
|
|
80
|
+
function parseAgentAccessAuthToken(raw) {
|
|
81
|
+
if (raw === void 0 || raw === null) {
|
|
82
|
+
return readEnvVar("OPENCLAW_REMNIC_ACCESS_TOKEN") ?? readEnvVar("OPENCLAW_ENGRAM_ACCESS_TOKEN");
|
|
83
|
+
}
|
|
84
|
+
if (typeof raw === "string") {
|
|
85
|
+
if (raw.trim().length === 0) {
|
|
86
|
+
return readEnvVar("OPENCLAW_REMNIC_ACCESS_TOKEN") ?? readEnvVar("OPENCLAW_ENGRAM_ACCESS_TOKEN");
|
|
87
|
+
}
|
|
88
|
+
return resolveEnvVars(raw);
|
|
89
|
+
}
|
|
90
|
+
if (isSecretRefShape(raw)) {
|
|
91
|
+
return raw;
|
|
92
|
+
}
|
|
93
|
+
throw new Error(
|
|
94
|
+
"unsupported SecretRef shape for agentAccessHttp.authToken \u2014 expected a string or an object with a non-empty `source` field (see https://github.com/joshuaswarren/remnic/issues/757)"
|
|
95
|
+
);
|
|
96
|
+
}
|
|
57
97
|
function resolveEnvVars(value) {
|
|
58
98
|
const resolved = value.replace(/\$\{([A-Za-z_][A-Za-z0-9_]*)\}/g, (_, envVar) => {
|
|
59
99
|
const envValue = readEnvVar(envVar);
|
|
@@ -137,6 +177,7 @@ function parseSemanticChunkingConfig(raw) {
|
|
|
137
177
|
if (typeof src.fallbackToRecursive === "boolean") out.fallbackToRecursive = src.fallbackToRecursive;
|
|
138
178
|
return out;
|
|
139
179
|
}
|
|
180
|
+
var DEFAULT_REASONING_MODEL = "gpt-5.2";
|
|
140
181
|
var VALID_EFFORTS = ["none", "low", "medium", "high"];
|
|
141
182
|
var VALID_TRIGGERS = ["smart", "every_n", "time_based"];
|
|
142
183
|
var VALID_IDENTITY_INJECTION_MODES = ["recovery_only", "minimal", "full"];
|
|
@@ -303,9 +344,9 @@ function parseConfig(raw) {
|
|
|
303
344
|
if (typeof cfg.openaiApiKey === "string" && cfg.openaiApiKey.length > 0) {
|
|
304
345
|
apiKey = resolveEnvVars(cfg.openaiApiKey);
|
|
305
346
|
} else {
|
|
306
|
-
apiKey =
|
|
347
|
+
apiKey = readEnvVar("OPENAI_API_KEY");
|
|
307
348
|
}
|
|
308
|
-
const model = typeof cfg.model === "string" && cfg.model.length > 0 ? cfg.model :
|
|
349
|
+
const model = typeof cfg.model === "string" && cfg.model.length > 0 ? cfg.model : DEFAULT_REASONING_MODEL;
|
|
309
350
|
const captureMode = cfg.captureMode === "explicit" || cfg.captureMode === "hybrid" ? cfg.captureMode : "implicit";
|
|
310
351
|
const rawEffort = cfg.reasoningEffort;
|
|
311
352
|
const reasoningEffort = rawEffort && VALID_EFFORTS.includes(rawEffort) ? rawEffort : "low";
|
|
@@ -329,6 +370,58 @@ function parseConfig(raw) {
|
|
|
329
370
|
narrativePromptStyle: rawDreaming.narrativePromptStyle === "diary" || rawDreaming.narrativePromptStyle === "analytical" ? rawDreaming.narrativePromptStyle : "reflective",
|
|
330
371
|
watchFile: rawDreaming.watchFile !== false
|
|
331
372
|
};
|
|
373
|
+
const rawDreamsBlock = cfg.dreams && typeof cfg.dreams === "object" && !Array.isArray(cfg.dreams) ? cfg.dreams : {};
|
|
374
|
+
const rawDreamsPhases = rawDreamsBlock.phases && typeof rawDreamsBlock.phases === "object" && !Array.isArray(rawDreamsBlock.phases) ? rawDreamsBlock.phases : {};
|
|
375
|
+
const rawDreamsLightSleep = rawDreamsPhases.lightSleep && typeof rawDreamsPhases.lightSleep === "object" && !Array.isArray(rawDreamsPhases.lightSleep) ? rawDreamsPhases.lightSleep : {};
|
|
376
|
+
const rawDreamsRem = rawDreamsPhases.rem && typeof rawDreamsPhases.rem === "object" && !Array.isArray(rawDreamsPhases.rem) ? rawDreamsPhases.rem : {};
|
|
377
|
+
const rawDreamsDeepSleep = rawDreamsPhases.deepSleep && typeof rawDreamsPhases.deepSleep === "object" && !Array.isArray(rawDreamsPhases.deepSleep) ? rawDreamsPhases.deepSleep : {};
|
|
378
|
+
const legacyLifecyclePolicyEnabled = coerceBooleanLike(cfg.lifecyclePolicyEnabled) ?? true;
|
|
379
|
+
const legacyLifecyclePromoteHeatThreshold = typeof cfg.lifecyclePromoteHeatThreshold === "number" ? Math.min(1, Math.max(0, cfg.lifecyclePromoteHeatThreshold)) : 0.55;
|
|
380
|
+
const legacyLifecycleStaleDecayThreshold = typeof cfg.lifecycleStaleDecayThreshold === "number" ? Math.min(1, Math.max(0, cfg.lifecycleStaleDecayThreshold)) : 0.65;
|
|
381
|
+
const legacyLifecycleArchiveDecayThreshold = typeof cfg.lifecycleArchiveDecayThreshold === "number" ? Math.min(1, Math.max(0, cfg.lifecycleArchiveDecayThreshold)) : 0.85;
|
|
382
|
+
const legacySemanticConsolidationEnabled = cfg.semanticConsolidationEnabled === true;
|
|
383
|
+
const legacySemanticConsolidationIntervalHours = typeof cfg.semanticConsolidationIntervalHours === "number" ? Math.max(1, Math.floor(cfg.semanticConsolidationIntervalHours)) : 168;
|
|
384
|
+
const legacySemanticConsolidationThreshold = typeof cfg.semanticConsolidationThreshold === "number" ? cfg.semanticConsolidationThreshold : 0.8;
|
|
385
|
+
const legacySemanticConsolidationMinClusterSize = typeof cfg.semanticConsolidationMinClusterSize === "number" ? Math.max(2, Math.floor(cfg.semanticConsolidationMinClusterSize)) : 3;
|
|
386
|
+
const legacySemanticConsolidationMaxPerRun = typeof cfg.semanticConsolidationMaxPerRun === "number" ? Math.max(0, Math.floor(cfg.semanticConsolidationMaxPerRun)) : 100;
|
|
387
|
+
const legacyConsolidationMinIntervalMs = typeof cfg.consolidationMinIntervalMs === "number" ? cfg.consolidationMinIntervalMs : 10 * 6e4;
|
|
388
|
+
const legacyVersioningEnabled = cfg.versioningEnabled === true;
|
|
389
|
+
const legacyVersioningMaxPerPage = typeof cfg.versioningMaxPerPage === "number" ? Math.max(0, Math.floor(cfg.versioningMaxPerPage)) : 50;
|
|
390
|
+
const legacyDeepSleepEnabled = cfg.nightlyGovernanceCronAutoRegister === true || cfg.qmdTierMigrationEnabled === true || legacyVersioningEnabled;
|
|
391
|
+
const dreamsLightSleepEnabledRaw = coerceBooleanLike(rawDreamsLightSleep.enabled);
|
|
392
|
+
const dreamsLightSleep = {
|
|
393
|
+
// new key wins; fall back to resolved legacy default
|
|
394
|
+
enabled: dreamsLightSleepEnabledRaw !== void 0 ? dreamsLightSleepEnabledRaw : legacyLifecyclePolicyEnabled,
|
|
395
|
+
cadenceMs: typeof rawDreamsLightSleep.cadenceMs === "number" ? Math.max(0, Math.floor(rawDreamsLightSleep.cadenceMs)) : 0,
|
|
396
|
+
// 0 = no override; orchestrator uses its own internal cadence
|
|
397
|
+
promoteHeatThreshold: typeof rawDreamsLightSleep.promoteHeatThreshold === "number" ? Math.min(1, Math.max(0, rawDreamsLightSleep.promoteHeatThreshold)) : legacyLifecyclePromoteHeatThreshold,
|
|
398
|
+
staleDecayThreshold: typeof rawDreamsLightSleep.staleDecayThreshold === "number" ? Math.min(1, Math.max(0, rawDreamsLightSleep.staleDecayThreshold)) : legacyLifecycleStaleDecayThreshold,
|
|
399
|
+
archiveDecayThreshold: typeof rawDreamsLightSleep.archiveDecayThreshold === "number" ? Math.min(1, Math.max(0, rawDreamsLightSleep.archiveDecayThreshold)) : legacyLifecycleArchiveDecayThreshold,
|
|
400
|
+
filterStaleEnabled: rawDreamsLightSleep.filterStaleEnabled !== void 0 ? coerceBooleanLike(rawDreamsLightSleep.filterStaleEnabled) === true : cfg.lifecycleFilterStaleEnabled === true
|
|
401
|
+
};
|
|
402
|
+
const dreamsRemEnabledRaw = coerceBooleanLike(rawDreamsRem.enabled);
|
|
403
|
+
const dreamsRem = {
|
|
404
|
+
enabled: dreamsRemEnabledRaw !== void 0 ? dreamsRemEnabledRaw : legacySemanticConsolidationEnabled,
|
|
405
|
+
cadenceMs: typeof rawDreamsRem.cadenceMs === "number" ? Math.max(0, Math.floor(rawDreamsRem.cadenceMs)) : legacySemanticConsolidationIntervalHours * 36e5,
|
|
406
|
+
similarityThreshold: typeof rawDreamsRem.similarityThreshold === "number" ? Math.min(1, Math.max(0, rawDreamsRem.similarityThreshold)) : legacySemanticConsolidationThreshold,
|
|
407
|
+
minClusterSize: typeof rawDreamsRem.minClusterSize === "number" ? Math.max(2, Math.floor(rawDreamsRem.minClusterSize)) : legacySemanticConsolidationMinClusterSize,
|
|
408
|
+
maxPerRun: typeof rawDreamsRem.maxPerRun === "number" ? Math.max(0, Math.floor(rawDreamsRem.maxPerRun)) : legacySemanticConsolidationMaxPerRun,
|
|
409
|
+
minIntervalMs: typeof rawDreamsRem.minIntervalMs === "number" ? Math.max(0, Math.floor(rawDreamsRem.minIntervalMs)) : legacyConsolidationMinIntervalMs
|
|
410
|
+
};
|
|
411
|
+
const dreamsDeepSleepEnabledRaw = coerceBooleanLike(rawDreamsDeepSleep.enabled);
|
|
412
|
+
const dreamsDeepSleep = {
|
|
413
|
+
enabled: dreamsDeepSleepEnabledRaw !== void 0 ? dreamsDeepSleepEnabledRaw : legacyDeepSleepEnabled,
|
|
414
|
+
enabledExplicitlySet: dreamsDeepSleepEnabledRaw !== void 0,
|
|
415
|
+
cadenceMs: typeof rawDreamsDeepSleep.cadenceMs === "number" ? Math.max(0, Math.floor(rawDreamsDeepSleep.cadenceMs)) : 24 * 36e5,
|
|
416
|
+
// default: 24 h (mirrors nightly governance cron)
|
|
417
|
+
versioningEnabled: rawDreamsDeepSleep.versioningEnabled !== void 0 ? coerceBooleanLike(rawDreamsDeepSleep.versioningEnabled) === true : legacyVersioningEnabled,
|
|
418
|
+
versioningMaxPerPage: typeof rawDreamsDeepSleep.versioningMaxPerPage === "number" ? Math.max(0, Math.floor(rawDreamsDeepSleep.versioningMaxPerPage)) : legacyVersioningMaxPerPage
|
|
419
|
+
};
|
|
420
|
+
const dreamsPhases = {
|
|
421
|
+
lightSleep: dreamsLightSleep,
|
|
422
|
+
rem: dreamsRem,
|
|
423
|
+
deepSleep: dreamsDeepSleep
|
|
424
|
+
};
|
|
332
425
|
const rawHeartbeat = cfg.heartbeat && typeof cfg.heartbeat === "object" && !Array.isArray(cfg.heartbeat) ? cfg.heartbeat : {};
|
|
333
426
|
const heartbeat = {
|
|
334
427
|
enabled: rawHeartbeat.enabled === true,
|
|
@@ -390,9 +483,13 @@ function parseConfig(raw) {
|
|
|
390
483
|
const rawCodingMode = cfg.codingMode && typeof cfg.codingMode === "object" && !Array.isArray(cfg.codingMode) ? cfg.codingMode : {};
|
|
391
484
|
const codingProjectScopeRaw = coerceBool(rawCodingMode.projectScope);
|
|
392
485
|
const codingBranchScopeRaw = coerceBool(rawCodingMode.branchScope);
|
|
486
|
+
const codingGlobalFallbackRaw = coerceBool(rawCodingMode.globalFallback);
|
|
393
487
|
const codingMode = {
|
|
394
488
|
projectScope: codingProjectScopeRaw === void 0 ? true : codingProjectScopeRaw,
|
|
395
|
-
branchScope: codingBranchScopeRaw === true
|
|
489
|
+
branchScope: codingBranchScopeRaw === true,
|
|
490
|
+
// Default true — project-scoped sessions include the root namespace in
|
|
491
|
+
// read fallbacks so globally useful memories remain visible. CLAUDE.md #30.
|
|
492
|
+
globalFallback: codingGlobalFallbackRaw === void 0 ? true : codingGlobalFallbackRaw
|
|
396
493
|
};
|
|
397
494
|
const memoryDir = typeof cfg.memoryDir === "string" && cfg.memoryDir.length > 0 ? cfg.memoryDir : DEFAULT_MEMORY_DIR;
|
|
398
495
|
const rawIdentityInjectionMode = cfg.identityInjectionMode;
|
|
@@ -480,15 +577,15 @@ function parseConfig(raw) {
|
|
|
480
577
|
enabled: rawAgentAccessHttp?.enabled === true,
|
|
481
578
|
host: typeof rawAgentAccessHttp?.host === "string" && rawAgentAccessHttp.host.trim().length > 0 ? rawAgentAccessHttp.host.trim() : "127.0.0.1",
|
|
482
579
|
port: typeof rawAgentAccessHttp?.port === "number" ? Math.max(0, Math.floor(rawAgentAccessHttp.port)) : 4318,
|
|
483
|
-
authToken:
|
|
484
|
-
principal: typeof rawAgentAccessHttp?.principal === "string" && rawAgentAccessHttp.principal.trim().length > 0 ? resolveEnvVars(rawAgentAccessHttp.principal) :
|
|
580
|
+
authToken: parseAgentAccessAuthToken(rawAgentAccessHttp?.authToken),
|
|
581
|
+
principal: typeof rawAgentAccessHttp?.principal === "string" && rawAgentAccessHttp.principal.trim().length > 0 ? resolveEnvVars(rawAgentAccessHttp.principal) : readEnvVar("OPENCLAW_ENGRAM_ACCESS_PRINCIPAL")?.trim() || void 0,
|
|
485
582
|
maxBodyBytes: typeof rawAgentAccessHttp?.maxBodyBytes === "number" ? Math.max(1, Math.floor(rawAgentAccessHttp.maxBodyBytes)) : 131072
|
|
486
583
|
};
|
|
487
584
|
let baseUrl;
|
|
488
585
|
if (typeof cfg.openaiBaseUrl === "string" && cfg.openaiBaseUrl.length > 0) {
|
|
489
586
|
baseUrl = normalizeOpenaiBaseUrl(resolveEnvVars(cfg.openaiBaseUrl), "config");
|
|
490
587
|
} else {
|
|
491
|
-
baseUrl = normalizeOpenaiBaseUrl(
|
|
588
|
+
baseUrl = normalizeOpenaiBaseUrl(readEnvVar("OPENAI_BASE_URL"), "env");
|
|
492
589
|
}
|
|
493
590
|
const sharedCrossSignalSemanticEnabled = cfg.sharedCrossSignalSemanticEnabled === true || cfg.crossSignalsSemanticEnabled === true;
|
|
494
591
|
const sharedCrossSignalSemanticTimeoutMs = typeof cfg.sharedCrossSignalSemanticTimeoutMs === "number" ? Math.max(1, Math.floor(cfg.sharedCrossSignalSemanticTimeoutMs)) : typeof cfg.crossSignalsSemanticTimeoutMs === "number" ? Math.max(1, Math.floor(cfg.crossSignalsSemanticTimeoutMs)) : 4e3;
|
|
@@ -541,7 +638,10 @@ function parseConfig(raw) {
|
|
|
541
638
|
qmdColdTierEnabled: cfg.qmdColdTierEnabled === true,
|
|
542
639
|
qmdColdCollection: typeof cfg.qmdColdCollection === "string" && cfg.qmdColdCollection.length > 0 ? cfg.qmdColdCollection : "openclaw-engram-cold",
|
|
543
640
|
qmdColdMaxResults: typeof cfg.qmdColdMaxResults === "number" ? cfg.qmdColdMaxResults : 8,
|
|
544
|
-
|
|
641
|
+
// Issue #678 PR 2/4: gate hot/cold tier migration (a deep-sleep activity)
|
|
642
|
+
// on dreams.phases.deepSleep.enabled. When deep sleep is disabled,
|
|
643
|
+
// tier migration is forced off regardless of legacy flag.
|
|
644
|
+
qmdTierMigrationEnabled: dreamsDeepSleep.enabled && cfg.qmdTierMigrationEnabled === true,
|
|
545
645
|
qmdTierDemotionMinAgeDays: typeof cfg.qmdTierDemotionMinAgeDays === "number" ? Math.max(0, Math.floor(cfg.qmdTierDemotionMinAgeDays)) : 14,
|
|
546
646
|
qmdTierDemotionValueThreshold: typeof cfg.qmdTierDemotionValueThreshold === "number" ? Math.max(0, Math.min(1, cfg.qmdTierDemotionValueThreshold)) : 0.35,
|
|
547
647
|
qmdTierPromotionValueThreshold: typeof cfg.qmdTierPromotionValueThreshold === "number" ? Math.max(0, Math.min(1, cfg.qmdTierPromotionValueThreshold)) : 0.7,
|
|
@@ -619,6 +719,22 @@ function parseConfig(raw) {
|
|
|
619
719
|
// QMD path. Operators can opt out with
|
|
620
720
|
// recallDirectAnswerEnabled=false.
|
|
621
721
|
recallDirectAnswerEnabled: coerceBool(cfg.recallDirectAnswerEnabled) ?? true,
|
|
722
|
+
// Disclosure auto-escalation (issue #677 PR 4/4). Default `manual`
|
|
723
|
+
// so pre-#677 callers see unchanged behavior. Reject anything
|
|
724
|
+
// outside the allow-list rather than silently defaulting (CLAUDE.md
|
|
725
|
+
// rule 51).
|
|
726
|
+
recallDisclosureEscalation: (() => {
|
|
727
|
+
const raw2 = cfg.recallDisclosureEscalation;
|
|
728
|
+
if (raw2 === void 0 || raw2 === null) return "manual";
|
|
729
|
+
if (raw2 === "manual" || raw2 === "auto") return raw2;
|
|
730
|
+
throw new Error(
|
|
731
|
+
`recallDisclosureEscalation must be "manual" or "auto" (got ${JSON.stringify(raw2)}).`
|
|
732
|
+
);
|
|
733
|
+
})(),
|
|
734
|
+
recallDisclosureEscalationThreshold: (() => {
|
|
735
|
+
const n = coerceNumber(cfg.recallDisclosureEscalationThreshold);
|
|
736
|
+
return n !== void 0 && n >= 0 && n <= 1 ? n : 0.5;
|
|
737
|
+
})(),
|
|
622
738
|
// Graph-based retrieval tier (issue #559 PR 4). Default `false` —
|
|
623
739
|
// the tier ships off pending the `retrieval-graph` bench in PR 5.
|
|
624
740
|
recallGraphEnabled: coerceBool(cfg.recallGraphEnabled) ?? false,
|
|
@@ -819,7 +935,14 @@ function parseConfig(raw) {
|
|
|
819
935
|
activeRecallAttachRecallExplain: cfg.activeRecallAttachRecallExplain === true,
|
|
820
936
|
activeRecallAllowChainedActiveMemory: cfg.activeRecallAllowChainedActiveMemory === true,
|
|
821
937
|
dreaming,
|
|
938
|
+
dreamsPhases,
|
|
822
939
|
procedural,
|
|
940
|
+
// At-rest encryption (issue #690 PR 3/4)
|
|
941
|
+
// coerceBool handles CLI string inputs: `--config secureStoreEnabled=true`
|
|
942
|
+
// arrives as the string "true" which `=== true` would reject (CLAUDE.md #36).
|
|
943
|
+
secureStoreEnabled: coerceBool(cfg.secureStoreEnabled) === true,
|
|
944
|
+
secureStoreEncryptOnWrite: coerceBool(cfg.secureStoreEncryptOnWrite) !== false,
|
|
945
|
+
// default: true
|
|
823
946
|
codingMode,
|
|
824
947
|
heartbeat,
|
|
825
948
|
slotBehavior,
|
|
@@ -830,7 +953,12 @@ function parseConfig(raw) {
|
|
|
830
953
|
daySummaryEnabled: cfg.daySummaryEnabled !== false,
|
|
831
954
|
// default: true
|
|
832
955
|
hourlySummaryCronAutoRegister: cfg.hourlySummaryCronAutoRegister === true,
|
|
833
|
-
|
|
956
|
+
// Codex P1 on PR 763 round 2: gate the nightly-governance cron
|
|
957
|
+
// (deep-sleep's primary scheduled execution path) on
|
|
958
|
+
// dreams.phases.deepSleep.enabled. When the phase is disabled the
|
|
959
|
+
// cron must NOT auto-register, otherwise `deepSleep.enabled=false`
|
|
960
|
+
// is a contract lie — deep-sleep keeps running.
|
|
961
|
+
nightlyGovernanceCronAutoRegister: dreamsDeepSleep.enabled && cfg.nightlyGovernanceCronAutoRegister === true,
|
|
834
962
|
summaryRecallHours: typeof cfg.summaryRecallHours === "number" ? cfg.summaryRecallHours : 24,
|
|
835
963
|
maxSummaryCount: typeof cfg.maxSummaryCount === "number" ? cfg.maxSummaryCount : 6,
|
|
836
964
|
summaryModel: typeof cfg.summaryModel === "string" && cfg.summaryModel.length > 0 ? cfg.summaryModel : model,
|
|
@@ -884,15 +1012,25 @@ function parseConfig(raw) {
|
|
|
884
1012
|
verifiedRecallEnabled: cfg.verifiedRecallEnabled === true,
|
|
885
1013
|
semanticRulePromotionEnabled: cfg.semanticRulePromotionEnabled === true,
|
|
886
1014
|
semanticRuleVerificationEnabled: cfg.semanticRuleVerificationEnabled === true,
|
|
887
|
-
|
|
1015
|
+
// Issue #678 PR 2/4: when `dreams.phases.rem.*` is set, the resolved
|
|
1016
|
+
// dreamsPhases value WINS over the legacy top-level key. The runtime
|
|
1017
|
+
// gates (orchestrator's `runSemanticConsolidation`) read these legacy
|
|
1018
|
+
// fields, so we must propagate the precedence here, not just in the
|
|
1019
|
+
// `dreamsPhases` object.
|
|
1020
|
+
semanticConsolidationEnabled: dreamsRem.enabled && dreamsRem.cadenceMs > 0,
|
|
888
1021
|
semanticConsolidationModel: typeof cfg.semanticConsolidationModel === "string" && cfg.semanticConsolidationModel.length > 0 ? cfg.semanticConsolidationModel : "auto",
|
|
889
|
-
semanticConsolidationThreshold:
|
|
890
|
-
semanticConsolidationMinClusterSize:
|
|
1022
|
+
semanticConsolidationThreshold: dreamsRem.similarityThreshold,
|
|
1023
|
+
semanticConsolidationMinClusterSize: dreamsRem.minClusterSize,
|
|
891
1024
|
semanticConsolidationExcludeCategories: Array.isArray(cfg.semanticConsolidationExcludeCategories) ? cfg.semanticConsolidationExcludeCategories.filter(
|
|
892
1025
|
(c) => typeof c === "string" && c.length > 0
|
|
893
1026
|
) : ["correction", "commitment", "procedure"],
|
|
894
|
-
|
|
895
|
-
|
|
1027
|
+
// semanticConsolidationIntervalHours is derived from dreamsRem.cadenceMs
|
|
1028
|
+
// when an override is set (rounded up to the nearest hour). Preserve
|
|
1029
|
+
// explicit zero so legacy schedulers see the same disable-by-zero signal
|
|
1030
|
+
// as the dreams.phases.rem config; the runtime enabled flag is also
|
|
1031
|
+
// disabled above so zero does not mean "run every maintenance cycle".
|
|
1032
|
+
semanticConsolidationIntervalHours: rawDreamsRem.cadenceMs !== void 0 ? Math.max(0, Math.ceil(dreamsRem.cadenceMs / 36e5)) : legacySemanticConsolidationIntervalHours,
|
|
1033
|
+
semanticConsolidationMaxPerRun: dreamsRem.maxPerRun,
|
|
896
1034
|
// Operator-aware consolidation prompt (issue #561 PR 3). Defaults
|
|
897
1035
|
// to `false` to match sibling `*Enabled` flags' least-privileged
|
|
898
1036
|
// convention. Operators opt in by setting `true` (or truthy
|
|
@@ -904,6 +1042,90 @@ function parseConfig(raw) {
|
|
|
904
1042
|
// heuristic (chooseConsolidationOperator) so PR 2's provenance
|
|
905
1043
|
// wiring keeps working without operator-aware prompts.
|
|
906
1044
|
operatorAwareConsolidationEnabled: coerceBool(cfg.operatorAwareConsolidationEnabled) ?? false,
|
|
1045
|
+
// Pattern reinforcement (issue #687 PR 2/4). Defaults: off, weekly
|
|
1046
|
+
// cadence, min cluster size 3, target categories preference / fact
|
|
1047
|
+
// / decision. All bounds clamped at parse time so invalid inputs
|
|
1048
|
+
// (negative numbers, non-arrays, non-strings) fail safe to defaults
|
|
1049
|
+
// rather than crash the job.
|
|
1050
|
+
patternReinforcementEnabled: coerceBool(cfg.patternReinforcementEnabled) ?? false,
|
|
1051
|
+
patternReinforcementCadenceMs: (() => {
|
|
1052
|
+
const raw2 = coerceNumber(cfg.patternReinforcementCadenceMs);
|
|
1053
|
+
if (raw2 === void 0 || !Number.isFinite(raw2)) {
|
|
1054
|
+
return 7 * 24 * 60 * 60 * 1e3;
|
|
1055
|
+
}
|
|
1056
|
+
return Math.max(0, Math.floor(raw2));
|
|
1057
|
+
})(),
|
|
1058
|
+
patternReinforcementMinCount: (() => {
|
|
1059
|
+
const raw2 = coerceNumber(cfg.patternReinforcementMinCount);
|
|
1060
|
+
if (raw2 === void 0 || !Number.isFinite(raw2)) return 3;
|
|
1061
|
+
return Math.min(1e3, Math.max(2, Math.floor(raw2)));
|
|
1062
|
+
})(),
|
|
1063
|
+
patternReinforcementCategories: Array.isArray(cfg.patternReinforcementCategories) ? cfg.patternReinforcementCategories.filter((v) => typeof v === "string").map((v) => v.trim()).filter((v) => v.length > 0) : ["preference", "fact", "decision"],
|
|
1064
|
+
// issue #687 PR 3/4: reinforcement recall boost config.
|
|
1065
|
+
reinforcementRecallBoostEnabled: coerceBool(cfg.reinforcementRecallBoostEnabled) ?? false,
|
|
1066
|
+
reinforcementRecallBoostWeight: (() => {
|
|
1067
|
+
if (cfg.reinforcementRecallBoostWeight === void 0) return 0.05;
|
|
1068
|
+
const n = coerceNumber(cfg.reinforcementRecallBoostWeight);
|
|
1069
|
+
if (n === void 0 || !Number.isFinite(n) || n < 0 || n > 1) {
|
|
1070
|
+
throw new Error(
|
|
1071
|
+
`reinforcementRecallBoostWeight must be a number in [0, 1] (got ${JSON.stringify(cfg.reinforcementRecallBoostWeight)}).`
|
|
1072
|
+
);
|
|
1073
|
+
}
|
|
1074
|
+
return n;
|
|
1075
|
+
})(),
|
|
1076
|
+
reinforcementRecallBoostMax: (() => {
|
|
1077
|
+
if (cfg.reinforcementRecallBoostMax === void 0) return 0.3;
|
|
1078
|
+
const n = coerceNumber(cfg.reinforcementRecallBoostMax);
|
|
1079
|
+
if (n === void 0 || !Number.isFinite(n) || n < 0 || n > 1) {
|
|
1080
|
+
throw new Error(
|
|
1081
|
+
`reinforcementRecallBoostMax must be a number in [0, 1] (got ${JSON.stringify(cfg.reinforcementRecallBoostMax)}).`
|
|
1082
|
+
);
|
|
1083
|
+
}
|
|
1084
|
+
return n;
|
|
1085
|
+
})(),
|
|
1086
|
+
// Async peer profile reasoner (issue #679 PR 2/5). Defaults to
|
|
1087
|
+
// `false` (opt-in) per Gotchas #30/#48 — least-privileged default.
|
|
1088
|
+
// `coerceBool` handles "true"/"1"/"yes"/"on" CLI strings (Gotcha
|
|
1089
|
+
// #36). Numeric thresholds clamp at zero (Gotcha #28 + #45 — 0
|
|
1090
|
+
// is a documented disable value for both, so the schema minimum
|
|
1091
|
+
// matches and we do NOT silently bump to 1).
|
|
1092
|
+
peerProfileReasonerEnabled: coerceBool(cfg.peerProfileReasonerEnabled) ?? false,
|
|
1093
|
+
// Cursor M on PR #736: use the routing alias `"auto"` rather than
|
|
1094
|
+
// a hardcoded model identifier. Matches the convention established
|
|
1095
|
+
// by sibling `semanticConsolidationModel`. Operators can still
|
|
1096
|
+
// override via config; the value is logged for telemetry only.
|
|
1097
|
+
peerProfileReasonerModel: typeof cfg.peerProfileReasonerModel === "string" && cfg.peerProfileReasonerModel.trim().length > 0 ? cfg.peerProfileReasonerModel.trim() : "auto",
|
|
1098
|
+
// Cursor L on PR #736: numeric config keys must coerce string CLI
|
|
1099
|
+
// values (Gotcha #28 — `--config peerProfileReasonerMaxFieldsPerRun=2`
|
|
1100
|
+
// arrives as the string "2"). Pre-fix `typeof === "number"`
|
|
1101
|
+
// rejected string inputs and silently fell back to defaults. The
|
|
1102
|
+
// shared `coerceNonNegativeInt` helper accepts both forms, throws
|
|
1103
|
+
// on invalid input (Gotcha #51 — reject rather than silently
|
|
1104
|
+
// default), and falls back to the documented default when the
|
|
1105
|
+
// key is absent. 0 is a valid documented disable value here, so
|
|
1106
|
+
// the helper does NOT bump to 1.
|
|
1107
|
+
peerProfileReasonerMinInteractions: coerceNonNegativeInt(
|
|
1108
|
+
cfg.peerProfileReasonerMinInteractions,
|
|
1109
|
+
5,
|
|
1110
|
+
"peerProfileReasonerMinInteractions"
|
|
1111
|
+
),
|
|
1112
|
+
peerProfileReasonerMaxFieldsPerRun: coerceNonNegativeInt(
|
|
1113
|
+
cfg.peerProfileReasonerMaxFieldsPerRun,
|
|
1114
|
+
8,
|
|
1115
|
+
"peerProfileReasonerMaxFieldsPerRun"
|
|
1116
|
+
),
|
|
1117
|
+
// Peer profile recall injection (issue #679 PR 3/5). Default-off
|
|
1118
|
+
// per Gotcha #30/#48 (least-privileged default, new feature gate).
|
|
1119
|
+
// `coerceBool` handles CLI string forms "true"/"1"/"yes"/"on"
|
|
1120
|
+
// (Gotcha #36). `coerceNonNegativeInt` handles string CLI values
|
|
1121
|
+
// (Gotcha #28) and documents 0 as the disable value (Gotcha #45 —
|
|
1122
|
+
// schema minimum must also be 0 so they stay consistent).
|
|
1123
|
+
peerProfileRecallEnabled: coerceBool(cfg.peerProfileRecallEnabled) ?? false,
|
|
1124
|
+
peerProfileRecallMaxFields: coerceNonNegativeInt(
|
|
1125
|
+
cfg.peerProfileRecallMaxFields,
|
|
1126
|
+
5,
|
|
1127
|
+
"peerProfileRecallMaxFields"
|
|
1128
|
+
),
|
|
907
1129
|
creationMemoryEnabled: cfg.creationMemoryEnabled === true,
|
|
908
1130
|
memoryUtilityLearningEnabled: cfg.memoryUtilityLearningEnabled === true,
|
|
909
1131
|
promotionByOutcomeEnabled: cfg.promotionByOutcomeEnabled === true,
|
|
@@ -972,6 +1194,10 @@ function parseConfig(raw) {
|
|
|
972
1194
|
}
|
|
973
1195
|
return "low";
|
|
974
1196
|
})(),
|
|
1197
|
+
// Extraction scope classification. When enabled, the extraction prompt
|
|
1198
|
+
// asks the LLM to classify each fact as "project" or "global". Global
|
|
1199
|
+
// facts are promoted to the shared namespace. Default true (rule 30 gate).
|
|
1200
|
+
extractionScopeClassificationEnabled: coerceBool(cfg.extractionScopeClassificationEnabled) !== false,
|
|
975
1201
|
// Extraction judge (issue #376). Opt-in LLM-as-judge fact-worthiness gate.
|
|
976
1202
|
extractionJudgeEnabled: cfg.extractionJudgeEnabled === true,
|
|
977
1203
|
extractionJudgeModel: typeof cfg.extractionJudgeModel === "string" ? cfg.extractionJudgeModel : "",
|
|
@@ -997,7 +1223,8 @@ function parseConfig(raw) {
|
|
|
997
1223
|
inlineSourceAttributionEnabled: cfg.inlineSourceAttributionEnabled === true,
|
|
998
1224
|
inlineSourceAttributionFormat: typeof cfg.inlineSourceAttributionFormat === "string" && cfg.inlineSourceAttributionFormat.trim().length > 0 ? cfg.inlineSourceAttributionFormat : "[Source: agent={agent}, session={sessionId}, ts={ts}]",
|
|
999
1225
|
consolidationRequireNonZeroExtraction: cfg.consolidationRequireNonZeroExtraction !== false,
|
|
1000
|
-
|
|
1226
|
+
// Issue #678 PR 2/4: dreams.phases.rem.minIntervalMs WINS when set.
|
|
1227
|
+
consolidationMinIntervalMs: dreamsRem.minIntervalMs,
|
|
1001
1228
|
// QMD maintenance (debounced singleflight)
|
|
1002
1229
|
qmdMaintenanceEnabled: cfg.qmdMaintenanceEnabled !== false,
|
|
1003
1230
|
qmdMaintenanceDebounceMs: typeof cfg.qmdMaintenanceDebounceMs === "number" ? cfg.qmdMaintenanceDebounceMs : 3e4,
|
|
@@ -1185,16 +1412,36 @@ function parseConfig(raw) {
|
|
|
1185
1412
|
factArchivalMaxImportance: typeof cfg.factArchivalMaxImportance === "number" ? cfg.factArchivalMaxImportance : 0.3,
|
|
1186
1413
|
factArchivalMaxAccessCount: typeof cfg.factArchivalMaxAccessCount === "number" ? cfg.factArchivalMaxAccessCount : 2,
|
|
1187
1414
|
factArchivalProtectedCategories: Array.isArray(cfg.factArchivalProtectedCategories) ? cfg.factArchivalProtectedCategories.filter((c) => typeof c === "string") : ["commitment", "preference", "decision", "principle", "procedure"],
|
|
1188
|
-
//
|
|
1189
|
-
|
|
1190
|
-
|
|
1191
|
-
|
|
1192
|
-
|
|
1193
|
-
|
|
1415
|
+
// Lifecycle policy engine (issue #686 PR 3/6 — flipped default to
|
|
1416
|
+
// `true`). Tier infrastructure (`tier-routing.ts`,
|
|
1417
|
+
// `tier-migration.ts`, separate cold QMD collection) has shipped
|
|
1418
|
+
// for several releases. Default-on lets the year-2 retention
|
|
1419
|
+
// story land for every install instead of staying gated behind
|
|
1420
|
+
// an opt-in flag the typical operator never reaches. Operators
|
|
1421
|
+
// who need pre-#686 behavior (no automatic hot↔cold migration,
|
|
1422
|
+
// no recall-time stale filtering) can set
|
|
1423
|
+
// `lifecyclePolicyEnabled: false` explicitly. Coerce string/number
|
|
1424
|
+
// boolean-likes (e.g. CLI `--config lifecyclePolicyEnabled=false`)
|
|
1425
|
+
// before applying the default — otherwise an explicit false-ish
|
|
1426
|
+
// input falls through and silently re-enables the policy.
|
|
1427
|
+
// Issue #678 PR 2/4: dreams.phases.lightSleep.* WINS over legacy keys.
|
|
1428
|
+
// The runtime gate (orchestrator's `runLifecyclePolicyPass`) reads
|
|
1429
|
+
// these legacy fields, so propagate the precedence here.
|
|
1430
|
+
lifecyclePolicyEnabled: dreamsLightSleep.enabled,
|
|
1431
|
+
lifecycleFilterStaleEnabled: dreamsLightSleep.filterStaleEnabled,
|
|
1432
|
+
lifecyclePromoteHeatThreshold: dreamsLightSleep.promoteHeatThreshold,
|
|
1433
|
+
lifecycleStaleDecayThreshold: dreamsLightSleep.staleDecayThreshold,
|
|
1434
|
+
lifecycleArchiveDecayThreshold: dreamsLightSleep.archiveDecayThreshold,
|
|
1194
1435
|
lifecycleProtectedCategories: Array.isArray(cfg.lifecycleProtectedCategories) ? cfg.lifecycleProtectedCategories.filter(
|
|
1195
1436
|
(c) => typeof c === "string" && VALID_MEMORY_CATEGORIES.has(c)
|
|
1196
1437
|
) : ["decision", "principle", "commitment", "preference", "procedure"],
|
|
1197
|
-
|
|
1438
|
+
// Mirror the *resolved* lifecyclePolicyEnabled default (not the
|
|
1439
|
+
// raw input) — otherwise omitting both flags returns `false` for
|
|
1440
|
+
// metrics even though the policy is enabled by default since
|
|
1441
|
+
// #686 PR 3/6.
|
|
1442
|
+
// Issue #678 PR 2/4: mirror the resolved dreams light-sleep enabled flag
|
|
1443
|
+
// (which already incorporates dreams.phases precedence + legacy fallback).
|
|
1444
|
+
lifecycleMetricsEnabled: coerceBooleanLike(cfg.lifecycleMetricsEnabled) ?? dreamsLightSleep.enabled,
|
|
1198
1445
|
// v8.3 proactive + policy learning (default off)
|
|
1199
1446
|
proactiveExtractionEnabled: cfg.proactiveExtractionEnabled === true,
|
|
1200
1447
|
contextCompressionActionsEnabled: cfg.contextCompressionActionsEnabled === true,
|
|
@@ -1314,6 +1561,20 @@ function parseConfig(raw) {
|
|
|
1314
1561
|
graphLateralInhibitionEnabled: cfg.graphLateralInhibitionEnabled !== false,
|
|
1315
1562
|
graphLateralInhibitionBeta: typeof cfg.graphLateralInhibitionBeta === "number" ? Math.max(0, Math.min(1, cfg.graphLateralInhibitionBeta)) : 0.15,
|
|
1316
1563
|
graphLateralInhibitionTopM: typeof cfg.graphLateralInhibitionTopM === "number" ? Math.max(0, Math.round(cfg.graphLateralInhibitionTopM)) : 7,
|
|
1564
|
+
// Issue #681 PR 2/3 — graph-edge confidence decay maintenance.
|
|
1565
|
+
// Boolean coerced via shared helper (gotcha #36: string "false" is truthy).
|
|
1566
|
+
graphEdgeDecayEnabled: coerceBooleanLike(cfg.graphEdgeDecayEnabled) ?? false,
|
|
1567
|
+
graphEdgeDecayCadenceMs: typeof cfg.graphEdgeDecayCadenceMs === "number" && Number.isFinite(cfg.graphEdgeDecayCadenceMs) ? Math.max(6e4, Math.floor(cfg.graphEdgeDecayCadenceMs)) : 7 * 24 * 60 * 60 * 1e3,
|
|
1568
|
+
graphEdgeDecayWindowMs: typeof cfg.graphEdgeDecayWindowMs === "number" && Number.isFinite(cfg.graphEdgeDecayWindowMs) ? Math.max(6e4, Math.floor(cfg.graphEdgeDecayWindowMs)) : 90 * 24 * 60 * 60 * 1e3,
|
|
1569
|
+
graphEdgeDecayPerWindow: typeof cfg.graphEdgeDecayPerWindow === "number" && Number.isFinite(cfg.graphEdgeDecayPerWindow) ? Math.max(0, Math.min(1, cfg.graphEdgeDecayPerWindow)) : 0.1,
|
|
1570
|
+
graphEdgeDecayFloor: typeof cfg.graphEdgeDecayFloor === "number" && Number.isFinite(cfg.graphEdgeDecayFloor) ? Math.max(0, Math.min(1, cfg.graphEdgeDecayFloor)) : 0.1,
|
|
1571
|
+
graphEdgeDecayVisibilityThreshold: typeof cfg.graphEdgeDecayVisibilityThreshold === "number" && Number.isFinite(cfg.graphEdgeDecayVisibilityThreshold) ? Math.max(0, Math.min(1, cfg.graphEdgeDecayVisibilityThreshold)) : 0.2,
|
|
1572
|
+
// Issue #681 PR 3/3 — confidence-aware traversal & PageRank refinement.
|
|
1573
|
+
// Floor clamps to [0, 1] so misconfigured input cannot accept negative
|
|
1574
|
+
// confidences or reject every edge. Iterations floors at 0 so a
|
|
1575
|
+
// documented 0 disables PageRank refinement and BFS scores pass through.
|
|
1576
|
+
graphTraversalConfidenceFloor: typeof cfg.graphTraversalConfidenceFloor === "number" && Number.isFinite(cfg.graphTraversalConfidenceFloor) ? Math.min(1, Math.max(0, cfg.graphTraversalConfidenceFloor)) : 0.2,
|
|
1577
|
+
graphTraversalPageRankIterations: typeof cfg.graphTraversalPageRankIterations === "number" && Number.isFinite(cfg.graphTraversalPageRankIterations) && cfg.graphTraversalPageRankIterations >= 0 ? Math.floor(cfg.graphTraversalPageRankIterations) : 8,
|
|
1317
1578
|
// v8.2: Temporal Memory Tree
|
|
1318
1579
|
temporalMemoryTreeEnabled: cfg.temporalMemoryTreeEnabled === true,
|
|
1319
1580
|
tmtHourlyMinMemories: typeof cfg.tmtHourlyMinMemories === "number" ? cfg.tmtHourlyMinMemories : 3,
|
|
@@ -1346,6 +1607,212 @@ function parseConfig(raw) {
|
|
|
1346
1607
|
const codexHome = typeof raw2.codexHome === "string" && raw2.codexHome.trim().length > 0 ? raw2.codexHome.trim() : null;
|
|
1347
1608
|
return { installExtension, codexHome };
|
|
1348
1609
|
})(),
|
|
1610
|
+
// Live connectors (issue #683 PR 2/N).
|
|
1611
|
+
//
|
|
1612
|
+
// Per CLAUDE.md gotcha #30 and #48, every concrete connector ships
|
|
1613
|
+
// disabled-by-default and the parser MUST reject malformed top-level
|
|
1614
|
+
// shapes loudly (gotcha #51) rather than silently producing an empty
|
|
1615
|
+
// object.
|
|
1616
|
+
//
|
|
1617
|
+
// We do NOT validate credential strings here — the connector module
|
|
1618
|
+
// re-validates on every sync pass via `validateGoogleDriveConfig`.
|
|
1619
|
+
// That keeps secret-store-driven values (which may legitimately be
|
|
1620
|
+
// empty until the operator runs setup) round-trippable through the
|
|
1621
|
+
// config layer without crashing the orchestrator at boot.
|
|
1622
|
+
connectors: (() => {
|
|
1623
|
+
if (cfg.connectors !== void 0 && (cfg.connectors === null || typeof cfg.connectors !== "object" || Array.isArray(cfg.connectors))) {
|
|
1624
|
+
throw new Error(
|
|
1625
|
+
`connectors must be an object (got ${JSON.stringify(cfg.connectors)}). Use connectors: {} to opt out of every live connector.`
|
|
1626
|
+
);
|
|
1627
|
+
}
|
|
1628
|
+
const rawConnectors = cfg.connectors && typeof cfg.connectors === "object" && !Array.isArray(cfg.connectors) ? cfg.connectors : {};
|
|
1629
|
+
if (rawConnectors.googleDrive !== void 0 && (rawConnectors.googleDrive === null || typeof rawConnectors.googleDrive !== "object" || Array.isArray(rawConnectors.googleDrive))) {
|
|
1630
|
+
throw new Error(
|
|
1631
|
+
`connectors.googleDrive must be an object (got ${JSON.stringify(rawConnectors.googleDrive)}).`
|
|
1632
|
+
);
|
|
1633
|
+
}
|
|
1634
|
+
const rawDrive = rawConnectors.googleDrive && typeof rawConnectors.googleDrive === "object" && !Array.isArray(rawConnectors.googleDrive) ? rawConnectors.googleDrive : {};
|
|
1635
|
+
const driveEnabled = coerceBool(rawDrive.enabled) === true;
|
|
1636
|
+
const driveClientId = typeof rawDrive.clientId === "string" ? rawDrive.clientId : "";
|
|
1637
|
+
const driveClientSecret = typeof rawDrive.clientSecret === "string" ? rawDrive.clientSecret : "";
|
|
1638
|
+
const driveRefreshToken = typeof rawDrive.refreshToken === "string" ? rawDrive.refreshToken : "";
|
|
1639
|
+
const drivePollCoerced = coerceNumber(rawDrive.pollIntervalMs);
|
|
1640
|
+
let drivePollIntervalMs = 3e5;
|
|
1641
|
+
if (drivePollCoerced !== void 0) {
|
|
1642
|
+
if (!Number.isFinite(drivePollCoerced) || !Number.isInteger(drivePollCoerced) || drivePollCoerced < 1e3 || drivePollCoerced > 864e5) {
|
|
1643
|
+
throw new Error(
|
|
1644
|
+
`connectors.googleDrive.pollIntervalMs must be an integer in [1000, 86400000] ms (got ${JSON.stringify(rawDrive.pollIntervalMs)})`
|
|
1645
|
+
);
|
|
1646
|
+
}
|
|
1647
|
+
drivePollIntervalMs = drivePollCoerced;
|
|
1648
|
+
}
|
|
1649
|
+
let driveFolderIds = [];
|
|
1650
|
+
if (rawDrive.folderIds !== void 0) {
|
|
1651
|
+
if (!Array.isArray(rawDrive.folderIds)) {
|
|
1652
|
+
throw new Error(
|
|
1653
|
+
`connectors.googleDrive.folderIds must be an array of strings (got ${typeof rawDrive.folderIds})`
|
|
1654
|
+
);
|
|
1655
|
+
}
|
|
1656
|
+
const seen = /* @__PURE__ */ new Set();
|
|
1657
|
+
for (const value of rawDrive.folderIds) {
|
|
1658
|
+
if (typeof value !== "string") {
|
|
1659
|
+
throw new Error(
|
|
1660
|
+
`connectors.googleDrive.folderIds entries must be strings; found ${typeof value}`
|
|
1661
|
+
);
|
|
1662
|
+
}
|
|
1663
|
+
const trimmed = value.trim();
|
|
1664
|
+
if (trimmed.length === 0) continue;
|
|
1665
|
+
if (seen.has(trimmed)) continue;
|
|
1666
|
+
seen.add(trimmed);
|
|
1667
|
+
driveFolderIds.push(trimmed);
|
|
1668
|
+
}
|
|
1669
|
+
}
|
|
1670
|
+
if (rawConnectors.notion !== void 0 && (rawConnectors.notion === null || typeof rawConnectors.notion !== "object" || Array.isArray(rawConnectors.notion))) {
|
|
1671
|
+
throw new Error(
|
|
1672
|
+
`connectors.notion must be an object (got ${JSON.stringify(rawConnectors.notion)}).`
|
|
1673
|
+
);
|
|
1674
|
+
}
|
|
1675
|
+
const rawNotion = rawConnectors.notion && typeof rawConnectors.notion === "object" && !Array.isArray(rawConnectors.notion) ? rawConnectors.notion : {};
|
|
1676
|
+
const notionEnabled = coerceBool(rawNotion.enabled) === true;
|
|
1677
|
+
const notionToken = typeof rawNotion.token === "string" ? rawNotion.token : "";
|
|
1678
|
+
const notionPollCoerced = coerceNumber(rawNotion.pollIntervalMs);
|
|
1679
|
+
let notionPollIntervalMs = 3e5;
|
|
1680
|
+
if (notionPollCoerced !== void 0) {
|
|
1681
|
+
if (!Number.isFinite(notionPollCoerced) || !Number.isInteger(notionPollCoerced) || notionPollCoerced < 1e3 || notionPollCoerced > 864e5) {
|
|
1682
|
+
throw new Error(
|
|
1683
|
+
`connectors.notion.pollIntervalMs must be an integer in [1000, 86400000] ms (got ${JSON.stringify(rawNotion.pollIntervalMs)})`
|
|
1684
|
+
);
|
|
1685
|
+
}
|
|
1686
|
+
notionPollIntervalMs = notionPollCoerced;
|
|
1687
|
+
}
|
|
1688
|
+
let notionDatabaseIds = [];
|
|
1689
|
+
if (rawNotion.databaseIds !== void 0) {
|
|
1690
|
+
if (!Array.isArray(rawNotion.databaseIds)) {
|
|
1691
|
+
throw new Error(
|
|
1692
|
+
`connectors.notion.databaseIds must be an array of strings (got ${typeof rawNotion.databaseIds})`
|
|
1693
|
+
);
|
|
1694
|
+
}
|
|
1695
|
+
const seen = /* @__PURE__ */ new Set();
|
|
1696
|
+
for (const value of rawNotion.databaseIds) {
|
|
1697
|
+
if (typeof value !== "string") {
|
|
1698
|
+
throw new Error(
|
|
1699
|
+
`connectors.notion.databaseIds entries must be strings; found ${typeof value}`
|
|
1700
|
+
);
|
|
1701
|
+
}
|
|
1702
|
+
const trimmed = value.trim();
|
|
1703
|
+
if (trimmed.length === 0) continue;
|
|
1704
|
+
if (seen.has(trimmed)) continue;
|
|
1705
|
+
seen.add(trimmed);
|
|
1706
|
+
notionDatabaseIds.push(trimmed);
|
|
1707
|
+
}
|
|
1708
|
+
}
|
|
1709
|
+
if (rawConnectors.gmail !== void 0 && (rawConnectors.gmail === null || typeof rawConnectors.gmail !== "object" || Array.isArray(rawConnectors.gmail))) {
|
|
1710
|
+
throw new Error(
|
|
1711
|
+
`connectors.gmail must be an object (got ${JSON.stringify(rawConnectors.gmail)}).`
|
|
1712
|
+
);
|
|
1713
|
+
}
|
|
1714
|
+
const rawGmail = rawConnectors.gmail && typeof rawConnectors.gmail === "object" && !Array.isArray(rawConnectors.gmail) ? rawConnectors.gmail : {};
|
|
1715
|
+
const gmailEnabled = coerceBool(rawGmail.enabled) === true;
|
|
1716
|
+
const gmailClientId = typeof rawGmail.clientId === "string" ? rawGmail.clientId : "";
|
|
1717
|
+
const gmailClientSecret = typeof rawGmail.clientSecret === "string" ? rawGmail.clientSecret : "";
|
|
1718
|
+
const gmailRefreshToken = typeof rawGmail.refreshToken === "string" ? rawGmail.refreshToken : "";
|
|
1719
|
+
const gmailUserId = typeof rawGmail.userId === "string" && rawGmail.userId.trim().length > 0 ? rawGmail.userId.trim() : "me";
|
|
1720
|
+
const gmailQuery = typeof rawGmail.query === "string" ? rawGmail.query : "in:inbox";
|
|
1721
|
+
const gmailPollCoerced = coerceNumber(rawGmail.pollIntervalMs);
|
|
1722
|
+
let gmailPollIntervalMs = 3e5;
|
|
1723
|
+
if (rawGmail.pollIntervalMs !== void 0) {
|
|
1724
|
+
if (gmailPollCoerced === void 0) {
|
|
1725
|
+
throw new Error(
|
|
1726
|
+
`connectors.gmail.pollIntervalMs must be a finite number; got ${JSON.stringify(rawGmail.pollIntervalMs)}`
|
|
1727
|
+
);
|
|
1728
|
+
}
|
|
1729
|
+
if (gmailPollCoerced <= 0) {
|
|
1730
|
+
throw new Error(
|
|
1731
|
+
`connectors.gmail.pollIntervalMs must be positive; got ${JSON.stringify(rawGmail.pollIntervalMs)}`
|
|
1732
|
+
);
|
|
1733
|
+
}
|
|
1734
|
+
if (!Number.isInteger(gmailPollCoerced) || gmailPollCoerced < 1e3 || gmailPollCoerced > 864e5) {
|
|
1735
|
+
throw new Error(
|
|
1736
|
+
`connectors.gmail.pollIntervalMs must be an integer in [1000, 86400000] ms (got ${JSON.stringify(rawGmail.pollIntervalMs)})`
|
|
1737
|
+
);
|
|
1738
|
+
}
|
|
1739
|
+
gmailPollIntervalMs = gmailPollCoerced;
|
|
1740
|
+
}
|
|
1741
|
+
if (rawConnectors.github !== void 0 && (rawConnectors.github === null || typeof rawConnectors.github !== "object" || Array.isArray(rawConnectors.github))) {
|
|
1742
|
+
throw new Error(
|
|
1743
|
+
`connectors.github must be an object (got ${JSON.stringify(rawConnectors.github)}).`
|
|
1744
|
+
);
|
|
1745
|
+
}
|
|
1746
|
+
const rawGitHub = rawConnectors.github && typeof rawConnectors.github === "object" && !Array.isArray(rawConnectors.github) ? rawConnectors.github : {};
|
|
1747
|
+
const githubEnabled = coerceBool(rawGitHub.enabled) === true;
|
|
1748
|
+
const githubToken = typeof rawGitHub.token === "string" ? rawGitHub.token : "";
|
|
1749
|
+
const githubUserLogin = typeof rawGitHub.userLogin === "string" ? rawGitHub.userLogin : "";
|
|
1750
|
+
const githubPollCoerced = coerceNumber(rawGitHub.pollIntervalMs);
|
|
1751
|
+
let githubPollIntervalMs = 3e5;
|
|
1752
|
+
if (githubPollCoerced !== void 0) {
|
|
1753
|
+
if (!Number.isFinite(githubPollCoerced) || !Number.isInteger(githubPollCoerced) || githubPollCoerced < 1e3 || githubPollCoerced > 864e5) {
|
|
1754
|
+
throw new Error(
|
|
1755
|
+
`connectors.github.pollIntervalMs must be an integer in [1000, 86400000] ms (got ${JSON.stringify(rawGitHub.pollIntervalMs)})`
|
|
1756
|
+
);
|
|
1757
|
+
}
|
|
1758
|
+
githubPollIntervalMs = githubPollCoerced;
|
|
1759
|
+
}
|
|
1760
|
+
let githubRepos = [];
|
|
1761
|
+
if (rawGitHub.repos !== void 0) {
|
|
1762
|
+
if (!Array.isArray(rawGitHub.repos)) {
|
|
1763
|
+
throw new Error(
|
|
1764
|
+
`connectors.github.repos must be an array of strings (got ${typeof rawGitHub.repos})`
|
|
1765
|
+
);
|
|
1766
|
+
}
|
|
1767
|
+
const seen = /* @__PURE__ */ new Set();
|
|
1768
|
+
for (const value of rawGitHub.repos) {
|
|
1769
|
+
if (typeof value !== "string") {
|
|
1770
|
+
throw new Error(
|
|
1771
|
+
`connectors.github.repos entries must be strings; found ${typeof value}`
|
|
1772
|
+
);
|
|
1773
|
+
}
|
|
1774
|
+
const trimmed = value.trim();
|
|
1775
|
+
if (trimmed.length === 0) continue;
|
|
1776
|
+
if (seen.has(trimmed)) continue;
|
|
1777
|
+
seen.add(trimmed);
|
|
1778
|
+
githubRepos.push(trimmed);
|
|
1779
|
+
}
|
|
1780
|
+
}
|
|
1781
|
+
const githubIncludeDiscussions = coerceBool(rawGitHub.includeDiscussions) === true;
|
|
1782
|
+
return {
|
|
1783
|
+
googleDrive: {
|
|
1784
|
+
enabled: driveEnabled,
|
|
1785
|
+
clientId: driveClientId,
|
|
1786
|
+
clientSecret: driveClientSecret,
|
|
1787
|
+
refreshToken: driveRefreshToken,
|
|
1788
|
+
pollIntervalMs: drivePollIntervalMs,
|
|
1789
|
+
folderIds: driveFolderIds
|
|
1790
|
+
},
|
|
1791
|
+
notion: {
|
|
1792
|
+
enabled: notionEnabled,
|
|
1793
|
+
token: notionToken,
|
|
1794
|
+
databaseIds: notionDatabaseIds,
|
|
1795
|
+
pollIntervalMs: notionPollIntervalMs
|
|
1796
|
+
},
|
|
1797
|
+
gmail: {
|
|
1798
|
+
enabled: gmailEnabled,
|
|
1799
|
+
clientId: gmailClientId,
|
|
1800
|
+
clientSecret: gmailClientSecret,
|
|
1801
|
+
refreshToken: gmailRefreshToken,
|
|
1802
|
+
userId: gmailUserId,
|
|
1803
|
+
query: gmailQuery,
|
|
1804
|
+
pollIntervalMs: gmailPollIntervalMs
|
|
1805
|
+
},
|
|
1806
|
+
github: {
|
|
1807
|
+
enabled: githubEnabled,
|
|
1808
|
+
token: githubToken,
|
|
1809
|
+
userLogin: githubUserLogin,
|
|
1810
|
+
repos: githubRepos,
|
|
1811
|
+
pollIntervalMs: githubPollIntervalMs,
|
|
1812
|
+
includeDiscussions: githubIncludeDiscussions
|
|
1813
|
+
}
|
|
1814
|
+
};
|
|
1815
|
+
})(),
|
|
1349
1816
|
// MECE Taxonomy (#366)
|
|
1350
1817
|
// Coerce string booleans from CLI (e.g. --config taxonomyEnabled=true) — gotcha #36
|
|
1351
1818
|
taxonomyEnabled: coerceBool(cfg.taxonomyEnabled) ?? false,
|
|
@@ -1360,9 +1827,10 @@ function parseConfig(raw) {
|
|
|
1360
1827
|
// Codex CLI — marketplace integration (#418)
|
|
1361
1828
|
codexMarketplaceEnabled: cfg.codexMarketplaceEnabled !== false,
|
|
1362
1829
|
// default: true
|
|
1363
|
-
// Page-level versioning (issue #371)
|
|
1364
|
-
|
|
1365
|
-
|
|
1830
|
+
// Page-level versioning (issue #371). Issue #678 PR 2/4:
|
|
1831
|
+
// dreams.phases.deepSleep.* WINS over legacy keys.
|
|
1832
|
+
versioningEnabled: dreamsDeepSleep.enabled && dreamsDeepSleep.versioningEnabled,
|
|
1833
|
+
versioningMaxPerPage: dreamsDeepSleep.versioningMaxPerPage,
|
|
1366
1834
|
versioningSidecarDir: typeof cfg.versioningSidecarDir === "string" && cfg.versioningSidecarDir.trim().length > 0 ? cfg.versioningSidecarDir.trim() : ".versions",
|
|
1367
1835
|
// Binary file lifecycle management (#367)
|
|
1368
1836
|
binaryLifecycleEnabled: cfg.binaryLifecycleEnabled === true,
|
|
@@ -1408,6 +1876,17 @@ function clampNonNegativeNumber(value) {
|
|
|
1408
1876
|
if (typeof value !== "number" || !Number.isFinite(value)) return void 0;
|
|
1409
1877
|
return Math.max(0, Math.floor(value));
|
|
1410
1878
|
}
|
|
1879
|
+
function coerceNonNegativeInt(value, fallback, keyName) {
|
|
1880
|
+
if (value === void 0 || value === null) return fallback;
|
|
1881
|
+
const coerced = coerceNumber(value);
|
|
1882
|
+
if (coerced === void 0 || coerced < 0) {
|
|
1883
|
+
const label = keyName ? ` (${keyName})` : "";
|
|
1884
|
+
throw new Error(
|
|
1885
|
+
`config value${label} must be a non-negative finite number; got ${JSON.stringify(value)}`
|
|
1886
|
+
);
|
|
1887
|
+
}
|
|
1888
|
+
return Math.floor(coerced);
|
|
1889
|
+
}
|
|
1411
1890
|
function clampSurpriseThreshold(value, fallback) {
|
|
1412
1891
|
if (value === void 0) return fallback;
|
|
1413
1892
|
return Math.min(1, Math.max(0, value));
|
|
@@ -1603,7 +2082,8 @@ function buildRecallPipelineConfig(cfg) {
|
|
|
1603
2082
|
|
|
1604
2083
|
export {
|
|
1605
2084
|
coerceInstallExtension,
|
|
2085
|
+
DEFAULT_REASONING_MODEL,
|
|
1606
2086
|
VALID_MEMORY_CATEGORIES,
|
|
1607
2087
|
parseConfig
|
|
1608
2088
|
};
|
|
1609
|
-
//# sourceMappingURL=chunk-
|
|
2089
|
+
//# sourceMappingURL=chunk-JWSENLQI.js.map
|