jinzd-ai-cli 0.4.261 → 0.4.263

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 (42) hide show
  1. package/README.md +29 -22
  2. package/README.zh-CN.md +32 -25
  3. package/THIRD_PARTY_NOTICES.md +88 -0
  4. package/dist/{batch-YUPAC4CK.js → batch-AN47AYCZ.js} +2 -2
  5. package/dist/{chunk-XZNRZGG2.js → chunk-3OBY7WSS.js} +1 -0
  6. package/dist/{chunk-R6DXWVVN.js → chunk-3RHY2HF7.js} +1 -1
  7. package/dist/{chunk-T7R7ILYT.js → chunk-5K2LFD7D.js} +1 -1
  8. package/dist/{chunk-KFNQESEG.js → chunk-7YCA2BD3.js} +1 -1
  9. package/dist/{chunk-NOB2OPQI.js → chunk-B27MLWFJ.js} +4 -4
  10. package/dist/{chunk-HU3IYBU5.js → chunk-GKI7B4BD.js} +7 -6
  11. package/dist/{chunk-Z5TCAE4L.js → chunk-GMZTY7DA.js} +4 -4
  12. package/dist/{chunk-GC4KA5LF.js → chunk-MJICIIBW.js} +1 -1
  13. package/dist/{chunk-YXMBP567.js → chunk-MTZ6XHJD.js} +2 -2
  14. package/dist/{chunk-DQY2DDGS.js → chunk-QG4NG7KJ.js} +1 -1
  15. package/dist/{chunk-W5XUZYQE.js → chunk-QMB7QYZC.js} +1 -1
  16. package/dist/{chunk-OIOTHBDB.js → chunk-TL5MD5XU.js} +49 -25
  17. package/dist/{chunk-323S2X5I.js → chunk-VKBGOFEO.js} +1 -1
  18. package/dist/{chunk-HGTDI5ME.js → chunk-VUZAKIZ5.js} +1 -1
  19. package/dist/{chunk-H6FND2UG.js → chunk-WM4VTGAF.js} +3 -1
  20. package/dist/{chunk-KQQHMGK7.js → chunk-XST4N2JM.js} +1 -1
  21. package/dist/{chunk-EZ6QLHOS.js → chunk-YRD6M5XI.js} +30 -5
  22. package/dist/{ci-FX26BNT2.js → ci-JTO7LN5S.js} +6 -6
  23. package/dist/{ci-format-GEWIAIZD.js → ci-format-2VGHOLBA.js} +2 -2
  24. package/dist/{constants-YN4B6C7B.js → constants-HLSJL5HQ.js} +1 -1
  25. package/dist/{doctor-cli-PXGXZYQB.js → doctor-cli-JML4FGH4.js} +6 -6
  26. package/dist/electron-server.js +112 -41
  27. package/dist/{hub-RCANK6SK.js → hub-6EYFGJRT.js} +1 -1
  28. package/dist/index.js +107 -58
  29. package/dist/{persistent-memory-P3COUZZM.js → persistent-memory-ANIMO5CF.js} +2 -2
  30. package/dist/{persistent-memory-UARSSYAA.js → persistent-memory-MPBPSZDN.js} +2 -2
  31. package/dist/{pr-7LQTAUFK.js → pr-XE7NGT6U.js} +6 -6
  32. package/dist/{run-tests-YNHESHYY.js → run-tests-ME5KED57.js} +2 -2
  33. package/dist/{run-tests-7RYU4BK5.js → run-tests-TF7UPUWW.js} +2 -2
  34. package/dist/{server-YZ37TL46.js → server-BIYJEJK3.js} +6 -6
  35. package/dist/{server-SSAWGNT7.js → server-VKA4FR2Z.js} +38 -19
  36. package/dist/{task-orchestrator-ZFL4E6NZ.js → task-orchestrator-2RAKLFWN.js} +6 -6
  37. package/dist/{usage-PDKM7J75.js → usage-5F5Q3GGR.js} +4 -4
  38. package/dist/web/client/actions.js +12 -7
  39. package/dist/web/client/app.js +5 -37
  40. package/dist/web/client/sidebar-tabs.js +48 -0
  41. package/dist/web/client/sw.js +1 -1
  42. package/package.json +13 -10
