github-router 0.3.316 → 0.3.318
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/{aic-ledger-BS47yb_C.js → aic-ledger-DY03LbBM.js} +2 -2
- package/dist/{aic-ledger-BS47yb_C.js.map → aic-ledger-DY03LbBM.js.map} +1 -1
- package/dist/{attribution-settings-jcsSeVur.js → attribution-settings-CyyOsjPF.js} +39 -28
- package/dist/attribution-settings-CyyOsjPF.js.map +1 -0
- package/dist/{auth-JfxL9q7z.js → auth-Iun7ftd8.js} +3 -3
- package/dist/{auth-JfxL9q7z.js.map → auth-Iun7ftd8.js.map} +1 -1
- package/dist/browser-ext/manifest.json +1 -1
- package/dist/{check-usage-DXUEQzt_.js → check-usage-1c-0z3iy.js} +4 -4
- package/dist/{check-usage-DXUEQzt_.js.map → check-usage-1c-0z3iy.js.map} +1 -1
- package/dist/{claude-CJ4Nd2_3.js → claude-UhOOquJW.js} +92 -28
- package/dist/claude-UhOOquJW.js.map +1 -0
- package/dist/{codex-CwuLqNZF.js → codex-CyuVJFDZ.js} +5 -5
- package/dist/{codex-CwuLqNZF.js.map → codex-CyuVJFDZ.js.map} +1 -1
- package/dist/{copilot-discount-IbXR5A28.js → copilot-discount-C3jx9Q-o.js} +2 -2
- package/dist/{copilot-discount-IbXR5A28.js.map → copilot-discount-C3jx9Q-o.js.map} +1 -1
- package/dist/{debug-CA7pg8V9.js → debug-CDyXUPcC.js} +2 -2
- package/dist/{debug-CA7pg8V9.js.map → debug-CDyXUPcC.js.map} +1 -1
- package/dist/engine-D5GNXylB.js +2 -0
- package/dist/{gate-discovery-z04ywOzB.js → gate-discovery-B17pvgE0.js} +5 -5
- package/dist/{gate-discovery-z04ywOzB.js.map → gate-discovery-B17pvgE0.js.map} +1 -1
- package/dist/{get-copilot-usage-BMD_cJNT.js → get-copilot-usage-BWCAzmSc.js} +2 -2
- package/dist/{get-copilot-usage-BMD_cJNT.js.map → get-copilot-usage-BWCAzmSc.js.map} +1 -1
- package/dist/hooks.mjs +124 -117
- package/dist/hooks.sha256 +1 -1
- package/dist/{internal-aic-status-BN0xRLSF.js → internal-aic-status-BiblmImt.js} +13 -6
- package/dist/{internal-aic-status-BN0xRLSF.js.map → internal-aic-status-BiblmImt.js.map} +1 -1
- package/dist/{internal-artifact-open-B3stUu74.js → internal-artifact-open-CA1trJ15.js} +2 -2
- package/dist/{internal-artifact-open-B3stUu74.js.map → internal-artifact-open-CA1trJ15.js.map} +1 -1
- package/dist/{internal-fast-dispatch-guard-CAwYj_Yz.js → internal-fast-dispatch-guard-CZ4BZuAG.js} +2 -2
- package/dist/{internal-fast-dispatch-guard-CAwYj_Yz.js.map → internal-fast-dispatch-guard-CZ4BZuAG.js.map} +1 -1
- package/dist/{internal-fast-dispatch-guard-2QjUlhqO.js → internal-fast-dispatch-guard-D5kozMpo.js} +1 -1
- package/dist/{internal-first-mate-guard-VgnHBp0s.js → internal-first-mate-guard-B_or0eN3.js} +1 -1
- package/dist/{internal-first-mate-guard-B0rbLb0L.js → internal-first-mate-guard-CiFH6X1H.js} +3 -3
- package/dist/{internal-first-mate-guard-B0rbLb0L.js.map → internal-first-mate-guard-CiFH6X1H.js.map} +1 -1
- package/dist/{internal-max-dispatch-guard-Bz7a2Ntf.js → internal-max-dispatch-guard-BGOHRYRt.js} +1 -1
- package/dist/{internal-max-dispatch-guard-BNqQ2wMc.js → internal-max-dispatch-guard-CnBZxo5l.js} +2 -2
- package/dist/{internal-max-dispatch-guard-BNqQ2wMc.js.map → internal-max-dispatch-guard-CnBZxo5l.js.map} +1 -1
- package/dist/{internal-plan-review-QUvNZmMR.js → internal-plan-review-C73snnD8.js} +3 -3
- package/dist/{internal-plan-review-QUvNZmMR.js.map → internal-plan-review-C73snnD8.js.map} +1 -1
- package/dist/{internal-prompt-submit-fj5ccft_.js → internal-prompt-submit-dov4UvBo.js} +4 -4
- package/dist/{internal-prompt-submit-fj5ccft_.js.map → internal-prompt-submit-dov4UvBo.js.map} +1 -1
- package/dist/{internal-session-bind-0Hmak8PR.js → internal-session-bind-C3hrb9rP.js} +2 -2
- package/dist/{internal-session-bind-0Hmak8PR.js.map → internal-session-bind-C3hrb9rP.js.map} +1 -1
- package/dist/{internal-stop-hook-UN1JHtjj.js → internal-stop-hook-DZ6CCP4C.js} +5 -5
- package/dist/{internal-stop-hook-UN1JHtjj.js.map → internal-stop-hook-DZ6CCP4C.js.map} +1 -1
- package/dist/{internal-stop-review-8v2llYDB.js → internal-stop-review-MBVYtrYS.js} +2 -2
- package/dist/{internal-stop-review-8v2llYDB.js.map → internal-stop-review-MBVYtrYS.js.map} +1 -1
- package/dist/{internal-worker-guard-BI4Pl0Ew.js → internal-worker-guard-dxGawAY3.js} +2 -2
- package/dist/{internal-worker-guard-BI4Pl0Ew.js.map → internal-worker-guard-dxGawAY3.js.map} +1 -1
- package/dist/{internal-workspace-header-kg9FoNXK.js → internal-workspace-header-_aEXOz5q.js} +2 -2
- package/dist/{internal-workspace-header-kg9FoNXK.js.map → internal-workspace-header-_aEXOz5q.js.map} +1 -1
- package/dist/{lifecycle-IwotwedG.js → lifecycle-CJB2BwSJ.js} +2 -2
- package/dist/{lifecycle-IwotwedG.js.map → lifecycle-CJB2BwSJ.js.map} +1 -1
- package/dist/lifecycle-D0KsoSqz.js +2 -0
- package/dist/lifecycle-DimEguJO.js +2 -0
- package/dist/{lifecycle-Cx1wVrLb.js → lifecycle-_BE0SnNs.js} +2 -2
- package/dist/{lifecycle-Cx1wVrLb.js.map → lifecycle-_BE0SnNs.js.map} +1 -1
- package/dist/main.js +20 -20
- package/dist/{mcp-workspace-header-BYgWioLH.js → mcp-workspace-header-mXRLE8kg.js} +2 -2
- package/dist/{mcp-workspace-header-BYgWioLH.js.map → mcp-workspace-header-mXRLE8kg.js.map} +1 -1
- package/dist/{models-CVzyU5mJ.js → models-CSFIVxAH.js} +3 -3
- package/dist/{models-CVzyU5mJ.js.map → models-CSFIVxAH.js.map} +1 -1
- package/dist/{orchestration-Dc3mO0G3.js → orchestration-B8kypXcZ.js} +2 -2
- package/dist/{orchestration-Dc3mO0G3.js.map → orchestration-B8kypXcZ.js.map} +1 -1
- package/dist/{paths-CMxlQEfQ.js → paths-CHBAj_t9.js} +36 -4
- package/dist/{paths-CMxlQEfQ.js.map → paths-CHBAj_t9.js.map} +1 -1
- package/dist/paths-eHoOwFzZ.js +2 -0
- package/dist/{peer-mcp-personas-CQ-0Piyr.js → peer-mcp-personas-CRMVuMVF.js} +37 -18
- package/dist/{peer-mcp-personas-CQ-0Piyr.js.map → peer-mcp-personas-CRMVuMVF.js.map} +1 -1
- package/dist/{plan-review-hook-BIMwWkh6.js → plan-review-hook-BMmw7wxR.js} +3 -3
- package/dist/{plan-review-hook-BIMwWkh6.js.map → plan-review-hook-BMmw7wxR.js.map} +1 -1
- package/dist/{prompt-submit-hook-BcFpjHXg.js → prompt-submit-hook-CGgT5m4Q.js} +3 -3
- package/dist/{prompt-submit-hook-BcFpjHXg.js.map → prompt-submit-hook-CGgT5m4Q.js.map} +1 -1
- package/dist/{provision-_R7ZMygj.js → provision-Bn8-NDp7.js} +4 -4
- package/dist/{provision-_R7ZMygj.js.map → provision-Bn8-NDp7.js.map} +1 -1
- package/dist/{self-invocation-cRl4RqfW.js → self-invocation-DahN1gw9.js} +2 -2
- package/dist/{self-invocation-cRl4RqfW.js.map → self-invocation-DahN1gw9.js.map} +1 -1
- package/dist/{serve-DU66K5kv.js → serve-B1yhiPls.js} +12 -12
- package/dist/{serve-DU66K5kv.js.map → serve-B1yhiPls.js.map} +1 -1
- package/dist/{server-setup-iLG8LrfL.js → server-setup-BOJCIEQi.js} +177 -49
- package/dist/server-setup-BOJCIEQi.js.map +1 -0
- package/dist/{start-DQTcm0o_.js → start-DxGJKVd_.js} +3 -3
- package/dist/{start-DQTcm0o_.js.map → start-DxGJKVd_.js.map} +1 -1
- package/dist/{stop-gate-hook-BUCxa5Kc.js → stop-gate-hook-D7N759TG.js} +72 -4
- package/dist/{stop-gate-hook-BUCxa5Kc.js.map → stop-gate-hook-D7N759TG.js.map} +1 -1
- package/dist/{stop-gate-policy--bpyxxXU.js → stop-gate-policy-C0gt04R0.js} +2 -2
- package/dist/{stop-gate-policy--bpyxxXU.js.map → stop-gate-policy-C0gt04R0.js.map} +1 -1
- package/dist/{token-C1gthnbV.js → token-86uk6y4P.js} +2 -2
- package/dist/{token-C1gthnbV.js.map → token-86uk6y4P.js.map} +1 -1
- package/dist/{worker-dispatch-DMIdrlsF.js → worker-dispatch-B-OA7tvU.js} +2 -2
- package/dist/{worker-dispatch-DMIdrlsF.js.map → worker-dispatch-B-OA7tvU.js.map} +1 -1
- package/package.json +1 -1
- package/dist/attribution-settings-jcsSeVur.js.map +0 -1
- package/dist/claude-CJ4Nd2_3.js.map +0 -1
- package/dist/engine-DwrxceOS.js +0 -2
- package/dist/lifecycle-BpqAyaAj.js +0 -2
- package/dist/lifecycle-CL2WiyeQ.js +0 -2
- package/dist/paths-BXXCVFvA.js +0 -2
- package/dist/server-setup-iLG8LrfL.js.map +0 -1
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { i as ensurePaths, t as PATHS } from "./paths-
|
|
1
|
+
import { i as ensurePaths, t as PATHS } from "./paths-CHBAj_t9.js";
|
|
2
2
|
import { t as state } from "./state-BlMpEFAt.js";
|
|
3
|
-
import { r as setupGitHubToken } from "./token-
|
|
3
|
+
import { r as setupGitHubToken } from "./token-86uk6y4P.js";
|
|
4
4
|
import { defineCommand } from "citty";
|
|
5
5
|
import consola from "consola";
|
|
6
6
|
//#region src/auth.ts
|
|
@@ -42,4 +42,4 @@ const auth = defineCommand({
|
|
|
42
42
|
//#endregion
|
|
43
43
|
export { auth };
|
|
44
44
|
|
|
45
|
-
//# sourceMappingURL=auth-
|
|
45
|
+
//# sourceMappingURL=auth-Iun7ftd8.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"auth-
|
|
1
|
+
{"version":3,"file":"auth-Iun7ftd8.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.318",
|
|
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-CHBAj_t9.js";
|
|
2
|
+
import { r as setupGitHubToken } from "./token-86uk6y4P.js";
|
|
3
|
+
import { t as getCopilotUsage } from "./get-copilot-usage-BWCAzmSc.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-1c-0z3iy.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"check-usage-
|
|
1
|
+
{"version":3,"file":"check-usage-1c-0z3iy.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,27 +1,27 @@
|
|
|
1
|
-
import { At as resolveGeminiReviewModel, Cn as isBudgetClaudeLead, Ct as fastReviewerModel, D as toolbeltEnabled, Dt as generalPurposeFastModel, E as buildToolbeltAwareness, Et as geminiAvailable, Ft as standInToolEnabled, Gt as unregisterLaunch, It as workerToolsEnabled, Ln as CHEAPEST_PROFILE_NATIVE_MODELS, Mt as reviewerModel, Nn as CHEAPEST_PROFILE_ADVISOR_CLIENT_MODEL, Nt as scoutModel, Ot as implementerFastModel, Pt as scribeModel, St as fastPlanModel, T as availableToolCommands, Tn as resolveLeadSlugArg, Tt as fleetToolsEnabled, Un as CHEAP_PROFILE_NATIVE_MODELS, Wt as registerLaunch, _t as fastAdvisorModel, at as agentToolsEnabled, bt as fastImplementerModel, ct as browseAgentEnabled, dn as shouldUseInsecureTls, dt as cheapAdvisorModel, ft as cheapOracleModel, gn as DEFAULT_CLAUDE_MODEL_FALLBACKS, gt as cheapestReviewerModel, ht as cheapestOracleModel, in as provisionAndIndexColbert, jt as reviewerFastModel, kt as nativeSubagentModel, lt as browserCompoundToolsEnabled, mt as cheapestAdvisorModel, o as buildPeerAwarenessSnippet, ot as artifactToolsEnabled, pt as cheapReviewerModel, r as agentNamesForToolAllowlist, rn as colbertDegradedWarning, s as buildPeerAwarenessSummary, sn as warmTreeSitterPool, st as brainstormModel, tn as provisionBrowserAssets, ut as browserToolsEnabled, vt as fastAstraModel, wn as pickClaudeDefault, wt as fastScoutModel, xt as fastOracleModel, yt as fastGeneralPurposeModel, zn as CHEAP_PROFILE_ADVISOR_CLIENT_MODEL } from "./peer-mcp-personas-
|
|
2
|
-
import { o as
|
|
1
|
+
import { At as resolveGeminiReviewModel, Cn as isBudgetClaudeLead, Ct as fastReviewerModel, D as toolbeltEnabled, Dt as generalPurposeFastModel, E as buildToolbeltAwareness, Et as geminiAvailable, Ft as standInToolEnabled, Gt as unregisterLaunch, It as workerToolsEnabled, Ln as CHEAPEST_PROFILE_NATIVE_MODELS, Mt as reviewerModel, Nn as CHEAPEST_PROFILE_ADVISOR_CLIENT_MODEL, Nt as scoutModel, Ot as implementerFastModel, Pt as scribeModel, St as fastPlanModel, T as availableToolCommands, Tn as resolveLeadSlugArg, Tt as fleetToolsEnabled, Un as CHEAP_PROFILE_NATIVE_MODELS, Wt as registerLaunch, _t as fastAdvisorModel, at as agentToolsEnabled, bt as fastImplementerModel, ct as browseAgentEnabled, dn as shouldUseInsecureTls, dt as cheapAdvisorModel, ft as cheapOracleModel, gn as DEFAULT_CLAUDE_MODEL_FALLBACKS, gt as cheapestReviewerModel, ht as cheapestOracleModel, in as provisionAndIndexColbert, jt as reviewerFastModel, kt as nativeSubagentModel, lt as browserCompoundToolsEnabled, mt as cheapestAdvisorModel, o as buildPeerAwarenessSnippet, ot as artifactToolsEnabled, pt as cheapReviewerModel, r as agentNamesForToolAllowlist, rn as colbertDegradedWarning, s as buildPeerAwarenessSummary, sn as warmTreeSitterPool, st as brainstormModel, tn as provisionBrowserAssets, ut as browserToolsEnabled, vt as fastAstraModel, wn as pickClaudeDefault, wt as fastScoutModel, xt as fastOracleModel, yt as fastGeneralPurposeModel, zn as CHEAP_PROFILE_ADVISOR_CLIENT_MODEL } from "./peer-mcp-personas-CRMVuMVF.js";
|
|
2
|
+
import { d as writeArtifactCredsToMirror, o as purgeNonRouterAgentsFromMirror, r as ensureClaudeConfigMirror, s as removeOwnClaudeConfigMirror, t as PATHS } from "./paths-CHBAj_t9.js";
|
|
3
3
|
import { t as state } from "./state-BlMpEFAt.js";
|
|
4
|
-
import { d as resolveModel } from "./token-
|
|
4
|
+
import { d as resolveModel } from "./token-86uk6y4P.js";
|
|
5
5
|
import { i as parseBoolEnv } from "./exec-COUT4QsS.js";
|
|
6
|
-
import {
|
|
6
|
+
import { A as validateCheapProfilePrerequisites, C as formatCheap1mPrerequisiteFailure, D as profileDescriptor, E as formatFastPrerequisiteFailure, F as checkClaudeVersion, I as updateClaude, M as validateFastProfilePrerequisites, N as validateMaxProfileLaunch, O as resolveLaunchProfile, P as runSelfUpdate, T as formatCheapestPrerequisiteFailure, a as sharedServerArgs, c as stopKeepAwake, d as enableFileLogging, i as setupAndServe, j as validateCheapestProfilePrerequisites, k as validateCheap1mProfilePrerequisites, l as injectModelPickerSettingsFile, o as LAUNCH_SECRET_HEADER, r as parseSharedArgs, s as startKeepAwake, t as getClaudeCodeEnvVars, u as listModelsForEndpoint, w as formatCheapPrerequisiteFailure } from "./server-setup-BOJCIEQi.js";
|
|
7
7
|
import { t as FAST_PROFILE_ADVISOR_CLIENT_MODEL } from "./fast-profile-contract-_DhIWank.js";
|
|
8
8
|
import { _ as maxReviewerModel, c as formatMaxPrerequisiteFailure, f as maxCodexReviewerModel, h as maxOpusModel, i as MAX_PROFILE_MODELS, m as maxGrokModel, o as MAX_PROFILE_NATIVE_EFFORTS, p as maxGeminiModel, v as maxSonnetModel } from "./max-profile-contract-Bl7I_EOC.js";
|
|
9
|
-
import { n as hookLauncherDegradedWarning, r as resolveSelfInvocation, t as buildSelfCommand } from "./self-invocation-
|
|
10
|
-
import { i as launchChild, r as getCodexVersion, t as provisionToolbelt } from "./provision-
|
|
11
|
-
import { a as formatAicExitSummary, l as removeAicLedgerFile, n as aicSnapshot, t as aicLedgerPath, u as sweepStaleAicLedgerFiles } from "./aic-ledger-
|
|
12
|
-
import { i as captureLaunchBaseline, l as
|
|
13
|
-
import { t as liveExec } from "./orchestration-
|
|
14
|
-
import { c as repoRoot, d as trustRepo, l as stopGateEnabledForRepo, s as repoFingerprint, t as fileBaselineStore } from "./stop-gate-policy
|
|
15
|
-
import { l as guardToolMatcher, n as activeDispatchModes, r as buildWorkerGuardHookCommand } from "./worker-dispatch-
|
|
16
|
-
import { C as writePeerMcpRuntimeFiles, S as workersKeyOf, a as appendPeerAwarenessToMirroredClaudeMd, b as resolveCodexCliBackend, c as buildOperatingDefaultsDirective, d as prependStyleDirectiveToMirroredClaudeMd, f as buildArtifactReviewSkill, g as planModeAllowRules, h as injectAllowRules, i as writeInjectedSkill, l as prependArtifactPanelDirectiveToMirroredClaudeMd, o as appendToolbeltAwarenessToMirroredClaudeMd, r as injectedSkillsForLaunch, s as buildOperatingDefaultsDigest, t as injectAttributionSuppressionIntoSettingsFile, u as prependOperatingDefaultsToMirroredClaudeMd, x as resolveGroupKeysFromMirror, y as injectPeerMcpIntoMirror } from "./attribution-settings-
|
|
9
|
+
import { n as hookLauncherDegradedWarning, r as resolveSelfInvocation, t as buildSelfCommand } from "./self-invocation-DahN1gw9.js";
|
|
10
|
+
import { i as launchChild, r as getCodexVersion, t as provisionToolbelt } from "./provision-Bn8-NDp7.js";
|
|
11
|
+
import { a as formatAicExitSummary, l as removeAicLedgerFile, n as aicSnapshot, t as aicLedgerPath, u as sweepStaleAicLedgerFiles } from "./aic-ledger-DY03LbBM.js";
|
|
12
|
+
import { d as stopGateId, i as captureLaunchBaseline, l as purgeNonRouterHooksForPinnedProfile, n as buildSessionBindHookCommand, r as buildStopHookCommand, s as injectStopHookIntoSettingsFile, t as buildArtifactOpenHookCommand, u as stopGateDisabled } from "./stop-gate-hook-D7N759TG.js";
|
|
13
|
+
import { t as liveExec } from "./orchestration-B8kypXcZ.js";
|
|
14
|
+
import { c as repoRoot, d as trustRepo, l as stopGateEnabledForRepo, s as repoFingerprint, t as fileBaselineStore } from "./stop-gate-policy-C0gt04R0.js";
|
|
15
|
+
import { l as guardToolMatcher, n as activeDispatchModes, r as buildWorkerGuardHookCommand } from "./worker-dispatch-B-OA7tvU.js";
|
|
16
|
+
import { C as writePeerMcpRuntimeFiles, S as workersKeyOf, a as appendPeerAwarenessToMirroredClaudeMd, b as resolveCodexCliBackend, c as buildOperatingDefaultsDirective, d as prependStyleDirectiveToMirroredClaudeMd, f as buildArtifactReviewSkill, g as planModeAllowRules, h as injectAllowRules, i as writeInjectedSkill, l as prependArtifactPanelDirectiveToMirroredClaudeMd, o as appendToolbeltAwarenessToMirroredClaudeMd, r as injectedSkillsForLaunch, s as buildOperatingDefaultsDigest, t as injectAttributionSuppressionIntoSettingsFile, u as prependOperatingDefaultsToMirroredClaudeMd, x as resolveGroupKeysFromMirror, y as injectPeerMcpIntoMirror } from "./attribution-settings-CyyOsjPF.js";
|
|
17
17
|
import { r as hookMcpRuntimeFromEnv } from "./hook-mcp-client-DBvm9608.js";
|
|
18
|
-
import { i as planReviewEnabled, t as buildPlanReviewHookCommand } from "./plan-review-hook-
|
|
19
|
-
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-
|
|
20
|
-
import { t as buildPromptSubmitHookCommand } from "./prompt-submit-hook-
|
|
21
|
-
import { i as assertShapingInstalled, n as buildFirstMateGuardHookCommand, t as FIRST_MATE_GUARD_MATCHER } from "./internal-first-mate-guard-
|
|
22
|
-
import { r as FAST_DISPATCH_TOOL_MATCHER, t as buildFastDispatchGuardHookCommand } from "./internal-fast-dispatch-guard-
|
|
23
|
-
import { i as assertMaxDispatchGuardInstalled, r as MAX_DISPATCH_TOOL_MATCHER, t as buildMaxDispatchGuardHookCommand } from "./internal-max-dispatch-guard-
|
|
24
|
-
import { n as formatDiscountedCostTable, t as discountedUsdForSnapshot } from "./copilot-discount-
|
|
18
|
+
import { i as planReviewEnabled, t as buildPlanReviewHookCommand } from "./plan-review-hook-BMmw7wxR.js";
|
|
19
|
+
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-B17pvgE0.js";
|
|
20
|
+
import { t as buildPromptSubmitHookCommand } from "./prompt-submit-hook-CGgT5m4Q.js";
|
|
21
|
+
import { i as assertShapingInstalled, n as buildFirstMateGuardHookCommand, t as FIRST_MATE_GUARD_MATCHER } from "./internal-first-mate-guard-CiFH6X1H.js";
|
|
22
|
+
import { r as FAST_DISPATCH_TOOL_MATCHER, t as buildFastDispatchGuardHookCommand } from "./internal-fast-dispatch-guard-CZ4BZuAG.js";
|
|
23
|
+
import { i as assertMaxDispatchGuardInstalled, r as MAX_DISPATCH_TOOL_MATCHER, t as buildMaxDispatchGuardHookCommand } from "./internal-max-dispatch-guard-CnBZxo5l.js";
|
|
24
|
+
import { n as formatDiscountedCostTable, t as discountedUsdForSnapshot } from "./copilot-discount-C3jx9Q-o.js";
|
|
25
25
|
import { defineCommand } from "citty";
|
|
26
26
|
import consola from "consola";
|
|
27
27
|
import path from "node:path";
|
|
@@ -57,12 +57,18 @@ function assertFastDispatchGuardInstalled(fastProfile, installationSucceeded) {
|
|
|
57
57
|
* same mirror mechanics work for concurrent launches. AIC is pinned: it
|
|
58
58
|
* renders even when the terminal is too narrow for any other segment.
|
|
59
59
|
*
|
|
60
|
-
*
|
|
61
|
-
* as a `{type:"command", command:string}`
|
|
62
|
-
*
|
|
63
|
-
*
|
|
64
|
-
*
|
|
65
|
-
* (`reason: "unrecognized"`) rather
|
|
60
|
+
* Standard launches use wrap-don't-clobber: when the user's own config
|
|
61
|
+
* already defines `statusLine` as a `{type:"command", command:string}`
|
|
62
|
+
* shape, that command is preserved via `GH_ROUTER_AIC_USER_STATUSLINE`
|
|
63
|
+
* (set by the caller from the returned `userCommand`) and the hook
|
|
64
|
+
* composes one line: `[AIC x.xx] <user line>`. Any other pre-existing
|
|
65
|
+
* `statusLine` shape is left untouched (`reason: "unrecognized"`) rather
|
|
66
|
+
* than risk breaking an exotic config.
|
|
67
|
+
*
|
|
68
|
+
* Pinned launches (fast/cheap/cheap1m/cheapest, `routerWins: true`) run
|
|
69
|
+
* router-provided surfaces only: ANY pre-existing `statusLine` is backed
|
|
70
|
+
* up to a mirror sidecar and replaced with ours (`mode: "forced"`), so the
|
|
71
|
+
* native rich line always renders and the user command never executes.
|
|
66
72
|
*
|
|
67
73
|
* Failure model matches the sibling settings writers: a transient read error
|
|
68
74
|
* or a non-object settings.json throws (never clobber a file we don't
|
|
@@ -82,7 +88,7 @@ function isCommandStatusLine(value) {
|
|
|
82
88
|
const record = value;
|
|
83
89
|
return record.type === "command" && typeof record.command === "string" && record.command.length > 0;
|
|
84
90
|
}
|
|
85
|
-
async function injectAicStatusLineIntoSettingsFile(settingsPath, statusCommand) {
|
|
91
|
+
async function injectAicStatusLineIntoSettingsFile(settingsPath, statusCommand, opts = {}) {
|
|
86
92
|
let existing = {};
|
|
87
93
|
let raw;
|
|
88
94
|
try {
|
|
@@ -102,6 +108,22 @@ async function injectAicStatusLineIntoSettingsFile(settingsPath, statusCommand)
|
|
|
102
108
|
written: false,
|
|
103
109
|
reason: "already-set"
|
|
104
110
|
};
|
|
111
|
+
if (opts.routerWins) {
|
|
112
|
+
const hadPrevious = true;
|
|
113
|
+
await writeSettingsAtomically(settingsPath, {
|
|
114
|
+
...existing,
|
|
115
|
+
statusLine: {
|
|
116
|
+
type: "command",
|
|
117
|
+
command: statusCommand
|
|
118
|
+
}
|
|
119
|
+
});
|
|
120
|
+
await writeBackupSidecar(settingsPath, current);
|
|
121
|
+
return {
|
|
122
|
+
written: true,
|
|
123
|
+
mode: "forced",
|
|
124
|
+
hadPrevious
|
|
125
|
+
};
|
|
126
|
+
}
|
|
105
127
|
if (isCommandStatusLine(current)) {
|
|
106
128
|
const userCommand = current.command;
|
|
107
129
|
await writeSettingsAtomically(settingsPath, {
|
|
@@ -139,6 +161,19 @@ async function writeSettingsAtomically(settingsPath, merged) {
|
|
|
139
161
|
await fs.writeFile(tmp, `${JSON.stringify(merged, null, 2)}\n`, { mode: 384 });
|
|
140
162
|
await fs.rename(tmp, settingsPath);
|
|
141
163
|
}
|
|
164
|
+
/**
|
|
165
|
+
* Record a replaced `statusLine` value in a mirror sidecar for audit.
|
|
166
|
+
* Mirror-only (same dir as the mirrored settings.json); the operator's
|
|
167
|
+
* real settings are never touched. Best-effort: a backup failure must
|
|
168
|
+
* not fail the injection that already succeeded.
|
|
169
|
+
*/
|
|
170
|
+
async function writeBackupSidecar(settingsPath, previous) {
|
|
171
|
+
const backupPath = `${settingsPath}.aic-statusline-backup.json`;
|
|
172
|
+
const payload = { replacedStatusLine: previous };
|
|
173
|
+
try {
|
|
174
|
+
await fs.writeFile(backupPath, `${JSON.stringify(payload, null, 2)}\n`, { mode: 384 });
|
|
175
|
+
} catch {}
|
|
176
|
+
}
|
|
142
177
|
//#endregion
|
|
143
178
|
//#region src/lib/fast-launch-cleanup.ts
|
|
144
179
|
function createFastLaunchCleanup(deps) {
|
|
@@ -545,16 +580,44 @@ const claude = defineCommand({
|
|
|
545
580
|
}
|
|
546
581
|
const banner = chosenSlug === resolvedSlug ? chosenSlug : `${chosenSlug} → ${resolvedSlug}`;
|
|
547
582
|
process$1.stderr.write(`Server ready on ${serverUrl}, launching Claude Code (${banner})...\n`);
|
|
583
|
+
if (launchProfileId === "fast" || launchProfileId === "cheap" || launchProfileId === "cheap1m" || launchProfileId === "cheapest") {
|
|
584
|
+
try {
|
|
585
|
+
const settingsPath = path.join(PATHS.CLAUDE_CONFIG_DIR, "settings.json");
|
|
586
|
+
const purgedHooks = await purgeNonRouterHooksForPinnedProfile(settingsPath);
|
|
587
|
+
if (purgedHooks.removed > 0) consola.info(`Removed ${purgedHooks.removed} non-router hook entries from this launch's isolated settings (${launchProfileId} provides its own hooks).`);
|
|
588
|
+
} catch (err) {
|
|
589
|
+
consola.warn(`Non-router hook purge skipped: ${err instanceof Error ? err.message : String(err)}.`);
|
|
590
|
+
}
|
|
591
|
+
try {
|
|
592
|
+
const purgedAgents = await purgeNonRouterAgentsFromMirror();
|
|
593
|
+
if (purgedAgents > 0) consola.info(`Removed ${purgedAgents} non-router subagent files from this launch's isolated agents dir (${launchProfileId} provides its own roster).`);
|
|
594
|
+
} catch (err) {
|
|
595
|
+
consola.warn(`Non-router subagent purge skipped: ${err instanceof Error ? err.message : String(err)}.`);
|
|
596
|
+
}
|
|
597
|
+
}
|
|
548
598
|
let pickerModels;
|
|
549
599
|
try {
|
|
550
600
|
const settingsPath = path.join(PATHS.CLAUDE_CONFIG_DIR, "settings.json");
|
|
551
601
|
const picker = await injectModelPickerSettingsFile(settingsPath, launchProfileId);
|
|
552
602
|
pickerModels = picker.models;
|
|
553
603
|
if (picker.reason === "user-set") consola.info("Preserving the user-configured modelPicker for this launch; router-curated rows were not merged.");
|
|
604
|
+
else if (picker.reason === "router-overwrite") consola.info("Replaced a stale modelPicker in this launch's isolated settings with the router-curated rows for this profile.");
|
|
554
605
|
} catch (err) {
|
|
555
606
|
consola.warn(`Model-picker settings injection skipped: ${err instanceof Error ? err.message : String(err)}. Use an explicit -m model if the curated rows are unavailable.`);
|
|
556
607
|
}
|
|
557
608
|
const envVars = getClaudeCodeEnvVars(serverUrl, chosenSlug, launchProfileId, pickerModels);
|
|
609
|
+
if (launchProfileId === "cheap" || launchProfileId === "cheapest") {
|
|
610
|
+
const suspectKeys = [
|
|
611
|
+
"ANTHROPIC_MODEL",
|
|
612
|
+
"ANTHROPIC_DEFAULT_OPUS_MODEL",
|
|
613
|
+
"ANTHROPIC_DEFAULT_SONNET_MODEL",
|
|
614
|
+
"ANTHROPIC_DEFAULT_HAIKU_MODEL",
|
|
615
|
+
"ANTHROPIC_CUSTOM_MODEL_OPTION"
|
|
616
|
+
].filter((key) => typeof envVars[key] === "string" && /\[1m\]/i.test(envVars[key]));
|
|
617
|
+
const suspectPicker = (pickerModels ?? []).filter((id) => /\[1m\]/i.test(id));
|
|
618
|
+
if (suspectKeys.length > 0 || suspectPicker.length > 0) consola.warn(`Pinned-profile context leak (${launchProfileId} must be bare 200K): ` + [...suspectKeys.map((key) => `env:${key}`), ...suspectPicker.map((id) => `picker:${id}`)].join(", "));
|
|
619
|
+
}
|
|
620
|
+
if (launchProfileId === "fast" || launchProfileId === "cheap" || launchProfileId === "cheap1m" || launchProfileId === "cheapest") consola.info(`Pinned launch: profile=${launchProfileId} lead=${chosenSlug} pickerRows=${pickerModels?.length ?? 0}.`);
|
|
558
621
|
let extraArgs = collectChildPassthroughArgs(rawArgs, claudeArgs);
|
|
559
622
|
if (launchProfileId === "fast") extraArgs = withFixedFastAdvisorArg(extraArgs, fastAdvisorClientEnabled(process$1.env));
|
|
560
623
|
else if (launchProfileId === "cheap" || launchProfileId === "cheap1m") extraArgs = withFixedCheapAdvisorArg(extraArgs, cheapAdvisorClientEnabled(process$1.env));
|
|
@@ -1096,10 +1159,11 @@ const claude = defineCommand({
|
|
|
1096
1159
|
}
|
|
1097
1160
|
if (process$1.env.GH_ROUTER_DISABLE_AIC_STATUSLINE !== "1") try {
|
|
1098
1161
|
sweepStaleAicLedgerFiles();
|
|
1099
|
-
const injected = await injectAicStatusLineIntoSettingsFile(path.join(PATHS.CLAUDE_CONFIG_DIR, "settings.json"), buildAicStatusHookCommand(selfInvocation));
|
|
1162
|
+
const injected = await injectAicStatusLineIntoSettingsFile(path.join(PATHS.CLAUDE_CONFIG_DIR, "settings.json"), buildAicStatusHookCommand(selfInvocation), launchProfileId === "fast" || launchProfileId === "cheap" || launchProfileId === "cheap1m" || launchProfileId === "cheapest" ? { routerWins: true } : {});
|
|
1100
1163
|
if (injected.written) {
|
|
1101
1164
|
envVars[AIC_LEDGER_ENV] = aicLedgerPath();
|
|
1102
1165
|
if (injected.mode === "wrapped" && injected.userCommand) envVars[AIC_USER_STATUSLINE_ENV] = injected.userCommand;
|
|
1166
|
+
if (injected.mode === "forced") consola.info(`Pinned status line installed natively for ${launchProfileId}; a pre-existing statusLine was backed up in this launch's isolated settings and will not run.`);
|
|
1103
1167
|
}
|
|
1104
1168
|
} catch (err) {
|
|
1105
1169
|
consola.warn(`AIC status line skipped: ${err instanceof Error ? err.message : String(err)}`);
|
|
@@ -1124,4 +1188,4 @@ const claude = defineCommand({
|
|
|
1124
1188
|
//#endregion
|
|
1125
1189
|
export { claude };
|
|
1126
1190
|
|
|
1127
|
-
//# sourceMappingURL=claude-
|
|
1191
|
+
//# sourceMappingURL=claude-UhOOquJW.js.map
|