agent-yes 1.292.0 → 1.293.0-beta.748.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/README.md +2 -0
- package/dist/{SUPPORTED_CLIS-BfM59Xpj.js → SUPPORTED_CLIS-B3WUOdLK.js} +2 -2
- package/dist/{SUPPORTED_CLIS-BDLK4Ezp.js → SUPPORTED_CLIS-DCn4Zj9h.js} +3 -3
- package/dist/{agentShare-BU4Mkg55.js → agentShare-DMdNorDu.js} +3 -3
- package/dist/{callback-7gzaW-65.js → callback-0m1I1qMq.js} +3 -3
- package/dist/{callback-Bw5PmAIq.js → callback-DBuvXeda.js} +3 -3
- package/dist/cli.js +7 -7
- package/dist/{cmdPs-DHYXWzXx.js → cmdPs-Dw7r3p1V.js} +3 -3
- package/dist/index.js +2 -2
- package/dist/{notifyDaemon-DLqQeAti.js → notifyDaemon-34ECYio9.js} +3 -3
- package/dist/{parentPingLoop-H6V7_qIA.js → parentPingLoop-BV9EPkYK.js} +2 -2
- package/dist/{remotes-tmKwrr20.js → remotes-5P__pAXA.js} +2 -2
- package/dist/{remotes-wPL0JtBs.js → remotes-CY69MeQB.js} +1 -1
- package/dist/rustBinary-B_Aqd4wh.js +4 -0
- package/dist/{rustBinary-CK3xoBVr.js → rustBinary-CjLiUlcX.js} +21 -3
- package/dist/{schedule-CVeX3FUy.js → schedule-DX14RwYY.js} +4 -4
- package/dist/{serve-Cek2eJS-.js → serve-jM8Rq3tl.js} +64 -20
- package/dist/serveRust-DDQiZmMf.js +127 -0
- package/dist/{setup-ERJSELGI.js → setup-BOo4UeaW.js} +3 -3
- package/dist/{subcommands-CSAgQgag.js → subcommands-CljAQU0G.js} +2 -2
- package/dist/{subcommands-O-CiI-D5.js → subcommands-DJ0RybMo.js} +19 -19
- package/dist/{systemPathLink-BVdk48Vz.js → systemPathLink-VV-Vm6y2.js} +1 -1
- package/dist/{terminal-CPxIAJy_.js → terminal-CXxGvYWI.js} +2 -2
- package/dist/{todoCli-DSQXAcwA.js → todoCli-BDttv8mk.js} +1 -1
- package/dist/{tray-CIt9mCKZ.js → tray-DWWsVS7Y.js} +1 -1
- package/dist/{trayApp-xQpwYUxK.js → trayApp-DDnRooNR.js} +2 -2
- package/dist/trayApp-DG4FnrI1.js +5 -0
- package/dist/{ts--tcZ9vtp.js → ts-IWyw89k_.js} +3 -3
- package/dist/{versionChecker-CLOLbs5d.js → versionChecker-BlucewMa.js} +2 -2
- package/dist/{webrtcRemote-yvMYsij3.js → webrtcRemote-0RGrSwqd.js} +1 -1
- package/dist/{widget-B2YAkIhz.js → widget-CHvYA2YE.js} +3 -3
- package/dist/{ws-BZdG-J-R.js → ws-Cu2OiqtH.js} +3 -3
- package/dist/{ws-DRO7LfQQ.js → ws-Dtj4c87P.js} +2 -2
- package/lab/ui/sw.js +8 -1
- package/package.json +1 -1
- package/scripts/build-rgui.ts +8 -2
- package/ts/rustBinary.ts +22 -0
- package/ts/serve.spec.ts +20 -0
- package/ts/serve.ts +64 -3
- package/ts/serveRust.spec.ts +85 -0
- package/ts/serveRust.ts +114 -0
- package/dist/rustBinary-D9wbtLuv.js +0 -4
- package/dist/trayApp-oPSkAWLK.js +0 -5
package/README.md
CHANGED
|
@@ -32,6 +32,8 @@ shortcut that launches claude with no arguments.
|
|
|
32
32
|
|
|
33
33
|
For the local web console, install [Portless](https://portless.sh/) once with `npm install -g portless`, then run `ay serve`. It assigns a free internal port and serves the console at `https://agent-yes.localhost/`. `ay serve --port N` remains available for a fixed-port API listener.
|
|
34
34
|
|
|
35
|
+
Like `ay <cli>`, `ay serve` runs the Rust daemon (`ayrs serve`) by default for the flags it supports — `--webrtc [webrtc://url]`, `--port N`, `--sighost H`. The bare `ay serve` (Portless), `--share`, and the `install`/`status`/`logs` subcommands still run the TypeScript server; `--no-rust` (or `AGENT_YES_NO_RUST=1`) forces it for everything.
|
|
36
|
+
|
|
35
37
|
## Features
|
|
36
38
|
|
|
37
39
|
- **Multi-CLI Support**: Works with Claude, Codex, Copilot, and Cursor CLI tools
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { t as CLIS_CONFIG } from "./ts
|
|
1
|
+
import { t as CLIS_CONFIG } from "./ts-IWyw89k_.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-B3WUOdLK.js.map
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import "./logger-CDIsZ-Pp.js";
|
|
2
|
-
import "./versionChecker-
|
|
3
|
-
import "./ts
|
|
2
|
+
import "./versionChecker-BlucewMa.js";
|
|
3
|
+
import "./ts-IWyw89k_.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-B3WUOdLK.js";
|
|
11
11
|
|
|
12
12
|
export { SUPPORTED_CLIS };
|
|
@@ -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 { J as resolveOne } from "./subcommands-
|
|
8
|
+
import { J as resolveOne } from "./subcommands-DJ0RybMo.js";
|
|
9
9
|
import "./notifyStore-2SWKGwZI.js";
|
|
10
10
|
import "./webrtcLink-CnQf9pmu.js";
|
|
11
|
-
import "./remotes-
|
|
11
|
+
import "./remotes-5P__pAXA.js";
|
|
12
12
|
import { o as startShare } from "./share-C9oGvjXT.js";
|
|
13
13
|
|
|
14
14
|
//#region ts/agentShare.ts
|
|
@@ -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-DMdNorDu.js.map
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { t as agentYesHome } from "./agentYesHome-BNtn19J4.js";
|
|
2
|
-
import { J as resolveOne } from "./subcommands-
|
|
2
|
+
import { J as resolveOne } from "./subcommands-DJ0RybMo.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-jM8Rq3tl.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-0m1I1qMq.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-DJ0RybMo.js";
|
|
9
9
|
import "./notifyStore-2SWKGwZI.js";
|
|
10
10
|
import "./webrtcLink-CnQf9pmu.js";
|
|
11
|
-
import "./remotes-
|
|
11
|
+
import "./remotes-5P__pAXA.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-0m1I1qMq.js";
|
|
14
14
|
|
|
15
15
|
export { cmdCallback };
|
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-BlucewMa.js";
|
|
5
|
+
import { d as getRustBinary } from "./rustBinary-CjLiUlcX.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-CljAQU0G.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-DCn4Zj9h.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);
|
|
@@ -328,12 +328,12 @@ await checkAndAutoUpdate();
|
|
|
328
328
|
logger.info(versionString());
|
|
329
329
|
const config = parseCliArgs(process.argv);
|
|
330
330
|
if (config.tray) {
|
|
331
|
-
const { startTray } = await import("./tray-
|
|
331
|
+
const { startTray } = await import("./tray-DWWsVS7Y.js");
|
|
332
332
|
await startTray();
|
|
333
333
|
await new Promise(() => {});
|
|
334
334
|
}
|
|
335
335
|
{
|
|
336
|
-
const { ensureTray } = await import("./tray-
|
|
336
|
+
const { ensureTray } = await import("./tray-DWWsVS7Y.js");
|
|
337
337
|
ensureTray();
|
|
338
338
|
}
|
|
339
339
|
if (!config.showVersion && !config.appendPrompt && !config.tray) {
|
|
@@ -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-DCn4Zj9h.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 { F as listRecords, dt as buildAgentForest, ft as flattenForest, h as deriveLiveState } from "./subcommands-
|
|
8
|
+
import { F as listRecords, dt as buildAgentForest, ft as flattenForest, h as deriveLiveState } from "./subcommands-DJ0RybMo.js";
|
|
9
9
|
import "./notifyStore-2SWKGwZI.js";
|
|
10
10
|
import "./webrtcLink-CnQf9pmu.js";
|
|
11
|
-
import "./remotes-
|
|
11
|
+
import "./remotes-5P__pAXA.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-Dw7r3p1V.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-BlucewMa.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-IWyw89k_.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 { D as isPidAlive, F as listRecords, G as renderLogTailLines, h as deriveLiveState } from "./subcommands-
|
|
8
|
+
import { D as isPidAlive, F as listRecords, G as renderLogTailLines, h as deriveLiveState } from "./subcommands-DJ0RybMo.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-CnQf9pmu.js";
|
|
11
|
-
import "./remotes-
|
|
11
|
+
import "./remotes-5P__pAXA.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-34ECYio9.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-CljAQU0G.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-BV9EPkYK.js.map
|
|
@@ -93,7 +93,7 @@ async function resolveRemoteSpec(spec) {
|
|
|
93
93
|
* The bridge lives for the rest of the process (torn down on `process.exit`).
|
|
94
94
|
*/
|
|
95
95
|
async function resolveWebrtc(link, keyword, label) {
|
|
96
|
-
const { startWebrtcBridge } = await import("./webrtcRemote-
|
|
96
|
+
const { startWebrtcBridge } = await import("./webrtcRemote-0RGrSwqd.js");
|
|
97
97
|
const bridge = await startWebrtcBridge(link);
|
|
98
98
|
return {
|
|
99
99
|
url: bridge.baseUrl,
|
|
@@ -181,4 +181,4 @@ async function cmdRemote(rest) {
|
|
|
181
181
|
|
|
182
182
|
//#endregion
|
|
183
183
|
export { resolveRemoteSpec as a, readRemotes as i, deleteRemoteAlias as n, writeRemoteAlias as o, parseDirectRemoteSpec as r, cmdRemote as t };
|
|
184
|
-
//# sourceMappingURL=remotes-
|
|
184
|
+
//# sourceMappingURL=remotes-5P__pAXA.js.map
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import "./e2e-z1xpwSAg.js";
|
|
2
2
|
import "./webrtcLink-CnQf9pmu.js";
|
|
3
|
-
import { a as resolveRemoteSpec, i as readRemotes, n as deleteRemoteAlias, o as writeRemoteAlias, r as parseDirectRemoteSpec, t as cmdRemote } from "./remotes-
|
|
3
|
+
import { a as resolveRemoteSpec, i as readRemotes, n as deleteRemoteAlias, o as writeRemoteAlias, r as parseDirectRemoteSpec, t as cmdRemote } from "./remotes-5P__pAXA.js";
|
|
4
4
|
|
|
5
5
|
export { cmdRemote };
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import "./versionChecker-BlucewMa.js";
|
|
2
|
+
import { a as findSpawnHiddenLauncher, c as getBinDir, d as getRustBinary, 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-CjLiUlcX.js";
|
|
3
|
+
|
|
4
|
+
export { findAyrsBinary, 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-BlucewMa.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";
|
|
@@ -157,6 +157,24 @@ function findTrayLauncher() {
|
|
|
157
157
|
for (const p of searchPaths) if (p && existsSync(p)) return p;
|
|
158
158
|
}
|
|
159
159
|
/**
|
|
160
|
+
* Locate the `ayrs` binary (the Rust `serve` daemon). Same install shapes as
|
|
161
|
+
* the agent runtime — a dev `rs/target` build, the downloaded release bin dir
|
|
162
|
+
* (CI ships ayrs in every platform bundle since #473), or `~/.cargo/bin` on
|
|
163
|
+
* PATH after `bun run build:rs`. Undefined when absent (an older release, or a
|
|
164
|
+
* platform whose bundle predates it) — callers fall back to the TS server.
|
|
165
|
+
*/
|
|
166
|
+
function findAyrsBinary() {
|
|
167
|
+
const exe = process.platform === "win32" ? "ayrs.exe" : "ayrs";
|
|
168
|
+
const dir = import.meta.dirname ?? import.meta.dir;
|
|
169
|
+
const searchPaths = [
|
|
170
|
+
path.resolve(dir, `../rs/target/release/${exe}`),
|
|
171
|
+
path.resolve(dir, `../rs/target/debug/${exe}`),
|
|
172
|
+
path.join(getBinDir(), exe),
|
|
173
|
+
Bun.which("ayrs") ?? ""
|
|
174
|
+
];
|
|
175
|
+
for (const p of searchPaths) if (p && existsSync(p)) return p;
|
|
176
|
+
}
|
|
177
|
+
/**
|
|
160
178
|
* Get GitHub release download URL for the binary
|
|
161
179
|
*/
|
|
162
180
|
function getDownloadUrl(version = "latest") {
|
|
@@ -325,5 +343,5 @@ async function getRustBinary(options = {}) {
|
|
|
325
343
|
}
|
|
326
344
|
|
|
327
345
|
//#endregion
|
|
328
|
-
export {
|
|
329
|
-
//# sourceMappingURL=rustBinary-
|
|
346
|
+
export { findSpawnHiddenLauncher as a, getBinDir as c, getRustBinary as d, findRustBinary as i, getBinaryName as l, downloadBinary as n, findTrayLauncher as o, findAyrsBinary as r, gcOldBinaryDirs as s, devBuildInfo as t, getDownloadUrl as u };
|
|
347
|
+
//# sourceMappingURL=rustBinary-CjLiUlcX.js.map
|
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
import "./logger-CDIsZ-Pp.js";
|
|
2
|
-
import "./versionChecker-
|
|
3
|
-
import "./ts
|
|
2
|
+
import "./versionChecker-BlucewMa.js";
|
|
3
|
+
import "./ts-IWyw89k_.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-B3WUOdLK.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-DX14RwYY.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-BlucewMa.js";
|
|
3
|
+
import { a as findSpawnHiddenLauncher } from "./rustBinary-CjLiUlcX.js";
|
|
4
|
+
import { c as permissionBadge, i as answerAsk, o as listAsks, u as CLAUDE_SESSION_PIN_ENV } from "./ts-IWyw89k_.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,19 +12,19 @@ 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-B3WUOdLK.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-DJ0RybMo.js";
|
|
17
17
|
import { c as isTransientLockMkdirError } from "./notifyStore-2SWKGwZI.js";
|
|
18
18
|
import { i as toWebrtcUrl, n as isWebrtcSpec } from "./webrtcLink-CnQf9pmu.js";
|
|
19
|
-
import "./remotes-
|
|
19
|
+
import "./remotes-5P__pAXA.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-0m1I1qMq.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-Dtj4c87P.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-DDnRooNR.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";
|
|
@@ -1099,6 +1099,9 @@ async function bootstrapDaemonManager() {
|
|
|
1099
1099
|
}
|
|
1100
1100
|
return null;
|
|
1101
1101
|
}
|
|
1102
|
+
function oxmgrCmd(argv) {
|
|
1103
|
+
return argv.map((a) => /[\\\s"]/.test(a) ? `"${a.replace(/"/g, "\\\"")}"` : a).join(" ");
|
|
1104
|
+
}
|
|
1102
1105
|
function ayServeArgv(args) {
|
|
1103
1106
|
const ayBin = Bun.which("ay");
|
|
1104
1107
|
return [
|
|
@@ -1432,7 +1435,7 @@ async function cmdServeDaemon(sub, args) {
|
|
|
1432
1435
|
const managedArgv = spawnHidden ? [spawnHidden, ...serveArgv] : serveArgv;
|
|
1433
1436
|
const oxmgrHealth = webrtcDaemon && mgr.id === "oxmgr" ? [
|
|
1434
1437
|
"--health-cmd",
|
|
1435
|
-
ayServeArgv(["healthcheck"])
|
|
1438
|
+
oxmgrCmd(ayServeArgv(["healthcheck"])),
|
|
1436
1439
|
"--health-interval",
|
|
1437
1440
|
"10",
|
|
1438
1441
|
"--health-timeout",
|
|
@@ -1443,7 +1446,7 @@ async function cmdServeDaemon(sub, args) {
|
|
|
1443
1446
|
const startArgv = mgr.id === "oxmgr" ? [
|
|
1444
1447
|
mgr.bin,
|
|
1445
1448
|
"start",
|
|
1446
|
-
managedArgv
|
|
1449
|
+
oxmgrCmd(managedArgv),
|
|
1447
1450
|
"--name",
|
|
1448
1451
|
DAEMON_NAME,
|
|
1449
1452
|
"--restart",
|
|
@@ -1590,6 +1593,32 @@ async function cmdServeStatus(args) {
|
|
|
1590
1593
|
}
|
|
1591
1594
|
return 0;
|
|
1592
1595
|
}
|
|
1596
|
+
async function runAyrsServe(ayrs, argv) {
|
|
1597
|
+
const child = Bun.spawn([ayrs, ...argv], {
|
|
1598
|
+
stdio: [
|
|
1599
|
+
"inherit",
|
|
1600
|
+
"inherit",
|
|
1601
|
+
"inherit"
|
|
1602
|
+
],
|
|
1603
|
+
env: process.env,
|
|
1604
|
+
cwd: process.cwd()
|
|
1605
|
+
});
|
|
1606
|
+
const forward = (sig) => () => {
|
|
1607
|
+
try {
|
|
1608
|
+
child.kill(sig);
|
|
1609
|
+
} catch {}
|
|
1610
|
+
};
|
|
1611
|
+
const onInt = forward("SIGINT");
|
|
1612
|
+
const onTerm = forward("SIGTERM");
|
|
1613
|
+
process.on("SIGINT", onInt);
|
|
1614
|
+
process.on("SIGTERM", onTerm);
|
|
1615
|
+
try {
|
|
1616
|
+
return await child.exited;
|
|
1617
|
+
} finally {
|
|
1618
|
+
process.off("SIGINT", onInt);
|
|
1619
|
+
process.off("SIGTERM", onTerm);
|
|
1620
|
+
}
|
|
1621
|
+
}
|
|
1593
1622
|
async function cmdServe(rest) {
|
|
1594
1623
|
if (rest.includes("-h") || rest.includes("--help")) {
|
|
1595
1624
|
process.stdout.write(`Usage: ay serve [options]
|
|
@@ -1607,6 +1636,11 @@ Modes (default: --http):
|
|
|
1607
1636
|
(stable link across restarts; delete the file to rotate).
|
|
1608
1637
|
--share [URL] Legacy alias for --http --webrtc
|
|
1609
1638
|
|
|
1639
|
+
Runtime: like \`ay <cli>\`, the Rust daemon (ayrs serve) runs by default for
|
|
1640
|
+
the flags it supports — --webrtc [webrtc://url], --port N, --sighost H.
|
|
1641
|
+
Everything else (bare \`ay serve\`, --share/--http/--host/--tls-*, the
|
|
1642
|
+
subcommands) runs the TypeScript server. --no-rust forces TypeScript.
|
|
1643
|
+
|
|
1610
1644
|
Options:
|
|
1611
1645
|
--port N Bypass Portless and listen on a fixed HTTP port
|
|
1612
1646
|
--host HOST Interface to bind (default: 127.0.0.1; use 0.0.0.0 to expose)
|
|
@@ -1617,6 +1651,16 @@ Options:
|
|
|
1617
1651
|
${portlessConsoleUrl()}\n --allow-spawn Deprecated no-op — the console can always spawn agents\n --tls-cert FILE TLS certificate PEM\n --tls-key FILE TLS private key PEM\n\nSubcommands:\n ay serve install install as background daemon (oxmgr; pm2 fallback on Windows without the winfix build)\n ay serve status show daemon/server status (add --json for scripts)\n ay serve uninstall remove daemon\n ay serve logs view daemon logs\n\nOnce running, connect from another machine:\n ay ls <token>@<host>:<port>\n ay remote add <alias> http://<token>@<host>:<port>\n`);
|
|
1618
1652
|
return 0;
|
|
1619
1653
|
}
|
|
1654
|
+
{
|
|
1655
|
+
const { planRustServe } = await import("./serveRust-DDQiZmMf.js");
|
|
1656
|
+
const plan = planRustServe(rest);
|
|
1657
|
+
if (plan.kind === "rust") {
|
|
1658
|
+
const { findAyrsBinary } = await import("./rustBinary-B_Aqd4wh.js");
|
|
1659
|
+
const ayrs = findAyrsBinary();
|
|
1660
|
+
if (ayrs) return runAyrsServe(ayrs, plan.argv);
|
|
1661
|
+
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");
|
|
1662
|
+
} else rest = plan.rest;
|
|
1663
|
+
}
|
|
1620
1664
|
const sub = rest[0];
|
|
1621
1665
|
if (sub === "status") return cmdServeStatus(rest.slice(1));
|
|
1622
1666
|
if (sub === "start" || sub === "stop") return cmdServeStartStop(sub);
|
|
@@ -2586,7 +2630,7 @@ Options:
|
|
|
2586
2630
|
}
|
|
2587
2631
|
});
|
|
2588
2632
|
if (req.method === "GET" && p === "/api/ws") {
|
|
2589
|
-
const ws = await import("./ws-
|
|
2633
|
+
const ws = await import("./ws-Cu2OiqtH.js");
|
|
2590
2634
|
try {
|
|
2591
2635
|
await ws.loadProvision();
|
|
2592
2636
|
} catch (e) {
|
|
@@ -2606,7 +2650,7 @@ Options:
|
|
|
2606
2650
|
if (req.method === "GET" && p === "/api/ws/status") {
|
|
2607
2651
|
const dirRaw = url.searchParams.get("path");
|
|
2608
2652
|
if (!dirRaw) return new Response("missing ?path=<workspace dir>", { status: 400 });
|
|
2609
|
-
const ws = await import("./ws-
|
|
2653
|
+
const ws = await import("./ws-Cu2OiqtH.js");
|
|
2610
2654
|
let prov;
|
|
2611
2655
|
try {
|
|
2612
2656
|
prov = await ws.loadProvision();
|
|
@@ -2628,7 +2672,7 @@ Options:
|
|
|
2628
2672
|
}
|
|
2629
2673
|
}
|
|
2630
2674
|
if (req.method === "GET" && p === "/api/ws/repos") {
|
|
2631
|
-
const ws = await import("./ws-
|
|
2675
|
+
const ws = await import("./ws-Cu2OiqtH.js");
|
|
2632
2676
|
try {
|
|
2633
2677
|
await ws.loadProvision();
|
|
2634
2678
|
} catch (e) {
|
|
@@ -2709,7 +2753,7 @@ Options:
|
|
|
2709
2753
|
const m = /^([A-Za-z0-9_.-]+)\/([A-Za-z0-9_.-]+)$/.exec(repoParam);
|
|
2710
2754
|
if (!m || m[1] === "." || m[1] === ".." || m[2] === "." || m[2] === "..") return new Response("missing/invalid ?repo=<owner>/<repo>", { status: 400 });
|
|
2711
2755
|
const [, owner, repo] = m;
|
|
2712
|
-
const ws = await import("./ws-
|
|
2756
|
+
const ws = await import("./ws-Cu2OiqtH.js");
|
|
2713
2757
|
let prov;
|
|
2714
2758
|
try {
|
|
2715
2759
|
prov = await ws.loadProvision();
|
|
@@ -3627,7 +3671,7 @@ Options:
|
|
|
3627
3671
|
const perm = body.perm ?? "r";
|
|
3628
3672
|
if (perm !== "r" && perm !== "rw") return new Response(`invalid perm ${perm} (want r or rw)`, { status: 400 });
|
|
3629
3673
|
try {
|
|
3630
|
-
const { createScopedShare } = await import("./agentShare-
|
|
3674
|
+
const { createScopedShare } = await import("./agentShare-DMdNorDu.js");
|
|
3631
3675
|
const share = await createScopedShare({
|
|
3632
3676
|
agent: body.agent,
|
|
3633
3677
|
perm,
|
|
@@ -3642,12 +3686,12 @@ Options:
|
|
|
3642
3686
|
}
|
|
3643
3687
|
}
|
|
3644
3688
|
if (req.method === "GET" && p === "/api/shares") {
|
|
3645
|
-
const { listShares } = await import("./agentShare-
|
|
3689
|
+
const { listShares } = await import("./agentShare-DMdNorDu.js");
|
|
3646
3690
|
return Response.json(listShares());
|
|
3647
3691
|
}
|
|
3648
3692
|
const revokeM = /^\/api\/share\/([^/]+)$/.exec(p);
|
|
3649
3693
|
if (req.method === "DELETE" && revokeM) {
|
|
3650
|
-
const { revokeShare } = await import("./agentShare-
|
|
3694
|
+
const { revokeShare } = await import("./agentShare-DMdNorDu.js");
|
|
3651
3695
|
const ok = revokeShare(decodeURIComponent(revokeM[1]));
|
|
3652
3696
|
return new Response(ok ? "revoked" : "no such share", { status: ok ? 200 : 404 });
|
|
3653
3697
|
}
|
|
@@ -3953,7 +3997,7 @@ Options:
|
|
|
3953
3997
|
const shutdown = (resolve) => {
|
|
3954
3998
|
if (heartbeat) clearInterval(heartbeat);
|
|
3955
3999
|
closeShare?.();
|
|
3956
|
-
import("./agentShare-
|
|
4000
|
+
import("./agentShare-DMdNorDu.js").then((m) => m.revokeAllShares()).catch(() => {});
|
|
3957
4001
|
server?.stop();
|
|
3958
4002
|
Promise.resolve(releaseHostLock?.()).catch(() => {}).then(resolve);
|
|
3959
4003
|
};
|
|
@@ -3966,4 +4010,4 @@ Options:
|
|
|
3966
4010
|
|
|
3967
4011
|
//#endregion
|
|
3968
4012
|
export { cmdServe, loadTokenReadOnly, mintScopedTermToken, resolveDaemonHttpBase, resolveLocalServeUrl };
|
|
3969
|
-
//# sourceMappingURL=serve-
|
|
4013
|
+
//# sourceMappingURL=serve-jM8Rq3tl.js.map
|
|
@@ -0,0 +1,127 @@
|
|
|
1
|
+
//#region ts/serveRust.ts
|
|
2
|
+
/**
|
|
3
|
+
* `ay serve` → `ayrs serve` delegation.
|
|
4
|
+
*
|
|
5
|
+
* Mirrors how `ay <cli>` runs the Rust agent runtime by default and only falls
|
|
6
|
+
* back to TypeScript on `--no-rust`: the Rust serve daemon (`ayrs`) becomes the
|
|
7
|
+
* default for every invocation it can express, and the TypeScript server keeps
|
|
8
|
+
* everything it can't (yet). The decision is a pure function of the argv so the
|
|
9
|
+
* contract is testable and the fallback reason is explicit — a silent fallback
|
|
10
|
+
* would leave an operator unsure which daemon they are looking at.
|
|
11
|
+
*
|
|
12
|
+
* What delegates today — exactly the flags `ayrs serve` accepts:
|
|
13
|
+
* --webrtc (bare: load/mint the persisted room)
|
|
14
|
+
* --webrtc <url> / --webrtc=<url> (a webrtc:// room url)
|
|
15
|
+
* --port <n> / --port=<n> (loopback HTTP console; 0 = free port)
|
|
16
|
+
* --sighost <host> / --sighost=<host>
|
|
17
|
+
*
|
|
18
|
+
* What stays on TypeScript, with the reason printed:
|
|
19
|
+
* - `--no-rust` / AGENT_YES_NO_RUST=1 (explicit opt-out)
|
|
20
|
+
* - the bare `ay serve` (Portless HTTPS on agent-yes.localhost has no ayrs
|
|
21
|
+
* equivalent — `--port` is a plain loopback listener)
|
|
22
|
+
* - the daemon subcommands (install/uninstall/status/logs/start/stop/
|
|
23
|
+
* healthcheck) and -d/--daemon: ayrs has its own OS-supervisor install and
|
|
24
|
+
* the two must not manage each other's registration
|
|
25
|
+
* - --share (http+webrtc over Portless), --http, --host, --token, --tls-*,
|
|
26
|
+
* --local, https room links (ayrs pins rooms by webrtc:// url only)
|
|
27
|
+
*/
|
|
28
|
+
/** Subcommands `ay serve` dispatches before flag parsing — never delegated. */
|
|
29
|
+
const SERVE_SUBCOMMANDS = new Set([
|
|
30
|
+
"install",
|
|
31
|
+
"uninstall",
|
|
32
|
+
"status",
|
|
33
|
+
"logs",
|
|
34
|
+
"start",
|
|
35
|
+
"stop",
|
|
36
|
+
"healthcheck"
|
|
37
|
+
]);
|
|
38
|
+
/**
|
|
39
|
+
* Decide whether `rest` (the argv after `serve`) can run as `ayrs serve`.
|
|
40
|
+
* Returns the ayrs argv (without the program) or the TS fallback with its
|
|
41
|
+
* reason and the argv the TS path should parse (`--no-rust` stripped).
|
|
42
|
+
*/
|
|
43
|
+
function planRustServe(rest, env = process.env) {
|
|
44
|
+
const stripped = rest.filter((a) => a !== "--no-rust");
|
|
45
|
+
if (stripped.length !== rest.length) return {
|
|
46
|
+
kind: "ts",
|
|
47
|
+
reason: "--no-rust",
|
|
48
|
+
rest: stripped
|
|
49
|
+
};
|
|
50
|
+
if (env.AGENT_YES_NO_RUST === "1") return {
|
|
51
|
+
kind: "ts",
|
|
52
|
+
reason: "AGENT_YES_NO_RUST=1",
|
|
53
|
+
rest
|
|
54
|
+
};
|
|
55
|
+
if (rest.length === 0) return {
|
|
56
|
+
kind: "ts",
|
|
57
|
+
reason: "bare `ay serve` (Portless HTTPS console)",
|
|
58
|
+
rest
|
|
59
|
+
};
|
|
60
|
+
const first = rest[0];
|
|
61
|
+
if (SERVE_SUBCOMMANDS.has(first)) return {
|
|
62
|
+
kind: "ts",
|
|
63
|
+
reason: `\`ay serve ${first}\``,
|
|
64
|
+
rest
|
|
65
|
+
};
|
|
66
|
+
const argv = ["serve"];
|
|
67
|
+
for (let i = 0; i < rest.length; i++) {
|
|
68
|
+
const a = rest[i];
|
|
69
|
+
const eq = a.indexOf("=");
|
|
70
|
+
const name = eq === -1 ? a : a.slice(0, eq);
|
|
71
|
+
const inline = eq === -1 ? void 0 : a.slice(eq + 1);
|
|
72
|
+
const next = rest[i + 1];
|
|
73
|
+
const takeNext = () => {
|
|
74
|
+
if (inline !== void 0) return inline;
|
|
75
|
+
if (next !== void 0 && !next.startsWith("-")) {
|
|
76
|
+
i++;
|
|
77
|
+
return next;
|
|
78
|
+
}
|
|
79
|
+
};
|
|
80
|
+
switch (name) {
|
|
81
|
+
case "--webrtc": {
|
|
82
|
+
const v = takeNext();
|
|
83
|
+
if (v === void 0) argv.push("--webrtc");
|
|
84
|
+
else if (v.startsWith("webrtc://")) argv.push("--webrtc", v);
|
|
85
|
+
else return {
|
|
86
|
+
kind: "ts",
|
|
87
|
+
reason: `--webrtc ${v} (ayrs takes webrtc:// urls only)`,
|
|
88
|
+
rest
|
|
89
|
+
};
|
|
90
|
+
break;
|
|
91
|
+
}
|
|
92
|
+
case "--port": {
|
|
93
|
+
const v = takeNext();
|
|
94
|
+
if (v === void 0 || !/^\d+$/.test(v)) return {
|
|
95
|
+
kind: "ts",
|
|
96
|
+
reason: `--port ${v ?? "(missing)"}`,
|
|
97
|
+
rest
|
|
98
|
+
};
|
|
99
|
+
argv.push("--port", v);
|
|
100
|
+
break;
|
|
101
|
+
}
|
|
102
|
+
case "--sighost": {
|
|
103
|
+
const v = takeNext();
|
|
104
|
+
if (v === void 0) return {
|
|
105
|
+
kind: "ts",
|
|
106
|
+
reason: "--sighost (missing value)",
|
|
107
|
+
rest
|
|
108
|
+
};
|
|
109
|
+
argv.push("--sighost", v);
|
|
110
|
+
break;
|
|
111
|
+
}
|
|
112
|
+
default: return {
|
|
113
|
+
kind: "ts",
|
|
114
|
+
reason: a,
|
|
115
|
+
rest
|
|
116
|
+
};
|
|
117
|
+
}
|
|
118
|
+
}
|
|
119
|
+
return {
|
|
120
|
+
kind: "rust",
|
|
121
|
+
argv
|
|
122
|
+
};
|
|
123
|
+
}
|
|
124
|
+
|
|
125
|
+
//#endregion
|
|
126
|
+
export { planRustServe };
|
|
127
|
+
//# sourceMappingURL=serveRust-DDQiZmMf.js.map
|