@zmice/zc 0.1.0 → 0.1.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (90) hide show
  1. package/README.md +81 -42
  2. package/dist/adapters/codex.d.ts +0 -0
  3. package/dist/adapters/codex.d.ts.map +0 -0
  4. package/dist/adapters/codex.js +0 -0
  5. package/dist/adapters/codex.js.map +0 -0
  6. package/dist/adapters/index.d.ts +0 -0
  7. package/dist/adapters/index.d.ts.map +0 -0
  8. package/dist/adapters/index.js +0 -0
  9. package/dist/adapters/index.js.map +0 -0
  10. package/dist/adapters/qwen-code.d.ts +0 -0
  11. package/dist/adapters/qwen-code.d.ts.map +0 -0
  12. package/dist/adapters/qwen-code.js +0 -0
  13. package/dist/adapters/qwen-code.js.map +0 -0
  14. package/dist/adapters/types.d.ts +0 -0
  15. package/dist/adapters/types.d.ts.map +0 -0
  16. package/dist/adapters/types.js +0 -0
  17. package/dist/adapters/types.js.map +0 -0
  18. package/dist/cli/doctor.d.ts +0 -0
  19. package/dist/cli/doctor.d.ts.map +0 -0
  20. package/dist/cli/doctor.js +0 -0
  21. package/dist/cli/doctor.js.map +0 -0
  22. package/dist/cli/index.d.ts +0 -0
  23. package/dist/cli/index.d.ts.map +0 -0
  24. package/dist/cli/index.js +1 -1
  25. package/dist/cli/index.js.map +1 -1
  26. package/dist/cli/msg.d.ts +0 -0
  27. package/dist/cli/msg.d.ts.map +0 -0
  28. package/dist/cli/msg.js +0 -0
  29. package/dist/cli/msg.js.map +0 -0
  30. package/dist/cli/run.d.ts +0 -0
  31. package/dist/cli/run.d.ts.map +0 -0
  32. package/dist/cli/run.js +0 -0
  33. package/dist/cli/run.js.map +0 -0
  34. package/dist/cli/setup.d.ts +0 -0
  35. package/dist/cli/setup.d.ts.map +0 -0
  36. package/dist/cli/setup.js +0 -0
  37. package/dist/cli/setup.js.map +0 -0
  38. package/dist/cli/task.d.ts +0 -0
  39. package/dist/cli/task.d.ts.map +0 -0
  40. package/dist/cli/task.js +0 -0
  41. package/dist/cli/task.js.map +0 -0
  42. package/dist/cli/team.d.ts +0 -0
  43. package/dist/cli/team.d.ts.map +0 -0
  44. package/dist/cli/team.js +0 -0
  45. package/dist/cli/team.js.map +0 -0
  46. package/dist/runtime/logger.d.ts +0 -0
  47. package/dist/runtime/logger.d.ts.map +0 -0
  48. package/dist/runtime/logger.js +0 -0
  49. package/dist/runtime/logger.js.map +0 -0
  50. package/dist/runtime/session-manager.d.ts +0 -0
  51. package/dist/runtime/session-manager.d.ts.map +0 -0
  52. package/dist/runtime/session-manager.js +0 -0
  53. package/dist/runtime/session-manager.js.map +0 -0
  54. package/dist/runtime/state.d.ts +0 -0
  55. package/dist/runtime/state.d.ts.map +0 -0
  56. package/dist/runtime/state.js +0 -0
  57. package/dist/runtime/state.js.map +0 -0
  58. package/dist/runtime/worktree-manager.d.ts +0 -0
  59. package/dist/runtime/worktree-manager.d.ts.map +0 -0
  60. package/dist/runtime/worktree-manager.js +0 -0
  61. package/dist/runtime/worktree-manager.js.map +0 -0
  62. package/dist/team/mailbox.d.ts +0 -0
  63. package/dist/team/mailbox.d.ts.map +0 -0
  64. package/dist/team/mailbox.js +0 -0
  65. package/dist/team/mailbox.js.map +0 -0
  66. package/dist/team/orchestrator.d.ts +0 -0
  67. package/dist/team/orchestrator.d.ts.map +0 -0
  68. package/dist/team/orchestrator.js +0 -0
  69. package/dist/team/orchestrator.js.map +0 -0
  70. package/dist/team/task-queue.d.ts +0 -0
  71. package/dist/team/task-queue.d.ts.map +0 -0
  72. package/dist/team/task-queue.js +0 -0
  73. package/dist/team/task-queue.js.map +0 -0
  74. package/dist/team/worker-manager.d.ts +0 -0
  75. package/dist/team/worker-manager.d.ts.map +0 -0
  76. package/dist/team/worker-manager.js +0 -0
  77. package/dist/team/worker-manager.js.map +0 -0
  78. package/dist/utils/config.d.ts +0 -0
  79. package/dist/utils/config.d.ts.map +0 -0
  80. package/dist/utils/config.js +0 -0
  81. package/dist/utils/config.js.map +0 -0
  82. package/dist/utils/platform.d.ts +0 -0
  83. package/dist/utils/platform.d.ts.map +0 -0
  84. package/dist/utils/platform.js +0 -0
  85. package/dist/utils/platform.js.map +0 -0
  86. package/dist/utils/skill-loader.d.ts +0 -0
  87. package/dist/utils/skill-loader.d.ts.map +0 -0
  88. package/dist/utils/skill-loader.js +0 -0
  89. package/dist/utils/skill-loader.js.map +0 -0
  90. package/package.json +2 -2
