github-router 0.3.332 → 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.
Files changed (39) hide show
  1. package/dist/{attribution-settings-BeO1w_DL.js → attribution-settings-BwJ_HbhG.js} +91 -51
  2. package/dist/attribution-settings-BwJ_HbhG.js.map +1 -0
  3. package/dist/balanced-profile-contract-DkmALvc7.js +130 -0
  4. package/dist/balanced-profile-contract-DkmALvc7.js.map +1 -0
  5. package/dist/browser-ext/manifest.json +1 -1
  6. package/dist/{claude-BQQPdXLb.js → claude-C1fHEK9k.js} +15 -14
  7. package/dist/claude-C1fHEK9k.js.map +1 -0
  8. package/dist/{codex-fW-hbxtT.js → codex-DPgcI7n4.js} +4 -4
  9. package/dist/{codex-fW-hbxtT.js.map → codex-DPgcI7n4.js.map} +1 -1
  10. package/dist/engine-Dt_WWJcW.js +2 -0
  11. package/dist/{gate-discovery-DbwVeERm.js → gate-discovery-BTgLdzhP.js} +2 -2
  12. package/dist/{gate-discovery-DbwVeERm.js.map → gate-discovery-BTgLdzhP.js.map} +1 -1
  13. package/dist/hooks.mjs +49 -3
  14. package/dist/hooks.sha256 +1 -1
  15. package/dist/{internal-fast-dispatch-guard-DoXO3X7P.js → internal-fast-dispatch-guard-BykpMYog.js} +26 -4
  16. package/dist/internal-fast-dispatch-guard-BykpMYog.js.map +1 -0
  17. package/dist/{internal-fast-dispatch-guard-DPR16qUE.js → internal-fast-dispatch-guard-VvR1xQnL.js} +1 -1
  18. package/dist/{internal-stop-hook-DO8RKfKB.js → internal-stop-hook-t_pg41SR.js} +2 -2
  19. package/dist/{internal-stop-hook-DO8RKfKB.js.map → internal-stop-hook-t_pg41SR.js.map} +1 -1
  20. package/dist/main.js +6 -6
  21. package/dist/{peer-mcp-personas-CeB2Kcn2.js → peer-mcp-personas-7esbf4L6.js} +29 -91
  22. package/dist/peer-mcp-personas-7esbf4L6.js.map +1 -0
  23. package/dist/{provision-DZLsyRYh.js → provision-DFscSS0y.js} +2 -2
  24. package/dist/{provision-DZLsyRYh.js.map → provision-DFscSS0y.js.map} +1 -1
  25. package/dist/{serve-ik_96Q2Z.js → serve-DHCliFCz.js} +5 -5
  26. package/dist/{serve-ik_96Q2Z.js.map → serve-DHCliFCz.js.map} +1 -1
  27. package/dist/{server-setup-CK3O_Hwf.js → server-setup-aZtjyebO.js} +51 -38
  28. package/dist/server-setup-aZtjyebO.js.map +1 -0
  29. package/dist/{start-DPOJJSvp.js → start-CWQ5jAwp.js} +3 -3
  30. package/dist/{start-DPOJJSvp.js.map → start-CWQ5jAwp.js.map} +1 -1
  31. package/package.json +1 -1
  32. package/dist/attribution-settings-BeO1w_DL.js.map +0 -1
  33. package/dist/claude-BQQPdXLb.js.map +0 -1
  34. package/dist/engine-E4WJGSeg.js +0 -2
  35. package/dist/fast-profile-contract-DmsyQQrw.js +0 -61
  36. package/dist/fast-profile-contract-DmsyQQrw.js.map +0 -1
  37. package/dist/internal-fast-dispatch-guard-DoXO3X7P.js.map +0 -1
  38. package/dist/peer-mcp-personas-CeB2Kcn2.js.map +0 -1
  39. package/dist/server-setup-CK3O_Hwf.js.map +0 -1
