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.
- package/dist/{attribution-settings-B1xutIts.js → attribution-settings-dta8MTnd.js} +183 -92
- package/dist/attribution-settings-dta8MTnd.js.map +1 -0
- package/dist/browser-ext/manifest.json +1 -1
- package/dist/{claude-uRuzEH0W.js → claude-kr-Augld.js} +62 -115
- package/dist/claude-kr-Augld.js.map +1 -0
- package/dist/{codex-D5ag-liR.js → codex-B1qnVlzG.js} +4 -4
- package/dist/{codex-D5ag-liR.js.map → codex-B1qnVlzG.js.map} +1 -1
- package/dist/engine-B3w1TDgR.js +2 -0
- package/dist/{fast-profile-contract-K3P58nj3.js → fast-profile-contract-B6xn-Rzo.js} +26 -23
- package/dist/fast-profile-contract-B6xn-Rzo.js.map +1 -0
- package/dist/{gate-discovery-BTRVyKWu.js → gate-discovery-DOIm3XHF.js} +2 -2
- package/dist/{gate-discovery-BTRVyKWu.js.map → gate-discovery-DOIm3XHF.js.map} +1 -1
- package/dist/hooks.mjs +117 -46
- package/dist/hooks.sha256 +1 -1
- package/dist/{internal-fast-dispatch-guard-D2HcfXZv.js → internal-fast-dispatch-guard-BhpZ6LvO.js} +71 -15
- package/dist/internal-fast-dispatch-guard-BhpZ6LvO.js.map +1 -0
- package/dist/{internal-fast-dispatch-guard-CYOWbxjX.js → internal-fast-dispatch-guard-C6BNoOnn.js} +1 -1
- package/dist/{internal-max-dispatch-guard-BjSVXMvC.js → internal-max-dispatch-guard-DhAr8N_o.js} +28 -11
- package/dist/internal-max-dispatch-guard-DhAr8N_o.js.map +1 -0
- package/dist/{internal-max-dispatch-guard-Bcjavapx.js → internal-max-dispatch-guard-k52H-PdC.js} +1 -1
- package/dist/{internal-stop-hook-BZg__ab6.js → internal-stop-hook-CWffknT2.js} +2 -2
- package/dist/{internal-stop-hook-BZg__ab6.js.map → internal-stop-hook-CWffknT2.js.map} +1 -1
- package/dist/main.js +7 -7
- package/dist/{max-profile-contract-BTXowh6k.js → max-profile-contract-Ct62mtAR.js} +16 -4
- package/dist/max-profile-contract-Ct62mtAR.js.map +1 -0
- package/dist/{peer-mcp-personas-DwEiYeJS.js → peer-mcp-personas-BU5dNLxQ.js} +390 -349
- package/dist/peer-mcp-personas-BU5dNLxQ.js.map +1 -0
- package/dist/{provision-BLT1pCFy.js → provision-qNJgF5XD.js} +2 -2
- package/dist/{provision-BLT1pCFy.js.map → provision-qNJgF5XD.js.map} +1 -1
- package/dist/{serve-wEZoOijw.js → serve-T64kVeQN.js} +5 -5
- package/dist/{serve-wEZoOijw.js.map → serve-T64kVeQN.js.map} +1 -1
- package/dist/{server-setup-Zn5wkosb.js → server-setup-C_LAE8NI.js} +17 -11
- package/dist/server-setup-C_LAE8NI.js.map +1 -0
- package/dist/{start-DSqU8d8h.js → start-DHRToEyb.js} +3 -3
- package/dist/{start-DSqU8d8h.js.map → start-DHRToEyb.js.map} +1 -1
- package/package.json +1 -1
- package/dist/attribution-settings-B1xutIts.js.map +0 -1
- package/dist/claude-uRuzEH0W.js.map +0 -1
- package/dist/engine-2uMJ4Isk.js +0 -2
- package/dist/fast-profile-contract-K3P58nj3.js.map +0 -1
- package/dist/internal-fast-dispatch-guard-D2HcfXZv.js.map +0 -1
- package/dist/internal-max-dispatch-guard-BjSVXMvC.js.map +0 -1
- package/dist/max-profile-contract-BTXowh6k.js.map +0 -1
- package/dist/peer-mcp-personas-DwEiYeJS.js.map +0 -1
- package/dist/server-setup-Zn5wkosb.js.map +0 -1
|
@@ -1,12 +1,12 @@
|
|
|
1
|
-
import { $ as UNKNOWN_EFFORT_ANCHOR,
|
|
1
|
+
import { $ as UNKNOWN_EFFORT_ANCHOR, An as MAX_LUNA_HIGH_ALIAS_ID, At as countTokens, B as resolveAdvisorEffort, Bn as resolveModelAlias, Bt as resolveMcpToolTimeoutMs, Cn as withOneMSuffix, D as toolbeltEnabled, Dn as LUNA_REAL_MODEL_ID, En as LUNA_HAIKU_ALIAS_ID, F as ADVISOR_TOOL_INSTRUCTIONS, Fn as isRetiredFastModelAlias, Ft as findLaunchBySecret, G as repairRejectedThinkingHistory, Gt as parseJsonOrDiagnose, H as formatThinkingRepairDecline, Ht as createChatCompletions, I as FAST_ADVISOR_TOOL_INSTRUCTIONS, In as maxAliasEffort, J as isControllerClosedError, K as buildAnthropicErrorEvent, Kt as normalizeOpenAIUsage, L as buildAdvisorStream, Ln as maxAliasModel, Mn as canonicalizeAliasModel, Mt as getTextTokenCount, N as searchWeb, Nt as getTokenCount, P as ADVISOR_INTERNAL_TOOL_NAME, Pn as isMaxModelAlias, Pt as getTokenizerFromModel, Q as EFFORT_ORDER, R as injectAdvisorTool, Rt as assembleResponsesPayload, Sn as oneMContextDisabled, Tn as LUNA_DRIVER_ALIAS_ID, U as rememberThinkingHistoryRepair, Un as withInstallLock, Ut as MAX_RESPONSE_BODY_BYTES, V as resolveAdvisorModel, Vt as createResponses, W as repairKnownThinkingHistory, Wt as readResponseBodyCapped, X as readIteratorWithTimeout, Y as logStreamError, Z as relayAnthropicStream, an as toolbeltPathOverride, bn as classifyMessagesRoute, en as provisionTreeSitterAssets, et as bucketEffort, fn as UPSTREAM_FETCH_TIMEOUT_MS, hn as isBudgetClaudeLead, i as assertMcpToolSurfaceConsistent, it as agentToolsEnabled, jn as MAX_LUNA_MAX_ALIAS_ID, jt as createMessages, kn as LUNA_SONNET_ALIAS_ID, kt as shimDefaultsToXhigh, mn as generateRandomPort, nt as handleMcpDelete, pn as UPSTREAM_INACTIVITY_TIMEOUT_MS, q as buildOpenAIErrorEvent, rt as handleMcpPost, sn as BUDGET_SMALL_FAST_SLUG, tt as clampEffort, vn as upstreamAllowH2, wn as withOneMSuffixForLead, xn as catalogAdvertises1M, yn as upstreamMaxConnections, z as isAdvisorRequested, zt as warnOnTokenPriceDrift } from "./peer-mcp-personas-BU5dNLxQ.js";
|
|
2
2
|
import { t as getPackageVersion } from "./version-C8x2hQrZ.js";
|
|
3
3
|
import { i as ensurePaths, t as PATHS } from "./paths-IcZW8gZx.js";
|
|
4
4
|
import { t as state } from "./state-B8adscCv.js";
|
|
5
5
|
import { T as copilotHeaders, _ as forwardError, a as cacheCopilotVersion, 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, w as copilotBaseUrl, y as fetchWithTransientRetry } from "./token-CbuFyx-B.js";
|
|
6
6
|
import { t as getCopilotUsage } from "./get-copilot-usage-ByjQqhdi.js";
|
|
7
7
|
import { a as resolveExecutable, n as killManagedTree, o as runCommandCapture, r as parseBoolEnv, s as runCommandVoid } from "./exec-y8C_MU8A.js";
|
|
8
|
-
import { r as FAST_PROFILE_ADVISOR_MODEL } from "./fast-profile-contract-
|
|
9
|
-
import {
|
|
8
|
+
import { r as FAST_PROFILE_ADVISOR_MODEL } from "./fast-profile-contract-B6xn-Rzo.js";
|
|
9
|
+
import { d as maxAdvisorPinIsValid, i as MAX_PROFILE_MODELS, l as maxAdvisorEffortForModel, m as maxOpusModel, n as MAX_PROFILE_ALLOWED_LEAD_MODEL_IDS, t as MAX_PROFILE_ADVISOR_INSTRUCTIONS, u as maxAdvisorModelFromPin, x as stripTrailingOneMSuffix } from "./max-profile-contract-Ct62mtAR.js";
|
|
10
10
|
import consola from "consola";
|
|
11
11
|
import * as fs$2 from "node:fs";
|
|
12
12
|
import fs, { existsSync } from "node:fs";
|
|
@@ -1502,7 +1502,7 @@ function collectToolFieldKeys(body) {
|
|
|
1502
1502
|
//#endregion
|
|
1503
1503
|
//#region package.json
|
|
1504
1504
|
var name = "github-router";
|
|
1505
|
-
var version = "0.3.
|
|
1505
|
+
var version = "0.3.303";
|
|
1506
1506
|
//#endregion
|
|
1507
1507
|
//#region src/lib/approval.ts
|
|
1508
1508
|
const awaitApproval = async () => {
|
|
@@ -4427,14 +4427,14 @@ function preprocessMaxRequest(rawBody, launch, subagentRequest = false) {
|
|
|
4427
4427
|
modified: true
|
|
4428
4428
|
};
|
|
4429
4429
|
}
|
|
4430
|
-
const allowedSubagentModel = subagentRequest && base === "grok-4.6";
|
|
4430
|
+
const allowedSubagentModel = subagentRequest && (base === "grok-4.6" || base === "gpt-5.6-luna");
|
|
4431
4431
|
if (!allowedModel(base) && !allowedSubagentModel) return {
|
|
4432
4432
|
body: rawBody,
|
|
4433
4433
|
originalModel,
|
|
4434
4434
|
modified: false,
|
|
4435
4435
|
rejectedModel: originalModel
|
|
4436
4436
|
};
|
|
4437
|
-
const effort = allowedSubagentModel ? "
|
|
4437
|
+
const effort = allowedSubagentModel ? base === "gpt-5.6-luna" ? "max" : "high" : MAX_MODEL_EFFORTS[base];
|
|
4438
4438
|
if (!effort) return {
|
|
4439
4439
|
body: rawBody,
|
|
4440
4440
|
originalModel,
|
|
@@ -4475,6 +4475,12 @@ function preprocessFastRequest(rawBody, launch, subagentRequest = false) {
|
|
|
4475
4475
|
body: rawBody,
|
|
4476
4476
|
modified: false
|
|
4477
4477
|
};
|
|
4478
|
+
if (isRetiredFastModelAlias(originalModel)) return {
|
|
4479
|
+
body: rawBody,
|
|
4480
|
+
originalModel,
|
|
4481
|
+
modified: false,
|
|
4482
|
+
retiredAlias: originalModel
|
|
4483
|
+
};
|
|
4478
4484
|
const alias = resolveModelAlias(originalModel);
|
|
4479
4485
|
if (alias && (launch?.profileId !== "fast" || isMaxModelAlias(originalModel))) return {
|
|
4480
4486
|
body: rawBody,
|
|
@@ -5003,8 +5009,8 @@ async function handleCompletion(c) {
|
|
|
5003
5009
|
}
|
|
5004
5010
|
}
|
|
5005
5011
|
const fastPreprocess = preprocessFastRequest(rawBody, identity.launch, subagentRequest);
|
|
5006
|
-
if (fastPreprocess.rejectedAlias || fastPreprocess.rejectedModel) {
|
|
5007
|
-
const message = identity.launch?.profileId === "max" ? maxRequestError(fastPreprocess) ?? "Invalid max request" : fastPreprocess.rejectedAlias ? `Router-owned model alias ${JSON.stringify(fastPreprocess.rejectedAlias)} is valid only for an authenticated -m fast launch.` : `Model ${JSON.stringify(fastPreprocess.rejectedModel)} is outside the fixed -m fast model set.`;
|
|
5012
|
+
if (fastPreprocess.retiredAlias || fastPreprocess.rejectedAlias || fastPreprocess.rejectedModel) {
|
|
5013
|
+
const message = fastPreprocess.retiredAlias ? `Router-owned model alias ${JSON.stringify(fastPreprocess.retiredAlias)} belongs to a retired Fast role and is no longer valid. Relaunch or select a current Fast role.` : identity.launch?.profileId === "max" ? maxRequestError(fastPreprocess) ?? "Invalid max request" : fastPreprocess.rejectedAlias ? `Router-owned model alias ${JSON.stringify(fastPreprocess.rejectedAlias)} is valid only for an authenticated -m fast launch.` : `Model ${JSON.stringify(fastPreprocess.rejectedModel)} is outside the fixed -m fast model set.`;
|
|
5008
5014
|
return c.json({
|
|
5009
5015
|
type: "error",
|
|
5010
5016
|
error: {
|
|
@@ -5551,8 +5557,8 @@ async function handleCountTokens(c) {
|
|
|
5551
5557
|
const rawBody = await c.req.text();
|
|
5552
5558
|
const subagentRequest = Boolean(c.req.header("x-claude-code-agent-id"));
|
|
5553
5559
|
const fastPreprocess = preprocessFastRequest(rawBody, identity.launch, subagentRequest);
|
|
5554
|
-
if (fastPreprocess.rejectedAlias || fastPreprocess.rejectedModel) {
|
|
5555
|
-
const message = identity.launch?.profileId === "max" ? maxRequestError(fastPreprocess) ?? "Invalid max request" : fastPreprocess.rejectedAlias ? `Router-owned model alias ${JSON.stringify(fastPreprocess.rejectedAlias)} is valid only for an authenticated -m fast launch.` : `Model ${JSON.stringify(fastPreprocess.rejectedModel)} is outside the fixed -m fast model set.`;
|
|
5560
|
+
if (fastPreprocess.retiredAlias || fastPreprocess.rejectedAlias || fastPreprocess.rejectedModel) {
|
|
5561
|
+
const message = fastPreprocess.retiredAlias ? `Router-owned model alias ${JSON.stringify(fastPreprocess.retiredAlias)} belongs to a retired Fast role and is no longer valid. Relaunch or select a current Fast role.` : identity.launch?.profileId === "max" ? maxRequestError(fastPreprocess) ?? "Invalid max request" : fastPreprocess.rejectedAlias ? `Router-owned model alias ${JSON.stringify(fastPreprocess.rejectedAlias)} is valid only for an authenticated -m fast launch.` : `Model ${JSON.stringify(fastPreprocess.rejectedModel)} is outside the fixed -m fast model set.`;
|
|
5556
5562
|
return c.json({
|
|
5557
5563
|
type: "error",
|
|
5558
5564
|
error: {
|
|
@@ -6917,4 +6923,4 @@ function getCodexEnvVars(serverUrl) {
|
|
|
6917
6923
|
//#endregion
|
|
6918
6924
|
export { sharedServerArgs as a, stopKeepAwake as c, runSelfUpdate as d, checkClaudeVersion as f, setupAndServe as i, listModelsForEndpoint as l, getCodexEnvVars as n, LAUNCH_SECRET_HEADER as o, updateClaude as p, parseSharedArgs as r, startKeepAwake as s, getClaudeCodeEnvVars as t, enableFileLogging as u };
|
|
6919
6925
|
|
|
6920
|
-
//# sourceMappingURL=server-setup-
|
|
6926
|
+
//# sourceMappingURL=server-setup-C_LAE8NI.js.map
|