github-router 0.3.302 → 0.3.303

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 (45) hide show
  1. package/dist/{attribution-settings-B1xutIts.js → attribution-settings-dta8MTnd.js} +183 -92
  2. package/dist/attribution-settings-dta8MTnd.js.map +1 -0
  3. package/dist/browser-ext/manifest.json +1 -1
  4. package/dist/{claude-uRuzEH0W.js → claude-kr-Augld.js} +62 -115
  5. package/dist/claude-kr-Augld.js.map +1 -0
  6. package/dist/{codex-D5ag-liR.js → codex-B1qnVlzG.js} +4 -4
  7. package/dist/{codex-D5ag-liR.js.map → codex-B1qnVlzG.js.map} +1 -1
  8. package/dist/engine-B3w1TDgR.js +2 -0
  9. package/dist/{fast-profile-contract-K3P58nj3.js → fast-profile-contract-B6xn-Rzo.js} +26 -23
  10. package/dist/fast-profile-contract-B6xn-Rzo.js.map +1 -0
  11. package/dist/{gate-discovery-BTRVyKWu.js → gate-discovery-DOIm3XHF.js} +2 -2
  12. package/dist/{gate-discovery-BTRVyKWu.js.map → gate-discovery-DOIm3XHF.js.map} +1 -1
  13. package/dist/hooks.mjs +117 -46
  14. package/dist/hooks.sha256 +1 -1
  15. package/dist/{internal-fast-dispatch-guard-D2HcfXZv.js → internal-fast-dispatch-guard-BhpZ6LvO.js} +71 -15
  16. package/dist/internal-fast-dispatch-guard-BhpZ6LvO.js.map +1 -0
  17. package/dist/{internal-fast-dispatch-guard-CYOWbxjX.js → internal-fast-dispatch-guard-C6BNoOnn.js} +1 -1
  18. package/dist/{internal-max-dispatch-guard-BjSVXMvC.js → internal-max-dispatch-guard-DhAr8N_o.js} +28 -11
  19. package/dist/internal-max-dispatch-guard-DhAr8N_o.js.map +1 -0
  20. package/dist/{internal-max-dispatch-guard-Bcjavapx.js → internal-max-dispatch-guard-k52H-PdC.js} +1 -1
  21. package/dist/{internal-stop-hook-BZg__ab6.js → internal-stop-hook-CWffknT2.js} +2 -2
  22. package/dist/{internal-stop-hook-BZg__ab6.js.map → internal-stop-hook-CWffknT2.js.map} +1 -1
  23. package/dist/main.js +7 -7
  24. package/dist/{max-profile-contract-BTXowh6k.js → max-profile-contract-Ct62mtAR.js} +16 -4
  25. package/dist/max-profile-contract-Ct62mtAR.js.map +1 -0
  26. package/dist/{peer-mcp-personas-DwEiYeJS.js → peer-mcp-personas-BU5dNLxQ.js} +390 -349
  27. package/dist/peer-mcp-personas-BU5dNLxQ.js.map +1 -0
  28. package/dist/{provision-BLT1pCFy.js → provision-qNJgF5XD.js} +2 -2
  29. package/dist/{provision-BLT1pCFy.js.map → provision-qNJgF5XD.js.map} +1 -1
  30. package/dist/{serve-wEZoOijw.js → serve-T64kVeQN.js} +5 -5
  31. package/dist/{serve-wEZoOijw.js.map → serve-T64kVeQN.js.map} +1 -1
  32. package/dist/{server-setup-Zn5wkosb.js → server-setup-C_LAE8NI.js} +17 -11
  33. package/dist/server-setup-C_LAE8NI.js.map +1 -0
  34. package/dist/{start-DSqU8d8h.js → start-DHRToEyb.js} +3 -3
  35. package/dist/{start-DSqU8d8h.js.map → start-DHRToEyb.js.map} +1 -1
  36. package/package.json +1 -1
  37. package/dist/attribution-settings-B1xutIts.js.map +0 -1
  38. package/dist/claude-uRuzEH0W.js.map +0 -1
  39. package/dist/engine-2uMJ4Isk.js +0 -2
  40. package/dist/fast-profile-contract-K3P58nj3.js.map +0 -1
  41. package/dist/internal-fast-dispatch-guard-D2HcfXZv.js.map +0 -1
  42. package/dist/internal-max-dispatch-guard-BjSVXMvC.js.map +0 -1
  43. package/dist/max-profile-contract-BTXowh6k.js.map +0 -1
  44. package/dist/peer-mcp-personas-DwEiYeJS.js.map +0 -1
  45. 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-K3P58nj3.js";
