nexus-agents 2.63.4 → 2.63.6

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 (97) hide show
  1. package/dist/{adaptive-memory-2UIPH67R.js → adaptive-memory-XD5O3TC4.js} +3 -3
  2. package/dist/{chunk-NF5KOUKM.js → chunk-3BLWO2ZM.js} +2 -2
  3. package/dist/{chunk-PB2EXTSV.js → chunk-3H44UAHW.js} +2 -2
  4. package/dist/{chunk-EBFXDM3P.js → chunk-5CYDU2VX.js} +2 -2
  5. package/dist/{chunk-QAOI6EIU.js → chunk-5HQJGYYM.js} +2 -2
  6. package/dist/{chunk-FHFNOMNK.js → chunk-6MRF2PE2.js} +2 -2
  7. package/dist/{chunk-RCQZMJBZ.js → chunk-CQXNX6BQ.js} +3 -3
  8. package/dist/{chunk-WZ7Z5VLZ.js → chunk-CUGQAPGY.js} +254 -137
  9. package/dist/chunk-CUGQAPGY.js.map +1 -0
  10. package/dist/{chunk-CDWQP3UC.js → chunk-F2YQX6Q6.js} +3 -3
  11. package/dist/{chunk-KLZHA5KA.js → chunk-GISQ3EJB.js} +4 -4
  12. package/dist/{chunk-KYRDQJLY.js → chunk-HRTGSG4L.js} +7 -7
  13. package/dist/{chunk-ZC4KHPRL.js → chunk-N36KDK3E.js} +12 -12
  14. package/dist/chunk-N36KDK3E.js.map +1 -0
  15. package/dist/{chunk-FAUHVWYZ.js → chunk-NV63LTMM.js} +5 -1
  16. package/dist/chunk-NV63LTMM.js.map +1 -0
  17. package/dist/{chunk-GJVHRJO2.js → chunk-O3CBMPGT.js} +2 -1
  18. package/dist/chunk-O3CBMPGT.js.map +1 -0
  19. package/dist/{chunk-KVZNQWWI.js → chunk-O4AJGETH.js} +2 -2
  20. package/dist/{chunk-ORYMBSGF.js → chunk-OKU3VXWC.js} +5 -5
  21. package/dist/{chunk-ETZULQ7Z.js → chunk-P5NBYCEC.js} +2 -2
  22. package/dist/{chunk-FTWGBV7S.js → chunk-R4FVXOZF.js} +2 -2
  23. package/dist/{chunk-46S665SD.js → chunk-SUR2TLIG.js} +7 -7
  24. package/dist/{chunk-I37IQ26H.js → chunk-TR74DSB4.js} +2 -2
  25. package/dist/{chunk-PEDEZRPR.js → chunk-TSS7VN3V.js} +8 -8
  26. package/dist/{chunk-MSFUOGN4.js → chunk-UFHFX2GX.js} +2 -2
  27. package/dist/{chunk-UDKYZ7CS.js → chunk-VOBYREAG.js} +2 -2
  28. package/dist/{chunk-UCQTXKTS.js → chunk-WDWKKJHZ.js} +2 -2
  29. package/dist/{cli-circuit-breaker-5E6OWOMI.js → cli-circuit-breaker-JE6XKLUG.js} +4 -4
  30. package/dist/cli.js +74 -65
  31. package/dist/cli.js.map +1 -1
  32. package/dist/{composite-router-FC3H7NKN.js → composite-router-KBOGB7GQ.js} +2 -2
  33. package/dist/{consensus-vote-6FKSINXV.js → consensus-vote-PIU3D3KP.js} +9 -9
  34. package/dist/{doctor-deep-X3YCUM4Q.js → doctor-deep-DGY2N4U2.js} +3 -3
  35. package/dist/{expert-bridge-R6FQWUHB.js → expert-bridge-5IPLSDJH.js} +3 -3
  36. package/dist/{expert-config-BTPAEZWV.js → expert-config-6X4225UC.js} +2 -2
  37. package/dist/{factory-BOXBN4ZS.js → factory-PSFI6WDI.js} +4 -4
  38. package/dist/{factory-7DJA2CIL.js → factory-ZTNGLNFH.js} +5 -5
  39. package/dist/index.d.ts +5 -0
  40. package/dist/index.js +21 -21
  41. package/dist/{issue-triage-DGDKQQTD.js → issue-triage-VOZNNCUG.js} +4 -4
  42. package/dist/{mcp-config-CHS2ZC42.js → mcp-config-PDH6LS6E.js} +3 -3
  43. package/dist/{mobimem-NO7I2Y4O.js → mobimem-7KQVPLAW.js} +2 -2
  44. package/dist/{registry-command-ZO75YQJG.js → registry-command-BS75IWSA.js} +2 -2
  45. package/dist/{repo-security-plan-BZ3WOIEZ.js → repo-security-plan-VZTTNXYJ.js} +3 -3
  46. package/dist/{research-helpers-synthesize-SH34FJIE.js → research-helpers-synthesize-B3C6BFCX.js} +3 -3
  47. package/dist/{routing-memory-SALB3DZI.js → routing-memory-BGK2HMC3.js} +2 -2
  48. package/dist/{session-memory-IOXXN6XA.js → session-memory-ESTZAPL2.js} +3 -3
  49. package/dist/{setup-command-UVJRDNRF.js → setup-command-J6QG2G5V.js} +9 -9
  50. package/dist/{setup-config-FYRXUWQH.js → setup-config-LG67TIFO.js} +3 -3
  51. package/dist/{setup-custom-api-VAFP4X43.js → setup-custom-api-4DZABP47.js} +4 -4
  52. package/dist/{weather-report-SBJRXFTW.js → weather-report-HUY35FUZ.js} +2 -2
  53. package/package.json +1 -1
  54. package/dist/chunk-FAUHVWYZ.js.map +0 -1
  55. package/dist/chunk-GJVHRJO2.js.map +0 -1
  56. package/dist/chunk-WZ7Z5VLZ.js.map +0 -1
  57. package/dist/chunk-ZC4KHPRL.js.map +0 -1
  58. /package/dist/{adaptive-memory-2UIPH67R.js.map → adaptive-memory-XD5O3TC4.js.map} +0 -0
  59. /package/dist/{chunk-NF5KOUKM.js.map → chunk-3BLWO2ZM.js.map} +0 -0
  60. /package/dist/{chunk-PB2EXTSV.js.map → chunk-3H44UAHW.js.map} +0 -0
  61. /package/dist/{chunk-EBFXDM3P.js.map → chunk-5CYDU2VX.js.map} +0 -0
  62. /package/dist/{chunk-QAOI6EIU.js.map → chunk-5HQJGYYM.js.map} +0 -0
  63. /package/dist/{chunk-FHFNOMNK.js.map → chunk-6MRF2PE2.js.map} +0 -0
  64. /package/dist/{chunk-RCQZMJBZ.js.map → chunk-CQXNX6BQ.js.map} +0 -0
  65. /package/dist/{chunk-CDWQP3UC.js.map → chunk-F2YQX6Q6.js.map} +0 -0
  66. /package/dist/{chunk-KLZHA5KA.js.map → chunk-GISQ3EJB.js.map} +0 -0
  67. /package/dist/{chunk-KYRDQJLY.js.map → chunk-HRTGSG4L.js.map} +0 -0
  68. /package/dist/{chunk-KVZNQWWI.js.map → chunk-O4AJGETH.js.map} +0 -0
  69. /package/dist/{chunk-ORYMBSGF.js.map → chunk-OKU3VXWC.js.map} +0 -0
  70. /package/dist/{chunk-ETZULQ7Z.js.map → chunk-P5NBYCEC.js.map} +0 -0
  71. /package/dist/{chunk-FTWGBV7S.js.map → chunk-R4FVXOZF.js.map} +0 -0
  72. /package/dist/{chunk-46S665SD.js.map → chunk-SUR2TLIG.js.map} +0 -0
  73. /package/dist/{chunk-I37IQ26H.js.map → chunk-TR74DSB4.js.map} +0 -0
  74. /package/dist/{chunk-PEDEZRPR.js.map → chunk-TSS7VN3V.js.map} +0 -0
  75. /package/dist/{chunk-MSFUOGN4.js.map → chunk-UFHFX2GX.js.map} +0 -0
  76. /package/dist/{chunk-UDKYZ7CS.js.map → chunk-VOBYREAG.js.map} +0 -0
  77. /package/dist/{chunk-UCQTXKTS.js.map → chunk-WDWKKJHZ.js.map} +0 -0
  78. /package/dist/{cli-circuit-breaker-5E6OWOMI.js.map → cli-circuit-breaker-JE6XKLUG.js.map} +0 -0
  79. /package/dist/{composite-router-FC3H7NKN.js.map → composite-router-KBOGB7GQ.js.map} +0 -0
  80. /package/dist/{consensus-vote-6FKSINXV.js.map → consensus-vote-PIU3D3KP.js.map} +0 -0
  81. /package/dist/{doctor-deep-X3YCUM4Q.js.map → doctor-deep-DGY2N4U2.js.map} +0 -0
  82. /package/dist/{expert-bridge-R6FQWUHB.js.map → expert-bridge-5IPLSDJH.js.map} +0 -0
  83. /package/dist/{expert-config-BTPAEZWV.js.map → expert-config-6X4225UC.js.map} +0 -0
  84. /package/dist/{factory-7DJA2CIL.js.map → factory-PSFI6WDI.js.map} +0 -0
  85. /package/dist/{factory-BOXBN4ZS.js.map → factory-ZTNGLNFH.js.map} +0 -0
  86. /package/dist/{issue-triage-DGDKQQTD.js.map → issue-triage-VOZNNCUG.js.map} +0 -0
  87. /package/dist/{mcp-config-CHS2ZC42.js.map → mcp-config-PDH6LS6E.js.map} +0 -0
  88. /package/dist/{mobimem-NO7I2Y4O.js.map → mobimem-7KQVPLAW.js.map} +0 -0
  89. /package/dist/{registry-command-ZO75YQJG.js.map → registry-command-BS75IWSA.js.map} +0 -0
  90. /package/dist/{repo-security-plan-BZ3WOIEZ.js.map → repo-security-plan-VZTTNXYJ.js.map} +0 -0
  91. /package/dist/{research-helpers-synthesize-SH34FJIE.js.map → research-helpers-synthesize-B3C6BFCX.js.map} +0 -0
  92. /package/dist/{routing-memory-SALB3DZI.js.map → routing-memory-BGK2HMC3.js.map} +0 -0
  93. /package/dist/{session-memory-IOXXN6XA.js.map → session-memory-ESTZAPL2.js.map} +0 -0
  94. /package/dist/{setup-command-UVJRDNRF.js.map → setup-command-J6QG2G5V.js.map} +0 -0
  95. /package/dist/{setup-config-FYRXUWQH.js.map → setup-config-LG67TIFO.js.map} +0 -0
  96. /package/dist/{setup-custom-api-VAFP4X43.js.map → setup-custom-api-4DZABP47.js.map} +0 -0
  97. /package/dist/{weather-report-SBJRXFTW.js.map → weather-report-HUY35FUZ.js.map} +0 -0
