nexus-agents 8.3.2 → 8.4.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 (125) hide show
  1. package/dist/{child-mcp-config-IPF4QIVB.js → child-mcp-config-RNWGSHLP.js} +2 -2
  2. package/dist/{chunk-3RMLDTUF.js → chunk-2LQROHUE.js} +7 -7
  3. package/dist/{chunk-PGUZPMT4.js → chunk-44TOYOLL.js} +2 -2
  4. package/dist/{chunk-F33RCSOC.js → chunk-4EKFQECD.js} +5 -5
  5. package/dist/{chunk-EWKBHDAU.js → chunk-6RGAAA4U.js} +4 -4
  6. package/dist/{chunk-U5YJKJK2.js → chunk-B6HNAXBM.js} +2 -2
  7. package/dist/{chunk-44I4XVRU.js → chunk-CFGJGRVF.js} +30 -17
  8. package/dist/chunk-CFGJGRVF.js.map +1 -0
  9. package/dist/{chunk-6MPT2NRF.js → chunk-D2WWKJMI.js} +2 -2
  10. package/dist/{chunk-3MBGQAO2.js → chunk-DC2OJAIB.js} +3 -3
  11. package/dist/{chunk-2XXKUAQS.js → chunk-F4WIX5UH.js} +3 -3
  12. package/dist/{chunk-3OU7XMEP.js → chunk-FBAEBGQ3.js} +3 -3
  13. package/dist/{chunk-6LDUEA4I.js → chunk-FECYCZZR.js} +2 -2
  14. package/dist/{chunk-ONSYYUB4.js → chunk-FURVUS67.js} +35 -35
  15. package/dist/{chunk-VULYVX6X.js → chunk-HVPF7BBS.js} +4 -4
  16. package/dist/{chunk-JGBXLELL.js → chunk-I2FSX2XS.js} +6 -6
  17. package/dist/{chunk-K6EHC227.js → chunk-JB3BG47N.js} +2 -2
  18. package/dist/{chunk-UZULX2DZ.js → chunk-K7WPK63Q.js} +8 -8
  19. package/dist/{chunk-OM5BVTVF.js → chunk-KHARSVPD.js} +2 -2
  20. package/dist/{chunk-TO5LX5VU.js → chunk-L2WZSYQ4.js} +2 -2
  21. package/dist/{chunk-W2R6UVZJ.js → chunk-LWLQZEG7.js} +2 -2
  22. package/dist/chunk-M5DIGZIM.js +7 -0
  23. package/dist/{chunk-FKWMYLSZ.js → chunk-OAP5CFEN.js} +2 -2
  24. package/dist/{chunk-4U62WRPL.js → chunk-OI7VYOYS.js} +15 -4
  25. package/dist/chunk-OI7VYOYS.js.map +1 -0
  26. package/dist/{chunk-ZYPEHPRM.js → chunk-PJAMCYKJ.js} +2 -2
  27. package/dist/{chunk-5YC3SC34.js → chunk-QETXUEHY.js} +2 -2
  28. package/dist/{chunk-PSAXQXL5.js → chunk-RHZ7OTUR.js} +3 -3
  29. package/dist/{chunk-QP423I4T.js → chunk-RLP56UYX.js} +2 -2
  30. package/dist/{chunk-F4AT3BCP.js → chunk-RO6W6DUN.js} +4 -4
  31. package/dist/{chunk-FFZNRJ5Q.js → chunk-RQFYOMCK.js} +2 -2
  32. package/dist/{chunk-7RLFZ6OB.js → chunk-U4QKZICX.js} +2 -2
  33. package/dist/{chunk-CCRTVIXF.js → chunk-UDZBQWWH.js} +7 -7
  34. package/dist/{chunk-HBHTXBA4.js → chunk-UFF3NTS3.js} +2 -2
  35. package/dist/{chunk-Y5I3F3YC.js → chunk-YMBWWR5K.js} +2 -2
  36. package/dist/{chunk-T7XKLZPC.js → chunk-ZR2AT5Y4.js} +5 -5
  37. package/dist/{cli-circuit-breaker-KRIR74SW.js → cli-circuit-breaker-BAV6CS55.js} +3 -3
  38. package/dist/cli.js +41 -41
  39. package/dist/{composite-router-VTPCCQQU.js → composite-router-ZBUAKNWH.js} +2 -2
  40. package/dist/{consensus-vote-H67IAMI2.js → consensus-vote-R5GXCSXV.js} +17 -17
  41. package/dist/{context-retriever-ASWO5E6N.js → context-retriever-EUAU2AMR.js} +8 -8
  42. package/dist/{doctor-deep-WLVSUPFA.js → doctor-deep-ZHCMOZFP.js} +3 -3
  43. package/dist/{doctor-live-5L4RI4GW.js → doctor-live-BUHVK3DK.js} +9 -9
  44. package/dist/{expert-bridge-K4FSDGPL.js → expert-bridge-UPCLL7ND.js} +4 -4
  45. package/dist/{factory-X4PUAG26.js → factory-3OOZ2ZQP.js} +9 -9
  46. package/dist/{factory-DQWPXJHP.js → factory-6HNECKBF.js} +5 -5
  47. package/dist/{improvement-review-UECHDBER.js → improvement-review-UBDVNB55.js} +6 -6
  48. package/dist/index.d.ts +5 -0
  49. package/dist/index.js +31 -31
  50. package/dist/{init-opencode-73YZUQQX.js → init-opencode-CKCCZOT3.js} +6 -6
  51. package/dist/issue-triage-4S5K7TSE.js +17 -0
  52. package/dist/{pr-reviewer-helpers-NRVB6RVY.js → pr-reviewer-helpers-RKAK33X2.js} +4 -4
  53. package/dist/{registry-command-O7TLGMNL.js → registry-command-3J5SNWG2.js} +2 -2
  54. package/dist/{repo-security-plan-OAOLRK5Z.js → repo-security-plan-VUA76IN3.js} +3 -3
  55. package/dist/{research-helpers-synthesize-J66KQW2N.js → research-helpers-synthesize-6EEGTTZY.js} +4 -4
  56. package/dist/{routing-memory-TLALXQEY.js → routing-memory-LLGBBX7P.js} +2 -2
  57. package/dist/{session-memory-DMXEXMOD.js → session-memory-FJOIX7BQ.js} +3 -3
  58. package/dist/{setup-config-THXHCRSH.js → setup-config-R26W2YIS.js} +3 -3
  59. package/dist/{setup-custom-api-EETAAEAD.js → setup-custom-api-MN6BPPK5.js} +4 -4
  60. package/dist/setup-data-dir-EYIPKPGP.js +29 -0
  61. package/dist/{tool-memory-RSRUWJFE.js → tool-memory-B6OUGSGS.js} +5 -5
  62. package/dist/{unified-registry-OHYTMXKA.js → unified-registry-4CXEC2UP.js} +10 -10
  63. package/dist/{weather-report-R5NAYRQK.js → weather-report-2MF7IEQ4.js} +2 -2
  64. package/package.json +1 -1
  65. package/dist/chunk-44I4XVRU.js.map +0 -1
  66. package/dist/chunk-4U62WRPL.js.map +0 -1
  67. package/dist/chunk-LZBARHPR.js +0 -7
  68. package/dist/issue-triage-6W5G6LC6.js +0 -17
  69. package/dist/setup-data-dir-HJCC6U4N.js +0 -29
  70. /package/dist/{child-mcp-config-IPF4QIVB.js.map → child-mcp-config-RNWGSHLP.js.map} +0 -0
  71. /package/dist/{chunk-3RMLDTUF.js.map → chunk-2LQROHUE.js.map} +0 -0
  72. /package/dist/{chunk-PGUZPMT4.js.map → chunk-44TOYOLL.js.map} +0 -0
  73. /package/dist/{chunk-F33RCSOC.js.map → chunk-4EKFQECD.js.map} +0 -0
  74. /package/dist/{chunk-EWKBHDAU.js.map → chunk-6RGAAA4U.js.map} +0 -0
  75. /package/dist/{chunk-U5YJKJK2.js.map → chunk-B6HNAXBM.js.map} +0 -0
  76. /package/dist/{chunk-6MPT2NRF.js.map → chunk-D2WWKJMI.js.map} +0 -0
  77. /package/dist/{chunk-3MBGQAO2.js.map → chunk-DC2OJAIB.js.map} +0 -0
  78. /package/dist/{chunk-2XXKUAQS.js.map → chunk-F4WIX5UH.js.map} +0 -0
  79. /package/dist/{chunk-3OU7XMEP.js.map → chunk-FBAEBGQ3.js.map} +0 -0
  80. /package/dist/{chunk-6LDUEA4I.js.map → chunk-FECYCZZR.js.map} +0 -0
  81. /package/dist/{chunk-ONSYYUB4.js.map → chunk-FURVUS67.js.map} +0 -0
  82. /package/dist/{chunk-VULYVX6X.js.map → chunk-HVPF7BBS.js.map} +0 -0
  83. /package/dist/{chunk-JGBXLELL.js.map → chunk-I2FSX2XS.js.map} +0 -0
  84. /package/dist/{chunk-K6EHC227.js.map → chunk-JB3BG47N.js.map} +0 -0
  85. /package/dist/{chunk-UZULX2DZ.js.map → chunk-K7WPK63Q.js.map} +0 -0
  86. /package/dist/{chunk-OM5BVTVF.js.map → chunk-KHARSVPD.js.map} +0 -0
  87. /package/dist/{chunk-TO5LX5VU.js.map → chunk-L2WZSYQ4.js.map} +0 -0
  88. /package/dist/{chunk-W2R6UVZJ.js.map → chunk-LWLQZEG7.js.map} +0 -0
  89. /package/dist/{chunk-LZBARHPR.js.map → chunk-M5DIGZIM.js.map} +0 -0
  90. /package/dist/{chunk-FKWMYLSZ.js.map → chunk-OAP5CFEN.js.map} +0 -0
  91. /package/dist/{chunk-ZYPEHPRM.js.map → chunk-PJAMCYKJ.js.map} +0 -0
  92. /package/dist/{chunk-5YC3SC34.js.map → chunk-QETXUEHY.js.map} +0 -0
  93. /package/dist/{chunk-PSAXQXL5.js.map → chunk-RHZ7OTUR.js.map} +0 -0
  94. /package/dist/{chunk-QP423I4T.js.map → chunk-RLP56UYX.js.map} +0 -0
  95. /package/dist/{chunk-F4AT3BCP.js.map → chunk-RO6W6DUN.js.map} +0 -0
  96. /package/dist/{chunk-FFZNRJ5Q.js.map → chunk-RQFYOMCK.js.map} +0 -0
  97. /package/dist/{chunk-7RLFZ6OB.js.map → chunk-U4QKZICX.js.map} +0 -0
  98. /package/dist/{chunk-CCRTVIXF.js.map → chunk-UDZBQWWH.js.map} +0 -0
  99. /package/dist/{chunk-HBHTXBA4.js.map → chunk-UFF3NTS3.js.map} +0 -0
  100. /package/dist/{chunk-Y5I3F3YC.js.map → chunk-YMBWWR5K.js.map} +0 -0
  101. /package/dist/{chunk-T7XKLZPC.js.map → chunk-ZR2AT5Y4.js.map} +0 -0
  102. /package/dist/{cli-circuit-breaker-KRIR74SW.js.map → cli-circuit-breaker-BAV6CS55.js.map} +0 -0
  103. /package/dist/{composite-router-VTPCCQQU.js.map → composite-router-ZBUAKNWH.js.map} +0 -0
  104. /package/dist/{consensus-vote-H67IAMI2.js.map → consensus-vote-R5GXCSXV.js.map} +0 -0
  105. /package/dist/{context-retriever-ASWO5E6N.js.map → context-retriever-EUAU2AMR.js.map} +0 -0
  106. /package/dist/{doctor-deep-WLVSUPFA.js.map → doctor-deep-ZHCMOZFP.js.map} +0 -0
  107. /package/dist/{doctor-live-5L4RI4GW.js.map → doctor-live-BUHVK3DK.js.map} +0 -0
  108. /package/dist/{expert-bridge-K4FSDGPL.js.map → expert-bridge-UPCLL7ND.js.map} +0 -0
  109. /package/dist/{factory-DQWPXJHP.js.map → factory-3OOZ2ZQP.js.map} +0 -0
  110. /package/dist/{factory-X4PUAG26.js.map → factory-6HNECKBF.js.map} +0 -0
  111. /package/dist/{improvement-review-UECHDBER.js.map → improvement-review-UBDVNB55.js.map} +0 -0
  112. /package/dist/{init-opencode-73YZUQQX.js.map → init-opencode-CKCCZOT3.js.map} +0 -0
  113. /package/dist/{issue-triage-6W5G6LC6.js.map → issue-triage-4S5K7TSE.js.map} +0 -0
  114. /package/dist/{pr-reviewer-helpers-NRVB6RVY.js.map → pr-reviewer-helpers-RKAK33X2.js.map} +0 -0
  115. /package/dist/{registry-command-O7TLGMNL.js.map → registry-command-3J5SNWG2.js.map} +0 -0
  116. /package/dist/{repo-security-plan-OAOLRK5Z.js.map → repo-security-plan-VUA76IN3.js.map} +0 -0
  117. /package/dist/{research-helpers-synthesize-J66KQW2N.js.map → research-helpers-synthesize-6EEGTTZY.js.map} +0 -0
  118. /package/dist/{routing-memory-TLALXQEY.js.map → routing-memory-LLGBBX7P.js.map} +0 -0
  119. /package/dist/{session-memory-DMXEXMOD.js.map → session-memory-FJOIX7BQ.js.map} +0 -0
  120. /package/dist/{setup-config-THXHCRSH.js.map → setup-config-R26W2YIS.js.map} +0 -0
  121. /package/dist/{setup-custom-api-EETAAEAD.js.map → setup-custom-api-MN6BPPK5.js.map} +0 -0
  122. /package/dist/{setup-data-dir-HJCC6U4N.js.map → setup-data-dir-EYIPKPGP.js.map} +0 -0
  123. /package/dist/{tool-memory-RSRUWJFE.js.map → tool-memory-B6OUGSGS.js.map} +0 -0
  124. /package/dist/{unified-registry-OHYTMXKA.js.map → unified-registry-4CXEC2UP.js.map} +0 -0
  125. /package/dist/{weather-report-R5NAYRQK.js.map → weather-report-2MF7IEQ4.js.map} +0 -0