package/README.md CHANGED
@@ -1,86 +1,125 @@
1
- # zc — Multi-CLI Team Orchestration
1
+ # @zmice/zc
2
2
 
3
- zc 是一个多 CLI 智能体团队编排运行时,支持将 Codex、Qwen Code 等 AI CLI 工具组建为协作团队,并行处理开发任务。
3
+ > **让多个 AI CLI 组队干活。** 一条命令,将 Codex、Qwen Code 等 AI 编码工具编排为协作团队,并行处理开发任务。
4
4
 
5
- ## 安装
5
+ `@zmice/zc` 是一个多 CLI 智能体团队编排运行时(Multi-CLI Agent Team Orchestration Runtime)。它解决的核心问题是:**单个 AI CLI 一次只能做一件事,而真实项目需要多个任务并行推进。**
6
6
 
7
- ### 全局安装(推荐)
7
+ ## ✨ 核心特性
8
8
 
9
- ```bash
10
- npm install -g @zmice/zc
11
- ```
9
+ | 特性 | 说明 |
10
+ |------|------|
11
+ | 🤖 **多 CLI 适配** | 统一适配 Codex CLI、Qwen Code 等主流 AI 编码工具,通过适配器层无缝切换 |
12
+ | 🚀 **任务并行编排** | 多个 Worker 并行执行任务,自动分派、状态追踪、失败回滚 |
13
+ | 🧠 **智能技能匹配** | 三模式技能注入——关键词匹配(中英文)/ AI 智能匹配 / 手动指定 |
14
+ | 🌿 **Git Worktree 隔离** | 每个 Worker 在独立 worktree 中执行,互不干扰,安全合并 |
15
+ | 💬 **团队消息通信** | 内置 Mailbox 系统,Worker 间实时消息传递与广播 |
16
+ | 📋 **任务队列管理** | 优先级队列、任务认领、状态流转(pending → running → done/failed) |
12
17
 
13
- ### 从源码安装
18
+ ## 📦 安装
14
19
 
15
20
  ```bash
16
- git clone <repo-url>
17
- cd ai-coding/zc
18
- npm install && npm run build
19
- npm link
21
+ # npm 全局安装(推荐)
22
+ npm install -g @zmice/zc
23
+
24
+ # 验证
25
+ zc --version
20
26
  ```
21
27
 
22
- ## 快速开始
28
+ ## 🚀 快速开始
23
29
 
