jinzd-ai-cli 0.4.284 → 0.4.286

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 (43) hide show
  1. package/README.md +3 -3
  2. package/README.zh-CN.md +3 -3
  3. package/dist/{batch-DA7VA35X.js → batch-GY3I53DE.js} +13 -10
  4. package/dist/{chat-index-TDU3S2MG.js → chat-index-DGUOUUQW.js} +2 -2
  5. package/dist/{chunk-VFVN5CWA.js → chunk-2YDLBM3Z.js} +1 -1
  6. package/dist/{chunk-OZKTHQWA.js → chunk-3ZQZO5F7.js} +3 -3
  7. package/dist/chunk-53V3RQY5.js +5684 -0
  8. package/dist/{chunk-C4CIIIDT.js → chunk-6SCELZG6.js} +3 -3
  9. package/dist/{chunk-XSBGCZOP.js → chunk-7G7RZHJI.js} +1 -1
  10. package/dist/{chunk-I4FJGILK.js → chunk-BRLLV3FX.js} +10 -10
  11. package/dist/chunk-CGLYJRFA.js +95 -0
  12. package/dist/{chunk-FZ4THGUP.js → chunk-D7HYLMCC.js} +18 -110
  13. package/dist/{chunk-BXG44VIQ.js → chunk-EYUCJBGS.js} +30 -30
  14. package/dist/{chunk-3DRSBZQ7.js → chunk-GIJL4EFA.js} +10 -2
  15. package/dist/{chunk-QKGKWCXE.js → chunk-L4FDTQ42.js} +1 -1
  16. package/dist/{chunk-DPTEC6AQ.js → chunk-LWPWBRAC.js} +12 -10
  17. package/dist/chunk-RS7SKYTS.js +45 -0
  18. package/dist/{chunk-PWLQU43X.js → chunk-S7ABWTDV.js} +1 -1
  19. package/dist/{chunk-RV2YOTEQ.js → chunk-THUXZNJL.js} +1 -1
  20. package/dist/{chunk-PPPSK4MA.js → chunk-UKITSNSH.js} +1 -1
  21. package/dist/{ci-HG2TPYVY.js → ci-JBUIVM7P.js} +4 -4
  22. package/dist/{ci-format-UB7K63UZ.js → ci-format-B4AHV5SI.js} +2 -2
  23. package/dist/{constants-3DDHA3LT.js → constants-5FYUQLKN.js} +1 -1
  24. package/dist/constants-P75MLFV7.js +80 -0
  25. package/dist/{doctor-cli-ISFDY7LZ.js → doctor-cli-VLFE46PX.js} +5 -4
  26. package/dist/electron-server.js +3654 -310
  27. package/dist/git-context-VNCA2GU7.js +10 -0
  28. package/dist/{hub-MP2CNDMZ.js → hub-CNORVRYW.js} +1 -1
  29. package/dist/index.js +304 -3589
  30. package/dist/{persistent-memory-AMDRRB5E.js → persistent-memory-3KL4N27E.js} +3 -2
  31. package/dist/{persistent-memory-J2OVPLWI.js → persistent-memory-LVX2OT4L.js} +2 -2
  32. package/dist/{pr-BREZ3DJX.js → pr-2YUV4KII.js} +4 -4
  33. package/dist/{run-tests-XHLV74GU.js → run-tests-ERD6X534.js} +2 -2
  34. package/dist/{run-tests-DPO23PKA.js → run-tests-KZ2IUZHK.js} +2 -2
  35. package/dist/{semantic-FF6DDJI6.js → semantic-VPNKXKKK.js} +2 -2
  36. package/dist/{server-KK7DIV3J.js → server-7VSLW446.js} +6 -5
  37. package/dist/{server-W2VIUKTQ.js → server-A3OX52UC.js} +78 -76
  38. package/dist/{task-orchestrator-YM5IMIKL.js → task-orchestrator-XAMKOFUE.js} +6 -5
  39. package/dist/{usage-TXPZY7EB.js → usage-ZXNYCAZB.js} +4 -3
  40. package/package.json +1 -1
  41. package/dist/chunk-Z23JYUOL.js +0 -2296
  42. package/dist/{chunk-AEAYUKSY.js → chunk-7XU4BATV.js} +3 -3
  43. package/dist/{chunk-YOVHMQEJ.js → chunk-I4GQRMFV.js} +3 -3
