github-router 0.3.306 → 0.3.308

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 (102) hide show
  1. package/dist/{attribution-settings-C5ScaOmz.js → attribution-settings-C_ZLSCQ4.js} +60 -61
  2. package/dist/attribution-settings-C_ZLSCQ4.js.map +1 -0
  3. package/dist/{auth-D9kUMR37.js → auth-O_UG1ABO.js} +3 -3
  4. package/dist/{auth-D9kUMR37.js.map → auth-O_UG1ABO.js.map} +1 -1
  5. package/dist/browser-ext/manifest.json +1 -1
  6. package/dist/{check-usage-C7MfBexN.js → check-usage-dicJOWML.js} +4 -4
  7. package/dist/{check-usage-C7MfBexN.js.map → check-usage-dicJOWML.js.map} +1 -1
  8. package/dist/{claude-CsGXL12X.js → claude-CyiXTFxe.js} +33 -30
  9. package/dist/claude-CyiXTFxe.js.map +1 -0
  10. package/dist/{codex-DpwyLLTp.js → codex-BV4Tvt0q.js} +5 -5
  11. package/dist/{codex-DpwyLLTp.js.map → codex-BV4Tvt0q.js.map} +1 -1
  12. package/dist/{debug-CDu4RIgW.js → debug-2PgImRnr.js} +2 -2
  13. package/dist/{debug-CDu4RIgW.js.map → debug-2PgImRnr.js.map} +1 -1
  14. package/dist/engine-Cv4SNuzn.js +2 -0
  15. package/dist/{fast-profile-contract-OuZQaGif.js → fast-profile-contract-BWCJy6iL.js} +6 -4
  16. package/dist/fast-profile-contract-BWCJy6iL.js.map +1 -0
  17. package/dist/{gate-discovery-BVLZH7-6.js → gate-discovery-CLV0ft3G.js} +5 -5
  18. package/dist/{gate-discovery-BVLZH7-6.js.map → gate-discovery-CLV0ft3G.js.map} +1 -1
  19. package/dist/{get-copilot-usage-CNMvWsMD.js → get-copilot-usage-Cjy8TiFf.js} +2 -2
  20. package/dist/{get-copilot-usage-CNMvWsMD.js.map → get-copilot-usage-Cjy8TiFf.js.map} +1 -1
  21. package/dist/hooks.mjs +28 -12
  22. package/dist/hooks.sha256 +1 -1
  23. package/dist/{internal-artifact-open-wYwuChib.js → internal-artifact-open-CxeIfsW_.js} +2 -2
  24. package/dist/{internal-artifact-open-wYwuChib.js.map → internal-artifact-open-CxeIfsW_.js.map} +1 -1
  25. package/dist/{internal-fast-dispatch-guard-CXs4ympz.js → internal-fast-dispatch-guard-CrsZI0pO.js} +1 -1
  26. package/dist/{internal-fast-dispatch-guard-u3vxgazZ.js → internal-fast-dispatch-guard-kzSKB0yV.js} +3 -3
  27. package/dist/{internal-fast-dispatch-guard-u3vxgazZ.js.map → internal-fast-dispatch-guard-kzSKB0yV.js.map} +1 -1
  28. package/dist/{internal-first-mate-guard-C8GG8i5H.js → internal-first-mate-guard-BuweUgjb.js} +3 -3
  29. package/dist/{internal-first-mate-guard-C8GG8i5H.js.map → internal-first-mate-guard-BuweUgjb.js.map} +1 -1
  30. package/dist/{internal-first-mate-guard-BGaGGIBS.js → internal-first-mate-guard-Nf1H0mCK.js} +1 -1
  31. package/dist/{internal-max-dispatch-guard-B-n687ho.js → internal-max-dispatch-guard-DF-f8VwE.js} +1 -1
  32. package/dist/{internal-max-dispatch-guard-Cw_9Qx-9.js → internal-max-dispatch-guard-lS4usOV5.js} +12 -5
  33. package/dist/internal-max-dispatch-guard-lS4usOV5.js.map +1 -0
  34. package/dist/{internal-plan-review-DCbxSIUR.js → internal-plan-review-DLduDz41.js} +3 -3
  35. package/dist/{internal-plan-review-DCbxSIUR.js.map → internal-plan-review-DLduDz41.js.map} +1 -1
  36. package/dist/{internal-prompt-submit-DIn8b_Zt.js → internal-prompt-submit-DG94f8E-.js} +4 -4
  37. package/dist/{internal-prompt-submit-DIn8b_Zt.js.map → internal-prompt-submit-DG94f8E-.js.map} +1 -1
  38. package/dist/{internal-session-bind-DXosxciQ.js → internal-session-bind-D6Hpl-84.js} +2 -2
  39. package/dist/{internal-session-bind-DXosxciQ.js.map → internal-session-bind-D6Hpl-84.js.map} +1 -1
  40. package/dist/{internal-stop-hook-C2lMgQuU.js → internal-stop-hook-B8Z1k6xC.js} +5 -5
  41. package/dist/{internal-stop-hook-C2lMgQuU.js.map → internal-stop-hook-B8Z1k6xC.js.map} +1 -1
  42. package/dist/{internal-stop-review-CnYqJTiC.js → internal-stop-review-DlKzZgFm.js} +2 -2
  43. package/dist/{internal-stop-review-CnYqJTiC.js.map → internal-stop-review-DlKzZgFm.js.map} +1 -1
  44. package/dist/{internal-worker-guard-DdwLtAMn.js → internal-worker-guard-D7sfByyo.js} +2 -2
  45. package/dist/{internal-worker-guard-DdwLtAMn.js.map → internal-worker-guard-D7sfByyo.js.map} +1 -1
  46. package/dist/{internal-workspace-header-B4qymRDb.js → internal-workspace-header-CU5OjLCB.js} +2 -2
  47. package/dist/{internal-workspace-header-B4qymRDb.js.map → internal-workspace-header-CU5OjLCB.js.map} +1 -1
  48. package/dist/lifecycle-B0USSJvd.js +2 -0
  49. package/dist/{lifecycle-DOvQozrm.js → lifecycle-BCnarXJV.js} +2 -2
  50. package/dist/{lifecycle-DOvQozrm.js.map → lifecycle-BCnarXJV.js.map} +1 -1
  51. package/dist/lifecycle-CQFjaQc0.js +2 -0
  52. package/dist/{lifecycle-CSHU91pP.js → lifecycle-CtRA3Y7p.js} +2 -2
  53. package/dist/{lifecycle-CSHU91pP.js.map → lifecycle-CtRA3Y7p.js.map} +1 -1
  54. package/dist/main.js +19 -19
  55. package/dist/max-profile-contract-v2Q6eN5w.js +355 -0
  56. package/dist/max-profile-contract-v2Q6eN5w.js.map +1 -0
  57. package/dist/{mcp-workspace-header-Cv4QWFVV.js → mcp-workspace-header-B60WSR1Y.js} +2 -2
  58. package/dist/{mcp-workspace-header-Cv4QWFVV.js.map → mcp-workspace-header-B60WSR1Y.js.map} +1 -1
  59. package/dist/{models-BDhlItXr.js → models-COuMOfM6.js} +3 -3
  60. package/dist/{models-BDhlItXr.js.map → models-COuMOfM6.js.map} +1 -1
  61. package/dist/{orchestration-C2Q_Qynl.js → orchestration-DjLA-lxB.js} +2 -2
  62. package/dist/{orchestration-C2Q_Qynl.js.map → orchestration-DjLA-lxB.js.map} +1 -1
  63. package/dist/{paths-D6SI5bmY.js → paths-De1Qh9Q9.js} +4 -4
  64. package/dist/{paths-D6SI5bmY.js.map → paths-De1Qh9Q9.js.map} +1 -1
  65. package/dist/paths-DyX6SEnd.js +2 -0
  66. package/dist/{peer-mcp-personas-DXOdPbev.js → peer-mcp-personas-DAd076hn.js} +112 -352
  67. package/dist/peer-mcp-personas-DAd076hn.js.map +1 -0
  68. package/dist/{plan-review-hook-CnRRttwl.js → plan-review-hook-vL6BYmA8.js} +3 -3
  69. package/dist/{plan-review-hook-CnRRttwl.js.map → plan-review-hook-vL6BYmA8.js.map} +1 -1
  70. package/dist/{prompt-submit-hook-G84QAm_F.js → prompt-submit-hook-DfqufWC1.js} +3 -3
  71. package/dist/{prompt-submit-hook-G84QAm_F.js.map → prompt-submit-hook-DfqufWC1.js.map} +1 -1
  72. package/dist/{provision-CfB_DkuL.js → provision-Xcr-fJii.js} +4 -4
  73. package/dist/{provision-CfB_DkuL.js.map → provision-Xcr-fJii.js.map} +1 -1
  74. package/dist/{self-invocation-Da5gSWen.js → self-invocation-B84JCHps.js} +2 -2
  75. package/dist/{self-invocation-Da5gSWen.js.map → self-invocation-B84JCHps.js.map} +1 -1
  76. package/dist/{serve-Bfw7xEkR.js → serve-8tqMuzVi.js} +12 -12
  77. package/dist/{serve-Bfw7xEkR.js.map → serve-8tqMuzVi.js.map} +1 -1
  78. package/dist/{server-setup-Cbuq2-Bi.js → server-setup-C7jSESEI.js} +301 -11
  79. package/dist/server-setup-C7jSESEI.js.map +1 -0
  80. package/dist/{start-CLSlFGUF.js → start-CaTinp_s.js} +3 -3
  81. package/dist/{start-CLSlFGUF.js.map → start-CaTinp_s.js.map} +1 -1
  82. package/dist/{stop-gate-hook-rjDyq1lk.js → stop-gate-hook-BEU8qQrC.js} +3 -3
  83. package/dist/{stop-gate-hook-rjDyq1lk.js.map → stop-gate-hook-BEU8qQrC.js.map} +1 -1
  84. package/dist/{stop-gate-policy-m3dvbV10.js → stop-gate-policy-qzqXfRxE.js} +2 -2
  85. package/dist/{stop-gate-policy-m3dvbV10.js.map → stop-gate-policy-qzqXfRxE.js.map} +1 -1
  86. package/dist/{token-DnTZlcc6.js → token-CCg-Ov5q.js} +2 -2
  87. package/dist/{token-DnTZlcc6.js.map → token-CCg-Ov5q.js.map} +1 -1
  88. package/dist/{worker-dispatch-CQ2y0aBP.js → worker-dispatch-CH-NN5FW.js} +2 -2
  89. package/dist/{worker-dispatch-CQ2y0aBP.js.map → worker-dispatch-CH-NN5FW.js.map} +1 -1
  90. package/package.json +1 -1
  91. package/dist/attribution-settings-C5ScaOmz.js.map +0 -1
  92. package/dist/claude-CsGXL12X.js.map +0 -1
  93. package/dist/engine-j34DK_PM.js +0 -2
  94. package/dist/fast-profile-contract-OuZQaGif.js.map +0 -1
  95. package/dist/internal-max-dispatch-guard-Cw_9Qx-9.js.map +0 -1
  96. package/dist/lifecycle-B4DDf-Me.js +0 -2
  97. package/dist/lifecycle-D0BpTV9A.js +0 -2
  98. package/dist/max-profile-contract-CiD5wyET.js +0 -276
  99. package/dist/max-profile-contract-CiD5wyET.js.map +0 -1
  100. package/dist/paths-Bmj5b7PS.js +0 -2
  101. package/dist/peer-mcp-personas-DXOdPbev.js.map +0 -1
  102. package/dist/server-setup-Cbuq2-Bi.js.map +0 -1
@@ -1,276 +0,0 @@
1
- import { t as state } from "./state-B8adscCv.js";
2
- //#region src/lib/model-suffix.ts
3
- /** Strip every trailing `[1m]` marker, case-insensitively. */
4
- function stripTrailingOneMSuffix(id) {
5
- const match = id.match(/(?:\[1m\])+$/i);
6
- if (!match || match.index === void 0) return {
7
- base: id,
8
- hadSuffix: false
9
- };
10
- return {
11
- base: id.slice(0, match.index),
12
- hadSuffix: true
13
- };
14
- }
15
- /** Reapply at most one canonical `[1m]` marker when the input had one. */
16
- function normalizeTrailingOneMSuffix(id) {
17
- const { base, hadSuffix } = stripTrailingOneMSuffix(id);
18
- return hadSuffix ? `${base}[1m]` : base;
19
- }
20
- //#endregion
21
- //#region src/lib/fast-endpoint.ts
22
- const ENDPOINTS = {
23
- chat: /* @__PURE__ */ new Set(["/chat/completions", "/v1/chat/completions"]),
24
- responses: /* @__PURE__ */ new Set(["/responses", "/v1/responses"]),
25
- messages: /* @__PURE__ */ new Set(["/messages", "/v1/messages"])
26
- };
27
- /**
28
- * Return the endpoint mandated by a fast-profile roster model.
29
- *
30
- * This is intentionally independent of the standard `pickEndpoint`: that
31
- * resolver prefers chat when a catalog entry advertises both clients, while
32
- * fast roles have a fixed provider contract. Gemini stays on chat; Luna, Sol,
33
- * and Grok stay on Responses; the Opus Oracle stays on native Messages.
34
- * Unknown ids return undefined so a fast caller cannot guess a transport.
35
- */
36
- function fastEndpointRequirement(modelId) {
37
- const id = modelId.replace(/(?:\[1m\])+$/i, "");
38
- if (id === "gemini-3.8-flash") return "chat";
39
- if (id === "gpt-5.6-luna" || id === "gpt-5.6-sol" || id === "grok-4.6") return "responses";
40
- if (id === "claude-opus-5") return "messages";
41
- }
42
- /**
43
- * Resolve the fixed fast transport only when the catalog explicitly advertises
44
- * the required endpoint. An entry that advertises both still resolves to the
45
- * policy endpoint, regardless of advertisement order.
46
- */
47
- function fastEndpointForModel(model) {
48
- const required = fastEndpointRequirement(model.id);
49
- if (!required) return void 0;
50
- const advertised = model.supported_endpoints;
51
- if (!Array.isArray(advertised) || advertised.length === 0) return void 0;
52
- return advertised.some((endpoint) => ENDPOINTS[required].has(endpoint)) ? required : void 0;
53
- }
54
- /** Resolve a fast endpoint from a catalog id, without selecting a fallback. */
55
- function fastEndpointForCatalogId(modelId, catalog) {
56
- const found = catalog?.find((model) => model.id === modelId);
57
- return found ? fastEndpointForModel(found) : void 0;
58
- }
59
- const ONE_M_TOKENS = 1e6;
60
- function catalogModels() {
61
- return state.models?.data ?? [];
62
- }
63
- function catalogModel(id) {
64
- return catalogModels().find((model) => model.id === id);
65
- }
66
- const MAX_PROFILE_MODELS = Object.freeze({
67
- sol: "gpt-5.6-sol",
68
- luna: "gpt-5.6-luna",
69
- gemini: "gemini-3.8-flash",
70
- grok: "grok-4.6",
71
- opus: "claude-opus-5"
72
- });
73
- const MAX_PROFILE_NATIVE_AGENT_NAMES = [
74
- "Explore",
75
- "Plan",
76
- "general-purpose",
77
- "implementer",
78
- "reviewer",
79
- "brainstorm",
80
- "peer-review-coordinator"
81
- ];
82
- const MAX_PROFILE_NATIVE_EFFORTS = Object.freeze({
83
- Explore: "high",
84
- Plan: "high",
85
- "general-purpose": "max",
86
- implementer: "high",
87
- reviewer: "high",
88
- brainstorm: "medium",
89
- "peer-review-coordinator": "max"
90
- });
91
- /** Default model family behind each native role's frontmatter. The optional
92
- * Grok brainstorm path may fall back to Gemini, whose allowed effort ladder is
93
- * identical for the values accepted by the max dispatch guard. */
94
- const MAX_PROFILE_NATIVE_MODELS = Object.freeze({
95
- Explore: MAX_PROFILE_MODELS.luna,
96
- Plan: MAX_PROFILE_MODELS.sol,
97
- "general-purpose": MAX_PROFILE_MODELS.luna,
98
- implementer: MAX_PROFILE_MODELS.gemini,
99
- reviewer: MAX_PROFILE_MODELS.grok,
100
- brainstorm: MAX_PROFILE_MODELS.grok,
101
- "peer-review-coordinator": MAX_PROFILE_MODELS.luna
102
- });
103
- const MAX_PROFILE_LEAD_MODEL = MAX_PROFILE_MODELS.sol;
104
- MAX_PROFILE_MODELS.opus;
105
- const MAX_PROFILE_ADVISOR_EFFORT = "high";
106
- const MAX_PROFILE_ADVISOR_INSTRUCTIONS = `# Advisor Tool
107
-
108
- You have access to an optional, lead-only, transcript-aware Max Advisor. It offers a focused second opinion; it is not a supervisor, approver, workflow gate, or substitute for your own reasoning. You keep decision ownership.
109
-
110
- Use it only when a consequential uncertainty remains after direct investigation and cannot be settled by repository evidence, a focused command or test, Plan, reviewer, or a fresh-context peer: conflicting evidence, a materially changed assumption, a genuinely non-converging approach, or a hard-to-reverse trade-off. State the precise unresolved question immediately before calling it.
111
-
112
- Do not call it automatically before substantive work or completion, for routine progress, while waiting, after ordinary tool output, for directly verifiable facts, planner approval, reviewer verification, or as reassurance for a decision the evidence already supports.
113
-
114
- Treat the result as advice, not authority. Weigh it against the user's intent and verified evidence. Consult again only when materially new evidence creates a different question or directly conflicts with the earlier advice.`;
115
- function maxAdvisorModelFromPin(pinned, opusModel) {
116
- const trimmed = pinned?.trim();
117
- const base = trimmed ? stripTrailingOneMSuffix(trimmed).base : void 0;
118
- if (base === MAX_PROFILE_MODELS.sol || base === MAX_PROFILE_MODELS.opus) return base;
119
- return opusModel ?? MAX_PROFILE_MODELS.opus;
120
- }
121
- function maxAdvisorPinIsValid(pinned) {
122
- const trimmed = pinned?.trim();
123
- const base = trimmed ? stripTrailingOneMSuffix(trimmed).base : trimmed;
124
- return base === void 0 || base === "" || base === MAX_PROFILE_MODELS.sol || base === MAX_PROFILE_MODELS.opus;
125
- }
126
- function maxAdvisorEffortForModel(_model) {
127
- return MAX_PROFILE_ADVISOR_EFFORT;
128
- }
129
- Object.freeze([
130
- MAX_PROFILE_MODELS.luna,
131
- MAX_PROFILE_MODELS.gemini,
132
- MAX_PROFILE_MODELS.grok
133
- ]);
134
- const MAX_PROFILE_ALLOWED_LEAD_MODEL_IDS = Object.freeze([
135
- MAX_PROFILE_MODELS.sol,
136
- MAX_PROFILE_MODELS.luna,
137
- MAX_PROFILE_MODELS.gemini,
138
- MAX_PROFILE_MODELS.opus
139
- ]);
140
- function findModel(catalog, id) {
141
- return catalog?.data?.find((model) => model.id === id);
142
- }
143
- function hasToolCalls(model) {
144
- return model?.capabilities?.supports?.tool_calls === true;
145
- }
146
- function hasContextAtLeast(model, tokens) {
147
- return (model?.capabilities?.limits?.max_context_window_tokens ?? 0) >= tokens;
148
- }
149
- function supportsEffort(model, effort) {
150
- const ladder = model?.capabilities?.supports?.reasoning_effort;
151
- return Array.isArray(ladder) && ladder.includes(effort);
152
- }
153
- function hasUsableLimits(model) {
154
- const limits = model?.capabilities?.limits;
155
- const prompt = limits?.max_prompt_tokens;
156
- const output = limits?.max_output_tokens;
157
- return typeof prompt === "number" && Number.isFinite(prompt) && prompt > 0 && typeof output === "number" && Number.isFinite(output) && output > 0 && (limits?.max_context_window_tokens ?? 0) >= prompt;
158
- }
159
- function supportsEndpoint(model, endpoint) {
160
- return model !== void 0 && fastEndpointForModel(model) === endpoint;
161
- }
162
- function validateRequiredModel(model, id, requirements, missing) {
163
- if (!model) {
164
- missing.push(`${id}: absent from the live catalog`);
165
- return;
166
- }
167
- for (const [message, ok] of requirements) if (!ok) missing.push(`${id}: ${message}`);
168
- }
169
- function usableGemini(model) {
170
- return Boolean(model && hasToolCalls(model) && hasContextAtLeast(model, ONE_M_TOKENS) && supportsEffort(model, "high") && supportsEndpoint(model, "chat") && hasUsableLimits(model));
171
- }
172
- function usableGrok(model) {
173
- return Boolean(model && hasToolCalls(model) && supportsEffort(model, "medium") && supportsEndpoint(model, "responses") && hasUsableLimits(model));
174
- }
175
- function usableGrokReviewer(model) {
176
- return Boolean(usableGrok(model) && supportsEffort(model, "high") && (model?.capabilities?.limits?.max_prompt_tokens ?? 0) >= 2e5);
177
- }
178
- /**
179
- * Validate the fixed prerequisites for the raw `-m max` launch.
180
- *
181
- * Max is a deliberately strong, closed profile. Its lead, planning, reviewer,
182
- * and transcript-aware Advisor paths must all be present before any runtime
183
- * artifact is written: Sol, Luna, Gemini 3.8 Flash, and Opus 5 are mandatory.
184
- * Grok 4.6 is the only optional model. When present it supplies the preferred
185
- * medium-effort brainstorm/critic path, but it is never a max lead and its
186
- * sub-1M context must remain undecorated.
187
- */
188
- function validateMaxProfilePrerequisites(catalog) {
189
- const missing = [];
190
- const sol = findModel(catalog, MAX_PROFILE_MODELS.sol);
191
- const luna = findModel(catalog, MAX_PROFILE_MODELS.luna);
192
- const gemini = findModel(catalog, MAX_PROFILE_MODELS.gemini);
193
- const grok = findModel(catalog, MAX_PROFILE_MODELS.grok);
194
- const opus = findModel(catalog, MAX_PROFILE_MODELS.opus);
195
- validateRequiredModel(sol, MAX_PROFILE_MODELS.sol, [
196
- ["does not advertise tool_calls", hasToolCalls(sol)],
197
- ["advertised context window is below 1M", hasContextAtLeast(sol, ONE_M_TOKENS)],
198
- ["does not advertise a high reasoning effort", supportsEffort(sol, "high")],
199
- ["does not advertise a supported Responses endpoint", supportsEndpoint(sol, "responses")],
200
- ["has no usable max_prompt_tokens/max_output_tokens limits", hasUsableLimits(sol)]
201
- ], missing);
202
- validateRequiredModel(luna, MAX_PROFILE_MODELS.luna, [
203
- ["does not advertise tool_calls", hasToolCalls(luna)],
204
- ["advertised context window is below 1M", hasContextAtLeast(luna, ONE_M_TOKENS)],
205
- ["does not advertise a high reasoning effort", supportsEffort(luna, "high")],
206
- ["does not advertise a max reasoning effort", supportsEffort(luna, "max")],
207
- ["does not advertise a supported Responses endpoint", supportsEndpoint(luna, "responses")],
208
- ["has no usable max_prompt_tokens/max_output_tokens limits", hasUsableLimits(luna)]
209
- ], missing);
210
- validateRequiredModel(gemini, MAX_PROFILE_MODELS.gemini, [
211
- ["does not advertise tool_calls", hasToolCalls(gemini)],
212
- ["advertised context window is below 1M", hasContextAtLeast(gemini, ONE_M_TOKENS)],
213
- ["does not advertise a high reasoning effort", supportsEffort(gemini, "high")],
214
- ["does not advertise a supported Chat Completions endpoint", supportsEndpoint(gemini, "chat")],
215
- ["has no usable max_prompt_tokens/max_output_tokens limits", hasUsableLimits(gemini)]
216
- ], missing);
217
- validateRequiredModel(opus, MAX_PROFILE_MODELS.opus, [
218
- ["advertised context window is below 1M", hasContextAtLeast(opus, ONE_M_TOKENS)],
219
- ["does not advertise adaptive_thinking", opus?.capabilities?.supports?.adaptive_thinking === true],
220
- ["does not advertise a high reasoning effort", supportsEffort(opus, "high")],
221
- ["does not advertise a supported Messages endpoint", supportsEndpoint(opus, "messages")],
222
- ["has no usable max_prompt_tokens/max_output_tokens limits", hasUsableLimits(opus)]
223
- ], missing);
224
- const geminiUsable = usableGemini(gemini);
225
- const grokUsable = usableGrok(grok);
226
- return {
227
- ok: missing.length === 0,
228
- missing,
229
- models: {
230
- sol: sol && !missing.some((entry) => entry.startsWith(`${MAX_PROFILE_MODELS.sol}:`)) ? sol : void 0,
231
- luna: luna && !missing.some((entry) => entry.startsWith(`${MAX_PROFILE_MODELS.luna}:`)) ? luna : void 0,
232
- gemini: geminiUsable ? gemini : void 0,
233
- grok: grokUsable ? grok : void 0,
234
- opus: opus && !missing.some((entry) => entry.startsWith(`${MAX_PROFILE_MODELS.opus}:`)) ? opus : void 0,
235
- thirdLab: grokUsable && supportsEffort(grok, "high") ? "grok" : geminiUsable ? "gemini" : void 0
236
- }
237
- };
238
- }
239
- function formatMaxPrerequisiteFailure(missing) {
240
- return "github-router claude -m max requires the following live-catalog capabilities, which this account's catalog does not fully provide:\n" + missing.map((entry) => ` - ${entry}`).join("\n") + "\n\nMax launches do not fall back to arbitrary older models. Use plain `github-router claude` for the standard profile.";
241
- }
242
- function maxGeminiModel() {
243
- const model = catalogModel(MAX_PROFILE_MODELS.gemini);
244
- return model && usableGemini(model) ? model.id : void 0;
245
- }
246
- function maxGrokModel() {
247
- const model = catalogModel(MAX_PROFILE_MODELS.grok);
248
- return model && usableGrok(model) ? model.id : void 0;
249
- }
250
- /** Grok replacement for max-profile surfaces that require high effort. */
251
- function maxGrokHighModel() {
252
- const model = catalogModel(MAX_PROFILE_MODELS.grok);
253
- return model && usableGrokReviewer(model) ? model.id : void 0;
254
- }
255
- /** Max-only replacement for any standard Gemini Pro assignment. */
256
- function maxProReplacementModel() {
257
- if (maxGrokHighModel()) return MAX_PROFILE_MODELS.grok;
258
- if (maxGeminiModel()) return MAX_PROFILE_MODELS.gemini;
259
- }
260
- function maxOpusModel() {
261
- const model = catalogModel(MAX_PROFILE_MODELS.opus);
262
- return model && hasContextAtLeast(model, ONE_M_TOKENS) && model.capabilities?.supports?.adaptive_thinking === true && supportsEffort(model, "high") && supportsEndpoint(model, "messages") && hasUsableLimits(model) ? model.id : void 0;
263
- }
264
- function maxLunaMaxModel() {
265
- const model = catalogModel(MAX_PROFILE_MODELS.luna);
266
- return model && hasToolCalls(model) && hasContextAtLeast(model, ONE_M_TOKENS) && supportsEffort(model, "max") && supportsEndpoint(model, "responses") && hasUsableLimits(model) ? model.id : void 0;
267
- }
268
- function maxReviewerModel() {
269
- const grok = maxGrokHighModel();
270
- if (grok) return grok;
271
- return maxLunaMaxModel();
272
- }
273
- //#endregion
274
- export { validateMaxProfilePrerequisites as _, MAX_PROFILE_NATIVE_AGENT_NAMES as a, normalizeTrailingOneMSuffix as b, formatMaxPrerequisiteFailure as c, maxAdvisorPinIsValid as d, maxGeminiModel as f, maxReviewerModel as g, maxProReplacementModel as h, MAX_PROFILE_MODELS as i, maxAdvisorEffortForModel as l, maxOpusModel as m, MAX_PROFILE_ALLOWED_LEAD_MODEL_IDS as n, MAX_PROFILE_NATIVE_EFFORTS as o, maxGrokModel as p, MAX_PROFILE_LEAD_MODEL as r, MAX_PROFILE_NATIVE_MODELS as s, MAX_PROFILE_ADVISOR_INSTRUCTIONS as t, maxAdvisorModelFromPin as u, fastEndpointForCatalogId as v, stripTrailingOneMSuffix as x, fastEndpointForModel as y };
275
-
276
- //# sourceMappingURL=max-profile-contract-CiD5wyET.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"max-profile-contract-CiD5wyET.js","names":[],"sources":["../src/lib/model-suffix.ts","../src/lib/fast-endpoint.ts","../src/lib/max-profile-contract.ts"],"sourcesContent":["/**\n * Normalize Claude Code's local 1M-context decoration at model boundaries.\n *\n * `[1m]` is a client-side accounting marker, not part of a Copilot catalog id.\n * Claude Code can append its own marker to a picker value that is already\n * decorated by the router, producing a reachable doubled suffix. Keep the\n * helper dependency-free so launch/profile code and request preprocessing use\n * exactly the same trailing-suffix rule without an import cycle.\n */\nexport interface TrailingOneMSuffix {\n base: string\n hadSuffix: boolean\n}\n\n/** Strip every trailing `[1m]` marker, case-insensitively. */\nexport function stripTrailingOneMSuffix(id: string): TrailingOneMSuffix {\n const match = id.match(/(?:\\[1m\\])+$/i)\n if (!match || match.index === undefined) {\n return { base: id, hadSuffix: false }\n }\n return { base: id.slice(0, match.index), hadSuffix: true }\n}\n\n/** Reapply at most one canonical `[1m]` marker when the input had one. */\nexport function normalizeTrailingOneMSuffix(id: string): string {\n const { base, hadSuffix } = stripTrailingOneMSuffix(id)\n return hadSuffix ? `${base}[1m]` : base\n}\n\n/** Append one marker without ever creating a doubled suffix. */\nexport function withTrailingOneMSuffix(id: string): string {\n const { base } = stripTrailingOneMSuffix(id)\n return `${base}[1m]`\n}\n","import type { Model } from \"~/services/copilot/get-models\"\n\n// Fast endpoint policy is intentionally kept separate from the standard\n// pickEndpoint() resolver. See fastEndpointRequirement below.\n\n/** Endpoint clients used by the fast profile's fixed roster. */\nexport type FastEndpoint = \"chat\" | \"responses\" | \"messages\"\n\nconst ENDPOINTS: Readonly<Record<FastEndpoint, ReadonlySet<string>>> = {\n chat: new Set([\"/chat/completions\", \"/v1/chat/completions\"]),\n responses: new Set([\"/responses\", \"/v1/responses\"]),\n messages: new Set([\"/messages\", \"/v1/messages\"]),\n}\n\n/**\n * Return the endpoint mandated by a fast-profile roster model.\n *\n * This is intentionally independent of the standard `pickEndpoint`: that\n * resolver prefers chat when a catalog entry advertises both clients, while\n * fast roles have a fixed provider contract. Gemini stays on chat; Luna, Sol,\n * and Grok stay on Responses; the Opus Oracle stays on native Messages.\n * Unknown ids return undefined so a fast caller cannot guess a transport.\n */\nexport function fastEndpointRequirement(modelId: string): FastEndpoint | undefined {\n const id = modelId.replace(/(?:\\[1m\\])+$/i, \"\")\n if (id === \"gemini-3.8-flash\") return \"chat\"\n if (id === \"gpt-5.6-luna\" || id === \"gpt-5.6-sol\" || id === \"grok-4.6\") {\n return \"responses\"\n }\n if (id === \"claude-opus-5\") return \"messages\"\n return undefined\n}\n\n/**\n * Resolve the fixed fast transport only when the catalog explicitly advertises\n * the required endpoint. An entry that advertises both still resolves to the\n * policy endpoint, regardless of advertisement order.\n */\nexport function fastEndpointForModel(model: Model): FastEndpoint | undefined {\n const required = fastEndpointRequirement(model.id)\n if (!required) return undefined\n const advertised = model.supported_endpoints\n if (!Array.isArray(advertised) || advertised.length === 0) return undefined\n return advertised.some((endpoint) => ENDPOINTS[required].has(endpoint))\n ? required\n : undefined\n}\n\n/** Resolve a fast endpoint from a catalog id, without selecting a fallback. */\nexport function fastEndpointForCatalogId(\n modelId: string,\n catalog: ReadonlyArray<Model> | undefined,\n): FastEndpoint | undefined {\n const found = catalog?.find((model) => model.id === modelId)\n return found ? fastEndpointForModel(found) : undefined\n}\n\n/** Human-readable endpoint name for prerequisite diagnostics. */\nexport function fastEndpointLabel(endpoint: FastEndpoint): string {\n return endpoint === \"chat\"\n ? \"Chat Completions\"\n : endpoint === \"responses\"\n ? \"Responses\"\n : \"Messages\"\n}\n","import type { Model, ModelsResponse } from \"~/services/copilot/get-models\"\nimport type { Effort } from \"./reasoning-effort\"\nimport { fastEndpointForModel } from \"./fast-endpoint\"\nimport { stripTrailingOneMSuffix } from \"./model-suffix\"\nimport { state } from \"./state\"\n\n// Max uses the same context threshold as Claude Code's `[1m]` accounting.\nexport const MAX_REQUIRED_CONTEXT_TOKENS = 1_000_000\n\nconst ONE_M_TOKENS = MAX_REQUIRED_CONTEXT_TOKENS\n\nfunction catalogModels(): Array<Model> {\n return state.models?.data ?? []\n}\n\nfunction catalogModel(id: string): Model | undefined {\n return catalogModels().find((model) => model.id === id)\n}\n\n\nexport const MAX_PROFILE_MODELS = Object.freeze({\n sol: \"gpt-5.6-sol\",\n luna: \"gpt-5.6-luna\",\n gemini: \"gemini-3.8-flash\",\n grok: \"grok-4.6\",\n opus: \"claude-opus-5\",\n} as const)\n\nexport const MAX_PROFILE_NATIVE_AGENT_NAMES = [\n \"Explore\",\n \"Plan\",\n \"general-purpose\",\n \"implementer\",\n \"reviewer\",\n \"brainstorm\",\n \"peer-review-coordinator\",\n] as const\n\nexport type MaxProfileNativeAgentName =\n (typeof MAX_PROFILE_NATIVE_AGENT_NAMES)[number]\n\nexport const MAX_PROFILE_NATIVE_EFFORTS = Object.freeze({\n Explore: \"high\",\n Plan: \"high\",\n \"general-purpose\": \"max\",\n implementer: \"high\",\n reviewer: \"high\",\n brainstorm: \"medium\",\n \"peer-review-coordinator\": \"max\",\n} as const satisfies Record<MaxProfileNativeAgentName, Effort>)\n\n/** Default model family behind each native role's frontmatter. The optional\n * Grok brainstorm path may fall back to Gemini, whose allowed effort ladder is\n * identical for the values accepted by the max dispatch guard. */\nexport const MAX_PROFILE_NATIVE_MODELS = Object.freeze({\n Explore: MAX_PROFILE_MODELS.luna,\n Plan: MAX_PROFILE_MODELS.sol,\n \"general-purpose\": MAX_PROFILE_MODELS.luna,\n implementer: MAX_PROFILE_MODELS.gemini,\n reviewer: MAX_PROFILE_MODELS.grok,\n brainstorm: MAX_PROFILE_MODELS.grok,\n \"peer-review-coordinator\": MAX_PROFILE_MODELS.luna,\n} as const satisfies Record<MaxProfileNativeAgentName, string>)\n\nexport const MAX_PROFILE_LEAD_MODEL = MAX_PROFILE_MODELS.sol\nexport const MAX_PROFILE_ADVISOR_MODEL = MAX_PROFILE_MODELS.opus\nexport const MAX_PROFILE_ADVISOR_EFFORT = \"high\" as const\nexport const MAX_PROFILE_ADVISOR_INSTRUCTIONS = `# Advisor Tool\n\nYou have access to an optional, lead-only, transcript-aware Max Advisor. It offers a focused second opinion; it is not a supervisor, approver, workflow gate, or substitute for your own reasoning. You keep decision ownership.\n\nUse it only when a consequential uncertainty remains after direct investigation and cannot be settled by repository evidence, a focused command or test, Plan, reviewer, or a fresh-context peer: conflicting evidence, a materially changed assumption, a genuinely non-converging approach, or a hard-to-reverse trade-off. State the precise unresolved question immediately before calling it.\n\nDo not call it automatically before substantive work or completion, for routine progress, while waiting, after ordinary tool output, for directly verifiable facts, planner approval, reviewer verification, or as reassurance for a decision the evidence already supports.\n\nTreat the result as advice, not authority. Weigh it against the user's intent and verified evidence. Consult again only when materially new evidence creates a different question or directly conflicts with the earlier advice.`\n\nexport function maxAdvisorModelFromPin(pinned: string | undefined, opusModel?: string): string {\n const trimmed = pinned?.trim()\n const base = trimmed ? stripTrailingOneMSuffix(trimmed).base : undefined\n if (base === MAX_PROFILE_MODELS.sol || base === MAX_PROFILE_MODELS.opus) {\n return base\n }\n return opusModel ?? MAX_PROFILE_MODELS.opus\n}\n\nexport function maxAdvisorPinIsValid(pinned: string | undefined): boolean {\n const trimmed = pinned?.trim()\n const base = trimmed ? stripTrailingOneMSuffix(trimmed).base : trimmed\n return base === undefined\n || base === \"\"\n || base === MAX_PROFILE_MODELS.sol\n || base === MAX_PROFILE_MODELS.opus\n}\n\nexport function maxAdvisorModelFromPinStrict(pinned: string | undefined, opusModel?: string): string {\n if (!maxAdvisorPinIsValid(pinned)) return opusModel ?? MAX_PROFILE_MODELS.opus\n return maxAdvisorModelFromPin(pinned, opusModel)\n}\n\nexport function maxStandInAvailable(): boolean {\n return usableSol(catalogModel(MAX_PROFILE_MODELS.sol))\n && maxOpusModel() !== undefined\n && (maxGrokHighModel() !== undefined || maxGeminiModel() !== undefined)\n}\nexport function maxAdvisorEffortForModel(_model: string): Effort {\n return MAX_PROFILE_ADVISOR_EFFORT\n}\n\nexport const MAX_PROFILE_NATIVE_MODEL_IDS = Object.freeze([\n MAX_PROFILE_MODELS.luna,\n MAX_PROFILE_MODELS.gemini,\n MAX_PROFILE_MODELS.grok,\n] as const)\n\nexport const MAX_PROFILE_ALLOWED_LEAD_MODEL_IDS = Object.freeze([\n MAX_PROFILE_MODELS.sol,\n MAX_PROFILE_MODELS.luna,\n MAX_PROFILE_MODELS.gemini,\n MAX_PROFILE_MODELS.opus,\n] as const)\n\nexport type MaxProfileAllowedLeadModel =\n (typeof MAX_PROFILE_ALLOWED_LEAD_MODEL_IDS)[number]\n\nexport interface MaxProfilePrerequisiteCheck {\n ok: boolean\n missing: ReadonlyArray<string>\n /** Resolved optional/third-lab assignments for the launch. */\n models: {\n sol?: Model\n luna?: Model\n gemini?: Model\n grok?: Model\n opus?: Model\n thirdLab?: \"gemini\" | \"grok\"\n }\n}\n\nfunction findModel(\n catalog: ModelsResponse | undefined,\n id: string,\n): Model | undefined {\n return catalog?.data?.find((model) => model.id === id)\n}\n\nfunction hasToolCalls(model: Model | undefined): boolean {\n return model?.capabilities?.supports?.tool_calls === true\n}\n\nfunction hasContextAtLeast(model: Model | undefined, tokens: number): boolean {\n return (model?.capabilities?.limits?.max_context_window_tokens ?? 0) >= tokens\n}\n\nfunction supportsEffort(model: Model | undefined, effort: Effort): boolean {\n const ladder = model?.capabilities?.supports?.reasoning_effort\n return Array.isArray(ladder) && ladder.includes(effort)\n}\n\nfunction hasUsableLimits(model: Model | undefined): boolean {\n const limits = model?.capabilities?.limits\n const prompt = limits?.max_prompt_tokens\n const output = limits?.max_output_tokens\n return (\n typeof prompt === \"number\"\n && Number.isFinite(prompt)\n && prompt > 0\n && typeof output === \"number\"\n && Number.isFinite(output)\n && output > 0\n && (limits?.max_context_window_tokens ?? 0) >= prompt\n )\n}\n\nfunction supportsEndpoint(\n model: Model | undefined,\n endpoint: \"chat\" | \"responses\" | \"messages\",\n): boolean {\n return model !== undefined && fastEndpointForModel(model) === endpoint\n}\n\nfunction validateRequiredModel(\n model: Model | undefined,\n id: string,\n requirements: ReadonlyArray<[string, boolean]>,\n missing: string[],\n): void {\n if (!model) {\n missing.push(`${id}: absent from the live catalog`)\n return\n }\n for (const [message, ok] of requirements) {\n if (!ok) missing.push(`${id}: ${message}`)\n }\n}\n\nfunction usableSol(model: Model | undefined): boolean {\n return Boolean(\n model\n && hasToolCalls(model)\n && hasContextAtLeast(model, ONE_M_TOKENS)\n && supportsEffort(model, \"high\")\n && supportsEndpoint(model, \"responses\")\n && hasUsableLimits(model)\n )\n}\n\nfunction usableGemini(model: Model | undefined): boolean {\n return Boolean(\n model\n && hasToolCalls(model)\n && hasContextAtLeast(model, ONE_M_TOKENS)\n && supportsEffort(model, \"high\")\n && supportsEndpoint(model, \"chat\")\n && hasUsableLimits(model),\n )\n}\n\nfunction usableGrok(model: Model | undefined): boolean {\n return Boolean(\n model\n && hasToolCalls(model)\n && supportsEffort(model, \"medium\")\n && supportsEndpoint(model, \"responses\")\n && hasUsableLimits(model),\n )\n}\n\nfunction usableGrokReviewer(model: Model | undefined): boolean {\n return Boolean(\n usableGrok(model)\n && supportsEffort(model, \"high\")\n && (model?.capabilities?.limits?.max_prompt_tokens ?? 0) >= 200_000,\n )\n}\n\n/**\n * Validate the fixed prerequisites for the raw `-m max` launch.\n *\n * Max is a deliberately strong, closed profile. Its lead, planning, reviewer,\n * and transcript-aware Advisor paths must all be present before any runtime\n * artifact is written: Sol, Luna, Gemini 3.8 Flash, and Opus 5 are mandatory.\n * Grok 4.6 is the only optional model. When present it supplies the preferred\n * medium-effort brainstorm/critic path, but it is never a max lead and its\n * sub-1M context must remain undecorated.\n */\nexport function validateMaxProfilePrerequisites(\n catalog: ModelsResponse | undefined,\n): MaxProfilePrerequisiteCheck {\n const missing: string[] = []\n const sol = findModel(catalog, MAX_PROFILE_MODELS.sol)\n const luna = findModel(catalog, MAX_PROFILE_MODELS.luna)\n const gemini = findModel(catalog, MAX_PROFILE_MODELS.gemini)\n const grok = findModel(catalog, MAX_PROFILE_MODELS.grok)\n const opus = findModel(catalog, MAX_PROFILE_MODELS.opus)\n\n validateRequiredModel(\n sol,\n MAX_PROFILE_MODELS.sol,\n [\n [\"does not advertise tool_calls\", hasToolCalls(sol)],\n [\"advertised context window is below 1M\", hasContextAtLeast(sol, ONE_M_TOKENS)],\n [\"does not advertise a high reasoning effort\", supportsEffort(sol, \"high\")],\n [\"does not advertise a supported Responses endpoint\", supportsEndpoint(sol, \"responses\")],\n [\"has no usable max_prompt_tokens/max_output_tokens limits\", hasUsableLimits(sol)],\n ],\n missing,\n )\n validateRequiredModel(\n luna,\n MAX_PROFILE_MODELS.luna,\n [\n [\"does not advertise tool_calls\", hasToolCalls(luna)],\n [\"advertised context window is below 1M\", hasContextAtLeast(luna, ONE_M_TOKENS)],\n [\"does not advertise a high reasoning effort\", supportsEffort(luna, \"high\")],\n [\"does not advertise a max reasoning effort\", supportsEffort(luna, \"max\")],\n [\"does not advertise a supported Responses endpoint\", supportsEndpoint(luna, \"responses\")],\n [\"has no usable max_prompt_tokens/max_output_tokens limits\", hasUsableLimits(luna)],\n ],\n missing,\n )\n validateRequiredModel(\n gemini,\n MAX_PROFILE_MODELS.gemini,\n [\n [\"does not advertise tool_calls\", hasToolCalls(gemini)],\n [\"advertised context window is below 1M\", hasContextAtLeast(gemini, ONE_M_TOKENS)],\n [\"does not advertise a high reasoning effort\", supportsEffort(gemini, \"high\")],\n [\"does not advertise a supported Chat Completions endpoint\", supportsEndpoint(gemini, \"chat\")],\n [\"has no usable max_prompt_tokens/max_output_tokens limits\", hasUsableLimits(gemini)],\n ],\n missing,\n )\n validateRequiredModel(\n opus,\n MAX_PROFILE_MODELS.opus,\n [\n [\"advertised context window is below 1M\", hasContextAtLeast(opus, ONE_M_TOKENS)],\n [\"does not advertise adaptive_thinking\", opus?.capabilities?.supports?.adaptive_thinking === true],\n [\"does not advertise a high reasoning effort\", supportsEffort(opus, \"high\")],\n [\"does not advertise a supported Messages endpoint\", supportsEndpoint(opus, \"messages\")],\n [\"has no usable max_prompt_tokens/max_output_tokens limits\", hasUsableLimits(opus)],\n ],\n missing,\n )\n\n // Grok is intentionally optional. A malformed optional entry is simply\n // omitted from the max projection; it must never make launch fail or be\n // decorated as a 1M model.\n const geminiUsable = usableGemini(gemini)\n const grokUsable = usableGrok(grok)\n\n return {\n ok: missing.length === 0,\n missing,\n models: {\n sol: sol && !missing.some((entry) => entry.startsWith(`${MAX_PROFILE_MODELS.sol}:`)) ? sol : undefined,\n luna: luna && !missing.some((entry) => entry.startsWith(`${MAX_PROFILE_MODELS.luna}:`)) ? luna : undefined,\n gemini: geminiUsable ? gemini : undefined,\n grok: grokUsable ? grok : undefined,\n opus: opus && !missing.some((entry) => entry.startsWith(`${MAX_PROFILE_MODELS.opus}:`)) ? opus : undefined,\n thirdLab: grokUsable && supportsEffort(grok, \"high\")\n ? \"grok\"\n : geminiUsable\n ? \"gemini\"\n : undefined,\n },\n }\n}\n\nexport function formatMaxPrerequisiteFailure(\n missing: ReadonlyArray<string>,\n): string {\n return (\n \"github-router claude -m max requires the following live-catalog capabilities, \"\n + \"which this account's catalog does not fully provide:\\n\"\n + missing.map((entry) => ` - ${entry}`).join(\"\\n\")\n + \"\\n\\nMax launches do not fall back to arbitrary older models. \"\n + \"Use plain `github-router claude` for the standard profile.\"\n )\n}\n\nexport function maxModelIsOneM(\n model: Model | undefined,\n): boolean {\n return (\n (model?.capabilities?.limits?.max_context_window_tokens ?? 0) >= ONE_M_TOKENS\n )\n}\n\nexport function maxModelSupportsEffort(\n model: Model | undefined,\n effort: Effort,\n): boolean {\n return supportsEffort(model, effort)\n}\n\nexport function maxModelHasUsableLimits(model: Model | undefined): boolean {\n return hasUsableLimits(model)\n}\n\nexport function maxThirdLabModel(): string | undefined {\n const gemini = catalogModel(MAX_PROFILE_MODELS.gemini)\n if (usableGemini(gemini)) return MAX_PROFILE_MODELS.gemini\n const grok = catalogModel(MAX_PROFILE_MODELS.grok)\n return usableGrok(grok) ? MAX_PROFILE_MODELS.grok : undefined\n}\n\nexport function maxGeminiModel(): string | undefined {\n const model = catalogModel(MAX_PROFILE_MODELS.gemini)\n return model && usableGemini(model) ? model.id : undefined\n}\n\nexport function maxGrokModel(): string | undefined {\n const model = catalogModel(MAX_PROFILE_MODELS.grok)\n return model && usableGrok(model) ? model.id : undefined\n}\n\n/** Grok replacement for max-profile surfaces that require high effort. */\nexport function maxGrokHighModel(): string | undefined {\n const model = catalogModel(MAX_PROFILE_MODELS.grok)\n return model && usableGrokReviewer(model) ? model.id : undefined\n}\n\n/** Max-only replacement for any standard Gemini Pro assignment. */\nexport function maxProReplacementModel():\n | typeof MAX_PROFILE_MODELS.grok\n | typeof MAX_PROFILE_MODELS.gemini\n | undefined {\n if (maxGrokHighModel()) return MAX_PROFILE_MODELS.grok\n if (maxGeminiModel()) return MAX_PROFILE_MODELS.gemini\n return undefined\n}\n\nexport function maxOpusModel(): string | undefined {\n const model = catalogModel(MAX_PROFILE_MODELS.opus)\n return model && hasContextAtLeast(model, ONE_M_TOKENS)\n && model.capabilities?.supports?.adaptive_thinking === true\n && supportsEffort(model, \"high\")\n && supportsEndpoint(model, \"messages\")\n && hasUsableLimits(model)\n ? model.id\n : undefined\n}\n\nexport function maxLunaMaxModel(): string | undefined {\n const model = catalogModel(MAX_PROFILE_MODELS.luna)\n return model\n && hasToolCalls(model)\n && hasContextAtLeast(model, ONE_M_TOKENS)\n && supportsEffort(model, \"max\")\n && supportsEndpoint(model, \"responses\")\n && hasUsableLimits(model)\n ? model.id\n : undefined\n}\n\nexport function maxReviewerModel(): string | undefined {\n const grok = maxGrokHighModel()\n if (grok) return grok\n return maxLunaMaxModel()\n}\n\nexport function maxCatalogModel(id: string): Model | undefined {\n return catalogModel(id)\n}\n\nexport function maxCatalogModels(): ReadonlyArray<Model> {\n return catalogModels()\n}"],"mappings":";;;AAeA,SAAgB,wBAAwB,IAAgC;CACtE,MAAM,QAAQ,GAAG,MAAM,eAAe;CACtC,IAAI,CAAC,SAAS,MAAM,UAAU,KAAA,GAC5B,OAAO;EAAE,MAAM;EAAI,WAAW;CAAM;CAEtC,OAAO;EAAE,MAAM,GAAG,MAAM,GAAG,MAAM,KAAK;EAAG,WAAW;CAAK;AAC3D;;AAGA,SAAgB,4BAA4B,IAAoB;CAC9D,MAAM,EAAE,MAAM,cAAc,wBAAwB,EAAE;CACtD,OAAO,YAAY,GAAG,KAAK,QAAQ;AACrC;;;ACnBA,MAAM,YAAiE;CACrE,sBAAM,IAAI,IAAI,CAAC,qBAAqB,sBAAsB,CAAC;CAC3D,2BAAW,IAAI,IAAI,CAAC,cAAc,eAAe,CAAC;CAClD,0BAAU,IAAI,IAAI,CAAC,aAAa,cAAc,CAAC;AACjD;;;;;;;;;;AAWA,SAAgB,wBAAwB,SAA2C;CACjF,MAAM,KAAK,QAAQ,QAAQ,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