jinzd-ai-cli 0.4.281 → 0.4.283

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 (34) hide show
  1. package/dist/{batch-237ZXBQD.js → batch-6WWR4P5U.js} +2 -2
  2. package/dist/{chunk-5GYOQ7EF.js → chunk-2YVZTDP4.js} +1 -1
  3. package/dist/{chunk-J3RWNQOF.js → chunk-4J7FIGQD.js} +1 -1
  4. package/dist/{chunk-UTJQXG4P.js → chunk-CUS4FJVP.js} +3 -3
  5. package/dist/{chunk-FHRIDE2T.js → chunk-D7BIF6JO.js} +4 -4
  6. package/dist/{chunk-WUIOUJA2.js → chunk-F3YN754E.js} +1 -1
  7. package/dist/{chunk-6NO5FZW6.js → chunk-IUVDZVZ4.js} +18 -0
  8. package/dist/{chunk-IXEKDAIX.js → chunk-JR2J3V6J.js} +1 -1
  9. package/dist/{chunk-2FCKZ3OS.js → chunk-JSQGDPDK.js} +1 -1
  10. package/dist/{chunk-J5TXHFDO.js → chunk-LXJF46SO.js} +191 -4
  11. package/dist/{chunk-H2VE4TTN.js → chunk-M3UJ2JCW.js} +1 -1
  12. package/dist/{chunk-VB54ILH7.js → chunk-NUJTNH76.js} +1 -1
  13. package/dist/{chunk-4XJVSMZ6.js → chunk-QDOFRKY2.js} +1 -1
  14. package/dist/{chunk-BVGSR3BA.js → chunk-RALUII7R.js} +3 -3
  15. package/dist/{chunk-L7C34TFI.js → chunk-V4IY5CRJ.js} +1 -1
  16. package/dist/{chunk-JT2A2M4F.js → chunk-Z3QNLNSU.js} +1 -1
  17. package/dist/{ci-LXRTYJ6F.js → ci-FTS7XNWA.js} +4 -4
  18. package/dist/{ci-format-II3OT2VU.js → ci-format-N5PXGS7Y.js} +2 -2
  19. package/dist/{constants-X53QCUTP.js → constants-3B5KIPLK.js} +1 -1
  20. package/dist/{doctor-cli-6JCJEQR4.js → doctor-cli-VRMIEREY.js} +4 -4
  21. package/dist/electron-server.js +355 -77
  22. package/dist/{hub-RXAFF7QI.js → hub-TZET5544.js} +2 -2
  23. package/dist/index.js +153 -152
  24. package/dist/{persist-TBQILDSE.js → persist-S77WRVLD.js} +2 -2
  25. package/dist/{persistent-memory-7CKJLS25.js → persistent-memory-3OYRXF2L.js} +2 -2
  26. package/dist/{persistent-memory-WAKFKH2I.js → persistent-memory-IPCUJVWF.js} +2 -2
  27. package/dist/{pr-DZTRHAMG.js → pr-XUXWP52Z.js} +4 -4
  28. package/dist/{run-tests-4ESYEROQ.js → run-tests-3T5WRG62.js} +2 -2
  29. package/dist/{run-tests-XGCNUT5S.js → run-tests-PUOXATHQ.js} +2 -2
  30. package/dist/{server-6RYXFG3H.js → server-4XSDRPZM.js} +176 -82
  31. package/dist/{server-EFA7UP4I.js → server-WGEGVVY5.js} +5 -5
  32. package/dist/{task-orchestrator-H3AEIHR3.js → task-orchestrator-LEW2VSZD.js} +5 -5
  33. package/dist/{usage-W7TZWHY7.js → usage-7VEAXMMP.js} +2 -2
  34. 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-VB54ILH7.js";
