@askalf/dario 6.12.8 → 6.12.10
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/dist/live-fingerprint.d.ts +1 -1
- package/dist/live-fingerprint.js +1 -1
- package/dist/pool.js +21 -26
- package/package.json +3 -3
|
@@ -510,7 +510,7 @@ export declare function detectDrift(t: TemplateData, installedOverride?: string
|
|
|
510
510
|
*/
|
|
511
511
|
export declare const SUPPORTED_CC_RANGE: {
|
|
512
512
|
readonly min: "1.0.0";
|
|
513
|
-
readonly maxTested: "2.1.
|
|
513
|
+
readonly maxTested: "2.1.284";
|
|
514
514
|
};
|
|
515
515
|
/**
|
|
516
516
|
* Compare two dotted-numeric version strings. Returns negative if `a<b`,
|
package/dist/live-fingerprint.js
CHANGED
|
@@ -1211,7 +1211,7 @@ export function detectDrift(t, installedOverride) {
|
|
|
1211
1211
|
*/
|
|
1212
1212
|
export const SUPPORTED_CC_RANGE = {
|
|
1213
1213
|
min: '1.0.0',
|
|
1214
|
-
maxTested: '2.1.
|
|
1214
|
+
maxTested: '2.1.284',
|
|
1215
1215
|
};
|
|
1216
1216
|
/**
|
|
1217
1217
|
* Compare two dotted-numeric version strings. Returns negative if `a<b`,
|
package/dist/pool.js
CHANGED
|
@@ -840,42 +840,37 @@ function isAboveHeadroomFloor(headroom, floor) {
|
|
|
840
840
|
return headroom - floor > Number.EPSILON;
|
|
841
841
|
}
|
|
842
842
|
/**
|
|
843
|
-
* When a below-floor reading can retire without an upstream probe, return
|
|
844
|
-
*
|
|
845
|
-
* seat below the floor
|
|
843
|
+
* When a below-floor reading can retire without an upstream probe, return when
|
|
844
|
+
* it does, in epoch ms: the latest future reset among the buckets keeping the
|
|
845
|
+
* seat at or below the floor. Each of those buckets holds the seat there until
|
|
846
|
+
* its own reset, so the seat is parked until the last of them, and a bucket
|
|
847
|
+
* whose reset is unknown does not shorten that. Null only when no limiting
|
|
848
|
+
* bucket has a future reset: then one request must refresh the reading. A seat
|
|
849
|
+
* at 96% of its 5h window and 97% of its 7d window, whose representative claim
|
|
850
|
+
* is the 7d one, carries no 5h reset; it stays parked until the 7d reset
|
|
851
|
+
* rather than taking traffic, and is probed after that if the 5h reading
|
|
852
|
+
* still holds it below the floor.
|
|
846
853
|
*/
|
|
847
854
|
function floorParkedUntil(snapshot, family, floor, now) {
|
|
848
855
|
const rl = expireElapsedWindow(snapshot, now);
|
|
849
856
|
const limiting = (util) => !isAboveHeadroomFloor(1 - util, floor);
|
|
857
|
+
const reset7d = () => ((rl.reset7d ?? 0) * 1000 > now
|
|
858
|
+
? (rl.reset7d ?? 0) * 1000
|
|
859
|
+
: rl.claim.startsWith('seven_day') ? rl.reset * 1000 : 0);
|
|
850
860
|
const resets = [];
|
|
851
|
-
if (limiting(rl.util5h))
|
|
852
|
-
|
|
853
|
-
|
|
854
|
-
|
|
855
|
-
resets.push(reset);
|
|
856
|
-
}
|
|
857
|
-
if (limiting(rl.util7d)) {
|
|
858
|
-
const reset = (rl.reset7d ?? 0) * 1000 > now
|
|
859
|
-
? (rl.reset7d ?? 0) * 1000
|
|
860
|
-
: rl.claim.startsWith('seven_day') ? rl.reset * 1000 : 0;
|
|
861
|
-
if (reset <= now)
|
|
862
|
-
return null;
|
|
863
|
-
resets.push(reset);
|
|
864
|
-
}
|
|
861
|
+
if (limiting(rl.util5h))
|
|
862
|
+
resets.push(rl.claim === 'five_hour' ? rl.reset * 1000 : 0);
|
|
863
|
+
if (limiting(rl.util7d))
|
|
864
|
+
resets.push(reset7d());
|
|
865
865
|
if (family) {
|
|
866
866
|
for (const bucket of bucketsBindingFamily(rl, family)) {
|
|
867
867
|
const util = rl.perModel7d[bucket];
|
|
868
|
-
if (util
|
|
869
|
-
|
|
870
|
-
const reset = (rl.reset7d ?? 0) * 1000 > now
|
|
871
|
-
? (rl.reset7d ?? 0) * 1000
|
|
872
|
-
: rl.claim.startsWith('seven_day') ? rl.reset * 1000 : 0;
|
|
873
|
-
if (reset <= now)
|
|
874
|
-
return null;
|
|
875
|
-
resets.push(reset);
|
|
868
|
+
if (util !== undefined && limiting(util))
|
|
869
|
+
resets.push(reset7d());
|
|
876
870
|
}
|
|
877
871
|
}
|
|
878
|
-
|
|
872
|
+
const known = resets.filter((reset) => reset > now);
|
|
873
|
+
return known.length > 0 ? Math.max(...known) : null;
|
|
879
874
|
}
|
|
880
875
|
function pickFloorProbe(accounts, family, floor, now) {
|
|
881
876
|
const stale = accounts.filter(a => floorParkedUntil(a.rateLimit, family, floor, now) === null);
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@askalf/dario",
|
|
3
|
-
"version": "6.12.
|
|
3
|
+
"version": "6.12.10",
|
|
4
4
|
"description": "Use your Claude and ChatGPT subscriptions in Cursor, Cline, Aider, Claude Code and the Agent SDK — at subscription pricing, not per-token API bills. One local Anthropic + OpenAI-compatible endpoint: either plan answers either wire shape, with automatic failover when one hits its limit.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"bin": {
|
|
@@ -87,8 +87,8 @@
|
|
|
87
87
|
"node": ">=18.0.0"
|
|
88
88
|
},
|
|
89
89
|
"devDependencies": {
|
|
90
|
-
"@types/node": "^26.6.
|
|
91
|
-
"tsx": "^4.
|
|
90
|
+
"@types/node": "^26.6.2",
|
|
91
|
+
"tsx": "^4.23.15",
|
|
92
92
|
"typescript": "^5.7.0"
|
|
93
93
|
}
|
|
94
94
|
}
|