nexus-agents 2.93.0 → 2.95.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 (117) hide show
  1. package/dist/{child-mcp-config-WNISXFYD.js → child-mcp-config-NW7JMSDK.js} +2 -2
  2. package/dist/{chunk-XVY3I7JT.js → chunk-2X24T4ZD.js} +9 -12
  3. package/dist/chunk-2X24T4ZD.js.map +1 -0
  4. package/dist/{chunk-BHA6V7GK.js → chunk-3H6Q3RZM.js} +4 -4
  5. package/dist/{chunk-T73G67GT.js → chunk-3HXWI34V.js} +3 -3
  6. package/dist/{chunk-RTUZSR4R.js → chunk-47Z3YPOK.js} +2 -2
  7. package/dist/{chunk-G5IDRWWI.js → chunk-4NVYN2MB.js} +4 -4
  8. package/dist/{chunk-5BTRDVWC.js → chunk-55G7KQ7F.js} +5 -5
  9. package/dist/{chunk-WU3SUA35.js → chunk-5HBDXW44.js} +2 -2
  10. package/dist/{chunk-JCETWDU7.js → chunk-6IWPN5UB.js} +2 -2
  11. package/dist/{chunk-4A4WPM75.js → chunk-7GUP6KQQ.js} +8 -10
  12. package/dist/{chunk-4A4WPM75.js.map → chunk-7GUP6KQQ.js.map} +1 -1
  13. package/dist/{chunk-ULBKFMVO.js → chunk-BSHDI4BH.js} +2 -2
  14. package/dist/{chunk-JEBWSHSU.js → chunk-D3JSXVX3.js} +2 -2
  15. package/dist/{chunk-HKISF2E7.js → chunk-ECBH5INZ.js} +259 -8
  16. package/dist/chunk-ECBH5INZ.js.map +1 -0
  17. package/dist/{chunk-ZOAU7RE4.js → chunk-ECZW5FXN.js} +4 -6
  18. package/dist/{chunk-ZOAU7RE4.js.map → chunk-ECZW5FXN.js.map} +1 -1
  19. package/dist/{chunk-ZYHHDPFW.js → chunk-FTDVA33Z.js} +4 -4
  20. package/dist/{chunk-2T4NV6QT.js → chunk-FXVJLJUF.js} +2 -2
  21. package/dist/{chunk-IJ2AZZVH.js → chunk-FYGZ4MEQ.js} +141 -28
  22. package/dist/chunk-FYGZ4MEQ.js.map +1 -0
  23. package/dist/{chunk-SORBJPRA.js → chunk-G42N55ZR.js} +2 -2
  24. package/dist/{chunk-SHSKW5ML.js → chunk-GC5FH2IA.js} +7 -7
  25. package/dist/{chunk-FTCU55O6.js → chunk-KHZGMF2W.js} +4 -4
  26. package/dist/{chunk-2IBJC2EP.js → chunk-LXROEQAO.js} +2 -2
  27. package/dist/{chunk-CPH6LKXO.js → chunk-LZOTH2GI.js} +2 -2
  28. package/dist/{chunk-DTFMYM3V.js → chunk-O4LVC4MQ.js} +2 -2
  29. package/dist/{chunk-AZP66FIA.js → chunk-PFOY5ML6.js} +3 -3
  30. package/dist/{chunk-SMGH2B3A.js → chunk-QUPPV6UO.js} +20 -3
  31. package/dist/chunk-QUPPV6UO.js.map +1 -0
  32. package/dist/{chunk-K7VGX37L.js → chunk-TEKWQNQ2.js} +3 -3
  33. package/dist/{chunk-LJMO5P6O.js → chunk-VTMQND6B.js} +23 -13
  34. package/dist/chunk-VTMQND6B.js.map +1 -0
  35. package/dist/{chunk-BNHBZRU7.js → chunk-WGA4VGIR.js} +3 -3
  36. package/dist/{chunk-57OH2O2U.js → chunk-Y3OOHHKQ.js} +2 -2
  37. package/dist/{chunk-VSG6RSE6.js → chunk-YYXJ6RTO.js} +3 -3
  38. package/dist/{chunk-E3QWWP67.js → chunk-ZICVVBDW.js} +2 -2
  39. package/dist/{cli-circuit-breaker-6E4E2IU7.js → cli-circuit-breaker-LNU5DQSB.js} +4 -4
  40. package/dist/cli.js +131 -54
  41. package/dist/cli.js.map +1 -1
  42. package/dist/{composite-router-MQOPXLVV.js → composite-router-DJ54ND5X.js} +2 -2
  43. package/dist/{consensus-vote-ZRADOLXH.js → consensus-vote-XLEQFVE7.js} +12 -13
  44. package/dist/{context-retriever-TZGIETJO.js → context-retriever-6O6TREXH.js} +6 -6
  45. package/dist/{doctor-deep-OU2WC55V.js → doctor-deep-PSNJPELP.js} +3 -3
  46. package/dist/{expert-bridge-WP5ZWXFY.js → expert-bridge-Q3OWPD4L.js} +4 -4
  47. package/dist/{factory-RJTRVII5.js → factory-43RVPRT5.js} +5 -5
  48. package/dist/{factory-2TN2VZTR.js → factory-PSMTMC7V.js} +5 -5
  49. package/dist/index.d.ts +215 -207
  50. package/dist/index.js +26 -27
  51. package/dist/index.js.map +1 -1
  52. package/dist/{init-opencode-AYMNMWU7.js → init-opencode-25AUARJH.js} +5 -5
  53. package/dist/{issue-triage-QIVZN3PJ.js → issue-triage-KZTENUDH.js} +5 -5
  54. package/dist/{pr-reviewer-helpers-P24OBKVM.js → pr-reviewer-helpers-XENJ4E2T.js} +4 -4
  55. package/dist/{registry-command-KWWOKJ5C.js → registry-command-X3O34FAK.js} +2 -2
  56. package/dist/{repo-security-plan-KZNEXDCI.js → repo-security-plan-XCX7EFJR.js} +3 -3
  57. package/dist/{research-helpers-synthesize-DH5PPX7A.js → research-helpers-synthesize-CGVR6M4S.js} +3 -4
  58. package/dist/{routing-memory-AGHJQTRH.js → routing-memory-YZRYGXQC.js} +2 -2
  59. package/dist/{session-memory-O24IVZAW.js → session-memory-SXQAA2EN.js} +3 -3
  60. package/dist/{setup-command-NBXZ4NGV.js → setup-command-VG7JZI6O.js} +11 -12
  61. package/dist/{setup-config-Y4JA5QWO.js → setup-config-VJAK6AA2.js} +3 -3
  62. package/dist/{setup-custom-api-UNX4OJEX.js → setup-custom-api-KSF2JMTS.js} +4 -5
  63. package/dist/{setup-custom-api-UNX4OJEX.js.map → setup-custom-api-KSF2JMTS.js.map} +1 -1
  64. package/dist/{tool-memory-UEQNXIGC.js → tool-memory-L7SDFSF5.js} +5 -5
  65. package/dist/{weather-report-S5YXRY7G.js → weather-report-D6HFOK7S.js} +2 -2
  66. package/package.json +1 -1
  67. package/dist/chunk-HKISF2E7.js.map +0 -1
  68. package/dist/chunk-IJ2AZZVH.js.map +0 -1
  69. package/dist/chunk-LJMO5P6O.js.map +0 -1
  70. package/dist/chunk-NESW2TTD.js +0 -134
  71. package/dist/chunk-NESW2TTD.js.map +0 -1
  72. package/dist/chunk-SMGH2B3A.js.map +0 -1
  73. package/dist/chunk-XVY3I7JT.js.map +0 -1
  74. /package/dist/{child-mcp-config-WNISXFYD.js.map → child-mcp-config-NW7JMSDK.js.map} +0 -0
  75. /package/dist/{chunk-BHA6V7GK.js.map → chunk-3H6Q3RZM.js.map} +0 -0
  76. /package/dist/{chunk-T73G67GT.js.map → chunk-3HXWI34V.js.map} +0 -0
  77. /package/dist/{chunk-RTUZSR4R.js.map → chunk-47Z3YPOK.js.map} +0 -0
  78. /package/dist/{chunk-G5IDRWWI.js.map → chunk-4NVYN2MB.js.map} +0 -0
  79. /package/dist/{chunk-5BTRDVWC.js.map → chunk-55G7KQ7F.js.map} +0 -0
  80. /package/dist/{chunk-WU3SUA35.js.map → chunk-5HBDXW44.js.map} +0 -0
  81. /package/dist/{chunk-JCETWDU7.js.map → chunk-6IWPN5UB.js.map} +0 -0
  82. /package/dist/{chunk-ULBKFMVO.js.map → chunk-BSHDI4BH.js.map} +0 -0
  83. /package/dist/{chunk-JEBWSHSU.js.map → chunk-D3JSXVX3.js.map} +0 -0
  84. /package/dist/{chunk-ZYHHDPFW.js.map → chunk-FTDVA33Z.js.map} +0 -0
  85. /package/dist/{chunk-2T4NV6QT.js.map → chunk-FXVJLJUF.js.map} +0 -0
  86. /package/dist/{chunk-SORBJPRA.js.map → chunk-G42N55ZR.js.map} +0 -0
  87. /package/dist/{chunk-SHSKW5ML.js.map → chunk-GC5FH2IA.js.map} +0 -0
  88. /package/dist/{chunk-FTCU55O6.js.map → chunk-KHZGMF2W.js.map} +0 -0
  89. /package/dist/{chunk-2IBJC2EP.js.map → chunk-LXROEQAO.js.map} +0 -0
  90. /package/dist/{chunk-CPH6LKXO.js.map → chunk-LZOTH2GI.js.map} +0 -0
  91. /package/dist/{chunk-DTFMYM3V.js.map → chunk-O4LVC4MQ.js.map} +0 -0
  92. /package/dist/{chunk-AZP66FIA.js.map → chunk-PFOY5ML6.js.map} +0 -0
  93. /package/dist/{chunk-K7VGX37L.js.map → chunk-TEKWQNQ2.js.map} +0 -0
  94. /package/dist/{chunk-BNHBZRU7.js.map → chunk-WGA4VGIR.js.map} +0 -0
  95. /package/dist/{chunk-57OH2O2U.js.map → chunk-Y3OOHHKQ.js.map} +0 -0
  96. /package/dist/{chunk-VSG6RSE6.js.map → chunk-YYXJ6RTO.js.map} +0 -0
  97. /package/dist/{chunk-E3QWWP67.js.map → chunk-ZICVVBDW.js.map} +0 -0
  98. /package/dist/{cli-circuit-breaker-6E4E2IU7.js.map → cli-circuit-breaker-LNU5DQSB.js.map} +0 -0
  99. /package/dist/{composite-router-MQOPXLVV.js.map → composite-router-DJ54ND5X.js.map} +0 -0
  100. /package/dist/{consensus-vote-ZRADOLXH.js.map → consensus-vote-XLEQFVE7.js.map} +0 -0
  101. /package/dist/{context-retriever-TZGIETJO.js.map → context-retriever-6O6TREXH.js.map} +0 -0
  102. /package/dist/{doctor-deep-OU2WC55V.js.map → doctor-deep-PSNJPELP.js.map} +0 -0
  103. /package/dist/{expert-bridge-WP5ZWXFY.js.map → expert-bridge-Q3OWPD4L.js.map} +0 -0
  104. /package/dist/{factory-2TN2VZTR.js.map → factory-43RVPRT5.js.map} +0 -0
  105. /package/dist/{factory-RJTRVII5.js.map → factory-PSMTMC7V.js.map} +0 -0
  106. /package/dist/{init-opencode-AYMNMWU7.js.map → init-opencode-25AUARJH.js.map} +0 -0
  107. /package/dist/{issue-triage-QIVZN3PJ.js.map → issue-triage-KZTENUDH.js.map} +0 -0
  108. /package/dist/{pr-reviewer-helpers-P24OBKVM.js.map → pr-reviewer-helpers-XENJ4E2T.js.map} +0 -0
  109. /package/dist/{registry-command-KWWOKJ5C.js.map → registry-command-X3O34FAK.js.map} +0 -0
  110. /package/dist/{repo-security-plan-KZNEXDCI.js.map → repo-security-plan-XCX7EFJR.js.map} +0 -0
  111. /package/dist/{research-helpers-synthesize-DH5PPX7A.js.map → research-helpers-synthesize-CGVR6M4S.js.map} +0 -0
  112. /package/dist/{routing-memory-AGHJQTRH.js.map → routing-memory-YZRYGXQC.js.map} +0 -0
  113. /package/dist/{session-memory-O24IVZAW.js.map → session-memory-SXQAA2EN.js.map} +0 -0
  114. /package/dist/{setup-command-NBXZ4NGV.js.map → setup-command-VG7JZI6O.js.map} +0 -0
  115. /package/dist/{setup-config-Y4JA5QWO.js.map → setup-config-VJAK6AA2.js.map} +0 -0
  116. /package/dist/{tool-memory-UEQNXIGC.js.map → tool-memory-L7SDFSF5.js.map} +0 -0
  117. /package/dist/{weather-report-S5YXRY7G.js.map → weather-report-D6HFOK7S.js.map} +0 -0
