nexus-agents 2.81.4 → 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-HVGU73XG.js → child-mcp-config-BMSYR7VV.js} +2 -2
- package/dist/{chunk-EGK4RZV5.js → chunk-2R5UUBGA.js} +2 -2
- package/dist/{chunk-WVSQGGAH.js → chunk-2SQXJQTA.js} +3 -3
- package/dist/{chunk-M6KXR4LO.js → chunk-4XNVJS5A.js} +511 -368
- package/dist/{chunk-M6KXR4LO.js.map → chunk-4XNVJS5A.js.map} +1 -1
- package/dist/{chunk-HFSSADUV.js → chunk-7VNVDFD5.js} +2 -12
- package/dist/{chunk-HFSSADUV.js.map → chunk-7VNVDFD5.js.map} +1 -1
- package/dist/{chunk-YW72ORKM.js → chunk-BL5IBHEY.js} +3 -3
- package/dist/{chunk-BZVYU4YD.js → chunk-C7P2HLJX.js} +4 -4
- package/dist/{chunk-R2VJY7Z4.js → chunk-FTT2IYYX.js} +123 -96
- package/dist/chunk-FTT2IYYX.js.map +1 -0
- package/dist/{chunk-ZAY5M2AN.js → chunk-G2DZBEMU.js} +2 -2
- package/dist/{chunk-6M44ZXB4.js → chunk-GNG7URCR.js} +2 -2
- package/dist/{chunk-ITMLH7TF.js → chunk-HJUHDPXJ.js} +3 -3
- package/dist/{chunk-2GW2FZXY.js → chunk-HMXQKDUV.js} +36 -24
- package/dist/chunk-HMXQKDUV.js.map +1 -0
- package/dist/{chunk-B3MCX46I.js → chunk-HVZ52LOL.js} +2 -2
- package/dist/{chunk-FAU7LVIG.js → chunk-JM3R267Z.js} +28 -15
- package/dist/chunk-JM3R267Z.js.map +1 -0
- package/dist/{chunk-AMFVUDWI.js → chunk-NTLJ3INA.js} +2 -2
- package/dist/{chunk-XZECNG2Q.js → chunk-OYDJ3C4N.js} +3 -3
- package/dist/{chunk-PPV23O3J.js → chunk-PZESEBD3.js} +2 -2
- package/dist/{chunk-5TM5VL23.js → chunk-QHL4KGNB.js} +2 -2
- package/dist/{chunk-F7N2T53R.js → chunk-S36LIUV2.js} +12 -23
- package/dist/chunk-S36LIUV2.js.map +1 -0
- package/dist/{chunk-M5ABED6T.js → chunk-SBZVRH4S.js} +2 -2
- package/dist/{chunk-2HBQ6XXA.js → chunk-SHWGK7X6.js} +9 -60
- package/dist/chunk-SHWGK7X6.js.map +1 -0
- package/dist/{chunk-M3KVQK54.js → chunk-SXL744NF.js} +2 -2
- package/dist/{chunk-S5HMID6I.js → chunk-TXIUCEFT.js} +4 -4
- package/dist/chunk-TXIUCEFT.js.map +1 -0
- package/dist/{chunk-JSQV2EOZ.js → chunk-U7JXQSEM.js} +3 -3
- package/dist/{chunk-RGKUBFTE.js → chunk-W2AIGD35.js} +2 -2
- package/dist/{chunk-7JLSKX3U.js → chunk-WUUEKFKG.js} +2 -2
- package/dist/{chunk-K7WUEKCD.js → chunk-X3JR3GMT.js} +3 -3
- package/dist/{chunk-ZBABWKEA.js → chunk-XGUDCUMB.js} +2 -2
- package/dist/{cli-circuit-breaker-NUZGOAVD.js → cli-circuit-breaker-BIJUQRQI.js} +4 -4
- package/dist/cli.js +126 -67
- package/dist/cli.js.map +1 -1
- package/dist/{composite-router-4CF3P5D4.js → composite-router-FB7P22L5.js} +2 -2
- package/dist/{consensus-vote-7PLEGFWZ.js → consensus-vote-KKAIFULI.js} +11 -11
- package/dist/{context-retriever-R5W4I4IB.js → context-retriever-4JCGMWH7.js} +5 -5
- package/dist/{doctor-deep-7JTGI33O.js → doctor-deep-7YK4BZIJ.js} +3 -3
- package/dist/expert-bridge-DJM5GAWZ.js +11 -0
- package/dist/{factory-DD2FPM3H.js → factory-DOWBGVAL.js} +5 -5
- package/dist/{factory-E2CKCYIK.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-2BZWAACW.js → init-opencode-QP5CAMWN.js} +5 -5
- package/dist/{issue-triage-CRUJLWFY.js → issue-triage-T3SKNBH5.js} +4 -4
- package/dist/{registry-command-OHIJNUZJ.js → registry-command-TH7U6UMC.js} +2 -2
- package/dist/{repo-security-plan-I4FZP7QA.js → repo-security-plan-V257RYTW.js} +3 -3
- package/dist/{research-helpers-synthesize-NMYYERCP.js → research-helpers-synthesize-Y3O76PY4.js} +3 -3
- package/dist/{routing-memory-7DA6WNSA.js → routing-memory-AAH7NIHD.js} +2 -2
- package/dist/{session-memory-LV35VSBK.js → session-memory-MY6YS2VX.js} +3 -3
- package/dist/{setup-command-2OUPZSU7.js → setup-command-B6EC3OJA.js} +10 -10
- package/dist/{setup-config-TMXG3O7K.js → setup-config-HVO6ZSLW.js} +3 -3
- package/dist/{setup-custom-api-N5VE2YPO.js → setup-custom-api-UOIKUQL4.js} +4 -4
- package/dist/{tool-memory-JL5TF5BI.js → tool-memory-T7ZYIUJ2.js} +4 -4
- package/dist/{weather-report-CCOWOPFG.js → weather-report-O3Z3BBAX.js} +2 -2
- package/package.json +1 -1
- package/dist/chunk-2GW2FZXY.js.map +0 -1
- package/dist/chunk-2HBQ6XXA.js.map +0 -1
- package/dist/chunk-F7N2T53R.js.map +0 -1
- package/dist/chunk-FAU7LVIG.js.map +0 -1
- package/dist/chunk-R2VJY7Z4.js.map +0 -1
- package/dist/chunk-S5HMID6I.js.map +0 -1
- package/dist/expert-bridge-J5ZKCYL5.js +0 -11
- /package/dist/{child-mcp-config-HVGU73XG.js.map → child-mcp-config-BMSYR7VV.js.map} +0 -0
- /package/dist/{chunk-EGK4RZV5.js.map → chunk-2R5UUBGA.js.map} +0 -0
- /package/dist/{chunk-WVSQGGAH.js.map → chunk-2SQXJQTA.js.map} +0 -0
- /package/dist/{chunk-YW72ORKM.js.map → chunk-BL5IBHEY.js.map} +0 -0
- /package/dist/{chunk-BZVYU4YD.js.map → chunk-C7P2HLJX.js.map} +0 -0
- /package/dist/{chunk-ZAY5M2AN.js.map → chunk-G2DZBEMU.js.map} +0 -0
- /package/dist/{chunk-6M44ZXB4.js.map → chunk-GNG7URCR.js.map} +0 -0
- /package/dist/{chunk-ITMLH7TF.js.map → chunk-HJUHDPXJ.js.map} +0 -0
- /package/dist/{chunk-B3MCX46I.js.map → chunk-HVZ52LOL.js.map} +0 -0
- /package/dist/{chunk-AMFVUDWI.js.map → chunk-NTLJ3INA.js.map} +0 -0
- /package/dist/{chunk-XZECNG2Q.js.map → chunk-OYDJ3C4N.js.map} +0 -0
- /package/dist/{chunk-PPV23O3J.js.map → chunk-PZESEBD3.js.map} +0 -0
- /package/dist/{chunk-5TM5VL23.js.map → chunk-QHL4KGNB.js.map} +0 -0
- /package/dist/{chunk-M5ABED6T.js.map → chunk-SBZVRH4S.js.map} +0 -0
- /package/dist/{chunk-M3KVQK54.js.map → chunk-SXL744NF.js.map} +0 -0
- /package/dist/{chunk-JSQV2EOZ.js.map → chunk-U7JXQSEM.js.map} +0 -0
- /package/dist/{chunk-RGKUBFTE.js.map → chunk-W2AIGD35.js.map} +0 -0
- /package/dist/{chunk-7JLSKX3U.js.map → chunk-WUUEKFKG.js.map} +0 -0
- /package/dist/{chunk-K7WUEKCD.js.map → chunk-X3JR3GMT.js.map} +0 -0
- /package/dist/{chunk-ZBABWKEA.js.map → chunk-XGUDCUMB.js.map} +0 -0
- /package/dist/{cli-circuit-breaker-NUZGOAVD.js.map → cli-circuit-breaker-BIJUQRQI.js.map} +0 -0
- /package/dist/{composite-router-4CF3P5D4.js.map → composite-router-FB7P22L5.js.map} +0 -0
- /package/dist/{consensus-vote-7PLEGFWZ.js.map → consensus-vote-KKAIFULI.js.map} +0 -0
- /package/dist/{context-retriever-R5W4I4IB.js.map → context-retriever-4JCGMWH7.js.map} +0 -0
- /package/dist/{doctor-deep-7JTGI33O.js.map → doctor-deep-7YK4BZIJ.js.map} +0 -0
- /package/dist/{expert-bridge-J5ZKCYL5.js.map → expert-bridge-DJM5GAWZ.js.map} +0 -0
- /package/dist/{factory-DD2FPM3H.js.map → factory-DOWBGVAL.js.map} +0 -0
- /package/dist/{factory-E2CKCYIK.js.map → factory-PK4EZL7K.js.map} +0 -0
- /package/dist/{init-opencode-2BZWAACW.js.map → init-opencode-QP5CAMWN.js.map} +0 -0
- /package/dist/{issue-triage-CRUJLWFY.js.map → issue-triage-T3SKNBH5.js.map} +0 -0
- /package/dist/{registry-command-OHIJNUZJ.js.map → registry-command-TH7U6UMC.js.map} +0 -0
- /package/dist/{repo-security-plan-I4FZP7QA.js.map → repo-security-plan-V257RYTW.js.map} +0 -0
- /package/dist/{research-helpers-synthesize-NMYYERCP.js.map → research-helpers-synthesize-Y3O76PY4.js.map} +0 -0
- /package/dist/{routing-memory-7DA6WNSA.js.map → routing-memory-AAH7NIHD.js.map} +0 -0
- /package/dist/{session-memory-LV35VSBK.js.map → session-memory-MY6YS2VX.js.map} +0 -0
- /package/dist/{setup-command-2OUPZSU7.js.map → setup-command-B6EC3OJA.js.map} +0 -0
- /package/dist/{setup-config-TMXG3O7K.js.map → setup-config-HVO6ZSLW.js.map} +0 -0
- /package/dist/{setup-custom-api-N5VE2YPO.js.map → setup-custom-api-UOIKUQL4.js.map} +0 -0
- /package/dist/{tool-memory-JL5TF5BI.js.map → tool-memory-T7ZYIUJ2.js.map} +0 -0
- /package/dist/{weather-report-CCOWOPFG.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,
|
|
@@ -155,19 +155,19 @@ import {
|
|
|
155
155
|
validateCommand,
|
|
156
156
|
validateWorkflow,
|
|
157
157
|
wrapInMarkdownFence
|
|
158
|
-
} from "./chunk-
|
|
158
|
+
} from "./chunk-4XNVJS5A.js";
|
|
159
159
|
import "./chunk-AP2FD37C.js";
|
|
160
160
|
import "./chunk-ED6VQWNG.js";
|
|
161
161
|
import {
|
|
162
162
|
resolveToken
|
|
163
|
-
} from "./chunk-
|
|
163
|
+
} from "./chunk-G2DZBEMU.js";
|
|
164
164
|
import {
|
|
165
165
|
CATEGORY_DISPLAY_NAMES,
|
|
166
166
|
DEFAULT_PR_REVIEW_CONFIG
|
|
167
167
|
} from "./chunk-X2M7OF27.js";
|
|
168
|
-
import "./chunk-
|
|
169
|
-
import "./chunk-
|
|
170
|
-
import "./chunk-
|
|
168
|
+
import "./chunk-X3JR3GMT.js";
|
|
169
|
+
import "./chunk-OYDJ3C4N.js";
|
|
170
|
+
import "./chunk-HMXQKDUV.js";
|
|
171
171
|
import {
|
|
172
172
|
DEFAULT_VOTE_TIMEOUT_MS,
|
|
173
173
|
ErrorPolicySchema,
|
|
@@ -185,31 +185,31 @@ import {
|
|
|
185
185
|
toolSuccessStructured,
|
|
186
186
|
warnIfSimulatedOutsideTests,
|
|
187
187
|
wrapToolWithTimeout
|
|
188
|
-
} from "./chunk-
|
|
189
|
-
import "./chunk-
|
|
190
|
-
import "./chunk-
|
|
188
|
+
} from "./chunk-FTT2IYYX.js";
|
|
189
|
+
import "./chunk-NTLJ3INA.js";
|
|
190
|
+
import "./chunk-SBZVRH4S.js";
|
|
191
191
|
import {
|
|
192
192
|
loadPapersRegistry,
|
|
193
193
|
loadTechniquesRegistry,
|
|
194
194
|
savePapersRegistry,
|
|
195
195
|
synthesizeResearch
|
|
196
|
-
} from "./chunk-
|
|
196
|
+
} from "./chunk-2R5UUBGA.js";
|
|
197
197
|
import {
|
|
198
198
|
classifyTrust,
|
|
199
199
|
createFullGitHubProvider,
|
|
200
200
|
evaluatePolicy,
|
|
201
201
|
parsePRUrl,
|
|
202
202
|
sanitizeInput
|
|
203
|
-
} from "./chunk-
|
|
204
|
-
import "./chunk-
|
|
205
|
-
import "./chunk-
|
|
203
|
+
} from "./chunk-HJUHDPXJ.js";
|
|
204
|
+
import "./chunk-PZESEBD3.js";
|
|
205
|
+
import "./chunk-W2AIGD35.js";
|
|
206
206
|
import "./chunk-7J7PNOJQ.js";
|
|
207
207
|
import "./chunk-BQ4YXGGQ.js";
|
|
208
|
-
import "./chunk-
|
|
208
|
+
import "./chunk-TXIUCEFT.js";
|
|
209
209
|
import {
|
|
210
210
|
MemoryError,
|
|
211
211
|
shutdownToolMemory
|
|
212
|
-
} from "./chunk-
|
|
212
|
+
} from "./chunk-U7JXQSEM.js";
|
|
213
213
|
import {
|
|
214
214
|
CustomExpertDefinitionSchema,
|
|
215
215
|
DATA_SUBDIRECTORIES,
|
|
@@ -228,12 +228,12 @@ import {
|
|
|
228
228
|
loadConfig,
|
|
229
229
|
runDoctor,
|
|
230
230
|
validateNexusEnv
|
|
231
|
-
} from "./chunk-
|
|
232
|
-
import "./chunk-
|
|
233
|
-
import "./chunk-
|
|
231
|
+
} from "./chunk-S36LIUV2.js";
|
|
232
|
+
import "./chunk-GNG7URCR.js";
|
|
233
|
+
import "./chunk-WUUEKFKG.js";
|
|
234
234
|
import {
|
|
235
235
|
DEFAULTS
|
|
236
|
-
} from "./chunk-
|
|
236
|
+
} from "./chunk-SHWGK7X6.js";
|
|
237
237
|
import "./chunk-NUBSJGQZ.js";
|
|
238
238
|
import {
|
|
239
239
|
capitalize,
|
|
@@ -245,11 +245,11 @@ import {
|
|
|
245
245
|
getAvailableClis,
|
|
246
246
|
isRecord,
|
|
247
247
|
probeAllClis
|
|
248
|
-
} from "./chunk-
|
|
249
|
-
import "./chunk-
|
|
248
|
+
} from "./chunk-2SQXJQTA.js";
|
|
249
|
+
import "./chunk-QHL4KGNB.js";
|
|
250
250
|
import "./chunk-ZM4O442V.js";
|
|
251
251
|
import "./chunk-PQHVC4BD.js";
|
|
252
|
-
import "./chunk-
|
|
252
|
+
import "./chunk-HVZ52LOL.js";
|
|
253
253
|
import {
|
|
254
254
|
API_TIMEOUTS,
|
|
255
255
|
AgentCapability,
|
|
@@ -317,7 +317,7 @@ import {
|
|
|
317
317
|
validateTimeout,
|
|
318
318
|
writeEmptyLine,
|
|
319
319
|
writeLine
|
|
320
|
-
} from "./chunk-
|
|
320
|
+
} from "./chunk-7VNVDFD5.js";
|
|
321
321
|
import {
|
|
322
322
|
applyPortableMode,
|
|
323
323
|
detectSandbox,
|
|
@@ -13881,20 +13881,20 @@ function getLatestTag() {
|
|
|
13881
13881
|
return void 0;
|
|
13882
13882
|
}
|
|
13883
13883
|
}
|
|
13884
|
-
function
|
|
13884
|
+
function tryGetCommitsBetween(from, to = "HEAD") {
|
|
13885
13885
|
const SAFE_REF = /^[a-zA-Z0-9._\-/~^]+$/;
|
|
13886
|
-
if (!SAFE_REF.test(from)
|
|
13887
|
-
|
|
13888
|
-
}
|
|
13886
|
+
if (!SAFE_REF.test(from)) return { kind: "invalid_ref", ref: from };
|
|
13887
|
+
if (!SAFE_REF.test(to)) return { kind: "invalid_ref", ref: to };
|
|
13889
13888
|
try {
|
|
13890
13889
|
const result = execFileSync("git", ["log", `${from}..${to}`, "--oneline", "--format=%h %s"], {
|
|
13891
13890
|
encoding: "utf-8",
|
|
13892
13891
|
stdio: ["pipe", "pipe", "pipe"],
|
|
13893
13892
|
timeout: CLI_SUBPROCESS_TIMEOUTS.ghCommandMs
|
|
13894
13893
|
}).trim();
|
|
13895
|
-
return result ? result.split("\n").filter(Boolean) : [];
|
|
13896
|
-
} catch {
|
|
13897
|
-
|
|
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 };
|
|
13898
13898
|
}
|
|
13899
13899
|
}
|
|
13900
13900
|
function parseConventionalCommit(hash, message) {
|
|
@@ -14048,7 +14048,34 @@ async function runReleaseNotes(options = {}) {
|
|
|
14048
14048
|
if (opts.verbose) {
|
|
14049
14049
|
console.log(`${colors.dim}Analyzing commits from ${fromRef} to ${toRef}...${colors.reset}`);
|
|
14050
14050
|
}
|
|
14051
|
-
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;
|
|
14052
14079
|
if (commitLines.length === 0) {
|
|
14053
14080
|
return {
|
|
14054
14081
|
success: true,
|
|
@@ -14597,7 +14624,14 @@ function generateBlogPost(options) {
|
|
|
14597
14624
|
const highlights = options.highlights || extractHighlightsFromChangelog(options.version);
|
|
14598
14625
|
const today = (/* @__PURE__ */ new Date()).toISOString().split("T")[0] ?? (/* @__PURE__ */ new Date()).toISOString().slice(0, 10);
|
|
14599
14626
|
const fromRef = getLatestTag() || "HEAD~50";
|
|
14600
|
-
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
|
+
}
|
|
14601
14635
|
const parsedCommits = commits.map((line) => {
|
|
14602
14636
|
const spaceIndex = line.indexOf(" ");
|
|
14603
14637
|
return parseConventionalCommit(line.substring(0, spaceIndex), line.substring(spaceIndex + 1));
|
|
@@ -16536,8 +16570,8 @@ function autoGitignoreMcpConfig(workspaceDir, dryRun) {
|
|
|
16536
16570
|
if (already) return false;
|
|
16537
16571
|
}
|
|
16538
16572
|
if (!dryRun) {
|
|
16539
|
-
const
|
|
16540
|
-
appendFileSync(gitignorePath, `${
|
|
16573
|
+
const sep4 = existing.length > 0 && !existing.endsWith("\n") ? "\n" : "";
|
|
16574
|
+
appendFileSync(gitignorePath, `${sep4}${MCP_CONFIG_FILENAME}
|
|
16541
16575
|
`, "utf-8");
|
|
16542
16576
|
}
|
|
16543
16577
|
return true;
|
|
@@ -16776,8 +16810,8 @@ function maybeUpdateGitignore(workspaceDir, portableDirName, dryRun) {
|
|
|
16776
16810
|
}
|
|
16777
16811
|
}
|
|
16778
16812
|
if (!dryRun) {
|
|
16779
|
-
const
|
|
16780
|
-
appendFileSync2(gitignorePath, `${
|
|
16813
|
+
const sep4 = existing.length > 0 && !existing.endsWith("\n") ? "\n" : "";
|
|
16814
|
+
appendFileSync2(gitignorePath, `${sep4}${entry}
|
|
16781
16815
|
`, "utf-8");
|
|
16782
16816
|
}
|
|
16783
16817
|
return true;
|
|
@@ -17031,7 +17065,7 @@ async function resolveTaskInput(input) {
|
|
|
17031
17065
|
if (input.planFile !== void 0) {
|
|
17032
17066
|
const resolved = path20.resolve(input.planFile);
|
|
17033
17067
|
const cwdRoot = path20.resolve(".");
|
|
17034
|
-
if (!resolved.startsWith(cwdRoot)) {
|
|
17068
|
+
if (resolved !== cwdRoot && !resolved.startsWith(cwdRoot + path20.sep)) {
|
|
17035
17069
|
throw new Error(`Path traversal denied: planFile must be within ${cwdRoot}`);
|
|
17036
17070
|
}
|
|
17037
17071
|
try {
|
|
@@ -17325,6 +17359,27 @@ function resolveEnv(env2) {
|
|
|
17325
17359
|
}
|
|
17326
17360
|
return resolved;
|
|
17327
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
|
+
}
|
|
17328
17383
|
var UpstreamClient = class {
|
|
17329
17384
|
name;
|
|
17330
17385
|
config;
|
|
@@ -17344,15 +17399,10 @@ var UpstreamClient = class {
|
|
|
17344
17399
|
if (this.state === "connecting") return;
|
|
17345
17400
|
this.state = "connecting";
|
|
17346
17401
|
try {
|
|
17347
|
-
const resolvedEnv = resolveEnv(this.config.env);
|
|
17348
|
-
const baseEnv = {};
|
|
17349
|
-
for (const [k, v] of Object.entries(process.env)) {
|
|
17350
|
-
if (v !== void 0) baseEnv[k] = v;
|
|
17351
|
-
}
|
|
17352
17402
|
this.transport = new StdioClientTransport({
|
|
17353
17403
|
command: this.config.command,
|
|
17354
17404
|
args: [...this.config.args],
|
|
17355
|
-
env:
|
|
17405
|
+
env: buildUpstreamEnv(this.config.env)
|
|
17356
17406
|
});
|
|
17357
17407
|
this.client = new Client(
|
|
17358
17408
|
{ name: `nexus-upstream-${this.name}`, version: "1.0.0" },
|
|
@@ -17995,6 +18045,27 @@ function logFinalEventBusStats(logger18) {
|
|
|
17995
18045
|
|
|
17996
18046
|
// src/cli-orchestrator.ts
|
|
17997
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
|
+
}
|
|
17998
18069
|
function runOrchestratorRepl(options, logger18) {
|
|
17999
18070
|
return new Promise((resolve14) => {
|
|
18000
18071
|
const rl = readline2.createInterface({
|
|
@@ -18015,20 +18086,7 @@ function runOrchestratorRepl(options, logger18) {
|
|
|
18015
18086
|
rl.prompt();
|
|
18016
18087
|
return;
|
|
18017
18088
|
}
|
|
18018
|
-
void (
|
|
18019
|
-
const orchestrateOptions = {
|
|
18020
|
-
task,
|
|
18021
|
-
verbose: options.verbose,
|
|
18022
|
-
format: options.format,
|
|
18023
|
-
model: options.model,
|
|
18024
|
-
dryRun: options.dryRun,
|
|
18025
|
-
maxTokens: options.maxTokens,
|
|
18026
|
-
maxCostUsd: options.maxCostUsd
|
|
18027
|
-
};
|
|
18028
|
-
await orchestrateCommand(orchestrateOptions);
|
|
18029
|
-
process.stdout.write("\n");
|
|
18030
|
-
rl.prompt();
|
|
18031
|
-
})();
|
|
18089
|
+
void executeReplTask(task, options, logger18, rl);
|
|
18032
18090
|
});
|
|
18033
18091
|
rl.on("close", () => {
|
|
18034
18092
|
logger18.info("Orchestrator REPL closed");
|
|
@@ -19166,7 +19224,7 @@ function adaptConfigToLibrary(config) {
|
|
|
19166
19224
|
}
|
|
19167
19225
|
function createBeliefPromoter() {
|
|
19168
19226
|
return async (event) => {
|
|
19169
|
-
const { getToolMemory } = await import("./tool-memory-
|
|
19227
|
+
const { getToolMemory } = await import("./tool-memory-T7ZYIUJ2.js");
|
|
19170
19228
|
const tm = getToolMemory();
|
|
19171
19229
|
await tm.recordBelief(
|
|
19172
19230
|
`skill:${event.name}`,
|
|
@@ -19312,7 +19370,8 @@ function initializeAuditLogger(securityConfig, logger18) {
|
|
|
19312
19370
|
maxFiles: auditConfig.maxFiles,
|
|
19313
19371
|
filePrefix: "audit",
|
|
19314
19372
|
enableCompression: false,
|
|
19315
|
-
flushIntervalMs: 1e3
|
|
19373
|
+
flushIntervalMs: 1e3,
|
|
19374
|
+
maxQueueDepth: 1e4
|
|
19316
19375
|
},
|
|
19317
19376
|
void 0,
|
|
19318
19377
|
logger18
|
|
@@ -20026,7 +20085,7 @@ async function handleResearchCommand(args) {
|
|
|
20026
20085
|
}
|
|
20027
20086
|
}
|
|
20028
20087
|
async function handleRegistryCommand(args) {
|
|
20029
|
-
const { registryCommand, isValidRegistrySubcommand, formatRegistryUsage } = await import("./registry-command-
|
|
20088
|
+
const { registryCommand, isValidRegistrySubcommand, formatRegistryUsage } = await import("./registry-command-TH7U6UMC.js");
|
|
20030
20089
|
const subcommand = args.subcommand;
|
|
20031
20090
|
if (!isValidRegistrySubcommand(subcommand)) {
|
|
20032
20091
|
process.stdout.write(`${formatRegistryUsage()}
|
|
@@ -20074,7 +20133,7 @@ async function handleVerifyCommand(args) {
|
|
|
20074
20133
|
async function handleDoctorCommand(args) {
|
|
20075
20134
|
const exitCode = await doctorCommand({ fix: args.options.fix });
|
|
20076
20135
|
if (args.options.deep) {
|
|
20077
|
-
const { runDeepDiagnostics: runDeepDiagnostics2, formatDeepDiagnostics: formatDeepDiagnostics2 } = await import("./doctor-deep-
|
|
20136
|
+
const { runDeepDiagnostics: runDeepDiagnostics2, formatDeepDiagnostics: formatDeepDiagnostics2 } = await import("./doctor-deep-7YK4BZIJ.js");
|
|
20078
20137
|
const diag = runDeepDiagnostics2();
|
|
20079
20138
|
process.stdout.write(formatDeepDiagnostics2(diag) + "\n");
|
|
20080
20139
|
}
|
|
@@ -20118,7 +20177,7 @@ async function handleInitCommand(args) {
|
|
|
20118
20177
|
process.exit(result.success ? EXIT_CODES.SUCCESS : EXIT_CODES.SERVER_START_FAILED);
|
|
20119
20178
|
}
|
|
20120
20179
|
async function runInitOpencodeFlow(args) {
|
|
20121
|
-
const { runInitOpencode } = await import("./init-opencode-
|
|
20180
|
+
const { runInitOpencode } = await import("./init-opencode-QP5CAMWN.js");
|
|
20122
20181
|
const opencodePath = args.options.opencode;
|
|
20123
20182
|
if (opencodePath === void 0 || opencodePath === "") {
|
|
20124
20183
|
process.stderr.write("Error: --opencode requires a path argument.\n");
|
|
@@ -20145,7 +20204,7 @@ async function runInitOpencodeFlow(args) {
|
|
|
20145
20204
|
process.exit(EXIT_CODES.SUCCESS);
|
|
20146
20205
|
}
|
|
20147
20206
|
async function renderOpencodeValidate(opencodePath) {
|
|
20148
|
-
const { runOpencodeValidate } = await import("./init-opencode-
|
|
20207
|
+
const { runOpencodeValidate } = await import("./init-opencode-QP5CAMWN.js");
|
|
20149
20208
|
const result = await runOpencodeValidate(opencodePath);
|
|
20150
20209
|
if (!result.ok) {
|
|
20151
20210
|
process.stderr.write(`init --opencode --validate: ${result.reason ?? "failed"}
|
|
@@ -20185,7 +20244,7 @@ async function handleSetupCommandAsync(args) {
|
|
|
20185
20244
|
process.exit(exitCode === 0 ? EXIT_CODES.SUCCESS : EXIT_CODES.SERVER_START_FAILED);
|
|
20186
20245
|
}
|
|
20187
20246
|
async function runCustomApiSetup(args) {
|
|
20188
|
-
const { configureCustomApi } = await import("./setup-custom-api-
|
|
20247
|
+
const { configureCustomApi } = await import("./setup-custom-api-UOIKUQL4.js");
|
|
20189
20248
|
const baseUrl = args.options.customApi;
|
|
20190
20249
|
if (baseUrl === void 0) return EXIT_CODES.SERVER_START_FAILED;
|
|
20191
20250
|
const input = {
|