@remnic/core 9.65.1 → 9.65.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/access-admin-ops-surface.d.ts +11 -11
- package/dist/access-admin-ops-surface.js +35 -34
- package/dist/access-authorization-probe.d.ts +12 -13
- package/dist/access-authorization-probe.js +36 -35
- package/dist/access-boundary.d.ts +12 -156
- package/dist/access-boundary.js +35 -34
- package/dist/access-cli.js +107 -104
- package/dist/access-cli.js.map +1 -1
- package/dist/access-coding-context-resolution.d.ts +1 -1
- package/dist/access-extraction-force-flush.d.ts +11 -11
- package/dist/access-extraction-force-flush.js +35 -34
- package/dist/access-health-types.d.ts +1 -1
- package/dist/access-http-lcm-compaction.d.ts +11 -11
- package/dist/access-http-lifecycle-flush.d.ts +12 -13
- package/dist/access-http-offline-stream.d.ts +11 -11
- package/dist/access-http-query.d.ts +2 -2
- package/dist/access-http-query.js +37 -36
- package/dist/access-http.d.ts +12 -12
- package/dist/access-http.js +54 -53
- package/dist/access-identity-continuity-surface.d.ts +9 -9
- package/dist/access-identity-continuity-surface.js +35 -34
- package/dist/access-lcm-surface.d.ts +11 -11
- package/dist/access-lcm-surface.js +35 -34
- package/dist/access-mcp-admin-tools.js +1 -1
- package/dist/access-mcp-output-schemas.js +1 -1
- package/dist/access-mcp.d.ts +11 -11
- package/dist/access-mcp.js +47 -44
- package/dist/access-memory-search-fanout.d.ts +2 -2
- package/dist/{access-namespace-preflight-BKUnKsBv.d.ts → access-namespace-preflight-Dhvcl-T0.d.ts} +1 -1
- package/dist/access-namespace-preflight.d.ts +3 -3
- package/dist/access-namespace-preflight.js +35 -34
- package/dist/access-observe-write-surface.d.ts +11 -11
- package/dist/access-observe-write-surface.js +35 -34
- package/dist/access-offline-manifest.d.ts +9 -9
- package/dist/access-offline-manifest.js +5 -5
- package/dist/access-operations-batch.js +38 -37
- package/dist/access-operations.d.ts +18 -19
- package/dist/access-operations.js +41 -40
- package/dist/access-recall-concurrency.d.ts +11 -11
- package/dist/access-recall-concurrency.js +35 -34
- package/dist/access-recall-response.d.ts +11 -11
- package/dist/access-recall-response.js +35 -34
- package/dist/access-recall-surface.d.ts +11 -11
- package/dist/access-recall-surface.js +35 -34
- package/dist/access-schema.d.ts +118 -118
- package/dist/access-schema.js +3 -3
- package/dist/{access-service-B1Lbb-nQ.d.ts → access-service-Bke1alZO.d.ts} +478 -74
- package/dist/access-service-helpers.d.ts +11 -11
- package/dist/access-service.d.ts +11 -11
- package/dist/access-service.js +35 -34
- package/dist/access-surface-catalog.d.ts +12 -13
- package/dist/access-surface-catalog.js +39 -36
- package/dist/access-surface-catalog.js.map +1 -1
- package/dist/access-wearables-meetings-surface.d.ts +3 -3
- package/dist/action-confidence.d.ts +1 -1
- package/dist/active-memory-bridge.d.ts +1 -1
- package/dist/active-recall.d.ts +1 -1
- package/dist/active-recall.js +6 -1
- package/dist/active-recall.js.map +1 -1
- package/dist/adapters/index.js +4 -4
- package/dist/adapters/registry.js +2 -2
- package/dist/ambient-provenance.d.ts +1 -1
- package/dist/artifact-search.d.ts +1 -1
- package/dist/{auto-sync-5L7EUZ27.js → auto-sync-H64ZCNIR.js} +13 -5
- package/dist/{auto-sync-5L7EUZ27.js.map → auto-sync-H64ZCNIR.js.map} +1 -1
- package/dist/behavior-learner.d.ts +1 -1
- package/dist/behavior-signals.d.ts +1 -1
- package/dist/bootstrap.d.ts +9 -9
- package/dist/briefing-window.d.ts +2 -2
- package/dist/briefing.d.ts +2 -2
- package/dist/briefing.js +16 -15
- package/dist/buffer-surprise-report.d.ts +1 -1
- package/dist/buffer-turn-helpers.d.ts +1 -1
- package/dist/buffer.d.ts +2 -2
- package/dist/buffer.js +4 -4
- package/dist/bulk-import/index.d.ts +3 -3
- package/dist/calibration.d.ts +1 -1
- package/dist/calibration.js +1 -1
- package/dist/capabilities.d.ts +1 -1
- package/dist/{capsule-crypto-7FJQINUR.js → capsule-crypto-YO5QJ6L3.js} +2 -2
- package/dist/{catalog-DjVhJoRM.d.ts → catalog-DV6qnbr7.d.ts} +1 -1
- package/dist/causal-behavior.d.ts +1 -1
- package/dist/causal-consolidation.d.ts +1 -1
- package/dist/causal-consolidation.js +17 -16
- package/dist/causal-consolidation.js.map +1 -1
- package/dist/causal-trajectory-graph.d.ts +1 -1
- package/dist/{chunk-LYIZXQYY.js → chunk-2E36UXVW.js} +2 -2
- package/dist/{chunk-7QFBLYFP.js → chunk-2XDWWPTN.js} +3 -3
- package/dist/{chunk-CFRBTATE.js → chunk-2YI72KM3.js} +3 -3
- package/dist/{chunk-3YTTAGPB.js → chunk-3DVBKTSO.js} +2 -2
- package/dist/{chunk-VPGRXEAB.js → chunk-3I7ASZN3.js} +2 -2
- package/dist/{chunk-EIR5VLIH.js → chunk-4K7IW3F7.js} +2 -2
- package/dist/chunk-4K7IW3F7.js.map +1 -0
- package/dist/{chunk-WTOE7CW4.js → chunk-4KYOLI6M.js} +13 -13
- package/dist/chunk-573TEZCD.js +88 -0
- package/dist/chunk-573TEZCD.js.map +1 -0
- package/dist/{chunk-ESCQ6LY7.js → chunk-5NM4OH4P.js} +3 -3
- package/dist/{chunk-Y23B2QXP.js → chunk-5YQ63T4B.js} +2 -2
- package/dist/{chunk-PMVPCZJZ.js → chunk-6433HV72.js} +2 -2
- package/dist/{chunk-4NZHHGVL.js → chunk-7BDZTALN.js} +4 -1
- package/dist/chunk-7BDZTALN.js.map +1 -0
- package/dist/{chunk-NS5ETDYD.js → chunk-7BEPVIH3.js} +3 -3
- package/dist/{chunk-JG22O53B.js → chunk-7CBKAQIG.js} +2 -1
- package/dist/chunk-7CBKAQIG.js.map +1 -0
- package/dist/{chunk-W6TSGWYS.js → chunk-7YQ4IYS2.js} +2 -2
- package/dist/chunk-AAXJNINV.js +55 -0
- package/dist/chunk-AAXJNINV.js.map +1 -0
- package/dist/{chunk-YQ3CBLL4.js → chunk-BWLRUMOG.js} +78 -8
- package/dist/chunk-BWLRUMOG.js.map +1 -0
- package/dist/{chunk-2NLLXCJG.js → chunk-BXLOS5AJ.js} +2 -2
- package/dist/{chunk-CEH2AFXG.js → chunk-C24UZSFW.js} +6 -6
- package/dist/{chunk-ZPN7W3OP.js → chunk-CDUUDBWJ.js} +3 -3
- package/dist/{chunk-5UYSCYR7.js → chunk-CT56C22C.js} +4 -4
- package/dist/{chunk-HJQZQUPC.js → chunk-DJZWNKFO.js} +5 -5
- package/dist/{chunk-X7Y7WX73.js → chunk-DQEMWVMT.js} +1 -1
- package/dist/{chunk-CCTVAVTT.js → chunk-DZUJ46DO.js} +2 -2
- package/dist/{chunk-N6TRHP72.js → chunk-EILZG5VC.js} +2 -2
- package/dist/{chunk-GXWDWOWP.js → chunk-GDFVPUJ5.js} +2 -2
- package/dist/{chunk-7PWWGYGO.js → chunk-GNCCUR6K.js} +2 -2
- package/dist/{chunk-KPBLJCCV.js → chunk-IID2CMUU.js} +2 -2
- package/dist/{chunk-DEFI2QBT.js → chunk-J275IYMG.js} +25 -22
- package/dist/chunk-J275IYMG.js.map +1 -0
- package/dist/{chunk-UYCIS6V5.js → chunk-JCWY73FK.js} +2 -2
- package/dist/{chunk-SYJ6EKKE.js → chunk-JYYBA7TF.js} +2 -2
- package/dist/{chunk-T42L3S6A.js → chunk-LBWQ65SX.js} +4 -4
- package/dist/{chunk-MSTNSVXI.js → chunk-LDBFXD4F.js} +2 -1
- package/dist/chunk-LDBFXD4F.js.map +1 -0
- package/dist/{chunk-LWVO2QZV.js → chunk-LGO6A7GJ.js} +50 -50
- package/dist/{chunk-CEQF6L5K.js → chunk-LUNJ3WFO.js} +9 -7
- package/dist/chunk-LUNJ3WFO.js.map +1 -0
- package/dist/{chunk-2572MRP2.js → chunk-LZH5FR2W.js} +2 -2
- package/dist/{chunk-256FBCVX.js → chunk-M4AHBM72.js} +7 -7
- package/dist/{chunk-YEQEGSJA.js → chunk-MN4KB2A4.js} +3 -3
- package/dist/{chunk-AGKIG3YA.js → chunk-NKKD4ZAU.js} +2 -2
- package/dist/{chunk-3TMYV3LP.js → chunk-NTWN6HB2.js} +5 -5
- package/dist/{chunk-63FHSH7E.js → chunk-OCZIYAE5.js} +4 -4
- package/dist/{chunk-I2HTKOOP.js → chunk-ODZG724P.js} +2 -2
- package/dist/{chunk-HQSBYI5X.js → chunk-OTHZWLUD.js} +2 -2
- package/dist/{chunk-4W6INNXO.js → chunk-PE255F4T.js} +2 -2
- package/dist/{chunk-6L27N6YI.js → chunk-QOS5LBZN.js} +2 -2
- package/dist/{chunk-G72IPMR7.js → chunk-R4OCGPSH.js} +2 -2
- package/dist/{chunk-MIBKEW7A.js → chunk-R7JAM2XF.js} +3 -3
- package/dist/{chunk-LCU5R6TQ.js → chunk-RAIUTAZZ.js} +22 -3
- package/dist/chunk-RAIUTAZZ.js.map +1 -0
- package/dist/chunk-RIAM7DND.js +167 -0
- package/dist/chunk-RIAM7DND.js.map +1 -0
- package/dist/{chunk-JBPKEARU.js → chunk-RKNJBZ55.js} +4 -4
- package/dist/{chunk-HUNSEO5U.js → chunk-S2DPMJXH.js} +2 -2
- package/dist/{chunk-3PXVYJMC.js → chunk-SB7D4BT7.js} +536 -114
- package/dist/chunk-SB7D4BT7.js.map +1 -0
- package/dist/{chunk-JFJ3MHGV.js → chunk-SBDCZ2AX.js} +1 -1
- package/dist/chunk-SBDCZ2AX.js.map +1 -0
- package/dist/{chunk-HQSPXTQO.js → chunk-SIHSCCUQ.js} +1 -1
- package/dist/{chunk-R3AAOKR2.js → chunk-SPUJNJJC.js} +2 -2
- package/dist/{chunk-IAY7YBXS.js → chunk-SQI57UCJ.js} +2 -2
- package/dist/{chunk-CTQRPANJ.js → chunk-SVSRPG6M.js} +2 -2
- package/dist/{chunk-56BSXSHC.js → chunk-TBOJ76ER.js} +14 -1
- package/dist/{chunk-56BSXSHC.js.map → chunk-TBOJ76ER.js.map} +1 -1
- package/dist/{chunk-Z54TXZ2F.js → chunk-TF77C7SV.js} +14 -7
- package/dist/chunk-TF77C7SV.js.map +1 -0
- package/dist/{chunk-S2VBSTTA.js → chunk-THG4GYIE.js} +2 -2
- package/dist/{chunk-IXRC7EQG.js → chunk-TR7DGXGI.js} +2 -2
- package/dist/{chunk-GEULB2VI.js → chunk-TZNQUNKL.js} +7 -1
- package/dist/chunk-TZNQUNKL.js.map +1 -0
- package/dist/{chunk-BC4QD3FM.js → chunk-UIN2BWDD.js} +2 -2
- package/dist/{chunk-JTSVMJHV.js → chunk-UXO5IMBK.js} +3 -3
- package/dist/{chunk-DBXZZIDU.js → chunk-V3MXUL3D.js} +138 -73
- package/dist/chunk-V3MXUL3D.js.map +1 -0
- package/dist/{chunk-KQAFEZQX.js → chunk-VDX2J7OX.js} +2 -2
- package/dist/{chunk-MUJ4QFUQ.js → chunk-W4BMEGQA.js} +4 -4
- package/dist/{chunk-5HK3CJAR.js → chunk-W675UJCZ.js} +2 -2
- package/dist/{chunk-MDVBCPOS.js → chunk-XCTXS7VY.js} +2 -2
- package/dist/{chunk-53ENM6F6.js → chunk-XRYZRW54.js} +2 -2
- package/dist/{chunk-VJ6ECBIP.js → chunk-Y7DK7HHJ.js} +2 -2
- package/dist/{chunk-3MADV4YC.js → chunk-YB42WZCY.js} +2 -2
- package/dist/{chunk-X5SDZMO7.js → chunk-YHCBJULX.js} +2 -2
- package/dist/{chunk-3RHFGGI5.js → chunk-YLDXWCZP.js} +20 -5
- package/dist/chunk-YLDXWCZP.js.map +1 -0
- package/dist/{chunk-6JJT5AKI.js → chunk-Z7PBQPJ4.js} +2 -2
- package/dist/{chunk-ALCJRQ72.js → chunk-ZO6AXLEH.js} +2 -2
- package/dist/{chunk-VZVP2W4O.js → chunk-ZQHI2BZB.js} +2 -2
- package/dist/{chunk-CUS6S7PN.js → chunk-ZWXJBFZU.js} +9 -9
- package/dist/chunk-ZWXJBFZU.js.map +1 -0
- package/dist/{cli-Pulnz-qm.d.ts → cli-cShQ13XG.d.ts} +5 -5
- package/dist/cli.d.ts +13 -13
- package/dist/cli.js +77 -75
- package/dist/coding/pre-action-gate.d.ts +1 -1
- package/dist/compounding/engine.d.ts +2 -2
- package/dist/compounding/engine.js +17 -16
- package/dist/compounding/preference-consolidator.d.ts +1 -1
- package/dist/compression-optimizer.d.ts +1 -1
- package/dist/config.d.ts +1 -1
- package/dist/config.js +6 -1
- package/dist/connectors/codex-materialize-runner.d.ts +1 -1
- package/dist/connectors/codex-materialize-runner.js +16 -15
- package/dist/connectors/codex-materialize.d.ts +1 -1
- package/dist/connectors/index.d.ts +1 -1
- package/dist/connectors/index.js +16 -15
- package/dist/consolidation-provenance-check.d.ts +2 -2
- package/dist/consolidation-undo.d.ts +2 -2
- package/dist/contradiction/index.d.ts +2 -2
- package/dist/contradiction/index.js +10 -2
- package/dist/converge-config.d.ts +1 -1
- package/dist/convergence-refresh.d.ts +2 -2
- package/dist/convergence-refresh.js +18 -17
- package/dist/conversation-index/backend.d.ts +1 -1
- package/dist/conversation-index/chunker.d.ts +1 -1
- package/dist/conversation-index/faiss-adapter.d.ts +1 -1
- package/dist/conversation-index/indexer.d.ts +1 -1
- package/dist/conversation-index/search.d.ts +1 -1
- package/dist/corpus-watermark.d.ts +1 -1
- package/dist/corpus-watermark.js +18 -17
- package/dist/cross-lingual-recall.d.ts +1 -1
- package/dist/day-summary.d.ts +1 -1
- package/dist/delinearize.d.ts +1 -1
- package/dist/dependency-propagation-config.d.ts +1 -1
- package/dist/{dependency-propagation-delivery-Co17gxYb.d.ts → dependency-propagation-delivery-CsGg-VwS.d.ts} +1 -1
- package/dist/direct-answer-wiring.d.ts +1 -1
- package/dist/direct-answer.d.ts +1 -1
- package/dist/embedding-fallback.d.ts +1 -1
- package/dist/enrichment/index.d.ts +1 -1
- package/dist/entity-origin-fields.d.ts +1 -1
- package/dist/entity-retrieval.d.ts +2 -2
- package/dist/entity-retrieval.js +16 -15
- package/dist/entity-schema.d.ts +1 -1
- package/dist/episodic-context.d.ts +1 -1
- package/dist/explicit-capture.d.ts +9 -9
- package/dist/explicit-capture.js +7 -6
- package/dist/external-wiki-access.d.ts +12 -13
- package/dist/external-wiki-access.js +36 -35
- package/dist/external-wiki-collection-registration.d.ts +1 -1
- package/dist/external-wiki-collection.d.ts +1 -1
- package/dist/external-wiki-mcp-tools.d.ts +11 -11
- package/dist/extraction-error-classification.d.ts +1 -1
- package/dist/extraction-faithfulness.d.ts +1 -1
- package/dist/extraction-judge-telemetry.d.ts +1 -1
- package/dist/extraction-judge-training.d.ts +1 -1
- package/dist/extraction-judge.d.ts +1 -1
- package/dist/extraction-judge.js +2 -2
- package/dist/extraction-liveness.d.ts +1 -1
- package/dist/extraction-normalization.d.ts +1 -1
- package/dist/extraction-normalization.js +2 -2
- package/dist/extraction-prompt.d.ts +2 -2
- package/dist/extraction-prompt.js +1 -1
- package/dist/extraction-source-grounding-rules.d.ts +1 -1
- package/dist/extraction-source-grounding.d.ts +1 -1
- package/dist/extraction.d.ts +1 -1
- package/dist/extraction.js +22 -21
- package/dist/fallback-llm.d.ts +1 -1
- package/dist/graph-dashboard-diff.d.ts +1 -1
- package/dist/graph-dashboard-key.d.ts +1 -1
- package/dist/graph-dashboard-parser.d.ts +1 -1
- package/dist/graph-edge-reinforcement.d.ts +1 -1
- package/dist/graph-path-reconstruction.d.ts +1 -1
- package/dist/graph-path-scoring.d.ts +1 -1
- package/dist/graph-snapshot.d.ts +1 -1
- package/dist/graph.d.ts +1 -1
- package/dist/harmonic-retrieval.js +1 -1
- package/dist/importance.d.ts +1 -1
- package/dist/importers/index.d.ts +1 -1
- package/dist/in-flight-reads.d.ts +1 -1
- package/dist/index.d.ts +716 -699
- package/dist/index.js +173 -125
- package/dist/intent.d.ts +1 -1
- package/dist/lcm/engine.d.ts +1 -1
- package/dist/lcm/engine.js +3 -3
- package/dist/lcm/index.d.ts +1 -1
- package/dist/lcm/index.js +6 -6
- package/dist/lcm/tools.d.ts +1 -1
- package/dist/lifecycle.d.ts +1 -1
- package/dist/live-connectors-runner.d.ts +1 -1
- package/dist/local-llm.d.ts +1 -1
- package/dist/local-model-endpoint.d.ts +1 -1
- package/dist/maintenance/memory-governance.d.ts +1 -1
- package/dist/maintenance/memory-governance.js +16 -15
- package/dist/maintenance/rebuild-memory-lifecycle-ledger.d.ts +2 -2
- package/dist/maintenance/rebuild-memory-lifecycle-ledger.js +16 -15
- package/dist/maintenance/rebuild-memory-projection.d.ts +2 -2
- package/dist/maintenance/rebuild-memory-projection.js +17 -16
- package/dist/{maintenance-DiSLtVN7.d.ts → maintenance-jhMpeGne.d.ts} +3 -3
- package/dist/mcp-memory-inspector-app.d.ts +11 -11
- package/dist/mcp-read-only-tools.js +1 -1
- package/dist/memory-action-policy.d.ts +1 -1
- package/dist/memory-cache.d.ts +1 -1
- package/dist/memory-lifecycle-ledger-utils.d.ts +1 -1
- package/dist/memory-projection-store.d.ts +1 -1
- package/dist/memory-provenance.d.ts +1 -1
- package/dist/memory-snapshot.d.ts +1 -1
- package/dist/memory-subject-cli.d.ts +177 -0
- package/dist/memory-subject-cli.js +16 -0
- package/dist/memory-subject.d.ts +128 -0
- package/dist/memory-subject.js +44 -0
- package/dist/memory-subject.js.map +1 -0
- package/dist/memory-worth-outcomes.d.ts +5 -4
- package/dist/memory-worth-outcomes.js +1 -1
- package/dist/models-json.d.ts +1 -1
- package/dist/namespaces/migrate.d.ts +3 -3
- package/dist/namespaces/migrate.js +17 -16
- package/dist/namespaces/principal.d.ts +1 -1
- package/dist/namespaces/search.d.ts +1 -1
- package/dist/namespaces/search.js +6 -6
- package/dist/namespaces/storage.d.ts +3 -3
- package/dist/namespaces/storage.js +16 -15
- package/dist/native-knowledge.d.ts +1 -1
- package/dist/offline-sync-impression-drain.d.ts +1 -1
- package/dist/operator-doctor-corpus.d.ts +1 -1
- package/dist/operator-doctor-corpus.js +19 -18
- package/dist/operator-doctor-replica.d.ts +1 -1
- package/dist/operator-toolkit.d.ts +3 -3
- package/dist/operator-toolkit.js +26 -24
- package/dist/orchestration/compression-guideline-coordinator.d.ts +2 -2
- package/dist/orchestration/maintenance.d.ts +4 -4
- package/dist/orchestration/maintenance.js +22 -21
- package/dist/{orchestrator-DzCaxNS4.d.ts → orchestrator-DyGUC7re.d.ts} +8 -8
- package/dist/orchestrator.d.ts +9 -9
- package/dist/orchestrator.js +108 -105
- package/dist/patterns-cli.d.ts +1 -1
- package/dist/{pipeline-HJ8DKbFl.d.ts → pipeline-C25Oxtp1.d.ts} +1 -1
- package/dist/policy-runtime.d.ts +1 -1
- package/dist/proactive-contention.d.ts +1 -1
- package/dist/provenance.d.ts +1 -1
- package/dist/{public-http-DwXauTX3.d.ts → public-http-CMe7NQzj.d.ts} +1 -1
- package/dist/{qmd-BzxluoLt.d.ts → qmd-DkDVCbgF.d.ts} +1 -1
- package/dist/qmd-preflight.d.ts +2 -2
- package/dist/qmd-recall-cache.d.ts +1 -1
- package/dist/qmd.d.ts +2 -2
- package/dist/qmd.js +4 -4
- package/dist/recall-concurrency-config.d.ts +1 -1
- package/dist/recall-disclosure-escalation.d.ts +1 -1
- package/dist/recall-explain-renderer.d.ts +1 -1
- package/dist/recall-explain-renderer.js +3 -3
- package/dist/recall-memory-map.d.ts +1 -1
- package/dist/recall-planner-llm.d.ts +1 -1
- package/dist/recall-state.d.ts +1 -1
- package/dist/recall-tag-filter.d.ts +1 -1
- package/dist/recall-timings.d.ts +1 -1
- package/dist/recall-xray-cli.d.ts +1 -1
- package/dist/recall-xray-cli.js +4 -4
- package/dist/recall-xray-renderer.d.ts +1 -1
- package/dist/recall-xray-renderer.js +3 -3
- package/dist/recall-xray.d.ts +1 -1
- package/dist/recall-xray.js +2 -2
- package/dist/reconcile/cursor.d.ts +1 -1
- package/dist/reconcile/manifest.d.ts +1 -1
- package/dist/reconcile/manifest.js +3 -3
- package/dist/reconcile/plan.d.ts +1 -1
- package/dist/replay/normalizers/chatgpt.d.ts +1 -1
- package/dist/replay/normalizers/claude.d.ts +1 -1
- package/dist/replay/normalizers/openclaw.d.ts +1 -1
- package/dist/replay/normalizers/shared.d.ts +1 -1
- package/dist/replay/runner.d.ts +1 -1
- package/dist/replay/types.d.ts +1 -1
- package/dist/replica-divergence.d.ts +1 -1
- package/dist/replica-peers-config.d.ts +1 -1
- package/dist/{resolution-DKMBPXHI.js → resolution-MFY72STR.js} +11 -3
- package/dist/resolution-MFY72STR.js.map +1 -0
- package/dist/resolve-auth-token.d.ts +1 -1
- package/dist/resume-bundles.js +7 -2
- package/dist/retrieval-agents.d.ts +2 -2
- package/dist/retrieval-tiers.d.ts +1 -1
- package/dist/routing/engine.d.ts +1 -1
- package/dist/routing/store.d.ts +1 -1
- package/dist/salvage-envelope.d.ts +1 -1
- package/dist/salvage-envelope.js +10 -2
- package/dist/schemas.d.ts +104 -90
- package/dist/schemas.js +1 -1
- package/dist/{scope-profiles-CEMZz0t5.d.ts → scope-profiles-B9xMoFO-.d.ts} +1 -1
- package/dist/search/embed-helper.d.ts +1 -1
- package/dist/search/factory.d.ts +1 -1
- package/dist/search/factory.js +5 -5
- package/dist/search/index.d.ts +1 -1
- package/dist/search/index.js +9 -9
- package/dist/search/lancedb-backend.d.ts +1 -1
- package/dist/search/meilisearch-backend.d.ts +1 -1
- package/dist/search/noop-backend.d.ts +1 -1
- package/dist/search/orama-backend.d.ts +1 -1
- package/dist/search/port.d.ts +1 -1
- package/dist/search/remote-backend.d.ts +1 -1
- package/dist/{semantic-consolidation-D9dYj6vu.d.ts → semantic-consolidation-C4uykW84.d.ts} +1 -1
- package/dist/semantic-consolidation.d.ts +2 -2
- package/dist/semantic-consolidation.js +17 -16
- package/dist/semantic-rule-promotion.js +16 -15
- package/dist/semantic-rule-verifier.d.ts +1 -1
- package/dist/semantic-rule-verifier.js +16 -15
- package/dist/{service-_qgST_0y.d.ts → service-DCZDZNcV.d.ts} +2 -2
- package/dist/session-observer-bands.d.ts +1 -1
- package/dist/session-observer-state.d.ts +1 -1
- package/dist/shared-context/manager.d.ts +11 -11
- package/dist/signal.d.ts +1 -1
- package/dist/source-agent-qualifier.d.ts +1 -1
- package/dist/source-agent-qualifier.js +18 -17
- package/dist/{storage-B9lbNTYE.d.ts → storage-CcKmEjL8.d.ts} +3 -2
- package/dist/storage.d.ts +2 -2
- package/dist/storage.js +18 -17
- package/dist/subject-config.d.ts +38 -0
- package/dist/subject-config.js +20 -0
- package/dist/subject-config.js.map +1 -0
- package/dist/summarizer.d.ts +1 -1
- package/dist/summary-snapshot.d.ts +1 -1
- package/dist/support-passport/index.d.ts +14 -14
- package/dist/support-passport/index.js +38 -37
- package/dist/temporal-supersession.d.ts +2 -2
- package/dist/temporal-timeline-recall.d.ts +1 -1
- package/dist/temporal-validity.d.ts +1 -1
- package/dist/threading.d.ts +1 -1
- package/dist/tier-migration.d.ts +2 -2
- package/dist/tier-routing.d.ts +1 -1
- package/dist/topics.d.ts +1 -1
- package/dist/transcript.d.ts +1 -1
- package/dist/transfer/backup.js +2 -2
- package/dist/transfer/capsule-export.js +2 -2
- package/dist/transfer/capsule-import.js +2 -2
- package/dist/transfer/types.d.ts +66 -66
- package/dist/trust-score-stage.d.ts +1 -1
- package/dist/trust-score.d.ts +1 -1
- package/dist/{types-BrEzuxPA.d.ts → types-Pi0lfaEt.d.ts} +38 -29
- package/dist/types.d.ts +1 -1
- package/dist/types.js +1 -1
- package/dist/utility-runtime.d.ts +1 -1
- package/dist/verified-recall.js +16 -15
- package/dist/who-knows-cli.d.ts +11 -11
- package/dist/who-knows-cli.js +17 -16
- package/dist/who-knows.d.ts +11 -11
- package/dist/who-knows.js +16 -15
- package/dist/write-envelope.d.ts +5 -2
- package/dist/write-envelope.js +10 -1
- package/package.json +2 -2
- package/scripts/build-with-heap.mjs +1 -1
- package/src/access-boundary.ts +2 -0
- package/src/access-mcp-admin-tools.ts +14 -0
- package/src/access-mcp-output-schemas.ts +6 -0
- package/src/access-mcp.ts +6 -6
- package/src/access-operations-batch.ts +8 -0
- package/src/access-service.ts +85 -0
- package/src/access-surface-catalog.ts +2 -0
- package/src/config.ts +10 -17
- package/src/extraction-prompt.ts +1 -0
- package/src/extraction.ts +4 -1
- package/src/index.ts +5 -6
- package/src/mcp-read-only-tools.ts +1 -0
- package/src/memory-subject-cli.ts +135 -0
- package/src/memory-subject.test.ts +48 -0
- package/src/memory-subject.ts +314 -0
- package/src/memory-worth-outcomes.test.ts +6 -2
- package/src/memory-worth-outcomes.ts +11 -7
- package/src/operator-toolkit.ts +1 -1
- package/src/orchestration/extraction-persist.ts +48 -48
- package/src/orchestration/recall-internal.ts +6 -5
- package/src/procedural/library-maintenance.test.ts +582 -0
- package/src/procedural/library-maintenance.ts +546 -0
- package/src/procedural/maintenance-config.ts +78 -0
- package/src/procedural/procedure-recall.ts +29 -1
- package/src/procedural/procedure-stats.ts +20 -0
- package/src/schemas.ts +7 -0
- package/src/spaces/index.ts +38 -2
- package/src/storage.ts +6 -2
- package/src/subject-config.ts +80 -0
- package/src/types.ts +26 -29
- package/src/write-envelope.test.ts +14 -0
- package/src/write-envelope.ts +24 -3
- package/dist/chunk-3PXVYJMC.js.map +0 -1
- package/dist/chunk-3RHFGGI5.js.map +0 -1
- package/dist/chunk-4NZHHGVL.js.map +0 -1
- package/dist/chunk-CEQF6L5K.js.map +0 -1
- package/dist/chunk-CUS6S7PN.js.map +0 -1
- package/dist/chunk-DBXZZIDU.js.map +0 -1
- package/dist/chunk-DEFI2QBT.js.map +0 -1
- package/dist/chunk-EIR5VLIH.js.map +0 -1
- package/dist/chunk-GEULB2VI.js.map +0 -1
- package/dist/chunk-JFJ3MHGV.js.map +0 -1
- package/dist/chunk-JG22O53B.js.map +0 -1
- package/dist/chunk-LCU5R6TQ.js.map +0 -1
- package/dist/chunk-MSTNSVXI.js.map +0 -1
- package/dist/chunk-YQ3CBLL4.js.map +0 -1
- package/dist/chunk-Z54TXZ2F.js.map +0 -1
- /package/dist/{capsule-crypto-7FJQINUR.js.map → capsule-crypto-YO5QJ6L3.js.map} +0 -0
- /package/dist/{chunk-LYIZXQYY.js.map → chunk-2E36UXVW.js.map} +0 -0
- /package/dist/{chunk-7QFBLYFP.js.map → chunk-2XDWWPTN.js.map} +0 -0
- /package/dist/{chunk-CFRBTATE.js.map → chunk-2YI72KM3.js.map} +0 -0
- /package/dist/{chunk-3YTTAGPB.js.map → chunk-3DVBKTSO.js.map} +0 -0
- /package/dist/{chunk-VPGRXEAB.js.map → chunk-3I7ASZN3.js.map} +0 -0
- /package/dist/{chunk-WTOE7CW4.js.map → chunk-4KYOLI6M.js.map} +0 -0
- /package/dist/{chunk-ESCQ6LY7.js.map → chunk-5NM4OH4P.js.map} +0 -0
- /package/dist/{chunk-Y23B2QXP.js.map → chunk-5YQ63T4B.js.map} +0 -0
- /package/dist/{chunk-PMVPCZJZ.js.map → chunk-6433HV72.js.map} +0 -0
- /package/dist/{chunk-NS5ETDYD.js.map → chunk-7BEPVIH3.js.map} +0 -0
- /package/dist/{chunk-W6TSGWYS.js.map → chunk-7YQ4IYS2.js.map} +0 -0
- /package/dist/{chunk-2NLLXCJG.js.map → chunk-BXLOS5AJ.js.map} +0 -0
- /package/dist/{chunk-CEH2AFXG.js.map → chunk-C24UZSFW.js.map} +0 -0
- /package/dist/{chunk-ZPN7W3OP.js.map → chunk-CDUUDBWJ.js.map} +0 -0
- /package/dist/{chunk-5UYSCYR7.js.map → chunk-CT56C22C.js.map} +0 -0
- /package/dist/{chunk-HJQZQUPC.js.map → chunk-DJZWNKFO.js.map} +0 -0
- /package/dist/{chunk-X7Y7WX73.js.map → chunk-DQEMWVMT.js.map} +0 -0
- /package/dist/{chunk-CCTVAVTT.js.map → chunk-DZUJ46DO.js.map} +0 -0
- /package/dist/{chunk-N6TRHP72.js.map → chunk-EILZG5VC.js.map} +0 -0
- /package/dist/{chunk-GXWDWOWP.js.map → chunk-GDFVPUJ5.js.map} +0 -0
- /package/dist/{chunk-7PWWGYGO.js.map → chunk-GNCCUR6K.js.map} +0 -0
- /package/dist/{chunk-KPBLJCCV.js.map → chunk-IID2CMUU.js.map} +0 -0
- /package/dist/{chunk-UYCIS6V5.js.map → chunk-JCWY73FK.js.map} +0 -0
- /package/dist/{chunk-SYJ6EKKE.js.map → chunk-JYYBA7TF.js.map} +0 -0
- /package/dist/{chunk-T42L3S6A.js.map → chunk-LBWQ65SX.js.map} +0 -0
- /package/dist/{chunk-LWVO2QZV.js.map → chunk-LGO6A7GJ.js.map} +0 -0
- /package/dist/{chunk-2572MRP2.js.map → chunk-LZH5FR2W.js.map} +0 -0
- /package/dist/{chunk-256FBCVX.js.map → chunk-M4AHBM72.js.map} +0 -0
- /package/dist/{chunk-YEQEGSJA.js.map → chunk-MN4KB2A4.js.map} +0 -0
- /package/dist/{chunk-AGKIG3YA.js.map → chunk-NKKD4ZAU.js.map} +0 -0
- /package/dist/{chunk-3TMYV3LP.js.map → chunk-NTWN6HB2.js.map} +0 -0
- /package/dist/{chunk-63FHSH7E.js.map → chunk-OCZIYAE5.js.map} +0 -0
- /package/dist/{chunk-I2HTKOOP.js.map → chunk-ODZG724P.js.map} +0 -0
- /package/dist/{chunk-HQSBYI5X.js.map → chunk-OTHZWLUD.js.map} +0 -0
- /package/dist/{chunk-4W6INNXO.js.map → chunk-PE255F4T.js.map} +0 -0
- /package/dist/{chunk-6L27N6YI.js.map → chunk-QOS5LBZN.js.map} +0 -0
- /package/dist/{chunk-G72IPMR7.js.map → chunk-R4OCGPSH.js.map} +0 -0
- /package/dist/{chunk-MIBKEW7A.js.map → chunk-R7JAM2XF.js.map} +0 -0
- /package/dist/{chunk-JBPKEARU.js.map → chunk-RKNJBZ55.js.map} +0 -0
- /package/dist/{chunk-HUNSEO5U.js.map → chunk-S2DPMJXH.js.map} +0 -0
- /package/dist/{chunk-HQSPXTQO.js.map → chunk-SIHSCCUQ.js.map} +0 -0
- /package/dist/{chunk-R3AAOKR2.js.map → chunk-SPUJNJJC.js.map} +0 -0
- /package/dist/{chunk-IAY7YBXS.js.map → chunk-SQI57UCJ.js.map} +0 -0
- /package/dist/{chunk-CTQRPANJ.js.map → chunk-SVSRPG6M.js.map} +0 -0
- /package/dist/{chunk-S2VBSTTA.js.map → chunk-THG4GYIE.js.map} +0 -0
- /package/dist/{chunk-IXRC7EQG.js.map → chunk-TR7DGXGI.js.map} +0 -0
- /package/dist/{chunk-BC4QD3FM.js.map → chunk-UIN2BWDD.js.map} +0 -0
- /package/dist/{chunk-JTSVMJHV.js.map → chunk-UXO5IMBK.js.map} +0 -0
- /package/dist/{chunk-KQAFEZQX.js.map → chunk-VDX2J7OX.js.map} +0 -0
- /package/dist/{chunk-MUJ4QFUQ.js.map → chunk-W4BMEGQA.js.map} +0 -0
- /package/dist/{chunk-5HK3CJAR.js.map → chunk-W675UJCZ.js.map} +0 -0
- /package/dist/{chunk-MDVBCPOS.js.map → chunk-XCTXS7VY.js.map} +0 -0
- /package/dist/{chunk-53ENM6F6.js.map → chunk-XRYZRW54.js.map} +0 -0
- /package/dist/{chunk-VJ6ECBIP.js.map → chunk-Y7DK7HHJ.js.map} +0 -0
- /package/dist/{chunk-3MADV4YC.js.map → chunk-YB42WZCY.js.map} +0 -0
- /package/dist/{chunk-X5SDZMO7.js.map → chunk-YHCBJULX.js.map} +0 -0
- /package/dist/{chunk-6JJT5AKI.js.map → chunk-Z7PBQPJ4.js.map} +0 -0
- /package/dist/{chunk-ALCJRQ72.js.map → chunk-ZO6AXLEH.js.map} +0 -0
- /package/dist/{chunk-VZVP2W4O.js.map → chunk-ZQHI2BZB.js.map} +0 -0
- /package/dist/{resolution-DKMBPXHI.js.map → memory-subject-cli.js.map} +0 -0
package/src/access-service.ts
CHANGED
|
@@ -201,6 +201,10 @@ import type {
|
|
|
201
201
|
RecallInvocationOptions,
|
|
202
202
|
} from "./orchestrator.js";
|
|
203
203
|
import { type ProcedureStatsReport, computeProcedureStats } from "./procedural/procedure-stats.js";
|
|
204
|
+
import {
|
|
205
|
+
runProcedureLibraryMaintenance,
|
|
206
|
+
type ProcedureLibraryMaintenanceReport,
|
|
207
|
+
} from "./procedural/library-maintenance.js";
|
|
204
208
|
import type { RecallContextComposition } from "./recall-context-composition.js";
|
|
205
209
|
import type { LastRecallSnapshot } from "./recall-state.js";
|
|
206
210
|
import {
|
|
@@ -305,6 +309,7 @@ import { toRecallExplainJson } from "./recall-explain-renderer.js";
|
|
|
305
309
|
import { type TagMatchMode, applyTagFilter, normalizeTags, parseTagMatch } from "./recall-tag-filter.js";
|
|
306
310
|
import { type RecallXraySnapshot, estimateRecallTokens } from "./recall-xray.js";
|
|
307
311
|
import { computeWhoKnows, loadWhoKnowsEntities, validateWhoKnowsInput, WHO_KNOWS_DEFAULT_LIMIT, type WhoKnowsResult } from "./who-knows.js";
|
|
312
|
+
import { computePromotionCandidates, type PromotionCandidatesResult } from "./memory-subject.js";
|
|
308
313
|
import { SupportPassportAccessServiceBase } from "./support-passport/access-service-base.js";
|
|
309
314
|
import {
|
|
310
315
|
type ExportCapsuleOptions,
|
|
@@ -2738,6 +2743,41 @@ export class EngramAccessService extends SupportPassportAccessServiceBase {
|
|
|
2738
2743
|
]);
|
|
2739
2744
|
return computeWhoKnows({ topic, limit, memories, entities });
|
|
2740
2745
|
}
|
|
2746
|
+
/**
|
|
2747
|
+
* Read-only promotion-candidate surfacing (issue #2372): agent-subject,
|
|
2748
|
+
* active, reuse-signaled memories in the caller's namespace with no
|
|
2749
|
+
* equivalent in the target layer. No auto-promotion — callers use the
|
|
2750
|
+
* existing promotion commands.
|
|
2751
|
+
*/
|
|
2752
|
+
async promotionCandidates(request: {
|
|
2753
|
+
namespace?: string;
|
|
2754
|
+
targetNamespace?: string;
|
|
2755
|
+
limit?: number;
|
|
2756
|
+
authenticatedPrincipal?: string;
|
|
2757
|
+
}): Promise<PromotionCandidatesResult> {
|
|
2758
|
+
const limit = request.limit ?? 20;
|
|
2759
|
+
if (!Number.isInteger(limit) || limit < 1 || limit > 100) {
|
|
2760
|
+
throw new EngramAccessInputError(
|
|
2761
|
+
`promotion_candidates: limit expects an integer in [1, 100] (got ${String(request.limit)})`,
|
|
2762
|
+
);
|
|
2763
|
+
}
|
|
2764
|
+
const resolvedNamespace = this.resolveReadableNamespace(request.namespace, request.authenticatedPrincipal);
|
|
2765
|
+
const resolvedTarget = this.resolveReadableNamespace(
|
|
2766
|
+
request.targetNamespace ?? this.orchestrator.config.sharedNamespace,
|
|
2767
|
+
request.authenticatedPrincipal,
|
|
2768
|
+
);
|
|
2769
|
+
const minAccessCount = this.orchestrator.config.promotionCandidates.minAccessCount;
|
|
2770
|
+
const [memories, targetMemories] = await Promise.all([
|
|
2771
|
+
(await this.orchestrator.getStorage(resolvedNamespace)).readAllMemories(),
|
|
2772
|
+
(await this.orchestrator.getStorage(resolvedTarget)).readAllMemories(),
|
|
2773
|
+
]);
|
|
2774
|
+
return {
|
|
2775
|
+
namespace: resolvedNamespace,
|
|
2776
|
+
targetNamespace: resolvedTarget,
|
|
2777
|
+
minAccessCount,
|
|
2778
|
+
candidates: computePromotionCandidates({ memories, targetMemories, minAccessCount, limit }),
|
|
2779
|
+
};
|
|
2780
|
+
}
|
|
2741
2781
|
async memoryStore(
|
|
2742
2782
|
request: EngramAccessMemoryStoreRequest,
|
|
2743
2783
|
hooks?: { enforceWriteQuota?: () => void | Promise<void> }
|
|
@@ -3580,6 +3620,51 @@ export class EngramAccessService extends SupportPassportAccessServiceBase {
|
|
|
3580
3620
|
return { namespace: resolvedNamespace, ...report };
|
|
3581
3621
|
}
|
|
3582
3622
|
|
|
3623
|
+
/**
|
|
3624
|
+
* Procedure library health maintenance (issue #2370). Shadow-first: the
|
|
3625
|
+
* gate is checked BEFORE any storage read, so `maintenance.enabled=false`
|
|
3626
|
+
* returns `{ enabled: false }` having touched nothing but config. Apply
|
|
3627
|
+
* mode additionally requires `apply: true`; `dryRun: true` forces shadow.
|
|
3628
|
+
*
|
|
3629
|
+
* The authenticated principal (never a client-supplied actor) drives the
|
|
3630
|
+
* namespace via the same writable resolver `procedureMiningRun` uses, so
|
|
3631
|
+
* cross-tenant writes are impossible.
|
|
3632
|
+
*/
|
|
3633
|
+
async procedureLibraryMaintenance(
|
|
3634
|
+
request: {
|
|
3635
|
+
namespace?: string;
|
|
3636
|
+
apply?: boolean;
|
|
3637
|
+
dryRun?: boolean;
|
|
3638
|
+
authenticatedPrincipal?: string;
|
|
3639
|
+
},
|
|
3640
|
+
principal?: string
|
|
3641
|
+
): Promise<
|
|
3642
|
+
| { enabled: false }
|
|
3643
|
+
| {
|
|
3644
|
+
enabled: true;
|
|
3645
|
+
namespace: string;
|
|
3646
|
+
report: ProcedureLibraryMaintenanceReport;
|
|
3647
|
+
}
|
|
3648
|
+
> {
|
|
3649
|
+
const procedural = this.orchestrator.config.procedural;
|
|
3650
|
+
if (procedural?.enabled !== true || procedural.maintenance?.enabled !== true) {
|
|
3651
|
+
return { enabled: false };
|
|
3652
|
+
}
|
|
3653
|
+
const resolvedNamespace = this.writableNamespaceFor(
|
|
3654
|
+
request.namespace,
|
|
3655
|
+
undefined,
|
|
3656
|
+
request.authenticatedPrincipal ?? principal
|
|
3657
|
+
);
|
|
3658
|
+
const storage = await this.orchestrator.getStorage(resolvedNamespace);
|
|
3659
|
+
const report = await runProcedureLibraryMaintenance({
|
|
3660
|
+
memoryDir: storage.dir,
|
|
3661
|
+
storage,
|
|
3662
|
+
config: this.orchestrator.config,
|
|
3663
|
+
apply: request.apply === true && request.dryRun !== true,
|
|
3664
|
+
});
|
|
3665
|
+
return { enabled: true, namespace: resolvedNamespace, report };
|
|
3666
|
+
}
|
|
3667
|
+
|
|
3583
3668
|
async memorySummarizeHourly(): Promise<{
|
|
3584
3669
|
ok: true;
|
|
3585
3670
|
message: string;
|
|
@@ -57,6 +57,7 @@ export const MCP_TOOLS: readonly McpToolEntry[] = [
|
|
|
57
57
|
{ tool: "recall_tier_explain", operation: "recall_tier_explain" },
|
|
58
58
|
{ tool: "recall_xray", operation: "recall_xray" },
|
|
59
59
|
{ tool: "who_knows", operation: "who_knows" },
|
|
60
|
+
{ tool: "promotion_candidates", operation: "promotion_candidates" },
|
|
60
61
|
{ tool: "wearables_status", operation: "wearables_status" },
|
|
61
62
|
{ tool: "wearables_sync", operation: "wearables_sync" },
|
|
62
63
|
{ tool: "transcript_day", operation: "transcript_day" },
|
|
@@ -76,6 +77,7 @@ export const MCP_TOOLS: readonly McpToolEntry[] = [
|
|
|
76
77
|
{ tool: "procedure_mining_run", operation: "procedure_mining_run" },
|
|
77
78
|
{ tool: "pattern_reinforcement_run", operation: "pattern_reinforcement_run" },
|
|
78
79
|
{ tool: "procedural_stats", operation: "procedural_stats" },
|
|
80
|
+
{ tool: "procedure_library_maintenance", operation: "procedure_library_maintenance" },
|
|
79
81
|
{ tool: "memory_get", operation: "memory_get" },
|
|
80
82
|
{ tool: "memory_timeline", operation: "memory_timeline" },
|
|
81
83
|
{ tool: "memory_store", operation: "memory_store" },
|
package/src/config.ts
CHANGED
|
@@ -37,10 +37,12 @@ import { expandTildePath } from "./utils/path.js";
|
|
|
37
37
|
// lives in connectors/coerce.ts (a tiny, dependency-free module) so neither
|
|
38
38
|
// config.ts → connectors/index.ts nor the reverse circular import arises.
|
|
39
39
|
import { coerceBool, coerceBooleanLike, coerceInstallExtension, coerceNumber } from "./connectors/coerce.js";
|
|
40
|
+
import { parseSubjectRuntimeConfig } from "./subject-config.js";
|
|
40
41
|
import { parseRecallConcurrencyConfig } from "./recall-concurrency-config.js";
|
|
41
42
|
import { parseExtractionLivenessConfig } from "./extraction-liveness.js";
|
|
42
43
|
import { parseReplicaPeersConfig } from "./replica-peers-config.js";
|
|
43
44
|
import { parseDependencyPropagationConfig } from "./dependency-propagation-config.js";
|
|
45
|
+
import { parseProceduralMaintenanceConfig } from "./procedural/maintenance-config.js";
|
|
44
46
|
import {
|
|
45
47
|
parseContradictionLocalizationConfig,
|
|
46
48
|
parseContradictionScanConfig,
|
|
@@ -1123,16 +1125,9 @@ export function parseConfig(
|
|
|
1123
1125
|
recallMaxCoerced !== undefined && Number.isFinite(recallMaxCoerced)
|
|
1124
1126
|
? Math.min(10, Math.max(1, Math.floor(recallMaxCoerced)))
|
|
1125
1127
|
: 2;
|
|
1126
|
-
|
|
1127
|
-
//
|
|
1128
|
-
//
|
|
1129
|
-
// the feature off. CLAUDE.md rules:
|
|
1130
|
-
// - #30 — escape hatch remains for operators who want to stay opt-out.
|
|
1131
|
-
// - #36 — "false"-ish strings coerce to false via coerceBool.
|
|
1132
|
-
// - #51 — when the key IS present but the value can't be understood
|
|
1133
|
-
// (typo like `"fales"` or a number like `0`), reject loudly instead
|
|
1134
|
-
// of silently flipping the default. Silent fallback on bad input is
|
|
1135
|
-
// how procedural memory would end up "fail-open" for typos.
|
|
1128
|
+
const maintenance = parseProceduralMaintenanceConfig(rawProcedural.maintenance);
|
|
1129
|
+
// Default-on procedural memory (issue #567 PR 4/5). Explicit false-ish
|
|
1130
|
+
// values stay off. Unknown values throw.
|
|
1136
1131
|
const rawEnabledValue = rawProcedural.enabled;
|
|
1137
1132
|
let proceduralEnabled: boolean;
|
|
1138
1133
|
if (rawEnabledValue === undefined) {
|
|
@@ -1147,6 +1142,7 @@ export function parseConfig(
|
|
|
1147
1142
|
proceduralEnabled = enabledCoerced;
|
|
1148
1143
|
}
|
|
1149
1144
|
const procedural: ProceduralConfig = {
|
|
1145
|
+
maintenance,
|
|
1150
1146
|
enabled: proceduralEnabled,
|
|
1151
1147
|
/** `0` skips all mining (`minOccurrences_zero`); otherwise clusters need at least this many members. */
|
|
1152
1148
|
minOccurrences: Math.min(1000, Math.max(0, proceduralMinRaw)),
|
|
@@ -2755,11 +2751,11 @@ export function parseConfig(
|
|
|
2755
2751
|
}
|
|
2756
2752
|
return "low";
|
|
2757
2753
|
})(),
|
|
2758
|
-
// Extraction scope classification
|
|
2759
|
-
//
|
|
2760
|
-
// facts are promoted to the shared namespace. Default true (rule 30 gate).
|
|
2754
|
+
// Extraction scope classification (rule 30 gate): "global" facts promote
|
|
2755
|
+
// to the shared namespace. Default true.
|
|
2761
2756
|
extractionScopeClassificationEnabled:
|
|
2762
2757
|
coerceBool(cfg.extractionScopeClassificationEnabled) !== false,
|
|
2758
|
+
...parseSubjectRuntimeConfig(cfg),
|
|
2763
2759
|
// Extraction judge (issue #376). Opt-in LLM-as-judge fact-worthiness gate.
|
|
2764
2760
|
extractionJudgeEnabled: cfg.extractionJudgeEnabled === true,
|
|
2765
2761
|
extractionJudgeModel:
|
|
@@ -2778,10 +2774,7 @@ export function parseConfig(
|
|
|
2778
2774
|
? Math.floor(cfg.extractionJudgeMaxDeferrals)
|
|
2779
2775
|
: 2,
|
|
2780
2776
|
// Judge telemetry (issue #562 PR 3): opt-in structured emit to the
|
|
2781
|
-
// observation ledger
|
|
2782
|
-
// Uses `coerceBool` so CLI-style string inputs (`"true"`, `"false"`,
|
|
2783
|
-
// `"1"`, `"0"`) are accepted consistently with the rest of the
|
|
2784
|
-
// codebase (CLAUDE.md gotcha 36).
|
|
2777
|
+
// observation ledger; `coerceBool` accepts CLI-style strings (gotcha 36).
|
|
2785
2778
|
extractionJudgeTelemetryEnabled:
|
|
2786
2779
|
coerceBool(cfg.extractionJudgeTelemetryEnabled) === true,
|
|
2787
2780
|
// Judge training-pair collection (issue #562 PR 4): opt-in shim for a
|
package/src/extraction-prompt.ts
CHANGED
|
@@ -22,6 +22,7 @@ export const EXTRACTION_RESPONSE_SHAPE = `{
|
|
|
22
22
|
"promptedByQuestion": "<optional source-grounded question>",
|
|
23
23
|
"quote": "<optional exact contiguous source span>",
|
|
24
24
|
"scope": "<optional project-or-global>",
|
|
25
|
+
"subject": "<optional user-or-agent>",
|
|
25
26
|
"structuredAttributes": {"<key>": "<value>"},
|
|
26
27
|
"procedureSteps": [{"order": 1, "intent": "<step>"}, {"order": 2, "intent": "<step>"}],
|
|
27
28
|
"reasoningTrace": {
|
package/src/extraction.ts
CHANGED
|
@@ -312,6 +312,8 @@ export class ExtractionEngine {
|
|
|
312
312
|
promptedByQuestion: extractionText(f.promptedByQuestion),
|
|
313
313
|
scope:
|
|
314
314
|
f.scope === "global" || f.scope === "project" ? f.scope : undefined,
|
|
315
|
+
subject:
|
|
316
|
+
f.subject === "user" || f.subject === "agent" ? f.subject : undefined,
|
|
315
317
|
structuredAttributes: extractionAttributes(f.structuredAttributes),
|
|
316
318
|
procedureSteps,
|
|
317
319
|
reasoningTrace,
|
|
@@ -1425,7 +1427,8 @@ Rules:
|
|
|
1425
1427
|
- ${OUTPUT_LANGUAGE_POLICY}
|
|
1426
1428
|
${CUE_ANCHOR_PROMPT_INSTRUCTION}\n- Include at most five durable relationships.${this.config.provenance?.enabled ? `
|
|
1427
1429
|
- Each fact must include a quote copied verbatim from one contiguous conversation span.` : ""}${lifecycleCaps.extractionScopeClassification ? `
|
|
1428
|
-
- Set each fact scope to "global" for cross-project knowledge or "project" for codebase-specific knowledge. Tool, command, or CLI-flag instructions tied to one agent are "project" (the same tool name can mean different things across agents); when keeping one, begin the fact with a leading "In <agent>," clause naming that agent.` : ""}${
|
|
1430
|
+
- Set each fact scope to "global" for cross-project knowledge or "project" for codebase-specific knowledge. Tool, command, or CLI-flag instructions tied to one agent are "project" (the same tool name can mean different things across agents); when keeping one, begin the fact with a leading "In <agent>," clause naming that agent.` : ""}${this.config.subjectClassification?.enabled === true ? `
|
|
1431
|
+
- Set each fact subject to "user" when it models the person (preferences, relationships, biography, moments, commitments about their life) or "agent" when it is reusable operating knowledge (procedures, principles, tool-usage lessons, debugging strategies, environment facts with no personal content).` : ""}${ambientCapture ? AMBIENT_CAPTURE_PROMPT_SECTION_COMPACT : ""}
|
|
1429
1432
|
${eventTimePromptInstruction(this.config)}
|
|
1430
1433
|
Return only valid JSON matching this shape. Placeholder text describes field shape only and is never source evidence:
|
|
1431
1434
|
${EXTRACTION_RESPONSE_SHAPE}
|
package/src/index.ts
CHANGED
|
@@ -229,7 +229,7 @@ export type {
|
|
|
229
229
|
ProcedureStatsConfigSnapshot,
|
|
230
230
|
ProcedureStatsRecent,
|
|
231
231
|
} from "./procedural/procedure-stats.js";
|
|
232
|
-
|
|
232
|
+
export { runProcedureLibraryMaintenance, type ProcedureLibraryMaintenanceReport, type ProcedureMaintenanceAction, type ProcedureMaintenanceActionKind, type ProcedureMaintenanceReasonCode, type ProcedureMaintenanceEvidence, type ProcedureMaintenanceMarker } from "./procedural/library-maintenance.js";
|
|
233
233
|
// ---------------------------------------------------------------------------
|
|
234
234
|
// Direct-answer retrieval tier (issue #518)
|
|
235
235
|
// ---------------------------------------------------------------------------
|
|
@@ -493,14 +493,13 @@ export {
|
|
|
493
493
|
type RecallXrayFormat,
|
|
494
494
|
} from "./recall-xray-renderer.js";
|
|
495
495
|
export type {
|
|
496
|
-
RecallXraySnapshot,
|
|
497
|
-
RecallXrayResult,
|
|
498
|
-
RecallXrayScoreDecomposition,
|
|
499
|
-
RecallXrayServedBy,
|
|
500
|
-
RecallFilterTrace,
|
|
496
|
+
RecallXraySnapshot, RecallXrayResult, RecallXrayScoreDecomposition, RecallXrayServedBy, RecallFilterTrace,
|
|
501
497
|
} from "./recall-xray.js";
|
|
502
498
|
export * from "./who-knows.js";
|
|
503
499
|
export * from "./who-knows-cli.js";
|
|
500
|
+
export * from "./memory-subject.js";
|
|
501
|
+
export * from "./memory-subject-cli.js";
|
|
502
|
+
export * from "./subject-config.js";
|
|
504
503
|
|
|
505
504
|
// ChatGPT Apps-compatible memory inspector demo.
|
|
506
505
|
export {
|
|
@@ -0,0 +1,135 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* CLI surface for memory-subject operations (issue #2372).
|
|
3
|
+
*
|
|
4
|
+
* `remnic promotion-candidates` — read-only surfacing of agent-subject,
|
|
5
|
+
* reuse-signaled promotion candidates. `remnic subjects backfill` — the
|
|
6
|
+
* deterministic shadow/apply stamp for unstamped memories. Runners take an
|
|
7
|
+
* io seam (service/storage callbacks + stdout) so tests drive them without
|
|
8
|
+
* booting an orchestrator; the remnic-cli entry supplies the real ones.
|
|
9
|
+
*/
|
|
10
|
+
|
|
11
|
+
import type {
|
|
12
|
+
PromotionCandidatesResult,
|
|
13
|
+
SubjectBackfillReport,
|
|
14
|
+
} from "./memory-subject.js";
|
|
15
|
+
|
|
16
|
+
export interface PromotionCandidatesCliOptions {
|
|
17
|
+
namespace?: string;
|
|
18
|
+
targetNamespace?: string;
|
|
19
|
+
limit: number;
|
|
20
|
+
json: boolean;
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
export function parsePromotionCandidatesCliOptions(args: {
|
|
24
|
+
namespace?: string;
|
|
25
|
+
targetNamespace?: string;
|
|
26
|
+
limit?: string;
|
|
27
|
+
json?: boolean;
|
|
28
|
+
}): PromotionCandidatesCliOptions {
|
|
29
|
+
let limit = 20;
|
|
30
|
+
if (args.limit !== undefined) {
|
|
31
|
+
const parsed = Number(args.limit);
|
|
32
|
+
if (!Number.isInteger(parsed) || parsed < 1 || parsed > 100) {
|
|
33
|
+
throw new Error(
|
|
34
|
+
`promotion-candidates: --limit expects an integer in [1, 100] (got ${JSON.stringify(args.limit)})`,
|
|
35
|
+
);
|
|
36
|
+
}
|
|
37
|
+
limit = parsed;
|
|
38
|
+
}
|
|
39
|
+
return {
|
|
40
|
+
...(args.namespace !== undefined && args.namespace !== "" ? { namespace: args.namespace } : {}),
|
|
41
|
+
...(args.targetNamespace !== undefined && args.targetNamespace !== ""
|
|
42
|
+
? { targetNamespace: args.targetNamespace }
|
|
43
|
+
: {}),
|
|
44
|
+
limit,
|
|
45
|
+
json: args.json === true,
|
|
46
|
+
};
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
export function renderPromotionCandidates(result: PromotionCandidatesResult, json: boolean): string {
|
|
50
|
+
if (json) return JSON.stringify(result, null, 2);
|
|
51
|
+
const lines = [
|
|
52
|
+
`Namespace: ${result.namespace} Target layer: ${result.targetNamespace} (minAccessCount ${result.minAccessCount})`,
|
|
53
|
+
];
|
|
54
|
+
if (result.candidates.length === 0) {
|
|
55
|
+
lines.push("No promotion candidates.");
|
|
56
|
+
return lines.join("\n");
|
|
57
|
+
}
|
|
58
|
+
for (const c of result.candidates) {
|
|
59
|
+
lines.push(
|
|
60
|
+
`- ${c.id} [${c.category}] signal=${c.reuseSignal} access=${c.accessCount} reinforced=${c.reinforcementCount} mw=${c.mwSuccess}/${c.mwFail}`,
|
|
61
|
+
);
|
|
62
|
+
lines.push(` ${c.content.replace(/\s+/g, " ").slice(0, 100)}`);
|
|
63
|
+
}
|
|
64
|
+
lines.push("Promote explicitly with the existing promotion commands; nothing is auto-promoted.");
|
|
65
|
+
return lines.join("\n");
|
|
66
|
+
}
|
|
67
|
+
|
|
68
|
+
export async function runPromotionCandidatesCommand(
|
|
69
|
+
rest: string[],
|
|
70
|
+
io: {
|
|
71
|
+
promotionCandidates: (request: {
|
|
72
|
+
namespace?: string;
|
|
73
|
+
targetNamespace?: string;
|
|
74
|
+
limit?: number;
|
|
75
|
+
}) => Promise<PromotionCandidatesResult>;
|
|
76
|
+
stdout: (line: string) => void;
|
|
77
|
+
},
|
|
78
|
+
): Promise<void> {
|
|
79
|
+
const flag = (name: string): string | undefined => {
|
|
80
|
+
const hit = rest.find((a) => a.startsWith(`--${name}=`));
|
|
81
|
+
return hit === undefined ? undefined : hit.slice(name.length + 3);
|
|
82
|
+
};
|
|
83
|
+
const options = parsePromotionCandidatesCliOptions({
|
|
84
|
+
namespace: flag("namespace"),
|
|
85
|
+
targetNamespace: flag("target-namespace"),
|
|
86
|
+
limit: flag("limit"),
|
|
87
|
+
json: rest.includes("--json"),
|
|
88
|
+
});
|
|
89
|
+
const result = await io.promotionCandidates({
|
|
90
|
+
...(options.namespace !== undefined ? { namespace: options.namespace } : {}),
|
|
91
|
+
...(options.targetNamespace !== undefined ? { targetNamespace: options.targetNamespace } : {}),
|
|
92
|
+
limit: options.limit,
|
|
93
|
+
});
|
|
94
|
+
io.stdout(renderPromotionCandidates(result, options.json));
|
|
95
|
+
}
|
|
96
|
+
|
|
97
|
+
export interface SubjectsBackfillCliOptions {
|
|
98
|
+
mode: "shadow" | "apply";
|
|
99
|
+
namespace?: string;
|
|
100
|
+
}
|
|
101
|
+
|
|
102
|
+
export function parseSubjectsBackfillCliOptions(args: {
|
|
103
|
+
apply?: boolean;
|
|
104
|
+
namespace?: string;
|
|
105
|
+
}): SubjectsBackfillCliOptions {
|
|
106
|
+
return {
|
|
107
|
+
mode: args.apply === true ? "apply" : "shadow",
|
|
108
|
+
...(args.namespace !== undefined && args.namespace !== "" ? { namespace: args.namespace } : {}),
|
|
109
|
+
};
|
|
110
|
+
}
|
|
111
|
+
|
|
112
|
+
export async function runSubjectsBackfillCommand(
|
|
113
|
+
rest: string[],
|
|
114
|
+
io: {
|
|
115
|
+
backfill: (options: { mode: "shadow" | "apply"; namespace?: string }) => Promise<SubjectBackfillReport>;
|
|
116
|
+
stdout: (line: string) => void;
|
|
117
|
+
},
|
|
118
|
+
): Promise<void> {
|
|
119
|
+
const namespaceFlag = rest.find((a) => a.startsWith("--namespace="))?.slice("--namespace=".length);
|
|
120
|
+
const options = parseSubjectsBackfillCliOptions({
|
|
121
|
+
apply: rest.includes("--apply"),
|
|
122
|
+
namespace: namespaceFlag,
|
|
123
|
+
});
|
|
124
|
+
const report = await io.backfill(options);
|
|
125
|
+
const lines = [
|
|
126
|
+
`Mode: ${report.mode} Scanned: ${report.scanned} Already stamped: ${report.alreadyStamped} To stamp: ${report.stamped}`,
|
|
127
|
+
];
|
|
128
|
+
for (const stamp of report.stamps) {
|
|
129
|
+
lines.push(`- ${stamp.id} [${stamp.category}] → subject: ${stamp.subject}`);
|
|
130
|
+
}
|
|
131
|
+
if (report.mode === "shadow") {
|
|
132
|
+
lines.push("Shadow run — nothing written. Re-run with --apply to stamp.");
|
|
133
|
+
}
|
|
134
|
+
io.stdout(lines.join("\n"));
|
|
135
|
+
}
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
import assert from "node:assert/strict";
|
|
2
|
+
import test from "node:test";
|
|
3
|
+
|
|
4
|
+
import {
|
|
5
|
+
evaluateSubjectGuard,
|
|
6
|
+
resolveWriteSubject,
|
|
7
|
+
SUBJECT_GUARD_OVERRIDE_FLAG,
|
|
8
|
+
} from "./memory-subject.js";
|
|
9
|
+
import { parseSubjectRuntimeConfig } from "./subject-config.js";
|
|
10
|
+
|
|
11
|
+
test("category defaults: procedure is agent, preference is user, unknown is user", () => {
|
|
12
|
+
assert.equal(resolveWriteSubject("procedure", undefined), "agent");
|
|
13
|
+
assert.equal(resolveWriteSubject("preference", undefined), "user");
|
|
14
|
+
assert.equal(resolveWriteSubject("fact", undefined), "user");
|
|
15
|
+
assert.equal(resolveWriteSubject("procedure", "user"), "user");
|
|
16
|
+
});
|
|
17
|
+
|
|
18
|
+
test("shared-layer guard: missing subject fails closed as user", () => {
|
|
19
|
+
const warn = evaluateSubjectGuard({
|
|
20
|
+
subject: undefined,
|
|
21
|
+
sharedTarget: true,
|
|
22
|
+
mode: "warn",
|
|
23
|
+
});
|
|
24
|
+
assert.equal(warn.action, "warn");
|
|
25
|
+
assert.equal(warn.effectiveSubject, "user");
|
|
26
|
+
assert.ok(warn.reason.includes(SUBJECT_GUARD_OVERRIDE_FLAG));
|
|
27
|
+
|
|
28
|
+
const reject = evaluateSubjectGuard({
|
|
29
|
+
subject: "user",
|
|
30
|
+
sharedTarget: true,
|
|
31
|
+
mode: "enforce",
|
|
32
|
+
});
|
|
33
|
+
assert.equal(reject.action, "reject");
|
|
34
|
+
|
|
35
|
+
const allowed = evaluateSubjectGuard({
|
|
36
|
+
subject: "agent",
|
|
37
|
+
sharedTarget: true,
|
|
38
|
+
mode: "enforce",
|
|
39
|
+
});
|
|
40
|
+
assert.equal(allowed.action, "allow");
|
|
41
|
+
});
|
|
42
|
+
|
|
43
|
+
test("subjectClassification omitted is off; invalid values throw", () => {
|
|
44
|
+
assert.equal(parseSubjectRuntimeConfig({}).subjectClassification.enabled, false);
|
|
45
|
+
assert.equal(parseSubjectRuntimeConfig({}).subjectGuard, "warn");
|
|
46
|
+
assert.throws(() => parseSubjectRuntimeConfig({ subjectGuard: "loud" }));
|
|
47
|
+
assert.throws(() => parseSubjectRuntimeConfig({ subjectClassification: false }));
|
|
48
|
+
});
|