github-router 0.3.314 → 0.3.316
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-Cx_Ubon3.js → aic-ledger-BS47yb_C.js} +66 -6
- package/dist/aic-ledger-BS47yb_C.js.map +1 -0
- package/dist/{attribution-settings-Btc5EZTj.js → attribution-settings-jcsSeVur.js} +120 -21
- package/dist/attribution-settings-jcsSeVur.js.map +1 -0
- package/dist/{auth-O_UG1ABO.js → auth-JfxL9q7z.js} +4 -4
- package/dist/{auth-O_UG1ABO.js.map → auth-JfxL9q7z.js.map} +1 -1
- package/dist/browser-ext/manifest.json +1 -1
- package/dist/{check-usage-dicJOWML.js → check-usage-DXUEQzt_.js} +4 -4
- package/dist/{check-usage-dicJOWML.js.map → check-usage-DXUEQzt_.js.map} +1 -1
- package/dist/{claude-D0vuAqTV.js → claude-CJ4Nd2_3.js} +116 -45
- package/dist/claude-CJ4Nd2_3.js.map +1 -0
- package/dist/{codex-BNm9D0iJ.js → codex-CwuLqNZF.js} +6 -6
- package/dist/codex-CwuLqNZF.js.map +1 -0
- package/dist/copilot-discount-IbXR5A28.js +220 -0
- package/dist/copilot-discount-IbXR5A28.js.map +1 -0
- package/dist/{debug-2PgImRnr.js → debug-CA7pg8V9.js} +2 -2
- package/dist/{debug-2PgImRnr.js.map → debug-CA7pg8V9.js.map} +1 -1
- package/dist/engine-DwrxceOS.js +2 -0
- package/dist/{exec-y8C_MU8A.js → exec-COUT4QsS.js} +2 -2
- package/dist/{exec-y8C_MU8A.js.map → exec-COUT4QsS.js.map} +1 -1
- package/dist/{gate-discovery-CO2njGBB.js → gate-discovery-z04ywOzB.js} +6 -6
- package/dist/{gate-discovery-CO2njGBB.js.map → gate-discovery-z04ywOzB.js.map} +1 -1
- package/dist/{get-copilot-usage-Cjy8TiFf.js → get-copilot-usage-BMD_cJNT.js} +3 -3
- package/dist/{get-copilot-usage-Cjy8TiFf.js.map → get-copilot-usage-BMD_cJNT.js.map} +1 -1
- package/dist/hooks.mjs +490 -28
- package/dist/hooks.sha256 +1 -1
- package/dist/internal-aic-status-BN0xRLSF.js +432 -0
- package/dist/internal-aic-status-BN0xRLSF.js.map +1 -0
- package/dist/{internal-artifact-open-CxeIfsW_.js → internal-artifact-open-B3stUu74.js} +2 -2
- package/dist/{internal-artifact-open-CxeIfsW_.js.map → internal-artifact-open-B3stUu74.js.map} +1 -1
- package/dist/{internal-fast-dispatch-guard-D8YNlnuQ.js → internal-fast-dispatch-guard-2QjUlhqO.js} +1 -1
- package/dist/{internal-fast-dispatch-guard-19xQEouu.js → internal-fast-dispatch-guard-CAwYj_Yz.js} +2 -2
- package/dist/{internal-fast-dispatch-guard-19xQEouu.js.map → internal-fast-dispatch-guard-CAwYj_Yz.js.map} +1 -1
- package/dist/{internal-first-mate-guard-BuweUgjb.js → internal-first-mate-guard-B0rbLb0L.js} +3 -3
- package/dist/{internal-first-mate-guard-BuweUgjb.js.map → internal-first-mate-guard-B0rbLb0L.js.map} +1 -1
- package/dist/{internal-first-mate-guard-Nf1H0mCK.js → internal-first-mate-guard-VgnHBp0s.js} +1 -1
- package/dist/{internal-max-dispatch-guard-DZ7KLWxP.js → internal-max-dispatch-guard-BNqQ2wMc.js} +3 -3
- package/dist/{internal-max-dispatch-guard-DZ7KLWxP.js.map → internal-max-dispatch-guard-BNqQ2wMc.js.map} +1 -1
- package/dist/{internal-max-dispatch-guard-_Pp4LltM.js → internal-max-dispatch-guard-Bz7a2Ntf.js} +1 -1
- package/dist/{internal-plan-review-DLduDz41.js → internal-plan-review-QUvNZmMR.js} +3 -3
- package/dist/{internal-plan-review-DLduDz41.js.map → internal-plan-review-QUvNZmMR.js.map} +1 -1
- package/dist/{internal-prompt-submit-DG94f8E-.js → internal-prompt-submit-fj5ccft_.js} +5 -5
- package/dist/{internal-prompt-submit-DG94f8E-.js.map → internal-prompt-submit-fj5ccft_.js.map} +1 -1
- package/dist/{internal-session-bind-D6Hpl-84.js → internal-session-bind-0Hmak8PR.js} +2 -2
- package/dist/{internal-session-bind-D6Hpl-84.js.map → internal-session-bind-0Hmak8PR.js.map} +1 -1
- package/dist/{internal-stop-hook-D56b6iVj.js → internal-stop-hook-UN1JHtjj.js} +6 -6
- package/dist/{internal-stop-hook-D56b6iVj.js.map → internal-stop-hook-UN1JHtjj.js.map} +1 -1
- package/dist/{internal-stop-review-DlKzZgFm.js → internal-stop-review-8v2llYDB.js} +2 -2
- package/dist/{internal-stop-review-DlKzZgFm.js.map → internal-stop-review-8v2llYDB.js.map} +1 -1
- package/dist/{internal-worker-guard-D7sfByyo.js → internal-worker-guard-BI4Pl0Ew.js} +2 -2
- package/dist/{internal-worker-guard-D7sfByyo.js.map → internal-worker-guard-BI4Pl0Ew.js.map} +1 -1
- package/dist/{internal-workspace-header-CU5OjLCB.js → internal-workspace-header-kg9FoNXK.js} +2 -2
- package/dist/{internal-workspace-header-CU5OjLCB.js.map → internal-workspace-header-kg9FoNXK.js.map} +1 -1
- package/dist/lifecycle-BpqAyaAj.js +2 -0
- package/dist/lifecycle-CL2WiyeQ.js +2 -0
- package/dist/{lifecycle-CtRA3Y7p.js → lifecycle-Cx1wVrLb.js} +3 -3
- package/dist/{lifecycle-CtRA3Y7p.js.map → lifecycle-Cx1wVrLb.js.map} +1 -1
- package/dist/{lifecycle-BCnarXJV.js → lifecycle-IwotwedG.js} +2 -2
- package/dist/{lifecycle-BCnarXJV.js.map → lifecycle-IwotwedG.js.map} +1 -1
- package/dist/main.js +20 -20
- package/dist/{max-profile-contract-BcrMlrmo.js → max-profile-contract-Bl7I_EOC.js} +2 -2
- package/dist/{max-profile-contract-BcrMlrmo.js.map → max-profile-contract-Bl7I_EOC.js.map} +1 -1
- package/dist/{mcp-workspace-header-B60WSR1Y.js → mcp-workspace-header-BYgWioLH.js} +2 -2
- package/dist/{mcp-workspace-header-B60WSR1Y.js.map → mcp-workspace-header-BYgWioLH.js.map} +1 -1
- package/dist/{models-COuMOfM6.js → models-CVzyU5mJ.js} +3 -3
- package/dist/{models-COuMOfM6.js.map → models-CVzyU5mJ.js.map} +1 -1
- package/dist/{orchestration-DjLA-lxB.js → orchestration-Dc3mO0G3.js} +3 -3
- package/dist/{orchestration-DjLA-lxB.js.map → orchestration-Dc3mO0G3.js.map} +1 -1
- package/dist/paths-BXXCVFvA.js +2 -0
- package/dist/{paths-De1Qh9Q9.js → paths-CMxlQEfQ.js} +3 -3
- package/dist/{paths-De1Qh9Q9.js.map → paths-CMxlQEfQ.js.map} +1 -1
- package/dist/{peer-mcp-personas-0_XU6nm9.js → peer-mcp-personas-CQ-0Piyr.js} +175 -54
- package/dist/peer-mcp-personas-CQ-0Piyr.js.map +1 -0
- package/dist/{plan-review-hook-vL6BYmA8.js → plan-review-hook-BIMwWkh6.js} +4 -4
- package/dist/{plan-review-hook-vL6BYmA8.js.map → plan-review-hook-BIMwWkh6.js.map} +1 -1
- package/dist/{prompt-submit-hook-DfqufWC1.js → prompt-submit-hook-BcFpjHXg.js} +3 -3
- package/dist/{prompt-submit-hook-DfqufWC1.js.map → prompt-submit-hook-BcFpjHXg.js.map} +1 -1
- package/dist/{provision-DuCnZJj_.js → provision-_R7ZMygj.js} +5 -5
- package/dist/{provision-DuCnZJj_.js.map → provision-_R7ZMygj.js.map} +1 -1
- package/dist/{self-invocation-B84JCHps.js → self-invocation-cRl4RqfW.js} +2 -2
- package/dist/{self-invocation-B84JCHps.js.map → self-invocation-cRl4RqfW.js.map} +1 -1
- package/dist/{serve-DXFVR6A0.js → serve-DU66K5kv.js} +14 -14
- package/dist/{serve-DXFVR6A0.js.map → serve-DU66K5kv.js.map} +1 -1
- package/dist/{server-setup-CP8nGop3.js → server-setup-iLG8LrfL.js} +168 -30
- package/dist/server-setup-iLG8LrfL.js.map +1 -0
- package/dist/{start-BHEjESCB.js → start-DQTcm0o_.js} +3 -3
- package/dist/{start-BHEjESCB.js.map → start-DQTcm0o_.js.map} +1 -1
- package/dist/{state-B8adscCv.js → state-BlMpEFAt.js} +2 -1
- package/dist/{state-B8adscCv.js.map → state-BlMpEFAt.js.map} +1 -1
- package/dist/{stop-gate-hook-BEU8qQrC.js → stop-gate-hook-BUCxa5Kc.js} +4 -4
- package/dist/{stop-gate-hook-BEU8qQrC.js.map → stop-gate-hook-BUCxa5Kc.js.map} +1 -1
- package/dist/{stop-gate-policy-qzqXfRxE.js → stop-gate-policy--bpyxxXU.js} +3 -3
- package/dist/{stop-gate-policy-qzqXfRxE.js.map → stop-gate-policy--bpyxxXU.js.map} +1 -1
- package/dist/{token-CCg-Ov5q.js → token-C1gthnbV.js} +3 -3
- package/dist/{token-CCg-Ov5q.js.map → token-C1gthnbV.js.map} +1 -1
- package/dist/{worker-dispatch-CH-NN5FW.js → worker-dispatch-DMIdrlsF.js} +2 -2
- package/dist/{worker-dispatch-CH-NN5FW.js.map → worker-dispatch-DMIdrlsF.js.map} +1 -1
- package/package.json +1 -1
- package/dist/aic-ledger-Cx_Ubon3.js.map +0 -1
- package/dist/attribution-settings-Btc5EZTj.js.map +0 -1
- package/dist/claude-D0vuAqTV.js.map +0 -1
- package/dist/codex-BNm9D0iJ.js.map +0 -1
- package/dist/engine-DsVZuCrD.js +0 -2
- package/dist/internal-aic-status-C_swX3_7.js +0 -95
- package/dist/internal-aic-status-C_swX3_7.js.map +0 -1
- package/dist/lifecycle-B0USSJvd.js +0 -2
- package/dist/lifecycle-CQFjaQc0.js +0 -2
- package/dist/paths-DyX6SEnd.js +0 -2
- package/dist/peer-mcp-personas-0_XU6nm9.js.map +0 -1
- package/dist/server-setup-CP8nGop3.js.map +0 -1
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { i as ensurePaths, t as PATHS } from "./paths-
|
|
2
|
-
import { t as state } from "./state-
|
|
3
|
-
import { r as setupGitHubToken } from "./token-
|
|
1
|
+
import { i as ensurePaths, t as PATHS } from "./paths-CMxlQEfQ.js";
|
|
2
|
+
import { t as state } from "./state-BlMpEFAt.js";
|
|
3
|
+
import { r as setupGitHubToken } from "./token-C1gthnbV.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-JfxL9q7z.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"auth-
|
|
1
|
+
{"version":3,"file":"auth-JfxL9q7z.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.316",
|
|
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-CMxlQEfQ.js";
|
|
2
|
+
import { r as setupGitHubToken } from "./token-C1gthnbV.js";
|
|
3
|
+
import { t as getCopilotUsage } from "./get-copilot-usage-BMD_cJNT.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-DXUEQzt_.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"check-usage-
|
|
1
|
+
{"version":3,"file":"check-usage-DXUEQzt_.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,26 +1,27 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { o as removeOwnClaudeConfigMirror, r as ensureClaudeConfigMirror, t as PATHS, u as writeArtifactCredsToMirror } from "./paths-
|
|
3
|
-
import { t as state } from "./state-
|
|
4
|
-
import { d as resolveModel } from "./token-
|
|
5
|
-
import {
|
|
6
|
-
import { C 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-CQ-0Piyr.js";
|
|
2
|
+
import { o as removeOwnClaudeConfigMirror, r as ensureClaudeConfigMirror, t as PATHS, u as writeArtifactCredsToMirror } from "./paths-CMxlQEfQ.js";
|
|
3
|
+
import { t as state } from "./state-BlMpEFAt.js";
|
|
4
|
+
import { d as resolveModel } from "./token-C1gthnbV.js";
|
|
5
|
+
import { i as parseBoolEnv } from "./exec-COUT4QsS.js";
|
|
6
|
+
import { C as validateMaxProfileLaunch, E as updateClaude, S as validateFastProfilePrerequisites, T as checkClaudeVersion, _ as profileDescriptor, a as sharedServerArgs, b as validateCheapProfilePrerequisites, c as stopKeepAwake, d as enableFileLogging, g as formatFastPrerequisiteFailure, h as formatCheapestPrerequisiteFailure, i as setupAndServe, l as injectModelPickerSettingsFile, m as formatCheapPrerequisiteFailure, o as LAUNCH_SECRET_HEADER, p as formatCheap1mPrerequisiteFailure, r as parseSharedArgs, s as startKeepAwake, t as getClaudeCodeEnvVars, u as listModelsForEndpoint, v as resolveLaunchProfile, w as runSelfUpdate, x as validateCheapestProfilePrerequisites, y as validateCheap1mProfilePrerequisites } from "./server-setup-iLG8LrfL.js";
|
|
7
7
|
import { t as FAST_PROFILE_ADVISOR_CLIENT_MODEL } from "./fast-profile-contract-_DhIWank.js";
|
|
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-
|
|
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 {
|
|
12
|
-
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-
|
|
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-
|
|
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-cRl4RqfW.js";
|
|
10
|
+
import { i as launchChild, r as getCodexVersion, t as provisionToolbelt } from "./provision-_R7ZMygj.js";
|
|
11
|
+
import { a as formatAicExitSummary, l as removeAicLedgerFile, n as aicSnapshot, t as aicLedgerPath, u as sweepStaleAicLedgerFiles } from "./aic-ledger-BS47yb_C.js";
|
|
12
|
+
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-BUCxa5Kc.js";
|
|
13
|
+
import { t as liveExec } from "./orchestration-Dc3mO0G3.js";
|
|
14
|
+
import { c as repoRoot, d as trustRepo, l as stopGateEnabledForRepo, s as repoFingerprint, t as fileBaselineStore } from "./stop-gate-policy--bpyxxXU.js";
|
|
15
|
+
import { l as guardToolMatcher, n as activeDispatchModes, r as buildWorkerGuardHookCommand } from "./worker-dispatch-DMIdrlsF.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-jcsSeVur.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-
|
|
18
|
+
import { i as planReviewEnabled, t as buildPlanReviewHookCommand } from "./plan-review-hook-BIMwWkh6.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-z04ywOzB.js";
|
|
20
|
+
import { t as buildPromptSubmitHookCommand } from "./prompt-submit-hook-BcFpjHXg.js";
|
|
21
|
+
import { i as assertShapingInstalled, n as buildFirstMateGuardHookCommand, t as FIRST_MATE_GUARD_MATCHER } from "./internal-first-mate-guard-B0rbLb0L.js";
|
|
22
|
+
import { r as FAST_DISPATCH_TOOL_MATCHER, t as buildFastDispatchGuardHookCommand } from "./internal-fast-dispatch-guard-CAwYj_Yz.js";
|
|
23
|
+
import { i as assertMaxDispatchGuardInstalled, r as MAX_DISPATCH_TOOL_MATCHER, t as buildMaxDispatchGuardHookCommand } from "./internal-max-dispatch-guard-BNqQ2wMc.js";
|
|
24
|
+
import { n as formatDiscountedCostTable, t as discountedUsdForSnapshot } from "./copilot-discount-IbXR5A28.js";
|
|
24
25
|
import { defineCommand } from "citty";
|
|
25
26
|
import consola from "consola";
|
|
26
27
|
import path from "node:path";
|
|
@@ -44,14 +45,17 @@ function assertFastDispatchGuardInstalled(fastProfile, installationSucceeded) {
|
|
|
44
45
|
//#endregion
|
|
45
46
|
//#region src/lib/aic-statusline-settings.ts
|
|
46
47
|
/**
|
|
47
|
-
* Claude Code `statusLine` injection for the per-session AIC total
|
|
48
|
+
* Claude Code `statusLine` injection for the per-session AIC total + rich
|
|
49
|
+
* default session line.
|
|
48
50
|
*
|
|
49
51
|
* `github-router claude` writes `{ statusLine: { type: "command", command } }`
|
|
50
|
-
* into the mirrored settings.json so the status bar shows
|
|
52
|
+
* into the mirrored settings.json so the status bar shows
|
|
53
|
+
* `[AIC 12.42] [####------] 42% | model | dir (branch) | ...`,
|
|
51
54
|
* updating as the ledger file grows. The command itself
|
|
52
55
|
* (`internal-aic-status`) reads the ledger path from `GH_ROUTER_AIC_LEDGER`
|
|
53
56
|
* in the spawned child's env — never a path baked into settings — so the
|
|
54
|
-
* same mirror mechanics work for concurrent launches.
|
|
57
|
+
* same mirror mechanics work for concurrent launches. AIC is pinned: it
|
|
58
|
+
* renders even when the terminal is too narrow for any other segment.
|
|
55
59
|
*
|
|
56
60
|
* Wrap-don't-clobber: when the user's own config already defines `statusLine`
|
|
57
61
|
* as a `{type:"command", command:string}` shape, that command is preserved via
|
|
@@ -160,8 +164,8 @@ function createFastLaunchCleanup(deps) {
|
|
|
160
164
|
}
|
|
161
165
|
//#endregion
|
|
162
166
|
//#region src/lib/fast-advisor-client.ts
|
|
163
|
-
const ADVISOR_FLAG$
|
|
164
|
-
function featureEnvEnabled$
|
|
167
|
+
const ADVISOR_FLAG$2 = "--advisor";
|
|
168
|
+
function featureEnvEnabled$2(value) {
|
|
165
169
|
if (value === void 0) return true;
|
|
166
170
|
return ![
|
|
167
171
|
"",
|
|
@@ -174,7 +178,7 @@ function featureEnvEnabled$1(value) {
|
|
|
174
178
|
/** Match Claude Code's hard-disable and experimental-enable opt-out semantics. */
|
|
175
179
|
function fastAdvisorClientEnabled(env = process.env) {
|
|
176
180
|
if (env.CLAUDE_CODE_DISABLE_ADVISOR_TOOL) return false;
|
|
177
|
-
return featureEnvEnabled$
|
|
181
|
+
return featureEnvEnabled$2(env.CLAUDE_CODE_ENABLE_EXPERIMENTAL_ADVISOR_TOOL);
|
|
178
182
|
}
|
|
179
183
|
/**
|
|
180
184
|
* Remove every caller-supplied Advisor option and insert the fixed fast value.
|
|
@@ -190,17 +194,17 @@ function withFixedFastAdvisorArg(args, enabled = fastAdvisorClientEnabled()) {
|
|
|
190
194
|
const sanitized = [];
|
|
191
195
|
for (let index = 0; index < args.length; index++) {
|
|
192
196
|
const token = args[index];
|
|
193
|
-
if (token === ADVISOR_FLAG$
|
|
197
|
+
if (token === ADVISOR_FLAG$2) {
|
|
194
198
|
const next = args[index + 1];
|
|
195
199
|
if (next !== void 0 && next !== "--" && !next.startsWith("-")) index++;
|
|
196
200
|
continue;
|
|
197
201
|
}
|
|
198
|
-
if (token.startsWith(`${ADVISOR_FLAG$
|
|
202
|
+
if (token.startsWith(`${ADVISOR_FLAG$2}=`)) continue;
|
|
199
203
|
sanitized.push(token);
|
|
200
204
|
}
|
|
201
205
|
if (!enabled) return sanitized;
|
|
202
206
|
const separator = sanitized.indexOf("--");
|
|
203
|
-
const fixed = [ADVISOR_FLAG$
|
|
207
|
+
const fixed = [ADVISOR_FLAG$2, FAST_PROFILE_ADVISOR_CLIENT_MODEL];
|
|
204
208
|
if (separator < 0) return [...sanitized, ...fixed];
|
|
205
209
|
return [
|
|
206
210
|
...sanitized.slice(0, separator),
|
|
@@ -210,8 +214,8 @@ function withFixedFastAdvisorArg(args, enabled = fastAdvisorClientEnabled()) {
|
|
|
210
214
|
}
|
|
211
215
|
//#endregion
|
|
212
216
|
//#region src/lib/cheap-advisor-client.ts
|
|
213
|
-
const ADVISOR_FLAG = "--advisor";
|
|
214
|
-
function featureEnvEnabled(value) {
|
|
217
|
+
const ADVISOR_FLAG$1 = "--advisor";
|
|
218
|
+
function featureEnvEnabled$1(value) {
|
|
215
219
|
if (value === void 0) return true;
|
|
216
220
|
return ![
|
|
217
221
|
"",
|
|
@@ -224,7 +228,7 @@ function featureEnvEnabled(value) {
|
|
|
224
228
|
/** Match Claude Code's hard-disable and experimental-enable opt-out semantics. */
|
|
225
229
|
function cheapAdvisorClientEnabled(env = process.env) {
|
|
226
230
|
if (env.CLAUDE_CODE_DISABLE_ADVISOR_TOOL) return false;
|
|
227
|
-
return featureEnvEnabled(env.CLAUDE_CODE_ENABLE_EXPERIMENTAL_ADVISOR_TOOL);
|
|
231
|
+
return featureEnvEnabled$1(env.CLAUDE_CODE_ENABLE_EXPERIMENTAL_ADVISOR_TOOL);
|
|
228
232
|
}
|
|
229
233
|
/**
|
|
230
234
|
* Remove every caller-supplied Advisor option and insert the fixed cheap value
|
|
@@ -234,6 +238,53 @@ function cheapAdvisorClientEnabled(env = process.env) {
|
|
|
234
238
|
* the first separator so Claude Code parses it as an option.
|
|
235
239
|
*/
|
|
236
240
|
function withFixedCheapAdvisorArg(args, enabled = cheapAdvisorClientEnabled()) {
|
|
241
|
+
const sanitized = [];
|
|
242
|
+
for (let index = 0; index < args.length; index++) {
|
|
243
|
+
const token = args[index];
|
|
244
|
+
if (token === ADVISOR_FLAG$1) {
|
|
245
|
+
const next = args[index + 1];
|
|
246
|
+
if (next !== void 0 && next !== "--" && !next.startsWith("-")) index++;
|
|
247
|
+
continue;
|
|
248
|
+
}
|
|
249
|
+
if (token.startsWith(`${ADVISOR_FLAG$1}=`)) continue;
|
|
250
|
+
sanitized.push(token);
|
|
251
|
+
}
|
|
252
|
+
if (!enabled) return sanitized;
|
|
253
|
+
const separator = sanitized.indexOf("--");
|
|
254
|
+
const fixed = [ADVISOR_FLAG$1, CHEAP_PROFILE_ADVISOR_CLIENT_MODEL];
|
|
255
|
+
if (separator < 0) return [...sanitized, ...fixed];
|
|
256
|
+
return [
|
|
257
|
+
...sanitized.slice(0, separator),
|
|
258
|
+
...fixed,
|
|
259
|
+
...sanitized.slice(separator)
|
|
260
|
+
];
|
|
261
|
+
}
|
|
262
|
+
//#endregion
|
|
263
|
+
//#region src/lib/cheapest-advisor-client.ts
|
|
264
|
+
const ADVISOR_FLAG = "--advisor";
|
|
265
|
+
function featureEnvEnabled(value) {
|
|
266
|
+
if (value === void 0) return true;
|
|
267
|
+
return ![
|
|
268
|
+
"",
|
|
269
|
+
"0",
|
|
270
|
+
"false",
|
|
271
|
+
"no",
|
|
272
|
+
"off"
|
|
273
|
+
].includes(value.trim().toLowerCase());
|
|
274
|
+
}
|
|
275
|
+
/** Match Claude Code's hard-disable and experimental-enable opt-out semantics. */
|
|
276
|
+
function cheapestAdvisorClientEnabled(env = process.env) {
|
|
277
|
+
if (env.CLAUDE_CODE_DISABLE_ADVISOR_TOOL) return false;
|
|
278
|
+
return featureEnvEnabled(env.CLAUDE_CODE_ENABLE_EXPERIMENTAL_ADVISOR_TOOL);
|
|
279
|
+
}
|
|
280
|
+
/**
|
|
281
|
+
* Remove every caller-supplied Advisor option and insert the fixed cheapest
|
|
282
|
+
* value (the BARE `gemini-3.8-flash` — 200K default window — see
|
|
283
|
+
* `CHEAPEST_PROFILE_ADVISOR_CLIENT_MODEL`). Same parser semantics as the
|
|
284
|
+
* cheap variant: keeps scanning after `--`, and the fixed option is inserted
|
|
285
|
+
* before the first separator so Claude Code parses it as an option.
|
|
286
|
+
*/
|
|
287
|
+
function withFixedCheapestAdvisorArg(args, enabled = cheapestAdvisorClientEnabled()) {
|
|
237
288
|
const sanitized = [];
|
|
238
289
|
for (let index = 0; index < args.length; index++) {
|
|
239
290
|
const token = args[index];
|
|
@@ -247,7 +298,7 @@ function withFixedCheapAdvisorArg(args, enabled = cheapAdvisorClientEnabled()) {
|
|
|
247
298
|
}
|
|
248
299
|
if (!enabled) return sanitized;
|
|
249
300
|
const separator = sanitized.indexOf("--");
|
|
250
|
-
const fixed = [ADVISOR_FLAG,
|
|
301
|
+
const fixed = [ADVISOR_FLAG, CHEAPEST_PROFILE_ADVISOR_CLIENT_MODEL];
|
|
251
302
|
if (separator < 0) return [...sanitized, ...fixed];
|
|
252
303
|
return [
|
|
253
304
|
...sanitized.slice(0, separator),
|
|
@@ -262,7 +313,7 @@ const claudeArgs = {
|
|
|
262
313
|
model: {
|
|
263
314
|
alias: "m",
|
|
264
315
|
type: "string",
|
|
265
|
-
description: "Override the default model for Claude Code. Accepts a profile alias (fast, cheap, cheap1m, max), a full slug (e.g. claude-opus-4-7), or an Opus family shorthand (e.g. 4.7, 4.8, 4.6) which expands to the best variant for that family — adding the [1m] suffix when a 1M-context backend is in the catalog."
|
|
316
|
+
description: "Override the default model for Claude Code. Accepts a profile alias (fast, cheap, cheap1m, cheapest, max), a full slug (e.g. claude-opus-4-7), or an Opus family shorthand (e.g. 4.7, 4.8, 4.6) which expands to the best variant for that family — adding the [1m] suffix when a 1M-context backend is in the catalog."
|
|
266
317
|
},
|
|
267
318
|
"codex-mcp": {
|
|
268
319
|
type: "boolean",
|
|
@@ -379,8 +430,8 @@ const claude = defineCommand({
|
|
|
379
430
|
process$1.stderr.write(`Max profile uses its fixed HTTP MCP surface; --codex-cli is not supported in max profile.\n`);
|
|
380
431
|
process$1.exit(1);
|
|
381
432
|
}
|
|
382
|
-
if ((requestedLaunchProfileId === "fast" || requestedLaunchProfileId === "max" || requestedLaunchProfileId === "cheap" || requestedLaunchProfileId === "cheap1m") && !codexMcpEnabled) {
|
|
383
|
-
const message = `github-router claude -m ${requestedLaunchProfileId === "fast" ? "fast" : requestedLaunchProfileId === "cheap" ? "cheap" : requestedLaunchProfileId === "cheap1m" ? "cheap1m" : "max"} requires codex MCP wiring for its native roster and dispatch ACL; remove --no-codex-mcp or choose a standard model.`;
|
|
433
|
+
if ((requestedLaunchProfileId === "fast" || requestedLaunchProfileId === "max" || requestedLaunchProfileId === "cheap" || requestedLaunchProfileId === "cheap1m" || requestedLaunchProfileId === "cheapest") && !codexMcpEnabled) {
|
|
434
|
+
const message = `github-router claude -m ${requestedLaunchProfileId === "fast" ? "fast" : requestedLaunchProfileId === "cheap" ? "cheap" : requestedLaunchProfileId === "cheap1m" ? "cheap1m" : requestedLaunchProfileId === "cheapest" ? "cheapest" : "max"} requires codex MCP wiring for its native roster and dispatch ACL; remove --no-codex-mcp or choose a standard model.`;
|
|
384
435
|
process$1.stderr.write(`${message}\n`);
|
|
385
436
|
process$1.exit(1);
|
|
386
437
|
}
|
|
@@ -469,6 +520,9 @@ const claude = defineCommand({
|
|
|
469
520
|
} else if (launchProfileId === "cheap" || launchProfileId === "cheap1m") {
|
|
470
521
|
const prereqCheck = launchProfileId === "cheap1m" ? validateCheap1mProfilePrerequisites(state.models) : validateCheapProfilePrerequisites(state.models);
|
|
471
522
|
if (!prereqCheck.ok) await fastFatal(launchProfileId === "cheap1m" ? formatCheap1mPrerequisiteFailure(prereqCheck.missing) : formatCheapPrerequisiteFailure(prereqCheck.missing));
|
|
523
|
+
} else if (launchProfileId === "cheapest") {
|
|
524
|
+
const prereqCheck = validateCheapestProfilePrerequisites(state.models);
|
|
525
|
+
if (!prereqCheck.ok) await fastFatal(formatCheapestPrerequisiteFailure(prereqCheck.missing));
|
|
472
526
|
}
|
|
473
527
|
let chosenSlug = requestedSlug;
|
|
474
528
|
let resolvedSlug = resolveModel(chosenSlug);
|
|
@@ -504,6 +558,7 @@ const claude = defineCommand({
|
|
|
504
558
|
let extraArgs = collectChildPassthroughArgs(rawArgs, claudeArgs);
|
|
505
559
|
if (launchProfileId === "fast") extraArgs = withFixedFastAdvisorArg(extraArgs, fastAdvisorClientEnabled(process$1.env));
|
|
506
560
|
else if (launchProfileId === "cheap" || launchProfileId === "cheap1m") extraArgs = withFixedCheapAdvisorArg(extraArgs, cheapAdvisorClientEnabled(process$1.env));
|
|
561
|
+
else if (launchProfileId === "cheapest") extraArgs = withFixedCheapestAdvisorArg(extraArgs, cheapestAdvisorClientEnabled(process$1.env));
|
|
507
562
|
if (toolbeltEnabled()) {
|
|
508
563
|
provisionToolbelt().catch((err) => consola.debug("Toolbelt provisioning failed:", err));
|
|
509
564
|
const toolbeltLine = buildToolbeltAwareness(availableToolCommands());
|
|
@@ -529,7 +584,7 @@ const claude = defineCommand({
|
|
|
529
584
|
let peerAwarenessSnippet;
|
|
530
585
|
let peerAwarenessSummary;
|
|
531
586
|
let operatingGroupKeys = {};
|
|
532
|
-
let fastWiringComplete = launchProfileId !== "fast" && !(launchProfileId === "cheap" || launchProfileId === "cheap1m");
|
|
587
|
+
let fastWiringComplete = launchProfileId !== "fast" && !(launchProfileId === "cheap" || launchProfileId === "cheap1m" || launchProfileId === "cheapest");
|
|
533
588
|
const astraAvailable = (launchProfileId === "fast" || launchProfileId === "cheap1m") && Boolean(fastAstraModel());
|
|
534
589
|
const browseAgentAvailable = browseAgentEnabled();
|
|
535
590
|
const directBrowserAvailable = browserToolsEnabled();
|
|
@@ -548,6 +603,12 @@ const claude = defineCommand({
|
|
|
548
603
|
"general-purpose": CHEAP_PROFILE_NATIVE_MODELS["general-purpose"],
|
|
549
604
|
implementer: CHEAP_PROFILE_NATIVE_MODELS.implementer,
|
|
550
605
|
reviewer: cheapReviewerModel()
|
|
606
|
+
} : launchProfileId === "cheapest" ? {
|
|
607
|
+
Explore: CHEAPEST_PROFILE_NATIVE_MODELS.Explore,
|
|
608
|
+
Plan: CHEAPEST_PROFILE_NATIVE_MODELS.Plan,
|
|
609
|
+
"general-purpose": CHEAPEST_PROFILE_NATIVE_MODELS["general-purpose"],
|
|
610
|
+
implementer: CHEAPEST_PROFILE_NATIVE_MODELS.implementer,
|
|
611
|
+
reviewer: cheapestReviewerModel()
|
|
551
612
|
} : launchProfileId === "max" ? {
|
|
552
613
|
Explore: MAX_PROFILE_MODELS.luna,
|
|
553
614
|
Plan: MAX_PROFILE_MODELS.sol,
|
|
@@ -566,7 +627,7 @@ const claude = defineCommand({
|
|
|
566
627
|
"general-purpose-fast": generalPurposeFastModel()
|
|
567
628
|
};
|
|
568
629
|
const nativeAvailability = {
|
|
569
|
-
scoutAvailable: (launchProfileId === "fast" || launchProfileId === "cheap" || launchProfileId === "cheap1m" ? nativeAgentModels.Explore : nativeAgentModels.scout) != null,
|
|
630
|
+
scoutAvailable: (launchProfileId === "fast" || launchProfileId === "cheap" || launchProfileId === "cheap1m" || launchProfileId === "cheapest" ? nativeAgentModels.Explore : nativeAgentModels.scout) != null,
|
|
570
631
|
implementerFastAvailable: nativeAgentModels["implementer-fast"] != null,
|
|
571
632
|
reviewerFastAvailable: nativeAgentModels["reviewer-fast"] != null,
|
|
572
633
|
generalPurposeFastAvailable: nativeAgentModels["general-purpose-fast"] != null,
|
|
@@ -582,7 +643,7 @@ const claude = defineCommand({
|
|
|
582
643
|
const requestedCli = args["codex-cli"] ?? false;
|
|
583
644
|
const isFastProfile = launchProfileId === "fast";
|
|
584
645
|
const isMaxProfile = launchProfileId === "max";
|
|
585
|
-
const isCheapProfile = launchProfileId === "cheap" || launchProfileId === "cheap1m";
|
|
646
|
+
const isCheapProfile = launchProfileId === "cheap" || launchProfileId === "cheap1m" || launchProfileId === "cheapest";
|
|
586
647
|
const isPinnedProfile = isFastProfile || isMaxProfile || isCheapProfile;
|
|
587
648
|
if ((isFastProfile || isCheapProfile) && requestedCli) process$1.stderr.write("Fast/cheap profile uses its fixed HTTP MCP surface; ignoring --codex-cli.\n");
|
|
588
649
|
const backend = isPinnedProfile ? "http" : resolveCodexCliBackend({
|
|
@@ -609,7 +670,8 @@ const claude = defineCommand({
|
|
|
609
670
|
if (isMaxProfile && agentToolsEnabled()) enabledGroups.push("first-mate");
|
|
610
671
|
const { keys: groupKeys, skipped: skippedGroups } = await resolveGroupKeysFromMirror(enabledGroups);
|
|
611
672
|
operatingGroupKeys = groupKeys;
|
|
612
|
-
if (isPinnedProfile && ((isCheapProfile ? cheapOracleModel() : fastOracleModel()) == null || (isCheapProfile ? cheapAdvisorModel() : fastAdvisorModel()) == null || nativeAgentModels.implementer == null)) {
|
|
673
|
+
if (isPinnedProfile && ((launchProfileId === "cheapest" ? cheapestOracleModel() : isCheapProfile ? cheapOracleModel() : fastOracleModel()) == null || (launchProfileId === "cheapest" ? cheapestAdvisorModel() : isCheapProfile ? cheapAdvisorModel() : fastAdvisorModel()) == null || nativeAgentModels.implementer == null)) {
|
|
674
|
+
if (launchProfileId === "cheapest") throw new Error("cheapest profile prerequisite drift: exact implementer, oracle (gpt-5.6-sol), or advisor (gemini-3.8-flash) model no longer resolves");
|
|
613
675
|
if (isCheapProfile) throw new Error("cheap profile prerequisite drift: exact implementer or oracle (grok-4.6) model no longer resolves");
|
|
614
676
|
throw new Error("fast profile prerequisite drift: exact Oracle, Advisor, or implementer model no longer resolves");
|
|
615
677
|
}
|
|
@@ -641,6 +703,13 @@ const claude = defineCommand({
|
|
|
641
703
|
fastGeneralPurposeModel: nativeAgentModels["general-purpose"],
|
|
642
704
|
fastImplementerModel: nativeAgentModels.implementer,
|
|
643
705
|
fastReviewerModel: nativeAgentModels.reviewer
|
|
706
|
+
} : launchProfileId === "cheapest" ? {
|
|
707
|
+
cheapestProfile: true,
|
|
708
|
+
cheapestExploreModel: nativeAgentModels.Explore,
|
|
709
|
+
cheapestPlanModel: nativeAgentModels.Plan,
|
|
710
|
+
cheapestGeneralPurposeModel: nativeAgentModels["general-purpose"],
|
|
711
|
+
cheapestImplementerModel: nativeAgentModels.implementer,
|
|
712
|
+
cheapestReviewerModel: nativeAgentModels.reviewer
|
|
644
713
|
} : isCheapProfile ? {
|
|
645
714
|
cheapProfile: true,
|
|
646
715
|
cheapExploreModel: nativeAgentModels.Explore,
|
|
@@ -987,13 +1056,13 @@ const claude = defineCommand({
|
|
|
987
1056
|
consola.warn(`Style-directive CLAUDE.md prepend failed: ${err instanceof Error ? err.message : String(err)}`);
|
|
988
1057
|
}
|
|
989
1058
|
} catch (err) {
|
|
990
|
-
if (launchProfileId === "fast" || launchProfileId === "max" || launchProfileId === "cheap" || launchProfileId === "cheap1m") {
|
|
1059
|
+
if (launchProfileId === "fast" || launchProfileId === "max" || launchProfileId === "cheap" || launchProfileId === "cheap1m" || launchProfileId === "cheapest") {
|
|
991
1060
|
if (fastLaunchId) unregisterLaunch(fastLaunchId);
|
|
992
1061
|
await disposeFastRuntime().catch(() => {});
|
|
993
1062
|
await server.close(true).catch(() => {});
|
|
994
1063
|
await baseShutdown().catch(() => {});
|
|
995
1064
|
resetFastRuntimeOwnership();
|
|
996
|
-
const message = `${launchProfileId === "fast" ? "Fast" : launchProfileId === "cheap" ? "Cheap" : launchProfileId === "cheap1m" ? "Cheap1m" : "Max"} profile wiring failed; refusing to launch an unguarded session: ${err instanceof Error ? err.message : String(err)}`;
|
|
1065
|
+
const message = `${launchProfileId === "fast" ? "Fast" : launchProfileId === "cheap" ? "Cheap" : launchProfileId === "cheap1m" ? "Cheap1m" : launchProfileId === "cheapest" ? "Cheapest" : "Max"} profile wiring failed; refusing to launch an unguarded session: ${err instanceof Error ? err.message : String(err)}`;
|
|
997
1066
|
consola.error(message);
|
|
998
1067
|
process$1.stderr.write(`${message}\n`);
|
|
999
1068
|
process$1.exit(1);
|
|
@@ -1045,7 +1114,9 @@ const claude = defineCommand({
|
|
|
1045
1114
|
onExitSummary: () => {
|
|
1046
1115
|
const snapshot = aicSnapshot();
|
|
1047
1116
|
if (snapshot.requests === 0 || snapshot.totalNanoAiu <= 0) return;
|
|
1048
|
-
|
|
1117
|
+
const summary = formatAicExitSummary(snapshot, { verbose: consola.level >= 4 });
|
|
1118
|
+
const table = formatDiscountedCostTable(snapshot, discountedUsdForSnapshot(snapshot));
|
|
1119
|
+
return table ? `${summary}\n${table}` : summary;
|
|
1049
1120
|
}
|
|
1050
1121
|
});
|
|
1051
1122
|
}
|
|
@@ -1053,4 +1124,4 @@ const claude = defineCommand({
|
|
|
1053
1124
|
//#endregion
|
|
1054
1125
|
export { claude };
|
|
1055
1126
|
|
|
1056
|
-
//# sourceMappingURL=claude-
|
|
1127
|
+
//# sourceMappingURL=claude-CJ4Nd2_3.js.map
|