@ai-zen/cli 0.8.0 → 0.8.1
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.
- package/CHANGELOG.md +14 -0
- package/README.md +2 -2
- package/README.zh.md +2 -2
- package/package.json +3 -3
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,19 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## [0.8.1] - 2026-09-28
|
|
4
|
+
|
|
5
|
+
### 🚀 新功能
|
|
6
|
+
|
|
7
|
+
- **Skill 子 Agent 纳入子 Agent 上下文护栏与流式渲染** — 依托 SDK 0.11.0 将 `call_skill_sub_agent` 统一到 `AgentToolLazy`,技能子 Agent 自此与常规 SubAgent 共享同一套委派边界(`onSubAgentStart` / `onSubAgentEnd` 钩子与 `sub-agent-start` / `sub-agent-end` 事件)。故 0.8.0 引入的 `SubAgentGuardInstallerPlugin` 与子 Agent 流式渲染**自动覆盖**该路径,本次 CLI 无源码改动(0.8.0 CHANGELOG「覆盖范围」中「技能子 Agent 不在覆盖范围」的说明随之失效)
|
|
8
|
+
|
|
9
|
+
### ⚠️ 依赖升级
|
|
10
|
+
|
|
11
|
+
- **`@ai-zen/agents-core` 升至 `^4.3.0`、`@ai-zen/agents-sdk` 升至 `^0.11.0`** — `src/version.ts` 由实际安装版本读取,版本横幅随之显示 core `4.3.0` / sdk `0.11.0`。SDK 0.11.0 的破坏性变更(`createCallSkillSubAgentTool` 移除第三参 `provider`)仅影响直接调用该工厂函数的代码;CLI 经 `Provider.instantiate` 间接使用,无需适配
|
|
12
|
+
|
|
13
|
+
### ✅ 测试
|
|
14
|
+
|
|
15
|
+
- 沿用既有 9 文件 / 74 用例,全部通过;`tsc --noEmit` 与 `npm run build`(`0.8.1`)均通过
|
|
16
|
+
|
|
3
17
|
## [0.8.0] - 2026-09-28
|
|
4
18
|
|
|
5
19
|
### 🚀 新功能
|
package/README.md
CHANGED
|
@@ -84,7 +84,7 @@ When the API response's `usage.prompt_tokens` exceeds the model's `maxContextTok
|
|
|
84
84
|
|
|
85
85
|
You can also manually trigger a migration at any time by typing `/migrate` in the conversation — no need to wait for the token limit. Both automatic and manual migration delegate to the SDK's `TaskMigrationService`, so the handoff document is always produced consistently.
|
|
86
86
|
|
|
87
|
-
The same context guard also applies to **sub-agents**: at each delegation boundary (`onSubAgentStart`) the CLI installs the same `ContextGuardPlugin` (same `maxTokens`) onto the newly built sub-agent, so a delegated sub-agent is interrupted as soon as its context exceeds the hard limit. This is transparent — a normally-running sub-agent is unaffected.
|
|
87
|
+
The same context guard also applies to **sub-agents**: at each delegation boundary (`onSubAgentStart`) the CLI installs the same `ContextGuardPlugin` (same `maxTokens`) onto the newly built sub-agent, so a delegated sub-agent (including the Skill sub-agent created by `call_skill_sub_agent`) is interrupted as soon as its context exceeds the hard limit. This is transparent — a normally-running sub-agent is unaffected.
|
|
88
88
|
|
|
89
89
|
The migration prompt template includes:
|
|
90
90
|
- **Conversation Breakpoint** — Last user/AI exchange verbatim
|
|
@@ -248,7 +248,7 @@ Tools are assembled in three phases by the SDK's `Provider` capability pipeline:
|
|
|
248
248
|
2. **Filtering** — Apply permissions (`allow`/`deny`), security exclusions (recursion protection), and each tool's self-declared `isAvailable(config, definition)` (availability is decided at build time when the model is known; e.g. `viewImage` only for vision models, `generateImage` requires `defaultImageModel`)
|
|
249
249
|
3. **Instantiation** — Map filtered names to `Tool` instances and register dynamic loaders
|
|
250
250
|
|
|
251
|
-
Each Agent has independent permissions — no inheritance between parent Agent and SubAgent. The only exception is the temporary Skill sub-agent (created by `call_skill_sub_agent`), which
|
|
251
|
+
Each Agent has independent permissions — no inheritance between parent Agent and SubAgent. The only exception is the temporary Skill sub-agent (created by `call_skill_sub_agent`), which reuses the caller's tool set without a second permission pass, as a transient conversation proxy rather than an independent entity.
|
|
252
252
|
|
|
253
253
|
## Permission Model
|
|
254
254
|
|
package/README.zh.md
CHANGED
|
@@ -84,7 +84,7 @@ zen 你好,请介绍一下你自己。
|
|
|
84
84
|
|
|
85
85
|
你也可以在对话中随时输入 `/migrate` 手动触发迁移,而无需等待 token 超限。手动与自动迁移均委托给 SDK 的 `TaskMigrationService`,交接文档生成始终一致。
|
|
86
86
|
|
|
87
|
-
同样的上下文护栏也作用于**子 Agent**:每次委派边界(`onSubAgentStart`)CLI 都会把同一个 `ContextGuardPlugin`(同一 `maxTokens`)安插到新建的子 Agent 上,因此被委派的子 Agent
|
|
87
|
+
同样的上下文护栏也作用于**子 Agent**:每次委派边界(`onSubAgentStart`)CLI 都会把同一个 `ContextGuardPlugin`(同一 `maxTokens`)安插到新建的子 Agent 上,因此被委派的子 Agent(含 `call_skill_sub_agent` 创建的技能子 Agent)在上下文超出硬上限时同样会被中断。该过程是透明的,正常运行的子 Agent 不受影响。
|
|
88
88
|
|
|
89
89
|
迁移提示词模板包含:
|
|
90
90
|
- **对话断点** — 最后一段对话原文引用
|
|
@@ -248,7 +248,7 @@ CLI 提供 19 个内置工具,由 `@ai-zen/agents-sdk` 实现。工具可用
|
|
|
248
248
|
2. **过滤** — 应用权限(`allow`/`deny`)、安全排除(递归保护),以及各工具自声明的 `isAvailable(config, definition)`(在模型已知的构建阶段判断可用性;如 `viewImage` 仅视觉模型、`generateImage` 需配置 `defaultImageModel`)
|
|
249
249
|
3. **实例化** — 将过滤后的名称映射为 `Tool` 实例,注册动态加载器
|
|
250
250
|
|
|
251
|
-
每个 Agent 拥有独立的权限配置,父 Agent 与 SubAgent 之间不继承权限。唯一的例外是 `call_skill_sub_agent` 创建的临时 Skill 子 Agent
|
|
251
|
+
每个 Agent 拥有独立的权限配置,父 Agent 与 SubAgent 之间不继承权限。唯一的例外是 `call_skill_sub_agent` 创建的临时 Skill 子 Agent——它是临时的对话分身而非独立实体,因此沿用调用者的工具能力(不再走第二遍权限过滤)。
|
|
252
252
|
|
|
253
253
|
## 权限模型
|
|
254
254
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@ai-zen/cli",
|
|
3
|
-
"version": "0.8.
|
|
3
|
+
"version": "0.8.1",
|
|
4
4
|
"description": "AI-ZEN CLI - interactive conversation terminal with file tools and draft recovery",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"types": "dist/index.d.ts",
|
|
@@ -20,8 +20,8 @@
|
|
|
20
20
|
"author": "LZQCN",
|
|
21
21
|
"license": "MIT",
|
|
22
22
|
"dependencies": {
|
|
23
|
-
"@ai-zen/agents-core": "^4.
|
|
24
|
-
"@ai-zen/agents-sdk": "^0.
|
|
23
|
+
"@ai-zen/agents-core": "^4.3.0",
|
|
24
|
+
"@ai-zen/agents-sdk": "^0.11.0",
|
|
25
25
|
"@modelcontextprotocol/sdk": "^1.29.0",
|
|
26
26
|
"chalk": "^5.3.0",
|
|
27
27
|
"dayjs": "^1.11.21",
|