@@ -4,10 +4,10 @@ import {
4
4
  import {
5
5
  getTokenEnvVars,
6
6
  resolveToken
7
- } from "./chunk-UCQTXKTS.js";
7
+ } from "./chunk-WDWKKJHZ.js";
8
8
  import {
9
9
  executeExpert
10
- } from "./chunk-46S665SD.js";
10
+ } from "./chunk-SUR2TLIG.js";
11
11
  import {
12
12
  ClaudeAdapter,
13
13
  DEFAULT_RELEVANCE_CONFIG,
@@ -36,7 +36,7 @@ import {
36
36
  withAccessPolicy,
37
37
  withProgressHeartbeat,
38
38
  wrapToolWithTimeout
39
- } from "./chunk-PEDEZRPR.js";
39
+ } from "./chunk-TSS7VN3V.js";
40
40
  import {
41
41
  REGISTRY_PATH,
42
42
  getProjectRoot,
@@ -45,14 +45,14 @@ import {
45
45
  normalizeTopicToCanonical,
46
46
  savePapersRegistry,
47
47
  synthesizeResearch
48
- } from "./chunk-PB2EXTSV.js";
48
+ } from "./chunk-3H44UAHW.js";
49
49
  import {
50
50
  IssueTriage,
51
51
  sanitizeInput
52
- } from "./chunk-RCQZMJBZ.js";
52
+ } from "./chunk-CQXNX6BQ.js";
53
53
  import {
54
54
  generateSecurityPlan
55
- } from "./chunk-QAOI6EIU.js";
55
+ } from "./chunk-5HQJGYYM.js";
56
56
  import {
57
57
  analyzeGitHubRepo
58
58
  } from "./chunk-BC3M4VLP.js";
@@ -69,10 +69,10 @@ import {
69
69
  clampTaskTtl,
70
70
  getAvailabilityCache,
71
71
  resolveFallback
72
- } from "./chunk-KYRDQJLY.js";
72
+ } from "./chunk-HRTGSG4L.js";
73
73
  import {
74
74
  DEFAULTS
75
- } from "./chunk-FHFNOMNK.js";
75
+ } from "./chunk-6MRF2PE2.js";
76
76
  import {
77
77
  resolveInsideRoot
78
78
  } from "./chunk-NUBSJGQZ.js";