14
+ } from "./chunk-NUJTNH76.js";
15
15
  import {
16
16
  AUTO_COMPACT_INSTRUCTION,
17
17
  McpManager,
@@ -22,6 +22,9 @@ import {
22
22
  armDeferredSave,
23
23
  autoTrimSessionIfNeeded,
24
24
  buildInitPrompt,
25
+ buildMemoryStatusView,
26
+ buildRecallView,
27
+ buildRewindList,
25
28
  buildSessionCostReport,
26
29
  buildSessionExport,
27
30
  checkpointDeletedMessage,
@@ -37,17 +40,24 @@ import {
37
40
  evaluateContextPressure,
38
41
  filterMemoryEntries,
39
42
  formatCheckpointList,
43
+ formatForkReport,
44
+ formatRewindReport,
40
45
  formatSessionSummaryLine,
41
46
  loadDevState,
42
47
  parseBatchDeleteArgs,
43
48
  parseCheckpointCommand,
44
49
  parseCleanArgs,
50
+ parseMemoryCommand,
45
51
  parseMemoryShowFilters,
46
52
  parseModelCommand,
53
+ parseRewindArgs,
47
54
  parseRouteCommand,
48
55
  parseSessionListArgs,
49
56
  persistToolRound,
50
57
  readGitDiff,
58
+ rebuildDoneMessage,
59
+ rebuildStartMessage,
60
+ resolveForkPoint,
51
61
  resolveModelSwitch,
52
62
  resolveProviderSwitch,
53
63
  resolveSessionRef,
@@ -63,7 +73,7 @@ import {
63
73
  setupProxy,
64
74
  snapshotFile,
65
75
  stripRoutingTags
66
- } from "./chunk-J5TXHFDO.js";
76
+ } from "./chunk-LXJF46SO.js";
67
77
  import {
68
78
  CNY_PER_USD,
69
79
  CostTracker,
@@ -105,7 +115,7 @@ import {
105
115
  spawnAgentContext,
106
116
  truncateOutput,
107
117
  undoStack
108
- } from "./chunk-FHRIDE2T.js";
118
+ } from "./chunk-D7BIF6JO.js";
109
119
  import {
110
120
  buildReviewPrompt,
111
121
  buildSecurityReviewPrompt
@@ -132,7 +142,7 @@ import {
132
142
  restoreMemoryEntries,
133
143
  updateMemoryApproval,
134
144
  updateMemoryEntry
135
- } from "./chunk-H2VE4TTN.js";
145
+ } from "./chunk-M3UJ2JCW.js";
136
146
  import "./chunk-4DEMGCK4.js";
137
147
  import "./chunk-UUSRWSSX.js";
138
148
  import "./chunk-CKH4KQ4E.js";
@@ -142,7 +152,7 @@ import "./chunk-5C76XDDF.js";
142
152
  import {
143
153
  SessionManager,
144
154
  getContentText
145
- } from "./chunk-6NO5FZW6.js";
155
+ } from "./chunk-IUVDZVZ4.js";
146
156
  import "./chunk-NYNSYLFY.js";
147
157
  import {
148
158
  scanString
@@ -151,7 +161,7 @@ import {
151
161
  buildDoctorReport,
152
162
  formatDoctorReport,
153
163
  loadContextFiles
154
- } from "./chunk-BVGSR3BA.js";
164
+ } from "./chunk-RALUII7R.js";
155
165
  import {
156
166
  describePlugin,
157
167
  getActivePluginAssets,
@@ -166,13 +176,13 @@ import {
166
176
  runTool,
167
177
  setPluginEnabled,
168
178
  trustPlugin
169
- } from "./chunk-L7C34TFI.js";
179
+ } from "./chunk-V4IY5CRJ.js";
170
180
  import {
171
181
  ProviderRegistry
172
182
  } from "./chunk-UGY5SVNX.js";
173
183
  import {
174
184
  ConfigManager
175
- } from "./chunk-4XJVSMZ6.js";
185
+ } from "./chunk-QDOFRKY2.js";
176
186
  import {
177
187
  CONTENT_ONLY_STREAM_REMINDER,
178
188
  TEE_FINAL_USER_NUDGE,
@@ -202,7 +212,7 @@ import {
202
212
  maskConfigSecrets
203
213
  } from "./chunk-XNFIYS7G.js";
204
214
  import "./chunk-4BKXL7SM.js";
205
- import "./chunk-J3RWNQOF.js";
215
+ import "./chunk-4J7FIGQD.js";
206
216
  import {
207
217
  AGENTIC_BEHAVIOR_GUIDELINE,
208
218
  AUTHOR,
@@ -218,7 +228,7 @@ import {
218
228
  SKILLS_DIR_NAME,
219
229
  VERSION,
220
230
  buildUserIdentityPrompt
221
- } from "./chunk-2FCKZ3OS.js";
231
+ } from "./chunk-JSQGDPDK.js";
222
232
 
223
233
  // src/web/server.ts
224
234
  import express from "express";
@@ -976,7 +986,7 @@ Cache: write=${cacheCreate} read=${cacheRead}` : "";
976
986
  Cost: ${formatCost(cost)}` : "";
977
987
  let memoryLine = "";
978
988
  try {
979
- const { countPendingMemories: countPendingMemories2 } = await import("./persistent-memory-7CKJLS25.js");
989
+ const { countPendingMemories: countPendingMemories2 } = await import("./persistent-memory-3OYRXF2L.js");
980
990
  const pending = countPendingMemories2(ctx.config.getConfigDir());
981
991
  if (pending > 0) memoryLine = `
982
992
  Memory: \u26A0 ${pending} pending approval \u2014 see the Memory panel or /memory`;
@@ -1555,27 +1565,27 @@ async function handleFork(args, ctx) {
1555
1565
  ctx.send({ type: "info", message: "No active session to fork." });
1556
1566
  return;
1557
1567
  }
1558
- const sub = args.join(" ").trim();
1559
- let messageCount = session.messages.length;
1560
- let fromLabel = "current position";
1561
- if (sub) {
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)`;
1568
+ const point = resolveForkPoint(session, args.join(" ").trim());
1569
+ if (!point.ok) {
1570
+ ctx.send({ type: "error", message: point.message });
1571
+ return;
1570
1572
  }
1571
1573
  try {
1572
- const originalId = session.id.slice(0, 8);
1573
- const forked = await ctx.sessions.forkSession(messageCount);
1574
- ctx.send({ type: "info", message: `\u{1F500} Session Forked
1575
- Original: ${originalId}
1576
- Forked: ${forked.id.slice(0, 8)} "${forked.title ?? "(untitled)"}"
1577
- From: ${fromLabel}
1578
- Messages: ${forked.messages.length} copied` });
1574
+ const originalId = session.id;
1575
+ const originalTitle = session.title ?? "(untitled)";
1576
+ const forked = await ctx.sessions.forkSession(point.messageCount);
1577
+ ctx.send({
1578
+ type: "info",
1579
+ message: formatForkReport({
1580
+ originalId,
1581
+ originalTitle,
1582
+ forkedId: forked.id,
1583
+ forkedTitle: forked.title ?? "(untitled)",
1584
+ fromLabel: point.fromLabel,
1585
+ messageCount: forked.messages.length,
1586
+ checkpointCount: forked.checkpoints.length
1587
+ }).join("\n")
1588
+ });
1579
1589
  ctx.sendSessionMessages();
1580
1590
  ctx.sendStatus();
1581
1591
  ctx.sendSessionList();
@@ -1589,41 +1599,42 @@ async function handleRewind(args, ctx) {
1589
1599
  ctx.send({ type: "info", message: "No messages to rewind." });
1590
1600
  return;
1591
1601
  }
1592
- const rewindSub = args[0];
1593
- if (rewindSub === "list" || !rewindSub) {
1594
- const lines = [`Conversation messages (${session.messages.length} total):
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") });
1602
+ const intent = parseRewindArgs(args, session.messages.length);
1603
+ if (intent.kind === "invalid") {
1604
+ ctx.send({ type: "error", message: intent.message });
1605
1605
  return;
1606
1606
  }
1607
- const rewindN = parseInt(rewindSub, 10);
1608
- if (isNaN(rewindN) || rewindN < 1 || rewindN > session.messages.length) {
1609
- ctx.send({ type: "error", message: `Invalid message number: ${rewindSub}. Range: 1-${session.messages.length}` });
1607
+ const { fileCheckpoints } = await import("./file-checkpoint-NKBHGC7L.js");
1608
+ if (intent.kind === "list") {
1609
+ const rows = buildRewindList(session.messages, fileCheckpoints.getMessageIndices());
1610
+ ctx.send({
1611
+ type: "info",
1612
+ message: [
1613
+ `Conversation messages (${rows.length} total):`,
1614
+ "",
1615
+ ...rows.map((r) => ` [${r.index}] ${r.role.padEnd(10)} ${r.preview}${r.hasCheckpoint ? " \u{1F4CC}" : ""}`),
1616
+ "",
1617
+ "Usage: /rewind <n> \u2014 rewind to message N (1-based)",
1618
+ "\u{1F4CC} = file checkpoint exists at this point"
1619
+ ].join("\n")
1620
+ });
1610
1621
  return;
1611
1622
  }
1612
- const { fileCheckpoints: fc } = await import("./file-checkpoint-NKBHGC7L.js");
1613
- const rewindRemoved = session.messages.length - rewindN;
1614
- const rewindResult = fc.restoreToMessageIndex(rewindN);
1615
- session.messages = session.messages.slice(0, rewindN);
1616
- session.checkpoints = session.checkpoints.filter((c) => c.messageIndex <= rewindN);
1617
- session.updated = /* @__PURE__ */ new Date();
1618
- ctx.sessions.save();
1619
- const rewindLines = [`\u2713 Rewound to message ${rewindN}`, ` Messages removed: ${rewindRemoved}`];
1620
- if (rewindResult.restored > 0 || rewindResult.deleted > 0) {
1621
- rewindLines.push(` Files restored: ${rewindResult.restored}, deleted: ${rewindResult.deleted}`);
1622
- for (const f of rewindResult.files) rewindLines.push(` ${f}`);
1623
- } else {
1624
- rewindLines.push(" No file changes to revert.");
1625
- }
1626
- ctx.send({ type: "info", message: rewindLines.join("\n") });
1623
+ const messagesRemoved = session.messages.length - intent.target;
1624
+ const result = fileCheckpoints.restoreToMessageIndex(intent.target);
1625
+ session.truncateTo(intent.target);
1626
+ await ctx.sessions.save();
1627
+ ctx.resetWebSessionUsage();
1628
+ ctx.send({
1629
+ type: "info",
1630
+ message: formatRewindReport({
1631
+ target: intent.target,
1632
+ messagesRemoved,
1633
+ filesRestored: result.restored,
1634
+ filesDeleted: result.deleted,
1635
+ files: result.files
1636
+ }).join("\n")
1637
+ });
1627
1638
  ctx.sendSessionMessages();
1628
1639
  ctx.sendStatus();
1629
1640
  }
@@ -1883,7 +1894,7 @@ async function handleTest(args, ctx) {
1883
1894
  const isCommand = argStr.includes(" ") || /^(mvn|gradle|npm|pytest|cargo|go)\b/.test(argStr);
1884
1895
  testArgs = isCommand ? { command: argStr } : { filter: argStr };
1885
1896
  }
1886
- const runTests = ctx.runTests ?? (await import("./run-tests-XGCNUT5S.js")).executeTests;
1897
+ const runTests = ctx.runTests ?? (await import("./run-tests-PUOXATHQ.js")).executeTests;
1887
1898
  const report = await runTests(testArgs);
1888
1899
  ctx.send({ type: "info", message: report });
1889
1900
  } catch (err) {
@@ -2133,8 +2144,91 @@ async function handleIndex(args, ctx) {
2133
2144
  }
2134
2145
  }
2135
2146
  async function handleMemory(args, ctx) {
2136
- const sub = args[0];
2137
- if (sub === "backup") {
2147
+ const intent = parseMemoryCommand(args);
2148
+ const configDir = ctx.config.getConfigDir();
2149
+ if (intent.kind === "usage") {
2150
+ ctx.send({ type: "error", message: intent.message });
2151
+ return;
2152
+ }
2153
+ if (intent.kind === "rebuild") {
2154
+ ctx.send({ type: "info", message: rebuildStartMessage(intent.full) });
2155
+ try {
2156
+ const { buildChatIndex } = await import("./chat-index-2D5GK2DB.js");
2157
+ const stats = await buildChatIndex({ full: intent.full });
2158
+ ctx.send({ type: "info", message: rebuildDoneMessage(stats) });
2159
+ } catch (err) {
2160
+ ctx.send({ type: "error", message: `Rebuild failed: ${err instanceof Error ? err.message : String(err)}` });
2161
+ }
2162
+ return;
2163
+ }
2164
+ if (intent.kind === "index-clear") {
2165
+ const { clearChatIndex } = await import("./chat-index-2D5GK2DB.js");
2166
+ clearChatIndex();
2167
+ ctx.send({ type: "info", message: "Chat memory index cleared (persistent memory untouched)." });
2168
+ return;
2169
+ }
2170
+ if (intent.kind === "status") {
2171
+ const { getChatIndexStatus } = await import("./chat-index-2D5GK2DB.js");
2172
+ const { listMemoryEntries: listMemoryEntries2, isMemoryExpired: isMemoryExpired2, formatMemoryForPrompt: formatMemoryForPrompt2 } = await import("./persistent-memory-3OYRXF2L.js");
2173
+ const memories = listMemoryEntries2(configDir, { includeExpired: true, includeRejected: true });
2174
+ const injected = formatMemoryForPrompt2(configDir, process.cwd(), ctx.config.get("memory")?.maxChars);
2175
+ const view = buildMemoryStatusView({
2176
+ active: memories.filter((m) => m.approved && !isMemoryExpired2(m)).length,
2177
+ pending: memories.filter((m) => !m.approved && !isMemoryExpired2(m)).length,
2178
+ injected: injected ? { entryCount: injected.entryCount, totalCount: injected.totalCount, chars: injected.content.length, truncated: injected.truncated } : null,
2179
+ storePath: memoryStorePath(configDir),
2180
+ chatIndex: getChatIndexStatus()
2181
+ });
2182
+ ctx.send({
2183
+ type: "info",
2184
+ message: [
2185
+ "\u{1F9E0} Governed Memory",
2186
+ ...view.governed.map((r) => ` ${r.label.padEnd(13)}: ${r.value}`),
2187
+ "",
2188
+ "\u{1F9E0} Chat Memory Index",
2189
+ ...view.chatIndexHint ? [` ${view.chatIndexHint}`] : view.chatIndex.map((r) => ` ${r.label.padEnd(13)}: ${r.value}`)
2190
+ ].join("\n")
2191
+ });
2192
+ return;
2193
+ }
2194
+ if (intent.kind === "recall") {
2195
+ const { searchPersistentMemories, touchMemoryReferences } = await import("./persistent-memory-3OYRXF2L.js");
2196
+ const { searchChatMemory } = await import("./chat-index-2D5GK2DB.js");
2197
+ const persistentHits = searchPersistentMemories(configDir, intent.query, process.cwd(), 3);
2198
+ if (persistentHits.length > 0) {
2199
+ touchMemoryReferences(configDir, persistentHits.map((h) => h.entry.id));
2200
+ }
2201
+ let chatHits = [];
2202
+ try {
2203
+ chatHits = await searchChatMemory(intent.query, { topK: 5, minScore: 0.2 });
2204
+ } catch (err) {
2205
+ ctx.send({ type: "error", message: `Recall failed: ${err instanceof Error ? err.message : String(err)}` });
2206
+ return;
2207
+ }
2208
+ const view = buildRecallView(
2209
+ intent.query,
2210
+ persistentHits.map((h) => ({ id: h.entry.id, scope: h.entry.scope, score: h.score, content: h.entry.content })),
2211
+ chatHits.map((h) => ({
2212
+ timestamp: h.chunk.timestamp,
2213
+ title: h.chunk.sessionTitle ?? h.chunk.sessionId.slice(0, 8),
2214
+ score: h.score,
2215
+ text: h.chunk.text
2216
+ }))
2217
+ );
2218
+ const lines = [];
2219
+ if (view.persistentHeading) {
2220
+ lines.push(view.persistentHeading, "");
2221
+ for (const hit of view.persistent) lines.push(` ${hit.label}`, ` ${hit.body}`, "");
2222
+ }
2223
+ if (view.chatHeading) {
2224
+ lines.push(view.chatHeading, "");
2225
+ for (const hit of view.chat) lines.push(` ${hit.label}`, ` ${hit.body}`, "");
2226
+ }
2227
+ if (view.note) lines.push(view.note);
2228
+ ctx.send({ type: "info", message: lines.join("\n") });
2229
+ return;
2230
+ }
2231
+ if (intent.kind === "backup") {
2138
2232
  try {
2139
2233
  const result = backupMemoryStore(ctx.config.getConfigDir(), parseOutFlag(args.slice(1)));
2140
2234
  ctx.send({ type: "info", message: `\u2713 Backed up ${result.count} entr${result.count === 1 ? "y" : "ies"} to ${result.backupPath}` });
@@ -2143,20 +2237,20 @@ async function handleMemory(args, ctx) {
2143
2237
  }
2144
2238
  return;
2145
2239
  }
2146
- if (sub === "restore") {
2147
- const configDir = ctx.config.getConfigDir();
2148
- const verdict = checkWebRestorePath(configDir, args[1]);
2240
+ if (intent.kind === "restore") {
2241
+ const configDir2 = ctx.config.getConfigDir();
2242
+ const verdict = checkWebRestorePath(configDir2, args[1]);
2149
2243
  if (!verdict.ok) {
2150
2244
  ctx.send({ type: "error", message: verdict.reason });
2151
2245
  return;
2152
2246
  }
2153
2247
  try {
2154
- const result = restoreMemoryEntries(configDir, verdict.resolved);
2248
+ const result = restoreMemoryEntries(configDir2, verdict.resolved);
2155
2249
  const lines = [
2156
2250
  `\u2713 Restored ${result.imported} entr${result.imported === 1 ? "y" : "ies"} (${result.skipped} duplicate${result.skipped === 1 ? "" : "s"} skipped)`
2157
2251
  ];
2158
2252
  if (result.backupPath) lines.push(`Pre-restore backup: ${result.backupPath}`);
2159
- const pending = countPendingMemories(configDir);
2253
+ const pending = countPendingMemories(configDir2);
2160
2254
  if (pending > 0) lines.push(`${pending} entr${pending === 1 ? "y" : "ies"} pending approval \u2014 /memory show --pending`);
2161
2255
  ctx.send({ type: "info", message: lines.join("\n") });
2162
2256
  ctx.sendMemoryEntries();
@@ -2165,7 +2259,7 @@ async function handleMemory(args, ctx) {
2165
2259
  }
2166
2260
  return;
2167
2261
  }
2168
- if (sub === "rebind") {
2262
+ if (intent.kind === "rebind") {
2169
2263
  const id = args[1];
2170
2264
  const newPath = args.slice(2).join(" ").trim();
2171
2265
  if (!id || !newPath) {
@@ -2181,11 +2275,11 @@ async function handleMemory(args, ctx) {
2181
2275
  }
2182
2276
  return;
2183
2277
  }
2184
- if (sub === "path") {
2278
+ if (intent.kind === "path") {
2185
2279
  ctx.send({ type: "info", message: memoryStorePath(ctx.config.getConfigDir()) });
2186
2280
  return;
2187
2281
  }
2188
- if (sub === "add" && args.length > 1) {
2282
+ if (intent.kind === "add") {
2189
2283
  const rest = args.slice(1);
2190
2284
  const opts = {};
2191
2285
  const text = [];
@@ -2203,7 +2297,7 @@ async function handleMemory(args, ctx) {
2203
2297
  return;
2204
2298
  }
2205
2299
  ctx.memoryAdd(text.join(" "), opts);
2206
- } else if (sub === "edit") {
2300
+ } else if (intent.kind === "edit") {
2207
2301
  const id = args[1];
2208
2302
  const text = args.slice(2).join(" ").trim();
2209
2303
  if (!id || !text) {
@@ -2211,15 +2305,15 @@ async function handleMemory(args, ctx) {
2211
2305
  return;
2212
2306
  }
2213
2307
  ctx.memoryEdit(id, text);
2214
- } else if (sub === "approve" || sub === "reject" || sub === "delete" || sub === "expire") {
2308
+ } else if (intent.kind === "manage") {
2215
2309
  if (!args[1]) {
2216
- ctx.send({ type: "info", message: `Usage: /memory ${sub} <id>` });
2310
+ ctx.send({ type: "info", message: `Usage: /memory ${intent.action} <id>` });
2217
2311
  return;
2218
2312
  }
2219
- ctx.handleMemoryManage(sub, args[1], sub === "expire" ? args[2] : void 0);
2220
- } else if (sub === "export") {
2313
+ ctx.handleMemoryManage(intent.action, args[1], intent.action === "expire" ? args[2] : void 0);
2314
+ } else if (intent.kind === "export") {
2221
2315
  if (args[1] === "md") {
2222
- const { exportMemoryEntries: exportMemoryEntries2 } = await import("./persistent-memory-7CKJLS25.js");
2316
+ const { exportMemoryEntries: exportMemoryEntries2 } = await import("./persistent-memory-3OYRXF2L.js");
2223
2317
  ctx.send({
2224
2318
  type: "export_data",
2225
2319
  format: "md",
@@ -2229,7 +2323,7 @@ async function handleMemory(args, ctx) {
2229
2323
  } else {
2230
2324
  ctx.handleMemoryManage("export");
2231
2325
  }
2232
- } else if (sub === "clear") {
2326
+ } else if (intent.kind === "clear") {
2233
2327
  if (args[1] === "confirm") {
2234
2328
  ctx.memoryClear();
2235
2329
  } else {
@@ -2239,8 +2333,7 @@ async function handleMemory(args, ctx) {
2239
2333
  });
2240
2334
  }
2241
2335
  } else {
2242
- const isShow = sub === "show" || sub === "view" || sub === "list";
2243
- ctx.memoryShow(isShow ? args.slice(1) : args);
2336
+ ctx.memoryShow(intent.rest);
2244
2337
  }
2245
2338
  }
2246
2339
  async function handleAddDir(args, ctx) {
@@ -2484,7 +2577,8 @@ async function handleHelp(_args, ctx) {
2484
2577
  " /tools \u2014 Show tools, MCP servers & skills",
2485
2578
  " /export [md|json] \u2014 Export conversation",
2486
2579
  " /skill [name|off|list|reload] \u2014 Manage agent skills",
2487
- " /memory [show|add|clear] \u2014 Persistent memory management",
2580
+ " /memory show|add|edit|approve|reject|delete|expire|rebind|clear|backup|restore|export|path \u2014 Governed memory",
2581
+ " /memory rebuild|refresh|status|recall <query>|index-clear \u2014 Chat memory index (cross-session recall)",
2488
2582
  " /agent list|switch|stop|summary \u2014 Manage named sub-agents",
2489
2583
  " /yolo [on|off] \u2014 Toggle auto-approve (skip confirmations)",
2490
2584
  " /search <keyword> \u2014 Search across all session histories",
@@ -1,9 +1,9 @@
1
1
  #!/usr/bin/env node
2
2
  import {
3
3
  ToolRegistry
4
- } from "./chunk-FHRIDE2T.js";
4
+ } from "./chunk-D7BIF6JO.js";
5
5
  import "./chunk-GHWZVPUV.js";
6
- import "./chunk-H2VE4TTN.js";
6
+ import "./chunk-M3UJ2JCW.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-L7C34TFI.js";
17
+ } from "./chunk-V4IY5CRJ.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-J3RWNQOF.js";
26
+ import "./chunk-4J7FIGQD.js";
27
27
  import {
28
28
  VERSION
29
- } from "./chunk-2FCKZ3OS.js";
29
+ } from "./chunk-JSQGDPDK.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-FHRIDE2T.js";
7
+ } from "./chunk-D7BIF6JO.js";
8
8
  import "./chunk-GHWZVPUV.js";
9
- import "./chunk-H2VE4TTN.js";
9
+ import "./chunk-M3UJ2JCW.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-L7C34TFI.js";
20
+ } from "./chunk-V4IY5CRJ.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-J3RWNQOF.js";
31
+ import "./chunk-4J7FIGQD.js";
32
32
  import {
33
33
  SUBAGENT_ALLOWED_TOOLS
34
- } from "./chunk-2FCKZ3OS.js";
34
+ } from "./chunk-JSQGDPDK.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-4XJVSMZ6.js";
11
+ } from "./chunk-QDOFRKY2.js";
12
12
  import "./chunk-TU3L3PW7.js";
13
13
  import "./chunk-IW3Q7AE5.js";
14
- import "./chunk-2FCKZ3OS.js";
14
+ import "./chunk-JSQGDPDK.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.281",
3
+ "version": "0.4.283",
4
4
  "description": "Cross-platform REPL-style AI CLI with multi-provider support",
5
5
  "type": "module",
6
6
  "main": "./dist/index.js",