@@ -1,10 +1,10 @@
1
1
  import {
2
2
  getTokenEnvVars,
3
3
  resolveToken
4
- } from "./chunk-WU3SUA35.js";
4
+ } from "./chunk-5HBDXW44.js";
5
5
  import {
6
6
  executeExpert
7
- } from "./chunk-XVY3I7JT.js";
7
+ } from "./chunk-2X24T4ZD.js";
8
8
  import {
9
9
  EventTopics,
10
10
  JobStatusSchema,
@@ -42,7 +42,7 @@ import {
42
42
  writeJobComplete,
43
43
  writeJobFailed,
44
44
  writeJobPending
45
- } from "./chunk-LJMO5P6O.js";
45
+ } from "./chunk-VTMQND6B.js";
46
46
  import {
47
47
  REGISTRY_PATH,
48
48
  getProjectRoot,
@@ -51,19 +51,19 @@ import {
51
51
  normalizeTopicToCanonical,
52
52
  savePapersRegistry,
53
53
  synthesizeResearch
54
- } from "./chunk-ZOAU7RE4.js";
54
+ } from "./chunk-ECZW5FXN.js";
55
55
  import {
56
56
  IssueTriage,
57
57
  createAuditTrail,
58
58
  createGraphAuditBridge
59
- } from "./chunk-G5IDRWWI.js";
59
+ } from "./chunk-4NVYN2MB.js";
60
60
  import {
61
61
  resolveEnvMode,
62
62
  sanitizeInput
63
- } from "./chunk-DTFMYM3V.js";
63
+ } from "./chunk-O4LVC4MQ.js";
64
64
  import {
65
65
  generateSecurityPlan
66
- } from "./chunk-ULBKFMVO.js";
66
+ } from "./chunk-BSHDI4BH.js";
67
67
  import {
68
68
  analyzeGitHubRepo
69
69
  } from "./chunk-HFOQKCD2.js";
