nexus-agents 9.2.0 → 9.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 (145) hide show
  1. package/dist/{ast-rule-runner-DFEUIC2E.js → ast-rule-runner-5U6TE6YJ.js} +3 -3
  2. package/dist/{child-mcp-config-ALJL5I7K.js → child-mcp-config-IR7LRMIK.js} +2 -2
  3. package/dist/{chunk-M43A5MDJ.js → chunk-2AN5NGCQ.js} +4 -4
  4. package/dist/{chunk-A5D7666X.js → chunk-2AW2VHMK.js} +2 -2
  5. package/dist/{chunk-42TS2JOS.js → chunk-6H4NUU7G.js} +5 -5
  6. package/dist/{chunk-JZSKEIQF.js → chunk-6WPXQTQY.js} +2 -2
  7. package/dist/{chunk-625YPLMG.js → chunk-6Z3MAHAC.js} +2 -2
  8. package/dist/{chunk-SU47CN4Q.js → chunk-7XJZTSHW.js} +120 -64
  9. package/dist/chunk-7XJZTSHW.js.map +1 -0
  10. package/dist/{chunk-ZNXWR6V6.js → chunk-AFAM6GK3.js} +7 -7
  11. package/dist/{chunk-WDSRUC3H.js → chunk-AI6LKFGU.js} +3 -3
  12. package/dist/{chunk-4ROIBRK5.js → chunk-AYBOQE2Y.js} +3 -3
  13. package/dist/chunk-AYBOQE2Y.js.map +1 -0
  14. package/dist/{chunk-DJ7QTY5J.js → chunk-C5WECFBR.js} +5 -5
  15. package/dist/{chunk-KJ46Q24G.js → chunk-DEQRRCHK.js} +2 -2
  16. package/dist/{chunk-XBWG4BJU.js → chunk-DG2UY5QU.js} +2 -2
  17. package/dist/{chunk-DYVYV7NZ.js → chunk-DYTB2XW2.js} +5 -5
  18. package/dist/{chunk-VOJCSOVL.js → chunk-EPCR2GOE.js} +2 -2
  19. package/dist/{chunk-5IMXQQQX.js → chunk-ETGNAHY3.js} +4 -4
  20. package/dist/{chunk-KWQ5IR2A.js → chunk-FKMBZ53Y.js} +2 -2
  21. package/dist/{chunk-WDYK7OAI.js → chunk-FTUBCD52.js} +3 -3
  22. package/dist/{chunk-ZC6QDPMA.js → chunk-FWSAYHGV.js} +4 -4
  23. package/dist/{chunk-AWF35M67.js → chunk-H4ACPMJS.js} +4 -4
  24. package/dist/{chunk-GNGKWFC3.js → chunk-HESQ746B.js} +2 -2
  25. package/dist/{chunk-GAJRBRED.js → chunk-HK4LBUYY.js} +2 -2
  26. package/dist/{chunk-GTWTVDLP.js → chunk-II4XITQ6.js} +13 -13
  27. package/dist/{chunk-3JRQWWBD.js → chunk-JNRDNE26.js} +2 -2
  28. package/dist/{chunk-GNGIZJAC.js → chunk-LWLFWWA7.js} +3 -3
  29. package/dist/{chunk-VS3C3L63.js → chunk-ONWH4UGD.js} +82 -64
  30. package/dist/chunk-ONWH4UGD.js.map +1 -0
  31. package/dist/{chunk-KLDUWDNU.js → chunk-ONYCBTOH.js} +10 -9
  32. package/dist/chunk-ONYCBTOH.js.map +1 -0
  33. package/dist/{chunk-TGOZLRO7.js → chunk-P7327767.js} +2 -2
  34. package/dist/{chunk-ZVSJPKEZ.js → chunk-Q5F4OBOK.js} +2 -2
  35. package/dist/{chunk-PSZQ657B.js → chunk-Q7RFJSR5.js} +3 -3
  36. package/dist/{chunk-UNIRQWHT.js → chunk-RI4IXOZT.js} +2 -2
  37. package/dist/{chunk-PDT6QYKY.js → chunk-TFQMVUWQ.js} +6 -5
  38. package/dist/{chunk-PDT6QYKY.js.map → chunk-TFQMVUWQ.js.map} +1 -1
  39. package/dist/{chunk-TJ4VWR32.js → chunk-TMHCN5EY.js} +5 -5
  40. package/dist/{chunk-MXYKMQ53.js → chunk-TQEXRC5C.js} +250 -92
  41. package/dist/chunk-TQEXRC5C.js.map +1 -0
  42. package/dist/{chunk-ETW6QNVI.js → chunk-VQGHQVD2.js} +3 -3
  43. package/dist/{chunk-XPQ2RDMV.js → chunk-XJ65J3O5.js} +5 -5
  44. package/dist/{cli-circuit-breaker-OTFWY5A5.js → cli-circuit-breaker-AZHN2TMH.js} +3 -3
  45. package/dist/{cli-readiness-WFUMPJCU.js → cli-readiness-H4JTTKKU.js} +7 -7
  46. package/dist/cli.d.ts +1 -1
  47. package/dist/cli.js +44 -44
  48. package/dist/{composite-router-LE4SNM2X.js → composite-router-WCTNVMSX.js} +2 -2
  49. package/dist/{consensus-vote-2BEOCYGU.js → consensus-vote-RD3SME3K.js} +17 -17
  50. package/dist/{consensus-vote-types-q8io4acj.d.ts → consensus-vote-types-G7Lnj3B3.d.ts} +26 -32
  51. package/dist/{context-retriever-NKP73OSE.js → context-retriever-YM2PPNSY.js} +8 -8
  52. package/dist/{doctor-deep-FQPLASUY.js → doctor-deep-6P23G7PN.js} +3 -3
  53. package/dist/{doctor-gateway-report-3I7KQVU3.js → doctor-gateway-report-4TXHTWUM.js} +7 -7
  54. package/dist/{doctor-live-ZAMCNQGM.js → doctor-live-MYXZCBSP.js} +11 -11
  55. package/dist/{expert-bridge-3WL6X37T.js → expert-bridge-CXHYMQRL.js} +4 -4
  56. package/dist/{factory-X7XECZ3D.js → factory-3Z46455N.js} +10 -10
  57. package/dist/{factory-IAH3XPHY.js → factory-KH2MJQ5U.js} +5 -5
  58. package/dist/{improvement-review-4VHBKOME.js → improvement-review-RAISKC3W.js} +6 -6
  59. package/dist/index.d.ts +29 -19
  60. package/dist/index.js +32 -32
  61. package/dist/index.js.map +1 -1
  62. package/dist/{init-opencode-YLKVZJJA.js → init-opencode-WXRTDPFP.js} +6 -6
  63. package/dist/{issue-triage-UUD53JH3.js → issue-triage-KF47ZHU7.js} +6 -6
  64. package/dist/{model-config-helpers-KRTQLJF4.js → model-config-helpers-ZH2QAFVR.js} +2 -2
  65. package/dist/{openai-compat-adapter-YTSKOE4F.js → openai-compat-adapter-PQ3JKWPZ.js} +6 -6
  66. package/dist/{outcome-store-adapter-PSVE6YAJ.js → outcome-store-adapter-NTYEZXLH.js} +2 -2
  67. package/dist/{pr-reviewer-helpers-VP4P23TI.js → pr-reviewer-helpers-AQNGDRQT.js} +4 -4
  68. package/dist/{registry-command-S4GXEMQR.js → registry-command-6EHIJ3PJ.js} +2 -2
  69. package/dist/{repo-security-plan-66VLAFUR.js → repo-security-plan-AP3QEWJ5.js} +3 -3
  70. package/dist/{research-helpers-synthesize-RFOFNS5W.js → research-helpers-synthesize-XE3RMFQT.js} +4 -4
  71. package/dist/{routing-memory-KKBKCISC.js → routing-memory-PBZIE5NX.js} +2 -2
  72. package/dist/{session-memory-6FGTXRCN.js → session-memory-6NUK6ZAG.js} +3 -3
  73. package/dist/{setup-config-4NLQBTZH.js → setup-config-KEPU4NTT.js} +3 -3
  74. package/dist/{setup-custom-api-FLGYMLGG.js → setup-custom-api-XY455LVS.js} +3 -3
  75. package/dist/setup-data-dir-5MRGQD2G.js +36 -0
  76. package/dist/{tool-memory-5DOAHII2.js → tool-memory-MO2KOJJ7.js} +5 -5
  77. package/dist/{unified-registry-I2BUGW6I.js → unified-registry-JE22THXP.js} +11 -11
  78. package/dist/{weather-report-CTT5O7MR.js → weather-report-TQ6KM2F2.js} +2 -2
  79. package/package.json +1 -1
  80. package/dist/chunk-4ROIBRK5.js.map +0 -1
  81. package/dist/chunk-KLDUWDNU.js.map +0 -1
  82. package/dist/chunk-MXYKMQ53.js.map +0 -1
  83. package/dist/chunk-SU47CN4Q.js.map +0 -1
  84. package/dist/chunk-VS3C3L63.js.map +0 -1
  85. package/dist/setup-data-dir-VBMDTRCF.js +0 -36
  86. /package/dist/{ast-rule-runner-DFEUIC2E.js.map → ast-rule-runner-5U6TE6YJ.js.map} +0 -0
  87. /package/dist/{child-mcp-config-ALJL5I7K.js.map → child-mcp-config-IR7LRMIK.js.map} +0 -0
  88. /package/dist/{chunk-M43A5MDJ.js.map → chunk-2AN5NGCQ.js.map} +0 -0
  89. /package/dist/{chunk-A5D7666X.js.map → chunk-2AW2VHMK.js.map} +0 -0
  90. /package/dist/{chunk-42TS2JOS.js.map → chunk-6H4NUU7G.js.map} +0 -0
  91. /package/dist/{chunk-JZSKEIQF.js.map → chunk-6WPXQTQY.js.map} +0 -0
  92. /package/dist/{chunk-625YPLMG.js.map → chunk-6Z3MAHAC.js.map} +0 -0
  93. /package/dist/{chunk-ZNXWR6V6.js.map → chunk-AFAM6GK3.js.map} +0 -0
  94. /package/dist/{chunk-WDSRUC3H.js.map → chunk-AI6LKFGU.js.map} +0 -0
  95. /package/dist/{chunk-DJ7QTY5J.js.map → chunk-C5WECFBR.js.map} +0 -0
  96. /package/dist/{chunk-KJ46Q24G.js.map → chunk-DEQRRCHK.js.map} +0 -0
  97. /package/dist/{chunk-XBWG4BJU.js.map → chunk-DG2UY5QU.js.map} +0 -0
  98. /package/dist/{chunk-DYVYV7NZ.js.map → chunk-DYTB2XW2.js.map} +0 -0
  99. /package/dist/{chunk-VOJCSOVL.js.map → chunk-EPCR2GOE.js.map} +0 -0
  100. /package/dist/{chunk-5IMXQQQX.js.map → chunk-ETGNAHY3.js.map} +0 -0
  101. /package/dist/{chunk-KWQ5IR2A.js.map → chunk-FKMBZ53Y.js.map} +0 -0
  102. /package/dist/{chunk-WDYK7OAI.js.map → chunk-FTUBCD52.js.map} +0 -0
  103. /package/dist/{chunk-ZC6QDPMA.js.map → chunk-FWSAYHGV.js.map} +0 -0
  104. /package/dist/{chunk-AWF35M67.js.map → chunk-H4ACPMJS.js.map} +0 -0
  105. /package/dist/{chunk-GNGKWFC3.js.map → chunk-HESQ746B.js.map} +0 -0
  106. /package/dist/{chunk-GAJRBRED.js.map → chunk-HK4LBUYY.js.map} +0 -0
  107. /package/dist/{chunk-GTWTVDLP.js.map → chunk-II4XITQ6.js.map} +0 -0
  108. /package/dist/{chunk-3JRQWWBD.js.map → chunk-JNRDNE26.js.map} +0 -0
  109. /package/dist/{chunk-GNGIZJAC.js.map → chunk-LWLFWWA7.js.map} +0 -0
  110. /package/dist/{chunk-TGOZLRO7.js.map → chunk-P7327767.js.map} +0 -0
  111. /package/dist/{chunk-ZVSJPKEZ.js.map → chunk-Q5F4OBOK.js.map} +0 -0
  112. /package/dist/{chunk-PSZQ657B.js.map → chunk-Q7RFJSR5.js.map} +0 -0
  113. /package/dist/{chunk-UNIRQWHT.js.map → chunk-RI4IXOZT.js.map} +0 -0
  114. /package/dist/{chunk-TJ4VWR32.js.map → chunk-TMHCN5EY.js.map} +0 -0
  115. /package/dist/{chunk-ETW6QNVI.js.map → chunk-VQGHQVD2.js.map} +0 -0
  116. /package/dist/{chunk-XPQ2RDMV.js.map → chunk-XJ65J3O5.js.map} +0 -0
  117. /package/dist/{cli-circuit-breaker-OTFWY5A5.js.map → cli-circuit-breaker-AZHN2TMH.js.map} +0 -0
  118. /package/dist/{cli-readiness-WFUMPJCU.js.map → cli-readiness-H4JTTKKU.js.map} +0 -0
  119. /package/dist/{composite-router-LE4SNM2X.js.map → composite-router-WCTNVMSX.js.map} +0 -0
  120. /package/dist/{consensus-vote-2BEOCYGU.js.map → consensus-vote-RD3SME3K.js.map} +0 -0
  121. /package/dist/{context-retriever-NKP73OSE.js.map → context-retriever-YM2PPNSY.js.map} +0 -0
  122. /package/dist/{doctor-deep-FQPLASUY.js.map → doctor-deep-6P23G7PN.js.map} +0 -0
  123. /package/dist/{doctor-gateway-report-3I7KQVU3.js.map → doctor-gateway-report-4TXHTWUM.js.map} +0 -0
  124. /package/dist/{doctor-live-ZAMCNQGM.js.map → doctor-live-MYXZCBSP.js.map} +0 -0
  125. /package/dist/{expert-bridge-3WL6X37T.js.map → expert-bridge-CXHYMQRL.js.map} +0 -0
  126. /package/dist/{factory-IAH3XPHY.js.map → factory-3Z46455N.js.map} +0 -0
  127. /package/dist/{factory-X7XECZ3D.js.map → factory-KH2MJQ5U.js.map} +0 -0
  128. /package/dist/{improvement-review-4VHBKOME.js.map → improvement-review-RAISKC3W.js.map} +0 -0
  129. /package/dist/{init-opencode-YLKVZJJA.js.map → init-opencode-WXRTDPFP.js.map} +0 -0
  130. /package/dist/{issue-triage-UUD53JH3.js.map → issue-triage-KF47ZHU7.js.map} +0 -0
  131. /package/dist/{model-config-helpers-KRTQLJF4.js.map → model-config-helpers-ZH2QAFVR.js.map} +0 -0
  132. /package/dist/{openai-compat-adapter-YTSKOE4F.js.map → openai-compat-adapter-PQ3JKWPZ.js.map} +0 -0
  133. /package/dist/{outcome-store-adapter-PSVE6YAJ.js.map → outcome-store-adapter-NTYEZXLH.js.map} +0 -0
  134. /package/dist/{pr-reviewer-helpers-VP4P23TI.js.map → pr-reviewer-helpers-AQNGDRQT.js.map} +0 -0
  135. /package/dist/{registry-command-S4GXEMQR.js.map → registry-command-6EHIJ3PJ.js.map} +0 -0
  136. /package/dist/{repo-security-plan-66VLAFUR.js.map → repo-security-plan-AP3QEWJ5.js.map} +0 -0
  137. /package/dist/{research-helpers-synthesize-RFOFNS5W.js.map → research-helpers-synthesize-XE3RMFQT.js.map} +0 -0
  138. /package/dist/{routing-memory-KKBKCISC.js.map → routing-memory-PBZIE5NX.js.map} +0 -0
  139. /package/dist/{session-memory-6FGTXRCN.js.map → session-memory-6NUK6ZAG.js.map} +0 -0
  140. /package/dist/{setup-config-4NLQBTZH.js.map → setup-config-KEPU4NTT.js.map} +0 -0
  141. /package/dist/{setup-custom-api-FLGYMLGG.js.map → setup-custom-api-XY455LVS.js.map} +0 -0
  142. /package/dist/{setup-data-dir-VBMDTRCF.js.map → setup-data-dir-5MRGQD2G.js.map} +0 -0
  143. /package/dist/{tool-memory-5DOAHII2.js.map → tool-memory-MO2KOJJ7.js.map} +0 -0
  144. /package/dist/{unified-registry-I2BUGW6I.js.map → unified-registry-JE22THXP.js.map} +0 -0
  145. /package/dist/{weather-report-CTT5O7MR.js.map → weather-report-TQ6KM2F2.js.map} +0 -0
