github-router 0.3.371 → 0.3.373

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.
Files changed (53) hide show
  1. package/dist/ado-tools-WDyisN8w.js +1 -0
  2. package/dist/{attribution-settings-Beer9wsJ.js → attribution-settings-DZ8fEfvP.js} +6 -6
  3. package/dist/{attribution-settings-Beer9wsJ.js.map → attribution-settings-DZ8fEfvP.js.map} +1 -1
  4. package/dist/browser-ext/manifest.json +1 -1
  5. package/dist/{claude-CAYTTiyt.js → claude-8ksmV0dC.js} +11 -11
  6. package/dist/claude-8ksmV0dC.js.map +1 -0
  7. package/dist/{claude-md-injection-D1aMjvb_.js → claude-md-injection-BnzVv_aB.js} +19 -22
  8. package/dist/claude-md-injection-BnzVv_aB.js.map +1 -0
  9. package/dist/{codex-CALX-qG4.js → codex-C89FoaaG.js} +6 -6
  10. package/dist/{codex-CALX-qG4.js.map → codex-C89FoaaG.js.map} +1 -1
  11. package/dist/engine-C207cikp.js +1 -0
  12. package/dist/{gate-discovery-CITKjhsD.js → gate-discovery-Bc9FdRwg.js} +2 -2
  13. package/dist/{gate-discovery-CITKjhsD.js.map → gate-discovery-Bc9FdRwg.js.map} +1 -1
  14. package/dist/hooks.mjs +45 -10
  15. package/dist/hooks.sha256 +1 -1
  16. package/dist/{index-cmd-CjRcmYk3.js → index-cmd-DOhwt92u.js} +2 -2
  17. package/dist/{index-cmd-CjRcmYk3.js.map → index-cmd-DOhwt92u.js.map} +1 -1
  18. package/dist/{internal-prompt-submit-bi7F7pKk.js → internal-prompt-submit-BW5g3MjD.js} +2 -2
  19. package/dist/{internal-prompt-submit-bi7F7pKk.js.map → internal-prompt-submit-BW5g3MjD.js.map} +1 -1
  20. package/dist/{internal-prompt-submit-B-kKTl-8.js → internal-prompt-submit-C4uDwr7G.js} +2 -2
  21. package/dist/{internal-rebrief-B6ZJS6Mp.js → internal-rebrief-DvBS8myn.js} +3 -3
  22. package/dist/{internal-rebrief-B6ZJS6Mp.js.map → internal-rebrief-DvBS8myn.js.map} +1 -1
  23. package/dist/{internal-stop-hook-DT27bzH7.js → internal-stop-hook-nS91Jkda.js} +2 -2
  24. package/dist/{internal-stop-hook-DT27bzH7.js.map → internal-stop-hook-nS91Jkda.js.map} +1 -1
  25. package/dist/main.js +9 -9
  26. package/dist/{peer-mcp-personas-D7vaM-V5.js → peer-mcp-personas-BSxDj9sJ.js} +266 -243
  27. package/dist/peer-mcp-personas-BSxDj9sJ.js.map +1 -0
  28. package/dist/{pi-D4LrdubN.js → pi-BglhJ6n_.js} +1031 -70
  29. package/dist/pi-BglhJ6n_.js.map +1 -0
  30. package/dist/{provision-DonGTIfK.js → provision-B0GNohdl.js} +34 -3
  31. package/dist/provision-B0GNohdl.js.map +1 -0
  32. package/dist/{serve-jzmQ8KEE.js → serve-BxZq9vNl.js} +8 -8
  33. package/dist/{serve-jzmQ8KEE.js.map → serve-BxZq9vNl.js.map} +1 -1
  34. package/dist/{server-setup-wWidNq5m.js → server-setup-BLdWCcby.js} +21 -18
  35. package/dist/server-setup-BLdWCcby.js.map +1 -0
  36. package/dist/{service-backend-B6D_DY1Z.js → service-backend-BV2hHjuB.js} +35 -17
  37. package/dist/service-backend-BV2hHjuB.js.map +1 -0
  38. package/dist/{start-CTluQxu5.js → start-C3Zb8XMT.js} +4 -4
  39. package/dist/{start-CTluQxu5.js.map → start-C3Zb8XMT.js.map} +1 -1
  40. package/dist/{static-context-pack-DvwLWlbe.js → static-context-pack-CsOAC87F.js} +98 -18
  41. package/dist/static-context-pack-CsOAC87F.js.map +1 -0
  42. package/dist/{workiq-tools-CDLIrILp.js → workiq-tools-C6LAF_vA.js} +1 -1
  43. package/package.json +2 -3
  44. package/dist/ado-tools-512UGB6R.js +0 -1
  45. package/dist/claude-CAYTTiyt.js.map +0 -1
  46. package/dist/claude-md-injection-D1aMjvb_.js.map +0 -1
  47. package/dist/engine-CSAEqj2p.js +0 -1
  48. package/dist/peer-mcp-personas-D7vaM-V5.js.map +0 -1
  49. package/dist/pi-D4LrdubN.js.map +0 -1
  50. package/dist/provision-DonGTIfK.js.map +0 -1
  51. package/dist/server-setup-wWidNq5m.js.map +0 -1
  52. package/dist/service-backend-B6D_DY1Z.js.map +0 -1
  53. package/dist/static-context-pack-DvwLWlbe.js.map +0 -1
@@ -1,4 +1,4 @@
1
- import { A as validateWorkspace, C as provisionColbert, D as colbertPlatformSupported, F as outlineFile, M as isSensitivePath, N as recommendedRgThreads, O as resolveRipgrep, S as colbertSmokeOk, _ as gitState, d as runSemanticSearch, f as startupKickAllowed, j as confineToWorkspaceResult, k as searchCode, o as serviceBackendEnabled, r as runServiceSearch, u as kickBackgroundInit, x as colbertArtifactsPresent, y as readColbertMeta } from "./service-backend-B6D_DY1Z.js";
1
+ import { A as validateWorkspace, C as provisionColbert, D as colbertPlatformSupported, F as outlineFile, M as isSensitivePath, N as recommendedRgThreads, O as resolveRipgrep, S as colbertSmokeOk, _ as gitState, d as runSemanticSearch, f as startupKickAllowed, j as confineToWorkspaceResult, k as searchCode, o as serviceBackendEnabled, r as runServiceSearch, u as kickBackgroundInit, x as colbertArtifactsPresent, y as readColbertMeta } from "./service-backend-BV2hHjuB.js";
2
2
  import { n as explicitPackageRoot } from "./package-root-B-osctCk.js";
3
3
  import { t as getPackageVersion } from "./version-C8x2hQrZ.js";
4
4
  import { t as PATHS } from "./paths-C5477RGC.js";
@@ -7,7 +7,7 @@ import { C as copilotHeaders, E as githubAgentHeaders, S as copilotBaseUrl, T as
7
7
  import { a as withTransientRetry, i as sanitizeTransportText, n as classifyTransportError, r as fetchWithTransientRetry } from "./upstream-retry-i1k1Xai2.js";
8
8
  import { a as parseBoolEnv, d as runManagedExeCapture, o as parseIntEnv, s as resolveExecutable } from "./exec-Bf8g_bIR.js";
9
9
  import { a as FAST_PROFILE_ASTRA_MODEL, c as FAST_PROFILE_MODELS, d as FAST_PROFILE_NATIVE_MODELS, f as FAST_PROFILE_ORACLE_EFFORT, n as FAST_PROFILE_ADVISOR_EFFORT, p as FAST_PROFILE_ORACLE_MODEL, r as FAST_PROFILE_ADVISOR_MODEL, u as FAST_PROFILE_NATIVE_EFFORTS } from "./fast-profile-contract-JOnZBgFB.js";
10
- import { A as CHEAPEST_PROFILE_ADVISOR_MODEL, C as BALANCED2_PROFILE_MODELS, M as CHEAPEST_PROFILE_ADVISOR_TRANSCRIPT_TOKENS_MAX, N as CHEAPEST_PROFILE_ADVISOR_TRANSCRIPT_TOKENS_MIN, O as CHEAPEST2_PROFILE_MODELS, P as CHEAPEST_PROFILE_MODELS, S as localContractFor, _ as isCheapestFamily, a as decidePromptSubmitV2, b as isPinnedLaunchProfile, c as CHEAPEST_REWRITE_EFFORT, f as balancedContractFor, g as isBalancedFamily, h as displayModelName, j as CHEAPEST_PROFILE_ADVISOR_TRANSCRIPT_TOKENS_DEFAULT, m as cheapestRewriteModelFor, p as cheapestContractFor, t as buildStaticPack, u as isCheapestRewriteDisabledEnv, v as isCheaplocalProfile, w as LOCAL_PROFILE_LEAD_MODEL, y as isLocalFamily } from "./static-context-pack-DvwLWlbe.js";
10
+ import { A as CHEAPEST2_PROFILE_MODELS, C as localContractFor, F as CHEAPEST_PROFILE_ADVISOR_TRANSCRIPT_TOKENS_MIN, I as CHEAPEST_PROFILE_MODELS, M as CHEAPEST_PROFILE_ADVISOR_MODEL, N as CHEAPEST_PROFILE_ADVISOR_TRANSCRIPT_TOKENS_DEFAULT, P as CHEAPEST_PROFILE_ADVISOR_TRANSCRIPT_TOKENS_MAX, T as LOCAL_PROFILE_LEAD_MODEL, _ as isBalancedFamily, a as decidePromptSubmitV2, b as isLocalFamily, c as CHEAPEST_REWRITE_EFFORT, f as balancedContractFor, g as displayModelName, h as consultIsLocalTransport, k as LOCAL_CONSULT_MAX_OUTPUT_TOKENS, m as cheapestRewriteModelFor, p as cheapestContractFor, t as buildStaticPack, u as isCheapestRewriteDisabledEnv, v as isCheapestFamily, w as BALANCED2_PROFILE_MODELS, x as isPinnedLaunchProfile, y as isCheaplocalProfile } from "./static-context-pack-CsOAC87F.js";
11
11
  import { r as BALANCED_PROFILE_MODELS } from "./balanced-profile-contract-Dm_usmw7.js";
12
12
  import { A as normalizeTrailingOneMSuffix, D as maxPeerInstructions, E as maxPeerDescription, O as fastEndpointForCatalogId, b as MAX_ADVISOR_SYSTEM_PROMPT, f as maxCodexReviewerModel, g as maxProReplacementModel, h as maxOpusModel, i as MAX_PROFILE_MODELS, k as fastEndpointForModel, m as maxGrokModel, p as maxGeminiModel, r as MAX_PROFILE_LEAD_MODEL, v as maxSonnetModel } from "./max-profile-contract-CRj7N211.js";
13
13
  import { i as registerExitHandlers$1, n as getInstanceUuid, r as recordWorkerRepo, t as WorktreeRegistry } from "./lifecycle-Gge2Dadd.js";
@@ -5912,6 +5912,195 @@ async function verifyAndConsumeApproval(args) {
5912
5912
  return { ok: true };
5913
5913
  });
