pushary 1.9.43 → 1.9.45
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/CHANGELOG.md +11 -0
- package/README.md +1 -0
- package/dist/bin/pushary-bell-hook.js +26 -26
- package/dist/bin/pushary-bell.js +11 -11
- package/dist/bin/pushary-claude.js +33 -33
- package/dist/bin/pushary-clean.js +38 -38
- package/dist/bin/pushary-codex-bridge.js +22 -680
- package/dist/bin/pushary-codex-hook.js +32 -32
- package/dist/bin/pushary-codex-session.d.ts +1 -0
- package/dist/bin/pushary-codex-session.js +649 -0
- package/dist/bin/pushary-codex.js +12 -12
- package/dist/bin/pushary-connect.js +27 -27
- package/dist/bin/pushary-cowork.js +6 -6
- package/dist/bin/pushary-daemon.js +55 -55
- package/dist/bin/pushary-disconnect.js +26 -26
- package/dist/bin/pushary-doctor.js +84 -82
- package/dist/bin/pushary-elicitation-hook.js +26 -26
- package/dist/bin/pushary-gemini-bridge.js +15 -15
- package/dist/bin/pushary-gemini-hook.js +29 -29
- package/dist/bin/pushary-hook.js +32 -32
- package/dist/bin/pushary-login.js +16 -16
- package/dist/bin/pushary-logout.js +27 -27
- package/dist/bin/pushary-mcp.js +9 -9
- package/dist/bin/pushary-mode.js +14 -14
- package/dist/bin/pushary-notification-hook.js +25 -25
- package/dist/bin/pushary-opencode-hook.js +28 -28
- package/dist/bin/pushary-permission-denied-hook.js +30 -30
- package/dist/bin/pushary-permission-hook.js +29 -29
- package/dist/bin/pushary-post-hook.js +25 -25
- package/dist/bin/pushary-prompt-hook.js +25 -25
- package/dist/bin/pushary-session-end-hook.js +25 -25
- package/dist/bin/pushary-session-start-hook.js +30 -30
- package/dist/bin/pushary-setup.js +164 -112
- package/dist/bin/pushary-stats.js +5 -5
- package/dist/bin/pushary-status.js +34 -34
- package/dist/bin/pushary-stop-hook.js +25 -25
- package/dist/bin/pushary-stopfailure-hook.js +25 -25
- package/dist/bin/pushary-suggestions.js +14 -14
- package/dist/bin/pushary-transcript-register.js +18 -18
- package/dist/bin/pushary-transcripts.js +7 -7
- package/dist/bin/pushary-upgrade.js +41 -41
- package/dist/bin/pushary-wait.js +14 -14
- package/dist/bin/pushary.js +7 -6
- package/dist/{chunk-HC4DQXAT.js → chunk-2DORVRDB.js} +2 -2
- package/dist/{chunk-C6QBNBL4.js → chunk-2FUHSKXH.js} +7 -7
- package/dist/{chunk-45W43U2Q.js → chunk-2SXXH6JY.js} +5 -5
- package/dist/{chunk-JE6GG3OV.js → chunk-335ZDJ7R.js} +1 -1
- package/dist/{chunk-S4QT3YFG.js → chunk-3PM62C2R.js} +15 -15
- package/dist/{chunk-Y3N3SYBX.js → chunk-46F4BRUQ.js} +1 -1
- package/dist/{chunk-W3BO56VE.js → chunk-4A6VUVXV.js} +1 -1
- package/dist/{chunk-LDCRV6HG.js → chunk-57M4ERJK.js} +2 -1
- package/dist/{chunk-IMD5FN6Y.js → chunk-5DCZL3BC.js} +3 -3
- package/dist/chunk-6JPDAUFP.js +866 -0
- package/dist/{chunk-H6V5S52A.js → chunk-6TYKZ4DN.js} +3 -3
- package/dist/{chunk-VQL62ECJ.js → chunk-7SGYCU5C.js} +1 -1
- package/dist/{chunk-SATOTPXW.js → chunk-7URSJMAB.js} +1 -1
- package/dist/{chunk-PIZ65U3D.js → chunk-ASK2MSD2.js} +5 -5
- package/dist/{chunk-SCYAXV7U.js → chunk-AUOSFZJ3.js} +7 -7
- package/dist/{chunk-LOUZNXTJ.js → chunk-BT57FUMT.js} +2 -2
- package/dist/{chunk-4T2TGP4T.js → chunk-CDERSTBO.js} +94 -7
- package/dist/{chunk-LAAOHBLO.js → chunk-CFMCV6Z7.js} +2 -2
- package/dist/{chunk-ENGASUEL.js → chunk-DSGB5JLG.js} +4 -4
- package/dist/{chunk-ZJXEQV3A.js → chunk-ECFEYB6Z.js} +1 -1
- package/dist/{chunk-CIERFMQT.js → chunk-EH5ZDG6V.js} +4 -4
- package/dist/{chunk-IDVKJICN.js → chunk-EKGQEDQ4.js} +3 -11
- package/dist/{chunk-GTOBOC6M.js → chunk-EWC4P4ZL.js} +1 -1
- package/dist/{chunk-F7SZ2RCK.js → chunk-FOUK4CBO.js} +4 -4
- package/dist/{chunk-LE2YVPAT.js → chunk-GQ5KCVGK.js} +11 -11
- package/dist/{chunk-YRE6GUFZ.js → chunk-GZSSAY6N.js} +75 -161
- package/dist/{chunk-LWW7SBK3.js → chunk-H4ODQD3Y.js} +2 -2
- package/dist/{chunk-O7ADPLBF.js → chunk-HHX6IRSH.js} +1 -1
- package/dist/{chunk-H64CU2VB.js → chunk-IFT3GU7Y.js} +2 -2
- package/dist/{chunk-FPJHS6PA.js → chunk-IKYI63RF.js} +6 -6
- package/dist/{chunk-S3OWTQ6Z.js → chunk-IOVJVGIT.js} +12 -5
- package/dist/{chunk-RXXKFM22.js → chunk-K7EGWMDU.js} +370 -138
- package/dist/{chunk-AVT7GPOF.js → chunk-KS7NA5CK.js} +10 -10
- package/dist/{chunk-A64UCGX3.js → chunk-N2K3BSCA.js} +5 -5
- package/dist/{chunk-ZORCUL3Z.js → chunk-NJN5NRHZ.js} +4 -4
- package/dist/{chunk-Q7CUTGT4.js → chunk-OHFC3GJY.js} +1 -1
- package/dist/{chunk-JW4S4O4W.js → chunk-P2F3JUFX.js} +4 -4
- package/dist/{chunk-C54VJJ37.js → chunk-PWUIPQ2I.js} +3 -3
- package/dist/{chunk-F5ALKPNS.js → chunk-QQXP3CQA.js} +1 -1
- package/dist/{chunk-EA5NWDK7.js → chunk-R7ZQHAVL.js} +29 -0
- package/dist/{chunk-V5SUKRRI.js → chunk-RBJWPUI6.js} +4 -4
- package/dist/{chunk-J6MVBWF2.js → chunk-RFQWB5ZV.js} +1 -1
- package/dist/{chunk-NKBAEGT7.js → chunk-S6EGJBI5.js} +1 -1
- package/dist/{chunk-53KLSE2F.js → chunk-SFQSOBLM.js} +3 -3
- package/dist/{chunk-MSUMSXTI.js → chunk-SIN7NJD7.js} +1 -1
- package/dist/{chunk-55FB6OSG.js → chunk-U45OINYS.js} +1 -1
- package/dist/{chunk-TH74SUVV.js → chunk-U6Z56IQS.js} +2 -2
- package/dist/{chunk-JJWG7CBT.js → chunk-VO6XI6AX.js} +3 -3
- package/dist/{chunk-VIVLJK3T.js → chunk-WDIX4XZH.js} +2 -2
- package/dist/{chunk-Y4VZYKSW.js → chunk-WM76AN4X.js} +11 -11
- package/dist/{chunk-NV2LARV4.js → chunk-WPPKXVV3.js} +2 -2
- package/dist/{chunk-VGPEXMYM.js → chunk-XFHISCJM.js} +42 -7
- package/dist/{chunk-C3RVRTHS.js → chunk-YK7FGPYS.js} +3 -3
- package/dist/{chunk-JB4JCGRW.js → chunk-YWIFK2UB.js} +2 -2
- package/dist/{chunk-O4SYJVAF.js → chunk-YXGWG5PO.js} +5 -5
- package/dist/{chunk-XLHFWG2E.js → chunk-ZSY6BWUD.js} +2 -2
- package/dist/{global-upgrade-FFWOHOJ4.js → global-upgrade-U6NWZA5W.js} +6 -6
- package/dist/{paths-Y2WPCM5Y.js → paths-IQTB3ZZI.js} +2 -2
- package/dist/{reapply-N3MV3CKD.js → reapply-LILGWJO3.js} +21 -21
- package/dist/src/index.js +19 -19
- package/dist/{upgrade-lock-ZXXNRH2P.js → upgrade-lock-2BVFIDU4.js} +3 -3
- package/package.json +5 -2
|
@@ -1,16 +1,16 @@
|
|
|
1
1
|
import {
|
|
2
2
|
readExistingMachineId
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-4A6VUVXV.js";
|
|
4
4
|
import {
|
|
5
5
|
NetworkError
|
|
6
6
|
} from "./chunk-7QLSKOSU.js";
|
|
7
7
|
import {
|
|
8
8
|
getBaseUrl
|
|
9
|
-
} from "./chunk-
|
|
9
|
+
} from "./chunk-EWC4P4ZL.js";
|
|
10
10
|
import {
|
|
11
11
|
clientContextHeaders,
|
|
12
12
|
getPackageVersion
|
|
13
|
-
} from "./chunk-
|
|
13
|
+
} from "./chunk-K7EGWMDU.js";
|
|
14
14
|
|
|
15
15
|
// src/cli/net.ts
|
|
16
16
|
import { createRequire } from "module";
|
|
@@ -2,23 +2,23 @@ import {
|
|
|
2
2
|
CLAUDE_HOOK_EVENTS,
|
|
3
3
|
GEMINI_HOOK_EVENTS,
|
|
4
4
|
hasGeminiHooks
|
|
5
|
-
} from "./chunk-
|
|
5
|
+
} from "./chunk-5DCZL3BC.js";
|
|
6
6
|
import {
|
|
7
7
|
AGENT_CHOICES
|
|
8
|
-
} from "./chunk-
|
|
8
|
+
} from "./chunk-OHFC3GJY.js";
|
|
9
9
|
import {
|
|
10
10
|
BELL_HOOK_BINARY
|
|
11
|
-
} from "./chunk-
|
|
11
|
+
} from "./chunk-U45OINYS.js";
|
|
12
12
|
import {
|
|
13
13
|
CODEX_HOOK_EVENTS,
|
|
14
14
|
hasCodexHooks,
|
|
15
15
|
holdBudgetOf
|
|
16
|
-
} from "./chunk-
|
|
16
|
+
} from "./chunk-IOVJVGIT.js";
|
|
17
17
|
import {
|
|
18
18
|
CURSOR_GATE_EVENTS,
|
|
19
19
|
HOOK_LOCATOR_BINARY,
|
|
20
20
|
hookCommandHoldBudget
|
|
21
|
-
} from "./chunk-
|
|
21
|
+
} from "./chunk-K7EGWMDU.js";
|
|
22
22
|
|
|
23
23
|
// src/diagnostics/bridge.ts
|
|
24
24
|
import { execFileSync } from "child_process";
|
|
@@ -1,17 +1,17 @@
|
|
|
1
|
+
import {
|
|
2
|
+
readControlMode
|
|
3
|
+
} from "./chunk-YK7FGPYS.js";
|
|
1
4
|
import {
|
|
2
5
|
needsShell,
|
|
3
6
|
spawnClaude
|
|
4
7
|
} from "./chunk-XHKBHWLX.js";
|
|
5
|
-
import {
|
|
6
|
-
readControlMode
|
|
7
|
-
} from "./chunk-C3RVRTHS.js";
|
|
8
8
|
import {
|
|
9
9
|
getMachineId
|
|
10
|
-
} from "./chunk-
|
|
10
|
+
} from "./chunk-4A6VUVXV.js";
|
|
11
11
|
import {
|
|
12
12
|
pusharyDir,
|
|
13
13
|
resolveGlobalBinary
|
|
14
|
-
} from "./chunk-
|
|
14
|
+
} from "./chunk-IOVJVGIT.js";
|
|
15
15
|
import {
|
|
16
16
|
readJsonSafe,
|
|
17
17
|
writeFileAtomic,
|
|
@@ -20,7 +20,7 @@ import {
|
|
|
20
20
|
} from "./chunk-AQFEP65J.js";
|
|
21
21
|
import {
|
|
22
22
|
getApiKey
|
|
23
|
-
} from "./chunk-
|
|
23
|
+
} from "./chunk-EWC4P4ZL.js";
|
|
24
24
|
import {
|
|
25
25
|
CLI_PACKAGE_NAMES,
|
|
26
26
|
cmdShimTarget,
|
|
@@ -28,7 +28,7 @@ import {
|
|
|
28
28
|
globalPackageFolder,
|
|
29
29
|
globalRootFor,
|
|
30
30
|
isRecord
|
|
31
|
-
} from "./chunk-
|
|
31
|
+
} from "./chunk-K7EGWMDU.js";
|
|
32
32
|
|
|
33
33
|
// src/daemon-lifecycle.ts
|
|
34
34
|
import { dirname, join, win32 as win32Path } from "path";
|
|
@@ -5,26 +5,28 @@ import {
|
|
|
5
5
|
import {
|
|
6
6
|
SubscriptionRequiredError,
|
|
7
7
|
callMcpTool
|
|
8
|
-
} from "./chunk-
|
|
8
|
+
} from "./chunk-SFQSOBLM.js";
|
|
9
9
|
import {
|
|
10
10
|
installNetworkDefaults,
|
|
11
11
|
isNetworkFailure
|
|
12
|
-
} from "./chunk-
|
|
12
|
+
} from "./chunk-6TYKZ4DN.js";
|
|
13
13
|
import {
|
|
14
14
|
clientReportClaims
|
|
15
|
-
} from "./chunk-
|
|
15
|
+
} from "./chunk-IOVJVGIT.js";
|
|
16
16
|
import {
|
|
17
17
|
getApiKey,
|
|
18
18
|
getBaseUrl
|
|
19
|
-
} from "./chunk-
|
|
19
|
+
} from "./chunk-EWC4P4ZL.js";
|
|
20
20
|
import {
|
|
21
21
|
ASK_AGENT_NAME_MAX,
|
|
22
22
|
CLIENT_REPORT_PATH,
|
|
23
23
|
DECISION_LINE_MAX,
|
|
24
24
|
GATE_PERMISSION_MODE_MAX_LENGTH,
|
|
25
25
|
degradedLine,
|
|
26
|
+
localRepoKey,
|
|
27
|
+
normalizeRepoRemote,
|
|
26
28
|
truncateLine
|
|
27
|
-
} from "./chunk-
|
|
29
|
+
} from "./chunk-K7EGWMDU.js";
|
|
28
30
|
|
|
29
31
|
// src/client-report-claim.ts
|
|
30
32
|
import { createHash } from "crypto";
|
|
@@ -222,7 +224,7 @@ var nextLongPollMs = (deadlineMs, nowMs) => {
|
|
|
222
224
|
return hold >= MIN_LONG_POLL_MS ? hold : null;
|
|
223
225
|
};
|
|
224
226
|
var pollForAnswer = async (apiKey, correlationId, deadlineMs, pollInterval = 2e3) => {
|
|
225
|
-
const sleep = (ms) => new Promise((
|
|
227
|
+
const sleep = (ms) => new Promise((resolve2) => setTimeout(resolve2, ms));
|
|
226
228
|
while (Date.now() < deadlineMs) {
|
|
227
229
|
const hold = nextLongPollMs(deadlineMs, Date.now());
|
|
228
230
|
if (hold === null) {
|
|
@@ -296,6 +298,90 @@ var claimBlockedAction = async (apiKey, request, timeoutMs) => {
|
|
|
296
298
|
}
|
|
297
299
|
};
|
|
298
300
|
|
|
301
|
+
// src/repo.ts
|
|
302
|
+
import { existsSync, readFileSync, statSync } from "fs";
|
|
303
|
+
import { basename, dirname, isAbsolute, join as join2, resolve } from "path";
|
|
304
|
+
var MAX_PARENT_WALK = 64;
|
|
305
|
+
var GIT_FILE_PREFIX = "gitdir:";
|
|
306
|
+
var findGitDir = (startDir) => {
|
|
307
|
+
let current = resolve(startDir);
|
|
308
|
+
for (let depth = 0; depth < MAX_PARENT_WALK; depth += 1) {
|
|
309
|
+
const candidate = join2(current, ".git");
|
|
310
|
+
try {
|
|
311
|
+
if (existsSync(candidate)) {
|
|
312
|
+
if (statSync(candidate).isDirectory()) return candidate;
|
|
313
|
+
const pointer = readFileSync(candidate, "utf-8").trim();
|
|
314
|
+
if (pointer.startsWith(GIT_FILE_PREFIX)) {
|
|
315
|
+
const target = pointer.slice(GIT_FILE_PREFIX.length).trim();
|
|
316
|
+
return isAbsolute(target) ? target : resolve(current, target);
|
|
317
|
+
}
|
|
318
|
+
}
|
|
319
|
+
} catch {
|
|
320
|
+
}
|
|
321
|
+
const parent = dirname(current);
|
|
322
|
+
if (parent === current) return void 0;
|
|
323
|
+
current = parent;
|
|
324
|
+
}
|
|
325
|
+
return void 0;
|
|
326
|
+
};
|
|
327
|
+
var configPathFor = (gitDir) => {
|
|
328
|
+
const index = gitDir.replace(/\\/g, "/").indexOf("/worktrees/");
|
|
329
|
+
return index === -1 ? join2(gitDir, "config") : join2(gitDir.slice(0, index), "config");
|
|
330
|
+
};
|
|
331
|
+
var ORIGIN_SECTION = /^\[remote "origin"\]/;
|
|
332
|
+
var SECTION_HEADER = /^\[/;
|
|
333
|
+
var URL_LINE = /^url\s*=\s*(.+)$/;
|
|
334
|
+
var readOriginRemote = (gitDir) => {
|
|
335
|
+
try {
|
|
336
|
+
const configPath = configPathFor(gitDir);
|
|
337
|
+
if (!existsSync(configPath)) return void 0;
|
|
338
|
+
let inOrigin = false;
|
|
339
|
+
for (const rawLine of readFileSync(configPath, "utf-8").split("\n")) {
|
|
340
|
+
const line = rawLine.trim();
|
|
341
|
+
if (SECTION_HEADER.test(line)) {
|
|
342
|
+
inOrigin = ORIGIN_SECTION.test(line);
|
|
343
|
+
continue;
|
|
344
|
+
}
|
|
345
|
+
if (!inOrigin) continue;
|
|
346
|
+
const url = URL_LINE.exec(line);
|
|
347
|
+
if (url) return url[1]?.trim();
|
|
348
|
+
}
|
|
349
|
+
} catch {
|
|
350
|
+
}
|
|
351
|
+
return void 0;
|
|
352
|
+
};
|
|
353
|
+
var deriveRepoKey = (cwd) => {
|
|
354
|
+
const dir = cwd && cwd.length > 0 ? cwd : process.cwd();
|
|
355
|
+
try {
|
|
356
|
+
const gitDir = findGitDir(dir);
|
|
357
|
+
if (gitDir) {
|
|
358
|
+
const remote = readOriginRemote(gitDir);
|
|
359
|
+
const normalized = remote ? normalizeRepoRemote(remote) : void 0;
|
|
360
|
+
if (normalized) return normalized;
|
|
361
|
+
const root = gitDir.endsWith(".git") ? dirname(gitDir) : dir;
|
|
362
|
+
return localRepoKey(basename(root));
|
|
363
|
+
}
|
|
364
|
+
return localRepoKey(basename(resolve(dir)));
|
|
365
|
+
} catch {
|
|
366
|
+
return void 0;
|
|
367
|
+
}
|
|
368
|
+
};
|
|
369
|
+
var repoKeyCache = /* @__PURE__ */ new Map();
|
|
370
|
+
var REPO_KEY_ENV = "PUSHARY_REPO_KEY";
|
|
371
|
+
var repoKeyFor = (cwd) => {
|
|
372
|
+
const override = process.env[REPO_KEY_ENV];
|
|
373
|
+
if (typeof override === "string") {
|
|
374
|
+
const trimmed = override.trim();
|
|
375
|
+
if (trimmed.toLowerCase() === "off") return void 0;
|
|
376
|
+
if (trimmed.length > 0) return trimmed.toLowerCase();
|
|
377
|
+
}
|
|
378
|
+
const dir = cwd && cwd.length > 0 ? cwd : process.cwd();
|
|
379
|
+
if (repoKeyCache.has(dir)) return repoKeyCache.get(dir);
|
|
380
|
+
const derived = deriveRepoKey(dir);
|
|
381
|
+
repoKeyCache.set(dir, derived);
|
|
382
|
+
return derived;
|
|
383
|
+
};
|
|
384
|
+
|
|
299
385
|
export {
|
|
300
386
|
reportClientError,
|
|
301
387
|
exitAfterClientReports,
|
|
@@ -318,5 +404,6 @@ export {
|
|
|
318
404
|
waitForQuestion,
|
|
319
405
|
sendNotification,
|
|
320
406
|
requestGate,
|
|
321
|
-
claimBlockedAction
|
|
407
|
+
claimBlockedAction,
|
|
408
|
+
repoKeyFor
|
|
322
409
|
};
|
|
@@ -1,17 +1,17 @@
|
|
|
1
1
|
import {
|
|
2
2
|
compatibleConfigFile,
|
|
3
3
|
hasCompatibleHooks
|
|
4
|
-
} from "./chunk-
|
|
4
|
+
} from "./chunk-RBJWPUI6.js";
|
|
5
5
|
import {
|
|
6
6
|
pusharyHookExecutable
|
|
7
|
-
} from "./chunk-
|
|
7
|
+
} from "./chunk-ASK2MSD2.js";
|
|
8
8
|
import {
|
|
9
9
|
isProtectedByScope,
|
|
10
10
|
registerHookEntry
|
|
11
|
-
} from "./chunk-
|
|
11
|
+
} from "./chunk-IOVJVGIT.js";
|
|
12
12
|
import {
|
|
13
13
|
isRecord
|
|
14
|
-
} from "./chunk-
|
|
14
|
+
} from "./chunk-K7EGWMDU.js";
|
|
15
15
|
|
|
16
16
|
// src/cursor-config.ts
|
|
17
17
|
var hookCommandOf = (entry) => {
|
|
@@ -1,18 +1,18 @@
|
|
|
1
1
|
import {
|
|
2
2
|
registerTranscript
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-3PM62C2R.js";
|
|
4
4
|
import {
|
|
5
5
|
namedEvent
|
|
6
|
-
} from "./chunk-
|
|
6
|
+
} from "./chunk-RBJWPUI6.js";
|
|
7
7
|
import {
|
|
8
8
|
writeDegraded
|
|
9
|
-
} from "./chunk-
|
|
9
|
+
} from "./chunk-CDERSTBO.js";
|
|
10
10
|
import {
|
|
11
11
|
claudeShapedHookInput,
|
|
12
12
|
hookCompatibleProfileBySource,
|
|
13
13
|
isGrokHookPayload,
|
|
14
14
|
isGrokSessionEndStop
|
|
15
|
-
} from "./chunk-
|
|
15
|
+
} from "./chunk-K7EGWMDU.js";
|
|
16
16
|
|
|
17
17
|
// src/tool-hook-input.ts
|
|
18
18
|
var OPTIONAL_TEXT_FIELDS = ["hook_event_name", "session_id", "cwd", "transcript_path", "tool_use_id", "permission_mode"];
|
|
@@ -3,11 +3,11 @@ import {
|
|
|
3
3
|
decodePublicKey,
|
|
4
4
|
generateSessionKey,
|
|
5
5
|
wrapSessionKey
|
|
6
|
-
} from "./chunk-
|
|
6
|
+
} from "./chunk-SIN7NJD7.js";
|
|
7
7
|
import {
|
|
8
8
|
fetchTranscriptRecipients,
|
|
9
9
|
uploadTranscriptRecords
|
|
10
|
-
} from "./chunk-
|
|
10
|
+
} from "./chunk-RFQWB5ZV.js";
|
|
11
11
|
|
|
12
12
|
// src/live-session.ts
|
|
13
13
|
var MAX_TRANSCRIPT_QUEUE = 100;
|
|
@@ -24,19 +24,11 @@ var liveSessionSleep = (ms, signal) => new Promise((resolve) => {
|
|
|
24
24
|
signal.addEventListener("abort", done, { once: true });
|
|
25
25
|
});
|
|
26
26
|
var postLiveSession = (options, path, body) => {
|
|
27
|
-
const controller = new AbortController();
|
|
28
|
-
const abort = () => controller.abort();
|
|
29
|
-
const timeout = setTimeout(abort, options.requestTimeoutMs ?? 1e4);
|
|
30
|
-
if (options.signal.aborted) abort();
|
|
31
|
-
else options.signal.addEventListener("abort", abort, { once: true });
|
|
32
27
|
return fetch(`${options.baseUrl}${path}`, {
|
|
33
28
|
method: "POST",
|
|
34
29
|
headers: { Authorization: `Bearer ${options.apiKey}`, "Content-Type": "application/json" },
|
|
35
30
|
body: JSON.stringify(body),
|
|
36
|
-
signal:
|
|
37
|
-
}).finally(() => {
|
|
38
|
-
clearTimeout(timeout);
|
|
39
|
-
options.signal.removeEventListener("abort", abort);
|
|
31
|
+
signal: AbortSignal.any([options.signal, AbortSignal.timeout(options.requestTimeoutMs ?? 1e4)])
|
|
40
32
|
});
|
|
41
33
|
};
|
|
42
34
|
var postLiveSessionUntilAccepted = async (options, path, body) => {
|
|
@@ -1,18 +1,18 @@
|
|
|
1
1
|
import {
|
|
2
2
|
macAppBridgeAvailable
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-YXGWG5PO.js";
|
|
4
4
|
import {
|
|
5
5
|
keyPrefix
|
|
6
|
-
} from "./chunk-
|
|
6
|
+
} from "./chunk-YK7FGPYS.js";
|
|
7
7
|
import {
|
|
8
8
|
bridgeAgentKey
|
|
9
|
-
} from "./chunk-
|
|
9
|
+
} from "./chunk-IOVJVGIT.js";
|
|
10
10
|
import {
|
|
11
11
|
readJsonSafe
|
|
12
12
|
} from "./chunk-AQFEP65J.js";
|
|
13
13
|
import {
|
|
14
14
|
isValidApiKey
|
|
15
|
-
} from "./chunk-
|
|
15
|
+
} from "./chunk-K7EGWMDU.js";
|
|
16
16
|
|
|
17
17
|
// src/shared-mcp-key.ts
|
|
18
18
|
var asRecord = (value) => value !== null && typeof value === "object" && !Array.isArray(value) ? value : void 0;
|
|
@@ -1,29 +1,29 @@
|
|
|
1
|
-
import {
|
|
2
|
-
detectProviderLiveCapabilities,
|
|
3
|
-
expectedLaunchCapabilities,
|
|
4
|
-
hasSpawnProvider,
|
|
5
|
-
resolveControlPolicy
|
|
6
|
-
} from "./chunk-NV2LARV4.js";
|
|
7
1
|
import {
|
|
8
2
|
daemonHasRemoteProof,
|
|
9
3
|
daemonServiceManagerAvailable,
|
|
10
4
|
hasDaemonServiceDefinition,
|
|
11
5
|
readDaemonNeedsLogin,
|
|
12
6
|
readDaemonStatus
|
|
13
|
-
} from "./chunk-
|
|
7
|
+
} from "./chunk-AUOSFZJ3.js";
|
|
14
8
|
import {
|
|
15
9
|
readControlMode,
|
|
16
10
|
readKeySource
|
|
17
|
-
} from "./chunk-
|
|
11
|
+
} from "./chunk-YK7FGPYS.js";
|
|
12
|
+
import {
|
|
13
|
+
detectProviderLiveCapabilities,
|
|
14
|
+
expectedLaunchCapabilities,
|
|
15
|
+
hasSpawnProvider,
|
|
16
|
+
resolveControlPolicy
|
|
17
|
+
} from "./chunk-WPPKXVV3.js";
|
|
18
18
|
import {
|
|
19
19
|
getMachineId
|
|
20
|
-
} from "./chunk-
|
|
20
|
+
} from "./chunk-4A6VUVXV.js";
|
|
21
21
|
import {
|
|
22
22
|
getBaseUrl
|
|
23
|
-
} from "./chunk-
|
|
23
|
+
} from "./chunk-EWC4P4ZL.js";
|
|
24
24
|
import {
|
|
25
25
|
getPackageVersion
|
|
26
|
-
} from "./chunk-
|
|
26
|
+
} from "./chunk-K7EGWMDU.js";
|
|
27
27
|
|
|
28
28
|
// src/machines.ts
|
|
29
29
|
import { hostname } from "os";
|