claude-yes 1.153.3 → 1.154.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.
Files changed (36) hide show
  1. package/README.md +1 -0
  2. package/agent-yes.config.schema.json +4 -0
  3. package/default.config.yaml +37 -0
  4. package/dist/{SUPPORTED_CLIS-C6McjMNG.js → SUPPORTED_CLIS-DrH6I9zq.js} +2 -2
  5. package/dist/SUPPORTED_CLIS-DzFU0jmz.js +8 -0
  6. package/dist/{agent-yes.config-BKtCmmy9.js → agent-yes.config-Bl08kMpl.js} +2 -2
  7. package/dist/cli.js +5 -5
  8. package/dist/{configShared-C1C04bbq.js → configShared-CEyhl0WH.js} +3 -2
  9. package/dist/{e2e-ClOI_aqV.js → e2e-Bfw7qL9O.js} +1 -1
  10. package/dist/index.js +2 -2
  11. package/dist/openBrowser-CuOlFtow.js +71 -0
  12. package/dist/{remotes-qK6uozO4.js → remotes-DBCvpp3B.js} +3 -3
  13. package/dist/{remotes-5lHLAAqn.js → remotes-DkNuq417.js} +3 -3
  14. package/dist/{schedule-DcA7sTa3.js → schedule-C08WyBm5.js} +5 -5
  15. package/dist/{serve-mqTEc5lf.js → serve-BQ5q0pco.js} +25 -18
  16. package/dist/{setup-DH9OfrvE.js → setup-BaP3-d3q.js} +3 -3
  17. package/dist/{share-ShLKJTUE.js → share-Bq_tDXQU.js} +2 -2
  18. package/dist/{subcommands-DJDAqjXZ.js → subcommands-D3ESmRDW.js} +102 -18
  19. package/dist/subcommands-JGstR1vy.js +9 -0
  20. package/dist/{tray-5Hezw9uj.js → tray-BMzpUSfa.js} +1 -1
  21. package/dist/{ts-CxoYpu9d.js → ts-CUeuWLV4.js} +3 -3
  22. package/dist/{versionChecker-9tOdcQla.js → versionChecker-Z_ZU8BUp.js} +2 -2
  23. package/dist/{webrtcLink-BWhuA74k.js → webrtcLink-CBZkZ-LT.js} +2 -2
  24. package/dist/{webrtcRemote-jGM3ZHK3.js → webrtcRemote-Ccdzmuc-.js} +3 -3
  25. package/dist/{workspaceConfig-B9VX8tVO.js → workspaceConfig-DT3cCBZK.js} +1 -1
  26. package/package.json +1 -1
  27. package/ts/configShared.ts +4 -0
  28. package/ts/globalPidIndex.ts +5 -0
  29. package/ts/index.ts +1 -0
  30. package/ts/openBrowser.spec.ts +130 -0
  31. package/ts/openBrowser.ts +67 -0
  32. package/ts/serve.ts +19 -6
  33. package/ts/subcommands.spec.ts +119 -2
  34. package/ts/subcommands.ts +104 -7
  35. package/dist/SUPPORTED_CLIS-Dog5jYg-.js +0 -8
  36. package/dist/subcommands-yx5caFqh.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)"
@@ -74,6 +74,16 @@ clis:
74
74
  # gap across a line-wrap; `\s+`/`\s*` tolerate wraps inside the phrase.
75
75
  - pattern: 'API Error:[\s\S]{0,40}Response\s+stalled\s+mid-\s*stream'
76
76
  flags: i
77
+ # "API Error: Connection closed mid-response. The response above may be
78
+ # incomplete." — the HTTP/SSE connection dropped before the response
79
+ # finished. Same class as the stalled-mid-stream case (transient, the
80
+ # partial answer is already on screen), so retry with backoff instead of
81
+ # wedging. Same "API Error:" chrome anchor keeps an agent merely
82
+ # *discussing* a dropped connection from self-triggering a retry;
83
+ # `[\s\S]{0,40}` spans the prefix→phrase gap across a line-wrap and
84
+ # `\s+`/`\s*` tolerate wraps inside the phrase.
85
+ - pattern: 'API Error:[\s\S]{0,40}Connection\s+closed\s+mid-\s*response'
86
+ flags: i
77
87
  # Any 5xx API error (e.g. "API Error: 529 Overloaded", "API Error: 503 …",
