pi-better-harness 0.63.3 → 0.63.5

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,17 @@
1
1
  # Changelog
2
2
 
3
+ ## [0.63.5] - 2026-12-03
4
+
5
+ ### Fixed
6
+
7
+ - Bundle the fix for requests that Basalt and llama.cpp rejected when the background watch tools were available (#991).
8
+
9
+ ## [0.63.4] - 2026-12-01
10
+
11
+ ### Fixed
12
+
13
+ - Update the shared Server and task extensions to recover archived task status after temporary metadata disappears and show complete status diagnostics.
14
+
3
15
  ## [0.63.3] - 2026-11-30
4
16
 
5
17
  ### Fixed
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "pi-better-background-tasks",
3
- "version": "0.21.12",
3
+ "version": "0.21.14",
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.3",
71
+ "pi-better-server": "0.11.5",
72
72
  "proper-lockfile": "^4.1.2"
73
73
  }
74
74
  }
@@ -1 +1 @@
1
- {"build":{"format":1,"sourceDigest":"7a4cc7258e17ff17a3c55e3628e6b1da2fda1e8691cb756239ee7fcaaf346c2b","piSdkVersion":"1.7.0","nodeVersion":"24.14.1","platform":"darwin-arm64","dependencyLockDigest":"97fbfa01a6e5a49f4f29f5c2048549391417c545cbdd52ec799629aa867d8653","protocolVersion":1,"serverVersion":"0.11.3","contentId":"2f924d7cd4e1ad5d794bec95a137106a8f6b5f2bd04369c58d2aec5a901500ec"},"sha256":"78daba2279b9bfb5226c8fd52abe24c208edca13da755e7ed80fda3e6ef968f9"}
1
+ {"build":{"format":1,"sourceDigest":"32fae611104bd67f558b968a859d36952c384b19a119494930353c33cca98c63","piSdkVersion":"1.7.0","nodeVersion":"24.14.1","platform":"darwin-arm64","dependencyLockDigest":"97fbfa01a6e5a49f4f29f5c2048549391417c545cbdd52ec799629aa867d8653","protocolVersion":1,"serverVersion":"0.11.5","contentId":"9705f70238535b9f5537e284bf9ff6b4e954a25fefe2f00e3a6d8e2cd1465d7a"},"sha256":"fb881cf0d08c134719ec46d556cd0f02059980b81415329143e515591e1f0fc1"}
@@ -1 +1 @@
1
- {"build":{"format":1,"sourceDigest":"7a4cc7258e17ff17a3c55e3628e6b1da2fda1e8691cb756239ee7fcaaf346c2b","piSdkVersion":"1.7.0","nodeVersion":"24.14.1","platform":"darwin-x64","dependencyLockDigest":"97fbfa01a6e5a49f4f29f5c2048549391417c545cbdd52ec799629aa867d8653","protocolVersion":1,"serverVersion":"0.11.3","contentId":"07abb16092f12eb644915b9ff5d83db6f31ab12d47157e4761d736baedec8c24"},"sha256":"f0c562aaa9eecc049cfca30c65e9d48ea6910afcf960ee6b5b32a871c4ec1229"}
1
+ {"build":{"format":1,"sourceDigest":"32fae611104bd67f558b968a859d36952c384b19a119494930353c33cca98c63","piSdkVersion":"1.7.0","nodeVersion":"24.14.1","platform":"darwin-x64","dependencyLockDigest":"97fbfa01a6e5a49f4f29f5c2048549391417c545cbdd52ec799629aa867d8653","protocolVersion":1,"serverVersion":"0.11.5","contentId":"dcdbd713a33b20a9c7b84209e00c9188af13e10cb391180c2017e973de56be5c"},"sha256":"bf2f055664473d7d004cae59f61bab5acb9ec1bda92ec1958763a69994b4f52b"}
@@ -1 +1 @@
1
- {"build":{"format":1,"sourceDigest":"7a4cc7258e17ff17a3c55e3628e6b1da2fda1e8691cb756239ee7fcaaf346c2b","piSdkVersion":"1.7.0","nodeVersion":"24.14.1","platform":"linux-arm64","dependencyLockDigest":"97fbfa01a6e5a49f4f29f5c2048549391417c545cbdd52ec799629aa867d8653","protocolVersion":1,"serverVersion":"0.11.3","contentId":"b92440ca99f4ba61421b7c9abe31e2592ade59769d645576b0b1e5126b31ff8e"},"sha256":"4953e9134db701131d66d461f2c2854a5263b0c3f0a40c611f44b2ef0d272da9"}
1
+ {"build":{"format":1,"sourceDigest":"32fae611104bd67f558b968a859d36952c384b19a119494930353c33cca98c63","piSdkVersion":"1.7.0","nodeVersion":"24.14.1","platform":"linux-arm64","dependencyLockDigest":"97fbfa01a6e5a49f4f29f5c2048549391417c545cbdd52ec799629aa867d8653","protocolVersion":1,"serverVersion":"0.11.5","contentId":"ca3b644fa4194af2f4c677007726618121b5f05b1e7be627fd467009060d5d88"},"sha256":"37af12015d7bb4c0e8c153c1694ea6cdae0a2e53fc28ac6ab4e4ca732c76b04a"}
@@ -1 +1 @@
1
- {"build":{"format":1,"sourceDigest":"7a4cc7258e17ff17a3c55e3628e6b1da2fda1e8691cb756239ee7fcaaf346c2b","piSdkVersion":"1.7.0","nodeVersion":"24.14.1","platform":"linux-x64","dependencyLockDigest":"97fbfa01a6e5a49f4f29f5c2048549391417c545cbdd52ec799629aa867d8653","protocolVersion":1,"serverVersion":"0.11.3","contentId":"36b7199bf4ffcc7f153fa098e8e0e52405b55e34cc23e878b4263d401a4cb1c1"},"sha256":"22489d051dad976692873e71cd5b8e48791c440131bd9e60e609cd7ee616698d"}
1
+ {"build":{"format":1,"sourceDigest":"32fae611104bd67f558b968a859d36952c384b19a119494930353c33cca98c63","piSdkVersion":"1.7.0","nodeVersion":"24.14.1","platform":"linux-x64","dependencyLockDigest":"97fbfa01a6e5a49f4f29f5c2048549391417c545cbdd52ec799629aa867d8653","protocolVersion":1,"serverVersion":"0.11.5","contentId":"fc20e6f78f4b99b72b27c9e5b492b52a88a6498c5736884a853d91482c474106"},"sha256":"e2d742c9a01d5449ccceb43b713fea0041fc51725641a9b04dc9d84a3b71f5fc"}
@@ -6,8 +6,10 @@ const ordered = (value: any): any => value === null || typeof value !== 'object'
6
6
  export const backgroundDigest = (value: unknown) => createHash('sha256').update(JSON.stringify(ordered(value))).digest('hex');
