jinzd-ai-cli 0.4.262 → 0.4.264

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 (39) hide show
  1. package/README.md +19 -14
  2. package/README.zh-CN.md +21 -16
  3. package/THIRD_PARTY_NOTICES.md +88 -0
  4. package/dist/{batch-2B7UUX27.js → batch-Q22M55UP.js} +2 -2
  5. package/dist/{chunk-XZNRZGG2.js → chunk-3OBY7WSS.js} +1 -0
  6. package/dist/{chunk-ZQZEBPAQ.js → chunk-4T4KHPRD.js} +1 -1
  7. package/dist/{chunk-D6DHS5GL.js → chunk-53SOOMYG.js} +7 -6
  8. package/dist/{chunk-FWBSGBB7.js → chunk-BMSBFK7J.js} +4 -4
  9. package/dist/{chunk-2XPJRRBB.js → chunk-DYONT23T.js} +4 -4
  10. package/dist/{chunk-MTIS7H6V.js → chunk-IAIUXBB5.js} +3 -1
  11. package/dist/{chunk-A6JLBNAI.js → chunk-IEYR2BGG.js} +2 -2
  12. package/dist/{chunk-KWYJFLXY.js → chunk-JVUYKO4V.js} +1 -1
  13. package/dist/{chunk-KMS3LBO3.js → chunk-K7HQLXXQ.js} +1 -1
  14. package/dist/{chunk-HPDI4F5F.js → chunk-QCZFHQHY.js} +1 -1
  15. package/dist/{chunk-DQY2DDGS.js → chunk-QG4NG7KJ.js} +1 -1
  16. package/dist/{chunk-BS44XEZ4.js → chunk-TANTNIGP.js} +1 -1
  17. package/dist/{chunk-25HFWCM3.js → chunk-TL5MD5XU.js} +31 -19
  18. package/dist/{chunk-JEJHNVA2.js → chunk-U4XQIP7Z.js} +1 -1
  19. package/dist/{chunk-WAAFA32V.js → chunk-UGJIRJ4H.js} +1 -1
  20. package/dist/{chunk-JFXKQPKY.js → chunk-UQP2BNQT.js} +1 -1
  21. package/dist/{chunk-EZ6QLHOS.js → chunk-YRD6M5XI.js} +30 -5
  22. package/dist/{ci-G6OZDH4H.js → ci-RMEIHZJL.js} +6 -6
  23. package/dist/{ci-format-BRS7G5X5.js → ci-format-UCFSWVG5.js} +2 -2
  24. package/dist/{constants-24AD5JQV.js → constants-Z2R2BKUY.js} +1 -1
  25. package/dist/{doctor-cli-WWZRFGQJ.js → doctor-cli-64L7BBK7.js} +6 -6
  26. package/dist/electron-server.js +94 -34
  27. package/dist/{hub-2DYZQVEN.js → hub-P7D6VDCK.js} +1 -1
  28. package/dist/index.js +103 -56
  29. package/dist/{persistent-memory-LJT37XVO.js → persistent-memory-CELKJM4U.js} +2 -2
  30. package/dist/{persistent-memory-DFSZZSYP.js → persistent-memory-QX6C2JAR.js} +2 -2
  31. package/dist/{pr-OOIQPCBX.js → pr-DJP53EZV.js} +6 -6
  32. package/dist/{run-tests-ICTVJSJN.js → run-tests-A2YM4U2U.js} +2 -2
  33. package/dist/{run-tests-W4TG4OQV.js → run-tests-CK44KRY3.js} +2 -2
  34. package/dist/{server-GTVYIHBG.js → server-GUV2HZ7N.js} +6 -6
  35. package/dist/{server-IXUVVPTV.js → server-XYVL7A33.js} +37 -18
  36. package/dist/{task-orchestrator-6MHSDOFR.js → task-orchestrator-5RT5EH2J.js} +6 -6
  37. package/dist/{usage-23I3ZJZO.js → usage-LGPJ4UAW.js} +4 -4
  38. package/dist/web/client/app.js +1 -1
  39. package/package.json +13 -10
package/README.md CHANGED
@@ -172,10 +172,11 @@ AI autonomously invokes these 30 tools during conversations:
172
172
  | `edit_file` | write | Precise string replacement with fuzzy matching hints + `replaceAll` mode |
173
173
  | `list_dir` | safe | List directory contents |
174
174
  | `grep_files` | safe | Regex search across files |
175
- | `glob_files` | safe | Match files by glob pattern |
176
- | `web_fetch` | safe | Fetch web pages as Markdown (SSRF-protected) |
177
- | `google_search` | safe | Google Custom Search API |
178
- | `run_interactive` | safe | Run interactive programs with stdin input |
175
+ | `glob_files` | safe | Match files by glob pattern |
176
+ | `web_fetch` | safe | Fetch web pages as Markdown (SSRF-protected) |
177
+ | `web_search` | safe | Keyless Bing/Google web search with weak-result fallback |
178
+ | `google_search` | safe | Google Custom Search API |
179
+ | `run_interactive` | write | Run interactive programs with stdin input; arbitrary executables require confirmation |
179
180
  | `run_tests` | safe | Auto-detect and run project tests (JUnit XML parsing) |
