jinzd-ai-cli 0.4.97 → 0.4.99
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-EQW2AHNH.js → batch-7DMVTZSV.js} +2 -2
- package/dist/{chunk-7ICZMPIK.js → chunk-7NWJTFYS.js} +5 -3
- package/dist/{chunk-5IGSGHOY.js → chunk-DRUEPDBJ.js} +3 -1
- package/dist/{chunk-VYU6KKQG.js → chunk-P3PTLB4T.js} +1 -1
- package/dist/{chunk-6Y7D5ZH6.js → chunk-PVOAXVZM.js} +2 -2
- package/dist/{chunk-ZDEQ6F6I.js → chunk-UWLEBELB.js} +1 -1
- package/dist/{chunk-YX5DCUCX.js → chunk-Y7BS6NOY.js} +3 -1
- package/dist/electron-server.js +5 -3
- package/dist/{hub-PS4HT3YH.js → hub-RUAWQFK2.js} +1 -1
- package/dist/index.js +10 -10
- package/dist/{run-tests-Q37NBHZI.js → run-tests-B3XHGUVD.js} +2 -2
- package/dist/{run-tests-FL2UI4A4.js → run-tests-LRPE4YY3.js} +1 -1
- package/dist/{server-MVUF5NWA.js → server-EGOEPMSQ.js} +6 -6
- package/dist/{server-NGZP6A74.js → server-WCI7SGTN.js} +3 -3
- package/dist/{task-orchestrator-T37RXXJP.js → task-orchestrator-EZK6NLQW.js} +3 -3
- package/package.json +1 -1
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
import {
|
|
3
3
|
ConfigManager
|
|
4
|
-
} from "./chunk-
|
|
4
|
+
} from "./chunk-UWLEBELB.js";
|
|
5
5
|
import "./chunk-2ZD3YTVM.js";
|
|
6
|
-
import "./chunk-
|
|
6
|
+
import "./chunk-Y7BS6NOY.js";
|
|
7
7
|
|
|
8
8
|
// src/cli/batch.ts
|
|
9
9
|
import Anthropic from "@anthropic-ai/sdk";
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
import {
|
|
3
3
|
schemaToJsonSchema,
|
|
4
4
|
truncateForPersist
|
|
5
|
-
} from "./chunk-
|
|
5
|
+
} from "./chunk-PVOAXVZM.js";
|
|
6
6
|
import {
|
|
7
7
|
AuthError,
|
|
8
8
|
ProviderError,
|
|
@@ -21,7 +21,7 @@ import {
|
|
|
21
21
|
MCP_PROTOCOL_VERSION,
|
|
22
22
|
MCP_TOOL_PREFIX,
|
|
23
23
|
VERSION
|
|
24
|
-
} from "./chunk-
|
|
24
|
+
} from "./chunk-Y7BS6NOY.js";
|
|
25
25
|
|
|
26
26
|
// src/providers/claude.ts
|
|
27
27
|
import Anthropic from "@anthropic-ai/sdk";
|
|
@@ -1299,7 +1299,9 @@ var DeepSeekProvider = class extends OpenAICompatibleProvider {
|
|
|
1299
1299
|
};
|
|
1300
1300
|
const result = await super.chatWithTools(enhancedRequest, tools);
|
|
1301
1301
|
const hasBashTool = tools.some((t) => t.name === "bash");
|
|
1302
|
-
|
|
1302
|
+
const extraMsgs = request._extraMessages ?? [];
|
|
1303
|
+
const alreadyUsedTools = extraMsgs.some((m) => m?.role === "tool");
|
|
1304
|
+
if (hasBashTool && !alreadyUsedTools && "content" in result && result.content && detectsCodeBlockPseudoCall(result.content)) {
|
|
1303
1305
|
process.stderr.write(
|
|
1304
1306
|
`[deepseek] \u26A0 Detected code block pseudo-tool-call (DeepSeek wrote code in text instead of calling a tool). Forcing retry...
|
|
1305
1307
|
`
|
|
@@ -6,7 +6,7 @@ import { platform } from "os";
|
|
|
6
6
|
import chalk from "chalk";
|
|
7
7
|
|
|
8
8
|
// src/core/constants.ts
|
|
9
|
-
var VERSION = "0.4.
|
|
9
|
+
var VERSION = "0.4.99";
|
|
10
10
|
var APP_NAME = "ai-cli";
|
|
11
11
|
var CONFIG_DIR_NAME = ".aicli";
|
|
12
12
|
var CONFIG_FILE_NAME = "config.json";
|
|
@@ -97,6 +97,8 @@ var AGENTIC_BEHAVIOR_GUIDELINE = `# Important Behavioral Guidelines
|
|
|
97
97
|
- For **greetings and casual chat** (e.g., "hello", "hi", "hey", "\u4F60\u597D", "what's up"): respond naturally with a friendly greeting. Do NOT use any tools. Do NOT explore directories, read files, or start any project work. Just chat.
|
|
98
98
|
- When the user asks you to "read", "understand", "review", "analyze", "examine", or "look at" files or a project, your task is only to **read and summarize**, then wait for the user's next instruction. Do not automatically start executing tasks described in the project.
|
|
99
99
|
- Only begin using write/execute tools when the user **explicitly requests** an action (e.g., "generate", "create", "modify", "run", "start", etc.).
|
|
100
|
+
- **Stop when the explicit task is done \u2014 do NOT autonomously test, verify, or run what you just created.** If the user asks "write/create/save file X", finish writing the file and STOP. Do not run it, do not test it, do not "verify it works" with bash/run_interactive. The user will run it themselves and tell you if anything is wrong. Only run/test when the user explicitly says "run", "test", "execute", "try it", "verify", "make sure it works", etc.
|
|
101
|
+
- **Do NOT retry the same failing command with variants.** If a command fails (exit code non-zero), report the failure to the user with a brief diagnosis and STOP. Do not loop through alternate shells, alternate quoting, alternate paths, or alternate Python invocations. The user can decide whether to retry.
|
|
100
102
|
- Project context files (CLAUDE.md, AICLI.md) provide background information about the project. They are NOT instructions to start working. Only use them as reference when the user asks a project-related question or task.
|
|
101
103
|
- If you are unsure about the user's intent, use the ask_user tool to confirm with the user, rather than assuming and executing on your own.
|
|
102
104
|
- **Do NOT abuse ask_user for redundant confirmations**: When the user has already given a clear, explicit instruction (e.g., "write lesson 142", "generate file X", "create the report"), execute it immediately. Do NOT ask "are you sure?" or request details that can be found in project documents. Repeatedly asking the user to confirm wastes their time and is extremely frustrating. Only use ask_user when critical information is genuinely missing and cannot be inferred from context files.`;
|
|
@@ -23,7 +23,7 @@ import {
|
|
|
23
23
|
} from "./chunk-6VRJGH25.js";
|
|
24
24
|
import {
|
|
25
25
|
runTestsTool
|
|
26
|
-
} from "./chunk-
|
|
26
|
+
} from "./chunk-P3PTLB4T.js";
|
|
27
27
|
import {
|
|
28
28
|
CONFIG_DIR_NAME,
|
|
29
29
|
DEFAULT_MAX_TOOL_OUTPUT_CHARS_CAP,
|
|
@@ -31,7 +31,7 @@ import {
|
|
|
31
31
|
SUBAGENT_ALLOWED_TOOLS,
|
|
32
32
|
SUBAGENT_DEFAULT_MAX_ROUNDS,
|
|
33
33
|
SUBAGENT_MAX_ROUNDS_LIMIT
|
|
34
|
-
} from "./chunk-
|
|
34
|
+
} from "./chunk-Y7BS6NOY.js";
|
|
35
35
|
|
|
36
36
|
// src/tools/types.ts
|
|
37
37
|
function isFileWriteTool(name) {
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
|
|
3
3
|
// src/core/constants.ts
|
|
4
|
-
var VERSION = "0.4.
|
|
4
|
+
var VERSION = "0.4.99";
|
|
5
5
|
var APP_NAME = "ai-cli";
|
|
6
6
|
var CONFIG_DIR_NAME = ".aicli";
|
|
7
7
|
var CONFIG_FILE_NAME = "config.json";
|
|
@@ -93,6 +93,8 @@ var AGENTIC_BEHAVIOR_GUIDELINE = `# Important Behavioral Guidelines
|
|
|
93
93
|
- For **greetings and casual chat** (e.g., "hello", "hi", "hey", "\u4F60\u597D", "what's up"): respond naturally with a friendly greeting. Do NOT use any tools. Do NOT explore directories, read files, or start any project work. Just chat.
|
|
94
94
|
- When the user asks you to "read", "understand", "review", "analyze", "examine", or "look at" files or a project, your task is only to **read and summarize**, then wait for the user's next instruction. Do not automatically start executing tasks described in the project.
|
|
95
95
|
- Only begin using write/execute tools when the user **explicitly requests** an action (e.g., "generate", "create", "modify", "run", "start", etc.).
|
|
96
|
+
- **Stop when the explicit task is done \u2014 do NOT autonomously test, verify, or run what you just created.** If the user asks "write/create/save file X", finish writing the file and STOP. Do not run it, do not test it, do not "verify it works" with bash/run_interactive. The user will run it themselves and tell you if anything is wrong. Only run/test when the user explicitly says "run", "test", "execute", "try it", "verify", "make sure it works", etc.
|
|
97
|
+
- **Do NOT retry the same failing command with variants.** If a command fails (exit code non-zero), report the failure to the user with a brief diagnosis and STOP. Do not loop through alternate shells, alternate quoting, alternate paths, or alternate Python invocations. The user can decide whether to retry.
|
|
96
98
|
- Project context files (CLAUDE.md, AICLI.md) provide background information about the project. They are NOT instructions to start working. Only use them as reference when the user asks a project-related question or task.
|
|
97
99
|
- If you are unsure about the user's intent, use the ask_user tool to confirm with the user, rather than assuming and executing on your own.
|
|
98
100
|
- **Do NOT abuse ask_user for redundant confirmations**: When the user has already given a clear, explicit instruction (e.g., "write lesson 142", "generate file X", "create the report"), execute it immediately. Do NOT ask "are you sure?" or request details that can be found in project documents. Repeatedly asking the user to confirm wastes their time and is extremely frustrating. Only use ask_user when critical information is genuinely missing and cannot be inferred from context files.`;
|
package/dist/electron-server.js
CHANGED
|
@@ -36,7 +36,7 @@ import {
|
|
|
36
36
|
VERSION,
|
|
37
37
|
buildUserIdentityPrompt,
|
|
38
38
|
runTestsTool
|
|
39
|
-
} from "./chunk-
|
|
39
|
+
} from "./chunk-DRUEPDBJ.js";
|
|
40
40
|
import {
|
|
41
41
|
hasSemanticIndex,
|
|
42
42
|
semanticSearch
|
|
@@ -1810,7 +1810,9 @@ var DeepSeekProvider = class extends OpenAICompatibleProvider {
|
|
|
1810
1810
|
};
|
|
1811
1811
|
const result = await super.chatWithTools(enhancedRequest, tools);
|
|
1812
1812
|
const hasBashTool = tools.some((t) => t.name === "bash");
|
|
1813
|
-
|
|
1813
|
+
const extraMsgs = request._extraMessages ?? [];
|
|
1814
|
+
const alreadyUsedTools = extraMsgs.some((m) => m?.role === "tool");
|
|
1815
|
+
if (hasBashTool && !alreadyUsedTools && "content" in result && result.content && detectsCodeBlockPseudoCall(result.content)) {
|
|
1814
1816
|
process.stderr.write(
|
|
1815
1817
|
`[deepseek] \u26A0 Detected code block pseudo-tool-call (DeepSeek wrote code in text instead of calling a tool). Forcing retry...
|
|
1816
1818
|
`
|
|
@@ -11400,7 +11402,7 @@ ${undoResults.map((r) => ` \u2022 ${r}`).join("\n")}` });
|
|
|
11400
11402
|
case "test": {
|
|
11401
11403
|
this.send({ type: "info", message: "\u{1F9EA} Running tests..." });
|
|
11402
11404
|
try {
|
|
11403
|
-
const { executeTests } = await import("./run-tests-
|
|
11405
|
+
const { executeTests } = await import("./run-tests-LRPE4YY3.js");
|
|
11404
11406
|
const argStr = args.join(" ").trim();
|
|
11405
11407
|
let testArgs = {};
|
|
11406
11408
|
if (argStr) {
|
|
@@ -385,7 +385,7 @@ ${content}`);
|
|
|
385
385
|
}
|
|
386
386
|
}
|
|
387
387
|
async function runTaskMode(config, providers, configManager, topic) {
|
|
388
|
-
const { TaskOrchestrator } = await import("./task-orchestrator-
|
|
388
|
+
const { TaskOrchestrator } = await import("./task-orchestrator-EZK6NLQW.js");
|
|
389
389
|
const orchestrator = new TaskOrchestrator(config, providers, configManager);
|
|
390
390
|
let interrupted = false;
|
|
391
391
|
const onSigint = () => {
|
package/dist/index.js
CHANGED
|
@@ -30,10 +30,10 @@ import {
|
|
|
30
30
|
saveDevState,
|
|
31
31
|
sessionHasMeaningfulContent,
|
|
32
32
|
setupProxy
|
|
33
|
-
} from "./chunk-
|
|
33
|
+
} from "./chunk-7NWJTFYS.js";
|
|
34
34
|
import {
|
|
35
35
|
ConfigManager
|
|
36
|
-
} from "./chunk-
|
|
36
|
+
} from "./chunk-UWLEBELB.js";
|
|
37
37
|
import {
|
|
38
38
|
ToolExecutor,
|
|
39
39
|
ToolRegistry,
|
|
@@ -52,7 +52,7 @@ import {
|
|
|
52
52
|
spawnAgentContext,
|
|
53
53
|
theme,
|
|
54
54
|
undoStack
|
|
55
|
-
} from "./chunk-
|
|
55
|
+
} from "./chunk-PVOAXVZM.js";
|
|
56
56
|
import "./chunk-2ZD3YTVM.js";
|
|
57
57
|
import {
|
|
58
58
|
fileCheckpoints
|
|
@@ -70,7 +70,7 @@ import "./chunk-KJLJPUY2.js";
|
|
|
70
70
|
import "./chunk-6VRJGH25.js";
|
|
71
71
|
import "./chunk-2DXY7UGF.js";
|
|
72
72
|
import "./chunk-KHYD3WXE.js";
|
|
73
|
-
import "./chunk-
|
|
73
|
+
import "./chunk-P3PTLB4T.js";
|
|
74
74
|
import {
|
|
75
75
|
AGENTIC_BEHAVIOR_GUIDELINE,
|
|
76
76
|
AUTHOR,
|
|
@@ -92,7 +92,7 @@ import {
|
|
|
92
92
|
SKILLS_DIR_NAME,
|
|
93
93
|
VERSION,
|
|
94
94
|
buildUserIdentityPrompt
|
|
95
|
-
} from "./chunk-
|
|
95
|
+
} from "./chunk-Y7BS6NOY.js";
|
|
96
96
|
|
|
97
97
|
// src/index.ts
|
|
98
98
|
import { program } from "commander";
|
|
@@ -2612,7 +2612,7 @@ ${hint}` : "")
|
|
|
2612
2612
|
usage: "/test [command|filter]",
|
|
2613
2613
|
async execute(args, ctx) {
|
|
2614
2614
|
try {
|
|
2615
|
-
const { executeTests } = await import("./run-tests-
|
|
2615
|
+
const { executeTests } = await import("./run-tests-B3XHGUVD.js");
|
|
2616
2616
|
const argStr = args.join(" ").trim();
|
|
2617
2617
|
let testArgs = {};
|
|
2618
2618
|
if (argStr) {
|
|
@@ -6752,7 +6752,7 @@ program.command("web").description("Start Web UI server with browser-based chat
|
|
|
6752
6752
|
console.error("Error: Invalid port number. Must be between 1 and 65535.");
|
|
6753
6753
|
process.exit(1);
|
|
6754
6754
|
}
|
|
6755
|
-
const { startWebServer } = await import("./server-
|
|
6755
|
+
const { startWebServer } = await import("./server-EGOEPMSQ.js");
|
|
6756
6756
|
await startWebServer({ port, host: options.host });
|
|
6757
6757
|
});
|
|
6758
6758
|
program.command("user [action] [username]").description("Manage Web UI users (list | create <name> | delete <name> | reset-password <name> | migrate <name>)").action(async (action, username) => {
|
|
@@ -6875,7 +6875,7 @@ program.command("sessions").description("List recent conversation sessions").act
|
|
|
6875
6875
|
});
|
|
6876
6876
|
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) => {
|
|
6877
6877
|
try {
|
|
6878
|
-
const batch = await import("./batch-
|
|
6878
|
+
const batch = await import("./batch-7DMVTZSV.js");
|
|
6879
6879
|
switch (action) {
|
|
6880
6880
|
case "submit":
|
|
6881
6881
|
if (!arg) {
|
|
@@ -6918,7 +6918,7 @@ program.command("batch <action> [arg] [arg2]").description("Anthropic Message Ba
|
|
|
6918
6918
|
}
|
|
6919
6919
|
});
|
|
6920
6920
|
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) => {
|
|
6921
|
-
const { startMcpServer } = await import("./server-
|
|
6921
|
+
const { startMcpServer } = await import("./server-WCI7SGTN.js");
|
|
6922
6922
|
await startMcpServer({
|
|
6923
6923
|
allowDestructive: !!options.allowDestructive,
|
|
6924
6924
|
allowOutsideCwd: !!options.allowOutsideCwd,
|
|
@@ -7045,7 +7045,7 @@ program.command("hub [topic]").description("Start multi-agent hub (discuss / bra
|
|
|
7045
7045
|
}),
|
|
7046
7046
|
config.get("customProviders")
|
|
7047
7047
|
);
|
|
7048
|
-
const { startHub } = await import("./hub-
|
|
7048
|
+
const { startHub } = await import("./hub-RUAWQFK2.js");
|
|
7049
7049
|
await startHub(
|
|
7050
7050
|
{
|
|
7051
7051
|
topic: topic ?? "",
|
|
@@ -23,10 +23,10 @@ import {
|
|
|
23
23
|
persistToolRound,
|
|
24
24
|
rebuildExtraMessages,
|
|
25
25
|
setupProxy
|
|
26
|
-
} from "./chunk-
|
|
26
|
+
} from "./chunk-7NWJTFYS.js";
|
|
27
27
|
import {
|
|
28
28
|
ConfigManager
|
|
29
|
-
} from "./chunk-
|
|
29
|
+
} from "./chunk-UWLEBELB.js";
|
|
30
30
|
import {
|
|
31
31
|
ToolExecutor,
|
|
32
32
|
ToolRegistry,
|
|
@@ -44,7 +44,7 @@ import {
|
|
|
44
44
|
spawnAgentContext,
|
|
45
45
|
truncateOutput,
|
|
46
46
|
undoStack
|
|
47
|
-
} from "./chunk-
|
|
47
|
+
} from "./chunk-PVOAXVZM.js";
|
|
48
48
|
import "./chunk-2ZD3YTVM.js";
|
|
49
49
|
import "./chunk-4BKXL7SM.js";
|
|
50
50
|
import "./chunk-ANYYM4CF.js";
|
|
@@ -53,7 +53,7 @@ import "./chunk-KJLJPUY2.js";
|
|
|
53
53
|
import "./chunk-6VRJGH25.js";
|
|
54
54
|
import "./chunk-2DXY7UGF.js";
|
|
55
55
|
import "./chunk-KHYD3WXE.js";
|
|
56
|
-
import "./chunk-
|
|
56
|
+
import "./chunk-P3PTLB4T.js";
|
|
57
57
|
import {
|
|
58
58
|
AGENTIC_BEHAVIOR_GUIDELINE,
|
|
59
59
|
AUTHOR,
|
|
@@ -72,7 +72,7 @@ import {
|
|
|
72
72
|
SKILLS_DIR_NAME,
|
|
73
73
|
VERSION,
|
|
74
74
|
buildUserIdentityPrompt
|
|
75
|
-
} from "./chunk-
|
|
75
|
+
} from "./chunk-Y7BS6NOY.js";
|
|
76
76
|
|
|
77
77
|
// src/web/server.ts
|
|
78
78
|
import express from "express";
|
|
@@ -2251,7 +2251,7 @@ ${undoResults.map((r) => ` \u2022 ${r}`).join("\n")}` });
|
|
|
2251
2251
|
case "test": {
|
|
2252
2252
|
this.send({ type: "info", message: "\u{1F9EA} Running tests..." });
|
|
2253
2253
|
try {
|
|
2254
|
-
const { executeTests } = await import("./run-tests-
|
|
2254
|
+
const { executeTests } = await import("./run-tests-B3XHGUVD.js");
|
|
2255
2255
|
const argStr = args.join(" ").trim();
|
|
2256
2256
|
let testArgs = {};
|
|
2257
2257
|
if (argStr) {
|
|
@@ -3,7 +3,7 @@ import {
|
|
|
3
3
|
ToolRegistry,
|
|
4
4
|
getDangerLevel,
|
|
5
5
|
schemaToJsonSchema
|
|
6
|
-
} from "./chunk-
|
|
6
|
+
} from "./chunk-PVOAXVZM.js";
|
|
7
7
|
import "./chunk-2ZD3YTVM.js";
|
|
8
8
|
import "./chunk-4BKXL7SM.js";
|
|
9
9
|
import "./chunk-ANYYM4CF.js";
|
|
@@ -12,10 +12,10 @@ import "./chunk-KJLJPUY2.js";
|
|
|
12
12
|
import "./chunk-6VRJGH25.js";
|
|
13
13
|
import "./chunk-2DXY7UGF.js";
|
|
14
14
|
import "./chunk-KHYD3WXE.js";
|
|
15
|
-
import "./chunk-
|
|
15
|
+
import "./chunk-P3PTLB4T.js";
|
|
16
16
|
import {
|
|
17
17
|
VERSION
|
|
18
|
-
} from "./chunk-
|
|
18
|
+
} from "./chunk-Y7BS6NOY.js";
|
|
19
19
|
|
|
20
20
|
// src/mcp/server.ts
|
|
21
21
|
import { createInterface } from "readline";
|
|
@@ -4,7 +4,7 @@ import {
|
|
|
4
4
|
getDangerLevel,
|
|
5
5
|
googleSearchContext,
|
|
6
6
|
truncateOutput
|
|
7
|
-
} from "./chunk-
|
|
7
|
+
} from "./chunk-PVOAXVZM.js";
|
|
8
8
|
import "./chunk-2ZD3YTVM.js";
|
|
9
9
|
import "./chunk-4BKXL7SM.js";
|
|
10
10
|
import "./chunk-ANYYM4CF.js";
|
|
@@ -13,10 +13,10 @@ import "./chunk-KJLJPUY2.js";
|
|
|
13
13
|
import "./chunk-6VRJGH25.js";
|
|
14
14
|
import "./chunk-2DXY7UGF.js";
|
|
15
15
|
import "./chunk-KHYD3WXE.js";
|
|
16
|
-
import "./chunk-
|
|
16
|
+
import "./chunk-P3PTLB4T.js";
|
|
17
17
|
import {
|
|
18
18
|
SUBAGENT_ALLOWED_TOOLS
|
|
19
|
-
} from "./chunk-
|
|
19
|
+
} from "./chunk-Y7BS6NOY.js";
|
|
20
20
|
|
|
21
21
|
// src/hub/task-orchestrator.ts
|
|
22
22
|
import { createInterface } from "readline";
|