Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
27 commits
Select commit Hold shift + click to select a range
c2aead7
feat: browser agent
iohub May 9, 2026
63829b7
feat: browser agent
iohub May 9, 2026
7559fec
feat(browser): configure chrome browser path and add smoke test
iohub May 9, 2026
9fa42e4
test(browser): add integration tests with testify
iohub May 9, 2026
641e07d
docs
iohub May 9, 2026
03b3ac3
docs
iohub May 9, 2026
5441b91
docs
iohub May 9, 2026
f534542
refactor(tui): migrate to charm.land v2 bubble tea ecosystem
iohub May 9, 2026
b734444
fix(tui): dynamically adjust viewport height to prevent flickering
iohub May 9, 2026
4d641e1
docs
iohub May 9, 2026
4e27b0e
feat(tui): add tool/session/project granular authorization levels
iohub May 9, 2026
2b0102e
refactor(tui): redesign confirm dialog as vertical option list
iohub May 9, 2026
e1542a0
feat(tui): add i18n support for authorization and task complete dialogs
iohub May 9, 2026
ae9e8f4
refactor(tui): refactor auth dialog to use structured data and improv…
iohub May 9, 2026
5ac3bc7
refactor(core): remove implplan agent and tool, replaced by deepthinking
iohub May 9, 2026
aae47c9
docs(agents): update deepthinking tool usage guidelines in agent prompts
iohub May 9, 2026
15cabff
feat(agents): add delegate_browser tool to coding-agent for web research
iohub May 9, 2026
d331b4a
refactor(tui): remove deprecated keybindings and streamline i18n
iohub May 9, 2026
259f226
misc
iohub May 9, 2026
40fb365
tui
iohub May 9, 2026
77050ae
feat(tui): async history loading with page navigation
iohub May 9, 2026
88e07bc
refactor(tui): refactor history panel into independent HistoryPanel c…
iohub May 9, 2026
6c0f314
refactor(tui): remove history panel and related components
iohub May 9, 2026
4cb9bbb
feat(tui): add history browsing mode with pagination and session restore
iohub May 9, 2026
84f382f
feat(tui): history browser
iohub May 9, 2026
fbdfa99
feat(tui): history browser
iohub May 9, 2026
26abf05
feat(tui): history browser
iohub May 9, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
55 changes: 9 additions & 46 deletions .codeactor/skills/commit.md
Original file line number Diff line number Diff line change
@@ -1,51 +1,14 @@
# Git Commit

请帮我完成一次专业的开源项目 git commit,按以下步骤执行
帮我完成 git commit,流程如下

## 步骤 1:检查仓库状态
运行 `git status``git diff --staged` 查看已暂存的变更。如果没有已暂存的变更,运行 `git diff` 查看未暂存的变更。同时运行 `git log --oneline -5` 查看最近的提交风格
## 步骤 1:检查状态
并行运行 `git status``git diff --cached --name-only`、`git log --oneline -3`。若 `--cached` 有文件则只提交已暂存文件;若无变更直接结束

**提示**:如果 `git diff --cached --name-only` 输出非空(即用户已手动暂存了特定文件),则提示「检测到用户已手动暂存 N 个文件,将只提交这些文件」,后续跳过文件过滤步骤。
## 步骤 2:提交
- 根据 diff 内容编写 Conventional Commits 格式的 message:`<type>(<scope>): <subject>`(type: feat/fix/docs/style/refactor/perf/test/chore/ci/build,subject 英文小写 ≤72字符)
- **禁止**任何 AI 署名(Co-authored-by/Signed-off-by/AI-generated 等)
- 若用户未手动暂存,先 `git add` 代码文件再 `git commit -m`;若已暂存则直接 `git commit -m`