@@ -27,10 +27,11 @@ import {
27
27
  touchMemoryReferences,
28
28
  updateMemoryApproval,
29
29
  updateMemoryEntry
30
- } from "./chunk-FZ4THGUP.js";
30
+ } from "./chunk-D7HYLMCC.js";
31
31
  import "./chunk-FSC6KEWU.js";
32
- import "./chunk-3DRSBZQ7.js";
33
32
  import "./chunk-6BUTA5VW.js";
33
+ import "./chunk-CGLYJRFA.js";
34
+ import "./chunk-GIJL4EFA.js";
34
35
  export {
35
36
  addMemoryEntry,
36
37
  backupMemoryStore,
@@ -28,11 +28,11 @@ import {
28
28
  touchMemoryReferences,
29
29
  updateMemoryApproval,
30
30
  updateMemoryEntry
31
- } from "./chunk-PPPSK4MA.js";
31
+ } from "./chunk-UKITSNSH.js";
32
32
  import "./chunk-3FEZSLGI.js";
33
33
  import "./chunk-HOSJZMQS.js";
34
34
  import "./chunk-IW3Q7AE5.js";
35
- import "./chunk-RV2YOTEQ.js";
35
+ import "./chunk-THUXZNJL.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-OZKTHQWA.js";
6
- import "./chunk-VFVN5CWA.js";
5
+ } from "./chunk-3ZQZO5F7.js";
6
+ import "./chunk-2YDLBM3Z.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-XSBGCZOP.js";
20
+ } from "./chunk-7G7RZHJI.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-RV2YOTEQ.js";
26
+ } from "./chunk-THUXZNJL.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-QKGKWCXE.js";
5
- import "./chunk-3DRSBZQ7.js";
4
+ } from "./chunk-L4FDTQ42.js";
5
+ import "./chunk-GIJL4EFA.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-PWLQU43X.js";
6
- import "./chunk-RV2YOTEQ.js";
5
+ } from "./chunk-S7ABWTDV.js";
6
+ import "./chunk-THUXZNJL.js";
7
7
  export {
8
8
  executeTests,
9
9
  runTestsTool
@@ -4,10 +4,10 @@ import {
4
4
  pathTokens,
5
5
  rebuildSemanticIndex,
6
6
  semanticSearch
7
- } from "./chunk-AEAYUKSY.js";
8
- import "./chunk-RWM2GFRC.js";
7
+ } from "./chunk-7XU4BATV.js";
9
8
  import "./chunk-IEQAE3QG.js";
10
9
  import "./chunk-JV5N65KN.js";
10
+ import "./chunk-RWM2GFRC.js";
11
11
  import "./chunk-6BUTA5VW.js";
12
12
  export {
13
13
  buildEmbeddingText,
@@ -1,9 +1,9 @@
1
1
  #!/usr/bin/env node
2
2
  import {
3
3
  ToolRegistry
4
- } from "./chunk-I4FJGILK.js";
4
+ } from "./chunk-BRLLV3FX.js";
5
5
  import "./chunk-GHWZVPUV.js";
6
- import "./chunk-PPPSK4MA.js";
6
+ import "./chunk-UKITSNSH.js";
7
7
  import "./chunk-4DEMGCK4.js";
8
8
  import "./chunk-UUSRWSSX.js";
9
9
  import "./chunk-CKH4KQ4E.js";
@@ -14,7 +14,8 @@ import "./chunk-NYNSYLFY.js";
14
14
  import "./chunk-3FEZSLGI.js";
15
15
  import {
16
16
  runTool
17
- } from "./chunk-BXG44VIQ.js";
17
+ } from "./chunk-EYUCJBGS.js";
18
+ import "./chunk-RS7SKYTS.js";
18
19
  import {
19
20
  getDangerLevel,
20
21
  schemaToJsonSchema
@@ -23,10 +24,10 @@ import "./chunk-TU3L3PW7.js";
23
24
  import "./chunk-HOSJZMQS.js";
24
25
  import "./chunk-IW3Q7AE5.js";
25
26
  import "./chunk-4BKXL7SM.js";
26
- import "./chunk-PWLQU43X.js";
27
+ import "./chunk-S7ABWTDV.js";
27
28
  import {
28
29
  VERSION
29
- } from "./chunk-RV2YOTEQ.js";
30
+ } from "./chunk-THUXZNJL.js";
30
31
 