24
30
  ```bash
25
- # 检查环境
31
+ # 1. 检查环境依赖
26
32
  zc doctor
27
33
 
28
- # 单任务运行
34
+ # 2. 单任务运行
29
35
  zc run "实现用户登录功能"
30
36
 
31
- # 启动团队(2 个 worker 并行处理 3 个任务)
37
+ # 3. 启动团队 — 2 个 Worker 并行处理 3 个任务
32
38
  zc team start \
33
39
  -w "w1:codex,w2:qwen-code" \
34
40
  -t "实现登录API" \
35
41
  -t "编写登录页面" \
36
42
  -t "添加认证中间件"
37
43
 
38
- # 查看团队状态
44
+ # 4. 查看团队状态
39
45
  zc team status <team-name>
40
46
 
41
- # 发送消息
47
+ # 5. 团队内通信
42
48
  zc msg send w1 "优先处理API端点"
43
49
 
44
- # 关闭团队
50
+ # 6. 关闭团队
45
51
  zc team shutdown <team-name>
46
52
  ```
47
53
 
48
- ## 命令速览
54
+ ## 🧠 智能技能匹配
49
55
 
50
- | 命令 | 说明 |
51
- |------|------|
52
- | `zc doctor` | 检查环境依赖(Node.js、git、tmux、CLI 工具) |
53
- | `zc setup` | 初始化项目配置 |
54
- | `zc run <prompt>` | 单 worker 运行任务 |
55
- | `zc team start` | 启动多 worker 团队 |
56
- | `zc team status` | 查看团队运行状态 |
57
- | `zc team shutdown` | 关闭团队 |
58
- | `zc team log` | 查看 worker 日志 |
59
- | `zc task list/claim/done/fail` | 任务管理 |
60
- | `zc msg send/read/broadcast` | 团队消息 |
61
-
62
- ## 新增功能:智能技能匹配
63
-
64
- zc 支持三种技能匹配模式,为任务自动注入相关 Skill 上下文:
56
+ zc 为每个任务自动注入相关 Skill 上下文,支持三种匹配模式:
65
57
 
66
58
  ```bash
67
- # 默认:关键词匹配(支持中英文)
59
+ # 默认:关键词匹配(支持中英文任务描述)
68
60
  zc team start -w "w1:codex" -t "修复登录bug"
69
61
 
70
- # 手动指定 skills
62
+ # 手动指定 Skills
71
63
  zc team start -w "w1:codex" -t "任务描述" \
72
64
  --skills debugging-and-error-recovery security-and-hardening
73
65
 
74
- # AI 智能匹配
66
+ # AI 智能匹配(自动分析任务意图)
75
67
  zc team start -w "w1:codex" -t "任务描述" \
76
68
  --skill-match ai
77
69
  ```
78
70
 
79
- ## 系统要求
71
+ ## 🏗️ 架构概览
72
+
73
+ ```
74
+ ┌─────────────────────────────────────────────────┐
75
+ │ CLI 命令层 │
76
+ │ doctor │ setup │ run │ team │ task │ msg │
77
+ ├─────────────────────────────────────────────────┤
78
+ │ 团队引擎层 │
79
+ │ Orchestrator ← TaskQueue + WorkerManager │
80
+ │ ↕ Mailbox │
81
+ ├─────────────────────────────────────────────────┤
82
+ │ 运行时基础设施 │
83
+ │ SessionManager (tmux) + WorktreeManager (git) │
84
+ ├─────────────────────────────────────────────────┤
85
+ │ 适配器层 │
86
+ │ CodexAdapter │ QwenCodeAdapter │ ... │
87
+ └─────────────────────────────────────────────────┘
88
+ ```
89
+
90
+ - **适配器层**:统一封装不同 AI CLI 的调用接口,新增 CLI 只需实现适配器
91
+ - **运行时**:基于 tmux 的会话管理 + 基于 git worktree 的执行隔离
92
+ - **团队引擎**:Orchestrator 协调任务分派、Worker 生命周期、消息路由
93
+ - **CLI 命令层**:基于 Commander.js,提供 6 组子命令
94
+
95
+ ## 📖 命令速览
96
+
97
+ | 命令 | 说明 |
98
+ |------|------|
99
+ | `zc doctor` | 检查环境依赖(Node.js、git、tmux、CLI 工具) |
100
+ | `zc setup` | 初始化项目配置 |
101
+ | `zc run <prompt>` | 单 Worker 运行任务 |
102
+ | `zc team start` | 启动多 Worker 团队 |
103
+ | `zc team status` | 查看团队运行状态 |
104
+ | `zc team shutdown` | 关闭团队 |
105
+ | `zc team log` | 查看 Worker 日志 |
106
+ | `zc task list/claim/done/fail` | 任务管理(查看 / 认领 / 完成 / 标记失败) |
107
+ | `zc msg send/read/broadcast` | 团队消息(发送 / 读取 / 广播) |
108
+
109
+ ## ⚙️ 系统要求
110
+
111
+ | 依赖 | 版本 | 说明 |
112
+ |------|------|------|
113
+ | Node.js | >= 20 | 运行时环境 |
114
+ | git | 任意 | Worktree 隔离执行 |
115
+ | tmux | 任意 | 团队模式会话管理(macOS / Linux / WSL) |
116
+
117
+ ## 🤝 支持的 AI CLI
118
+
119
+ - **Codex CLI** — OpenAI 官方命令行编码工具
120
+ - **Qwen Code** — 阿里云通义千问编码工具
80
121
 
