@zhushanwen/pi-cw-tool 0.5.0 → 0.5.2

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.
package/README.md CHANGED
@@ -1,6 +1,6 @@
1
1
  # @zhushanwen/pi-cw-tool
2
2
 
3
- cw 2.0 的 pi extension 薄封装(Phase 2-B 适配,见 xyz-agent 仓 `docs/todo/pi-cw-cw2-adaptation.md`):
3
+ cw 2.0 的 pi extension 薄封装(Phase 2-B 适配):
4
4
 
5
5
  - **cw_query 工具**:只读查询透传(`status` / `frontier` / `tree` / `report`,参数面 `--unit` / `--root` / `--json` 按 cw 2.0 修正)。写命令(create / evidence submit / review submit / verify / run)不在工具面——经 bash 调 `cw`,用法以 cw-cli skill 为 SSOT。
6
6
  - **pi-cw skill**:runner 实操指南(多 unit 任务 `cw run --spawn pi` 的后台运行、监控、escalation 处置、收尾回流)。
package/package.json CHANGED
@@ -1,9 +1,12 @@
1
1
  {
2
2
  "name": "@zhushanwen/pi-cw-tool",
3
- "version": "0.5.0",
3
+ "version": "0.5.2",
4
4
  "description": "Pi extension for cw 2.0: a read-only cw_query tool (status / frontier / tree / report passthrough) + the pi-cw skill (runner practical guide for multi-unit tasks: background run, monitoring, escalation, merge back).",
5
5
  "type": "module",
6
6
  "main": "index.ts",
7
+ "xyz-agent": {
8
+ "role": "universal"
9
+ },
7
10
  "pi": {
8
11
  "extensions": [
9
12
  "./index.ts"
@@ -26,8 +29,8 @@
26
29
  "skills/"
27
30
  ],
28
31
  "peerDependencies": {
29
- "@earendil-works/pi-coding-agent": "*",
30
- "@earendil-works/pi-ai": "*",
32
+ "@earendil-works/pi-coding-agent": "^0.84.4",
33
+ "@earendil-works/pi-ai": "^0.84.4",
31
34
  "typebox": "*"
32
35
  },
33
36
  "peerDependenciesMeta": {
@@ -7,7 +7,7 @@ description: "cw 2.0 runner 的 pi 环境实操指南:大型多 agent 并行
7
7
 
8
8
  cw 2.0 runner 的 pi 环境实操指南(薄封装)。多 agent 并行开发不再需要主 agent 手动编排——`cw run --spawn pi` 一条命令调度到根 unit closed:runner 按 frontier 并行 spawn 无头 pi 进程(designer 写 spec / developer 实现 / 独立 reviewer 审查),每 unit 独立 worktree,机器验证裁决完成。
9
9
 
10
- > **cw 2.0 适配说明**:本 skill 的 1.x 形态(epic→feature→slice→wave 四层递归树 + planning/wave/dev/review/merge 5 个编排 agent + 4 个角色受限 cw_* 工具)已退役——cw 2.0 把编排智能收进引擎,「层主不能自审」由账本层硬保证(review submit 必须 `--role reviewer`)。适配设计见 xyz-agent 仓 `docs/todo/pi-cw-cw2-adaptation.md`。
10
+ > **cw 2.0 适配说明**:本 skill 的 1.x 形态(epic→feature→slice→wave 四层递归树 + planning/wave/dev/review/merge 5 个编排 agent + 4 个角色受限 cw_* 工具)已退役——cw 2.0 把编排智能收进引擎,「层主不能自审」由账本层硬保证(review submit 必须 `--role reviewer`)。
11
11
 
12
12
  **分工边界**:cw 命令面(create / evidence / review / verify 的参数与 gate 规则)、模式分流表、手动流程、spec 格式——以 **cw-cli skill 为唯一权威源**(SSOT),本 skill 不重复,只教 pi 环境的 runner 实操差异。
13
13
 
package/src/index.ts CHANGED
@@ -77,7 +77,7 @@ function buildQueryTool(spawner: CwSpawner): ToolDefinition<typeof parameters, C
77
77
 
78
78
  参数:action / unitId(→ --unit,仅 status・report)/ rootId(→ --root,仅 report,与 unitId 互斥)/ json(→ --json,仅 status・frontier)。
79
79
 
80
- 本工具只读——推进流程(建 unit、交证据、跑 runner)经 bash 调 cw 命令,用法以 cw-cli skill 为权威源。返回 details.ok 区分成功/失败;成功时 details.stdout 为 cw 原始输出(--json 时 details.data 为解析后的 JSON)。`,
80
+ 本工具只读——推进流程(建 unit、交证据、跑 runner)经 bash 调 cw 命令,用法以 cw-cli skill 为权威源。返回 details.ok 区分成功/失败;成功时 details.stdout 为 cw 原始输出,stdout 可解析为 JSON 时 details.data 为解析结果。`,
81
81
  executionMode: "sequential",
82
82
  parameters,
83
83
  async execute(
@@ -131,7 +131,7 @@ export default function cwToolExtension(pi: ExtensionAPI): void {
131
131
  pi.registerTool(buildQueryTool(defaultCwSpawner));
132
132
  }
133
133
 
134
- // ── 导出(供测试 + 跨扩展引用)──────────────────────────────────
134
+ // ── 导出(npm 外部 API 面)──────────────────────────────────
135
135
 
136
136
  export { executeCwAction, buildCwArgs, rejectDisallowedAction, rejectInvalidQueryOptions } from "./cw-runner.ts";
137
137
  export type { CwAction, CwDetails, CwToolOptions } from "./cw-runner.ts";