@prestyj/core 5.16.1 → 5.17.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.
@@ -1475,7 +1475,8 @@ var AuthStorage = class {
1475
1475
  filePath;
1476
1476
  loaded = false;
1477
1477
  /**
1478
- * mtime+size of the file as of the cached snapshot (`size: -1` = no file).
1478
+ * inode+mtime+size of the cached file (`size: -1` = no file). The inode
1479
+ * detects atomic replacements with equal size within one filesystem clock tick.
1479
1480
  * auth.json is shared: the desktop app writes API keys and disconnects
1480
1481
  * NATIVELY (so they work with no daemon running), and every window/process has
1481
1482
  * its own AuthStorage. A load-once cache therefore goes stale — the sidecar
@@ -1484,6 +1485,7 @@ var AuthStorage = class {
1484
1485
  */
1485
1486
  snapshotMtimeMs = 0;
1486
1487
  snapshotSize = -1;
1488
+ snapshotIno = 0;
1487
1489
  /** Per-provider lock to serialize concurrent refresh calls. */
1488
1490
  refreshLocks = /* @__PURE__ */ new Map();
1489
1491
  constructor(filePath) {
@@ -1642,7 +1644,7 @@ var AuthStorage = class {
1642
1644
  let changed;
1643
1645
  try {
1644
1646
  const stat = await fs4.stat(this.filePath);
1645
- changed = stat.mtimeMs !== this.snapshotMtimeMs || stat.size !== this.snapshotSize;
1647
+ changed = stat.ino !== this.snapshotIno || stat.mtimeMs !== this.snapshotMtimeMs || stat.size !== this.snapshotSize;
1646
1648
  } catch {
1647
1649
  changed = this.snapshotSize !== -1;
1648
1650
  }
@@ -1654,9 +1656,11 @@ var AuthStorage = class {
1654
1656
  const stat = await fs4.stat(this.filePath);
1655
1657
  this.snapshotMtimeMs = stat.mtimeMs;
1656
1658
  this.snapshotSize = stat.size;
1659
+ this.snapshotIno = stat.ino;
1657
1660
  } catch {
1658
1661
  this.snapshotMtimeMs = 0;
1659
1662
  this.snapshotSize = -1;
1663
+ this.snapshotIno = 0;
1660
1664
  }
1661
1665
  }
1662
1666
  /**
@@ -1972,6 +1976,29 @@ var MODELS = [
1972
1976
  maxThinkingLevel: "high"
1973
1977
  },
1974
1978
  // ── OpenAI (Codex) ─────────────────────────────────────
1979
+ {
1980
+ // GPT-6 Astra — "Our most capable model for complex, demanding work."
1981
+ // (Codex catalog priority 1, listed for every ChatGPT plan, requires a
1982
+ // Codex client >= 0.153.0 — see CODEX_CLIENT_VERSION). Same split as 5.6:
1983
+ // 1.05M on the public Responses API, 272K on the ChatGPT OAuth route
1984
+ // (openai/codex models.json, `gpt-6-astra`). Reasoning ladder low → medium
1985
+ // → high → xhigh → max → ultra; `ultra` is the Codex orchestration preset
1986
+ // (multi_agent v2) and is Codex-only — the public API tops out at `max`.
1987
+ // Note: through a plain API key OpenAI requires the Responses API for tool
1988
+ // calling on Astra, so the Chat Completions path is text-only; the OAuth
1989
+ // Codex route is the supported way to use it as an agent.
1990
+ id: "gpt-6-astra",
1991
+ name: "GPT-6 Astra",
1992
+ provider: "openai",
1993
+ contextWindow: 105e4,
1994
+ codexContextWindow: 272e3,
1995
+ maxOutputTokens: 128e3,
1996
+ supportsThinking: true,
1997
+ supportsImages: true,
1998
+ supportsVideo: false,
1999
+ costTier: "high",
2000
+ maxThinkingLevel: "ultra"
2001
+ },
1975
2002
  // GPT-5.6 family — three agentic coding tiers launched July 2026. The public
1976
2003
  // Responses API advertises a 1.05M context window; OpenAI's Codex product
1977
2004
  // catalog advertises 272K on the ChatGPT OAuth route (corrected from the
@@ -2025,24 +2052,11 @@ var MODELS = [
2025
2052
  costTier: "low",
2026
2053
  maxThinkingLevel: "max"
2027
2054
  },
2028
- {
2029
- id: "gpt-5.5",
2030
- name: "GPT-5.5",
2031
- provider: "openai",
2032
- contextWindow: 105e4,
2033
- codexContextWindow: 272e3,
2034
- maxOutputTokens: 128e3,
2035
- supportsThinking: true,
2036
- supportsImages: true,
2037
- supportsVideo: false,
2038
- costTier: "high",
2039
- maxThinkingLevel: "xhigh"
2040
- },
2041
2055
  // ── Sakana (Fugu) ──────────────────────────────────────
2042
2056
  // Sakana Fugu is a multi-agent system surfaced as a standard LLM via the
2043
2057
  // OpenAI-compatible Sakana API (https://api.sakana.ai/v1). Both models take
2044
- // text + image input and only accept "high"/"xhigh" reasoning effort, so the
2045
- // top tier is `xhigh`. `fugu` routes across all providers; `fugu-ultra` is
2058
+ // text + image input. Plain Fugu stops at xhigh; Ultra v1.1 also supports max.
2059
+ // `fugu` routes across all providers; `fugu-ultra` is
2046
2060
  // the heavier tier (may need larger client timeouts on complex tasks).
2047
2061
  {
2048
2062
  id: "fugu",
@@ -2066,7 +2080,8 @@ var MODELS = [
2066
2080
  supportsImages: true,
2067
2081
  supportsVideo: false,
2068
2082
  costTier: "high",
2069
- maxThinkingLevel: "xhigh"
2083
+ // The rolling alias now serves v1.1, which adds a distinct max effort.
2084
+ maxThinkingLevel: "max"
2070
2085
  },
2071
2086
  // ── xAI (Grok) ─────────────────────────────────────────
2072
2087
  // Grok 4.6 (released 2026-08-12) is xAI's flagship for coding, agentic tasks,
@@ -2120,6 +2135,34 @@ var MODELS = [
2120
2135
  costTier: "low",
2121
2136
  maxThinkingLevel: "high"
2122
2137
  },
2138
+ // Keep 3.1 Flash Lite first for the working OAuth default and fast-model routing.
2139
+ // New GA models are opt-in; Code Assist access varies by account.
2140
+ {
2141
+ id: "gemini-3.8-flash",
2142
+ name: "Gemini 3.8 Flash",
2143
+ provider: "gemini",
2144
+ contextWindow: 1048576,
2145
+ maxOutputTokens: 65536,
2146
+ supportsThinking: true,
2147
+ supportsImages: true,
2148
+ supportsVideo: true,
2149
+ maxVideoBytes: 20 * 1024 * 1024,
2150
+ costTier: "low",
2151
+ maxThinkingLevel: "high"
2152
+ },
2153
+ {
2154
+ id: "gemini-3.5-flash-lite",
2155
+ name: "Gemini 3.5 Flash Lite",
2156
+ provider: "gemini",
2157
+ contextWindow: 1048576,
2158
+ maxOutputTokens: 65536,
2159
+ supportsThinking: true,
2160
+ supportsImages: true,
2161
+ supportsVideo: true,
2162
+ maxVideoBytes: 20 * 1024 * 1024,
2163
+ costTier: "low",
2164
+ maxThinkingLevel: "high"
2165
+ },
2123
2166
  {
2124
2167
  // Gemini 3.7 Flash (released 2026-08-13) — Google's most capable Flash for
2125
2168
  // coding, agents, and multi-step execution; GA-stable on the Gemini API as
@@ -2127,7 +2170,7 @@ var MODELS = [
2127
2170
  // Sent over our Code Assist (OAuth) transport ahead of gemini-cli — upstream
2128
2171
  // hasn't listed 3.7 yet (google-gemini/gemini-cli#28802, still open) — so
2129
2172
  // free/personal accounts 404 (entitlement-gated) while Code Assist
2130
- // Standard/Enterprise accounts get it. Listed SECOND, after flash-lite:
2173
+ // Standard/Enterprise accounts get it. Kept after the working flash-lite:
2131
2174
  // getFastModel picks the first low-tier entry, and flash-lite is the one
2132
2175
  // that works on every account.
2133
2176
  id: "gemini-3.7-flash",
@@ -2319,21 +2362,19 @@ var MODELS = [
2319
2362
  {
2320
2363
  // `deepseek-v4-pro` now serves DeepSeek-V4-Pro-0813 (released 2026-08-13,
2321
2364
  // first STABLE V4 Pro — supersedes the April preview; calling name
2322
- // unchanged, same 1.6T/49B MoE). 1M context, 384K (393,216) max output,
2323
- // text-only, reasoning ladder low/high plus Think Max — mapped from our
2324
- // `xhigh`. ~$0.43/$0.87 per MTok on DeepSeek's own API, so a mid-tier
2325
- // price band rather than the preview's top band.
2365
+ // unchanged, same 1.6T/49B MoE). 1M context, text-only, low/high/max effort.
2366
+ // Docs abbreviate output as 384K; use the same conservative 384,000-token
2367
+ // application cap across V4 models rather than mixing decimal/binary units.
2326
2368
  id: "deepseek-v4-pro",
2327
2369
  name: "DeepSeek V4 Pro",
2328
2370
  provider: "deepseek",
2329
2371
  contextWindow: 1048576,
2330
- maxOutputTokens: 393216,
2372
+ maxOutputTokens: 384e3,
2331
2373
  supportsThinking: true,
2332
2374
  supportsImages: false,
2333
2375
  supportsVideo: false,
2334
2376
  costTier: "medium",
2335
- // DeepSeek V4 maps `xhigh` → its internal `max` tier.
2336
- maxThinkingLevel: "xhigh"
2377
+ maxThinkingLevel: "max"
2337
2378
  },
2338
2379
  {
2339
2380
  id: "deepseek-v4-flash",
@@ -2345,7 +2386,20 @@ var MODELS = [
2345
2386
  supportsImages: false,
2346
2387
  supportsVideo: false,
2347
2388
  costTier: "low",
2348
- maxThinkingLevel: "xhigh"
2389
+ maxThinkingLevel: "max"
2390
+ },
2391
+ // Opt-in experimental vision sibling; never replaces the stable summary model.
2392
+ {
2393
+ id: "deepseek-v4-flash-vision-exp",
2394
+ name: "DeepSeek V4 Flash Vision (Experimental)",
2395
+ provider: "deepseek",
2396
+ contextWindow: 1048576,
2397
+ maxOutputTokens: 384e3,
2398
+ supportsThinking: true,
2399
+ supportsImages: true,
2400
+ supportsVideo: false,
2401
+ costTier: "low",
2402
+ maxThinkingLevel: "max"
2349
2403
  },
2350
2404
  // ── OpenRouter ─────────────────────────────────────────
2351
2405
  {
@@ -2355,8 +2409,10 @@ var MODELS = [
2355
2409
  contextWindow: 1e6,
2356
2410
  maxOutputTokens: 65536,
2357
2411
  supportsThinking: true,
2358
- supportsImages: false,
2359
- supportsVideo: false,
2412
+ supportsImages: true,
2413
+ supportsVideo: true,
2414
+ // Practical inline-payload cap, not an asserted provider maximum.
2415
+ maxVideoBytes: 20 * 1024 * 1024,
2360
2416
  costTier: "medium",
2361
2417
  maxThinkingLevel: "high"
2362
2418
  },
@@ -2559,4 +2615,4 @@ export {
2559
2615
  getSummaryModel,
2560
2616
  getFastModel
2561
2617
  };
2562
- //# sourceMappingURL=chunk-OUE2GRO6.js.map
2618
+ //# sourceMappingURL=chunk-LQNMFHK5.js.map