jinzd-ai-cli 0.4.337 → 0.4.338
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/{batch-GUQLUOXL.js → batch-N4DOEUEW.js} +2 -2
- package/dist/{chunk-6SFS6IJH.js → chunk-7BOHS5IX.js} +5 -0
- package/dist/{chunk-WL4NXDYT.js → chunk-ATOF545W.js} +1 -1
- package/dist/{chunk-MAUNCANT.js → chunk-DCWBDSMO.js} +2 -2
- package/dist/{chunk-EGRKGP4P.js → chunk-DOO4QAGJ.js} +2 -2
- package/dist/{chunk-HXENKVWP.js → chunk-DRCN44SZ.js} +4 -4
- package/dist/{chunk-YYO6TMOA.js → chunk-JUYK4OML.js} +1 -1
- package/dist/{chunk-5WUOBFYG.js → chunk-KGHVSYGI.js} +5 -1
- package/dist/{chunk-PWXVC6UZ.js → chunk-NJREBH6A.js} +1 -1
- package/dist/{chunk-7TU4KHMK.js → chunk-NRFAGZVJ.js} +1 -1
- package/dist/{chunk-RVB4GCSQ.js → chunk-OXVJZLJM.js} +6 -5
- package/dist/{chunk-DQBWJG32.js → chunk-PKYNCSQC.js} +58 -9
- package/dist/{chunk-56IOLQ5E.js → chunk-RIDNF4G2.js} +1 -1
- package/dist/{chunk-SSQARJMS.js → chunk-TTLLXFJC.js} +40 -3
- package/dist/{chunk-VHLZ2ZUQ.js → chunk-UWEBIOHD.js} +8 -20
- package/dist/{chunk-XF2F2V5Y.js → chunk-WQAUMAEV.js} +1 -1
- package/dist/{ci-FSMBWLMM.js → ci-HFAPFMZY.js} +6 -6
- package/dist/{ci-format-BONCHM6H.js → ci-format-QTRMHY3N.js} +2 -2
- package/dist/{constants-ARJE6QPN.js → constants-JZH2QKMQ.js} +1 -1
- package/dist/{constants-RMAQCGVM.js → constants-QJNJFMC6.js} +1 -1
- package/dist/{doctor-cli-T7D4DPWU.js → doctor-cli-FZ4IVZ6H.js} +6 -6
- package/dist/electron-server.js +113 -29
- package/dist/{hub-KCYDY3U6.js → hub-IRILXTL3.js} +1 -1
- package/dist/index.js +25 -23
- package/dist/{persistent-memory-ZO6NGZIV.js → persistent-memory-UZIZVHRT.js} +2 -2
- package/dist/{persistent-memory-3RG5Z6WK.js → persistent-memory-VRBNWOWN.js} +2 -2
- package/dist/{pr-W2PPGBYA.js → pr-4KNQWYC6.js} +7 -7
- package/dist/{run-tests-BWJEL7PA.js → run-tests-N2VKD7BU.js} +2 -2
- package/dist/{run-tests-72HGJXD4.js → run-tests-UXEOFPAW.js} +2 -2
- package/dist/{server-WTLNIO23.js → server-2VSO2ZX4.js} +6 -6
- package/dist/{server-Y3N6RMIN.js → server-HWKYWQEP.js} +21 -20
- package/dist/{task-orchestrator-QYCG7NVG.js → task-orchestrator-SC42LAFG.js} +6 -6
- package/dist/{usage-5L4ZQENO.js → usage-ZVV27BHD.js} +2 -2
- package/package.json +1 -1
|
@@ -4,12 +4,12 @@ import {
|
|
|
4
4
|
} from "./chunk-RS7SKYTS.js";
|
|
5
5
|
import {
|
|
6
6
|
ConfigManager
|
|
7
|
-
} from "./chunk-
|
|
7
|
+
} from "./chunk-KGHVSYGI.js";
|
|
8
8
|
import "./chunk-TU3L3PW7.js";
|
|
9
9
|
import {
|
|
10
10
|
atomicWriteFileSync
|
|
11
11
|
} from "./chunk-BMLQPSHP.js";
|
|
12
|
-
import "./chunk-
|
|
12
|
+
import "./chunk-NRFAGZVJ.js";
|
|
13
13
|
|
|
14
14
|
// src/cli/batch.ts
|
|
15
15
|
import Anthropic from "@anthropic-ai/sdk";
|
|
@@ -57,6 +57,11 @@ var READ_ONLY_CMDLETS = new Set([
|
|
|
57
57
|
"Out-String",
|
|
58
58
|
"Write-Output",
|
|
59
59
|
"Write-Host",
|
|
60
|
+
// Waiting is harmless on its own; chained segments still have to pass this list (v0.4.338).
|
|
61
|
+
"Start-Sleep",
|
|
62
|
+
// ls is read-only both as the PowerShell alias and as the Unix binary; models pair it with
|
|
63
|
+
// Start-Sleep to poll an output folder (2026-11-05 lecture-video run).
|
|
64
|
+
"ls",
|
|
60
65
|
"ConvertTo-Json",
|
|
61
66
|
"ConvertFrom-Json",
|
|
62
67
|
"ConvertTo-Csv",
|
|
@@ -4,7 +4,7 @@ import {
|
|
|
4
4
|
} from "./chunk-QMFMST2T.js";
|
|
5
5
|
import {
|
|
6
6
|
TEST_TIMEOUT
|
|
7
|
-
} from "./chunk-
|
|
7
|
+
} from "./chunk-ATOF545W.js";
|
|
8
8
|
|
|
9
9
|
// src/tools/builtin/run-tests.ts
|
|
10
10
|
import { spawn as spawn2 } from "child_process";
|
|
@@ -20,7 +20,7 @@ import { platform } from "os";
|
|
|
20
20
|
import { existsSync } from "fs";
|
|
21
21
|
import { spawn } from "child_process";
|
|
22
22
|
var IS_WINDOWS = platform() === "win32";
|
|
23
|
-
var WIN_UTF8_PREAMBLE = "[Console]::OutputEncoding = [System.Text.Encoding]::UTF8; $OutputEncoding = [System.Text.Encoding]::UTF8; ";
|
|
23
|
+
var WIN_UTF8_PREAMBLE = "[Console]::OutputEncoding = [System.Text.Encoding]::UTF8; $OutputEncoding = [System.Text.Encoding]::UTF8; $PSDefaultParameterValues['Get-Content:Encoding'] = 'UTF8'; ";
|
|
24
24
|
function posixShell() {
|
|
25
25
|
if (existsSync("/bin/bash")) return "/bin/bash";
|
|
26
26
|
return process.env["SHELL"] ?? "/bin/sh";
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
import {
|
|
3
3
|
TEST_TIMEOUT
|
|
4
|
-
} from "./chunk-
|
|
4
|
+
} from "./chunk-NRFAGZVJ.js";
|
|
5
5
|
import {
|
|
6
6
|
getExecutionConfigDir,
|
|
7
7
|
getExecutionSignal
|
|
@@ -35,7 +35,7 @@ import { platform } from "os";
|
|
|
35
35
|
import { existsSync } from "fs";
|
|
36
36
|
import { spawn } from "child_process";
|
|
37
37
|
var IS_WINDOWS = platform() === "win32";
|
|
38
|
-
var WIN_UTF8_PREAMBLE = "[Console]::OutputEncoding = [System.Text.Encoding]::UTF8; $OutputEncoding = [System.Text.Encoding]::UTF8; ";
|
|
38
|
+
var WIN_UTF8_PREAMBLE = "[Console]::OutputEncoding = [System.Text.Encoding]::UTF8; $OutputEncoding = [System.Text.Encoding]::UTF8; $PSDefaultParameterValues['Get-Content:Encoding'] = 'UTF8'; ";
|
|
39
39
|
function posixShell() {
|
|
40
40
|
if (existsSync("/bin/bash")) return "/bin/bash";
|
|
41
41
|
return process.env["SHELL"] ?? "/bin/sh";
|
|
@@ -8,13 +8,13 @@ import {
|
|
|
8
8
|
listHooks,
|
|
9
9
|
listInstalledPlugins,
|
|
10
10
|
resetStats
|
|
11
|
-
} from "./chunk-
|
|
11
|
+
} from "./chunk-NJREBH6A.js";
|
|
12
12
|
import {
|
|
13
13
|
ProviderRegistry
|
|
14
|
-
} from "./chunk-
|
|
14
|
+
} from "./chunk-TTLLXFJC.js";
|
|
15
15
|
import {
|
|
16
16
|
ConfigManager
|
|
17
|
-
} from "./chunk-
|
|
17
|
+
} from "./chunk-KGHVSYGI.js";
|
|
18
18
|
import {
|
|
19
19
|
getGitRoot
|
|
20
20
|
} from "./chunk-HOSJZMQS.js";
|
|
@@ -26,7 +26,7 @@ import {
|
|
|
26
26
|
MCP_PROJECT_CONFIG_NAME,
|
|
27
27
|
MEMORY_FILE_NAME,
|
|
28
28
|
VERSION
|
|
29
|
-
} from "./chunk-
|
|
29
|
+
} from "./chunk-NRFAGZVJ.js";
|
|
30
30
|
|
|
31
31
|
// src/diagnostics/doctor-report.ts
|
|
32
32
|
import { existsSync as existsSync3, statSync as statSync2 } from "fs";
|
|
@@ -12,7 +12,7 @@ import {
|
|
|
12
12
|
MEMORY_FILE_NAME,
|
|
13
13
|
MEMORY_MAX_CHARS,
|
|
14
14
|
MEMORY_STORE_FILE_NAME
|
|
15
|
-
} from "./chunk-
|
|
15
|
+
} from "./chunk-ATOF545W.js";
|
|
16
16
|
|
|
17
17
|
// src/memory/persistent-memory.ts
|
|
18
18
|
import { copyFileSync, existsSync, mkdirSync, readFileSync, statSync } from "fs";
|
|
@@ -11,7 +11,7 @@ import {
|
|
|
11
11
|
CONFIG_FILE_NAME,
|
|
12
12
|
HISTORY_DIR_NAME,
|
|
13
13
|
PLUGINS_DIR_NAME
|
|
14
|
-
} from "./chunk-
|
|
14
|
+
} from "./chunk-NRFAGZVJ.js";
|
|
15
15
|
|
|
16
16
|
// src/config/config-manager.ts
|
|
17
17
|
import { readFileSync, existsSync, mkdirSync } from "fs";
|
|
@@ -88,6 +88,10 @@ var ConfigSchema = z.object({
|
|
|
88
88
|
// 例:http://127.0.0.1:10809
|
|
89
89
|
// 也可通过环境变量 HTTPS_PROXY / HTTP_PROXY 覆盖
|
|
90
90
|
proxy: z.string().max(500).optional(),
|
|
91
|
+
// 不走代理的 API 主机(后缀匹配,如 "deepseek.com" 也覆盖 api.deepseek.com;"*" = 全部直连)。
|
|
92
|
+
// 不填 = 内置国内模型清单(DeepSeek/智谱/Kimi/Qwen/MiniMax 直连,见 core/proxy.ts);
|
|
93
|
+
// 填 [] = 所有 Provider 都走代理(公司网络只能经代理出网时用)。
|
|
94
|
+
noProxy: z.array(z.string().max(200)).max(100).optional(),
|
|
91
95
|
// 自定义 Provider 列表(OpenAI 兼容接口,无需改代码)
|
|
92
96
|
customProviders: z.array(CustomProviderConfigSchema).default([]),
|
|
93
97
|
// 按模型 ID 存储的推理参数(key 为模型 ID,如 "deepseek-chat")
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
import {
|
|
3
3
|
evaluateCiGate,
|
|
4
4
|
normalizeCiThresholds
|
|
5
|
-
} from "./chunk-
|
|
5
|
+
} from "./chunk-RIDNF4G2.js";
|
|
6
6
|
import {
|
|
7
7
|
buildReviewPrompt,
|
|
8
8
|
buildSecurityReviewPrompt,
|
|
@@ -13,13 +13,13 @@ import {
|
|
|
13
13
|
} from "./chunk-6YZEZFX5.js";
|
|
14
14
|
import {
|
|
15
15
|
ProviderRegistry
|
|
16
|
-
} from "./chunk-
|
|
16
|
+
} from "./chunk-TTLLXFJC.js";
|
|
17
17
|
import {
|
|
18
18
|
ConfigManager
|
|
19
|
-
} from "./chunk-
|
|
19
|
+
} from "./chunk-KGHVSYGI.js";
|
|
20
20
|
import {
|
|
21
21
|
VERSION
|
|
22
|
-
} from "./chunk-
|
|
22
|
+
} from "./chunk-NRFAGZVJ.js";
|
|
23
23
|
|
|
24
24
|
// src/cli/ci.ts
|
|
25
25
|
import { execFileSync } from "child_process";
|
|
@@ -161,7 +161,8 @@ async function runCi(opts) {
|
|
|
161
161
|
(id) => ({
|
|
162
162
|
baseUrl: config.get("customBaseUrls")[id],
|
|
163
163
|
timeout: config.get("timeouts")[id],
|
|
164
|
-
proxy: config.get("proxy")
|
|
164
|
+
proxy: config.get("proxy"),
|
|
165
|
+
noProxy: config.get("noProxy")
|
|
165
166
|
}),
|
|
166
167
|
config.get("customProviders"),
|
|
167
168
|
config.getConfigDir()
|
|
@@ -11,7 +11,7 @@ import {
|
|
|
11
11
|
searchPersistentMemories,
|
|
12
12
|
touchMemoryReferences,
|
|
13
13
|
updateMemoryEntry
|
|
14
|
-
} from "./chunk-
|
|
14
|
+
} from "./chunk-WQAUMAEV.js";
|
|
15
15
|
import {
|
|
16
16
|
indexProject
|
|
17
17
|
} from "./chunk-RWRZVQCB.js";
|
|
@@ -30,11 +30,11 @@ import {
|
|
|
30
30
|
runHook,
|
|
31
31
|
runLifecycleHooks,
|
|
32
32
|
runTool
|
|
33
|
-
} from "./chunk-
|
|
33
|
+
} from "./chunk-NJREBH6A.js";
|
|
34
34
|
import {
|
|
35
35
|
getDangerLevel,
|
|
36
36
|
isFileWriteTool
|
|
37
|
-
} from "./chunk-
|
|
37
|
+
} from "./chunk-7BOHS5IX.js";
|
|
38
38
|
import {
|
|
39
39
|
buildTruncatedArgumentsError,
|
|
40
40
|
runLeanAgentLoop
|
|
@@ -66,7 +66,7 @@ import {
|
|
|
66
66
|
recoverGbkMojibake,
|
|
67
67
|
runTestsTool,
|
|
68
68
|
shellInvocation
|
|
69
|
-
} from "./chunk-
|
|
69
|
+
} from "./chunk-DOO4QAGJ.js";
|
|
70
70
|
import {
|
|
71
71
|
CONFIG_DIR_NAME,
|
|
72
72
|
DEFAULT_MAX_TOOL_OUTPUT_CHARS_CAP,
|
|
@@ -75,7 +75,7 @@ import {
|
|
|
75
75
|
SUBAGENT_ALLOWED_TOOLS,
|
|
76
76
|
SUBAGENT_DEFAULT_MAX_ROUNDS,
|
|
77
77
|
SUBAGENT_MAX_ROUNDS_LIMIT
|
|
78
|
-
} from "./chunk-
|
|
78
|
+
} from "./chunk-NRFAGZVJ.js";
|
|
79
79
|
import {
|
|
80
80
|
getCurrentSessionKey,
|
|
81
81
|
getExecutionConfigDir,
|
|
@@ -6245,26 +6245,75 @@ var taskCreateTool = {
|
|
|
6245
6245
|
ID: ${task.id}
|
|
6246
6246
|
Command: ${command}
|
|
6247
6247
|
Description: ${description}
|
|
6248
|
-
Use task_list to check status, task_stop to terminate.`;
|
|
6248
|
+
Use task_list to check status (task_list with id + wait_seconds waits for it to finish \u2014 no bash sleep needed), task_stop to terminate.`;
|
|
6249
6249
|
}
|
|
6250
6250
|
};
|
|
6251
6251
|
|
|
6252
6252
|
// src/tools/builtin/task-list.ts
|
|
6253
|
+
var MAX_TASK_WAIT_SECONDS = 300;
|
|
6254
|
+
var POLL_MS = 200;
|
|
6255
|
+
async function waitForTasks(id, seconds) {
|
|
6256
|
+
const isRunning = (taskId) => getTaskOutput(taskId)?.status === "running";
|
|
6257
|
+
const watched = id ? [id] : listTasks().filter((t) => t.status === "running").map((t) => t.id);
|
|
6258
|
+
if (!watched.some(isRunning)) return "nothing-running";
|
|
6259
|
+
const signal = currentAbortSignal();
|
|
6260
|
+
const deadline = Date.now() + seconds * 1e3;
|
|
6261
|
+
for (; ; ) {
|
|
6262
|
+
if (signal.aborted) return "interrupted";
|
|
6263
|
+
if (!watched.every(isRunning)) return "finished";
|
|
6264
|
+
const left = deadline - Date.now();
|
|
6265
|
+
if (left <= 0) return "timeout";
|
|
6266
|
+
await new Promise((resolve7) => {
|
|
6267
|
+
const timer = setTimeout(done, Math.min(POLL_MS, left));
|
|
6268
|
+
function done() {
|
|
6269
|
+
clearTimeout(timer);
|
|
6270
|
+
signal.removeEventListener("abort", done);
|
|
6271
|
+
resolve7();
|
|
6272
|
+
}
|
|
6273
|
+
signal.addEventListener("abort", done, { once: true });
|
|
6274
|
+
});
|
|
6275
|
+
}
|
|
6276
|
+
}
|
|
6277
|
+
function parseWaitSeconds(raw) {
|
|
6278
|
+
const n = Number(raw);
|
|
6279
|
+
if (raw === void 0 || raw === null || raw === "" || !Number.isFinite(n) || n <= 0) {
|
|
6280
|
+
return { seconds: 0, clamped: false };
|
|
6281
|
+
}
|
|
6282
|
+
return n > MAX_TASK_WAIT_SECONDS ? { seconds: MAX_TASK_WAIT_SECONDS, clamped: true } : { seconds: n, clamped: false };
|
|
6283
|
+
}
|
|
6253
6284
|
var taskListTool = {
|
|
6254
6285
|
definition: {
|
|
6255
6286
|
name: "task_list",
|
|
6256
|
-
description: `List all background tasks with their status. Provide an ID to get detailed output for a specific task.`,
|
|
6287
|
+
description: `List all background tasks with their status. Provide an ID to get detailed output for a specific task. To wait for a background task, pass wait_seconds (max ${MAX_TASK_WAIT_SECONDS}) instead of polling with bash sleep: the call returns as soon as the task (or, without an id, any running task) finishes.`,
|
|
6257
6288
|
parameters: {
|
|
6258
6289
|
id: {
|
|
6259
6290
|
type: "string",
|
|
6260
6291
|
description: "Optional: specific task ID to get detailed stdout/stderr output",
|
|
6261
6292
|
required: false
|
|
6293
|
+
},
|
|
6294
|
+
wait_seconds: {
|
|
6295
|
+
type: "number",
|
|
6296
|
+
description: `Optional: wait up to this many seconds (max ${MAX_TASK_WAIT_SECONDS}) for the task with this id \u2014 or, without id, for any running task \u2014 to finish, then report. Returns early on completion.`,
|
|
6297
|
+
required: false
|
|
6262
6298
|
}
|
|
6263
6299
|
},
|
|
6264
6300
|
dangerous: false
|
|
6265
6301
|
},
|
|
6266
6302
|
async execute(args) {
|
|
6267
6303
|
const id = args["id"] ? String(args["id"]) : void 0;
|
|
6304
|
+
const { seconds, clamped } = parseWaitSeconds(args["wait_seconds"]);
|
|
6305
|
+
let note = "";
|
|
6306
|
+
if (seconds > 0) {
|
|
6307
|
+
const started = Date.now();
|
|
6308
|
+
const outcome = await waitForTasks(id, seconds);
|
|
6309
|
+
const waited = ((Date.now() - started) / 1e3).toFixed(1);
|
|
6310
|
+
if (outcome === "timeout") note = `(waited ${waited}s; still running \u2014 call again with wait_seconds to keep waiting)`;
|
|
6311
|
+
else if (outcome === "finished") note = `(waited ${waited}s; task finished)`;
|
|
6312
|
+
else if (outcome === "interrupted") note = `(wait interrupted by user after ${waited}s)`;
|
|
6313
|
+
if (clamped) note += `${note ? " " : ""}(wait_seconds capped at ${MAX_TASK_WAIT_SECONDS})`;
|
|
6314
|
+
}
|
|
6315
|
+
const withNote = (body) => note ? `${note}
|
|
6316
|
+
${body}` : body;
|
|
6268
6317
|
if (id) {
|
|
6269
6318
|
const output = getTaskOutput(id);
|
|
6270
6319
|
if (!output) return `Task not found: ${id}`;
|
|
@@ -6276,7 +6325,7 @@ ${output.stdout}`);
|
|
|
6276
6325
|
\u2500\u2500 stderr \u2500\u2500
|
|
6277
6326
|
${output.stderr}`);
|
|
6278
6327
|
if (!output.stdout && !output.stderr) parts.push("\n(no output yet)");
|
|
6279
|
-
return parts.join("");
|
|
6328
|
+
return withNote(parts.join(""));
|
|
6280
6329
|
}
|
|
6281
6330
|
const all = listTasks();
|
|
6282
6331
|
if (all.length === 0) return "No background tasks.";
|
|
@@ -6288,7 +6337,7 @@ ${output.stderr}`);
|
|
|
6288
6337
|
lines.push(` [${t.id}] ${status} (${elapsed.toFixed(1)}s) \u2014 ${t.description}`);
|
|
6289
6338
|
if (t.exitCode !== null) lines.push(` exit code: ${t.exitCode}`);
|
|
6290
6339
|
}
|
|
6291
|
-
return lines.join("\n");
|
|
6340
|
+
return withNote(lines.join("\n"));
|
|
6292
6341
|
}
|
|
6293
6342
|
};
|
|
6294
6343
|
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
import {
|
|
3
3
|
schemaToJsonSchema
|
|
4
|
-
} from "./chunk-
|
|
4
|
+
} from "./chunk-7BOHS5IX.js";
|
|
5
5
|
import {
|
|
6
6
|
detectsHallucinatedFileOp,
|
|
7
7
|
parseToolCallArguments
|
|
@@ -17,7 +17,42 @@ import {
|
|
|
17
17
|
} from "./chunk-BMLQPSHP.js";
|
|
18
18
|
import {
|
|
19
19
|
DEFAULT_MAX_TOKENS
|
|
20
|
-
} from "./chunk-
|
|
20
|
+
} from "./chunk-NRFAGZVJ.js";
|
|
21
|
+
|
|
22
|
+
// src/core/proxy.ts
|
|
23
|
+
var DEFAULT_NO_PROXY_HOSTS = [
|
|
24
|
+
"deepseek.com",
|
|
25
|
+
"bigmodel.cn",
|
|
26
|
+
"moonshot.cn",
|
|
27
|
+
"moonshot.ai",
|
|
28
|
+
"aliyuncs.com",
|
|
29
|
+
"minimaxi.com"
|
|
30
|
+
];
|
|
31
|
+
function shouldBypassProxy(baseUrl, noProxy = DEFAULT_NO_PROXY_HOSTS) {
|
|
32
|
+
if (!baseUrl) return false;
|
|
33
|
+
let host;
|
|
34
|
+
try {
|
|
35
|
+
host = new URL(baseUrl).hostname.toLowerCase();
|
|
36
|
+
} catch {
|
|
37
|
+
return false;
|
|
38
|
+
}
|
|
39
|
+
if (!host) return false;
|
|
40
|
+
return noProxy.some((raw) => {
|
|
41
|
+
const entry = raw.trim().toLowerCase().replace(/^\*?\./, "");
|
|
42
|
+
if (!entry) return false;
|
|
43
|
+
if (entry === "*") return true;
|
|
44
|
+
return host === entry || host.endsWith("." + entry);
|
|
45
|
+
});
|
|
46
|
+
}
|
|
47
|
+
async function setupProxy(configProxy) {
|
|
48
|
+
const proxyUrl = process.env.HTTPS_PROXY ?? process.env.HTTP_PROXY ?? process.env.https_proxy ?? process.env.http_proxy ?? configProxy;
|
|
49
|
+
if (!proxyUrl) return;
|
|
50
|
+
try {
|
|
51
|
+
const { ProxyAgent, setGlobalDispatcher } = await import("undici");
|
|
52
|
+
setGlobalDispatcher(new ProxyAgent({ uri: proxyUrl }));
|
|
53
|
+
} catch {
|
|
54
|
+
}
|
|
55
|
+
}
|
|
21
56
|
|
|
22
57
|
// src/providers/claude.ts
|
|
23
58
|
import Anthropic from "@anthropic-ai/sdk";
|
|
@@ -1156,7 +1191,8 @@ var OpenAICompatibleProvider = class extends BaseProvider {
|
|
|
1156
1191
|
timeout: this.defaultTimeout,
|
|
1157
1192
|
maxRetries
|
|
1158
1193
|
};
|
|
1159
|
-
const
|
|
1194
|
+
const noProxy = Array.isArray(options?.noProxy) ? options.noProxy : DEFAULT_NO_PROXY_HOSTS;
|
|
1195
|
+
const proxyUrl = isLoopbackBaseUrl(clientOptions.baseURL) || shouldBypassProxy(clientOptions.baseURL, noProxy) ? void 0 : options?.proxy;
|
|
1160
1196
|
try {
|
|
1161
1197
|
const { Agent, ProxyAgent, fetch: undiciFetch } = await import("undici");
|
|
1162
1198
|
const STREAM_BODY_TIMEOUT = 30 * 60 * 1e3;
|
|
@@ -2736,6 +2772,7 @@ var ProviderRegistry = class {
|
|
|
2736
2772
|
};
|
|
2737
2773
|
|
|
2738
2774
|
export {
|
|
2775
|
+
setupProxy,
|
|
2739
2776
|
listBuiltInProviderMetadata,
|
|
2740
2777
|
ProviderRegistry
|
|
2741
2778
|
};
|
|
@@ -16,7 +16,7 @@ import {
|
|
|
16
16
|
setPreferredAgentName,
|
|
17
17
|
truncateForPersist,
|
|
18
18
|
undoStack
|
|
19
|
-
} from "./chunk-
|
|
19
|
+
} from "./chunk-PKYNCSQC.js";
|
|
20
20
|
import {
|
|
21
21
|
buildReviewPrompt,
|
|
22
22
|
buildSecurityReviewPrompt
|
|
@@ -51,7 +51,7 @@ import {
|
|
|
51
51
|
touchMemoryReferences,
|
|
52
52
|
updateMemoryApproval,
|
|
53
53
|
updateMemoryEntry
|
|
54
|
-
} from "./chunk-
|
|
54
|
+
} from "./chunk-WQAUMAEV.js";
|
|
55
55
|
import {
|
|
56
56
|
theme
|
|
57
57
|
} from "./chunk-5C76XDDF.js";
|
|
@@ -65,7 +65,7 @@ import {
|
|
|
65
65
|
import {
|
|
66
66
|
buildDoctorReport,
|
|
67
67
|
formatDoctorReport
|
|
68
|
-
} from "./chunk-
|
|
68
|
+
} from "./chunk-DRCN44SZ.js";
|
|
69
69
|
import {
|
|
70
70
|
describePlugin,
|
|
71
71
|
getActivePluginAssets,
|
|
@@ -80,7 +80,7 @@ import {
|
|
|
80
80
|
trustHook,
|
|
81
81
|
trustPlugin,
|
|
82
82
|
untrustHook
|
|
83
|
-
} from "./chunk-
|
|
83
|
+
} from "./chunk-NJREBH6A.js";
|
|
84
84
|
import {
|
|
85
85
|
isCleanDocumentBody,
|
|
86
86
|
stripOuterCodeFence
|
|
@@ -109,7 +109,7 @@ import {
|
|
|
109
109
|
MCP_TOOL_PREFIX,
|
|
110
110
|
REPO_URL,
|
|
111
111
|
VERSION
|
|
112
|
-
} from "./chunk-
|
|
112
|
+
} from "./chunk-NRFAGZVJ.js";
|
|
113
113
|
|
|
114
114
|
// src/skills/manager.ts
|
|
115
115
|
import { existsSync, readdirSync, mkdirSync, statSync } from "fs";
|
|
@@ -832,17 +832,6 @@ var McpManager = class {
|
|
|
832
832
|
}
|
|
833
833
|
};
|
|
834
834
|
|
|
835
|
-
// src/core/proxy.ts
|
|
836
|
-
async function setupProxy(configProxy) {
|
|
837
|
-
const proxyUrl = process.env.HTTPS_PROXY ?? process.env.HTTP_PROXY ?? process.env.https_proxy ?? process.env.http_proxy ?? configProxy;
|
|
838
|
-
if (!proxyUrl) return;
|
|
839
|
-
try {
|
|
840
|
-
const { ProxyAgent, setGlobalDispatcher } = await import("undici");
|
|
841
|
-
setGlobalDispatcher(new ProxyAgent({ uri: proxyUrl }));
|
|
842
|
-
} catch {
|
|
843
|
-
}
|
|
844
|
-
}
|
|
845
|
-
|
|
846
835
|
// src/repl/commands/project-init.ts
|
|
847
836
|
import { existsSync as existsSync2, readFileSync as readFileSync2, readdirSync as readdirSync2, statSync as statSync2 } from "fs";
|
|
848
837
|
import { join as join2 } from "path";
|
|
@@ -2445,7 +2434,7 @@ No tools match "${filter}".
|
|
|
2445
2434
|
const { join: join6 } = await import("path");
|
|
2446
2435
|
const { existsSync: existsSync6 } = await import("fs");
|
|
2447
2436
|
const { getGitRoot } = await import("./git-context-EXOEHQSF.js");
|
|
2448
|
-
const { MCP_PROJECT_CONFIG_NAME } = await import("./constants-
|
|
2437
|
+
const { MCP_PROJECT_CONFIG_NAME } = await import("./constants-QJNJFMC6.js");
|
|
2449
2438
|
const { approveProject, hashMcpFile } = await import("./project-trust-KGG2BWKC.js");
|
|
2450
2439
|
const cwd = process.cwd();
|
|
2451
2440
|
const projectRoot = getGitRoot(cwd) ?? cwd;
|
|
@@ -3553,7 +3542,7 @@ function createReviewCommands() {
|
|
|
3553
3542
|
usage: "/test [command|filter]",
|
|
3554
3543
|
async execute(args, ctx) {
|
|
3555
3544
|
try {
|
|
3556
|
-
const { executeTests } = await import("./run-tests-
|
|
3545
|
+
const { executeTests } = await import("./run-tests-N2VKD7BU.js");
|
|
3557
3546
|
const argStr = args.join(" ").trim();
|
|
3558
3547
|
let testArgs = {};
|
|
3559
3548
|
if (argStr) {
|
|
@@ -5737,6 +5726,5 @@ export {
|
|
|
5737
5726
|
McpManager,
|
|
5738
5727
|
snapshotFile,
|
|
5739
5728
|
armDeferredSave,
|
|
5740
|
-
decideDeferredSave
|
|
5741
|
-
setupProxy
|
|
5729
|
+
decideDeferredSave
|
|
5742
5730
|
};
|
|
@@ -13,7 +13,7 @@ import {
|
|
|
13
13
|
MEMORY_FILE_NAME,
|
|
14
14
|
MEMORY_MAX_CHARS,
|
|
15
15
|
MEMORY_STORE_FILE_NAME
|
|
16
|
-
} from "./chunk-
|
|
16
|
+
} from "./chunk-NRFAGZVJ.js";
|
|
17
17
|
|
|
18
18
|
// src/memory/persistent-memory.ts
|
|
19
19
|
import { copyFileSync, existsSync, mkdirSync, readFileSync, statSync } from "fs";
|
|
@@ -3,17 +3,17 @@ import {
|
|
|
3
3
|
CI_COMMENT_MARKER,
|
|
4
4
|
countSeverity,
|
|
5
5
|
runCi
|
|
6
|
-
} from "./chunk-
|
|
7
|
-
import "./chunk-
|
|
6
|
+
} from "./chunk-OXVJZLJM.js";
|
|
7
|
+
import "./chunk-RIDNF4G2.js";
|
|
8
8
|
import "./chunk-HLWUDRBO.js";
|
|
9
9
|
import "./chunk-6YZEZFX5.js";
|
|
10
|
-
import "./chunk-
|
|
11
|
-
import "./chunk-
|
|
12
|
-
import "./chunk-
|
|
10
|
+
import "./chunk-TTLLXFJC.js";
|
|
11
|
+
import "./chunk-KGHVSYGI.js";
|
|
12
|
+
import "./chunk-7BOHS5IX.js";
|
|
13
13
|
import "./chunk-C6GA7H5D.js";
|
|
14
14
|
import "./chunk-TU3L3PW7.js";
|
|
15
15
|
import "./chunk-BMLQPSHP.js";
|
|
16
|
-
import "./chunk-
|
|
16
|
+
import "./chunk-NRFAGZVJ.js";
|
|
17
17
|
export {
|
|
18
18
|
CI_COMMENT_MARKER,
|
|
19
19
|
countSeverity,
|
|
@@ -2,17 +2,17 @@
|
|
|
2
2
|
import {
|
|
3
3
|
formatDoctorReport,
|
|
4
4
|
runDoctorCli
|
|
5
|
-
} from "./chunk-
|
|
6
|
-
import "./chunk-
|
|
5
|
+
} from "./chunk-DRCN44SZ.js";
|
|
6
|
+
import "./chunk-NJREBH6A.js";
|
|
7
7
|
import "./chunk-RS7SKYTS.js";
|
|
8
|
-
import "./chunk-
|
|
9
|
-
import "./chunk-
|
|
10
|
-
import "./chunk-
|
|
8
|
+
import "./chunk-TTLLXFJC.js";
|
|
9
|
+
import "./chunk-KGHVSYGI.js";
|
|
10
|
+
import "./chunk-7BOHS5IX.js";
|
|
11
11
|
import "./chunk-C6GA7H5D.js";
|
|
12
12
|
import "./chunk-TU3L3PW7.js";
|
|
13
13
|
import "./chunk-HOSJZMQS.js";
|
|
14
14
|
import "./chunk-BMLQPSHP.js";
|
|
15
|
-
import "./chunk-
|
|
15
|
+
import "./chunk-NRFAGZVJ.js";
|
|
16
16
|
export {
|
|
17
17
|
formatDoctorReport,
|
|
18
18
|
runDoctorCli
|