github-router 0.3.381 → 0.3.383

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 (149) hide show
  1. package/README.md +6 -0
  2. package/dist/ado-tools-Ddv910Zl.js +1 -0
  3. package/dist/{aic-ledger-6GKI28nY.js → aic-ledger-Bz87EuHl.js} +3 -3
  4. package/dist/{aic-ledger-6GKI28nY.js.map → aic-ledger-Bz87EuHl.js.map} +1 -1
  5. package/dist/{aic-statusline-settings-wLL1l_Z6.js → aic-statusline-settings-dkVZbpRL.js} +2 -2
  6. package/dist/{aic-statusline-settings-wLL1l_Z6.js.map → aic-statusline-settings-dkVZbpRL.js.map} +1 -1
  7. package/dist/{attribution-settings-BEwSkdhK.js → attribution-settings-BcPiSoZe.js} +27 -30
  8. package/dist/{attribution-settings-BEwSkdhK.js.map → attribution-settings-BcPiSoZe.js.map} +1 -1
  9. package/dist/{auth-5TKcQbbH.js → auth-D9eTY_W6.js} +3 -3
  10. package/dist/{auth-5TKcQbbH.js.map → auth-D9eTY_W6.js.map} +1 -1
  11. package/dist/bin.js +21 -4
  12. package/dist/bin.js.map +1 -1
  13. package/dist/bluebird-client-CLXs7q-X.js +1 -0
  14. package/dist/{bluebird-client-BasIdv5J.js → bluebird-client-bykMZyn1.js} +2 -2
  15. package/dist/{bluebird-client-BasIdv5J.js.map → bluebird-client-bykMZyn1.js.map} +1 -1
  16. package/dist/browser-ext/manifest.json +1 -1
  17. package/dist/{check-usage-DM39fdel.js → check-usage-BBaD35u4.js} +4 -4
  18. package/dist/{check-usage-DM39fdel.js.map → check-usage-BBaD35u4.js.map} +1 -1
  19. package/dist/{claude-CkrhHkPQ.js → claude-DOKuv2zZ.js} +29 -29
  20. package/dist/{claude-CkrhHkPQ.js.map → claude-DOKuv2zZ.js.map} +1 -1
  21. package/dist/{claude-md-injection-DNMDcw1W.js → claude-md-injection-BadtN0-I.js} +17 -8
  22. package/dist/claude-md-injection-BadtN0-I.js.map +1 -0
  23. package/dist/{codex-50GzveCD.js → codex-Dw_eBfXW.js} +9 -9
  24. package/dist/{codex-50GzveCD.js.map → codex-Dw_eBfXW.js.map} +1 -1
  25. package/dist/{copilot-discount-DM98PuAF.js → copilot-discount-BSDefQRW.js} +2 -2
  26. package/dist/{copilot-discount-DM98PuAF.js.map → copilot-discount-BSDefQRW.js.map} +1 -1
  27. package/dist/{debug-Df0Kuzi3.js → debug-B8eRYH-c.js} +2 -2
  28. package/dist/{debug-Df0Kuzi3.js.map → debug-B8eRYH-c.js.map} +1 -1
  29. package/dist/engine-DPtLOUuj.js +1 -0
  30. package/dist/{exec-BC0MAnoA.js → exec-oCtz_dXO.js} +22 -5
  31. package/dist/exec-oCtz_dXO.js.map +1 -0
  32. package/dist/{gate-discovery-2ILpM2fi.js → gate-discovery-DE_KTX2p.js} +6 -6
  33. package/dist/{gate-discovery-2ILpM2fi.js.map → gate-discovery-DE_KTX2p.js.map} +1 -1
  34. package/dist/{get-copilot-usage-BZ6t2hFZ.js → get-copilot-usage-Dh9u7WeP.js} +2 -2
  35. package/dist/{get-copilot-usage-BZ6t2hFZ.js.map → get-copilot-usage-Dh9u7WeP.js.map} +1 -1
  36. package/dist/hooks.mjs +21 -4
  37. package/dist/hooks.sha256 +1 -1
  38. package/dist/{index-cmd-DsK6VFs8.js → index-cmd-C4womtOS.js} +5 -5
  39. package/dist/{index-cmd-DsK6VFs8.js.map → index-cmd-C4womtOS.js.map} +1 -1
  40. package/dist/{internal-aic-status-CUZ7-trf.js → internal-aic-status-DSO2sR5u.js} +4 -4
  41. package/dist/{internal-aic-status-CUZ7-trf.js.map → internal-aic-status-DSO2sR5u.js.map} +1 -1
  42. package/dist/{internal-artifact-open-DRBg1PpV.js → internal-artifact-open-dlgqWieq.js} +2 -2
  43. package/dist/{internal-artifact-open-DRBg1PpV.js.map → internal-artifact-open-dlgqWieq.js.map} +1 -1
  44. package/dist/{internal-fast-dispatch-guard-ZeS9u0A3.js → internal-fast-dispatch-guard-5nCNht5y.js} +2 -2
  45. package/dist/{internal-fast-dispatch-guard-ZeS9u0A3.js.map → internal-fast-dispatch-guard-5nCNht5y.js.map} +1 -1
  46. package/dist/{internal-fast-dispatch-guard-D6-Ees_6.js → internal-fast-dispatch-guard-DHm96Bj_.js} +1 -1
  47. package/dist/{internal-first-mate-guard-DsEEsLKJ.js → internal-first-mate-guard-Bb9Stjy-.js} +3 -3
  48. package/dist/{internal-first-mate-guard-DsEEsLKJ.js.map → internal-first-mate-guard-Bb9Stjy-.js.map} +1 -1
  49. package/dist/{internal-first-mate-guard-BijeVpi9.js → internal-first-mate-guard-D6HMd9Iz.js} +1 -1
  50. package/dist/{internal-max-dispatch-guard-4RLca1i5.js → internal-max-dispatch-guard-C8kq4WNV.js} +3 -3
  51. package/dist/{internal-max-dispatch-guard-4RLca1i5.js.map → internal-max-dispatch-guard-C8kq4WNV.js.map} +1 -1
  52. package/dist/{internal-max-dispatch-guard-DeEfWqfP.js → internal-max-dispatch-guard-CI17mrDJ.js} +1 -1
  53. package/dist/{internal-plan-review-bzqGNdtw.js → internal-plan-review-Bdga9wVP.js} +3 -3
  54. package/dist/{internal-plan-review-bzqGNdtw.js.map → internal-plan-review-Bdga9wVP.js.map} +1 -1
  55. package/dist/{internal-prompt-submit-ZBhH-SQ1.js → internal-prompt-submit-DKlHlcvK.js} +2 -2
  56. package/dist/{internal-prompt-submit-BZ2-CExM.js → internal-prompt-submit-Daswp8ro.js} +5 -5
  57. package/dist/{internal-prompt-submit-BZ2-CExM.js.map → internal-prompt-submit-Daswp8ro.js.map} +1 -1
  58. package/dist/{internal-rebrief-BIWbN7Sr.js → internal-rebrief-D8O1J-_J.js} +5 -5
  59. package/dist/{internal-rebrief-BIWbN7Sr.js.map → internal-rebrief-D8O1J-_J.js.map} +1 -1
  60. package/dist/{internal-session-bind-BL6hFRLO.js → internal-session-bind-0hQFrcWu.js} +2 -2
  61. package/dist/{internal-session-bind-BL6hFRLO.js.map → internal-session-bind-0hQFrcWu.js.map} +1 -1
  62. package/dist/{internal-stop-hook-cDF1MuJZ.js → internal-stop-hook-C3lLh-HY.js} +6 -6
  63. package/dist/{internal-stop-hook-cDF1MuJZ.js.map → internal-stop-hook-C3lLh-HY.js.map} +1 -1
  64. package/dist/{internal-stop-review-y8zjpK_3.js → internal-stop-review-Bnmzcqx5.js} +2 -2
  65. package/dist/{internal-stop-review-y8zjpK_3.js.map → internal-stop-review-Bnmzcqx5.js.map} +1 -1
  66. package/dist/{internal-worker-guard-DdyYBZR0.js → internal-worker-guard-LcPxDlbx.js} +2 -2
  67. package/dist/{internal-worker-guard-DdyYBZR0.js.map → internal-worker-guard-LcPxDlbx.js.map} +1 -1
  68. package/dist/{internal-workspace-header-BMKbO8yX.js → internal-workspace-header-BH53hBXO.js} +2 -2
  69. package/dist/{internal-workspace-header-BMKbO8yX.js.map → internal-workspace-header-BH53hBXO.js.map} +1 -1
  70. package/dist/{lifecycle-COZhARmE.js → lifecycle-BmoqtVj3.js} +2 -2
  71. package/dist/{lifecycle-COZhARmE.js.map → lifecycle-BmoqtVj3.js.map} +1 -1
  72. package/dist/lifecycle-CcNNfKbr.js +1 -0
  73. package/dist/lifecycle-CrImfxCd.js +1 -0
  74. package/dist/{lifecycle-BlC_kzNt.js → lifecycle-CwxOsp-U.js} +3 -3
  75. package/dist/{lifecycle-BlC_kzNt.js.map → lifecycle-CwxOsp-U.js.map} +1 -1
  76. package/dist/main.js +25 -25
  77. package/dist/{max-profile-contract-DbHwiLTx.js → max-profile-contract-CEn8hKb3.js} +60 -60
  78. package/dist/{max-profile-contract-DbHwiLTx.js.map → max-profile-contract-CEn8hKb3.js.map} +1 -1
  79. package/dist/{mcp-workspace-header-Bpa4BId8.js → mcp-workspace-header-lb7GV78v.js} +2 -2
  80. package/dist/{mcp-workspace-header-Bpa4BId8.js.map → mcp-workspace-header-lb7GV78v.js.map} +1 -1
  81. package/dist/{models-BDV-YLf2.js → models-BTCnhBCQ.js} +3 -3
  82. package/dist/{models-BDV-YLf2.js.map → models-BTCnhBCQ.js.map} +1 -1
  83. package/dist/{optional-DGAeyguL.js → optional-LUQJI6Vx.js} +216 -16
  84. package/dist/optional-LUQJI6Vx.js.map +1 -0
  85. package/dist/{orchestration-Bto5Nc1Y.js → orchestration-C_hyBL90.js} +3 -3
  86. package/dist/{orchestration-Bto5Nc1Y.js.map → orchestration-C_hyBL90.js.map} +1 -1
  87. package/dist/origin-9bOjyzvK.js +1 -0
  88. package/dist/{origin-BXtpcKP9.js → origin-B6GChVyp.js} +2 -2
  89. package/dist/{origin-BXtpcKP9.js.map → origin-B6GChVyp.js.map} +1 -1
  90. package/dist/{paths-DeFmYJhO.js → paths-CVXqt2tC.js} +3 -3
  91. package/dist/{paths-DeFmYJhO.js.map → paths-CVXqt2tC.js.map} +1 -1
  92. package/dist/paths-JIusmD6L.js +1 -0
  93. package/dist/{peer-mcp-personas-Dny0r5Am.js → peer-mcp-personas-Dgog_ZJ8.js} +54 -54
  94. package/dist/{peer-mcp-personas-Dny0r5Am.js.map → peer-mcp-personas-Dgog_ZJ8.js.map} +1 -1
  95. package/dist/{pi-DVud9eQn.js → pi-BZhnf1kx.js} +95 -35
  96. package/dist/pi-BZhnf1kx.js.map +1 -0
  97. package/dist/{pi-version-check-BeBB0Ny9.js → pi-version-check-BRt9XFLj.js} +4 -4
  98. package/dist/{pi-version-check-BeBB0Ny9.js.map → pi-version-check-BRt9XFLj.js.map} +1 -1
  99. package/dist/pi-version-check-SH1X9u4H.js +1 -0
  100. package/dist/{plan-review-hook-D_yyjOgO.js → plan-review-hook-Dx3suYmK.js} +4 -4
  101. package/dist/{plan-review-hook-D_yyjOgO.js.map → plan-review-hook-Dx3suYmK.js.map} +1 -1
  102. package/dist/{provision-BWtuDq_v.js → provision-A1YSravb.js} +6 -6
  103. package/dist/{provision-BWtuDq_v.js.map → provision-A1YSravb.js.map} +1 -1
  104. package/dist/{rerank-cross-encoder-BhjImuwG.js → rerank-cross-encoder-uqRu-LOe.js} +2 -2
  105. package/dist/{rerank-cross-encoder-BhjImuwG.js.map → rerank-cross-encoder-uqRu-LOe.js.map} +1 -1
  106. package/dist/{self-invocation-Dnq4iVD6.js → self-invocation-CayD3y72.js} +2 -2
  107. package/dist/{self-invocation-Dnq4iVD6.js.map → self-invocation-CayD3y72.js.map} +1 -1
  108. package/dist/{serve-B8Igr9Q0.js → serve-Cv3S3PFR.js} +17 -17
  109. package/dist/{serve-B8Igr9Q0.js.map → serve-Cv3S3PFR.js.map} +1 -1
  110. package/dist/{server-setup-byIhjgOb.js → server-setup--CYeBD-Z.js} +14 -14
  111. package/dist/{server-setup-byIhjgOb.js.map → server-setup--CYeBD-Z.js.map} +1 -1
  112. package/dist/{service-backend-BdhWVRSz.js → service-backend-EgwiO_K-.js} +6 -6
  113. package/dist/{service-backend-BdhWVRSz.js.map → service-backend-EgwiO_K-.js.map} +1 -1
  114. package/dist/{start-7CiQIl0r.js → start-CA0JsO56.js} +5 -5
  115. package/dist/{start-7CiQIl0r.js.map → start-CA0JsO56.js.map} +1 -1
  116. package/dist/{static-context-pack-BKFelEbM.js → static-context-pack-BIru_SKh.js} +142 -142
  117. package/dist/{static-context-pack-BKFelEbM.js.map → static-context-pack-BIru_SKh.js.map} +1 -1
  118. package/dist/{stop-gate-hook-DBOj0TqL.js → stop-gate-hook-Ba_RvZAj.js} +4 -4
  119. package/dist/{stop-gate-hook-DBOj0TqL.js.map → stop-gate-hook-Ba_RvZAj.js.map} +1 -1
  120. package/dist/{stop-gate-policy-Bp2wGh_W.js → stop-gate-policy-gW0a0hds.js} +3 -3
  121. package/dist/{stop-gate-policy-Bp2wGh_W.js.map → stop-gate-policy-gW0a0hds.js.map} +1 -1
  122. package/dist/{token-Ygd7D32L.js → token-BCzbNu8O.js} +3 -3
  123. package/dist/{token-Ygd7D32L.js.map → token-BCzbNu8O.js.map} +1 -1
  124. package/dist/{token-CKPOBdO0.js → token-CxKcs3I_.js} +2 -2
  125. package/dist/{token-CKPOBdO0.js.map → token-CxKcs3I_.js.map} +1 -1
  126. package/dist/{update-T1L7yFon.js → update-CM1yUCJR.js} +4 -4
  127. package/dist/{update-T1L7yFon.js.map → update-CM1yUCJR.js.map} +1 -1
  128. package/dist/update-Cpg-tbJG.js +1 -0
  129. package/dist/{update-fEgWTrIx.js → update-ZqCRVU0a.js} +4 -4
  130. package/dist/{update-fEgWTrIx.js.map → update-ZqCRVU0a.js.map} +1 -1
  131. package/dist/{worker-dispatch-DBWKTMda.js → worker-dispatch-DHZAfPO2.js} +2 -2
  132. package/dist/{worker-dispatch-DBWKTMda.js.map → worker-dispatch-DHZAfPO2.js.map} +1 -1
  133. package/dist/{workiq-D5b7xlbr.js → workiq-CRBVCUA4.js} +2 -2
  134. package/dist/{workiq-D5b7xlbr.js.map → workiq-CRBVCUA4.js.map} +1 -1
  135. package/dist/{workiq-tools-DdiQ2DOW.js → workiq-tools-BsoHfdYi.js} +1 -1
  136. package/package.json +1 -1
  137. package/dist/ado-tools-CsfbnY8x.js +0 -1
  138. package/dist/bluebird-client-BvoMTmEv.js +0 -1
  139. package/dist/claude-md-injection-DNMDcw1W.js.map +0 -1
  140. package/dist/engine-B6la_uIW.js +0 -1
  141. package/dist/exec-BC0MAnoA.js.map +0 -1
  142. package/dist/lifecycle-BOjgq9_l.js +0 -1
  143. package/dist/lifecycle-NQvr4flt.js +0 -1
  144. package/dist/optional-DGAeyguL.js.map +0 -1
  145. package/dist/origin-DbFUCiGp.js +0 -1
  146. package/dist/paths-CquOjytP.js +0 -1
  147. package/dist/pi-DVud9eQn.js.map +0 -1
  148. package/dist/pi-version-check-D5RvdLsG.js +0 -1
  149. package/dist/update-CB21YRKz.js +0 -1
