jinzd-ai-cli 0.4.236 → 0.4.237

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 (26) hide show
  1. package/dist/{batch-HZI7QAE7.js → batch-S2NUD45K.js} +2 -2
  2. package/dist/{chunk-CGQARJMP.js → chunk-25FKQO3A.js} +1 -1
  3. package/dist/{chunk-O4QYY6SF.js → chunk-45TJA46E.js} +3 -3
  4. package/dist/{chunk-7VAE3I3D.js → chunk-6RU5AKXB.js} +1 -1
  5. package/dist/{chunk-VBAW4ZPY.js → chunk-CSATDZ3Z.js} +1 -1
  6. package/dist/{chunk-MFWAL5S2.js → chunk-EG5P3AMC.js} +1 -1
  7. package/dist/{chunk-SCFGLRB3.js → chunk-J2M4GOFE.js} +1 -1
  8. package/dist/{chunk-TT7YURG3.js → chunk-KQJ55BTD.js} +2 -2
  9. package/dist/{chunk-T6EIBUKW.js → chunk-MSK2BAKT.js} +1 -1
  10. package/dist/{chunk-QDP3NUPX.js → chunk-NAPAMAFY.js} +3 -3
  11. package/dist/{chunk-SBSWH2EG.js → chunk-WI4DN5FN.js} +47 -3
  12. package/dist/{ci-FYLCHRN3.js → ci-HDGRBALH.js} +4 -4
  13. package/dist/{ci-format-TH2ZTFKU.js → ci-format-W6DDOFS7.js} +2 -2
  14. package/dist/{constants-BF6YNKRW.js → constants-3KMOIJNP.js} +1 -1
  15. package/dist/{doctor-cli-B6GE4BYJ.js → doctor-cli-E5MBY7CZ.js} +4 -4
  16. package/dist/electron-server.js +46 -2
  17. package/dist/{hub-QBQCKEPE.js → hub-2WPMT242.js} +1 -1
  18. package/dist/index.js +18 -18
  19. package/dist/{pr-KV2WK7SU.js → pr-RRHV7P7D.js} +4 -4
  20. package/dist/{run-tests-MEHC73SQ.js → run-tests-GP7ZMSAX.js} +2 -2
  21. package/dist/{run-tests-DI6WEYHX.js → run-tests-K36VNQ5W.js} +1 -1
  22. package/dist/{server-KZAP5JN3.js → server-J36CY5EU.js} +8 -8
  23. package/dist/{server-ETIGAZX5.js → server-JEVAHG53.js} +4 -4
  24. package/dist/{task-orchestrator-WS724BUX.js → task-orchestrator-D66BJZKU.js} +4 -4
  25. package/dist/{usage-DHZR5PG7.js → usage-5QO5AFYC.js} +2 -2
  26. package/package.json +1 -1
@@ -1,9 +1,9 @@
1
1
  #!/usr/bin/env node
2
2
  import {
3
3
  ConfigManager
4
- } from "./chunk-VBAW4ZPY.js";
4
+ } from "./chunk-CSATDZ3Z.js";
5
5
  import "./chunk-5ULLIOVC.js";
6
- import "./chunk-CGQARJMP.js";
6
+ import "./chunk-25FKQO3A.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
 
3
3
  // src/core/constants.ts
4
- var VERSION = "0.4.236";
4
+ var VERSION = "0.4.237";
5
5
  var APP_NAME = "ai-cli";
6
6
  var CONFIG_DIR_NAME = ".aicli";
7
7
  var CONFIG_FILE_NAME = "config.json";
@@ -2,7 +2,7 @@
2
2
  import {
3
3
  evaluateCiGate,
4
4
  normalizeCiThresholds
5
- } from "./chunk-SCFGLRB3.js";
5
+ } from "./chunk-J2M4GOFE.js";
6
6
  import {
7
7
  buildReviewPrompt,
8
8
  buildSecurityReviewPrompt,
@@ -13,10 +13,10 @@ import {
13
13
  } from "./chunk-QYQI7ZWK.js";
14
14
  import {
15
15
  ConfigManager
16
- } from "./chunk-VBAW4ZPY.js";
16
+ } from "./chunk-CSATDZ3Z.js";
17
17
  import {
18
18
  VERSION
19
- } from "./chunk-CGQARJMP.js";
19
+ } from "./chunk-25FKQO3A.js";
20
20
 
21
21
  // src/cli/ci.ts
22
22
  import { execFileSync } from "child_process";
@@ -1,7 +1,7 @@
1
1
  #!/usr/bin/env node
2
2
  import {
3
3
  TEST_TIMEOUT
4
- } from "./chunk-CGQARJMP.js";
4
+ } from "./chunk-25FKQO3A.js";
5
5
 