5914
5914
  }
5915
+ //#endregion
5916
+ //#region src/lib/copilot-model-policy.ts
5917
+ /**
5918
+ * Which Copilot models a running proxy is allowed to bill.
5919
+ *
5920
+ * A `-m local` / `-m local2` launch exists so that the agent's work runs on the
5921
+ * operator's own inference endpoint. The profiles keep the whole Claude Code
5922
+ * surface (native subagents, agent-team teammates, every CLI feature) but every
5923
+ * one of those turns must land on that endpoint, not on Copilot.
5924
+ *
5925
+ * Prompting cannot enforce that. A teammate's model is whatever its frontmatter
5926
+ * or the client's tier picker says, and a runtime `/model` switch can name any
5927
+ * catalog id. So the restriction lives here, at the Copilot egress: the three
5928
+ * functions that talk to Copilot (`createResponses`, `createChatCompletions`,
5929
+ * and the non-local branch of `createMessages`/`countTokens`) consult
5930
+ * `assertCopilotModelAllowed` before they build a request. Everything that can
5931
+ * reach Copilot funnels through them — the `/v1/*` routes, the peer personas,
5932
+ * `stand_in`, the orchestration tools, and the Pi worker runtime (whose
5933
+ * `stream-fn` imports the same services).
5934
+ *
5935
+ * `local` allows no Copilot model inference on an agent turn at all. `local2`
5936
+ * allows the two families `sol` and `luna`. The non-model Copilot services are
5937
+ * untouched: `web` search goes through Copilot's MCP endpoint with the GitHub
5938
+ * PAT, and the browser tools drive a local extension.
5939
+ *
5940
+ * `cheaplocal` is the mirror image: its lead and every native stay on Copilot,
5941
+ * and only its Advisor and Oracle leave. It therefore caps Copilot egress to the
5942
+ * same two families without being a local launch: `activeLocalLaunchProfile`
5943
+ * ignores it, because returning it would send the whole main loop to the local
5944
+ * endpoint.
5945
+ *
5946
+ * The one model-backed exception is the browser page compressor, which runs on
5947
+ * both profiles so the compound browse tools can answer at all. It is exempt
5948
+ * from the profile ceiling entirely and bounded by its own fixed chain instead;
5949
+ * see `CopilotEgressSurface`.
5950
+ */
5951
+ /**
5952
+ * The hardcoded Copilot allow-list for `-m local2`: the Advisor and the Oracle
5953
+ * both run on `gpt-6.1-sol`, and `luna` is the cheap tier of the same declared
5954
+ * ceiling. Anything else a teammate or a `/model` switch names is refused.
5955
+ *
5956
+ * `luna`'s one Copilot consumer on this profile is the browser page
5957
+ * compressor, whose fixed chain falls back to `gpt-6-luna` when
5958
+ * `gpt-5.4-mini` is absent from the catalog. That surface is exempt from the
5959
+ * ceiling, so the entry is not what admits it; it keeps the two lists agreeing
5960
+ * if the exemption ever narrows. No other local surface selects Luna: no local
5961
+ * launch publishes the `workers` group. The ceiling stays an operator
5962
+ * decision, so moving it later is a policy change rather than a code change.
5963
+ *
5964
+ * `cheaplocal` shares the set for the same reason: its lead and natives are
5965
+ * Luna, its Copilot rewrite is Sol, and its consultants are not Copilot calls
5966
+ * at all.
5967
+ */
5968
+ const LOCAL2_COPILOT_MODEL_FAMILIES = /* @__PURE__ */ new Set(["sol", "luna"]);
5969
+ /** The policy a launch profile imposes on Copilot egress. Every profile other
5970
+ * than the local pair and `cheaplocal` is unrestricted. */
5971
+ function copilotModelPolicyForProfile(profileId) {
5972
+ if (profileId === "local") return {
5973
+ kind: "forbidden",
5974
+ profileId
5975
+ };
5976
+ if (profileId === "local2" || profileId === "cheaplocal") return {
5977
+ kind: "families",
5978
+ profileId,
5979
+ families: LOCAL2_COPILOT_MODEL_FAMILIES
5980
+ };
5981
+ return { kind: "unrestricted" };
5982
+ }
5983
+ /**
5984
+ * The policy in force for this process.
5985
+ *
5986
+ * Derived from the live launch registry rather than a mutable global: the
5987
+ * proxy and the `claude` launch that fronts it share a process, so the
5988
+ * registered launches ARE the set of sessions whose traffic can arrive here.
5989
+ * Requests that never passed the identity preflight (a BYO client pointed at
5990
+ * `github-router start`) still funnel through the same egress, which is why
5991
+ * this is process-wide rather than per-request.
5992
+ *
5993
+ * Most restrictive wins: if a `local` launch is registered at the same time as
5994
+ * a `local2` one, Copilot inference is forbidden outright. Registering both in
5995
+ * one process is not a supported arrangement, and resolving the ambiguity
5996
+ * toward the stricter profile is the fail-closed direction.
5997
+ */
5998
+ function activeCopilotModelPolicy() {
5999
+ let active = { kind: "unrestricted" };
6000
+ for (const entry of state.launchRegistry.values()) {
6001
+ const policy = copilotModelPolicyForProfile(entry.profileId);
6002
+ if (policy.kind === "forbidden") return policy;
6003
+ if (policy.kind === "families") active = policy;
6004
+ }
6005
+ return active;
6006
+ }
6007
+ /** The local-family profile this process is serving, if any. Used by the
6008
+ * `/v1/messages` routes to send traffic that carries no launch identity to
6009
+ * the local endpoint rather than to Copilot.
6010
+ *
6011
+ * A restricted policy is not enough: `cheaplocal` caps Copilot egress to the
6012
+ * same families as `local2` while keeping its whole main loop on Copilot.
6013
+ * Returning it here would route that loop to the local endpoint, so only an
6014
+ * actual local-family id answers. */
6015
+ function activeLocalLaunchProfile() {
6016
+ const policy = activeCopilotModelPolicy();
6017
+ if (policy.kind === "unrestricted") return void 0;
6018
+ if (policy.kind === "forbidden") return policy.profileId;
6019
+ return isLocalFamily(policy.profileId) ? policy.profileId : void 0;
6020
+ }
6021
+ /**
6022
+ * Effective local profile for one request.
6023
+ *
6024
+ * A bound identity wins: a request authenticated as `local`/`local2` is local,
6025
+ * and one authenticated as any other profile keeps that profile's behaviour
6026
+ * even when a local launch shares the process. Only an identity-less request
6027
+ * falls back to the process-wide answer, which is the case `-m local` needs:
6028
+ * a spawned teammate that lost its launch header still has to reach the local
6029
+ * endpoint instead of being answered by Copilot.
6030
+ */
6031
+ function effectiveLocalProfile(boundProfileId) {
6032
+ if (isLocalFamily(boundProfileId)) return boundProfileId;
6033
+ if (boundProfileId !== void 0 && boundProfileId !== null) return void 0;
6034
+ return activeLocalLaunchProfile();
6035
+ }
6036
+ /**
6037
+ * The family token of a Copilot model id: the trailing dash-separated segment,
6038
+ * lowercased, after removing a `[1m]` accounting suffix and any `-1m` sibling
6039
+ * marker. `gpt-6.1-sol` → `sol`, `gpt-6-luna` → `luna`,
6040
+ * `gemini-3.1-pro-preview` → `preview`, `claude-opus-5.5` → `5.5`.
6041
+ *
6042
+ * Matching on the tier token rather than a prefix keeps the allow-list honest:
6043
+ * `gpt-5.6-sol`, `gpt-6-sol` and `gpt-6.1-sol` are one family, while
6044
+ * `gpt-6-sol-like` is not silently admitted.
6045
+ */
6046
+ function copilotModelFamily(modelId) {
6047
+ return (modelId.trim().replace(/\[[^\]]*\]$/, "").replace(/-1m$/i, "").split("-").at(-1) ?? "").toLowerCase();
6048
+ }
6049
+ /** Whether `modelId` may be sent to Copilot under `policy`. */
6050
+ function isCopilotModelAllowedUnder(policy, modelId, surface) {
6051
+ if (surface === "browse") return true;
6052
+ if (policy.kind === "unrestricted") return true;
6053
+ if (policy.kind === "forbidden") return false;
6054
+ return policy.families.has(copilotModelFamily(modelId));
6055
+ }
6056
+ /** Whether `modelId` may be sent to Copilot in this process right now. */
6057
+ function isCopilotModelAllowed(modelId, surface) {
6058
+ return isCopilotModelAllowedUnder(activeCopilotModelPolicy(), modelId, surface);
6059
+ }
6060
+ /** Raised when a request names a Copilot model the active policy refuses.
6061
+ * Carries `model` and the active policy so a caller can turn it into an
6062
+ * actionable `isError` rather than a bare 500. */
6063
+ var CopilotModelRestrictedError = class extends Error {
6064
+ model;
6065
+ policy;
6066
+ constructor(model, policy) {
6067
+ const source = policy.kind === "unrestricted" ? "the active policy" : `the \`-m ${policy.profileId}\` profile`;
6068
+ const allowed = policy.kind === "families" ? ` Only ${[...policy.families].sort().join(", ")} families are allowed.` : " No Copilot model inference is allowed for this profile.";
6069
+ super(`Model ${model} cannot be used: ${source} does not permit it on Copilot.${allowed}` + (policy.kind === "forbidden" ? " Run the work on the local endpoint instead, or relaunch as `-m local2` to allow the Advisor and Oracle families." : ""));
6070
+ this.name = "CopilotModelRestrictedError";
6071
+ this.model = model;
6072
+ this.policy = policy;
6073
+ }
6074
+ };
6075
+ /** Throw unless `modelId` is permitted. Called at every Copilot egress. */
6076
+ function assertCopilotModelAllowed(modelId, surface) {
6077
+ const policy = activeCopilotModelPolicy();
6078
+ if (!isCopilotModelAllowedUnder(policy, modelId, surface)) throw new CopilotModelRestrictedError(modelId, policy);
6079
+ }
6080
+ /**
6081
+ * Same guard for callers that hold a serialized request body rather than a
6082
+ * resolved model id (`createMessages` / `countTokens` take the body as a
6083
+ * string). Parsing is deferred behind the policy check so the common
6084
+ * unrestricted path pays one registry scan and no JSON work.
6085
+ *
6086
+ * A restrictive policy fails closed on an unparseable body: there is no model
6087
+ * to inspect, so there is no basis for letting the request through.
6088
+ */
6089
+ function assertCopilotMessagesBodyAllowed(body) {
6090
+ if (activeCopilotModelPolicy().kind === "unrestricted") return;
6091
+ let model;
6092
+ try {
6093
+ const parsed = JSON.parse(body);
6094
+ if (parsed && typeof parsed === "object" && "model" in parsed) {
6095
+ const raw = parsed.model;
6096
+ if (typeof raw === "string") model = raw;
6097
+ }
6098
+ } catch {
6099
+ model = void 0;
6100
+ }
6101
+ if (model === void 0) throw new CopilotModelRestrictedError("<unparseable body>", activeCopilotModelPolicy());
6102
+ assertCopilotModelAllowed(model);
6103
+ }
5915
6104
  const TIER_CHAINS = {
5916
6105
  T0: [
5917
6106
  "gemini-3.5-flash",
@@ -6013,6 +6202,10 @@ function classifierSystemPrompt(system, schemaHint) {
6013
6202
  async function microClassify(opts) {
6014
6203
  const model = resolveTierModel("T0");
6015
6204
  if (!model) return null;
6205
+ if (!isCopilotModelAllowed(model)) {
6206
+ consola.debug(`first-mate classifier skipped: ${model} is not permitted on this launch`);
6207
+ return null;
6208
+ }
6016
6209
  let response;
6017
6210
  try {
6018
6211
  response = await fetch(`${copilotBaseUrl(state)}/chat/completions`, {
@@ -11244,6 +11437,10 @@ const SYSTEM_PROMPT = "You are a SHADOW judge for a GitHub coding-agent controll
11244
11437
  const defaultTier1Judge = async (req, opts) => {
11245
11438
  const model = resolveTierModel("T1", opts);
11246
11439
  if (!model) return null;
11440
+ if (!isCopilotModelAllowed(model)) {
11441
+ consola.debug(`first-mate Tier1 judge skipped: ${model} is not permitted on this launch`);
11442
+ return null;
11443
+ }
11247
11444
  const user = JSON.stringify({
11248
11445
  kind: req.kind,
11249
11446
  trusted: {
@@ -18781,191 +18978,6 @@ function applyClaudeCachePolicy(rawBody, opts) {
18781
18978
  return JSON.stringify(body);
18782
18979
  }
18783
18980
  //#endregion
18784
- //#region src/lib/copilot-model-policy.ts
18785
- /**
18786
- * Which Copilot models a running proxy is allowed to bill.
18787
- *
18788
- * A `-m local` / `-m local2` launch exists so that the agent's work runs on the
18789
- * operator's own inference endpoint. The profiles keep the whole Claude Code
18790
- * surface (native subagents, agent-team teammates, every CLI feature) but every
18791
- * one of those turns must land on that endpoint, not on Copilot.
18792
- *
18793
- * Prompting cannot enforce that. A teammate's model is whatever its frontmatter
18794
- * or the client's tier picker says, and a runtime `/model` switch can name any
18795
- * catalog id. So the restriction lives here, at the Copilot egress: the three
18796
- * functions that talk to Copilot (`createResponses`, `createChatCompletions`,
18797
- * and the non-local branch of `createMessages`/`countTokens`) consult
18798
- * `assertCopilotModelAllowed` before they build a request. Everything that can
18799
- * reach Copilot funnels through them — the `/v1/*` routes, the peer personas,
18800
- * `stand_in`, the orchestration tools, and the Pi worker runtime (whose
18801
- * `stream-fn` imports the same services).
18802
- *
18803
- * `local` allows no Copilot model inference on an agent turn at all. `local2`
18804
- * allows the two families `sol` and `luna`. The non-model Copilot services are
18805
- * untouched: `web` search goes through Copilot's MCP endpoint with the GitHub
18806
- * PAT, and the browser tools drive a local extension.
18807
- *
18808
- * `cheaplocal` is the mirror image: its lead and every native stay on Copilot,
18809
- * and only its Advisor and Oracle leave. It therefore caps Copilot egress to the
18810
- * same two families without being a local launch: `activeLocalLaunchProfile`
18811
- * ignores it, because returning it would send the whole main loop to the local
18812
- * endpoint.
18813
- *
18814
- * The one model-backed exception is the browser page compressor, which runs on
18815
- * both profiles so the compound browse tools can answer at all. It is exempt
18816
- * from the profile ceiling entirely and bounded by its own fixed chain instead;
18817
- * see `CopilotEgressSurface`.
18818
- */
18819
- /**
18820
- * The hardcoded Copilot allow-list for `-m local2`: the Advisor and the Oracle
18821
- * both run on `gpt-6.1-sol`, and `luna` is the cheap tier of the same declared
18822
- * ceiling. Anything else a teammate or a `/model` switch names is refused.
18823
- *
18824
- * `luna`'s one Copilot consumer on this profile is the browser page
18825
- * compressor, whose fixed chain falls back to `gpt-6-luna` when
18826
- * `gpt-5.4-mini` is absent from the catalog. That surface is exempt from the
18827
- * ceiling, so the entry is not what admits it; it keeps the two lists agreeing
18828
- * if the exemption ever narrows. No other local surface selects Luna: no local
18829
- * launch publishes the `workers` group. The ceiling stays an operator
18830
- * decision, so moving it later is a policy change rather than a code change.
18831
- *
18832
- * `cheaplocal` shares the set for the same reason: its lead and natives are
18833
- * Luna, its Copilot rewrite is Sol, and its consultants are not Copilot calls
18834
- * at all.
18835
- */
18836
- const LOCAL2_COPILOT_MODEL_FAMILIES = /* @__PURE__ */ new Set(["sol", "luna"]);
18837
- /** The policy a launch profile imposes on Copilot egress. Every profile other
18838
- * than the local pair and `cheaplocal` is unrestricted. */
18839
- function copilotModelPolicyForProfile(profileId) {
18840
- if (profileId === "local") return {
18841
- kind: "forbidden",
18842
- profileId
18843
- };
18844
- if (profileId === "local2" || profileId === "cheaplocal") return {
18845
- kind: "families",
18846
- profileId,
18847
- families: LOCAL2_COPILOT_MODEL_FAMILIES
18848
- };
18849
- return { kind: "unrestricted" };
18850
- }
18851
- /**
18852
- * The policy in force for this process.
18853
- *
18854
- * Derived from the live launch registry rather than a mutable global: the
18855
- * proxy and the `claude` launch that fronts it share a process, so the
18856
- * registered launches ARE the set of sessions whose traffic can arrive here.
18857
- * Requests that never passed the identity preflight (a BYO client pointed at
18858
- * `github-router start`) still funnel through the same egress, which is why
18859
- * this is process-wide rather than per-request.
18860
- *
18861
- * Most restrictive wins: if a `local` launch is registered at the same time as
18862
- * a `local2` one, Copilot inference is forbidden outright. Registering both in
18863
- * one process is not a supported arrangement, and resolving the ambiguity
18864
- * toward the stricter profile is the fail-closed direction.
18865
- */
18866
- function activeCopilotModelPolicy() {
18867
- let active = { kind: "unrestricted" };
18868
- for (const entry of state.launchRegistry.values()) {
18869
- const policy = copilotModelPolicyForProfile(entry.profileId);
18870
- if (policy.kind === "forbidden") return policy;
18871
- if (policy.kind === "families") active = policy;
18872
- }
18873
- return active;
18874
- }
18875
- /** The local-family profile this process is serving, if any. Used by the
18876
- * `/v1/messages` routes to send traffic that carries no launch identity to
18877
- * the local endpoint rather than to Copilot.
18878
- *
18879
- * A restricted policy is not enough: `cheaplocal` caps Copilot egress to the
18880
- * same families as `local2` while keeping its whole main loop on Copilot.
18881
- * Returning it here would route that loop to the local endpoint, so only an
18882
- * actual local-family id answers. */
18883
- function activeLocalLaunchProfile() {
18884
- const policy = activeCopilotModelPolicy();
18885
- if (policy.kind === "unrestricted") return void 0;
18886
- if (policy.kind === "forbidden") return policy.profileId;
18887
- return isLocalFamily(policy.profileId) ? policy.profileId : void 0;
18888
- }
18889
- /**
18890
- * Effective local profile for one request.
18891
- *
18892
- * A bound identity wins: a request authenticated as `local`/`local2` is local,
18893
- * and one authenticated as any other profile keeps that profile's behaviour
18894
- * even when a local launch shares the process. Only an identity-less request
18895
- * falls back to the process-wide answer, which is the case `-m local` needs:
18896
- * a spawned teammate that lost its launch header still has to reach the local
18897
- * endpoint instead of being answered by Copilot.
18898
- */
18899
- function effectiveLocalProfile(boundProfileId) {
18900
- if (isLocalFamily(boundProfileId)) return boundProfileId;
18901
- if (boundProfileId !== void 0 && boundProfileId !== null) return void 0;
18902
- return activeLocalLaunchProfile();
18903
- }
18904
- /**
18905
- * The family token of a Copilot model id: the trailing dash-separated segment,
18906
- * lowercased, after removing a `[1m]` accounting suffix and any `-1m` sibling
18907
- * marker. `gpt-6.1-sol` → `sol`, `gpt-6-luna` → `luna`,
18908
- * `gemini-3.1-pro-preview` → `preview`, `claude-opus-5.5` → `5.5`.
18909
- *
18910
- * Matching on the tier token rather than a prefix keeps the allow-list honest:
18911
- * `gpt-5.6-sol`, `gpt-6-sol` and `gpt-6.1-sol` are one family, while
18912
- * `gpt-6-sol-like` is not silently admitted.
18913
- */
18914
- function copilotModelFamily(modelId) {
18915
- return (modelId.trim().replace(/\[[^\]]*\]$/, "").replace(/-1m$/i, "").split("-").at(-1) ?? "").toLowerCase();
18916
- }
18917
- /** Whether `modelId` may be sent to Copilot under `policy`. */
18918
- function isCopilotModelAllowedUnder(policy, modelId, surface) {
18919
- if (surface === "browse") return true;
18920
- if (policy.kind === "unrestricted") return true;
18921
- if (policy.kind === "forbidden") return false;
18922
- return policy.families.has(copilotModelFamily(modelId));
18923
- }
18924
- /** Raised when a request names a Copilot model the active policy refuses.
18925
- * Carries `model` and the active policy so a caller can turn it into an
18926
- * actionable `isError` rather than a bare 500. */
18927
- var CopilotModelRestrictedError = class extends Error {
18928
- model;
18929
- policy;
18930
- constructor(model, policy) {
18931
- const source = policy.kind === "unrestricted" ? "the active policy" : `the \`-m ${policy.profileId}\` profile`;
18932
- const allowed = policy.kind === "families" ? ` Only ${[...policy.families].sort().join(", ")} families are allowed.` : " No Copilot model inference is allowed for this profile.";
18933
- super(`Model ${model} cannot be used: ${source} does not permit it on Copilot.${allowed}` + (policy.kind === "forbidden" ? " Run the work on the local endpoint instead, or relaunch as `-m local2` to allow the Advisor and Oracle families." : ""));
18934
- this.name = "CopilotModelRestrictedError";
18935
- this.model = model;
18936
- this.policy = policy;
18937
- }
18938
- };
18939
- /** Throw unless `modelId` is permitted. Called at every Copilot egress. */
18940
- function assertCopilotModelAllowed(modelId, surface) {
18941
- const policy = activeCopilotModelPolicy();
18942
- if (!isCopilotModelAllowedUnder(policy, modelId, surface)) throw new CopilotModelRestrictedError(modelId, policy);
18943
- }
18944
- /**
18945
- * Same guard for callers that hold a serialized request body rather than a
18946
- * resolved model id (`createMessages` / `countTokens` take the body as a
18947
- * string). Parsing is deferred behind the policy check so the common
18948
- * unrestricted path pays one registry scan and no JSON work.
18949
- *
18950
- * A restrictive policy fails closed on an unparseable body: there is no model
18951
- * to inspect, so there is no basis for letting the request through.
18952
- */
18953
- function assertCopilotMessagesBodyAllowed(body) {
18954
- if (activeCopilotModelPolicy().kind === "unrestricted") return;
18955
- let model;
18956
- try {
18957
- const parsed = JSON.parse(body);
18958
- if (parsed && typeof parsed === "object" && "model" in parsed) {
18959
- const raw = parsed.model;
18960
- if (typeof raw === "string") model = raw;
18961
- }
18962
- } catch {
18963
- model = void 0;
18964
- }
18965
- if (model === void 0) throw new CopilotModelRestrictedError("<unparseable body>", activeCopilotModelPolicy());
18966
- assertCopilotModelAllowed(model);
18967
- }
18968
- //#endregion
18969
18981
  //#region src/lib/vision-preflight.ts
18970
18982
  /**
18971
18983
  * Outbound vision handling.
@@ -26544,17 +26556,6 @@ async function countTokens(body, extraHeaders, callerSignal, retryTransient = fa
26544
26556
  return response;
26545
26557
  }
26546
26558
  const LOCAL_DEFAULT_BASE_URL = `https://localhost:11111/v1`;
26547
- /**
26548
- * Output cap for a local consultant turn (Advisor and Oracle).
26549
- *
26550
- * One number for both, and deliberately a small one: a consultant answers a
26551
- * single question, and every larger value would be a claim about how much room
26552
- * the model behind the endpoint has. The Copilot paths keep their own
26553
- * catalog-derived budgets; this is only ever the catalog-less fallback, so a
26554
- * launch whose consultants left Copilot is no worse off than the branch that
26555
- * existed before it.
26556
- */
26557
- const LOCAL_CONSULT_MAX_OUTPUT_TOKENS = 4096;
26558
26559
  let cliOverride;
26559
26560
  let warnedInert = false;
26560
26561
  function trimTrailingSlashes(value) {
@@ -26685,8 +26686,13 @@ function localSessionId(c, launchSessionId) {
26685
26686
  *
26686
26687
  * `output_config.effort` is the exception, and it is not a claim: it is the
26687
26688
  * same Anthropic spelling Claude Code itself sends, and it states what the
26688
- * operator asked for (`LOCAL_CONSULT_EFFORT`) rather than what the endpoint is.
26689
- * The proxy does not clamp it against a reasoning ladder it has never read.
26689
+ * profile DECLARED for this consult rather than what the endpoint is. The proxy
26690
+ * does not clamp it against a reasoning ladder it has never read.
26691
+ *
26692
+ * `effort` is therefore a parameter, not a constant read in here. The value is
26693
+ * declared on the profile contract (`oracleEffort` / `advisorEffort`) and this
26694
+ * function must send the declaration rather than a second copy of it: a copy is
26695
+ * exactly how the wire came to say `max` while `local`'s contract said `high`.
26690
26696
  *
26691
26697
  * `maxTokens` is a caller decision rather than a constant here so the two
26692
26698
  * consultants can keep their own budgets; both pass the catalog-less fallback,
@@ -26709,7 +26715,7 @@ async function sendLocalMessages(req) {
26709
26715
  role: "user",
26710
26716
  content: req.userText
26711
26717
  }],
26712
- output_config: { effort: "max" }
26718
+ output_config: { effort: req.effort }
26713
26719
  }), {}, req.signal, false, req.egress)).json();
26714
26720
  const blocks = Array.isArray(json.content) ? json.content : [];
26715
26721
  const texts = [];
@@ -27544,10 +27550,11 @@ function cheapestAdvisorModel(profileId) {
27544
27550
  * present, serve enough prompt/window for the family's subagent budget, offer
27545
27551
  * the contract's effort, and route over `/responses`.
27546
27552
  *
27547
- * The local profiles use it too. Their LEAD turns go to the local endpoint, but
27548
- * the Oracle is still a Copilot persona, so it is gated against the live
27549
- * catalog exactly like the cheapest family's rather than falling back to the
27550
- * fast-profile default.
27553
+ * This is the COPILOT gate and nothing else: a contract whose consult runs
27554
+ * locally (`cheaplocal`, and `local` since its Oracle moved to the lead's own
27555
+ * endpoint) must not reach it at all, because there is no slug to look up. The
27556
+ * two callers branch on `consultTransport` first — `cheapestFamilyOracleGate`
27557
+ * and `localOracleModel` — so this function stays one job.
27551
27558
  */
27552
27559
  function familyOracleModelFor(contract) {
27553
27560
  const found = state.models?.data.find((m) => m.id === contract.oracleModel);
@@ -27564,22 +27571,34 @@ function cheapestOracleModel(profileId) {
27564
27571
  return familyOracleModelFor(cheapestContractFor(profileId));
27565
27572
  }
27566
27573
  /**
27567
- * Oracle gate for `cheaplocal`, whose Oracle is a local consult.
27574
+ * Oracle gate for a local consult: `local` and `cheaplocal`.
27568
27575
  *
27569
- * Always true, and it says nothing about a catalog because there is nothing to
27570
- * check: the persona resolves no Copilot slug, sends no catalog-derived
27571
- * effort, and routes no `/responses` call. Running `familyOracleModelFor`
27572
- * here would DROP the tool on
27573
- * any catalog that happens not to carry an Opus row, and would gate a local
27574
- * consult on a Copilot model's window, which is exactly the assumption this
27575
- * profile refuses to make. The launch's own `allowedPersonas` still gates it.
27576
+ * Answers the sentinel rather than a slug, and says nothing about a catalog
27577
+ * because there is nothing to check. Running the catalog gate here would DROP
27578
+ * the tool on any catalog that happens not to carry an Opus row, and would gate
27579
+ * a local consult on a Copilot model's window, which is exactly the assumption
27580
+ * these profiles refuse to make. The launch's own `allowedPersonas` still gates
27581
+ * it.
27576
27582
  */
27577
27583
  function cheaplocalOracleModel() {
27578
27584
  return true;
27579
27585
  }
27580
- /** Copilot-served Oracle for `local` / `local2` at the 200K default window. */
27586
+ /**
27587
+ * Oracle gate for the `local` family, whose two transports need different
27588
+ * checks.
27589
+ *
27590
+ * `local` consults the endpoint its lead already uses: no Copilot slug is
27591
+ * resolved and no `/responses` call is routed, so every check in
27592
+ * `familyOracleModelFor` would be a gate on a model that is not answering — an
27593
+ * Opus row missing from the catalog would DROP a tool that works, and the
27594
+ * window/effort assertions are Copilot facts the local endpoint was never asked
27595
+ * to satisfy. It answers `true` (the same shape `cheaplocalOracleModel` uses);
27596
+ * `local2` kept a billed Copilot Oracle and is catalog-gated exactly like the
27597
+ * cheapest family's. The launch's own `allowedPersonas` still gates the tool.
27598
+ */
27581
27599
  function localOracleModel(profileId) {
27582
- return familyOracleModelFor(localContractFor(profileId));
27600
+ const contract = localContractFor(profileId);
27601
+ return contract.consultTransport === "local" ? true : familyOracleModelFor(contract);
27583
27602
  }
27584
27603
  /** Luna/max reviewer for the cheapest family at the 200K default window. */
27585
27604
  function cheapestReviewerModel(profileId) {
@@ -28817,7 +28836,7 @@ function activePersonas(launch) {
28817
28836
  /** Oracle descriptor derived from the family contract, so a model swap in the
28818
28837
  * contract renames itself here instead of leaving stale prose behind. */
28819
28838
  function familyOracleDescriptor(profileId) {
28820
- if (isCheaplocalProfile(profileId)) return "the local model";
28839
+ if (consultIsLocalTransport(profileId)) return "the local model";
28821
28840
  if (isCheapestFamily(profileId)) {
28822
28841
  const contract = cheapestContractFor(profileId);
28823
28842
  return `${displayModelName(contract.oracleModel)} (200K context, ${contract.oracleEffort} effort)`;
@@ -29035,8 +29054,9 @@ function toolEntries(scope, launch, audience = "shared") {
29035
29054
  const astraAvailable = astraWired && (isCheap && !isCheapest ? cheapAstraModel() : isCheapest ? void 0 : fastAstraModel()) != null;
29036
29055
  const oracleGate = isLocal ? localOracleModel(launch.profileId) : isCheapest ? cheapestFamilyOracleGate(launch.profileId) : isBalanced ? balancedOracleModel(launch.profileId) : isCheap ? cheapOracleModel() : fastOracleModel();
29037
29056
  const oracleDescriptor = familyOracleDescriptor(launch.profileId);
29057
+ const oracleRedactsBrief = consultIsLocalTransport(launch.profileId);
29038
29058
  const entries = [];
29039
- if ((scope === "all" || scope === "peers") && launch.allowedGroups?.has("peers") && launch.allowedPersonas?.has("oracle") && oracleGate) entries.push(oracleToolEntry(isCheap, astraAvailable, oracleDescriptor, advisorAvailable, isCheaplocalProfile(launch.profileId)));
29059
+ if ((scope === "all" || scope === "peers") && launch.allowedGroups?.has("peers") && launch.allowedPersonas?.has("oracle") && oracleGate) entries.push(oracleToolEntry(isCheap, astraAvailable, oracleDescriptor, advisorAvailable, oracleRedactsBrief));
29040
29060
  if ((scope === "all" || scope === "peers") && launch.allowedGroups?.has("peers") && launch.allowedPersonas?.has("astra") && audience === "lead-peers" && astraWired && (isCheap ? cheapAstraModel() : fastAstraModel())) entries.push(astraToolEntry(isCheap));
29041
29061
  for (const tool of listableNonPersonaTools()) {
29042
29062
  if (!fastAllowsTool(scope, launch, {
@@ -29568,12 +29588,13 @@ async function handleToolsCall(body, scope, launch, audience = "shared", session
29568
29588
  const isCheapestOracle = isCheapestFamily(launch.profileId);
29569
29589
  const isBalancedOracle = isBalancedFamily(launch.profileId);
29570
29590
  const isLocalOracle = isLocalFamily(launch.profileId);
29571
- const isCheaplocalOracle = isCheapestOracle && cheapestContractFor(launch.profileId).consultTransport === "local";
29591
+ const oracleContract = isLocalOracle ? localContractFor(launch.profileId) : isCheapestOracle ? cheapestContractFor(launch.profileId) : isBalancedOracle ? balancedContractFor(launch.profileId) : void 0;
29592
+ const oracleIsLocalConsult = oracleContract?.consultTransport === "local";
29572
29593
  const isCheapOracle = launch.profileId === "cheap" || launch.profileId === "cheap1m" || isCheapestOracle || isBalancedOracle;
29573
- const oracleModel = isLocalOracle ? localContractFor(launch.profileId).oracleModel : isCheapestOracle ? cheapestContractFor(launch.profileId).oracleModel : isBalancedOracle ? balancedContractFor(launch.profileId).oracleModel : isCheapOracle ? CHEAP_PROFILE_ORACLE_MODEL : "claude-opus-5.5";
29574
- const oracleEndpoint = isCheaplocalOracle ? "/v1/messages" : isCheapOracle || isLocalOracle ? "/v1/responses" : "/v1/messages";
29575
- const oracleEffort = isLocalOracle ? localContractFor(launch.profileId).oracleEffort : isCheapestOracle ? cheapestContractFor(launch.profileId).oracleEffort : isBalancedOracle ? balancedContractFor(launch.profileId).oracleEffort : isCheapOracle ? CHEAP_PROFILE_ORACLE_EFFORT : "high";
29576
- const oracleGateFn = isLocalOracle ? () => localOracleModel(launch.profileId) : isCheapestOracle ? () => cheapestFamilyOracleGate(launch.profileId) : isBalancedOracle ? () => balancedOracleModel(launch.profileId) : isCheapOracle ? cheapOracleModel : fastOracleModel;
29594
+ const oracleModel = oracleContract ? oracleContract.oracleModel : isCheapOracle ? CHEAP_PROFILE_ORACLE_MODEL : "claude-opus-5.5";
29595
+ const oracleEndpoint = oracleIsLocalConsult ? "/v1/messages" : isCheapOracle && !isLocalOracle ? "/v1/responses" : isLocalOracle && oracleContract?.consultTransport === "copilot" ? "/v1/responses" : "/v1/messages";
29596
+ const oracleEffort = oracleContract ? oracleContract.oracleEffort : isCheapOracle ? CHEAP_PROFILE_ORACLE_EFFORT : "high";
29597
+ const oracleGateFn = oracleIsLocalConsult ? () => true : isLocalOracle ? () => localOracleModel(launch.profileId) : isCheapestOracle ? () => cheapestFamilyOracleGate(launch.profileId) : isBalancedOracle ? () => balancedOracleModel(launch.profileId) : isCheapOracle ? cheapOracleModel : fastOracleModel;
29577
29598
  if (scope !== "all" && scope !== "peers" || !launch.allowedGroups?.has("peers") || !launch.allowedPersonas?.has("oracle") || !oracleGateFn()) return rpcError(body.id, RPC_METHOD_NOT_FOUND, `tools/call: unknown tool "${name}"`);
29578
29599
  const query = typeof args.query === "string" ? args.query.trim() : "";
29579
29600
  const context = typeof args.context === "string" ? args.context.trim() : "";
@@ -29582,20 +29603,22 @@ async function handleToolsCall(body, scope, launch, audience = "shared", session
29582
29603
  const oracleInput = `Query:\n${query}\n\nContext:\n${context}`;
29583
29604
  const inputBytes = Buffer.byteLength(oracleInput, "utf8");
29584
29605
  if (inputBytes > MAX_ORACLE_INPUT_BYTES) return rpcResult(body.id, toolError(`pre-flight rejected: oracle input is ${inputBytes} bytes, over the ${MAX_ORACLE_INPUT_BYTES}-byte cap; narrow the context without silently truncating it`));
29606
+ const oracleInstructions = oracleIsLocalConsult ? `You are Oracle, an expert architectural and technical consultant. You have no tools or repository access. Answer from the supplied context and state assumptions explicitly, noting which facts would change the recommendation. Never claim to execute, verify, approve, merge, or authorize an action. ${LOCAL_CONSULT_REDACTION_NOTE}` : `You are Oracle, an expert architectural and technical consultant running on ${displayModelName(oracleModel)}. You have no tools or repository access. Answer from the supplied context and state assumptions explicitly, noting which facts would change the recommendation. Never claim to execute, verify, approve, merge, or authorize an action.`;
29607
+ const oraclePersonaEffort = isEffort(oracleEffort) ? oracleEffort : "high";
29585
29608
  const oraclePersona = {
29586
29609
  agentName: "oracle",
29587
29610
  toolNameHttp: "oracle",
29588
29611
  model: oracleModel,
29589
29612
  endpoint: oracleEndpoint,
29590
29613
  description: "Oracle: self-contained consultant",
29591
- baseInstructions: isCheaplocalOracle ? `You are Oracle, an expert architectural and technical consultant. You have no tools or repository access. Answer from the supplied context and state assumptions explicitly, noting which facts would change the recommendation. Never claim to execute, verify, approve, merge, or authorize an action. ${LOCAL_CONSULT_REDACTION_NOTE}` : `You are Oracle, an expert architectural and technical consultant running on ${displayModelName(oracleModel)}. You have no tools or repository access. Answer from the supplied context and state assumptions explicitly, noting which facts would change the recommendation. Never claim to execute, verify, approve, merge, or authorize an action.`,
29614
+ baseInstructions: oracleInstructions,
29592
29615
  agentPrompt: "",
29593
29616
  writeCapable: false,
29594
29617
  requiresHttp: true,
29595
- allowedEfforts: [oracleEffort],
29596
- defaultEffort: oracleEffort
29618
+ allowedEfforts: [oraclePersonaEffort],
29619
+ defaultEffort: oraclePersonaEffort
29597
29620
  };
29598
- if (!isCheaplocalOracle) {
29621
+ if (!oracleIsLocalConsult) {
29599
29622
  const overflow = await predictedWindowOverflow(oraclePersona, oracleInput, void 0);
29600
29623
  if (overflow) return rpcResult(body.id, toolError(overflow));
29601
29624
  }
@@ -29611,7 +29634,7 @@ async function handleToolsCall(body, scope, launch, audience = "shared", session
29611
29634
  if (abortKey !== void 0) inflightAborts.set(abortKey, inflightEntry);
29612
29635
  try {
29613
29636
  let text;
29614
- if (isCheaplocalOracle) {
29637
+ if (oracleIsLocalConsult) {
29615
29638
  const egress = localConsultEgress ?? {
29616
29639
  baseUrl: localBaseUrl(),
29617
29640
  sessionId: launch.sessionId?.trim() || state.sessionId
@@ -29622,6 +29645,7 @@ async function handleToolsCall(body, scope, launch, audience = "shared", session
29622
29645
  system: oraclePersona.baseInstructions,
29623
29646
  userText: oracleInput,
29624
29647
  maxTokens: LOCAL_CONSULT_MAX_OUTPUT_TOKENS,
29648
+ effort: oracleEffort,
29625
29649
  signal: aborter.signal
29626
29650
  }), {
29627
29651
  signal: aborter.signal,
@@ -29633,7 +29657,7 @@ async function handleToolsCall(body, scope, launch, audience = "shared", session
29633
29657
  endpoint: oracleEndpoint,
29634
29658
  instructions: oraclePersona.baseInstructions,
29635
29659
  userText: oracleInput,
29636
- effort: oracleEffort,
29660
+ effort: oraclePersonaEffort,
29637
29661
  signal: aborter.signal
29638
29662
  });
29639
29663
  logTelemetry({
@@ -29927,7 +29951,7 @@ async function handleMcpPost(c, scopeArg = "all") {
29927
29951
  return c.json(rpcError(null, RPC_PARSE_ERROR, "request body is not valid JSON"), 200);
29928
29952
  }
29929
29953
  const sessionWorkspace = c.req.header(MCP_WORKSPACE_HEADER);
29930
- const localConsultEgress = isCheaplocalProfile(launch.profileId) ? {
29954
+ const localConsultEgress = consultIsLocalTransport(launch.profileId) ? {
29931
29955
  baseUrl: localBaseUrl(),
29932
29956
  sessionId: localSessionId(c, launch.sessionId)
29933
29957
  } : void 0;
@@ -31339,12 +31363,12 @@ const LOCAL_ADVISOR_TOOL_INSTRUCTIONS = buildCheapestAdvisorToolInstructions("a
31339
31363
  /** `cheaplocal` lead variant. The consult leaves Copilot, and this launch has
31340
31364
  * been told nothing about what answers its local endpoint, so the prose names
31341
31365
  * no model, no window, no effort and no cost: it states only that the
31342
- * consultant is local and what it is shown. The request still asks for `max`
31343
- * effort (`LOCAL_CONSULT_EFFORT`), but that is a field of the consult body,
31344
- * not a property to teach the lead; every surface states the transport and
31345
- * stops there. It is also the only variant that asks for a redacted brief: it
31346
- * is the only profile whose consult leaves Copilot for an endpoint the proxy
31347
- * knows nothing about. */
31366
+ * consultant is local and what it is shown. The request asks for the profile's
31367
+ * declared effort, but that is a field of the consult body, not a property to
31368
+ * teach the lead; every surface states the transport and stops there. It asks
31369
+ * for a redacted brief because its consult leaves Copilot for an endpoint the
31370
+ * proxy knows nothing about — the rule that decides that is the transport,
31371
+ * `consultIsLocalTransport`, which also covers `local`'s Oracle. */
31348
31372
  const CHEAPLOCAL_ADVISOR_TOOL_INSTRUCTIONS = buildCheapestAdvisorToolInstructions("which sees a curated view of this session", "the local model", true);
31349
31373
  /** Protege-facing tool description for the cheapest reviewer. Unlike the lead
31350
31374
  * variants, this names the mentor relationship and the hard consult budget so
@@ -31838,7 +31862,7 @@ async function runAdvisor(conversation, advisorModel, advisorEffort, signal, adv
31838
31862
  transcript: transcriptText
31839
31863
  }) : transcriptText;
31840
31864
  const transport = advisorLocalEgress ? "local" : advisorTransport(resolvedAdvisorModel, fastProfile);
31841
- const dispatchEffort = advisorLocalEgress ? "max" : advisorEffort;
31865
+ const dispatchEffort = advisorEffort;
31842
31866
  if (fastProfile) consola.warn(`fast Advisor dispatch: model=${resolvedAdvisorModel} transport=${transport} effort=${dispatchEffort}`);
31843
31867
  if (cheapProfile) {
31844
31868
  const transcriptCap = cheapestProfile ? `${resolveCheapestAdvisorTranscriptTokens()} tokens (curated digest)` : "200K";
@@ -31852,6 +31876,7 @@ async function runAdvisor(conversation, advisorModel, advisorEffort, signal, adv
31852
31876
  system: advisorSystem,
31853
31877
  userText: conversationText,
31854
31878
  maxTokens: ADVISOR_FALLBACK_MAX_OUTPUT_TOKENS,
31879
+ effort: dispatchEffort,
31855
31880
  signal
31856
31881
  }), {
31857
31882
  signal,
@@ -37347,7 +37372,6 @@ function buildPeerAwarenessSnippet(opts) {
37347
37372
  const isBalanced = isBalancedFamily(opts.profile);
37348
37373
  const isLocal = isLocalFamily(opts.profile);
37349
37374
  const hasAdvisor = !isBalanced && !(isLocal && opts.profile !== "local2");
37350
- const hasOracle = !(isLocal && opts.profile === "local");
37351
37375
  const profileLabel = isCheapest || isBalanced || isLocal ? opts.profile : isCheap ? "cheap" : "fast";
37352
37376
  const familyContract = isCheapest ? cheapestContractFor(opts.profile) : isBalanced ? balancedContractFor(opts.profile) : isLocal ? localContractFor(opts.profile) : void 0;
37353
37377
  const consultIsLocal = familyContract?.consultTransport === "local";
@@ -37366,12 +37390,12 @@ function buildPeerAwarenessSnippet(opts) {
37366
37390
  const rosterClause = isCheapest || isLocal ? `Native Task roster: \`Explore\` (broad repository discovery spanning more than a couple of files), \`General-Purpose\` (mixed investigation and execution), and \`reviewer\` (repo-aware verification of behavior-changing or risk-sensitive changes). The lead plans directly: in plan mode, produce the plan and acceptance criteria without editing files${hasAdvisor ? ", and review the final plan with the Advisor before presenting it to the user" : ""}. Handle straightforward tasks directly and verify claims with concrete repository evidence and tests before declaring done.` : "Native Task roster: `Explore` (mandatory cheap broad discovery, launch in parallel; lead/`Plan` delegate rather than self-sweep), `Plan` (sequencing, interfaces, migration risk, acceptance criteria in plan mode; delegate discovery to `Explore` and write handoff-ready steps for `General-Purpose`), `General-Purpose` (mixed execution; follows a Plan handoff when one exists and drives to a verified end state), and `reviewer` (repo-aware verification after non-trivial changes, before done). In plan mode, delegate planning to `Plan` and do not edit files. Verify claims with concrete repository evidence and tests before declaring done.";
37367
37391
  const balancedRosterClause = "Native Task roster: the lead owns planning, implementation, and verification by default. `Explore` (targeted breadth only when search is insufficient, launch in parallel), `General-Purpose` (mixed execution; delegate FREELY for multi-step work and drive to a verified end state), and `reviewer` (repo-aware verification; invoke ONLY when genuinely behavior-changing, cross-boundary, or risk-sensitive, lead owns verification by default; narrows scope with search first and may invoke `Explore` for targeted discovery). Verify claims with concrete repository evidence and tests before declaring done.";
37368
37392
  const escalationOpener = isLocal ? `This is the ${profileLabel} launch profile. Verify claims against real evidence first: settle factual claims with ` : `This is the ${profileLabel} launch profile. Funnel unknowns cheapest-first: settle factual claims with `;
37369
- const escalationOracle = hasOracle ? ` \`mcp__${fastPeersKey}__oracle\` is ${oracleDescriptor}, a second opinion for precise, self-contained architectural/spec trade-offs that search and \`Explore\` cannot settle, available to the lead; \`reviewer\` and other subagents cannot call Oracle.` : "";
37393
+ const escalationOracle = ` \`mcp__${fastPeersKey}__oracle\` is ${oracleDescriptor}, a second opinion for precise, self-contained architectural/spec trade-offs that search and \`Explore\` cannot settle, available to the lead; \`reviewer\` and other subagents cannot call Oracle.`;
37370
37394
  const escalationClause = !hasAdvisor ? escalationOpener + `\`mcp__${fastSearchKey}__code\` + \`mcp__${fastSearchKey}__web\` search first (narrow scope, rule out hypotheses), then \`Explore\` for targeted breadth.` + escalationOracle + astraClause : `This is the ${profileLabel} launch profile. Follow an evidence-first escalation ladder: settle factual claims directly through code, tests, and builds. ${hasAdvisor && (isCheapest || isLocal) ? "Advisor is an optional, non-binding, transcript-aware sounding board available to the lead and `reviewer` (at most 5 rounds per review) for trajectory guidance, framing checks, or conflicting signals (direction, not dictation), not routine progress, waiting, verification, or completion." : "Advisor is an optional, non-binding, lead-only transcript-aware sounding board for trajectory guidance, framing checks, or conflicting signals (direction, not dictation), not routine progress, waiting, verification, or completion."} \`mcp__${fastPeersKey}__oracle\` is ${oracleDescriptor}, an expert consultant ${isCheapest || isLocal ? "available to the lead" : "available to the lead and `Plan`"}, preferred over advisor for difficult conceptual, algorithmic, spec/protocol, or architectural tradeoffs evaluated in a self-contained brief; \`reviewer\` and other subagents cannot call Oracle.${astraClause}`;
37371
37395
  const leadLeaf = workerBrowseAvailable ? "`Explore`, `reviewer`, and `worker-browse`" : "`Explore` and `reviewer`";
37372
37396
  const delegationClause = isBalanced ? "Native delegation is ACL-scoped: the lead may invoke all three; `General-Purpose` may invoke `reviewer`; `reviewer` may invoke `Explore` for targeted discovery; " + (workerBrowseAvailable ? "`Explore` and `worker-browse`" : "`Explore`") + " cannot invoke native subagents." : isCheapest || isLocal ? "Native delegation is ACL-scoped: the lead may invoke all three; `General-Purpose` may invoke `reviewer`; " + leadLeaf + " cannot invoke native subagents." : "Native delegation is ACL-scoped: the lead may invoke all four; `Plan` may invoke `Explore` and `reviewer`; `General-Purpose` may invoke `reviewer`; " + leadLeaf + " cannot invoke native subagents.";
37373
37397
  return [
37374
- isLocal && !hasOracle ? "## Native roster and search" : isLocal && !hasAdvisor ? "## Peer review and Oracle" : "## Peer review and advisor",
37398
+ isLocal && !hasAdvisor ? "## Peer review and Oracle" : "## Peer review and advisor",
37375
37399
  "",
37376
37400
  escalationClause,
37377
37401
  "",
@@ -37444,7 +37468,6 @@ function buildPeerAwarenessSummary(opts) {
37444
37468
  const isBalanced = isBalancedFamily(opts.profile);
37445
37469
  const isLocal = isLocalFamily(opts.profile);
37446
37470
  const hasAdvisor = !isBalanced && !(isLocal && opts.profile !== "local2");
37447
- const hasOracle = !(isLocal && opts.profile === "local");
37448
37471
  const advisorReviewerGranted = hasAdvisor && (isCheapest || isLocal);
37449
37472
  const profileLabel = isCheapest || isBalanced || isLocal ? opts.profile.charAt(0).toUpperCase() + opts.profile.slice(1) : isCheap ? "Cheap" : "Fast";
37450
37473
  const familyContract = isCheapest ? cheapestContractFor(opts.profile) : isBalanced ? balancedContractFor(opts.profile) : isLocal ? localContractFor(opts.profile) : void 0;
@@ -37458,7 +37481,7 @@ function buildPeerAwarenessSummary(opts) {
37458
37481
  const astraClause = opts.astraAvailable && (opts.profile === "fast" || opts.profile === "cheap1m") ? ` \`mcp__${key("peers")}__astra\` is GPT-6 Astra (${astraDescriptor}), lead-only escalation for hardest dead ends.` : "";
37459
37482
  const rosterLine = isCheapest || isLocal ? `${profileLabel} launch profile. Task roster: \`Explore\` (broad discovery), \`General-Purpose\` (mixed execution), \`reviewer\` (verification of behavior-changing or risk-sensitive changes). The lead plans directly${hasAdvisor ? " and reviews the final plan with the Advisor before presenting it to the user" : ""}. Handle straightforward tasks directly. Verify claims with concrete repository evidence and tests before declaring done.` : `${profileLabel} launch profile. Task roster: \`Explore\` (mandatory parallel discovery delegate), \`Plan\` (planning in plan mode, writes handoff-ready steps for \`General-Purpose\`), \`General-Purpose\` (mixed execution, follows a Plan handoff when one exists), \`reviewer\` (verification after implementation, before done). Verify claims with concrete repository evidence and tests before declaring done.`;
37460
37483
  const balancedRosterLine = `${profileLabel} launch profile. The lead owns planning, implementation, and verification by default. Task roster: \`Explore\` (targeted breadth when search is insufficient), \`General-Purpose\` (delegate FREELY for multi-step work), \`reviewer\` (invoke ONLY when genuinely behavior-changing, cross-boundary, or risk-sensitive). Verify claims with concrete repository evidence and tests before declaring done.`;
37461
- const summaryOracle = hasOracle ? `\`mcp__${key("peers")}__oracle\` is ${oracleDescriptor}, a second opinion for precise, self-contained architectural/spec trade-offs that search and \`Explore\` cannot settle, for the lead.${astraClause} ` : "";
37484
+ const summaryOracle = `\`mcp__${key("peers")}__oracle\` is ${oracleDescriptor}, a second opinion for precise, self-contained architectural/spec trade-offs that search and \`Explore\` cannot settle, for the lead.${astraClause} `;
37462
37485
  const peerLine = !hasAdvisor ? summaryOracle + `\`mcp__${key("search")}__code\` provides ${opts.bluebirdEnabled === true ? "Bluebird semantic + lexical search with visible no-fallback errors and local exact/regex/AST" : opts.semanticSearchAvailable === true ? "local ColBERT semantic search with lexical fallback" : "local lexical search"}; \`mcp__${key("search")}__web\` provides web search.${browserClause}${workerBrowseClause}${artifactClause}` : `${advisorReviewerGranted ? "Advisor is optional, non-binding, transcript-aware, and available to the lead and `reviewer` (at most 5 rounds per review) for trajectory guidance or framing checks (direction, not dictation)." : "Advisor is optional, non-binding, transcript-aware, and lead-only for trajectory guidance or framing checks (direction, not dictation)."} \`mcp__${key("peers")}__oracle\` is ${oracleDescriptor}, an expert consultant for ${isCheapest || isLocal ? "the lead" : "the lead and `Plan`"}, preferred over advisor for substantive trade-offs.${astraClause} \`mcp__${key("search")}__code\` provides ${opts.bluebirdEnabled === true ? "Bluebird semantic + lexical search with visible no-fallback errors and local exact/regex/AST" : opts.semanticSearchAvailable === true ? "local ColBERT semantic search with lexical fallback" : "local lexical search"}; \`mcp__${key("search")}__web\` provides web search.${browserClause}${workerBrowseClause}${artifactClause}`;
37463
37486
  const summaryLeadLeaf = workerBrowseAvailable ? "`Explore`, `reviewer`, and `worker-browse`" : "`Explore` and `reviewer`";
37464
37487
  const summaryDelegation = isBalanced ? "Native delegation is ACL-scoped: the lead may invoke all three; `General-Purpose` may invoke `reviewer`; `reviewer` may invoke `Explore` for targeted discovery; " + (workerBrowseAvailable ? "`Explore` and `worker-browse`" : "`Explore`") + " cannot invoke native subagents." : isCheapest || isLocal ? "Native delegation is ACL-scoped: the lead may invoke all three; `General-Purpose` may invoke `reviewer`; " + summaryLeadLeaf + " cannot invoke native subagents." : "Native delegation is ACL-scoped: the lead may invoke all four; `Plan` may invoke `Explore` and `reviewer`; `General-Purpose` may invoke `reviewer`; " + summaryLeadLeaf + " cannot invoke native subagents.";
@@ -39033,6 +39056,6 @@ function enumerateInjectedMcpToolNames(groupKeys, opts = {}) {
39033
39056
  return [...new Set(names)];
39034
39057
  }
39035
39058
  //#endregion
39036
- export { buildAnthropicErrorEvent as $, UPSTREAM_FETCH_TIMEOUT_MS as $n, nativeSubagentModel as $t, TOOLBELT_TOOLS$1 as A, parseJsonOrDiagnose as An, brainstormModel as At, FAST_ADVISOR_TOOL_INSTRUCTIONS as B, colbertDegradedWarning as Bn, cloudAgentToolsEnabled as Bt, runWorkerAgent as C, assembleResponsesPayload as Cn, ADO_DEFAULT_TOOLSETS as Ct, toolbeltEnabled as D, createChatCompletions as Dn, artifactToolsEnabled as Dt, buildToolbeltAwareness as E, createResponses as En, agentToolsEnabled as Et, ADVISOR_TOOL_INSTRUCTIONS as F, hasSupportedBrowserInstalled as Fn, cheapOracleModel as Ft, isAdvisorRequested as G, collapsePathKeys as Gn, fastPlanModel as Gt, LOCAL_REVIEWER_ADVISOR_TOOL_INSTRUCTIONS as H, semanticSearchOptedIn as Hn, fastAstraModel as Ht, CHEAPEST_ADVISOR_TOOL_INSTRUCTIONS as I, normalizeCloudAgentEnvironment as In, cheapReviewerModel as It, resolveCuratedAdvisorModel as J, BUDGET_SMALL_FAST_SLUG as Jn, fleetToolsEnabled as Jt, resolveAdvisorEffort as K, toolbeltPathOverride as Kn, fastReviewerModel as Kt, CHEAPEST_REVIEWER_ADVISOR_TOOL_INSTRUCTIONS as L, normalizeKustoClusterUri as Ln, cheapestAdvisorModel as Lt, satisfiesMinVersion as M, effectiveLocalProfile as Mn, browserCompoundToolsEnabled as Mt, searchWeb as N, normalizeOpenAIUsage as Nn, browserToolsEnabled as Nt, toolbeltSkipSet as O, MAX_RESPONSE_BODY_BYTES as On, balancedOracleModel as Ot, ADVISOR_INTERNAL_TOOL_NAME as P, provisionBrowserAssets as Pn, cheapAdvisorModel as Pt, repairRejectedThinkingHistory as Q, DEFAULT_PORT as Qn, kustoToolsEnabled as Qt, CHEAPLOCAL_ADVISOR_TOOL_INSTRUCTIONS as R, CONDENSED_OPERATING_SEQUENCE as Rn, cheapestOracleModel as Rt, resolveWorkerRunOpts as S, unregisterLaunch as Sn, provisionAdoTools as St, availableToolCommands as T, resolveMcpToolTimeoutMs as Tn, adoToolsEnabled as Tt, buildAdvisorStream as U, shouldUseInsecureTls as Un, fastGeneralPurposeModel as Ut, LOCAL_ADVISOR_TOOL_INSTRUCTIONS as V, provisionAndIndexColbert as Vn, fastAdvisorModel as Vt, injectAdvisorTool as W, LOCAL_CONSULT_REDACTION_LINE as Wn, fastOracleModel as Wt, rememberThinkingHistoryRepair as X, DEFAULT_CODEX_MODEL as Xn, generalPurposeFastModel as Xt, formatThinkingRepairDecline as Y, DEFAULT_CLAUDE_MODEL_FALLBACKS as Yn, geminiAvailable as Yt, repairKnownThinkingHistory as Z, DEFAULT_CODEX_MODEL_FALLBACKS as Zn, implementerFastModel as Zt, REVIEW_DEFAULT_MODEL as _, LAUNCH_BOUND_TOKEN_PREFIX as _n, CHEAP_PROFILE_SUBAGENT_CONTEXT_TOKENS as _r, provisionWorkiqTools as _t, buildAgentPrompt as a, standInToolEnabled as an, upstreamAllowH2 as ar, EFFORT_ORDER as at, resolveDefaultModel as b, registerLaunch as bn, buildAdoToolEntries as bt, enumerateInjectedMcpToolNames as c, shimDefaultsToXhigh as cn, catalogAdvertises1M as cr, clampEffort as ct, BROWSE_DEFAULT_MODEL as d, getTokenizerFromModel as dn, withOneMSuffixForLead as dr, normalizeAnthropicUsageInPlace as dt, resolveGeminiReviewModel as en, UPSTREAM_INACTIVITY_TIMEOUT_MS as er, buildOpenAIErrorEvent as et, DEFAULT_MODEL_CHAIN as f, configureLocalEgress as fn, CHEAP_PROFILE_ADVISOR_CLIENT_MODEL as fr, handleMcpDelete as ft, PLAN_DEFAULT_MODEL as g, createMessages as gn, CHEAP_PROFILE_NATIVE_MODELS as gr, disposeWorkiqClients as gt, IMPLEMENT_DEFAULT_MODEL as h, countTokens as hn, CHEAP_PROFILE_NATIVE_EFFORTS as hr, buildWorkiqToolEntries as ht, assertMcpToolSurfaceConsistent as i, scribeModel as in, resolveLeadSlugArg as ir, relayAnthropicStream as it, assetFor as j, assertCopilotModelAllowed as jn, browseAgentEnabled as jt, vscodeRipgrepPath as k, readResponseBodyCapped as kn, balancedReviewerModel as kt, maxPersonasFor as l, getTextTokenCount as ln, oneMContextDisabled as lr, anthropicUsageNormalizeDisabled as lt, EXPLORE_DEFAULT_THINKING as m, localSessionId as mn, CHEAP_PROFILE_NATIVE_AGENT_NAMES as mr, WORKIQ_TOOL_ALIASES as mt, MCP_GROUPS as n, reviewerModel as nn, isBudgetClaudeLead as nr, logStreamError as nt, buildPeerAwarenessSnippet as o, workerToolsEnabled as on, upstreamMaxConnections as or, UNKNOWN_EFFORT_ANCHOR as ot, EXPLORE_DEFAULT_MODEL as p, localBaseUrl as pn, CHEAP_PROFILE_MODELS as pr, handleMcpPost as pt, resolveAdvisorModel as q, BUDGET_SMALL_FAST_CATALOG_ID as qn, fastScoutModel as qt, agentNamesForToolAllowlist as r, scoutModel as rn, pickClaudeDefault as rr, readIteratorWithTimeout as rt, buildPeerAwarenessSummary as s, workiqToolsEnabled as sn, classifyMessagesRoute as sr, bucketEffort as st, GROUP_META as t, reviewerFastModel as tn, generateRandomPort as tr, isControllerClosedError as tt, personasFor as u, getTokenCount as un, withOneMSuffix as ur, createAnthropicUsageRewriteTransform as ut, TEST_DEFAULT_MODEL as v, findLaunchBySecret as vn, workiqMcpToolEntries as vt, buildEnv as w, warnOnTokenPriceDrift as wn, normalizeAdoToolsets as wt, resolveModeDefaults as x, rememberLaunchSessionId as xn, disposeAdoClients as xt, appendPlanReminder as y, launchBoundAccessToken as yn, adoMcpToolEntries as yt, CHEAPLOCAL_REVIEWER_ADVISOR_TOOL_INSTRUCTIONS as z, DEFINITION_OF_GREATNESS as zn, cheapestReviewerModel as zt };
39059
+ export { buildAnthropicErrorEvent as $, DEFAULT_PORT as $n, nativeSubagentModel as $t, TOOLBELT_TOOLS$1 as A, parseJsonOrDiagnose as An, brainstormModel as At, FAST_ADVISOR_TOOL_INSTRUCTIONS as B, colbertDegradedWarning as Bn, cloudAgentToolsEnabled as Bt, runWorkerAgent as C, assembleResponsesPayload as Cn, ADO_DEFAULT_TOOLSETS as Ct, toolbeltEnabled as D, createChatCompletions as Dn, artifactToolsEnabled as Dt, buildToolbeltAwareness as E, createResponses as En, agentToolsEnabled as Et, ADVISOR_TOOL_INSTRUCTIONS as F, normalizeKustoClusterUri as Fn, cheapOracleModel as Ft, isAdvisorRequested as G, LOCAL_CONSULT_REDACTION_NOTE as Gn, fastPlanModel as Gt, LOCAL_REVIEWER_ADVISOR_TOOL_INSTRUCTIONS as H, semanticSearchOptedIn as Hn, fastAstraModel as Ht, CHEAPEST_ADVISOR_TOOL_INSTRUCTIONS as I, CONDENSED_OPERATING_SEQUENCE as In, cheapReviewerModel as It, resolveCuratedAdvisorModel as J, BUDGET_SMALL_FAST_CATALOG_ID as Jn, fleetToolsEnabled as Jt, resolveAdvisorEffort as K, collapsePathKeys as Kn, fastReviewerModel as Kt, CHEAPEST_REVIEWER_ADVISOR_TOOL_INSTRUCTIONS as L, DEFINITION_OF_GREATNESS as Ln, cheapestAdvisorModel as Lt, satisfiesMinVersion as M, provisionBrowserAssets as Mn, browserCompoundToolsEnabled as Mt, searchWeb as N, hasSupportedBrowserInstalled as Nn, browserToolsEnabled as Nt, toolbeltSkipSet as O, MAX_RESPONSE_BODY_BYTES as On, balancedOracleModel as Ot, ADVISOR_INTERNAL_TOOL_NAME as P, normalizeCloudAgentEnvironment as Pn, cheapAdvisorModel as Pt, repairRejectedThinkingHistory as Q, DEFAULT_CODEX_MODEL_FALLBACKS as Qn, kustoToolsEnabled as Qt, CHEAPLOCAL_ADVISOR_TOOL_INSTRUCTIONS as R, assertCopilotModelAllowed as Rn, cheapestOracleModel as Rt, resolveWorkerRunOpts as S, unregisterLaunch as Sn, provisionAdoTools as St, availableToolCommands as T, resolveMcpToolTimeoutMs as Tn, adoToolsEnabled as Tt, buildAdvisorStream as U, shouldUseInsecureTls as Un, fastGeneralPurposeModel as Ut, LOCAL_ADVISOR_TOOL_INSTRUCTIONS as V, provisionAndIndexColbert as Vn, fastAdvisorModel as Vt, injectAdvisorTool as W, LOCAL_CONSULT_REDACTION_LINE as Wn, fastOracleModel as Wt, rememberThinkingHistoryRepair as X, DEFAULT_CLAUDE_MODEL_FALLBACKS as Xn, generalPurposeFastModel as Xt, formatThinkingRepairDecline as Y, BUDGET_SMALL_FAST_SLUG as Yn, geminiAvailable as Yt, repairKnownThinkingHistory as Z, DEFAULT_CODEX_MODEL as Zn, implementerFastModel as Zt, REVIEW_DEFAULT_MODEL as _, LAUNCH_BOUND_TOKEN_PREFIX as _n, CHEAP_PROFILE_NATIVE_MODELS as _r, provisionWorkiqTools as _t, buildAgentPrompt as a, standInToolEnabled as an, resolveLeadSlugArg as ar, EFFORT_ORDER as at, resolveDefaultModel as b, registerLaunch as bn, buildAdoToolEntries as bt, enumerateInjectedMcpToolNames as c, shimDefaultsToXhigh as cn, classifyMessagesRoute as cr, clampEffort as ct, BROWSE_DEFAULT_MODEL as d, getTokenizerFromModel as dn, withOneMSuffix as dr, normalizeAnthropicUsageInPlace as dt, resolveGeminiReviewModel as en, UPSTREAM_FETCH_TIMEOUT_MS as er, buildOpenAIErrorEvent as et, DEFAULT_MODEL_CHAIN as f, configureLocalEgress as fn, withOneMSuffixForLead as fr, handleMcpDelete as ft, PLAN_DEFAULT_MODEL as g, createMessages as gn, CHEAP_PROFILE_NATIVE_EFFORTS as gr, disposeWorkiqClients as gt, IMPLEMENT_DEFAULT_MODEL as h, countTokens as hn, CHEAP_PROFILE_NATIVE_AGENT_NAMES as hr, buildWorkiqToolEntries as ht, assertMcpToolSurfaceConsistent as i, scribeModel as in, pickClaudeDefault as ir, relayAnthropicStream as it, assetFor as j, normalizeOpenAIUsage as jn, browseAgentEnabled as jt, vscodeRipgrepPath as k, readResponseBodyCapped as kn, balancedReviewerModel as kt, maxPersonasFor as l, getTextTokenCount as ln, catalogAdvertises1M as lr, anthropicUsageNormalizeDisabled as lt, EXPLORE_DEFAULT_THINKING as m, localSessionId as mn, CHEAP_PROFILE_MODELS as mr, WORKIQ_TOOL_ALIASES as mt, MCP_GROUPS as n, reviewerModel as nn, generateRandomPort as nr, logStreamError as nt, buildPeerAwarenessSnippet as o, workerToolsEnabled as on, upstreamAllowH2 as or, UNKNOWN_EFFORT_ANCHOR as ot, EXPLORE_DEFAULT_MODEL as p, localBaseUrl as pn, CHEAP_PROFILE_ADVISOR_CLIENT_MODEL as pr, handleMcpPost as pt, resolveAdvisorModel as q, toolbeltPathOverride as qn, fastScoutModel as qt, agentNamesForToolAllowlist as r, scoutModel as rn, isBudgetClaudeLead as rr, readIteratorWithTimeout as rt, buildPeerAwarenessSummary as s, workiqToolsEnabled as sn, upstreamMaxConnections as sr, bucketEffort as st, GROUP_META as t, reviewerFastModel as tn, UPSTREAM_INACTIVITY_TIMEOUT_MS as tr, isControllerClosedError as tt, personasFor as u, getTokenCount as un, oneMContextDisabled as ur, createAnthropicUsageRewriteTransform as ut, TEST_DEFAULT_MODEL as v, findLaunchBySecret as vn, CHEAP_PROFILE_SUBAGENT_CONTEXT_TOKENS as vr, workiqMcpToolEntries as vt, buildEnv as w, warnOnTokenPriceDrift as wn, normalizeAdoToolsets as wt, resolveModeDefaults as x, rememberLaunchSessionId as xn, disposeAdoClients as xt, appendPlanReminder as y, launchBoundAccessToken as yn, adoMcpToolEntries as yt, CHEAPLOCAL_REVIEWER_ADVISOR_TOOL_INSTRUCTIONS as z, effectiveLocalProfile as zn, cheapestReviewerModel as zt };
39037
39060
 
39038
- //# sourceMappingURL=peer-mcp-personas-D7vaM-V5.js.map
39061
+ //# sourceMappingURL=peer-mcp-personas-BSxDj9sJ.js.map