@@ -1,7 +1,7 @@
1
- import { Bn as colbertDegradedWarning, Mn as provisionBrowserAssets, Nt as browserToolsEnabled, Vn as provisionAndIndexColbert } from "./peer-mcp-personas-Dny0r5Am.js";
2
- import { a as setupAndServe, i as parseSharedArgs, n as getCodexEnvVars, o as sharedServerArgs, p as startKeepAwake, t as getClaudeCodeEnvVars } from "./server-setup-byIhjgOb.js";
3
- import { P as warmTreeSitterPool } from "./service-backend-BdhWVRSz.js";
4
- import { u as runSelfUpdate } from "./pi-version-check-BeBB0Ny9.js";
1
+ import { Bn as colbertDegradedWarning, Mn as provisionBrowserAssets, Nt as browserToolsEnabled, Vn as provisionAndIndexColbert } from "./peer-mcp-personas-Dgog_ZJ8.js";
2
+ import { a as setupAndServe, i as parseSharedArgs, n as getCodexEnvVars, o as sharedServerArgs, p as startKeepAwake, t as getClaudeCodeEnvVars } from "./server-setup--CYeBD-Z.js";
3
+ import { P as warmTreeSitterPool } from "./service-backend-EgwiO_K-.js";
4
+ import { u as runSelfUpdate } from "./pi-version-check-BRt9XFLj.js";
5
5
  import { defineCommand } from "citty";
