jinzd-ai-cli 0.4.294 → 0.4.295

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-6YCLYEII.js → batch-3YJGOO27.js} +2 -2
  2. package/dist/{chunk-BOG6LVIC.js → chunk-4LQVBW2I.js} +1 -1
  3. package/dist/{chunk-7KYONZUN.js → chunk-4VYLPFZJ.js} +1 -1
  4. package/dist/{chunk-CUMSLQKQ.js → chunk-57OZ53J3.js} +1 -1
  5. package/dist/{chunk-HBFES3RR.js → chunk-5S6TUBTA.js} +4 -4
  6. package/dist/{chunk-P3BJAJ34.js → chunk-A6O7AMFD.js} +1 -1
  7. package/dist/{chunk-MMP6SIB7.js → chunk-EI5O25IE.js} +1 -1
  8. package/dist/{chunk-QKZUWT3S.js → chunk-FBOVBL7P.js} +12 -1
  9. package/dist/{chunk-ZBHRTOWC.js → chunk-NAMXORM7.js} +1 -1
  10. package/dist/{chunk-3H7TVTAE.js → chunk-OFRXL4RX.js} +1 -1
  11. package/dist/{chunk-FARHJ42Q.js → chunk-PE3A74UB.js} +4 -4
  12. package/dist/{chunk-OMA6DEAR.js → chunk-TZE5CEJZ.js} +1 -1
  13. package/dist/{chunk-AIQMQCVF.js → chunk-VJQOSTNU.js} +4 -4
  14. package/dist/{chunk-SM7VOJ3B.js → chunk-WYKSHBLL.js} +8 -8
  15. package/dist/{chunk-4J6R2VFW.js → chunk-YKJO3SI4.js} +33 -4
  16. package/dist/{chunk-UPJMIP5S.js → chunk-ZEITAL5P.js} +1 -1
  17. package/dist/{ci-SIS77LEG.js → ci-ANIX7GOB.js} +5 -5
  18. package/dist/{ci-format-LRMGY4ND.js → ci-format-PSAAKM7J.js} +2 -2
  19. package/dist/{constants-C7LOS6F4.js → constants-IMX6ST62.js} +1 -1
  20. package/dist/{constants-QRUMNMCK.js → constants-LUKORJS3.js} +1 -1
  21. package/dist/{doctor-cli-UB5KUBVI.js → doctor-cli-ALBAFMWO.js} +5 -5
  22. package/dist/electron-server.js +55 -15
  23. package/dist/{hub-UWBNCMD4.js → hub-YHUOMU6E.js} +1 -1
  24. package/dist/index.js +24 -23
  25. package/dist/{persistent-memory-TUCWY6O3.js → persistent-memory-M24MHHKF.js} +2 -2
  26. package/dist/{persistent-memory-GQPXSWDK.js → persistent-memory-QA46MVVY.js} +2 -2
  27. package/dist/{pr-MVUT6IOA.js → pr-656V2Z3H.js} +5 -5
  28. package/dist/{run-tests-RSIXZR3O.js → run-tests-JGKTKLMH.js} +2 -2
  29. package/dist/{run-tests-BNKQT42K.js → run-tests-PY4EEU2J.js} +2 -2
  30. package/dist/{server-YNVHKFGZ.js → server-G2IOJCTM.js} +5 -5
  31. package/dist/{server-ILSFJUK5.js → server-KBWU6U33.js} +15 -15
  32. package/dist/{task-orchestrator-7YEWEKS6.js → task-orchestrator-JNGGZIOX.js} +5 -5
  33. package/dist/{usage-DXX4VHOQ.js → usage-YBWBEOBO.js} +3 -3
  34. package/package.json +1 -1
@@ -4,12 +4,12 @@ import {
4
4
  } from "./chunk-RS7SKYTS.js";
5
5
  import {
6
6
  ConfigManager
7
- } from "./chunk-ZBHRTOWC.js";
7
+ } from "./chunk-NAMXORM7.js";
8
8
  import "./chunk-TU3L3PW7.js";
9
9
  import {
10
10
  atomicWriteFileSync
11
11
  } from "./chunk-IW3Q7AE5.js";
12
- import "./chunk-CUMSLQKQ.js";
12
+ import "./chunk-57OZ53J3.js";
13
13
 
14
14
  // src/cli/batch.ts
15
15
  import Anthropic from "@anthropic-ai/sdk";
@@ -8,7 +8,7 @@ import {
8
8
  import {
9
9
  CONFIG_DIR_NAME,
10
10
  PLUGINS_DIR_NAME
11
- } from "./chunk-CUMSLQKQ.js";
11
+ } from "./chunk-57OZ53J3.js";
12
12
 
13
13
  // src/diagnostics/tool-stats.ts
14
14
  import { mkdirSync } from "fs";
@@ -13,7 +13,7 @@ import {
13
13
  MEMORY_FILE_NAME,
14
14
  MEMORY_MAX_CHARS,
15
15
  MEMORY_STORE_FILE_NAME
16
- } from "./chunk-CUMSLQKQ.js";
16
+ } from "./chunk-57OZ53J3.js";
17
17
 
18
18
  // src/memory/persistent-memory.ts
19
19
  import { copyFileSync, existsSync, mkdirSync, readFileSync, statSync } 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.294";
4
+ var VERSION = "0.4.295";
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-3H7TVTAE.js";
5
+ } from "./chunk-OFRXL4RX.js";
6
6
  import {
7
7
  buildReviewPrompt,
8
8
  buildSecurityReviewPrompt,
@@ -13,13 +13,13 @@ import {
13
13
  } from "./chunk-6YZEZFX5.js";
14
14
  import {
15
15
  ProviderRegistry
16
- } from "./chunk-QKZUWT3S.js";
16
+ } from "./chunk-FBOVBL7P.js";
17
17
  import {
18
18
  ConfigManager
19
- } from "./chunk-ZBHRTOWC.js";
19
+ } from "./chunk-NAMXORM7.js";
20
20
  import {
21
21
  VERSION
22
- } from "./chunk-CUMSLQKQ.js";
22
+ } from "./chunk-57OZ53J3.js";
23
23
 
24
24
  // src/cli/ci.ts
25
25
  import { execFileSync } from "child_process";
@@ -12,7 +12,7 @@ import {
12
12
  MEMORY_FILE_NAME,
13
13
  MEMORY_MAX_CHARS,
14
14
  MEMORY_STORE_FILE_NAME
15
- } from "./chunk-UPJMIP5S.js";
15
+ } from "./chunk-ZEITAL5P.js";
16
16
 
17
17
  // src/memory/persistent-memory.ts
18
18
  import { copyFileSync, existsSync, mkdirSync, readFileSync, statSync } from "fs";
@@ -1,7 +1,7 @@
1
1
  #!/usr/bin/env node
2
2
  import {
3
3
  TEST_TIMEOUT
4
- } from "./chunk-CUMSLQKQ.js";
4
+ } from "./chunk-57OZ53J3.js";
5
5
 
6
6
  // src/tools/builtin/run-tests.ts
7
7
  import { execSync, spawnSync } from "child_process";
