@askalf/dario 4.8.153 → 5.0.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/README.md +1 -2
- package/dist/cc-template-data.json +22 -18
- package/dist/cc-template.d.ts +0 -2
- package/dist/cc-template.js +0 -2
- package/dist/cli.js +50 -124
- package/dist/config-report.js +16 -1
- package/dist/doctor.d.ts +1 -1
- package/dist/doctor.js +17 -7
- package/dist/live-fingerprint.d.ts +8 -8
- package/dist/live-fingerprint.js +6 -6
- package/dist/proxy.d.ts +2 -11
- package/dist/proxy.js +247 -256
- package/dist/runtime-fingerprint.d.ts +5 -11
- package/dist/runtime-fingerprint.js +7 -13
- package/dist/session-rotation.d.ts +22 -10
- package/dist/session-rotation.js +30 -13
- package/package.json +3 -3
- package/dist/shim/host.d.ts +0 -86
- package/dist/shim/host.js +0 -196
- package/dist/shim/runtime.cjs +0 -327
package/dist/live-fingerprint.js
CHANGED
|
@@ -41,9 +41,9 @@
|
|
|
41
41
|
* provided both run on the same Node major. A cross-runtime worry
|
|
42
42
|
* surfaces when Anthropic ships Bun- or bundled-binary CC: at that
|
|
43
43
|
* point Node-dario and Bun-CC would JA-differ.
|
|
44
|
-
* → Mitigation:
|
|
45
|
-
*
|
|
46
|
-
*
|
|
44
|
+
* → Mitigation: dario auto-relaunches under Bun when it's on PATH so
|
|
45
|
+
* the proxy's ClientHello matches CC's Bun/BoringSSL shape;
|
|
46
|
+
* `--strict-tls` refuses to start otherwise.
|
|
47
47
|
*
|
|
48
48
|
* 3. HTTP/2 frame ordering + SETTINGS parameters. Similar to TLS, this
|
|
49
49
|
* is controlled by the HTTP library. Node and undici produce a
|
|
@@ -735,9 +735,9 @@ export function formatCaptureAge(capturedIso, now = Date.now()) {
|
|
|
735
735
|
}
|
|
736
736
|
/**
|
|
737
737
|
* One-line human summary of the active template — what source, which CC
|
|
738
|
-
* version captured it, and how old that capture is. Proxy
|
|
739
|
-
*
|
|
740
|
-
*
|
|
738
|
+
* version captured it, and how old that capture is. Proxy startup logs
|
|
739
|
+
* this so users can tell at a glance whether they're on a fresh live
|
|
740
|
+
* capture or a stale bundled fallback.
|
|
741
741
|
*/
|
|
742
742
|
export function describeTemplate(t) {
|
|
743
743
|
const source = t._source ?? 'bundled';
|
package/dist/proxy.d.ts
CHANGED
|
@@ -463,17 +463,8 @@ export declare function describeAuthReject(headers: IncomingMessage['headers']):
|
|
|
463
463
|
*/
|
|
464
464
|
export declare function upstreamAuthHeaders(upstreamApiKey: string, accessToken: string): Record<string, string>;
|
|
465
465
|
/**
|
|
466
|
-
*
|
|
467
|
-
*
|
|
468
|
-
* `dario accounts add` bootstraps a servable proxy with no `dario login`
|
|
469
|
-
* step — and admin mode always does (#599), where the pool may start empty
|
|
470
|
-
* and be populated over HTTP. Login-only setups (no accounts/ entries) keep
|
|
471
|
-
* the single-account credentials.json path. Pure + exported for unit
|
|
472
|
-
* testing.
|
|
473
|
-
*/
|
|
474
|
-
export declare function shouldUsePool(accountCount: number, adminEnabled: boolean): boolean;
|
|
475
|
-
/**
|
|
476
|
-
* Resolve the single-account startup auth outcome, refreshing an expired-but-
|
|
466
|
+
* Resolve the startup auth outcome when the pool is empty and there's a
|
|
467
|
+
* `dario login` credentials.json to fall back on — refreshing an expired-but-
|
|
477
468
|
* refreshable access token before giving up.
|
|
478
469
|
*
|
|
479
470
|
* The classic single-account startup used to read getStatus() once and, on any
|