github-router 0.3.136 → 0.3.138

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.136",
5
+ "version": "0.3.138",
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 { A as DEFAULT_MODEL, F as runWorkerAgent, I as withNoOutputRetry, M as PLAN_DEFAULT_MODEL, N as REVIEW_DEFAULT_MODEL, P as appendPlanReminder, j as IMPLEMENT_DEFAULT_MODEL, k as BROWSE_DEFAULT_MODEL } from "./peer-mcp-personas-Dmx4S0_5.js";
1
+ import { A as DEFAULT_MODEL, F as runWorkerAgent, I as withNoOutputRetry, M as PLAN_DEFAULT_MODEL, N as REVIEW_DEFAULT_MODEL, P as appendPlanReminder, j as IMPLEMENT_DEFAULT_MODEL, k as BROWSE_DEFAULT_MODEL } from "./peer-mcp-personas-CThUmeHE.js";
2
2
  import "./paths-Cn5OzmYL.js";
3
3
  import "./lifecycle-Cqe8OQVX.js";
4
4
  import "./lifecycle-CeVDX6av.js";
package/dist/main.js CHANGED
@@ -1,5 +1,5 @@
1
1
  #!/usr/bin/env node
2
- import { $ as readIteratorWithTimeout, $t as state, At as generateRandomPort, B as toolbeltSkipSet, Bt as filterBetaHeader, C as repoRoot, Ct as toolbeltPathOverride, D as resolveSealedGate, Dt as DEFAULT_PORT, E as trustRepo, Et as DEFAULT_CODEX_MODEL_FALLBACKS, Ft as setupGitHubToken, G as ADVISOR_INTERNAL_TOOL_NAME, Gt as getModels, H as TOOLBELT_TOOLS, Ht as resolveCodexModel, It as tryRefreshAndRetry, J as injectAdvisorTool, Jt as forwardError, K as ADVISOR_TOOL_INSTRUCTIONS, Kt as fetchWithTransientRetry, L as availableToolCommands, Lt as cacheCopilotVersion, Mt as getPackageVersion, Nt as withInstallLock, O as liveExec, Ot as UPSTREAM_FETCH_TIMEOUT_MS, Pt as setupCopilotToken, Q as logStreamError, Qt as githubHeaders, R as buildToolbeltAwareness, Rt as cacheModels, S as repoFingerprint, St as collapsePathKeys, T as stopReviewStateDir, Tt as DEFAULT_CODEX_MODEL, U as assetFor, Ut as resolveModel, V as vscodeRipgrepPath, Vt as isNullish, W as searchWeb, Wt as sleep, X as buildOpenAIErrorEvent, Xt as copilotBaseUrl, Y as isAdvisorRequested, Yt as GITHUB_API_BASE_URL, Z as isControllerClosedError, Zt as copilotHeaders, _ as fileBaselineStore, _t as provisionAndIndexColbert, a as buildPeerAwarenessSnippet, at as standInToolEnabled, b as fileReviewDebounce, bt as shouldUseInsecureTls, c as buildSessionBindHookCommand, ct as createMessages, d as decideStopHook, dt as createChatCompletions, et as relayAnthropicStream, f as fileBlockBudget, ft as MAX_RESPONSE_BODY_BYTES, g as stopReviewEnabled, gt as hasSupportedBrowserInstalled, h as stopGateId, ht as provisionBrowserAssets, i as buildAgentPrompt, it as fleetToolsEnabled, jt as pickClaudeDefault, kt as UPSTREAM_INACTIVITY_TIMEOUT_MS, l as buildStopHookCommand, lt as getTokenCount, m as launchBaselineKey, mt as parseJsonOrDiagnose, n as MCP_GROUPS, nt as handleMcpPost, o as personasFor, ot as workerToolsEnabled, p as injectStopHookIntoSettingsFile, pt as readResponseBodyCapped, q as buildAdvisorStream, qt as HTTPError, r as assertMcpToolSurfaceConsistent, rt as browserToolsEnabled, s as buildArtifactOpenHookCommand, st as countTokens, t as GROUP_META, tt as handleMcpDelete, u as captureLaunchBaseline, ut as createResponses, v as fileFindingsStore, vt as extractTarGzMember, w as stopGateEnabledForRepo, wt as DEFAULT_CLAUDE_MODEL_FALLBACKS, x as isSubagentContext, xt as ArtifactClient, y as fileLastPromptStore, yt as extractZipMember, z as toolbeltEnabled, zt as cacheVSCodeVersion } from "./peer-mcp-personas-Dmx4S0_5.js";
2
+ import { $ as readIteratorWithTimeout, $t as state, At as generateRandomPort, B as toolbeltSkipSet, Bt as filterBetaHeader, C as repoRoot, Ct as toolbeltPathOverride, D as resolveSealedGate, Dt as DEFAULT_PORT, E as trustRepo, Et as DEFAULT_CODEX_MODEL_FALLBACKS, Ft as setupGitHubToken, G as ADVISOR_INTERNAL_TOOL_NAME, Gt as getModels, H as TOOLBELT_TOOLS, Ht as resolveCodexModel, It as tryRefreshAndRetry, J as injectAdvisorTool, Jt as forwardError, K as ADVISOR_TOOL_INSTRUCTIONS, Kt as fetchWithTransientRetry, L as availableToolCommands, Lt as cacheCopilotVersion, Mt as getPackageVersion, Nt as withInstallLock, O as liveExec, Ot as UPSTREAM_FETCH_TIMEOUT_MS, Pt as setupCopilotToken, Q as logStreamError, Qt as githubHeaders, R as buildToolbeltAwareness, Rt as cacheModels, S as repoFingerprint, St as collapsePathKeys, T as stopReviewStateDir, Tt as DEFAULT_CODEX_MODEL, U as assetFor, Ut as resolveModel, V as vscodeRipgrepPath, Vt as isNullish, W as searchWeb, Wt as sleep, X as buildOpenAIErrorEvent, Xt as copilotBaseUrl, Y as isAdvisorRequested, Yt as GITHUB_API_BASE_URL, Z as isControllerClosedError, Zt as copilotHeaders, _ as fileBaselineStore, _t as provisionAndIndexColbert, a as buildPeerAwarenessSnippet, at as standInToolEnabled, b as fileReviewDebounce, bt as shouldUseInsecureTls, c as buildSessionBindHookCommand, ct as createMessages, d as decideStopHook, dt as createChatCompletions, et as relayAnthropicStream, f as fileBlockBudget, ft as MAX_RESPONSE_BODY_BYTES, g as stopReviewEnabled, gt as hasSupportedBrowserInstalled, h as stopGateId, ht as provisionBrowserAssets, i as buildAgentPrompt, it as fleetToolsEnabled, jt as pickClaudeDefault, kt as UPSTREAM_INACTIVITY_TIMEOUT_MS, l as buildStopHookCommand, lt as getTokenCount, m as launchBaselineKey, mt as parseJsonOrDiagnose, n as MCP_GROUPS, nt as handleMcpPost, o as personasFor, ot as workerToolsEnabled, p as injectStopHookIntoSettingsFile, pt as readResponseBodyCapped, q as buildAdvisorStream, qt as HTTPError, r as assertMcpToolSurfaceConsistent, rt as browserToolsEnabled, s as buildArtifactOpenHookCommand, st as countTokens, t as GROUP_META, tt as handleMcpDelete, u as captureLaunchBaseline, ut as createResponses, v as fileFindingsStore, vt as extractTarGzMember, w as stopGateEnabledForRepo, wt as DEFAULT_CLAUDE_MODEL_FALLBACKS, x as isSubagentContext, xt as ArtifactClient, y as fileLastPromptStore, yt as extractZipMember, z as toolbeltEnabled, zt as cacheVSCodeVersion } from "./peer-mcp-personas-CThUmeHE.js";
3
3
  import { a as removeOwnClaudeConfigMirror, i as isUnderClaudeConfigMirror, l as writeArtifactCredsToMirror, n as ensureClaudeConfigMirror, r as ensurePaths, t as PATHS, u as writeRuntimeFileSecure } from "./paths-Cn5OzmYL.js";
