github-router 0.3.322 → 0.3.323

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 (104) hide show
  1. package/dist/{aic-ledger-BW3zMiCx.js → aic-ledger-DRU89gJg.js} +2 -2
  2. package/dist/{aic-ledger-BW3zMiCx.js.map → aic-ledger-DRU89gJg.js.map} +1 -1
  3. package/dist/{attribution-settings-z-U2L7ab.js → attribution-settings-CX-kIrT8.js} +292 -101
  4. package/dist/attribution-settings-CX-kIrT8.js.map +1 -0
  5. package/dist/{auth-Iun7ftd8.js → auth-DSLN1arH.js} +3 -3
  6. package/dist/{auth-Iun7ftd8.js.map → auth-DSLN1arH.js.map} +1 -1
  7. package/dist/browser-ext/manifest.json +1 -1
  8. package/dist/{check-usage-1c-0z3iy.js → check-usage-B_12ALvf.js} +4 -4
  9. package/dist/{check-usage-1c-0z3iy.js.map → check-usage-B_12ALvf.js.map} +1 -1
  10. package/dist/{claude-DtWf7DEw.js → claude-Cq1xGzbI.js} +61 -49
  11. package/dist/claude-Cq1xGzbI.js.map +1 -0
  12. package/dist/{codex-CDtFT-Qp.js → codex-INt1hc_5.js} +5 -5
  13. package/dist/{codex-CDtFT-Qp.js.map → codex-INt1hc_5.js.map} +1 -1
  14. package/dist/{copilot-discount-I6BrT7QE.js → copilot-discount-D8t7Q3Tp.js} +2 -2
  15. package/dist/{copilot-discount-I6BrT7QE.js.map → copilot-discount-D8t7Q3Tp.js.map} +1 -1
  16. package/dist/{debug-CDyXUPcC.js → debug-D8iD6G4O.js} +2 -2
  17. package/dist/{debug-CDyXUPcC.js.map → debug-D8iD6G4O.js.map} +1 -1
  18. package/dist/engine-4uuaURb0.js +2 -0
  19. package/dist/{fast-profile-contract-_DhIWank.js → fast-profile-contract-DmsyQQrw.js} +6 -11
  20. package/dist/fast-profile-contract-DmsyQQrw.js.map +1 -0
  21. package/dist/{gate-discovery-j_hQ1IPc.js → gate-discovery-Z0QyjqM7.js} +5 -5
  22. package/dist/{gate-discovery-j_hQ1IPc.js.map → gate-discovery-Z0QyjqM7.js.map} +1 -1
  23. package/dist/{get-copilot-usage-BWCAzmSc.js → get-copilot-usage-Bs-FEPMf.js} +2 -2
  24. package/dist/{get-copilot-usage-BWCAzmSc.js.map → get-copilot-usage-Bs-FEPMf.js.map} +1 -1
  25. package/dist/hooks.mjs +6 -12
  26. package/dist/hooks.sha256 +1 -1
  27. package/dist/{internal-aic-status-CKXxxb30.js → internal-aic-status-BaUKlisM.js} +3 -3
  28. package/dist/{internal-aic-status-CKXxxb30.js.map → internal-aic-status-BaUKlisM.js.map} +1 -1
  29. package/dist/{internal-artifact-open-CA1trJ15.js → internal-artifact-open-U-Ht7R-O.js} +2 -2
  30. package/dist/{internal-artifact-open-CA1trJ15.js.map → internal-artifact-open-U-Ht7R-O.js.map} +1 -1
  31. package/dist/{internal-fast-dispatch-guard-CZ4BZuAG.js → internal-fast-dispatch-guard-Dnjoj0pV.js} +4 -5
  32. package/dist/internal-fast-dispatch-guard-Dnjoj0pV.js.map +1 -0
  33. package/dist/{internal-fast-dispatch-guard-D5kozMpo.js → internal-fast-dispatch-guard-uztSu0c8.js} +1 -1
  34. package/dist/{internal-first-mate-guard-B_or0eN3.js → internal-first-mate-guard-Dvd1vZ4l.js} +1 -1
  35. package/dist/{internal-first-mate-guard-CiFH6X1H.js → internal-first-mate-guard-mvfZal_M.js} +3 -3
  36. package/dist/{internal-first-mate-guard-CiFH6X1H.js.map → internal-first-mate-guard-mvfZal_M.js.map} +1 -1
  37. package/dist/{internal-max-dispatch-guard-BGOHRYRt.js → internal-max-dispatch-guard-CxG_c3cc.js} +1 -1
  38. package/dist/{internal-max-dispatch-guard-CnBZxo5l.js → internal-max-dispatch-guard-Sp_rCYk_.js} +2 -2
  39. package/dist/{internal-max-dispatch-guard-CnBZxo5l.js.map → internal-max-dispatch-guard-Sp_rCYk_.js.map} +1 -1
  40. package/dist/{internal-plan-review-C73snnD8.js → internal-plan-review-Co01iHOW.js} +3 -3
  41. package/dist/{internal-plan-review-C73snnD8.js.map → internal-plan-review-Co01iHOW.js.map} +1 -1
  42. package/dist/{internal-prompt-submit-dov4UvBo.js → internal-prompt-submit-dflz0bqH.js} +4 -4
  43. package/dist/{internal-prompt-submit-dov4UvBo.js.map → internal-prompt-submit-dflz0bqH.js.map} +1 -1
  44. package/dist/{internal-session-bind-C3hrb9rP.js → internal-session-bind-BVQy7Vd4.js} +2 -2
  45. package/dist/{internal-session-bind-C3hrb9rP.js.map → internal-session-bind-BVQy7Vd4.js.map} +1 -1
  46. package/dist/{internal-stop-hook-BGTPRCtO.js → internal-stop-hook-DihBVzn2.js} +5 -5
  47. package/dist/{internal-stop-hook-BGTPRCtO.js.map → internal-stop-hook-DihBVzn2.js.map} +1 -1
  48. package/dist/{internal-stop-review-MBVYtrYS.js → internal-stop-review-CrnG4IJo.js} +2 -2
  49. package/dist/{internal-stop-review-MBVYtrYS.js.map → internal-stop-review-CrnG4IJo.js.map} +1 -1
  50. package/dist/{internal-worker-guard-dxGawAY3.js → internal-worker-guard-BSoS4wzV.js} +2 -2
  51. package/dist/{internal-worker-guard-dxGawAY3.js.map → internal-worker-guard-BSoS4wzV.js.map} +1 -1
  52. package/dist/{internal-workspace-header-_aEXOz5q.js → internal-workspace-header-booLOzwD.js} +2 -2
  53. package/dist/{internal-workspace-header-_aEXOz5q.js.map → internal-workspace-header-booLOzwD.js.map} +1 -1
  54. package/dist/{lifecycle-CJB2BwSJ.js → lifecycle-BYPEqFdV.js} +2 -2
  55. package/dist/{lifecycle-CJB2BwSJ.js.map → lifecycle-BYPEqFdV.js.map} +1 -1
  56. package/dist/{lifecycle-_BE0SnNs.js → lifecycle-C1LDvDD6.js} +2 -2
  57. package/dist/{lifecycle-_BE0SnNs.js.map → lifecycle-C1LDvDD6.js.map} +1 -1
  58. package/dist/lifecycle-Cz99P30h.js +2 -0
  59. package/dist/lifecycle-DqTFEJpS.js +2 -0
  60. package/dist/main.js +20 -20
  61. package/dist/{mcp-workspace-header-mXRLE8kg.js → mcp-workspace-header-BIW0SRgs.js} +2 -2
  62. package/dist/{mcp-workspace-header-mXRLE8kg.js.map → mcp-workspace-header-BIW0SRgs.js.map} +1 -1
  63. package/dist/{models-CSFIVxAH.js → models-B9tdaM6B.js} +3 -3
  64. package/dist/{models-CSFIVxAH.js.map → models-B9tdaM6B.js.map} +1 -1
  65. package/dist/{orchestration-B8kypXcZ.js → orchestration-DvsdorFq.js} +2 -2
  66. package/dist/{orchestration-B8kypXcZ.js.map → orchestration-DvsdorFq.js.map} +1 -1
  67. package/dist/{paths-CHBAj_t9.js → paths-BnZwolac.js} +4 -4
  68. package/dist/{paths-CHBAj_t9.js.map → paths-BnZwolac.js.map} +1 -1
  69. package/dist/paths-BzM6uxmd.js +2 -0
  70. package/dist/{peer-mcp-personas-Gb0LfII0.js → peer-mcp-personas-DcAErb_d.js} +201 -66
  71. package/dist/peer-mcp-personas-DcAErb_d.js.map +1 -0
  72. package/dist/{plan-review-hook-BMmw7wxR.js → plan-review-hook-BlsGnG02.js} +3 -3
  73. package/dist/{plan-review-hook-BMmw7wxR.js.map → plan-review-hook-BlsGnG02.js.map} +1 -1
  74. package/dist/{prompt-submit-hook-CGgT5m4Q.js → prompt-submit-hook-BJFLzCaT.js} +3 -3
  75. package/dist/{prompt-submit-hook-CGgT5m4Q.js.map → prompt-submit-hook-BJFLzCaT.js.map} +1 -1
  76. package/dist/{provision-DagZEkdZ.js → provision-B-a5KUCL.js} +4 -4
  77. package/dist/{provision-DagZEkdZ.js.map → provision-B-a5KUCL.js.map} +1 -1
  78. package/dist/{self-invocation-DahN1gw9.js → self-invocation-opSXHEs0.js} +2 -2
  79. package/dist/{self-invocation-DahN1gw9.js.map → self-invocation-opSXHEs0.js.map} +1 -1
  80. package/dist/{serve-DOMsmIk-.js → serve-TiUhvpVp.js} +12 -12
  81. package/dist/{serve-DOMsmIk-.js.map → serve-TiUhvpVp.js.map} +1 -1
  82. package/dist/{server-setup-DQVRJluz.js → server-setup-CgbHmupe.js} +186 -49
  83. package/dist/server-setup-CgbHmupe.js.map +1 -0
  84. package/dist/{start-CqSFR_s8.js → start-DNzOFabp.js} +3 -3
  85. package/dist/{start-CqSFR_s8.js.map → start-DNzOFabp.js.map} +1 -1
  86. package/dist/{stop-gate-hook-D7N759TG.js → stop-gate-hook-DvNM8zFf.js} +3 -3
  87. package/dist/{stop-gate-hook-D7N759TG.js.map → stop-gate-hook-DvNM8zFf.js.map} +1 -1
  88. package/dist/{stop-gate-policy-C0gt04R0.js → stop-gate-policy-C5pXbY59.js} +2 -2
  89. package/dist/{stop-gate-policy-C0gt04R0.js.map → stop-gate-policy-C5pXbY59.js.map} +1 -1
  90. package/dist/{token-86uk6y4P.js → token-Css-ARGL.js} +2 -2
  91. package/dist/{token-86uk6y4P.js.map → token-Css-ARGL.js.map} +1 -1
  92. package/dist/{worker-dispatch-B-OA7tvU.js → worker-dispatch-DwS99DXz.js} +2 -2
  93. package/dist/{worker-dispatch-B-OA7tvU.js.map → worker-dispatch-DwS99DXz.js.map} +1 -1
  94. package/package.json +1 -1
  95. package/dist/attribution-settings-z-U2L7ab.js.map +0 -1
  96. package/dist/claude-DtWf7DEw.js.map +0 -1
  97. package/dist/engine-DA5laGIh.js +0 -2
  98. package/dist/fast-profile-contract-_DhIWank.js.map +0 -1
  99. package/dist/internal-fast-dispatch-guard-CZ4BZuAG.js.map +0 -1
  100. package/dist/lifecycle-D0KsoSqz.js +0 -2
  101. package/dist/lifecycle-DimEguJO.js +0 -2
  102. package/dist/paths-eHoOwFzZ.js +0 -2
  103. package/dist/peer-mcp-personas-Gb0LfII0.js.map +0 -1
  104. package/dist/server-setup-DQVRJluz.js.map +0 -1
