github-router 0.3.314 → 0.3.316

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 (110) hide show
  1. package/dist/{aic-ledger-Cx_Ubon3.js → aic-ledger-BS47yb_C.js} +66 -6
  2. package/dist/aic-ledger-BS47yb_C.js.map +1 -0
  3. package/dist/{attribution-settings-Btc5EZTj.js → attribution-settings-jcsSeVur.js} +120 -21
  4. package/dist/attribution-settings-jcsSeVur.js.map +1 -0
  5. package/dist/{auth-O_UG1ABO.js → auth-JfxL9q7z.js} +4 -4
  6. package/dist/{auth-O_UG1ABO.js.map → auth-JfxL9q7z.js.map} +1 -1
  7. package/dist/browser-ext/manifest.json +1 -1
  8. package/dist/{check-usage-dicJOWML.js → check-usage-DXUEQzt_.js} +4 -4
  9. package/dist/{check-usage-dicJOWML.js.map → check-usage-DXUEQzt_.js.map} +1 -1
  10. package/dist/{claude-D0vuAqTV.js → claude-CJ4Nd2_3.js} +116 -45
  11. package/dist/claude-CJ4Nd2_3.js.map +1 -0
  12. package/dist/{codex-BNm9D0iJ.js → codex-CwuLqNZF.js} +6 -6
  13. package/dist/codex-CwuLqNZF.js.map +1 -0
  14. package/dist/copilot-discount-IbXR5A28.js +220 -0
  15. package/dist/copilot-discount-IbXR5A28.js.map +1 -0
  16. package/dist/{debug-2PgImRnr.js → debug-CA7pg8V9.js} +2 -2
  17. package/dist/{debug-2PgImRnr.js.map → debug-CA7pg8V9.js.map} +1 -1
  18. package/dist/engine-DwrxceOS.js +2 -0
  19. package/dist/{exec-y8C_MU8A.js → exec-COUT4QsS.js} +2 -2
  20. package/dist/{exec-y8C_MU8A.js.map → exec-COUT4QsS.js.map} +1 -1
  21. package/dist/{gate-discovery-CO2njGBB.js → gate-discovery-z04ywOzB.js} +6 -6
  22. package/dist/{gate-discovery-CO2njGBB.js.map → gate-discovery-z04ywOzB.js.map} +1 -1
  23. package/dist/{get-copilot-usage-Cjy8TiFf.js → get-copilot-usage-BMD_cJNT.js} +3 -3
  24. package/dist/{get-copilot-usage-Cjy8TiFf.js.map → get-copilot-usage-BMD_cJNT.js.map} +1 -1
  25. package/dist/hooks.mjs +490 -28
  26. package/dist/hooks.sha256 +1 -1
  27. package/dist/internal-aic-status-BN0xRLSF.js +432 -0
  28. package/dist/internal-aic-status-BN0xRLSF.js.map +1 -0
  29. package/dist/{internal-artifact-open-CxeIfsW_.js → internal-artifact-open-B3stUu74.js} +2 -2
  30. package/dist/{internal-artifact-open-CxeIfsW_.js.map → internal-artifact-open-B3stUu74.js.map} +1 -1
  31. package/dist/{internal-fast-dispatch-guard-D8YNlnuQ.js → internal-fast-dispatch-guard-2QjUlhqO.js} +1 -1
  32. package/dist/{internal-fast-dispatch-guard-19xQEouu.js → internal-fast-dispatch-guard-CAwYj_Yz.js} +2 -2
  33. package/dist/{internal-fast-dispatch-guard-19xQEouu.js.map → internal-fast-dispatch-guard-CAwYj_Yz.js.map} +1 -1
  34. package/dist/{internal-first-mate-guard-BuweUgjb.js → internal-first-mate-guard-B0rbLb0L.js} +3 -3
  35. package/dist/{internal-first-mate-guard-BuweUgjb.js.map → internal-first-mate-guard-B0rbLb0L.js.map} +1 -1
  36. package/dist/{internal-first-mate-guard-Nf1H0mCK.js → internal-first-mate-guard-VgnHBp0s.js} +1 -1
  37. package/dist/{internal-max-dispatch-guard-DZ7KLWxP.js → internal-max-dispatch-guard-BNqQ2wMc.js} +3 -3
  38. package/dist/{internal-max-dispatch-guard-DZ7KLWxP.js.map → internal-max-dispatch-guard-BNqQ2wMc.js.map} +1 -1
  39. package/dist/{internal-max-dispatch-guard-_Pp4LltM.js → internal-max-dispatch-guard-Bz7a2Ntf.js} +1 -1
  40. package/dist/{internal-plan-review-DLduDz41.js → internal-plan-review-QUvNZmMR.js} +3 -3
  41. package/dist/{internal-plan-review-DLduDz41.js.map → internal-plan-review-QUvNZmMR.js.map} +1 -1
  42. package/dist/{internal-prompt-submit-DG94f8E-.js → internal-prompt-submit-fj5ccft_.js} +5 -5
  43. package/dist/{internal-prompt-submit-DG94f8E-.js.map → internal-prompt-submit-fj5ccft_.js.map} +1 -1
  44. package/dist/{internal-session-bind-D6Hpl-84.js → internal-session-bind-0Hmak8PR.js} +2 -2
  45. package/dist/{internal-session-bind-D6Hpl-84.js.map → internal-session-bind-0Hmak8PR.js.map} +1 -1
  46. package/dist/{internal-stop-hook-D56b6iVj.js → internal-stop-hook-UN1JHtjj.js} +6 -6
  47. package/dist/{internal-stop-hook-D56b6iVj.js.map → internal-stop-hook-UN1JHtjj.js.map} +1 -1
  48. package/dist/{internal-stop-review-DlKzZgFm.js → internal-stop-review-8v2llYDB.js} +2 -2
  49. package/dist/{internal-stop-review-DlKzZgFm.js.map → internal-stop-review-8v2llYDB.js.map} +1 -1
  50. package/dist/{internal-worker-guard-D7sfByyo.js → internal-worker-guard-BI4Pl0Ew.js} +2 -2
  51. package/dist/{internal-worker-guard-D7sfByyo.js.map → internal-worker-guard-BI4Pl0Ew.js.map} +1 -1
  52. package/dist/{internal-workspace-header-CU5OjLCB.js → internal-workspace-header-kg9FoNXK.js} +2 -2
  53. package/dist/{internal-workspace-header-CU5OjLCB.js.map → internal-workspace-header-kg9FoNXK.js.map} +1 -1
  54. package/dist/lifecycle-BpqAyaAj.js +2 -0
  55. package/dist/lifecycle-CL2WiyeQ.js +2 -0
  56. package/dist/{lifecycle-CtRA3Y7p.js → lifecycle-Cx1wVrLb.js} +3 -3
  57. package/dist/{lifecycle-CtRA3Y7p.js.map → lifecycle-Cx1wVrLb.js.map} +1 -1
  58. package/dist/{lifecycle-BCnarXJV.js → lifecycle-IwotwedG.js} +2 -2
  59. package/dist/{lifecycle-BCnarXJV.js.map → lifecycle-IwotwedG.js.map} +1 -1
  60. package/dist/main.js +20 -20
  61. package/dist/{max-profile-contract-BcrMlrmo.js → max-profile-contract-Bl7I_EOC.js} +2 -2
  62. package/dist/{max-profile-contract-BcrMlrmo.js.map → max-profile-contract-Bl7I_EOC.js.map} +1 -1
  63. package/dist/{mcp-workspace-header-B60WSR1Y.js → mcp-workspace-header-BYgWioLH.js} +2 -2
  64. package/dist/{mcp-workspace-header-B60WSR1Y.js.map → mcp-workspace-header-BYgWioLH.js.map} +1 -1
  65. package/dist/{models-COuMOfM6.js → models-CVzyU5mJ.js} +3 -3
  66. package/dist/{models-COuMOfM6.js.map → models-CVzyU5mJ.js.map} +1 -1
  67. package/dist/{orchestration-DjLA-lxB.js → orchestration-Dc3mO0G3.js} +3 -3
  68. package/dist/{orchestration-DjLA-lxB.js.map → orchestration-Dc3mO0G3.js.map} +1 -1
  69. package/dist/paths-BXXCVFvA.js +2 -0
  70. package/dist/{paths-De1Qh9Q9.js → paths-CMxlQEfQ.js} +3 -3
  71. package/dist/{paths-De1Qh9Q9.js.map → paths-CMxlQEfQ.js.map} +1 -1
  72. package/dist/{peer-mcp-personas-0_XU6nm9.js → peer-mcp-personas-CQ-0Piyr.js} +175 -54
  73. package/dist/peer-mcp-personas-CQ-0Piyr.js.map +1 -0
  74. package/dist/{plan-review-hook-vL6BYmA8.js → plan-review-hook-BIMwWkh6.js} +4 -4
  75. package/dist/{plan-review-hook-vL6BYmA8.js.map → plan-review-hook-BIMwWkh6.js.map} +1 -1
  76. package/dist/{prompt-submit-hook-DfqufWC1.js → prompt-submit-hook-BcFpjHXg.js} +3 -3
  77. package/dist/{prompt-submit-hook-DfqufWC1.js.map → prompt-submit-hook-BcFpjHXg.js.map} +1 -1
  78. package/dist/{provision-DuCnZJj_.js → provision-_R7ZMygj.js} +5 -5
  79. package/dist/{provision-DuCnZJj_.js.map → provision-_R7ZMygj.js.map} +1 -1
  80. package/dist/{self-invocation-B84JCHps.js → self-invocation-cRl4RqfW.js} +2 -2
  81. package/dist/{self-invocation-B84JCHps.js.map → self-invocation-cRl4RqfW.js.map} +1 -1
  82. package/dist/{serve-DXFVR6A0.js → serve-DU66K5kv.js} +14 -14
  83. package/dist/{serve-DXFVR6A0.js.map → serve-DU66K5kv.js.map} +1 -1
  84. package/dist/{server-setup-CP8nGop3.js → server-setup-iLG8LrfL.js} +168 -30
  85. package/dist/server-setup-iLG8LrfL.js.map +1 -0
  86. package/dist/{start-BHEjESCB.js → start-DQTcm0o_.js} +3 -3
  87. package/dist/{start-BHEjESCB.js.map → start-DQTcm0o_.js.map} +1 -1
  88. package/dist/{state-B8adscCv.js → state-BlMpEFAt.js} +2 -1
  89. package/dist/{state-B8adscCv.js.map → state-BlMpEFAt.js.map} +1 -1
  90. package/dist/{stop-gate-hook-BEU8qQrC.js → stop-gate-hook-BUCxa5Kc.js} +4 -4
  91. package/dist/{stop-gate-hook-BEU8qQrC.js.map → stop-gate-hook-BUCxa5Kc.js.map} +1 -1
  92. package/dist/{stop-gate-policy-qzqXfRxE.js → stop-gate-policy--bpyxxXU.js} +3 -3
  93. package/dist/{stop-gate-policy-qzqXfRxE.js.map → stop-gate-policy--bpyxxXU.js.map} +1 -1
  94. package/dist/{token-CCg-Ov5q.js → token-C1gthnbV.js} +3 -3
  95. package/dist/{token-CCg-Ov5q.js.map → token-C1gthnbV.js.map} +1 -1
  96. package/dist/{worker-dispatch-CH-NN5FW.js → worker-dispatch-DMIdrlsF.js} +2 -2
  97. package/dist/{worker-dispatch-CH-NN5FW.js.map → worker-dispatch-DMIdrlsF.js.map} +1 -1
  98. package/package.json +1 -1
  99. package/dist/aic-ledger-Cx_Ubon3.js.map +0 -1
  100. package/dist/attribution-settings-Btc5EZTj.js.map +0 -1
  101. package/dist/claude-D0vuAqTV.js.map +0 -1
  102. package/dist/codex-BNm9D0iJ.js.map +0 -1
  103. package/dist/engine-DsVZuCrD.js +0 -2
  104. package/dist/internal-aic-status-C_swX3_7.js +0 -95
  105. package/dist/internal-aic-status-C_swX3_7.js.map +0 -1
  106. package/dist/lifecycle-B0USSJvd.js +0 -2
  107. package/dist/lifecycle-CQFjaQc0.js +0 -2
  108. package/dist/paths-DyX6SEnd.js +0 -2
  109. package/dist/peer-mcp-personas-0_XU6nm9.js.map +0 -1
  110. package/dist/server-setup-CP8nGop3.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-De1Qh9Q9.js";