@@ -2061,7 +2061,18 @@ var OPENROUTER_CONFIG = {
2061
2061
  { id: "meta-llama/llama-4-maverick", displayName: "Llama 4 Maverick", contextWindow: 1048576, supportsStreaming: true },
2062
2062
  { id: "meta-llama/llama-4-scout", displayName: "Llama 4 Scout", contextWindow: 512e3, supportsStreaming: true },
2063
2063
  { id: "qwen/qwen3-coder", displayName: "Qwen3 Coder", contextWindow: 262144, supportsStreaming: true },
2064
- { id: "mistralai/mistral-large", displayName: "Mistral Large", contextWindow: 131072, supportsStreaming: true }
2064
+ { id: "mistralai/mistral-large", displayName: "Mistral Large", contextWindow: 131072, supportsStreaming: true },
2065
+ // ── 国产旗舰(2026-08-29 对 /api/v1/models 实测取回的真实 id、上下文与价格)──
2066
+ // 走 OpenRouter 的理由不只是"多一个入口":DeepSeek V4 Flash 在这里比直连国内**便宜一个
2067
+ // 数量级**(详见 pricing.ts 的对照注释)。id 一律 `vendor/model` 形式,与直连 provider
2068
+ // 的裸 id 不冲突。
2069
+ { id: "deepseek/deepseek-v4-flash-0731", displayName: "DeepSeek V4 Flash (0731) \u2014 \u6781\u5EC9\u4EF7, 1.31M", contextWindow: 1310720, supportsStreaming: true, supportsThinking: true },
2070
+ { id: "deepseek/deepseek-v4-pro-0813", displayName: "DeepSeek V4 Pro (0813), 1M", contextWindow: 1048576, supportsStreaming: true, supportsThinking: true },
2071
+ { id: "z-ai/glm-5.3-flash", displayName: "GLM-5.3 Flash (\u591A\u6A21\u6001, 1.31M)", contextWindow: 1310720, supportsStreaming: true, supportsThinking: true },
2072
+ { id: "z-ai/glm-5.3", displayName: "GLM-5.3 (\u65D7\u8230, 1.31M)", contextWindow: 1310720, supportsStreaming: true, supportsThinking: true },
2073
+ { id: "z-ai/glm-4.6", displayName: "GLM-4.6 (\u4E2D\u6587\u5199\u4F5C, 200K)", contextWindow: 204800, supportsStreaming: true },
2074
+ { id: "moonshotai/kimi-k3", displayName: "Kimi K3 (1M)", contextWindow: 1048576, supportsStreaming: true, supportsThinking: true },
2075
+ { id: "minimax/minimax-m3", displayName: "MiniMax M3 (1M)", contextWindow: 1048576, supportsStreaming: true }
2065
2076
  ]
2066
2077
  };
2067
2078
  var OpenRouterProvider = createStaticProviderClass(OPENROUTER_CONFIG);
@@ -11,7 +11,7 @@ import {
11
11
  CONFIG_FILE_NAME,
12
12
  HISTORY_DIR_NAME,
13
13
  PLUGINS_DIR_NAME
14
- } from "./chunk-CUMSLQKQ.js";
14
+ } from "./chunk-57OZ53J3.js";
15
15
 
16
16
  // src/config/config-manager.ts
17
17
  import { readFileSync, existsSync, mkdirSync } from "fs";
@@ -1,7 +1,7 @@
1
1
  #!/usr/bin/env node
2
2
  import {
3
3
  VERSION
4
- } from "./chunk-CUMSLQKQ.js";
4
+ } from "./chunk-57OZ53J3.js";
5
5
 
6
6
  // src/cli/ci-format.ts
7
7
  var DEFAULT_CI_THRESHOLDS = {
@@ -8,13 +8,13 @@ import {
8
8
  listHooks,
9
9
  listInstalledPlugins,
10
10
  resetStats
11
- } from "./chunk-BOG6LVIC.js";
11
+ } from "./chunk-4LQVBW2I.js";
12
12
  import {
13
13
  ProviderRegistry
14
- } from "./chunk-QKZUWT3S.js";
14
+ } from "./chunk-FBOVBL7P.js";
15
15
  import {
16
16
  ConfigManager
17
- } from "./chunk-ZBHRTOWC.js";
17
+ } from "./chunk-NAMXORM7.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-CUMSLQKQ.js";
29
+ } from "./chunk-57OZ53J3.js";
30
30
 
31
31
  // src/diagnostics/doctor-report.ts
32
32
  import { existsSync as existsSync3, statSync as statSync2 } from "fs";
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  TEST_TIMEOUT
3
- } from "./chunk-UPJMIP5S.js";
3
+ } from "./chunk-ZEITAL5P.js";
4
4
 
5
5
  // src/tools/builtin/run-tests.ts
6
6
  import { execSync, spawnSync } from "child_process";
@@ -11,7 +11,7 @@ import {
11
11
  searchPersistentMemories,
12
12
  touchMemoryReferences,
13
13
  updateMemoryEntry
14
- } from "./chunk-7KYONZUN.js";
14
+ } from "./chunk-4VYLPFZJ.js";
15
15
  import {
16
16
  indexProject
17
17
  } from "./chunk-4DEMGCK4.js";
@@ -30,7 +30,7 @@ import {
30
30
  runHook,
31
31
  runLifecycleHooks,
32
32
  runTool
33
- } from "./chunk-BOG6LVIC.js";
33
+ } from "./chunk-4LQVBW2I.js";
34
34
  import {
35
35
  buildTruncatedArgumentsError,
36
36
  getDangerLevel,
@@ -50,7 +50,7 @@ import {
50
50
  } from "./chunk-4BKXL7SM.js";
51
51
  import {
52
52
  runTestsTool
53
- } from "./chunk-MMP6SIB7.js";
53
+ } from "./chunk-EI5O25IE.js";
54
54
  import {
55
55
  CONFIG_DIR_NAME,
56
56
  DEFAULT_MAX_TOOL_OUTPUT_CHARS_CAP,
@@ -58,7 +58,7 @@ import {
58
58
  SUBAGENT_ALLOWED_TOOLS,
59
59
  SUBAGENT_DEFAULT_MAX_ROUNDS,
60
60
  SUBAGENT_MAX_ROUNDS_LIMIT
61
- } from "./chunk-CUMSLQKQ.js";
61
+ } from "./chunk-57OZ53J3.js";
62
62
 
63
63
  // src/tools/shell-pool.ts
64
64
  import { spawn as spawn2 } from "child_process";
@@ -2,7 +2,7 @@
2
2
  import {
3
3
  computeCost,
4
4
  formatCost
5
- } from "./chunk-4J6R2VFW.js";
5
+ } from "./chunk-YKJO3SI4.js";
6
6
  import {
7
7
  clearRecentlyDeniedAutoActions,
8
8
  estimateTokens,
@@ -16,7 +16,7 @@ import {
16
16
  setPreferredAgentName,
17
17
  truncateForPersist,
18
18
  undoStack
19
- } from "./chunk-AIQMQCVF.js";
19
+ } from "./chunk-VJQOSTNU.js";
20
20
  import {
21
21
  buildReviewPrompt,
22
22
  buildSecurityReviewPrompt
@@ -51,7 +51,7 @@ import {
51
51
  touchMemoryReferences,
52
52
  updateMemoryApproval,
53
53
  updateMemoryEntry
54
- } from "./chunk-7KYONZUN.js";
54
+ } from "./chunk-4VYLPFZJ.js";
55
55
  import {
56
56
  theme
57
57
  } from "./chunk-5C76XDDF.js";
@@ -65,7 +65,7 @@ import {
65
65
  import {
66
66
  buildDoctorReport,
67
67
  formatDoctorReport
68
- } from "./chunk-FARHJ42Q.js";
68
+ } from "./chunk-PE3A74UB.js";
69
69
  import {
70
70
  describePlugin,
71
71
  getActivePluginAssets,
@@ -80,7 +80,7 @@ import {
80
80
  trustHook,
81
81
  trustPlugin,
82
82
  untrustHook
83
- } from "./chunk-BOG6LVIC.js";
83
+ } from "./chunk-4LQVBW2I.js";
84
84
  import {
85
85
  isCleanDocumentBody,
86
86
  stripOuterCodeFence
@@ -109,7 +109,7 @@ import {
109
109
  MCP_TOOL_PREFIX,
110
110
  REPO_URL,
111
111
  VERSION
112
- } from "./chunk-CUMSLQKQ.js";
112
+ } from "./chunk-57OZ53J3.js";
113
113
 
114
114
  // src/mcp/client.ts
115
115
  import { spawn } from "child_process";
@@ -2393,7 +2393,7 @@ No tools match "${filter}".
2393
2393
  const { join: join6 } = await import("path");