@@ -84,20 +84,20 @@ import {
84
84
  getAvailableClis,
85
85
  sleep,
86
86
  withTimeout
87
- } from "./chunk-ZC4KHPRL.js";
87
+ } from "./chunk-N36KDK3E.js";
88
88
  import {
89
89
  BUILT_IN_EXPERTS,
90
90
  BuiltInExpertTypeSchema,
91
91
  ExpertConfigSchema,
92
92
  getSecurityKnowledgePrompt
93
- } from "./chunk-GJVHRJO2.js";
93
+ } from "./chunk-O3CBMPGT.js";
94
94
  import {
95
95
  createSessionMemory
96
- } from "./chunk-I37IQ26H.js";
96
+ } from "./chunk-TR74DSB4.js";
97
97
  import {
98
98
  MemoryImportance,
99
99
  calculateTextJaccardSimilarity
100
- } from "./chunk-KVZNQWWI.js";
100
+ } from "./chunk-O4AJGETH.js";
101
101
  import {
102
102
  STOPWORDS,
103
103
  capitalize,
@@ -106,10 +106,10 @@ import {
106
106
  } from "./chunk-633WH2ML.js";
107
107
  import {
108
108
  generateMcpConfig
109
- } from "./chunk-FTWGBV7S.js";
109
+ } from "./chunk-R4FVXOZF.js";
110
110
  import {
111
111
  getFallbackChainForCategory
112
- } from "./chunk-CDWQP3UC.js";
112
+ } from "./chunk-F2YQX6Q6.js";
113
113
  import {
114
114
  AGENT_ROUTER_TIMEOUTS,
115
115
  API_TIMEOUTS,
@@ -174,7 +174,7 @@ import {
174
174
  ok,
175
175
  toExpertTaskAnalysisResult,
176
176
  withStep
177
- } from "./chunk-FAUHVWYZ.js";
177
+ } from "./chunk-NV63LTMM.js";
178
178
  import {
179
179
  nexusDataPath
180
180
  } from "./chunk-FDNWRZNJ.js";
@@ -4561,7 +4561,7 @@ var ConsensusProtocol = class {
4561
4561
  requireUnanimous: config.requireUnanimous
4562
4562
  });
4563
4563
  const votingTask = createVotingTask(config.task);