package/README.md CHANGED
@@ -5,6 +5,7 @@
5
5
  <!-- AICLI:DOCS_DEFAULT_WEB_PORT=3000 -->
6
6
  <!-- AICLI:DOCS_BUILTIN_TOOL_COUNT=30 -->
7
7
  <!-- AICLI:DOCS_REPL_COMMAND_COUNT=48 -->
8
+ <!-- AICLI:DOCS_BUILTIN_PROVIDER_COUNT=10 -->
8
9
  <!-- AICLI:DOCS_MEMORY_SOURCE=memory.jsonl -->
9
10
 
10
11
  > A cross-platform AI coding assistant — CLI, Web UI, and Desktop App — with multi-provider support and agentic tool calling
@@ -12,7 +13,6 @@
12
13
  [![npm version](https://img.shields.io/npm/v/jinzd-ai-cli)](https://www.npmjs.com/package/jinzd-ai-cli)
13
14
  [![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](LICENSE)
14
15
  [![Node.js](https://img.shields.io/badge/node-%3E%3D20.18.1-brightgreen)](https://nodejs.org)
15
- [![Tests](https://img.shields.io/badge/tests-1639%20passing-brightgreen)]()
16
16
  [![GitHub Release](https://img.shields.io/github/v/release/jinzhengdong/ai-cli)](https://github.com/jinzhengdong/ai-cli/releases)
17
17
  [![CI](https://github.com/jinzhengdong/ai-cli/actions/workflows/ci.yml/badge.svg)](https://github.com/jinzhengdong/ai-cli/actions/workflows/ci.yml)
18
18
 
@@ -131,13 +131,14 @@ aicli user delete x # Delete user
131
131
  |----------|--------|-------------|
132
132
  | **Claude** | Opus 4, Sonnet 4, Haiku 4 | [console.anthropic.com](https://console.anthropic.com) |
133
133
  | **Gemini** | 2.5 Pro, 2.5 Flash | [aistudio.google.com](https://aistudio.google.com) |
134
- | **DeepSeek** | DeepSeek-Chat (V3), Reasoner (R1) | [platform.deepseek.com](https://platform.deepseek.com) |
134
+ | **DeepSeek** | deepseek-v4-flash (default), deepseek-v4-pro | [platform.deepseek.com](https://platform.deepseek.com) |
135
135
  | **OpenAI** | GPT-5.4, GPT-5, GPT-4.1, o3, o4-mini | [platform.openai.com](https://platform.openai.com) |
136
136
  | **OpenRouter** | 300+ models (Claude, GPT, Gemini, Llama, Qwen, Mistral...) | [openrouter.ai](https://openrouter.ai) |
137
137
  | **Zhipu** | GLM-4, GLM-5 | [open.bigmodel.cn](https://open.bigmodel.cn) |
138
138
  | **Kimi** | Kimi K2.6, K2.5, K2 Thinking | [platform.moonshot.cn](https://platform.moonshot.cn) |
139
- | **Qwen** | qwen-plus, qwen-max, qwen-turbo, qwen-coder-plus | [bailian.console.aliyun.com](https://bailian.console.aliyun.com) |
140
- | **Ollama** | Any locally installed model (Llama, Qwen, Gemma, Mistral...) | No API key — [ollama.com](https://ollama.com) |
139
+ | **Qwen** | qwen-plus, qwen-max, qwen-turbo, qwen-coder-plus | [bailian.console.aliyun.com](https://bailian.console.aliyun.com) |
140
+ | **MiniMax** | MiniMax-M3 (default), M2.7, M2.5, M2.1, M2 | [platform.minimaxi.com](https://platform.minimaxi.com) |
141
+ | **Ollama** | Any locally installed model (Llama, Qwen, Gemma, Mistral...) | No API key — [ollama.com](https://ollama.com) |
141
142
 
142
143
  Any OpenAI-compatible API can also be used via `customBaseUrls` in config.
143
144
 
@@ -171,10 +172,11 @@ AI autonomously invokes these 30 tools during conversations:
171
172
  | `edit_file` | write | Precise string replacement with fuzzy matching hints + `replaceAll` mode |
172
173
  | `list_dir` | safe | List directory contents |
173
174
  | `grep_files` | safe | Regex search across files |
174
- | `glob_files` | safe | Match files by glob pattern |
175
- | `web_fetch` | safe | Fetch web pages as Markdown (SSRF-protected) |
176
- | `google_search` | safe | Google Custom Search API |
177
- | `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 |
178
180
  | `run_tests` | safe | Auto-detect and run project tests (JUnit XML parsing) |
179
181
  | `spawn_agent` | safe | Delegate subtasks to named isolated agents (`agent`: explorer/worker/reviewer/security/tester) |
180
182
  | `ask_user` | safe | Pause and ask the user a question |
@@ -191,10 +193,11 @@ AI autonomously invokes these 30 tools during conversations:
191
193
  | `notebook_edit` | write | Edit Jupyter notebook cells (add/edit/delete/move) |
192
194
  | `find_symbol` | safe | Locate symbol definitions via persistent tree-sitter index (TS/JS/TSX/Python/Go/Rust/Java/C++) |
193
195
  | `get_outline` | safe | Enumerate all top-level declarations in one source file |
194
- | `find_references` | safe | Search indexed files for references to a symbol name |
195
- | `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 |
196
199
 
197
- **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.
198
201
 
199
202
  ## Key REPL Commands
200
203
 
@@ -462,8 +465,9 @@ Environment variables take precedence over config file values:
462
465
  | `AICLI_API_KEY_OPENROUTER` | OpenRouter API Key |
463
466
  | `AICLI_API_KEY_ZHIPU` | Zhipu API Key |
464
467
  | `AICLI_API_KEY_KIMI` | Kimi API Key |
465
- | `AICLI_API_KEY_QWEN` | Qwen / Alibaba Cloud API Key |
466
- | `AICLI_PROVIDER` | Default provider ID |
468
+ | `AICLI_API_KEY_QWEN` | Qwen / Alibaba Cloud API Key |
469
+ | `AICLI_API_KEY_MINIMAX` | MiniMax API Key |
470
+ | `AICLI_PROVIDER` | Default provider ID |
467
471
  | `AICLI_NO_STREAM` | Set to `1` to disable streaming |
468
472
  | `HTTPS_PROXY` / `HTTP_PROXY` | Proxy URL |
469
473
 
@@ -517,15 +521,15 @@ The Web UI (`aicli web`) provides a full-featured browser interface:
517
521
  ## Testing
518
522
 
519
523
  ```bash
520
- npm test # Offline regression suite: 91 files, 1639 passed, 2 skipped
524
+ npm test # Offline regression suite
521
525
  npm run test:providers # Real-provider smoke tests (network/API-key dependent)
522
526
  npm run test:e2e-web # Playwright browser smoke; may need browser-process permission in sandboxes
523
527
  npm run test:watch # Watch mode
524
528
  ```
525
529
 
526
- 79 offline test files covering: authentication, sessions, tool types & danger levels, permissions, output truncation, diff rendering, edit-file similarity, error hierarchy, config management, env loading, provider registry, web-fetch, grep-files, hub renderer, hub discussion, hub presets, dev-state, token estimator, tool registry budget, parallel tool execution, cost tracker, session tool history.
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.
527
531
 
528
- ## Releasing (Version Bump → npm PublishGitHub Push)
532
+ ## Releasing (Version Bump → Git TagTrusted npm Publish)
529
533
 
530
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.
531
535
 
@@ -533,7 +537,7 @@ npm run test:watch # Watch mode
533
537
 
534
538
  - You are on the `main` branch and the changes to ship are already in the working tree.
535
539
  - `npx tsc --noEmit` is clean and `npm test` is green (the script enforces both and rolls the bump back on failure).
536
- - 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`.
537
541
  - You have push access to the GitHub remote.
538
542
 
539
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.)
@@ -560,10 +564,10 @@ node scripts/release.mjs patch -m "..." --dry-run
560
564
  5. `npm test` must pass (rolls the bump back on failure).
561
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`.
562
566
  7. `git add -A` + commit `"<title> (vX.Y.Z)"` (message passed via argv, not shell-interpolated).
563
- 8. `npm publish` (the build runs automatically via `prepublishOnly`), then re-queries the registry to confirm the new version is live.
564
- 9. `git push` to `main`.
565
-
566
- **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`.
567
571
 
568
572
  ## Documentation
569
573
 
@@ -573,7 +577,10 @@ node scripts/release.mjs patch -m "..." --dry-run
573
577
  - [`docs/MIGRATION.md`](docs/MIGRATION.md) — Migration guide from Claude Code, Codex, Claude Desktop, and Cursor
574
578
  - [`docs/RECIPES.md`](docs/RECIPES.md) — Practical recipes by scenario
575
579
  - [`docs/SECURITY.md`](docs/SECURITY.md) — **Security model, deployment checklist, audit history.** Read before exposing `aicli web` to a network.
576
- - [`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
577
584
  - [Chinese README](README.zh-CN.md) — 中文说明文档
578
585
 
579
586
  ## License
package/README.zh-CN.md CHANGED
@@ -5,6 +5,7 @@
5
5
  <!-- AICLI:DOCS_DEFAULT_WEB_PORT=3000 -->
6
6
  <!-- AICLI:DOCS_BUILTIN_TOOL_COUNT=30 -->
7
7
  <!-- AICLI:DOCS_REPL_COMMAND_COUNT=48 -->
8
+ <!-- AICLI:DOCS_BUILTIN_PROVIDER_COUNT=10 -->
8
9
  <!-- AICLI:DOCS_MEMORY_SOURCE=memory.jsonl -->
9
10
 
10
11
  > 跨平台 AI 编程助手 — CLI 终端、Web 界面、桌面应用三合一,支持 10 大 Provider(含本地 Ollama)与 Agentic 工具调用
@@ -12,7 +13,6 @@
12
13
  [![npm version](https://img.shields.io/npm/v/jinzd-ai-cli)](https://www.npmjs.com/package/jinzd-ai-cli)
13
14
  [![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](LICENSE)
14
15
  [![Node.js](https://img.shields.io/badge/node-%3E%3D20.18.1-brightgreen)](https://nodejs.org)
15
- [![Tests](https://img.shields.io/badge/tests-1097%20passing-brightgreen)]()
16
16
  [![GitHub Release](https://img.shields.io/github/v/release/jinzhengdong/ai-cli)](https://github.com/jinzhengdong/ai-cli/releases)
17
17
  [![CI](https://github.com/jinzhengdong/ai-cli/actions/workflows/ci.yml/badge.svg)](https://github.com/jinzhengdong/ai-cli/actions/workflows/ci.yml)
18
18
 
@@ -119,13 +119,14 @@ aicli user delete x # 删除用户
119
119
  |----------|------|-------------|
120
120
  | **Claude** | Opus 4, Sonnet 4, Haiku 4 | [console.anthropic.com](https://console.anthropic.com) |
121
121
  | **Gemini** | 2.5 Pro, 2.5 Flash | [aistudio.google.com](https://aistudio.google.com) |
122
- | **DeepSeek** | DeepSeek-Chat (V3), Reasoner (R1) | [platform.deepseek.com](https://platform.deepseek.com) |
122
+ | **DeepSeek** | deepseek-v4-flash(默认), deepseek-v4-pro | [platform.deepseek.com](https://platform.deepseek.com) |
123
123
  | **OpenAI** | GPT-5.4, GPT-5, GPT-4.1, o3, o4-mini | [platform.openai.com](https://platform.openai.com) |
124
124
  | **OpenRouter** | 300+ 模型(Claude/GPT/Gemini/Llama/Qwen/Mistral...) | [openrouter.ai](https://openrouter.ai) |
125
- | **智谱清言** | GLM-4, GLM-5 | [open.bigmodel.cn](https://open.bigmodel.cn) |
125
+ | **Zhipu(智谱)** | GLM-4, GLM-5 | [open.bigmodel.cn](https://open.bigmodel.cn) |
126
126
  | **Kimi** | Kimi K2.6, K2.5, K2 Thinking | [platform.moonshot.cn](https://platform.moonshot.cn) |
127
- | **Qwen** | qwen-plus, qwen-max, qwen-turbo, qwen-coder-plus | [bailian.console.aliyun.com](https://bailian.console.aliyun.com) |
128
- | **Ollama** | 任意本地模型(LlamaQwenGemmaMistral...) | 无需 API Key — [ollama.com](https://ollama.com) |
127
+ | **Qwen** | qwen-plus, qwen-max, qwen-turbo, qwen-coder-plus | [bailian.console.aliyun.com](https://bailian.console.aliyun.com) |
128
+ | **MiniMax** | MiniMax-M3(默认)、M2.7M2.5M2.1M2 | [platform.minimaxi.com](https://platform.minimaxi.com) |
129
+ | **Ollama** | 任意本地模型(Llama、Qwen、Gemma、Mistral...) | 无需 API Key — [ollama.com](https://ollama.com) |
129
130
 
130
131
  也可通过 `customBaseUrls` 配置接入任意 OpenAI 兼容 API。
131
132
 
@@ -159,10 +160,11 @@ AI 在对话中可自主调用 30 个工具:
159
160
  | `edit_file` | 写入 | 精确字符串替换,模糊匹配提示 + `replaceAll` 全局替换模式 |
160
161
  | `list_dir` | 安全 | 列出目录内容 |
161
162
  | `grep_files` | 安全 | 正则搜索文件内容 |
162
- | `glob_files` | 安全 | 按 glob 模式匹配文件 |
163
- | `web_fetch` | 安全 | 抓取网页转 Markdown(防 SSRF) |
164
- | `google_search` | 安全 | Google 自定义搜索 |
165
- | `run_interactive` | 安全 | 运行交互式程序并输入 |
163
+ | `glob_files` | 安全 | 按 glob 模式匹配文件 |
164
+ | `web_fetch` | 安全 | 抓取网页转 Markdown(防 SSRF) |
165
+ | `web_search` | 安全 | 无需 Key 的 Bing/Google 网页搜索,弱结果自动降级 |
166
+ | `google_search` | 安全 | Google 自定义搜索 |
167
+ | `run_interactive` | 写入 | 运行交互式程序并输入;任意可执行程序均需确认 |
166
168
  | `run_tests` | 安全 | 自动检测并运行测试(JUnit XML 解析) |
167
169
  | `spawn_agent` | 安全 | 委派子任务给命名隔离 agent(`agent`: explorer/worker/reviewer/security/tester) |
168
170
  | `ask_user` | 安全 | 暂停并向用户提问 |
@@ -179,10 +181,11 @@ AI 在对话中可自主调用 30 个工具:
179
181
  | `notebook_edit` | 写入 | 编辑 Jupyter notebook 单元格(增/改/删/移动) |
180
182
  | `find_symbol` | 安全 | 按名称精确查找函数/类/方法定义(C1,tree-sitter 索引) |
181
183
  | `get_outline` | 安全 | 获取文件的符号大纲(类 → 方法树)(C1) |
182
- | `find_references` | 安全 | 查找符号的所有引用(C1) |
183
- | `search_code` | 安全 | 语义代码搜索(C2,自然语言查询,中英文均可) |
184
+ | `find_references` | 安全 | 查找符号的所有引用(C1) |
185
+ | `search_code` | 安全 | 语义代码搜索(C2,自然语言查询,中英文均可) |
186
+ | `recall_memory` | 安全 | 从历史聊天会话中语义召回相关片段 |
184
187
 
185
- **安全级别**:`安全` = 自动执行,`写入` = diff 预览 + 确认,`破坏性` = 醒目警告 + 确认。
188
+ **安全级别**:`安全` = 自动执行,`写入` = 需要确认(文件编辑工具还会显示 diff 预览),`破坏性` = 醒目警告 + 确认。
186
189
 
187
190
  ### 文档深入阅读
188
191
 
@@ -420,8 +423,9 @@ Auto Mode 不会被项目配置静默开启。用 `/permissions recently-denied`
420
423
  | `AICLI_API_KEY_OPENROUTER` | OpenRouter API Key |
421
424
  | `AICLI_API_KEY_ZHIPU` | 智谱 API Key |
422
425
  | `AICLI_API_KEY_KIMI` | Kimi API Key |
423
- | `AICLI_API_KEY_QWEN` | Qwen / Alibaba Cloud API Key |
424
- | `AICLI_PROVIDER` | 默认 Provider |
426
+ | `AICLI_API_KEY_QWEN` | Qwen / Alibaba Cloud API Key |
427
+ | `AICLI_API_KEY_MINIMAX` | MiniMax API Key |
428
+ | `AICLI_PROVIDER` | 默认 Provider |
425
429
  | `AICLI_NO_STREAM` | 设为 `1` 禁用流式输出 |
426
430
  | `HTTPS_PROXY` / `HTTP_PROXY` | 代理地址 |
427
431
 
@@ -475,13 +479,13 @@ Web UI(`aicli web`)提供功能完备的浏览器界面:
475
479
  ## 测试
476
480
 
477
481
  ```bash
478
- npm test # 运行全部 515 个测试(30 suites)
482
+ npm test # 运行离线回归测试
479
483
  npm run test:watch # 监听模式
480
484
  ```
481
485
 
482
- 26 个测试套件覆盖:认证、会话、工具类型与危险级别、权限、输出截断、diff 渲染、edit-file 相似度、错误层级、配置管理、环境变量、Provider 注册、web-fetch、grep-files、Hub 渲染、Hub 讨论、Hub 预设、开发状态、Token 估算、工具注册表预算、并行工具执行、费用追踪、会话工具历史。
486
+ 离线测试覆盖:认证、会话、工具类型与危险级别、权限、输出截断、diff 渲染、edit-file 相似度、错误层级、配置管理、环境变量、Provider 注册、web-fetch、grep-files、Hub、开发状态、Token 估算、工具注册表预算、并行工具执行、费用追踪和会话工具历史。
483
487
 
484
- ## 发布(版本提升 → npm 发布推送 GitHub)
488
+ ## 发布(版本提升 → Git Tagnpm 可信发布)
485
489
 
486
490
  > **给贡献者与 AI 模型:整个发布流程一律走 [`scripts/release.mjs`](scripts/release.mjs),切勿手动 bump 版本号或自己跑 `npm publish`。** 曾经手工 publish 的 `0.4.207` 装上后 `--version` 报错版本号,被迫补发 `0.4.208` 对齐——脚本的四道守卫就是为拦住这类事故而存在。
487
491
 
@@ -489,7 +493,7 @@ npm run test:watch # 监听模式
489
493
 
490
494
  - 当前在 `main` 分支,待发布的改动已在工作区。
491
495
  - `npx tsc --noEmit` 零错误、`npm test` 全绿(脚本会强制校验,失败自动回滚版本号)。
492
- - 已登录 npm 且是包的 owner(`npm whoami`)。
496
+ - 已为 `jinzd-ai-cli` `.github/workflows/release.yml` 配置 npm Trusted Publishing。
493
497
  - 有 GitHub 远端推送权限。
494
498
 
495
499
  **第 1 步 —— 先写里程碑条目(Guard A)。** 在 [`CLAUDE.md`](CLAUDE.md) 的 `## 最近里程碑` 一节加一行,条目中必须含目标版本的**全角括号**标记 `(vX.Y.Z)`,否则脚本拒绝启动。(完整叙事写进 `CHANGELOG.md`,本节只留一行式索引。)
@@ -516,14 +520,17 @@ node scripts/release.mjs patch -m "..." --dry-run
516
520
  5. `npm test` 必须全绿(失败则回滚版本号)。
517
521
  6. 打印进入发布 commit 的完整文件清单,若含疑似敏感文件(`.env`、`*.pem`、`*.key`、`secret`…)直接拦下,确认无误加 `--allow-sensitive`。
518
522
  7. `git add -A` + commit `"<标题> (vX.Y.Z)"`(消息走 argv 传参,不经 shell 拼接)。
519
- 8. `npm publish`(build 经 `prepublishOnly` 自动跑),再回查 registry 确认新版本已上线。
520
- 9. `git push` 推送 `main`。
521
-
522
- **可选 flag:** `--dry-run` · `--skip-tests` · `--no-publish` · `--no-push` · `--allow-sensitive`。
523
-
524
- ## 文档
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` 的兼容别名。
525
527
 
526
- - [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)
527
534
 
528
535
  ## License
529
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-H6FND2UG.js";
4
+ } from "./chunk-WM4VTGAF.js";
5
5
  import "./chunk-TU3L3PW7.js";
6
- import "./chunk-323S2X5I.js";
6
+ import "./chunk-VKBGOFEO.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.261";
2
+ var VERSION = "0.4.263";
3
3
  var APP_NAME = "ai-cli";
4
4
  var CONFIG_DIR_NAME = ".aicli";
5
5
  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-R6DXWVVN.js";
9
+ } from "./chunk-3RHY2HF7.js";
10
10
  import {
11
11
  atomicWriteFileSync
12
12
  } from "./chunk-6BUTA5VW.js";
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  TEST_TIMEOUT
3
- } from "./chunk-R6DXWVVN.js";
3
+ } from "./chunk-3RHY2HF7.js";
4
4
 
5
5
  // src/tools/builtin/run-tests.ts
6
6
  import { execSync, spawnSync } from "child_process";
@@ -1,10 +1,10 @@
1
1
  #!/usr/bin/env node
2
2
  import {
3
3
  ProviderRegistry
4
- } from "./chunk-OIOTHBDB.js";
4
+ } from "./chunk-TL5MD5XU.js";
5
5
  import {
6
6
  ConfigManager
7
- } from "./chunk-H6FND2UG.js";
7
+ } from "./chunk-WM4VTGAF.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-W5XUZYQE.js";
17
+ } from "./chunk-QMB7QYZC.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-323S2X5I.js";
29
+ } from "./chunk-VKBGOFEO.js";
30
30
 
31
31
  // src/diagnostics/doctor-report.ts
32
32
  import { existsSync as existsSync3, statSync as statSync2 } from "fs";
@@ -7,7 +7,7 @@ import {
7
7
  searchPersistentMemories,
8
8
  touchMemoryReferences,
9
9
  updateMemoryEntry
10
- } from "./chunk-HGTDI5ME.js";
10
+ } from "./chunk-VUZAKIZ5.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-W5XUZYQE.js";
26
+ } from "./chunk-QMB7QYZC.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-KQQHMGK7.js";
43
+ } from "./chunk-XST4N2JM.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-323S2X5I.js";
50
+ } from "./chunk-VKBGOFEO.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,
@@ -2,7 +2,7 @@
2
2
  import {
3
3
  evaluateCiGate,
4
4
  normalizeCiThresholds
5
- } from "./chunk-GC4KA5LF.js";
5
+ } from "./chunk-MJICIIBW.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-OIOTHBDB.js";
13
+ } from "./chunk-TL5MD5XU.js";
14
14
  import {
15
15
  ConfigManager
16
- } from "./chunk-H6FND2UG.js";
16
+ } from "./chunk-WM4VTGAF.js";
17
17
  import {
18
18
  VERSION
19
- } from "./chunk-323S2X5I.js";
19
+ } from "./chunk-VKBGOFEO.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
  VERSION
4
- } from "./chunk-323S2X5I.js";
4
+ } from "./chunk-VKBGOFEO.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-HU3IYBU5.js";
4
+ } from "./chunk-GKI7B4BD.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-323S2X5I.js";
14
+ } from "./chunk-VKBGOFEO.js";
15
15
  import {
16
16
  atomicWriteFileSync
17
17
  } from "./chunk-IW3Q7AE5.js";
@@ -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";
@@ -2,7 +2,7 @@
2
2
  import {
3
3
  CONFIG_DIR_NAME,
4
4
  PLUGINS_DIR_NAME
5
- } from "./chunk-323S2X5I.js";
5
+ } from "./chunk-VKBGOFEO.js";
6
6
  import {
7
7
  atomicWriteFileSync
8
8
  } from "./chunk-IW3Q7AE5.js";