github-router 0.3.350 → 0.3.351
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-B9T-EsEs.js → attribution-settings-DE0207hK.js} +4 -4
- package/dist/{attribution-settings-B9T-EsEs.js.map → attribution-settings-DE0207hK.js.map} +1 -1
- package/dist/browser-ext/manifest.json +1 -1
- package/dist/{claude-BY4e9ueE.js → claude-YVz8FA1M.js} +29 -13
- package/dist/claude-YVz8FA1M.js.map +1 -0
- package/dist/{codex-BOugL-uX.js → codex-B-znDU1X.js} +4 -4
- package/dist/{codex-BOugL-uX.js.map → codex-B-znDU1X.js.map} +1 -1
- package/dist/engine-Bbhs1trv.js +2 -0
- package/dist/{gate-discovery-BFqulsWz.js → gate-discovery-D--As1HS.js} +2 -2
- package/dist/{gate-discovery-BFqulsWz.js.map → gate-discovery-D--As1HS.js.map} +1 -1
- package/dist/{internal-stop-hook-DlGc9WwJ.js → internal-stop-hook-DJAFilW6.js} +2 -2
- package/dist/{internal-stop-hook-DlGc9WwJ.js.map → internal-stop-hook-DJAFilW6.js.map} +1 -1
- package/dist/main.js +6 -6
- package/dist/{peer-mcp-personas-BwwSNnBC.js → peer-mcp-personas-D_gRB57l.js} +15 -3
- package/dist/peer-mcp-personas-D_gRB57l.js.map +1 -0
- package/dist/{pi-Dpw8Otxw.js → pi-DpVcRXlA.js} +4 -4
- package/dist/{pi-Dpw8Otxw.js.map → pi-DpVcRXlA.js.map} +1 -1
- package/dist/{provision-9TAIgyL7.js → provision-CCLXOWVZ.js} +2 -2
- package/dist/{provision-9TAIgyL7.js.map → provision-CCLXOWVZ.js.map} +1 -1
- package/dist/{serve-BRKRWkd1.js → serve-D7aq-iiE.js} +5 -5
- package/dist/{serve-BRKRWkd1.js.map → serve-D7aq-iiE.js.map} +1 -1
- package/dist/{server-setup-DXVFE7bf.js → server-setup-B8LyRuEN.js} +44 -18
- package/dist/server-setup-B8LyRuEN.js.map +1 -0
- package/dist/{start-CoR3jqUR.js → start-BVP3nqIr.js} +3 -3
- package/dist/{start-CoR3jqUR.js.map → start-BVP3nqIr.js.map} +1 -1
- package/package.json +1 -1
- package/dist/claude-BY4e9ueE.js.map +0 -1
- package/dist/engine-DZfLaVcf.js +0 -2
- package/dist/peer-mcp-personas-BwwSNnBC.js.map +0 -1
- package/dist/server-setup-DXVFE7bf.js.map +0 -1
|
@@ -7,7 +7,7 @@ import { r as fetchWithTransientRetry } from "./upstream-retry-i1k1Xai2.js";
|
|
|
7
7
|
import { t as getCopilotUsage } from "./get-copilot-usage-C_6ast5h.js";
|
|
8
8
|
import { c as runCommandVoid, i as parseBoolEnv, o as resolveExecutable, r as killManagedTree, s as runCommandCapture } from "./exec-MCU1H-KZ.js";
|
|
9
9
|
import { _ as FAST_PROFILE_MODELS, f as FAST_PROFILE_ADVISOR_MODEL, i as BALANCED_PROFILE_NATIVE_AGENT_NAMES, l as BALANCED_PROFILE_SUBAGENT_CONTEXT_TOKENS, n as BALANCED_PROFILE_LEAD_EFFORT, r as BALANCED_PROFILE_MODELS, v as FAST_PROFILE_NATIVE_AGENT_NAMES } from "./balanced-profile-contract-XiIj4O1U.js";
|
|
10
|
-
import { $ as readIteratorWithTimeout, $t as createChatCompletions, An as oneMContextDisabled, B as injectAdvisorTool, Bt as shimDefaultsToXhigh, Cn as isBudgetClaudeLead, D as toolbeltEnabled, Dn as upstreamMaxConnections, En as upstreamAllowH2, F as ADVISOR_TOOL_INSTRUCTIONS, G as formatThinkingRepairDecline, Gn as CHEAP_PROFILE_NATIVE_AGENT_NAMES, Gt as getTokenizerFromModel, H as resolveAdvisorEffort, Hn as CHEAPEST_PROFILE_SUBAGENT_CONTEXT_TOKENS, Ht as createMessages, I as CHEAPEST_ADVISOR_TOOL_INSTRUCTIONS, In as CHEAPEST_PROFILE_MODELS, J as repairRejectedThinkingHistory, Jn as CHEAP_PROFILE_SUBAGENT_CONTEXT_TOKENS, K as rememberThinkingHistoryRepair, Kt as findLaunchBySecret, L as CHEAPEST_REVIEWER_ADVISOR_TOOL_INSTRUCTIONS, Ln as CHEAPEST_PROFILE_NATIVE_AGENT_NAMES, Mn as withOneMSuffixForLead, N as searchWeb, Nn as CHEAPEST_PROFILE_ADVISOR_CLIENT_MODEL, On as classifyMessagesRoute, P as ADVISOR_INTERNAL_TOOL_NAME, Q as logStreamError, Qt as createResponses, R as FAST_ADVISOR_TOOL_INSTRUCTIONS, Sn as generateRandomPort, U as resolveAdvisorModel, Un as CHEAP_PROFILE_ADVISOR_CLIENT_MODEL, Ut as getTextTokenCount, V as isAdvisorRequested, Vt as countTokens, W as resolveCheapestAdvisorModel, Wn as CHEAP_PROFILE_MODELS, Wt as getTokenCount, X as buildOpenAIErrorEvent, Xt as warnOnTokenPriceDrift, Y as buildAnthropicErrorEvent, Yt as assembleResponsesPayload, Z as isControllerClosedError, Zt as resolveMcpToolTimeoutMs, at as handleMcpDelete, bn as UPSTREAM_FETCH_TIMEOUT_MS, en as MAX_RESPONSE_BODY_BYTES, et as relayAnthropicStream, hn as BUDGET_SMALL_FAST_SLUG, i as assertMcpToolSurfaceConsistent, it as clampEffort, jn as withOneMSuffix, kn as catalogAdvertises1M, nn as parseJsonOrDiagnose, nt as UNKNOWN_EFFORT_ANCHOR, ot as handleMcpPost, pn as toolbeltPathOverride, q as repairKnownThinkingHistory, rn as normalizeOpenAIUsage, rt as bucketEffort, st as agentToolsEnabled, tn as readResponseBodyCapped, tt as EFFORT_ORDER, xn as UPSTREAM_INACTIVITY_TIMEOUT_MS, z as buildAdvisorStream } from "./peer-mcp-personas-
|
|
10
|
+
import { $ as readIteratorWithTimeout, $t as createChatCompletions, An as oneMContextDisabled, B as injectAdvisorTool, Bt as shimDefaultsToXhigh, Cn as isBudgetClaudeLead, D as toolbeltEnabled, Dn as upstreamMaxConnections, En as upstreamAllowH2, F as ADVISOR_TOOL_INSTRUCTIONS, G as formatThinkingRepairDecline, Gn as CHEAP_PROFILE_NATIVE_AGENT_NAMES, Gt as getTokenizerFromModel, H as resolveAdvisorEffort, Hn as CHEAPEST_PROFILE_SUBAGENT_CONTEXT_TOKENS, Ht as createMessages, I as CHEAPEST_ADVISOR_TOOL_INSTRUCTIONS, In as CHEAPEST_PROFILE_MODELS, J as repairRejectedThinkingHistory, Jn as CHEAP_PROFILE_SUBAGENT_CONTEXT_TOKENS, K as rememberThinkingHistoryRepair, Kt as findLaunchBySecret, L as CHEAPEST_REVIEWER_ADVISOR_TOOL_INSTRUCTIONS, Ln as CHEAPEST_PROFILE_NATIVE_AGENT_NAMES, Mn as withOneMSuffixForLead, N as searchWeb, Nn as CHEAPEST_PROFILE_ADVISOR_CLIENT_MODEL, On as classifyMessagesRoute, P as ADVISOR_INTERNAL_TOOL_NAME, Q as logStreamError, Qt as createResponses, R as FAST_ADVISOR_TOOL_INSTRUCTIONS, Sn as generateRandomPort, U as resolveAdvisorModel, Un as CHEAP_PROFILE_ADVISOR_CLIENT_MODEL, Ut as getTextTokenCount, V as isAdvisorRequested, Vt as countTokens, W as resolveCheapestAdvisorModel, Wn as CHEAP_PROFILE_MODELS, Wt as getTokenCount, X as buildOpenAIErrorEvent, Xt as warnOnTokenPriceDrift, Y as buildAnthropicErrorEvent, Yt as assembleResponsesPayload, Z as isControllerClosedError, Zt as resolveMcpToolTimeoutMs, at as handleMcpDelete, bn as UPSTREAM_FETCH_TIMEOUT_MS, en as MAX_RESPONSE_BODY_BYTES, et as relayAnthropicStream, hn as BUDGET_SMALL_FAST_SLUG, i as assertMcpToolSurfaceConsistent, it as clampEffort, jn as withOneMSuffix, kn as catalogAdvertises1M, nn as parseJsonOrDiagnose, nt as UNKNOWN_EFFORT_ANCHOR, ot as handleMcpPost, pn as toolbeltPathOverride, q as repairKnownThinkingHistory, rn as normalizeOpenAIUsage, rt as bucketEffort, st as agentToolsEnabled, tn as readResponseBodyCapped, tt as EFFORT_ORDER, xn as UPSTREAM_INACTIVITY_TIMEOUT_MS, z as buildAdvisorStream } from "./peer-mcp-personas-D_gRB57l.js";
|
|
11
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--dAYkEG1.js";
|
|
12
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-D4oMcg7c.js";
|
|
13
13
|
import consola from "consola";
|
|
@@ -453,12 +453,12 @@ const CHEAPEST_PROFILE = Object.freeze({
|
|
|
453
453
|
hasCoordinator: false
|
|
454
454
|
});
|
|
455
455
|
/**
|
|
456
|
-
* The `-m balanced` roster: the most-complex-tasks tier. A Sol/
|
|
457
|
-
* the 200K default window, a three-agent
|
|
458
|
-
* `General-Purpose`/`reviewer`, every role at 200K — no
|
|
459
|
-
* owns planning), and the Grok-4.6/medium Oracle-only peer
|
|
460
|
-
* match fast's: core workers, `orchestrate`, `decide`,
|
|
461
|
-
* `first-mate`.
|
|
456
|
+
* The `-m balanced` roster: the most-complex-tasks tier. A Sol/medium lead
|
|
457
|
+
* (`BALANCED_PROFILE_LEAD_EFFORT`) at the 200K default window, a three-agent
|
|
458
|
+
* surface (`Explore`/`General-Purpose`/`reviewer`, every role at 200K — no
|
|
459
|
+
* `Plan`: the lead owns planning), and the Grok-4.6/medium Oracle-only peer
|
|
460
|
+
* set. Hard-denies match fast's: core workers, `orchestrate`, `decide`,
|
|
461
|
+
* `fleet`, and `first-mate`.
|
|
462
462
|
*/
|
|
463
463
|
const BALANCED_PROFILE = Object.freeze({
|
|
464
464
|
id: "balanced",
|
|
@@ -1097,6 +1097,7 @@ function validateBalancedProfilePrerequisites(catalog, opts = {}) {
|
|
|
1097
1097
|
if (!hasToolCalls(sol)) missing.push(`${BALANCED_PROFILE_MODELS.lead}: does not advertise tool_calls`);
|
|
1098
1098
|
if (!hasContextAtLeast(sol, BALANCED_SUBAGENT_MIN_CONTEXT_TOKENS)) missing.push(`${BALANCED_PROFILE_MODELS.lead}: advertised context window is below the 200K subagent floor`);
|
|
1099
1099
|
if (!supportsEffort(sol, "high")) missing.push(`${BALANCED_PROFILE_MODELS.lead}: does not advertise a "high" reasoning effort`);
|
|
1100
|
+
if (!supportsEffort(sol, "medium")) missing.push(`${BALANCED_PROFILE_MODELS.lead}: does not advertise a "${BALANCED_PROFILE_LEAD_EFFORT}" reasoning effort (the contracted lead effort)`);
|
|
1100
1101
|
if (!supportsEndpoint(sol, "responses")) missing.push(`${BALANCED_PROFILE_MODELS.lead}: does not advertise a supported Responses endpoint`);
|
|
1101
1102
|
}
|
|
1102
1103
|
if (peers) {
|
|
@@ -1483,7 +1484,7 @@ const MAX_PICKER_MODELS = Object.freeze([
|
|
|
1483
1484
|
behavesAs: "claude-opus-5.5"
|
|
1484
1485
|
}
|
|
1485
1486
|
]);
|
|
1486
|
-
const
|
|
1487
|
+
const CHEAP1M_PICKER_MODELS = Object.freeze([
|
|
1487
1488
|
{
|
|
1488
1489
|
id: "gpt-5.6-sol",
|
|
1489
1490
|
label: "GPT-5.6 Sol",
|
|
@@ -1509,7 +1510,7 @@ const CHEAP_PICKER_MODELS = Object.freeze([
|
|
|
1509
1510
|
neverOneM: true
|
|
1510
1511
|
}
|
|
1511
1512
|
]);
|
|
1512
|
-
const
|
|
1513
|
+
const CHEAP_PICKER_MODELS = Object.freeze([
|
|
1513
1514
|
{
|
|
1514
1515
|
id: "gpt-5.6-sol",
|
|
1515
1516
|
label: "GPT-5.6 Sol",
|
|
@@ -1523,12 +1524,29 @@ const CHEAPEST_PICKER_MODELS = Object.freeze([
|
|
|
1523
1524
|
neverOneM: true
|
|
1524
1525
|
},
|
|
1525
1526
|
{
|
|
1526
|
-
id: "
|
|
1527
|
-
label: "
|
|
1528
|
-
behavesAs: "claude-
|
|
1529
|
-
neverOneM:
|
|
1527
|
+
id: "gemini-3.8-flash",
|
|
1528
|
+
label: "Gemini 3.8 Flash",
|
|
1529
|
+
behavesAs: "claude-sonnet-5",
|
|
1530
|
+
neverOneM: true
|
|
1531
|
+
},
|
|
1532
|
+
{
|
|
1533
|
+
id: "grok-4.6",
|
|
1534
|
+
label: "Grok 4.6",
|
|
1535
|
+
behavesAs: "claude-sonnet-5",
|
|
1536
|
+
neverOneM: true
|
|
1530
1537
|
}
|
|
1531
1538
|
]);
|
|
1539
|
+
const CHEAPEST_PICKER_MODELS = Object.freeze([{
|
|
1540
|
+
id: "gpt-5.6-sol",
|
|
1541
|
+
label: "GPT-5.6 Sol",
|
|
1542
|
+
behavesAs: "claude-opus-5.5",
|
|
1543
|
+
neverOneM: true
|
|
1544
|
+
}, {
|
|
1545
|
+
id: "gpt-6-luna",
|
|
1546
|
+
label: "GPT-6 Luna",
|
|
1547
|
+
behavesAs: "claude-opus-5.5",
|
|
1548
|
+
neverOneM: true
|
|
1549
|
+
}]);
|
|
1532
1550
|
const BALANCED_PICKER_MODELS = Object.freeze([
|
|
1533
1551
|
{
|
|
1534
1552
|
id: "gpt-5.6-sol",
|
|
@@ -1540,7 +1558,7 @@ const BALANCED_PICKER_MODELS = Object.freeze([
|
|
|
1540
1558
|
id: "gpt-6-luna",
|
|
1541
1559
|
label: "GPT-6 Luna",
|
|
1542
1560
|
behavesAs: "claude-opus-5.5",
|
|
1543
|
-
neverOneM:
|
|
1561
|
+
neverOneM: true
|
|
1544
1562
|
},
|
|
1545
1563
|
{
|
|
1546
1564
|
id: "grok-4.6",
|
|
@@ -1566,7 +1584,7 @@ function selectableModelsInCatalog(profile) {
|
|
|
1566
1584
|
const catalog = state.models?.data;
|
|
1567
1585
|
if (!catalog || catalog.length === 0) return [];
|
|
1568
1586
|
const present = new Set(catalog.map((entry) => entry.id));
|
|
1569
|
-
return (profile === "max" ? MAX_PICKER_MODELS : profile === "cheap"
|
|
1587
|
+
return (profile === "max" ? MAX_PICKER_MODELS : profile === "cheap" ? CHEAP_PICKER_MODELS : profile === "cheap1m" ? CHEAP1M_PICKER_MODELS : profile === "cheapest" ? CHEAPEST_PICKER_MODELS : profile === "balanced" ? BALANCED_PICKER_MODELS : STANDARD_PICKER_MODELS).filter((entry) => present.has(entry.id)).map((entry) => ({
|
|
1570
1588
|
model: entry.neverOneM ? entry.id : withOneMSuffix(entry.id),
|
|
1571
1589
|
label: entry.label,
|
|
1572
1590
|
behavesAs: entry.behavesAs
|
|
@@ -2524,7 +2542,7 @@ function collectToolFieldKeys(body) {
|
|
|
2524
2542
|
//#endregion
|
|
2525
2543
|
//#region package.json
|
|
2526
2544
|
var name = "github-router";
|
|
2527
|
-
var version = "0.3.
|
|
2545
|
+
var version = "0.3.351";
|
|
2528
2546
|
//#endregion
|
|
2529
2547
|
//#region src/lib/approval.ts
|
|
2530
2548
|
const awaitApproval = async () => {
|
|
@@ -8071,11 +8089,19 @@ function getClaudeCodeEnvVars(serverUrl, model, launchProfileId = "standard", pi
|
|
|
8071
8089
|
const isMaxProfile = launchProfileId === "max";
|
|
8072
8090
|
const isCheapProfile = launchProfileId === "cheap" || launchProfileId === "cheap1m" || launchProfileId === "cheapest";
|
|
8073
8091
|
const routerWinsTiers = isFastProfile || isCheapProfile;
|
|
8092
|
+
const pinStrict200K = launchProfileId === "cheap" || launchProfileId === "cheapest" || launchProfileId === "balanced";
|
|
8093
|
+
if (pinStrict200K) {
|
|
8094
|
+
if (process.env.CLAUDE_CODE_DISABLE_1M_CONTEXT === void 0 || process.env.CLAUDE_CODE_DISABLE_1M_CONTEXT === "") vars.CLAUDE_CODE_DISABLE_1M_CONTEXT = "1";
|
|
8095
|
+
}
|
|
8096
|
+
const pinLeadEffort = launchProfileId === "cheapest" ? "max" : launchProfileId === "balanced" ? BALANCED_PROFILE_LEAD_EFFORT : void 0;
|
|
8097
|
+
if (pinLeadEffort !== void 0) {
|
|
8098
|
+
if ((process.env.CLAUDE_CODE_EFFORT_LEVEL ?? "").trim() === "") vars.CLAUDE_CODE_EFFORT_LEVEL = pinLeadEffort;
|
|
8099
|
+
}
|
|
8074
8100
|
const smallFastModel = isMaxProfile ? MAX_LUNA_HIGH_ALIAS_ID : isFastProfile ? LUNA_HAIKU_ALIAS_ID : isCheapProfile ? LUNA_HAIKU_ALIAS_ID : isBudgetClaudeLead(model) && (state.models?.data?.some((m) => m.id === "claude-haiku-4.5") ?? false) ? BUDGET_SMALL_FAST_SLUG : "claude-sonnet-5";
|
|
8075
8101
|
if (process.env.ANTHROPIC_SMALL_FAST_MODEL === void 0 || routerWinsTiers) vars.ANTHROPIC_SMALL_FAST_MODEL = (isFastProfile || isMaxProfile) && !isCheapProfile ? oneMSuffixForAlias(smallFastModel) : smallFastModel;
|
|
8076
8102
|
const seedTierRow = (modelKey, nameKey, bareSlug) => {
|
|
8077
8103
|
if (process.env[modelKey] !== void 0) return;
|
|
8078
|
-
vars[modelKey] = withOneMSuffixForLead(bareSlug);
|
|
8104
|
+
vars[modelKey] = pinStrict200K ? bareSlug : withOneMSuffixForLead(bareSlug);
|
|
8079
8105
|
if (process.env[nameKey] === void 0) vars[nameKey] = bareSlug;
|
|
8080
8106
|
};
|
|
8081
8107
|
const seedFastAliasTierRow = (modelKey, nameKey, aliasId, displayName, force = false) => {
|
|
@@ -8243,4 +8269,4 @@ function getPiLaunchEnvVars(mirrorDir) {
|
|
|
8243
8269
|
//#endregion
|
|
8244
8270
|
export { formatFastPrerequisiteFailure as A, runSelfUpdate as B, CHEAP_REVIEWER_ALIAS_ID as C, formatCheap1mPrerequisiteFailure as D, formatBalancedPrerequisiteFailure as E, validateCheapProfilePrerequisites as F, updateClaude as H, validateCheapestProfilePrerequisites as I, validateFastProfilePrerequisites as L, resolveLaunchProfile as M, validateBalancedProfilePrerequisites as N, formatCheapPrerequisiteFailure as O, validateCheap1mProfilePrerequisites as P, validateMaxProfileLaunch as R, CHEAP_PLAN_ALIAS_ID as S, MAX_BROWSE_LOW_ALIAS_ID as T, checkClaudeVersion as V, CHEAPEST_EXPLORE_ALIAS_ID as _, setupAndServe as a, CHEAP_EXPLORE_ALIAS_ID as b, startKeepAwake as c, listModelsForEndpoint as d, enableFileLogging as f, BROWSE_LOW_ALIAS_ID as g, BALANCED_REVIEWER_ALIAS_ID as h, parseSharedArgs as i, profileDescriptor as j, formatCheapestPrerequisiteFailure as k, stopKeepAwake as l, BALANCED_GENERAL_PURPOSE_ALIAS_ID as m, getCodexEnvVars as n, sharedServerArgs as o, BALANCED_EXPLORE_ALIAS_ID as p, getPiLaunchEnvVars as r, LAUNCH_SECRET_HEADER as s, getClaudeCodeEnvVars as t, injectModelPickerSettingsFile as u, CHEAPEST_GENERAL_PURPOSE_ALIAS_ID as v, LUNA_SCOUT_ALIAS_ID as w, CHEAP_GENERAL_PURPOSE_ALIAS_ID as x, CHEAPEST_REVIEWER_ALIAS_ID as y, queueDetachedGlobalInstall as z };
|
|
8245
8271
|
|
|
8246
|
-
//# sourceMappingURL=server-setup-
|
|
8272
|
+
//# sourceMappingURL=server-setup-B8LyRuEN.js.map
|