4564
- const promises = config.experts.map(async (expertId) => {
4564
+ const promises2 = config.experts.map(async (expertId) => {
4565
4565
  const agent = agents.get(expertId);
4566
4566
  if (agent === void 0) {
4567
4567
  return { expertId, result: err(new AgentError(`Agent not found: ${expertId}`)) };
@@ -4569,7 +4569,7 @@ var ConsensusProtocol = class {
4569
4569
  const result = await this.executeAgentTask(agent, votingTask);
4570
4570
  return { expertId, result };
4571
4571
  });
4572
- const results = await Promise.all(promises);
4572
+ const results = await Promise.all(promises2);
4573
4573
  for (const { expertId, result } of results) {
4574
4574
  if (result.ok) {
4575
4575
  this.session.submitResult(expertId, result.value);
@@ -6137,7 +6137,7 @@ var ParallelProtocol = class extends BaseProtocol {
6137
6137
  sessionId: config.sessionId,
6138
6138
  expertCount: config.experts.length
6139
6139
  });
6140
- const promises = config.experts.map(async (expertId) => {
6140
+ const promises2 = config.experts.map(async (expertId) => {
6141
6141
  const agent = agents.get(expertId);
6142
6142
  if (agent === void 0) {
6143
6143
  return { expertId, result: err(new AgentError(`Agent not found: ${expertId}`)) };
@@ -6145,7 +6145,7 @@ var ParallelProtocol = class extends BaseProtocol {
6145
6145
  const result = await this.executeAgentTask(agent, config.task);
6146
6146
  return { expertId, result };
6147
6147
  });
6148
- const results = await Promise.all(promises);
6148
+ const results = await Promise.all(promises2);
6149
6149
  for (const { expertId, result } of results) {
6150
6150
  if (result.ok) {
6151
6151
  session.submitResult(expertId, result.value);
@@ -11564,6 +11564,45 @@ var DEFAULT_EXPERTS = [
11564
11564
  secondaryDomains: ["security", "code"],
11565
11565
  weight: 1,
11566
11566
  available: true
11567
+ },
11568
+ // Three entries below were missing pre-#2341 even though `BuiltInExpertType`
11569
+ // listed them. `createDefaultRegistry()` consumers were silently missing
11570
+ // these experts. ExpertTaskDomain ('code'|'security'|'architecture'|
11571
+ // 'documentation'|'testing'|'infrastructure'|'general') doesn't include
11572
+ // research/qa/data-visualization as primary domains, so they map to the
11573
+ // closest fit ('general' / 'testing' / 'general').
11574
+ {
11575
+ id: "research-expert",
11576
+ role: "research_expert",
11577
+ name: "Research Expert",
11578
+ description: "Specialized in literature review, gap analysis, and technique extraction",
11579
+ capabilities: ["task_execution", "research", "collaboration"],
11580
+ primaryDomain: "general",
11581
+ secondaryDomains: ["documentation"],
11582
+ weight: 0.9,
11583
+ available: true
11584
+ },
11585
+ {
11586
+ id: "qa-expert",
11587
+ role: "qa_expert",
11588
+ name: "Quality Assurance Expert",
11589
+ description: "Specialized in review against requirements, regression checks, and standards compliance",
11590
+ capabilities: ["task_execution", "code_review", "tool_use"],
11591
+ primaryDomain: "testing",
11592
+ secondaryDomains: ["code", "security"],
11593
+ weight: 1,
11594
+ available: true
11595
+ },
11596
+ {
11597
+ id: "data-visualization-expert",
11598
+ role: "data_visualization_expert",
11599
+ name: "Data Visualization Expert",
11600
+ description: "Specialized in chart design, dashboards, and interactive visualizations",
11601
+ capabilities: ["task_execution", "code_generation", "collaboration"],
11602
+ primaryDomain: "general",
11603
+ secondaryDomains: ["documentation", "code"],
11604
+ weight: 0.9,
11605
+ available: true
11567
11606
  }
11568
11607
  ];
11569
11608
 
@@ -19130,10 +19169,10 @@ async function executeParallel(steps, context, stepExecutor, options) {
19130
19169
  }
19131
19170
  }
19132
19171
  async function runAllSteps(steps, context, stepExecutor, opts, state) {
19133
- const promises = steps.map(
19172
+ const promises2 = steps.map(
19134
19173
  (step) => executeStepInQueue(step, context, stepExecutor, opts, state)
19135
19174
  );
19136
- await Promise.allSettled(promises);
19175
+ await Promise.allSettled(promises2);
19137
19176
  }
19138
19177
  async function executeStepInQueue(step, context, stepExecutor, opts, state) {
19139
19178
  try {
@@ -26765,8 +26804,8 @@ function applyStateUpdates(graph, state, updates) {
26765
26804
  return newState;
26766
26805
  }
26767
26806
  async function executeNodes(graph, nodeIds, state, options) {
26768
- const promises = nodeIds.map((id) => executeSingleNode(graph, id, state, options));
26769
- return Promise.all(promises);
26807
+ const promises2 = nodeIds.map((id) => executeSingleNode(graph, id, state, options));
26808
+ return Promise.all(promises2);
26770
26809
  }
26771
26810
  function preconditionFailedResult(nodeId, results, startTime) {
26772
26811
  const failed = results.find((r) => !r.passed);
@@ -28183,8 +28222,30 @@ function logViolations(context, violations, mode) {
28183
28222
  }
28184
28223
  }
28185
28224
 
28186
- // src/pipeline/v2-delegate.ts
28225
+ // src/pipeline/task-contract-builders.ts
28187
28226
  import { randomUUID as randomUUID8 } from "crypto";
28227
+ function buildBaseTaskContract(input) {
28228
+ const now = Date.now();
28229
+ return {
28230
+ id: `${input.idPrefix}-${randomUUID8().slice(0, 8)}`,
28231
+ description: input.task,
28232
+ status: "approved",
28233
+ analysis: input.analysis,
28234
+ constraints: { scope: [] },
28235
+ requiredCapabilities: { tools: [], experts: [] },
28236
+ capabilityGaps: {
28237
+ available: { tools: [], experts: [] },
28238
+ gaps: [],
28239
+ allSatisfied: true
28240
+ },
28241
+ artifacts: [],
28242
+ metadata: { ...input.metadata },
28243
+ createdAt: now,
28244
+ updatedAt: now
28245
+ };
28246
+ }
28247
+
28248
+ // src/pipeline/v2-delegate.ts
28188
28249
  var logger21 = createLogger({ component: "V2Delegate" });
28189
28250
  function createDelegatePipeline(task) {
28190
28251
  const plan = buildPlan(task);
@@ -28192,7 +28253,6 @@ function createDelegatePipeline(task) {
28192
28253
  return runner.compile(plan);
28193
28254
  }
28194
28255
  function delegateInputToTaskContract(input) {
28195
- const now = Date.now();
28196
28256
  const metadata = { source: "delegate_to_model" };
28197
28257
  if (input.preferred_capability !== void 0) {
28198
28258
  metadata["preferredCapability"] = input.preferred_capability;
@@ -28206,27 +28266,12 @@ function delegateInputToTaskContract(input) {
28206
28266
  if (input.estimate_tokens === true) {
28207
28267
  metadata["estimateTokens"] = true;
28208
28268
  }
28209
- return {
28210
- id: `delegate-${randomUUID8().slice(0, 8)}`,
28211
- description: input.task,
28212
- status: "approved",
28213
- analysis: {
28214
- complexity: "moderate",
28215
- taskType: "routing",
28216
- ambiguityScore: 0.1
28217
- },
28218
- constraints: { scope: [] },
28219
- requiredCapabilities: { tools: [], experts: [] },
28220
- capabilityGaps: {
28221
- available: { tools: [], experts: [] },
28222
- gaps: [],
28223
- allSatisfied: true
28224
- },
28225
- artifacts: [],
28226
- metadata,
28227
- createdAt: now,
28228
- updatedAt: now
28229
- };
28269
+ return buildBaseTaskContract({
28270
+ idPrefix: "delegate",
28271
+ task: input.task,
28272
+ analysis: { complexity: "moderate", taskType: "routing", ambiguityScore: 0.1 },
28273
+ metadata
28274
+ });
28230
28275
  }
28231
28276
  async function executeDelegatePipeline(task) {
28232
28277
  const policyResult = checkPipelinePolicy(task, "route");
@@ -28320,25 +28365,16 @@ function buildPlan(task) {
28320
28365
  }
28321
28366
 
28322
28367
  // src/pipeline/v2-orchestrate.ts
28323
- import { randomUUID as randomUUID9 } from "crypto";
28324
28368
  function orchestrateInputToTaskContract(input) {
28325
- const now = Date.now();
28326
28369
  const metadata = { source: "orchestrate" };
28327
28370
  if (input.context !== void 0) metadata["context"] = input.context;
28328
28371
  if (input.maxIterations !== void 0) metadata["maxIterations"] = input.maxIterations;
28329
- return {
28330
- id: `orchestrate-${randomUUID9().slice(0, 8)}`,
28331
- description: input.task,
28332
- status: "approved",
28372
+ return buildBaseTaskContract({
28373
+ idPrefix: "orchestrate",
28374
+ task: input.task,
28333
28375
  analysis: { complexity: "high", taskType: "orchestration", ambiguityScore: 0.3 },
28334
- constraints: { scope: [] },
28335
- requiredCapabilities: { tools: [], experts: [] },
28336
- capabilityGaps: { available: { tools: [], experts: [] }, gaps: [], allSatisfied: true },
28337
- artifacts: [],
28338
- metadata,
28339
- createdAt: now,
28340
- updatedAt: now
28341
- };
28376
+ metadata
28377
+ });
28342
28378
  }
28343
28379
  async function executeOrchestratePipeline(task) {
28344
28380
  const policyResult = checkPipelinePolicy(task, "execute");
@@ -28375,7 +28411,7 @@ async function executeOrchestratePipeline(task) {
28375
28411
  }
28376
28412
 
28377
28413
  // src/orchestration/orchestrator-factory.ts
28378
- import { randomUUID as randomUUID10 } from "crypto";
28414
+ import { randomUUID as randomUUID9 } from "crypto";
28379
28415
 
28380
28416
  // src/orchestration/orchestrator-adapters.ts
28381
28417
  function generateId2(prefix) {
@@ -28574,7 +28610,7 @@ var WorkflowOrchestratorAdapter = class {
28574
28610
  executions = /* @__PURE__ */ new Map();
28575
28611
  history = [];
28576
28612
  constructor(engine, logger56) {
28577
- this.id = `workflow-${randomUUID10().slice(0, 8)}`;
28613
+ this.id = `workflow-${randomUUID9().slice(0, 8)}`;
28578
28614
  this.engine = engine;
28579
28615
  this.logger = logger56 ?? createLogger({ component: "WorkflowOrchestratorAdapter" });
28580
28616
  }
@@ -28587,7 +28623,7 @@ var WorkflowOrchestratorAdapter = class {
28587
28623
  )
28588
28624
  );
28589
28625
  }
28590
- const executionId = randomUUID10();
28626
+ const executionId = randomUUID9();
28591
28627
  const startTime = getTimeProvider().now();
28592
28628
  this.setRunning(executionId);
28593
28629
  try {
@@ -36973,7 +37009,7 @@ function createResearchQueryHandler(deps) {
36973
37009
  const logger56 = deps.logger ?? createLogger({ tool: "research_query" });
36974
37010
  return withToolError("Research query failed", logger56, async () => {
36975
37011
  const result = await executeQuery(validationResult.data);
36976
- return toolSuccess(JSON.stringify(result, null, 2));
37012
+ return toolSuccessStructured(result);
36977
37013
  });
36978
37014
  };
36979
37015
  }
@@ -36997,9 +37033,14 @@ function registerResearchQueryTool(server, deps) {
36997
37033
  timeoutMs,
36998
37034
  logger: logger56
36999
37035
  });
37036
+ const outputSchema = {
37037
+ action: z62.string(),
37038
+ success: z62.boolean(),
37039
+ data: z62.unknown()
37040
+ };
37000
37041
  server.registerTool(
37001
37042
  "research_query",
37002
- { description, inputSchema: toolSchema },
37043
+ { description, inputSchema: toolSchema, outputSchema },
37003
37044
  toSdkCallback(wrappedHandler)
37004
37045
  );
37005
37046
  logger56.info("Registered research_query tool with secure handler and timeout protection");
@@ -37065,7 +37106,7 @@ function createResearchAddHandler(deps) {
37065
37106
  if (!result.success) {
37066
37107
  return toolError(result.message);
37067
37108
  }
37068
- return toolSuccess(JSON.stringify(result, null, 2));
37109
+ return toolSuccessStructured(result);
37069
37110
  });
37070
37111
  };
37071
37112
  }
@@ -37088,9 +37129,16 @@ function registerResearchAddTool(server, deps) {
37088
37129
  timeoutMs,
37089
37130
  logger: logger56
37090
37131
  });
37132
+ const outputSchema = {
37133
+ success: z63.boolean(),
37134
+ paperId: z63.string().optional(),
37135
+ title: z63.string().optional(),
37136
+ message: z63.string(),
37137
+ dryRun: z63.boolean().optional()
37138
+ };
37091
37139
  server.registerTool(
37092
37140
  "research_add",
37093
- { description, inputSchema: toolSchema },
37141
+ { description, inputSchema: toolSchema, outputSchema },
37094
37142
  toSdkCallback(wrappedHandler)
37095
37143
  );
37096
37144
  logger56.info("Registered research_add tool with secure handler and timeout protection");
@@ -37247,7 +37295,7 @@ function createResearchAddSourceHandler(deps) {
37247
37295
  if (!result.success) {
37248
37296
  return toolError(result.message);
37249
37297
  }
37250
- return toolSuccess(JSON.stringify(result, null, 2));
37298
+ return toolSuccessStructured(result);
37251
37299
  });
37252
37300
  };
37253
37301
  }
@@ -37286,10 +37334,19 @@ function registerResearchAddSourceTool(server, deps) {
37286
37334
  });
37287
37335
  server.registerTool(
37288
37336
  "research_add_source",
37289
- { description, inputSchema: toolSchema },
37337
+ { description, inputSchema: toolSchema, outputSchema: RESEARCH_ADD_SOURCE_OUTPUT_SCHEMA },
37290
37338
  toSdkCallback(wrappedHandler)
37291
37339
  );
37292
37340
  }
37341
+ var RESEARCH_ADD_SOURCE_OUTPUT_SCHEMA = {
37342
+ success: z64.boolean(),
37343
+ sourceId: z64.string().optional(),
37344
+ name: z64.string().optional(),
37345
+ quality_score: z64.number().optional(),
37346
+ evidence_tier: z64.string().optional(),
37347
+ message: z64.string().optional(),
37348
+ dryRun: z64.boolean().optional()
37349
+ };
37293
37350
 
37294
37351
  // src/mcp/tools/research-discover.ts
37295
37352
  import { z as z65 } from "zod";
@@ -37557,7 +37614,7 @@ function createResearchDiscoverHandler(deps) {
37557
37614
  const response = await withToolError("Discovery failed", logger56, async () => {
37558
37615
  const result = await executeDiscovery(validationResult.data, logger56);
37559
37616
  recordDiscoverySuccess(result.topic, result.newItems, result.sourcesQueried);
37560
- return toolSuccess(JSON.stringify(result, null, 2));
37617
+ return toolSuccessStructured(result);
37561
37618
  });
37562
37619
  const durationMs = Date.now() - startMs;
37563
37620
  if (response.isError === true) {
@@ -37602,11 +37659,21 @@ function registerResearchDiscoverTool(server, deps) {
37602
37659
  });
37603
37660
  server.registerTool(
37604
37661
  "research_discover",
37605
- { description, inputSchema: toolSchema },
37662
+ { description, inputSchema: toolSchema, outputSchema: RESEARCH_DISCOVER_OUTPUT_SCHEMA },
37606
37663
  toSdkCallback(wrappedHandler)
37607
37664
  );
37608
37665
  logger56.info("Registered research_discover tool with secure handler and timeout protection");
37609
37666
  }
37667
+ var RESEARCH_DISCOVER_OUTPUT_SCHEMA = {
37668
+ topic: z65.string().optional(),
37669
+ sourcesQueried: z65.array(z65.string()).optional(),
37670
+ failedSources: z65.array(z65.string()).optional(),
37671
+ items: z65.array(z65.unknown()).optional(),
37672
+ totalFound: z65.number().optional(),
37673
+ alreadyInRegistry: z65.number().optional(),
37674
+ newItems: z65.number().optional(),
37675
+ filteredByRelevance: z65.number().optional()
37676
+ };
37610
37677
 
37611
37678
  // src/mcp/tools/research-analyze.ts
37612
37679
  import { z as z66 } from "zod";
@@ -37849,7 +37916,7 @@ function createResearchAnalyzeHandler(deps) {
37849
37916
  const logger56 = deps.logger ?? createLogger({ tool: "research_analyze" });
37850
37917
  return withToolError("Analysis failed", logger56, async () => {
37851
37918
  const result = await executeAnalysis(validationResult.data);
37852
- return toolSuccess(JSON.stringify(result, null, 2));
37919
+ return toolSuccessStructured(result);
37853
37920
  });
37854
37921
  };
37855
37922
  }
@@ -37870,9 +37937,15 @@ function registerResearchAnalyzeTool(server, deps) {
37870
37937
  timeoutMs,
37871
37938
  logger: logger56
37872
37939
  });
37940
+ const outputSchema = {
37941
+ focus: z66.string().optional(),
37942
+ success: z66.boolean().optional(),
37943
+ analysis: z66.unknown().optional(),
37944
+ recommendations: z66.array(z66.string()).optional()
37945
+ };
37873
37946
  server.registerTool(
37874
37947
  "research_analyze",
37875
- { description, inputSchema: toolSchema },
37948
+ { description, inputSchema: toolSchema, outputSchema },
37876
37949
  toSdkCallback(wrappedHandler)
37877
37950
  );
37878
37951
  logger56.info("Registered research_analyze tool with secure handler and timeout protection");
@@ -38008,7 +38081,7 @@ function createCatalogReviewHandler(deps) {
38008
38081
  if (!result.success) {
38009
38082
  return toolError(result.message);
38010
38083
  }
38011
- return toolSuccess(JSON.stringify(result, null, 2));
38084
+ return toolSuccessStructured(result);
38012
38085
  });
38013
38086
  };
38014
38087
  }
@@ -38031,9 +38104,15 @@ function registerResearchCatalogReviewTool(server, deps) {
38031
38104
  timeoutMs,
38032
38105
  logger: logger56
38033
38106
  });
38107
+ const outputSchema = {
38108
+ action: z67.string().optional(),
38109
+ success: z67.boolean().optional(),
38110
+ message: z67.string().optional(),
38111
+ data: z67.unknown().optional()
38112
+ };
38034
38113
  server.registerTool(
38035
38114
  "research_catalog_review",
38036
- { description, inputSchema: toolSchema },
38115
+ { description, inputSchema: toolSchema, outputSchema },
38037
38116
  toSdkCallback(wrappedHandler)
38038
38117
  );
38039
38118
  logger56.info("Registered research_catalog_review tool");
@@ -38056,7 +38135,7 @@ function createResearchSynthesizeHandler(deps) {
38056
38135
  if (!result.ok) {
38057
38136
  return toolError(`Synthesis failed: ${result.error.message}`);
38058
38137
  }
38059
- return toolSuccess(JSON.stringify(result.value, null, 2));
38138
+ return toolSuccessStructured(result.value);
38060
38139
  });
