jinzd-ai-cli 0.4.200 → 0.4.201

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-NULOZSFA.js";
4
+ } from "./chunk-QT5SGLTM.js";
5
5
  import "./chunk-TZQHYZKT.js";
6
- import "./chunk-IDMCBIYZ.js";
6
+ import "./chunk-SDT4DCNX.js";
7
7
  import {
8
8
  atomicWriteFileSync
9
9
  } from "./chunk-IW3Q7AE5.js";
@@ -1,7 +1,7 @@
1
1
  #!/usr/bin/env node
2
2
  import {
3
3
  truncateForPersist
4
- } from "./chunk-FQF6YJ6F.js";
4
+ } from "./chunk-HLOHSMTT.js";
5
5
  import {
6
6
  APP_NAME,
7
7
  CONFIG_DIR_NAME,
@@ -11,7 +11,7 @@ import {
11
11
  MCP_PROTOCOL_VERSION,
12
12
  MCP_TOOL_PREFIX,
13
13
  VERSION
14
- } from "./chunk-IDMCBIYZ.js";
14
+ } from "./chunk-SDT4DCNX.js";
15
15
 
16
16
  // src/mcp/client.ts
17
17
  import { spawn } from "child_process";
@@ -1,7 +1,7 @@
1
1
  #!/usr/bin/env node
2
2
  import {
3
3
  TEST_TIMEOUT
4
- } from "./chunk-IDMCBIYZ.js";
4
+ } from "./chunk-SDT4DCNX.js";
5
5
 
6
6
  // src/tools/builtin/run-tests.ts
7
7
  import { execSync, spawnSync } from "child_process";
@@ -5,10 +5,10 @@ import {
5
5
  } from "./chunk-T2NL5ZIA.js";
6
6
  import {
7
7
  runTestsTool
8
- } from "./chunk-HUTS2F6Y.js";
8
+ } from "./chunk-C46JMUDC.js";
9
9
  import {
10
10
  runTool
11
- } from "./chunk-JZCXULOJ.js";
11
+ } from "./chunk-YUA2KL7W.js";
12
12
  import {
13
13
  getDangerLevel,
14
14
  isFileWriteTool,
@@ -26,7 +26,7 @@ import {
26
26
  SUBAGENT_ALLOWED_TOOLS,
27
27
  SUBAGENT_DEFAULT_MAX_ROUNDS,
28
28
  SUBAGENT_MAX_ROUNDS_LIMIT
29
- } from "./chunk-IDMCBIYZ.js";
29
+ } from "./chunk-SDT4DCNX.js";
30
30
  import {
31
31
  fileCheckpoints
32
32
  } from "./chunk-4BKXL7SM.js";
@@ -222,12 +222,12 @@ Important rules:
222
222
  3. Multiple commands can be combined with semicolons in a single call to reduce rounds.
223
223
  4. To delete directories, use Remove-Item -Recurse (the system will automatically optimize to a more reliable method).
224
224
  5. IMPORTANT: On Windows, "curl" is an alias for Invoke-WebRequest and does NOT support curl flags like -s, -X, -H. Use Invoke-RestMethod instead for HTTP requests. Example: Invoke-RestMethod -Uri "http://localhost:3000/api/health" -Method Get
225
- 6. For long-running server commands (node server.js, npm run dev, etc.), use Start-Process -NoNewWindow to run in background, otherwise the tool will block until timeout.` : `Execute commands in ${SHELL}.
225
+ 6. NEVER run long-running / never-exiting commands through bash \u2014 they block until timeout. This includes starting an Android emulator (emulator -avd X), streaming logs (adb logcat), and dev servers (node server.js, npm run dev, metro / react-native start). Use the 'task_create' tool to run these in the background, then poll status with short bash calls (e.g. adb shell getprop sys.boot_completed).` : `Execute commands in ${SHELL}.
226
226
  Important rules:
227
227
  1. Each bash call runs in an independent subprocess; cd commands do not persist. To run in a specific directory, use the cwd parameter, or combine commands: e.g. "cd mydir && ls" or "mkdir -p mydir && touch mydir/file.txt".
228
228
  2. If a command fails (returns an error or non-zero exit code), stop immediately, report the error to the user, and do not retry the same or similar commands.
229
229
  3. Multiple commands can be combined with && in a single call to reduce rounds.
