github-router 0.3.176 → 0.3.177
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-BWoDQ-3C.js → engine-DOOYh35O.js} +4 -4
- package/dist/{lifecycle-L7Y7RJl4.js → lifecycle-ClliSC-c.js} +2 -2
- package/dist/{lifecycle-BAug_A5A.js → lifecycle-D0n3hXUT.js} +2 -2
- package/dist/{lifecycle-ChPBRt6K.js → lifecycle-DrDEjx_c.js} +2 -2
- package/dist/{lifecycle-ChPBRt6K.js.map → lifecycle-DrDEjx_c.js.map} +1 -1
- package/dist/{lifecycle-BUXxiltc.js → lifecycle-Dvr3pGGG.js} +2 -2
- package/dist/{lifecycle-BUXxiltc.js.map → lifecycle-Dvr3pGGG.js.map} +1 -1
- package/dist/main.js +36 -17
- package/dist/main.js.map +1 -1
- package/dist/{paths-CTlT1nTo.js → paths-BZPgxKUl.js} +10 -10
- package/dist/{paths-CTlT1nTo.js.map → paths-BZPgxKUl.js.map} +1 -1
- package/dist/paths-CDYvyApX.js +3 -0
- package/dist/{peer-mcp-personas-BKkdfOyK.js → peer-mcp-personas-BtQi-dF-.js} +46 -21
- package/dist/peer-mcp-personas-BtQi-dF-.js.map +1 -0
- package/package.json +1 -1
- package/dist/paths-DN3O54iE.js +0 -3
- package/dist/peer-mcp-personas-BKkdfOyK.js.map +0 -1
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { t as PATHS } from "./paths-
|
|
2
|
-
import { d as runCommandCapture, l as parseBoolEnv, n as isPidAlive, o as trackChild, p as runManagedExeCapture, r as registerColbertExitHandlers, t as getColbertInstanceUuid, u as resolveExecutable } from "./lifecycle-
|
|
3
|
-
import { i as registerExitHandlers, n as getInstanceUuid, r as recordWorkerRepo, t as WorktreeRegistry } from "./lifecycle-
|
|
1
|
+
import { t as PATHS } from "./paths-BZPgxKUl.js";
|
|
2
|
+
import { d as runCommandCapture, l as parseBoolEnv, n as isPidAlive, o as trackChild, p as runManagedExeCapture, r as registerColbertExitHandlers, t as getColbertInstanceUuid, u as resolveExecutable } from "./lifecycle-DrDEjx_c.js";
|
|
3
|
+
import { i as registerExitHandlers, n as getInstanceUuid, r as recordWorkerRepo, t as WorktreeRegistry } from "./lifecycle-Dvr3pGGG.js";
|
|
4
4
|
import { createRequire } from "node:module";
|
|
5
5
|
import consola from "consola";
|
|
6
6
|
import { createHash, randomBytes, randomUUID, timingSafeEqual } from "node:crypto";
|
|
@@ -603,7 +603,7 @@ function filterBetaHeader(value) {
|
|
|
603
603
|
* dashes, insert dash at letter→digit boundaries, and collapse repeated
|
|
604
604
|
* dashes. E.g. "gpt5.3-codex" → "gpt-5-3-codex", "GPT-5.3-Codex" → "gpt-5-3-codex".
|
|
605
605
|
*/
|
|
606
|
-
function normalizeModelId(id) {
|
|
606
|
+
function normalizeModelId$1(id) {
|
|
607
607
|
return id.toLowerCase().replace(/\./g, "-").replace(/([a-z])(\d)/g, "$1-$2").replace(/-{2,}/g, "-");
|
|
608
608
|
}
|
|
609
609
|
/**
|
|
@@ -651,8 +651,8 @@ function resolveModel(modelId) {
|
|
|
651
651
|
return codexModels[0].id;
|
|
652
652
|
}
|
|
653
653
|
}
|
|
654
|
-
const normalized = normalizeModelId(modelId);
|
|
655
|
-
const normMatch = models.find((m) => normalizeModelId(m.id) === normalized);
|
|
654
|
+
const normalized = normalizeModelId$1(modelId);
|
|
655
|
+
const normMatch = models.find((m) => normalizeModelId$1(m.id) === normalized);
|
|
656
656
|
if (normMatch) return normMatch.id;
|
|
657
657
|
const dateStripped = modelId.replace(/^(claude-[\w.-]+)-20\d{6}$/i, "$1");
|
|
658
658
|
if (dateStripped !== modelId) {
|
|
@@ -16881,7 +16881,7 @@ function logAudit$1(record) {
|
|
|
16881
16881
|
try {
|
|
16882
16882
|
const fs$2 = await import("node:fs/promises");
|
|
16883
16883
|
const path$1 = await import("node:path");
|
|
16884
|
-
const { PATHS: PATHS$1 } = await import("./paths-
|
|
16884
|
+
const { PATHS: PATHS$1 } = await import("./paths-CDYvyApX.js");
|
|
16885
16885
|
const dir = path$1.join(PATHS$1.APP_DIR, "browser-mcp");
|
|
16886
16886
|
await fs$2.mkdir(dir, { recursive: true });
|
|
16887
16887
|
const line = JSON.stringify({
|
|
@@ -23491,6 +23491,33 @@ async function countTokens(body, extraHeaders, callerSignal, retryTransient = fa
|
|
|
23491
23491
|
return response;
|
|
23492
23492
|
}
|
|
23493
23493
|
|
|
23494
|
+
//#endregion
|
|
23495
|
+
//#region src/lib/openai-frontier.ts
|
|
23496
|
+
/**
|
|
23497
|
+
* OpenAI frontier models + shim effort policy.
|
|
23498
|
+
*
|
|
23499
|
+
* Dependency-free leaf so BOTH `mcp-capabilities.ts` (model SELECTION) and the
|
|
23500
|
+
* hot `anthropic-translate` shim path (effort POLICY) can import without pulling
|
|
23501
|
+
* the heavy mcp-capabilities transitive deps (colbert/browser/worker) into the
|
|
23502
|
+
* shim. The selection list and the effort-policy set are deliberately SEPARATE
|
|
23503
|
+
* constants (same members today) so a future frontier model added for selection
|
|
23504
|
+
* does not silently inherit the xhigh effort default.
|
|
23505
|
+
*/
|
|
23506
|
+
/** Preference-ordered OpenAI frontier reasoning models (SELECTION list). */
|
|
23507
|
+
const OPENAI_FRONTIER_MODELS = ["gpt-5.6-sol", "gpt-5.5"];
|
|
23508
|
+
/** Models whose shim DEFAULT reasoning effort is xhigh (effort POLICY set). */
|
|
23509
|
+
const XHIGH_DEFAULT_SHIM_MODELS = ["gpt-5.6-sol", "gpt-5.5"];
|
|
23510
|
+
/** Normalize a model id for policy comparison: strip a leading `vendor/`
|
|
23511
|
+
* prefix and any trailing `[...]` decoration(s) (e.g. `[1m]`, `[1m][beta]`)
|
|
23512
|
+
* plus trailing whitespace. */
|
|
23513
|
+
function normalizeModelId(id) {
|
|
23514
|
+
return (id.includes("/") ? id.slice(id.lastIndexOf("/") + 1) : id).replace(/(?:\[[^\]]*\])+\s*$/, "");
|
|
23515
|
+
}
|
|
23516
|
+
/** True iff `id` (after normalization) is in the xhigh effort-policy set. */
|
|
23517
|
+
function shimDefaultsToXhigh(id) {
|
|
23518
|
+
return XHIGH_DEFAULT_SHIM_MODELS.includes(normalizeModelId(id));
|
|
23519
|
+
}
|
|
23520
|
+
|
|
23494
23521
|
//#endregion
|
|
23495
23522
|
//#region src/lib/mcp-capabilities.ts
|
|
23496
23523
|
/**
|
|
@@ -23521,14 +23548,6 @@ function geminiAvailable(source = state) {
|
|
|
23521
23548
|
return models.some((m) => /^gemini-3\..*pro/i.test(m.id));
|
|
23522
23549
|
}
|
|
23523
23550
|
/**
|
|
23524
|
-
* OpenAI frontier reasoning models in preference order. `gpt-5.6-sol` is the
|
|
23525
|
-
* current default; `gpt-5.5` is retained as a fallback. Both share the same
|
|
23526
|
-
* `pro_plus/business/enterprise/max` restriction tier, so the fallback only
|
|
23527
|
-
* matters during a rollout-lag window where the newer slug hasn't yet appeared
|
|
23528
|
-
* in the account's catalog.
|
|
23529
|
-
*/
|
|
23530
|
-
const OPENAI_FRONTIER_MODELS = ["gpt-5.6-sol", "gpt-5.5"];
|
|
23531
|
-
/**
|
|
23532
23551
|
* First available OpenAI frontier model in the live catalog (prefer
|
|
23533
23552
|
* `gpt-5.6-sol`, fall back to `gpt-5.5`). Returns undefined when neither is
|
|
23534
23553
|
* present. With `requireToolCalls`, only returns a model whose catalog entry
|
|
@@ -23552,9 +23571,11 @@ function standInToolEnabled() {
|
|
|
23552
23571
|
const hasGeminiPro = geminiAvailable();
|
|
23553
23572
|
return hasOpenAi && hasOpus && hasGeminiPro;
|
|
23554
23573
|
}
|
|
23555
|
-
/** Return the
|
|
23556
|
-
* Prefers `gpt-5.6-sol`, falls
|
|
23557
|
-
|
|
23574
|
+
/** Return the model for the native OpenAI subagents (implementer, debugger,
|
|
23575
|
+
* qa-engineer) iff it is live with tool calls. Prefers `gpt-5.6-sol`, falls
|
|
23576
|
+
* back to `gpt-5.5`. One gate governs all three — they need the same frontier
|
|
23577
|
+
* model. */
|
|
23578
|
+
function nativeSubagentModel() {
|
|
23558
23579
|
return resolveOpenAiFrontier({ requireToolCalls: true });
|
|
23559
23580
|
}
|
|
23560
23581
|
/**
|
|
@@ -30492,6 +30513,9 @@ function buildAgentPrompt(persona, opts) {
|
|
|
30492
30513
|
* of the live catalog). The raw `mcp__<workers>__*` tools are named only
|
|
30493
30514
|
* as the guarded plumbing the dispatchers call, never as a main-agent
|
|
30494
30515
|
* interface.
|
|
30516
|
+
* - Always names the implementer/debugger/qa-engineer native subagents
|
|
30517
|
+
* (they are injected unconditionally); the implementer-vs-`worker-implement`
|
|
30518
|
+
* contrast is added only when worker tools are available.
|
|
30495
30519
|
* - Conditionally lists stand_in only when `standInAvailable`
|
|
30496
30520
|
* (mirrors `standInToolEnabled()`).
|
|
30497
30521
|
* - Conditionally lists gh-first-mate only when `agentToolsAvailable`
|
|
@@ -30523,7 +30547,8 @@ function buildPeerAwarenessSnippet(opts) {
|
|
|
30523
30547
|
const codexCliClause = opts.codexCli ? " `mcp__codex-cli__codex` dispatches to `codex-implementer` (gpt-5.3-codex with workspace-write) for end-to-end coding tasks." : "";
|
|
30524
30548
|
const para2Parts = [`\`mcp__${searchKey}__code\` is the one-stop code search (no extra model call). Its DEFAULT mode (or \`mode:"semantic"\`) ranks by MEANING via ColBERT over a per-workspace index, the first thing to reach for on intent/concept questions ("where is retry/backoff handled", "how does auth work"); when that index isn't ready it transparently falls back to lexical (the response \`source\` says which engine ran). Forced modes cover the rest: \`lexical\` (BM25F-ranked + tree-sitter, best for exact symbols), \`exact\`, \`regex\`, \`complete\` (exhaustive set), \`ast_pattern\`+\`ast_lang\` for multi-line AST shapes, \`scan\` for a whole-workspace symbol outline, \`multiline\` for cross-line regex. Multiple queries can run in a single turn. The index covers code-shaped files; for unstructured files (logs, \`.csv\`, \`.env*\`, config-only wiring), \`grep\`/\`glob\` still apply.`];
|
|
30525
30549
|
if (opts.workerToolsAvailable) para2Parts.push(`\`worker-*\` are background Agent subagents (subagent_type) that run the matching worker in its own context and deliver the result as a completion notification, so a long run never blocks the turn: \`worker-explore\` (read-only research), \`worker-review\` (reads the code to verify a change or claim), \`worker-plan\` (ordered implementation plan), \`worker-implement\` (edit/write/bash; \`worktree: true\` isolates in a git worktree and returns the diff), \`worker-test\` (independent test author). The raw \`mcp__${workersKey}__*\` tools they call are guarded (a direct main-thread call is redirected to the matching agent); Workers themselves have \`code_search\`.`);
|
|
30526
|
-
|
|
30550
|
+
para2Parts.push(`Three native subagents are always available (Task): \`implementer\` (bounded implementation), \`debugger\` (reproduce + isolate a failure's root cause), and \`qa-engineer\` (review + author/run tests), each in its own context so the lead's context stays free; on gpt-5.6-sol when in the catalog, else the lead's model.`);
|
|
30551
|
+
if (opts.workerToolsAvailable) para2Parts.push(`For a bounded, well-scoped implementation, prefer the \`implementer\` subagent over \`worker-implement\`; reach for \`worker-implement\` only when you specifically need git-worktree isolation, parallel variants, or a throwaway experiment.`);
|
|
30527
30552
|
if (opts.workerToolsAvailable) para2Parts.push(`\`mcp__${orchestrateKey}__decompose\` composes an open-ended ask into a typed, VERIFIED workflow IR (a strong driver decorrelated by a cross-lab critic, so the decompose step isn't a single point of failure), and \`mcp__${orchestrateKey}__run_workflow\` executes that IR through a frozen kernel delivering max(orchestrated, baseline) over a sealed executable gate, so it never ships worse than a plain single-model run. \`mcp__${orchestrateKey}__verify_workflow\` checks an IR's floor invariants before you run it, and \`mcp__${orchestrateKey}__attest_step\` audits that a finished run's producers were each checked by a different lab. They suit non-trivial, role-separated asks; a trivial ask does not need them.`);
|
|
30528
30553
|
else para2Parts.push(`\`mcp__${orchestrateKey}__verify_workflow\` statically checks a workflow IR's floor invariants and \`mcp__${orchestrateKey}__attest_step\` audits a run's cross-lab lineage (the \`decompose\`/\`run_workflow\` composer + kernel need the worker backend, unavailable here).`);
|
|
30529
30554
|
if (opts.workerToolsAvailable) {
|
|
@@ -31658,5 +31683,5 @@ async function runStandInToolCall(args, signal) {
|
|
|
31658
31683
|
}
|
|
31659
31684
|
|
|
31660
31685
|
//#endregion
|
|
31661
|
-
export { isAdvisorRequested as $,
|
|
31662
|
-
//# sourceMappingURL=peer-mcp-personas-
|
|
31686
|
+
export { isAdvisorRequested as $, cacheCopilotVersion as $t, liveExec as A, provisionBrowserAssets as At, withNoOutputRetry as B, DEFAULT_CODEX_MODEL as Bt, fileReviewDebounce as C, resolveMcpToolTimeoutMs as Ct, stopGateEnabledForRepo as D, MAX_RESPONSE_BODY_BYTES as Dt, repoRoot as E, createChatCompletions as Et, IMPLEMENT_DEFAULT_MODEL as F, shouldUseInsecureTls as Ft, vscodeRipgrepPath as G, generateRandomPort as Gt, buildToolbeltAwareness as H, DEFAULT_PORT as Ht, PLAN_DEFAULT_MODEL as I, ArtifactClient as It, searchWeb as J, withInstallLock as Jt, TOOLBELT_TOOLS$1 as K, pickClaudeDefault as Kt, REVIEW_DEFAULT_MODEL as L, collapsePathKeys as Lt, BROWSE_DEFAULT_MODEL as M, provisionAndIndexColbert as Mt, DEFAULT_MODEL as N, extractTarGzMember as Nt, stopReviewStateDir as O, readResponseBodyCapped as Ot, EXPLORE_DEFAULT_MODEL as P, extractZipMember as Pt, injectAdvisorTool as Q, tryRefreshAndRetry as Qt, appendPlanReminder as R, toolbeltPathOverride as Rt, fileLastPromptStore as S, assembleResponsesPayload as St, repoFingerprint as T, createResponses as Tt, toolbeltEnabled as U, UPSTREAM_FETCH_TIMEOUT_MS as Ut, availableToolCommands as V, DEFAULT_CODEX_MODEL_FALLBACKS as Vt, toolbeltSkipSet as W, UPSTREAM_INACTIVITY_TIMEOUT_MS as Wt, ADVISOR_TOOL_INSTRUCTIONS as X, setupGitHubAgentToken as Xt, ADVISOR_INTERNAL_TOOL_NAME as Y, setupCopilotToken as Yt, buildAdvisorStream as Z, setupGitHubToken as Zt, stopGateId as _, workerToolsEnabled as _t, buildPeerAwarenessSnippet as a, resolveModel as an, relayAnthropicStream as at, fileBaselineStore as b, createMessages as bt, buildArtifactOpenHookCommand as c, fetchWithTransientRetry as cn, agentToolsEnabled as ct, captureLaunchBaseline as d, GITHUB_API_BASE_URL as dn, browserCompoundToolsEnabled as dt, cacheModels as en, buildAnthropicErrorEvent as et, decideStopHook as f, copilotBaseUrl as fn, browserToolsEnabled as ft, stopGateDisabled as g, standInToolEnabled as gt, launchBaselineKey as h, state as hn, nativeSubagentModel as ht, buildAgentPrompt as i, resolveCodexModel as in, readIteratorWithTimeout as it, resolveSealedGate as j, hasSupportedBrowserInstalled as jt, trustRepo as k, parseJsonOrDiagnose as kt, buildSessionBindHookCommand as l, HTTPError as ln, artifactToolsEnabled as lt, injectStopHookIntoSettingsFile as m, githubHeaders as mn, geminiAvailable as mt, MCP_GROUPS as n, filterBetaHeader as nn, isControllerClosedError as nt, buildPeerAwarenessSummary as o, sleep as on, handleMcpDelete as ot, fileBlockBudget as p, copilotHeaders as pn, fleetToolsEnabled as pt, assetFor as q, getPackageVersion as qt, assertMcpToolSurfaceConsistent as r, isNullish as rn, logStreamError as rt, personasFor as s, getModels as sn, handleMcpPost as st, GROUP_META as t, cacheVSCodeVersion as tn, buildOpenAIErrorEvent as tt, buildStopHookCommand as u, forwardError as un, browseAgentEnabled as ut, stopGatePlanMode as v, shimDefaultsToXhigh as vt, isSubagentContext as w, pickEndpoint as wt, fileFindingsStore as x, getTokenCount as xt, stopReviewEnabled as y, countTokens as yt, runWorkerAgent as z, DEFAULT_CLAUDE_MODEL_FALLBACKS as zt };
|
|
31687
|
+
//# sourceMappingURL=peer-mcp-personas-BtQi-dF-.js.map
|