nexus-agents 2.103.2 → 2.105.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (115) hide show
  1. package/dist/{child-mcp-config-I7VKSEW2.js → child-mcp-config-XOIMNU6R.js} +2 -2
  2. package/dist/{chunk-5ZK25ZWD.js → chunk-2B7332HE.js} +4 -4
  3. package/dist/{chunk-3VMTQCEH.js → chunk-3TZUEGNB.js} +2 -2
  4. package/dist/{chunk-7P3FALEV.js → chunk-46GXDOWQ.js} +2 -2
  5. package/dist/{chunk-NNJLOPGX.js → chunk-75BXDWVG.js} +5 -5
  6. package/dist/{chunk-Y5D6P5JV.js → chunk-7RE2S46N.js} +3 -3
  7. package/dist/{chunk-KSMYBMM6.js → chunk-A5UJBVCQ.js} +2 -2
  8. package/dist/{chunk-U3GOPZIA.js → chunk-ABNHZEKO.js} +2 -2
  9. package/dist/{chunk-FXPDPPYR.js → chunk-BLMWODJG.js} +2 -2
  10. package/dist/{chunk-Z35RTR2B.js → chunk-BMM6OX2K.js} +24 -9
  11. package/dist/chunk-BMM6OX2K.js.map +1 -0
  12. package/dist/{chunk-6E6MOJYY.js → chunk-E6FIVDNH.js} +2 -2
  13. package/dist/{chunk-4PWBF3NC.js → chunk-ETGNZ6H2.js} +2 -2
  14. package/dist/{chunk-O74KAIGB.js → chunk-FTFFYAY6.js} +74 -39
  15. package/dist/{chunk-O74KAIGB.js.map → chunk-FTFFYAY6.js.map} +1 -1
  16. package/dist/{chunk-MHVGM6NQ.js → chunk-FVJ2LM2G.js} +2 -2
  17. package/dist/{chunk-VPPZ45IZ.js → chunk-I5QZ3PVT.js} +2 -2
  18. package/dist/{chunk-MMZ5IKQ3.js → chunk-I7UDM43R.js} +2 -2
  19. package/dist/{chunk-N35KBA5P.js → chunk-IFO52GSQ.js} +3 -3
  20. package/dist/{chunk-4VTJA7FE.js → chunk-K7OKFTCH.js} +2 -2
  21. package/dist/{chunk-DAOUGMA5.js → chunk-M54LGBTY.js} +4 -4
  22. package/dist/{chunk-3I5UBNXA.js → chunk-MKSP4M55.js} +9 -9
  23. package/dist/{chunk-DOINBQCP.js → chunk-OESO6AQL.js} +7 -7
  24. package/dist/{chunk-3UOFGQ2K.js → chunk-P5XUYJBO.js} +3 -3
  25. package/dist/{chunk-WORMJT4K.js → chunk-PGSXRUH5.js} +3 -3
  26. package/dist/{chunk-3GUCNISD.js → chunk-RZ4A2RRN.js} +2 -2
  27. package/dist/{chunk-XISM6YBY.js → chunk-TFRXRKU5.js} +4 -4
  28. package/dist/{chunk-QQNM4YAL.js → chunk-UFTQXDUA.js} +2 -2
  29. package/dist/{chunk-5L5REFGE.js → chunk-VCLQMXVJ.js} +3 -3
  30. package/dist/{chunk-UB5S4II3.js → chunk-VGHPMNDR.js} +2 -2
  31. package/dist/{chunk-AGQU7XWB.js → chunk-VIHUOFIT.js} +5 -5
  32. package/dist/{chunk-GA2ZZERU.js → chunk-WDVUKSIQ.js} +38 -2
  33. package/dist/chunk-WDVUKSIQ.js.map +1 -0
  34. package/dist/{chunk-L32OQDWK.js → chunk-WT46JLBD.js} +3 -3
  35. package/dist/{chunk-RWSRBLSA.js → chunk-XWOLOXKN.js} +2 -2
  36. package/dist/{cli-circuit-breaker-M4LZW4RB.js → cli-circuit-breaker-QMCG6JGV.js} +4 -4
  37. package/dist/cli.js +41 -40
  38. package/dist/cli.js.map +1 -1
  39. package/dist/{composite-router-CYGVTMW6.js → composite-router-ZX64CEVG.js} +2 -2
  40. package/dist/{consensus-vote-WBO7Y24Y.js → consensus-vote-VUNGPXXS.js} +13 -13
  41. package/dist/{context-retriever-VZ5HKPWX.js → context-retriever-J7DIPQUO.js} +6 -6
  42. package/dist/{doctor-deep-A3FHG7A7.js → doctor-deep-ITSJV2RH.js} +3 -3
  43. package/dist/{expert-bridge-TF6C6XPV.js → expert-bridge-MQURDKJI.js} +6 -4
  44. package/dist/{factory-3CNPIFWT.js → factory-UZQ3RGFQ.js} +6 -6
  45. package/dist/{factory-7ENY4JOE.js → factory-Y2RF33UB.js} +5 -5
  46. package/dist/{improvement-review-6377XBPE.js → improvement-review-NBVWPFXR.js} +4 -4
  47. package/dist/index.d.ts +21 -0
  48. package/dist/index.js +27 -27
  49. package/dist/{init-opencode-6UJPLOHE.js → init-opencode-QPHX4KVI.js} +5 -5
  50. package/dist/{issue-triage-YOFAEUGC.js → issue-triage-D5ADEG3V.js} +5 -5
  51. package/dist/{pr-reviewer-helpers-MK2ZFEEI.js → pr-reviewer-helpers-R7U4EI2P.js} +4 -4
  52. package/dist/{registry-command-JLAE6RAW.js → registry-command-CFNNKJ5S.js} +2 -2
  53. package/dist/{repo-security-plan-IGX7AS5P.js → repo-security-plan-2AXFDREW.js} +3 -3
  54. package/dist/{research-helpers-synthesize-B5KL3S4T.js → research-helpers-synthesize-YTIDNKBF.js} +3 -3
  55. package/dist/{routing-memory-7RKYQEHM.js → routing-memory-YLX6QNY2.js} +2 -2
  56. package/dist/{session-memory-S4SBPBP4.js → session-memory-Y5MUOY56.js} +3 -3
  57. package/dist/{setup-command-ZQPW7LPQ.js → setup-command-KTMIAEU6.js} +10 -10
  58. package/dist/{setup-config-2DS2V65J.js → setup-config-5J3R7RET.js} +3 -3
  59. package/dist/{setup-custom-api-JVYDKH6Y.js → setup-custom-api-MJ24PJA7.js} +4 -4
  60. package/dist/{tool-memory-4LVVNSVD.js → tool-memory-YNMRI3PZ.js} +5 -5
  61. package/dist/{weather-report-FUVJJPE4.js → weather-report-GZRODMYW.js} +2 -2
  62. package/package.json +1 -1
  63. package/dist/chunk-GA2ZZERU.js.map +0 -1
  64. package/dist/chunk-Z35RTR2B.js.map +0 -1
  65. /package/dist/{child-mcp-config-I7VKSEW2.js.map → child-mcp-config-XOIMNU6R.js.map} +0 -0
  66. /package/dist/{chunk-5ZK25ZWD.js.map → chunk-2B7332HE.js.map} +0 -0
  67. /package/dist/{chunk-3VMTQCEH.js.map → chunk-3TZUEGNB.js.map} +0 -0
  68. /package/dist/{chunk-7P3FALEV.js.map → chunk-46GXDOWQ.js.map} +0 -0
  69. /package/dist/{chunk-NNJLOPGX.js.map → chunk-75BXDWVG.js.map} +0 -0
  70. /package/dist/{chunk-Y5D6P5JV.js.map → chunk-7RE2S46N.js.map} +0 -0
  71. /package/dist/{chunk-KSMYBMM6.js.map → chunk-A5UJBVCQ.js.map} +0 -0
  72. /package/dist/{chunk-U3GOPZIA.js.map → chunk-ABNHZEKO.js.map} +0 -0
  73. /package/dist/{chunk-FXPDPPYR.js.map → chunk-BLMWODJG.js.map} +0 -0
  74. /package/dist/{chunk-6E6MOJYY.js.map → chunk-E6FIVDNH.js.map} +0 -0
  75. /package/dist/{chunk-4PWBF3NC.js.map → chunk-ETGNZ6H2.js.map} +0 -0
  76. /package/dist/{chunk-MHVGM6NQ.js.map → chunk-FVJ2LM2G.js.map} +0 -0
  77. /package/dist/{chunk-VPPZ45IZ.js.map → chunk-I5QZ3PVT.js.map} +0 -0
  78. /package/dist/{chunk-MMZ5IKQ3.js.map → chunk-I7UDM43R.js.map} +0 -0
  79. /package/dist/{chunk-N35KBA5P.js.map → chunk-IFO52GSQ.js.map} +0 -0
  80. /package/dist/{chunk-4VTJA7FE.js.map → chunk-K7OKFTCH.js.map} +0 -0
  81. /package/dist/{chunk-DAOUGMA5.js.map → chunk-M54LGBTY.js.map} +0 -0
  82. /package/dist/{chunk-3I5UBNXA.js.map → chunk-MKSP4M55.js.map} +0 -0
  83. /package/dist/{chunk-DOINBQCP.js.map → chunk-OESO6AQL.js.map} +0 -0
  84. /package/dist/{chunk-3UOFGQ2K.js.map → chunk-P5XUYJBO.js.map} +0 -0
  85. /package/dist/{chunk-WORMJT4K.js.map → chunk-PGSXRUH5.js.map} +0 -0
  86. /package/dist/{chunk-3GUCNISD.js.map → chunk-RZ4A2RRN.js.map} +0 -0
  87. /package/dist/{chunk-XISM6YBY.js.map → chunk-TFRXRKU5.js.map} +0 -0
  88. /package/dist/{chunk-QQNM4YAL.js.map → chunk-UFTQXDUA.js.map} +0 -0
  89. /package/dist/{chunk-5L5REFGE.js.map → chunk-VCLQMXVJ.js.map} +0 -0
  90. /package/dist/{chunk-UB5S4II3.js.map → chunk-VGHPMNDR.js.map} +0 -0
  91. /package/dist/{chunk-AGQU7XWB.js.map → chunk-VIHUOFIT.js.map} +0 -0
  92. /package/dist/{chunk-L32OQDWK.js.map → chunk-WT46JLBD.js.map} +0 -0
  93. /package/dist/{chunk-RWSRBLSA.js.map → chunk-XWOLOXKN.js.map} +0 -0
  94. /package/dist/{cli-circuit-breaker-M4LZW4RB.js.map → cli-circuit-breaker-QMCG6JGV.js.map} +0 -0
  95. /package/dist/{composite-router-CYGVTMW6.js.map → composite-router-ZX64CEVG.js.map} +0 -0
  96. /package/dist/{consensus-vote-WBO7Y24Y.js.map → consensus-vote-VUNGPXXS.js.map} +0 -0
  97. /package/dist/{context-retriever-VZ5HKPWX.js.map → context-retriever-J7DIPQUO.js.map} +0 -0
  98. /package/dist/{doctor-deep-A3FHG7A7.js.map → doctor-deep-ITSJV2RH.js.map} +0 -0
  99. /package/dist/{expert-bridge-TF6C6XPV.js.map → expert-bridge-MQURDKJI.js.map} +0 -0
  100. /package/dist/{factory-3CNPIFWT.js.map → factory-UZQ3RGFQ.js.map} +0 -0
  101. /package/dist/{factory-7ENY4JOE.js.map → factory-Y2RF33UB.js.map} +0 -0
  102. /package/dist/{improvement-review-6377XBPE.js.map → improvement-review-NBVWPFXR.js.map} +0 -0
  103. /package/dist/{init-opencode-6UJPLOHE.js.map → init-opencode-QPHX4KVI.js.map} +0 -0
  104. /package/dist/{issue-triage-YOFAEUGC.js.map → issue-triage-D5ADEG3V.js.map} +0 -0
  105. /package/dist/{pr-reviewer-helpers-MK2ZFEEI.js.map → pr-reviewer-helpers-R7U4EI2P.js.map} +0 -0
  106. /package/dist/{registry-command-JLAE6RAW.js.map → registry-command-CFNNKJ5S.js.map} +0 -0
  107. /package/dist/{repo-security-plan-IGX7AS5P.js.map → repo-security-plan-2AXFDREW.js.map} +0 -0
  108. /package/dist/{research-helpers-synthesize-B5KL3S4T.js.map → research-helpers-synthesize-YTIDNKBF.js.map} +0 -0
  109. /package/dist/{routing-memory-7RKYQEHM.js.map → routing-memory-YLX6QNY2.js.map} +0 -0
  110. /package/dist/{session-memory-S4SBPBP4.js.map → session-memory-Y5MUOY56.js.map} +0 -0
  111. /package/dist/{setup-command-ZQPW7LPQ.js.map → setup-command-KTMIAEU6.js.map} +0 -0
  112. /package/dist/{setup-config-2DS2V65J.js.map → setup-config-5J3R7RET.js.map} +0 -0
  113. /package/dist/{setup-custom-api-JVYDKH6Y.js.map → setup-custom-api-MJ24PJA7.js.map} +0 -0
  114. /package/dist/{tool-memory-4LVVNSVD.js.map → tool-memory-YNMRI3PZ.js.map} +0 -0
  115. /package/dist/{weather-report-FUVJJPE4.js.map → weather-report-GZRODMYW.js.map} +0 -0
