dsh-agy-link 0.6.32 → 0.6.33
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 +14 -0
- package/dist/cli-image.mjs +10 -3
- package/dist/index.js +10 -3
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,19 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## 0.6.33 (2026-11-17)
|
|
4
|
+
|
|
5
|
+
### English
|
|
6
|
+
|
|
7
|
+
- **Fix(diagnostics): "model not in catalog" is no longer reported as a missing plan (fixes #120, #122).** `explainIneligibility()` used one `'unsupported'` reason for both "the account has no access to this family/plan" and "this model id isn't in the account's catalog"; `unavailableError()` then always hinted `requires a plan with google enabled`. That sent users account-shopping when every account simply lacked the model. A distinct `'model-unsupported'` reason now produces a targeted message ("not in any enabled account's catalog — refresh the model list or pick a listed model; NOT a missing plan"), while genuine family-level `unsupported` keeps its original wording.
|
|
8
|
+
- **Fix(models): a stale/fallback `agy models` snapshot can no longer veto the account's own quota groups (fixes #122).** `accountSupportsModel()` treated a negative `source: 'discovered'` catalog as authoritative even when the snapshot was captured while agy's auth was unavailable (a static 4/6-item fallback list) or simply stale. A discovered catalog still affirms positively; a *negative* entry now yields to explicit per-model quota evidence, so `gemini-4-hydrogen` from a fresh `/pool/refresh-quota` is selected without manually re-activating every account.
|
|
9
|
+
- Tests: new pure regression file for the reason split and stale-catalog veto, plus an updated error-message assertion. A family with no quota evidence still reports `unsupported`; a catalog with no quota evidence remains authoritative.
|
|
10
|
+
|
|
11
|
+
### 中文
|
|
12
|
+
|
|
13
|
+
- **修复(诊断):「模型不在目录」不再误报为套餐缺失(修复 #120、#122)。** `explainIneligibility()` 把「账号没有该 family/套餐权限」与「该 model id 不在账号目录」都归为 `'unsupported'`,`unavailableError()` 于是一律提示 `requires a plan with google enabled`——用户会误以为掉权限而反复换号,实则所有账号都没有这个型号。现在新增独立的 `'model-unsupported'` 原因,文案改为「不在任何启用账号的目录里——刷新模型列表或换一个已列出的型号;不是套餐问题」;真正的 family 级 `unsupported` 文案保持不变。
|
|
14
|
+
- **修复(模型):陈旧/兜底的 `agy models` 快照不再否决账号自身额度组(修复 #122)。** `accountSupportsModel()` 此前把 `source: 'discovered'` 目录的**否定**结果当权威,即使该快照是 agy 鉴权未就绪时打印的静态 4/6 条兜底清单、或已经陈旧。现在已发现目录仍可**正向确认**模型;但**否定**结果要让位于明确的 per-model 额度证据,因此执行 `/pool/refresh-quota` 后即可选到 `gemini-4-hydrogen`,无需逐账号手工 `set-active` 重探。
|
|
15
|
+
- 测试:新增纯函数回归覆盖原因分流与陈旧目录否决,并更新错误文案断言。无额度证据时 family 仍报 `unsupported`,无额度证据时目录仍为权威。
|
|
16
|
+
|
|
3
17
|
## 0.6.32 (2026-11-17)
|
|
4
18
|
|
|
5
19
|
### English
|
package/dist/cli-image.mjs
CHANGED
|
@@ -1481,7 +1481,12 @@ function accountSupportsModel(acc, model, pool, catalog) {
|
|
|
1481
1481
|
if (!model || model.trim() === "") return true;
|
|
1482
1482
|
const clean = model.trim();
|
|
1483
1483
|
if (isArgonModel(clean)) return accountHasArgon(acc, pool, catalog);
|
|
1484
|
-
if (catalog && catalog.source === "discovered" && Array.isArray(catalog.models) && catalog.models.length > 0)
|
|
1484
|
+
if (catalog && catalog.source === "discovered" && Array.isArray(catalog.models) && catalog.models.length > 0) {
|
|
1485
|
+
if (catalog.models.some((m) => modelMatches(clean, m.id))) return true;
|
|
1486
|
+
const familyQuotaModels = acc.quotas?.[modelFamilyOf(clean)]?.models;
|
|
1487
|
+
if (Array.isArray(familyQuotaModels) && familyQuotaModels.some((m) => modelMatches(clean, m.modelId))) return true;
|
|
1488
|
+
return false;
|
|
1489
|
+
}
|
|
1485
1490
|
const family = modelFamilyOf(clean);
|
|
1486
1491
|
const familyQuota = acc.quotas?.[family];
|
|
1487
1492
|
if (familyQuota) {
|
|
@@ -5990,6 +5995,7 @@ function unavailableError(pool, family, model) {
|
|
|
5990
5995
|
const cooling = reasons.filter((r) => r === "cooldown").length;
|
|
5991
5996
|
const quotaBlocked = reasons.filter((r) => r === "quota").length;
|
|
5992
5997
|
const unsupported = reasons.filter((r) => r === "unsupported").length;
|
|
5998
|
+
const modelUnsupported = reasons.filter((r) => r === "model-unsupported").length;
|
|
5993
5999
|
const signedOut = accounts.filter((a) => a.authRequired === true).length;
|
|
5994
6000
|
const countdown = pool.getEarliestAvailableCountdown?.(family) ?? pool.getEarliestResetCountdown(family);
|
|
5995
6001
|
let why;
|
|
@@ -6000,12 +6006,13 @@ function unavailableError(pool, family, model) {
|
|
|
6000
6006
|
if (cooling > 0) details.push(`${cooling} in cooldown`);
|
|
6001
6007
|
if (quotaBlocked > 0) details.push(`${quotaBlocked} quota-exhausted`);
|
|
6002
6008
|
if (unsupported > 0) details.push(`${unsupported} lack ${family} access`);
|
|
6009
|
+
if (modelUnsupported > 0) details.push(`${modelUnsupported} lack model "${model ?? ""}" in their catalog`);
|
|
6003
6010
|
if (signedOut > 0) details.push(`${signedOut} signed out`);
|
|
6004
6011
|
if (disabled > 0) details.push(`${disabled} disabled`);
|
|
6005
6012
|
why = `no account can serve ${family} right now${details.length > 0 ? ` (${details.join(", ")})` : ""}`;
|
|
6006
6013
|
}
|
|
6007
6014
|
const waitStr = countdown !== null && countdown > 0 ? ` (earliest reset in ${Math.ceil(countdown / 1e3)}s)` : "";
|
|
6008
|
-
const hint = unsupported > 0 && quotaBlocked === 0 && cooling === 0 ? `No enabled account has access to ${family} (requires a plan with ${family} enabled).` : quotaBlocked > 0 && cooling === 0 ? "Add an account, wait for the quota reset, or run /agy clear-cooldown to override the current quota snapshot." : "Add an account, wait for reset, or run /agy clear-cooldown.";
|
|
6015
|
+
const hint = modelUnsupported > 0 && unsupported === 0 && quotaBlocked === 0 && cooling === 0 ? `Requested model "${model ?? ""}" is not in any enabled account's catalog — refresh the model list (POST /plugins/agy-link/pool/refresh-quota) or pick a listed model. It is NOT a missing ${family} plan.` : unsupported > 0 && quotaBlocked === 0 && cooling === 0 ? `No enabled account has access to ${family} (requires a plan with ${family} enabled).` : quotaBlocked > 0 && cooling === 0 ? "Add an account, wait for the quota reset, or run /agy clear-cooldown to override the current quota snapshot." : "Add an account, wait for reset, or run /agy clear-cooldown.";
|
|
6009
6016
|
return new LlmError(`All Antigravity accounts are unavailable: ${why}${waitStr}. ${hint}`, Err.AGY_ERROR);
|
|
6010
6017
|
}
|
|
6011
6018
|
async function selectSessionAccount(input) {
|
|
@@ -6899,7 +6906,7 @@ function explainIneligibility(acc, family, now, pool, model) {
|
|
|
6899
6906
|
if (!acc.enabled) return "disabled";
|
|
6900
6907
|
if (acc.authRequired) return "auth";
|
|
6901
6908
|
if (family === "argon" && !accountHasArgon(acc, pool)) return "unsupported";
|
|
6902
|
-
if (model && pool && typeof pool.isModelSupported === "function" && !pool.isModelSupported(acc, model)) return "unsupported";
|
|
6909
|
+
if (model && pool && typeof pool.isModelSupported === "function" && !pool.isModelSupported(acc, model)) return "model-unsupported";
|
|
6903
6910
|
const cd = acc.cooldowns?.[family];
|
|
6904
6911
|
if (cd && cd.cooldownUntil > now) return "cooldown";
|
|
6905
6912
|
if (isQuotaBenched(acc, family, now)) return "quota";
|
package/dist/index.js
CHANGED
|
@@ -559,7 +559,12 @@ function accountSupportsModel(acc, model, pool, catalog) {
|
|
|
559
559
|
if (!model || model.trim() === "") return true;
|
|
560
560
|
const clean = model.trim();
|
|
561
561
|
if (isArgonModel(clean)) return accountHasArgon(acc, pool, catalog);
|
|
562
|
-
if (catalog && catalog.source === "discovered" && Array.isArray(catalog.models) && catalog.models.length > 0)
|
|
562
|
+
if (catalog && catalog.source === "discovered" && Array.isArray(catalog.models) && catalog.models.length > 0) {
|
|
563
|
+
if (catalog.models.some((m) => modelMatches(clean, m.id))) return true;
|
|
564
|
+
const familyQuotaModels = acc.quotas?.[modelFamilyOf(clean)]?.models;
|
|
565
|
+
if (Array.isArray(familyQuotaModels) && familyQuotaModels.some((m) => modelMatches(clean, m.modelId))) return true;
|
|
566
|
+
return false;
|
|
567
|
+
}
|
|
563
568
|
const family = modelFamilyOf(clean);
|
|
564
569
|
const familyQuota = acc.quotas?.[family];
|
|
565
570
|
if (familyQuota) {
|
|
@@ -6927,6 +6932,7 @@ function unavailableError(pool, family, model) {
|
|
|
6927
6932
|
const cooling = reasons.filter((r) => r === "cooldown").length;
|
|
6928
6933
|
const quotaBlocked = reasons.filter((r) => r === "quota").length;
|
|
6929
6934
|
const unsupported = reasons.filter((r) => r === "unsupported").length;
|
|
6935
|
+
const modelUnsupported = reasons.filter((r) => r === "model-unsupported").length;
|
|
6930
6936
|
const signedOut = accounts.filter((a) => a.authRequired === true).length;
|
|
6931
6937
|
const countdown = pool.getEarliestAvailableCountdown?.(family) ?? pool.getEarliestResetCountdown(family);
|
|
6932
6938
|
let why;
|
|
@@ -6937,12 +6943,13 @@ function unavailableError(pool, family, model) {
|
|
|
6937
6943
|
if (cooling > 0) details.push(`${cooling} in cooldown`);
|
|
6938
6944
|
if (quotaBlocked > 0) details.push(`${quotaBlocked} quota-exhausted`);
|
|
6939
6945
|
if (unsupported > 0) details.push(`${unsupported} lack ${family} access`);
|
|
6946
|
+
if (modelUnsupported > 0) details.push(`${modelUnsupported} lack model "${model ?? ""}" in their catalog`);
|
|
6940
6947
|
if (signedOut > 0) details.push(`${signedOut} signed out`);
|
|
6941
6948
|
if (disabled > 0) details.push(`${disabled} disabled`);
|
|
6942
6949
|
why = `no account can serve ${family} right now${details.length > 0 ? ` (${details.join(", ")})` : ""}`;
|
|
6943
6950
|
}
|
|
6944
6951
|
const waitStr = countdown !== null && countdown > 0 ? ` (earliest reset in ${Math.ceil(countdown / 1e3)}s)` : "";
|
|
6945
|
-
const hint = unsupported > 0 && quotaBlocked === 0 && cooling === 0 ? `No enabled account has access to ${family} (requires a plan with ${family} enabled).` : quotaBlocked > 0 && cooling === 0 ? "Add an account, wait for the quota reset, or run /agy clear-cooldown to override the current quota snapshot." : "Add an account, wait for reset, or run /agy clear-cooldown.";
|
|
6952
|
+
const hint = modelUnsupported > 0 && unsupported === 0 && quotaBlocked === 0 && cooling === 0 ? `Requested model "${model ?? ""}" is not in any enabled account's catalog — refresh the model list (POST /plugins/agy-link/pool/refresh-quota) or pick a listed model. It is NOT a missing ${family} plan.` : unsupported > 0 && quotaBlocked === 0 && cooling === 0 ? `No enabled account has access to ${family} (requires a plan with ${family} enabled).` : quotaBlocked > 0 && cooling === 0 ? "Add an account, wait for the quota reset, or run /agy clear-cooldown to override the current quota snapshot." : "Add an account, wait for reset, or run /agy clear-cooldown.";
|
|
6946
6953
|
return new LlmError(`All Antigravity accounts are unavailable: ${why}${waitStr}. ${hint}`, Err.AGY_ERROR);
|
|
6947
6954
|
}
|
|
6948
6955
|
async function selectSessionAccount(input) {
|
|
@@ -7469,7 +7476,7 @@ function explainIneligibility(acc, family, now, pool, model) {
|
|
|
7469
7476
|
if (!acc.enabled) return "disabled";
|
|
7470
7477
|
if (acc.authRequired) return "auth";
|
|
7471
7478
|
if (family === "argon" && !accountHasArgon(acc, pool)) return "unsupported";
|
|
7472
|
-
if (model && pool && typeof pool.isModelSupported === "function" && !pool.isModelSupported(acc, model)) return "unsupported";
|
|
7479
|
+
if (model && pool && typeof pool.isModelSupported === "function" && !pool.isModelSupported(acc, model)) return "model-unsupported";
|
|
7473
7480
|
const cd = acc.cooldowns?.[family];
|
|
7474
7481
|
if (cd && cd.cooldownUntil > now) return "cooldown";
|
|
7475
7482
|
if (isQuotaBenched(acc, family, now)) return "quota";
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "dsh-agy-link",
|
|
3
|
-
"version": "0.6.
|
|
3
|
+
"version": "0.6.33",
|
|
4
4
|
"description": "Google Antigravity (agy CLI) models for DeepSeek Harness — stream Gemini/Claude/GPT-OSS subscriptions into DSH with thinking, tool activity, token usage and in-GUI Google OAuth login.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"license": "MIT",
|