8
- import { _ as fastEndpointForCatalogId, a as MAX_PROFILE_NATIVE_AGENT_NAMES, b as stripTrailingOneMSuffix, f as maxGeminiModel, g as validateMaxProfilePrerequisites, h as maxProReplacementModel, i as MAX_PROFILE_MODELS, m as maxOpusModel, p as maxGrokModel, r as MAX_PROFILE_LEAD_MODEL, v as fastEndpointForModel, y as normalizeTrailingOneMSuffix } from "./max-profile-contract-BTXowh6k.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-B6xn-Rzo.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-Ct62mtAR.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
@@ -27492,305 +27783,6 @@ function shimDefaultsToXhigh(id) {
27492
27783
  return XHIGH_DEFAULT_SHIM_MODELS.includes(normalizeModelId(id));
27493
27784
  }
27494
27785
  //#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
27786
  //#region src/lib/mcp-capabilities.ts
27795
27787
  /**
27796
27788
  * Capability-gate predicates for the proxy's MCP tool surface.
@@ -28041,20 +28033,22 @@ function generalPurposeFastModel() {
28041
28033
  }
28042
28034
  /** @deprecated Fast `scout` was renamed to capitalized `Explore`. */
28043
28035
  const FAST_SCOUT_MODEL = FAST_PROFILE_NATIVE_MODELS.Explore;
28036
+ const FAST_PLAN_MODEL = FAST_PROFILE_NATIVE_MODELS.Plan;
28037
+ const FAST_GENERAL_PURPOSE_MODEL = FAST_PROFILE_NATIVE_MODELS["general-purpose"];
28044
28038
  const FAST_IMPLEMENTER_MODEL = FAST_PROFILE_NATIVE_MODELS.implementer;
28045
28039
  /** Grok 4.6 advertises 500K total context / 372K max prompt, so it remains bare
28046
28040
  * and is gated by max_prompt_tokens rather than the 1M floor. */
28047
28041
  const FAST_REVIEWER_MODEL = FAST_PROFILE_NATIVE_MODELS.reviewer;
28048
- const FAST_PLANNER_MODEL = FAST_PROFILE_NATIVE_MODELS.planner;
28049
- const FAST_CRITIC_MODEL = FAST_PROFILE_NATIVE_MODELS.critic;
28042
+ const FAST_ADVISOR_MODEL = FAST_PROFILE_MODELS.advisor;
28050
28043
  const FAST_ORACLE_MODEL = FAST_PROFILE_ORACLE_MODEL;
28051
- /** @deprecated Fast `scout` was renamed to capitalized `Explore`. */
28052
- const FAST_SCOUT_EFFORT = FAST_PROFILE_NATIVE_EFFORTS.Explore;
28044
+ /** Fixed effort pins for the fast profile. */
28045
+ const FAST_EXPLORE_EFFORT = FAST_PROFILE_NATIVE_EFFORTS.Explore;
28046
+ const FAST_PLAN_EFFORT = FAST_PROFILE_NATIVE_EFFORTS.Plan;
28047
+ const FAST_GENERAL_PURPOSE_EFFORT = FAST_PROFILE_NATIVE_EFFORTS["general-purpose"];
28053
28048
  const FAST_IMPLEMENTER_EFFORT = FAST_PROFILE_NATIVE_EFFORTS.implementer;
28054
28049
  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
28050
  const FAST_ORACLE_EFFORT = FAST_PROFILE_ORACLE_EFFORT;
