@remnic/core 9.6.0 → 9.6.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/access-admin-ops-surface.d.ts +7 -8
- package/dist/access-admin-ops-surface.js +8 -8
- package/dist/access-boundary.d.ts +9 -8
- package/dist/access-boundary.js +9 -9
- package/dist/access-cli.js +40 -40
- package/dist/access-http.d.ts +47 -16
- package/dist/access-http.js +13 -13
- package/dist/access-identity-continuity-surface.d.ts +6 -7
- package/dist/access-identity-continuity-surface.js +8 -8
- package/dist/access-lcm-surface.d.ts +7 -8
- package/dist/access-lcm-surface.js +8 -8
- package/dist/access-mcp.d.ts +13 -8
- package/dist/access-mcp.js +12 -12
- package/dist/access-observe-write-surface.d.ts +7 -8
- package/dist/access-observe-write-surface.js +8 -8
- package/dist/access-operations-batch.js +10 -10
- package/dist/access-operations.d.ts +8 -9
- package/dist/access-operations.js +11 -11
- package/dist/access-recall-surface.d.ts +7 -8
- package/dist/access-recall-surface.js +8 -8
- package/dist/access-schema.d.ts +6 -6
- package/dist/{access-service-CXJaql3A.d.ts → access-service-B_sc1w_k.d.ts} +9 -9
- package/dist/access-service.d.ts +7 -8
- package/dist/access-service.js +8 -8
- package/dist/access-surface-catalog.d.ts +7 -8
- package/dist/action-confidence.d.ts +1 -2
- package/dist/active-memory-bridge.d.ts +1 -2
- package/dist/active-recall.d.ts +1 -2
- package/dist/behavior-learner.d.ts +1 -2
- package/dist/behavior-signals.d.ts +1 -2
- package/dist/bootstrap.d.ts +6 -7
- package/dist/briefing.d.ts +2 -3
- package/dist/briefing.js +3 -3
- package/dist/buffer-surprise-report.d.ts +1 -2
- package/dist/buffer.d.ts +2 -3
- package/dist/buffer.js +1 -1
- package/dist/bulk-import/index.d.ts +3 -3
- package/dist/bulk-import/index.js +2 -2
- package/dist/calibration.d.ts +1 -2
- package/dist/capabilities.d.ts +1 -2
- package/dist/{catalog-C9cu67Ig.d.ts → catalog-9WanSGtt.d.ts} +1 -1
- package/dist/causal-behavior.d.ts +1 -2
- package/dist/causal-consolidation.d.ts +1 -2
- package/dist/causal-consolidation.js +4 -4
- package/dist/causal-trajectory-graph.d.ts +1 -2
- package/dist/{chunk-PNLFN2PZ.js → chunk-23G3T2Q5.js} +2 -2
- package/dist/{chunk-SIRPLF54.js → chunk-2K3OSLHE.js} +2 -2
- package/dist/{chunk-JS2HKKOK.js → chunk-3AC5UYKI.js} +1 -1
- package/dist/{chunk-JS2HKKOK.js.map → chunk-3AC5UYKI.js.map} +1 -1
- package/dist/{chunk-FKCRGLRD.js → chunk-4WRKKRTD.js} +266 -160
- package/dist/chunk-4WRKKRTD.js.map +1 -0
- package/dist/{chunk-LQHDIS7L.js → chunk-54BGIBCR.js} +2 -2
- package/dist/{chunk-PVUJ6WVV.js → chunk-5MH5NF3U.js} +5 -5
- package/dist/{chunk-PCLIWBGD.js → chunk-7ARV32PI.js} +8 -6
- package/dist/chunk-7ARV32PI.js.map +1 -0
- package/dist/{chunk-Y7UNNAZD.js → chunk-7ZYBDQ7V.js} +2 -2
- package/dist/{chunk-2PRQG7PV.js → chunk-AJVLDJU6.js} +1 -1
- package/dist/chunk-AJVLDJU6.js.map +1 -0
- package/dist/{chunk-LR5DZ56F.js → chunk-AXALUFAH.js} +2 -2
- package/dist/{chunk-AYZJID4S.js → chunk-B5GBWBCZ.js} +2 -2
- package/dist/{chunk-TLUDFPZL.js → chunk-CAZ3Z5M6.js} +2 -2
- package/dist/{chunk-RGK27ELN.js → chunk-DEKIXXIG.js} +2 -2
- package/dist/{chunk-2KK5WNQB.js → chunk-DQ42IQSK.js} +2 -2
- package/dist/{chunk-UFUKHGZD.js → chunk-F4I5NYBI.js} +89 -33
- package/dist/chunk-F4I5NYBI.js.map +1 -0
- package/dist/{chunk-HOJZMQ4J.js → chunk-FGDKJJZS.js} +2 -2
- package/dist/{chunk-ABP6QMVM.js → chunk-FQ7HAWWC.js} +2 -2
- package/dist/{chunk-CYWA2CXR.js → chunk-FVTLSFWU.js} +2 -2
- package/dist/{chunk-JJEJJ7RK.js → chunk-FXZTL7F7.js} +2 -2
- package/dist/{chunk-LADFWYHY.js → chunk-GOEV7CYF.js} +6 -6
- package/dist/chunk-GOEV7CYF.js.map +1 -0
- package/dist/{chunk-DANV2HTH.js → chunk-GQGDRLDM.js} +3 -3
- package/dist/{chunk-7F7Z6MOS.js → chunk-H4CKS5B2.js} +2 -2
- package/dist/{chunk-SVOHGUMI.js → chunk-H4FHR4UM.js} +174 -197
- package/dist/chunk-H4FHR4UM.js.map +1 -0
- package/dist/{chunk-CKITWVWJ.js → chunk-HSSERO3E.js} +2 -2
- package/dist/{chunk-23JFRB73.js → chunk-JODHPNLN.js} +2 -2
- package/dist/{chunk-DS7MM2ES.js → chunk-JZKR6ZAV.js} +2 -2
- package/dist/{chunk-BEM4D2QG.js → chunk-KJIJNLXT.js} +3 -3
- package/dist/{chunk-JSNVWNGX.js → chunk-KVSVVKHA.js} +2 -2
- package/dist/{chunk-4GNEDXDI.js → chunk-M67TLMP6.js} +2 -2
- package/dist/chunk-M67TLMP6.js.map +1 -0
- package/dist/{chunk-MC4FJXPA.js → chunk-MMACM5G2.js} +2 -2
- package/dist/{chunk-OUELRE5E.js → chunk-NOUJNHWG.js} +1 -1
- package/dist/chunk-NOUJNHWG.js.map +1 -0
- package/dist/{chunk-3XIY7MDQ.js → chunk-O6YI4CVI.js} +2 -2
- package/dist/{chunk-F53UF7CI.js → chunk-QLVLW7UD.js} +6 -2
- package/dist/{chunk-F53UF7CI.js.map → chunk-QLVLW7UD.js.map} +1 -1
- package/dist/{chunk-XCL57M6Q.js → chunk-RRKPLLCC.js} +21 -20
- package/dist/chunk-RRKPLLCC.js.map +1 -0
- package/dist/{chunk-72WG5QKN.js → chunk-SDAXPXER.js} +2 -2
- package/dist/{chunk-4LV23CHK.js → chunk-VHJARF5R.js} +2 -2
- package/dist/{chunk-H2DXDQCQ.js → chunk-VRJG3HIZ.js} +46 -42
- package/dist/chunk-VRJG3HIZ.js.map +1 -0
- package/dist/{chunk-6MMONPHM.js → chunk-W2AHSCKY.js} +2 -2
- package/dist/{chunk-P454KXD6.js → chunk-YAWJMR3Y.js} +21 -21
- package/dist/{chunk-K5LLP4CY.js → chunk-ZGPDSEKG.js} +20 -9
- package/dist/chunk-ZGPDSEKG.js.map +1 -0
- package/dist/{cli-CqdPA6z9.d.ts → cli-CnRsWREp.d.ts} +4 -5
- package/dist/cli.d.ts +9 -10
- package/dist/cli.js +32 -32
- package/dist/compounding/engine.d.ts +2 -3
- package/dist/compounding/engine.js +3 -3
- package/dist/compounding/preference-consolidator.d.ts +1 -2
- package/dist/compression-optimizer.d.ts +1 -2
- package/dist/config.d.ts +1 -2
- package/dist/connectors/codex-materialize-runner.d.ts +1 -2
- package/dist/connectors/codex-materialize-runner.js +3 -3
- package/dist/connectors/codex-materialize.d.ts +1 -2
- package/dist/connectors/index.d.ts +1 -2
- package/dist/connectors/index.js +3 -3
- package/dist/consolidation-provenance-check.d.ts +2 -3
- package/dist/consolidation-undo.d.ts +2 -3
- package/dist/contradiction/index.d.ts +3 -4
- package/dist/conversation-index/backend.d.ts +1 -2
- package/dist/conversation-index/chunker.d.ts +1 -2
- package/dist/conversation-index/faiss-adapter.d.ts +1 -2
- package/dist/conversation-index/indexer.d.ts +1 -2
- package/dist/conversation-index/search.d.ts +1 -2
- package/dist/day-summary.d.ts +1 -2
- package/dist/delinearize.d.ts +1 -2
- package/dist/direct-answer-wiring.d.ts +1 -2
- package/dist/direct-answer.d.ts +1 -2
- package/dist/embedding-fallback.d.ts +1 -2
- package/dist/enrichment/index.d.ts +1 -2
- package/dist/entity-retrieval.d.ts +2 -3
- package/dist/entity-retrieval.js +3 -3
- package/dist/entity-schema.d.ts +1 -2
- package/dist/explicit-capture.d.ts +8 -7
- package/dist/explicit-capture.js +1 -1
- package/dist/extraction-faithfulness.d.ts +1 -2
- package/dist/extraction-judge-telemetry.d.ts +1 -2
- package/dist/extraction-judge-training.d.ts +1 -2
- package/dist/extraction-judge.d.ts +1 -2
- package/dist/extraction.d.ts +1 -2
- package/dist/fallback-llm.d.ts +1 -2
- package/dist/graph-dashboard-diff.d.ts +1 -2
- package/dist/graph-dashboard-key.d.ts +1 -2
- package/dist/graph-dashboard-parser.d.ts +1 -2
- package/dist/graph-edge-reinforcement.d.ts +1 -2
- package/dist/graph-snapshot.d.ts +1 -2
- package/dist/graph.d.ts +1 -2
- package/dist/identity-continuity.d.ts +1 -2
- package/dist/importance.d.ts +1 -2
- package/dist/importers/index.d.ts +1 -1
- package/dist/importers/index.js +2 -2
- package/dist/index.d.ts +14 -15
- package/dist/index.js +40 -40
- package/dist/intent.d.ts +1 -2
- package/dist/lcm/engine.d.ts +1 -2
- package/dist/lcm/index.d.ts +1 -2
- package/dist/lcm/tools.d.ts +1 -2
- package/dist/lifecycle.d.ts +1 -2
- package/dist/live-connectors-runner.d.ts +1 -2
- package/dist/local-llm.d.ts +1 -2
- package/dist/local-model-endpoint.d.ts +1 -2
- package/dist/maintenance/memory-governance.d.ts +1 -2
- package/dist/maintenance/memory-governance.js +3 -3
- package/dist/maintenance/rebuild-memory-lifecycle-ledger.js +3 -3
- package/dist/maintenance/rebuild-memory-projection.js +4 -4
- package/dist/mcp-memory-inspector-app.d.ts +7 -8
- package/dist/memory-action-policy.d.ts +1 -2
- package/dist/memory-cache.d.ts +1 -2
- package/dist/memory-lifecycle-ledger-utils.d.ts +1 -2
- package/dist/memory-projection-store.d.ts +1 -2
- package/dist/memory-provenance.d.ts +1 -2
- package/dist/memory-worth-outcomes.d.ts +2 -3
- package/dist/models-json.d.ts +1 -2
- package/dist/namespaces/migrate.d.ts +3 -4
- package/dist/namespaces/migrate.js +4 -4
- package/dist/namespaces/principal.d.ts +1 -2
- package/dist/namespaces/search.d.ts +1 -2
- package/dist/namespaces/storage.d.ts +3 -4
- package/dist/namespaces/storage.js +3 -3
- package/dist/native-knowledge.d.ts +1 -2
- package/dist/operator-toolkit.d.ts +2 -3
- package/dist/operator-toolkit.js +7 -7
- package/dist/orchestration/compression-guideline-coordinator.d.ts +2 -3
- package/dist/orchestration/maintenance.d.ts +2 -3
- package/dist/orchestration/maintenance.js +5 -5
- package/dist/{orchestrator-CWFrT8AF.d.ts → orchestrator-NRLVXPpH.d.ts} +40 -15
- package/dist/orchestrator.d.ts +6 -7
- package/dist/orchestrator.js +40 -40
- package/dist/patterns-cli.d.ts +1 -2
- package/dist/{pipeline-DmqtvION.d.ts → pipeline-CiD86zIk.d.ts} +1 -1
- package/dist/policy-runtime.d.ts +1 -2
- package/dist/provenance.d.ts +1 -2
- package/dist/{qmd--fnPMK60.d.ts → qmd-Bef7DDuQ.d.ts} +1 -1
- package/dist/qmd-preflight.d.ts +2 -3
- package/dist/qmd-recall-cache.d.ts +1 -2
- package/dist/qmd.d.ts +2 -3
- package/dist/recall-disclosure-escalation.d.ts +1 -2
- package/dist/recall-explain-renderer.d.ts +1 -2
- package/dist/recall-explain-renderer.js +3 -3
- package/dist/recall-planner-llm.d.ts +1 -2
- package/dist/recall-state.d.ts +1 -2
- package/dist/recall-tag-filter.d.ts +1 -2
- package/dist/recall-timings.d.ts +1 -2
- package/dist/recall-xray-cli.d.ts +1 -2
- package/dist/recall-xray-cli.js +4 -4
- package/dist/recall-xray-renderer.d.ts +1 -2
- package/dist/recall-xray-renderer.js +3 -3
- package/dist/recall-xray.d.ts +1 -2
- package/dist/recall-xray.js +2 -2
- package/dist/replay/normalizers/chatgpt.d.ts +1 -0
- package/dist/replay/normalizers/chatgpt.js +3 -3
- package/dist/replay/normalizers/claude.d.ts +1 -0
- package/dist/replay/normalizers/claude.js +3 -3
- package/dist/replay/normalizers/openclaw.d.ts +1 -0
- package/dist/replay/normalizers/openclaw.js +3 -3
- package/dist/replay/normalizers/shared.d.ts +1 -0
- package/dist/replay/normalizers/shared.js +2 -2
- package/dist/replay/runner.d.ts +1 -0
- package/dist/replay/runner.js +2 -2
- package/dist/replay/types.d.ts +2 -1
- package/dist/replay/types.js +1 -1
- package/dist/resolve-auth-token.d.ts +1 -2
- package/dist/retrieval-agents.d.ts +2 -3
- package/dist/retrieval-tiers.d.ts +1 -2
- package/dist/routing/engine.d.ts +1 -2
- package/dist/routing/store.d.ts +1 -2
- package/dist/schemas.d.ts +44 -44
- package/dist/search/embed-helper.d.ts +1 -2
- package/dist/search/factory.d.ts +1 -2
- package/dist/search/index.d.ts +1 -2
- package/dist/search/lancedb-backend.d.ts +1 -2
- package/dist/search/meilisearch-backend.d.ts +1 -2
- package/dist/search/noop-backend.d.ts +1 -2
- package/dist/search/orama-backend.d.ts +1 -2
- package/dist/search/port.d.ts +1 -2
- package/dist/search/remote-backend.d.ts +1 -2
- package/dist/{semantic-DJR8_DMQ.d.ts → semantic-TddhF0y7.d.ts} +17 -1
- package/dist/{semantic-consolidation-O5lMZ4LG.d.ts → semantic-consolidation-BTShF2Fo.d.ts} +1 -1
- package/dist/semantic-consolidation.d.ts +2 -3
- package/dist/semantic-consolidation.js +4 -4
- package/dist/semantic-rule-promotion.js +3 -3
- package/dist/semantic-rule-verifier.d.ts +1 -2
- package/dist/semantic-rule-verifier.js +3 -3
- package/dist/session-observer-bands.d.ts +1 -2
- package/dist/session-observer-state.d.ts +1 -2
- package/dist/shared-context/manager.d.ts +3 -4
- package/dist/signal.d.ts +1 -2
- package/dist/{storage-C1maCNbc.d.ts → storage-DxPDAiU9.d.ts} +5 -1
- package/dist/storage.d.ts +2 -3
- package/dist/storage.js +2 -2
- package/dist/summarizer.d.ts +1 -2
- package/dist/summary-snapshot.d.ts +1 -2
- package/dist/temporal-supersession.d.ts +2 -3
- package/dist/temporal-validity.d.ts +1 -2
- package/dist/threading.d.ts +1 -2
- package/dist/tier-migration.d.ts +2 -3
- package/dist/tier-routing.d.ts +1 -2
- package/dist/topics.d.ts +1 -2
- package/dist/transcript.d.ts +1 -2
- package/dist/transfer/types.d.ts +12 -12
- package/dist/trust-score-stage.d.ts +1 -2
- package/dist/trust-score.d.ts +1 -2
- package/dist/{types-CGgcNWCG.d.ts → types-DDUDgd7T.d.ts} +93 -4
- package/dist/types.d.ts +1 -2
- package/dist/types.js +1 -1
- package/dist/utility-runtime.d.ts +1 -2
- package/dist/verified-recall.js +3 -3
- package/package.json +2 -2
- package/src/access-admin-ops-surface.ts +1 -0
- package/src/access-boundary.ts +2 -0
- package/src/access-http.test.ts +129 -0
- package/src/access-http.ts +92 -23
- package/src/access-mcp.ts +11 -2
- package/src/access-observe-write-surface.ts +87 -113
- package/src/access-operations-batch.ts +2 -2
- package/src/access-operations.ts +17 -16
- package/src/access-service.ts +11 -3
- package/src/admin/admin-surfaces.ts +2 -0
- package/src/buffer.ts +6 -1
- package/src/bulk-import/types.ts +2 -1
- package/src/coding/architecture-surfaces.test.ts +79 -5
- package/src/coding/architecture-surfaces.ts +7 -1
- package/src/coding/decision-surfaces.test.ts +1 -0
- package/src/coding/decision-surfaces.ts +4 -0
- package/src/connector-provenance-lifecycle.test.ts +618 -0
- package/src/connector-provenance.test.ts +219 -0
- package/src/dedup/semantic.test.ts +105 -0
- package/src/dedup/semantic.ts +69 -1
- package/src/explicit-capture.ts +21 -4
- package/src/orchestration/extraction-persist.ts +154 -6
- package/src/orchestration/extraction-run.ts +138 -228
- package/src/orchestration/persistence-index.ts +40 -5
- package/src/orchestration/turn-ingestion.ts +16 -9
- package/src/orchestrator-connector-dedup.test.ts +1082 -0
- package/src/orchestrator.ts +7 -11
- package/src/replay/types.ts +2 -1
- package/src/storage.ts +426 -553
- package/src/types.ts +11 -2
- package/src/utils/yaml-scalar.ts +20 -0
- package/dist/chunk-2PRQG7PV.js.map +0 -1
- package/dist/chunk-4GNEDXDI.js.map +0 -1
- package/dist/chunk-FKCRGLRD.js.map +0 -1
- package/dist/chunk-H2DXDQCQ.js.map +0 -1
- package/dist/chunk-K5LLP4CY.js.map +0 -1
- package/dist/chunk-LADFWYHY.js.map +0 -1
- package/dist/chunk-OUELRE5E.js.map +0 -1
- package/dist/chunk-PCLIWBGD.js.map +0 -1
- package/dist/chunk-SVOHGUMI.js.map +0 -1
- package/dist/chunk-UFUKHGZD.js.map +0 -1
- package/dist/chunk-XCL57M6Q.js.map +0 -1
- package/dist/types-gb_SNtjR.d.ts +0 -85
- /package/dist/{chunk-PNLFN2PZ.js.map → chunk-23G3T2Q5.js.map} +0 -0
- /package/dist/{chunk-SIRPLF54.js.map → chunk-2K3OSLHE.js.map} +0 -0
- /package/dist/{chunk-LQHDIS7L.js.map → chunk-54BGIBCR.js.map} +0 -0
- /package/dist/{chunk-PVUJ6WVV.js.map → chunk-5MH5NF3U.js.map} +0 -0
- /package/dist/{chunk-Y7UNNAZD.js.map → chunk-7ZYBDQ7V.js.map} +0 -0
- /package/dist/{chunk-LR5DZ56F.js.map → chunk-AXALUFAH.js.map} +0 -0
- /package/dist/{chunk-AYZJID4S.js.map → chunk-B5GBWBCZ.js.map} +0 -0
- /package/dist/{chunk-TLUDFPZL.js.map → chunk-CAZ3Z5M6.js.map} +0 -0
- /package/dist/{chunk-RGK27ELN.js.map → chunk-DEKIXXIG.js.map} +0 -0
- /package/dist/{chunk-2KK5WNQB.js.map → chunk-DQ42IQSK.js.map} +0 -0
- /package/dist/{chunk-HOJZMQ4J.js.map → chunk-FGDKJJZS.js.map} +0 -0
- /package/dist/{chunk-ABP6QMVM.js.map → chunk-FQ7HAWWC.js.map} +0 -0
- /package/dist/{chunk-CYWA2CXR.js.map → chunk-FVTLSFWU.js.map} +0 -0
- /package/dist/{chunk-JJEJJ7RK.js.map → chunk-FXZTL7F7.js.map} +0 -0
- /package/dist/{chunk-DANV2HTH.js.map → chunk-GQGDRLDM.js.map} +0 -0
- /package/dist/{chunk-7F7Z6MOS.js.map → chunk-H4CKS5B2.js.map} +0 -0
- /package/dist/{chunk-CKITWVWJ.js.map → chunk-HSSERO3E.js.map} +0 -0
- /package/dist/{chunk-23JFRB73.js.map → chunk-JODHPNLN.js.map} +0 -0
- /package/dist/{chunk-DS7MM2ES.js.map → chunk-JZKR6ZAV.js.map} +0 -0
- /package/dist/{chunk-BEM4D2QG.js.map → chunk-KJIJNLXT.js.map} +0 -0
- /package/dist/{chunk-JSNVWNGX.js.map → chunk-KVSVVKHA.js.map} +0 -0
- /package/dist/{chunk-MC4FJXPA.js.map → chunk-MMACM5G2.js.map} +0 -0
- /package/dist/{chunk-3XIY7MDQ.js.map → chunk-O6YI4CVI.js.map} +0 -0
- /package/dist/{chunk-72WG5QKN.js.map → chunk-SDAXPXER.js.map} +0 -0
- /package/dist/{chunk-4LV23CHK.js.map → chunk-VHJARF5R.js.map} +0 -0
- /package/dist/{chunk-6MMONPHM.js.map → chunk-W2AHSCKY.js.map} +0 -0
- /package/dist/{chunk-P454KXD6.js.map → chunk-YAWJMR3Y.js.map} +0 -0
|
@@ -3,14 +3,14 @@ import {
|
|
|
3
3
|
} from "./chunk-UPSAT4PY.js";
|
|
4
4
|
import {
|
|
5
5
|
defineOperation
|
|
6
|
-
} from "./chunk-
|
|
6
|
+
} from "./chunk-M67TLMP6.js";
|
|
7
7
|
import {
|
|
8
8
|
CorrectionContractError,
|
|
9
9
|
DECISION_SUBCOMMANDS,
|
|
10
10
|
DELTA_SUBCOMMANDS,
|
|
11
11
|
EngramAccessInputError,
|
|
12
12
|
isCodegraphToolName
|
|
13
|
-
} from "./chunk-
|
|
13
|
+
} from "./chunk-VRJG3HIZ.js";
|
|
14
14
|
|
|
15
15
|
// src/access-operations.ts
|
|
16
16
|
import { z } from "zod";
|
|
@@ -70,7 +70,8 @@ var memoryStoreOperation = defineOperation({
|
|
|
70
70
|
const result = await ctx.service.memoryStore(
|
|
71
71
|
{
|
|
72
72
|
...input,
|
|
73
|
-
authenticatedPrincipal: ctx.authenticatedPrincipal
|
|
73
|
+
authenticatedPrincipal: ctx.authenticatedPrincipal,
|
|
74
|
+
...ctx.sourceConnector ? { sourceConnector: ctx.sourceConnector } : {}
|
|
74
75
|
},
|
|
75
76
|
// Forward transport-level hooks (e.g. HTTP's atomic write-quota gate)
|
|
76
77
|
// so the hook still fires inside the service's idempotent-write lock —
|
|
@@ -111,7 +112,7 @@ var codingDecisionOperation = defineOperation({
|
|
|
111
112
|
description: "List, get, record, or supersede decision records in the session's coding namespace (issue #1548 Track A).",
|
|
112
113
|
schema: codingDecisionSchema,
|
|
113
114
|
handler: async (input, ctx) => {
|
|
114
|
-
const result = await ctx.service.codingDecision(input, ctx.authenticatedPrincipal);
|
|
115
|
+
const result = await ctx.service.codingDecision(input, ctx.authenticatedPrincipal, ctx.sourceConnector);
|
|
115
116
|
return { result };
|
|
116
117
|
}
|
|
117
118
|
});
|
|
@@ -138,7 +139,7 @@ var codingArchitectureOperation = defineOperation({
|
|
|
138
139
|
description: "Get or refresh the architecture card for the session's coding namespace (issue #1548 Track A PR 3).",
|
|
139
140
|
schema: codingArchitectureSchema,
|
|
140
141
|
handler: async (input, ctx) => {
|
|
141
|
-
const result = await ctx.service.codingArchitecture(input, ctx.authenticatedPrincipal);
|
|
142
|
+
const result = await ctx.service.codingArchitecture(input, ctx.authenticatedPrincipal, ctx.sourceConnector);
|
|
142
143
|
return { result };
|
|
143
144
|
}
|
|
144
145
|
});
|
|
@@ -292,7 +293,7 @@ var codegraphIndexOperation = defineOperation({
|
|
|
292
293
|
description: "Codegraph parity tool (issue #1554): index. Delegates to the shared codegraph surface handler.",
|
|
293
294
|
schema: codegraphSurfaceSchema,
|
|
294
295
|
handler: async (input, ctx) => {
|
|
295
|
-
const result = await ctx.service.codegraphTool(input, ctx.authenticatedPrincipal);
|
|
296
|
+
const result = await ctx.service.codegraphTool(input, ctx.authenticatedPrincipal, ctx.sourceConnector);
|
|
296
297
|
return { result };
|
|
297
298
|
}
|
|
298
299
|
});
|
|
@@ -301,7 +302,7 @@ var codegraphListProjectsOperation = defineOperation({
|
|
|
301
302
|
description: "Codegraph parity tool (issue #1554): list_projects. Delegates to the shared codegraph surface handler.",
|
|
302
303
|
schema: codegraphSurfaceSchema,
|
|
303
304
|
handler: async (input, ctx) => {
|
|
304
|
-
const result = await ctx.service.codegraphTool(input, ctx.authenticatedPrincipal);
|
|
305
|
+
const result = await ctx.service.codegraphTool(input, ctx.authenticatedPrincipal, ctx.sourceConnector);
|
|
305
306
|
return { result };
|
|
306
307
|
}
|
|
307
308
|
});
|
|
@@ -310,7 +311,7 @@ var codegraphDeleteProjectOperation = defineOperation({
|
|
|
310
311
|
description: "Codegraph parity tool (issue #1554): delete_project. Delegates to the shared codegraph surface handler.",
|
|
311
312
|
schema: codegraphSurfaceSchema,
|
|
312
313
|
handler: async (input, ctx) => {
|
|
313
|
-
const result = await ctx.service.codegraphTool(input, ctx.authenticatedPrincipal);
|
|
314
|
+
const result = await ctx.service.codegraphTool(input, ctx.authenticatedPrincipal, ctx.sourceConnector);
|
|
314
315
|
return { result };
|
|
315
316
|
}
|
|
316
317
|
});
|
|
@@ -319,7 +320,7 @@ var codegraphIndexStatusOperation = defineOperation({
|
|
|
319
320
|
description: "Codegraph parity tool (issue #1554): index_status. Delegates to the shared codegraph surface handler.",
|
|
320
321
|
schema: codegraphSurfaceSchema,
|
|
321
322
|
handler: async (input, ctx) => {
|
|
322
|
-
const result = await ctx.service.codegraphTool(input, ctx.authenticatedPrincipal);
|
|
323
|
+
const result = await ctx.service.codegraphTool(input, ctx.authenticatedPrincipal, ctx.sourceConnector);
|
|
323
324
|
return { result };
|
|
324
325
|
}
|
|
325
326
|
});
|
|
@@ -328,7 +329,7 @@ var codegraphSearchGraphOperation = defineOperation({
|
|
|
328
329
|
description: "Codegraph parity tool (issue #1554): search_graph. Delegates to the shared codegraph surface handler.",
|
|
329
330
|
schema: codegraphSurfaceSchema,
|
|
330
331
|
handler: async (input, ctx) => {
|
|
331
|
-
const result = await ctx.service.codegraphTool(input, ctx.authenticatedPrincipal);
|
|
332
|
+
const result = await ctx.service.codegraphTool(input, ctx.authenticatedPrincipal, ctx.sourceConnector);
|
|
332
333
|
return { result };
|
|
333
334
|
}
|
|
334
335
|
});
|
|
@@ -337,7 +338,7 @@ var codegraphTracePathOperation = defineOperation({
|
|
|
337
338
|
description: "Codegraph parity tool (issue #1554): trace_path. Delegates to the shared codegraph surface handler.",
|
|
338
339
|
schema: codegraphSurfaceSchema,
|
|
339
340
|
handler: async (input, ctx) => {
|
|
340
|
-
const result = await ctx.service.codegraphTool(input, ctx.authenticatedPrincipal);
|
|
341
|
+
const result = await ctx.service.codegraphTool(input, ctx.authenticatedPrincipal, ctx.sourceConnector);
|
|
341
342
|
return { result };
|
|
342
343
|
}
|
|
343
344
|
});
|
|
@@ -346,7 +347,7 @@ var codegraphDetectChangesOperation = defineOperation({
|
|
|
346
347
|
description: "Codegraph parity tool (issue #1554): detect_changes. Delegates to the shared codegraph surface handler.",
|
|
347
348
|
schema: codegraphSurfaceSchema,
|
|
348
349
|
handler: async (input, ctx) => {
|
|
349
|
-
const result = await ctx.service.codegraphTool(input, ctx.authenticatedPrincipal);
|
|
350
|
+
const result = await ctx.service.codegraphTool(input, ctx.authenticatedPrincipal, ctx.sourceConnector);
|
|
350
351
|
return { result };
|
|
351
352
|
}
|
|
352
353
|
});
|
|
@@ -355,7 +356,7 @@ var codegraphQueryGraphOperation = defineOperation({
|
|
|
355
356
|
description: "Codegraph parity tool (issue #1554): query_graph. Delegates to the shared codegraph surface handler.",
|
|
356
357
|
schema: codegraphSurfaceSchema,
|
|
357
358
|
handler: async (input, ctx) => {
|
|
358
|
-
const result = await ctx.service.codegraphTool(input, ctx.authenticatedPrincipal);
|
|
359
|
+
const result = await ctx.service.codegraphTool(input, ctx.authenticatedPrincipal, ctx.sourceConnector);
|
|
359
360
|
return { result };
|
|
360
361
|
}
|
|
361
362
|
});
|
|
@@ -364,7 +365,7 @@ var codegraphGetSchemaOperation = defineOperation({
|
|
|
364
365
|
description: "Codegraph parity tool (issue #1554): get_schema. Delegates to the shared codegraph surface handler.",
|
|
365
366
|
schema: codegraphSurfaceSchema,
|
|
366
367
|
handler: async (input, ctx) => {
|
|
367
|
-
const result = await ctx.service.codegraphTool(input, ctx.authenticatedPrincipal);
|
|
368
|
+
const result = await ctx.service.codegraphTool(input, ctx.authenticatedPrincipal, ctx.sourceConnector);
|
|
368
369
|
return { result };
|
|
369
370
|
}
|
|
370
371
|
});
|
|
@@ -373,7 +374,7 @@ var codegraphGetSnippetOperation = defineOperation({
|
|
|
373
374
|
description: "Codegraph parity tool (issue #1554): get_snippet. Delegates to the shared codegraph surface handler.",
|
|
374
375
|
schema: codegraphSurfaceSchema,
|
|
375
376
|
handler: async (input, ctx) => {
|
|
376
|
-
const result = await ctx.service.codegraphTool(input, ctx.authenticatedPrincipal);
|
|
377
|
+
const result = await ctx.service.codegraphTool(input, ctx.authenticatedPrincipal, ctx.sourceConnector);
|
|
377
378
|
return { result };
|
|
378
379
|
}
|
|
379
380
|
});
|
|
@@ -382,7 +383,7 @@ var codegraphGetArchitectureOperation = defineOperation({
|
|
|
382
383
|
description: "Codegraph parity tool (issue #1554): get_architecture. Delegates to the shared codegraph surface handler.",
|
|
383
384
|
schema: codegraphSurfaceSchema,
|
|
384
385
|
handler: async (input, ctx) => {
|
|
385
|
-
const result = await ctx.service.codegraphTool(input, ctx.authenticatedPrincipal);
|
|
386
|
+
const result = await ctx.service.codegraphTool(input, ctx.authenticatedPrincipal, ctx.sourceConnector);
|
|
386
387
|
return { result };
|
|
387
388
|
}
|
|
388
389
|
});
|
|
@@ -391,7 +392,7 @@ var codegraphSearchCodeOperation = defineOperation({
|
|
|
391
392
|
description: "Codegraph parity tool (issue #1554): search_code. Delegates to the shared codegraph surface handler.",
|
|
392
393
|
schema: codegraphSurfaceSchema,
|
|
393
394
|
handler: async (input, ctx) => {
|
|
394
|
-
const result = await ctx.service.codegraphTool(input, ctx.authenticatedPrincipal);
|
|
395
|
+
const result = await ctx.service.codegraphTool(input, ctx.authenticatedPrincipal, ctx.sourceConnector);
|
|
395
396
|
return { result };
|
|
396
397
|
}
|
|
397
398
|
});
|
|
@@ -400,7 +401,7 @@ var codegraphManageAdrOperation = defineOperation({
|
|
|
400
401
|
description: "Codegraph parity tool (issue #1554): manage_adr. Delegates to the shared codegraph surface handler.",
|
|
401
402
|
schema: codegraphSurfaceSchema,
|
|
402
403
|
handler: async (input, ctx) => {
|
|
403
|
-
const result = await ctx.service.codegraphTool(input, ctx.authenticatedPrincipal);
|
|
404
|
+
const result = await ctx.service.codegraphTool(input, ctx.authenticatedPrincipal, ctx.sourceConnector);
|
|
404
405
|
return { result };
|
|
405
406
|
}
|
|
406
407
|
});
|
|
@@ -409,7 +410,7 @@ var codegraphIngestTracesOperation = defineOperation({
|
|
|
409
410
|
description: "Codegraph parity tool (issue #1554): ingest_traces. Delegates to the shared codegraph surface handler.",
|
|
410
411
|
schema: codegraphSurfaceSchema,
|
|
411
412
|
handler: async (input, ctx) => {
|
|
412
|
-
const result = await ctx.service.codegraphTool(input, ctx.authenticatedPrincipal);
|
|
413
|
+
const result = await ctx.service.codegraphTool(input, ctx.authenticatedPrincipal, ctx.sourceConnector);
|
|
413
414
|
return { result };
|
|
414
415
|
}
|
|
415
416
|
});
|
|
@@ -463,4 +464,4 @@ export {
|
|
|
463
464
|
codegraphIngestTracesOperation,
|
|
464
465
|
REGISTERED_OPERATIONS
|
|
465
466
|
};
|
|
466
|
-
//# sourceMappingURL=chunk-
|
|
467
|
+
//# sourceMappingURL=chunk-RRKPLLCC.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 { EngramAccessInputError } from \"./access-service.js\";\nimport { CorrectionContractError } from \"./correction/correction-contract.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 // Issue #1582 — when memoryId is a `[m:xxxx]` handle, sessionKey scopes the\n // resolution to this session's recent recall history.\n sessionKey: z.string().trim().min(1).max(512).nullable().optional(),\n namespace: z.string().trim().max(256).nullable().optional(),\n});\n\nexport interface MemoryGetInput {\n readonly memoryId: string;\n readonly sessionKey?: string | null;\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 input.sessionKey ?? undefined,\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 ...(ctx.sourceConnector ? { sourceConnector: ctx.sourceConnector } : {}),\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, ctx.sourceConnector);\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, ctx.sourceConnector);\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// memory_correct_plan / memory_correct_apply — Correction Contract (#1580)\n// ---------------------------------------------------------------------------\n//\n// One plan/apply pipeline for every memory correction (supersession,\n// invalidation, tombstone, edit, rescope, redaction). The MCP/HTTP/CLI\n// surfaces all dispatch through these two ops so the boundary's validation +\n// error mapping reach every correction path (rule 22 / 39).\n\nconst memoryCorrectPlanSchema = 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 text: z.string().trim().min(1).max(10_000),\n targetIds: z.array(z.string().trim().min(1).max(512)).optional(),\n sessionKey: z.string().trim().max(512).optional(),\n namespace: z.string().trim().max(256).optional(),\n }),\n);\n\nexport interface MemoryCorrectPlanInput {\n text: string;\n targetIds?: string[];\n sessionKey?: string;\n namespace?: string;\n}\n\nexport interface MemoryCorrectPlanOutput {\n readonly result: unknown; // CorrectionPlan — opaque to the boundary\n}\n\nexport const memoryCorrectPlanOperation = defineOperation<\n MemoryCorrectPlanInput,\n MemoryCorrectPlanOutput\n>({\n name: \"memory_correct_plan\",\n description:\n \"Plan a memory correction from a plain-language statement (issue #1580). Returns a CorrectionPlan with a diff preview; apply via memory_correct_apply.\",\n schema: memoryCorrectPlanSchema as z.ZodType<MemoryCorrectPlanInput>,\n handler: async (input, ctx) => {\n try {\n const result = await ctx.service.correctionPlan({\n text: input.text,\n ...(input.targetIds ? { targetIds: input.targetIds } : {}),\n ...(input.sessionKey ? { sessionKey: input.sessionKey } : {}),\n ...(input.namespace ? { namespace: input.namespace } : {}),\n ...(ctx.authenticatedPrincipal ? { principal: ctx.authenticatedPrincipal } : {}),\n });\n return { result };\n } catch (err) {\n if (err instanceof CorrectionContractError) throw new EngramAccessInputError(err.message);\n throw err;\n }\n },\n});\n\nconst memoryCorrectApplySchema = 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 planId: z.string().trim().min(1).max(512),\n confirm: z.boolean().optional(),\n sessionKey: z.string().trim().max(512).optional(),\n namespace: z.string().trim().max(256).optional(),\n }),\n);\n\nexport interface MemoryCorrectApplyInput {\n planId: string;\n confirm?: boolean;\n sessionKey?: string;\n namespace?: string;\n}\n\nexport interface MemoryCorrectApplyOutput {\n readonly result: unknown; // CorrectionOutcome — opaque to the boundary\n}\n\nexport const memoryCorrectApplyOperation = defineOperation<\n MemoryCorrectApplyInput,\n MemoryCorrectApplyOutput\n>({\n name: \"memory_correct_apply\",\n description:\n \"Apply a planned memory correction by planId (issue #1580). Requires confirm: true when correction.applyRequiresConfirm is on (default).\",\n schema: memoryCorrectApplySchema as z.ZodType<MemoryCorrectApplyInput>,\n handler: async (input, ctx) => {\n try {\n const result = await ctx.service.correctionApply(input.planId, {\n confirm: input.confirm === true,\n ...(input.sessionKey ? { sessionKey: input.sessionKey } : {}),\n ...(input.namespace ? { namespace: input.namespace } : {}),\n ...(ctx.authenticatedPrincipal ? { principal: ctx.authenticatedPrincipal } : {}),\n });\n return { result };\n } catch (err) {\n if (err instanceof CorrectionContractError) throw new EngramAccessInputError(err.message);\n throw err;\n }\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, ctx.sourceConnector);\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, ctx.sourceConnector);\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, ctx.sourceConnector);\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, ctx.sourceConnector);\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, ctx.sourceConnector);\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, ctx.sourceConnector);\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, ctx.sourceConnector);\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, ctx.sourceConnector);\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, ctx.sourceConnector);\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, ctx.sourceConnector);\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, ctx.sourceConnector);\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, ctx.sourceConnector);\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, ctx.sourceConnector);\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, ctx.sourceConnector);\n return { result };\n },\n});\n\n// Batch-migrated operations (issue #1525): registers all remaining\n// handlers through the boundary as a side effect of importing this module.\nimport \"./access-operations-batch.js\";\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 memoryCorrectPlanOperation.spec.name,\n memoryCorrectApplyOperation.spec.name,\n] as const;\n"],"mappings":";;;;;;;;;;;;;;;AAcA,SAAS,SAAS;AA4ClB,IAAM,kBAAkB,EAAE,OAAO;AAAA,EAC/B,UAAU,EAAE,OAAO,EAAE,KAAK,EAAE,IAAI,GAAG,sBAAsB,EAAE,IAAI,GAAG;AAAA;AAAA;AAAA,EAGlE,YAAY,EAAE,OAAO,EAAE,KAAK,EAAE,IAAI,CAAC,EAAE,IAAI,GAAG,EAAE,SAAS,EAAE,SAAS;AAAA,EAClE,WAAW,EAAE,OAAO,EAAE,KAAK,EAAE,IAAI,GAAG,EAAE,SAAS,EAAE,SAAS;AAC5D,CAAC;AAYM,IAAM,qBAAqB,gBAAiD;AAAA,EACjF,MAAM;AAAA,EACN,aAAa;AAAA,EACb,QAAQ;AAAA,EACR,SAAS,OAAO,OAAO,QAAQ;AAC7B,UAAM,SAAS,MAAM,IAAI,QAAQ;AAAA,MAC/B,MAAM;AAAA,MACN,MAAM,aAAa;AAAA,MACnB,IAAI;AAAA,MACJ,MAAM,cAAc;AAAA,IACtB;AACA,WAAO,EAAE,OAAO;AAAA,EAClB;AACF,CAAC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ACrC,8BAA8B,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;AAAA,EAC1B,2BAA2B,KAAK;AAAA,EAChC,4BAA4B,KAAK;AACnC;","names":[]}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import {
|
|
2
2
|
StorageManager
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-H4FHR4UM.js";
|
|
4
4
|
|
|
5
5
|
// src/semantic-rule-promotion.ts
|
|
6
6
|
import { createHash, randomUUID } from "crypto";
|
|
@@ -529,4 +529,4 @@ export {
|
|
|
529
529
|
setSemanticRulePromotionTestHooks,
|
|
530
530
|
promoteSemanticRuleFromMemory
|
|
531
531
|
};
|
|
532
|
-
//# sourceMappingURL=chunk-
|
|
532
|
+
//# sourceMappingURL=chunk-SDAXPXER.js.map
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import {
|
|
2
2
|
resolveDefaultNamespaceRoot,
|
|
3
3
|
resolveNamespaceStorageRoot
|
|
4
|
-
} from "./chunk-
|
|
4
|
+
} from "./chunk-23G3T2Q5.js";
|
|
5
5
|
import {
|
|
6
6
|
getConfiguredNamespaces
|
|
7
7
|
} from "./chunk-BAVVI5GP.js";
|
|
@@ -2042,4 +2042,4 @@ export {
|
|
|
2042
2042
|
runNamespaceMaintenancePlan,
|
|
2043
2043
|
runNamespaceMaintenanceBatchPlan
|
|
2044
2044
|
};
|
|
2045
|
-
//# sourceMappingURL=chunk-
|
|
2045
|
+
//# sourceMappingURL=chunk-VHJARF5R.js.map
|
|
@@ -31,10 +31,10 @@ import {
|
|
|
31
31
|
} from "./chunk-BT7NVCML.js";
|
|
32
32
|
import {
|
|
33
33
|
toRecallExplainJson
|
|
34
|
-
} from "./chunk-
|
|
34
|
+
} from "./chunk-DQ42IQSK.js";
|
|
35
35
|
import {
|
|
36
36
|
estimateRecallTokens
|
|
37
|
-
} from "./chunk-
|
|
37
|
+
} from "./chunk-W2AHSCKY.js";
|
|
38
38
|
import {
|
|
39
39
|
decideDisclosureEscalation
|
|
40
40
|
} from "./chunk-H7XKCNR6.js";
|
|
@@ -70,7 +70,7 @@ import {
|
|
|
70
70
|
listMemoryGovernanceRuns,
|
|
71
71
|
readMemoryGovernanceRunArtifact,
|
|
72
72
|
runMemoryGovernance
|
|
73
|
-
} from "./chunk-
|
|
73
|
+
} from "./chunk-O6YI4CVI.js";
|
|
74
74
|
import {
|
|
75
75
|
recordMemoryOutcome
|
|
76
76
|
} from "./chunk-EIR5VLIH.js";
|
|
@@ -91,7 +91,7 @@ import {
|
|
|
91
91
|
persistExplicitCapture,
|
|
92
92
|
queueExplicitCaptureForReview,
|
|
93
93
|
validateExplicitCaptureInput
|
|
94
|
-
} from "./chunk-
|
|
94
|
+
} from "./chunk-ZGPDSEKG.js";
|
|
95
95
|
import {
|
|
96
96
|
CrossNamespaceBudget
|
|
97
97
|
} from "./chunk-ODPLEWB6.js";
|
|
@@ -108,11 +108,11 @@ import {
|
|
|
108
108
|
enqueuePassiveCorrectionNotification,
|
|
109
109
|
parseBriefingFocus,
|
|
110
110
|
parseBriefingWindow
|
|
111
|
-
} from "./chunk-
|
|
111
|
+
} from "./chunk-7ZYBDQ7V.js";
|
|
112
112
|
import {
|
|
113
113
|
parseEntityFile,
|
|
114
114
|
selfDeps
|
|
115
|
-
} from "./chunk-
|
|
115
|
+
} from "./chunk-H4FHR4UM.js";
|
|
116
116
|
import {
|
|
117
117
|
supersessionKeysForFact
|
|
118
118
|
} from "./chunk-EHK6KZHK.js";
|
|
@@ -125,7 +125,7 @@ import {
|
|
|
125
125
|
import {
|
|
126
126
|
DEFAULT_RECALL_DISCLOSURE,
|
|
127
127
|
isRecallDisclosure
|
|
128
|
-
} from "./chunk-
|
|
128
|
+
} from "./chunk-3AC5UYKI.js";
|
|
129
129
|
import {
|
|
130
130
|
getMemoryProjectionPath
|
|
131
131
|
} from "./chunk-RHOZ5LLO.js";
|
|
@@ -567,7 +567,8 @@ async function decisionRecord(request, ctx) {
|
|
|
567
567
|
// from the active corpus exactly like a supersede does (review P2:
|
|
568
568
|
// persist inactive decision statuses in frontmatter).
|
|
569
569
|
structuredAttributes: { decisionStatus: status },
|
|
570
|
-
status: isActive ? void 0 : "archived"
|
|
570
|
+
status: isActive ? void 0 : "archived",
|
|
571
|
+
...ctx.sourceConnector ? { sourceConnector: ctx.sourceConnector } : {}
|
|
571
572
|
});
|
|
572
573
|
log.info(
|
|
573
574
|
`access-write op=coding_decision/record memoryId=${memoryId} status=${status}`
|
|
@@ -621,7 +622,8 @@ async function decisionSupersede(request, ctx) {
|
|
|
621
622
|
// Mirror decisionRecord: persist structuredAttributes.decisionStatus on
|
|
622
623
|
// the replacement so list/get projection and QMD indexing see the
|
|
623
624
|
// authoritative marker (review: supersede omits decisionStatus attrs).
|
|
624
|
-
structuredAttributes: { decisionStatus: "accepted" }
|
|
625
|
+
structuredAttributes: { decisionStatus: "accepted" },
|
|
626
|
+
...ctx.sourceConnector ? { sourceConnector: ctx.sourceConnector } : {}
|
|
625
627
|
}
|
|
626
628
|
);
|
|
627
629
|
if (replacementBlocked) {
|
|
@@ -1116,7 +1118,8 @@ async function architectureRefresh(request, ctx, codingContext) {
|
|
|
1116
1118
|
if (existing) {
|
|
1117
1119
|
await ctx.versioning.snapshotIfExists(existing);
|
|
1118
1120
|
const updated = await storage.updateMemory(existing.frontmatter.id, cardContent, {
|
|
1119
|
-
actor: "coding-architecture-refresh"
|
|
1121
|
+
actor: "coding-architecture-refresh",
|
|
1122
|
+
...ctx.sourceConnector ? { sourceConnector: ctx.sourceConnector } : {}
|
|
1120
1123
|
});
|
|
1121
1124
|
if (!updated) {
|
|
1122
1125
|
log.warn(
|
|
@@ -1126,6 +1129,7 @@ async function architectureRefresh(request, ctx, codingContext) {
|
|
|
1126
1129
|
confidence: 1,
|
|
1127
1130
|
tags,
|
|
1128
1131
|
source: "coding-architecture",
|
|
1132
|
+
...ctx.sourceConnector ? { sourceConnector: ctx.sourceConnector } : {},
|
|
1129
1133
|
structuredAttributes: { cardKind: ARCHITECTURE_CARD_KIND }
|
|
1130
1134
|
});
|
|
1131
1135
|
log.info(
|
|
@@ -1148,6 +1152,7 @@ async function architectureRefresh(request, ctx, codingContext) {
|
|
|
1148
1152
|
confidence: 1,
|
|
1149
1153
|
tags,
|
|
1150
1154
|
source: "coding-architecture",
|
|
1155
|
+
...ctx.sourceConnector ? { sourceConnector: ctx.sourceConnector } : {},
|
|
1151
1156
|
structuredAttributes: { cardKind: ARCHITECTURE_CARD_KIND }
|
|
1152
1157
|
});
|
|
1153
1158
|
log.info(
|
|
@@ -4724,7 +4729,8 @@ async function promoteMemory(options) {
|
|
|
4724
4729
|
reason,
|
|
4725
4730
|
actor: options.actor,
|
|
4726
4731
|
validAt: sourceMemory.frontmatter.valid_at,
|
|
4727
|
-
lineage: [options.sourceMemoryId]
|
|
4732
|
+
lineage: [options.sourceMemoryId],
|
|
4733
|
+
...sourceMemory.frontmatter.sourceConnector ? { sourceConnector: sourceMemory.frontmatter.sourceConnector } : {}
|
|
4728
4734
|
});
|
|
4729
4735
|
target.promoted = true;
|
|
4730
4736
|
target.promotedMemoryId = promotedId;
|
|
@@ -5615,7 +5621,8 @@ var AccessAdminOpsSurface = class {
|
|
|
5615
5621
|
lineage: memory.lineage,
|
|
5616
5622
|
sourceMemoryId: memory.sourceMemoryId,
|
|
5617
5623
|
actor: memory.actor,
|
|
5618
|
-
validAt: memory.validAt
|
|
5624
|
+
validAt: memory.validAt,
|
|
5625
|
+
...memory.sourceConnector ? { sourceConnector: memory.sourceConnector } : {}
|
|
5619
5626
|
}
|
|
5620
5627
|
);
|
|
5621
5628
|
if (tombstoneBlocked) {
|
|
@@ -8184,7 +8191,8 @@ var EngramAccessService = class {
|
|
|
8184
8191
|
tags: request.tags,
|
|
8185
8192
|
entityRef: request.entityRef,
|
|
8186
8193
|
ttl: request.ttl,
|
|
8187
|
-
sourceReason: request.sourceReason
|
|
8194
|
+
sourceReason: request.sourceReason,
|
|
8195
|
+
sourceConnector: request.sourceConnector
|
|
8188
8196
|
},
|
|
8189
8197
|
skip: request.dryRun === true
|
|
8190
8198
|
});
|
|
@@ -8213,7 +8221,8 @@ var EngramAccessService = class {
|
|
|
8213
8221
|
tags: request.tags,
|
|
8214
8222
|
entityRef: request.entityRef,
|
|
8215
8223
|
ttl: request.ttl,
|
|
8216
|
-
sourceReason: request.sourceReason
|
|
8224
|
+
sourceReason: request.sourceReason,
|
|
8225
|
+
sourceConnector: request.sourceConnector
|
|
8217
8226
|
},
|
|
8218
8227
|
skip: request.dryRun === true
|
|
8219
8228
|
});
|
|
@@ -8261,7 +8270,7 @@ var EngramAccessService = class {
|
|
|
8261
8270
|
* the context. Memory dir + principal + coding-context lookup come from
|
|
8262
8271
|
* the orchestrator/access-service fabric -- no handler-side state.
|
|
8263
8272
|
*/
|
|
8264
|
-
async codegraphTool(request, authenticatedPrincipal) {
|
|
8273
|
+
async codegraphTool(request, authenticatedPrincipal, sourceConnector) {
|
|
8265
8274
|
const principal = authenticatedPrincipal ?? "default";
|
|
8266
8275
|
const memoryDir = this.orchestrator.config.memoryDir;
|
|
8267
8276
|
const ctx = {
|
|
@@ -8298,7 +8307,7 @@ var EngramAccessService = class {
|
|
|
8298
8307
|
throw new EngramAccessInputError(msg);
|
|
8299
8308
|
},
|
|
8300
8309
|
delegateDecisionRecord: async (decisionRequest) => {
|
|
8301
|
-
return this.codingDecision(decisionRequest, authenticatedPrincipal);
|
|
8310
|
+
return this.codingDecision(decisionRequest, authenticatedPrincipal, sourceConnector);
|
|
8302
8311
|
},
|
|
8303
8312
|
buildArchitectureCard: async (repoRoot) => {
|
|
8304
8313
|
return buildArchitectureCard(repoRoot, {
|
|
@@ -8321,7 +8330,7 @@ var EngramAccessService = class {
|
|
|
8321
8330
|
* coding overlay + default fallback) so decision records land in the same
|
|
8322
8331
|
* storage root.
|
|
8323
8332
|
*/
|
|
8324
|
-
async codingDecision(request, authenticatedPrincipal) {
|
|
8333
|
+
async codingDecision(request, authenticatedPrincipal, sourceConnector) {
|
|
8325
8334
|
return handleCodingDecision(request, {
|
|
8326
8335
|
codingKnowledge: this.orchestrator.config.codingKnowledge,
|
|
8327
8336
|
getCodingContext: (sk) => this.orchestrator.getCodingContextForSession(sk),
|
|
@@ -8341,7 +8350,8 @@ var EngramAccessService = class {
|
|
|
8341
8350
|
},
|
|
8342
8351
|
throwInputError: (msg) => {
|
|
8343
8352
|
throw new EngramAccessInputError(msg);
|
|
8344
|
-
}
|
|
8353
|
+
},
|
|
8354
|
+
sourceConnector
|
|
8345
8355
|
});
|
|
8346
8356
|
}
|
|
8347
8357
|
/** Whether the coding_architecture tool should appear in tools/list (rule 39). */
|
|
@@ -8361,7 +8371,7 @@ var EngramAccessService = class {
|
|
|
8361
8371
|
* All three surfaces (MCP/HTTP/CLI) arrive here via the boundary operation.
|
|
8362
8372
|
* Namespace resolution uses the SAME coding-scoped path as decision records.
|
|
8363
8373
|
*/
|
|
8364
|
-
async codingArchitecture(request, authenticatedPrincipal) {
|
|
8374
|
+
async codingArchitecture(request, authenticatedPrincipal, sourceConnector) {
|
|
8365
8375
|
const resolvedConfig = this.orchestrator.config;
|
|
8366
8376
|
return handleCodingArchitecture(request, {
|
|
8367
8377
|
codingKnowledge: this.orchestrator.config.codingKnowledge,
|
|
@@ -8394,7 +8404,8 @@ var EngramAccessService = class {
|
|
|
8394
8404
|
),
|
|
8395
8405
|
throwInputError: (msg) => {
|
|
8396
8406
|
throw new EngramAccessInputError(msg);
|
|
8397
|
-
}
|
|
8407
|
+
},
|
|
8408
|
+
sourceConnector
|
|
8398
8409
|
});
|
|
8399
8410
|
}
|
|
8400
8411
|
/** Whether the coding_delta tool should appear in tools/list (rule 39). */
|
|
@@ -9025,7 +9036,8 @@ var EngramAccessService = class {
|
|
|
9025
9036
|
authenticatedPrincipal: request.authenticatedPrincipal,
|
|
9026
9037
|
cwd: request.cwd,
|
|
9027
9038
|
projectTag: request.projectTag,
|
|
9028
|
-
effectiveCodingContext: effectiveCodingContext ?? null
|
|
9039
|
+
effectiveCodingContext: effectiveCodingContext ?? null,
|
|
9040
|
+
sourceConnector: request.sourceConnector
|
|
9029
9041
|
},
|
|
9030
9042
|
beforeExecute: hooks?.enforceWriteQuota,
|
|
9031
9043
|
execute: () => this.runObserve(request)
|
|
@@ -10426,9 +10438,7 @@ var AccessObserveWriteSurface = class {
|
|
|
10426
10438
|
if (rawFocus.length > 0) {
|
|
10427
10439
|
focus = parseBriefingFocus(rawFocus);
|
|
10428
10440
|
if (!focus) {
|
|
10429
|
-
throw new EngramAccessInputError(
|
|
10430
|
-
`invalid briefing focus filter: ${request.focus}`
|
|
10431
|
-
);
|
|
10441
|
+
throw new EngramAccessInputError(`invalid briefing focus filter: ${request.focus}`);
|
|
10432
10442
|
}
|
|
10433
10443
|
}
|
|
10434
10444
|
const SUPPORTED_FORMATS = ["markdown", "json"];
|
|
@@ -10518,7 +10528,8 @@ var AccessObserveWriteSurface = class {
|
|
|
10518
10528
|
tags: request.tags,
|
|
10519
10529
|
entityRef: request.entityRef,
|
|
10520
10530
|
ttl: request.ttl,
|
|
10521
|
-
sourceReason: request.sourceReason
|
|
10531
|
+
sourceReason: request.sourceReason,
|
|
10532
|
+
sourceConnector: request.sourceConnector
|
|
10522
10533
|
},
|
|
10523
10534
|
skip: request.dryRun === true,
|
|
10524
10535
|
beforeExecute: hooks?.enforceWriteQuota,
|
|
@@ -10581,7 +10592,8 @@ var AccessObserveWriteSurface = class {
|
|
|
10581
10592
|
tags: request.tags,
|
|
10582
10593
|
entityRef: request.entityRef,
|
|
10583
10594
|
ttl: request.ttl,
|
|
10584
|
-
sourceReason: request.sourceReason
|
|
10595
|
+
sourceReason: request.sourceReason,
|
|
10596
|
+
sourceConnector: request.sourceConnector
|
|
10585
10597
|
},
|
|
10586
10598
|
skip: request.dryRun === true,
|
|
10587
10599
|
beforeExecute: hooks?.enforceWriteQuota,
|
|
@@ -10611,11 +10623,7 @@ var AccessObserveWriteSurface = class {
|
|
|
10611
10623
|
cwd: request.cwd,
|
|
10612
10624
|
projectTag: request.projectTag
|
|
10613
10625
|
});
|
|
10614
|
-
const lcmSessionKey = lcmSessionKeyForNamespace(
|
|
10615
|
-
writeNamespace,
|
|
10616
|
-
request.sessionKey,
|
|
10617
|
-
this.deps.orchestrator.config.defaultNamespace
|
|
10618
|
-
) ?? request.sessionKey;
|
|
10626
|
+
const lcmSessionKey = lcmSessionKeyForNamespace(writeNamespace, request.sessionKey, this.deps.orchestrator.config.defaultNamespace) ?? request.sessionKey;
|
|
10619
10627
|
if (shouldWriteObjectiveState) {
|
|
10620
10628
|
try {
|
|
10621
10629
|
const objectiveStateLocation = await this.deps.objectiveStateStoreLocationForNamespace(
|
|
@@ -10662,7 +10670,8 @@ var AccessObserveWriteSurface = class {
|
|
|
10662
10670
|
parts: m.parts,
|
|
10663
10671
|
rawContent: m.rawContent,
|
|
10664
10672
|
sourceFormat: m.sourceFormat,
|
|
10665
|
-
timestamp: (/* @__PURE__ */ new Date()).toISOString()
|
|
10673
|
+
timestamp: (/* @__PURE__ */ new Date()).toISOString(),
|
|
10674
|
+
...request.sourceConnector ? { sourceConnector: request.sourceConnector } : {}
|
|
10666
10675
|
}));
|
|
10667
10676
|
const writeNamespaceOverride = resolveNamespaceCapabilities(this.deps.orchestrator.config).namespaces === true ? writeNamespace : void 0;
|
|
10668
10677
|
const principalOverride = typeof scope.principal === "string" && scope.principal.length > 0 ? scope.principal : void 0;
|
|
@@ -10830,7 +10839,8 @@ var AccessObserveWriteSurface = class {
|
|
|
10830
10839
|
return { action, snapshot };
|
|
10831
10840
|
}
|
|
10832
10841
|
if (action === "import_snapshot") {
|
|
10833
|
-
if (!request.snapshotJson?.trim())
|
|
10842
|
+
if (!request.snapshotJson?.trim())
|
|
10843
|
+
throw new EngramAccessInputError("snapshotJson is required for import_snapshot");
|
|
10834
10844
|
const snapshot = JSON.parse(request.snapshotJson);
|
|
10835
10845
|
const result = await importWorkBoardSnapshot({ memoryDir, snapshot, projectId });
|
|
10836
10846
|
return { action, result };
|
|
@@ -10848,9 +10858,7 @@ var AccessObserveWriteSurface = class {
|
|
|
10848
10858
|
"link_graph"
|
|
10849
10859
|
]);
|
|
10850
10860
|
if (!actionTypes.has(request.action)) {
|
|
10851
|
-
throw new EngramAccessInputError(
|
|
10852
|
-
`memory_action_apply: invalid action ${JSON.stringify(request.action)}`
|
|
10853
|
-
);
|
|
10861
|
+
throw new EngramAccessInputError(`memory_action_apply: invalid action ${JSON.stringify(request.action)}`);
|
|
10854
10862
|
}
|
|
10855
10863
|
if (resolveCompressionCapabilities(this.deps.orchestrator.config).contextCompressionActions !== true) {
|
|
10856
10864
|
throw new EngramAccessInputError(
|
|
@@ -10863,11 +10871,7 @@ var AccessObserveWriteSurface = class {
|
|
|
10863
10871
|
`memory_action_apply: outcome must be "applied", "skipped", or "failed"; got ${JSON.stringify(outcome)}`
|
|
10864
10872
|
);
|
|
10865
10873
|
}
|
|
10866
|
-
const resolvedNs = this.deps.writableNamespaceFor(
|
|
10867
|
-
request.namespace,
|
|
10868
|
-
request.sessionKey,
|
|
10869
|
-
request.principal
|
|
10870
|
-
);
|
|
10874
|
+
const resolvedNs = this.deps.writableNamespaceFor(request.namespace, request.sessionKey, request.principal);
|
|
10871
10875
|
const inputSummaryParts = [
|
|
10872
10876
|
request.content,
|
|
10873
10877
|
request.category ? `category=${request.category}` : void 0,
|
|
@@ -10924,4 +10928,4 @@ export {
|
|
|
10924
10928
|
EngramAccessService,
|
|
10925
10929
|
AccessAdminOpsSurface
|
|
10926
10930
|
};
|
|
10927
|
-
//# sourceMappingURL=chunk-
|
|
10931
|
+
//# sourceMappingURL=chunk-VRJG3HIZ.js.map
|