fix: adapt help-routes.ts to new command.json structure (fixes #81)

- Replace getIndexDir() with getCommandFilePath() to find command.json
- Update file watcher to monitor command.json instead of index/ directory
- Modify API routes to read from unified command.json structure
- Add buildWorkflowRelationships() to dynamically build workflow data from flow fields
- Add /api/help/agents endpoint for agents list
- Add category merge logic for frontend compatibility (cli includes general)
- Add cli-init command to command.json
This commit is contained in:
catlog22
2026-01-16 12:46:50 +08:00
parent dde39fc6f5
commit d7e5ee44cc
2 changed files with 181 additions and 60 deletions

View File

@@ -1,7 +1,7 @@
{
"_metadata": {
"version": "2.0.0",
"total_commands": 88,
"total_commands": 45,
"total_agents": 16,
"description": "Unified CCW-Help command index"
},
@@ -485,6 +485,15 @@
"category": "general",
"difficulty": "Intermediate",
"source": "../../../commands/enhance-prompt.md"
},
{
"name": "cli-init",
"command": "/cli:cli-init",
"description": "Initialize CLI tool configurations (.gemini/, .qwen/) with technology-aware ignore rules",
"arguments": "[--tool gemini|qwen|all] [--preview] [--output path]",
"category": "cli",
"difficulty": "Intermediate",
"source": "../../../commands/cli/cli-init.md"
}
],