@remnic/core 9.3.693 → 9.3.695
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-boundary.d.ts +13 -12
- package/dist/access-boundary.js +36 -28
- package/dist/access-cli.js +62 -59
- package/dist/access-cli.js.map +1 -1
- package/dist/access-http.d.ts +12 -11
- package/dist/access-http.js +40 -32
- package/dist/access-mcp.d.ts +19 -11
- package/dist/access-mcp.js +39 -31
- package/dist/access-operations.d.ts +56 -13
- package/dist/access-operations.js +66 -30
- package/dist/access-schema.js +3 -3
- package/dist/{access-service-DxCpgyVW.d.ts → access-service-BqBQeUJd.d.ts} +99 -3
- package/dist/access-service.d.ts +8 -7
- package/dist/access-service.js +35 -27
- package/dist/access-surface-catalog.d.ts +12 -11
- package/dist/access-surface-catalog.js +15 -0
- package/dist/access-surface-catalog.js.map +1 -1
- 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/{auto-sync-RWXT6P5M.js → auto-sync-PFW2NJZY.js} +8 -8
- package/dist/behavior-learner.d.ts +1 -1
- package/dist/behavior-signals.d.ts +1 -1
- package/dist/bootstrap.d.ts +9 -8
- package/dist/briefing.d.ts +1 -1
- package/dist/briefing.js +12 -5
- package/dist/buffer-surprise-report.d.ts +1 -1
- package/dist/buffer.d.ts +1 -1
- package/dist/calibration.d.ts +1 -1
- package/dist/calibration.js +2 -2
- package/dist/capabilities.d.ts +1 -1
- package/dist/{capsule-crypto-7FJQINUR.js → capsule-crypto-YO5QJ6L3.js} +2 -2
- package/dist/{catalog-BEWLjdOr.d.ts → catalog-D7YDNNF7.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 +17 -16
- package/dist/causal-consolidation.js.map +1 -1
- package/dist/causal-retrieval.js +2 -2
- package/dist/causal-trajectory-graph.js +2 -2
- package/dist/causal-trajectory.js +1 -1
- package/dist/{chunk-UPTZYUYJ.js → chunk-24D66MMN.js} +2 -1
- package/dist/chunk-24D66MMN.js.map +1 -0
- package/dist/{chunk-THKNO6OX.js → chunk-32XTY2DQ.js} +52 -51
- package/dist/chunk-32XTY2DQ.js.map +1 -0
- package/dist/{chunk-YN4ZT4CW.js → chunk-3LYJIA76.js} +1 -1
- package/dist/{chunk-ADUAF5EV.js → chunk-3P2XEQSV.js} +2 -2
- package/dist/{chunk-KYH53EFD.js → chunk-4NNDJOAO.js} +8 -8
- package/dist/{chunk-QFG23CRE.js → chunk-52QIAN76.js} +2 -2
- package/dist/chunk-5AT62NQH.js +553 -0
- package/dist/chunk-5AT62NQH.js.map +1 -0
- package/dist/{chunk-TAPSNIMA.js → chunk-5CEJH5ZN.js} +4 -4
- package/dist/{chunk-4RGWCRIJ.js → chunk-5TYA4OCF.js} +4 -4
- package/dist/{chunk-FM7KLRKN.js → chunk-6GAUF4OU.js} +3 -3
- package/dist/{chunk-6C2BMUZA.js → chunk-AF6DSAWD.js} +2 -2
- package/dist/{chunk-2NLLXCJG.js → chunk-BXLOS5AJ.js} +2 -2
- package/dist/{chunk-32KD5IHZ.js → chunk-CLXTDOKV.js} +2 -2
- package/dist/{chunk-ARV3AUOM.js → chunk-DL6H3D7S.js} +2 -2
- package/dist/{chunk-X7Y7WX73.js → chunk-DQEMWVMT.js} +1 -1
- package/dist/{chunk-3BRA3N5A.js → chunk-EC3A6M43.js} +2 -2
- package/dist/{chunk-UTUYAPLY.js → chunk-EK6FYL2E.js} +38 -3
- package/dist/chunk-EK6FYL2E.js.map +1 -0
- package/dist/{chunk-ZLXGFAML.js → chunk-FZMH66NT.js} +2 -2
- package/dist/{chunk-HXNMDPHN.js → chunk-G663XUEG.js} +2 -2
- package/dist/{chunk-TYEOAFH3.js → chunk-G6SVZWPB.js} +10 -1
- package/dist/chunk-G6SVZWPB.js.map +1 -0
- package/dist/chunk-HKET3ZOI.js +381 -0
- package/dist/chunk-HKET3ZOI.js.map +1 -0
- package/dist/{chunk-YOI3ELXF.js → chunk-IF362TF6.js} +2 -2
- package/dist/{chunk-WIKNVFBS.js → chunk-J45OCIVH.js} +2 -2
- package/dist/{chunk-UDJLF3BO.js → chunk-JI6HWBYL.js} +2 -2
- package/dist/{chunk-ECZPWSB5.js → chunk-JJT3AGL4.js} +4 -4
- package/dist/{chunk-RHWFMBO5.js → chunk-JMAKCWJ3.js} +96 -7
- package/dist/chunk-JMAKCWJ3.js.map +1 -0
- package/dist/{chunk-4NFVPDIL.js → chunk-LM6JB2EG.js} +2 -2
- package/dist/{chunk-AFWEUTMS.js → chunk-LPIWEKZ3.js} +2 -2
- package/dist/{chunk-LD53WPMU.js → chunk-LQ6JI4VH.js} +4 -4
- package/dist/{chunk-U2OBZSGG.js → chunk-MNFAGE5D.js} +2 -2
- package/dist/{chunk-VFVG4NS2.js → chunk-MOBRVKWE.js} +23 -12
- package/dist/chunk-MOBRVKWE.js.map +1 -0
- package/dist/{chunk-MQTPUPLP.js → chunk-N4PD5IY3.js} +834 -51
- package/dist/chunk-N4PD5IY3.js.map +1 -0
- package/dist/{chunk-5HGPDRQZ.js → chunk-NFMDHE45.js} +2 -2
- package/dist/chunk-NFMDHE45.js.map +1 -0
- package/dist/{chunk-MCV2DD6F.js → chunk-NLZO5NO6.js} +2 -2
- package/dist/{chunk-3VVH6ZQW.js → chunk-Q6ZHGGNJ.js} +2 -2
- package/dist/{chunk-4IQNAOP3.js → chunk-Q7SFJURX.js} +2 -2
- package/dist/{chunk-MXZWKOOR.js → chunk-QJM2XAJD.js} +11 -11
- package/dist/{chunk-6ZNIUGXB.js → chunk-QQW2LIEA.js} +4 -4
- package/dist/{chunk-GCOSQBQ2.js → chunk-QVTSLRKT.js} +3 -3
- package/dist/{chunk-F7BVJ3IE.js → chunk-RWST6NOL.js} +166 -102
- package/dist/chunk-RWST6NOL.js.map +1 -0
- package/dist/{chunk-NUZ3N445.js → chunk-SPVIG2R3.js} +10 -10
- package/dist/{chunk-2D27ODNX.js → chunk-TIVZ4MCG.js} +2 -2
- package/dist/{chunk-5KBNNUXS.js → chunk-TT7BJWGI.js} +2 -2
- package/dist/{chunk-KQAFEZQX.js → chunk-VDX2J7OX.js} +2 -2
- package/dist/{chunk-E6BOD3UJ.js → chunk-VPAFWWCL.js} +2 -2
- package/dist/chunk-VQ7B2Q6M.js +112 -0
- package/dist/chunk-VQ7B2Q6M.js.map +1 -0
- package/dist/{chunk-UOCLRM74.js → chunk-W54EAJT4.js} +2 -2
- package/dist/{chunk-QVG4LAQO.js → chunk-WR6KFJKA.js} +7 -7
- package/dist/{chunk-YQGHW5ML.js → chunk-WRFKZEO6.js} +4 -4
- package/dist/{chunk-WYB44HHV.js → chunk-XUNQLJT2.js} +20 -8
- package/dist/chunk-XUNQLJT2.js.map +1 -0
- package/dist/{chunk-66HROLW5.js → chunk-XWT4JXXA.js} +2 -2
- package/dist/{chunk-SAC5V6JT.js → chunk-XXA6T3O4.js} +2 -2
- package/dist/{chunk-KF74X62T.js → chunk-YGKUAX2B.js} +4 -4
- package/dist/{chunk-W4ELOUNX.js → chunk-YOZNTNNA.js} +2 -2
- package/dist/{chunk-DQHZA7Y3.js → chunk-ZXUOAFUG.js} +1 -1
- package/dist/chunk-ZXUOAFUG.js.map +1 -0
- package/dist/{cli-DoQsv4ut.d.ts → cli-DBDgdvh9.d.ts} +3 -3
- package/dist/cli.d.ts +11 -10
- package/dist/cli.js +58 -50
- package/dist/coding/optional-coding-graph.js +7 -104
- package/dist/coding/optional-coding-graph.js.map +1 -1
- package/dist/compounding/engine.d.ts +1 -1
- package/dist/compounding/engine.js +12 -5
- 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 +12 -5
- package/dist/connectors/codex-materialize.d.ts +1 -1
- package/dist/connectors/index.d.ts +1 -1
- package/dist/connectors/index.js +12 -5
- package/dist/consolidation-provenance-check.d.ts +3 -3
- package/dist/consolidation-undo.d.ts +2 -2
- package/dist/contradiction/index.d.ts +1 -1
- 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/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 +1 -1
- package/dist/entity-retrieval.js +13 -5
- package/dist/entity-schema.d.ts +1 -1
- package/dist/explicit-capture.d.ts +9 -8
- package/dist/extraction-faithfulness.d.ts +211 -0
- package/dist/extraction-faithfulness.js +35 -0
- 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 +4 -4
- package/dist/extraction.d.ts +1 -1
- package/dist/extraction.js +7 -7
- package/dist/fallback-llm.d.ts +1 -1
- package/dist/fallback-llm.js +2 -2
- package/dist/{graph-edge-decay-D7OESCBR.js → graph-edge-decay-JLOF3YW4.js} +3 -3
- package/dist/graph-snapshot.js +3 -3
- package/dist/graph.js +2 -2
- package/dist/identity-continuity.d.ts +1 -1
- package/dist/importance.d.ts +1 -1
- package/dist/index.d.ts +12 -11
- package/dist/index.js +101 -99
- package/dist/index.js.map +1 -1
- package/dist/intent.d.ts +1 -1
- package/dist/lcm/engine.d.ts +1 -1
- package/dist/lcm/index.d.ts +1 -1
- package/dist/lcm/index.js +3 -3
- 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-llm.js +1 -1
- package/dist/maintenance/memory-governance.d.ts +1 -1
- package/dist/maintenance/memory-governance.js +13 -5
- package/dist/maintenance/rebuild-memory-lifecycle-ledger.js +13 -5
- package/dist/maintenance/rebuild-memory-projection.js +14 -6
- package/dist/mcp-memory-inspector-app.d.ts +12 -11
- 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-worth-outcomes.d.ts +1 -1
- package/dist/models-json.d.ts +1 -1
- package/dist/namespaces/migrate.d.ts +2 -2
- package/dist/namespaces/migrate.js +20 -12
- 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 +2 -2
- package/dist/namespaces/storage.js +13 -5
- package/dist/native-knowledge.d.ts +1 -1
- package/dist/operator-toolkit.d.ts +1 -1
- package/dist/operator-toolkit.js +26 -19
- package/dist/orchestration/maintenance.d.ts +2 -2
- package/dist/orchestration/maintenance.js +15 -7
- package/dist/{orchestrator-CNJCYjZ1.d.ts → orchestrator-Dv8JQu3-.d.ts} +20 -3
- package/dist/orchestrator.d.ts +6 -5
- package/dist/orchestrator.js +47 -46
- package/dist/patterns-cli.d.ts +1 -1
- package/dist/policy-runtime.d.ts +1 -1
- package/dist/provenance.d.ts +1 -1
- package/dist/qmd-recall-cache.d.ts +1 -1
- package/dist/qmd.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-planner-llm.d.ts +1 -1
- package/dist/recall-planner-llm.js +2 -2
- package/dist/recall-state.d.ts +1 -1
- package/dist/recall-tag-filter.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/resolve-auth-token.d.ts +1 -1
- package/dist/resume-bundles.js +2 -2
- package/dist/retrieval-agents.d.ts +1 -1
- 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/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 +5 -5
- package/dist/search/lancedb-backend.d.ts +1 -1
- package/dist/search/lancedb-backend.js +2 -2
- package/dist/search/meilisearch-backend.d.ts +1 -1
- package/dist/search/meilisearch-backend.js +2 -2
- package/dist/search/noop-backend.d.ts +1 -1
- package/dist/search/orama-backend.d.ts +1 -1
- package/dist/search/orama-backend.js +2 -2
- package/dist/search/port.d.ts +1 -1
- package/dist/search/remote-backend.d.ts +1 -1
- package/dist/{semantic-consolidation-D5U0Mrdb.d.ts → semantic-consolidation-CgREi9E0.d.ts} +1 -1
- package/dist/semantic-consolidation.d.ts +2 -2
- package/dist/semantic-consolidation.js +13 -6
- package/dist/semantic-rule-promotion.js +13 -5
- package/dist/semantic-rule-verifier.d.ts +1 -1
- package/dist/semantic-rule-verifier.js +13 -5
- 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/{state-NCHQ4TRG.js → state-ITXJKXRE.js} +2 -2
- package/dist/storage.d.ts +11 -1
- package/dist/storage.js +12 -4
- package/dist/summarizer.d.ts +1 -1
- package/dist/summarizer.js +6 -6
- package/dist/summary-snapshot.d.ts +1 -1
- package/dist/temporal-supersession.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 +1 -1
- package/dist/tier-routing.d.ts +1 -1
- package/dist/topics.d.ts +1 -1
- package/dist/{trace-WM7V4CKI.js → trace-ZFVRH4GO.js} +3 -3
- 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/{tui-RI7P6PBS.js → tui-55UJMJX7.js} +3 -3
- package/dist/tui-55UJMJX7.js.map +1 -0
- package/dist/{types-2NoBoRBM.d.ts → types-CeZYSC-E.d.ts} +51 -1
- 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 +13 -5
- package/package.json +2 -2
- package/src/access-boundary.ts +17 -0
- package/src/access-http.ts +27 -3
- package/src/access-mcp.ts +99 -2
- package/src/access-operations.ts +259 -0
- package/src/access-service.ts +82 -0
- package/src/access-surface-catalog.test.ts +1 -1
- package/src/access-surface-catalog.ts +15 -0
- package/src/cli.ts +1 -0
- package/src/coding/architecture-surfaces.test.ts +2 -0
- package/src/coding/codegraph-runtime.ts +773 -0
- package/src/coding/codegraph-surfaces.test.ts +880 -0
- package/src/coding/codegraph-surfaces.ts +771 -0
- package/src/coding/coding-knowledge-config.ts +7 -0
- package/src/coding/decision-surfaces.test.ts +2 -0
- package/src/coding/session-delta-surfaces.test.ts +2 -0
- package/src/config.test.ts +18 -0
- package/src/config.ts +30 -0
- package/src/console/state.ts +32 -0
- package/src/extraction-faithfulness.test.ts +1112 -0
- package/src/extraction-faithfulness.ts +993 -0
- package/src/faithfulness-graph-guard.test.ts +252 -0
- package/src/local-llm.ts +1 -0
- package/src/orchestrator.ts +169 -45
- package/src/storage.ts +19 -0
- package/src/types.ts +61 -0
- package/dist/chunk-5HGPDRQZ.js.map +0 -1
- package/dist/chunk-DQHZA7Y3.js.map +0 -1
- package/dist/chunk-F7BVJ3IE.js.map +0 -1
- package/dist/chunk-JNKH2XWQ.js +0 -183
- package/dist/chunk-JNKH2XWQ.js.map +0 -1
- package/dist/chunk-MQTPUPLP.js.map +0 -1
- package/dist/chunk-RHWFMBO5.js.map +0 -1
- package/dist/chunk-THKNO6OX.js.map +0 -1
- package/dist/chunk-TYEOAFH3.js.map +0 -1
- package/dist/chunk-UPTZYUYJ.js.map +0 -1
- package/dist/chunk-UTUYAPLY.js.map +0 -1
- package/dist/chunk-VFVG4NS2.js.map +0 -1
- package/dist/chunk-WYB44HHV.js.map +0 -1
- /package/dist/{auto-sync-RWXT6P5M.js.map → auto-sync-PFW2NJZY.js.map} +0 -0
- /package/dist/{capsule-crypto-7FJQINUR.js.map → capsule-crypto-YO5QJ6L3.js.map} +0 -0
- /package/dist/{chunk-YN4ZT4CW.js.map → chunk-3LYJIA76.js.map} +0 -0
- /package/dist/{chunk-ADUAF5EV.js.map → chunk-3P2XEQSV.js.map} +0 -0
- /package/dist/{chunk-KYH53EFD.js.map → chunk-4NNDJOAO.js.map} +0 -0
- /package/dist/{chunk-QFG23CRE.js.map → chunk-52QIAN76.js.map} +0 -0
- /package/dist/{chunk-TAPSNIMA.js.map → chunk-5CEJH5ZN.js.map} +0 -0
- /package/dist/{chunk-4RGWCRIJ.js.map → chunk-5TYA4OCF.js.map} +0 -0
- /package/dist/{chunk-FM7KLRKN.js.map → chunk-6GAUF4OU.js.map} +0 -0
- /package/dist/{chunk-6C2BMUZA.js.map → chunk-AF6DSAWD.js.map} +0 -0
- /package/dist/{chunk-2NLLXCJG.js.map → chunk-BXLOS5AJ.js.map} +0 -0
- /package/dist/{chunk-32KD5IHZ.js.map → chunk-CLXTDOKV.js.map} +0 -0
- /package/dist/{chunk-ARV3AUOM.js.map → chunk-DL6H3D7S.js.map} +0 -0
- /package/dist/{chunk-X7Y7WX73.js.map → chunk-DQEMWVMT.js.map} +0 -0
- /package/dist/{chunk-3BRA3N5A.js.map → chunk-EC3A6M43.js.map} +0 -0
- /package/dist/{chunk-ZLXGFAML.js.map → chunk-FZMH66NT.js.map} +0 -0
- /package/dist/{chunk-HXNMDPHN.js.map → chunk-G663XUEG.js.map} +0 -0
- /package/dist/{chunk-YOI3ELXF.js.map → chunk-IF362TF6.js.map} +0 -0
- /package/dist/{chunk-WIKNVFBS.js.map → chunk-J45OCIVH.js.map} +0 -0
- /package/dist/{chunk-UDJLF3BO.js.map → chunk-JI6HWBYL.js.map} +0 -0
- /package/dist/{chunk-ECZPWSB5.js.map → chunk-JJT3AGL4.js.map} +0 -0
- /package/dist/{chunk-4NFVPDIL.js.map → chunk-LM6JB2EG.js.map} +0 -0
- /package/dist/{chunk-AFWEUTMS.js.map → chunk-LPIWEKZ3.js.map} +0 -0
- /package/dist/{chunk-LD53WPMU.js.map → chunk-LQ6JI4VH.js.map} +0 -0
- /package/dist/{chunk-U2OBZSGG.js.map → chunk-MNFAGE5D.js.map} +0 -0
- /package/dist/{chunk-MCV2DD6F.js.map → chunk-NLZO5NO6.js.map} +0 -0
- /package/dist/{chunk-3VVH6ZQW.js.map → chunk-Q6ZHGGNJ.js.map} +0 -0
- /package/dist/{chunk-4IQNAOP3.js.map → chunk-Q7SFJURX.js.map} +0 -0
- /package/dist/{chunk-MXZWKOOR.js.map → chunk-QJM2XAJD.js.map} +0 -0
- /package/dist/{chunk-6ZNIUGXB.js.map → chunk-QQW2LIEA.js.map} +0 -0
- /package/dist/{chunk-GCOSQBQ2.js.map → chunk-QVTSLRKT.js.map} +0 -0
- /package/dist/{chunk-NUZ3N445.js.map → chunk-SPVIG2R3.js.map} +0 -0
- /package/dist/{chunk-2D27ODNX.js.map → chunk-TIVZ4MCG.js.map} +0 -0
- /package/dist/{chunk-5KBNNUXS.js.map → chunk-TT7BJWGI.js.map} +0 -0
- /package/dist/{chunk-KQAFEZQX.js.map → chunk-VDX2J7OX.js.map} +0 -0
- /package/dist/{chunk-E6BOD3UJ.js.map → chunk-VPAFWWCL.js.map} +0 -0
- /package/dist/{chunk-UOCLRM74.js.map → chunk-W54EAJT4.js.map} +0 -0
- /package/dist/{chunk-QVG4LAQO.js.map → chunk-WR6KFJKA.js.map} +0 -0
- /package/dist/{chunk-YQGHW5ML.js.map → chunk-WRFKZEO6.js.map} +0 -0
- /package/dist/{chunk-66HROLW5.js.map → chunk-XWT4JXXA.js.map} +0 -0
- /package/dist/{chunk-SAC5V6JT.js.map → chunk-XXA6T3O4.js.map} +0 -0
- /package/dist/{chunk-KF74X62T.js.map → chunk-YGKUAX2B.js.map} +0 -0
- /package/dist/{chunk-W4ELOUNX.js.map → chunk-YOZNTNNA.js.map} +0 -0
- /package/dist/{state-NCHQ4TRG.js.map → extraction-faithfulness.js.map} +0 -0
- /package/dist/{graph-edge-decay-D7OESCBR.js.map → graph-edge-decay-JLOF3YW4.js.map} +0 -0
- /package/dist/{tui-RI7P6PBS.js.map → state-ITXJKXRE.js.map} +0 -0
- /package/dist/{trace-WM7V4CKI.js.map → trace-ZFVRH4GO.js.map} +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import {
|
|
2
2
|
StorageManager
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-MOBRVKWE.js";
|
|
4
4
|
import {
|
|
5
5
|
getCachedRuleMemories,
|
|
6
6
|
setCachedRuleMemories
|
|
@@ -117,4 +117,4 @@ export {
|
|
|
117
117
|
compareVerifiedSemanticRuleResults,
|
|
118
118
|
searchVerifiedSemanticRules
|
|
119
119
|
};
|
|
120
|
-
//# sourceMappingURL=chunk-
|
|
120
|
+
//# sourceMappingURL=chunk-FZMH66NT.js.map
|
|
@@ -3,7 +3,7 @@ import {
|
|
|
3
3
|
readNamespaceMaintenanceLastRanStatuses,
|
|
4
4
|
readNamespaceMaintenanceStatuses,
|
|
5
5
|
runNamespaceMaintenancePlan
|
|
6
|
-
} from "./chunk-
|
|
6
|
+
} from "./chunk-Q7SFJURX.js";
|
|
7
7
|
|
|
8
8
|
// src/maintenance/namespace-maintenance-fanout.ts
|
|
9
9
|
var NAMESPACE_MAINTENANCE_JOBS = [
|
|
@@ -146,4 +146,4 @@ export {
|
|
|
146
146
|
summarizeNamespaceMaintenanceHealth,
|
|
147
147
|
formatNamespaceMaintenanceHealthText
|
|
148
148
|
};
|
|
149
|
-
//# sourceMappingURL=chunk-
|
|
149
|
+
//# sourceMappingURL=chunk-G663XUEG.js.map
|
|
@@ -17,6 +17,14 @@ async function gatherConsoleState(orchestrator) {
|
|
|
17
17
|
);
|
|
18
18
|
const qmdProbe = readQmdProbe(orchestrator, errors);
|
|
19
19
|
const daemon = readDaemonInfo(orchestrator, errors);
|
|
20
|
+
let faithfulness;
|
|
21
|
+
try {
|
|
22
|
+
if (typeof orchestrator.getConsoleFaithfulnessDistribution === "function") {
|
|
23
|
+
faithfulness = orchestrator.getConsoleFaithfulnessDistribution();
|
|
24
|
+
}
|
|
25
|
+
} catch (err) {
|
|
26
|
+
errors.push(`faithfulness: ${describeError(err)}`);
|
|
27
|
+
}
|
|
20
28
|
return {
|
|
21
29
|
capturedAt,
|
|
22
30
|
bufferState,
|
|
@@ -25,6 +33,7 @@ async function gatherConsoleState(orchestrator) {
|
|
|
25
33
|
maintenanceLedgerTail,
|
|
26
34
|
qmdProbe,
|
|
27
35
|
daemon,
|
|
36
|
+
...faithfulness ? { faithfulness } : {},
|
|
28
37
|
errors
|
|
29
38
|
};
|
|
30
39
|
}
|
|
@@ -248,4 +257,4 @@ function describeError(err) {
|
|
|
248
257
|
export {
|
|
249
258
|
gatherConsoleState
|
|
250
259
|
};
|
|
251
|
-
//# sourceMappingURL=chunk-
|
|
260
|
+
//# sourceMappingURL=chunk-G6SVZWPB.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../src/console/state.ts"],"sourcesContent":["/**\n * Structured engine-state aggregator for the operator console (issue #688).\n *\n * This module is the data layer for the upcoming console TUI / HTTP /\n * MCP surfaces. It collects a point-in-time snapshot of the engine's\n * runtime state — buffer contents, extraction queue depth, recent\n * dedup decisions, the tail of the maintenance/observation ledger,\n * QMD probe status, and daemon metadata — into a single\n * JSON-serializable shape.\n *\n * Design contract:\n * - Each subsystem read is wrapped in try/catch so one failure\n * never crashes the whole snapshot. Failed reads return null /\n * empty values and append a string to `errors`.\n * - The output MUST be JSON-serializable so the CLI / HTTP / MCP\n * surfaces can pipe it directly through `JSON.stringify`.\n * - Read-only: this module never mutates orchestrator state.\n *\n * PR 1/3 of issue #688 wires only the data layer + a CLI flag. The\n * TUI (PR 2/3), HTTP `/console/state`, MCP `engram.console_state`,\n * SSE live updates, and trace replay (PR 3/3) land separately.\n */\n\nimport { promises as fs, createReadStream } from \"node:fs\";\nimport { createInterface } from \"node:readline\";\nimport path from \"node:path\";\n\n/**\n * Public state read off the orchestrator. We intentionally type this\n * as a permissive duck-typed shape rather than importing the concrete\n * `Orchestrator` class — the aggregator must tolerate missing fields\n * (e.g. tests that pass a stub) without throwing. Each accessor is\n * defensively read at call time.\n */\nexport interface ConsoleStateOrchestratorLike {\n config?: {\n memoryDir?: string;\n };\n buffer?: {\n getTurns?: (bufferKey?: string) => Array<{ content?: string }>;\n };\n qmd?: {\n debugStatus?: () => string;\n isAvailable?: () => boolean;\n isDaemonMode?: () => boolean;\n };\n /**\n * Optional console-specific read surface added by future slices.\n * The aggregator falls back to placeholders when these are absent\n * so PR 1/3 ships without coupling to private orchestrator state.\n */\n getConsoleExtractionQueueDepth?: () => number;\n getConsoleExtractionRecentVerdicts?: () => ReadonlyArray<ConsoleExtractionVerdict>;\n getConsoleDedupRecentDecisions?: () => ReadonlyArray<ConsoleDedupDecision>;\n /**\n * Process / daemon metadata. Hosts that run remnic as a long-lived\n * daemon (gateway, MCP server) can override these; otherwise the\n * aggregator falls back to `process.uptime()` and the package\n * version read from disk.\n */\n getConsoleDaemonInfo?: () => ConsoleDaemonInfo;\n /**\n * Optional faithfulness gate distribution (issue #1576). Returns the\n * per-orchestrator running counters when the gate is active, or undefined\n * when the gate is off (so the snapshot omits the block).\n */\n getConsoleFaithfulnessDistribution?: () => ConsoleFaithfulnessDistribution | undefined;\n}\n\nexport interface ConsoleBufferState {\n /** Number of turns currently held in the default buffer slot. */\n turnsCount: number;\n /** Approximate byte size of buffered content (UTF-8). */\n byteCount: number;\n}\n\nexport interface ConsoleExtractionVerdict {\n /** ISO-8601 timestamp the verdict was recorded. */\n ts: string;\n /** Verdict kind — typically \"accept\" | \"reject\" | \"defer\". */\n kind: string;\n /** Optional short reason from the judge or fallback. */\n reason?: string;\n}\n\nexport interface ConsoleExtractionQueueState {\n /** Number of pending extraction tasks queued in the orchestrator. */\n depth: number;\n /** Most recent judge verdicts, newest last. Capped at 25 entries. */\n recentVerdicts: ConsoleExtractionVerdict[];\n}\n\nexport interface ConsoleDedupDecision {\n /** ISO-8601 timestamp the decision was recorded. */\n ts: string;\n /** Outcome of the dedup check — \"duplicate\" | \"novel\" | etc. */\n decision: string;\n /** Optional content fingerprint (first 16 chars of a hash). */\n fingerprint?: string;\n /** Optional similarity score that drove the decision. */\n similarity?: number;\n}\n\nexport interface ConsoleMaintenanceLedgerEvent {\n /** ISO-8601 timestamp from the ledger row. */\n ts: string;\n /** Event category (e.g. \"EXTRACTION_JUDGE_VERDICT\"). */\n category: string;\n /** Compact one-line summary. */\n summary: string;\n}\n\nexport interface ConsoleQmdProbeState {\n /** Whether QMD is reachable via CLI or daemon. */\n available: boolean;\n /** Whether the daemon transport is in use. */\n daemonMode: boolean;\n /** Raw debug-status string from `qmd.debugStatus()`. */\n debug: string;\n}\n\nexport interface ConsoleDaemonInfo {\n /** Process uptime in milliseconds. */\n uptimeMs: number;\n /** Package / daemon version (best-effort). */\n version: string;\n}\n\n/**\n * Faithfulness gate verdict distribution (issue #1576). Surfaced via\n * console_state so `remnic doctor` can render how the gate is performing.\n */\nexport interface ConsoleFaithfulnessDistribution {\n entailed: number;\n contradicted: number;\n unsupported: number;\n unchecked: number;\n skippedNoSpan: number;\n}\n\nexport interface ConsoleStateSnapshot {\n /** ISO-8601 capture timestamp. */\n capturedAt: string;\n bufferState: ConsoleBufferState;\n extractionQueue: ConsoleExtractionQueueState;\n dedupRecent: ConsoleDedupDecision[];\n maintenanceLedgerTail: ConsoleMaintenanceLedgerEvent[];\n qmdProbe: ConsoleQmdProbeState;\n daemon: ConsoleDaemonInfo;\n /** Faithfulness gate distribution (issue #1576). Absent when the gate is off. */\n faithfulness?: ConsoleFaithfulnessDistribution;\n /**\n * Subsystem read errors. One entry per failed reader keyed by\n * subsystem name (e.g. `\"bufferState: ...\"`). An empty array means\n * every section was read cleanly.\n */\n errors: string[];\n}\n\nconst MAX_LEDGER_TAIL = 50;\nconst MAX_VERDICT_TAIL = 25;\nconst MAX_DEDUP_TAIL = 10;\n\n/**\n * Gather a `ConsoleStateSnapshot` from the orchestrator. Each\n * subsystem read is independent; a thrown error in one reader is\n * captured in `errors` and the corresponding section is filled with\n * empty / placeholder values.\n */\nexport async function gatherConsoleState(\n orchestrator: ConsoleStateOrchestratorLike,\n): Promise<ConsoleStateSnapshot> {\n const errors: string[] = [];\n const capturedAt = new Date().toISOString();\n\n const bufferState = readBufferState(orchestrator, errors);\n const extractionQueue = readExtractionQueue(orchestrator, errors);\n const dedupRecent = readDedupRecent(orchestrator, errors);\n const maintenanceLedgerTail = await readMaintenanceLedgerTail(\n orchestrator,\n errors,\n );\n const qmdProbe = readQmdProbe(orchestrator, errors);\n const daemon = readDaemonInfo(orchestrator, errors);\n\n // Faithfulness gate distribution (issue #1576). Optional — absent when\n // the gate is off or the orchestrator does not expose the accessor.\n let faithfulness: ConsoleFaithfulnessDistribution | undefined;\n try {\n if (typeof orchestrator.getConsoleFaithfulnessDistribution === \"function\") {\n faithfulness = orchestrator.getConsoleFaithfulnessDistribution();\n }\n } catch (err) {\n errors.push(`faithfulness: ${describeError(err)}`);\n }\n\n return {\n capturedAt,\n bufferState,\n extractionQueue,\n dedupRecent,\n maintenanceLedgerTail,\n qmdProbe,\n daemon,\n ...(faithfulness ? { faithfulness } : {}),\n errors,\n };\n}\n\nfunction readBufferState(\n orchestrator: ConsoleStateOrchestratorLike,\n errors: string[],\n): ConsoleBufferState {\n try {\n const getTurns = orchestrator.buffer?.getTurns;\n if (typeof getTurns !== \"function\") {\n return { turnsCount: 0, byteCount: 0 };\n }\n const turns = getTurns.call(orchestrator.buffer) ?? [];\n let byteCount = 0;\n for (const turn of turns) {\n const content = typeof turn?.content === \"string\" ? turn.content : \"\";\n byteCount += Buffer.byteLength(content, \"utf8\");\n }\n return { turnsCount: turns.length, byteCount };\n } catch (err) {\n errors.push(`bufferState: ${describeError(err)}`);\n return { turnsCount: 0, byteCount: 0 };\n }\n}\n\nfunction readExtractionQueue(\n orchestrator: ConsoleStateOrchestratorLike,\n errors: string[],\n): ConsoleExtractionQueueState {\n try {\n const depth =\n typeof orchestrator.getConsoleExtractionQueueDepth === \"function\"\n ? orchestrator.getConsoleExtractionQueueDepth()\n : 0;\n const verdicts =\n typeof orchestrator.getConsoleExtractionRecentVerdicts === \"function\"\n ? orchestrator.getConsoleExtractionRecentVerdicts()\n : [];\n const recentVerdicts = (verdicts ?? [])\n .slice(-MAX_VERDICT_TAIL)\n .map((v) => ({\n ts: typeof v?.ts === \"string\" ? v.ts : \"\",\n kind: typeof v?.kind === \"string\" ? v.kind : \"unknown\",\n ...(typeof v?.reason === \"string\" ? { reason: v.reason } : {}),\n }));\n return { depth: Number.isFinite(depth) ? depth : 0, recentVerdicts };\n } catch (err) {\n errors.push(`extractionQueue: ${describeError(err)}`);\n return { depth: 0, recentVerdicts: [] };\n }\n}\n\nfunction readDedupRecent(\n orchestrator: ConsoleStateOrchestratorLike,\n errors: string[],\n): ConsoleDedupDecision[] {\n try {\n // Cursor Medium: call directly on `orchestrator` to preserve the\n // `this` binding. Extracting the method into a local and invoking\n // it bare loses `this`, so a non-arrow implementation that\n // references `this` would fail at runtime. Mirrors how\n // `readExtractionQueue` and `readMaintenanceLedgerTail` invoke\n // their orchestrator methods.\n if (typeof orchestrator.getConsoleDedupRecentDecisions !== \"function\") return [];\n const raw = orchestrator.getConsoleDedupRecentDecisions() ?? [];\n return raw.slice(-MAX_DEDUP_TAIL).map((d) => ({\n ts: typeof d?.ts === \"string\" ? d.ts : \"\",\n decision: typeof d?.decision === \"string\" ? d.decision : \"unknown\",\n ...(typeof d?.fingerprint === \"string\"\n ? { fingerprint: d.fingerprint }\n : {}),\n ...(typeof d?.similarity === \"number\" && Number.isFinite(d.similarity)\n ? { similarity: d.similarity }\n : {}),\n }));\n } catch (err) {\n errors.push(`dedupRecent: ${describeError(err)}`);\n return [];\n }\n}\n\n/**\n * Stream a JSONL file line-by-line, parse each row, project it into a\n * console event, and keep only the `topN` most-recent items by `ts`\n * (descending). Memory is bounded at O(2 * topN) regardless of file\n * size — we sort-and-truncate whenever the working buffer grows past\n * `2 * topN`. This satisfies BOTH:\n *\n * 1. \"Don't load the whole file into memory\" — streaming + bounded\n * buffer means a multi-GB ledger never blows up RAM.\n * 2. \"Don't miss recent rows just because the file isn't sorted by\n * recency\" — `rebuilt-observations.jsonl` is written sorted by\n * `(sessionKey, hour)`, NOT by global ts, so a byte-tail-only\n * read silently dropped recent-but-lexicographically-earlier\n * sessions. Streaming top-N visits every row and keeps the\n * globally-most-recent ones.\n *\n * Returns an array sorted oldest-first within the top-N window. Rows\n * with no parseable `ts` are dropped (they would otherwise compare\n * undefined under any sort).\n */\nasync function streamLedgerTopN<T extends { ts: string }>(\n ledgerPath: string,\n topN: number,\n project: (parsed: Record<string, unknown>) => T | null,\n): Promise<T[]> {\n let stream: ReturnType<typeof createReadStream>;\n try {\n // `fs.access`-style probe so we can quietly return `[]` for\n // ENOENT without hitting the readline error path.\n await fs.stat(ledgerPath);\n } catch (err) {\n const code = (err as NodeJS.ErrnoException).code;\n if (code === \"ENOENT\") return [];\n throw err;\n }\n try {\n stream = createReadStream(ledgerPath, { encoding: \"utf-8\" });\n } catch (err) {\n const code = (err as NodeJS.ErrnoException).code;\n if (code === \"ENOENT\") return [];\n throw err;\n }\n const rl = createInterface({ input: stream, crlfDelay: Infinity });\n const cap = Math.max(1, topN) * 2;\n const buf: T[] = [];\n const truncate = () => {\n // Sort descending by ts, keep top-N, drop the rest.\n buf.sort((a, b) => {\n const aMs = Date.parse(a.ts);\n const bMs = Date.parse(b.ts);\n if (Number.isFinite(aMs) && Number.isFinite(bMs)) return bMs - aMs;\n if (Number.isFinite(aMs)) return -1;\n if (Number.isFinite(bMs)) return 1;\n return 0;\n });\n if (buf.length > topN) buf.length = topN;\n };\n try {\n for await (const line of rl) {\n const trimmed = line.trim();\n if (!trimmed) continue;\n let parsed: unknown;\n try {\n parsed = JSON.parse(trimmed);\n } catch {\n continue;\n }\n if (typeof parsed !== \"object\" || parsed === null || Array.isArray(parsed)) {\n continue;\n }\n const event = project(parsed as Record<string, unknown>);\n if (event === null) continue;\n // Drop rows we couldn't even date-stamp — they can't be sorted\n // meaningfully against the rest of the corpus.\n if (!event.ts || !Number.isFinite(Date.parse(event.ts))) continue;\n buf.push(event);\n if (buf.length >= cap) truncate();\n }\n } finally {\n rl.close();\n stream.close();\n }\n truncate();\n return buf.reverse(); // oldest-first within the top-N window\n}\n\nfunction projectLedgerRow(p: Record<string, unknown>): ConsoleMaintenanceLedgerEvent | null {\n // The two canonical writers produce different row shapes:\n // - extraction-judge-telemetry: `{ts, verdictKind, reason, candidateCategory, ...}`\n // - rebuild-observations / migrate-observations:\n // `{sessionKey, hour, turnCount, userTurns, assistantTurns, rebuiltAt}`\n // Map both into the canonical {ts, category, summary} shape.\n const ts =\n typeof p.ts === \"string\" && p.ts.length > 0\n ? p.ts\n : typeof p.hour === \"string\" && p.hour.length > 0\n ? p.hour\n : typeof p.rebuiltAt === \"string\" && p.rebuiltAt.length > 0\n ? p.rebuiltAt\n : \"\";\n const category =\n typeof p.category === \"string\" && p.category.length > 0\n ? p.category\n : typeof p.verdictKind === \"string\"\n ? \"judge-verdict\"\n : typeof p.turnCount === \"number\"\n ? \"observation\"\n : \"unknown\";\n const summary = summarizeLedgerEvent(p);\n return { ts, category, summary };\n}\n\nasync function readMaintenanceLedgerTail(\n orchestrator: ConsoleStateOrchestratorLike,\n errors: string[],\n): Promise<ConsoleMaintenanceLedgerEvent[]> {\n try {\n const memoryDir = orchestrator.config?.memoryDir;\n if (!memoryDir || typeof memoryDir !== \"string\") return [];\n const ledgerDir = path.join(memoryDir, \"state\", \"observation-ledger\");\n // Codex review converged on two competing constraints:\n // 1. Don't load the whole file into memory (multi-GB ledgers\n // would OOM the console surface).\n // 2. Don't miss recent rows just because the file isn't sorted\n // by recency (`rebuilt-observations.jsonl` is sorted by\n // sessionKey/hour, so byte-tail reads silently drop recent\n // lexicographically-earlier sessions).\n // The right answer is a streaming bounded top-N: visit every row,\n // but keep only the MAX_LEDGER_TAIL most-recent in memory at any\n // time. Memory stays O(MAX_LEDGER_TAIL); recency ordering is\n // globally correct.\n const verdictsTopN = await streamLedgerTopN(\n path.join(ledgerDir, \"extraction-judge-verdicts.jsonl\"),\n MAX_LEDGER_TAIL,\n projectLedgerRow,\n );\n const rebuiltTopN = await streamLedgerTopN(\n path.join(ledgerDir, \"rebuilt-observations.jsonl\"),\n MAX_LEDGER_TAIL,\n projectLedgerRow,\n );\n // Merge the two source top-N windows and select the global\n // top-N. Both inputs already arrive oldest-first within their\n // respective windows; sort the merged set descending by ts and\n // take the most-recent MAX_LEDGER_TAIL.\n const events: ConsoleMaintenanceLedgerEvent[] = [...verdictsTopN, ...rebuiltTopN];\n if (events.length === 0) return [];\n events.sort((a, b) => {\n const aMs = Date.parse(a.ts);\n const bMs = Date.parse(b.ts);\n if (Number.isFinite(aMs) && Number.isFinite(bMs)) return bMs - aMs;\n if (Number.isFinite(aMs)) return -1;\n if (Number.isFinite(bMs)) return 1;\n return 0;\n });\n const tail = events.slice(0, MAX_LEDGER_TAIL);\n // Reverse so the caller sees oldest-first within the tail window.\n return tail.reverse();\n } catch (err) {\n errors.push(`maintenanceLedgerTail: ${describeError(err)}`);\n return [];\n }\n}\n\nfunction summarizeLedgerEvent(p: Record<string, unknown>): string {\n const parts: string[] = [];\n // Judge-verdict rows.\n if (typeof p.verdictKind === \"string\") parts.push(`verdict=${p.verdictKind}`);\n if (typeof p.reason === \"string\" && p.reason.length > 0) {\n const trimmed = p.reason.length > 80 ? `${p.reason.slice(0, 80)}…` : p.reason;\n parts.push(`reason=${trimmed}`);\n }\n if (typeof p.candidateCategory === \"string\") {\n parts.push(`cat=${p.candidateCategory}`);\n }\n // Canonical rebuilt-observations rows (codex P2).\n if (typeof p.sessionKey === \"string\" && p.sessionKey.length > 0) {\n parts.push(`session=${p.sessionKey}`);\n }\n if (typeof p.turnCount === \"number\" && Number.isFinite(p.turnCount)) {\n parts.push(`turns=${p.turnCount}`);\n }\n if (typeof p.userTurns === \"number\" && Number.isFinite(p.userTurns)) {\n parts.push(`u=${p.userTurns}`);\n }\n if (typeof p.assistantTurns === \"number\" && Number.isFinite(p.assistantTurns)) {\n parts.push(`a=${p.assistantTurns}`);\n }\n if (parts.length === 0) {\n return typeof p.category === \"string\" ? p.category : \"event\";\n }\n return parts.join(\" \");\n}\n\nfunction readQmdProbe(\n orchestrator: ConsoleStateOrchestratorLike,\n errors: string[],\n): ConsoleQmdProbeState {\n try {\n const qmd = orchestrator.qmd;\n if (!qmd) {\n return { available: false, daemonMode: false, debug: \"qmd unavailable\" };\n }\n const available =\n typeof qmd.isAvailable === \"function\" ? qmd.isAvailable() : false;\n const daemonMode =\n typeof qmd.isDaemonMode === \"function\" ? qmd.isDaemonMode() : false;\n const debug =\n typeof qmd.debugStatus === \"function\" ? qmd.debugStatus() : \"\";\n return { available, daemonMode, debug };\n } catch (err) {\n errors.push(`qmdProbe: ${describeError(err)}`);\n return { available: false, daemonMode: false, debug: \"\" };\n }\n}\n\nfunction readDaemonInfo(\n orchestrator: ConsoleStateOrchestratorLike,\n errors: string[],\n): ConsoleDaemonInfo {\n try {\n if (typeof orchestrator.getConsoleDaemonInfo === \"function\") {\n const info = orchestrator.getConsoleDaemonInfo();\n return {\n uptimeMs: Number.isFinite(info?.uptimeMs) ? info.uptimeMs : 0,\n version: typeof info?.version === \"string\" ? info.version : \"unknown\",\n };\n }\n // Fallback: process uptime + best-effort package version. This is\n // only meaningful when the orchestrator runs in the same process\n // as the CLI (which is the case for `remnic console --state-only`).\n const uptimeMs = Math.round((process.uptime?.() ?? 0) * 1000);\n return { uptimeMs, version: resolvePackageVersion() };\n } catch (err) {\n errors.push(`daemon: ${describeError(err)}`);\n return { uptimeMs: 0, version: \"unknown\" };\n }\n}\n\nfunction resolvePackageVersion(): string {\n // Best-effort, sync, never throws. We avoid importing package.json\n // statically because tsup bundles into a single file at runtime.\n try {\n const env = process.env?.REMNIC_VERSION;\n if (typeof env === \"string\" && env.length > 0) return env;\n } catch {\n // ignore\n }\n return \"unknown\";\n}\n\nfunction describeError(err: unknown): string {\n if (err instanceof Error) return err.message;\n try {\n return String(err);\n } catch {\n return \"unknown error\";\n }\n}\n"],"mappings":";AAuBA,SAAS,YAAY,IAAI,wBAAwB;AACjD,SAAS,uBAAuB;AAChC,OAAO,UAAU;AAsIjB,IAAM,kBAAkB;AACxB,IAAM,mBAAmB;AACzB,IAAM,iBAAiB;AAQvB,eAAsB,mBACpB,cAC+B;AAC/B,QAAM,SAAmB,CAAC;AAC1B,QAAM,cAAa,oBAAI,KAAK,GAAE,YAAY;AAE1C,QAAM,cAAc,gBAAgB,cAAc,MAAM;AACxD,QAAM,kBAAkB,oBAAoB,cAAc,MAAM;AAChE,QAAM,cAAc,gBAAgB,cAAc,MAAM;AACxD,QAAM,wBAAwB,MAAM;AAAA,IAClC;AAAA,IACA;AAAA,EACF;AACA,QAAM,WAAW,aAAa,cAAc,MAAM;AAClD,QAAM,SAAS,eAAe,cAAc,MAAM;AAIlD,MAAI;AACJ,MAAI;AACF,QAAI,OAAO,aAAa,uCAAuC,YAAY;AACzE,qBAAe,aAAa,mCAAmC;AAAA,IACjE;AAAA,EACF,SAAS,KAAK;A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6HWBYL.js";
|
|
4
|
+
import {
|
|
5
|
+
defineOperation
|
|
6
|
+
} from "./chunk-NFMDHE45.js";
|
|
7
|
+
import {
|
|
8
|
+
DECISION_SUBCOMMANDS,
|
|
9
|
+
DELTA_SUBCOMMANDS,
|
|
10
|
+
isCodegraphToolName
|
|
11
|
+
} from "./chunk-N4PD5IY3.js";
|
|
12
|
+
|
|
13
|
+
// src/access-operations.ts
|
|
14
|
+
import { z } from "zod";
|
|
15
|
+
var memoryGetSchema = z.object({
|
|
16
|
+
memoryId: z.string().trim().min(1, "memoryId is required").max(512),
|
|
17
|
+
namespace: z.string().trim().max(256).nullable().optional()
|
|
18
|
+
});
|
|
19
|
+
var memoryGetOperation = defineOperation({
|
|
20
|
+
name: "memory_get",
|
|
21
|
+
description: "Fetch one memory by id.",
|
|
22
|
+
schema: memoryGetSchema,
|
|
23
|
+
handler: async (input, ctx) => {
|
|
24
|
+
const result = await ctx.service.memoryGet(
|
|
25
|
+
input.memoryId,
|
|
26
|
+
input.namespace ?? void 0,
|
|
27
|
+
ctx.authenticatedPrincipal
|
|
28
|
+
);
|
|
29
|
+
return { result };
|
|
30
|
+
}
|
|
31
|
+
});
|
|
32
|
+
var memorySearchSchema = z.object({
|
|
33
|
+
query: z.string().trim().min(1, "query is required").max(2048),
|
|
34
|
+
namespace: z.string().trim().max(256).nullable().optional(),
|
|
35
|
+
// No upper cap: the pre-boundary MCP handler forwarded any finite number to
|
|
36
|
+
// memorySearch, and the QMD/search backends honor large limits. Capping at
|
|
37
|
+
// 100 would reject existing clients that request larger result sets.
|
|
38
|
+
maxResults: z.number().int().min(1).nullable().optional(),
|
|
39
|
+
collection: z.string().trim().min(1).max(256).nullable().optional()
|
|
40
|
+
});
|
|
41
|
+
var memorySearchOperation = defineOperation({
|
|
42
|
+
name: "memory_search",
|
|
43
|
+
description: "Search memories across readable namespaces.",
|
|
44
|
+
schema: memorySearchSchema,
|
|
45
|
+
handler: async (input, ctx) => {
|
|
46
|
+
const result = await ctx.service.memorySearch({
|
|
47
|
+
query: input.query,
|
|
48
|
+
namespace: input.namespace ?? void 0,
|
|
49
|
+
maxResults: input.maxResults ?? void 0,
|
|
50
|
+
collection: input.collection ?? void 0,
|
|
51
|
+
principal: ctx.authenticatedPrincipal
|
|
52
|
+
});
|
|
53
|
+
return { result };
|
|
54
|
+
}
|
|
55
|
+
});
|
|
56
|
+
var memoryStoreOperation = defineOperation({
|
|
57
|
+
name: "memory_store",
|
|
58
|
+
description: "Store an explicit memory through the access layer.",
|
|
59
|
+
// Reuse the existing schema verbatim — the migration is behavior-preserving;
|
|
60
|
+
// the schema's external contract is NOT changing in this PR (per the issue's
|
|
61
|
+
// pitfall note).
|
|
62
|
+
schema: memoryStoreRequestSchema,
|
|
63
|
+
handler: async (input, ctx) => {
|
|
64
|
+
const result = await ctx.service.memoryStore(
|
|
65
|
+
{
|
|
66
|
+
...input,
|
|
67
|
+
authenticatedPrincipal: ctx.authenticatedPrincipal
|
|
68
|
+
},
|
|
69
|
+
// Forward transport-level hooks (e.g. HTTP's atomic write-quota gate)
|
|
70
|
+
// so the hook still fires inside the service's idempotent-write lock —
|
|
71
|
+
// never before, never on a replay (#1434 invariant preserved by the
|
|
72
|
+
// boundary migration).
|
|
73
|
+
ctx.hooks
|
|
74
|
+
);
|
|
75
|
+
return { result };
|
|
76
|
+
}
|
|
77
|
+
});
|
|
78
|
+
var codingDecisionSchema = z.preprocess(
|
|
79
|
+
(data) => {
|
|
80
|
+
if (data && typeof data === "object" && !Array.isArray(data)) {
|
|
81
|
+
const out = {};
|
|
82
|
+
for (const [k, v] of Object.entries(data)) {
|
|
83
|
+
if (v !== null) out[k] = v;
|
|
84
|
+
}
|
|
85
|
+
return out;
|
|
86
|
+
}
|
|
87
|
+
return data;
|
|
88
|
+
},
|
|
89
|
+
z.object({
|
|
90
|
+
subcommand: z.enum(DECISION_SUBCOMMANDS),
|
|
91
|
+
sessionKey: z.string().trim().max(512).optional(),
|
|
92
|
+
namespace: z.string().trim().max(256).optional(),
|
|
93
|
+
id: z.string().trim().max(512).optional(),
|
|
94
|
+
title: z.string().trim().max(512).optional(),
|
|
95
|
+
status: z.string().trim().max(64).optional(),
|
|
96
|
+
context: z.string().trim().max(8192).optional(),
|
|
97
|
+
decision: z.string().trim().max(8192).optional(),
|
|
98
|
+
consequences: z.string().trim().max(8192).optional(),
|
|
99
|
+
entityRefs: z.array(z.string().trim().min(1).max(256)).optional(),
|
|
100
|
+
supersedesId: z.string().trim().max(512).optional()
|
|
101
|
+
})
|
|
102
|
+
);
|
|
103
|
+
var codingDecisionOperation = defineOperation({
|
|
104
|
+
name: "coding_decision",
|
|
105
|
+
description: "List, get, record, or supersede decision records in the session's coding namespace (issue #1548 Track A).",
|
|
106
|
+
schema: codingDecisionSchema,
|
|
107
|
+
handler: async (input, ctx) => {
|
|
108
|
+
const result = await ctx.service.codingDecision(input, ctx.authenticatedPrincipal);
|
|
109
|
+
return { result };
|
|
110
|
+
}
|
|
111
|
+
});
|
|
112
|
+
var codingArchitectureSchema = z.preprocess(
|
|
113
|
+
(data) => {
|
|
114
|
+
if (data !== null && typeof data === "object" && !Array.isArray(data)) {
|
|
115
|
+
const obj = data;
|
|
116
|
+
const cleaned = {};
|
|
117
|
+
for (const [key, value] of Object.entries(obj)) {
|
|
118
|
+
if (value !== null) cleaned[key] = value;
|
|
119
|
+
}
|
|
120
|
+
return cleaned;
|
|
121
|
+
}
|
|
122
|
+
return data;
|
|
123
|
+
},
|
|
124
|
+
z.object({
|
|
125
|
+
subcommand: z.enum(["get", "refresh"]),
|
|
126
|
+
sessionKey: z.string().optional(),
|
|
127
|
+
namespace: z.string().optional()
|
|
128
|
+
})
|
|
129
|
+
);
|
|
130
|
+
var codingArchitectureOperation = defineOperation({
|
|
131
|
+
name: "coding_architecture",
|
|
132
|
+
description: "Get or refresh the architecture card for the session's coding namespace (issue #1548 Track A PR 3).",
|
|
133
|
+
schema: codingArchitectureSchema,
|
|
134
|
+
handler: async (input, ctx) => {
|
|
135
|
+
const result = await ctx.service.codingArchitecture(input, ctx.authenticatedPrincipal);
|
|
136
|
+
return { result };
|
|
137
|
+
}
|
|
138
|
+
});
|
|
139
|
+
var codegraphSurfaceSchema = z.preprocess(
|
|
140
|
+
(data) => {
|
|
141
|
+
if (data !== null && typeof data === "object" && !Array.isArray(data)) {
|
|
142
|
+
const obj = data;
|
|
143
|
+
const cleaned = {};
|
|
144
|
+
for (const [key, value] of Object.entries(obj)) {
|
|
145
|
+
if (value !== null) cleaned[key] = value;
|
|
146
|
+
}
|
|
147
|
+
return cleaned;
|
|
148
|
+
}
|
|
149
|
+
return data;
|
|
150
|
+
},
|
|
151
|
+
z.object({
|
|
152
|
+
tool: z.string().refine(isCodegraphToolName, {
|
|
153
|
+
message: "tool must be one of the codegraph tool names"
|
|
154
|
+
}),
|
|
155
|
+
sessionKey: z.string().max(512).optional(),
|
|
156
|
+
principal: z.string().max(256).optional(),
|
|
157
|
+
project: z.string().max(256).optional(),
|
|
158
|
+
query: z.string().max(2048).optional(),
|
|
159
|
+
limit: z.number().int().positive().max(200).optional(),
|
|
160
|
+
start: z.string().max(512).optional(),
|
|
161
|
+
direction: z.string().max(64).optional(),
|
|
162
|
+
depth: z.number().int().positive().max(10).optional(),
|
|
163
|
+
qualifiedName: z.string().max(1024).optional(),
|
|
164
|
+
path: z.string().max(2048).optional(),
|
|
165
|
+
structuredQuery: z.record(z.string(), z.unknown()).optional(),
|
|
166
|
+
head: z.string().max(256).optional(),
|
|
167
|
+
repoRoot: z.string().max(2048).optional(),
|
|
168
|
+
mode: z.string().max(64).optional(),
|
|
169
|
+
confirm: z.boolean().optional(),
|
|
170
|
+
subcommand: z.string().max(64).optional(),
|
|
171
|
+
id: z.string().max(512).optional(),
|
|
172
|
+
title: z.string().max(512).optional(),
|
|
173
|
+
status: z.string().max(64).optional(),
|
|
174
|
+
context: z.string().max(8192).optional(),
|
|
175
|
+
decision: z.string().max(8192).optional(),
|
|
176
|
+
consequences: z.string().max(8192).optional(),
|
|
177
|
+
entityRefs: z.array(z.string().max(256)).optional(),
|
|
178
|
+
supersedesId: z.string().max(512).optional(),
|
|
179
|
+
traces: z.array(z.unknown()).optional()
|
|
180
|
+
})
|
|
181
|
+
);
|
|
182
|
+
var codingDeltaSchema = z.preprocess(
|
|
183
|
+
(data) => {
|
|
184
|
+
if (data !== null && typeof data === "object" && !Array.isArray(data)) {
|
|
185
|
+
const obj = data;
|
|
186
|
+
const cleaned = {};
|
|
187
|
+
for (const [key, value] of Object.entries(obj)) {
|
|
188
|
+
if (value !== null) cleaned[key] = value;
|
|
189
|
+
}
|
|
190
|
+
return cleaned;
|
|
191
|
+
}
|
|
192
|
+
return data;
|
|
193
|
+
},
|
|
194
|
+
z.object({
|
|
195
|
+
subcommand: z.enum(DELTA_SUBCOMMANDS),
|
|
196
|
+
sessionKey: z.string().trim().max(512).optional(),
|
|
197
|
+
namespace: z.string().trim().max(256).optional()
|
|
198
|
+
})
|
|
199
|
+
);
|
|
200
|
+
var codingDeltaOperation = defineOperation({
|
|
201
|
+
name: "coding_delta",
|
|
202
|
+
description: "Get the session delta (commits + touched files since last seen) for the session's coding namespace (issue #1548 Track A PR 4).",
|
|
203
|
+
schema: codingDeltaSchema,
|
|
204
|
+
handler: async (input, ctx) => {
|
|
205
|
+
const result = await ctx.service.codingDelta(input, ctx.authenticatedPrincipal);
|
|
206
|
+
return { result };
|
|
207
|
+
}
|
|
208
|
+
});
|
|
209
|
+
var codegraphIndexOperation = defineOperation({
|
|
210
|
+
name: "codegraph_index",
|
|
211
|
+
description: "Codegraph parity tool (issue #1554): index. Delegates to the shared codegraph surface handler.",
|
|
212
|
+
schema: codegraphSurfaceSchema,
|
|
213
|
+
handler: async (input, ctx) => {
|
|
214
|
+
const result = await ctx.service.codegraphTool(input, ctx.authenticatedPrincipal);
|
|
215
|
+
return { result };
|
|
216
|
+
}
|
|
217
|
+
});
|
|
218
|
+
var codegraphListProjectsOperation = defineOperation({
|
|
219
|
+
name: "codegraph_list_projects",
|
|
220
|
+
description: "Codegraph parity tool (issue #1554): list_projects. Delegates to the shared codegraph surface handler.",
|
|
221
|
+
schema: codegraphSurfaceSchema,
|
|
222
|
+
handler: async (input, ctx) => {
|
|
223
|
+
const result = await ctx.service.codegraphTool(input, ctx.authenticatedPrincipal);
|
|
224
|
+
return { result };
|
|
225
|
+
}
|
|
226
|
+
});
|
|
227
|
+
var codegraphDeleteProjectOperation = defineOperation({
|
|
228
|
+
name: "codegraph_delete_project",
|
|
229
|
+
description: "Codegraph parity tool (issue #1554): delete_project. Delegates to the shared codegraph surface handler.",
|
|
230
|
+
schema: codegraphSurfaceSchema,
|
|
231
|
+
handler: async (input, ctx) => {
|
|
232
|
+
const result = await ctx.service.codegraphTool(input, ctx.authenticatedPrincipal);
|
|
233
|
+
return { result };
|
|
234
|
+
}
|
|
235
|
+
});
|
|
236
|
+
var codegraphIndexStatusOperation = defineOperation({
|
|
237
|
+
name: "codegraph_index_status",
|
|
238
|
+
description: "Codegraph parity tool (issue #1554): index_status. Delegates to the shared codegraph surface handler.",
|
|
239
|
+
schema: codegraphSurfaceSchema,
|
|
240
|
+
handler: async (input, ctx) => {
|
|
241
|
+
const result = await ctx.service.codegraphTool(input, ctx.authenticatedPrincipal);
|
|
242
|
+
return { result };
|
|
243
|
+
}
|
|
244
|
+
});
|
|
245
|
+
var codegraphSearchGraphOperation = defineOperation({
|
|
246
|
+
name: "codegraph_search_graph",
|
|
247
|
+
description: "Codegraph parity tool (issue #1554): search_graph. Delegates to the shared codegraph surface handler.",
|
|
248
|
+
schema: codegraphSurfaceSchema,
|
|
249
|
+
handler: async (input, ctx) => {
|
|
250
|
+
const result = await ctx.service.codegraphTool(input, ctx.authenticatedPrincipal);
|
|
251
|
+
return { result };
|
|
252
|
+
}
|
|
253
|
+
});
|
|
254
|
+
var codegraphTracePathOperation = defineOperation({
|
|
255
|
+
name: "codegraph_trace_path",
|
|
256
|
+
description: "Codegraph parity tool (issue #1554): trace_path. Delegates to the shared codegraph surface handler.",
|
|
257
|
+
schema: codegraphSurfaceSchema,
|
|
258
|
+
handler: async (input, ctx) => {
|
|
259
|
+
const result = await ctx.service.codegraphTool(input, ctx.authenticatedPrincipal);
|
|
260
|
+
return { result };
|
|
261
|
+
}
|
|
262
|
+
});
|
|
263
|
+
var codegraphDetectChangesOperation = defineOperation({
|
|
264
|
+
name: "codegraph_detect_changes",
|
|
265
|
+
description: "Codegraph parity tool (issue #1554): detect_changes. Delegates to the shared codegraph surface handler.",
|
|
266
|
+
schema: codegraphSurfaceSchema,
|
|
267
|
+
handler: async (input, ctx) => {
|
|
268
|
+
const result = await ctx.service.codegraphTool(input, ctx.authenticatedPrincipal);
|
|
269
|
+
return { result };
|
|
270
|
+
}
|
|
271
|
+
});
|
|
272
|
+
var codegraphQueryGraphOperation = defineOperation({
|
|
273
|
+
name: "codegraph_query_graph",
|
|
274
|
+
description: "Codegraph parity tool (issue #1554): query_graph. Delegates to the shared codegraph surface handler.",
|
|
275
|
+
schema: codegraphSurfaceSchema,
|
|
276
|
+
handler: async (input, ctx) => {
|
|
277
|
+
const result = await ctx.service.codegraphTool(input, ctx.authenticatedPrincipal);
|
|
278
|
+
return { result };
|
|
279
|
+
}
|
|
280
|
+
});
|
|
281
|
+
var codegraphGetSchemaOperation = defineOperation({
|
|
282
|
+
name: "codegraph_get_schema",
|
|
283
|
+
description: "Codegraph parity tool (issue #1554): get_schema. Delegates to the shared codegraph surface handler.",
|
|
284
|
+
schema: codegraphSurfaceSchema,
|
|
285
|
+
handler: async (input, ctx) => {
|
|
286
|
+
const result = await ctx.service.codegraphTool(input, ctx.authenticatedPrincipal);
|
|
287
|
+
return { result };
|
|
288
|
+
}
|
|
289
|
+
});
|
|
290
|
+
var codegraphGetSnippetOperation = defineOperation({
|
|
291
|
+
name: "codegraph_get_snippet",
|
|
292
|
+
description: "Codegraph parity tool (issue #1554): get_snippet. Delegates to the shared codegraph surface handler.",
|
|
293
|
+
schema: codegraphSurfaceSchema,
|
|
294
|
+
handler: async (input, ctx) => {
|
|
295
|
+
const result = await ctx.service.codegraphTool(input, ctx.authenticatedPrincipal);
|
|
296
|
+
return { result };
|
|
297
|
+
}
|
|
298
|
+
});
|
|
299
|
+
var codegraphGetArchitectureOperation = defineOperation({
|
|
300
|
+
name: "codegraph_get_architecture",
|
|
301
|
+
description: "Codegraph parity tool (issue #1554): get_architecture. Delegates to the shared codegraph surface handler.",
|
|
302
|
+
schema: codegraphSurfaceSchema,
|
|
303
|
+
handler: async (input, ctx) => {
|
|
304
|
+
const result = await ctx.service.codegraphTool(input, ctx.authenticatedPrincipal);
|
|
305
|
+
return { result };
|
|
306
|
+
}
|
|
307
|
+
});
|
|
308
|
+
var codegraphSearchCodeOperation = defineOperation({
|
|
309
|
+
name: "codegraph_search_code",
|
|
310
|
+
description: "Codegraph parity tool (issue #1554): search_code. Delegates to the shared codegraph surface handler.",
|
|
311
|
+
schema: codegraphSurfaceSchema,
|
|
312
|
+
handler: async (input, ctx) => {
|
|
313
|
+
const result = await ctx.service.codegraphTool(input, ctx.authenticatedPrincipal);
|
|
314
|
+
return { result };
|
|
315
|
+
}
|
|
316
|
+
});
|
|
317
|
+
var codegraphManageAdrOperation = defineOperation({
|
|
318
|
+
name: "codegraph_manage_adr",
|
|
319
|
+
description: "Codegraph parity tool (issue #1554): manage_adr. Delegates to the shared codegraph surface handler.",
|
|
320
|
+
schema: codegraphSurfaceSchema,
|
|
321
|
+
handler: async (input, ctx) => {
|
|
322
|
+
const result = await ctx.service.codegraphTool(input, ctx.authenticatedPrincipal);
|
|
323
|
+
return { result };
|
|
324
|
+
}
|
|
325
|
+
});
|
|
326
|
+
var codegraphIngestTracesOperation = defineOperation({
|
|
327
|
+
name: "codegraph_ingest_traces",
|
|
328
|
+
description: "Codegraph parity tool (issue #1554): ingest_traces. Delegates to the shared codegraph surface handler.",
|
|
329
|
+
schema: codegraphSurfaceSchema,
|
|
330
|
+
handler: async (input, ctx) => {
|
|
331
|
+
const result = await ctx.service.codegraphTool(input, ctx.authenticatedPrincipal);
|
|
332
|
+
return { result };
|
|
333
|
+
}
|
|
334
|
+
});
|
|
335
|
+
var REGISTERED_OPERATIONS = [
|
|
336
|
+
memoryGetOperation.spec.name,
|
|
337
|
+
memorySearchOperation.spec.name,
|
|
338
|
+
memoryStoreOperation.spec.name,
|
|
339
|
+
codingDecisionOperation.spec.name,
|
|
340
|
+
codingArchitectureOperation.spec.name,
|
|
341
|
+
codegraphIndexOperation.spec.name,
|
|
342
|
+
codegraphListProjectsOperation.spec.name,
|
|
343
|
+
codegraphDeleteProjectOperation.spec.name,
|
|
344
|
+
codegraphIndexStatusOperation.spec.name,
|
|
345
|
+
codegraphSearchGraphOperation.spec.name,
|
|
346
|
+
codegraphTracePathOperation.spec.name,
|
|
347
|
+
codegraphDetectChangesOperation.spec.name,
|
|
348
|
+
codegraphQueryGraphOperation.spec.name,
|
|
349
|
+
codegraphGetSchemaOperation.spec.name,
|
|
350
|
+
codegraphGetSnippetOperation.spec.name,
|
|
351
|
+
codegraphGetArchitectureOperation.spec.name,
|
|
352
|
+
codegraphSearchCodeOperation.spec.name,
|
|
353
|
+
codegraphManageAdrOperation.spec.name,
|
|
354
|
+
codegraphIngestTracesOperation.spec.name,
|
|
355
|
+
codingDeltaOperation.spec.name
|
|
356
|
+
];
|
|
357
|
+
|
|
358
|
+
export {
|
|
359
|
+
memoryGetOperation,
|
|
360
|
+
memorySearchOperation,
|
|
361
|
+
memoryStoreOperation,
|
|
362
|
+
codingDecisionOperation,
|
|
363
|
+
codingArchitectureOperation,
|
|
364
|
+
codingDeltaOperation,
|
|
365
|
+
codegraphIndexOperation,
|
|
366
|
+
codegraphListProjectsOperation,
|
|
367
|
+
codegraphDeleteProjectOperation,
|
|
368
|
+
codegraphIndexStatusOperation,
|
|
369
|
+
codegraphSearchGraphOperation,
|
|
370
|
+
codegraphTracePathOperation,
|
|
371
|
+
codegraphDetectChangesOperation,
|
|
372
|
+
codegraphQueryGraphOperation,
|
|
373
|
+
codegraphGetSchemaOperation,
|
|
374
|
+
codegraphGetSnippetOperation,
|
|
375
|
+
codegraphGetArchitectureOperation,
|
|
376
|
+
codegraphSearchCodeOperation,
|
|
377
|
+
codegraphManageAdrOperation,
|
|
378
|
+
codegraphIngestTracesOperation,
|
|
379
|
+
REGISTERED_OPERATIONS
|
|
380
|
+
};
|
|
381
|
+
//# sourceMappingURL=chunk-HKET3ZOI.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../src/access-operations.ts"],"sourcesContent":["/**\n * Pilot operation definitions for the access boundary (issue #1525).\n *\n * Three operations migrate through the registry in this PR — `memory_get`,\n * `memory_search`, and the `memory_store` write op — so the boundary's\n * normalization matrix (rules 17/28/36/48/51) and shared error mapping reach\n * MCP, HTTP, and CLI from one place. Domain-group migrations (memory ops →\n * connectors → namespaces …) land as follow-up PRs that add `defineOperation`\n * calls here and delete the surface-local validation they replace.\n *\n * Importing this module for its side effects registers the pilot operations;\n * surfaces then dispatch via {@link getOperation} from `./access-boundary.js`.\n */\n\nimport { z } from \"zod\";\n\nimport { defineOperation } from \"./access-boundary.js\";\nimport { memoryStoreRequestSchema, type MemoryStoreRequest } from \"./access-schema.js\";\nimport type {\n EngramAccessMemoryResponse,\n EngramAccessWriteResponse,\n} from \"./access-service.js\";\nimport {\n DECISION_SUBCOMMANDS,\n type DecisionSurfaceRequest,\n type DecisionSurfaceResponse,\n} from \"./coding/decision-surfaces.js\";\nimport {\n type ArchitectureSurfaceRequest,\n type ArchitectureSurfaceResponse,\n} from \"./coding/architecture-surfaces.js\";\nimport {\n type CodegraphSurfaceRequest,\n type CodegraphSurfaceResponse,\n isCodegraphToolName,\n} from \"./coding/codegraph-surfaces.js\";\nimport {\n DELTA_SUBCOMMANDS,\n type DeltaSurfaceRequest,\n type DeltaSurfaceResponse,\n} from \"./coding/session-delta-surfaces.js\";\n\n// ---------------------------------------------------------------------------\n// memory_get — fetch one memory by id\n// ---------------------------------------------------------------------------\n\n/**\n * `memoryId` is required and non-empty (rule 51: the MCP dispatcher previously\n * fell back to `typeof args.memoryId === \"string\" ? args.memoryId : \"\"`,\n * silently passing an empty id into the service). `namespace` is\n * `.nullable().optional()` because MCP clients send `null` (gotcha #2).\n * `namespace` has no `.min(1)` because the pre-boundary handlers forwarded\n * empty/whitespace strings, and `resolveNamespace` treats empty identically\n * to absent (both trim to falsy → default namespace). Rejecting empty would\n * break HTTP callers that send a bare `?namespace=` (Cursor review).\n */\nconst memoryGetSchema = z.object({\n memoryId: z.string().trim().min(1, \"memoryId is required\").max(512),\n namespace: z.string().trim().max(256).nullable().optional(),\n});\n\nexport interface MemoryGetInput {\n readonly memoryId: string;\n readonly namespace?: string | null;\n}\n\nexport interface MemoryGetOutput {\n readonly result: EngramAccessMemoryResponse;\n}\n\nexport const memoryGetOperation = defineOperation<MemoryGetInput, MemoryGetOutput>({\n name: \"memory_get\",\n description: \"Fetch one memory by id.\",\n schema: memoryGetSchema,\n handler: async (input, ctx) => {\n const result = await ctx.service.memoryGet(\n input.memoryId,\n input.namespace ?? undefined,\n ctx.authenticatedPrincipal,\n );\n return { result };\n },\n});\n\n// ---------------------------------------------------------------------------\n// memory_search — semantic search across memories\n// ---------------------------------------------------------------------------\n\nconst memorySearchSchema = z.object({\n query: z.string().trim().min(1, \"query is required\").max(2048),\n namespace: z.string().trim().max(256).nullable().optional(),\n // No upper cap: the pre-boundary MCP handler forwarded any finite number to\n // memorySearch, and the QMD/search backends honor large limits. Capping at\n // 100 would reject existing clients that request larger result sets.\n maxResults: z.number().int().min(1).nullable().optional(),\n collection: z.string().trim().min(1).max(256).nullable().optional(),\n});\n\nexport interface MemorySearchInput {\n readonly query: string;\n readonly namespace?: string | null;\n readonly maxResults?: number | null;\n readonly collection?: string | null;\n}\n\nexport interface MemorySearchOutput {\n readonly result: {\n readonly query: string;\n readonly results: ReadonlyArray<{ path: string; score: number; snippet: string }>;\n readonly count: number;\n };\n}\n\nexport const memorySearchOperation = defineOperation<MemorySearchInput, MemorySearchOutput>({\n name: \"memory_search\",\n description: \"Search memories across readable namespaces.\",\n schema: memorySearchSchema,\n handler: async (input, ctx) => {\n const result = await ctx.service.memorySearch({\n query: input.query,\n namespace: input.namespace ?? undefined,\n maxResults: input.maxResults ?? undefined,\n collection: input.collection ?? undefined,\n principal: ctx.authenticatedPrincipal,\n });\n return { result };\n },\n});\n\n// ---------------------------------------------------------------------------\n// memory_store — the pilot WRITE op\n// ---------------------------------------------------------------------------\n\nexport type MemoryStoreInput = MemoryStoreRequest;\n\nexport interface MemoryStoreOutput {\n readonly result: EngramAccessWriteResponse;\n}\n\nexport const memoryStoreOperation = defineOperation<MemoryStoreInput, MemoryStoreOutput>({\n name: \"memory_store\",\n description: \"Store an explicit memory through the access layer.\",\n // Reuse the existing schema verbatim — the migration is behavior-preserving;\n // the schema's external contract is NOT changing in this PR (per the issue's\n // pitfall note).\n schema: memoryStoreRequestSchema,\n handler: async (input, ctx) => {\n const result = await ctx.service.memoryStore(\n {\n ...input,\n authenticatedPrincipal: ctx.authenticatedPrincipal,\n },\n // Forward transport-level hooks (e.g. HTTP's atomic write-quota gate)\n // so the hook still fires inside the service's idempotent-write lock —\n // never before, never on a replay (#1434 invariant preserved by the\n // boundary migration).\n\n ctx.hooks,\n );\n return { result };\n },\n});\n\n// ---------------------------------------------------------------------------\n// coding_decision — decision-record surfaces (issue #1548 Track A PR 2)\n// ---------------------------------------------------------------------------\n\n/**\n * The subcommand field is required and MUST be one of the four valid values\n * (rule 51 — reject loudly, list the options, never silently default). The\n * remaining fields are optional because each subcommand uses a different\n * subset; the handler validates subcommand-specific requirements after\n * routing.\n */\n/**\n * MCP clients send `null` for absent optional fields. Zod `.optional()`\n * rejects `null`, so strip nulls at the object level before the inner\n * schema validates (review: cursor null-field thread).\n */\nconst codingDecisionSchema = z.preprocess(\n (data) => {\n if (data && typeof data === \"object\" && !Array.isArray(data)) {\n const out: Record<string, unknown> = {};\n for (const [k, v] of Object.entries(data as Record<string, unknown>)) {\n if (v !== null) out[k] = v;\n }\n return out;\n }\n return data;\n },\n z.object({\n subcommand: z.enum(DECISION_SUBCOMMANDS),\n sessionKey: z.string().trim().max(512).optional(),\n namespace: z.string().trim().max(256).optional(),\n id: z.string().trim().max(512).optional(),\n title: z.string().trim().max(512).optional(),\n status: z.string().trim().max(64).optional(),\n context: z.string().trim().max(8192).optional(),\n decision: z.string().trim().max(8192).optional(),\n consequences: z.string().trim().max(8192).optional(),\n entityRefs: z.array(z.string().trim().min(1).max(256)).optional(),\n supersedesId: z.string().trim().max(512).optional(),\n }),\n);\n\nexport type CodingDecisionInput = DecisionSurfaceRequest;\nexport type CodingDecisionOutput = { result: DecisionSurfaceResponse };\n\nexport const codingDecisionOperation = defineOperation<\n CodingDecisionInput,\n CodingDecisionOutput\n>({\n name: \"coding_decision\",\n description:\n \"List, get, record, or supersede decision records in the session's coding namespace (issue #1548 Track A).\",\n schema: codingDecisionSchema as z.ZodType<CodingDecisionInput>,\n handler: async (input, ctx) => {\n const result = await ctx.service.codingDecision(input, ctx.authenticatedPrincipal);\n return { result };\n },\n});\n\n// ---------------------------------------------------------------------------\n// coding_architecture — architecture-card surfaces (issue #1548 Track A PR 3)\n// ---------------------------------------------------------------------------\n\nconst codingArchitectureSchema = z.preprocess(\n (data) => {\n if (data !== null && typeof data === \"object\" && !Array.isArray(data)) {\n const obj = data as Record<string, unknown>;\n const cleaned: Record<string, unknown> = {};\n for (const [key, value] of Object.entries(obj)) {\n if (value !== null) cleaned[key] = value;\n }\n return cleaned;\n }\n return data;\n },\n z.object({\n subcommand: z.enum([\"get\", \"refresh\"]),\n sessionKey: z.string().optional(),\n namespace: z.string().optional(),\n }),\n);\n\nexport type CodingArchitectureInput = ArchitectureSurfaceRequest;\nexport type CodingArchitectureOutput = { result: ArchitectureSurfaceResponse };\n\nexport const codingArchitectureOperation = defineOperation<\n CodingArchitectureInput,\n CodingArchitectureOutput\n>({\n name: \"coding_architecture\",\n description:\n \"Get or refresh the architecture card for the session's coding namespace (issue #1548 Track A PR 3).\",\n schema: codingArchitectureSchema as z.ZodType<CodingArchitectureInput>,\n handler: async (input, ctx) => {\n const result = await ctx.service.codingArchitecture(input, ctx.authenticatedPrincipal);\n return { result };\n },\n});\n\nconst codegraphSurfaceSchema = z.preprocess(\n (data) => {\n if (data !== null && typeof data === \"object\" && !Array.isArray(data)) {\n const obj = data as Record<string, unknown>;\n const cleaned: Record<string, unknown> = {};\n for (const [key, value] of Object.entries(obj)) {\n if (value !== null) cleaned[key] = value;\n }\n return cleaned;\n }\n return data;\n },\n z.object({\n tool: z.string().refine(isCodegraphToolName, {\n message: \"tool must be one of the codegraph tool names\",\n }),\n sessionKey: z.string().max(512).optional(),\n principal: z.string().max(256).optional(),\n project: z.string().max(256).optional(),\n query: z.string().max(2048).optional(),\n limit: z.number().int().positive().max(200).optional(),\n start: z.string().max(512).optional(),\n direction: z.string().max(64).optional(),\n depth: z.number().int().positive().max(10).optional(),\n qualifiedName: z.string().max(1024).optional(),\n path: z.string().max(2048).optional(),\n structuredQuery: z.record(z.string(), z.unknown()).optional(),\n head: z.string().max(256).optional(),\n repoRoot: z.string().max(2048).optional(),\n mode: z.string().max(64).optional(),\n confirm: z.boolean().optional(),\n subcommand: z.string().max(64).optional(),\n id: z.string().max(512).optional(),\n title: z.string().max(512).optional(),\n status: z.string().max(64).optional(),\n context: z.string().max(8192).optional(),\n decision: z.string().max(8192).optional(),\n consequences: z.string().max(8192).optional(),\n entityRefs: z.array(z.string().max(256)).optional(),\n supersedesId: z.string().max(512).optional(),\n traces: z.array(z.unknown()).optional(),\n }),\n) as z.ZodType<CodegraphSurfaceRequest>;\n\n// ---------------------------------------------------------------------------\n// coding_delta — session-delta surface (issue #1548 Track A PR 4)\n// ---------------------------------------------------------------------------\n\nconst codingDeltaSchema = z.preprocess(\n (data) => {\n if (data !== null && typeof data === \"object\" && !Array.isArray(data)) {\n const obj = data as Record<string, unknown>;\n const cleaned: Record<string, unknown> = {};\n for (const [key, value] of Object.entries(obj)) {\n if (value !== null) cleaned[key] = value;\n }\n return cleaned;\n }\n return data;\n },\n z.object({\n subcommand: z.enum(DELTA_SUBCOMMANDS),\n sessionKey: z.string().trim().max(512).optional(),\n namespace: z.string().trim().max(256).optional(),\n }),\n);\n\nexport type CodingDeltaInput = DeltaSurfaceRequest;\nexport type CodingDeltaOutput = { result: DeltaSurfaceResponse };\n\nexport const codingDeltaOperation = defineOperation<\n CodingDeltaInput,\n CodingDeltaOutput\n>({\n name: \"coding_delta\",\n description:\n \"Get the session delta (commits + touched files since last seen) for the session's coding namespace (issue #1548 Track A PR 4).\",\n schema: codingDeltaSchema as z.ZodType<CodingDeltaInput>,\n handler: async (input, ctx) => {\n const result = await ctx.service.codingDelta(input, ctx.authenticatedPrincipal);\n return { result };\n },\n});\n\n// ---------------------------------------------------------------------------\n// Surface registration map — what each transport calls the pilot ops\n// ---------------------------------------------------------------------------\n\n/**\n * The canonical short names (no `engram.`/`remnic.` prefix) of the operations\n * the boundary owns today. The fitness test treats this set as the migrated\n * set; everything else on a surface is unmigrated and counted by the ratchet.\n */\nexport const codegraphIndexOperation = defineOperation<\n CodegraphSurfaceRequest,\n { result: CodegraphSurfaceResponse }\n>({\n name: \"codegraph_index\",\n description:\n \"Codegraph parity tool (issue #1554): index. Delegates to the shared codegraph surface handler.\",\n schema: codegraphSurfaceSchema,\n handler: async (input, ctx) => {\n const result = await ctx.service.codegraphTool(input, ctx.authenticatedPrincipal);\n return { result };\n },\n});\n\nexport const codegraphListProjectsOperation = defineOperation<\n CodegraphSurfaceRequest,\n { result: CodegraphSurfaceResponse }\n>({\n name: \"codegraph_list_projects\",\n description:\n \"Codegraph parity tool (issue #1554): list_projects. Delegates to the shared codegraph surface handler.\",\n schema: codegraphSurfaceSchema,\n handler: async (input, ctx) => {\n const result = await ctx.service.codegraphTool(input, ctx.authenticatedPrincipal);\n return { result };\n },\n});\n\nexport const codegraphDeleteProjectOperation = defineOperation<\n CodegraphSurfaceRequest,\n { result: CodegraphSurfaceResponse }\n>({\n name: \"codegraph_delete_project\",\n description:\n \"Codegraph parity tool (issue #1554): delete_project. Delegates to the shared codegraph surface handler.\",\n schema: codegraphSurfaceSchema,\n handler: async (input, ctx) => {\n const result = await ctx.service.codegraphTool(input, ctx.authenticatedPrincipal);\n return { result };\n },\n});\n\nexport const codegraphIndexStatusOperation = defineOperation<\n CodegraphSurfaceRequest,\n { result: CodegraphSurfaceResponse }\n>({\n name: \"codegraph_index_status\",\n description:\n \"Codegraph parity tool (issue #1554): index_status. Delegates to the shared codegraph surface handler.\",\n schema: codegraphSurfaceSchema,\n handler: async (input, ctx) => {\n const result = await ctx.service.codegraphTool(input, ctx.authenticatedPrincipal);\n return { result };\n },\n});\n\nexport const codegraphSearchGraphOperation = defineOperation<\n CodegraphSurfaceRequest,\n { result: CodegraphSurfaceResponse }\n>({\n name: \"codegraph_search_graph\",\n description:\n \"Codegraph parity tool (issue #1554): search_graph. Delegates to the shared codegraph surface handler.\",\n schema: codegraphSurfaceSchema,\n handler: async (input, ctx) => {\n const result = await ctx.service.codegraphTool(input, ctx.authenticatedPrincipal);\n return { result };\n },\n});\n\nexport const codegraphTracePathOperation = defineOperation<\n CodegraphSurfaceRequest,\n { result: CodegraphSurfaceResponse }\n>({\n name: \"codegraph_trace_path\",\n description:\n \"Codegraph parity tool (issue #1554): trace_path. Delegates to the shared codegraph surface handler.\",\n schema: codegraphSurfaceSchema,\n handler: async (input, ctx) => {\n const result = await ctx.service.codegraphTool(input, ctx.authenticatedPrincipal);\n return { result };\n },\n});\n\nexport const codegraphDetectChangesOperation = defineOperation<\n CodegraphSurfaceRequest,\n { result: CodegraphSurfaceResponse }\n>({\n name: \"codegraph_detect_changes\",\n description:\n \"Codegraph parity tool (issue #1554): detect_changes. Delegates to the shared codegraph surface handler.\",\n schema: codegraphSurfaceSchema,\n handler: async (input, ctx) => {\n const result = await ctx.service.codegraphTool(input, ctx.authenticatedPrincipal);\n return { result };\n },\n});\n\nexport const codegraphQueryGraphOperation = defineOperation<\n CodegraphSurfaceRequest,\n { result: CodegraphSurfaceResponse }\n>({\n name: \"codegraph_query_graph\",\n description:\n \"Codegraph parity tool (issue #1554): query_graph. Delegates to the shared codegraph surface handler.\",\n schema: codegraphSurfaceSchema,\n handler: async (input, ctx) => {\n const result = await ctx.service.codegraphTool(input, ctx.authenticatedPrincipal);\n return { result };\n },\n});\n\nexport const codegraphGetSchemaOperation = defineOperation<\n CodegraphSurfaceRequest,\n { result: CodegraphSurfaceResponse }\n>({\n name: \"codegraph_get_schema\",\n description:\n \"Codegraph parity tool (issue #1554): get_schema. Delegates to the shared codegraph surface handler.\",\n schema: codegraphSurfaceSchema,\n handler: async (input, ctx) => {\n const result = await ctx.service.codegraphTool(input, ctx.authenticatedPrincipal);\n return { result };\n },\n});\n\nexport const codegraphGetSnippetOperation = defineOperation<\n CodegraphSurfaceRequest,\n { result: CodegraphSurfaceResponse }\n>({\n name: \"codegraph_get_snippet\",\n description:\n \"Codegraph parity tool (issue #1554): get_snippet. Delegates to the shared codegraph surface handler.\",\n schema: codegraphSurfaceSchema,\n handler: async (input, ctx) => {\n const result = await ctx.service.codegraphTool(input, ctx.authenticatedPrincipal);\n return { result };\n },\n});\n\nexport const codegraphGetArchitectureOperation = defineOperation<\n CodegraphSurfaceRequest,\n { result: CodegraphSurfaceResponse }\n>({\n name: \"codegraph_get_architecture\",\n description:\n \"Codegraph parity tool (issue #1554): get_architecture. Delegates to the shared codegraph surface handler.\",\n schema: codegraphSurfaceSchema,\n handler: async (input, ctx) => {\n const result = await ctx.service.codegraphTool(input, ctx.authenticatedPrincipal);\n return { result };\n },\n});\n\nexport const codegraphSearchCodeOperation = defineOperation<\n CodegraphSurfaceRequest,\n { result: CodegraphSurfaceResponse }\n>({\n name: \"codegraph_search_code\",\n description:\n \"Codegraph parity tool (issue #1554): search_code. Delegates to the shared codegraph surface handler.\",\n schema: codegraphSurfaceSchema,\n handler: async (input, ctx) => {\n const result = await ctx.service.codegraphTool(input, ctx.authenticatedPrincipal);\n return { result };\n },\n});\n\nexport const codegraphManageAdrOperation = defineOperation<\n CodegraphSurfaceRequest,\n { result: CodegraphSurfaceResponse }\n>({\n name: \"codegraph_manage_adr\",\n description:\n \"Codegraph parity tool (issue #1554): manage_adr. Delegates to the shared codegraph surface handler.\",\n schema: codegraphSurfaceSchema,\n handler: async (input, ctx) => {\n const result = await ctx.service.codegraphTool(input, ctx.authenticatedPrincipal);\n return { result };\n },\n});\n\nexport const codegraphIngestTracesOperation = defineOperation<\n CodegraphSurfaceRequest,\n { result: CodegraphSurfaceResponse }\n>({\n name: \"codegraph_ingest_traces\",\n description:\n \"Codegraph parity tool (issue #1554): ingest_traces. Delegates to the shared codegraph surface handler.\",\n schema: codegraphSurfaceSchema,\n handler: async (input, ctx) => {\n const result = await ctx.service.codegraphTool(input, ctx.authenticatedPrincipal);\n return { result };\n },\n});\n\nexport const REGISTERED_OPERATIONS = [\n memoryGetOperation.spec.name,\n memorySearchOperation.spec.name,\n memoryStoreOperation.spec.name,\n codingDecisionOperation.spec.name,\n codingArchitectureOperation.spec.name,\n codegraphIndexOperation.spec.name,\n codegraphListProjectsOperation.spec.name,\n codegraphDeleteProjectOperation.spec.name,\n codegraphIndexStatusOperation.spec.name,\n codegraphSearchGraphOperation.spec.name,\n codegraphTracePathOperation.spec.name,\n codegraphDetectChangesOperation.spec.name,\n codegraphQueryGraphOperation.spec.name,\n codegraphGetSchemaOperation.spec.name,\n codegraphGetSnippetOperation.spec.name,\n codegraphGetArchitectureOperation.spec.name,\n codegraphSearchCodeOperation.spec.name,\n codegraphManageAdrOperation.spec.name,\n codegraphIngestTracesOperation.spec.name,\n codingDeltaOperation.spec.name,\n] as const;\n"],"mappings":";;;;;;;;;;;;;AAcA,SAAS,SAAS;AA0ClB,IAAM,kBAAkB,EAAE,OAAO;AAAA,EAC/B,UAAU,EAAE,OAAO,EAAE,KAAK,EAAE,IAAI,GAAG,sBAAsB,EAAE,IAAI,GAAG;AAAA,EAClE,WAAW,EAAE,OAAO,EAAE,KAAK,EAAE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8B,KAAK;AAAA,EACnC,8BAA8B,KAAK;AAAA,EACnC,4BAA4B,KAAK;AAAA,EACjC,gCAAgC,KAAK;AAAA,EACrC,6BAA6B,KAAK;AAAA,EAClC,4BAA4B,KAAK;AAAA,EACjC,6BAA6B,KAAK;AAAA,EAClC,kCAAkC,KAAK;AAAA,EACvC,6BAA6B,KAAK;AAAA,EAClC,4BAA4B,KAAK;AAAA,EACjC,+BAA+B,KAAK;AAAA,EACpC,qBAAqB,KAAK;AAC5B;","names":[]}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import {
|
|
2
2
|
readAllEdges
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-YGKUAX2B.js";
|
|
4
4
|
import {
|
|
5
5
|
readEdgeConfidence
|
|
6
6
|
} from "./chunk-2LSZVONP.js";
|
|
@@ -162,4 +162,4 @@ export {
|
|
|
162
162
|
parseGraphSnapshotSince,
|
|
163
163
|
buildGraphSnapshot
|
|
164
164
|
};
|
|
165
|
-
//# sourceMappingURL=chunk-
|
|
165
|
+
//# sourceMappingURL=chunk-IF362TF6.js.map
|
|
@@ -6,7 +6,7 @@ import {
|
|
|
6
6
|
} from "./chunk-SFQ6QNL7.js";
|
|
7
7
|
import {
|
|
8
8
|
StorageManager
|
|
9
|
-
} from "./chunk-
|
|
9
|
+
} from "./chunk-MOBRVKWE.js";
|
|
10
10
|
import {
|
|
11
11
|
buildLifecycleEventsForMemory,
|
|
12
12
|
sortMemoryLifecycleEvents
|
|
@@ -74,4 +74,4 @@ export {
|
|
|
74
74
|
backupExistingLedger,
|
|
75
75
|
rebuildMemoryLifecycleLedger
|
|
76
76
|
};
|
|
77
|
-
//# sourceMappingURL=chunk-
|
|
77
|
+
//# sourceMappingURL=chunk-J45OCIVH.js.map
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import {
|
|
2
2
|
isValidCapsuleSince
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-VDX2J7OX.js";
|
|
4
4
|
import {
|
|
5
5
|
CAPSULE_ID_PATTERN
|
|
6
6
|
} from "./chunk-WEHSQBFR.js";
|
|
@@ -433,4 +433,4 @@ export {
|
|
|
433
433
|
actionConfidenceRequestSchema,
|
|
434
434
|
validateRequest
|
|
435
435
|
};
|
|
436
|
-
//# sourceMappingURL=chunk-
|
|
436
|
+
//# sourceMappingURL=chunk-JI6HWBYL.js.map
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import {
|
|
2
|
-
gatewayTaskChainOptions
|
|
3
|
-
} from "./chunk-4RGWCRIJ.js";
|
|
4
1
|
import {
|
|
5
2
|
normalizeProcedureSteps
|
|
6
3
|
} from "./chunk-QDW3E4RD.js";
|
|
4
|
+
import {
|
|
5
|
+
gatewayTaskChainOptions
|
|
6
|
+
} from "./chunk-5TYA4OCF.js";
|
|
7
7
|
import {
|
|
8
8
|
extractJsonCandidates
|
|
9
9
|
} from "./chunk-RGMVMVMF.js";
|
|
@@ -486,4 +486,4 @@ export {
|
|
|
486
486
|
createVerdictCache,
|
|
487
487
|
createDeferCountMap
|
|
488
488
|
};
|
|
489
|
-
//# sourceMappingURL=chunk-
|
|
489
|
+
//# sourceMappingURL=chunk-JJT3AGL4.js.map
|