pi-better-background-tasks 0.21.5 → 0.21.6
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/package.json +1 -1
- package/runtime-client/artifacts/darwin-arm64.gz +0 -0
- package/runtime-client/artifacts/darwin-arm64.json +1 -1
- package/runtime-client/artifacts/darwin-x64.gz +0 -0
- package/runtime-client/artifacts/darwin-x64.json +1 -1
- package/runtime-client/artifacts/linux-arm64.gz +0 -0
- package/runtime-client/artifacts/linux-arm64.json +1 -1
- package/runtime-client/artifacts/linux-x64.gz +0 -0
- package/runtime-client/artifacts/linux-x64.json +1 -1
- package/runtime-client/src/runtime/work-client.mjs +4 -2
- package/src/shared-work-client.mjs +4 -2
package/package.json
CHANGED
|
Binary file
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"build":{"format":1,"sourceDigest":"
|
|
1
|
+
{"build":{"format":1,"sourceDigest":"c6db9b45efd44a01aa2aa18d5f458c0894ab2b824f473fab81d0176e64b3f1e9","piSdkVersion":"1.6.1","nodeVersion":"24.14.1","platform":"darwin-arm64","dependencyLockDigest":"4b8b42f3d091ddf390547a02a1b71031543baab877d8cf5fd3241179b85e9554","protocolVersion":1,"serverVersion":"0.8.6","contentId":"2cef74a80c13ca63f6e604b9b486735a7fd0e6b060a9b6eb4b4bebd67a911945"},"sha256":"44063f32b7c7f08905f0081ef5033c1d964c4acd34968b25ea3f2a7a454a77ca"}
|
|
Binary file
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"build":{"format":1,"sourceDigest":"
|
|
1
|
+
{"build":{"format":1,"sourceDigest":"c6db9b45efd44a01aa2aa18d5f458c0894ab2b824f473fab81d0176e64b3f1e9","piSdkVersion":"1.6.1","nodeVersion":"24.14.1","platform":"darwin-x64","dependencyLockDigest":"4b8b42f3d091ddf390547a02a1b71031543baab877d8cf5fd3241179b85e9554","protocolVersion":1,"serverVersion":"0.8.6","contentId":"f0182a8cd792b0831e30c3d849157f1151b38a54f9ae21e62aa89102ab8efc28"},"sha256":"921a176234cdbe2d6c7b0fe8ac44cd3799c2afe86a71307f8e76fcd9405c0f7c"}
|
|
Binary file
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"build":{"format":1,"sourceDigest":"
|
|
1
|
+
{"build":{"format":1,"sourceDigest":"c6db9b45efd44a01aa2aa18d5f458c0894ab2b824f473fab81d0176e64b3f1e9","piSdkVersion":"1.6.1","nodeVersion":"24.14.1","platform":"linux-arm64","dependencyLockDigest":"4b8b42f3d091ddf390547a02a1b71031543baab877d8cf5fd3241179b85e9554","protocolVersion":1,"serverVersion":"0.8.6","contentId":"f9ec6aa84873f15c8c3065b099b9920139de61479e2ac83b3b61b23aab4bdd36"},"sha256":"e846045028030493af2c539cc2578701c10470c7f3205b77105660422f839026"}
|
|
Binary file
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"build":{"format":1,"sourceDigest":"
|
|
1
|
+
{"build":{"format":1,"sourceDigest":"c6db9b45efd44a01aa2aa18d5f458c0894ab2b824f473fab81d0176e64b3f1e9","piSdkVersion":"1.6.1","nodeVersion":"24.14.1","platform":"linux-x64","dependencyLockDigest":"4b8b42f3d091ddf390547a02a1b71031543baab877d8cf5fd3241179b85e9554","protocolVersion":1,"serverVersion":"0.8.6","contentId":"5f99633ed368186b5219a9f4061c666135d93ab10afa8c99b726648dd93abbbe"},"sha256":"9e45a229a24f76490840ddfb7f872f36c6f4f36a014ff0cba3cdcc0f4b274668"}
|
|
@@ -78,12 +78,14 @@ export class WorkClient {
|
|
|
78
78
|
if (trace) this.lastSubscriptionTrace = trace;
|
|
79
79
|
const id = trace?.id ?? `work-${++this.sequence}`;
|
|
80
80
|
return new Promise((resolve, reject) => {
|
|
81
|
-
|
|
81
|
+
// The host rechecks the caller's grant between workers and replies after batch admission.
|
|
82
|
+
const launch = type === "runtime_launch_subagent";
|
|
83
|
+
const rejectPending = launch ? error => reject(unknownLaunchReceipt(error)) : reject;
|
|
82
84
|
const timer = setTimeout(() => {
|
|
83
85
|
this.pending.delete(id);
|
|
84
86
|
if (trace) trace.timedOutAt = Date.now();
|
|
85
87
|
rejectPending(new Error(`runtime-unhealthy: ${type} timed out${trace ? ` (${trace.id})` : ""}`));
|
|
86
|
-
}, 5000);
|
|
88
|
+
}, launch ? 120_000 : 5000);
|
|
87
89
|
this.pending.set(id, { resolve: value => {
|
|
88
90
|
if (trace) trace.receivedAt = Date.now();
|
|
89
91
|
// Apply subscription receipts in wire order, including events in the same socket chunk.
|
|
@@ -78,12 +78,14 @@ export class WorkClient {
|
|
|
78
78
|
if (trace) this.lastSubscriptionTrace = trace;
|
|
79
79
|
const id = trace?.id ?? `work-${++this.sequence}`;
|
|
80
80
|
return new Promise((resolve, reject) => {
|
|
81
|
-
|
|
81
|
+
// The host rechecks the caller's grant between workers and replies after batch admission.
|
|
82
|
+
const launch = type === "runtime_launch_subagent";
|
|
83
|
+
const rejectPending = launch ? error => reject(unknownLaunchReceipt(error)) : reject;
|
|
82
84
|
const timer = setTimeout(() => {
|
|
83
85
|
this.pending.delete(id);
|
|
84
86
|
if (trace) trace.timedOutAt = Date.now();
|
|
85
87
|
rejectPending(new Error(`runtime-unhealthy: ${type} timed out${trace ? ` (${trace.id})` : ""}`));
|
|
86
|
-
}, 5000);
|
|
88
|
+
}, launch ? 120_000 : 5000);
|
|
87
89
|
this.pending.set(id, { resolve: value => {
|
|
88
90
|
if (trace) trace.receivedAt = Date.now();
|
|
89
91
|
// Apply subscription receipts in wire order, including events in the same socket chunk.
|