agent-yes 1.300.3-beta.773.1 → 1.300.3
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-Bwm91tBB.js → SUPPORTED_CLIS-CWJr4TJH.js} +2 -2
- package/dist/{SUPPORTED_CLIS-C-mphtYE.js → SUPPORTED_CLIS-ChSO8FiS.js} +3 -3
- package/dist/{agentShare-D3bccnzk.js → agentShare-NkW0b0mg.js} +4 -4
- package/dist/{callback-Cmb5kBjN.js → callback-B8CUyag4.js} +3 -3
- package/dist/{callback-CyLfircS.js → callback-CjlaFXp1.js} +3 -3
- package/dist/{channels-rhxQArqN.js → channels-aYwLMbFV.js} +2 -2
- package/dist/cli.js +5 -5
- package/dist/{cmdPs-DNYZt8Ic.js → cmdPs-C8DIl8V6.js} +3 -3
- package/dist/index.js +2 -2
- package/dist/{notifyDaemon-NBtbwPD9.js → notifyDaemon-DWIfzEE7.js} +3 -3
- package/dist/{parentPingLoop-DF23VTg_.js → parentPingLoop-Bh3KuFcW.js} +2 -2
- package/dist/{remotes-B4CNXwDS.js → remotes-B4v0Nowo.js} +2 -2
- package/dist/{remotes-CQTEY8Gt.js → remotes-DnMQWaqQ.js} +1 -1
- package/dist/rustBinary-BNmAJEBb.js +4 -0
- package/dist/{rustBinary-Dtxlg_EB.js → rustBinary-gI_r3g9K.js} +5 -48
- package/dist/{schedule-Dej5OkTj.js → schedule-DryC--yx.js} +4 -4
- package/dist/{serve-BeHvVrRB.js → serve-DVoYVgBo.js} +32 -99
- package/dist/{serveRust-BAawe83i.js → serveRust-DDQiZmMf.js} +2 -16
- package/dist/{setup-CFH2VcZd.js → setup--1zRHaGW.js} +2 -2
- package/dist/share-Bmnd_qT0.js +4 -0
- package/dist/{share-CLataFnI.js → share-C9oGvjXT.js} +12 -18
- package/dist/{shareCmd-CvDyiBN_.js → shareCmd-BI3hRWGO.js} +7 -25
- package/dist/{subcommands-DWOgH-wf.js → subcommands-BviFOQZE.js} +2 -2
- package/dist/{subcommands-D134VWB9.js → subcommands-UWLkF5pq.js} +75 -369
- package/dist/{terminal-B_tEnevY.js → terminal-DviH1E3C.js} +2 -2
- package/dist/trayApp-BDIb8fOj.js +5 -0
- package/dist/{trayApp-BaH6X5sV.js → trayApp-PJrwfyDs.js} +2 -2
- package/dist/{ts-B-Oi_NbZ.js → ts--JmSY117.js} +5 -5
- package/dist/{versionChecker-Dgj528rp.js → versionChecker-CCGSbjio.js} +2 -2
- package/dist/{webrtcRemote-Cy5kB8aR.js → webrtcRemote-Cd4vTrgv.js} +14 -115
- package/dist/{widget-0_Soh-kR.js → widget-DgBDIGRQ.js} +3 -3
- package/dist/{ws-JA_st1Px.js → ws-DnBg8-g-.js} +3 -3
- package/dist/{ws-ra9hOj5i.js → ws-dc7MP054.js} +2 -2
- package/package.json +1 -1
- package/ts/rustBinary.bun.spec.ts +2 -39
- package/ts/rustBinary.spec.ts +2 -53
- package/ts/rustBinary.ts +3 -61
- package/ts/serve.spec.ts +0 -103
- package/ts/serve.ts +15 -100
- package/ts/serveRust.spec.ts +1 -24
- package/ts/serveRust.ts +0 -19
- package/ts/share.bun.spec.ts +2 -54
- package/ts/share.spec.ts +2 -54
- package/ts/share.ts +15 -40
- package/ts/shareCmd.ts +2 -33
- package/ts/strayServe.ts +0 -1
- package/ts/subcommands.ts +93 -310
- package/ts/webrtcRemote.ts +20 -66
- package/dist/rustBinary-uxUTf8kp.js +0 -4
- package/dist/share-nmgSIjYP.js +0 -4
- package/dist/trayApp-B32MpiA4.js +0 -5
- package/ts/remoteCache.bun.spec.ts +0 -191
- package/ts/remoteCache.spec.ts +0 -191
- package/ts/remoteCache.ts +0 -193
- package/ts/webrtcSignal.bun.spec.ts +0 -120
- package/ts/webrtcSignal.spec.ts +0 -120
- package/ts/webrtcSignal.ts +0 -143
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { t as CLIS_CONFIG } from "./ts
|
|
1
|
+
import { t as CLIS_CONFIG } from "./ts--JmSY117.js";
|
|
2
2
|
|
|
3
3
|
//#region ts/SUPPORTED_CLIS.ts
|
|
4
4
|
const SUPPORTED_CLIS = Object.keys(CLIS_CONFIG);
|
|
5
5
|
|
|
6
6
|
//#endregion
|
|
7
7
|
export { SUPPORTED_CLIS as t };
|
|
8
|
-
//# sourceMappingURL=SUPPORTED_CLIS-
|
|
8
|
+
//# sourceMappingURL=SUPPORTED_CLIS-CWJr4TJH.js.map
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import "./logger-CDIsZ-Pp.js";
|
|
2
|
-
import "./versionChecker-
|
|
3
|
-
import "./ts
|
|
2
|
+
import "./versionChecker-CCGSbjio.js";
|
|
3
|
+
import "./ts--JmSY117.js";
|
|
4
4
|
import "./todoAutomation-CbVVS4re.js";
|
|
5
5
|
import "./JsonlStore-BqF7AQ6E.js";
|
|
6
6
|
import "./globalPidIndex-CRH9L9tn.js";
|
|
7
7
|
import "./pidStore-DXWqzTSz.js";
|
|
8
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-CWJr4TJH.js";
|
|
11
11
|
|
|
12
12
|
export { SUPPORTED_CLIS };
|
|
@@ -5,11 +5,11 @@ import "./pidStore-DXWqzTSz.js";
|
|
|
5
5
|
import "./messageLog-Brx3w6zT.js";
|
|
6
6
|
import "./e2e-z1xpwSAg.js";
|
|
7
7
|
import "./configShared-DKTgiz7K.js";
|
|
8
|
-
import { nt as resolveOne } from "./subcommands-
|
|
8
|
+
import { nt as resolveOne } from "./subcommands-UWLkF5pq.js";
|
|
9
9
|
import "./notifyStore-2SWKGwZI.js";
|
|
10
10
|
import "./webrtcLink-DFRyWNMs.js";
|
|
11
|
-
import "./remotes-
|
|
12
|
-
import {
|
|
11
|
+
import "./remotes-B4v0Nowo.js";
|
|
12
|
+
import { o as startShare } from "./share-C9oGvjXT.js";
|
|
13
13
|
|
|
14
14
|
//#region ts/agentShare.ts
|
|
15
15
|
const MAX_SHARES = 8;
|
|
@@ -232,4 +232,4 @@ function transformEvent(rawEvent, agentId, forwarded) {
|
|
|
232
232
|
|
|
233
233
|
//#endregion
|
|
234
234
|
export { createScopedShare, listShares, revokeAllShares, revokeShare };
|
|
235
|
-
//# sourceMappingURL=agentShare-
|
|
235
|
+
//# sourceMappingURL=agentShare-NkW0b0mg.js.map
|
|
@@ -5,11 +5,11 @@ import "./pidStore-DXWqzTSz.js";
|
|
|
5
5
|
import "./messageLog-Brx3w6zT.js";
|
|
6
6
|
import "./e2e-z1xpwSAg.js";
|
|
7
7
|
import "./configShared-DKTgiz7K.js";
|
|
8
|
-
import "./subcommands-
|
|
8
|
+
import "./subcommands-UWLkF5pq.js";
|
|
9
9
|
import "./notifyStore-2SWKGwZI.js";
|
|
10
10
|
import "./webrtcLink-DFRyWNMs.js";
|
|
11
|
-
import "./remotes-
|
|
11
|
+
import "./remotes-B4v0Nowo.js";
|
|
12
12
|
import "./callbackCore-Bl2gGcxg.js";
|
|
13
|
-
import { i as loadOrCreateCallbackSecret, n as isCallbackRevoked, r as loadCallbackSecretReadOnly, t as cmdCallback } from "./callback-
|
|
13
|
+
import { i as loadOrCreateCallbackSecret, n as isCallbackRevoked, r as loadCallbackSecretReadOnly, t as cmdCallback } from "./callback-CjlaFXp1.js";
|
|
14
14
|
|
|
15
15
|
export { cmdCallback };
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { t as agentYesHome } from "./agentYesHome-BNtn19J4.js";
|
|
2
|
-
import { nt as resolveOne } from "./subcommands-
|
|
2
|
+
import { nt as resolveOne } from "./subcommands-UWLkF5pq.js";
|
|
3
3
|
import { a as mintCapability, o as parseExpires } from "./callbackCore-Bl2gGcxg.js";
|
|
4
4
|
import { randomBytes } from "node:crypto";
|
|
5
5
|
import { chmodSync, readFileSync, renameSync, writeFileSync } from "node:fs";
|
|
@@ -72,7 +72,7 @@ async function resolveBase(flag) {
|
|
|
72
72
|
if (flag) return flag;
|
|
73
73
|
if (process.env.AGENT_YES_CALLBACK_BASE) return process.env.AGENT_YES_CALLBACK_BASE;
|
|
74
74
|
try {
|
|
75
|
-
const { resolveLocalServeUrl } = await import("./serve-
|
|
75
|
+
const { resolveLocalServeUrl } = await import("./serve-DVoYVgBo.js");
|
|
76
76
|
const url = await resolveLocalServeUrl();
|
|
77
77
|
if (url) return url;
|
|
78
78
|
} catch {}
|
|
@@ -187,4 +187,4 @@ async function cmdCallback(rest) {
|
|
|
187
187
|
|
|
188
188
|
//#endregion
|
|
189
189
|
export { loadOrCreateCallbackSecret as i, isCallbackRevoked as n, loadCallbackSecretReadOnly as r, cmdCallback as t };
|
|
190
|
-
//# sourceMappingURL=callback-
|
|
190
|
+
//# sourceMappingURL=callback-CjlaFXp1.js.map
|
|
@@ -387,7 +387,7 @@ function printOp(op) {
|
|
|
387
387
|
*/
|
|
388
388
|
async function runMesh(cwd, entry, opts) {
|
|
389
389
|
const { ChannelPeer } = await import("./peer-CGSJluSw.js");
|
|
390
|
-
const { importRTC, getIceServers } = await import("./share-
|
|
390
|
+
const { importRTC, getIceServers } = await import("./share-Bmnd_qT0.js");
|
|
391
391
|
const rtc = await importRTC();
|
|
392
392
|
const seen = new Set((await readOps(cwd, entry.channelId)).map((o) => o.id));
|
|
393
393
|
const peer = new ChannelPeer({
|
|
@@ -567,4 +567,4 @@ async function cmdCh(args) {
|
|
|
567
567
|
|
|
568
568
|
//#endregion
|
|
569
569
|
export { cmdCh };
|
|
570
|
-
//# sourceMappingURL=channels-
|
|
570
|
+
//# sourceMappingURL=channels-aYwLMbFV.js.map
|
package/dist/cli.js
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
#!/usr/bin/env bun
|
|
2
2
|
import { t as invokedCliName } from "./invokedCli-zdFbz1ST.js";
|
|
3
3
|
import { n as logger } from "./logger-CDIsZ-Pp.js";
|
|
4
|
-
import { a as versionString, r as displayVersion, t as checkAndAutoUpdate } from "./versionChecker-
|
|
5
|
-
import {
|
|
4
|
+
import { a as versionString, r as displayVersion, t as checkAndAutoUpdate } from "./versionChecker-CCGSbjio.js";
|
|
5
|
+
import { d as getRustBinary } from "./rustBinary-gI_r3g9K.js";
|
|
6
6
|
import { argv } from "process";
|
|
7
7
|
import { spawn } from "child_process";
|
|
8
8
|
import ms from "ms";
|
|
@@ -295,7 +295,7 @@ function buildRustArgs(argv, cliFromScript, supportedClis) {
|
|
|
295
295
|
const rawArg = process.argv[2];
|
|
296
296
|
const managerCommands = !invokedCliName(process.argv);
|
|
297
297
|
const isHelpFlag = rawArg === "-h" || rawArg === "--help";
|
|
298
|
-
const { isSubcommand, runSubcommand, cmdHelp, isUnknownManagerToken, isBareManagerInvocation } = await import("./subcommands-
|
|
298
|
+
const { isSubcommand, runSubcommand, cmdHelp, isUnknownManagerToken, isBareManagerInvocation } = await import("./subcommands-BviFOQZE.js");
|
|
299
299
|
if (isHelpFlag && process.argv.length === 3) {
|
|
300
300
|
await cmdHelp(managerCommands);
|
|
301
301
|
process.exit(0);
|
|
@@ -309,7 +309,7 @@ function buildRustArgs(argv, cliFromScript, supportedClis) {
|
|
|
309
309
|
process.exit(code ?? 0);
|
|
310
310
|
}
|
|
311
311
|
{
|
|
312
|
-
const { SUPPORTED_CLIS } = await import("./SUPPORTED_CLIS-
|
|
312
|
+
const { SUPPORTED_CLIS } = await import("./SUPPORTED_CLIS-ChSO8FiS.js");
|
|
313
313
|
if (isUnknownManagerToken(rawArg, managerCommands, SUPPORTED_CLIS)) {
|
|
314
314
|
process.stderr.write(`ay: unknown subcommand or CLI '${rawArg}'.\n See 'ay help' for subcommands. To run an agent, name a CLI:\n 'ay <cli> …' (e.g. 'ay claude …') or 'ay --cli <cli> …'.\n`);
|
|
315
315
|
process.exit(1);
|
|
@@ -360,7 +360,7 @@ if (config.useRust) {
|
|
|
360
360
|
}
|
|
361
361
|
}
|
|
362
362
|
if (rustBinary) {
|
|
363
|
-
const { SUPPORTED_CLIS } = await import("./SUPPORTED_CLIS-
|
|
363
|
+
const { SUPPORTED_CLIS } = await import("./SUPPORTED_CLIS-ChSO8FiS.js");
|
|
364
364
|
const rustArgs = buildRustArgs(process.argv, config.cli, SUPPORTED_CLIS);
|
|
365
365
|
if (config.verbose) {
|
|
366
366
|
console.log(`[rust] Using binary: ${rustBinary}`);
|
|
@@ -5,10 +5,10 @@ import "./pidStore-DXWqzTSz.js";
|
|
|
5
5
|
import "./messageLog-Brx3w6zT.js";
|
|
6
6
|
import "./e2e-z1xpwSAg.js";
|
|
7
7
|
import "./configShared-DKTgiz7K.js";
|
|
8
|
-
import { V as listRecords, bt as flattenForest, v as deriveLiveState, yt as buildAgentForest } from "./subcommands-
|
|
8
|
+
import { V as listRecords, bt as flattenForest, v as deriveLiveState, yt as buildAgentForest } from "./subcommands-UWLkF5pq.js";
|
|
9
9
|
import "./notifyStore-2SWKGwZI.js";
|
|
10
10
|
import "./webrtcLink-DFRyWNMs.js";
|
|
11
|
-
import "./remotes-
|
|
11
|
+
import "./remotes-B4v0Nowo.js";
|
|
12
12
|
import { i as systemStats, n as sampleTrees, r as snapshotProcs, t as humanBytes } from "./procStats-CyD8h5nx.js";
|
|
13
13
|
import yargs from "yargs";
|
|
14
14
|
import { readFileSync } from "node:fs";
|
|
@@ -330,4 +330,4 @@ function readPpidSync(pid) {
|
|
|
330
330
|
|
|
331
331
|
//#endregion
|
|
332
332
|
export { cmdPs };
|
|
333
|
-
//# sourceMappingURL=cmdPs-
|
|
333
|
+
//# sourceMappingURL=cmdPs-C8DIl8V6.js.map
|
package/dist/index.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import "./logger-CDIsZ-Pp.js";
|
|
2
|
-
import "./versionChecker-
|
|
3
|
-
import { a as hasTodoStore, i as answerAsk, l as AgentContext, n as agentYes, o as listAsks, r as config, s as listAsksForProject, t as CLIS_CONFIG } from "./ts
|
|
2
|
+
import "./versionChecker-CCGSbjio.js";
|
|
3
|
+
import { a as hasTodoStore, i as answerAsk, l as AgentContext, n as agentYes, o as listAsks, r as config, s as listAsksForProject, t as CLIS_CONFIG } from "./ts--JmSY117.js";
|
|
4
4
|
import { a as renderTree, c as describeBlock, i as renderDigest, l as monitorHint, o as unblockedTasks, r as openBlockers, t as reconcileTodos, u as removeControlCharacters } from "./todoAutomation-CbVVS4re.js";
|
|
5
5
|
import "./JsonlStore-BqF7AQ6E.js";
|
|
6
6
|
import "./globalPidIndex-CRH9L9tn.js";
|
|
@@ -5,10 +5,10 @@ import "./pidStore-DXWqzTSz.js";
|
|
|
5
5
|
import "./messageLog-Brx3w6zT.js";
|
|
6
6
|
import "./e2e-z1xpwSAg.js";
|
|
7
7
|
import "./configShared-DKTgiz7K.js";
|
|
8
|
-
import { $ as renderLogTailLines, N as isPidAlive, V as listRecords, v as deriveLiveState } from "./subcommands-
|
|
8
|
+
import { $ as renderLogTailLines, N as isPidAlive, V as listRecords, v as deriveLiveState } from "./subcommands-UWLkF5pq.js";
|
|
9
9
|
import { f as readInbox, g as daemonLockOwnerPath, h as daemonLockDir, i as gcInboxes, l as listInboxParents, m as shouldStealLock, n as appendEvent, s as hostId, u as liveWatchers, x as notifyDir } from "./notifyStore-2SWKGwZI.js";
|
|
10
10
|
import "./webrtcLink-DFRyWNMs.js";
|
|
11
|
-
import "./remotes-
|
|
11
|
+
import "./remotes-B4v0Nowo.js";
|
|
12
12
|
import { mkdir, readFile, rename, rm, stat, writeFile } from "fs/promises";
|
|
13
13
|
import { randomUUID } from "node:crypto";
|
|
14
14
|
import { execFile, execFileSync } from "node:child_process";
|
|
@@ -879,4 +879,4 @@ async function ensureDaemon() {
|
|
|
879
879
|
|
|
880
880
|
//#endregion
|
|
881
881
|
export { daemonStatus, ensureDaemon, requestDaemonStop, runDaemon };
|
|
882
|
-
//# sourceMappingURL=notifyDaemon-
|
|
882
|
+
//# sourceMappingURL=notifyDaemon-DWIfzEE7.js.map
|
|
@@ -338,7 +338,7 @@ async function isParentWatching(parentWrapperPid, parentAgentPid, selfAgentPid,
|
|
|
338
338
|
logger.debug("[parent-ping] watcher lookup failed:", error);
|
|
339
339
|
}
|
|
340
340
|
try {
|
|
341
|
-
const { lastReadAt, READ_WINDOW_MS } = await import("./subcommands-
|
|
341
|
+
const { lastReadAt, READ_WINDOW_MS } = await import("./subcommands-BviFOQZE.js");
|
|
342
342
|
const last = await lastReadAt(`agent:${parentAgentPid}`, selfAgentPid);
|
|
343
343
|
if (last !== null && now - last <= READ_WINDOW_MS) return true;
|
|
344
344
|
} catch (error) {
|
|
@@ -466,4 +466,4 @@ function startParentPingLoop(opts) {
|
|
|
466
466
|
|
|
467
467
|
//#endregion
|
|
468
468
|
export { startParentPingLoop };
|
|
469
|
-
//# sourceMappingURL=parentPingLoop-
|
|
469
|
+
//# sourceMappingURL=parentPingLoop-Bh3KuFcW.js.map
|
|
@@ -136,7 +136,7 @@ async function resolveRemoteSpec(spec) {
|
|
|
136
136
|
* The bridge lives for the rest of the process (torn down on `process.exit`).
|
|
137
137
|
*/
|
|
138
138
|
async function resolveWebrtc(link, keyword, label) {
|
|
139
|
-
const { startWebrtcBridge } = await import("./webrtcRemote-
|
|
139
|
+
const { startWebrtcBridge } = await import("./webrtcRemote-Cd4vTrgv.js");
|
|
140
140
|
const bridge = await startWebrtcBridge(link);
|
|
141
141
|
return {
|
|
142
142
|
url: bridge.baseUrl,
|
|
@@ -321,4 +321,4 @@ async function cmdConnect(rest) {
|
|
|
321
321
|
|
|
322
322
|
//#endregion
|
|
323
323
|
export { deleteRemoteAlias as a, parseShareUrl as c, writeRemoteAlias as d, defaultConnectAlias as i, readRemotes as l, cmdConnect as n, maskRemoteUrl as o, cmdRemote as r, parseDirectRemoteSpec as s, MASK as t, resolveRemoteSpec as u };
|
|
324
|
-
//# sourceMappingURL=remotes-
|
|
324
|
+
//# sourceMappingURL=remotes-B4v0Nowo.js.map
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import "./e2e-z1xpwSAg.js";
|
|
2
2
|
import "./webrtcLink-DFRyWNMs.js";
|
|
3
|
-
import { a as deleteRemoteAlias, c as parseShareUrl, d as writeRemoteAlias, i as defaultConnectAlias, l as readRemotes, n as cmdConnect, o as maskRemoteUrl, r as cmdRemote, s as parseDirectRemoteSpec, t as MASK, u as resolveRemoteSpec } from "./remotes-
|
|
3
|
+
import { a as deleteRemoteAlias, c as parseShareUrl, d as writeRemoteAlias, i as defaultConnectAlias, l as readRemotes, n as cmdConnect, o as maskRemoteUrl, r as cmdRemote, s as parseDirectRemoteSpec, t as MASK, u as resolveRemoteSpec } from "./remotes-B4v0Nowo.js";
|
|
4
4
|
|
|
5
5
|
export { cmdConnect, cmdRemote };
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import "./versionChecker-CCGSbjio.js";
|
|
2
|
+
import { a as findSpawnHiddenLauncher, c as getBinDir, d as getRustBinary, f as hasValidMacSignature, i as findRustBinary, l as getBinaryName, n as downloadBinary, o as findTrayLauncher, r as findAyrsBinary, s as gcOldBinaryDirs, t as devBuildInfo, u as getDownloadUrl } from "./rustBinary-gI_r3g9K.js";
|
|
3
|
+
|
|
4
|
+
export { findAyrsBinary, gcOldBinaryDirs };
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { i as getInstalledPackage, n as compareVersions } from "./versionChecker-
|
|
1
|
+
import { i as getInstalledPackage, n as compareVersions } from "./versionChecker-CCGSbjio.js";
|
|
2
2
|
import { execFileSync } from "child_process";
|
|
3
|
-
import {
|
|
3
|
+
import { existsSync, mkdirSync, readdirSync, rmSync, statSync, unlinkSync } from "fs";
|
|
4
4
|
import { chmod, copyFile } from "fs/promises";
|
|
5
5
|
import path from "path";
|
|
6
6
|
|
|
@@ -172,49 +172,7 @@ function findAyrsBinary() {
|
|
|
172
172
|
path.join(getBinDir(), exe),
|
|
173
173
|
Bun.which("ayrs") ?? ""
|
|
174
174
|
];
|
|
175
|
-
for (const p of searchPaths) if (p && existsSync(p)) return
|
|
176
|
-
}
|
|
177
|
-
/**
|
|
178
|
-
* Repair a binary that is present but not executable (POSIX only; Windows has
|
|
179
|
-
* no exec bit). A release bundle that lost its modes in transit, or a cache
|
|
180
|
-
* written by an older fetcher that only chmod'ed the main binary, leaves
|
|
181
|
-
* `ayrs` as a plain file: the daemon then dies with EACCES on every restart
|
|
182
|
-
* and the supervisor loops forever. Best effort — a read-only cache keeps
|
|
183
|
-
* failing, and the caller's spawn reports that.
|
|
184
|
-
*/
|
|
185
|
-
function ensureExecutable(p) {
|
|
186
|
-
if (process.platform === "win32") return p;
|
|
187
|
-
try {
|
|
188
|
-
accessSync(p, constants.X_OK);
|
|
189
|
-
} catch {
|
|
190
|
-
try {
|
|
191
|
-
chmodSync(p, 493);
|
|
192
|
-
} catch {}
|
|
193
|
-
}
|
|
194
|
-
return p;
|
|
195
|
-
}
|
|
196
|
-
/**
|
|
197
|
-
* Mark every regular file a release bundle extracted into `dir` executable.
|
|
198
|
-
* The tarball carries ayrs (and friends) next to the main binary; the modes
|
|
199
|
-
* they arrive with are whatever the packaging pipeline preserved, which has
|
|
200
|
-
* been "none" (CI artifacts drop Unix permissions). Chmod'ing the main binary
|
|
201
|
-
* alone (the old behaviour) left ayrs non-executable — see ensureExecutable.
|
|
202
|
-
*/
|
|
203
|
-
async function chmodExtractedBinaries(dir) {
|
|
204
|
-
const fixed = [];
|
|
205
|
-
for (const name of readdirSync(dir)) {
|
|
206
|
-
const p = path.join(dir, name);
|
|
207
|
-
let isFile = false;
|
|
208
|
-
try {
|
|
209
|
-
isFile = statSync(p).isFile();
|
|
210
|
-
} catch {
|
|
211
|
-
continue;
|
|
212
|
-
}
|
|
213
|
-
if (!isFile || /\.(tar\.gz|zip|json|txt|md)$/i.test(name)) continue;
|
|
214
|
-
await chmod(p, 493);
|
|
215
|
-
fixed.push(name);
|
|
216
|
-
}
|
|
217
|
-
return fixed;
|
|
175
|
+
for (const p of searchPaths) if (p && existsSync(p)) return p;
|
|
218
176
|
}
|
|
219
177
|
/**
|
|
220
178
|
* Get GitHub release download URL for the binary
|
|
@@ -290,7 +248,6 @@ async function downloadBinary(verbose = false) {
|
|
|
290
248
|
try {
|
|
291
249
|
unlinkSync(tarPath);
|
|
292
250
|
} catch {}
|
|
293
|
-
await chmodExtractedBinaries(binDir);
|
|
294
251
|
await chmod(binaryPath, 493);
|
|
295
252
|
}
|
|
296
253
|
if (verbose) console.log(`[rust] Binary downloaded to: ${binaryPath}`);
|
|
@@ -413,5 +370,5 @@ async function getRustBinary(options = {}) {
|
|
|
413
370
|
}
|
|
414
371
|
|
|
415
372
|
//#endregion
|
|
416
|
-
export {
|
|
417
|
-
//# sourceMappingURL=rustBinary-
|
|
373
|
+
export { findSpawnHiddenLauncher as a, getBinDir as c, getRustBinary as d, hasValidMacSignature as f, findRustBinary as i, getBinaryName as l, downloadBinary as n, findTrayLauncher as o, findAyrsBinary as r, gcOldBinaryDirs as s, devBuildInfo as t, getDownloadUrl as u };
|
|
374
|
+
//# sourceMappingURL=rustBinary-gI_r3g9K.js.map
|
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
import "./logger-CDIsZ-Pp.js";
|
|
2
|
-
import "./versionChecker-
|
|
3
|
-
import "./ts
|
|
2
|
+
import "./versionChecker-CCGSbjio.js";
|
|
3
|
+
import "./ts--JmSY117.js";
|
|
4
4
|
import "./todoAutomation-CbVVS4re.js";
|
|
5
5
|
import "./JsonlStore-BqF7AQ6E.js";
|
|
6
6
|
import "./globalPidIndex-CRH9L9tn.js";
|
|
7
7
|
import "./pidStore-DXWqzTSz.js";
|
|
8
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-CWJr4TJH.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-DryC--yx.js.map
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import "./logger-CDIsZ-Pp.js";
|
|
2
|
-
import { i as getInstalledPackage } from "./versionChecker-
|
|
3
|
-
import {
|
|
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-CCGSbjio.js";
|
|
3
|
+
import { a as findSpawnHiddenLauncher } from "./rustBinary-gI_r3g9K.js";
|
|
4
|
+
import { c as permissionBadge, i as answerAsk, o as listAsks, u as CLAUDE_SESSION_PIN_ENV } from "./ts--JmSY117.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";
|
|
@@ -12,25 +12,25 @@ 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 { $ as renderLogTailLines, C as extractBadges, E as extractTaskCounts, J as readLogForRender, P as isSlashCommand, Q as recentReadEdges, R as isUserTyping, T as extractNeedsInput, V as listRecords, X as readPtysize, Y as readNotes, Z as recentMessageEdges, _t as shouldFramePaste, ct as snapshotStatus, et as renderRawLog, f as cliDefaults, gt as framePaste, h as controlCodeFromName, ht as withIpcLock, mt as writeToIpc, nt as resolveOne, tt as renderRawLogLines, vt as TYPING_BADGE, y as deriveLiveStatus } from "./subcommands-
|
|
15
|
+
import { t as SUPPORTED_CLIS } from "./SUPPORTED_CLIS-CWJr4TJH.js";
|
|
16
|
+
import { $ as renderLogTailLines, C as extractBadges, E as extractTaskCounts, J as readLogForRender, P as isSlashCommand, Q as recentReadEdges, R as isUserTyping, T as extractNeedsInput, V as listRecords, X as readPtysize, Y as readNotes, Z as recentMessageEdges, _t as shouldFramePaste, ct as snapshotStatus, et as renderRawLog, f as cliDefaults, gt as framePaste, h as controlCodeFromName, ht as withIpcLock, mt as writeToIpc, nt as resolveOne, tt as renderRawLogLines, vt as TYPING_BADGE, y as deriveLiveStatus } from "./subcommands-UWLkF5pq.js";
|
|
17
17
|
import { c as isTransientLockMkdirError } from "./notifyStore-2SWKGwZI.js";
|
|
18
18
|
import { i as toWebrtcUrl, n as isWebrtcSpec } from "./webrtcLink-DFRyWNMs.js";
|
|
19
|
-
import "./remotes-
|
|
19
|
+
import "./remotes-B4v0Nowo.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-CjlaFXp1.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-
|
|
25
|
+
import { i as importProvisionModule } from "./ws-dc7MP054.js";
|
|
26
26
|
import { r as spawnRejectionReason } from "./spawnGate-YpHopveO.js";
|
|
27
|
-
import { i as launchTray } from "./trayApp-
|
|
27
|
+
import { i as launchTray } from "./trayApp-PJrwfyDs.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";
|
|
31
31
|
import path from "path";
|
|
32
32
|
import { execFileSync } from "node:child_process";
|
|
33
|
-
import { existsSync,
|
|
33
|
+
import { existsSync, renameSync, watch, writeFileSync } from "node:fs";
|
|
34
34
|
import { fileURLToPath } from "node:url";
|
|
35
35
|
import { createHash, createHmac, randomBytes, timingSafeEqual } from "crypto";
|
|
36
36
|
|
|
@@ -459,7 +459,7 @@ function negotiateSize(caps) {
|
|
|
459
459
|
//#region ts/strayServe.ts
|
|
460
460
|
const MANAGEMENT_COMMAND_RE = /\b(?:install|uninstall|status|logs|restart)\b/;
|
|
461
461
|
function isServeCommand(command) {
|
|
462
|
-
return /\bay(?:\.js)?\s+serve\b/.test(command) || /\
|
|
462
|
+
return /\bay(?:\.js)?\s+serve\b/.test(command) || /\bagent-yes(?:\.js)?\s+serve\b/.test(command) || /\bagent-yes\.js\s+serve\b/.test(command);
|
|
463
463
|
}
|
|
464
464
|
function parseStrayServeProcesses(psOutput, opts) {
|
|
465
465
|
const ignoredPids = new Set([opts.selfPid, opts.parentPid]);
|
|
@@ -1102,66 +1102,14 @@ async function bootstrapDaemonManager() {
|
|
|
1102
1102
|
function oxmgrCmd(argv) {
|
|
1103
1103
|
return argv.map((a) => /[\\\s"]/.test(a) ? `"${a.replace(/"/g, "\\\"")}"` : a).join(" ");
|
|
1104
1104
|
}
|
|
1105
|
-
/**
|
|
1106
|
-
* The argv a daemon manager runs for `ay serve …`. Pure so the contract is
|
|
1107
|
-
* testable: `which` is the `ay` on PATH (or null), `script` is THIS process's
|
|
1108
|
-
* own entry (`process.argv[1]`, always present), `realpath` resolves symlinks.
|
|
1109
|
-
*
|
|
1110
|
-
* Never bake in the `~/.bun/bin/ay` symlink: `bun add -g` removes and recreates
|
|
1111
|
-
* it on every upgrade, and some images ship without it until the first update
|
|
1112
|
-
* — a manager that stored it then restarts into ENOENT thousands of times.
|
|
1113
|
-
* Resolve to the real file instead, and when nothing is on PATH fall back to
|
|
1114
|
-
* the script running this very install (never a bare `ay`, which a manager's
|
|
1115
|
-
* minimal PATH cannot resolve). On POSIX the entry is a `#!/usr/bin/env bun`
|
|
1116
|
-
* script run via bun; on Windows it is a self-contained exe.
|
|
1117
|
-
*/
|
|
1118
|
-
function serveLauncher(opts) {
|
|
1119
|
-
const resolve = (p) => {
|
|
1120
|
-
try {
|
|
1121
|
-
return opts.realpath(p);
|
|
1122
|
-
} catch {
|
|
1123
|
-
return p;
|
|
1124
|
-
}
|
|
1125
|
-
};
|
|
1126
|
-
const entry = opts.which ? resolve(opts.which) : opts.script ? resolve(opts.script) : null;
|
|
1127
|
-
if (!entry) return ["ay"];
|
|
1128
|
-
if (opts.platform === "win32") return /\.(exe|cmd|bat)$/i.test(entry) ? [entry] : [opts.execPath, entry];
|
|
1129
|
-
return [opts.execPath, entry];
|
|
1130
|
-
}
|
|
1131
1105
|
function ayServeArgv(args) {
|
|
1106
|
+
const ayBin = Bun.which("ay");
|
|
1132
1107
|
return [
|
|
1133
|
-
...
|
|
1134
|
-
which: Bun.which("ay"),
|
|
1135
|
-
script: process.argv[1],
|
|
1136
|
-
execPath: process.execPath,
|
|
1137
|
-
platform: process.platform,
|
|
1138
|
-
realpath: realpathSync
|
|
1139
|
-
}),
|
|
1108
|
+
...ayBin ? process.platform === "win32" ? [ayBin] : [process.execPath, ayBin] : ["ay"],
|
|
1140
1109
|
"serve",
|
|
1141
1110
|
...args
|
|
1142
1111
|
];
|
|
1143
1112
|
}
|
|
1144
|
-
const LEGACY_AYRS_TASK = "com.snomiao.ayrs-serve";
|
|
1145
|
-
function legacyAyrsTaskArgv(step) {
|
|
1146
|
-
const base = [
|
|
1147
|
-
"schtasks",
|
|
1148
|
-
`/${step}`,
|
|
1149
|
-
"/tn",
|
|
1150
|
-
LEGACY_AYRS_TASK
|
|
1151
|
-
];
|
|
1152
|
-
return step === "query" ? [
|
|
1153
|
-
...base,
|
|
1154
|
-
"/fo",
|
|
1155
|
-
"LIST"
|
|
1156
|
-
] : step === "delete" ? [...base, "/f"] : base;
|
|
1157
|
-
}
|
|
1158
|
-
async function stopLegacyAyrsTask() {
|
|
1159
|
-
if (process.platform !== "win32") return;
|
|
1160
|
-
if (await spawnExit(legacyAyrsTaskArgv("query")) !== 0) return;
|
|
1161
|
-
process.stdout.write(`stopping legacy scheduled task '${LEGACY_AYRS_TASK}' (it would keep hosting the WebRTC room)\n`);
|
|
1162
|
-
await spawnExit(legacyAyrsTaskArgv("end"));
|
|
1163
|
-
await spawnExit(legacyAyrsTaskArgv("delete"));
|
|
1164
|
-
}
|
|
1165
1113
|
const WIN_RUN_KEY = "HKCU\\Software\\Microsoft\\Windows\\CurrentVersion\\Run";
|
|
1166
1114
|
const WIN_RUN_VALUE = DAEMON_NAME;
|
|
1167
1115
|
async function ensureBootAutostart(mgr) {
|
|
@@ -1342,11 +1290,6 @@ async function warnStrayServeProcesses() {
|
|
|
1342
1290
|
const pids = stray.map((p) => p.pid);
|
|
1343
1291
|
process.stderr.write(`warning: ${stray.length} unmanaged ay serve process(es) running (pid ${pids.join(", ")}) — they will fight the daemon for the WebRTC room; stop them: kill ${pids.join(" ")}\n`);
|
|
1344
1292
|
}
|
|
1345
|
-
async function daemonShareRuntime(args) {
|
|
1346
|
-
const { daemonShareRuntime: decide } = await import("./serveRust-BAawe83i.js");
|
|
1347
|
-
const { findAyrsBinary } = await import("./rustBinary-uxUTf8kp.js");
|
|
1348
|
-
return decide(args, () => !!findAyrsBinary());
|
|
1349
|
-
}
|
|
1350
1293
|
function explicitWebrtcUrl(args) {
|
|
1351
1294
|
for (let i = 0; i < args.length; i++) {
|
|
1352
1295
|
const a = args[i];
|
|
@@ -1458,7 +1401,6 @@ async function cmdServeDaemon(sub, args) {
|
|
|
1458
1401
|
}
|
|
1459
1402
|
}
|
|
1460
1403
|
if (removed === 0 && failed === 0) process.stdout.write(`no '${DAEMON_NAME}' daemon registered with any manager\n`);
|
|
1461
|
-
await stopLegacyAyrsTask();
|
|
1462
1404
|
await warnStrayServeProcesses();
|
|
1463
1405
|
return failed ? 1 : 0;
|
|
1464
1406
|
}
|
|
@@ -1480,25 +1422,19 @@ async function cmdServeDaemon(sub, args) {
|
|
|
1480
1422
|
const webrtcDaemon = effArgs.some((a) => a.startsWith("--webrtc") || a.startsWith("--share"));
|
|
1481
1423
|
let shareLink = null;
|
|
1482
1424
|
let shareLinkMinted = false;
|
|
1483
|
-
let roomFile = ".share-room";
|
|
1484
1425
|
if (webrtcDaemon) try {
|
|
1485
|
-
const { loadOrCreateShareRoom, shareLinkFromRoomUrl
|
|
1486
|
-
const runtime = await daemonShareRuntime(effArgs);
|
|
1487
|
-
roomFile = shareRoomFileName(runtime);
|
|
1426
|
+
const { loadOrCreateShareRoom, shareLinkFromRoomUrl } = await import("./share-Bmnd_qT0.js");
|
|
1488
1427
|
const explicit = explicitWebrtcUrl(effArgs);
|
|
1489
|
-
shareLink = shareLinkFromRoomUrl(explicit ?? await loadOrCreateShareRoom(
|
|
1428
|
+
shareLink = shareLinkFromRoomUrl(explicit ?? await loadOrCreateShareRoom());
|
|
1490
1429
|
shareLinkMinted = !explicit;
|
|
1491
1430
|
} catch {}
|
|
1492
1431
|
const emitShareLink = async () => {
|
|
1493
1432
|
if (!webrtcDaemon) return;
|
|
1494
1433
|
if (shareLink) {
|
|
1495
|
-
process.stdout.write(`\nshared over WebRTC — open this link (the token is eaten from the URL on open):\n ${shareLink}\n` + (shareLinkMinted ? ` (persistent room — same link across restarts; delete ~/.agent-yes
|
|
1434
|
+
process.stdout.write(`\nshared over WebRTC — open this link (the token is eaten from the URL on open):\n ${shareLink}\n` + (shareLinkMinted ? ` (persistent room — same link across restarts; delete ~/.agent-yes/.share-room to rotate)\n` : ``));
|
|
1496
1435
|
const { offerOpenInBrowser } = await import("./openBrowser-THOzOGNm.js");
|
|
1497
1436
|
await offerOpenInBrowser(shareLink);
|
|
1498
|
-
} else process.stdout.write(
|
|
1499
|
-
the WebRTC share link carries a secret, so the daemon does NOT log it —
|
|
1500
|
-
read it with \`ay share status\`. The room persists in
|
|
1501
|
-
~/.agent-yes/${roomFile}, so the link survives restarts.\n`);
|
|
1437
|
+
} else process.stdout.write("\nthe WebRTC share link carries a secret, so the daemon does NOT log it —\nread it from ~/.agent-yes/.share-link (mode 0600). The room persists in\n~/.agent-yes/.share-room, so the link survives restarts.\n");
|
|
1502
1438
|
};
|
|
1503
1439
|
if (priorArgs !== null) {
|
|
1504
1440
|
const sameConfig = JSON.stringify(effArgs) === JSON.stringify(priorArgs);
|
|
@@ -1521,7 +1457,6 @@ read it with \`ay share status\`. The room persists in
|
|
|
1521
1457
|
DAEMON_NAME
|
|
1522
1458
|
]);
|
|
1523
1459
|
}
|
|
1524
|
-
await stopLegacyAyrsTask();
|
|
1525
1460
|
await warnStrayServeProcesses();
|
|
1526
1461
|
const serveArgv = ayServeArgv(effArgs);
|
|
1527
1462
|
const spawnHidden = findSpawnHiddenLauncher();
|
|
@@ -1639,10 +1574,9 @@ async function cmdServeStatus(args) {
|
|
|
1639
1574
|
const json = args.includes("--json");
|
|
1640
1575
|
const mgr = await resolveActiveManager();
|
|
1641
1576
|
const token = await loadTokenReadOnly();
|
|
1577
|
+
const shareLink = await readShareLink();
|
|
1642
1578
|
const daemonArgs = mgr ? await readDaemonServeArgs(mgr) : null;
|
|
1643
1579
|
const installed = daemonArgs !== null;
|
|
1644
|
-
const { daemonShareLink } = await import("./shareCmd-CvDyiBN_.js");
|
|
1645
|
-
const shareLink = (installed ? await daemonShareLink(daemonArgs) : null) ?? await readShareLink();
|
|
1646
1580
|
const running = installed ? await readDaemonRunning(mgr) : false;
|
|
1647
1581
|
const a = daemonArgs ?? [];
|
|
1648
1582
|
const local = argsUsePortless(a);
|
|
@@ -1747,9 +1681,8 @@ Modes (default: --http):
|
|
|
1747
1681
|
agent-yes.com, or pass a room link to join that room:
|
|
1748
1682
|
https://agent-yes.com/room/#room=<id>&s=e1.<secret>).
|
|
1749
1683
|
Alone it needs NO port — combine with --http for both.
|
|
1750
|
-
The minted room persists in ~/.agent-yes/.share-room
|
|
1751
|
-
(
|
|
1752
|
-
delete the file to rotate.
|
|
1684
|
+
The minted room persists in ~/.agent-yes/.share-room
|
|
1685
|
+
(stable link across restarts; delete the file to rotate).
|
|
1753
1686
|
--share [URL] Legacy alias for --http --webrtc
|
|
1754
1687
|
|
|
1755
1688
|
Runtime: like \`ay <cli>\`, the Rust daemon (ayrs serve) runs by default for
|
|
@@ -1768,10 +1701,10 @@ Options:
|
|
|
1768
1701
|
return 0;
|
|
1769
1702
|
}
|
|
1770
1703
|
{
|
|
1771
|
-
const { planRustServe } = await import("./serveRust-
|
|
1704
|
+
const { planRustServe } = await import("./serveRust-DDQiZmMf.js");
|
|
1772
1705
|
const plan = planRustServe(rest);
|
|
1773
1706
|
if (plan.kind === "rust") {
|
|
1774
|
-
const { findAyrsBinary } = await import("./rustBinary-
|
|
1707
|
+
const { findAyrsBinary } = await import("./rustBinary-BNmAJEBb.js");
|
|
1775
1708
|
const ayrs = findAyrsBinary();
|
|
1776
1709
|
if (ayrs) return runAyrsServe(ayrs, plan.argv);
|
|
1777
1710
|
process.stderr.write("ay serve: ayrs binary not found — running the TypeScript server (bun run build:rs, or reinstall, to get the Rust daemon)\n");
|
|
@@ -2746,7 +2679,7 @@ Options:
|
|
|
2746
2679
|
}
|
|
2747
2680
|
});
|
|
2748
2681
|
if (req.method === "GET" && p === "/api/ws") {
|
|
2749
|
-
const ws = await import("./ws-
|
|
2682
|
+
const ws = await import("./ws-DnBg8-g-.js");
|
|
2750
2683
|
try {
|
|
2751
2684
|
await ws.loadProvision();
|
|
2752
2685
|
} catch (e) {
|
|
@@ -2766,7 +2699,7 @@ Options:
|
|
|
2766
2699
|
if (req.method === "GET" && p === "/api/ws/status") {
|
|
2767
2700
|
const dirRaw = url.searchParams.get("path");
|
|
2768
2701
|
if (!dirRaw) return new Response("missing ?path=<workspace dir>", { status: 400 });
|
|
2769
|
-
const ws = await import("./ws-
|
|
2702
|
+
const ws = await import("./ws-DnBg8-g-.js");
|
|
2770
2703
|
let prov;
|
|
2771
2704
|
try {
|
|
2772
2705
|
prov = await ws.loadProvision();
|
|
@@ -2788,7 +2721,7 @@ Options:
|
|
|
2788
2721
|
}
|
|
2789
2722
|
}
|
|
2790
2723
|
if (req.method === "GET" && p === "/api/ws/repos") {
|
|
2791
|
-
const ws = await import("./ws-
|
|
2724
|
+
const ws = await import("./ws-DnBg8-g-.js");
|
|
2792
2725
|
try {
|
|
2793
2726
|
await ws.loadProvision();
|
|
2794
2727
|
} catch (e) {
|
|
@@ -2869,7 +2802,7 @@ Options:
|
|
|
2869
2802
|
const m = /^([A-Za-z0-9_.-]+)\/([A-Za-z0-9_.-]+)$/.exec(repoParam);
|
|
2870
2803
|
if (!m || m[1] === "." || m[1] === ".." || m[2] === "." || m[2] === "..") return new Response("missing/invalid ?repo=<owner>/<repo>", { status: 400 });
|
|
2871
2804
|
const [, owner, repo] = m;
|
|
2872
|
-
const ws = await import("./ws-
|
|
2805
|
+
const ws = await import("./ws-DnBg8-g-.js");
|
|
2873
2806
|
let prov;
|
|
2874
2807
|
try {
|
|
2875
2808
|
prov = await ws.loadProvision();
|
|
@@ -3787,7 +3720,7 @@ Options:
|
|
|
3787
3720
|
const perm = body.perm ?? "r";
|
|
3788
3721
|
if (perm !== "r" && perm !== "rw") return new Response(`invalid perm ${perm} (want r or rw)`, { status: 400 });
|
|
3789
3722
|
try {
|
|
3790
|
-
const { createScopedShare } = await import("./agentShare-
|
|
3723
|
+
const { createScopedShare } = await import("./agentShare-NkW0b0mg.js");
|
|
3791
3724
|
const share = await createScopedShare({
|
|
3792
3725
|
agent: body.agent,
|
|
3793
3726
|
perm,
|
|
@@ -3802,12 +3735,12 @@ Options:
|
|
|
3802
3735
|
}
|
|
3803
3736
|
}
|
|
3804
3737
|
if (req.method === "GET" && p === "/api/shares") {
|
|
3805
|
-
const { listShares } = await import("./agentShare-
|
|
3738
|
+
const { listShares } = await import("./agentShare-NkW0b0mg.js");
|
|
3806
3739
|
return Response.json(listShares());
|
|
3807
3740
|
}
|
|
3808
3741
|
const revokeM = /^\/api\/share\/([^/]+)$/.exec(p);
|
|
3809
3742
|
if (req.method === "DELETE" && revokeM) {
|
|
3810
|
-
const { revokeShare } = await import("./agentShare-
|
|
3743
|
+
const { revokeShare } = await import("./agentShare-NkW0b0mg.js");
|
|
3811
3744
|
const ok = revokeShare(decodeURIComponent(revokeM[1]));
|
|
3812
3745
|
return new Response(ok ? "revoked" : "no such share", { status: ok ? 200 : 404 });
|
|
3813
3746
|
}
|
|
@@ -4069,7 +4002,7 @@ Options:
|
|
|
4069
4002
|
if (wantWebrtc) {
|
|
4070
4003
|
const explicitUrl = explicitRoomUrl;
|
|
4071
4004
|
try {
|
|
4072
|
-
const { startShare, loadOrCreateShareRoom } = await import("./share-
|
|
4005
|
+
const { startShare, loadOrCreateShareRoom } = await import("./share-Bmnd_qT0.js");
|
|
4073
4006
|
const linkFile = path.join(process.env.AGENT_YES_HOME ?? path.join(homedir(), ".agent-yes"), ".share-link");
|
|
4074
4007
|
const announce = async (room, link, joinLink, rotated) => {
|
|
4075
4008
|
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)";
|
|
@@ -4119,7 +4052,7 @@ Options:
|
|
|
4119
4052
|
const shutdown = (resolve) => {
|
|
4120
4053
|
if (heartbeat) clearInterval(heartbeat);
|
|
4121
4054
|
closeShare?.();
|
|
4122
|
-
import("./agentShare-
|
|
4055
|
+
import("./agentShare-NkW0b0mg.js").then((m) => m.revokeAllShares()).catch(() => {});
|
|
4123
4056
|
server?.stop();
|
|
4124
4057
|
Promise.resolve(releaseHostLock?.()).catch(() => {}).then(resolve);
|
|
4125
4058
|
};
|
|
@@ -4132,4 +4065,4 @@ Options:
|
|
|
4132
4065
|
|
|
4133
4066
|
//#endregion
|
|
4134
4067
|
export { cmdServe, inspectServeDaemon, loadTokenReadOnly, mintScopedTermToken, resolveDaemonHttpBase, resolveLocalServeUrl };
|
|
4135
|
-
//# sourceMappingURL=serve-
|
|
4068
|
+
//# sourceMappingURL=serve-DVoYVgBo.js.map
|