jinzd-ai-cli 0.4.115 → 0.4.117

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.
@@ -1,9 +1,9 @@
1
1
  #!/usr/bin/env node
2
2
  import {
3
3
  ConfigManager
4
- } from "./chunk-UZLNS3QG.js";
4
+ } from "./chunk-267DHNV2.js";
5
5
  import "./chunk-2ZD3YTVM.js";
6
- import "./chunk-OHUHYWBR.js";
6
+ import "./chunk-LO4MSGGO.js";
7
7
  import "./chunk-PDX44BCA.js";
8
8
 
9
9
  // src/cli/batch.ts
@@ -8,7 +8,7 @@ import {
8
8
  CONFIG_FILE_NAME,
9
9
  HISTORY_DIR_NAME,
10
10
  PLUGINS_DIR_NAME
11
- } from "./chunk-OHUHYWBR.js";
11
+ } from "./chunk-LO4MSGGO.js";
12
12
 
13
13
  // src/config/config-manager.ts
14
14
  import { readFileSync, writeFileSync, existsSync, mkdirSync } from "fs";
@@ -6,7 +6,7 @@ import { platform } from "os";
6
6
  import chalk from "chalk";
7
7
 
8
8
  // src/core/constants.ts
9
- var VERSION = "0.4.115";
9
+ var VERSION = "0.4.117";
10
10
  var APP_NAME = "ai-cli";
11
11
  var CONFIG_DIR_NAME = ".aicli";
12
12
  var CONFIG_FILE_NAME = "config.json";
@@ -2,7 +2,7 @@
2
2
  import {
3
3
  schemaToJsonSchema,
4
4
  truncateForPersist
5
- } from "./chunk-TJGRPTJS.js";
5
+ } from "./chunk-AACUEN4B.js";
6
6
  import {
7
7
  AuthError,
8
8
  ProviderError,
@@ -18,7 +18,7 @@ import {
18
18
  MCP_PROTOCOL_VERSION,
19
19
  MCP_TOOL_PREFIX,
20
20
  VERSION
21
- } from "./chunk-OHUHYWBR.js";
21
+ } from "./chunk-LO4MSGGO.js";
22
22
  import {
23
23
  redactJson
24
24
  } from "./chunk-7ZJN4KLV.js";
@@ -5,7 +5,7 @@ import {
5
5
  } from "./chunk-3BICTI5M.js";
6
6
  import {
7
7
  runTestsTool
8
- } from "./chunk-PEMNYHIS.js";
8
+ } from "./chunk-W622HYR2.js";
9
9
  import {
10
10
  EnvLoader,
11
11
  NetworkError,
@@ -18,7 +18,7 @@ import {
18
18
  SUBAGENT_ALLOWED_TOOLS,
19
19
  SUBAGENT_DEFAULT_MAX_ROUNDS,
20
20
  SUBAGENT_MAX_ROUNDS_LIMIT
21
- } from "./chunk-OHUHYWBR.js";
21
+ } from "./chunk-LO4MSGGO.js";
22
22
  import {
23
23
  fileCheckpoints
24
24
  } from "./chunk-4BKXL7SM.js";
@@ -400,12 +400,15 @@ How to recover (pick ONE \u2014 do NOT retry the same command):
400
400
  const stderr = IS_WINDOWS && Buffer.isBuffer(execErr.stderr) ? execErr.stderr.toString("utf-8").trim() : execErr.stderr?.toString().trim() ?? "";
401
401
  const stdout = IS_WINDOWS && Buffer.isBuffer(execErr.stdout) ? execErr.stdout.toString("utf-8").trim() : execErr.stdout?.toString().trim() ?? "";
402
402
  const combined = [stdout, stderr].filter(Boolean).join("\n");