package/dist/main.js CHANGED
@@ -47,15 +47,15 @@ const main = defineCommand({
47
47
  },
48
48
  subCommands: {
49
49
  auth: () => import("./auth-DjKEIiqG.js").then((m) => m.auth),
50
- start: () => import("./start-DPOJJSvp.js").then((m) => m.start),
51
- claude: () => import("./claude-BQQPdXLb.js").then((m) => m.claude),
52
- codex: () => import("./codex-fW-hbxtT.js").then((m) => m.codex),
53
- serve: () => import("./serve-ik_96Q2Z.js").then((m) => m.serve),
50
+ start: () => import("./start-CWQ5jAwp.js").then((m) => m.start),
51
+ claude: () => import("./claude-C1fHEK9k.js").then((m) => m.claude),
52
+ codex: () => import("./codex-DPgcI7n4.js").then((m) => m.codex),
53
+ serve: () => import("./serve-DHCliFCz.js").then((m) => m.serve),
54
54
  models: () => import("./models-68HDOEPK.js").then((m) => m.models),
55
55
  "check-usage": () => import("./check-usage-B7UrDwD8.js").then((m) => m.checkUsage),
56
56
  index: () => import("./index-cmd-DXYWgKS6.js").then((m) => m.indexCmd),
57
57
  debug: () => import("./debug-CigFsS-h.js").then((m) => m.debug),
58
- "internal-stop-hook": () => import("./internal-stop-hook-DO8RKfKB.js").then((m) => m.internalStopHook),
58
+ "internal-stop-hook": () => import("./internal-stop-hook-t_pg41SR.js").then((m) => m.internalStopHook),
59
59
  "internal-prompt-submit": () => import("./internal-prompt-submit-BfoWVyzs.js").then((m) => m.internalPromptSubmit),
60
60
  "internal-stop-review": () => import("./internal-stop-review-BtGDVrv-.js").then((m) => m.internalStopReview),
61
61
  "internal-plan-review": () => import("./internal-plan-review-jIts3KYd.js").then((m) => m.internalPlanReview),
@@ -64,7 +64,7 @@ const main = defineCommand({
64
64
  "internal-artifact-open": () => import("./internal-artifact-open-lta2UPnE.js").then((m) => m.internalArtifactOpen),
65
65
  "internal-first-mate-guard": () => import("./internal-first-mate-guard-CAefr6Ce.js").then((m) => m.internalFirstMateGuard),
66
66
  "internal-worker-guard": () => import("./internal-worker-guard-C0FJ4b29.js").then((m) => m.internalWorkerGuard),
67
- "internal-fast-dispatch-guard": () => import("./internal-fast-dispatch-guard-DPR16qUE.js").then((m) => m.internalFastDispatchGuard),
67
+ "internal-fast-dispatch-guard": () => import("./internal-fast-dispatch-guard-VvR1xQnL.js").then((m) => m.internalFastDispatchGuard),
68
68
  "internal-max-dispatch-guard": () => import("./internal-max-dispatch-guard-6ZCEanI6.js").then((m) => m.internalMaxDispatchGuard),
69
69
  "internal-aic-status": () => import("./internal-aic-status-Bma0r0ZS.js").then((m) => m.internalAicStatus)
70
70
  }
@@ -6,7 +6,7 @@ import { t as state } from "./state-CVp30CBF.js";
6
6
  import { C as githubAgentGraphQLHeaders, S as copilotVersion, b as copilotBaseUrl, d as resolveModel, f as sleep$2, g as HTTPError, h as isAllowedCopilotHost, i as tryRefreshAndRetry, v as GITHUB_API_BASE_URL, w as githubAgentHeaders, x as copilotHeaders, y as GITHUB_GRAPHQL_URL } from "./token-DATA_OQK.js";
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 parseIntEnv, i as parseBoolEnv, l as runManagedExeCapture, o as resolveExecutable } from "./exec-MCU1H-KZ.js";
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-DmsyQQrw.js";
9
+ import { S as FAST_PROFILE_ORACLE_MODEL, _ as FAST_PROFILE_MODELS, a as BALANCED_PROFILE_NATIVE_EFFORTS, b as FAST_PROFILE_NATIVE_MODELS, c as BALANCED_PROFILE_ORACLE_MODEL, d as FAST_PROFILE_ADVISOR_EFFORT, f as FAST_PROFILE_ADVISOR_MODEL, m as FAST_PROFILE_ASTRA_MODEL, r as BALANCED_PROFILE_MODELS, x as FAST_PROFILE_ORACLE_EFFORT, y as FAST_PROFILE_NATIVE_EFFORTS } from "./balanced-profile-contract-DkmALvc7.js";
10
10
  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-MJJt0zm-.js";
11
11
  import { i as registerExitHandlers$1, n as getInstanceUuid, r as recordWorkerRepo, t as WorktreeRegistry } from "./lifecycle-kpLzHUgD.js";
12
12
  import { t as MCP_WORKSPACE_HEADER } from "./mcp-workspace-header-B77WqVFw.js";
@@ -127,7 +127,7 @@ Object.freeze({
127
127
  *
128
128
  * The cheapest all-200K tier: a `gpt-5.6-luna`/max LEAD at Claude Code's
129
129
  * DEFAULT (bare-slug) 200K window, every subagent at the same 200K default,
130
- * a `gemini-3.8-flash`/high Advisor (bare slug), and a `gpt-5.6-sol`/high
130
+ * a `gpt-5.6-sol`/medium Advisor (bare slug), and a `gpt-5.6-sol`/high
131
131
  * primary Oracle. Oracle-only peer set (no `astra`), same exact four-agent
132
132
  * surface and authority structure as the cheap family.
133
133
  *
@@ -142,7 +142,7 @@ const CHEAPEST_PROFILE_MODELS = Object.freeze({
142
142
  plan: "gpt-5.6-sol",
143
143
  "General-Purpose": "gpt-5.6-luna",
144
144
  reviewer: "gemini-3.8-flash",
145
- advisor: "gemini-3.8-flash",
145
+ advisor: "gpt-5.6-sol",
146
146
  oracle: "gpt-5.6-sol"
147
147
  });
148
148
  const CHEAPEST_PROFILE_NATIVE_AGENT_NAMES = [
@@ -170,7 +170,7 @@ const CHEAPEST_PROFILE_NATIVE_EFFORTS = Object.freeze({
170
170
  const CHEAPEST_PROFILE_SUBAGENT_CONTEXT_TOKENS = 2e5;
171
171
  const CHEAPEST_PROFILE_ADVISOR_MODEL = CHEAPEST_PROFILE_MODELS.advisor;
172
172
  /**
173
- * Client-visible Advisor identity for cheapest mode. The BARE Gemini slug
173
+ * Client-visible Advisor identity for cheapest mode. The BARE Sol slug
174
174
  * (no `[1m]` bracket): Claude Code budgets the Advisor tool as a 200K-model
175
175
  * and forwards no more than ~200K of the lead's transcript, and the proxy
176
176
  * mirrors that with `CHEAPEST_PROFILE_ADVISOR_CONTEXT_TOKENS`.
@@ -185,64 +185,6 @@ Object.freeze({
185
185
  reviewer: Object.freeze([])
186
186
  });
187
187
  //#endregion
188
- //#region src/lib/balanced-profile-contract.ts
189
- /**
190
- * Fixed identities for the literal `github-router claude -m balanced` profile.
191
- *
192
- * The most-complex-tasks tier: a `gpt-5.6-sol`/medium LEAD at Claude Code's
193
- * DEFAULT (bare-slug) 200K window, every subagent at the same 200K default,
194
- * a `gpt-5.6-sol`/medium Advisor (bare slug), and a `grok-4.6`/medium primary
195
- * Oracle. Oracle-only peer set (no `astra`), same exact four-agent surface
196
- * and authority structure as the cheap family minus `implementer`.
197
- *
198
- * This module is deliberately dependency-free, including its own delegation
199
- * graph literal: balanced shares cheap's authority shape today, but each
200
- * pinned profile owns its graph so tuning one roster cannot silently retune
201
- * another. The PreToolUse ACL reads each profile's own graph.
202
- */
203
- const BALANCED_PROFILE_MODELS = Object.freeze({
204
- lead: "gpt-5.6-sol",
205
- explore: "gpt-5.6-luna",
206
- plan: "gpt-5.6-sol",
207
- "General-Purpose": "gemini-3.8-flash",
208
- reviewer: "gpt-5.6-luna",
209
- advisor: "gpt-5.6-sol",
210
- oracle: "grok-4.6",
211
- astra: "gpt-6-astra"
212
- });
213
- const BALANCED_PROFILE_NATIVE_AGENT_NAMES = [
214
- "Explore",
215
- "Plan",
216
- "General-Purpose",
217
- "reviewer"
218
- ];
219
- const BALANCED_PROFILE_NATIVE_MODELS = Object.freeze({
220
- Explore: BALANCED_PROFILE_MODELS.explore,
221
- Plan: BALANCED_PROFILE_MODELS.plan,
222
- "General-Purpose": BALANCED_PROFILE_MODELS["General-Purpose"],
223
- reviewer: BALANCED_PROFILE_MODELS.reviewer
224
- });
225
- const BALANCED_PROFILE_NATIVE_EFFORTS = Object.freeze({
226
- Explore: "high",
227
- Plan: "high",
228
- "General-Purpose": "high",
229
- reviewer: "max"
230
- });
231
- /**
232
- * Subagent/peer context window (tokens). Every non-lead role (and the lead
233
- * as well) runs at Claude Code's DEFAULT (bare-slug) budget — 200K.
234
- */
235
- const BALANCED_PROFILE_SUBAGENT_CONTEXT_TOKENS = 2e5;
236
- const BALANCED_PROFILE_ADVISOR_MODEL = BALANCED_PROFILE_MODELS.advisor;
237
- BALANCED_PROFILE_MODELS.advisor;
238
- const BALANCED_PROFILE_ORACLE_MODEL = BALANCED_PROFILE_MODELS.oracle;
239
- Object.freeze({
240
- Explore: Object.freeze([]),
241
- Plan: Object.freeze(["Explore", "reviewer"]),
242
- "General-Purpose": Object.freeze(["reviewer"]),
243
- reviewer: Object.freeze([])
244
- });
245
- //#endregion
246
188
  //#region src/lib/one-m-context.ts
247
189
  /**
248
190
  * Context-window threshold at which Claude Code's `[1m]` accounting unlock is
@@ -23268,15 +23210,15 @@ function cheapReviewerModel() {
23268
23210
  if (fastEndpointForModel(found) !== "responses") return void 0;
23269
23211
  return CHEAP_PROFILE_MODELS.reviewer;
23270
23212
  }
23271
- /** Gemini/high Advisor for the cheapest profile at the 200K default window. */
23213
+ /** Sol/medium Advisor for the cheapest profile at the 200K default window. */
23272
23214
  function cheapestAdvisorModel() {
23273
23215
  const found = state.models?.data.find((m) => m.id === CHEAPEST_PROFILE_ADVISOR_MODEL);
23274
23216
  if (!found) return void 0;
23275
23217
  if ((found.capabilities?.limits?.max_context_window_tokens ?? 0) < 2e5) return void 0;
23276
23218
  if (found.capabilities?.supports?.tool_calls !== true) return void 0;
23277
23219
  const efforts = found.capabilities?.supports?.reasoning_effort;
23278
- if (!Array.isArray(efforts) || !efforts.includes("high")) return void 0;
23279
- if (fastEndpointForModel(found) !== "chat") return void 0;
23220
+ if (!Array.isArray(efforts) || !efforts.includes("medium")) return void 0;
23221
+ if (fastEndpointForModel(found) !== "responses") return void 0;
23280
23222
  return CHEAPEST_PROFILE_ADVISOR_MODEL;
23281
23223
  }
23282
23224
  /** Sol/high Oracle for the cheapest profile at the 200K default window. */
@@ -23314,17 +23256,6 @@ function cheapAstraModel() {
23314
23256
  if (fastEndpointForModel(found) !== "responses") return void 0;
23315
23257
  return CHEAP_PROFILE_ASTRA_MODEL;
23316
23258
  }
23317
- /** Sol/high Advisor for the balanced profile at the 200K default window. */
23318
- function balancedAdvisorModel() {
23319
- const found = state.models?.data.find((m) => m.id === BALANCED_PROFILE_ADVISOR_MODEL);
23320
- if (!found) return void 0;
23321
- if ((found.capabilities?.limits?.max_context_window_tokens ?? 0) < 2e5) return void 0;
23322
- if (found.capabilities?.supports?.tool_calls !== true) return void 0;
23323
- const efforts = found.capabilities?.supports?.reasoning_effort;
23324
- if (!Array.isArray(efforts) || !efforts.includes("medium")) return void 0;
23325
- if (fastEndpointForModel(found) !== "responses") return void 0;
23326
- return BALANCED_PROFILE_ADVISOR_MODEL;
23327
- }
23328
23259
  /** Exact Grok 4.6 only: the balanced Oracle at 200K/medium, like cheap. */
23329
23260
  function balancedOracleModel() {
23330
23261
  const found = state.models?.data.find((m) => m.id === BALANCED_PROFILE_ORACLE_MODEL);
@@ -23336,7 +23267,7 @@ function balancedOracleModel() {
23336
23267
  if (fastEndpointForModel(found) !== "responses") return void 0;
23337
23268
  return BALANCED_PROFILE_ORACLE_MODEL;
23338
23269
  }
23339
- /** Luna/max reviewer for the balanced profile at the 200K default window. */
23270
+ /** Gemini/high reviewer for the balanced profile at the 200K default window. */
23340
23271
  function balancedReviewerModel() {
23341
23272
  const found = state.models?.data.find((m) => m.id === BALANCED_PROFILE_MODELS.reviewer);
23342
23273
  if (!found) return void 0;
@@ -23344,7 +23275,7 @@ function balancedReviewerModel() {
23344
23275
  if ((found.capabilities?.limits?.max_context_window_tokens ?? 0) < 2e5) return void 0;
23345
23276
  const efforts = found.capabilities?.supports?.reasoning_effort;
23346
23277
  if (!Array.isArray(efforts) || !efforts.includes(BALANCED_PROFILE_NATIVE_EFFORTS.reviewer)) return void 0;
23347
- if (fastEndpointForModel(found) !== "responses") return void 0;
23278
+ if (fastEndpointForModel(found) !== "chat") return void 0;
23348
23279
  return BALANCED_PROFILE_MODELS.reviewer;
23349
23280
  }
23350
23281
  /**
@@ -25516,18 +25447,18 @@ function fastProfileAdvisorAvailable() {
25516
25447
  return fastEndpointForCatalogId(ADVISOR_FAST_PROFILE_MODEL, state.models?.data) === "responses";
25517
25448
  }
25518
25449
  /** The Advisor model for an authenticated cheapest primary lead:
25519
- * `gemini-3.8-flash` at high effort over its Chat endpoint, transcript
25450
+ * `gpt-5.6-sol` at medium effort over its Responses endpoint, transcript
25520
25451
  * capped at `CHEAPEST_PROFILE_ADVISOR_CONTEXT_TOKENS` (200K). */
25521
25452
  const ADVISOR_CHEAPEST_PROFILE_MODEL = CHEAPEST_PROFILE_ADVISOR_MODEL;
25522
- /** True only when the live Gemini entry satisfies the fixed cheapest
25523
- * transport (Chat Completions). */
25453
+ /** True only when the live Sol entry satisfies the fixed cheapest
25454
+ * transport (Responses). */
25524
25455
  function cheapestProfileAdvisorAvailable() {
25525
- return fastEndpointForCatalogId(ADVISOR_CHEAPEST_PROFILE_MODEL, state.models?.data) === "chat";
25456
+ return fastEndpointForCatalogId(ADVISOR_CHEAPEST_PROFILE_MODEL, state.models?.data) === "responses";
25526
25457
  }
25527
25458
  /** Pick the cheapest Advisor model. Throws when the catalog gate fails so
25528
25459
  * the launch prerequisite surface (not a silent downgrade) owns the error. */
25529
25460
  function resolveCheapestAdvisorModel() {
25530
- if (!cheapestProfileAdvisorAvailable()) throw new Error(`cheapest Advisor invariant failed: ${ADVISOR_CHEAPEST_PROFILE_MODEL} must advertise the Chat Completions endpoint`);
25461
+ if (!cheapestProfileAdvisorAvailable()) throw new Error(`cheapest Advisor invariant failed: ${ADVISOR_CHEAPEST_PROFILE_MODEL} must advertise the Responses endpoint`);
25531
25462
  return {
25532
25463
  model: ADVISOR_CHEAPEST_PROFILE_MODEL,
25533
25464
  escalated: false,
@@ -31628,13 +31559,16 @@ function buildPeerAwarenessSnippet(opts) {
31628
31559
  const astraClause = opts.astraAvailable && (opts.profile === "fast" || opts.profile === "cheap1m") ? ` \`mcp__${fastPeersKey}__astra\` is GPT-6 Astra (${astraDescriptor}), an expensive terminal escalation consultant available to the lead only for hardest dead ends.` : "";
31629
31560
  const searchClause = opts.bluebirdEnabled === true ? `\`mcp__${fastSearchKey}__code\` uses Bluebird for semantic and lexical modes over the checked-out Azure DevOps repository; Bluebird failures stay visible with no local fallback, while exact/regex/AST stay local. \`mcp__${fastSearchKey}__web\` surfaces citable sources.` : opts.semanticSearchAvailable === true ? `\`mcp__${fastSearchKey}__code\` is local ColBERT semantic-first code search (start lexical with mode:"lexical"/"exact" for symbols, filenames, errors, and config keys, then semantic for concepts; semantic falls back lexically while the local index is unavailable) and \`mcp__${fastSearchKey}__web\` surfaces citable sources.` : `\`mcp__${fastSearchKey}__code\` is local lexical code search (mode:"lexical"/"exact" for symbols, filenames, errors, and config keys; no model call) and \`mcp__${fastSearchKey}__web\` surfaces citable sources.`;
31630
31561
  const rosterClause = isCheapest ? "Native Task roster: `Explore` (broad repository discovery spanning more than a couple of files), `Plan` (sequencing, interfaces, migration risk, acceptance criteria in plan mode), `General-Purpose` (mixed investigation and execution, follows a Plan handoff when one exists), and `reviewer` (repo-aware verification of behavior-changing or risk-sensitive changes). 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.";
31562
+ 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; lead/`Plan` narrow scope with search first), `Plan` (sequencing, interfaces, migration risk, acceptance criteria; delegate ONLY when genuinely complex, lead owns planning by default; delegate discovery to `Explore`), `General-Purpose` (mixed execution; delegate FREELY for multi-step work; follows a Plan handoff when one exists and drives 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.";
31563
+ const escalationClause = isBalanced ? `This is the ${profileLabel} launch profile. Funnel unknowns cheapest-first: settle factual claims with \`mcp__${fastSearchKey}__code\` + \`mcp__${fastSearchKey}__web\` search first (narrow scope, rule out hypotheses), then \`Explore\` for targeted breadth, then \`Plan\` only when genuinely complex. \`mcp__${fastPeersKey}__oracle\` is ${oracleDescriptor}, a second opinion for precise, self-contained architectural/spec trade-offs that search and \`Explore\` (and \`Plan\`, where consulted) cannot settle, available to the lead and \`Plan\`; \`reviewer\` and other subagents cannot call Oracle.${astraClause}` : `This is the ${profileLabel} launch profile. Follow an evidence-first escalation ladder: settle factual claims directly through code, tests, and builds. 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 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}`;
31564
+ const delegationClause = isBalanced ? "Native delegation is ACL-scoped: the lead may invoke all four; `Plan` may invoke `Explore` and `reviewer`; `General-Purpose` may invoke `reviewer`; `reviewer` may invoke `Explore` for targeted discovery; `Explore` and `worker-browse` 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`; `Explore`, `reviewer`, and `worker-browse` cannot invoke native subagents.";
31631
31565
  return [
31632
31566
  "## Peer review and advisor",
31633
31567
  "",
31634
- `This is the ${profileLabel} launch profile. Follow an evidence-first escalation ladder: settle factual claims directly through code, tests, and builds. 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 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}`,
31568
+ escalationClause,
31635
31569
  "",
31636
- `${searchClause} ${rosterClause}${browserClause}${workerBrowseClause}${artifactClause}`,
31637
- "Native delegation is ACL-scoped: the lead may invoke all four; `Plan` may invoke `Explore` and `reviewer`; `General-Purpose` may invoke `reviewer`; `Explore`, `reviewer`, and `worker-browse` cannot invoke native subagents."
31570
+ `${searchClause} ${isBalanced ? balancedRosterClause : rosterClause}${isCheapest || isBalanced ? " All roles run at a 200K context window — prefer targeted reads over full file reads." : isCheap ? " The lead runs at 200K on `-m cheap` (1M on `-m cheap1m`) and every subagent runs at 200K — prefer targeted reads over full file reads." : ""}${browserClause}${workerBrowseClause}${artifactClause}`,
31571
+ delegationClause
31638
31572
  ].join("\n");
31639
31573
  }
31640
31574
  const peersKey = key("peers");
@@ -31706,12 +31640,16 @@ function buildPeerAwarenessSummary(opts) {
31706
31640
  const browserClause = opts.browserToolsAvailable ?? opts.browseAvailable ? ` \`mcp__${key("browser")}__*\` provides the opt-in browser.` : "";
31707
31641
  const workerBrowseClause = opts.browseAvailable ? ` \`worker-browse\` runs delegated browsing tasks through \`mcp__${key("workers")}__browse\`.` : "";
31708
31642
  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.` : "";
31643
+ const rosterLine = isCheapest ? `${profileLabel} launch profile. Task roster: \`Explore\` (broad discovery), \`Plan\` (planning in plan mode), \`General-Purpose\` (mixed execution), \`reviewer\` (verification of behavior-changing or risk-sensitive changes). 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.`;
31644
+ const balancedRosterLine = `${profileLabel} launch profile. The lead owns planning, implementation, and verification by default. Task roster: \`Explore\` (targeted breadth when search is insufficient), \`Plan\` (delegate ONLY when genuinely complex), \`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.`;
31645
+ const peerLine = isBalanced ? `\`mcp__${key("peers")}__oracle\` is ${oracleDescriptor}, a second opinion for precise, self-contained architectural/spec trade-offs that search and \`Explore\` (and \`Plan\`, where consulted) cannot settle, for the lead and \`Plan\`.${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}${opts.artifactToolsAvailable ? ` \`mcp__${key("peers")}__artifact_*\` provides human review with plan auto-open.` : ""}` : `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 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}${opts.artifactToolsAvailable ? ` \`mcp__${key("peers")}__artifact_*\` provides human review with plan auto-open.` : ""}`;
31646
+ const summaryDelegation = isBalanced ? "Native delegation is ACL-scoped: the lead may invoke all four; `Plan` may invoke `Explore` and `reviewer`; `General-Purpose` may invoke `reviewer`; `reviewer` may invoke `Explore` for targeted discovery; `Explore` and `worker-browse` 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`; `Explore`, `reviewer`, and `worker-browse` cannot invoke native subagents.";
31709
31647
  return [
31710
31648
  "## Injected capabilities (summary)",
31711
31649
  "",
31712
- isCheapest ? `${profileLabel} launch profile. Task roster: \`Explore\` (broad discovery), \`Plan\` (planning in plan mode), \`General-Purpose\` (mixed execution), \`reviewer\` (verification of behavior-changing or risk-sensitive changes). 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.`,
31713
- "Native delegation is ACL-scoped: the lead may invoke all four; `Plan` may invoke `Explore` and `reviewer`; `General-Purpose` may invoke `reviewer`; `Explore`, `reviewer`, and `worker-browse` cannot invoke native subagents.",
31714
- `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 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}${opts.artifactToolsAvailable ? ` \`mcp__${key("peers")}__artifact_*\` provides human review with plan auto-open.` : ""}`
31650
+ (isBalanced ? balancedRosterLine : rosterLine) + (isCheapest || isBalanced ? " All roles run at a 200K context window — prefer targeted reads over full file reads." : isCheap ? " The lead runs at 200K on `-m cheap` (1M on `-m cheap1m`) and every subagent runs at 200K — prefer targeted reads over full file reads." : ""),
31651
+ summaryDelegation,
31652
+ peerLine
31715
31653
  ].join("\n");
31716
31654
  }
31717
31655
  const renderNative = (name) => {
@@ -33138,6 +33076,6 @@ function enumerateInjectedMcpToolNames(groupKeys, opts = {}) {
33138
33076
  return [...new Set(names)];
33139
33077
  }
33140
33078
  //#endregion
33141
- export { EFFORT_ORDER as $, MAX_RESPONSE_BODY_BYTES as $t, TOOLBELT_TOOLS$1 as A, withOneMSuffix as An, implementerFastModel as At, resolveAdvisorEffort as B, CHEAPEST_PROFILE_NATIVE_EFFORTS as Bn, countTokens as Bt, runWorkerAgent as C, pickClaudeDefault as Cn, fastOracleModel as Ct, toolbeltEnabled as D, classifyMessagesRoute as Dn, fleetToolsEnabled as Dt, buildToolbeltAwareness as E, upstreamMaxConnections as En, fastScoutModel as Et, ADVISOR_TOOL_INSTRUCTIONS as F, BALANCED_PROFILE_NATIVE_MODELS as Fn, scoutModel as Ft, repairKnownThinkingHistory as G, CHEAP_PROFILE_NATIVE_AGENT_NAMES as Gn, findLaunchBySecret as Gt, resolveCheapestAdvisorModel as H, CHEAPEST_PROFILE_SUBAGENT_CONTEXT_TOKENS as Hn, getTextTokenCount as Ht, FAST_ADVISOR_TOOL_INSTRUCTIONS as I, BALANCED_PROFILE_SUBAGENT_CONTEXT_TOKENS as In, scribeModel as It, buildOpenAIErrorEvent as J, CHEAP_PROFILE_SUBAGENT_CONTEXT_TOKENS as Jn, assembleResponsesPayload as Jt, repairRejectedThinkingHistory as K, CHEAP_PROFILE_NATIVE_EFFORTS as Kn, registerLaunch as Kt, buildAdvisorStream as L, CHEAPEST_PROFILE_ADVISOR_CLIENT_MODEL as Ln, standInToolEnabled as Lt, satisfiesMinVersion as M, BALANCED_PROFILE_MODELS as Mn, resolveGeminiReviewModel as Mt, searchWeb as N, BALANCED_PROFILE_NATIVE_AGENT_NAMES as Nn, reviewerFastModel as Nt, toolbeltSkipSet as O, catalogAdvertises1M as On, geminiAvailable as Ot, ADVISOR_INTERNAL_TOOL_NAME as P, BALANCED_PROFILE_NATIVE_EFFORTS as Pn, reviewerModel as Pt, relayAnthropicStream as Q, createChatCompletions as Qt, injectAdvisorTool as R, CHEAPEST_PROFILE_MODELS as Rn, workerToolsEnabled as Rt, resolveWorkerRunOpts as S, isBudgetClaudeLead as Sn, fastGeneralPurposeModel as St, availableToolCommands as T, upstreamAllowH2 as Tn, fastReviewerModel as Tt, formatThinkingRepairDecline as U, CHEAP_PROFILE_ADVISOR_CLIENT_MODEL as Un, getTokenCount as Ut, resolveAdvisorModel as V, CHEAPEST_PROFILE_NATIVE_MODELS as Vn, createMessages as Vt, rememberThinkingHistoryRepair as W, CHEAP_PROFILE_MODELS as Wn, getTokenizerFromModel as Wt, logStreamError as X, resolveMcpToolTimeoutMs as Xt, isControllerClosedError as Y, warnOnTokenPriceDrift as Yt, readIteratorWithTimeout as Z, createResponses as Zt, REVIEW_DEFAULT_MODEL as _, DEFAULT_CODEX_MODEL_FALLBACKS as _n, cheapestAdvisorModel as _t, buildAgentPrompt as a, colbertDegradedWarning as an, agentToolsEnabled as at, resolveDefaultModel as b, UPSTREAM_INACTIVITY_TIMEOUT_MS as bn, fastAdvisorModel as bt, enumerateInjectedMcpToolNames as c, CONDENSED_OPERATING_SEQUENCE as cn, balancedOracleModel as ct, BROWSE_DEFAULT_MODEL as d, collapsePathKeys as dn, browseAgentEnabled as dt, readResponseBodyCapped as en, UNKNOWN_EFFORT_ANCHOR as et, DEFAULT_MODEL_CHAIN as f, toolbeltPathOverride as fn, browserCompoundToolsEnabled as ft, PLAN_DEFAULT_MODEL as g, DEFAULT_CODEX_MODEL as gn, cheapReviewerModel as gt, IMPLEMENT_DEFAULT_MODEL as h, DEFAULT_CLAUDE_MODEL_FALLBACKS as hn, cheapOracleModel as ht, assertMcpToolSurfaceConsistent as i, hasSupportedBrowserInstalled as in, handleMcpPost as it, assetFor as j, withOneMSuffixForLead as jn, nativeSubagentModel as jt, vscodeRipgrepPath as k, oneMContextDisabled as kn, generalPurposeFastModel as kt, maxPersonasFor as l, DEFINITION_OF_GREATNESS as ln, balancedReviewerModel as lt, EXPLORE_DEFAULT_THINKING as m, BUDGET_SMALL_FAST_SLUG as mn, cheapAdvisorModel as mt, MCP_GROUPS as n, normalizeOpenAIUsage as nn, clampEffort as nt, buildPeerAwarenessSnippet as o, provisionAndIndexColbert as on, artifactToolsEnabled as ot, EXPLORE_DEFAULT_MODEL as p, BUDGET_SMALL_FAST_CATALOG_ID as pn, browserToolsEnabled as pt, buildAnthropicErrorEvent as q, CHEAP_PROFILE_NATIVE_MODELS as qn, unregisterLaunch as qt, agentNamesForToolAllowlist as r, provisionBrowserAssets as rn, handleMcpDelete as rt, buildPeerAwarenessSummary as s, semanticSearchOptedIn as sn, balancedAdvisorModel as st, GROUP_META as t, parseJsonOrDiagnose as tn, bucketEffort as tt, personasFor as u, shouldUseInsecureTls as un, brainstormModel as ut, TEST_DEFAULT_MODEL as v, DEFAULT_PORT as vn, cheapestOracleModel as vt, buildEnv as w, resolveLeadSlugArg as wn, fastPlanModel as wt, resolveModeDefaults as x, generateRandomPort as xn, fastAstraModel as xt, appendPlanReminder as y, UPSTREAM_FETCH_TIMEOUT_MS as yn, cheapestReviewerModel as yt, isAdvisorRequested as z, CHEAPEST_PROFILE_NATIVE_AGENT_NAMES as zn, shimDefaultsToXhigh as zt };
33079
+ export { EFFORT_ORDER as $, readResponseBodyCapped as $t, TOOLBELT_TOOLS$1 as A, withOneMSuffixForLead as An, nativeSubagentModel as At, resolveAdvisorEffort as B, CHEAP_PROFILE_NATIVE_EFFORTS as Bn, createMessages as Bt, runWorkerAgent as C, resolveLeadSlugArg as Cn, fastPlanModel as Ct, toolbeltEnabled as D, catalogAdvertises1M as Dn, geminiAvailable as Dt, buildToolbeltAwareness as E, classifyMessagesRoute as En, fleetToolsEnabled as Et, ADVISOR_TOOL_INSTRUCTIONS as F, CHEAPEST_PROFILE_NATIVE_MODELS as Fn, scribeModel as Ft, repairKnownThinkingHistory as G, registerLaunch as Gt, resolveCheapestAdvisorModel as H, CHEAP_PROFILE_SUBAGENT_CONTEXT_TOKENS as Hn, getTokenCount as Ht, FAST_ADVISOR_TOOL_INSTRUCTIONS as I, CHEAPEST_PROFILE_SUBAGENT_CONTEXT_TOKENS as In, standInToolEnabled as It, buildOpenAIErrorEvent as J, warnOnTokenPriceDrift as Jt, repairRejectedThinkingHistory as K, unregisterLaunch as Kt, buildAdvisorStream as L, CHEAP_PROFILE_ADVISOR_CLIENT_MODEL as Ln, workerToolsEnabled as Lt, satisfiesMinVersion as M, CHEAPEST_PROFILE_MODELS as Mn, reviewerFastModel as Mt, searchWeb as N, CHEAPEST_PROFILE_NATIVE_AGENT_NAMES as Nn, reviewerModel as Nt, toolbeltSkipSet as O, oneMContextDisabled as On, generalPurposeFastModel as Ot, ADVISOR_INTERNAL_TOOL_NAME as P, CHEAPEST_PROFILE_NATIVE_EFFORTS as Pn, scoutModel as Pt, relayAnthropicStream as Q, MAX_RESPONSE_BODY_BYTES as Qt, injectAdvisorTool as R, CHEAP_PROFILE_MODELS as Rn, shimDefaultsToXhigh as Rt, resolveWorkerRunOpts as S, pickClaudeDefault as Sn, fastOracleModel as St, availableToolCommands as T, upstreamMaxConnections as Tn, fastScoutModel as Tt, formatThinkingRepairDecline as U, getTokenizerFromModel as Ut, resolveAdvisorModel as V, CHEAP_PROFILE_NATIVE_MODELS as Vn, getTextTokenCount as Vt, rememberThinkingHistoryRepair as W, findLaunchBySecret as Wt, logStreamError as X, createResponses as Xt, isControllerClosedError as Y, resolveMcpToolTimeoutMs as Yt, readIteratorWithTimeout as Z, createChatCompletions as Zt, REVIEW_DEFAULT_MODEL as _, DEFAULT_PORT as _n, cheapestOracleModel as _t, buildAgentPrompt as a, provisionAndIndexColbert as an, agentToolsEnabled as at, resolveDefaultModel as b, generateRandomPort as bn, fastAstraModel as bt, enumerateInjectedMcpToolNames as c, DEFINITION_OF_GREATNESS as cn, balancedReviewerModel as ct, BROWSE_DEFAULT_MODEL as d, toolbeltPathOverride as dn, browserCompoundToolsEnabled as dt, parseJsonOrDiagnose as en, UNKNOWN_EFFORT_ANCHOR as et, DEFAULT_MODEL_CHAIN as f, BUDGET_SMALL_FAST_CATALOG_ID as fn, browserToolsEnabled as ft, PLAN_DEFAULT_MODEL as g, DEFAULT_CODEX_MODEL_FALLBACKS as gn, cheapestAdvisorModel as gt, IMPLEMENT_DEFAULT_MODEL as h, DEFAULT_CODEX_MODEL as hn, cheapReviewerModel as ht, assertMcpToolSurfaceConsistent as i, colbertDegradedWarning as in, handleMcpPost as it, assetFor as j, CHEAPEST_PROFILE_ADVISOR_CLIENT_MODEL as jn, resolveGeminiReviewModel as jt, vscodeRipgrepPath as k, withOneMSuffix as kn, implementerFastModel as kt, maxPersonasFor as l, shouldUseInsecureTls as ln, brainstormModel as lt, EXPLORE_DEFAULT_THINKING as m, DEFAULT_CLAUDE_MODEL_FALLBACKS as mn, cheapOracleModel as mt, MCP_GROUPS as n, provisionBrowserAssets as nn, clampEffort as nt, buildPeerAwarenessSnippet as o, semanticSearchOptedIn as on, artifactToolsEnabled as ot, EXPLORE_DEFAULT_MODEL as p, BUDGET_SMALL_FAST_SLUG as pn, cheapAdvisorModel as pt, buildAnthropicErrorEvent as q, assembleResponsesPayload as qt, agentNamesForToolAllowlist as r, hasSupportedBrowserInstalled as rn, handleMcpDelete as rt, buildPeerAwarenessSummary as s, CONDENSED_OPERATING_SEQUENCE as sn, balancedOracleModel as st, GROUP_META as t, normalizeOpenAIUsage as tn, bucketEffort as tt, personasFor as u, collapsePathKeys as un, browseAgentEnabled as ut, TEST_DEFAULT_MODEL as v, UPSTREAM_FETCH_TIMEOUT_MS as vn, cheapestReviewerModel as vt, buildEnv as w, upstreamAllowH2 as wn, fastReviewerModel as wt, resolveModeDefaults as x, isBudgetClaudeLead as xn, fastGeneralPurposeModel as xt, appendPlanReminder as y, UPSTREAM_INACTIVITY_TIMEOUT_MS as yn, fastAdvisorModel as yt, isAdvisorRequested as z, CHEAP_PROFILE_NATIVE_AGENT_NAMES as zn, countTokens as zt };
33142
33080
 
33143
- //# sourceMappingURL=peer-mcp-personas-CeB2Kcn2.js.map
33081
+ //# sourceMappingURL=peer-mcp-personas-7esbf4L6.js.map