github-router 0.3.352 → 0.3.354

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 (72) hide show
  1. package/README.md +1 -38
  2. package/dist/ado-tools-CN4i9OVl.js +1 -0
  3. package/dist/{aic-statusline-settings-LnoxjBPe.js → aic-statusline-settings-EdsV1gzY.js} +6 -4
  4. package/dist/aic-statusline-settings-EdsV1gzY.js.map +1 -0
  5. package/dist/{attribution-settings-ul6VU6iP.js → attribution-settings-8Uv97n9j.js} +51 -39
  6. package/dist/{attribution-settings-ul6VU6iP.js.map → attribution-settings-8Uv97n9j.js.map} +1 -1
  7. package/dist/balanced-profile-contract-DtnTIBjL.js +105 -0
  8. package/dist/balanced-profile-contract-DtnTIBjL.js.map +1 -0
  9. package/dist/browser-ext/manifest.json +1 -1
  10. package/dist/{claude-xO1XW-Nn.js → claude-C_1OM7ce.js} +68 -59
  11. package/dist/claude-C_1OM7ce.js.map +1 -0
  12. package/dist/{claude-md-injection-BoXOsg7h.js → claude-md-injection-CDOoGNEJ.js} +20 -15
  13. package/dist/claude-md-injection-CDOoGNEJ.js.map +1 -0
  14. package/dist/{codex-DzUR40JA.js → codex-5eTmciDG.js} +5 -5
  15. package/dist/{codex-DzUR40JA.js.map → codex-5eTmciDG.js.map} +1 -1
  16. package/dist/{copilot-discount-C3jfysK-.js → copilot-discount-kpOLluHm.js} +3 -1
  17. package/dist/copilot-discount-kpOLluHm.js.map +1 -0
  18. package/dist/engine-CIAopp0h.js +1 -0
  19. package/dist/fast-profile-contract-JOnZBgFB.js +61 -0
  20. package/dist/fast-profile-contract-JOnZBgFB.js.map +1 -0
  21. package/dist/{gate-discovery-Cvdko01z.js → gate-discovery-CqJVzT_D.js} +2 -2
  22. package/dist/{gate-discovery-Cvdko01z.js.map → gate-discovery-CqJVzT_D.js.map} +1 -1
  23. package/dist/hooks.mjs +193 -12
  24. package/dist/hooks.sha256 +1 -1
  25. package/dist/{internal-aic-status-Dmi2bCsR.js → internal-aic-status-wYPsCG4r.js} +2 -2
  26. package/dist/{internal-aic-status-Dmi2bCsR.js.map → internal-aic-status-wYPsCG4r.js.map} +1 -1
  27. package/dist/{internal-fast-dispatch-guard-Cv7zf0ZI.js → internal-fast-dispatch-guard-A8teEib4.js} +1 -1
  28. package/dist/{internal-fast-dispatch-guard-BQm1MI9d.js → internal-fast-dispatch-guard-D_TCtJhQ.js} +3 -2
  29. package/dist/{internal-fast-dispatch-guard-BQm1MI9d.js.map → internal-fast-dispatch-guard-D_TCtJhQ.js.map} +1 -1
  30. package/dist/{internal-max-dispatch-guard-T-M7DRIW.js → internal-max-dispatch-guard-BM_B15EH.js} +1 -1
  31. package/dist/{internal-max-dispatch-guard-DkJixDmG.js → internal-max-dispatch-guard-D7ByWH4v.js} +2 -2
  32. package/dist/{internal-max-dispatch-guard-DkJixDmG.js.map → internal-max-dispatch-guard-D7ByWH4v.js.map} +1 -1
  33. package/dist/{internal-prompt-submit-B9MJxc3K.js → internal-prompt-submit-C77GnEaW.js} +3 -3
  34. package/dist/internal-prompt-submit-C77GnEaW.js.map +1 -0
  35. package/dist/{internal-prompt-submit-6OXEdQCK.js → internal-prompt-submit-CDTwamkW.js} +2 -2
  36. package/dist/{internal-rebrief-zIdunX3R.js → internal-rebrief-DZygfGHp.js} +6 -6
  37. package/dist/internal-rebrief-DZygfGHp.js.map +1 -0
  38. package/dist/{internal-stop-hook-DGcRVh_2.js → internal-stop-hook-Dn_AF0BF.js} +2 -2
  39. package/dist/{internal-stop-hook-DGcRVh_2.js.map → internal-stop-hook-Dn_AF0BF.js.map} +1 -1
  40. package/dist/main.js +11 -11
  41. package/dist/{max-profile-contract-DQDEDCsR.js → max-profile-contract-CMvzKSsg.js} +2 -2
  42. package/dist/max-profile-contract-CMvzKSsg.js.map +1 -0
  43. package/dist/{peer-mcp-personas-DDMKRFFG.js → peer-mcp-personas-DlF1dKCs.js} +142 -165
  44. package/dist/peer-mcp-personas-DlF1dKCs.js.map +1 -0
  45. package/dist/{pi-jVNeQXWf.js → pi-2m2IgZlm.js} +61 -62
  46. package/dist/pi-2m2IgZlm.js.map +1 -0
  47. package/dist/{provision-BtYRtvrj.js → provision-DLGlhu3a.js} +2 -2
  48. package/dist/{provision-BtYRtvrj.js.map → provision-DLGlhu3a.js.map} +1 -1
  49. package/dist/{serve-CmgmxigM.js → serve-8tXHVHOr.js} +7 -7
  50. package/dist/{serve-CmgmxigM.js.map → serve-8tXHVHOr.js.map} +1 -1
  51. package/dist/{server-setup-DinOFWiC.js → server-setup-BBSmse1J.js} +190 -127
  52. package/dist/server-setup-BBSmse1J.js.map +1 -0
  53. package/dist/{start-Dgsaz0HM.js → start-B7jTBpAc.js} +3 -3
  54. package/dist/{start-Dgsaz0HM.js.map → start-B7jTBpAc.js.map} +1 -1
  55. package/dist/{static-context-pack-CyucviRD.js → static-context-pack-BRqt4ajJ.js} +313 -6
  56. package/dist/static-context-pack-BRqt4ajJ.js.map +1 -0
  57. package/package.json +1 -1
  58. package/dist/ado-tools-xbuVU7YN.js +0 -1
  59. package/dist/aic-statusline-settings-LnoxjBPe.js.map +0 -1
  60. package/dist/balanced-profile-contract-XiIj4O1U.js +0 -127
  61. package/dist/balanced-profile-contract-XiIj4O1U.js.map +0 -1
  62. package/dist/claude-md-injection-BoXOsg7h.js.map +0 -1
  63. package/dist/claude-xO1XW-Nn.js.map +0 -1
  64. package/dist/copilot-discount-C3jfysK-.js.map +0 -1
  65. package/dist/engine-DwLIk1Zn.js +0 -1
  66. package/dist/internal-prompt-submit-B9MJxc3K.js.map +0 -1
  67. package/dist/internal-rebrief-zIdunX3R.js.map +0 -1
  68. package/dist/max-profile-contract-DQDEDCsR.js.map +0 -1
  69. package/dist/peer-mcp-personas-DDMKRFFG.js.map +0 -1
  70. package/dist/pi-jVNeQXWf.js.map +0 -1
  71. package/dist/server-setup-DinOFWiC.js.map +0 -1
  72. package/dist/static-context-pack-CyucviRD.js.map +0 -1