180
181
  | `spawn_agent` | safe | Delegate subtasks to named isolated agents (`agent`: explorer/worker/reviewer/security/tester) |
181
182
  | `ask_user` | safe | Pause and ask the user a question |
@@ -192,10 +193,11 @@ AI autonomously invokes these 30 tools during conversations:
192
193
  | `notebook_edit` | write | Edit Jupyter notebook cells (add/edit/delete/move) |
193
194
  | `find_symbol` | safe | Locate symbol definitions via persistent tree-sitter index (TS/JS/TSX/Python/Go/Rust/Java/C++) |
194
195
  | `get_outline` | safe | Enumerate all top-level declarations in one source file |
195
- | `find_references` | safe | Search indexed files for references to a symbol name |
196
- | `search_code` | safe | Semantic (meaning-based) code search via local sentence embeddings — bilingual, "grep by meaning" |
196
+ | `find_references` | safe | Search indexed files for references to a symbol name |
197
+ | `search_code` | safe | Semantic (meaning-based) code search via local sentence embeddings — bilingual, "grep by meaning" |
198
+ | `recall_memory` | safe | Semantically recall relevant excerpts from earlier chat sessions |
197
199
 
198
- **Safety levels**: `safe` = auto-execute, `write` = diff preview + confirmation, `destructive` = prominent warning + confirmation.
200
+ **Safety levels**: `safe` = auto-execute, `write` = confirmation required (file-editing tools also show a diff preview), `destructive` = prominent warning + confirmation.
199
201
 
200
202
  ## Key REPL Commands
201
203
 
@@ -527,7 +529,7 @@ npm run test:watch # Watch mode
527
529
 
528
530
  Offline tests cover authentication, sessions, tool types and danger levels, permissions, output truncation, diff rendering, edit-file similarity, error hierarchy, config management, env loading, provider registry, web-fetch, grep-files, Hub, dev-state, token estimation, tool registry budgets, parallel tool execution, cost tracking, and session tool history.
529
531
 
530
- ## Releasing (Version Bump → npm PublishGitHub Push)
532
+ ## Releasing (Version Bump → Git TagTrusted npm Publish)
531
533
 
532
534
  > **For contributors and AI agents: the entire release is driven by [`scripts/release.mjs`](scripts/release.mjs). Never manually bump the version or run `npm publish` yourself** — a hand-publish of `0.4.207` shipped a version that reported the wrong number and forced a corrective re-release (`0.4.208`). The script's guards exist precisely to stop that.
533
535
 
@@ -535,7 +537,7 @@ Offline tests cover authentication, sessions, tool types and danger levels, perm
535
537
 
536
538
  - You are on the `main` branch and the changes to ship are already in the working tree.
537
539
  - `npx tsc --noEmit` is clean and `npm test` is green (the script enforces both and rolls the bump back on failure).
538
- - You are logged into npm as the package owner (`npm whoami`).
540
+ - npm Trusted Publishing is configured for `jinzd-ai-cli` and `.github/workflows/release.yml`.
539
541
  - You have push access to the GitHub remote.
540
542
 
541
543
  **Step 1 — Write the milestone entry FIRST (Guard A).** Add a one-line entry to the `## 最近里程碑` section of [`CLAUDE.md`](CLAUDE.md) that contains the exact full-width-parenthesis marker `(vX.Y.Z)` for the target version. The script refuses to start without it. (Full narrative goes in `CHANGELOG.md`; this section is just the index line.)
@@ -562,10 +564,10 @@ node scripts/release.mjs patch -m "..." --dry-run
562
564
  5. `npm test` must pass (rolls the bump back on failure).
563
565
  6. Prints the exact file list entering the release commit and blocks if any looks sensitive (`.env`, `*.pem`, `*.key`, `secret`, …). Override consciously with `--allow-sensitive`.
564
566
  7. `git add -A` + commit `"<title> (vX.Y.Z)"` (message passed via argv, not shell-interpolated).
565
- 8. `npm publish` (the build runs automatically via `prepublishOnly`), then re-queries the registry to confirm the new version is live.
566
- 9. `git push` to `main`.
567
-
568
- **Optional flags:** `--dry-run` · `--skip-tests` · `--no-publish` · `--no-push` · `--allow-sensitive`.
567
+ 8. Creates an annotated `vX.Y.Z` release tag.
568
+ 9. Pushes `main` and the tag. The pinned GitHub Actions workflow verifies the project and publishes to npm through OIDC, without a long-lived npm token.
569
+
570
+ **Optional flags:** `--dry-run` · `--skip-tests` · `--no-tag` · `--no-push` · `--allow-sensitive`. The old `--no-publish` flag remains an alias for `--no-tag`.
569
571
 
