jinzd-ai-cli 0.4.19 → 0.4.20
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-DBEYB76P.js → chunk-IR6JR3GH.js} +3 -3
- package/dist/{chunk-JNAZORS2.js → chunk-XKWQJ5K4.js} +1 -1
- package/dist/{chunk-6WLDJKHU.js → chunk-ZIFAZ4EJ.js} +1 -1
- package/dist/{chunk-PR5JZVNN.js → chunk-ZZPMHXTT.js} +1 -1
- package/dist/{hub-RJRNBB5G.js → hub-J3OGSYQ5.js} +1 -1
- package/dist/index.js +37 -21
- package/dist/{run-tests-AUTWQ5NB.js → run-tests-DFZRFWDU.js} +1 -1
- package/dist/{run-tests-HP4MMQAP.js → run-tests-S3UPP5B4.js} +1 -1
- package/dist/{server-JFLTWF7Q.js → server-HAZM4ENT.js} +4 -4
- package/dist/{task-orchestrator-JKY2T2W3.js → task-orchestrator-GFNC3Y6D.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-ZZPMHXTT.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-XKWQJ5K4.js";
|
|
24
24
|
|
|
25
25
|
// src/config/config-manager.ts
|
|
26
26
|
import { readFileSync, writeFileSync, existsSync, mkdirSync } from "fs";
|
|
@@ -3441,7 +3441,7 @@ function saveDevState(content) {
|
|
|
3441
3441
|
if (trimmed.length > DEV_STATE_MAX_CHARS) {
|
|
3442
3442
|
trimmed = trimmed.slice(0, DEV_STATE_MAX_CHARS);
|
|
3443
3443
|
const lastNewline = trimmed.lastIndexOf("\n");
|
|
3444
|
-
if (lastNewline >
|
|
3444
|
+
if (lastNewline > 0) {
|
|
3445
3445
|
trimmed = trimmed.slice(0, lastNewline);
|
|
3446
3446
|
}
|
|
3447
3447
|
trimmed += "\n\n[...truncated]";
|
|
@@ -387,7 +387,7 @@ ${content}`);
|
|
|
387
387
|
}
|
|
388
388
|
}
|
|
389
389
|
async function runTaskMode(config, providers, configManager, topic) {
|
|
390
|
-
const { TaskOrchestrator } = await import("./task-orchestrator-
|
|
390
|
+
const { TaskOrchestrator } = await import("./task-orchestrator-GFNC3Y6D.js");
|
|
391
391
|
const orchestrator = new TaskOrchestrator(config, providers, configManager);
|
|
392
392
|
let interrupted = false;
|
|
393
393
|
const onSigint = () => {
|
package/dist/index.js
CHANGED
|
@@ -23,7 +23,7 @@ import {
|
|
|
23
23
|
saveDevState,
|
|
24
24
|
sessionHasMeaningfulContent,
|
|
25
25
|
setupProxy
|
|
26
|
-
} from "./chunk-
|
|
26
|
+
} from "./chunk-IR6JR3GH.js";
|
|
27
27
|
import {
|
|
28
28
|
ToolRegistry,
|
|
29
29
|
askUserContext,
|
|
@@ -38,7 +38,7 @@ import {
|
|
|
38
38
|
theme,
|
|
39
39
|
truncateOutput,
|
|
40
40
|
undoStack
|
|
41
|
-
} from "./chunk-
|
|
41
|
+
} from "./chunk-ZZPMHXTT.js";
|
|
42
42
|
import {
|
|
43
43
|
AGENTIC_BEHAVIOR_GUIDELINE,
|
|
44
44
|
AUTHOR,
|
|
@@ -58,7 +58,7 @@ import {
|
|
|
58
58
|
REPO_URL,
|
|
59
59
|
SKILLS_DIR_NAME,
|
|
60
60
|
VERSION
|
|
61
|
-
} from "./chunk-
|
|
61
|
+
} from "./chunk-XKWQJ5K4.js";
|
|
62
62
|
|
|
63
63
|
// src/index.ts
|
|
64
64
|
import { program } from "commander";
|
|
@@ -350,7 +350,7 @@ var Renderer = class {
|
|
|
350
350
|
} catch (err) {
|
|
351
351
|
if (err?.name === "AbortError") {
|
|
352
352
|
interrupted = true;
|
|
353
|
-
flushBuf();
|
|
353
|
+
if (!inThinking) flushBuf();
|
|
354
354
|
} else {
|
|
355
355
|
throw err;
|
|
356
356
|
}
|
|
@@ -423,6 +423,9 @@ var Renderer = class {
|
|
|
423
423
|
process.stdout.write(theme.dim("\n\u{1F4AD} Thinking...\n"));
|
|
424
424
|
}
|
|
425
425
|
}
|
|
426
|
+
if (this.wrapWidth > 0) {
|
|
427
|
+
displayed = wrapText(displayed, this.wrapWidth);
|
|
428
|
+
}
|
|
426
429
|
const CHUNK_SIZE = 12;
|
|
427
430
|
const DELAY_MS = 8;
|
|
428
431
|
let pos = 0;
|
|
@@ -1038,11 +1041,18 @@ function createDefaultCommands() {
|
|
|
1038
1041
|
return;
|
|
1039
1042
|
}
|
|
1040
1043
|
const sessions = ctx.sessions.listSessions();
|
|
1041
|
-
const
|
|
1042
|
-
if (
|
|
1044
|
+
const matches = sessions.filter((s) => s.id.startsWith(id));
|
|
1045
|
+
if (matches.length === 0) {
|
|
1043
1046
|
ctx.renderer.renderError(`Session '${id}' not found.`);
|
|
1044
1047
|
return;
|
|
1045
1048
|
}
|
|
1049
|
+
if (matches.length > 1) {
|
|
1050
|
+
console.log(theme.warning(` \u26A0 Ambiguous prefix '${id}' matches ${matches.length} sessions \u2014 loading most recent:`));
|
|
1051
|
+
for (const m of matches.slice(0, 5)) {
|
|
1052
|
+
console.log(theme.dim(` ${m.id.slice(0, 12)} ${m.title ?? "(untitled)"}`));
|
|
1053
|
+
}
|
|
1054
|
+
}
|
|
1055
|
+
const match = matches[0];
|
|
1046
1056
|
ctx.sessions.loadSession(match.id);
|
|
1047
1057
|
ctx.setProvider(match.provider, match.model);
|
|
1048
1058
|
ctx.resetSessionTokenUsage();
|
|
@@ -1155,7 +1165,8 @@ function createDefaultCommands() {
|
|
|
1155
1165
|
const estStr = fmtCtx(estimated);
|
|
1156
1166
|
const winStr = fmtCtx(ctxWindowSize);
|
|
1157
1167
|
const pctColor = pct >= 80 ? theme.error : pct >= 60 ? theme.warning : theme.success;
|
|
1158
|
-
|
|
1168
|
+
const pctDisplay = pct > 100 ? `${pct}% \u26A0 over limit` : `${pct}%`;
|
|
1169
|
+
console.log(` Context% : ~${estStr} / ${winStr} tokens (${pctColor(pctDisplay)})`);
|
|
1159
1170
|
}
|
|
1160
1171
|
console.log();
|
|
1161
1172
|
}
|
|
@@ -1821,7 +1832,8 @@ ${hint}` : "")
|
|
|
1821
1832
|
}
|
|
1822
1833
|
const ok = ctx.restoreCheckpoint(name);
|
|
1823
1834
|
if (ok) {
|
|
1824
|
-
|
|
1835
|
+
ctx.resetSessionTokenUsage();
|
|
1836
|
+
console.log(theme.success(` \u2713 Restored to checkpoint "${name}" (${session.messages.length} messages, token usage reset)`));
|
|
1825
1837
|
} else {
|
|
1826
1838
|
ctx.renderer.renderError(`Checkpoint "${name}" not found.`);
|
|
1827
1839
|
}
|
|
@@ -1925,17 +1937,21 @@ ${hint}` : "")
|
|
|
1925
1937
|
name: "test",
|
|
1926
1938
|
description: "Run project tests and show structured report",
|
|
1927
1939
|
usage: "/test [command|filter]",
|
|
1928
|
-
async execute(args,
|
|
1929
|
-
|
|
1930
|
-
|
|
1931
|
-
|
|
1932
|
-
|
|
1933
|
-
|
|
1934
|
-
|
|
1935
|
-
|
|
1936
|
-
|
|
1937
|
-
|
|
1938
|
-
|
|
1940
|
+
async execute(args, ctx) {
|
|
1941
|
+
try {
|
|
1942
|
+
const { executeTests } = await import("./run-tests-S3UPP5B4.js");
|
|
1943
|
+
const argStr = args.join(" ").trim();
|
|
1944
|
+
let testArgs = {};
|
|
1945
|
+
if (argStr) {
|
|
1946
|
+
const isCommand = argStr.includes(" ") || /^(mvn|gradle|npm|pytest|cargo|go)\b/.test(argStr);
|
|
1947
|
+
testArgs = isCommand ? { command: argStr } : { filter: argStr };
|
|
1948
|
+
}
|
|
1949
|
+
const report = await executeTests(testArgs);
|
|
1950
|
+
const firstLines = report.split("\n").slice(0, 3).join("\n");
|
|
1951
|
+
console.log(theme.dim(firstLines));
|
|
1952
|
+
} catch (err) {
|
|
1953
|
+
ctx.renderer.renderError(`Test execution failed: ${err instanceof Error ? err.message : String(err)}`);
|
|
1954
|
+
}
|
|
1939
1955
|
}
|
|
1940
1956
|
},
|
|
1941
1957
|
{
|
|
@@ -5548,7 +5564,7 @@ program.command("web").description("Start Web UI server with browser-based chat
|
|
|
5548
5564
|
console.error("Error: Invalid port number. Must be between 1 and 65535.");
|
|
5549
5565
|
process.exit(1);
|
|
5550
5566
|
}
|
|
5551
|
-
const { startWebServer } = await import("./server-
|
|
5567
|
+
const { startWebServer } = await import("./server-HAZM4ENT.js");
|
|
5552
5568
|
await startWebServer({ port, host: options.host });
|
|
5553
5569
|
});
|
|
5554
5570
|
program.command("user [action] [username]").description("Manage Web UI users (list | create <name> | delete <name> | reset-password <name> | migrate <name>)").action(async (action, username) => {
|
|
@@ -5781,7 +5797,7 @@ program.command("hub [topic]").description("Start multi-agent hub (discuss / bra
|
|
|
5781
5797
|
}),
|
|
5782
5798
|
config.get("customProviders")
|
|
5783
5799
|
);
|
|
5784
|
-
const { startHub } = await import("./hub-
|
|
5800
|
+
const { startHub } = await import("./hub-J3OGSYQ5.js");
|
|
5785
5801
|
await startHub(
|
|
5786
5802
|
{
|
|
5787
5803
|
topic: topic ?? "",
|
|
@@ -18,7 +18,7 @@ import {
|
|
|
18
18
|
renderDiff,
|
|
19
19
|
runHook,
|
|
20
20
|
setupProxy
|
|
21
|
-
} from "./chunk-
|
|
21
|
+
} from "./chunk-IR6JR3GH.js";
|
|
22
22
|
import {
|
|
23
23
|
AuthManager
|
|
24
24
|
} from "./chunk-BYNY5JPB.js";
|
|
@@ -32,7 +32,7 @@ import {
|
|
|
32
32
|
spawnAgentContext,
|
|
33
33
|
truncateOutput,
|
|
34
34
|
undoStack
|
|
35
|
-
} from "./chunk-
|
|
35
|
+
} from "./chunk-ZZPMHXTT.js";
|
|
36
36
|
import {
|
|
37
37
|
AGENTIC_BEHAVIOR_GUIDELINE,
|
|
38
38
|
AUTHOR,
|
|
@@ -49,7 +49,7 @@ import {
|
|
|
49
49
|
PLUGINS_DIR_NAME,
|
|
50
50
|
SKILLS_DIR_NAME,
|
|
51
51
|
VERSION
|
|
52
|
-
} from "./chunk-
|
|
52
|
+
} from "./chunk-XKWQJ5K4.js";
|
|
53
53
|
|
|
54
54
|
// src/web/server.ts
|
|
55
55
|
import express from "express";
|
|
@@ -1490,7 +1490,7 @@ ${undoResults.map((r) => ` \u2022 ${r}`).join("\n")}` });
|
|
|
1490
1490
|
case "test": {
|
|
1491
1491
|
this.send({ type: "info", message: "\u{1F9EA} Running tests..." });
|
|
1492
1492
|
try {
|
|
1493
|
-
const { executeTests } = await import("./run-tests-
|
|
1493
|
+
const { executeTests } = await import("./run-tests-S3UPP5B4.js");
|
|
1494
1494
|
const argStr = args.join(" ").trim();
|
|
1495
1495
|
let testArgs = {};
|
|
1496
1496
|
if (argStr) {
|
|
@@ -4,10 +4,10 @@ import {
|
|
|
4
4
|
getDangerLevel,
|
|
5
5
|
googleSearchContext,
|
|
6
6
|
truncateOutput
|
|
7
|
-
} from "./chunk-
|
|
7
|
+
} from "./chunk-ZZPMHXTT.js";
|
|
8
8
|
import {
|
|
9
9
|
SUBAGENT_ALLOWED_TOOLS
|
|
10
|
-
} from "./chunk-
|
|
10
|
+
} from "./chunk-XKWQJ5K4.js";
|
|
11
11
|
|
|
12
12
|
// src/hub/task-orchestrator.ts
|
|
13
13
|
import { createInterface } from "readline";
|