jinzd-ai-cli 0.4.279 → 0.4.280

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.
Files changed (31) hide show
  1. package/dist/{batch-6QZSWCBL.js → batch-F27NOTWC.js} +2 -2
  2. package/dist/{chunk-JLOQBYU4.js → chunk-B3FHA6IN.js} +3 -3
  3. package/dist/{chunk-FQJFGGKN.js → chunk-CP5LAA52.js} +4 -4
  4. package/dist/{chunk-UD3BVNC5.js → chunk-EOP775JU.js} +1 -1
  5. package/dist/{chunk-7L4TEK7Q.js → chunk-IIO2SMEJ.js} +118 -3
  6. package/dist/{chunk-RJY3HJS4.js → chunk-LPZNOYRJ.js} +1 -1
  7. package/dist/{chunk-SIVM2YQQ.js → chunk-NHJ4GHL4.js} +1 -1
  8. package/dist/{chunk-5XHEXRMN.js → chunk-PN42JO74.js} +1 -1
  9. package/dist/{chunk-CMNXAJLH.js → chunk-PUC277TH.js} +1 -1
  10. package/dist/{chunk-JS6VAPWM.js → chunk-TAIZZY3N.js} +3 -3
  11. package/dist/{chunk-2BKRWTEQ.js → chunk-UBPRUSAF.js} +1 -1
  12. package/dist/{chunk-IIXZ7IPN.js → chunk-UMWDNNPS.js} +1 -1
  13. package/dist/{chunk-6WMT7OQG.js → chunk-V7EZ4SDC.js} +1 -1
  14. package/dist/{chunk-NZPHEUJM.js → chunk-VQCFEA4Z.js} +1 -1
  15. package/dist/{ci-F4ESOYI5.js → ci-HJ4OVHCM.js} +4 -4
  16. package/dist/{ci-format-AIRW3TVQ.js → ci-format-NKJRZ3QI.js} +2 -2
  17. package/dist/{constants-3VMMZJDS.js → constants-6LCZOBJC.js} +1 -1
  18. package/dist/{doctor-cli-WVMEWMYE.js → doctor-cli-7JGPC5G4.js} +4 -4
  19. package/dist/electron-server.js +133 -88
  20. package/dist/{hub-JJCCCU3O.js → hub-NX7HYN7V.js} +1 -1
  21. package/dist/index.js +58 -125
  22. package/dist/{persistent-memory-QZN4Q3W4.js → persistent-memory-E6WECUTW.js} +2 -2
  23. package/dist/{persistent-memory-KSZKM4JG.js → persistent-memory-MHHX7F25.js} +2 -2
  24. package/dist/{pr-GFB5JC26.js → pr-GLUFBQLI.js} +4 -4
  25. package/dist/{run-tests-HMHHIG7Y.js → run-tests-LWAFPVS3.js} +2 -2
  26. package/dist/{run-tests-EL54INOI.js → run-tests-YPJDOEJA.js} +2 -2
  27. package/dist/{server-WUSJWC3A.js → server-CXXYIPMU.js} +50 -93
  28. package/dist/{server-6C7GITHY.js → server-P6DI27CY.js} +5 -5
  29. package/dist/{task-orchestrator-C7RUUA2Q.js → task-orchestrator-FW4LBPTS.js} +5 -5
  30. package/dist/{usage-CW6BT2UV.js → usage-CJUHQDT2.js} +2 -2
  31. package/package.json +1 -1
@@ -28,11 +28,11 @@ import {
28
28
  touchMemoryReferences,
29
29
  updateMemoryApproval,
30
30
  updateMemoryEntry
31
- } from "./chunk-6WMT7OQG.js";
31
+ } from "./chunk-V7EZ4SDC.js";
32
32
  import "./chunk-3FEZSLGI.js";
33
33
  import "./chunk-HOSJZMQS.js";
34
34
  import "./chunk-IW3Q7AE5.js";