@@ -3,7 +3,7 @@ import {
3
3
  } from "./chunk-4HXPNLZS.js";
4
4
  import {
5
5
  createLogger
6
- } from "./chunk-3MBGQAO2.js";
6
+ } from "./chunk-DC2OJAIB.js";
7
7
  import "./chunk-ITCKXMOH.js";
8
8
  import "./chunk-MM223CVS.js";
9
9
  import "./chunk-ZPWHCABL.js";
@@ -62,4 +62,4 @@ export {
62
62
  generateMcpConfig,
63
63
  getDefaultAllowedTools
64
64
  };
65
- //# sourceMappingURL=child-mcp-config-IPF4QIVB.js.map
65
+ //# sourceMappingURL=child-mcp-config-RNWGSHLP.js.map
@@ -1,19 +1,19 @@
1
1
  import {
2
2
  readOpenAICompatEnv
3
- } from "./chunk-T7XKLZPC.js";
3
+ } from "./chunk-ZR2AT5Y4.js";
4
4
  import {
5
5
  allOf
6
6
  } from "./chunk-OQB3XC5O.js";
7
7
  import {
8
8
  VERSION
9
- } from "./chunk-LZBARHPR.js";
9
+ } from "./chunk-M5DIGZIM.js";
10
10
  import {
11
11
  capitalize
12
12
  } from "./chunk-6T3EPABN.js";
