github-router 0.3.289 → 0.3.293
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-Cmz2jt7P.js → attribution-settings-Dx8TBPE8.js} +124 -34
- package/dist/attribution-settings-Dx8TBPE8.js.map +1 -0
- package/dist/{auth-DG4vh8-F.js → auth-BwUHopJz.js} +3 -3
- package/dist/{auth-DG4vh8-F.js.map → auth-BwUHopJz.js.map} +1 -1
- package/dist/browser-ext/manifest.json +1 -1
- package/dist/{check-usage-BqN7mBYv.js → check-usage-BTda5753.js} +4 -4
- package/dist/{check-usage-BqN7mBYv.js.map → check-usage-BTda5753.js.map} +1 -1
- package/dist/{claude-C-9xFI4b.js → claude-BoAd_L2W.js} +118 -59
- package/dist/claude-BoAd_L2W.js.map +1 -0
- package/dist/{codex-DRW0yb8x.js → codex-BdJgGT6Q.js} +5 -5
- package/dist/{codex-DRW0yb8x.js.map → codex-BdJgGT6Q.js.map} +1 -1
- package/dist/{debug-B5TjPTTH.js → debug-B3UrZTHQ.js} +2 -2
- package/dist/{debug-B5TjPTTH.js.map → debug-B3UrZTHQ.js.map} +1 -1
- package/dist/engine-CK2b_cTt.js +2 -0
- package/dist/{gate-discovery-Cz6kwIVG.js → gate-discovery-C30rfnyo.js} +5 -5
- package/dist/{gate-discovery-Cz6kwIVG.js.map → gate-discovery-C30rfnyo.js.map} +1 -1
- package/dist/{get-copilot-usage-BjA0nyGR.js → get-copilot-usage-CRrf1ZSC.js} +2 -2
- package/dist/{get-copilot-usage-BjA0nyGR.js.map → get-copilot-usage-CRrf1ZSC.js.map} +1 -1
- package/dist/{internal-artifact-open-BskmUpnb.js → internal-artifact-open-BsEQRvDi.js} +2 -2
- package/dist/{internal-artifact-open-BskmUpnb.js.map → internal-artifact-open-BsEQRvDi.js.map} +1 -1
- package/dist/{internal-first-mate-guard-5XEHMaqy.js → internal-first-mate-guard-CVFFJriA.js} +3 -3
- package/dist/{internal-first-mate-guard-5XEHMaqy.js.map → internal-first-mate-guard-CVFFJriA.js.map} +1 -1
- package/dist/{internal-first-mate-guard-DHDQ6hFz.js → internal-first-mate-guard-DJdX6t48.js} +1 -1
- package/dist/{internal-plan-review-BUuMx4ku.js → internal-plan-review-8TKDLco6.js} +3 -3
- package/dist/{internal-plan-review-BUuMx4ku.js.map → internal-plan-review-8TKDLco6.js.map} +1 -1
- package/dist/{internal-prompt-submit-CQQ15xdO.js → internal-prompt-submit-Da7pxqua.js} +4 -4
- package/dist/{internal-prompt-submit-CQQ15xdO.js.map → internal-prompt-submit-Da7pxqua.js.map} +1 -1
- package/dist/{internal-session-bind-D04W2yWI.js → internal-session-bind-BOFytA1f.js} +2 -2
- package/dist/{internal-session-bind-D04W2yWI.js.map → internal-session-bind-BOFytA1f.js.map} +1 -1
- package/dist/{internal-stop-hook-Dvkppwo7.js → internal-stop-hook-OnfK3BxE.js} +5 -5
- package/dist/{internal-stop-hook-Dvkppwo7.js.map → internal-stop-hook-OnfK3BxE.js.map} +1 -1
- package/dist/{internal-stop-review-CdByyJLc.js → internal-stop-review-CdouacHL.js} +2 -2
- package/dist/{internal-stop-review-CdByyJLc.js.map → internal-stop-review-CdouacHL.js.map} +1 -1
- package/dist/{internal-worker-guard-BIPN6Rv9.js → internal-worker-guard-Bx-itoP8.js} +2 -2
- package/dist/{internal-worker-guard-BIPN6Rv9.js.map → internal-worker-guard-Bx-itoP8.js.map} +1 -1
- package/dist/{internal-workspace-header-BKqejstG.js → internal-workspace-header-8WT0iB5K.js} +2 -2
- package/dist/{internal-workspace-header-BKqejstG.js.map → internal-workspace-header-8WT0iB5K.js.map} +1 -1
- package/dist/lifecycle-C8fOsQke.js +2 -0
- package/dist/lifecycle-D4Yc1aap.js +2 -0
- package/dist/{lifecycle-SXaWssN9.js → lifecycle-LeSfa7wH.js} +2 -2
- package/dist/{lifecycle-SXaWssN9.js.map → lifecycle-LeSfa7wH.js.map} +1 -1
- package/dist/{lifecycle-DbM29FLK.js → lifecycle-nuOHfwgj.js} +2 -2
- package/dist/{lifecycle-DbM29FLK.js.map → lifecycle-nuOHfwgj.js.map} +1 -1
- package/dist/main.js +17 -17
- package/dist/{mcp-workspace-header-DRCCWlOi.js → mcp-workspace-header-q34H_4wL.js} +2 -2
- package/dist/{mcp-workspace-header-DRCCWlOi.js.map → mcp-workspace-header-q34H_4wL.js.map} +1 -1
- package/dist/{models-Dz8d_SnI.js → models-hhJcrZhr.js} +3 -3
- package/dist/{models-Dz8d_SnI.js.map → models-hhJcrZhr.js.map} +1 -1
- package/dist/{orchestration-BrJwZxMN.js → orchestration-pzbrKkgD.js} +2 -2
- package/dist/{orchestration-BrJwZxMN.js.map → orchestration-pzbrKkgD.js.map} +1 -1
- package/dist/{paths-D7_SAaIQ.js → paths-BH4J7slC.js} +4 -4
- package/dist/{paths-D7_SAaIQ.js.map → paths-BH4J7slC.js.map} +1 -1
- package/dist/paths-DJZoXfAS.js +2 -0
- package/dist/{peer-mcp-personas-Bd56EmiO.js → peer-mcp-personas-DhI7ZPSx.js} +569 -136
- package/dist/peer-mcp-personas-DhI7ZPSx.js.map +1 -0
- package/dist/{plan-review-hook-CVZsG9MZ.js → plan-review-hook-CfcanA7_.js} +3 -3
- package/dist/{plan-review-hook-CVZsG9MZ.js.map → plan-review-hook-CfcanA7_.js.map} +1 -1
- package/dist/{prompt-submit-hook-BW92FX2D.js → prompt-submit-hook-Bqf9ORgb.js} +3 -3
- package/dist/{prompt-submit-hook-BW92FX2D.js.map → prompt-submit-hook-Bqf9ORgb.js.map} +1 -1
- package/dist/{provision-B53wbHwa.js → provision-CZJ4EWls.js} +4 -4
- package/dist/{provision-B53wbHwa.js.map → provision-CZJ4EWls.js.map} +1 -1
- package/dist/{self-invocation-CP_SOkrr.js → self-invocation-DhO1Z8iD.js} +2 -2
- package/dist/{self-invocation-CP_SOkrr.js.map → self-invocation-DhO1Z8iD.js.map} +1 -1
- package/dist/{serve-aZCEYFe5.js → serve-RxWYzoOl.js} +12 -12
- package/dist/{serve-aZCEYFe5.js.map → serve-RxWYzoOl.js.map} +1 -1
- package/dist/{server-setup-DlztZAGT.js → server-setup-DbvbW5Ve.js} +627 -85
- package/dist/server-setup-DbvbW5Ve.js.map +1 -0
- package/dist/{start-DwNiXv5N.js → start-BNcGsXsY.js} +3 -3
- package/dist/{start-DwNiXv5N.js.map → start-BNcGsXsY.js.map} +1 -1
- package/dist/{stop-gate-hook-DriRc9xN.js → stop-gate-hook-BiBp5aGm.js} +3 -3
- package/dist/{stop-gate-hook-DriRc9xN.js.map → stop-gate-hook-BiBp5aGm.js.map} +1 -1
- package/dist/{stop-gate-policy-DMPanpoR.js → stop-gate-policy-BGd6b5hR.js} +2 -2
- package/dist/{stop-gate-policy-DMPanpoR.js.map → stop-gate-policy-BGd6b5hR.js.map} +1 -1
- package/dist/{token-BGCjZwtj.js → token-8drORhXg.js} +33 -3
- package/dist/token-8drORhXg.js.map +1 -0
- package/dist/{worker-dispatch-BCTMyNE-.js → worker-dispatch-D5fGroNr.js} +2 -2
- package/dist/{worker-dispatch-BCTMyNE-.js.map → worker-dispatch-D5fGroNr.js.map} +1 -1
- package/package.json +1 -1
- package/dist/attribution-settings-Cmz2jt7P.js.map +0 -1
- package/dist/claude-C-9xFI4b.js.map +0 -1
- package/dist/engine-iEqGdx6T.js +0 -2
- package/dist/lifecycle-BTodQvn4.js +0 -2
- package/dist/lifecycle-C7JYNz-F.js +0 -2
- package/dist/paths-CTr59UC6.js +0 -2
- package/dist/peer-mcp-personas-Bd56EmiO.js.map +0 -1
- package/dist/server-setup-DlztZAGT.js.map +0 -1
- package/dist/token-BGCjZwtj.js.map +0 -1
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { i as ensurePaths, t as PATHS } from "./paths-
|
|
2
|
-
import { A as state, r as setupGitHubToken } from "./token-
|
|
1
|
+
import { i as ensurePaths, t as PATHS } from "./paths-BH4J7slC.js";
|
|
2
|
+
import { A as state, r as setupGitHubToken } from "./token-8drORhXg.js";
|
|
3
3
|
import { defineCommand } from "citty";
|
|
4
4
|
import consola from "consola";
|
|
5
5
|
//#region src/auth.ts
|
|
@@ -41,4 +41,4 @@ const auth = defineCommand({
|
|
|
41
41
|
//#endregion
|
|
42
42
|
export { auth };
|
|
43
43
|
|
|
44
|
-
//# sourceMappingURL=auth-
|
|
44
|
+
//# sourceMappingURL=auth-BwUHopJz.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"auth-
|
|
1
|
+
{"version":3,"file":"auth-BwUHopJz.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.293",
|
|
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-BH4J7slC.js";
|
|
2
|
+
import { r as setupGitHubToken } from "./token-8drORhXg.js";
|
|
3
|
+
import { t as getCopilotUsage } from "./get-copilot-usage-CRrf1ZSC.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-BTda5753.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"check-usage-
|
|
1
|
+
{"version":3,"file":"check-usage-BTda5753.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,20 +1,20 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { o as removeOwnClaudeConfigMirror, r as ensureClaudeConfigMirror, t as PATHS, u as writeArtifactCredsToMirror } from "./paths-
|
|
3
|
-
import { A as state, d as resolveModel } from "./token-
|
|
1
|
+
import { Ct as resolveGeminiReviewModel, Dt as scribeModel, E as toolbeltEnabled, Et as scoutModel, Ft as registerLaunch, It as unregisterLaunch, Jt as colbertDegradedWarning, Kt as provisionBrowserAssets, Ot as standInToolEnabled, Qt as warmTreeSitterPool, St as nativeSubagentModel, T as buildToolbeltAwareness, Tt as reviewerModel, Yt as provisionAndIndexColbert, _t as fastScoutModel, at as FAST_REVIEWER_EFFORT, bt as generalPurposeFastModel, ct as artifactToolsEnabled, dt as browserCompoundToolsEnabled, ft as browserToolsEnabled, gn as resolveLeadSlugArg, gt as fastReviewerModel, hn as pickClaudeDefault, ht as fastPlannerModel, it as FAST_PLANNER_EFFORT, kt as workerToolsEnabled, lt as brainstormModel, mn as isBudgetClaudeLead, mt as fastOracleModel, nn as shouldUseInsecureTls, o as buildPeerAwarenessSnippet, ot as FAST_SCOUT_EFFORT, pt as fastImplementerModel, r as agentNamesForToolAllowlist, s as buildPeerAwarenessSummary, sn as DEFAULT_CLAUDE_MODEL_FALLBACKS, st as agentToolsEnabled, ut as browseAgentEnabled, vt as fleetToolsEnabled, w as availableToolCommands, wt as reviewerFastModel, xt as implementerFastModel, yt as geminiAvailable } from "./peer-mcp-personas-DhI7ZPSx.js";
|
|
2
|
+
import { o as removeOwnClaudeConfigMirror, r as ensureClaudeConfigMirror, t as PATHS, u as writeArtifactCredsToMirror } from "./paths-BH4J7slC.js";
|
|
3
|
+
import { A as state, d as resolveModel } from "./token-8drORhXg.js";
|
|
4
4
|
import { r as parseBoolEnv } from "./exec-y8C_MU8A.js";
|
|
5
|
-
import { a as sharedServerArgs, c as
|
|
6
|
-
import { n as hookLauncherDegradedWarning, r as resolveSelfInvocation } from "./self-invocation-
|
|
7
|
-
import { i as launchChild, r as getCodexVersion, t as provisionToolbelt } from "./provision-
|
|
8
|
-
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-
|
|
9
|
-
import { t as liveExec } from "./orchestration-
|
|
10
|
-
import { c as repoRoot, d as trustRepo, l as stopGateEnabledForRepo, s as repoFingerprint, t as fileBaselineStore } from "./stop-gate-policy-
|
|
11
|
-
import { l as guardToolMatcher, n as activeDispatchModes, r as buildWorkerGuardHookCommand } from "./worker-dispatch-
|
|
12
|
-
import { _ as injectPeerMcpIntoMirror, a as appendPeerAwarenessToMirroredClaudeMd, b as workersKeyOf, c as prependArtifactPanelDirectiveToMirroredClaudeMd, i as OPERATING_DEFAULTS_DIGEST, l as prependOperatingDefaultsToMirroredClaudeMd, m as planModeAllowRules, n as INJECTED_SKILLS, o as appendToolbeltAwarenessToMirroredClaudeMd, p as injectAllowRules, r as writeInjectedSkill, s as buildOperatingDefaultsDirective, t as injectAttributionSuppressionIntoSettingsFile, u as prependStyleDirectiveToMirroredClaudeMd, v as resolveCodexCliBackend, x as writePeerMcpRuntimeFiles, y as resolveGroupKeysFromMirror } from "./attribution-settings-
|
|
5
|
+
import { _ as validateFastProfilePrerequisites, a as sharedServerArgs, b as updateClaude, c as stopKeepAwake, d as LUNA_DRIVER_ALIAS_ID, g as resolveLaunchProfile, h as profileDescriptor, i as setupAndServe, l as listModelsForEndpoint, m as formatFastPrerequisiteFailure, o as LAUNCH_SECRET_HEADER, r as parseSharedArgs, s as startKeepAwake, t as getClaudeCodeEnvVars, u as enableFileLogging, v as runSelfUpdate, y as checkClaudeVersion } from "./server-setup-DbvbW5Ve.js";
|
|
6
|
+
import { n as hookLauncherDegradedWarning, r as resolveSelfInvocation } from "./self-invocation-DhO1Z8iD.js";
|
|
7
|
+
import { i as launchChild, r as getCodexVersion, t as provisionToolbelt } from "./provision-CZJ4EWls.js";
|
|
8
|
+
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-BiBp5aGm.js";
|
|
9
|
+
import { t as liveExec } from "./orchestration-pzbrKkgD.js";
|
|
10
|
+
import { c as repoRoot, d as trustRepo, l as stopGateEnabledForRepo, s as repoFingerprint, t as fileBaselineStore } from "./stop-gate-policy-BGd6b5hR.js";
|
|
11
|
+
import { l as guardToolMatcher, n as activeDispatchModes, r as buildWorkerGuardHookCommand } from "./worker-dispatch-D5fGroNr.js";
|
|
12
|
+
import { _ as injectPeerMcpIntoMirror, a as appendPeerAwarenessToMirroredClaudeMd, b as workersKeyOf, c as prependArtifactPanelDirectiveToMirroredClaudeMd, i as OPERATING_DEFAULTS_DIGEST, l as prependOperatingDefaultsToMirroredClaudeMd, m as planModeAllowRules, n as INJECTED_SKILLS, o as appendToolbeltAwarenessToMirroredClaudeMd, p as injectAllowRules, r as writeInjectedSkill, s as buildOperatingDefaultsDirective, t as injectAttributionSuppressionIntoSettingsFile, u as prependStyleDirectiveToMirroredClaudeMd, v as resolveCodexCliBackend, x as writePeerMcpRuntimeFiles, y as resolveGroupKeysFromMirror } from "./attribution-settings-Dx8TBPE8.js";
|
|
13
13
|
import { r as hookMcpRuntimeFromEnv } from "./hook-mcp-client-DBvm9608.js";
|
|
14
|
-
import { i as planReviewEnabled, t as buildPlanReviewHookCommand } from "./plan-review-hook-
|
|
15
|
-
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-
|
|
16
|
-
import { t as buildPromptSubmitHookCommand } from "./prompt-submit-hook-
|
|
17
|
-
import { i as assertShapingInstalled, n as buildFirstMateGuardHookCommand, t as FIRST_MATE_GUARD_MATCHER } from "./internal-first-mate-guard-
|
|
14
|
+
import { i as planReviewEnabled, t as buildPlanReviewHookCommand } from "./plan-review-hook-CfcanA7_.js";
|
|
15
|
+
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-C30rfnyo.js";
|
|
16
|
+
import { t as buildPromptSubmitHookCommand } from "./prompt-submit-hook-Bqf9ORgb.js";
|
|
17
|
+
import { i as assertShapingInstalled, n as buildFirstMateGuardHookCommand, t as FIRST_MATE_GUARD_MATCHER } from "./internal-first-mate-guard-CVFFJriA.js";
|
|
18
18
|
import { defineCommand } from "citty";
|
|
19
19
|
import consola from "consola";
|
|
20
20
|
import path from "node:path";
|
|
@@ -255,8 +255,19 @@ const claude = defineCommand({
|
|
|
255
255
|
}
|
|
256
256
|
enableFileLogging();
|
|
257
257
|
const usingDefault = !args.model?.trim();
|
|
258
|
-
|
|
259
|
-
|
|
258
|
+
const requestedSlug = resolveLeadSlugArg(args.model);
|
|
259
|
+
const launchProfileId = resolveLaunchProfile(args.model);
|
|
260
|
+
if (launchProfileId === "fast") {
|
|
261
|
+
const prereqCheck = validateFastProfilePrerequisites(state.models);
|
|
262
|
+
if (!prereqCheck.ok) {
|
|
263
|
+
const message = formatFastPrerequisiteFailure(prereqCheck.missing);
|
|
264
|
+
consola.error(message);
|
|
265
|
+
process.stderr.write(`${message}\n`);
|
|
266
|
+
process.exit(1);
|
|
267
|
+
}
|
|
268
|
+
}
|
|
269
|
+
let chosenSlug = launchProfileId === "fast" ? requestedSlug.endsWith("[1m]") ? `${LUNA_DRIVER_ALIAS_ID}[1m]` : LUNA_DRIVER_ALIAS_ID : requestedSlug;
|
|
270
|
+
let resolvedSlug = launchProfileId === "fast" ? resolveModel(requestedSlug) : resolveModel(chosenSlug);
|
|
260
271
|
if (usingDefault && state.models) {
|
|
261
272
|
const inCache = (slug) => state.models?.data.some((m) => m.id === resolveModel(slug)) ?? false;
|
|
262
273
|
if (!inCache(chosenSlug)) {
|
|
@@ -276,7 +287,7 @@ const claude = defineCommand({
|
|
|
276
287
|
}
|
|
277
288
|
const banner = chosenSlug === resolvedSlug ? chosenSlug : `${chosenSlug} → ${resolvedSlug}`;
|
|
278
289
|
process.stderr.write(`Server ready on ${serverUrl}, launching Claude Code (${banner})...\n`);
|
|
279
|
-
const envVars = getClaudeCodeEnvVars(serverUrl, chosenSlug);
|
|
290
|
+
const envVars = getClaudeCodeEnvVars(serverUrl, chosenSlug, launchProfileId);
|
|
280
291
|
const extraArgs = collectChildPassthroughArgs(rawArgs, claudeArgs);
|
|
281
292
|
if (toolbeltEnabled()) {
|
|
282
293
|
provisionToolbelt().catch((err) => consola.debug("Toolbelt provisioning failed:", err));
|
|
@@ -301,7 +312,13 @@ const claude = defineCommand({
|
|
|
301
312
|
let onShutdown = baseShutdown;
|
|
302
313
|
let peerAwarenessSnippet;
|
|
303
314
|
let peerAwarenessSummary;
|
|
304
|
-
|
|
315
|
+
let fastRuntimeWired = launchProfileId !== "fast";
|
|
316
|
+
const nativeAgentModels = launchProfileId === "fast" ? {
|
|
317
|
+
scout: fastScoutModel(),
|
|
318
|
+
implementer: fastImplementerModel(),
|
|
319
|
+
reviewer: fastReviewerModel(),
|
|
320
|
+
planner: fastPlannerModel()
|
|
321
|
+
} : {
|
|
305
322
|
implementer: nativeSubagentModel(),
|
|
306
323
|
"implementer-fast": implementerFastModel(),
|
|
307
324
|
reviewer: reviewerModel(),
|
|
@@ -316,7 +333,8 @@ const claude = defineCommand({
|
|
|
316
333
|
implementerFastAvailable: nativeAgentModels["implementer-fast"] != null,
|
|
317
334
|
reviewerFastAvailable: nativeAgentModels["reviewer-fast"] != null,
|
|
318
335
|
generalPurposeFastAvailable: nativeAgentModels["general-purpose-fast"] != null,
|
|
319
|
-
budgetLead: isBudgetClaudeLead(chosenSlug)
|
|
336
|
+
budgetLead: isBudgetClaudeLead(chosenSlug),
|
|
337
|
+
profile: launchProfileId
|
|
320
338
|
};
|
|
321
339
|
const codexMcpEnabled = args["codex-mcp"] !== false;
|
|
322
340
|
const selfInvocation = await resolveSelfInvocation();
|
|
@@ -326,31 +344,36 @@ const claude = defineCommand({
|
|
|
326
344
|
}
|
|
327
345
|
if (codexMcpEnabled) try {
|
|
328
346
|
const requestedCli = args["codex-cli"] ?? false;
|
|
329
|
-
const
|
|
347
|
+
const isFastProfile = launchProfileId === "fast";
|
|
348
|
+
if (isFastProfile && requestedCli) process.stderr.write("Fast profile uses its fixed HTTP MCP surface; ignoring --codex-cli.\n");
|
|
349
|
+
const backend = isFastProfile ? "http" : resolveCodexCliBackend({
|
|
330
350
|
requested: requestedCli,
|
|
331
351
|
codexInfo: requestedCli ? getCodexVersion() : null
|
|
332
352
|
});
|
|
333
353
|
const geminiModelsAvailable = geminiAvailable();
|
|
334
354
|
if (!geminiModelsAvailable) consola.info("gemini-3.1-pro-preview not found in your Copilot model catalog; gemini-critic persona will not be registered.");
|
|
335
|
-
const
|
|
355
|
+
const fastDescriptor = profileDescriptor(launchProfileId);
|
|
356
|
+
const baseGroups = [
|
|
336
357
|
"peers",
|
|
337
358
|
"search",
|
|
338
359
|
"orchestrate"
|
|
339
360
|
];
|
|
340
|
-
if (workerToolsEnabled())
|
|
341
|
-
|
|
342
|
-
if (
|
|
343
|
-
if (
|
|
344
|
-
if (
|
|
361
|
+
if (workerToolsEnabled()) baseGroups.push("workers");
|
|
362
|
+
const enabledGroups = fastDescriptor.allowedGroups ? baseGroups.filter((g) => fastDescriptor.allowedGroups.has(g)) : baseGroups;
|
|
363
|
+
if (!isFastProfile && standInToolEnabled()) enabledGroups.push("decide");
|
|
364
|
+
if (browserToolsEnabled() && (!fastDescriptor.allowedGroups || fastDescriptor.allowedGroups.has("browser"))) enabledGroups.push("browser");
|
|
365
|
+
if (!isFastProfile && fleetToolsEnabled()) enabledGroups.push("fleet");
|
|
366
|
+
if (!isFastProfile && agentToolsEnabled()) enabledGroups.push("first-mate");
|
|
345
367
|
const { keys: groupKeys, skipped: skippedGroups } = await resolveGroupKeysFromMirror(enabledGroups);
|
|
368
|
+
if (isFastProfile && fastOracleModel() == null) throw new Error("fast profile prerequisite drift: exact claude-opus-5 Oracle no longer resolves");
|
|
346
369
|
const runtime = await writePeerMcpRuntimeFiles(serverUrl, {
|
|
347
370
|
codexCli: backend === "cli",
|
|
348
371
|
selfInvocation,
|
|
349
372
|
geminiAvailable: geminiModelsAvailable,
|
|
350
373
|
geminiModel: resolveGeminiReviewModel(),
|
|
351
374
|
groupKeys,
|
|
352
|
-
workerToolsAvailable: workerToolsEnabled(),
|
|
353
|
-
browseAvailable: browseAgentEnabled(),
|
|
375
|
+
workerToolsAvailable: !isFastProfile && workerToolsEnabled(),
|
|
376
|
+
browseAvailable: !isFastProfile && browseAgentEnabled(),
|
|
354
377
|
nativeSubagentModel: nativeAgentModels.implementer,
|
|
355
378
|
reviewerModel: nativeAgentModels.reviewer,
|
|
356
379
|
reviewerFastModel: nativeAgentModels["reviewer-fast"],
|
|
@@ -358,34 +381,65 @@ const claude = defineCommand({
|
|
|
358
381
|
scoutModel: nativeAgentModels.scout,
|
|
359
382
|
scribeModel: nativeAgentModels.scribe,
|
|
360
383
|
implementerFastModel: nativeAgentModels["implementer-fast"],
|
|
361
|
-
generalPurposeFastModel: nativeAgentModels["general-purpose-fast"]
|
|
384
|
+
generalPurposeFastModel: nativeAgentModels["general-purpose-fast"],
|
|
385
|
+
nativeRoster: fastDescriptor.nativeRoster,
|
|
386
|
+
personaAllowlist: isFastProfile ? void 0 : fastDescriptor.personaAllowlist ? agentNamesForToolAllowlist(fastDescriptor.personaAllowlist) : void 0,
|
|
387
|
+
includeCoordinator: fastDescriptor.hasCoordinator,
|
|
388
|
+
...isFastProfile ? {
|
|
389
|
+
fastProfile: true,
|
|
390
|
+
plannerModel: nativeAgentModels.planner,
|
|
391
|
+
scoutEffort: FAST_SCOUT_EFFORT,
|
|
392
|
+
implementerEffort: "max",
|
|
393
|
+
reviewerEffort: FAST_REVIEWER_EFFORT,
|
|
394
|
+
plannerEffort: FAST_PLANNER_EFFORT
|
|
395
|
+
} : {}
|
|
362
396
|
});
|
|
363
|
-
|
|
397
|
+
fastRuntimeWired = true;
|
|
398
|
+
const launchSecret = randomBytes(32).toString("hex");
|
|
399
|
+
const launchEntry = registerLaunch({
|
|
400
|
+
profileId: launchProfileId,
|
|
401
|
+
nonce: runtime.nonce,
|
|
402
|
+
secret: launchSecret,
|
|
403
|
+
allowedGroups: fastDescriptor.allowedGroups,
|
|
404
|
+
allowedPersonas: fastDescriptor.personaAllowlist
|
|
405
|
+
});
|
|
406
|
+
envVars.ANTHROPIC_CUSTOM_HEADERS = envVars.ANTHROPIC_CUSTOM_HEADERS ? `${envVars.ANTHROPIC_CUSTOM_HEADERS}\n${LAUNCH_SECRET_HEADER}: ${launchSecret}` : `${LAUNCH_SECRET_HEADER}: ${launchSecret}`;
|
|
364
407
|
envVars.GH_ROUTER_HOOK_MCP_URL = serverUrl;
|
|
365
408
|
envVars.GH_ROUTER_HOOK_NONCE = runtime.nonce;
|
|
366
409
|
onShutdown = async () => {
|
|
410
|
+
unregisterLaunch(launchEntry.launchId);
|
|
367
411
|
await runtime.cleanup();
|
|
368
412
|
await baseShutdown();
|
|
369
413
|
};
|
|
370
|
-
|
|
371
|
-
|
|
372
|
-
|
|
373
|
-
geminiAvailable: geminiModelsAvailable,
|
|
374
|
-
groupKeys,
|
|
375
|
-
nonce: runtime.nonce
|
|
376
|
-
});
|
|
377
|
-
if (!injected.ok) {
|
|
414
|
+
let subagentVisibility;
|
|
415
|
+
let injected;
|
|
416
|
+
if (isFastProfile) {
|
|
378
417
|
extraArgs.push("--mcp-config", runtime.mcpConfigPath);
|
|
379
418
|
if (args["codex-mcp-only"] === true) extraArgs.push("--strict-mcp-config");
|
|
380
|
-
|
|
419
|
+
subagentVisibility = "role-scoped (lead via --mcp-config; subagents via inline mcpServers)";
|
|
420
|
+
} else {
|
|
421
|
+
injected = await injectPeerMcpIntoMirror(serverUrl, {
|
|
422
|
+
codexCli: backend === "cli",
|
|
423
|
+
selfInvocation,
|
|
424
|
+
geminiAvailable: geminiModelsAvailable,
|
|
425
|
+
groupKeys,
|
|
426
|
+
nonce: runtime.nonce
|
|
427
|
+
});
|
|
428
|
+
if (!injected.ok) {
|
|
429
|
+
extraArgs.push("--mcp-config", runtime.mcpConfigPath);
|
|
430
|
+
if (args["codex-mcp-only"] === true) extraArgs.push("--strict-mcp-config");
|
|
431
|
+
} else if (args["codex-mcp-only"] === true) consola.warn("--codex-mcp-only has no effect when peer MCP is wired via the mirrored .claude.json (the user's existing user-scope MCPs in the snapshot are still visible). Pass --no-codex-mcp to skip peer-MCP wiring entirely.");
|
|
432
|
+
subagentVisibility = injected.ok ? `subagent-visible (mirrored mcpServers: [${injected.serversAdded.join(", ")}])` : `subagent-INVISIBLE (collision on user-side mcpServers: [${injected.conflictingServers.join(", ")}]; parent-only via --mcp-config)`;
|
|
433
|
+
}
|
|
381
434
|
const personaNames = runtime.personas.map((p) => p.agentName).join(", ");
|
|
382
|
-
const subagentVisibility = injected.ok ? `subagent-visible (mirrored mcpServers: [${injected.serversAdded.join(", ")}])` : `subagent-INVISIBLE (collision on user-side mcpServers: [${injected.conflictingServers.join(", ")}]; parent-only via --mcp-config)`;
|
|
383
435
|
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).` : "";
|
|
384
436
|
process.stderr.write(`Peer MCP wired (backend=${backend}, personas=[${personaNames}], subagent .md files=${runtime.agentMdPaths.length}, ${subagentVisibility}).${skippedNote}\n`);
|
|
385
437
|
const sessionCwd = process.cwd();
|
|
386
|
-
|
|
387
|
-
|
|
388
|
-
|
|
438
|
+
const workerSkillsActive = workerToolsEnabled() && !isFastProfile;
|
|
439
|
+
let skillsWritten = 0;
|
|
440
|
+
let skillsToWrite = [];
|
|
441
|
+
if (workerSkillsActive) {
|
|
442
|
+
skillsToWrite = INJECTED_SKILLS.filter((s) => !isFirstMateSkillName(s.name) || agentToolsEnabled());
|
|
389
443
|
for (const s of skillsToWrite) if ((await writeInjectedSkill(s.name, s.md).catch(() => ({ written: false }))).written) skillsWritten++;
|
|
390
444
|
try {
|
|
391
445
|
const settingsPath = path.join(PATHS.CLAUDE_CONFIG_DIR, "settings.json");
|
|
@@ -394,15 +448,17 @@ const claude = defineCommand({
|
|
|
394
448
|
} catch (err) {
|
|
395
449
|
consola.warn(`Could not register the UserPromptSubmit hook: ${String(err)}`);
|
|
396
450
|
}
|
|
397
|
-
|
|
398
|
-
|
|
399
|
-
|
|
400
|
-
|
|
401
|
-
|
|
402
|
-
|
|
403
|
-
|
|
404
|
-
}
|
|
405
|
-
|
|
451
|
+
}
|
|
452
|
+
try {
|
|
453
|
+
const settingsPath = path.join(PATHS.CLAUDE_CONFIG_DIR, "settings.json");
|
|
454
|
+
const injectedServerKeys = injected?.ok ? injected.serversAdded : [...Object.values(groupKeys).filter((k) => Boolean(k)), ...backend === "cli" ? ["codex-cli"] : []];
|
|
455
|
+
const res = await injectAllowRules(settingsPath, planModeAllowRules(injectedServerKeys));
|
|
456
|
+
if (res.added.length) consola.debug(`Auto-approved for plan mode: ${res.added.join(", ")}`);
|
|
457
|
+
} catch (err) {
|
|
458
|
+
consola.warn(`Could not auto-approve injected tools: ${String(err)}`);
|
|
459
|
+
}
|
|
460
|
+
if (workerSkillsActive) {
|
|
461
|
+
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.");
|
|
406
462
|
else if (process.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.");
|
|
407
463
|
else try {
|
|
408
464
|
const settingsPath = path.join(PATHS.CLAUDE_CONFIG_DIR, "settings.json");
|
|
@@ -448,7 +504,7 @@ const claude = defineCommand({
|
|
|
448
504
|
} catch (err) {
|
|
449
505
|
consola.warn(`Artifact-panel directive prepend failed: ${String(err)}`);
|
|
450
506
|
}
|
|
451
|
-
try {
|
|
507
|
+
if (!isFastProfile) try {
|
|
452
508
|
await writeArtifactCredsToMirror(shouldUseInsecureTls(process.env.AIORDIE_BASE_URL ?? ""));
|
|
453
509
|
const settingsPath = path.join(PATHS.CLAUDE_CONFIG_DIR, "settings.json");
|
|
454
510
|
const cmd = buildArtifactOpenHookCommand(selfInvocation);
|
|
@@ -457,20 +513,20 @@ const claude = defineCommand({
|
|
|
457
513
|
consola.warn(`Could not register the artifact auto-open hook: ${String(err)}`);
|
|
458
514
|
}
|
|
459
515
|
}
|
|
460
|
-
if (hookMcpRuntimeFromEnv(envVars) && planReviewEnabled()) try {
|
|
516
|
+
if (!isFastProfile && hookMcpRuntimeFromEnv(envVars) && planReviewEnabled()) try {
|
|
461
517
|
const settingsPath = path.join(PATHS.CLAUDE_CONFIG_DIR, "settings.json");
|
|
462
518
|
const command = buildPlanReviewHookCommand(selfInvocation);
|
|
463
519
|
await injectStopHookIntoSettingsFile(settingsPath, command, "PostToolUse", void 0, "ExitPlanMode");
|
|
464
520
|
} catch (err) {
|
|
465
521
|
consola.warn(`Could not register the advisory plan-review hook: ${String(err)}`);
|
|
466
522
|
}
|
|
467
|
-
if (args["trust-gate"] === true) try {
|
|
523
|
+
if (!isFastProfile && args["trust-gate"] === true) try {
|
|
468
524
|
const root = await trustRepo(sessionCwd);
|
|
469
525
|
process.stderr.write(`Structural gate trusted for this repo (${root}); it will run on launch here from now on.\n`);
|
|
470
526
|
} catch (err) {
|
|
471
527
|
consola.warn(`Could not record gate trust: ${String(err)}`);
|
|
472
528
|
}
|
|
473
|
-
const gateDisabled = stopGateDisabled(args);
|
|
529
|
+
const gateDisabled = isFastProfile || stopGateDisabled(args);
|
|
474
530
|
const forceEnabled = parseBoolEnv(process.env.GH_ROUTER_ENABLE_STOP_GATE) === true;
|
|
475
531
|
const includeTests = parseBoolEnv(process.env.GH_ROUTER_STOP_GATE_RUN_TESTS) === true;
|
|
476
532
|
const gateRoot = await repoRoot(sessionCwd).catch(() => sessionCwd);
|
|
@@ -605,7 +661,10 @@ const claude = defineCommand({
|
|
|
605
661
|
}
|
|
606
662
|
extraArgs.push("--append-system-prompt", peerAwarenessSnippet && peerAwarenessSummary ? `${OPERATING_DEFAULTS_DIGEST}\n\n${peerAwarenessSummary}` : OPERATING_DEFAULTS_DIGEST);
|
|
607
663
|
try {
|
|
608
|
-
await prependOperatingDefaultsToMirroredClaudeMd(buildOperatingDefaultsDirective(
|
|
664
|
+
await prependOperatingDefaultsToMirroredClaudeMd(buildOperatingDefaultsDirective({
|
|
665
|
+
...nativeAvailability,
|
|
666
|
+
fastRuntimeAvailable: fastRuntimeWired
|
|
667
|
+
}));
|
|
609
668
|
} catch (err) {
|
|
610
669
|
consola.warn(`Operating-defaults CLAUDE.md prepend failed: ${err instanceof Error ? err.message : String(err)}`);
|
|
611
670
|
}
|
|
@@ -626,4 +685,4 @@ const claude = defineCommand({
|
|
|
626
685
|
//#endregion
|
|
627
686
|
export { claude };
|
|
628
687
|
|
|
629
|
-
//# sourceMappingURL=claude-
|
|
688
|
+
//# sourceMappingURL=claude-BoAd_L2W.js.map
|