pi-better-harness 0.63.0 → 0.63.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 +7 -0
- package/extensions/task-context/index.ts +3 -1
- package/lib/cli.mjs +14 -4
- package/lib/install-settings.mjs +5 -0
- package/node_modules/pi-better-background-tasks/package.json +2 -2
- package/node_modules/pi-better-background-tasks/runtime-client/artifacts/darwin-arm64.json +1 -1
- package/node_modules/pi-better-background-tasks/runtime-client/artifacts/darwin-x64.json +1 -1
- package/node_modules/pi-better-background-tasks/runtime-client/artifacts/linux-arm64.json +1 -1
- package/node_modules/pi-better-background-tasks/runtime-client/artifacts/linux-x64.json +1 -1
- package/node_modules/pi-better-goal/package.json +1 -1
- package/node_modules/pi-better-goal/src/index.ts +11 -16
- package/node_modules/pi-better-subagents/package.json +2 -2
- package/node_modules/pi-better-subagents/runtime-client/artifacts/darwin-arm64.json +1 -1
- package/node_modules/pi-better-subagents/runtime-client/artifacts/darwin-x64.json +1 -1
- package/node_modules/pi-better-subagents/runtime-client/artifacts/linux-arm64.json +1 -1
- package/node_modules/pi-better-subagents/runtime-client/artifacts/linux-x64.json +1 -1
- package/package.json +5 -5
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,12 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## [0.63.1] - 2026-11-30
|
|
4
|
+
|
|
5
|
+
### Fixed
|
|
6
|
+
|
|
7
|
+
- Install Goal 0.18.4 in both install modes. A plain Goal can inspect and finish its existing checklist while another workflow owns planning.
|
|
8
|
+
- Uninstall removes the components registered in the selected scope, including on older installations that predate the shared Server package.
|
|
9
|
+
|
|
3
10
|
## [0.63.0] - 2026-11-30
|
|
4
11
|
|
|
5
12
|
### Changed
|
|
@@ -495,7 +495,9 @@ export default function taskContextExtension(pi: ExtensionAPI): void {
|
|
|
495
495
|
if (!currentPlan || !outcome?.goalId) return null;
|
|
496
496
|
const entries = ctx.sessionManager.getBranch();
|
|
497
497
|
const goal = reconstructGoalSnapshot(entries);
|
|
498
|
-
if (goal?.goalId !== outcome.goalId || goal.status !== "active"
|
|
498
|
+
if (goal?.goalId !== outcome.goalId || goal.status !== "active") return null;
|
|
499
|
+
if (!goal.command) return currentPlan;
|
|
500
|
+
if (goal.command.source !== "skill") return null;
|
|
499
501
|
const owner = currentWorkflowOwner(entries);
|
|
500
502
|
const binding = goal.workflowBinding === undefined ? currentWorkflowOwner(entries, goal.goalId) : goal.workflowBinding;
|
|
501
503
|
return owner && binding?.name === owner.name && binding.path === owner.path ? currentPlan : null;
|
package/lib/cli.mjs
CHANGED
|
@@ -2,7 +2,7 @@ import { spawnSync } from "node:child_process";
|
|
|
2
2
|
import { readFileSync } from "node:fs";
|
|
3
3
|
import { dirname, resolve } from "node:path";
|
|
4
4
|
import { fileURLToPath } from "node:url";
|
|
5
|
-
import { configureHarnessResources, defaultAgentDir, preflightHarnessInstall } from "./install-settings.mjs";
|
|
5
|
+
import { configureHarnessResources, defaultAgentDir, preflightHarnessInstall, registeredHarnessPackages } from "./install-settings.mjs";
|
|
6
6
|
import { activeRevision } from "./prompt-revisions.mjs";
|
|
7
7
|
import { manageInstructions } from "./instructions.mjs";
|
|
8
8
|
import { webUiDisabledMessage, webUiEnabled } from "./web-ui-flag.mjs";
|
|
@@ -24,7 +24,8 @@ export const componentPackages = [
|
|
|
24
24
|
];
|
|
25
25
|
|
|
26
26
|
// Pi saves the install spec. Resolve the server and its clients as a tested set.
|
|
27
|
-
const
|
|
27
|
+
const installVersions = {
|
|
28
|
+
"pi-better-goal": dependencies["pi-better-goal"],
|
|
28
29
|
[HARNESS_PACKAGE]: version,
|
|
29
30
|
"pi-better-server": dependencies["pi-better-server"],
|
|
30
31
|
"pi-better-subagents": dependencies["pi-better-subagents"],
|
|
@@ -115,8 +116,17 @@ export function run(argv, options = {}) {
|
|
|
115
116
|
|
|
116
117
|
const piCommand = process.platform === "win32" ? "pi.cmd" : "pi";
|
|
117
118
|
const piAction = command === "install" ? "install" : "remove";
|
|
118
|
-
|
|
119
|
-
|
|
119
|
+
let packages = [...componentPackages, HARNESS_PACKAGE];
|
|
120
|
+
if (command === "uninstall") {
|
|
121
|
+
try {
|
|
122
|
+
packages = registeredHarnessPackages(local, packages, options.settings);
|
|
123
|
+
} catch (error) {
|
|
124
|
+
stderr.write(`Could not read the selected Pi registrations: ${error.message}\n`);
|
|
125
|
+
return 1;
|
|
126
|
+
}
|
|
127
|
+
}
|
|
128
|
+
for (const packageName of packages) {
|
|
129
|
+
const pin = installVersions[packageName];
|
|
120
130
|
const source = command === "install" && pin ? `npm:${packageName}@${pin}` : `npm:${packageName}`;
|
|
121
131
|
const args = [piAction, source, ...scopeArgs(local)];
|
|
122
132
|
const result = spawn(piCommand, args, { stdio: "inherit" });
|
package/lib/install-settings.mjs
CHANGED
|
@@ -126,6 +126,11 @@ export function acquire(path) {
|
|
|
126
126
|
throw new Error(`Cannot lock Pi settings at ${path}`);
|
|
127
127
|
}
|
|
128
128
|
|
|
129
|
+
export function registeredHarnessPackages(local, names, options = {}) {
|
|
130
|
+
const packages = readSettings(settingsPath(local, options), { allowMissing: true })?.packages ?? [];
|
|
131
|
+
return names.filter(name => packages.some(entry => matchesPackage(entry, name)));
|
|
132
|
+
}
|
|
133
|
+
|
|
129
134
|
// Read-only validation used before the installer asks Pi to touch settings.
|
|
130
135
|
// Returns whether the selected scope already has a Harness registration so the
|
|
131
136
|
// caller knows whether a failed filter write introduced an unfiltered one.
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "pi-better-background-tasks",
|
|
3
|
-
"version": "0.21.
|
|
3
|
+
"version": "0.21.10",
|
|
4
4
|
"description": "Pi extension for durable background shell tasks, watchers, logs, and status inspection.",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"type": "module",
|
|
@@ -68,7 +68,7 @@
|
|
|
68
68
|
"vitest": "^3.0.0"
|
|
69
69
|
},
|
|
70
70
|
"dependencies": {
|
|
71
|
-
"pi-better-server": "0.11.
|
|
71
|
+
"pi-better-server": "0.11.1",
|
|
72
72
|
"proper-lockfile": "^4.1.2"
|
|
73
73
|
}
|
|
74
74
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"build":{"format":1,"sourceDigest":"
|
|
1
|
+
{"build":{"format":1,"sourceDigest":"be3476831930d60bde9d395b06b8be4d61e16341f01947a9845dade58cdb86b6","piSdkVersion":"1.7.0","nodeVersion":"24.14.1","platform":"darwin-arm64","dependencyLockDigest":"97fbfa01a6e5a49f4f29f5c2048549391417c545cbdd52ec799629aa867d8653","protocolVersion":1,"serverVersion":"0.11.1","contentId":"6feeb05c7159ba15e8309836ef430b9d790a61e82dd054af97b69d369ffada43"},"sha256":"347649ee91c558d4cd89849ed3c3edf2cf24e336a25b62cac09a2c2e427d49e7"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"build":{"format":1,"sourceDigest":"
|
|
1
|
+
{"build":{"format":1,"sourceDigest":"be3476831930d60bde9d395b06b8be4d61e16341f01947a9845dade58cdb86b6","piSdkVersion":"1.7.0","nodeVersion":"24.14.1","platform":"darwin-x64","dependencyLockDigest":"97fbfa01a6e5a49f4f29f5c2048549391417c545cbdd52ec799629aa867d8653","protocolVersion":1,"serverVersion":"0.11.1","contentId":"57ac8370ebee5804a58ba4665b87e2d608d6c28ff01c10737c6bed2c43e57a1d"},"sha256":"cf254f7f1be9063998bc4fb0760e7ce6a1e403d562b04240573aac42cff2b8f3"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"build":{"format":1,"sourceDigest":"
|
|
1
|
+
{"build":{"format":1,"sourceDigest":"be3476831930d60bde9d395b06b8be4d61e16341f01947a9845dade58cdb86b6","piSdkVersion":"1.7.0","nodeVersion":"24.14.1","platform":"linux-arm64","dependencyLockDigest":"97fbfa01a6e5a49f4f29f5c2048549391417c545cbdd52ec799629aa867d8653","protocolVersion":1,"serverVersion":"0.11.1","contentId":"541e60a2bb8b040cacb376b2fe64752431f302f2ec6ddffb7e49a3985999a4d8"},"sha256":"c5b1f6f9d75436ea549031519fe2dc048a1a15a408525db032827a9c1d310850"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"build":{"format":1,"sourceDigest":"
|
|
1
|
+
{"build":{"format":1,"sourceDigest":"be3476831930d60bde9d395b06b8be4d61e16341f01947a9845dade58cdb86b6","piSdkVersion":"1.7.0","nodeVersion":"24.14.1","platform":"linux-x64","dependencyLockDigest":"97fbfa01a6e5a49f4f29f5c2048549391417c545cbdd52ec799629aa867d8653","protocolVersion":1,"serverVersion":"0.11.1","contentId":"3016118ff236271c94e7b6e8d85a3062799f20631347f40261ba3d6969e4bb33"},"sha256":"1f16bd0ea30b11859ae4c7c3e84540aba0446cfc2e53c037bc75bf3398043abc"}
|
|
@@ -506,8 +506,8 @@ export default function (pi: ExtensionAPI): void {
|
|
|
506
506
|
escapeAbortSuppression.turn === turnGeneration &&
|
|
507
507
|
escapeAbortSuppression.execution === executionGeneration;
|
|
508
508
|
|
|
509
|
-
/**
|
|
510
|
-
const
|
|
509
|
+
/** Resolve and verify the saved coordinator once before recording it on resume. */
|
|
510
|
+
const resolveResumeOwner = (goal: GoalSnapshot, ctx: ExtensionContext): ReturnType<typeof currentWorkflowOwner> | string => {
|
|
511
511
|
if (!goal.command && skillCommandName(goal.objective)) {
|
|
512
512
|
return "Invoke the skill directly; this legacy slash-command goal cannot resume as plain text.";
|
|
513
513
|
}
|
|
@@ -516,7 +516,11 @@ export default function (pi: ExtensionAPI): void {
|
|
|
516
516
|
}
|
|
517
517
|
if (goal.command?.source === "skill") {
|
|
518
518
|
try {
|
|
519
|
-
goalWorkflowOwner(goal);
|
|
519
|
+
const restored = goalWorkflowOwner(goal);
|
|
520
|
+
if (!restoredWorkflowMatches(goal, ctx.sessionManager.getBranch(), restored)) {
|
|
521
|
+
return "Reinvoke the original workflow to continue its Todo.";
|
|
522
|
+
}
|
|
523
|
+
return restored;
|
|
520
524
|
} catch (error) {
|
|
521
525
|
return `Cannot resume: ${error instanceof Error ? error.message : String(error)} Reinvoke /${goal.command.name}.`;
|
|
522
526
|
}
|
|
@@ -560,14 +564,11 @@ export default function (pi: ExtensionAPI): void {
|
|
|
560
564
|
if (source === "tool" && currentContinuationState(ctx, current.goalId)?.blocked) {
|
|
561
565
|
return { ok: false, message: "Only /goal resume or alt+g can reopen a no-progress hold." };
|
|
562
566
|
}
|
|
563
|
-
const
|
|
564
|
-
if (
|
|
565
|
-
return { ok: false, message: blocker };
|
|
566
|
-
}
|
|
567
|
+
const owner = resolveResumeOwner(current, ctx);
|
|
568
|
+
if (typeof owner === "string") return { ok: false, message: owner };
|
|
567
569
|
const goal = held ? current : goalWithStatus(current, "active");
|
|
568
570
|
// Resuming a skill-bound goal is explicit re-entry into its workflow: rebind the owner the
|
|
569
571
|
// goal was created with (released by a handback) before the continuation runs.
|
|
570
|
-
const owner = goalWorkflowOwner(current);
|
|
571
572
|
const activeOwner = getWorkflow(ctx);
|
|
572
573
|
if (owner && (activeOwner?.name !== owner.name || activeOwner.path !== owner.path)) recordWorkflow(owner);
|
|
573
574
|
setGoal(goal, ctx, source);
|
|
@@ -1038,19 +1039,13 @@ export default function (pi: ExtensionAPI): void {
|
|
|
1038
1039
|
if (invalid) return invalid;
|
|
1039
1040
|
const owner = getWorkflow(ctx);
|
|
1040
1041
|
if (!previous && owner && !workflowAvailable(owner)) return `Restore /skill:${owner.name} before continuing its Todo.`;
|
|
1041
|
-
|
|
1042
|
-
|
|
1043
|
-
if (blocker) return blocker;
|
|
1044
|
-
}
|
|
1042
|
+
const restoredOwner = previous ? resolveResumeOwner(previous, ctx) : null;
|
|
1043
|
+
if (typeof restoredOwner === "string") return restoredOwner;
|
|
1045
1044
|
if (objective.startsWith("/") && (!previous?.command || previous.objective.trim() !== objective)) {
|
|
1046
1045
|
return "Reinvoke the original command to continue this Goal.";
|
|
1047
1046
|
}
|
|
1048
1047
|
const command = previous ? previous.command : owner ? resolveGoalCommand(pi, `/skill:${owner.name}`) : null;
|
|
1049
1048
|
const goal = createGoalSnapshot(objective, null, undefined, command ?? undefined);
|
|
1050
|
-
const restoredOwner = previous?.command ? goalWorkflowOwner(goal) : null;
|
|
1051
|
-
if (previous?.command?.source === "skill" && !restoredWorkflowMatches(previous, ctx.sessionManager.getBranch(), restoredOwner)) {
|
|
1052
|
-
return "Reinvoke the original workflow to continue its Todo.";
|
|
1053
|
-
}
|
|
1054
1049
|
if (handoffOwner && restoredOwner?.name !== handoffOwner) return "Reinvoke the original workflow to continue its Todo.";
|
|
1055
1050
|
if (command?.source === "skill") {
|
|
1056
1051
|
const binding = previous ? restoredOwner : owner;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "pi-better-subagents",
|
|
3
|
-
"version": "0.41.
|
|
3
|
+
"version": "0.41.3",
|
|
4
4
|
"description": "Pi extension for detached, sandboxed subagent runs that keep the foreground session free.",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"type": "module",
|
|
@@ -81,7 +81,7 @@
|
|
|
81
81
|
"@earendil-works/pi-tui": "*"
|
|
82
82
|
},
|
|
83
83
|
"dependencies": {
|
|
84
|
-
"pi-better-server": "0.11.
|
|
84
|
+
"pi-better-server": "0.11.1",
|
|
85
85
|
"proper-lockfile": "^4.1.2",
|
|
86
86
|
"shell-quote": "1.12.0",
|
|
87
87
|
"smol-toml": "1.9.0",
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"build":{"format":1,"sourceDigest":"
|
|
1
|
+
{"build":{"format":1,"sourceDigest":"be3476831930d60bde9d395b06b8be4d61e16341f01947a9845dade58cdb86b6","piSdkVersion":"1.7.0","nodeVersion":"24.14.1","platform":"darwin-arm64","dependencyLockDigest":"97fbfa01a6e5a49f4f29f5c2048549391417c545cbdd52ec799629aa867d8653","protocolVersion":1,"serverVersion":"0.11.1","contentId":"6feeb05c7159ba15e8309836ef430b9d790a61e82dd054af97b69d369ffada43"},"sha256":"347649ee91c558d4cd89849ed3c3edf2cf24e336a25b62cac09a2c2e427d49e7"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"build":{"format":1,"sourceDigest":"
|
|
1
|
+
{"build":{"format":1,"sourceDigest":"be3476831930d60bde9d395b06b8be4d61e16341f01947a9845dade58cdb86b6","piSdkVersion":"1.7.0","nodeVersion":"24.14.1","platform":"darwin-x64","dependencyLockDigest":"97fbfa01a6e5a49f4f29f5c2048549391417c545cbdd52ec799629aa867d8653","protocolVersion":1,"serverVersion":"0.11.1","contentId":"57ac8370ebee5804a58ba4665b87e2d608d6c28ff01c10737c6bed2c43e57a1d"},"sha256":"cf254f7f1be9063998bc4fb0760e7ce6a1e403d562b04240573aac42cff2b8f3"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"build":{"format":1,"sourceDigest":"
|
|
1
|
+
{"build":{"format":1,"sourceDigest":"be3476831930d60bde9d395b06b8be4d61e16341f01947a9845dade58cdb86b6","piSdkVersion":"1.7.0","nodeVersion":"24.14.1","platform":"linux-arm64","dependencyLockDigest":"97fbfa01a6e5a49f4f29f5c2048549391417c545cbdd52ec799629aa867d8653","protocolVersion":1,"serverVersion":"0.11.1","contentId":"541e60a2bb8b040cacb376b2fe64752431f302f2ec6ddffb7e49a3985999a4d8"},"sha256":"c5b1f6f9d75436ea549031519fe2dc048a1a15a408525db032827a9c1d310850"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"build":{"format":1,"sourceDigest":"
|
|
1
|
+
{"build":{"format":1,"sourceDigest":"be3476831930d60bde9d395b06b8be4d61e16341f01947a9845dade58cdb86b6","piSdkVersion":"1.7.0","nodeVersion":"24.14.1","platform":"linux-x64","dependencyLockDigest":"97fbfa01a6e5a49f4f29f5c2048549391417c545cbdd52ec799629aa867d8653","protocolVersion":1,"serverVersion":"0.11.1","contentId":"3016118ff236271c94e7b6e8d85a3062799f20631347f40261ba3d6969e4bb33"},"sha256":"1f16bd0ea30b11859ae4c7c3e84540aba0446cfc2e53c037bc75bf3398043abc"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "pi-better-harness",
|
|
3
|
-
"version": "0.63.
|
|
3
|
+
"version": "0.63.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",
|
|
@@ -74,12 +74,12 @@
|
|
|
74
74
|
"@xterm/xterm": "6.0.0",
|
|
75
75
|
"marked": "18.0.5",
|
|
76
76
|
"openai": "6.26.0",
|
|
77
|
-
"pi-better-background-tasks": "0.21.
|
|
78
|
-
"pi-better-goal": "0.18.
|
|
77
|
+
"pi-better-background-tasks": "0.21.10",
|
|
78
|
+
"pi-better-goal": "0.18.4",
|
|
79
79
|
"pi-better-sandbox": "0.15.2",
|
|
80
|
-
"pi-better-server": "0.11.
|
|
80
|
+
"pi-better-server": "0.11.1",
|
|
81
81
|
"pi-better-ssh": "0.1.7",
|
|
82
|
-
"pi-better-subagents": "0.41.
|
|
82
|
+
"pi-better-subagents": "0.41.3",
|
|
83
83
|
"proper-lockfile": "^4.1.2",
|
|
84
84
|
"shell-quote": "1.12.0",
|
|
85
85
|
"smol-toml": "1.9.0",
|