13
13
  import {
14
14
  createAllAdapters,
15
15
  probeCli
16
- } from "./chunk-UZULX2DZ.js";
16
+ } from "./chunk-K7WPK63Q.js";
17
17
  import {
18
18
  getNexusTmpDir
19
19
  } from "./chunk-4HXPNLZS.js";
@@ -28,7 +28,7 @@ import {
28
28
  ok,
29
29
  symbols,
30
30
  writeLine
31
- } from "./chunk-3MBGQAO2.js";
31
+ } from "./chunk-DC2OJAIB.js";
32
32
  import {
33
33
  getLearningDir,
34
34
  getOutcomesFile,
@@ -1201,13 +1201,13 @@ async function runDoctorFix(result) {
1201
1201
  writeLine2("\u2500".repeat(40));
1202
1202
  let fixCount = 0;
1203
1203
  if (!result.dataDirectory.rootExists || result.dataDirectory.subdirectories.some((d) => !d.exists || !d.writable)) {
1204
- const { initDataDirectories: initDataDirectories2, describeDataDirFix: describeDataDirFix2 } = await import("./setup-data-dir-HJCC6U4N.js");
1204
+ const { initDataDirectories: initDataDirectories2, describeDataDirFix: describeDataDirFix2 } = await import("./setup-data-dir-EYIPKPGP.js");
1205
1205
  const outcome = describeDataDirFix2(initDataDirectories2());
1206
1206
  writeLine2(outcome.line);
1207
1207
  if (outcome.counted) fixCount++;
1208
1208
  }
1209
1209
  if (!result.configFile.found) {
1210
- const { runConfigInitSync } = await import("./setup-config-THXHCRSH.js");
1210
+ const { runConfigInitSync } = await import("./setup-config-R26W2YIS.js");
1211
1211
  const configResult = runConfigInitSync(process.cwd(), false, false);
1212
1212
  if (configResult.success && configResult.created) {
1213
1213
  writeLine2(`\u2713 Generated config: ${configResult.path}`);
@@ -1303,4 +1303,4 @@ export {
1303
1303
  startStdioServer,
1304
1304
  closeServer
1305
1305
  };
1306
- //# sourceMappingURL=chunk-3RMLDTUF.js.map
1306
+ //# sourceMappingURL=chunk-2LQROHUE.js.map
@@ -2,7 +2,7 @@ import {
2
2
  CACHE_TIMEOUTS,
3
3
  createLogger,
4
4
  getTimeProvider
5
- } from "./chunk-3MBGQAO2.js";
5
+ } from "./chunk-DC2OJAIB.js";
6
6
 
7
7
  // src/security/trust-types.ts
8
8
  import { z } from "zod";
@@ -565,4 +565,4 @@ export {
565
565
  resolveReputationGatingMode,
566
566
  gateWithReputation
567
567
  };
568
- //# sourceMappingURL=chunk-PGUZPMT4.js.map
568
+ //# sourceMappingURL=chunk-44TOYOLL.js.map
@@ -5,13 +5,13 @@ import {
5
5
  loadTechniquesRegistry,
6
6
  resolveInsideRoot,
7
7
  savePapersRegistry
8
- } from "./chunk-K6EHC227.js";
8
+ } from "./chunk-JB3BG47N.js";
9
9
  import {
10
10
  resolveToken
11
- } from "./chunk-5YC3SC34.js";
11
+ } from "./chunk-QETXUEHY.js";
12
12
  import {
13
13
  getToolMemory
14
- } from "./chunk-4U62WRPL.js";
14
+ } from "./chunk-OI7VYOYS.js";
15
15
  import {
16
16
  capitalizeWords,
17
17
  tokenizeFiltered,
@@ -37,7 +37,7 @@ import {
37
37
  getTimeProvider,
38
38
  ok,
39
39
  registerPersistentDistillerFactory
40
- } from "./chunk-3MBGQAO2.js";
40
+ } from "./chunk-DC2OJAIB.js";
41
41
  import {
42
42
  ensureLearningDir,
43
43
  getRulesFile
@@ -4132,4 +4132,4 @@ export {
4132
4132
  DEFAULT_CONTEXT_BUDGET_TOKENS,
4133
4133
  getContextPromptPrefix
4134
4134
  };
4135
- //# sourceMappingURL=chunk-F33RCSOC.js.map
4135
+ //# sourceMappingURL=chunk-4EKFQECD.js.map
@@ -1,14 +1,14 @@
1
1
  import {
2
2
  GitHubProvider,
3
3
  ScmError
4
- } from "./chunk-QP423I4T.js";
4
+ } from "./chunk-RLP56UYX.js";
5
5
  import {
6
6
  resolveToken
7
- } from "./chunk-5YC3SC34.js";
7
+ } from "./chunk-QETXUEHY.js";
8
8
  import {
9
9
  err,
10
10
  ok
11
- } from "./chunk-3MBGQAO2.js";
11
+ } from "./chunk-DC2OJAIB.js";
12
12
 
