pi-better-harness 0.62.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.
Files changed (33) hide show
  1. package/CHANGELOG.md +13 -0
  2. package/README.md +5 -0
  3. package/bin/pi-remote.mjs +2 -0
  4. package/extensions/server/detach.ts +1 -0
  5. package/extensions/server/remote.ts +1 -0
  6. package/extensions/task-context/index.ts +3 -1
  7. package/lib/cli.mjs +25 -4
  8. package/lib/install-settings.mjs +5 -0
  9. package/node_modules/pi-better-background-tasks/README.md +1 -0
  10. package/node_modules/pi-better-background-tasks/package.json +2 -1
  11. package/node_modules/pi-better-background-tasks/runtime-client/artifacts/darwin-arm64.json +1 -1
  12. package/node_modules/pi-better-background-tasks/runtime-client/artifacts/darwin-x64.json +1 -1
  13. package/node_modules/pi-better-background-tasks/runtime-client/artifacts/linux-arm64.json +1 -1
  14. package/node_modules/pi-better-background-tasks/runtime-client/artifacts/linux-x64.json +1 -1
  15. package/node_modules/pi-better-background-tasks/runtime-client/src/runtime/client.mjs +3 -1
  16. package/node_modules/pi-better-goal/package.json +1 -1
  17. package/node_modules/pi-better-goal/src/index.ts +11 -16
  18. package/node_modules/pi-better-subagents/README.md +1 -0
  19. package/node_modules/pi-better-subagents/package.json +2 -1
  20. package/node_modules/pi-better-subagents/runtime-client/artifacts/darwin-arm64.json +1 -1
  21. package/node_modules/pi-better-subagents/runtime-client/artifacts/darwin-x64.json +1 -1
  22. package/node_modules/pi-better-subagents/runtime-client/artifacts/linux-arm64.json +1 -1
  23. package/node_modules/pi-better-subagents/runtime-client/artifacts/linux-x64.json +1 -1
  24. package/node_modules/pi-better-subagents/runtime-client/src/runtime/client.mjs +3 -1
  25. package/package.json +9 -5
  26. package/node_modules/pi-better-background-tasks/runtime-client/artifacts/darwin-arm64.gz +0 -0
  27. package/node_modules/pi-better-background-tasks/runtime-client/artifacts/darwin-x64.gz +0 -0
  28. package/node_modules/pi-better-background-tasks/runtime-client/artifacts/linux-arm64.gz +0 -0
  29. package/node_modules/pi-better-background-tasks/runtime-client/artifacts/linux-x64.gz +0 -0
  30. package/node_modules/pi-better-subagents/runtime-client/artifacts/darwin-arm64.gz +0 -0
  31. package/node_modules/pi-better-subagents/runtime-client/artifacts/darwin-x64.gz +0 -0
  32. package/node_modules/pi-better-subagents/runtime-client/artifacts/linux-arm64.gz +0 -0
  33. package/node_modules/pi-better-subagents/runtime-client/artifacts/linux-x64.gz +0 -0
package/CHANGELOG.md CHANGED
@@ -1,5 +1,18 @@
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
+
10
+ ## [0.63.0] - 2026-11-30
11
+
12
+ ### Changed
13
+
14
+ - Include the shared server in both Harness install modes. Set `PI_BETTER_SERVER_ENABLE_REMOTE=1` before starting Pi to enable `/remote`, `/detach` and `pi-remote`.
15
+
3
16
  ## [0.62.0] - 2026-11-30
4
17
 
5
18
  ### Added
package/README.md CHANGED
@@ -11,10 +11,13 @@ Use `pi-better-harness` when you want the full working set for Pi. It manages:
11
11
  - `pi-better-sandbox` for an opt-in write sandbox around Pi's foreground tools.
12
12
  - `pi-better-subagents` for detached, sandboxed subagent runs.
13
13
  - `pi-better-background-tasks` for durable shell tasks and watchers.
14
+ - `pi-better-server` provides the shared task runtime and opt-in remote session commands.
14
15
  - `pi-better-ssh` for short remote commands over reusable SSH connections.
