pi-freeflow 1.44.0 → 1.45.0
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 +29 -0
- package/README.md +11 -13
- package/package.json +1 -1
- package/src/catalog.ts +38 -14
- package/src/client-recovery.ts +238 -0
- package/src/client-staging.ts +316 -0
- package/src/client.ts +117 -472
- package/src/cline-accounts.ts +26 -1223
- package/src/cline-device-auth.ts +5 -3
- package/src/cline-pool.ts +691 -0
- package/src/cline-roll.ts +642 -0
- package/src/commands-cline.ts +283 -0
- package/src/commands-relay.ts +808 -0
- package/src/commands-startup.ts +264 -0
- package/src/commands.ts +119 -1202
- package/src/config-paths.ts +254 -0
- package/src/config.ts +6 -687
- package/src/daemon.ts +16 -1
- package/src/deploy.ts +3 -1
- package/src/fingerprint-env.ts +334 -0
- package/src/fingerprint-tools.ts +348 -0
- package/src/index.ts +10 -6
- package/src/lane-translation.ts +263 -0
- package/src/models.ts +70 -112
- package/src/opencode-fingerprint.ts +29 -1310
- package/src/opencode-identity.ts +464 -0
- package/src/proxy-lanes.ts +1125 -0
- package/src/proxy-ports.ts +317 -0
- package/src/proxy.ts +74 -1385
- package/src/relay-codec.ts +365 -0
- package/src/relay-state.ts +10 -367
- package/src/relay.ts +78 -31
- package/src/sse-aggregator.ts +659 -0
- package/src/stream-cloak.ts +882 -0
- package/src/stream-pipe.ts +22 -871
- package/src/system-ca-fetch.ts +15 -4
- package/src/token.ts +7 -2
- package/src/tool-args.ts +10 -3
- package/src/tool-translation.ts +1 -236
- package/src/toolcall-audit.ts +20 -7
- package/src/update-checker.ts +17 -1
- package/src/update-core.ts +5 -2
- package/src/updater.ts +8 -3
- package/src/upstream-health.ts +22 -2
- package/src/zen-sidecar.ts +1 -0
- package/src/zen-transport.ts +48 -18
package/src/cline-device-auth.ts
CHANGED
|
@@ -250,14 +250,16 @@ export async function pollDeviceToken(
|
|
|
250
250
|
device_code: deviceCode,
|
|
251
251
|
client_id: resolveClineWorkosClientId(),
|
|
252
252
|
}),
|
|
253
|
-
signal:
|
|
253
|
+
signal: options?.signal
|
|
254
|
+
? AbortSignal.any([options.signal, AbortSignal.timeout(options?.timeoutMs ?? HTTP_TIMEOUT_MS)])
|
|
255
|
+
: AbortSignal.timeout(options?.timeoutMs ?? HTTP_TIMEOUT_MS),
|
|
254
256
|
});
|
|
255
257
|
} catch (error) {
|
|
256
258
|
if (outerSignal?.aborted) {
|
|
257
259
|
throw new ClineAuthError("Device login cancelled", { errorCode: "cancelled" });
|
|
258
260
|
}
|
|
259
261
|
if (error instanceof ClineAuthError) throw error;
|
|
260
|
-
if (Date.now()
|
|
262
|
+
if (Date.now() >= deadline) throw new Error("WorkOS device authorization timed out");
|
|
261
263
|
await sleepMs(remainingMs(deadline, interval), outerSignal);
|
|
262
264
|
continue;
|
|
263
265
|
}
|
|
@@ -289,7 +291,7 @@ export async function pollDeviceToken(
|
|
|
289
291
|
{ status: response.status, errorCode: typeof payload.error === "string" ? payload.error : undefined },
|
|
290
292
|
);
|
|
291
293
|
}
|
|
292
|
-
if (Date.now()
|
|
294
|
+
if (Date.now() >= deadline) throw new Error("WorkOS device authorization timed out");
|
|
293
295
|
await sleepMs(remainingMs(deadline, interval), outerSignal);
|
|
294
296
|
}
|
|
295
297
|
}
|