github-router 0.3.370 → 0.3.371
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/ado-tools-512UGB6R.js +1 -0
- package/dist/{attribution-settings-Cppl9atx.js → attribution-settings-Beer9wsJ.js} +5 -5
- package/dist/{attribution-settings-Cppl9atx.js.map → attribution-settings-Beer9wsJ.js.map} +1 -1
- package/dist/browser-ext/manifest.json +1 -1
- package/dist/{claude-B3qNFwtc.js → claude-CAYTTiyt.js} +9 -9
- package/dist/{claude-B3qNFwtc.js.map → claude-CAYTTiyt.js.map} +1 -1
- package/dist/{claude-md-injection-K3DKhsfI.js → claude-md-injection-D1aMjvb_.js} +2 -2
- package/dist/{claude-md-injection-K3DKhsfI.js.map → claude-md-injection-D1aMjvb_.js.map} +1 -1
- package/dist/{codex-3DEffjlm.js → codex-CALX-qG4.js} +5 -5
- package/dist/{codex-3DEffjlm.js.map → codex-CALX-qG4.js.map} +1 -1
- package/dist/engine-CSAEqj2p.js +1 -0
- package/dist/{gate-discovery-BV6UGGVd.js → gate-discovery-CITKjhsD.js} +2 -2
- package/dist/{gate-discovery-BV6UGGVd.js.map → gate-discovery-CITKjhsD.js.map} +1 -1
- package/dist/{internal-stop-hook-covotLvl.js → internal-stop-hook-DT27bzH7.js} +2 -2
- package/dist/{internal-stop-hook-covotLvl.js.map → internal-stop-hook-DT27bzH7.js.map} +1 -1
- package/dist/main.js +6 -6
- package/dist/{peer-mcp-personas-6zWkXHQW.js → peer-mcp-personas-D7vaM-V5.js} +352 -34
- package/dist/peer-mcp-personas-D7vaM-V5.js.map +1 -0
- package/dist/{pi-DJJlBHP9.js → pi-D4LrdubN.js} +6 -6
- package/dist/{pi-DJJlBHP9.js.map → pi-D4LrdubN.js.map} +1 -1
- package/dist/{provision-C_aTowyW.js → provision-DonGTIfK.js} +2 -2
- package/dist/{provision-C_aTowyW.js.map → provision-DonGTIfK.js.map} +1 -1
- package/dist/{serve-CfizTkRS.js → serve-jzmQ8KEE.js} +6 -6
- package/dist/{serve-CfizTkRS.js.map → serve-jzmQ8KEE.js.map} +1 -1
- package/dist/{server-setup-rm8ELtYa.js → server-setup-wWidNq5m.js} +20 -10
- package/dist/{server-setup-rm8ELtYa.js.map → server-setup-wWidNq5m.js.map} +1 -1
- package/dist/{start-D7RcHG8T.js → start-CTluQxu5.js} +3 -3
- package/dist/{start-D7RcHG8T.js.map → start-CTluQxu5.js.map} +1 -1
- package/dist/workiq-tools-CDLIrILp.js +1 -0
- package/package.json +1 -1
- package/dist/ado-tools-B5MNQMFs.js +0 -1
- package/dist/engine-C2YCclx0.js +0 -1
- package/dist/peer-mcp-personas-6zWkXHQW.js.map +0 -1
- package/dist/workiq-tools-BeTneKco.js +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-BSXeQEx8.js";
|
|
8
8
|
import { a as parseBoolEnv, c as runCommandCapture, i as killManagedTree, s as resolveExecutable, u as runCommandVoid } from "./exec-Bf8g_bIR.js";
|
|
9
9
|
import { c as FAST_PROFILE_MODELS, l as FAST_PROFILE_NATIVE_AGENT_NAMES, r as FAST_PROFILE_ADVISOR_MODEL } from "./fast-profile-contract-JOnZBgFB.js";
|
|
10
|
-
import { $ as buildAnthropicErrorEvent, $n as
|
|
10
|
+
import { $ as buildAnthropicErrorEvent, $n as UPSTREAM_FETCH_TIMEOUT_MS, An as parseJsonOrDiagnose, B as FAST_ADVISOR_TOOL_INSTRUCTIONS, Cn as assembleResponsesPayload, Ct as ADO_DEFAULT_TOOLSETS, D as toolbeltEnabled, Dn as createChatCompletions, En as createResponses, Et as agentToolsEnabled, F as ADVISOR_TOOL_INSTRUCTIONS, G as isAdvisorRequested, H as LOCAL_REVIEWER_ADVISOR_TOOL_INSTRUCTIONS, I as CHEAPEST_ADVISOR_TOOL_INSTRUCTIONS, In as normalizeCloudAgentEnvironment, J as resolveCuratedAdvisorModel, Jn as BUDGET_SMALL_FAST_SLUG, K as resolveAdvisorEffort, Kn as toolbeltPathOverride, L as CHEAPEST_REVIEWER_ADVISOR_TOOL_INSTRUCTIONS, Ln as normalizeKustoClusterUri, Mn as effectiveLocalProfile, N as searchWeb, Nn as normalizeOpenAIUsage, On as MAX_RESPONSE_BODY_BYTES, P as ADVISOR_INTERNAL_TOOL_NAME, Q as repairRejectedThinkingHistory, R as CHEAPLOCAL_ADVISOR_TOOL_INSTRUCTIONS, St as provisionAdoTools, Tn as resolveMcpToolTimeoutMs, U as buildAdvisorStream, V as LOCAL_ADVISOR_TOOL_INSTRUCTIONS, W as injectAdvisorTool, X as rememberThinkingHistoryRepair, Y as formatThinkingRepairDecline, Z as repairKnownThinkingHistory, _n as LAUNCH_BOUND_TOKEN_PREFIX, _r as CHEAP_PROFILE_SUBAGENT_CONTEXT_TOKENS, _t as provisionWorkiqTools, ar as upstreamAllowH2, at as EFFORT_ORDER, cn as shimDefaultsToXhigh, cr as catalogAdvertises1M, ct as clampEffort, dn as getTokenizerFromModel, dr as withOneMSuffixForLead, dt as normalizeAnthropicUsageInPlace, er as UPSTREAM_INACTIVITY_TIMEOUT_MS, et as buildOpenAIErrorEvent, fr as CHEAP_PROFILE_ADVISOR_CLIENT_MODEL, ft as handleMcpDelete, gn as createMessages, hn as countTokens, i as assertMcpToolSurfaceConsistent, it as relayAnthropicStream, jn as assertCopilotModelAllowed, kn as readResponseBodyCapped, ln as getTextTokenCount, lr as oneMContextDisabled, lt as anthropicUsageNormalizeDisabled, mn as localSessionId, mr as CHEAP_PROFILE_NATIVE_AGENT_NAMES, nr as isBudgetClaudeLead, nt as logStreamError, or as upstreamMaxConnections, ot as UNKNOWN_EFFORT_ANCHOR, pn as localBaseUrl, pr as CHEAP_PROFILE_MODELS, pt as handleMcpPost, q as resolveAdvisorModel, rt as readIteratorWithTimeout, sr as classifyMessagesRoute, st as bucketEffort, tr as generateRandomPort, tt as isControllerClosedError, un as getTokenCount, ur as withOneMSuffix, ut as createAnthropicUsageRewriteTransform, vn as findLaunchBySecret, wn as warnOnTokenPriceDrift, wt as normalizeAdoToolsets, xn as rememberLaunchSessionId, z as CHEAPLOCAL_REVIEWER_ADVISOR_TOOL_INSTRUCTIONS } from "./peer-mcp-personas-D7vaM-V5.js";
|
|
11
11
|
import { D as LOCAL_PROFILE_TIER_MODELS, F as CHEAPEST_PROFILE_NATIVE_AGENT_NAMES, P as CHEAPEST_PROFILE_MODELS, S as localContractFor, _ as isCheapestFamily, b as isPinnedLaunchProfile, f as balancedContractFor, g as isBalancedFamily, h as displayModelName, k as CHEAPEST_PROFILE_ADVISOR_CLIENT_MODEL, p as cheapestContractFor, x as local2AdvisorContract, y as isLocalFamily } from "./static-context-pack-DvwLWlbe.js";
|
|
12
12
|
import { i as BALANCED_PROFILE_NATIVE_AGENT_NAMES, r as BALANCED_PROFILE_MODELS } from "./balanced-profile-contract-Dm_usmw7.js";
|
|
13
13
|
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-CRj7N211.js";
|
|
@@ -3549,7 +3549,7 @@ function collectToolFieldKeys(body) {
|
|
|
3549
3549
|
//#endregion
|
|
3550
3550
|
//#region package.json
|
|
3551
3551
|
var name = "github-router";
|
|
3552
|
-
var version = "0.3.
|
|
3552
|
+
var version = "0.3.371";
|
|
3553
3553
|
//#endregion
|
|
3554
3554
|
//#region src/lib/approval.ts
|
|
3555
3555
|
const awaitApproval = async () => {
|
|
@@ -7737,7 +7737,8 @@ async function handleCompletion(c) {
|
|
|
7737
7737
|
const aicTap = localProfileRequest ? void 0 : createAnthropicAicTap((usage) => recordAic(resolvedModel, usage));
|
|
7738
7738
|
return new Response(response.body ? relayAnthropicStream(response.body, {
|
|
7739
7739
|
routePath: c.req.path,
|
|
7740
|
-
...aicTap ? { onBytes: aicTap.onBytes } : {}
|
|
7740
|
+
...aicTap ? { onBytes: aicTap.onBytes } : {},
|
|
7741
|
+
...anthropicUsageNormalizeDisabled() ? {} : { transform: createAnthropicUsageRewriteTransform() }
|
|
7741
7742
|
}) : null, {
|
|
7742
7743
|
status: response.status,
|
|
7743
7744
|
headers: streamHeaders
|
|
@@ -7746,6 +7747,7 @@ async function handleCompletion(c) {
|
|
|
7746
7747
|
const cappedResult = await readResponseBodyCapped(response, c.req.path, MAX_RESPONSE_BODY_BYTES);
|
|
7747
7748
|
if (!cappedResult.ok) return c.json(cappedResult.errorResponse, cappedResult.status);
|
|
7748
7749
|
const responseBody = cappedResult.value;
|
|
7750
|
+
if (!anthropicUsageNormalizeDisabled()) normalizeAnthropicUsageInPlace(responseBody.usage);
|
|
7749
7751
|
const usage = responseBody.usage;
|
|
7750
7752
|
const aicNano = localProfileRequest ? void 0 : extractAndRecordAic(resolvedModel, responseBody);
|
|
7751
7753
|
logRequest({
|
|
@@ -7886,12 +7888,20 @@ function clampOutputConfigEffortInPlace(body, model) {
|
|
|
7886
7888
|
* Sum native Claude `/v1/messages` usage into the TOTAL input-token figure
|
|
7887
7889
|
* `logRequest`'s context-window-fill display expects.
|
|
7888
7890
|
*
|
|
7889
|
-
*
|
|
7890
|
-
* OpenAI's inclusive total, it excludes both `cache_read_input_tokens`
|
|
7891
|
-
* `cache_creation_input_tokens
|
|
7892
|
-
* prompt size on
|
|
7893
|
-
*
|
|
7894
|
-
*
|
|
7891
|
+
* In the ANTHROPIC contract `input_tokens` is the NEW (uncached) portion ONLY —
|
|
7892
|
+
* unlike OpenAI's inclusive total, it excludes both `cache_read_input_tokens`
|
|
7893
|
+
* and `cache_creation_input_tokens` — so summing the three is what yields the
|
|
7894
|
+
* real prompt size on a cache hit. A conformant warm turn reports something
|
|
7895
|
+
* like `input_tokens: 26` with `cache_read_input_tokens: 97304`; the actual
|
|
7896
|
+
* prompt was ~97k tokens, not 26.
|
|
7897
|
+
*
|
|
7898
|
+
* Upstream does not always honour that contract: the local endpoint of session
|
|
7899
|
+
* `a1ab11a5` and the native Copilot path in session `ec65e3f9` reported
|
|
7900
|
+
* `input_tokens` INCLUSIVE of the cached prefix, so summing raw buckets there
|
|
7901
|
+
* double-counts it. Every call
|
|
7902
|
+
* site normalizes first (`normalizeAnthropicUsageInPlace` /
|
|
7903
|
+
* `createAnthropicUsageRewriteTransform`), which makes the three buckets
|
|
7904
|
+
* disjoint again and this sum correct on both paths. Returns `undefined` only when
|
|
7895
7905
|
* `usage` itself is absent, so the log line omits the field entirely rather
|
|
7896
7906
|
* than reporting a fabricated total (matching how `formatTokenInfo` treats an
|
|
7897
7907
|
* undefined `inputTokens`).
|
|
@@ -9572,4 +9582,4 @@ function getPiLaunchEnvVars(mirrorDir) {
|
|
|
9572
9582
|
//#endregion
|
|
9573
9583
|
export { updateClaude as $, CHEAP_EXPLORE_ALIAS_ID as A, formatFastPrerequisiteFailure as B, BALANCED_EXPLORE_ALIAS_ID as C, CHEAPEST_EXPLORE_ALIAS_ID as D, BROWSE_LOW_ALIAS_ID as E, MAX_BROWSE_LOW_ALIAS_ID as F, validateCheap1mProfilePrerequisites as G, profileDescriptor as H, formatBalancedPrerequisiteFailure as I, validateFastProfilePrerequisites as J, validateCheapProfilePrerequisites as K, formatCheap1mPrerequisiteFailure as L, CHEAP_PLAN_ALIAS_ID as M, CHEAP_REVIEWER_ALIAS_ID as N, CHEAPEST_GENERAL_PURPOSE_ALIAS_ID as O, LUNA_SCOUT_ALIAS_ID as P, checkClaudeVersion as Q, formatCheapPrerequisiteFailure as R, enableFileLogging as S, BALANCED_REVIEWER_ALIAS_ID as T, resolveLaunchProfile as U, formatLocalPrerequisiteFailure as V, validateBalancedProfilePrerequisites as W, validateMaxProfileLaunch as X, validateLocalProfilePrerequisites as Y, runSelfUpdate as Z, sweepStalePiAgentMirrors as _, setupAndServe as a, injectModelPickerSettingsFile as b, PI_MIN_VERSION as c, meetsPiMinVersion as d, refreshPiInBackground as f, removeOwnPiAgentMirror as g, ensurePiAgentMirror as h, parseSharedArgs as i, CHEAP_GENERAL_PURPOSE_ALIAS_ID as j, CHEAPEST_REVIEWER_ALIAS_ID as k, ensurePiInstalled as l, updatePi as m, getCodexEnvVars as n, sharedServerArgs as o, resolvePiRegistry as p, validateCheapestProfilePrerequisites as q, getPiLaunchEnvVars as r, LAUNCH_SECRET_HEADER as s, getClaudeCodeEnvVars as t, getInstalledPiVersion as u, startKeepAwake as v, BALANCED_GENERAL_PURPOSE_ALIAS_ID as w, listModelsForEndpoint as x, stopKeepAwake as y, formatCheapestPrerequisiteFailure as z };
|
|
9574
9584
|
|
|
9575
|
-
//# sourceMappingURL=server-setup-
|
|
9585
|
+
//# sourceMappingURL=server-setup-wWidNq5m.js.map
|