7
7
 
8
8
  export const TASK_TIMEOUT_HELP = "Optional whole-task timeout in seconds. Command watchers default to 900 seconds when omitted; pass 0 to use the 24-hour maximum. Spawned processes also have a 24-hour maximum. When the Background tasks sandbox profile sets a command time limit, that cap applies to each actual command (and each watch check) independently: a smaller timeout_seconds still wins, and 0 does not disable the policy cap.";
9
- // Admission v1/v2 hashes the full schema. Preserve the 0.20.1 wire text
10
- // for this annotation; all property names, validation rules and defaults remain in the digest.
9
+ // Basalt 0.5.6 misreads an escaped dollar in nested tool schemas.
10
+ export const JSON_PATH_ROOT_PATTERN = '^[$]';
11
+ // Admission v1/v2 hashes the full schema. Use the published spelling of
12
+ // equivalent patterns and timeout help so clients and servers can upgrade independently.
11
13
  const PUBLISHED_TIMEOUT_HELP = "Optional whole-task timeout in seconds. Command watchers default to 900 seconds when omitted; pass 0 to disable. Spawned processes have no default timeout. When the Background tasks sandbox profile sets a command time limit, that cap applies to each actual command (and each watch check) independently: a smaller timeout_seconds still wins, and 0 does not disable the policy cap.";
12
14
 
13
15
  export function backgroundParametersDigest(parameters: unknown): string {
@@ -15,6 +17,9 @@ export function backgroundParametersDigest(parameters: unknown): string {
15
17
  if (key === 'timeout_seconds' && value?.description === TASK_TIMEOUT_HELP) {
16
18
  return { ...value, description: PUBLISHED_TIMEOUT_HELP };
17
19
  }
20
+ if (key === 'path' && value?.type === 'string' && value.pattern === JSON_PATH_ROOT_PATTERN) {
21
+ return { ...value, pattern: '^\\$' };
22
+ }
18
23
  return value;
19
24
  });
20
25
  return createHash('sha256').update(wire).digest('hex');
