jinzd-ai-cli 0.4.47 → 0.4.48
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-VW2RWYKJ.js → chunk-3LYM62CK.js} +1 -1
- package/dist/{chunk-DISJMBZ6.js → chunk-4FTOI5FP.js} +1 -1
- package/dist/{chunk-PUMVM572.js → chunk-6LRI6VU5.js} +26 -23
- package/dist/{chunk-J7OX5EP3.js → chunk-IOBYDSAC.js} +1 -1
- package/dist/{hub-BB7XPZBK.js → hub-5SKCTVFM.js} +1 -1
- package/dist/index.js +6 -6
- package/dist/{run-tests-6JKIZOVZ.js → run-tests-CH5Z6PJY.js} +1 -1
- package/dist/{run-tests-XEPKLO5H.js → run-tests-G4WGBJGQ.js} +1 -1
- package/dist/{server-TQ4GDHKK.js → server-SBFYZ3PX.js} +4 -4
- package/dist/{task-orchestrator-G4UPAHG5.js → task-orchestrator-FZ6MMN23.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-IOBYDSAC.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-3LYM62CK.js";
|
|
24
24
|
|
|
25
25
|
// src/config/config-manager.ts
|
|
26
26
|
import { readFileSync, writeFileSync, existsSync, mkdirSync } from "fs";
|
|
@@ -1544,28 +1544,31 @@ var ZhipuProvider = class extends OpenAICompatibleProvider {
|
|
|
1544
1544
|
};
|
|
1545
1545
|
|
|
1546
1546
|
// src/tools/hallucination.ts
|
|
1547
|
-
var HALLUCINATION_PATTERNS = [
|
|
1548
|
-
/文件路径[::]\s*`?[^\s`]+\.\w{1,5}/,
|
|
1549
|
-
// 文件路径: `path/to/file.ext`
|
|
1550
|
-
/已(?:生成|保存|写入|创建)(?:完成|成功)[::!!]/,
|
|
1551
|
-
// 已生成完成!
|
|
1552
|
-
/已(?:保存|写入|创建)到?\s*[`'"]/,
|
|
1553
|
-
// 已保存到 `path`
|
|
1554
|
-
/File\s+(?:written|saved|created)\s+(?:to|as|at)/i,
|
|
1555
|
-
/生成完成[!!]/,
|
|
1556
|
-
/✅\s*(?:文件|已[生保写创]|第)\S*\.\w{1,5}/,
|
|
1557
|
-
// ✅ 文件已保存 path.ext
|
|
1558
|
-
/✅\s*已完成[::]?\s*第?\d+\s*课时/,
|
|
1559
|
-
// ✅ 已完成:第133课时
|
|
1560
|
-
/(?:教案|文档|文件|代码)已(?:成功)?(?:编写|制作|生成)?并?(?:保存|写入|创建|完成)/,
|
|
1561
|
-
// 教案已经保存
|
|
1562
|
-
/已(?:成功)?(?:保存|写入|完成)了?第?\d+\s*课时的?(?:教案|文档|内容)/,
|
|
1563
|
-
// 已经保存了第133课时的教案
|
|
1564
|
-
/内容如下[::]/,
|
|
1565
|
-
/以下是.*(?:教案|文件|内容)[::]/
|
|
1566
|
-
];
|
|
1567
1547
|
function detectsHallucinatedFileOp(content) {
|
|
1568
|
-
|
|
1548
|
+
const sentences = content.split(/[。!?;!?!;]/);
|
|
1549
|
+
const objects = ["\u6559\u6848", "\u6587\u6863", "\u6587\u4EF6", "\u4EE3\u7801", "\u5185\u5BB9", "lesson plan", "file", "content", "document"];
|
|
1550
|
+
const actions = ["\u5DF2\u4FDD\u5B58", "\u5DF2\u5199\u5165", "\u5DF2\u521B\u5EFA", "\u5DF2\u751F\u6210", "\u7F16\u5199\u5B8C\u6210", "\u4FDD\u5B58\u5B8C\u6210", "\u5199\u5165\u5B8C\u6210", "\u751F\u6210\u5B8C\u6210", "\u6210\u529F\u4FDD\u5B58", "\u6210\u529F\u5199\u5165", "\u4FDD\u5B58\u5230", "\u5199\u5165\u5230", "written", "saved", "created", "generated", "completed"];
|
|
1551
|
+
const lessonPattern = /第\s*\d+\s*课时.*(?:完成|保存|编写)/;
|
|
1552
|
+
for (const s of sentences) {
|
|
1553
|
+
const trimmed = s.trim();
|
|
1554
|
+
if (!trimmed) continue;
|
|
1555
|
+
if (lessonPattern.test(trimmed)) return true;
|
|
1556
|
+
const hasObject = objects.some((obj) => trimmed.includes(obj));
|
|
1557
|
+
const hasAction = actions.some((act) => trimmed.includes(act));
|
|
1558
|
+
if (hasObject && hasAction) {
|
|
1559
|
+
const ignoreKeywords = ["\u662F\u5426", "\u786E\u8BA4", "\u9700\u8981", "\u51C6\u5907", "\u8BA1\u5212", "if you", "do you"];
|
|
1560
|
+
if (!ignoreKeywords.some((ik) => trimmed.includes(ignoreKeywords))) {
|
|
1561
|
+
return true;
|
|
1562
|
+
}
|
|
1563
|
+
}
|
|
1564
|
+
}
|
|
1565
|
+
const backupPatterns = [
|
|
1566
|
+
/✅\s*已完成[::]?\s*第?\d+\s*课时/,
|
|
1567
|
+
/内容如下[::]/,
|
|
1568
|
+
/以下是.*(?:教案|文件|内容)[::]/,
|
|
1569
|
+
/File\s+(?:written|saved|created)\s+(?:to|as|at)/i
|
|
1570
|
+
];
|
|
1571
|
+
return backupPatterns.some((p) => p.test(content));
|
|
1569
1572
|
}
|
|
1570
1573
|
function hadPreviousWriteToolCalls(extraMessages) {
|
|
1571
1574
|
const msgs = extraMessages;
|
|
@@ -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-FZ6MMN23.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-6LRI6VU5.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-IOBYDSAC.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-3LYM62CK.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-G4WGBJGQ.js");
|
|
2103
2103
|
const argStr = args.join(" ").trim();
|
|
2104
2104
|
let testArgs = {};
|
|
2105
2105
|
if (argStr) {
|
|
@@ -5484,7 +5484,7 @@ program.command("web").description("Start Web UI server with browser-based chat
|
|
|
5484
5484
|
console.error("Error: Invalid port number. Must be between 1 and 65535.");
|
|
5485
5485
|
process.exit(1);
|
|
5486
5486
|
}
|
|
5487
|
-
const { startWebServer } = await import("./server-
|
|
5487
|
+
const { startWebServer } = await import("./server-SBFYZ3PX.js");
|
|
5488
5488
|
await startWebServer({ port, host: options.host });
|
|
5489
5489
|
});
|
|
5490
5490
|
program.command("user [action] [username]").description("Manage Web UI users (list | create <name> | delete <name> | reset-password <name> | migrate <name>)").action(async (action, username) => {
|
|
@@ -5717,7 +5717,7 @@ program.command("hub [topic]").description("Start multi-agent hub (discuss / bra
|
|
|
5717
5717
|
}),
|
|
5718
5718
|
config.get("customProviders")
|
|
5719
5719
|
);
|
|
5720
|
-
const { startHub } = await import("./hub-
|
|
5720
|
+
const { startHub } = await import("./hub-5SKCTVFM.js");
|
|
5721
5721
|
await startHub(
|
|
5722
5722
|
{
|
|
5723
5723
|
topic: topic ?? "",
|
|
@@ -15,7 +15,7 @@ import {
|
|
|
15
15
|
hadPreviousWriteToolCalls,
|
|
16
16
|
loadDevState,
|
|
17
17
|
setupProxy
|
|
18
|
-
} from "./chunk-
|
|
18
|
+
} from "./chunk-6LRI6VU5.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-IOBYDSAC.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-3LYM62CK.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-G4WGBJGQ.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-IOBYDSAC.js";
|
|
8
8
|
import "./chunk-4BKXL7SM.js";
|
|
9
9
|
import {
|
|
10
10
|
SUBAGENT_ALLOWED_TOOLS
|
|
11
|
-
} from "./chunk-
|
|
11
|
+
} from "./chunk-3LYM62CK.js";
|
|
12
12
|
|
|
13
13
|
// src/hub/task-orchestrator.ts
|
|
14
14
|
import { createInterface } from "readline";
|