6
6
  import consola from "consola";
7
7
  import process$1 from "node:process";
@@ -129,4 +129,4 @@ const start = defineCommand({
129
129
  });
130
130
  export { start };
131
131
 
132
- //# sourceMappingURL=start-7CiQIl0r.js.map
132
+ //# sourceMappingURL=start-CA0JsO56.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"start-7CiQIl0r.js","names":["process"],"sources":["../src/lib/shell.ts","../src/start.ts"],"sourcesContent":["import process from \"node:process\"\n\ntype ShellName = \"bash\" | \"zsh\" | \"fish\" | \"powershell\" | \"cmd\" | \"sh\"\ntype EnvVars = Record<string, string | undefined>\n\nfunction getShell(): ShellName {\n const { platform, env } = process\n\n if (platform === \"win32\") {\n // Git Bash / MSYS2 / Cygwin set SHELL even on Windows\n if (env.SHELL) {\n if (env.SHELL.endsWith(\"zsh\")) return \"zsh\"\n if (env.SHELL.endsWith(\"fish\")) return \"fish\"\n if (env.SHELL.endsWith(\"bash\")) return \"bash\"\n return \"sh\"\n }\n\n // Windows PowerShell 5.x sets this\n if (env.POWERSHELL_DISTRIBUTION_CHANNEL) return \"powershell\"\n\n // PowerShell (both 5.x and 7+/pwsh) adds user-scoped module paths\n // at runtime. The system-level PSModulePath in CMD lacks these paths.\n if (env.PSModulePath) {\n const lower = env.PSModulePath.toLowerCase()\n if (\n lower.includes(\"documents\\\\powershell\")\n || lower.includes(\"documents\\\\windowspowershell\")\n ) {\n return \"powershell\"\n }\n }\n\n return \"cmd\"\n }\n\n const shellPath = env.SHELL\n if (shellPath) {\n if (shellPath.endsWith(\"zsh\")) return \"zsh\"\n if (shellPath.endsWith(\"fish\")) return \"fish\"\n if (shellPath.endsWith(\"bash\")) return \"bash\"\n }\n\n return \"sh\"\n}\n\nfunction quotePosixValue(value: string): string {\n return `'${value.replace(/'/g, \"'\\\\''\")}'`\n}\n\nfunction quotePowerShellValue(value: string): string {\n return `'${value.replace(/'/g, \"''\")}'`\n}\n\n/**\n * Generates a copy-pasteable script to set multiple environment variables\n * and run a subsequent command.\n * @param {EnvVars} envVars - An object of environment variables to set.\n * @param {string} commandToRun - The command to run after setting the variables.\n * @returns {string} The formatted script string.\n */\nexport function generateEnvScript(\n envVars: EnvVars,\n commandToRun: string = \"\",\n): string {\n const shell = getShell()\n const filteredEnvVars = Object.entries(envVars).filter(\n ([, value]) => value !== undefined,\n ) as Array<[string, string]>\n\n let commandBlock: string\n\n switch (shell) {\n case \"powershell\": {\n commandBlock = filteredEnvVars\n .map(([key, value]) => `$env:${key} = ${quotePowerShellValue(value)}`)\n .join(\"; \")\n break\n }\n case \"cmd\": {\n commandBlock = filteredEnvVars\n .map(([key, value]) => `set \"${key}=${value}\"`)\n .join(\" & \")\n break\n }\n case \"fish\": {\n commandBlock = filteredEnvVars\n .map(([key, value]) => `set -gx ${key} ${quotePosixValue(value)}`)\n .join(\"; \")\n break\n }\n default: {\n // bash, zsh, sh\n const assignments = filteredEnvVars\n .map(([key, value]) => `${key}=${quotePosixValue(value)}`)\n .join(\" \")\n commandBlock = filteredEnvVars.length > 0 ? `export ${assignments}` : \"\"\n break\n }\n }\n\n if (commandBlock && commandToRun) {\n const separator =\n shell === \"cmd\" ? \" & \" : shell === \"powershell\" ? \"; \" : \" && \"\n return `${commandBlock}${separator}${commandToRun}`\n }\n\n return commandBlock || commandToRun\n}\n","#!/usr/bin/env node\n\nimport { defineCommand } from \"citty\"\nimport clipboard from \"clipboardy\"\nimport consola from \"consola\"\n\nimport { generateEnvScript } from \"./lib/shell\"\nimport { DEFAULT_CODEX_MODEL, DEFAULT_PORT } from \"./lib/port\"\nimport { provisionBrowserAssets } from \"./lib/browser-mcp/provision\"\nimport { browserToolsEnabled } from \"./lib/mcp-capabilities\"\nimport { colbertDegradedWarning, provisionAndIndexColbert } from \"./lib/colbert\"\nimport { startKeepAwake } from \"./lib/keep-awake\"\nimport { warmTreeSitterPool } from \"./lib/tree-sitter-pool/pool\"\nimport {\n getClaudeCodeEnvVars,\n getCodexEnvVars,\n parseSharedArgs,\n setupAndServe,\n sharedServerArgs,\n} from \"./lib/server-setup\"\nimport { runSelfUpdate } from \"./lib/self-update\"\n\nfunction printAndCopyCommand(command: string, label: string): void {\n consola.box(`${label}\\n\\n${command}`)\n try {\n clipboard.writeSync(command)\n consola.success(`Copied ${label} command to clipboard!`)\n } catch {\n consola.warn(\"Failed to copy to clipboard. Copy the command above manually.\")\n }\n}\n\nfunction generateClaudeCodeCommand(serverUrl: string, model?: string) {\n const envVars = getClaudeCodeEnvVars(serverUrl, model)\n const command = generateEnvScript(envVars, \"claude --dangerously-skip-permissions\")\n printAndCopyCommand(command, \"Claude Code\")\n}\n\nfunction generateCodexCommand(serverUrl: string, model?: string) {\n const codexModel = model ?? DEFAULT_CODEX_MODEL\n const envVars = getCodexEnvVars(serverUrl)\n const command = generateEnvScript(envVars, `codex -m ${codexModel}`)\n printAndCopyCommand(command, \"Codex CLI\")\n}\n\nexport const start = defineCommand({\n meta: {\n name: \"start\",\n description: \"Start the github-router server\",\n },\n args: {\n ...sharedServerArgs,\n cc: {\n type: \"boolean\",\n default: false,\n description:\n \"Generate a command to launch Claude Code with Copilot API config\",\n },\n cx: {\n type: \"boolean\",\n default: false,\n description:\n \"Generate a command to launch Codex CLI with Copilot API config\",\n },\n model: {\n alias: \"m\",\n type: \"string\",\n description: \"Override the default model (used with --cc or --cx)\",\n },\n },\n async run({ args }) {\n const parsed = parseSharedArgs(args as unknown as Record<string, unknown>)\n\n const { serverUrl } = await setupAndServe({\n ...parsed,\n port: parsed.port ?? DEFAULT_PORT,\n silent: false,\n })\n\n // Best-effort self-update (detached, applies next launch). Runs\n // after the server is listening so the bounded probe can't delay it.\n void runSelfUpdate({ selfUpdate: args[\"self-update\"] !== false })\n\n // Best-effort ColBERT semantic-search provision + background index of\n // the launch cwd (if a git repo). Opt-IN via --search (no-op otherwise);\n // never blocks launch, never throws.\n void provisionAndIndexColbert()\n\n // Surface a terminally-failed semantic index to the HUMAN (see the note\n // in claude.ts). Fire-and-forget; lexical search still works.\n void colbertDegradedWarning()\n .then((warning) => {\n if (warning) process.stderr.write(`${warning}\\n`)\n })\n .catch(() => {})\n\n // Ready one tree-sitter worker in the background so the first code search\n // avoids WASM/grammar initialization. One worker keeps launch CPU bounded;\n // demand grows the pool lazily. Opt out with GH_ROUTER_DISABLE_TS_POOL_WARMUP=1.\n void warmTreeSitterPool()\n\n // Best-effort: keep the machine awake while the proxy serves (win32\n // default-on; opt out with GH_ROUTER_DISABLE_KEEP_AWAKE=1). Holds a\n // SetThreadExecutionState assertion via a persistent PowerShell\n // helper. Self-registers its own SIGINT/SIGTERM/exit reaper — load-\n // bearing here, because `start` has no launchChild/onShutdown.\n startKeepAwake()\n\n // Best-effort: materialize the browser extension + bridge into the\n // stable app-dir and stamp the running version, so a one-time \"Load\n // unpacked\" survives npx/bunx upgrades. Gated on --browse; never\n // blocks launch, never throws.\n if (browserToolsEnabled()) {\n void provisionBrowserAssets().catch((err) =>\n consola.debug(\"Browser extension provisioning failed:\", err),\n )\n }\n\n if (args.cc) generateClaudeCodeCommand(serverUrl, args.model)\n if (args.cx) generateCodexCommand(serverUrl, args.model)\n\n consola.box(\n `🌐 Usage Viewer: https://animeshkundu.github.io/github-router/dashboard.html?endpoint=${serverUrl}/usage`,\n )\n },\n})\n"],"mappings":";;;;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AG;GACH,MAAM,OAAO,QAAA;GACb,QAAQ;EACV,CAAC;EAII,cAAc,EAAE,YAAY,KAAK,mBAAmB,MAAM,CAAC;EAK3D,yBAAyB;EAIzB,uBAAuB,CAAC,CAC1B,MAAM,YAAY;GACjB,IAAI,SAAS,QAAQ,OAAO,MAAM,GAAG,QAAQ,GAAG;EAClD,CAAC,CAAC,CACD,YAAY,CAAC,CAAC;EAKZ,mBAAmB;EAOxB,eAAe;EAMf,IAAI,oBAAoB,GACjB,uBAAuB,CAAC,CAAC,OAAO,QACnC,QAAQ,MAAM,0CAA0C,GAAG,CAC7D;EAGF,IAAI,KAAK,IAAI,0BAA0B,WAAW,KAAK,KAAK;EAC5D,IAAI,KAAK,IAAI,qBAAqB,WAAW,KAAK,KAAK;EAEvD,QAAQ,IACN,yFAAyF,UAAU,OACrG;CACF;AACF,CAAC"}
1
+ {"version":3,"file":"start-CA0JsO56.js","names":["process"],"sources":["../src/lib/shell.ts","../src/start.ts"],"sourcesContent":["import process from \"node:process\"\n\ntype ShellName = \"bash\" | \"zsh\" | \"fish\" | \"powershell\" | \"cmd\" | \"sh\"\ntype EnvVars = Record<string, string | undefined>\n\nfunction getShell(): ShellName {\n const { platform, env } = process\n\n if (platform === \"win32\") {\n // Git Bash / MSYS2 / Cygwin set SHELL even on Windows\n if (env.SHELL) {\n if (env.SHELL.endsWith(\"zsh\")) return \"zsh\"\n if (env.SHELL.endsWith(\"fish\")) return \"fish\"\n if (env.SHELL.endsWith(\"bash\")) return \"bash\"\n return \"sh\"\n }\n\n // Windows PowerShell 5.x sets this\n if (env.POWERSHELL_DISTRIBUTION_CHANNEL) return \"powershell\"\n\n // PowerShell (both 5.x and 7+/pwsh) adds user-scoped module paths\n // at runtime. The system-level PSModulePath in CMD lacks these paths.\n if (env.PSModulePath) {\n const lower = env.PSModulePath.toLowerCase()\n if (\n lower.includes(\"documents\\\\powershell\")\n || lower.includes(\"documents\\\\windowspowershell\")\n ) {\n return \"powershell\"\n }\n }\n\n return \"cmd\"\n }\n\n const shellPath = env.SHELL\n if (shellPath) {\n if (shellPath.endsWith(\"zsh\")) return \"zsh\"\n if (shellPath.endsWith(\"fish\")) return \"fish\"\n if (shellPath.endsWith(\"bash\")) return \"bash\"\n }\n\n return \"sh\"\n}\n\nfunction quotePosixValue(value: string): string {\n return `'${value.replace(/'/g, \"'\\\\''\")}'`\n}\n\nfunction quotePowerShellValue(value: string): string {\n return `'${value.replace(/'/g, \"''\")}'`\n}\n\n/**\n * Generates a copy-pasteable script to set multiple environment variables\n * and run a subsequent command.\n * @param {EnvVars} envVars - An object of environment variables to set.\n * @param {string} commandToRun - The command to run after setting the variables.\n * @returns {string} The formatted script string.\n */\nexport function generateEnvScript(\n envVars: EnvVars,\n commandToRun: string = \"\",\n): string {\n const shell = getShell()\n const filteredEnvVars = Object.entries(envVars).filter(\n ([, value]) => value !== undefined,\n ) as Array<[string, string]>\n\n let commandBlock: string\n\n switch (shell) {\n case \"powershell\": {\n commandBlock = filteredEnvVars\n .map(([key, value]) => `$env:${key} = ${quotePowerShellValue(value)}`)\n .join(\"; \")\n break\n }\n case \"cmd\": {\n commandBlock = filteredEnvVars\n .map(([key, value]) => `set \"${key}=${value}\"`)\n .join(\" & \")\n break\n }\n case \"fish\": {\n commandBlock = filteredEnvVars\n .map(([key, value]) => `set -gx ${key} ${quotePosixValue(value)}`)\n .join(\"; \")\n break\n }\n default: {\n // bash, zsh, sh\n const assignments = filteredEnvVars\n .map(([key, value]) => `${key}=${quotePosixValue(value)}`)\n .join(\" \")\n commandBlock = filteredEnvVars.length > 0 ? `export ${assignments}` : \"\"\n break\n }\n }\n\n if (commandBlock && commandToRun) {\n const separator =\n shell === \"cmd\" ? \" & \" : shell === \"powershell\" ? \"; \" : \" && \"\n return `${commandBlock}${separator}${commandToRun}`\n }\n\n return commandBlock || commandToRun\n}\n","#!/usr/bin/env node\n\nimport { defineCommand } from \"citty\"\nimport clipboard from \"clipboardy\"\nimport consola from \"consola\"\n\nimport { generateEnvScript } from \"./lib/shell\"\nimport { DEFAULT_CODEX_MODEL, DEFAULT_PORT } from \"./lib/port\"\nimport { provisionBrowserAssets } from \"./lib/browser-mcp/provision\"\nimport { browserToolsEnabled } from \"./lib/mcp-capabilities\"\nimport { colbertDegradedWarning, provisionAndIndexColbert } from \"./lib/colbert\"\nimport { startKeepAwake } from \"./lib/keep-awake\"\nimport { warmTreeSitterPool } from \"./lib/tree-sitter-pool/pool\"\nimport {\n getClaudeCodeEnvVars,\n getCodexEnvVars,\n parseSharedArgs,\n setupAndServe,\n sharedServerArgs,\n} from \"./lib/server-setup\"\nimport { runSelfUpdate } from \"./lib/self-update\"\n\nfunction printAndCopyCommand(command: string, label: string): void {\n consola.box(`${label}\\n\\n${command}`)\n try {\n clipboard.writeSync(command)\n consola.success(`Copied ${label} command to clipboard!`)\n } catch {\n consola.warn(\"Failed to copy to clipboard. Copy the command above manually.\")\n }\n}\n\nfunction generateClaudeCodeCommand(serverUrl: string, model?: string) {\n const envVars = getClaudeCodeEnvVars(serverUrl, model)\n const command = generateEnvScript(envVars, \"claude --dangerously-skip-permissions\")\n printAndCopyCommand(command, \"Claude Code\")\n}\n\nfunction generateCodexCommand(serverUrl: string, model?: string) {\n const codexModel = model ?? DEFAULT_CODEX_MODEL\n const envVars = getCodexEnvVars(serverUrl)\n const command = generateEnvScript(envVars, `codex -m ${codexModel}`)\n printAndCopyCommand(command, \"Codex CLI\")\n}\n\nexport const start = defineCommand({\n meta: {\n name: \"start\",\n description: \"Start the github-router server\",\n },\n args: {\n ...sharedServerArgs,\n cc: {\n type: \"boolean\",\n default: false,\n description:\n \"Generate a command to launch Claude Code with Copilot API config\",\n },\n cx: {\n type: \"boolean\",\n default: false,\n description:\n \"Generate a command to launch Codex CLI with Copilot API config\",\n },\n model: {\n alias: \"m\",\n type: \"string\",\n description: \"Override the default model (used with --cc or --cx)\",\n },\n },\n async run({ args }) {\n const parsed = parseSharedArgs(args as unknown as Record<string, unknown>)\n\n const { serverUrl } = await setupAndServe({\n ...parsed,\n port: parsed.port ?? DEFAULT_PORT,\n silent: false,\n })\n\n // Best-effort self-update (detached, applies next launch). Runs\n // after the server is listening so the bounded probe can't delay it.\n void runSelfUpdate({ selfUpdate: args[\"self-update\"] !== false })\n\n // Best-effort ColBERT semantic-search provision + background index of\n // the launch cwd (if a git repo). Opt-IN via --search (no-op otherwise);\n // never blocks launch, never throws.\n void provisionAndIndexColbert()\n\n // Surface a terminally-failed semantic index to the HUMAN (see the note\n // in claude.ts). Fire-and-forget; lexical search still works.\n void colbertDegradedWarning()\n .then((warning) => {\n if (warning) process.stderr.write(`${warning}\\n`)\n })\n .catch(() => {})\n\n // Ready one tree-sitter worker in the background so the first code search\n // avoids WASM/grammar initialization. One worker keeps launch CPU bounded;\n // demand grows the pool lazily. Opt out with GH_ROUTER_DISABLE_TS_POOL_WARMUP=1.\n void warmTreeSitterPool()\n\n // Best-effort: keep the machine awake while the proxy serves (win32\n // default-on; opt out with GH_ROUTER_DISABLE_KEEP_AWAKE=1). Holds a\n // SetThreadExecutionState assertion via a persistent PowerShell\n // helper. Self-registers its own SIGINT/SIGTERM/exit reaper — load-\n // bearing here, because `start` has no launchChild/onShutdown.\n startKeepAwake()\n\n // Best-effort: materialize the browser extension + bridge into the\n // stable app-dir and stamp the running version, so a one-time \"Load\n // unpacked\" survives npx/bunx upgrades. Gated on --browse; never\n // blocks launch, never throws.\n if (browserToolsEnabled()) {\n void provisionBrowserAssets().catch((err) =>\n consola.debug(\"Browser extension provisioning failed:\", err),\n )\n }\n\n if (args.cc) generateClaudeCodeCommand(serverUrl, args.model)\n if (args.cx) generateCodexCommand(serverUrl, args.model)\n\n consola.box(\n `🌐 Usage Viewer: https://animeshkundu.github.io/github-router/dashboard.html?endpoint=${serverUrl}/usage`,\n )\n },\n})\n"],"mappings":";;;;;;;;;AAKA,SAAS,WAAsB;CAC7B,MAAM,EAAE,UAAU,QAAQA;CAE1B,IAAI,aAAa,SAAS;EAExB,IAAI,IAAI,OAAO;GAC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AyB;EAIzB,uBAAuB,CAAC,CAC1B,MAAM,YAAY;GACjB,IAAI,SAAS,QAAQ,OAAO,MAAM,GAAG,QAAQ,GAAG;EAClD,CAAC,CAAC,CACD,YAAY,CAAC,CAAC;EAKZ,mBAAmB;EAOxB,eAAe;EAMf,IAAI,oBAAoB,GACjB,uBAAuB,CAAC,CAAC,OAAO,QACnC,QAAQ,MAAM,0CAA0C,GAAG,CAC7D;EAGF,IAAI,KAAK,IAAI,0BAA0B,WAAW,KAAK,KAAK;EAC5D,IAAI,KAAK,IAAI,qBAAqB,WAAW,KAAK,KAAK;EAEvD,QAAQ,IACN,yFAAyF,UAAU,OACrG;CACF;AACF,CAAC"}
@@ -1,8 +1,51 @@
1
1
  import { r as BALANCED_PROFILE_MODELS, t as BALANCED_PROFILE_CONTRACT } from "./balanced-profile-contract-B6pSoWjm.js";
