Description
Dao(道)— 大道至简的 AI Agent 框架
Release History
| Version | Changes | Urgency | Date |
|---|---|---|---|
| 2.6.0 | Imported from npm (2.6.0) | Low | 4/21/2026 |
| v2.6.0 | Release v2.6.0 | Medium | 3/30/2026 |
| v2.5.1 | ## 新增 - **新增内置工具**:`deleteFile`(文件删除,`confirm: true`)和 `fetchUrl`(HTTP GET),共 7 个内置工具可用 - **新增生产级示例**(`examples/`): - `retry-tool.ts` — 工具级重试(指数退避包装器 + plugin hook 方案对比) - `batch.ts` — 并发限制 + 失败重试轮次,适合批处理流水线 - `persistence.ts` — state 持久化(零依赖文件存储 / 可选 Redis) - `pr-reviewer.ts` — 杀手级 PR 自动审查示例,输入任意 GitHub PR URL 生成结构化审查意见 - **文档**: - 新增 `docs/guide/plugins.md`「实用插件示例」章节,含重试、批量、持久化、RAG 完整代码片段 - 新增 `docs/roadmap.md`「已知缺口」表格,诚实列出框架不内置但有绕行方案的 5 个场景 - `docs/index.md` 新增「示例一览」表格,首页直接展示 6 | Medium | 3/29/2026 |
| v2.5.0 | ### Features - **Agent 共享状态** — `agent.state: Map<string, any>` 实例级运行时状态,多次 `run()` 间共享 - **StepContext.workspace** — `workspace: Map<string, any>` 步骤间传递结构化数据 - **Plugin 可变性** — `beforeModelCall` hook 暴露可写 `systemPrompt` / `messages` - **Mid-run Clarification** — `onAsk` 回调 + 内置 `ask` 工具 ```bash npm install dao-ai@2.5.0 ``` | Medium | 3/23/2026 |
| v2.4.1 | ### Improvements - **i18n 实际接入** — 7 个源文件全部使用 `t()` 国际化调用 - **README 重写** — 覆盖多模态/MCP/i18n/telemetry/requestId - **api.md 更新** — `MessageInput`、`RunResult.requestId`、`maxCostPerRun` 文档 - **新增文档** — `docs/multimodal.md`、`docs/mcp.md` - **新增示例** — `examples/multimodal.ts`、`examples/mcp-tools.ts`、`examples/i18n.ts` | Medium | 3/23/2026 |
| v2.4.0 | ### Features - **多模态输入** — `chat()/run()` 支持 `MessageInput`(text + image + file 混合) - **MCP 协议** — `mcpTools()/mcpClient()` 桥接 MCP server 工具 - **requestId** — `RunResult.requestId` UUID 链路追踪 - **OpenTelemetry** — `telemetryPlugin()` 可选遥测集成 - **国际化** — `setLocale("en")/t(key)` 中英文切换 ### Types - 新增:`MessageInput`, `ContentPart`, `TextPart`, `ImagePart`, `FilePart` - `RunResult` 新增 `requestId` - `@ai-sdk/mcp` 可选 peer dependency | Medium | 3/23/2026 |
| v2.3.0 | ### Features - **上下文窗口管理** — `contextWindow: { maxMessages }` 滑动窗口裁剪,防止 `memory: true` 长对话无限增长 - **流式 Steps** — `runStepsStream()` async generator,`runStream() + steps` 逐步实时输出,不再缓冲 - **成本上限** — `maxCostPerRun` 设置 token 总量上限,超限抛 `CostLimitError` ### Tests - 新增 11 个测试(122 → 133) | Medium | 3/23/2026 |
| v2.2.4 | ### Bug Fixes - **engine**: ConditionalStep 字符串条件 LLM 调用失败时不再静默返回 false,改为上抛异常 - **engine**: onWait 回调在递归调用 executeStep 时正确传递,嵌套 `{ if: x, then: { wait: true } }` 不再崩溃 - **engine**: ParallelStep 中 AbortError 不再被 Promise.allSettled 降级为 `{ error }`,保持全局中断语义 - **engine**: ParallelStep 每个子步骤使用独立 ctx 浅拷贝,防止并行竞态污染 - **engine**: 所有 JSON.stringify(ctx.lastResult) 改用 safeStringify,防止循环引用/BigInt 导致崩溃 - **engine**: WaitStep Promise.race 的 setTimeout 句柄在 finally 中清理,防止 timer 泄漏 - **engine**: 重试 prompt 注入上次 | Medium | 3/23/2026 |
| v2.2.0 | 见 CHANGELOG.md 获取详情 | Low | 3/21/2026 |
| v2.1.0 | ## Bug Fixes - **loop**: `runLoopStream()` 成功路径 timer 悬挂修复 - **loop**: `afterModelCall` 三条路径统一为 `{ text, usage }` 对象 - **engine**: `Promise.all()` → `Promise.allSettled()`,单个失败不影响其他并行步骤 - **engine**: 字符串步骤和 TaskStep 自动注入 `lastResult` 到 prompt - **agent**: 流式 `onComplete` 传真实 duration / usage / output - **agent**: `runStream()` steps 全失败时与 `run()` 对齐输出每步错误 - **agent**: `globalPlugins` 合并到 agent 实例 - **team**: `maxRounds` 两分支统一默认 20 - **types**: `RunEvent` done 事件支持携带 usage 数据 - **plugin**: 同名插件 | Low | 3/21/2026 |
Dependencies & License Audit
Loading dependencies...
Similar Packages
@falai/agentStandalone, strongly-typed AI Agent framework with route DSL and AI provider strategy1.2.0
@robota-sdk/agent-coreComplete AI agent implementation with unified core and tools functionality - conversation management, plugin system, and advanced agent features3.0.0-beta.54
