jinzd-ai-cli 0.4.246 → 0.4.247
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/README.md +8 -3
- package/README.zh-CN.md +8 -3
- package/dist/{batch-AHW7WALD.js → batch-UE7XQMQB.js} +2 -2
- package/dist/{chat-index-ALUHFJKI.js → chat-index-7MMTGQNA.js} +2 -2
- package/dist/{chat-index-ML5FF5L6.js → chat-index-Q6BKWWAM.js} +1 -1
- package/dist/{chunk-XK22CVID.js → chunk-3IIKIWT2.js} +1 -1
- package/dist/{chunk-WYNPWHXB.js → chunk-3IM53IFO.js} +1 -1
- package/dist/{chunk-LZGPGPA6.js → chunk-4EZWVX7G.js} +1 -1
- package/dist/{chunk-DJDEXHOT.js → chunk-4GKWLTU3.js} +4 -4
- package/dist/{chunk-YQUBYTDR.js → chunk-6Q2XAWKP.js} +1 -1
- package/dist/{chunk-IGPFYNZA.js → chunk-6RPGQ5CG.js} +1 -1
- package/dist/{chunk-K3CF65QH.js → chunk-GLSR2NR3.js} +1 -1
- package/dist/{chunk-USJF35NB.js → chunk-IP7LPVRW.js} +1 -1
- package/dist/{chunk-DT77O33T.js → chunk-JQXXPTWL.js} +1 -1
- package/dist/{chunk-LEKOBVOQ.js → chunk-KPRU6QY3.js} +4 -5
- package/dist/{chunk-PJ3ONBWZ.js → chunk-NYNSYLFY.js} +1 -1
- package/dist/{chunk-KWQKQVPH.js → chunk-OBULDJSU.js} +1 -1
- package/dist/{chunk-GQYRPBIQ.js → chunk-Q2OMGJIQ.js} +12 -12
- package/dist/{chunk-BNERFXVO.js → chunk-QCG6UU2S.js} +1 -1
- package/dist/{chunk-CJ3BPLHZ.js → chunk-REBKFMF3.js} +1 -1
- package/dist/{chunk-Z7JROM3J.js → chunk-RZV6WSER.js} +1 -1
- package/dist/{chunk-QYQI7ZWK.js → chunk-S7ZS7X23.js} +0 -1
- package/dist/{chunk-OMSOAFXY.js → chunk-TBXMRJHS.js} +1 -1
- package/dist/{chunk-P2LB6S4I.js → chunk-VN6OGMSV.js} +1 -1
- package/dist/{chunk-6Y42RN5H.js → chunk-VPM5WRJ2.js} +4 -4
- package/dist/{chunk-NV63EYFL.js → chunk-ZWEZNKDW.js} +1 -1
- package/dist/{ci-VOGIC6S4.js → ci-EY6USUO7.js} +5 -5
- package/dist/{ci-format-BHCSMT5U.js → ci-format-CZNUUWEV.js} +2 -2
- package/dist/{constants-J4OLBH72.js → constants-UDRMWAPN.js} +1 -1
- package/dist/{doctor-cli-IR3E3XHB.js → doctor-cli-GY654USP.js} +5 -5
- package/dist/electron-server.js +154 -136
- package/dist/{hub-SFFFYMGO.js → hub-L2WX4255.js} +2 -2
- package/dist/index.js +29 -30
- package/dist/{indexer-4WWS3VIL.js → indexer-M2LJGTY2.js} +1 -1
- package/dist/{indexer-2AG4G6B5.js → indexer-VZETNE4H.js} +1 -1
- package/dist/{persist-WGIJ6RXY.js → persist-A2QSXYFY.js} +3 -3
- package/dist/{persistent-memory-EKZ2JF7M.js → persistent-memory-G24RJ5LA.js} +2 -2
- package/dist/{persistent-memory-3KH2EVHA.js → persistent-memory-JCX3P2CF.js} +2 -2
- package/dist/{pr-BNS3OHDM.js → pr-B5P2M6DV.js} +5 -5
- package/dist/{run-tests-PW4WC4OG.js → run-tests-N2JQGL4C.js} +2 -2
- package/dist/{run-tests-ZKHXKCQB.js → run-tests-QEIR322E.js} +2 -2
- package/dist/{server-3HLBEWNZ.js → server-4OAE6OEK.js} +8 -8
- package/dist/{server-D2ID3GYA.js → server-QDMMCD3O.js} +112 -92
- package/dist/{task-orchestrator-FMCI4RPX.js → task-orchestrator-VZXU2HK3.js} +8 -9
- package/dist/{usage-DPLNMDSJ.js → usage-LH3LNYAS.js} +2 -2
- package/package.json +5 -4
package/README.md
CHANGED
|
@@ -1,8 +1,13 @@
|
|
|
1
1
|
**English** | [中文](README.zh-CN.md)
|
|
2
2
|
|
|
3
|
-
# ai-cli
|
|
4
|
-
|
|
5
|
-
|
|
3
|
+
# ai-cli
|
|
4
|
+
|
|
5
|
+
<!-- AICLI:DOCS_DEFAULT_WEB_PORT=3000 -->
|
|
6
|
+
<!-- AICLI:DOCS_BUILTIN_TOOL_COUNT=30 -->
|
|
7
|
+
<!-- AICLI:DOCS_REPL_COMMAND_COUNT=48 -->
|
|
8
|
+
<!-- AICLI:DOCS_MEMORY_SOURCE=memory.jsonl -->
|
|
9
|
+
|
|
10
|
+
> A cross-platform AI coding assistant — CLI, Web UI, and Desktop App — with multi-provider support and agentic tool calling
|
|
6
11
|
|
|
7
12
|
[](https://www.npmjs.com/package/jinzd-ai-cli)
|
|
8
13
|
[](LICENSE)
|
package/README.zh-CN.md
CHANGED
|
@@ -1,8 +1,13 @@
|
|
|
1
1
|
[English](README.md) | **中文**
|
|
2
2
|
|
|
3
|
-
# ai-cli
|
|
4
|
-
|
|
5
|
-
|
|
3
|
+
# ai-cli
|
|
4
|
+
|
|
5
|
+
<!-- AICLI:DOCS_DEFAULT_WEB_PORT=3000 -->
|
|
6
|
+
<!-- AICLI:DOCS_BUILTIN_TOOL_COUNT=30 -->
|
|
7
|
+
<!-- AICLI:DOCS_REPL_COMMAND_COUNT=48 -->
|
|
8
|
+
<!-- AICLI:DOCS_MEMORY_SOURCE=memory.jsonl -->
|
|
9
|
+
|
|
10
|
+
> 跨平台 AI 编程助手 — CLI 终端、Web 界面、桌面应用三合一,支持 10 大 Provider(含本地 Ollama)与 Agentic 工具调用
|
|
6
11
|
|
|
7
12
|
[](https://www.npmjs.com/package/jinzd-ai-cli)
|
|
8
13
|
[](LICENSE)
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
import {
|
|
3
3
|
ConfigManager
|
|
4
|
-
} from "./chunk-
|
|
4
|
+
} from "./chunk-TBXMRJHS.js";
|
|
5
5
|
import "./chunk-5ULLIOVC.js";
|
|
6
|
-
import "./chunk-
|
|
6
|
+
import "./chunk-6Q2XAWKP.js";
|
|
7
7
|
import {
|
|
8
8
|
atomicWriteFileSync
|
|
9
9
|
} from "./chunk-IW3Q7AE5.js";
|
|
@@ -6,9 +6,9 @@ import {
|
|
|
6
6
|
getChatIndexStatus,
|
|
7
7
|
loadChatIndex,
|
|
8
8
|
searchChatMemory
|
|
9
|
-
} from "./chunk-
|
|
9
|
+
} from "./chunk-6RPGQ5CG.js";
|
|
10
10
|
import "./chunk-KHYD3WXE.js";
|
|
11
|
-
import "./chunk-
|
|
11
|
+
import "./chunk-NYNSYLFY.js";
|
|
12
12
|
import "./chunk-B5TYJO7V.js";
|
|
13
13
|
import "./chunk-IW3Q7AE5.js";
|
|
14
14
|
export {
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
import {
|
|
3
3
|
ProviderRegistry
|
|
4
|
-
} from "./chunk-
|
|
4
|
+
} from "./chunk-S7ZS7X23.js";
|
|
5
5
|
import {
|
|
6
6
|
ConfigManager
|
|
7
|
-
} from "./chunk-
|
|
7
|
+
} from "./chunk-TBXMRJHS.js";
|
|
8
8
|
import {
|
|
9
9
|
getActivePluginAssets,
|
|
10
10
|
getPendingHookTrust,
|
|
@@ -14,7 +14,7 @@ import {
|
|
|
14
14
|
listHooks,
|
|
15
15
|
listInstalledPlugins,
|
|
16
16
|
resetStats
|
|
17
|
-
} from "./chunk-
|
|
17
|
+
} from "./chunk-3IM53IFO.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-6Q2XAWKP.js";
|
|
30
30
|
|
|
31
31
|
// src/diagnostics/doctor-report.ts
|
|
32
32
|
import { existsSync as existsSync3, statSync as statSync2 } from "fs";
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
import {
|
|
3
3
|
truncateForPersist
|
|
4
|
-
} from "./chunk-
|
|
4
|
+
} from "./chunk-Q2OMGJIQ.js";
|
|
5
5
|
import {
|
|
6
6
|
APP_NAME,
|
|
7
7
|
CONFIG_DIR_NAME,
|
|
@@ -11,7 +11,7 @@ import {
|
|
|
11
11
|
MCP_PROTOCOL_VERSION,
|
|
12
12
|
MCP_TOOL_PREFIX,
|
|
13
13
|
VERSION
|
|
14
|
-
} from "./chunk-
|
|
14
|
+
} from "./chunk-6Q2XAWKP.js";
|
|
15
15
|
import {
|
|
16
16
|
atomicWriteFileSync
|
|
17
17
|
} from "./chunk-IW3Q7AE5.js";
|
|
@@ -163,12 +163,11 @@ var McpClient = class {
|
|
|
163
163
|
method,
|
|
164
164
|
...params !== void 0 ? { params } : {}
|
|
165
165
|
};
|
|
166
|
-
let timer;
|
|
167
166
|
const cleanup = () => {
|
|
168
167
|
this.pendingRequests.delete(id);
|
|
169
168
|
clearTimeout(timer);
|
|
170
169
|
};
|
|
171
|
-
timer = setTimeout(() => {
|
|
170
|
+
const timer = setTimeout(() => {
|
|
172
171
|
cleanup();
|
|
173
172
|
reject(new Error(`MCP request [${method}] timed out (internal)`));
|
|
174
173
|
}, MCP_CALL_TIMEOUT * 2);
|
|
@@ -953,7 +952,7 @@ function autoTrimSessionIfNeeded(session, sizeLimit = SESSION_SIZE_LIMIT) {
|
|
|
953
952
|
const originalSize = JSON.stringify(session.toJSON()).length;
|
|
954
953
|
if (originalSize <= sizeLimit) return false;
|
|
955
954
|
const snapshotLen = session.messages.length;
|
|
956
|
-
|
|
955
|
+
const working = cloneMessages(session.messages.slice(0, snapshotLen));
|
|
957
956
|
let committedSize = originalSize;
|
|
958
957
|
let anyTrim = false;
|
|
959
958
|
let keepRecent = 10;
|
|
@@ -163,7 +163,7 @@ function rebuildIndex(historyDir) {
|
|
|
163
163
|
return idx;
|
|
164
164
|
}
|
|
165
165
|
function updateSessionInIndex(historyDir, meta, filePath) {
|
|
166
|
-
|
|
166
|
+
const idx = loadIndex(historyDir);
|
|
167
167
|
if (!idx) {
|
|
168
168
|
rebuildIndex(historyDir);
|
|
169
169
|
return;
|
|
@@ -7,10 +7,10 @@ import {
|
|
|
7
7
|
searchPersistentMemories,
|
|
8
8
|
touchMemoryReferences,
|
|
9
9
|
updateMemoryEntry
|
|
10
|
-
} from "./chunk-
|
|
10
|
+
} from "./chunk-RZV6WSER.js";
|
|
11
11
|
import {
|
|
12
12
|
indexProject
|
|
13
|
-
} from "./chunk-
|
|
13
|
+
} from "./chunk-GLSR2NR3.js";
|
|
14
14
|
import {
|
|
15
15
|
hasSemanticIndex,
|
|
16
16
|
semanticSearch
|
|
@@ -23,7 +23,7 @@ import {
|
|
|
23
23
|
runHook,
|
|
24
24
|
runLifecycleHooks,
|
|
25
25
|
runTool
|
|
26
|
-
} from "./chunk-
|
|
26
|
+
} from "./chunk-3IM53IFO.js";
|
|
27
27
|
import {
|
|
28
28
|
getDangerLevel,
|
|
29
29
|
isFileWriteTool,
|
|
@@ -39,18 +39,18 @@ import {
|
|
|
39
39
|
} from "./chunk-4BKXL7SM.js";
|
|
40
40
|
import {
|
|
41
41
|
runTestsTool
|
|
42
|
-
} from "./chunk-
|
|
42
|
+
} from "./chunk-3IIKIWT2.js";
|
|
43
43
|
import {
|
|
44
44
|
CONFIG_DIR_NAME,
|
|
45
45
|
DEFAULT_MAX_TOOL_OUTPUT_CHARS_CAP,
|
|
46
46
|
SUBAGENT_ALLOWED_TOOLS,
|
|
47
47
|
SUBAGENT_DEFAULT_MAX_ROUNDS,
|
|
48
48
|
SUBAGENT_MAX_ROUNDS_LIMIT
|
|
49
|
-
} from "./chunk-
|
|
49
|
+
} from "./chunk-6Q2XAWKP.js";
|
|
50
50
|
import {
|
|
51
51
|
loadChatIndex,
|
|
52
52
|
searchChatMemory
|
|
53
|
-
} from "./chunk-
|
|
53
|
+
} from "./chunk-6RPGQ5CG.js";
|
|
54
54
|
import {
|
|
55
55
|
atomicWriteFileSync
|
|
56
56
|
} from "./chunk-IW3Q7AE5.js";
|
|
@@ -193,7 +193,7 @@ async function execInPool(sessionKey, command, timeout, cwd, abortSignal) {
|
|
|
193
193
|
stdout += IS_WINDOWS2 ? decodeWindowsBuffer(chunk) : chunk.toString("utf-8");
|
|
194
194
|
if (!resolved && stdout.includes(markerEndPattern)) {
|
|
195
195
|
const endLine = stdout.split("\n").find((l) => l.includes(markerEndPattern));
|
|
196
|
-
const exitCode = endLine ? parseEndMarker(endLine
|
|
196
|
+
const exitCode = endLine ? parseEndMarker(endLine) : null;
|
|
197
197
|
stdout = stripMarkerOutput(stdout, markerStartPattern, markerEndPattern);
|
|
198
198
|
resolved = true;
|
|
199
199
|
cleanup();
|
|
@@ -250,7 +250,7 @@ async function execInPool(sessionKey, command, timeout, cwd, abortSignal) {
|
|
|
250
250
|
}
|
|
251
251
|
try {
|
|
252
252
|
proc.stdin?.write(wrappedCmd + "\n");
|
|
253
|
-
} catch
|
|
253
|
+
} catch {
|
|
254
254
|
if (!resolved) {
|
|
255
255
|
cleanup();
|
|
256
256
|
pool.delete(sessionKey);
|
|
@@ -258,7 +258,7 @@ async function execInPool(sessionKey, command, timeout, cwd, abortSignal) {
|
|
|
258
258
|
}
|
|
259
259
|
});
|
|
260
260
|
}
|
|
261
|
-
function parseEndMarker(line
|
|
261
|
+
function parseEndMarker(line) {
|
|
262
262
|
const idx = line.lastIndexOf(":");
|
|
263
263
|
if (idx < 0) return null;
|
|
264
264
|
const code = line.slice(idx + 1).trim();
|
|
@@ -2338,7 +2338,7 @@ var ToolExecutor = class {
|
|
|
2338
2338
|
};
|
|
2339
2339
|
}
|
|
2340
2340
|
if (permission.action === "auto-approve" && networkPermission?.action !== "confirm") {
|
|
2341
|
-
this.printToolCall(call);
|
|
2341
|
+
if (!toolCallAlreadyPrinted) this.printToolCall(call);
|
|
2342
2342
|
try {
|
|
2343
2343
|
const rawContent = await runTool(tool, call.arguments, call.name);
|
|
2344
2344
|
const content = truncateOutput(rawContent, call.name);
|
|
@@ -2944,7 +2944,7 @@ Do NOT split a long document into many write_file(append=true) calls. That patte
|
|
|
2944
2944
|
const mode = appendMode ? "appended" : "written";
|
|
2945
2945
|
void (async () => {
|
|
2946
2946
|
try {
|
|
2947
|
-
const { updateFile } = await import("./indexer-
|
|
2947
|
+
const { updateFile } = await import("./indexer-VZETNE4H.js");
|
|
2948
2948
|
await updateFile(process.cwd(), filePath);
|
|
2949
2949
|
} catch {
|
|
2950
2950
|
}
|
|
@@ -4363,7 +4363,7 @@ var webFetchTool = {
|
|
|
4363
4363
|
} else {
|
|
4364
4364
|
const title = extractTitle(rawHtml);
|
|
4365
4365
|
const desc = extractDescription(rawHtml);
|
|
4366
|
-
|
|
4366
|
+
const body = htmlToText(rawHtml);
|
|
4367
4367
|
const header = [
|
|
4368
4368
|
title ? `# ${title}` : "",
|
|
4369
4369
|
desc ? `> ${desc}` : "",
|
|
@@ -1164,7 +1164,6 @@ var OpenAICompatibleProvider = class extends BaseProvider {
|
|
|
1164
1164
|
const message = firstChoice.message;
|
|
1165
1165
|
const finishReason = firstChoice.finish_reason;
|
|
1166
1166
|
const usage = toUsage(response.usage);
|
|
1167
|
-
const contentStr = typeof message.content === "string" ? message.content : "";
|
|
1168
1167
|
const hasToolCalls = !!(message.tool_calls && message.tool_calls.length > 0);
|
|
1169
1168
|
const reasoningContent = message.reasoning_content;
|
|
1170
1169
|
if (message.tool_calls && message.tool_calls.length > 0) {
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
import {
|
|
3
3
|
evaluateCiGate,
|
|
4
4
|
normalizeCiThresholds
|
|
5
|
-
} from "./chunk-
|
|
5
|
+
} from "./chunk-VN6OGMSV.js";
|
|
6
6
|
import {
|
|
7
7
|
buildReviewPrompt,
|
|
8
8
|
buildSecurityReviewPrompt,
|
|
@@ -10,13 +10,13 @@ import {
|
|
|
10
10
|
} from "./chunk-HLWUDRBO.js";
|
|
11
11
|
import {
|
|
12
12
|
ProviderRegistry
|
|
13
|
-
} from "./chunk-
|
|
13
|
+
} from "./chunk-S7ZS7X23.js";
|
|
14
14
|
import {
|
|
15
15
|
ConfigManager
|
|
16
|
-
} from "./chunk-
|
|
16
|
+
} from "./chunk-TBXMRJHS.js";
|
|
17
17
|
import {
|
|
18
18
|
VERSION
|
|
19
|
-
} from "./chunk-
|
|
19
|
+
} from "./chunk-6Q2XAWKP.js";
|
|
20
20
|
|
|
21
21
|
// src/cli/ci.ts
|
|
22
22
|
import { execFileSync } from "child_process";
|
|
@@ -176,7 +176,7 @@ function rebuildIndex(historyDir2) {
|
|
|
176
176
|
return idx;
|
|
177
177
|
}
|
|
178
178
|
function updateSessionInIndex(historyDir2, meta, filePath) {
|
|
179
|
-
|
|
179
|
+
const idx = loadIndex(historyDir2);
|
|
180
180
|
if (!idx) {
|
|
181
181
|
rebuildIndex(historyDir2);
|
|
182
182
|
return;
|
|
@@ -3,14 +3,14 @@ import {
|
|
|
3
3
|
CI_COMMENT_MARKER,
|
|
4
4
|
countSeverity,
|
|
5
5
|
runCi
|
|
6
|
-
} from "./chunk-
|
|
7
|
-
import "./chunk-
|
|
6
|
+
} from "./chunk-VPM5WRJ2.js";
|
|
7
|
+
import "./chunk-VN6OGMSV.js";
|
|
8
8
|
import "./chunk-HLWUDRBO.js";
|
|
9
|
-
import "./chunk-
|
|
10
|
-
import "./chunk-
|
|
9
|
+
import "./chunk-S7ZS7X23.js";
|
|
10
|
+
import "./chunk-TBXMRJHS.js";
|
|
11
11
|
import "./chunk-O3XSFPYH.js";
|
|
12
12
|
import "./chunk-5ULLIOVC.js";
|
|
13
|
-
import "./chunk-
|
|
13
|
+
import "./chunk-6Q2XAWKP.js";
|
|
14
14
|
import "./chunk-IW3Q7AE5.js";
|
|
15
15
|
export {
|
|
16
16
|
CI_COMMENT_MARKER,
|
|
@@ -2,14 +2,14 @@
|
|
|
2
2
|
import {
|
|
3
3
|
formatDoctorReport,
|
|
4
4
|
runDoctorCli
|
|
5
|
-
} from "./chunk-
|
|
6
|
-
import "./chunk-
|
|
7
|
-
import "./chunk-
|
|
8
|
-
import "./chunk-
|
|
5
|
+
} from "./chunk-4GKWLTU3.js";
|
|
6
|
+
import "./chunk-S7ZS7X23.js";
|
|
7
|
+
import "./chunk-TBXMRJHS.js";
|
|
8
|
+
import "./chunk-3IM53IFO.js";
|
|
9
9
|
import "./chunk-O3XSFPYH.js";
|
|
10
10
|
import "./chunk-5ULLIOVC.js";
|
|
11
11
|
import "./chunk-HOSJZMQS.js";
|
|
12
|
-
import "./chunk-
|
|
12
|
+
import "./chunk-6Q2XAWKP.js";
|
|
13
13
|
import "./chunk-IW3Q7AE5.js";
|
|
14
14
|
export {
|
|
15
15
|
formatDoctorReport,
|