@@ -0,0 +1,105 @@
1
+ //#region src/lib/balanced-profile-contract.ts
2
+ /**
3
+ * Fixed identities for the literal `github-router claude -m balanced` profile.
4
+ *
5
+ * The most-complex-tasks tier: a `gpt-5.6-sol`/medium LEAD at Claude Code's
6
+ * DEFAULT (bare-slug) 200K window, every subagent at the same 200K default,
7
+ * and a `grok-4.6`/medium primary Oracle. Advisor-free by design: no Advisor
8
+ * model, tool, or prose is wired for this profile. Oracle-only peer set
9
+ * (no `astra`) and a three-agent surface (`Explore`/`General-Purpose`/
10
+ * `reviewer`): the cheap-family surface minus `Plan` — the lead owns
11
+ * planning directly — except the `reviewer` may invoke `Explore` for
12
+ * targeted discovery (search-first, then delegate).
13
+ *
14
+ * Delegation policy is lead-owns-by-default: the lead plans, implements,
15
+ * and verifies itself, delegating FREELY to the Luna-powered `Explore` and
16
+ * `General-Purpose` roles, and to `reviewer` ONLY when genuinely
17
+ * needed (behavior-changing review).
18
+ *
19
+ * This module is deliberately dependency-free, including its own delegation
20
+ * graph literal: each pinned profile owns its graph so tuning one roster
21
+ * cannot silently retune another. The PreToolUse ACL reads each profile's
22
+ * own graph.
23
+ */
24
+ const BALANCED_PROFILE_MODELS = Object.freeze({
25
+ lead: "gpt-5.6-sol",
26
+ explore: "gpt-6-luna",
27
+ "General-Purpose": "gpt-6-luna",
28
+ reviewer: "gpt-5.6-sol",
29
+ oracle: "grok-4.6",
30
+ astra: "gpt-6-astra"
31
+ });
32
+ const BALANCED_PROFILE_NATIVE_AGENT_NAMES = [
33
+ "Explore",
34
+ "General-Purpose",
35
+ "reviewer"
36
+ ];
37
+ const BALANCED_PROFILE_NATIVE_MODELS = Object.freeze({
38
+ Explore: BALANCED_PROFILE_MODELS.explore,
39
+ "General-Purpose": BALANCED_PROFILE_MODELS["General-Purpose"],
40
+ reviewer: BALANCED_PROFILE_MODELS.reviewer
41
+ });
42
+ const BALANCED_PROFILE_NATIVE_EFFORTS = Object.freeze({
43
+ Explore: "high",
44
+ "General-Purpose": "max",
45
+ reviewer: "high"
46
+ });
47
+ /**
48
+ * Lead context window (tokens) for `-m balanced`. The Sol LEAD runs at
49
+ * Claude Code's DEFAULT (bare-slug) 200K budget — the whole point of the
50
+ * balanced launch is frontier reasoning without any `[1m]` accounting.
51
+ */
52
+ const BALANCED_PROFILE_LEAD_CONTEXT_TOKENS = 2e5;
53
+ /**
54
+ * Subagent/peer context window (tokens). Every non-lead role (and the lead
55
+ * as well) runs at Claude Code's DEFAULT (bare-slug) budget — 200K.
56
+ */
57
+ const BALANCED_PROFILE_SUBAGENT_CONTEXT_TOKENS = 2e5;
58
+ const BALANCED_PROFILE_LEAD_EFFORT = "medium";
59
+ const BALANCED_PROFILE_ORACLE_MODEL = BALANCED_PROFILE_MODELS.oracle;
60
+ const BALANCED_PROFILE_ORACLE_EFFORT = "medium";
61
+ /**
62
+ * Synthesized MCP consultant tools for `-m balanced`: Oracle only, like
63
+ * `-m cheap` (never `astra`).
64
+ */
65
+ const BALANCED_PROFILE_SYNTHESIZED_PEERS = ["oracle"];
66
+ /** Each native role's permitted native-agent targets. The lead gets the roster.
67
+ * Unlike the fast/cheap graphs, the balanced `reviewer` may invoke `Explore`
68
+ * for targeted discovery: the Sol-backed reviewer narrows scope with
69
+ * search first, then delegates scoped evidence questions rather than
70
+ * sweeping the repository itself. There is no `Plan` role: the lead owns
71
+ * planning directly. */
72
+ const BALANCED_PROFILE_DELEGATION_GRAPH = Object.freeze({
73
+ Explore: Object.freeze([]),
74
+ "General-Purpose": Object.freeze(["reviewer"]),
75
+ reviewer: Object.freeze(["Explore"])
76
+ });
77
+ /**
78
+ * Every fixed identity for `-m balanced` in one frozen aggregate.
79
+ *
80
+ * `balanced2-profile-contract.ts` derives from this by spread, overriding only
81
+ * the Sol lead/reviewer identities and the Oracle. Keeping the aggregate here
82
+ * means a field added to the family later is inherited by BOTH siblings
83
+ * automatically instead of being silently absent from the copy nobody
84
+ * remembered to edit.
85
+ *
86
+ * The family is Advisor-free by design, so there are deliberately no advisor
87
+ * fields here.
88
+ */
89
+ const BALANCED_PROFILE_CONTRACT = Object.freeze({
90
+ models: BALANCED_PROFILE_MODELS,
91
+ nativeAgentNames: BALANCED_PROFILE_NATIVE_AGENT_NAMES,
92
+ nativeModels: BALANCED_PROFILE_NATIVE_MODELS,
93
+ nativeEfforts: BALANCED_PROFILE_NATIVE_EFFORTS,
94
+ leadContextTokens: BALANCED_PROFILE_LEAD_CONTEXT_TOKENS,
95
+ subagentContextTokens: BALANCED_PROFILE_SUBAGENT_CONTEXT_TOKENS,
96
+ leadEffort: BALANCED_PROFILE_LEAD_EFFORT,
97
+ oracleModel: BALANCED_PROFILE_ORACLE_MODEL,
98
+ oracleEffort: BALANCED_PROFILE_ORACLE_EFFORT,
99
+ synthesizedPeers: BALANCED_PROFILE_SYNTHESIZED_PEERS,
100
+ delegationGraph: BALANCED_PROFILE_DELEGATION_GRAPH
101
+ });
102
+ //#endregion
103
+ export { BALANCED_PROFILE_NATIVE_EFFORTS as a, BALANCED_PROFILE_NATIVE_AGENT_NAMES as i, BALANCED_PROFILE_DELEGATION_GRAPH as n, BALANCED_PROFILE_MODELS as r, BALANCED_PROFILE_CONTRACT as t };
104
+
105
+ //# sourceMappingURL=balanced-profile-contract-DtnTIBjL.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"balanced-profile-contract-DtnTIBjL.js","names":[],"sources":["../src/lib/balanced-profile-contract.ts"],"sourcesContent":["/**\n * Fixed identities for the literal `github-router claude -m balanced` profile.\n *\n * The most-complex-tasks tier: a `gpt-5.6-sol`/medium LEAD at Claude Code's\n * DEFAULT (bare-slug) 200K window, every subagent at the same 200K default,\n * and a `grok-4.6`/medium primary Oracle. Advisor-free by design: no Advisor\n * model, tool, or prose is wired for this profile. Oracle-only peer set\n * (no `astra`) and a three-agent surface (`Explore`/`General-Purpose`/\n * `reviewer`): the cheap-family surface minus `Plan` — the lead owns\n * planning directly — except the `reviewer` may invoke `Explore` for\n * targeted discovery (search-first, then delegate).\n *\n * Delegation policy is lead-owns-by-default: the lead plans, implements,\n * and verifies itself, delegating FREELY to the Luna-powered `Explore` and\n * `General-Purpose` roles, and to `reviewer` ONLY when genuinely\n * needed (behavior-changing review).\n *\n * This module is deliberately dependency-free, including its own delegation\n * graph literal: each pinned profile owns its graph so tuning one roster\n * cannot silently retune another. The PreToolUse ACL reads each profile's\n * own graph.\n */\n\nexport const BALANCED_PROFILE_MODELS = Object.freeze({\n lead: \"gpt-5.6-sol\",\n explore: \"gpt-6-luna\",\n \"General-Purpose\": \"gpt-6-luna\",\n reviewer: \"gpt-5.6-sol\",\n oracle: \"grok-4.6\",\n astra: \"gpt-6-astra\",\n} as const)\n\nexport const BALANCED_PROFILE_NATIVE_AGENT_NAMES = [\n \"Explore\",\n \"General-Purpose\",\n \"reviewer\",\n] as const\n\nexport type BalancedProfileNativeAgentName =\n (typeof BALANCED_PROFILE_NATIVE_AGENT_NAMES)[number]\n\nexport const BALANCED_PROFILE_NATIVE_MODELS: Readonly<\n Record<BalancedProfileNativeAgentName, string>\n> = Object.freeze({\n Explore: BALANCED_PROFILE_MODELS.explore,\n \"General-Purpose\": BALANCED_PROFILE_MODELS[\"General-Purpose\"],\n reviewer: BALANCED_PROFILE_MODELS.reviewer,\n})\n\nexport const BALANCED_PROFILE_NATIVE_EFFORTS = Object.freeze({\n Explore: \"high\",\n \"General-Purpose\": \"max\",\n reviewer: \"high\",\n} as const)\n\n/**\n * Lead context window (tokens) for `-m balanced`. The Sol LEAD runs at\n * Claude Code's DEFAULT (bare-slug) 200K budget — the whole point of the\n * balanced launch is frontier reasoning without any `[1m]` accounting.\n */\nexport const BALANCED_PROFILE_LEAD_CONTEXT_TOKENS = 200_000 as const\n\n/**\n * Subagent/peer context window (tokens). Every non-lead role (and the lead\n * as well) runs at Claude Code's DEFAULT (bare-slug) budget — 200K.\n */\nexport const BALANCED_PROFILE_SUBAGENT_CONTEXT_TOKENS = 200_000 as const\n\nexport const BALANCED_PROFILE_LEAD_EFFORT = \"medium\" as const\nexport const BALANCED_PROFILE_ORACLE_MODEL = BALANCED_PROFILE_MODELS.oracle\nexport const BALANCED_PROFILE_ORACLE_EFFORT = \"medium\" as const\n\n/**\n * Synthesized MCP consultant tools for `-m balanced`: Oracle only, like\n * `-m cheap` (never `astra`).\n */\nexport const BALANCED_PROFILE_SYNTHESIZED_PEERS = [\"oracle\"] as const\nexport type BalancedProfileSynthesizedPeer =\n (typeof BALANCED_PROFILE_SYNTHESIZED_PEERS)[number]\n\n/** Each native role's permitted native-agent targets. The lead gets the roster.\n * Unlike the fast/cheap graphs, the balanced `reviewer` may invoke `Explore`\n * for targeted discovery: the Sol-backed reviewer narrows scope with\n * search first, then delegates scoped evidence questions rather than\n * sweeping the repository itself. There is no `Plan` role: the lead owns\n * planning directly. */\nexport const BALANCED_PROFILE_DELEGATION_GRAPH = Object.freeze({\n Explore: Object.freeze([]),\n \"General-Purpose\": Object.freeze([\"reviewer\"]),\n reviewer: Object.freeze([\"Explore\"]),\n} as const satisfies Record<\n BalancedProfileNativeAgentName,\n ReadonlyArray<BalancedProfileNativeAgentName>\n>)\n\n/**\n * Every fixed identity for `-m balanced` in one frozen aggregate.\n *\n * `balanced2-profile-contract.ts` derives from this by spread, overriding only\n * the Sol lead/reviewer identities and the Oracle. Keeping the aggregate here\n * means a field added to the family later is inherited by BOTH siblings\n * automatically instead of being silently absent from the copy nobody\n * remembered to edit.\n *\n * The family is Advisor-free by design, so there are deliberately no advisor\n * fields here.\n */\nexport const BALANCED_PROFILE_CONTRACT = Object.freeze({\n models: BALANCED_PROFILE_MODELS,\n nativeAgentNames: BALANCED_PROFILE_NATIVE_AGENT_NAMES,\n nativeModels: BALANCED_PROFILE_NATIVE_MODELS,\n nativeEfforts: BALANCED_PROFILE_NATIVE_EFFORTS,\n leadContextTokens: BALANCED_PROFILE_LEAD_CONTEXT_TOKENS,\n subagentContextTokens: BALANCED_PROFILE_SUBAGENT_CONTEXT_TOKENS,\n leadEffort: BALANCED_PROFILE_LEAD_EFFORT,\n oracleModel: BALANCED_PROFILE_ORACLE_MODEL,\n oracleEffort: BALANCED_PROFILE_ORACLE_EFFORT,\n synthesizedPeers: BALANCED_PROFILE_SYNTHESIZED_PEERS,\n delegationGraph: BALANCED_PROFILE_DELEGATION_GRAPH,\n})\n\nexport type BalancedProfileContract = typeof BALANCED_PROFILE_CONTRACT\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;AAuBA,MAAa,0BAA0B,OAAO,OAAO;CACnD,MAAM;CACN,SAAS;CACT,mBAAmB;CACnB,UAAU;CACV,QAAQ;CACR,OAAO;AACT,CAAU;AAEV,MAAa,sCAAsC;CACjD;CACA;CACA;AACF;AAKA,MAAa,iCAET,OAAO,OAAO;CAChB,SAAS,wBAAwB;CACjC,mBAAmB,wBAAwB;CAC3C,UAAU,wBAAwB;AACpC,CAAC;AAED,MAAa,kCAAkC,OAAO,OAAO;CAC3D,SAAS;CACT,mBAAmB;CACnB,UAAU;AACZ,CAAU;;;;;;AAOV,MAAa,uCAAuC;;;;;AAMpD,MAAa,2CAA2C;AAExD,MAAa,+BAA+B;AAC5C,MAAa,gCAAgC,wBAAwB;AACrE,MAAa,iCAAiC;;;;;AAM9C,MAAa,qCAAqC,CAAC,QAAQ;;;;;;;AAU3D,MAAa,oCAAoC,OAAO,OAAO;CAC7D,SAAS,OAAO,OAAO,CAAC,CAAC;CACzB,mBAAmB,OAAO,OAAO,CAAC,UAAU,CAAC;CAC7C,UAAU,OAAO,OAAO,CAAC,SAAS,CAAC;AACrC,CAGC;;;;;;;;;;;;;AAcD,MAAa,4BAA4B,OAAO,OAAO;CACrD,QAAQ;CACR,kBAAkB;CAClB,cAAc;CACd,eAAe;CACf,mBAAmB;CACnB,uBAAuB;CACvB,YAAY;CACZ,aAAa;CACb,cAAc;CACd,kBAAkB;CAClB,iBAAiB;AACnB,CAAC"}
@@ -2,7 +2,7 @@
2
2
  "manifest_version": 3,