35
- import "./chunk-2BKRWTEQ.js";
35
+ import "./chunk-UBPRUSAF.js";
36
36
  export {
37
37
  addMemoryEntry,
38
38
  backupMemoryStore,
@@ -2,8 +2,8 @@
2
2
  import {
3
3
  countSeverity,
4
4
  runCi
5
- } from "./chunk-JS6VAPWM.js";
6
- import "./chunk-RJY3HJS4.js";
5
+ } from "./chunk-TAIZZY3N.js";
6
+ import "./chunk-LPZNOYRJ.js";
7
7
  import {
8
8
  buildReviewPrompt,
9
9
  buildSecurityReviewPrompt,
@@ -17,13 +17,13 @@ import {
17
17
  } from "./chunk-UGY5SVNX.js";
18
18
  import {
19
19
  ConfigManager
20
- } from "./chunk-UD3BVNC5.js";
20
+ } from "./chunk-EOP775JU.js";
21
21
  import "./chunk-TEXT4DAT.js";
22
22
  import "./chunk-TU3L3PW7.js";
23
23
  import "./chunk-IW3Q7AE5.js";
24
24
  import {
25
25
  VERSION
26
- } from "./chunk-2BKRWTEQ.js";
26
+ } from "./chunk-UBPRUSAF.js";
27
27
 
28
28
  // src/cli/pr.ts
29
29
  import { execFileSync } from "child_process";