@@ -6,10 +6,10 @@ import {
6
6
  import {
7
7
  getTokenEnvVars,
8
8
  resolveToken
9
- } from "./chunk-7P3FALEV.js";
9
+ } from "./chunk-46GXDOWQ.js";
10
10
  import {
11
11
  executeExpert
12
- } from "./chunk-Z35RTR2B.js";
12
+ } from "./chunk-BMM6OX2K.js";
13
13
  import {
14
14
  EventTopics,
15
15
  JobStatusSchema,
@@ -30,7 +30,7 @@ import {
30
30
  writeJobComplete,
31
31
  writeJobFailed,
32
32
  writeJobPending
33
- } from "./chunk-3I5UBNXA.js";
33
+ } from "./chunk-MKSP4M55.js";
34
34
  import {
35
35
  REGISTRY_PATH,
36
36
  getProjectRoot,
@@ -39,19 +39,19 @@ import {
39
39
  normalizeTopicToCanonical,
40
40
  savePapersRegistry,
41
41
  synthesizeResearch
42
- } from "./chunk-UB5S4II3.js";
42
+ } from "./chunk-VGHPMNDR.js";
43
43
  import {
44
44
  IssueTriage,
45
45
  createAuditTrail,
46
46
  createGraphAuditBridge
47
- } from "./chunk-XISM6YBY.js";
47
+ } from "./chunk-TFRXRKU5.js";
48
48
  import {
49
49
  resolveEnvMode,
50
50
  sanitizeInput
51
- } from "./chunk-VPPZ45IZ.js";
51
+ } from "./chunk-I5QZ3PVT.js";
52
52
  import {
53
53
  withPrerequisite
54
- } from "./chunk-5L5REFGE.js";
54
+ } from "./chunk-VCLQMXVJ.js";
55
55
  import {
56
56
  NOOP_NOTIFIER,
57
57
  RateLimiter,
@@ -71,10 +71,10 @@ import {
71
71
  withAccessPolicy,
72
72
  withProgressHeartbeat,
73
73
  wrapToolWithTimeout
74
- } from "./chunk-RWSRBLSA.js";
74
+ } from "./chunk-XWOLOXKN.js";
75
75
  import {
76
76
  generateSecurityPlan
77
- } from "./chunk-6E6MOJYY.js";
77
+ } from "./chunk-E6FIVDNH.js";
78
78
  import {
79
79
  analyzeGitHubRepo
80
80
  } from "./chunk-HFOQKCD2.js";
