agent-yes 1.300.2 → 1.300.3-beta.773.1
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-BZlaxyEH.js → SUPPORTED_CLIS-Bwm91tBB.js} +2 -2
- package/dist/{SUPPORTED_CLIS-BAeTuI-p.js → SUPPORTED_CLIS-C-mphtYE.js} +3 -3
- package/dist/{agentShare-DGQM24wU.js → agentShare-D3bccnzk.js} +4 -4
- package/dist/{callback-3RsdcuV0.js → callback-Cmb5kBjN.js} +3 -3
- package/dist/{callback-CQadU_zP.js → callback-CyLfircS.js} +3 -3
- package/dist/{channels-aYwLMbFV.js → channels-rhxQArqN.js} +2 -2
- package/dist/cli.js +5 -5
- package/dist/{cmdPs-CQxFAs9M.js → cmdPs-DNYZt8Ic.js} +3 -3
- package/dist/index.js +2 -2
- package/dist/{notifyDaemon-CxkiJvOo.js → notifyDaemon-NBtbwPD9.js} +3 -3
- package/dist/{parentPingLoop-vZ8I9k5K.js → parentPingLoop-DF23VTg_.js} +2 -2
- package/dist/{remotes-B4v0Nowo.js → remotes-B4CNXwDS.js} +2 -2
- package/dist/{remotes-DnMQWaqQ.js → remotes-CQTEY8Gt.js} +1 -1
- package/dist/{rustBinary-B1buVId2.js → rustBinary-Dtxlg_EB.js} +48 -5
- package/dist/rustBinary-uxUTf8kp.js +4 -0
- package/dist/{schedule-CMBHLSlz.js → schedule-Dej5OkTj.js} +4 -4
- package/dist/{serve-D5ijYGTv.js → serve-BeHvVrRB.js} +99 -32
- package/dist/{serveRust-DDQiZmMf.js → serveRust-BAawe83i.js} +16 -2
- package/dist/{setup-DMJYufvD.js → setup-CFH2VcZd.js} +2 -2
- package/dist/{share-C9oGvjXT.js → share-CLataFnI.js} +18 -12
- package/dist/share-nmgSIjYP.js +4 -0
- package/dist/{shareCmd-CNhCKuOK.js → shareCmd-CvDyiBN_.js} +25 -7
- package/dist/{subcommands-BncoxUN6.js → subcommands-D134VWB9.js} +496 -94
- package/dist/subcommands-DWOgH-wf.js +13 -0
- package/dist/{terminal-DzbPI4n0.js → terminal-B_tEnevY.js} +2 -2
- package/dist/trayApp-B32MpiA4.js +5 -0
- package/dist/{trayApp-BvtgbxMB.js → trayApp-BaH6X5sV.js} +2 -2
- package/dist/{ts-Gr1eJOUk.js → ts-B-Oi_NbZ.js} +5 -5
- package/dist/{versionChecker-BrjeGNf1.js → versionChecker-Dgj528rp.js} +2 -2
- package/dist/{webrtcRemote-Cd4vTrgv.js → webrtcRemote-Cy5kB8aR.js} +115 -14
- package/dist/{widget-p4Db_OXd.js → widget-0_Soh-kR.js} +3 -3
- package/dist/{ws-D_QClddd.js → ws-JA_st1Px.js} +3 -3
- package/dist/{ws-DnKPi3TS.js → ws-ra9hOj5i.js} +2 -2
- package/package.json +1 -1
- package/ts/composerGuard.spec.ts +34 -0
- package/ts/composerGuard.ts +38 -1
- package/ts/remoteCache.bun.spec.ts +191 -0
- package/ts/remoteCache.spec.ts +191 -0
- package/ts/remoteCache.ts +193 -0
- package/ts/rustBinary.bun.spec.ts +39 -2
- package/ts/rustBinary.spec.ts +53 -2
- package/ts/rustBinary.ts +61 -3
- package/ts/serve.spec.ts +103 -0
- package/ts/serve.ts +100 -15
- package/ts/serveRust.spec.ts +24 -1
- package/ts/serveRust.ts +19 -0
- package/ts/share.bun.spec.ts +54 -2
- package/ts/share.spec.ts +54 -2
- package/ts/share.ts +40 -15
- package/ts/shareCmd.ts +33 -2
- package/ts/strayServe.ts +1 -0
- package/ts/subcommands.spec.ts +95 -1
- package/ts/subcommands.ts +413 -107
- package/ts/webrtcRemote.ts +66 -20
- package/ts/webrtcSignal.bun.spec.ts +120 -0
- package/ts/webrtcSignal.spec.ts +120 -0
- package/ts/webrtcSignal.ts +143 -0
- package/dist/rustBinary-etb0Jsga.js +0 -4
- package/dist/share-Bmnd_qT0.js +0 -4
- package/dist/subcommands-ZEjbTV_7.js +0 -13
- package/dist/trayApp-CpPsP3_a.js +0 -5
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { t as CLIS_CONFIG } from "./ts-
|
|
1
|
+
import { t as CLIS_CONFIG } from "./ts-B-Oi_NbZ.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-Bwm91tBB.js.map
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import "./logger-CDIsZ-Pp.js";
|
|
2
|
-
import "./versionChecker-
|
|
3
|
-
import "./ts-
|
|
2
|
+
import "./versionChecker-Dgj528rp.js";
|
|
3
|
+
import "./ts-B-Oi_NbZ.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-Bwm91tBB.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 {
|
|
8
|
+
import { nt as resolveOne } from "./subcommands-D134VWB9.js";
|
|
9
9
|
import "./notifyStore-2SWKGwZI.js";
|
|
10
10
|
import "./webrtcLink-DFRyWNMs.js";
|
|
11
|
-
import "./remotes-
|
|
12
|
-
import {
|
|
11
|
+
import "./remotes-B4CNXwDS.js";
|
|
12
|
+
import { l as startShare } from "./share-CLataFnI.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-D3bccnzk.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-D134VWB9.js";
|
|
9
9
|
import "./notifyStore-2SWKGwZI.js";
|
|
10
10
|
import "./webrtcLink-DFRyWNMs.js";
|
|
11
|
-
import "./remotes-
|
|
11
|
+
import "./remotes-B4CNXwDS.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-CyLfircS.js";
|
|
14
14
|
|
|
15
15
|
export { cmdCallback };
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { t as agentYesHome } from "./agentYesHome-BNtn19J4.js";
|
|
2
|
-
import {
|
|
2
|
+
import { nt as resolveOne } from "./subcommands-D134VWB9.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-BeHvVrRB.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-CyLfircS.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-nmgSIjYP.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-rhxQArqN.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-Dgj528rp.js";
|
|
5
|
+
import { p as getRustBinary } from "./rustBinary-Dtxlg_EB.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-DWOgH-wf.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-C-mphtYE.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-C-mphtYE.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 {
|
|
8
|
+
import { V as listRecords, bt as flattenForest, v as deriveLiveState, yt as buildAgentForest } from "./subcommands-D134VWB9.js";
|
|
9
9
|
import "./notifyStore-2SWKGwZI.js";
|
|
10
10
|
import "./webrtcLink-DFRyWNMs.js";
|
|
11
|
-
import "./remotes-
|
|
11
|
+
import "./remotes-B4CNXwDS.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-DNYZt8Ic.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-Dgj528rp.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-B-Oi_NbZ.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 {
|
|
8
|
+
import { $ as renderLogTailLines, N as isPidAlive, V as listRecords, v as deriveLiveState } from "./subcommands-D134VWB9.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-B4CNXwDS.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-NBtbwPD9.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-DWOgH-wf.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-DF23VTg_.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-Cy5kB8aR.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-B4CNXwDS.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-B4CNXwDS.js";
|
|
4
4
|
|
|
5
5
|
export { cmdConnect, cmdRemote };
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { i as getInstalledPackage, n as compareVersions } from "./versionChecker-
|
|
1
|
+
import { i as getInstalledPackage, n as compareVersions } from "./versionChecker-Dgj528rp.js";
|
|
2
2
|
import { execFileSync } from "child_process";
|
|
3
|
-
import { existsSync, mkdirSync, readdirSync, rmSync, statSync, unlinkSync } from "fs";
|
|
3
|
+
import { accessSync, chmodSync, constants, 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,7 +172,49 @@ 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 p;
|
|
175
|
+
for (const p of searchPaths) if (p && existsSync(p)) return ensureExecutable(p);
|
|
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;
|
|
176
218
|
}
|
|
177
219
|
/**
|
|
178
220
|
* Get GitHub release download URL for the binary
|
|
@@ -248,6 +290,7 @@ async function downloadBinary(verbose = false) {
|
|
|
248
290
|
try {
|
|
249
291
|
unlinkSync(tarPath);
|
|
250
292
|
} catch {}
|
|
293
|
+
await chmodExtractedBinaries(binDir);
|
|
251
294
|
await chmod(binaryPath, 493);
|
|
252
295
|
}
|
|
253
296
|
if (verbose) console.log(`[rust] Binary downloaded to: ${binaryPath}`);
|
|
@@ -370,5 +413,5 @@ async function getRustBinary(options = {}) {
|
|
|
370
413
|
}
|
|
371
414
|
|
|
372
415
|
//#endregion
|
|
373
|
-
export {
|
|
374
|
-
//# sourceMappingURL=rustBinary-
|
|
416
|
+
export { findAyrsBinary as a, findTrayLauncher as c, getBinaryName as d, getDownloadUrl as f, ensureExecutable as i, gcOldBinaryDirs as l, hasValidMacSignature as m, devBuildInfo as n, findRustBinary as o, getRustBinary as p, downloadBinary as r, findSpawnHiddenLauncher as s, chmodExtractedBinaries as t, getBinDir as u };
|
|
417
|
+
//# sourceMappingURL=rustBinary-Dtxlg_EB.js.map
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import "./versionChecker-Dgj528rp.js";
|
|
2
|
+
import { a as findAyrsBinary, c as findTrayLauncher, d as getBinaryName, f as getDownloadUrl, i as ensureExecutable, l as gcOldBinaryDirs, m as hasValidMacSignature, n as devBuildInfo, o as findRustBinary, p as getRustBinary, r as downloadBinary, s as findSpawnHiddenLauncher, t as chmodExtractedBinaries, u as getBinDir } from "./rustBinary-Dtxlg_EB.js";
|
|
3
|
+
|
|
4
|
+
export { findAyrsBinary, gcOldBinaryDirs };
|
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
import "./logger-CDIsZ-Pp.js";
|
|
2
|
-
import "./versionChecker-
|
|
3
|
-
import "./ts-
|
|
2
|
+
import "./versionChecker-Dgj528rp.js";
|
|
3
|
+
import "./ts-B-Oi_NbZ.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-Bwm91tBB.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-Dej5OkTj.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-Dgj528rp.js";
|
|
3
|
+
import { s as findSpawnHiddenLauncher } from "./rustBinary-Dtxlg_EB.js";
|
|
4
|
+
import { c as permissionBadge, i as answerAsk, o as listAsks, u as CLAUDE_SESSION_PIN_ENV } from "./ts-B-Oi_NbZ.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
|
|
15
|
+
import { t as SUPPORTED_CLIS } from "./SUPPORTED_CLIS-Bwm91tBB.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-D134VWB9.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-B4CNXwDS.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-CyLfircS.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-ra9hOj5i.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-BaH6X5sV.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, renameSync, watch, writeFileSync } from "node:fs";
|
|
33
|
+
import { existsSync, realpathSync, 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) || /\bagent-yes(?:\.js)?\s+serve\b/.test(command) || /\bagent-yes\.js\s+serve\b/.test(command);
|
|
462
|
+
return /\bay(?:\.js)?\s+serve\b/.test(command) || /\bayrs(?:\.exe)?\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,14 +1102,66 @@ 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
|
+
}
|
|
1105
1131
|
function ayServeArgv(args) {
|
|
1106
|
-
const ayBin = Bun.which("ay");
|
|
1107
1132
|
return [
|
|
1108
|
-
...
|
|
1133
|
+
...serveLauncher({
|
|
1134
|
+
which: Bun.which("ay"),
|
|
1135
|
+
script: process.argv[1],
|
|
1136
|
+
execPath: process.execPath,
|
|
1137
|
+
platform: process.platform,
|
|
1138
|
+
realpath: realpathSync
|
|
1139
|
+
}),
|
|
1109
1140
|
"serve",
|
|
1110
1141
|
...args
|
|
1111
1142
|
];
|
|
1112
1143
|
}
|
|
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
|
+
}
|
|
1113
1165
|
const WIN_RUN_KEY = "HKCU\\Software\\Microsoft\\Windows\\CurrentVersion\\Run";
|
|
1114
1166
|
const WIN_RUN_VALUE = DAEMON_NAME;
|
|
1115
1167
|
async function ensureBootAutostart(mgr) {
|
|
@@ -1290,6 +1342,11 @@ async function warnStrayServeProcesses() {
|
|
|
1290
1342
|
const pids = stray.map((p) => p.pid);
|
|
1291
1343
|
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`);
|
|
1292
1344
|
}
|
|
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
|
+
}
|
|
1293
1350
|
function explicitWebrtcUrl(args) {
|
|
1294
1351
|
for (let i = 0; i < args.length; i++) {
|
|
1295
1352
|
const a = args[i];
|
|
@@ -1401,6 +1458,7 @@ async function cmdServeDaemon(sub, args) {
|
|
|
1401
1458
|
}
|
|
1402
1459
|
}
|
|
1403
1460
|
if (removed === 0 && failed === 0) process.stdout.write(`no '${DAEMON_NAME}' daemon registered with any manager\n`);
|
|
1461
|
+
await stopLegacyAyrsTask();
|
|
1404
1462
|
await warnStrayServeProcesses();
|
|
1405
1463
|
return failed ? 1 : 0;
|
|
1406
1464
|
}
|
|
@@ -1422,19 +1480,25 @@ async function cmdServeDaemon(sub, args) {
|
|
|
1422
1480
|
const webrtcDaemon = effArgs.some((a) => a.startsWith("--webrtc") || a.startsWith("--share"));
|
|
1423
1481
|
let shareLink = null;
|
|
1424
1482
|
let shareLinkMinted = false;
|
|
1483
|
+
let roomFile = ".share-room";
|
|
1425
1484
|
if (webrtcDaemon) try {
|
|
1426
|
-
const { loadOrCreateShareRoom, shareLinkFromRoomUrl } = await import("./share-
|
|
1485
|
+
const { loadOrCreateShareRoom, shareLinkFromRoomUrl, shareRoomFileName } = await import("./share-nmgSIjYP.js");
|
|
1486
|
+
const runtime = await daemonShareRuntime(effArgs);
|
|
1487
|
+
roomFile = shareRoomFileName(runtime);
|
|
1427
1488
|
const explicit = explicitWebrtcUrl(effArgs);
|
|
1428
|
-
shareLink = shareLinkFromRoomUrl(explicit ?? await loadOrCreateShareRoom());
|
|
1489
|
+
shareLink = shareLinkFromRoomUrl(explicit ?? await loadOrCreateShareRoom(void 0, runtime));
|
|
1429
1490
|
shareLinkMinted = !explicit;
|
|
1430
1491
|
} catch {}
|
|
1431
1492
|
const emitShareLink = async () => {
|
|
1432
1493
|
if (!webrtcDaemon) return;
|
|
1433
1494
|
if (shareLink) {
|
|
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
|
|
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/${roomFile} to rotate)\n` : ``));
|
|
1435
1496
|
const { offerOpenInBrowser } = await import("./openBrowser-THOzOGNm.js");
|
|
1436
1497
|
await offerOpenInBrowser(shareLink);
|
|
1437
|
-
} else process.stdout.write(
|
|
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`);
|
|
1438
1502
|
};
|
|
1439
1503
|
if (priorArgs !== null) {
|
|
1440
1504
|
const sameConfig = JSON.stringify(effArgs) === JSON.stringify(priorArgs);
|
|
@@ -1457,6 +1521,7 @@ async function cmdServeDaemon(sub, args) {
|
|
|
1457
1521
|
DAEMON_NAME
|
|
1458
1522
|
]);
|
|
1459
1523
|
}
|
|
1524
|
+
await stopLegacyAyrsTask();
|
|
1460
1525
|
await warnStrayServeProcesses();
|
|
1461
1526
|
const serveArgv = ayServeArgv(effArgs);
|
|
1462
1527
|
const spawnHidden = findSpawnHiddenLauncher();
|
|
@@ -1574,9 +1639,10 @@ async function cmdServeStatus(args) {
|
|
|
1574
1639
|
const json = args.includes("--json");
|
|
1575
1640
|
const mgr = await resolveActiveManager();
|
|
1576
1641
|
const token = await loadTokenReadOnly();
|
|
1577
|
-
const shareLink = await readShareLink();
|
|
1578
1642
|
const daemonArgs = mgr ? await readDaemonServeArgs(mgr) : null;
|
|
1579
1643
|
const installed = daemonArgs !== null;
|
|
1644
|
+
const { daemonShareLink } = await import("./shareCmd-CvDyiBN_.js");
|
|
1645
|
+
const shareLink = (installed ? await daemonShareLink(daemonArgs) : null) ?? await readShareLink();
|
|
1580
1646
|
const running = installed ? await readDaemonRunning(mgr) : false;
|
|
1581
1647
|
const a = daemonArgs ?? [];
|
|
1582
1648
|
const local = argsUsePortless(a);
|
|
@@ -1681,8 +1747,9 @@ Modes (default: --http):
|
|
|
1681
1747
|
agent-yes.com, or pass a room link to join that room:
|
|
1682
1748
|
https://agent-yes.com/room/#room=<id>&s=e1.<secret>).
|
|
1683
1749
|
Alone it needs NO port — combine with --http for both.
|
|
1684
|
-
The minted room persists in ~/.agent-yes/.share-room
|
|
1685
|
-
(stable link across restarts
|
|
1750
|
+
The minted room persists in ~/.agent-yes/.share-room-ayrs
|
|
1751
|
+
(.share-room under --no-rust); stable link across restarts,
|
|
1752
|
+
delete the file to rotate.
|
|
1686
1753
|
--share [URL] Legacy alias for --http --webrtc
|
|
1687
1754
|
|
|
1688
1755
|
Runtime: like \`ay <cli>\`, the Rust daemon (ayrs serve) runs by default for
|
|
@@ -1701,10 +1768,10 @@ Options:
|
|
|
1701
1768
|
return 0;
|
|
1702
1769
|
}
|
|
1703
1770
|
{
|
|
1704
|
-
const { planRustServe } = await import("./serveRust-
|
|
1771
|
+
const { planRustServe } = await import("./serveRust-BAawe83i.js");
|
|
1705
1772
|
const plan = planRustServe(rest);
|
|
1706
1773
|
if (plan.kind === "rust") {
|
|
1707
|
-
const { findAyrsBinary } = await import("./rustBinary-
|
|
1774
|
+
const { findAyrsBinary } = await import("./rustBinary-uxUTf8kp.js");
|
|
1708
1775
|
const ayrs = findAyrsBinary();
|
|
1709
1776
|
if (ayrs) return runAyrsServe(ayrs, plan.argv);
|
|
1710
1777
|
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");
|
|
@@ -2679,7 +2746,7 @@ Options:
|
|
|
2679
2746
|
}
|
|
2680
2747
|
});
|
|
2681
2748
|
if (req.method === "GET" && p === "/api/ws") {
|
|
2682
|
-
const ws = await import("./ws-
|
|
2749
|
+
const ws = await import("./ws-JA_st1Px.js");
|
|
2683
2750
|
try {
|
|
2684
2751
|
await ws.loadProvision();
|
|
2685
2752
|
} catch (e) {
|
|
@@ -2699,7 +2766,7 @@ Options:
|
|
|
2699
2766
|
if (req.method === "GET" && p === "/api/ws/status") {
|
|
2700
2767
|
const dirRaw = url.searchParams.get("path");
|
|
2701
2768
|
if (!dirRaw) return new Response("missing ?path=<workspace dir>", { status: 400 });
|
|
2702
|
-
const ws = await import("./ws-
|
|
2769
|
+
const ws = await import("./ws-JA_st1Px.js");
|
|
2703
2770
|
let prov;
|
|
2704
2771
|
try {
|
|
2705
2772
|
prov = await ws.loadProvision();
|
|
@@ -2721,7 +2788,7 @@ Options:
|
|
|
2721
2788
|
}
|
|
2722
2789
|
}
|
|
2723
2790
|
if (req.method === "GET" && p === "/api/ws/repos") {
|
|
2724
|
-
const ws = await import("./ws-
|
|
2791
|
+
const ws = await import("./ws-JA_st1Px.js");
|
|
2725
2792
|
try {
|
|
2726
2793
|
await ws.loadProvision();
|
|
2727
2794
|
} catch (e) {
|
|
@@ -2802,7 +2869,7 @@ Options:
|
|
|
2802
2869
|
const m = /^([A-Za-z0-9_.-]+)\/([A-Za-z0-9_.-]+)$/.exec(repoParam);
|
|
2803
2870
|
if (!m || m[1] === "." || m[1] === ".." || m[2] === "." || m[2] === "..") return new Response("missing/invalid ?repo=<owner>/<repo>", { status: 400 });
|
|
2804
2871
|
const [, owner, repo] = m;
|
|
2805
|
-
const ws = await import("./ws-
|
|
2872
|
+
const ws = await import("./ws-JA_st1Px.js");
|
|
2806
2873
|
let prov;
|
|
2807
2874
|
try {
|
|
2808
2875
|
prov = await ws.loadProvision();
|
|
@@ -3720,7 +3787,7 @@ Options:
|
|
|
3720
3787
|
const perm = body.perm ?? "r";
|
|
3721
3788
|
if (perm !== "r" && perm !== "rw") return new Response(`invalid perm ${perm} (want r or rw)`, { status: 400 });
|
|
3722
3789
|
try {
|
|
3723
|
-
const { createScopedShare } = await import("./agentShare-
|
|
3790
|
+
const { createScopedShare } = await import("./agentShare-D3bccnzk.js");
|
|
3724
3791
|
const share = await createScopedShare({
|
|
3725
3792
|
agent: body.agent,
|
|
3726
3793
|
perm,
|
|
@@ -3735,12 +3802,12 @@ Options:
|
|
|
3735
3802
|
}
|
|
3736
3803
|
}
|
|
3737
3804
|
if (req.method === "GET" && p === "/api/shares") {
|
|
3738
|
-
const { listShares } = await import("./agentShare-
|
|
3805
|
+
const { listShares } = await import("./agentShare-D3bccnzk.js");
|
|
3739
3806
|
return Response.json(listShares());
|
|
3740
3807
|
}
|
|
3741
3808
|
const revokeM = /^\/api\/share\/([^/]+)$/.exec(p);
|
|
3742
3809
|
if (req.method === "DELETE" && revokeM) {
|
|
3743
|
-
const { revokeShare } = await import("./agentShare-
|
|
3810
|
+
const { revokeShare } = await import("./agentShare-D3bccnzk.js");
|
|
3744
3811
|
const ok = revokeShare(decodeURIComponent(revokeM[1]));
|
|
3745
3812
|
return new Response(ok ? "revoked" : "no such share", { status: ok ? 200 : 404 });
|
|
3746
3813
|
}
|
|
@@ -4002,7 +4069,7 @@ Options:
|
|
|
4002
4069
|
if (wantWebrtc) {
|
|
4003
4070
|
const explicitUrl = explicitRoomUrl;
|
|
4004
4071
|
try {
|
|
4005
|
-
const { startShare, loadOrCreateShareRoom } = await import("./share-
|
|
4072
|
+
const { startShare, loadOrCreateShareRoom } = await import("./share-nmgSIjYP.js");
|
|
4006
4073
|
const linkFile = path.join(process.env.AGENT_YES_HOME ?? path.join(homedir(), ".agent-yes"), ".share-link");
|
|
4007
4074
|
const announce = async (room, link, joinLink, rotated) => {
|
|
4008
4075
|
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)";
|
|
@@ -4052,7 +4119,7 @@ Options:
|
|
|
4052
4119
|
const shutdown = (resolve) => {
|
|
4053
4120
|
if (heartbeat) clearInterval(heartbeat);
|
|
4054
4121
|
closeShare?.();
|
|
4055
|
-
import("./agentShare-
|
|
4122
|
+
import("./agentShare-D3bccnzk.js").then((m) => m.revokeAllShares()).catch(() => {});
|
|
4056
4123
|
server?.stop();
|
|
4057
4124
|
Promise.resolve(releaseHostLock?.()).catch(() => {}).then(resolve);
|
|
4058
4125
|
};
|
|
@@ -4065,4 +4132,4 @@ Options:
|
|
|
4065
4132
|
|
|
4066
4133
|
//#endregion
|
|
4067
4134
|
export { cmdServe, inspectServeDaemon, loadTokenReadOnly, mintScopedTermToken, resolveDaemonHttpBase, resolveLocalServeUrl };
|
|
4068
|
-
//# sourceMappingURL=serve-
|
|
4135
|
+
//# sourceMappingURL=serve-BeHvVrRB.js.map
|