38061
38140
  };
38062
38141
  }
@@ -38076,9 +38155,15 @@ function registerResearchSynthesizeTool(server, deps) {
38076
38155
  timeoutMs,
38077
38156
  logger: logger56
38078
38157
  });
38158
+ const outputSchema = {
38159
+ clusters: z68.array(z68.unknown()).optional(),
38160
+ alignmentSummary: z68.unknown().optional(),
38161
+ crossCuttingThemes: z68.array(z68.unknown()).optional(),
38162
+ generatedAt: z68.string().optional()
38163
+ };
38079
38164
  server.registerTool(
38080
38165
  "research_synthesize",
38081
- { description, inputSchema: toolSchema },
38166
+ { description, inputSchema: toolSchema, outputSchema },
38082
38167
  toSdkCallback(wrappedHandler)
38083
38168
  );
38084
38169
  logger56.info("Registered research_synthesize tool");
@@ -39236,7 +39321,7 @@ async function memoryQueryHandler(args, ctx) {
39236
39321
  }
39237
39322
  return withToolError("Memory query failed", ctx.logger, async () => {
39238
39323
  const result = await executeMemoryQuery(validationResult.data, ctx.logger);
39239
- return toolSuccess(JSON.stringify(result, null, 2));
39324
+ return toolSuccessStructured(result);
39240
39325
  });
