github-router 0.3.311 → 0.3.312
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-jLxSnmZT.js → attribution-settings-os6aa-ck.js} +125 -14
- package/dist/attribution-settings-os6aa-ck.js.map +1 -0
- package/dist/browser-ext/manifest.json +1 -1
- package/dist/{claude-DhvQETaa.js → claude-CHObdsb5.js} +111 -42
- package/dist/claude-CHObdsb5.js.map +1 -0
- package/dist/{codex-RJQPJ--K.js → codex-CUQklRRv.js} +4 -4
- package/dist/{codex-RJQPJ--K.js.map → codex-CUQklRRv.js.map} +1 -1
- package/dist/engine-DyzGsCUb.js +2 -0
- package/dist/{gate-discovery-DDkRvyYL.js → gate-discovery-_flEdhYo.js} +2 -2
- package/dist/{gate-discovery-DDkRvyYL.js.map → gate-discovery-_flEdhYo.js.map} +1 -1
- package/dist/{internal-stop-hook-YyYVQbbN.js → internal-stop-hook-BJ3o61-L.js} +2 -2
- package/dist/{internal-stop-hook-YyYVQbbN.js.map → internal-stop-hook-BJ3o61-L.js.map} +1 -1
- package/dist/main.js +5 -5
- package/dist/{peer-mcp-personas-O35uSWsX.js → peer-mcp-personas-DklYru_1.js} +236 -58
- package/dist/peer-mcp-personas-DklYru_1.js.map +1 -0
- package/dist/{provision-Ho5v-tt-.js → provision-BYdIsKcp.js} +2 -2
- package/dist/{provision-Ho5v-tt-.js.map → provision-BYdIsKcp.js.map} +1 -1
- package/dist/{serve-Cb-sUTL8.js → serve-B70Kczq6.js} +5 -5
- package/dist/{serve-Cb-sUTL8.js.map → serve-B70Kczq6.js.map} +1 -1
- package/dist/{server-setup-OTy-qHfv.js → server-setup-DX27fdcf.js} +244 -18
- package/dist/server-setup-DX27fdcf.js.map +1 -0
- package/dist/{start-Ch_iOkQE.js → start-JbcSzClY.js} +3 -3
- package/dist/{start-Ch_iOkQE.js.map → start-JbcSzClY.js.map} +1 -1
- package/package.json +1 -1
- package/dist/attribution-settings-jLxSnmZT.js.map +0 -1
- package/dist/claude-DhvQETaa.js.map +0 -1
- package/dist/engine-DuiPBB4G.js +0 -2
- package/dist/peer-mcp-personas-O35uSWsX.js.map +0 -1
- package/dist/server-setup-OTy-qHfv.js.map +0 -1
|
@@ -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.312",
|
|
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,21 +1,21 @@
|
|
|
1
|
-
import { Ct as
|
|
1
|
+
import { $t as colbertDegradedWarning, At as scribeModel, Bt as registerLaunch, Ct as generalPurposeFastModel, D as toolbeltEnabled, Dt as reviewerFastModel, E as buildToolbeltAwareness, Et as resolveGeminiReviewModel, Mt as workerToolsEnabled, Nn as CHEAP_PROFILE_NATIVE_MODELS, Ot as reviewerModel, St as geminiAvailable, T as availableToolCommands, Tt as nativeSubagentModel, Vt as unregisterLaunch, Zt as provisionBrowserAssets, _t as fastOracleModel, at as artifactToolsEnabled, bn as pickClaudeDefault, bt as fastScoutModel, ct as browserCompoundToolsEnabled, dt as cheapOracleModel, en as provisionAndIndexColbert, fn as DEFAULT_CLAUDE_MODEL_FALLBACKS, ft as cheapReviewerModel, gt as fastImplementerModel, ht as fastGeneralPurposeModel, it as agentToolsEnabled, jt as standInToolEnabled, kn as CHEAP_PROFILE_ADVISOR_CLIENT_MODEL, kt as scoutModel, lt as browserToolsEnabled, mt as fastAstraModel, o as buildPeerAwarenessSnippet, ot as brainstormModel, pt as fastAdvisorModel, r as agentNamesForToolAllowlist, rn as warmTreeSitterPool, s as buildPeerAwarenessSummary, sn as shouldUseInsecureTls, st as browseAgentEnabled, ut as cheapAdvisorModel, vt as fastPlanModel, wt as implementerFastModel, xn as resolveLeadSlugArg, xt as fleetToolsEnabled, yn as isBudgetClaudeLead, yt as fastReviewerModel } from "./peer-mcp-personas-DklYru_1.js";
|
|
2
2
|
import { o as removeOwnClaudeConfigMirror, r as ensureClaudeConfigMirror, t as PATHS, u as writeArtifactCredsToMirror } from "./paths-De1Qh9Q9.js";
|
|
3
3
|
import { t as state } from "./state-B8adscCv.js";
|
|
4
4
|
import { d as resolveModel } from "./token-CCg-Ov5q.js";
|
|
5
5
|
import { r as parseBoolEnv } from "./exec-y8C_MU8A.js";
|
|
6
|
-
import { _ as
|
|
6
|
+
import { C as checkClaudeVersion, S as runSelfUpdate, _ as resolveLaunchProfile, a as sharedServerArgs, b as validateFastProfilePrerequisites, c as stopKeepAwake, d as enableFileLogging, g as profileDescriptor, h as formatFastPrerequisiteFailure, 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 validateCheap1mProfilePrerequisites, w as updateClaude, x as validateMaxProfileLaunch, y as validateCheapProfilePrerequisites } from "./server-setup-DX27fdcf.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-BcrMlrmo.js";
|
|
9
9
|
import { n as hookLauncherDegradedWarning, r as resolveSelfInvocation } from "./self-invocation-B84JCHps.js";
|
|
10
|
-
import { i as launchChild, r as getCodexVersion, t as provisionToolbelt } from "./provision-
|
|
10
|
+
import { i as launchChild, r as getCodexVersion, t as provisionToolbelt } from "./provision-BYdIsKcp.js";
|
|
11
11
|
import { i as captureLaunchBaseline, l as stopGateDisabled, n as buildSessionBindHookCommand, r as buildStopHookCommand, s as injectStopHookIntoSettingsFile, t as buildArtifactOpenHookCommand, u as stopGateId } from "./stop-gate-hook-BEU8qQrC.js";
|
|
12
12
|
import { t as liveExec } from "./orchestration-DjLA-lxB.js";
|
|
13
13
|
import { c as repoRoot, d as trustRepo, l as stopGateEnabledForRepo, s as repoFingerprint, t as fileBaselineStore } from "./stop-gate-policy-qzqXfRxE.js";
|
|
14
14
|
import { l as guardToolMatcher, n as activeDispatchModes, r as buildWorkerGuardHookCommand } from "./worker-dispatch-CH-NN5FW.js";
|
|
15
|
-
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-
|
|
15
|
+
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-os6aa-ck.js";
|
|
16
16
|
import { r as hookMcpRuntimeFromEnv } from "./hook-mcp-client-DBvm9608.js";
|
|
17
17
|
import { i as planReviewEnabled, t as buildPlanReviewHookCommand } from "./plan-review-hook-vL6BYmA8.js";
|
|
18
|
-
import { a as checksForDescriptor, i as writeDiscoveredGate, n as readDiscoveredGate, o as descriptorHash, r as sourcesHash, s as parseGateDescriptor, t as discoverGateCommands } from "./gate-discovery-
|
|
18
|
+
import { a as checksForDescriptor, i as writeDiscoveredGate, n as readDiscoveredGate, o as descriptorHash, r as sourcesHash, s as parseGateDescriptor, t as discoverGateCommands } from "./gate-discovery-_flEdhYo.js";
|
|
19
19
|
import { t as buildPromptSubmitHookCommand } from "./prompt-submit-hook-DfqufWC1.js";
|
|
20
20
|
import { i as assertShapingInstalled, n as buildFirstMateGuardHookCommand, t as FIRST_MATE_GUARD_MATCHER } from "./internal-first-mate-guard-BuweUgjb.js";
|
|
21
21
|
import { r as FAST_DISPATCH_TOOL_MATCHER, t as buildFastDispatchGuardHookCommand } from "./internal-fast-dispatch-guard-19xQEouu.js";
|
|
@@ -64,8 +64,8 @@ function createFastLaunchCleanup(deps) {
|
|
|
64
64
|
}
|
|
65
65
|
//#endregion
|
|
66
66
|
//#region src/lib/fast-advisor-client.ts
|
|
67
|
-
const ADVISOR_FLAG = "--advisor";
|
|
68
|
-
function featureEnvEnabled(value) {
|
|
67
|
+
const ADVISOR_FLAG$1 = "--advisor";
|
|
68
|
+
function featureEnvEnabled$1(value) {
|
|
69
69
|
if (value === void 0) return true;
|
|
70
70
|
return ![
|
|
71
71
|
"",
|
|
@@ -78,7 +78,7 @@ function featureEnvEnabled(value) {
|
|
|
78
78
|
/** Match Claude Code's hard-disable and experimental-enable opt-out semantics. */
|
|
79
79
|
function fastAdvisorClientEnabled(env = process.env) {
|
|
80
80
|
if (env.CLAUDE_CODE_DISABLE_ADVISOR_TOOL) return false;
|
|
81
|
-
return featureEnvEnabled(env.CLAUDE_CODE_ENABLE_EXPERIMENTAL_ADVISOR_TOOL);
|
|
81
|
+
return featureEnvEnabled$1(env.CLAUDE_CODE_ENABLE_EXPERIMENTAL_ADVISOR_TOOL);
|
|
82
82
|
}
|
|
83
83
|
/**
|
|
84
84
|
* Remove every caller-supplied Advisor option and insert the fixed fast value.
|
|
@@ -91,6 +91,53 @@ function fastAdvisorClientEnabled(env = process.env) {
|
|
|
91
91
|
* missing-value forms are simply removed.
|
|
92
92
|
*/
|
|
93
93
|
function withFixedFastAdvisorArg(args, enabled = fastAdvisorClientEnabled()) {
|
|
94
|
+
const sanitized = [];
|
|
95
|
+
for (let index = 0; index < args.length; index++) {
|
|
96
|
+
const token = args[index];
|
|
97
|
+
if (token === ADVISOR_FLAG$1) {
|
|
98
|
+
const next = args[index + 1];
|
|
99
|
+
if (next !== void 0 && next !== "--" && !next.startsWith("-")) index++;
|
|
100
|
+
continue;
|
|
101
|
+
}
|
|
102
|
+
if (token.startsWith(`${ADVISOR_FLAG$1}=`)) continue;
|
|
103
|
+
sanitized.push(token);
|
|
104
|
+
}
|
|
105
|
+
if (!enabled) return sanitized;
|
|
106
|
+
const separator = sanitized.indexOf("--");
|
|
107
|
+
const fixed = [ADVISOR_FLAG$1, FAST_PROFILE_ADVISOR_CLIENT_MODEL];
|
|
108
|
+
if (separator < 0) return [...sanitized, ...fixed];
|
|
109
|
+
return [
|
|
110
|
+
...sanitized.slice(0, separator),
|
|
111
|
+
...fixed,
|
|
112
|
+
...sanitized.slice(separator)
|
|
113
|
+
];
|
|
114
|
+
}
|
|
115
|
+
//#endregion
|
|
116
|
+
//#region src/lib/cheap-advisor-client.ts
|
|
117
|
+
const ADVISOR_FLAG = "--advisor";
|
|
118
|
+
function featureEnvEnabled(value) {
|
|
119
|
+
if (value === void 0) return true;
|
|
120
|
+
return ![
|
|
121
|
+
"",
|
|
122
|
+
"0",
|
|
123
|
+
"false",
|
|
124
|
+
"no",
|
|
125
|
+
"off"
|
|
126
|
+
].includes(value.trim().toLowerCase());
|
|
127
|
+
}
|
|
128
|
+
/** Match Claude Code's hard-disable and experimental-enable opt-out semantics. */
|
|
129
|
+
function cheapAdvisorClientEnabled(env = process.env) {
|
|
130
|
+
if (env.CLAUDE_CODE_DISABLE_ADVISOR_TOOL) return false;
|
|
131
|
+
return featureEnvEnabled(env.CLAUDE_CODE_ENABLE_EXPERIMENTAL_ADVISOR_TOOL);
|
|
132
|
+
}
|
|
133
|
+
/**
|
|
134
|
+
* Remove every caller-supplied Advisor option and insert the fixed cheap value
|
|
135
|
+
* (the BARE `gpt-5.6-sol` — 200K default window — see
|
|
136
|
+
* `CHEAP_PROFILE_ADVISOR_CLIENT_MODEL`). Same parser semantics as the fast
|
|
137
|
+
* variant: keeps scanning after `--`, and the fixed option is inserted before
|
|
138
|
+
* the first separator so Claude Code parses it as an option.
|
|
139
|
+
*/
|
|
140
|
+
function withFixedCheapAdvisorArg(args, enabled = cheapAdvisorClientEnabled()) {
|
|
94
141
|
const sanitized = [];
|
|
95
142
|
for (let index = 0; index < args.length; index++) {
|
|
96
143
|
const token = args[index];
|
|
@@ -104,7 +151,7 @@ function withFixedFastAdvisorArg(args, enabled = fastAdvisorClientEnabled()) {
|
|
|
104
151
|
}
|
|
105
152
|
if (!enabled) return sanitized;
|
|
106
153
|
const separator = sanitized.indexOf("--");
|
|
107
|
-
const fixed = [ADVISOR_FLAG,
|
|
154
|
+
const fixed = [ADVISOR_FLAG, CHEAP_PROFILE_ADVISOR_CLIENT_MODEL];
|
|
108
155
|
if (separator < 0) return [...sanitized, ...fixed];
|
|
109
156
|
return [
|
|
110
157
|
...sanitized.slice(0, separator),
|
|
@@ -119,7 +166,7 @@ const claudeArgs = {
|
|
|
119
166
|
model: {
|
|
120
167
|
alias: "m",
|
|
121
168
|
type: "string",
|
|
122
|
-
description: "Override the default model for Claude Code. Accepts 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."
|
|
169
|
+
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."
|
|
123
170
|
},
|
|
124
171
|
"codex-mcp": {
|
|
125
172
|
type: "boolean",
|
|
@@ -236,8 +283,8 @@ const claude = defineCommand({
|
|
|
236
283
|
process$1.stderr.write(`Max profile uses its fixed HTTP MCP surface; --codex-cli is not supported in max profile.\n`);
|
|
237
284
|
process$1.exit(1);
|
|
238
285
|
}
|
|
239
|
-
if ((requestedLaunchProfileId === "fast" || requestedLaunchProfileId === "max") && !codexMcpEnabled) {
|
|
240
|
-
const message = `github-router claude -m ${requestedLaunchProfileId === "fast" ? "fast" : "max"} requires codex MCP wiring for its native roster and dispatch ACL; remove --no-codex-mcp or choose a standard model.`;
|
|
286
|
+
if ((requestedLaunchProfileId === "fast" || requestedLaunchProfileId === "max" || requestedLaunchProfileId === "cheap" || requestedLaunchProfileId === "cheap1m") && !codexMcpEnabled) {
|
|
287
|
+
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.`;
|
|
241
288
|
process$1.stderr.write(`${message}\n`);
|
|
242
289
|
process$1.exit(1);
|
|
243
290
|
}
|
|
@@ -323,6 +370,9 @@ const claude = defineCommand({
|
|
|
323
370
|
} else if (launchProfileId === "max") {
|
|
324
371
|
const prereqCheck = validateMaxProfileLaunch(state.models);
|
|
325
372
|
if (!prereqCheck.ok) await fastFatal(formatMaxPrerequisiteFailure(prereqCheck.missing));
|
|
373
|
+
} else if (launchProfileId === "cheap" || launchProfileId === "cheap1m") {
|
|
374
|
+
const prereqCheck = launchProfileId === "cheap1m" ? validateCheap1mProfilePrerequisites(state.models) : validateCheapProfilePrerequisites(state.models);
|
|
375
|
+
if (!prereqCheck.ok) await fastFatal(launchProfileId === "cheap1m" ? formatCheap1mPrerequisiteFailure(prereqCheck.missing) : formatCheapPrerequisiteFailure(prereqCheck.missing));
|
|
326
376
|
}
|
|
327
377
|
let chosenSlug = requestedSlug;
|
|
328
378
|
let resolvedSlug = resolveModel(chosenSlug);
|
|
@@ -357,6 +407,7 @@ const claude = defineCommand({
|
|
|
357
407
|
const envVars = getClaudeCodeEnvVars(serverUrl, chosenSlug, launchProfileId, pickerModels);
|
|
358
408
|
let extraArgs = collectChildPassthroughArgs(rawArgs, claudeArgs);
|
|
359
409
|
if (launchProfileId === "fast") extraArgs = withFixedFastAdvisorArg(extraArgs, fastAdvisorClientEnabled(process$1.env));
|
|
410
|
+
else if (launchProfileId === "cheap" || launchProfileId === "cheap1m") extraArgs = withFixedCheapAdvisorArg(extraArgs, cheapAdvisorClientEnabled(process$1.env));
|
|
360
411
|
if (toolbeltEnabled()) {
|
|
361
412
|
provisionToolbelt().catch((err) => consola.debug("Toolbelt provisioning failed:", err));
|
|
362
413
|
const toolbeltLine = buildToolbeltAwareness(availableToolCommands());
|
|
@@ -381,8 +432,8 @@ const claude = defineCommand({
|
|
|
381
432
|
let peerAwarenessSnippet;
|
|
382
433
|
let peerAwarenessSummary;
|
|
383
434
|
let operatingGroupKeys = {};
|
|
384
|
-
let fastWiringComplete = launchProfileId !== "fast";
|
|
385
|
-
const astraAvailable = launchProfileId === "fast" && Boolean(fastAstraModel());
|
|
435
|
+
let fastWiringComplete = launchProfileId !== "fast" && !(launchProfileId === "cheap" || launchProfileId === "cheap1m");
|
|
436
|
+
const astraAvailable = (launchProfileId === "fast" || launchProfileId === "cheap1m") && Boolean(fastAstraModel());
|
|
386
437
|
const browseAgentAvailable = browseAgentEnabled();
|
|
387
438
|
const directBrowserAvailable = browserToolsEnabled();
|
|
388
439
|
const artifactAvailable = artifactToolsEnabled();
|
|
@@ -394,6 +445,12 @@ const claude = defineCommand({
|
|
|
394
445
|
"general-purpose": fastGeneralPurposeModel(),
|
|
395
446
|
implementer: fastImplementerModel(),
|
|
396
447
|
reviewer: fastReviewerModel()
|
|
448
|
+
} : launchProfileId === "cheap" || launchProfileId === "cheap1m" ? {
|
|
449
|
+
Explore: CHEAP_PROFILE_NATIVE_MODELS.Explore,
|
|
450
|
+
Plan: CHEAP_PROFILE_NATIVE_MODELS.Plan,
|
|
451
|
+
"general-purpose": CHEAP_PROFILE_NATIVE_MODELS["general-purpose"],
|
|
452
|
+
implementer: CHEAP_PROFILE_NATIVE_MODELS.implementer,
|
|
453
|
+
reviewer: cheapReviewerModel()
|
|
397
454
|
} : launchProfileId === "max" ? {
|
|
398
455
|
Explore: MAX_PROFILE_MODELS.luna,
|
|
399
456
|
Plan: MAX_PROFILE_MODELS.sol,
|
|
@@ -412,7 +469,7 @@ const claude = defineCommand({
|
|
|
412
469
|
"general-purpose-fast": generalPurposeFastModel()
|
|
413
470
|
};
|
|
414
471
|
const nativeAvailability = {
|
|
415
|
-
scoutAvailable: (launchProfileId === "fast" ? nativeAgentModels.Explore : nativeAgentModels.scout) != null,
|
|
472
|
+
scoutAvailable: (launchProfileId === "fast" || launchProfileId === "cheap" || launchProfileId === "cheap1m" ? nativeAgentModels.Explore : nativeAgentModels.scout) != null,
|
|
416
473
|
implementerFastAvailable: nativeAgentModels["implementer-fast"] != null,
|
|
417
474
|
reviewerFastAvailable: nativeAgentModels["reviewer-fast"] != null,
|
|
418
475
|
generalPurposeFastAvailable: nativeAgentModels["general-purpose-fast"] != null,
|
|
@@ -428,33 +485,38 @@ const claude = defineCommand({
|
|
|
428
485
|
const requestedCli = args["codex-cli"] ?? false;
|
|
429
486
|
const isFastProfile = launchProfileId === "fast";
|
|
430
487
|
const isMaxProfile = launchProfileId === "max";
|
|
431
|
-
|
|
432
|
-
const
|
|
488
|
+
const isCheapProfile = launchProfileId === "cheap" || launchProfileId === "cheap1m";
|
|
489
|
+
const isPinnedProfile = isFastProfile || isMaxProfile || isCheapProfile;
|
|
490
|
+
if ((isFastProfile || isCheapProfile) && requestedCli) process$1.stderr.write("Fast/cheap profile uses its fixed HTTP MCP surface; ignoring --codex-cli.\n");
|
|
491
|
+
const backend = isPinnedProfile ? "http" : resolveCodexCliBackend({
|
|
433
492
|
requested: requestedCli,
|
|
434
493
|
codexInfo: requestedCli ? getCodexVersion() : null
|
|
435
494
|
});
|
|
436
495
|
const geminiModelsAvailable = isMaxProfile ? maxGeminiModel() !== void 0 : geminiAvailable();
|
|
437
496
|
if (!geminiModelsAvailable) consola.info(isMaxProfile ? "Neither Grok 4.6/high nor Gemini 3.8 Flash 1M/high is usable; max third-lab personas and stand_in will not be registered." : "gemini-3.1-pro-preview not found in your Copilot model catalog; gemini-critic persona will not be registered.");
|
|
438
497
|
const fastDescriptor = profileDescriptor(launchProfileId);
|
|
439
|
-
const baseGroups =
|
|
498
|
+
const baseGroups = isPinnedProfile ? ["peers", "search"] : [
|
|
440
499
|
"peers",
|
|
441
500
|
"search",
|
|
442
501
|
"orchestrate"
|
|
443
502
|
];
|
|
444
|
-
if (workerToolsEnabled() && !
|
|
445
|
-
if (
|
|
503
|
+
if (workerToolsEnabled() && !isPinnedProfile) baseGroups.push("workers");
|
|
504
|
+
if (isPinnedProfile && browseAgentAvailable) baseGroups.push("workers");
|
|
446
505
|
const enabledGroups = fastDescriptor.allowedGroups ? baseGroups.filter((g) => fastDescriptor.allowedGroups.has(g)) : baseGroups;
|
|
447
|
-
if (!
|
|
506
|
+
if (!isPinnedProfile && standInToolEnabled()) enabledGroups.push("decide");
|
|
448
507
|
if (isMaxProfile && maxOpusModel() !== void 0 && standInToolEnabled({ maxProfile: true })) enabledGroups.push("decide");
|
|
449
508
|
if (directBrowserAvailable && (!fastDescriptor.allowedGroups || fastDescriptor.allowedGroups.has("browser"))) enabledGroups.push("browser");
|
|
450
|
-
if (!
|
|
451
|
-
if (!
|
|
509
|
+
if (!isPinnedProfile && fleetToolsEnabled()) enabledGroups.push("fleet");
|
|
510
|
+
if (!isPinnedProfile && agentToolsEnabled()) enabledGroups.push("first-mate");
|
|
452
511
|
if (isMaxProfile && fleetToolsEnabled()) enabledGroups.push("fleet");
|
|
453
512
|
if (isMaxProfile && agentToolsEnabled()) enabledGroups.push("first-mate");
|
|
454
513
|
const { keys: groupKeys, skipped: skippedGroups } = await resolveGroupKeysFromMirror(enabledGroups);
|
|
455
514
|
operatingGroupKeys = groupKeys;
|
|
456
|
-
if (
|
|
457
|
-
|
|
515
|
+
if (isPinnedProfile && ((isCheapProfile ? cheapOracleModel() : fastOracleModel()) == null || (isCheapProfile ? cheapAdvisorModel() : fastAdvisorModel()) == null || nativeAgentModels.implementer == null)) {
|
|
516
|
+
if (isCheapProfile) throw new Error("cheap profile prerequisite drift: exact implementer or oracle (grok-4.6) model no longer resolves");
|
|
517
|
+
throw new Error("fast profile prerequisite drift: exact Oracle, Advisor, or implementer model no longer resolves");
|
|
518
|
+
}
|
|
519
|
+
const leadPeersNonce = (isFastProfile || launchProfileId === "cheap1m") && astraAvailable ? randomBytes(32).toString("hex") : void 0;
|
|
458
520
|
const runtime = await writePeerMcpRuntimeFiles(serverUrl, {
|
|
459
521
|
codexCli: backend === "cli",
|
|
460
522
|
selfInvocation,
|
|
@@ -462,18 +524,18 @@ const claude = defineCommand({
|
|
|
462
524
|
geminiModel: isMaxProfile ? maxGeminiModel() : resolveGeminiReviewModel(),
|
|
463
525
|
groupKeys,
|
|
464
526
|
parentGroupNonceOverrides: leadPeersNonce ? { peers: leadPeersNonce } : void 0,
|
|
465
|
-
workerToolsAvailable: !
|
|
527
|
+
workerToolsAvailable: !isPinnedProfile && workerToolsEnabled(),
|
|
466
528
|
browseAvailable: browseAgentAvailable,
|
|
467
529
|
nativeSubagentModel: nativeAgentModels.implementer,
|
|
468
530
|
reviewerModel: nativeAgentModels.reviewer,
|
|
469
531
|
reviewerFastModel: nativeAgentModels["reviewer-fast"],
|
|
470
532
|
brainstormModel: nativeAgentModels.brainstorm,
|
|
471
|
-
scoutModel: isFastProfile ? nativeAgentModels.Explore : nativeAgentModels.scout,
|
|
533
|
+
scoutModel: isFastProfile || isCheapProfile ? nativeAgentModels.Explore : nativeAgentModels.scout,
|
|
472
534
|
scribeModel: nativeAgentModels.scribe,
|
|
473
535
|
implementerFastModel: nativeAgentModels["implementer-fast"],
|
|
474
536
|
generalPurposeFastModel: nativeAgentModels["general-purpose-fast"],
|
|
475
537
|
nativeRoster: fastDescriptor.nativeRoster,
|
|
476
|
-
personaAllowlist: isFastProfile ? void 0 : fastDescriptor.personaAllowlist ? agentNamesForToolAllowlist(fastDescriptor.personaAllowlist) : void 0,
|
|
538
|
+
personaAllowlist: isFastProfile || isCheapProfile ? void 0 : fastDescriptor.personaAllowlist ? agentNamesForToolAllowlist(fastDescriptor.personaAllowlist) : void 0,
|
|
477
539
|
includeCoordinator: fastDescriptor.hasCoordinator,
|
|
478
540
|
...isFastProfile ? {
|
|
479
541
|
fastProfile: true,
|
|
@@ -482,6 +544,13 @@ const claude = defineCommand({
|
|
|
482
544
|
fastGeneralPurposeModel: nativeAgentModels["general-purpose"],
|
|
483
545
|
fastImplementerModel: nativeAgentModels.implementer,
|
|
484
546
|
fastReviewerModel: nativeAgentModels.reviewer
|
|
547
|
+
} : isCheapProfile ? {
|
|
548
|
+
cheapProfile: true,
|
|
549
|
+
cheapExploreModel: nativeAgentModels.Explore,
|
|
550
|
+
cheapPlanModel: nativeAgentModels.Plan,
|
|
551
|
+
cheapGeneralPurposeModel: nativeAgentModels["general-purpose"],
|
|
552
|
+
cheapImplementerModel: nativeAgentModels.implementer,
|
|
553
|
+
cheapReviewerModel: nativeAgentModels.reviewer
|
|
485
554
|
} : isMaxProfile ? {
|
|
486
555
|
maxProfile: true,
|
|
487
556
|
workerToolsAvailable: false,
|
|
@@ -504,7 +573,7 @@ const claude = defineCommand({
|
|
|
504
573
|
}
|
|
505
574
|
} : {}
|
|
506
575
|
});
|
|
507
|
-
if (
|
|
576
|
+
if (isPinnedProfile) fastRuntimeCleanup = runtime.cleanup;
|
|
508
577
|
const maxPersonaNames = isMaxProfile ? runtime.personas.map((persona) => persona.toolNameHttp) : void 0;
|
|
509
578
|
const launchSecret = randomBytes(32).toString("hex");
|
|
510
579
|
const launchEntry = registerLaunch({
|
|
@@ -515,11 +584,11 @@ const claude = defineCommand({
|
|
|
515
584
|
allowedGroups: fastDescriptor.allowedGroups,
|
|
516
585
|
allowedPersonas: fastDescriptor.personaAllowlist
|
|
517
586
|
});
|
|
518
|
-
if (
|
|
587
|
+
if (isPinnedProfile) fastLaunchId = launchEntry.launchId;
|
|
519
588
|
envVars.ANTHROPIC_CUSTOM_HEADERS = envVars.ANTHROPIC_CUSTOM_HEADERS ? `${envVars.ANTHROPIC_CUSTOM_HEADERS}\n${LAUNCH_SECRET_HEADER}: ${launchSecret}` : `${LAUNCH_SECRET_HEADER}: ${launchSecret}`;
|
|
520
589
|
envVars.GH_ROUTER_HOOK_MCP_URL = serverUrl;
|
|
521
590
|
envVars.GH_ROUTER_HOOK_NONCE = runtime.nonce;
|
|
522
|
-
onShutdown =
|
|
591
|
+
onShutdown = isPinnedProfile ? async () => {
|
|
523
592
|
try {
|
|
524
593
|
unregisterLaunch(launchEntry.launchId);
|
|
525
594
|
} finally {
|
|
@@ -537,7 +606,7 @@ const claude = defineCommand({
|
|
|
537
606
|
};
|
|
538
607
|
let subagentVisibility;
|
|
539
608
|
let injected;
|
|
540
|
-
if (isFastProfile) {
|
|
609
|
+
if (isFastProfile || isCheapProfile) {
|
|
541
610
|
extraArgs.push("--mcp-config", runtime.mcpConfigPath);
|
|
542
611
|
if (args["codex-mcp-only"] === true) extraArgs.push("--strict-mcp-config");
|
|
543
612
|
subagentVisibility = "role-scoped (lead via --mcp-config; subagents via inline mcpServers)";
|
|
@@ -555,7 +624,7 @@ const claude = defineCommand({
|
|
|
555
624
|
} 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.");
|
|
556
625
|
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)`;
|
|
557
626
|
}
|
|
558
|
-
if (isFastProfile) {
|
|
627
|
+
if (isFastProfile || isCheapProfile) {
|
|
559
628
|
let fastGuardInstalled = false;
|
|
560
629
|
try {
|
|
561
630
|
const settingsPath = path.join(PATHS.CLAUDE_CONFIG_DIR, "settings.json");
|
|
@@ -566,7 +635,7 @@ const claude = defineCommand({
|
|
|
566
635
|
await injectStopHookIntoSettingsFile(settingsPath, guardCommand, "PreToolUse", 10, FAST_DISPATCH_TOOL_MATCHER);
|
|
567
636
|
fastGuardInstalled = true;
|
|
568
637
|
} catch (err) {
|
|
569
|
-
consola.error(`Could not register the fast native dispatch ACL hook: ${String(err)}`);
|
|
638
|
+
consola.error(`Could not register the fast/cheap native dispatch ACL hook: ${String(err)}`);
|
|
570
639
|
}
|
|
571
640
|
assertFastDispatchGuardInstalled(true, fastGuardInstalled);
|
|
572
641
|
fastWiringComplete = true;
|
|
@@ -613,12 +682,12 @@ const claude = defineCommand({
|
|
|
613
682
|
} catch (err) {
|
|
614
683
|
consola.warn(`Could not auto-approve injected tools: ${String(err)}`);
|
|
615
684
|
}
|
|
616
|
-
if (workerSkillsActive ||
|
|
685
|
+
if (workerSkillsActive || isPinnedProfile && browseAgentAvailable) if (!(isFastProfile || isCheapProfile || injected?.ok === true)) 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.");
|
|
617
686
|
else if (process$1.env.GH_ROUTER_DISABLE_WORKER_GUARD === "1") consola.info("Workers non-blocking guard disabled via GH_ROUTER_DISABLE_WORKER_GUARD=1 — raw mcp__workers__* is callable on the main thread (blocking); the worker-* background agents remain the steered, non-blocking default.");
|
|
618
687
|
else try {
|
|
619
688
|
const settingsPath = path.join(PATHS.CLAUDE_CONFIG_DIR, "settings.json");
|
|
620
689
|
const workersKey = workersKeyOf(groupKeys);
|
|
621
|
-
const modes =
|
|
690
|
+
const modes = isPinnedProfile ? ["browse"] : activeDispatchModes({ browse: browseAgentAvailable });
|
|
622
691
|
const cmd = buildWorkerGuardHookCommand(selfInvocation, workersKey, modes);
|
|
623
692
|
const matcher = guardToolMatcher(workersKey, modes);
|
|
624
693
|
await injectStopHookIntoSettingsFile(settingsPath, cmd, "PreToolUse", 10, matcher);
|
|
@@ -668,20 +737,20 @@ const claude = defineCommand({
|
|
|
668
737
|
consola.warn(`Could not register the artifact auto-open hook: ${String(err)}`);
|
|
669
738
|
}
|
|
670
739
|
}
|
|
671
|
-
if (!isFastProfile && hookMcpRuntimeFromEnv(envVars) && planReviewEnabled()) try {
|
|
740
|
+
if (!isFastProfile && !isCheapProfile && hookMcpRuntimeFromEnv(envVars) && planReviewEnabled()) try {
|
|
672
741
|
const settingsPath = path.join(PATHS.CLAUDE_CONFIG_DIR, "settings.json");
|
|
673
742
|
const command = buildPlanReviewHookCommand(selfInvocation);
|
|
674
743
|
await injectStopHookIntoSettingsFile(settingsPath, command, "PostToolUse", void 0, "ExitPlanMode");
|
|
675
744
|
} catch (err) {
|
|
676
745
|
consola.warn(`Could not register the advisory plan-review hook: ${String(err)}`);
|
|
677
746
|
}
|
|
678
|
-
if (!isFastProfile && !isMaxProfile && args["trust-gate"] === true) try {
|
|
747
|
+
if (!isFastProfile && !isCheapProfile && !isMaxProfile && args["trust-gate"] === true) try {
|
|
679
748
|
const root = await trustRepo(sessionCwd);
|
|
680
749
|
process$1.stderr.write(`Structural gate trusted for this repo (${root}); it will run on launch here from now on.\n`);
|
|
681
750
|
} catch (err) {
|
|
682
751
|
consola.warn(`Could not record gate trust: ${String(err)}`);
|
|
683
752
|
}
|
|
684
|
-
const gateDisabled =
|
|
753
|
+
const gateDisabled = isPinnedProfile || stopGateDisabled(args);
|
|
685
754
|
const forceEnabled = parseBoolEnv(process$1.env.GH_ROUTER_ENABLE_STOP_GATE) === true;
|
|
686
755
|
const includeTests = parseBoolEnv(process$1.env.GH_ROUTER_STOP_GATE_RUN_TESTS) === true;
|
|
687
756
|
const gateRoot = await repoRoot(sessionCwd).catch(() => sessionCwd);
|
|
@@ -821,13 +890,13 @@ const claude = defineCommand({
|
|
|
821
890
|
consola.warn(`Style-directive CLAUDE.md prepend failed: ${err instanceof Error ? err.message : String(err)}`);
|
|
822
891
|
}
|
|
823
892
|
} catch (err) {
|
|
824
|
-
if (launchProfileId === "fast" || launchProfileId === "max") {
|
|
893
|
+
if (launchProfileId === "fast" || launchProfileId === "max" || launchProfileId === "cheap" || launchProfileId === "cheap1m") {
|
|
825
894
|
if (fastLaunchId) unregisterLaunch(fastLaunchId);
|
|
826
895
|
await disposeFastRuntime().catch(() => {});
|
|
827
896
|
await server.close(true).catch(() => {});
|
|
828
897
|
await baseShutdown().catch(() => {});
|
|
829
898
|
resetFastRuntimeOwnership();
|
|
830
|
-
const message = `${launchProfileId === "fast" ? "Fast" : "Max"} profile wiring failed; refusing to launch an unguarded session: ${err instanceof Error ? err.message : String(err)}`;
|
|
899
|
+
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)}`;
|
|
831
900
|
consola.error(message);
|
|
832
901
|
process$1.stderr.write(`${message}\n`);
|
|
833
902
|
process$1.exit(1);
|
|
@@ -870,4 +939,4 @@ const claude = defineCommand({
|
|
|
870
939
|
//#endregion
|
|
871
940
|
export { claude };
|
|
872
941
|
|
|
873
|
-
//# sourceMappingURL=claude-
|
|
942
|
+
//# sourceMappingURL=claude-CHObdsb5.js.map
|