github-router 0.3.333 → 0.3.334
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-Cu9cYRHf.js → attribution-settings-BwJ_HbhG.js} +5 -5
- package/dist/{attribution-settings-Cu9cYRHf.js.map → attribution-settings-BwJ_HbhG.js.map} +1 -1
- package/dist/{balanced-profile-contract-CqFRoCUe.js → balanced-profile-contract-DkmALvc7.js} +7 -10
- package/dist/balanced-profile-contract-DkmALvc7.js.map +1 -0
- package/dist/browser-ext/manifest.json +1 -1
- package/dist/{claude-BObYdG2J.js → claude-C1fHEK9k.js} +10 -10
- package/dist/{claude-BObYdG2J.js.map → claude-C1fHEK9k.js.map} +1 -1
- package/dist/{codex-JnNE58nu.js → codex-DPgcI7n4.js} +4 -4
- package/dist/{codex-JnNE58nu.js.map → codex-DPgcI7n4.js.map} +1 -1
- package/dist/engine-Dt_WWJcW.js +2 -0
- package/dist/{gate-discovery-CljRUZjm.js → gate-discovery-BTgLdzhP.js} +2 -2
- package/dist/{gate-discovery-CljRUZjm.js.map → gate-discovery-BTgLdzhP.js.map} +1 -1
- package/dist/hooks.mjs +0 -3
- package/dist/hooks.sha256 +1 -1
- package/dist/{internal-fast-dispatch-guard-BuRlhFek.js → internal-fast-dispatch-guard-BykpMYog.js} +2 -2
- package/dist/{internal-fast-dispatch-guard-BuRlhFek.js.map → internal-fast-dispatch-guard-BykpMYog.js.map} +1 -1
- package/dist/{internal-fast-dispatch-guard-BYRYbsFh.js → internal-fast-dispatch-guard-VvR1xQnL.js} +1 -1
- package/dist/{internal-stop-hook-Cz88dW5S.js → internal-stop-hook-t_pg41SR.js} +2 -2
- package/dist/{internal-stop-hook-Cz88dW5S.js.map → internal-stop-hook-t_pg41SR.js.map} +1 -1
- package/dist/main.js +6 -6
- package/dist/{peer-mcp-personas-CorhWEhi.js → peer-mcp-personas-7esbf4L6.js} +3 -14
- package/dist/{peer-mcp-personas-CorhWEhi.js.map → peer-mcp-personas-7esbf4L6.js.map} +1 -1
- package/dist/{provision-DwNx-PZA.js → provision-DFscSS0y.js} +2 -2
- package/dist/{provision-DwNx-PZA.js.map → provision-DFscSS0y.js.map} +1 -1
- package/dist/{serve-Cu19zfEL.js → serve-DHCliFCz.js} +5 -5
- package/dist/{serve-Cu19zfEL.js.map → serve-DHCliFCz.js.map} +1 -1
- package/dist/{server-setup-Dz7chd0b.js → server-setup-aZtjyebO.js} +13 -15
- package/dist/{server-setup-Dz7chd0b.js.map → server-setup-aZtjyebO.js.map} +1 -1
- package/dist/{start-BvN5FA6O.js → start-CWQ5jAwp.js} +3 -3
- package/dist/{start-BvN5FA6O.js.map → start-CWQ5jAwp.js.map} +1 -1
- package/package.json +1 -1
- package/dist/balanced-profile-contract-CqFRoCUe.js.map +0 -1
- package/dist/engine-DApePSq4.js +0 -2
|
@@ -6,8 +6,8 @@ import { _ as forwardError, a as cacheCopilotVersion, b as copilotBaseUrl, c as
|
|
|
6
6
|
import { r as fetchWithTransientRetry } from "./upstream-retry-i1k1Xai2.js";
|
|
7
7
|
import { t as getCopilotUsage } from "./get-copilot-usage-CGaV01dC.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
|
-
import {
|
|
10
|
-
import { $ as EFFORT_ORDER, $t as
|
|
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-DkmALvc7.js";
|
|
10
|
+
import { $ as EFFORT_ORDER, $t as readResponseBodyCapped, An as withOneMSuffixForLead, B as resolveAdvisorEffort, Bt as createMessages, D as toolbeltEnabled, Dn as catalogAdvertises1M, En as classifyMessagesRoute, F as ADVISOR_TOOL_INSTRUCTIONS, G as repairKnownThinkingHistory, H as resolveCheapestAdvisorModel, Hn as CHEAP_PROFILE_SUBAGENT_CONTEXT_TOKENS, Ht as getTokenCount, I as FAST_ADVISOR_TOOL_INSTRUCTIONS, In as CHEAPEST_PROFILE_SUBAGENT_CONTEXT_TOKENS, J as buildOpenAIErrorEvent, Jt as warnOnTokenPriceDrift, K as repairRejectedThinkingHistory, L as buildAdvisorStream, Ln as CHEAP_PROFILE_ADVISOR_CLIENT_MODEL, Mn as CHEAPEST_PROFILE_MODELS, N as searchWeb, Nn as CHEAPEST_PROFILE_NATIVE_AGENT_NAMES, On as oneMContextDisabled, P as ADVISOR_INTERNAL_TOOL_NAME, Q as relayAnthropicStream, Qt as MAX_RESPONSE_BODY_BYTES, R as injectAdvisorTool, Rn as CHEAP_PROFILE_MODELS, Rt as shimDefaultsToXhigh, Tn as upstreamMaxConnections, U as formatThinkingRepairDecline, Ut as getTokenizerFromModel, V as resolveAdvisorModel, Vt as getTextTokenCount, W as rememberThinkingHistoryRepair, Wt as findLaunchBySecret, X as logStreamError, Xt as createResponses, Y as isControllerClosedError, Yt as resolveMcpToolTimeoutMs, Z as readIteratorWithTimeout, Zt as createChatCompletions, at as agentToolsEnabled, bn as generateRandomPort, dn as toolbeltPathOverride, en as parseJsonOrDiagnose, et as UNKNOWN_EFFORT_ANCHOR, i as assertMcpToolSurfaceConsistent, it as handleMcpPost, jn as CHEAPEST_PROFILE_ADVISOR_CLIENT_MODEL, kn as withOneMSuffix, nt as clampEffort, pn as BUDGET_SMALL_FAST_SLUG, q as buildAnthropicErrorEvent, qt as assembleResponsesPayload, rt as handleMcpDelete, tn as normalizeOpenAIUsage, tt as bucketEffort, vn as UPSTREAM_FETCH_TIMEOUT_MS, wn as upstreamAllowH2, xn as isBudgetClaudeLead, yn as UPSTREAM_INACTIVITY_TIMEOUT_MS, z as isAdvisorRequested, zn as CHEAP_PROFILE_NATIVE_AGENT_NAMES, zt as countTokens } from "./peer-mcp-personas-7esbf4L6.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-MJJt0zm-.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-D4fmThbS.js";
|
|
13
13
|
import consola from "consola";
|
|
@@ -2489,7 +2489,7 @@ function collectToolFieldKeys(body) {
|
|
|
2489
2489
|
//#endregion
|
|
2490
2490
|
//#region package.json
|
|
2491
2491
|
var name = "github-router";
|
|
2492
|
-
var version = "0.3.
|
|
2492
|
+
var version = "0.3.334";
|
|
2493
2493
|
//#endregion
|
|
2494
2494
|
//#region src/lib/approval.ts
|
|
2495
2495
|
const awaitApproval = async () => {
|
|
@@ -6216,14 +6216,12 @@ async function handleCompletion(c) {
|
|
|
6216
6216
|
const maxLeadAdvisor = maxProfileRequest && !maxSubagentRequest;
|
|
6217
6217
|
const cheapLeadAdvisor = cheapProfileRequest && !cheapSubagentRequest;
|
|
6218
6218
|
const cheapestLeadAdvisor = cheapestProfileRequest && !cheapestSubagentRequest;
|
|
6219
|
-
const balancedLeadAdvisor = balancedProfileRequest && !balancedSubagentRequest;
|
|
6220
6219
|
const advisorEnabled = advisorRequested && !fastSubagentRequest && !maxSubagentRequest && !cheapSubagentRequest && !cheapestSubagentRequest && !balancedSubagentRequest;
|
|
6221
6220
|
const fastAdvisorEnabled = fastLeadAdvisor && advisorRequested && hasNonEmptyTools(rawBody);
|
|
6222
6221
|
const maxAdvisorEnabled = maxLeadAdvisor && advisorRequested && hasNonEmptyTools(rawBody);
|
|
6223
6222
|
const cheapAdvisorEnabled = cheapLeadAdvisor && advisorRequested && hasNonEmptyTools(rawBody);
|
|
6224
6223
|
const cheapestAdvisorEnabled = cheapestLeadAdvisor && advisorRequested && hasNonEmptyTools(rawBody);
|
|
6225
|
-
const
|
|
6226
|
-
const advisorBehaviorEnabled = fastLeadAdvisor ? fastAdvisorEnabled : cheapLeadAdvisor ? cheapAdvisorEnabled : cheapestLeadAdvisor ? cheapestAdvisorEnabled : balancedLeadAdvisor ? balancedAdvisorEnabled : maxLeadAdvisor ? maxAdvisorEnabled : advisorEnabled;
|
|
6224
|
+
const advisorBehaviorEnabled = balancedProfileRequest ? false : fastLeadAdvisor ? fastAdvisorEnabled : cheapLeadAdvisor ? cheapAdvisorEnabled : cheapestLeadAdvisor ? cheapestAdvisorEnabled : maxLeadAdvisor ? maxAdvisorEnabled : advisorEnabled;
|
|
6227
6225
|
let fastAdvisorChoice;
|
|
6228
6226
|
let maxAdvisorChoice;
|
|
6229
6227
|
if (maxAdvisorEnabled) {
|
|
@@ -6262,9 +6260,9 @@ async function handleCompletion(c) {
|
|
|
6262
6260
|
}, 503);
|
|
6263
6261
|
}
|
|
6264
6262
|
}
|
|
6265
|
-
if (cheapAdvisorEnabled
|
|
6263
|
+
if (cheapAdvisorEnabled) {
|
|
6266
6264
|
const mismatch = fastAdvisorMetadataMismatch(rawBody);
|
|
6267
|
-
const relaunchProfile = identity.launch?.profileId === "cheap1m" ? "cheap1m" :
|
|
6265
|
+
const relaunchProfile = identity.launch?.profileId === "cheap1m" ? "cheap1m" : "cheap";
|
|
6268
6266
|
if (mismatch) return c.json({
|
|
6269
6267
|
type: "error",
|
|
6270
6268
|
error: {
|
|
@@ -6355,7 +6353,7 @@ async function handleCompletion(c) {
|
|
|
6355
6353
|
parsedBase = JSON.parse(promptWindowBody);
|
|
6356
6354
|
} catch {}
|
|
6357
6355
|
const wantsStream = parsedBase?.stream === true;
|
|
6358
|
-
if ((fastAdvisorEnabled || cheapAdvisorEnabled || cheapestAdvisorEnabled ||
|
|
6356
|
+
if ((fastAdvisorEnabled || cheapAdvisorEnabled || cheapestAdvisorEnabled || maxAdvisorEnabled) && wantsStream) {
|
|
6359
6357
|
const initialConversation = Array.isArray(parsedBase.messages) ? parsedBase.messages : [];
|
|
6360
6358
|
const parsedInitial = parseAnthropicRequest(parsedBase, modelId, selectedModel);
|
|
6361
6359
|
const translatedAdvisorAborter = new AbortController();
|
|
@@ -6378,7 +6376,7 @@ async function handleCompletion(c) {
|
|
|
6378
6376
|
effort: maxAdvisorChoice.effort,
|
|
6379
6377
|
escalated: false,
|
|
6380
6378
|
fastProfile: false
|
|
6381
|
-
} : cheapAdvisorEnabled || cheapestAdvisorEnabled
|
|
6379
|
+
} : cheapAdvisorEnabled || cheapestAdvisorEnabled ? {
|
|
6382
6380
|
model: fastAdvisorChoice.model,
|
|
6383
6381
|
effort: resolveAdvisorEffort(rawBody, fastAdvisorChoice.model, true),
|
|
6384
6382
|
escalated: fastAdvisorChoice.escalated,
|
|
@@ -6398,7 +6396,7 @@ async function handleCompletion(c) {
|
|
|
6398
6396
|
advisorEscalated: advisorChoice.escalated,
|
|
6399
6397
|
advisorFastProfile: advisorChoice.fastProfile,
|
|
6400
6398
|
advisorMaxProfile: maxAdvisorEnabled,
|
|
6401
|
-
advisorCheapProfile: cheapAdvisorEnabled || cheapestAdvisorEnabled
|
|
6399
|
+
advisorCheapProfile: cheapAdvisorEnabled || cheapestAdvisorEnabled,
|
|
6402
6400
|
advisorEffort: advisorChoice.effort,
|
|
6403
6401
|
externalAborter: translatedAdvisorAborter,
|
|
6404
6402
|
continueTurn: makeShimContinueTurn(endpoint, {
|
|
@@ -6521,10 +6519,10 @@ async function handleCompletion(c) {
|
|
|
6521
6519
|
requestHeaders,
|
|
6522
6520
|
advisorModel: advisorChoice.model,
|
|
6523
6521
|
advisorEscalated: advisorChoice.escalated,
|
|
6524
|
-
advisorFastProfile: fastLeadAdvisor || cheapLeadAdvisor || cheapestLeadAdvisor
|
|
6522
|
+
advisorFastProfile: fastLeadAdvisor || cheapLeadAdvisor || cheapestLeadAdvisor,
|
|
6525
6523
|
advisorMaxProfile: maxAdvisorEnabled,
|
|
6526
|
-
advisorCheapProfile: cheapLeadAdvisor || cheapestLeadAdvisor
|
|
6527
|
-
advisorEffort: maxAdvisorChoice ? maxAdvisorChoice.effort : resolveAdvisorEffort(rawBody, advisorChoice.model, fastLeadAdvisor || cheapLeadAdvisor || cheapestLeadAdvisor
|
|
6524
|
+
advisorCheapProfile: cheapLeadAdvisor || cheapestLeadAdvisor,
|
|
6525
|
+
advisorEffort: maxAdvisorChoice ? maxAdvisorChoice.effort : resolveAdvisorEffort(rawBody, advisorChoice.model, fastLeadAdvisor || cheapLeadAdvisor || cheapestLeadAdvisor),
|
|
6528
6526
|
externalAborter: advisorAborter
|
|
6529
6527
|
}), {
|
|
6530
6528
|
status: response.status,
|
|
@@ -8140,4 +8138,4 @@ function getCodexEnvVars(serverUrl) {
|
|
|
8140
8138
|
//#endregion
|
|
8141
8139
|
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 };
|
|
8142
8140
|
|
|
8143
|
-
//# sourceMappingURL=server-setup-
|
|
8141
|
+
//# sourceMappingURL=server-setup-aZtjyebO.js.map
|