15
16
  - `pi-better-goal` for explicit triggers, pause/resume, and background-aware continuation.
16
17
  - Harness-owned Goal & Todo for session context and checklist progress. Saved work appears in the panel. Automatic Goal execution defaults to Off.
17
18
 
19
+ Both Harness install methods include the shared server for subagents and background tasks. Remote session commands are off by default. Set `PI_BETTER_SERVER_ENABLE_REMOTE=1` before starting Pi to enable `/remote` and `/detach`. The same variable enables the `pi-remote` CLI.
20
+
18
21
  `pi-better-read-aloud` is intentionally not included yet.
19
22
 
20
23
  <a id="outcome--todo"></a>
@@ -508,6 +511,8 @@ Use the installer when you want every core extension with standalone package ide
508
511
 
509
512
  ## Update Or Remove
510
513
 
514
+ For an installer-managed setup, run `npx pi-better-harness@latest install` to update Harness, Server and both task clients together. Add `--local` for a project install. For a direct bundle install, run `pi update npm:pi-better-harness`.
515
+
511
516
  Remove every standalone package:
512
517
 
513
518
  ```sh
@@ -0,0 +1,2 @@
1
+ #!/usr/bin/env node
2
+ import "pi-better-server/bin/pi-remote.mjs";
@@ -0,0 +1 @@
1
+ export { default } from "pi-better-server/src/detach/extension.ts";
@@ -0,0 +1 @@
1
+ export { default } from "pi-better-server/src/remote-client/extension.ts";
@@ -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" || goal.command?.source !== "skill") return null;
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,13 +2,13 @@ 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";
9
9
 
10
10
  const packageRoot = resolve(dirname(fileURLToPath(import.meta.url)), "..");
11
- const { version } = JSON.parse(readFileSync(resolve(packageRoot, "package.json"), "utf8"));
11
+ const { version, dependencies } = JSON.parse(readFileSync(resolve(packageRoot, "package.json"), "utf8"));
12
12
 
13
13
  const HARNESS_PACKAGE = "pi-better-harness";
14
14
 
@@ -19,9 +19,19 @@ export const componentPackages = [
19
19
  "pi-better-subagents",
20
20
  "pi-better-background-tasks",
21
21
  "pi-better-ssh",
22
+ "pi-better-server",
22
23
  "pi-better-goal",
23
24
  ];
24
25
 
26
+ // Pi saves the install spec. Resolve the server and its clients as a tested set.
27
+ const installVersions = {
28
+ "pi-better-goal": dependencies["pi-better-goal"],
29
+ [HARNESS_PACKAGE]: version,
30
+ "pi-better-server": dependencies["pi-better-server"],
31
+ "pi-better-subagents": dependencies["pi-better-subagents"],
32
+ "pi-better-background-tasks": dependencies["pi-better-background-tasks"],
33
+ };
34
+
25
35
  function usage() {
26
36
  const web = webUiEnabled();
27
37
  return `Usage: pi-better-harness <install|uninstall> [--local]
@@ -106,8 +116,19 @@ export function run(argv, options = {}) {
106
116
 
107
117
  const piCommand = process.platform === "win32" ? "pi.cmd" : "pi";
108
118
  const piAction = command === "install" ? "install" : "remove";
109
- for (const packageName of [...componentPackages, HARNESS_PACKAGE]) {
110
- const args = [piAction, `npm:${packageName}`, ...scopeArgs(local)];
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];
130
+ const source = command === "install" && pin ? `npm:${packageName}@${pin}` : `npm:${packageName}`;
131
+ const args = [piAction, source, ...scopeArgs(local)];
111
132
  const result = spawn(piCommand, args, { stdio: "inherit" });
112
133
  if (result.error) {
113
134
  stderr.write(`Failed to run Pi for ${packageName}: ${result.error.message}\n`);
@@ -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.
@@ -13,6 +13,7 @@ Use `pi-better-background-tasks` when a command should keep running while the fo
13
13
  Run `pi-background-runtime-status` to ensure the manifest-pinned local server and
14
14
  print its canonical agent root, build, Node version, instance and capabilities as JSON.
15
15
  This command does not create a hosted Pi session or require Harness.
16
+ The package pins its `pi-better-server` dependency and verifies the shared runtime archive against its own manifest.
16
17
  The first use installs a verified private Node 24 and locked server dependencies.
17
18
  Set `PI_OFFLINE=1` to require the cached runtime without downloads.
18
19
  `PI_CODING_AGENT_DIR` selects the agent root; `PI_SERVER_DIR` selects the initial
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "pi-better-background-tasks",
3
- "version": "0.21.8",
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,6 +68,7 @@
68
68
  "vitest": "^3.0.0"
69
69
  },
70
70
  "dependencies": {
71
+ "pi-better-server": "0.11.1",
71
72
  "proper-lockfile": "^4.1.2"
72
73
  }
73
74
  }