## 步骤 2:编写 commit message
根据变更内容,编写一条专业的开源项目 commit message,要求:
- 使用 Conventional Commits 格式:`<type>(<scope>): <subject>`
- type 从以下选择:feat, fix, docs, style, refactor, perf, test, chore, ci, build
- subject 使用英文,简洁明了(不超过 72 字符),首字母小写
- 如果需要详细说明,空一行后用英文写 body,每行不超过 72 字符
- **严禁**在 commit message 中出现任何 AI 相关签名,包括但不限于:Co-authored-by: AI, Signed-off-by: AI, AI-generated, ChatGPT, Claude, Copilot 等
- **严禁**在代码或 commit 中添加任何形式的 AI 署名
- 风格参考知名的开源项目(如 Linux kernel, Kubernetes, Rust 等)

## 步骤 3:执行提交

**智能过滤策略**(按优先级判断):

### 情况 A:用户已手动暂存文件
如果 `git diff --cached --name-only` 输出非空:
- 跳过过滤,直接对这些已暂存文件执行 `git commit -m "<message>"`

### 情况 B:未手动暂存(智能过滤)
1. 运行 `git status --short` 获取所有变更文件列表。
2. **过滤排除以下文件**:

| **数据文件** |
| **二进制/编译产物** |
| **媒体文件** |
| **压缩包** |
| **测试数据/夹具** |

3. 对过滤后的代码文件执行 `git add <file1> <file2> ...`。
4. 执行 `git commit -m "<message>"` 提交。**无需用户确认,直接提交。**

## 步骤 4:展示提交结果
提交完成后,运行 `git log --oneline -3` 展示最近3条提交记录,让用户确认 commit 内容是否正确。

## 步骤 5:询问推送
展示 git log 后,询问用户:"提交已完成,以上是最近3条提交记录,是否需要推送到远程仓库?(git push)"。等待用户回复后执行。

---

**注意事项**:
- 如果仓库没有变更,直接告知用户 "没有需要提交的变更" 并结束
- 所有 git 命令使用 `run_bash` 工具执行
## 步骤 3:收尾
运行 `git log --oneline -3` 展示结果,然后询问是否推送。
4 changes: 1 addition & 3 deletions CLAUDE.md
Original file line number Diff line number Diff line change
Expand Up @@ -63,8 +63,6 @@ codeactor-agent/
│ │ ├── devops.prompt.md # DevOps system prompt
│ │ ├── meta.go # MetaAgent: custom agent designer
│ │ ├── meta.prompt.md # Meta system prompt
│ │ ├── impl_plan_agent.go # ImplPlanAgent: read-only implementation planner
│ │ ├── impl_plan.prompt.md # ImplPlan system prompt
│ │ ├── executor.go # Generic agent execution loop (RunAgentLoop)
│ │ ├── tools.go # Tool registration helpers
│ │ ├── tools.json # Tool definitions
Expand All @@ -82,7 +80,7 @@ codeactor-agent/
│ │ ├── system_operations.go # run_bash (foreground/background)
│ │ ├── cognitive.go # thinking (error analysis & reflection)
│ │ ├── micro_agent.go # micro_agent (sub-LLM reasoning)
│ │ ├── impl_plan.go # impl_plan (stateful implementation plan)
│ │ ├── deepthinking.go # deepthinking (deep system analysis)
│ │ ├── flow_control.go # agent_exit, ask_user_for_help
│ │ ├── workspace_guard.go # Workspace boundary enforcement
│ │ └── user_confirm.go # User confirmation pipeline (Pub-Sub)
Expand Down
31 changes: 2 additions & 29 deletions CODEACTOR.md
Original file line number Diff line number Diff line change
Expand Up @@ -228,19 +228,6 @@ registerCustomAgent() - 创建 delegate_<name> 工具
返回格式化结果,新 Agent 永久可用
```

### 3.7 ImplPlan (实现计划)

**定位**: 实现计划生成器,**只读模式**。

**核心职责**:
| 职责 | 说明 |
|------|------|
| 计划生成 | 分析需求生成结构化实现计划文档 |
| 上下文收集 | 通过只读工具收集代码上下文 |
| 影响分析 | 评估修改范围和依赖关系 |

**拥有工具**: `read_file`, `search_by_regex`, `list_dir`, `print_dir_tree`, `semantic_search`, `query_code_skeleton`, `query_code_snippet`

### 3.8 Executor (执行器)

**定位**: 通用 Agent 执行循环引擎。
Expand Down Expand Up @@ -287,11 +274,10 @@ type ExecutorConfig struct {
| `run_bash` | 系统 | S | 执行 Shell 命令 |
| `thinking` | 认知 | C | 错误分析和反思思维链 |
| `micro_agent` | 认知 | MC | 子 LLM 推理调用,允许 Agent 进行深度思考 |
| `impl_plan` | 编辑 | IP | 状态化的实现计划文档生成 |
| `flow_control` | 流程 | FC | Agent 退出和用户帮助请求 |
| `agent_exit` | 流程 | P | 通知任务完成 |

**图例**: R=只读, W=写入, D=删除, M=移动/重命名, E=编辑, S=系统, C=认知, MC=子LLM调用, IP=实现计划, FC=流控制, P=流程
**图例**: R=只读, W=写入, D=删除, M=移动/重命名, E=编辑, S=系统, C=认知, MC=子LLM调用, FC=流控制, P=流程

### 4.2 文件操作工具

Expand Down Expand Up @@ -409,17 +395,6 @@ micro_agent(
)
```