4
- import { t as state } from "./state-B8adscCv.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-CCg-Ov5q.js";
6
- import { a as resolveExecutable, c as runManagedExeCapture, i as parseIntEnv, l as spawnTaskkillBestEffort, r as parseBoolEnv } from "./exec-y8C_MU8A.js";
3
+ import { t as PATHS } from "./paths-CMxlQEfQ.js";
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-C1gthnbV.js";
6
+ import { a as parseIntEnv, i as parseBoolEnv, l as runManagedExeCapture, o as resolveExecutable, u as spawnTaskkillBestEffort } from "./exec-COUT4QsS.js";
7
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";
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-BcrMlrmo.js";
9
- import { i as registerExitHandlers$1, n as getInstanceUuid, r as recordWorkerRepo, t as WorktreeRegistry } from "./lifecycle-BCnarXJV.js";
10
- import { t as MCP_WORKSPACE_HEADER } from "./mcp-workspace-header-B60WSR1Y.js";
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-IwotwedG.js";
10
+ import { t as MCP_WORKSPACE_HEADER } from "./mcp-workspace-header-BYgWioLH.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-CtRA3Y7p.js";
13
- import { r as extractAndRecordAic, s as recordAic, u as extractCopilotUsage } from "./aic-ledger-Cx_Ubon3.js";
14
- import { f as resolveSealedGate, m as runGateChecks, p as sealedGateIds } from "./stop-gate-hook-BEU8qQrC.js";
15
- import { t as liveExec } from "./orchestration-DjLA-lxB.js";
12
+ import { n as isPidAlive$1, r as registerColbertExitHandlers, s as trackChild, t as getColbertInstanceUuid } from "./lifecycle-Cx1wVrLb.js";
13
+ import { c as recordAic, d as extractCopilotUsage, i as extractAndRecordAic } from "./aic-ledger-BS47yb_C.js";
14
+ import { f as resolveSealedGate, m as runGateChecks, p as sealedGateIds } from "./stop-gate-hook-BUCxa5Kc.js";
15
+ import { t as liveExec } from "./orchestration-Dc3mO0G3.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";
@@ -160,6 +160,54 @@ const CHEAP_PROFILE_ORACLE_EFFORT = "medium";
160
160
  const CHEAP_PROFILE_ASTRA_MODEL = CHEAP_PROFILE_MODELS.astra;
