github-router 0.3.297 → 0.3.302
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.
- package/dist/{attribution-settings-B70GmZ68.js → attribution-settings-B1xutIts.js} +146 -10
- package/dist/attribution-settings-B1xutIts.js.map +1 -0
- package/dist/{auth-CluG5e-l.js → auth-CpjOjoUG.js} +4 -3
- package/dist/{auth-CluG5e-l.js.map → auth-CpjOjoUG.js.map} +1 -1
- package/dist/browser-ext/manifest.json +1 -1
- package/dist/{check-usage-iOzfnKJe.js → check-usage-BsN3S4Fu.js} +4 -4
- package/dist/{check-usage-iOzfnKJe.js.map → check-usage-BsN3S4Fu.js.map} +1 -1
- package/dist/{claude-DMMfvfns.js → claude-uRuzEH0W.js} +130 -78
- package/dist/claude-uRuzEH0W.js.map +1 -0
- package/dist/{codex-DVOyVv2B.js → codex-D5ag-liR.js} +6 -5
- package/dist/{codex-DVOyVv2B.js.map → codex-D5ag-liR.js.map} +1 -1
- package/dist/{debug-DsEwleGg.js → debug-BXRPyeqO.js} +2 -2
- package/dist/{debug-DsEwleGg.js.map → debug-BXRPyeqO.js.map} +1 -1
- package/dist/engine-2uMJ4Isk.js +2 -0
- package/dist/{gate-discovery-G6PAG61j.js → gate-discovery-BTRVyKWu.js} +5 -5
- package/dist/{gate-discovery-G6PAG61j.js.map → gate-discovery-BTRVyKWu.js.map} +1 -1
- package/dist/{get-copilot-usage-B7Z4XVWj.js → get-copilot-usage-ByjQqhdi.js} +3 -2
- package/dist/{get-copilot-usage-B7Z4XVWj.js.map → get-copilot-usage-ByjQqhdi.js.map} +1 -1
- package/dist/hooks.mjs +287 -5
- package/dist/hooks.sha256 +1 -1
- package/dist/{internal-artifact-open-D6tKMg8v.js → internal-artifact-open-DRSxShAW.js} +2 -2
- package/dist/{internal-artifact-open-D6tKMg8v.js.map → internal-artifact-open-DRSxShAW.js.map} +1 -1
- package/dist/{internal-fast-dispatch-guard-N-RaLrOn.js → internal-fast-dispatch-guard-CYOWbxjX.js} +1 -1
- package/dist/{internal-fast-dispatch-guard-Bkr_iGOu.js → internal-fast-dispatch-guard-D2HcfXZv.js} +2 -2
- package/dist/{internal-fast-dispatch-guard-Bkr_iGOu.js.map → internal-fast-dispatch-guard-D2HcfXZv.js.map} +1 -1
- package/dist/{internal-first-mate-guard-C9BV7J4U.js → internal-first-mate-guard-Bcb5JwiO.js} +3 -3
- package/dist/{internal-first-mate-guard-C9BV7J4U.js.map → internal-first-mate-guard-Bcb5JwiO.js.map} +1 -1
- package/dist/{internal-first-mate-guard-WJApyc8j.js → internal-first-mate-guard-Brh_uois.js} +1 -1
- package/dist/internal-max-dispatch-guard-Bcjavapx.js +2 -0
- package/dist/internal-max-dispatch-guard-BjSVXMvC.js +198 -0
- package/dist/internal-max-dispatch-guard-BjSVXMvC.js.map +1 -0
- package/dist/{internal-plan-review-t3PuNfuL.js → internal-plan-review-DVY-iV2x.js} +3 -3
- package/dist/{internal-plan-review-t3PuNfuL.js.map → internal-plan-review-DVY-iV2x.js.map} +1 -1
- package/dist/{internal-prompt-submit-C3KovHQG.js → internal-prompt-submit-BTqRn4FW.js} +4 -4
- package/dist/{internal-prompt-submit-C3KovHQG.js.map → internal-prompt-submit-BTqRn4FW.js.map} +1 -1
- package/dist/{internal-session-bind-d2uoja8I.js → internal-session-bind-YfH656lt.js} +2 -2
- package/dist/{internal-session-bind-d2uoja8I.js.map → internal-session-bind-YfH656lt.js.map} +1 -1
- package/dist/{internal-stop-hook-BjzrF1zd.js → internal-stop-hook-BZg__ab6.js} +5 -5
- package/dist/{internal-stop-hook-BjzrF1zd.js.map → internal-stop-hook-BZg__ab6.js.map} +1 -1
- package/dist/{internal-stop-review-YtDUGXpX.js → internal-stop-review-B8MmEyQ1.js} +2 -2
- package/dist/{internal-stop-review-YtDUGXpX.js.map → internal-stop-review-B8MmEyQ1.js.map} +1 -1
- package/dist/{internal-worker-guard-CdkeS9PN.js → internal-worker-guard-Dr6W83TC.js} +2 -2
- package/dist/{internal-worker-guard-CdkeS9PN.js.map → internal-worker-guard-Dr6W83TC.js.map} +1 -1
- package/dist/{internal-workspace-header-tuBXJV22.js → internal-workspace-header-Cep0WSIb.js} +2 -2
- package/dist/{internal-workspace-header-tuBXJV22.js.map → internal-workspace-header-Cep0WSIb.js.map} +1 -1
- package/dist/lifecycle-4TZrJuAa.js +2 -0
- package/dist/{lifecycle-CM9eTzvk.js → lifecycle-CmPJ6e_6.js} +2 -2
- package/dist/{lifecycle-CM9eTzvk.js.map → lifecycle-CmPJ6e_6.js.map} +1 -1
- package/dist/{lifecycle-Bg6doY3-.js → lifecycle-DgsJ_8Am.js} +2 -2
- package/dist/{lifecycle-Bg6doY3-.js.map → lifecycle-DgsJ_8Am.js.map} +1 -1
- package/dist/lifecycle-O91Vzzb-.js +2 -0
- package/dist/main.js +19 -18
- package/dist/main.js.map +1 -1
- package/dist/max-profile-contract-BTXowh6k.js +264 -0
- package/dist/max-profile-contract-BTXowh6k.js.map +1 -0
- package/dist/{mcp-workspace-header-dERl2YTT.js → mcp-workspace-header-NzFD0Wgd.js} +2 -2
- package/dist/{mcp-workspace-header-dERl2YTT.js.map → mcp-workspace-header-NzFD0Wgd.js.map} +1 -1
- package/dist/{models-DZ4hYsR7.js → models-1KwEUgzd.js} +3 -3
- package/dist/{models-DZ4hYsR7.js.map → models-1KwEUgzd.js.map} +1 -1
- package/dist/{orchestration-BiGCEwbH.js → orchestration-CYyp9w-t.js} +2 -2
- package/dist/{orchestration-BiGCEwbH.js.map → orchestration-CYyp9w-t.js.map} +1 -1
- package/dist/paths-DDAiPVto.js +2 -0
- package/dist/{paths-Ci485qSJ.js → paths-IcZW8gZx.js} +4 -4
- package/dist/{paths-Ci485qSJ.js.map → paths-IcZW8gZx.js.map} +1 -1
- package/dist/{peer-mcp-personas-ce6_YMnX.js → peer-mcp-personas-DwEiYeJS.js} +423 -186
- package/dist/peer-mcp-personas-DwEiYeJS.js.map +1 -0
- package/dist/{plan-review-hook-DuW0pSoM.js → plan-review-hook-szSNt6uU.js} +3 -3
- package/dist/{plan-review-hook-DuW0pSoM.js.map → plan-review-hook-szSNt6uU.js.map} +1 -1
- package/dist/{prompt-submit-hook-IMl7ssfr.js → prompt-submit-hook-ZUxo_jEl.js} +3 -3
- package/dist/{prompt-submit-hook-IMl7ssfr.js.map → prompt-submit-hook-ZUxo_jEl.js.map} +1 -1
- package/dist/{provision-BhCtm3md.js → provision-BLT1pCFy.js} +4 -4
- package/dist/{provision-BhCtm3md.js.map → provision-BLT1pCFy.js.map} +1 -1
- package/dist/{self-invocation-DAB_od0C.js → self-invocation-BJWbA8ka.js} +2 -2
- package/dist/{self-invocation-DAB_od0C.js.map → self-invocation-BJWbA8ka.js.map} +1 -1
- package/dist/{serve-Blj_dRSr.js → serve-wEZoOijw.js} +13 -12
- package/dist/{serve-Blj_dRSr.js.map → serve-wEZoOijw.js.map} +1 -1
- package/dist/{server-setup-DhG3YZPj.js → server-setup-Zn5wkosb.js} +213 -37
- package/dist/server-setup-Zn5wkosb.js.map +1 -0
- package/dist/{start-8QaqICtd.js → start-DSqU8d8h.js} +3 -3
- package/dist/{start-8QaqICtd.js.map → start-DSqU8d8h.js.map} +1 -1
- package/dist/state-B8adscCv.js +51 -0
- package/dist/state-B8adscCv.js.map +1 -0
- package/dist/{stop-gate-hook-DQnh_KfI.js → stop-gate-hook-CJOk28zd.js} +3 -3
- package/dist/{stop-gate-hook-DQnh_KfI.js.map → stop-gate-hook-CJOk28zd.js.map} +1 -1
- package/dist/{stop-gate-policy-DMr3KVmw.js → stop-gate-policy-zhzRIj6G.js} +2 -2
- package/dist/{stop-gate-policy-DMr3KVmw.js.map → stop-gate-policy-zhzRIj6G.js.map} +1 -1
- package/dist/{token-BtJhjXXu.js → token-CbuFyx-B.js} +4 -50
- package/dist/token-CbuFyx-B.js.map +1 -0
- package/dist/{worker-dispatch-BEHkTbnH.js → worker-dispatch-DgP5yT26.js} +2 -2
- package/dist/{worker-dispatch-BEHkTbnH.js.map → worker-dispatch-DgP5yT26.js.map} +1 -1
- package/package.json +1 -1
- package/dist/attribution-settings-B70GmZ68.js.map +0 -1
- package/dist/claude-DMMfvfns.js.map +0 -1
- package/dist/engine-BkGRuUNs.js +0 -2
- package/dist/lifecycle-CGLt1cJQ.js +0 -2
- package/dist/lifecycle-DoUwpVDB.js +0 -2
- package/dist/paths-GD7bgGGy.js +0 -2
- package/dist/peer-mcp-personas-ce6_YMnX.js.map +0 -1
- package/dist/server-setup-DhG3YZPj.js.map +0 -1
- package/dist/token-BtJhjXXu.js.map +0 -1
|
@@ -1,5 +1,6 @@
|
|
|
1
|
-
import { i as ensurePaths, t as PATHS } from "./paths-
|
|
2
|
-
import {
|
|
1
|
+
import { i as ensurePaths, t as PATHS } from "./paths-IcZW8gZx.js";
|
|
2
|
+
import { t as state } from "./state-B8adscCv.js";
|
|
3
|
+
import { r as setupGitHubToken } from "./token-CbuFyx-B.js";
|
|
3
4
|
import { defineCommand } from "citty";
|
|
4
5
|
import consola from "consola";
|
|
5
6
|
//#region src/auth.ts
|
|
@@ -41,4 +42,4 @@ const auth = defineCommand({
|
|
|
41
42
|
//#endregion
|
|
42
43
|
export { auth };
|
|
43
44
|
|
|
44
|
-
//# sourceMappingURL=auth-
|
|
45
|
+
//# sourceMappingURL=auth-CpjOjoUG.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"auth-
|
|
1
|
+
{"version":3,"file":"auth-CpjOjoUG.js","names":[],"sources":["../src/auth.ts"],"sourcesContent":["#!/usr/bin/env node\n\nimport { defineCommand } from \"citty\"\nimport consola from \"consola\"\n\nimport { PATHS, ensurePaths } from \"./lib/paths\"\nimport { state } from \"./lib/state\"\nimport { setupGitHubToken } from \"./lib/token\"\n\ninterface RunAuthOptions {\n verbose: boolean\n showToken: boolean\n}\n\nexport async function runAuth(options: RunAuthOptions): Promise<void> {\n if (options.verbose) {\n consola.level = 5\n consola.info(\"Verbose logging enabled\")\n }\n\n state.showToken = options.showToken\n\n await ensurePaths()\n await setupGitHubToken({ force: true })\n consola.success(\"GitHub token written to\", PATHS.GITHUB_TOKEN_PATH)\n}\n\nexport const auth = defineCommand({\n meta: {\n name: \"auth\",\n description: \"Run GitHub auth flow without running the server\",\n },\n args: {\n verbose: {\n alias: \"v\",\n type: \"boolean\",\n default: false,\n description: \"Enable verbose logging\",\n },\n \"show-token\": {\n type: \"boolean\",\n default: false,\n description: \"Show GitHub token on auth\",\n },\n },\n run({ args }) {\n return runAuth({\n verbose: args.verbose,\n showToken: args[\"show-token\"],\n })\n },\n})\n"],"mappings":";;;;;;AAcA,eAAsB,QAAQ,SAAwC;CACpE,IAAI,QAAQ,SAAS;EACnB,QAAQ,QAAQ;EAChB,QAAQ,KAAK,yBAAyB;CACxC;CAEA,MAAM,YAAY,QAAQ;CAE1B,MAAM,YAAY;CAClB,MAAM,iBAAiB,EAAE,OAAO,KAAK,CAAC;CACtC,QAAQ,QAAQ,2BAA2B,MAAM,iBAAiB;AACpE;AAEA,MAAa,OAAO,cAAc;CAChC,MAAM;EACJ,MAAM;EACN,aAAa;CACf;CACA,MAAM;EACJ,SAAS;GACP,OAAO;GACP,MAAM;GACN,SAAS;GACT,aAAa;EACf;EACA,cAAc;GACZ,MAAM;GACN,SAAS;GACT,aAAa;EACf;CACF;CACA,IAAI,EAAE,QAAQ;EACZ,OAAO,QAAQ;GACb,SAAS,KAAK;GACd,WAAW,KAAK;EAClB,CAAC;CACH;AACF,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.
|
|
5
|
+
"version": "0.3.302",
|
|
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": {
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { i as ensurePaths } from "./paths-
|
|
2
|
-
import { r as setupGitHubToken } from "./token-
|
|
3
|
-
import { t as getCopilotUsage } from "./get-copilot-usage-
|
|
1
|
+
import { i as ensurePaths } from "./paths-IcZW8gZx.js";
|
|
2
|
+
import { r as setupGitHubToken } from "./token-CbuFyx-B.js";
|
|
3
|
+
import { t as getCopilotUsage } from "./get-copilot-usage-ByjQqhdi.js";
|
|
4
4
|
import { defineCommand } from "citty";
|
|
5
5
|
import consola from "consola";
|
|
6
6
|
//#region src/check-usage.ts
|
|
@@ -40,4 +40,4 @@ const checkUsage = defineCommand({
|
|
|
40
40
|
//#endregion
|
|
41
41
|
export { checkUsage };
|
|
42
42
|
|
|
43
|
-
//# sourceMappingURL=check-usage-
|
|
43
|
+
//# sourceMappingURL=check-usage-BsN3S4Fu.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"check-usage-
|
|
1
|
+
{"version":3,"file":"check-usage-BsN3S4Fu.js","names":[],"sources":["../src/check-usage.ts"],"sourcesContent":["import { defineCommand } from \"citty\"\nimport consola from \"consola\"\n\nimport { ensurePaths } from \"./lib/paths\"\nimport { setupGitHubToken } from \"./lib/token\"\nimport {\n getCopilotUsage,\n type QuotaDetail,\n} from \"./services/github/get-copilot-usage\"\n\nexport const checkUsage = defineCommand({\n meta: {\n name: \"check-usage\",\n description: \"Show current GitHub Copilot usage/quota information\",\n },\n async run() {\n await ensurePaths()\n await setupGitHubToken()\n try {\n const usage = await getCopilotUsage()\n const premium = usage.quota_snapshots.premium_interactions\n const premiumTotal = premium.entitlement\n const premiumUsed = premiumTotal - premium.remaining\n const premiumPercentUsed =\n premiumTotal > 0 ? (premiumUsed / premiumTotal) * 100 : 0\n const premiumPercentRemaining = premium.percent_remaining\n\n // Helper to summarize a quota snapshot\n function summarizeQuota(name: string, snap: QuotaDetail | undefined) {\n if (!snap) return `${name}: N/A`\n const total = snap.entitlement\n const used = total - snap.remaining\n const percentUsed = total > 0 ? (used / total) * 100 : 0\n const percentRemaining = snap.percent_remaining\n return `${name}: ${used}/${total} used (${percentUsed.toFixed(1)}% used, ${percentRemaining.toFixed(1)}% remaining)`\n }\n\n const premiumLine = `Premium: ${premiumUsed}/${premiumTotal} used (${premiumPercentUsed.toFixed(1)}% used, ${premiumPercentRemaining.toFixed(1)}% remaining)`\n const chatLine = summarizeQuota(\"Chat\", usage.quota_snapshots.chat)\n const completionsLine = summarizeQuota(\n \"Completions\",\n usage.quota_snapshots.completions,\n )\n\n consola.box(\n `Copilot Usage (plan: ${usage.copilot_plan})\\n`\n + `Quota resets: ${usage.quota_reset_date}\\n`\n + `\\nQuotas:\\n`\n + ` ${premiumLine}\\n`\n + ` ${chatLine}\\n`\n + ` ${completionsLine}`,\n )\n } catch (err) {\n consola.error(\"Failed to fetch Copilot usage:\", err)\n process.exit(1)\n }\n },\n})\n"],"mappings":";;;;;;AAUA,MAAa,aAAa,cAAc;CACtC,MAAM;EACJ,MAAM;EACN,aAAa;CACf;CACA,MAAM,MAAM;EACV,MAAM,YAAY;EAClB,MAAM,iBAAiB;EACvB,IAAI;GACF,MAAM,QAAQ,MAAM,gBAAgB;GACpC,MAAM,UAAU,MAAM,gBAAgB;GACtC,MAAM,eAAe,QAAQ;GAC7B,MAAM,cAAc,eAAe,QAAQ;GAC3C,MAAM,qBACJ,eAAe,IAAK,cAAc,eAAgB,MAAM;GAC1D,MAAM,0BAA0B,QAAQ;GAGxC,SAAS,eAAe,MAAc,MAA+B;IACnE,IAAI,CAAC,MAAM,OAAO,GAAG,KAAK;IAC1B,MAAM,QAAQ,KAAK;IACnB,MAAM,OAAO,QAAQ,KAAK;IAC1B,MAAM,cAAc,QAAQ,IAAK,OAAO,QAAS,MAAM;IACvD,MAAM,mBAAmB,KAAK;IAC9B,OAAO,GAAG,KAAK,IAAI,KAAK,GAAG,MAAM,SAAS,YAAY,QAAQ,CAAC,EAAE,UAAU,iBAAiB,QAAQ,CAAC,EAAE;GACzG;GAEA,MAAM,cAAc,YAAY,YAAY,GAAG,aAAa,SAAS,mBAAmB,QAAQ,CAAC,EAAE,UAAU,wBAAwB,QAAQ,CAAC,EAAE;GAChJ,MAAM,WAAW,eAAe,QAAQ,MAAM,gBAAgB,IAAI;GAClE,MAAM,kBAAkB,eACtB,eACA,MAAM,gBAAgB,WACxB;GAEA,QAAQ,IACN,wBAAwB,MAAM,aAAa,mBACtB,MAAM,iBAAiB,iBAEnC,YAAY,MACZ,SAAS,MACT,iBACX;EACF,SAAS,KAAK;GACZ,QAAQ,MAAM,kCAAkC,GAAG;GACnD,QAAQ,KAAK,CAAC;EAChB;CACF;AACF,CAAC"}
|
|
@@ -1,22 +1,25 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { o as removeOwnClaudeConfigMirror, r as ensureClaudeConfigMirror, t as PATHS, u as writeArtifactCredsToMirror } from "./paths-
|
|
3
|
-
import {
|
|
1
|
+
import { At as scribeModel, Bn as resolveLeadSlugArg, Ct as generalPurposeFastModel, D as toolbeltEnabled, Dt as reviewerFastModel, E as buildToolbeltAwareness, En as shouldUseInsecureTls, Et as resolveGeminiReviewModel, Jt as resolveLaunchProfile, Mt as workerToolsEnabled, Ot as reviewerModel, Pt as LUNA_DRIVER_ALIAS_ID, Rn as isBudgetClaudeLead, Sn as warmTreeSitterPool, St as geminiAvailable, T as availableToolCommands, Tt as nativeSubagentModel, Ut as formatFastPrerequisiteFailure, Xt as validateFastProfilePrerequisites, Zt as validateMaxProfileLaunch, _t as fastOracleModel, an as registerLaunch, at as FAST_IMPLEMENTER_EFFORT, bt as fastScoutModel, ct as FAST_SCOUT_EFFORT, dt as brainstormModel, ft as browseAgentEnabled, gn as provisionBrowserAssets, gt as fastImplementerModel, ht as fastCriticModel, it as FAST_CRITIC_EFFORT, jn as DEFAULT_CLAUDE_MODEL_FALLBACKS, jt as standInToolEnabled, kt as scoutModel, lt as agentToolsEnabled, mt as browserToolsEnabled, o as buildPeerAwarenessSnippet, on as unregisterLaunch, ot as FAST_PLANNER_EFFORT, pt as browserCompoundToolsEnabled, qt as profileDescriptor, r as agentNamesForToolAllowlist, s as buildPeerAwarenessSummary, st as FAST_REVIEWER_EFFORT, ut as artifactToolsEnabled, vn as colbertDegradedWarning, vt as fastPlannerModel, wt as implementerFastModel, xt as fleetToolsEnabled, yn as provisionAndIndexColbert, yt as fastReviewerModel, zn as pickClaudeDefault } from "./peer-mcp-personas-DwEiYeJS.js";
|
|
2
|
+
import { o as removeOwnClaudeConfigMirror, r as ensureClaudeConfigMirror, t as PATHS, u as writeArtifactCredsToMirror } from "./paths-IcZW8gZx.js";
|
|
3
|
+
import { t as state } from "./state-B8adscCv.js";
|
|
4
|
+
import { d as resolveModel } from "./token-CbuFyx-B.js";
|
|
4
5
|
import { r as parseBoolEnv } from "./exec-y8C_MU8A.js";
|
|
5
|
-
import { a as sharedServerArgs, c as stopKeepAwake, d as runSelfUpdate, f as checkClaudeVersion, i as setupAndServe, l as listModelsForEndpoint, o as LAUNCH_SECRET_HEADER, p as updateClaude, r as parseSharedArgs, s as startKeepAwake, t as getClaudeCodeEnvVars, u as enableFileLogging } from "./server-setup-
|
|
6
|
+
import { a as sharedServerArgs, c as stopKeepAwake, d as runSelfUpdate, f as checkClaudeVersion, i as setupAndServe, l as listModelsForEndpoint, o as LAUNCH_SECRET_HEADER, p as updateClaude, r as parseSharedArgs, s as startKeepAwake, t as getClaudeCodeEnvVars, u as enableFileLogging } from "./server-setup-Zn5wkosb.js";
|
|
6
7
|
import { t as FAST_PROFILE_ADVISOR_CLIENT_MODEL } from "./fast-profile-contract-K3P58nj3.js";
|
|
7
|
-
import { n as hookLauncherDegradedWarning, r as resolveSelfInvocation } from "./self-invocation-
|
|
8
|
-
import { i as
|
|
9
|
-
import { i as
|
|
10
|
-
import { t as
|
|
11
|
-
import {
|
|
12
|
-
import { l as
|
|
13
|
-
import {
|
|
8
|
+
import { n as hookLauncherDegradedWarning, r as resolveSelfInvocation } from "./self-invocation-BJWbA8ka.js";
|
|
9
|
+
import { c as formatMaxPrerequisiteFailure, f as maxGeminiModel, i as MAX_PROFILE_MODELS, m as maxOpusModel, p as maxGrokModel } from "./max-profile-contract-BTXowh6k.js";
|
|
10
|
+
import { i as launchChild, r as getCodexVersion, t as provisionToolbelt } from "./provision-BLT1pCFy.js";
|
|
11
|
+
import { i as captureLaunchBaseline, l as stopGateDisabled, n as buildSessionBindHookCommand, r as buildStopHookCommand, s as injectStopHookIntoSettingsFile, t as buildArtifactOpenHookCommand, u as stopGateId } from "./stop-gate-hook-CJOk28zd.js";
|
|
12
|
+
import { t as liveExec } from "./orchestration-CYyp9w-t.js";
|
|
13
|
+
import { c as repoRoot, d as trustRepo, l as stopGateEnabledForRepo, s as repoFingerprint, t as fileBaselineStore } from "./stop-gate-policy-zhzRIj6G.js";
|
|
14
|
+
import { l as guardToolMatcher, n as activeDispatchModes, r as buildWorkerGuardHookCommand } from "./worker-dispatch-DgP5yT26.js";
|
|
15
|
+
import { S as writePeerMcpRuntimeFiles, a as OPERATING_DEFAULTS_DIGEST, b as resolveGroupKeysFromMirror, c as buildOperatingDefaultsDirective, d as prependStyleDirectiveToMirroredClaudeMd, h as planModeAllowRules, i as writeInjectedSkill, l as prependArtifactPanelDirectiveToMirroredClaudeMd, m as injectAllowRules, o as appendPeerAwarenessToMirroredClaudeMd, r as injectedSkillsForLaunch, s as appendToolbeltAwarenessToMirroredClaudeMd, t as injectAttributionSuppressionIntoSettingsFile, u as prependOperatingDefaultsToMirroredClaudeMd, v as injectPeerMcpIntoMirror, x as workersKeyOf, y as resolveCodexCliBackend } from "./attribution-settings-B1xutIts.js";
|
|
14
16
|
import { r as hookMcpRuntimeFromEnv } from "./hook-mcp-client-DBvm9608.js";
|
|
15
|
-
import { i as planReviewEnabled, t as buildPlanReviewHookCommand } from "./plan-review-hook-
|
|
16
|
-
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-
|
|
17
|
-
import { t as buildPromptSubmitHookCommand } from "./prompt-submit-hook-
|
|
18
|
-
import { i as assertShapingInstalled, n as buildFirstMateGuardHookCommand, t as FIRST_MATE_GUARD_MATCHER } from "./internal-first-mate-guard-
|
|
19
|
-
import { r as FAST_DISPATCH_TOOL_MATCHER, t as buildFastDispatchGuardHookCommand } from "./internal-fast-dispatch-guard-
|
|
17
|
+
import { i as planReviewEnabled, t as buildPlanReviewHookCommand } from "./plan-review-hook-szSNt6uU.js";
|
|
18
|
+
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-BTRVyKWu.js";
|
|
19
|
+
import { t as buildPromptSubmitHookCommand } from "./prompt-submit-hook-ZUxo_jEl.js";
|
|
20
|
+
import { i as assertShapingInstalled, n as buildFirstMateGuardHookCommand, t as FIRST_MATE_GUARD_MATCHER } from "./internal-first-mate-guard-Bcb5JwiO.js";
|
|
21
|
+
import { r as FAST_DISPATCH_TOOL_MATCHER, t as buildFastDispatchGuardHookCommand } from "./internal-fast-dispatch-guard-D2HcfXZv.js";
|
|
22
|
+
import { i as assertMaxDispatchGuardInstalled, r as MAX_DISPATCH_TOOL_MATCHER, t as buildMaxDispatchGuardHookCommand } from "./internal-max-dispatch-guard-BjSVXMvC.js";
|
|
20
23
|
import { defineCommand } from "citty";
|
|
21
24
|
import consola from "consola";
|
|
22
25
|
import path from "node:path";
|
|
@@ -184,9 +187,6 @@ function withFixedFastAdvisorArg(args, enabled = fastAdvisorClientEnabled()) {
|
|
|
184
187
|
}
|
|
185
188
|
//#endregion
|
|
186
189
|
//#region src/claude.ts
|
|
187
|
-
function isFirstMateSkillName(name) {
|
|
188
|
-
return name === "gh-first-mate" || name === "gh-first-mate-scaffold" || name === "gh-first-mate-operate" || name === "gh-first-mate-conduct";
|
|
189
|
-
}
|
|
190
190
|
const claudeArgs = {
|
|
191
191
|
...sharedServerArgs,
|
|
192
192
|
model: {
|
|
@@ -305,8 +305,13 @@ const claude = defineCommand({
|
|
|
305
305
|
const parsed = parseSharedArgs(args);
|
|
306
306
|
const requestedLaunchProfileId = resolveLaunchProfile(args.model);
|
|
307
307
|
const codexMcpEnabled = args["codex-mcp"] !== false;
|
|
308
|
-
if (requestedLaunchProfileId === "
|
|
309
|
-
process$1.stderr.write(`
|
|
308
|
+
if (requestedLaunchProfileId === "max" && args["codex-cli"]) {
|
|
309
|
+
process$1.stderr.write(`Max profile uses its fixed HTTP MCP surface; --codex-cli is not supported in max profile.\n`);
|
|
310
|
+
process$1.exit(1);
|
|
311
|
+
}
|
|
312
|
+
if ((requestedLaunchProfileId === "fast" || requestedLaunchProfileId === "max") && !codexMcpEnabled) {
|
|
313
|
+
const message = `github-router claude -m ${requestedLaunchProfileId === "fast" ? "fast" : "max"} requires codex MCP wiring for its native roster and dispatch ACL; remove --no-codex-mcp or choose a standard model.`;
|
|
314
|
+
process$1.stderr.write(`${message}\n`);
|
|
310
315
|
process$1.exit(1);
|
|
311
316
|
}
|
|
312
317
|
if (args.stealth) {
|
|
@@ -388,6 +393,9 @@ const claude = defineCommand({
|
|
|
388
393
|
if (launchProfileId === "fast") {
|
|
389
394
|
const prereqCheck = validateFastProfilePrerequisites(state.models);
|
|
390
395
|
if (!prereqCheck.ok) await fastFatal(formatFastPrerequisiteFailure(prereqCheck.missing));
|
|
396
|
+
} else if (launchProfileId === "max") {
|
|
397
|
+
const prereqCheck = validateMaxProfileLaunch(state.models);
|
|
398
|
+
if (!prereqCheck.ok) await fastFatal(formatMaxPrerequisiteFailure(prereqCheck.missing));
|
|
391
399
|
}
|
|
392
400
|
let chosenSlug = launchProfileId === "fast" ? requestedSlug.endsWith("[1m]") ? `${LUNA_DRIVER_ALIAS_ID}[1m]` : LUNA_DRIVER_ALIAS_ID : requestedSlug;
|
|
393
401
|
let resolvedSlug = launchProfileId === "fast" ? resolveModel(requestedSlug) : resolveModel(chosenSlug);
|
|
@@ -443,6 +451,13 @@ const claude = defineCommand({
|
|
|
443
451
|
reviewer: fastReviewerModel(),
|
|
444
452
|
planner: fastPlannerModel(),
|
|
445
453
|
critic: fastCriticModel()
|
|
454
|
+
} : launchProfileId === "max" ? {
|
|
455
|
+
Explore: MAX_PROFILE_MODELS.luna,
|
|
456
|
+
Plan: MAX_PROFILE_MODELS.sol,
|
|
457
|
+
"general-purpose": MAX_PROFILE_MODELS.luna,
|
|
458
|
+
implementer: MAX_PROFILE_MODELS.gemini,
|
|
459
|
+
reviewer: maxGeminiModel() ?? maxGrokModel() ?? MAX_PROFILE_MODELS.grok,
|
|
460
|
+
brainstorm: maxGrokModel() ?? maxGeminiModel() ?? MAX_PROFILE_MODELS.grok
|
|
446
461
|
} : {
|
|
447
462
|
implementer: nativeSubagentModel(),
|
|
448
463
|
"implementer-fast": implementerFastModel(),
|
|
@@ -469,35 +484,40 @@ const claude = defineCommand({
|
|
|
469
484
|
if (codexMcpEnabled) try {
|
|
470
485
|
const requestedCli = args["codex-cli"] ?? false;
|
|
471
486
|
const isFastProfile = launchProfileId === "fast";
|
|
487
|
+
const isMaxProfile = launchProfileId === "max";
|
|
472
488
|
if (isFastProfile && requestedCli) process$1.stderr.write("Fast profile uses its fixed HTTP MCP surface; ignoring --codex-cli.\n");
|
|
473
|
-
const backend = isFastProfile ? "http" : resolveCodexCliBackend({
|
|
489
|
+
const backend = isFastProfile || isMaxProfile ? "http" : resolveCodexCliBackend({
|
|
474
490
|
requested: requestedCli,
|
|
475
491
|
codexInfo: requestedCli ? getCodexVersion() : null
|
|
476
492
|
});
|
|
477
|
-
const geminiModelsAvailable = geminiAvailable();
|
|
478
|
-
if (!geminiModelsAvailable) consola.info("gemini-3.1-pro-preview not found in your Copilot model catalog; gemini-critic persona will not be registered.");
|
|
493
|
+
const geminiModelsAvailable = isMaxProfile ? maxGeminiModel() !== void 0 : geminiAvailable();
|
|
494
|
+
if (!geminiModelsAvailable) consola.info(isMaxProfile ? "Neither Grok 4.6/high nor Gemini 3.7 Flash 1M/high is usable; max third-lab personas and stand_in will not be registered." : "gemini-3.1-pro-preview not found in your Copilot model catalog; gemini-critic persona will not be registered.");
|
|
479
495
|
const fastDescriptor = profileDescriptor(launchProfileId);
|
|
480
|
-
const baseGroups = [
|
|
496
|
+
const baseGroups = isMaxProfile ? ["peers", "search"] : [
|
|
481
497
|
"peers",
|
|
482
498
|
"search",
|
|
483
499
|
"orchestrate"
|
|
484
500
|
];
|
|
485
|
-
if (workerToolsEnabled()) baseGroups.push("workers");
|
|
501
|
+
if (workerToolsEnabled() && !isMaxProfile) baseGroups.push("workers");
|
|
502
|
+
if (isMaxProfile && browseAgentEnabled()) baseGroups.push("workers");
|
|
486
503
|
const enabledGroups = fastDescriptor.allowedGroups ? baseGroups.filter((g) => fastDescriptor.allowedGroups.has(g)) : baseGroups;
|
|
487
|
-
if (!isFastProfile && standInToolEnabled()) enabledGroups.push("decide");
|
|
504
|
+
if (!isFastProfile && !isMaxProfile && standInToolEnabled()) enabledGroups.push("decide");
|
|
505
|
+
if (isMaxProfile && maxOpusModel() !== void 0 && standInToolEnabled({ maxProfile: true })) enabledGroups.push("decide");
|
|
488
506
|
if (browserToolsEnabled() && (!fastDescriptor.allowedGroups || fastDescriptor.allowedGroups.has("browser"))) enabledGroups.push("browser");
|
|
489
|
-
if (!isFastProfile && fleetToolsEnabled()) enabledGroups.push("fleet");
|
|
490
|
-
if (!isFastProfile && agentToolsEnabled()) enabledGroups.push("first-mate");
|
|
507
|
+
if (!isFastProfile && !isMaxProfile && fleetToolsEnabled()) enabledGroups.push("fleet");
|
|
508
|
+
if (!isFastProfile && !isMaxProfile && agentToolsEnabled()) enabledGroups.push("first-mate");
|
|
509
|
+
if (isMaxProfile && fleetToolsEnabled()) enabledGroups.push("fleet");
|
|
510
|
+
if (isMaxProfile && agentToolsEnabled()) enabledGroups.push("first-mate");
|
|
491
511
|
const { keys: groupKeys, skipped: skippedGroups } = await resolveGroupKeysFromMirror(enabledGroups);
|
|
492
512
|
if (isFastProfile && (fastOracleModel() == null || fastCriticModel() == null)) throw new Error("fast profile prerequisite drift: exact Oracle or critic model no longer resolves");
|
|
493
513
|
const runtime = await writePeerMcpRuntimeFiles(serverUrl, {
|
|
494
514
|
codexCli: backend === "cli",
|
|
495
515
|
selfInvocation,
|
|
496
516
|
geminiAvailable: geminiModelsAvailable,
|
|
497
|
-
geminiModel: resolveGeminiReviewModel(),
|
|
517
|
+
geminiModel: isMaxProfile ? maxGeminiModel() : resolveGeminiReviewModel(),
|
|
498
518
|
groupKeys,
|
|
499
|
-
workerToolsAvailable: !isFastProfile && workerToolsEnabled(),
|
|
500
|
-
browseAvailable: !isFastProfile && browseAgentEnabled(),
|
|
519
|
+
workerToolsAvailable: !isFastProfile && !isMaxProfile && workerToolsEnabled(),
|
|
520
|
+
browseAvailable: isMaxProfile ? browseAgentEnabled() : !isFastProfile && browseAgentEnabled(),
|
|
501
521
|
nativeSubagentModel: nativeAgentModels.implementer,
|
|
502
522
|
reviewerModel: nativeAgentModels.reviewer,
|
|
503
523
|
reviewerFastModel: nativeAgentModels["reviewer-fast"],
|
|
@@ -518,9 +538,28 @@ const claude = defineCommand({
|
|
|
518
538
|
reviewerEffort: FAST_REVIEWER_EFFORT,
|
|
519
539
|
plannerEffort: FAST_PLANNER_EFFORT,
|
|
520
540
|
criticEffort: FAST_CRITIC_EFFORT
|
|
541
|
+
} : isMaxProfile ? {
|
|
542
|
+
maxProfile: true,
|
|
543
|
+
workerToolsAvailable: false,
|
|
544
|
+
browseAvailable: browseAgentEnabled(),
|
|
545
|
+
maxExploreModel: MAX_PROFILE_MODELS.luna,
|
|
546
|
+
maxPlanModel: MAX_PROFILE_MODELS.sol,
|
|
547
|
+
maxGeneralPurposeModel: MAX_PROFILE_MODELS.luna,
|
|
548
|
+
maxImplementerModel: MAX_PROFILE_MODELS.gemini,
|
|
549
|
+
maxReviewerModel: maxGeminiModel() ?? maxGrokModel() ?? MAX_PROFILE_MODELS.grok,
|
|
550
|
+
maxBrainstormModel: maxGrokModel() ?? maxGeminiModel() ?? MAX_PROFILE_MODELS.grok,
|
|
551
|
+
maxGeminiModel: maxGeminiModel(),
|
|
552
|
+
maxGrokModel: maxGrokModel(),
|
|
553
|
+
maxPeerModels: {
|
|
554
|
+
sol: MAX_PROFILE_MODELS.sol,
|
|
555
|
+
luna: MAX_PROFILE_MODELS.luna,
|
|
556
|
+
opus: maxOpusModel(),
|
|
557
|
+
gemini: maxGeminiModel(),
|
|
558
|
+
grok: maxGrokModel()
|
|
559
|
+
}
|
|
521
560
|
} : {}
|
|
522
561
|
});
|
|
523
|
-
if (isFastProfile) fastRuntimeCleanup = runtime.cleanup;
|
|
562
|
+
if (isFastProfile || isMaxProfile) fastRuntimeCleanup = runtime.cleanup;
|
|
524
563
|
const launchSecret = randomBytes(32).toString("hex");
|
|
525
564
|
const launchEntry = registerLaunch({
|
|
526
565
|
profileId: launchProfileId,
|
|
@@ -529,11 +568,11 @@ const claude = defineCommand({
|
|
|
529
568
|
allowedGroups: fastDescriptor.allowedGroups,
|
|
530
569
|
allowedPersonas: fastDescriptor.personaAllowlist
|
|
531
570
|
});
|
|
532
|
-
if (isFastProfile) fastLaunchId = launchEntry.launchId;
|
|
571
|
+
if (isFastProfile || isMaxProfile) fastLaunchId = launchEntry.launchId;
|
|
533
572
|
envVars.ANTHROPIC_CUSTOM_HEADERS = envVars.ANTHROPIC_CUSTOM_HEADERS ? `${envVars.ANTHROPIC_CUSTOM_HEADERS}\n${LAUNCH_SECRET_HEADER}: ${launchSecret}` : `${LAUNCH_SECRET_HEADER}: ${launchSecret}`;
|
|
534
573
|
envVars.GH_ROUTER_HOOK_MCP_URL = serverUrl;
|
|
535
574
|
envVars.GH_ROUTER_HOOK_NONCE = runtime.nonce;
|
|
536
|
-
onShutdown = isFastProfile ? async () => {
|
|
575
|
+
onShutdown = isFastProfile || isMaxProfile ? async () => {
|
|
537
576
|
try {
|
|
538
577
|
unregisterLaunch(launchEntry.launchId);
|
|
539
578
|
} finally {
|
|
@@ -581,24 +620,37 @@ const claude = defineCommand({
|
|
|
581
620
|
}
|
|
582
621
|
assertFastDispatchGuardInstalled(true, fastGuardInstalled);
|
|
583
622
|
fastWiringComplete = true;
|
|
623
|
+
} else if (isMaxProfile) {
|
|
624
|
+
let maxGuardInstalled = false;
|
|
625
|
+
try {
|
|
626
|
+
const settingsPath = path.join(PATHS.CLAUDE_CONFIG_DIR, "settings.json");
|
|
627
|
+
const guardCommand = buildMaxDispatchGuardHookCommand(selfInvocation);
|
|
628
|
+
await injectStopHookIntoSettingsFile(settingsPath, guardCommand, "PreToolUse", 10, MAX_DISPATCH_TOOL_MATCHER);
|
|
629
|
+
maxGuardInstalled = true;
|
|
630
|
+
} catch (err) {
|
|
631
|
+
consola.error(`Could not register the max native dispatch ACL hook: ${String(err)}`);
|
|
632
|
+
}
|
|
633
|
+
assertMaxDispatchGuardInstalled(true, maxGuardInstalled);
|
|
634
|
+
fastWiringComplete = true;
|
|
584
635
|
}
|
|
585
636
|
const personaNames = runtime.personas.map((p) => p.agentName).join(", ");
|
|
586
637
|
const skippedNote = skippedGroups.length > 0 ? ` WARNING: groups [${skippedGroups.join(", ")}] skipped — both the bare and \`gh-router-<group>\` keys collide with your own mcpServers; those tools are unavailable this session (rename the user-side server to re-enable).` : "";
|
|
587
638
|
process$1.stderr.write(`Peer MCP wired (backend=${backend}, personas=[${personaNames}], subagent .md files=${runtime.agentMdPaths.length}, ${subagentVisibility}).${skippedNote}\n`);
|
|
588
639
|
const sessionCwd = process$1.cwd();
|
|
589
|
-
const workerSkillsActive = workerToolsEnabled() &&
|
|
640
|
+
const workerSkillsActive = workerToolsEnabled() && launchProfileId === "standard";
|
|
641
|
+
const skillsToWrite = injectedSkillsForLaunch({
|
|
642
|
+
profileId: launchProfileId,
|
|
643
|
+
workerSkillsActive,
|
|
644
|
+
firstMateEnabled: agentToolsEnabled()
|
|
645
|
+
});
|
|
590
646
|
let skillsWritten = 0;
|
|
591
|
-
|
|
592
|
-
if (workerSkillsActive) {
|
|
593
|
-
|
|
594
|
-
|
|
595
|
-
|
|
596
|
-
|
|
597
|
-
|
|
598
|
-
await injectStopHookIntoSettingsFile(settingsPath, cmd, "UserPromptSubmit", 45);
|
|
599
|
-
} catch (err) {
|
|
600
|
-
consola.warn(`Could not register the UserPromptSubmit hook: ${String(err)}`);
|
|
601
|
-
}
|
|
647
|
+
for (const s of skillsToWrite) if ((await writeInjectedSkill(s.name, s.md).catch(() => ({ written: false }))).written) skillsWritten++;
|
|
648
|
+
if (workerSkillsActive) try {
|
|
649
|
+
const settingsPath = path.join(PATHS.CLAUDE_CONFIG_DIR, "settings.json");
|
|
650
|
+
const cmd = buildPromptSubmitHookCommand(selfInvocation);
|
|
651
|
+
await injectStopHookIntoSettingsFile(settingsPath, cmd, "UserPromptSubmit", 45);
|
|
652
|
+
} catch (err) {
|
|
653
|
+
consola.warn(`Could not register the UserPromptSubmit hook: ${String(err)}`);
|
|
602
654
|
}
|
|
603
655
|
try {
|
|
604
656
|
const settingsPath = path.join(PATHS.CLAUDE_CONFIG_DIR, "settings.json");
|
|
@@ -608,23 +660,21 @@ const claude = defineCommand({
|
|
|
608
660
|
} catch (err) {
|
|
609
661
|
consola.warn(`Could not auto-approve injected tools: ${String(err)}`);
|
|
610
662
|
}
|
|
611
|
-
if (workerSkillsActive)
|
|
612
|
-
|
|
613
|
-
|
|
614
|
-
|
|
615
|
-
|
|
616
|
-
|
|
617
|
-
|
|
618
|
-
|
|
619
|
-
|
|
620
|
-
|
|
621
|
-
|
|
622
|
-
|
|
623
|
-
|
|
624
|
-
|
|
625
|
-
|
|
626
|
-
process$1.stderr.write(`Injected skills (${skillsWritten}/${skillsToWrite.length}): ${skillNames}.\n`);
|
|
627
|
-
}
|
|
663
|
+
if (workerSkillsActive || isMaxProfile && browseAgentEnabled()) if (!injected?.ok) consola.warn("Workers non-blocking guard NOT registered: subagent MCP injection fell back to parent-only (--mcp-config), so worker-* dispatchers cannot reach the workers server. Raw (blocking) worker tools remain usable on the main thread this session.");
|
|
664
|
+
else if (process$1.env.GH_ROUTER_DISABLE_WORKER_GUARD === "1") consola.info("Workers non-blocking guard disabled via GH_ROUTER_DISABLE_WORKER_GUARD=1 — raw mcp__workers__* is callable on the main thread (blocking); the worker-* background agents remain the steered, non-blocking default.");
|
|
665
|
+
else try {
|
|
666
|
+
const settingsPath = path.join(PATHS.CLAUDE_CONFIG_DIR, "settings.json");
|
|
667
|
+
const workersKey = workersKeyOf(groupKeys);
|
|
668
|
+
const modes = isMaxProfile ? ["browse"] : activeDispatchModes({ browse: browseAgentEnabled() });
|
|
669
|
+
const cmd = buildWorkerGuardHookCommand(selfInvocation, workersKey, modes);
|
|
670
|
+
const matcher = guardToolMatcher(workersKey, modes);
|
|
671
|
+
await injectStopHookIntoSettingsFile(settingsPath, cmd, "PreToolUse", 10, matcher);
|
|
672
|
+
} catch (err) {
|
|
673
|
+
consola.warn(`Could not register the workers PreToolUse guard hook: ${String(err)}`);
|
|
674
|
+
}
|
|
675
|
+
if (skillsWritten > 0) {
|
|
676
|
+
const skillNames = skillsToWrite.map((s) => `/${s.name}`).join(", ");
|
|
677
|
+
process$1.stderr.write(`Injected skills (${skillsWritten}/${skillsToWrite.length}): ${skillNames}.\n`);
|
|
628
678
|
}
|
|
629
679
|
if (agentToolsEnabled()) {
|
|
630
680
|
let shapingInstalled = false;
|
|
@@ -671,13 +721,13 @@ const claude = defineCommand({
|
|
|
671
721
|
} catch (err) {
|
|
672
722
|
consola.warn(`Could not register the advisory plan-review hook: ${String(err)}`);
|
|
673
723
|
}
|
|
674
|
-
if (!isFastProfile && args["trust-gate"] === true) try {
|
|
724
|
+
if (!isFastProfile && !isMaxProfile && args["trust-gate"] === true) try {
|
|
675
725
|
const root = await trustRepo(sessionCwd);
|
|
676
726
|
process$1.stderr.write(`Structural gate trusted for this repo (${root}); it will run on launch here from now on.\n`);
|
|
677
727
|
} catch (err) {
|
|
678
728
|
consola.warn(`Could not record gate trust: ${String(err)}`);
|
|
679
729
|
}
|
|
680
|
-
const gateDisabled = isFastProfile || stopGateDisabled(args);
|
|
730
|
+
const gateDisabled = isFastProfile || isMaxProfile || stopGateDisabled(args);
|
|
681
731
|
const forceEnabled = parseBoolEnv(process$1.env.GH_ROUTER_ENABLE_STOP_GATE) === true;
|
|
682
732
|
const includeTests = parseBoolEnv(process$1.env.GH_ROUTER_STOP_GATE_RUN_TESTS) === true;
|
|
683
733
|
const gateRoot = await repoRoot(sessionCwd).catch(() => sessionCwd);
|
|
@@ -775,12 +825,13 @@ const claude = defineCommand({
|
|
|
775
825
|
const peerSnippet = buildPeerAwarenessSnippet({
|
|
776
826
|
codexCli: backend === "cli",
|
|
777
827
|
geminiAvailable: geminiModelsAvailable,
|
|
778
|
-
geminiModel: resolveGeminiReviewModel(),
|
|
779
|
-
workerToolsAvailable: workerToolsEnabled(),
|
|
780
|
-
standInAvailable: standInToolEnabled(),
|
|
781
|
-
browseAvailable: browserToolsEnabled(),
|
|
782
|
-
|
|
783
|
-
|
|
828
|
+
geminiModel: isMaxProfile ? maxGeminiModel() : resolveGeminiReviewModel(),
|
|
829
|
+
workerToolsAvailable: isMaxProfile ? false : workerToolsEnabled(),
|
|
830
|
+
standInAvailable: isMaxProfile ? maxOpusModel() !== void 0 && standInToolEnabled({ maxProfile: true }) : standInToolEnabled(),
|
|
831
|
+
browseAvailable: isMaxProfile ? browseAgentEnabled() : browserToolsEnabled(),
|
|
832
|
+
browserToolsAvailable: browserToolsEnabled(),
|
|
833
|
+
compoundBrowseAvailable: isMaxProfile ? false : browserCompoundToolsEnabled(),
|
|
834
|
+
powerBrowseAvailable: isMaxProfile ? false : state.powerBrowseEnabled,
|
|
784
835
|
fleetAvailable: fleetToolsEnabled(),
|
|
785
836
|
agentToolsAvailable: agentToolsEnabled(),
|
|
786
837
|
...nativeAvailability,
|
|
@@ -789,9 +840,10 @@ const claude = defineCommand({
|
|
|
789
840
|
});
|
|
790
841
|
peerAwarenessSnippet = peerSnippet;
|
|
791
842
|
peerAwarenessSummary = buildPeerAwarenessSummary({
|
|
792
|
-
workerToolsAvailable: workerToolsEnabled(),
|
|
793
|
-
standInAvailable: standInToolEnabled(),
|
|
794
|
-
browseAvailable: browserToolsEnabled(),
|
|
843
|
+
workerToolsAvailable: isMaxProfile ? false : workerToolsEnabled(),
|
|
844
|
+
standInAvailable: isMaxProfile ? maxOpusModel() !== void 0 && standInToolEnabled({ maxProfile: true }) : standInToolEnabled(),
|
|
845
|
+
browseAvailable: isMaxProfile ? browseAgentEnabled() : browserToolsEnabled(),
|
|
846
|
+
browserToolsAvailable: browserToolsEnabled(),
|
|
795
847
|
fleetAvailable: fleetToolsEnabled(),
|
|
796
848
|
agentToolsAvailable: agentToolsEnabled(),
|
|
797
849
|
...nativeAvailability,
|
|
@@ -810,13 +862,13 @@ const claude = defineCommand({
|
|
|
810
862
|
consola.warn(`Style-directive CLAUDE.md prepend failed: ${err instanceof Error ? err.message : String(err)}`);
|
|
811
863
|
}
|
|
812
864
|
} catch (err) {
|
|
813
|
-
if (launchProfileId === "fast") {
|
|
865
|
+
if (launchProfileId === "fast" || launchProfileId === "max") {
|
|
814
866
|
if (fastLaunchId) unregisterLaunch(fastLaunchId);
|
|
815
867
|
await disposeFastRuntime().catch(() => {});
|
|
816
868
|
await server.close(true).catch(() => {});
|
|
817
869
|
await baseShutdown().catch(() => {});
|
|
818
870
|
resetFastRuntimeOwnership();
|
|
819
|
-
const message =
|
|
871
|
+
const message = `${launchProfileId === "fast" ? "Fast" : "Max"} profile wiring failed; refusing to launch an unguarded session: ${err instanceof Error ? err.message : String(err)}`;
|
|
820
872
|
consola.error(message);
|
|
821
873
|
process$1.stderr.write(`${message}\n`);
|
|
822
874
|
process$1.exit(1);
|
|
@@ -849,4 +901,4 @@ const claude = defineCommand({
|
|
|
849
901
|
//#endregion
|
|
850
902
|
export { claude };
|
|
851
903
|
|
|
852
|
-
//# sourceMappingURL=claude-
|
|
904
|
+
//# sourceMappingURL=claude-uRuzEH0W.js.map
|