2394
2394
  const { existsSync: existsSync6 } = await import("fs");
2395
2395
  const { getGitRoot } = await import("./git-context-EXOEHQSF.js");
2396
- const { MCP_PROJECT_CONFIG_NAME } = await import("./constants-C7LOS6F4.js");
2396
+ const { MCP_PROJECT_CONFIG_NAME } = await import("./constants-IMX6ST62.js");
2397
2397
  const { approveProject, hashMcpFile } = await import("./project-trust-NKYHL3VZ.js");
2398
2398
  const cwd = process.cwd();
2399
2399
  const projectRoot = getGitRoot(cwd) ?? cwd;
@@ -3497,7 +3497,7 @@ function createReviewCommands() {
3497
3497
  usage: "/test [command|filter]",
3498
3498
  async execute(args, ctx) {
3499
3499
  try {
3500
- const { executeTests } = await import("./run-tests-BNKQT42K.js");
3500
+ const { executeTests } = await import("./run-tests-PY4EEU2J.js");
3501
3501
  const argStr = args.join(" ").trim();
3502
3502
  let testArgs = {};
3503
3503
  if (argStr) {
@@ -113,14 +113,42 @@ var PRICING_TABLE = {
113
113
  "glm-5.1-air": { input: 0.4, output: 1.2 },
114
114
  "glm-z1": { input: 0.5, output: 1.5 },
115
115
  "glm-z1-air": { input: 0.2, output: 0.6 },
116
- "glm-z1-flash": { input: 0, output: 0 }
116
+ "glm-z1-flash": { input: 0, output: 0 },
117
117
  // ── MiniMax (海螺) ────────────────────────────────────────────
118
118
  // GAP (v0.4.184): MiniMax-M3 / M2.x are unpriced — no verified rate anchor yet.
119
119
  // Unpriced → `aicli usage` shows "—" (unknown), not a false $0.00. Add when confirmed.
120
120
  // ── OpenRouter (pass-through — actual cost depends on underlying model) ──
121
- // Left empty by design: model IDs are "vendor/model" (e.g. anthropic/claude-sonnet-4)
122
- // and the real price is set by the underlying model + OpenRouter markup, not statically
123
- // resolvable here. Shows "—" (unknown) in `aicli usage`.
121
+ // 绝大多数 id 仍**刻意留空**:真实价由底层模型 + OpenRouter 加价决定,静态表覆盖不了
122
+ // 396 个模型,未收录的照旧显示 "—"(未知)而不是假的 $0.00。
123
+ //
124
+ // 下面这批是 curated 列表里的国产旗舰,**2026-08-29 对 `/api/v1/models` 实测取回的一手
125
+ // 价格**(该端点直接返回每 token 单价,这里换算成每百万 token 的美元数)。收录它们是因为
126
+ // 东叔真的会用,而 `aicli usage` 记不到价就等于这条路的花费不进预算告警。
127
+ //
128
+ // ⚠ 这是**快照**,不是实时价:OpenRouter 的价格随底层供应商变动,且它自己就有多家供应商
129
+ // 轮转。偏差方向未知(不像智谱那次能靠"记恢复价"保证高估),故注明取数日期,发现明显不符
130
+ // 时以 `/api/v1/models` 为准重取。
131
+ //
132
+ // 与直连国内的对照(同一模型、同一天):
133
+ // deepseek-v4-flash-0731 直连闲时 $0.217/$0.652、峰时 $0.435/$1.304
134
+ // OpenRouter $0.045/$0.090 → **便宜约 5–14 倍**
135
+ // deepseek-v4-pro-0813 直连闲时 $0.652/$1.957 ≈ OpenRouter $0.660/$1.980(基本持平)
136
+ // 直连峰时 $1.304/$3.913 → OpenRouter 便宜约一半
137
+ // glm-5.3-flash 直连恢复价 $0.116/$0.406、5 折促销价 $0.058/$0.203
138
+ // OpenRouter $0.075/$0.250 → 比恢复价便宜、比促销价略贵
139
+ // kimi-k3 两边同价($3.00/$15.00)
140
+ "deepseek/deepseek-v4-flash-0731": { input: 0.045, output: 0.09 },
141
+ "deepseek/deepseek-v4-flash-0731:batch": { input: 0.14, output: 0.28 },
142
+ "deepseek/deepseek-v4-flash": { input: 0.086, output: 0.171 },
143
+ "deepseek/deepseek-v4-pro-0813": { input: 0.66, output: 1.98 },
144
+ "deepseek/deepseek-v4-pro-0813:batch": { input: 1.32, output: 3.96 },
145
+ "deepseek/deepseek-v4-pro": { input: 0.701, output: 1.402 },
146
+ "z-ai/glm-5.3-flash": { input: 0.075, output: 0.25 },
147
+ "z-ai/glm-5.3-flash:batch": { input: 0.15, output: 0.5 },
148
+ "z-ai/glm-5.3": { input: 1.4, output: 4.4 },
149
+ "z-ai/glm-4.6": { input: 0.43, output: 1.75 },
150
+ "moonshotai/kimi-k3": { input: 3, output: 15 },
151
+ "minimax/minimax-m3": { input: 0.3, output: 1.2 }
124
152
  // ── Ollama (local, zero cost) ─────────────────────────────────
125
153
  // Handled via provider check below (FREE_PROVIDERS → genuine $0.00, not "unknown").
126
154
  };
@@ -130,6 +158,7 @@ function getPricing(provider, model, at = /* @__PURE__ */ new Date()) {
130
158
  return { input: 0, output: 0 };
131
159
  }
132
160
  const key = model.toLowerCase();
161
+ if (key.endsWith(":free")) return { input: 0, output: 0 };
133
162
  if (provider.toLowerCase() === "deepseek") {
134
163
  const dynamicPricing = getDeepSeekV4Pricing(key, at);
135
164
  if (dynamicPricing) return dynamicPricing;
@@ -1,5 +1,5 @@
1
1
  // src/core/constants.ts
2
- var VERSION = "0.4.294";
2
+ var VERSION = "0.4.295";
3
3
  var APP_NAME = "ai-cli";
4
4
  var CONFIG_DIR_NAME = ".aicli";
5
5
  var CONFIG_FILE_NAME = "config.json";
@@ -3,16 +3,16 @@ import {
3
3
  CI_COMMENT_MARKER,
4
4
  countSeverity,
5
5
  runCi
6
- } from "./chunk-HBFES3RR.js";
7
- import "./chunk-3H7TVTAE.js";
6
+ } from "./chunk-5S6TUBTA.js";
7
+ import "./chunk-OFRXL4RX.js";
8
8
  import "./chunk-HLWUDRBO.js";
9
9
  import "./chunk-6YZEZFX5.js";
10
- import "./chunk-QKZUWT3S.js";
11
- import "./chunk-ZBHRTOWC.js";
10
+ import "./chunk-FBOVBL7P.js";
11
+ import "./chunk-NAMXORM7.js";
12
12
  import "./chunk-Y56UGZPX.js";
13
13
  import "./chunk-TU3L3PW7.js";
14
14
  import "./chunk-IW3Q7AE5.js";
15
- import "./chunk-CUMSLQKQ.js";
15
+ import "./chunk-57OZ53J3.js";
16
16
  export {
17
17
  CI_COMMENT_MARKER,
18
18
  countSeverity,
@@ -6,8 +6,8 @@ import {
6
6
  formatCiResult,
7
7
  formatCiSarif,
8
8
  normalizeCiThresholds
9
- } from "./chunk-3H7TVTAE.js";
10
- import "./chunk-CUMSLQKQ.js";
9
+ } from "./chunk-OFRXL4RX.js";
10
+ import "./chunk-57OZ53J3.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-CUMSLQKQ.js";
41
+ } from "./chunk-57OZ53J3.js";
42
42
  export {
43
43
  AGENTIC_BEHAVIOR_GUIDELINE,
44
44
  APP_NAME,
@@ -37,7 +37,7 @@ import {
37
37
  TEST_TIMEOUT,
38
38
  VERSION,
39
39
  buildUserIdentityPrompt
40
- } from "./chunk-UPJMIP5S.js";
40
+ } from "./chunk-ZEITAL5P.js";
41
41
  export {
42
42
  AGENTIC_BEHAVIOR_GUIDELINE,
43
43
  APP_NAME,
@@ -2,16 +2,16 @@
2
2
  import {
3
3
  formatDoctorReport,
4
4
  runDoctorCli
5
- } from "./chunk-FARHJ42Q.js";
6
- import "./chunk-BOG6LVIC.js";
5
+ } from "./chunk-PE3A74UB.js";
6
+ import "./chunk-4LQVBW2I.js";
7
7
  import "./chunk-RS7SKYTS.js";
8
- import "./chunk-QKZUWT3S.js";
9
- import "./chunk-ZBHRTOWC.js";
8
+ import "./chunk-FBOVBL7P.js";
9
+ import "./chunk-NAMXORM7.js";
10
10
  import "./chunk-Y56UGZPX.js";
11
11
  import "./chunk-TU3L3PW7.js";
12
12
  import "./chunk-HOSJZMQS.js";
13
13
  import "./chunk-IW3Q7AE5.js";
14
- import "./chunk-CUMSLQKQ.js";
14
+ import "./chunk-57OZ53J3.js";
15
15
  export {
16
16
  formatDoctorReport,
17
17
  runDoctorCli
@@ -50,7 +50,7 @@ import {
50
50
  touchMemoryReferences,
51
51
  updateMemoryApproval,
52
52
  updateMemoryEntry
53
- } from "./chunk-P3BJAJ34.js";
53
+ } from "./chunk-A6O7AMFD.js";
54
54
  import {
55
55
  DEFAULT_PATTERNS,
56
56
  redactJson,
@@ -66,7 +66,7 @@ import {
66
66
  } from "./chunk-CGLYJRFA.js";
67
67
  import {
68
68
  runTestsTool
69
- } from "./chunk-OMA6DEAR.js";
69
+ } from "./chunk-TZE5CEJZ.js";
70
70
  import {
71
71
  AGENTIC_BEHAVIOR_GUIDELINE,
72
72
  APP_NAME,
@@ -100,7 +100,7 @@ import {
100
100
  SUBAGENT_MAX_ROUNDS_LIMIT,
101
101
  VERSION,
102
102
  buildUserIdentityPrompt
103
- } from "./chunk-UPJMIP5S.js";
103
+ } from "./chunk-ZEITAL5P.js";
104
104
 
105
105
  // src/web/server.ts
106
106
  import express from "express";
@@ -882,14 +882,42 @@ var PRICING_TABLE = {
882
882
  "glm-5.1-air": { input: 0.4, output: 1.2 },
883
883
  "glm-z1": { input: 0.5, output: 1.5 },
884
884
  "glm-z1-air": { input: 0.2, output: 0.6 },
885
- "glm-z1-flash": { input: 0, output: 0 }
885
+ "glm-z1-flash": { input: 0, output: 0 },
886
886
  // ── MiniMax (海螺) ────────────────────────────────────────────
887
887
  // GAP (v0.4.184): MiniMax-M3 / M2.x are unpriced — no verified rate anchor yet.
888
888
  // Unpriced → `aicli usage` shows "—" (unknown), not a false $0.00. Add when confirmed.
889
889
  // ── OpenRouter (pass-through — actual cost depends on underlying model) ──
890
- // Left empty by design: model IDs are "vendor/model" (e.g. anthropic/claude-sonnet-4)
891
- // and the real price is set by the underlying model + OpenRouter markup, not statically
892
- // resolvable here. Shows "—" (unknown) in `aicli usage`.
890
+ // 绝大多数 id 仍**刻意留空**:真实价由底层模型 + OpenRouter 加价决定,静态表覆盖不了
891
+ // 396 个模型,未收录的照旧显示 "—"(未知)而不是假的 $0.00。
892
+ //
893
+ // 下面这批是 curated 列表里的国产旗舰,**2026-08-29 对 `/api/v1/models` 实测取回的一手
894
+ // 价格**(该端点直接返回每 token 单价,这里换算成每百万 token 的美元数)。收录它们是因为
895
+ // 东叔真的会用,而 `aicli usage` 记不到价就等于这条路的花费不进预算告警。
896
+ //
897
+ // ⚠ 这是**快照**,不是实时价:OpenRouter 的价格随底层供应商变动,且它自己就有多家供应商
898
+ // 轮转。偏差方向未知(不像智谱那次能靠"记恢复价"保证高估),故注明取数日期,发现明显不符
899
+ // 时以 `/api/v1/models` 为准重取。
900
+ //
901
+ // 与直连国内的对照(同一模型、同一天):
902
+ // deepseek-v4-flash-0731 直连闲时 $0.217/$0.652、峰时 $0.435/$1.304
903
+ // OpenRouter $0.045/$0.090 → **便宜约 5–14 倍**
904
+ // deepseek-v4-pro-0813 直连闲时 $0.652/$1.957 ≈ OpenRouter $0.660/$1.980(基本持平)
905
+ // 直连峰时 $1.304/$3.913 → OpenRouter 便宜约一半
906
+ // glm-5.3-flash 直连恢复价 $0.116/$0.406、5 折促销价 $0.058/$0.203
907
+ // OpenRouter $0.075/$0.250 → 比恢复价便宜、比促销价略贵
908
+ // kimi-k3 两边同价($3.00/$15.00)
909
+ "deepseek/deepseek-v4-flash-0731": { input: 0.045, output: 0.09 },
910
+ "deepseek/deepseek-v4-flash-0731:batch": { input: 0.14, output: 0.28 },
911
+ "deepseek/deepseek-v4-flash": { input: 0.086, output: 0.171 },
912
+ "deepseek/deepseek-v4-pro-0813": { input: 0.66, output: 1.98 },
913
+ "deepseek/deepseek-v4-pro-0813:batch": { input: 1.32, output: 3.96 },
914
+ "deepseek/deepseek-v4-pro": { input: 0.701, output: 1.402 },
915
+ "z-ai/glm-5.3-flash": { input: 0.075, output: 0.25 },
916
+ "z-ai/glm-5.3-flash:batch": { input: 0.15, output: 0.5 },
917
+ "z-ai/glm-5.3": { input: 1.4, output: 4.4 },
918
+ "z-ai/glm-4.6": { input: 0.43, output: 1.75 },
919
+ "moonshotai/kimi-k3": { input: 3, output: 15 },
920
+ "minimax/minimax-m3": { input: 0.3, output: 1.2 }
893
921
  // ── Ollama (local, zero cost) ─────────────────────────────────
894
922
  // Handled via provider check below (FREE_PROVIDERS → genuine $0.00, not "unknown").
895
923
  };
@@ -899,6 +927,7 @@ function getPricing(provider, model, at = /* @__PURE__ */ new Date()) {
899
927
  return { input: 0, output: 0 };
900
928
  }
901
929
  const key = model.toLowerCase();
930
+ if (key.endsWith(":free")) return { input: 0, output: 0 };
902
931
  if (provider.toLowerCase() === "deepseek") {
903
932
  const dynamicPricing = getDeepSeekV4Pricing(key, at);
904
933
  if (dynamicPricing) return dynamicPricing;
@@ -4425,7 +4454,18 @@ var OPENROUTER_CONFIG = {
4425
4454
  { id: "meta-llama/llama-4-maverick", displayName: "Llama 4 Maverick", contextWindow: 1048576, supportsStreaming: true },
4426
4455
  { id: "meta-llama/llama-4-scout", displayName: "Llama 4 Scout", contextWindow: 512e3, supportsStreaming: true },
4427
4456
  { id: "qwen/qwen3-coder", displayName: "Qwen3 Coder", contextWindow: 262144, supportsStreaming: true },
4428
- { id: "mistralai/mistral-large", displayName: "Mistral Large", contextWindow: 131072, supportsStreaming: true }
4457
+ { id: "mistralai/mistral-large", displayName: "Mistral Large", contextWindow: 131072, supportsStreaming: true },
4458
+ // ── 国产旗舰(2026-08-29 对 /api/v1/models 实测取回的真实 id、上下文与价格)──
4459
+ // 走 OpenRouter 的理由不只是"多一个入口":DeepSeek V4 Flash 在这里比直连国内**便宜一个
4460
+ // 数量级**(详见 pricing.ts 的对照注释)。id 一律 `vendor/model` 形式,与直连 provider
4461
+ // 的裸 id 不冲突。
4462
+ { id: "deepseek/deepseek-v4-flash-0731", displayName: "DeepSeek V4 Flash (0731) \u2014 \u6781\u5EC9\u4EF7, 1.31M", contextWindow: 1310720, supportsStreaming: true, supportsThinking: true },
4463
+ { id: "deepseek/deepseek-v4-pro-0813", displayName: "DeepSeek V4 Pro (0813), 1M", contextWindow: 1048576, supportsStreaming: true, supportsThinking: true },
4464
+ { id: "z-ai/glm-5.3-flash", displayName: "GLM-5.3 Flash (\u591A\u6A21\u6001, 1.31M)", contextWindow: 1310720, supportsStreaming: true, supportsThinking: true },
4465
+ { id: "z-ai/glm-5.3", displayName: "GLM-5.3 (\u65D7\u8230, 1.31M)", contextWindow: 1310720, supportsStreaming: true, supportsThinking: true },
4466
+ { id: "z-ai/glm-4.6", displayName: "GLM-4.6 (\u4E2D\u6587\u5199\u4F5C, 200K)", contextWindow: 204800, supportsStreaming: true },
4467
+ { id: "moonshotai/kimi-k3", displayName: "Kimi K3 (1M)", contextWindow: 1048576, supportsStreaming: true, supportsThinking: true },
4468
+ { id: "minimax/minimax-m3", displayName: "MiniMax M3 (1M)", contextWindow: 1048576, supportsStreaming: true }
4429
4469
  ]
4430
4470
  };
4431
4471
  var OpenRouterProvider = createStaticProviderClass(OPENROUTER_CONFIG);
@@ -16921,7 +16961,7 @@ Cache: write=${cacheCreate} read=${cacheRead}` : "";
16921
16961
  Cost: ${formatCost(cost)}` : "";
16922
16962
  let memoryLine = "";
16923
16963
  try {
16924
- const { countPendingMemories: countPendingMemories2 } = await import("./persistent-memory-TUCWY6O3.js");
16964
+ const { countPendingMemories: countPendingMemories2 } = await import("./persistent-memory-M24MHHKF.js");
16925
16965
  const pending = countPendingMemories2(ctx.config.getConfigDir());
16926
16966
  if (pending > 0) memoryLine = `
16927
16967
  Memory: \u26A0 ${pending} pending approval \u2014 see the Memory panel or /memory`;
@@ -17904,7 +17944,7 @@ async function handleTest(args, ctx) {
17904
17944
  const isCommand = argStr.includes(" ") || /^(mvn|gradle|npm|pytest|cargo|go)\b/.test(argStr);
17905
17945
  testArgs = isCommand ? { command: argStr } : { filter: argStr };
17906
17946
  }
17907
- const runTests = ctx.runTests ?? (await import("./run-tests-RSIXZR3O.js")).executeTests;
17947
+ const runTests = ctx.runTests ?? (await import("./run-tests-JGKTKLMH.js")).executeTests;
17908
17948
  const report = await runTests(testArgs);
17909
17949
  ctx.send({ type: "info", message: report });
17910
17950
  } catch (err) {
@@ -18294,7 +18334,7 @@ async function handleMemory(args, ctx) {
18294
18334
  }
18295
18335
  if (intent.kind === "status") {
18296
18336
  const { getChatIndexStatus: getChatIndexStatus2 } = await import("./chat-index-DGUOUUQW.js");
18297
- const { listMemoryEntries: listMemoryEntries2, isMemoryExpired: isMemoryExpired2, formatMemoryForPrompt: formatMemoryForPrompt2 } = await import("./persistent-memory-TUCWY6O3.js");
18337
+ const { listMemoryEntries: listMemoryEntries2, isMemoryExpired: isMemoryExpired2, formatMemoryForPrompt: formatMemoryForPrompt2 } = await import("./persistent-memory-M24MHHKF.js");
18298
18338
  const memories = listMemoryEntries2(configDir, { includeExpired: true, includeRejected: true });
18299
18339
  const injected = formatMemoryForPrompt2(configDir, process.cwd(), ctx.config.get("memory")?.maxChars);
18300
18340
  const view = buildMemoryStatusView({
@@ -18317,7 +18357,7 @@ async function handleMemory(args, ctx) {
18317
18357
  return;
18318
18358
  }
18319
18359
  if (intent.kind === "recall") {
18320
- const { searchPersistentMemories: searchPersistentMemories2, touchMemoryReferences: touchMemoryReferences2 } = await import("./persistent-memory-TUCWY6O3.js");
18360
+ const { searchPersistentMemories: searchPersistentMemories2, touchMemoryReferences: touchMemoryReferences2 } = await import("./persistent-memory-M24MHHKF.js");
18321
18361
  const { searchChatMemory: searchChatMemory2 } = await import("./chat-index-DGUOUUQW.js");
18322
18362
  const persistentHits = searchPersistentMemories2(configDir, intent.query, process.cwd(), 3);
18323
18363
  if (persistentHits.length > 0) {
@@ -18438,7 +18478,7 @@ async function handleMemory(args, ctx) {
18438
18478
  ctx.handleMemoryManage(intent.action, args[1], intent.action === "expire" ? args[2] : void 0);
18439
18479
  } else if (intent.kind === "export") {
18440
18480
  if (args[1] === "md") {
18441
- const { exportMemoryEntries: exportMemoryEntries2 } = await import("./persistent-memory-TUCWY6O3.js");
18481
+ const { exportMemoryEntries: exportMemoryEntries2 } = await import("./persistent-memory-M24MHHKF.js");
18442
18482
  ctx.send({
18443
18483
  type: "export_data",
18444
18484
  format: "md",
@@ -19443,7 +19483,7 @@ No tools match "${filter}".
19443
19483
  const { join: join29 } = await import("path");
19444
19484
  const { existsSync: existsSync33 } = await import("fs");
19445
19485
  const { getGitRoot: getGitRoot2 } = await import("./git-context-VNCA2GU7.js");
19446
- const { MCP_PROJECT_CONFIG_NAME: MCP_PROJECT_CONFIG_NAME2 } = await import("./constants-QRUMNMCK.js");
19486
+ const { MCP_PROJECT_CONFIG_NAME: MCP_PROJECT_CONFIG_NAME2 } = await import("./constants-LUKORJS3.js");
19447
19487
  const { approveProject, hashMcpFile } = await import("./project-trust-MUG325AW.js");
19448
19488
  const cwd = process.cwd();
19449
19489
  const projectRoot = getGitRoot2(cwd) ?? cwd;
@@ -20358,7 +20398,7 @@ function createReviewCommands() {
20358
20398
  usage: "/test [command|filter]",
20359
20399
  async execute(args, ctx) {
20360
20400
  try {
20361
- const { executeTests } = await import("./run-tests-RSIXZR3O.js");
20401
+ const { executeTests } = await import("./run-tests-JGKTKLMH.js");
20362
20402
  const argStr = args.join(" ").trim();
20363
20403
  let testArgs = {};
20364
20404
  if (argStr) {
@@ -158,7 +158,7 @@ ${content}`);
158
158
  }
159
159
  }
160
160
  async function runTaskMode(config, providers, configManager, topic) {
161
- const { TaskOrchestrator } = await import("./task-orchestrator-7YEWEKS6.js");
161
+ const { TaskOrchestrator } = await import("./task-orchestrator-JNGGZIOX.js");
162
162
  const orchestrator = new TaskOrchestrator(config, providers, configManager);
163
163
  let interrupted = false;
164
164
  const onSigint = () => {
package/dist/index.js CHANGED
@@ -24,12 +24,12 @@ import {
24
24
  setupProxy,
25
25
  snapshotFile,
26
26
  stripRoutingTags
27
- } from "./chunk-SM7VOJ3B.js";
27
+ } from "./chunk-WYKSHBLL.js";
28
28
  import {
29
29
  CostTracker,
30
30
  getPricing,
31
31
  setCostCurrency
32
- } from "./chunk-4J6R2VFW.js";
32
+ } from "./chunk-YKJO3SI4.js";
33
33
  import {
34
34
  ToolExecutor,
35
35
  ToolRegistry,
@@ -49,7 +49,7 @@ import {
49
49
  setMaxOutputCap,
50
50
  spawnAgentContext,
51
51
  undoStack
52
- } from "./chunk-AIQMQCVF.js";
52
+ } from "./chunk-VJQOSTNU.js";
53
53
  import "./chunk-HLWUDRBO.js";
54
54
  import {
55
55
  NO_THINKING,
@@ -62,7 +62,7 @@ import {
62
62
  countPendingMemories,
63
63
  detectStaleLegacyMarkdownEdit,
64
64
  formatMemoryForPrompt
65
- } from "./chunk-7KYONZUN.js";
65
+ } from "./chunk-4VYLPFZJ.js";
66
66
  import "./chunk-4DEMGCK4.js";
67
67
  import "./chunk-UUSRWSSX.js";
68
68
  import "./chunk-CKH4KQ4E.js";
@@ -83,22 +83,22 @@ import {
83
83
  import {
84
84
  loadContextFiles,
85
85
  writeCrashLog
86
- } from "./chunk-FARHJ42Q.js";
86
+ } from "./chunk-PE3A74UB.js";
87
87
  import {
88
88
  getActivePluginAssets,
89
89
  getPendingHookTrust,
90
90
  installFlushOnExit,
91
91
  mergePluginHooks,
92
92
  runLifecycleHooks
93
- } from "./chunk-BOG6LVIC.js";
93
+ } from "./chunk-4LQVBW2I.js";
94
94
  import "./chunk-RS7SKYTS.js";
95
95
  import {
96
96
  ProviderRegistry,
97
97
  listBuiltInProviderMetadata
98
- } from "./chunk-QKZUWT3S.js";
98
+ } from "./chunk-FBOVBL7P.js";
99
99
  import {
100
100
  ConfigManager
101
- } from "./chunk-ZBHRTOWC.js";
101
+ } from "./chunk-NAMXORM7.js";
102
102
  import {
103
103
  CONTENT_ONLY_STREAM_REMINDER,
104
104
  TEE_FINAL_USER_NUDGE,
@@ -132,7 +132,7 @@ import {
132
132
  } from "./chunk-IW3Q7AE5.js";
133
133
  import "./chunk-XNFIYS7G.js";
134
134
  import "./chunk-4BKXL7SM.js";
135
- import "./chunk-MMP6SIB7.js";
135
+ import "./chunk-EI5O25IE.js";
136
136
  import {
137
137
  AGENTIC_BEHAVIOR_GUIDELINE,
138
138
  AUTHOR,
@@ -149,7 +149,7 @@ import {
149
149
  SKILLS_DIR_NAME,
150
150
  VERSION,
151
151
  buildUserIdentityPrompt
152
- } from "./chunk-CUMSLQKQ.js";
152
+ } from "./chunk-57OZ53J3.js";
153
153
 
154
154
  // src/index.ts
155
155
  import { program } from "commander";
@@ -1067,12 +1067,13 @@ ${content}
1067
1067
 
1068
1068
  // src/repl/vision-hint.ts
1069
1069
  function getVisionModelHint(model, provider) {
1070
+ const bare = model.includes("/") ? model.slice(model.lastIndexOf("/") + 1) : model;
1070
1071
  if (provider === "claude") return null;
1071
1072
  if (provider === "gemini") return null;
1072
- if (model.includes("vision") || model.includes("vl") || model.includes("5v") || // glm-5v-turbo
1073
- model.endsWith(".6v") || // glm-4.6v
1074
- model === "glm-5.3-flash" || // GLM-5 系列首个原生多模态(名字里没有 v,得单独认)
1075
- model.endsWith("-v")) return null;
1073
+ if (bare.includes("vision") || bare.includes("vl") || bare.includes("5v") || // glm-5v-turbo
1074
+ bare.endsWith(".6v") || // glm-4.6v
1075
+ bare === "glm-5.3-flash" || // GLM-5 系列首个原生多模态(名字里没有 v,得单独认)
1076
+ bare.endsWith("-v")) return null;
1076
1077
  if (provider === "kimi") {
1077
1078
  if (model.startsWith("moonshot-v1-")) {
1078
1079
  const visionModel = model + "-vision-preview";
@@ -4004,7 +4005,7 @@ program.command("web").description("Start Web UI server with browser-based chat
4004
4005
  console.error("Error: Invalid port number. Must be between 1 and 65535.");
4005
4006
  process.exit(1);
4006
4007
  }
4007
- const { startWebServer } = await import("./server-ILSFJUK5.js");
4008
+ const { startWebServer } = await import("./server-KBWU6U33.js");
4008
4009
  await startWebServer({ port, host: options.host });
4009
4010
  });
4010
4011
  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) => {
@@ -4171,11 +4172,11 @@ program.command("sessions").description("List recent conversation sessions").opt
4171
4172
  console.log(footer + "\n");
4172
4173
  });
4173
4174
  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) => {
4174
- const { runUsageCli } = await import("./usage-DXX4VHOQ.js");
4175
+ const { runUsageCli } = await import("./usage-YBWBEOBO.js");
4175
4176
  await runUsageCli(options);
4176
4177
  });
4177
4178
  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) => {
4178
- const { runDoctorCli } = await import("./doctor-cli-UB5KUBVI.js");
4179
+ const { runDoctorCli } = await import("./doctor-cli-ALBAFMWO.js");
4179
4180
  const argv = process.argv.slice(2);
4180
4181
  await runDoctorCli({
4181
4182
  json: !!options.json || argv.includes("--json"),
@@ -4184,7 +4185,7 @@ program.command("doctor").description("Health check: API keys, config, MCP, rece
4184
4185
  });
4185
4186
  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) => {
4186
4187
  try {
4187
- const batch = await import("./batch-6YCLYEII.js");
4188
+ const batch = await import("./batch-3YJGOO27.js");
4188
4189
  switch (action) {
4189
4190
  case "submit":
4190
4191
  if (!arg) {
@@ -4227,7 +4228,7 @@ program.command("batch <action> [arg] [arg2]").description("Anthropic Message Ba
4227
4228
  }
4228
4229
  });
4229
4230
  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) => {
4230
- const { startMcpServer } = await import("./server-YNVHKFGZ.js");
4231
+ const { startMcpServer } = await import("./server-G2IOJCTM.js");
4231
4232
  await startMcpServer({
4232
4233
  allowDestructive: !!options.allowDestructive,
4233
4234
  allowOutsideCwd: !!options.allowOutsideCwd,
@@ -4240,7 +4241,7 @@ program.command("pr <action> [target]").description("PR review helpers: review |
4240
4241
  console.error(`Unknown pr action: ${action}. Use review | security-review | summarize.`);
4241
4242
  process.exit(1);
4242
4243
  }
4243
- const { runPrCli } = await import("./pr-MVUT6IOA.js");
4244
+ const { runPrCli } = await import("./pr-656V2Z3H.js");
4244
4245
  const result = await runPrCli({
4245
4246
  action,
4246
4247
  target,
@@ -4260,8 +4261,8 @@ program.command("pr <action> [target]").description("PR review helpers: review |
4260
4261
  process.exit(result.exitCode);
4261
4262
  });
4262
4263
  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) => {
4263
- const { runCi } = await import("./ci-SIS77LEG.js");
4264
- const { formatCiResult } = await import("./ci-format-LRMGY4ND.js");
4264
+ const { runCi } = await import("./ci-ANIX7GOB.js");
4265
+ const { formatCiResult } = await import("./ci-format-PSAAKM7J.js");
4265
4266
  const formats = [options.json, options.markdown, options.sarif].filter(Boolean).length;
4266
4267
  if (formats > 1) {
4267
4268
  console.error("Choose only one output format: --json, --markdown, or --sarif.");
@@ -4420,7 +4421,7 @@ program.command("hub [topic]").description("Start multi-agent hub (discuss / bra
4420
4421
  config.get("customProviders"),
4421
4422
  config.getConfigDir()
4422
4423
  );
4423
- const { startHub } = await import("./hub-UWBNCMD4.js");
4424
+ const { startHub } = await import("./hub-YHUOMU6E.js");
4424
4425
  await startHub(
4425
4426
  {
4426
4427
  topic: topic ?? "",
@@ -27,11 +27,11 @@ import {
27
27
  touchMemoryReferences,
28
28
  updateMemoryApproval,
29
29
  updateMemoryEntry
30
- } from "./chunk-P3BJAJ34.js";
30
+ } from "./chunk-A6O7AMFD.js";
31
31
  import "./chunk-FSC6KEWU.js";
32
32
  import "./chunk-6BUTA5VW.js";
33
33
  import "./chunk-CGLYJRFA.js";
34
- import "./chunk-UPJMIP5S.js";
34
+ import "./chunk-ZEITAL5P.js";
35
35
  export {
36
36
  addMemoryEntry,
37
37
  backupMemoryStore,
@@ -28,11 +28,11 @@ import {
28
28
  touchMemoryReferences,
29
29
  updateMemoryApproval,
30
30
  updateMemoryEntry
31
- } from "./chunk-7KYONZUN.js";
31
+ } from "./chunk-4VYLPFZJ.js";
32
32
  import "./chunk-3FEZSLGI.js";
33
33
  import "./chunk-HOSJZMQS.js";
34
34
  import "./chunk-IW3Q7AE5.js";
35
- import "./chunk-CUMSLQKQ.js";
35
+ import "./chunk-57OZ53J3.js";
36
36
  export {
37
37
  addMemoryEntry,
38
38
  backupMemoryStore,
@@ -2,8 +2,8 @@
2
2
  import {
3
3
  countSeverity,
4
4
  runCi
5
- } from "./chunk-HBFES3RR.js";
6
- import "./chunk-3H7TVTAE.js";
5
+ } from "./chunk-5S6TUBTA.js";
6
+ import "./chunk-OFRXL4RX.js";
7
7
  import {
8
8
  buildReviewPrompt,
9
9
  buildSecurityReviewPrompt,
@@ -14,16 +14,16 @@ import {
14
14
  } from "./chunk-6YZEZFX5.js";
15
15
  import {
16
16
  ProviderRegistry
17
- } from "./chunk-QKZUWT3S.js";
17
+ } from "./chunk-FBOVBL7P.js";
18
18
  import {
19
19
  ConfigManager
20
- } from "./chunk-ZBHRTOWC.js";
20
+ } from "./chunk-NAMXORM7.js";
21
21
  import "./chunk-Y56UGZPX.js";
22
22
  import "./chunk-TU3L3PW7.js";
23
23
  import "./chunk-IW3Q7AE5.js";
24
24
  import {
25
25
  VERSION
26
- } from "./chunk-CUMSLQKQ.js";
26
+ } from "./chunk-57OZ53J3.js";
27
27
 
28
28
  // src/cli/pr.ts
29
29
  import { execFileSync } from "child_process";
@@ -1,8 +1,8 @@
1
1
  import {
2
2
  executeTests,
3
3
  runTestsTool
4
- } from "./chunk-OMA6DEAR.js";
5
- import "./chunk-UPJMIP5S.js";
4
+ } from "./chunk-TZE5CEJZ.js";
5
+ import "./chunk-ZEITAL5P.js";
6
6
  export {
7
7
  executeTests,
8
8
  runTestsTool
@@ -2,8 +2,8 @@
2
2
  import {
3
3
  executeTests,
4
4
  runTestsTool
5
- } from "./chunk-MMP6SIB7.js";
6
- import "./chunk-CUMSLQKQ.js";
5
+ } from "./chunk-EI5O25IE.js";
6
+ import "./chunk-57OZ53J3.js";
7
7
  export {
8
8
  executeTests,
9
9
  runTestsTool
@@ -1,9 +1,9 @@
1
1
  #!/usr/bin/env node
2
2
  import {
3
3
  ToolRegistry
4
- } from "./chunk-AIQMQCVF.js";
4
+ } from "./chunk-VJQOSTNU.js";
5
5
  import "./chunk-GHWZVPUV.js";
6
- import "./chunk-7KYONZUN.js";
6
+ import "./chunk-4VYLPFZJ.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-BOG6LVIC.js";
17
+ } from "./chunk-4LQVBW2I.js";
18
18
  import "./chunk-RS7SKYTS.js";
19
19
  import {
20
20
  getDangerLevel,
@@ -24,10 +24,10 @@ import "./chunk-TU3L3PW7.js";
24
24
  import "./chunk-HOSJZMQS.js";
25
25
  import "./chunk-IW3Q7AE5.js";
26
26
  import "./chunk-4BKXL7SM.js";
27
- import "./chunk-MMP6SIB7.js";
27
+ import "./chunk-EI5O25IE.js";
28
28
  import {
29
29
  VERSION
30
- } from "./chunk-CUMSLQKQ.js";
30
+ } from "./chunk-57OZ53J3.js";
31
31
 
32
32
  // src/mcp/server.ts
33
33
  import { createInterface } from "readline";
@@ -81,7 +81,7 @@ import {
81
81
  skillHistoryNote,
82
82
  snapshotFile,
83
83
  stripRoutingTags
84
- } from "./chunk-SM7VOJ3B.js";
84
+ } from "./chunk-WYKSHBLL.js";
85
85
  import {
86
86
  CNY_PER_USD,
87
87
  CostTracker,
@@ -90,7 +90,7 @@ import {
90
90
  getCostCurrency,
91
91
  getPricing,
92
92
  setCostCurrency
93
- } from "./chunk-4J6R2VFW.js";
93
+ } from "./chunk-YKJO3SI4.js";
94
94
  import {
95
95
  ToolExecutor,
96
96
  ToolRegistry,
@@ -126,7 +126,7 @@ import {
126
126
  spawnAgentContext,
127
127
  truncateOutput,
128
128
  undoStack
129
- } from "./chunk-AIQMQCVF.js";
129
+ } from "./chunk-VJQOSTNU.js";
130
130
  import {
131
131
  buildReviewPrompt,
132
132
  buildSecurityReviewPrompt
@@ -153,7 +153,7 @@ import {
153
153
  restoreMemoryEntries,
154
154
  updateMemoryApproval,
155
155
  updateMemoryEntry
156
- } from "./chunk-7KYONZUN.js";
156
+ } from "./chunk-4VYLPFZJ.js";
157
157
  import "./chunk-4DEMGCK4.js";
158
158
  import "./chunk-UUSRWSSX.js";
159
159
  import "./chunk-CKH4KQ4E.js";
@@ -172,7 +172,7 @@ import {
172
172
  buildDoctorReport,
173
173
  formatDoctorReport,
174
174
  loadContextFiles
175
- } from "./chunk-FARHJ42Q.js";
175
+ } from "./chunk-PE3A74UB.js";
176
176
  import {
177
177
  describePlugin,
178
178
  getActivePluginAssets,
@@ -187,14 +187,14 @@ import {
187
187
  runTool,
188
188
  setPluginEnabled,
189
189
  trustPlugin
190
- } from "./chunk-BOG6LVIC.js";
190
+ } from "./chunk-4LQVBW2I.js";
191
191
  import "./chunk-RS7SKYTS.js";
192
192
  import {
193
193
  ProviderRegistry
194
- } from "./chunk-QKZUWT3S.js";
194
+ } from "./chunk-FBOVBL7P.js";
195
195
  import {
196
196
  ConfigManager
197
- } from "./chunk-ZBHRTOWC.js";
197
+ } from "./chunk-NAMXORM7.js";
198
198
  import {
199
199
  CONTENT_ONLY_STREAM_REMINDER,
200
200
  TEE_FINAL_USER_NUDGE,
@@ -225,7 +225,7 @@ import {
225
225
  maskConfigSecrets
226
226
  } from "./chunk-XNFIYS7G.js";
227
227
  import "./chunk-4BKXL7SM.js";
228
- import "./chunk-MMP6SIB7.js";
228
+ import "./chunk-EI5O25IE.js";
229
229
  import {
230
230
  AGENTIC_BEHAVIOR_GUIDELINE,
231
231
  AUTHOR,
@@ -241,7 +241,7 @@ import {
241
241
  SKILLS_DIR_NAME,
242
242
  VERSION,
243
243
  buildUserIdentityPrompt
244
- } from "./chunk-CUMSLQKQ.js";
244
+ } from "./chunk-57OZ53J3.js";
245
245
 
246
246
  // src/web/server.ts
247
247
  import express from "express";
@@ -930,7 +930,7 @@ Cache: write=${cacheCreate} read=${cacheRead}` : "";
930
930
  Cost: ${formatCost(cost)}` : "";
931
931
  let memoryLine = "";
932
932
  try {
933
- const { countPendingMemories: countPendingMemories2 } = await import("./persistent-memory-GQPXSWDK.js");
933
+ const { countPendingMemories: countPendingMemories2 } = await import("./persistent-memory-QA46MVVY.js");
934
934
  const pending = countPendingMemories2(ctx.config.getConfigDir());
935
935
  if (pending > 0) memoryLine = `
936
936
  Memory: \u26A0 ${pending} pending approval \u2014 see the Memory panel or /memory`;
@@ -1854,7 +1854,7 @@ async function handleTest(args, ctx) {
1854
1854
  const isCommand = argStr.includes(" ") || /^(mvn|gradle|npm|pytest|cargo|go)\b/.test(argStr);
1855
1855
  testArgs = isCommand ? { command: argStr } : { filter: argStr };
1856
1856
  }
1857
- const runTests = ctx.runTests ?? (await import("./run-tests-BNKQT42K.js")).executeTests;
1857
+ const runTests = ctx.runTests ?? (await import("./run-tests-PY4EEU2J.js")).executeTests;
1858
1858
  const report = await runTests(testArgs);
1859
1859
  ctx.send({ type: "info", message: report });
1860
1860
  } catch (err) {
@@ -2129,7 +2129,7 @@ async function handleMemory(args, ctx) {
2129
2129
  }
2130
2130
  if (intent.kind === "status") {
2131
2131
  const { getChatIndexStatus } = await import("./chat-index-2D5GK2DB.js");
2132
- const { listMemoryEntries: listMemoryEntries2, isMemoryExpired: isMemoryExpired2, formatMemoryForPrompt: formatMemoryForPrompt2 } = await import("./persistent-memory-GQPXSWDK.js");
2132
+ const { listMemoryEntries: listMemoryEntries2, isMemoryExpired: isMemoryExpired2, formatMemoryForPrompt: formatMemoryForPrompt2 } = await import("./persistent-memory-QA46MVVY.js");
2133
2133
  const memories = listMemoryEntries2(configDir, { includeExpired: true, includeRejected: true });
2134
2134
  const injected = formatMemoryForPrompt2(configDir, process.cwd(), ctx.config.get("memory")?.maxChars);
2135
2135
  const view = buildMemoryStatusView({
@@ -2152,7 +2152,7 @@ async function handleMemory(args, ctx) {
2152
2152
  return;
2153
2153
  }
2154
2154
  if (intent.kind === "recall") {
2155
- const { searchPersistentMemories, touchMemoryReferences } = await import("./persistent-memory-GQPXSWDK.js");
2155
+ const { searchPersistentMemories, touchMemoryReferences } = await import("./persistent-memory-QA46MVVY.js");
2156
2156
  const { searchChatMemory } = await import("./chat-index-2D5GK2DB.js");
2157
2157
  const persistentHits = searchPersistentMemories(configDir, intent.query, process.cwd(), 3);
2158
2158
  if (persistentHits.length > 0) {
@@ -2273,7 +2273,7 @@ async function handleMemory(args, ctx) {
2273
2273
  ctx.handleMemoryManage(intent.action, args[1], intent.action === "expire" ? args[2] : void 0);
2274
2274
  } else if (intent.kind === "export") {
2275
2275
  if (args[1] === "md") {
2276
- const { exportMemoryEntries: exportMemoryEntries2 } = await import("./persistent-memory-GQPXSWDK.js");
2276
+ const { exportMemoryEntries: exportMemoryEntries2 } = await import("./persistent-memory-QA46MVVY.js");
2277
2277
  ctx.send({
2278
2278
  type: "export_data",
2279
2279
  format: "md",
@@ -4,9 +4,9 @@ import {
4
4
  googleSearchContext,
5
5
  isToolCapableProvider,
6
6
  truncateOutput
7
- } from "./chunk-AIQMQCVF.js";
7
+ } from "./chunk-VJQOSTNU.js";
8
8
  import "./chunk-GHWZVPUV.js";
9
- import "./chunk-7KYONZUN.js";
9
+ import "./chunk-4VYLPFZJ.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-BOG6LVIC.js";
20
+ } from "./chunk-4LQVBW2I.js";
21
21
  import "./chunk-RS7SKYTS.js";
22
22
  import {
23
23
  getDangerLevel,
@@ -29,10 +29,10 @@ import {
29
29
  atomicWriteFileSync
30
30
  } from "./chunk-IW3Q7AE5.js";
31
31
  import "./chunk-4BKXL7SM.js";
32
- import "./chunk-MMP6SIB7.js";
32
+ import "./chunk-EI5O25IE.js";
33
33
  import {
34
34
  SUBAGENT_ALLOWED_TOOLS
35
- } from "./chunk-CUMSLQKQ.js";
35
+ } from "./chunk-57OZ53J3.js";
36
36
 
37
37
  // src/hub/task-orchestrator.ts
38
38
  import { createInterface } from "readline";
@@ -5,14 +5,14 @@ import {
5
5
  formatCost,
6
6
  getPricing,
7
7
  setCostCurrency
8
- } from "./chunk-4J6R2VFW.js";
8
+ } from "./chunk-YKJO3SI4.js";
9
9
  import "./chunk-RS7SKYTS.js";
10
10
  import {
11
11
  ConfigManager
12
- } from "./chunk-ZBHRTOWC.js";
12
+ } from "./chunk-NAMXORM7.js";
13
13
  import "./chunk-TU3L3PW7.js";
14
14
  import "./chunk-IW3Q7AE5.js";
15
- import "./chunk-CUMSLQKQ.js";
15
+ import "./chunk-57OZ53J3.js";
16
16
 
17
17
  // src/cli/usage.ts
18
18
  function classifyRowCost(row) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "jinzd-ai-cli",
3
- "version": "0.4.294",
3
+ "version": "0.4.295",
4
4
  "description": "Cross-platform REPL-style AI CLI with multi-provider support",
5
5
  "type": "module",
6
6
  "main": "./dist/index.js",