161
161
  const CHEAP_PROFILE_ASTRA_EFFORT = "medium";
162
162
  //#endregion
163
+ //#region src/lib/cheapest-profile-contract.ts
164
+ const CHEAPEST_PROFILE_MODELS = Object.freeze({
165
+ lead: "gpt-5.6-luna",
166
+ explore: "gpt-5.6-luna",
167
+ plan: "gpt-5.6-sol",
168
+ "general-purpose": "gpt-5.6-luna",
169
+ implementer: "gpt-5.6-luna",
170
+ reviewer: "gemini-3.8-flash",
171
+ advisor: "gemini-3.8-flash",
172
+ oracle: "gpt-5.6-sol"
173
+ });
174
+ const CHEAPEST_PROFILE_NATIVE_AGENT_NAMES = [
175
+ "Explore",
176
+ "Plan",
177
+ "general-purpose",
178
+ "implementer",
179
+ "reviewer"
180
+ ];
181
+ const CHEAPEST_PROFILE_NATIVE_MODELS = Object.freeze({
182
+ Explore: CHEAPEST_PROFILE_MODELS.explore,
183
+ Plan: CHEAPEST_PROFILE_MODELS.plan,
184
+ "general-purpose": CHEAPEST_PROFILE_MODELS["general-purpose"],
185
+ implementer: CHEAPEST_PROFILE_MODELS.implementer,
186
+ reviewer: CHEAPEST_PROFILE_MODELS.reviewer
187
+ });
188
+ const CHEAPEST_PROFILE_NATIVE_EFFORTS = Object.freeze({
189
+ Explore: "high",
190
+ Plan: "high",
191
+ "general-purpose": "xhigh",
192
+ implementer: "max",
193
+ reviewer: "high"
194
+ });
195
+ /**
196
+ * Subagent/peer context window (tokens). Every non-lead role (and the lead
197
+ * as well) runs at Claude Code's DEFAULT (bare-slug) budget — 200K.
198
+ */
199
+ const CHEAPEST_PROFILE_SUBAGENT_CONTEXT_TOKENS = 2e5;
200
+ const CHEAPEST_PROFILE_ADVISOR_MODEL = CHEAPEST_PROFILE_MODELS.advisor;
201
+ /**
202
+ * Client-visible Advisor identity for cheapest mode. The BARE Gemini slug
203
+ * (no `[1m]` bracket): Claude Code budgets the Advisor tool as a 200K-model
204
+ * and forwards no more than ~200K of the lead's transcript, and the proxy
205
+ * mirrors that with `CHEAPEST_PROFILE_ADVISOR_CONTEXT_TOKENS`.
206
+ */
207
+ const CHEAPEST_PROFILE_ADVISOR_CLIENT_MODEL = CHEAPEST_PROFILE_MODELS.advisor;
208
+ const CHEAPEST_PROFILE_ORACLE_MODEL = CHEAPEST_PROFILE_MODELS.oracle;
209
+ const CHEAPEST_PROFILE_ORACLE_EFFORT = "high";
210
+ //#endregion
163
211
  //#region src/lib/one-m-context.ts
164
212
  /**
165
213
  * Context-window threshold at which Claude Code's `[1m]` accounting unlock is
@@ -528,6 +576,12 @@ const FAST_LEAD_MODEL = FAST_PROFILE_MODELS.lead;
528
576
  * successor that keeps the leader at its full 1M window.
529
577
  */
530
578
  const CHEAP_LEAD_MODEL = CHEAP_PROFILE_MODELS.lead;
