github-router 0.3.293 → 0.3.297
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/dist/{attribution-settings-Dx8TBPE8.js → attribution-settings-B70GmZ68.js} +72 -32
- package/dist/attribution-settings-B70GmZ68.js.map +1 -0
- package/dist/{auth-BwUHopJz.js → auth-CluG5e-l.js} +3 -3
- package/dist/{auth-BwUHopJz.js.map → auth-CluG5e-l.js.map} +1 -1
- package/dist/browser-ext/manifest.json +1 -1
- package/dist/{check-usage-BTda5753.js → check-usage-iOzfnKJe.js} +4 -4
- package/dist/{check-usage-BTda5753.js.map → check-usage-iOzfnKJe.js.map} +1 -1
- package/dist/{claude-BoAd_L2W.js → claude-DMMfvfns.js} +225 -61
- package/dist/claude-DMMfvfns.js.map +1 -0
- package/dist/{codex-BdJgGT6Q.js → codex-DVOyVv2B.js} +5 -5
- package/dist/{codex-BdJgGT6Q.js.map → codex-DVOyVv2B.js.map} +1 -1
- package/dist/{debug-B3UrZTHQ.js → debug-DsEwleGg.js} +2 -2
- package/dist/{debug-B3UrZTHQ.js.map → debug-DsEwleGg.js.map} +1 -1
- package/dist/engine-BkGRuUNs.js +2 -0
- package/dist/fast-profile-contract-K3P58nj3.js +57 -0
- package/dist/fast-profile-contract-K3P58nj3.js.map +1 -0
- package/dist/{gate-discovery-C30rfnyo.js → gate-discovery-G6PAG61j.js} +5 -5
- package/dist/{gate-discovery-C30rfnyo.js.map → gate-discovery-G6PAG61j.js.map} +1 -1
- package/dist/{get-copilot-usage-CRrf1ZSC.js → get-copilot-usage-B7Z4XVWj.js} +2 -2
- package/dist/{get-copilot-usage-CRrf1ZSC.js.map → get-copilot-usage-B7Z4XVWj.js.map} +1 -1
- package/dist/hooks.mjs +228 -3
- package/dist/hooks.sha256 +1 -1
- package/dist/{internal-artifact-open-BsEQRvDi.js → internal-artifact-open-D6tKMg8v.js} +2 -2
- package/dist/{internal-artifact-open-BsEQRvDi.js.map → internal-artifact-open-D6tKMg8v.js.map} +1 -1
- package/dist/internal-fast-dispatch-guard-Bkr_iGOu.js +191 -0
- package/dist/internal-fast-dispatch-guard-Bkr_iGOu.js.map +1 -0
- package/dist/internal-fast-dispatch-guard-N-RaLrOn.js +2 -0
- package/dist/{internal-first-mate-guard-CVFFJriA.js → internal-first-mate-guard-C9BV7J4U.js} +3 -3
- package/dist/{internal-first-mate-guard-CVFFJriA.js.map → internal-first-mate-guard-C9BV7J4U.js.map} +1 -1
- package/dist/{internal-first-mate-guard-DJdX6t48.js → internal-first-mate-guard-WJApyc8j.js} +1 -1
- package/dist/{internal-plan-review-8TKDLco6.js → internal-plan-review-t3PuNfuL.js} +3 -3
- package/dist/{internal-plan-review-8TKDLco6.js.map → internal-plan-review-t3PuNfuL.js.map} +1 -1
- package/dist/{internal-prompt-submit-Da7pxqua.js → internal-prompt-submit-C3KovHQG.js} +4 -4
- package/dist/{internal-prompt-submit-Da7pxqua.js.map → internal-prompt-submit-C3KovHQG.js.map} +1 -1
- package/dist/{internal-session-bind-BOFytA1f.js → internal-session-bind-d2uoja8I.js} +2 -2
- package/dist/{internal-session-bind-BOFytA1f.js.map → internal-session-bind-d2uoja8I.js.map} +1 -1
- package/dist/{internal-stop-hook-OnfK3BxE.js → internal-stop-hook-BjzrF1zd.js} +5 -5
- package/dist/{internal-stop-hook-OnfK3BxE.js.map → internal-stop-hook-BjzrF1zd.js.map} +1 -1
- package/dist/{internal-stop-review-CdouacHL.js → internal-stop-review-YtDUGXpX.js} +2 -2
- package/dist/{internal-stop-review-CdouacHL.js.map → internal-stop-review-YtDUGXpX.js.map} +1 -1
- package/dist/{internal-worker-guard-Bx-itoP8.js → internal-worker-guard-CdkeS9PN.js} +2 -2
- package/dist/{internal-worker-guard-Bx-itoP8.js.map → internal-worker-guard-CdkeS9PN.js.map} +1 -1
- package/dist/{internal-workspace-header-8WT0iB5K.js → internal-workspace-header-tuBXJV22.js} +2 -2
- package/dist/{internal-workspace-header-8WT0iB5K.js.map → internal-workspace-header-tuBXJV22.js.map} +1 -1
- package/dist/{lifecycle-nuOHfwgj.js → lifecycle-Bg6doY3-.js} +2 -2
- package/dist/{lifecycle-nuOHfwgj.js.map → lifecycle-Bg6doY3-.js.map} +1 -1
- package/dist/lifecycle-CGLt1cJQ.js +2 -0
- package/dist/{lifecycle-LeSfa7wH.js → lifecycle-CM9eTzvk.js} +2 -2
- package/dist/{lifecycle-LeSfa7wH.js.map → lifecycle-CM9eTzvk.js.map} +1 -1
- package/dist/lifecycle-DoUwpVDB.js +2 -0
- package/dist/main.js +19 -18
- package/dist/main.js.map +1 -1
- package/dist/{mcp-workspace-header-q34H_4wL.js → mcp-workspace-header-dERl2YTT.js} +2 -2
- package/dist/{mcp-workspace-header-q34H_4wL.js.map → mcp-workspace-header-dERl2YTT.js.map} +1 -1
- package/dist/{models-hhJcrZhr.js → models-DZ4hYsR7.js} +3 -3
- package/dist/{models-hhJcrZhr.js.map → models-DZ4hYsR7.js.map} +1 -1
- package/dist/{orchestration-pzbrKkgD.js → orchestration-BiGCEwbH.js} +2 -2
- package/dist/{orchestration-pzbrKkgD.js.map → orchestration-BiGCEwbH.js.map} +1 -1
- package/dist/{paths-BH4J7slC.js → paths-Ci485qSJ.js} +4 -4
- package/dist/{paths-BH4J7slC.js.map → paths-Ci485qSJ.js.map} +1 -1
- package/dist/paths-GD7bgGGy.js +2 -0
- package/dist/{peer-mcp-personas-DhI7ZPSx.js → peer-mcp-personas-ce6_YMnX.js} +407 -96
- package/dist/peer-mcp-personas-ce6_YMnX.js.map +1 -0
- package/dist/{plan-review-hook-CfcanA7_.js → plan-review-hook-DuW0pSoM.js} +3 -3
- package/dist/{plan-review-hook-CfcanA7_.js.map → plan-review-hook-DuW0pSoM.js.map} +1 -1
- package/dist/{prompt-submit-hook-Bqf9ORgb.js → prompt-submit-hook-IMl7ssfr.js} +3 -3
- package/dist/{prompt-submit-hook-Bqf9ORgb.js.map → prompt-submit-hook-IMl7ssfr.js.map} +1 -1
- package/dist/{provision-CZJ4EWls.js → provision-BhCtm3md.js} +4 -4
- package/dist/{provision-CZJ4EWls.js.map → provision-BhCtm3md.js.map} +1 -1
- package/dist/{self-invocation-DhO1Z8iD.js → self-invocation-DAB_od0C.js} +2 -2
- package/dist/{self-invocation-DhO1Z8iD.js.map → self-invocation-DAB_od0C.js.map} +1 -1
- package/dist/{serve-RxWYzoOl.js → serve-Blj_dRSr.js} +12 -12
- package/dist/{serve-RxWYzoOl.js.map → serve-Blj_dRSr.js.map} +1 -1
- package/dist/{server-setup-DbvbW5Ve.js → server-setup-DhG3YZPj.js} +436 -277
- package/dist/server-setup-DhG3YZPj.js.map +1 -0
- package/dist/{start-BNcGsXsY.js → start-8QaqICtd.js} +3 -3
- package/dist/{start-BNcGsXsY.js.map → start-8QaqICtd.js.map} +1 -1
- package/dist/{stop-gate-hook-BiBp5aGm.js → stop-gate-hook-DQnh_KfI.js} +3 -3
- package/dist/{stop-gate-hook-BiBp5aGm.js.map → stop-gate-hook-DQnh_KfI.js.map} +1 -1
- package/dist/{stop-gate-policy-BGd6b5hR.js → stop-gate-policy-DMr3KVmw.js} +2 -2
- package/dist/{stop-gate-policy-BGd6b5hR.js.map → stop-gate-policy-DMr3KVmw.js.map} +1 -1
- package/dist/{token-8drORhXg.js → token-BtJhjXXu.js} +54 -7
- package/dist/token-BtJhjXXu.js.map +1 -0
- package/dist/{worker-dispatch-D5fGroNr.js → worker-dispatch-BEHkTbnH.js} +2 -2
- package/dist/{worker-dispatch-D5fGroNr.js.map → worker-dispatch-BEHkTbnH.js.map} +1 -1
- package/package.json +1 -1
- package/dist/attribution-settings-Dx8TBPE8.js.map +0 -1
- package/dist/claude-BoAd_L2W.js.map +0 -1
- package/dist/engine-CK2b_cTt.js +0 -2
- package/dist/lifecycle-C8fOsQke.js +0 -2
- package/dist/lifecycle-D4Yc1aap.js +0 -2
- package/dist/paths-DJZoXfAS.js +0 -2
- package/dist/peer-mcp-personas-DhI7ZPSx.js.map +0 -1
- package/dist/server-setup-DbvbW5Ve.js.map +0 -1
- package/dist/token-8drORhXg.js.map +0 -1
|
@@ -1,14 +1,15 @@
|
|
|
1
1
|
import { n as explicitPackageRoot } from "./package-root-B-osctCk.js";
|
|
2
2
|
import { t as getPackageVersion } from "./version-C8x2hQrZ.js";
|
|
3
|
-
import { t as PATHS } from "./paths-
|
|
4
|
-
import { A as state, 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-
|
|
3
|
+
import { t as PATHS } from "./paths-Ci485qSJ.js";
|
|
4
|
+
import { A as state, 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-BtJhjXXu.js";
|
|
5
5
|
import { a as resolveExecutable, c as runManagedExeCapture, i as parseIntEnv, l as spawnTaskkillBestEffort, r as parseBoolEnv } from "./exec-y8C_MU8A.js";
|
|
6
|
-
import {
|
|
7
|
-
import { t as
|
|
6
|
+
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";
|
|
7
|
+
import { i as registerExitHandlers$1, n as getInstanceUuid, r as recordWorkerRepo, t as WorktreeRegistry } from "./lifecycle-Bg6doY3-.js";
|
|
8
|
+
import { t as MCP_WORKSPACE_HEADER } from "./mcp-workspace-header-dERl2YTT.js";
|
|
8
9
|
import { n as ArtifactError, r as applyInsecureTls, t as ArtifactClient } from "./client-CQMfroGV.js";
|
|
9
|
-
import { n as isPidAlive$1, r as registerColbertExitHandlers, s as trackChild, t as getColbertInstanceUuid } from "./lifecycle-
|
|
10
|
-
import { f as resolveSealedGate, m as runGateChecks, p as sealedGateIds } from "./stop-gate-hook-
|
|
11
|
-
import { t as liveExec } from "./orchestration-
|
|
10
|
+
import { n as isPidAlive$1, r as registerColbertExitHandlers, s as trackChild, t as getColbertInstanceUuid } from "./lifecycle-CM9eTzvk.js";
|
|
11
|
+
import { f as resolveSealedGate, m as runGateChecks, p as sealedGateIds } from "./stop-gate-hook-DQnh_KfI.js";
|
|
12
|
+
import { t as liveExec } from "./orchestration-BiGCEwbH.js";
|
|
12
13
|
import { createRequire } from "node:module";
|
|
13
14
|
import consola from "consola";
|
|
14
15
|
import { chmodSync, closeSync, constants, cpSync, existsSync, mkdirSync, openSync, readFileSync, readdirSync, realpathSync, renameSync, rmSync, statSync, unlinkSync, writeFileSync, writeSync } from "node:fs";
|
|
@@ -96,6 +97,25 @@ async function tryCreateLock(p) {
|
|
|
96
97
|
}
|
|
97
98
|
}
|
|
98
99
|
//#endregion
|
|
100
|
+
//#region src/lib/model-suffix.ts
|
|
101
|
+
/** Strip every trailing `[1m]` marker, case-insensitively. */
|
|
102
|
+
function stripTrailingOneMSuffix(id) {
|
|
103
|
+
const match = id.match(/(?:\[1m\])+$/i);
|
|
104
|
+
if (!match || match.index === void 0) return {
|
|
105
|
+
base: id,
|
|
106
|
+
hadSuffix: false
|
|
107
|
+
};
|
|
108
|
+
return {
|
|
109
|
+
base: id.slice(0, match.index),
|
|
110
|
+
hadSuffix: true
|
|
111
|
+
};
|
|
112
|
+
}
|
|
113
|
+
/** Reapply at most one canonical `[1m]` marker when the input had one. */
|
|
114
|
+
function normalizeTrailingOneMSuffix(id) {
|
|
115
|
+
const { base, hadSuffix } = stripTrailingOneMSuffix(id);
|
|
116
|
+
return hadSuffix ? `${base}[1m]` : base;
|
|
117
|
+
}
|
|
118
|
+
//#endregion
|
|
99
119
|
//#region src/lib/one-m-context.ts
|
|
100
120
|
/**
|
|
101
121
|
* Context-window threshold at which Claude Code's `[1m]` accounting unlock is
|
|
@@ -160,8 +180,9 @@ function oneMContextDisabled() {
|
|
|
160
180
|
* conservative 200K accounting rather than being over-budgeted into an overflow.
|
|
161
181
|
*/
|
|
162
182
|
function withOneMSuffix(id) {
|
|
163
|
-
|
|
164
|
-
|
|
183
|
+
const base = normalizeTrailingOneMSuffix(id).replace(/\[1m\]$/i, "");
|
|
184
|
+
if (oneMContextDisabled()) return base;
|
|
185
|
+
return catalogAdvertises1M(base) ? `${base}[1m]` : base;
|
|
165
186
|
}
|
|
166
187
|
/**
|
|
167
188
|
* Decorate a slug the USER named — a `-m` argument or a launcher default — with
|
|
@@ -208,9 +229,48 @@ function withOneMSuffix(id) {
|
|
|
208
229
|
* default — under-accounting, never overflow.
|
|
209
230
|
*/
|
|
210
231
|
function withOneMSuffixForLead(slug) {
|
|
211
|
-
|
|
212
|
-
if (
|
|
213
|
-
return catalogAdvertises1M(resolveModel(
|
|
232
|
+
const base = normalizeTrailingOneMSuffix(slug).replace(/\[1m\]$/i, "");
|
|
233
|
+
if (oneMContextDisabled()) return base;
|
|
234
|
+
return catalogAdvertises1M(resolveModel(base)) ? `${base}[1m]` : base;
|
|
235
|
+
}
|
|
236
|
+
//#endregion
|
|
237
|
+
//#region src/lib/fast-endpoint.ts
|
|
238
|
+
const ENDPOINTS = {
|
|
239
|
+
chat: /* @__PURE__ */ new Set(["/chat/completions", "/v1/chat/completions"]),
|
|
240
|
+
responses: /* @__PURE__ */ new Set(["/responses", "/v1/responses"]),
|
|
241
|
+
messages: /* @__PURE__ */ new Set(["/messages", "/v1/messages"])
|
|
242
|
+
};
|
|
243
|
+
/**
|
|
244
|
+
* Return the endpoint mandated by a fast-profile roster model.
|
|
245
|
+
*
|
|
246
|
+
* This is intentionally independent of the standard `pickEndpoint`: that
|
|
247
|
+
* resolver prefers chat when a catalog entry advertises both clients, while
|
|
248
|
+
* fast roles have a fixed provider contract. Gemini stays on chat; Luna, Sol,
|
|
249
|
+
* and Grok stay on Responses; the Opus Oracle stays on native Messages.
|
|
250
|
+
* Unknown ids return undefined so a fast caller cannot guess a transport.
|
|
251
|
+
*/
|
|
252
|
+
function fastEndpointRequirement(modelId) {
|
|
253
|
+
const id = modelId.replace(/(?:\[1m\])+$/i, "");
|
|
254
|
+
if (id === "gemini-3.7-flash") return "chat";
|
|
255
|
+
if (id === "gpt-5.6-luna" || id === "gpt-5.6-sol" || id === "grok-4.6") return "responses";
|
|
256
|
+
if (id === "claude-opus-5") return "messages";
|
|
257
|
+
}
|
|
258
|
+
/**
|
|
259
|
+
* Resolve the fixed fast transport only when the catalog explicitly advertises
|
|
260
|
+
* the required endpoint. An entry that advertises both still resolves to the
|
|
261
|
+
* policy endpoint, regardless of advertisement order.
|
|
262
|
+
*/
|
|
263
|
+
function fastEndpointForModel(model) {
|
|
264
|
+
const required = fastEndpointRequirement(model.id);
|
|
265
|
+
if (!required) return void 0;
|
|
266
|
+
const advertised = model.supported_endpoints;
|
|
267
|
+
if (!Array.isArray(advertised) || advertised.length === 0) return void 0;
|
|
268
|
+
return advertised.some((endpoint) => ENDPOINTS[required].has(endpoint)) ? required : void 0;
|
|
269
|
+
}
|
|
270
|
+
/** Resolve a fast endpoint from a catalog id, without selecting a fallback. */
|
|
271
|
+
function fastEndpointForCatalogId(modelId, catalog) {
|
|
272
|
+
const found = catalog?.find((model) => model.id === modelId);
|
|
273
|
+
return found ? fastEndpointForModel(found) : void 0;
|
|
214
274
|
}
|
|
215
275
|
//#endregion
|
|
216
276
|
//#region src/services/copilot/endpoint.ts
|
|
@@ -368,12 +428,16 @@ function isClaudeModel(modelId, model, originalModelId) {
|
|
|
368
428
|
* `originalModelId` is the optional pre-resolution request id; when supplied it
|
|
369
429
|
* is checked for Claude-likeness alongside the resolved id so an alias that
|
|
370
430
|
* resolves to a non-Claude-looking id can't slip past.
|
|
431
|
+
*
|
|
432
|
+
* `fastProfile` is an authenticated launch-policy signal. It replaces only the
|
|
433
|
+
* endpoint selection step with the fixed fast roster policy; Claude identity
|
|
434
|
+
* still wins first, and standard/BYO callers retain `pickEndpoint` unchanged.
|
|
371
435
|
*/
|
|
372
|
-
function classifyMessagesRoute(modelId, model, originalModelId) {
|
|
436
|
+
function classifyMessagesRoute(modelId, model, originalModelId, fastProfile = false) {
|
|
373
437
|
if (!modelId) return "claude-passthrough";
|
|
374
438
|
if (isClaudeModel(modelId, model, originalModelId)) return "claude-passthrough";
|
|
375
439
|
if (!model) return "claude-passthrough";
|
|
376
|
-
const endpoint = pickEndpoint(model);
|
|
440
|
+
const endpoint = fastProfile ? fastEndpointForModel(model) : pickEndpoint(model);
|
|
377
441
|
if (endpoint === "responses") return "responses-shim";
|
|
378
442
|
if (endpoint === "chat") return "chat-shim";
|
|
379
443
|
return "claude-passthrough";
|
|
@@ -451,13 +515,13 @@ const DEFAULT_OPUS_FAMILY = "5";
|
|
|
451
515
|
* The lead `-m fast` selects. `gpt-5.6-luna` — a distinct Luna-driven
|
|
452
516
|
* profile (see `./launch-profile`), NOT a Claude Sonnet budget lead. This
|
|
453
517
|
* REPLACES the earlier `-m fast` → `claude-sonnet-5` mapping: `fast` now
|
|
454
|
-
* names a deliberately lean Luna surface (
|
|
518
|
+
* names a deliberately lean Luna surface (five native agents, one peer
|
|
455
519
|
* persona, `peers`/`search` MCP groups only), not "budget Sonnet with the
|
|
456
520
|
* full standard surface". `resolveLaunchProfile` in `./launch-profile`
|
|
457
521
|
* keys off the same raw `-m` argument this constant is selected by, so the
|
|
458
522
|
* two can never disagree about which launches count as "fast".
|
|
459
523
|
*/
|
|
460
|
-
const FAST_LEAD_MODEL =
|
|
524
|
+
const FAST_LEAD_MODEL = FAST_PROFILE_MODELS.luna;
|
|
461
525
|
/** Small/fast tier for a budget lead, in the two forms this codebase needs.
|
|
462
526
|
*
|
|
463
527
|
* `SLUG` is the Anthropic-published DASHED form and is what goes into
|
|
@@ -18926,7 +18990,7 @@ function logAudit$1(record) {
|
|
|
18926
18990
|
try {
|
|
18927
18991
|
const fs = await import("node:fs/promises");
|
|
18928
18992
|
const path = await import("node:path");
|
|
18929
|
-
const { PATHS } = await import("./paths-
|
|
18993
|
+
const { PATHS } = await import("./paths-GD7bgGGy.js");
|
|
18930
18994
|
const dir = path.join(PATHS.APP_DIR, "browser-mcp");
|
|
18931
18995
|
await fs.mkdir(dir, { recursive: true });
|
|
18932
18996
|
const line = JSON.stringify({
|
|
@@ -27454,6 +27518,241 @@ function shimDefaultsToXhigh(id) {
|
|
|
27454
27518
|
return XHIGH_DEFAULT_SHIM_MODELS.includes(normalizeModelId(id));
|
|
27455
27519
|
}
|
|
27456
27520
|
//#endregion
|
|
27521
|
+
//#region src/lib/launch-profile.ts
|
|
27522
|
+
const STANDARD_PROFILE = Object.freeze({
|
|
27523
|
+
id: "standard",
|
|
27524
|
+
hasCoordinator: true
|
|
27525
|
+
});
|
|
27526
|
+
/**
|
|
27527
|
+
* The `-m fast` roster: exactly five native agents (`Explore`, `implementer`,
|
|
27528
|
+
* `reviewer`, `planner`, `critic`), the fast-only `oracle` peer tool, no coordinator,
|
|
27529
|
+
* and only `peers`/`search` plus the ordinary opt-in `browser` group.
|
|
27530
|
+
* `workers`/`orchestrate`/`decide`/`fleet`/`first-mate` are hard denies even
|
|
27531
|
+
* when their independent standard-profile gates pass.
|
|
27532
|
+
*/
|
|
27533
|
+
const FAST_PROFILE = Object.freeze({
|
|
27534
|
+
id: "fast",
|
|
27535
|
+
nativeRoster: new Set(FAST_PROFILE_NATIVE_AGENT_NAMES),
|
|
27536
|
+
personaAllowlist: /* @__PURE__ */ new Set(["oracle"]),
|
|
27537
|
+
allowedGroups: /* @__PURE__ */ new Set([
|
|
27538
|
+
"peers",
|
|
27539
|
+
"search",
|
|
27540
|
+
"browser"
|
|
27541
|
+
]),
|
|
27542
|
+
hasCoordinator: false
|
|
27543
|
+
});
|
|
27544
|
+
function profileDescriptor(id) {
|
|
27545
|
+
return id === "fast" ? FAST_PROFILE : STANDARD_PROFILE;
|
|
27546
|
+
}
|
|
27547
|
+
/**
|
|
27548
|
+
* Resolve the parsed `-m` argument to a launch profile.
|
|
27549
|
+
*
|
|
27550
|
+
* Deliberately keyed on the RAW alias string (trimmed, case-insensitive
|
|
27551
|
+
* `"fast"`), never on a resolved model id: `resolveLeadSlugArg` maps `fast`
|
|
27552
|
+
* to `FAST_LEAD_MODEL` (`./port`) before this is of any use to a caller who
|
|
27553
|
+
* only has the resolved id, so callers that already resolved the lead must
|
|
27554
|
+
* pass the ORIGINAL `-m` value here, not the resolved one. This is what
|
|
27555
|
+
* keeps `-m gpt-5.6-luna` (a direct pin of the same underlying model) a
|
|
27556
|
+
* standard-surface launch — only the literal alias narrows the surface.
|
|
27557
|
+
*/
|
|
27558
|
+
function resolveLaunchProfile(modelArg) {
|
|
27559
|
+
return modelArg?.trim().toLowerCase() === "fast" ? "fast" : "standard";
|
|
27560
|
+
}
|
|
27561
|
+
/**
|
|
27562
|
+
* Router-owned alias id for the fast profile's Sonnet-tier row
|
|
27563
|
+
* (`ANTHROPIC_DEFAULT_SONNET_MODEL`). Never sent upstream — canonicalized to
|
|
27564
|
+
* `LUNA_REAL_MODEL_ID` by `canonicalizeAliasModel` before the request
|
|
27565
|
+
* reaches Copilot.
|
|
27566
|
+
*/
|
|
27567
|
+
const LUNA_DRIVER_ALIAS_ID = "gh-router-luna-driver-max";
|
|
27568
|
+
/** Fast native-agent alias ids preserve role-specific effort provenance until
|
|
27569
|
+
* the authenticated request boundary. They both canonicalize to Luna, but the
|
|
27570
|
+
* Explore is fixed high while the implementer is fixed max. */
|
|
27571
|
+
const LUNA_SCOUT_ALIAS_ID = "gh-router-luna-scout-high";
|
|
27572
|
+
const LUNA_IMPLEMENTER_ALIAS_ID = "gh-router-luna-implementer-max";
|
|
27573
|
+
/** Fast-profile critic alias. It preserves Gemini's fixed medium effort until
|
|
27574
|
+
* the authenticated request boundary; bare Gemini remains high for the lead
|
|
27575
|
+
* and Advisor traffic. */
|
|
27576
|
+
const FAST_CRITIC_ALIAS_ID = "gh-router-fast-critic-medium";
|
|
27577
|
+
const LUNA_SONNET_ALIAS_ID = "gh-router-luna-sonnet-xhigh";
|
|
27578
|
+
/**
|
|
27579
|
+
* Router-owned alias id for the fast profile's Haiku-tier row
|
|
27580
|
+
* (`ANTHROPIC_DEFAULT_HAIKU_MODEL` / `ANTHROPIC_SMALL_FAST_MODEL`).
|
|
27581
|
+
*/
|
|
27582
|
+
const LUNA_HAIKU_ALIAS_ID = "gh-router-luna-haiku-high";
|
|
27583
|
+
/** The real Copilot catalog id every Luna alias (including the driver
|
|
27584
|
+
* itself) canonicalizes to. */
|
|
27585
|
+
const LUNA_REAL_MODEL_ID = FAST_PROFILE_MODELS.luna;
|
|
27586
|
+
/**
|
|
27587
|
+
* The full alias table, keyed by `aliasId`. A simpler model-id-only table is
|
|
27588
|
+
* rejected by design: the driver, the Sonnet tier, and the Haiku tier all
|
|
27589
|
+
* resolve to the SAME Luna catalog id, while the fast critic alias resolves
|
|
27590
|
+
* to Gemini. After early canonicalization a table keyed on the real id could
|
|
27591
|
+
* no longer tell which absent-effort default applies. Alias provenance is the
|
|
27592
|
+
* minimum discriminator that survives from tier selection through to request
|
|
27593
|
+
* preprocessing, which is why canonicalization must happen LAST (in the
|
|
27594
|
+
* `/v1/messages` identity preflight), after the effort default has already
|
|
27595
|
+
* been read off the alias.
|
|
27596
|
+
*/
|
|
27597
|
+
const MODEL_ALIAS_TABLE = /* @__PURE__ */ new Map([
|
|
27598
|
+
[LUNA_DRIVER_ALIAS_ID, {
|
|
27599
|
+
aliasId: LUNA_DRIVER_ALIAS_ID,
|
|
27600
|
+
realModel: LUNA_REAL_MODEL_ID,
|
|
27601
|
+
absentEffortDefault: "max"
|
|
27602
|
+
}],
|
|
27603
|
+
[LUNA_SCOUT_ALIAS_ID, {
|
|
27604
|
+
aliasId: LUNA_SCOUT_ALIAS_ID,
|
|
27605
|
+
realModel: LUNA_REAL_MODEL_ID,
|
|
27606
|
+
absentEffortDefault: "high"
|
|
27607
|
+
}],
|
|
27608
|
+
[LUNA_IMPLEMENTER_ALIAS_ID, {
|
|
27609
|
+
aliasId: LUNA_IMPLEMENTER_ALIAS_ID,
|
|
27610
|
+
realModel: LUNA_REAL_MODEL_ID,
|
|
27611
|
+
absentEffortDefault: "max"
|
|
27612
|
+
}],
|
|
27613
|
+
[FAST_CRITIC_ALIAS_ID, {
|
|
27614
|
+
aliasId: FAST_CRITIC_ALIAS_ID,
|
|
27615
|
+
realModel: FAST_PROFILE_MODELS.critic,
|
|
27616
|
+
absentEffortDefault: "medium"
|
|
27617
|
+
}],
|
|
27618
|
+
[LUNA_SONNET_ALIAS_ID, {
|
|
27619
|
+
aliasId: LUNA_SONNET_ALIAS_ID,
|
|
27620
|
+
realModel: LUNA_REAL_MODEL_ID,
|
|
27621
|
+
absentEffortDefault: "xhigh"
|
|
27622
|
+
}],
|
|
27623
|
+
[LUNA_HAIKU_ALIAS_ID, {
|
|
27624
|
+
aliasId: LUNA_HAIKU_ALIAS_ID,
|
|
27625
|
+
realModel: LUNA_REAL_MODEL_ID,
|
|
27626
|
+
absentEffortDefault: "high"
|
|
27627
|
+
}]
|
|
27628
|
+
]);
|
|
27629
|
+
/**
|
|
27630
|
+
* Look up the alias descriptor for a wire-facing model id (with or without
|
|
27631
|
+
* a trailing `[1m]` bracket — the bracket is stripped before the table
|
|
27632
|
+
* lookup and is orthogonal to alias identity). Returns undefined for any
|
|
27633
|
+
* id that isn't one of the registered aliases (including bare `claude-*`
|
|
27634
|
+
* ids and every other real Copilot catalog id).
|
|
27635
|
+
*/
|
|
27636
|
+
function resolveModelAlias(id) {
|
|
27637
|
+
const { base } = stripTrailingOneMSuffix(id);
|
|
27638
|
+
return MODEL_ALIAS_TABLE.get(base);
|
|
27639
|
+
}
|
|
27640
|
+
/**
|
|
27641
|
+
* Strip alias provenance and return the real catalog id to send upstream.
|
|
27642
|
+
* Idempotent passthrough for any id that isn't a registered alias (a bare
|
|
27643
|
+
* `claude-*` slug, an already-real Copilot id, or anything else) — this is
|
|
27644
|
+
* safe to call unconditionally on every `body.model` at the outbound
|
|
27645
|
+
* boundary. Preserves a trailing `[1m]` bracket: canonicalization only
|
|
27646
|
+
* erases ALIAS identity, not the 1M-context accounting decoration.
|
|
27647
|
+
*/
|
|
27648
|
+
function canonicalizeAliasModel(id) {
|
|
27649
|
+
const { base, hadSuffix } = stripTrailingOneMSuffix(id);
|
|
27650
|
+
const alias = MODEL_ALIAS_TABLE.get(base);
|
|
27651
|
+
if (!alias) return normalizeTrailingOneMSuffix(id);
|
|
27652
|
+
return hadSuffix ? `${alias.realModel}[1m]` : alias.realModel;
|
|
27653
|
+
}
|
|
27654
|
+
const FAST_REQUIRED_CONTEXT_TOKENS = 1e6;
|
|
27655
|
+
function findModel(catalog, id) {
|
|
27656
|
+
return catalog?.data?.find((m) => m.id === id);
|
|
27657
|
+
}
|
|
27658
|
+
function hasToolCalls(model) {
|
|
27659
|
+
return model?.capabilities?.supports?.tool_calls === true;
|
|
27660
|
+
}
|
|
27661
|
+
function hasContextAtLeast(model, tokens) {
|
|
27662
|
+
return (model?.capabilities?.limits?.max_context_window_tokens ?? 0) >= tokens;
|
|
27663
|
+
}
|
|
27664
|
+
function supportsEffort(model, effort) {
|
|
27665
|
+
const list = model?.capabilities?.supports?.reasoning_effort;
|
|
27666
|
+
return Array.isArray(list) && list.includes(effort);
|
|
27667
|
+
}
|
|
27668
|
+
const FAST_REVIEWER_MIN_PROMPT_TOKENS = 2e5;
|
|
27669
|
+
function supportsEndpoint(model, endpoint) {
|
|
27670
|
+
return model !== void 0 && fastEndpointForModel(model) === endpoint;
|
|
27671
|
+
}
|
|
27672
|
+
function hasUsablePromptMetadata(model) {
|
|
27673
|
+
const prompt = model?.capabilities?.limits?.max_prompt_tokens;
|
|
27674
|
+
return typeof prompt === "number" && Number.isFinite(prompt) && prompt > 0;
|
|
27675
|
+
}
|
|
27676
|
+
function hasPromptAtLeast(model, tokens) {
|
|
27677
|
+
const prompt = model?.capabilities?.limits?.max_prompt_tokens;
|
|
27678
|
+
return typeof prompt === "number" && Number.isFinite(prompt) && prompt >= tokens;
|
|
27679
|
+
}
|
|
27680
|
+
/**
|
|
27681
|
+
* Validate the live Copilot catalog carries every model the fast profile's
|
|
27682
|
+
* EXACT roster depends on, with the specific capabilities each assignment
|
|
27683
|
+
* needs. These are capability-availability PREREQUISITES for constructing
|
|
27684
|
+
* the roster — not an allowlist of models the user may select later in the
|
|
27685
|
+
* session — so a partial catalog fails the whole `-m fast` launch rather
|
|
27686
|
+
* than silently substituting or dropping an agent.
|
|
27687
|
+
*
|
|
27688
|
+
* Checks, per the fast-launch-profile design:
|
|
27689
|
+
* - Luna lead/Explore/implementer: tool calls, >=1M, high+max, Responses.
|
|
27690
|
+
* - Sol planner: tool calls, >=1M, high, Responses.
|
|
27691
|
+
* - Grok reviewer: tool calls, medium, Responses, usable prompt metadata.
|
|
27692
|
+
* - Gemini Advisor: >=1M, high, chat-completions.
|
|
27693
|
+
* - Gemini critic: tool calls, >=1M, medium, chat-completions.
|
|
27694
|
+
* - Opus Oracle: exact Opus 5, >=1M, adaptive/high, Messages, prompt metadata.
|
|
27695
|
+
*
|
|
27696
|
+
* Pure over the passed-in catalog snapshot so it's unit-testable without
|
|
27697
|
+
* `state` — callers pass `state.models` at call time.
|
|
27698
|
+
*/
|
|
27699
|
+
function validateFastProfilePrerequisites(catalog) {
|
|
27700
|
+
const missing = [];
|
|
27701
|
+
const luna = findModel(catalog, LUNA_REAL_MODEL_ID);
|
|
27702
|
+
if (!luna) missing.push(`${LUNA_REAL_MODEL_ID}: absent from the live catalog`);
|
|
27703
|
+
else {
|
|
27704
|
+
if (!hasToolCalls(luna)) missing.push(`${LUNA_REAL_MODEL_ID}: does not advertise tool_calls`);
|
|
27705
|
+
if (!hasContextAtLeast(luna, FAST_REQUIRED_CONTEXT_TOKENS)) missing.push(`${LUNA_REAL_MODEL_ID}: advertised context window is below 1M`);
|
|
27706
|
+
if (!supportsEffort(luna, "high") || !supportsEffort(luna, "max")) missing.push(`${LUNA_REAL_MODEL_ID}: does not advertise both "high" and "max" reasoning effort`);
|
|
27707
|
+
if (!supportsEndpoint(luna, "responses")) missing.push(`${LUNA_REAL_MODEL_ID}: does not advertise a supported Responses endpoint`);
|
|
27708
|
+
}
|
|
27709
|
+
const sol = findModel(catalog, FAST_PROFILE_MODELS.planner);
|
|
27710
|
+
if (!sol) missing.push(`${FAST_PROFILE_MODELS.planner}: absent from the live catalog`);
|
|
27711
|
+
else {
|
|
27712
|
+
if (!hasToolCalls(sol)) missing.push(`${FAST_PROFILE_MODELS.planner}: does not advertise tool_calls`);
|
|
27713
|
+
if (!hasContextAtLeast(sol, FAST_REQUIRED_CONTEXT_TOKENS)) missing.push(`${FAST_PROFILE_MODELS.planner}: advertised context window is below 1M`);
|
|
27714
|
+
if (!supportsEffort(sol, "high")) missing.push(`${FAST_PROFILE_MODELS.planner}: does not advertise a "high" reasoning effort`);
|
|
27715
|
+
if (!supportsEndpoint(sol, "responses")) missing.push(`${FAST_PROFILE_MODELS.planner}: does not advertise a supported Responses endpoint`);
|
|
27716
|
+
}
|
|
27717
|
+
const grok = findModel(catalog, FAST_PROFILE_MODELS.reviewer);
|
|
27718
|
+
if (!grok) missing.push(`${FAST_PROFILE_MODELS.reviewer}: absent from the live catalog`);
|
|
27719
|
+
else {
|
|
27720
|
+
if (!hasToolCalls(grok)) missing.push(`${FAST_PROFILE_MODELS.reviewer}: does not advertise tool_calls`);
|
|
27721
|
+
if (!supportsEffort(grok, "medium")) missing.push(`${FAST_PROFILE_MODELS.reviewer}: does not advertise a "medium" reasoning effort`);
|
|
27722
|
+
if (!hasPromptAtLeast(grok, 2e5)) missing.push(`${FAST_PROFILE_MODELS.reviewer}: advertised max_prompt_tokens is below ${FAST_REVIEWER_MIN_PROMPT_TOKENS}`);
|
|
27723
|
+
if (!supportsEndpoint(grok, "responses")) missing.push(`${FAST_PROFILE_MODELS.reviewer}: does not advertise a supported Responses endpoint`);
|
|
27724
|
+
}
|
|
27725
|
+
const gemini = findModel(catalog, FAST_PROFILE_MODELS.critic);
|
|
27726
|
+
if (!gemini) missing.push(`${FAST_PROFILE_MODELS.critic}: absent from the live catalog`);
|
|
27727
|
+
else {
|
|
27728
|
+
if (!hasToolCalls(gemini)) missing.push(`${FAST_PROFILE_MODELS.critic}: does not advertise tool_calls for the native critic`);
|
|
27729
|
+
if (!hasContextAtLeast(gemini, FAST_REQUIRED_CONTEXT_TOKENS)) missing.push(`${FAST_PROFILE_MODELS.critic}: advertised context window is below 1M`);
|
|
27730
|
+
if (!supportsEffort(gemini, "high")) missing.push(`${FAST_PROFILE_MODELS.critic}: does not advertise a "high" reasoning effort for Advisor`);
|
|
27731
|
+
if (!supportsEffort(gemini, "medium")) missing.push(`${FAST_PROFILE_MODELS.critic}: does not advertise a "medium" reasoning effort for the native critic`);
|
|
27732
|
+
if (!supportsEndpoint(gemini, "chat")) missing.push(`${FAST_PROFILE_MODELS.critic}: does not advertise a supported chat-completions endpoint`);
|
|
27733
|
+
}
|
|
27734
|
+
const opus = findModel(catalog, FAST_PROFILE_MODELS.oracle);
|
|
27735
|
+
if (!opus) missing.push(`${FAST_PROFILE_MODELS.oracle}: absent from the live catalog`);
|
|
27736
|
+
else {
|
|
27737
|
+
if (!hasContextAtLeast(opus, FAST_REQUIRED_CONTEXT_TOKENS)) missing.push(`${FAST_PROFILE_MODELS.oracle}: advertised context window is below 1M`);
|
|
27738
|
+
if (!supportsEffort(opus, "high")) missing.push(`${FAST_PROFILE_MODELS.oracle}: does not advertise a "high" reasoning effort`);
|
|
27739
|
+
if (opus.capabilities?.supports?.adaptive_thinking !== true) missing.push(`${FAST_PROFILE_MODELS.oracle}: does not advertise adaptive_thinking`);
|
|
27740
|
+
if (!hasUsablePromptMetadata(opus)) missing.push(`${FAST_PROFILE_MODELS.oracle}: no usable max_prompt_tokens metadata`);
|
|
27741
|
+
if (!supportsEndpoint(opus, "messages")) missing.push(`${FAST_PROFILE_MODELS.oracle}: does not advertise a supported Messages endpoint`);
|
|
27742
|
+
}
|
|
27743
|
+
return {
|
|
27744
|
+
ok: missing.length === 0,
|
|
27745
|
+
missing
|
|
27746
|
+
};
|
|
27747
|
+
}
|
|
27748
|
+
/**
|
|
27749
|
+
* Format `validateFastProfilePrerequisites`'s failure list into the launch
|
|
27750
|
+
* error message: every missing/invalid model, plus the rollback command.
|
|
27751
|
+
*/
|
|
27752
|
+
function formatFastPrerequisiteFailure(missing) {
|
|
27753
|
+
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.";
|
|
27754
|
+
}
|
|
27755
|
+
//#endregion
|
|
27457
27756
|
//#region src/lib/mcp-capabilities.ts
|
|
27458
27757
|
/**
|
|
27459
27758
|
* Capability-gate predicates for the proxy's MCP tool surface.
|
|
@@ -27701,28 +28000,39 @@ function generalPurposeFastModel() {
|
|
|
27701
28000
|
minContextTokens: ONE_M_TOKENS
|
|
27702
28001
|
});
|
|
27703
28002
|
}
|
|
27704
|
-
|
|
27705
|
-
const
|
|
28003
|
+
/** @deprecated Fast `scout` was renamed to capitalized `Explore`. */
|
|
28004
|
+
const FAST_SCOUT_MODEL = FAST_PROFILE_NATIVE_MODELS.Explore;
|
|
28005
|
+
const FAST_IMPLEMENTER_MODEL = FAST_PROFILE_NATIVE_MODELS.implementer;
|
|
27706
28006
|
/** Grok 4.6 advertises 500K total context / 372K max prompt, so it remains bare
|
|
27707
28007
|
* and is gated by max_prompt_tokens rather than the 1M floor. */
|
|
27708
|
-
const FAST_REVIEWER_MODEL =
|
|
27709
|
-
const FAST_PLANNER_MODEL =
|
|
27710
|
-
const
|
|
27711
|
-
|
|
27712
|
-
|
|
27713
|
-
const
|
|
27714
|
-
const
|
|
28008
|
+
const FAST_REVIEWER_MODEL = FAST_PROFILE_NATIVE_MODELS.reviewer;
|
|
28009
|
+
const FAST_PLANNER_MODEL = FAST_PROFILE_NATIVE_MODELS.planner;
|
|
28010
|
+
const FAST_CRITIC_MODEL = FAST_PROFILE_NATIVE_MODELS.critic;
|
|
28011
|
+
const FAST_ORACLE_MODEL = FAST_PROFILE_ORACLE_MODEL;
|
|
28012
|
+
/** @deprecated Fast `scout` was renamed to capitalized `Explore`. */
|
|
28013
|
+
const FAST_SCOUT_EFFORT = FAST_PROFILE_NATIVE_EFFORTS.Explore;
|
|
28014
|
+
const FAST_IMPLEMENTER_EFFORT = FAST_PROFILE_NATIVE_EFFORTS.implementer;
|
|
28015
|
+
const FAST_REVIEWER_EFFORT = FAST_PROFILE_NATIVE_EFFORTS.reviewer;
|
|
28016
|
+
const FAST_PLANNER_EFFORT = FAST_PROFILE_NATIVE_EFFORTS.planner;
|
|
28017
|
+
const FAST_CRITIC_EFFORT = FAST_PROFILE_NATIVE_EFFORTS.critic;
|
|
28018
|
+
const FAST_ORACLE_EFFORT = FAST_PROFILE_ORACLE_EFFORT;
|
|
27715
28019
|
function fastScoutModel() {
|
|
27716
|
-
|
|
28020
|
+
const id = firstPresentInCatalog([FAST_SCOUT_MODEL], {
|
|
27717
28021
|
requireToolCalls: true,
|
|
27718
28022
|
minContextTokens: ONE_M_TOKENS
|
|
27719
28023
|
});
|
|
28024
|
+
if (!id) return void 0;
|
|
28025
|
+
const found = state.models?.data.find((m) => m.id === id);
|
|
28026
|
+
return found && fastEndpointForModel(found) === "responses" ? id : void 0;
|
|
27720
28027
|
}
|
|
27721
28028
|
function fastImplementerModel() {
|
|
27722
|
-
|
|
28029
|
+
const id = firstPresentInCatalog([FAST_IMPLEMENTER_MODEL], {
|
|
27723
28030
|
requireToolCalls: true,
|
|
27724
28031
|
minContextTokens: ONE_M_TOKENS
|
|
27725
28032
|
});
|
|
28033
|
+
if (!id) return void 0;
|
|
28034
|
+
const found = state.models?.data.find((m) => m.id === id);
|
|
28035
|
+
return found && fastEndpointForModel(found) === "responses" ? id : void 0;
|
|
27726
28036
|
}
|
|
27727
28037
|
function fastPlannerModel() {
|
|
27728
28038
|
const id = firstPresentInCatalog([FAST_PLANNER_MODEL], {
|
|
@@ -27732,8 +28042,8 @@ function fastPlannerModel() {
|
|
|
27732
28042
|
if (!id) return void 0;
|
|
27733
28043
|
const found = state.models?.data.find((m) => m.id === id);
|
|
27734
28044
|
const efforts = found?.capabilities?.supports?.reasoning_effort;
|
|
27735
|
-
if (!Array.isArray(efforts) || !efforts.includes(
|
|
27736
|
-
if (
|
|
28045
|
+
if (!Array.isArray(efforts) || !efforts.includes(FAST_PLANNER_EFFORT)) return void 0;
|
|
28046
|
+
if (!found || fastEndpointForModel(found) !== "responses") return void 0;
|
|
27737
28047
|
return id;
|
|
27738
28048
|
}
|
|
27739
28049
|
/** Gate Grok on the prompt limit that actually constrains pasted review input. */
|
|
@@ -27744,11 +28054,23 @@ function fastReviewerModel() {
|
|
|
27744
28054
|
if (!found) return void 0;
|
|
27745
28055
|
if (found.capabilities?.supports?.tool_calls !== true) return void 0;
|
|
27746
28056
|
const efforts = found.capabilities?.supports?.reasoning_effort;
|
|
27747
|
-
if (!Array.isArray(efforts) || !efforts.includes(
|
|
28057
|
+
if (!Array.isArray(efforts) || !efforts.includes(FAST_REVIEWER_EFFORT)) return void 0;
|
|
27748
28058
|
if ((found.capabilities?.limits?.max_prompt_tokens ?? 0) < 2e5) return void 0;
|
|
27749
|
-
if (
|
|
28059
|
+
if (fastEndpointForModel(found) !== "responses") return void 0;
|
|
27750
28060
|
return FAST_REVIEWER_MODEL;
|
|
27751
28061
|
}
|
|
28062
|
+
/** Exact Gemini 3.7 Flash only: the fast native critic has no fallback.
|
|
28063
|
+
* Unlike the fast Advisor, it needs tool calls and a medium effort choice. */
|
|
28064
|
+
function fastCriticModel() {
|
|
28065
|
+
const found = state.models?.data.find((m) => m.id === FAST_CRITIC_MODEL);
|
|
28066
|
+
if (!found) return void 0;
|
|
28067
|
+
if (found.capabilities?.supports?.tool_calls !== true) return void 0;
|
|
28068
|
+
if ((found.capabilities?.limits?.max_context_window_tokens ?? 0) < 1e6) return void 0;
|
|
28069
|
+
const efforts = found.capabilities?.supports?.reasoning_effort;
|
|
28070
|
+
if (!Array.isArray(efforts) || !efforts.includes(FAST_CRITIC_EFFORT)) return void 0;
|
|
28071
|
+
if (fastEndpointForModel(found) !== "chat") return void 0;
|
|
28072
|
+
return FAST_CRITIC_MODEL;
|
|
28073
|
+
}
|
|
27752
28074
|
/** Exact Opus 5 only: the fast Oracle never inherits standard opus_critic's
|
|
27753
28075
|
* older-family fallback. */
|
|
27754
28076
|
function fastOracleModel() {
|
|
@@ -27757,9 +28079,9 @@ function fastOracleModel() {
|
|
|
27757
28079
|
if ((found.capabilities?.limits?.max_context_window_tokens ?? 0) < 1e6) return void 0;
|
|
27758
28080
|
if ((found.capabilities?.limits?.max_prompt_tokens ?? 0) <= 0) return void 0;
|
|
27759
28081
|
const efforts = found.capabilities?.supports?.reasoning_effort;
|
|
27760
|
-
if (!Array.isArray(efforts) || !efforts.includes(
|
|
28082
|
+
if (!Array.isArray(efforts) || !efforts.includes(FAST_ORACLE_EFFORT)) return void 0;
|
|
27761
28083
|
if (found.capabilities?.supports?.adaptive_thinking !== true) return void 0;
|
|
27762
|
-
if (
|
|
28084
|
+
if (fastEndpointForModel(found) !== "messages") return void 0;
|
|
27763
28085
|
return FAST_ORACLE_MODEL;
|
|
27764
28086
|
}
|
|
27765
28087
|
/**
|
|
@@ -29602,31 +29924,16 @@ const ADVISOR_MIN_EFFORT = "high";
|
|
|
29602
29924
|
* the decorrelation instrument and are untouched. `GH_ROUTER_ADVISOR_MODEL`
|
|
29603
29925
|
* keeps a cross-lab advisor one env var away for anyone who wants it back. */
|
|
29604
29926
|
const ADVISOR_ESCALATION_MODEL = "claude-opus-5";
|
|
29605
|
-
/** The Advisor model for
|
|
29606
|
-
*
|
|
29607
|
-
*
|
|
29608
|
-
*
|
|
29609
|
-
|
|
29610
|
-
|
|
29611
|
-
*
|
|
29612
|
-
*
|
|
29613
|
-
const ADVISOR_FAST_PROFILE_MODEL = "gemini-3.7-flash";
|
|
29614
|
-
/**
|
|
29615
|
-
* True when `leadModel` names the fast-profile Luna lead (bare, or with the
|
|
29616
|
-
* `[1m]` context decoration `withOneMSuffixForLead` applies to it).
|
|
29617
|
-
*/
|
|
29618
|
-
function isFastProfileLead(leadModel) {
|
|
29619
|
-
if (!leadModel) return false;
|
|
29620
|
-
const bare = leadModel.replace(/\[1m\]$/, "").trim();
|
|
29621
|
-
const lastSegment = bare.slice(bare.lastIndexOf("/") + 1);
|
|
29622
|
-
return bare === "gpt-5.6-luna" || lastSegment === "gpt-5.6-luna";
|
|
29623
|
-
}
|
|
29624
|
-
/** True when the live catalog actually carries `ADVISOR_FAST_PROFILE_MODEL`.
|
|
29625
|
-
* Mirrors `shouldEscalateAdvisor`'s catalog probe: never advertise a model
|
|
29626
|
-
* the account cannot reach, and fall back to the cross-lab default instead
|
|
29627
|
-
* of a hard failure when it's absent. */
|
|
29927
|
+
/** The Advisor model for an authenticated fast primary lead. Gemini 3.7 Flash
|
|
29928
|
+
* is cross-lab from the OpenAI-backed Luna/Sol leads and is selected only when
|
|
29929
|
+
* its live catalog entry advertises the required Chat endpoint. Kept distinct
|
|
29930
|
+
* from `ADVISOR_DEFAULT_MODEL` so standard launches remain unchanged. */
|
|
29931
|
+
const ADVISOR_FAST_PROFILE_MODEL = FAST_PROFILE_ADVISOR_MODEL;
|
|
29932
|
+
/** True only when the live Gemini entry satisfies the fixed fast transport.
|
|
29933
|
+
* An ID-only presence check is insufficient: selecting a model whose catalog
|
|
29934
|
+
* row lost Chat support would silently degrade every fast Advisor call. */
|
|
29628
29935
|
function fastProfileAdvisorAvailable() {
|
|
29629
|
-
return state.models?.data
|
|
29936
|
+
return fastEndpointForCatalogId(ADVISOR_FAST_PROFILE_MODEL, state.models?.data) === "chat";
|
|
29630
29937
|
}
|
|
29631
29938
|
/** Output cap for the Anthropic-branch advisor call when the catalog carries no
|
|
29632
29939
|
* limits for the resolved model. The value the branch used unconditionally
|
|
@@ -29673,10 +29980,18 @@ function advisorUsesResponses(resolvedAdvisorModel) {
|
|
|
29673
29980
|
* chat, mirroring `pickEndpoint`'s "omits supported_endpoints => chat-eligible"
|
|
29674
29981
|
* convention — the same convention `classifyMessagesRoute` relies on for a
|
|
29675
29982
|
* lead model, applied here to the advisor's OWN model instead.
|
|
29983
|
+
*
|
|
29984
|
+
* The authenticated fast Advisor passes `fastProfile:true`, which uses the same
|
|
29985
|
+
* fixed endpoint policy as its lead/agent roster. Standard calls leave this
|
|
29986
|
+
* false and retain the historical catalog/name behavior.
|
|
29676
29987
|
*/
|
|
29677
|
-
function advisorTransport(resolvedAdvisorModel) {
|
|
29988
|
+
function advisorTransport(resolvedAdvisorModel, fastProfile = false) {
|
|
29678
29989
|
const bare = resolvedAdvisorModel.slice(resolvedAdvisorModel.lastIndexOf("/") + 1);
|
|
29679
29990
|
const entry = state.models?.data?.find((m) => m.id === resolvedAdvisorModel || m.id === bare);
|
|
29991
|
+
if (fastProfile && entry) {
|
|
29992
|
+
const fixed = fastEndpointForModel(entry);
|
|
29993
|
+
if (fixed === "messages" || fixed === "responses" || fixed === "chat") return fixed;
|
|
29994
|
+
}
|
|
29680
29995
|
if (isClaudeModel(resolvedAdvisorModel, entry)) return "messages";
|
|
29681
29996
|
if (advisorUsesResponses(resolvedAdvisorModel)) return "responses";
|
|
29682
29997
|
return "chat";
|
|
@@ -29707,29 +30022,19 @@ function shouldEscalateAdvisor(leadModel) {
|
|
|
29707
30022
|
return state.models?.data?.some((m) => m.id === "claude-opus-5") ?? false;
|
|
29708
30023
|
}
|
|
29709
30024
|
/**
|
|
29710
|
-
* Pick the
|
|
29711
|
-
*
|
|
30025
|
+
* Pick the Advisor model for one request. Standard selection follows the
|
|
30026
|
+
* current lead so a `/model` switch can change budget escalation; authenticated
|
|
30027
|
+
* fast selection follows launch identity instead, so changing among the fixed
|
|
30028
|
+
* fast lead models never removes Gemini Advisor.
|
|
29712
30029
|
*
|
|
29713
|
-
*
|
|
29714
|
-
*
|
|
29715
|
-
*
|
|
30030
|
+
* Fast profile is a separate fixed contract: it requires Gemini's Chat endpoint
|
|
30031
|
+
* and ignores standard operator pins. Standard-profile precedence remains:
|
|
30032
|
+
* 1. `GH_ROUTER_ADVISOR_MODEL` (trimmed).
|
|
30033
|
+
* 2. A lighter Claude lead with Opus escalation available.
|
|
30034
|
+
* 3. The literal `ADVISOR_DEFAULT_MODEL`.
|
|
29716
30035
|
*
|
|
29717
|
-
*
|
|
29718
|
-
*
|
|
29719
|
-
* it works on every lead.
|
|
29720
|
-
* 2. An authenticated fast launch whose current lead is Luna, with
|
|
29721
|
-
* `ADVISOR_FAST_PROFILE_MODEL` present in the live catalog.
|
|
29722
|
-
* 3. A lighter Claude lead with the escalation model in the catalog.
|
|
29723
|
-
* 4. `ADVISOR_DEFAULT_MODEL`.
|
|
29724
|
-
*
|
|
29725
|
-
* Steps 2 and 3 are mutually exclusive lead families (non-Claude Luna vs. a
|
|
29726
|
-
* lighter Claude tier) so their relative order does not matter functionally;
|
|
29727
|
-
* fast-profile is checked first only because it is the more specific match.
|
|
29728
|
-
*
|
|
29729
|
-
* Step 4 returns the LITERAL constant rather than walking the OpenAI frontier
|
|
29730
|
-
* chain. An Opus lead must resolve to exactly what it resolves to today, and a
|
|
29731
|
-
* frontier walk could yield `gpt-5.5` on a catalog missing `gpt-5.6-sol` —
|
|
29732
|
-
* a silent change to the one path that is required not to move.
|
|
30036
|
+
* Step 3 deliberately does not walk the OpenAI frontier chain. That would
|
|
30037
|
+
* silently change the standard Opus-lead path when Sol is absent.
|
|
29733
30038
|
*/
|
|
29734
30039
|
/**
|
|
29735
30040
|
* Map an operator pin onto the id the catalog actually carries.
|
|
@@ -29756,17 +30061,20 @@ function normalizeAdvisorPin(pinned) {
|
|
|
29756
30061
|
return bare !== pinned && models.some((m) => m.id === bare) ? bare : pinned;
|
|
29757
30062
|
}
|
|
29758
30063
|
function resolveAdvisorModel(leadModel, fastProfile = false) {
|
|
30064
|
+
if (fastProfile) {
|
|
30065
|
+
if (!fastProfileAdvisorAvailable()) throw new Error(`fast Advisor invariant failed: ${ADVISOR_FAST_PROFILE_MODEL} must advertise the Chat endpoint`);
|
|
30066
|
+
return {
|
|
30067
|
+
model: ADVISOR_FAST_PROFILE_MODEL,
|
|
30068
|
+
escalated: false,
|
|
30069
|
+
fastProfile: true
|
|
30070
|
+
};
|
|
30071
|
+
}
|
|
29759
30072
|
const pinned = process.env.GH_ROUTER_ADVISOR_MODEL?.trim();
|
|
29760
30073
|
if (pinned) return {
|
|
29761
30074
|
model: normalizeAdvisorPin(pinned),
|
|
29762
30075
|
escalated: false,
|
|
29763
30076
|
fastProfile: false
|
|
29764
30077
|
};
|
|
29765
|
-
if (fastProfile && leadModel && isFastProfileLead(leadModel) && fastProfileAdvisorAvailable()) return {
|
|
29766
|
-
model: ADVISOR_FAST_PROFILE_MODEL,
|
|
29767
|
-
escalated: false,
|
|
29768
|
-
fastProfile: true
|
|
29769
|
-
};
|
|
29770
30078
|
if (leadModel && shouldEscalateAdvisor(leadModel)) return {
|
|
29771
30079
|
model: ADVISOR_ESCALATION_MODEL,
|
|
29772
30080
|
escalated: true,
|
|
@@ -29806,7 +30114,7 @@ function resolveAdvisorModel(leadModel, fastProfile = false) {
|
|
|
29806
30114
|
* something it accepts.
|
|
29807
30115
|
*/
|
|
29808
30116
|
function resolveAdvisorEffort(rawRequestBody, advisorModel, fastProfile = false) {
|
|
29809
|
-
let requested = fastProfile ?
|
|
30117
|
+
let requested = fastProfile ? FAST_PROFILE_ADVISOR_EFFORT : ADVISOR_DEFAULT_EFFORT;
|
|
29810
30118
|
if (rawRequestBody) try {
|
|
29811
30119
|
const body = JSON.parse(rawRequestBody);
|
|
29812
30120
|
const oc = body.output_config;
|
|
@@ -29815,7 +30123,7 @@ function resolveAdvisorEffort(rawRequestBody, advisorModel, fastProfile = false)
|
|
|
29815
30123
|
if (typeof explicit === "string" && EFFORT_ORDER.includes(explicit)) requested = explicit;
|
|
29816
30124
|
else if (thinking && typeof thinking === "object" && thinking.type === "enabled") requested = bucketEffort(thinking.budget_tokens);
|
|
29817
30125
|
} catch {}
|
|
29818
|
-
if (fastProfile) requested =
|
|
30126
|
+
if (fastProfile) requested = FAST_PROFILE_ADVISOR_EFFORT;
|
|
29819
30127
|
else if (EFFORT_ORDER.indexOf(requested) < EFFORT_ORDER.indexOf(ADVISOR_MIN_EFFORT)) requested = ADVISOR_MIN_EFFORT;
|
|
29820
30128
|
const supported = state.models?.data?.find((m) => m.id === resolveModel(advisorModel))?.capabilities?.supports?.reasoning_effort;
|
|
29821
30129
|
if (!Array.isArray(supported) || supported.length === 0) return requested;
|
|
@@ -29842,7 +30150,7 @@ Give the advice serious weight. If you follow a step and it fails empirically, o
|
|
|
29842
30150
|
If you've already retrieved data pointing one way and the advisor points another: don't silently switch. Surface the conflict in one more advisor call -- "I found X, you suggest Y, which constraint breaks the tie?" The advisor saw your evidence but may have underweighted it; a reconcile call is cheaper than committing to the wrong branch.`;
|
|
29843
30151
|
/** Fast-profile lead-only policy. Unlike the standard Claude Code instructions
|
|
29844
30152
|
* above, this makes consultation optional and leaves decision ownership with
|
|
29845
|
-
* the
|
|
30153
|
+
* the authenticated fast primary lead. Fast Task subagents never receive an advisor tool at all. */
|
|
29846
30154
|
const FAST_ADVISOR_TOOL_INSTRUCTIONS = `# Advisor Tool
|
|
29847
30155
|
|
|
29848
30156
|
You have access to an optional, transcript-aware \`advisor\` tool. It takes no parameters and returns non-binding consultation. You remain responsible for every decision.
|
|
@@ -30065,7 +30373,8 @@ async function runAdvisor(conversation, advisorModel, advisorEffort, signal, adv
|
|
|
30065
30373
|
maxUnits = ADVISOR_MAX_CONVERSATION_CHARS;
|
|
30066
30374
|
}
|
|
30067
30375
|
const conversationText = renderConversationAsText(conversation, maxUnits, measure);
|
|
30068
|
-
const transport = advisorTransport(resolvedAdvisorModel);
|
|
30376
|
+
const transport = advisorTransport(resolvedAdvisorModel, fastProfile);
|
|
30377
|
+
if (fastProfile) consola.warn(`fast Advisor dispatch: model=${resolvedAdvisorModel} transport=${transport} effort=${advisorEffort}`);
|
|
30069
30378
|
if (transport === "responses") {
|
|
30070
30379
|
const payload = applyResponsesCachePolicy({
|
|
30071
30380
|
model: resolvedAdvisorModel,
|
|
@@ -30157,7 +30466,7 @@ async function runAdvisor(conversation, advisorModel, advisorEffort, signal, adv
|
|
|
30157
30466
|
* 1. A real Anthropic `toolu_*` id whose suffix is already in the
|
|
30158
30467
|
* `^[a-zA-Z0-9_]+$` charset: `srvtoolu_<suffix>`, byte-for-byte
|
|
30159
30468
|
* identical to the historical (Claude-lead) behavior.
|
|
30160
|
-
* 2. Anything else — a Responses `call_*` id (
|
|
30469
|
+
* 2. Anything else — a Responses `call_*` id (an authenticated fast lead's
|
|
30161
30470
|
* lead, once its `tool_use{__anthropic_advisor}` block is synthesized
|
|
30162
30471
|
* by the anthropic-translate shim from a Copilot `/responses` tool
|
|
30163
30472
|
* call), a hyphenated or otherwise non-conforming id, an empty string,
|
|
@@ -30180,7 +30489,7 @@ async function runAdvisor(conversation, advisorModel, advisorEffort, signal, adv
|
|
|
30180
30489
|
* Historically this threw "advisor tool_use id is not round-trippable" for
|
|
30181
30490
|
* any non-`toolu_` shape. That was correct for a Claude-only advisor lead —
|
|
30182
30491
|
* Copilot's native `/v1/messages` never emits anything else — but became a
|
|
30183
|
-
* live defect once the advisor loop could run on a non-Claude
|
|
30492
|
+
* live defect once the advisor loop could run on a non-Claude fast lead
|
|
30184
30493
|
* shimmed through `/responses`: `responses-egress.ts` forwards a Responses
|
|
30185
30494
|
* `call_*` id VERBATIM as the synthesized `tool_use.id` (see
|
|
30186
30495
|
* `makeToolUseId` — it only synthesizes a `toolu_*` id when the upstream id
|
|
@@ -30210,7 +30519,7 @@ function sseEvent(type, data) {
|
|
|
30210
30519
|
* passthrough (`createMessages`) plus signed-thinking-history repair-and-retry.
|
|
30211
30520
|
* Extracted verbatim from the loop body so the behavior is byte-identical to
|
|
30212
30521
|
* before `continueTurn` became injectable, and so a non-Claude
|
|
30213
|
-
* `continueTurn` (the fast
|
|
30522
|
+
* `continueTurn` (the fast profile's shim-backed one) can omit this
|
|
30214
30523
|
* Claude-only repair path entirely rather than inherit dead code that would
|
|
30215
30524
|
* never fire for it.
|
|
30216
30525
|
*/
|
|
@@ -35575,7 +35884,8 @@ function buildPeerAwarenessSnippet(opts) {
|
|
|
35575
35884
|
"",
|
|
35576
35885
|
`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.`,
|
|
35577
35886
|
"",
|
|
35578
|
-
`\`mcp__${fastSearchKey}__code\` is semantic-first code search and \`mcp__${fastSearchKey}__web\` surfaces citable sources. Native Task roster: \`
|
|
35887
|
+
`\`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.` : ""}`,
|
|
35888
|
+
"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."
|
|
35579
35889
|
].join("\n");
|
|
35580
35890
|
}
|
|
35581
35891
|
const peersKey = key("peers");
|
|
@@ -35634,7 +35944,8 @@ function buildPeerAwarenessSummary(opts) {
|
|
|
35634
35944
|
if (opts.profile === "fast") return [
|
|
35635
35945
|
"## Injected capabilities (summary)",
|
|
35636
35946
|
"",
|
|
35637
|
-
"Fast launch profile. Task roster: `
|
|
35947
|
+
"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.",
|
|
35948
|
+
"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.",
|
|
35638
35949
|
`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.` : ""}`
|
|
35639
35950
|
].join("\n");
|
|
35640
35951
|
const renderNative = (name) => {
|
|
@@ -36908,6 +37219,6 @@ function enumerateInjectedMcpToolNames(groupKeys, opts = {}) {
|
|
|
36908
37219
|
return [...new Set(names)];
|
|
36909
37220
|
}
|
|
36910
37221
|
//#endregion
|
|
36911
|
-
export {
|
|
37222
|
+
export { bucketEffort as $, unregisterLaunch as $t, assetFor as A, generateRandomPort as An, standInToolEnabled as At, resolveAdvisorModel as B, withOneMSuffixForLead as Bn, formatFastPrerequisiteFailure as Bt, buildEnv as C, BUDGET_SMALL_FAST_SLUG as Cn, implementerFastModel as Ct, toolbeltSkipSet as D, DEFAULT_PORT as Dn, reviewerModel as Dt, toolbeltEnabled as E, DEFAULT_CODEX_MODEL_FALLBACKS as En, reviewerFastModel as Et, FAST_ADVISOR_TOOL_INSTRUCTIONS as F, upstreamMaxConnections as Fn, LUNA_IMPLEMENTER_ALIAS_ID as Ft, buildAnthropicErrorEvent as G, shimDefaultsToXhigh as Gt, rememberThinkingHistoryRepair as H, withInstallLock as Hn, resolveLaunchProfile as Ht, buildAdvisorStream as I, classifyMessagesRoute as In, LUNA_REAL_MODEL_ID as It, logStreamError as J, getTextTokenCount as Jt, buildOpenAIErrorEvent as K, countTokens as Kt, injectAdvisorTool as L, catalogAdvertises1M as Ln, LUNA_SCOUT_ALIAS_ID as Lt, searchWeb as M, pickClaudeDefault as Mn, FAST_CRITIC_ALIAS_ID as Mt, ADVISOR_INTERNAL_TOOL_NAME as N, resolveLeadSlugArg as Nn, LUNA_DRIVER_ALIAS_ID as Nt, vscodeRipgrepPath as O, UPSTREAM_FETCH_TIMEOUT_MS as On, scoutModel as Ot, ADVISOR_TOOL_INSTRUCTIONS as P, upstreamAllowH2 as Pn, LUNA_HAIKU_ALIAS_ID as Pt, UNKNOWN_EFFORT_ANCHOR as Q, registerLaunch as Qt, isAdvisorRequested as R, oneMContextDisabled as Rn, LUNA_SONNET_ALIAS_ID as Rt, runWorkerAgent as S, BUDGET_SMALL_FAST_CATALOG_ID as Sn, generalPurposeFastModel as St, buildToolbeltAwareness as T, DEFAULT_CODEX_MODEL as Tn, resolveGeminiReviewModel as Tt, repairKnownThinkingHistory as U, resolveModelAlias as Ut, formatThinkingRepairDecline as V, stripTrailingOneMSuffix as Vn, profileDescriptor as Vt, repairRejectedThinkingHistory as W, validateFastProfilePrerequisites as Wt, relayAnthropicStream as X, getTokenizerFromModel as Xt, readIteratorWithTimeout as Y, getTokenCount as Yt, EFFORT_ORDER as Z, findLaunchBySecret as Zt, TEST_DEFAULT_MODEL as _, CONDENSED_OPERATING_SEQUENCE as _n, fastPlannerModel as _t, buildAgentPrompt as a, MAX_RESPONSE_BODY_BYTES as an, FAST_PLANNER_EFFORT as at, resolveModeDefaults as b, collapsePathKeys as bn, fleetToolsEnabled as bt, enumerateInjectedMcpToolNames as c, normalizeOpenAIUsage as cn, agentToolsEnabled as ct, DEFAULT_MODEL_CHAIN as d, colbertDegradedWarning as dn, browseAgentEnabled as dt, assembleResponsesPayload as en, clampEffort as et, EXPLORE_DEFAULT_MODEL as f, provisionAndIndexColbert as fn, browserCompoundToolsEnabled as ft, REVIEW_DEFAULT_MODEL as g, provisionTreeSitterAssets as gn, fastOracleModel as gt, PLAN_DEFAULT_MODEL as h, warmTreeSitterPool as hn, fastImplementerModel as ht, assertMcpToolSurfaceConsistent as i, createChatCompletions as in, FAST_IMPLEMENTER_EFFORT as it, satisfiesMinVersion as j, isBudgetClaudeLead as jn, workerToolsEnabled as jt, TOOLBELT_TOOLS$1 as k, UPSTREAM_INACTIVITY_TIMEOUT_MS as kn, scribeModel as kt, personasFor as l, provisionBrowserAssets as ln, artifactToolsEnabled as lt, IMPLEMENT_DEFAULT_MODEL as m, extractZipMember as mn, fastCriticModel as mt, MCP_GROUPS as n, resolveMcpToolTimeoutMs as nn, handleMcpPost as nt, buildPeerAwarenessSnippet as o, readResponseBodyCapped as on, FAST_REVIEWER_EFFORT as ot, EXPLORE_DEFAULT_THINKING as p, extractTarGzMember as pn, browserToolsEnabled as pt, isControllerClosedError as q, createMessages as qt, agentNamesForToolAllowlist as r, createResponses as rn, FAST_CRITIC_EFFORT as rt, buildPeerAwarenessSummary as s, parseJsonOrDiagnose as sn, FAST_SCOUT_EFFORT as st, GROUP_META as t, warnOnTokenPriceDrift as tn, handleMcpDelete as tt, BROWSE_DEFAULT_MODEL as u, hasSupportedBrowserInstalled as un, brainstormModel as ut, appendPlanReminder as v, DEFINITION_OF_GREATNESS as vn, fastReviewerModel as vt, availableToolCommands as w, DEFAULT_CLAUDE_MODEL_FALLBACKS as wn, nativeSubagentModel as wt, resolveWorkerRunOpts as x, toolbeltPathOverride as xn, geminiAvailable as xt, resolveDefaultModel as y, shouldUseInsecureTls as yn, fastScoutModel as yt, resolveAdvisorEffort as z, withOneMSuffix as zn, canonicalizeAliasModel as zt };
|
|
36912
37223
|
|
|
36913
|
-
//# sourceMappingURL=peer-mcp-personas-
|
|
37224
|
+
//# sourceMappingURL=peer-mcp-personas-ce6_YMnX.js.map
|