2
- import { t as buildSelfCommand } from "./self-invocation-Dnq4iVD6.js";
3
- import { s as isSubagentContext } from "./stop-gate-policy-Bp2wGh_W.js";
2
+ import { t as buildSelfCommand } from "./self-invocation-CayD3y72.js";
3
+ import { s as isSubagentContext } from "./stop-gate-policy-gW0a0hds.js";
4
4
  import { existsSync, readFileSync, readdirSync } from "node:fs";
5
5
  import path from "node:path";
6
+ // src/lib/balanced2-profile-contract.ts
7
+ /**
8
+ * Fixed identities for the literal `github-router claude -m balanced2` profile.
9
+ *
10
+ * `balanced2` is `balanced` with the Sol tier moved from `gpt-5.6-sol` to
11
+ * `gpt-6.2-sol` for the lead and reviewer, and the Oracle moved from
12
+ * `grok-4.6` to `grok-4.7`. Everything else — the Luna `Explore`/
13
+ * `General-Purpose` roles, the bare-slug 200K window, the medium lead effort,
14
+ * the Advisor-free surface, the Oracle-only peer set and the delegation graph
15
+ * (including `reviewer` → `Explore`) — is inherited verbatim.
16
+ *
17
+ * The `astra` slot is inherited unchanged on purpose: it is declarative only on
18
+ * this family (no balanced launch synthesizes an `astra` tool; only `fast` and
19
+ * `cheap1m` do), so the identity has no consumer to alter.
20
+ *
21
+ * Derived from `BALANCED_PROFILE_CONTRACT` by spread rather than copied: a
22
+ * field added to the family later is inherited here automatically, and the
23
+ * declared deltas are the only lines in this file that can drift.
24
+ */
25
+ /** The 6.2 Sol tier that distinguishes this profile's lead/reviewer. */
26
+ const BALANCED2_SOL_MODEL = "gpt-6.2-sol";
27
+ /** The xAI Oracle that supersedes `balanced`'s Grok 4.6 row. */
28
+ const BALANCED2_ORACLE_MODEL = "grok-4.7";
29
+ const BALANCED2_PROFILE_MODELS = Object.freeze({
30
+ ...BALANCED_PROFILE_MODELS,
31
+ lead: BALANCED2_SOL_MODEL,
32
+ reviewer: BALANCED2_SOL_MODEL,
33
+ oracle: BALANCED2_ORACLE_MODEL
34
+ });
35
+ const BALANCED2_PROFILE_NATIVE_MODELS = Object.freeze({
36
+ Explore: BALANCED2_PROFILE_MODELS.explore,
37
+ "General-Purpose": BALANCED2_PROFILE_MODELS["General-Purpose"],
38
+ reviewer: BALANCED2_PROFILE_MODELS.reviewer
39
+ });
40
+ const BALANCED2_PROFILE_ORACLE_MODEL = BALANCED2_PROFILE_MODELS.oracle;
41
+ /** The `-m balanced2` aggregate: the base contract with only the Sol
42
+ * lead/reviewer identities and the Oracle replaced. */
43
+ const BALANCED2_PROFILE_CONTRACT = Object.freeze({
44
+ ...BALANCED_PROFILE_CONTRACT,
45
+ models: BALANCED2_PROFILE_MODELS,
46
+ nativeModels: BALANCED2_PROFILE_NATIVE_MODELS,
47
+ oracleModel: BALANCED2_PROFILE_ORACLE_MODEL
48
+ });
6
49
  // src/lib/cheapest-profile-contract.ts
