jinzd-ai-cli 0.4.43 → 0.4.44
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/{chunk-LU7HXPO6.js → chunk-5GC3IVW3.js} +19 -14
- package/dist/{chunk-ZE36SAKZ.js → chunk-ENOAIZ4K.js} +4 -2
- package/dist/{chunk-WTYDYRPD.js → chunk-L7R2LZMI.js} +4 -2
- package/dist/{chunk-SJVTPIZR.js → chunk-Q6SAWWSW.js} +1 -1
- package/dist/{hub-GVQRTUUZ.js → hub-XLTDDEB6.js} +1 -1
- package/dist/index.js +6 -6
- package/dist/{run-tests-ARFAMDVH.js → run-tests-BTF54JC2.js} +1 -1
- package/dist/{run-tests-6SHMCMGJ.js → run-tests-I2EPN57R.js} +1 -1
- package/dist/{server-5Z5TLTUF.js → server-QWABC7FF.js} +4 -4
- package/dist/{task-orchestrator-O5242DVR.js → task-orchestrator-ZO37ZGR2.js} +2 -2
- package/package.json +1 -1
|
@@ -7,7 +7,7 @@ import {
|
|
|
7
7
|
ProviderNotFoundError,
|
|
8
8
|
RateLimitError,
|
|
9
9
|
schemaToJsonSchema
|
|
10
|
-
} from "./chunk-
|
|
10
|
+
} from "./chunk-Q6SAWWSW.js";
|
|
11
11
|
import {
|
|
12
12
|
APP_NAME,
|
|
13
13
|
CONFIG_DIR_NAME,
|
|
@@ -20,7 +20,7 @@ import {
|
|
|
20
20
|
MCP_TOOL_PREFIX,
|
|
21
21
|
PLUGINS_DIR_NAME,
|
|
22
22
|
VERSION
|
|
23
|
-
} from "./chunk-
|
|
23
|
+
} from "./chunk-ENOAIZ4K.js";
|
|
24
24
|
|
|
25
25
|
// src/config/config-manager.ts
|
|
26
26
|
import { readFileSync, writeFileSync, existsSync, mkdirSync } from "fs";
|
|
@@ -1623,24 +1623,29 @@ function buildWriteRoundReminder(writtenCount) {
|
|
|
1623
1623
|
return `
|
|
1624
1624
|
|
|
1625
1625
|
[Write Progress Reminder]
|
|
1626
|
-
You have successfully called write_file ${writtenCount} time(s) so far in this turn. If there are more files
|
|
1626
|
+
You have successfully called write_file ${writtenCount} time(s) so far in this turn. If there are more files that MUST be written to complete the user's explicit request, continue now. Otherwise, if you have finished the task, you may provide your final summary.`;
|
|
1627
1627
|
}
|
|
1628
|
-
var HALLUCINATION_CORRECTION_MESSAGE =
|
|
1628
|
+
var HALLUCINATION_CORRECTION_MESSAGE = 'I noticed you mentioned completing a file operation in your response, but no tool call was actually made. If your intention was to create or modify a file, please use the `write_file` or `edit_file` tool now. HOWEVER, if you were just providing an example, summarizing project specs, or referring to existing files, please clarify this in your next response and DO NOT attempt to write any files. Remember: if the user only asked for a "summary" or "analysis", you should NOT be writing files at all.';
|
|
1629
1629
|
function extractClaimedFilePaths(content) {
|
|
1630
1630
|
const paths = /* @__PURE__ */ new Set();
|
|
1631
1631
|
const add = (p) => {
|
|
1632
1632
|
const trimmed = p.trim().replace(/[,,。、;;::]+$/, "");
|
|
1633
|
-
if (trimmed && /\.\w{1,6}$/.test(trimmed))
|
|
1633
|
+
if (trimmed && /\.\w{1,6}$/.test(trimmed) && !trimmed.includes("<") && !trimmed.includes("{")) {
|
|
1634
|
+
paths.add(trimmed);
|
|
1635
|
+
}
|
|
1634
1636
|
};
|
|
1635
|
-
const
|
|
1637
|
+
const lines = content.split("\n").filter((line) => {
|
|
1638
|
+
const skipKeywords = ["\u793A\u4F8B", "\u4F8B\u5982", "\u6A21\u677F", "\u89C4\u8303", "example", "template", "instance", "spec"];
|
|
1639
|
+
return !skipKeywords.some((k) => line.toLowerCase().includes(k));
|
|
1640
|
+
});
|
|
1641
|
+
const filteredContent = lines.join("\n");
|
|
1636
1642
|
let m;
|
|
1637
|
-
|
|
1638
|
-
|
|
1639
|
-
|
|
1640
|
-
|
|
1641
|
-
|
|
1642
|
-
|
|
1643
|
-
while ((m = checkRe.exec(content)) !== null) add(m[1]);
|
|
1643
|
+
const zhRe = /(?:已保存(?:到)?|已写入(?:到)?|已成功(?:创建|生成)|保存为|写入到)\s*[`'"“”]?([^\s`'"“”,,。\n]+?\.\w{1,6})/g;
|
|
1644
|
+
while ((m = zhRe.exec(filteredContent)) !== null) add(m[1]);
|
|
1645
|
+
const enRe = /(?:saved|written|created|generated)\s+(?:to|as|at|successfully)\s+[`'"]?([^\s`'"\n,]+?\.\w{1,6})/gi;
|
|
1646
|
+
while ((m = enRe.exec(filteredContent)) !== null) add(m[1]);
|
|
1647
|
+
const checkRe = /✅\s*(?:文件|已[生保写创]|第)\s*[`'"]?([^\s`'"\n,,。]+?\.\w{1,6})/g;
|
|
1648
|
+
while ((m = checkRe.exec(filteredContent)) !== null) add(m[1]);
|
|
1644
1649
|
return Array.from(paths);
|
|
1645
1650
|
}
|
|
1646
1651
|
function extractWrittenFilePaths(extraMessages) {
|
|
@@ -1713,7 +1718,7 @@ function findPhantomClaims(content, extraMessages) {
|
|
|
1713
1718
|
}
|
|
1714
1719
|
function buildPhantomCorrectionMessage(phantoms) {
|
|
1715
1720
|
const list = phantoms.map((p) => ` - ${p}`).join("\n");
|
|
1716
|
-
return "You
|
|
1721
|
+
return "You mentioned the following file(s) as if they were just processed, but no matching `write_file` tool call was detected in this turn:\n" + list + "\n\nVerification required:\n1. If you intended to CREATE these files, you MUST invoke `write_file` for each one now.\n2. If these are just EXAMPLES or EXISTING files you were summarizing, please ignore this warning, clarify your intent, and STOP your tool-calling loop. Do NOT write them if the user didn't ask you to.";
|
|
1717
1722
|
}
|
|
1718
1723
|
|
|
1719
1724
|
// src/providers/kimi.ts
|
|
@@ -8,7 +8,7 @@ import { platform } from "os";
|
|
|
8
8
|
import chalk from "chalk";
|
|
9
9
|
|
|
10
10
|
// src/core/constants.ts
|
|
11
|
-
var VERSION = "0.4.
|
|
11
|
+
var VERSION = "0.4.44";
|
|
12
12
|
var APP_NAME = "ai-cli";
|
|
13
13
|
var CONFIG_DIR_NAME = ".aicli";
|
|
14
14
|
var CONFIG_FILE_NAME = "config.json";
|
|
@@ -84,7 +84,9 @@ var AGENTIC_BEHAVIOR_GUIDELINE = `# Important Behavioral Guidelines
|
|
|
84
84
|
|
|
85
85
|
**Respond appropriately to the user's intent \u2014 do NOT over-react**:
|
|
86
86
|
- 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.
|
|
87
|
-
- 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.
|
|
87
|
+
- 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.
|
|
88
|
+
- **Be Efficient**: Minimize the number of tool calls. For "understanding a project", reading the README and a few key entry points or configuration files is usually sufficient. Do NOT recursively explore the entire file tree or read every single file unless explicitly asked to.
|
|
89
|
+
- **Stop Early**: Once you have gathered enough information to provide a meaningful answer or summary, STOP using tools and provide your response. Do not use up rounds just because they are available.
|
|
88
90
|
- Only begin using write/execute tools when the user **explicitly requests** an action (e.g., "generate", "create", "modify", "run", "start", etc.).
|
|
89
91
|
- 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.
|
|
90
92
|
- 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.`;
|
|
@@ -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.44";
|
|
10
10
|
var APP_NAME = "ai-cli";
|
|
11
11
|
var CONFIG_DIR_NAME = ".aicli";
|
|
12
12
|
var CONFIG_FILE_NAME = "config.json";
|
|
@@ -81,7 +81,9 @@ var AGENTIC_BEHAVIOR_GUIDELINE = `# Important Behavioral Guidelines
|
|
|
81
81
|
|
|
82
82
|
**Respond appropriately to the user's intent \u2014 do NOT over-react**:
|
|
83
83
|
- 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.
|
|
84
|
-
- 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.
|
|
84
|
+
- 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.
|
|
85
|
+
- **Be Efficient**: Minimize the number of tool calls. For "understanding a project", reading the README and a few key entry points or configuration files is usually sufficient. Do NOT recursively explore the entire file tree or read every single file unless explicitly asked to.
|
|
86
|
+
- **Stop Early**: Once you have gathered enough information to provide a meaningful answer or summary, STOP using tools and provide your response. Do not use up rounds just because they are available.
|
|
85
87
|
- Only begin using write/execute tools when the user **explicitly requests** an action (e.g., "generate", "create", "modify", "run", "start", etc.).
|
|
86
88
|
- 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.
|
|
87
89
|
- 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.`;
|
|
@@ -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-ZO37ZGR2.js");
|
|
389
389
|
const orchestrator = new TaskOrchestrator(config, providers, configManager);
|
|
390
390
|
let interrupted = false;
|
|
391
391
|
const onSigint = () => {
|
package/dist/index.js
CHANGED
|
@@ -24,7 +24,7 @@ import {
|
|
|
24
24
|
saveDevState,
|
|
25
25
|
sessionHasMeaningfulContent,
|
|
26
26
|
setupProxy
|
|
27
|
-
} from "./chunk-
|
|
27
|
+
} from "./chunk-5GC3IVW3.js";
|
|
28
28
|
import {
|
|
29
29
|
ToolExecutor,
|
|
30
30
|
ToolRegistry,
|
|
@@ -37,7 +37,7 @@ import {
|
|
|
37
37
|
spawnAgentContext,
|
|
38
38
|
theme,
|
|
39
39
|
undoStack
|
|
40
|
-
} from "./chunk-
|
|
40
|
+
} from "./chunk-Q6SAWWSW.js";
|
|
41
41
|
import {
|
|
42
42
|
fileCheckpoints
|
|
43
43
|
} from "./chunk-4BKXL7SM.js";
|
|
@@ -61,7 +61,7 @@ import {
|
|
|
61
61
|
SKILLS_DIR_NAME,
|
|
62
62
|
VERSION,
|
|
63
63
|
buildUserIdentityPrompt
|
|
64
|
-
} from "./chunk-
|
|
64
|
+
} from "./chunk-ENOAIZ4K.js";
|
|
65
65
|
|
|
66
66
|
// src/index.ts
|
|
67
67
|
import { program } from "commander";
|
|
@@ -2099,7 +2099,7 @@ ${hint}` : "")
|
|
|
2099
2099
|
usage: "/test [command|filter]",
|
|
2100
2100
|
async execute(args, ctx) {
|
|
2101
2101
|
try {
|
|
2102
|
-
const { executeTests } = await import("./run-tests-
|
|
2102
|
+
const { executeTests } = await import("./run-tests-I2EPN57R.js");
|
|
2103
2103
|
const argStr = args.join(" ").trim();
|
|
2104
2104
|
let testArgs = {};
|
|
2105
2105
|
if (argStr) {
|
|
@@ -5469,7 +5469,7 @@ program.command("web").description("Start Web UI server with browser-based chat
|
|
|
5469
5469
|
console.error("Error: Invalid port number. Must be between 1 and 65535.");
|
|
5470
5470
|
process.exit(1);
|
|
5471
5471
|
}
|
|
5472
|
-
const { startWebServer } = await import("./server-
|
|
5472
|
+
const { startWebServer } = await import("./server-QWABC7FF.js");
|
|
5473
5473
|
await startWebServer({ port, host: options.host });
|
|
5474
5474
|
});
|
|
5475
5475
|
program.command("user [action] [username]").description("Manage Web UI users (list | create <name> | delete <name> | reset-password <name> | migrate <name>)").action(async (action, username) => {
|
|
@@ -5702,7 +5702,7 @@ program.command("hub [topic]").description("Start multi-agent hub (discuss / bra
|
|
|
5702
5702
|
}),
|
|
5703
5703
|
config.get("customProviders")
|
|
5704
5704
|
);
|
|
5705
|
-
const { startHub } = await import("./hub-
|
|
5705
|
+
const { startHub } = await import("./hub-XLTDDEB6.js");
|
|
5706
5706
|
await startHub(
|
|
5707
5707
|
{
|
|
5708
5708
|
topic: topic ?? "",
|
|
@@ -15,7 +15,7 @@ import {
|
|
|
15
15
|
hadPreviousWriteToolCalls,
|
|
16
16
|
loadDevState,
|
|
17
17
|
setupProxy
|
|
18
|
-
} from "./chunk-
|
|
18
|
+
} from "./chunk-5GC3IVW3.js";
|
|
19
19
|
import {
|
|
20
20
|
AuthManager
|
|
21
21
|
} from "./chunk-BYNY5JPB.js";
|
|
@@ -33,7 +33,7 @@ import {
|
|
|
33
33
|
spawnAgentContext,
|
|
34
34
|
truncateOutput,
|
|
35
35
|
undoStack
|
|
36
|
-
} from "./chunk-
|
|
36
|
+
} from "./chunk-Q6SAWWSW.js";
|
|
37
37
|
import "./chunk-4BKXL7SM.js";
|
|
38
38
|
import {
|
|
39
39
|
AGENTIC_BEHAVIOR_GUIDELINE,
|
|
@@ -52,7 +52,7 @@ import {
|
|
|
52
52
|
SKILLS_DIR_NAME,
|
|
53
53
|
VERSION,
|
|
54
54
|
buildUserIdentityPrompt
|
|
55
|
-
} from "./chunk-
|
|
55
|
+
} from "./chunk-ENOAIZ4K.js";
|
|
56
56
|
|
|
57
57
|
// src/web/server.ts
|
|
58
58
|
import express from "express";
|
|
@@ -1606,7 +1606,7 @@ ${undoResults.map((r) => ` \u2022 ${r}`).join("\n")}` });
|
|
|
1606
1606
|
case "test": {
|
|
1607
1607
|
this.send({ type: "info", message: "\u{1F9EA} Running tests..." });
|
|
1608
1608
|
try {
|
|
1609
|
-
const { executeTests } = await import("./run-tests-
|
|
1609
|
+
const { executeTests } = await import("./run-tests-I2EPN57R.js");
|
|
1610
1610
|
const argStr = args.join(" ").trim();
|
|
1611
1611
|
let testArgs = {};
|
|
1612
1612
|
if (argStr) {
|
|
@@ -4,11 +4,11 @@ import {
|
|
|
4
4
|
getDangerLevel,
|
|
5
5
|
googleSearchContext,
|
|
6
6
|
truncateOutput
|
|
7
|
-
} from "./chunk-
|
|
7
|
+
} from "./chunk-Q6SAWWSW.js";
|
|
8
8
|
import "./chunk-4BKXL7SM.js";
|
|
9
9
|
import {
|
|
10
10
|
SUBAGENT_ALLOWED_TOOLS
|
|
11
|
-
} from "./chunk-
|
|
11
|
+
} from "./chunk-ENOAIZ4K.js";
|
|
12
12
|
|
|
13
13
|
// src/hub/task-orchestrator.ts
|
|
14
14
|
import { createInterface } from "readline";
|