@@ -1,18 +1,18 @@
1
1
  import { n as explicitPackageRoot } from "./package-root-B-osctCk.js";
2
2
  import { t as getPackageVersion } from "./version-C8x2hQrZ.js";
3
- import { t as PATHS } from "./paths-CHBAj_t9.js";
3
+ import { t as PATHS } from "./paths-BnZwolac.js";
4
4
  import { t as state } from "./state-BlMpEFAt.js";
5
- import { C as GITHUB_GRAPHQL_URL, D as githubAgentGraphQLHeaders, E as copilotVersion, O as githubAgentHeaders, S as GITHUB_API_BASE_URL, T as copilotHeaders, b as sanitizeTransportText, d as resolveModel, f as sleep$2, g as HTTPError, h as isAllowedCopilotHost, i as tryRefreshAndRetry, v as classifyTransportError, w as copilotBaseUrl, x as withTransientRetry, y as fetchWithTransientRetry } from "./token-86uk6y4P.js";
5
+ import { C as GITHUB_GRAPHQL_URL, D as githubAgentGraphQLHeaders, E as copilotVersion, O as githubAgentHeaders, S as GITHUB_API_BASE_URL, T as copilotHeaders, b as sanitizeTransportText, d as resolveModel, f as sleep$2, g as HTTPError, h as isAllowedCopilotHost, i as tryRefreshAndRetry, v as classifyTransportError, w as copilotBaseUrl, x as withTransientRetry, y as fetchWithTransientRetry } from "./token-Css-ARGL.js";
6
6
  import { a as parseIntEnv, i as parseBoolEnv, l as runManagedExeCapture, o as resolveExecutable, u as spawnTaskkillBestEffort } from "./exec-COUT4QsS.js";
7
- 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-_DhIWank.js";
7
+ 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";
8
8
  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-Bl7I_EOC.js";
9
- import { i as registerExitHandlers$1, n as getInstanceUuid, r as recordWorkerRepo, t as WorktreeRegistry } from "./lifecycle-CJB2BwSJ.js";
10
- import { t as MCP_WORKSPACE_HEADER } from "./mcp-workspace-header-mXRLE8kg.js";
9
+ import { i as registerExitHandlers$1, n as getInstanceUuid, r as recordWorkerRepo, t as WorktreeRegistry } from "./lifecycle-BYPEqFdV.js";
10
+ import { t as MCP_WORKSPACE_HEADER } from "./mcp-workspace-header-BIW0SRgs.js";
11
11
  import { n as ArtifactError, r as applyInsecureTls, t as ArtifactClient } from "./client-CQMfroGV.js";
12
- import { n as isPidAlive$1, r as registerColbertExitHandlers, s as trackChild, t as getColbertInstanceUuid } from "./lifecycle-_BE0SnNs.js";
13
- import { a as extractAndRecordPricedAic, i as extractAndRecordAic, l as recordAic, p as extractCopilotUsage } from "./aic-ledger-BW3zMiCx.js";
14
- import { h as runGateChecks, m as sealedGateIds, p as resolveSealedGate } from "./stop-gate-hook-D7N759TG.js";
15
- import { t as liveExec } from "./orchestration-B8kypXcZ.js";
12
+ import { n as isPidAlive$1, r as registerColbertExitHandlers, s as trackChild, t as getColbertInstanceUuid } from "./lifecycle-C1LDvDD6.js";
13
+ import { a as extractAndRecordPricedAic, i as extractAndRecordAic, l as recordAic, p as extractCopilotUsage } from "./aic-ledger-DRU89gJg.js";
14
+ import { h as runGateChecks, m as sealedGateIds, p as resolveSealedGate } from "./stop-gate-hook-DvNM8zFf.js";
15
+ import { t as liveExec } from "./orchestration-DvsdorFq.js";
16
16
  import { createRequire } from "node:module";
17
17
  import consola from "consola";
18
18
  import { chmodSync, closeSync, constants, cpSync, existsSync, mkdirSync, openSync, readFileSync, readdirSync, realpathSync, renameSync, rmSync, statSync, unlinkSync, writeFileSync, writeSync } from "node:fs";
@@ -101,12 +101,31 @@ async function tryCreateLock(p) {
101
101
  }
102
102
  //#endregion
103
103
  //#region src/lib/cheap-profile-contract.ts
