Skip to content

feat: subagent system with parallel execution and TUI fork panel - #11

Draft
LiusCraft wants to merge 23 commits into
mainfrom
feat/subagent
Draft

feat: subagent system with parallel execution and TUI fork panel#11
LiusCraft wants to merge 23 commits into
mainfrom
feat/subagent

Conversation

@LiusCraft

Copy link
Copy Markdown
Owner

Subagent System

实现并行 subagent 系统,支持角色配置、独立上下文执行、事件驱动的 TUI 监控。

功能

  • 配置: minioc.json 中 agents 字段定义角色
  • 工具: spawn_agent, list_agents, get_agent_session, kill_agent
  • 隔离: 独立 session + system prompt + 工具白名单
  • 并行: ParallelSafe=true 同批次并发执行
  • 持久化: FileStore + parent_id 关联
  • TUI: Claude Code 风格 fork panel (up/down/Enter/x 操作)
  • 授权: TUI 回调排队,Subagent: 前缀标示

架构

internal/subagent/manager.go - SubagentManager
internal/subagent/tools.go - 4 个工具工厂
internal/agent/loop.go - SystemPrompt 字段
internal/config/config.go - AgentConfig + merge
internal/session/session.go - ParentID + NewSubagent

LiusCraft added 23 commits June 8, 2026 13:28
- 删除 internal/store/,Store 接口和 FileStore 实现移至 session/store.go
- Agent Loop 持有 session.Store 接口,不直接依赖 FileStore
- 新增 session.Open 封装新建或恢复语义,消除 main.go 中重复的字段修补逻辑
- 更新所有引用和测试
- new internal/notify/ package: global event hub with pattern matching
- new internal/tools/mcp/ package: MCP Manager with stdio/streamable-http/SSE transport
- Registry: add Register/Unregister/UnregisterAll/ReloadTools for dynamic tool management
- Config: add mcp_servers support with validation
- Wire MCP Manager into main.go with Event Hub hooks for failure handling
- Update README with system architecture diagram, MCP config docs
… scroll mode

- Remove MouseModeCellMotion so terminal native text selection works
- Remove mouse event forwarding and viewport MouseWheelEnabled (no-op without mouse mode)
- Enable DEC alternate scroll mode so mouse wheel still scrolls viewport
- Handle up/down arrow keys for viewport scroll (alternate scroll mode converts wheel to key events)
- Fix spawn_agent default fallback handling
- ctrl+s: cycle focus through running subagents
- ctrl+k: kill focused subagent
- esc: exit detail view
- Render subagent session messages when focused
- Footer hint: ctrl+s subagent
…pproach

Replace ctrl+s/ctrl+k/focusAgent with compact informational panel.
Running subagents shown as inline status like '⟳ sub:explore'.
Users view subagent details via get_agent_session tool through main agent.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant