github-router 0.3.302 → 0.3.304
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/README.md +4 -4
- package/dist/{attribution-settings-B1xutIts.js → attribution-settings-C8iSwEAZ.js} +184 -93
- package/dist/attribution-settings-C8iSwEAZ.js.map +1 -0
- package/dist/browser-ext/manifest.json +1 -1
- package/dist/{claude-uRuzEH0W.js → claude-Drv0roq1.js} +63 -116
- package/dist/claude-Drv0roq1.js.map +1 -0
- package/dist/{codex-D5ag-liR.js → codex-kgVL5OyN.js} +4 -4
- package/dist/{codex-D5ag-liR.js.map → codex-kgVL5OyN.js.map} +1 -1
- package/dist/engine-xuIzQNV1.js +2 -0
- package/dist/{fast-profile-contract-K3P58nj3.js → fast-profile-contract-OuZQaGif.js} +26 -23
- package/dist/fast-profile-contract-OuZQaGif.js.map +1 -0
- package/dist/{gate-discovery-BTRVyKWu.js → gate-discovery-D4-F99e_.js} +2 -2
- package/dist/{gate-discovery-BTRVyKWu.js.map → gate-discovery-D4-F99e_.js.map} +1 -1
- package/dist/hooks.mjs +121 -50
- package/dist/hooks.sha256 +1 -1
- package/dist/{internal-fast-dispatch-guard-D2HcfXZv.js → internal-fast-dispatch-guard-BaUB-F8o.js} +71 -15
- package/dist/internal-fast-dispatch-guard-BaUB-F8o.js.map +1 -0
- package/dist/{internal-fast-dispatch-guard-CYOWbxjX.js → internal-fast-dispatch-guard-ByzwIsxA.js} +1 -1
- package/dist/{internal-max-dispatch-guard-BjSVXMvC.js → internal-max-dispatch-guard-CXRB-4a3.js} +31 -14
- package/dist/internal-max-dispatch-guard-CXRB-4a3.js.map +1 -0
- package/dist/{internal-max-dispatch-guard-Bcjavapx.js → internal-max-dispatch-guard-Sb6ACr_0.js} +1 -1
- package/dist/{internal-stop-hook-BZg__ab6.js → internal-stop-hook-D8LIWryj.js} +2 -2
- package/dist/{internal-stop-hook-BZg__ab6.js.map → internal-stop-hook-D8LIWryj.js.map} +1 -1
- package/dist/main.js +7 -7
- package/dist/{max-profile-contract-BTXowh6k.js → max-profile-contract-CiD5wyET.js} +19 -7
- package/dist/max-profile-contract-CiD5wyET.js.map +1 -0
- package/dist/{peer-mcp-personas-DwEiYeJS.js → peer-mcp-personas-D4bHdjOx.js} +420 -384
- package/dist/peer-mcp-personas-D4bHdjOx.js.map +1 -0
- package/dist/{provision-BLT1pCFy.js → provision-D3_GtXze.js} +2 -2
- package/dist/{provision-BLT1pCFy.js.map → provision-D3_GtXze.js.map} +1 -1
- package/dist/{serve-wEZoOijw.js → serve-DPRZX-2j.js} +5 -5
- package/dist/{serve-wEZoOijw.js.map → serve-DPRZX-2j.js.map} +1 -1
- package/dist/{server-setup-Zn5wkosb.js → server-setup-CSkdFAPP.js} +25 -19
- package/dist/server-setup-CSkdFAPP.js.map +1 -0
- package/dist/{start-DSqU8d8h.js → start-C6G5tu81.js} +3 -3
- package/dist/{start-DSqU8d8h.js.map → start-C6G5tu81.js.map} +1 -1
- package/package.json +1 -1
- package/dist/attribution-settings-B1xutIts.js.map +0 -1
- package/dist/claude-uRuzEH0W.js.map +0 -1
- package/dist/engine-2uMJ4Isk.js +0 -2
- package/dist/fast-profile-contract-K3P58nj3.js.map +0 -1
- package/dist/internal-fast-dispatch-guard-D2HcfXZv.js.map +0 -1
- package/dist/internal-max-dispatch-guard-BjSVXMvC.js.map +0 -1
- package/dist/max-profile-contract-BTXowh6k.js.map +0 -1
- package/dist/peer-mcp-personas-DwEiYeJS.js.map +0 -1
- package/dist/server-setup-Zn5wkosb.js.map +0 -1
|
@@ -4,8 +4,8 @@ import { t as PATHS } from "./paths-IcZW8gZx.js";
|
|
|
4
4
|
import { t as state } from "./state-B8adscCv.js";
|
|
5
5
|
import { C as GITHUB_GRAPHQL_URL, D as githubAgentGraphQLHeaders, E as copilotVersion, O as githubAgentHeaders, S as GITHUB_API_BASE_URL, T as copilotHeaders, b as sanitizeTransportText, d as resolveModel, f as sleep$2, g as HTTPError, h as isAllowedCopilotHost, i as tryRefreshAndRetry, v as classifyTransportError, w as copilotBaseUrl, x as withTransientRetry, y as fetchWithTransientRetry } from "./token-CbuFyx-B.js";
|
|
6
6
|
import { a as resolveExecutable, c as runManagedExeCapture, i as parseIntEnv, l as spawnTaskkillBestEffort, r as parseBoolEnv } from "./exec-y8C_MU8A.js";
|
|
7
|
-
import { a as FAST_PROFILE_MODELS, c as FAST_PROFILE_NATIVE_MODELS, l as FAST_PROFILE_ORACLE_EFFORT, n as FAST_PROFILE_ADVISOR_EFFORT, o as FAST_PROFILE_NATIVE_AGENT_NAMES, r as FAST_PROFILE_ADVISOR_MODEL, s as FAST_PROFILE_NATIVE_EFFORTS, u as FAST_PROFILE_ORACLE_MODEL } from "./fast-profile-contract-
|
|
8
|
-
import { _ as
|
|
7
|
+
import { a as FAST_PROFILE_MODELS, c as FAST_PROFILE_NATIVE_MODELS, l as FAST_PROFILE_ORACLE_EFFORT, n as FAST_PROFILE_ADVISOR_EFFORT, o as FAST_PROFILE_NATIVE_AGENT_NAMES, r as FAST_PROFILE_ADVISOR_MODEL, s as FAST_PROFILE_NATIVE_EFFORTS, u as FAST_PROFILE_ORACLE_MODEL } from "./fast-profile-contract-OuZQaGif.js";
|
|
8
|
+
import { _ as validateMaxProfilePrerequisites, a as MAX_PROFILE_NATIVE_AGENT_NAMES, b as normalizeTrailingOneMSuffix, f as maxGeminiModel, h as maxProReplacementModel, i as MAX_PROFILE_MODELS, m as maxOpusModel, p as maxGrokModel, r as MAX_PROFILE_LEAD_MODEL, v as fastEndpointForCatalogId, x as stripTrailingOneMSuffix, y as fastEndpointForModel } from "./max-profile-contract-CiD5wyET.js";
|
|
9
9
|
import { i as registerExitHandlers$1, n as getInstanceUuid, r as recordWorkerRepo, t as WorktreeRegistry } from "./lifecycle-DgsJ_8Am.js";
|
|
10
10
|
import { t as MCP_WORKSPACE_HEADER } from "./mcp-workspace-header-NzFD0Wgd.js";
|
|
11
11
|
import { n as ArtifactError, r as applyInsecureTls, t as ArtifactClient } from "./client-CQMfroGV.js";
|
|
@@ -99,6 +99,297 @@ async function tryCreateLock(p) {
|
|
|
99
99
|
}
|
|
100
100
|
}
|
|
101
101
|
//#endregion
|
|
102
|
+
//#region src/lib/launch-profile.ts
|
|
103
|
+
const STANDARD_PROFILE = Object.freeze({
|
|
104
|
+
id: "standard",
|
|
105
|
+
hasCoordinator: true
|
|
106
|
+
});
|
|
107
|
+
/**
|
|
108
|
+
* The `-m fast` roster: exactly five native agents (`Explore`, `Plan`,
|
|
109
|
+
* `general-purpose`, `implementer`, `reviewer`), the fast-only `oracle` peer
|
|
110
|
+
* tool, no coordinator, and `peers`/`search` plus optional browser and
|
|
111
|
+
* browse-only worker groups. Core workers, `orchestrate`, `decide`, `fleet`,
|
|
112
|
+
* and `first-mate` remain hard denies even when their standard gates pass.
|
|
113
|
+
*/
|
|
114
|
+
const FAST_PROFILE = Object.freeze({
|
|
115
|
+
id: "fast",
|
|
116
|
+
nativeRoster: new Set(FAST_PROFILE_NATIVE_AGENT_NAMES),
|
|
117
|
+
personaAllowlist: /* @__PURE__ */ new Set(["oracle"]),
|
|
118
|
+
allowedGroups: /* @__PURE__ */ new Set([
|
|
119
|
+
"peers",
|
|
120
|
+
"search",
|
|
121
|
+
"workers",
|
|
122
|
+
"browser"
|
|
123
|
+
]),
|
|
124
|
+
hasCoordinator: false
|
|
125
|
+
});
|
|
126
|
+
/**
|
|
127
|
+
* The `-m max` profile: Sol/Luna-led, browse-only workers, and explicit
|
|
128
|
+
* cross-lab peer names. The descriptor is a hard projection for bound launch
|
|
129
|
+
* requests; unbound/BYO traffic remains standard because it has no registry
|
|
130
|
+
* entry carrying this allow-list.
|
|
131
|
+
*/
|
|
132
|
+
const MAX_PROFILE = Object.freeze({
|
|
133
|
+
id: "max",
|
|
134
|
+
nativeRoster: new Set(MAX_PROFILE_NATIVE_AGENT_NAMES),
|
|
135
|
+
personaAllowlist: /* @__PURE__ */ new Set([
|
|
136
|
+
"sol_critic",
|
|
137
|
+
"luna_reviewer",
|
|
138
|
+
"opus_critic",
|
|
139
|
+
"gemini_critic",
|
|
140
|
+
"gemini_reviewer",
|
|
141
|
+
"grok_critic",
|
|
142
|
+
"grok_reviewer"
|
|
143
|
+
]),
|
|
144
|
+
allowedGroups: /* @__PURE__ */ new Set([
|
|
145
|
+
"peers",
|
|
146
|
+
"search",
|
|
147
|
+
"workers",
|
|
148
|
+
"browser",
|
|
149
|
+
"decide",
|
|
150
|
+
"fleet",
|
|
151
|
+
"first-mate"
|
|
152
|
+
]),
|
|
153
|
+
hasCoordinator: true
|
|
154
|
+
});
|
|
155
|
+
function profileDescriptor(id) {
|
|
156
|
+
if (id === "fast") return FAST_PROFILE;
|
|
157
|
+
if (id === "max") return MAX_PROFILE;
|
|
158
|
+
return STANDARD_PROFILE;
|
|
159
|
+
}
|
|
160
|
+
/**
|
|
161
|
+
* Resolve the parsed `-m` argument to a launch profile.
|
|
162
|
+
*
|
|
163
|
+
* Deliberately keyed on the RAW alias string (trimmed, case-insensitive
|
|
164
|
+
* `"fast"`), never on a resolved model id: `resolveLeadSlugArg` maps `fast`
|
|
165
|
+
* to `FAST_LEAD_MODEL` (`./port`) before this is of any use to a caller who
|
|
166
|
+
* only has the resolved id, so callers that already resolved the lead must
|
|
167
|
+
* pass the ORIGINAL `-m` value here, not the resolved one. This is what
|
|
168
|
+
* keeps `-m gpt-5.6-luna` (a direct pin of the same underlying model) a
|
|
169
|
+
* standard-surface launch — only the literal alias narrows the surface.
|
|
170
|
+
*/
|
|
171
|
+
function resolveLaunchProfile(modelArg) {
|
|
172
|
+
const arg = modelArg?.trim().toLowerCase();
|
|
173
|
+
if (arg === "fast") return "fast";
|
|
174
|
+
if (arg === "max") return "max";
|
|
175
|
+
return "standard";
|
|
176
|
+
}
|
|
177
|
+
function validateMaxProfileLaunch(catalog) {
|
|
178
|
+
return validateMaxProfilePrerequisites(catalog);
|
|
179
|
+
}
|
|
180
|
+
/**
|
|
181
|
+
* Router-owned alias id for the fast profile's Sonnet-tier row
|
|
182
|
+
* (`ANTHROPIC_DEFAULT_SONNET_MODEL`). Never sent upstream — canonicalized to
|
|
183
|
+
* `LUNA_REAL_MODEL_ID` by `canonicalizeAliasModel` before the request
|
|
184
|
+
* reaches Copilot.
|
|
185
|
+
*/
|
|
186
|
+
const LUNA_DRIVER_ALIAS_ID = "gh-router-luna-driver-max";
|
|
187
|
+
/** Fast Explore alias preserves its high-effort provenance until the
|
|
188
|
+
* authenticated request boundary. Bare Luna remains the max-effort lead and
|
|
189
|
+
* `general-purpose` model. */
|
|
190
|
+
const LUNA_SCOUT_ALIAS_ID = "gh-router-luna-scout-high";
|
|
191
|
+
/** Retired Fast aliases remain recognizable only so old running clients fail
|
|
192
|
+
* with an explicit stale-alias error instead of silently changing semantics. */
|
|
193
|
+
const LUNA_IMPLEMENTER_ALIAS_ID = "gh-router-luna-implementer-max";
|
|
194
|
+
const FAST_CRITIC_ALIAS_ID = "gh-router-fast-critic-medium";
|
|
195
|
+
const LUNA_SONNET_ALIAS_ID = "gh-router-luna-sonnet-xhigh";
|
|
196
|
+
/**
|
|
197
|
+
* Router-owned alias id for the fast profile's Haiku-tier row
|
|
198
|
+
* (`ANTHROPIC_DEFAULT_HAIKU_MODEL` / `ANTHROPIC_SMALL_FAST_MODEL`).
|
|
199
|
+
*/
|
|
200
|
+
const LUNA_HAIKU_ALIAS_ID = "gh-router-luna-haiku-high";
|
|
201
|
+
/** Max-profile aliases are intentionally separate from the fast aliases. They
|
|
202
|
+
* preserve the fixed max role effort until the authenticated max request
|
|
203
|
+
* boundary and are never valid on standard or fast launches. */
|
|
204
|
+
const MAX_LUNA_HIGH_ALIAS_ID = "gh-router-max-luna-high";
|
|
205
|
+
const MAX_LUNA_MAX_ALIAS_ID = "gh-router-max-luna-max";
|
|
206
|
+
/** The real Copilot catalog id every Luna alias (including the driver
|
|
207
|
+
* itself) canonicalizes to. */
|
|
208
|
+
const LUNA_REAL_MODEL_ID = FAST_PROFILE_MODELS.luna;
|
|
209
|
+
const MAX_ALIAS_IDS = /* @__PURE__ */ new Set([MAX_LUNA_HIGH_ALIAS_ID, MAX_LUNA_MAX_ALIAS_ID]);
|
|
210
|
+
function isMaxModelAlias(id) {
|
|
211
|
+
return MAX_ALIAS_IDS.has(stripTrailingOneMSuffix(id).base);
|
|
212
|
+
}
|
|
213
|
+
function maxAliasEffort(id) {
|
|
214
|
+
const base = stripTrailingOneMSuffix(id).base;
|
|
215
|
+
if (base === "gh-router-max-luna-high") return "high";
|
|
216
|
+
if (base === "gh-router-max-luna-max") return "max";
|
|
217
|
+
}
|
|
218
|
+
function maxAliasModel(id) {
|
|
219
|
+
return isMaxModelAlias(id) ? LUNA_REAL_MODEL_ID : void 0;
|
|
220
|
+
}
|
|
221
|
+
/**
|
|
222
|
+
* The full alias table, keyed by `aliasId`. A simpler model-id-only table is
|
|
223
|
+
* rejected by design: the driver, the Sonnet tier, and the Haiku tier all
|
|
224
|
+
* resolve to the SAME Luna catalog id, while the fast critic alias resolves
|
|
225
|
+
* to Gemini. After early canonicalization a table keyed on the real id could
|
|
226
|
+
* no longer tell which absent-effort default applies. Alias provenance is the
|
|
227
|
+
* minimum discriminator that survives from tier selection through to request
|
|
228
|
+
* preprocessing, which is why canonicalization must happen LAST (in the
|
|
229
|
+
* `/v1/messages` identity preflight), after the effort default has already
|
|
230
|
+
* been read off the alias.
|
|
231
|
+
*/
|
|
232
|
+
const RETIRED_FAST_ALIAS_IDS = /* @__PURE__ */ new Set([LUNA_IMPLEMENTER_ALIAS_ID, FAST_CRITIC_ALIAS_ID]);
|
|
233
|
+
const MODEL_ALIAS_TABLE = /* @__PURE__ */ new Map([
|
|
234
|
+
[LUNA_DRIVER_ALIAS_ID, {
|
|
235
|
+
aliasId: LUNA_DRIVER_ALIAS_ID,
|
|
236
|
+
realModel: LUNA_REAL_MODEL_ID,
|
|
237
|
+
absentEffortDefault: "max"
|
|
238
|
+
}],
|
|
239
|
+
[MAX_LUNA_HIGH_ALIAS_ID, {
|
|
240
|
+
aliasId: MAX_LUNA_HIGH_ALIAS_ID,
|
|
241
|
+
realModel: LUNA_REAL_MODEL_ID,
|
|
242
|
+
absentEffortDefault: "high"
|
|
243
|
+
}],
|
|
244
|
+
[MAX_LUNA_MAX_ALIAS_ID, {
|
|
245
|
+
aliasId: MAX_LUNA_MAX_ALIAS_ID,
|
|
246
|
+
realModel: LUNA_REAL_MODEL_ID,
|
|
247
|
+
absentEffortDefault: "max"
|
|
248
|
+
}],
|
|
249
|
+
[LUNA_SCOUT_ALIAS_ID, {
|
|
250
|
+
aliasId: LUNA_SCOUT_ALIAS_ID,
|
|
251
|
+
realModel: LUNA_REAL_MODEL_ID,
|
|
252
|
+
absentEffortDefault: "high"
|
|
253
|
+
}],
|
|
254
|
+
[LUNA_SONNET_ALIAS_ID, {
|
|
255
|
+
aliasId: LUNA_SONNET_ALIAS_ID,
|
|
256
|
+
realModel: LUNA_REAL_MODEL_ID,
|
|
257
|
+
absentEffortDefault: "xhigh"
|
|
258
|
+
}],
|
|
259
|
+
[LUNA_HAIKU_ALIAS_ID, {
|
|
260
|
+
aliasId: LUNA_HAIKU_ALIAS_ID,
|
|
261
|
+
realModel: LUNA_REAL_MODEL_ID,
|
|
262
|
+
absentEffortDefault: "high"
|
|
263
|
+
}]
|
|
264
|
+
]);
|
|
265
|
+
/**
|
|
266
|
+
* Look up the alias descriptor for a wire-facing model id (with or without
|
|
267
|
+
* a trailing `[1m]` bracket — the bracket is stripped before the table
|
|
268
|
+
* lookup and is orthogonal to alias identity). Returns undefined for any
|
|
269
|
+
* id that isn't one of the registered aliases (including bare `claude-*`
|
|
270
|
+
* ids and every other real Copilot catalog id).
|
|
271
|
+
*/
|
|
272
|
+
function resolveModelAlias(id) {
|
|
273
|
+
const { base } = stripTrailingOneMSuffix(id);
|
|
274
|
+
return MODEL_ALIAS_TABLE.get(base);
|
|
275
|
+
}
|
|
276
|
+
function isRetiredFastModelAlias(id) {
|
|
277
|
+
return RETIRED_FAST_ALIAS_IDS.has(stripTrailingOneMSuffix(id).base);
|
|
278
|
+
}
|
|
279
|
+
/**
|
|
280
|
+
* Strip alias provenance and return the real catalog id to send upstream.
|
|
281
|
+
* Idempotent passthrough for any id that isn't a registered alias (a bare
|
|
282
|
+
* `claude-*` slug, an already-real Copilot id, or anything else) — this is
|
|
283
|
+
* safe to call unconditionally on every `body.model` at the outbound
|
|
284
|
+
* boundary. Preserves a trailing `[1m]` bracket: canonicalization only
|
|
285
|
+
* erases ALIAS identity, not the 1M-context accounting decoration.
|
|
286
|
+
*/
|
|
287
|
+
function canonicalizeAliasModel(id) {
|
|
288
|
+
const { base, hadSuffix } = stripTrailingOneMSuffix(id);
|
|
289
|
+
const alias = MODEL_ALIAS_TABLE.get(base);
|
|
290
|
+
if (!alias) return normalizeTrailingOneMSuffix(id);
|
|
291
|
+
return hadSuffix ? `${alias.realModel}[1m]` : alias.realModel;
|
|
292
|
+
}
|
|
293
|
+
const FAST_REQUIRED_CONTEXT_TOKENS = 1e6;
|
|
294
|
+
function findModel(catalog, id) {
|
|
295
|
+
return catalog?.data?.find((m) => m.id === id);
|
|
296
|
+
}
|
|
297
|
+
function hasToolCalls(model) {
|
|
298
|
+
return model?.capabilities?.supports?.tool_calls === true;
|
|
299
|
+
}
|
|
300
|
+
function hasContextAtLeast(model, tokens) {
|
|
301
|
+
return (model?.capabilities?.limits?.max_context_window_tokens ?? 0) >= tokens;
|
|
302
|
+
}
|
|
303
|
+
function supportsEffort(model, effort) {
|
|
304
|
+
const list = model?.capabilities?.supports?.reasoning_effort;
|
|
305
|
+
return Array.isArray(list) && list.includes(effort);
|
|
306
|
+
}
|
|
307
|
+
const FAST_REVIEWER_MIN_PROMPT_TOKENS = 2e5;
|
|
308
|
+
function supportsEndpoint(model, endpoint) {
|
|
309
|
+
return model !== void 0 && fastEndpointForModel(model) === endpoint;
|
|
310
|
+
}
|
|
311
|
+
function hasUsablePromptMetadata(model) {
|
|
312
|
+
const prompt = model?.capabilities?.limits?.max_prompt_tokens;
|
|
313
|
+
return typeof prompt === "number" && Number.isFinite(prompt) && prompt > 0;
|
|
314
|
+
}
|
|
315
|
+
function hasPromptAtLeast(model, tokens) {
|
|
316
|
+
const prompt = model?.capabilities?.limits?.max_prompt_tokens;
|
|
317
|
+
return typeof prompt === "number" && Number.isFinite(prompt) && prompt >= tokens;
|
|
318
|
+
}
|
|
319
|
+
/**
|
|
320
|
+
* Validate the live Copilot catalog carries every model the fast profile's
|
|
321
|
+
* EXACT roster depends on, with the specific capabilities each assignment
|
|
322
|
+
* needs. These are capability-availability PREREQUISITES for constructing
|
|
323
|
+
* the roster — not an allowlist of models the user may select later in the
|
|
324
|
+
* session — so a partial catalog fails the whole `-m fast` launch rather
|
|
325
|
+
* than silently substituting or dropping an agent.
|
|
326
|
+
*
|
|
327
|
+
* Checks, per the fast-launch-profile design:
|
|
328
|
+
* - Luna lead/Explore/general-purpose: tool calls, >=1M, high+max, Responses.
|
|
329
|
+
* - Sol Plan: tool calls, >=1M, high, Responses.
|
|
330
|
+
* - Grok reviewer: tool calls, medium, Responses, usable prompt metadata.
|
|
331
|
+
* - Gemini implementer/Advisor: tool calls, >=1M, high, chat-completions.
|
|
332
|
+
* - Opus Oracle: exact Opus 5, >=1M, adaptive/high, Messages, prompt metadata.
|
|
333
|
+
*
|
|
334
|
+
* Pure over the passed-in catalog snapshot so it's unit-testable without
|
|
335
|
+
* `state` — callers pass `state.models` at call time.
|
|
336
|
+
*/
|
|
337
|
+
function validateFastProfilePrerequisites(catalog) {
|
|
338
|
+
const missing = [];
|
|
339
|
+
const luna = findModel(catalog, LUNA_REAL_MODEL_ID);
|
|
340
|
+
if (!luna) missing.push(`${LUNA_REAL_MODEL_ID}: absent from the live catalog`);
|
|
341
|
+
else {
|
|
342
|
+
if (!hasToolCalls(luna)) missing.push(`${LUNA_REAL_MODEL_ID}: does not advertise tool_calls`);
|
|
343
|
+
if (!hasContextAtLeast(luna, FAST_REQUIRED_CONTEXT_TOKENS)) missing.push(`${LUNA_REAL_MODEL_ID}: advertised context window is below 1M`);
|
|
344
|
+
if (!supportsEffort(luna, "high") || !supportsEffort(luna, "max")) missing.push(`${LUNA_REAL_MODEL_ID}: does not advertise both "high" and "max" reasoning effort`);
|
|
345
|
+
if (!supportsEndpoint(luna, "responses")) missing.push(`${LUNA_REAL_MODEL_ID}: does not advertise a supported Responses endpoint`);
|
|
346
|
+
}
|
|
347
|
+
const sol = findModel(catalog, FAST_PROFILE_MODELS.plan);
|
|
348
|
+
if (!sol) missing.push(`${FAST_PROFILE_MODELS.plan}: absent from the live catalog`);
|
|
349
|
+
else {
|
|
350
|
+
if (!hasToolCalls(sol)) missing.push(`${FAST_PROFILE_MODELS.plan}: does not advertise tool_calls`);
|
|
351
|
+
if (!hasContextAtLeast(sol, FAST_REQUIRED_CONTEXT_TOKENS)) missing.push(`${FAST_PROFILE_MODELS.plan}: advertised context window is below 1M`);
|
|
352
|
+
if (!supportsEffort(sol, "high")) missing.push(`${FAST_PROFILE_MODELS.plan}: does not advertise a "high" reasoning effort`);
|
|
353
|
+
if (!supportsEndpoint(sol, "responses")) missing.push(`${FAST_PROFILE_MODELS.plan}: does not advertise a supported Responses endpoint`);
|
|
354
|
+
}
|
|
355
|
+
const grok = findModel(catalog, FAST_PROFILE_MODELS.reviewer);
|
|
356
|
+
if (!grok) missing.push(`${FAST_PROFILE_MODELS.reviewer}: absent from the live catalog`);
|
|
357
|
+
else {
|
|
358
|
+
if (!hasToolCalls(grok)) missing.push(`${FAST_PROFILE_MODELS.reviewer}: does not advertise tool_calls`);
|
|
359
|
+
if (!supportsEffort(grok, "medium")) missing.push(`${FAST_PROFILE_MODELS.reviewer}: does not advertise a "medium" reasoning effort`);
|
|
360
|
+
if (!hasPromptAtLeast(grok, 2e5)) missing.push(`${FAST_PROFILE_MODELS.reviewer}: advertised max_prompt_tokens is below ${FAST_REVIEWER_MIN_PROMPT_TOKENS}`);
|
|
361
|
+
if (!supportsEndpoint(grok, "responses")) missing.push(`${FAST_PROFILE_MODELS.reviewer}: does not advertise a supported Responses endpoint`);
|
|
362
|
+
}
|
|
363
|
+
const gemini = findModel(catalog, FAST_PROFILE_MODELS.advisor);
|
|
364
|
+
if (!gemini) missing.push(`${FAST_PROFILE_MODELS.advisor}: absent from the live catalog`);
|
|
365
|
+
else {
|
|
366
|
+
if (!hasToolCalls(gemini)) missing.push(`${FAST_PROFILE_MODELS.advisor}: does not advertise tool_calls`);
|
|
367
|
+
if (!hasContextAtLeast(gemini, FAST_REQUIRED_CONTEXT_TOKENS)) missing.push(`${FAST_PROFILE_MODELS.advisor}: advertised context window is below 1M`);
|
|
368
|
+
if (!supportsEffort(gemini, "high")) missing.push(`${FAST_PROFILE_MODELS.advisor}: does not advertise a "high" reasoning effort`);
|
|
369
|
+
if (!supportsEndpoint(gemini, "chat")) missing.push(`${FAST_PROFILE_MODELS.advisor}: does not advertise a supported chat-completions endpoint`);
|
|
370
|
+
}
|
|
371
|
+
const opus = findModel(catalog, FAST_PROFILE_MODELS.oracle);
|
|
372
|
+
if (!opus) missing.push(`${FAST_PROFILE_MODELS.oracle}: absent from the live catalog`);
|
|
373
|
+
else {
|
|
374
|
+
if (!hasContextAtLeast(opus, FAST_REQUIRED_CONTEXT_TOKENS)) missing.push(`${FAST_PROFILE_MODELS.oracle}: advertised context window is below 1M`);
|
|
375
|
+
if (!supportsEffort(opus, "high")) missing.push(`${FAST_PROFILE_MODELS.oracle}: does not advertise a "high" reasoning effort`);
|
|
376
|
+
if (opus.capabilities?.supports?.adaptive_thinking !== true) missing.push(`${FAST_PROFILE_MODELS.oracle}: does not advertise adaptive_thinking`);
|
|
377
|
+
if (!hasUsablePromptMetadata(opus)) missing.push(`${FAST_PROFILE_MODELS.oracle}: no usable max_prompt_tokens metadata`);
|
|
378
|
+
if (!supportsEndpoint(opus, "messages")) missing.push(`${FAST_PROFILE_MODELS.oracle}: does not advertise a supported Messages endpoint`);
|
|
379
|
+
}
|
|
380
|
+
return {
|
|
381
|
+
ok: missing.length === 0,
|
|
382
|
+
missing
|
|
383
|
+
};
|
|
384
|
+
}
|
|
385
|
+
/**
|
|
386
|
+
* Format `validateFastProfilePrerequisites`'s failure list into the launch
|
|
387
|
+
* error message: every missing/invalid model, plus the rollback command.
|
|
388
|
+
*/
|
|
389
|
+
function formatFastPrerequisiteFailure(missing) {
|
|
390
|
+
return "github-router claude -m fast requires the following live-catalog capabilities, which this account's catalog does not fully provide:\n" + missing.map((m) => ` - ${m}`).join("\n") + "\n\nFalling back or silently dropping an agent is not supported for the fast profile's exact roster. Run plain `github-router claude` instead.";
|
|
391
|
+
}
|
|
392
|
+
//#endregion
|
|
102
393
|
//#region src/lib/one-m-context.ts
|
|
103
394
|
/**
|
|
104
395
|
* Context-window threshold at which Claude Code's `[1m]` accounting unlock is
|
|
@@ -24318,7 +24609,7 @@ const FALLBACK_TOKEN_PRICES = Object.freeze({
|
|
|
24318
24609
|
in: 200,
|
|
24319
24610
|
out: 1200
|
|
24320
24611
|
},
|
|
24321
|
-
"gemini-3.
|
|
24612
|
+
"gemini-3.8-flash": {
|
|
24322
24613
|
in: 75,
|
|
24323
24614
|
out: 375
|
|
24324
24615
|
}
|
|
@@ -24382,21 +24673,16 @@ function catalogTokenPrices(modelId) {
|
|
|
24382
24673
|
* second speed axis invites optimising a routing choice that policy already
|
|
24383
24674
|
* settles (see the decorrelation note below).
|
|
24384
24675
|
*
|
|
24385
|
-
* `gemini-3.
|
|
24386
|
-
*
|
|
24387
|
-
*
|
|
24388
|
-
*
|
|
24389
|
-
*
|
|
24390
|
-
*
|
|
24391
|
-
*
|
|
24392
|
-
*
|
|
24393
|
-
*
|
|
24394
|
-
*
|
|
24395
|
-
* Artificial Analysis figure, roughly confirmed once TTFT is excluded) against
|
|
24396
|
-
* `gpt-5.6-terra`'s ~135-190 tok/s decode — gemini-3.7-flash is the faster
|
|
24397
|
-
* decoder, but its ~1.1-1.7s TTFT (vs terra's ~0.9-1.0s) drags its TOTAL rate
|
|
24398
|
-
* below terra's on short responses, which is exactly why this row uses total,
|
|
24399
|
-
* not decode, to stay consistent with its neighbors.
|
|
24676
|
+
* The `gemini-3.8-flash` row carries forward the predecessor generation's 91
|
|
24677
|
+
* total-tokens/sec result as a conservative floor: the user confirmed 3.8 is the
|
|
24678
|
+
* same speed or slightly faster. It is not a fresh 3.8 benchmark. The predecessor
|
|
24679
|
+
* measurement (2026-08-13, n=5, one untimed warmup rep) used the script's newer
|
|
24680
|
+
* `GH_ROUTER_BENCH_STREAM=1` mode, which splits wall-clock into TTFT and a
|
|
24681
|
+
* decode-phase rate excluding the first delta's own time+tokens. The row records
|
|
24682
|
+
* the SAME metric family as every other row here (total tokens / total wall-clock,
|
|
24683
|
+
* the script's "total tok/s" column), not the decode-phase figure, so the table
|
|
24684
|
+
* remains internally comparable. `gemini-3.1-pro-preview` was re-measured with
|
|
24685
|
+
* the same method.
|
|
24400
24686
|
*/
|
|
24401
24687
|
const INDICATIVE_TOKENS_PER_SECOND = Object.freeze({
|
|
24402
24688
|
"gpt-5.6-luna": 120,
|
|
@@ -24409,7 +24695,7 @@ const INDICATIVE_TOKENS_PER_SECOND = Object.freeze({
|
|
|
24409
24695
|
"gpt-5.6-sol": 75,
|
|
24410
24696
|
"grok-4.5": 70,
|
|
24411
24697
|
"gpt-5.5": 65,
|
|
24412
|
-
"gemini-3.
|
|
24698
|
+
"gemini-3.8-flash": 91,
|
|
24413
24699
|
"gemini-3.6-flash": 45,
|
|
24414
24700
|
"gemini-3.5-flash": 40,
|
|
24415
24701
|
"gemini-3.1-pro-preview": 33
|
|
@@ -27492,305 +27778,6 @@ function shimDefaultsToXhigh(id) {
|
|
|
27492
27778
|
return XHIGH_DEFAULT_SHIM_MODELS.includes(normalizeModelId(id));
|
|
27493
27779
|
}
|
|
27494
27780
|
//#endregion
|
|
27495
|
-
//#region src/lib/launch-profile.ts
|
|
27496
|
-
const STANDARD_PROFILE = Object.freeze({
|
|
27497
|
-
id: "standard",
|
|
27498
|
-
hasCoordinator: true
|
|
27499
|
-
});
|
|
27500
|
-
/**
|
|
27501
|
-
* The `-m fast` roster: exactly five native agents (`Explore`, `implementer`,
|
|
27502
|
-
* `reviewer`, `planner`, `critic`), the fast-only `oracle` peer tool, no coordinator,
|
|
27503
|
-
* and only `peers`/`search` plus the ordinary opt-in `browser` group.
|
|
27504
|
-
* `workers`/`orchestrate`/`decide`/`fleet`/`first-mate` are hard denies even
|
|
27505
|
-
* when their independent standard-profile gates pass.
|
|
27506
|
-
*/
|
|
27507
|
-
const FAST_PROFILE = Object.freeze({
|
|
27508
|
-
id: "fast",
|
|
27509
|
-
nativeRoster: new Set(FAST_PROFILE_NATIVE_AGENT_NAMES),
|
|
27510
|
-
personaAllowlist: /* @__PURE__ */ new Set(["oracle"]),
|
|
27511
|
-
allowedGroups: /* @__PURE__ */ new Set([
|
|
27512
|
-
"peers",
|
|
27513
|
-
"search",
|
|
27514
|
-
"browser"
|
|
27515
|
-
]),
|
|
27516
|
-
hasCoordinator: false
|
|
27517
|
-
});
|
|
27518
|
-
/**
|
|
27519
|
-
* The `-m max` profile: Sol/Luna-led, browse-only workers, and explicit
|
|
27520
|
-
* cross-lab peer names. The descriptor is a hard projection for bound launch
|
|
27521
|
-
* requests; unbound/BYO traffic remains standard because it has no registry
|
|
27522
|
-
* entry carrying this allow-list.
|
|
27523
|
-
*/
|
|
27524
|
-
const MAX_PROFILE = Object.freeze({
|
|
27525
|
-
id: "max",
|
|
27526
|
-
nativeRoster: new Set(MAX_PROFILE_NATIVE_AGENT_NAMES),
|
|
27527
|
-
personaAllowlist: /* @__PURE__ */ new Set([
|
|
27528
|
-
"sol_critic",
|
|
27529
|
-
"luna_reviewer",
|
|
27530
|
-
"opus_critic",
|
|
27531
|
-
"gemini_critic",
|
|
27532
|
-
"gemini_reviewer",
|
|
27533
|
-
"grok_critic",
|
|
27534
|
-
"grok_reviewer"
|
|
27535
|
-
]),
|
|
27536
|
-
allowedGroups: /* @__PURE__ */ new Set([
|
|
27537
|
-
"peers",
|
|
27538
|
-
"search",
|
|
27539
|
-
"workers",
|
|
27540
|
-
"browser",
|
|
27541
|
-
"decide",
|
|
27542
|
-
"fleet",
|
|
27543
|
-
"first-mate"
|
|
27544
|
-
]),
|
|
27545
|
-
hasCoordinator: true
|
|
27546
|
-
});
|
|
27547
|
-
function profileDescriptor(id) {
|
|
27548
|
-
if (id === "fast") return FAST_PROFILE;
|
|
27549
|
-
if (id === "max") return MAX_PROFILE;
|
|
27550
|
-
return STANDARD_PROFILE;
|
|
27551
|
-
}
|
|
27552
|
-
/**
|
|
27553
|
-
* Resolve the parsed `-m` argument to a launch profile.
|
|
27554
|
-
*
|
|
27555
|
-
* Deliberately keyed on the RAW alias string (trimmed, case-insensitive
|
|
27556
|
-
* `"fast"`), never on a resolved model id: `resolveLeadSlugArg` maps `fast`
|
|
27557
|
-
* to `FAST_LEAD_MODEL` (`./port`) before this is of any use to a caller who
|
|
27558
|
-
* only has the resolved id, so callers that already resolved the lead must
|
|
27559
|
-
* pass the ORIGINAL `-m` value here, not the resolved one. This is what
|
|
27560
|
-
* keeps `-m gpt-5.6-luna` (a direct pin of the same underlying model) a
|
|
27561
|
-
* standard-surface launch — only the literal alias narrows the surface.
|
|
27562
|
-
*/
|
|
27563
|
-
function resolveLaunchProfile(modelArg) {
|
|
27564
|
-
const arg = modelArg?.trim().toLowerCase();
|
|
27565
|
-
if (arg === "fast") return "fast";
|
|
27566
|
-
if (arg === "max") return "max";
|
|
27567
|
-
return "standard";
|
|
27568
|
-
}
|
|
27569
|
-
function validateMaxProfileLaunch(catalog) {
|
|
27570
|
-
return validateMaxProfilePrerequisites(catalog);
|
|
27571
|
-
}
|
|
27572
|
-
/**
|
|
27573
|
-
* Router-owned alias id for the fast profile's Sonnet-tier row
|
|
27574
|
-
* (`ANTHROPIC_DEFAULT_SONNET_MODEL`). Never sent upstream — canonicalized to
|
|
27575
|
-
* `LUNA_REAL_MODEL_ID` by `canonicalizeAliasModel` before the request
|
|
27576
|
-
* reaches Copilot.
|
|
27577
|
-
*/
|
|
27578
|
-
const LUNA_DRIVER_ALIAS_ID = "gh-router-luna-driver-max";
|
|
27579
|
-
/** Fast native-agent alias ids preserve role-specific effort provenance until
|
|
27580
|
-
* the authenticated request boundary. They both canonicalize to Luna, but the
|
|
27581
|
-
* Explore is fixed high while the implementer is fixed max. */
|
|
27582
|
-
const LUNA_SCOUT_ALIAS_ID = "gh-router-luna-scout-high";
|
|
27583
|
-
const LUNA_IMPLEMENTER_ALIAS_ID = "gh-router-luna-implementer-max";
|
|
27584
|
-
/** Fast-profile critic alias. It preserves Gemini's fixed medium effort until
|
|
27585
|
-
* the authenticated request boundary; bare Gemini remains high for the lead
|
|
27586
|
-
* and Advisor traffic. */
|
|
27587
|
-
const FAST_CRITIC_ALIAS_ID = "gh-router-fast-critic-medium";
|
|
27588
|
-
const LUNA_SONNET_ALIAS_ID = "gh-router-luna-sonnet-xhigh";
|
|
27589
|
-
/**
|
|
27590
|
-
* Router-owned alias id for the fast profile's Haiku-tier row
|
|
27591
|
-
* (`ANTHROPIC_DEFAULT_HAIKU_MODEL` / `ANTHROPIC_SMALL_FAST_MODEL`).
|
|
27592
|
-
*/
|
|
27593
|
-
const LUNA_HAIKU_ALIAS_ID = "gh-router-luna-haiku-high";
|
|
27594
|
-
/** Max-profile aliases are intentionally separate from the fast aliases. They
|
|
27595
|
-
* preserve the fixed max role effort until the authenticated max request
|
|
27596
|
-
* boundary and are never valid on standard or fast launches. */
|
|
27597
|
-
const MAX_LUNA_HIGH_ALIAS_ID = "gh-router-max-luna-high";
|
|
27598
|
-
const MAX_LUNA_MAX_ALIAS_ID = "gh-router-max-luna-max";
|
|
27599
|
-
/** The real Copilot catalog id every Luna alias (including the driver
|
|
27600
|
-
* itself) canonicalizes to. */
|
|
27601
|
-
const LUNA_REAL_MODEL_ID = FAST_PROFILE_MODELS.luna;
|
|
27602
|
-
const MAX_ALIAS_IDS = /* @__PURE__ */ new Set([MAX_LUNA_HIGH_ALIAS_ID, MAX_LUNA_MAX_ALIAS_ID]);
|
|
27603
|
-
function isMaxModelAlias(id) {
|
|
27604
|
-
return MAX_ALIAS_IDS.has(stripTrailingOneMSuffix(id).base);
|
|
27605
|
-
}
|
|
27606
|
-
function maxAliasEffort(id) {
|
|
27607
|
-
const base = stripTrailingOneMSuffix(id).base;
|
|
27608
|
-
if (base === "gh-router-max-luna-high") return "high";
|
|
27609
|
-
if (base === "gh-router-max-luna-max") return "max";
|
|
27610
|
-
}
|
|
27611
|
-
function maxAliasModel(id) {
|
|
27612
|
-
return isMaxModelAlias(id) ? LUNA_REAL_MODEL_ID : void 0;
|
|
27613
|
-
}
|
|
27614
|
-
/**
|
|
27615
|
-
* The full alias table, keyed by `aliasId`. A simpler model-id-only table is
|
|
27616
|
-
* rejected by design: the driver, the Sonnet tier, and the Haiku tier all
|
|
27617
|
-
* resolve to the SAME Luna catalog id, while the fast critic alias resolves
|
|
27618
|
-
* to Gemini. After early canonicalization a table keyed on the real id could
|
|
27619
|
-
* no longer tell which absent-effort default applies. Alias provenance is the
|
|
27620
|
-
* minimum discriminator that survives from tier selection through to request
|
|
27621
|
-
* preprocessing, which is why canonicalization must happen LAST (in the
|
|
27622
|
-
* `/v1/messages` identity preflight), after the effort default has already
|
|
27623
|
-
* been read off the alias.
|
|
27624
|
-
*/
|
|
27625
|
-
const MODEL_ALIAS_TABLE = /* @__PURE__ */ new Map([
|
|
27626
|
-
[LUNA_DRIVER_ALIAS_ID, {
|
|
27627
|
-
aliasId: LUNA_DRIVER_ALIAS_ID,
|
|
27628
|
-
realModel: LUNA_REAL_MODEL_ID,
|
|
27629
|
-
absentEffortDefault: "max"
|
|
27630
|
-
}],
|
|
27631
|
-
[MAX_LUNA_HIGH_ALIAS_ID, {
|
|
27632
|
-
aliasId: MAX_LUNA_HIGH_ALIAS_ID,
|
|
27633
|
-
realModel: LUNA_REAL_MODEL_ID,
|
|
27634
|
-
absentEffortDefault: "high"
|
|
27635
|
-
}],
|
|
27636
|
-
[MAX_LUNA_MAX_ALIAS_ID, {
|
|
27637
|
-
aliasId: MAX_LUNA_MAX_ALIAS_ID,
|
|
27638
|
-
realModel: LUNA_REAL_MODEL_ID,
|
|
27639
|
-
absentEffortDefault: "max"
|
|
27640
|
-
}],
|
|
27641
|
-
[LUNA_SCOUT_ALIAS_ID, {
|
|
27642
|
-
aliasId: LUNA_SCOUT_ALIAS_ID,
|
|
27643
|
-
realModel: LUNA_REAL_MODEL_ID,
|
|
27644
|
-
absentEffortDefault: "high"
|
|
27645
|
-
}],
|
|
27646
|
-
[LUNA_IMPLEMENTER_ALIAS_ID, {
|
|
27647
|
-
aliasId: LUNA_IMPLEMENTER_ALIAS_ID,
|
|
27648
|
-
realModel: LUNA_REAL_MODEL_ID,
|
|
27649
|
-
absentEffortDefault: "max"
|
|
27650
|
-
}],
|
|
27651
|
-
[FAST_CRITIC_ALIAS_ID, {
|
|
27652
|
-
aliasId: FAST_CRITIC_ALIAS_ID,
|
|
27653
|
-
realModel: FAST_PROFILE_MODELS.critic,
|
|
27654
|
-
absentEffortDefault: "medium"
|
|
27655
|
-
}],
|
|
27656
|
-
[LUNA_SONNET_ALIAS_ID, {
|
|
27657
|
-
aliasId: LUNA_SONNET_ALIAS_ID,
|
|
27658
|
-
realModel: LUNA_REAL_MODEL_ID,
|
|
27659
|
-
absentEffortDefault: "xhigh"
|
|
27660
|
-
}],
|
|
27661
|
-
[LUNA_HAIKU_ALIAS_ID, {
|
|
27662
|
-
aliasId: LUNA_HAIKU_ALIAS_ID,
|
|
27663
|
-
realModel: LUNA_REAL_MODEL_ID,
|
|
27664
|
-
absentEffortDefault: "high"
|
|
27665
|
-
}]
|
|
27666
|
-
]);
|
|
27667
|
-
/**
|
|
27668
|
-
* Look up the alias descriptor for a wire-facing model id (with or without
|
|
27669
|
-
* a trailing `[1m]` bracket — the bracket is stripped before the table
|
|
27670
|
-
* lookup and is orthogonal to alias identity). Returns undefined for any
|
|
27671
|
-
* id that isn't one of the registered aliases (including bare `claude-*`
|
|
27672
|
-
* ids and every other real Copilot catalog id).
|
|
27673
|
-
*/
|
|
27674
|
-
function resolveModelAlias(id) {
|
|
27675
|
-
const { base } = stripTrailingOneMSuffix(id);
|
|
27676
|
-
return MODEL_ALIAS_TABLE.get(base);
|
|
27677
|
-
}
|
|
27678
|
-
/**
|
|
27679
|
-
* Strip alias provenance and return the real catalog id to send upstream.
|
|
27680
|
-
* Idempotent passthrough for any id that isn't a registered alias (a bare
|
|
27681
|
-
* `claude-*` slug, an already-real Copilot id, or anything else) — this is
|
|
27682
|
-
* safe to call unconditionally on every `body.model` at the outbound
|
|
27683
|
-
* boundary. Preserves a trailing `[1m]` bracket: canonicalization only
|
|
27684
|
-
* erases ALIAS identity, not the 1M-context accounting decoration.
|
|
27685
|
-
*/
|
|
27686
|
-
function canonicalizeAliasModel(id) {
|
|
27687
|
-
const { base, hadSuffix } = stripTrailingOneMSuffix(id);
|
|
27688
|
-
const alias = MODEL_ALIAS_TABLE.get(base);
|
|
27689
|
-
if (!alias) return normalizeTrailingOneMSuffix(id);
|
|
27690
|
-
return hadSuffix ? `${alias.realModel}[1m]` : alias.realModel;
|
|
27691
|
-
}
|
|
27692
|
-
const FAST_REQUIRED_CONTEXT_TOKENS = 1e6;
|
|
27693
|
-
function findModel(catalog, id) {
|
|
27694
|
-
return catalog?.data?.find((m) => m.id === id);
|
|
27695
|
-
}
|
|
27696
|
-
function hasToolCalls(model) {
|
|
27697
|
-
return model?.capabilities?.supports?.tool_calls === true;
|
|
27698
|
-
}
|
|
27699
|
-
function hasContextAtLeast(model, tokens) {
|
|
27700
|
-
return (model?.capabilities?.limits?.max_context_window_tokens ?? 0) >= tokens;
|
|
27701
|
-
}
|
|
27702
|
-
function supportsEffort(model, effort) {
|
|
27703
|
-
const list = model?.capabilities?.supports?.reasoning_effort;
|
|
27704
|
-
return Array.isArray(list) && list.includes(effort);
|
|
27705
|
-
}
|
|
27706
|
-
const FAST_REVIEWER_MIN_PROMPT_TOKENS = 2e5;
|
|
27707
|
-
function supportsEndpoint(model, endpoint) {
|
|
27708
|
-
return model !== void 0 && fastEndpointForModel(model) === endpoint;
|
|
27709
|
-
}
|
|
27710
|
-
function hasUsablePromptMetadata(model) {
|
|
27711
|
-
const prompt = model?.capabilities?.limits?.max_prompt_tokens;
|
|
27712
|
-
return typeof prompt === "number" && Number.isFinite(prompt) && prompt > 0;
|
|
27713
|
-
}
|
|
27714
|
-
function hasPromptAtLeast(model, tokens) {
|
|
27715
|
-
const prompt = model?.capabilities?.limits?.max_prompt_tokens;
|
|
27716
|
-
return typeof prompt === "number" && Number.isFinite(prompt) && prompt >= tokens;
|
|
27717
|
-
}
|
|
27718
|
-
/**
|
|
27719
|
-
* Validate the live Copilot catalog carries every model the fast profile's
|
|
27720
|
-
* EXACT roster depends on, with the specific capabilities each assignment
|
|
27721
|
-
* needs. These are capability-availability PREREQUISITES for constructing
|
|
27722
|
-
* the roster — not an allowlist of models the user may select later in the
|
|
27723
|
-
* session — so a partial catalog fails the whole `-m fast` launch rather
|
|
27724
|
-
* than silently substituting or dropping an agent.
|
|
27725
|
-
*
|
|
27726
|
-
* Checks, per the fast-launch-profile design:
|
|
27727
|
-
* - Luna lead/Explore/implementer: tool calls, >=1M, high+max, Responses.
|
|
27728
|
-
* - Sol planner: tool calls, >=1M, high, Responses.
|
|
27729
|
-
* - Grok reviewer: tool calls, medium, Responses, usable prompt metadata.
|
|
27730
|
-
* - Gemini Advisor: >=1M, high, chat-completions.
|
|
27731
|
-
* - Gemini critic: tool calls, >=1M, medium, chat-completions.
|
|
27732
|
-
* - Opus Oracle: exact Opus 5, >=1M, adaptive/high, Messages, prompt metadata.
|
|
27733
|
-
*
|
|
27734
|
-
* Pure over the passed-in catalog snapshot so it's unit-testable without
|
|
27735
|
-
* `state` — callers pass `state.models` at call time.
|
|
27736
|
-
*/
|
|
27737
|
-
function validateFastProfilePrerequisites(catalog) {
|
|
27738
|
-
const missing = [];
|
|
27739
|
-
const luna = findModel(catalog, LUNA_REAL_MODEL_ID);
|
|
27740
|
-
if (!luna) missing.push(`${LUNA_REAL_MODEL_ID}: absent from the live catalog`);
|
|
27741
|
-
else {
|
|
27742
|
-
if (!hasToolCalls(luna)) missing.push(`${LUNA_REAL_MODEL_ID}: does not advertise tool_calls`);
|
|
27743
|
-
if (!hasContextAtLeast(luna, FAST_REQUIRED_CONTEXT_TOKENS)) missing.push(`${LUNA_REAL_MODEL_ID}: advertised context window is below 1M`);
|
|
27744
|
-
if (!supportsEffort(luna, "high") || !supportsEffort(luna, "max")) missing.push(`${LUNA_REAL_MODEL_ID}: does not advertise both "high" and "max" reasoning effort`);
|
|
27745
|
-
if (!supportsEndpoint(luna, "responses")) missing.push(`${LUNA_REAL_MODEL_ID}: does not advertise a supported Responses endpoint`);
|
|
27746
|
-
}
|
|
27747
|
-
const sol = findModel(catalog, FAST_PROFILE_MODELS.planner);
|
|
27748
|
-
if (!sol) missing.push(`${FAST_PROFILE_MODELS.planner}: absent from the live catalog`);
|
|
27749
|
-
else {
|
|
27750
|
-
if (!hasToolCalls(sol)) missing.push(`${FAST_PROFILE_MODELS.planner}: does not advertise tool_calls`);
|
|
27751
|
-
if (!hasContextAtLeast(sol, FAST_REQUIRED_CONTEXT_TOKENS)) missing.push(`${FAST_PROFILE_MODELS.planner}: advertised context window is below 1M`);
|
|
27752
|
-
if (!supportsEffort(sol, "high")) missing.push(`${FAST_PROFILE_MODELS.planner}: does not advertise a "high" reasoning effort`);
|
|
27753
|
-
if (!supportsEndpoint(sol, "responses")) missing.push(`${FAST_PROFILE_MODELS.planner}: does not advertise a supported Responses endpoint`);
|
|
27754
|
-
}
|
|
27755
|
-
const grok = findModel(catalog, FAST_PROFILE_MODELS.reviewer);
|
|
27756
|
-
if (!grok) missing.push(`${FAST_PROFILE_MODELS.reviewer}: absent from the live catalog`);
|
|
27757
|
-
else {
|
|
27758
|
-
if (!hasToolCalls(grok)) missing.push(`${FAST_PROFILE_MODELS.reviewer}: does not advertise tool_calls`);
|
|
27759
|
-
if (!supportsEffort(grok, "medium")) missing.push(`${FAST_PROFILE_MODELS.reviewer}: does not advertise a "medium" reasoning effort`);
|
|
27760
|
-
if (!hasPromptAtLeast(grok, 2e5)) missing.push(`${FAST_PROFILE_MODELS.reviewer}: advertised max_prompt_tokens is below ${FAST_REVIEWER_MIN_PROMPT_TOKENS}`);
|
|
27761
|
-
if (!supportsEndpoint(grok, "responses")) missing.push(`${FAST_PROFILE_MODELS.reviewer}: does not advertise a supported Responses endpoint`);
|
|
27762
|
-
}
|
|
27763
|
-
const gemini = findModel(catalog, FAST_PROFILE_MODELS.critic);
|
|
27764
|
-
if (!gemini) missing.push(`${FAST_PROFILE_MODELS.critic}: absent from the live catalog`);
|
|
27765
|
-
else {
|
|
27766
|
-
if (!hasToolCalls(gemini)) missing.push(`${FAST_PROFILE_MODELS.critic}: does not advertise tool_calls for the native critic`);
|
|
27767
|
-
if (!hasContextAtLeast(gemini, FAST_REQUIRED_CONTEXT_TOKENS)) missing.push(`${FAST_PROFILE_MODELS.critic}: advertised context window is below 1M`);
|
|
27768
|
-
if (!supportsEffort(gemini, "high")) missing.push(`${FAST_PROFILE_MODELS.critic}: does not advertise a "high" reasoning effort for Advisor`);
|
|
27769
|
-
if (!supportsEffort(gemini, "medium")) missing.push(`${FAST_PROFILE_MODELS.critic}: does not advertise a "medium" reasoning effort for the native critic`);
|
|
27770
|
-
if (!supportsEndpoint(gemini, "chat")) missing.push(`${FAST_PROFILE_MODELS.critic}: does not advertise a supported chat-completions endpoint`);
|
|
27771
|
-
}
|
|
27772
|
-
const opus = findModel(catalog, FAST_PROFILE_MODELS.oracle);
|
|
27773
|
-
if (!opus) missing.push(`${FAST_PROFILE_MODELS.oracle}: absent from the live catalog`);
|
|
27774
|
-
else {
|
|
27775
|
-
if (!hasContextAtLeast(opus, FAST_REQUIRED_CONTEXT_TOKENS)) missing.push(`${FAST_PROFILE_MODELS.oracle}: advertised context window is below 1M`);
|
|
27776
|
-
if (!supportsEffort(opus, "high")) missing.push(`${FAST_PROFILE_MODELS.oracle}: does not advertise a "high" reasoning effort`);
|
|
27777
|
-
if (opus.capabilities?.supports?.adaptive_thinking !== true) missing.push(`${FAST_PROFILE_MODELS.oracle}: does not advertise adaptive_thinking`);
|
|
27778
|
-
if (!hasUsablePromptMetadata(opus)) missing.push(`${FAST_PROFILE_MODELS.oracle}: no usable max_prompt_tokens metadata`);
|
|
27779
|
-
if (!supportsEndpoint(opus, "messages")) missing.push(`${FAST_PROFILE_MODELS.oracle}: does not advertise a supported Messages endpoint`);
|
|
27780
|
-
}
|
|
27781
|
-
return {
|
|
27782
|
-
ok: missing.length === 0,
|
|
27783
|
-
missing
|
|
27784
|
-
};
|
|
27785
|
-
}
|
|
27786
|
-
/**
|
|
27787
|
-
* Format `validateFastProfilePrerequisites`'s failure list into the launch
|
|
27788
|
-
* error message: every missing/invalid model, plus the rollback command.
|
|
27789
|
-
*/
|
|
27790
|
-
function formatFastPrerequisiteFailure(missing) {
|
|
27791
|
-
return "github-router claude -m fast requires the following live-catalog capabilities, which this account's catalog does not fully provide:\n" + missing.map((m) => ` - ${m}`).join("\n") + "\n\nFalling back or silently dropping an agent is not supported for the fast profile's exact roster. Run plain `github-router claude` instead.";
|
|
27792
|
-
}
|
|
27793
|
-
//#endregion
|
|
27794
27781
|
//#region src/lib/mcp-capabilities.ts
|
|
27795
27782
|
/**
|
|
27796
27783
|
* Capability-gate predicates for the proxy's MCP tool surface.
|
|
@@ -27807,7 +27794,7 @@ function formatFastPrerequisiteFailure(missing) {
|
|
|
27807
27794
|
* live tool list would be a silent regression (the snippet would name
|
|
27808
27795
|
* a tool the live catalog doesn't expose).
|
|
27809
27796
|
*/
|
|
27810
|
-
const REVIEW_FAST_DEFAULT_MODEL = "gemini-3.
|
|
27797
|
+
const REVIEW_FAST_DEFAULT_MODEL = "gemini-3.8-flash";
|
|
27811
27798
|
/**
|
|
27812
27799
|
* Gate for the `stand_in` tool.
|
|
27813
27800
|
*
|
|
@@ -27817,8 +27804,8 @@ const REVIEW_FAST_DEFAULT_MODEL = "gemini-3.7-flash";
|
|
|
27817
27804
|
* `resolveOpenAiFrontier`)
|
|
27818
27805
|
* - `claude-opus-5` (stand_in's Anthropic slot)
|
|
27819
27806
|
* - standard/BYO: the preferred Gemini reviewer model
|
|
27820
|
-
* (`gemini-3.1-pro-preview`, falling back to `gemini-3.
|
|
27821
|
-
* - max: Grok 4.6/high when usable, otherwise Gemini 3.
|
|
27807
|
+
* (`gemini-3.1-pro-preview`, falling back to `gemini-3.8-flash`)
|
|
27808
|
+
* - max: Grok 4.6/high when usable, otherwise Gemini 3.8 Flash 1M/high
|
|
27822
27809
|
*
|
|
27823
27810
|
* If any one is missing, `stand_in` is dropped from `tools/list` AND
|
|
27824
27811
|
* fails `tools/call` with -32601 (mirroring the `worker` capability's
|
|
@@ -27838,7 +27825,7 @@ const REVIEW_FAST_DEFAULT_MODEL = "gemini-3.7-flash";
|
|
|
27838
27825
|
* simplification.
|
|
27839
27826
|
*/
|
|
27840
27827
|
function findGeminiProGaRename(models) {
|
|
27841
|
-
return models.find((m) => /^gemini-3\..*pro/i.test(m.id) && m.id !== "gemini-3.1-pro-preview" && m.id !== "gemini-3.
|
|
27828
|
+
return models.find((m) => /^gemini-3\..*pro/i.test(m.id) && m.id !== "gemini-3.1-pro-preview" && m.id !== "gemini-3.8-flash")?.id;
|
|
27842
27829
|
}
|
|
27843
27830
|
function resolveGeminiReviewModel(source = state) {
|
|
27844
27831
|
const models = source.models?.data;
|
|
@@ -27846,7 +27833,7 @@ function resolveGeminiReviewModel(source = state) {
|
|
|
27846
27833
|
if (models.some((m) => m.id === "gemini-3.1-pro-preview")) return GEMINI_REVIEW_DEFAULT_MODEL;
|
|
27847
27834
|
const gaRename = findGeminiProGaRename(models);
|
|
27848
27835
|
if (gaRename) return gaRename;
|
|
27849
|
-
if (models.some((m) => m.id === "gemini-3.
|
|
27836
|
+
if (models.some((m) => m.id === "gemini-3.8-flash")) return REVIEW_FAST_DEFAULT_MODEL;
|
|
27850
27837
|
}
|
|
27851
27838
|
/**
|
|
27852
27839
|
* Gemini review candidates in preference order, for resolvers that ALSO need
|
|
@@ -27978,16 +27965,16 @@ function scribeModel() {
|
|
|
27978
27965
|
* impostor wearing the cheap agent's name.
|
|
27979
27966
|
*
|
|
27980
27967
|
* `gpt-5.6-luna` leads because it is the cheapest 1M-context model in the
|
|
27981
|
-
* catalog; `gemini-3.
|
|
27968
|
+
* catalog; `gemini-3.8-flash` remains the cross-vendor fallback so an OpenAI-side
|
|
27982
27969
|
* outage does not remove the scout. Both entries must continue advertising at
|
|
27983
27970
|
* least 1M context so Claude Code's `[1m]` accounting remains honest if an
|
|
27984
27971
|
* upstream catalog entry shrinks.
|
|
27985
27972
|
*
|
|
27986
|
-
* The fallback moved off `gemini-3.6-flash` on 2026-08-13
|
|
27987
|
-
* is strictly better on every axis this chain
|
|
27988
|
-
* (75/375 vs 150/750 per 1M),
|
|
27989
|
-
*
|
|
27990
|
-
*
|
|
27973
|
+
* The fallback moved off `gemini-3.6-flash` on 2026-08-13 and subsequently
|
|
27974
|
+
* upgraded to `gemini-3.8-flash`: it is strictly better on every axis this chain
|
|
27975
|
+
* cares about — half the price (75/375 vs 150/750 per 1M), fast tool-call
|
|
27976
|
+
* performance, same 1M window, same vendor, so the cross-vendor property the
|
|
27977
|
+
* fallback exists for is preserved.
|
|
27991
27978
|
*
|
|
27992
27979
|
* This chain deliberately uses literal ids rather than `EXPLORE_DEFAULT_MODEL`:
|
|
27993
27980
|
* the explore worker default and scout's cross-vendor fallback are independent
|
|
@@ -27995,7 +27982,7 @@ function scribeModel() {
|
|
|
27995
27982
|
* 400K last resort. On a catalog carrying neither chain member, `scout` is
|
|
27996
27983
|
* dropped rather than inheriting the lead or presenting a narrower-context agent.
|
|
27997
27984
|
*/
|
|
27998
|
-
const SCOUT_MODEL_CHAIN = Object.freeze(["gpt-5.6-luna", "gemini-3.
|
|
27985
|
+
const SCOUT_MODEL_CHAIN = Object.freeze(["gpt-5.6-luna", "gemini-3.8-flash"]);
|
|
27999
27986
|
function scoutModel() {
|
|
28000
27987
|
return firstPresentInCatalog(SCOUT_MODEL_CHAIN, {
|
|
28001
27988
|
requireToolCalls: true,
|
|
@@ -28041,20 +28028,22 @@ function generalPurposeFastModel() {
|
|
|
28041
28028
|
}
|
|
28042
28029
|
/** @deprecated Fast `scout` was renamed to capitalized `Explore`. */
|
|
28043
28030
|
const FAST_SCOUT_MODEL = FAST_PROFILE_NATIVE_MODELS.Explore;
|
|
28031
|
+
const FAST_PLAN_MODEL = FAST_PROFILE_NATIVE_MODELS.Plan;
|
|
28032
|
+
const FAST_GENERAL_PURPOSE_MODEL = FAST_PROFILE_NATIVE_MODELS["general-purpose"];
|
|
28044
28033
|
const FAST_IMPLEMENTER_MODEL = FAST_PROFILE_NATIVE_MODELS.implementer;
|
|
28045
28034
|
/** Grok 4.6 advertises 500K total context / 372K max prompt, so it remains bare
|
|
28046
28035
|
* and is gated by max_prompt_tokens rather than the 1M floor. */
|
|
28047
28036
|
const FAST_REVIEWER_MODEL = FAST_PROFILE_NATIVE_MODELS.reviewer;
|
|
28048
|
-
const
|
|
28049
|
-
const FAST_CRITIC_MODEL = FAST_PROFILE_NATIVE_MODELS.critic;
|
|
28037
|
+
const FAST_ADVISOR_MODEL = FAST_PROFILE_MODELS.advisor;
|
|
28050
28038
|
const FAST_ORACLE_MODEL = FAST_PROFILE_ORACLE_MODEL;
|
|
28051
|
-
/**
|
|
28052
|
-
const
|
|
28039
|
+
/** Fixed effort pins for the fast profile. */
|
|
28040
|
+
const FAST_EXPLORE_EFFORT = FAST_PROFILE_NATIVE_EFFORTS.Explore;
|
|
28041
|
+
const FAST_PLAN_EFFORT = FAST_PROFILE_NATIVE_EFFORTS.Plan;
|
|
28042
|
+
const FAST_GENERAL_PURPOSE_EFFORT = FAST_PROFILE_NATIVE_EFFORTS["general-purpose"];
|
|
28053
28043
|
const FAST_IMPLEMENTER_EFFORT = FAST_PROFILE_NATIVE_EFFORTS.implementer;
|
|
28054
28044
|
const FAST_REVIEWER_EFFORT = FAST_PROFILE_NATIVE_EFFORTS.reviewer;
|
|
28055
|
-
const FAST_PLANNER_EFFORT = FAST_PROFILE_NATIVE_EFFORTS.planner;
|
|
28056
|
-
const FAST_CRITIC_EFFORT = FAST_PROFILE_NATIVE_EFFORTS.critic;
|
|
28057
28045
|
const FAST_ORACLE_EFFORT = FAST_PROFILE_ORACLE_EFFORT;
|
|
28046
|
+
const FAST_ADVISOR_EFFORT = FAST_PROFILE_ADVISOR_EFFORT;
|
|
28058
28047
|
function fastScoutModel() {
|
|
28059
28048
|
const id = firstPresentInCatalog([FAST_SCOUT_MODEL], {
|
|
28060
28049
|
requireToolCalls: true,
|
|
@@ -28062,28 +28051,43 @@ function fastScoutModel() {
|
|
|
28062
28051
|
});
|
|
28063
28052
|
if (!id) return void 0;
|
|
28064
28053
|
const found = state.models?.data.find((m) => m.id === id);
|
|
28054
|
+
const efforts = found?.capabilities?.supports?.reasoning_effort;
|
|
28055
|
+
if (!Array.isArray(efforts) || !efforts.includes(FAST_EXPLORE_EFFORT)) return void 0;
|
|
28065
28056
|
return found && fastEndpointForModel(found) === "responses" ? id : void 0;
|
|
28066
28057
|
}
|
|
28067
|
-
function
|
|
28068
|
-
const id = firstPresentInCatalog([
|
|
28058
|
+
function fastPlanModel() {
|
|
28059
|
+
const id = firstPresentInCatalog([FAST_PLAN_MODEL], {
|
|
28069
28060
|
requireToolCalls: true,
|
|
28070
28061
|
minContextTokens: ONE_M_TOKENS
|
|
28071
28062
|
});
|
|
28072
28063
|
if (!id) return void 0;
|
|
28073
28064
|
const found = state.models?.data.find((m) => m.id === id);
|
|
28065
|
+
const efforts = found?.capabilities?.supports?.reasoning_effort;
|
|
28066
|
+
if (!Array.isArray(efforts) || !efforts.includes(FAST_PLAN_EFFORT)) return void 0;
|
|
28067
|
+
if (!found || fastEndpointForModel(found) !== "responses") return void 0;
|
|
28068
|
+
return id;
|
|
28069
|
+
}
|
|
28070
|
+
function fastGeneralPurposeModel() {
|
|
28071
|
+
const id = firstPresentInCatalog([FAST_GENERAL_PURPOSE_MODEL], {
|
|
28072
|
+
requireToolCalls: true,
|
|
28073
|
+
minContextTokens: ONE_M_TOKENS
|
|
28074
|
+
});
|
|
28075
|
+
if (!id) return void 0;
|
|
28076
|
+
const found = state.models?.data.find((m) => m.id === id);
|
|
28077
|
+
const efforts = found?.capabilities?.supports?.reasoning_effort;
|
|
28078
|
+
if (!Array.isArray(efforts) || !efforts.includes(FAST_GENERAL_PURPOSE_EFFORT)) return void 0;
|
|
28074
28079
|
return found && fastEndpointForModel(found) === "responses" ? id : void 0;
|
|
28075
28080
|
}
|
|
28076
|
-
function
|
|
28077
|
-
const id = firstPresentInCatalog([
|
|
28081
|
+
function fastImplementerModel() {
|
|
28082
|
+
const id = firstPresentInCatalog([FAST_IMPLEMENTER_MODEL], {
|
|
28078
28083
|
requireToolCalls: true,
|
|
28079
28084
|
minContextTokens: ONE_M_TOKENS
|
|
28080
28085
|
});
|
|
28081
28086
|
if (!id) return void 0;
|
|
28082
28087
|
const found = state.models?.data.find((m) => m.id === id);
|
|
28083
28088
|
const efforts = found?.capabilities?.supports?.reasoning_effort;
|
|
28084
|
-
if (!Array.isArray(efforts) || !efforts.includes(
|
|
28085
|
-
|
|
28086
|
-
return id;
|
|
28089
|
+
if (!Array.isArray(efforts) || !efforts.includes(FAST_IMPLEMENTER_EFFORT)) return void 0;
|
|
28090
|
+
return found && fastEndpointForModel(found) === "chat" ? id : void 0;
|
|
28087
28091
|
}
|
|
28088
28092
|
/** Gate Grok on the prompt limit that actually constrains pasted review input. */
|
|
28089
28093
|
function fastReviewerModel() {
|
|
@@ -28098,17 +28102,15 @@ function fastReviewerModel() {
|
|
|
28098
28102
|
if (fastEndpointForModel(found) !== "responses") return void 0;
|
|
28099
28103
|
return FAST_REVIEWER_MODEL;
|
|
28100
28104
|
}
|
|
28101
|
-
/**
|
|
28102
|
-
|
|
28103
|
-
|
|
28104
|
-
const found = state.models?.data.find((m) => m.id === FAST_CRITIC_MODEL);
|
|
28105
|
+
/** Dedicated Gemini 3.8 Flash Advisor check. */
|
|
28106
|
+
function fastAdvisorModel() {
|
|
28107
|
+
const found = state.models?.data.find((m) => m.id === FAST_ADVISOR_MODEL);
|
|
28105
28108
|
if (!found) return void 0;
|
|
28106
|
-
if (found.capabilities?.supports?.tool_calls !== true) return void 0;
|
|
28107
28109
|
if ((found.capabilities?.limits?.max_context_window_tokens ?? 0) < 1e6) return void 0;
|
|
28108
28110
|
const efforts = found.capabilities?.supports?.reasoning_effort;
|
|
28109
|
-
if (!Array.isArray(efforts) || !efforts.includes(
|
|
28111
|
+
if (!Array.isArray(efforts) || !efforts.includes(FAST_ADVISOR_EFFORT)) return void 0;
|
|
28110
28112
|
if (fastEndpointForModel(found) !== "chat") return void 0;
|
|
28111
|
-
return
|
|
28113
|
+
return FAST_ADVISOR_MODEL;
|
|
28112
28114
|
}
|
|
28113
28115
|
/** Exact Opus 5 only: the fast Oracle never inherits standard opus_critic's
|
|
28114
28116
|
* older-family fallback. */
|
|
@@ -28420,7 +28422,7 @@ function activePersonas(launch) {
|
|
|
28420
28422
|
function oracleToolEntry() {
|
|
28421
28423
|
return {
|
|
28422
28424
|
name: "oracle",
|
|
28423
|
-
description: "Fast-profile last-resort guidance from exact Opus 5 (1M context) at high effort.
|
|
28425
|
+
description: "Fast-profile last-resort guidance from exact Opus 5 (1M context) at high effort. Available only to the lead and Plan: pass complete context plus one precise consequential question when repository evidence cannot settle it. It is stateless and tool-less; it cannot inspect the repo, execute, merge, or authorize actions.",
|
|
28424
28426
|
inputSchema: {
|
|
28425
28427
|
type: "object",
|
|
28426
28428
|
required: ["query", "context"],
|
|
@@ -28467,6 +28469,24 @@ function maxAllowsTool(scope, launch, item) {
|
|
|
28467
28469
|
if (item.tool.group === "workers" && item.tool.toolNameHttp !== "browse") return false;
|
|
28468
28470
|
return maxToolIsEnabled(item.tool);
|
|
28469
28471
|
}
|
|
28472
|
+
function fastToolIsEnabled(tool) {
|
|
28473
|
+
if (tool.group === "search") return true;
|
|
28474
|
+
if (tool.group === "peers") return tool.capability === "artifact" && artifactToolsEnabled();
|
|
28475
|
+
if (tool.group === "workers") return tool.toolNameHttp === "browse" && tool.capability === "browse_agent" && browseAgentEnabled();
|
|
28476
|
+
if (tool.group !== "browser") return false;
|
|
28477
|
+
if (!browserToolsEnabled()) return false;
|
|
28478
|
+
if (tool.capability === "browser_compound") return browserCompoundToolsEnabled();
|
|
28479
|
+
if (tool.capability === "browser_power") return browserPowerToolsEnabled();
|
|
28480
|
+
return tool.capability === "browser";
|
|
28481
|
+
}
|
|
28482
|
+
/** Shared Fast projection for list and call, including non-persona dispatch kind. */
|
|
28483
|
+
function fastAllowsTool(scope, launch, item) {
|
|
28484
|
+
if (launch.profileId !== "fast") return true;
|
|
28485
|
+
if (scope !== "all" && item.group !== scope) return false;
|
|
28486
|
+
if (!launch.allowedGroups?.has(item.group)) return false;
|
|
28487
|
+
if (item.persona) return false;
|
|
28488
|
+
return item.tool !== void 0 && fastToolIsEnabled(item.tool);
|
|
28489
|
+
}
|
|
28470
28490
|
function toolEntries(scope, launch) {
|
|
28471
28491
|
if (launch.profileId === "max") {
|
|
28472
28492
|
const personaEntries = activePersonas(launch).filter((persona) => maxAllowsTool(scope, launch, {
|
|
@@ -28508,7 +28528,7 @@ function toolEntries(scope, launch) {
|
|
|
28508
28528
|
tool
|
|
28509
28529
|
})).map((tool) => ({
|
|
28510
28530
|
name: tool.toolNameHttp,
|
|
28511
|
-
description: tool.toolNameHttp === "stand_in" ? "Three-lab away-mode decision tiebreak for bounded choices while the user is unavailable. The max panel is Sol, Opus 5, and Grok 4.6 at high effort when available, otherwise Gemini 3.
|
|
28531
|
+
description: tool.toolNameHttp === "stand_in" ? "Three-lab away-mode decision tiebreak for bounded choices while the user is unavailable. The max panel is Sol, Opus 5, and Grok 4.6 at high effort when available, otherwise Gemini 3.8 Flash 1M at high. It recommends but never executes; destructive actions still require the user." : tool.description,
|
|
28512
28532
|
inputSchema: tool.inputSchema
|
|
28513
28533
|
}));
|
|
28514
28534
|
return [...personaEntries, ...nonPersonaEntries];
|
|
@@ -28517,19 +28537,11 @@ function toolEntries(scope, launch) {
|
|
|
28517
28537
|
const entries = [];
|
|
28518
28538
|
if ((scope === "all" || scope === "peers") && launch.allowedGroups?.has("peers") && launch.allowedPersonas?.has("oracle") && fastOracleModel()) entries.push(oracleToolEntry());
|
|
28519
28539
|
for (const tool of NON_PERSONA_MCP_TOOLS) {
|
|
28520
|
-
if (scope
|
|
28521
|
-
|
|
28522
|
-
|
|
28523
|
-
|
|
28524
|
-
|
|
28525
|
-
description: tool.description,
|
|
28526
|
-
inputSchema: tool.inputSchema
|
|
28527
|
-
});
|
|
28528
|
-
continue;
|
|
28529
|
-
}
|
|
28530
|
-
if (tool.group !== "browser" || !browserToolsEnabled()) continue;
|
|
28531
|
-
if (tool.capability === "browser_compound" && !browserCompoundToolsEnabled()) continue;
|
|
28532
|
-
if (tool.capability === "browser_power" && !browserPowerToolsEnabled()) continue;
|
|
28540
|
+
if (!fastAllowsTool(scope, launch, {
|
|
28541
|
+
group: tool.group,
|
|
28542
|
+
name: tool.toolNameHttp,
|
|
28543
|
+
tool
|
|
28544
|
+
})) continue;
|
|
28533
28545
|
entries.push({
|
|
28534
28546
|
name: tool.toolNameHttp,
|
|
28535
28547
|
description: tool.description,
|
|
@@ -28960,6 +28972,19 @@ async function handleToolsCall(body, scope, launch, sessionWorkspace) {
|
|
|
28960
28972
|
tool: maxTool
|
|
28961
28973
|
}) : false)) return rpcError(body.id, RPC_METHOD_NOT_FOUND, `tools/call: unknown tool "${name}"`);
|
|
28962
28974
|
}
|
|
28975
|
+
if (launch.profileId === "fast" && name !== "oracle") {
|
|
28976
|
+
const fastPersona = activePersonas(launch).find((persona) => persona.toolNameHttp === name);
|
|
28977
|
+
const fastTool = NON_PERSONA_MCP_TOOLS.find((tool) => tool.toolNameHttp === name);
|
|
28978
|
+
if (!(fastPersona ? fastAllowsTool(scope, launch, {
|
|
28979
|
+
group: "peers",
|
|
28980
|
+
name,
|
|
28981
|
+
persona: fastPersona
|
|
28982
|
+
}) : fastTool ? fastAllowsTool(scope, launch, {
|
|
28983
|
+
group: fastTool.group,
|
|
28984
|
+
name,
|
|
28985
|
+
tool: fastTool
|
|
28986
|
+
}) : false)) return rpcError(body.id, RPC_METHOD_NOT_FOUND, `tools/call: unknown tool "${name}"`);
|
|
28987
|
+
}
|
|
28963
28988
|
if (launch.profileId === "fast" && name === "oracle") {
|
|
28964
28989
|
if (scope !== "all" && scope !== "peers" || !launch.allowedGroups?.has("peers") || !launch.allowedPersonas?.has("oracle") || !fastOracleModel()) return rpcError(body.id, RPC_METHOD_NOT_FOUND, `tools/call: unknown tool "${name}"`);
|
|
28965
28990
|
const query = typeof args.query === "string" ? args.query.trim() : "";
|
|
@@ -30060,7 +30085,7 @@ const ADVISOR_MIN_EFFORT = "high";
|
|
|
30060
30085
|
* the decorrelation instrument and are untouched. `GH_ROUTER_ADVISOR_MODEL`
|
|
30061
30086
|
* keeps a cross-lab advisor one env var away for anyone who wants it back. */
|
|
30062
30087
|
const ADVISOR_ESCALATION_MODEL = "claude-opus-5";
|
|
30063
|
-
/** The Advisor model for an authenticated fast primary lead. Gemini 3.
|
|
30088
|
+
/** The Advisor model for an authenticated fast primary lead. Gemini 3.8 Flash
|
|
30064
30089
|
* is cross-lab from the OpenAI-backed Luna/Sol leads and is selected only when
|
|
30065
30090
|
* its live catalog entry advertises the required Chat endpoint. Kept distinct
|
|
30066
30091
|
* from `ADVISOR_DEFAULT_MODEL` so standard launches remain unchanged. */
|
|
@@ -34210,7 +34235,7 @@ function appendPlanReminder(messages, planState) {
|
|
|
34210
34235
|
* The tool's purpose is "give me the best 3-lab judgment available";
|
|
34211
34236
|
* exposing effort knobs would invite the caller to cheap out and would
|
|
34212
34237
|
* muddy the consensus signal. Standard retains the Pro-preferred Google slot.
|
|
34213
|
-
* Max replaces that slot with Grok 4.6/high, falling back only to Gemini 3.
|
|
34238
|
+
* Max replaces that slot with Grok 4.6/high, falling back only to Gemini 3.8
|
|
34214
34239
|
* Flash/high; neither max branch can select Gemini 3.1 Pro.
|
|
34215
34240
|
*/
|
|
34216
34241
|
const STAND_IN_MODELS_BASE = Object.freeze([
|
|
@@ -34245,7 +34270,7 @@ function standInModels(opts = {}) {
|
|
|
34245
34270
|
effort: "high"
|
|
34246
34271
|
} : {
|
|
34247
34272
|
...config,
|
|
34248
|
-
key: "gemini-3.
|
|
34273
|
+
key: "gemini-3.8-flash",
|
|
34249
34274
|
model: MAX_PROFILE_MODELS.gemini,
|
|
34250
34275
|
effort: "high"
|
|
34251
34276
|
} : config);
|
|
@@ -34253,7 +34278,7 @@ function standInModels(opts = {}) {
|
|
|
34253
34278
|
const geminiModel = resolveGeminiReviewModel();
|
|
34254
34279
|
return STAND_IN_MODELS_BASE.map((config) => config.key === "gemini-3.1-pro-preview" ? {
|
|
34255
34280
|
...config,
|
|
34256
|
-
model: geminiModel ?? "gemini-3.
|
|
34281
|
+
model: geminiModel ?? "gemini-3.8-flash"
|
|
34257
34282
|
} : config);
|
|
34258
34283
|
}
|
|
34259
34284
|
const SYSTEM_PROMPT_R1 = `You are one of three frontier reasoning models the user has authorized to stand in for them on a bounded decision while they are unavailable. Your task: pick the best option from those provided.
|
|
@@ -36034,28 +36059,35 @@ function buildPeerAwarenessSnippet(opts) {
|
|
|
36034
36059
|
const key = (g) => opts.groupKeys?.[g] ?? GROUP_META[g].preferredKey;
|
|
36035
36060
|
if (opts.profile === "max") {
|
|
36036
36061
|
const searchKey = key("search");
|
|
36062
|
+
const peersKey = key("peers");
|
|
36037
36063
|
const browserClause = opts.browserToolsAvailable ?? opts.browseAvailable ? ` \`mcp__${key("browser")}__*\` provides the opt-in browser.` : "";
|
|
36038
36064
|
const workerClause = opts.browseAvailable ? ` Browse-only workers are exposed as \`worker-browse\` through \`mcp__${key("workers")}__browse\`. Core workers and orchestration are not part of max.` : "";
|
|
36039
36065
|
const decideClause = opts.standInAvailable ? ` \`mcp__${key("decide")}__stand_in\` provides deterministic three-lab decision tiebreak.` : "";
|
|
36040
36066
|
const fleetClause = opts.fleetAvailable ? ` \`mcp__${key("fleet")}__*\` provides gated remote session control.` : "";
|
|
36041
36067
|
const agentsClause = opts.agentToolsAvailable ? " `/gh-first-mate` remains available when its own gate passes." : "";
|
|
36068
|
+
const artifactClause = opts.artifactToolsAvailable ? ` \`mcp__${peersKey}__artifact_*\` provides human review in the artifact panel with auto-open on plan completion.` : "";
|
|
36042
36069
|
return [
|
|
36043
36070
|
"## Peer review and advisor",
|
|
36044
36071
|
"",
|
|
36045
36072
|
`Max launch profile. The native roster is a menu of complementary capabilities rather than a required workflow: \`Explore\` for broad discovery, \`brainstorm\` for open design choices, \`Plan\` when sequencing or acceptance criteria benefit from a separate view, \`implementer\` for bounded coding, \`general-purpose\` for mixed work, and \`reviewer\` for repository-aware verification. Their frontmatter models are intentional defaults chosen for role fit and cross-lab diversity; overrides are most useful after a concrete mismatch and remain within the max allowlist. Independent work can run in parallel when it improves context isolation or latency. Fresh-context peers can reduce correlated blind spots where deterministic evidence does not settle the issue; \`peer-review-coordinator\` can combine max-profile \`sol_critic\`, \`luna_reviewer\`, and catalog-present \`opus_critic\`, \`gemini_critic\`/\`gemini_reviewer\`, and \`grok_critic\`/\`grok_reviewer\` when the risk merits several lenses. Small or obvious tasks are often better handled directly, and model output remains evidence to synthesize rather than a vote.`,
|
|
36046
|
-
`\`mcp__${searchKey}__code\` provides semantic-first code search and \`mcp__${searchKey}__web\` provides citable web sources. Advisor is optional, non-binding, primary-lead-only counsel for a focused consequential uncertainty that direct evidence, Plan, reviewer, or peers cannot settle. It is not a supervisor, approver, or routine workflow/completion gate; consult again only when materially new evidence creates a different question. It remains available across controlled max lead switches, while native subagents and browse workers do not receive it.${opts.standInAvailable ? " Max stand_in uses Sol + Opus 5 + Grok 4.6/high when available, otherwise Gemini 3.
|
|
36073
|
+
`\`mcp__${searchKey}__code\` provides semantic-first code search and \`mcp__${searchKey}__web\` provides citable web sources. Advisor is optional, non-binding, primary-lead-only counsel for a focused consequential uncertainty that direct evidence, Plan, reviewer, or peers cannot settle. It is not a supervisor, approver, or routine workflow/completion gate; consult again only when materially new evidence creates a different question. It remains available across controlled max lead switches, while native subagents and browse workers do not receive it.${opts.standInAvailable ? " Max stand_in uses Sol + Opus 5 + Grok 4.6/high when available, otherwise Gemini 3.8 Flash 1M/high; it never uses Gemini 3.1 Pro." : ""}${opts.agentToolsAvailable ? " Max first-mate replaces any Gemini 3.1 Pro model choice with the same Grok/high → Gemini 3.8 Flash/high fallback." : ""}${browserClause}${workerClause}${decideClause}${fleetClause}${agentsClause}${artifactClause}`
|
|
36047
36074
|
].join("\n");
|
|
36048
36075
|
}
|
|
36049
36076
|
if (opts.profile === "fast") {
|
|
36050
36077
|
const fastPeersKey = key("peers");
|
|
36051
36078
|
const fastSearchKey = key("search");
|
|
36079
|
+
const fastBrowserKey = key("browser");
|
|
36080
|
+
const fastWorkersKey = key("workers");
|
|
36081
|
+
const browserClause = opts.browserToolsAvailable ?? opts.browseAvailable ? ` \`mcp__${fastBrowserKey}__*\` is the opt-in browser surface.` : "";
|
|
36082
|
+
const workerBrowseClause = opts.browseAvailable ? ` \`worker-browse\` runs delegated browsing tasks through \`mcp__${fastWorkersKey}__browse\`.` : "";
|
|
36083
|
+
const artifactClause = opts.artifactToolsAvailable ? ` \`mcp__${fastPeersKey}__artifact_*\` provides artifact review with auto-open on plan completion.` : "";
|
|
36052
36084
|
return [
|
|
36053
36085
|
"## Peer review and advisor",
|
|
36054
36086
|
"",
|
|
36055
|
-
`This is the fast launch profile. Advisor is an optional, non-binding, lead-only transcript-aware sounding board for consequential unresolved uncertainty or a genuinely stuck path, not routine progress, waiting, verification,
|
|
36087
|
+
`This is the fast launch profile. Advisor is an optional, non-binding, lead-only transcript-aware sounding board for consequential unresolved uncertainty, conflicting evidence, or a genuinely stuck path, not routine progress, waiting, verification, or completion. \`mcp__${fastPeersKey}__oracle\` is exact Opus 5 (1M/high), a stateless last-resort consultant available to the lead and \`Plan\` when required; \`reviewer\` and other subagents cannot call Oracle.`,
|
|
36056
36088
|
"",
|
|
36057
|
-
`\`mcp__${fastSearchKey}__code\` is semantic-first code search and \`mcp__${fastSearchKey}__web\` surfaces citable sources. Native Task roster: \`Explore\` (broad discovery), \`
|
|
36058
|
-
"Native delegation is ACL-scoped: the lead may invoke all five;
|
|
36089
|
+
`\`mcp__${fastSearchKey}__code\` is semantic-first code search and \`mcp__${fastSearchKey}__web\` surfaces citable sources. Native Task roster: \`Explore\` (broad discovery), \`Plan\` (sequencing, interfaces, migration risk, acceptance criteria), \`general-purpose\` (mixed execution), \`implementer\` (bounded coding), and \`reviewer\` (repo-aware verification/reproduction). \`Plan\` is an advisory planning capability, not an approval gate. Verify claims with concrete repository evidence and tests before declaring done.${browserClause}${workerBrowseClause}${artifactClause}`,
|
|
36090
|
+
"Native delegation is ACL-scoped: the lead may invoke all five; `Plan` may invoke `Explore` and `reviewer`; `implementer` and `general-purpose` may invoke `reviewer`; `Explore`, `reviewer`, and `worker-browse` cannot invoke native subagents."
|
|
36059
36091
|
].join("\n");
|
|
36060
36092
|
}
|
|
36061
36093
|
const peersKey = key("peers");
|
|
@@ -36116,17 +36148,21 @@ function buildPeerAwarenessSummary(opts) {
|
|
|
36116
36148
|
return [
|
|
36117
36149
|
"## Injected capabilities (summary)",
|
|
36118
36150
|
"",
|
|
36119
|
-
"Max launch profile. The roster offers complementary capabilities: `Explore` for broad discovery, `brainstorm` for open choices, `Plan` for a separate planning view, `implementer` and `general-purpose` for execution, and `reviewer` for repository-aware verification. Small or obvious tasks can be handled directly; independent work can run in parallel. Configured models are the default best fit, and a fresh-context peer or `peer-review-coordinator` can reduce correlated blind spots when risk and uncertainty justify it. Model output is evidence to synthesize, not a vote. Advisor is optional, non-binding, and primary-lead-only counsel for a focused consequential uncertainty the normal evidence and roles cannot settle; it has no approval or workflow authority. The lead decides. On every retained max path, replace Gemini 3.1 Pro with Grok 4.6/high when available, otherwise Gemini 3.
|
|
36120
|
-
`\`mcp__${key("search")}__code\` and \`mcp__${key("search")}__web\` provide code and web search.${directBrowserAvailable ? ` \`mcp__${key("browser")}__*\` provides browser control.` : ""}${opts.browseAvailable ? ` \`worker-browse\` dispatches the browse-only worker through \`mcp__${key("workers")}__browse\`.` : ""}${opts.standInAvailable ? ` \`mcp__${key("decide")}__stand_in\` provides deterministic decision tiebreak.` : ""}${opts.fleetAvailable ? ` \`mcp__${key("fleet")}__*\` provides gated remote sessions.` : ""}${opts.agentToolsAvailable ? " First-mate remains available when its own gate passes." : ""}`
|
|
36151
|
+
"Max launch profile. The roster offers complementary capabilities: `Explore` for broad discovery, `brainstorm` for open choices, `Plan` for a separate planning view, `implementer` and `general-purpose` for execution, and `reviewer` for repository-aware verification. Small or obvious tasks can be handled directly; independent work can run in parallel. Configured models are the default best fit, and a fresh-context peer or `peer-review-coordinator` can reduce correlated blind spots when risk and uncertainty justify it. Model output is evidence to synthesize, not a vote. Advisor is optional, non-binding, and primary-lead-only counsel for a focused consequential uncertainty the normal evidence and roles cannot settle; it has no approval or workflow authority. The lead decides. On every retained max path, replace Gemini 3.1 Pro with Grok 4.6/high when available, otherwise Gemini 3.8 Flash 1M/high.",
|
|
36152
|
+
`\`mcp__${key("search")}__code\` and \`mcp__${key("search")}__web\` provide code and web search.${directBrowserAvailable ? ` \`mcp__${key("browser")}__*\` provides browser control.` : ""}${opts.browseAvailable ? ` \`worker-browse\` dispatches the browse-only worker through \`mcp__${key("workers")}__browse\`.` : ""}${opts.standInAvailable ? ` \`mcp__${key("decide")}__stand_in\` provides deterministic decision tiebreak.` : ""}${opts.fleetAvailable ? ` \`mcp__${key("fleet")}__*\` provides gated remote sessions.` : ""}${opts.agentToolsAvailable ? " First-mate remains available when its own gate passes." : ""}${opts.artifactToolsAvailable ? ` \`mcp__${key("peers")}__artifact_*\` provides human review with plan auto-open.` : ""}`
|
|
36153
|
+
].join("\n");
|
|
36154
|
+
}
|
|
36155
|
+
if (opts.profile === "fast") {
|
|
36156
|
+
const browserClause = opts.browserToolsAvailable ?? opts.browseAvailable ? ` \`mcp__${key("browser")}__*\` provides the opt-in browser.` : "";
|
|
36157
|
+
const workerBrowseClause = opts.browseAvailable ? ` \`worker-browse\` runs delegated browsing tasks through \`mcp__${key("workers")}__browse\`.` : "";
|
|
36158
|
+
return [
|
|
36159
|
+
"## Injected capabilities (summary)",
|
|
36160
|
+
"",
|
|
36161
|
+
"Fast launch profile. Task roster: `Explore`, `Plan`, `general-purpose`, `implementer`, `reviewer`. `Plan` is an advisory planning capability, not an approval gate. Verify claims with concrete repository evidence and tests before declaring done.",
|
|
36162
|
+
"Native delegation is ACL-scoped: the lead may invoke all five; `Plan` may invoke `Explore` and `reviewer`; `implementer` and `general-purpose` may invoke `reviewer`; `Explore`, `reviewer`, and `worker-browse` cannot invoke native subagents.",
|
|
36163
|
+
`Advisor is optional, non-binding, transcript-aware, and lead-only; use it for consequential unresolved uncertainty, not routine progress or workflow gates. \`mcp__${key("peers")}__oracle\` is exact Opus 5 (1M/high), stateless and last resort for the lead and \`Plan\`. \`mcp__${key("search")}__code\` and \`mcp__${key("search")}__web\` provide search.${browserClause}${workerBrowseClause}${opts.artifactToolsAvailable ? ` \`mcp__${key("peers")}__artifact_*\` provides human review with plan auto-open.` : ""}`
|
|
36121
36164
|
].join("\n");
|
|
36122
36165
|
}
|
|
36123
|
-
if (opts.profile === "fast") return [
|
|
36124
|
-
"## Injected capabilities (summary)",
|
|
36125
|
-
"",
|
|
36126
|
-
"Fast launch profile. Task roster: `Explore`, `implementer`, `reviewer`, `planner`, `critic`. Luna investigates and drafts; `planner` must approve before implementation. Before declaring done, run relevant tests and ask `reviewer` to verify.",
|
|
36127
|
-
"Native delegation is ACL-scoped: the lead may invoke all five; `planner` may invoke `reviewer`, `Explore`, and `critic`; `implementer` may invoke `reviewer` and `critic`; `reviewer`, `Explore`, and `critic` cannot invoke native subagents.",
|
|
36128
|
-
`Advisor is optional, non-binding, transcript-aware, and lead-only; use it for consequential unresolved uncertainty, not routine progress or workflow gates. \`mcp__${key("peers")}__oracle\` is exact Opus 5 (1M/high), stateless and last resort for the lead, reviewer, and planner. \`mcp__${key("search")}__code\` and \`mcp__${key("search")}__web\` provide search.${opts.browseAvailable ? ` \`mcp__${key("browser")}__*\` provides the opt-in browser.` : ""}`
|
|
36129
|
-
].join("\n");
|
|
36130
36166
|
const renderNative = (name) => {
|
|
36131
36167
|
const modelId = opts.nativeAgentModels?.[name];
|
|
36132
36168
|
if (!modelId) return `\`${name}\``;
|
|
@@ -37456,6 +37492,6 @@ function enumerateInjectedMcpToolNames(groupKeys, opts = {}) {
|
|
|
37456
37492
|
return [...new Set(names)];
|
|
37457
37493
|
}
|
|
37458
37494
|
//#endregion
|
|
37459
|
-
export { UNKNOWN_EFFORT_ANCHOR as $,
|
|
37495
|
+
export { UNKNOWN_EFFORT_ANCHOR as $, warmTreeSitterPool as $t, TOOLBELT_TOOLS$1 as A, MAX_LUNA_HIGH_ALIAS_ID as An, countTokens as At, resolveAdvisorEffort as B, resolveModelAlias as Bn, resolveMcpToolTimeoutMs as Bt, runWorkerAgent as C, withOneMSuffix as Cn, reviewerFastModel as Ct, toolbeltEnabled as D, LUNA_REAL_MODEL_ID as Dn, standInToolEnabled as Dt, buildToolbeltAwareness as E, LUNA_HAIKU_ALIAS_ID as En, scribeModel as Et, ADVISOR_TOOL_INSTRUCTIONS as F, isRetiredFastModelAlias as Fn, findLaunchBySecret as Ft, repairRejectedThinkingHistory as G, parseJsonOrDiagnose as Gt, formatThinkingRepairDecline as H, validateMaxProfileLaunch as Hn, createChatCompletions as Ht, FAST_ADVISOR_TOOL_INSTRUCTIONS as I, maxAliasEffort as In, registerLaunch as It, isControllerClosedError as J, hasSupportedBrowserInstalled as Jt, buildAnthropicErrorEvent as K, normalizeOpenAIUsage as Kt, buildAdvisorStream as L, maxAliasModel as Ln, unregisterLaunch as Lt, satisfiesMinVersion as M, canonicalizeAliasModel as Mn, getTextTokenCount as Mt, searchWeb as N, formatFastPrerequisiteFailure as Nn, getTokenCount as Nt, toolbeltSkipSet as O, LUNA_SCOUT_ALIAS_ID as On, workerToolsEnabled as Ot, ADVISOR_INTERNAL_TOOL_NAME as P, isMaxModelAlias as Pn, getTokenizerFromModel as Pt, EFFORT_ORDER as Q, extractZipMember as Qt, injectAdvisorTool as R, profileDescriptor as Rn, assembleResponsesPayload as Rt, resolveWorkerRunOpts as S, oneMContextDisabled as Sn, resolveGeminiReviewModel as St, availableToolCommands as T, LUNA_DRIVER_ALIAS_ID as Tn, scoutModel as Tt, rememberThinkingHistoryRepair as U, withInstallLock as Un, MAX_RESPONSE_BODY_BYTES as Ut, resolveAdvisorModel as V, validateFastProfilePrerequisites as Vn, createResponses as Vt, repairKnownThinkingHistory as W, readResponseBodyCapped as Wt, readIteratorWithTimeout as X, provisionAndIndexColbert as Xt, logStreamError as Y, colbertDegradedWarning as Yt, relayAnthropicStream as Z, extractTarGzMember as Zt, REVIEW_DEFAULT_MODEL as _, resolveLeadSlugArg as _n, fleetToolsEnabled as _t, buildAgentPrompt as a, toolbeltPathOverride as an, artifactToolsEnabled as at, resolveDefaultModel as b, classifyMessagesRoute as bn, implementerFastModel as bt, enumerateInjectedMcpToolNames as c, DEFAULT_CLAUDE_MODEL_FALLBACKS as cn, browserCompoundToolsEnabled as ct, BROWSE_DEFAULT_MODEL as d, DEFAULT_PORT as dn, fastGeneralPurposeModel as dt, provisionTreeSitterAssets as en, bucketEffort as et, DEFAULT_MODEL_CHAIN as f, UPSTREAM_FETCH_TIMEOUT_MS as fn, fastImplementerModel as ft, PLAN_DEFAULT_MODEL as g, pickClaudeDefault as gn, fastScoutModel as gt, IMPLEMENT_DEFAULT_MODEL as h, isBudgetClaudeLead as hn, fastReviewerModel as ht, assertMcpToolSurfaceConsistent as i, collapsePathKeys as in, agentToolsEnabled as it, assetFor as j, MAX_LUNA_MAX_ALIAS_ID as jn, createMessages as jt, vscodeRipgrepPath as k, LUNA_SONNET_ALIAS_ID as kn, shimDefaultsToXhigh as kt, maxPersonasFor as l, DEFAULT_CODEX_MODEL as ln, browserToolsEnabled as lt, EXPLORE_DEFAULT_THINKING as m, generateRandomPort as mn, fastPlanModel as mt, MCP_GROUPS as n, DEFINITION_OF_GREATNESS as nn, handleMcpDelete as nt, buildPeerAwarenessSnippet as o, BUDGET_SMALL_FAST_CATALOG_ID as on, brainstormModel as ot, EXPLORE_DEFAULT_MODEL as p, UPSTREAM_INACTIVITY_TIMEOUT_MS as pn, fastOracleModel as pt, buildOpenAIErrorEvent as q, provisionBrowserAssets as qt, agentNamesForToolAllowlist as r, shouldUseInsecureTls as rn, handleMcpPost as rt, buildPeerAwarenessSummary as s, BUDGET_SMALL_FAST_SLUG as sn, browseAgentEnabled as st, GROUP_META as t, CONDENSED_OPERATING_SEQUENCE as tn, clampEffort as tt, personasFor as u, DEFAULT_CODEX_MODEL_FALLBACKS as un, fastAdvisorModel as ut, TEST_DEFAULT_MODEL as v, upstreamAllowH2 as vn, geminiAvailable as vt, buildEnv as w, withOneMSuffixForLead as wn, reviewerModel as wt, resolveModeDefaults as x, catalogAdvertises1M as xn, nativeSubagentModel as xt, appendPlanReminder as y, upstreamMaxConnections as yn, generalPurposeFastModel as yt, isAdvisorRequested as z, resolveLaunchProfile as zn, warnOnTokenPriceDrift as zt };
|
|
37460
37496
|
|
|
37461
|
-
//# sourceMappingURL=peer-mcp-personas-
|
|
37497
|
+
//# sourceMappingURL=peer-mcp-personas-D4bHdjOx.js.map
|