7
50
  /**
8
51
  * Fixed identities for the literal `github-router claude -m cheapest` profile.
@@ -221,6 +264,101 @@ const CHEAPEST2_PROFILE_CONTRACT = Object.freeze({
221
264
  * existed before it.
222
265
  */
223
266
  const LOCAL_CONSULT_MAX_OUTPUT_TOKENS = 4096;
267
+ // src/lib/cheaplocal-profile-contract.ts
268
+ /**
269
+ * Fixed identities for the literal `github-router claude -m cheaplocal` profile.
270
+ *
271
+ * `cheaplocal` is `cheapest` with its two consultants moved off Copilot: the
272
+ * Advisor and the Oracle are served by the local Anthropic-Messages endpoint
273
+ * (the same one `-m local` / `-m local2` point their main loop at) instead of a
274
+ * Copilot model.
275
+ *
276
+ * Everything else is inherited verbatim from `CHEAPEST_PROFILE_CONTRACT`:
277
+ * the `gpt-6-luna`/max lead, the Luna natives, the bare-slug 200K window, the
278
+ * curated 24K Advisor digest, the Oracle-only peer set, the three-agent surface
279
+ * and the delegation graph.
280
+ *
281
+ * Nothing in this file may characterize the local model. The endpoint is the
282
+ * only fact the profile carries about it, so no name, window, price or speed
283
+ * claim is made anywhere: the contract names a bare SLUG (`opus`) and a
284
+ * transport, and prose that reaches the model describes the consultants by
285
+ * transport ("the local model"), never by identity. The one effort the consult
286
+ * requests (`LOCAL_CONSULT_EFFORT`) is the operator's setting, not a property
287
+ * of the model.
288
+ *
289
+ * Derived by spread rather than copied, so a field added to the cheapest family
290
+ * later is inherited here automatically and the declared deltas below are the
291
+ * only lines that can drift.
292
+ */
293
+ /**
294
+ * The one model id this profile sends to the local endpoint.
295
+ *
296
+ * Bare, like the `-m local` lead: the profile assumes nothing about which model
297
+ * answers, and the endpoint maps the id itself. It is deliberately the SAME id
298
+ * for the Advisor and the Oracle because a second spelling would imply a
299
+ * distinction the profile cannot observe.
300
+ */
301
+ const CHEAPLOCAL_CONSULT_MODEL = "opus";
302
+ /**
303
+ * The Copilot model the prompt-rewrite hooks run on. Under `cheaplocal` the
304
+ * consultants are local, but the rewrite is a Copilot dispatch and must stay
305
+ * inside the profile's `{sol, luna}` egress ceiling, so it keeps the base
306
+ * family's Sol rather than following `advisorModel` to the local slug.
307
+ */
308
+ const CHEAPLOCAL_PROFILE_REWRITE_MODEL = "gpt-5.6-sol";
309
+ const CHEAPLOCAL_PROFILE_MODELS = Object.freeze({
310
+ ...CHEAPEST_PROFILE_MODELS,
311
+ advisor: CHEAPLOCAL_CONSULT_MODEL,
312
+ oracle: CHEAPLOCAL_CONSULT_MODEL
313
+ });
314
+ const CHEAPLOCAL_PROFILE_NATIVE_MODELS = Object.freeze({
315
+ Explore: CHEAPLOCAL_PROFILE_MODELS.explore,
316
+ "General-Purpose": CHEAPLOCAL_PROFILE_MODELS["General-Purpose"],
317
+ reviewer: CHEAPLOCAL_PROFILE_MODELS.reviewer
318
+ });
319
+ const CHEAPLOCAL_PROFILE_ADVISOR_MODEL = CHEAPLOCAL_PROFILE_MODELS.advisor;
320
+ /**
321
+ * Client-visible Advisor identity. A LABEL, not the model that answers: the
322
+ * wire id sent to the endpoint is `CHEAPLOCAL_CONSULT_MODEL`, and nothing in
323
+ * this profile can observe which model receives it.
324
+ *
325
+ * It is deliberately not a model id at all, for two reasons. First, naming a
326
+ * model here would make the client UI claim that model is consulting, which the
327
+ * profile cannot know. Second, Claude Code resolves a RECOGNIZED model alias
328
+ * through its own registry before putting the value in the native Advisor
329
+ * tool's `model` field: `--advisor opus` arrives at the proxy as
330
+ * `claude-opus-5.5`, so an alias can never be a stable pin for the strict
331
+ * client-drift check. `local` is not a model alias, so it passes through
332
+ * verbatim.
333
+ */
334
+ const CHEAPLOCAL_PROFILE_ADVISOR_CLIENT_MODEL = "local";
335
+ /**
336
+ * The declared effort is the one the wire sends.
337
+ *
338
+ * The local transport ignores the family's Copilot effort in favour of
339
+ * `LOCAL_CONSULT_EFFORT`, so declaring the inherited value made three surfaces
340
+ * describe one consult: the contract and the Pi agent frontmatter said
341
+ * `medium`/`high` while `sendLocalMessages` wrote its own `max`. Declaring it
342
+ * here makes the contract the source, and the sender now takes the value as a
343
+ * parameter instead of holding a second copy.
344
+ */
345
+ const CHEAPLOCAL_PROFILE_ADVISOR_EFFORT = "max";
346
+ const CHEAPLOCAL_PROFILE_ORACLE_MODEL = CHEAPLOCAL_PROFILE_MODELS.oracle;
347
+ const CHEAPLOCAL_PROFILE_ORACLE_EFFORT = "max";
348
+ /** The `-m cheaplocal` aggregate: the base contract with the two consultants
349
+ * pointed at the local endpoint. */
350
+ const CHEAPLOCAL_PROFILE_CONTRACT = Object.freeze({
351
+ ...CHEAPEST_PROFILE_CONTRACT,
352
+ models: CHEAPLOCAL_PROFILE_MODELS,
353
+ nativeModels: CHEAPLOCAL_PROFILE_NATIVE_MODELS,
354
+ advisorModel: CHEAPLOCAL_PROFILE_ADVISOR_MODEL,
355
+ advisorClientModel: CHEAPLOCAL_PROFILE_ADVISOR_CLIENT_MODEL,
356
+ advisorEffort: CHEAPLOCAL_PROFILE_ADVISOR_EFFORT,
357
+ oracleModel: CHEAPLOCAL_PROFILE_ORACLE_MODEL,
358
+ oracleEffort: CHEAPLOCAL_PROFILE_ORACLE_EFFORT,
359
+ rewriteModel: CHEAPLOCAL_PROFILE_REWRITE_MODEL,
360
+ consultTransport: "local"
361
+ });
224
362
  // src/lib/local-profile-contract.ts
