@remnic/core 9.30.1 → 9.31.0
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 +10 -10
- package/dist/access-admin-ops-surface.js +50 -44
- package/dist/access-authorization-probe.d.ts +10 -10
- package/dist/access-authorization-probe.js +51 -45
- package/dist/access-boundary.d.ts +13 -11
- package/dist/access-boundary.js +50 -44
- package/dist/access-cli.js +168 -123
- package/dist/access-cli.js.map +1 -1
- package/dist/access-extraction-force-flush.d.ts +119 -0
- package/dist/access-extraction-force-flush.js +166 -0
- package/dist/access-health-types.d.ts +1 -1
- package/dist/access-http-lcm-compaction.d.ts +47 -13
- package/dist/access-http-lcm-compaction.js +7 -3
- package/dist/access-http-lifecycle-flush.d.ts +132 -0
- package/dist/access-http-lifecycle-flush.js +9 -0
- package/dist/access-http-lifecycle-flush.js.map +1 -0
- package/dist/access-http.d.ts +11 -10
- package/dist/access-http.js +66 -59
- package/dist/access-identity-continuity-surface.d.ts +8 -8
- package/dist/access-identity-continuity-surface.js +50 -44
- package/dist/access-lcm-surface.d.ts +10 -10
- package/dist/access-lcm-surface.js +50 -44
- package/dist/access-mcp-output-schemas.js +1 -1
- package/dist/access-mcp.d.ts +16 -10
- package/dist/access-mcp.js +58 -52
- package/dist/access-memory-search-fanout.d.ts +2 -2
- package/dist/{access-namespace-preflight-VfXssvoI.d.ts → access-namespace-preflight-D4vW97H1.d.ts} +1 -1
- package/dist/access-namespace-preflight.d.ts +3 -3
- package/dist/access-namespace-preflight.js +50 -44
- package/dist/access-observe-helpers.d.ts +22 -0
- package/dist/access-observe-helpers.js +10 -0
- package/dist/access-observe-helpers.js.map +1 -0
- package/dist/access-observe-write-surface.d.ts +51 -47
- package/dist/access-observe-write-surface.js +50 -44
- package/dist/access-operations-batch.js +53 -47
- package/dist/access-operations.d.ts +11 -11
- package/dist/access-operations.js +55 -49
- package/dist/access-recall-concurrency.d.ts +10 -10
- package/dist/access-recall-concurrency.js +50 -44
- package/dist/access-recall-response.d.ts +10 -10
- package/dist/access-recall-response.js +50 -44
- package/dist/access-recall-surface.d.ts +10 -10
- package/dist/access-recall-surface.js +50 -44
- package/dist/access-schema.d.ts +37 -7
- package/dist/access-schema.js +5 -3
- package/dist/{access-service-B5RwVsTV.d.ts → access-service-B6PZ_xUL.d.ts} +44 -20
- package/dist/access-service-helpers.d.ts +113 -0
- package/dist/access-service-helpers.js +8 -0
- package/dist/access-service-helpers.js.map +1 -0
- package/dist/access-service.d.ts +10 -10
- package/dist/access-service.js +50 -44
- package/dist/access-surface-catalog.d.ts +10 -10
- package/dist/access-surface-catalog.js +2 -0
- 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 +1 -1
- package/dist/adapters/index.js +7 -7
- package/dist/adapters/registry.js +3 -3
- package/dist/behavior-learner.d.ts +1 -1
- package/dist/behavior-signals.d.ts +1 -1
- package/dist/bootstrap.d.ts +8 -8
- package/dist/briefing.d.ts +2 -2
- package/dist/briefing.js +14 -14
- package/dist/buffer-surprise-report.d.ts +1 -1
- package/dist/buffer-turn-helpers.d.ts +5 -0
- package/dist/buffer-turn-helpers.js +24 -0
- package/dist/buffer-turn-helpers.js.map +1 -0
- package/dist/buffer.d.ts +17 -4
- package/dist/buffer.js +21 -1
- package/dist/bulk-import/index.d.ts +3 -3
- package/dist/calibration.d.ts +1 -1
- package/dist/capabilities.d.ts +1 -1
- package/dist/{capsule-crypto-GWVG7LGC.js → capsule-crypto-7FJQINUR.js} +2 -2
- package/dist/capsule-crypto-7FJQINUR.js.map +1 -0
- package/dist/{capsule-merge-5KKJQBWQ.js → capsule-merge-2H2IUTBT.js} +4 -4
- package/dist/{catalog-V7inUQdp.d.ts → catalog-CGFYmTT8.d.ts} +1 -1
- package/dist/causal-behavior.d.ts +1 -1
- package/dist/causal-behavior.js +2 -2
- package/dist/causal-chain.js +2 -2
- package/dist/causal-consolidation.d.ts +1 -1
- package/dist/causal-consolidation.js +19 -19
- package/dist/causal-retrieval.js +2 -2
- package/dist/causal-trajectory-graph.d.ts +1 -1
- package/dist/causal-trajectory.js +1 -1
- package/dist/{chunk-LEPOP46W.js → chunk-227UFSEQ.js} +4 -4
- package/dist/{chunk-GIBMDSJ2.js → chunk-27P5YVDU.js} +2 -2
- package/dist/{chunk-2SA56WMI.js → chunk-2LTDWSR6.js} +4 -4
- package/dist/{chunk-OWHERGF2.js → chunk-2NLLXCJG.js} +2 -2
- package/dist/{chunk-YTSNAUXN.js → chunk-3F2LKUMU.js} +22 -8
- package/dist/chunk-3F2LKUMU.js.map +1 -0
- package/dist/chunk-3QL24R5Y.js +9 -0
- package/dist/chunk-3QL24R5Y.js.map +1 -0
- package/dist/chunk-4RNZMRAV.js +60 -0
- package/dist/chunk-4RNZMRAV.js.map +1 -0
- package/dist/{chunk-6U7F52DE.js → chunk-4XHR3I67.js} +60 -60
- package/dist/chunk-5IVLTFOV.js +65 -0
- package/dist/chunk-5IVLTFOV.js.map +1 -0
- package/dist/{chunk-2EUVEDF5.js → chunk-5XA7PQ5I.js} +2 -2
- package/dist/{chunk-ALSGMEJR.js → chunk-65ZPVYTA.js} +7 -7
- package/dist/{chunk-5VQJBH2G.js → chunk-6TAUHL33.js} +2 -2
- package/dist/{chunk-HUHX2OCX.js → chunk-7DRETLP5.js} +1 -1
- package/dist/chunk-7DRETLP5.js.map +1 -0
- package/dist/{chunk-RGIWINDN.js → chunk-7G5MH4NT.js} +30 -30
- package/dist/{chunk-WVO4G37W.js → chunk-7TEZUUGM.js} +3 -3
- package/dist/{chunk-MJCGLM25.js → chunk-7VUAG236.js} +5 -5
- package/dist/{chunk-M3C2V3PV.js → chunk-AJEMDQNA.js} +12 -12
- package/dist/{chunk-RKNJBZ55.js → chunk-AU7Q3LSC.js} +7 -7
- package/dist/{chunk-ACXPX4AG.js → chunk-BR2K43MK.js} +2 -2
- package/dist/{chunk-IYZ5K7MU.js → chunk-BUE5E2HL.js} +4 -187
- package/dist/chunk-BUE5E2HL.js.map +1 -0
- package/dist/{chunk-CZRYLSSW.js → chunk-BUGVGH4N.js} +2 -2
- package/dist/{chunk-YTQNQ4KB.js → chunk-C4VQMFVM.js} +3 -3
- package/dist/{chunk-ZPSVBSOF.js → chunk-CIVDJD6P.js} +3 -3
- package/dist/{chunk-K5GB36ME.js → chunk-CZDOT5I2.js} +2 -2
- package/dist/{chunk-VI2JQPNQ.js → chunk-E4PWACUN.js} +2 -2
- package/dist/{chunk-D2ANTDGO.js → chunk-E6BMSH7U.js} +2 -2
- package/dist/{chunk-P5PXWTW7.js → chunk-EJCAV3QZ.js} +3 -3
- package/dist/{chunk-CKMO4RDY.js → chunk-EMDLM3LW.js} +4 -4
- package/dist/chunk-ER7W6H4T.js +112 -0
- package/dist/chunk-ER7W6H4T.js.map +1 -0
- package/dist/{chunk-6FUPCJUL.js → chunk-FI4F5X2V.js} +54 -54
- package/dist/chunk-FI4F5X2V.js.map +1 -0
- package/dist/{chunk-LGHKJABJ.js → chunk-GOUILH55.js} +40 -18
- package/dist/chunk-GOUILH55.js.map +1 -0
- package/dist/{chunk-G5R3D5UP.js → chunk-GTTAHHD3.js} +2 -2
- package/dist/{chunk-H5CPS5JP.js → chunk-H36LJIPD.js} +3 -3
- package/dist/{chunk-AITCS2RC.js → chunk-IJ7HK452.js} +4 -4
- package/dist/{chunk-D3LMYTBV.js → chunk-J7WZUL2K.js} +9 -9
- package/dist/{chunk-5W4ZLBEZ.js → chunk-JCFTIQBR.js} +2 -2
- package/dist/{chunk-XOZ4ALGB.js → chunk-KE353EWI.js} +3 -3
- package/dist/{chunk-W5EG6LE3.js → chunk-KIT6M7EB.js} +3 -3
- package/dist/{chunk-5W7CTZ2E.js → chunk-KQAFEZQX.js} +4 -4
- package/dist/{chunk-Z54EM5YZ.js → chunk-MAXVH44E.js} +7 -7
- package/dist/{chunk-WZFAPHIK.js → chunk-MU7ZHSZE.js} +2 -2
- package/dist/chunk-N5Z4EVOR.js +123 -0
- package/dist/chunk-N5Z4EVOR.js.map +1 -0
- package/dist/{chunk-66772WBP.js → chunk-NFXQJHJD.js} +5 -5
- package/dist/{chunk-AZ5BTEKX.js → chunk-NQUF7XKR.js} +2 -2
- package/dist/{chunk-W4FBGYGK.js → chunk-NRV4Y3PM.js} +1 -1
- package/dist/{chunk-NHWB6HG2.js → chunk-NYCGIQRA.js} +2 -2
- package/dist/{chunk-4WKA6I65.js → chunk-OGCNZPKX.js} +1119 -309
- package/dist/chunk-OGCNZPKX.js.map +1 -0
- package/dist/{chunk-QJAQNXWI.js → chunk-ONHRRJZM.js} +6 -6
- package/dist/{chunk-FDAMS4PK.js → chunk-PNPOWBGC.js} +2 -2
- package/dist/{chunk-IC6CBHCA.js → chunk-QGENAYVS.js} +2 -2
- package/dist/{chunk-GBJ4RDFR.js → chunk-QIHIHZYC.js} +66 -91
- package/dist/chunk-QIHIHZYC.js.map +1 -0
- package/dist/{chunk-YNQBRLC5.js → chunk-RUYJ7TWU.js} +517 -2011
- package/dist/chunk-RUYJ7TWU.js.map +1 -0
- package/dist/{chunk-4A6YGWQN.js → chunk-TL4TO3EA.js} +115 -120
- package/dist/chunk-TL4TO3EA.js.map +1 -0
- package/dist/{chunk-SPJXKAVF.js → chunk-U52AKICI.js} +14 -13
- package/dist/chunk-U52AKICI.js.map +1 -0
- package/dist/chunk-ULARSG5Z.js +203 -0
- package/dist/chunk-ULARSG5Z.js.map +1 -0
- package/dist/{chunk-62U4J2GN.js → chunk-UR77VKF7.js} +2 -2
- package/dist/{chunk-JCBWCYEJ.js → chunk-VANLTS5F.js} +2 -2
- package/dist/{chunk-4Z4XNEWZ.js → chunk-VCD4PSK2.js} +56 -12
- package/dist/chunk-VCD4PSK2.js.map +1 -0
- package/dist/{chunk-RMMVQQA6.js → chunk-WDISJRMG.js} +2 -2
- package/dist/{chunk-B6JDYXL7.js → chunk-WWUVONGW.js} +7 -1
- package/dist/chunk-WWUVONGW.js.map +1 -0
- package/dist/{chunk-UVYI6VIX.js → chunk-X7Y7WX73.js} +1 -1
- package/dist/{chunk-TH2LSRMG.js → chunk-XHDIB4T4.js} +2 -2
- package/dist/{chunk-CVILPI77.js → chunk-XOQSEF7X.js} +6 -6
- package/dist/{chunk-LBOD4U5B.js → chunk-YFOMN2II.js} +6 -6
- package/dist/{chunk-RPW2NOU6.js → chunk-YIAA2X3D.js} +41 -1
- package/dist/chunk-YIAA2X3D.js.map +1 -0
- package/dist/chunk-YPC7W6GA.js +1604 -0
- package/dist/chunk-YPC7W6GA.js.map +1 -0
- package/dist/{chunk-I5NLEENJ.js → chunk-Z4SWV4VW.js} +3 -3
- package/dist/{chunk-PHWUFPCO.js → chunk-ZCPP5OW6.js} +61 -53
- package/dist/chunk-ZCPP5OW6.js.map +1 -0
- package/dist/{cli-C4GbETPC.d.ts → cli-BptUDTtp.d.ts} +5 -5
- package/dist/cli.d.ts +12 -12
- package/dist/cli.js +91 -84
- package/dist/compounding/engine.d.ts +2 -2
- package/dist/compounding/engine.js +14 -14
- 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 +1 -1
- package/dist/connectors/codex-materialize-runner.d.ts +1 -1
- package/dist/connectors/codex-materialize-runner.js +14 -14
- package/dist/connectors/codex-materialize.d.ts +1 -1
- package/dist/connectors/index.d.ts +1 -1
- package/dist/connectors/index.js +17 -17
- package/dist/consolidation-provenance-check.d.ts +2 -2
- package/dist/consolidation-provenance-check.js +5 -5
- package/dist/consolidation-undo.d.ts +2 -2
- package/dist/consolidation-undo.js +3 -3
- package/dist/contradiction/index.d.ts +2 -2
- package/dist/contradiction/index.js +4 -4
- package/dist/conversation-index/backend.d.ts +1 -1
- package/dist/conversation-index/backend.js +2 -2
- 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 +26 -26
- package/dist/day-summary.d.ts +1 -1
- package/dist/delinearize.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-retrieval.d.ts +2 -2
- package/dist/entity-retrieval.js +14 -14
- package/dist/entity-schema.d.ts +1 -1
- package/dist/explicit-capture.d.ts +8 -8
- 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-liveness.d.ts +1 -1
- package/dist/extraction-source-grounding-rules.d.ts +1 -1
- package/dist/extraction-source-grounding.d.ts +15 -2
- package/dist/extraction-source-grounding.js +10 -1
- package/dist/extraction.d.ts +2 -15
- package/dist/extraction.js +5 -4
- 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-snapshot.d.ts +1 -1
- package/dist/graph.d.ts +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 +19 -19
- package/dist/index.js +215 -207
- 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-helpers.d.ts +7 -0
- package/dist/local-llm-helpers.js +16 -0
- package/dist/local-llm-helpers.js.map +1 -0
- package/dist/local-llm.d.ts +3 -6
- package/dist/local-llm.js +2 -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 +14 -14
- package/dist/maintenance/rebuild-memory-lifecycle-ledger.d.ts +2 -2
- package/dist/maintenance/rebuild-memory-lifecycle-ledger.js +14 -14
- package/dist/maintenance/rebuild-memory-projection.d.ts +2 -2
- package/dist/maintenance/rebuild-memory-projection.js +15 -15
- package/dist/{maintenance-CL30NWtc.d.ts → maintenance-b6f92bRz.d.ts} +3 -3
- package/dist/mcp-memory-inspector-app.d.ts +10 -10
- package/dist/memory-action-policy.d.ts +1 -1
- package/dist/memory-cache.d.ts +1 -1
- package/dist/memory-corpus-version.js +2 -2
- 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-worth-outcomes.d.ts +2 -2
- package/dist/models-json.d.ts +1 -1
- package/dist/namespaces/migrate.d.ts +3 -3
- package/dist/namespaces/migrate.js +24 -24
- package/dist/namespaces/principal.d.ts +1 -1
- package/dist/namespaces/search.d.ts +1 -1
- package/dist/namespaces/search.js +9 -9
- package/dist/namespaces/storage.d.ts +3 -3
- package/dist/namespaces/storage.js +14 -14
- package/dist/native-knowledge.d.ts +1 -1
- package/dist/offline-sync-impression-drain.d.ts +1 -1
- package/dist/offline-sync-impression-drain.js +6 -5
- package/dist/operator-doctor-corpus.d.ts +1 -1
- package/dist/operator-doctor-corpus.js +29 -29
- package/dist/operator-doctor-replica.d.ts +1 -1
- package/dist/operator-doctor-replica.js +3 -3
- package/dist/operator-toolkit.d.ts +3 -3
- package/dist/operator-toolkit.js +38 -37
- 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-CKTCRwWV.d.ts → orchestrator-3uGxC1qO.d.ts} +72 -34
- package/dist/orchestrator.d.ts +8 -8
- package/dist/orchestrator.js +167 -159
- package/dist/page-versioning.js +3 -3
- package/dist/patterns-cli.d.ts +1 -1
- package/dist/{pipeline-B7wj4rRZ.d.ts → pipeline-DepuNr-m.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/{qmd-q9tg4dHp.d.ts → qmd-Dalr3Jby.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/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-divergence.js +2 -2
- package/dist/replica-peers-config.d.ts +1 -1
- package/dist/resolve-auth-token.d.ts +1 -1
- package/dist/resume-bundles.js +1 -1
- 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/{scope-profiles-CWDyglPM.d.ts → scope-profiles-BpiM5hTU.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 +8 -8
- package/dist/search/index.d.ts +1 -1
- package/dist/search/index.js +12 -12
- 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-BUE3deLn.d.ts → semantic-consolidation-CMtVrf9f.d.ts} +1 -1
- package/dist/semantic-consolidation.d.ts +2 -2
- package/dist/semantic-consolidation.js +16 -16
- package/dist/semantic-rule-promotion.js +14 -14
- package/dist/semantic-rule-verifier.d.ts +1 -1
- package/dist/semantic-rule-verifier.js +14 -14
- package/dist/{service-CXgM0bQG.d.ts → service-DuAxwSgg.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 +1 -1
- package/dist/signal.d.ts +1 -1
- package/dist/{storage-DysJq-XH.d.ts → storage-CF0Ih8GP.d.ts} +1 -1
- package/dist/storage.d.ts +2 -2
- package/dist/storage.js +13 -13
- package/dist/summarizer.d.ts +1 -1
- package/dist/summarizer.js +3 -2
- package/dist/summary-snapshot.d.ts +1 -1
- 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/tokens.js +2 -2
- 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 +5 -5
- package/dist/trust-score-stage.d.ts +1 -1
- package/dist/trust-score.d.ts +1 -1
- package/dist/{types-aPPzhnjT.d.ts → types-BpaYvJ6v.d.ts} +22 -2
- 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 +14 -14
- package/dist/write-envelope.d.ts +1 -1
- package/package.json +2 -2
- package/src/access-boundary.ts +3 -0
- package/src/access-cli.test.ts +93 -0
- package/src/access-cli.ts +56 -2
- package/src/access-extraction-force-flush.ts +177 -0
- package/src/access-http-extraction-force-flush.test.ts +132 -0
- package/src/access-http-lcm-compaction.ts +99 -22
- package/src/access-http-lifecycle-flush.ts +81 -0
- package/src/access-http.test.ts +227 -0
- package/src/access-http.ts +33 -40
- package/src/access-mcp-output-schemas.ts +6 -0
- package/src/access-mcp.test.ts +40 -0
- package/src/access-mcp.ts +32 -1
- package/src/access-observe-helpers.ts +180 -0
- package/src/access-observe-write-surface.ts +78 -19
- package/src/access-operations-batch.ts +2 -1
- package/src/access-schema-pi.test.ts +17 -0
- package/src/access-schema.ts +28 -11
- package/src/access-service-helpers.ts +46 -0
- package/src/access-service-observe-lcm-parity.test.ts +781 -31
- package/src/access-service-observe-scope.test.ts +88 -0
- package/src/access-service.ts +46 -128
- package/src/access-surface-catalog.test.ts +32 -0
- package/src/access-surface-catalog.ts +2 -0
- package/src/buffer-session.test.ts +148 -0
- package/src/buffer-turn-helpers.ts +152 -0
- package/src/buffer.ts +126 -201
- package/src/correction/correction-access-wiring.ts +79 -27
- package/src/correction/correction-executor.test.ts +542 -1
- package/src/correction/correction-executor.ts +309 -89
- package/src/correction/correction-planner.test.ts +35 -1
- package/src/correction/correction-planner.ts +50 -3
- package/src/correction/correction-service.ts +12 -7
- package/src/correction/correction-storage-integration.test.ts +172 -1
- package/src/correction/passive-capture.test.ts +35 -0
- package/src/correction/passive-capture.ts +17 -3
- package/src/extraction-source-grounding.ts +55 -1
- package/src/extraction-timeout.test.ts +51 -0
- package/src/extraction.ts +64 -90
- package/src/local-llm-headers-timeout.test.ts +48 -0
- package/src/local-llm-helpers.ts +58 -0
- package/src/local-llm.ts +62 -58
- package/src/orchestration/extraction-run-helpers.ts +309 -0
- package/src/orchestration/extraction-run.test.ts +350 -7
- package/src/orchestration/extraction-run.ts +327 -250
- package/src/orchestration/session-context.ts +193 -18
- package/src/orchestration/turn-ingestion.ts +61 -11
- package/src/orchestrator-flush.test.ts +511 -5
- package/src/orchestrator.ts +8 -6
- package/src/types.ts +2 -2
- package/dist/chunk-4A6YGWQN.js.map +0 -1
- package/dist/chunk-4WKA6I65.js.map +0 -1
- package/dist/chunk-4Z4XNEWZ.js.map +0 -1
- package/dist/chunk-6FUPCJUL.js.map +0 -1
- package/dist/chunk-B6JDYXL7.js.map +0 -1
- package/dist/chunk-GBJ4RDFR.js.map +0 -1
- package/dist/chunk-HUHX2OCX.js.map +0 -1
- package/dist/chunk-IYZ5K7MU.js.map +0 -1
- package/dist/chunk-LGHKJABJ.js.map +0 -1
- package/dist/chunk-PHWUFPCO.js.map +0 -1
- package/dist/chunk-RPW2NOU6.js.map +0 -1
- package/dist/chunk-SPJXKAVF.js.map +0 -1
- package/dist/chunk-YNQBRLC5.js.map +0 -1
- package/dist/chunk-YTSNAUXN.js.map +0 -1
- /package/dist/{capsule-crypto-GWVG7LGC.js.map → access-extraction-force-flush.js.map} +0 -0
- /package/dist/{capsule-merge-5KKJQBWQ.js.map → capsule-merge-2H2IUTBT.js.map} +0 -0
- /package/dist/{chunk-LEPOP46W.js.map → chunk-227UFSEQ.js.map} +0 -0
- /package/dist/{chunk-GIBMDSJ2.js.map → chunk-27P5YVDU.js.map} +0 -0
- /package/dist/{chunk-2SA56WMI.js.map → chunk-2LTDWSR6.js.map} +0 -0
- /package/dist/{chunk-OWHERGF2.js.map → chunk-2NLLXCJG.js.map} +0 -0
- /package/dist/{chunk-6U7F52DE.js.map → chunk-4XHR3I67.js.map} +0 -0
- /package/dist/{chunk-2EUVEDF5.js.map → chunk-5XA7PQ5I.js.map} +0 -0
- /package/dist/{chunk-ALSGMEJR.js.map → chunk-65ZPVYTA.js.map} +0 -0
- /package/dist/{chunk-5VQJBH2G.js.map → chunk-6TAUHL33.js.map} +0 -0
- /package/dist/{chunk-RGIWINDN.js.map → chunk-7G5MH4NT.js.map} +0 -0
- /package/dist/{chunk-WVO4G37W.js.map → chunk-7TEZUUGM.js.map} +0 -0
- /package/dist/{chunk-MJCGLM25.js.map → chunk-7VUAG236.js.map} +0 -0
- /package/dist/{chunk-M3C2V3PV.js.map → chunk-AJEMDQNA.js.map} +0 -0
- /package/dist/{chunk-RKNJBZ55.js.map → chunk-AU7Q3LSC.js.map} +0 -0
- /package/dist/{chunk-ACXPX4AG.js.map → chunk-BR2K43MK.js.map} +0 -0
- /package/dist/{chunk-CZRYLSSW.js.map → chunk-BUGVGH4N.js.map} +0 -0
- /package/dist/{chunk-YTQNQ4KB.js.map → chunk-C4VQMFVM.js.map} +0 -0
- /package/dist/{chunk-ZPSVBSOF.js.map → chunk-CIVDJD6P.js.map} +0 -0
- /package/dist/{chunk-K5GB36ME.js.map → chunk-CZDOT5I2.js.map} +0 -0
- /package/dist/{chunk-VI2JQPNQ.js.map → chunk-E4PWACUN.js.map} +0 -0
- /package/dist/{chunk-D2ANTDGO.js.map → chunk-E6BMSH7U.js.map} +0 -0
- /package/dist/{chunk-P5PXWTW7.js.map → chunk-EJCAV3QZ.js.map} +0 -0
- /package/dist/{chunk-CKMO4RDY.js.map → chunk-EMDLM3LW.js.map} +0 -0
- /package/dist/{chunk-G5R3D5UP.js.map → chunk-GTTAHHD3.js.map} +0 -0
- /package/dist/{chunk-H5CPS5JP.js.map → chunk-H36LJIPD.js.map} +0 -0
- /package/dist/{chunk-AITCS2RC.js.map → chunk-IJ7HK452.js.map} +0 -0
- /package/dist/{chunk-D3LMYTBV.js.map → chunk-J7WZUL2K.js.map} +0 -0
- /package/dist/{chunk-5W4ZLBEZ.js.map → chunk-JCFTIQBR.js.map} +0 -0
- /package/dist/{chunk-XOZ4ALGB.js.map → chunk-KE353EWI.js.map} +0 -0
- /package/dist/{chunk-W5EG6LE3.js.map → chunk-KIT6M7EB.js.map} +0 -0
- /package/dist/{chunk-5W7CTZ2E.js.map → chunk-KQAFEZQX.js.map} +0 -0
- /package/dist/{chunk-Z54EM5YZ.js.map → chunk-MAXVH44E.js.map} +0 -0
- /package/dist/{chunk-WZFAPHIK.js.map → chunk-MU7ZHSZE.js.map} +0 -0
- /package/dist/{chunk-66772WBP.js.map → chunk-NFXQJHJD.js.map} +0 -0
- /package/dist/{chunk-AZ5BTEKX.js.map → chunk-NQUF7XKR.js.map} +0 -0
- /package/dist/{chunk-W4FBGYGK.js.map → chunk-NRV4Y3PM.js.map} +0 -0
- /package/dist/{chunk-NHWB6HG2.js.map → chunk-NYCGIQRA.js.map} +0 -0
- /package/dist/{chunk-QJAQNXWI.js.map → chunk-ONHRRJZM.js.map} +0 -0
- /package/dist/{chunk-FDAMS4PK.js.map → chunk-PNPOWBGC.js.map} +0 -0
- /package/dist/{chunk-IC6CBHCA.js.map → chunk-QGENAYVS.js.map} +0 -0
- /package/dist/{chunk-62U4J2GN.js.map → chunk-UR77VKF7.js.map} +0 -0
- /package/dist/{chunk-JCBWCYEJ.js.map → chunk-VANLTS5F.js.map} +0 -0
- /package/dist/{chunk-RMMVQQA6.js.map → chunk-WDISJRMG.js.map} +0 -0
- /package/dist/{chunk-UVYI6VIX.js.map → chunk-X7Y7WX73.js.map} +0 -0
- /package/dist/{chunk-TH2LSRMG.js.map → chunk-XHDIB4T4.js.map} +0 -0
- /package/dist/{chunk-CVILPI77.js.map → chunk-XOQSEF7X.js.map} +0 -0
- /package/dist/{chunk-LBOD4U5B.js.map → chunk-YFOMN2II.js.map} +0 -0
- /package/dist/{chunk-I5NLEENJ.js.map → chunk-Z4SWV4VW.js.map} +0 -0
|
@@ -0,0 +1,112 @@
|
|
|
1
|
+
// src/buffer-turn-helpers.ts
|
|
2
|
+
function describeError(err) {
|
|
3
|
+
if (err instanceof Error) return err.message;
|
|
4
|
+
if (err === null) return "null";
|
|
5
|
+
if (err === void 0) return "undefined";
|
|
6
|
+
if (typeof err === "string") return err;
|
|
7
|
+
try {
|
|
8
|
+
return JSON.stringify(err);
|
|
9
|
+
} catch {
|
|
10
|
+
return String(err);
|
|
11
|
+
}
|
|
12
|
+
}
|
|
13
|
+
function copyBufferTurn(turn) {
|
|
14
|
+
const copy = {
|
|
15
|
+
role: turn.role,
|
|
16
|
+
content: turn.content,
|
|
17
|
+
timestamp: turn.timestamp
|
|
18
|
+
};
|
|
19
|
+
if (typeof turn.sessionKey === "string") copy.sessionKey = turn.sessionKey;
|
|
20
|
+
if (typeof turn.logicalSessionKey === "string") {
|
|
21
|
+
copy.logicalSessionKey = turn.logicalSessionKey;
|
|
22
|
+
}
|
|
23
|
+
if (turn.providerThreadId === null || typeof turn.providerThreadId === "string") {
|
|
24
|
+
copy.providerThreadId = turn.providerThreadId;
|
|
25
|
+
}
|
|
26
|
+
if (typeof turn.sessionOwnerPrincipal === "string") {
|
|
27
|
+
copy.sessionOwnerPrincipal = turn.sessionOwnerPrincipal;
|
|
28
|
+
}
|
|
29
|
+
if (typeof turn.turnFingerprint === "string") {
|
|
30
|
+
copy.turnFingerprint = turn.turnFingerprint;
|
|
31
|
+
}
|
|
32
|
+
if (typeof turn.persistProcessedFingerprint === "boolean") {
|
|
33
|
+
copy.persistProcessedFingerprint = turn.persistProcessedFingerprint;
|
|
34
|
+
}
|
|
35
|
+
if (typeof turn.sourceConnector === "string") {
|
|
36
|
+
copy.sourceConnector = turn.sourceConnector;
|
|
37
|
+
}
|
|
38
|
+
return copy;
|
|
39
|
+
}
|
|
40
|
+
function bufferTurnsEqual(left, right) {
|
|
41
|
+
if (!left) return false;
|
|
42
|
+
return left.role === right.role && left.content === right.content && left.timestamp === right.timestamp && left.sessionKey === right.sessionKey && left.sessionOwnerPrincipal === right.sessionOwnerPrincipal && left.logicalSessionKey === right.logicalSessionKey && left.providerThreadId === right.providerThreadId && left.turnFingerprint === right.turnFingerprint && left.persistProcessedFingerprint === right.persistProcessedFingerprint && left.sourceConnector === right.sourceConnector;
|
|
43
|
+
}
|
|
44
|
+
function bufferTurnArraysEqual(left, right) {
|
|
45
|
+
return left.length === right.length && left.every((turn, index) => bufferTurnsEqual(turn, right[index]));
|
|
46
|
+
}
|
|
47
|
+
function bufferTurnArrayIsSuffixOfSnapshot(liveTurns, snapshot) {
|
|
48
|
+
if (liveTurns.length === 0 || liveTurns.length > snapshot.length) {
|
|
49
|
+
return false;
|
|
50
|
+
}
|
|
51
|
+
const offset = snapshot.length - liveTurns.length;
|
|
52
|
+
return liveTurns.every((turn, index) => bufferTurnsEqual(turn, snapshot[offset + index]));
|
|
53
|
+
}
|
|
54
|
+
function liveTurnsFromExtractionSnapshot(entry, extractedTurns) {
|
|
55
|
+
const retainedTurns = entry.retainedTurns ?? [];
|
|
56
|
+
if (retainedTurns.length > 0 && extractedTurns.length >= retainedTurns.length && retainedTurns.every((turn, index) => bufferTurnsEqual(extractedTurns[index], turn))) {
|
|
57
|
+
const withoutRetainedPrefix = extractedTurns.slice(retainedTurns.length);
|
|
58
|
+
if (withoutRetainedPrefix.length > 0 && matchingPrefixLength(entry.turns, withoutRetainedPrefix) > 0) {
|
|
59
|
+
return withoutRetainedPrefix;
|
|
60
|
+
}
|
|
61
|
+
}
|
|
62
|
+
return extractedTurns;
|
|
63
|
+
}
|
|
64
|
+
function matchingPrefixLength(liveTurns, extractedTurns) {
|
|
65
|
+
let index = 0;
|
|
66
|
+
while (index < liveTurns.length && index < extractedTurns.length && bufferTurnsEqual(liveTurns[index], extractedTurns[index])) {
|
|
67
|
+
index += 1;
|
|
68
|
+
}
|
|
69
|
+
return index;
|
|
70
|
+
}
|
|
71
|
+
function matchingQueuedExtractionPrefixLength(liveTurns, extractedTurns) {
|
|
72
|
+
let bestMatchedCount = 0;
|
|
73
|
+
for (let start = 0; start < extractedTurns.length; start += 1) {
|
|
74
|
+
const matchedCount = matchingPrefixLength(liveTurns, extractedTurns.slice(start));
|
|
75
|
+
if (matchedCount > bestMatchedCount) {
|
|
76
|
+
bestMatchedCount = matchedCount;
|
|
77
|
+
if (bestMatchedCount === liveTurns.length) break;
|
|
78
|
+
}
|
|
79
|
+
}
|
|
80
|
+
return bestMatchedCount;
|
|
81
|
+
}
|
|
82
|
+
var ProbeTimeoutError = class extends Error {
|
|
83
|
+
constructor(timeoutMs) {
|
|
84
|
+
super(`probe exceeded ${timeoutMs}ms`);
|
|
85
|
+
this.name = "ProbeTimeoutError";
|
|
86
|
+
}
|
|
87
|
+
};
|
|
88
|
+
function probeWithTimeout(inflight, timeoutMs) {
|
|
89
|
+
let timer = null;
|
|
90
|
+
const timeout = new Promise((_, reject) => {
|
|
91
|
+
timer = setTimeout(() => reject(new ProbeTimeoutError(timeoutMs)), timeoutMs);
|
|
92
|
+
if (typeof timer.unref === "function") {
|
|
93
|
+
timer.unref();
|
|
94
|
+
}
|
|
95
|
+
});
|
|
96
|
+
return Promise.race([inflight, timeout]).finally(() => {
|
|
97
|
+
if (timer) clearTimeout(timer);
|
|
98
|
+
});
|
|
99
|
+
}
|
|
100
|
+
|
|
101
|
+
export {
|
|
102
|
+
describeError,
|
|
103
|
+
copyBufferTurn,
|
|
104
|
+
bufferTurnsEqual,
|
|
105
|
+
bufferTurnArraysEqual,
|
|
106
|
+
bufferTurnArrayIsSuffixOfSnapshot,
|
|
107
|
+
liveTurnsFromExtractionSnapshot,
|
|
108
|
+
matchingQueuedExtractionPrefixLength,
|
|
109
|
+
ProbeTimeoutError,
|
|
110
|
+
probeWithTimeout
|
|
111
|
+
};
|
|
112
|
+
//# sourceMappingURL=chunk-ER7W6H4T.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../src/buffer-turn-helpers.ts"],"sourcesContent":["import type { BufferEntryState, BufferTurn } from \"./types.js\";\n\nexport interface BufferTurnOwner {\n /**\n * Server-resolved principal that owns this session at the authenticated\n * observe/write boundary. Persisted with the buffered turn so lifecycle\n * flushes do not have to infer ownership from a client-chosen session key.\n */\n sessionOwnerPrincipal?: string;\n}\n\nexport function describeError(err: unknown): string {\n if (err instanceof Error) return err.message;\n if (err === null) return \"null\";\n if (err === undefined) return \"undefined\";\n if (typeof err === \"string\") return err;\n try {\n return JSON.stringify(err);\n } catch {\n return String(err);\n }\n}\n\nexport function copyBufferTurn(turn: BufferTurn): BufferTurn {\n const copy: BufferTurn = {\n role: turn.role,\n content: turn.content,\n timestamp: turn.timestamp,\n };\n if (typeof turn.sessionKey === \"string\") copy.sessionKey = turn.sessionKey;\n if (typeof turn.logicalSessionKey === \"string\") {\n copy.logicalSessionKey = turn.logicalSessionKey;\n }\n if (turn.providerThreadId === null || typeof turn.providerThreadId === \"string\") {\n copy.providerThreadId = turn.providerThreadId;\n }\n if (typeof turn.sessionOwnerPrincipal === \"string\") {\n copy.sessionOwnerPrincipal = turn.sessionOwnerPrincipal;\n }\n if (typeof turn.turnFingerprint === \"string\") {\n copy.turnFingerprint = turn.turnFingerprint;\n }\n if (typeof turn.persistProcessedFingerprint === \"boolean\") {\n copy.persistProcessedFingerprint = turn.persistProcessedFingerprint;\n }\n if (typeof turn.sourceConnector === \"string\") {\n copy.sourceConnector = turn.sourceConnector;\n }\n return copy;\n}\n\nexport function bufferTurnsEqual(left: BufferTurn | undefined, right: BufferTurn): boolean {\n if (!left) return false;\n return (\n left.role === right.role &&\n left.content === right.content &&\n left.timestamp === right.timestamp &&\n left.sessionKey === right.sessionKey &&\n left.sessionOwnerPrincipal === right.sessionOwnerPrincipal &&\n left.logicalSessionKey === right.logicalSessionKey &&\n left.providerThreadId === right.providerThreadId &&\n left.turnFingerprint === right.turnFingerprint &&\n left.persistProcessedFingerprint === right.persistProcessedFingerprint &&\n left.sourceConnector === right.sourceConnector\n );\n}\n\nexport function bufferTurnArraysEqual(\n left: readonly BufferTurn[],\n right: readonly BufferTurn[],\n): boolean {\n return left.length === right.length && left.every((turn, index) => bufferTurnsEqual(turn, right[index]));\n}\n\nexport function bufferTurnArrayIsSuffixOfSnapshot(\n liveTurns: readonly BufferTurn[],\n snapshot: readonly BufferTurn[],\n): boolean {\n if (liveTurns.length === 0 || liveTurns.length > snapshot.length) {\n return false;\n }\n const offset = snapshot.length - liveTurns.length;\n return liveTurns.every((turn, index) => bufferTurnsEqual(turn, snapshot[offset + index]));\n}\n\nexport function liveTurnsFromExtractionSnapshot(\n entry: BufferEntryState,\n extractedTurns: readonly BufferTurn[],\n): readonly BufferTurn[] {\n const retainedTurns = entry.retainedTurns ?? [];\n if (\n retainedTurns.length > 0 &&\n extractedTurns.length >= retainedTurns.length &&\n retainedTurns.every((turn, index) => bufferTurnsEqual(extractedTurns[index], turn))\n ) {\n const withoutRetainedPrefix = extractedTurns.slice(retainedTurns.length);\n if (withoutRetainedPrefix.length > 0 && matchingPrefixLength(entry.turns, withoutRetainedPrefix) > 0) {\n return withoutRetainedPrefix;\n }\n }\n return extractedTurns;\n}\n\nfunction matchingPrefixLength(\n liveTurns: readonly BufferTurn[],\n extractedTurns: readonly BufferTurn[],\n): number {\n let index = 0;\n while (\n index < liveTurns.length &&\n index < extractedTurns.length &&\n bufferTurnsEqual(liveTurns[index], extractedTurns[index])\n ) {\n index += 1;\n }\n return index;\n}\n\nexport function matchingQueuedExtractionPrefixLength(\n liveTurns: readonly BufferTurn[],\n extractedTurns: readonly BufferTurn[],\n): number {\n let bestMatchedCount = 0;\n for (let start = 0; start < extractedTurns.length; start += 1) {\n const matchedCount = matchingPrefixLength(liveTurns, extractedTurns.slice(start));\n if (matchedCount > bestMatchedCount) {\n bestMatchedCount = matchedCount;\n if (bestMatchedCount === liveTurns.length) break;\n }\n }\n return bestMatchedCount;\n}\n\nexport class ProbeTimeoutError extends Error {\n constructor(timeoutMs: number) {\n super(`probe exceeded ${timeoutMs}ms`);\n this.name = \"ProbeTimeoutError\";\n }\n}\n\nexport function probeWithTimeout<T>(inflight: Promise<T>, timeoutMs: number): Promise<T> {\n let timer: NodeJS.Timeout | null = null;\n const timeout = new Promise<T>((_, reject) => {\n timer = setTimeout(() => reject(new ProbeTimeoutError(timeoutMs)), timeoutMs);\n if (typeof (timer as NodeJS.Timeout).unref === \"function\") {\n (timer as NodeJS.Timeout).unref();\n }\n });\n return Promise.race([inflight, timeout]).finally(() => {\n if (timer) clearTimeout(timer);\n });\n}\n"],"mappings":"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","names":[]}
|
|
@@ -3,7 +3,7 @@ import {
|
|
|
3
3
|
} from "./chunk-V7IZKJI3.js";
|
|
4
4
|
import {
|
|
5
5
|
AdapterRegistry
|
|
6
|
-
} from "./chunk-
|
|
6
|
+
} from "./chunk-AU7Q3LSC.js";
|
|
7
7
|
import {
|
|
8
8
|
WriteRateLimiter
|
|
9
9
|
} from "./chunk-MKQBXQKU.js";
|
|
@@ -16,13 +16,10 @@ import {
|
|
|
16
16
|
processChatMessage,
|
|
17
17
|
sessionBelongsToPrincipal,
|
|
18
18
|
subscribeChatTranscript
|
|
19
|
-
} from "./chunk-
|
|
19
|
+
} from "./chunk-GOUILH55.js";
|
|
20
20
|
import {
|
|
21
21
|
RelayMissionStoreError
|
|
22
|
-
} from "./chunk-
|
|
23
|
-
import {
|
|
24
|
-
validateRequest
|
|
25
|
-
} from "./chunk-YTSNAUXN.js";
|
|
22
|
+
} from "./chunk-CIVDJD6P.js";
|
|
26
23
|
import {
|
|
27
24
|
executeResolution,
|
|
28
25
|
isValidResolutionVerb
|
|
@@ -33,30 +30,41 @@ import {
|
|
|
33
30
|
readPair
|
|
34
31
|
} from "./chunk-35NN3ZFA.js";
|
|
35
32
|
import {
|
|
36
|
-
|
|
33
|
+
validateRequest
|
|
34
|
+
} from "./chunk-3F2LKUMU.js";
|
|
35
|
+
import {
|
|
36
|
+
maybeHandleLifecycleFlush
|
|
37
|
+
} from "./chunk-5IVLTFOV.js";
|
|
38
|
+
import {
|
|
37
39
|
respondLcmCompactionCapabilitiesHttp
|
|
38
|
-
} from "./chunk-
|
|
40
|
+
} from "./chunk-VCD4PSK2.js";
|
|
39
41
|
import {
|
|
40
42
|
authorizationProbeNamespaces,
|
|
41
43
|
probeOperationAuthorization
|
|
42
|
-
} from "./chunk-
|
|
44
|
+
} from "./chunk-UR77VKF7.js";
|
|
43
45
|
import {
|
|
44
46
|
CorrectionContractError,
|
|
45
47
|
getOperation,
|
|
46
48
|
resolveQueryNamespaceWritablePreflight
|
|
47
|
-
} from "./chunk-
|
|
49
|
+
} from "./chunk-OGCNZPKX.js";
|
|
48
50
|
import {
|
|
49
51
|
isTrustZoneName
|
|
50
52
|
} from "./chunk-JGSKJHF7.js";
|
|
51
|
-
import {
|
|
52
|
-
projectTagProjectId
|
|
53
|
-
} from "./chunk-IYZ5K7MU.js";
|
|
54
53
|
import {
|
|
55
54
|
subscribeGraphEvents
|
|
56
55
|
} from "./chunk-DEUNUKTD.js";
|
|
56
|
+
import {
|
|
57
|
+
projectTagProjectId
|
|
58
|
+
} from "./chunk-BUE5E2HL.js";
|
|
57
59
|
import {
|
|
58
60
|
isRecallDisclosure
|
|
59
|
-
} from "./chunk-
|
|
61
|
+
} from "./chunk-7DRETLP5.js";
|
|
62
|
+
import {
|
|
63
|
+
assertOperationAllowed,
|
|
64
|
+
enforceNamespaceAllowList,
|
|
65
|
+
isCapabilityRestricted,
|
|
66
|
+
tokenCapabilityStore
|
|
67
|
+
} from "./chunk-MZWSOLMT.js";
|
|
60
68
|
import {
|
|
61
69
|
expandTildePath
|
|
62
70
|
} from "./chunk-EYIEWJNI.js";
|
|
@@ -65,12 +73,6 @@ import {
|
|
|
65
73
|
OFFLINE_SYNC_FILE_CONTENT_MAX_CHUNK_BYTES,
|
|
66
74
|
OFFLINE_SYNC_SNAPSHOT_BASE_MAX_BODY_BYTES
|
|
67
75
|
} from "./chunk-7XC2HX75.js";
|
|
68
|
-
import {
|
|
69
|
-
assertOperationAllowed,
|
|
70
|
-
enforceNamespaceAllowList,
|
|
71
|
-
isCapabilityRestricted,
|
|
72
|
-
tokenCapabilityStore
|
|
73
|
-
} from "./chunk-MZWSOLMT.js";
|
|
74
76
|
import {
|
|
75
77
|
EngramAccessForbiddenError,
|
|
76
78
|
EngramAccessInputError
|
|
@@ -1453,37 +1455,12 @@ var EngramAccessHttpServer = class {
|
|
|
1453
1455
|
this.respondJson(res, 200, response);
|
|
1454
1456
|
return;
|
|
1455
1457
|
}
|
|
1456
|
-
if (
|
|
1457
|
-
this.
|
|
1458
|
-
|
|
1459
|
-
|
|
1460
|
-
|
|
1461
|
-
|
|
1462
|
-
response: res,
|
|
1463
|
-
ensureWriteRateLimitAvailable: () => this.ensureWriteRateLimitAvailable(req),
|
|
1464
|
-
recordWriteRateLimitHit: () => this.recordWriteRateLimitHit(req),
|
|
1465
|
-
resolveNamespace: (namespace) => this.resolveNamespace(req, namespace),
|
|
1466
|
-
defaultNamespace: this.service.configRef?.defaultNamespace,
|
|
1467
|
-
resolveRequestPrincipal: () => this.resolveRequestPrincipal(req),
|
|
1468
|
-
respondJson: this.respondJson.bind(this)
|
|
1469
|
-
});
|
|
1470
|
-
return;
|
|
1471
|
-
}
|
|
1472
|
-
if (req.method === "POST" && (pathname === "/engram/v1/lcm/compaction/record" || pathname === "/remnic/v1/lcm/compaction/record")) {
|
|
1473
|
-
this.enforceTokenOp("lcm_compaction_record");
|
|
1474
|
-
const body = await this.readValidatedBody(req, "lcmCompactionRecord");
|
|
1475
|
-
this.ensureWriteRateLimitAvailable(req);
|
|
1476
|
-
const response = await this.service.lcmCompactionRecord({
|
|
1477
|
-
sessionKey: body.sessionKey,
|
|
1478
|
-
namespace: this.resolveNamespace(req, body.namespace),
|
|
1479
|
-
tokensBefore: body.tokensBefore,
|
|
1480
|
-
tokensAfter: body.tokensAfter,
|
|
1481
|
-
authenticatedPrincipal: this.resolveRequestPrincipal(req)
|
|
1482
|
-
});
|
|
1483
|
-
this.recordWriteRateLimitHit(req);
|
|
1484
|
-
this.respondJson(res, 200, response);
|
|
1485
|
-
return;
|
|
1486
|
-
}
|
|
1458
|
+
if (await maybeHandleLifecycleFlush(
|
|
1459
|
+
this.lifecycleFlushDeps(req, res),
|
|
1460
|
+
req.method,
|
|
1461
|
+
pathname,
|
|
1462
|
+
abortSignal
|
|
1463
|
+
)) return;
|
|
1487
1464
|
if (req.method === "GET" && pathname === "/engram/v1/lcm/status") {
|
|
1488
1465
|
this.enforceTokenOp("lcm_status");
|
|
1489
1466
|
this.respondJson(res, 200, await this.service.lcmStatus());
|
|
@@ -2666,8 +2643,15 @@ var EngramAccessHttpServer = class {
|
|
|
2666
2643
|
]);
|
|
2667
2644
|
const isCodegraphManageAdr = toolName === "engram.codegraph_manage_adr" || toolName === "remnic.codegraph_manage_adr";
|
|
2668
2645
|
const codegraphWrite = CODEGRAPH_WRITE_TOOLS.has(toolName) || isCodegraphManageAdr && (toolArgsSubcommand === "record" || toolArgsSubcommand === "supersede");
|
|
2669
|
-
const isMcpWrite = request.method === "tools/call" && (toolName === "engram.memory_store" || toolName === "remnic.memory_store" || toolName === "engram.suggestion_submit" || toolName === "remnic.suggestion_submit" || toolName === "engram.observe" || toolName === "remnic.observe" || toolName === "engram.lcm_compaction_flush" || toolName === "remnic.lcm_compaction_flush" || toolName === "engram.lcm_compaction_record" || toolName === "remnic.lcm_compaction_record" || toolName === "engram.capsule_export" || toolName === "remnic.capsule_export" || toolName === "engram.capsule_import" || toolName === "remnic.capsule_import" || toolName === "engram.entity_synthesis_run" || toolName === "remnic.entity_synthesis_run" || !dreamsRunDryRun && (toolName === "engram.dreams_run" || toolName === "remnic.dreams_run") || !memoryActionApplyDryRun && (toolName === "engram.memory_action_apply" || toolName === "remnic.memory_action_apply") || (toolName === "engram.memory_correct_apply" || toolName === "remnic.memory_correct_apply" || toolName === "engram.memory_correct_plan" || toolName === "remnic.memory_correct_plan") || codingDecisionWrite || codingArchitectureWrite || codegraphWrite);
|
|
2646
|
+
const isMcpWrite = request.method === "tools/call" && (toolName === "engram.memory_store" || toolName === "remnic.memory_store" || toolName === "engram.suggestion_submit" || toolName === "remnic.suggestion_submit" || toolName === "engram.observe" || toolName === "remnic.observe" || toolName === "engram.lcm_compaction_flush" || toolName === "remnic.lcm_compaction_flush" || toolName === "engram.extraction_force_flush" || toolName === "remnic.extraction_force_flush" || toolName === "engram.lcm_compaction_record" || toolName === "remnic.lcm_compaction_record" || toolName === "engram.capsule_export" || toolName === "remnic.capsule_export" || toolName === "engram.capsule_import" || toolName === "remnic.capsule_import" || toolName === "engram.entity_synthesis_run" || toolName === "remnic.entity_synthesis_run" || !dreamsRunDryRun && (toolName === "engram.dreams_run" || toolName === "remnic.dreams_run") || !memoryActionApplyDryRun && (toolName === "engram.memory_action_apply" || toolName === "remnic.memory_action_apply") || (toolName === "engram.memory_correct_apply" || toolName === "remnic.memory_correct_apply" || toolName === "engram.memory_correct_plan" || toolName === "remnic.memory_correct_plan") || codingDecisionWrite || codingArchitectureWrite || codegraphWrite);
|
|
2670
2647
|
const observeSelfEnforcesQuota = toolName === "engram.observe" || toolName === "remnic.observe";
|
|
2648
|
+
const extractionForceFlushWrite = toolName === "engram.extraction_force_flush" || toolName === "remnic.extraction_force_flush";
|
|
2649
|
+
let writeRateLimitRecorded = false;
|
|
2650
|
+
const recordCommittedMcpWrite = extractionForceFlushWrite ? () => {
|
|
2651
|
+
if (writeRateLimitRecorded) return;
|
|
2652
|
+
writeRateLimitRecorded = true;
|
|
2653
|
+
this.recordWriteRateLimitHit(req);
|
|
2654
|
+
} : void 0;
|
|
2671
2655
|
if (isMcpWrite && !observeSelfEnforcesQuota) {
|
|
2672
2656
|
this.ensureWriteRateLimitAvailable(req);
|
|
2673
2657
|
}
|
|
@@ -2692,6 +2676,7 @@ var EngramAccessHttpServer = class {
|
|
|
2692
2676
|
sessionId,
|
|
2693
2677
|
correlationId: mcpCorrelationId,
|
|
2694
2678
|
enforceWriteQuota: observeSelfEnforcesQuota ? () => this.ensureWriteRateLimitAvailable(req) : void 0,
|
|
2679
|
+
recordWriteCommit: recordCommittedMcpWrite,
|
|
2695
2680
|
sourceConnector: this.resolveConnector(req),
|
|
2696
2681
|
abortSignal
|
|
2697
2682
|
});
|
|
@@ -2701,8 +2686,9 @@ var EngramAccessHttpServer = class {
|
|
|
2701
2686
|
const structured = result?.structuredContent;
|
|
2702
2687
|
const isRejectedCodegraph = structured?.ok === false;
|
|
2703
2688
|
const counts = structured ? this.shouldCountWriteRateLimit(structured) : true;
|
|
2704
|
-
if (!isError && !isRejectedCodegraph && counts) {
|
|
2689
|
+
if (!writeRateLimitRecorded && !isError && !isRejectedCodegraph && counts) {
|
|
2705
2690
|
this.recordWriteRateLimitHit(req);
|
|
2691
|
+
writeRateLimitRecorded = true;
|
|
2706
2692
|
}
|
|
2707
2693
|
}
|
|
2708
2694
|
if (abortSignal.aborted) {
|
|
@@ -2970,6 +2956,20 @@ var EngramAccessHttpServer = class {
|
|
|
2970
2956
|
if (raw === "false") return false;
|
|
2971
2957
|
throw new EngramAccessInputError(`${name} header must be one of: true, false`);
|
|
2972
2958
|
}
|
|
2959
|
+
lifecycleFlushDeps(req, res) {
|
|
2960
|
+
const readValidatedBody = ((schemaName) => this.readValidatedBody(req, schemaName));
|
|
2961
|
+
return {
|
|
2962
|
+
service: this.service,
|
|
2963
|
+
defaultNamespace: this.service.configRef?.defaultNamespace,
|
|
2964
|
+
enforceTokenOp: (op) => this.enforceTokenOp(op),
|
|
2965
|
+
readValidatedBody,
|
|
2966
|
+
ensureWriteRateLimitAvailable: () => this.ensureWriteRateLimitAvailable(req),
|
|
2967
|
+
resolveNamespace: (namespace) => this.resolveNamespace(req, namespace),
|
|
2968
|
+
resolveRequestPrincipal: () => this.resolveRequestPrincipal(req),
|
|
2969
|
+
recordWriteRateLimitHit: () => this.recordWriteRateLimitHit(req),
|
|
2970
|
+
respondJson: (payload) => this.respondJson(res, 200, payload)
|
|
2971
|
+
};
|
|
2972
|
+
}
|
|
2973
2973
|
async readValidatedBody(req, schemaName, maxBodyBytes) {
|
|
2974
2974
|
const raw = await this.readJsonBody(req, maxBodyBytes);
|
|
2975
2975
|
const result = validateRequest(schemaName, raw);
|
|
@@ -3218,4 +3218,4 @@ export {
|
|
|
3218
3218
|
MeetingsInputError,
|
|
3219
3219
|
EngramAccessHttpServer
|
|
3220
3220
|
};
|
|
3221
|
-
//# sourceMappingURL=chunk-
|
|
3221
|
+
//# sourceMappingURL=chunk-FI4F5X2V.js.map
|