@@ -82,21 +82,21 @@ import {
82
82
  getContextForTask,
83
83
  inferTaskCategory,
84
84
  summarizeContextForPrompt
85
- } from "./chunk-N35KBA5P.js";
85
+ } from "./chunk-IFO52GSQ.js";
86
86
  import {
87
87
  DEFAULT_RELEVANCE_CONFIG,
88
88
  MemoryImportance,
89
89
  calculateTextJaccardSimilarity,
90
90
  getToolMemory
91
- } from "./chunk-DAOUGMA5.js";
91
+ } from "./chunk-M54LGBTY.js";
92
92
  import {
93
93
  DEFAULT_TASK_TTL_MS,
94
94
  DEFAULT_TOOL_RATE_LIMITS,
95
95
  clampTaskTtl
96
- } from "./chunk-DOINBQCP.js";
96
+ } from "./chunk-OESO6AQL.js";
97
97
  import {
98
98
  DEFAULTS
99
- } from "./chunk-MMZ5IKQ3.js";
99
+ } from "./chunk-I7UDM43R.js";
100
100
  import {
101
101
  resolveInsideRoot
102
102
  } from "./chunk-NUBSJGQZ.js";
@@ -112,16 +112,16 @@ import {
112
112
  getAvailableClis,
113
113
  sleep,
114
114
  withTimeout
115
- } from "./chunk-AGQU7XWB.js";
115
+ } from "./chunk-VIHUOFIT.js";
116
116
  import {
117
117
  getAvailabilityCache,
118
118
  getCliForModelId,
119
119
  resolveFallback
120
- } from "./chunk-3GUCNISD.js";
120
+ } from "./chunk-RZ4A2RRN.js";
121
121
  import {
122
122
  generateHyphenId,
123
123
  generateUUID
124
- } from "./chunk-KSMYBMM6.js";
124
+ } from "./chunk-A5UJBVCQ.js";
125
125
  import {
126
126
  BUILT_IN_EXPERTS,
127
127
  BuiltInExpertTypeSchema,
@@ -133,7 +133,7 @@ import {
133
133
  } from "./chunk-PQHVC4BD.js";
134
134
  import {
135
135
  createSessionMemory
136
- } from "./chunk-QQNM4YAL.js";
136
+ } from "./chunk-UFTQXDUA.js";
137
137
  import {
138
138
  AGENT_ROUTER_TIMEOUTS,
139
139
  API_TIMEOUTS,
@@ -207,7 +207,7 @@ import {
207
207
  resolveModelIdentitySync,
208
208
  toExpertTaskAnalysisResult,
209
209
  withStep
210
- } from "./chunk-GA2ZZERU.js";
210
+ } from "./chunk-WDVUKSIQ.js";
211
211
  import {
212
212
  nexusDataPath,
213
213
  nexusDataPathEnsure
@@ -27065,7 +27065,7 @@ async function populateUnifiedContextOnState(state) {
27065
27065
  try {
27066
27066
  const taskCandidate = state["task"];
27067
27067
  if (typeof taskCandidate !== "string" || taskCandidate === "") return;
27068
- const { getContextForTask: getContextForTask2, inferTaskCategory: inferTaskCategory2 } = await import("./context-retriever-VZ5HKPWX.js");
27068
+ const { getContextForTask: getContextForTask2, inferTaskCategory: inferTaskCategory2 } = await import("./context-retriever-J7DIPQUO.js");
27069
27069
  const ctx = await getContextForTask2({
27070
27070
  task: taskCandidate,
27071
27071
  category: inferTaskCategory2(taskCandidate),
@@ -28218,6 +28218,22 @@ function emitStageFailed(options) {
28218
28218
  error: options.error
28219
28219
  });
28220
28220
  }
28221
+ function emitModelCalled(options) {
28222
+ const bus = resolveBus(options.bus);
28223
+ if (bus === void 0) return;
28224
+ bus.emit({
28225
+ type: "model.called",
28226
+ timestamp: Date.now(),
28227
+ executionId: options.executionId,
28228
+ cli: options.cli,
28229
+ model: options.model,
28230
+ tokensIn: options.tokensIn,
28231
+ tokensOut: options.tokensOut,
28232
+ durationMs: options.durationMs,
28233
+ ...options.agentId !== void 0 && { agentId: options.agentId },
28234
+ ...options.role !== void 0 && { role: options.role }
28235
+ });
28236
+ }
28221
28237
  function emitPipelineStageEvent(prefix, stage, status, details) {
28222
28238
  const executionId = `${prefix}-${stage}`;
28223
28239
  if (status === "started") {
@@ -34728,7 +34744,7 @@ var DEFAULT_CAPABILITIES2 = {
34728
34744
  cost: 6
34729
34745
  };
34730
34746
  function mapCompositeDecisionToOutput(decision, estimatedTokens) {
34731
- const modelName = cliNameToModel(decision.cliName);
34747
+ const modelName = decision.model ?? cliNameToModel(decision.cliName);
34732
34748
  const caps = MODEL_CAPABILITIES2[modelName] ?? DEFAULT_CAPABILITIES2;
34733
34749
  return {
34734
34750
  recommended_model: modelName,
@@ -42814,7 +42830,7 @@ async function tryIssueTriage(task) {
42814
42830
  try {
42815
42831
  const issueMatch = task.match(/github\.com\/([^/]+\/[^/]+)\/issues\/(\d+)/);
42816
42832
  if (issueMatch === null) return null;
42817
- const { createIssueTriage } = await import("./issue-triage-YOFAEUGC.js");
42833
+ const { createIssueTriage } = await import("./issue-triage-D5ADEG3V.js");
42818
42834
  const triage = createIssueTriage();
42819
42835
  const owner = issueMatch[1] ?? "";
42820
42836
  const num = issueMatch[2] ?? "";
@@ -42842,7 +42858,7 @@ var VALID_TEMPLATES = /* @__PURE__ */ new Set([
42842
42858
  ]);
42843
42859
  async function classifyWithLLM(task) {
42844
42860
  try {
42845
- const { executeExpert: executeExpert2 } = await import("./expert-bridge-TF6C6XPV.js");
42861
+ const { executeExpert: executeExpert2 } = await import("./expert-bridge-MQURDKJI.js");
42846
42862
  const prompt = [
42847
42863
  "Classify this task into exactly one pipeline template.",
42848
42864
  "Templates: dev (implementation/bug fix/refactor), research (investigate/evaluate/compare),",
@@ -43729,7 +43745,7 @@ function recordOutcome(args) {
43729
43745
  logger40.debug("Failed to record outcome", { taskId: args.taskId, error: String(error) });
43730
43746
  }
43731
43747
  }
43732
- async function runExpert(guard, expertType, prompt) {
43748
+ async function runExpert(guard, expertType, prompt, executionId) {
43733
43749
  if (guard.isExhausted()) {
43734
43750
  return {
43735
43751
  success: false,
@@ -43741,14 +43757,28 @@ async function runExpert(guard, expertType, prompt) {
43741
43757
  }
43742
43758
  const result = await executeExpert(expertType, prompt);
43743
43759
  guard.record(result.tokensUsed);
43760
+ maybeEmitModelCalled(executionId, result);
43744
43761
  return result;
43745
43762
  }
43763
+ function maybeEmitModelCalled(executionId, result) {
43764
+ if (!result.success || executionId === void 0) return;
43765
+ if (result.cli === void 0 || result.model === void 0) return;
43766
+ if (result.tokensIn === void 0 || result.tokensOut === void 0) return;
43767
+ emitModelCalled({
43768
+ executionId,
43769
+ cli: result.cli,
43770
+ model: result.model,
43771
+ tokensIn: result.tokensIn,
43772
+ tokensOut: result.tokensOut,
43773
+ durationMs: result.durationMs
43774
+ });
43775
+ }
43746
43776
  var cachedMemory = null;
43747
43777
  var memoryInitPromise = null;
43748
43778
  async function initPipelineMemory() {
43749
43779
  if (cachedMemory !== null) return cachedMemory;
43750
43780
  try {
43751
- const { createSessionMemory: createSessionMemory2 } = await import("./session-memory-S4SBPBP4.js");
43781
+ const { createSessionMemory: createSessionMemory2 } = await import("./session-memory-Y5MUOY56.js");
43752
43782
  const { getLearningDir } = await import("./learning-persistence-UKPO7RYK.js");
43753
43783
  const mem = createSessionMemory2(getLearningDir());
43754
43784
  mem.startSession(`pipeline-${String(getTimeProvider().now())}`);
@@ -43805,7 +43835,7 @@ function recordRoutingExperience(category, success, durationMs, tokensUsed = 0)
43805
43835
  callRecord(routingMemoryCache);
43806
43836
  return;
43807
43837
  }
43808
- routingMemoryInitPromise ??= import("./routing-memory-7RKYQEHM.js").then(({ createRoutingMemory }) => {
43838
+ routingMemoryInitPromise ??= import("./routing-memory-YLX6QNY2.js").then(({ createRoutingMemory }) => {
43809
43839
  routingMemoryCache ??= createRoutingMemory();
43810
43840
  return routingMemoryCache;
43811
43841
  }).catch((error) => {
@@ -43839,7 +43869,7 @@ ${text}` : "";
43839
43869
  }
43840
43870
  async function getWeatherContext() {
43841
43871
  try {
43842
- const { generateWeatherReport: generateWeatherReport2 } = await import("./weather-report-FUVJJPE4.js");
43872
+ const { generateWeatherReport: generateWeatherReport2 } = await import("./weather-report-GZRODMYW.js");
43843
43873
  const report = generateWeatherReport2({ includeAdaptive: true });
43844
43874
  const mappings = "recommendedMappings" in report ? report.recommendedMappings : [];
43845
43875
  if (!Array.isArray(mappings) || mappings.length === 0) return "";
@@ -43857,7 +43887,7 @@ ${lines}
43857
43887
  }
43858
43888
  async function getMemoryContext(task) {
43859
43889
  try {
43860
- const { createSessionMemory: createSessionMemory2 } = await import("./session-memory-S4SBPBP4.js");
43890
+ const { createSessionMemory: createSessionMemory2 } = await import("./session-memory-Y5MUOY56.js");
43861
43891
  const { getLearningDir } = await import("./learning-persistence-UKPO7RYK.js");
43862
43892
  const memory = createSessionMemory2(getLearningDir(), { maxLearningsInContext: 10 });
43863
43893
  const learnings = memory.searchLearnings(task.slice(0, 200));
@@ -43899,14 +43929,16 @@ function createAgentStages(config = {}) {
43899
43929
  "research",
43900
43930
  `Use research_discover to find papers and repos related to:
43901
43931
 
43902
- ${task}${memoryCtx}`
43932
+ ${task}${memoryCtx}`,
43933
+ "research"
43903
43934
  );
43904
43935
  const analyze = await runExpert(
43905
43936
  guard,
43906
43937
  "research",
43907
43938
  `Use research_analyze focus=gaps to identify what is missing for:
43908
43939
 
43909
- ${task}`
43940
+ ${task}`,
43941
+ "research"
43910
43942
  );
43911
43943
  const combined = [discover.text, analyze.text].filter(Boolean).join("\n\n");
43912
43944
  const totalMs = discover.durationMs + analyze.durationMs;
@@ -43948,7 +43980,7 @@ ${task}
43948
43980
 
43949
43981
  ${contextBlock}`;
43950
43982
  await postProgress(config, "Plan", feedback !== void 0 ? "Revising..." : "Planning...");
43951
- const r = await runExpert(guard, "architecture", prompt);
43983
+ const r = await runExpert(guard, "architecture", prompt, "plan");
43952
43984
  emitStageEvent2("plan", r.success ? "completed" : "failed", { durationMs: r.durationMs });
43953
43985
  recordOutcome({
43954
43986
  taskId: "plan",
@@ -43966,7 +43998,7 @@ ${contextBlock}`;
43966
43998
  const strategy = config.votingStrategy ?? "higher_order";
43967
43999
  await postProgress(config, "Vote", `Running consensus with ${strategy} strategy...`);
43968
44000
  try {
43969
- const { executeVoting } = await import("./consensus-vote-WBO7Y24Y.js");
44001
+ const { executeVoting } = await import("./consensus-vote-VUNGPXXS.js");
43970
44002
  const votingResult = await executeVoting(
43971
44003
  {
43972
44004
  proposal: buildVoteProposal(plan, research),
@@ -44023,7 +44055,8 @@ ${contextBlock}`;
44023
44055
  `Decompose into tasks.
44024
44056
  Return JSON: [{id,title,description,assignedTo}]
44025
44057
 
44026
- ${plan}`
44058
+ ${plan}`,
44059
+ "decompose"
44027
44060
  );
44028
44061
  const tasks = parseTasksFromResponse(r.text, plan);
44029
44062
  emitStageEvent2("decompose", "completed", { durationMs: r.durationMs });
@@ -44049,7 +44082,8 @@ QA feedback: ${task.feedback}` : "";
44049
44082
  `Implement:
44050
44083
 
44051
44084
  ${task.title}
44052
- ${task.description}${fb}`
44085
+ ${task.description}${fb}`,
44086
+ task.id
44053
44087
  );
44054
44088
  emitStageEvent2(`impl-${task.id}`, r.success ? "completed" : "failed", {
44055
44089
  durationMs: r.durationMs
@@ -44078,7 +44112,8 @@ Task: ${task.title}
44078
44112
  Impl:
44079
44113
  ${implementation.slice(0, 3e3)}
44080
44114
 
44081
- Verdict: PASS/NEEDS_WORK/REJECT`
44115
+ Verdict: PASS/NEEDS_WORK/REJECT`,
44116
+ task.id
44082
44117
  );
44083
44118
  const review = parseQaFromResponse(r.text);
44084
44119
  emitStageEvent2(`qa-${task.id}`, review.verdict === "pass" ? "completed" : "failed", {
@@ -44961,7 +44996,7 @@ async function searchCodebaseForTask(task) {
44961
44996
  }
44962
44997
  async function queryResearchRegistry(task) {
44963
44998
  try {
44964
- const { synthesizeResearch: synthesizeResearch2 } = await import("./research-helpers-synthesize-B5KL3S4T.js");
44999
+ const { synthesizeResearch: synthesizeResearch2 } = await import("./research-helpers-synthesize-YTIDNKBF.js");
44965
45000
  const topic = task.split(/[.!?\n]/).filter((s) => s.trim().length > 10)[0]?.trim();
44966
45001
  if (topic === void 0) return null;
44967
45002
  const result = await synthesizeResearch2(topic.slice(0, 50));
@@ -45032,7 +45067,7 @@ function createScanStageWrapper() {
45032
45067
  try {
45033
45068
  const slug = ctx.task.match(/([a-zA-Z0-9._-]+\/[a-zA-Z0-9._-]+)/)?.[1];
45034
45069
  if (slug !== void 0) {
45035
- const { generateSecurityPlan: generateSecurityPlan2 } = await import("./repo-security-plan-IGX7AS5P.js");
45070
+ const { generateSecurityPlan: generateSecurityPlan2 } = await import("./repo-security-plan-2AXFDREW.js");
45036
45071
  const plan = await generateSecurityPlan2({ repo: slug, maxScanners: 10 });
45037
45072
  const recs = plan.recommendations.slice(0, 5).map((r) => `${r.priority}: ${r.displayName} (${r.category})`).join("; ");
45038
45073
  return output(PIPELINE_STATE_KEYS.FINDINGS, recs, getTimeProvider().now() - start, true);
@@ -46558,7 +46593,7 @@ async function probeSource(source, includeModelIds) {
46558
46593
  }
46559
46594
  }
46560
46595
  async function defaultSources(includeOpenRouter) {
46561
- const { createAllAdapters: createAllAdapters2 } = await import("./factory-3CNPIFWT.js");
46596
+ const { createAllAdapters: createAllAdapters2 } = await import("./factory-UZQ3RGFQ.js");
46562
46597
  const adapters = createAllAdapters2();
46563
46598
  return buildDefaultModelSources(adapters, { includeOpenRouter });
46564
46599
  }
@@ -50172,7 +50207,7 @@ var GitHubTaskTracker = class {
50172
50207
  cachedProvider = null;
50173
50208
  async getProvider() {
50174
50209
  if (this.cachedProvider !== null) return this.cachedProvider;
50175
- const { createScmProvider } = await import("./factory-7ENY4JOE.js");
50210
+ const { createScmProvider } = await import("./factory-Y2RF33UB.js");
50176
50211
  const result = await createScmProvider({ repo: this.config.repo ?? "" });
50177
50212
  if (!result.ok) throw new Error(`SCM provider error: ${result.error.message}`);
50178
50213
  this.cachedProvider = result.value;
@@ -50883,4 +50918,4 @@ export {
50883
50918
  detectBackend,
50884
50919
  createTaskTracker
50885
50920
  };
50886
- //# sourceMappingURL=chunk-O74KAIGB.js.map
50921
+ //# sourceMappingURL=chunk-FTFFYAY6.js.map