104
+ /**
105
+ * Fixed identities for the literal `github-router claude -m cheap` and
106
+ * `-m cheap1m` cheap-family profiles.
107
+ *
108
+ * A cost-lean sibling of `-m fast`: identical fixed four-agent surface, but
109
+ * every SUBAGENT runs at Claude Code's 200K DEFAULT context window (bare
110
+ * slug, no `[1m]` accounting bracket). `-m cheap` also drives the Gemini
111
+ * LEAD at the same 200K default (bare slug, no `[1m]`) with medium effort,
112
+ * so its only peer is the `grok-4.6`/medium Oracle. `-m cheap1m` is the named successor of the
113
+ * original cheap launch: the leader keeps its full 1M window (`[1m]`) and
114
+ * the `astra` peer (`gpt-6-astra`) remains available next to Oracle — still
115
+ * at the 200K default window and medium effort.
116
+ *
117
+ * This module is deliberately dependency-free, including its own delegation
118
+ * graph literal: the cheap family shares fast's exact authority shape today,
119
+ * but each pinned profile owns its graph so tuning one roster cannot silently
120
+ * retune another. Launch validation, request routing, native-agent
121
+ * generation, and the PreToolUse ACL all import the same literals so a role
122
+ * cannot silently mean different things at each boundary.
123
+ */
104
124
  const CHEAP_PROFILE_MODELS = Object.freeze({
105
125
  lead: "gemini-3.8-flash",
106
126
  explore: "gpt-5.6-luna",
107
127
  plan: "gpt-5.6-sol",
108
- "general-purpose": "gpt-5.6-luna",
109
- implementer: "gemini-3.8-flash",
128
+ "General-Purpose": "gemini-3.8-flash",
110
129
  reviewer: "gpt-5.6-luna",
111
130
  advisor: "gpt-5.6-sol",
112
131
  oracle: "grok-4.6",
@@ -115,22 +134,19 @@ const CHEAP_PROFILE_MODELS = Object.freeze({
115
134
  const CHEAP_PROFILE_NATIVE_AGENT_NAMES = [
116
135
  "Explore",
117
136
  "Plan",
118
- "general-purpose",
119
- "implementer",
137
+ "General-Purpose",
120
138
  "reviewer"
121
139
  ];
122
140
  const CHEAP_PROFILE_NATIVE_MODELS = Object.freeze({
123
141
  Explore: CHEAP_PROFILE_MODELS.explore,
124
142
  Plan: CHEAP_PROFILE_MODELS.plan,
125
- "general-purpose": CHEAP_PROFILE_MODELS["general-purpose"],
126
- implementer: CHEAP_PROFILE_MODELS.implementer,
143
+ "General-Purpose": CHEAP_PROFILE_MODELS["General-Purpose"],
127
144
  reviewer: CHEAP_PROFILE_MODELS.reviewer
128
145
  });
129
146
  const CHEAP_PROFILE_NATIVE_EFFORTS = Object.freeze({
130
147
  Explore: "high",
131
148
  Plan: "high",
132
- "general-purpose": "max",
133
- implementer: "high",
149
+ "General-Purpose": "max",
134
150
  reviewer: "max"
135
151
  });
136
152
  /**
@@ -159,14 +175,33 @@ const CHEAP_PROFILE_ORACLE_EFFORT = "medium";
159
175
  * astra peer). Runs at the 200K default window and medium effort. */
160
176
  const CHEAP_PROFILE_ASTRA_MODEL = CHEAP_PROFILE_MODELS.astra;
161
177
  const CHEAP_PROFILE_ASTRA_EFFORT = "medium";
178
+ Object.freeze({
179
+ Explore: Object.freeze([]),
180
+ Plan: Object.freeze(["Explore", "reviewer"]),
181
+ "General-Purpose": Object.freeze(["reviewer"]),
182
+ reviewer: Object.freeze([])
183
+ });
162
184
  //#endregion
163
185
  //#region src/lib/cheapest-profile-contract.ts
186
+ /**
187
+ * Fixed identities for the literal `github-router claude -m cheapest` profile.
188
+ *
189
+ * The cheapest all-200K tier: a `gpt-5.6-luna`/max LEAD at Claude Code's
190
+ * DEFAULT (bare-slug) 200K window, every subagent at the same 200K default,
191
+ * a `gemini-3.8-flash`/high Advisor (bare slug), and a `gpt-5.6-sol`/high
192
+ * primary Oracle. Oracle-only peer set (no `astra`), same exact four-agent
193
+ * surface and authority structure as the cheap family.
194
+ *
195
+ * This module is deliberately dependency-free, including its own delegation
196
+ * graph literal: cheapest shares the cheap family's authority shape today,
197
+ * but each pinned profile owns its graph so tuning one roster cannot silently
198
+ * retune another.
199
+ */
164
200
  const CHEAPEST_PROFILE_MODELS = Object.freeze({
165
201
  lead: "gpt-5.6-luna",
166
202
  explore: "gpt-5.6-luna",
167
203
  plan: "gpt-5.6-sol",
168
- "general-purpose": "gpt-5.6-luna",
169
- implementer: "gpt-5.6-luna",
204
+ "General-Purpose": "gpt-5.6-luna",
170
205
  reviewer: "gemini-3.8-flash",
171
206
  advisor: "gemini-3.8-flash",
172
207
  oracle: "gpt-5.6-sol"
@@ -174,22 +209,19 @@ const CHEAPEST_PROFILE_MODELS = Object.freeze({
174
209
  const CHEAPEST_PROFILE_NATIVE_AGENT_NAMES = [
175
210
  "Explore",
176
211
  "Plan",
177
- "general-purpose",
178
- "implementer",
212
+ "General-Purpose",
179
213
  "reviewer"
180
214
  ];
181
215
  const CHEAPEST_PROFILE_NATIVE_MODELS = Object.freeze({
182
216
  Explore: CHEAPEST_PROFILE_MODELS.explore,
183
217
  Plan: CHEAPEST_PROFILE_MODELS.plan,
184
- "general-purpose": CHEAPEST_PROFILE_MODELS["general-purpose"],
185
- implementer: CHEAPEST_PROFILE_MODELS.implementer,
218
+ "General-Purpose": CHEAPEST_PROFILE_MODELS["General-Purpose"],
186
219
  reviewer: CHEAPEST_PROFILE_MODELS.reviewer
187
220
  });
188
221
  const CHEAPEST_PROFILE_NATIVE_EFFORTS = Object.freeze({
189
222
  Explore: "high",
190
223
  Plan: "high",
191
- "general-purpose": "xhigh",
192
- implementer: "max",
224
+ "General-Purpose": "max",
193
225
  reviewer: "high"
194
226
  });
195
227
  /**
@@ -207,6 +239,70 @@ const CHEAPEST_PROFILE_ADVISOR_MODEL = CHEAPEST_PROFILE_MODELS.advisor;
207
239
  const CHEAPEST_PROFILE_ADVISOR_CLIENT_MODEL = CHEAPEST_PROFILE_MODELS.advisor;
208
240
  const CHEAPEST_PROFILE_ORACLE_MODEL = CHEAPEST_PROFILE_MODELS.oracle;
209
241
  const CHEAPEST_PROFILE_ORACLE_EFFORT = "high";
242
+ Object.freeze({
243
+ Explore: Object.freeze([]),
244
+ Plan: Object.freeze(["Explore", "reviewer"]),
245
+ "General-Purpose": Object.freeze(["reviewer"]),
246
+ reviewer: Object.freeze([])
247
+ });
248
+ //#endregion
249
+ //#region src/lib/balanced-profile-contract.ts
250
+ /**
251
+ * Fixed identities for the literal `github-router claude -m balanced` profile.
252
+ *
253
+ * The most-complex-tasks tier: a `gpt-5.6-sol`/medium LEAD at Claude Code's
254
+ * DEFAULT (bare-slug) 200K window, every subagent at the same 200K default,
255
+ * a `gpt-5.6-sol`/medium Advisor (bare slug), and a `grok-4.6`/medium primary
256
+ * Oracle. Oracle-only peer set (no `astra`), same exact four-agent surface
257
+ * and authority structure as the cheap family minus `implementer`.
258
+ *
259
+ * This module is deliberately dependency-free, including its own delegation
260
+ * graph literal: balanced shares cheap's authority shape today, but each
261
+ * pinned profile owns its graph so tuning one roster cannot silently retune
262
+ * another. The PreToolUse ACL reads each profile's own graph.
263
+ */
264
+ const BALANCED_PROFILE_MODELS = Object.freeze({
265
+ lead: "gpt-5.6-sol",
266
+ explore: "gpt-5.6-luna",
267
+ plan: "gpt-5.6-sol",
268
+ "General-Purpose": "gemini-3.8-flash",
269
+ reviewer: "gpt-5.6-luna",
270
+ advisor: "gpt-5.6-sol",
271
+ oracle: "grok-4.6",
272
+ astra: "gpt-6-astra"
273
+ });
274
+ const BALANCED_PROFILE_NATIVE_AGENT_NAMES = [
275
+ "Explore",
276
+ "Plan",
277
+ "General-Purpose",
278
+ "reviewer"
279
+ ];
280
+ const BALANCED_PROFILE_NATIVE_MODELS = Object.freeze({
281
+ Explore: BALANCED_PROFILE_MODELS.explore,
282
+ Plan: BALANCED_PROFILE_MODELS.plan,
283
+ "General-Purpose": BALANCED_PROFILE_MODELS["General-Purpose"],
284
+ reviewer: BALANCED_PROFILE_MODELS.reviewer
285
+ });
286
+ const BALANCED_PROFILE_NATIVE_EFFORTS = Object.freeze({
287
+ Explore: "high",
288
+ Plan: "high",
289
+ "General-Purpose": "high",
290
+ reviewer: "max"
291
+ });
292
+ /**
293
+ * Subagent/peer context window (tokens). Every non-lead role (and the lead
294
+ * as well) runs at Claude Code's DEFAULT (bare-slug) budget — 200K.
295
+ */
296
+ const BALANCED_PROFILE_SUBAGENT_CONTEXT_TOKENS = 2e5;
297
+ const BALANCED_PROFILE_ADVISOR_MODEL = BALANCED_PROFILE_MODELS.advisor;
298
+ BALANCED_PROFILE_MODELS.advisor;
299
+ const BALANCED_PROFILE_ORACLE_MODEL = BALANCED_PROFILE_MODELS.oracle;
300
+ Object.freeze({
301
+ Explore: Object.freeze([]),
302
+ Plan: Object.freeze(["Explore", "reviewer"]),
303
+ "General-Purpose": Object.freeze(["reviewer"]),
304
+ reviewer: Object.freeze([])
305
+ });
210
306
  //#endregion
211
307
  //#region src/lib/one-m-context.ts
212
308
  /**
@@ -582,6 +678,12 @@ const CHEAP_LEAD_MODEL = CHEAP_PROFILE_MODELS.lead;
582
678
  * the default budget.
583
679
  */
584
680
  const CHEAPEST_LEAD_MODEL = CHEAPEST_PROFILE_MODELS.lead;
681
+ /**
682
+ * The lead `-m balanced` selects. Sol at the 200K DEFAULT window (BARE
683
+ * slug, no `[1m]`) — the most-complex-tasks tier runs every role, lead
684
+ * included, at the default budget.
685
+ */
686
+ const BALANCED_LEAD_MODEL = BALANCED_PROFILE_MODELS.lead;
585
687
  /** Small/fast tier for a budget lead, in the two forms this codebase needs.
586
688
  *
587
689
  * `SLUG` is the Anthropic-published DASHED form and is what goes into
@@ -604,15 +706,18 @@ const BUDGET_SMALL_FAST_CATALOG_ID = "claude-haiku-4.5";
604
706
  * leader at the 200K DEFAULT window, no astra peer)
605
707
  * - `cheapest` → `CHEAPEST_LEAD_MODEL` BARE (the cheapest launch: Luna
606
708
  * leader at the 200K DEFAULT window, no astra peer)
709
+ * - `balanced` → `BALANCED_LEAD_MODEL` BARE (the most-complex-tasks
710
+ * launch: Sol leader at the 200K DEFAULT window, Grok
711
+ * Oracle, no astra peer)
607
712
  * - `N.M` → the best variant of that Opus family, via `pickClaudeDefault`
608
713
  * - a full slug → unchanged, including Copilot slugs a power user pins
609
714
  * - absent → the ordinary default
610
715
  *
611
- * Every branch except `cheap`/`cheapest` is `[1m]`-decorated against the
716
+ * Every branch except `cheap`/`cheapest`/`balanced` is `[1m]`-decorated against the
612
717
  * live catalog, by `pickClaudeDefault` on the two Opus-family branches and
613
718
  * by `withOneMSuffixForLead` on the rest — the decoration is catalog-gated
614
719
  * per model, so a genuinely 200K model (`claude-haiku-4-5`) still comes back
615
- * bare. `cheap`/`cheapest` deliberately skip the decoration entirely because
720
+ * bare. `cheap`/`cheapest`/`balanced` deliberately skip the decoration entirely because
616
721
  * their whole cost lever is the 200K default lead window.
617
722
  *
618
723
  * `fast` resolves to an ordinary slug rather than setting a mode flag —
@@ -638,6 +743,7 @@ function resolveLeadSlugArg(modelArg) {
638
743
  if (arg.toLowerCase() === "cheap1m") return withOneMSuffixForLead(CHEAP_LEAD_MODEL);
639
744
  if (arg.toLowerCase() === "cheap") return CHEAP_LEAD_MODEL;
640
745
  if (arg.toLowerCase() === "cheapest") return CHEAPEST_LEAD_MODEL;
746
+ if (arg.toLowerCase() === "balanced") return BALANCED_LEAD_MODEL;
641
747
  const opusFamilyShorthand = arg.match(/^(\d+\.\d+)$/)?.[1];
642
748
  if (opusFamilyShorthand) return pickClaudeDefault(opusFamilyShorthand);
643
749
  return withOneMSuffixForLead(arg);
@@ -19095,7 +19201,7 @@ function logAudit$1(record) {
19095
19201
  try {
19096
19202
  const fs = await import("node:fs/promises");
19097
19203
  const path = await import("node:path");
19098
- const { PATHS } = await import("./paths-eHoOwFzZ.js");
19204
+ const { PATHS } = await import("./paths-BzM6uxmd.js");
19099
19205
  const dir = path.join(PATHS.APP_DIR, "browser-mcp");
19100
19206
  await fs.mkdir(dir, { recursive: true });
19101
19207
  const line = JSON.stringify({
@@ -27888,8 +27994,8 @@ function generalPurposeFastModel() {
27888
27994
  /** @deprecated Fast `scout` was renamed to capitalized `Explore`. */
27889
27995
  const FAST_SCOUT_MODEL = FAST_PROFILE_NATIVE_MODELS.Explore;
27890
27996
  const FAST_PLAN_MODEL = FAST_PROFILE_NATIVE_MODELS.Plan;
27891
- const FAST_GENERAL_PURPOSE_MODEL = FAST_PROFILE_NATIVE_MODELS["general-purpose"];
27892
- const FAST_IMPLEMENTER_MODEL = FAST_PROFILE_NATIVE_MODELS.implementer;
27997
+ const FAST_GENERAL_PURPOSE_MODEL = FAST_PROFILE_NATIVE_MODELS["General-Purpose"];
27998
+ FAST_PROFILE_MODELS.gemini;
27893
27999
  /** Grok 4.6 advertises 500K total context / 372K max prompt, so it remains bare
27894
28000
  * and is gated by max_prompt_tokens rather than the 1M floor. */
27895
28001
  const FAST_REVIEWER_MODEL = FAST_PROFILE_NATIVE_MODELS.reviewer;
@@ -27898,8 +28004,8 @@ const FAST_ORACLE_MODEL = FAST_PROFILE_ORACLE_MODEL;
27898
28004
  /** Fixed effort pins for the fast profile. */
27899
28005
  const FAST_EXPLORE_EFFORT = FAST_PROFILE_NATIVE_EFFORTS.Explore;
27900
28006
  const FAST_PLAN_EFFORT = FAST_PROFILE_NATIVE_EFFORTS.Plan;
27901
- const FAST_GENERAL_PURPOSE_EFFORT = FAST_PROFILE_NATIVE_EFFORTS["general-purpose"];
27902
- const FAST_IMPLEMENTER_EFFORT = FAST_PROFILE_NATIVE_EFFORTS.implementer;
28007
+ const FAST_GENERAL_PURPOSE_EFFORT = FAST_PROFILE_NATIVE_EFFORTS["General-Purpose"];
28008
+ FAST_PROFILE_NATIVE_EFFORTS["General-Purpose"];
27903
28009
  const FAST_REVIEWER_EFFORT = FAST_PROFILE_NATIVE_EFFORTS.reviewer;
27904
28010
  const FAST_ORACLE_EFFORT = FAST_PROFILE_ORACLE_EFFORT;
27905
28011
  const FAST_ADVISOR_EFFORT = FAST_PROFILE_ADVISOR_EFFORT;
@@ -27935,17 +28041,6 @@ function fastGeneralPurposeModel() {
27935
28041
  const found = state.models?.data.find((m) => m.id === id);
27936
28042
  const efforts = found?.capabilities?.supports?.reasoning_effort;
27937
28043
  if (!Array.isArray(efforts) || !efforts.includes(FAST_GENERAL_PURPOSE_EFFORT)) return void 0;
27938
- return found && fastEndpointForModel(found) === "responses" ? id : void 0;
27939
- }
27940
- function fastImplementerModel() {
27941
- const id = firstPresentInCatalog([FAST_IMPLEMENTER_MODEL], {
27942
- requireToolCalls: true,
27943
- minContextTokens: ONE_M_TOKENS
27944
- });
27945
- if (!id) return void 0;
27946
- const found = state.models?.data.find((m) => m.id === id);
27947
- const efforts = found?.capabilities?.supports?.reasoning_effort;
27948
- if (!Array.isArray(efforts) || !efforts.includes(FAST_IMPLEMENTER_EFFORT)) return void 0;
27949
28044
  return found && fastEndpointForModel(found) === "chat" ? id : void 0;
27950
28045
  }
27951
28046
  /** Sonnet 5 1M xhigh reviewer for Fast profile. */
@@ -28009,7 +28104,7 @@ function cheapAdvisorModel() {
28009
28104
  if ((found.capabilities?.limits?.max_context_window_tokens ?? 0) < 2e5) return void 0;
28010
28105
  if (found.capabilities?.supports?.tool_calls !== true) return void 0;
28011
28106
  const efforts = found.capabilities?.supports?.reasoning_effort;
28012
- if (!Array.isArray(efforts) || !efforts.includes("high")) return void 0;
28107
+ if (!Array.isArray(efforts) || !efforts.includes("medium")) return void 0;
28013
28108
  if (fastEndpointForModel(found) !== "responses") return void 0;
28014
28109
  return CHEAP_PROFILE_ADVISOR_MODEL;
28015
28110
  }
@@ -28083,6 +28178,39 @@ function cheapAstraModel() {
28083
28178
  if (fastEndpointForModel(found) !== "responses") return void 0;
28084
28179
  return CHEAP_PROFILE_ASTRA_MODEL;
28085
28180
  }
28181
+ /** Sol/high Advisor for the balanced profile at the 200K default window. */
28182
+ function balancedAdvisorModel() {
28183
+ const found = state.models?.data.find((m) => m.id === BALANCED_PROFILE_ADVISOR_MODEL);
28184
+ if (!found) return void 0;
28185
+ if ((found.capabilities?.limits?.max_context_window_tokens ?? 0) < 2e5) return void 0;
28186
+ if (found.capabilities?.supports?.tool_calls !== true) return void 0;
28187
+ const efforts = found.capabilities?.supports?.reasoning_effort;
28188
+ if (!Array.isArray(efforts) || !efforts.includes("medium")) return void 0;
28189
+ if (fastEndpointForModel(found) !== "responses") return void 0;
28190
+ return BALANCED_PROFILE_ADVISOR_MODEL;
28191
+ }
28192
+ /** Exact Grok 4.6 only: the balanced Oracle at 200K/medium, like cheap. */
28193
+ function balancedOracleModel() {
28194
+ const found = state.models?.data.find((m) => m.id === BALANCED_PROFILE_ORACLE_MODEL);
28195
+ if (!found) return void 0;
28196
+ if ((found.capabilities?.limits?.max_context_window_tokens ?? 0) < 2e5) return void 0;
28197
+ if ((found.capabilities?.limits?.max_prompt_tokens ?? 0) <= 0) return void 0;
28198
+ const efforts = found.capabilities?.supports?.reasoning_effort;
28199
+ if (!Array.isArray(efforts) || !efforts.includes("medium")) return void 0;
28200
+ if (fastEndpointForModel(found) !== "responses") return void 0;
28201
+ return BALANCED_PROFILE_ORACLE_MODEL;
28202
+ }
28203
+ /** Luna/max reviewer for the balanced profile at the 200K default window. */
28204
+ function balancedReviewerModel() {
28205
+ const found = state.models?.data.find((m) => m.id === BALANCED_PROFILE_MODELS.reviewer);
28206
+ if (!found) return void 0;
28207
+ if (found.capabilities?.supports?.tool_calls !== true) return void 0;
28208
+ if ((found.capabilities?.limits?.max_context_window_tokens ?? 0) < 2e5) return void 0;
28209
+ const efforts = found.capabilities?.supports?.reasoning_effort;
28210
+ if (!Array.isArray(efforts) || !efforts.includes(BALANCED_PROFILE_NATIVE_EFFORTS.reviewer)) return void 0;
28211
+ if (fastEndpointForModel(found) !== "responses") return void 0;
28212
+ return BALANCED_PROFILE_MODELS.reviewer;
28213
+ }
28086
28214
  /**
28087
28215
  * Gate for the worker tools (`explore`, `review`, `implement`).
28088
28216
  *
@@ -28498,7 +28626,7 @@ function fastToolIsEnabled(tool) {
28498
28626
  }
28499
28627
  /** Shared Fast projection for list and call, including non-persona dispatch kind. */
28500
28628
  function fastAllowsTool(scope, launch, item) {
28501
- if (launch.profileId !== "fast" && launch.profileId !== "cheap" && launch.profileId !== "cheap1m" && launch.profileId !== "cheapest") return true;
28629
+ if (launch.profileId !== "fast" && launch.profileId !== "cheap" && launch.profileId !== "cheap1m" && launch.profileId !== "cheapest" && launch.profileId !== "balanced") return true;
28502
28630
  if (scope !== "all" && item.group !== scope) return false;
28503
28631
  if (!launch.allowedGroups?.has(item.group)) return false;
28504
28632
  if (item.persona) return false;
@@ -28550,12 +28678,13 @@ function toolEntries(scope, launch, audience = "shared") {
28550
28678
  }));
28551
28679
  return [...personaEntries, ...nonPersonaEntries];
28552
28680
  }
28553
- if (launch.profileId === "fast" || launch.profileId === "cheap" || launch.profileId === "cheap1m" || launch.profileId === "cheapest") {
28554
- const isCheap = launch.profileId === "cheap" || launch.profileId === "cheap1m" || launch.profileId === "cheapest";
28681
+ if (launch.profileId === "fast" || launch.profileId === "cheap" || launch.profileId === "cheap1m" || launch.profileId === "cheapest" || launch.profileId === "balanced") {
28682
+ const isCheap = launch.profileId === "cheap" || launch.profileId === "cheap1m" || launch.profileId === "cheapest" || launch.profileId === "balanced";
28555
28683
  const isCheapest = launch.profileId === "cheapest";
28684
+ const isBalanced = launch.profileId === "balanced";
28556
28685
  const astraWired = launch.profileId === "fast" || launch.profileId === "cheap1m";
28557
28686
  const astraAvailable = astraWired && (isCheap && !isCheapest ? cheapAstraModel() : isCheapest ? void 0 : fastAstraModel()) != null;
28558
- const oracleGate = isCheapest ? cheapestOracleModel() : isCheap ? cheapOracleModel() : fastOracleModel();
28687
+ const oracleGate = isCheapest ? cheapestOracleModel() : isBalanced ? balancedOracleModel() : isCheap ? cheapOracleModel() : fastOracleModel();
28559
28688
  const oracleDescriptor = isCheapest ? "GPT-5.6 Sol (200K context, high effort)" : void 0;
28560
28689
  const entries = [];
28561
28690
  if ((scope === "all" || scope === "peers") && launch.allowedGroups?.has("peers") && launch.allowedPersonas?.has("oracle") && oracleGate) entries.push(oracleToolEntry(isCheap, astraAvailable, oracleDescriptor));
@@ -29005,7 +29134,7 @@ async function handleToolsCall(body, scope, launch, audience = "shared", session
29005
29134
  tool: maxTool
29006
29135
  }) : false)) return rpcError(body.id, RPC_METHOD_NOT_FOUND, `tools/call: unknown tool "${name}"`);
29007
29136
  }
29008
- if ((launch.profileId === "fast" || launch.profileId === "cheap" || launch.profileId === "cheap1m" || launch.profileId === "cheapest") && name !== "oracle" && name !== "astra") {
29137
+ if ((launch.profileId === "fast" || launch.profileId === "cheap" || launch.profileId === "cheap1m" || launch.profileId === "cheapest" || launch.profileId === "balanced") && name !== "oracle" && name !== "astra") {
29009
29138
  const fastPersona = activePersonas(launch).find((persona) => persona.toolNameHttp === name);
29010
29139
  const fastTool = NON_PERSONA_MCP_TOOLS.find((tool) => tool.toolNameHttp === name);
29011
29140
  if (!(fastPersona ? fastAllowsTool(scope, launch, {
@@ -29090,13 +29219,14 @@ async function handleToolsCall(body, scope, launch, audience = "shared", session
29090
29219
  release();
29091
29220
  }
29092
29221
  }
29093
- if ((launch.profileId === "fast" || launch.profileId === "cheap" || launch.profileId === "cheap1m" || launch.profileId === "cheapest") && name === "oracle") {
29222
+ if ((launch.profileId === "fast" || launch.profileId === "cheap" || launch.profileId === "cheap1m" || launch.profileId === "cheapest" || launch.profileId === "balanced") && name === "oracle") {
29094
29223
  const isCheapestOracle = launch.profileId === "cheapest";
29095
- const isCheapOracle = launch.profileId === "cheap" || launch.profileId === "cheap1m" || isCheapestOracle;
29224
+ const isBalancedOracle = launch.profileId === "balanced";
29225
+ const isCheapOracle = launch.profileId === "cheap" || launch.profileId === "cheap1m" || isCheapestOracle || isBalancedOracle;
29096
29226
  const oracleModel = isCheapestOracle ? CHEAPEST_PROFILE_ORACLE_MODEL : isCheapOracle ? CHEAP_PROFILE_ORACLE_MODEL : "claude-opus-5";
29097
29227
  const oracleEndpoint = isCheapOracle ? "/v1/responses" : "/v1/messages";
29098
29228
  const oracleEffort = isCheapestOracle ? CHEAPEST_PROFILE_ORACLE_EFFORT : isCheapOracle ? CHEAP_PROFILE_ORACLE_EFFORT : "high";
29099
- if (scope !== "all" && scope !== "peers" || !launch.allowedGroups?.has("peers") || !launch.allowedPersonas?.has("oracle") || !(isCheapestOracle ? cheapestOracleModel() : isCheapOracle ? cheapOracleModel() : fastOracleModel())) return rpcError(body.id, RPC_METHOD_NOT_FOUND, `tools/call: unknown tool "${name}"`);
29229
+ if (scope !== "all" && scope !== "peers" || !launch.allowedGroups?.has("peers") || !launch.allowedPersonas?.has("oracle") || !(isCheapestOracle ? cheapestOracleModel() : isBalancedOracle ? balancedOracleModel() : isCheapOracle ? cheapOracleModel() : fastOracleModel())) return rpcError(body.id, RPC_METHOD_NOT_FOUND, `tools/call: unknown tool "${name}"`);
29100
29230
  const query = typeof args.query === "string" ? args.query.trim() : "";
29101
29231
  const context = typeof args.context === "string" ? args.context.trim() : "";
29102
29232
  if (!query || !context) return rpcError(body.id, RPC_INVALID_PARAMS, "tools/call: oracle requires non-empty arguments.query and arguments.context");
@@ -29163,7 +29293,7 @@ async function handleToolsCall(body, scope, launch, audience = "shared", session
29163
29293
  release();
29164
29294
  }
29165
29295
  }
29166
- if ((launch.profileId === "fast" || launch.profileId === "cheap" || launch.profileId === "cheap1m" || launch.profileId === "cheapest") && PERSONAS_READ.some((p) => p.toolNameHttp === name)) return rpcError(body.id, RPC_METHOD_NOT_FOUND, `tools/call: unknown tool "${name}"`);
29296
+ if ((launch.profileId === "fast" || launch.profileId === "cheap" || launch.profileId === "cheap1m" || launch.profileId === "cheapest" || launch.profileId === "balanced") && PERSONAS_READ.some((p) => p.toolNameHttp === name)) return rpcError(body.id, RPC_METHOD_NOT_FOUND, `tools/call: unknown tool "${name}"`);
29167
29297
  const persona = activePersonas(launch).find((p) => p.toolNameHttp === name);
29168
29298
  const nonPersonaTool = persona ? void 0 : NON_PERSONA_MCP_TOOLS.find((t) => t.toolNameHttp === name);
29169
29299
  if (!persona && !nonPersonaTool) return rpcError(body.id, RPC_METHOD_NOT_FOUND, `tools/call: unknown tool "${name}"`);
@@ -36282,11 +36412,12 @@ function buildPeerAwarenessSnippet(opts) {
36282
36412
  `\`mcp__${searchKey}__code\` provides semantic-first code search and \`mcp__${searchKey}__web\` provides citable web sources. Advisor is transcript-aware, primary-lead-only, and unavailable to native subagents and browse workers; it can detect framing drift but is not independent verification.${browserClause}${workerClause}${decideClause}${fleetClause}${agentsClause}${artifactClause}`
36283
36413
  ].join("\n");
36284
36414
  }
36285
- if (opts.profile === "fast" || opts.profile === "cheap" || opts.profile === "cheap1m" || opts.profile === "cheapest") {
36415
+ if (opts.profile === "fast" || opts.profile === "cheap" || opts.profile === "cheap1m" || opts.profile === "cheapest" || opts.profile === "balanced") {
36286
36416
  const isCheap = opts.profile === "cheap" || opts.profile === "cheap1m";
36287
36417
  const isCheapest = opts.profile === "cheapest";
36288
- const profileLabel = isCheapest ? "cheapest" : isCheap ? "cheap" : "fast";
36289
- const oracleDescriptor = isCheapest ? "GPT-5.6 Sol (200K/high)" : isCheap ? "Grok 4.6 (200K/medium)" : "exact Opus 5 (1M/high)";
36418
+ const isBalanced = opts.profile === "balanced";
36419
+ const profileLabel = isCheapest ? "cheapest" : isCheap ? "cheap" : isBalanced ? "balanced" : "fast";
36420
+ const oracleDescriptor = isCheapest ? "GPT-5.6 Sol (200K/high)" : isCheap || isBalanced ? "Grok 4.6 (200K/medium)" : "exact Opus 5 (1M/high)";
36290
36421
  const astraDescriptor = isCheap && !isCheapest ? "200K/medium" : "200K/high";
36291
36422
  const fastPeersKey = key("peers");
36292
36423
  const fastSearchKey = key("search");
@@ -36295,13 +36426,16 @@ function buildPeerAwarenessSnippet(opts) {
36295
36426
  const browserClause = opts.browserToolsAvailable ?? opts.browseAvailable ? ` \`mcp__${fastBrowserKey}__*\` is the opt-in browser surface.` : "";
36296
36427
  const workerBrowseClause = opts.browseAvailable ? ` \`worker-browse\` runs delegated browsing tasks through \`mcp__${fastWorkersKey}__browse\`.` : "";
36297
36428
  const artifactClause = opts.artifactToolsAvailable ? ` \`mcp__${fastPeersKey}__artifact_*\` provides artifact review with auto-open on plan completion.` : "";
36429
+ 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.` : "";
36430
+ const searchClause = opts.semanticSearchAvailable === true ? `\`mcp__${fastSearchKey}__code\` is semantic-first code search (meaning-ranked; start lexical with mode:"lexical"/"exact" for symbols, filenames, errors, and config keys, then semantic for concepts) and \`mcp__${fastSearchKey}__web\` surfaces citable sources.` : `\`mcp__${fastSearchKey}__code\` is lexical code search (mode:"lexical"/"exact" for symbols, filenames, errors, and config keys; no model call) and \`mcp__${fastSearchKey}__web\` surfaces citable sources.`;
36431
+ 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.";
36298
36432
  return [
36299
36433
  "## Peer review and advisor",
36300
36434
  "",
36301
- `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.${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.` : ""}`,
36435
+ `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}`,
36302
36436
  "",
36303
- `\`mcp__${fastSearchKey}__code\` is semantic-first code search and \`mcp__${fastSearchKey}__web\` surfaces citable sources. 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), \`general-purpose\` (mixed execution), \`implementer\` (bounded coding in a fresh context to preserve lead context), and \`reviewer\` (repo-aware verification after non-trivial changes and always after \`implementer\`). In plan mode, delegate planning to \`Plan\` and do not edit files. Verify claims with concrete repository evidence and tests before declaring done.${browserClause}${workerBrowseClause}${artifactClause}`,
36304
- "Native delegation is ACL-scoped: the lead may invoke all five; `Plan` may invoke `Explore` and `reviewer`; `implementer` and `general-purpose` may invoke `reviewer`; `Explore`, `reviewer`, and `worker-browse` cannot invoke native subagents."
36437
+ `${searchClause} ${rosterClause}${browserClause}${workerBrowseClause}${artifactClause}`,
36438
+ "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."
36305
36439
  ].join("\n");
36306
36440
  }
36307
36441
  const peersKey = key("peers");
@@ -36363,11 +36497,12 @@ function buildPeerAwarenessSummary(opts) {
36363
36497
  "Max native roster: `Explore` for broad discovery; `Plan` for interfaces, sequencing, risks, and acceptance criteria; `general-purpose` for bounded mixed execution; `implementer` for settled coding changes; `reviewer` for repository-aware verification and reproduction; `brainstorm` for materially different open approaches; and `peer-review-coordinator` for several distinct fresh-context review lenses. Configured models are deliberate role defaults.",
36364
36498
  "Native roles can inspect the repository within their listed tools. Fresh-context peers see only the artifact and constraints supplied to them. Advisor is transcript-aware, optional, non-binding, and primary-lead-only; it can identify framing drift but is not independent verification or an approval gate. Detailed routing lives in each role or tool description, and the full gated capability inventory lives in CLAUDE.md."
36365
36499
  ].join("\n");
36366
- if (opts.profile === "fast" || opts.profile === "cheap" || opts.profile === "cheap1m" || opts.profile === "cheapest") {
36500
+ if (opts.profile === "fast" || opts.profile === "cheap" || opts.profile === "cheap1m" || opts.profile === "cheapest" || opts.profile === "balanced") {
36367
36501
  const isCheap = opts.profile === "cheap" || opts.profile === "cheap1m";
36368
36502
  const isCheapest = opts.profile === "cheapest";
36369
- const profileLabel = isCheapest ? "Cheapest" : isCheap ? "Cheap" : "Fast";
36370
- const oracleDescriptor = isCheapest ? "GPT-5.6 Sol (200K/high)" : isCheap ? "Grok 4.6 (200K/medium)" : "exact Opus 5 (1M/high)";
36503
+ const isBalanced = opts.profile === "balanced";
36504
+ const profileLabel = isCheapest ? "Cheapest" : isCheap ? "Cheap" : isBalanced ? "Balanced" : "Fast";
36505
+ const oracleDescriptor = isCheapest ? "GPT-5.6 Sol (200K/high)" : isCheap || isBalanced ? "Grok 4.6 (200K/medium)" : "exact Opus 5 (1M/high)";
36371
36506
  const astraDescriptor = isCheap && !isCheapest ? "200K/medium" : "200K/high";
36372
36507
  const browserClause = opts.browserToolsAvailable ?? opts.browseAvailable ? ` \`mcp__${key("browser")}__*\` provides the opt-in browser.` : "";
36373
36508
  const workerBrowseClause = opts.browseAvailable ? ` \`worker-browse\` runs delegated browsing tasks through \`mcp__${key("workers")}__browse\`.` : "";
@@ -36375,8 +36510,8 @@ function buildPeerAwarenessSummary(opts) {
36375
36510
  return [
36376
36511
  "## Injected capabilities (summary)",
36377
36512
  "",
36378
- `${profileLabel} launch profile. Task roster: \`Explore\` (mandatory parallel discovery delegate), \`Plan\` (planning in plan mode), \`general-purpose\` (mixed execution), \`implementer\` (fresh-context bounded implementation), \`reviewer\` (verification after implementation, always after \`implementer\`). Verify claims with concrete repository evidence and tests before declaring done.`,
36379
- "Native delegation is ACL-scoped: the lead may invoke all five; `Plan` may invoke `Explore` and `reviewer`; `implementer` and `general-purpose` may invoke `reviewer`; `Explore`, `reviewer`, and `worker-browse` cannot invoke native subagents.",
36513
+ 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.`,
36514
+ "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.",
36380
36515
  `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\` and \`mcp__${key("search")}__web\` provide search.${browserClause}${workerBrowseClause}${opts.artifactToolsAvailable ? ` \`mcp__${key("peers")}__artifact_*\` provides human review with plan auto-open.` : ""}`
36381
36516
  ].join("\n");
36382
36517
  }
@@ -37762,6 +37897,6 @@ function enumerateInjectedMcpToolNames(groupKeys, opts = {}) {
37762
37897
  return [...new Set(names)];
37763
37898
  }
37764
37899
  //#endregion
37765
- export { EFFORT_ORDER as $, parseJsonOrDiagnose as $t, TOOLBELT_TOOLS$1 as A, oneMContextDisabled as An, resolveGeminiReviewModel as At, resolveAdvisorEffort as B, CHEAP_PROFILE_MODELS as Bn, getTextTokenCount as Bt, runWorkerAgent as C, isBudgetClaudeLead as Cn, fastReviewerModel as Ct, toolbeltEnabled as D, upstreamMaxConnections as Dn, generalPurposeFastModel as Dt, buildToolbeltAwareness as E, upstreamAllowH2 as En, geminiAvailable as Et, ADVISOR_TOOL_INSTRUCTIONS as F, CHEAPEST_PROFILE_NATIVE_AGENT_NAMES as Fn, standInToolEnabled as Ft, repairKnownThinkingHistory as G, withInstallLock as Gn, unregisterLaunch as Gt, resolveCheapestAdvisorModel as H, CHEAP_PROFILE_NATIVE_EFFORTS as Hn, getTokenizerFromModel as Ht, FAST_ADVISOR_TOOL_INSTRUCTIONS as I, CHEAPEST_PROFILE_NATIVE_EFFORTS as In, workerToolsEnabled as It, buildOpenAIErrorEvent as J, resolveMcpToolTimeoutMs as Jt, repairRejectedThinkingHistory as K, assembleResponsesPayload as Kt, buildAdvisorStream as L, CHEAPEST_PROFILE_NATIVE_MODELS as Ln, shimDefaultsToXhigh as Lt, satisfiesMinVersion as M, withOneMSuffixForLead as Mn, reviewerModel as Mt, searchWeb as N, CHEAPEST_PROFILE_ADVISOR_CLIENT_MODEL as Nn, scoutModel as Nt, toolbeltSkipSet as O, classifyMessagesRoute as On, implementerFastModel as Ot, ADVISOR_INTERNAL_TOOL_NAME as P, CHEAPEST_PROFILE_MODELS as Pn, scribeModel as Pt, relayAnthropicStream as Q, readResponseBodyCapped as Qt, injectAdvisorTool as R, CHEAPEST_PROFILE_SUBAGENT_CONTEXT_TOKENS as Rn, countTokens as Rt, resolveWorkerRunOpts as S, generateRandomPort as Sn, fastPlanModel as St, availableToolCommands as T, resolveLeadSlugArg as Tn, fleetToolsEnabled as Tt, formatThinkingRepairDecline as U, CHEAP_PROFILE_NATIVE_MODELS as Un, findLaunchBySecret as Ut, resolveAdvisorModel as V, CHEAP_PROFILE_NATIVE_AGENT_NAMES as Vn, getTokenCount as Vt, rememberThinkingHistoryRepair as W, CHEAP_PROFILE_SUBAGENT_CONTEXT_TOKENS as Wn, registerLaunch as Wt, logStreamError as X, createChatCompletions as Xt, isControllerClosedError as Y, createResponses as Yt, readIteratorWithTimeout as Z, MAX_RESPONSE_BODY_BYTES as Zt, REVIEW_DEFAULT_MODEL as _, DEFAULT_CODEX_MODEL as _n, fastAdvisorModel as _t, buildAgentPrompt as a, extractTarGzMember as an, agentToolsEnabled as at, resolveDefaultModel as b, UPSTREAM_FETCH_TIMEOUT_MS as bn, fastImplementerModel as bt, enumerateInjectedMcpToolNames as c, provisionTreeSitterAssets as cn, browseAgentEnabled as ct, BROWSE_DEFAULT_MODEL as d, shouldUseInsecureTls as dn, cheapAdvisorModel as dt, normalizeOpenAIUsage as en, UNKNOWN_EFFORT_ANCHOR as et, DEFAULT_MODEL_CHAIN as f, collapsePathKeys as fn, cheapOracleModel as ft, PLAN_DEFAULT_MODEL as g, DEFAULT_CLAUDE_MODEL_FALLBACKS as gn, cheapestReviewerModel as gt, IMPLEMENT_DEFAULT_MODEL as h, BUDGET_SMALL_FAST_SLUG as hn, cheapestOracleModel as ht, assertMcpToolSurfaceConsistent as i, provisionAndIndexColbert as in, handleMcpPost as it, assetFor as j, withOneMSuffix as jn, reviewerFastModel as jt, vscodeRipgrepPath as k, catalogAdvertises1M as kn, nativeSubagentModel as kt, maxPersonasFor as l, CONDENSED_OPERATING_SEQUENCE as ln, browserCompoundToolsEnabled as lt, EXPLORE_DEFAULT_THINKING as m, BUDGET_SMALL_FAST_CATALOG_ID as mn, cheapestAdvisorModel as mt, MCP_GROUPS as n, hasSupportedBrowserInstalled as nn, clampEffort as nt, buildPeerAwarenessSnippet as o, extractZipMember as on, artifactToolsEnabled as ot, EXPLORE_DEFAULT_MODEL as p, toolbeltPathOverride as pn, cheapReviewerModel as pt, buildAnthropicErrorEvent as q, warnOnTokenPriceDrift as qt, agentNamesForToolAllowlist as r, colbertDegradedWarning as rn, handleMcpDelete as rt, buildPeerAwarenessSummary as s, warmTreeSitterPool as sn, brainstormModel as st, GROUP_META as t, provisionBrowserAssets as tn, bucketEffort as tt, personasFor as u, DEFINITION_OF_GREATNESS as un, browserToolsEnabled as ut, TEST_DEFAULT_MODEL as v, DEFAULT_CODEX_MODEL_FALLBACKS as vn, fastAstraModel as vt, buildEnv as w, pickClaudeDefault as wn, fastScoutModel as wt, resolveModeDefaults as x, UPSTREAM_INACTIVITY_TIMEOUT_MS as xn, fastOracleModel as xt, appendPlanReminder as y, DEFAULT_PORT as yn, fastGeneralPurposeModel as yt, isAdvisorRequested as z, CHEAP_PROFILE_ADVISOR_CLIENT_MODEL as zn, createMessages as zt };
37900
+ export { EFFORT_ORDER as $, withInstallLock as $n, MAX_RESPONSE_BODY_BYTES as $t, TOOLBELT_TOOLS$1 as A, upstreamMaxConnections as An, implementerFastModel as At, resolveAdvisorEffort as B, BALANCED_PROFILE_SUBAGENT_CONTEXT_TOKENS as Bn, countTokens as Bt, runWorkerAgent as C, UPSTREAM_FETCH_TIMEOUT_MS as Cn, fastOracleModel as Ct, toolbeltEnabled as D, pickClaudeDefault as Dn, fleetToolsEnabled as Dt, buildToolbeltAwareness as E, isBudgetClaudeLead as En, fastScoutModel as Et, ADVISOR_TOOL_INSTRUCTIONS as F, withOneMSuffixForLead as Fn, scoutModel as Ft, repairKnownThinkingHistory as G, CHEAPEST_PROFILE_NATIVE_MODELS as Gn, findLaunchBySecret as Gt, resolveCheapestAdvisorModel as H, CHEAPEST_PROFILE_MODELS as Hn, getTextTokenCount as Ht, FAST_ADVISOR_TOOL_INSTRUCTIONS as I, BALANCED_PROFILE_MODELS as In, scribeModel as It, buildOpenAIErrorEvent as J, CHEAP_PROFILE_MODELS as Jn, assembleResponsesPayload as Jt, repairRejectedThinkingHistory as K, CHEAPEST_PROFILE_SUBAGENT_CONTEXT_TOKENS as Kn, registerLaunch as Kt, buildAdvisorStream as L, BALANCED_PROFILE_NATIVE_AGENT_NAMES as Ln, standInToolEnabled as Lt, satisfiesMinVersion as M, catalogAdvertises1M as Mn, resolveGeminiReviewModel as Mt, searchWeb as N, oneMContextDisabled as Nn, reviewerFastModel as Nt, toolbeltSkipSet as O, resolveLeadSlugArg as On, geminiAvailable as Ot, ADVISOR_INTERNAL_TOOL_NAME as P, withOneMSuffix as Pn, reviewerModel as Pt, relayAnthropicStream as Q, CHEAP_PROFILE_SUBAGENT_CONTEXT_TOKENS as Qn, createChatCompletions as Qt, injectAdvisorTool as R, BALANCED_PROFILE_NATIVE_EFFORTS as Rn, workerToolsEnabled as Rt, resolveWorkerRunOpts as S, DEFAULT_PORT as Sn, fastGeneralPurposeModel as St, availableToolCommands as T, generateRandomPort as Tn, fastReviewerModel as Tt, formatThinkingRepairDecline as U, CHEAPEST_PROFILE_NATIVE_AGENT_NAMES as Un, getTokenCount as Ut, resolveAdvisorModel as V, CHEAPEST_PROFILE_ADVISOR_CLIENT_MODEL as Vn, createMessages as Vt, rememberThinkingHistoryRepair as W, CHEAPEST_PROFILE_NATIVE_EFFORTS as Wn, getTokenizerFromModel as Wt, logStreamError as X, CHEAP_PROFILE_NATIVE_EFFORTS as Xn, resolveMcpToolTimeoutMs as Xt, isControllerClosedError as Y, CHEAP_PROFILE_NATIVE_AGENT_NAMES as Yn, warnOnTokenPriceDrift as Yt, readIteratorWithTimeout as Z, CHEAP_PROFILE_NATIVE_MODELS as Zn, createResponses as Zt, REVIEW_DEFAULT_MODEL as _, BUDGET_SMALL_FAST_CATALOG_ID as _n, cheapestAdvisorModel as _t, buildAgentPrompt as a, colbertDegradedWarning as an, agentToolsEnabled as at, resolveDefaultModel as b, DEFAULT_CODEX_MODEL as bn, fastAdvisorModel as bt, enumerateInjectedMcpToolNames as c, extractTarGzMember as cn, balancedOracleModel as ct, BROWSE_DEFAULT_MODEL as d, provisionTreeSitterAssets as dn, browseAgentEnabled as dt, readResponseBodyCapped as en, UNKNOWN_EFFORT_ANCHOR as et, DEFAULT_MODEL_CHAIN as f, CONDENSED_OPERATING_SEQUENCE as fn, browserCompoundToolsEnabled as ft, PLAN_DEFAULT_MODEL as g, toolbeltPathOverride as gn, cheapReviewerModel as gt, IMPLEMENT_DEFAULT_MODEL as h, collapsePathKeys as hn, cheapOracleModel as ht, assertMcpToolSurfaceConsistent as i, hasSupportedBrowserInstalled as in, handleMcpPost as it, assetFor as j, classifyMessagesRoute as jn, nativeSubagentModel as jt, vscodeRipgrepPath as k, upstreamAllowH2 as kn, generalPurposeFastModel as kt, maxPersonasFor as l, extractZipMember as ln, balancedReviewerModel as lt, EXPLORE_DEFAULT_THINKING as m, shouldUseInsecureTls 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, DEFINITION_OF_GREATNESS as pn, browserToolsEnabled as pt, buildAnthropicErrorEvent as q, CHEAP_PROFILE_ADVISOR_CLIENT_MODEL 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, warmTreeSitterPool as un, brainstormModel as ut, TEST_DEFAULT_MODEL as v, BUDGET_SMALL_FAST_SLUG as vn, cheapestOracleModel as vt, buildEnv as w, UPSTREAM_INACTIVITY_TIMEOUT_MS as wn, fastPlanModel as wt, resolveModeDefaults as x, DEFAULT_CODEX_MODEL_FALLBACKS as xn, fastAstraModel as xt, appendPlanReminder as y, DEFAULT_CLAUDE_MODEL_FALLBACKS as yn, cheapestReviewerModel as yt, isAdvisorRequested as z, BALANCED_PROFILE_NATIVE_MODELS as zn, shimDefaultsToXhigh as zt };
37766
37901
 
37767
- //# sourceMappingURL=peer-mcp-personas-Gb0LfII0.js.map
37902
+ //# sourceMappingURL=peer-mcp-personas-DcAErb_d.js.map