@@ -1 +1 @@
1
- {"build":{"format":1,"sourceDigest":"5ec2e8b82e54114988979e0c6c99625a187aa36f03fd3a55e8e9de1c4e9e886d","piSdkVersion":"1.7.0","nodeVersion":"24.14.1","platform":"darwin-arm64","dependencyLockDigest":"6becccc0aa89805268794027bb9d0927ceab5ca05bee26a346d0d32e568968de","protocolVersion":1,"serverVersion":"0.10.2","contentId":"d2ffa65a6f47ded955f2fda72baf04dee23af6cb73112a76a727d8d2be2ec51b"},"sha256":"ecc52ce22442b2695721a8be720591625846e053a22e37c6cb8733579a5e45af"}
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":"5ec2e8b82e54114988979e0c6c99625a187aa36f03fd3a55e8e9de1c4e9e886d","piSdkVersion":"1.7.0","nodeVersion":"24.14.1","platform":"darwin-x64","dependencyLockDigest":"6becccc0aa89805268794027bb9d0927ceab5ca05bee26a346d0d32e568968de","protocolVersion":1,"serverVersion":"0.10.2","contentId":"618352ae5141f4109cc929912ccc696342766816a98d5429538f0c2044ffe9b2"},"sha256":"4541ed304e0ed34b3a2896a7dbad4ef0e475730fe01f368b51d2b0c70aedfb67"}
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":"5ec2e8b82e54114988979e0c6c99625a187aa36f03fd3a55e8e9de1c4e9e886d","piSdkVersion":"1.7.0","nodeVersion":"24.14.1","platform":"linux-arm64","dependencyLockDigest":"6becccc0aa89805268794027bb9d0927ceab5ca05bee26a346d0d32e568968de","protocolVersion":1,"serverVersion":"0.10.2","contentId":"4c3d05d143af14c889f7cb743bc8795f8e6647db8d63be11ff472cf852ca3ff5"},"sha256":"18f543353322a2981d19c2ab96d0aa8b7f81db30358cfdc511f553ff47d5bde9"}
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":"5ec2e8b82e54114988979e0c6c99625a187aa36f03fd3a55e8e9de1c4e9e886d","piSdkVersion":"1.7.0","nodeVersion":"24.14.1","platform":"linux-x64","dependencyLockDigest":"6becccc0aa89805268794027bb9d0927ceab5ca05bee26a346d0d32e568968de","protocolVersion":1,"serverVersion":"0.10.2","contentId":"d0db4dfa880815b86159c9aa0c8d45631c7bc72bbcff8146a446a6c99edc1246"},"sha256":"4df7318a838d9f8e522cfb10097bda6fa1f690e5bd849fb8dec2982a4e0fa82e"}
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"}
@@ -1,5 +1,6 @@
1
1
  import { spawn } from "node:child_process";
2
2
  import { closeSync, openSync, readFileSync } from "node:fs";
3
+ import { createRequire } from "node:module";
3
4
  import { connect } from "node:net";
4
5
  import { join } from "node:path";
5
6
  import { setTimeout as delay } from "node:timers/promises";