13
13
  // src/scm/factory.ts
14
14
  async function createScmProvider(config) {
@@ -41,4 +41,4 @@ export {
41
41
  createScmProvider,
42
42
  createGitHubProvider
43
43
  };
44
- //# sourceMappingURL=chunk-EWKBHDAU.js.map
44
+ //# sourceMappingURL=chunk-6RGAAA4U.js.map
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  getTimeProvider
3
- } from "./chunk-3MBGQAO2.js";
3
+ } from "./chunk-DC2OJAIB.js";
4
4
 
5
5
  // src/security/audit-trail.ts
6
6
  var MAX_EVENTS = 1e4;
@@ -205,4 +205,4 @@ export {
205
205
  createGraphAuditBridge,
206
206
  createAuditTrail
207
207
  };
208
- //# sourceMappingURL=chunk-U5YJKJK2.js.map
208
+ //# sourceMappingURL=chunk-B6HNAXBM.js.map
@@ -1,7 +1,7 @@
1
1
  import {
2
2
  computeCostDetail,
3
3
  priceBasisOf
4
- } from "./chunk-6LDUEA4I.js";
4
+ } from "./chunk-FECYCZZR.js";
5
5
  import {
6
6
  allOf
7
7
  } from "./chunk-OQB3XC5O.js";