579
+ /**
580
+ * The lead `-m cheapest` selects. Luna at the 200K DEFAULT window (BARE
581
+ * slug, no `[1m]`) — the cheapest tier runs every role, lead included, at
582
+ * the default budget.
583
+ */
584
+ const CHEAPEST_LEAD_MODEL = CHEAPEST_PROFILE_MODELS.lead;
531
585
  /** Small/fast tier for a budget lead, in the two forms this codebase needs.
532
586
  *
533
587
  * `SLUG` is the Anthropic-published DASHED form and is what goes into
@@ -548,16 +602,18 @@ const BUDGET_SMALL_FAST_CATALOG_ID = "claude-haiku-4.5";
548
602
  * of the original cheap launch: Gemini leader at 1M)
549
603
  * - `cheap` → `CHEAP_LEAD_MODEL` BARE (the cost-lean launch: Gemini
550
604
  * leader at the 200K DEFAULT window, no astra peer)
605
+ * - `cheapest` → `CHEAPEST_LEAD_MODEL` BARE (the cheapest launch: Luna
606
+ * leader at the 200K DEFAULT window, no astra peer)
551
607
  * - `N.M` → the best variant of that Opus family, via `pickClaudeDefault`
552
608
  * - a full slug → unchanged, including Copilot slugs a power user pins
553
609
  * - absent → the ordinary default
554
610
  *
555
- * Every branch except `cheap` is `[1m]`-decorated against the live catalog,
556
- * by `pickClaudeDefault` on the two Opus-family branches and by
557
- * `withOneMSuffixForLead` on the rest — the decoration is catalog-gated per
558
- * model, so a genuinely 200K model (`claude-haiku-4.5`) still comes back
559
- * bare. `cheap` deliberately skips the decoration entirely because its whole
560
- * cost lever is the 200K default lead window.
611
+ * Every branch except `cheap`/`cheapest` is `[1m]`-decorated against the
612
+ * live catalog, by `pickClaudeDefault` on the two Opus-family branches and
613
+ * by `withOneMSuffixForLead` on the rest — the decoration is catalog-gated
614
+ * per model, so a genuinely 200K model (`claude-haiku-4-5`) still comes back
615
+ * bare. `cheap`/`cheapest` deliberately skip the decoration entirely because
616
+ * their whole cost lever is the 200K default lead window.
561
617
  *
562
618
  * `fast` resolves to an ordinary slug rather than setting a mode flag —
563
619
  * `resolveLaunchProfile` (`./launch-profile`) is keyed off the SAME raw
@@ -581,6 +637,7 @@ function resolveLeadSlugArg(modelArg) {
581
637
  if (arg.toLowerCase() === "max") return withOneMSuffixForLead(MAX_PROFILE_LEAD_MODEL);
582
638
  if (arg.toLowerCase() === "cheap1m") return withOneMSuffixForLead(CHEAP_LEAD_MODEL);
583
639
  if (arg.toLowerCase() === "cheap") return CHEAP_LEAD_MODEL;
640
+ if (arg.toLowerCase() === "cheapest") return CHEAPEST_LEAD_MODEL;
584
641
  const opusFamilyShorthand = arg.match(/^(\d+\.\d+)$/)?.[1];
585
642
  if (opusFamilyShorthand) return pickClaudeDefault(opusFamilyShorthand);
586
643
  return withOneMSuffixForLead(arg);
@@ -17251,7 +17308,8 @@ async function runInit(workspace) {
17251
17308
  * `provisionAndIndexColbert()` is the fire-and-forget call site the
17252
17309
  * `start` / `claude` / `codex` launchers invoke after `setupAndServe`
17253
17310
  * (mirroring `provisionToolbelt()` / `runSelfUpdate()`):
17254
- * 1. Bail if opted out (`GH_ROUTER_DISABLE_SEMANTIC_SEARCH=1`).
17311
+ * 1. Bail unless opted in (`--search` / `GH_ROUTER_ENABLE_SEMANTIC_SEARCH=1`);
17312
+ * `GH_ROUTER_DISABLE_SEMANTIC_SEARCH=1` hard-disables.
17255
17313
  * 2. Register the exit handlers (tree-kill tracked colgrep children).
17256
17314
  * 3. Provision the binary/model/ORT under a lock + smoke test
17257
17315
  * (best-effort, never throws to the launcher).
@@ -17263,15 +17321,20 @@ async function runInit(workspace) {
17263
17321
  * for an unindexed workspace and reports `unavailable` meanwhile).
17264
17322
  */
17265
17323
  /**
17266
- * True unless the operator opted out via
17267
- * `GH_ROUTER_DISABLE_SEMANTIC_SEARCH=1`. Semantic search is ON BY
17268
- * DEFAULT (the proxy auto-provisions + background-indexes); the
17269
- * capability gate additionally requires the artifacts to be present on
17270
- * disk + smoke-passed, so in any environment where provisioning hasn't
17271
- * completed the tool simply doesn't appear (no regression).
17324
+ * True only when the operator opted in via `--search`
17325
+ * (`state.searchEnabled`, set by `setupAndServe`) or
17326
+ * `GH_ROUTER_ENABLE_SEMANTIC_SEARCH=1`. Semantic search is OFF BY
17327
+ * DEFAULT (no auto-provision, no background-index); the capability gate
17328
+ * additionally requires the artifacts to be present on disk +
17329
+ * smoke-passed, so the `code` tool stays lexical until both the opt-in
17330
+ * and provisioning have completed.
17331
+ *
17332
+ * `GH_ROUTER_DISABLE_SEMANTIC_SEARCH=1` hard-disables and wins over every
17333
+ * opt-in signal (escape hatch for tests and managed environments).
17272
17334
  */
17273
17335
  function semanticSearchOptedIn() {
17274
- return parseBoolEnv(process$1.env.GH_ROUTER_DISABLE_SEMANTIC_SEARCH) !== true;
17336
+ if (parseBoolEnv(process$1.env.GH_ROUTER_DISABLE_SEMANTIC_SEARCH) === true) return false;
17337
+ return state.searchEnabled === true || process$1.env.GH_ROUTER_ENABLE_SEMANTIC_SEARCH === "1";
17275
17338
  }
