github-router 0.3.177 → 0.3.178

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.
@@ -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.177",
5
+ "version": "0.3.178",
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 withNoOutputRetry, F as IMPLEMENT_DEFAULT_MODEL, I as PLAN_DEFAULT_MODEL, L as REVIEW_DEFAULT_MODEL, M as BROWSE_DEFAULT_MODEL, N as DEFAULT_MODEL, P as EXPLORE_DEFAULT_MODEL, R as appendPlanReminder, z as runWorkerAgent } from "./peer-mcp-personas-BtQi-dF-.js";
1
+ import { B as withNoOutputRetry, F as IMPLEMENT_DEFAULT_MODEL, I as PLAN_DEFAULT_MODEL, L as REVIEW_DEFAULT_MODEL, M as BROWSE_DEFAULT_MODEL, N as DEFAULT_MODEL, P as EXPLORE_DEFAULT_MODEL, R as appendPlanReminder, z as runWorkerAgent } from "./peer-mcp-personas-B1-1mVPB.js";
2
2
  import "./paths-BZPgxKUl.js";
3
3
  import "./lifecycle-DrDEjx_c.js";
4
4
  import "./lifecycle-Dvr3pGGG.js";
@@ -435,7 +435,7 @@ let grammars = /* @__PURE__ */ new Map();
435
435
  const parsers = /* @__PURE__ */ new Map();
436
436
  let cancelled = false;