570
572
  ## Documentation
571
573
 
@@ -575,7 +577,10 @@ node scripts/release.mjs patch -m "..." --dry-run
575
577
  - [`docs/MIGRATION.md`](docs/MIGRATION.md) — Migration guide from Claude Code, Codex, Claude Desktop, and Cursor
576
578
  - [`docs/RECIPES.md`](docs/RECIPES.md) — Practical recipes by scenario
577
579
  - [`docs/SECURITY.md`](docs/SECURITY.md) — **Security model, deployment checklist, audit history.** Read before exposing `aicli web` to a network.
578
- - [`CHANGELOG.md`](CHANGELOG.md) — Per-version change log
580
+ - [`CHANGELOG.md`](CHANGELOG.md) — Per-version change log
581
+ - [`CONTRIBUTING.md`](CONTRIBUTING.md) · [`SUPPORT.md`](SUPPORT.md) · [`CODE_OF_CONDUCT.md`](CODE_OF_CONDUCT.md) — Community guides
582
+ - [`THIRD_PARTY_NOTICES.md`](THIRD_PARTY_NOTICES.md) — Licenses for vendored browser assets
583
+ - [`docs/OPEN_SOURCE_CHECKLIST.md`](docs/OPEN_SOURCE_CHECKLIST.md) — Repository-owner launch checklist
579
584
  - [Chinese README](README.zh-CN.md) — 中文说明文档
580
585
 
581
586
  ## License
package/README.zh-CN.md CHANGED
@@ -160,10 +160,11 @@ AI 在对话中可自主调用 30 个工具:
160
160
  | `edit_file` | 写入 | 精确字符串替换,模糊匹配提示 + `replaceAll` 全局替换模式 |
161
161
  | `list_dir` | 安全 | 列出目录内容 |
162
162
  | `grep_files` | 安全 | 正则搜索文件内容 |
163
- | `glob_files` | 安全 | 按 glob 模式匹配文件 |
164
- | `web_fetch` | 安全 | 抓取网页转 Markdown(防 SSRF) |
165
- | `google_search` | 安全 | Google 自定义搜索 |
166
- | `run_interactive` | 安全 | 运行交互式程序并输入 |
163
+ | `glob_files` | 安全 | 按 glob 模式匹配文件 |
164
+ | `web_fetch` | 安全 | 抓取网页转 Markdown(防 SSRF) |
165
+ | `web_search` | 安全 | 无需 Key 的 Bing/Google 网页搜索,弱结果自动降级 |
166
+ | `google_search` | 安全 | Google 自定义搜索 |
167
+ | `run_interactive` | 写入 | 运行交互式程序并输入;任意可执行程序均需确认 |
167
168
  | `run_tests` | 安全 | 自动检测并运行测试(JUnit XML 解析) |
168
169
  | `spawn_agent` | 安全 | 委派子任务给命名隔离 agent(`agent`: explorer/worker/reviewer/security/tester) |
169
170
  | `ask_user` | 安全 | 暂停并向用户提问 |
@@ -180,10 +181,11 @@ AI 在对话中可自主调用 30 个工具:
180
181
  | `notebook_edit` | 写入 | 编辑 Jupyter notebook 单元格(增/改/删/移动) |
181
182
  | `find_symbol` | 安全 | 按名称精确查找函数/类/方法定义(C1,tree-sitter 索引) |
182
183
  | `get_outline` | 安全 | 获取文件的符号大纲(类 → 方法树)(C1) |
183
- | `find_references` | 安全 | 查找符号的所有引用(C1) |
184
- | `search_code` | 安全 | 语义代码搜索(C2,自然语言查询,中英文均可) |
184
+ | `find_references` | 安全 | 查找符号的所有引用(C1) |
185
+ | `search_code` | 安全 | 语义代码搜索(C2,自然语言查询,中英文均可) |
186
+ | `recall_memory` | 安全 | 从历史聊天会话中语义召回相关片段 |
185
187
 
186
- **安全级别**:`安全` = 自动执行,`写入` = diff 预览 + 确认,`破坏性` = 醒目警告 + 确认。
188
+ **安全级别**:`安全` = 自动执行,`写入` = 需要确认(文件编辑工具还会显示 diff 预览),`破坏性` = 醒目警告 + 确认。
187
189
 
188
190
  ### 文档深入阅读
189
191
 
@@ -483,7 +485,7 @@ npm run test:watch # 监听模式
483
485
 
484
486
  离线测试覆盖:认证、会话、工具类型与危险级别、权限、输出截断、diff 渲染、edit-file 相似度、错误层级、配置管理、环境变量、Provider 注册、web-fetch、grep-files、Hub、开发状态、Token 估算、工具注册表预算、并行工具执行、费用追踪和会话工具历史。