6
6
  // src/tools/builtin/run-tests.ts
7
7
  import { execSync, spawnSync } from "child_process";
@@ -8,7 +8,7 @@ import {
8
8
  CONFIG_FILE_NAME,
9
9
  HISTORY_DIR_NAME,
10
10
  PLUGINS_DIR_NAME
11
- } from "./chunk-CGQARJMP.js";
11
+ } from "./chunk-25FKQO3A.js";
12
12
  import {
13
13
  atomicWriteFileSync
14
14
  } from "./chunk-IW3Q7AE5.js";
@@ -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.236";
9
+ var VERSION = "0.4.237";
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
  VERSION
4
- } from "./chunk-CGQARJMP.js";
4
+ } from "./chunk-25FKQO3A.js";
5
5
 
6
6
  // src/cli/ci-format.ts
7
7
  var DEFAULT_CI_THRESHOLDS = {
@@ -1,7 +1,7 @@
1
1
  #!/usr/bin/env node
2
2
  import {
3
3
  truncateForPersist
4
- } from "./chunk-SBSWH2EG.js";
4
+ } from "./chunk-WI4DN5FN.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-CGQARJMP.js";
14
+ } from "./chunk-25FKQO3A.js";
15
15
  import {
16
16
  atomicWriteFileSync
17
17
  } from "./chunk-IW3Q7AE5.js";
@@ -2,7 +2,7 @@
2
2
  import {
3
3
  CONFIG_DIR_NAME,
4
4
  PLUGINS_DIR_NAME
5
- } from "./chunk-CGQARJMP.js";
5
+ } from "./chunk-25FKQO3A.js";
6
6
  import {
7
7
  atomicWriteFileSync
8
8
  } from "./chunk-IW3Q7AE5.js";
@@ -11,10 +11,10 @@ import {
11
11
  listHooks,
12
12
  listInstalledPlugins,
13
13
  resetStats
14
- } from "./chunk-T6EIBUKW.js";
14
+ } from "./chunk-MSK2BAKT.js";
15
15
  import {
16
16
  ConfigManager
17
- } from "./chunk-VBAW4ZPY.js";
17
+ } from "./chunk-CSATDZ3Z.js";
18
18
  import {
19
19
  getGitRoot
20
20
  } from "./chunk-HOSJZMQS.js";
@@ -26,7 +26,7 @@ import {
26
26
  MCP_PROJECT_CONFIG_NAME,
27
27
  MEMORY_FILE_NAME,
28
28
  VERSION
29
- } from "./chunk-CGQARJMP.js";
29
+ } from "./chunk-25FKQO3A.js";
30
30
 
31
31
  // src/diagnostics/doctor-report.ts
32
32
  import { existsSync as existsSync3, statSync as statSync2 } from "fs";
