@huicai/cli 2026.711.0 → 2026.711.24616

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 (49) hide show
  1. package/LICENSE +43 -21
  2. package/package.json +4 -3
  3. package/src/advisor.js +1 -46
  4. package/src/agent.js +1 -518
  5. package/src/api.js +1 -359
  6. package/src/autofix.js +1 -90
  7. package/src/banner.js +1 -83
  8. package/src/checkpoints.js +1 -99
  9. package/src/clipboard.js +1 -34
  10. package/src/codeindex.js +1 -229
  11. package/src/colors.js +1 -47
  12. package/src/commands.js +1 -1294
  13. package/src/compaction.js +1 -144
  14. package/src/config.js +1 -86
  15. package/src/consult.js +1 -65
  16. package/src/context-report.js +1 -119
  17. package/src/context.js +1 -152
  18. package/src/cron.js +1 -64
  19. package/src/daemon.js +1 -62
  20. package/src/device.js +1 -88
  21. package/src/diffview.js +1 -115
  22. package/src/doctor.js +1 -72
  23. package/src/executors.js +1 -391
  24. package/src/forks.js +1 -59
  25. package/src/gitflow.js +1 -140
  26. package/src/hooks.js +1 -207
  27. package/src/ide.js +1 -53
  28. package/src/input.js +1 -182
  29. package/src/insights.js +1 -102
  30. package/src/kbsync.js +1 -141
  31. package/src/markdown.js +0 -0
  32. package/src/markup-filter.js +1 -85
  33. package/src/mcp.js +1 -207
  34. package/src/memory.js +1 -161
  35. package/src/permissions.js +1 -120
  36. package/src/render.js +1 -138
  37. package/src/repl.js +1 -271
  38. package/src/scan.js +1 -84
  39. package/src/schedule.js +1 -48
  40. package/src/session.js +1 -140
  41. package/src/settings.js +0 -0
  42. package/src/skills.js +1 -248
  43. package/src/subagent.js +1 -183
  44. package/src/todo.js +1 -75
  45. package/src/tools.js +1 -147
  46. package/src/transcript.js +1 -94
  47. package/src/tui/app.js +1 -666
  48. package/src/usage.js +1 -43
  49. package/src/watch.js +1 -74
package/LICENSE CHANGED
@@ -1,21 +1,43 @@
1
- MIT License
2
-
3
- Copyright (c) 2026 HuiCai AI
4
-
5
- Permission is hereby granted, free of charge, to any person obtaining a copy
6
- of this software and associated documentation files (the "Software"), to deal
7
- in the Software without restriction, including without limitation the rights
8
- to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
- copies of the Software, and to permit persons to whom the Software is
10
- furnished to do so, subject to the following conditions:
11
-
12
- The above copyright notice and this permission notice shall be included in all
13
- copies or substantial portions of the Software.
14
-
15
- THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
- IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
- FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
- AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
- LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
- OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
- SOFTWARE.
1
+ HuiCai AI — 专有软件许可协议 / Proprietary Software License
2
+
3
+ 版权所有 © 2026 HuiCai 保留所有权利。
4
+ Copyright © 2026 HuiCai. All rights reserved.
5
+
6
+ 本软件(包括 HuiCai AI 命令行工具、VS Code 扩展、JetBrains 插件及其捆绑的
7
+ 核心代码、资源与文档,下称"本软件")为汇材及其许可方的专有财产,受著作权法
8
+ 及国际条约保护。本软件按许可授权使用,而非出售。
9
+
10
+ 1. 授权。在您遵守本协议的前提下,汇材授予您一项有限的、非独占的、不可转让、
11
+ 不可再许可的权利,以目标代码形式安装并使用本软件,用于您的内部业务用途。
12
+
13
+ 2. 限制。除适用法律明确允许或经汇材事先书面同意外,您不得:
14
+ (a) 复制、分发、出售、出租、出借、再许可或以其他方式向第三方提供本软件;
15
+ (b) 修改、翻译、改编本软件,或基于本软件创作衍生作品;
16
+ (c) 反向工程、反编译、反汇编本软件,或以其他方式尝试获取其源代码或内部结构
17
+ (适用法律明确不可排除者除外);
18
+ (d) 去除或更改本软件中的任何专有声明、标识或标记。
19
+
20
+ 3. 所有权。本软件的一切权利、所有权及知识产权均归汇材及其许可方所有。本协议
21
+ 未明确授予的权利均予保留。
22
+
23
+ 4. 无担保。本软件按"现状"提供,不附带任何明示或默示担保。
24
+
25
+ 5. 责任限制。在法律允许的最大范围内,汇材不对因使用或无法使用本软件而产生的
26
+ 任何间接、附带、特殊或后果性损害承担责任。
27
+
28
+ 6. 终止。若您违反本协议,本授权自动终止;届时您须停止使用并销毁本软件的全部
29
+ 副本。
30
+
31
+ 如需商业授权、再分发或源代码相关事宜,请联系 1253007701@qq.com。
32
+
33
+ ------------------------------------------------------------------------------
34
+
35
+ This software (the "Software", including the HuiCai AI CLI, the VS Code
36
+ extension, the JetBrains plugin, and their bundled core code, resources and
37
+ documentation) is the proprietary property of HuiCai and its licensors. It is
38
+ licensed, not sold. Except as expressly permitted above or by applicable law,
39
+ you may not copy, distribute, sell, rent, sublicense, modify, translate, create
40
+ derivative works of, reverse-engineer, decompile or disassemble the Software,
41
+ nor remove any proprietary notices. All rights not expressly granted are
42
+ reserved. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND. The
43
+ Chinese text above governs. Contact: 1253007701@qq.com
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@huicai/cli",
3
- "version": "2026.711.0",
4
- "versionDisplay": "2026.07.11",
3
+ "version": "2026.711.24616",
4
+ "versionDisplay": "2026.07.11.24616",
5
5
  "description": "在终端运行的智能体 CLI:以 HuiCai_AI 平台的 OpenAI 兼容 /v1 为模型后端,在用户本机执行文件/命令工具。",
