@ashlr/hub 3.8.0 → 3.9.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.
Files changed (147) hide show
  1. package/CHANGELOG.md +201 -0
  2. package/dist/build-identity.json +2 -2
  3. package/dist/cli/resource-profile.js +95 -21
  4. package/dist/cli/resource-profile.js.map +1 -1
  5. package/dist/core/resources/native-profile.d.ts +56 -0
  6. package/dist/core/resources/native-profile.js +368 -6
  7. package/dist/core/resources/native-profile.js.map +1 -1
  8. package/dist/core/run/model-catalog.js +8 -1
  9. package/dist/core/run/model-catalog.js.map +1 -1
  10. package/dist/core/universe/builtins/preparation/manifest.json +1 -1
  11. package/dist/core/universe/builtins/preparation/preparation-bridge.mjs +9 -2
  12. package/dist/core/universe/builtins/preparation/preparation-verification-fixtures.mjs +8 -1
  13. package/dist/core/verse/adapters/claude.d.ts +49 -2
  14. package/dist/core/verse/adapters/claude.js +317 -56
  15. package/dist/core/verse/adapters/claude.js.map +1 -1
  16. package/dist/core/verse/adapters/codex.d.ts +81 -5
  17. package/dist/core/verse/adapters/codex.js +409 -47
  18. package/dist/core/verse/adapters/codex.js.map +1 -1
  19. package/dist/core/verse/adapters/grok.d.ts +13 -1
  20. package/dist/core/verse/adapters/grok.js +28 -2
  21. package/dist/core/verse/adapters/grok.js.map +1 -1
  22. package/dist/core/verse/adapters/index.d.ts +32 -0
  23. package/dist/core/verse/adapters/index.js +2 -0
  24. package/dist/core/verse/adapters/index.js.map +1 -1
  25. package/dist/core/verse/codex-rollout.d.ts +284 -0
  26. package/dist/core/verse/codex-rollout.js +786 -0
  27. package/dist/core/verse/codex-rollout.js.map +1 -0
  28. package/dist/core/verse/context-fit.d.ts +63 -0
  29. package/dist/core/verse/context-fit.js +355 -0
  30. package/dist/core/verse/context-fit.js.map +1 -0
  31. package/dist/core/verse/context-math.d.ts +215 -0
  32. package/dist/core/verse/context-math.js +365 -0
  33. package/dist/core/verse/context-math.js.map +1 -0
  34. package/dist/core/verse/local-models.d.ts +137 -1
  35. package/dist/core/verse/local-models.js +209 -5
  36. package/dist/core/verse/local-models.js.map +1 -1
  37. package/dist/core/verse/model-windows.d.ts +217 -0
  38. package/dist/core/verse/model-windows.js +616 -0
  39. package/dist/core/verse/model-windows.js.map +1 -0
  40. package/dist/core/verse/preferences.d.ts +123 -0
  41. package/dist/core/verse/preferences.js +403 -0
  42. package/dist/core/verse/preferences.js.map +1 -0
  43. package/dist/core/verse/project-memory.d.ts +112 -0
  44. package/dist/core/verse/project-memory.js +295 -0
  45. package/dist/core/verse/project-memory.js.map +1 -0
  46. package/dist/core/verse/seats.d.ts +106 -4
  47. package/dist/core/verse/seats.js +291 -89
  48. package/dist/core/verse/seats.js.map +1 -1
  49. package/dist/core/verse/session-engine.d.ts +76 -2
  50. package/dist/core/verse/session-engine.js +684 -63
  51. package/dist/core/verse/session-engine.js.map +1 -1
  52. package/dist/core/verse/session-handoff.d.ts +94 -0
  53. package/dist/core/verse/session-handoff.js +551 -0
  54. package/dist/core/verse/session-handoff.js.map +1 -0
  55. package/dist/core/verse/session-search.d.ts +63 -0
  56. package/dist/core/verse/session-search.js +213 -0
  57. package/dist/core/verse/session-search.js.map +1 -0
  58. package/dist/core/verse/session-store.d.ts +16 -2
  59. package/dist/core/verse/session-store.js +80 -6
  60. package/dist/core/verse/session-store.js.map +1 -1
  61. package/dist/core/verse/types.d.ts +333 -1
  62. package/dist/core/verse/types.js +54 -2
  63. package/dist/core/verse/types.js.map +1 -1
  64. package/dist/core/verse/verse-api.d.ts +40 -5
  65. package/dist/core/verse/verse-api.js +724 -25
  66. package/dist/core/verse/verse-api.js.map +1 -1
  67. package/dist/core/web/api.d.ts +14 -4
  68. package/dist/core/web/api.js +26 -11
  69. package/dist/core/web/api.js.map +1 -1
  70. package/dist/core/web/public/next/assets/{App-BsbJFA2j.js → App-XURmiAAp.js} +5 -5
  71. package/dist/core/web/public/next/assets/{App-BsbJFA2j.js.map → App-XURmiAAp.js.map} +1 -1
  72. package/dist/core/web/public/next/assets/{ApprovalsSection-2CCSoBTJ.js → ApprovalsSection-BriUzoZc.js} +2 -2
  73. package/dist/core/web/public/next/assets/{ApprovalsSection-2CCSoBTJ.js.map → ApprovalsSection-BriUzoZc.js.map} +1 -1
  74. package/dist/core/web/public/next/assets/AutonomySection-C4GBsQVc.js +2 -0
  75. package/dist/core/web/public/next/assets/{AutonomySection-yeNNUPur.js.map → AutonomySection-C4GBsQVc.js.map} +1 -1
  76. package/dist/core/web/public/next/assets/ChatSection-BpOBOUvg.css +1 -0
  77. package/dist/core/web/public/next/assets/ChatSection-hlgPBRco.js +84 -0
  78. package/dist/core/web/public/next/assets/ChatSection-hlgPBRco.js.map +1 -0
  79. package/dist/core/web/public/next/assets/ConfirmDialog-BdQYI-Ng.js +2 -0
  80. package/dist/core/web/public/next/assets/ConfirmDialog-BdQYI-Ng.js.map +1 -0
  81. package/dist/core/web/public/next/assets/{Dialog-nK15L1M0.js → Dialog-BxdIfmFH.js} +2 -2
  82. package/dist/core/web/public/next/assets/{Dialog-nK15L1M0.js.map → Dialog-BxdIfmFH.js.map} +1 -1
  83. package/dist/core/web/public/next/assets/{DiffViewer-D369eZe8.js → DiffViewer-DmeRWuc4.js} +2 -2
  84. package/dist/core/web/public/next/assets/{DiffViewer-D369eZe8.js.map → DiffViewer-DmeRWuc4.js.map} +1 -1
  85. package/dist/core/web/public/next/assets/{McpSection-DVgiSYG1.js → McpSection-q34T7Tho.js} +2 -2
  86. package/dist/core/web/public/next/assets/{McpSection-DVgiSYG1.js.map → McpSection-q34T7Tho.js.map} +1 -1
  87. package/dist/core/web/public/next/assets/{MutationTokenDialog-B9I4PAcp.js → MutationTokenDialog-CFAkwOEt.js} +2 -2
  88. package/dist/core/web/public/next/assets/{MutationTokenDialog-B9I4PAcp.js.map → MutationTokenDialog-CFAkwOEt.js.map} +1 -1
  89. package/dist/core/web/public/next/assets/{ResourcePoolConsoleApp-z6tJj3s9.js → ResourcePoolConsoleApp-DHc8GFOY.js} +4 -4
  90. package/dist/core/web/public/next/assets/{ResourcePoolConsoleApp-z6tJj3s9.js.map → ResourcePoolConsoleApp-DHc8GFOY.js.map} +1 -1
  91. package/dist/core/web/public/next/assets/{RouteErrorBoundary-OSajL45F.js → RouteErrorBoundary-ZL9F4qUn.js} +2 -2
  92. package/dist/core/web/public/next/assets/{RouteErrorBoundary-OSajL45F.js.map → RouteErrorBoundary-ZL9F4qUn.js.map} +1 -1
  93. package/dist/core/web/public/next/assets/{Meter-CLcr-4wS.css → Segmented-8cf0Fypn.css} +1 -1
  94. package/dist/core/web/public/next/assets/{Meter-Cmo1pLbk.js → Segmented-DbRjVye3.js} +2 -2
  95. package/dist/core/web/public/next/assets/Segmented-DbRjVye3.js.map +1 -0
  96. package/dist/core/web/public/next/assets/SettingsSection-nJGGGYqv.js +2 -0
  97. package/dist/core/web/public/next/assets/{SettingsSection-B3YH2Npi.js.map → SettingsSection-nJGGGYqv.js.map} +1 -1
  98. package/dist/core/web/public/next/assets/UniverseConsoleApp-6GJydgo4.js +2 -0
  99. package/dist/core/web/public/next/assets/{UniverseConsoleApp-wEKIzl1M.js.map → UniverseConsoleApp-6GJydgo4.js.map} +1 -1
  100. package/dist/core/web/public/next/assets/{UniverseView-CQVpJqqI.js → UniverseView-DLDtNYL8.js} +2 -2
  101. package/dist/core/web/public/next/assets/{UniverseView-CQVpJqqI.js.map → UniverseView-DLDtNYL8.js.map} +1 -1
  102. package/dist/core/web/public/next/assets/UsageSection-Cf9d9iFH.js +2 -0
  103. package/dist/core/web/public/next/assets/UsageSection-Cf9d9iFH.js.map +1 -0
  104. package/dist/core/web/public/next/assets/VerseConsoleApp-DsdKQoTH.css +1 -0
  105. package/dist/core/web/public/next/assets/VerseConsoleApp-y0uOHixd.js +3 -0
  106. package/dist/core/web/public/next/assets/VerseConsoleApp-y0uOHixd.js.map +1 -0
  107. package/dist/core/web/public/next/assets/{charts-BopViIha.js → charts-CVooqJWN.js} +2 -2
  108. package/dist/core/web/public/next/assets/{charts-BopViIha.js.map → charts-CVooqJWN.js.map} +1 -1
  109. package/dist/core/web/public/next/assets/context-model-Bqv8DVuH.js +2 -0
  110. package/dist/core/web/public/next/assets/context-model-Bqv8DVuH.js.map +1 -0
  111. package/dist/core/web/public/next/assets/global-eaY9GyX3.js +2 -0
  112. package/dist/core/web/public/next/assets/global-eaY9GyX3.js.map +1 -0
  113. package/dist/core/web/public/next/assets/{icons-L06pQH6j.js → icons-vex8rclC.js} +2 -2
  114. package/dist/core/web/public/next/assets/{icons-L06pQH6j.js.map → icons-vex8rclC.js.map} +1 -1
  115. package/dist/core/web/public/next/assets/{index-CXgVQHek.js → index-D2Eik-zt.js} +3 -3
  116. package/dist/core/web/public/next/assets/{index-CXgVQHek.js.map → index-D2Eik-zt.js.map} +1 -1
  117. package/dist/core/web/public/next/assets/{queries-D3sSlan1.js → queries-bAYU0VNy.js} +2 -2
  118. package/dist/core/web/public/next/assets/{queries-D3sSlan1.js.map → queries-bAYU0VNy.js.map} +1 -1
  119. package/dist/core/web/public/next/assets/use-guarded-action-C7QrP7Yp.js +2 -0
  120. package/dist/core/web/public/next/assets/{use-guarded-action-BxfJ9E-n.js.map → use-guarded-action-C7QrP7Yp.js.map} +1 -1
  121. package/dist/core/web/public/next/assets/verse-model-TfDk9cky.js +2 -0
  122. package/dist/core/web/public/next/assets/verse-model-TfDk9cky.js.map +1 -0
  123. package/dist/core/web/public/next/assets/{workspace-model-v0a1gl-C.js → workspace-model-CHol5RVp.js} +2 -2
  124. package/dist/core/web/public/next/assets/{workspace-model-v0a1gl-C.js.map → workspace-model-CHol5RVp.js.map} +1 -1
  125. package/dist/core/web/public/next/index.html +1 -1
  126. package/dist/release-dependency-inventory.json +1 -1
  127. package/docs/README.md +1 -0
  128. package/package.json +1 -1
  129. package/dist/core/web/public/next/assets/AutonomySection-yeNNUPur.js +0 -2
  130. package/dist/core/web/public/next/assets/ChatSection-BfnLe5dT.css +0 -1
  131. package/dist/core/web/public/next/assets/ChatSection-DwDDnCZQ.js +0 -80
  132. package/dist/core/web/public/next/assets/ChatSection-DwDDnCZQ.js.map +0 -1
  133. package/dist/core/web/public/next/assets/ConfirmDialog-C363ty_c.js +0 -2
  134. package/dist/core/web/public/next/assets/ConfirmDialog-C363ty_c.js.map +0 -1
  135. package/dist/core/web/public/next/assets/Meter-Cmo1pLbk.js.map +0 -1
  136. package/dist/core/web/public/next/assets/SettingsSection-B3YH2Npi.js +0 -2
  137. package/dist/core/web/public/next/assets/UniverseConsoleApp-wEKIzl1M.js +0 -2
  138. package/dist/core/web/public/next/assets/UsageSection-dToBThXe.js +0 -2
  139. package/dist/core/web/public/next/assets/UsageSection-dToBThXe.js.map +0 -1
  140. package/dist/core/web/public/next/assets/VerseConsoleApp-CMkCizvL.css +0 -1
  141. package/dist/core/web/public/next/assets/VerseConsoleApp-DHU32JCQ.js +0 -3
  142. package/dist/core/web/public/next/assets/VerseConsoleApp-DHU32JCQ.js.map +0 -1
  143. package/dist/core/web/public/next/assets/global-DMWakEhP.js +0 -2
  144. package/dist/core/web/public/next/assets/global-DMWakEhP.js.map +0 -1
  145. package/dist/core/web/public/next/assets/use-guarded-action-BxfJ9E-n.js +0 -2
  146. package/dist/core/web/public/next/assets/verse-model-CvtK6vP6.js +0 -2
  147. package/dist/core/web/public/next/assets/verse-model-CvtK6vP6.js.map +0 -1
