pi-better-harness 0.3.10 → 0.3.11
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.
|
@@ -25,12 +25,12 @@ Skills that own execution and their own task plan can opt in through `SKILL.md`
|
|
|
25
25
|
|
|
26
26
|
```yaml
|
|
27
27
|
metadata:
|
|
28
|
-
|
|
28
|
+
workflow-role: coordinator
|
|
29
29
|
```
|
|
30
30
|
|
|
31
31
|
Invoke the skill with Pi's `/skill:name` command. The goal extension checks Pi's skill-command provenance, persists the owner on the session branch, and restores its instructions on resumed turns. It does not infer ownership from ordinary text or skill names. A goal such as `/goal /skill:name task` is rejected; invoke `/skill:name task` directly and use `/goal` only for a plain-language objective. Legacy slash-shaped goals pause on resume rather than running without the skill. `/workflow` shows the owner; call `release_workflow` after the workflow's completion audit (or use `/workflow clear` to release it manually). Completing an active goal also releases ownership.
|
|
32
32
|
|
|
33
|
-
When `pi-better-plan` is installed, it defers its prompt, checklist, and `update_plan` tool to a skill-owned task plan. Skills without this metadata retain normal goal and plan behavior. The skill itself owns its planning format and worker policy; the harness does not enumerate skills or impose a shared workflow schema.
|
|
33
|
+
When `pi-better-plan` is installed, it defers its prompt, checklist, and `update_plan` tool to a skill-owned task plan. Skills without this metadata retain normal goal and plan behavior. The skill itself owns its planning format and worker policy; the harness does not enumerate skills or impose a shared workflow schema. The former `pi-better-plan-workflow: coordinator` metadata remains supported for installed skills.
|
|
34
34
|
|
|
35
35
|
## Install
|
|
36
36
|
|
|
@@ -25,14 +25,17 @@ export function workflowOwnerFromSkill(name: string, path: string): WorkflowOwne
|
|
|
25
25
|
const metadata = (frontmatter as { metadata?: unknown }).metadata;
|
|
26
26
|
if (!metadata || typeof metadata !== "object") return null;
|
|
27
27
|
const fields = metadata as Record<string, unknown>;
|
|
28
|
-
|
|
28
|
+
const role = fields["workflow-role"];
|
|
29
|
+
const legacyRole = fields["pi-better-plan-workflow"];
|
|
30
|
+
if (role === undefined && legacyRole === undefined) {
|
|
29
31
|
if (fields["pi-better-workflow-role"] !== undefined || fields["pi-better-plan-owner"] !== undefined) {
|
|
30
|
-
throw new Error(`Outdated workflow metadata in ${path}. Use
|
|
32
|
+
throw new Error(`Outdated workflow metadata in ${path}. Use workflow-role: coordinator.`);
|
|
31
33
|
}
|
|
32
34
|
return null;
|
|
33
35
|
}
|
|
34
|
-
if (
|
|
35
|
-
|
|
36
|
+
if ((role !== undefined && role !== "coordinator") ||
|
|
37
|
+
(legacyRole !== undefined && legacyRole !== "coordinator")) {
|
|
38
|
+
throw new Error(`Invalid workflow metadata in ${path}. Expected workflow-role: coordinator.`);
|
|
36
39
|
}
|
|
37
40
|
return { name, path, role: "coordinator", planOwner: "workflow" };
|
|
38
41
|
}
|
|
@@ -23,7 +23,7 @@ Independent foreground and delegated milestones may both be `in_progress`. Use s
|
|
|
23
23
|
|
|
24
24
|
For a DAG, assign stable ids to prerequisite steps and list those ids in dependent steps' `dependsOn`. Dependencies must exist in the same plan; cycles and starting or completing a step before its prerequisites are complete are rejected. `get_plan` reports pending steps whose prerequisites are complete as ready. Plans without edges keep their existing behavior.
|
|
25
25
|
|
|
26
|
-
When an explicitly invoked skill declares `
|
|
26
|
+
When an explicitly invoked skill declares `workflow-role: coordinator` in its metadata, that skill's task plan takes precedence. The generic checklist stays persisted but is hidden, and `update_plan` refuses competing updates until workflow ownership is released. Rush-style workflows can use their own dependency graph without copying it into this plan.
|
|
27
27
|
|
|
28
28
|
## Install
|
|
29
29
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "pi-better-harness",
|
|
3
|
-
"version": "0.3.
|
|
3
|
+
"version": "0.3.11",
|
|
4
4
|
"description": "Pi extension bundle for a write sandbox, subagents, background tasks, SSH, goals, and structured plans.",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"type": "module",
|
|
@@ -51,8 +51,8 @@
|
|
|
51
51
|
},
|
|
52
52
|
"dependencies": {
|
|
53
53
|
"pi-better-background-tasks": "0.2.13",
|
|
54
|
-
"pi-better-goal": "0.3.
|
|
55
|
-
"pi-better-plan": "0.2.
|
|
54
|
+
"pi-better-goal": "0.3.1",
|
|
55
|
+
"pi-better-plan": "0.2.1",
|
|
56
56
|
"pi-better-sandbox": "0.3.0",
|
|
57
57
|
"pi-better-ssh": "0.1.1",
|
|
58
58
|
"pi-better-subagents": "0.1.29",
|