39241
39326
  }
39242
39327
  function registerMemoryQueryTool(server, deps) {
@@ -39254,9 +39339,16 @@ function registerMemoryQueryTool(server, deps) {
39254
39339
  });
39255
39340
  const timeoutMs = getToolTimeout("memory_query", deps.security);
39256
39341
  const wrappedHandler = wrapToolWithTimeout("memory_query", secureHandler, { timeoutMs, logger: logger56 });
39342
+ const outputSchema = {
39343
+ query: z72.string(),
39344
+ expandedQuery: z72.string().optional(),
39345
+ results: z72.array(z72.unknown()),
39346
+ count: z72.number(),
39347
+ source: z72.string()
39348
+ };
39257
39349
  server.registerTool(
39258
39350
  "memory_query",
39259
- { description, inputSchema: toolSchema },
39351
+ { description, inputSchema: toolSchema, outputSchema },
39260
39352
  toSdkCallback(wrappedHandler)
39261
39353
  );
39262
39354
  logger56.info("Registered memory_query tool");
@@ -39322,7 +39414,7 @@ async function memoryStatsHandler(args, ctx) {
39322
39414
  }
39323
39415
  return withToolError("Memory stats failed", ctx.logger, async () => {
39324
39416
  const result = await collectMemoryStats(validationResult.data, ctx.logger);
39325
- return toolSuccess(JSON.stringify(result, null, 2));
39417
+ return toolSuccessStructured(result);
39326
39418
  });
39327
39419
  }
39328
39420
  function registerMemoryStatsTool(server, deps) {
@@ -39338,9 +39430,18 @@ function registerMemoryStatsTool(server, deps) {
39338
39430
  });
39339
39431
  const timeoutMs = getToolTimeout("memory_stats", deps.security);
39340
39432
  const wrappedHandler = wrapToolWithTimeout("memory_stats", secureHandler, { timeoutMs, logger: logger56 });
39433
+ const outputSchema = {
39434
+ backends: z73.unknown(),
39435
+ session: z73.unknown().optional(),
39436
+ belief: z73.unknown().optional(),
39437
+ typed: z73.unknown().optional(),
39438
+ mobimem: z73.unknown().optional(),
39439
+ decay: z73.unknown().optional(),
39440
+ collectedAt: z73.string().optional()
39441
+ };
39341
39442
  server.registerTool(
39342
39443
  "memory_stats",
39343
- { description, inputSchema: toolSchema },
39444
+ { description, inputSchema: toolSchema, outputSchema },
39344
39445
  toSdkCallback(wrappedHandler)
39345
39446
  );
39346
39447
  logger56.info("Registered memory_stats tool");
@@ -39465,7 +39566,7 @@ async function memoryWriteHandler(args, ctx) {
39465
39566
  if (!result.success) {
39466
39567
  return toolError(JSON.stringify(result, null, 2));
39467
39568
  }
39468
- return toolSuccess(JSON.stringify(result, null, 2));
39569
+ return toolSuccessStructured(result);
39469
39570
  });
39470
39571
  }
39471
39572
  function registerMemoryWriteTool(server, deps) {
@@ -39487,9 +39588,16 @@ function registerMemoryWriteTool(server, deps) {
39487
39588
  });
39488
39589
  const timeoutMs = getToolTimeout("memory_write", deps.security);
39489
39590
  const wrappedHandler = wrapToolWithTimeout("memory_write", secureHandler, { timeoutMs, logger: logger56 });
39591
+ const outputSchema = {
39592
+ success: z74.boolean(),
39593
+ backend: z74.string(),
39594
+ key: z74.string(),
39595
+ deduplicated: z74.boolean().optional(),
39596
+ error: z74.string().optional()
39597
+ };
39490
39598
  server.registerTool(
39491
39599
  "memory_write",
39492
- { description, inputSchema: toolSchema },
39600
+ { description, inputSchema: toolSchema, outputSchema },
39493
39601
  toSdkCallback(wrappedHandler)
39494
39602
  );
39495
39603
  logger56.info("Registered memory_write tool");
