@danypops/pi-packed 0.27.1 → 0.27.2
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/extension/src/packed.ts
CHANGED
|
@@ -81,7 +81,10 @@ async function connectDefaultDaemon(): Promise<PackageDaemonPort> {
|
|
|
81
81
|
}
|
|
82
82
|
|
|
83
83
|
export async function createNatives(connect: PackageDaemonConnector = connectDefaultDaemon): Promise<Natives> {
|
|
84
|
-
|
|
84
|
+
// connectRetry:true (vehicle-client's own bounded background retry budget) covers a
|
|
85
|
+
// daemon that crashed and is mid systemd-restart -- without it, the very first call
|
|
86
|
+
// during that window fails immediately instead of waiting the ~2s restart out.
|
|
87
|
+
const client = createRetryingClient(connect, { label: "pi-packed", connectRetry: true });
|
|
85
88
|
|
|
86
89
|
return {
|
|
87
90
|
// Reads/idempotent lookups: transparently retried once on a stale connection.
|
|
@@ -64,12 +64,18 @@ export async function registerPackedVehicle(pi: ExtensionAPI): Promise<void> {
|
|
|
64
64
|
const target = currentVehicleClientTarget();
|
|
65
65
|
if (!target) return;
|
|
66
66
|
try {
|
|
67
|
+
// connectRetry:true (vehicle-client's own bounded background retry budget) covers a
|
|
68
|
+
// daemon that crashed and is mid systemd-restart -- without it, the very first call
|
|
69
|
+
// during that window fails immediately instead of waiting the ~2s restart out.
|
|
67
70
|
const client = withoutExcludedOperations(
|
|
68
|
-
createReconnectingVehicleClient(
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
71
|
+
createReconnectingVehicleClient(
|
|
72
|
+
async () => {
|
|
73
|
+
const resolved = currentVehicleClientTarget();
|
|
74
|
+
if (!resolved) throw new Error("Packed daemon is not running");
|
|
75
|
+
return new RemoteVehicleClient({ baseUrl: resolved.baseUrl, token: resolved.token });
|
|
76
|
+
},
|
|
77
|
+
{ connectRetry: true },
|
|
78
|
+
),
|
|
73
79
|
);
|
|
74
80
|
await registerVehicleTools(pi, client, {
|
|
75
81
|
permissions: ["packed:read"],
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@danypops/pi-packed",
|
|
3
|
-
"version": "0.27.
|
|
3
|
+
"version": "0.27.2",
|
|
4
4
|
"description": "Pi package lifecycle, validation, daemon, tools, profiles, and TUI",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"bin": {
|
|
@@ -30,7 +30,7 @@
|
|
|
30
30
|
"@danypops/armada": "^0.4.9",
|
|
31
31
|
"@danypops/packed": "^0.7.0",
|
|
32
32
|
"@danypops/pi-extension-harness": "^0.7.0",
|
|
33
|
-
"@danypops/vehicle-client": "^0.
|
|
33
|
+
"@danypops/vehicle-client": "^0.10.0",
|
|
34
34
|
"@danypops/vehicle-client-pi": "^0.40.1",
|
|
35
35
|
"@danypops/vehicle-core": "^0.15.0",
|
|
36
36
|
"@danypops/vehicle-server": "^0.24.1",
|