github-router 0.3.332 → 0.3.333

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-Cu9cYRHf.js} +91 -51
  2. package/dist/attribution-settings-Cu9cYRHf.js.map +1 -0
  3. package/dist/balanced-profile-contract-CqFRoCUe.js +133 -0
  4. package/dist/balanced-profile-contract-CqFRoCUe.js.map +1 -0
  5. package/dist/browser-ext/manifest.json +1 -1
  6. package/dist/{claude-BQQPdXLb.js → claude-BObYdG2J.js} +13 -12
  7. package/dist/claude-BObYdG2J.js.map +1 -0
  8. package/dist/{codex-fW-hbxtT.js → codex-JnNE58nu.js} +4 -4
  9. package/dist/{codex-fW-hbxtT.js.map → codex-JnNE58nu.js.map} +1 -1
  10. package/dist/engine-DApePSq4.js +2 -0
  11. package/dist/{gate-discovery-DbwVeERm.js → gate-discovery-CljRUZjm.js} +2 -2
  12. package/dist/{gate-discovery-DbwVeERm.js.map → gate-discovery-CljRUZjm.js.map} +1 -1
  13. package/dist/hooks.mjs +52 -3
  14. package/dist/hooks.sha256 +1 -1
  15. package/dist/{internal-fast-dispatch-guard-DPR16qUE.js → internal-fast-dispatch-guard-BYRYbsFh.js} +1 -1
  16. package/dist/{internal-fast-dispatch-guard-DoXO3X7P.js → internal-fast-dispatch-guard-BuRlhFek.js} +26 -4
  17. package/dist/internal-fast-dispatch-guard-BuRlhFek.js.map +1 -0
  18. package/dist/{internal-stop-hook-DO8RKfKB.js → internal-stop-hook-Cz88dW5S.js} +2 -2
  19. package/dist/{internal-stop-hook-DO8RKfKB.js.map → internal-stop-hook-Cz88dW5S.js.map} +1 -1
  20. package/dist/main.js +6 -6
  21. package/dist/{peer-mcp-personas-CeB2Kcn2.js → peer-mcp-personas-CorhWEhi.js} +29 -80
  22. package/dist/peer-mcp-personas-CorhWEhi.js.map +1 -0
  23. package/dist/{provision-DZLsyRYh.js → provision-DwNx-PZA.js} +2 -2
  24. package/dist/{provision-DZLsyRYh.js.map → provision-DwNx-PZA.js.map} +1 -1
  25. package/dist/{serve-ik_96Q2Z.js → serve-Cu19zfEL.js} +5 -5
  26. package/dist/{serve-ik_96Q2Z.js.map → serve-Cu19zfEL.js.map} +1 -1
  27. package/dist/{server-setup-CK3O_Hwf.js → server-setup-Dz7chd0b.js} +42 -27
  28. package/dist/server-setup-Dz7chd0b.js.map +1 -0
  29. package/dist/{start-DPOJJSvp.js → start-BvN5FA6O.js} +3 -3
  30. package/dist/{start-DPOJJSvp.js.map → start-BvN5FA6O.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-BvN5FA6O.js").then((m) => m.start),
51
+ claude: () => import("./claude-BObYdG2J.js").then((m) => m.claude),
52
+ codex: () => import("./codex-JnNE58nu.js").then((m) => m.codex),
53
+ serve: () => import("./serve-Cu19zfEL.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-Cz88dW5S.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-BYRYbsFh.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 { C as FAST_PROFILE_ORACLE_EFFORT, S as FAST_PROFILE_NATIVE_MODELS, a as BALANCED_PROFILE_MODELS, g as FAST_PROFILE_ASTRA_MODEL, m as FAST_PROFILE_ADVISOR_MODEL, n as BALANCED_PROFILE_ADVISOR_MODEL, p as FAST_PROFILE_ADVISOR_EFFORT, s as BALANCED_PROFILE_NATIVE_EFFORTS, u as BALANCED_PROFILE_ORACLE_MODEL, w as FAST_PROFILE_ORACLE_MODEL, x as FAST_PROFILE_NATIVE_EFFORTS, y as FAST_PROFILE_MODELS } from "./balanced-profile-contract-CqFRoCUe.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. */
@@ -23336,7 +23278,7 @@ function balancedOracleModel() {
23336
23278
  if (fastEndpointForModel(found) !== "responses") return void 0;
23337
23279
  return BALANCED_PROFILE_ORACLE_MODEL;
23338
23280
  }
23339
- /** Luna/max reviewer for the balanced profile at the 200K default window. */
23281
+ /** Gemini/high reviewer for the balanced profile at the 200K default window. */
23340
23282
  function balancedReviewerModel() {
23341
23283
  const found = state.models?.data.find((m) => m.id === BALANCED_PROFILE_MODELS.reviewer);
23342
23284
  if (!found) return void 0;
@@ -23344,7 +23286,7 @@ function balancedReviewerModel() {
23344
23286
  if ((found.capabilities?.limits?.max_context_window_tokens ?? 0) < 2e5) return void 0;
23345
23287
  const efforts = found.capabilities?.supports?.reasoning_effort;
23346
23288
  if (!Array.isArray(efforts) || !efforts.includes(BALANCED_PROFILE_NATIVE_EFFORTS.reviewer)) return void 0;
23347
- if (fastEndpointForModel(found) !== "responses") return void 0;
23289
+ if (fastEndpointForModel(found) !== "chat") return void 0;
23348
23290
  return BALANCED_PROFILE_MODELS.reviewer;
23349
23291
  }
23350
23292
  /**
@@ -25516,18 +25458,18 @@ function fastProfileAdvisorAvailable() {
25516
25458
  return fastEndpointForCatalogId(ADVISOR_FAST_PROFILE_MODEL, state.models?.data) === "responses";
25517
25459
  }
25518
25460
  /** The Advisor model for an authenticated cheapest primary lead:
25519
- * `gemini-3.8-flash` at high effort over its Chat endpoint, transcript
25461
+ * `gpt-5.6-sol` at medium effort over its Responses endpoint, transcript
25520
25462
  * capped at `CHEAPEST_PROFILE_ADVISOR_CONTEXT_TOKENS` (200K). */
25521
25463
  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). */
25464
+ /** True only when the live Sol entry satisfies the fixed cheapest
25465
+ * transport (Responses). */
25524
25466
  function cheapestProfileAdvisorAvailable() {
25525
- return fastEndpointForCatalogId(ADVISOR_CHEAPEST_PROFILE_MODEL, state.models?.data) === "chat";
25467
+ return fastEndpointForCatalogId(ADVISOR_CHEAPEST_PROFILE_MODEL, state.models?.data) === "responses";
25526
25468
  }
25527
25469
  /** Pick the cheapest Advisor model. Throws when the catalog gate fails so
25528
25470
  * the launch prerequisite surface (not a silent downgrade) owns the error. */
25529
25471
  function resolveCheapestAdvisorModel() {
25530
- if (!cheapestProfileAdvisorAvailable()) throw new Error(`cheapest Advisor invariant failed: ${ADVISOR_CHEAPEST_PROFILE_MODEL} must advertise the Chat Completions endpoint`);
25472
+ if (!cheapestProfileAdvisorAvailable()) throw new Error(`cheapest Advisor invariant failed: ${ADVISOR_CHEAPEST_PROFILE_MODEL} must advertise the Responses endpoint`);
25531
25473
  return {
25532
25474
  model: ADVISOR_CHEAPEST_PROFILE_MODEL,
25533
25475
  escalated: false,
@@ -31628,13 +31570,16 @@ function buildPeerAwarenessSnippet(opts) {
31628
31570
  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
31571
  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
31572
  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.";
31573
+ 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.";
31574
+ 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}`;
31575
+ 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
31576
  return [
31632
31577
  "## Peer review and advisor",
31633
31578
  "",
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}`,
31579
+ escalationClause,
31635
31580
  "",
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."
31581
+ `${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}`,
31582
+ delegationClause
31638
31583
  ].join("\n");
31639
31584
  }
31640
31585
  const peersKey = key("peers");
@@ -31706,12 +31651,16 @@ function buildPeerAwarenessSummary(opts) {
31706
31651
  const browserClause = opts.browserToolsAvailable ?? opts.browseAvailable ? ` \`mcp__${key("browser")}__*\` provides the opt-in browser.` : "";
31707
31652
  const workerBrowseClause = opts.browseAvailable ? ` \`worker-browse\` runs delegated browsing tasks through \`mcp__${key("workers")}__browse\`.` : "";
31708
31653
  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.` : "";
31654
+ 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.`;
31655
+ 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.`;
31656
+ 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.` : ""}`;
31657
+ 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
31658
  return [
31710
31659
  "## Injected capabilities (summary)",
31711
31660
  "",
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.` : ""}`
31661
+ (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." : ""),
31662
+ summaryDelegation,
31663
+ peerLine
31715
31664
  ].join("\n");
31716
31665
  }
31717
31666
  const renderNative = (name) => {
@@ -33138,6 +33087,6 @@ function enumerateInjectedMcpToolNames(groupKeys, opts = {}) {
33138
33087
  return [...new Set(names)];
33139
33088
  }
33140
33089
  //#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 };
33090
+ export { EFFORT_ORDER as $, MAX_RESPONSE_BODY_BYTES as $t, TOOLBELT_TOOLS$1 as A, withOneMSuffix as An, implementerFastModel as At, resolveAdvisorEffort as B, CHEAP_PROFILE_NATIVE_AGENT_NAMES 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, CHEAPEST_PROFILE_NATIVE_EFFORTS as Fn, scoutModel as Ft, repairKnownThinkingHistory as G, findLaunchBySecret as Gt, resolveCheapestAdvisorModel as H, CHEAP_PROFILE_NATIVE_MODELS as Hn, getTextTokenCount as Ht, FAST_ADVISOR_TOOL_INSTRUCTIONS as I, CHEAPEST_PROFILE_NATIVE_MODELS as In, scribeModel as It, buildOpenAIErrorEvent as J, assembleResponsesPayload as Jt, repairRejectedThinkingHistory as K, registerLaunch as Kt, buildAdvisorStream as L, CHEAPEST_PROFILE_SUBAGENT_CONTEXT_TOKENS as Ln, standInToolEnabled as Lt, satisfiesMinVersion as M, CHEAPEST_PROFILE_ADVISOR_CLIENT_MODEL as Mn, resolveGeminiReviewModel as Mt, searchWeb as N, CHEAPEST_PROFILE_MODELS as Nn, reviewerFastModel as Nt, toolbeltSkipSet as O, catalogAdvertises1M as On, geminiAvailable as Ot, ADVISOR_INTERNAL_TOOL_NAME as P, CHEAPEST_PROFILE_NATIVE_AGENT_NAMES as Pn, reviewerModel as Pt, relayAnthropicStream as Q, createChatCompletions as Qt, injectAdvisorTool as R, CHEAP_PROFILE_ADVISOR_CLIENT_MODEL 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_SUBAGENT_CONTEXT_TOKENS as Un, getTokenCount as Ut, resolveAdvisorModel as V, CHEAP_PROFILE_NATIVE_EFFORTS as Vn, createMessages as Vt, rememberThinkingHistoryRepair as W, 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, 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, CHEAP_PROFILE_MODELS as zn, shimDefaultsToXhigh as zt };
33142
33091
 
33143
- //# sourceMappingURL=peer-mcp-personas-CeB2Kcn2.js.map
33092
+ //# sourceMappingURL=peer-mcp-personas-CorhWEhi.js.map