@@ -41223,7 +41331,7 @@ async function tryIssueTriage(task) {
41223
41331
  try {
41224
41332
  const issueMatch = task.match(/github\.com\/([^/]+\/[^/]+)\/issues\/(\d+)/);
41225
41333
  if (issueMatch === null) return null;
41226
- const { createIssueTriage } = await import("./issue-triage-DGDKQQTD.js");
41334
+ const { createIssueTriage } = await import("./issue-triage-VOZNNCUG.js");
41227
41335
  const triage = createIssueTriage();
41228
41336
  const owner = issueMatch[1] ?? "";
41229
41337
  const num = issueMatch[2] ?? "";
@@ -41251,7 +41359,7 @@ var VALID_TEMPLATES = /* @__PURE__ */ new Set([
41251
41359
  ]);
41252
41360
  async function classifyWithLLM(task) {
41253
41361
  try {
41254
- const { executeExpert: executeExpert2 } = await import("./expert-bridge-R6FQWUHB.js");
41362
+ const { executeExpert: executeExpert2 } = await import("./expert-bridge-5IPLSDJH.js");
41255
41363
  const prompt = [
41256
41364
  "Classify this task into exactly one pipeline template.",
41257
41365
  "Templates: dev (implementation/bug fix/refactor), research (investigate/evaluate/compare),",
@@ -42045,7 +42153,7 @@ var memoryInitPromise = null;
42045
42153
  async function initPipelineMemory() {
42046
42154
  if (cachedMemory !== null) return cachedMemory;
42047
42155
  try {
42048
- const { createSessionMemory: createSessionMemory2 } = await import("./session-memory-IOXXN6XA.js");
42156
+ const { createSessionMemory: createSessionMemory2 } = await import("./session-memory-ESTZAPL2.js");
42049
42157
  const { getLearningDir } = await import("./learning-persistence-FILWP3IR.js");
42050
42158
  const mem = createSessionMemory2(getLearningDir());
42051
42159
  mem.startSession(`pipeline-${String(Date.now())}`);
@@ -42097,7 +42205,7 @@ async function persistMobiMemState() {
42097
42205
  const { isPersistenceEnabled } = await import("./learning-persistence-FILWP3IR.js");
42098
42206
  if (!isPersistenceEnabled()) return;
42099
42207
  const { nexusDataPath: nexusDataPath2 } = await import("./nexus-data-dir-M6DYKIHJ.js");
42100
- const { createMobiMem } = await import("./mobimem-NO7I2Y4O.js");
42208
+ const { createMobiMem } = await import("./mobimem-7KQVPLAW.js");
42101
42209
  const mobimem = createMobiMem();
42102
42210
  const savePath = nexusDataPath2("memory", "mobimem-state.json");
42103
42211
  await mobimem.save(savePath);
@@ -42114,7 +42222,7 @@ function recordRoutingExperience(category, success, durationMs) {
42114
42222
  callRecord(routingMemoryCache);
42115
42223
  return;
42116
42224
  }
42117
- void import("./routing-memory-SALB3DZI.js").then(({ createRoutingMemory }) => {
42225
+ void import("./routing-memory-BGK2HMC3.js").then(({ createRoutingMemory }) => {
42118
42226
  routingMemoryCache = createRoutingMemory();
42119
42227
  callRecord(routingMemoryCache);
42120
42228
  }).catch((error) => {
@@ -42143,7 +42251,7 @@ ${text}` : "";
42143
42251
  }
42144
42252
  async function getWeatherContext() {
42145
42253
  try {
42146
- const { generateWeatherReport: generateWeatherReport2 } = await import("./weather-report-SBJRXFTW.js");
42254
+ const { generateWeatherReport: generateWeatherReport2 } = await import("./weather-report-HUY35FUZ.js");
42147
42255
  const report = generateWeatherReport2({ includeAdaptive: true });
42148
42256
  const mappings = "recommendedMappings" in report ? report.recommendedMappings : [];
42149
42257
  if (!Array.isArray(mappings) || mappings.length === 0) return "";
@@ -42160,7 +42268,7 @@ ${lines}
42160
42268
  }
42161
42269
  async function getMemoryContext(task) {
42162
42270
  try {
42163
- const { createSessionMemory: createSessionMemory2 } = await import("./session-memory-IOXXN6XA.js");
42271
+ const { createSessionMemory: createSessionMemory2 } = await import("./session-memory-ESTZAPL2.js");
42164
42272
  const { getLearningDir } = await import("./learning-persistence-FILWP3IR.js");
42165
42273
  const memory = createSessionMemory2(getLearningDir(), { maxLearningsInContext: 10 });
42166
42274
  const learnings = memory.searchLearnings(task.slice(0, 200));
@@ -42253,7 +42361,7 @@ ${contextBlock}`;
42253
42361
  const strategy = config.votingStrategy ?? "higher_order";
42254
42362
  await postProgress(config, "Vote", `Running consensus with ${strategy} strategy...`);
42255
42363
  try {
42256
- const { executeVoting } = await import("./consensus-vote-6FKSINXV.js");
42364
+ const { executeVoting } = await import("./consensus-vote-PIU3D3KP.js");
42257
42365
  const votingResult = await executeVoting(
42258
42366
  {
42259
42367
  proposal: plan.slice(0, 4e3),
@@ -43118,7 +43226,7 @@ async function extractSymbolsForTask(task) {
43118
43226
  }
43119
43227
  async function retrieveAdaptiveMemory(task) {
43120
43228
  try {
43121
- const { AdaptiveMemoryBackend } = await import("./adaptive-memory-2UIPH67R.js");
43229
+ const { AdaptiveMemoryBackend } = await import("./adaptive-memory-XD5O3TC4.js");
43122
43230
  const path19 = await import("path");
43123
43231
  const { nexusDataPath: nexusDataPath2 } = await import("./nexus-data-dir-M6DYKIHJ.js");
43124
43232
  const baseDir = nexusDataPath2("memory");
@@ -43137,7 +43245,7 @@ async function retrieveAdaptiveMemory(task) {
43137
43245
  }
43138
43246
  async function queryResearchRegistry(task) {
43139
43247
  try {
43140
- const { synthesizeResearch: synthesizeResearch2 } = await import("./research-helpers-synthesize-SH34FJIE.js");
43248
+ const { synthesizeResearch: synthesizeResearch2 } = await import("./research-helpers-synthesize-B3C6BFCX.js");
43141
43249
  const topic = task.split(/[.!?\n]/).filter((s) => s.trim().length > 10)[0]?.trim();
43142
43250
  if (topic === void 0) return null;
43143
43251
  const result = await synthesizeResearch2(topic.slice(0, 50));
@@ -43222,7 +43330,7 @@ function createScanStageWrapper() {
43222
43330
  try {
43223
43331
  const slug = ctx.task.match(/([a-zA-Z0-9._-]+\/[a-zA-Z0-9._-]+)/)?.[1];
43224
43332
  if (slug !== void 0) {
43225
- const { generateSecurityPlan: generateSecurityPlan2 } = await import("./repo-security-plan-BZ3WOIEZ.js");
43333
+ const { generateSecurityPlan: generateSecurityPlan2 } = await import("./repo-security-plan-VZTTNXYJ.js");
43226
43334
  const plan = await generateSecurityPlan2({ repo: slug, maxScanners: 10 });
43227
43335
  const recs = plan.recommendations.slice(0, 5).map((r) => `${r.priority}: ${r.displayName} (${r.category})`).join("; ");
43228
43336
  ctx.sharedMemory.write("scan", "decision", { recommendations: recs });
@@ -43711,22 +43819,26 @@ function buildOutput2(result) {
43711
43819
  rateLimitHint: result.error?.toLowerCase().includes("rate limit") === true ? "Consider using quickMode or increasing delay between pipeline runs" : void 0
43712
43820
  };
43713
43821
  }
43714
- function resolveTask(task, specFile) {
43822
+ async function resolveTask(task, specFile) {
43715
43823
  if (specFile === void 0) return task;
43716
43824
  const resolved = path11.resolve(specFile);
43717
43825
  const cwdRoot = path11.resolve(".");
43718
43826
  if (!resolved.startsWith(cwdRoot)) {
43719
43827
  throw new Error(`Path traversal denied: specFile must be within ${cwdRoot}`);
43720
43828
  }
43721
- if (!fs12.existsSync(resolved)) {
43722
- throw new Error(`Spec file not found: ${resolved}`);
43723
- }
43724
- const specContent = fs12.readFileSync(resolved, "utf-8");
43725
- return `${specContent}
43829
+ try {
43830
+ const specContent = await fs12.promises.readFile(resolved, "utf-8");
43831
+ return `${specContent}
43726
43832
 
43727
43833
  ---
43728
43834
 
43729
43835
  ${task}`;
43836
+ } catch (err2) {
43837
+ if (err2.code === "ENOENT") {
43838
+ throw new Error(`Spec file not found: ${resolved}`);
43839
+ }
43840
+ throw err2;
43841
+ }
43730
43842
  }
43731
43843
  function selectStageRegistry(template, task, agentStages) {
43732
43844
  const effectiveTemplate = template ?? classifyTask(task).pipelineType;
@@ -43738,37 +43850,42 @@ function selectStageRegistry(template, task, agentStages) {
43738
43850
  }
43739
43851
  return createDevStageRegistry(agentStages);
43740
43852
  }
43853
+ var RUN_PIPELINE_DESCRIPTION = "Single unified entry point for all pipeline templates (dev/research/audit/greenfield). Auto-detects template from task content or accepts an explicit override.";
43741
43854
  function registerPipelineTool(server, _deps) {
43742
- server.tool("run_pipeline", PipelineInputSchema.shape, async (args) => {
43743
- const input = PipelineInputSchema.parse(args);
43744
- if (input.simulateVotes) {
43745
- warnIfSimulatedOutsideTests("run_pipeline", createLogger({ tool: "run_pipeline" }));
43746
- }
43747
- try {
43748
- const task = resolveTask(input.task, input.specFile);
43749
- const agentStages = createAgentStages({
43750
- simulateVotes: input.simulateVotes,
43751
- votingStrategy: input.votingStrategy,
43752
- quickMode: input.quickMode
43753
- });
43754
- const stages = selectStageRegistry(input.template, task, agentStages);
43755
- const result = await runAdaptiveOrchestrator(task, {
43756
- stages,
43757
- templateId: input.template,
43758
- dryRun: input.dryRun
43759
- });
43760
- const structured = buildOutput2(result);
43761
- return {
43762
- content: [{ type: "text", text: JSON.stringify(structured, null, 2) }],
43763
- structuredContent: structured
43764
- };
43765
- } catch (error) {
43766
- return {
43767
- content: [{ type: "text", text: `Pipeline error: ${getErrorMessage(error)}` }],
43768
- isError: true
43769
- };
43855
+ server.registerTool(
43856
+ "run_pipeline",
43857
+ { description: RUN_PIPELINE_DESCRIPTION, inputSchema: PipelineInputSchema.shape },
43858
+ async (args) => {
43859
+ const input = PipelineInputSchema.parse(args);
43860
+ if (input.simulateVotes) {
43861
+ warnIfSimulatedOutsideTests("run_pipeline", createLogger({ tool: "run_pipeline" }));
43862
+ }
43863
+ try {
43864
+ const task = await resolveTask(input.task, input.specFile);
43865
+ const agentStages = createAgentStages({
43866
+ simulateVotes: input.simulateVotes,
43867
+ votingStrategy: input.votingStrategy,
43868
+ quickMode: input.quickMode
43869
+ });
43870
+ const stages = selectStageRegistry(input.template, task, agentStages);
43871
+ const result = await runAdaptiveOrchestrator(task, {
43872
+ stages,
43873
+ templateId: input.template,
43874
+ dryRun: input.dryRun
43875
+ });
43876
+ const structured = buildOutput2(result);
43877
+ return {
43878
+ content: [{ type: "text", text: JSON.stringify(structured, null, 2) }],
43879
+ structuredContent: structured
43880
+ };
43881
+ } catch (error) {
43882
+ return {
43883
+ content: [{ type: "text", text: `Pipeline error: ${getErrorMessage(error)}` }],
43884
+ isError: true
43885
+ };
43886
+ }
43770
43887
  }
43771
- });
43888
+ );
43772
43889
  }
43773
43890
 
43774
43891
  // src/mcp/tools/supply-chain-tradeoff-panel.ts
@@ -45758,7 +45875,7 @@ var FeedbackCollectorConfigSchema = z103.object({
45758
45875
  });
45759
45876
 
45760
45877
  // src/learning/outcome-feedback-helpers.ts
45761
- import { randomUUID as randomUUID11 } from "crypto";
45878
+ import { randomUUID as randomUUID10 } from "crypto";
45762
45879
  function countOutcomesByClass(outcomes) {
45763
45880
  const counts = {
45764
45881
  success: 0,
@@ -45811,7 +45928,7 @@ function generateRewardExplanation(outcome, reward) {
45811
45928
  }
45812
45929
  function createRoutingDecision(params) {
45813
45930
  return {
45814
- id: randomUUID11(),
45931
+ id: randomUUID10(),
45815
45932
  timestamp: getTimeProvider().nowIso(),
45816
45933
  ...params
45817
45934
  };
@@ -46067,7 +46184,7 @@ var DEFAULT_FEEDBACK_INTEGRATION_CONFIG = {
46067
46184
  };
46068
46185
 
46069
46186
  // src/learning/feedback-integration.ts
46070
- import { randomUUID as randomUUID12 } from "crypto";
46187
+ import { randomUUID as randomUUID11 } from "crypto";
46071
46188
  var STEP_QUALITY_SCORING = {
46072
46189
  /** Base score for successful steps. */
46073
46190
  successBase: 0.8,
@@ -46143,8 +46260,8 @@ var FeedbackIntegration = class {
46143
46260
  });
46144
46261
  }
46145
46262
  recordRoutingDecision(decision, traceId) {
46146
- const id = randomUUID12();
46147
- const trace = traceId ?? randomUUID12();
46263
+ const id = randomUUID11();
46264
+ const trace = traceId ?? randomUUID11();
46148
46265
  const now = getTimeProvider().now();
46149
46266
  this.evictStaleEntriesThrottled(now);
46150
46267
  if (this.decisionMap.size >= MAX_DECISION_MAP_SIZE) {
@@ -46217,7 +46334,7 @@ var FeedbackIntegration = class {
46217
46334
  } = params;
46218
46335
  const outcomeClass = this.determineOutcomeClass(success, qualityScore);
46219
46336
  const completionRatio = success ? 1 : qualityScore / this.config.successQualityThreshold;
46220
- const trace = traceId ?? randomUUID12();
46337
+ const trace = traceId ?? randomUUID11();
46221
46338
  const outcome = {
46222
46339
  routingDecisionId,
46223
46340
  timestamp: getTimeProvider().nowIso(),
@@ -52839,7 +52956,7 @@ var GitHubTaskTracker = class {
52839
52956
  cachedProvider = null;
52840
52957
  async getProvider() {
52841
52958
  if (this.cachedProvider !== null) return this.cachedProvider;
52842
- const { createScmProvider } = await import("./factory-7DJA2CIL.js");
52959
+ const { createScmProvider } = await import("./factory-ZTNGLNFH.js");
52843
52960
  const result = await createScmProvider({ repo: this.config.repo ?? "" });
52844
52961
  if (!result.ok) throw new Error(`SCM provider error: ${result.error.message}`);
52845
52962
  this.cachedProvider = result.value;
@@ -53662,4 +53779,4 @@ export {
53662
53779
  detectBackend,
53663
53780
  createTaskTracker
53664
53781
  };
53665
- //# sourceMappingURL=chunk-WZ7Z5VLZ.js.map
53782
+ //# sourceMappingURL=chunk-CUGQAPGY.js.map