github-router 0.3.331 → 0.3.333
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +4 -2
- package/dist/{aic-ledger-CsBx1crE.js → aic-ledger-D4fmThbS.js} +2 -2
- package/dist/{aic-ledger-CsBx1crE.js.map → aic-ledger-D4fmThbS.js.map} +1 -1
- package/dist/{attribution-settings-7dFpObGh.js → attribution-settings-Cu9cYRHf.js} +149 -98
- package/dist/attribution-settings-Cu9cYRHf.js.map +1 -0
- package/dist/{auth-xgFZGZbf.js → auth-DjKEIiqG.js} +4 -4
- package/dist/{auth-xgFZGZbf.js.map → auth-DjKEIiqG.js.map} +1 -1
- package/dist/balanced-profile-contract-CqFRoCUe.js +133 -0
- package/dist/balanced-profile-contract-CqFRoCUe.js.map +1 -0
- package/dist/bluebird-client-DpYl1YmJ.js +1163 -0
- package/dist/bluebird-client-DpYl1YmJ.js.map +1 -0
- package/dist/bluebird-client-bn9Yv6Cb.js +2 -0
- package/dist/browser-ext/manifest.json +1 -1
- package/dist/{check-usage-vUDk6oV7.js → check-usage-B7UrDwD8.js} +4 -4
- package/dist/{check-usage-vUDk6oV7.js.map → check-usage-B7UrDwD8.js.map} +1 -1
- package/dist/{claude-C3-yBGzw.js → claude-BObYdG2J.js} +43 -34
- package/dist/claude-BObYdG2J.js.map +1 -0
- package/dist/{codex-C3hcVSOm.js → codex-JnNE58nu.js} +12 -8
- package/dist/codex-JnNE58nu.js.map +1 -0
- package/dist/{copilot-discount-0lG67i9O.js → copilot-discount-BcUa3f-k.js} +2 -2
- package/dist/{copilot-discount-0lG67i9O.js.map → copilot-discount-BcUa3f-k.js.map} +1 -1
- package/dist/{debug-a737qcCC.js → debug-CigFsS-h.js} +2 -2
- package/dist/{debug-a737qcCC.js.map → debug-CigFsS-h.js.map} +1 -1
- package/dist/engine-DApePSq4.js +2 -0
- package/dist/{exec-COUT4QsS.js → exec-MCU1H-KZ.js} +63 -13
- package/dist/exec-MCU1H-KZ.js.map +1 -0
- package/dist/{gate-discovery-BUhtwkyE.js → gate-discovery-CljRUZjm.js} +6 -6
- package/dist/{gate-discovery-BUhtwkyE.js.map → gate-discovery-CljRUZjm.js.map} +1 -1
- package/dist/{get-copilot-usage-VKU2IvuE.js → get-copilot-usage-CGaV01dC.js} +4 -3
- package/dist/{get-copilot-usage-VKU2IvuE.js.map → get-copilot-usage-CGaV01dC.js.map} +1 -1
- package/dist/hooks.mjs +142 -30
- package/dist/hooks.sha256 +1 -1
- package/dist/{index-cmd-k3oWl0n4.js → index-cmd-DXYWgKS6.js} +5 -5
- package/dist/{index-cmd-k3oWl0n4.js.map → index-cmd-DXYWgKS6.js.map} +1 -1
- package/dist/{internal-aic-status-Cfl5HiAN.js → internal-aic-status-Bma0r0ZS.js} +6 -5
- package/dist/internal-aic-status-Bma0r0ZS.js.map +1 -0
- package/dist/{internal-artifact-open-CX2fRP_D.js → internal-artifact-open-lta2UPnE.js} +2 -2
- package/dist/{internal-artifact-open-CX2fRP_D.js.map → internal-artifact-open-lta2UPnE.js.map} +1 -1
- package/dist/{internal-fast-dispatch-guard-Cxattkm4.js → internal-fast-dispatch-guard-BYRYbsFh.js} +1 -1
- package/dist/{internal-fast-dispatch-guard-BoTxjO6b.js → internal-fast-dispatch-guard-BuRlhFek.js} +27 -5
- package/dist/internal-fast-dispatch-guard-BuRlhFek.js.map +1 -0
- package/dist/{internal-first-mate-guard-D_JFcrl_.js → internal-first-mate-guard-BEwDjHfX.js} +3 -3
- package/dist/{internal-first-mate-guard-D_JFcrl_.js.map → internal-first-mate-guard-BEwDjHfX.js.map} +1 -1
- package/dist/{internal-first-mate-guard-97qsseTP.js → internal-first-mate-guard-CAefr6Ce.js} +1 -1
- package/dist/{internal-max-dispatch-guard-DQMyOds8.js → internal-max-dispatch-guard-6ZCEanI6.js} +1 -1
- package/dist/{internal-max-dispatch-guard-Cxe8h12x.js → internal-max-dispatch-guard-CtIO7pm1.js} +3 -3
- package/dist/{internal-max-dispatch-guard-Cxe8h12x.js.map → internal-max-dispatch-guard-CtIO7pm1.js.map} +1 -1
- package/dist/{internal-plan-review-O2dwnQv3.js → internal-plan-review-jIts3KYd.js} +3 -3
- package/dist/{internal-plan-review-O2dwnQv3.js.map → internal-plan-review-jIts3KYd.js.map} +1 -1
- package/dist/{internal-prompt-submit-CD0UFkT-.js → internal-prompt-submit-BfoWVyzs.js} +10 -7
- package/dist/internal-prompt-submit-BfoWVyzs.js.map +1 -0
- package/dist/{internal-session-bind-CHIOd5ys.js → internal-session-bind-IpZ5hJzR.js} +2 -2
- package/dist/{internal-session-bind-CHIOd5ys.js.map → internal-session-bind-IpZ5hJzR.js.map} +1 -1
- package/dist/{internal-stop-hook-DBrlosd0.js → internal-stop-hook-Cz88dW5S.js} +6 -6
- package/dist/{internal-stop-hook-DBrlosd0.js.map → internal-stop-hook-Cz88dW5S.js.map} +1 -1
- package/dist/{internal-stop-review-a3rpzzhd.js → internal-stop-review-BtGDVrv-.js} +2 -2
- package/dist/{internal-stop-review-a3rpzzhd.js.map → internal-stop-review-BtGDVrv-.js.map} +1 -1
- package/dist/{internal-worker-guard-BY5seBqp.js → internal-worker-guard-C0FJ4b29.js} +2 -2
- package/dist/{internal-worker-guard-BY5seBqp.js.map → internal-worker-guard-C0FJ4b29.js.map} +1 -1
- package/dist/{internal-workspace-header-CPZNphnk.js → internal-workspace-header-tvJVAXpv.js} +2 -2
- package/dist/{internal-workspace-header-CPZNphnk.js.map → internal-workspace-header-tvJVAXpv.js.map} +1 -1
- package/dist/{lifecycle-D8vQXfeC.js → lifecycle-BqWTXaeC.js} +3 -3
- package/dist/{lifecycle-D8vQXfeC.js.map → lifecycle-BqWTXaeC.js.map} +1 -1
- package/dist/lifecycle-DMRZswwc.js +2 -0
- package/dist/lifecycle-FT75ohVw.js +2 -0
- package/dist/{lifecycle-MmpJWRcl.js → lifecycle-kpLzHUgD.js} +2 -2
- package/dist/{lifecycle-MmpJWRcl.js.map → lifecycle-kpLzHUgD.js.map} +1 -1
- package/dist/main.js +21 -21
- package/dist/{max-profile-contract-Bl7I_EOC.js → max-profile-contract-MJJt0zm-.js} +2 -2
- package/dist/{max-profile-contract-Bl7I_EOC.js.map → max-profile-contract-MJJt0zm-.js.map} +1 -1
- package/dist/{mcp-workspace-header-DX_mD0JT.js → mcp-workspace-header-B77WqVFw.js} +2 -2
- package/dist/{mcp-workspace-header-DX_mD0JT.js.map → mcp-workspace-header-B77WqVFw.js.map} +1 -1
- package/dist/{models-BjCRO0AC.js → models-68HDOEPK.js} +3 -3
- package/dist/{models-BjCRO0AC.js.map → models-68HDOEPK.js.map} +1 -1
- package/dist/{orchestration-Dn5v8c0a.js → orchestration-Ccmfslh4.js} +3 -3
- package/dist/{orchestration-Dn5v8c0a.js.map → orchestration-Ccmfslh4.js.map} +1 -1
- package/dist/{paths-P5ajjpzU.js → paths-CpbTHKeP.js} +3 -3
- package/dist/{paths-P5ajjpzU.js.map → paths-CpbTHKeP.js.map} +1 -1
- package/dist/paths-Dfivvq21.js +2 -0
- package/dist/{peer-mcp-personas-Dztywua2.js → peer-mcp-personas-CorhWEhi.js} +211 -154
- package/dist/peer-mcp-personas-CorhWEhi.js.map +1 -0
- package/dist/{plan-review-hook-CfZBvsHd.js → plan-review-hook-ciat1jgZ.js} +4 -4
- package/dist/{plan-review-hook-CfZBvsHd.js.map → plan-review-hook-ciat1jgZ.js.map} +1 -1
- package/dist/{prompt-submit-hook-CRH6m7Vz.js → prompt-submit-hook-C8q_hDOv.js} +21 -17
- package/dist/prompt-submit-hook-C8q_hDOv.js.map +1 -0
- package/dist/{provision-CjBt5wEK.js → provision-DwNx-PZA.js} +7 -6
- package/dist/provision-DwNx-PZA.js.map +1 -0
- package/dist/{self-invocation-DBWyjvGm.js → self-invocation-DIUyoRgL.js} +2 -2
- package/dist/{self-invocation-DBWyjvGm.js.map → self-invocation-DIUyoRgL.js.map} +1 -1
- package/dist/{serve-C3LCkM-o.js → serve-Cu19zfEL.js} +33 -21
- package/dist/serve-Cu19zfEL.js.map +1 -0
- package/dist/{server-setup-DrSUlFZ_.js → server-setup-Dz7chd0b.js} +76 -37
- package/dist/server-setup-Dz7chd0b.js.map +1 -0
- package/dist/{service-backend-ByT0gUc8.js → service-backend-7SPDLUB9.js} +7 -7
- package/dist/service-backend-7SPDLUB9.js.map +1 -0
- package/dist/{start-CY1nnbB4.js → start-BvN5FA6O.js} +4 -4
- package/dist/{start-CY1nnbB4.js.map → start-BvN5FA6O.js.map} +1 -1
- package/dist/{state-BlMpEFAt.js → state-CVp30CBF.js} +7 -1
- package/dist/state-CVp30CBF.js.map +1 -0
- package/dist/{stop-gate-hook-BACb8dlj.js → stop-gate-hook-DZVfKoSh.js} +4 -4
- package/dist/{stop-gate-hook-BACb8dlj.js.map → stop-gate-hook-DZVfKoSh.js.map} +1 -1
- package/dist/{stop-gate-policy-D6jIeOXB.js → stop-gate-policy-Gd_cNT9-.js} +3 -3
- package/dist/{stop-gate-policy-D6jIeOXB.js.map → stop-gate-policy-Gd_cNT9-.js.map} +1 -1
- package/dist/{token-Dlb_84hW.js → token-DATA_OQK.js} +5 -383
- package/dist/token-DATA_OQK.js.map +1 -0
- package/dist/upstream-retry-i1k1Xai2.js +383 -0
- package/dist/upstream-retry-i1k1Xai2.js.map +1 -0
- package/dist/{worker-dispatch-DtjQchvM.js → worker-dispatch-lRhno09M.js} +2 -2
- package/dist/{worker-dispatch-DtjQchvM.js.map → worker-dispatch-lRhno09M.js.map} +1 -1
- package/docs/bluebird-search.md +338 -0
- package/package.json +3 -2
- package/dist/attribution-settings-7dFpObGh.js.map +0 -1
- package/dist/claude-C3-yBGzw.js.map +0 -1
- package/dist/codex-C3hcVSOm.js.map +0 -1
- package/dist/engine-CPdWX70n.js +0 -2
- package/dist/exec-COUT4QsS.js.map +0 -1
- package/dist/fast-profile-contract-DmsyQQrw.js +0 -61
- package/dist/fast-profile-contract-DmsyQQrw.js.map +0 -1
- package/dist/internal-aic-status-Cfl5HiAN.js.map +0 -1
- package/dist/internal-fast-dispatch-guard-BoTxjO6b.js.map +0 -1
- package/dist/internal-prompt-submit-CD0UFkT-.js.map +0 -1
- package/dist/lifecycle-B2eB8nRg.js +0 -2
- package/dist/lifecycle-Dz-Rq8pD.js +0 -2
- package/dist/paths-DVXBtLyo.js +0 -2
- package/dist/peer-mcp-personas-Dztywua2.js.map +0 -1
- package/dist/prompt-submit-hook-CRH6m7Vz.js.map +0 -1
- package/dist/provision-CjBt5wEK.js.map +0 -1
- package/dist/serve-C3LCkM-o.js.map +0 -1
- package/dist/server-setup-DrSUlFZ_.js.map +0 -1
- package/dist/service-backend-ByT0gUc8.js.map +0 -1
- package/dist/state-BlMpEFAt.js.map +0 -1
- package/dist/token-Dlb_84hW.js.map +0 -1
|
@@ -1,14 +1,15 @@
|
|
|
1
|
-
import { F as provisionTreeSitterAssets, I as withInstallLock } from "./service-backend-
|
|
1
|
+
import { F as provisionTreeSitterAssets, I as withInstallLock } from "./service-backend-7SPDLUB9.js";
|
|
2
2
|
import { t as getPackageVersion } from "./version-C8x2hQrZ.js";
|
|
3
|
-
import { i as ensurePaths, t as PATHS } from "./paths-
|
|
4
|
-
import { t as state } from "./state-
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
7
|
-
import {
|
|
8
|
-
import { c as
|
|
9
|
-
import {
|
|
10
|
-
import {
|
|
11
|
-
import { a as
|
|
3
|
+
import { i as ensurePaths, t as PATHS } from "./paths-CpbTHKeP.js";
|
|
4
|
+
import { t as state } from "./state-CVp30CBF.js";
|
|
5
|
+
import { _ as forwardError, a as cacheCopilotVersion, b as copilotBaseUrl, c as filterBetaHeader, d as resolveModel, f as sleep, g as HTTPError, i as tryRefreshAndRetry, l as isNullish, n as setupGitHubAgentToken, o as cacheModels, r as setupGitHubToken, s as cacheVSCodeVersion, t as setupCopilotToken, x as copilotHeaders } from "./token-DATA_OQK.js";
|
|
6
|
+
import { r as fetchWithTransientRetry } from "./upstream-retry-i1k1Xai2.js";
|
|
7
|
+
import { t as getCopilotUsage } from "./get-copilot-usage-CGaV01dC.js";
|
|
8
|
+
import { c as runCommandVoid, i as parseBoolEnv, o as resolveExecutable, r as killManagedTree, s as runCommandCapture } from "./exec-MCU1H-KZ.js";
|
|
9
|
+
import { a as BALANCED_PROFILE_MODELS, b as FAST_PROFILE_NATIVE_AGENT_NAMES, d as BALANCED_PROFILE_SUBAGENT_CONTEXT_TOKENS, i as BALANCED_PROFILE_LEAD_EFFORT, m as FAST_PROFILE_ADVISOR_MODEL, o as BALANCED_PROFILE_NATIVE_AGENT_NAMES, y as FAST_PROFILE_MODELS } from "./balanced-profile-contract-CqFRoCUe.js";
|
|
10
|
+
import { $ as EFFORT_ORDER, $t as MAX_RESPONSE_BODY_BYTES, An as withOneMSuffix, B as resolveAdvisorEffort, Bn as CHEAP_PROFILE_NATIVE_AGENT_NAMES, Bt as countTokens, D as toolbeltEnabled, Dn as classifyMessagesRoute, En as upstreamMaxConnections, F as ADVISOR_TOOL_INSTRUCTIONS, G as repairKnownThinkingHistory, Gt as findLaunchBySecret, H as resolveCheapestAdvisorModel, Ht as getTextTokenCount, I as FAST_ADVISOR_TOOL_INSTRUCTIONS, J as buildOpenAIErrorEvent, Jt as assembleResponsesPayload, K as repairRejectedThinkingHistory, L as buildAdvisorStream, Ln as CHEAPEST_PROFILE_SUBAGENT_CONTEXT_TOKENS, Mn as CHEAPEST_PROFILE_ADVISOR_CLIENT_MODEL, N as searchWeb, Nn as CHEAPEST_PROFILE_MODELS, On as catalogAdvertises1M, P as ADVISOR_INTERNAL_TOOL_NAME, Pn as CHEAPEST_PROFILE_NATIVE_AGENT_NAMES, Q as relayAnthropicStream, Qt as createChatCompletions, R as injectAdvisorTool, Rn as CHEAP_PROFILE_ADVISOR_CLIENT_MODEL, Sn as isBudgetClaudeLead, Tn as upstreamAllowH2, U as formatThinkingRepairDecline, Un as CHEAP_PROFILE_SUBAGENT_CONTEXT_TOKENS, Ut as getTokenCount, V as resolveAdvisorModel, Vt as createMessages, W as rememberThinkingHistoryRepair, Wt as getTokenizerFromModel, X as logStreamError, Xt as resolveMcpToolTimeoutMs, Y as isControllerClosedError, Yt as warnOnTokenPriceDrift, Z as readIteratorWithTimeout, Zt as createResponses, at as agentToolsEnabled, bn as UPSTREAM_INACTIVITY_TIMEOUT_MS, en as readResponseBodyCapped, et as UNKNOWN_EFFORT_ANCHOR, fn as toolbeltPathOverride, i as assertMcpToolSurfaceConsistent, it as handleMcpPost, jn as withOneMSuffixForLead, kn as oneMContextDisabled, mn as BUDGET_SMALL_FAST_SLUG, nn as normalizeOpenAIUsage, nt as clampEffort, q as buildAnthropicErrorEvent, rt as handleMcpDelete, tn as parseJsonOrDiagnose, tt as bucketEffort, xn as generateRandomPort, yn as UPSTREAM_FETCH_TIMEOUT_MS, z as isAdvisorRequested, zn as CHEAP_PROFILE_MODELS, zt as shimDefaultsToXhigh } from "./peer-mcp-personas-CorhWEhi.js";
|
|
11
|
+
import { A as normalizeTrailingOneMSuffix, a as MAX_PROFILE_NATIVE_AGENT_NAMES, d as maxAdvisorPinIsValid, h as maxOpusModel, i as MAX_PROFILE_MODELS, j as stripTrailingOneMSuffix, k as fastEndpointForModel, l as maxAdvisorEffortForModel, n as MAX_PROFILE_ALLOWED_LEAD_MODEL_IDS, t as MAX_PROFILE_ADVISOR_INSTRUCTIONS, u as maxAdvisorModelFromPin, y as validateMaxProfilePrerequisites } from "./max-profile-contract-MJJt0zm-.js";
|
|
12
|
+
import { a as extractAndRecordPricedAic, f as copilotUsageToWire, h as nanoAiuToCredits, i as extractAndRecordAic, l as recordAic, m as formatAic, p as extractCopilotUsage } from "./aic-ledger-D4fmThbS.js";
|
|
12
13
|
import consola from "consola";
|
|
13
14
|
import fs, { existsSync } from "node:fs";
|
|
14
15
|
import path from "node:path";
|
|
@@ -423,7 +424,7 @@ const CHEAP_PROFILE = Object.freeze({
|
|
|
423
424
|
});
|
|
424
425
|
/**
|
|
425
426
|
* The `-m cheapest` roster: the exact cheap surface and groups, but Luna-led
|
|
426
|
-
* (`gpt-5.6-luna`/max at the 200K default window), a
|
|
427
|
+
* (`gpt-5.6-luna`/max at the 200K default window), a Sol/medium Advisor, a
|
|
427
428
|
* Sol/high Oracle, and a Gemini/high reviewer. Oracle-only peer set, no
|
|
428
429
|
* `astra`. Hard-denies match fast's: core workers, `orchestrate`, `decide`,
|
|
429
430
|
* `fleet`, and `first-mate`.
|
|
@@ -574,8 +575,8 @@ const CHEAPEST_REVIEWER_ALIAS_ID = "gh-router-cheapest-reviewer-high";
|
|
|
574
575
|
*/
|
|
575
576
|
const BALANCED_EXPLORE_ALIAS_ID = "gh-router-balanced-explore-high";
|
|
576
577
|
const BALANCED_PLAN_ALIAS_ID = "gh-router-balanced-plan-high";
|
|
577
|
-
const BALANCED_GENERAL_PURPOSE_ALIAS_ID = "gh-router-balanced-general-purpose-
|
|
578
|
-
const BALANCED_REVIEWER_ALIAS_ID = "gh-router-balanced-reviewer-
|
|
578
|
+
const BALANCED_GENERAL_PURPOSE_ALIAS_ID = "gh-router-balanced-general-purpose-max";
|
|
579
|
+
const BALANCED_REVIEWER_ALIAS_ID = "gh-router-balanced-reviewer-high";
|
|
579
580
|
const LUNA_SONNET_ALIAS_ID = "gh-router-luna-sonnet-xhigh";
|
|
580
581
|
/**
|
|
581
582
|
* Router-owned alias id for the fast profile's Haiku-tier row
|
|
@@ -629,7 +630,12 @@ function maxAliasModel(id) {
|
|
|
629
630
|
* `/v1/messages` identity preflight), after the effort default has already
|
|
630
631
|
* been read off the alias.
|
|
631
632
|
*/
|
|
632
|
-
const RETIRED_FAST_ALIAS_IDS = /* @__PURE__ */ new Set([
|
|
633
|
+
const RETIRED_FAST_ALIAS_IDS = /* @__PURE__ */ new Set([
|
|
634
|
+
LUNA_IMPLEMENTER_ALIAS_ID,
|
|
635
|
+
FAST_CRITIC_ALIAS_ID,
|
|
636
|
+
"gh-router-balanced-general-purpose-high",
|
|
637
|
+
"gh-router-balanced-reviewer-max"
|
|
638
|
+
]);
|
|
633
639
|
const MODEL_ALIAS_TABLE = /* @__PURE__ */ new Map([
|
|
634
640
|
[LUNA_DRIVER_ALIAS_ID, {
|
|
635
641
|
aliasId: LUNA_DRIVER_ALIAS_ID,
|
|
@@ -724,12 +730,12 @@ const MODEL_ALIAS_TABLE = /* @__PURE__ */ new Map([
|
|
|
724
730
|
[BALANCED_GENERAL_PURPOSE_ALIAS_ID, {
|
|
725
731
|
aliasId: BALANCED_GENERAL_PURPOSE_ALIAS_ID,
|
|
726
732
|
realModel: BALANCED_PROFILE_MODELS["General-Purpose"],
|
|
727
|
-
absentEffortDefault: "
|
|
733
|
+
absentEffortDefault: "max"
|
|
728
734
|
}],
|
|
729
735
|
[BALANCED_REVIEWER_ALIAS_ID, {
|
|
730
736
|
aliasId: BALANCED_REVIEWER_ALIAS_ID,
|
|
731
737
|
realModel: BALANCED_PROFILE_MODELS.reviewer,
|
|
732
|
-
absentEffortDefault: "
|
|
738
|
+
absentEffortDefault: "high"
|
|
733
739
|
}],
|
|
734
740
|
[SKILL_GATHER_CONTEXT_LEAD_ALIAS_ID, {
|
|
735
741
|
aliasId: SKILL_GATHER_CONTEXT_LEAD_ALIAS_ID,
|
|
@@ -993,9 +999,9 @@ function formatCheapPrerequisiteFailure(missing) {
|
|
|
993
999
|
const CHEAPEST_SUBAGENT_MIN_CONTEXT_TOKENS = CHEAPEST_PROFILE_SUBAGENT_CONTEXT_TOKENS;
|
|
994
1000
|
/**
|
|
995
1001
|
* Validate the live Copilot catalog for `-m cheapest`: Luna lead at the 200K
|
|
996
|
-
* default window, Luna Explore/
|
|
997
|
-
*
|
|
998
|
-
* efforts and supported endpoints.
|
|
1002
|
+
* default window, Luna Explore/GP roles, a Sol Plan and Oracle, a Gemini
|
|
1003
|
+
* reviewer, and a Sol/medium Advisor — all at the 200K default with
|
|
1004
|
+
* their fixed efforts and supported endpoints.
|
|
999
1005
|
*/
|
|
1000
1006
|
function validateCheapestProfilePrerequisites(catalog) {
|
|
1001
1007
|
const missing = [];
|
|
@@ -1040,8 +1046,8 @@ function formatCheapestPrerequisiteFailure(missing) {
|
|
|
1040
1046
|
const BALANCED_SUBAGENT_MIN_CONTEXT_TOKENS = BALANCED_PROFILE_SUBAGENT_CONTEXT_TOKENS;
|
|
1041
1047
|
/**
|
|
1042
1048
|
* Validate the live Copilot catalog for `-m balanced`: Sol lead at the 200K
|
|
1043
|
-
* default window, Luna Explore/
|
|
1044
|
-
*
|
|
1049
|
+
* default window, Luna Explore/General-Purpose roles, Sol Plan, Gemini
|
|
1050
|
+
* reviewer, and a Grok Oracle — all at the 200K default with their
|
|
1045
1051
|
* fixed efforts and supported endpoints.
|
|
1046
1052
|
*/
|
|
1047
1053
|
function validateBalancedProfilePrerequisites(catalog) {
|
|
@@ -1062,13 +1068,21 @@ function validateBalancedProfilePrerequisites(catalog) {
|
|
|
1062
1068
|
if (!supportsEffort(luna, "high") || !supportsEffort(luna, "max")) missing.push(`${BALANCED_PROFILE_MODELS.explore}: does not advertise both "high" and "max" reasoning effort`);
|
|
1063
1069
|
if (!supportsEndpoint(luna, "responses")) missing.push(`${BALANCED_PROFILE_MODELS.explore}: does not advertise a supported Responses endpoint`);
|
|
1064
1070
|
}
|
|
1065
|
-
const
|
|
1066
|
-
if (!
|
|
1071
|
+
const generalPurpose = findModel(catalog, BALANCED_PROFILE_MODELS["General-Purpose"]);
|
|
1072
|
+
if (!generalPurpose) missing.push(`${BALANCED_PROFILE_MODELS["General-Purpose"]}: absent from the live catalog`);
|
|
1067
1073
|
else {
|
|
1068
|
-
if (!hasToolCalls(
|
|
1069
|
-
if (!hasContextAtLeast(
|
|
1070
|
-
if (!supportsEffort(
|
|
1071
|
-
if (!supportsEndpoint(
|
|
1074
|
+
if (!hasToolCalls(generalPurpose)) missing.push(`${BALANCED_PROFILE_MODELS["General-Purpose"]}: does not advertise tool_calls`);
|
|
1075
|
+
if (!hasContextAtLeast(generalPurpose, BALANCED_SUBAGENT_MIN_CONTEXT_TOKENS)) missing.push(`${BALANCED_PROFILE_MODELS["General-Purpose"]}: advertised context window is below the 200K subagent floor`);
|
|
1076
|
+
if (!supportsEffort(generalPurpose, "max")) missing.push(`${BALANCED_PROFILE_MODELS["General-Purpose"]}: does not advertise a "max" reasoning effort`);
|
|
1077
|
+
if (!supportsEndpoint(generalPurpose, "responses")) missing.push(`${BALANCED_PROFILE_MODELS["General-Purpose"]}: does not advertise a supported Responses endpoint`);
|
|
1078
|
+
}
|
|
1079
|
+
const balancedReviewer = findModel(catalog, BALANCED_PROFILE_MODELS.reviewer);
|
|
1080
|
+
if (!balancedReviewer) missing.push(`${BALANCED_PROFILE_MODELS.reviewer}: absent from the live catalog`);
|
|
1081
|
+
else {
|
|
1082
|
+
if (!hasToolCalls(balancedReviewer)) missing.push(`${BALANCED_PROFILE_MODELS.reviewer}: does not advertise tool_calls`);
|
|
1083
|
+
if (!hasContextAtLeast(balancedReviewer, BALANCED_SUBAGENT_MIN_CONTEXT_TOKENS)) missing.push(`${BALANCED_PROFILE_MODELS.reviewer}: advertised context window is below the 200K subagent floor`);
|
|
1084
|
+
if (!supportsEffort(balancedReviewer, "high")) missing.push(`${BALANCED_PROFILE_MODELS.reviewer}: does not advertise a "high" reasoning effort`);
|
|
1085
|
+
if (!supportsEndpoint(balancedReviewer, "chat")) missing.push(`${BALANCED_PROFILE_MODELS.reviewer}: does not advertise a supported chat-completions endpoint`);
|
|
1072
1086
|
}
|
|
1073
1087
|
const grok = findModel(catalog, BALANCED_PROFILE_MODELS.oracle);
|
|
1074
1088
|
if (!grok) missing.push(`${BALANCED_PROFILE_MODELS.oracle}: absent from the live catalog`);
|
|
@@ -1439,7 +1453,7 @@ const CHEAP_PICKER_MODELS = Object.freeze([
|
|
|
1439
1453
|
id: "gpt-5.6-luna",
|
|
1440
1454
|
label: "GPT-5.6 Luna",
|
|
1441
1455
|
behavesAs: "claude-opus-5",
|
|
1442
|
-
neverOneM:
|
|
1456
|
+
neverOneM: false
|
|
1443
1457
|
},
|
|
1444
1458
|
{
|
|
1445
1459
|
id: "gemini-3.8-flash",
|
|
@@ -1465,7 +1479,7 @@ const CHEAPEST_PICKER_MODELS = Object.freeze([
|
|
|
1465
1479
|
id: "gpt-5.6-luna",
|
|
1466
1480
|
label: "GPT-5.6 Luna",
|
|
1467
1481
|
behavesAs: "claude-opus-5",
|
|
1468
|
-
neverOneM:
|
|
1482
|
+
neverOneM: false
|
|
1469
1483
|
},
|
|
1470
1484
|
{
|
|
1471
1485
|
id: "gemini-3.8-flash",
|
|
@@ -1485,7 +1499,7 @@ const BALANCED_PICKER_MODELS = Object.freeze([
|
|
|
1485
1499
|
id: "gpt-5.6-luna",
|
|
1486
1500
|
label: "GPT-5.6 Luna",
|
|
1487
1501
|
behavesAs: "claude-opus-5",
|
|
1488
|
-
neverOneM:
|
|
1502
|
+
neverOneM: false
|
|
1489
1503
|
},
|
|
1490
1504
|
{
|
|
1491
1505
|
id: "gemini-3.8-flash",
|
|
@@ -2475,7 +2489,7 @@ function collectToolFieldKeys(body) {
|
|
|
2475
2489
|
//#endregion
|
|
2476
2490
|
//#region package.json
|
|
2477
2491
|
var name = "github-router";
|
|
2478
|
-
var version = "0.3.
|
|
2492
|
+
var version = "0.3.333";
|
|
2479
2493
|
//#endregion
|
|
2480
2494
|
//#region src/lib/approval.ts
|
|
2481
2495
|
const awaitApproval = async () => {
|
|
@@ -5648,8 +5662,9 @@ function explicitEffortOf(value) {
|
|
|
5648
5662
|
* bare subagent slugs at the wiring layer), so this preprocess is shared.
|
|
5649
5663
|
* Note the reviewer differs: fast reviews on Sonnet 5/xhigh while cheap
|
|
5650
5664
|
* reviews on Luna/max, cheapest reviews on Gemini/high, and balanced reviews
|
|
5651
|
-
* on
|
|
5652
|
-
* its fixed effort.
|
|
5665
|
+
* on Gemini/high — all rows exist here, so each profile's reviewer resolves to
|
|
5666
|
+
* its fixed effort. The balanced LEAD is the other exception: bare Sol leads
|
|
5667
|
+
* at medium (`BALANCED_PROFILE_LEAD_EFFORT`), not the shared high.
|
|
5653
5668
|
*
|
|
5654
5669
|
* Pinned-profile isolation (fast/cheap/cheap1m/cheapest/balanced): only
|
|
5655
5670
|
* router-provided models are accepted (anything else is `rejectedModel`).
|
|
@@ -5704,7 +5719,7 @@ function preprocessFastRequest(rawBody, launch, subagentRequest = false) {
|
|
|
5704
5719
|
fixedEffort = alias.absentEffortDefault;
|
|
5705
5720
|
parsed.model = canonicalizeAliasModel(originalModel);
|
|
5706
5721
|
} else if (bare === "gpt-5.6-luna") fixedEffort = "max";
|
|
5707
|
-
else if (bare === "gpt-5.6-sol") fixedEffort = "high";
|
|
5722
|
+
else if (bare === "gpt-5.6-sol") fixedEffort = profileId === "balanced" && !subagentRequest ? BALANCED_PROFILE_LEAD_EFFORT : "high";
|
|
5708
5723
|
else if (bare === "grok-4.6") fixedEffort = "medium";
|
|
5709
5724
|
else if (bare === "gemini-3.8-flash") fixedEffort = "high";
|
|
5710
5725
|
else if (bare === "claude-sonnet-5") fixedEffort = "xhigh";
|
|
@@ -7682,7 +7697,12 @@ async function setupAndServe(options) {
|
|
|
7682
7697
|
state.showToken = options.showToken;
|
|
7683
7698
|
state.extendedBetas = options.extendedBetas;
|
|
7684
7699
|
state.browseEnabled = options.browseEnabled || process.env.GH_ROUTER_ENABLE_BROWSE === "1";
|
|
7685
|
-
|
|
7700
|
+
const searchFlags = resolveSearchFlags({
|
|
7701
|
+
searchEnabled: options.searchEnabled,
|
|
7702
|
+
bluebirdEnabled: options.bluebirdEnabled
|
|
7703
|
+
});
|
|
7704
|
+
state.searchEnabled = searchFlags.searchEnabled;
|
|
7705
|
+
state.bluebirdEnabled = searchFlags.bluebirdEnabled;
|
|
7686
7706
|
state.fleetEnabled = options.fleetEnabled || process.env.GH_ROUTER_ENABLE_FLEET === "1";
|
|
7687
7707
|
state.agentsEnabled = options.agentsEnabled || process.env.GH_ROUTER_ENABLE_AGENTS === "1";
|
|
7688
7708
|
state.powerBrowseEnabled = options.powerBrowseEnabled || process.env.GH_ROUTER_ENABLE_POWER_BROWSE === "1";
|
|
@@ -7836,6 +7856,11 @@ const sharedServerArgs = {
|
|
|
7836
7856
|
type: "boolean",
|
|
7837
7857
|
default: false,
|
|
7838
7858
|
description: "Enable ColBERT/colgrep semantic code search (meaning-ranked `code` tool results over a per-workspace index, with transparent lexical fallback). Off by default; the `code` tool is lexical-only unless this is set. Can also be enabled with GH_ROUTER_ENABLE_SEMANTIC_SEARCH=1. GH_ROUTER_DISABLE_SEMANTIC_SEARCH=1 hard-disables (wins over --search, for tests)."
|
|
7859
|
+
},
|
|
7860
|
+
bluebird: {
|
|
7861
|
+
type: "boolean",
|
|
7862
|
+
default: false,
|
|
7863
|
+
description: "Route semantic + lexical `code` tool search through the Bluebird Azure DevOps MCP server (exact/regex/ast stay local). Requires an Azure DevOps git remote plus `az login`. Can also be enabled with GH_ROUTER_ENABLE_BLUEBIRD=1."
|
|
7839
7864
|
}
|
|
7840
7865
|
};
|
|
7841
7866
|
const allowedAccountTypes = /* @__PURE__ */ new Set([
|
|
@@ -7843,6 +7868,18 @@ const allowedAccountTypes = /* @__PURE__ */ new Set([
|
|
|
7843
7868
|
"business",
|
|
7844
7869
|
"enterprise"
|
|
7845
7870
|
]);
|
|
7871
|
+
/**
|
|
7872
|
+
* Resolve the independent remote and local search flags for a launch.
|
|
7873
|
+
* `bluebirdEnabled` controls Bluebird semantic/lexical routing only.
|
|
7874
|
+
* `searchEnabled` controls local ColBERT provisioning only.
|
|
7875
|
+
*/
|
|
7876
|
+
function resolveSearchFlags(opts) {
|
|
7877
|
+
const bluebirdEnabled = opts.bluebirdEnabled === true || process.env.GH_ROUTER_ENABLE_BLUEBIRD === "1";
|
|
7878
|
+
return {
|
|
7879
|
+
searchEnabled: opts.searchEnabled === true || process.env.GH_ROUTER_ENABLE_SEMANTIC_SEARCH === "1",
|
|
7880
|
+
bluebirdEnabled
|
|
7881
|
+
};
|
|
7882
|
+
}
|
|
7846
7883
|
/** Parse shared server args into ServerSetupOptions fields. */
|
|
7847
7884
|
function parseSharedArgs(args) {
|
|
7848
7885
|
const portRaw = args.port;
|
|
@@ -7878,7 +7915,8 @@ function parseSharedArgs(args) {
|
|
|
7878
7915
|
agentsEnabled: args.agents,
|
|
7879
7916
|
powerBrowseEnabled: args["power-browse"],
|
|
7880
7917
|
humanlikeEnabled: args.humanlike,
|
|
7881
|
-
searchEnabled: args.search
|
|
7918
|
+
searchEnabled: args.search,
|
|
7919
|
+
bluebirdEnabled: args.bluebird
|
|
7882
7920
|
};
|
|
7883
7921
|
}
|
|
7884
7922
|
/**
|
|
@@ -7948,6 +7986,7 @@ function getClaudeCodeEnvVars(serverUrl, model, launchProfileId = "standard", pi
|
|
|
7948
7986
|
const mcpToolTimeoutMs = String(resolveMcpToolTimeoutMs());
|
|
7949
7987
|
if (process.env.MCP_TIMEOUT === void 0) vars.MCP_TIMEOUT = mcpToolTimeoutMs;
|
|
7950
7988
|
if (process.env.MCP_TOOL_TIMEOUT === void 0) vars.MCP_TOOL_TIMEOUT = mcpToolTimeoutMs;
|
|
7989
|
+
if (process.env.ENABLE_TOOL_SEARCH === void 0) vars.ENABLE_TOOL_SEARCH = "auto";
|
|
7951
7990
|
const isFastProfile = launchProfileId === "fast";
|
|
7952
7991
|
const isMaxProfile = launchProfileId === "max";
|
|
7953
7992
|
const isCheapProfile = launchProfileId === "cheap" || launchProfileId === "cheap1m" || launchProfileId === "cheapest";
|
|
@@ -8101,4 +8140,4 @@ function getCodexEnvVars(serverUrl) {
|
|
|
8101
8140
|
//#endregion
|
|
8102
8141
|
export { profileDescriptor as A, updateClaude as B, CHEAP_REVIEWER_ALIAS_ID as C, formatCheapPrerequisiteFailure as D, formatCheap1mPrerequisiteFailure as E, validateCheapestProfilePrerequisites as F, validateFastProfilePrerequisites as I, validateMaxProfileLaunch as L, validateBalancedProfilePrerequisites as M, validateCheap1mProfilePrerequisites as N, formatCheapestPrerequisiteFailure as O, validateCheapProfilePrerequisites as P, runSelfUpdate as R, CHEAP_PLAN_ALIAS_ID as S, formatBalancedPrerequisiteFailure as T, CHEAPEST_GENERAL_PURPOSE_ALIAS_ID as _, sharedServerArgs as a, CHEAP_EXPLORE_ALIAS_ID as b, stopKeepAwake as c, enableFileLogging as d, BALANCED_EXPLORE_ALIAS_ID as f, CHEAPEST_EXPLORE_ALIAS_ID as g, BALANCED_REVIEWER_ALIAS_ID as h, setupAndServe as i, resolveLaunchProfile as j, formatFastPrerequisiteFailure as k, injectModelPickerSettingsFile as l, BALANCED_PLAN_ALIAS_ID as m, getCodexEnvVars as n, LAUNCH_SECRET_HEADER as o, BALANCED_GENERAL_PURPOSE_ALIAS_ID as p, parseSharedArgs as r, startKeepAwake as s, getClaudeCodeEnvVars as t, listModelsForEndpoint as u, CHEAPEST_PLAN_ALIAS_ID as v, LUNA_SCOUT_ALIAS_ID as w, CHEAP_GENERAL_PURPOSE_ALIAS_ID as x, CHEAPEST_REVIEWER_ALIAS_ID as y, checkClaudeVersion as z };
|
|
8103
8142
|
|
|
8104
|
-
//# sourceMappingURL=server-setup-
|
|
8143
|
+
//# sourceMappingURL=server-setup-Dz7chd0b.js.map
|