3
3
  "name": "github-router browser bridge",
4
4
  "short_name": "gh-router-browser",
5
- "version": "0.3.352",
5
+ "version": "0.3.354",
6
6
  "description": "Bridge between Claude (via github-router /mcp) and the browser. Implements tab control, navigation, clicks, form fill, downloads, screenshots, devtools eval. Blocks navigation to chrome://settings.",
7
7
  "key": "MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAqJElxuBlonBS3TVW9FJN0mGTtShB3L1hoaYf6k39SOr1ogGYmF90EjRxy1i21k9wQQjPf26bcBu/9X67KrQjQV0uB38CaNukgiSeoLjfptN811u+PJHx6BP+jx3Qa6/3VenNPxHC8WEU0GXql8QSjIHEyCwKb6fMASXOK94JyB5Ywov2x8mt/+9ncqBBBMVzf6r5Sagy4PL1XnryLsuADD/vOEkPet8wXgH/Oj7v5tTsQQZ7U1JT51PoDs2BFnXc5v3TkVgZwd32k3ONh+nkDw1Hof+4zwUGOyJE6eMrlYzRlKM4Qxdf9JpavQvqfieAbTRWcyKeclnHeoIfE7cDBQIDAQAB",
8
8
  "background": {
@@ -3,28 +3,28 @@ import { d as writeArtifactCredsToMirror, o as purgeNonRouterAgentsFromMirror, r
3
3
  import { t as state } from "./state-CfEVoqBM.js";
4
4
  import { d as resolveModel } from "./token-CTf5jCmP.js";
5
5
  import { a as parseBoolEnv } from "./exec-Bf8g_bIR.js";
6
- import { A as formatFastPrerequisiteFailure, B as runSelfUpdate, D as formatCheap1mPrerequisiteFailure, E as formatBalancedPrerequisiteFailure, F as validateCheapProfilePrerequisites, H as updateClaude, I as validateCheapestProfilePrerequisites, L as validateFastProfilePrerequisites, M as resolveLaunchProfile, N as validateBalancedProfilePrerequisites, O as formatCheapPrerequisiteFailure, P as validateCheap1mProfilePrerequisites, R as validateMaxProfileLaunch, V as checkClaudeVersion, a as setupAndServe, c as startKeepAwake, d as listModelsForEndpoint, f as enableFileLogging, i as parseSharedArgs, j as profileDescriptor, k as formatCheapestPrerequisiteFailure, l as stopKeepAwake, o as sharedServerArgs, s as LAUNCH_SECRET_HEADER, t as getClaudeCodeEnvVars, u as injectModelPickerSettingsFile } from "./server-setup-DinOFWiC.js";
7
- import { n as BALANCED_PROFILE_LEAD_EFFORT, o as BALANCED_PROFILE_NATIVE_MODELS, u as FAST_PROFILE_ADVISOR_CLIENT_MODEL } from "./balanced-profile-contract-XiIj4O1U.js";
8
- import { At as fastGeneralPurposeModel, Bt as nativeSubagentModel, Ct as cheapOracleModel, D as toolbeltEnabled, Dt as cheapestReviewerModel, E as buildToolbeltAwareness, Et as cheapestOracleModel, Ft as fleetToolsEnabled, Gt as scribeModel, Hn as CHEAPEST_PROFILE_ADVISOR_CLIENT_MODEL, Ht as reviewerFastModel, It as geminiAvailable, Jn as CHEAPEST_PROFILE_NATIVE_MODELS, Kt as standInToolEnabled, Lt as generalPurposeFastModel, Mn as isBudgetClaudeLead, Mt as fastPlanModel, Nn as pickClaudeDefault, Nt as fastReviewerModel, Ot as fastAdvisorModel, Pn as resolveLeadSlugArg, Pt as fastScoutModel, Qn as CHEAP_PROFILE_ADVISOR_CLIENT_MODEL, Rt as implementerFastModel, St as cheapAdvisorModel, T as availableToolCommands, Tn as DEFAULT_CLAUDE_MODEL_FALLBACKS, Tt as cheapestAdvisorModel, Ut as reviewerModel, Vt as resolveGeminiReviewModel, Wt as scoutModel, _n as colbertDegradedWarning, _t as balancedReviewerModel, bn as shouldUseInsecureTls, bt as browserCompoundToolsEnabled, fn as provisionBrowserAssets, gt as balancedOracleModel, ht as artifactToolsEnabled, jt as fastOracleModel, kt as fastAstraModel, mt as agentToolsEnabled, nn as unregisterLaunch, nr as CHEAP_PROFILE_NATIVE_MODELS, o as buildPeerAwarenessSnippet, pt as adoToolsEnabled, qt as workerToolsEnabled, r as agentNamesForToolAllowlist, s as buildPeerAwarenessSummary, tn as registerLaunch, vn as provisionAndIndexColbert, vt as brainstormModel, wt as cheapReviewerModel, xt as browserToolsEnabled, yn as semanticSearchOptedIn, yt as browseAgentEnabled, zt as kustoToolsEnabled } from "./peer-mcp-personas-DDMKRFFG.js";
9
- import { _ as maxReviewerModel, c as formatMaxPrerequisiteFailure, f as maxCodexReviewerModel, h as maxOpusModel, i as MAX_PROFILE_MODELS, m as maxGrokModel, o as MAX_PROFILE_NATIVE_EFFORTS, p as maxGeminiModel, v as maxSonnetModel } from "./max-profile-contract-DQDEDCsR.js";
6
+ import { A as formatFastPrerequisiteFailure, B as runSelfUpdate, D as formatCheap1mPrerequisiteFailure, E as formatBalancedPrerequisiteFailure, F as validateCheapProfilePrerequisites, H as updateClaude, I as validateCheapestProfilePrerequisites, L as validateFastProfilePrerequisites, M as resolveLaunchProfile, N as validateBalancedProfilePrerequisites, O as formatCheapPrerequisiteFailure, P as validateCheap1mProfilePrerequisites, R as validateMaxProfileLaunch, V as checkClaudeVersion, a as setupAndServe, c as startKeepAwake, d as listModelsForEndpoint, f as enableFileLogging, i as parseSharedArgs, j as profileDescriptor, k as formatCheapestPrerequisiteFailure, l as stopKeepAwake, o as sharedServerArgs, s as LAUNCH_SECRET_HEADER, t as getClaudeCodeEnvVars, u as injectModelPickerSettingsFile } from "./server-setup-BBSmse1J.js";
7
+ import { t as FAST_PROFILE_ADVISOR_CLIENT_MODEL } from "./fast-profile-contract-JOnZBgFB.js";
8
+ import { At as fastGeneralPurposeModel, Bt as nativeSubagentModel, Ct as cheapOracleModel, D as toolbeltEnabled, Dt as cheapestReviewerModel, E as buildToolbeltAwareness, Et as cheapestOracleModel, Ft as fleetToolsEnabled, Gt as scribeModel, Hn as CHEAP_PROFILE_ADVISOR_CLIENT_MODEL, Ht as reviewerFastModel, It as geminiAvailable, Kn as CHEAP_PROFILE_NATIVE_MODELS, Kt as standInToolEnabled, Lt as generalPurposeFastModel, Mn as isBudgetClaudeLead, Mt as fastPlanModel, Nn as pickClaudeDefault, Nt as fastReviewerModel, Ot as fastAdvisorModel, Pn as resolveLeadSlugArg, Pt as fastScoutModel, Rt as implementerFastModel, St as cheapAdvisorModel, T as availableToolCommands, Tn as DEFAULT_CLAUDE_MODEL_FALLBACKS, Tt as cheapestAdvisorModel, Un as CHEAP_PROFILE_MODELS, Ut as reviewerModel, Vt as resolveGeminiReviewModel, Wt as scoutModel, _n as colbertDegradedWarning, _t as balancedReviewerModel, bn as shouldUseInsecureTls, bt as browserCompoundToolsEnabled, fn as provisionBrowserAssets, gt as balancedOracleModel, ht as artifactToolsEnabled, jt as fastOracleModel, kt as fastAstraModel, mt as agentToolsEnabled, nn as unregisterLaunch, o as buildPeerAwarenessSnippet, pt as adoToolsEnabled, qt as workerToolsEnabled, r as agentNamesForToolAllowlist, s as buildPeerAwarenessSummary, tn as registerLaunch, vn as provisionAndIndexColbert, vt as brainstormModel, wt as cheapReviewerModel, xt as browserToolsEnabled, yn as semanticSearchOptedIn, yt as browseAgentEnabled, zt as kustoToolsEnabled } from "./peer-mcp-personas-DlF1dKCs.js";
9
+ import { S as CHEAPEST_PROFILE_ADVISOR_CLIENT_MODEL, _ as isBalancedFamily, g as displayModelName, m as cheapestContractFor, p as balancedContractFor, r as buildPromptSubmitHookCommand, v as isCheapestFamily, y as isPinnedLaunchProfile } from "./static-context-pack-BRqt4ajJ.js";
10
+ import { _ as maxReviewerModel, c as formatMaxPrerequisiteFailure, f as maxCodexReviewerModel, h as maxOpusModel, i as MAX_PROFILE_MODELS, m as maxGrokModel, o as MAX_PROFILE_NATIVE_EFFORTS, p as maxGeminiModel, v as maxSonnetModel } from "./max-profile-contract-CMvzKSsg.js";
10
11
  import { n as hookLauncherDegradedWarning, r as resolveSelfInvocation } from "./self-invocation-Dr5zlbpM.js";
11
- import { i as launchChild, r as getCodexVersion, t as provisionToolbelt } from "./provision-BtYRtvrj.js";
12
- import { r as buildPromptSubmitHookCommand } from "./static-context-pack-CyucviRD.js";
12
+ import { i as launchChild, r as getCodexVersion, t as provisionToolbelt } from "./provision-DLGlhu3a.js";
13
13
  import { d as stopGateEnabledForRepo, l as repoFingerprint, p as trustRepo, t as fileBaselineStore, u as repoRoot } from "./stop-gate-policy-FGAfpfc-.js";
14
14
  import { d as sweepStaleAicLedgerFiles, n as aicSnapshot, o as formatAicExitSummary, t as aicLedgerPath, u as removeAicLedgerFile } from "./aic-ledger-BdvCgRmx.js";
15
15
  import { d as stopGateId, i as captureLaunchBaseline, l as purgeNonRouterHooksForPinnedProfile, n as buildSessionBindHookCommand, r as buildStopHookCommand, s as injectStopHookIntoSettingsFile, t as buildArtifactOpenHookCommand, u as stopGateDisabled } from "./stop-gate-hook-BYd0NruJ.js";
16
16
  import { t as liveExec } from "./orchestration-D-S_0GVt.js";
17
17
  import { l as guardToolMatcher, n as activeDispatchModes, r as buildWorkerGuardHookCommand } from "./worker-dispatch-BjfROaic.js";
18
- import { a as buildArtifactReviewSkill, c as injectAllowRules, f as injectPeerMcpIntoMirror, g as writePeerMcpRuntimeFiles, h as workersKeyOf, i as writeInjectedSkill, l as planModeAllowRules, m as resolveGroupKeysFromMirror, p as resolveCodexCliBackend, r as injectedSkillsForLaunch, t as injectAttributionSuppressionIntoSettingsFile } from "./attribution-settings-ul6VU6iP.js";
18
+ import { a as buildArtifactReviewSkill, c as injectAllowRules, f as injectPeerMcpIntoMirror, g as writePeerMcpRuntimeFiles, h as workersKeyOf, i as writeInjectedSkill, l as planModeAllowRules, m as resolveGroupKeysFromMirror, p as resolveCodexCliBackend, r as injectedSkillsForLaunch, t as injectAttributionSuppressionIntoSettingsFile } from "./attribution-settings-8Uv97n9j.js";
19
19
  import { r as hookMcpRuntimeFromEnv } from "./hook-mcp-client-DERIkeR7.js";
20
20
  import { i as planReviewEnabled, t as buildPlanReviewHookCommand } from "./plan-review-hook-BQ29WGv7.js";
21
- import { a as checksForDescriptor, i as writeDiscoveredGate, n as readDiscoveredGate, o as descriptorHash, r as sourcesHash, s as parseGateDescriptor, t as discoverGateCommands } from "./gate-discovery-Cvdko01z.js";
21
+ import { a as checksForDescriptor, i as writeDiscoveredGate, n as readDiscoveredGate, o as descriptorHash, r as sourcesHash, s as parseGateDescriptor, t as discoverGateCommands } from "./gate-discovery-CqJVzT_D.js";
22
22
  import { i as assertShapingInstalled, n as buildFirstMateGuardHookCommand, t as FIRST_MATE_GUARD_MATCHER } from "./internal-first-mate-guard-BJvCsVlU.js";
23
- import { r as FAST_DISPATCH_TOOL_MATCHER, t as buildFastDispatchGuardHookCommand } from "./internal-fast-dispatch-guard-BQm1MI9d.js";
24
- import { i as assertMaxDispatchGuardInstalled, r as MAX_DISPATCH_TOOL_MATCHER, t as buildMaxDispatchGuardHookCommand } from "./internal-max-dispatch-guard-DkJixDmG.js";
25
- import { a as buildOperatingDefaultsDirective, c as prependOperatingDefaultsToMirroredClaudeMd, i as buildOperatingDefaultsDigest, l as prependStyleDirectiveToMirroredClaudeMd, n as appendPeerAwarenessToMirroredClaudeMd, r as appendToolbeltAwarenessToMirroredClaudeMd, s as prependArtifactPanelDirectiveToMirroredClaudeMd } from "./claude-md-injection-BoXOsg7h.js";
26
- import { a as injectAicStatusLineIntoSettingsFile, i as buildAicStatusHookCommand, r as AIC_USER_STATUSLINE_ENV, t as AIC_LEDGER_ENV } from "./aic-statusline-settings-LnoxjBPe.js";
27
- import { n as formatDiscountedCostTable, t as discountedUsdForSnapshot } from "./copilot-discount-C3jfysK-.js";
23
+ import { r as FAST_DISPATCH_TOOL_MATCHER, t as buildFastDispatchGuardHookCommand } from "./internal-fast-dispatch-guard-D_TCtJhQ.js";
24
+ import { i as assertMaxDispatchGuardInstalled, r as MAX_DISPATCH_TOOL_MATCHER, t as buildMaxDispatchGuardHookCommand } from "./internal-max-dispatch-guard-D7ByWH4v.js";
25
+ import { a as buildOperatingDefaultsDirective, c as prependOperatingDefaultsToMirroredClaudeMd, i as buildOperatingDefaultsDigest, l as prependStyleDirectiveToMirroredClaudeMd, n as appendPeerAwarenessToMirroredClaudeMd, r as appendToolbeltAwarenessToMirroredClaudeMd, s as prependArtifactPanelDirectiveToMirroredClaudeMd } from "./claude-md-injection-CDOoGNEJ.js";
26
+ import { a as injectAicStatusLineIntoSettingsFile, i as buildAicStatusHookCommand, r as AIC_USER_STATUSLINE_ENV, t as AIC_LEDGER_ENV } from "./aic-statusline-settings-EdsV1gzY.js";
27
+ import { n as formatDiscountedCostTable, t as discountedUsdForSnapshot } from "./copilot-discount-kpOLluHm.js";
28
28
  import { defineCommand } from "citty";
29
29
  import consola from "consola";
30
30
  import path from "node:path";
@@ -184,12 +184,13 @@ function cheapestAdvisorClientEnabled(env = process.env) {
184
184
  }
185
185
  /**
186
186
  * Remove every caller-supplied Advisor option and insert the fixed cheapest
187
- * value (the BARE `gpt-5.6-sol` — 200K default window — see
188
- * `CHEAPEST_PROFILE_ADVISOR_CLIENT_MODEL`). Same parser semantics as the
189
- * cheap variant: keeps scanning after `--`, and the fixed option is inserted
190
- * before the first separator so Claude Code parses it as an option.
187
+ * family value — the BARE slug (200K default window) from the profile
188
+ * contract, so `cheapest` pins `gpt-5.6-sol` and `cheapest2` pins
189
+ * `gpt-6.1-sol` through this one function. Same parser semantics as the cheap
190
+ * variant: keeps scanning after `--`, and the fixed option is inserted before
191
+ * the first separator so Claude Code parses it as an option.
191
192
  */
192
- function withFixedCheapestAdvisorArg(args, enabled = cheapestAdvisorClientEnabled()) {
193
+ function withFixedCheapestAdvisorArg(args, enabled = cheapestAdvisorClientEnabled(), model = CHEAPEST_PROFILE_ADVISOR_CLIENT_MODEL) {
193
194
  const sanitized = [];
194
195
  for (let index = 0; index < args.length; index++) {
195
196
  const token = args[index];
@@ -203,7 +204,7 @@ function withFixedCheapestAdvisorArg(args, enabled = cheapestAdvisorClientEnable
203
204
  }
204
205
  if (!enabled) return sanitized;
205
206
  const separator = sanitized.indexOf("--");
206
- const fixed = [ADVISOR_FLAG, CHEAPEST_PROFILE_ADVISOR_CLIENT_MODEL];
207
+ const fixed = [ADVISOR_FLAG, model];
207
208
  if (separator < 0) return [...sanitized, ...fixed];
208
209
  return [
209
210
  ...sanitized.slice(0, separator),
@@ -218,7 +219,7 @@ const claudeArgs = {
218
219
  model: {
219
220
  alias: "m",
220
221
  type: "string",
221
- description: "Override the default model for Claude Code. Accepts a profile alias (fast, cheap, cheap1m, cheapest, balanced, max), a full slug (e.g. claude-opus-4-7), or an Opus family shorthand (e.g. 4.7, 4.8, 4.6) which expands to the best variant for that family — adding the [1m] suffix when a 1M-context backend is in the catalog."
222
+ description: "Override the default model for Claude Code. Accepts a profile alias (fast, cheap, cheap1m, cheapest, cheapest2, balanced, balanced2, max), a full slug (e.g. claude-opus-4-7), or an Opus family shorthand (e.g. 4.7, 4.8, 4.6) which expands to the best variant for that family — adding the [1m] suffix when a 1M-context backend is in the catalog."
222
223
  },
223
224
  "codex-mcp": {
224
225
  type: "boolean",
@@ -341,8 +342,8 @@ const claude = defineCommand({
341
342
  process$1.stderr.write(`Max profile uses its fixed HTTP MCP surface; --codex-cli is not supported in max profile.\n`);
342
343
  process$1.exit(1);
343
344
  }
344
- if ((requestedLaunchProfileId === "fast" || requestedLaunchProfileId === "max" || requestedLaunchProfileId === "cheap" || requestedLaunchProfileId === "cheap1m" || requestedLaunchProfileId === "cheapest" || requestedLaunchProfileId === "balanced") && !codexMcpEnabled) {
345
- const message = `github-router claude -m ${requestedLaunchProfileId === "fast" ? "fast" : requestedLaunchProfileId === "cheap" ? "cheap" : requestedLaunchProfileId === "cheap1m" ? "cheap1m" : requestedLaunchProfileId === "cheapest" ? "cheapest" : requestedLaunchProfileId === "balanced" ? "balanced" : "max"} requires codex MCP wiring for its native roster and dispatch ACL; remove --no-codex-mcp or choose a standard model.`;
345
+ if ((isPinnedLaunchProfile(requestedLaunchProfileId) || requestedLaunchProfileId === "max") && !codexMcpEnabled) {
346
+ const message = `github-router claude -m ${requestedLaunchProfileId} requires codex MCP wiring for its native roster and dispatch ACL; remove --no-codex-mcp or choose a standard model.`;
346
347
  process$1.stderr.write(`${message}\n`);
347
348
  process$1.exit(1);
348
349
  }
@@ -433,12 +434,12 @@ const claude = defineCommand({
433
434
  } else if (launchProfileId === "cheap" || launchProfileId === "cheap1m") {
434
435
  const prereqCheck = launchProfileId === "cheap1m" ? validateCheap1mProfilePrerequisites(state.models) : validateCheapProfilePrerequisites(state.models);
435
436
  if (!prereqCheck.ok) await fastFatal(launchProfileId === "cheap1m" ? formatCheap1mPrerequisiteFailure(prereqCheck.missing) : formatCheapPrerequisiteFailure(prereqCheck.missing));
436
- } else if (launchProfileId === "cheapest") {
437
- const prereqCheck = validateCheapestProfilePrerequisites(state.models);
438
- if (!prereqCheck.ok) await fastFatal(formatCheapestPrerequisiteFailure(prereqCheck.missing));
439
- } else if (launchProfileId === "balanced") {
440
- const prereqCheck = validateBalancedProfilePrerequisites(state.models);
441
- if (!prereqCheck.ok) await fastFatal(formatBalancedPrerequisiteFailure(prereqCheck.missing));
437
+ } else if (isCheapestFamily(launchProfileId)) {
438
+ const prereqCheck = validateCheapestProfilePrerequisites(state.models, {}, launchProfileId);
439
+ if (!prereqCheck.ok) await fastFatal(formatCheapestPrerequisiteFailure(prereqCheck.missing, launchProfileId));
440
+ } else if (isBalancedFamily(launchProfileId)) {
441
+ const prereqCheck = validateBalancedProfilePrerequisites(state.models, {}, launchProfileId);
442
+ if (!prereqCheck.ok) await fastFatal(formatBalancedPrerequisiteFailure(prereqCheck.missing, launchProfileId));
442
443
  }
443
444
  let chosenSlug = requestedSlug;
444
445
  let resolvedSlug = resolveModel(chosenSlug);
@@ -461,7 +462,7 @@ const claude = defineCommand({
461
462
  }
462
463
  const banner = chosenSlug === resolvedSlug ? chosenSlug : `${chosenSlug} → ${resolvedSlug}`;
463
464
  process$1.stderr.write(`Server ready on ${serverUrl}, launching Claude Code (${banner})...\n`);
464
- if (launchProfileId === "fast" || launchProfileId === "cheap" || launchProfileId === "cheap1m" || launchProfileId === "cheapest" || launchProfileId === "balanced") {
465
+ if (isPinnedLaunchProfile(launchProfileId)) {
465
466
  try {
466
467
  const settingsPath = path.join(PATHS.CLAUDE_CONFIG_DIR, "settings.json");
467
468
  const purgedHooks = await purgeNonRouterHooksForPinnedProfile(settingsPath);
@@ -487,7 +488,7 @@ const claude = defineCommand({
487
488
  consola.warn(`Model-picker settings injection skipped: ${err instanceof Error ? err.message : String(err)}. Use an explicit -m model if the curated rows are unavailable.`);
488
489
  }
489
490
  const envVars = getClaudeCodeEnvVars(serverUrl, chosenSlug, launchProfileId, pickerModels);
490
- if (launchProfileId === "cheap" || launchProfileId === "cheapest" || launchProfileId === "balanced") {
491
+ if (launchProfileId === "cheap" || isCheapestFamily(launchProfileId) || isBalancedFamily(launchProfileId)) {
491
492
  const suspectKeys = [
492
493
  "ANTHROPIC_MODEL",
493
494
  "ANTHROPIC_DEFAULT_OPUS_MODEL",
@@ -499,9 +500,9 @@ const claude = defineCommand({
499
500
  if (suspectKeys.length > 0 || suspectPicker.length > 0) consola.warn(`Pinned-profile context leak (${launchProfileId} must be bare 200K): ` + [...suspectKeys.map((key) => `env:${key}`), ...suspectPicker.map((id) => `picker:${id}`)].join(", "));
500
501
  if (!(envVars.CLAUDE_CODE_DISABLE_1M_CONTEXT ?? process$1.env.CLAUDE_CODE_DISABLE_1M_CONTEXT)) consola.warn(`Pinned-profile context leak (${launchProfileId} must be bare 200K): CLAUDE_CODE_DISABLE_1M_CONTEXT is not effectively set — the lead may budget ~1M despite bare ids.`);
501
502
  }
502
- if (launchProfileId === "fast" || launchProfileId === "cheap" || launchProfileId === "cheap1m" || launchProfileId === "cheapest" || launchProfileId === "balanced") {
503
+ if (isPinnedLaunchProfile(launchProfileId)) {
503
504
  consola.info(`Pinned launch: profile=${launchProfileId} lead=${chosenSlug} pickerRows=${pickerModels?.length ?? 0}.`);
504
- if (launchProfileId === "cheapest" || launchProfileId === "balanced") {
505
+ if (isCheapestFamily(launchProfileId) || isBalancedFamily(launchProfileId)) {
505
506
  const firstLuna = (pickerModels ?? []).find((id) => id.replace(/(?:\[1m\])+$/i, "") === "gpt-6-luna");
506
507
  const rowsVerified = pickerModels !== void 0;
507
508
  const defaultRowBare = !rowsVerified || firstLuna !== void 0 && !/\[1m\]/i.test(firstLuna);
@@ -514,7 +515,7 @@ const claude = defineCommand({
514
515
  ].filter((key) => typeof envVars[key] === "string" && /\[1m\]/i.test(envVars[key]));
515
516
  const disableSeeded = Boolean(envVars.CLAUDE_CODE_DISABLE_1M_CONTEXT ?? process$1.env.CLAUDE_CODE_DISABLE_1M_CONTEXT);
516
517
  const effectiveEffort = (envVars.CLAUDE_CODE_EFFORT_LEVEL ?? process$1.env.CLAUDE_CODE_EFFORT_LEVEL ?? "").trim();
517
- const contractedEffort = launchProfileId === "cheapest" ? "max" : BALANCED_PROFILE_LEAD_EFFORT;
518
+ const contractedEffort = isCheapestFamily(launchProfileId) ? cheapestContractFor(launchProfileId).leadEffort : balancedContractFor(launchProfileId).leadEffort;
518
519
  const effortOk = effectiveEffort === contractedEffort;
519
520
  const effortRecognized = [
520
521
  "low",
@@ -534,8 +535,8 @@ const claude = defineCommand({
534
535
  }
535
536
  let extraArgs = collectChildPassthroughArgs(rawArgs, claudeArgs);
536
537
  if (launchProfileId === "fast") extraArgs = withFixedFastAdvisorArg(extraArgs, fastAdvisorClientEnabled(process$1.env));
537
- else if (launchProfileId === "cheap" || launchProfileId === "cheap1m" || launchProfileId === "balanced") extraArgs = withFixedCheapAdvisorArg(extraArgs, cheapAdvisorClientEnabled(process$1.env));
538
- else if (launchProfileId === "cheapest") extraArgs = withFixedCheapestAdvisorArg(extraArgs, cheapestAdvisorClientEnabled(process$1.env));
538
+ else if (launchProfileId === "cheap" || launchProfileId === "cheap1m" || isBalancedFamily(launchProfileId)) extraArgs = withFixedCheapAdvisorArg(extraArgs, cheapAdvisorClientEnabled(process$1.env));
539
+ else if (isCheapestFamily(launchProfileId)) extraArgs = withFixedCheapestAdvisorArg(extraArgs, cheapestAdvisorClientEnabled(process$1.env), cheapestContractFor(launchProfileId).advisorClientModel);
539
540
  if (toolbeltEnabled()) {
540
541
  provisionToolbelt().catch((err) => consola.debug("Toolbelt provisioning failed:", err));
541
542
  const toolbeltLine = buildToolbeltAwareness(availableToolCommands());
@@ -556,7 +557,7 @@ const claude = defineCommand({
556
557
  await stopKeepAwake();
557
558
  const { disposeBluebirdClients } = await import("./bluebird-client-mr3M67k-.js");
558
559
  await disposeBluebirdClients();
559
- const { disposeAdoClients } = await import("./ado-tools-xbuVU7YN.js");
560
+ const { disposeAdoClients } = await import("./ado-tools-CN4i9OVl.js");
560
561
  await disposeAdoClients();
561
562
  await removeOwnClaudeConfigMirror();
562
563
  await removeAicLedgerFile();
@@ -565,7 +566,8 @@ const claude = defineCommand({
565
566
  let peerAwarenessSnippet;
566
567
  let peerAwarenessSummary;
567
568
  let operatingGroupKeys = {};
568
- let fastWiringComplete = launchProfileId !== "fast" && !(launchProfileId === "cheap" || launchProfileId === "cheap1m" || launchProfileId === "cheapest" || launchProfileId === "balanced");
569
+ const isCheapLaunch = launchProfileId === "cheap" || launchProfileId === "cheap1m" || isCheapestFamily(launchProfileId) || isBalancedFamily(launchProfileId);
570
+ let fastWiringComplete = launchProfileId !== "fast" && !isCheapLaunch;
569
571
  const astraAvailable = (launchProfileId === "fast" || launchProfileId === "cheap1m") && Boolean(fastAstraModel());
570
572
  const browseAgentAvailable = browseAgentEnabled();
571
573
  const directBrowserAvailable = browserToolsEnabled();
@@ -582,14 +584,14 @@ const claude = defineCommand({
582
584
  Plan: CHEAP_PROFILE_NATIVE_MODELS.Plan,
583
585
  "General-Purpose": CHEAP_PROFILE_NATIVE_MODELS["General-Purpose"],
584
586
  reviewer: cheapReviewerModel()
585
- } : launchProfileId === "cheapest" ? {
586
- Explore: CHEAPEST_PROFILE_NATIVE_MODELS.Explore,
587
- "General-Purpose": CHEAPEST_PROFILE_NATIVE_MODELS["General-Purpose"],
588
- reviewer: cheapestReviewerModel()
589
- } : launchProfileId === "balanced" ? {
590
- Explore: BALANCED_PROFILE_NATIVE_MODELS.Explore,
591
- "General-Purpose": BALANCED_PROFILE_NATIVE_MODELS["General-Purpose"],
592
- reviewer: balancedReviewerModel()
587
+ } : isCheapestFamily(launchProfileId) ? {
588
+ Explore: cheapestContractFor(launchProfileId).nativeModels.Explore,
589
+ "General-Purpose": cheapestContractFor(launchProfileId).nativeModels["General-Purpose"],
590
+ reviewer: cheapestReviewerModel(launchProfileId)
591
+ } : isBalancedFamily(launchProfileId) ? {
592
+ Explore: balancedContractFor(launchProfileId).nativeModels.Explore,
593
+ "General-Purpose": balancedContractFor(launchProfileId).nativeModels["General-Purpose"],
594
+ reviewer: balancedReviewerModel(launchProfileId)
593
595
  } : launchProfileId === "max" ? {
594
596
  Explore: MAX_PROFILE_MODELS.luna,
595
597
  Plan: MAX_PROFILE_MODELS.sol,
@@ -608,7 +610,7 @@ const claude = defineCommand({
608
610
  "general-purpose-fast": generalPurposeFastModel()
609
611
  };
610
612
  const nativeAvailability = {
611
- scoutAvailable: (launchProfileId === "fast" || launchProfileId === "cheap" || launchProfileId === "cheap1m" || launchProfileId === "cheapest" || launchProfileId === "balanced" ? nativeAgentModels.Explore : nativeAgentModels.scout) != null,
613
+ scoutAvailable: (launchProfileId === "fast" || launchProfileId === "cheap" || launchProfileId === "cheap1m" || isCheapestFamily(launchProfileId) || isBalancedFamily(launchProfileId) ? nativeAgentModels.Explore : nativeAgentModels.scout) != null,
612
614
  implementerFastAvailable: nativeAgentModels["implementer-fast"] != null,
613
615
  reviewerFastAvailable: nativeAgentModels["reviewer-fast"] != null,
614
616
  generalPurposeFastAvailable: nativeAgentModels["general-purpose-fast"] != null,
@@ -624,7 +626,7 @@ const claude = defineCommand({
624
626
  const requestedCli = args["codex-cli"] ?? false;
625
627
  const isFastProfile = launchProfileId === "fast";
626
628
  const isMaxProfile = launchProfileId === "max";
627
- const isCheapProfile = launchProfileId === "cheap" || launchProfileId === "cheap1m" || launchProfileId === "cheapest" || launchProfileId === "balanced";
629
+ const isCheapProfile = launchProfileId === "cheap" || launchProfileId === "cheap1m" || isCheapestFamily(launchProfileId) || isBalancedFamily(launchProfileId);
628
630
  const isPinnedProfile = isFastProfile || isMaxProfile || isCheapProfile;
629
631
  if ((isFastProfile || isCheapProfile) && requestedCli) process$1.stderr.write("Fast/cheap profile uses its fixed HTTP MCP surface; ignoring --codex-cli.\n");
630
632
  const backend = isPinnedProfile ? "http" : resolveCodexCliBackend({
@@ -654,10 +656,16 @@ const claude = defineCommand({
654
656
  if (isMaxProfile && agentToolsEnabled()) enabledGroups.push("first-mate");
655
657
  const { keys: groupKeys, skipped: skippedGroups } = await resolveGroupKeysFromMirror(enabledGroups);
656
658
  operatingGroupKeys = groupKeys;
657
- if (isPinnedProfile && ((launchProfileId === "cheapest" ? cheapestOracleModel() : launchProfileId === "balanced" ? balancedOracleModel() : isCheapProfile ? cheapOracleModel() : fastOracleModel()) == null || (launchProfileId === "balanced" ? false : (launchProfileId === "cheapest" ? cheapestAdvisorModel() : isCheapProfile ? cheapAdvisorModel() : fastAdvisorModel()) == null) || nativeAgentModels.reviewer == null)) {
658
- if (launchProfileId === "cheapest") throw new Error("cheapest profile prerequisite drift: exact reviewer (gpt-6-luna), oracle (gpt-5.6-sol), or advisor (gpt-5.6-sol) model no longer resolves");
659
- if (launchProfileId === "balanced") throw new Error("balanced profile prerequisite drift: exact reviewer (gpt-5.6-sol) or oracle (grok-4.6) model no longer resolves");
660
- if (isCheapProfile) throw new Error("cheap profile prerequisite drift: exact reviewer or oracle (grok-4.6) model no longer resolves");
659
+ if (isPinnedProfile && ((isCheapestFamily(launchProfileId) ? cheapestOracleModel(launchProfileId) : isBalancedFamily(launchProfileId) ? balancedOracleModel(launchProfileId) : isCheapProfile ? cheapOracleModel() : fastOracleModel()) == null || (isBalancedFamily(launchProfileId) ? false : (isCheapestFamily(launchProfileId) ? cheapestAdvisorModel(launchProfileId) : isCheapProfile ? cheapAdvisorModel() : fastAdvisorModel()) == null) || nativeAgentModels.reviewer == null)) {
660
+ if (isCheapestFamily(launchProfileId)) {
661
+ const contract = cheapestContractFor(launchProfileId);
662
+ throw new Error(`${launchProfileId} profile prerequisite drift: exact reviewer (${displayModelName(contract.nativeModels.reviewer)}), oracle (${displayModelName(contract.oracleModel)}), or advisor (${displayModelName(contract.advisorModel)}) model no longer resolves`);
663
+ }
664
+ if (isBalancedFamily(launchProfileId)) {
665
+ const contract = balancedContractFor(launchProfileId);
666
+ throw new Error(`${launchProfileId} profile prerequisite drift: exact reviewer (${displayModelName(contract.nativeModels.reviewer)}) or oracle (${displayModelName(contract.oracleModel)}) model no longer resolves`);
667
+ }
668
+ if (isCheapProfile) throw new Error(`cheap profile prerequisite drift: exact reviewer (${displayModelName(CHEAP_PROFILE_MODELS.reviewer)}), advisor (${displayModelName(CHEAP_PROFILE_MODELS.advisor)}), or oracle (${displayModelName(CHEAP_PROFILE_MODELS.oracle)}) model no longer resolves`);
661
669
  throw new Error("fast profile prerequisite drift: exact Oracle, Advisor, or reviewer model no longer resolves");
662
670
  }
663
671
  const leadPeersNonce = (isFastProfile || launchProfileId === "cheap1m") && astraAvailable ? randomBytes(32).toString("hex") : void 0;
@@ -689,12 +697,12 @@ const claude = defineCommand({
689
697
  fastPlanModel: nativeAgentModels.Plan,
690
698
  fastGeneralPurposeModel: nativeAgentModels["General-Purpose"],
691
699
  fastReviewerModel: nativeAgentModels.reviewer
692
- } : launchProfileId === "cheapest" ? {
700
+ } : isCheapestFamily(launchProfileId) ? {
693
701
  cheapestProfile: true,
694
702
  cheapestExploreModel: nativeAgentModels.Explore,
695
703
  cheapestGeneralPurposeModel: nativeAgentModels["General-Purpose"],
696
704
  cheapestReviewerModel: nativeAgentModels.reviewer
697
- } : launchProfileId === "balanced" ? {
705
+ } : isBalancedFamily(launchProfileId) ? {
698
706
  balancedProfile: true,
699
707
  balancedExploreModel: nativeAgentModels.Explore,
700
708
  balancedGeneralPurposeModel: nativeAgentModels["General-Purpose"],
@@ -785,7 +793,7 @@ const claude = defineCommand({
785
793
  const guardCommand = buildFastDispatchGuardHookCommand(selfInvocation, {
786
794
  allowBrowse: browseAgentAvailable,
787
795
  allowedTargets: [...fastDescriptor.nativeRoster ?? [], ...browseAgentAvailable ? ["worker-browse"] : []],
788
- graph: launchProfileId === "balanced" ? "balanced" : void 0
796
+ graph: isBalancedFamily(launchProfileId) ? "balanced" : void 0
789
797
  });
790
798
  await injectStopHookIntoSettingsFile(settingsPath, guardCommand, "PreToolUse", 10, FAST_DISPATCH_TOOL_MATCHER);
791
799
  fastGuardInstalled = true;
@@ -828,7 +836,7 @@ const claude = defineCommand({
828
836
  });
829
837
  let skillsWritten = 0;
830
838
  for (const s of skillsToWrite) if ((await writeInjectedSkill(s.name, s.md).catch(() => ({ written: false }))).written) skillsWritten++;
831
- if (workerSkillsActive || launchProfileId === "cheapest") try {
839
+ if (workerSkillsActive || isCheapestFamily(launchProfileId)) try {
832
840
  const settingsPath = path.join(PATHS.CLAUDE_CONFIG_DIR, "settings.json");
833
841
  const cmd = buildPromptSubmitHookCommand(selfInvocation);
834
842
  await injectStopHookIntoSettingsFile(settingsPath, cmd, "UserPromptSubmit", 90);
@@ -1057,13 +1065,13 @@ const claude = defineCommand({
1057
1065
  consola.warn(`Style-directive CLAUDE.md prepend failed: ${err instanceof Error ? err.message : String(err)}`);
1058
1066
  }
1059
1067
  } catch (err) {
1060
- if (launchProfileId === "fast" || launchProfileId === "max" || launchProfileId === "cheap" || launchProfileId === "cheap1m" || launchProfileId === "cheapest" || launchProfileId === "balanced") {
1068
+ if (isPinnedLaunchProfile(launchProfileId) || launchProfileId === "max") {
1061
1069
  if (fastLaunchId) unregisterLaunch(fastLaunchId);
1062
1070
  await disposeFastRuntime().catch(() => {});
1063
1071
  await server.close(true).catch(() => {});
1064
1072
  await baseShutdown().catch(() => {});
1065
1073
  resetFastRuntimeOwnership();
1066
- const message = `${launchProfileId === "fast" ? "Fast" : launchProfileId === "cheap" ? "Cheap" : launchProfileId === "cheap1m" ? "Cheap1m" : launchProfileId === "cheapest" ? "Cheapest" : launchProfileId === "balanced" ? "Balanced" : "Max"} profile wiring failed; refusing to launch an unguarded session: ${err instanceof Error ? err.message : String(err)}`;
1074
+ const message = `${launchProfileId.charAt(0).toUpperCase() + launchProfileId.slice(1)} profile wiring failed; refusing to launch an unguarded session: ${err instanceof Error ? err.message : String(err)}`;
1067
1075
  consola.error(message);
1068
1076
  process$1.stderr.write(`${message}\n`);
1069
1077
  process$1.exit(1);
@@ -1103,7 +1111,8 @@ const claude = defineCommand({
1103
1111
  sweepStaleAicLedgerFiles();
1104
1112
  const settingsPath = path.join(PATHS.CLAUDE_CONFIG_DIR, "settings.json");
1105
1113
  const statusCommand = buildAicStatusHookCommand(selfInvocation);
1106
- const injected = await injectAicStatusLineIntoSettingsFile(settingsPath, statusCommand, launchProfileId === "fast" || launchProfileId === "cheap" || launchProfileId === "cheap1m" || launchProfileId === "cheapest" || launchProfileId === "balanced" ? { routerWins: true } : {});
1114
+ const routerWinsStatusLine = isPinnedLaunchProfile(launchProfileId);
1115
+ const injected = await injectAicStatusLineIntoSettingsFile(settingsPath, statusCommand, routerWinsStatusLine ? { routerWins: true } : {});
1107
1116
  if (injected.written) {
1108
1117
  envVars[AIC_LEDGER_ENV] = aicLedgerPath();
1109
1118
  if (injected.mode === "wrapped" && injected.userCommand) envVars[AIC_USER_STATUSLINE_ENV] = injected.userCommand;
@@ -1132,4 +1141,4 @@ const claude = defineCommand({
1132
1141
  //#endregion
1133
1142
  export { claude };
1134
1143
 
1135
- //# sourceMappingURL=claude-xO1XW-Nn.js.map
1144
+ //# sourceMappingURL=claude-C_1OM7ce.js.map