agent-yes 1.290.7 → 1.291.0
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/SUPPORTED_CLIS-BZP767UR.js +12 -0
- package/dist/{SUPPORTED_CLIS-hTRegnm5.js → SUPPORTED_CLIS-TiOdGi1h.js} +2 -2
- package/dist/{agentShare-C_LTEKEb.js → agentShare-D4N8StHO.js} +8 -8
- package/dist/{askCli-DR9vhdcV.js → askCli-DFsWcgpF.js} +3 -3
- package/dist/{browser-oqC3Ln2a.js → browser-wkzxw6lx.js} +3 -2
- package/dist/{callback-DAQ8wCtJ.js → callback-Bc2gnr_f.js} +3 -3
- package/dist/{callback-BEvLUUBR.js → callback-yCpK6Qpg.js} +7 -7
- package/dist/{channels-hOG3-R_3.js → channels-aYwLMbFV.js} +2 -2
- package/dist/cli.js +9 -9
- package/dist/{cmdPs-BAaLB4Pz.js → cmdPs-D5L3Eyh5.js} +7 -7
- package/dist/{cwdConflictWarn-BgXN56Jc.js → cwdConflictWarn-sQUONAye.js} +2 -2
- package/dist/{forkNested-CJ7lQQCe.js → forkNested-xtEeYpBQ.js} +3 -3
- package/dist/{globalPidIndex-DoaKEUkO.js → globalPidIndex-CRH9L9tn.js} +139 -12
- package/dist/globalPidIndex-DC93JhHQ.js +4 -0
- package/dist/index.js +5 -5
- package/dist/{messageLog-CVRSTLza.js → messageLog-Brx3w6zT.js} +2 -1
- package/dist/{notifyDaemon-Dnbe66Fl.js → notifyDaemon-CvUtRnAB.js} +7 -7
- package/dist/{parentLink-fdiuB13i.js → parentLink-BILJ32nA.js} +2 -2
- package/dist/{parentLink-bpDGuQi6.js → parentLink-CfbxykCv.js} +2 -2
- package/dist/{parentPingLoop-DWv-xJoi.js → parentPingLoop-CVOCiQp2.js} +4 -4
- package/dist/pidStore-Bpe8i_oU.js +6 -0
- package/dist/{pidStore-B73xnAeT.js → pidStore-DXWqzTSz.js} +2 -2
- package/dist/{remotes-DTXPW8U1.js → remotes-tmKwrr20.js} +3 -3
- package/dist/{remotes-C696AJzL.js → remotes-wPL0JtBs.js} +2 -2
- package/dist/{rustBinary-CZRPfa4y.js → rustBinary-C_EbyMTk.js} +2 -2
- package/dist/{rustBinary-jO6EN8LR.js → rustBinary-Clbk_K5c.js} +2 -2
- package/dist/{schedule-Hao0WqyJ.js → schedule-Ba_4wNVK.js} +7 -7
- package/dist/{serve-B2nisui8.js → serve-CJDQq_Jp.js} +46 -40
- package/dist/{setup-vCDTqyqR.js → setup-DwLAkbTC.js} +2 -2
- package/dist/share-Bmnd_qT0.js +4 -0
- package/dist/{share-DTlaFn6s.js → share-C9oGvjXT.js} +13 -4
- package/dist/spawnGate-BUEswFgo.js +5 -0
- package/dist/{spawnGate-B26UnzqP.js → spawnGate-YpHopveO.js} +2 -2
- package/dist/{subcommands-BpFdlCY0.js → subcommands-x8Pe7DrF.js} +6 -6
- package/dist/{subcommands-D6LBtVPM.js → subcommands-yWgVRM2r.js} +273 -45
- package/dist/{terminal-iGHEnc7Z.js → terminal-Dv73BTE-.js} +2 -2
- package/dist/terminal.js +1 -1
- package/dist/{todoCli-azqbjBtz.js → todoCli-DSQXAcwA.js} +3 -3
- package/dist/{todoIdentity-NEceTmEe.js → todoIdentity-CAmnkzzP.js} +2 -2
- package/dist/{trayApp-BdNlQCFx.js → trayApp-BRw8f0mT.js} +2 -2
- package/dist/trayApp-BjQ5V3WV.js +5 -0
- package/dist/{ts-oyuaLWWx.js → ts-C8PxhJZM.js} +7 -7
- package/dist/{versionChecker-CMjS88mL.js → versionChecker-CWPGASjD.js} +2 -2
- package/dist/webrtcLink-CnQf9pmu.js +73 -0
- package/dist/{webrtcRemote-L5NxhLLR.js → webrtcRemote-yvMYsij3.js} +2 -2
- package/dist/{widget-OvkqW2Z6.js → widget-DhBSNUey.js} +3 -3
- package/dist/widgets.js +1 -1
- package/dist/{ws-BeMouYAU.js → ws-CMX0pkti.js} +2 -2
- package/dist/{ws-qZy7Giub.js → ws-DZ9YAXlY.js} +7 -7
- package/lab/ui/console-logic.js +27 -4
- package/package.json +1 -1
- package/ts/crossTreeClaim.bun.spec.ts +76 -0
- package/ts/crossTreeClaim.spec.ts +76 -0
- package/ts/globalPidIndex.spec.ts +153 -0
- package/ts/globalPidIndex.ts +151 -10
- package/ts/messageLog.bun.spec.ts +33 -0
- package/ts/messageLog.spec.ts +33 -0
- package/ts/messageLog.ts +3 -0
- package/ts/rawInputDeclared.bun.spec.ts +68 -0
- package/ts/rawInputDeclared.spec.ts +68 -0
- package/ts/remoteHealth.bun.spec.ts +130 -0
- package/ts/remoteHealth.spec.ts +130 -0
- package/ts/remoteHealth.ts +149 -0
- package/ts/restartKillGuard.bun.spec.ts +40 -0
- package/ts/restartKillGuard.spec.ts +40 -0
- package/ts/senderAncestry.ts +45 -7
- package/ts/serve.ts +46 -20
- package/ts/share.bun.spec.ts +24 -2
- package/ts/share.spec.ts +24 -2
- package/ts/share.ts +37 -5
- package/ts/subcommands.ts +239 -19
- package/ts/terminal/browser.ts +5 -1
- package/ts/webrtcLink.bun.spec.ts +45 -1
- package/ts/webrtcLink.spec.ts +45 -1
- package/ts/webrtcLink.ts +63 -19
- package/dist/SUPPORTED_CLIS-CuvT3tKq.js +0 -12
- package/dist/globalPidIndex-yvWZXeWT.js +0 -4
- package/dist/pidStore-V51mbgZY.js +0 -6
- package/dist/share-BvU4I8BI.js +0 -4
- package/dist/spawnGate-C8MSRt7X.js +0 -5
- package/dist/trayApp-Br2T2Yrb.js +0 -5
- package/dist/webrtcLink-DLaJfTcB.js +0 -45
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import "./versionChecker-
|
|
2
|
-
import { a as gcOldBinaryDirs, c as getDownloadUrl, i as findTrayLauncher, l as getRustBinary, n as findRustBinary, o as getBinDir, r as findSpawnHiddenLauncher, s as getBinaryName, t as downloadBinary } from "./rustBinary-
|
|
1
|
+
import "./versionChecker-CWPGASjD.js";
|
|
2
|
+
import { a as gcOldBinaryDirs, c as getDownloadUrl, i as findTrayLauncher, l as getRustBinary, n as findRustBinary, o as getBinDir, r as findSpawnHiddenLauncher, s as getBinaryName, t as downloadBinary } from "./rustBinary-Clbk_K5c.js";
|
|
3
3
|
|
|
4
4
|
export { gcOldBinaryDirs };
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { i as getInstalledPackage, n as compareVersions } from "./versionChecker-
|
|
1
|
+
import { i as getInstalledPackage, n as compareVersions } from "./versionChecker-CWPGASjD.js";
|
|
2
2
|
import { execFileSync } from "child_process";
|
|
3
3
|
import { existsSync, mkdirSync, readdirSync, rmSync, statSync, unlinkSync } from "fs";
|
|
4
4
|
import { chmod, copyFile } from "fs/promises";
|
|
@@ -310,4 +310,4 @@ async function getRustBinary(options = {}) {
|
|
|
310
310
|
|
|
311
311
|
//#endregion
|
|
312
312
|
export { gcOldBinaryDirs as a, getDownloadUrl as c, findTrayLauncher as i, getRustBinary as l, findRustBinary as n, getBinDir as o, findSpawnHiddenLauncher as r, getBinaryName as s, downloadBinary as t };
|
|
313
|
-
//# sourceMappingURL=rustBinary-
|
|
313
|
+
//# sourceMappingURL=rustBinary-Clbk_K5c.js.map
|
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
import "./logger-CDIsZ-Pp.js";
|
|
2
|
-
import "./versionChecker-
|
|
3
|
-
import "./ts-
|
|
2
|
+
import "./versionChecker-CWPGASjD.js";
|
|
3
|
+
import "./ts-C8PxhJZM.js";
|
|
4
4
|
import "./todoAutomation-CbVVS4re.js";
|
|
5
5
|
import "./JsonlStore-BqF7AQ6E.js";
|
|
6
|
-
import "./globalPidIndex-
|
|
7
|
-
import "./pidStore-
|
|
8
|
-
import "./messageLog-
|
|
6
|
+
import "./globalPidIndex-CRH9L9tn.js";
|
|
7
|
+
import "./pidStore-DXWqzTSz.js";
|
|
8
|
+
import "./messageLog-Brx3w6zT.js";
|
|
9
9
|
import "./todoStore-DF6vxHgV.js";
|
|
10
|
-
import { t as SUPPORTED_CLIS } from "./SUPPORTED_CLIS-
|
|
10
|
+
import { t as SUPPORTED_CLIS } from "./SUPPORTED_CLIS-TiOdGi1h.js";
|
|
11
11
|
import { f as resolveSpawnCwd } from "./workspaceConfig-DTvPtr5j.js";
|
|
12
12
|
import { n as liveEnv, t as ensureNodeRuntime } from "./nodeRuntime-CipjIwfO.js";
|
|
13
13
|
import { createHash } from "node:crypto";
|
|
@@ -154,4 +154,4 @@ async function cmdSchedule(rest) {
|
|
|
154
154
|
|
|
155
155
|
//#endregion
|
|
156
156
|
export { cmdSchedule };
|
|
157
|
-
//# sourceMappingURL=schedule-
|
|
157
|
+
//# sourceMappingURL=schedule-Ba_4wNVK.js.map
|
|
@@ -1,30 +1,30 @@
|
|
|
1
1
|
import "./logger-CDIsZ-Pp.js";
|
|
2
|
-
import { i as getInstalledPackage } from "./versionChecker-
|
|
3
|
-
import { r as findSpawnHiddenLauncher } from "./rustBinary-
|
|
4
|
-
import { c as permissionBadge, i as answerAsk, o as listAsks, u as CLAUDE_SESSION_PIN_ENV } from "./ts-
|
|
2
|
+
import { i as getInstalledPackage } from "./versionChecker-CWPGASjD.js";
|
|
3
|
+
import { r as findSpawnHiddenLauncher } from "./rustBinary-Clbk_K5c.js";
|
|
4
|
+
import { c as permissionBadge, i as answerAsk, o as listAsks, u as CLAUDE_SESSION_PIN_ENV } from "./ts-C8PxhJZM.js";
|
|
5
5
|
import { t as agentYesHome$1 } from "./agentYesHome-BNtn19J4.js";
|
|
6
6
|
import { u as removeControlCharacters } from "./todoAutomation-CbVVS4re.js";
|
|
7
7
|
import "./JsonlStore-BqF7AQ6E.js";
|
|
8
|
-
import {
|
|
9
|
-
import "./pidStore-
|
|
10
|
-
import { r as recordInbox, s as isTerminalReply } from "./messageLog-
|
|
8
|
+
import { s as updateGlobalPidStatus } from "./globalPidIndex-CRH9L9tn.js";
|
|
9
|
+
import "./pidStore-DXWqzTSz.js";
|
|
10
|
+
import { r as recordInbox, s as isTerminalReply } from "./messageLog-Brx3w6zT.js";
|
|
11
11
|
import { t as pgidForWrapper } from "./reaper-UimuuTfO.js";
|
|
12
12
|
import "./todoStore-DF6vxHgV.js";
|
|
13
13
|
import "./e2e-z1xpwSAg.js";
|
|
14
14
|
import "./configShared-DKTgiz7K.js";
|
|
15
|
-
import { t as SUPPORTED_CLIS } from "./SUPPORTED_CLIS-
|
|
16
|
-
import { B as readLogForRender, F as listRecords, G as renderLogTailLines, H as readPtysize, J as resolveOne, K as renderRawLog, M as isUserTyping, O as isSlashCommand, S as extractTaskCounts, U as recentMessageEdges, V as readNotes, W as recentReadEdges, ct as framePaste, et as snapshotStatus, g as deriveLiveStatus, lt as shouldFramePaste, ot as writeToIpc, p as controlCodeFromName, q as renderRawLogLines, st as withIpcLock, u as cliDefaults, ut as TYPING_BADGE, x as extractNeedsInput, y as extractBadges } from "./subcommands-
|
|
15
|
+
import { t as SUPPORTED_CLIS } from "./SUPPORTED_CLIS-TiOdGi1h.js";
|
|
16
|
+
import { B as readLogForRender, F as listRecords, G as renderLogTailLines, H as readPtysize, J as resolveOne, K as renderRawLog, M as isUserTyping, O as isSlashCommand, S as extractTaskCounts, U as recentMessageEdges, V as readNotes, W as recentReadEdges, ct as framePaste, et as snapshotStatus, g as deriveLiveStatus, lt as shouldFramePaste, ot as writeToIpc, p as controlCodeFromName, q as renderRawLogLines, st as withIpcLock, u as cliDefaults, ut as TYPING_BADGE, x as extractNeedsInput, y as extractBadges } from "./subcommands-yWgVRM2r.js";
|
|
17
17
|
import { c as isTransientLockMkdirError } from "./notifyStore-2SWKGwZI.js";
|
|
18
|
-
import "./webrtcLink-
|
|
19
|
-
import "./remotes-
|
|
18
|
+
import { i as toWebrtcUrl, n as isWebrtcSpec } from "./webrtcLink-CnQf9pmu.js";
|
|
19
|
+
import "./remotes-tmKwrr20.js";
|
|
20
20
|
import { i as frameVisitorMessage, s as verifyCapability, t as MAX_CALLBACK_MSG_BYTES } from "./callbackCore-Bl2gGcxg.js";
|
|
21
|
-
import { n as isCallbackRevoked, r as loadCallbackSecretReadOnly } from "./callback-
|
|
21
|
+
import { n as isCallbackRevoked, r as loadCallbackSecretReadOnly } from "./callback-Bc2gnr_f.js";
|
|
22
22
|
import { n as sampleTrees } from "./procStats-CyD8h5nx.js";
|
|
23
23
|
import { a as getProvisionRoot, d as isProvisionAllowed, f as resolveSpawnCwd, i as getProvisionHook, l as hasProvisionHook, o as getSpawnHook, t as allowsSkipPermissions, u as hasSpawnHook } from "./workspaceConfig-DTvPtr5j.js";
|
|
24
24
|
import { n as liveEnv, t as ensureNodeRuntime } from "./nodeRuntime-CipjIwfO.js";
|
|
25
|
-
import { i as importProvisionModule } from "./ws-
|
|
26
|
-
import { r as spawnRejectionReason } from "./spawnGate-
|
|
27
|
-
import { i as launchTray } from "./trayApp-
|
|
25
|
+
import { i as importProvisionModule } from "./ws-CMX0pkti.js";
|
|
26
|
+
import { r as spawnRejectionReason } from "./spawnGate-YpHopveO.js";
|
|
27
|
+
import { i as launchTray } from "./trayApp-BRw8f0mT.js";
|
|
28
28
|
import yargs from "yargs";
|
|
29
29
|
import { appendFile, mkdir, open, readFile, readdir, rename, rm, stat, unlink, writeFile } from "fs/promises";
|
|
30
30
|
import { arch, cpus, freemem, homedir, hostname, loadavg, platform, totalmem, uptime, userInfo } from "os";
|
|
@@ -1272,11 +1272,8 @@ function explicitWebrtcUrl(args) {
|
|
|
1272
1272
|
for (let i = 0; i < args.length; i++) {
|
|
1273
1273
|
const a = args[i];
|
|
1274
1274
|
for (const flag of ["--webrtc", "--share"]) {
|
|
1275
|
-
|
|
1276
|
-
if (
|
|
1277
|
-
const v = a.slice(flag.length + 1);
|
|
1278
|
-
if (v.startsWith("webrtc://")) return v;
|
|
1279
|
-
}
|
|
1275
|
+
const v = a === flag ? args[i + 1] : a.startsWith(`${flag}=`) ? a.slice(flag.length + 1) : "";
|
|
1276
|
+
if (v && isWebrtcSpec(v)) return toWebrtcUrl(v) ?? void 0;
|
|
1280
1277
|
}
|
|
1281
1278
|
}
|
|
1282
1279
|
}
|
|
@@ -1395,7 +1392,7 @@ async function cmdServeDaemon(sub, args) {
|
|
|
1395
1392
|
let shareLink = null;
|
|
1396
1393
|
let shareLinkMinted = false;
|
|
1397
1394
|
if (webrtcDaemon) try {
|
|
1398
|
-
const { loadOrCreateShareRoom, shareLinkFromRoomUrl } = await import("./share-
|
|
1395
|
+
const { loadOrCreateShareRoom, shareLinkFromRoomUrl } = await import("./share-Bmnd_qT0.js");
|
|
1399
1396
|
const explicit = explicitWebrtcUrl(effArgs);
|
|
1400
1397
|
shareLink = shareLinkFromRoomUrl(explicit ?? await loadOrCreateShareRoom());
|
|
1401
1398
|
shareLinkMinted = !explicit;
|
|
@@ -1587,7 +1584,8 @@ can list/tail/send agents.
|
|
|
1587
1584
|
Modes (default: --http):
|
|
1588
1585
|
--http HTTP API + web console on --port; no WebRTC
|
|
1589
1586
|
--webrtc [URL] Share over WebRTC (bare flag mints a room+link on
|
|
1590
|
-
agent-yes.com, or pass
|
|
1587
|
+
agent-yes.com, or pass a room link to join that room:
|
|
1588
|
+
https://agent-yes.com/room/#room=<id>&s=e1.<secret>).
|
|
1591
1589
|
Alone it needs NO port — combine with --http for both.
|
|
1592
1590
|
The minted room persists in ~/.agent-yes/.share-room
|
|
1593
1591
|
(stable link across restarts; delete the file to rotate).
|
|
@@ -1640,7 +1638,7 @@ Options:
|
|
|
1640
1638
|
description: "Serve the HTTP API + web console on --port (default mode)"
|
|
1641
1639
|
}).option("webrtc", {
|
|
1642
1640
|
type: "string",
|
|
1643
|
-
description: "Share over WebRTC: bare flag mints a room+link, or pass
|
|
1641
|
+
description: "Share over WebRTC: bare flag mints a room+link, or pass a https://…/room/#… link to join that room. Needs no port unless combined with --http"
|
|
1644
1642
|
}).option("share", {
|
|
1645
1643
|
type: "string",
|
|
1646
1644
|
description: "Legacy alias for --http --webrtc"
|
|
@@ -1665,6 +1663,15 @@ Options:
|
|
|
1665
1663
|
if (argv.daemon) return cmdServeDaemon("install", rest.filter((a) => a !== "--daemon" && a !== "-d"));
|
|
1666
1664
|
const wantWebrtc = argv.webrtc !== void 0 || argv.share !== void 0;
|
|
1667
1665
|
const wantHttp = argv.http === true || argv.share !== void 0 || argv.webrtc === void 0;
|
|
1666
|
+
const webrtcArg = argv.webrtc ?? argv.share;
|
|
1667
|
+
let explicitRoomUrl;
|
|
1668
|
+
if (typeof webrtcArg === "string" && webrtcArg !== "") {
|
|
1669
|
+
explicitRoomUrl = isWebrtcSpec(webrtcArg) && toWebrtcUrl(webrtcArg) || void 0;
|
|
1670
|
+
if (!explicitRoomUrl) {
|
|
1671
|
+
process.stderr.write(`ay serve: --webrtc: not a room link: ${webrtcArg}\n want https://agent-yes.com/room/#room=<id>&s=e1.<secret>\n or a bare --webrtc to mint a room of your own\n`);
|
|
1672
|
+
return 1;
|
|
1673
|
+
}
|
|
1674
|
+
}
|
|
1668
1675
|
const fixedPort = typeof argv.port === "number";
|
|
1669
1676
|
const usePortless = wantHttp && !fixedPort;
|
|
1670
1677
|
if (argv.local === true && fixedPort) {
|
|
@@ -2563,7 +2570,7 @@ Options:
|
|
|
2563
2570
|
}
|
|
2564
2571
|
});
|
|
2565
2572
|
if (req.method === "GET" && p === "/api/ws") {
|
|
2566
|
-
const ws = await import("./ws-
|
|
2573
|
+
const ws = await import("./ws-DZ9YAXlY.js");
|
|
2567
2574
|
try {
|
|
2568
2575
|
await ws.loadProvision();
|
|
2569
2576
|
} catch (e) {
|
|
@@ -2583,7 +2590,7 @@ Options:
|
|
|
2583
2590
|
if (req.method === "GET" && p === "/api/ws/status") {
|
|
2584
2591
|
const dirRaw = url.searchParams.get("path");
|
|
2585
2592
|
if (!dirRaw) return new Response("missing ?path=<workspace dir>", { status: 400 });
|
|
2586
|
-
const ws = await import("./ws-
|
|
2593
|
+
const ws = await import("./ws-DZ9YAXlY.js");
|
|
2587
2594
|
let prov;
|
|
2588
2595
|
try {
|
|
2589
2596
|
prov = await ws.loadProvision();
|
|
@@ -2605,7 +2612,7 @@ Options:
|
|
|
2605
2612
|
}
|
|
2606
2613
|
}
|
|
2607
2614
|
if (req.method === "GET" && p === "/api/ws/repos") {
|
|
2608
|
-
const ws = await import("./ws-
|
|
2615
|
+
const ws = await import("./ws-DZ9YAXlY.js");
|
|
2609
2616
|
try {
|
|
2610
2617
|
await ws.loadProvision();
|
|
2611
2618
|
} catch (e) {
|
|
@@ -2686,7 +2693,7 @@ Options:
|
|
|
2686
2693
|
const m = /^([A-Za-z0-9_.-]+)\/([A-Za-z0-9_.-]+)$/.exec(repoParam);
|
|
2687
2694
|
if (!m || m[1] === "." || m[1] === ".." || m[2] === "." || m[2] === "..") return new Response("missing/invalid ?repo=<owner>/<repo>", { status: 400 });
|
|
2688
2695
|
const [, owner, repo] = m;
|
|
2689
|
-
const ws = await import("./ws-
|
|
2696
|
+
const ws = await import("./ws-DZ9YAXlY.js");
|
|
2690
2697
|
let prov;
|
|
2691
2698
|
try {
|
|
2692
2699
|
prov = await ws.loadProvision();
|
|
@@ -3604,7 +3611,7 @@ Options:
|
|
|
3604
3611
|
const perm = body.perm ?? "r";
|
|
3605
3612
|
if (perm !== "r" && perm !== "rw") return new Response(`invalid perm ${perm} (want r or rw)`, { status: 400 });
|
|
3606
3613
|
try {
|
|
3607
|
-
const { createScopedShare } = await import("./agentShare-
|
|
3614
|
+
const { createScopedShare } = await import("./agentShare-D4N8StHO.js");
|
|
3608
3615
|
const share = await createScopedShare({
|
|
3609
3616
|
agent: body.agent,
|
|
3610
3617
|
perm,
|
|
@@ -3619,12 +3626,12 @@ Options:
|
|
|
3619
3626
|
}
|
|
3620
3627
|
}
|
|
3621
3628
|
if (req.method === "GET" && p === "/api/shares") {
|
|
3622
|
-
const { listShares } = await import("./agentShare-
|
|
3629
|
+
const { listShares } = await import("./agentShare-D4N8StHO.js");
|
|
3623
3630
|
return Response.json(listShares());
|
|
3624
3631
|
}
|
|
3625
3632
|
const revokeM = /^\/api\/share\/([^/]+)$/.exec(p);
|
|
3626
3633
|
if (req.method === "DELETE" && revokeM) {
|
|
3627
|
-
const { revokeShare } = await import("./agentShare-
|
|
3634
|
+
const { revokeShare } = await import("./agentShare-D4N8StHO.js");
|
|
3628
3635
|
const ok = revokeShare(decodeURIComponent(revokeM[1]));
|
|
3629
3636
|
return new Response(ok ? "revoked" : "no such share", { status: ok ? 200 : 404 });
|
|
3630
3637
|
}
|
|
@@ -3878,35 +3885,34 @@ Options:
|
|
|
3878
3885
|
}
|
|
3879
3886
|
let closeShare;
|
|
3880
3887
|
if (wantWebrtc) {
|
|
3881
|
-
const
|
|
3882
|
-
const explicitUrl = typeof webrtcVal === "string" && webrtcVal.startsWith("webrtc://") ? webrtcVal : void 0;
|
|
3888
|
+
const explicitUrl = explicitRoomUrl;
|
|
3883
3889
|
try {
|
|
3884
|
-
const { startShare, loadOrCreateShareRoom } = await import("./share-
|
|
3890
|
+
const { startShare, loadOrCreateShareRoom } = await import("./share-Bmnd_qT0.js");
|
|
3885
3891
|
const linkFile = path.join(process.env.AGENT_YES_HOME ?? path.join(homedir(), ".agent-yes"), ".share-link");
|
|
3886
|
-
const announce = async (room, link, rotated) => {
|
|
3892
|
+
const announce = async (room, link, joinLink, rotated) => {
|
|
3887
3893
|
const lead = rotated ? "the room was rejected by signaling (stale generation) — rotated to a fresh link" : "shared over WebRTC — open this link (the token is eaten from the URL on open)";
|
|
3888
3894
|
if (process.stdout.isTTY) {
|
|
3889
3895
|
const persistNote = explicitUrl ? "\n" : ` (persistent room — same link across restarts; delete ~/.agent-yes/.share-room to rotate)\n\n`;
|
|
3890
|
-
process.stdout.write(`${wantHttp ? "\n" : ""}${lead}:\n ${link}\n` + persistNote);
|
|
3896
|
+
process.stdout.write(`${wantHttp ? "\n" : ""}${lead}:\n ${link}\n\nto attach ANOTHER machine to this room, open this there (or paste it into\n\`ay serve --webrtc\`) — one machine per link:\n ${joinLink}\n` + persistNote);
|
|
3891
3897
|
if (!rotated) {
|
|
3892
3898
|
const { offerOpenInBrowser } = await import("./openBrowser-THOzOGNm.js");
|
|
3893
3899
|
await offerOpenInBrowser(link);
|
|
3894
3900
|
}
|
|
3895
3901
|
} else {
|
|
3896
3902
|
try {
|
|
3897
|
-
await writeFile(linkFile, link
|
|
3903
|
+
await writeFile(linkFile, `${link}\n${joinLink}\n`, { mode: 384 });
|
|
3898
3904
|
} catch {}
|
|
3899
3905
|
process.stdout.write(`${wantHttp ? "\n" : ""}${rotated ? "rotated WebRTC room" : "shared over WebRTC"} · room ${room} — the link carries a secret, so it is NOT logged.\n read it from ${linkFile} (mode 0600); delete ~/.agent-yes/.share-room to rotate\n\n`);
|
|
3900
3906
|
}
|
|
3901
3907
|
};
|
|
3902
|
-
const { room, link, close } = await startShare({
|
|
3908
|
+
const { room, link, joinLink, close } = await startShare({
|
|
3903
3909
|
url: explicitUrl ?? await loadOrCreateShareRoom(),
|
|
3904
3910
|
localFetch: apiFetch,
|
|
3905
3911
|
apiToken: token,
|
|
3906
|
-
onRotate: explicitUrl ? void 0 : (info) => announce(info.room, info.link, true)
|
|
3912
|
+
onRotate: explicitUrl ? void 0 : (info) => announce(info.room, info.link, info.joinLink, true)
|
|
3907
3913
|
});
|
|
3908
3914
|
closeShare = close;
|
|
3909
|
-
await announce(room, link, false);
|
|
3915
|
+
await announce(room, link, joinLink, false);
|
|
3910
3916
|
} catch (e) {
|
|
3911
3917
|
process.stderr.write(`ay serve --webrtc failed: ${e.message}\n`);
|
|
3912
3918
|
if (!wantHttp) {
|
|
@@ -3931,7 +3937,7 @@ Options:
|
|
|
3931
3937
|
const shutdown = (resolve) => {
|
|
3932
3938
|
if (heartbeat) clearInterval(heartbeat);
|
|
3933
3939
|
closeShare?.();
|
|
3934
|
-
import("./agentShare-
|
|
3940
|
+
import("./agentShare-D4N8StHO.js").then((m) => m.revokeAllShares()).catch(() => {});
|
|
3935
3941
|
server?.stop();
|
|
3936
3942
|
Promise.resolve(releaseHostLock?.()).catch(() => {}).then(resolve);
|
|
3937
3943
|
};
|
|
@@ -3944,4 +3950,4 @@ Options:
|
|
|
3944
3950
|
|
|
3945
3951
|
//#endregion
|
|
3946
3952
|
export { cmdServe, loadTokenReadOnly, mintScopedTermToken, resolveDaemonHttpBase, resolveLocalServeUrl };
|
|
3947
|
-
//# sourceMappingURL=serve-
|
|
3953
|
+
//# sourceMappingURL=serve-CJDQq_Jp.js.map
|
|
@@ -97,7 +97,7 @@ async function cmdSetup(rest) {
|
|
|
97
97
|
} catch {}
|
|
98
98
|
if (noShare) return 0;
|
|
99
99
|
process.stdout.write(`\nsharing this machine to agent-yes.com…\n`);
|
|
100
|
-
const { cmdServe } = await import("./serve-
|
|
100
|
+
const { cmdServe } = await import("./serve-CJDQq_Jp.js");
|
|
101
101
|
return cmdServe([
|
|
102
102
|
"install",
|
|
103
103
|
"--share",
|
|
@@ -107,4 +107,4 @@ async function cmdSetup(rest) {
|
|
|
107
107
|
|
|
108
108
|
//#endregion
|
|
109
109
|
export { cmdSetup };
|
|
110
|
-
//# sourceMappingURL=setup-
|
|
110
|
+
//# sourceMappingURL=setup-DwLAkbTC.js.map
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import "./e2e-z1xpwSAg.js";
|
|
2
|
+
import { a as shareLinkFromRoomUrl, i as loadOrCreateShareRoom, n as getIceServers, o as startShare, r as importRTC, t as formatRoomLink } from "./share-C9oGvjXT.js";
|
|
3
|
+
|
|
4
|
+
export { getIceServers, importRTC, loadOrCreateShareRoom, shareLinkFromRoomUrl, startShare };
|
|
@@ -87,7 +87,7 @@ async function loadOrCreateShareRoom(sighost = DEFAULT_SIGHOST) {
|
|
|
87
87
|
}
|
|
88
88
|
function parseShareUrl(s) {
|
|
89
89
|
const m = /^webrtc:\/\/([^:@/]+):([^@/]+)@(.+)$/.exec(s);
|
|
90
|
-
if (!m) throw new Error(`bad
|
|
90
|
+
if (!m) throw new Error(`bad room url: ${s} (want a https://agent-yes.com/room/#room=<id>&s=e1.<secret> link)`);
|
|
91
91
|
return {
|
|
92
92
|
room: m[1],
|
|
93
93
|
token: m[2],
|
|
@@ -97,6 +97,10 @@ function parseShareUrl(s) {
|
|
|
97
97
|
function formatShareLink(room, S, host) {
|
|
98
98
|
return `${host === "s.agent-yes.com" ? "https://agent-yes.com/w" : "http://localhost:7778/w"}/#${room}:${MARKER}${S}${host === "s.agent-yes.com" ? "" : "@" + host}`;
|
|
99
99
|
}
|
|
100
|
+
function formatRoomLink(room, S, host) {
|
|
101
|
+
const prod = host === DEFAULT_SIGHOST;
|
|
102
|
+
return `${prod ? "https://agent-yes.com/room" : "http://localhost:7778/room"}/#${`room=${encodeURIComponent(room)}&s=${encodeURIComponent(MARKER + S)}`}${prod ? "" : `&sig=${encodeURIComponent(host)}`}`;
|
|
103
|
+
}
|
|
100
104
|
function shareLinkFromRoomUrl(url) {
|
|
101
105
|
const { room, token, host } = parseShareUrl(url);
|
|
102
106
|
const { s, v2 } = parseSecret(token);
|
|
@@ -180,8 +184,10 @@ async function startShare(opts) {
|
|
|
180
184
|
let S = firstS;
|
|
181
185
|
const wsScheme = host.startsWith("localhost") || host.startsWith("127.") ? "ws" : "wss";
|
|
182
186
|
const mkLink = () => formatShareLink(room, S, host);
|
|
187
|
+
const mkJoinLink = () => formatRoomLink(room, S, host);
|
|
183
188
|
let authToken = await deriveAuthToken(S, room, host);
|
|
184
189
|
let link = mkLink();
|
|
190
|
+
let joinLink = mkJoinLink();
|
|
185
191
|
const RTCPeerConnection = await importRTC();
|
|
186
192
|
let rotateCount = 0;
|
|
187
193
|
const rotate = async () => {
|
|
@@ -192,6 +198,7 @@ async function startShare(opts) {
|
|
|
192
198
|
S = parseSecret(token).s;
|
|
193
199
|
authToken = await deriveAuthToken(S, room, host);
|
|
194
200
|
link = mkLink();
|
|
201
|
+
joinLink = mkJoinLink();
|
|
195
202
|
if (closed) return false;
|
|
196
203
|
try {
|
|
197
204
|
await mkdir(path.dirname(shareRoomPath()), { recursive: true });
|
|
@@ -199,7 +206,8 @@ async function startShare(opts) {
|
|
|
199
206
|
} catch {}
|
|
200
207
|
await opts.onRotate({
|
|
201
208
|
room,
|
|
202
|
-
link
|
|
209
|
+
link,
|
|
210
|
+
joinLink
|
|
203
211
|
});
|
|
204
212
|
return true;
|
|
205
213
|
};
|
|
@@ -621,10 +629,11 @@ async function startShare(opts) {
|
|
|
621
629
|
return {
|
|
622
630
|
room,
|
|
623
631
|
link,
|
|
632
|
+
joinLink,
|
|
624
633
|
close
|
|
625
634
|
};
|
|
626
635
|
}
|
|
627
636
|
|
|
628
637
|
//#endregion
|
|
629
|
-
export {
|
|
630
|
-
//# sourceMappingURL=share-
|
|
638
|
+
export { shareLinkFromRoomUrl as a, loadOrCreateShareRoom as i, getIceServers as n, startShare as o, importRTC as r, formatRoomLink as t };
|
|
639
|
+
//# sourceMappingURL=share-C9oGvjXT.js.map
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { a as readGlobalPids } from "./globalPidIndex-CRH9L9tn.js";
|
|
2
2
|
import { n as getMaxAgents, r as getMinFreeMb, s as getSpawnWaitMs } from "./workspaceConfig-DTvPtr5j.js";
|
|
3
3
|
import { readFile } from "fs/promises";
|
|
4
4
|
|
|
@@ -104,4 +104,4 @@ async function waitForSpawnCapacity(opts) {
|
|
|
104
104
|
|
|
105
105
|
//#endregion
|
|
106
106
|
export { waitForSpawnCapacity as i, spawnGateEnabled as n, spawnRejectionReason as r, memAvailableMb as t };
|
|
107
|
-
//# sourceMappingURL=spawnGate-
|
|
107
|
+
//# sourceMappingURL=spawnGate-YpHopveO.js.map
|
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
import "./logger-CDIsZ-Pp.js";
|
|
2
2
|
import "./JsonlStore-BqF7AQ6E.js";
|
|
3
|
-
import "./globalPidIndex-
|
|
4
|
-
import "./pidStore-
|
|
5
|
-
import "./messageLog-
|
|
3
|
+
import "./globalPidIndex-CRH9L9tn.js";
|
|
4
|
+
import "./pidStore-DXWqzTSz.js";
|
|
5
|
+
import "./messageLog-Brx3w6zT.js";
|
|
6
6
|
import "./e2e-z1xpwSAg.js";
|
|
7
7
|
import "./configShared-DKTgiz7K.js";
|
|
8
|
-
import { $ as sendPayloadCapError, A as isUnknownManagerToken, B as readLogForRender, C as finalizedLines, D as isPidAlive, E as isExitRequest, F as listRecords, G as renderLogTailLines, H as readPtysize, I as matchKeyword, J as resolveOne, K as renderRawLog, L as menuSelectKeys, M as isUserTyping, N as lastReadAt, O as isSlashCommand, P as lastStdinAt, Q as runSubcommand, R as probeStdinReachable, S as extractTaskCounts, T as isBareManagerInvocation, U as recentMessageEdges, V as readNotes, W as recentReadEdges, X as resolveResumeArgs, Y as resolveReadWindow, Z as restartHintLines, _ as envelopeAttribution, a as SEND_BODY_MAX_CHARS, at as writeKeysPaced, b as extractMenu, c as backoffWhileTyping, d as cmdHelp, et as snapshotStatus, f as confirmStdinUnreachable, g as deriveLiveStatus, h as deriveLiveState, i as READ_WINDOW_MS, it as waitForLogQuiet, j as isUnreachableWriteErrno, k as isSubcommand, l as buildEnvelope, m as cursorAbs, n as MAX_RENDER_BYTES, nt as stopTipForCli, o as SEND_EXIT_UNREACHABLE, ot as writeToIpc, p as controlCodeFromName, q as renderRawLogLines, r as READ_PAGE_DEFAULT, rt as submitAndConfirm, s as TYPING_WINDOW_MS, t as GRACEFUL_EXIT_COMMANDS, tt as stdinActivityPath, u as cliDefaults, v as envelopeCostFor, w as isAgentStuck, x as extractNeedsInput, y as extractBadges, z as readAgentPtysize } from "./subcommands-
|
|
8
|
+
import { $ as sendPayloadCapError, A as isUnknownManagerToken, B as readLogForRender, C as finalizedLines, D as isPidAlive, E as isExitRequest, F as listRecords, G as renderLogTailLines, H as readPtysize, I as matchKeyword, J as resolveOne, K as renderRawLog, L as menuSelectKeys, M as isUserTyping, N as lastReadAt, O as isSlashCommand, P as lastStdinAt, Q as runSubcommand, R as probeStdinReachable, S as extractTaskCounts, T as isBareManagerInvocation, U as recentMessageEdges, V as readNotes, W as recentReadEdges, X as resolveResumeArgs, Y as resolveReadWindow, Z as restartHintLines, _ as envelopeAttribution, a as SEND_BODY_MAX_CHARS, at as writeKeysPaced, b as extractMenu, c as backoffWhileTyping, d as cmdHelp, et as snapshotStatus, f as confirmStdinUnreachable, g as deriveLiveStatus, h as deriveLiveState, i as READ_WINDOW_MS, it as waitForLogQuiet, j as isUnreachableWriteErrno, k as isSubcommand, l as buildEnvelope, m as cursorAbs, n as MAX_RENDER_BYTES, nt as stopTipForCli, o as SEND_EXIT_UNREACHABLE, ot as writeToIpc, p as controlCodeFromName, q as renderRawLogLines, r as READ_PAGE_DEFAULT, rt as submitAndConfirm, s as TYPING_WINDOW_MS, t as GRACEFUL_EXIT_COMMANDS, tt as stdinActivityPath, u as cliDefaults, v as envelopeCostFor, w as isAgentStuck, x as extractNeedsInput, y as extractBadges, z as readAgentPtysize } from "./subcommands-yWgVRM2r.js";
|
|
9
9
|
import "./notifyStore-2SWKGwZI.js";
|
|
10
|
-
import "./webrtcLink-
|
|
11
|
-
import "./remotes-
|
|
10
|
+
import "./webrtcLink-CnQf9pmu.js";
|
|
11
|
+
import "./remotes-tmKwrr20.js";
|
|
12
12
|
|
|
13
13
|
export { READ_WINDOW_MS, cmdHelp, isBareManagerInvocation, isSubcommand, isUnknownManagerToken, lastReadAt, runSubcommand };
|