@@ -23,22 +23,22 @@ import {
23
23
  toolSuccessStructured,
24
24
  withProgressHeartbeat,
25
25
  wrapToolWithTimeout
26
- } from "./chunk-VULYVX6X.js";
26
+ } from "./chunk-HVPF7BBS.js";
27
27
  import {
28
28
  assessPanelIndependence,
29
29
  countDistinctModels,
30
30
  createEvent,
31
31
  getGlobalRegistry
32
- } from "./chunk-F4AT3BCP.js";
32
+ } from "./chunk-RO6W6DUN.js";
33
33
  import {
34
34
  getToolMemory
35
- } from "./chunk-4U62WRPL.js";
35
+ } from "./chunk-OI7VYOYS.js";
36
36
  import {
37
37
  authRemediation,
38
38
  delay,
39
39
  getAvailableClis,
40
40
  withTimeout
41
- } from "./chunk-UZULX2DZ.js";
41
+ } from "./chunk-K7WPK63Q.js";
42
42
  import {
43
43
  AgentError,
44
44
  CLI_NAMES,
@@ -67,7 +67,7 @@ import {
67
67
  registerPersistentOutcomeStoreFactory,
68
68
  resolveClassGuardMs,
69
69
  resolveVoteTimeout
70
- } from "./chunk-3MBGQAO2.js";
70
+ } from "./chunk-DC2OJAIB.js";
71
71
  import {
72
72
  ensureLearningDir,
73
73
  getOutcomesFile
@@ -1015,6 +1015,7 @@ async function executeWithRetries(opts) {
1015
1015
 
1016
1016
  // src/cli/voter-agents-deadline.ts
1017
1017
  var DEADLINE_MESSAGE = "overall consensus deadline exceeded";
1018
+ var CANCELLED_MESSAGE = "cancelled before this voter was launched";
1018
1019
  function shouldRetryOnFallback(result, used, fallback) {
1019
1020
  return result.source === "error" && result.error !== DEADLINE_MESSAGE && adapterCliKey(used) !== adapterCliKey(fallback);
1020
1021
  }
@@ -1047,6 +1048,9 @@ function raceWithDeadline(p, role, deadlineMs) {
1047
1048
  if (timer !== void 0) clearTimeout(timer);
1048
1049
  });
1049
1050
  }
