nexus-agents 2.81.3 → 2.82.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/{child-mcp-config-LLLRMOTQ.js → child-mcp-config-BMSYR7VV.js} +2 -2
- package/dist/{chunk-ERWTZSAR.js → chunk-2R5UUBGA.js} +2 -2
- package/dist/{chunk-BMNWUPJO.js → chunk-2SQXJQTA.js} +3 -3
- package/dist/{chunk-755EZIUF.js → chunk-4XNVJS5A.js} +924 -376
- package/dist/{chunk-755EZIUF.js.map → chunk-4XNVJS5A.js.map} +1 -1
- package/dist/{chunk-LJIB6TNE.js → chunk-7VNVDFD5.js} +3 -13
- package/dist/{chunk-LJIB6TNE.js.map → chunk-7VNVDFD5.js.map} +1 -1
- package/dist/{chunk-PUSFT342.js → chunk-BL5IBHEY.js} +3 -3
- package/dist/{chunk-Q27M6KHP.js → chunk-C7P2HLJX.js} +4 -4
- package/dist/{chunk-P4W7PV6L.js → chunk-FTT2IYYX.js} +123 -96
- package/dist/chunk-FTT2IYYX.js.map +1 -0
- package/dist/{chunk-UZCDHAY3.js → chunk-G2DZBEMU.js} +2 -2
- package/dist/{chunk-WZGCVCRQ.js → chunk-GNG7URCR.js} +2 -2
- package/dist/{chunk-RLQZOEMX.js → chunk-HJUHDPXJ.js} +3 -3
- package/dist/{chunk-SVKH6ASN.js → chunk-HMXQKDUV.js} +36 -24
- package/dist/chunk-HMXQKDUV.js.map +1 -0
- package/dist/{chunk-PV3OEDLO.js → chunk-HVZ52LOL.js} +2 -2
- package/dist/{chunk-EKLY4LBJ.js → chunk-JM3R267Z.js} +28 -15
- package/dist/chunk-JM3R267Z.js.map +1 -0
- package/dist/{chunk-M66MYHBT.js → chunk-NTLJ3INA.js} +2 -2
- package/dist/{chunk-T7RGD5JW.js → chunk-OYDJ3C4N.js} +3 -3
- package/dist/{chunk-UTL2SFIN.js → chunk-PZESEBD3.js} +2 -2
- package/dist/{chunk-LIEFKEAO.js → chunk-QHL4KGNB.js} +2 -2
- package/dist/{chunk-WLAQXITV.js → chunk-S36LIUV2.js} +12 -23
- package/dist/chunk-S36LIUV2.js.map +1 -0
- package/dist/{chunk-YLYT7GSG.js → chunk-SBZVRH4S.js} +2 -2
- package/dist/{chunk-V2KWEIV5.js → chunk-SHWGK7X6.js} +9 -60
- package/dist/chunk-SHWGK7X6.js.map +1 -0
- package/dist/{chunk-6YQCLEHL.js → chunk-SXL744NF.js} +2 -2
- package/dist/{chunk-4OPS2AUD.js → chunk-TXIUCEFT.js} +4 -4
- package/dist/chunk-TXIUCEFT.js.map +1 -0
- package/dist/{chunk-PZEE6T5Y.js → chunk-U7JXQSEM.js} +3 -3
- package/dist/{chunk-SZ7VPIRA.js → chunk-W2AIGD35.js} +2 -2
- package/dist/{chunk-73K7575Z.js → chunk-WUUEKFKG.js} +2 -2
- package/dist/{chunk-PKBKWWPK.js → chunk-X3JR3GMT.js} +3 -3
- package/dist/{chunk-S77SLJ2J.js → chunk-XGUDCUMB.js} +2 -2
- package/dist/{cli-circuit-breaker-O5RV47BO.js → cli-circuit-breaker-BIJUQRQI.js} +4 -4
- package/dist/cli.js +148 -70
- package/dist/cli.js.map +1 -1
- package/dist/{composite-router-SKHVZ4UF.js → composite-router-FB7P22L5.js} +2 -2
- package/dist/{consensus-vote-VBXLXVFF.js → consensus-vote-KKAIFULI.js} +11 -11
- package/dist/{context-retriever-KLJ5X4TL.js → context-retriever-4JCGMWH7.js} +5 -5
- package/dist/{doctor-deep-IH4FG5YZ.js → doctor-deep-7YK4BZIJ.js} +3 -3
- package/dist/expert-bridge-DJM5GAWZ.js +11 -0
- package/dist/{factory-FTE7TDCT.js → factory-DOWBGVAL.js} +5 -5
- package/dist/{factory-CQUDIMIG.js → factory-PK4EZL7K.js} +4 -4
- package/dist/index.d.ts +13 -1
- package/dist/index.js +24 -24
- package/dist/index.js.map +1 -1
- package/dist/{init-opencode-MXZJKG32.js → init-opencode-QP5CAMWN.js} +5 -5
- package/dist/{issue-triage-H5VLNGWU.js → issue-triage-T3SKNBH5.js} +4 -4
- package/dist/{registry-command-ALVYOGQY.js → registry-command-TH7U6UMC.js} +2 -2
- package/dist/{repo-security-plan-VJCWWPWO.js → repo-security-plan-V257RYTW.js} +3 -3
- package/dist/{research-helpers-synthesize-XUTBDVI7.js → research-helpers-synthesize-Y3O76PY4.js} +3 -3
- package/dist/{routing-memory-QKQ3OGWW.js → routing-memory-AAH7NIHD.js} +2 -2
- package/dist/{session-memory-N76TNRSK.js → session-memory-MY6YS2VX.js} +3 -3
- package/dist/{setup-command-3VQHU7BZ.js → setup-command-B6EC3OJA.js} +10 -10
- package/dist/{setup-config-Y7KZSFX3.js → setup-config-HVO6ZSLW.js} +3 -3
- package/dist/{setup-custom-api-QEKHNYQJ.js → setup-custom-api-UOIKUQL4.js} +4 -4
- package/dist/{tool-memory-MFDLIJOB.js → tool-memory-T7ZYIUJ2.js} +4 -4
- package/dist/{weather-report-IXPYIYE4.js → weather-report-O3Z3BBAX.js} +2 -2
- package/package.json +1 -1
- package/dist/chunk-4OPS2AUD.js.map +0 -1
- package/dist/chunk-EKLY4LBJ.js.map +0 -1
- package/dist/chunk-P4W7PV6L.js.map +0 -1
- package/dist/chunk-SVKH6ASN.js.map +0 -1
- package/dist/chunk-V2KWEIV5.js.map +0 -1
- package/dist/chunk-WLAQXITV.js.map +0 -1
- package/dist/expert-bridge-EKPDZKMD.js +0 -11
- /package/dist/{child-mcp-config-LLLRMOTQ.js.map → child-mcp-config-BMSYR7VV.js.map} +0 -0
- /package/dist/{chunk-ERWTZSAR.js.map → chunk-2R5UUBGA.js.map} +0 -0
- /package/dist/{chunk-BMNWUPJO.js.map → chunk-2SQXJQTA.js.map} +0 -0
- /package/dist/{chunk-PUSFT342.js.map → chunk-BL5IBHEY.js.map} +0 -0
- /package/dist/{chunk-Q27M6KHP.js.map → chunk-C7P2HLJX.js.map} +0 -0
- /package/dist/{chunk-UZCDHAY3.js.map → chunk-G2DZBEMU.js.map} +0 -0
- /package/dist/{chunk-WZGCVCRQ.js.map → chunk-GNG7URCR.js.map} +0 -0
- /package/dist/{chunk-RLQZOEMX.js.map → chunk-HJUHDPXJ.js.map} +0 -0
- /package/dist/{chunk-PV3OEDLO.js.map → chunk-HVZ52LOL.js.map} +0 -0
- /package/dist/{chunk-M66MYHBT.js.map → chunk-NTLJ3INA.js.map} +0 -0
- /package/dist/{chunk-T7RGD5JW.js.map → chunk-OYDJ3C4N.js.map} +0 -0
- /package/dist/{chunk-UTL2SFIN.js.map → chunk-PZESEBD3.js.map} +0 -0
- /package/dist/{chunk-LIEFKEAO.js.map → chunk-QHL4KGNB.js.map} +0 -0
- /package/dist/{chunk-YLYT7GSG.js.map → chunk-SBZVRH4S.js.map} +0 -0
- /package/dist/{chunk-6YQCLEHL.js.map → chunk-SXL744NF.js.map} +0 -0
- /package/dist/{chunk-PZEE6T5Y.js.map → chunk-U7JXQSEM.js.map} +0 -0
- /package/dist/{chunk-SZ7VPIRA.js.map → chunk-W2AIGD35.js.map} +0 -0
- /package/dist/{chunk-73K7575Z.js.map → chunk-WUUEKFKG.js.map} +0 -0
- /package/dist/{chunk-PKBKWWPK.js.map → chunk-X3JR3GMT.js.map} +0 -0
- /package/dist/{chunk-S77SLJ2J.js.map → chunk-XGUDCUMB.js.map} +0 -0
- /package/dist/{cli-circuit-breaker-O5RV47BO.js.map → cli-circuit-breaker-BIJUQRQI.js.map} +0 -0
- /package/dist/{composite-router-SKHVZ4UF.js.map → composite-router-FB7P22L5.js.map} +0 -0
- /package/dist/{consensus-vote-VBXLXVFF.js.map → consensus-vote-KKAIFULI.js.map} +0 -0
- /package/dist/{context-retriever-KLJ5X4TL.js.map → context-retriever-4JCGMWH7.js.map} +0 -0
- /package/dist/{doctor-deep-IH4FG5YZ.js.map → doctor-deep-7YK4BZIJ.js.map} +0 -0
- /package/dist/{expert-bridge-EKPDZKMD.js.map → expert-bridge-DJM5GAWZ.js.map} +0 -0
- /package/dist/{factory-CQUDIMIG.js.map → factory-DOWBGVAL.js.map} +0 -0
- /package/dist/{factory-FTE7TDCT.js.map → factory-PK4EZL7K.js.map} +0 -0
- /package/dist/{init-opencode-MXZJKG32.js.map → init-opencode-QP5CAMWN.js.map} +0 -0
- /package/dist/{issue-triage-H5VLNGWU.js.map → issue-triage-T3SKNBH5.js.map} +0 -0
- /package/dist/{registry-command-ALVYOGQY.js.map → registry-command-TH7U6UMC.js.map} +0 -0
- /package/dist/{repo-security-plan-VJCWWPWO.js.map → repo-security-plan-V257RYTW.js.map} +0 -0
- /package/dist/{research-helpers-synthesize-XUTBDVI7.js.map → research-helpers-synthesize-Y3O76PY4.js.map} +0 -0
- /package/dist/{routing-memory-QKQ3OGWW.js.map → routing-memory-AAH7NIHD.js.map} +0 -0
- /package/dist/{session-memory-N76TNRSK.js.map → session-memory-MY6YS2VX.js.map} +0 -0
- /package/dist/{setup-command-3VQHU7BZ.js.map → setup-command-B6EC3OJA.js.map} +0 -0
- /package/dist/{setup-config-Y7KZSFX3.js.map → setup-config-HVO6ZSLW.js.map} +0 -0
- /package/dist/{setup-custom-api-QEKHNYQJ.js.map → setup-custom-api-UOIKUQL4.js.map} +0 -0
- /package/dist/{tool-memory-MFDLIJOB.js.map → tool-memory-T7ZYIUJ2.js.map} +0 -0
- /package/dist/{weather-report-IXPYIYE4.js.map → weather-report-O3Z3BBAX.js.map} +0 -0
package/dist/cli.js
CHANGED
|
@@ -12,18 +12,18 @@ import {
|
|
|
12
12
|
parseFindings,
|
|
13
13
|
sumFindings
|
|
14
14
|
} from "./chunk-3RZWLQSC.js";
|
|
15
|
-
import "./chunk-
|
|
15
|
+
import "./chunk-XGUDCUMB.js";
|
|
16
16
|
import {
|
|
17
17
|
buildOpenAICompatAdapters,
|
|
18
18
|
loadUsageEvents,
|
|
19
19
|
readOpenAICompatEnv,
|
|
20
20
|
rollupByModel
|
|
21
|
-
} from "./chunk-
|
|
21
|
+
} from "./chunk-BL5IBHEY.js";
|
|
22
22
|
import {
|
|
23
23
|
setupCommandAsync,
|
|
24
24
|
verifyCommand
|
|
25
|
-
} from "./chunk-
|
|
26
|
-
import "./chunk-
|
|
25
|
+
} from "./chunk-JM3R267Z.js";
|
|
26
|
+
import "./chunk-SXL744NF.js";
|
|
27
27
|
import {
|
|
28
28
|
AuthHandler,
|
|
29
29
|
DEFAULT_EXPERTS,
|
|
@@ -122,6 +122,7 @@ import {
|
|
|
122
122
|
registerMemoryWriteTool,
|
|
123
123
|
registerOrchestrateTool,
|
|
124
124
|
registerPipelineTool,
|
|
125
|
+
registerPrReviewTool,
|
|
125
126
|
registerPrompts,
|
|
126
127
|
registerQueryTaskStateTool,
|
|
127
128
|
registerQueryTraceTool,
|
|
@@ -139,6 +140,7 @@ import {
|
|
|
139
140
|
registerRunGraphWorkflowTool,
|
|
140
141
|
registerRunWorkflowTool,
|
|
141
142
|
registerSearchCodebaseTool,
|
|
143
|
+
registerSupplyChainTradeoffPanelTool,
|
|
142
144
|
registerSurveyOssLandscapeTool,
|
|
143
145
|
registerTools,
|
|
144
146
|
registerVendorPublishingAuditTool,
|
|
@@ -153,19 +155,19 @@ import {
|
|
|
153
155
|
validateCommand,
|
|
154
156
|
validateWorkflow,
|
|
155
157
|
wrapInMarkdownFence
|
|
156
|
-
} from "./chunk-
|
|
158
|
+
} from "./chunk-4XNVJS5A.js";
|
|
157
159
|
import "./chunk-AP2FD37C.js";
|
|
158
160
|
import "./chunk-ED6VQWNG.js";
|
|
159
161
|
import {
|
|
160
162
|
resolveToken
|
|
161
|
-
} from "./chunk-
|
|
163
|
+
} from "./chunk-G2DZBEMU.js";
|
|
162
164
|
import {
|
|
163
165
|
CATEGORY_DISPLAY_NAMES,
|
|
164
166
|
DEFAULT_PR_REVIEW_CONFIG
|
|
165
167
|
} from "./chunk-X2M7OF27.js";
|
|
166
|
-
import "./chunk-
|
|
167
|
-
import "./chunk-
|
|
168
|
-
import "./chunk-
|
|
168
|
+
import "./chunk-X3JR3GMT.js";
|
|
169
|
+
import "./chunk-OYDJ3C4N.js";
|
|
170
|
+
import "./chunk-HMXQKDUV.js";
|
|
169
171
|
import {
|
|
170
172
|
DEFAULT_VOTE_TIMEOUT_MS,
|
|
171
173
|
ErrorPolicySchema,
|
|
@@ -183,31 +185,31 @@ import {
|
|
|
183
185
|
toolSuccessStructured,
|
|
184
186
|
warnIfSimulatedOutsideTests,
|
|
185
187
|
wrapToolWithTimeout
|
|
186
|
-
} from "./chunk-
|
|
187
|
-
import "./chunk-
|
|
188
|
-
import "./chunk-
|
|
188
|
+
} from "./chunk-FTT2IYYX.js";
|
|
189
|
+
import "./chunk-NTLJ3INA.js";
|
|
190
|
+
import "./chunk-SBZVRH4S.js";
|
|
189
191
|
import {
|
|
190
192
|
loadPapersRegistry,
|
|
191
193
|
loadTechniquesRegistry,
|
|
192
194
|
savePapersRegistry,
|
|
193
195
|
synthesizeResearch
|
|
194
|
-
} from "./chunk-
|
|
196
|
+
} from "./chunk-2R5UUBGA.js";
|
|
195
197
|
import {
|
|
196
198
|
classifyTrust,
|
|
197
199
|
createFullGitHubProvider,
|
|
198
200
|
evaluatePolicy,
|
|
199
201
|
parsePRUrl,
|
|
200
202
|
sanitizeInput
|
|
201
|
-
} from "./chunk-
|
|
202
|
-
import "./chunk-
|
|
203
|
-
import "./chunk-
|
|
203
|
+
} from "./chunk-HJUHDPXJ.js";
|
|
204
|
+
import "./chunk-PZESEBD3.js";
|
|
205
|
+
import "./chunk-W2AIGD35.js";
|
|
204
206
|
import "./chunk-7J7PNOJQ.js";
|
|
205
207
|
import "./chunk-BQ4YXGGQ.js";
|
|
206
|
-
import "./chunk-
|
|
208
|
+
import "./chunk-TXIUCEFT.js";
|
|
207
209
|
import {
|
|
208
210
|
MemoryError,
|
|
209
211
|
shutdownToolMemory
|
|
210
|
-
} from "./chunk-
|
|
212
|
+
} from "./chunk-U7JXQSEM.js";
|
|
211
213
|
import {
|
|
212
214
|
CustomExpertDefinitionSchema,
|
|
213
215
|
DATA_SUBDIRECTORIES,
|
|
@@ -226,12 +228,12 @@ import {
|
|
|
226
228
|
loadConfig,
|
|
227
229
|
runDoctor,
|
|
228
230
|
validateNexusEnv
|
|
229
|
-
} from "./chunk-
|
|
230
|
-
import "./chunk-
|
|
231
|
-
import "./chunk-
|
|
231
|
+
} from "./chunk-S36LIUV2.js";
|
|
232
|
+
import "./chunk-GNG7URCR.js";
|
|
233
|
+
import "./chunk-WUUEKFKG.js";
|
|
232
234
|
import {
|
|
233
235
|
DEFAULTS
|
|
234
|
-
} from "./chunk-
|
|
236
|
+
} from "./chunk-SHWGK7X6.js";
|
|
235
237
|
import "./chunk-NUBSJGQZ.js";
|
|
236
238
|
import {
|
|
237
239
|
capitalize,
|
|
@@ -243,11 +245,11 @@ import {
|
|
|
243
245
|
getAvailableClis,
|
|
244
246
|
isRecord,
|
|
245
247
|
probeAllClis
|
|
246
|
-
} from "./chunk-
|
|
247
|
-
import "./chunk-
|
|
248
|
+
} from "./chunk-2SQXJQTA.js";
|
|
249
|
+
import "./chunk-QHL4KGNB.js";
|
|
248
250
|
import "./chunk-ZM4O442V.js";
|
|
249
251
|
import "./chunk-PQHVC4BD.js";
|
|
250
|
-
import "./chunk-
|
|
252
|
+
import "./chunk-HVZ52LOL.js";
|
|
251
253
|
import {
|
|
252
254
|
API_TIMEOUTS,
|
|
253
255
|
AgentCapability,
|
|
@@ -315,7 +317,7 @@ import {
|
|
|
315
317
|
validateTimeout,
|
|
316
318
|
writeEmptyLine,
|
|
317
319
|
writeLine
|
|
318
|
-
} from "./chunk-
|
|
320
|
+
} from "./chunk-7VNVDFD5.js";
|
|
319
321
|
import {
|
|
320
322
|
applyPortableMode,
|
|
321
323
|
detectSandbox,
|
|
@@ -13879,20 +13881,20 @@ function getLatestTag() {
|
|
|
13879
13881
|
return void 0;
|
|
13880
13882
|
}
|
|
13881
13883
|
}
|
|
13882
|
-
function
|
|
13884
|
+
function tryGetCommitsBetween(from, to = "HEAD") {
|
|
13883
13885
|
const SAFE_REF = /^[a-zA-Z0-9._\-/~^]+$/;
|
|
13884
|
-
if (!SAFE_REF.test(from)
|
|
13885
|
-
|
|
13886
|
-
}
|
|
13886
|
+
if (!SAFE_REF.test(from)) return { kind: "invalid_ref", ref: from };
|
|
13887
|
+
if (!SAFE_REF.test(to)) return { kind: "invalid_ref", ref: to };
|
|
13887
13888
|
try {
|
|
13888
13889
|
const result = execFileSync("git", ["log", `${from}..${to}`, "--oneline", "--format=%h %s"], {
|
|
13889
13890
|
encoding: "utf-8",
|
|
13890
13891
|
stdio: ["pipe", "pipe", "pipe"],
|
|
13891
13892
|
timeout: CLI_SUBPROCESS_TIMEOUTS.ghCommandMs
|
|
13892
13893
|
}).trim();
|
|
13893
|
-
return result ? result.split("\n").filter(Boolean) : [];
|
|
13894
|
-
} catch {
|
|
13895
|
-
|
|
13894
|
+
return { kind: "ok", commits: result ? result.split("\n").filter(Boolean) : [] };
|
|
13895
|
+
} catch (error) {
|
|
13896
|
+
const reason = error instanceof Error ? error.message : String(error);
|
|
13897
|
+
return { kind: "git_failed", reason };
|
|
13896
13898
|
}
|
|
13897
13899
|
}
|
|
13898
13900
|
function parseConventionalCommit(hash, message) {
|
|
@@ -14046,7 +14048,34 @@ async function runReleaseNotes(options = {}) {
|
|
|
14046
14048
|
if (opts.verbose) {
|
|
14047
14049
|
console.log(`${colors.dim}Analyzing commits from ${fromRef} to ${toRef}...${colors.reset}`);
|
|
14048
14050
|
}
|
|
14049
|
-
const
|
|
14051
|
+
const commitsResult = tryGetCommitsBetween(fromRef, toRef);
|
|
14052
|
+
if (commitsResult.kind === "invalid_ref") {
|
|
14053
|
+
return {
|
|
14054
|
+
success: false,
|
|
14055
|
+
content: `Invalid git ref: "${commitsResult.ref}". Refs may only contain [a-zA-Z0-9._\\-/~^].`,
|
|
14056
|
+
version: "unknown",
|
|
14057
|
+
fromRef,
|
|
14058
|
+
toRef,
|
|
14059
|
+
commitCount: 0,
|
|
14060
|
+
categories: [],
|
|
14061
|
+
usedConsensus: false,
|
|
14062
|
+
durationMs: Date.now() - startTime
|
|
14063
|
+
};
|
|
14064
|
+
}
|
|
14065
|
+
if (commitsResult.kind === "git_failed") {
|
|
14066
|
+
return {
|
|
14067
|
+
success: false,
|
|
14068
|
+
content: `git log failed for ${fromRef}..${toRef}: ${commitsResult.reason}`,
|
|
14069
|
+
version: "unknown",
|
|
14070
|
+
fromRef,
|
|
14071
|
+
toRef,
|
|
14072
|
+
commitCount: 0,
|
|
14073
|
+
categories: [],
|
|
14074
|
+
usedConsensus: false,
|
|
14075
|
+
durationMs: Date.now() - startTime
|
|
14076
|
+
};
|
|
14077
|
+
}
|
|
14078
|
+
const commitLines = commitsResult.commits;
|
|
14050
14079
|
if (commitLines.length === 0) {
|
|
14051
14080
|
return {
|
|
14052
14081
|
success: true,
|
|
@@ -14595,7 +14624,14 @@ function generateBlogPost(options) {
|
|
|
14595
14624
|
const highlights = options.highlights || extractHighlightsFromChangelog(options.version);
|
|
14596
14625
|
const today = (/* @__PURE__ */ new Date()).toISOString().split("T")[0] ?? (/* @__PURE__ */ new Date()).toISOString().slice(0, 10);
|
|
14597
14626
|
const fromRef = getLatestTag() || "HEAD~50";
|
|
14598
|
-
const
|
|
14627
|
+
const commitsResult = tryGetCommitsBetween(fromRef, "HEAD");
|
|
14628
|
+
const commits = commitsResult.kind === "ok" ? commitsResult.commits : [];
|
|
14629
|
+
if (commitsResult.kind !== "ok") {
|
|
14630
|
+
const detail = commitsResult.kind === "invalid_ref" ? `invalid ref: ${commitsResult.ref}` : commitsResult.reason;
|
|
14631
|
+
console.warn(
|
|
14632
|
+
`[release-announce] git log failed for ${fromRef}..HEAD (${detail}); commit stats will be zero.`
|
|
14633
|
+
);
|
|
14634
|
+
}
|
|
14599
14635
|
const parsedCommits = commits.map((line) => {
|
|
14600
14636
|
const spaceIndex = line.indexOf(" ");
|
|
14601
14637
|
return parseConventionalCommit(line.substring(0, spaceIndex), line.substring(spaceIndex + 1));
|
|
@@ -16534,8 +16570,8 @@ function autoGitignoreMcpConfig(workspaceDir, dryRun) {
|
|
|
16534
16570
|
if (already) return false;
|
|
16535
16571
|
}
|
|
16536
16572
|
if (!dryRun) {
|
|
16537
|
-
const
|
|
16538
|
-
appendFileSync(gitignorePath, `${
|
|
16573
|
+
const sep4 = existing.length > 0 && !existing.endsWith("\n") ? "\n" : "";
|
|
16574
|
+
appendFileSync(gitignorePath, `${sep4}${MCP_CONFIG_FILENAME}
|
|
16539
16575
|
`, "utf-8");
|
|
16540
16576
|
}
|
|
16541
16577
|
return true;
|
|
@@ -16774,8 +16810,8 @@ function maybeUpdateGitignore(workspaceDir, portableDirName, dryRun) {
|
|
|
16774
16810
|
}
|
|
16775
16811
|
}
|
|
16776
16812
|
if (!dryRun) {
|
|
16777
|
-
const
|
|
16778
|
-
appendFileSync2(gitignorePath, `${
|
|
16813
|
+
const sep4 = existing.length > 0 && !existing.endsWith("\n") ? "\n" : "";
|
|
16814
|
+
appendFileSync2(gitignorePath, `${sep4}${entry}
|
|
16779
16815
|
`, "utf-8");
|
|
16780
16816
|
}
|
|
16781
16817
|
return true;
|
|
@@ -17029,7 +17065,7 @@ async function resolveTaskInput(input) {
|
|
|
17029
17065
|
if (input.planFile !== void 0) {
|
|
17030
17066
|
const resolved = path20.resolve(input.planFile);
|
|
17031
17067
|
const cwdRoot = path20.resolve(".");
|
|
17032
|
-
if (!resolved.startsWith(cwdRoot)) {
|
|
17068
|
+
if (resolved !== cwdRoot && !resolved.startsWith(cwdRoot + path20.sep)) {
|
|
17033
17069
|
throw new Error(`Path traversal denied: planFile must be within ${cwdRoot}`);
|
|
17034
17070
|
}
|
|
17035
17071
|
try {
|
|
@@ -17323,6 +17359,27 @@ function resolveEnv(env2) {
|
|
|
17323
17359
|
}
|
|
17324
17360
|
return resolved;
|
|
17325
17361
|
}
|
|
17362
|
+
var UPSTREAM_BASELINE_KEYS = [
|
|
17363
|
+
"PATH",
|
|
17364
|
+
"HOME",
|
|
17365
|
+
"USER",
|
|
17366
|
+
"LANG",
|
|
17367
|
+
"LC_ALL",
|
|
17368
|
+
"LC_CTYPE",
|
|
17369
|
+
"TMPDIR",
|
|
17370
|
+
"TZ",
|
|
17371
|
+
"PWD",
|
|
17372
|
+
"SHELL",
|
|
17373
|
+
"TERM"
|
|
17374
|
+
];
|
|
17375
|
+
function buildUpstreamEnv(configEnv) {
|
|
17376
|
+
const baseline = {};
|
|
17377
|
+
for (const key of UPSTREAM_BASELINE_KEYS) {
|
|
17378
|
+
const value = process.env[key];
|
|
17379
|
+
if (value !== void 0) baseline[key] = value;
|
|
17380
|
+
}
|
|
17381
|
+
return { ...baseline, ...resolveEnv(configEnv) };
|
|
17382
|
+
}
|
|
17326
17383
|
var UpstreamClient = class {
|
|
17327
17384
|
name;
|
|
17328
17385
|
config;
|
|
@@ -17342,15 +17399,10 @@ var UpstreamClient = class {
|
|
|
17342
17399
|
if (this.state === "connecting") return;
|
|
17343
17400
|
this.state = "connecting";
|
|
17344
17401
|
try {
|
|
17345
|
-
const resolvedEnv = resolveEnv(this.config.env);
|
|
17346
|
-
const baseEnv = {};
|
|
17347
|
-
for (const [k, v] of Object.entries(process.env)) {
|
|
17348
|
-
if (v !== void 0) baseEnv[k] = v;
|
|
17349
|
-
}
|
|
17350
17402
|
this.transport = new StdioClientTransport({
|
|
17351
17403
|
command: this.config.command,
|
|
17352
17404
|
args: [...this.config.args],
|
|
17353
|
-
env:
|
|
17405
|
+
env: buildUpstreamEnv(this.config.env)
|
|
17354
17406
|
});
|
|
17355
17407
|
this.client = new Client(
|
|
17356
17408
|
{ name: `nexus-upstream-${this.name}`, version: "1.0.0" },
|
|
@@ -17523,9 +17575,11 @@ var REGISTERED_TOOLS = [
|
|
|
17523
17575
|
"consensus_vote",
|
|
17524
17576
|
"research_query",
|
|
17525
17577
|
"research_add",
|
|
17578
|
+
"research_add_source",
|
|
17526
17579
|
"research_discover",
|
|
17527
17580
|
"research_analyze",
|
|
17528
17581
|
"research_catalog_review",
|
|
17582
|
+
"research_synthesize",
|
|
17529
17583
|
"survey_oss_landscape",
|
|
17530
17584
|
"vendor_publishing_audit",
|
|
17531
17585
|
"compare_data_feeds",
|
|
@@ -17538,9 +17592,17 @@ var REGISTERED_TOOLS = [
|
|
|
17538
17592
|
"execute_spec",
|
|
17539
17593
|
"registry_import",
|
|
17540
17594
|
"query_trace",
|
|
17595
|
+
"query_task_state",
|
|
17596
|
+
"verify_audit_chain",
|
|
17597
|
+
"extract_symbols",
|
|
17598
|
+
"search_codebase",
|
|
17599
|
+
"run_dev_pipeline",
|
|
17600
|
+
"run_pipeline",
|
|
17541
17601
|
"repo_analyze",
|
|
17542
17602
|
"repo_security_plan",
|
|
17543
|
-
"improvement_review"
|
|
17603
|
+
"improvement_review",
|
|
17604
|
+
"pr_review",
|
|
17605
|
+
"supply_chain_tradeoff_panel"
|
|
17544
17606
|
];
|
|
17545
17607
|
var MOCK_ORCHESTRATION_ENV = "NEXUS_ALLOW_MOCK_ORCHESTRATION";
|
|
17546
17608
|
function createOrchestratorForOrchestration(modelAdapter, logger18, useMockTechLead) {
|
|
@@ -17818,7 +17880,9 @@ var STANDALONE_TOOLS = [
|
|
|
17818
17880
|
{ name: "extract_symbols", register: registerExtractSymbolsTool },
|
|
17819
17881
|
{ name: "search_codebase", register: registerSearchCodebaseTool },
|
|
17820
17882
|
{ name: "run_dev_pipeline", register: registerDevPipelineTool },
|
|
17821
|
-
{ name: "run_pipeline", register: registerPipelineTool }
|
|
17883
|
+
{ name: "run_pipeline", register: registerPipelineTool },
|
|
17884
|
+
{ name: "pr_review", register: registerPrReviewTool },
|
|
17885
|
+
{ name: "supply_chain_tradeoff_panel", register: registerSupplyChainTradeoffPanelTool }
|
|
17822
17886
|
];
|
|
17823
17887
|
function registerToolCategories(ctx) {
|
|
17824
17888
|
const allowlist = ctx.toolAllowlist;
|
|
@@ -17873,7 +17937,12 @@ function registerMcpTools(options) {
|
|
|
17873
17937
|
const gatewayOptions = { ...options, server: observableServer };
|
|
17874
17938
|
const ctx = createToolContext(gatewayOptions, toolInfra, rateLimiterFactory);
|
|
17875
17939
|
registerToolCategories(ctx);
|
|
17876
|
-
void initUpstreamServers(gatewayConfig, observableServer, logger18)
|
|
17940
|
+
void initUpstreamServers(gatewayConfig, observableServer, logger18).catch((error) => {
|
|
17941
|
+
logger18.error(
|
|
17942
|
+
"Upstream MCP init failed",
|
|
17943
|
+
error instanceof Error ? error : new Error(String(error))
|
|
17944
|
+
);
|
|
17945
|
+
});
|
|
17877
17946
|
registerPrompts(observableServer, logger18);
|
|
17878
17947
|
registerResources(observableServer, logger18);
|
|
17879
17948
|
logToolRegistration(logger18, ctx.toolAllowlist, {
|
|
@@ -17976,6 +18045,27 @@ function logFinalEventBusStats(logger18) {
|
|
|
17976
18045
|
|
|
17977
18046
|
// src/cli-orchestrator.ts
|
|
17978
18047
|
import * as readline2 from "readline";
|
|
18048
|
+
async function executeReplTask(task, options, logger18, rl) {
|
|
18049
|
+
try {
|
|
18050
|
+
await orchestrateCommand({
|
|
18051
|
+
task,
|
|
18052
|
+
verbose: options.verbose,
|
|
18053
|
+
format: options.format,
|
|
18054
|
+
model: options.model,
|
|
18055
|
+
dryRun: options.dryRun,
|
|
18056
|
+
maxTokens: options.maxTokens,
|
|
18057
|
+
maxCostUsd: options.maxCostUsd
|
|
18058
|
+
});
|
|
18059
|
+
} catch (error) {
|
|
18060
|
+
const err2 = error instanceof Error ? error : new Error(String(error));
|
|
18061
|
+
logger18.error("REPL task failed", err2);
|
|
18062
|
+
process.stderr.write(`Error: ${err2.message}
|
|
18063
|
+
`);
|
|
18064
|
+
} finally {
|
|
18065
|
+
process.stdout.write("\n");
|
|
18066
|
+
rl.prompt();
|
|
18067
|
+
}
|
|
18068
|
+
}
|
|
17979
18069
|
function runOrchestratorRepl(options, logger18) {
|
|
17980
18070
|
return new Promise((resolve14) => {
|
|
17981
18071
|
const rl = readline2.createInterface({
|
|
@@ -17996,20 +18086,7 @@ function runOrchestratorRepl(options, logger18) {
|
|
|
17996
18086
|
rl.prompt();
|
|
17997
18087
|
return;
|
|
17998
18088
|
}
|
|
17999
|
-
void (
|
|
18000
|
-
const orchestrateOptions = {
|
|
18001
|
-
task,
|
|
18002
|
-
verbose: options.verbose,
|
|
18003
|
-
format: options.format,
|
|
18004
|
-
model: options.model,
|
|
18005
|
-
dryRun: options.dryRun,
|
|
18006
|
-
maxTokens: options.maxTokens,
|
|
18007
|
-
maxCostUsd: options.maxCostUsd
|
|
18008
|
-
};
|
|
18009
|
-
await orchestrateCommand(orchestrateOptions);
|
|
18010
|
-
process.stdout.write("\n");
|
|
18011
|
-
rl.prompt();
|
|
18012
|
-
})();
|
|
18089
|
+
void executeReplTask(task, options, logger18, rl);
|
|
18013
18090
|
});
|
|
18014
18091
|
rl.on("close", () => {
|
|
18015
18092
|
logger18.info("Orchestrator REPL closed");
|
|
@@ -19147,7 +19224,7 @@ function adaptConfigToLibrary(config) {
|
|
|
19147
19224
|
}
|
|
19148
19225
|
function createBeliefPromoter() {
|
|
19149
19226
|
return async (event) => {
|
|
19150
|
-
const { getToolMemory } = await import("./tool-memory-
|
|
19227
|
+
const { getToolMemory } = await import("./tool-memory-T7ZYIUJ2.js");
|
|
19151
19228
|
const tm = getToolMemory();
|
|
19152
19229
|
await tm.recordBelief(
|
|
19153
19230
|
`skill:${event.name}`,
|
|
@@ -19293,7 +19370,8 @@ function initializeAuditLogger(securityConfig, logger18) {
|
|
|
19293
19370
|
maxFiles: auditConfig.maxFiles,
|
|
19294
19371
|
filePrefix: "audit",
|
|
19295
19372
|
enableCompression: false,
|
|
19296
|
-
flushIntervalMs: 1e3
|
|
19373
|
+
flushIntervalMs: 1e3,
|
|
19374
|
+
maxQueueDepth: 1e4
|
|
19297
19375
|
},
|
|
19298
19376
|
void 0,
|
|
19299
19377
|
logger18
|
|
@@ -20007,7 +20085,7 @@ async function handleResearchCommand(args) {
|
|
|
20007
20085
|
}
|
|
20008
20086
|
}
|
|
20009
20087
|
async function handleRegistryCommand(args) {
|
|
20010
|
-
const { registryCommand, isValidRegistrySubcommand, formatRegistryUsage } = await import("./registry-command-
|
|
20088
|
+
const { registryCommand, isValidRegistrySubcommand, formatRegistryUsage } = await import("./registry-command-TH7U6UMC.js");
|
|
20011
20089
|
const subcommand = args.subcommand;
|
|
20012
20090
|
if (!isValidRegistrySubcommand(subcommand)) {
|
|
20013
20091
|
process.stdout.write(`${formatRegistryUsage()}
|
|
@@ -20055,7 +20133,7 @@ async function handleVerifyCommand(args) {
|
|
|
20055
20133
|
async function handleDoctorCommand(args) {
|
|
20056
20134
|
const exitCode = await doctorCommand({ fix: args.options.fix });
|
|
20057
20135
|
if (args.options.deep) {
|
|
20058
|
-
const { runDeepDiagnostics: runDeepDiagnostics2, formatDeepDiagnostics: formatDeepDiagnostics2 } = await import("./doctor-deep-
|
|
20136
|
+
const { runDeepDiagnostics: runDeepDiagnostics2, formatDeepDiagnostics: formatDeepDiagnostics2 } = await import("./doctor-deep-7YK4BZIJ.js");
|
|
20059
20137
|
const diag = runDeepDiagnostics2();
|
|
20060
20138
|
process.stdout.write(formatDeepDiagnostics2(diag) + "\n");
|
|
20061
20139
|
}
|
|
@@ -20099,7 +20177,7 @@ async function handleInitCommand(args) {
|
|
|
20099
20177
|
process.exit(result.success ? EXIT_CODES.SUCCESS : EXIT_CODES.SERVER_START_FAILED);
|
|
20100
20178
|
}
|
|
20101
20179
|
async function runInitOpencodeFlow(args) {
|
|
20102
|
-
const { runInitOpencode } = await import("./init-opencode-
|
|
20180
|
+
const { runInitOpencode } = await import("./init-opencode-QP5CAMWN.js");
|
|
20103
20181
|
const opencodePath = args.options.opencode;
|
|
20104
20182
|
if (opencodePath === void 0 || opencodePath === "") {
|
|
20105
20183
|
process.stderr.write("Error: --opencode requires a path argument.\n");
|
|
@@ -20126,7 +20204,7 @@ async function runInitOpencodeFlow(args) {
|
|
|
20126
20204
|
process.exit(EXIT_CODES.SUCCESS);
|
|
20127
20205
|
}
|
|
20128
20206
|
async function renderOpencodeValidate(opencodePath) {
|
|
20129
|
-
const { runOpencodeValidate } = await import("./init-opencode-
|
|
20207
|
+
const { runOpencodeValidate } = await import("./init-opencode-QP5CAMWN.js");
|
|
20130
20208
|
const result = await runOpencodeValidate(opencodePath);
|
|
20131
20209
|
if (!result.ok) {
|
|
20132
20210
|
process.stderr.write(`init --opencode --validate: ${result.reason ?? "failed"}
|
|
@@ -20166,7 +20244,7 @@ async function handleSetupCommandAsync(args) {
|
|
|
20166
20244
|
process.exit(exitCode === 0 ? EXIT_CODES.SUCCESS : EXIT_CODES.SERVER_START_FAILED);
|
|
20167
20245
|
}
|
|
20168
20246
|
async function runCustomApiSetup(args) {
|
|
20169
|
-
const { configureCustomApi } = await import("./setup-custom-api-
|
|
20247
|
+
const { configureCustomApi } = await import("./setup-custom-api-UOIKUQL4.js");
|
|
20170
20248
|
const baseUrl = args.options.customApi;
|
|
20171
20249
|
if (baseUrl === void 0) return EXIT_CODES.SERVER_START_FAILED;
|
|
20172
20250
|
const input = {
|