485
487
 
486
- ## 发布(版本提升 → npm 发布推送 GitHub)
488
+ ## 发布(版本提升 → Git Tagnpm 可信发布)
487
489
 
488
490
  > **给贡献者与 AI 模型:整个发布流程一律走 [`scripts/release.mjs`](scripts/release.mjs),切勿手动 bump 版本号或自己跑 `npm publish`。** 曾经手工 publish 的 `0.4.207` 装上后 `--version` 报错版本号,被迫补发 `0.4.208` 对齐——脚本的四道守卫就是为拦住这类事故而存在。
489
491
 
@@ -491,7 +493,7 @@ npm run test:watch # 监听模式
491
493
 
492
494
  - 当前在 `main` 分支,待发布的改动已在工作区。
493
495
  - `npx tsc --noEmit` 零错误、`npm test` 全绿(脚本会强制校验,失败自动回滚版本号)。
494
- - 已登录 npm 且是包的 owner(`npm whoami`)。
496
+ - 已为 `jinzd-ai-cli` `.github/workflows/release.yml` 配置 npm Trusted Publishing。
495
497
  - 有 GitHub 远端推送权限。
496
498
 
497
499
  **第 1 步 —— 先写里程碑条目(Guard A)。** 在 [`CLAUDE.md`](CLAUDE.md) 的 `## 最近里程碑` 一节加一行,条目中必须含目标版本的**全角括号**标记 `(vX.Y.Z)`,否则脚本拒绝启动。(完整叙事写进 `CHANGELOG.md`,本节只留一行式索引。)
@@ -518,14 +520,17 @@ node scripts/release.mjs patch -m "..." --dry-run
518
520
  5. `npm test` 必须全绿(失败则回滚版本号)。
519
521
  6. 打印进入发布 commit 的完整文件清单,若含疑似敏感文件(`.env`、`*.pem`、`*.key`、`secret`…)直接拦下,确认无误加 `--allow-sensitive`。
520
522
  7. `git add -A` + commit `"<标题> (vX.Y.Z)"`(消息走 argv 传参,不经 shell 拼接)。
521
- 8. `npm publish`(build 经 `prepublishOnly` 自动跑),再回查 registry 确认新版本已上线。
522
- 9. `git push` 推送 `main`。
523
-
524
- **可选 flag:** `--dry-run` · `--skip-tests` · `--no-publish` · `--no-push` · `--allow-sensitive`。
525
-
526
- ## 文档
523
+ 8. 创建带注释的 `vX.Y.Z` release tag。
524
+ 9. 推送 `main` tag;固定到完整 SHA 的 GitHub Actions 工作流会完成验证,并通过 OIDC 发布到 npm,无需长期 npm token。
525
+
526
+ **可选 flag:** `--dry-run` · `--skip-tests` · `--no-tag` · `--no-push` · `--allow-sensitive`。旧的 `--no-publish` 仍作为 `--no-tag` 的兼容别名。
527
527
 
528
- - [English README](README.md) — English documentation
528
+ ## 文档
529
+
530
+ - [English README](README.md) — English documentation
531
+ - [贡献指南](CONTRIBUTING.md) · [支持指南](SUPPORT.md) · [行为准则](CODE_OF_CONDUCT.md)
532
+ - [第三方许可证声明](THIRD_PARTY_NOTICES.md)
533
+ - [开源前检查清单](docs/OPEN_SOURCE_CHECKLIST.md)
529
534
 
530
535
  ## License
531
536
 