@@ -76,25 +76,26 @@ import {
76
76
  getContextForTask,
77
77
  inferTaskCategory,
78
78
  summarizeContextForPrompt
79
- } from "./chunk-K7VGX37L.js";
79
+ } from "./chunk-TEKWQNQ2.js";
80
80
  import {
81
81
  DEFAULT_RELEVANCE_CONFIG,
82
82
  MemoryImportance,
83
83
  calculateTextJaccardSimilarity,
84
84
  getToolMemory
85
- } from "./chunk-FTCU55O6.js";
85
+ } from "./chunk-KHZGMF2W.js";
86
86
  import {
87
87
  DEFAULT_TASK_TTL_MS,
88
88
  DEFAULT_TOOL_RATE_LIMITS,
89
89
  clampTaskTtl
90
- } from "./chunk-SHSKW5ML.js";
90
+ } from "./chunk-GC5FH2IA.js";
91
91
  import {
92
92
  getAvailabilityCache,
93
+ getCliForModelId,
93
94
  resolveFallback
94
- } from "./chunk-SMGH2B3A.js";
95
+ } from "./chunk-QUPPV6UO.js";
95
96
  import {
96
97
  DEFAULTS
97
- } from "./chunk-4A4WPM75.js";
98
+ } from "./chunk-7GUP6KQQ.js";
98
99
  import {
99
100
  resolveInsideRoot
100
101
  } from "./chunk-NUBSJGQZ.js";