#### impl_plan

```go
// 生成实现计划文档
impl_plan(
action: string, // create / update / read
plan_id: string, // 计划 ID
content: string // 计划内容
)
```

#### flow_control

```go
Expand Down Expand Up @@ -514,7 +489,6 @@ codeactor-agent/
│ │ ├── chat.go # Chat Agent
│ │ ├── devops.go # DevOps Agent
│ │ ├── meta.go # Meta Agent
│ │ ├── impl_plan_agent.go # ImplPlan Agent
│ │ ├── executor.go # 通用执行循环
│ │ ├── tools.go # 工具注册
│ │ ├── types.go # 类型定义
Expand All @@ -539,7 +513,7 @@ codeactor-agent/
│ │ ├── engine_openai.go # OpenAI 兼容引擎
│ │ └── llm.go # LLM 客户端
│ ├── memory/ # 任务记忆
│ ├── tools/ # 工具适配器(17 个工具)
│ ├── tools/ # 工具适配器(16 个工具)
│ │ ├── adapter.go # Adapter 模式实现
│ │ ├── file_operations.go # 文件操作 (6 个)
│ │ ├── file_edit.go # 代码编辑
Expand All @@ -548,7 +522,6 @@ codeactor-agent/
│ │ ├── repo_operations.go # 仓库操作 (3 个)
│ │ ├── cognitive.go # 认知工具 (thinking)
│ │ ├── micro_agent.go # 子 LLM 推理
│ │ ├── impl_plan.go # 实现计划
│ │ ├── flow_control.go # 流控制
│ │ ├── workspace_guard.go # 工作空间守卫
│ │ └── user_confirm.go # 用户确认管道
Expand Down
3 changes: 1 addition & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@ CodeActor Agent orchestrates multiple specialized agents — Conductor, Repo-Ana
- **Meta-Agent** — Autonomous agent designer that creates custom sub-agents at runtime for tasks beyond built-in agents' capabilities
- **Self-Correction** — `thinking` tool enables agents to analyze errors and recover without blind retries
- **Agent Disable** — Conditionally exclude sub-agents at startup via `--disable-agents=repo,coding,chat,meta,devops`
- **ImplPlan Tool** — Stateful implementation plan document for complex multi-step coding tasks

### Rich Tool System (17 tools)
- **File Operations** — Read, create, delete, rename, list directory, print directory tree
Expand Down Expand Up @@ -150,7 +149,7 @@ Server defaults to `localhost:9080`. Override via `--host`/`--port` or `CODECACT
| Agent | Tools | Count |
|-------|-------|-------|
| Conductor | `delegate_repo`, `delegate_coding`, `delegate_chat`, `delegate_devops`, `delegate_meta`, `finish`, `read_file`, `search_by_regex`, `list_dir`, `print_dir_tree` | 10 |
| CodingAgent | All 17 tools (file ops, search, shell, thinking, impl_plan, micro_agent) | 17 |
| CodingAgent | All 16 tools (file ops, search, shell, thinking, micro_agent) | 16 |
| RepoAgent | `read_file`, `search_by_regex`, `list_dir`, `print_dir_tree`, `semantic_search`, `query_code_skeleton`, `query_code_snippet` | 7 |
| ChatAgent | `micro_agent`, `thinking`, `finish` | 3 |
| DevOpsAgent | `run_bash`, `read_file`, `list_dir`, `print_dir_tree`, `search_by_regex`, `thinking`, `micro_agent`, `finish` | 8 |
Expand Down
3 changes: 1 addition & 2 deletions README_zh.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@ CodeActor Agent 协调多个专用智能体——指挥家(Conductor)、仓
- **元代理(Meta-Agent)** — 自主设计代理,在运行时为超出内置 Agent 能力的任务动态创建自定义子智能体
- **自我修正** — `thinking` 工具使 Agent 能够在出错时分析原因并恢复,避免盲目重试
- **Agent 禁用** — 通过 `--disable-agents=repo,coding,chat,meta,devops` 在启动时有条件地排除子智能体
- **ImplPlan 工具** — 状态化实现计划文档,用于复杂多步骤编码任务的分步规划