403
+ const hint = buildErrorHint(command, combined);
403
404
  throw new ToolError(
404
405
  "bash",
405
406
  `Exit code ${execErr.status}:
406
407
  ${combined || (execErr.message ?? "Unknown error")}
407
408
 
408
- [Command failed. Report this error to the user. Do not retry with variant commands.]`
409
+ ` + (hint ? `${hint}
410
+
411
+ ` : "") + `[Command failed. Report this error to the user. Do not retry with variant commands.]`
409
412
  );
410
413
  }
411
414
  }
@@ -429,6 +432,36 @@ function fixWindowsDeleteCommand(command) {
429
432
  }
430
433
  );
431
434
  }
435
+ function buildErrorHint(command, stderr) {
436
+ const hints = [];
437
+ if (IS_WINDOWS && /\|\|/.test(command) && /(\|\||is not a valid argument|不是此版本中的有效|ParserError|Unexpected token)/i.test(stderr)) {
438
+ hints.push(
439
+ `Hint: PowerShell parses '||' as a pipeline operator (PS 5.x) or logical-or (PS 7+), it CANNOT be passed inline as SQL string concatenation. Workaround: write the SQL to a local .sql file with write_file, then 'scp' it to the remote host and run 'psql -f /tmp/x.sql'. Do NOT try to escape || or wrap the command differently \u2014 it will not work.`
440
+ );
441
+ }
442
+ if (IS_WINDOWS && /\bpython3\b/.test(command) && /(not recognized|is not recognized|无法将.*识别)/i.test(stderr)) {
443
+ hints.push(
444
+ `Hint: On Windows the launcher is 'python' (or 'py'), not 'python3'. Replace 'python3' with 'python' and retry.`
445
+ );
446
+ }
447
+ if (IS_WINDOWS && /^\s*ssh\b/.test(command) && /\\"/.test(command) && /(syntax error|ERROR:|ParserError|unexpected|parser|意外的|语法|不是此版本)/i.test(stderr)) {
448
+ hints.push(
449
+ `Hint: SSH + nested quotes ("...\\"...\\"") is fragile across PS \u2192 ssh \u2192 remote-shell \u2192 psql layers. Use the file-based flow: (1) write_file locally to a .sql file, (2) 'scp x.sql root@host:/tmp/', (3) 'ssh root@host "sudo -u postgres psql -d <db> -f /tmp/x.sql"'. Or for remote-only SQL: 'ssh host "cat > /tmp/x.sql << \\'SQLEOF\\'\\n...\\nSQLEOF"' then run psql -f. Avoid inline psql -c with embedded quotes.`
450
+ );
451
+ }
452
+ if (IS_WINDOWS && /Remove-Item/i.test(command) && /cannot find path|no such file|exit 1/i.test(stderr || command)) {
453
+ hints.push(
454
+ `Hint: Add -ErrorAction SilentlyContinue to Remove-Item so missing files don't fail the cleanup step. Example: Remove-Item tmp_*.sql,tmp_*.csv -ErrorAction SilentlyContinue`
455
+ );
456
+ }
457
+ const colMissing = stderr.match(/column "([^"]+)" does not exist/i);
458
+ if (colMissing) {
459
+ hints.push(
460
+ `Hint: PostgreSQL says column "${colMissing[1]}" does not exist. Do NOT retry with a guess \u2014 query the actual schema first: \`psql -c "\\d <table>"\` or \`SELECT column_name FROM information_schema.columns WHERE table_name='<table>';\`. Common pitfall: not every table has a 'deleted' soft-delete column.`
461
+ );
462
+ }
463
+ return hints.length > 0 ? hints.map((h) => `\u{1F4A1} ${h}`).join("\n\n") : null;
464
+ }
432
465
  function snapshotDir(dir) {
433
466
  try {
434
467
  return new Set(readdirSync(dir).map((name) => resolve(dir, name)));
@@ -1827,7 +1860,15 @@ var ToolExecutor = class {
1827
1860
  }
1828
1861
  printToolResult(name, content, isError, wasTruncated) {
1829
1862
  if (isError) {
1830
- console.log(theme.error(`\u26A0 ${name} error: `) + theme.dim(content.slice(0, 300)));
1863
+ const lines = content.split("\n");
1864
+ const meaningful = lines.filter(
1865
+ (l) => !/^Exit code \d+:$/.test(l.trim()) && !l.startsWith("[Command failed") && !l.startsWith("\u{1F4A1} ") && l.trim() !== ""
1866
+ );
1867
+ const preview = meaningful.slice(0, 2).join(" \xB7 ") || content.slice(0, 120);
1868
+ const isSoft = /no such file or directory|not found|no matches|exit 1\s*$|cannot find path/i.test(content);
1869
+ const renderFn = isSoft ? theme.warning : theme.error;
1870
+ const icon = isSoft ? "\u2139" : "\u26A0";
1871
+ console.log(renderFn(`${icon} ${name} error: `) + theme.dim(preview.slice(0, 200)));
1831
1872
  } else {
1832
1873
  const lines = content.split("\n");
1833
1874
  const maxLines = name === "run_interactive" ? 40 : 8;
@@ -1,7 +1,7 @@
1
1
  #!/usr/bin/env node
2
2
 
3
3
  // src/core/constants.ts
4
- var VERSION = "0.4.115";
4
+ var VERSION = "0.4.117";
5
5
  var APP_NAME = "ai-cli";
6
6
  var CONFIG_DIR_NAME = ".aicli";
7
7
  var CONFIG_FILE_NAME = "config.json";
@@ -1,7 +1,7 @@
1
1
  #!/usr/bin/env node
2
2
  import {
3
3
  TEST_TIMEOUT
4
- } from "./chunk-OHUHYWBR.js";
4
+ } from "./chunk-LO4MSGGO.js";
5
5
 
6
6
  // src/tools/builtin/run-tests.ts
7
7
  import { execSync, spawnSync } from "child_process";
@@ -36,7 +36,7 @@ import {
36
36
  TEST_TIMEOUT,
37
37
  VERSION,
38
38
  buildUserIdentityPrompt
39
- } from "./chunk-OHUHYWBR.js";
39
+ } from "./chunk-LO4MSGGO.js";
40
40
  import "./chunk-PDX44BCA.js";
41
41
  export {
42
42
  AGENTIC_BEHAVIOR_GUIDELINE,
@@ -36,7 +36,7 @@ import {
36
36
  VERSION,
37
37
  buildUserIdentityPrompt,
38
38
  runTestsTool
39
- } from "./chunk-KQZU2VS5.js";
39
+ } from "./chunk-3YUH5CCS.js";
40
40
  import {
41
41
  hasSemanticIndex,
42
42
  semanticSearch
@@ -3964,12 +3964,15 @@ How to recover (pick ONE \u2014 do NOT retry the same command):
3964
3964
  const stderr = IS_WINDOWS && Buffer.isBuffer(execErr.stderr) ? execErr.stderr.toString("utf-8").trim() : execErr.stderr?.toString().trim() ?? "";
3965
3965
  const stdout = IS_WINDOWS && Buffer.isBuffer(execErr.stdout) ? execErr.stdout.toString("utf-8").trim() : execErr.stdout?.toString().trim() ?? "";
3966
3966
  const combined = [stdout, stderr].filter(Boolean).join("\n");
3967
+ const hint = buildErrorHint(command, combined);
3967
3968
  throw new ToolError(
3968
3969
  "bash",
3969
3970
  `Exit code ${execErr.status}:
3970
3971
  ${combined || (execErr.message ?? "Unknown error")}
3971
3972
 
3972
- [Command failed. Report this error to the user. Do not retry with variant commands.]`
3973
+ ` + (hint ? `${hint}
3974
+
3975
+ ` : "") + `[Command failed. Report this error to the user. Do not retry with variant commands.]`
3973
3976
  );
3974
3977
  }
3975
3978
  }
@@ -3993,6 +3996,36 @@ function fixWindowsDeleteCommand(command) {
3993
3996
  }
3994
3997
  );
3995
3998
  }
3999
+ function buildErrorHint(command, stderr) {
4000
+ const hints = [];
4001
+ if (IS_WINDOWS && /\|\|/.test(command) && /(\|\||is not a valid argument|不是此版本中的有效|ParserError|Unexpected token)/i.test(stderr)) {
4002
+ hints.push(
4003
+ `Hint: PowerShell parses '||' as a pipeline operator (PS 5.x) or logical-or (PS 7+), it CANNOT be passed inline as SQL string concatenation. Workaround: write the SQL to a local .sql file with write_file, then 'scp' it to the remote host and run 'psql -f /tmp/x.sql'. Do NOT try to escape || or wrap the command differently \u2014 it will not work.`
4004
+ );
4005
+ }
4006
+ if (IS_WINDOWS && /\bpython3\b/.test(command) && /(not recognized|is not recognized|无法将.*识别)/i.test(stderr)) {
4007
+ hints.push(
4008
+ `Hint: On Windows the launcher is 'python' (or 'py'), not 'python3'. Replace 'python3' with 'python' and retry.`
4009
+ );
4010
+ }
4011
+ if (IS_WINDOWS && /^\s*ssh\b/.test(command) && /\\"/.test(command) && /(syntax error|ERROR:|ParserError|unexpected|parser|意外的|语法|不是此版本)/i.test(stderr)) {
4012
+ hints.push(
4013
+ `Hint: SSH + nested quotes ("...\\"...\\"") is fragile across PS \u2192 ssh \u2192 remote-shell \u2192 psql layers. Use the file-based flow: (1) write_file locally to a .sql file, (2) 'scp x.sql root@host:/tmp/', (3) 'ssh root@host "sudo -u postgres psql -d <db> -f /tmp/x.sql"'. Or for remote-only SQL: 'ssh host "cat > /tmp/x.sql << \\'SQLEOF\\'\\n...\\nSQLEOF"' then run psql -f. Avoid inline psql -c with embedded quotes.`
4014
+ );
4015
+ }
4016
+ if (IS_WINDOWS && /Remove-Item/i.test(command) && /cannot find path|no such file|exit 1/i.test(stderr || command)) {
4017
+ hints.push(
4018
+ `Hint: Add -ErrorAction SilentlyContinue to Remove-Item so missing files don't fail the cleanup step. Example: Remove-Item tmp_*.sql,tmp_*.csv -ErrorAction SilentlyContinue`
4019
+ );
4020
+ }
4021
+ const colMissing = stderr.match(/column "([^"]+)" does not exist/i);
4022
+ if (colMissing) {
4023
+ hints.push(
4024
+ `Hint: PostgreSQL says column "${colMissing[1]}" does not exist. Do NOT retry with a guess \u2014 query the actual schema first: \`psql -c "\\d <table>"\` or \`SELECT column_name FROM information_schema.columns WHERE table_name='<table>';\`. Common pitfall: not every table has a 'deleted' soft-delete column.`
4025
+ );
4026
+ }
4027
+ return hints.length > 0 ? hints.map((h) => `\u{1F4A1} ${h}`).join("\n\n") : null;
4028
+ }
3996
4029
  function snapshotDir(dir) {
3997
4030
  try {
3998
4031
  return new Set(readdirSync2(dir).map((name) => resolve(dir, name)));
@@ -5352,7 +5385,15 @@ var ToolExecutor = class {
5352
5385
  }
5353
5386
  printToolResult(name, content, isError, wasTruncated) {
5354
5387
  if (isError) {
5355
- console.log(theme.error(`\u26A0 ${name} error: `) + theme.dim(content.slice(0, 300)));
5388
+ const lines = content.split("\n");
5389
+ const meaningful = lines.filter(
5390
+ (l) => !/^Exit code \d+:$/.test(l.trim()) && !l.startsWith("[Command failed") && !l.startsWith("\u{1F4A1} ") && l.trim() !== ""
5391
+ );
5392
+ const preview = meaningful.slice(0, 2).join(" \xB7 ") || content.slice(0, 120);
5393
+ const isSoft = /no such file or directory|not found|no matches|exit 1\s*$|cannot find path/i.test(content);
5394
+ const renderFn = isSoft ? theme.warning : theme.error;
5395
+ const icon = isSoft ? "\u2139" : "\u26A0";
5396
+ console.log(renderFn(`${icon} ${name} error: `) + theme.dim(preview.slice(0, 200)));
5356
5397
  } else {
5357
5398
  const lines = content.split("\n");
5358
5399
  const maxLines = name === "run_interactive" ? 40 : 8;
@@ -12040,7 +12081,7 @@ ${undoResults.map((r) => ` \u2022 ${r}`).join("\n")}` });
12040
12081
  case "test": {
12041
12082
  this.send({ type: "info", message: "\u{1F9EA} Running tests..." });
12042
12083
  try {
12043
- const { executeTests } = await import("./run-tests-7VYL7OVA.js");
12084
+ const { executeTests } = await import("./run-tests-CQME3NR3.js");
12044
12085
  const argStr = args.join(" ").trim();
12045
12086
  let testArgs = {};
12046
12087
  if (argStr) {
@@ -386,7 +386,7 @@ ${content}`);
386
386
  }
387
387
  }
388
388
  async function runTaskMode(config, providers, configManager, topic) {
389
- const { TaskOrchestrator } = await import("./task-orchestrator-24IGVXYP.js");
389
+ const { TaskOrchestrator } = await import("./task-orchestrator-WH2J6Z56.js");
390
390
  const orchestrator = new TaskOrchestrator(config, providers, configManager);
391
391
  let interrupted = false;
392
392
  const onSigint = () => {
package/dist/index.js CHANGED
@@ -32,10 +32,10 @@ import {
32
32
  setupProxy,
33
33
  stripPseudoToolCalls,
34
34
  stripToolCallReminder
35
- } from "./chunk-FMPWML3F.js";
35
+ } from "./chunk-5D4ZMOGZ.js";
36
36
  import {
37
37
  ConfigManager
38
- } from "./chunk-UZLNS3QG.js";
38
+ } from "./chunk-267DHNV2.js";
39
39
  import {
40
40
  ToolExecutor,
41
41
  ToolRegistry,
@@ -54,10 +54,10 @@ import {
54
54
  spawnAgentContext,
55
55
  theme,
56
56
  undoStack
57
- } from "./chunk-TJGRPTJS.js";
57
+ } from "./chunk-AACUEN4B.js";
58
58
  import "./chunk-3BICTI5M.js";
59
59
  import "./chunk-2DXY7UGF.js";
60
- import "./chunk-PEMNYHIS.js";
60
+ import "./chunk-W622HYR2.js";
61
61
  import "./chunk-2ZD3YTVM.js";
62
62
  import {
63
63
  AGENTIC_BEHAVIOR_GUIDELINE,
@@ -80,7 +80,7 @@ import {
80
80
  SKILLS_DIR_NAME,
81
81
  VERSION,
82
82
  buildUserIdentityPrompt
83
- } from "./chunk-OHUHYWBR.js";
83
+ } from "./chunk-LO4MSGGO.js";
84
84
  import {
85
85
  formatGitContextForPrompt,
86
86
  getGitContext,
@@ -976,6 +976,42 @@ var CommandRegistry = class {
976
976
  return [...this.commands.values()];
977
977
  }
978
978
  };
979
+ async function promptSkillHistoryAction(ctx, fromLabel, toLabel) {
980
+ const session = ctx.sessions.current;
981
+ const msgCount = session?.messages.length ?? 0;
982
+ if (msgCount === 0 || !session) return true;
983
+ const choice = await ctx.select(
984
+ `Switching skill: ${fromLabel} \u2192 ${toLabel} (${msgCount} message(s) in context)`,
985
+ [
986
+ { value: "clear", label: "Clear history", hint: "recommended \u2014 fresh start under new skill" },
987
+ { value: "fork", label: "Fork to new branch", hint: "preserve old branch, start fresh on new one" },
988
+ { value: "keep", label: "Keep history", hint: "old skill actions may bias new skill" },
989
+ { value: "cancel", label: "Cancel", hint: "do not switch skill" }
990
+ ],
991
+ 0
992
+ );
993
+ if (!choice || choice === "cancel") return false;
994
+ if (choice === "clear") {
995
+ session.clear();
996
+ ctx.resetSessionTokenUsage();
997
+ ctx.clearDevState();
998
+ ctx.renderer.printInfo(` History cleared (${msgCount} message(s) removed).`);
999
+ } else if (choice === "fork") {
1000
+ try {
1001
+ const branchTitle = toLabel === "(none)" ? `pre-deactivate-${fromLabel}` : `skill-${toLabel}`;
1002
+ const newId = session.createBranch(0, branchTitle);
1003
+ await ctx.sessions.save();
1004
+ ctx.renderer.printInfo(` Forked to fresh branch "${newId}" (old branch preserved).`);
1005
+ } catch (err) {
1006
+ ctx.renderer.renderError(`Fork failed: ${err.message}`);
1007
+ return false;
1008
+ }
1009
+ }
1010
+ if (choice === "keep") {
1011
+ ctx.renderer.printInfo(" Keeping history. Use /clear later if the new skill misbehaves.");
1012
+ }
1013
+ return true;
1014
+ }
979
1015
  function createDefaultCommands() {
980
1016
  return [
981
1017
  {
@@ -1612,7 +1648,7 @@ ${text}
1612
1648
  const { join: join6 } = await import("path");
1613
1649
  const { existsSync: existsSync6 } = await import("fs");
1614
1650
  const { getGitRoot: getGitRoot2 } = await import("./git-context-7KIP4X2V.js");
1615
- const { MCP_PROJECT_CONFIG_NAME: MCP_PROJECT_CONFIG_NAME2 } = await import("./constants-Y6LRE5TI.js");
1651
+ const { MCP_PROJECT_CONFIG_NAME: MCP_PROJECT_CONFIG_NAME2 } = await import("./constants-H7Q7BTHA.js");
1616
1652
  const { approveProject, hashMcpFile } = await import("./project-trust-IFM7FXEV.js");
1617
1653
  const cwd = process.cwd();
1618
1654
  const projectRoot = getGitRoot2(cwd) ?? cwd;
@@ -1875,7 +1911,7 @@ ${text}
1875
1911
  name: "skill",
1876
1912
  description: "Manage agent skills (reusable prompt packs)",
1877
1913
  usage: "/skill [name|off|list|reload]",
1878
- execute(args, ctx) {
1914
+ async execute(args, ctx) {
1879
1915
  const sub = args[0]?.toLowerCase();
1880
1916
  const manager = ctx.getSkillManager();
1881
1917
  if (!manager) {
@@ -1908,10 +1944,13 @@ ${text}
1908
1944
  return;
1909
1945
  }
1910
1946
  if (sub === "off" || sub === "none" || sub === "deactivate") {
1911
- if (!manager.getActive()) {
1947
+ const prev2 = manager.getActive();
1948
+ if (!prev2) {
1912
1949
  ctx.renderer.printInfo("No skill is currently active.");
1913
1950
  return;
1914
1951
  }
1952
+ const proceed2 = await promptSkillHistoryAction(ctx, prev2.meta.name, "(none)");
1953
+ if (!proceed2) return;
1915
1954
  manager.deactivate();
1916
1955
  ctx.refreshPrompt();
1917
1956
  ctx.renderer.printSuccess("Skill deactivated.");
@@ -1922,11 +1961,19 @@ ${text}
1922
1961
  ctx.renderer.printSuccess(`Reloaded: ${count} skill(s) found.`);
1923
1962
  return;
1924
1963
  }
1925
- const skill = manager.activate(sub);
1926
- if (!skill) {
1964
+ const target = manager.listSkills().find((s) => s.meta.name === sub);
1965
+ if (!target) {
1927
1966
  ctx.renderer.renderError(`Skill '${sub}' not found. Use /skill list to see available skills.`);
1928
1967
  return;
1929
1968
  }
1969
+ const prev = manager.getActive();
1970
+ if (prev?.meta.name === sub) {
1971
+ ctx.renderer.printInfo(`Skill '${sub}' is already active.`);
1972
+ return;
1973
+ }
1974
+ const proceed = await promptSkillHistoryAction(ctx, prev?.meta.name ?? "(none)", sub);
1975
+ if (!proceed) return;
1976
+ const skill = manager.activate(sub);
1930
1977
  ctx.refreshPrompt();
1931
1978
  ctx.renderer.printSuccess(`Skill activated: ${skill.meta.name} \u2014 ${skill.meta.description}`);
1932
1979
  if (skill.meta.tools) {
@@ -2662,7 +2709,7 @@ ${hint}` : "")
2662
2709
  usage: "/test [command|filter]",
2663
2710
  async execute(args, ctx) {
2664
2711
  try {
2665
- const { executeTests } = await import("./run-tests-TWE7TJ4T.js");
2712
+ const { executeTests } = await import("./run-tests-G22G7UMT.js");
2666
2713
  const argStr = args.join(" ").trim();
2667
2714
  let testArgs = {};
2668
2715
  if (argStr) {
@@ -6955,7 +7002,7 @@ program.command("web").description("Start Web UI server with browser-based chat
6955
7002
  console.error("Error: Invalid port number. Must be between 1 and 65535.");
6956
7003
  process.exit(1);
6957
7004
  }
6958
- const { startWebServer } = await import("./server-RODHACCH.js");
7005
+ const { startWebServer } = await import("./server-LK4KEPL3.js");
6959
7006
  await startWebServer({ port, host: options.host });
6960
7007
  });
6961
7008
  program.command("user [action] [username]").description("Manage Web UI users (list | create <name> | delete <name> | reset-password <name> | logout-all <name> | migrate <name>)").action(async (action, username) => {
@@ -7091,7 +7138,7 @@ program.command("sessions").description("List recent conversation sessions").act
7091
7138
  });
7092
7139
  program.command("batch <action> [arg] [arg2]").description("Anthropic Message Batches: submit | list | status <id> | results <id> [out] | cancel <id>").option("--dry-run", "Parse and validate input without submitting (submit only)").action(async (action, arg, arg2, options) => {
7093
7140
  try {
7094
- const batch = await import("./batch-SHNIUSW2.js");
7141
+ const batch = await import("./batch-AZ55FS2U.js");
7095
7142
  switch (action) {
7096
7143
  case "submit":
7097
7144
  if (!arg) {
@@ -7134,7 +7181,7 @@ program.command("batch <action> [arg] [arg2]").description("Anthropic Message Ba
7134
7181
  }
7135
7182
  });
7136
7183
  program.command("mcp-serve").description("Start an MCP server over STDIO, exposing aicli's built-in tools to Claude Desktop / Cursor / other MCP clients").option("--allow-destructive", "Allow bash / run_interactive / task_create (always destructive in MCP mode)").option("--allow-outside-cwd", "Allow tool path arguments to escape the sandbox root \u2014 disabled by default").option("--tools <list>", "Comma-separated whitelist of tools to expose (default: all eligible tools)").option("--cwd <path>", "Working directory AND sandbox root (default: current directory)").action(async (options) => {
7137
- const { startMcpServer } = await import("./server-3P5BYK74.js");
7184
+ const { startMcpServer } = await import("./server-QTBPRYAS.js");
7138
7185
  await startMcpServer({
7139
7186
  allowDestructive: !!options.allowDestructive,
7140
7187
  allowOutsideCwd: !!options.allowOutsideCwd,
@@ -7261,7 +7308,7 @@ program.command("hub [topic]").description("Start multi-agent hub (discuss / bra
7261
7308
  }),
7262
7309
  config.get("customProviders")
7263
7310
  );
7264
- const { startHub } = await import("./hub-E3WMJGYK.js");
7311
+ const { startHub } = await import("./hub-LABTSDKX.js");
7265
7312
  await startHub(
7266
7313
  {
7267
7314
  topic: topic ?? "",
@@ -1,7 +1,7 @@
1
1
  import {
2
2
  executeTests,
3
3
  runTestsTool
4
- } from "./chunk-KQZU2VS5.js";
4
+ } from "./chunk-3YUH5CCS.js";
5
5
  import "./chunk-3RG5ZIWI.js";
6
6
  export {
7
7
  executeTests,
@@ -2,8 +2,8 @@
2
2
  import {
3
3
  executeTests,
4
4
  runTestsTool
5
- } from "./chunk-PEMNYHIS.js";
6
- import "./chunk-OHUHYWBR.js";
5
+ } from "./chunk-W622HYR2.js";
6
+ import "./chunk-LO4MSGGO.js";
7
7
  import "./chunk-PDX44BCA.js";
8
8
  export {
9
9
  executeTests,
@@ -26,10 +26,10 @@ import {
26
26
  setupProxy,
27
27
  stripPseudoToolCalls,
28
28
  stripToolCallReminder
29
- } from "./chunk-FMPWML3F.js";
29
+ } from "./chunk-5D4ZMOGZ.js";
30
30
  import {
31
31
  ConfigManager
32
- } from "./chunk-UZLNS3QG.js";
32
+ } from "./chunk-267DHNV2.js";
33
33
  import {
34
34
  ToolExecutor,
35
35
  ToolRegistry,
@@ -47,10 +47,10 @@ import {
47
47
  spawnAgentContext,
48
48
  truncateOutput,
49
49
  undoStack
50
- } from "./chunk-TJGRPTJS.js";
50
+ } from "./chunk-AACUEN4B.js";
51
51
  import "./chunk-3BICTI5M.js";
52
52
  import "./chunk-2DXY7UGF.js";
53
- import "./chunk-PEMNYHIS.js";
53
+ import "./chunk-W622HYR2.js";
54
54
  import "./chunk-2ZD3YTVM.js";
55
55
  import {
56
56
  AGENTIC_BEHAVIOR_GUIDELINE,
@@ -70,7 +70,7 @@ import {
70
70
  SKILLS_DIR_NAME,
71
71
  VERSION,
72
72
  buildUserIdentityPrompt
73
- } from "./chunk-OHUHYWBR.js";
73
+ } from "./chunk-LO4MSGGO.js";
74
74
  import {
75
75
  formatGitContextForPrompt,
76
76
  getGitContext,
@@ -2443,7 +2443,7 @@ ${undoResults.map((r) => ` \u2022 ${r}`).join("\n")}` });
2443
2443
  case "test": {
2444
2444
  this.send({ type: "info", message: "\u{1F9EA} Running tests..." });
2445
2445
  try {
2446
- const { executeTests } = await import("./run-tests-TWE7TJ4T.js");
2446
+ const { executeTests } = await import("./run-tests-G22G7UMT.js");
2447
2447
  const argStr = args.join(" ").trim();
2448
2448
  let testArgs = {};
2449
2449
  if (argStr) {
@@ -3,14 +3,14 @@ import {
3
3
  ToolRegistry,
4
4
  getDangerLevel,
5
5
  schemaToJsonSchema
6
- } from "./chunk-TJGRPTJS.js";
6
+ } from "./chunk-AACUEN4B.js";
7
7
  import "./chunk-3BICTI5M.js";
8
8
  import "./chunk-2DXY7UGF.js";
9
- import "./chunk-PEMNYHIS.js";
9
+ import "./chunk-W622HYR2.js";
10
10
  import "./chunk-2ZD3YTVM.js";
11
11
  import {
12
12
  VERSION
13
- } from "./chunk-OHUHYWBR.js";
13
+ } from "./chunk-LO4MSGGO.js";
14
14
  import "./chunk-4BKXL7SM.js";
15
15
  import "./chunk-7ZJN4KLV.js";
16
16
  import "./chunk-KHYD3WXE.js";
@@ -4,14 +4,14 @@ import {
4
4
  getDangerLevel,
5
5
  googleSearchContext,
6
6
  truncateOutput
7
- } from "./chunk-TJGRPTJS.js";
7
+ } from "./chunk-AACUEN4B.js";
8
8
  import "./chunk-3BICTI5M.js";
9
9
  import "./chunk-2DXY7UGF.js";
10
- import "./chunk-PEMNYHIS.js";
10
+ import "./chunk-W622HYR2.js";
11
11
  import "./chunk-2ZD3YTVM.js";
12
12
  import {
13
13
  SUBAGENT_ALLOWED_TOOLS
14
- } from "./chunk-OHUHYWBR.js";
14
+ } from "./chunk-LO4MSGGO.js";
15
15
  import "./chunk-4BKXL7SM.js";
16
16
  import "./chunk-7ZJN4KLV.js";
17
17
  import "./chunk-KHYD3WXE.js";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "jinzd-ai-cli",
3
- "version": "0.4.115",
3
+ "version": "0.4.117",
4
4
  "description": "Cross-platform REPL-style AI CLI with multi-provider support",
5
5
  "type": "module",
6
6
  "main": "./dist/index.js",