@@ -0,0 +1,88 @@
1
+ # Third-Party Notices
2
+
3
+ ai-cli includes the following vendored browser assets. Their licenses apply to those components; the rest of ai-cli is licensed under the repository's MIT license.
4
+
5
+ | Component | Vendored files | Version | License | Upstream |
6
+ |---|---|---:|---|---|
7
+ | Tailwind CSS Play CDN | `src/web/client/vendor/tailwind.js` | 3.4.17 | MIT | https://github.com/tailwindlabs/tailwindcss |
8
+ | daisyUI | `src/web/client/vendor/daisyui-full.min.css` | 4.12.23 | MIT | https://github.com/saadeghi/daisyui |
9
+ | highlight.js and GitHub themes | `highlight.min.js`, `github.min.css`, `github-dark.min.css` | 11.9.0 | BSD-3-Clause | https://github.com/highlightjs/highlight.js |
10
+ | marked | `src/web/client/vendor/marked.min.js` | 15.0.12 | MIT | https://github.com/markedjs/marked |
11
+
12
+ When replacing a vendored asset, update this file and preserve its upstream license header.
13
+
14
+ ## MIT-licensed components
15
+
16
+ Tailwind CSS:
17
+
18
+ Copyright (c) Tailwind Labs, Inc.
19
+
20
+ daisyUI:
21
+
22
+ Copyright (c) 2020 Pouya Saadeghi
23
+
24
+ Marked:
25
+
26
+ Copyright (c) 2018+, MarkedJS (https://github.com/markedjs/)
27
+ Copyright (c) 2011-2018, Christopher Jeffrey (https://github.com/chjj/)
28
+
29
+ Permission is hereby granted, free of charge, to any person obtaining a copy
30
+ of this software and associated documentation files (the "Software"), to deal
31
+ in the Software without restriction, including without limitation the rights
32
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
33
+ copies of the Software, and to permit persons to whom the Software is
34
+ furnished to do so, subject to the following conditions:
35
+
36
+ The above copyright notices and this permission notice shall be included in
37
+ all copies or substantial portions of the Software.
38
+
39
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
40
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
41
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
42
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
43
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
44
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
45
+ SOFTWARE.
46
+
47
+ ## Markdown notice included by Marked
48
+
49
+ Copyright © 2004, John Gruber
50
+ http://daringfireball.net/
51
+ All rights reserved.
52
+
53
+ Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:
54
+
55
+ - Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.
56
+ - Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.
57
+ - Neither the name “Markdown” nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission.
58
+
59
+ This software is provided by the copyright holders and contributors “as is” and any express or implied warranties, including, but not limited to, the implied warranties of merchantability and fitness for a particular purpose are disclaimed. In no event shall the copyright owner or contributors be liable for any direct, indirect, incidental, special, exemplary, or consequential damages (including, but not limited to, procurement of substitute goods or services; loss of use, data, or profits; or business interruption) however caused and on any theory of liability, whether in contract, strict liability, or tort (including negligence or otherwise) arising in any way out of the use of this software, even if advised of the possibility of such damage.
60
+
61
+ ## highlight.js — BSD 3-Clause License
62
+
63
+ Copyright (c) 2006, Ivan Sagalaev.
64
+ All rights reserved.
65
+
66
+ Redistribution and use in source and binary forms, with or without
67
+ modification, are permitted provided that the following conditions are met:
68
+
69
+ - Redistributions of source code must retain the above copyright notice, this
70
+ list of conditions and the following disclaimer.
71
+ - Redistributions in binary form must reproduce the above copyright notice,
72
+ this list of conditions and the following disclaimer in the documentation
73
+ and/or other materials provided with the distribution.
74
+ - Neither the name of the copyright holder nor the names of its contributors
75
+ may be used to endorse or promote products derived from this software
76
+ without specific prior written permission.
77
+
78
+ THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
79
+ AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
80
+ IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
81
+ ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
82
+ LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
83
+ CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
84
+ SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
85
+ INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
86
+ CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
87
+ ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
88
+ POSSIBILITY OF SUCH DAMAGE.
@@ -1,9 +1,9 @@
1
1
  #!/usr/bin/env node
2
2
  import {
3
3
  ConfigManager
4
- } from "./chunk-MTIS7H6V.js";
4
+ } from "./chunk-IAIUXBB5.js";
5
5
  import "./chunk-TU3L3PW7.js";
6
- import "./chunk-KWYJFLXY.js";
6
+ import "./chunk-JVUYKO4V.js";
7
7
  import {
8
8
  atomicWriteFileSync
9
9
  } from "./chunk-IW3Q7AE5.js";
@@ -1159,6 +1159,7 @@ async function runLeanAgentLoop(opts) {
1159
1159
  maxTokens: opts.chatParams?.maxTokens,
1160
1160
  timeout: opts.chatParams?.timeout,
1161
1161
  thinking: opts.chatParams?.thinking,
1162
+ thinkingEffort: opts.chatParams?.thinkingEffort,
1162
1163
  ...extraMessages.length > 0 ? { _extraMessages: extraMessages } : {}
1163
1164
  },
1164
1165
  opts.toolDefsForRound(round)
@@ -1,5 +1,5 @@
1
1
  // src/core/constants.ts
2
- var VERSION = "0.4.262";
2
+ var VERSION = "0.4.264";
3
3
  var APP_NAME = "ai-cli";
4
4
  var CONFIG_DIR_NAME = ".aicli";
5
5
  var CONFIG_FILE_NAME = "config.json";
@@ -7,7 +7,7 @@ import {
7
7
  searchPersistentMemories,
8
8
  touchMemoryReferences,
9
9
  updateMemoryEntry
10
- } from "./chunk-KMS3LBO3.js";
10
+ } from "./chunk-K7HQLXXQ.js";
11
11
  import {
12
12
  indexProject
13
13
  } from "./chunk-GLSR2NR3.js";