437
437
  function handleJob(job) {
438
- if (process.env.GH_ROUTER_TS_WORKER_CRASH === "1") throw new Error("injected worker crash (test)");
438
+ if (process.env.GH_ROUTER_TS_WORKER_CRASH === "1" || job.testCrash) throw new Error("injected worker crash (test)");
439
439
  if (cancelled) return {
440
440
  id: job.id,
441
441
  ok: true,
package/dist/main.js CHANGED
@@ -1,5 +1,5 @@
1
1
  #!/usr/bin/env node
2
- import { $ as isAdvisorRequested, $t as cacheCopilotVersion, A as liveExec, At as provisionBrowserAssets, Bt as DEFAULT_CODEX_MODEL, C as fileReviewDebounce, Ct as resolveMcpToolTimeoutMs, D as stopGateEnabledForRepo, Dt as MAX_RESPONSE_BODY_BYTES, E as repoRoot, Et as createChatCompletions, Ft as shouldUseInsecureTls, G as vscodeRipgrepPath, Gt as generateRandomPort, H as buildToolbeltAwareness, Ht as DEFAULT_PORT, It as ArtifactClient, J as searchWeb, Jt as withInstallLock, K as TOOLBELT_TOOLS, Kt as pickClaudeDefault, Lt as collapsePathKeys, Mt as provisionAndIndexColbert, Nt as extractTarGzMember, O as stopReviewStateDir, Ot as readResponseBodyCapped, Pt as extractZipMember, Q as injectAdvisorTool, Qt as tryRefreshAndRetry, Rt as toolbeltPathOverride, S as fileLastPromptStore, St as assembleResponsesPayload, T as repoFingerprint, Tt as createResponses, U as toolbeltEnabled, Ut as UPSTREAM_FETCH_TIMEOUT_MS, V as availableToolCommands, Vt as DEFAULT_CODEX_MODEL_FALLBACKS, W as toolbeltSkipSet, Wt as UPSTREAM_INACTIVITY_TIMEOUT_MS, X as ADVISOR_TOOL_INSTRUCTIONS, Xt as setupGitHubAgentToken, Y as ADVISOR_INTERNAL_TOOL_NAME, Yt as setupCopilotToken, Z as buildAdvisorStream, Zt as setupGitHubToken, _ as stopGateId, _t as workerToolsEnabled, a as buildPeerAwarenessSnippet, an as resolveModel, at as relayAnthropicStream, b as fileBaselineStore, bt as createMessages, c as buildArtifactOpenHookCommand, cn as fetchWithTransientRetry, ct as agentToolsEnabled, d as captureLaunchBaseline, dn as GITHUB_API_BASE_URL, dt as browserCompoundToolsEnabled, en as cacheModels, et as buildAnthropicErrorEvent, f as decideStopHook, fn as copilotBaseUrl, ft as browserToolsEnabled, g as stopGateDisabled, gt as standInToolEnabled, h as launchBaselineKey, hn as state, ht as nativeSubagentModel, i as buildAgentPrompt, in as resolveCodexModel, it as readIteratorWithTimeout, j as resolveSealedGate, jt as hasSupportedBrowserInstalled, k as trustRepo, kt as parseJsonOrDiagnose, l as buildSessionBindHookCommand, ln as HTTPError, lt as artifactToolsEnabled, m as injectStopHookIntoSettingsFile, mn as githubHeaders, mt as geminiAvailable, n as MCP_GROUPS, nn as filterBetaHeader, nt as isControllerClosedError, o as buildPeerAwarenessSummary, on as sleep, ot as handleMcpDelete, p as fileBlockBudget, pn as copilotHeaders, pt as fleetToolsEnabled, q as assetFor, qt as getPackageVersion, r as assertMcpToolSurfaceConsistent, rn as isNullish, rt as logStreamError, s as personasFor, sn as getModels, st as handleMcpPost, t as GROUP_META, tn as cacheVSCodeVersion, tt as buildOpenAIErrorEvent, u as buildStopHookCommand, un as forwardError, ut as browseAgentEnabled, v as stopGatePlanMode, vt as shimDefaultsToXhigh, w as isSubagentContext, wt as pickEndpoint, x as fileFindingsStore, xt as getTokenCount, y as stopReviewEnabled, yt as countTokens, zt as DEFAULT_CLAUDE_MODEL_FALLBACKS } from "./peer-mcp-personas-BtQi-dF-.js";
2
+ import { $ as isAdvisorRequested, $t as cacheCopilotVersion, A as liveExec, At as provisionBrowserAssets, Bt as DEFAULT_CODEX_MODEL, C as fileReviewDebounce, Ct as resolveMcpToolTimeoutMs, D as stopGateEnabledForRepo, Dt as MAX_RESPONSE_BODY_BYTES, E as repoRoot, Et as createChatCompletions, Ft as shouldUseInsecureTls, G as vscodeRipgrepPath, Gt as generateRandomPort, H as buildToolbeltAwareness, Ht as DEFAULT_PORT, It as ArtifactClient, J as searchWeb, Jt as withInstallLock, K as TOOLBELT_TOOLS, Kt as pickClaudeDefault, Lt as collapsePathKeys, Mt as provisionAndIndexColbert, Nt as extractTarGzMember, O as stopReviewStateDir, Ot as readResponseBodyCapped, Pt as extractZipMember, Q as injectAdvisorTool, Qt as tryRefreshAndRetry, Rt as toolbeltPathOverride, S as fileLastPromptStore, St as assembleResponsesPayload, T as repoFingerprint, Tt as createResponses, U as toolbeltEnabled, Ut as UPSTREAM_FETCH_TIMEOUT_MS, V as availableToolCommands, Vt as DEFAULT_CODEX_MODEL_FALLBACKS, W as toolbeltSkipSet, Wt as UPSTREAM_INACTIVITY_TIMEOUT_MS, X as ADVISOR_TOOL_INSTRUCTIONS, Xt as setupGitHubAgentToken, Y as ADVISOR_INTERNAL_TOOL_NAME, Yt as setupCopilotToken, Z as buildAdvisorStream, Zt as setupGitHubToken, _ as stopGateId, _t as workerToolsEnabled, a as buildPeerAwarenessSnippet, an as resolveModel, at as relayAnthropicStream, b as fileBaselineStore, bt as createMessages, c as buildArtifactOpenHookCommand, cn as fetchWithTransientRetry, ct as agentToolsEnabled, d as captureLaunchBaseline, dn as GITHUB_API_BASE_URL, dt as browserCompoundToolsEnabled, en as cacheModels, et as buildAnthropicErrorEvent, f as decideStopHook, fn as copilotBaseUrl, ft as browserToolsEnabled, g as stopGateDisabled, gt as standInToolEnabled, h as launchBaselineKey, hn as state, ht as nativeSubagentModel, i as buildAgentPrompt, in as resolveCodexModel, it as readIteratorWithTimeout, j as resolveSealedGate, jt as hasSupportedBrowserInstalled, k as trustRepo, kt as parseJsonOrDiagnose, l as buildSessionBindHookCommand, ln as HTTPError, lt as artifactToolsEnabled, m as injectStopHookIntoSettingsFile, mn as githubHeaders, mt as geminiAvailable, n as MCP_GROUPS, nn as filterBetaHeader, nt as isControllerClosedError, o as buildPeerAwarenessSummary, on as sleep, ot as handleMcpDelete, p as fileBlockBudget, pn as copilotHeaders, pt as fleetToolsEnabled, q as assetFor, qt as getPackageVersion, r as assertMcpToolSurfaceConsistent, rn as isNullish, rt as logStreamError, s as personasFor, sn as getModels, st as handleMcpPost, t as GROUP_META, tn as cacheVSCodeVersion, tt as buildOpenAIErrorEvent, u as buildStopHookCommand, un as forwardError, ut as browseAgentEnabled, v as stopGatePlanMode, vt as shimDefaultsToXhigh, w as isSubagentContext, wt as pickEndpoint, x as fileFindingsStore, xt as getTokenCount, y as stopReviewEnabled, yt as countTokens, zt as DEFAULT_CLAUDE_MODEL_FALLBACKS } from "./peer-mcp-personas-B1-1mVPB.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-BZPgxKUl.js";
4
4
  import { c as killManagedTree, d as runCommandCapture, f as runCommandVoid, l as parseBoolEnv, s as killChildProcessTree, u as resolveExecutable } from "./lifecycle-DrDEjx_c.js";
5
5
  import { a as sweepRegistry } from "./lifecycle-Dvr3pGGG.js";
@@ -2568,7 +2568,7 @@ async function discoverGateCommands(cwd, opts) {
2568
2568
  if (files.length === 0) return null;
2569
2569
  let result;
2570
2570
  try {
2571
- const { runWorkerAgent } = await import("./engine-DOOYh35O.js");
2571
+ const { runWorkerAgent } = await import("./engine-D7mUKnIZ.js");
2572
2572
  result = await runWorkerAgent({
2573
2573
  mode: "explore",
2574
2574
  workspace: root,
@@ -3587,7 +3587,7 @@ const STYLE_DIRECTIVE = "Write concisely without losing detail. Use a natural hu
3587
3587
  * Self-referentially compliant with the style directive: no em dashes, no
3588
3588
  * Claude / Anthropic attribution.
3589
3589
  */
3590
- const OPERATING_DEFAULTS_DIRECTIVE = "## Operating defaults (apply when the user has not specified otherwise; the user's explicit direction and the domain's own standards always override)\n\nOrchestrate. Delegate research, implementation, review, and large reads to the right subagent, worker, or model (worker-* agents for background non-blocking runs, Task subagents for parallel work, peer critics for review) so your own context stays free to reason and collaborate with the user. Prefer parallel delegation for independent work. Do trivial, surgical, and last-mile work directly; delegate the rest rather than doing it yourself and filling your own context.\n\nAim high. Default to radical simplicity and a relentless focus on the user's real experience: design for the person and the job to be done, not the demo. Reason about the whole system from first principles, anticipating scale and the long arc rather than patching the surface. Work backwards from the outcome the user actually needs. Question every assumption and prefer what you can derive, reproduce, or test.\n\nEngineering excellence. When making technical decisions, give little weight to development cost; prefer quality, simplicity, robustness, scalability, and long-term maintainability. Fix a bug by first reproducing it end to end, as close to how a real user hits it as you can, so you solve the real problem and not a symptom. When testing a product end to end, be picky about the UI and obsessed with pixel perfection: if something clearly looks off, even when it is unrelated to your task, get it fixed along the way. Hold that same bar for the codebase itself: a lint error, a failing test, or a flaky test is worth fixing the moment you see it, whoever introduced it. Fold it into your current work rather than letting it derail the task the user actually asked for.";
3590
+ const OPERATING_DEFAULTS_DIRECTIVE = "## Operating defaults (apply when the user has not specified otherwise; the user's explicit direction and the domain's own standards always override)\n\nOrchestrate. Delegate research, implementation, review, and large reads to the right subagent, worker, or model (the `implementer`, `debugger`, and `qa-engineer` native subagents for bounded implementation, root-cause debugging, and review/testing respectively; worker-* agents for background non-blocking runs; Task subagents for parallel work; peer critics for review) so your own context stays free to reason and collaborate with the user. Prefer parallel delegation for independent work. Do trivial, surgical, and last-mile work directly; delegate the rest rather than doing it yourself and filling your own context. Delegate to a subagent by default whenever one can do the work without loss of quality: the main thread is where you think with and respond to the user, and its context window is a finite shared resource, so protect it by pushing heavy or exploratory work outward and keeping only the conclusions.\n\nAim high. Default to radical simplicity and a relentless focus on the user's real experience: design for the person and the job to be done, not the demo. Reason about the whole system from first principles, anticipating scale and the long arc rather than patching the surface. Work backwards from the outcome the user actually needs. Question every assumption and prefer what you can derive, reproduce, or test.\n\nEngineering excellence. When making technical decisions, give little weight to development cost; prefer quality, simplicity, robustness, scalability, and long-term maintainability. Fix a bug by first reproducing it end to end, as close to how a real user hits it as you can, so you solve the real problem and not a symptom. When testing a product end to end, be picky about the UI and obsessed with pixel perfection: if something clearly looks off, even when it is unrelated to your task, get it fixed along the way. Hold that same bar for the codebase itself: a lint error, a failing test, or a flaky test is worth fixing the moment you see it, whoever introduced it. Fold it into your current work rather than letting it derail the task the user actually asked for.";
3591
3591
  /**
3592
3592
  * Condensed digest of OPERATING_DEFAULTS_DIRECTIVE for the spawned session's
3593
3593
  * system prompt (--append-system-prompt). The FULL directive is prepended to
@@ -3595,7 +3595,7 @@ const OPERATING_DEFAULTS_DIRECTIVE = "## Operating defaults (apply when the user
3595
3595
  * keeps both behavioral directives at top salience without duplicating the full
3596
3596
  * ~310-token block in the context window every turn. Points to the full copy.
3597
3597
  */
3598
- const OPERATING_DEFAULTS_DIGEST = "## Operating defaults (the user's explicit direction and the domain's standards always override)\n\nOrchestrate: delegate research, implementation, review, and large reads to the right subagent, worker, or model, preferring parallel delegation for independent work, so your own context stays free to reason and collaborate with the user; do trivial, surgical, and last-mile work directly. Aim high: default to radical simplicity and the user's real experience, whole-system first-principles thinking that anticipates scale and the long arc, and working backwards from the outcome the user actually needs; question every assumption and prefer what you can derive, reproduce, or test. Engineering excellence: prefer quality and long-term maintainability over dev cost; reproduce bugs end to end before fixing; keep a pixel-perfect UI bar; fix any lint, test failure, or flake on sight without letting it derail the task at hand. The full statement of these defaults is in your CLAUDE.md project instructions.";
3598
+ const OPERATING_DEFAULTS_DIGEST = "## Operating defaults (the user's explicit direction and the domain's standards always override)\n\nOrchestrate: delegate research, implementation, review, and large reads to the right subagent, worker, or model by default wherever one can do the work without losing quality, preferring parallel delegation for independent work, to protect the main thread's finite context and keep it free for reasoning and interacting with the user; do trivial, surgical, and last-mile work directly. Aim high: default to radical simplicity and the user's real experience, whole-system first-principles thinking that anticipates scale and the long arc, and working backwards from the outcome the user actually needs; question every assumption and prefer what you can derive, reproduce, or test. Engineering excellence: prefer quality and long-term maintainability over dev cost; reproduce bugs end to end before fixing; keep a pixel-perfect UI bar; fix any lint, test failure, or flake on sight without letting it derail the task at hand. The full statement of these defaults is in your CLAUDE.md project instructions.";
3599
3599
  /**
3600
3600
  * Skip the helper if the user's `~/.claude/CLAUDE.md` (or, equivalently,
3601
3601
  * the would-be post-write file) has grown past this size.
@@ -4728,7 +4728,7 @@ function initProxyFromEnv() {
4728
4728
  //#endregion
4729
4729
  //#region package.json
4730
4730
  var name = "github-router";
4731
- var version$1 = "0.3.177";
4731
+ var version$1 = "0.3.178";
4732
4732
 
4733
4733
  //#endregion
4734
4734
  //#region src/lib/approval.ts