jinzd-ai-cli 0.4.281 → 0.4.282
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-237ZXBQD.js → batch-SBP6H7IK.js} +2 -2
- package/dist/{chunk-WUIOUJA2.js → chunk-6IRG727F.js} +1 -1
- package/dist/{chunk-FHRIDE2T.js → chunk-7XKIDSJT.js} +4 -4
- package/dist/{chunk-4XJVSMZ6.js → chunk-EVD6CCO2.js} +1 -1
- package/dist/{chunk-BVGSR3BA.js → chunk-GSGJABL6.js} +3 -3
- package/dist/{chunk-J3RWNQOF.js → chunk-HJDJAI7T.js} +1 -1
- package/dist/{chunk-6NO5FZW6.js → chunk-IUVDZVZ4.js} +18 -0
- package/dist/{chunk-2FCKZ3OS.js → chunk-JQU4GYET.js} +1 -1
- package/dist/{chunk-J5TXHFDO.js → chunk-KDXA7RXA.js} +70 -4
- package/dist/{chunk-L7C34TFI.js → chunk-LNUWIY6M.js} +1 -1
- package/dist/{chunk-VB54ILH7.js → chunk-NUJTNH76.js} +1 -1
- package/dist/{chunk-IXEKDAIX.js → chunk-RHSCROLG.js} +1 -1
- package/dist/{chunk-H2VE4TTN.js → chunk-SGUPIQYT.js} +1 -1
- package/dist/{chunk-5GYOQ7EF.js → chunk-TNIMHTKG.js} +1 -1
- package/dist/{chunk-UTJQXG4P.js → chunk-WMHLWCZQ.js} +3 -3
- package/dist/{chunk-JT2A2M4F.js → chunk-YRPL7A3S.js} +1 -1
- package/dist/{ci-LXRTYJ6F.js → ci-VAAMX44S.js} +4 -4
- package/dist/{ci-format-II3OT2VU.js → ci-format-RMULFSB5.js} +2 -2
- package/dist/{constants-X53QCUTP.js → constants-PXLMEBJY.js} +1 -1
- package/dist/{doctor-cli-6JCJEQR4.js → doctor-cli-C2DFYU2M.js} +4 -4
- package/dist/electron-server.js +136 -56
- package/dist/{hub-RXAFF7QI.js → hub-XIU3YTOE.js} +2 -2
- package/dist/index.js +72 -82
- package/dist/{persist-TBQILDSE.js → persist-S77WRVLD.js} +2 -2
- package/dist/{persistent-memory-7CKJLS25.js → persistent-memory-ACXKU6RV.js} +2 -2
- package/dist/{persistent-memory-WAKFKH2I.js → persistent-memory-TA224ZFQ.js} +2 -2
- package/dist/{pr-DZTRHAMG.js → pr-J74HW44E.js} +4 -4
- package/dist/{run-tests-XGCNUT5S.js → run-tests-4KTX5YMO.js} +2 -2
- package/dist/{run-tests-4ESYEROQ.js → run-tests-JLZ2KIGV.js} +2 -2
- package/dist/{server-6RYXFG3H.js → server-226R6675.js} +69 -63
- package/dist/{server-EFA7UP4I.js → server-4CZXYGJN.js} +5 -5
- package/dist/{task-orchestrator-H3AEIHR3.js → task-orchestrator-6C3R7KSK.js} +5 -5
- package/dist/{usage-W7TZWHY7.js → usage-FY3TEJJS.js} +2 -2
- package/package.json +1 -1
|
@@ -11,7 +11,7 @@ import {
|
|
|
11
11
|
} from "./chunk-RYQBBEMM.js";
|
|
12
12
|
import {
|
|
13
13
|
persistDiscussion
|
|
14
|
-
} from "./chunk-
|
|
14
|
+
} from "./chunk-NUJTNH76.js";
|
|
15
15
|
import {
|
|
16
16
|
AUTO_COMPACT_INSTRUCTION,
|
|
17
17
|
McpManager,
|
|
@@ -22,6 +22,7 @@ import {
|
|
|
22
22
|
armDeferredSave,
|
|
23
23
|
autoTrimSessionIfNeeded,
|
|
24
24
|
buildInitPrompt,
|
|
25
|
+
buildRewindList,
|
|
25
26
|
buildSessionCostReport,
|
|
26
27
|
buildSessionExport,
|
|
27
28
|
checkpointDeletedMessage,
|
|
@@ -37,6 +38,8 @@ import {
|
|
|
37
38
|
evaluateContextPressure,
|
|
38
39
|
filterMemoryEntries,
|
|
39
40
|
formatCheckpointList,
|
|
41
|
+
formatForkReport,
|
|
42
|
+
formatRewindReport,
|
|
40
43
|
formatSessionSummaryLine,
|
|
41
44
|
loadDevState,
|
|
42
45
|
parseBatchDeleteArgs,
|
|
@@ -44,10 +47,12 @@ import {
|
|
|
44
47
|
parseCleanArgs,
|
|
45
48
|
parseMemoryShowFilters,
|
|
46
49
|
parseModelCommand,
|
|
50
|
+
parseRewindArgs,
|
|
47
51
|
parseRouteCommand,
|
|
48
52
|
parseSessionListArgs,
|
|
49
53
|
persistToolRound,
|
|
50
54
|
readGitDiff,
|
|
55
|
+
resolveForkPoint,
|
|
51
56
|
resolveModelSwitch,
|
|
52
57
|
resolveProviderSwitch,
|
|
53
58
|
resolveSessionRef,
|
|
@@ -63,7 +68,7 @@ import {
|
|
|
63
68
|
setupProxy,
|
|
64
69
|
snapshotFile,
|
|
65
70
|
stripRoutingTags
|
|
66
|
-
} from "./chunk-
|
|
71
|
+
} from "./chunk-KDXA7RXA.js";
|
|
67
72
|
import {
|
|
68
73
|
CNY_PER_USD,
|
|
69
74
|
CostTracker,
|
|
@@ -105,7 +110,7 @@ import {
|
|
|
105
110
|
spawnAgentContext,
|
|
106
111
|
truncateOutput,
|
|
107
112
|
undoStack
|
|
108
|
-
} from "./chunk-
|
|
113
|
+
} from "./chunk-7XKIDSJT.js";
|
|
109
114
|
import {
|
|
110
115
|
buildReviewPrompt,
|
|
111
116
|
buildSecurityReviewPrompt
|
|
@@ -132,7 +137,7 @@ import {
|
|
|
132
137
|
restoreMemoryEntries,
|
|
133
138
|
updateMemoryApproval,
|
|
134
139
|
updateMemoryEntry
|
|
135
|
-
} from "./chunk-
|
|
140
|
+
} from "./chunk-SGUPIQYT.js";
|
|
136
141
|
import "./chunk-4DEMGCK4.js";
|
|
137
142
|
import "./chunk-UUSRWSSX.js";
|
|
138
143
|
import "./chunk-CKH4KQ4E.js";
|
|
@@ -142,7 +147,7 @@ import "./chunk-5C76XDDF.js";
|
|
|
142
147
|
import {
|
|
143
148
|
SessionManager,
|
|
144
149
|
getContentText
|
|
145
|
-
} from "./chunk-
|
|
150
|
+
} from "./chunk-IUVDZVZ4.js";
|
|
146
151
|
import "./chunk-NYNSYLFY.js";
|
|
147
152
|
import {
|
|
148
153
|
scanString
|
|
@@ -151,7 +156,7 @@ import {
|
|
|
151
156
|
buildDoctorReport,
|
|
152
157
|
formatDoctorReport,
|
|
153
158
|
loadContextFiles
|
|
154
|
-
} from "./chunk-
|
|
159
|
+
} from "./chunk-GSGJABL6.js";
|
|
155
160
|
import {
|
|
156
161
|
describePlugin,
|
|
157
162
|
getActivePluginAssets,
|
|
@@ -166,13 +171,13 @@ import {
|
|
|
166
171
|
runTool,
|
|
167
172
|
setPluginEnabled,
|
|
168
173
|
trustPlugin
|
|
169
|
-
} from "./chunk-
|
|
174
|
+
} from "./chunk-LNUWIY6M.js";
|
|
170
175
|
import {
|
|
171
176
|
ProviderRegistry
|
|
172
177
|
} from "./chunk-UGY5SVNX.js";
|
|
173
178
|
import {
|
|
174
179
|
ConfigManager
|
|
175
|
-
} from "./chunk-
|
|
180
|
+
} from "./chunk-EVD6CCO2.js";
|
|
176
181
|
import {
|
|
177
182
|
CONTENT_ONLY_STREAM_REMINDER,
|
|
178
183
|
TEE_FINAL_USER_NUDGE,
|
|
@@ -202,7 +207,7 @@ import {
|
|
|
202
207
|
maskConfigSecrets
|
|
203
208
|
} from "./chunk-XNFIYS7G.js";
|
|
204
209
|
import "./chunk-4BKXL7SM.js";
|
|
205
|
-
import "./chunk-
|
|
210
|
+
import "./chunk-HJDJAI7T.js";
|
|
206
211
|
import {
|
|
207
212
|
AGENTIC_BEHAVIOR_GUIDELINE,
|
|
208
213
|
AUTHOR,
|
|
@@ -218,7 +223,7 @@ import {
|
|
|
218
223
|
SKILLS_DIR_NAME,
|
|
219
224
|
VERSION,
|
|
220
225
|
buildUserIdentityPrompt
|
|
221
|
-
} from "./chunk-
|
|
226
|
+
} from "./chunk-JQU4GYET.js";
|
|
222
227
|
|
|
223
228
|
// src/web/server.ts
|
|
224
229
|
import express from "express";
|
|
@@ -976,7 +981,7 @@ Cache: write=${cacheCreate} read=${cacheRead}` : "";
|
|
|
976
981
|
Cost: ${formatCost(cost)}` : "";
|
|
977
982
|
let memoryLine = "";
|
|
978
983
|
try {
|
|
979
|
-
const { countPendingMemories: countPendingMemories2 } = await import("./persistent-memory-
|
|
984
|
+
const { countPendingMemories: countPendingMemories2 } = await import("./persistent-memory-ACXKU6RV.js");
|
|
980
985
|
const pending = countPendingMemories2(ctx.config.getConfigDir());
|
|
981
986
|
if (pending > 0) memoryLine = `
|
|
982
987
|
Memory: \u26A0 ${pending} pending approval \u2014 see the Memory panel or /memory`;
|
|
@@ -1555,27 +1560,27 @@ async function handleFork(args, ctx) {
|
|
|
1555
1560
|
ctx.send({ type: "info", message: "No active session to fork." });
|
|
1556
1561
|
return;
|
|
1557
1562
|
}
|
|
1558
|
-
const
|
|
1559
|
-
|
|
1560
|
-
|
|
1561
|
-
|
|
1562
|
-
const cp = session.checkpoints.find((c) => c.name === sub);
|
|
1563
|
-
if (!cp) {
|
|
1564
|
-
const available = session.checkpoints.map((c) => c.name);
|
|
1565
|
-
ctx.send({ type: "error", message: available.length > 0 ? `Checkpoint "${sub}" not found. Available: ${available.join(", ")}` : `Checkpoint "${sub}" not found. No checkpoints saved.` });
|
|
1566
|
-
return;
|
|
1567
|
-
}
|
|
1568
|
-
messageCount = cp.messageIndex;
|
|
1569
|
-
fromLabel = `checkpoint "${cp.name}" (${cp.messageIndex} messages)`;
|
|
1563
|
+
const point = resolveForkPoint(session, args.join(" ").trim());
|
|
1564
|
+
if (!point.ok) {
|
|
1565
|
+
ctx.send({ type: "error", message: point.message });
|
|
1566
|
+
return;
|
|
1570
1567
|
}
|
|
1571
1568
|
try {
|
|
1572
|
-
const originalId = session.id
|
|
1573
|
-
const
|
|
1574
|
-
|
|
1575
|
-
|
|
1576
|
-
|
|
1577
|
-
|
|
1578
|
-
|
|
1569
|
+
const originalId = session.id;
|
|
1570
|
+
const originalTitle = session.title ?? "(untitled)";
|
|
1571
|
+
const forked = await ctx.sessions.forkSession(point.messageCount);
|
|
1572
|
+
ctx.send({
|
|
1573
|
+
type: "info",
|
|
1574
|
+
message: formatForkReport({
|
|
1575
|
+
originalId,
|
|
1576
|
+
originalTitle,
|
|
1577
|
+
forkedId: forked.id,
|
|
1578
|
+
forkedTitle: forked.title ?? "(untitled)",
|
|
1579
|
+
fromLabel: point.fromLabel,
|
|
1580
|
+
messageCount: forked.messages.length,
|
|
1581
|
+
checkpointCount: forked.checkpoints.length
|
|
1582
|
+
}).join("\n")
|
|
1583
|
+
});
|
|
1579
1584
|
ctx.sendSessionMessages();
|
|
1580
1585
|
ctx.sendStatus();
|
|
1581
1586
|
ctx.sendSessionList();
|
|
@@ -1589,41 +1594,42 @@ async function handleRewind(args, ctx) {
|
|
|
1589
1594
|
ctx.send({ type: "info", message: "No messages to rewind." });
|
|
1590
1595
|
return;
|
|
1591
1596
|
}
|
|
1592
|
-
const
|
|
1593
|
-
if (
|
|
1594
|
-
|
|
1595
|
-
`];
|
|
1596
|
-
const cpIndices = (await import("./file-checkpoint-NKBHGC7L.js")).fileCheckpoints.getMessageIndices();
|
|
1597
|
-
for (let i = 0; i < session.messages.length; i++) {
|
|
1598
|
-
const m = session.messages[i];
|
|
1599
|
-
const text = getContentText(m.content).replace(/\n/g, " ").slice(0, 60);
|
|
1600
|
-
const pin = cpIndices.includes(i) ? " \u{1F4CC}" : "";
|
|
1601
|
-
lines.push(` [${i + 1}] ${m.role.padEnd(10)} ${text}${pin}`);
|
|
1602
|
-
}
|
|
1603
|
-
lines.push("", "Usage: /rewind <n> \u2014 rewind to message N", "\u{1F4CC} = file checkpoint");
|
|
1604
|
-
ctx.send({ type: "info", message: lines.join("\n") });
|
|
1597
|
+
const intent = parseRewindArgs(args, session.messages.length);
|
|
1598
|
+
if (intent.kind === "invalid") {
|
|
1599
|
+
ctx.send({ type: "error", message: intent.message });
|
|
1605
1600
|
return;
|
|
1606
1601
|
}
|
|
1607
|
-
const
|
|
1608
|
-
if (
|
|
1609
|
-
|
|
1602
|
+
const { fileCheckpoints } = await import("./file-checkpoint-NKBHGC7L.js");
|
|
1603
|
+
if (intent.kind === "list") {
|
|
1604
|
+
const rows = buildRewindList(session.messages, fileCheckpoints.getMessageIndices());
|
|
1605
|
+
ctx.send({
|
|
1606
|
+
type: "info",
|
|
1607
|
+
message: [
|
|
1608
|
+
`Conversation messages (${rows.length} total):`,
|
|
1609
|
+
"",
|
|
1610
|
+
...rows.map((r) => ` [${r.index}] ${r.role.padEnd(10)} ${r.preview}${r.hasCheckpoint ? " \u{1F4CC}" : ""}`),
|
|
1611
|
+
"",
|
|
1612
|
+
"Usage: /rewind <n> \u2014 rewind to message N (1-based)",
|
|
1613
|
+
"\u{1F4CC} = file checkpoint exists at this point"
|
|
1614
|
+
].join("\n")
|
|
1615
|
+
});
|
|
1610
1616
|
return;
|
|
1611
1617
|
}
|
|
1612
|
-
const
|
|
1613
|
-
const
|
|
1614
|
-
|
|
1615
|
-
|
|
1616
|
-
|
|
1617
|
-
|
|
1618
|
-
|
|
1619
|
-
|
|
1620
|
-
|
|
1621
|
-
|
|
1622
|
-
|
|
1623
|
-
|
|
1624
|
-
|
|
1625
|
-
|
|
1626
|
-
|
|
1618
|
+
const messagesRemoved = session.messages.length - intent.target;
|
|
1619
|
+
const result = fileCheckpoints.restoreToMessageIndex(intent.target);
|
|
1620
|
+
session.truncateTo(intent.target);
|
|
1621
|
+
await ctx.sessions.save();
|
|
1622
|
+
ctx.resetWebSessionUsage();
|
|
1623
|
+
ctx.send({
|
|
1624
|
+
type: "info",
|
|
1625
|
+
message: formatRewindReport({
|
|
1626
|
+
target: intent.target,
|
|
1627
|
+
messagesRemoved,
|
|
1628
|
+
filesRestored: result.restored,
|
|
1629
|
+
filesDeleted: result.deleted,
|
|
1630
|
+
files: result.files
|
|
1631
|
+
}).join("\n")
|
|
1632
|
+
});
|
|
1627
1633
|
ctx.sendSessionMessages();
|
|
1628
1634
|
ctx.sendStatus();
|
|
1629
1635
|
}
|
|
@@ -1883,7 +1889,7 @@ async function handleTest(args, ctx) {
|
|
|
1883
1889
|
const isCommand = argStr.includes(" ") || /^(mvn|gradle|npm|pytest|cargo|go)\b/.test(argStr);
|
|
1884
1890
|
testArgs = isCommand ? { command: argStr } : { filter: argStr };
|
|
1885
1891
|
}
|
|
1886
|
-
const runTests = ctx.runTests ?? (await import("./run-tests-
|
|
1892
|
+
const runTests = ctx.runTests ?? (await import("./run-tests-4KTX5YMO.js")).executeTests;
|
|
1887
1893
|
const report = await runTests(testArgs);
|
|
1888
1894
|
ctx.send({ type: "info", message: report });
|
|
1889
1895
|
} catch (err) {
|
|
@@ -2219,7 +2225,7 @@ async function handleMemory(args, ctx) {
|
|
|
2219
2225
|
ctx.handleMemoryManage(sub, args[1], sub === "expire" ? args[2] : void 0);
|
|
2220
2226
|
} else if (sub === "export") {
|
|
2221
2227
|
if (args[1] === "md") {
|
|
2222
|
-
const { exportMemoryEntries: exportMemoryEntries2 } = await import("./persistent-memory-
|
|
2228
|
+
const { exportMemoryEntries: exportMemoryEntries2 } = await import("./persistent-memory-ACXKU6RV.js");
|
|
2223
2229
|
ctx.send({
|
|
2224
2230
|
type: "export_data",
|
|
2225
2231
|
format: "md",
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
import {
|
|
3
3
|
ToolRegistry
|
|
4
|
-
} from "./chunk-
|
|
4
|
+
} from "./chunk-7XKIDSJT.js";
|
|
5
5
|
import "./chunk-GHWZVPUV.js";
|
|
6
|
-
import "./chunk-
|
|
6
|
+
import "./chunk-SGUPIQYT.js";
|
|
7
7
|
import "./chunk-4DEMGCK4.js";
|
|
8
8
|
import "./chunk-UUSRWSSX.js";
|
|
9
9
|
import "./chunk-CKH4KQ4E.js";
|
|
@@ -14,7 +14,7 @@ import "./chunk-NYNSYLFY.js";
|
|
|
14
14
|
import "./chunk-3FEZSLGI.js";
|
|
15
15
|
import {
|
|
16
16
|
runTool
|
|
17
|
-
} from "./chunk-
|
|
17
|
+
} from "./chunk-LNUWIY6M.js";
|
|
18
18
|
import {
|
|
19
19
|
getDangerLevel,
|
|
20
20
|
schemaToJsonSchema
|
|
@@ -23,10 +23,10 @@ import "./chunk-TU3L3PW7.js";
|
|
|
23
23
|
import "./chunk-HOSJZMQS.js";
|
|
24
24
|
import "./chunk-IW3Q7AE5.js";
|
|
25
25
|
import "./chunk-4BKXL7SM.js";
|
|
26
|
-
import "./chunk-
|
|
26
|
+
import "./chunk-HJDJAI7T.js";
|
|
27
27
|
import {
|
|
28
28
|
VERSION
|
|
29
|
-
} from "./chunk-
|
|
29
|
+
} from "./chunk-JQU4GYET.js";
|
|
30
30
|
|
|
31
31
|
// src/mcp/server.ts
|
|
32
32
|
import { createInterface } from "readline";
|
|
@@ -4,9 +4,9 @@ import {
|
|
|
4
4
|
googleSearchContext,
|
|
5
5
|
isToolCapableProvider,
|
|
6
6
|
truncateOutput
|
|
7
|
-
} from "./chunk-
|
|
7
|
+
} from "./chunk-7XKIDSJT.js";
|
|
8
8
|
import "./chunk-GHWZVPUV.js";
|
|
9
|
-
import "./chunk-
|
|
9
|
+
import "./chunk-SGUPIQYT.js";
|
|
10
10
|
import "./chunk-4DEMGCK4.js";
|
|
11
11
|
import "./chunk-UUSRWSSX.js";
|
|
12
12
|
import "./chunk-CKH4KQ4E.js";
|
|
@@ -17,7 +17,7 @@ import "./chunk-NYNSYLFY.js";
|
|
|
17
17
|
import "./chunk-3FEZSLGI.js";
|
|
18
18
|
import {
|
|
19
19
|
runTool
|
|
20
|
-
} from "./chunk-
|
|
20
|
+
} from "./chunk-LNUWIY6M.js";
|
|
21
21
|
import {
|
|
22
22
|
getDangerLevel,
|
|
23
23
|
runLeanAgentLoop
|
|
@@ -28,10 +28,10 @@ import {
|
|
|
28
28
|
atomicWriteFileSync
|
|
29
29
|
} from "./chunk-IW3Q7AE5.js";
|
|
30
30
|
import "./chunk-4BKXL7SM.js";
|
|
31
|
-
import "./chunk-
|
|
31
|
+
import "./chunk-HJDJAI7T.js";
|
|
32
32
|
import {
|
|
33
33
|
SUBAGENT_ALLOWED_TOOLS
|
|
34
|
-
} from "./chunk-
|
|
34
|
+
} from "./chunk-JQU4GYET.js";
|
|
35
35
|
|
|
36
36
|
// src/hub/task-orchestrator.ts
|
|
37
37
|
import { createInterface } from "readline";
|
|
@@ -8,10 +8,10 @@ import {
|
|
|
8
8
|
} from "./chunk-DPTEC6AQ.js";
|
|
9
9
|
import {
|
|
10
10
|
ConfigManager
|
|
11
|
-
} from "./chunk-
|
|
11
|
+
} from "./chunk-EVD6CCO2.js";
|
|
12
12
|
import "./chunk-TU3L3PW7.js";
|
|
13
13
|
import "./chunk-IW3Q7AE5.js";
|
|
14
|
-
import "./chunk-
|
|
14
|
+
import "./chunk-JQU4GYET.js";
|
|
15
15
|
|
|
16
16
|
// src/cli/usage.ts
|
|
17
17
|
function classifyRowCost(row) {
|