31
32
  // src/mcp/server.ts
32
33
  import { createInterface } from "readline";
@@ -16,6 +16,8 @@ import {
16
16
  AUTO_COMPACT_INSTRUCTION,
17
17
  McpManager,
18
18
  SkillManager,
19
+ agentStopMessage,
20
+ agentUnknownMessage,
19
21
  applyPlanCommand,
20
22
  applyProfileCommand,
21
23
  applyThinkCommand,
@@ -33,17 +35,21 @@ import {
33
35
  checkpointSavedMessage,
34
36
  clearedSessionMessage,
35
37
  costSourceNote,
38
+ createDefaultCommands,
36
39
  decideDeferredSave,
37
40
  decideModel,
38
41
  describeRouting,
39
42
  estimateConversationTokens,
40
43
  evaluateContextPressure,
41
44
  filterMemoryEntries,
45
+ formatAgentList,
46
+ formatAgentRuns,
42
47
  formatCheckpointList,
43
48
  formatForkReport,
44
49
  formatRewindReport,
45
50
  formatSessionSummaryLine,
46
51
  loadDevState,
52
+ parseAgentCommand,
47
53
  parseBatchDeleteArgs,
48
54
  parseCheckpointCommand,
49
55
  parseCleanArgs,
@@ -53,6 +59,7 @@ import {
53
59
  parseRewindArgs,
54
60
  parseRouteCommand,
55
61
  parseSessionListArgs,
62
+ parseSkillCommand,
56
63
  persistToolRound,
57
64
  readGitDiff,
58
65
  rebuildDoneMessage,
@@ -71,9 +78,10 @@ import {
71
78
  sessionListNeedsFileSize,
72
79
  sessionListSummary,
73
80
  setupProxy,
81
+ skillHistoryNote,
74
82
  snapshotFile,
75
83
  stripRoutingTags
76
- } from "./chunk-Z23JYUOL.js";
84
+ } from "./chunk-53V3RQY5.js";
77
85
  import {
78
86
  CNY_PER_USD,
79
87
  CostTracker,
@@ -82,7 +90,7 @@ import {
82
90
  getCostCurrency,
83
91
  getPricing,
84
92
  setCostCurrency
85
- } from "./chunk-DPTEC6AQ.js";
93
+ } from "./chunk-LWPWBRAC.js";
86
94
  import {
87
95
  ToolExecutor,
88
96
  ToolRegistry,
@@ -115,7 +123,7 @@ import {
115
123
  spawnAgentContext,
116
124
  truncateOutput,
117
125
  undoStack
118
- } from "./chunk-I4FJGILK.js";
126
+ } from "./chunk-BRLLV3FX.js";
119
127
  import {
120
128
  buildReviewPrompt,
121
129
  buildSecurityReviewPrompt
@@ -142,7 +150,7 @@ import {
142
150
  restoreMemoryEntries,
143
151
  updateMemoryApproval,
144
152
  updateMemoryEntry
145
- } from "./chunk-PPPSK4MA.js";
153
+ } from "./chunk-UKITSNSH.js";
146
154
  import "./chunk-4DEMGCK4.js";
147
155
  import "./chunk-UUSRWSSX.js";
148
156
  import "./chunk-CKH4KQ4E.js";
@@ -161,7 +169,7 @@ import {
161
169
  buildDoctorReport,
162
170
  formatDoctorReport,
163
171
  loadContextFiles
164
- } from "./chunk-C4CIIIDT.js";
172
+ } from "./chunk-6SCELZG6.js";
165
173
  import {
166
174
  describePlugin,
167
175
  getActivePluginAssets,
@@ -176,13 +184,14 @@ import {
176
184
  runTool,
177
185
  setPluginEnabled,
178
186
  trustPlugin
179
- } from "./chunk-BXG44VIQ.js";
187
+ } from "./chunk-EYUCJBGS.js";
188
+ import "./chunk-RS7SKYTS.js";
180
189
  import {
181
190
  ProviderRegistry
182
191
  } from "./chunk-UGY5SVNX.js";
183
192
  import {
184
193
  ConfigManager
185
- } from "./chunk-XSBGCZOP.js";
194
+ } from "./chunk-7G7RZHJI.js";
186
195
  import {
187
196
  CONTENT_ONLY_STREAM_REMINDER,
188
197
  TEE_FINAL_USER_NUDGE,
@@ -212,7 +221,7 @@ import {
212
221
  maskConfigSecrets
213
222
  } from "./chunk-XNFIYS7G.js";
214
223
  import "./chunk-4BKXL7SM.js";
215
- import "./chunk-PWLQU43X.js";
224
+ import "./chunk-S7ABWTDV.js";
216
225
  import {
217
226
  AGENTIC_BEHAVIOR_GUIDELINE,
218
227
  AUTHOR,
@@ -228,7 +237,7 @@ import {
228
237
  SKILLS_DIR_NAME,
229
238
  VERSION,
230
239
  buildUserIdentityPrompt
231
- } from "./chunk-RV2YOTEQ.js";
240
+ } from "./chunk-THUXZNJL.js";
232
241
 
233
242
  // src/web/server.ts
234
243
  import express from "express";
@@ -986,7 +995,7 @@ Cache: write=${cacheCreate} read=${cacheRead}` : "";
986
995
  Cost: ${formatCost(cost)}` : "";
987
996
  let memoryLine = "";
988
997
  try {
989
- const { countPendingMemories: countPendingMemories2 } = await import("./persistent-memory-J2OVPLWI.js");
998
+ const { countPendingMemories: countPendingMemories2 } = await import("./persistent-memory-LVX2OT4L.js");
990
999
  const pending = countPendingMemories2(ctx.config.getConfigDir());
991
1000
  if (pending > 0) memoryLine = `
992
1001
  Memory: \u26A0 ${pending} pending approval \u2014 see the Memory panel or /memory`;
@@ -1740,14 +1749,14 @@ async function handleMcp(_args, ctx) {
1740
1749
  ctx.send({ type: "info", message: lines.join("\n") });
1741
1750
  }
1742
1751
  async function handleSkill(args, ctx) {
1743
- const sub = args[0];
1744
1752
  if (!ctx.skillManager) {
1745
1753
  ctx.send({ type: "error", message: "Skill system not available." });
1746
1754
  return;
1747
1755
  }
1748
- if (!sub || sub === "list") {
1756
+ const intent = parseSkillCommand(args);
1757
+ const active = ctx.skillManager.getActive();
1758
+ if (intent.kind === "list") {
1749
1759
  const skills = ctx.skillManager.listSkills();
1750
- const active = ctx.skillManager.getActive();
1751
1760
  if (skills.length === 0) {
1752
1761
  ctx.send({ type: "info", message: "No skills available. Add .md files to ~/.aicli/skills/" });
1753
1762
  } else {
@@ -1761,29 +1770,45 @@ ${lines.join("\n")}` });
1761
1770
  }
1762
1771
  return;
1763
1772
  }
1764
- if (sub === "off") {
1765
- ctx.skillManager.deactivate();
1766
- ctx.send({ type: "info", message: "\u{1F50C} Skill deactivated." });
1767
- ctx.sendToolsList();
1768
- ctx.sendStatus();
1769
- return;
1770
- }
1771
- if (sub === "reload") {
1773
+ if (intent.kind === "reload") {
1772
1774
  ctx.skillManager.loadSkills(getActivePluginAssets(ctx.config.getConfigDir()).skillDirs);
1773
1775
  ctx.send({ type: "info", message: `\u{1F504} Reloaded ${ctx.skillManager.listSkills().length} skill(s).` });
1774
1776
  ctx.sendToolsList();
1775
1777
  return;
1776
1778
  }
1777
- const activated = ctx.skillManager.activate(sub);
1778
- if (activated) {
1779
- ctx.send({ type: "info", message: `\u2705 Skill activated: ${activated.meta.name}
1780
- ${activated.meta.description || ""}` });
1779
+ const note = skillHistoryNote(
1780
+ active?.meta.name ?? "(none)",
1781
+ intent.kind === "deactivate" ? "(none)" : intent.name,
1782
+ ctx.sessions.current?.messages.length ?? 0
1783
+ );
1784
+ if (intent.kind === "deactivate") {
1785
+ if (!active) {
1786
+ ctx.send({ type: "info", message: "No skill is currently active." });
1787
+ return;
1788
+ }
1789
+ ctx.skillManager.deactivate();
1790
+ ctx.send({ type: "info", message: note ? `\u{1F50C} Skill deactivated.
1791
+ ${note}` : "\u{1F50C} Skill deactivated." });
1781
1792
  ctx.sendToolsList();
1782
1793
  ctx.sendStatus();
1783
- } else {
1794
+ return;
1795
+ }
1796
+ if (active?.meta.name === intent.name) {
1797
+ ctx.send({ type: "info", message: `Skill '${intent.name}' is already active.` });
1798
+ return;
1799
+ }
1800
+ const activated = ctx.skillManager.activate(intent.name);
1801
+ if (!activated) {
1784
1802
  const available = ctx.skillManager.listSkills().map((s) => s.meta.name).join(", ");
1785
- ctx.send({ type: "error", message: `Skill "${sub}" not found. Available: ${available}` });
1803
+ ctx.send({ type: "error", message: `Skill "${intent.name}" not found. Available: ${available}` });
1804
+ return;
1786
1805
  }
1806
+ const head = `\u2705 Skill activated: ${activated.meta.name}
1807
+ ${activated.meta.description || ""}`;
1808
+ ctx.send({ type: "info", message: note ? `${head}
1809
+ ${note}` : head });
1810
+ ctx.sendToolsList();
1811
+ ctx.sendStatus();
1787
1812
  }
1788
1813
  async function handleCommands(_args, ctx) {
1789
1814
  const configDir = ctx.config.getConfigDir();
@@ -1894,7 +1919,7 @@ async function handleTest(args, ctx) {
1894
1919
  const isCommand = argStr.includes(" ") || /^(mvn|gradle|npm|pytest|cargo|go)\b/.test(argStr);
1895
1920
  testArgs = isCommand ? { command: argStr } : { filter: argStr };
1896
1921
  }
1897
- const runTests = ctx.runTests ?? (await import("./run-tests-DPO23PKA.js")).executeTests;
1922
+ const runTests = ctx.runTests ?? (await import("./run-tests-KZ2IUZHK.js")).executeTests;
1898
1923
  const report = await runTests(testArgs);
1899
1924
  ctx.send({ type: "info", message: report });
1900
1925
  } catch (err) {
@@ -2169,7 +2194,7 @@ async function handleMemory(args, ctx) {
2169
2194
  }
2170
2195
  if (intent.kind === "status") {
2171
2196
  const { getChatIndexStatus } = await import("./chat-index-2D5GK2DB.js");
2172
- const { listMemoryEntries: listMemoryEntries2, isMemoryExpired: isMemoryExpired2, formatMemoryForPrompt: formatMemoryForPrompt2 } = await import("./persistent-memory-J2OVPLWI.js");
2197
+ const { listMemoryEntries: listMemoryEntries2, isMemoryExpired: isMemoryExpired2, formatMemoryForPrompt: formatMemoryForPrompt2 } = await import("./persistent-memory-LVX2OT4L.js");
2173
2198
  const memories = listMemoryEntries2(configDir, { includeExpired: true, includeRejected: true });
2174
2199
  const injected = formatMemoryForPrompt2(configDir, process.cwd(), ctx.config.get("memory")?.maxChars);
2175
2200
  const view = buildMemoryStatusView({
@@ -2192,7 +2217,7 @@ async function handleMemory(args, ctx) {
2192
2217
  return;
2193
2218
  }
2194
2219
  if (intent.kind === "recall") {
2195
- const { searchPersistentMemories, touchMemoryReferences } = await import("./persistent-memory-J2OVPLWI.js");
2220
+ const { searchPersistentMemories, touchMemoryReferences } = await import("./persistent-memory-LVX2OT4L.js");
2196
2221
  const { searchChatMemory } = await import("./chat-index-2D5GK2DB.js");
2197
2222
  const persistentHits = searchPersistentMemories(configDir, intent.query, process.cwd(), 3);
2198
2223
  if (persistentHits.length > 0) {
@@ -2313,7 +2338,7 @@ async function handleMemory(args, ctx) {
2313
2338
  ctx.handleMemoryManage(intent.action, args[1], intent.action === "expire" ? args[2] : void 0);
2314
2339
  } else if (intent.kind === "export") {
2315
2340
  if (args[1] === "md") {
2316
- const { exportMemoryEntries: exportMemoryEntries2 } = await import("./persistent-memory-J2OVPLWI.js");
2341
+ const { exportMemoryEntries: exportMemoryEntries2 } = await import("./persistent-memory-LVX2OT4L.js");
2317
2342
  ctx.send({
2318
2343
  type: "export_data",
2319
2344
  format: "md",
@@ -2493,31 +2518,23 @@ async function handleYolo(args, ctx) {
2493
2518
  }
2494
2519
  }
2495
2520
  async function handleAgent(args, ctx) {
2496
- const sub = args[0]?.toLowerCase() ?? "summary";
2497
- if (sub === "list") {
2498
- const agents = listAgentConfigs(ctx.config.getConfigDir());
2499
- const lines = [`Agents (${agents.length})`, ""];
2500
- for (const agent of agents) {
2501
- const active = agent.name === getPreferredAgentName() ? " *" : " ";
2502
- const model = [agent.provider, agent.model].filter(Boolean).join("/") || "inherit";
2503
- lines.push(`${active} ${agent.name} [${agent.source ?? "builtin"}] \u2014 ${agent.description ?? ""}`);
2504
- lines.push(` model: ${model} \xB7 permission: ${agent.permissionProfile ?? "workspace-write"} \xB7 maxRounds: ${agent.maxToolRounds ?? "inherit"}`);
2505
- }
2506
- lines.push("", "Config dirs: ~/.aicli/agents/ and .aicli/agents/");
2507
- ctx.send({ type: "info", message: lines.join("\n") });
2521
+ const configDir = ctx.config.getConfigDir();
2522
+ const intent = parseAgentCommand(args);
2523
+ if (intent.kind === "usage") {
2524
+ ctx.send({ type: "error", message: intent.message });
2508
2525
  return;
2509
2526
  }
2510
- if (sub === "switch") {
2511
- const name = args[1];
2512
- if (!name) {
2513
- ctx.send({ type: "error", message: "Usage: /agent switch <name>" });
2514
- return;
2515
- }
2516
- const agent = resolveAgentConfig(name, ctx.config.getConfigDir());
2527
+ if (intent.kind === "list") {
2528
+ ctx.send({ type: "info", message: formatAgentList(listAgentConfigs(configDir), getPreferredAgentName()).join("\n") });
2529
+ return;
2530
+ }
2531
+ if (intent.kind === "switch") {
2532
+ const agent = resolveAgentConfig(intent.name, configDir);
2517
2533
  if (!agent) {
2518
- const available = listAgentConfigs(ctx.config.getConfigDir()).map((a) => a.name).join(", ");
2519
- ctx.send({ type: "error", message: `Unknown agent: ${name}
2520
- Available: ${available}` });
2534
+ ctx.send({
2535
+ type: "error",
2536
+ message: agentUnknownMessage(intent.name, listAgentConfigs(configDir).map((a) => a.name))
2537
+ });
2521
2538
  return;
2522
2539
  }
2523
2540
  setPreferredAgentName(agent.name);
@@ -2525,31 +2542,12 @@ Available: ${available}` });
2525
2542
  ctx.sendStatus();
2526
2543
  return;
2527
2544
  }
2528
- if (sub === "stop") {
2529
- const target = args[1] ?? "all";
2530
- const count = requestAgentStop(target);
2531
- ctx.send({ type: "info", message: count > 0 ? `Stop requested for ${count} running agent(s).` : "No matching running agents." });
2545
+ if (intent.kind === "stop") {
2546
+ ctx.send({ type: "info", message: agentStopMessage(requestAgentStop(intent.target)) });
2532
2547
  ctx.sendStatus();
2533
2548
  return;
2534
2549
  }
2535
- if (sub === "summary") {
2536
- const runs = listAgentRuns();
2537
- if (runs.length === 0) {
2538
- ctx.send({ type: "info", message: "No sub-agent runs yet." });
2539
- return;
2540
- }
2541
- const lines = [`Recent agent runs (${runs.length})`, ""];
2542
- for (const run of runs.slice(0, 20)) {
2543
- lines.push(`${run.id} ${run.status} ${run.agentName} ${run.startedAt}`);
2544
- lines.push(` task: ${run.task.slice(0, 120)}${run.task.length > 120 ? "..." : ""}`);
2545
- if (run.toolNames.length > 0) lines.push(` tools: ${run.toolNames.join(", ")}`);
2546
- if (run.summary) lines.push(` summary: ${run.summary.slice(0, 180)}${run.summary.length > 180 ? "..." : ""}`);
2547
- if (run.error) lines.push(` error: ${run.error}`);
2548
- }
2549
- ctx.send({ type: "info", message: lines.join("\n") });
2550
- return;
2551
- }
2552
- ctx.send({ type: "error", message: "Usage: /agent list|switch <name>|stop <id|all>|summary" });
2550
+ ctx.send({ type: "info", message: formatAgentRuns(listAgentRuns()).join("\n") });
2553
2551
  }
2554
2552
 
2555
2553
  // src/web/commands/misc-commands.ts
@@ -2624,7 +2622,11 @@ async function handleAbout(_args, ctx) {
2624
2622
  "",
2625
2623
  `**Providers:** ${providerList.length} (${providerList.map((p) => p.id).join(", ")})`,
2626
2624
  `**Tools:** ${toolCount + mcpTools} (${toolCount} built-in${mcpTools > 0 ? ` + ${mcpTools} MCP` : ""})`,
2627
- `**REPL Commands:** 37`,
2625
+ // 审计 P1-02:此前这里硬编码 37。v0.4.183 的题目正是「/about 去硬编码,计数从
2626
+ // registry 动态派生」,但只改了 REPL 那一半(repl/renderer.ts),Web 这半的数字
2627
+ // 就停在了当时的 37,漂了六十多个版本没人发现(docs-drift 守卫只校验文档里的
2628
+ // 计数标记,不校验源码里的展示串)。
2629
+ `**REPL Commands:** ${createDefaultCommands().length}`,
2628
2630
  "",
2629
2631
  `GitHub: https://github.com/jinzhengdong/ai-cli`
2630
2632
  ];
@@ -4,9 +4,9 @@ import {
4
4
  googleSearchContext,
5
5
  isToolCapableProvider,
6
6
  truncateOutput
7
- } from "./chunk-I4FJGILK.js";
7
+ } from "./chunk-BRLLV3FX.js";
8
8
  import "./chunk-GHWZVPUV.js";
9
- import "./chunk-PPPSK4MA.js";
9
+ import "./chunk-UKITSNSH.js";
10
10
  import "./chunk-4DEMGCK4.js";
11
11
  import "./chunk-UUSRWSSX.js";
12
12
  import "./chunk-CKH4KQ4E.js";
@@ -17,7 +17,8 @@ import "./chunk-NYNSYLFY.js";
17
17
  import "./chunk-3FEZSLGI.js";
18
18
  import {
19
19
  runTool
20
- } from "./chunk-BXG44VIQ.js";
20
+ } from "./chunk-EYUCJBGS.js";
21
+ import "./chunk-RS7SKYTS.js";
21
22
  import {
22
23
  getDangerLevel,
23
24
  runLeanAgentLoop
@@ -28,10 +29,10 @@ import {
28
29
  atomicWriteFileSync
29
30
  } from "./chunk-IW3Q7AE5.js";
30
31
  import "./chunk-4BKXL7SM.js";
31
- import "./chunk-PWLQU43X.js";
32
+ import "./chunk-S7ABWTDV.js";
32
33
  import {
33
34
  SUBAGENT_ALLOWED_TOOLS
34
- } from "./chunk-RV2YOTEQ.js";
35
+ } from "./chunk-THUXZNJL.js";
35
36
 
36
37
  // src/hub/task-orchestrator.ts
37
38
  import { createInterface } from "readline";
@@ -5,13 +5,14 @@ import {
5
5
  formatCost,
6
6
  getPricing,
7
7
  setCostCurrency
8
- } from "./chunk-DPTEC6AQ.js";
8
+ } from "./chunk-LWPWBRAC.js";
9
+ import "./chunk-RS7SKYTS.js";
9
10
  import {
10
11
  ConfigManager
11
- } from "./chunk-XSBGCZOP.js";
12
+ } from "./chunk-7G7RZHJI.js";
12
13
  import "./chunk-TU3L3PW7.js";
13
14
  import "./chunk-IW3Q7AE5.js";
14
- import "./chunk-RV2YOTEQ.js";
15
+ import "./chunk-THUXZNJL.js";
15
16
 
16
17
  // src/cli/usage.ts
17
18
  function classifyRowCost(row) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "jinzd-ai-cli",
3
- "version": "0.4.284",
3
+ "version": "0.4.286",
4
4
  "description": "Cross-platform REPL-style AI CLI with multi-provider support",
5
5
  "type": "module",
6
6
  "main": "./dist/index.js",