1051
+ function cancelled(signal) {
1052
+ return signal?.aborted === true;
1053
+ }
1050
1054
  async function launchVotesWithOverallDeadline(input) {
1051
1055
  const {
1052
1056
  roles,
@@ -1076,9 +1080,11 @@ async function launchVotesWithOverallDeadline(input) {
1076
1080
  );
1077
1081
  const wrapped = roles.map(async (role, i) => {
1078
1082
  if (i > 0 && interDelay > 0) await delay(interDelay);
1083
+ if (cancelled(input.signal)) return createErrorVoteResult(role, CANCELLED_MESSAGE, 0);
1079
1084
  const adapter = roleAdapters.get(role) ?? fallbackAdapter;
1080
1085
  const primary = await voteOnAdapter(role, adapter);
1081
1086
  if (!shouldRetryOnFallback(primary, adapter, fallbackAdapter)) return primary;
1087
+ if (cancelled(input.signal)) return primary;
1082
1088
  logger10.warn("Voter failed on diverse adapter; retrying on fallback (#3587)", {
1083
1089
  role,
1084
1090
  failedCli: adapterCliKey(adapter),
@@ -1303,7 +1309,8 @@ async function launchStaggeredVotes(input) {
1303
1309
  voteOptions,
1304
1310
  interDelay,
1305
1311
  overallDeadlineMs,
1306
- voteFn: executeAgentVote
1312
+ voteFn: executeAgentVote,
1313
+ signal: input.signal
1307
1314
  });
1308
1315
  }
1309
1316
  async function collectRealVotes(options) {
@@ -1344,7 +1351,8 @@ async function collectRealVotes(options) {
1344
1351
  fallbackAdapter: adapterResult.adapter,
1345
1352
  logger: logger10,
1346
1353
  voteOptions,
1347
- interDelay
1354
+ interDelay,
1355
+ signal: options.signal
1348
1356
  });
1349
1357
  reportPanelIndependence([...roleAdapters.values()], roles.length, "post-vote", logger10);
1350
1358
  return results;
@@ -6314,7 +6322,7 @@ function logPartialProposal(bounded, log) {
6314
6322
  }
6315
6323
  async function runContrarianCheck(proposal, log) {
6316
6324
  try {
6317
- const { executeExpert } = await import("./expert-bridge-K4FSDGPL.js");
6325
+ const { executeExpert } = await import("./expert-bridge-UPCLL7ND.js");
6318
6326
  const bounded = boundArtifactForReview(proposal, CONTRARIAN_PROPOSAL_BUDGET, "proposal");
6319
6327
  logPartialProposal(bounded, log);
6320
6328
  const result = await executeExpert("architecture", buildContrarianPrompt(bounded));
@@ -6387,7 +6395,7 @@ async function maybeEscalateContrarian(input, outcome, ctx, logger10, opts) {
6387
6395
  return { escalated: await executeVoting({ ...input, quickMode: false }, logger10, opts) };
6388
6396
  }
6389
6397
  async function executeVoting(input, logger10, opts) {
6390
- const result = await executeVotingInner(input, logger10, opts);
6398
+ const result = await executeVotingInner(input, logger10, opts ?? {});
6391
6399
  const errorCount = result.votes.filter((v) => v.source === "error").length;
6392
6400
  applyOptionGate(input, result);
6393
6401
  result.decision = resolveVoteDecision(input, result, errorCount).decision;
@@ -6425,9 +6433,10 @@ async function executeVotingInner(input, logger10, opts) {
6425
6433
  roles,
6426
6434
  proposal: input.proposal,
6427
6435
  simulate: input.simulateVotes,
6428
- ...opts?.voteTimeoutMs !== void 0 && { timeoutMs: opts.voteTimeoutMs },
6429
- ...opts?.gatewayAdapters !== void 0 && { gatewayAdapters: opts.gatewayAdapters },
6430
- declaredOptions: input.options
6436
+ ...opts.voteTimeoutMs !== void 0 && { timeoutMs: opts.voteTimeoutMs },
6437
+ ...opts.gatewayAdapters !== void 0 && { gatewayAdapters: opts.gatewayAdapters },
6438
+ declaredOptions: input.options,
6439
+ signal: opts.signal
6431
6440
  });
6432
6441
  const policyDecision = applyErrorPolicy(votes, errorPolicy);
6433
6442
  if (policyDecision.shortCircuit) {
@@ -6539,11 +6548,12 @@ function recordVoteSideEffects(proposal, strategy, result, logger10, ratifies) {
6539
6548
  }
6540
6549
  return { costSummary, voteRecord };
6541
6550
  }
6542
- async function handleConsensusVote(deps, args) {
6551
+ async function handleConsensusVote(deps, args, signal) {
6543
6552
  const logger10 = deps.logger ?? createLogger({ tool: "consensus_vote" });
6544
6553
  try {
6545
6554
  const result = await executeVoting(args, logger10, {
6546
- ...deps.gatewayAdapters !== void 0 && { gatewayAdapters: deps.gatewayAdapters }
6555
+ ...deps.gatewayAdapters !== void 0 && { gatewayAdapters: deps.gatewayAdapters },
6556
+ signal
6547
6557
  });
6548
6558
  const strategy = args.strategy ?? "simple_majority";
6549
6559
  const errorVotes = result.votes.filter((v) => v.source === "error");
@@ -6599,7 +6609,10 @@ function dispatchAsyncConsensusVote(deps, args) {
6599
6609
  // callback RESOLVES — so a dead voter panel produced a job a caller polling
6600
6610
  // `get_job_result` read as a success. Reject instead, mirroring the sync
6601
6611
  // sibling's `toolStructuredError` on the same condition.
6602
- run: (_jobId, input) => unwrapVoteOrThrow(handleConsensusVote(deps, input)),
6612
+ // #5393: arity 3. `runAsJob` derives `signalAccepted` from `run.length`, so
6613
+ // taking the signal is what makes the job record say cancellation works —
6614
+ // the claim follows the capability instead of being asserted separately.
6615
+ run: (_jobId, input, signal) => unwrapVoteOrThrow(handleConsensusVote(deps, input, signal)),
6603
6616
  ...deps.logger !== void 0 ? { logger: deps.logger } : {}
6604
6617
  });
6605
6618
  }
@@ -6892,4 +6905,4 @@ export {
6892
6905
  CONSENSUS_VOTE_TOOL_SCHEMA,
6893
6906
  registerConsensusVoteTool
6894
6907
  };
6895
- //# sourceMappingURL=chunk-44I4XVRU.js.map
6908
+ //# sourceMappingURL=chunk-CFGJGRVF.js.map