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.
- package/dist/{ast-rule-runner-DFEUIC2E.js → ast-rule-runner-5U6TE6YJ.js} +3 -3
- package/dist/{child-mcp-config-ALJL5I7K.js → child-mcp-config-IR7LRMIK.js} +2 -2
- package/dist/{chunk-M43A5MDJ.js → chunk-2AN5NGCQ.js} +4 -4
- package/dist/{chunk-A5D7666X.js → chunk-2AW2VHMK.js} +2 -2
- package/dist/{chunk-42TS2JOS.js → chunk-6H4NUU7G.js} +5 -5
- package/dist/{chunk-JZSKEIQF.js → chunk-6WPXQTQY.js} +2 -2
- package/dist/{chunk-625YPLMG.js → chunk-6Z3MAHAC.js} +2 -2
- package/dist/{chunk-SU47CN4Q.js → chunk-7XJZTSHW.js} +120 -64
- package/dist/chunk-7XJZTSHW.js.map +1 -0
- package/dist/{chunk-ZNXWR6V6.js → chunk-AFAM6GK3.js} +7 -7
- package/dist/{chunk-WDSRUC3H.js → chunk-AI6LKFGU.js} +3 -3
- package/dist/{chunk-4ROIBRK5.js → chunk-AYBOQE2Y.js} +3 -3
- package/dist/chunk-AYBOQE2Y.js.map +1 -0
- package/dist/{chunk-DJ7QTY5J.js → chunk-C5WECFBR.js} +5 -5
- package/dist/{chunk-KJ46Q24G.js → chunk-DEQRRCHK.js} +2 -2
- package/dist/{chunk-XBWG4BJU.js → chunk-DG2UY5QU.js} +2 -2
- package/dist/{chunk-DYVYV7NZ.js → chunk-DYTB2XW2.js} +5 -5
- package/dist/{chunk-VOJCSOVL.js → chunk-EPCR2GOE.js} +2 -2
- package/dist/{chunk-5IMXQQQX.js → chunk-ETGNAHY3.js} +4 -4
- package/dist/{chunk-KWQ5IR2A.js → chunk-FKMBZ53Y.js} +2 -2
- package/dist/{chunk-WDYK7OAI.js → chunk-FTUBCD52.js} +3 -3
- package/dist/{chunk-ZC6QDPMA.js → chunk-FWSAYHGV.js} +4 -4
- package/dist/{chunk-AWF35M67.js → chunk-H4ACPMJS.js} +4 -4
- package/dist/{chunk-GNGKWFC3.js → chunk-HESQ746B.js} +2 -2
- package/dist/{chunk-GAJRBRED.js → chunk-HK4LBUYY.js} +2 -2
- package/dist/{chunk-GTWTVDLP.js → chunk-II4XITQ6.js} +13 -13
- package/dist/{chunk-3JRQWWBD.js → chunk-JNRDNE26.js} +2 -2
- package/dist/{chunk-GNGIZJAC.js → chunk-LWLFWWA7.js} +3 -3
- package/dist/{chunk-VS3C3L63.js → chunk-ONWH4UGD.js} +82 -64
- package/dist/chunk-ONWH4UGD.js.map +1 -0
- package/dist/{chunk-KLDUWDNU.js → chunk-ONYCBTOH.js} +10 -9
- package/dist/chunk-ONYCBTOH.js.map +1 -0
- package/dist/{chunk-TGOZLRO7.js → chunk-P7327767.js} +2 -2
- package/dist/{chunk-ZVSJPKEZ.js → chunk-Q5F4OBOK.js} +2 -2
- package/dist/{chunk-PSZQ657B.js → chunk-Q7RFJSR5.js} +3 -3
- package/dist/{chunk-UNIRQWHT.js → chunk-RI4IXOZT.js} +2 -2
- package/dist/{chunk-PDT6QYKY.js → chunk-TFQMVUWQ.js} +6 -5
- package/dist/{chunk-PDT6QYKY.js.map → chunk-TFQMVUWQ.js.map} +1 -1
- package/dist/{chunk-TJ4VWR32.js → chunk-TMHCN5EY.js} +5 -5
- package/dist/{chunk-MXYKMQ53.js → chunk-TQEXRC5C.js} +250 -92
- package/dist/chunk-TQEXRC5C.js.map +1 -0
- package/dist/{chunk-ETW6QNVI.js → chunk-VQGHQVD2.js} +3 -3
- package/dist/{chunk-XPQ2RDMV.js → chunk-XJ65J3O5.js} +5 -5
- package/dist/{cli-circuit-breaker-OTFWY5A5.js → cli-circuit-breaker-AZHN2TMH.js} +3 -3
- package/dist/{cli-readiness-WFUMPJCU.js → cli-readiness-H4JTTKKU.js} +7 -7
- package/dist/cli.d.ts +1 -1
- package/dist/cli.js +44 -44
- package/dist/{composite-router-LE4SNM2X.js → composite-router-WCTNVMSX.js} +2 -2
- package/dist/{consensus-vote-2BEOCYGU.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-NKP73OSE.js → context-retriever-YM2PPNSY.js} +8 -8
- package/dist/{doctor-deep-FQPLASUY.js → doctor-deep-6P23G7PN.js} +3 -3
- package/dist/{doctor-gateway-report-3I7KQVU3.js → doctor-gateway-report-4TXHTWUM.js} +7 -7
- package/dist/{doctor-live-ZAMCNQGM.js → doctor-live-MYXZCBSP.js} +11 -11
- package/dist/{expert-bridge-3WL6X37T.js → expert-bridge-CXHYMQRL.js} +4 -4
- package/dist/{factory-X7XECZ3D.js → factory-3Z46455N.js} +10 -10
- package/dist/{factory-IAH3XPHY.js → factory-KH2MJQ5U.js} +5 -5
- package/dist/{improvement-review-4VHBKOME.js → improvement-review-RAISKC3W.js} +6 -6
- package/dist/index.d.ts +29 -19
- package/dist/index.js +32 -32
- package/dist/index.js.map +1 -1
- package/dist/{init-opencode-YLKVZJJA.js → init-opencode-WXRTDPFP.js} +6 -6
- package/dist/{issue-triage-UUD53JH3.js → issue-triage-KF47ZHU7.js} +6 -6
- package/dist/{model-config-helpers-KRTQLJF4.js → model-config-helpers-ZH2QAFVR.js} +2 -2
- package/dist/{openai-compat-adapter-YTSKOE4F.js → openai-compat-adapter-PQ3JKWPZ.js} +6 -6
- package/dist/{outcome-store-adapter-PSVE6YAJ.js → outcome-store-adapter-NTYEZXLH.js} +2 -2
- package/dist/{pr-reviewer-helpers-VP4P23TI.js → pr-reviewer-helpers-AQNGDRQT.js} +4 -4
- package/dist/{registry-command-S4GXEMQR.js → registry-command-6EHIJ3PJ.js} +2 -2
- package/dist/{repo-security-plan-66VLAFUR.js → repo-security-plan-AP3QEWJ5.js} +3 -3
- package/dist/{research-helpers-synthesize-RFOFNS5W.js → research-helpers-synthesize-XE3RMFQT.js} +4 -4
- package/dist/{routing-memory-KKBKCISC.js → routing-memory-PBZIE5NX.js} +2 -2
- package/dist/{session-memory-6FGTXRCN.js → session-memory-6NUK6ZAG.js} +3 -3
- package/dist/{setup-config-4NLQBTZH.js → setup-config-KEPU4NTT.js} +3 -3
- package/dist/{setup-custom-api-FLGYMLGG.js → setup-custom-api-XY455LVS.js} +3 -3
- package/dist/setup-data-dir-5MRGQD2G.js +36 -0
- package/dist/{tool-memory-5DOAHII2.js → tool-memory-MO2KOJJ7.js} +5 -5
- package/dist/{unified-registry-I2BUGW6I.js → unified-registry-JE22THXP.js} +11 -11
- package/dist/{weather-report-CTT5O7MR.js → weather-report-TQ6KM2F2.js} +2 -2
- package/package.json +1 -1
- package/dist/chunk-4ROIBRK5.js.map +0 -1
- package/dist/chunk-KLDUWDNU.js.map +0 -1
- package/dist/chunk-MXYKMQ53.js.map +0 -1
- package/dist/chunk-SU47CN4Q.js.map +0 -1
- package/dist/chunk-VS3C3L63.js.map +0 -1
- package/dist/setup-data-dir-VBMDTRCF.js +0 -36
- /package/dist/{ast-rule-runner-DFEUIC2E.js.map → ast-rule-runner-5U6TE6YJ.js.map} +0 -0
- /package/dist/{child-mcp-config-ALJL5I7K.js.map → child-mcp-config-IR7LRMIK.js.map} +0 -0
- /package/dist/{chunk-M43A5MDJ.js.map → chunk-2AN5NGCQ.js.map} +0 -0
- /package/dist/{chunk-A5D7666X.js.map → chunk-2AW2VHMK.js.map} +0 -0
- /package/dist/{chunk-42TS2JOS.js.map → chunk-6H4NUU7G.js.map} +0 -0
- /package/dist/{chunk-JZSKEIQF.js.map → chunk-6WPXQTQY.js.map} +0 -0
- /package/dist/{chunk-625YPLMG.js.map → chunk-6Z3MAHAC.js.map} +0 -0
- /package/dist/{chunk-ZNXWR6V6.js.map → chunk-AFAM6GK3.js.map} +0 -0
- /package/dist/{chunk-WDSRUC3H.js.map → chunk-AI6LKFGU.js.map} +0 -0
- /package/dist/{chunk-DJ7QTY5J.js.map → chunk-C5WECFBR.js.map} +0 -0
- /package/dist/{chunk-KJ46Q24G.js.map → chunk-DEQRRCHK.js.map} +0 -0
- /package/dist/{chunk-XBWG4BJU.js.map → chunk-DG2UY5QU.js.map} +0 -0
- /package/dist/{chunk-DYVYV7NZ.js.map → chunk-DYTB2XW2.js.map} +0 -0
- /package/dist/{chunk-VOJCSOVL.js.map → chunk-EPCR2GOE.js.map} +0 -0
- /package/dist/{chunk-5IMXQQQX.js.map → chunk-ETGNAHY3.js.map} +0 -0
- /package/dist/{chunk-KWQ5IR2A.js.map → chunk-FKMBZ53Y.js.map} +0 -0
- /package/dist/{chunk-WDYK7OAI.js.map → chunk-FTUBCD52.js.map} +0 -0
- /package/dist/{chunk-ZC6QDPMA.js.map → chunk-FWSAYHGV.js.map} +0 -0
- /package/dist/{chunk-AWF35M67.js.map → chunk-H4ACPMJS.js.map} +0 -0
- /package/dist/{chunk-GNGKWFC3.js.map → chunk-HESQ746B.js.map} +0 -0
- /package/dist/{chunk-GAJRBRED.js.map → chunk-HK4LBUYY.js.map} +0 -0
- /package/dist/{chunk-GTWTVDLP.js.map → chunk-II4XITQ6.js.map} +0 -0
- /package/dist/{chunk-3JRQWWBD.js.map → chunk-JNRDNE26.js.map} +0 -0
- /package/dist/{chunk-GNGIZJAC.js.map → chunk-LWLFWWA7.js.map} +0 -0
- /package/dist/{chunk-TGOZLRO7.js.map → chunk-P7327767.js.map} +0 -0
- /package/dist/{chunk-ZVSJPKEZ.js.map → chunk-Q5F4OBOK.js.map} +0 -0
- /package/dist/{chunk-PSZQ657B.js.map → chunk-Q7RFJSR5.js.map} +0 -0
- /package/dist/{chunk-UNIRQWHT.js.map → chunk-RI4IXOZT.js.map} +0 -0
- /package/dist/{chunk-TJ4VWR32.js.map → chunk-TMHCN5EY.js.map} +0 -0
- /package/dist/{chunk-ETW6QNVI.js.map → chunk-VQGHQVD2.js.map} +0 -0
- /package/dist/{chunk-XPQ2RDMV.js.map → chunk-XJ65J3O5.js.map} +0 -0
- /package/dist/{cli-circuit-breaker-OTFWY5A5.js.map → cli-circuit-breaker-AZHN2TMH.js.map} +0 -0
- /package/dist/{cli-readiness-WFUMPJCU.js.map → cli-readiness-H4JTTKKU.js.map} +0 -0
- /package/dist/{composite-router-LE4SNM2X.js.map → composite-router-WCTNVMSX.js.map} +0 -0
- /package/dist/{consensus-vote-2BEOCYGU.js.map → consensus-vote-RD3SME3K.js.map} +0 -0
- /package/dist/{context-retriever-NKP73OSE.js.map → context-retriever-YM2PPNSY.js.map} +0 -0
- /package/dist/{doctor-deep-FQPLASUY.js.map → doctor-deep-6P23G7PN.js.map} +0 -0
- /package/dist/{doctor-gateway-report-3I7KQVU3.js.map → doctor-gateway-report-4TXHTWUM.js.map} +0 -0
- /package/dist/{doctor-live-ZAMCNQGM.js.map → doctor-live-MYXZCBSP.js.map} +0 -0
- /package/dist/{expert-bridge-3WL6X37T.js.map → expert-bridge-CXHYMQRL.js.map} +0 -0
- /package/dist/{factory-IAH3XPHY.js.map → factory-3Z46455N.js.map} +0 -0
- /package/dist/{factory-X7XECZ3D.js.map → factory-KH2MJQ5U.js.map} +0 -0
- /package/dist/{improvement-review-4VHBKOME.js.map → improvement-review-RAISKC3W.js.map} +0 -0
- /package/dist/{init-opencode-YLKVZJJA.js.map → init-opencode-WXRTDPFP.js.map} +0 -0
- /package/dist/{issue-triage-UUD53JH3.js.map → issue-triage-KF47ZHU7.js.map} +0 -0
- /package/dist/{model-config-helpers-KRTQLJF4.js.map → model-config-helpers-ZH2QAFVR.js.map} +0 -0
- /package/dist/{openai-compat-adapter-YTSKOE4F.js.map → openai-compat-adapter-PQ3JKWPZ.js.map} +0 -0
- /package/dist/{outcome-store-adapter-PSVE6YAJ.js.map → outcome-store-adapter-NTYEZXLH.js.map} +0 -0
- /package/dist/{pr-reviewer-helpers-VP4P23TI.js.map → pr-reviewer-helpers-AQNGDRQT.js.map} +0 -0
- /package/dist/{registry-command-S4GXEMQR.js.map → registry-command-6EHIJ3PJ.js.map} +0 -0
- /package/dist/{repo-security-plan-66VLAFUR.js.map → repo-security-plan-AP3QEWJ5.js.map} +0 -0
- /package/dist/{research-helpers-synthesize-RFOFNS5W.js.map → research-helpers-synthesize-XE3RMFQT.js.map} +0 -0
- /package/dist/{routing-memory-KKBKCISC.js.map → routing-memory-PBZIE5NX.js.map} +0 -0
- /package/dist/{session-memory-6FGTXRCN.js.map → session-memory-6NUK6ZAG.js.map} +0 -0
- /package/dist/{setup-config-4NLQBTZH.js.map → setup-config-KEPU4NTT.js.map} +0 -0
- /package/dist/{setup-custom-api-FLGYMLGG.js.map → setup-custom-api-XY455LVS.js.map} +0 -0
- /package/dist/{setup-data-dir-VBMDTRCF.js.map → setup-data-dir-5MRGQD2G.js.map} +0 -0
- /package/dist/{tool-memory-5DOAHII2.js.map → tool-memory-MO2KOJJ7.js.map} +0 -0
- /package/dist/{unified-registry-I2BUGW6I.js.map → unified-registry-JE22THXP.js.map} +0 -0
- /package/dist/{weather-report-CTT5O7MR.js.map → weather-report-TQ6KM2F2.js.map} +0 -0
|
@@ -5,7 +5,7 @@ import {
|
|
|
5
5
|
} from "./chunk-WDAND5YU.js";
|
|
6
6
|
import {
|
|
7
7
|
executeExpert
|
|
8
|
-
} from "./chunk-
|
|
8
|
+
} from "./chunk-AFAM6GK3.js";
|
|
9
9
|
import {
|
|
10
10
|
JobStatusSchema,
|
|
11
11
|
RawFindingSchema,
|
|
@@ -27,6 +27,7 @@ import {
|
|
|
27
27
|
defaultPendingEnvelope,
|
|
28
28
|
defaultReplayEnvelope,
|
|
29
29
|
dispatchFieldDefaultSync,
|
|
30
|
+
evaluateThreshold,
|
|
30
31
|
heartbeatJob,
|
|
31
32
|
initTaskState,
|
|
32
33
|
isAbandonedJob,
|
|
@@ -40,6 +41,7 @@ import {
|
|
|
40
41
|
readTaskState,
|
|
41
42
|
recordCompletedVote,
|
|
42
43
|
recordDecisionCost,
|
|
44
|
+
recordVoteDecisionCost,
|
|
43
45
|
registerIdempotentJob,
|
|
44
46
|
release,
|
|
45
47
|
resolveAdapter,
|
|
@@ -56,11 +58,11 @@ import {
|
|
|
56
58
|
updateStage,
|
|
57
59
|
withFileLock,
|
|
58
60
|
writeJobCancelled
|
|
59
|
-
} from "./chunk-
|
|
61
|
+
} from "./chunk-ONWH4UGD.js";
|
|
60
62
|
import {
|
|
61
63
|
normalizeTopicToCanonical,
|
|
62
64
|
synthesizeResearch
|
|
63
|
-
} from "./chunk-
|
|
65
|
+
} from "./chunk-Q7RFJSR5.js";
|
|
64
66
|
import {
|
|
65
67
|
IssueTriage,
|
|
66
68
|
createAuditTrail,
|
|
@@ -69,16 +71,17 @@ import {
|
|
|
69
71
|
createGraphAuditBridge,
|
|
70
72
|
emitPipelinePolicyEvent,
|
|
71
73
|
readActionRefusal
|
|
72
|
-
} from "./chunk-
|
|
74
|
+
} from "./chunk-DYTB2XW2.js";
|
|
73
75
|
import {
|
|
74
76
|
sanitizeInput
|
|
75
|
-
} from "./chunk-
|
|
77
|
+
} from "./chunk-JNRDNE26.js";
|
|
76
78
|
import {
|
|
77
79
|
withPrerequisite
|
|
78
|
-
} from "./chunk-
|
|
80
|
+
} from "./chunk-AI6LKFGU.js";
|
|
79
81
|
import {
|
|
80
82
|
NOOP_NOTIFIER,
|
|
81
83
|
RateLimiter,
|
|
84
|
+
VOTING_THRESHOLDS,
|
|
82
85
|
abortSignalStorage,
|
|
83
86
|
checkPolicyForDispatchedTool,
|
|
84
87
|
coarsenFailureCategory,
|
|
@@ -102,10 +105,10 @@ import {
|
|
|
102
105
|
toolSuccess,
|
|
103
106
|
withProgressHeartbeat,
|
|
104
107
|
wrapToolWithTimeout
|
|
105
|
-
} from "./chunk-
|
|
108
|
+
} from "./chunk-ETGNAHY3.js";
|
|
106
109
|
import {
|
|
107
110
|
generateSecurityPlan
|
|
108
|
-
} from "./chunk-
|
|
111
|
+
} from "./chunk-6WPXQTQY.js";
|
|
109
112
|
import {
|
|
110
113
|
analyzeGitHubRepo
|
|
111
114
|
} from "./chunk-4GDMHCKX.js";
|
|
@@ -149,18 +152,18 @@ import {
|
|
|
149
152
|
parseRegistry,
|
|
150
153
|
sourceExistsInRegistry,
|
|
151
154
|
summarizeContextForPrompt
|
|
152
|
-
} from "./chunk-
|
|
155
|
+
} from "./chunk-XJ65J3O5.js";
|
|
153
156
|
import {
|
|
154
157
|
REGISTRY_PATH,
|
|
155
158
|
getProjectRoot,
|
|
156
159
|
loadPapersRegistry,
|
|
157
160
|
loadTechniquesRegistry,
|
|
158
161
|
resolveRegistryRoot
|
|
159
|
-
} from "./chunk-
|
|
162
|
+
} from "./chunk-HESQ746B.js";
|
|
160
163
|
import {
|
|
161
164
|
getTokenEnvVars,
|
|
162
165
|
resolveToken
|
|
163
|
-
} from "./chunk-
|
|
166
|
+
} from "./chunk-RI4IXOZT.js";
|
|
164
167
|
import {
|
|
165
168
|
DEFAULT_RELEVANCE_CONFIG,
|
|
166
169
|
MemoryImportance,
|
|
@@ -168,7 +171,7 @@ import {
|
|
|
168
171
|
calculateTextJaccardSimilarity,
|
|
169
172
|
getToolMemory,
|
|
170
173
|
memoryTrustTierTag
|
|
171
|
-
} from "./chunk-
|
|
174
|
+
} from "./chunk-2AN5NGCQ.js";
|
|
172
175
|
import {
|
|
173
176
|
EXTERNAL_CONTENT_TRUST_TIER,
|
|
174
177
|
resolveContentTrustProvenance,
|
|
@@ -184,7 +187,7 @@ import {
|
|
|
184
187
|
import {
|
|
185
188
|
DEFAULT_TASK_TTL_MS,
|
|
186
189
|
clampTaskTtl
|
|
187
|
-
} from "./chunk-
|
|
190
|
+
} from "./chunk-II4XITQ6.js";
|
|
188
191
|
import {
|
|
189
192
|
allOf,
|
|
190
193
|
anyOf
|
|
@@ -193,16 +196,16 @@ import {
|
|
|
193
196
|
VERSION,
|
|
194
197
|
createRequestContext,
|
|
195
198
|
measuredTrustTier
|
|
196
|
-
} from "./chunk-
|
|
199
|
+
} from "./chunk-LWLFWWA7.js";
|
|
197
200
|
import {
|
|
198
201
|
isGatewayModelAdapter
|
|
199
|
-
} from "./chunk-
|
|
202
|
+
} from "./chunk-C5WECFBR.js";
|
|
200
203
|
import {
|
|
201
204
|
EventTopics,
|
|
202
205
|
createEvent,
|
|
203
206
|
getGlobalEventBus,
|
|
204
207
|
getGlobalRegistry
|
|
205
|
-
} from "./chunk-
|
|
208
|
+
} from "./chunk-TFQMVUWQ.js";
|
|
206
209
|
import {
|
|
207
210
|
BWRAP_READ_ONLY_ARGS,
|
|
208
211
|
CliDetectionCache,
|
|
@@ -210,13 +213,13 @@ import {
|
|
|
210
213
|
extractRequestSystemPrompt,
|
|
211
214
|
getAvailableClis,
|
|
212
215
|
isAbsentSeat
|
|
213
|
-
} from "./chunk-
|
|
216
|
+
} from "./chunk-ONYCBTOH.js";
|
|
214
217
|
import {
|
|
215
218
|
ensureGatewayDiscovered,
|
|
216
219
|
getAvailabilityCache,
|
|
217
220
|
getCliForModelId,
|
|
218
221
|
resolveFallback
|
|
219
|
-
} from "./chunk-
|
|
222
|
+
} from "./chunk-VQGHQVD2.js";
|
|
220
223
|
import {
|
|
221
224
|
DEFAULTS
|
|
222
225
|
} from "./chunk-PRX4ERTK.js";
|
|
@@ -234,13 +237,13 @@ import {
|
|
|
234
237
|
parseGatewayExtraHeaders,
|
|
235
238
|
requireApiKey,
|
|
236
239
|
validateApiKeyPresence
|
|
237
|
-
} from "./chunk-
|
|
240
|
+
} from "./chunk-HK4LBUYY.js";
|
|
238
241
|
import {
|
|
239
242
|
resolveGatewayEnv
|
|
240
|
-
} from "./chunk-
|
|
243
|
+
} from "./chunk-Q5F4OBOK.js";
|
|
241
244
|
import {
|
|
242
245
|
createSessionMemory
|
|
243
|
-
} from "./chunk-
|
|
246
|
+
} from "./chunk-FKMBZ53Y.js";
|
|
244
247
|
import {
|
|
245
248
|
TrustTierSchema
|
|
246
249
|
} from "./chunk-CJKHQ6MV.js";
|
|
@@ -254,17 +257,17 @@ import {
|
|
|
254
257
|
terminateProcessTree,
|
|
255
258
|
trackProcessTree,
|
|
256
259
|
withTimeout
|
|
257
|
-
} from "./chunk-
|
|
260
|
+
} from "./chunk-TMHCN5EY.js";
|
|
258
261
|
import {
|
|
259
262
|
generateHyphenId,
|
|
260
263
|
generateUUID
|
|
261
|
-
} from "./chunk-
|
|
264
|
+
} from "./chunk-DEQRRCHK.js";
|
|
262
265
|
import {
|
|
263
266
|
getDefaultCliCircuitBreakerRegistry
|
|
264
|
-
} from "./chunk-
|
|
267
|
+
} from "./chunk-AYBOQE2Y.js";
|
|
265
268
|
import {
|
|
266
269
|
sanitizeErrorDetails
|
|
267
|
-
} from "./chunk-
|
|
270
|
+
} from "./chunk-2AW2VHMK.js";
|
|
268
271
|
import {
|
|
269
272
|
ARCHITECTURE_KEYWORDS,
|
|
270
273
|
AUTHORITY_TIERS,
|
|
@@ -384,7 +387,7 @@ import {
|
|
|
384
387
|
toExpertTaskAnalysisResult,
|
|
385
388
|
truncateWithInfo,
|
|
386
389
|
withStep
|
|
387
|
-
} from "./chunk-
|
|
390
|
+
} from "./chunk-7XJZTSHW.js";
|
|
388
391
|
import {
|
|
389
392
|
SUPPORTED_EXTENSIONS
|
|
390
393
|
} from "./chunk-XBEKMUTO.js";
|
|
@@ -1020,13 +1023,6 @@ var NexusEnvSchema = z10.object({
|
|
|
1020
1023
|
// Scratch root for short-lived working files (#4412, getNexusTmpDir). Unset
|
|
1021
1024
|
// resolves to `<dataDir>/tmp`; set it to relocate scratch off the repo.
|
|
1022
1025
|
NEXUS_TMPDIR: z10.string().optional(),
|
|
1023
|
-
// ClawGuard access-policy mode. NO READER since #5108 deleted the
|
|
1024
|
-
// access-constraint deriver; the secret-path denylist it carried is now the
|
|
1025
|
-
// PolicyFirewall `secret-paths` rule (enforce behind #4988). Still registered
|
|
1026
|
-
// so a value an operator set from the AGENTS.md table is not reported as a
|
|
1027
|
-
// typo (#4722 class); the row and this entry are retired together under
|
|
1028
|
-
// #6303 / #6319, since that table is governor-owned.
|
|
1029
|
-
NEXUS_ACCESS_POLICY_MODE: z10.enum(["off", "audit", "confirm_risky", "enforce"]).optional(),
|
|
1030
1026
|
// Sandbox FLAVOR string (`docker-opencode`, `codex`, …), set by the host
|
|
1031
1027
|
// image so sandbox-detection knows it is inside one (epic #2500, #5026). It
|
|
1032
1028
|
// was registered as a boolean while every producer and reader used a flavor
|
|
@@ -1043,6 +1039,8 @@ var NexusEnvSchema = z10.object({
|
|
|
1043
1039
|
// Drives the auto-remediation cycle (resolveAutoRemediateMode); default audit
|
|
1044
1040
|
// (zero-write soak, #3769) when unset, explicit `off` disables.
|
|
1045
1041
|
NEXUS_AUTO_REMEDIATE: z10.enum(["off", "audit", "enforce"]).optional(),
|
|
1042
|
+
// Run-layer consensus verdict enforcement (#4464); default audit.
|
|
1043
|
+
NEXUS_CONSENSUS_ENFORCE: z10.enum(["off", "audit", "enforce"]).optional(),
|
|
1046
1044
|
// Stage-boundary policy gate enforcement mode (getGateEnforcementMode); warn by
|
|
1047
1045
|
// default. Read by dev-pipeline's consensus→execute gate, and by any compiled
|
|
1048
1046
|
// gate node whose caller supplies a `policyEnforcement` bundle without a mode
|
|
@@ -1097,6 +1095,10 @@ var NexusEnvSchema = z10.object({
|
|
|
1097
1095
|
// a typo; their use is reported in `deprecatedVars` instead.
|
|
1098
1096
|
NEXUS_CUSTOM_API_BASE_URL: z10.string().optional(),
|
|
1099
1097
|
NEXUS_CUSTOM_API_KEY: z10.string().optional(),
|
|
1098
|
+
// Deprecated no-op since #6321 removed the ClawGuard deriver. Keep the
|
|
1099
|
+
// accept-set and registration for compatibility with the AGENTS.md table
|
|
1100
|
+
// (#4722); report its use in deprecatedVars until removal in 10.0 (#6319).
|
|
1101
|
+
NEXUS_ACCESS_POLICY_MODE: z10.enum(["off", "audit", "confirm_risky", "enforce"]).optional(),
|
|
1100
1102
|
NEXUS_CUSTOM_MODEL: z10.string().optional(),
|
|
1101
1103
|
// #6645: the OpenAI API surface the single-model custom-openai adapter calls.
|
|
1102
1104
|
// Default `chat` (/chat/completions); `responses` opts into /responses. The
|
|
@@ -1290,7 +1292,7 @@ function classifyEnvKeys(nexusKeys, env) {
|
|
|
1290
1292
|
}
|
|
1291
1293
|
return { knownRecord, unknownVars };
|
|
1292
1294
|
}
|
|
1293
|
-
function logValidationWarnings(logger58, unknownVars, invalidVars, ineffectiveVars) {
|
|
1295
|
+
function logValidationWarnings(logger58, unknownVars, invalidVars, ineffectiveVars, deprecatedVars) {
|
|
1294
1296
|
for (const u of unknownVars) {
|
|
1295
1297
|
const hint = u.suggestion !== null ? ` (did you mean ${u.suggestion}?)` : "";
|
|
1296
1298
|
logger58.warn(`Unknown environment variable: ${u.name}${hint}`);
|
|
@@ -1304,6 +1306,21 @@ function logValidationWarnings(logger58, unknownVars, invalidVars, ineffectiveVa
|
|
|
1304
1306
|
`Environment variable ${ineff.name} had no effect: requested ${String(ineff.requestedMs)}ms, using ${String(ineff.effectiveMs)}ms. ${ineff.reason}`
|
|
1305
1307
|
);
|
|
1306
1308
|
}
|
|
1309
|
+
for (const deprecated of deprecatedVars) {
|
|
1310
|
+
if (deprecated.notice !== void 0) logger58.warn(deprecated.notice);
|
|
1311
|
+
}
|
|
1312
|
+
}
|
|
1313
|
+
function findDeprecatedVars() {
|
|
1314
|
+
const deprecatedVars = [...resolveGatewayEnv(process.env).deprecated];
|
|
1315
|
+
if (process.env["NEXUS_ACCESS_POLICY_MODE"] !== void 0) {
|
|
1316
|
+
deprecatedVars.push({
|
|
1317
|
+
name: "NEXUS_ACCESS_POLICY_MODE",
|
|
1318
|
+
replacement: "",
|
|
1319
|
+
shadowed: false,
|
|
1320
|
+
notice: "NEXUS_ACCESS_POLICY_MODE is deprecated, has no effect, and will be removed in 10.0. Remove it from your environment."
|
|
1321
|
+
});
|
|
1322
|
+
}
|
|
1323
|
+
return deprecatedVars;
|
|
1307
1324
|
}
|
|
1308
1325
|
function findIneffectiveVars() {
|
|
1309
1326
|
const classNames = Object.keys(OPERATION_CLASSES);
|
|
@@ -1345,9 +1362,9 @@ function validateNexusEnv(logger58) {
|
|
|
1345
1362
|
}
|
|
1346
1363
|
}
|
|
1347
1364
|
const ineffectiveVars = findIneffectiveVars();
|
|
1348
|
-
const deprecatedVars =
|
|
1365
|
+
const deprecatedVars = findDeprecatedVars();
|
|
1349
1366
|
if (logger58 !== void 0) {
|
|
1350
|
-
logValidationWarnings(logger58, unknownVars, invalidVars, ineffectiveVars);
|
|
1367
|
+
logValidationWarnings(logger58, unknownVars, invalidVars, ineffectiveVars, deprecatedVars);
|
|
1351
1368
|
}
|
|
1352
1369
|
return { unknownVars, invalidVars, ineffectiveVars, deprecatedVars };
|
|
1353
1370
|
}
|
|
@@ -30430,7 +30447,7 @@ function execIdFields(executionId) {
|
|
|
30430
30447
|
async function populateUnifiedContextOnState(state, options) {
|
|
30431
30448
|
const taskCandidate = state["task"];
|
|
30432
30449
|
if (typeof taskCandidate !== "string" || taskCandidate === "") return;
|
|
30433
|
-
const { getContextForTask: getContextForTask2, inferTaskCategory: inferTaskCategory2 } = await import("./context-retriever-
|
|
30450
|
+
const { getContextForTask: getContextForTask2, inferTaskCategory: inferTaskCategory2 } = await import("./context-retriever-YM2PPNSY.js");
|
|
30434
30451
|
const category = inferTaskCategory2(taskCandidate);
|
|
30435
30452
|
const executionId = options?.executionId;
|
|
30436
30453
|
const execFields = execIdFields(executionId);
|
|
@@ -46901,7 +46918,7 @@ async function tryIssueTriage(task) {
|
|
|
46901
46918
|
try {
|
|
46902
46919
|
const issueMatch = task.match(/github\.com\/([^/]+\/[^/]+)\/issues\/(\d+)/);
|
|
46903
46920
|
if (issueMatch === null) return null;
|
|
46904
|
-
const { createIssueTriage } = await import("./issue-triage-
|
|
46921
|
+
const { createIssueTriage } = await import("./issue-triage-KF47ZHU7.js");
|
|
46905
46922
|
const triage = createIssueTriage();
|
|
46906
46923
|
const owner = issueMatch[1] ?? "";
|
|
46907
46924
|
const num2 = issueMatch[2] ?? "";
|
|
@@ -46929,7 +46946,7 @@ var VALID_TEMPLATES = /* @__PURE__ */ new Set([
|
|
|
46929
46946
|
]);
|
|
46930
46947
|
async function classifyWithLLM(task) {
|
|
46931
46948
|
try {
|
|
46932
|
-
const { executeExpert: executeExpert2 } = await import("./expert-bridge-
|
|
46949
|
+
const { executeExpert: executeExpert2 } = await import("./expert-bridge-CXHYMQRL.js");
|
|
46933
46950
|
const prompt = [
|
|
46934
46951
|
"Classify this task into exactly one pipeline template.",
|
|
46935
46952
|
"Templates: dev (implementation/bug fix/refactor), research (investigate/evaluate/compare),",
|
|
@@ -47303,7 +47320,7 @@ function buildVotingInput(plan, config) {
|
|
|
47303
47320
|
}
|
|
47304
47321
|
async function executeSingleVote(plan, config, log) {
|
|
47305
47322
|
try {
|
|
47306
|
-
const { executeVoting } = await import("./consensus-vote-
|
|
47323
|
+
const { executeVoting } = await import("./consensus-vote-RD3SME3K.js");
|
|
47307
47324
|
const input = buildVotingInput(plan, config);
|
|
47308
47325
|
const result = await executeVoting(input, log);
|
|
47309
47326
|
return parseVotingResult(result);
|
|
@@ -48851,7 +48868,7 @@ var memoryInitPromise = null;
|
|
|
48851
48868
|
async function initPipelineMemory() {
|
|
48852
48869
|
if (cachedMemory !== null) return cachedMemory;
|
|
48853
48870
|
try {
|
|
48854
|
-
const { createSessionMemory: createSessionMemory2 } = await import("./session-memory-
|
|
48871
|
+
const { createSessionMemory: createSessionMemory2 } = await import("./session-memory-6NUK6ZAG.js");
|
|
48855
48872
|
const { getLearningDir } = await import("./learning-persistence-FB4U5AX2.js");
|
|
48856
48873
|
const mem = createSessionMemory2(getLearningDir());
|
|
48857
48874
|
mem.startSession(`pipeline-${String(getTimeProvider().now())}`);
|
|
@@ -48913,7 +48930,7 @@ function recordRoutingExperience(category, success, durationMs, tokensUsed = 0,
|
|
|
48913
48930
|
callRecord(routingMemoryCache);
|
|
48914
48931
|
return;
|
|
48915
48932
|
}
|
|
48916
|
-
routingMemoryInitPromise ??= import("./routing-memory-
|
|
48933
|
+
routingMemoryInitPromise ??= import("./routing-memory-PBZIE5NX.js").then(({ createRoutingMemory }) => {
|
|
48917
48934
|
routingMemoryCache ??= createRoutingMemory();
|
|
48918
48935
|
return routingMemoryCache;
|
|
48919
48936
|
}).catch((error) => {
|
|
@@ -49132,7 +49149,7 @@ function createVoteStage({ config, startStage }) {
|
|
|
49132
49149
|
const strategy = config.votingStrategy ?? "higher_order";
|
|
49133
49150
|
await postProgress(config, "Vote", `Running consensus with ${strategy} strategy...`);
|
|
49134
49151
|
try {
|
|
49135
|
-
const { executeVoting } = await import("./consensus-vote-
|
|
49152
|
+
const { executeVoting } = await import("./consensus-vote-RD3SME3K.js");
|
|
49136
49153
|
const proposal = buildVoteProposal(plan, research);
|
|
49137
49154
|
const votingResult = await executeVoting(
|
|
49138
49155
|
{
|
|
@@ -49939,7 +49956,7 @@ ${text}` : "";
|
|
|
49939
49956
|
}
|
|
49940
49957
|
async function getWeatherContext() {
|
|
49941
49958
|
try {
|
|
49942
|
-
const { generateWeatherReport: generateWeatherReport2 } = await import("./weather-report-
|
|
49959
|
+
const { generateWeatherReport: generateWeatherReport2 } = await import("./weather-report-TQ6KM2F2.js");
|
|
49943
49960
|
const report = generateWeatherReport2({ includeAdaptive: true });
|
|
49944
49961
|
const mappings = "recommendedMappings" in report ? report.recommendedMappings : [];
|
|
49945
49962
|
if (!Array.isArray(mappings) || mappings.length === 0) return "";
|
|
@@ -49957,7 +49974,7 @@ ${lines}
|
|
|
49957
49974
|
}
|
|
49958
49975
|
async function getMemoryContext(task) {
|
|
49959
49976
|
try {
|
|
49960
|
-
const { createSessionMemory: createSessionMemory2 } = await import("./session-memory-
|
|
49977
|
+
const { createSessionMemory: createSessionMemory2 } = await import("./session-memory-6NUK6ZAG.js");
|
|
49961
49978
|
const { getLearningDir } = await import("./learning-persistence-FB4U5AX2.js");
|
|
49962
49979
|
const memory = createSessionMemory2(getLearningDir(), { maxLearningsInContext: 10 });
|
|
49963
49980
|
const learnings = memory.searchLearnings(task.slice(0, 200));
|
|
@@ -50674,7 +50691,7 @@ async function searchCodebaseForTask(task) {
|
|
|
50674
50691
|
}
|
|
50675
50692
|
async function queryResearchRegistry(task) {
|
|
50676
50693
|
try {
|
|
50677
|
-
const { synthesizeResearch: synthesizeResearch2 } = await import("./research-helpers-synthesize-
|
|
50694
|
+
const { synthesizeResearch: synthesizeResearch2 } = await import("./research-helpers-synthesize-XE3RMFQT.js");
|
|
50678
50695
|
const topic = task.split(/[.!?\n]/).filter((s) => s.trim().length > 10)[0]?.trim();
|
|
50679
50696
|
if (topic === void 0) return null;
|
|
50680
50697
|
const result = await synthesizeResearch2(topic.slice(0, 50));
|
|
@@ -50745,7 +50762,7 @@ function createScanStageWrapper() {
|
|
|
50745
50762
|
try {
|
|
50746
50763
|
const slug = ctx.task.match(/([a-zA-Z0-9._-]+\/[a-zA-Z0-9._-]+)/)?.[1];
|
|
50747
50764
|
if (slug !== void 0) {
|
|
50748
|
-
const { generateSecurityPlan: generateSecurityPlan2 } = await import("./repo-security-plan-
|
|
50765
|
+
const { generateSecurityPlan: generateSecurityPlan2 } = await import("./repo-security-plan-AP3QEWJ5.js");
|
|
50749
50766
|
const plan = await generateSecurityPlan2({ repo: slug, maxScanners: 10 });
|
|
50750
50767
|
const recs = plan.recommendations.slice(0, 5).map((r) => `${r.priority}: ${r.displayName} (${r.category})`).join("; ");
|
|
50751
50768
|
return output(PIPELINE_STATE_KEYS.FINDINGS, recs, getTimeProvider().now() - start, true);
|
|
@@ -53461,7 +53478,104 @@ function registerSuggestResearchTasksTool(server, deps) {
|
|
|
53461
53478
|
|
|
53462
53479
|
// src/mcp/tools/run-tool.ts
|
|
53463
53480
|
import { z as z117 } from "zod";
|
|
53464
|
-
import { randomUUID as
|
|
53481
|
+
import { randomUUID as randomUUID19 } from "node:crypto";
|
|
53482
|
+
|
|
53483
|
+
// src/orchestration/consensus-enforcement-mode.ts
|
|
53484
|
+
function resolveConsensusEnforcementMode(raw) {
|
|
53485
|
+
if (raw === "off") return "off";
|
|
53486
|
+
if (raw === "enforce") return "enforce";
|
|
53487
|
+
return "audit";
|
|
53488
|
+
}
|
|
53489
|
+
|
|
53490
|
+
// src/mcp/tools/run-tool-consensus.ts
|
|
53491
|
+
import { randomUUID as randomUUID15 } from "node:crypto";
|
|
53492
|
+
function getConsensusEnforcement(result) {
|
|
53493
|
+
if (typeof result !== "object" || result === null) return void 0;
|
|
53494
|
+
return result.enforcement;
|
|
53495
|
+
}
|
|
53496
|
+
function assessPanel(result, mode, attempts) {
|
|
53497
|
+
if (mode === "off") {
|
|
53498
|
+
return { ...result, enforcement: { mode, attempts, reason: "unmeasured" } };
|
|
53499
|
+
}
|
|
53500
|
+
const decision = result.decision ?? "no_quorum";
|
|
53501
|
+
const denominator = result.votes.filter(
|
|
53502
|
+
(seat) => seat.source === "error" || seat.source === "unverifiable" || seat.vote.decision !== "abstain"
|
|
53503
|
+
).length;
|
|
53504
|
+
const outageInvariant = denominator > 0 && evaluateThreshold(
|
|
53505
|
+
result.result.voteCounts.approve,
|
|
53506
|
+
denominator,
|
|
53507
|
+
VOTING_THRESHOLDS.simple_majority,
|
|
53508
|
+
false
|
|
53509
|
+
).approved;
|
|
53510
|
+
const reason = decision === "approved" && !outageInvariant ? "not_outage_invariant" : decision;
|
|
53511
|
+
return {
|
|
53512
|
+
...result,
|
|
53513
|
+
enforcement: { mode, attempts, wouldBlock: reason !== "approved", reason }
|
|
53514
|
+
};
|
|
53515
|
+
}
|
|
53516
|
+
async function recordFinalPanel(goal, result, logger58, signal) {
|
|
53517
|
+
let voteRecord;
|
|
53518
|
+
let reason;
|
|
53519
|
+
try {
|
|
53520
|
+
({ voteRecord } = await recordCompletedVote(goal, result, logger58, {
|
|
53521
|
+
options: void 0,
|
|
53522
|
+
signal
|
|
53523
|
+
}));
|
|
53524
|
+
if (!voteRecord.persisted) reason = `Vote ledger ${voteRecord.reason}`;
|
|
53525
|
+
} catch (error) {
|
|
53526
|
+
if (signal?.aborted === true) throw error;
|
|
53527
|
+
reason = getErrorMessage(error);
|
|
53528
|
+
}
|
|
53529
|
+
const recorded = { ...result, voteRecord };
|
|
53530
|
+
if (reason === void 0) return recorded;
|
|
53531
|
+
logger58.warn("run: consensus vote recording failed", {
|
|
53532
|
+
error: reason,
|
|
53533
|
+
mode: result.enforcement.mode
|
|
53534
|
+
});
|
|
53535
|
+
if (result.enforcement.mode === "off") return recorded;
|
|
53536
|
+
const enforcement = {
|
|
53537
|
+
...result.enforcement,
|
|
53538
|
+
wouldBlock: true,
|
|
53539
|
+
recordingError: reason
|
|
53540
|
+
};
|
|
53541
|
+
if (result.enforcement.mode === "audit") return { ...recorded, enforcement };
|
|
53542
|
+
return {
|
|
53543
|
+
...recorded,
|
|
53544
|
+
success: false,
|
|
53545
|
+
error: `Consensus recording failed: ${reason}`,
|
|
53546
|
+
enforcement
|
|
53547
|
+
};
|
|
53548
|
+
}
|
|
53549
|
+
async function runConsensusWithEnforcement(goal, options) {
|
|
53550
|
+
const logger58 = options.logger ?? createLogger({ tool: "run", strategy: "consensus" });
|
|
53551
|
+
const runPanel = async (attempts) => {
|
|
53552
|
+
options.signal?.throwIfAborted();
|
|
53553
|
+
const result2 = await runConsensusForGoal(
|
|
53554
|
+
goal,
|
|
53555
|
+
void 0,
|
|
53556
|
+
options.gatewayAdapters,
|
|
53557
|
+
options.onProgress,
|
|
53558
|
+
options.signal
|
|
53559
|
+
);
|
|
53560
|
+
options.signal?.throwIfAborted();
|
|
53561
|
+
return assessPanel(result2, options.mode, attempts);
|
|
53562
|
+
};
|
|
53563
|
+
let result = await runPanel(1);
|
|
53564
|
+
const retryable = /* @__PURE__ */ new Set(["no_quorum", "not_outage_invariant"]);
|
|
53565
|
+
if (options.mode === "enforce" && retryable.has(result.enforcement.reason)) {
|
|
53566
|
+
recordVoteDecisionCost({
|
|
53567
|
+
decisionId: `consensus-${randomUUID15()}`,
|
|
53568
|
+
gate: "consensus_vote",
|
|
53569
|
+
votes: result.votes,
|
|
53570
|
+
proposal: goal,
|
|
53571
|
+
declaredOptions: void 0,
|
|
53572
|
+
logger: logger58
|
|
53573
|
+
});
|
|
53574
|
+
logger58.info("run: retrying consensus panel once", { reason: result.enforcement.reason });
|
|
53575
|
+
result = await runPanel(2);
|
|
53576
|
+
}
|
|
53577
|
+
return recordFinalPanel(goal, result, logger58, options.signal);
|
|
53578
|
+
}
|
|
53465
53579
|
|
|
53466
53580
|
// src/orchestration/meta-dispatcher.ts
|
|
53467
53581
|
var MetaDispatchError = class extends Error {
|
|
@@ -53486,23 +53600,45 @@ function createAuditLogOutcomeSink(logger58) {
|
|
|
53486
53600
|
function errorMessage(err2) {
|
|
53487
53601
|
return err2 instanceof Error ? err2.message : String(err2);
|
|
53488
53602
|
}
|
|
53489
|
-
function
|
|
53603
|
+
function resultError(record, fallback) {
|
|
53604
|
+
return typeof record["error"] === "string" ? record["error"] : fallback;
|
|
53605
|
+
}
|
|
53606
|
+
function consensusReason(record) {
|
|
53607
|
+
const enforcement = record["enforcement"];
|
|
53608
|
+
if (typeof enforcement === "object" && enforcement !== null) {
|
|
53609
|
+
const reason = enforcement["reason"];
|
|
53610
|
+
if (typeof reason === "string") return reason;
|
|
53611
|
+
}
|
|
53612
|
+
return String(record["decision"]);
|
|
53613
|
+
}
|
|
53614
|
+
var BLOCKING_CONSENSUS_DECISIONS = /* @__PURE__ */ new Set(["rejected", "no_quorum"]);
|
|
53615
|
+
function classifyConsensusResult(record, mode) {
|
|
53616
|
+
const enforcement = record["enforcement"];
|
|
53617
|
+
const wouldBlock = typeof enforcement === "object" && enforcement !== null && enforcement["wouldBlock"] === true;
|
|
53618
|
+
if (mode === "enforce" && (BLOCKING_CONSENSUS_DECISIONS.has(record["decision"]) || wouldBlock)) {
|
|
53619
|
+
const reason = consensusReason(record);
|
|
53620
|
+
return {
|
|
53621
|
+
success: false,
|
|
53622
|
+
failureReason: reason === record["decision"] ? `Consensus ${reason}` : `Consensus ${String(record["decision"])}: ${reason}`
|
|
53623
|
+
};
|
|
53624
|
+
}
|
|
53625
|
+
return { success: true };
|
|
53626
|
+
}
|
|
53627
|
+
function classifyEngineResult(result, mode = "audit") {
|
|
53490
53628
|
if (typeof result !== "object" || result === null) {
|
|
53491
53629
|
return { success: true };
|
|
53492
53630
|
}
|
|
53493
53631
|
const record = result;
|
|
53494
53632
|
if (record["success"] === false) {
|
|
53495
|
-
|
|
53496
|
-
return { success: false, failureReason: reason };
|
|
53633
|
+
return { success: false, failureReason: resultError(record, "no error message") };
|
|
53497
53634
|
}
|
|
53498
53635
|
if (record["completed"] === false) {
|
|
53499
53636
|
if (record["dryRun"] === true && record["planStatus"] === void 0) {
|
|
53500
53637
|
return { success: true };
|
|
53501
53638
|
}
|
|
53502
|
-
|
|
53503
|
-
return { success: false, failureReason: reason };
|
|
53639
|
+
return { success: false, failureReason: resultError(record, "pipeline did not complete") };
|
|
53504
53640
|
}
|
|
53505
|
-
return
|
|
53641
|
+
return classifyConsensusResult(record, mode);
|
|
53506
53642
|
}
|
|
53507
53643
|
function recordOutcome2(deps, decision, start, success, failureReason) {
|
|
53508
53644
|
const record = {
|
|
@@ -53740,6 +53876,26 @@ function describeIncompletePipeline(record) {
|
|
|
53740
53876
|
}
|
|
53741
53877
|
return `${FAILURE_PREFIX} the dev pipeline did not complete`;
|
|
53742
53878
|
}
|
|
53879
|
+
function detectEngineFailure(result, mode) {
|
|
53880
|
+
const classification = classifyEngineResult(result, mode);
|
|
53881
|
+
if (classification.success) return null;
|
|
53882
|
+
const record = typeof result === "object" && result !== null ? result : void 0;
|
|
53883
|
+
if (record?.["completed"] === false) {
|
|
53884
|
+
return { message: describeIncompletePipeline(record), detail: record };
|
|
53885
|
+
}
|
|
53886
|
+
if (record?.["enforcement"] !== void 0) {
|
|
53887
|
+
return {
|
|
53888
|
+
message: `Engine reported failure: ${classification.failureReason ?? "no error message"}`,
|
|
53889
|
+
detail: {
|
|
53890
|
+
decision: record["decision"],
|
|
53891
|
+
enforcement: record["enforcement"],
|
|
53892
|
+
voteRecord: record["voteRecord"]
|
|
53893
|
+
}
|
|
53894
|
+
};
|
|
53895
|
+
}
|
|
53896
|
+
const detail = classification.failureReason ?? "no error message";
|
|
53897
|
+
return { message: `Engine reported failure: ${detail}` };
|
|
53898
|
+
}
|
|
53743
53899
|
|
|
53744
53900
|
// src/mcp/tools/run-tool-policy.ts
|
|
53745
53901
|
var RunPolicyDeniedError = class extends Error {
|
|
@@ -53764,7 +53920,7 @@ function assertExecutePolicy(strategy, input, logger58, requestContext) {
|
|
|
53764
53920
|
}
|
|
53765
53921
|
|
|
53766
53922
|
// src/orchestration/meta-orchestrator.ts
|
|
53767
|
-
import { randomUUID as
|
|
53923
|
+
import { randomUUID as randomUUID16 } from "node:crypto";
|
|
53768
53924
|
|
|
53769
53925
|
// src/orchestration/meta-orchestrator-routing.ts
|
|
53770
53926
|
function reasoningFor(selection, routing) {
|
|
@@ -53916,7 +54072,7 @@ function createMetaOrchestrator(options) {
|
|
|
53916
54072
|
const classification = classifyTask(input.goal);
|
|
53917
54073
|
const forced = input.forceStrategy !== void 0;
|
|
53918
54074
|
const base = input.forceStrategy !== void 0 ? buildForcedDecision(input.forceStrategy, routing, classification) : buildSelectedDecision(routing, classification);
|
|
53919
|
-
const decision = { ...base, decisionId:
|
|
54075
|
+
const decision = { ...base, decisionId: randomUUID16() };
|
|
53920
54076
|
if (input.requiredAuthority !== void 0) {
|
|
53921
54077
|
guardAuthority(decision.strategy, input.requiredAuthority);
|
|
53922
54078
|
}
|
|
@@ -54436,7 +54592,7 @@ function evaluateMetaStrategyReadiness(result, config = DEFAULT_META_STRATEGY_RE
|
|
|
54436
54592
|
// src/mcp/tools/dev-pipeline-tool.ts
|
|
54437
54593
|
import { z as z115 } from "zod";
|
|
54438
54594
|
import * as fs10 from "node:fs";
|
|
54439
|
-
import { randomUUID as
|
|
54595
|
+
import { randomUUID as randomUUID17 } from "node:crypto";
|
|
54440
54596
|
|
|
54441
54597
|
// src/mcp/tools/dev-pipeline-output.ts
|
|
54442
54598
|
function buildStructuredOutput(result, simulated) {
|
|
@@ -54532,7 +54688,7 @@ var GitHubTaskTracker = class {
|
|
|
54532
54688
|
cachedProvider = null;
|
|
54533
54689
|
async getProvider() {
|
|
54534
54690
|
if (this.cachedProvider !== null) return this.cachedProvider;
|
|
54535
|
-
const { createScmProvider } = await import("./factory-
|
|
54691
|
+
const { createScmProvider } = await import("./factory-KH2MJQ5U.js");
|
|
54536
54692
|
const result = await createScmProvider({ repo: this.config.repo ?? "" });
|
|
54537
54693
|
if (!result.ok) throw new Error(`SCM provider error: ${result.error.message}`);
|
|
54538
54694
|
this.cachedProvider = result.value;
|
|
@@ -54910,7 +55066,7 @@ function dispatchAsyncDevPipeline(input, run, logger58) {
|
|
|
54910
55066
|
return runAsJob({
|
|
54911
55067
|
toolName: "run_dev_pipeline",
|
|
54912
55068
|
input,
|
|
54913
|
-
freshJobId: () => `dp-${
|
|
55069
|
+
freshJobId: () => `dp-${randomUUID17()}`,
|
|
54914
55070
|
// #5393 / #6305: arity 3 — `runDevPipeline` checks the signal before every stage.
|
|
54915
55071
|
run: (_jobId, _input, signal) => run(signal),
|
|
54916
55072
|
logger: logger58
|
|
@@ -54968,7 +55124,7 @@ function registerDevPipelineTool(server, deps) {
|
|
|
54968
55124
|
// src/mcp/tools/pipeline-tool.ts
|
|
54969
55125
|
import { z as z116 } from "zod";
|
|
54970
55126
|
import * as fs11 from "node:fs";
|
|
54971
|
-
import { randomUUID as
|
|
55127
|
+
import { randomUUID as randomUUID18 } from "node:crypto";
|
|
54972
55128
|
var PIPELINE_ASYNC_HINT = "A full run_pipeline run can exceed the synchronous MCP request timeout. Retry with `dispatch: 'async'` to get a jobId immediately, then poll get_job_result({ jobId }) for the result.";
|
|
54973
55129
|
var PipelineInputSchema = z116.object({
|
|
54974
55130
|
/** The task to execute. */
|
|
@@ -55145,7 +55301,7 @@ async function runPipelineHandler(args, logger58, callerTrustTier, sanitization)
|
|
|
55145
55301
|
return runAsJob({
|
|
55146
55302
|
toolName: "run_pipeline",
|
|
55147
55303
|
input,
|
|
55148
|
-
freshJobId: () => `rp-${
|
|
55304
|
+
freshJobId: () => `rp-${randomUUID18()}`,
|
|
55149
55305
|
// #5393 / #6305: arity 3 — the graph executor checks the signal before every
|
|
55150
55306
|
// super-step, so a cancel stops the run at the next stage boundary.
|
|
55151
55307
|
run: (_jobId, _input, signal) => executePipelineBody(task, stages, { ...body, signal }),
|
|
@@ -55189,7 +55345,7 @@ function registerPipelineTool(server, deps) {
|
|
|
55189
55345
|
}
|
|
55190
55346
|
|
|
55191
55347
|
// src/mcp/tools/run-tool-executors.ts
|
|
55192
|
-
function buildDefaultExecutors(trustTier, gatewayAdapters,
|
|
55348
|
+
function buildDefaultExecutors(trustTier, gatewayAdapters, options, onProgress, signal) {
|
|
55193
55349
|
const gated = (strategy, executor) => cancellableExecutor(strategy, executor, signal);
|
|
55194
55350
|
return {
|
|
55195
55351
|
"dev-pipeline": gated(
|
|
@@ -55197,9 +55353,9 @@ function buildDefaultExecutors(trustTier, gatewayAdapters, devPipeline, onProgre
|
|
|
55197
55353
|
(_decision, metaInput) => runDevPipelineForGoal(
|
|
55198
55354
|
metaInput.goal,
|
|
55199
55355
|
trustTier,
|
|
55200
|
-
|
|
55356
|
+
options?.dryRun,
|
|
55201
55357
|
signal,
|
|
55202
|
-
|
|
55358
|
+
options?.sourceTrustTier
|
|
55203
55359
|
)
|
|
55204
55360
|
),
|
|
55205
55361
|
pipeline: gated(
|
|
@@ -55219,7 +55375,13 @@ function buildDefaultExecutors(trustTier, gatewayAdapters, devPipeline, onProgre
|
|
|
55219
55375
|
),
|
|
55220
55376
|
consensus: gated(
|
|
55221
55377
|
"consensus",
|
|
55222
|
-
(_decision, metaInput) =>
|
|
55378
|
+
(_decision, metaInput) => runConsensusWithEnforcement(metaInput.goal, {
|
|
55379
|
+
mode: options?.consensusEnforcementMode ?? "audit",
|
|
55380
|
+
logger: options?.logger,
|
|
55381
|
+
gatewayAdapters,
|
|
55382
|
+
onProgress,
|
|
55383
|
+
signal
|
|
55384
|
+
})
|
|
55223
55385
|
)
|
|
55224
55386
|
};
|
|
55225
55387
|
}
|
|
@@ -55238,9 +55400,14 @@ function assertDispatchNotCancelled(signal, strategy) {
|
|
|
55238
55400
|
function cancellableExecutor(strategy, executor, signal) {
|
|
55239
55401
|
if (signal === void 0) return executor;
|
|
55240
55402
|
return async (decision, metaInput) => {
|
|
55241
|
-
|
|
55242
|
-
|
|
55243
|
-
|
|
55403
|
+
try {
|
|
55404
|
+
const result = await executor(decision, metaInput);
|
|
55405
|
+
throwIfRunCancelled(signal, `run cancelled during the ${strategy} strategy`);
|
|
55406
|
+
return result;
|
|
55407
|
+
} catch (error) {
|
|
55408
|
+
throwIfRunCancelled(signal, `run cancelled during the ${strategy} strategy`);
|
|
55409
|
+
throw error;
|
|
55410
|
+
}
|
|
55244
55411
|
};
|
|
55245
55412
|
}
|
|
55246
55413
|
|
|
@@ -55375,6 +55542,8 @@ function buildShadowTrainObserver(logger58) {
|
|
|
55375
55542
|
};
|
|
55376
55543
|
}
|
|
55377
55544
|
async function executeGoal(input, opts = {}) {
|
|
55545
|
+
const mode = opts.consensusEnforcementMode ?? resolveConsensusEnforcementMode(process.env["NEXUS_CONSENSUS_ENFORCE"]);
|
|
55546
|
+
const { dryRun, sourceTrustTier } = input;
|
|
55378
55547
|
const decision = selectDecision(input, "execute", opts.logger);
|
|
55379
55548
|
assertDryRunSupported(input.dryRun, decision.strategy);
|
|
55380
55549
|
assertExecutePolicy(decision.strategy, input, opts.logger, opts.requestContext);
|
|
@@ -55383,45 +55552,34 @@ async function executeGoal(input, opts = {}) {
|
|
|
55383
55552
|
executors: opts.executors ?? buildDefaultExecutors(
|
|
55384
55553
|
opts.trustTier,
|
|
55385
55554
|
opts.gatewayAdapters,
|
|
55386
|
-
{
|
|
55555
|
+
{ consensusEnforcementMode: mode, logger: opts.logger, dryRun, sourceTrustTier },
|
|
55387
55556
|
opts.onProgress,
|
|
55388
55557
|
opts.signal
|
|
55389
55558
|
),
|
|
55390
55559
|
...opts.logger !== void 0 ? { logger: opts.logger } : {},
|
|
55391
55560
|
...opts.outcomeSink !== void 0 ? { outcomeSink: opts.outcomeSink } : {},
|
|
55392
55561
|
...onOutcome !== void 0 ? { onOutcome } : {},
|
|
55393
|
-
|
|
55562
|
+
classifyResult: opts.classifyResult ?? ((result) => classifyEngineResult(result, mode))
|
|
55394
55563
|
});
|
|
55395
55564
|
assertDispatchNotCancelled(opts.signal, decision.strategy);
|
|
55396
55565
|
const dispatch = await dispatcher.dispatch(decision, toMetaInput(input, "execute"));
|
|
55397
55566
|
return {
|
|
55398
|
-
|
|
55399
|
-
decisionId: dispatch.decisionId,
|
|
55567
|
+
...dispatch,
|
|
55400
55568
|
reasoning: decision.reasoning,
|
|
55401
55569
|
executed: true,
|
|
55402
|
-
|
|
55403
|
-
result: dispatch.result
|
|
55570
|
+
...dispatch.strategy === "consensus" ? { enforcement: getConsensusEnforcement(dispatch.result) } : {}
|
|
55404
55571
|
};
|
|
55405
55572
|
}
|
|
55406
|
-
function detectEngineFailure(result) {
|
|
55407
|
-
const classification = classifyEngineResult(result);
|
|
55408
|
-
if (classification.success) return null;
|
|
55409
|
-
const record = typeof result === "object" && result !== null ? result : void 0;
|
|
55410
|
-
if (record?.["completed"] === false) {
|
|
55411
|
-
return { message: describeIncompletePipeline(record), detail: record };
|
|
55412
|
-
}
|
|
55413
|
-
const detail = classification.failureReason ?? "no error message";
|
|
55414
|
-
return { message: `Engine reported failure: ${detail}` };
|
|
55415
|
-
}
|
|
55416
55573
|
async function executeRunBody(input, logger58, body = {}) {
|
|
55574
|
+
const mode = resolveConsensusEnforcementMode(process.env["NEXUS_CONSENSUS_ENFORCE"]);
|
|
55417
55575
|
try {
|
|
55418
|
-
const exec2 = await executeGoal(input, { logger: logger58, ...body });
|
|
55576
|
+
const exec2 = await executeGoal(input, { logger: logger58, ...body, consensusEnforcementMode: mode });
|
|
55419
55577
|
logger58.info("run: executed goal", {
|
|
55420
55578
|
decisionId: exec2.decisionId,
|
|
55421
55579
|
strategy: exec2.strategy,
|
|
55422
55580
|
durationMs: exec2.durationMs
|
|
55423
55581
|
});
|
|
55424
|
-
const engineFailure = detectEngineFailure(exec2.result);
|
|
55582
|
+
const engineFailure = detectEngineFailure(exec2.result, mode);
|
|
55425
55583
|
if (engineFailure !== null) {
|
|
55426
55584
|
logger58.warn("run: engine reported failure", {
|
|
55427
55585
|
decisionId: exec2.decisionId,
|
|
@@ -55462,7 +55620,7 @@ async function runHandler(args, logger58, trustTier, gatewayAdapters, requestCon
|
|
|
55462
55620
|
return runAsJob({
|
|
55463
55621
|
toolName: "run",
|
|
55464
55622
|
input,
|
|
55465
|
-
freshJobId: () => `rn-${
|
|
55623
|
+
freshJobId: () => `rn-${randomUUID19()}`,
|
|
55466
55624
|
// #5393 / #6305: arity 3 — every wired strategy executor hands the
|
|
55467
55625
|
// signal to its engine. #6162: heartbeats by jobId.
|
|
55468
55626
|
run: (jobId, _input, signal) => executeRunBodyOrThrow(input, logger58, {
|
|
@@ -55577,7 +55735,7 @@ function withCatalogueCaveat(report) {
|
|
|
55577
55735
|
var GATEWAY_TRANSPORT = "gateway";
|
|
55578
55736
|
var GATEWAY_API_ARM = "api:custom-openai";
|
|
55579
55737
|
async function gatewaySource(apiArm) {
|
|
55580
|
-
const { discoverModels, readOpenAICompatEnv } = await import("./openai-compat-adapter-
|
|
55738
|
+
const { discoverModels, readOpenAICompatEnv } = await import("./openai-compat-adapter-PQ3JKWPZ.js");
|
|
55581
55739
|
const config = readOpenAICompatEnv();
|
|
55582
55740
|
if (config !== null) {
|
|
55583
55741
|
return {
|
|
@@ -55596,7 +55754,7 @@ async function gatewaySource(apiArm) {
|
|
|
55596
55754
|
}
|
|
55597
55755
|
async function defaultSources(includeOpenRouter, adaptersFactory) {
|
|
55598
55756
|
const adapters = new Map(
|
|
55599
|
-
adaptersFactory !== void 0 ? adaptersFactory() : (await import("./factory-
|
|
55757
|
+
adaptersFactory !== void 0 ? adaptersFactory() : (await import("./factory-3Z46455N.js")).createAllAdapters()
|
|
55600
55758
|
);
|
|
55601
55759
|
const apiArm = adapters.get(GATEWAY_API_ARM);
|
|
55602
55760
|
adapters.delete(GATEWAY_API_ARM);
|
|
@@ -55727,7 +55885,7 @@ var VoterEvalVerdictQuerySchema = z119.object({
|
|
|
55727
55885
|
|
|
55728
55886
|
// src/mcp/tools/supply-chain-tradeoff-panel.ts
|
|
55729
55887
|
import { z as z120 } from "zod";
|
|
55730
|
-
import { randomUUID as
|
|
55888
|
+
import { randomUUID as randomUUID20 } from "node:crypto";
|
|
55731
55889
|
var DEFAULT_AXES = [
|
|
55732
55890
|
"build_time_determinism",
|
|
55733
55891
|
"supply_chain_risk",
|
|
@@ -55998,7 +56156,7 @@ async function tradeoffPanelHandler(args, ctx) {
|
|
|
55998
56156
|
return runAsJob({
|
|
55999
56157
|
toolName: "supply_chain_tradeoff_panel",
|
|
56000
56158
|
input,
|
|
56001
|
-
freshJobId: () => `sc-${
|
|
56159
|
+
freshJobId: () => `sc-${randomUUID20()}`,
|
|
56002
56160
|
// #5393: arity 4 — signal + #6162 progress. `runAsJob` derives
|
|
56003
56161
|
// `signalAccepted` from `run.length`. The signal reaches `collectRealVotes`,
|
|
56004
56162
|
// so a cancel stops the un-launched seats; `progress` heartbeats per seat.
|
|
@@ -58968,4 +59126,4 @@ export {
|
|
|
58968
59126
|
initializeSandbox,
|
|
58969
59127
|
getSandboxMode
|
|
58970
59128
|
};
|
|
58971
|
-
//# sourceMappingURL=chunk-
|
|
59129
|
+
//# sourceMappingURL=chunk-TQEXRC5C.js.map
|