6
6
  "type": "module",
7
7
  "bin": {
@@ -22,6 +22,7 @@
22
22
  "check": "node --check bin/huicai.js",
23
23
  "test": "node --test --test-concurrency=1 test/*.test.mjs",
24
24
  "version:next": "node scripts/next-version.cjs",
25
+ "pack:release": "node scripts/pack-release.cjs",
25
26
  "prepublishOnly": "node --check bin/huicai.js"
26
27
  },
27
28
  "keywords": [
@@ -34,7 +35,7 @@
34
35
  "coding-agent"
35
36
  ],
36
37
  "author": "ChenBo",
37
- "license": "MIT",
38
+ "license": "SEE LICENSE IN LICENSE",
38
39
  "homepage": "https://github.com/SJHT-SDK/huicai-cli/tree/master#readme",
39
40
  "repository": {
40
41
  "type": "git",
package/src/advisor.js CHANGED
@@ -1,46 +1 @@
1
- // Advisor 升配(会决策):设置了「顾问模型」(更强的模型)后,暴露 ask_advisor 工具——
2
- // 智能体遇到难题/复杂决策/反复卡住时,可主动向更强模型请教独立第二意见,再据此决策。
3
- // 仅当 config.advisorModel 非空时构造(否则返回 null,不暴露该工具)。
4
-
5
- import { streamChat } from './api.js';
6
-
7
- export function makeAdvisorTool({ config }) {
8
- if (!config?.advisorModel) return null;
9
- const spec = {
10
- type: 'function',
11
- function: {
12
- name: 'ask_advisor',
13
- description:
14
- '遇到难题、复杂决策或反复卡住时,向一个更强的「技术顾问」模型请教独立的第二意见。'
15
- + '把问题背景、已知信息、已尝试过什么、待决策点写清楚(自足),它会给出判断/方案与关键风险。'
16
- + '用于真正的难点或高风险决策,不要滥用。',
17
- parameters: {
18
- type: 'object',
19
- properties: {
20
- question: { type: 'string', description: '自足的难题描述(含背景、已尝试、待决策点)' },
21
- },
22
- required: ['question'],
23
- },
24
- },
25
- };
26
- const run = async (args) => {
27
- const q = String(args?.question || '').trim();
28
- if (!q) return '缺少 question';
29
- try {
30
- const r = await streamChat({
31
- baseUrl: config.baseUrl,
32
- apiKey: config.apiKey,
33
- model: config.advisorModel,
34
- messages: [
35
- { role: 'system', content: '你是资深技术顾问,正被一个编码智能体咨询一个难题。基于它提供的信息,给出清晰、具体、可执行的判断或方案:'
36
- + '指出关键风险、推荐做法、以及为何。简洁直接,不要寒暄。' },
37
- { role: 'user', content: q },
38
- ],
39
- });
40
- return `【顾问(${config.advisorModel})意见】\n` + ((r.content || '(顾问无回复)').trim());
41
- } catch (e) {
42
- return '咨询顾问失败:' + e.message;
43
- }
44
- };
45
- return { readOnly: true, spec, run };
46
- }
1
+ import{streamChat as e}from"./api.js";export function makeAdvisorTool({config:r}){if(!r?.advisorModel)return null;return{readOnly:!0,spec:{type:"function",function:{name:"ask_advisor",description:"遇到难题、复杂决策或反复卡住时,向一个更强的「技术顾问」模型请教独立的第二意见。把问题背景、已知信息、已尝试过什么、待决策点写清楚(自足),它会给出判断/方案与关键风险。用于真正的难点或高风险决策,不要滥用。",parameters:{type:"object",properties:{question:{type:"string",description:"自足的难题描述(含背景、已尝试、待决策点)"}},required:["question"]}}},run:async t=>{const n=String(t?.question||"").trim();if(!n)return"缺少 question";try{const t=await e({baseUrl:r.baseUrl,apiKey:r.apiKey,model:r.advisorModel,messages:[{role:"system",content:"你是资深技术顾问,正被一个编码智能体咨询一个难题。基于它提供的信息,给出清晰、具体、可执行的判断或方案:指出关键风险、推荐做法、以及为何。简洁直接,不要寒暄。"},{role:"user",content:n}]});return`【顾问(${r.advisorModel})意见】\n`+(t.content||"(顾问无回复)").trim()}catch(e){return"咨询顾问失败:"+e.message}}}}