dsh-agy-link 0.6.56 → 0.6.57
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 +18 -0
- package/README.md +111 -117
- package/dist/cli-image.mjs +665 -291
- package/dist/client.js +7 -2
- package/dist/index.js +894 -284
- package/docs/ARCHITECTURE.md +4 -4
- package/docs/CONFIGURATION.md +20 -14
- package/docs/KNOWN-GAPS.md +2 -8
- package/docs/README.en.md +76 -30
- package/docs/SECURITY-NOTES.md +2 -0
- package/docs/assets/console.png +0 -0
- package/docs/assets/context-metering.png +0 -0
- package/docs/assets/model-picker.png +0 -0
- package/docs/assets/settings.png +0 -0
- package/docs/assets/token-usage.png +0 -0
- package/package.json +1 -1
package/dist/client.js
CHANGED
|
@@ -9870,11 +9870,16 @@ body[data-ds-dark-theme] select.agy-select { color-scheme: dark; }
|
|
|
9870
9870
|
* `updatedAt` of the snapshot it overrode; the gate stays off only while the
|
|
9871
9871
|
* cached row is no newer than that stamp, so a fresh poll always re-arms it.
|
|
9872
9872
|
*/
|
|
9873
|
-
function isQuotaBenched(acc, family, now) {
|
|
9873
|
+
function isQuotaBenched(acc, family, now, model) {
|
|
9874
9874
|
const quota = acc.quotas?.[family] ?? (family === "argon" ? acc.quotas?.google : void 0);
|
|
9875
9875
|
if (!quota) return false;
|
|
9876
9876
|
const clearedAt = acc.quotaGateClearedAt?.[family];
|
|
9877
|
-
|
|
9877
|
+
if (is5hQuotaBenched(quota, clearedAt, now) || isWeeklyQuotaBenched(quota, clearedAt, now)) return true;
|
|
9878
|
+
if (!model || model.trim() === "" || !Array.isArray(quota.models)) return false;
|
|
9879
|
+
if (clearedAt !== void 0 && (quota.updatedAt ?? 0) <= clearedAt) return false;
|
|
9880
|
+
const matched = quota.models.filter((m) => modelMatches(model, m.modelId));
|
|
9881
|
+
if (matched.length === 0) return false;
|
|
9882
|
+
return matched.every((m) => isWindowBenched(m.remainingFraction, m.resetTime ?? quota.resetTime, LOW_QUOTA_WEEKLY, now));
|
|
9878
9883
|
}
|
|
9879
9884
|
/** True when any family on the account has an active local 429 cooldown timer. */
|
|
9880
9885
|
function accountHasActiveCooldown(acc, now) {
|