@@ -110,11 +111,11 @@ import {
110
111
  getAvailableClis,
111
112
  sleep,
112
113
  withTimeout
113
- } from "./chunk-BHA6V7GK.js";
114
+ } from "./chunk-3H6Q3RZM.js";
114
115
  import {
115
116
  generateHyphenId,
116
117
  generateUUID
117
- } from "./chunk-SORBJPRA.js";
118
+ } from "./chunk-G42N55ZR.js";
118
119
  import {
119
120
  BUILT_IN_EXPERTS,
120
121
  BuiltInExpertTypeSchema,
@@ -126,7 +127,7 @@ import {
126
127
  } from "./chunk-PQHVC4BD.js";
127
128
  import {
128
129
  createSessionMemory
129
- } from "./chunk-JCETWDU7.js";
130
+ } from "./chunk-6IWPN5UB.js";
130
131
  import {
131
132
  AGENT_ROUTER_TIMEOUTS,
132
133
  API_TIMEOUTS,
@@ -198,7 +199,7 @@ import {
198
199
  resolveModelIdentitySync,
199
200
  toExpertTaskAnalysisResult,
200
201
  withStep
201
- } from "./chunk-HKISF2E7.js";
202
+ } from "./chunk-ECBH5INZ.js";
202
203
  import {
203
204
  getNexusDataDir,
204
205
  nexusDataPath,
@@ -24194,6 +24195,114 @@ function createValidationDashboard() {
24194
24195
  return new ValidationDashboard();
24195
24196
  }
24196
24197
 
24198
+ // src/observability/swarm-health-signals.ts
24199
+ var defaultLogger = createLogger({ component: "SwarmHealthSignals" });
24200
+ var SEVERE_BOTTLENECK = /* @__PURE__ */ new Set(["high", "critical"]);
24201
+ var DEFAULT_HEALTH_SIGNAL_INTERVAL_MS = 6e4;
24202
+ var CLI_NAME_SET = new Set(CLI_NAMES);
24203
+ function confidentCliSlot(agentId) {
24204
+ if (CLI_NAME_SET.has(agentId)) return agentId;
24205
+ return getCliForModelId(agentId);
24206
+ }
24207
+ function emitSwarmUnhealthySignals(metrics, bus, logger55 = defaultLogger) {
24208
+ const emittedSlots = /* @__PURE__ */ new Set();
24209
+ try {
24210
+ for (const bottleneck of metrics.bottlenecks) {
24211
+ if (!SEVERE_BOTTLENECK.has(bottleneck.severity)) continue;
24212
+ const slot = confidentCliSlot(bottleneck.agentId);
24213
+ if (slot === void 0) {
24214
+ logger55.debug("Skipping non-CLI-attributable bottleneck", {
24215
+ agentId: bottleneck.agentId,
24216
+ severity: bottleneck.severity
24217
+ });
24218
+ continue;
24219
+ }
24220
+ if (emittedSlots.has(slot)) continue;
24221
+ emittedSlots.add(slot);
24222
+ bus.emit({
24223
+ type: "signal.swarm_unhealthy",
24224
+ timestamp: Date.parse(metrics.calculatedAt),
24225
+ agentId: slot,
24226
+ reason: `bottleneck: ${String(bottleneck.queuedMessages)} queued, ${String(bottleneck.blockedAgents)} blocked (severity ${bottleneck.severity})`
24227
+ });
24228
+ }
24229
+ } catch (error) {
24230
+ logger55.warn("Failed to emit signal.swarm_unhealthy", { error: getErrorMessage(error) });
24231
+ }
24232
+ return emittedSlots.size;
24233
+ }
24234
+ var healthSignalTimer;
24235
+ function startSwarmHealthSignals(observer, bus, options) {
24236
+ if (healthSignalTimer !== void 0) return;
24237
+ const logger55 = options?.logger ?? defaultLogger;
24238
+ const intervalMs = options?.intervalMs ?? DEFAULT_HEALTH_SIGNAL_INTERVAL_MS;
24239
+ healthSignalTimer = setInterval(() => {
24240
+ try {
24241
+ emitSwarmUnhealthySignals(observer.getHealthMetrics(), bus, logger55);
24242
+ } catch (error) {
24243
+ logger55.debug("Swarm health poll failed", { error: getErrorMessage(error) });
24244
+ }
24245
+ }, intervalMs);
24246
+ healthSignalTimer.unref();
24247
+ }
24248
+ function shutdownSwarmHealthSignals() {
24249
+ if (healthSignalTimer !== void 0) {
24250
+ clearInterval(healthSignalTimer);
24251
+ healthSignalTimer = void 0;
24252
+ }
24253
+ }
24254
+
24255
+ // src/observability/failover-signals.ts
24256
+ var defaultLogger2 = createLogger({ component: "FailoverSignals" });
24257
+ var UNHEALTHY_STATES = /* @__PURE__ */ new Set(["degraded", "unavailable"]);
24258
+ var FAILOVER_SIGNAL_COOLDOWN_MS = 3e4;
24259
+ var CLI_NAME_SET2 = new Set(CLI_NAMES);
24260
+ function unhealthyCliFrom(payload) {
24261
+ if (payload === null || typeof payload !== "object") return void 0;
24262
+ const info = payload;
24263
+ if (typeof info.source !== "string" || !CLI_NAME_SET2.has(info.source)) return void 0;
24264
+ if (typeof info.state !== "string" || !UNHEALTHY_STATES.has(info.state)) return void 0;
24265
+ const lastError = typeof info.lastError === "string" ? info.lastError : void 0;
24266
+ const count = typeof info.failoverCount === "number" ? info.failoverCount : 0;
24267
+ const reason = `adapter ${info.state} (failovers: ${String(count)})${lastError !== void 0 ? `: ${lastError}` : ""}`;
24268
+ return { cli: info.source, reason };
24269
+ }
24270
+ var failoverSubscription;
24271
+ function startFailoverSignals(options) {
24272
+ if (failoverSubscription !== void 0) return;
24273
+ const logger55 = options?.logger ?? defaultLogger2;
24274
+ const sourceBus = options?.sourceBus ?? getGlobalEventBus();
24275
+ const pipelineBus = options?.pipelineBus ?? getPipelineEventBus();
24276
+ const cooldownMs = options?.cooldownMs ?? FAILOVER_SIGNAL_COOLDOWN_MS;
24277
+ const lastEmitByCli = /* @__PURE__ */ new Map();
24278
+ failoverSubscription = sourceBus.subscribe("adapter.failover", (event) => {
24279
+ try {
24280
+ const unhealthy = unhealthyCliFrom(event.payload);
24281
+ if (unhealthy === void 0) return;
24282
+ const now = getTimeProvider().now();
24283
+ const last = lastEmitByCli.get(unhealthy.cli);
24284
+ if (last !== void 0 && now - last < cooldownMs) return;
24285
+ lastEmitByCli.set(unhealthy.cli, now);
24286
+ pipelineBus.emit({
24287
+ type: "signal.swarm_unhealthy",
24288
+ timestamp: now,
24289
+ agentId: unhealthy.cli,
24290
+ reason: unhealthy.reason
24291
+ });
24292
+ } catch (error) {
24293
+ logger55.warn("Failed to emit signal.swarm_unhealthy from failover", {
24294
+ error: getErrorMessage(error)
24295
+ });
24296
+ }
24297
+ });
24298
+ }
24299
+ function shutdownFailoverSignals() {
24300
+ if (failoverSubscription !== void 0) {
24301
+ failoverSubscription.unsubscribe();
24302
+ failoverSubscription = void 0;
24303
+ }
24304
+ }
24305
+
24197
24306
  // src/mcp/eventbus-bridge-helpers.ts
24198
24307
  var TASK_STARTED_KEYWORDS = ["started", "created"];
24199
24308
  var TASK_COMPLETED_KEYWORDS = ["completed", "finalized", "reached"];
@@ -26892,7 +27001,7 @@ async function populateUnifiedContextOnState(state) {
26892
27001
  try {
26893
27002
  const taskCandidate = state["task"];
26894
27003
  if (typeof taskCandidate !== "string" || taskCandidate === "") return;
26895
- const { getContextForTask: getContextForTask2, inferTaskCategory: inferTaskCategory2 } = await import("./context-retriever-TZGIETJO.js");
27004
+ const { getContextForTask: getContextForTask2, inferTaskCategory: inferTaskCategory2 } = await import("./context-retriever-6O6TREXH.js");
26896
27005
  const ctx = await getContextForTask2({
26897
27006
  task: taskCandidate,
26898
27007
  category: inferTaskCategory2(taskCandidate),
@@ -42376,7 +42485,7 @@ async function tryIssueTriage(task) {
42376
42485
  try {
42377
42486
  const issueMatch = task.match(/github\.com\/([^/]+\/[^/]+)\/issues\/(\d+)/);
42378
42487
  if (issueMatch === null) return null;
42379
- const { createIssueTriage } = await import("./issue-triage-QIVZN3PJ.js");
42488
+ const { createIssueTriage } = await import("./issue-triage-KZTENUDH.js");
42380
42489
  const triage = createIssueTriage();
42381
42490
  const owner = issueMatch[1] ?? "";
42382
42491
  const num = issueMatch[2] ?? "";
@@ -42404,7 +42513,7 @@ var VALID_TEMPLATES = /* @__PURE__ */ new Set([
42404
42513
  ]);
42405
42514
  async function classifyWithLLM(task) {
42406
42515
  try {
42407
- const { executeExpert: executeExpert2 } = await import("./expert-bridge-WP5ZWXFY.js");
42516
+ const { executeExpert: executeExpert2 } = await import("./expert-bridge-Q3OWPD4L.js");
42408
42517
  const prompt = [
42409
42518
  "Classify this task into exactly one pipeline template.",
42410
42519
  "Templates: dev (implementation/bug fix/refactor), research (investigate/evaluate/compare),",
@@ -43186,7 +43295,7 @@ var memoryInitPromise = null;
43186
43295
  async function initPipelineMemory() {
43187
43296
  if (cachedMemory !== null) return cachedMemory;
43188
43297
  try {
43189
- const { createSessionMemory: createSessionMemory2 } = await import("./session-memory-O24IVZAW.js");
43298
+ const { createSessionMemory: createSessionMemory2 } = await import("./session-memory-SXQAA2EN.js");
43190
43299
  const { getLearningDir } = await import("./learning-persistence-UKPO7RYK.js");
43191
43300
  const mem = createSessionMemory2(getLearningDir());
43192
43301
  mem.startSession(`pipeline-${String(getTimeProvider().now())}`);
@@ -43243,7 +43352,7 @@ function recordRoutingExperience(category, success, durationMs) {
43243
43352
  callRecord(routingMemoryCache);
43244
43353
  return;
43245
43354
  }
43246
- routingMemoryInitPromise ??= import("./routing-memory-AGHJQTRH.js").then(({ createRoutingMemory }) => {
43355
+ routingMemoryInitPromise ??= import("./routing-memory-YZRYGXQC.js").then(({ createRoutingMemory }) => {
43247
43356
  routingMemoryCache ??= createRoutingMemory();
43248
43357
  return routingMemoryCache;
43249
43358
  }).catch((error) => {
@@ -43277,7 +43386,7 @@ ${text}` : "";
43277
43386
  }
43278
43387
  async function getWeatherContext() {
43279
43388
  try {
43280
- const { generateWeatherReport: generateWeatherReport2 } = await import("./weather-report-S5YXRY7G.js");
43389
+ const { generateWeatherReport: generateWeatherReport2 } = await import("./weather-report-D6HFOK7S.js");
43281
43390
  const report = generateWeatherReport2({ includeAdaptive: true });
43282
43391
  const mappings = "recommendedMappings" in report ? report.recommendedMappings : [];
43283
43392
  if (!Array.isArray(mappings) || mappings.length === 0) return "";
@@ -43295,7 +43404,7 @@ ${lines}
43295
43404
  }
43296
43405
  async function getMemoryContext(task) {
43297
43406
  try {
43298
- const { createSessionMemory: createSessionMemory2 } = await import("./session-memory-O24IVZAW.js");
43407
+ const { createSessionMemory: createSessionMemory2 } = await import("./session-memory-SXQAA2EN.js");
43299
43408
  const { getLearningDir } = await import("./learning-persistence-UKPO7RYK.js");
43300
43409
  const memory = createSessionMemory2(getLearningDir(), { maxLearningsInContext: 10 });
43301
43410
  const learnings = memory.searchLearnings(task.slice(0, 200));
@@ -43401,7 +43510,7 @@ ${contextBlock}`;
43401
43510
  const strategy = config.votingStrategy ?? "higher_order";
43402
43511
  await postProgress(config, "Vote", `Running consensus with ${strategy} strategy...`);
43403
43512
  try {
43404
- const { executeVoting } = await import("./consensus-vote-ZRADOLXH.js");
43513
+ const { executeVoting } = await import("./consensus-vote-XLEQFVE7.js");
43405
43514
  const votingResult = await executeVoting(
43406
43515
  {
43407
43516
  proposal: plan.slice(0, 4e3),
@@ -44328,7 +44437,7 @@ async function searchCodebaseForTask(task) {
44328
44437
  }
44329
44438
  async function queryResearchRegistry(task) {
44330
44439
  try {
44331
- const { synthesizeResearch: synthesizeResearch2 } = await import("./research-helpers-synthesize-DH5PPX7A.js");
44440
+ const { synthesizeResearch: synthesizeResearch2 } = await import("./research-helpers-synthesize-CGVR6M4S.js");
44332
44441
  const topic = task.split(/[.!?\n]/).filter((s) => s.trim().length > 10)[0]?.trim();
44333
44442
  if (topic === void 0) return null;
44334
44443
  const result = await synthesizeResearch2(topic.slice(0, 50));
@@ -44399,7 +44508,7 @@ function createScanStageWrapper() {
44399
44508
  try {
44400
44509
  const slug = ctx.task.match(/([a-zA-Z0-9._-]+\/[a-zA-Z0-9._-]+)/)?.[1];
44401
44510
  if (slug !== void 0) {
44402
- const { generateSecurityPlan: generateSecurityPlan2 } = await import("./repo-security-plan-KZNEXDCI.js");
44511
+ const { generateSecurityPlan: generateSecurityPlan2 } = await import("./repo-security-plan-XCX7EFJR.js");
44403
44512
  const plan = await generateSecurityPlan2({ repo: slug, maxScanners: 10 });
44404
44513
  const recs = plan.recommendations.slice(0, 5).map((r) => `${r.priority}: ${r.displayName} (${r.category})`).join("; ");
44405
44514
  return output(PIPELINE_STATE_KEYS.FINDINGS, recs, getTimeProvider().now() - start, true);
@@ -51042,7 +51151,7 @@ var GitHubTaskTracker = class {
51042
51151
  cachedProvider = null;
51043
51152
  async getProvider() {
51044
51153
  if (this.cachedProvider !== null) return this.cachedProvider;
51045
- const { createScmProvider } = await import("./factory-2TN2VZTR.js");
51154
+ const { createScmProvider } = await import("./factory-PSMTMC7V.js");
51046
51155
  const result = await createScmProvider({ repo: this.config.repo ?? "" });
51047
51156
  if (!result.ok) throw new Error(`SCM provider error: ${result.error.message}`);
51048
51157
  this.cachedProvider = result.value;
@@ -51462,6 +51571,10 @@ export {
51462
51571
  createSwarmObserver,
51463
51572
  getSwarmObserver,
51464
51573
  setSwarmObserver,
51574
+ startSwarmHealthSignals,
51575
+ shutdownSwarmHealthSignals,
51576
+ startFailoverSignals,
51577
+ shutdownFailoverSignals,
51465
51578
  DEFAULT_DASHBOARD_CONFIG,
51466
51579
  DashboardConfigSchema,
51467
51580
  TextDashboardRenderer,
@@ -51746,4 +51859,4 @@ export {
51746
51859
  detectBackend,
51747
51860
  createTaskTracker
51748
51861
  };
51749
- //# sourceMappingURL=chunk-IJ2AZZVH.js.map
51862
+ //# sourceMappingURL=chunk-FYGZ4MEQ.js.map