@@ -14,7 +14,7 @@ import {
14
14
  runHook,
15
15
  runLifecycleHooks,
16
16
  runTool
17
- } from "./chunk-T6EIBUKW.js";
17
+ } from "./chunk-MSK2BAKT.js";
18
18
  import {
19
19
  getDangerLevel,
20
20
  isFileWriteTool,
@@ -33,7 +33,7 @@ import {
33
33
  } from "./chunk-4BKXL7SM.js";
34
34
  import {
35
35
  runTestsTool
36
- } from "./chunk-7VAE3I3D.js";
36
+ } from "./chunk-6RU5AKXB.js";
37
37
  import {
38
38
  CONFIG_DIR_NAME,
39
39
  DEFAULT_MAX_TOOL_OUTPUT_CHARS_CAP,
@@ -43,7 +43,7 @@ import {
43
43
  SUBAGENT_ALLOWED_TOOLS,
44
44
  SUBAGENT_DEFAULT_MAX_ROUNDS,
45
45
  SUBAGENT_MAX_ROUNDS_LIMIT
46
- } from "./chunk-CGQARJMP.js";
46
+ } from "./chunk-25FKQO3A.js";
47
47
  import {
48
48
  loadChatIndex,
49
49
  searchChatMemory
@@ -4309,6 +4309,14 @@ var webFetchTool = {
4309
4309
  }
4310
4310
  const cause = err.cause;
4311
4311
  if (cause?.message?.startsWith("Blocked:")) throw new NetworkError(cause.message);
4312
+ if (err instanceof Error && err.message === "fetch failed") {
4313
+ const detail = cause?.message ? ` (${cause.message})` : "";
4314
+ throw new NetworkError(
4315
+ `Connection failed for ${url}${detail}. The domain may be unreachable from the current network (some sites require a proxy \u2014 see config.proxy) or temporarily down. Do not retry the same URL; try an alternative source.`,
4316
+ void 0,
4317
+ err
4318
+ );
4319
+ }
4312
4320
  throw err;
4313
4321
  } finally {
4314
4322
  void dispatcher.close().catch(() => {
@@ -4457,8 +4465,44 @@ function classifyBingWeakness(query, results) {
4457
4465
  if (homepageCount / results.length >= 0.6) {
4458
4466
  return `${homepageCount}/${results.length} results are bare site homepages (popular-sites fallback)`;
4459
4467
  }
4468
+ if (!hasDefinitionIntent(query) && countAsciiWords(query) >= 4) {
4469
+ const dictHits = results.filter(isDictionaryResult).length;
4470
+ if (dictHits >= 2 || isDictionaryResult(results[0])) {
4471
+ return `${dictHits}/${results.length} dictionary word-lookup results for a multi-word query (word-match fallback)`;
4472
+ }
4473
+ }
4474
+ if (!hasDefinitionIntent(query)) {
4475
+ const { total, best } = tokenCoverage(query, results);
4476
+ if (total >= 4 && best < 2) {
4477
+ return `low query-token coverage (best result matches only ${best}/${total} query terms)`;
4478
+ }
4479
+ }
4460
4480
  return null;
4461
4481
  }
4482
+ function tokenCoverage(query, results) {
4483
+ const tokens = extractQueryTokens(query);
4484
+ let best = 0;
4485
+ for (const r of results) {
4486
+ const haystack = (r.title + " " + r.snippet).toLowerCase();
4487
+ let matched = 0;
4488
+ for (const t of tokens) {
4489
+ if (haystack.includes(t.toLowerCase())) matched++;
4490
+ }
4491
+ if (matched > best) best = matched;
4492
+ }
4493
+ return { total: tokens.size, best };
4494
+ }
4495
+ var DICT_DOMAIN_RE = /\b(iciba\.com|dict\.youdao\.com|youdao\.com\/w\/|dict\.cn|dict\.baidu\.com|dictionary\.cambridge\.org|merriam-webster\.com|vocabulary\.com|bing\.com\/dict)/i;
4496
+ var DICT_TITLE_RE = /(是什么意思|的翻译|_音标_|权威在线词典|剑桥词典|Definition\s*&\s*Meaning)/i;
4497
+ function isDictionaryResult(r) {
4498
+ return DICT_DOMAIN_RE.test(r.url) || DICT_TITLE_RE.test(r.title);
4499
+ }
4500
+ function hasDefinitionIntent(query) {
4501
+ return /(meaning|definition|define\b|translat|pronounc|是什么意思|什么意思|翻译|词典|发音|读音|用法)/i.test(query);
4502
+ }
4503
+ function countAsciiWords(query) {
4504
+ return (query.match(/[a-zA-Z]{3,}/g) ?? []).length;
4505
+ }
4462
4506
  function isBareHomepage(url) {
4463
4507
  try {
4464
4508
  return new URL(url).pathname.replace(/\/+$/, "") === "";
@@ -3,14 +3,14 @@ import {
3
3
  CI_COMMENT_MARKER,
4
4
  countSeverity,
5
5
  runCi
6
- } from "./chunk-O4QYY6SF.js";
7
- import "./chunk-SCFGLRB3.js";
6
+ } from "./chunk-45TJA46E.js";
7
+ import "./chunk-J2M4GOFE.js";
8
8
  import "./chunk-HLWUDRBO.js";
9
9
  import "./chunk-QYQI7ZWK.js";
10
10
  import "./chunk-O3XSFPYH.js";
11
- import "./chunk-VBAW4ZPY.js";
11
+ import "./chunk-CSATDZ3Z.js";
12
12
  import "./chunk-5ULLIOVC.js";
13
- import "./chunk-CGQARJMP.js";
13
+ import "./chunk-25FKQO3A.js";
14
14
  import "./chunk-IW3Q7AE5.js";
15
15
  export {
16
16
  CI_COMMENT_MARKER,
@@ -6,8 +6,8 @@ import {
6
6
  formatCiResult,
7
7
  formatCiSarif,
8
8
  normalizeCiThresholds
9
- } from "./chunk-SCFGLRB3.js";
10
- import "./chunk-CGQARJMP.js";
9
+ } from "./chunk-J2M4GOFE.js";
10
+ import "./chunk-25FKQO3A.js";
11
11
  export {
12
12
  DEFAULT_CI_THRESHOLDS,
13
13
  detectCiGateSignals,
@@ -38,7 +38,7 @@ import {
38
38
  TEST_TIMEOUT,
39
39
  VERSION,
40
40
  buildUserIdentityPrompt
41
- } from "./chunk-CGQARJMP.js";
41
+ } from "./chunk-25FKQO3A.js";
42
42
  export {
43
43
  AGENTIC_BEHAVIOR_GUIDELINE,
44
44
  APP_NAME,
@@ -2,14 +2,14 @@
2
2
  import {
3
3
  formatDoctorReport,
4
4
  runDoctorCli
5
- } from "./chunk-QDP3NUPX.js";
5
+ } from "./chunk-NAPAMAFY.js";
6
6
  import "./chunk-QYQI7ZWK.js";
7
- import "./chunk-T6EIBUKW.js";
7
+ import "./chunk-MSK2BAKT.js";
8
8
  import "./chunk-O3XSFPYH.js";
9
- import "./chunk-VBAW4ZPY.js";
9
+ import "./chunk-CSATDZ3Z.js";
10
10
  import "./chunk-5ULLIOVC.js";
11
11
  import "./chunk-HOSJZMQS.js";
12
- import "./chunk-CGQARJMP.js";
12
+ import "./chunk-25FKQO3A.js";
13
13
  import "./chunk-IW3Q7AE5.js";
14
14
  export {
15
15
  formatDoctorReport,
@@ -38,7 +38,7 @@ import {
38
38
  VERSION,
39
39
  buildUserIdentityPrompt,
40
40
  runTestsTool
41
- } from "./chunk-MFWAL5S2.js";
41
+ } from "./chunk-EG5P3AMC.js";
42
42
  import {
43
43
  hasSemanticIndex,
44
44
  semanticSearch
@@ -9153,6 +9153,14 @@ var webFetchTool = {
9153
9153
  }
9154
9154
  const cause = err.cause;
9155
9155
  if (cause?.message?.startsWith("Blocked:")) throw new NetworkError(cause.message);
9156
+ if (err instanceof Error && err.message === "fetch failed") {
9157
+ const detail = cause?.message ? ` (${cause.message})` : "";
9158
+ throw new NetworkError(
9159
+ `Connection failed for ${url}${detail}. The domain may be unreachable from the current network (some sites require a proxy \u2014 see config.proxy) or temporarily down. Do not retry the same URL; try an alternative source.`,
9160
+ void 0,
9161
+ err
9162
+ );
9163
+ }
9156
9164
  throw err;
9157
9165
  } finally {
9158
9166
  void dispatcher.close().catch(() => {
@@ -9301,8 +9309,44 @@ function classifyBingWeakness(query, results) {
9301
9309
  if (homepageCount / results.length >= 0.6) {
9302
9310
  return `${homepageCount}/${results.length} results are bare site homepages (popular-sites fallback)`;
9303
9311
  }
9312
+ if (!hasDefinitionIntent(query) && countAsciiWords(query) >= 4) {
9313
+ const dictHits = results.filter(isDictionaryResult).length;
9314
+ if (dictHits >= 2 || isDictionaryResult(results[0])) {
9315
+ return `${dictHits}/${results.length} dictionary word-lookup results for a multi-word query (word-match fallback)`;
9316
+ }
9317
+ }
9318
+ if (!hasDefinitionIntent(query)) {
9319
+ const { total, best } = tokenCoverage(query, results);
9320
+ if (total >= 4 && best < 2) {
9321
+ return `low query-token coverage (best result matches only ${best}/${total} query terms)`;
9322
+ }
9323
+ }
9304
9324
  return null;
9305
9325
  }
9326
+ function tokenCoverage(query, results) {
9327
+ const tokens = extractQueryTokens(query);
9328
+ let best = 0;
9329
+ for (const r of results) {
9330
+ const haystack = (r.title + " " + r.snippet).toLowerCase();
9331
+ let matched = 0;
9332
+ for (const t of tokens) {
9333
+ if (haystack.includes(t.toLowerCase())) matched++;
9334
+ }
9335
+ if (matched > best) best = matched;
9336
+ }
9337
+ return { total: tokens.size, best };
9338
+ }
9339
+ var DICT_DOMAIN_RE = /\b(iciba\.com|dict\.youdao\.com|youdao\.com\/w\/|dict\.cn|dict\.baidu\.com|dictionary\.cambridge\.org|merriam-webster\.com|vocabulary\.com|bing\.com\/dict)/i;
9340
+ var DICT_TITLE_RE = /(是什么意思|的翻译|_音标_|权威在线词典|剑桥词典|Definition\s*&\s*Meaning)/i;
9341
+ function isDictionaryResult(r) {
9342
+ return DICT_DOMAIN_RE.test(r.url) || DICT_TITLE_RE.test(r.title);
9343
+ }
9344
+ function hasDefinitionIntent(query) {
9345
+ return /(meaning|definition|define\b|translat|pronounc|是什么意思|什么意思|翻译|词典|发音|读音|用法)/i.test(query);
9346
+ }
9347
+ function countAsciiWords(query) {
9348
+ return (query.match(/[a-zA-Z]{3,}/g) ?? []).length;
9349
+ }
9306
9350
  function isBareHomepage(url) {
9307
9351
  try {
9308
9352
  return new URL(url).pathname.replace(/\/+$/, "") === "";
@@ -15986,7 +16030,7 @@ async function handleSecurityReview(args, ctx) {
15986
16030
  async function handleTest(args, ctx) {
15987
16031
  ctx.send({ type: "info", message: "\u{1F9EA} Running tests..." });
15988
16032
  try {
15989
- const { executeTests } = await import("./run-tests-DI6WEYHX.js");
16033
+ const { executeTests } = await import("./run-tests-K36VNQ5W.js");
15990
16034
  const argStr = args.join(" ").trim();
15991
16035
  let testArgs = {};
15992
16036
  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-WS724BUX.js");
157
+ const { TaskOrchestrator } = await import("./task-orchestrator-D66BJZKU.js");
158
158
  const orchestrator = new TaskOrchestrator(config, providers, configManager);
159
159
  let interrupted = false;
160
160
  const onSigint = () => {
package/dist/index.js CHANGED
@@ -14,7 +14,7 @@ import {
14
14
  scanProject,
15
15
  sessionHasMeaningfulContent,
16
16
  setupProxy
17
- } from "./chunk-TT7YURG3.js";
17
+ } from "./chunk-KQJ55BTD.js";
18
18
  import {
19
19
  buildReviewPrompt,
20
20
  buildSecurityReviewPrompt
@@ -52,7 +52,7 @@ import {
52
52
  theme,
53
53
  undoStack,
54
54
  updateMemoryApproval
55
- } from "./chunk-SBSWH2EG.js";
55
+ } from "./chunk-WI4DN5FN.js";
56
56
  import "./chunk-K3CF65QH.js";
57
57
  import "./chunk-UUSRWSSX.js";
58
58
  import "./chunk-CKH4KQ4E.js";
@@ -74,7 +74,7 @@ import {
74
74
  formatDoctorReport,
75
75
  loadContextFiles,
76
76
  writeCrashLog
77
- } from "./chunk-QDP3NUPX.js";
77
+ } from "./chunk-NAPAMAFY.js";
78
78
  import {
79
79
  ProviderRegistry
80
80
  } from "./chunk-QYQI7ZWK.js";
@@ -94,7 +94,7 @@ import {
94
94
  trustHook,
95
95
  trustPlugin,
96
96
  untrustHook
97
- } from "./chunk-T6EIBUKW.js";
97
+ } from "./chunk-MSK2BAKT.js";
98
98
  import {
99
99
  CONTENT_ONLY_STREAM_REMINDER,
100
100
  TEE_FINAL_USER_NUDGE,
@@ -116,7 +116,7 @@ import {
116
116
  } from "./chunk-O3XSFPYH.js";
117
117
  import {
118
118
  ConfigManager
119
- } from "./chunk-VBAW4ZPY.js";
119
+ } from "./chunk-CSATDZ3Z.js";
120
120
  import {
121
121
  AuthError,
122
122
  ProviderError,
@@ -130,7 +130,7 @@ import {
130
130
  import {
131
131
  fileCheckpoints
132
132
  } from "./chunk-4BKXL7SM.js";
133
- import "./chunk-7VAE3I3D.js";
133
+ import "./chunk-6RU5AKXB.js";
134
134
  import {
135
135
  AGENTIC_BEHAVIOR_GUIDELINE,
136
136
  AUTHOR,
@@ -149,7 +149,7 @@ import {
149
149
  SKILLS_DIR_NAME,
150
150
  VERSION,
151
151
  buildUserIdentityPrompt
152
- } from "./chunk-CGQARJMP.js";
152
+ } from "./chunk-25FKQO3A.js";
153
153
  import {
154
154
  buildChatIndex,
155
155
  clearChatIndex,
@@ -1370,7 +1370,7 @@ No tools match "${filter}".
1370
1370
  const { join: join6 } = await import("path");
1371
1371
  const { existsSync: existsSync5 } = await import("fs");
1372
1372
  const { getGitRoot: getGitRoot2 } = await import("./git-context-EXOEHQSF.js");
1373
- const { MCP_PROJECT_CONFIG_NAME: MCP_PROJECT_CONFIG_NAME2 } = await import("./constants-BF6YNKRW.js");
1373
+ const { MCP_PROJECT_CONFIG_NAME: MCP_PROJECT_CONFIG_NAME2 } = await import("./constants-3KMOIJNP.js");
1374
1374
  const { approveProject, hashMcpFile } = await import("./project-trust-NKYHL3VZ.js");
1375
1375
  const cwd = process.cwd();
1376
1376
  const projectRoot = getGitRoot2(cwd) ?? cwd;
@@ -2349,7 +2349,7 @@ function createReviewCommands() {
2349
2349
  usage: "/test [command|filter]",
2350
2350
  async execute(args, ctx) {
2351
2351
  try {
2352
- const { executeTests } = await import("./run-tests-MEHC73SQ.js");
2352
+ const { executeTests } = await import("./run-tests-GP7ZMSAX.js");
2353
2353
  const argStr = args.join(" ").trim();
2354
2354
  let testArgs = {};
2355
2355
  if (argStr) {
@@ -7747,7 +7747,7 @@ program.command("web").description("Start Web UI server with browser-based chat
7747
7747
  console.error("Error: Invalid port number. Must be between 1 and 65535.");
7748
7748
  process.exit(1);
7749
7749
  }
7750
- const { startWebServer } = await import("./server-KZAP5JN3.js");
7750
+ const { startWebServer } = await import("./server-J36CY5EU.js");
7751
7751
  await startWebServer({ port, host: options.host });
7752
7752
  });
7753
7753
  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) => {
@@ -7914,11 +7914,11 @@ program.command("sessions").description("List recent conversation sessions").opt
7914
7914
  console.log(footer + "\n");
7915
7915
  });
7916
7916
  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) => {
7917
- const { runUsageCli } = await import("./usage-DHZR5PG7.js");
7917
+ const { runUsageCli } = await import("./usage-5QO5AFYC.js");
7918
7918
  await runUsageCli(options);
7919
7919
  });
7920
7920
  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) => {
7921
- const { runDoctorCli } = await import("./doctor-cli-B6GE4BYJ.js");
7921
+ const { runDoctorCli } = await import("./doctor-cli-E5MBY7CZ.js");
7922
7922
  const argv = process.argv.slice(2);
7923
7923
  await runDoctorCli({
7924
7924
  json: !!options.json || argv.includes("--json"),
@@ -7927,7 +7927,7 @@ program.command("doctor").description("Health check: API keys, config, MCP, rece
7927
7927
  });
7928
7928
  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) => {
7929
7929
  try {
7930
- const batch = await import("./batch-HZI7QAE7.js");
7930
+ const batch = await import("./batch-S2NUD45K.js");
7931
7931
  switch (action) {
7932
7932
  case "submit":
7933
7933
  if (!arg) {
@@ -7970,7 +7970,7 @@ program.command("batch <action> [arg] [arg2]").description("Anthropic Message Ba
7970
7970
  }
7971
7971
  });
7972
7972
  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) => {
7973
- const { startMcpServer } = await import("./server-ETIGAZX5.js");
7973
+ const { startMcpServer } = await import("./server-JEVAHG53.js");
7974
7974
  await startMcpServer({
7975
7975
  allowDestructive: !!options.allowDestructive,
7976
7976
  allowOutsideCwd: !!options.allowOutsideCwd,
@@ -7983,7 +7983,7 @@ program.command("pr <action> [target]").description("PR review helpers: review |
7983
7983
  console.error(`Unknown pr action: ${action}. Use review | security-review | summarize.`);
7984
7984
  process.exit(1);
7985
7985
  }
7986
- const { runPrCli } = await import("./pr-KV2WK7SU.js");
7986
+ const { runPrCli } = await import("./pr-RRHV7P7D.js");
7987
7987
  const result = await runPrCli({
7988
7988
  action,
7989
7989
  target,
@@ -8003,8 +8003,8 @@ program.command("pr <action> [target]").description("PR review helpers: review |
8003
8003
  process.exit(result.exitCode);
8004
8004
  });
8005
8005
  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 or URL; diff fetched via gh pr diff <value>", (v) => /^#?\d+$/.test(v) ? parseInt(v.replace(/^#/, ""), 10) : v).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)").option("--json", "Output a structured JSON report").option("--markdown", "Output Markdown report (default)").option("--sarif", "Output SARIF 2.1.0 for code scanning artifacts").option("--fail-on-security-high", "Fail when the security review contains HIGH/CRITICAL findings (default)").option("--no-fail-on-security-high", "Do not fail on security HIGH/CRITICAL findings").option("--fail-on-test-failure", "Fail when the report mentions test failures (default)").option("--no-fail-on-test-failure", "Do not fail on test failure findings").option("--fail-on-lint-failure", "Fail when the report mentions lint/typecheck failures (default)").option("--no-fail-on-lint-failure", "Do not fail on lint/typecheck failure findings").action(async (options) => {
8006
- const { runCi } = await import("./ci-FYLCHRN3.js");
8007
- const { formatCiResult } = await import("./ci-format-TH2ZTFKU.js");
8006
+ const { runCi } = await import("./ci-HDGRBALH.js");
8007
+ const { formatCiResult } = await import("./ci-format-W6DDOFS7.js");
8008
8008
  const formats = [options.json, options.markdown, options.sarif].filter(Boolean).length;
8009
8009
  if (formats > 1) {
8010
8010
  console.error("Choose only one output format: --json, --markdown, or --sarif.");
@@ -8162,7 +8162,7 @@ program.command("hub [topic]").description("Start multi-agent hub (discuss / bra
8162
8162
  config.get("customProviders"),
8163
8163
  config.getConfigDir()
8164
8164
  );
8165
- const { startHub } = await import("./hub-QBQCKEPE.js");
8165
+ const { startHub } = await import("./hub-2WPMT242.js");
8166
8166
  await startHub(
8167
8167
  {
8168
8168
  topic: topic ?? "",
@@ -2,8 +2,8 @@
2
2
  import {
3
3
  countSeverity,
4
4
  runCi
5
- } from "./chunk-O4QYY6SF.js";
6
- import "./chunk-SCFGLRB3.js";
5
+ } from "./chunk-45TJA46E.js";
6
+ import "./chunk-J2M4GOFE.js";
7
7
  import {
8
8
  buildReviewPrompt,
9
9
  buildSecurityReviewPrompt,
@@ -15,11 +15,11 @@ import {
15
15
  import "./chunk-O3XSFPYH.js";
16
16
  import {
17
17
  ConfigManager
18
- } from "./chunk-VBAW4ZPY.js";
18
+ } from "./chunk-CSATDZ3Z.js";
19
19
  import "./chunk-5ULLIOVC.js";
20
20
  import {
21
21
  VERSION
22
- } from "./chunk-CGQARJMP.js";
22
+ } from "./chunk-25FKQO3A.js";
23
23
  import "./chunk-IW3Q7AE5.js";
24
24
 
25
25
  // src/cli/pr.ts
@@ -2,8 +2,8 @@
2
2
  import {
3
3
  executeTests,
4
4
  runTestsTool
5
- } from "./chunk-7VAE3I3D.js";
6
- import "./chunk-CGQARJMP.js";
5
+ } from "./chunk-6RU5AKXB.js";
6
+ import "./chunk-25FKQO3A.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-MFWAL5S2.js";
4
+ } from "./chunk-EG5P3AMC.js";
5
5
  export {
6
6
  executeTests,
7
7
  runTestsTool
@@ -23,7 +23,7 @@ import {
23
23
  scanDirTree,
24
24
  scanProject,
25
25
  setupProxy
26
- } from "./chunk-TT7YURG3.js";
26
+ } from "./chunk-KQJ55BTD.js";
27
27
  import {
28
28
  buildReviewPrompt,
29
29
  buildSecurityReviewPrompt
@@ -67,7 +67,7 @@ import {
67
67
  truncateOutput,
68
68
  undoStack,
69
69
  updateMemoryApproval
70
- } from "./chunk-SBSWH2EG.js";
70
+ } from "./chunk-WI4DN5FN.js";
71
71
  import "./chunk-K3CF65QH.js";
72
72
  import "./chunk-UUSRWSSX.js";
73
73
  import "./chunk-CKH4KQ4E.js";
@@ -84,7 +84,7 @@ import {
84
84
  buildDoctorReport,
85
85
  formatDoctorReport,
86
86
  loadContextFiles
87
- } from "./chunk-QDP3NUPX.js";
87
+ } from "./chunk-NAPAMAFY.js";
88
88
  import {
89
89
  ProviderRegistry
90
90
  } from "./chunk-QYQI7ZWK.js";
@@ -102,7 +102,7 @@ import {
102
102
  runTool,
103
103
  setPluginEnabled,
104
104
  trustPlugin
105
- } from "./chunk-T6EIBUKW.js";
105
+ } from "./chunk-MSK2BAKT.js";
106
106
  import {
107
107
  CONTENT_ONLY_STREAM_REMINDER,
108
108
  TEE_FINAL_USER_NUDGE,
@@ -121,7 +121,7 @@ import {
121
121
  } from "./chunk-O3XSFPYH.js";
122
122
  import {
123
123
  ConfigManager
124
- } from "./chunk-VBAW4ZPY.js";
124
+ } from "./chunk-CSATDZ3Z.js";
125
125
  import "./chunk-5ULLIOVC.js";
126
126
  import {
127
127
  formatGitContextForPrompt,
@@ -129,7 +129,7 @@ import {
129
129
  getGitRoot
130
130
  } from "./chunk-HOSJZMQS.js";
131
131
  import "./chunk-4BKXL7SM.js";
132
- import "./chunk-7VAE3I3D.js";
132
+ import "./chunk-6RU5AKXB.js";
133
133
  import {
134
134
  AGENTIC_BEHAVIOR_GUIDELINE,
135
135
  AUTHOR,
@@ -146,7 +146,7 @@ import {
146
146
  SKILLS_DIR_NAME,
147
147
  VERSION,
148
148
  buildUserIdentityPrompt
149
- } from "./chunk-CGQARJMP.js";
149
+ } from "./chunk-25FKQO3A.js";
150
150
  import "./chunk-5MYPIQ3Y.js";
151
151
  import "./chunk-KHYD3WXE.js";
152
152
  import {
@@ -1594,7 +1594,7 @@ async function handleSecurityReview(args, ctx) {
1594
1594
  async function handleTest(args, ctx) {
1595
1595
  ctx.send({ type: "info", message: "\u{1F9EA} Running tests..." });
1596
1596
  try {
1597
- const { executeTests } = await import("./run-tests-MEHC73SQ.js");
1597
+ const { executeTests } = await import("./run-tests-GP7ZMSAX.js");
1598
1598
  const argStr = args.join(" ").trim();
1599
1599
  let testArgs = {};
1600
1600
  if (argStr) {
@@ -1,14 +1,14 @@
1
1
  #!/usr/bin/env node
2
2
  import {
3
3
  ToolRegistry
4
- } from "./chunk-SBSWH2EG.js";
4
+ } from "./chunk-WI4DN5FN.js";
5
5
  import "./chunk-K3CF65QH.js";
6
6
  import "./chunk-UUSRWSSX.js";
7
7
  import "./chunk-CKH4KQ4E.js";
8
8
  import "./chunk-BXP6YZ2P.js";
9
9
  import {
10
10
  runTool
11
- } from "./chunk-T6EIBUKW.js";
11
+ } from "./chunk-MSK2BAKT.js";
12
12
  import {
13
13
  getDangerLevel,
14
14
  schemaToJsonSchema
@@ -16,10 +16,10 @@ import {
16
16
  import "./chunk-5ULLIOVC.js";
17
17
  import "./chunk-HOSJZMQS.js";
18
18
  import "./chunk-4BKXL7SM.js";
19
- import "./chunk-7VAE3I3D.js";
19
+ import "./chunk-6RU5AKXB.js";
20
20
  import {
21
21
  VERSION
22
- } from "./chunk-CGQARJMP.js";
22
+ } from "./chunk-25FKQO3A.js";
23
23
  import "./chunk-5MYPIQ3Y.js";
24
24
  import "./chunk-KHYD3WXE.js";
25
25
  import "./chunk-KCEO2XJ4.js";
@@ -3,14 +3,14 @@ import {
3
3
  ToolRegistry,
4
4
  googleSearchContext,
5
5
  truncateOutput
6
- } from "./chunk-SBSWH2EG.js";
6
+ } from "./chunk-WI4DN5FN.js";
7
7
  import "./chunk-K3CF65QH.js";
8
8
  import "./chunk-UUSRWSSX.js";
9
9
  import "./chunk-CKH4KQ4E.js";
10
10
  import "./chunk-BXP6YZ2P.js";
11
11
  import {
12
12
  runTool
13
- } from "./chunk-T6EIBUKW.js";
13
+ } from "./chunk-MSK2BAKT.js";
14
14
  import {
15
15
  getDangerLevel,
16
16
  runLeanAgentLoop
@@ -18,10 +18,10 @@ import {
18
18
  import "./chunk-5ULLIOVC.js";
19
19
  import "./chunk-HOSJZMQS.js";
20
20
  import "./chunk-4BKXL7SM.js";
21
- import "./chunk-7VAE3I3D.js";
21
+ import "./chunk-6RU5AKXB.js";
22
22
  import {
23
23
  SUBAGENT_ALLOWED_TOOLS
24
- } from "./chunk-CGQARJMP.js";
24
+ } from "./chunk-25FKQO3A.js";
25
25
  import "./chunk-5MYPIQ3Y.js";
26
26
  import "./chunk-KHYD3WXE.js";
27
27
  import "./chunk-KCEO2XJ4.js";
@@ -8,9 +8,9 @@ import {
8
8
  } from "./chunk-E44DTERW.js";
9
9
  import {
10
10
  ConfigManager
11
- } from "./chunk-VBAW4ZPY.js";
11
+ } from "./chunk-CSATDZ3Z.js";
12
12
  import "./chunk-5ULLIOVC.js";
13
- import "./chunk-CGQARJMP.js";
13
+ import "./chunk-25FKQO3A.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.236",
3
+ "version": "0.4.237",
4
4
  "description": "Cross-platform REPL-style AI CLI with multi-provider support",
5
5
  "type": "module",
6
6
  "main": "./dist/index.js",