github-router 0.3.131 → 0.3.135
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-CEaYFr0J.js +6 -0
- package/dist/{lifecycle-CbtmGbjI.js → lifecycle-C0Y_e0zA.js} +2 -2
- package/dist/{lifecycle-BoId1aMF.js → lifecycle-C8t7-5pU.js} +2 -2
- package/dist/{lifecycle-Cyxwmj1c.js → lifecycle-CeVDX6av.js} +2 -2
- package/dist/{lifecycle-Cyxwmj1c.js.map → lifecycle-CeVDX6av.js.map} +1 -1
- package/dist/{lifecycle-DTJ2Ugqf.js → lifecycle-Cqe8OQVX.js} +2 -2
- package/dist/{lifecycle-DTJ2Ugqf.js.map → lifecycle-Cqe8OQVX.js.map} +1 -1
- package/dist/main.js +350 -14
- package/dist/main.js.map +1 -1
- package/dist/paths-Bljq3UJC.js +3 -0
- package/dist/{paths-CNgpeaWd.js → paths-Cn5OzmYL.js} +34 -4
- package/dist/{paths-CNgpeaWd.js.map → paths-Cn5OzmYL.js.map} +1 -1
- package/dist/{peer-mcp-personas-CH2gmdPN.js → peer-mcp-personas-ClyKATAD.js} +63 -28
- package/dist/peer-mcp-personas-ClyKATAD.js.map +1 -0
- package/package.json +2 -1
- package/dist/engine-DCsTvsSw.js +0 -6
- package/dist/paths-B-ATynF7.js +0 -3
- package/dist/peer-mcp-personas-CH2gmdPN.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-Cn5OzmYL.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-Cqe8OQVX.js";
|
|
3
|
+
import { i as registerExitHandlers, n as getInstanceUuid, r as recordWorkerRepo, t as WorktreeRegistry } from "./lifecycle-CeVDX6av.js";
|
|
4
4
|
import { createRequire } from "node:module";
|
|
5
5
|
import consola from "consola";
|
|
6
6
|
import { createHash, randomBytes, randomUUID, timingSafeEqual } from "node:crypto";
|
|
@@ -1047,6 +1047,24 @@ function collapsePathKeys(env) {
|
|
|
1047
1047
|
return env;
|
|
1048
1048
|
}
|
|
1049
1049
|
|
|
1050
|
+
//#endregion
|
|
1051
|
+
//#region src/lib/insecure-tls.ts
|
|
1052
|
+
const IS_BUN = typeof globalThis.Bun !== "undefined";
|
|
1053
|
+
let sharedInsecureDispatcher;
|
|
1054
|
+
function insecureDispatcher() {
|
|
1055
|
+
return sharedInsecureDispatcher ??= new Agent({ connect: { rejectUnauthorized: false } });
|
|
1056
|
+
}
|
|
1057
|
+
/**
|
|
1058
|
+
* Attach the runtime-correct TLS-verification-off mechanism to a fetch init for a
|
|
1059
|
+
* single self-signed direct-HTTPS instance: Bun → `tls`, Node → an undici
|
|
1060
|
+
* `dispatcher`. Exported so BOTH runtime branches are unit-testable under one
|
|
1061
|
+
* interpreter (the untested Node branch is exactly what shipped broken).
|
|
1062
|
+
*/
|
|
1063
|
+
function applyInsecureTls(init, isBun = IS_BUN) {
|
|
1064
|
+
if (isBun) init.tls = { rejectUnauthorized: false };
|
|
1065
|
+
else init.dispatcher = insecureDispatcher();
|
|
1066
|
+
}
|
|
1067
|
+
|
|
1050
1068
|
//#endregion
|
|
1051
1069
|
//#region src/lib/artifact/client.ts
|
|
1052
1070
|
var ArtifactError = class extends Error {
|
|
@@ -1068,11 +1086,13 @@ var ArtifactClient = class {
|
|
|
1068
1086
|
token;
|
|
1069
1087
|
sessionId;
|
|
1070
1088
|
fetchFn;
|
|
1089
|
+
insecureTLS;
|
|
1071
1090
|
constructor(options) {
|
|
1072
1091
|
this.baseUrl = options.baseUrl.replace(/\/+$/, "");
|
|
1073
1092
|
this.token = options.token;
|
|
1074
1093
|
this.sessionId = options.sessionId;
|
|
1075
1094
|
this.fetchFn = options.fetchFn ?? globalThis.fetch.bind(globalThis);
|
|
1095
|
+
this.insecureTLS = options.insecureTLS ?? false;
|
|
1076
1096
|
}
|
|
1077
1097
|
open(file, signal) {
|
|
1078
1098
|
return this.request("POST", `/api/artifact/${encodeURIComponent(this.sessionId)}/open`, { file }, signal);
|
|
@@ -1101,7 +1121,7 @@ var ArtifactClient = class {
|
|
|
1101
1121
|
const timeout = combineSignalAndTimeout(signal, timeoutMsHint);
|
|
1102
1122
|
let response;
|
|
1103
1123
|
try {
|
|
1104
|
-
|
|
1124
|
+
const init = {
|
|
1105
1125
|
method,
|
|
1106
1126
|
headers: {
|
|
1107
1127
|
Authorization: `Bearer ${this.token}`,
|
|
@@ -1110,7 +1130,9 @@ var ArtifactClient = class {
|
|
|
1110
1130
|
body: body === void 0 ? void 0 : JSON.stringify(body),
|
|
1111
1131
|
redirect: "error",
|
|
1112
1132
|
signal: timeout.signal
|
|
1113
|
-
}
|
|
1133
|
+
};
|
|
1134
|
+
if (this.insecureTLS) applyInsecureTls(init);
|
|
1135
|
+
response = await this.fetchFn(url.toString(), init);
|
|
1114
1136
|
} catch (err) {
|
|
1115
1137
|
throw mapNetworkError$1(err);
|
|
1116
1138
|
} finally {
|
|
@@ -1308,10 +1330,29 @@ function readArtifactEnv() {
|
|
|
1308
1330
|
return {
|
|
1309
1331
|
baseUrl,
|
|
1310
1332
|
token,
|
|
1311
|
-
sessionId
|
|
1333
|
+
sessionId,
|
|
1334
|
+
insecureTLS: shouldUseInsecureTls(baseUrl)
|
|
1312
1335
|
};
|
|
1313
1336
|
}
|
|
1337
|
+
function shouldUseInsecureTls(baseUrl) {
|
|
1338
|
+
let url;
|
|
1339
|
+
try {
|
|
1340
|
+
url = new URL(baseUrl);
|
|
1341
|
+
} catch {
|
|
1342
|
+
return false;
|
|
1343
|
+
}
|
|
1344
|
+
if (url.protocol !== "https:") return false;
|
|
1345
|
+
const explicit = (process.env.AIORDIE_INSECURE_TLS ?? "").trim().toLowerCase();
|
|
1346
|
+
if (explicit === "0" || explicit === "false" || explicit === "off") return false;
|
|
1347
|
+
if (isLoopbackIp(url.hostname)) return true;
|
|
1348
|
+
return url.hostname === "localhost" && (explicit === "1" || explicit === "true");
|
|
1349
|
+
}
|
|
1350
|
+
function isLoopbackIp(hostname) {
|
|
1351
|
+
const host = hostname.replace(/^\[|\]$/g, "");
|
|
1352
|
+
return host === "::1" || /^127(?:\.\d{1,3}){3}$/.test(host);
|
|
1353
|
+
}
|
|
1314
1354
|
function clientFromEnv(env) {
|
|
1355
|
+
consola.debug(`ARTIFACT_ENV: token present=${env.token.length > 0}, insecureTLS=${env.insecureTLS}`);
|
|
1315
1356
|
return new ArtifactClient(env);
|
|
1316
1357
|
}
|
|
1317
1358
|
async function pollUntilReady(client, signal) {
|
|
@@ -1644,21 +1685,6 @@ function createTunnelTokenProvider(runner = realDevtunnelRunner()) {
|
|
|
1644
1685
|
|
|
1645
1686
|
//#endregion
|
|
1646
1687
|
//#region src/lib/fleet/client.ts
|
|
1647
|
-
const IS_BUN = typeof globalThis.Bun !== "undefined";
|
|
1648
|
-
let sharedInsecureDispatcher;
|
|
1649
|
-
function insecureDispatcher() {
|
|
1650
|
-
return sharedInsecureDispatcher ??= new Agent({ connect: { rejectUnauthorized: false } });
|
|
1651
|
-
}
|
|
1652
|
-
/**
|
|
1653
|
-
* Attach the runtime-correct TLS-verification-off mechanism to a fetch init for a
|
|
1654
|
-
* single self-signed direct-HTTPS instance: Bun → `tls`, Node → an undici
|
|
1655
|
-
* `dispatcher`. Exported so BOTH runtime branches are unit-testable under one
|
|
1656
|
-
* interpreter (the untested Node branch is exactly what shipped broken).
|
|
1657
|
-
*/
|
|
1658
|
-
function applyInsecureTls(init, isBun = IS_BUN) {
|
|
1659
|
-
if (isBun) init.tls = { rejectUnauthorized: false };
|
|
1660
|
-
else init.dispatcher = insecureDispatcher();
|
|
1661
|
-
}
|
|
1662
1688
|
var FleetError = class extends Error {
|
|
1663
1689
|
code;
|
|
1664
1690
|
retryable;
|
|
@@ -8420,7 +8446,7 @@ function logAudit$1(record) {
|
|
|
8420
8446
|
try {
|
|
8421
8447
|
const fs$2 = await import("node:fs/promises");
|
|
8422
8448
|
const path$1 = await import("node:path");
|
|
8423
|
-
const { PATHS: PATHS$1 } = await import("./paths-
|
|
8449
|
+
const { PATHS: PATHS$1 } = await import("./paths-Bljq3UJC.js");
|
|
8424
8450
|
const dir = path$1.join(PATHS$1.APP_DIR, "browser-mcp");
|
|
8425
8451
|
await fs$2.mkdir(dir, { recursive: true });
|
|
8426
8452
|
const line = JSON.stringify({
|
|
@@ -20699,7 +20725,7 @@ function entryHasCommand(entry, command) {
|
|
|
20699
20725
|
* other entries. Returns a new object (never mutates the input). Re-running the
|
|
20700
20726
|
* launcher with the same command+event does not duplicate the hook.
|
|
20701
20727
|
*/
|
|
20702
|
-
function mergeStopHookIntoSettings(existing, command, event = "Stop", timeoutSec) {
|
|
20728
|
+
function mergeStopHookIntoSettings(existing, command, event = "Stop", timeoutSec, matcher) {
|
|
20703
20729
|
const base = existing && typeof existing === "object" ? { ...existing } : {};
|
|
20704
20730
|
const hooks = base.hooks && typeof base.hooks === "object" ? { ...base.hooks } : {};
|
|
20705
20731
|
const arr = Array.isArray(hooks[event]) ? [...hooks[event]] : [];
|
|
@@ -20709,7 +20735,10 @@ function mergeStopHookIntoSettings(existing, command, event = "Stop", timeoutSec
|
|
|
20709
20735
|
command
|
|
20710
20736
|
};
|
|
20711
20737
|
if (typeof timeoutSec === "number" && Number.isFinite(timeoutSec) && timeoutSec > 0) hook.timeout = timeoutSec;
|
|
20712
|
-
arr.push(
|
|
20738
|
+
arr.push(matcher ? {
|
|
20739
|
+
matcher,
|
|
20740
|
+
hooks: [hook]
|
|
20741
|
+
} : { hooks: [hook] });
|
|
20713
20742
|
}
|
|
20714
20743
|
hooks[event] = arr;
|
|
20715
20744
|
base.hooks = hooks;
|
|
@@ -20915,6 +20944,12 @@ function buildSessionBindHookCommand(execPath, scriptPath, outPath) {
|
|
|
20915
20944
|
const q = (s) => `"${s}"`;
|
|
20916
20945
|
return `${scriptPath && scriptPath !== execPath ? `${q(execPath)} ${q(scriptPath)}` : q(execPath)} internal-session-bind --out ${q(outPath)}`;
|
|
20917
20946
|
}
|
|
20947
|
+
/** Command for the `internal-artifact-open` hook (no args — token comes from the
|
|
20948
|
+
* mirror creds file, plan from the plans dir; nothing secret in argv). */
|
|
20949
|
+
function buildArtifactOpenHookCommand(execPath, scriptPath) {
|
|
20950
|
+
const q = (s) => `"${s}"`;
|
|
20951
|
+
return `${scriptPath && scriptPath !== execPath ? `${q(execPath)} ${q(scriptPath)}` : q(execPath)} internal-artifact-open`;
|
|
20952
|
+
}
|
|
20918
20953
|
/**
|
|
20919
20954
|
* Read-merge-atomic-write the Stop hook into a Claude Code `settings.json` file
|
|
20920
20955
|
* (the mirrored one). A MISSING file (ENOENT) starts from `{}`; any OTHER read or
|
|
@@ -20923,7 +20958,7 @@ function buildSessionBindHookCommand(execPath, scriptPath, outPath) {
|
|
|
20923
20958
|
* other setting, is idempotent, and uses temp+rename so Claude Code's mtime
|
|
20924
20959
|
* watcher never sees a half-written file. Returns the merged object.
|
|
20925
20960
|
*/
|
|
20926
|
-
async function injectStopHookIntoSettingsFile(settingsPath, command, event = "Stop", timeoutSec) {
|
|
20961
|
+
async function injectStopHookIntoSettingsFile(settingsPath, command, event = "Stop", timeoutSec, matcher) {
|
|
20927
20962
|
let existing = {};
|
|
20928
20963
|
let raw;
|
|
20929
20964
|
try {
|
|
@@ -20937,7 +20972,7 @@ async function injectStopHookIntoSettingsFile(settingsPath, command, event = "St
|
|
|
20937
20972
|
if (parsed && typeof parsed === "object" && !Array.isArray(parsed)) existing = parsed;
|
|
20938
20973
|
else throw new Error(`settings.json at ${settingsPath} is not a JSON object; refusing to overwrite`);
|
|
20939
20974
|
}
|
|
20940
|
-
const merged = mergeStopHookIntoSettings(existing, command, event, timeoutSec);
|
|
20975
|
+
const merged = mergeStopHookIntoSettings(existing, command, event, timeoutSec, matcher);
|
|
20941
20976
|
const tmp = `${settingsPath}.${process.pid}.tmp`;
|
|
20942
20977
|
await promises.writeFile(tmp, `${JSON.stringify(merged, null, 2)}\n`, { mode: 384 });
|
|
20943
20978
|
await promises.rename(tmp, settingsPath);
|
|
@@ -22705,5 +22740,5 @@ async function runStandInToolCall(args, signal) {
|
|
|
22705
22740
|
}
|
|
22706
22741
|
|
|
22707
22742
|
//#endregion
|
|
22708
|
-
export {
|
|
22709
|
-
//# sourceMappingURL=peer-mcp-personas-
|
|
22743
|
+
export { readIteratorWithTimeout as $, state as $t, DEFAULT_MODEL as A, generateRandomPort as At, toolbeltSkipSet as B, filterBetaHeader as Bt, repoRoot as C, toolbeltPathOverride as Ct, resolveSealedGate as D, DEFAULT_PORT as Dt, trustRepo as E, DEFAULT_CODEX_MODEL_FALLBACKS as Et, runWorkerAgent as F, setupGitHubToken as Ft, ADVISOR_INTERNAL_TOOL_NAME as G, getModels as Gt, TOOLBELT_TOOLS$1 as H, resolveCodexModel as Ht, withNoOutputRetry as I, tryRefreshAndRetry as It, injectAdvisorTool as J, forwardError as Jt, ADVISOR_TOOL_INSTRUCTIONS as K, fetchWithTransientRetry as Kt, availableToolCommands as L, cacheCopilotVersion as Lt, PLAN_DEFAULT_MODEL as M, getPackageVersion as Mt, REVIEW_DEFAULT_MODEL as N, withInstallLock as Nt, liveExec as O, UPSTREAM_FETCH_TIMEOUT_MS as Ot, appendPlanReminder as P, setupCopilotToken as Pt, logStreamError as Q, githubHeaders as Qt, buildToolbeltAwareness as R, cacheModels as Rt, repoFingerprint as S, collapsePathKeys as St, stopReviewStateDir as T, DEFAULT_CODEX_MODEL as Tt, assetFor as U, resolveModel as Ut, vscodeRipgrepPath as V, isNullish as Vt, searchWeb as W, sleep as Wt, buildOpenAIErrorEvent as X, copilotBaseUrl as Xt, isAdvisorRequested as Y, GITHUB_API_BASE_URL as Yt, isControllerClosedError as Z, copilotHeaders as Zt, fileBaselineStore as _, provisionAndIndexColbert as _t, buildPeerAwarenessSnippet as a, standInToolEnabled as at, fileReviewDebounce as b, shouldUseInsecureTls as bt, buildSessionBindHookCommand as c, createMessages as ct, decideStopHook as d, createChatCompletions as dt, relayAnthropicStream as et, fileBlockBudget as f, MAX_RESPONSE_BODY_BYTES as ft, stopReviewEnabled as g, hasSupportedBrowserInstalled as gt, stopGateId as h, provisionBrowserAssets as ht, buildAgentPrompt as i, fleetToolsEnabled as it, IMPLEMENT_DEFAULT_MODEL as j, pickClaudeDefault as jt, BROWSE_DEFAULT_MODEL as k, UPSTREAM_INACTIVITY_TIMEOUT_MS as kt, buildStopHookCommand as l, getTokenCount as lt, launchBaselineKey as m, parseJsonOrDiagnose as mt, MCP_GROUPS as n, handleMcpPost as nt, personasFor as o, workerToolsEnabled as ot, injectStopHookIntoSettingsFile as p, readResponseBodyCapped as pt, buildAdvisorStream as q, HTTPError as qt, assertMcpToolSurfaceConsistent as r, browserToolsEnabled as rt, buildArtifactOpenHookCommand as s, countTokens as st, GROUP_META as t, handleMcpDelete as tt, captureLaunchBaseline as u, createResponses as ut, fileFindingsStore as v, extractTarGzMember as vt, stopGateEnabledForRepo as w, DEFAULT_CLAUDE_MODEL_FALLBACKS as wt, isSubagentContext as x, ArtifactClient as xt, fileLastPromptStore as y, extractZipMember as yt, toolbeltEnabled as z, cacheVSCodeVersion as zt };
|
|
22744
|
+
//# sourceMappingURL=peer-mcp-personas-ClyKATAD.js.map
|