78
88
  # or a 529 rendered as a raw JSON error blob) is server-side + transient —
79
89
  # retry with backoff regardless of the wording. Anchored to "API Error" so
@@ -88,6 +98,15 @@ clis:
88
98
  flags: i
89
99
  restoreArgs:
90
100
  - --continue
101
+ # resumeCommand (optional): a regex scraped from the agent's log by
102
+ # `ay restart` to resume the exact session when a CLI prints a resume command.
103
+ # Capture group 1 is the argument string (whitespace-split) appended to the
104
+ # relaunched `agent-yes --cli=<cli> …`. The claude family has no printed resume
105
+ # command — it resumes via restoreArgs (--continue) above — so it's left unset.
106
+ # Example for a CLI that prints one:
107
+ # resumeCommand:
108
+ # pattern: 'To resume, run:.*?(--resume \S+)'
109
+ # flags: i
91
110
  restartWithoutContinueArg:
92
111
  - No conversation found to continue
93
112
  exitCommands:
@@ -176,6 +195,15 @@ clis:
176
195
  flags: i
177
196
  restoreArgs:
178
197
  - --continue
198
+ # resumeCommand (optional): a regex scraped from the agent's log by
199
+ # `ay restart` to resume the exact session when a CLI prints a resume command.
200
+ # Capture group 1 is the argument string (whitespace-split) appended to the
201
+ # relaunched `agent-yes --cli=<cli> …`. The claude family has no printed resume
202
+ # command — it resumes via restoreArgs (--continue) above — so it's left unset.
203
+ # Example for a CLI that prints one:
204
+ # resumeCommand:
205
+ # pattern: 'To resume, run:.*?(--resume \S+)'
206
+ # flags: i
179
207
  restartWithoutContinueArg:
180
208
  - No conversation found to continue
181
209
  exitCommands:
@@ -269,6 +297,15 @@ clis:
269
297
  flags: i
270
298
  restoreArgs:
271
299
  - --continue
300
+ # resumeCommand (optional): a regex scraped from the agent's log by
301
+ # `ay restart` to resume the exact session when a CLI prints a resume command.
302
+ # Capture group 1 is the argument string (whitespace-split) appended to the
303
+ # relaunched `agent-yes --cli=<cli> …`. The claude family has no printed resume
304
+ # command — it resumes via restoreArgs (--continue) above — so it's left unset.
305
+ # Example for a CLI that prints one:
306
+ # resumeCommand:
307
+ # pattern: 'To resume, run:.*?(--resume \S+)'
308
+ # flags: i
272
309
  restartWithoutContinueArg:
273
310
  - No conversation found to continue
274
311
  exitCommands:
@@ -1,8 +1,8 @@
1
- import { t as CLIS_CONFIG } from "./ts-CxoYpu9d.js";
1
+ import { t as CLIS_CONFIG } from "./ts-CUeuWLV4.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-C6McjMNG.js.map
8
+ //# sourceMappingURL=SUPPORTED_CLIS-DrH6I9zq.js.map
@@ -0,0 +1,8 @@
1
+ import "./ts-CUeuWLV4.js";
2
+ import "./logger-CDIsZ-Pp.js";
3
+ import "./versionChecker-Z_ZU8BUp.js";
4
+ import "./pidStore-fqXqTKkh.js";
5
+ import "./globalPidIndex-DlmmJlO8.js";
6
+ import { t as SUPPORTED_CLIS } from "./SUPPORTED_CLIS-DrH6I9zq.js";
7
+
8
+ export { SUPPORTED_CLIS };
@@ -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-C1C04bbq.js";
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-BKtCmmy9.js.map
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-9tOdcQla.js";
4
+ import { i as versionString, n as displayVersion, r as getInstalledPackage, t as checkAndAutoUpdate } from "./versionChecker-Z_ZU8BUp.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-yx5caFqh.js");
484
+ const { isSubcommand, runSubcommand, cmdHelp } = await import("./subcommands-JGstR1vy.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-5Hezw9uj.js");
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-5Hezw9uj.js");
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-Dog5jYg-.js");
517
+ const { SUPPORTED_CLIS } = await import("./SUPPORTED_CLIS-DzFU0jmz.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-C1C04bbq.js.map
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-ClOI_aqV.js.map
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-CxoYpu9d.js";
1
+ import { a as removeControlCharacters, i as AgentContext, n as agentYes, r as config, t as CLIS_CONFIG } from "./ts-CUeuWLV4.js";
2
2
  import "./logger-CDIsZ-Pp.js";
3
- import "./versionChecker-9tOdcQla.js";
3
+ import "./versionChecker-Z_ZU8BUp.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-BWhuA74k.js";
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-jGM3ZHK3.js");
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-qK6uozO4.js.map
176
+ //# sourceMappingURL=remotes-DBCvpp3B.js.map
@@ -1,5 +1,5 @@
1
- import "./e2e-ClOI_aqV.js";
2
- import "./webrtcLink-BWhuA74k.js";
3
- import { a as resolveRemoteSpec, i as readRemotes, n as deleteRemoteAlias, o as writeRemoteAlias, r as parseDirectRemoteSpec, t as cmdRemote } from "./remotes-qK6uozO4.js";
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-CxoYpu9d.js";
1
+ import "./ts-CUeuWLV4.js";
2
2
  import "./logger-CDIsZ-Pp.js";
3
- import "./versionChecker-9tOdcQla.js";
3
+ import "./versionChecker-Z_ZU8BUp.js";
4
4
  import "./pidStore-fqXqTKkh.js";
5
5
  import "./globalPidIndex-DlmmJlO8.js";
6
- import { t as SUPPORTED_CLIS } from "./SUPPORTED_CLIS-C6McjMNG.js";
7
- import { i as resolveSpawnCwd } from "./workspaceConfig-B9VX8tVO.js";
6
+ import { t as SUPPORTED_CLIS } from "./SUPPORTED_CLIS-DrH6I9zq.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-DcA7sTa3.js.map
144
+ //# sourceMappingURL=schedule-C08WyBm5.js.map
@@ -1,16 +1,16 @@
1
- import "./ts-CxoYpu9d.js";
1
+ import "./ts-CUeuWLV4.js";
2
2
  import "./logger-CDIsZ-Pp.js";
3
- import { r as getInstalledPackage } from "./versionChecker-9tOdcQla.js";
3
+ import { r as getInstalledPackage } from "./versionChecker-Z_ZU8BUp.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-C1C04bbq.js";
8
- import { t as SUPPORTED_CLIS } from "./SUPPORTED_CLIS-C6McjMNG.js";
9
- import "./e2e-ClOI_aqV.js";
10
- import "./webrtcLink-BWhuA74k.js";
11
- import "./remotes-qK6uozO4.js";
12
- import { i as resolveSpawnCwd, r as isProvisionAllowed, t as getProvisionRoot } from "./workspaceConfig-B9VX8tVO.js";
13
- import { C as snapshotStatus, T 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 } from "./subcommands-DJDAqjXZ.js";
7
+ import "./configShared-CEyhl0WH.js";
8
+ import { t as SUPPORTED_CLIS } from "./SUPPORTED_CLIS-DrH6I9zq.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-D3ESmRDW.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-ShLKJTUE.js");
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) 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` : ``));
279
- 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");
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-ShLKJTUE.js");
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-mqTEc5lf.js.map
1275
+ //# sourceMappingURL=serve-BQ5q0pco.js.map
@@ -1,4 +1,4 @@
1
- import { a as setWorkspaceRoot, n as getWorkspaceRoot } from "./workspaceConfig-B9VX8tVO.js";
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-mqTEc5lf.js");
35
+ const { cmdServe } = await import("./serve-BQ5q0pco.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-DH9OfrvE.js.map
45
+ //# sourceMappingURL=setup-BaP3-d3q.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-ClOI_aqV.js";
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-ShLKJTUE.js.map
537
+ //# sourceMappingURL=share-Bq_tDXQU.js.map