@@ -23,13 +23,13 @@ import {
23
23
  runHook,
24
24
  runLifecycleHooks,
25
25
  runTool
26
- } from "./chunk-JEJHNVA2.js";
26
+ } from "./chunk-U4XQIP7Z.js";
27
27
  import {
28
28
  buildTruncatedArgumentsError,
29
29
  getDangerLevel,
30
30
  isFileWriteTool,
31
31
  runLeanAgentLoop
32
- } from "./chunk-XZNRZGG2.js";
32
+ } from "./chunk-3OBY7WSS.js";
33
33
  import {
34
34
  EnvLoader,
35
35
  NetworkError,
@@ -40,14 +40,14 @@ import {
40
40
  } from "./chunk-4BKXL7SM.js";
41
41
  import {
42
42
  runTestsTool
43
- } from "./chunk-HPDI4F5F.js";
43
+ } from "./chunk-QCZFHQHY.js";
44
44
  import {
45
45
  CONFIG_DIR_NAME,
46
46
  DEFAULT_MAX_TOOL_OUTPUT_CHARS_CAP,
47
47
  SUBAGENT_ALLOWED_TOOLS,
48
48
  SUBAGENT_DEFAULT_MAX_ROUNDS,
49
49
  SUBAGENT_MAX_ROUNDS_LIMIT
50
- } from "./chunk-KWYJFLXY.js";
50
+ } from "./chunk-JVUYKO4V.js";
51
51
  import {
52
52
  loadChatIndex,
53
53
  searchChatMemory
@@ -5677,7 +5677,8 @@ async function runSubAgent(task, maxRounds, agentIndex, ctx, agent) {
5677
5677
  temperature: ctx.modelParams.temperature,
5678
5678
  maxTokens: ctx.modelParams.maxTokens,
5679
5679
  timeout: ctx.modelParams.timeout,
5680
- thinking: ctx.modelParams.thinking
5680
+ thinking: ctx.modelParams.thinking,
5681
+ thinkingEffort: ctx.modelParams.thinkingEffort
5681
5682
  },
5682
5683
  executeTools: (calls) => subExecutor.executeAll(calls),
5683
5684
  systemPromptForRound: () => subSystemPrompt,
@@ -1,10 +1,10 @@
1
1
  #!/usr/bin/env node
2
2
  import {
3
3
  ProviderRegistry
4
- } from "./chunk-25HFWCM3.js";
4
+ } from "./chunk-TL5MD5XU.js";
5
5
  import {
6
6
  ConfigManager
7
- } from "./chunk-MTIS7H6V.js";
7
+ } from "./chunk-IAIUXBB5.js";
8
8
  import {
9
9
  getActivePluginAssets,
10
10
  getPendingHookTrust,
@@ -14,7 +14,7 @@ import {
14
14
  listHooks,
15
15
  listInstalledPlugins,
16
16
  resetStats
17
- } from "./chunk-JEJHNVA2.js";
17
+ } from "./chunk-U4XQIP7Z.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-KWYJFLXY.js";
29
+ } from "./chunk-JVUYKO4V.js";
30
30
 
31
31
  // src/diagnostics/doctor-report.ts
32
32
  import { existsSync as existsSync3, statSync as statSync2 } from "fs";
@@ -2,7 +2,7 @@
2
2
  import {
3
3
  evaluateCiGate,
4
4
  normalizeCiThresholds
5
- } from "./chunk-WAAFA32V.js";
5
+ } from "./chunk-UGJIRJ4H.js";
6
6
  import {
7
7
  buildReviewPrompt,
8
8
  buildSecurityReviewPrompt,
@@ -10,13 +10,13 @@ import {
10
10
  } from "./chunk-HLWUDRBO.js";
11
11
  import {
12
12
  ProviderRegistry
13
- } from "./chunk-25HFWCM3.js";
13
+ } from "./chunk-TL5MD5XU.js";
14
14
  import {
15
15
  ConfigManager
16
- } from "./chunk-MTIS7H6V.js";
16
+ } from "./chunk-IAIUXBB5.js";
17
17
  import {
18
18
  VERSION
19
- } from "./chunk-KWYJFLXY.js";
19
+ } from "./chunk-JVUYKO4V.js";
20
20
 
21
21
  // src/cli/ci.ts
22
22
  import { execFileSync } 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-KWYJFLXY.js";
11
+ } from "./chunk-JVUYKO4V.js";
12
12
  import {
13
13
  atomicWriteFileSync
14
14
  } from "./chunk-IW3Q7AE5.js";
@@ -46,6 +46,8 @@ var ModelParamsSchema = z.object({
46
46
  timeout: z.number().int().positive().optional(),
47
47
  /** 是否启用深度思考(thinking)模式,Claude Sonnet/Opus、GLM-5 等 */
48
48
  thinking: z.boolean().optional(),
49
+ /** DeepSeek V4 reasoning effort. */
50
+ thinkingEffort: z.enum(["low", "high", "max"]).optional(),
49
51
  /** thinking 模式的 token 预算(最小 1024,仅 Claude Extended Thinking 使用) */
50
52
  thinkingBudget: z.number().int().min(1024).optional()
51
53
  });