17276
17339
  /**
17277
17340
  * Availability predicate for ColBERT semantic search — the single
@@ -17534,7 +17597,7 @@ async function runUnifiedCodeSearch(input, signal) {
17534
17597
  const r = await runLexical(input, "lexical", "lexical-fallback", signal);
17535
17598
  return {
17536
17599
  ...r,
17537
- notice: joinNotice(r.notice, "semantic search unavailable on this host; returned lexical results")
17600
+ notice: joinNotice(r.notice, "semantic search is off (launch with --search to enable); returned lexical results")
17538
17601
  };
17539
17602
  }
17540
17603
  let sem;
@@ -19032,7 +19095,7 @@ function logAudit$1(record) {
19032
19095
  try {
19033
19096
  const fs = await import("node:fs/promises");
19034
19097
  const path = await import("node:path");
19035
- const { PATHS } = await import("./paths-DyX6SEnd.js");
19098
+ const { PATHS } = await import("./paths-BXXCVFvA.js");
19036
19099
  const dir = path.join(PATHS.APP_DIR, "browser-mcp");
19037
19100
  await fs.mkdir(dir, { recursive: true });
19038
19101
  const line = JSON.stringify({
@@ -27963,6 +28026,39 @@ function cheapReviewerModel() {
27963
28026
  if (fastEndpointForModel(found) !== "responses") return void 0;
27964
28027
  return CHEAP_PROFILE_MODELS.reviewer;
27965
28028
  }
28029
+ /** Gemini/high Advisor for the cheapest profile at the 200K default window. */
28030
+ function cheapestAdvisorModel() {
28031
+ const found = state.models?.data.find((m) => m.id === CHEAPEST_PROFILE_ADVISOR_MODEL);
28032
+ if (!found) return void 0;
28033
+ if ((found.capabilities?.limits?.max_context_window_tokens ?? 0) < 2e5) return void 0;
28034
+ if (found.capabilities?.supports?.tool_calls !== true) return void 0;
28035
+ const efforts = found.capabilities?.supports?.reasoning_effort;
28036
+ if (!Array.isArray(efforts) || !efforts.includes("high")) return void 0;
28037
+ if (fastEndpointForModel(found) !== "chat") return void 0;
28038
+ return CHEAPEST_PROFILE_ADVISOR_MODEL;
28039
+ }
28040
+ /** Sol/high Oracle for the cheapest profile at the 200K default window. */
28041
+ function cheapestOracleModel() {
28042
+ const found = state.models?.data.find((m) => m.id === CHEAPEST_PROFILE_ORACLE_MODEL);
28043
+ if (!found) return void 0;
28044
+ if ((found.capabilities?.limits?.max_context_window_tokens ?? 0) < 2e5) return void 0;
28045
+ if ((found.capabilities?.limits?.max_prompt_tokens ?? 0) <= 0) return void 0;
28046
+ const efforts = found.capabilities?.supports?.reasoning_effort;
28047
+ if (!Array.isArray(efforts) || !efforts.includes("high")) return void 0;
28048
+ if (fastEndpointForModel(found) !== "responses") return void 0;
28049
+ return CHEAPEST_PROFILE_ORACLE_MODEL;
28050
+ }
28051
+ /** Gemini/high reviewer for the cheapest profile at the 200K default window. */
28052
+ function cheapestReviewerModel() {
28053
+ const reviewer = state.models?.data.find((m) => m.id === "gemini-3.8-flash");
28054
+ if (!reviewer) return void 0;
28055
+ if (reviewer.capabilities?.supports?.tool_calls !== true) return void 0;
28056
+ if ((reviewer.capabilities?.limits?.max_context_window_tokens ?? 0) < 2e5) return void 0;
28057
+ const efforts = reviewer.capabilities?.supports?.reasoning_effort;
28058
+ if (!Array.isArray(efforts) || !efforts.includes(CHEAPEST_PROFILE_NATIVE_EFFORTS.reviewer)) return void 0;
28059
+ if (fastEndpointForModel(reviewer) !== "chat") return void 0;
28060
+ return "gemini-3.8-flash";
28061
+ }
27966
28062
  /** Exact GPT-6 Astra only: cheap escalation consultant at 200K/medium. */
27967
28063
  function cheapAstraModel() {
27968
28064
  const found = state.models?.data.find((m) => m.id === CHEAP_PROFILE_ASTRA_MODEL);
@@ -28272,10 +28368,10 @@ function activePersonas(launch) {
28272
28368
  };
28273
28369
  });
28274
28370
  }