81
- - Node.js >= 20
82
- - git
83
- - tmux(macOS/Linux/WSL,团队模式需要)
122
+ > 通过适配器接口可扩展支持更多 CLI 工具。
84
123
 
85
124
  ## License
86
125
 
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
package/dist/cli/index.js CHANGED
@@ -9,7 +9,7 @@ import { registerRunCommand } from "./run.js";
9
9
  const program = new Command();
10
10
  program
11
11
  .name("zc")
12
- .description("zmice的AI CLI — CLI 团队编排运行时")
12
+ .description("AI CLI 团队编排运行时 Codex、Qwen Code 等工具组队并行开发")
13
13
  .version("0.1.0");
14
14
  // Register subcommands
15
15
  registerTeamCommand(program);
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/cli/index.ts"],"names":[],"mappings":";AACA,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AACpC,OAAO,EAAE,mBAAmB,EAAE,MAAM,WAAW,CAAC;AAChD,OAAO,EAAE,mBAAmB,EAAE,MAAM,WAAW,CAAC;AAChD,OAAO,EAAE,kBAAkB,EAAE,MAAM,UAAU,CAAC;AAC9C,OAAO,EAAE,qBAAqB,EAAE,MAAM,aAAa,CAAC;AACpD,OAAO,EAAE,oBAAoB,EAAE,MAAM,YAAY,CAA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B,CAAC,OAAO,CAAC,CAAC;AAC/B,oBAAoB,CAAC,OAAO,CAAC,CAAC;AAC9B,kBAAkB,CAAC,OAAO,CAAC,CAAC;AAE5B,OAAO,CAAC,KAAK,EAAE,CAAC"}
package/dist/cli/msg.d.ts CHANGED
File without changes
File without changes
package/dist/cli/msg.js CHANGED
File without changes
File without changes
package/dist/cli/run.d.ts CHANGED
File without changes
File without changes
package/dist/cli/run.js CHANGED
File without changes
File without changes
File without changes
File without changes
package/dist/cli/setup.js CHANGED
File without changes
File without changes
File without changes
File without changes
package/dist/cli/task.js CHANGED
File without changes
File without changes
File without changes
File without changes
package/dist/cli/team.js CHANGED
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@zmice/zc",
3
- "version": "0.1.0",
4
- "description": "Multi-CLI team orchestration runtime for AI development workflows",
3
+ "version": "0.1.1",
4
+ "description": "Orchestrate multiple AI CLI tools (Codex, Qwen Code, etc.) as a collaborative team parallel task dispatch, skill matching, git worktree isolation, and inter-agent messaging",
5
5
  "keywords": ["cli", "orchestration", "tmux", "team", "ai", "codex", "multi-agent"],
6
6
  "license": "MIT",
7
7
  "type": "module",