@@ -21,24 +21,24 @@ import {
21
21
  toolSuccess,
22
22
  withProgressHeartbeat,
23
23
  wrapToolWithTimeout
24
- } from "./chunk-5IMXQQQX.js";
24
+ } from "./chunk-ETGNAHY3.js";
25
25
  import {
26
26
  getToolMemory
27
- } from "./chunk-M43A5MDJ.js";
27
+ } from "./chunk-2AN5NGCQ.js";
28
28
  import {
29
29
  allOf
30
30
  } from "./chunk-EZNIYU5T.js";
31
31
  import {
32
32
  VERSION
33
- } from "./chunk-GNGIZJAC.js";
33
+ } from "./chunk-LWLFWWA7.js";
34
34
  import {
35
35
  isGatewayModelAdapter
36
- } from "./chunk-DJ7QTY5J.js";
36
+ } from "./chunk-C5WECFBR.js";
37
37
  import {
38
38
  ModelBoundAdapter,
39
39
  createEvent,
40
40
  getGlobalRegistry
41
- } from "./chunk-PDT6QYKY.js";
41
+ } from "./chunk-TFQMVUWQ.js";
42
42
  import {
43
43
  UNVERIFIABLE_STDERR_RE,
44
44
  classifyUnverifiable,
@@ -46,29 +46,31 @@ import {
46
46
  getAvailableClis,
47
47
  isAbsentSeat,
48
48
  markUnverifiable
49
- } from "./chunk-KLDUWDNU.js";
49
+ } from "./chunk-ONYCBTOH.js";
50
50
  import {
51
51
  ensureGatewayDiscovered
52
- } from "./chunk-ETW6QNVI.js";
52
+ } from "./chunk-VQGHQVD2.js";
53
53
  import {
54
54
  CLI_TO_MODELSDEV_VENDOR,
55
55
  delay,
56
56
  getAbortObservation,
57
57
  sleep,
58
58
  withTimeout
59
- } from "./chunk-TJ4VWR32.js";
59
+ } from "./chunk-TMHCN5EY.js";
60
60
  import {
61
61
  getDefaultCliCircuitBreakerRegistry
62
- } from "./chunk-4ROIBRK5.js";
62
+ } from "./chunk-AYBOQE2Y.js";
63
63
  import {
64
64
  sanitizeErrorDetails,
65
65
  sanitizeOutput,
66
66
  sanitizeStringLeaves
67
- } from "./chunk-A5D7666X.js";
67
+ } from "./chunk-2AW2VHMK.js";
68
68
  import {
69
69
  AgentError,
70
70
  DecisionCostStore,
71
71
  DecisionCostSummarySchema,
72
+ MAX_VOTER_CONDITIONS,
73
+ MAX_VOTER_CONDITION_CHARS,
72
74
  OutcomeStore,
73
75
  TaskOutcomeSchema,
74
76
  UNDECLARED_OPTIONS_EXCERPT_CHARS,
@@ -121,7 +123,7 @@ import {
121
123
  servedCostDetail,
122
124
  stepBus,
123
125
  voteRecordWriteFailedMessage
124
- } from "./chunk-SU47CN4Q.js";
126
+ } from "./chunk-7XJZTSHW.js";
125
127
  import {
126
128
  ensureLearningDir,
127
129
  getOutcomesFile
@@ -815,6 +817,69 @@ var SIMULATED_VOTE_REASONING = {
815
817
  // src/cli/voter-response.ts
816
818
  import { z } from "zod";
817
819
 
820
+ // src/cli/voter-response-text.ts
821
+ function extractTextFromResponse(content) {
822
+ return sanitizeOutput(rawTextFromResponse(content));
823
+ }
824
+ function rawTextFromResponse(content) {
825
+ if (typeof content === "string") {
826
+ return content;
827
+ }
828
+ if (Array.isArray(content)) {
829
+ return content.map((block) => {
830
+ if (typeof block === "object" && block !== null && "type" in block) {
831
+ const typed = block;
832
+ if (typed.type === "text" && typeof typed.text === "string") {
833
+ return typed.text;
834
+ }
835
+ }
836
+ return "";
837
+ }).join("");
838
+ }
839
+ return String(content);
840
+ }
841
+ function isStructuredOutputUnsupported(errorMessage) {
842
+ return /support tool use/i.test(errorMessage);
843
+ }
844
+ var REASONING_MAX_CHARS = 4e3;
845
+ var CLAIM_MAX_CHARS = 2e3;
846
+ var TRUNCATION_MARKER = " \u2026[truncated]";
847
+ function clampWithMarker(s, max) {
848
+ if (s.length <= max) return s;
849
+ return s.slice(0, Math.max(0, max - TRUNCATION_MARKER.length)) + TRUNCATION_MARKER;
850
+ }
851
+ function clampOversizeVoteStrings(parsed) {
852
+ if (typeof parsed !== "object" || parsed === null) return parsed;
853
+ const obj = { ...parsed };
854
+ if (typeof obj["reasoning"] === "string") {
855
+ obj["reasoning"] = clampWithMarker(obj["reasoning"], REASONING_MAX_CHARS);
856
+ }
857
+ if (Array.isArray(obj["conditions"]) && obj["conditions"].every((c) => typeof c === "string")) {
858
+ const conditions = obj["conditions"].map(
859
+ (c) => clampWithMarker(c, MAX_VOTER_CONDITION_CHARS)
860
+ );
861
+ if (conditions.length > MAX_VOTER_CONDITIONS) {
862
+ const dropped = conditions.length - MAX_VOTER_CONDITIONS + 1;
863
+ conditions.splice(
864
+ MAX_VOTER_CONDITIONS - 1,
865
+ dropped,
866
+ `${TRUNCATION_MARKER} ${String(dropped)} conditions dropped`
867
+ );
868
+ }
869
+ obj["conditions"] = conditions;
870
+ }
871
+ if (Array.isArray(obj["findings"])) {
872
+ obj["findings"] = obj["findings"].map((finding) => {
873
+ if (typeof finding === "object" && finding !== null && typeof finding["claim"] === "string") {
874
+ const f = finding;
875
+ return { ...f, claim: clampWithMarker(f["claim"], CLAIM_MAX_CHARS) };
876
+ }
877
+ return finding;
878
+ });
879
+ }
880
+ return obj;
881
+ }
882
+
818
883
  // src/consensus/option-tally.ts
819
884
  var SUPERMAJORITY_SHARE = 2 / 3;
820
885
  var MAJORITY_SHARE = 0.5;
@@ -889,7 +954,7 @@ var VoteResponseSchema = z.object({
889
954
  decision: z.enum(["approve", "reject", "abstain"]).describe("Your vote decision"),
890
955
  reasoning: z.string().min(10).max(4e3).describe("Explanation for your vote (10-4000 chars)"),
891
956
  confidence: z.number().min(0).max(1).describe("Confidence level 0-1"),
892
- conditions: z.array(z.string()).optional().describe("Optional conditions for approval"),
957
+ conditions: z.array(z.string().max(MAX_VOTER_CONDITION_CHARS)).max(MAX_VOTER_CONDITIONS).optional().describe("Optional conditions for approval"),
893
958
  /** Structured rejection categories for reject→refine→re-vote loops (Issue #1213). */
894
959
  rejectionCategories: z.array(
895
960
  z.enum([
@@ -934,7 +999,8 @@ var VOTE_JSON_SCHEMA = {
934
999
  },
935
1000
  conditions: {
936
1001
  type: "array",
937
- items: { type: "string" },
1002
+ items: { type: "string", maxLength: MAX_VOTER_CONDITION_CHARS },
1003
+ maxItems: MAX_VOTER_CONDITIONS,
938
1004
  description: "Optional conditions for approval"
939
1005
  },
940
1006
  // #4472: without this, `additionalProperties: false` makes it impossible
@@ -1161,30 +1227,6 @@ function objectFromFenceBody(text, match, body) {
1161
1227
  const bodyStart = match.index + match[0].length - "```".length - body.length;
1162
1228
  return extractFirstJsonObject(text.slice(bodyStart));
1163
1229
  }
1164
- var REASONING_MAX_CHARS = 4e3;
1165
- var CLAIM_MAX_CHARS = 2e3;
1166
- var TRUNCATION_MARKER = " \u2026[truncated]";
1167
- function clampWithMarker(s, max) {
1168
- if (s.length <= max) return s;
1169
- return s.slice(0, Math.max(0, max - TRUNCATION_MARKER.length)) + TRUNCATION_MARKER;
1170
- }
1171
- function clampOversizeVoteStrings(parsed) {
1172
- if (typeof parsed !== "object" || parsed === null) return parsed;
1173
- const obj = { ...parsed };
1174
- if (typeof obj["reasoning"] === "string") {
1175
- obj["reasoning"] = clampWithMarker(obj["reasoning"], REASONING_MAX_CHARS);
1176
- }
1177
- if (Array.isArray(obj["findings"])) {
1178
- obj["findings"] = obj["findings"].map((finding) => {
1179
- if (typeof finding === "object" && finding !== null && typeof finding["claim"] === "string") {
1180
- const f = finding;
1181
- return { ...f, claim: clampWithMarker(f["claim"], CLAIM_MAX_CHARS) };
1182
- }
1183
- return finding;
1184
- });
1185
- }
1186
- return obj;
1187
- }
1188
1230
  function buildParsedVote(data, options) {
1189
1231
  const selectedOption = options === void 0 ? void 0 : matchDeclaredOption(data.selectedOption, options);
1190
1232
  return {
@@ -1216,31 +1258,6 @@ function parseVoteResponse(output, _role, options) {
1216
1258
  }
1217
1259
  }
1218
1260
 
1219
- // src/cli/voter-response-text.ts
1220
- function extractTextFromResponse(content) {
1221
- return sanitizeOutput(rawTextFromResponse(content));
1222
- }
1223
- function rawTextFromResponse(content) {
1224
- if (typeof content === "string") {
1225
- return content;
1226
- }
1227
- if (Array.isArray(content)) {
1228
- return content.map((block) => {
1229
- if (typeof block === "object" && block !== null && "type" in block) {
1230
- const typed = block;
1231
- if (typed.type === "text" && typeof typed.text === "string") {
1232
- return typed.text;
1233
- }
1234
- }
1235
- return "";
1236
- }).join("");
1237
- }
1238
- return String(content);
1239
- }
1240
- function isStructuredOutputUnsupported(errorMessage) {
1241
- return /support tool use/i.test(errorMessage);
1242
- }
1243
-
1244
1261
  // src/cli/voter-attempt-log.ts
1245
1262
  function isRateLimitError(message) {
1246
1263
  return isRateLimitLikeError(new Error(message));
@@ -6641,7 +6658,7 @@ function logPartialProposal(bounded, log) {
6641
6658
  }
6642
6659
  async function runContrarianCheck(proposal, options, log, opts) {
6643
6660
  try {
6644
- const { executeExpert } = await import("./expert-bridge-3WL6X37T.js");
6661
+ const { executeExpert } = await import("./expert-bridge-CXHYMQRL.js");
6645
6662
  const bounded = boundArtifactForReview(proposal, CONTRARIAN_PROPOSAL_BUDGET, "proposal");
6646
6663
  logPartialProposal(bounded, log);
6647
6664
  const result = await executeExpert(
@@ -9777,6 +9794,7 @@ export {
9777
9794
  createOWVoting,
9778
9795
  HigherOrderVotingStrategy,
9779
9796
  createHigherOrderVotingStrategy,
9797
+ evaluateThreshold,
9780
9798
  determineFinalStatus,
9781
9799
  mapOutcomeToDecision,
9782
9800
  SimpleMajorityStrategy,
@@ -9823,4 +9841,4 @@ export {
9823
9841
  CONSENSUS_VOTE_TOOL_SCHEMA,
9824
9842
  registerConsensusVoteTool
9825
9843
  };
9826
- //# sourceMappingURL=chunk-VS3C3L63.js.map
9844
+ //# sourceMappingURL=chunk-ONWH4UGD.js.map