@@ -0,0 +1,217 @@
1
+ /**
2
+ * core/verse/model-windows.ts — the per-model context budgets every seat is
3
+ * built from (Verse 3.9, owner U4). docs/VERSE-CONTEXT.md §1 is the prose
4
+ * authority; every number below was read from a CLI or a seat's own catalog on
5
+ * 2026-09-23, never recalled.
6
+ *
7
+ * WHY THIS MODULE EXISTS. Until 3.9 every model option carried one number, and
8
+ * for six of the eight Claude models it was wrong: they all inherited the
9
+ * CLI's 200k "unknown model" fallback while the CLI itself ran them at 1M.
10
+ * Codex showed its RAW 272k window while the CLI measures against 95% of it,
11
+ * and Grok showed 256k against a 500k window. So the meter under- or
12
+ * over-read on every native engine. This module is the single place a seat's
13
+ * model list — windows, compaction points, expansive budgets and the binary
14
+ * each model needs — is assembled, and it does the arithmetic ONLY through
15
+ * `context-math.ts`, so "compacts at 367k" can never mean two numbers.
16
+ *
17
+ * SOURCES, in the order a seat prefers them:
18
+ *
19
+ * Claude — the CLI's EMBEDDED catalog (`windowSource: 'cli-catalog'`). There
20
+ * is no per-seat file to read: the served catalog cache carries no windows
21
+ * (`max_input_tokens` absent on every row), so the binary is the authority.
22
+ * The table below is transcribed from the 2.1.257 and 2.1.280 binaries.
23
+ * Codex — the seat's OWN `native-state/models_cache.json`
24
+ * (`provider-catalog`). Catalogs differ per ACCOUNT (codex-b lacks the
25
+ * daybreak slug the global cache has) and per BINARY, so the unpinned
26
+ * `~/.codex` cache is never consulted. No catalog yet → a documented list.
27
+ * Grok — the seat's OWN `native-state/models_cache.json`, whose `.models`
28
+ * is a dict of `{info, api_key, env_key, api_base_url}`. ONLY `.info` is
29
+ * ever read: `api_key` is a credential slot and must not be touched, copied
30
+ * or returned, even though it is null today.
31
+ *
32
+ * Runtime readings (claude/grok `result.modelUsage`, codex rollouts) override
33
+ * all of this per turn — see the session engine. These are the STARTING
34
+ * budgets and the picker's promises, not the last word.
35
+ *
36
+ * Nothing here throws, spends, or reaches the network. File reads are
37
+ * size-capped, symlink-refusing and cached by path + mtime + size.
38
+ */
39
+ import { type VerseEngine, type VerseModelOption, type VerseWindowSource } from './types.js';
40
+ /**
41
+ * Every Claude model a seat offers, in picker order (first runnable = default).
42
+ *
43
+ * Transcribed from the embedded catalog of Claude Code 2.1.257 and 2.1.280
44
+ * (`context.window`, `context.native_1m`, `max_output_tokens.default`):
45
+ *
46
+ * - `native1m` is the catalog's own `native_1m` flag: the CLI runs these at
47
+ * 1M with no `[1m]` suffix on a first-party seat. Never append `[1m]` to a
48
+ * 200k model — the CLI would then CLAIM 1M for a model that has 200k.
49
+ * - `maxOutputTokens` is the catalog DEFAULT, not the upper bound: it is the
50
+ * number Claude Code reserves from (capped at 20k) when it computes the
51
+ * compaction point, which is all Verse uses it for.
52
+ * - `minCliVersion` is set only where a binary genuinely lacks the id.
53
+ * `claude-opus-5-5` is absent from 2.1.257 (0 occurrences) and present in
54
+ * 2.1.280, and the served catalog cache says `min_claude_code_version:
55
+ * "2.1.280"`. An older binary does not reject it — its id normaliser falls
56
+ * back to `includes('claude-opus-5')` and silently runs Opus 5 — which is
57
+ * why a too-old seat lists it as UNAVAILABLE instead of offering it.
58
+ *
59
+ * The dotted `claude-opus-5.5` Verse once shipped is an ALIAS (context-math
60
+ * `VERSE_MODEL_ID_ALIASES`): on every binary it resolves to Opus 5. It is
61
+ * never offered; old records keep it and adapters send the canonical id.
62
+ *
63
+ * `claude-mythos-5` / `-5-1` are in the catalog too but are deliberately not
64
+ * offered: whether a subscription seat may use them is unverified, and a
65
+ * picker entry is a promise.
66
+ */
67
+ export declare const VERSE_CLAUDE_MODEL_SPECS: readonly {
68
+ id: string;
69
+ label: string;
70
+ contextWindow: number;
71
+ maxOutputTokens: number | null;
72
+ minCliVersion: string | null;
73
+ native1m: boolean;
74
+ }[];
75
+ type ClaudeModelSpec = (typeof VERSE_CLAUDE_MODEL_SPECS)[number];
76
+ /**
77
+ * The spec for a model id, after alias canonicalisation — so an old session
78
+ * stored as `claude-opus-5.5` finds Opus 5.5's budget. A trailing `[1m]`
79
+ * (which the CLI strips from native-1M ids anyway) is tolerated. Null for an
80
+ * id this table does not know: the caller falls back to the seat, then to
81
+ * `VERSE_DEFAULT_CONTEXT_WINDOWS.claude` — never to a guess.
82
+ */
83
+ export declare function claudeSpecFor(modelId: string): ClaudeModelSpec | null;
84
+ /**
85
+ * The Claude model list for a seat pinned to `cliVersion`.
86
+ *
87
+ * `cliVersion === null` means UNKNOWN, and unknown is not "too old": no model
88
+ * is marked unavailable on a guess (the seat carries a note instead). Order is
89
+ * the table's; callers put runnable models first.
90
+ */
91
+ export declare function claudeModelOptions(cliVersion: string | null): VerseModelOption[];
92
+ /** Specs a binary of `cliVersion` is too old for (empty when the version is unknown). */
93
+ export declare function claudeModelsNeedingNewerCli(cliVersion: string | null): ClaudeModelSpec[];
94
+ /** Labels for a note: "Opus 5.5", "Opus 5.5 and Fable 6", "A, B and C". */
95
+ export declare function joinClaudeLabels(specs: readonly ClaudeModelSpec[]): string;
96
+ /**
97
+ * Compare two CLI versions: negative when `a` is older, 0 when equal, positive
98
+ * when newer. Numeric per segment (2.1.280 > 2.1.257 > 2.1.99), and a
99
+ * pre-release sorts before its release (0.155.0-alpha.9 < 0.155.0). Strings
100
+ * with no `x.y.z` in them compare equal to each other and older than any real
101
+ * version — an unparseable version is never allowed to unlock a model.
102
+ */
103
+ export declare function compareCliVersions(a: string, b: string): number;
104
+ /**
105
+ * The version of the CLI a native profile is pinned to, from the executable
106
+ * path its launcher execs. Never runs the binary (that would be a process
107
+ * spawn on the discovery path, and some CLIs phone home on `--version`).
108
+ *
109
+ * - Claude Code installs each version as a file NAMED by it:
110
+ * `~/.local/share/claude/versions/2.1.257` → `2.1.257`.
111
+ * - Grok's downloads embed it: `grok-0.2.118-macos-aarch64` → `0.2.118`.
112
+ * - The npm codex wrapper is `…/@openai/codex/bin/codex.js`; its version is
113
+ * the package's own `package.json`, read with a size cap.
114
+ *
115
+ * Anything else (e.g. the codex binary inside ChatGPT.app) is null: unknown,
116
+ * which is reported as unknown rather than guessed from a neighbour.
117
+ */
118
+ export declare function cliVersionFromExecutable(executablePath: string): string | null;
119
+ /** Where Claude Code's installer keeps one file per installed version. */
120
+ export declare function defaultClaudeVersionsRoot(home?: string): string;
121
+ /**
122
+ * The newest Claude Code version installed on this machine, or null. Only
123
+ * regular files named exactly `x.y.z` count — the installer's lock and
124
+ * partial-download files are skipped.
125
+ */
126
+ export declare function newestInstalledClaudeVersion(root?: string): string | null;
127
+ /** Every catalog read is capped here — codex's is ~350 KB today. */
128
+ export declare const VERSE_CATALOG_MAX_BYTES: number;
129
+ /** Test seam: forget every cached catalog read. */
130
+ export declare function resetModelWindowCaches(): void;
131
+ /** One row of a codex `models_cache.json`, reduced to what budgets need. */
132
+ export interface CodexCatalogEntry {
133
+ slug: string;
134
+ displayName: string | null;
135
+ /** `list`, `hide`, … — `hide` rows are never offered. */
136
+ visibility: string | null;
137
+ /** RAW window the model is configured with by default (272_000). */
138
+ contextWindow: number;
139
+ /** Largest window `model_context_window` may be raised to (872_000); null when absent. */
140
+ maxContextWindow: number | null;
141
+ /** Share of the raw window the CLI measures against (95); null → the documented default. */
142
+ effectiveContextWindowPercent: number | null;
143
+ /** Explicit auto-compaction limit from the catalog; null → 90% of the raw window. */
144
+ autoCompactTokenLimit: number | null;
145
+ priority: number | null;
146
+ }
147
+ /**
148
+ * The seat's own codex catalog, or null when it has none yet (a seat that has
149
+ * never run a turn has not fetched one) or it is unreadable. `nativeStatePath`
150
+ * is the seat profile's `CODEX_HOME` — NEVER the unpinned `~/.codex`, whose
151
+ * catalog belongs to a different account and binary.
152
+ */
153
+ export declare function readCodexCatalog(nativeStatePath: string): CodexCatalogEntry[] | null;
154
+ /**
155
+ * A codex seat's model list: every VISIBLE slug in its own catalog, in the
156
+ * provider's priority order, or the documented list (`windowSource:
157
+ * 'documented'`) when the seat has not fetched a catalog yet.
158
+ */
159
+ export declare function codexModelOptions(catalog: CodexCatalogEntry[] | null): VerseModelOption[];
160
+ /** One grok catalog row, lifted out of `.models[id].info` and nothing else. */
161
+ export interface GrokCatalogEntry {
162
+ id: string;
163
+ name: string | null;
164
+ contextWindow: number | null;
165
+ autoCompactThresholdPercent: number | null;
166
+ maxCompletionTokens: number | null;
167
+ hidden: boolean;
168
+ supportedInApi: boolean;
169
+ }
170
+ /**
171
+ * The seat's own grok catalog (`<GROK_HOME>/models_cache.json`), or null. The
172
+ * unpinned `~/.grok` cache is stale on this machine (fetched weeks earlier,
173
+ * two models) and is never consulted.
174
+ */
175
+ export declare function readGrokCatalog(nativeStatePath: string): GrokCatalogEntry[] | null;
176
+ /**
177
+ * A grok seat's model list: every entry that is not hidden and not flagged
178
+ * unsupported, in the catalog's own order (JSON object order is preserved and
179
+ * is the CLI's), or the documented list when the seat has no catalog. Grok has
180
+ * no expansive mode: its CLI cannot be told a larger budget per invocation.
181
+ */
182
+ export declare function grokModelOptions(catalog: GrokCatalogEntry[] | null): VerseModelOption[];
183
+ /**
184
+ * A local (Ollama / llama-server) model option. Local turns run the Claude
185
+ * Code binary with `CLAUDE_CODE_MAX_CONTEXT_TOKENS=<window>`, so they compact
186
+ * by the Claude formula over the window Verse resolved; max output is unknown
187
+ * for a non-Claude id, which the formula treats as the 20k reserve cap. No
188
+ * expansive mode: the window IS the runtime's allocation.
189
+ */
190
+ export declare function localModelOption(tag: string, label: string, window: number, source: VerseWindowSource): VerseModelOption;
191
+ /**
192
+ * The option whose budgets govern a session, given the option its PINNED
193
+ * launch snapshot lists (`snapshot`, null when the snapshot no longer lists
194
+ * the model).
195
+ *
196
+ * Normally the snapshot's own option. The exception is a snapshot written
197
+ * before 3.9: its options carry one flat window and no budgets (claude: the
198
+ * CLI's 200k fallback for every model; codex: the RAW 272k window, which the
199
+ * CLI measures against 95% of; grok: the 500k default), so it can state
200
+ * neither a compaction point nor an expansive budget. For those, the model's
201
+ * DOCUMENTED option from this module supplies the budgets — the same builders
202
+ * the live seat lists are made from, so the web UI (which reads the live seat)
203
+ * and the engine and adapters (which read the snapshot) can never disagree
204
+ * about whether a mode exists or what it costs. The snapshot keeps its identity
205
+ * (id, label); only budgets are borrowed.
206
+ *
207
+ * ONE helper, used by the engine (`effectiveModelOption`) and by every adapter
208
+ * that turns a budget into CLI flags (claude `--autocompact`, codex
209
+ * `-c model_context_window`), because two copies of this rule would drift and
210
+ * the flag the CLI is given must be the budget the meter shows.
211
+ *
212
+ * A model this module does not know keeps its snapshot option (and, lacking an
213
+ * expansive budget, gets no expansive mode — absent, never faked). Local is
214
+ * never substituted.
215
+ */
216
+ export declare function legacyModelOptionFallback(engine: VerseEngine, model: string, snapshot: VerseModelOption | null): VerseModelOption | null;
217
+ export {};