@@ -1,8 +1,8 @@
1
1
  import {
2
2
  executeTests,
3
3
  runTestsTool
4
- } from "./chunk-SIVM2YQQ.js";
5
- import "./chunk-5XHEXRMN.js";
4
+ } from "./chunk-NHJ4GHL4.js";
5
+ import "./chunk-PN42JO74.js";
6
6
  export {
7
7
  executeTests,
8
8
  runTestsTool
@@ -2,8 +2,8 @@
2
2
  import {
3
3
  executeTests,
4
4
  runTestsTool
5
- } from "./chunk-NZPHEUJM.js";
6
- import "./chunk-2BKRWTEQ.js";
5
+ } from "./chunk-VQCFEA4Z.js";
6
+ import "./chunk-UBPRUSAF.js";
7
7
  export {
8
8
  executeTests,
9
9
  runTestsTool
@@ -23,6 +23,11 @@ import {
23
23
  autoTrimSessionIfNeeded,
24
24
  buildInitPrompt,
25
25
  buildSessionCostReport,
26
+ buildSessionExport,
27
+ checkpointDeletedMessage,
28
+ checkpointNotFoundMessage,
29
+ checkpointRestoredMessage,
30
+ checkpointSavedMessage,
26
31
  costSourceNote,
27
32
  decideDeferredSave,
28
33
  decideModel,
@@ -30,9 +35,11 @@ import {
30
35
  estimateConversationTokens,
31
36
  evaluateContextPressure,
32
37
  filterMemoryEntries,
38
+ formatCheckpointList,
33
39
  formatSessionSummaryLine,
34
40
  loadDevState,
35
41
  parseBatchDeleteArgs,
42
+ parseCheckpointCommand,
36
43
  parseCleanArgs,
37
44
  parseMemoryShowFilters,
38
45
  parseModelCommand,
@@ -55,7 +62,7 @@ import {
55
62
  setupProxy,
56
63
  snapshotFile,
57
64
  stripRoutingTags
58
- } from "./chunk-7L4TEK7Q.js";
65
+ } from "./chunk-IIO2SMEJ.js";
59
66
  import {
60
67
  CNY_PER_USD,
61
68
  CostTracker,
@@ -97,7 +104,7 @@ import {
97
104
  spawnAgentContext,
98
105
  truncateOutput,
99
106
  undoStack
100
- } from "./chunk-FQJFGGKN.js";
107
+ } from "./chunk-CP5LAA52.js";
101
108
  import {
102
109
  buildReviewPrompt,
103
110
  buildSecurityReviewPrompt
@@ -124,7 +131,7 @@ import {
124
131
  restoreMemoryEntries,
125
132
  updateMemoryApproval,
126
133
  updateMemoryEntry
127
- } from "./chunk-6WMT7OQG.js";
134
+ } from "./chunk-V7EZ4SDC.js";
128
135
  import "./chunk-4DEMGCK4.js";
129
136
  import "./chunk-UUSRWSSX.js";
130
137
  import "./chunk-CKH4KQ4E.js";
@@ -143,7 +150,7 @@ import {
143
150
  buildDoctorReport,
144
151
  formatDoctorReport,
145
152
  loadContextFiles
146
- } from "./chunk-JLOQBYU4.js";
153
+ } from "./chunk-B3FHA6IN.js";
147
154
  import {
148
155
  describePlugin,
149
156
  getActivePluginAssets,
@@ -158,13 +165,13 @@ import {
158
165
  runTool,
159
166
  setPluginEnabled,
160
167
  trustPlugin
161
- } from "./chunk-IIXZ7IPN.js";
168
+ } from "./chunk-UMWDNNPS.js";
162
169
  import {
163
170
  ProviderRegistry
164
171
  } from "./chunk-UGY5SVNX.js";
165
172
  import {
166
173
  ConfigManager
167
- } from "./chunk-UD3BVNC5.js";
174
+ } from "./chunk-EOP775JU.js";
168
175
  import {
169
176
  CONTENT_ONLY_STREAM_REMINDER,
170
177
  TEE_FINAL_USER_NUDGE,
@@ -194,7 +201,7 @@ import {
194
201
  maskConfigSecrets
195
202
  } from "./chunk-XNFIYS7G.js";
196
203
  import "./chunk-4BKXL7SM.js";
197
- import "./chunk-NZPHEUJM.js";
204
+ import "./chunk-VQCFEA4Z.js";
198
205
  import {
199
206
  AGENTIC_BEHAVIOR_GUIDELINE,
200
207
  AUTHOR,
@@ -210,7 +217,7 @@ import {
210
217
  SKILLS_DIR_NAME,
211
218
  VERSION,
212
219
  buildUserIdentityPrompt
213
- } from "./chunk-2BKRWTEQ.js";
220
+ } from "./chunk-UBPRUSAF.js";
214
221
 
215
222
  // src/web/server.ts
216
223
  import express from "express";
@@ -964,7 +971,7 @@ Cache: write=${cacheCreate} read=${cacheRead}` : "";
964
971
  Cost: ${formatCost(cost)}` : "";
965
972
  let memoryLine = "";
966
973
  try {
967
- const { countPendingMemories: countPendingMemories2 } = await import("./persistent-memory-KSZKM4JG.js");
974
+ const { countPendingMemories: countPendingMemories2 } = await import("./persistent-memory-MHHX7F25.js");
968
975
  const pending = countPendingMemories2(ctx.config.getConfigDir());
969
976
  if (pending > 0) memoryLine = `
970
977
  Memory: \u26A0 ${pending} pending approval \u2014 see the Memory panel or /memory`;
@@ -1325,56 +1332,36 @@ async function handleCheckpoint(args, ctx) {
1325
1332
  ctx.send({ type: "error", message: "No active session." });
1326
1333
  return;
1327
1334
  }
1328
- const sub = args[0]?.toLowerCase();
1329
- if (!sub || sub === "list") {
1330
- const cps = session.checkpoints;
1331
- if (cps.length === 0) {
1332
- ctx.send({ type: "info", message: "No checkpoints. Use /checkpoint save <name> to create one." });
1333
- } else {
1334
- const lines = [`\u{1F4CC} Checkpoints (${cps.length}):`, ""];
1335
- for (const cp of cps) {
1336
- const ts = cp.timestamp.toLocaleString();
1337
- lines.push(` ${cp.name.padEnd(20)} msg #${cp.messageIndex} ${ts}`);
1338
- }
1339
- ctx.send({ type: "info", message: lines.join("\n") });
1340
- }
1335
+ const intent = parseCheckpointCommand(args);
1336
+ if (intent.kind === "list") {
1337
+ ctx.send({ type: "info", message: formatCheckpointList(session.checkpoints).join("\n") });
1341
1338
  return;
1342
1339
  }
1343
- const cpName = args.slice(1).join(" ").trim();
1344
- if (sub === "save") {
1345
- if (!cpName) {
1346
- ctx.send({ type: "error", message: "Usage: /checkpoint save <name>" });
1347
- return;
1348
- }
1349
- session.createCheckpoint(cpName);
1350
- ctx.send({ type: "info", message: `\u2713 Checkpoint "${cpName}" saved at message #${session.messages.length}` });
1351
- } else if (sub === "restore") {
1352
- if (!cpName) {
1353
- ctx.send({ type: "error", message: "Usage: /checkpoint restore <name>" });
1354
- return;
1355
- }
1356
- const ok = session.restoreCheckpoint(cpName);
1357
- if (ok) {
1358
- ctx.send({ type: "info", message: `\u2713 Restored to checkpoint "${cpName}" (${session.messages.length} messages)` });
1359
- ctx.sendSessionMessages();
1360
- ctx.sendStatus();
1361
- } else {
1362
- ctx.send({ type: "error", message: `Checkpoint "${cpName}" not found.` });
1363
- }
1364
- } else if (sub === "delete") {
1365
- if (!cpName) {
1366
- ctx.send({ type: "error", message: "Usage: /checkpoint delete <name>" });
1340
+ if (intent.kind === "usage" || intent.kind === "unknown") {
1341
+ ctx.send({ type: "error", message: intent.message });
1342
+ return;
1343
+ }
1344
+ if (intent.kind === "save") {
1345
+ session.createCheckpoint(intent.name);
1346
+ ctx.send({ type: "info", message: checkpointSavedMessage(intent.name, session.messages.length) });
1347
+ return;
1348
+ }
1349
+ if (intent.kind === "restore") {
1350
+ if (!session.restoreCheckpoint(intent.name)) {
1351
+ ctx.send({ type: "error", message: checkpointNotFoundMessage(intent.name) });
1367
1352
  return;
1368
1353
  }
1369
- const ok = session.deleteCheckpoint(cpName);
1370
- if (ok) {
1371
- ctx.send({ type: "info", message: `\u2713 Deleted checkpoint "${cpName}"` });
1372
- } else {
1373
- ctx.send({ type: "error", message: `Checkpoint "${cpName}" not found.` });
1374
- }
1375
- } else {
1376
- ctx.send({ type: "error", message: `Unknown subcommand: ${sub}. Use save/restore/list/delete.` });
1354
+ ctx.resetWebSessionUsage();
1355
+ ctx.send({ type: "info", message: checkpointRestoredMessage(intent.name, session.messages.length) });
1356
+ ctx.sendSessionMessages();
1357
+ ctx.sendStatus();
1358
+ return;
1359
+ }
1360
+ if (!session.deleteCheckpoint(intent.name)) {
1361
+ ctx.send({ type: "error", message: checkpointNotFoundMessage(intent.name) });
1362
+ return;
1377
1363
  }
1364
+ ctx.send({ type: "info", message: checkpointDeletedMessage(intent.name) });
1378
1365
  }
1379
1366
  async function handleBranch(args, ctx) {
1380
1367
  const session = ctx.sessions.current;
@@ -1891,7 +1878,7 @@ async function handleTest(args, ctx) {
1891
1878
  const isCommand = argStr.includes(" ") || /^(mvn|gradle|npm|pytest|cargo|go)\b/.test(argStr);
1892
1879
  testArgs = isCommand ? { command: argStr } : { filter: argStr };
1893
1880
  }
1894
- const runTests = ctx.runTests ?? (await import("./run-tests-EL54INOI.js")).executeTests;
1881
+ const runTests = ctx.runTests ?? (await import("./run-tests-YPJDOEJA.js")).executeTests;
1895
1882
  const report = await runTests(testArgs);
1896
1883
  ctx.send({ type: "info", message: report });
1897
1884
  } catch (err) {
@@ -2227,7 +2214,7 @@ async function handleMemory(args, ctx) {
2227
2214
  ctx.handleMemoryManage(sub, args[1], sub === "expire" ? args[2] : void 0);
2228
2215
  } else if (sub === "export") {
2229
2216
  if (args[1] === "md") {
2230
- const { exportMemoryEntries: exportMemoryEntries2 } = await import("./persistent-memory-KSZKM4JG.js");
2217
+ const { exportMemoryEntries: exportMemoryEntries2 } = await import("./persistent-memory-MHHX7F25.js");
2231
2218
  ctx.send({
2232
2219
  type: "export_data",
2233
2220
  format: "md",
@@ -3884,43 +3871,13 @@ ${summaryContent}`,
3884
3871
  this.send({ type: "info", message: "No messages to export." });
3885
3872
  return;
3886
3873
  }
3887
- const title = session.title ?? "Untitled";
3888
- const timestamp = (/* @__PURE__ */ new Date()).toISOString().slice(0, 10);
3889
- if (format === "json") {
3890
- const data = {
3891
- title,
3892
- provider: this.currentProvider,
3893
- model: this.currentModel,
3894
- exported: (/* @__PURE__ */ new Date()).toISOString(),
3895
- messages: session.messages.map((m) => ({
3896
- role: m.role,
3897
- content: getContentText(m.content),
3898
- timestamp: m.timestamp?.toISOString()
3899
- }))
3900
- };
3901
- this.send({
3902
- type: "export_data",
3903
- format: "json",
3904
- filename: `aicli-${timestamp}.json`,
3905
- content: JSON.stringify(data, null, 2)
3906
- });
3907
- } else {
3908
- const lines = [`# ${title}`, "", `> Exported: ${(/* @__PURE__ */ new Date()).toLocaleString()} | Provider: ${this.currentProvider} | Model: ${this.currentModel}`, ""];
3909
- for (const m of session.messages) {
3910
- const text = getContentText(m.content);
3911
- if (m.role === "user") {
3912
- lines.push(`## \u{1F9D1} User`, "", text, "");
3913
- } else if (m.role === "assistant") {
3914
- lines.push(`## \u{1F916} Assistant`, "", text, "");
3915
- }
3916
- }
3917
- this.send({
3918
- type: "export_data",
3919
- format: "md",
3920
- filename: `aicli-${timestamp}.md`,
3921
- content: lines.join("\n")
3922
- });
3923
- }
3874
+ const exported = buildSessionExport(session, format);
3875
+ this.send({
3876
+ type: "export_data",
3877
+ format,
3878
+ filename: exported.filename,
3879
+ content: exported.content
3880
+ });
3924
3881
  }
3925
3882
  memoryShow(args = []) {
3926
3883
  const configDir = this.config.getConfigDir();
@@ -1,9 +1,9 @@
1
1
  #!/usr/bin/env node
2
2
  import {
3
3
  ToolRegistry
4
- } from "./chunk-FQJFGGKN.js";
4
+ } from "./chunk-CP5LAA52.js";
5
5
  import "./chunk-GHWZVPUV.js";
6
- import "./chunk-6WMT7OQG.js";
6
+ import "./chunk-V7EZ4SDC.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-IIXZ7IPN.js";
17
+ } from "./chunk-UMWDNNPS.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-NZPHEUJM.js";
26
+ import "./chunk-VQCFEA4Z.js";
27
27
  import {
28
28
  VERSION
29
- } from "./chunk-2BKRWTEQ.js";
29
+ } from "./chunk-UBPRUSAF.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-FQJFGGKN.js";
7
+ } from "./chunk-CP5LAA52.js";
8
8
  import "./chunk-GHWZVPUV.js";
9
- import "./chunk-6WMT7OQG.js";
9
+ import "./chunk-V7EZ4SDC.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-IIXZ7IPN.js";
20
+ } from "./chunk-UMWDNNPS.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-NZPHEUJM.js";
31
+ import "./chunk-VQCFEA4Z.js";
32
32
  import {
33
33
  SUBAGENT_ALLOWED_TOOLS
34
- } from "./chunk-2BKRWTEQ.js";
34
+ } from "./chunk-UBPRUSAF.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-UD3BVNC5.js";
11
+ } from "./chunk-EOP775JU.js";
12
12
  import "./chunk-TU3L3PW7.js";
13
13
  import "./chunk-IW3Q7AE5.js";
14
- import "./chunk-2BKRWTEQ.js";
14
+ import "./chunk-UBPRUSAF.js";
15
15
 
16
16
  // src/cli/usage.ts
17
17
  function classifyRowCost(row) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "jinzd-ai-cli",
3
- "version": "0.4.279",
3
+ "version": "0.4.280",
4
4
  "description": "Cross-platform REPL-style AI CLI with multi-provider support",
5
5
  "type": "module",
6
6
  "main": "./dist/index.js",