230
- 4. For long-running server commands (node server.js, npm start, npm run dev, etc.), run in background with & or nohup, otherwise the tool will block until timeout.`,
230
+ 4. NEVER run long-running / never-exiting commands through bash \u2014 they block until timeout. This includes starting an Android emulator (emulator -avd X), streaming logs (adb logcat), and dev servers (node server.js, npm run dev, metro / react-native start). Use the 'task_create' tool to run these in the background, then poll status with short bash calls (e.g. adb shell getprop sys.boot_completed).`,
231
231
  parameters: {
232
232
  command: {
233
233
  type: "string",
@@ -256,6 +256,10 @@ Important rules:
256
256
  if (!command.trim()) {
257
257
  throw new ToolError("bash", "command is required");
258
258
  }
259
+ const blockingHint = detectBlockingCommand(command);
260
+ if (blockingHint) {
261
+ throw new ToolError("bash", blockingHint);
262
+ }
259
263
  let currentCwd = getCwd();
260
264
  if (!existsSync2(currentCwd)) {
261
265
  const fallback = process.cwd();
@@ -442,6 +446,28 @@ function buildErrorHint(command, stderr) {
442
446
  }
443
447
  return hints.length > 0 ? hints.map((h) => `\u{1F4A1} ${h}`).join("\n\n") : null;
444
448
  }
449
+ function detectBlockingCommand(command) {
450
+ if (/\bemulator(?:\.exe)?\b/i.test(command) && /(?:^|\s)(?:-avd\b|@[\w.-]+)/.test(command)) {
451
+ return blockingMessage("emulator -avd <name>", "launch an Android emulator");
452
+ }
453
+ const logcat = command.match(/\badb\b[^|;&\n]*\blogcat\b([^|;&\n]*)/i);
454
+ if (logcat && !/(?:^|\s)-(?:d|t|c|g)\b/.test(logcat[1] ?? "")) {
455
+ return blockingMessage("adb logcat", "stream device logs");
456
+ }
457
+ return null;
458
+ }
459
+ function blockingMessage(example, what) {
460
+ return `This command (${example}) is used to ${what}, which runs forever and never exits on its own. Running it through 'bash' will BLOCK until the tool times out, and the timeout cleanup (taskkill /T) then kills the very emulator/process you just started \u2014 so it can never stay up.
461
+
462
+ Use the 'task_create' tool to run it in the background instead, e.g.:
463
+ task_create(command: "${example} ...", description: "${what}")
464
+
465
+ Then poll readiness with SHORT bash calls (these DO exit), e.g.:
466
+ adb devices # is the device/emulator listed?
467
+ adb shell getprop sys.boot_completed # prints "1" once the emulator is fully booted
468
+
469
+ [Do NOT run this long-running command through bash \u2014 it will hang.]`;
470
+ }
445
471
  function snapshotDir(dir) {
446
472
  try {
447
473
  return new Set(readdirSync(dir).map((name) => resolve(dir, name)));
@@ -4544,15 +4570,30 @@ function stopTask(id) {
4544
4570
  const task = tasks.get(id);
4545
4571
  if (!task || task.status !== "running") return false;
4546
4572
  try {
4547
- task.process.kill("SIGTERM");
4548
- setTimeout(() => {
4549
- if (task.status === "running") {
4550
- try {
4551
- task.process.kill("SIGKILL");
4552
- } catch {
4553
- }
4573
+ const proc = task.process;
4574
+ if (platform3() === "win32" && proc.pid) {
4575
+ try {
4576
+ spawn3("taskkill", ["/PID", String(proc.pid), "/T", "/F"], {
4577
+ windowsHide: true,
4578
+ stdio: "ignore"
4579
+ });
4580
+ } catch {
4554
4581
  }
4555
- }, 3e3);
4582
+ try {
4583
+ proc.kill();
4584
+ } catch {
4585
+ }
4586
+ } else {
4587
+ proc.kill("SIGTERM");
4588
+ setTimeout(() => {
4589
+ if (proc.exitCode === null && proc.signalCode === null) {
4590
+ try {
4591
+ proc.kill("SIGKILL");
4592
+ } catch {
4593
+ }
4594
+ }
4595
+ }, 3e3).unref();
4596
+ }
4556
4597
  task.status = "stopped";
4557
4598
  task.endTime = Date.now();
4558
4599
  return true;
@@ -4565,7 +4606,7 @@ function stopTask(id) {
4565
4606
  var taskCreateTool = {
4566
4607
  definition: {
4567
4608
  name: "task_create",
4568
- description: `Start a command running in the background. Returns a task ID for monitoring with task_list. Use this to run long-running processes (dev servers, builds, tests) while continuing other work.`,
4609
+ description: `Start a command running in the background and return immediately with a task ID (monitor via task_list, stop via task_stop). Use this for ANY long-running or never-exiting command, including: dev servers (npm run dev, metro / react-native start), Android emulator launch (emulator -avd X), device log streaming (adb logcat), file watchers, and builds you want to monitor while continuing other work. Running such commands via 'bash' instead would block until timeout.`,
4569
4610
  parameters: {
4570
4611
  command: {
4571
4612
  type: "string",
@@ -2,7 +2,7 @@
2
2
  import {
3
3
  CONFIG_DIR_NAME,
4
4
  VERSION
5
- } from "./chunk-IDMCBIYZ.js";
5
+ } from "./chunk-SDT4DCNX.js";
6
6
 
7
7
  // src/diagnostics/crash-log.ts
8
8
  import {
@@ -8,7 +8,7 @@ import {
8
8
  CONFIG_FILE_NAME,
9
9
  HISTORY_DIR_NAME,
10
10
  PLUGINS_DIR_NAME
11
- } from "./chunk-IDMCBIYZ.js";
11
+ } from "./chunk-SDT4DCNX.js";
12
12
 
13
13
  // src/config/config-manager.ts
14
14
  import { readFileSync, writeFileSync, existsSync, mkdirSync } from "fs";
@@ -1,7 +1,7 @@
1
1
  #!/usr/bin/env node
2
2
 
3
3
  // src/core/constants.ts
4
- var VERSION = "0.4.200";
4
+ var VERSION = "0.4.201";
5
5
  var APP_NAME = "ai-cli";
6
6
  var CONFIG_DIR_NAME = ".aicli";
7
7
  var CONFIG_FILE_NAME = "config.json";
@@ -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.200";
9
+ var VERSION = "0.4.201";
10
10
  var APP_NAME = "ai-cli";
11
11
  var CONFIG_DIR_NAME = ".aicli";
12
12
  var CONFIG_FILE_NAME = "config.json";
@@ -1,7 +1,7 @@
1
1
  #!/usr/bin/env node
2
2
  import {
3
3
  CONFIG_DIR_NAME
4
- } from "./chunk-IDMCBIYZ.js";
4
+ } from "./chunk-SDT4DCNX.js";
5
5
  import {
6
6
  atomicWriteFileSync
7
7
  } from "./chunk-IW3Q7AE5.js";
@@ -10,11 +10,11 @@ import {
10
10
  import "./chunk-5UR6ZOF4.js";
11
11
  import {
12
12
  ConfigManager
13
- } from "./chunk-NULOZSFA.js";
13
+ } from "./chunk-QT5SGLTM.js";
14
14
  import "./chunk-TZQHYZKT.js";
15
15
  import {
16
16
  VERSION
17
- } from "./chunk-IDMCBIYZ.js";
17
+ } from "./chunk-SDT4DCNX.js";
18
18
 
19
19
  // src/cli/ci.ts
20
20
  import { execFileSync, execSync } from "child_process";
@@ -36,7 +36,7 @@ import {
36
36
  TEST_TIMEOUT,
37
37
  VERSION,
38
38
  buildUserIdentityPrompt
39
- } from "./chunk-IDMCBIYZ.js";
39
+ } from "./chunk-SDT4DCNX.js";
40
40
  export {
41
41
  AGENTIC_BEHAVIOR_GUIDELINE,
42
42
  APP_NAME,
@@ -2,7 +2,7 @@
2
2
  import {
3
3
  getConfigDirUsage,
4
4
  listRecentCrashes
5
- } from "./chunk-2G62CKDL.js";
5
+ } from "./chunk-IAWXC2SO.js";
6
6
  import {
7
7
  ProviderRegistry
8
8
  } from "./chunk-JP6ESDV7.js";
@@ -11,17 +11,17 @@ import {
11
11
  getTopFailingTools,
12
12
  getTopUsedTools,
13
13
  resetStats
14
- } from "./chunk-JZCXULOJ.js";
14
+ } from "./chunk-YUA2KL7W.js";
15
15
  import "./chunk-5UR6ZOF4.js";
16
16
  import {
17
17
  ConfigManager
18
- } from "./chunk-NULOZSFA.js";
18
+ } from "./chunk-QT5SGLTM.js";
19
19
  import "./chunk-TZQHYZKT.js";
20
20
  import {
21
21
  DEV_STATE_FILE_NAME,
22
22
  MEMORY_FILE_NAME,
23
23
  VERSION
24
- } from "./chunk-IDMCBIYZ.js";
24
+ } from "./chunk-SDT4DCNX.js";
25
25
  import "./chunk-IW3Q7AE5.js";
26
26
 
27
27
  // src/diagnostics/doctor-cli.ts
@@ -36,7 +36,7 @@ import {
36
36
  VERSION,
37
37
  buildUserIdentityPrompt,
38
38
  runTestsTool
39
- } from "./chunk-TBGVHRCL.js";
39
+ } from "./chunk-WFGCP2GF.js";
40
40
  import {
41
41
  hasSemanticIndex,
42
42
  semanticSearch
@@ -4871,12 +4871,12 @@ Important rules:
4871
4871
  3. Multiple commands can be combined with semicolons in a single call to reduce rounds.
4872
4872
  4. To delete directories, use Remove-Item -Recurse (the system will automatically optimize to a more reliable method).
4873
4873
  5. IMPORTANT: On Windows, "curl" is an alias for Invoke-WebRequest and does NOT support curl flags like -s, -X, -H. Use Invoke-RestMethod instead for HTTP requests. Example: Invoke-RestMethod -Uri "http://localhost:3000/api/health" -Method Get
4874
- 6. For long-running server commands (node server.js, npm run dev, etc.), use Start-Process -NoNewWindow to run in background, otherwise the tool will block until timeout.` : `Execute commands in ${SHELL}.
4874
+ 6. NEVER run long-running / never-exiting commands through bash \u2014 they block until timeout. This includes starting an Android emulator (emulator -avd X), streaming logs (adb logcat), and dev servers (node server.js, npm run dev, metro / react-native start). Use the 'task_create' tool to run these in the background, then poll status with short bash calls (e.g. adb shell getprop sys.boot_completed).` : `Execute commands in ${SHELL}.
4875
4875
  Important rules:
4876
4876
  1. Each bash call runs in an independent subprocess; cd commands do not persist. To run in a specific directory, use the cwd parameter, or combine commands: e.g. "cd mydir && ls" or "mkdir -p mydir && touch mydir/file.txt".
4877
4877
  2. If a command fails (returns an error or non-zero exit code), stop immediately, report the error to the user, and do not retry the same or similar commands.
4878
4878
  3. Multiple commands can be combined with && in a single call to reduce rounds.
4879
- 4. For long-running server commands (node server.js, npm start, npm run dev, etc.), run in background with & or nohup, otherwise the tool will block until timeout.`,
4879
+ 4. NEVER run long-running / never-exiting commands through bash \u2014 they block until timeout. This includes starting an Android emulator (emulator -avd X), streaming logs (adb logcat), and dev servers (node server.js, npm run dev, metro / react-native start). Use the 'task_create' tool to run these in the background, then poll status with short bash calls (e.g. adb shell getprop sys.boot_completed).`,
4880
4880
  parameters: {
4881
4881
  command: {
4882
4882
  type: "string",
@@ -4905,6 +4905,10 @@ Important rules:
4905
4905
  if (!command.trim()) {
4906
4906
  throw new ToolError("bash", "command is required");
4907
4907
  }
4908
+ const blockingHint = detectBlockingCommand(command);
4909
+ if (blockingHint) {
4910
+ throw new ToolError("bash", blockingHint);
4911
+ }
4908
4912
  let currentCwd = getCwd();
4909
4913
  if (!existsSync4(currentCwd)) {
4910
4914
  const fallback = process.cwd();
@@ -5091,6 +5095,28 @@ function buildErrorHint(command, stderr) {
5091
5095
  }
5092
5096
  return hints.length > 0 ? hints.map((h) => `\u{1F4A1} ${h}`).join("\n\n") : null;
5093
5097
  }
5098
+ function detectBlockingCommand(command) {
5099
+ if (/\bemulator(?:\.exe)?\b/i.test(command) && /(?:^|\s)(?:-avd\b|@[\w.-]+)/.test(command)) {
5100
+ return blockingMessage("emulator -avd <name>", "launch an Android emulator");
5101
+ }
5102
+ const logcat = command.match(/\badb\b[^|;&\n]*\blogcat\b([^|;&\n]*)/i);
5103
+ if (logcat && !/(?:^|\s)-(?:d|t|c|g)\b/.test(logcat[1] ?? "")) {
5104
+ return blockingMessage("adb logcat", "stream device logs");
5105
+ }
5106
+ return null;
5107
+ }
5108
+ function blockingMessage(example, what) {
5109
+ return `This command (${example}) is used to ${what}, which runs forever and never exits on its own. Running it through 'bash' will BLOCK until the tool times out, and the timeout cleanup (taskkill /T) then kills the very emulator/process you just started \u2014 so it can never stay up.
5110
+
5111
+ Use the 'task_create' tool to run it in the background instead, e.g.:
5112
+ task_create(command: "${example} ...", description: "${what}")
5113
+
5114
+ Then poll readiness with SHORT bash calls (these DO exit), e.g.:
5115
+ adb devices # is the device/emulator listed?
5116
+ adb shell getprop sys.boot_completed # prints "1" once the emulator is fully booted
5117
+
5118
+ [Do NOT run this long-running command through bash \u2014 it will hang.]`;
5119
+ }
5094
5120
  function snapshotDir(dir) {
5095
5121
  try {
5096
5122
  return new Set(readdirSync2(dir).map((name) => resolve(dir, name)));
@@ -9241,15 +9267,30 @@ function stopTask(id) {
9241
9267
  const task = tasks.get(id);
9242
9268
  if (!task || task.status !== "running") return false;
9243
9269
  try {
9244
- task.process.kill("SIGTERM");
9245
- setTimeout(() => {
9246
- if (task.status === "running") {
9247
- try {
9248
- task.process.kill("SIGKILL");
9249
- } catch {
9250
- }
9270
+ const proc = task.process;
9271
+ if (platform3() === "win32" && proc.pid) {
9272
+ try {
9273
+ spawn3("taskkill", ["/PID", String(proc.pid), "/T", "/F"], {
9274
+ windowsHide: true,
9275
+ stdio: "ignore"
9276
+ });
9277
+ } catch {
9278
+ }
9279
+ try {
9280
+ proc.kill();
9281
+ } catch {
9251
9282
  }
9252
- }, 3e3);
9283
+ } else {
9284
+ proc.kill("SIGTERM");
9285
+ setTimeout(() => {
9286
+ if (proc.exitCode === null && proc.signalCode === null) {
9287
+ try {
9288
+ proc.kill("SIGKILL");
9289
+ } catch {
9290
+ }
9291
+ }
9292
+ }, 3e3).unref();
9293
+ }
9253
9294
  task.status = "stopped";
9254
9295
  task.endTime = Date.now();
9255
9296
  return true;
@@ -9262,7 +9303,7 @@ function stopTask(id) {
9262
9303
  var taskCreateTool = {
9263
9304
  definition: {
9264
9305
  name: "task_create",
9265
- description: `Start a command running in the background. Returns a task ID for monitoring with task_list. Use this to run long-running processes (dev servers, builds, tests) while continuing other work.`,
9306
+ description: `Start a command running in the background and return immediately with a task ID (monitor via task_list, stop via task_stop). Use this for ANY long-running or never-exiting command, including: dev servers (npm run dev, metro / react-native start), Android emulator launch (emulator -avd X), device log streaming (adb logcat), file watchers, and builds you want to monitor while continuing other work. Running such commands via 'bash' instead would block until timeout.`,
9266
9307
  parameters: {
9267
9308
  command: {
9268
9309
  type: "string",
@@ -14251,7 +14292,7 @@ ${undoResults.map((r) => ` \u2022 ${r}`).join("\n")}` });
14251
14292
  case "test": {
14252
14293
  this.send({ type: "info", message: "\u{1F9EA} Running tests..." });
14253
14294
  try {
14254
- const { executeTests } = await import("./run-tests-G2MCAQJL.js");
14295
+ const { executeTests } = await import("./run-tests-T4NPP36U.js");
14255
14296
  const argStr = args.join(" ").trim();
14256
14297
  let testArgs = {};
14257
14298
  if (argStr) {
@@ -154,7 +154,7 @@ ${content}`);
154
154
  }
155
155
  }
156
156
  async function runTaskMode(config, providers, configManager, topic) {
157
- const { TaskOrchestrator } = await import("./task-orchestrator-IF3XCVZ7.js");
157
+ const { TaskOrchestrator } = await import("./task-orchestrator-BS2FKLGM.js");
158
158
  const orchestrator = new TaskOrchestrator(config, providers, configManager);
159
159
  let interrupted = false;
160
160
  const onSigint = () => {
package/dist/index.js CHANGED
@@ -15,7 +15,7 @@ import {
15
15
  saveDevState,
16
16
  sessionHasMeaningfulContent,
17
17
  setupProxy
18
- } from "./chunk-5SA7IACI.js";
18
+ } from "./chunk-3UWMMYCQ.js";
19
19
  import {
20
20
  ToolExecutor,
21
21
  ToolRegistry,
@@ -35,10 +35,10 @@ import {
35
35
  spawnAgentContext,
36
36
  theme,
37
37
  undoStack
38
- } from "./chunk-FQF6YJ6F.js";
38
+ } from "./chunk-HLOHSMTT.js";
39
39
  import "./chunk-T2NL5ZIA.js";
40
40
  import "./chunk-BXP6YZ2P.js";
41
- import "./chunk-HUTS2F6Y.js";
41
+ import "./chunk-C46JMUDC.js";
42
42
  import {
43
43
  SessionManager,
44
44
  getContentText
@@ -55,7 +55,7 @@ import {
55
55
  getConfigDirUsage,
56
56
  listRecentCrashes,
57
57
  writeCrashLog
58
- } from "./chunk-2G62CKDL.js";
58
+ } from "./chunk-IAWXC2SO.js";
59
59
  import {
60
60
  ProviderRegistry
61
61
  } from "./chunk-JP6ESDV7.js";
@@ -64,7 +64,7 @@ import {
64
64
  getTopFailingTools,
65
65
  getTopUsedTools,
66
66
  installFlushOnExit
67
- } from "./chunk-JZCXULOJ.js";
67
+ } from "./chunk-YUA2KL7W.js";
68
68
  import {
69
69
  CONTENT_ONLY_STREAM_REMINDER,
70
70
  TEE_FINAL_USER_NUDGE,
@@ -85,7 +85,7 @@ import {
85
85
  } from "./chunk-5UR6ZOF4.js";
86
86
  import {
87
87
  ConfigManager
88
- } from "./chunk-NULOZSFA.js";
88
+ } from "./chunk-QT5SGLTM.js";
89
89
  import {
90
90
  AuthError,
91
91
  ProviderError,
@@ -112,7 +112,7 @@ import {
112
112
  SKILLS_DIR_NAME,
113
113
  VERSION,
114
114
  buildUserIdentityPrompt
115
- } from "./chunk-IDMCBIYZ.js";
115
+ } from "./chunk-SDT4DCNX.js";
116
116
  import {
117
117
  formatGitContextForPrompt,
118
118
  getGitContext,
@@ -1827,7 +1827,7 @@ No tools match "${filter}".
1827
1827
  const { join: join5 } = await import("path");
1828
1828
  const { existsSync: existsSync5 } = await import("fs");
1829
1829
  const { getGitRoot: getGitRoot2 } = await import("./git-context-EXOEHQSF.js");
1830
- const { MCP_PROJECT_CONFIG_NAME: MCP_PROJECT_CONFIG_NAME2 } = await import("./constants-GMPGZM4D.js");
1830
+ const { MCP_PROJECT_CONFIG_NAME: MCP_PROJECT_CONFIG_NAME2 } = await import("./constants-QUKKMYWZ.js");
1831
1831
  const { approveProject, hashMcpFile } = await import("./project-trust-NKYHL3VZ.js");
1832
1832
  const cwd = process.cwd();
1833
1833
  const projectRoot = getGitRoot2(cwd) ?? cwd;
@@ -2888,7 +2888,7 @@ ${hint}` : "")
2888
2888
  usage: "/test [command|filter]",
2889
2889
  async execute(args, ctx) {
2890
2890
  try {
2891
- const { executeTests } = await import("./run-tests-NUWLWMHZ.js");
2891
+ const { executeTests } = await import("./run-tests-OEPVJDXJ.js");
2892
2892
  const argStr = args.join(" ").trim();
2893
2893
  let testArgs = {};
2894
2894
  if (argStr) {
@@ -7265,7 +7265,7 @@ program.command("web").description("Start Web UI server with browser-based chat
7265
7265
  console.error("Error: Invalid port number. Must be between 1 and 65535.");
7266
7266
  process.exit(1);
7267
7267
  }
7268
- const { startWebServer } = await import("./server-Y3XEAXTC.js");
7268
+ const { startWebServer } = await import("./server-NBPF74CY.js");
7269
7269
  await startWebServer({ port, host: options.host });
7270
7270
  });
7271
7271
  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) => {
@@ -7432,16 +7432,16 @@ program.command("sessions").description("List recent conversation sessions").opt
7432
7432
  console.log(footer + "\n");
7433
7433
  });
7434
7434
  program.command("usage").description("Show token + cost usage grouped by provider/model (cross-session)").option("--days <n>", "Only the last N days (inclusive of today)").option("--month <ym>", "Only a specific month, format YYYY-MM (e.g. 2026-06)").option("--json", "Output as JSON (for scripting)").action(async (options) => {
7435
- const { runUsageCli } = await import("./usage-7BAT3772.js");
7435
+ const { runUsageCli } = await import("./usage-DPM6T4ZZ.js");
7436
7436
  await runUsageCli(options);
7437
7437
  });
7438
7438
  program.command("doctor").description("Health check: API keys, config, MCP, recent crashes, tool usage, disk usage").option("--json", "Output as JSON (for scripting)").option("--reset-stats", "Reset accumulated tool usage statistics").action(async (options) => {
7439
- const { runDoctorCli } = await import("./doctor-cli-PG52ECBH.js");
7439
+ const { runDoctorCli } = await import("./doctor-cli-6XY3PJM5.js");
7440
7440
  await runDoctorCli({ json: !!options.json, resetStats: !!options.resetStats });
7441
7441
  });
7442
7442
  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) => {
7443
7443
  try {
7444
- const batch = await import("./batch-5N4CXARG.js");
7444
+ const batch = await import("./batch-SWBDLVZO.js");
7445
7445
  switch (action) {
7446
7446
  case "submit":
7447
7447
  if (!arg) {
@@ -7484,7 +7484,7 @@ program.command("batch <action> [arg] [arg2]").description("Anthropic Message Ba
7484
7484
  }
7485
7485
  });
7486
7486
  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) => {
7487
- const { startMcpServer } = await import("./server-74PZ2PDM.js");
7487
+ const { startMcpServer } = await import("./server-TZDUN5V3.js");
7488
7488
  await startMcpServer({
7489
7489
  allowDestructive: !!options.allowDestructive,
7490
7490
  allowOutsideCwd: !!options.allowOutsideCwd,
@@ -7493,7 +7493,7 @@ program.command("mcp-serve").description("Start an MCP server over STDIO, exposi
7493
7493
  });
7494
7494
  });
7495
7495
  program.command("ci").description("Headless PR review (code + security) \u2014 reads git/gh diff, optionally posts to PR. Designed for GitHub Actions.").option("--pr <num>", "PR number; diff fetched via `gh pr diff <num>`", (v) => parseInt(v, 10)).option("--base <ref>", "Base ref for `git diff <ref>...HEAD` (ignored when --pr set)").option("--post", "Post review as a PR comment (requires gh CLI + GH_TOKEN, needs --pr)").option("--no-update", "Always create a new comment instead of updating the previous aicli review").option("--skip-code", "Skip the code review section").option("--skip-security", "Skip the security review section").option("--detailed", "Use the detailed code-review prompt").option("--max-diff <n>", "Max diff chars sent to the model (default 30000)", (v) => parseInt(v, 10)).option("--provider <id>", "Override provider (default: config.defaultProvider)").option("--model <id>", "Override model").option("--dry-run", "Print result to stdout instead of posting (overrides --post)").action(async (options) => {
7496
- const { runCi } = await import("./ci-2ZSBYWJE.js");
7496
+ const { runCi } = await import("./ci-O3JM5YAA.js");
7497
7497
  const result = await runCi({
7498
7498
  pr: options.pr,
7499
7499
  base: options.base,
@@ -7639,7 +7639,7 @@ program.command("hub [topic]").description("Start multi-agent hub (discuss / bra
7639
7639
  }),
7640
7640
  config.get("customProviders")
7641
7641
  );
7642
- const { startHub } = await import("./hub-AI4ICH5E.js");
7642
+ const { startHub } = await import("./hub-HJTJM2RT.js");
7643
7643
  await startHub(
7644
7644
  {
7645
7645
  topic: topic ?? "",
@@ -2,8 +2,8 @@
2
2
  import {
3
3
  executeTests,
4
4
  runTestsTool
5
- } from "./chunk-HUTS2F6Y.js";
6
- import "./chunk-IDMCBIYZ.js";
5
+ } from "./chunk-C46JMUDC.js";
6
+ import "./chunk-SDT4DCNX.js";
7
7
  export {
8
8
  executeTests,
9
9
  runTestsTool
@@ -1,7 +1,7 @@
1
1
  import {
2
2
  executeTests,
3
3
  runTestsTool
4
- } from "./chunk-TBGVHRCL.js";
4
+ } from "./chunk-WFGCP2GF.js";
5
5
  export {
6
6
  executeTests,
7
7
  runTestsTool
@@ -19,7 +19,7 @@ import {
19
19
  loadDevState,
20
20
  persistToolRound,
21
21
  setupProxy
22
- } from "./chunk-5SA7IACI.js";
22
+ } from "./chunk-3UWMMYCQ.js";
23
23
  import {
24
24
  ToolExecutor,
25
25
  ToolRegistry,
@@ -38,10 +38,10 @@ import {
38
38
  spawnAgentContext,
39
39
  truncateOutput,
40
40
  undoStack
41
- } from "./chunk-FQF6YJ6F.js";
41
+ } from "./chunk-HLOHSMTT.js";
42
42
  import "./chunk-T2NL5ZIA.js";
43
43
  import "./chunk-BXP6YZ2P.js";
44
- import "./chunk-HUTS2F6Y.js";
44
+ import "./chunk-C46JMUDC.js";
45
45
  import {
46
46
  SessionManager,
47
47
  getContentText
@@ -55,7 +55,7 @@ import {
55
55
  } from "./chunk-JP6ESDV7.js";
56
56
  import {
57
57
  runTool
58
- } from "./chunk-JZCXULOJ.js";
58
+ } from "./chunk-YUA2KL7W.js";
59
59
  import {
60
60
  CONTENT_ONLY_STREAM_REMINDER,
61
61
  TEE_FINAL_USER_NUDGE,
@@ -73,7 +73,7 @@ import {
73
73
  } from "./chunk-5UR6ZOF4.js";
74
74
  import {
75
75
  ConfigManager
76
- } from "./chunk-NULOZSFA.js";
76
+ } from "./chunk-QT5SGLTM.js";
77
77
  import "./chunk-TZQHYZKT.js";
78
78
  import {
79
79
  AGENTIC_BEHAVIOR_GUIDELINE,
@@ -93,7 +93,7 @@ import {
93
93
  SKILLS_DIR_NAME,
94
94
  VERSION,
95
95
  buildUserIdentityPrompt
96
- } from "./chunk-IDMCBIYZ.js";
96
+ } from "./chunk-SDT4DCNX.js";
97
97
  import {
98
98
  formatGitContextForPrompt,
99
99
  getGitContext,
@@ -2454,7 +2454,7 @@ ${undoResults.map((r) => ` \u2022 ${r}`).join("\n")}` });
2454
2454
  case "test": {
2455
2455
  this.send({ type: "info", message: "\u{1F9EA} Running tests..." });
2456
2456
  try {
2457
- const { executeTests } = await import("./run-tests-NUWLWMHZ.js");
2457
+ const { executeTests } = await import("./run-tests-OEPVJDXJ.js");
2458
2458
  const argStr = args.join(" ").trim();
2459
2459
  let testArgs = {};
2460
2460
  if (argStr) {
@@ -1,13 +1,13 @@
1
1
  #!/usr/bin/env node
2
2
  import {
3
3
  ToolRegistry
4
- } from "./chunk-FQF6YJ6F.js";
4
+ } from "./chunk-HLOHSMTT.js";
5
5
  import "./chunk-T2NL5ZIA.js";
6
6
  import "./chunk-BXP6YZ2P.js";
7
- import "./chunk-HUTS2F6Y.js";
7
+ import "./chunk-C46JMUDC.js";
8
8
  import {
9
9
  runTool
10
- } from "./chunk-JZCXULOJ.js";
10
+ } from "./chunk-YUA2KL7W.js";
11
11
  import {
12
12
  getDangerLevel,
13
13
  schemaToJsonSchema
@@ -15,7 +15,7 @@ import {
15
15
  import "./chunk-TZQHYZKT.js";
16
16
  import {
17
17
  VERSION
18
- } from "./chunk-IDMCBIYZ.js";
18
+ } from "./chunk-SDT4DCNX.js";
19
19
  import "./chunk-4BKXL7SM.js";
20
20
  import "./chunk-TB4W4Y4T.js";
21
21
  import "./chunk-KHYD3WXE.js";
@@ -3,13 +3,13 @@ import {
3
3
  ToolRegistry,
4
4
  googleSearchContext,
5
5
  truncateOutput
6
- } from "./chunk-FQF6YJ6F.js";
6
+ } from "./chunk-HLOHSMTT.js";
7
7
  import "./chunk-T2NL5ZIA.js";
8
8
  import "./chunk-BXP6YZ2P.js";
9
- import "./chunk-HUTS2F6Y.js";
9
+ import "./chunk-C46JMUDC.js";
10
10
  import {
11
11
  runTool
12
- } from "./chunk-JZCXULOJ.js";
12
+ } from "./chunk-YUA2KL7W.js";
13
13
  import {
14
14
  getDangerLevel,
15
15
  runLeanAgentLoop
@@ -17,7 +17,7 @@ import {
17
17
  import "./chunk-TZQHYZKT.js";
18
18
  import {
19
19
  SUBAGENT_ALLOWED_TOOLS
20
- } from "./chunk-IDMCBIYZ.js";
20
+ } from "./chunk-SDT4DCNX.js";
21
21
  import "./chunk-4BKXL7SM.js";
22
22
  import "./chunk-TB4W4Y4T.js";
23
23
  import "./chunk-KHYD3WXE.js";
@@ -8,9 +8,9 @@ import {
8
8
  } from "./chunk-E44DTERW.js";
9
9
  import {
10
10
  ConfigManager
11
- } from "./chunk-NULOZSFA.js";
11
+ } from "./chunk-QT5SGLTM.js";
12
12
  import "./chunk-TZQHYZKT.js";
13
- import "./chunk-IDMCBIYZ.js";
13
+ import "./chunk-SDT4DCNX.js";
14
14
  import "./chunk-IW3Q7AE5.js";
15
15
 
16
16
  // src/cli/usage.ts
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "jinzd-ai-cli",
3
- "version": "0.4.200",
3
+ "version": "0.4.201",
4
4
  "description": "Cross-platform REPL-style AI CLI with multi-provider support",
5
5
  "type": "module",
6
6
  "main": "./dist/index.js",