28275
- function oracleToolEntry(isCheap = false, astraAvailable = true) {
28371
+ function oracleToolEntry(isCheap = false, astraAvailable = true, oracleDescriptor) {
28276
28372
  return {
28277
28373
  name: "oracle",
28278
- description: `Expert consultant backed by ${isCheap ? "Grok 4.6 (200K context, medium effort)" : "exact Opus 5 (1M context, high effort)"} for complex conceptual, algorithmic, spec/protocol, or architectural trade-offs. Stateless and cold-start: evaluates a self-contained brief.\n\nWhen to invoke: use for difficult conceptual, algorithmic, spec/protocol, or architectural tradeoffs before implementation when repository evidence alone cannot settle them. Preferred over advisor for self-contained technical briefs.\n\nWhen NOT to invoke: not for transcript-aware framing (consult Advisor), ${astraAvailable ? "terminal dead ends (consult Astra), " : "terminal dead ends (no escalation peer on this profile; report the dead end with evidence to the lead), "}routine code lookup, or mechanical facts verifiable by tests.\n\nPass complete context, constraints, minimal code excerpts with path:line, and one precise unresolved question.`,
28374
+ description: `Expert consultant backed by ${oracleDescriptor ?? (isCheap ? "Grok 4.6 (200K context, medium effort)" : "exact Opus 5 (1M context, high effort)")} for complex conceptual, algorithmic, spec/protocol, or architectural trade-offs. Stateless and cold-start: evaluates a self-contained brief.\n\nWhen to invoke: use for difficult conceptual, algorithmic, spec/protocol, or architectural tradeoffs before implementation when repository evidence alone cannot settle them. Preferred over advisor for self-contained technical briefs.\n\nWhen NOT to invoke: not for transcript-aware framing (consult Advisor), ${astraAvailable ? "terminal dead ends (consult Astra), " : "terminal dead ends (no escalation peer on this profile; report the dead end with evidence to the lead), "}routine code lookup, or mechanical facts verifiable by tests.\n\nPass complete context, constraints, minimal code excerpts with path:line, and one precise unresolved question.`,
28279
28375
  inputSchema: {
28280
28376
  type: "object",
28281
28377
  required: ["query", "context"],
@@ -28391,7 +28487,7 @@ function fastToolIsEnabled(tool) {
28391
28487
  }
28392
28488
  /** Shared Fast projection for list and call, including non-persona dispatch kind. */
28393
28489
  function fastAllowsTool(scope, launch, item) {
28394
- if (launch.profileId !== "fast" && launch.profileId !== "cheap" && launch.profileId !== "cheap1m") return true;
28490
+ if (launch.profileId !== "fast" && launch.profileId !== "cheap" && launch.profileId !== "cheap1m" && launch.profileId !== "cheapest") return true;
28395
28491
  if (scope !== "all" && item.group !== scope) return false;
28396
28492
  if (!launch.allowedGroups?.has(item.group)) return false;
28397
28493
  if (item.persona) return false;
@@ -28443,12 +28539,15 @@ function toolEntries(scope, launch, audience = "shared") {
28443
28539
  }));
28444
28540
  return [...personaEntries, ...nonPersonaEntries];
28445
28541
  }
28446
- if (launch.profileId === "fast" || launch.profileId === "cheap" || launch.profileId === "cheap1m") {
28447
- const isCheap = launch.profileId === "cheap" || launch.profileId === "cheap1m";
28542
+ if (launch.profileId === "fast" || launch.profileId === "cheap" || launch.profileId === "cheap1m" || launch.profileId === "cheapest") {
28543
+ const isCheap = launch.profileId === "cheap" || launch.profileId === "cheap1m" || launch.profileId === "cheapest";
28544
+ const isCheapest = launch.profileId === "cheapest";
28448
28545
  const astraWired = launch.profileId === "fast" || launch.profileId === "cheap1m";
28449
- const astraAvailable = astraWired && (isCheap ? cheapAstraModel() : fastAstraModel()) != null;
28546
+ const astraAvailable = astraWired && (isCheap && !isCheapest ? cheapAstraModel() : isCheapest ? void 0 : fastAstraModel()) != null;
28547
+ const oracleGate = isCheapest ? cheapestOracleModel() : isCheap ? cheapOracleModel() : fastOracleModel();
28548
+ const oracleDescriptor = isCheapest ? "GPT-5.6 Sol (200K context, high effort)" : void 0;
28450
28549
  const entries = [];
28451
- if ((scope === "all" || scope === "peers") && launch.allowedGroups?.has("peers") && launch.allowedPersonas?.has("oracle") && (isCheap ? cheapOracleModel() : fastOracleModel())) entries.push(oracleToolEntry(isCheap, astraAvailable));
28550
+ if ((scope === "all" || scope === "peers") && launch.allowedGroups?.has("peers") && launch.allowedPersonas?.has("oracle") && oracleGate) entries.push(oracleToolEntry(isCheap, astraAvailable, oracleDescriptor));
28452
28551
  if ((scope === "all" || scope === "peers") && launch.allowedGroups?.has("peers") && launch.allowedPersonas?.has("astra") && audience === "lead-peers" && astraWired && (isCheap ? cheapAstraModel() : fastAstraModel())) entries.push(astraToolEntry(isCheap));
28453
28552
  for (const tool of NON_PERSONA_MCP_TOOLS) {
28454
28553
  if (!fastAllowsTool(scope, launch, {
@@ -28889,7 +28988,7 @@ async function handleToolsCall(body, scope, launch, audience = "shared", session
28889
28988
  tool: maxTool
28890
28989
  }) : false)) return rpcError(body.id, RPC_METHOD_NOT_FOUND, `tools/call: unknown tool "${name}"`);
28891
28990
  }
28892
- if ((launch.profileId === "fast" || launch.profileId === "cheap" || launch.profileId === "cheap1m") && name !== "oracle" && name !== "astra") {
28991
+ if ((launch.profileId === "fast" || launch.profileId === "cheap" || launch.profileId === "cheap1m" || launch.profileId === "cheapest") && name !== "oracle" && name !== "astra") {
28893
28992
  const fastPersona = activePersonas(launch).find((persona) => persona.toolNameHttp === name);
28894
28993
  const fastTool = NON_PERSONA_MCP_TOOLS.find((tool) => tool.toolNameHttp === name);
28895
28994
  if (!(fastPersona ? fastAllowsTool(scope, launch, {
@@ -28974,12 +29073,13 @@ async function handleToolsCall(body, scope, launch, audience = "shared", session
28974
29073
  release();
28975
29074
  }
28976
29075
  }
28977
- if ((launch.profileId === "fast" || launch.profileId === "cheap" || launch.profileId === "cheap1m") && name === "oracle") {
28978
- const isCheapOracle = launch.profileId === "cheap" || launch.profileId === "cheap1m";
28979
- const oracleModel = isCheapOracle ? CHEAP_PROFILE_ORACLE_MODEL : "claude-opus-5";
29076
+ if ((launch.profileId === "fast" || launch.profileId === "cheap" || launch.profileId === "cheap1m" || launch.profileId === "cheapest") && name === "oracle") {
29077
+ const isCheapestOracle = launch.profileId === "cheapest";
29078
+ const isCheapOracle = launch.profileId === "cheap" || launch.profileId === "cheap1m" || isCheapestOracle;
29079
+ const oracleModel = isCheapestOracle ? CHEAPEST_PROFILE_ORACLE_MODEL : isCheapOracle ? CHEAP_PROFILE_ORACLE_MODEL : "claude-opus-5";
28980
29080
  const oracleEndpoint = isCheapOracle ? "/v1/responses" : "/v1/messages";
28981
- const oracleEffort = isCheapOracle ? CHEAP_PROFILE_ORACLE_EFFORT : "high";
28982
- if (scope !== "all" && scope !== "peers" || !launch.allowedGroups?.has("peers") || !launch.allowedPersonas?.has("oracle") || !(isCheapOracle ? cheapOracleModel() : fastOracleModel())) return rpcError(body.id, RPC_METHOD_NOT_FOUND, `tools/call: unknown tool "${name}"`);
29081
+ const oracleEffort = isCheapestOracle ? CHEAPEST_PROFILE_ORACLE_EFFORT : isCheapOracle ? CHEAP_PROFILE_ORACLE_EFFORT : "high";
29082
+ 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}"`);
28983
29083
  const query = typeof args.query === "string" ? args.query.trim() : "";
28984
29084
  const context = typeof args.context === "string" ? args.context.trim() : "";
28985
29085
  if (!query || !context) return rpcError(body.id, RPC_INVALID_PARAMS, "tools/call: oracle requires non-empty arguments.query and arguments.context");
@@ -28993,7 +29093,7 @@ async function handleToolsCall(body, scope, launch, audience = "shared", session
28993
29093
  model: oracleModel,
28994
29094
  endpoint: oracleEndpoint,
28995
29095
  description: "Fast/cheap-profile Oracle",
28996
- baseInstructions: isCheapOracle ? "You are Oracle, an expert architectural and technical consultant running on Grok 4.6. You have no tools or repository access. Answer from the supplied context and state assumptions explicitly, noting which facts would change the recommendation. Never claim to execute, verify, approve, merge, or authorize an action." : "You are Oracle, an expert architectural and technical consultant running on Opus 5. You have no tools or repository access. Answer from the supplied context and state assumptions explicitly, noting which facts would change the recommendation. Never claim to execute, verify, approve, merge, or authorize an action.",
29096
+ baseInstructions: isCheapestOracle ? "You are Oracle, an expert architectural and technical consultant running on GPT-5.6 Sol. You have no tools or repository access. Answer from the supplied context and state assumptions explicitly, noting which facts would change the recommendation. Never claim to execute, verify, approve, merge, or authorize an action." : isCheapOracle ? "You are Oracle, an expert architectural and technical consultant running on Grok 4.6. You have no tools or repository access. Answer from the supplied context and state assumptions explicitly, noting which facts would change the recommendation. Never claim to execute, verify, approve, merge, or authorize an action." : "You are Oracle, an expert architectural and technical consultant running on Opus 5. You have no tools or repository access. Answer from the supplied context and state assumptions explicitly, noting which facts would change the recommendation. Never claim to execute, verify, approve, merge, or authorize an action.",
28997
29097
  agentPrompt: "",
28998
29098
  writeCapable: false,
28999
29099
  requiresHttp: true,
@@ -29046,7 +29146,7 @@ async function handleToolsCall(body, scope, launch, audience = "shared", session
29046
29146
  release();
29047
29147
  }
29048
29148
  }
29049
- if ((launch.profileId === "fast" || launch.profileId === "cheap" || launch.profileId === "cheap1m") && PERSONAS_READ.some((p) => p.toolNameHttp === name)) return rpcError(body.id, RPC_METHOD_NOT_FOUND, `tools/call: unknown tool "${name}"`);
29149
+ 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}"`);
29050
29150
  const persona = activePersonas(launch).find((p) => p.toolNameHttp === name);
29051
29151
  const nonPersonaTool = persona ? void 0 : NON_PERSONA_MCP_TOOLS.find((t) => t.toolNameHttp === name);
29052
29152
  if (!persona && !nonPersonaTool) return rpcError(body.id, RPC_METHOD_NOT_FOUND, `tools/call: unknown tool "${name}"`);
@@ -30092,6 +30192,25 @@ const ADVISOR_FAST_PROFILE_MODEL = FAST_PROFILE_ADVISOR_MODEL;
30092
30192
  function fastProfileAdvisorAvailable() {
30093
30193
  return fastEndpointForCatalogId(ADVISOR_FAST_PROFILE_MODEL, state.models?.data) === "responses";
30094
30194
  }
30195
+ /** The Advisor model for an authenticated cheapest primary lead:
30196
+ * `gemini-3.8-flash` at high effort over its Chat endpoint, transcript
30197
+ * capped at `CHEAPEST_PROFILE_ADVISOR_CONTEXT_TOKENS` (200K). */
30198
+ const ADVISOR_CHEAPEST_PROFILE_MODEL = CHEAPEST_PROFILE_ADVISOR_MODEL;
30199
+ /** True only when the live Gemini entry satisfies the fixed cheapest
30200
+ * transport (Chat Completions). */
30201
+ function cheapestProfileAdvisorAvailable() {
30202
+ return fastEndpointForCatalogId(ADVISOR_CHEAPEST_PROFILE_MODEL, state.models?.data) === "chat";
30203
+ }
30204
+ /** Pick the cheapest Advisor model. Throws when the catalog gate fails so
30205
+ * the launch prerequisite surface (not a silent downgrade) owns the error. */
30206
+ function resolveCheapestAdvisorModel() {
30207
+ if (!cheapestProfileAdvisorAvailable()) throw new Error(`cheapest Advisor invariant failed: ${ADVISOR_CHEAPEST_PROFILE_MODEL} must advertise the Chat Completions endpoint`);
30208
+ return {
30209
+ model: ADVISOR_CHEAPEST_PROFILE_MODEL,
30210
+ escalated: false,
30211
+ fastProfile: true
30212
+ };
30213
+ }
30095
30214
  /** Output cap for the Anthropic-branch advisor call when the catalog carries no
30096
30215
  * limits for the resolved model. The value the branch used unconditionally
30097
30216
  * before it became reachable, kept so a catalog-less path is no worse off. */
@@ -36141,11 +36260,12 @@ function buildPeerAwarenessSnippet(opts) {
36141
36260
  `\`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}`
36142
36261
  ].join("\n");
36143
36262
  }
36144
- if (opts.profile === "fast" || opts.profile === "cheap" || opts.profile === "cheap1m") {
36263
+ if (opts.profile === "fast" || opts.profile === "cheap" || opts.profile === "cheap1m" || opts.profile === "cheapest") {
36145
36264
  const isCheap = opts.profile === "cheap" || opts.profile === "cheap1m";
36146
- const profileLabel = isCheap ? "cheap" : "fast";
36147
- const oracleDescriptor = isCheap ? "Grok 4.6 (200K/medium)" : "exact Opus 5 (1M/high)";
36148
- const astraDescriptor = isCheap ? "200K/medium" : "200K/high";
36265
+ const isCheapest = opts.profile === "cheapest";
36266
+ const profileLabel = isCheapest ? "cheapest" : isCheap ? "cheap" : "fast";
36267
+ const oracleDescriptor = isCheapest ? "GPT-5.6 Sol (200K/high)" : isCheap ? "Grok 4.6 (200K/medium)" : "exact Opus 5 (1M/high)";
36268
+ const astraDescriptor = isCheap && !isCheapest ? "200K/medium" : "200K/high";
36149
36269
  const fastPeersKey = key("peers");
36150
36270
  const fastSearchKey = key("search");
36151
36271
  const fastBrowserKey = key("browser");
@@ -36156,7 +36276,7 @@ function buildPeerAwarenessSnippet(opts) {
36156
36276
  return [
36157
36277
  "## Peer review and advisor",
36158
36278
  "",
36159
- `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 !== "cheap" ? ` \`mcp__${fastPeersKey}__astra\` is GPT-6 Astra (${astraDescriptor}), an expensive terminal escalation consultant available to the lead only for hardest dead ends.` : ""}`,
36279
+ `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.` : ""}`,
36160
36280
  "",
36161
36281
  `\`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}`,
36162
36282
  "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."
@@ -36221,14 +36341,15 @@ function buildPeerAwarenessSummary(opts) {
36221
36341
  "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.",
36222
36342
  "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."
36223
36343
  ].join("\n");
36224
- if (opts.profile === "fast" || opts.profile === "cheap" || opts.profile === "cheap1m") {
36344
+ if (opts.profile === "fast" || opts.profile === "cheap" || opts.profile === "cheap1m" || opts.profile === "cheapest") {
36225
36345
  const isCheap = opts.profile === "cheap" || opts.profile === "cheap1m";
36226
- const profileLabel = isCheap ? "Cheap" : "Fast";
36227
- const oracleDescriptor = isCheap ? "Grok 4.6 (200K/medium)" : "exact Opus 5 (1M/high)";
36228
- const astraDescriptor = isCheap ? "200K/medium" : "200K/high";
36346
+ const isCheapest = opts.profile === "cheapest";
36347
+ const profileLabel = isCheapest ? "Cheapest" : isCheap ? "Cheap" : "Fast";
36348
+ const oracleDescriptor = isCheapest ? "GPT-5.6 Sol (200K/high)" : isCheap ? "Grok 4.6 (200K/medium)" : "exact Opus 5 (1M/high)";
36349
+ const astraDescriptor = isCheap && !isCheapest ? "200K/medium" : "200K/high";
36229
36350
  const browserClause = opts.browserToolsAvailable ?? opts.browseAvailable ? ` \`mcp__${key("browser")}__*\` provides the opt-in browser.` : "";
36230
36351
  const workerBrowseClause = opts.browseAvailable ? ` \`worker-browse\` runs delegated browsing tasks through \`mcp__${key("workers")}__browse\`.` : "";
36231
- const astraClause = opts.astraAvailable && opts.profile !== "cheap" ? ` \`mcp__${key("peers")}__astra\` is GPT-6 Astra (${astraDescriptor}), lead-only escalation for hardest dead ends.` : "";
36352
+ 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.` : "";
36232
36353
  return [
36233
36354
  "## Injected capabilities (summary)",
36234
36355
  "",
@@ -37619,6 +37740,6 @@ function enumerateInjectedMcpToolNames(groupKeys, opts = {}) {
37619
37740
  return [...new Set(names)];
37620
37741
  }
37621
37742
  //#endregion
37622
- export { UNKNOWN_EFFORT_ANCHOR as $, colbertDegradedWarning as $t, TOOLBELT_TOOLS$1 as A, CHEAP_PROFILE_MODELS as An, scribeModel as At, resolveAdvisorEffort as B, registerLaunch as Bt, runWorkerAgent as C, upstreamMaxConnections as Cn, generalPurposeFastModel as Ct, toolbeltEnabled as D, withOneMSuffix as Dn, reviewerFastModel as Dt, buildToolbeltAwareness as E, oneMContextDisabled as En, resolveGeminiReviewModel as Et, ADVISOR_TOOL_INSTRUCTIONS as F, withInstallLock as Fn, createMessages as Ft, repairRejectedThinkingHistory as G, createResponses as Gt, formatThinkingRepairDecline as H, assembleResponsesPayload as Ht, FAST_ADVISOR_TOOL_INSTRUCTIONS as I, getTextTokenCount as It, isControllerClosedError as J, readResponseBodyCapped as Jt, buildAnthropicErrorEvent as K, createChatCompletions as Kt, buildAdvisorStream as L, getTokenCount as Lt, satisfiesMinVersion as M, CHEAP_PROFILE_NATIVE_EFFORTS as Mn, workerToolsEnabled as Mt, searchWeb as N, CHEAP_PROFILE_NATIVE_MODELS as Nn, shimDefaultsToXhigh as Nt, toolbeltSkipSet as O, withOneMSuffixForLead as On, reviewerModel as Ot, ADVISOR_INTERNAL_TOOL_NAME as P, CHEAP_PROFILE_SUBAGENT_CONTEXT_TOKENS as Pn, countTokens as Pt, EFFORT_ORDER as Q, hasSupportedBrowserInstalled as Qt, injectAdvisorTool as R, getTokenizerFromModel as Rt, resolveWorkerRunOpts as S, upstreamAllowH2 as Sn, geminiAvailable as St, availableToolCommands as T, catalogAdvertises1M as Tn, nativeSubagentModel as Tt, rememberThinkingHistoryRepair as U, warnOnTokenPriceDrift as Ut, resolveAdvisorModel as V, unregisterLaunch as Vt, repairKnownThinkingHistory as W, resolveMcpToolTimeoutMs as Wt, readIteratorWithTimeout as X, normalizeOpenAIUsage as Xt, logStreamError as Y, parseJsonOrDiagnose as Yt, relayAnthropicStream as Z, provisionBrowserAssets as Zt, REVIEW_DEFAULT_MODEL as _, UPSTREAM_INACTIVITY_TIMEOUT_MS as _n, fastOracleModel as _t, buildAgentPrompt as a, CONDENSED_OPERATING_SEQUENCE as an, artifactToolsEnabled as at, resolveDefaultModel as b, pickClaudeDefault as bn, fastScoutModel as bt, enumerateInjectedMcpToolNames as c, collapsePathKeys as cn, browserCompoundToolsEnabled as ct, BROWSE_DEFAULT_MODEL as d, BUDGET_SMALL_FAST_SLUG as dn, cheapOracleModel as dt, provisionAndIndexColbert as en, bucketEffort as et, DEFAULT_MODEL_CHAIN as f, DEFAULT_CLAUDE_MODEL_FALLBACKS as fn, cheapReviewerModel as ft, PLAN_DEFAULT_MODEL as g, UPSTREAM_FETCH_TIMEOUT_MS as gn, fastImplementerModel as gt, IMPLEMENT_DEFAULT_MODEL as h, DEFAULT_PORT as hn, fastGeneralPurposeModel as ht, assertMcpToolSurfaceConsistent as i, provisionTreeSitterAssets as in, agentToolsEnabled as it, assetFor as j, CHEAP_PROFILE_NATIVE_AGENT_NAMES as jn, standInToolEnabled as jt, vscodeRipgrepPath as k, CHEAP_PROFILE_ADVISOR_CLIENT_MODEL as kn, scoutModel as kt, maxPersonasFor as l, toolbeltPathOverride as ln, browserToolsEnabled as lt, EXPLORE_DEFAULT_THINKING as m, DEFAULT_CODEX_MODEL_FALLBACKS as mn, fastAstraModel as mt, MCP_GROUPS as n, extractZipMember as nn, handleMcpDelete as nt, buildPeerAwarenessSnippet as o, DEFINITION_OF_GREATNESS as on, brainstormModel as ot, EXPLORE_DEFAULT_MODEL as p, DEFAULT_CODEX_MODEL as pn, fastAdvisorModel as pt, buildOpenAIErrorEvent as q, MAX_RESPONSE_BODY_BYTES as qt, agentNamesForToolAllowlist as r, warmTreeSitterPool as rn, handleMcpPost as rt, buildPeerAwarenessSummary as s, shouldUseInsecureTls as sn, browseAgentEnabled as st, GROUP_META as t, extractTarGzMember as tn, clampEffort as tt, personasFor as u, BUDGET_SMALL_FAST_CATALOG_ID as un, cheapAdvisorModel as ut, TEST_DEFAULT_MODEL as v, generateRandomPort as vn, fastPlanModel as vt, buildEnv as w, classifyMessagesRoute as wn, implementerFastModel as wt, resolveModeDefaults as x, resolveLeadSlugArg as xn, fleetToolsEnabled as xt, appendPlanReminder as y, isBudgetClaudeLead as yn, fastReviewerModel as yt, isAdvisorRequested as z, findLaunchBySecret as zt };
37743
+ 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 };
37623
37744
 
37624
- //# sourceMappingURL=peer-mcp-personas-0_XU6nm9.js.map
37745
+ //# sourceMappingURL=peer-mcp-personas-CQ-0Piyr.js.map