@@ -1,7 +1,7 @@
1
1
  #!/usr/bin/env node
2
2
  import {
3
3
  truncateForPersist
4
- } from "./chunk-D6DHS5GL.js";
4
+ } from "./chunk-53SOOMYG.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-KWYJFLXY.js";
14
+ } from "./chunk-JVUYKO4V.js";
15
15
  import {
16
16
  atomicWriteFileSync
17
17
  } 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.262";
4
+ var VERSION = "0.4.264";
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 {
6
6
  MEMORY_FILE_NAME,
7
7
  MEMORY_MAX_CHARS,
8
8
  MEMORY_STORE_FILE_NAME
9
- } from "./chunk-KWYJFLXY.js";
9
+ } from "./chunk-JVUYKO4V.js";
10
10
  import {
11
11
  DEFAULT_PATTERNS,
12
12
  redactString
@@ -1,7 +1,7 @@
1
1
  #!/usr/bin/env node
2
2
  import {
3
3
  TEST_TIMEOUT
4
- } from "./chunk-KWYJFLXY.js";
4
+ } from "./chunk-JVUYKO4V.js";
5
5
 
6
6
  // src/tools/builtin/run-tests.ts
7
7
  import { execSync, spawnSync } from "child_process";
@@ -2,7 +2,7 @@
2
2
  import {
3
3
  computeCost,
4
4
  formatCost
5
- } from "./chunk-EZ6QLHOS.js";
5
+ } from "./chunk-YRD6M5XI.js";
6
6
  import {
7
7
  atomicWriteFileSync
8
8
  } from "./chunk-IW3Q7AE5.js";
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  TEST_TIMEOUT
3
- } from "./chunk-ZQZEBPAQ.js";
3
+ } from "./chunk-4T4KHPRD.js";
4
4
 
5
5
  // src/tools/builtin/run-tests.ts
6
6
  import { execSync, spawnSync } from "child_process";
@@ -3,7 +3,7 @@ import {
3
3
  detectsHallucinatedFileOp,
4
4
  parseToolCallArguments,
5
5
  schemaToJsonSchema
6
- } from "./chunk-XZNRZGG2.js";
6
+ } from "./chunk-3OBY7WSS.js";
7
7
  import {
8
8
  AuthError,
9
9
  ProviderError,
@@ -1079,6 +1079,14 @@ var OpenAICompatibleProvider = class extends BaseProvider {
1079
1079
  }
1080
1080
  return msgs;
1081
1081
  }