225
363
  /**
226
364
  * Fixed identities for the literal `github-router claude -m local` and
@@ -377,144 +515,6 @@ const LOCAL2_PROFILE_CONTRACT = Object.freeze({
377
515
  });
378
516
  /** The local lead slug, used by the child-env/tier-row wiring. */
379
517
  const LOCAL_PROFILE_LEAD_MODEL = LOCAL_PROFILE_MODELS.lead;
380
- // src/lib/balanced2-profile-contract.ts
381
- /**
382
- * Fixed identities for the literal `github-router claude -m balanced2` profile.
383
- *
384
- * `balanced2` is `balanced` with the Sol tier moved from `gpt-5.6-sol` to
385
- * `gpt-6.2-sol` for the lead and reviewer, and the Oracle moved from
386
- * `grok-4.6` to `grok-4.7`. Everything else — the Luna `Explore`/
387
- * `General-Purpose` roles, the bare-slug 200K window, the medium lead effort,
388
- * the Advisor-free surface, the Oracle-only peer set and the delegation graph
389
- * (including `reviewer` → `Explore`) — is inherited verbatim.
390
- *
391
- * The `astra` slot is inherited unchanged on purpose: it is declarative only on
392
- * this family (no balanced launch synthesizes an `astra` tool; only `fast` and
393
- * `cheap1m` do), so the identity has no consumer to alter.
394
- *
395
- * Derived from `BALANCED_PROFILE_CONTRACT` by spread rather than copied: a
396
- * field added to the family later is inherited here automatically, and the
397
- * declared deltas are the only lines in this file that can drift.
398
- */
399
- /** The 6.2 Sol tier that distinguishes this profile's lead/reviewer. */
400
- const BALANCED2_SOL_MODEL = "gpt-6.2-sol";
401
- /** The xAI Oracle that supersedes `balanced`'s Grok 4.6 row. */
402
- const BALANCED2_ORACLE_MODEL = "grok-4.7";
403
- const BALANCED2_PROFILE_MODELS = Object.freeze({
404
- ...BALANCED_PROFILE_MODELS,
405
- lead: BALANCED2_SOL_MODEL,
406
- reviewer: BALANCED2_SOL_MODEL,
407
- oracle: BALANCED2_ORACLE_MODEL
408
- });
409
- const BALANCED2_PROFILE_NATIVE_MODELS = Object.freeze({
410
- Explore: BALANCED2_PROFILE_MODELS.explore,
411
- "General-Purpose": BALANCED2_PROFILE_MODELS["General-Purpose"],
412
- reviewer: BALANCED2_PROFILE_MODELS.reviewer
413
- });
414
- const BALANCED2_PROFILE_ORACLE_MODEL = BALANCED2_PROFILE_MODELS.oracle;
415
- /** The `-m balanced2` aggregate: the base contract with only the Sol
416
- * lead/reviewer identities and the Oracle replaced. */
417
- const BALANCED2_PROFILE_CONTRACT = Object.freeze({
418
- ...BALANCED_PROFILE_CONTRACT,
419
- models: BALANCED2_PROFILE_MODELS,
420
- nativeModels: BALANCED2_PROFILE_NATIVE_MODELS,
421
- oracleModel: BALANCED2_PROFILE_ORACLE_MODEL
422
- });
423
- // src/lib/cheaplocal-profile-contract.ts
424
- /**
425
- * Fixed identities for the literal `github-router claude -m cheaplocal` profile.
426
- *
427
- * `cheaplocal` is `cheapest` with its two consultants moved off Copilot: the
428
- * Advisor and the Oracle are served by the local Anthropic-Messages endpoint
429
- * (the same one `-m local` / `-m local2` point their main loop at) instead of a
430
- * Copilot model.
431
- *
432
- * Everything else is inherited verbatim from `CHEAPEST_PROFILE_CONTRACT`:
433
- * the `gpt-6-luna`/max lead, the Luna natives, the bare-slug 200K window, the
434
- * curated 24K Advisor digest, the Oracle-only peer set, the three-agent surface
435
- * and the delegation graph.
436
- *
437
- * Nothing in this file may characterize the local model. The endpoint is the
438
- * only fact the profile carries about it, so no name, window, price or speed
439
- * claim is made anywhere: the contract names a bare SLUG (`opus`) and a
440
- * transport, and prose that reaches the model describes the consultants by
441
- * transport ("the local model"), never by identity. The one effort the consult
442
- * requests (`LOCAL_CONSULT_EFFORT`) is the operator's setting, not a property
443
- * of the model.
444
- *
445
- * Derived by spread rather than copied, so a field added to the cheapest family
446
- * later is inherited here automatically and the declared deltas below are the
447
- * only lines that can drift.
448
- */
449
- /**
450
- * The one model id this profile sends to the local endpoint.
451
- *
452
- * Bare, like the `-m local` lead: the profile assumes nothing about which model
453
- * answers, and the endpoint maps the id itself. It is deliberately the SAME id
454
- * for the Advisor and the Oracle because a second spelling would imply a
455
- * distinction the profile cannot observe.
456
- */
457
- const CHEAPLOCAL_CONSULT_MODEL = "opus";
458
- /**
459
- * The Copilot model the prompt-rewrite hooks run on. Under `cheaplocal` the
460
- * consultants are local, but the rewrite is a Copilot dispatch and must stay
461
- * inside the profile's `{sol, luna}` egress ceiling, so it keeps the base
462
- * family's Sol rather than following `advisorModel` to the local slug.
463
- */
464
- const CHEAPLOCAL_PROFILE_REWRITE_MODEL = "gpt-5.6-sol";
465
- const CHEAPLOCAL_PROFILE_MODELS = Object.freeze({
466
- ...CHEAPEST_PROFILE_MODELS,
467
- advisor: CHEAPLOCAL_CONSULT_MODEL,
468
- oracle: CHEAPLOCAL_CONSULT_MODEL
469
- });
470
- const CHEAPLOCAL_PROFILE_NATIVE_MODELS = Object.freeze({
471
- Explore: CHEAPLOCAL_PROFILE_MODELS.explore,
472
- "General-Purpose": CHEAPLOCAL_PROFILE_MODELS["General-Purpose"],
473
- reviewer: CHEAPLOCAL_PROFILE_MODELS.reviewer
474
- });
475
- const CHEAPLOCAL_PROFILE_ADVISOR_MODEL = CHEAPLOCAL_PROFILE_MODELS.advisor;
476
- /**
477
- * Client-visible Advisor identity. A LABEL, not the model that answers: the
478
- * wire id sent to the endpoint is `CHEAPLOCAL_CONSULT_MODEL`, and nothing in
479
- * this profile can observe which model receives it.
480
- *
481
- * It is deliberately not a model id at all, for two reasons. First, naming a
482
- * model here would make the client UI claim that model is consulting, which the
483
- * profile cannot know. Second, Claude Code resolves a RECOGNIZED model alias
484
- * through its own registry before putting the value in the native Advisor
485
- * tool's `model` field: `--advisor opus` arrives at the proxy as
486
- * `claude-opus-5.5`, so an alias can never be a stable pin for the strict
487
- * client-drift check. `local` is not a model alias, so it passes through
488
- * verbatim.
489
- */
490
- const CHEAPLOCAL_PROFILE_ADVISOR_CLIENT_MODEL = "local";
491
- /**
492
- * The declared effort is the one the wire sends.
493
- *
494
- * The local transport ignores the family's Copilot effort in favour of
495
- * `LOCAL_CONSULT_EFFORT`, so declaring the inherited value made three surfaces
496
- * describe one consult: the contract and the Pi agent frontmatter said
497
- * `medium`/`high` while `sendLocalMessages` wrote its own `max`. Declaring it
498
- * here makes the contract the source, and the sender now takes the value as a
499
- * parameter instead of holding a second copy.
500
- */
501
- const CHEAPLOCAL_PROFILE_ADVISOR_EFFORT = "max";
502
- const CHEAPLOCAL_PROFILE_ORACLE_MODEL = CHEAPLOCAL_PROFILE_MODELS.oracle;
503
- const CHEAPLOCAL_PROFILE_ORACLE_EFFORT = "max";
504
- /** The `-m cheaplocal` aggregate: the base contract with the two consultants
505
- * pointed at the local endpoint. */
506
- const CHEAPLOCAL_PROFILE_CONTRACT = Object.freeze({
507
- ...CHEAPEST_PROFILE_CONTRACT,
508
- models: CHEAPLOCAL_PROFILE_MODELS,
509
- nativeModels: CHEAPLOCAL_PROFILE_NATIVE_MODELS,
510
- advisorModel: CHEAPLOCAL_PROFILE_ADVISOR_MODEL,
511
- advisorClientModel: CHEAPLOCAL_PROFILE_ADVISOR_CLIENT_MODEL,
512
- advisorEffort: CHEAPLOCAL_PROFILE_ADVISOR_EFFORT,
513
- oracleModel: CHEAPLOCAL_PROFILE_ORACLE_MODEL,
514
- oracleEffort: CHEAPLOCAL_PROFILE_ORACLE_EFFORT,
515
- rewriteModel: CHEAPLOCAL_PROFILE_REWRITE_MODEL,
516
- consultTransport: "local"
517
- });
518
518
  // src/lib/profile-family.ts