4
4
  import { c as killManagedTree, d as runCommandCapture, f as runCommandVoid, l as parseBoolEnv, s as killChildProcessTree, u as resolveExecutable } from "./lifecycle-Cqe8OQVX.js";
5
5
  import { a as sweepRegistry } from "./lifecycle-CeVDX6av.js";
@@ -2036,7 +2036,7 @@ async function discoverGateCommands(cwd, opts) {
2036
2036
  if (files.length === 0) return null;
2037
2037
  let result;
2038
2038
  try {
2039
- const { runWorkerAgent } = await import("./engine-BrbdG9Cp.js");
2039
+ const { runWorkerAgent } = await import("./engine-kSGZBPRK.js");
2040
2040
  result = await runWorkerAgent({
2041
2041
  mode: "explore",
2042
2042
  workspace: root,
@@ -2613,6 +2613,23 @@ HTML is the canonical review artifact — it renders richly and is annotatable e
2613
2613
  - Plan-mode plans: the panel auto-opens them already rendered to HTML — you do not need to convert them by hand.
2614
2614
  - Do not paste raw markdown into an \`.html\`; write real HTML (headings, lists, tables, \`<pre>\` for code). Opening a raw \`.md\` still renders, but a purpose-built HTML artifact reads better and annotates cleanly.
2615
2615
 
2616
+ ## When to reach for an artifact
2617
+
2618
+ Default to one for anything easier to grasp visually than as terminal prose: plans, design proposals, comparisons / trade-offs, decisions that need the user's input, diagrams / architecture, tables, code diffs, reports. Skip it only for trivial one-line answers.
2619
+
2620
+ ## Playbooks (what a good artifact of each type contains)
2621
+
2622
+ - **plan**: goal, current state, the proposed approach (high-level decisions, not every line), then risks and open questions at the end.
2623
+ - **comparison**: options as columns, trade-offs as rows, current-vs-target where relevant, and an explicit recommendation. Do not make the reader infer the winner.
2624
+ - **table**: scannable rows, a sticky header, aligned numeric columns; group/section dense records rather than one flat wall.
2625
+ - **diagram**: boxes + arrows. Mermaid when automatic layout matters; positioned SVG/CSS when each node needs prose, code, or controls.
2626
+ - **code / diff**: \`<pre>\` with before/after or unified-diff styling; keep line context tight; call out the changed lines.
2627
+ - **report / dashboard**: lead with the headline number / verdict, then supporting detail; keep one idea per section.
2628
+
2629
+ ## Design system
2630
+
2631
+ Artifacts stay portable (they must render identically opened standalone), so do not depend on a server-injected theme. Pick the look in priority order: (1) a look the user named; (2) the **subject project's** own design system, its Tailwind / theme config, CSS variables / tokens, component library, or existing styled pages, especially when the artifact previews that app's UI; (3) only when both come up empty, clean readable defaults (system font stack, generous spacing, a single accent).
2632
+
2616
2633
  ## Loop
2617
2634
 
2618
2635
  1. Open: \`mcp__peers__artifact_open\` with the absolute path of the \`.html\` (or the file). Relay the returned \`viewUrl\` and tell the user to review in the panel — they can click a block or select text to comment.
@@ -2648,7 +2665,7 @@ const TOOLBELT_MARKER_OPEN = "<!-- gh-router toolbelt awareness — auto-injecte
2648
2665
  const TOOLBELT_MARKER_CLOSE = "<!-- /gh-router toolbelt awareness -->";
2649
2666
  const ARTIFACT_MARKER_OPEN = "<!-- gh-router artifact-panel directive — auto-injected when in an ai-or-die tab -->";
2650
2667
  const ARTIFACT_MARKER_CLOSE = "<!-- /gh-router artifact-panel directive -->";
2651
- const ARTIFACT_PANEL_DIRECTIVE = "## Review plans in the artifact panel\n\nYou are running inside an ai-or-die tab, so the `mcp__peers__artifact_open/poll/reply/end` tools drive a live human-review panel. When you finish a plan or produce something the user should review, open it in the panel: `mcp__peers__artifact_open`, tell the user to review (they can click a block or select text to comment), then `mcp__peers__artifact_poll` for feedback, revise, and `mcp__peers__artifact_end` when done. Prefer HTML: for anything rich or structured, author a self-contained `.html` artifact and open THAT (the panel renders and annotates HTML natively). Plan-mode plans are auto-rendered to HTML for you; raw markdown is only a fallback. Default to this for plans before asking the user to proceed.";
2668
+ const ARTIFACT_PANEL_DIRECTIVE = "## Review in the artifact panel (HTML by default)\n\nYou are running inside an ai-or-die tab, so the `mcp__peers__artifact_open/poll/reply/end` tools drive a live human-review panel. Default to an HTML artifact for anything the user should review before you proceed, not just plans but also design proposals, comparisons / trade-offs, decisions that need their input, diagrams, tables, code diffs, and reports. Author a self-contained `.html` (inline CSS, no external deps, readable typography) and open it with `mcp__peers__artifact_open`; tell the user to review (they can click a block or select text to comment), then `mcp__peers__artifact_poll` for feedback, revise, `mcp__peers__artifact_reply`, and `mcp__peers__artifact_end` when done. Plan-mode plans are auto-rendered to HTML and auto-opened for you; raw markdown is only a fallback. Skip the panel only for trivial one-line answers.\n\nMake the HTML good: match the subject project's design system (its Tailwind / theme / tokens) when the artifact represents a specific app, otherwise clean readable defaults. Per-type cheatsheet. plan: goal, current state, proposed approach, risks / open questions. comparison: options as columns with trade-off rows and a recommendation. table: scannable rows with a sticky header. diagram: boxes + arrows (SVG/CSS or Mermaid). code / diff: `<pre>` with before/after. The `gh-artifact-review` skill carries the fuller playbook.";
2652
2669
  /**
2653
2670
  * Writing / communication style directive injected at the TOP of the
2654
2671
  * mirrored CLAUDE.md so every spawned agent (main, Agent-tool subagent,
@@ -3568,7 +3585,7 @@ function initProxyFromEnv() {
3568
3585
  //#endregion
3569
3586
  //#region package.json
3570
3587
  var name = "github-router";
3571
- var version$1 = "0.3.136";
3588
+ var version$1 = "0.3.138";
3572
3589
 
3573
3590
  //#endregion
3574
3591
  //#region src/lib/approval.ts