1082
+ /** Provider-specific request fields shared by all four chat paths. */
1083
+ buildChatRequestParams(request) {
1084
+ return {
1085
+ temperature: request.temperature,
1086
+ max_tokens: request.maxTokens,
1087
+ ...request.thinking ? { thinking: { type: "enabled" } } : {}
1088
+ };
1089
+ }
1082
1090
  /**
1083
1091
  * 非流式请求必须把 `request.signal` 交给 SDK —— 否则 Ctrl+C 完全无效。
1084
1092
  *
@@ -1095,10 +1103,8 @@ var OpenAICompatibleProvider = class extends BaseProvider {
1095
1103
  const response = await this.client.chat.completions.create({
1096
1104
  model: request.model,
1097
1105
  messages: this.buildMessages(request),
1098
- temperature: request.temperature,
1099
- max_tokens: request.maxTokens,
1100
- stream: false,
1101
- ...request.thinking ? { thinking: { type: "enabled" } } : {}
1106
+ ...this.buildChatRequestParams(request),
1107
+ stream: false
1102
1108
  }, {
1103
1109
  timeout: request.timeout ?? this.defaultTimeout,
1104
1110
  signal: request.signal
@@ -1121,12 +1127,10 @@ var OpenAICompatibleProvider = class extends BaseProvider {
1121
1127
  const stream = await this.client.chat.completions.create({
1122
1128
  model: request.model,
1123
1129
  messages: this.buildMessages(request),
1124
- temperature: request.temperature,
1125
- max_tokens: request.maxTokens,
1130
+ ...this.buildChatRequestParams(request),
1126
1131
  stream: true,
1127
1132
  // 请求末尾 usage chunk,供 token 统计使用
1128
- stream_options: { include_usage: true },
1129
- ...request.thinking ? { thinking: { type: "enabled" } } : {}
1133
+ stream_options: { include_usage: true }
1130
1134
  }, {
1131
1135
  timeout: request.timeout ?? this.defaultTimeout,
1132
1136
  signal: request.signal
@@ -1202,10 +1206,8 @@ var OpenAICompatibleProvider = class extends BaseProvider {
1202
1206
  messages: allMessages,
1203
1207
  tools: openaiTools,
1204
1208
  tool_choice: "auto",
1205
- temperature: request.temperature,
1206
- max_tokens: request.maxTokens,
1207
- stream: false,
1208
- ...request.thinking ? { thinking: { type: "enabled" } } : {}
1209
+ ...this.buildChatRequestParams(request),
1210
+ stream: false
1209
1211
  }, {
1210
1212
  timeout: request.timeout ?? this.defaultTimeout,
1211
1213
  // 非流式路径同样必须收 signal,否则 Ctrl+C 期间整个请求不可中断(见 chat() 上方注释)
@@ -1303,11 +1305,9 @@ var OpenAICompatibleProvider = class extends BaseProvider {
1303
1305
  messages: allMessages,
1304
1306
  tools: openaiTools,
1305
1307
  tool_choice: "auto",
1306
- temperature: request.temperature,
1307
- max_tokens: request.maxTokens,
1308
+ ...this.buildChatRequestParams(request),
1308
1309
  stream: true,
1309
- stream_options: { include_usage: true },
1310
- ...request.thinking ? { thinking: { type: "enabled" } } : {}
1310
+ stream_options: { include_usage: true }
1311
1311
  }, {
1312
1312
  timeout: request.timeout ?? this.defaultTimeout,
1313
1313
  signal: request.signal
@@ -1501,6 +1501,18 @@ Rules you MUST follow:
1501
1501
  - The system will detect and reject phantom claims. Each failed detection wastes a round. Be honest.`;
1502
1502
  var DeepSeekProvider = class extends OpenAICompatibleProvider {
1503
1503
  defaultBaseUrl = "https://api.deepseek.com/v1";
1504
+ buildChatRequestParams(request) {
1505
+ const thinkingEnabled = request.thinking === true;
1506
+ return {
1507
+ // DeepSeek ignores sampling controls in thinking mode; omit them to keep the
1508
+ // wire request unambiguous. Explicitly disable thinking otherwise because
1509
+ // V4 defaults it to enabled server-side.
1510
+ temperature: thinkingEnabled ? void 0 : request.temperature,
1511
+ max_tokens: request.maxTokens,
1512
+ thinking: { type: thinkingEnabled ? "enabled" : "disabled" },
1513
+ ...thinkingEnabled ? { reasoning_effort: request.thinkingEffort ?? "high" } : {}
1514
+ };
1515
+ }
1504
1516
  /** 禁用流式工具调用,确保 chatWithTools 覆写(代码块检测)生效 */
1505
1517
  enableStreamingToolCalls = false;
1506
1518
  /**
@@ -1521,14 +1533,14 @@ var DeepSeekProvider = class extends OpenAICompatibleProvider {
1521
1533
  // ── V4 family (2026-04-23+):1M context,支持 Thinking / Non-Thinking 双模式 ──
1522
1534
  {
1523
1535
  id: "deepseek-v4-pro",
1524
- displayName: "DeepSeek V4 Pro (1.6T MoE, 49B active)",
1536
+ displayName: "DeepSeek V4 Pro (0813, 1.6T MoE, 49B active)",
1525
1537
  contextWindow: 1048576,
1526
1538
  supportsStreaming: true,
1527
1539
  supportsThinking: true
1528
1540
  },
1529
1541
  {
1530
1542
  id: "deepseek-v4-flash",
1531
- displayName: "DeepSeek V4 Flash (284B MoE, 13B active)",
1543
+ displayName: "DeepSeek V4 Flash (0731, 284B MoE, 13B active)",
1532
1544
  contextWindow: 1048576,
1533
1545
  supportsStreaming: true,
1534
1546
  supportsThinking: true
@@ -2,7 +2,7 @@
2
2
  import {
3
3
  CONFIG_DIR_NAME,
4
4
  PLUGINS_DIR_NAME
5
- } from "./chunk-KWYJFLXY.js";
5
+ } from "./chunk-JVUYKO4V.js";
6
6
  import {
7
7
  atomicWriteFileSync
8
8
  } from "./chunk-IW3Q7AE5.js";
@@ -1,7 +1,7 @@
1
1
  #!/usr/bin/env node
2
2
  import {
3
3
  VERSION
4
- } from "./chunk-KWYJFLXY.js";
4
+ } from "./chunk-JVUYKO4V.js";
5
5
 
6
6
  // src/cli/ci-format.ts
7
7
  var DEFAULT_CI_THRESHOLDS = {
@@ -6,7 +6,7 @@ import {
6
6
  MEMORY_FILE_NAME,
7
7
  MEMORY_MAX_CHARS,
8
8
  MEMORY_STORE_FILE_NAME
9
- } from "./chunk-ZQZEBPAQ.js";
9
+ } from "./chunk-4T4KHPRD.js";
10
10
  import {
11
11
  atomicWriteFileSync
12
12
  } from "./chunk-6BUTA5VW.js";