28051
+ const FAST_ADVISOR_EFFORT = FAST_PROFILE_ADVISOR_EFFORT;
28058
28052
  function fastScoutModel() {
28059
28053
  const id = firstPresentInCatalog([FAST_SCOUT_MODEL], {
28060
28054
  requireToolCalls: true,
@@ -28062,28 +28056,43 @@ function fastScoutModel() {
28062
28056
  });
28063
28057
  if (!id) return void 0;
28064
28058
  const found = state.models?.data.find((m) => m.id === id);
28059
+ const efforts = found?.capabilities?.supports?.reasoning_effort;
28060
+ if (!Array.isArray(efforts) || !efforts.includes(FAST_EXPLORE_EFFORT)) return void 0;
28065
28061
  return found && fastEndpointForModel(found) === "responses" ? id : void 0;
28066
28062
  }
28067
- function fastImplementerModel() {
28068
- const id = firstPresentInCatalog([FAST_IMPLEMENTER_MODEL], {
28063
+ function fastPlanModel() {
28064
+ const id = firstPresentInCatalog([FAST_PLAN_MODEL], {
28069
28065
  requireToolCalls: true,
28070
28066
  minContextTokens: ONE_M_TOKENS
28071
28067
  });
28072
28068
  if (!id) return void 0;
28073
28069
  const found = state.models?.data.find((m) => m.id === id);
28070
+ const efforts = found?.capabilities?.supports?.reasoning_effort;
28071
+ if (!Array.isArray(efforts) || !efforts.includes(FAST_PLAN_EFFORT)) return void 0;
28072
+ if (!found || fastEndpointForModel(found) !== "responses") return void 0;
28073
+ return id;
28074
+ }
28075
+ function fastGeneralPurposeModel() {
28076
+ const id = firstPresentInCatalog([FAST_GENERAL_PURPOSE_MODEL], {
28077
+ requireToolCalls: true,
28078
+ minContextTokens: ONE_M_TOKENS
28079
+ });
28080
+ if (!id) return void 0;
28081
+ const found = state.models?.data.find((m) => m.id === id);
28082
+ const efforts = found?.capabilities?.supports?.reasoning_effort;
28083
+ if (!Array.isArray(efforts) || !efforts.includes(FAST_GENERAL_PURPOSE_EFFORT)) return void 0;
28074
28084
  return found && fastEndpointForModel(found) === "responses" ? id : void 0;
28075
28085
  }
28076
- function fastPlannerModel() {
28077
- const id = firstPresentInCatalog([FAST_PLANNER_MODEL], {
28086
+ function fastImplementerModel() {
28087
+ const id = firstPresentInCatalog([FAST_IMPLEMENTER_MODEL], {
28078
28088
  requireToolCalls: true,
28079
28089
  minContextTokens: ONE_M_TOKENS
28080
28090
  });
28081
28091
  if (!id) return void 0;
28082
28092
  const found = state.models?.data.find((m) => m.id === id);
28083
28093
  const efforts = found?.capabilities?.supports?.reasoning_effort;
28084
- if (!Array.isArray(efforts) || !efforts.includes(FAST_PLANNER_EFFORT)) return void 0;
28085
- if (!found || fastEndpointForModel(found) !== "responses") return void 0;
28086
- return id;
28094
+ if (!Array.isArray(efforts) || !efforts.includes(FAST_IMPLEMENTER_EFFORT)) return void 0;
28095
+ return found && fastEndpointForModel(found) === "chat" ? id : void 0;
28087
28096
  }
28088
28097
  /** Gate Grok on the prompt limit that actually constrains pasted review input. */
28089
28098
  function fastReviewerModel() {
@@ -28098,17 +28107,15 @@ function fastReviewerModel() {
28098
28107
  if (fastEndpointForModel(found) !== "responses") return void 0;
28099
28108
  return FAST_REVIEWER_MODEL;
28100
28109
  }
28101
- /** Exact Gemini 3.7 Flash only: the fast native critic has no fallback.
28102
- * Unlike the fast Advisor, it needs tool calls and a medium effort choice. */
28103
- function fastCriticModel() {
28104
- const found = state.models?.data.find((m) => m.id === FAST_CRITIC_MODEL);
28110
+ /** Dedicated Gemini 3.7 Flash Advisor check. */
28111
+ function fastAdvisorModel() {
28112
+ const found = state.models?.data.find((m) => m.id === FAST_ADVISOR_MODEL);
28105
28113
  if (!found) return void 0;
28106
- if (found.capabilities?.supports?.tool_calls !== true) return void 0;
28107
28114
  if ((found.capabilities?.limits?.max_context_window_tokens ?? 0) < 1e6) return void 0;
28108
28115
  const efforts = found.capabilities?.supports?.reasoning_effort;
28109
- if (!Array.isArray(efforts) || !efforts.includes(FAST_CRITIC_EFFORT)) return void 0;
28116
+ if (!Array.isArray(efforts) || !efforts.includes(FAST_ADVISOR_EFFORT)) return void 0;
28110
28117
  if (fastEndpointForModel(found) !== "chat") return void 0;
28111
- return FAST_CRITIC_MODEL;
28118
+ return FAST_ADVISOR_MODEL;
28112
28119
  }
28113
28120
  /** Exact Opus 5 only: the fast Oracle never inherits standard opus_critic's
28114
28121
  * older-family fallback. */
@@ -28420,7 +28427,7 @@ function activePersonas(launch) {
28420
28427
  function oracleToolEntry() {
28421
28428
  return {
28422
28429
  name: "oracle",
28423
- description: "Fast-profile last-resort guidance from exact Opus 5 (1M context) at high effort. Stateless and tool-less: pass complete context plus one precise query only after the primary Luna path, Advisor, and the relevant reviewer/planner path remain stuck. It can advise or request missing information; it cannot inspect the repo, execute, merge, or authorize actions.",
28430
+ 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
28431
  inputSchema: {
28425
28432
  type: "object",
28426
28433
  required: ["query", "context"],
@@ -28467,6 +28474,24 @@ function maxAllowsTool(scope, launch, item) {
28467
28474
  if (item.tool.group === "workers" && item.tool.toolNameHttp !== "browse") return false;
28468
28475
  return maxToolIsEnabled(item.tool);
28469
28476
  }
28477
+ function fastToolIsEnabled(tool) {
28478
+ if (tool.group === "search") return true;
28479
+ if (tool.group === "peers") return tool.capability === "artifact" && artifactToolsEnabled();
28480
+ if (tool.group === "workers") return tool.toolNameHttp === "browse" && tool.capability === "browse_agent" && browseAgentEnabled();
28481
+ if (tool.group !== "browser") return false;
28482
+ if (!browserToolsEnabled()) return false;
28483
+ if (tool.capability === "browser_compound") return browserCompoundToolsEnabled();
28484
+ if (tool.capability === "browser_power") return browserPowerToolsEnabled();
28485
+ return tool.capability === "browser";
28486
+ }
28487
+ /** Shared Fast projection for list and call, including non-persona dispatch kind. */
28488
+ function fastAllowsTool(scope, launch, item) {
28489
+ if (launch.profileId !== "fast") return true;
28490
+ if (scope !== "all" && item.group !== scope) return false;
28491
+ if (!launch.allowedGroups?.has(item.group)) return false;
28492
+ if (item.persona) return false;
28493
+ return item.tool !== void 0 && fastToolIsEnabled(item.tool);
28494
+ }
28470
28495
  function toolEntries(scope, launch) {
28471
28496
  if (launch.profileId === "max") {
28472
28497
  const personaEntries = activePersonas(launch).filter((persona) => maxAllowsTool(scope, launch, {
@@ -28517,19 +28542,11 @@ function toolEntries(scope, launch) {
28517
28542
  const entries = [];
28518
28543
  if ((scope === "all" || scope === "peers") && launch.allowedGroups?.has("peers") && launch.allowedPersonas?.has("oracle") && fastOracleModel()) entries.push(oracleToolEntry());
28519
28544
  for (const tool of NON_PERSONA_MCP_TOOLS) {
28520
- if (scope !== "all" && tool.group !== scope) continue;
28521
- if (!launch.allowedGroups?.has(tool.group)) continue;
28522
- if (tool.group === "search") {
28523
- entries.push({
28524
- name: tool.toolNameHttp,
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;
28545
+ if (!fastAllowsTool(scope, launch, {
28546
+ group: tool.group,
28547
+ name: tool.toolNameHttp,
28548
+ tool
28549
+ })) continue;
28533
28550
  entries.push({
28534
28551
  name: tool.toolNameHttp,
28535
28552
  description: tool.description,
@@ -28960,6 +28977,19 @@ async function handleToolsCall(body, scope, launch, sessionWorkspace) {
28960
28977
  tool: maxTool
28961
28978
  }) : false)) return rpcError(body.id, RPC_METHOD_NOT_FOUND, `tools/call: unknown tool "${name}"`);
28962
28979
  }
28980
+ if (launch.profileId === "fast" && name !== "oracle") {
28981
+ const fastPersona = activePersonas(launch).find((persona) => persona.toolNameHttp === name);
28982
+ const fastTool = NON_PERSONA_MCP_TOOLS.find((tool) => tool.toolNameHttp === name);
28983
+ if (!(fastPersona ? fastAllowsTool(scope, launch, {
28984
+ group: "peers",
28985
+ name,
28986
+ persona: fastPersona
28987
+ }) : fastTool ? fastAllowsTool(scope, launch, {
28988
+ group: fastTool.group,
28989
+ name,
28990
+ tool: fastTool
28991
+ }) : false)) return rpcError(body.id, RPC_METHOD_NOT_FOUND, `tools/call: unknown tool "${name}"`);
28992
+ }
28963
28993
  if (launch.profileId === "fast" && name === "oracle") {
28964
28994
  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
28995
  const query = typeof args.query === "string" ? args.query.trim() : "";
@@ -36034,28 +36064,35 @@ function buildPeerAwarenessSnippet(opts) {
36034
36064
  const key = (g) => opts.groupKeys?.[g] ?? GROUP_META[g].preferredKey;
36035
36065
  if (opts.profile === "max") {
36036
36066
  const searchKey = key("search");
36067
+ const peersKey = key("peers");
36037
36068
  const browserClause = opts.browserToolsAvailable ?? opts.browseAvailable ? ` \`mcp__${key("browser")}__*\` provides the opt-in browser.` : "";
36038
36069
  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
36070
  const decideClause = opts.standInAvailable ? ` \`mcp__${key("decide")}__stand_in\` provides deterministic three-lab decision tiebreak.` : "";
36040
36071
  const fleetClause = opts.fleetAvailable ? ` \`mcp__${key("fleet")}__*\` provides gated remote session control.` : "";
36041
36072
  const agentsClause = opts.agentToolsAvailable ? " `/gh-first-mate` remains available when its own gate passes." : "";
36073
+ const artifactClause = opts.artifactToolsAvailable ? ` \`mcp__${peersKey}__artifact_*\` provides human review in the artifact panel with auto-open on plan completion.` : "";
36042
36074
  return [
36043
36075
  "## Peer review and advisor",
36044
36076
  "",
36045
36077
  `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.7 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.7 Flash/high fallback." : ""}${browserClause}${workerClause}${decideClause}${fleetClause}${agentsClause}`
36078
+ `\`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.7 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.7 Flash/high fallback." : ""}${browserClause}${workerClause}${decideClause}${fleetClause}${agentsClause}${artifactClause}`
36047
36079
  ].join("\n");
36048
36080
  }
36049
36081
  if (opts.profile === "fast") {
36050
36082
  const fastPeersKey = key("peers");
36051
36083
  const fastSearchKey = key("search");
36084
+ const fastBrowserKey = key("browser");
36085
+ const fastWorkersKey = key("workers");
36086
+ const browserClause = opts.browserToolsAvailable ?? opts.browseAvailable ? ` \`mcp__${fastBrowserKey}__*\` is the opt-in browser surface.` : "";
36087
+ const workerBrowseClause = opts.browseAvailable ? ` \`worker-browse\` runs delegated browsing tasks through \`mcp__${fastWorkersKey}__browse\`.` : "";
36088
+ const artifactClause = opts.artifactToolsAvailable ? ` \`mcp__${fastPeersKey}__artifact_*\` provides artifact review with auto-open on plan completion.` : "";
36052
36089
  return [
36053
36090
  "## Peer review and advisor",
36054
36091
  "",
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, approval, or completion. \`mcp__${fastPeersKey}__oracle\` is exact Opus 5 (1M/high), a stateless last-resort consultant available to the lead, reviewer, and planner.`,
36092
+ `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
36093
  "",
36057
- `\`mcp__${fastSearchKey}__code\` is semantic-first code search and \`mcp__${fastSearchKey}__web\` surfaces citable sources. Native Task roster: \`Explore\` (broad discovery), \`implementer\` (mechanical implementation), \`reviewer\` (repo-aware verification/reproduction), \`planner\` (Sol plan consultant/approver after Luna's draft), and \`critic\` (fresh-context cross-lab review). Before implementation obtain planner approval; before declaring done run relevant tests and ask reviewer to verify.${opts.browseAvailable ? ` \`mcp__${key("browser")}__*\` is the opt-in browser surface.` : ""}`,
36058
- "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."
36094
+ `\`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}`,
36095
+ "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
36096
  ].join("\n");
36060
36097
  }
36061
36098
  const peersKey = key("peers");
@@ -36117,16 +36154,20 @@ function buildPeerAwarenessSummary(opts) {
36117
36154
  "## Injected capabilities (summary)",
36118
36155
  "",
36119
36156
  "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.7 Flash 1M/high.",
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." : ""}`
36157
+ `\`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.` : ""}`
36158
+ ].join("\n");
36159
+ }
36160
+ if (opts.profile === "fast") {
36161
+ const browserClause = opts.browserToolsAvailable ?? opts.browseAvailable ? ` \`mcp__${key("browser")}__*\` provides the opt-in browser.` : "";
36162
+ const workerBrowseClause = opts.browseAvailable ? ` \`worker-browse\` runs delegated browsing tasks through \`mcp__${key("workers")}__browse\`.` : "";
36163
+ return [
36164
+ "## Injected capabilities (summary)",
36165
+ "",
36166
+ "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.",
36167
+ "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.",
36168
+ `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
36169
  ].join("\n");
36122
36170
  }
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
36171
  const renderNative = (name) => {
36131
36172
  const modelId = opts.nativeAgentModels?.[name];
36132
36173
  if (!modelId) return `\`${name}\``;
@@ -37456,6 +37497,6 @@ function enumerateInjectedMcpToolNames(groupKeys, opts = {}) {
37456
37497
  return [...new Set(names)];
37457
37498
  }
37458
37499
  //#endregion
37459
- export { UNKNOWN_EFFORT_ANCHOR as $, countTokens as $t, TOOLBELT_TOOLS$1 as A, BUDGET_SMALL_FAST_SLUG as An, scribeModel as At, resolveAdvisorEffort as B, resolveLeadSlugArg as Bn, MAX_LUNA_HIGH_ALIAS_ID as Bt, runWorkerAgent as C, provisionTreeSitterAssets as Cn, generalPurposeFastModel as Ct, toolbeltEnabled as D, collapsePathKeys as Dn, reviewerFastModel as Dt, buildToolbeltAwareness as E, shouldUseInsecureTls as En, resolveGeminiReviewModel as Et, ADVISOR_TOOL_INSTRUCTIONS as F, UPSTREAM_FETCH_TIMEOUT_MS as Fn, LUNA_HAIKU_ALIAS_ID as Ft, repairRejectedThinkingHistory as G, oneMContextDisabled as Gn, maxAliasEffort as Gt, formatThinkingRepairDecline as H, upstreamMaxConnections as Hn, canonicalizeAliasModel as Ht, FAST_ADVISOR_TOOL_INSTRUCTIONS as I, UPSTREAM_INACTIVITY_TIMEOUT_MS as In, LUNA_IMPLEMENTER_ALIAS_ID as It, isControllerClosedError as J, withInstallLock as Jn, resolveLaunchProfile as Jt, buildAnthropicErrorEvent as K, withOneMSuffix as Kn, maxAliasModel as Kt, buildAdvisorStream as L, generateRandomPort as Ln, LUNA_REAL_MODEL_ID as Lt, satisfiesMinVersion as M, DEFAULT_CODEX_MODEL as Mn, workerToolsEnabled as Mt, searchWeb as N, DEFAULT_CODEX_MODEL_FALLBACKS as Nn, FAST_CRITIC_ALIAS_ID as Nt, toolbeltSkipSet as O, toolbeltPathOverride as On, reviewerModel as Ot, ADVISOR_INTERNAL_TOOL_NAME as P, DEFAULT_PORT as Pn, LUNA_DRIVER_ALIAS_ID as Pt, EFFORT_ORDER as Q, shimDefaultsToXhigh as Qt, injectAdvisorTool as R, isBudgetClaudeLead as Rn, LUNA_SCOUT_ALIAS_ID as Rt, resolveWorkerRunOpts as S, warmTreeSitterPool as Sn, geminiAvailable as St, availableToolCommands as T, DEFINITION_OF_GREATNESS as Tn, nativeSubagentModel as Tt, rememberThinkingHistoryRepair as U, classifyMessagesRoute as Un, formatFastPrerequisiteFailure as Ut, resolveAdvisorModel as V, upstreamAllowH2 as Vn, MAX_LUNA_MAX_ALIAS_ID as Vt, repairKnownThinkingHistory as W, catalogAdvertises1M as Wn, isMaxModelAlias as Wt, readIteratorWithTimeout as X, validateFastProfilePrerequisites as Xt, logStreamError as Y, resolveModelAlias as Yt, relayAnthropicStream as Z, validateMaxProfileLaunch as Zt, REVIEW_DEFAULT_MODEL as _, hasSupportedBrowserInstalled as _n, fastOracleModel as _t, buildAgentPrompt as a, registerLaunch as an, FAST_IMPLEMENTER_EFFORT as at, resolveDefaultModel as b, extractTarGzMember as bn, fastScoutModel as bt, enumerateInjectedMcpToolNames as c, warnOnTokenPriceDrift as cn, FAST_SCOUT_EFFORT as ct, BROWSE_DEFAULT_MODEL as d, createChatCompletions as dn, brainstormModel as dt, createMessages as en, bucketEffort as et, DEFAULT_MODEL_CHAIN as f, MAX_RESPONSE_BODY_BYTES as fn, browseAgentEnabled as ft, PLAN_DEFAULT_MODEL as g, provisionBrowserAssets as gn, fastImplementerModel as gt, IMPLEMENT_DEFAULT_MODEL as h, normalizeOpenAIUsage as hn, fastCriticModel as ht, assertMcpToolSurfaceConsistent as i, findLaunchBySecret as in, FAST_CRITIC_EFFORT as it, assetFor as j, DEFAULT_CLAUDE_MODEL_FALLBACKS as jn, standInToolEnabled as jt, vscodeRipgrepPath as k, BUDGET_SMALL_FAST_CATALOG_ID as kn, scoutModel as kt, maxPersonasFor as l, resolveMcpToolTimeoutMs as ln, agentToolsEnabled as lt, EXPLORE_DEFAULT_THINKING as m, parseJsonOrDiagnose as mn, browserToolsEnabled as mt, MCP_GROUPS as n, getTokenCount as nn, handleMcpDelete as nt, buildPeerAwarenessSnippet as o, unregisterLaunch as on, FAST_PLANNER_EFFORT as ot, EXPLORE_DEFAULT_MODEL as p, readResponseBodyCapped as pn, browserCompoundToolsEnabled as pt, buildOpenAIErrorEvent as q, withOneMSuffixForLead as qn, profileDescriptor as qt, agentNamesForToolAllowlist as r, getTokenizerFromModel as rn, handleMcpPost as rt, buildPeerAwarenessSummary as s, assembleResponsesPayload as sn, FAST_REVIEWER_EFFORT as st, GROUP_META as t, getTextTokenCount as tn, clampEffort as tt, personasFor as u, createResponses as un, artifactToolsEnabled as ut, TEST_DEFAULT_MODEL as v, colbertDegradedWarning as vn, fastPlannerModel as vt, buildEnv as w, CONDENSED_OPERATING_SEQUENCE as wn, implementerFastModel as wt, resolveModeDefaults as x, extractZipMember as xn, fleetToolsEnabled as xt, appendPlanReminder as y, provisionAndIndexColbert as yn, fastReviewerModel as yt, isAdvisorRequested as z, pickClaudeDefault as zn, LUNA_SONNET_ALIAS_ID as zt };
37500
+ 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
37501
 
37461
- //# sourceMappingURL=peer-mcp-personas-DwEiYeJS.js.map
37502
+ //# sourceMappingURL=peer-mcp-personas-BU5dNLxQ.js.map