dsh-agy-link 0.6.7 → 0.6.8

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 CHANGED
@@ -1,5 +1,23 @@
1
1
  # Changelog
2
2
 
3
+ ## 0.6.8 (2026-11-08)
4
+
5
+ ### English
6
+
7
+ - **Fix(warmup): the 7-day warmup no longer freezes on a floating post-reset window, and probes use models each account actually has.** (thanks @Ronnoc, #88)
8
+ - After an upstream weekly reset (or for an account with zero usage), Google returns a floating `resetTime = now + 7 days` with no `description`. The old trigger only fired at `now >= resetTs - 60s`, so those accounts were never probed and the weekly timer floated at "7d 0h" forever. A probe now also fires when `remainingMs >= 6 days`, and the cooldown key is deterministic (`identity:family:weekly`) so a floating reset can no longer invalidate it.
9
+ - Argon is exposed with effort tiers; probing the bare `gemini-4-argon` got a 404. It maps to `gemini-4-argon-low`, and when the account's quota row lists Argon models the low tier is picked from it.
10
+ - Accounts differ in which Claude generation they can use (legacy `claude-sonnet-4-6` vs migrated `claude-sonnet-5-5-*`). The probe model is now chosen per account from `quotas.anthropic.models` (monitored pick → any Sonnet low/medium → any Sonnet → any Claude), instead of a global `claude-sonnet-4-6`.
11
+
12
+ ### 中文
13
+
14
+ - **修复(warmup):7 天预热不再卡在「重置后的浮动窗口」,且探测模型按账号实际可用选择。**(感谢 @Ronnoc,#88)
15
+ - 上游周额度重置后(或本周期零使用),Google 返回浮动的 `resetTime = now + 7 天` 且无 `description`;旧逻辑只在 `now >= resetTs - 60s` 时触发,于是这些账号永远不被探活,周计时器一直显示浮动「7d 0h」。现在 `remainingMs >= 6 天` 也会触发,且冷却键固定为 `identity:family:weekly`,浮动 reset 不会再让它失效。
16
+ - Argon 上游按思考档位暴露模型,直接探测 `gemini-4-argon` 会 404;现映射到 `gemini-4-argon-low`,并优先从该账号的配额模型列表里取 low 档。
17
+ - 不同账号可用的 Claude 代际不同(旧账号 `claude-sonnet-4-6`,迁移账号 `claude-sonnet-5-5-*`);探测模型改为按 `quotas.anthropic.models` **逐账号**选择(monitored 命中 → 任意 Sonnet low/medium → 任意 Sonnet → 任意 Claude),不再全局写死 `claude-sonnet-4-6`。
18
+
19
+ **Full Changelog**: https://github.com/amlyczz/dsh-agy-link/compare/v0.6.7...v0.6.8
20
+
3
21
  ## 0.6.7 (2026-11-08)
4
22
 
5
23
  ### English
package/dist/index.js CHANGED
@@ -35837,14 +35837,31 @@ function toCanonicalWarmupModel(model) {
35837
35837
  const clean = model.trim().toLowerCase();
35838
35838
  if (clean === "gemini-3-flash") return "gemini-3.8-flash-tiered";
35839
35839
  if (/^gemini-3\.\d+-flash$/.test(clean)) return clean + "-tiered";
35840
- if (clean.includes("argon")) return "gemini-4-argon";
35840
+ if (clean === "gemini-4-argon" || clean === "argon") return "gemini-4-argon-low";
35841
35841
  return model.trim();
35842
35842
  }
35843
35843
  /** Select target model for a given family honoring user monitored_models preferences. */
35844
- function pickWarmupModelForFamily(family, monitoredModels = []) {
35845
- if (family === "anthropic") return monitoredModels.find((m) => m.toLowerCase().includes("claude")) ?? "claude-sonnet-4-6";
35844
+ function pickWarmupModelForFamily(family, monitoredModels = [], account) {
35845
+ if (family === "argon") {
35846
+ if (account?.quotas?.argon?.models?.length) {
35847
+ const m = account.quotas.argon.models.find((x) => x.modelId.includes("argon-low")) ?? account.quotas.argon.models.find((x) => x.modelId.includes("argon"));
35848
+ if (m) return m.modelId;
35849
+ }
35850
+ return "gemini-4-argon-low";
35851
+ }
35852
+ if (family === "anthropic") {
35853
+ const accountModels = account?.quotas?.anthropic?.models?.map((m) => m.modelId) ?? [];
35854
+ if (accountModels.length > 0) {
35855
+ const preferred = monitoredModels.find((m) => accountModels.includes(m));
35856
+ if (preferred) return preferred;
35857
+ const sonnet = accountModels.find((m) => m.includes("sonnet") && (m.includes("low") || m.includes("medium"))) ?? accountModels.find((m) => m.includes("sonnet"));
35858
+ if (sonnet) return sonnet;
35859
+ const anyClaude = accountModels.find((m) => m.toLowerCase().includes("claude"));
35860
+ if (anyClaude) return anyClaude;
35861
+ }
35862
+ return monitoredModels.find((m) => m.toLowerCase().includes("claude")) ?? "claude-sonnet-4-6";
35863
+ }
35846
35864
  if (family === "openai") return monitoredModels.find((m) => m.toLowerCase().includes("gpt")) ?? "gpt-oss-120b-medium";
35847
- if (family === "argon") return "gemini-4-argon";
35848
35865
  return monitoredModels.find((m) => m.toLowerCase().includes("gemini") && !m.toLowerCase().includes("argon")) ?? "gemini-3.8-flash";
35849
35866
  }
35850
35867
  /**
@@ -36176,23 +36193,24 @@ var WarmupService = class {
36176
36193
  const weeklyFrac = q.weeklyFraction;
36177
36194
  if (weeklyFrac === void 0 || weeklyFrac < .999) continue;
36178
36195
  let shouldWarm = false;
36179
- let historyKey = "";
36180
- if (q.weeklyResetTime) {
36181
- const resetTs = Date.parse(q.weeklyResetTime);
36182
- if (!isNaN(resetTs)) {
36183
- if (now >= resetTs - 6e4) {
36184
- historyKey = `${identity}:${fam}:weekly:${resetTs}`;
36185
- shouldWarm = options.force || !this.history.checkCooldown(historyKey, SIX_DAYS_MS, now);
36196
+ const historyKey = `${identity}:${fam}:weekly`;
36197
+ const hasRecentWarmup = this.history.checkCooldown(historyKey, SIX_DAYS_MS, now);
36198
+ if (options.force) shouldWarm = true;
36199
+ else if (!hasRecentWarmup) {
36200
+ if (!q.weeklyResetTime) shouldWarm = true;
36201
+ else {
36202
+ const resetTs = Date.parse(q.weeklyResetTime);
36203
+ if (isNaN(resetTs)) shouldWarm = true;
36204
+ else {
36205
+ const remainingMs = resetTs - now;
36206
+ if (now >= resetTs - 6e4 || remainingMs >= SIX_DAYS_MS) shouldWarm = true;
36186
36207
  }
36187
36208
  }
36188
- } else {
36189
- historyKey = `${identity}:${fam}:weekly:initial`;
36190
- shouldWarm = options.force || !this.history.checkCooldown(historyKey, SIX_DAYS_MS, now);
36191
36209
  }
36192
36210
  const failureKey = `${historyKey}:failed`;
36193
36211
  if (shouldWarm && !options.force && this.history.checkCooldown(failureKey, FAILURE_BACKOFF_MS, now)) shouldWarm = false;
36194
36212
  if (shouldWarm) {
36195
- const model = pickWarmupModelForFamily(fam, monitored);
36213
+ const model = pickWarmupModelForFamily(fam, monitored, account);
36196
36214
  modelsToPing.push({
36197
36215
  family: fam,
36198
36216
  model,
@@ -36202,7 +36220,7 @@ var WarmupService = class {
36202
36220
  }
36203
36221
  }
36204
36222
  if (modelsToPing.length === 0 && options.force) {
36205
- const fallbackModel = pickWarmupModelForFamily("google", monitored);
36223
+ const fallbackModel = pickWarmupModelForFamily("google", monitored, account);
36206
36224
  modelsToPing.push({
36207
36225
  family: "google",
36208
36226
  model: fallbackModel,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "dsh-agy-link",
3
- "version": "0.6.7",
3
+ "version": "0.6.8",
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",