@@ -62,7 +62,7 @@ export type BackgroundWorkDetail = {
62
62
  subtitle?: string;
63
63
  metadata: Array<{ label: string; value: string }>;
64
64
  foldedSections?: Array<{ id: string; label: string; text: string; collapsedText?: string; expandedByDefault?: boolean }>;
65
- evidence: { label: string; text: string };
65
+ evidence: { label: string; text: string; format?: "diagnostic" };
66
66
  transcript?: Array<
67
67
  | { type: "assistant"; content: Array<{ type: string; text?: string; thinking?: string }>; streaming: boolean }
68
68
  | { type: "tool"; id?: string; name: string; args?: unknown; result?: unknown; isError: boolean; state: "running" | "completed" }
@@ -1693,7 +1693,7 @@ function buildDetailLines(
1693
1693
  const tailEvidence = isTailEvidence(detail);
1694
1694
  const evidenceLabel = tailEvidence ? `${detail.evidence.label} · latest ${tailRows} rows` : detail.evidence.label;
1695
1695
  lines.push(dim(section(evidenceLabel, width), fg));
1696
- const wrapped = /log/i.test(detail.evidence.label)
1696
+ const wrapped = detail.evidence.format === "diagnostic" || /log/i.test(detail.evidence.label)
1697
1697
  ? wrapLogText(body, width - 6)
1698
1698
  : wrapEvidenceText(body, width - 6);
1699
1699
  let shown = tailEvidence ? wrapped.slice(-tailRows) : wrapped;
@@ -1732,7 +1732,7 @@ function applyDefaultExpandedSections(detail: BackgroundWorkDetail | null, expan
1732
1732
  }
1733
1733
 
1734
1734
  function isFoldableEvidence(detail: BackgroundWorkDetail): boolean {
1735
- return !isTailEvidence(detail);
1735
+ return detail.evidence.format !== "diagnostic" && !isTailEvidence(detail);
1736
1736
  }
1737
1737
 
1738
1738
  function isTailEvidence(detail: BackgroundWorkDetail): boolean {
@@ -1,4 +1,4 @@
1
- import { TASK_TIMEOUT_HELP } from "./managed-authority.js";
1
+ import { JSON_PATH_ROOT_PATTERN, TASK_TIMEOUT_HELP } from "./managed-authority.js";
2
2
  import { Type } from "typebox";
3
3
  import type { ExtensionAPI, ExtensionContext } from "@earendil-works/pi-coding-agent";
4
4
  import {
@@ -38,7 +38,7 @@ export { formatLaunch } from "./output.js";
38
38
  type ToolRuntime = Pick<BackgroundTaskRuntime, "awaitFirstWatchCheck" | "resumeRunningTask" | "spawnTask" | "startWatchTask" | "stopTask">;
39
39
 
40
40
  const JsonPathSchema = Type.String({
41
- pattern: "^\\$",
41
+ pattern: JSON_PATH_ROOT_PATTERN,
42
42
  description: "Root-prefixed JSON path, e.g. $.status, $.terminalFailure, or $.steps[0].status. Bare keys and wildcards are unsupported.",
43
43
  });
44
44
 
@@ -1845,11 +1845,11 @@ function subagentWorkDetail(id: string, now: number, options?: { logTailLines?:
1845
1845
  providerId: "subagents", id, title: "Subagent status sync", status: workObservation()?.status ?? "rebuilding", statusTone: "warning",
1846
1846
  subtitle: "Shared status service · task status unconfirmed",
1847
1847
  metadata: [{ label: "scope", value: "Subagent status reads; not an individual task" }],
1848
- evidence: { label: "Full diagnostic", text: workObservationFailure() },
1848
+ evidence: { label: "Full diagnostic", text: workObservationFailure(), format: "diagnostic" },
1849
1849
  footerActions: [],
1850
1850
  };
1851
1851
  const row = requestWorkDetail(id);
1852
- if (!row?.detail) return { providerId: "subagents", id, title: id, status: row?.observationError ? "degraded" : "rebuilding", statusTone: "warning", metadata: [], evidence: { label: "observation", text: row?.observationError ?? workObservationFailure() } };
1852
+ if (!row?.detail) return { providerId: "subagents", id, title: id, status: row?.observationError ? "degraded" : "rebuilding", statusTone: "warning", metadata: [], evidence: { label: "observation", text: row?.observationError ?? workObservationFailure(), format: "diagnostic" } };
1853
1853
  const health = row.health ? observeRunHealth({ ...row.health, status: row.assignment.processStatus === "exited" ? row.meta.status : row.assignment.processStatus, now, startedAt: row.meta.startedAt }) : undefined;
1854
1854
  const detail = withAssignmentObservations([row], () => buildNavigatorDetail(id, {
1855
1855
  readMeta: () => row.meta, effectiveStatus: () => row.assignment.processStatus, parseRun: () => row.detail.parsed,
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "pi-better-subagents",
3
- "version": "0.41.5",
3
+ "version": "0.41.7",
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.3",
84
+ "pi-better-server": "0.11.5",
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":"7a4cc7258e17ff17a3c55e3628e6b1da2fda1e8691cb756239ee7fcaaf346c2b","piSdkVersion":"1.7.0","nodeVersion":"24.14.1","platform":"darwin-arm64","dependencyLockDigest":"97fbfa01a6e5a49f4f29f5c2048549391417c545cbdd52ec799629aa867d8653","protocolVersion":1,"serverVersion":"0.11.3","contentId":"2f924d7cd4e1ad5d794bec95a137106a8f6b5f2bd04369c58d2aec5a901500ec"},"sha256":"78daba2279b9bfb5226c8fd52abe24c208edca13da755e7ed80fda3e6ef968f9"}
1
+ {"build":{"format":1,"sourceDigest":"32fae611104bd67f558b968a859d36952c384b19a119494930353c33cca98c63","piSdkVersion":"1.7.0","nodeVersion":"24.14.1","platform":"darwin-arm64","dependencyLockDigest":"97fbfa01a6e5a49f4f29f5c2048549391417c545cbdd52ec799629aa867d8653","protocolVersion":1,"serverVersion":"0.11.5","contentId":"9705f70238535b9f5537e284bf9ff6b4e954a25fefe2f00e3a6d8e2cd1465d7a"},"sha256":"fb881cf0d08c134719ec46d556cd0f02059980b81415329143e515591e1f0fc1"}
@@ -1 +1 @@
1
- {"build":{"format":1,"sourceDigest":"7a4cc7258e17ff17a3c55e3628e6b1da2fda1e8691cb756239ee7fcaaf346c2b","piSdkVersion":"1.7.0","nodeVersion":"24.14.1","platform":"darwin-x64","dependencyLockDigest":"97fbfa01a6e5a49f4f29f5c2048549391417c545cbdd52ec799629aa867d8653","protocolVersion":1,"serverVersion":"0.11.3","contentId":"07abb16092f12eb644915b9ff5d83db6f31ab12d47157e4761d736baedec8c24"},"sha256":"f0c562aaa9eecc049cfca30c65e9d48ea6910afcf960ee6b5b32a871c4ec1229"}
1
+ {"build":{"format":1,"sourceDigest":"32fae611104bd67f558b968a859d36952c384b19a119494930353c33cca98c63","piSdkVersion":"1.7.0","nodeVersion":"24.14.1","platform":"darwin-x64","dependencyLockDigest":"97fbfa01a6e5a49f4f29f5c2048549391417c545cbdd52ec799629aa867d8653","protocolVersion":1,"serverVersion":"0.11.5","contentId":"dcdbd713a33b20a9c7b84209e00c9188af13e10cb391180c2017e973de56be5c"},"sha256":"bf2f055664473d7d004cae59f61bab5acb9ec1bda92ec1958763a69994b4f52b"}
@@ -1 +1 @@
1
- {"build":{"format":1,"sourceDigest":"7a4cc7258e17ff17a3c55e3628e6b1da2fda1e8691cb756239ee7fcaaf346c2b","piSdkVersion":"1.7.0","nodeVersion":"24.14.1","platform":"linux-arm64","dependencyLockDigest":"97fbfa01a6e5a49f4f29f5c2048549391417c545cbdd52ec799629aa867d8653","protocolVersion":1,"serverVersion":"0.11.3","contentId":"b92440ca99f4ba61421b7c9abe31e2592ade59769d645576b0b1e5126b31ff8e"},"sha256":"4953e9134db701131d66d461f2c2854a5263b0c3f0a40c611f44b2ef0d272da9"}
1
+ {"build":{"format":1,"sourceDigest":"32fae611104bd67f558b968a859d36952c384b19a119494930353c33cca98c63","piSdkVersion":"1.7.0","nodeVersion":"24.14.1","platform":"linux-arm64","dependencyLockDigest":"97fbfa01a6e5a49f4f29f5c2048549391417c545cbdd52ec799629aa867d8653","protocolVersion":1,"serverVersion":"0.11.5","contentId":"ca3b644fa4194af2f4c677007726618121b5f05b1e7be627fd467009060d5d88"},"sha256":"37af12015d7bb4c0e8c153c1694ea6cdae0a2e53fc28ac6ab4e4ca732c76b04a"}
@@ -1 +1 @@
1
- {"build":{"format":1,"sourceDigest":"7a4cc7258e17ff17a3c55e3628e6b1da2fda1e8691cb756239ee7fcaaf346c2b","piSdkVersion":"1.7.0","nodeVersion":"24.14.1","platform":"linux-x64","dependencyLockDigest":"97fbfa01a6e5a49f4f29f5c2048549391417c545cbdd52ec799629aa867d8653","protocolVersion":1,"serverVersion":"0.11.3","contentId":"36b7199bf4ffcc7f153fa098e8e0e52405b55e34cc23e878b4263d401a4cb1c1"},"sha256":"22489d051dad976692873e71cd5b8e48791c440131bd9e60e609cd7ee616698d"}
1
+ {"build":{"format":1,"sourceDigest":"32fae611104bd67f558b968a859d36952c384b19a119494930353c33cca98c63","piSdkVersion":"1.7.0","nodeVersion":"24.14.1","platform":"linux-x64","dependencyLockDigest":"97fbfa01a6e5a49f4f29f5c2048549391417c545cbdd52ec799629aa867d8653","protocolVersion":1,"serverVersion":"0.11.5","contentId":"fc20e6f78f4b99b72b27c9e5b492b52a88a6498c5736884a853d91482c474106"},"sha256":"e2d742c9a01d5449ccceb43b713fea0041fc51725641a9b04dc9d84a3b71f5fc"}
@@ -62,7 +62,7 @@ export type BackgroundWorkDetail = {
62
62
  subtitle?: string;
63
63
  metadata: Array<{ label: string; value: string }>;
64
64
  foldedSections?: Array<{ id: string; label: string; text: string; collapsedText?: string; expandedByDefault?: boolean }>;
65
- evidence: { label: string; text: string };
65
+ evidence: { label: string; text: string; format?: "diagnostic" };
66
66
  transcript?: Array<
67
67
  | { type: "assistant"; content: Array<{ type: string; text?: string; thinking?: string }>; streaming: boolean }
68
68
  | { type: "tool"; id?: string; name: string; args?: unknown; result?: unknown; isError: boolean; state: "running" | "completed" }
@@ -1693,7 +1693,7 @@ function buildDetailLines(
1693
1693
  const tailEvidence = isTailEvidence(detail);
1694
1694
  const evidenceLabel = tailEvidence ? `${detail.evidence.label} · latest ${tailRows} rows` : detail.evidence.label;
1695
1695
  lines.push(dim(section(evidenceLabel, width), fg));
1696
- const wrapped = /log/i.test(detail.evidence.label)
1696
+ const wrapped = detail.evidence.format === "diagnostic" || /log/i.test(detail.evidence.label)
1697
1697
  ? wrapLogText(body, width - 6)
1698
1698
  : wrapEvidenceText(body, width - 6);
1699
1699
  let shown = tailEvidence ? wrapped.slice(-tailRows) : wrapped;
@@ -1732,7 +1732,7 @@ function applyDefaultExpandedSections(detail: BackgroundWorkDetail | null, expan
1732
1732
  }
1733
1733
 
1734
1734
  function isFoldableEvidence(detail: BackgroundWorkDetail): boolean {
1735
- return !isTailEvidence(detail);
1735
+ return detail.evidence.format !== "diagnostic" && !isTailEvidence(detail);
1736
1736
  }
1737
1737
 
1738
1738
  function isTailEvidence(detail: BackgroundWorkDetail): boolean {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "pi-better-harness",
3
- "version": "0.63.3",
3
+ "version": "0.63.5",
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.12",
77
+ "pi-better-background-tasks": "0.21.14",
78
78
  "pi-better-goal": "0.18.4",
79
79
  "pi-better-sandbox": "0.15.2",
80
- "pi-better-server": "0.11.3",
80
+ "pi-better-server": "0.11.5",
81
81
  "pi-better-ssh": "0.1.7",
82
- "pi-better-subagents": "0.41.5",
82
+ "pi-better-subagents": "0.41.7",
83
83
  "proper-lockfile": "^4.1.2",
84
84
  "shell-quote": "1.12.0",
85
85
  "smol-toml": "1.9.0",