@@ -75,7 +76,8 @@ export async function ensureRuntime(options) {
75
76
  let artifact;
76
77
  try {
77
78
  const manifest = JSON.parse(readFileSync(join(directory, `${platform}.json`), "utf8"));
78
- artifact = { ...manifest, bytes: readFileSync(join(directory, `${platform}.gz`)) };
79
+ const archive = createRequire(import.meta.url).resolve(`pi-better-server/runtime-artifacts/${platform}.gz`);
80
+ artifact = { ...manifest, bytes: readFileSync(archive) };
79
81
  }
80
82
  catch (error) {
81
83
  throw new Error(`runtime-unavailable: cannot read pinned artifact for ${platform}; reinstall the standalone package. ${String(error)}`);
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "pi-better-goal",
3
- "version": "0.18.3",
3
+ "version": "0.18.4",
4
4
  "description": "Pi extension for goal tracking with background-aware continuation.",
5
5
  "license": "MIT",
6
6
  "type": "module",
@@ -506,8 +506,8 @@ export default function (pi: ExtensionAPI): void {
506
506
  escapeAbortSuppression.turn === turnGeneration &&
507
507
  escapeAbortSuppression.execution === executionGeneration;
508
508
 
509
- /** Why a paused goal cannot become active again, or null when it can. */
510
- const resumeBlocker = (goal: GoalSnapshot, ctx: ExtensionContext): string | null => {
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 blocker = resumeBlocker(current, ctx);
564
- if (blocker) {
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
- if (previous) {
1042
- const blocker = resumeBlocker(previous, ctx);
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;
@@ -11,6 +11,7 @@ Use `pi-better-subagents` when you want Pi to launch independent agent work with
11
11
  Run `pi-subagents-runtime-status` to ensure the manifest-pinned local server and
12
12
  print its canonical agent root, build, Node version, instance and capabilities as JSON.
13
13
  This command does not create a hosted Pi session or require Harness.
14
+ The package pins its `pi-better-server` dependency and verifies the shared runtime archive against its own manifest.
14
15
  The first use installs a verified private Node 24 and locked server dependencies.
15
16
  Set `PI_OFFLINE=1` to require the cached runtime without downloads.
16
17
  `PI_CODING_AGENT_DIR` selects the agent root; `PI_SERVER_DIR` selects the initial
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "pi-better-subagents",
3
- "version": "0.41.1",
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,6 +81,7 @@
81
81
  "@earendil-works/pi-tui": "*"
82
82
  },
83
83
  "dependencies": {
84
+ "pi-better-server": "0.11.1",
84
85
  "proper-lockfile": "^4.1.2",
85
86
  "shell-quote": "1.12.0",
86
87
  "smol-toml": "1.9.0",
@@ -1 +1 @@
1
- {"build":{"format":1,"sourceDigest":"5ec2e8b82e54114988979e0c6c99625a187aa36f03fd3a55e8e9de1c4e9e886d","piSdkVersion":"1.7.0","nodeVersion":"24.14.1","platform":"darwin-arm64","dependencyLockDigest":"6becccc0aa89805268794027bb9d0927ceab5ca05bee26a346d0d32e568968de","protocolVersion":1,"serverVersion":"0.10.2","contentId":"d2ffa65a6f47ded955f2fda72baf04dee23af6cb73112a76a727d8d2be2ec51b"},"sha256":"ecc52ce22442b2695721a8be720591625846e053a22e37c6cb8733579a5e45af"}
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":"5ec2e8b82e54114988979e0c6c99625a187aa36f03fd3a55e8e9de1c4e9e886d","piSdkVersion":"1.7.0","nodeVersion":"24.14.1","platform":"darwin-x64","dependencyLockDigest":"6becccc0aa89805268794027bb9d0927ceab5ca05bee26a346d0d32e568968de","protocolVersion":1,"serverVersion":"0.10.2","contentId":"618352ae5141f4109cc929912ccc696342766816a98d5429538f0c2044ffe9b2"},"sha256":"4541ed304e0ed34b3a2896a7dbad4ef0e475730fe01f368b51d2b0c70aedfb67"}
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":"5ec2e8b82e54114988979e0c6c99625a187aa36f03fd3a55e8e9de1c4e9e886d","piSdkVersion":"1.7.0","nodeVersion":"24.14.1","platform":"linux-arm64","dependencyLockDigest":"6becccc0aa89805268794027bb9d0927ceab5ca05bee26a346d0d32e568968de","protocolVersion":1,"serverVersion":"0.10.2","contentId":"4c3d05d143af14c889f7cb743bc8795f8e6647db8d63be11ff472cf852ca3ff5"},"sha256":"18f543353322a2981d19c2ab96d0aa8b7f81db30358cfdc511f553ff47d5bde9"}
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":"5ec2e8b82e54114988979e0c6c99625a187aa36f03fd3a55e8e9de1c4e9e886d","piSdkVersion":"1.7.0","nodeVersion":"24.14.1","platform":"linux-x64","dependencyLockDigest":"6becccc0aa89805268794027bb9d0927ceab5ca05bee26a346d0d32e568968de","protocolVersion":1,"serverVersion":"0.10.2","contentId":"d0db4dfa880815b86159c9aa0c8d45631c7bc72bbcff8146a446a6c99edc1246"},"sha256":"4df7318a838d9f8e522cfb10097bda6fa1f690e5bd849fb8dec2982a4e0fa82e"}
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"}
@@ -1,5 +1,6 @@
1
1
  import { spawn } from "node:child_process";
2
2
  import { closeSync, openSync, readFileSync } from "node:fs";
3
+ import { createRequire } from "node:module";
3
4
  import { connect } from "node:net";
4
5
  import { join } from "node:path";
5
6
  import { setTimeout as delay } from "node:timers/promises";
@@ -75,7 +76,8 @@ export async function ensureRuntime(options) {
75
76
  let artifact;
76
77
  try {
77
78
  const manifest = JSON.parse(readFileSync(join(directory, `${platform}.json`), "utf8"));
78
- artifact = { ...manifest, bytes: readFileSync(join(directory, `${platform}.gz`)) };
79
+ const archive = createRequire(import.meta.url).resolve(`pi-better-server/runtime-artifacts/${platform}.gz`);
80
+ artifact = { ...manifest, bytes: readFileSync(archive) };
79
81
  }
80
82
  catch (error) {
81
83
  throw new Error(`runtime-unavailable: cannot read pinned artifact for ${platform}; reinstall the standalone package. ${String(error)}`);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "pi-better-harness",
3
- "version": "0.62.0",
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",
@@ -22,6 +22,8 @@
22
22
  "extensions/subagents/index.ts",
23
23
  "extensions/background-tasks/index.ts",
24
24
  "extensions/ssh/index.ts",
25
+ "extensions/server/detach.ts",
26
+ "extensions/server/remote.ts",
25
27
  "extensions/goal/index.ts",
26
28
  "extensions/task-context/index.ts",
27
29
  "extensions/project-context/index.ts",
@@ -45,7 +47,8 @@
45
47
  "homepage": "https://github.com/1aboveio/pi-better-harness/tree/main/packages/pi-better-harness#readme",
46
48
  "bin": {
47
49
  "pi-better-harness": "bin/pi-better-harness.mjs",
48
- "pi-agent-catalog": "bin/pi-agent-catalog.mjs"
50
+ "pi-agent-catalog": "bin/pi-agent-catalog.mjs",
51
+ "pi-remote": "bin/pi-remote.mjs"
49
52
  },
50
53
  "files": [
51
54
  "README.md",
@@ -71,11 +74,12 @@
71
74
  "@xterm/xterm": "6.0.0",
72
75
  "marked": "18.0.5",
73
76
  "openai": "6.26.0",
74
- "pi-better-background-tasks": "0.21.8",
75
- "pi-better-goal": "0.18.3",
77
+ "pi-better-background-tasks": "0.21.10",
78
+ "pi-better-goal": "0.18.4",
76
79
  "pi-better-sandbox": "0.15.2",
80
+ "pi-better-server": "0.11.1",
77
81
  "pi-better-ssh": "0.1.7",
78
- "pi-better-subagents": "0.41.1",
82
+ "pi-better-subagents": "0.41.3",
79
83
  "proper-lockfile": "^4.1.2",
80
84
  "shell-quote": "1.12.0",
81
85
  "smol-toml": "1.9.0",