github-router 0.3.202 → 0.3.204
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/browser-ext/manifest.json +1 -1
- package/dist/{engine-CIt6z9K3.js → engine-DI8PNfqU.js} +1 -1
- package/dist/main.js +86 -39
- package/dist/main.js.map +1 -1
- package/dist/{peer-mcp-personas-rik0SIrg.js → peer-mcp-personas-BekOx3Rp.js} +51 -23
- package/dist/peer-mcp-personas-BekOx3Rp.js.map +1 -0
- package/package.json +1 -1
- package/dist/peer-mcp-personas-rik0SIrg.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.204",
|
|
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,4 +1,4 @@
|
|
|
1
|
-
import { B as runWorkerAgent, F as EXPLORE_DEFAULT_MODEL, I as IMPLEMENT_DEFAULT_MODEL, L as PLAN_DEFAULT_MODEL, N as BROWSE_DEFAULT_MODEL, P as DEFAULT_MODEL, R as REVIEW_DEFAULT_MODEL, V as withNoOutputRetry, z as appendPlanReminder } from "./peer-mcp-personas-
|
|
1
|
+
import { B as runWorkerAgent, F as EXPLORE_DEFAULT_MODEL, I as IMPLEMENT_DEFAULT_MODEL, L as PLAN_DEFAULT_MODEL, N as BROWSE_DEFAULT_MODEL, P as DEFAULT_MODEL, R as REVIEW_DEFAULT_MODEL, V as withNoOutputRetry, z as appendPlanReminder } from "./peer-mcp-personas-BekOx3Rp.js";
|
|
2
2
|
import "./paths-BO22pMUb.js";
|
|
3
3
|
import "./lifecycle-D-1CYr1Y.js";
|
|
4
4
|
import "./lifecycle-bPdiXjYB.js";
|
package/dist/main.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
-
import { $ as buildAdvisorStream, $t as setupCopilotToken, A as trustRepo, At as readResponseBodyCapped, Bt as buildWorkspaceHeaderJson, C as fileLastPromptStore, Ct as getTokenCount, D as repoRoot, Dt as createResponses, E as repoFingerprint, Et as pickEndpoint, Ft as extractTarGzMember, G as toolbeltEnabled, Gt as DEFAULT_CODEX_MODEL_FALLBACKS, H as buildEnv, Ht as toolbeltPathOverride, It as extractZipMember, J as TOOLBELT_TOOLS, Jt as UPSTREAM_INACTIVITY_TIMEOUT_MS, K as toolbeltSkipSet, Kt as DEFAULT_PORT, Lt as shouldUseInsecureTls, M as resolveSealedGate, Mt as provisionBrowserAssets, Nt as hasSupportedBrowserInstalled, O as stopGateEnabledForRepo, Ot as createChatCompletions, Pt as provisionAndIndexColbert, Q as ADVISOR_TOOL_INSTRUCTIONS, Qt as withInstallLock, Rt as ArtifactClient, S as fileFindingsStore, St as createMessages, T as isSubagentContext, Tt as resolveMcpToolTimeoutMs, U as availableToolCommands, Ut as DEFAULT_CLAUDE_MODEL_FALLBACKS, Vt as collapsePathKeys, W as buildToolbeltAwareness, Wt as DEFAULT_CODEX_MODEL, X as searchWeb, Xt as pickClaudeDefault, Y as assetFor, Yt as generateRandomPort, Z as ADVISOR_INTERNAL_TOOL_NAME, Zt as getPackageVersion, _ as stopGateDisabled, _n as copilotBaseUrl, _t as nativeSubagentModel, a as buildPeerAwarenessSnippet, an as cacheVSCodeVersion, at as logStreamError, b as stopReviewEnabled, bn as state, bt as shimDefaultsToXhigh, c as personasFor, cn as resolveCodexModel, ct as handleMcpDelete, d as buildStopHookCommand, dn as getModels, dt as artifactToolsEnabled, en as setupGitHubAgentToken, et as injectAdvisorTool, f as captureLaunchBaseline, fn as getGitHubUser, ft as browseAgentEnabled, g as launchBaselineKey, gn as GITHUB_API_BASE_URL, gt as geminiAvailable, h as injectStopHookIntoSettingsFile, hn as forwardError, ht as fleetToolsEnabled, i as buildAgentPrompt, in as cacheModels, it as isControllerClosedError, j as liveExec, jt as parseJsonOrDiagnose, k as stopReviewStateDir, kt as MAX_RESPONSE_BODY_BYTES, l as buildArtifactOpenHookCommand, ln as resolveModel, lt as handleMcpPost, m as fileBlockBudget, mn as HTTPError, mt as browserToolsEnabled, n as MCP_GROUPS, nn as tryRefreshAndRetry, nt as buildAnthropicErrorEvent, o as buildPeerAwarenessSummary, on as filterBetaHeader, ot as readIteratorWithTimeout, p as decideStopHook, pn as fetchWithTransientRetry, pt as browserCompoundToolsEnabled, q as vscodeRipgrepPath, qt as UPSTREAM_FETCH_TIMEOUT_MS, r as assertMcpToolSurfaceConsistent, rn as cacheCopilotVersion, rt as buildOpenAIErrorEvent, s as enumerateInjectedMcpToolNames, sn as isNullish, st as relayAnthropicStream, t as GROUP_META, tn as setupGitHubToken, tt as isAdvisorRequested, u as buildSessionBindHookCommand, un as sleep$1, ut as agentToolsEnabled, v as stopGateId, vn as copilotHeaders, vt as standInToolEnabled, w as fileReviewDebounce, wt as assembleResponsesPayload, x as fileBaselineStore, xt as countTokens, y as stopGatePlanMode, yn as githubHeaders, yt as workerToolsEnabled, zt as buildWorkspaceHeaderHelperCommand } from "./peer-mcp-personas-
|
|
2
|
+
import { $ as buildAdvisorStream, $t as setupCopilotToken, A as trustRepo, At as readResponseBodyCapped, Bt as buildWorkspaceHeaderJson, C as fileLastPromptStore, Ct as getTokenCount, D as repoRoot, Dt as createResponses, E as repoFingerprint, Et as pickEndpoint, Ft as extractTarGzMember, G as toolbeltEnabled, Gt as DEFAULT_CODEX_MODEL_FALLBACKS, H as buildEnv, Ht as toolbeltPathOverride, It as extractZipMember, J as TOOLBELT_TOOLS, Jt as UPSTREAM_INACTIVITY_TIMEOUT_MS, K as toolbeltSkipSet, Kt as DEFAULT_PORT, Lt as shouldUseInsecureTls, M as resolveSealedGate, Mt as provisionBrowserAssets, Nt as hasSupportedBrowserInstalled, O as stopGateEnabledForRepo, Ot as createChatCompletions, Pt as provisionAndIndexColbert, Q as ADVISOR_TOOL_INSTRUCTIONS, Qt as withInstallLock, Rt as ArtifactClient, S as fileFindingsStore, St as createMessages, T as isSubagentContext, Tt as resolveMcpToolTimeoutMs, U as availableToolCommands, Ut as DEFAULT_CLAUDE_MODEL_FALLBACKS, Vt as collapsePathKeys, W as buildToolbeltAwareness, Wt as DEFAULT_CODEX_MODEL, X as searchWeb, Xt as pickClaudeDefault, Y as assetFor, Yt as generateRandomPort, Z as ADVISOR_INTERNAL_TOOL_NAME, Zt as getPackageVersion, _ as stopGateDisabled, _n as copilotBaseUrl, _t as nativeSubagentModel, a as buildPeerAwarenessSnippet, an as cacheVSCodeVersion, at as logStreamError, b as stopReviewEnabled, bn as state, bt as shimDefaultsToXhigh, c as personasFor, cn as resolveCodexModel, ct as handleMcpDelete, d as buildStopHookCommand, dn as getModels, dt as artifactToolsEnabled, en as setupGitHubAgentToken, et as injectAdvisorTool, f as captureLaunchBaseline, fn as getGitHubUser, ft as browseAgentEnabled, g as launchBaselineKey, gn as GITHUB_API_BASE_URL, gt as geminiAvailable, h as injectStopHookIntoSettingsFile, hn as forwardError, ht as fleetToolsEnabled, i as buildAgentPrompt, in as cacheModels, it as isControllerClosedError, j as liveExec, jt as parseJsonOrDiagnose, k as stopReviewStateDir, kt as MAX_RESPONSE_BODY_BYTES, l as buildArtifactOpenHookCommand, ln as resolveModel, lt as handleMcpPost, m as fileBlockBudget, mn as HTTPError, mt as browserToolsEnabled, n as MCP_GROUPS, nn as tryRefreshAndRetry, nt as buildAnthropicErrorEvent, o as buildPeerAwarenessSummary, on as filterBetaHeader, ot as readIteratorWithTimeout, p as decideStopHook, pn as fetchWithTransientRetry, pt as browserCompoundToolsEnabled, q as vscodeRipgrepPath, qt as UPSTREAM_FETCH_TIMEOUT_MS, r as assertMcpToolSurfaceConsistent, rn as cacheCopilotVersion, rt as buildOpenAIErrorEvent, s as enumerateInjectedMcpToolNames, sn as isNullish, st as relayAnthropicStream, t as GROUP_META, tn as setupGitHubToken, tt as isAdvisorRequested, u as buildSessionBindHookCommand, un as sleep$1, ut as agentToolsEnabled, v as stopGateId, vn as copilotHeaders, vt as standInToolEnabled, w as fileReviewDebounce, wt as assembleResponsesPayload, x as fileBaselineStore, xt as countTokens, y as stopGatePlanMode, yn as githubHeaders, yt as workerToolsEnabled, zt as buildWorkspaceHeaderHelperCommand } from "./peer-mcp-personas-BekOx3Rp.js";
|
|
3
3
|
import { a as isUnderClaudeConfigMirror, d as writeRuntimeFileSecure, i as ensurePaths, o as removeOwnClaudeConfigMirror, r as ensureClaudeConfigMirror, t as PATHS, u as writeArtifactCredsToMirror } from "./paths-BO22pMUb.js";
|
|
4
4
|
import { c as killManagedTree, d as runCommandCapture, f as runCommandVoid, l as parseBoolEnv, s as killChildProcessTree, u as resolveExecutable } from "./lifecycle-D-1CYr1Y.js";
|
|
5
5
|
import { a as sweepRegistry } from "./lifecycle-bPdiXjYB.js";
|
|
@@ -1852,6 +1852,44 @@ async function sanitizeServeSettingsEnv(settingsPath) {
|
|
|
1852
1852
|
*/
|
|
1853
1853
|
const NATIVE_RESEARCH_ALLOW_RULES = ["WebSearch", "WebFetch"];
|
|
1854
1854
|
/**
|
|
1855
|
+
* The routine native Claude Code tools serve auto-approves so ordinary agent
|
|
1856
|
+
* work stays seamless (no per-call prompt) — the exact surface a coding agent
|
|
1857
|
+
* uses turn to turn. Seeded into CloudCLI's `localStorage['claude-settings']`
|
|
1858
|
+
* `allowedTools` (feeds the Agent SDK `canUseTool` fast-path + `sdkOptions.allowedTools`).
|
|
1859
|
+
*
|
|
1860
|
+
* DELIBERATELY EXCLUDES the two interaction tools `AskUserQuestion` and
|
|
1861
|
+
* `ExitPlanMode`. CloudCLI hard-codes both into its `TOOLS_REQUIRING_INTERACTION`
|
|
1862
|
+
* set (claude-sdk.js) and renders a real question widget / plan Approve-Reject
|
|
1863
|
+
* card for them — but ONLY when `canUseTool` runs (non-bypass) AND they are NOT
|
|
1864
|
+
* pre-approved. Leaving them off this list is what routes them to the human
|
|
1865
|
+
* instead of letting the model auto-answer its own question. This is the same
|
|
1866
|
+
* line the interactive Claude CLI draws: routine tools seamless, decisions to
|
|
1867
|
+
* the user. Never add either name here.
|
|
1868
|
+
*
|
|
1869
|
+
* A tool omitted from this list degrades to a one-off Allow/Deny prompt in
|
|
1870
|
+
* CloudCLI — safe, not broken — so the list is a superset of the common surface
|
|
1871
|
+
* rather than an exact registry match (extra names for tools this Claude build
|
|
1872
|
+
* lacks are harmless no-ops).
|
|
1873
|
+
*/
|
|
1874
|
+
const SEAMLESS_BUILTIN_TOOLS = [
|
|
1875
|
+
"Task",
|
|
1876
|
+
"Bash",
|
|
1877
|
+
"BashOutput",
|
|
1878
|
+
"KillShell",
|
|
1879
|
+
"Glob",
|
|
1880
|
+
"Grep",
|
|
1881
|
+
"Read",
|
|
1882
|
+
"Edit",
|
|
1883
|
+
"Write",
|
|
1884
|
+
"NotebookEdit",
|
|
1885
|
+
"WebFetch",
|
|
1886
|
+
"WebSearch",
|
|
1887
|
+
"TodoWrite",
|
|
1888
|
+
"Skill",
|
|
1889
|
+
"SlashCommand",
|
|
1890
|
+
"EnterPlanMode"
|
|
1891
|
+
];
|
|
1892
|
+
/**
|
|
1855
1893
|
* Merge arbitrary allow rules into a mirror `settings.json` `permissions.allow`
|
|
1856
1894
|
* so the listed tools auto-run WITHOUT a permission prompt in every mode —
|
|
1857
1895
|
* including plan mode, where a matched allow rule bypasses the prompt for any
|
|
@@ -1893,42 +1931,42 @@ function planModeAllowRules(serverKeys) {
|
|
|
1893
1931
|
return [...[...new Set(serverKeys.filter(Boolean))].map((k) => `mcp__${k}`), ...NATIVE_RESEARCH_ALLOW_RULES];
|
|
1894
1932
|
}
|
|
1895
1933
|
/**
|
|
1896
|
-
*
|
|
1897
|
-
* `bypassPermissions` — the
|
|
1898
|
-
*
|
|
1899
|
-
* Agent-SDK `canUseTool` callback posts a browser `permission_request` and AWAITS
|
|
1900
|
-
* approval for every not-yet-allowed tool, stalling the chat on each injected
|
|
1901
|
-
* `mcp__*` and native call.
|
|
1934
|
+
* Ensure the serve mirror's `settings.json` `permissions.defaultMode` is NOT
|
|
1935
|
+
* `bypassPermissions` — the load-bearing half of serve's "seamless routine +
|
|
1936
|
+
* decisions to the user" model.
|
|
1902
1937
|
*
|
|
1903
|
-
*
|
|
1904
|
-
*
|
|
1905
|
-
*
|
|
1906
|
-
*
|
|
1907
|
-
*
|
|
1908
|
-
*
|
|
1909
|
-
*
|
|
1910
|
-
*
|
|
1911
|
-
*
|
|
1912
|
-
*
|
|
1938
|
+
* Under `bypassPermissions` the Agent SDK resolves approval at the permission-mode
|
|
1939
|
+
* step and SKIPS the `canUseTool` callback entirely (claude-sdk.js) — the only
|
|
1940
|
+
* channel CloudCLI's interactive widgets ride on, so `AskUserQuestion` and
|
|
1941
|
+
* `ExitPlanMode` auto-resolve on a model-generated answer and never reach the human.
|
|
1942
|
+
* CloudCLI leaves `sdkOptions.permissionMode` unset when the composer is in default
|
|
1943
|
+
* mode, so the binary falls back to THIS `defaultMode` — a stale `bypassPermissions`
|
|
1944
|
+
* here would silently re-defeat the fix through the settings vector.
|
|
1945
|
+
*
|
|
1946
|
+
* MINIMAL override: only rewrite when the mode is absent or an explicit
|
|
1947
|
+
* `bypassPermissions` (→ `"default"`, keeping `canUseTool` live). A user's
|
|
1948
|
+
* deliberate NON-bypass posture (`plan` / `acceptEdits` / `default`) is preserved
|
|
1949
|
+
* verbatim — all three already keep `canUseTool` live, so there is nothing to fix
|
|
1950
|
+
* and no reason to override their choice. `allow`/`deny`/`ask` are always untouched.
|
|
1913
1951
|
*
|
|
1914
1952
|
* Only ever rewrites the per-launch serve mirror, never the operator's real
|
|
1915
1953
|
* `~/.claude/settings.json`. Atomic temp+rename, mode 0o600. A non-object
|
|
1916
|
-
* settings.json throws
|
|
1917
|
-
* wraps this in warn-and-continue so a hiccup never blocks launch.
|
|
1954
|
+
* settings.json throws; the caller wraps this in warn-and-continue.
|
|
1918
1955
|
*
|
|
1919
|
-
* Opt out with `GH_ROUTER_SERVE_NO_AUTO_APPROVE=1` (the caller skips this
|
|
1920
|
-
* mirrored `defaultMode` is then left exactly
|
|
1956
|
+
* Opt out with `GH_ROUTER_SERVE_NO_AUTO_APPROVE=1` (the caller skips this AND the
|
|
1957
|
+
* allow-list/localStorage seed) — the mirrored `defaultMode` is then left exactly
|
|
1958
|
+
* as snapshotted and CloudCLI prompts on every not-yet-approved tool.
|
|
1921
1959
|
*/
|
|
1922
|
-
async function
|
|
1960
|
+
async function configureServeDefaultPermissionMode(settingsPath) {
|
|
1923
1961
|
const existing = await readSettingsObject(settingsPath) ?? {};
|
|
1924
1962
|
const permsRaw = existing.permissions;
|
|
1925
1963
|
const perms = permsRaw && typeof permsRaw === "object" && !Array.isArray(permsRaw) ? { ...permsRaw } : {};
|
|
1926
|
-
if (perms.defaultMode
|
|
1927
|
-
perms.defaultMode = "
|
|
1964
|
+
if (perms.defaultMode !== void 0 && perms.defaultMode !== "bypassPermissions") return { written: false };
|
|
1965
|
+
perms.defaultMode = "default";
|
|
1928
1966
|
await writeSettingsObject(settingsPath, {
|
|
1929
1967
|
...existing,
|
|
1930
1968
|
permissions: perms
|
|
1931
|
-
}, "
|
|
1969
|
+
}, "servemode");
|
|
1932
1970
|
return { written: true };
|
|
1933
1971
|
}
|
|
1934
1972
|
|
|
@@ -2797,7 +2835,7 @@ async function discoverGateCommands(cwd, opts) {
|
|
|
2797
2835
|
if (files.length === 0) return null;
|
|
2798
2836
|
let result;
|
|
2799
2837
|
try {
|
|
2800
|
-
const { runWorkerAgent } = await import("./engine-
|
|
2838
|
+
const { runWorkerAgent } = await import("./engine-DI8PNfqU.js");
|
|
2801
2839
|
result = await runWorkerAgent({
|
|
2802
2840
|
mode: "explore",
|
|
2803
2841
|
workspace: root,
|
|
@@ -4957,7 +4995,7 @@ function initProxyFromEnv() {
|
|
|
4957
4995
|
//#endregion
|
|
4958
4996
|
//#region package.json
|
|
4959
4997
|
var name = "github-router";
|
|
4960
|
-
var version$1 = "0.3.
|
|
4998
|
+
var version$1 = "0.3.204";
|
|
4961
4999
|
|
|
4962
5000
|
//#endregion
|
|
4963
5001
|
//#region src/lib/approval.ts
|
|
@@ -10778,7 +10816,7 @@ async function provisionServeEnhancements(serverUrl, opts = {}) {
|
|
|
10778
10816
|
return { removed: [] };
|
|
10779
10817
|
});
|
|
10780
10818
|
if (strip.removed.length) consola.info(`Serve: removed ${strip.removed.join(", ")} from the mirror settings (single-agent surface).`);
|
|
10781
|
-
if (process.env.GH_ROUTER_SERVE_NO_AUTO_APPROVE !== "1") await
|
|
10819
|
+
if (process.env.GH_ROUTER_SERVE_NO_AUTO_APPROVE !== "1") await configureServeDefaultPermissionMode(settingsPath).catch((err) => consola.warn(`Could not set serve permission defaults: ${String(err)}`));
|
|
10782
10820
|
await injectAllowRules(settingsPath, planModeAllowRules(injected.ok ? injected.serversAdded : [...Object.values(groupKeys).filter((k) => Boolean(k)), ...opts.codexCli === true ? ["codex-cli"] : []])).catch((err) => consola.warn(`Could not auto-approve injected tools: ${String(err)}`));
|
|
10783
10821
|
if (workerToolsEnabled()) {
|
|
10784
10822
|
await injectStopHookIntoSettingsFile(settingsPath, buildPromptSubmitHookCommand(process.execPath, process.argv[1]), "UserPromptSubmit", 45).catch((err) => consola.warn(`Could not register the UserPromptSubmit hook: ${String(err)}`));
|
|
@@ -11093,27 +11131,35 @@ const HEAD_CLOSE = "</head>";
|
|
|
11093
11131
|
/** CloudCLI's localStorage key for per-tool chat permission settings. */
|
|
11094
11132
|
const CLAUDE_SETTINGS_KEY = "claude-settings";
|
|
11095
11133
|
/**
|
|
11134
|
+
* The two interaction tools CloudCLI routes to the human (its
|
|
11135
|
+
* `TOOLS_REQUIRING_INTERACTION`). They must NEVER appear in the seeded
|
|
11136
|
+
* `allowedTools` — an exact-name match there would auto-approve them and defeat
|
|
11137
|
+
* the question widget / plan card. Stripped defensively at the seed chokepoint
|
|
11138
|
+
* so no upstream list (mcp names, a future caller) can reintroduce them.
|
|
11139
|
+
*/
|
|
11140
|
+
const NEVER_AUTO_APPROVE = new Set(["AskUserQuestion", "ExitPlanMode"]);
|
|
11141
|
+
/**
|
|
11096
11142
|
* Embed the token as a JS string literal. JSON.stringify escapes quotes and
|
|
11097
11143
|
* backslashes; we additionally neutralize `<` so the value can never break out
|
|
11098
11144
|
* of the surrounding <script> element regardless of contents.
|
|
11099
11145
|
*
|
|
11100
11146
|
* When `seedToolSettings` is set, also seed CloudCLI's `claude-settings`
|
|
11101
|
-
* localStorage with `{allowedTools
|
|
11102
|
-
*
|
|
11103
|
-
*
|
|
11104
|
-
*
|
|
11105
|
-
*
|
|
11106
|
-
*
|
|
11107
|
-
*
|
|
11108
|
-
*
|
|
11147
|
+
* localStorage with `{allowedTools:<routine+mcp>, disallowedTools:[], skipPermissions:false}`.
|
|
11148
|
+
* This is serve's "seamless routine + decisions to the user" model: `canUseTool`
|
|
11149
|
+
* stays LIVE (skipPermissions:false, NOT bypass), routine tools in `allowedTools`
|
|
11150
|
+
* auto-run with no prompt, and `AskUserQuestion`/`ExitPlanMode` — deliberately
|
|
11151
|
+
* NOT in the list and hard-cased by CloudCLI into `TOOLS_REQUIRING_INTERACTION` —
|
|
11152
|
+
* always reach the human as a real question widget / plan Approve-Reject card.
|
|
11153
|
+
* `skipPermissions:true` (bypass) would skip `canUseTool` entirely and silently
|
|
11154
|
+
* auto-answer those two, which is exactly what we are fixing.
|
|
11109
11155
|
*/
|
|
11110
11156
|
function buildInjection(token, seedToolSettings = false, seedAllowedTools = []) {
|
|
11111
11157
|
let body = `localStorage.setItem('auth-token',${JSON.stringify(token).replace(/</g, "\\u003c")});`;
|
|
11112
11158
|
if (seedToolSettings) {
|
|
11113
11159
|
const settings = JSON.stringify({
|
|
11114
|
-
allowedTools: seedAllowedTools,
|
|
11160
|
+
allowedTools: seedAllowedTools.filter((t) => !NEVER_AUTO_APPROVE.has(t)),
|
|
11115
11161
|
disallowedTools: [],
|
|
11116
|
-
skipPermissions:
|
|
11162
|
+
skipPermissions: false
|
|
11117
11163
|
});
|
|
11118
11164
|
const safeSettings = JSON.stringify(settings).replace(/</g, "\\u003c");
|
|
11119
11165
|
body += `localStorage.setItem('${CLAUDE_SETTINGS_KEY}',${safeSettings});`;
|
|
@@ -11542,6 +11588,7 @@ const serve$1 = defineCommand({
|
|
|
11542
11588
|
fleetOverTunnel: args["fleet-over-tunnel"] === true
|
|
11543
11589
|
});
|
|
11544
11590
|
const anthropicVars = getClaudeCodeEnvVars(serverUrl, chosenSlug);
|
|
11591
|
+
delete anthropicVars.CLAUDE_CODE_FORK_SUBAGENT;
|
|
11545
11592
|
if (enhancements.nonce) {
|
|
11546
11593
|
anthropicVars.GH_ROUTER_HOOK_MCP_URL = serverUrl;
|
|
11547
11594
|
anthropicVars.GH_ROUTER_HOOK_NONCE = enhancements.nonce;
|
|
@@ -11650,7 +11697,7 @@ const serve$1 = defineCommand({
|
|
|
11650
11697
|
bindPort: servePort,
|
|
11651
11698
|
authToken: token,
|
|
11652
11699
|
seedToolSettings: process.env.GH_ROUTER_SERVE_NO_AUTO_APPROVE !== "1",
|
|
11653
|
-
seedAllowedTools: enhancements.mcpToolNames ?? [],
|
|
11700
|
+
seedAllowedTools: [...SEAMLESS_BUILTIN_TOOLS, ...enhancements.mcpToolNames ?? []],
|
|
11654
11701
|
extraAllowedHosts,
|
|
11655
11702
|
extraAllowedOrigins,
|
|
11656
11703
|
allowDevtunnelHosts: tunnelMode,
|