claude-yes 1.153.2 → 1.154.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +1 -0
- package/agent-yes.config.schema.json +4 -0
- package/default.config.yaml +27 -0
- package/dist/SUPPORTED_CLIS-CmM_zBrM.js +8 -0
- package/dist/{SUPPORTED_CLIS-DsOUGcZj.js → SUPPORTED_CLIS-Dam11bMz.js} +2 -2
- package/dist/{agent-yes.config-BKtCmmy9.js → agent-yes.config-Bl08kMpl.js} +2 -2
- package/dist/cli.js +5 -5
- package/dist/{configShared-C1C04bbq.js → configShared-CEyhl0WH.js} +3 -2
- package/dist/{e2e-ClOI_aqV.js → e2e-Bfw7qL9O.js} +1 -1
- package/dist/index.js +2 -2
- package/dist/openBrowser-CuOlFtow.js +71 -0
- package/dist/{remotes-qK6uozO4.js → remotes-DBCvpp3B.js} +3 -3
- package/dist/{remotes-5lHLAAqn.js → remotes-DkNuq417.js} +3 -3
- package/dist/{schedule-Bxei036B.js → schedule-BPFBe7R5.js} +5 -5
- package/dist/{serve-CoUlCHxT.js → serve-BYc2J-2F.js} +25 -18
- package/dist/{setup-CSgScgPD.js → setup-D9emVJYz.js} +3 -3
- package/dist/{share-ShLKJTUE.js → share-Bq_tDXQU.js} +2 -2
- package/dist/{subcommands-CapfwHNa.js → subcommands-C4tMi9NX.js} +102 -18
- package/dist/subcommands-DLvC6kto.js +9 -0
- package/dist/{tray-5Hezw9uj.js → tray-BMzpUSfa.js} +1 -1
- package/dist/{ts-C4ZmPc5P.js → ts-U3AE4u72.js} +3 -3
- package/dist/{versionChecker-CqRHax_g.js → versionChecker-B-ToHoJ2.js} +2 -2
- package/dist/{webrtcLink-BWhuA74k.js → webrtcLink-CBZkZ-LT.js} +2 -2
- package/dist/{webrtcRemote-jGM3ZHK3.js → webrtcRemote-Ccdzmuc-.js} +3 -3
- package/dist/{workspaceConfig-B9VX8tVO.js → workspaceConfig-DT3cCBZK.js} +1 -1
- package/lab/ui/index.html +1 -1
- package/package.json +1 -1
- package/ts/buildRustArgs.spec.ts +5 -1
- package/ts/configShared.ts +4 -0
- package/ts/globalPidIndex.ts +5 -0
- package/ts/index.ts +1 -0
- package/ts/openBrowser.spec.ts +130 -0
- package/ts/openBrowser.ts +67 -0
- package/ts/serve.ts +19 -6
- package/ts/subcommands.spec.ts +119 -2
- package/ts/subcommands.ts +104 -7
- package/dist/SUPPORTED_CLIS-BsfuhkaH.js +0 -8
- package/dist/subcommands-6M1qZllB.js +0 -9
package/README.md
CHANGED
|
@@ -35,6 +35,7 @@ Then: `ay claude` (run an agent with auto-yes) · `ay serve --share` (web consol
|
|
|
35
35
|
- **Crash Recovery**: Automatically restarts crashed processes (where supported)
|
|
36
36
|
- **Idle Detection**: Optional auto-exit when the AI becomes idle
|
|
37
37
|
- **Named Pipe Input (Linux)**: On Linux systems, automatically creates a FIFO (named pipe) at `/tmp/agent-yes-YYYYMMDDHHMMSSXXX.stdin` for additional input streams
|
|
38
|
+
- **Isolated Processes**: Each `ay <cli>` is an independent wrapper — no central daemon owns the agents. They coordinate through files (`pids.jsonl` index, per-pid FIFO for stdin, per-cwd `.raw.log` for output), so one process crashing (even `ay serve`) never takes down the others. See [docs/architecture.md](docs/architecture.md#process-model--ipc).
|
|
38
39
|
|
|
39
40
|
## Agent Clis
|
|
40
41
|
|
|
@@ -171,6 +171,10 @@
|
|
|
171
171
|
"items": { "$ref": "#/definitions/RegexSource" },
|
|
172
172
|
"description": "Regex patterns for errors that require restart WITHOUT continue args"
|
|
173
173
|
},
|
|
174
|
+
"resumeCommand": {
|
|
175
|
+
"$ref": "#/definitions/RegexSource",
|
|
176
|
+
"description": "Optional regex scraped from the agent's log on `ay restart`. Capture group 1 is the argument string (whitespace-split) to relaunch with — i.e. a resume command the CLI printed, like '--resume <id>'. When absent or unmatched, restart falls back to restoreArgs (e.g. --continue)."
|
|
177
|
+
},
|
|
174
178
|
"bunx": {
|
|
175
179
|
"type": "boolean",
|
|
176
180
|
"description": "Use bunx instead of npx to run the CLI (faster startup)"
|
package/default.config.yaml
CHANGED
|
@@ -88,6 +88,15 @@ clis:
|
|
|
88
88
|
flags: i
|
|
89
89
|
restoreArgs:
|
|
90
90
|
- --continue
|
|
91
|
+
# resumeCommand (optional): a regex scraped from the agent's log by
|
|
92
|
+
# `ay restart` to resume the exact session when a CLI prints a resume command.
|
|
93
|
+
# Capture group 1 is the argument string (whitespace-split) appended to the
|
|
94
|
+
# relaunched `agent-yes --cli=<cli> …`. The claude family has no printed resume
|
|
95
|
+
# command — it resumes via restoreArgs (--continue) above — so it's left unset.
|
|
96
|
+
# Example for a CLI that prints one:
|
|
97
|
+
# resumeCommand:
|
|
98
|
+
# pattern: 'To resume, run:.*?(--resume \S+)'
|
|
99
|
+
# flags: i
|
|
91
100
|
restartWithoutContinueArg:
|
|
92
101
|
- No conversation found to continue
|
|
93
102
|
exitCommands:
|
|
@@ -176,6 +185,15 @@ clis:
|
|
|
176
185
|
flags: i
|
|
177
186
|
restoreArgs:
|
|
178
187
|
- --continue
|
|
188
|
+
# resumeCommand (optional): a regex scraped from the agent's log by
|
|
189
|
+
# `ay restart` to resume the exact session when a CLI prints a resume command.
|
|
190
|
+
# Capture group 1 is the argument string (whitespace-split) appended to the
|
|
191
|
+
# relaunched `agent-yes --cli=<cli> …`. The claude family has no printed resume
|
|
192
|
+
# command — it resumes via restoreArgs (--continue) above — so it's left unset.
|
|
193
|
+
# Example for a CLI that prints one:
|
|
194
|
+
# resumeCommand:
|
|
195
|
+
# pattern: 'To resume, run:.*?(--resume \S+)'
|
|
196
|
+
# flags: i
|
|
179
197
|
restartWithoutContinueArg:
|
|
180
198
|
- No conversation found to continue
|
|
181
199
|
exitCommands:
|
|
@@ -269,6 +287,15 @@ clis:
|
|
|
269
287
|
flags: i
|
|
270
288
|
restoreArgs:
|
|
271
289
|
- --continue
|
|
290
|
+
# resumeCommand (optional): a regex scraped from the agent's log by
|
|
291
|
+
# `ay restart` to resume the exact session when a CLI prints a resume command.
|
|
292
|
+
# Capture group 1 is the argument string (whitespace-split) appended to the
|
|
293
|
+
# relaunched `agent-yes --cli=<cli> …`. The claude family has no printed resume
|
|
294
|
+
# command — it resumes via restoreArgs (--continue) above — so it's left unset.
|
|
295
|
+
# Example for a CLI that prints one:
|
|
296
|
+
# resumeCommand:
|
|
297
|
+
# pattern: 'To resume, run:.*?(--resume \S+)'
|
|
298
|
+
# flags: i
|
|
272
299
|
restartWithoutContinueArg:
|
|
273
300
|
- No conversation found to continue
|
|
274
301
|
exitCommands:
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import "./ts-U3AE4u72.js";
|
|
2
|
+
import "./logger-CDIsZ-Pp.js";
|
|
3
|
+
import "./versionChecker-B-ToHoJ2.js";
|
|
4
|
+
import "./pidStore-fqXqTKkh.js";
|
|
5
|
+
import "./globalPidIndex-DlmmJlO8.js";
|
|
6
|
+
import { t as SUPPORTED_CLIS } from "./SUPPORTED_CLIS-Dam11bMz.js";
|
|
7
|
+
|
|
8
|
+
export { SUPPORTED_CLIS };
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { t as CLIS_CONFIG } from "./ts-
|
|
1
|
+
import { t as CLIS_CONFIG } from "./ts-U3AE4u72.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-Dam11bMz.js.map
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { n as logger } from "./logger-CDIsZ-Pp.js";
|
|
2
|
-
import { n as normalizeAgentYesConfig, t as loadSharedCliDefaults } from "./configShared-
|
|
2
|
+
import { n as normalizeAgentYesConfig, t as loadSharedCliDefaults } from "./configShared-CEyhl0WH.js";
|
|
3
3
|
import os from "node:os";
|
|
4
4
|
import { access, mkdir, readFile, writeFile } from "node:fs/promises";
|
|
5
5
|
import path from "node:path";
|
|
@@ -226,4 +226,4 @@ async function getDefaultConfig() {
|
|
|
226
226
|
|
|
227
227
|
//#endregion
|
|
228
228
|
export { agent_yes_config_default as default };
|
|
229
|
-
//# sourceMappingURL=agent-yes.config-
|
|
229
|
+
//# sourceMappingURL=agent-yes.config-Bl08kMpl.js.map
|
package/dist/cli.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
#!/usr/bin/env bun
|
|
2
2
|
import { t as invokedCliName } from "./invokedCli-uqM2YYA7.js";
|
|
3
3
|
import { n as logger } from "./logger-CDIsZ-Pp.js";
|
|
4
|
-
import { i as versionString, n as displayVersion, r as getInstalledPackage, t as checkAndAutoUpdate } from "./versionChecker-
|
|
4
|
+
import { i as versionString, n as displayVersion, r as getInstalledPackage, t as checkAndAutoUpdate } from "./versionChecker-B-ToHoJ2.js";
|
|
5
5
|
import { argv } from "process";
|
|
6
6
|
import { execFileSync, spawn } from "child_process";
|
|
7
7
|
import ms from "ms";
|
|
@@ -481,7 +481,7 @@ function buildRustArgs(argv, cliFromScript, supportedClis) {
|
|
|
481
481
|
const rawArg = process.argv[2];
|
|
482
482
|
const managerCommands = !invokedCliName(process.argv);
|
|
483
483
|
const isHelpFlag = rawArg === "-h" || rawArg === "--help";
|
|
484
|
-
const { isSubcommand, runSubcommand, cmdHelp } = await import("./subcommands-
|
|
484
|
+
const { isSubcommand, runSubcommand, cmdHelp } = await import("./subcommands-DLvC6kto.js");
|
|
485
485
|
if (isHelpFlag && process.argv.length === 3) {
|
|
486
486
|
cmdHelp(managerCommands);
|
|
487
487
|
process.exit(0);
|
|
@@ -495,12 +495,12 @@ await checkAndAutoUpdate();
|
|
|
495
495
|
logger.info(versionString());
|
|
496
496
|
const config = parseCliArgs(process.argv);
|
|
497
497
|
if (config.tray) {
|
|
498
|
-
const { startTray } = await import("./tray-
|
|
498
|
+
const { startTray } = await import("./tray-BMzpUSfa.js");
|
|
499
499
|
await startTray();
|
|
500
500
|
await new Promise(() => {});
|
|
501
501
|
}
|
|
502
502
|
{
|
|
503
|
-
const { ensureTray } = await import("./tray-
|
|
503
|
+
const { ensureTray } = await import("./tray-BMzpUSfa.js");
|
|
504
504
|
ensureTray();
|
|
505
505
|
}
|
|
506
506
|
if (config.useRust) {
|
|
@@ -514,7 +514,7 @@ if (config.useRust) {
|
|
|
514
514
|
}
|
|
515
515
|
}
|
|
516
516
|
if (rustBinary) {
|
|
517
|
-
const { SUPPORTED_CLIS } = await import("./SUPPORTED_CLIS-
|
|
517
|
+
const { SUPPORTED_CLIS } = await import("./SUPPORTED_CLIS-CmM_zBrM.js");
|
|
518
518
|
const rustArgs = buildRustArgs(process.argv, config.cli, SUPPORTED_CLIS);
|
|
519
519
|
if (config.verbose) {
|
|
520
520
|
console.log(`[rust] Using binary: ${rustBinary}`);
|
|
@@ -17,7 +17,7 @@ function compileTypingRespond(typingRespond) {
|
|
|
17
17
|
return Object.fromEntries(Object.entries(typingRespond).map(([message, patterns]) => [message, patterns.map(compileRegexSource)]));
|
|
18
18
|
}
|
|
19
19
|
function normalizeCliConfig(raw) {
|
|
20
|
-
const { ready, fatal, working, enter, enterExclude, typingRespond, restartWithoutContinueArg, updateAvailable, autoRetry, needsInput, exitCommands, exitCommand, ...rest } = raw;
|
|
20
|
+
const { ready, fatal, working, enter, enterExclude, typingRespond, restartWithoutContinueArg, updateAvailable, autoRetry, needsInput, resumeCommand, exitCommands, exitCommand, ...rest } = raw;
|
|
21
21
|
return {
|
|
22
22
|
...rest,
|
|
23
23
|
ready: compileRegexList(ready),
|
|
@@ -30,6 +30,7 @@ function normalizeCliConfig(raw) {
|
|
|
30
30
|
updateAvailable: compileRegexList(updateAvailable),
|
|
31
31
|
autoRetry: compileRegexList(autoRetry),
|
|
32
32
|
needsInput: compileRegexList(needsInput),
|
|
33
|
+
resumeCommand: resumeCommand === void 0 ? void 0 : compileRegexSource(resumeCommand),
|
|
33
34
|
exitCommands: exitCommands ?? exitCommand
|
|
34
35
|
};
|
|
35
36
|
}
|
|
@@ -68,4 +69,4 @@ async function loadSharedCliDefaults(fromUrl = import.meta.url) {
|
|
|
68
69
|
|
|
69
70
|
//#endregion
|
|
70
71
|
export { normalizeAgentYesConfig as n, loadSharedCliDefaults as t };
|
|
71
|
-
//# sourceMappingURL=configShared-
|
|
72
|
+
//# sourceMappingURL=configShared-CEyhl0WH.js.map
|
|
@@ -172,4 +172,4 @@ function randomHex(n) {
|
|
|
172
172
|
|
|
173
173
|
//#endregion
|
|
174
174
|
export { computeTranscriptHash as a, open as c, randomHex as d, seal as f, MAX_CHUNK as i, packEnvelope as l, FLAG_CONFIRM as n, deriveAuthToken as o, unpackEnvelope as p, MARKER as r, deriveDirKeys as s, CONFIRM_TIMEOUT_MS as t, parseSecret as u };
|
|
175
|
-
//# sourceMappingURL=e2e-
|
|
175
|
+
//# sourceMappingURL=e2e-Bfw7qL9O.js.map
|
package/dist/index.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { a as removeControlCharacters, i as AgentContext, n as agentYes, r as config, t as CLIS_CONFIG } from "./ts-
|
|
1
|
+
import { a as removeControlCharacters, i as AgentContext, n as agentYes, r as config, t as CLIS_CONFIG } from "./ts-U3AE4u72.js";
|
|
2
2
|
import "./logger-CDIsZ-Pp.js";
|
|
3
|
-
import "./versionChecker-
|
|
3
|
+
import "./versionChecker-B-ToHoJ2.js";
|
|
4
4
|
import "./pidStore-fqXqTKkh.js";
|
|
5
5
|
import "./globalPidIndex-DlmmJlO8.js";
|
|
6
6
|
|
|
@@ -0,0 +1,71 @@
|
|
|
1
|
+
import { spawn } from "node:child_process";
|
|
2
|
+
import { createInterface } from "node:readline";
|
|
3
|
+
|
|
4
|
+
//#region ts/openBrowser.ts
|
|
5
|
+
/**
|
|
6
|
+
* The platform command that opens `url` in the default browser, or null when we
|
|
7
|
+
* have no way to (a headless Linux box with no display). Pure — platform/env are
|
|
8
|
+
* injectable so the resolution table is unit-testable.
|
|
9
|
+
*/
|
|
10
|
+
function resolveOpener(url, platform = process.platform, env = process.env) {
|
|
11
|
+
if (platform === "darwin") return {
|
|
12
|
+
cmd: "open",
|
|
13
|
+
args: [url]
|
|
14
|
+
};
|
|
15
|
+
if (platform === "win32") return {
|
|
16
|
+
cmd: "cmd",
|
|
17
|
+
args: [
|
|
18
|
+
"/c",
|
|
19
|
+
"start",
|
|
20
|
+
"",
|
|
21
|
+
url
|
|
22
|
+
]
|
|
23
|
+
};
|
|
24
|
+
if (!env.DISPLAY && !env.WAYLAND_DISPLAY) return null;
|
|
25
|
+
return {
|
|
26
|
+
cmd: "xdg-open",
|
|
27
|
+
args: [url]
|
|
28
|
+
};
|
|
29
|
+
}
|
|
30
|
+
/** Fire-and-forget launch of the browser. Returns false when we can't open. */
|
|
31
|
+
function openInBrowser(url) {
|
|
32
|
+
const opener = resolveOpener(url);
|
|
33
|
+
if (!opener) return false;
|
|
34
|
+
try {
|
|
35
|
+
const child = spawn(opener.cmd, opener.args, {
|
|
36
|
+
stdio: "ignore",
|
|
37
|
+
detached: true
|
|
38
|
+
});
|
|
39
|
+
child.on("error", () => {});
|
|
40
|
+
child.unref();
|
|
41
|
+
return true;
|
|
42
|
+
} catch {
|
|
43
|
+
return false;
|
|
44
|
+
}
|
|
45
|
+
}
|
|
46
|
+
/**
|
|
47
|
+
* Offer to open `url` in the browser, defaulting to yes. No-ops silently unless
|
|
48
|
+
* BOTH stdin/stdout are a TTY (so we can ask) AND a browser opener exists for
|
|
49
|
+
* this platform (so "yes" can actually do something). Non-interactive contexts
|
|
50
|
+
* — `curl | sh`, SSH, CI, the daemon — fall through and just leave the link
|
|
51
|
+
* printed, as the operator chose.
|
|
52
|
+
*/
|
|
53
|
+
async function offerOpenInBrowser(url, prompt = "Open in browser now? [Y/n] ") {
|
|
54
|
+
if (!process.stdin.isTTY || !process.stdout.isTTY) return false;
|
|
55
|
+
if (!resolveOpener(url)) return false;
|
|
56
|
+
const rl = createInterface({
|
|
57
|
+
input: process.stdin,
|
|
58
|
+
output: process.stdout
|
|
59
|
+
});
|
|
60
|
+
try {
|
|
61
|
+
const answer = (await new Promise((resolve) => rl.question(prompt, resolve))).trim().toLowerCase();
|
|
62
|
+
if (answer !== "" && answer !== "y" && answer !== "yes") return false;
|
|
63
|
+
} finally {
|
|
64
|
+
rl.close();
|
|
65
|
+
}
|
|
66
|
+
return openInBrowser(url);
|
|
67
|
+
}
|
|
68
|
+
|
|
69
|
+
//#endregion
|
|
70
|
+
export { offerOpenInBrowser };
|
|
71
|
+
//# sourceMappingURL=openBrowser-CuOlFtow.js.map
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { n as isWebrtcSpec } from "./webrtcLink-
|
|
1
|
+
import { n as isWebrtcSpec } from "./webrtcLink-CBZkZ-LT.js";
|
|
2
2
|
import { mkdir, readFile, writeFile } from "fs/promises";
|
|
3
3
|
import { homedir } from "os";
|
|
4
4
|
import path from "path";
|
|
@@ -86,7 +86,7 @@ async function resolveRemoteSpec(spec) {
|
|
|
86
86
|
* The bridge lives for the rest of the process (torn down on `process.exit`).
|
|
87
87
|
*/
|
|
88
88
|
async function resolveWebrtc(link, keyword) {
|
|
89
|
-
const { startWebrtcBridge } = await import("./webrtcRemote-
|
|
89
|
+
const { startWebrtcBridge } = await import("./webrtcRemote-Ccdzmuc-.js");
|
|
90
90
|
const bridge = await startWebrtcBridge(link);
|
|
91
91
|
return {
|
|
92
92
|
url: bridge.baseUrl,
|
|
@@ -173,4 +173,4 @@ async function cmdRemote(rest) {
|
|
|
173
173
|
|
|
174
174
|
//#endregion
|
|
175
175
|
export { resolveRemoteSpec as a, readRemotes as i, deleteRemoteAlias as n, writeRemoteAlias as o, parseDirectRemoteSpec as r, cmdRemote as t };
|
|
176
|
-
//# sourceMappingURL=remotes-
|
|
176
|
+
//# sourceMappingURL=remotes-DBCvpp3B.js.map
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import "./e2e-
|
|
2
|
-
import "./webrtcLink-
|
|
3
|
-
import { a as resolveRemoteSpec, i as readRemotes, n as deleteRemoteAlias, o as writeRemoteAlias, r as parseDirectRemoteSpec, t as cmdRemote } from "./remotes-
|
|
1
|
+
import "./e2e-Bfw7qL9O.js";
|
|
2
|
+
import "./webrtcLink-CBZkZ-LT.js";
|
|
3
|
+
import { a as resolveRemoteSpec, i as readRemotes, n as deleteRemoteAlias, o as writeRemoteAlias, r as parseDirectRemoteSpec, t as cmdRemote } from "./remotes-DBCvpp3B.js";
|
|
4
4
|
|
|
5
5
|
export { cmdRemote };
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import "./ts-
|
|
1
|
+
import "./ts-U3AE4u72.js";
|
|
2
2
|
import "./logger-CDIsZ-Pp.js";
|
|
3
|
-
import "./versionChecker-
|
|
3
|
+
import "./versionChecker-B-ToHoJ2.js";
|
|
4
4
|
import "./pidStore-fqXqTKkh.js";
|
|
5
5
|
import "./globalPidIndex-DlmmJlO8.js";
|
|
6
|
-
import { t as SUPPORTED_CLIS } from "./SUPPORTED_CLIS-
|
|
7
|
-
import { i as resolveSpawnCwd } from "./workspaceConfig-
|
|
6
|
+
import { t as SUPPORTED_CLIS } from "./SUPPORTED_CLIS-Dam11bMz.js";
|
|
7
|
+
import { i as resolveSpawnCwd } from "./workspaceConfig-DT3cCBZK.js";
|
|
8
8
|
import { createHash } from "node:crypto";
|
|
9
9
|
|
|
10
10
|
//#region ts/oxmgrService.ts
|
|
@@ -141,4 +141,4 @@ async function cmdSchedule(rest) {
|
|
|
141
141
|
|
|
142
142
|
//#endregion
|
|
143
143
|
export { cmdSchedule };
|
|
144
|
-
//# sourceMappingURL=schedule-
|
|
144
|
+
//# sourceMappingURL=schedule-BPFBe7R5.js.map
|
|
@@ -1,16 +1,16 @@
|
|
|
1
|
-
import "./ts-
|
|
1
|
+
import "./ts-U3AE4u72.js";
|
|
2
2
|
import "./logger-CDIsZ-Pp.js";
|
|
3
|
-
import { r as getInstalledPackage } from "./versionChecker-
|
|
3
|
+
import { r as getInstalledPackage } from "./versionChecker-B-ToHoJ2.js";
|
|
4
4
|
import "./pidStore-fqXqTKkh.js";
|
|
5
5
|
import { a as updateGlobalPidStatus } from "./globalPidIndex-DlmmJlO8.js";
|
|
6
6
|
import { t as pgidForWrapper } from "./reaper-C-eWAxIj.js";
|
|
7
|
-
import "./configShared-
|
|
8
|
-
import { t as SUPPORTED_CLIS } from "./SUPPORTED_CLIS-
|
|
9
|
-
import "./e2e-
|
|
10
|
-
import "./webrtcLink-
|
|
11
|
-
import "./remotes-
|
|
12
|
-
import { i as resolveSpawnCwd, r as isProvisionAllowed, t as getProvisionRoot } from "./workspaceConfig-
|
|
13
|
-
import {
|
|
7
|
+
import "./configShared-CEyhl0WH.js";
|
|
8
|
+
import { t as SUPPORTED_CLIS } from "./SUPPORTED_CLIS-Dam11bMz.js";
|
|
9
|
+
import "./e2e-Bfw7qL9O.js";
|
|
10
|
+
import "./webrtcLink-CBZkZ-LT.js";
|
|
11
|
+
import "./remotes-DBCvpp3B.js";
|
|
12
|
+
import { i as resolveSpawnCwd, r as isProvisionAllowed, t as getProvisionRoot } from "./workspaceConfig-DT3cCBZK.js";
|
|
13
|
+
import { E as writeToIpc, _ as readPtysize, b as resolveOne, c as extractTaskCounts, g as readNotes, i as controlCodeFromName, m as listRecords, o as deriveLiveStatus, v as renderRawLog, w as snapshotStatus } from "./subcommands-C4tMi9NX.js";
|
|
14
14
|
import yargs from "yargs";
|
|
15
15
|
import { mkdir, open, readFile, stat, writeFile } from "fs/promises";
|
|
16
16
|
import { homedir, hostname, userInfo } from "os";
|
|
@@ -268,15 +268,18 @@ async function cmdServeDaemon(sub, args) {
|
|
|
268
268
|
let shareLink = null;
|
|
269
269
|
let shareLinkMinted = false;
|
|
270
270
|
if (webrtcDaemon) try {
|
|
271
|
-
const { loadOrCreateShareRoom, shareLinkFromRoomUrl } = await import("./share-
|
|
271
|
+
const { loadOrCreateShareRoom, shareLinkFromRoomUrl } = await import("./share-Bq_tDXQU.js");
|
|
272
272
|
const explicit = explicitWebrtcUrl(effArgs);
|
|
273
273
|
shareLink = shareLinkFromRoomUrl(explicit ?? await loadOrCreateShareRoom());
|
|
274
274
|
shareLinkMinted = !explicit;
|
|
275
275
|
} catch {}
|
|
276
|
-
const emitShareLink = () => {
|
|
276
|
+
const emitShareLink = async () => {
|
|
277
277
|
if (!webrtcDaemon) return;
|
|
278
|
-
if (shareLink)
|
|
279
|
-
|
|
278
|
+
if (shareLink) {
|
|
279
|
+
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` : ``));
|
|
280
|
+
const { offerOpenInBrowser } = await import("./openBrowser-CuOlFtow.js");
|
|
281
|
+
await offerOpenInBrowser(shareLink);
|
|
282
|
+
} 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");
|
|
280
283
|
};
|
|
281
284
|
if (priorArgs !== null) {
|
|
282
285
|
const sameConfig = JSON.stringify(effArgs) === JSON.stringify(priorArgs);
|
|
@@ -284,7 +287,7 @@ async function cmdServeDaemon(sub, args) {
|
|
|
284
287
|
if (runningVer === current && sameConfig) {
|
|
285
288
|
await ensureBootAutostart(mgr);
|
|
286
289
|
process.stdout.write(`'${DAEMON_NAME}' already running v${current} (up to date)\n`);
|
|
287
|
-
emitShareLink();
|
|
290
|
+
await emitShareLink();
|
|
288
291
|
return 0;
|
|
289
292
|
}
|
|
290
293
|
process.stdout.write(runningVer === current ? `reconfiguring '${DAEMON_NAME}' (serve args changed)…\n` : `rolling '${DAEMON_NAME}' ${runningVer ? `v${runningVer}` : "(unknown)"} → v${current}…\n`);
|
|
@@ -354,7 +357,7 @@ async function cmdServeDaemon(sub, args) {
|
|
|
354
357
|
}
|
|
355
358
|
process.stdout.write(` ay serve logs # view server logs\n`);
|
|
356
359
|
process.stdout.write(` ay serve uninstall # remove daemon\n`);
|
|
357
|
-
emitShareLink();
|
|
360
|
+
await emitShareLink();
|
|
358
361
|
}
|
|
359
362
|
return code ?? 1;
|
|
360
363
|
}
|
|
@@ -677,7 +680,7 @@ Options:
|
|
|
677
680
|
const status = await deriveLiveStatus(r);
|
|
678
681
|
return {
|
|
679
682
|
...r,
|
|
680
|
-
status,
|
|
683
|
+
status: status !== "exited" && r.unresponsive ? "stuck" : status,
|
|
681
684
|
title: await logTitle(r.log_file),
|
|
682
685
|
git: status === "exited" ? null : await gitStatus(r.cwd),
|
|
683
686
|
tasks: status === "exited" ? null : await logTasks(r.log_file)
|
|
@@ -1210,13 +1213,17 @@ Options:
|
|
|
1210
1213
|
const webrtcVal = argv.webrtc ?? argv.share;
|
|
1211
1214
|
const explicitUrl = typeof webrtcVal === "string" && webrtcVal.startsWith("webrtc://") ? webrtcVal : void 0;
|
|
1212
1215
|
try {
|
|
1213
|
-
const { startShare, loadOrCreateShareRoom } = await import("./share-
|
|
1216
|
+
const { startShare, loadOrCreateShareRoom } = await import("./share-Bq_tDXQU.js");
|
|
1214
1217
|
const linkFile = path.join(process.env.AGENT_YES_HOME ?? path.join(homedir(), ".agent-yes"), ".share-link");
|
|
1215
1218
|
const announce = async (room, link, rotated) => {
|
|
1216
1219
|
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)";
|
|
1217
1220
|
if (process.stdout.isTTY) {
|
|
1218
1221
|
const persistNote = explicitUrl ? "\n" : ` (persistent room — same link across restarts; delete ~/.agent-yes/.share-room to rotate)\n\n`;
|
|
1219
1222
|
process.stdout.write(`${wantHttp ? "\n" : ""}${lead}:\n ${link}\n` + persistNote);
|
|
1223
|
+
if (!rotated) {
|
|
1224
|
+
const { offerOpenInBrowser } = await import("./openBrowser-CuOlFtow.js");
|
|
1225
|
+
await offerOpenInBrowser(link);
|
|
1226
|
+
}
|
|
1220
1227
|
} else {
|
|
1221
1228
|
try {
|
|
1222
1229
|
await writeFile(linkFile, link + "\n", { mode: 384 });
|
|
@@ -1265,4 +1272,4 @@ Options:
|
|
|
1265
1272
|
|
|
1266
1273
|
//#endregion
|
|
1267
1274
|
export { cmdServe };
|
|
1268
|
-
//# sourceMappingURL=serve-
|
|
1275
|
+
//# sourceMappingURL=serve-BYc2J-2F.js.map
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { a as setWorkspaceRoot, n as getWorkspaceRoot } from "./workspaceConfig-
|
|
1
|
+
import { a as setWorkspaceRoot, n as getWorkspaceRoot } from "./workspaceConfig-DT3cCBZK.js";
|
|
2
2
|
import { existsSync } from "node:fs";
|
|
3
3
|
import { stdin, stdout } from "node:process";
|
|
4
4
|
import { createInterface } from "node:readline/promises";
|
|
@@ -32,7 +32,7 @@ async function cmdSetup(rest) {
|
|
|
32
32
|
if (!existsSync(abs)) process.stderr.write(` note: that directory doesn't exist yet — create it, or agents spawned there will fail\n`);
|
|
33
33
|
if (noShare) return 0;
|
|
34
34
|
process.stdout.write(`\nsharing this machine to agent-yes.com…\n`);
|
|
35
|
-
const { cmdServe } = await import("./serve-
|
|
35
|
+
const { cmdServe } = await import("./serve-BYc2J-2F.js");
|
|
36
36
|
return cmdServe([
|
|
37
37
|
"install",
|
|
38
38
|
"--share",
|
|
@@ -42,4 +42,4 @@ async function cmdSetup(rest) {
|
|
|
42
42
|
|
|
43
43
|
//#endregion
|
|
44
44
|
export { cmdSetup };
|
|
45
|
-
//# sourceMappingURL=setup-
|
|
45
|
+
//# sourceMappingURL=setup-D9emVJYz.js.map
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { a as computeTranscriptHash, c as open$1, d as randomHex, f as seal, i as MAX_CHUNK, l as packEnvelope, n as FLAG_CONFIRM, o as deriveAuthToken, p as unpackEnvelope, r as MARKER, s as deriveDirKeys, t as CONFIRM_TIMEOUT_MS, u as parseSecret } from "./e2e-
|
|
1
|
+
import { a as computeTranscriptHash, c as open$1, d as randomHex, f as seal, i as MAX_CHUNK, l as packEnvelope, n as FLAG_CONFIRM, o as deriveAuthToken, p as unpackEnvelope, r as MARKER, s as deriveDirKeys, t as CONFIRM_TIMEOUT_MS, u as parseSecret } from "./e2e-Bfw7qL9O.js";
|
|
2
2
|
import { mkdir, readFile, writeFile } from "fs/promises";
|
|
3
3
|
import { homedir } from "os";
|
|
4
4
|
import path from "path";
|
|
@@ -534,4 +534,4 @@ async function startShare(opts) {
|
|
|
534
534
|
|
|
535
535
|
//#endregion
|
|
536
536
|
export { loadOrCreateShareRoom, shareLinkFromRoomUrl, startShare };
|
|
537
|
-
//# sourceMappingURL=share-
|
|
537
|
+
//# sourceMappingURL=share-Bq_tDXQU.js.map
|