519
519
  /**
520
520
  * The `cheapest`/`cheapest2`/`cheaplocal` and `balanced`/`balanced2`
@@ -1515,6 +1515,6 @@ function buildStaticPack(workspace) {
1515
1515
  verifyCommand: detected.slice(0, 512)
1516
1516
  };
1517
1517
  }
1518
- export { CHEAPEST2_PROFILE_MODELS as A, localContractFor as C, LOCAL_PROFILE_NATIVE_MODELS as D, LOCAL_PROFILE_NATIVE_AGENT_NAMES as E, CHEAPEST_PROFILE_ADVISOR_TRANSCRIPT_TOKENS_MIN as F, CHEAPEST_PROFILE_MODELS as I, CHEAPEST_PROFILE_NATIVE_AGENT_NAMES as L, CHEAPEST_PROFILE_ADVISOR_MODEL as M, CHEAPEST_PROFILE_ADVISOR_TRANSCRIPT_TOKENS_DEFAULT as N, LOCAL_PROFILE_TIER_MODELS as O, CHEAPEST_PROFILE_ADVISOR_TRANSCRIPT_TOKENS_MAX as P, CHEAPEST_PROFILE_NATIVE_EFFORTS as R, local2AdvisorContract as S, LOCAL_PROFILE_LEAD_MODEL as T, isBalancedFamily as _, decidePromptSubmitV2 as a, isLocalFamily as b, CHEAPEST_REWRITE_EFFORT as c, runCheapestRewrite as d, balancedContractFor as f, displayModelName as g, consultIsLocalTransport as h, decidePromptSubmit as i, CHEAPEST_PROFILE_ADVISOR_CLIENT_MODEL as j, LOCAL_CONSULT_MAX_OUTPUT_TOKENS as k, buildRebriefSystem as l, cheapestRewriteModelFor as m, PROMPT_STEER_GOAL as n, getPromptSearchTip as o, cheapestContractFor as p, buildPromptSubmitHookCommand as r, isNonTrivialPrompt as s, buildStaticPack as t, isCheapestRewriteDisabledEnv as u, isCheapestFamily as v, BALANCED2_PROFILE_MODELS as w, isPinnedLaunchProfile as x, isCheaplocalProfile as y };
1518
+ export { CHEAPEST_PROFILE_ADVISOR_CLIENT_MODEL as A, localContractFor as C, LOCAL_PROFILE_TIER_MODELS as D, LOCAL_PROFILE_NATIVE_MODELS as E, CHEAPEST_PROFILE_MODELS as F, CHEAPEST_PROFILE_NATIVE_AGENT_NAMES as I, CHEAPEST_PROFILE_NATIVE_EFFORTS as L, CHEAPEST_PROFILE_ADVISOR_TRANSCRIPT_TOKENS_DEFAULT as M, CHEAPEST_PROFILE_ADVISOR_TRANSCRIPT_TOKENS_MAX as N, LOCAL_CONSULT_MAX_OUTPUT_TOKENS as O, CHEAPEST_PROFILE_ADVISOR_TRANSCRIPT_TOKENS_MIN as P, BALANCED2_PROFILE_MODELS as R, local2AdvisorContract as S, LOCAL_PROFILE_NATIVE_AGENT_NAMES as T, isBalancedFamily as _, decidePromptSubmitV2 as a, isLocalFamily as b, CHEAPEST_REWRITE_EFFORT as c, runCheapestRewrite as d, balancedContractFor as f, displayModelName as g, consultIsLocalTransport as h, decidePromptSubmit as i, CHEAPEST_PROFILE_ADVISOR_MODEL as j, CHEAPEST2_PROFILE_MODELS as k, buildRebriefSystem as l, cheapestRewriteModelFor as m, PROMPT_STEER_GOAL as n, getPromptSearchTip as o, cheapestContractFor as p, buildPromptSubmitHookCommand as r, isNonTrivialPrompt as s, buildStaticPack as t, isCheapestRewriteDisabledEnv as u, isCheapestFamily as v, LOCAL_PROFILE_LEAD_MODEL as w, isPinnedLaunchProfile as x, isCheaplocalProfile as y };
1519
1519
 
1520
- //# sourceMappingURL=static-context-pack-BKFelEbM.js.map
1520
+ //# sourceMappingURL=static-context-pack-BIru_SKh.js.map