6 Commits

Author SHA1 Message Date
oudecheng
879f5f243a feat(task): 增加子代理最大嵌套深度支持,更新相关文档和提示 2026-06-17 17:55:22 +08:00
oudecheng
631c61fea2 feat(agent): 支持子代理最大嵌套深度控制
- 在配置结构体中新增 max_nesting_depth 字段,设置子代理最大嵌套深度
- 在 AgentFactory、todo_read、todo_write 等处初始化 nesting_depth 字段为 0
- 允许 Task 工具注册,使用 max_nesting_depth 控制子代理嵌套层数
- SubAgentRuntimeConfig 新增 max_nesting_depth 配置项,默认值为 1
- TaskTool 新增 max_nesting_depth 字段和带深度限制的构造函数
- 任务执行时增加嵌套深度校验,超过最大深度返回错误提示,防止无限递归创建子代理
2026-06-17 14:43:55 +08:00
oudecheng
86d48a3ec0 feat: 实现自定义子代理加载功能
- 添加 SubagentCatalog::discover() 方法,支持从文件系统加载自定义子代理
- 支持 ~/.picobot/subagents/ 和 ./.picobot/subagents/ 两个目录
- 项目级定义可覆盖用户级定义
- 支持 YAML frontmatter + body 格式解析
- 修复 Windows 换行符兼容性问题
- 移除未使用的 read_only 字段
- 实现 TaskTool 动态 schema,子代理类型列表从运行时获取

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-05-25 11:56:44 +08:00
bee1a39a06 feat: add task management tool with subagent support
- Introduced `TaskConfig` struct to manage task-related configurations.
- Implemented `TaskTool` for creating and managing subagents for complex tasks.
- Added `TaskSession` and `TaskRepository` for handling task sessions and persistence.
- Created `DefaultSubAgentRuntime` to execute tasks with timeout and history support.
- Enhanced `ToolContext` to include `subagent_description` for better context tracking.
- Implemented error handling for task execution and session management.
- Updated `ToolRegistryFactory` to register task tools conditionally based on configuration.
- Added prompt builders for subagent tasks to improve interaction clarity.
2026-05-16 16:12:28 +08:00
9bf57c1132 feat: 移除任务管理相关功能,简化工具配置和依赖 2026-05-16 09:08:40 +08:00
020b7aa77a feat: 添加任务管理功能,支持创建和恢复子代理任务,优化任务执行和状态管理 2026-05-16 08:50:15 +08:00