pi-better-harness 0.61.0 → 0.61.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.
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,15 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## [0.61.1] - 2026-11-29
|
|
4
|
+
|
|
5
|
+
### Fixed
|
|
6
|
+
|
|
7
|
+
- Reopening a completed Goal restores the workflow plan bound after its most recent handback and resume. Bundles Goal 0.18.2.
|
|
8
|
+
|
|
9
|
+
### Changed
|
|
10
|
+
|
|
11
|
+
- Carry the workflow's acceptance criteria into worker assignments.
|
|
12
|
+
|
|
3
13
|
## [0.61.0] - 2026-11-29
|
|
4
14
|
|
|
5
15
|
### Added
|
|
@@ -154,8 +154,13 @@ export function registerDynamicWorkflow(pi: ExtensionAPI, owner: (ctx: Extension
|
|
|
154
154
|
needs.add(reviewer.review.revision);
|
|
155
155
|
}
|
|
156
156
|
const prior = current.history.filter(h => needs.has(h.step)).map(h => h.step + ": " + h.result);
|
|
157
|
+
const callerPrompt = typeof input.prompt === "string" ? input.prompt : "";
|
|
158
|
+
const criteria = current.criteria.filter(criterion => !callerPrompt.includes(criterion));
|
|
157
159
|
const prompt = [input.prompt, "Objective: " + current.objective, "Assignment: " + s.title,
|
|
158
|
-
"Required output: " + s.output,
|
|
160
|
+
"Required output: " + s.output,
|
|
161
|
+
...(criteria.length ? ["Workflow acceptance criteria (overall objective; apply within this assignment):",
|
|
162
|
+
...criteria.map(criterion => "- " + criterion)] : []),
|
|
163
|
+
...prior].join("\n");
|
|
159
164
|
request.admission = { prompt, settled(receipt) {
|
|
160
165
|
// Re-read the selected branch after asynchronous admission. A fork or a
|
|
161
166
|
// simultaneous independent launch may have changed the latest snapshot.
|
|
@@ -73,15 +73,37 @@ export function boundPlanEntry(entries: Iterable<EntryLike>, owner: WorkflowOwne
|
|
|
73
73
|
let plan: { version: 1; kind: "set"; owner: string; path: string; runId?: string } | undefined;
|
|
74
74
|
let ownsRun = false;
|
|
75
75
|
let foundGoal = false;
|
|
76
|
+
let handback: "paused" | "released" | "rebound" | undefined;
|
|
76
77
|
for (const entry of entries) {
|
|
78
|
+
// resumeGoal records the owner and then activates the same Goal. A separate
|
|
79
|
+
// invocation can bind the same skill, but cannot supply that Goal transition.
|
|
80
|
+
if (handback === "rebound" && entry.type === "message") handback = "released";
|
|
77
81
|
if (entry.type !== "custom" || !isRecord(entry.data)) continue;
|
|
78
82
|
const data = entry.data;
|
|
79
83
|
if (goalId && entry.customType === EXTENSION_NAME && data.kind === "set" && isRecord(data.goal)) {
|
|
80
84
|
if (foundGoal && (data.goal.goalId !== goalId || data.goal.status === "complete")) break;
|
|
81
85
|
if (data.goal.goalId === goalId) foundGoal = true;
|
|
86
|
+
if (handback === "released") {
|
|
87
|
+
if (data.goal.status === "paused" && data.goal.pauseReason === "handback") continue;
|
|
88
|
+
break;
|
|
89
|
+
}
|
|
90
|
+
if (handback === "rebound") {
|
|
91
|
+
if (data.goal.status !== "active") break;
|
|
92
|
+
plan = undefined;
|
|
93
|
+
}
|
|
94
|
+
handback = foundGoal && data.goal.status === "paused" && data.goal.pauseReason === "handback" ? "paused" : undefined;
|
|
82
95
|
}
|
|
83
96
|
if (data.version !== 1) continue;
|
|
84
97
|
if (entry.customType === WORKFLOW_ENTRY) {
|
|
98
|
+
if (handback === "paused" && ownsRun && data.kind === "clear") {
|
|
99
|
+
handback = "released";
|
|
100
|
+
continue;
|
|
101
|
+
}
|
|
102
|
+
if (handback === "released" || handback === "rebound") {
|
|
103
|
+
handback = data.kind === "set" && isRecord(data.owner) && data.owner.name === owner.name && data.owner.path === owner.path
|
|
104
|
+
? "rebound" : "released";
|
|
105
|
+
continue;
|
|
106
|
+
}
|
|
85
107
|
// A later invocation, even of the same skill, starts a different run.
|
|
86
108
|
if (foundGoal && ownsRun && (data.kind === "set" || data.kind === "clear")) break;
|
|
87
109
|
if (data.kind === "clear") ownsRun = false;
|
|
@@ -91,6 +113,8 @@ export function boundPlanEntry(entries: Iterable<EntryLike>, owner: WorkflowOwne
|
|
|
91
113
|
}
|
|
92
114
|
}
|
|
93
115
|
if (entry.customType !== WORKFLOW_PLAN_ENTRY) continue;
|
|
116
|
+
if (handback === "released") continue;
|
|
117
|
+
if (handback === "rebound") { handback = "released"; continue; }
|
|
94
118
|
if (data.kind === "clear") plan = undefined;
|
|
95
119
|
else if (data.kind === "set" && data.owner === owner.name && typeof data.path === "string") {
|
|
96
120
|
plan = { version: 1, kind: "set", owner: owner.name, path: data.path,
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "pi-better-harness",
|
|
3
|
-
"version": "0.61.
|
|
3
|
+
"version": "0.61.1",
|
|
4
4
|
"description": "Pi extension bundle for a write sandbox, subagents, background tasks, SSH, Goals, and Todo lists.",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"type": "module",
|
|
@@ -67,7 +67,7 @@
|
|
|
67
67
|
},
|
|
68
68
|
"dependencies": {
|
|
69
69
|
"pi-better-background-tasks": "0.21.7",
|
|
70
|
-
"pi-better-goal": "0.18.
|
|
70
|
+
"pi-better-goal": "0.18.2",
|
|
71
71
|
"pi-better-sandbox": "0.15.2",
|
|
72
72
|
"pi-better-ssh": "0.1.7",
|
|
73
73
|
"pi-better-subagents": "0.41.0",
|