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
package/dist/electron-server.js
CHANGED
|
@@ -55,7 +55,7 @@ import {
|
|
|
55
55
|
touchMemoryReferences,
|
|
56
56
|
updateMemoryApproval,
|
|
57
57
|
updateMemoryEntry
|
|
58
|
-
} from "./chunk-
|
|
58
|
+
} from "./chunk-JUYK4OML.js";
|
|
59
59
|
import {
|
|
60
60
|
DEFAULT_PATTERNS,
|
|
61
61
|
redactJson,
|
|
@@ -81,7 +81,7 @@ import {
|
|
|
81
81
|
recoverGbkMojibake,
|
|
82
82
|
runTestsTool,
|
|
83
83
|
shellInvocation
|
|
84
|
-
} from "./chunk-
|
|
84
|
+
} from "./chunk-DCWBDSMO.js";
|
|
85
85
|
import {
|
|
86
86
|
getCurrentSessionKey,
|
|
87
87
|
getExecutionConfigDir,
|
|
@@ -123,7 +123,7 @@ import {
|
|
|
123
123
|
SUBAGENT_MAX_ROUNDS_LIMIT,
|
|
124
124
|
VERSION,
|
|
125
125
|
buildUserIdentityPrompt
|
|
126
|
-
} from "./chunk-
|
|
126
|
+
} from "./chunk-ATOF545W.js";
|
|
127
127
|
|
|
128
128
|
// src/web/access.ts
|
|
129
129
|
import { randomBytes, timingSafeEqual } from "crypto";
|
|
@@ -284,6 +284,10 @@ var ConfigSchema = z.object({
|
|
|
284
284
|
// 例:http://127.0.0.1:10809
|
|
285
285
|
// 也可通过环境变量 HTTPS_PROXY / HTTP_PROXY 覆盖
|
|
286
286
|
proxy: z.string().max(500).optional(),
|
|
287
|
+
// 不走代理的 API 主机(后缀匹配,如 "deepseek.com" 也覆盖 api.deepseek.com;"*" = 全部直连)。
|
|
288
|
+
// 不填 = 内置国内模型清单(DeepSeek/智谱/Kimi/Qwen/MiniMax 直连,见 core/proxy.ts);
|
|
289
|
+
// 填 [] = 所有 Provider 都走代理(公司网络只能经代理出网时用)。
|
|
290
|
+
noProxy: z.array(z.string().max(200)).max(100).optional(),
|
|
287
291
|
// 自定义 Provider 列表(OpenAI 兼容接口,无需改代码)
|
|
288
292
|
customProviders: z.array(CustomProviderConfigSchema).default([]),
|
|
289
293
|
// 按模型 ID 存储的推理参数(key 为模型 ID,如 "deepseek-chat")
|
|
@@ -1532,6 +1536,11 @@ var READ_ONLY_CMDLETS = new Set([
|
|
|
1532
1536
|
"Out-String",
|
|
1533
1537
|
"Write-Output",
|
|
1534
1538
|
"Write-Host",
|
|
1539
|
+
// Waiting is harmless on its own; chained segments still have to pass this list (v0.4.338).
|
|
1540
|
+
"Start-Sleep",
|
|
1541
|
+
// ls is read-only both as the PowerShell alias and as the Unix binary; models pair it with
|
|
1542
|
+
// Start-Sleep to poll an output folder (2026-11-05 lecture-video run).
|
|
1543
|
+
"ls",
|
|
1535
1544
|
"ConvertTo-Json",
|
|
1536
1545
|
"ConvertFrom-Json",
|
|
1537
1546
|
"ConvertTo-Csv",
|
|
@@ -2635,6 +2644,41 @@ function readReasoningContent(message) {
|
|
|
2635
2644
|
return typeof value === "string" ? value : void 0;
|
|
2636
2645
|
}
|
|
2637
2646
|
|
|
2647
|
+
// src/core/proxy.ts
|
|
2648
|
+
var DEFAULT_NO_PROXY_HOSTS = [
|
|
2649
|
+
"deepseek.com",
|
|
2650
|
+
"bigmodel.cn",
|
|
2651
|
+
"moonshot.cn",
|
|
2652
|
+
"moonshot.ai",
|
|
2653
|
+
"aliyuncs.com",
|
|
2654
|
+
"minimaxi.com"
|
|
2655
|
+
];
|
|
2656
|
+
function shouldBypassProxy(baseUrl, noProxy = DEFAULT_NO_PROXY_HOSTS) {
|
|
2657
|
+
if (!baseUrl) return false;
|
|
2658
|
+
let host;
|
|
2659
|
+
try {
|
|
2660
|
+
host = new URL(baseUrl).hostname.toLowerCase();
|
|
2661
|
+
} catch {
|
|
2662
|
+
return false;
|
|
2663
|
+
}
|
|
2664
|
+
if (!host) return false;
|
|
2665
|
+
return noProxy.some((raw) => {
|
|
2666
|
+
const entry = raw.trim().toLowerCase().replace(/^\*?\./, "");
|
|
2667
|
+
if (!entry) return false;
|
|
2668
|
+
if (entry === "*") return true;
|
|
2669
|
+
return host === entry || host.endsWith("." + entry);
|
|
2670
|
+
});
|
|
2671
|
+
}
|
|
2672
|
+
async function setupProxy(configProxy) {
|
|
2673
|
+
const proxyUrl = process.env.HTTPS_PROXY ?? process.env.HTTP_PROXY ?? process.env.https_proxy ?? process.env.http_proxy ?? configProxy;
|
|
2674
|
+
if (!proxyUrl) return;
|
|
2675
|
+
try {
|
|
2676
|
+
const { ProxyAgent, setGlobalDispatcher } = await import("undici");
|
|
2677
|
+
setGlobalDispatcher(new ProxyAgent({ uri: proxyUrl }));
|
|
2678
|
+
} catch {
|
|
2679
|
+
}
|
|
2680
|
+
}
|
|
2681
|
+
|
|
2638
2682
|
// src/tools/hallucination.ts
|
|
2639
2683
|
var HALLUCINATION_PATTERNS = [
|
|
2640
2684
|
/文件路径[::]\s*`?[^\s`]+\.\w{1,5}/,
|
|
@@ -3968,7 +4012,8 @@ var OpenAICompatibleProvider = class extends BaseProvider {
|
|
|
3968
4012
|
timeout: this.defaultTimeout,
|
|
3969
4013
|
maxRetries
|
|
3970
4014
|
};
|
|
3971
|
-
const
|
|
4015
|
+
const noProxy = Array.isArray(options?.noProxy) ? options.noProxy : DEFAULT_NO_PROXY_HOSTS;
|
|
4016
|
+
const proxyUrl = isLoopbackBaseUrl(clientOptions.baseURL) || shouldBypassProxy(clientOptions.baseURL, noProxy) ? void 0 : options?.proxy;
|
|
3972
4017
|
try {
|
|
3973
4018
|
const { Agent: Agent2, ProxyAgent, fetch: undiciFetch } = await import("undici");
|
|
3974
4019
|
const STREAM_BODY_TIMEOUT = 30 * 60 * 1e3;
|
|
@@ -13157,26 +13202,75 @@ var taskCreateTool = {
|
|
|
13157
13202
|
ID: ${task.id}
|
|
13158
13203
|
Command: ${command}
|
|
13159
13204
|
Description: ${description}
|
|
13160
|
-
Use task_list to check status, task_stop to terminate.`;
|
|
13205
|
+
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.`;
|
|
13161
13206
|
}
|
|
13162
13207
|
};
|
|
13163
13208
|
|
|
13164
13209
|
// src/tools/builtin/task-list.ts
|
|
13210
|
+
var MAX_TASK_WAIT_SECONDS = 300;
|
|
13211
|
+
var POLL_MS = 200;
|
|
13212
|
+
async function waitForTasks(id, seconds) {
|
|
13213
|
+
const isRunning = (taskId) => getTaskOutput(taskId)?.status === "running";
|
|
13214
|
+
const watched = id ? [id] : listTasks().filter((t) => t.status === "running").map((t) => t.id);
|
|
13215
|
+
if (!watched.some(isRunning)) return "nothing-running";
|
|
13216
|
+
const signal = currentAbortSignal();
|
|
13217
|
+
const deadline = Date.now() + seconds * 1e3;
|
|
13218
|
+
for (; ; ) {
|
|
13219
|
+
if (signal.aborted) return "interrupted";
|
|
13220
|
+
if (!watched.every(isRunning)) return "finished";
|
|
13221
|
+
const left = deadline - Date.now();
|
|
13222
|
+
if (left <= 0) return "timeout";
|
|
13223
|
+
await new Promise((resolve13) => {
|
|
13224
|
+
const timer = setTimeout(done, Math.min(POLL_MS, left));
|
|
13225
|
+
function done() {
|
|
13226
|
+
clearTimeout(timer);
|
|
13227
|
+
signal.removeEventListener("abort", done);
|
|
13228
|
+
resolve13();
|
|
13229
|
+
}
|
|
13230
|
+
signal.addEventListener("abort", done, { once: true });
|
|
13231
|
+
});
|
|
13232
|
+
}
|
|
13233
|
+
}
|
|
13234
|
+
function parseWaitSeconds(raw) {
|
|
13235
|
+
const n = Number(raw);
|
|
13236
|
+
if (raw === void 0 || raw === null || raw === "" || !Number.isFinite(n) || n <= 0) {
|
|
13237
|
+
return { seconds: 0, clamped: false };
|
|
13238
|
+
}
|
|
13239
|
+
return n > MAX_TASK_WAIT_SECONDS ? { seconds: MAX_TASK_WAIT_SECONDS, clamped: true } : { seconds: n, clamped: false };
|
|
13240
|
+
}
|
|
13165
13241
|
var taskListTool = {
|
|
13166
13242
|
definition: {
|
|
13167
13243
|
name: "task_list",
|
|
13168
|
-
description: `List all background tasks with their status. Provide an ID to get detailed output for a specific task.`,
|
|
13244
|
+
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.`,
|
|
13169
13245
|
parameters: {
|
|
13170
13246
|
id: {
|
|
13171
13247
|
type: "string",
|
|
13172
13248
|
description: "Optional: specific task ID to get detailed stdout/stderr output",
|
|
13173
13249
|
required: false
|
|
13250
|
+
},
|
|
13251
|
+
wait_seconds: {
|
|
13252
|
+
type: "number",
|
|
13253
|
+
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.`,
|
|
13254
|
+
required: false
|
|
13174
13255
|
}
|
|
13175
13256
|
},
|
|
13176
13257
|
dangerous: false
|
|
13177
13258
|
},
|
|
13178
13259
|
async execute(args) {
|
|
13179
13260
|
const id = args["id"] ? String(args["id"]) : void 0;
|
|
13261
|
+
const { seconds, clamped } = parseWaitSeconds(args["wait_seconds"]);
|
|
13262
|
+
let note = "";
|
|
13263
|
+
if (seconds > 0) {
|
|
13264
|
+
const started = Date.now();
|
|
13265
|
+
const outcome = await waitForTasks(id, seconds);
|
|
13266
|
+
const waited = ((Date.now() - started) / 1e3).toFixed(1);
|
|
13267
|
+
if (outcome === "timeout") note = `(waited ${waited}s; still running \u2014 call again with wait_seconds to keep waiting)`;
|
|
13268
|
+
else if (outcome === "finished") note = `(waited ${waited}s; task finished)`;
|
|
13269
|
+
else if (outcome === "interrupted") note = `(wait interrupted by user after ${waited}s)`;
|
|
13270
|
+
if (clamped) note += `${note ? " " : ""}(wait_seconds capped at ${MAX_TASK_WAIT_SECONDS})`;
|
|
13271
|
+
}
|
|
13272
|
+
const withNote = (body) => note ? `${note}
|
|
13273
|
+
${body}` : body;
|
|
13180
13274
|
if (id) {
|
|
13181
13275
|
const output = getTaskOutput(id);
|
|
13182
13276
|
if (!output) return `Task not found: ${id}`;
|
|
@@ -13188,7 +13282,7 @@ ${output.stdout}`);
|
|
|
13188
13282
|
\u2500\u2500 stderr \u2500\u2500
|
|
13189
13283
|
${output.stderr}`);
|
|
13190
13284
|
if (!output.stdout && !output.stderr) parts.push("\n(no output yet)");
|
|
13191
|
-
return parts.join("");
|
|
13285
|
+
return withNote(parts.join(""));
|
|
13192
13286
|
}
|
|
13193
13287
|
const all = listTasks();
|
|
13194
13288
|
if (all.length === 0) return "No background tasks.";
|
|
@@ -13200,7 +13294,7 @@ ${output.stderr}`);
|
|
|
13200
13294
|
lines.push(` [${t.id}] ${status} (${elapsed.toFixed(1)}s) \u2014 ${t.description}`);
|
|
13201
13295
|
if (t.exitCode !== null) lines.push(` exit code: ${t.exitCode}`);
|
|
13202
13296
|
}
|
|
13203
|
-
return lines.join("\n");
|
|
13297
|
+
return withNote(lines.join("\n"));
|
|
13204
13298
|
}
|
|
13205
13299
|
};
|
|
13206
13300
|
|
|
@@ -18197,7 +18291,7 @@ Cache: write=${cacheCreate} read=${cacheRead}` : "";
|
|
|
18197
18291
|
Cost: ${formatCost(cost)}` : "";
|
|
18198
18292
|
let memoryLine = "";
|
|
18199
18293
|
try {
|
|
18200
|
-
const { countPendingMemories: countPendingMemories2 } = await import("./persistent-memory-
|
|
18294
|
+
const { countPendingMemories: countPendingMemories2 } = await import("./persistent-memory-UZIZVHRT.js");
|
|
18201
18295
|
const pending = countPendingMemories2(ctx.config.getConfigDir());
|
|
18202
18296
|
if (pending > 0) memoryLine = `
|
|
18203
18297
|
Memory: \u26A0 ${pending} pending approval \u2014 see the Memory panel or /memory`;
|
|
@@ -19185,7 +19279,7 @@ async function handleTest(args, ctx) {
|
|
|
19185
19279
|
const isCommand = argStr.includes(" ") || /^(mvn|gradle|npm|pytest|cargo|go)\b/.test(argStr);
|
|
19186
19280
|
testArgs = isCommand ? { command: argStr } : { filter: argStr };
|
|
19187
19281
|
}
|
|
19188
|
-
const runTests = ctx.runTests ?? (await import("./run-tests-
|
|
19282
|
+
const runTests = ctx.runTests ?? (await import("./run-tests-UXEOFPAW.js")).executeTests;
|
|
19189
19283
|
const report = await runTests(testArgs);
|
|
19190
19284
|
ctx.send({ type: "info", message: report });
|
|
19191
19285
|
} catch (err) {
|
|
@@ -19576,7 +19670,7 @@ async function handleMemory(args, ctx) {
|
|
|
19576
19670
|
}
|
|
19577
19671
|
if (intent.kind === "status") {
|
|
19578
19672
|
const { getChatIndexStatus: getChatIndexStatus2 } = await import("./chat-index-RLVLQRRC.js");
|
|
19579
|
-
const { listMemoryEntries: listMemoryEntries2, isMemoryExpired: isMemoryExpired2, formatMemoryForPrompt: formatMemoryForPrompt2 } = await import("./persistent-memory-
|
|
19673
|
+
const { listMemoryEntries: listMemoryEntries2, isMemoryExpired: isMemoryExpired2, formatMemoryForPrompt: formatMemoryForPrompt2 } = await import("./persistent-memory-UZIZVHRT.js");
|
|
19580
19674
|
const memories = listMemoryEntries2(configDir, { includeExpired: true, includeRejected: true });
|
|
19581
19675
|
const injected = formatMemoryForPrompt2(configDir, process.cwd(), ctx.config.get("memory")?.maxChars);
|
|
19582
19676
|
const view = buildMemoryStatusView({
|
|
@@ -19599,7 +19693,7 @@ async function handleMemory(args, ctx) {
|
|
|
19599
19693
|
return;
|
|
19600
19694
|
}
|
|
19601
19695
|
if (intent.kind === "recall") {
|
|
19602
|
-
const { searchPersistentMemories: searchPersistentMemories2, touchMemoryReferences: touchMemoryReferences2 } = await import("./persistent-memory-
|
|
19696
|
+
const { searchPersistentMemories: searchPersistentMemories2, touchMemoryReferences: touchMemoryReferences2 } = await import("./persistent-memory-UZIZVHRT.js");
|
|
19603
19697
|
const { searchChatMemory: searchChatMemory2 } = await import("./chat-index-RLVLQRRC.js");
|
|
19604
19698
|
const persistentHits = searchPersistentMemories2(configDir, intent.query, process.cwd(), 3);
|
|
19605
19699
|
if (persistentHits.length > 0) {
|
|
@@ -19720,7 +19814,7 @@ async function handleMemory(args, ctx) {
|
|
|
19720
19814
|
ctx.handleMemoryManage(intent.action, args[1], intent.action === "expire" ? args[2] : void 0);
|
|
19721
19815
|
} else if (intent.kind === "export") {
|
|
19722
19816
|
if (args[1] === "md") {
|
|
19723
|
-
const { exportMemoryEntries: exportMemoryEntries2 } = await import("./persistent-memory-
|
|
19817
|
+
const { exportMemoryEntries: exportMemoryEntries2 } = await import("./persistent-memory-UZIZVHRT.js");
|
|
19724
19818
|
ctx.send({
|
|
19725
19819
|
type: "export_data",
|
|
19726
19820
|
format: "md",
|
|
@@ -20726,7 +20820,7 @@ No tools match "${filter}".
|
|
|
20726
20820
|
const { join: join27 } = await import("path");
|
|
20727
20821
|
const { existsSync: existsSync33 } = await import("fs");
|
|
20728
20822
|
const { getGitRoot: getGitRoot2 } = await import("./git-context-VNCA2GU7.js");
|
|
20729
|
-
const { MCP_PROJECT_CONFIG_NAME: MCP_PROJECT_CONFIG_NAME2 } = await import("./constants-
|
|
20823
|
+
const { MCP_PROJECT_CONFIG_NAME: MCP_PROJECT_CONFIG_NAME2 } = await import("./constants-JZH2QKMQ.js");
|
|
20730
20824
|
const { approveProject, hashMcpFile } = await import("./project-trust-6CJB5ZMX.js");
|
|
20731
20825
|
const cwd = process.cwd();
|
|
20732
20826
|
const projectRoot = getGitRoot2(cwd) ?? cwd;
|
|
@@ -21645,7 +21739,7 @@ function createReviewCommands() {
|
|
|
21645
21739
|
usage: "/test [command|filter]",
|
|
21646
21740
|
async execute(args, ctx) {
|
|
21647
21741
|
try {
|
|
21648
|
-
const { executeTests } = await import("./run-tests-
|
|
21742
|
+
const { executeTests } = await import("./run-tests-UXEOFPAW.js");
|
|
21649
21743
|
const argStr = args.join(" ").trim();
|
|
21650
21744
|
let testArgs = {};
|
|
21651
21745
|
if (argStr) {
|
|
@@ -23869,7 +23963,8 @@ var SessionHandler = class _SessionHandler {
|
|
|
23869
23963
|
return;
|
|
23870
23964
|
}
|
|
23871
23965
|
case "interjection":
|
|
23872
|
-
this.userInterjection =
|
|
23966
|
+
this.userInterjection = this.userInterjection ? `${this.userInterjection}
|
|
23967
|
+
${msg.content}` : msg.content;
|
|
23873
23968
|
return;
|
|
23874
23969
|
}
|
|
23875
23970
|
}
|
|
@@ -24337,7 +24432,6 @@ ${systemPromptVolatile}` : systemPrompt;
|
|
|
24337
24432
|
if (!this.userInterjection) return null;
|
|
24338
24433
|
const msg = this.userInterjection;
|
|
24339
24434
|
this.userInterjection = null;
|
|
24340
|
-
this.send({ type: "info", message: `\u26A1 Interjection: "${msg}"` });
|
|
24341
24435
|
return msg;
|
|
24342
24436
|
},
|
|
24343
24437
|
onRoundStart: (round, total) => {
|
|
@@ -25196,17 +25290,6 @@ Backup saved: ${result.backupPath}` : "";
|
|
|
25196
25290
|
}
|
|
25197
25291
|
};
|
|
25198
25292
|
|
|
25199
|
-
// src/core/proxy.ts
|
|
25200
|
-
async function setupProxy(configProxy) {
|
|
25201
|
-
const proxyUrl = process.env.HTTPS_PROXY ?? process.env.HTTP_PROXY ?? process.env.https_proxy ?? process.env.http_proxy ?? configProxy;
|
|
25202
|
-
if (!proxyUrl) return;
|
|
25203
|
-
try {
|
|
25204
|
-
const { ProxyAgent, setGlobalDispatcher } = await import("undici");
|
|
25205
|
-
setGlobalDispatcher(new ProxyAgent({ uri: proxyUrl }));
|
|
25206
|
-
} catch {
|
|
25207
|
-
}
|
|
25208
|
-
}
|
|
25209
|
-
|
|
25210
25293
|
// src/web/auth.ts
|
|
25211
25294
|
import { existsSync as existsSync31, readFileSync as readFileSync22, mkdirSync as mkdirSync16, readdirSync as readdirSync15, openSync, closeSync, unlinkSync as unlinkSync8 } from "fs";
|
|
25212
25295
|
import { isAbsolute as isAbsolute3, join as join25, relative as relative5 } from "path";
|
|
@@ -25647,7 +25730,8 @@ async function startWebServer(options = {}) {
|
|
|
25647
25730
|
(id) => ({
|
|
25648
25731
|
baseUrl: config.get("customBaseUrls")[id],
|
|
25649
25732
|
timeout: config.get("timeouts")[id],
|
|
25650
|
-
proxy: config.get("proxy")
|
|
25733
|
+
proxy: config.get("proxy"),
|
|
25734
|
+
noProxy: config.get("noProxy")
|
|
25651
25735
|
}),
|
|
25652
25736
|
config.get("customProviders"),
|
|
25653
25737
|
config.getConfigDir()
|
|
@@ -148,7 +148,7 @@ ${content}`);
|
|
|
148
148
|
}
|
|
149
149
|
}
|
|
150
150
|
async function runTaskMode(config, providers, configManager, topic) {
|
|
151
|
-
const { TaskOrchestrator } = await import("./task-orchestrator-
|
|
151
|
+
const { TaskOrchestrator } = await import("./task-orchestrator-SC42LAFG.js");
|
|
152
152
|
const orchestrator = new TaskOrchestrator(config, providers, configManager);
|
|
153
153
|
let interrupted = false;
|
|
154
154
|
const onSigint = () => {
|
package/dist/index.js
CHANGED
|
@@ -21,10 +21,9 @@ import {
|
|
|
21
21
|
readGitDiff,
|
|
22
22
|
saveDevState,
|
|
23
23
|
sessionHasMeaningfulContent,
|
|
24
|
-
setupProxy,
|
|
25
24
|
snapshotFile,
|
|
26
25
|
stripRoutingTags
|
|
27
|
-
} from "./chunk-
|
|
26
|
+
} from "./chunk-UWEBIOHD.js";
|
|
28
27
|
import {
|
|
29
28
|
CostTracker,
|
|
30
29
|
getPricing,
|
|
@@ -47,7 +46,7 @@ import {
|
|
|
47
46
|
setMaxOutputCap,
|
|
48
47
|
spawnAgentContext,
|
|
49
48
|
undoStack
|
|
50
|
-
} from "./chunk-
|
|
49
|
+
} from "./chunk-PKYNCSQC.js";
|
|
51
50
|
import "./chunk-HLWUDRBO.js";
|
|
52
51
|
import {
|
|
53
52
|
NO_THINKING,
|
|
@@ -60,7 +59,7 @@ import {
|
|
|
60
59
|
countPendingMemories,
|
|
61
60
|
detectStaleLegacyMarkdownEdit,
|
|
62
61
|
formatMemoryForPrompt
|
|
63
|
-
} from "./chunk-
|
|
62
|
+
} from "./chunk-WQAUMAEV.js";
|
|
64
63
|
import "./chunk-RWRZVQCB.js";
|
|
65
64
|
import "./chunk-B3MPYI4E.js";
|
|
66
65
|
import "./chunk-M6HLYG33.js";
|
|
@@ -81,23 +80,24 @@ import {
|
|
|
81
80
|
import {
|
|
82
81
|
loadContextFiles,
|
|
83
82
|
writeCrashLog
|
|
84
|
-
} from "./chunk-
|
|
83
|
+
} from "./chunk-DRCN44SZ.js";
|
|
85
84
|
import {
|
|
86
85
|
getActivePluginAssets,
|
|
87
86
|
getPendingHookTrust,
|
|
88
87
|
installFlushOnExit,
|
|
89
88
|
mergePluginHooks,
|
|
90
89
|
runLifecycleHooks
|
|
91
|
-
} from "./chunk-
|
|
90
|
+
} from "./chunk-NJREBH6A.js";
|
|
92
91
|
import "./chunk-RS7SKYTS.js";
|
|
93
92
|
import {
|
|
94
93
|
ProviderRegistry,
|
|
95
|
-
listBuiltInProviderMetadata
|
|
96
|
-
|
|
94
|
+
listBuiltInProviderMetadata,
|
|
95
|
+
setupProxy
|
|
96
|
+
} from "./chunk-TTLLXFJC.js";
|
|
97
97
|
import {
|
|
98
98
|
ConfigManager
|
|
99
|
-
} from "./chunk-
|
|
100
|
-
import "./chunk-
|
|
99
|
+
} from "./chunk-KGHVSYGI.js";
|
|
100
|
+
import "./chunk-7BOHS5IX.js";
|
|
101
101
|
import {
|
|
102
102
|
CONTENT_ONLY_STREAM_REMINDER,
|
|
103
103
|
TEE_FINAL_USER_NUDGE,
|
|
@@ -135,7 +135,7 @@ import {
|
|
|
135
135
|
isInterrupted,
|
|
136
136
|
requestInterrupt,
|
|
137
137
|
resetInterrupt
|
|
138
|
-
} from "./chunk-
|
|
138
|
+
} from "./chunk-DOO4QAGJ.js";
|
|
139
139
|
import {
|
|
140
140
|
AGENTIC_BEHAVIOR_GUIDELINE,
|
|
141
141
|
AUTHOR,
|
|
@@ -153,7 +153,7 @@ import {
|
|
|
153
153
|
SKILLS_DIR_NAME,
|
|
154
154
|
VERSION,
|
|
155
155
|
buildUserIdentityPrompt
|
|
156
|
-
} from "./chunk-
|
|
156
|
+
} from "./chunk-NRFAGZVJ.js";
|
|
157
157
|
import "./chunk-SXIJLSVF.js";
|
|
158
158
|
|
|
159
159
|
// src/index.ts
|
|
@@ -4119,7 +4119,7 @@ program.command("web").description("Start Web UI server with browser-based chat
|
|
|
4119
4119
|
console.error("Error: Invalid port number. Must be between 1 and 65535.");
|
|
4120
4120
|
process.exit(1);
|
|
4121
4121
|
}
|
|
4122
|
-
const { startWebServer, WebStartupError } = await import("./server-
|
|
4122
|
+
const { startWebServer, WebStartupError } = await import("./server-HWKYWQEP.js");
|
|
4123
4123
|
try {
|
|
4124
4124
|
await startWebServer({ port, host: options.host, externalOrigin: options.externalOrigin });
|
|
4125
4125
|
} catch (err) {
|
|
@@ -4296,11 +4296,11 @@ program.command("sessions").description("List recent conversation sessions").opt
|
|
|
4296
4296
|
console.log(footer + "\n");
|
|
4297
4297
|
});
|
|
4298
4298
|
program.command("usage").description("Show token + cost usage grouped by provider/model (cross-session)").option("--days <n>", "Only the last N days (inclusive of today)").option("--month <ym>", "Only a specific month, format YYYY-MM (e.g. 2026-06)").option("--json", "Output as JSON (for scripting)").action(async (options) => {
|
|
4299
|
-
const { runUsageCli } = await import("./usage-
|
|
4299
|
+
const { runUsageCli } = await import("./usage-ZVV27BHD.js");
|
|
4300
4300
|
await runUsageCli(options);
|
|
4301
4301
|
});
|
|
4302
4302
|
program.command("doctor").description("Health check: API keys, config, MCP, recent crashes, tool usage, disk usage").option("--json", "Output as JSON (for scripting)").option("--reset-stats", "Reset accumulated tool usage statistics").action(async (options) => {
|
|
4303
|
-
const { runDoctorCli } = await import("./doctor-cli-
|
|
4303
|
+
const { runDoctorCli } = await import("./doctor-cli-FZ4IVZ6H.js");
|
|
4304
4304
|
const argv = process.argv.slice(2);
|
|
4305
4305
|
await runDoctorCli({
|
|
4306
4306
|
json: !!options.json || argv.includes("--json"),
|
|
@@ -4309,7 +4309,7 @@ program.command("doctor").description("Health check: API keys, config, MCP, rece
|
|
|
4309
4309
|
});
|
|
4310
4310
|
program.command("batch <action> [arg] [arg2]").description("Anthropic Message Batches: submit | list | status <id> | results <id> [out] | cancel <id>").option("--dry-run", "Parse and validate input without submitting (submit only)").action(async (action, arg, arg2, options) => {
|
|
4311
4311
|
try {
|
|
4312
|
-
const batch = await import("./batch-
|
|
4312
|
+
const batch = await import("./batch-N4DOEUEW.js");
|
|
4313
4313
|
switch (action) {
|
|
4314
4314
|
case "submit":
|
|
4315
4315
|
if (!arg) {
|
|
@@ -4352,7 +4352,7 @@ program.command("batch <action> [arg] [arg2]").description("Anthropic Message Ba
|
|
|
4352
4352
|
}
|
|
4353
4353
|
});
|
|
4354
4354
|
program.command("mcp-serve").description("Start an MCP server over STDIO, exposing aicli's built-in tools to Claude Desktop / Cursor / other MCP clients").option("--allow-destructive", "Allow bash / run_interactive / task_create (always destructive in MCP mode)").option("--allow-outside-cwd", "Allow tool path arguments to escape the sandbox root \u2014 disabled by default").option("--tools <list>", "Comma-separated whitelist of tools to expose (default: all eligible tools)").option("--cwd <path>", "Working directory AND sandbox root (default: current directory)").action(async (options) => {
|
|
4355
|
-
const { startMcpServer } = await import("./server-
|
|
4355
|
+
const { startMcpServer } = await import("./server-2VSO2ZX4.js");
|
|
4356
4356
|
await startMcpServer({
|
|
4357
4357
|
allowDestructive: !!options.allowDestructive,
|
|
4358
4358
|
allowOutsideCwd: !!options.allowOutsideCwd,
|
|
@@ -4365,7 +4365,7 @@ program.command("pr <action> [target]").description("PR review helpers: review |
|
|
|
4365
4365
|
console.error(`Unknown pr action: ${action}. Use review | security-review | summarize.`);
|
|
4366
4366
|
process.exit(1);
|
|
4367
4367
|
}
|
|
4368
|
-
const { runPrCli } = await import("./pr-
|
|
4368
|
+
const { runPrCli } = await import("./pr-4KNQWYC6.js");
|
|
4369
4369
|
const result = await runPrCli({
|
|
4370
4370
|
action,
|
|
4371
4371
|
target,
|
|
@@ -4385,8 +4385,8 @@ program.command("pr <action> [target]").description("PR review helpers: review |
|
|
|
4385
4385
|
process.exit(result.exitCode);
|
|
4386
4386
|
});
|
|
4387
4387
|
program.command("ci").description("Headless PR review (code + security) \u2014 reads git/gh diff, optionally posts to PR. Designed for GitHub Actions.").option("--pr <num>", "PR number or URL; diff fetched via gh pr diff <value>", (v) => /^#?\d+$/.test(v) ? parseInt(v.replace(/^#/, ""), 10) : v).option("--base <ref>", "Base ref for git diff <ref>...HEAD (ignored when --pr set)").option("--post", "Post review as a PR comment (requires gh CLI + GH_TOKEN, needs --pr)").option("--no-update", "Always create a new comment instead of updating the previous aicli review").option("--skip-code", "Skip the code review section").option("--skip-security", "Skip the security review section").option("--detailed", "Use the detailed code-review prompt").option("--max-diff <n>", "Max diff chars sent to the model (default 30000)", (v) => parseInt(v, 10)).option("--provider <id>", "Override provider (default: config.defaultProvider)").option("--model <id>", "Override model").option("--dry-run", "Print result to stdout instead of posting (overrides --post)").option("--json", "Output a structured JSON report").option("--markdown", "Output Markdown report (default)").option("--sarif", "Output SARIF 2.1.0 for code scanning artifacts").option("--fail-on-security-high", "Fail when the security review contains HIGH/CRITICAL findings (default)").option("--no-fail-on-security-high", "Do not fail on security HIGH/CRITICAL findings").option("--fail-on-test-failure", "Fail when the report mentions test failures (default)").option("--no-fail-on-test-failure", "Do not fail on test failure findings").option("--fail-on-lint-failure", "Fail when the report mentions lint/typecheck failures (default)").option("--no-fail-on-lint-failure", "Do not fail on lint/typecheck failure findings").action(async (options) => {
|
|
4388
|
-
const { runCi } = await import("./ci-
|
|
4389
|
-
const { formatCiResult } = await import("./ci-format-
|
|
4388
|
+
const { runCi } = await import("./ci-HFAPFMZY.js");
|
|
4389
|
+
const { formatCiResult } = await import("./ci-format-QTRMHY3N.js");
|
|
4390
4390
|
const formats = [options.json, options.markdown, options.sarif].filter(Boolean).length;
|
|
4391
4391
|
if (formats > 1) {
|
|
4392
4392
|
console.error("Choose only one output format: --json, --markdown, or --sarif.");
|
|
@@ -4545,7 +4545,7 @@ program.command("hub [topic]").description("Start multi-agent hub (discuss / bra
|
|
|
4545
4545
|
config.get("customProviders"),
|
|
4546
4546
|
config.getConfigDir()
|
|
4547
4547
|
);
|
|
4548
|
-
const { startHub } = await import("./hub-
|
|
4548
|
+
const { startHub } = await import("./hub-IRILXTL3.js");
|
|
4549
4549
|
await startHub(
|
|
4550
4550
|
{
|
|
4551
4551
|
topic: topic ?? "",
|
|
@@ -4618,7 +4618,8 @@ async function runHeadless(options) {
|
|
|
4618
4618
|
(id) => ({
|
|
4619
4619
|
baseUrl: config.get("customBaseUrls")[id],
|
|
4620
4620
|
timeout: config.get("timeouts")[id],
|
|
4621
|
-
proxy: config.get("proxy")
|
|
4621
|
+
proxy: config.get("proxy"),
|
|
4622
|
+
noProxy: config.get("noProxy")
|
|
4622
4623
|
}),
|
|
4623
4624
|
config.get("customProviders"),
|
|
4624
4625
|
config.getConfigDir()
|
|
@@ -4833,7 +4834,8 @@ async function startRepl(options) {
|
|
|
4833
4834
|
(id) => ({
|
|
4834
4835
|
baseUrl: config.get("customBaseUrls")[id],
|
|
4835
4836
|
timeout: config.get("timeouts")[id],
|
|
4836
|
-
proxy: config.get("proxy")
|
|
4837
|
+
proxy: config.get("proxy"),
|
|
4838
|
+
noProxy: config.get("noProxy")
|
|
4837
4839
|
}),
|
|
4838
4840
|
config.get("customProviders"),
|
|
4839
4841
|
config.getConfigDir()
|
|
@@ -27,11 +27,11 @@ import {
|
|
|
27
27
|
touchMemoryReferences,
|
|
28
28
|
updateMemoryApproval,
|
|
29
29
|
updateMemoryEntry
|
|
30
|
-
} from "./chunk-
|
|
30
|
+
} from "./chunk-JUYK4OML.js";
|
|
31
31
|
import "./chunk-FSC6KEWU.js";
|
|
32
32
|
import "./chunk-2XMUCC42.js";
|
|
33
33
|
import "./chunk-CGLYJRFA.js";
|
|
34
|
-
import "./chunk-
|
|
34
|
+
import "./chunk-ATOF545W.js";
|
|
35
35
|
export {
|
|
36
36
|
addMemoryEntry,
|
|
37
37
|
backupMemoryStore,
|
|
@@ -28,11 +28,11 @@ import {
|
|
|
28
28
|
touchMemoryReferences,
|
|
29
29
|
updateMemoryApproval,
|
|
30
30
|
updateMemoryEntry
|
|
31
|
-
} from "./chunk-
|
|
31
|
+
} from "./chunk-WQAUMAEV.js";
|
|
32
32
|
import "./chunk-3FEZSLGI.js";
|
|
33
33
|
import "./chunk-HOSJZMQS.js";
|
|
34
34
|
import "./chunk-BMLQPSHP.js";
|
|
35
|
-
import "./chunk-
|
|
35
|
+
import "./chunk-NRFAGZVJ.js";
|
|
36
36
|
export {
|
|
37
37
|
addMemoryEntry,
|
|
38
38
|
backupMemoryStore,
|
|
@@ -2,8 +2,8 @@
|
|
|
2
2
|
import {
|
|
3
3
|
countSeverity,
|
|
4
4
|
runCi
|
|
5
|
-
} from "./chunk-
|
|
6
|
-
import "./chunk-
|
|
5
|
+
} from "./chunk-OXVJZLJM.js";
|
|
6
|
+
import "./chunk-RIDNF4G2.js";
|
|
7
7
|
import {
|
|
8
8
|
buildReviewPrompt,
|
|
9
9
|
buildSecurityReviewPrompt,
|
|
@@ -14,17 +14,17 @@ import {
|
|
|
14
14
|
} from "./chunk-6YZEZFX5.js";
|
|
15
15
|
import {
|
|
16
16
|
ProviderRegistry
|
|
17
|
-
} from "./chunk-
|
|
17
|
+
} from "./chunk-TTLLXFJC.js";
|
|
18
18
|
import {
|
|
19
19
|
ConfigManager
|
|
20
|
-
} from "./chunk-
|
|
21
|
-
import "./chunk-
|
|
20
|
+
} from "./chunk-KGHVSYGI.js";
|
|
21
|
+
import "./chunk-7BOHS5IX.js";
|
|
22
22
|
import "./chunk-C6GA7H5D.js";
|
|
23
23
|
import "./chunk-TU3L3PW7.js";
|
|
24
24
|
import "./chunk-BMLQPSHP.js";
|
|
25
25
|
import {
|
|
26
26
|
VERSION
|
|
27
|
-
} from "./chunk-
|
|
27
|
+
} from "./chunk-NRFAGZVJ.js";
|
|
28
28
|
|
|
29
29
|
// src/cli/pr.ts
|
|
30
30
|
import { execFileSync } from "child_process";
|
|
@@ -182,7 +182,7 @@ async function getProvider(opts) {
|
|
|
182
182
|
const registry = new ProviderRegistry();
|
|
183
183
|
await registry.initialize(
|
|
184
184
|
(id) => config.getApiKey(id),
|
|
185
|
-
(id) => ({ baseUrl: config.get("customBaseUrls")[id], timeout: config.get("timeouts")[id], proxy: config.get("proxy") }),
|
|
185
|
+
(id) => ({ baseUrl: config.get("customBaseUrls")[id], timeout: config.get("timeouts")[id], proxy: config.get("proxy"), noProxy: config.get("noProxy") }),
|
|
186
186
|
config.get("customProviders"),
|
|
187
187
|
config.getConfigDir()
|
|
188
188
|
);
|
|
@@ -2,9 +2,9 @@ import {
|
|
|
2
2
|
executeTests,
|
|
3
3
|
runTestProcess,
|
|
4
4
|
runTestsTool
|
|
5
|
-
} from "./chunk-
|
|
5
|
+
} from "./chunk-DCWBDSMO.js";
|
|
6
6
|
import "./chunk-QMFMST2T.js";
|
|
7
|
-
import "./chunk-
|
|
7
|
+
import "./chunk-ATOF545W.js";
|
|
8
8
|
export {
|
|
9
9
|
executeTests,
|
|
10
10
|
runTestProcess,
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
import {
|
|
3
3
|
ToolRegistry
|
|
4
|
-
} from "./chunk-
|
|
4
|
+
} from "./chunk-PKYNCSQC.js";
|
|
5
5
|
import "./chunk-6JHACXB3.js";
|
|
6
|
-
import "./chunk-
|
|
6
|
+
import "./chunk-WQAUMAEV.js";
|
|
7
7
|
import "./chunk-RWRZVQCB.js";
|
|
8
8
|
import "./chunk-B3MPYI4E.js";
|
|
9
9
|
import "./chunk-M6HLYG33.js";
|
|
@@ -14,21 +14,21 @@ import "./chunk-JL44HGZC.js";
|
|
|
14
14
|
import "./chunk-3FEZSLGI.js";
|
|
15
15
|
import {
|
|
16
16
|
runTool
|
|
17
|
-
} from "./chunk-
|
|
17
|
+
} from "./chunk-NJREBH6A.js";
|
|
18
18
|
import "./chunk-RS7SKYTS.js";
|
|
19
19
|
import {
|
|
20
20
|
getDangerLevel,
|
|
21
21
|
schemaToJsonSchema
|
|
22
|
-
} from "./chunk-
|
|
22
|
+
} from "./chunk-7BOHS5IX.js";
|
|
23
23
|
import "./chunk-C6GA7H5D.js";
|
|
24
24
|
import "./chunk-TU3L3PW7.js";
|
|
25
25
|
import "./chunk-HOSJZMQS.js";
|
|
26
26
|
import "./chunk-BMLQPSHP.js";
|
|
27
27
|
import "./chunk-JJFJWD35.js";
|
|
28
|
-
import "./chunk-
|
|
28
|
+
import "./chunk-DOO4QAGJ.js";
|
|
29
29
|
import {
|
|
30
30
|
VERSION
|
|
31
|
-
} from "./chunk-
|
|
31
|
+
} from "./chunk-NRFAGZVJ.js";
|
|
32
32
|
import "./chunk-SXIJLSVF.js";
|
|
33
33
|
|
|
34
34
|
// src/mcp/server.ts
|