@cleocode/core 2026.3.45 → 2026.3.46

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.
Files changed (137) hide show
  1. package/dist/bootstrap.d.ts.map +1 -1
  2. package/dist/index.js +1475 -372
  3. package/dist/index.js.map +4 -4
  4. package/dist/init.d.ts.map +1 -1
  5. package/dist/injection.d.ts +1 -1
  6. package/dist/injection.d.ts.map +1 -1
  7. package/dist/routing/capability-matrix.d.ts +6 -4
  8. package/dist/routing/capability-matrix.d.ts.map +1 -1
  9. package/dist/scaffold.d.ts +16 -9
  10. package/dist/scaffold.d.ts.map +1 -1
  11. package/dist/skills/agents/install.d.ts.map +1 -1
  12. package/dist/skills/routing-table.d.ts +17 -16
  13. package/dist/skills/routing-table.d.ts.map +1 -1
  14. package/dist/skills/skill-paths.d.ts.map +1 -1
  15. package/dist/system/health.d.ts.map +1 -1
  16. package/dist/ui/index.d.ts +0 -1
  17. package/dist/ui/index.d.ts.map +1 -1
  18. package/package.json +9 -4
  19. package/schemas/adr-frontmatter.schema.json +72 -0
  20. package/schemas/agent-configs.schema.json +120 -0
  21. package/schemas/agent-registry.json +243 -0
  22. package/schemas/agent-registry.schema.json +132 -0
  23. package/schemas/archive/research-manifest.schema.json +257 -0
  24. package/schemas/archive.schema.json +450 -0
  25. package/schemas/brain-decision.schema.json +69 -0
  26. package/schemas/brain-learning.schema.json +57 -0
  27. package/schemas/brain-pattern.schema.json +72 -0
  28. package/schemas/config.schema.json +2606 -0
  29. package/schemas/context-state.schema.json +137 -0
  30. package/schemas/contribution.schema.json +722 -0
  31. package/schemas/critical-path.schema.json +246 -0
  32. package/schemas/deps-cache.schema.json +97 -0
  33. package/schemas/doctor-output.schema.json +283 -0
  34. package/schemas/error.schema.json +161 -0
  35. package/schemas/export-package.schema.json +375 -0
  36. package/schemas/global-config.schema.json +219 -0
  37. package/schemas/grade.schema.json +49 -0
  38. package/schemas/log.schema.json +250 -0
  39. package/schemas/metrics.schema.json +328 -0
  40. package/schemas/migrations.schema.json +150 -0
  41. package/schemas/nexus-registry.schema.json +90 -0
  42. package/schemas/operation-constitution.schema.json +438 -0
  43. package/schemas/output.schema.json +164 -0
  44. package/schemas/project-context.schema.json +164 -0
  45. package/schemas/project-info.schema.json +180 -0
  46. package/schemas/projects-registry.schema.json +107 -0
  47. package/schemas/protocol-frontmatter.schema.json +72 -0
  48. package/schemas/rcasd-consensus-report.schema.json +10 -0
  49. package/schemas/rcasd-evidence.schema.json +42 -0
  50. package/schemas/rcasd-gate-result.schema.json +46 -0
  51. package/schemas/rcasd-hitl-resolution.schema.json +10 -0
  52. package/schemas/rcasd-index.schema.json +10 -0
  53. package/schemas/rcasd-manifest.schema.json +10 -0
  54. package/schemas/rcasd-research-output.schema.json +10 -0
  55. package/schemas/rcasd-spec-frontmatter.schema.json +10 -0
  56. package/schemas/rcasd-stage-transition.schema.json +38 -0
  57. package/schemas/releases.schema.json +267 -0
  58. package/schemas/skills-manifest.schema.json +91 -0
  59. package/schemas/skillsmp.schema.json +208 -0
  60. package/schemas/spec-index.schema.json +196 -0
  61. package/schemas/system-flow-atlas.schema.json +125 -0
  62. package/src/__tests__/injection-chain.test.ts +11 -10
  63. package/src/__tests__/injection-mvi-tiers.test.ts +4 -2
  64. package/src/agents/__tests__/capacity.test.d.ts +7 -0
  65. package/src/agents/__tests__/capacity.test.d.ts.map +1 -0
  66. package/src/agents/__tests__/capacity.test.js +173 -0
  67. package/src/agents/__tests__/capacity.test.js.map +1 -0
  68. package/src/agents/__tests__/registry.test.d.ts +8 -0
  69. package/src/agents/__tests__/registry.test.d.ts.map +1 -0
  70. package/src/agents/__tests__/registry.test.js +348 -0
  71. package/src/agents/__tests__/registry.test.js.map +1 -0
  72. package/src/agents/__tests__/retry.test.d.ts +7 -0
  73. package/src/agents/__tests__/retry.test.d.ts.map +1 -0
  74. package/src/agents/__tests__/retry.test.js +225 -0
  75. package/src/agents/__tests__/retry.test.js.map +1 -0
  76. package/src/bootstrap.ts +3 -1
  77. package/src/init.ts +63 -18
  78. package/src/injection.ts +11 -5
  79. package/src/intelligence/__tests__/impact.test.d.ts +15 -0
  80. package/src/intelligence/__tests__/impact.test.d.ts.map +1 -0
  81. package/src/intelligence/__tests__/impact.test.js +384 -0
  82. package/src/intelligence/__tests__/impact.test.js.map +1 -0
  83. package/src/intelligence/__tests__/patterns.test.d.ts +8 -0
  84. package/src/intelligence/__tests__/patterns.test.d.ts.map +1 -0
  85. package/src/intelligence/__tests__/patterns.test.js +370 -0
  86. package/src/intelligence/__tests__/patterns.test.js.map +1 -0
  87. package/src/intelligence/__tests__/prediction.test.d.ts +8 -0
  88. package/src/intelligence/__tests__/prediction.test.d.ts.map +1 -0
  89. package/src/intelligence/__tests__/prediction.test.js +314 -0
  90. package/src/intelligence/__tests__/prediction.test.js.map +1 -0
  91. package/src/nexus/__tests__/nexus-e2e.test.d.ts +12 -0
  92. package/src/nexus/__tests__/nexus-e2e.test.d.ts.map +1 -0
  93. package/src/nexus/__tests__/nexus-e2e.test.js +1220 -0
  94. package/src/nexus/__tests__/nexus-e2e.test.js.map +1 -0
  95. package/src/nexus/__tests__/transfer.test.d.ts +8 -0
  96. package/src/nexus/__tests__/transfer.test.d.ts.map +1 -0
  97. package/src/nexus/__tests__/transfer.test.js +372 -0
  98. package/src/nexus/__tests__/transfer.test.js.map +1 -0
  99. package/src/nexus/__tests__/transfer.test.ts +1 -1
  100. package/src/routing/capability-matrix.ts +1435 -205
  101. package/src/scaffold.ts +18 -11
  102. package/src/skills/__tests__/routing-table.test.ts +53 -33
  103. package/src/skills/agents/install.ts +9 -1
  104. package/src/skills/routing-table.ts +39 -253
  105. package/src/skills/skill-paths.ts +3 -2
  106. package/src/store/__tests__/project-detect.test.ts +1 -1
  107. package/src/system/health.ts +18 -7
  108. package/src/ui/index.ts +0 -6
  109. package/src/validation/operation-gate-validators.ts +2 -2
  110. package/templates/CLEO-INJECTION.md +120 -0
  111. package/templates/README.md +29 -0
  112. package/templates/agent-registry.json +305 -0
  113. package/templates/cleo-gitignore +74 -0
  114. package/templates/config.template.json +187 -0
  115. package/templates/git-hooks/commit-msg +149 -0
  116. package/templates/git-hooks/pre-commit +40 -0
  117. package/templates/git-hooks/pre-push +79 -0
  118. package/templates/github/ISSUE_TEMPLATE/bug_report.yml +143 -0
  119. package/templates/github/ISSUE_TEMPLATE/config.yml +8 -0
  120. package/templates/github/ISSUE_TEMPLATE/feature_request.yml +125 -0
  121. package/templates/github/ISSUE_TEMPLATE/help_question.yml +99 -0
  122. package/templates/global-config.template.json +56 -0
  123. package/templates/hooks/precompact-safestop.sh +89 -0
  124. package/templates/issue-templates/bug_report.yml +143 -0
  125. package/templates/issue-templates/config.yml +8 -0
  126. package/templates/issue-templates/feature_request.yml +125 -0
  127. package/templates/issue-templates/help_question.yml +99 -0
  128. package/templates/skillsmp.json.example +28 -0
  129. package/templates/skillsmp.json.example.md +214 -0
  130. package/dist/ui/injection-legacy.d.ts +0 -26
  131. package/dist/ui/injection-legacy.d.ts.map +0 -1
  132. package/src/ui/__tests__/injection-registry.test.d.ts +0 -11
  133. package/src/ui/__tests__/injection-registry.test.d.ts.map +0 -1
  134. package/src/ui/__tests__/injection-registry.test.js +0 -46
  135. package/src/ui/__tests__/injection-registry.test.js.map +0 -1
  136. package/src/ui/__tests__/injection-registry.test.ts +0 -57
  137. package/src/ui/injection-legacy.ts +0 -44
package/dist/index.js CHANGED
@@ -18472,16 +18472,6 @@ var init_json_schema_validator = __esm({
18472
18472
  });
18473
18473
 
18474
18474
  // packages/core/src/schema-management.ts
18475
- var schema_management_exports = {};
18476
- __export(schema_management_exports, {
18477
- checkGlobalSchemas: () => checkGlobalSchemas,
18478
- checkSchemaStaleness: () => checkSchemaStaleness,
18479
- cleanProjectSchemas: () => cleanProjectSchemas,
18480
- ensureGlobalSchemas: () => ensureGlobalSchemas,
18481
- getSchemaVersion: () => getSchemaVersion2,
18482
- listInstalledSchemas: () => listInstalledSchemas,
18483
- resolveSchemaPath: () => resolveSchemaPath
18484
- });
18485
18475
  import {
18486
18476
  copyFileSync as copyFileSync4,
18487
18477
  existsSync as existsSync30,
@@ -18607,70 +18597,6 @@ function checkGlobalSchemas() {
18607
18597
  stale
18608
18598
  };
18609
18599
  }
