github-router 0.3.302 → 0.3.304
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/README.md +4 -4
- package/dist/{attribution-settings-B1xutIts.js → attribution-settings-C8iSwEAZ.js} +184 -93
- package/dist/attribution-settings-C8iSwEAZ.js.map +1 -0
- package/dist/browser-ext/manifest.json +1 -1
- package/dist/{claude-uRuzEH0W.js → claude-Drv0roq1.js} +63 -116
- package/dist/claude-Drv0roq1.js.map +1 -0
- package/dist/{codex-D5ag-liR.js → codex-kgVL5OyN.js} +4 -4
- package/dist/{codex-D5ag-liR.js.map → codex-kgVL5OyN.js.map} +1 -1
- package/dist/engine-xuIzQNV1.js +2 -0
- package/dist/{fast-profile-contract-K3P58nj3.js → fast-profile-contract-OuZQaGif.js} +26 -23
- package/dist/fast-profile-contract-OuZQaGif.js.map +1 -0
- package/dist/{gate-discovery-BTRVyKWu.js → gate-discovery-D4-F99e_.js} +2 -2
- package/dist/{gate-discovery-BTRVyKWu.js.map → gate-discovery-D4-F99e_.js.map} +1 -1
- package/dist/hooks.mjs +121 -50
- package/dist/hooks.sha256 +1 -1
- package/dist/{internal-fast-dispatch-guard-D2HcfXZv.js → internal-fast-dispatch-guard-BaUB-F8o.js} +71 -15
- package/dist/internal-fast-dispatch-guard-BaUB-F8o.js.map +1 -0
- package/dist/{internal-fast-dispatch-guard-CYOWbxjX.js → internal-fast-dispatch-guard-ByzwIsxA.js} +1 -1
- package/dist/{internal-max-dispatch-guard-BjSVXMvC.js → internal-max-dispatch-guard-CXRB-4a3.js} +31 -14
- package/dist/internal-max-dispatch-guard-CXRB-4a3.js.map +1 -0
- package/dist/{internal-max-dispatch-guard-Bcjavapx.js → internal-max-dispatch-guard-Sb6ACr_0.js} +1 -1
- package/dist/{internal-stop-hook-BZg__ab6.js → internal-stop-hook-D8LIWryj.js} +2 -2
- package/dist/{internal-stop-hook-BZg__ab6.js.map → internal-stop-hook-D8LIWryj.js.map} +1 -1
- package/dist/main.js +7 -7
- package/dist/{max-profile-contract-BTXowh6k.js → max-profile-contract-CiD5wyET.js} +19 -7
- package/dist/max-profile-contract-CiD5wyET.js.map +1 -0
- package/dist/{peer-mcp-personas-DwEiYeJS.js → peer-mcp-personas-D4bHdjOx.js} +420 -384
- package/dist/peer-mcp-personas-D4bHdjOx.js.map +1 -0
- package/dist/{provision-BLT1pCFy.js → provision-D3_GtXze.js} +2 -2
- package/dist/{provision-BLT1pCFy.js.map → provision-D3_GtXze.js.map} +1 -1
- package/dist/{serve-wEZoOijw.js → serve-DPRZX-2j.js} +5 -5
- package/dist/{serve-wEZoOijw.js.map → serve-DPRZX-2j.js.map} +1 -1
- package/dist/{server-setup-Zn5wkosb.js → server-setup-CSkdFAPP.js} +25 -19
- package/dist/server-setup-CSkdFAPP.js.map +1 -0
- package/dist/{start-DSqU8d8h.js → start-C6G5tu81.js} +3 -3
- package/dist/{start-DSqU8d8h.js.map → start-C6G5tu81.js.map} +1 -1
- package/package.json +1 -1
- package/dist/attribution-settings-B1xutIts.js.map +0 -1
- package/dist/claude-uRuzEH0W.js.map +0 -1
- package/dist/engine-2uMJ4Isk.js +0 -2
- package/dist/fast-profile-contract-K3P58nj3.js.map +0 -1
- package/dist/internal-fast-dispatch-guard-D2HcfXZv.js.map +0 -1
- package/dist/internal-max-dispatch-guard-BjSVXMvC.js.map +0 -1
- package/dist/max-profile-contract-BTXowh6k.js.map +0 -1
- package/dist/peer-mcp-personas-DwEiYeJS.js.map +0 -1
- package/dist/server-setup-Zn5wkosb.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.304",
|
|
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,25 +1,25 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { $t as warmTreeSitterPool, Ct as reviewerFastModel, D as toolbeltEnabled, Dt as standInToolEnabled, E as buildToolbeltAwareness, Et as scribeModel, Hn as validateMaxProfileLaunch, It as registerLaunch, Lt as unregisterLaunch, Nn as formatFastPrerequisiteFailure, Ot as workerToolsEnabled, Rn as profileDescriptor, St as resolveGeminiReviewModel, T as availableToolCommands, Tn as LUNA_DRIVER_ALIAS_ID, Tt as scoutModel, Vn as validateFastProfilePrerequisites, Xt as provisionAndIndexColbert, Yt as colbertDegradedWarning, _n as resolveLeadSlugArg, _t as fleetToolsEnabled, at as artifactToolsEnabled, bt as implementerFastModel, cn as DEFAULT_CLAUDE_MODEL_FALLBACKS, ct as browserCompoundToolsEnabled, dt as fastGeneralPurposeModel, ft as fastImplementerModel, gn as pickClaudeDefault, gt as fastScoutModel, hn as isBudgetClaudeLead, ht as fastReviewerModel, it as agentToolsEnabled, lt as browserToolsEnabled, mt as fastPlanModel, o as buildPeerAwarenessSnippet, ot as brainstormModel, pt as fastOracleModel, qt as provisionBrowserAssets, r as agentNamesForToolAllowlist, rn as shouldUseInsecureTls, s as buildPeerAwarenessSummary, st as browseAgentEnabled, ut as fastAdvisorModel, vt as geminiAvailable, wt as reviewerModel, xt as nativeSubagentModel, yt as generalPurposeFastModel, zn as resolveLaunchProfile } from "./peer-mcp-personas-D4bHdjOx.js";
|
|
2
2
|
import { o as removeOwnClaudeConfigMirror, r as ensureClaudeConfigMirror, t as PATHS, u as writeArtifactCredsToMirror } from "./paths-IcZW8gZx.js";
|
|
3
3
|
import { t as state } from "./state-B8adscCv.js";
|
|
4
4
|
import { d as resolveModel } from "./token-CbuFyx-B.js";
|
|
5
5
|
import { r as parseBoolEnv } from "./exec-y8C_MU8A.js";
|
|
6
|
-
import { a as sharedServerArgs, c as stopKeepAwake, d as runSelfUpdate, f as checkClaudeVersion, i as setupAndServe, l as listModelsForEndpoint, o as LAUNCH_SECRET_HEADER, p as updateClaude, r as parseSharedArgs, s as startKeepAwake, t as getClaudeCodeEnvVars, u as enableFileLogging } from "./server-setup-
|
|
7
|
-
import { t as FAST_PROFILE_ADVISOR_CLIENT_MODEL } from "./fast-profile-contract-
|
|
6
|
+
import { a as sharedServerArgs, c as stopKeepAwake, d as runSelfUpdate, f as checkClaudeVersion, i as setupAndServe, l as listModelsForEndpoint, o as LAUNCH_SECRET_HEADER, p as updateClaude, r as parseSharedArgs, s as startKeepAwake, t as getClaudeCodeEnvVars, u as enableFileLogging } from "./server-setup-CSkdFAPP.js";
|
|
7
|
+
import { t as FAST_PROFILE_ADVISOR_CLIENT_MODEL } from "./fast-profile-contract-OuZQaGif.js";
|
|
8
|
+
import { c as formatMaxPrerequisiteFailure, f as maxGeminiModel, g as maxReviewerModel, i as MAX_PROFILE_MODELS, m as maxOpusModel, p as maxGrokModel } from "./max-profile-contract-CiD5wyET.js";
|
|
8
9
|
import { n as hookLauncherDegradedWarning, r as resolveSelfInvocation } from "./self-invocation-BJWbA8ka.js";
|
|
9
|
-
import {
|
|
10
|
-
import { i as launchChild, r as getCodexVersion, t as provisionToolbelt } from "./provision-BLT1pCFy.js";
|
|
10
|
+
import { i as launchChild, r as getCodexVersion, t as provisionToolbelt } from "./provision-D3_GtXze.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-CJOk28zd.js";
|
|
12
12
|
import { t as liveExec } from "./orchestration-CYyp9w-t.js";
|
|
13
13
|
import { c as repoRoot, d as trustRepo, l as stopGateEnabledForRepo, s as repoFingerprint, t as fileBaselineStore } from "./stop-gate-policy-zhzRIj6G.js";
|
|
14
14
|
import { l as guardToolMatcher, n as activeDispatchModes, r as buildWorkerGuardHookCommand } from "./worker-dispatch-DgP5yT26.js";
|
|
15
|
-
import {
|
|
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-C8iSwEAZ.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-szSNt6uU.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-D4-F99e_.js";
|
|
19
19
|
import { t as buildPromptSubmitHookCommand } from "./prompt-submit-hook-ZUxo_jEl.js";
|
|
20
20
|
import { i as assertShapingInstalled, n as buildFirstMateGuardHookCommand, t as FIRST_MATE_GUARD_MATCHER } from "./internal-first-mate-guard-Bcb5JwiO.js";
|
|
21
|
-
import { r as FAST_DISPATCH_TOOL_MATCHER, t as buildFastDispatchGuardHookCommand } from "./internal-fast-dispatch-guard-
|
|
22
|
-
import { i as assertMaxDispatchGuardInstalled, r as MAX_DISPATCH_TOOL_MATCHER, t as buildMaxDispatchGuardHookCommand } from "./internal-max-dispatch-guard-
|
|
21
|
+
import { r as FAST_DISPATCH_TOOL_MATCHER, t as buildFastDispatchGuardHookCommand } from "./internal-fast-dispatch-guard-BaUB-F8o.js";
|
|
22
|
+
import { i as assertMaxDispatchGuardInstalled, r as MAX_DISPATCH_TOOL_MATCHER, t as buildMaxDispatchGuardHookCommand } from "./internal-max-dispatch-guard-CXRB-4a3.js";
|
|
23
23
|
import { defineCommand } from "citty";
|
|
24
24
|
import consola from "consola";
|
|
25
25
|
import path from "node:path";
|
|
@@ -40,79 +40,6 @@ function assertFastDispatchGuardInstalled(fastProfile, installationSucceeded) {
|
|
|
40
40
|
}
|
|
41
41
|
/** This module is intentionally stateless; callers own launch cleanup. */
|
|
42
42
|
//#endregion
|
|
43
|
-
//#region src/lib/injected-skills/artifact-review-skill.ts
|
|
44
|
-
const ARTIFACT_REVIEW_SKILL = {
|
|
45
|
-
name: "gh-artifact-review",
|
|
46
|
-
md: `---
|
|
47
|
-
name: gh-artifact-review
|
|
48
|
-
description: Reviews plans and artifacts in the ai-or-die panel. Defaults to authoring a self-contained HTML artifact (rich, annotatable, optionally interactive) and opening THAT for the human, then drains feedback with artifact_await, revises, and ends the loop. Use when running inside an ai-or-die tab and there is a plan, comparison, diagram, table, diff, or report the user should see before proceeding.
|
|
49
|
-
user-invocable: true
|
|
50
|
-
---
|
|
51
|
-
|
|
52
|
-
# gh-artifact-review: human review in the ai-or-die panel
|
|
53
|
-
|
|
54
|
-
Use this when you finish a plan or produce something a user should review and you are inside an ai-or-die tab (the \`mcp__peers__artifact_*\` tools drive a live panel). The human can click any block or select text to attach a comment, and can click declarative action controls you emit — both come back to you as typed events.
|
|
55
|
-
|
|
56
|
-
## Default: present HTML, not raw markdown
|
|
57
|
-
|
|
58
|
-
HTML is the canonical review artifact — it renders richly and is annotatable element-by-element. When the content is anything visual or structured (a comparison, table, diagram, diff, dashboard, or a plan you want to look polished), **author a self-contained \`.html\` file** (inline CSS, no external deps, readable typography) and open THAT.
|
|
59
|
-
|
|
60
|
-
- Plan-mode plans: the panel auto-opens them already rendered to HTML — you do not need to convert them by hand.
|
|
61
|
-
- 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.
|
|
62
|
-
|
|
63
|
-
## When to reach for an artifact
|
|
64
|
-
|
|
65
|
-
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.
|
|
66
|
-
|
|
67
|
-
## Playbooks (what a good artifact of each type contains)
|
|
68
|
-
|
|
69
|
-
- **plan**: goal, current state, the proposed approach (high-level decisions, not every line), then risks and open questions at the end.
|
|
70
|
-
- **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.
|
|
71
|
-
- **table**: scannable rows, a sticky header, aligned numeric columns; group/section dense records rather than one flat wall.
|
|
72
|
-
- **diagram**: boxes + arrows. Mermaid when automatic layout matters; positioned SVG/CSS when each node needs prose, code, or controls.
|
|
73
|
-
- **code / diff**: \`<pre>\` with before/after or unified-diff styling; keep line context tight; call out the changed lines.
|
|
74
|
-
- **report / dashboard**: lead with the headline number / verdict, then supporting detail; keep one idea per section.
|
|
75
|
-
|
|
76
|
-
## Design system
|
|
77
|
-
|
|
78
|
-
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).
|
|
79
|
-
|
|
80
|
-
## Loop
|
|
81
|
-
|
|
82
|
-
1. Open: \`mcp__peers__artifact_open\` with the absolute path of the \`.html\` (or the file). Pass \`mode:"interactive"\` when the HTML carries \`data-aod-*\` action controls (below). Relay the returned \`viewUrl\` and tell the user to review in the panel.
|
|
83
|
-
2. Drain: \`mcp__peers__artifact_await\`. It long-holds for the human's next events and returns \`{events, status, cursor}\`. **Pass the returned \`cursor\` on your next call** so you only receive newer events; if \`events\` is empty, call again with that cursor.
|
|
84
|
-
3. Act on each event by \`kind\`:
|
|
85
|
-
- \`comment\` — a free-text note anchored to the artifact (\`selector\`, quoted \`text\`, \`sourceLine\`); apply the requested change at that exact spot.
|
|
86
|
-
- \`action\` — the human clicked a control you emitted (\`action\` verb, \`elementId\`, optional \`value\`; a multi-select submit arrives as one action carrying the selected set). Do what the verb means (approve a step, choose an option, apply a toggle set).
|
|
87
|
-
4. Reply: \`mcp__peers__artifact_reply\` with a concise summary of what you changed. Optionally \`mcp__peers__artifact_update({file})\` or \`({html})\` to replace the artifact content in place, or \`mcp__peers__artifact_refresh\` to reload it from disk.
|
|
88
|
-
5. Repeat 2-4 until the user is satisfied; then \`mcp__peers__artifact_end\`. Use \`mcp__peers__artifact_dismiss\` to hide the panel while keeping the review alive (queued feedback preserved) if the user wants it out of the way without ending.
|
|
89
|
-
|
|
90
|
-
### Push arrival (you do not have to be polling)
|
|
91
|
-
|
|
92
|
-
When you are idle at the prompt, panel feedback can arrive on its own as a new turn (the tab injects it). Structured actions that answer a pending decision are routed to you directly. Either way, the durable record is the \`artifact_await\` drain, so when in doubt call \`artifact_await\` (with your last cursor) to reconcile — it replays anything you missed.
|
|
93
|
-
|
|
94
|
-
### \`artifact_poll\` (frozen legacy)
|
|
95
|
-
|
|
96
|
-
\`mcp__peers__artifact_poll\` still resolves for back-compat but returns the OLD payload (human comments only, no structured actions). Prefer \`artifact_await\`.
|
|
97
|
-
|
|
98
|
-
## Interactive controls (data-aod-* authoring)
|
|
99
|
-
|
|
100
|
-
To let the human act on the artifact (not just comment), emit declarative controls; the panel wires them and delivers a typed \`action\` event. No JS in the artifact.
|
|
101
|
-
|
|
102
|
-
- **choose-one (fires immediately):** each option is a button that posts the moment it is clicked.
|
|
103
|
-
\`<button data-aod-action="choose" data-aod-group="decision-1" data-aod-id="opt-jwt" data-aod-value="jwt">JWT</button>\`
|
|
104
|
-
- **multi-select (toggle then submit):** checkboxes sharing a \`data-aod-group\`, plus one submit button with the same group. The submit delivers ONE action carrying \`{group, selected:[{elementId, value?}]}\`.
|
|
105
|
-
\`<input type="checkbox" data-aod-action="check" data-aod-group="opts" data-aod-id="a" data-aod-value="a">\` … \`<button data-aod-action="submit" data-aod-group="opts" data-aod-id="opts-submit">Apply</button>\`
|
|
106
|
-
- **plan steps:** \`<li class="aod-step" data-aod-id="plan-step-3" data-source-line="14">\` with per-step \`data-aod-action="approve"/"skip"\` buttons.
|
|
107
|
-
- **Required attrs:** \`data-aod-action\` (verb), \`data-aod-id\` (stable, echoed back as \`elementId\`; a control missing it is ignored), optional \`data-aod-value\`. Keep \`data-source-line\` for comment mapping.
|
|
108
|
-
|
|
109
|
-
## Honest limits
|
|
110
|
-
|
|
111
|
-
- If a tool errors (e.g. \`NOT_IN_AIORDIE_TAB\`, \`UNREACHABLE\`, \`INVALID_REQUEST\`), report the code/message verbatim; do not claim the panel opened.
|
|
112
|
-
- The panel is a review surface, not an approver: outward/irreversible actions still need explicit user confirmation.
|
|
113
|
-
`
|
|
114
|
-
};
|
|
115
|
-
//#endregion
|
|
116
43
|
//#region src/lib/fast-launch-cleanup.ts
|
|
117
44
|
function createFastLaunchCleanup(deps) {
|
|
118
45
|
let cleanupPromise;
|
|
@@ -444,19 +371,24 @@ const claude = defineCommand({
|
|
|
444
371
|
let onShutdown = baseShutdown;
|
|
445
372
|
let peerAwarenessSnippet;
|
|
446
373
|
let peerAwarenessSummary;
|
|
374
|
+
let operatingGroupKeys = {};
|
|
447
375
|
let fastWiringComplete = launchProfileId !== "fast";
|
|
376
|
+
const browseAgentAvailable = browseAgentEnabled();
|
|
377
|
+
const directBrowserAvailable = browserToolsEnabled();
|
|
378
|
+
const artifactAvailable = artifactToolsEnabled();
|
|
379
|
+
const resolvedMaxReviewerModel = launchProfileId === "max" ? maxReviewerModel() : void 0;
|
|
448
380
|
const nativeAgentModels = launchProfileId === "fast" ? {
|
|
449
381
|
Explore: fastScoutModel(),
|
|
382
|
+
Plan: fastPlanModel(),
|
|
383
|
+
"general-purpose": fastGeneralPurposeModel(),
|
|
450
384
|
implementer: fastImplementerModel(),
|
|
451
|
-
reviewer: fastReviewerModel()
|
|
452
|
-
planner: fastPlannerModel(),
|
|
453
|
-
critic: fastCriticModel()
|
|
385
|
+
reviewer: fastReviewerModel()
|
|
454
386
|
} : launchProfileId === "max" ? {
|
|
455
387
|
Explore: MAX_PROFILE_MODELS.luna,
|
|
456
388
|
Plan: MAX_PROFILE_MODELS.sol,
|
|
457
389
|
"general-purpose": MAX_PROFILE_MODELS.luna,
|
|
458
390
|
implementer: MAX_PROFILE_MODELS.gemini,
|
|
459
|
-
reviewer:
|
|
391
|
+
reviewer: resolvedMaxReviewerModel,
|
|
460
392
|
brainstorm: maxGrokModel() ?? maxGeminiModel() ?? MAX_PROFILE_MODELS.grok
|
|
461
393
|
} : {
|
|
462
394
|
implementer: nativeSubagentModel(),
|
|
@@ -491,25 +423,26 @@ const claude = defineCommand({
|
|
|
491
423
|
codexInfo: requestedCli ? getCodexVersion() : null
|
|
492
424
|
});
|
|
493
425
|
const geminiModelsAvailable = isMaxProfile ? maxGeminiModel() !== void 0 : geminiAvailable();
|
|
494
|
-
if (!geminiModelsAvailable) consola.info(isMaxProfile ? "Neither Grok 4.6/high nor Gemini 3.
|
|
426
|
+
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.");
|
|
495
427
|
const fastDescriptor = profileDescriptor(launchProfileId);
|
|
496
|
-
const baseGroups = isMaxProfile ? ["peers", "search"] : [
|
|
428
|
+
const baseGroups = isFastProfile || isMaxProfile ? ["peers", "search"] : [
|
|
497
429
|
"peers",
|
|
498
430
|
"search",
|
|
499
431
|
"orchestrate"
|
|
500
432
|
];
|
|
501
|
-
if (workerToolsEnabled() && !isMaxProfile) baseGroups.push("workers");
|
|
502
|
-
if (isMaxProfile &&
|
|
433
|
+
if (workerToolsEnabled() && !isFastProfile && !isMaxProfile) baseGroups.push("workers");
|
|
434
|
+
if ((isFastProfile || isMaxProfile) && browseAgentAvailable) baseGroups.push("workers");
|
|
503
435
|
const enabledGroups = fastDescriptor.allowedGroups ? baseGroups.filter((g) => fastDescriptor.allowedGroups.has(g)) : baseGroups;
|
|
504
436
|
if (!isFastProfile && !isMaxProfile && standInToolEnabled()) enabledGroups.push("decide");
|
|
505
437
|
if (isMaxProfile && maxOpusModel() !== void 0 && standInToolEnabled({ maxProfile: true })) enabledGroups.push("decide");
|
|
506
|
-
if (
|
|
438
|
+
if (directBrowserAvailable && (!fastDescriptor.allowedGroups || fastDescriptor.allowedGroups.has("browser"))) enabledGroups.push("browser");
|
|
507
439
|
if (!isFastProfile && !isMaxProfile && fleetToolsEnabled()) enabledGroups.push("fleet");
|
|
508
440
|
if (!isFastProfile && !isMaxProfile && agentToolsEnabled()) enabledGroups.push("first-mate");
|
|
509
441
|
if (isMaxProfile && fleetToolsEnabled()) enabledGroups.push("fleet");
|
|
510
442
|
if (isMaxProfile && agentToolsEnabled()) enabledGroups.push("first-mate");
|
|
511
443
|
const { keys: groupKeys, skipped: skippedGroups } = await resolveGroupKeysFromMirror(enabledGroups);
|
|
512
|
-
|
|
444
|
+
operatingGroupKeys = groupKeys;
|
|
445
|
+
if (isFastProfile && (fastOracleModel() == null || fastAdvisorModel() == null || nativeAgentModels.implementer == null)) throw new Error("fast profile prerequisite drift: exact Oracle, Advisor, or implementer model no longer resolves");
|
|
513
446
|
const runtime = await writePeerMcpRuntimeFiles(serverUrl, {
|
|
514
447
|
codexCli: backend === "cli",
|
|
515
448
|
selfInvocation,
|
|
@@ -517,7 +450,7 @@ const claude = defineCommand({
|
|
|
517
450
|
geminiModel: isMaxProfile ? maxGeminiModel() : resolveGeminiReviewModel(),
|
|
518
451
|
groupKeys,
|
|
519
452
|
workerToolsAvailable: !isFastProfile && !isMaxProfile && workerToolsEnabled(),
|
|
520
|
-
browseAvailable:
|
|
453
|
+
browseAvailable: browseAgentAvailable,
|
|
521
454
|
nativeSubagentModel: nativeAgentModels.implementer,
|
|
522
455
|
reviewerModel: nativeAgentModels.reviewer,
|
|
523
456
|
reviewerFastModel: nativeAgentModels["reviewer-fast"],
|
|
@@ -531,22 +464,21 @@ const claude = defineCommand({
|
|
|
531
464
|
includeCoordinator: fastDescriptor.hasCoordinator,
|
|
532
465
|
...isFastProfile ? {
|
|
533
466
|
fastProfile: true,
|
|
534
|
-
|
|
535
|
-
|
|
536
|
-
|
|
537
|
-
|
|
538
|
-
|
|
539
|
-
plannerEffort: FAST_PLANNER_EFFORT,
|
|
540
|
-
criticEffort: FAST_CRITIC_EFFORT
|
|
467
|
+
fastExploreModel: nativeAgentModels.Explore,
|
|
468
|
+
fastPlanModel: nativeAgentModels.Plan,
|
|
469
|
+
fastGeneralPurposeModel: nativeAgentModels["general-purpose"],
|
|
470
|
+
fastImplementerModel: nativeAgentModels.implementer,
|
|
471
|
+
fastReviewerModel: nativeAgentModels.reviewer
|
|
541
472
|
} : isMaxProfile ? {
|
|
542
473
|
maxProfile: true,
|
|
543
474
|
workerToolsAvailable: false,
|
|
544
|
-
browseAvailable:
|
|
475
|
+
browseAvailable: browseAgentAvailable,
|
|
545
476
|
maxExploreModel: MAX_PROFILE_MODELS.luna,
|
|
546
477
|
maxPlanModel: MAX_PROFILE_MODELS.sol,
|
|
547
478
|
maxGeneralPurposeModel: MAX_PROFILE_MODELS.luna,
|
|
548
479
|
maxImplementerModel: MAX_PROFILE_MODELS.gemini,
|
|
549
|
-
maxReviewerModel:
|
|
480
|
+
maxReviewerModel: resolvedMaxReviewerModel,
|
|
481
|
+
maxReviewerEffort: resolvedMaxReviewerModel === MAX_PROFILE_MODELS.luna ? "max" : "high",
|
|
550
482
|
maxBrainstormModel: maxGrokModel() ?? maxGeminiModel() ?? MAX_PROFILE_MODELS.grok,
|
|
551
483
|
maxGeminiModel: maxGeminiModel(),
|
|
552
484
|
maxGrokModel: maxGrokModel(),
|
|
@@ -612,7 +544,10 @@ const claude = defineCommand({
|
|
|
612
544
|
let fastGuardInstalled = false;
|
|
613
545
|
try {
|
|
614
546
|
const settingsPath = path.join(PATHS.CLAUDE_CONFIG_DIR, "settings.json");
|
|
615
|
-
const guardCommand = buildFastDispatchGuardHookCommand(selfInvocation
|
|
547
|
+
const guardCommand = buildFastDispatchGuardHookCommand(selfInvocation, {
|
|
548
|
+
allowBrowse: browseAgentAvailable,
|
|
549
|
+
allowedTargets: [...fastDescriptor.nativeRoster ?? [], ...browseAgentAvailable ? ["worker-browse"] : []]
|
|
550
|
+
});
|
|
616
551
|
await injectStopHookIntoSettingsFile(settingsPath, guardCommand, "PreToolUse", 10, FAST_DISPATCH_TOOL_MATCHER);
|
|
617
552
|
fastGuardInstalled = true;
|
|
618
553
|
} catch (err) {
|
|
@@ -624,7 +559,10 @@ const claude = defineCommand({
|
|
|
624
559
|
let maxGuardInstalled = false;
|
|
625
560
|
try {
|
|
626
561
|
const settingsPath = path.join(PATHS.CLAUDE_CONFIG_DIR, "settings.json");
|
|
627
|
-
const guardCommand = buildMaxDispatchGuardHookCommand(selfInvocation
|
|
562
|
+
const guardCommand = buildMaxDispatchGuardHookCommand(selfInvocation, {
|
|
563
|
+
reviewerModel: resolvedMaxReviewerModel,
|
|
564
|
+
reviewerEffort: resolvedMaxReviewerModel === MAX_PROFILE_MODELS.luna ? "max" : "high"
|
|
565
|
+
});
|
|
628
566
|
await injectStopHookIntoSettingsFile(settingsPath, guardCommand, "PreToolUse", 10, MAX_DISPATCH_TOOL_MATCHER);
|
|
629
567
|
maxGuardInstalled = true;
|
|
630
568
|
} catch (err) {
|
|
@@ -660,12 +598,12 @@ const claude = defineCommand({
|
|
|
660
598
|
} catch (err) {
|
|
661
599
|
consola.warn(`Could not auto-approve injected tools: ${String(err)}`);
|
|
662
600
|
}
|
|
663
|
-
if (workerSkillsActive || isMaxProfile &&
|
|
601
|
+
if (workerSkillsActive || (isFastProfile || isMaxProfile) && browseAgentAvailable) if (!(isFastProfile || 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.");
|
|
664
602
|
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.");
|
|
665
603
|
else try {
|
|
666
604
|
const settingsPath = path.join(PATHS.CLAUDE_CONFIG_DIR, "settings.json");
|
|
667
605
|
const workersKey = workersKeyOf(groupKeys);
|
|
668
|
-
const modes = isMaxProfile ? ["browse"] : activeDispatchModes({ browse:
|
|
606
|
+
const modes = isFastProfile || isMaxProfile ? ["browse"] : activeDispatchModes({ browse: browseAgentAvailable });
|
|
669
607
|
const cmd = buildWorkerGuardHookCommand(selfInvocation, workersKey, modes);
|
|
670
608
|
const matcher = guardToolMatcher(workersKey, modes);
|
|
671
609
|
await injectStopHookIntoSettingsFile(settingsPath, cmd, "PreToolUse", 10, matcher);
|
|
@@ -698,14 +636,15 @@ const claude = defineCommand({
|
|
|
698
636
|
} catch (err) {
|
|
699
637
|
consola.warn(`Could not register the ai-or-die session-bind hook: ${String(err)}`);
|
|
700
638
|
}
|
|
701
|
-
if (
|
|
702
|
-
|
|
639
|
+
if (artifactAvailable) {
|
|
640
|
+
const artifactReviewSkill = buildArtifactReviewSkill(groupKeys.peers);
|
|
641
|
+
await writeInjectedSkill(artifactReviewSkill.name, artifactReviewSkill.md).catch(() => ({ written: false }));
|
|
703
642
|
try {
|
|
704
643
|
await prependArtifactPanelDirectiveToMirroredClaudeMd(groupKeys.peers);
|
|
705
644
|
} catch (err) {
|
|
706
645
|
consola.warn(`Artifact-panel directive prepend failed: ${String(err)}`);
|
|
707
646
|
}
|
|
708
|
-
|
|
647
|
+
try {
|
|
709
648
|
await writeArtifactCredsToMirror(shouldUseInsecureTls(process$1.env.AIORDIE_BASE_URL ?? ""));
|
|
710
649
|
const settingsPath = path.join(PATHS.CLAUDE_CONFIG_DIR, "settings.json");
|
|
711
650
|
const cmd = buildArtifactOpenHookCommand(selfInvocation);
|
|
@@ -828,12 +767,13 @@ const claude = defineCommand({
|
|
|
828
767
|
geminiModel: isMaxProfile ? maxGeminiModel() : resolveGeminiReviewModel(),
|
|
829
768
|
workerToolsAvailable: isMaxProfile ? false : workerToolsEnabled(),
|
|
830
769
|
standInAvailable: isMaxProfile ? maxOpusModel() !== void 0 && standInToolEnabled({ maxProfile: true }) : standInToolEnabled(),
|
|
831
|
-
browseAvailable:
|
|
832
|
-
browserToolsAvailable:
|
|
770
|
+
browseAvailable: browseAgentAvailable,
|
|
771
|
+
browserToolsAvailable: directBrowserAvailable,
|
|
833
772
|
compoundBrowseAvailable: isMaxProfile ? false : browserCompoundToolsEnabled(),
|
|
834
773
|
powerBrowseAvailable: isMaxProfile ? false : state.powerBrowseEnabled,
|
|
835
774
|
fleetAvailable: fleetToolsEnabled(),
|
|
836
775
|
agentToolsAvailable: agentToolsEnabled(),
|
|
776
|
+
artifactToolsAvailable: artifactAvailable,
|
|
837
777
|
...nativeAvailability,
|
|
838
778
|
profile: launchProfileId,
|
|
839
779
|
groupKeys
|
|
@@ -842,10 +782,11 @@ const claude = defineCommand({
|
|
|
842
782
|
peerAwarenessSummary = buildPeerAwarenessSummary({
|
|
843
783
|
workerToolsAvailable: isMaxProfile ? false : workerToolsEnabled(),
|
|
844
784
|
standInAvailable: isMaxProfile ? maxOpusModel() !== void 0 && standInToolEnabled({ maxProfile: true }) : standInToolEnabled(),
|
|
845
|
-
browseAvailable:
|
|
846
|
-
browserToolsAvailable:
|
|
785
|
+
browseAvailable: browseAgentAvailable,
|
|
786
|
+
browserToolsAvailable: directBrowserAvailable,
|
|
847
787
|
fleetAvailable: fleetToolsEnabled(),
|
|
848
788
|
agentToolsAvailable: agentToolsEnabled(),
|
|
789
|
+
artifactToolsAvailable: artifactAvailable,
|
|
849
790
|
...nativeAvailability,
|
|
850
791
|
profile: launchProfileId,
|
|
851
792
|
nativeAgentModels,
|
|
@@ -875,11 +816,17 @@ const claude = defineCommand({
|
|
|
875
816
|
}
|
|
876
817
|
consola.warn(`Peer MCP wiring failed (claude will launch without it): ${err instanceof Error ? err.message : String(err)}`);
|
|
877
818
|
}
|
|
878
|
-
|
|
819
|
+
const operatingDefaultsDigest = buildOperatingDefaultsDigest({ profile: launchProfileId });
|
|
820
|
+
extraArgs.push("--append-system-prompt", peerAwarenessSnippet && peerAwarenessSummary ? `${operatingDefaultsDigest}\n\n${peerAwarenessSummary}` : operatingDefaultsDigest);
|
|
879
821
|
try {
|
|
880
822
|
await prependOperatingDefaultsToMirroredClaudeMd(buildOperatingDefaultsDirective({
|
|
881
823
|
...nativeAvailability,
|
|
882
|
-
fastRuntimeAvailable: fastWiringComplete
|
|
824
|
+
fastRuntimeAvailable: fastWiringComplete,
|
|
825
|
+
browseAvailable: browseAgentAvailable,
|
|
826
|
+
browserToolsAvailable: directBrowserAvailable,
|
|
827
|
+
artifactAvailable,
|
|
828
|
+
groupKeys: operatingGroupKeys,
|
|
829
|
+
peersKey: operatingGroupKeys.peers
|
|
883
830
|
}));
|
|
884
831
|
} catch (err) {
|
|
885
832
|
consola.warn(`Operating-defaults CLAUDE.md prepend failed: ${err instanceof Error ? err.message : String(err)}`);
|
|
@@ -901,4 +848,4 @@ const claude = defineCommand({
|
|
|
901
848
|
//#endregion
|
|
902
849
|
export { claude };
|
|
903
850
|
|
|
904
|
-
//# sourceMappingURL=claude-
|
|
851
|
+
//# sourceMappingURL=claude-Drv0roq1.js.map
|