feat: prioritize user config, do not merge default tools

Changed loadClaudeCliTools() to only load tools explicitly defined
in user config. Previously, DEFAULT_TOOLS_CONFIG.tools was spread
before user tools, causing all default tools to be loaded even if
not present in user config.

User config now has complete control over which tools are loaded.
This commit is contained in:
catlog22
2026-01-22 23:37:42 +08:00
parent ac62bf70db
commit 2fb1d1243c
17 changed files with 79 additions and 79 deletions

View File

@@ -91,7 +91,7 @@ Spawn multiple workers simultaneously, batch wait for results.
## Session Structure
```
.loop/
.workflow/.loop/
+-- {loopId}.json # Master state
+-- {loopId}.workers/ # Worker outputs
| +-- init.output.json
@@ -184,7 +184,7 @@ Coordinator adapts to mode:
### 3. State Management
Unified state at `.loop/{loopId}.json`:
Unified state at `.workflow/.loop/{loopId}.json`:
- **API compatible**: Works with CCW API
- **Extension fields**: Skill-specific data in `skill_state`
- **Worker outputs**: Structured JSON for each action

View File

@@ -61,7 +61,7 @@ Coordinator -> spawn [develop, debug, validate] in parallel -> wait({ ids: all }
## Session Structure
```
.loop/
.workflow/.loop/
+-- {loopId}.json # Master state
+-- {loopId}.workers/ # Worker outputs
| +-- develop.output.json
@@ -242,9 +242,9 @@ function buildWorkerPrompt(action, loopId, state) {
- **Loop ID**: ${loopId}
- **Action**: ${action}
- **State File**: .loop/${loopId}.json
- **Output File**: .loop/${loopId}.workers/${action}.output.json
- **Progress File**: .loop/${loopId}.progress/${action}.md
- **State File**: .workflow/.loop/${loopId}.json
- **Output File**: .workflow/.loop/${loopId}.workers/${action}.output.json
- **Progress File**: .workflow/.loop/${loopId}.progress/${action}.md
## CURRENT STATE

View File

@@ -14,7 +14,7 @@ Read state -> Select mode -> Spawn workers -> Wait results -> Merge -> Update st
```javascript
function readState(loopId) {
const stateFile = `.loop/${loopId}.json`
const stateFile = `.workflow/.loop/${loopId}.json`
return fs.existsSync(stateFile)
? JSON.parse(Read(stateFile))
: null
@@ -252,6 +252,6 @@ function parseWorkerResult(output) {
## Best Practices
1. **Worker 生命周期**: spawn → wait → close不保留 worker
2. **结果持久化**: Worker 输出写入 `.loop/{loopId}.workers/`
2. **结果持久化**: Worker 输出写入 `.workflow/.loop/{loopId}.workers/`
3. **状态同步**: 每次 worker 完成后更新 state
4. **超时处理**: send_input 请求收敛,再超时则跳过

View File

@@ -56,7 +56,7 @@
## Worker Output Structure
Each worker writes to `.loop/{loopId}.workers/{action}.output.json`:
Each worker writes to `.workflow/.loop/{loopId}.workers/{action}.output.json`:
```json
{
@@ -81,7 +81,7 @@ Each worker writes to `.loop/{loopId}.workers/{action}.output.json`:
## Progress File Structure
Human-readable progress in `.loop/{loopId}.progress/{action}.md`:
Human-readable progress in `.workflow/.loop/{loopId}.progress/{action}.md`:
```markdown
# Develop Progress
@@ -165,7 +165,7 @@ When `mode === 'parallel'`:
## Directory Structure
```
.loop/
.workflow/.loop/
+-- loop-b-20260122-abc123.json # Master state
+-- loop-b-20260122-abc123.workers/
| +-- init.output.json