18610
- function checkSchemaStaleness() {
18611
- const globalDir = getCleoSchemasDir();
18612
- const bundledFiles = listBundledSchemas();
18613
- const stale = [];
18614
- const current = [];
18615
- const missing = [];
18616
- const packageRoot = getPackageRoot();
18617
- const bundledDir = join34(packageRoot, "schemas");
18618
- for (const file2 of bundledFiles) {
18619
- const globalPath = join34(globalDir, file2);
18620
- if (!existsSync30(globalPath)) {
18621
- missing.push(file2);
18622
- continue;
18623
- }
18624
- const bundledVersion = readVersionFromPath(join34(bundledDir, file2));
18625
- const globalVersion = readVersionFromPath(globalPath);
18626
- if (bundledVersion !== null && bundledVersion !== globalVersion) {
18627
- stale.push(file2);
18628
- } else {
18629
- current.push(file2);
18630
- }
18631
- }
18632
- return { stale, current, missing };
18633
- }
18634
- function listInstalledSchemas() {
18635
- const globalDir = getCleoSchemasDir();
18636
- if (!existsSync30(globalDir)) return [];
18637
- let files;
18638
- try {
18639
- files = readdirSync16(globalDir).filter((f) => f.endsWith(".schema.json"));
18640
- } catch {
18641
- return [];
18642
- }
18643
- return files.map((name2) => {
18644
- const fullPath = join34(globalDir, name2);
18645
- return {
18646
- name: name2,
18647
- path: fullPath,
18648
- version: readVersionFromPath(fullPath)
18649
- };
18650
- });
18651
- }
18652
- async function cleanProjectSchemas(projectRoot) {
18653
- const projectSchemasDir = join34(projectRoot, ".cleo", "schemas");
18654
- if (!existsSync30(projectSchemasDir)) {
18655
- return { cleaned: false };
18656
- }
18657
- try {
18658
- const stat2 = statSync7(projectSchemasDir);
18659
- if (!stat2.isDirectory()) {
18660
- return { cleaned: false };
18661
- }
18662
- } catch {
18663
- return { cleaned: false };
18664
- }
18665
- const timestamp2 = (/* @__PURE__ */ new Date()).toISOString().replace(/[:.]/g, "-").slice(0, 19);
18666
- const backupDir = join34(projectRoot, ".cleo", "backups", "schemas");
18667
- const backupTarget = join34(backupDir, `schemas-${timestamp2}`);
18668
- if (!existsSync30(backupDir)) {
18669
- mkdirSync8(backupDir, { recursive: true });
18670
- }
18671
- renameSync3(projectSchemasDir, backupTarget);
18672
- return { cleaned: true };
18673
- }
18674
18600
  var init_schema_management = __esm({
18675
18601
  "packages/core/src/schema-management.ts"() {
18676
18602
  "use strict";
@@ -18876,7 +18802,7 @@ async function ensureInjection(projectRoot) {
18876
18802
  }
18877
18803
  }
18878
18804
  const agentsMdPath = join36(projectRoot, "AGENTS.md");
18879
- const agentsMdLines = ["@~/.cleo/templates/CLEO-INJECTION.md"];
18805
+ const agentsMdLines = ["@~/.agents/AGENTS.md"];
18880
18806
  const projectContextPath = join36(projectRoot, ".cleo", "project-context.json");
18881
18807
  if (existsSync32(projectContextPath)) {
18882
18808
  agentsMdLines.push("@.cleo/project-context.json");
@@ -18889,7 +18815,8 @@ async function ensureInjection(projectRoot) {
18889
18815
  if (contributorBlock) {
18890
18816
  agentsMdLines.push(contributorBlock);
18891
18817
  }
18892
- const agentsAction = await inject2(agentsMdPath, agentsMdLines.join("\n"));
18818
+ const agentsMdContent = agentsMdLines.join("\n");
18819
+ const agentsAction = await inject2(agentsMdPath, agentsMdContent);
18893
18820
  actions.push(`AGENTS.md CLEO content (${agentsAction})`);
18894
18821
  const content = getInjectionTemplateContent();
18895
18822
  if (content) {
@@ -18904,8 +18831,9 @@ async function ensureInjection(projectRoot) {
18904
18831
  try {
18905
18832
  const globalAgentsDir = getAgentsHome();
18906
18833
  const globalAgentsMd = join36(globalAgentsDir, "AGENTS.md");
18834
+ const globalHubContent = "@~/.cleo/templates/CLEO-INJECTION.md";
18907
18835
  await mkdir4(globalAgentsDir, { recursive: true });
18908
- await inject2(globalAgentsMd, "@~/.cleo/templates/CLEO-INJECTION.md");
18836
+ await inject2(globalAgentsMd, globalHubContent);
18909
18837
  } catch {
18910
18838
  }
18911
18839
  return {
@@ -19413,7 +19341,7 @@ async function ensureProjectContext(projectRoot, opts) {
19413
19341
  try {
19414
19342
  const schemaPath = join37(
19415
19343
  dirname8(fileURLToPath4(import.meta.url)),
19416
- "../../schemas/project-context.schema.json"
19344
+ "../schemas/project-context.schema.json"
19417
19345
  );
19418
19346
  if (existsSync33(schemaPath)) {
19419
19347
  const AjvModule = await import("ajv");
@@ -19854,11 +19782,9 @@ async function ensureGlobalTemplates() {
19854
19782
  return { action: "created", path: injectionPath };
19855
19783
  }
19856
19784
  async function ensureGlobalScaffold() {
19857
- const { ensureGlobalSchemas: ensureGlobalSchemas2 } = await Promise.resolve().then(() => (init_schema_management(), schema_management_exports));
19858
19785
  const home = await ensureGlobalHome();
19859
- const schemas = ensureGlobalSchemas2();
19860
19786
  const templates = await ensureGlobalTemplates();
19861
- return { home, schemas, templates };
19787
+ return { home, templates };
19862
19788
  }
19863
19789
  function checkGlobalHome() {
19864
19790
  const cleoHome = getCleoHome();
@@ -19992,7 +19918,7 @@ metrics/
19992
19918
  .backups/
19993
19919
  backups/
19994
19920
  `;
19995
- REQUIRED_GLOBAL_SUBDIRS = ["schemas", "templates"];
19921
+ REQUIRED_GLOBAL_SUBDIRS = ["logs", "templates"];
19996
19922
  }
19997
19923
  });
19998
19924
 
@@ -47551,8 +47477,8 @@ var PLATFORM_PATHS = {
47551
47477
  "gitlab-ci": ".gitlab-ci.yml",
47552
47478
  circleci: ".circleci/config.yml"
47553
47479
  };
47554
- function getPlatformPath(platform3) {
47555
- return PLATFORM_PATHS[platform3];
47480
+ function getPlatformPath(platform5) {
47481
+ return PLATFORM_PATHS[platform5];
47556
47482
  }
47557
47483
  function detectCIPlatform(projectDir) {
47558
47484
  const dir = projectDir ?? process.cwd();
@@ -47646,10 +47572,10 @@ workflows:
47646
47572
  only: /^v.*/
47647
47573
  `;
47648
47574
  }
47649
- function generateCIConfig(platform3, cwd) {
47575
+ function generateCIConfig(platform5, cwd) {
47650
47576
  const releaseConfig = loadReleaseConfig(cwd);
47651
47577
  const gates = releaseConfig.gates.map((g) => ({ name: g.name, command: g.command }));
47652
- switch (platform3) {
47578
+ switch (platform5) {
47653
47579
  case "github-actions":
47654
47580
  return generateGitHubActions({ gates });
47655
47581
  case "gitlab-ci":
@@ -47658,10 +47584,10 @@ function generateCIConfig(platform3, cwd) {
47658
47584
  return generateCircleCI({ gates });
47659
47585
  }
47660
47586
  }
47661
- function writeCIConfig(platform3, options = {}) {
47587
+ function writeCIConfig(platform5, options = {}) {
47662
47588
  const projectDir = options.projectDir ?? process.cwd();
47663
- const outputPath = join63(projectDir, getPlatformPath(platform3));
47664
- const content = generateCIConfig(platform3, projectDir);
47589
+ const outputPath = join63(projectDir, getPlatformPath(platform5));
47590
+ const content = generateCIConfig(platform5, projectDir);
47665
47591
  if (options.dryRun) {
47666
47592
  return { action: "would_write", path: outputPath, content };
47667
47593
  }
@@ -47669,9 +47595,9 @@ function writeCIConfig(platform3, options = {}) {
47669
47595
  writeFileSync6(outputPath, content, "utf-8");
47670
47596
  return { action: "wrote", path: outputPath, content };
47671
47597
  }
47672
- function validateCIConfig(platform3, projectDir) {
47598
+ function validateCIConfig(platform5, projectDir) {
47673
47599
  const dir = projectDir ?? process.cwd();
47674
- const configPath = join63(dir, getPlatformPath(platform3));
47600
+ const configPath = join63(dir, getPlatformPath(platform5));
47675
47601
  if (!existsSync59(configPath)) {
47676
47602
  return { valid: false, exists: false, errors: ["Config file not found"] };
47677
47603
  }
@@ -49213,239 +49139,1463 @@ __export(routing_exports, {
49213
49139
  var CAPABILITY_MATRIX = [
49214
49140
  // === Tasks Domain ===
49215
49141
  // Query operations
49216
- { domain: "tasks", operation: "show", gateway: "query", mode: "native" },
49217
- { domain: "tasks", operation: "list", gateway: "query", mode: "native" },
49218
- { domain: "tasks", operation: "find", gateway: "query", mode: "native" },
49219
- { domain: "tasks", operation: "tree", gateway: "query", mode: "native" },
49220
- { domain: "tasks", operation: "blockers", gateway: "query", mode: "native" },
49221
- { domain: "tasks", operation: "depends", gateway: "query", mode: "native" },
49222
- { domain: "tasks", operation: "analyze", gateway: "query", mode: "native" },
49223
- { domain: "tasks", operation: "next", gateway: "query", mode: "native" },
49224
- { domain: "tasks", operation: "plan", gateway: "query", mode: "native" },
49225
- { domain: "tasks", operation: "relates", gateway: "query", mode: "native" },
49226
- { domain: "tasks", operation: "complexity.estimate", gateway: "query", mode: "native" },
49227
- { domain: "tasks", operation: "history", gateway: "query", mode: "native" },
49228
- { domain: "tasks", operation: "current", gateway: "query", mode: "native" },
49229
- { domain: "tasks", operation: "label.list", gateway: "query", mode: "native" },
49142
+ { domain: "tasks", operation: "show", gateway: "query", mode: "native", preferredChannel: "mcp" },
49143
+ { domain: "tasks", operation: "list", gateway: "query", mode: "native", preferredChannel: "mcp" },
49144
+ { domain: "tasks", operation: "find", gateway: "query", mode: "native", preferredChannel: "mcp" },
49145
+ {
49146
+ domain: "tasks",
49147
+ operation: "tree",
49148
+ gateway: "query",
49149
+ mode: "native",
49150
+ preferredChannel: "either"
49151
+ },
49152
+ {
49153
+ domain: "tasks",
49154
+ operation: "blockers",
49155
+ gateway: "query",
49156
+ mode: "native",
49157
+ preferredChannel: "either"
49158
+ },
49159
+ {
49160
+ domain: "tasks",
49161
+ operation: "depends",
49162
+ gateway: "query",
49163
+ mode: "native",
49164
+ preferredChannel: "either"
49165
+ },
49166
+ {
49167
+ domain: "tasks",
49168
+ operation: "analyze",
49169
+ gateway: "query",
49170
+ mode: "native",
49171
+ preferredChannel: "either"
49172
+ },
49173
+ { domain: "tasks", operation: "next", gateway: "query", mode: "native", preferredChannel: "mcp" },
49174
+ { domain: "tasks", operation: "plan", gateway: "query", mode: "native", preferredChannel: "mcp" },
49175
+ {
49176
+ domain: "tasks",
49177
+ operation: "relates",
49178
+ gateway: "query",
49179
+ mode: "native",
49180
+ preferredChannel: "either"
49181
+ },
49182
+ {
49183
+ domain: "tasks",
49184
+ operation: "complexity.estimate",
49185
+ gateway: "query",
49186
+ mode: "native",
49187
+ preferredChannel: "either"
49188
+ },
49189
+ {
49190
+ domain: "tasks",
49191
+ operation: "history",
49192
+ gateway: "query",
49193
+ mode: "native",
49194
+ preferredChannel: "either"
49195
+ },
49196
+ {
49197
+ domain: "tasks",
49198
+ operation: "current",
49199
+ gateway: "query",
49200
+ mode: "native",
49201
+ preferredChannel: "mcp"
49202
+ },
49203
+ {
49204
+ domain: "tasks",
49205
+ operation: "label.list",
49206
+ gateway: "query",
49207
+ mode: "native",
49208
+ preferredChannel: "either"
49209
+ },
49230
49210
  // Mutate operations
49231
- { domain: "tasks", operation: "add", gateway: "mutate", mode: "native" },
49232
- { domain: "tasks", operation: "update", gateway: "mutate", mode: "native" },
49233
- { domain: "tasks", operation: "complete", gateway: "mutate", mode: "native" },
49234
- { domain: "tasks", operation: "cancel", gateway: "mutate", mode: "native" },
49235
- { domain: "tasks", operation: "delete", gateway: "mutate", mode: "native" },
49236
- { domain: "tasks", operation: "archive", gateway: "mutate", mode: "native" },
49237
- { domain: "tasks", operation: "restore", gateway: "mutate", mode: "native" },
49238
- { domain: "tasks", operation: "reparent", gateway: "mutate", mode: "native" },
49239
- { domain: "tasks", operation: "reorder", gateway: "mutate", mode: "native" },
49240
- { domain: "tasks", operation: "relates.add", gateway: "mutate", mode: "native" },
49241
- { domain: "tasks", operation: "start", gateway: "mutate", mode: "native" },
49242
- { domain: "tasks", operation: "stop", gateway: "mutate", mode: "native" },
49211
+ { domain: "tasks", operation: "add", gateway: "mutate", mode: "native", preferredChannel: "mcp" },
49212
+ {
49213
+ domain: "tasks",
49214
+ operation: "update",
49215
+ gateway: "mutate",
49216
+ mode: "native",
49217
+ preferredChannel: "mcp"
49218
+ },
49219
+ {
49220
+ domain: "tasks",
49221
+ operation: "complete",
49222
+ gateway: "mutate",
49223
+ mode: "native",
49224
+ preferredChannel: "mcp"
49225
+ },
49226
+ {
49227
+ domain: "tasks",
49228
+ operation: "cancel",
49229
+ gateway: "mutate",
49230
+ mode: "native",
49231
+ preferredChannel: "either"
49232
+ },
49233
+ {
49234
+ domain: "tasks",
49235
+ operation: "delete",
49236
+ gateway: "mutate",
49237
+ mode: "native",
49238
+ preferredChannel: "either"
49239
+ },
49240
+ {
49241
+ domain: "tasks",
49242
+ operation: "archive",
49243
+ gateway: "mutate",
49244
+ mode: "native",
49245
+ preferredChannel: "either"
49246
+ },
49247
+ {
49248
+ domain: "tasks",
49249
+ operation: "restore",
49250
+ gateway: "mutate",
49251
+ mode: "native",
49252
+ preferredChannel: "either"
49253
+ },
49254
+ {
49255
+ domain: "tasks",
49256
+ operation: "reparent",
49257
+ gateway: "mutate",
49258
+ mode: "native",
49259
+ preferredChannel: "either"
49260
+ },
49261
+ {
49262
+ domain: "tasks",
49263
+ operation: "reorder",
49264
+ gateway: "mutate",
49265
+ mode: "native",
49266
+ preferredChannel: "either"
49267
+ },
49268
+ {
49269
+ domain: "tasks",
49270
+ operation: "relates.add",
49271
+ gateway: "mutate",
49272
+ mode: "native",
49273
+ preferredChannel: "either"
49274
+ },
49275
+ {
49276
+ domain: "tasks",
49277
+ operation: "start",
49278
+ gateway: "mutate",
49279
+ mode: "native",
49280
+ preferredChannel: "mcp"
49281
+ },
49282
+ {
49283
+ domain: "tasks",
49284
+ operation: "stop",
49285
+ gateway: "mutate",
49286
+ mode: "native",
49287
+ preferredChannel: "mcp"
49288
+ },
49243
49289
  // Sync sub-domain (provider-agnostic task reconciliation)
49244
- { domain: "tasks", operation: "sync.reconcile", gateway: "mutate", mode: "native" },
49245
- { domain: "tasks", operation: "sync.links", gateway: "query", mode: "native" },
49246
- { domain: "tasks", operation: "sync.links.remove", gateway: "mutate", mode: "native" },
49290
+ {
49291
+ domain: "tasks",
49292
+ operation: "sync.reconcile",
49293
+ gateway: "mutate",
49294
+ mode: "native",
49295
+ preferredChannel: "either"
49296
+ },
49297
+ {
49298
+ domain: "tasks",
49299
+ operation: "sync.links",
49300
+ gateway: "query",
49301
+ mode: "native",
49302
+ preferredChannel: "either"
49303
+ },
49304
+ {
49305
+ domain: "tasks",
49306
+ operation: "sync.links.remove",
49307
+ gateway: "mutate",
49308
+ mode: "native",
49309
+ preferredChannel: "either"
49310
+ },
49247
49311
  // === Session Domain ===
49248
49312
  // Query operations
49249
- { domain: "session", operation: "status", gateway: "query", mode: "native" },
49250
- { domain: "session", operation: "list", gateway: "query", mode: "native" },
49251
- { domain: "session", operation: "show", gateway: "query", mode: "native" },
49252
- { domain: "session", operation: "decision.log", gateway: "query", mode: "native" },
49253
- { domain: "session", operation: "context.drift", gateway: "query", mode: "native" },
49254
- { domain: "session", operation: "handoff.show", gateway: "query", mode: "native" },
49255
- { domain: "session", operation: "briefing.show", gateway: "query", mode: "native" },
49256
- { domain: "session", operation: "find", gateway: "query", mode: "native" },
49313
+ {
49314
+ domain: "session",
49315
+ operation: "status",
49316
+ gateway: "query",
49317
+ mode: "native",
49318
+ preferredChannel: "mcp"
49319
+ },
49320
+ {
49321
+ domain: "session",
49322
+ operation: "list",
49323
+ gateway: "query",
49324
+ mode: "native",
49325
+ preferredChannel: "either"
49326
+ },
49327
+ {
49328
+ domain: "session",
49329
+ operation: "show",
49330
+ gateway: "query",
49331
+ mode: "native",
49332
+ preferredChannel: "either"
49333
+ },
49334
+ {
49335
+ domain: "session",
49336
+ operation: "decision.log",
49337
+ gateway: "query",
49338
+ mode: "native",
49339
+ preferredChannel: "either"
49340
+ },
49341
+ {
49342
+ domain: "session",
49343
+ operation: "context.drift",
49344
+ gateway: "query",
49345
+ mode: "native",
49346
+ preferredChannel: "either"
49347
+ },
49348
+ {
49349
+ domain: "session",
49350
+ operation: "handoff.show",
49351
+ gateway: "query",
49352
+ mode: "native",
49353
+ preferredChannel: "mcp"
49354
+ },
49355
+ {
49356
+ domain: "session",
49357
+ operation: "briefing.show",
49358
+ gateway: "query",
49359
+ mode: "native",
49360
+ preferredChannel: "mcp"
49361
+ },
49362
+ {
49363
+ domain: "session",
49364
+ operation: "find",
49365
+ gateway: "query",
49366
+ mode: "native",
49367
+ preferredChannel: "either"
49368
+ },
49257
49369
  // Mutate operations
49258
- { domain: "session", operation: "start", gateway: "mutate", mode: "native" },
49259
- { domain: "session", operation: "end", gateway: "mutate", mode: "native" },
49260
- { domain: "session", operation: "resume", gateway: "mutate", mode: "native" },
49261
- { domain: "session", operation: "suspend", gateway: "mutate", mode: "native" },
49262
- { domain: "session", operation: "gc", gateway: "mutate", mode: "native" },
49263
- { domain: "session", operation: "record.decision", gateway: "mutate", mode: "native" },
49264
- { domain: "session", operation: "record.assumption", gateway: "mutate", mode: "native" },
49370
+ {
49371
+ domain: "session",
49372
+ operation: "start",
49373
+ gateway: "mutate",
49374
+ mode: "native",
49375
+ preferredChannel: "mcp"
49376
+ },
49377
+ {
49378
+ domain: "session",
49379
+ operation: "end",
49380
+ gateway: "mutate",
49381
+ mode: "native",
49382
+ preferredChannel: "mcp"
49383
+ },
49384
+ {
49385
+ domain: "session",
49386
+ operation: "resume",
49387
+ gateway: "mutate",
49388
+ mode: "native",
49389
+ preferredChannel: "either"
49390
+ },
49391
+ {
49392
+ domain: "session",
49393
+ operation: "suspend",
49394
+ gateway: "mutate",
49395
+ mode: "native",
49396
+ preferredChannel: "either"
49397
+ },
49398
+ {
49399
+ domain: "session",
49400
+ operation: "gc",
49401
+ gateway: "mutate",
49402
+ mode: "native",
49403
+ preferredChannel: "either"
49404
+ },
49405
+ {
49406
+ domain: "session",
49407
+ operation: "record.decision",
49408
+ gateway: "mutate",
49409
+ mode: "native",
49410
+ preferredChannel: "either"
49411
+ },
49412
+ {
49413
+ domain: "session",
49414
+ operation: "record.assumption",
49415
+ gateway: "mutate",
49416
+ mode: "native",
49417
+ preferredChannel: "either"
49418
+ },
49265
49419
  // === Admin Domain ===
49266
49420
  // Query operations
49267
- { domain: "admin", operation: "version", gateway: "query", mode: "native" },
49268
- { domain: "admin", operation: "health", gateway: "query", mode: "native" },
49269
- { domain: "admin", operation: "config.show", gateway: "query", mode: "native" },
49270
- { domain: "admin", operation: "stats", gateway: "query", mode: "native" },
49271
- { domain: "admin", operation: "context", gateway: "query", mode: "native" },
49272
- { domain: "admin", operation: "runtime", gateway: "query", mode: "native" },
49273
- { domain: "admin", operation: "job", gateway: "query", mode: "native" },
49274
- { domain: "admin", operation: "dash", gateway: "query", mode: "native" },
49275
- { domain: "admin", operation: "log", gateway: "query", mode: "native" },
49276
- { domain: "admin", operation: "sequence", gateway: "query", mode: "native" },
49277
- { domain: "admin", operation: "help", gateway: "query", mode: "native" },
49278
- { domain: "admin", operation: "token", gateway: "query", mode: "native" },
49279
- { domain: "admin", operation: "export", gateway: "query", mode: "native" },
49280
- { domain: "admin", operation: "adr.show", gateway: "query", mode: "native" },
49281
- { domain: "admin", operation: "adr.find", gateway: "query", mode: "native" },
49421
+ {
49422
+ domain: "admin",
49423
+ operation: "version",
49424
+ gateway: "query",
49425
+ mode: "native",
49426
+ preferredChannel: "either"
49427
+ },
49428
+ {
49429
+ domain: "admin",
49430
+ operation: "health",
49431
+ gateway: "query",
49432
+ mode: "native",
49433
+ preferredChannel: "either"
49434
+ },
49435
+ {
49436
+ domain: "admin",
49437
+ operation: "config.show",
49438
+ gateway: "query",
49439
+ mode: "native",
49440
+ preferredChannel: "either"
49441
+ },
49442
+ {
49443
+ domain: "admin",
49444
+ operation: "stats",
49445
+ gateway: "query",
49446
+ mode: "native",
49447
+ preferredChannel: "either"
49448
+ },
49449
+ {
49450
+ domain: "admin",
49451
+ operation: "context",
49452
+ gateway: "query",
49453
+ mode: "native",
49454
+ preferredChannel: "either"
49455
+ },
49456
+ {
49457
+ domain: "admin",
49458
+ operation: "runtime",
49459
+ gateway: "query",
49460
+ mode: "native",
49461
+ preferredChannel: "either"
49462
+ },
49463
+ {
49464
+ domain: "admin",
49465
+ operation: "job",
49466
+ gateway: "query",
49467
+ mode: "native",
49468
+ preferredChannel: "either"
49469
+ },
49470
+ { domain: "admin", operation: "dash", gateway: "query", mode: "native", preferredChannel: "mcp" },
49471
+ {
49472
+ domain: "admin",
49473
+ operation: "log",
49474
+ gateway: "query",
49475
+ mode: "native",
49476
+ preferredChannel: "either"
49477
+ },
49478
+ {
49479
+ domain: "admin",
49480
+ operation: "sequence",
49481
+ gateway: "query",
49482
+ mode: "native",
49483
+ preferredChannel: "either"
49484
+ },
49485
+ { domain: "admin", operation: "help", gateway: "query", mode: "native", preferredChannel: "mcp" },
49486
+ {
49487
+ domain: "admin",
49488
+ operation: "token",
49489
+ gateway: "query",
49490
+ mode: "native",
49491
+ preferredChannel: "either"
49492
+ },
49493
+ {
49494
+ domain: "admin",
49495
+ operation: "export",
49496
+ gateway: "query",
49497
+ mode: "native",
49498
+ preferredChannel: "either"
49499
+ },
49500
+ {
49501
+ domain: "admin",
49502
+ operation: "adr.show",
49503
+ gateway: "query",
49504
+ mode: "native",
49505
+ preferredChannel: "either"
49506
+ },
49507
+ {
49508
+ domain: "admin",
49509
+ operation: "adr.find",
49510
+ gateway: "query",
49511
+ mode: "native",
49512
+ preferredChannel: "either"
49513
+ },
49514
+ { domain: "admin", operation: "map", gateway: "query", mode: "native", preferredChannel: "mcp" },
49282
49515
  // Mutate operations
49283
- { domain: "admin", operation: "init", gateway: "mutate", mode: "native" },
49284
- { domain: "admin", operation: "config.set", gateway: "mutate", mode: "native" },
49285
- { domain: "admin", operation: "backup", gateway: "mutate", mode: "native" },
49286
- { domain: "admin", operation: "migrate", gateway: "mutate", mode: "native" },
49287
- { domain: "admin", operation: "cleanup", gateway: "mutate", mode: "native" },
49288
- { domain: "admin", operation: "safestop", gateway: "mutate", mode: "native" },
49289
- { domain: "admin", operation: "inject.generate", gateway: "mutate", mode: "native" },
49290
- { domain: "admin", operation: "job.cancel", gateway: "mutate", mode: "native" },
49291
- { domain: "admin", operation: "install.global", gateway: "mutate", mode: "native" },
49292
- { domain: "admin", operation: "token", gateway: "mutate", mode: "native" },
49293
- { domain: "admin", operation: "health", gateway: "mutate", mode: "native" },
49294
- { domain: "admin", operation: "detect", gateway: "mutate", mode: "native" },
49295
- { domain: "admin", operation: "import", gateway: "mutate", mode: "native" },
49296
- { domain: "admin", operation: "context.inject", gateway: "mutate", mode: "native" },
49297
- { domain: "admin", operation: "adr.sync", gateway: "mutate", mode: "native" },
49516
+ {
49517
+ domain: "admin",
49518
+ operation: "init",
49519
+ gateway: "mutate",
49520
+ mode: "native",
49521
+ preferredChannel: "either"
49522
+ },
49523
+ {
49524
+ domain: "admin",
49525
+ operation: "config.set",
49526
+ gateway: "mutate",
49527
+ mode: "native",
49528
+ preferredChannel: "either"
49529
+ },
49530
+ {
49531
+ domain: "admin",
49532
+ operation: "backup",
49533
+ gateway: "mutate",
49534
+ mode: "native",
49535
+ preferredChannel: "either"
49536
+ },
49537
+ {
49538
+ domain: "admin",
49539
+ operation: "migrate",
49540
+ gateway: "mutate",
49541
+ mode: "native",
49542
+ preferredChannel: "either"
49543
+ },
49544
+ {
49545
+ domain: "admin",
49546
+ operation: "cleanup",
49547
+ gateway: "mutate",
49548
+ mode: "native",
49549
+ preferredChannel: "either"
49550
+ },
49551
+ {
49552
+ domain: "admin",
49553
+ operation: "safestop",
49554
+ gateway: "mutate",
49555
+ mode: "native",
49556
+ preferredChannel: "either"
49557
+ },
49558
+ {
49559
+ domain: "admin",
49560
+ operation: "inject.generate",
49561
+ gateway: "mutate",
49562
+ mode: "native",
49563
+ preferredChannel: "either"
49564
+ },
49565
+ {
49566
+ domain: "admin",
49567
+ operation: "job.cancel",
49568
+ gateway: "mutate",
49569
+ mode: "native",
49570
+ preferredChannel: "either"
49571
+ },
49572
+ {
49573
+ domain: "admin",
49574
+ operation: "install.global",
49575
+ gateway: "mutate",
49576
+ mode: "native",
49577
+ preferredChannel: "either"
49578
+ },
49579
+ {
49580
+ domain: "admin",
49581
+ operation: "token",
49582
+ gateway: "mutate",
49583
+ mode: "native",
49584
+ preferredChannel: "either"
49585
+ },
49586
+ {
49587
+ domain: "admin",
49588
+ operation: "health",
49589
+ gateway: "mutate",
49590
+ mode: "native",
49591
+ preferredChannel: "either"
49592
+ },
49593
+ {
49594
+ domain: "admin",
49595
+ operation: "detect",
49596
+ gateway: "mutate",
49597
+ mode: "native",
49598
+ preferredChannel: "either"
49599
+ },
49600
+ {
49601
+ domain: "admin",
49602
+ operation: "import",
49603
+ gateway: "mutate",
49604
+ mode: "native",
49605
+ preferredChannel: "either"
49606
+ },
49607
+ {
49608
+ domain: "admin",
49609
+ operation: "context.inject",
49610
+ gateway: "mutate",
49611
+ mode: "native",
49612
+ preferredChannel: "either"
49613
+ },
49614
+ {
49615
+ domain: "admin",
49616
+ operation: "adr.sync",
49617
+ gateway: "mutate",
49618
+ mode: "native",
49619
+ preferredChannel: "either"
49620
+ },
49621
+ {
49622
+ domain: "admin",
49623
+ operation: "map",
49624
+ gateway: "mutate",
49625
+ mode: "native",
49626
+ preferredChannel: "either"
49627
+ },
49298
49628
  // === Check Domain ===
49299
49629
  // Query operations
49300
- { domain: "check", operation: "schema", gateway: "query", mode: "native" },
49301
- { domain: "check", operation: "protocol", gateway: "query", mode: "native" },
49302
- { domain: "check", operation: "task", gateway: "query", mode: "native" },
49303
- { domain: "check", operation: "manifest", gateway: "query", mode: "native" },
49304
- { domain: "check", operation: "output", gateway: "query", mode: "native" },
49305
- { domain: "check", operation: "compliance.summary", gateway: "query", mode: "native" },
49306
- { domain: "check", operation: "test", gateway: "query", mode: "native" },
49307
- { domain: "check", operation: "coherence", gateway: "query", mode: "native" },
49308
- { domain: "check", operation: "gate.status", gateway: "query", mode: "native" },
49309
- { domain: "check", operation: "archive.stats", gateway: "query", mode: "native" },
49310
- { domain: "check", operation: "grade", gateway: "query", mode: "native" },
49311
- { domain: "check", operation: "grade.list", gateway: "query", mode: "native" },
49312
- { domain: "check", operation: "chain.validate", gateway: "query", mode: "native" },
49630
+ {
49631
+ domain: "check",
49632
+ operation: "schema",
49633
+ gateway: "query",
49634
+ mode: "native",
49635
+ preferredChannel: "either"
49636
+ },
49637
+ {
49638
+ domain: "check",
49639
+ operation: "protocol",
49640
+ gateway: "query",
49641
+ mode: "native",
49642
+ preferredChannel: "either"
49643
+ },
49644
+ {
49645
+ domain: "check",
49646
+ operation: "task",
49647
+ gateway: "query",
49648
+ mode: "native",
49649
+ preferredChannel: "either"
49650
+ },
49651
+ {
49652
+ domain: "check",
49653
+ operation: "manifest",
49654
+ gateway: "query",
49655
+ mode: "native",
49656
+ preferredChannel: "either"
49657
+ },
49658
+ {
49659
+ domain: "check",
49660
+ operation: "output",
49661
+ gateway: "query",
49662
+ mode: "native",
49663
+ preferredChannel: "either"
49664
+ },
49665
+ {
49666
+ domain: "check",
49667
+ operation: "compliance.summary",
49668
+ gateway: "query",
49669
+ mode: "native",
49670
+ preferredChannel: "mcp"
49671
+ },
49672
+ {
49673
+ domain: "check",
49674
+ operation: "test",
49675
+ gateway: "query",
49676
+ mode: "native",
49677
+ preferredChannel: "either"
49678
+ },
49679
+ {
49680
+ domain: "check",
49681
+ operation: "coherence",
49682
+ gateway: "query",
49683
+ mode: "native",
49684
+ preferredChannel: "either"
49685
+ },
49686
+ {
49687
+ domain: "check",
49688
+ operation: "gate.status",
49689
+ gateway: "query",
49690
+ mode: "native",
49691
+ preferredChannel: "either"
49692
+ },
49693
+ {
49694
+ domain: "check",
49695
+ operation: "archive.stats",
49696
+ gateway: "query",
49697
+ mode: "native",
49698
+ preferredChannel: "either"
49699
+ },
49700
+ {
49701
+ domain: "check",
49702
+ operation: "grade",
49703
+ gateway: "query",
49704
+ mode: "native",
49705
+ preferredChannel: "either"
49706
+ },
49707
+ {
49708
+ domain: "check",
49709
+ operation: "grade.list",
49710
+ gateway: "query",
49711
+ mode: "native",
49712
+ preferredChannel: "either"
49713
+ },
49714
+ {
49715
+ domain: "check",
49716
+ operation: "chain.validate",
49717
+ gateway: "query",
49718
+ mode: "native",
49719
+ preferredChannel: "either"
49720
+ },
49313
49721
  // Mutate operations
49314
- { domain: "check", operation: "compliance.record", gateway: "mutate", mode: "native" },
49315
- { domain: "check", operation: "test.run", gateway: "mutate", mode: "native" },
49316
- { domain: "check", operation: "gate.set", gateway: "mutate", mode: "native" },
49722
+ {
49723
+ domain: "check",
49724
+ operation: "compliance.record",
49725
+ gateway: "mutate",
49726
+ mode: "native",
49727
+ preferredChannel: "mcp"
49728
+ },
49729
+ {
49730
+ domain: "check",
49731
+ operation: "test.run",
49732
+ gateway: "mutate",
49733
+ mode: "native",
49734
+ preferredChannel: "either"
49735
+ },
49736
+ {
49737
+ domain: "check",
49738
+ operation: "gate.set",
49739
+ gateway: "mutate",
49740
+ mode: "native",
49741
+ preferredChannel: "either"
49742
+ },
49743
+ {
49744
+ domain: "check",
49745
+ operation: "compliance.sync",
49746
+ gateway: "mutate",
49747
+ mode: "native",
49748
+ preferredChannel: "either"
49749
+ },
49317
49750
  // === Orchestrate Domain ===
49318
49751
  // Query operations
49319
- { domain: "orchestrate", operation: "status", gateway: "query", mode: "native" },
49320
- { domain: "orchestrate", operation: "next", gateway: "query", mode: "native" },
49321
- { domain: "orchestrate", operation: "ready", gateway: "query", mode: "native" },
49322
- { domain: "orchestrate", operation: "analyze", gateway: "query", mode: "native" },
49323
- { domain: "orchestrate", operation: "context", gateway: "query", mode: "native" },
49324
- { domain: "orchestrate", operation: "waves", gateway: "query", mode: "native" },
49325
- { domain: "orchestrate", operation: "bootstrap", gateway: "query", mode: "native" },
49326
- { domain: "orchestrate", operation: "unblock.opportunities", gateway: "query", mode: "native" },
49327
- { domain: "orchestrate", operation: "tessera.list", gateway: "query", mode: "native" },
49752
+ {
49753
+ domain: "orchestrate",
49754
+ operation: "status",
49755
+ gateway: "query",
49756
+ mode: "native",
49757
+ preferredChannel: "either"
49758
+ },
49759
+ {
49760
+ domain: "orchestrate",
49761
+ operation: "next",
49762
+ gateway: "query",
49763
+ mode: "native",
49764
+ preferredChannel: "either"
49765
+ },
49766
+ {
49767
+ domain: "orchestrate",
49768
+ operation: "ready",
49769
+ gateway: "query",
49770
+ mode: "native",
49771
+ preferredChannel: "either"
49772
+ },
49773
+ {
49774
+ domain: "orchestrate",
49775
+ operation: "analyze",
49776
+ gateway: "query",
49777
+ mode: "native",
49778
+ preferredChannel: "either"
49779
+ },
49780
+ {
49781
+ domain: "orchestrate",
49782
+ operation: "context",
49783
+ gateway: "query",
49784
+ mode: "native",
49785
+ preferredChannel: "either"
49786
+ },
49787
+ {
49788
+ domain: "orchestrate",
49789
+ operation: "waves",
49790
+ gateway: "query",
49791
+ mode: "native",
49792
+ preferredChannel: "either"
49793
+ },
49794
+ {
49795
+ domain: "orchestrate",
49796
+ operation: "bootstrap",
49797
+ gateway: "query",
49798
+ mode: "native",
49799
+ preferredChannel: "either"
49800
+ },
49801
+ {
49802
+ domain: "orchestrate",
49803
+ operation: "unblock.opportunities",
49804
+ gateway: "query",
49805
+ mode: "native",
49806
+ preferredChannel: "either"
49807
+ },
49808
+ {
49809
+ domain: "orchestrate",
49810
+ operation: "tessera.list",
49811
+ gateway: "query",
49812
+ mode: "native",
49813
+ preferredChannel: "either"
49814
+ },
49328
49815
  // Mutate operations
49329
- { domain: "orchestrate", operation: "start", gateway: "mutate", mode: "native" },
49330
- { domain: "orchestrate", operation: "spawn", gateway: "mutate", mode: "native" },
49331
- { domain: "orchestrate", operation: "handoff", gateway: "mutate", mode: "native" },
49332
- { domain: "orchestrate", operation: "spawn.execute", gateway: "mutate", mode: "native" },
49333
- { domain: "orchestrate", operation: "validate", gateway: "mutate", mode: "native" },
49334
- { domain: "orchestrate", operation: "parallel", gateway: "mutate", mode: "native" },
49335
- { domain: "orchestrate", operation: "tessera.instantiate", gateway: "mutate", mode: "native" },
49816
+ {
49817
+ domain: "orchestrate",
49818
+ operation: "start",
49819
+ gateway: "mutate",
49820
+ mode: "native",
49821
+ preferredChannel: "either"
49822
+ },
49823
+ {
49824
+ domain: "orchestrate",
49825
+ operation: "spawn",
49826
+ gateway: "mutate",
49827
+ mode: "native",
49828
+ preferredChannel: "mcp"
49829
+ },
49830
+ {
49831
+ domain: "orchestrate",
49832
+ operation: "handoff",
49833
+ gateway: "mutate",
49834
+ mode: "native",
49835
+ preferredChannel: "either"
49836
+ },
49837
+ {
49838
+ domain: "orchestrate",
49839
+ operation: "spawn.execute",
49840
+ gateway: "mutate",
49841
+ mode: "native",
49842
+ preferredChannel: "either"
49843
+ },
49844
+ {
49845
+ domain: "orchestrate",
49846
+ operation: "validate",
49847
+ gateway: "mutate",
49848
+ mode: "native",
49849
+ preferredChannel: "either"
49850
+ },
49851
+ {
49852
+ domain: "orchestrate",
49853
+ operation: "parallel",
49854
+ gateway: "mutate",
49855
+ mode: "native",
49856
+ preferredChannel: "either"
49857
+ },
49858
+ {
49859
+ domain: "orchestrate",
49860
+ operation: "tessera.instantiate",
49861
+ gateway: "mutate",
49862
+ mode: "native",
49863
+ preferredChannel: "either"
49864
+ },
49336
49865
  // === Memory Domain (brain.db cognitive memory -- T5241) ===
49337
49866
  // Query operations
49338
- { domain: "memory", operation: "find", gateway: "query", mode: "native" },
49339
- { domain: "memory", operation: "timeline", gateway: "query", mode: "native" },
49340
- { domain: "memory", operation: "fetch", gateway: "query", mode: "native" },
49341
- { domain: "memory", operation: "decision.find", gateway: "query", mode: "native" },
49342
- { domain: "memory", operation: "pattern.find", gateway: "query", mode: "native" },
49343
- { domain: "memory", operation: "learning.find", gateway: "query", mode: "native" },
49344
- { domain: "memory", operation: "graph.show", gateway: "query", mode: "native" },
49345
- { domain: "memory", operation: "graph.neighbors", gateway: "query", mode: "native" },
49346
- { domain: "memory", operation: "reason.why", gateway: "query", mode: "native" },
49347
- { domain: "memory", operation: "reason.similar", gateway: "query", mode: "native" },
49348
- { domain: "memory", operation: "search.hybrid", gateway: "query", mode: "native" },
49867
+ {
49868
+ domain: "memory",
49869
+ operation: "find",
49870
+ gateway: "query",
49871
+ mode: "native",
49872
+ preferredChannel: "mcp"
49873
+ },
49874
+ {
49875
+ domain: "memory",
49876
+ operation: "timeline",
49877
+ gateway: "query",
49878
+ mode: "native",
49879
+ preferredChannel: "mcp"
49880
+ },
49881
+ {
49882
+ domain: "memory",
49883
+ operation: "fetch",
49884
+ gateway: "query",
49885
+ mode: "native",
49886
+ preferredChannel: "mcp"
49887
+ },
49888
+ {
49889
+ domain: "memory",
49890
+ operation: "decision.find",
49891
+ gateway: "query",
49892
+ mode: "native",
49893
+ preferredChannel: "mcp"
49894
+ },
49895
+ {
49896
+ domain: "memory",
49897
+ operation: "pattern.find",
49898
+ gateway: "query",
49899
+ mode: "native",
49900
+ preferredChannel: "mcp"
49901
+ },
49902
+ {
49903
+ domain: "memory",
49904
+ operation: "learning.find",
49905
+ gateway: "query",
49906
+ mode: "native",
49907
+ preferredChannel: "mcp"
49908
+ },
49909
+ {
49910
+ domain: "memory",
49911
+ operation: "graph.show",
49912
+ gateway: "query",
49913
+ mode: "native",
49914
+ preferredChannel: "either"
49915
+ },
49916
+ {
49917
+ domain: "memory",
49918
+ operation: "graph.neighbors",
49919
+ gateway: "query",
49920
+ mode: "native",
49921
+ preferredChannel: "either"
49922
+ },
49923
+ {
49924
+ domain: "memory",
49925
+ operation: "reason.why",
49926
+ gateway: "query",
49927
+ mode: "native",
49928
+ preferredChannel: "either"
49929
+ },
49930
+ {
49931
+ domain: "memory",
49932
+ operation: "reason.similar",
49933
+ gateway: "query",
49934
+ mode: "native",
49935
+ preferredChannel: "either"
49936
+ },
49937
+ {
49938
+ domain: "memory",
49939
+ operation: "search.hybrid",
49940
+ gateway: "query",
49941
+ mode: "native",
49942
+ preferredChannel: "either"
49943
+ },
49349
49944
  // Mutate operations
49350
- { domain: "memory", operation: "observe", gateway: "mutate", mode: "native" },
49351
- { domain: "memory", operation: "decision.store", gateway: "mutate", mode: "native" },
49352
- { domain: "memory", operation: "pattern.store", gateway: "mutate", mode: "native" },
49353
- { domain: "memory", operation: "learning.store", gateway: "mutate", mode: "native" },
49354
- { domain: "memory", operation: "link", gateway: "mutate", mode: "native" },
49355
- { domain: "memory", operation: "graph.add", gateway: "mutate", mode: "native" },
49356
- { domain: "memory", operation: "graph.remove", gateway: "mutate", mode: "native" },
49945
+ {
49946
+ domain: "memory",
49947
+ operation: "observe",
49948
+ gateway: "mutate",
49949
+ mode: "native",
49950
+ preferredChannel: "mcp"
49951
+ },
49952
+ {
49953
+ domain: "memory",
49954
+ operation: "decision.store",
49955
+ gateway: "mutate",
49956
+ mode: "native",
49957
+ preferredChannel: "mcp"
49958
+ },
49959
+ {
49960
+ domain: "memory",
49961
+ operation: "pattern.store",
49962
+ gateway: "mutate",
49963
+ mode: "native",
49964
+ preferredChannel: "mcp"
49965
+ },
49966
+ {
49967
+ domain: "memory",
49968
+ operation: "learning.store",
49969
+ gateway: "mutate",
49970
+ mode: "native",
49971
+ preferredChannel: "mcp"
49972
+ },
49973
+ {
49974
+ domain: "memory",
49975
+ operation: "link",
49976
+ gateway: "mutate",
49977
+ mode: "native",
49978
+ preferredChannel: "either"
49979
+ },
49980
+ {
49981
+ domain: "memory",
49982
+ operation: "graph.add",
49983
+ gateway: "mutate",
49984
+ mode: "native",
49985
+ preferredChannel: "either"
49986
+ },
49987
+ {
49988
+ domain: "memory",
49989
+ operation: "graph.remove",
49990
+ gateway: "mutate",
49991
+ mode: "native",
49992
+ preferredChannel: "either"
49993
+ },
49357
49994
  // === Pipeline Domain ===
49358
49995
  // Stage sub-domain (RCASD lifecycle)
49359
- { domain: "pipeline", operation: "stage.validate", gateway: "query", mode: "native" },
49360
- { domain: "pipeline", operation: "stage.status", gateway: "query", mode: "native" },
49361
- { domain: "pipeline", operation: "stage.history", gateway: "query", mode: "native" },
49362
- { domain: "pipeline", operation: "stage.record", gateway: "mutate", mode: "native" },
49363
- { domain: "pipeline", operation: "stage.skip", gateway: "mutate", mode: "native" },
49364
- { domain: "pipeline", operation: "stage.reset", gateway: "mutate", mode: "native" },
49365
- { domain: "pipeline", operation: "stage.gate.pass", gateway: "mutate", mode: "native" },
49366
- { domain: "pipeline", operation: "stage.gate.fail", gateway: "mutate", mode: "native" },
49996
+ {
49997
+ domain: "pipeline",
49998
+ operation: "stage.validate",
49999
+ gateway: "query",
50000
+ mode: "native",
50001
+ preferredChannel: "mcp"
50002
+ },
50003
+ {
50004
+ domain: "pipeline",
50005
+ operation: "stage.status",
50006
+ gateway: "query",
50007
+ mode: "native",
50008
+ preferredChannel: "mcp"
50009
+ },
50010
+ {
50011
+ domain: "pipeline",
50012
+ operation: "stage.history",
50013
+ gateway: "query",
50014
+ mode: "native",
50015
+ preferredChannel: "either"
50016
+ },
50017
+ {
50018
+ domain: "pipeline",
50019
+ operation: "stage.record",
50020
+ gateway: "mutate",
50021
+ mode: "native",
50022
+ preferredChannel: "either"
50023
+ },
50024
+ {
50025
+ domain: "pipeline",
50026
+ operation: "stage.skip",
50027
+ gateway: "mutate",
50028
+ mode: "native",
50029
+ preferredChannel: "either"
50030
+ },
50031
+ {
50032
+ domain: "pipeline",
50033
+ operation: "stage.reset",
50034
+ gateway: "mutate",
50035
+ mode: "native",
50036
+ preferredChannel: "either"
50037
+ },
50038
+ {
50039
+ domain: "pipeline",
50040
+ operation: "stage.gate.pass",
50041
+ gateway: "mutate",
50042
+ mode: "native",
50043
+ preferredChannel: "either"
50044
+ },
50045
+ {
50046
+ domain: "pipeline",
50047
+ operation: "stage.gate.fail",
50048
+ gateway: "mutate",
50049
+ mode: "native",
50050
+ preferredChannel: "either"
50051
+ },
49367
50052
  // Manifest sub-domain (T5241)
49368
- { domain: "pipeline", operation: "manifest.show", gateway: "query", mode: "native" },
49369
- { domain: "pipeline", operation: "manifest.list", gateway: "query", mode: "native" },
49370
- { domain: "pipeline", operation: "manifest.find", gateway: "query", mode: "native" },
49371
- { domain: "pipeline", operation: "manifest.stats", gateway: "query", mode: "native" },
49372
- { domain: "pipeline", operation: "manifest.append", gateway: "mutate", mode: "native" },
49373
- { domain: "pipeline", operation: "manifest.archive", gateway: "mutate", mode: "native" },
50053
+ {
50054
+ domain: "pipeline",
50055
+ operation: "manifest.show",
50056
+ gateway: "query",
50057
+ mode: "native",
50058
+ preferredChannel: "either"
50059
+ },
50060
+ {
50061
+ domain: "pipeline",
50062
+ operation: "manifest.list",
50063
+ gateway: "query",
50064
+ mode: "native",
50065
+ preferredChannel: "either"
50066
+ },
50067
+ {
50068
+ domain: "pipeline",
50069
+ operation: "manifest.find",
50070
+ gateway: "query",
50071
+ mode: "native",
50072
+ preferredChannel: "either"
50073
+ },
50074
+ {
50075
+ domain: "pipeline",
50076
+ operation: "manifest.stats",
50077
+ gateway: "query",
50078
+ mode: "native",
50079
+ preferredChannel: "either"
50080
+ },
50081
+ {
50082
+ domain: "pipeline",
50083
+ operation: "manifest.append",
50084
+ gateway: "mutate",
50085
+ mode: "native",
50086
+ preferredChannel: "either"
50087
+ },
50088
+ {
50089
+ domain: "pipeline",
50090
+ operation: "manifest.archive",
50091
+ gateway: "mutate",
50092
+ mode: "native",
50093
+ preferredChannel: "either"
50094
+ },
49374
50095
  // Phase sub-domain (T5326)
49375
- { domain: "pipeline", operation: "phase.show", gateway: "query", mode: "native" },
49376
- { domain: "pipeline", operation: "phase.list", gateway: "query", mode: "native" },
49377
- { domain: "pipeline", operation: "phase.set", gateway: "mutate", mode: "native" },
49378
- { domain: "pipeline", operation: "phase.advance", gateway: "mutate", mode: "native" },
49379
- { domain: "pipeline", operation: "phase.rename", gateway: "mutate", mode: "native" },
49380
- { domain: "pipeline", operation: "phase.delete", gateway: "mutate", mode: "native" },
50096
+ {
50097
+ domain: "pipeline",
50098
+ operation: "phase.show",
50099
+ gateway: "query",
50100
+ mode: "native",
50101
+ preferredChannel: "either"
50102
+ },
50103
+ {
50104
+ domain: "pipeline",
50105
+ operation: "phase.list",
50106
+ gateway: "query",
50107
+ mode: "native",
50108
+ preferredChannel: "either"
50109
+ },
50110
+ {
50111
+ domain: "pipeline",
50112
+ operation: "phase.set",
50113
+ gateway: "mutate",
50114
+ mode: "native",
50115
+ preferredChannel: "either"
50116
+ },
50117
+ {
50118
+ domain: "pipeline",
50119
+ operation: "phase.advance",
50120
+ gateway: "mutate",
50121
+ mode: "native",
50122
+ preferredChannel: "either"
50123
+ },
50124
+ {
50125
+ domain: "pipeline",
50126
+ operation: "phase.rename",
50127
+ gateway: "mutate",
50128
+ mode: "native",
50129
+ preferredChannel: "either"
50130
+ },
50131
+ {
50132
+ domain: "pipeline",
50133
+ operation: "phase.delete",
50134
+ gateway: "mutate",
50135
+ mode: "native",
50136
+ preferredChannel: "either"
50137
+ },
49381
50138
  // Chain sub-domain (T5405)
49382
- { domain: "pipeline", operation: "chain.show", gateway: "query", mode: "native" },
49383
- { domain: "pipeline", operation: "chain.list", gateway: "query", mode: "native" },
49384
- { domain: "pipeline", operation: "chain.add", gateway: "mutate", mode: "native" },
49385
- { domain: "pipeline", operation: "chain.instantiate", gateway: "mutate", mode: "native" },
49386
- { domain: "pipeline", operation: "chain.advance", gateway: "mutate", mode: "native" },
50139
+ {
50140
+ domain: "pipeline",
50141
+ operation: "chain.show",
50142
+ gateway: "query",
50143
+ mode: "native",
50144
+ preferredChannel: "either"
50145
+ },
50146
+ {
50147
+ domain: "pipeline",
50148
+ operation: "chain.list",
50149
+ gateway: "query",
50150
+ mode: "native",
50151
+ preferredChannel: "either"
50152
+ },
50153
+ {
50154
+ domain: "pipeline",
50155
+ operation: "chain.add",
50156
+ gateway: "mutate",
50157
+ mode: "native",
50158
+ preferredChannel: "either"
50159
+ },
50160
+ {
50161
+ domain: "pipeline",
50162
+ operation: "chain.instantiate",
50163
+ gateway: "mutate",
50164
+ mode: "native",
50165
+ preferredChannel: "either"
50166
+ },
50167
+ {
50168
+ domain: "pipeline",
50169
+ operation: "chain.advance",
50170
+ gateway: "mutate",
50171
+ mode: "native",
50172
+ preferredChannel: "either"
50173
+ },
49387
50174
  // Release sub-domain (T5615 consolidated)
49388
- { domain: "pipeline", operation: "release.list", gateway: "query", mode: "native" },
49389
- { domain: "pipeline", operation: "release.show", gateway: "query", mode: "native" },
49390
- { domain: "pipeline", operation: "release.channel.show", gateway: "query", mode: "native" },
49391
- { domain: "pipeline", operation: "release.ship", gateway: "mutate", mode: "native" },
49392
- { domain: "pipeline", operation: "release.cancel", gateway: "mutate", mode: "native" },
49393
- { domain: "pipeline", operation: "release.rollback", gateway: "mutate", mode: "native" },
50175
+ {
50176
+ domain: "pipeline",
50177
+ operation: "release.list",
50178
+ gateway: "query",
50179
+ mode: "native",
50180
+ preferredChannel: "either"
50181
+ },
50182
+ {
50183
+ domain: "pipeline",
50184
+ operation: "release.show",
50185
+ gateway: "query",
50186
+ mode: "native",
50187
+ preferredChannel: "either"
50188
+ },
50189
+ {
50190
+ domain: "pipeline",
50191
+ operation: "release.channel.show",
50192
+ gateway: "query",
50193
+ mode: "native",
50194
+ preferredChannel: "either"
50195
+ },
50196
+ {
50197
+ domain: "pipeline",
50198
+ operation: "release.ship",
50199
+ gateway: "mutate",
50200
+ mode: "native",
50201
+ preferredChannel: "cli"
50202
+ },
50203
+ {
50204
+ domain: "pipeline",
50205
+ operation: "release.cancel",
50206
+ gateway: "mutate",
50207
+ mode: "native",
50208
+ preferredChannel: "either"
50209
+ },
50210
+ {
50211
+ domain: "pipeline",
50212
+ operation: "release.rollback",
50213
+ gateway: "mutate",
50214
+ mode: "native",
50215
+ preferredChannel: "either"
50216
+ },
49394
50217
  // === Tools Domain ===
49395
50218
  // Issue operations
49396
- { domain: "tools", operation: "issue.diagnostics", gateway: "query", mode: "native" },
50219
+ {
50220
+ domain: "tools",
50221
+ operation: "issue.diagnostics",
50222
+ gateway: "query",
50223
+ mode: "native",
50224
+ preferredChannel: "either"
50225
+ },
49397
50226
  // Skill operations
49398
- { domain: "tools", operation: "skill.list", gateway: "query", mode: "native" },
49399
- { domain: "tools", operation: "skill.show", gateway: "query", mode: "native" },
49400
- { domain: "tools", operation: "skill.find", gateway: "query", mode: "native" },
49401
- { domain: "tools", operation: "skill.dispatch", gateway: "query", mode: "native" },
49402
- { domain: "tools", operation: "skill.verify", gateway: "query", mode: "native" },
49403
- { domain: "tools", operation: "skill.dependencies", gateway: "query", mode: "native" },
49404
- { domain: "tools", operation: "skill.spawn.providers", gateway: "query", mode: "native" },
49405
- { domain: "tools", operation: "skill.catalog", gateway: "query", mode: "native" },
49406
- { domain: "tools", operation: "skill.precedence", gateway: "query", mode: "native" },
49407
- { domain: "tools", operation: "skill.install", gateway: "mutate", mode: "native" },
49408
- { domain: "tools", operation: "skill.uninstall", gateway: "mutate", mode: "native" },
49409
- { domain: "tools", operation: "skill.refresh", gateway: "mutate", mode: "native" },
50227
+ {
50228
+ domain: "tools",
50229
+ operation: "skill.list",
50230
+ gateway: "query",
50231
+ mode: "native",
50232
+ preferredChannel: "mcp"
50233
+ },
50234
+ {
50235
+ domain: "tools",
50236
+ operation: "skill.show",
50237
+ gateway: "query",
50238
+ mode: "native",
50239
+ preferredChannel: "mcp"
50240
+ },
50241
+ {
50242
+ domain: "tools",
50243
+ operation: "skill.find",
50244
+ gateway: "query",
50245
+ mode: "native",
50246
+ preferredChannel: "mcp"
50247
+ },
50248
+ {
50249
+ domain: "tools",
50250
+ operation: "skill.dispatch",
50251
+ gateway: "query",
50252
+ mode: "native",
50253
+ preferredChannel: "either"
50254
+ },
50255
+ {
50256
+ domain: "tools",
50257
+ operation: "skill.verify",
50258
+ gateway: "query",
50259
+ mode: "native",
50260
+ preferredChannel: "either"
50261
+ },
50262
+ {
50263
+ domain: "tools",
50264
+ operation: "skill.dependencies",
50265
+ gateway: "query",
50266
+ mode: "native",
50267
+ preferredChannel: "either"
50268
+ },
50269
+ {
50270
+ domain: "tools",
50271
+ operation: "skill.spawn.providers",
50272
+ gateway: "query",
50273
+ mode: "native",
50274
+ preferredChannel: "either"
50275
+ },
50276
+ {
50277
+ domain: "tools",
50278
+ operation: "skill.catalog",
50279
+ gateway: "query",
50280
+ mode: "native",
50281
+ preferredChannel: "either"
50282
+ },
50283
+ {
50284
+ domain: "tools",
50285
+ operation: "skill.precedence",
50286
+ gateway: "query",
50287
+ mode: "native",
50288
+ preferredChannel: "either"
50289
+ },
50290
+ {
50291
+ domain: "tools",
50292
+ operation: "skill.install",
50293
+ gateway: "mutate",
50294
+ mode: "native",
50295
+ preferredChannel: "either"
50296
+ },
50297
+ {
50298
+ domain: "tools",
50299
+ operation: "skill.uninstall",
50300
+ gateway: "mutate",
50301
+ mode: "native",
50302
+ preferredChannel: "either"
50303
+ },
50304
+ {
50305
+ domain: "tools",
50306
+ operation: "skill.refresh",
50307
+ gateway: "mutate",
50308
+ mode: "native",
50309
+ preferredChannel: "either"
50310
+ },
49410
50311
  // Provider operations
49411
- { domain: "tools", operation: "provider.list", gateway: "query", mode: "native" },
49412
- { domain: "tools", operation: "provider.detect", gateway: "query", mode: "native" },
49413
- { domain: "tools", operation: "provider.inject.status", gateway: "query", mode: "native" },
49414
- { domain: "tools", operation: "provider.supports", gateway: "query", mode: "native" },
49415
- { domain: "tools", operation: "provider.hooks", gateway: "query", mode: "native" },
49416
- { domain: "tools", operation: "provider.inject", gateway: "mutate", mode: "native" },
50312
+ {
50313
+ domain: "tools",
50314
+ operation: "provider.list",
50315
+ gateway: "query",
50316
+ mode: "native",
50317
+ preferredChannel: "mcp"
50318
+ },
50319
+ {
50320
+ domain: "tools",
50321
+ operation: "provider.detect",
50322
+ gateway: "query",
50323
+ mode: "native",
50324
+ preferredChannel: "mcp"
50325
+ },
50326
+ {
50327
+ domain: "tools",
50328
+ operation: "provider.inject.status",
50329
+ gateway: "query",
50330
+ mode: "native",
50331
+ preferredChannel: "either"
50332
+ },
50333
+ {
50334
+ domain: "tools",
50335
+ operation: "provider.supports",
50336
+ gateway: "query",
50337
+ mode: "native",
50338
+ preferredChannel: "either"
50339
+ },
50340
+ {
50341
+ domain: "tools",
50342
+ operation: "provider.hooks",
50343
+ gateway: "query",
50344
+ mode: "native",
50345
+ preferredChannel: "either"
50346
+ },
50347
+ {
50348
+ domain: "tools",
50349
+ operation: "provider.inject",
50350
+ gateway: "mutate",
50351
+ mode: "native",
50352
+ preferredChannel: "either"
50353
+ },
50354
+ // Adapter sub-domain (T5240)
50355
+ {
50356
+ domain: "tools",
50357
+ operation: "adapter.list",
50358
+ gateway: "query",
50359
+ mode: "native",
50360
+ preferredChannel: "mcp"
50361
+ },
50362
+ {
50363
+ domain: "tools",
50364
+ operation: "adapter.show",
50365
+ gateway: "query",
50366
+ mode: "native",
50367
+ preferredChannel: "mcp"
50368
+ },
50369
+ {
50370
+ domain: "tools",
50371
+ operation: "adapter.detect",
50372
+ gateway: "query",
50373
+ mode: "native",
50374
+ preferredChannel: "either"
50375
+ },
50376
+ {
50377
+ domain: "tools",
50378
+ operation: "adapter.health",
50379
+ gateway: "query",
50380
+ mode: "native",
50381
+ preferredChannel: "either"
50382
+ },
50383
+ {
50384
+ domain: "tools",
50385
+ operation: "adapter.activate",
50386
+ gateway: "mutate",
50387
+ mode: "native",
50388
+ preferredChannel: "mcp"
50389
+ },
50390
+ {
50391
+ domain: "tools",
50392
+ operation: "adapter.dispose",
50393
+ gateway: "mutate",
50394
+ mode: "native",
50395
+ preferredChannel: "either"
50396
+ },
49417
50397
  // === Nexus Domain ===
49418
50398
  // Query operations
49419
- { domain: "nexus", operation: "status", gateway: "query", mode: "native" },
49420
- { domain: "nexus", operation: "list", gateway: "query", mode: "native" },
49421
- { domain: "nexus", operation: "show", gateway: "query", mode: "native" },
49422
- { domain: "nexus", operation: "search", gateway: "query", mode: "native" },
49423
- { domain: "nexus", operation: "graph", gateway: "query", mode: "native" },
49424
- { domain: "nexus", operation: "deps", gateway: "query", mode: "native" },
49425
- { domain: "nexus", operation: "resolve", gateway: "query", mode: "native" },
49426
- { domain: "nexus", operation: "discover", gateway: "query", mode: "native" },
49427
- { domain: "nexus", operation: "orphans.list", gateway: "query", mode: "native" },
49428
- { domain: "nexus", operation: "blockers.show", gateway: "query", mode: "native" },
49429
- { domain: "nexus", operation: "path.show", gateway: "query", mode: "native" },
49430
- { domain: "nexus", operation: "share.status", gateway: "query", mode: "native" },
50399
+ {
50400
+ domain: "nexus",
50401
+ operation: "status",
50402
+ gateway: "query",
50403
+ mode: "native",
50404
+ preferredChannel: "either"
50405
+ },
50406
+ {
50407
+ domain: "nexus",
50408
+ operation: "list",
50409
+ gateway: "query",
50410
+ mode: "native",
50411
+ preferredChannel: "either"
50412
+ },
50413
+ {
50414
+ domain: "nexus",
50415
+ operation: "show",
50416
+ gateway: "query",
50417
+ mode: "native",
50418
+ preferredChannel: "either"
50419
+ },
50420
+ {
50421
+ domain: "nexus",
50422
+ operation: "search",
50423
+ gateway: "query",
50424
+ mode: "native",
50425
+ preferredChannel: "either"
50426
+ },
50427
+ {
50428
+ domain: "nexus",
50429
+ operation: "graph",
50430
+ gateway: "query",
50431
+ mode: "native",
50432
+ preferredChannel: "either"
50433
+ },
50434
+ {
50435
+ domain: "nexus",
50436
+ operation: "deps",
50437
+ gateway: "query",
50438
+ mode: "native",
50439
+ preferredChannel: "either"
50440
+ },
50441
+ {
50442
+ domain: "nexus",
50443
+ operation: "resolve",
50444
+ gateway: "query",
50445
+ mode: "native",
50446
+ preferredChannel: "either"
50447
+ },
50448
+ {
50449
+ domain: "nexus",
50450
+ operation: "discover",
50451
+ gateway: "query",
50452
+ mode: "native",
50453
+ preferredChannel: "either"
50454
+ },
50455
+ {
50456
+ domain: "nexus",
50457
+ operation: "orphans.list",
50458
+ gateway: "query",
50459
+ mode: "native",
50460
+ preferredChannel: "either"
50461
+ },
50462
+ {
50463
+ domain: "nexus",
50464
+ operation: "blockers.show",
50465
+ gateway: "query",
50466
+ mode: "native",
50467
+ preferredChannel: "either"
50468
+ },
50469
+ {
50470
+ domain: "nexus",
50471
+ operation: "path.show",
50472
+ gateway: "query",
50473
+ mode: "native",
50474
+ preferredChannel: "either"
50475
+ },
50476
+ {
50477
+ domain: "nexus",
50478
+ operation: "share.status",
50479
+ gateway: "query",
50480
+ mode: "native",
50481
+ preferredChannel: "either"
50482
+ },
50483
+ {
50484
+ domain: "nexus",
50485
+ operation: "transfer.preview",
50486
+ gateway: "query",
50487
+ mode: "native",
50488
+ preferredChannel: "either"
50489
+ },
49431
50490
  // Mutate operations
49432
- { domain: "nexus", operation: "init", gateway: "mutate", mode: "native" },
49433
- { domain: "nexus", operation: "register", gateway: "mutate", mode: "native" },
49434
- { domain: "nexus", operation: "unregister", gateway: "mutate", mode: "native" },
49435
- { domain: "nexus", operation: "sync", gateway: "mutate", mode: "native" },
49436
- { domain: "nexus", operation: "reconcile", gateway: "mutate", mode: "native" },
49437
- { domain: "nexus", operation: "permission.set", gateway: "mutate", mode: "native" },
49438
- { domain: "nexus", operation: "share.snapshot.export", gateway: "mutate", mode: "native" },
49439
- { domain: "nexus", operation: "share.snapshot.import", gateway: "mutate", mode: "native" },
50491
+ {
50492
+ domain: "nexus",
50493
+ operation: "init",
50494
+ gateway: "mutate",
50495
+ mode: "native",
50496
+ preferredChannel: "either"
50497
+ },
50498
+ {
50499
+ domain: "nexus",
50500
+ operation: "register",
50501
+ gateway: "mutate",
50502
+ mode: "native",
50503
+ preferredChannel: "either"
50504
+ },
50505
+ {
50506
+ domain: "nexus",
50507
+ operation: "unregister",
50508
+ gateway: "mutate",
50509
+ mode: "native",
50510
+ preferredChannel: "either"
50511
+ },
50512
+ {
50513
+ domain: "nexus",
50514
+ operation: "sync",
50515
+ gateway: "mutate",
50516
+ mode: "native",
50517
+ preferredChannel: "either"
50518
+ },
50519
+ {
50520
+ domain: "nexus",
50521
+ operation: "reconcile",
50522
+ gateway: "mutate",
50523
+ mode: "native",
50524
+ preferredChannel: "either"
50525
+ },
50526
+ {
50527
+ domain: "nexus",
50528
+ operation: "permission.set",
50529
+ gateway: "mutate",
50530
+ mode: "native",
50531
+ preferredChannel: "either"
50532
+ },
50533
+ {
50534
+ domain: "nexus",
50535
+ operation: "share.snapshot.export",
50536
+ gateway: "mutate",
50537
+ mode: "native",
50538
+ preferredChannel: "either"
50539
+ },
50540
+ {
50541
+ domain: "nexus",
50542
+ operation: "share.snapshot.import",
50543
+ gateway: "mutate",
50544
+ mode: "native",
50545
+ preferredChannel: "either"
50546
+ },
50547
+ {
50548
+ domain: "nexus",
50549
+ operation: "transfer",
50550
+ gateway: "mutate",
50551
+ mode: "native",
50552
+ preferredChannel: "either"
50553
+ },
49440
50554
  // === Sticky Domain ===
49441
50555
  // Query operations
49442
- { domain: "sticky", operation: "list", gateway: "query", mode: "native" },
49443
- { domain: "sticky", operation: "show", gateway: "query", mode: "native" },
50556
+ {
50557
+ domain: "sticky",
50558
+ operation: "list",
50559
+ gateway: "query",
50560
+ mode: "native",
50561
+ preferredChannel: "mcp"
50562
+ },
50563
+ {
50564
+ domain: "sticky",
50565
+ operation: "show",
50566
+ gateway: "query",
50567
+ mode: "native",
50568
+ preferredChannel: "mcp"
50569
+ },
49444
50570
  // Mutate operations
49445
- { domain: "sticky", operation: "add", gateway: "mutate", mode: "native" },
49446
- { domain: "sticky", operation: "archive", gateway: "mutate", mode: "native" },
49447
- { domain: "sticky", operation: "convert", gateway: "mutate", mode: "native" },
49448
- { domain: "sticky", operation: "purge", gateway: "mutate", mode: "native" }
50571
+ {
50572
+ domain: "sticky",
50573
+ operation: "add",
50574
+ gateway: "mutate",
50575
+ mode: "native",
50576
+ preferredChannel: "mcp"
50577
+ },
50578
+ {
50579
+ domain: "sticky",
50580
+ operation: "archive",
50581
+ gateway: "mutate",
50582
+ mode: "native",
50583
+ preferredChannel: "either"
50584
+ },
50585
+ {
50586
+ domain: "sticky",
50587
+ operation: "convert",
50588
+ gateway: "mutate",
50589
+ mode: "native",
50590
+ preferredChannel: "either"
50591
+ },
50592
+ {
50593
+ domain: "sticky",
50594
+ operation: "purge",
50595
+ gateway: "mutate",
50596
+ mode: "native",
50597
+ preferredChannel: "either"
50598
+ }
49449
50599
  ];
49450
50600
  function getOperationMode(domain2, operation, gateway) {
49451
50601
  const entry = CAPABILITY_MATRIX.find(
@@ -50465,7 +51615,9 @@ function extractBody(content) {
50465
51615
  // packages/core/src/skills/agents/install.ts
50466
51616
  init_paths();
50467
51617
  import { existsSync as existsSync66, mkdirSync as mkdirSync14, readdirSync as readdirSync25, readlinkSync, symlinkSync, unlinkSync as unlinkSync4 } from "node:fs";
51618
+ import { platform as platform2 } from "node:os";
50468
51619
  import { basename as basename12, join as join70 } from "node:path";
51620
+ var DIR_SYMLINK_TYPE = platform2() === "win32" ? "junction" : "dir";
50469
51621
  function getAgentInstallDir() {
50470
51622
  return getClaudeAgentsDir();
50471
51623
  }
@@ -50495,7 +51647,7 @@ function installAgent(agentDir) {
50495
51647
  }
50496
51648
  }
50497
51649
  try {
50498
- symlinkSync(agentDir, targetPath, "dir");
51650
+ symlinkSync(agentDir, targetPath, DIR_SYMLINK_TYPE);
50499
51651
  return { installed: true, path: targetPath };
50500
51652
  } catch (err) {
50501
51653
  return { installed: false, path: targetPath, error: `Symlink failed: ${err}` };
@@ -52391,11 +53543,11 @@ async function validateOrchestratorCompliance(epicId, cwd) {
52391
53543
  }
52392
53544
 
52393
53545
  // packages/core/src/skills/skill-paths.ts
52394
- init_paths();
52395
53546
  import { existsSync as existsSync76, lstatSync, readlinkSync as readlinkSync2, realpathSync as realpathSync2 } from "node:fs";
52396
53547
  import { delimiter, join as join79, resolve as resolve9 } from "node:path";
53548
+ import { getCanonicalSkillsDir as getCanonicalSkillsDir2 } from "@cleocode/caamp";
52397
53549
  function getCaampCanonical() {
52398
- return join79(getAgentsHome(), "skills");
53550
+ return getCanonicalSkillsDir2();
52399
53551
  }
52400
53552
  function getProjectEmbedded(projectRoot) {
52401
53553
  const root = projectRoot ?? process.cwd();
@@ -54541,7 +55693,7 @@ function getNodeVersionInfo() {
54541
55693
  };
54542
55694
  }
54543
55695
  function getNodeUpgradeInstructions() {
54544
- const platform3 = detectPlatform();
55696
+ const platform5 = detectPlatform();
54545
55697
  const arch2 = process.arch;
54546
55698
  const instructions = [];
54547
55699
  const hasFnm = commandExists2("fnm");
@@ -54556,7 +55708,7 @@ function getNodeUpgradeInstructions() {
54556
55708
  if (hasVolta) {
54557
55709
  instructions.push(`volta install node@${MINIMUM_NODE_MAJOR}`);
54558
55710
  }
54559
- switch (platform3) {
55711
+ switch (platform5) {
54560
55712
  case "linux":
54561
55713
  if (commandExists2("dnf")) {
54562
55714
  instructions.push(
@@ -54588,7 +55740,7 @@ function getNodeUpgradeInstructions() {
54588
55740
  }
54589
55741
  instructions.push(`https://nodejs.org/en/download/`);
54590
55742
  const recommended = instructions[0] ?? `https://nodejs.org/en/download/`;
54591
- return { platform: platform3, arch: arch2, instructions, recommended };
55743
+ return { platform: platform5, arch: arch2, instructions, recommended };
54592
55744
  }
54593
55745
  function getSystemInfo2() {
54594
55746
  return {
@@ -57160,7 +58312,6 @@ function validateLabels2(labels, repoLabels) {
57160
58312
  var ui_exports = {};
57161
58313
  __export(ui_exports, {
57162
58314
  ALIASES_VERSION: () => ALIASES_VERSION,
57163
- INJECTION_VALIDATION_KEYS: () => INJECTION_VALIDATION_KEYS,
57164
58315
  appendToChangelog: () => appendToChangelog,
57165
58316
  checkAliasesStatus: () => checkAliasesStatus,
57166
58317
  defaultFlags: () => defaultFlags,
@@ -57177,7 +58328,6 @@ __export(ui_exports, {
57177
58328
  getCurrentShell: () => getCurrentShell,
57178
58329
  getInstalledVersion: () => getInstalledVersion,
57179
58330
  getRcFilePath: () => getRcFilePath,
57180
- getValidationKey: () => getValidationKey,
57181
58331
  groupTasksIntoSections: () => groupTasksIntoSections,
57182
58332
  hasAliasBlock: () => hasAliasBlock,
57183
58333
  injectAliases: () => injectAliases,
@@ -57193,7 +58343,7 @@ __export(ui_exports, {
57193
58343
 
57194
58344
  // packages/core/src/ui/aliases.ts
57195
58345
  import { existsSync as existsSync92, readFileSync as readFileSync67, writeFileSync as writeFileSync15 } from "node:fs";
57196
- import { homedir as homedir5, platform as platform2 } from "node:os";
58346
+ import { homedir as homedir5, platform as platform3 } from "node:os";
57197
58347
  import { join as join96 } from "node:path";
57198
58348
  var MARKER_START = "# CLEO-CLAUDE-ALIASES:START";
57199
58349
  var MARKER_END = "# CLEO-CLAUDE-ALIASES:END";
@@ -57208,7 +58358,7 @@ function getCurrentShell() {
57208
58358
  const shell = process.env.SHELL ?? "";
57209
58359
  if (shell.includes("zsh")) return "zsh";
57210
58360
  if (shell.includes("bash")) return "bash";
57211
- if (platform2() === "win32") return "powershell";
58361
+ if (platform3() === "win32") return "powershell";
57212
58362
  return "bash";
57213
58363
  }
57214
58364
  function getRcFilePath(shell) {
@@ -57232,7 +58382,7 @@ function detectAvailableShells() {
57232
58382
  const shells = [];
57233
58383
  if (existsSync92(getRcFilePath("bash")) || existsSync92("/bin/bash")) shells.push("bash");
57234
58384
  if (existsSync92(getRcFilePath("zsh")) || existsSync92("/bin/zsh")) shells.push("zsh");
57235
- if (platform2() === "win32") shells.push("powershell");
58385
+ if (platform3() === "win32") shells.push("powershell");
57236
58386
  return shells;
57237
58387
  }
57238
58388
  function generateBashAliases(cleoPath) {
@@ -57664,16 +58814,6 @@ function isJsonOutput(flags) {
57664
58814
  return resolveFormat(flags.format) === "json";
57665
58815
  }
57666
58816
 
57667
- // packages/core/src/ui/injection-legacy.ts
57668
- var INJECTION_VALIDATION_KEYS = {
57669
- "CLAUDE.md": "claude_md",
57670
- "AGENTS.md": "agents_md",
57671
- "GEMINI.md": "gemini_md"
57672
- };
57673
- function getValidationKey(target) {
57674
- return INJECTION_VALIDATION_KEYS[target] ?? target.toLowerCase().replace(/[^a-z0-9]/g, "_");
57675
- }
57676
-
57677
58817
  // packages/core/src/validation/index.ts
57678
58818
  var validation_exports = {};
57679
58819
  __export(validation_exports, {
@@ -60654,15 +61794,34 @@ init_injection();
60654
61794
  init_memory_bridge();
60655
61795
  import { existsSync as existsSync99, readdirSync as readdirSync33, readFileSync as readFileSync73 } from "node:fs";
60656
61796
  import { copyFile as copyFile3, lstat, mkdir as mkdir16, readFile as readFile17, symlink, unlink as unlink4, writeFile as writeFile11 } from "node:fs/promises";
61797
+ import { platform as platform4 } from "node:os";
60657
61798
  import { basename as basename17, dirname as dirname19, join as join100 } from "node:path";
60658
61799
  init_paths();
60659
61800
  init_scaffold();
60660
61801
  init_schema_management();
60661
61802
  init_json2();
61803
+ var DIR_SYMLINK_TYPE2 = platform4() === "win32" ? "junction" : "dir";
60662
61804
  async function initAgentDefinition(created, warnings) {
60663
- const packageRoot = getPackageRoot();
60664
- const agentSourceDir = join100(packageRoot, "agents", "cleo-subagent");
60665
- if (!existsSync99(agentSourceDir)) {
61805
+ let agentSourceDir = null;
61806
+ try {
61807
+ const { createRequire: createRequire5 } = await import("node:module");
61808
+ const req = createRequire5(import.meta.url);
61809
+ const agentsPkgMain = req.resolve("@cleocode/agents/package.json");
61810
+ const agentsPkgRoot = dirname19(agentsPkgMain);
61811
+ const candidate = join100(agentsPkgRoot, "cleo-subagent");
61812
+ if (existsSync99(candidate)) {
61813
+ agentSourceDir = candidate;
61814
+ }
61815
+ } catch {
61816
+ }
61817
+ if (!agentSourceDir) {
61818
+ const packageRoot = getPackageRoot();
61819
+ const bundled = join100(packageRoot, "agents", "cleo-subagent");
61820
+ if (existsSync99(bundled)) {
61821
+ agentSourceDir = bundled;
61822
+ }
61823
+ }
61824
+ if (!agentSourceDir) {
60666
61825
  warnings.push("agents/cleo-subagent/ not found in package, skipping agent definition install");
60667
61826
  return;
60668
61827
  }
@@ -60676,7 +61835,7 @@ async function initAgentDefinition(created, warnings) {
60676
61835
  }
60677
61836
  } catch {
60678
61837
  }
60679
- await symlink(agentSourceDir, globalAgentsDir, "dir");
61838
+ await symlink(agentSourceDir, globalAgentsDir, DIR_SYMLINK_TYPE2);
60680
61839
  created.push("agent: cleo-subagent (symlinked)");
60681
61840
  } catch (_err) {
60682
61841
  try {
@@ -60693,61 +61852,6 @@ async function initAgentDefinition(created, warnings) {
60693
61852
  }
60694
61853
  }
60695
61854
  }
60696
- async function initCoreSkills(created, warnings) {
60697
- try {
60698
- const { getInstalledProviders: getInstalledProviders3, installSkill: installSkill2, registerSkillLibraryFromPath } = await import("@cleocode/caamp");
60699
- const providers = getInstalledProviders3();
60700
- if (providers.length === 0) {
60701
- return;
60702
- }
60703
- const packageRoot = getPackageRoot();
60704
- let ctSkillsRoot = null;
60705
- try {
60706
- const bundledPath = join100(packageRoot, "packages", "skills");
60707
- if (existsSync99(join100(bundledPath, "skills.json"))) {
60708
- ctSkillsRoot = bundledPath;
60709
- } else {
60710
- const ctSkillsPath = join100(packageRoot, "node_modules", "@cleocode", "skills");
60711
- if (existsSync99(join100(ctSkillsPath, "skills.json"))) {
60712
- ctSkillsRoot = ctSkillsPath;
60713
- }
60714
- }
60715
- } catch {
60716
- }
60717
- if (!ctSkillsRoot) {
60718
- warnings.push("skills package not found, skipping core skill installation");
60719
- return;
60720
- }
60721
- try {
60722
- registerSkillLibraryFromPath(ctSkillsRoot);
60723
- } catch {
60724
- warnings.push("Failed to register skill library with CAAMP");
60725
- }
60726
- const catalogPath = join100(ctSkillsRoot, "skills.json");
60727
- const catalog3 = JSON.parse(readFileSync73(catalogPath, "utf-8"));
60728
- const skills = catalog3.skills ?? [];
60729
- const coreSkills = skills.filter((s) => s.tier <= 2);
60730
- const installed = [];
60731
- for (const skill of coreSkills) {
60732
- const skillSourceDir = dirname19(join100(ctSkillsRoot, skill.path));
60733
- if (!existsSync99(skillSourceDir)) {
60734
- continue;
60735
- }
60736
- try {
60737
- const result = await installSkill2(skillSourceDir, skill.name, providers, true);
60738
- if (result.success) {
60739
- installed.push(skill.name);
60740
- }
60741
- } catch {
60742
- }
60743
- }
60744
- if (installed.length > 0) {
60745
- created.push(`skills: ${installed.length} core skills installed`);
60746
- }
60747
- } catch (err) {
60748
- warnings.push(`Core skill install: ${err instanceof Error ? err.message : String(err)}`);
60749
- }
60750
- }
60751
61855
  async function initNexusRegistration(projectRoot, created, warnings) {
60752
61856
  try {
60753
61857
  const { nexusReconcile: nexusReconcile2 } = await Promise.resolve().then(() => (init_registry3(), registry_exports3));
@@ -61005,7 +62109,6 @@ async function initProject(opts = {}) {
61005
62109
  warnings.push(`Contributor MCP setup: ${err instanceof Error ? err.message : String(err)}`);
61006
62110
  }
61007
62111
  await initAgentDefinition(created, warnings);
61008
- await initCoreSkills(created, warnings);
61009
62112
  await initNexusRegistration(projRoot, created, warnings);
61010
62113
  try {
61011
62114
  const { AdapterManager: AdapterManager2 } = await Promise.resolve().then(() => (init_adapters(), adapters_exports));