nexus-agents 9.3.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.
- package/dist/{ast-rule-runner-YFDXXHJU.js → ast-rule-runner-5U6TE6YJ.js} +3 -3
- package/dist/{child-mcp-config-44M5EAYD.js → child-mcp-config-IR7LRMIK.js} +2 -2
- package/dist/{chunk-6JLDPMMU.js → chunk-2AN5NGCQ.js} +4 -4
- package/dist/{chunk-4HUCHMSX.js → chunk-2AW2VHMK.js} +2 -2
- package/dist/{chunk-AQ5KQTXW.js → chunk-6H4NUU7G.js} +5 -5
- package/dist/{chunk-BH6J6WCC.js → chunk-6WPXQTQY.js} +2 -2
- package/dist/{chunk-FDHT3TG7.js → chunk-6Z3MAHAC.js} +2 -2
- package/dist/{chunk-4IJII2WG.js → chunk-7XJZTSHW.js} +108 -61
- package/dist/chunk-7XJZTSHW.js.map +1 -0
- package/dist/{chunk-R67NA3Q5.js → chunk-AFAM6GK3.js} +7 -7
- package/dist/{chunk-WJDNQVQF.js → chunk-AI6LKFGU.js} +3 -3
- package/dist/{chunk-OQNKPJPJ.js → chunk-AYBOQE2Y.js} +2 -2
- package/dist/{chunk-B3LT4L5R.js → chunk-C5WECFBR.js} +5 -5
- package/dist/{chunk-ZGSQFG4D.js → chunk-DEQRRCHK.js} +2 -2
- package/dist/{chunk-CUWTKYFP.js → chunk-DG2UY5QU.js} +2 -2
- package/dist/{chunk-BO46P4XJ.js → chunk-DYTB2XW2.js} +5 -5
- package/dist/{chunk-FWZVZME3.js → chunk-EPCR2GOE.js} +2 -2
- package/dist/{chunk-P2LYE2KA.js → chunk-ETGNAHY3.js} +4 -4
- package/dist/{chunk-QCNZMRJ7.js → chunk-FKMBZ53Y.js} +2 -2
- package/dist/{chunk-EUKJXKXD.js → chunk-FTUBCD52.js} +3 -3
- package/dist/{chunk-5O4NXKPR.js → chunk-FWSAYHGV.js} +4 -4
- package/dist/{chunk-65XXRWUH.js → chunk-H4ACPMJS.js} +4 -4
- package/dist/{chunk-HM37AAFX.js → chunk-HESQ746B.js} +2 -2
- package/dist/{chunk-L54COYAN.js → chunk-HK4LBUYY.js} +2 -2
- package/dist/{chunk-QLUGDQUK.js → chunk-II4XITQ6.js} +13 -13
- package/dist/{chunk-KQJ2GAER.js → chunk-JNRDNE26.js} +2 -2
- package/dist/{chunk-Q4L5XROB.js → chunk-LWLFWWA7.js} +3 -3
- package/dist/{chunk-RKSJ26NV.js → chunk-ONWH4UGD.js} +81 -64
- package/dist/chunk-ONWH4UGD.js.map +1 -0
- package/dist/{chunk-Y3OBX752.js → chunk-ONYCBTOH.js} +10 -9
- package/dist/chunk-ONYCBTOH.js.map +1 -0
- package/dist/{chunk-RQ3C6QEH.js → chunk-P7327767.js} +2 -2
- package/dist/{chunk-GYMILOWC.js → chunk-Q5F4OBOK.js} +2 -2
- package/dist/{chunk-4CTDO2Z2.js → chunk-Q7RFJSR5.js} +3 -3
- package/dist/{chunk-IZS66Q5F.js → chunk-RI4IXOZT.js} +2 -2
- package/dist/{chunk-NM7YEKQM.js → chunk-TFQMVUWQ.js} +5 -5
- package/dist/{chunk-A34ANV7R.js → chunk-TMHCN5EY.js} +5 -5
- package/dist/{chunk-LHOB5YF3.js → chunk-TQEXRC5C.js} +41 -41
- package/dist/{chunk-5T33FILA.js → chunk-VQGHQVD2.js} +3 -3
- package/dist/{chunk-TCKP5S3P.js → chunk-XJ65J3O5.js} +5 -5
- package/dist/{cli-circuit-breaker-6V7RJMMF.js → cli-circuit-breaker-AZHN2TMH.js} +3 -3
- package/dist/{cli-readiness-XNJQCKIH.js → cli-readiness-H4JTTKKU.js} +7 -7
- package/dist/cli.d.ts +1 -1
- package/dist/cli.js +44 -44
- package/dist/{composite-router-43L52IUP.js → composite-router-WCTNVMSX.js} +2 -2
- package/dist/{consensus-vote-6HBLVWTW.js → consensus-vote-RD3SME3K.js} +17 -17
- package/dist/{consensus-vote-types-q8io4acj.d.ts → consensus-vote-types-G7Lnj3B3.d.ts} +26 -32
- package/dist/{context-retriever-WPSI4STY.js → context-retriever-YM2PPNSY.js} +8 -8
- package/dist/{doctor-deep-6D6FG3SZ.js → doctor-deep-6P23G7PN.js} +3 -3
- package/dist/{doctor-gateway-report-2JOSIARQ.js → doctor-gateway-report-4TXHTWUM.js} +7 -7
- package/dist/{doctor-live-BVXUT36N.js → doctor-live-MYXZCBSP.js} +11 -11
- package/dist/{expert-bridge-E6HHFKGF.js → expert-bridge-CXHYMQRL.js} +4 -4
- package/dist/{factory-ZPOHG4M7.js → factory-3Z46455N.js} +10 -10
- package/dist/{factory-WCUQHBSG.js → factory-KH2MJQ5U.js} +5 -5
- package/dist/{improvement-review-33VU5DAX.js → improvement-review-RAISKC3W.js} +6 -6
- package/dist/index.d.ts +2 -2
- package/dist/index.js +32 -32
- package/dist/{init-opencode-NQW7NG5Z.js → init-opencode-WXRTDPFP.js} +6 -6
- package/dist/{issue-triage-RFV3YR66.js → issue-triage-KF47ZHU7.js} +6 -6
- package/dist/{model-config-helpers-KTLFA734.js → model-config-helpers-ZH2QAFVR.js} +2 -2
- package/dist/{openai-compat-adapter-7CITWSBH.js → openai-compat-adapter-PQ3JKWPZ.js} +6 -6
- package/dist/{outcome-store-adapter-WCY3FBQM.js → outcome-store-adapter-NTYEZXLH.js} +2 -2
- package/dist/{pr-reviewer-helpers-KJFNRS6R.js → pr-reviewer-helpers-AQNGDRQT.js} +4 -4
- package/dist/{registry-command-OZLB3KYN.js → registry-command-6EHIJ3PJ.js} +2 -2
- package/dist/{repo-security-plan-MOHGBKLA.js → repo-security-plan-AP3QEWJ5.js} +3 -3
- package/dist/{research-helpers-synthesize-CKC67RSM.js → research-helpers-synthesize-XE3RMFQT.js} +4 -4
- package/dist/{routing-memory-FOMKUKKF.js → routing-memory-PBZIE5NX.js} +2 -2
- package/dist/{session-memory-KRK2HQUF.js → session-memory-6NUK6ZAG.js} +3 -3
- package/dist/{setup-config-A7MFKDN7.js → setup-config-KEPU4NTT.js} +3 -3
- package/dist/{setup-custom-api-YJ4DICAK.js → setup-custom-api-XY455LVS.js} +3 -3
- package/dist/setup-data-dir-5MRGQD2G.js +36 -0
- package/dist/{tool-memory-ZUQSBR3O.js → tool-memory-MO2KOJJ7.js} +5 -5
- package/dist/{unified-registry-JG3QCJ5O.js → unified-registry-JE22THXP.js} +11 -11
- package/dist/{weather-report-2MBDI7G2.js → weather-report-TQ6KM2F2.js} +2 -2
- package/package.json +1 -1
- package/dist/chunk-4IJII2WG.js.map +0 -1
- package/dist/chunk-RKSJ26NV.js.map +0 -1
- package/dist/chunk-Y3OBX752.js.map +0 -1
- package/dist/setup-data-dir-VNGT3GM4.js +0 -36
- /package/dist/{ast-rule-runner-YFDXXHJU.js.map → ast-rule-runner-5U6TE6YJ.js.map} +0 -0
- /package/dist/{child-mcp-config-44M5EAYD.js.map → child-mcp-config-IR7LRMIK.js.map} +0 -0
- /package/dist/{chunk-6JLDPMMU.js.map → chunk-2AN5NGCQ.js.map} +0 -0
- /package/dist/{chunk-4HUCHMSX.js.map → chunk-2AW2VHMK.js.map} +0 -0
- /package/dist/{chunk-AQ5KQTXW.js.map → chunk-6H4NUU7G.js.map} +0 -0
- /package/dist/{chunk-BH6J6WCC.js.map → chunk-6WPXQTQY.js.map} +0 -0
- /package/dist/{chunk-FDHT3TG7.js.map → chunk-6Z3MAHAC.js.map} +0 -0
- /package/dist/{chunk-R67NA3Q5.js.map → chunk-AFAM6GK3.js.map} +0 -0
- /package/dist/{chunk-WJDNQVQF.js.map → chunk-AI6LKFGU.js.map} +0 -0
- /package/dist/{chunk-OQNKPJPJ.js.map → chunk-AYBOQE2Y.js.map} +0 -0
- /package/dist/{chunk-B3LT4L5R.js.map → chunk-C5WECFBR.js.map} +0 -0
- /package/dist/{chunk-ZGSQFG4D.js.map → chunk-DEQRRCHK.js.map} +0 -0
- /package/dist/{chunk-CUWTKYFP.js.map → chunk-DG2UY5QU.js.map} +0 -0
- /package/dist/{chunk-BO46P4XJ.js.map → chunk-DYTB2XW2.js.map} +0 -0
- /package/dist/{chunk-FWZVZME3.js.map → chunk-EPCR2GOE.js.map} +0 -0
- /package/dist/{chunk-P2LYE2KA.js.map → chunk-ETGNAHY3.js.map} +0 -0
- /package/dist/{chunk-QCNZMRJ7.js.map → chunk-FKMBZ53Y.js.map} +0 -0
- /package/dist/{chunk-EUKJXKXD.js.map → chunk-FTUBCD52.js.map} +0 -0
- /package/dist/{chunk-5O4NXKPR.js.map → chunk-FWSAYHGV.js.map} +0 -0
- /package/dist/{chunk-65XXRWUH.js.map → chunk-H4ACPMJS.js.map} +0 -0
- /package/dist/{chunk-HM37AAFX.js.map → chunk-HESQ746B.js.map} +0 -0
- /package/dist/{chunk-L54COYAN.js.map → chunk-HK4LBUYY.js.map} +0 -0
- /package/dist/{chunk-QLUGDQUK.js.map → chunk-II4XITQ6.js.map} +0 -0
- /package/dist/{chunk-KQJ2GAER.js.map → chunk-JNRDNE26.js.map} +0 -0
- /package/dist/{chunk-Q4L5XROB.js.map → chunk-LWLFWWA7.js.map} +0 -0
- /package/dist/{chunk-RQ3C6QEH.js.map → chunk-P7327767.js.map} +0 -0
- /package/dist/{chunk-GYMILOWC.js.map → chunk-Q5F4OBOK.js.map} +0 -0
- /package/dist/{chunk-4CTDO2Z2.js.map → chunk-Q7RFJSR5.js.map} +0 -0
- /package/dist/{chunk-IZS66Q5F.js.map → chunk-RI4IXOZT.js.map} +0 -0
- /package/dist/{chunk-NM7YEKQM.js.map → chunk-TFQMVUWQ.js.map} +0 -0
- /package/dist/{chunk-A34ANV7R.js.map → chunk-TMHCN5EY.js.map} +0 -0
- /package/dist/{chunk-LHOB5YF3.js.map → chunk-TQEXRC5C.js.map} +0 -0
- /package/dist/{chunk-5T33FILA.js.map → chunk-VQGHQVD2.js.map} +0 -0
- /package/dist/{chunk-TCKP5S3P.js.map → chunk-XJ65J3O5.js.map} +0 -0
- /package/dist/{cli-circuit-breaker-6V7RJMMF.js.map → cli-circuit-breaker-AZHN2TMH.js.map} +0 -0
- /package/dist/{cli-readiness-XNJQCKIH.js.map → cli-readiness-H4JTTKKU.js.map} +0 -0
- /package/dist/{composite-router-43L52IUP.js.map → composite-router-WCTNVMSX.js.map} +0 -0
- /package/dist/{consensus-vote-6HBLVWTW.js.map → consensus-vote-RD3SME3K.js.map} +0 -0
- /package/dist/{context-retriever-WPSI4STY.js.map → context-retriever-YM2PPNSY.js.map} +0 -0
- /package/dist/{doctor-deep-6D6FG3SZ.js.map → doctor-deep-6P23G7PN.js.map} +0 -0
- /package/dist/{doctor-gateway-report-2JOSIARQ.js.map → doctor-gateway-report-4TXHTWUM.js.map} +0 -0
- /package/dist/{doctor-live-BVXUT36N.js.map → doctor-live-MYXZCBSP.js.map} +0 -0
- /package/dist/{expert-bridge-E6HHFKGF.js.map → expert-bridge-CXHYMQRL.js.map} +0 -0
- /package/dist/{factory-WCUQHBSG.js.map → factory-3Z46455N.js.map} +0 -0
- /package/dist/{factory-ZPOHG4M7.js.map → factory-KH2MJQ5U.js.map} +0 -0
- /package/dist/{improvement-review-33VU5DAX.js.map → improvement-review-RAISKC3W.js.map} +0 -0
- /package/dist/{init-opencode-NQW7NG5Z.js.map → init-opencode-WXRTDPFP.js.map} +0 -0
- /package/dist/{issue-triage-RFV3YR66.js.map → issue-triage-KF47ZHU7.js.map} +0 -0
- /package/dist/{model-config-helpers-KTLFA734.js.map → model-config-helpers-ZH2QAFVR.js.map} +0 -0
- /package/dist/{openai-compat-adapter-7CITWSBH.js.map → openai-compat-adapter-PQ3JKWPZ.js.map} +0 -0
- /package/dist/{outcome-store-adapter-WCY3FBQM.js.map → outcome-store-adapter-NTYEZXLH.js.map} +0 -0
- /package/dist/{pr-reviewer-helpers-KJFNRS6R.js.map → pr-reviewer-helpers-AQNGDRQT.js.map} +0 -0
- /package/dist/{registry-command-OZLB3KYN.js.map → registry-command-6EHIJ3PJ.js.map} +0 -0
- /package/dist/{repo-security-plan-MOHGBKLA.js.map → repo-security-plan-AP3QEWJ5.js.map} +0 -0
- /package/dist/{research-helpers-synthesize-CKC67RSM.js.map → research-helpers-synthesize-XE3RMFQT.js.map} +0 -0
- /package/dist/{routing-memory-FOMKUKKF.js.map → routing-memory-PBZIE5NX.js.map} +0 -0
- /package/dist/{session-memory-KRK2HQUF.js.map → session-memory-6NUK6ZAG.js.map} +0 -0
- /package/dist/{setup-config-A7MFKDN7.js.map → setup-config-KEPU4NTT.js.map} +0 -0
- /package/dist/{setup-custom-api-YJ4DICAK.js.map → setup-custom-api-XY455LVS.js.map} +0 -0
- /package/dist/{setup-data-dir-VNGT3GM4.js.map → setup-data-dir-5MRGQD2G.js.map} +0 -0
- /package/dist/{tool-memory-ZUQSBR3O.js.map → tool-memory-MO2KOJJ7.js.map} +0 -0
- /package/dist/{unified-registry-JG3QCJ5O.js.map → unified-registry-JE22THXP.js.map} +0 -0
- /package/dist/{weather-report-2MBDI7G2.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-
|
|
24
|
+
} from "./chunk-ETGNAHY3.js";
|
|
25
25
|
import {
|
|
26
26
|
getToolMemory
|
|
27
|
-
} from "./chunk-
|
|
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-
|
|
33
|
+
} from "./chunk-LWLFWWA7.js";
|
|
34
34
|
import {
|
|
35
35
|
isGatewayModelAdapter
|
|
36
|
-
} from "./chunk-
|
|
36
|
+
} from "./chunk-C5WECFBR.js";
|
|
37
37
|
import {
|
|
38
38
|
ModelBoundAdapter,
|
|
39
39
|
createEvent,
|
|
40
40
|
getGlobalRegistry
|
|
41
|
-
} from "./chunk-
|
|
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-
|
|
49
|
+
} from "./chunk-ONYCBTOH.js";
|
|
50
50
|
import {
|
|
51
51
|
ensureGatewayDiscovered
|
|
52
|
-
} from "./chunk-
|
|
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-
|
|
59
|
+
} from "./chunk-TMHCN5EY.js";
|
|
60
60
|
import {
|
|
61
61
|
getDefaultCliCircuitBreakerRegistry
|
|
62
|
-
} from "./chunk-
|
|
62
|
+
} from "./chunk-AYBOQE2Y.js";
|
|
63
63
|
import {
|
|
64
64
|
sanitizeErrorDetails,
|
|
65
65
|
sanitizeOutput,
|
|
66
66
|
sanitizeStringLeaves
|
|
67
|
-
} from "./chunk-
|
|
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-
|
|
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-
|
|
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(
|
|
@@ -9824,4 +9841,4 @@ export {
|
|
|
9824
9841
|
CONSENSUS_VOTE_TOOL_SCHEMA,
|
|
9825
9842
|
registerConsensusVoteTool
|
|
9826
9843
|
};
|
|
9827
|
-
//# sourceMappingURL=chunk-
|
|
9844
|
+
//# sourceMappingURL=chunk-ONWH4UGD.js.map
|