### 丰富工具系统(17 个工具)
- **文件操作** — 读取、创建、删除、重命名、列出目录、打印目录树
Expand Down Expand Up @@ -149,7 +148,7 @@ node index.js history # 列出最近任务
| Agent | 工具 | 数量 |
|-------|-------|-------|
| Conductor | `delegate_repo`、`delegate_coding`、`delegate_chat`、`delegate_devops`、`delegate_meta`、`finish`、`read_file`、`search_by_regex`、`list_dir`、`print_dir_tree` | 10 |
| CodingAgent | 全部 17 个工具(文件、搜索、Shell、thinking、impl_plan、micro_agent) | 17 |
| CodingAgent | 全部 16 个工具(文件、搜索、Shell、thinking、micro_agent) | 16 |
| RepoAgent | `read_file`、`search_by_regex`、`list_dir`、`print_dir_tree`、`semantic_search`、`query_code_skeleton`、`query_code_snippet` | 7 |
| ChatAgent | `micro_agent`、`thinking`、`finish` | 3 |
| DevOpsAgent | `run_bash`、`read_file`、`list_dir`、`print_dir_tree`、`search_by_regex`、`thinking`、`micro_agent`、`finish` | 8 |
Expand Down
21 changes: 20 additions & 1 deletion config/config.toml
Original file line number Diff line number Diff line change
Expand Up @@ -190,4 +190,23 @@ enable_embedding = true
model = "Qwen/Qwen3-Embedding-4B"
api_token = "your-key"
api_base_url = "https://api.siliconflow.cn/v1"
dimensions = 2560
dimensions = 2560

# ─────────────────────────────────────────────────────────────
# Browser Configuration (go-rod headless Chrome)
# ─────────────────────────────────────────────────────────────
[browser]
headless = true
browser_path = "/bin/google-chrome"
user_data_dir = ""
viewport_width = 1280
viewport_height = 720
allowed_domains = []
blocked_domains = []
timeout_seconds = 30
max_concurrent_pages = 4
auto_launch = true
idle_timeout = "5m"
allow_no_sandbox = false # Docker 环境设为 true
extra_args = []
enable_browser_agent = true
2 changes: 1 addition & 1 deletion docs/Prompt_Cache_Optimization_Plan.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@

## 一、审计背景

对照 LLM Prompt Cache 最佳实践文档的五项核心检查清单,对项目中 7 个 Agent(Conductor、Coding、Repo、Chat、DevOps、Meta、ImplPlan)的 prompt 构建方式进行了全面审计。
对照 LLM Prompt Cache 最佳实践文档的五项核心检查清单,对项目中 6 个 Agent(Conductor、Coding、Repo、Chat、DevOps、Meta)的 prompt 构建方式进行了全面审计。

LLM 缓存采用**严格前缀匹配**(Prefix Matching)机制:从第一个 Token 开始必须完全一致,一旦中途有任何字符不同,该字符之后的所有缓存全部失效。

Expand Down
3 changes: 1 addition & 2 deletions docs/architecture.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading