agent-yes 1.200.0 → 1.202.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.
Files changed (38) hide show
  1. package/default.config.yaml +8 -8
  2. package/dist/{SUPPORTED_CLIS-Dt-oEBTl.js → SUPPORTED_CLIS-Cc4YcXL_.js} +2 -2
  3. package/dist/SUPPORTED_CLIS-ChdPabFX.js +9 -0
  4. package/dist/{agentShare-D-9ppbuL.js → agentShare-e4ErqbAZ.js} +2 -2
  5. package/dist/cli.js +4 -4
  6. package/dist/index.js +2 -2
  7. package/dist/{notifyDaemon-CQZ_wPhN.js → notifyDaemon-Bo-RiQ2N.js} +2 -2
  8. package/dist/{rustBinary-C5SrmIUM.js → rustBinary-Dd7-HOFy.js} +2 -2
  9. package/dist/{schedule-lPUt6BkE.js → schedule-Hu3krhNK.js} +4 -4
  10. package/dist/{serve-DlUJ7Hg9.js → serve-D4B43UQC.js} +12 -12
  11. package/dist/{setup-Dalhb8_0.js → setup-hUonzP6V.js} +2 -2
  12. package/dist/{subcommands-g1kLml5I.js → subcommands-DQmW41_L.js} +1 -1
  13. package/dist/{subcommands-DvXyUjWT.js → subcommands-DbiyHGKA.js} +53 -11
  14. package/dist/{ts-Oyau4Eap.js → ts--ZOQIaTr.js} +2 -2
  15. package/dist/{versionChecker-CeLrr-kQ.js → versionChecker-D2egG8Wk.js} +2 -2
  16. package/dist/{ws-DZDjlG3o.js → ws-CygS4IEs.js} +2 -2
  17. package/lab/ui/console-logic.js +32 -2
  18. package/lab/ui/index.html +99 -24
  19. package/lab/ui/qrcode.js +548 -565
  20. package/lab/ui/room-client.js +70 -91
  21. package/lab/ui/sw.js +17 -7
  22. package/package.json +7 -7
  23. package/scripts/build-rgui.ts +3 -1
  24. package/ts/agentShare.spec.ts +5 -3
  25. package/ts/badges.spec.ts +84 -1
  26. package/ts/badges.ts +69 -5
  27. package/ts/notifyDaemon.spec.ts +2 -8
  28. package/ts/notifyDaemon.ts +32 -33
  29. package/ts/notifyInbox.spec.ts +2 -1
  30. package/ts/notifyRouter.spec.ts +7 -11
  31. package/ts/notifyStore.spec.ts +4 -1
  32. package/ts/notifyStore.ts +18 -14
  33. package/ts/serve.spec.ts +4 -6
  34. package/ts/serve.ts +69 -17
  35. package/ts/subcommands.ts +46 -18
  36. package/ts/ws.spec.ts +31 -7
  37. package/ts/ws.ts +15 -4
  38. package/dist/SUPPORTED_CLIS-D8PoWxsA.js +0 -9
@@ -109,7 +109,7 @@ clis:
109
109
  # list ("client ignores rate-limit drop") or an agent's own summary
110
110
  # (INGEST_RATE_LIMIT_PER_MIN) armed the loop and typed "retry" into a
111
111
  # perfectly healthy session.
112
- - pattern: 'API Error.{0,4}429'
112
+ - pattern: "API Error.{0,4}429"
113
113
  flags: i
114
114
  - pattern: 'API Error[\s\S]{0,60}rate.?limit'
115
115
  flags: i
@@ -117,7 +117,7 @@ clis:
117
117
  - hit your usage limit
118
118
  # Session/5-hour limit banners keep the distinctive "… limit reached"
119
119
  # phrase; a bare "session limit" matched ordinary prose.
120
- - pattern: '(session|5-hour) limit reached'
120
+ - pattern: "(session|5-hour) limit reached"
121
121
  flags: i
122
122
  restoreArgs:
123
123
  - --continue
@@ -221,7 +221,7 @@ clis:
221
221
  # list ("client ignores rate-limit drop") or an agent's own summary
222
222
  # (INGEST_RATE_LIMIT_PER_MIN) armed the loop and typed "retry" into a
223
223
  # perfectly healthy session.
224
- - pattern: 'API Error.{0,4}429'
224
+ - pattern: "API Error.{0,4}429"
225
225
  flags: i
226
226
  - pattern: 'API Error[\s\S]{0,60}rate.?limit'
227
227
  flags: i
@@ -229,7 +229,7 @@ clis:
229
229
  - hit your usage limit
230
230
  # Session/5-hour limit banners keep the distinctive "… limit reached"
231
231
  # phrase; a bare "session limit" matched ordinary prose.
232
- - pattern: '(session|5-hour) limit reached'
232
+ - pattern: "(session|5-hour) limit reached"
233
233
  flags: i
234
234
  restoreArgs:
235
235
  - --continue
@@ -338,7 +338,7 @@ clis:
338
338
  # list ("client ignores rate-limit drop") or an agent's own summary
339
339
  # (INGEST_RATE_LIMIT_PER_MIN) armed the loop and typed "retry" into a
340
340
  # perfectly healthy session.
341
- - pattern: 'API Error.{0,4}429'
341
+ - pattern: "API Error.{0,4}429"
342
342
  flags: i
343
343
  - pattern: 'API Error[\s\S]{0,60}rate.?limit'
344
344
  flags: i
@@ -346,7 +346,7 @@ clis:
346
346
  - hit your usage limit
347
347
  # Session/5-hour limit banners keep the distinctive "… limit reached"
348
348
  # phrase; a bare "session limit" matched ordinary prose.
349
- - pattern: '(session|5-hour) limit reached'
349
+ - pattern: "(session|5-hour) limit reached"
350
350
  flags: i
351
351
  restoreArgs:
352
352
  - --continue
@@ -545,7 +545,7 @@ clis:
545
545
  bash:
546
546
  promptArg: typed
547
547
  ready:
548
- - pattern: '[$#] $'
548
+ - pattern: "[$#] $"
549
549
  flags: m
550
550
  working: []
551
551
  enter: []
@@ -570,7 +570,7 @@ clis:
570
570
  powershell:
571
571
  promptArg: typed
572
572
  ready:
573
- - pattern: '^PS .*>'
573
+ - pattern: "^PS .*>"
574
574
  flags: m
575
575
  working: []
576
576
  enter: []
@@ -1,8 +1,8 @@
1
- import { t as CLIS_CONFIG } from "./ts-Oyau4Eap.js";
1
+ import { t as CLIS_CONFIG } from "./ts--ZOQIaTr.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-Dt-oEBTl.js.map
8
+ //# sourceMappingURL=SUPPORTED_CLIS-Cc4YcXL_.js.map
@@ -0,0 +1,9 @@
1
+ import "./ts--ZOQIaTr.js";
2
+ import "./logger-CDIsZ-Pp.js";
3
+ import "./versionChecker-D2egG8Wk.js";
4
+ import "./pidStore-BIvsBQ8X.js";
5
+ import "./globalPidIndex-CoNr7tS8.js";
6
+ import "./messageLog-CxrKJj77.js";
7
+ import { t as SUPPORTED_CLIS } from "./SUPPORTED_CLIS-Cc4YcXL_.js";
8
+
9
+ export { SUPPORTED_CLIS };
@@ -2,7 +2,7 @@ import "./logger-CDIsZ-Pp.js";
2
2
  import "./globalPidIndex-CoNr7tS8.js";
3
3
  import "./messageLog-CxrKJj77.js";
4
4
  import "./configShared-aKTg-sa5.js";
5
- import { M as resolveOne } from "./subcommands-DvXyUjWT.js";
5
+ import { M as resolveOne } from "./subcommands-DbiyHGKA.js";
6
6
  import "./e2e-jb0Hp43q.js";
7
7
  import "./webrtcLink-B7REGtK2.js";
8
8
  import "./remotes-Cim0dBU7.js";
@@ -229,4 +229,4 @@ function transformEvent(rawEvent, agentId, forwarded) {
229
229
 
230
230
  //#endregion
231
231
  export { createScopedShare, listShares, revokeAllShares, revokeShare };
232
- //# sourceMappingURL=agentShare-D-9ppbuL.js.map
232
+ //# sourceMappingURL=agentShare-e4ErqbAZ.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-uqM2YYA7.js";
3
3
  import { n as logger } from "./logger-CDIsZ-Pp.js";
4
- import { i as versionString, n as displayVersion, t as checkAndAutoUpdate } from "./versionChecker-CeLrr-kQ.js";
5
- import { n as getRustBinary } from "./rustBinary-C5SrmIUM.js";
4
+ import { i as versionString, n as displayVersion, t as checkAndAutoUpdate } from "./versionChecker-D2egG8Wk.js";
5
+ import { n as getRustBinary } from "./rustBinary-Dd7-HOFy.js";
6
6
  import { argv } from "process";
7
7
  import { spawn } from "child_process";
8
8
  import ms from "ms";
@@ -285,7 +285,7 @@ function buildRustArgs(argv, cliFromScript, supportedClis) {
285
285
  const rawArg = process.argv[2];
286
286
  const managerCommands = !invokedCliName(process.argv);
287
287
  const isHelpFlag = rawArg === "-h" || rawArg === "--help";
288
- const { isSubcommand, runSubcommand, cmdHelp } = await import("./subcommands-g1kLml5I.js");
288
+ const { isSubcommand, runSubcommand, cmdHelp } = await import("./subcommands-DQmW41_L.js");
289
289
  if (isHelpFlag && process.argv.length === 3) {
290
290
  await cmdHelp(managerCommands);
291
291
  process.exit(0);
@@ -327,7 +327,7 @@ if (config.useRust) {
327
327
  }
328
328
  }
329
329
  if (rustBinary) {
330
- const { SUPPORTED_CLIS } = await import("./SUPPORTED_CLIS-D8PoWxsA.js");
330
+ const { SUPPORTED_CLIS } = await import("./SUPPORTED_CLIS-ChdPabFX.js");
331
331
  const rustArgs = buildRustArgs(process.argv, config.cli, SUPPORTED_CLIS);
332
332
  if (config.verbose) {
333
333
  console.log(`[rust] Using binary: ${rustBinary}`);
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-Oyau4Eap.js";
1
+ import { a as removeControlCharacters, i as AgentContext, n as agentYes, r as config, t as CLIS_CONFIG } from "./ts--ZOQIaTr.js";
2
2
  import "./logger-CDIsZ-Pp.js";
3
- import "./versionChecker-CeLrr-kQ.js";
3
+ import "./versionChecker-D2egG8Wk.js";
4
4
  import "./pidStore-BIvsBQ8X.js";
5
5
  import "./globalPidIndex-CoNr7tS8.js";
6
6
  import "./messageLog-CxrKJj77.js";
@@ -2,7 +2,7 @@ import { n as logger } from "./logger-CDIsZ-Pp.js";
2
2
  import "./globalPidIndex-CoNr7tS8.js";
3
3
  import "./messageLog-CxrKJj77.js";
4
4
  import "./configShared-aKTg-sa5.js";
5
- import { $ as notifyDir, G as gcInboxes, J as liveWatchers, K as hostId, Q as daemonLockOwnerPath, S as listRecords, W as appendEvent, X as shouldStealLock, Y as readInbox, Z as daemonLockDir, _ as isPidAlive, c as deriveLiveState, k as renderLogTailLines, q as listInboxParents } from "./subcommands-DvXyUjWT.js";
5
+ import { $ as notifyDir, G as gcInboxes, J as liveWatchers, K as hostId, Q as daemonLockOwnerPath, S as listRecords, W as appendEvent, X as shouldStealLock, Y as readInbox, Z as daemonLockDir, _ as isPidAlive, c as deriveLiveState, k as renderLogTailLines, q as listInboxParents } from "./subcommands-DbiyHGKA.js";
6
6
  import "./e2e-jb0Hp43q.js";
7
7
  import "./webrtcLink-B7REGtK2.js";
8
8
  import "./remotes-Cim0dBU7.js";
@@ -589,4 +589,4 @@ async function ensureDaemon() {
589
589
 
590
590
  //#endregion
591
591
  export { daemonStatus, ensureDaemon, requestDaemonStop, runDaemon };
592
- //# sourceMappingURL=notifyDaemon-CQZ_wPhN.js.map
592
+ //# sourceMappingURL=notifyDaemon-Bo-RiQ2N.js.map
@@ -1,4 +1,4 @@
1
- import { r as getInstalledPackage } from "./versionChecker-CeLrr-kQ.js";
1
+ import { r as getInstalledPackage } from "./versionChecker-D2egG8Wk.js";
2
2
  import { execFileSync } from "child_process";
3
3
  import { existsSync, mkdirSync, unlinkSync } from "fs";
4
4
  import { chmod, copyFile } from "fs/promises";
@@ -225,4 +225,4 @@ async function getRustBinary(options = {}) {
225
225
 
226
226
  //#endregion
227
227
  export { getRustBinary as n, findSpawnHiddenLauncher as t };
228
- //# sourceMappingURL=rustBinary-C5SrmIUM.js.map
228
+ //# sourceMappingURL=rustBinary-Dd7-HOFy.js.map
@@ -1,10 +1,10 @@
1
- import "./ts-Oyau4Eap.js";
1
+ import "./ts--ZOQIaTr.js";
2
2
  import "./logger-CDIsZ-Pp.js";
3
- import "./versionChecker-CeLrr-kQ.js";
3
+ import "./versionChecker-D2egG8Wk.js";
4
4
  import "./pidStore-BIvsBQ8X.js";
5
5
  import "./globalPidIndex-CoNr7tS8.js";
6
6
  import "./messageLog-CxrKJj77.js";
7
- import { t as SUPPORTED_CLIS } from "./SUPPORTED_CLIS-Dt-oEBTl.js";
7
+ import { t as SUPPORTED_CLIS } from "./SUPPORTED_CLIS-Cc4YcXL_.js";
8
8
  import { d as resolveSpawnCwd } from "./workspaceConfig-CjaRvTjf.js";
9
9
  import { n as liveEnv, t as ensureNodeRuntime } from "./nodeRuntime-CwNJuwH5.js";
10
10
  import { createHash } from "node:crypto";
@@ -151,4 +151,4 @@ async function cmdSchedule(rest) {
151
151
 
152
152
  //#endregion
153
153
  export { cmdSchedule };
154
- //# sourceMappingURL=schedule-lPUt6BkE.js.map
154
+ //# sourceMappingURL=schedule-Hu3krhNK.js.map
@@ -1,14 +1,14 @@
1
- import "./ts-Oyau4Eap.js";
1
+ import "./ts--ZOQIaTr.js";
2
2
  import "./logger-CDIsZ-Pp.js";
3
- import { r as getInstalledPackage } from "./versionChecker-CeLrr-kQ.js";
4
- import { t as findSpawnHiddenLauncher } from "./rustBinary-C5SrmIUM.js";
3
+ import { r as getInstalledPackage } from "./versionChecker-D2egG8Wk.js";
4
+ import { t as findSpawnHiddenLauncher } from "./rustBinary-Dd7-HOFy.js";
5
5
  import "./pidStore-BIvsBQ8X.js";
6
6
  import { a as updateGlobalPidStatus } from "./globalPidIndex-CoNr7tS8.js";
7
7
  import { r as recordInbox } from "./messageLog-CxrKJj77.js";
8
8
  import { t as pgidForWrapper } from "./reaper-BUHCyxdF.js";
9
9
  import "./configShared-aKTg-sa5.js";
10
- import { t as SUPPORTED_CLIS } from "./SUPPORTED_CLIS-Dt-oEBTl.js";
11
- import { A as renderRawLog, D as recentMessageEdges, E as readPtysize, L as snapshotStatus, M as resolveOne, O as recentReadEdges, S as listRecords, T as readNotes, U as writeToIpc, b as isUserTyping, et as TYPING_BADGE, f as extractNeedsInput, k as renderLogTailLines, l as deriveLiveStatus, o as controlCodeFromName, p as extractTaskCounts, u as extractBadges } from "./subcommands-DvXyUjWT.js";
10
+ import { t as SUPPORTED_CLIS } from "./SUPPORTED_CLIS-Cc4YcXL_.js";
11
+ import { A as renderRawLog, D as recentMessageEdges, E as readPtysize, L as snapshotStatus, M as resolveOne, O as recentReadEdges, S as listRecords, T as readNotes, U as writeToIpc, b as isUserTyping, et as TYPING_BADGE, f as extractNeedsInput, k as renderLogTailLines, l as deriveLiveStatus, o as controlCodeFromName, p as extractTaskCounts, u as extractBadges } from "./subcommands-DbiyHGKA.js";
12
12
  import "./e2e-jb0Hp43q.js";
13
13
  import "./webrtcLink-B7REGtK2.js";
14
14
  import "./remotes-Cim0dBU7.js";
@@ -1442,7 +1442,7 @@ Options:
1442
1442
  }
1443
1443
  });
1444
1444
  if (req.method === "GET" && p === "/api/ws") {
1445
- const ws = await import("./ws-DZDjlG3o.js");
1445
+ const ws = await import("./ws-CygS4IEs.js");
1446
1446
  try {
1447
1447
  await ws.loadProvision();
1448
1448
  } catch (e) {
@@ -1462,7 +1462,7 @@ Options:
1462
1462
  if (req.method === "GET" && p === "/api/ws/status") {
1463
1463
  const dirRaw = url.searchParams.get("path");
1464
1464
  if (!dirRaw) return new Response("missing ?path=<workspace dir>", { status: 400 });
1465
- const ws = await import("./ws-DZDjlG3o.js");
1465
+ const ws = await import("./ws-CygS4IEs.js");
1466
1466
  let prov;
1467
1467
  try {
1468
1468
  prov = await ws.loadProvision();
@@ -2018,7 +2018,7 @@ Options:
2018
2018
  const perm = body.perm ?? "r";
2019
2019
  if (perm !== "r" && perm !== "rw") return new Response(`invalid perm ${perm} (want r or rw)`, { status: 400 });
2020
2020
  try {
2021
- const { createScopedShare } = await import("./agentShare-D-9ppbuL.js");
2021
+ const { createScopedShare } = await import("./agentShare-e4ErqbAZ.js");
2022
2022
  const share = await createScopedShare({
2023
2023
  agent: body.agent,
2024
2024
  perm,
@@ -2033,12 +2033,12 @@ Options:
2033
2033
  }
2034
2034
  }
2035
2035
  if (req.method === "GET" && p === "/api/shares") {
2036
- const { listShares } = await import("./agentShare-D-9ppbuL.js");
2036
+ const { listShares } = await import("./agentShare-e4ErqbAZ.js");
2037
2037
  return Response.json(listShares());
2038
2038
  }
2039
2039
  const revokeM = /^\/api\/share\/([^/]+)$/.exec(p);
2040
2040
  if (req.method === "DELETE" && revokeM) {
2041
- const { revokeShare } = await import("./agentShare-D-9ppbuL.js");
2041
+ const { revokeShare } = await import("./agentShare-e4ErqbAZ.js");
2042
2042
  const ok = revokeShare(decodeURIComponent(revokeM[1]));
2043
2043
  return new Response(ok ? "revoked" : "no such share", { status: ok ? 200 : 404 });
2044
2044
  }
@@ -2220,7 +2220,7 @@ Options:
2220
2220
  const shutdown = (resolve) => {
2221
2221
  if (heartbeat) clearInterval(heartbeat);
2222
2222
  closeShare?.();
2223
- import("./agentShare-D-9ppbuL.js").then((m) => m.revokeAllShares()).catch(() => {});
2223
+ import("./agentShare-e4ErqbAZ.js").then((m) => m.revokeAllShares()).catch(() => {});
2224
2224
  server?.stop();
2225
2225
  resolve();
2226
2226
  };
@@ -2233,4 +2233,4 @@ Options:
2233
2233
 
2234
2234
  //#endregion
2235
2235
  export { cmdServe };
2236
- //# sourceMappingURL=serve-DlUJ7Hg9.js.map
2236
+ //# sourceMappingURL=serve-D4B43UQC.js.map
@@ -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-DlUJ7Hg9.js");
35
+ const { cmdServe } = await import("./serve-D4B43UQC.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-Dalhb8_0.js.map
45
+ //# sourceMappingURL=setup-hUonzP6V.js.map
@@ -2,7 +2,7 @@ import "./logger-CDIsZ-Pp.js";
2
2
  import "./globalPidIndex-CoNr7tS8.js";
3
3
  import "./messageLog-CxrKJj77.js";
4
4
  import "./configShared-aKTg-sa5.js";
5
- import { A as renderRawLog, B as submitAndConfirm, C as matchKeyword, D as recentMessageEdges, E as readPtysize, F as restartHintLines, H as writeKeysPaced, I as runSubcommand, L as snapshotStatus, M as resolveOne, N as resolveReadWindow, O as recentReadEdges, P as resolveResumeArgs, R as stdinActivityPath, S as listRecords, T as readNotes, U as writeToIpc, V as waitForLogQuiet, _ as isPidAlive, a as cmdHelp, b as isUserTyping, c as deriveLiveState, d as extractMenu, f as extractNeedsInput, g as isExitRequest, h as isAgentStuck, i as backoffWhileTyping, j as renderRawLogLines, k as renderLogTailLines, l as deriveLiveStatus, m as finalizedLines, n as READ_PAGE_DEFAULT, o as controlCodeFromName, p as extractTaskCounts, r as TYPING_WINDOW_MS, s as cursorAbs, t as GRACEFUL_EXIT_COMMANDS, u as extractBadges, v as isSlashCommand, w as menuSelectKeys, x as lastStdinAt, y as isSubcommand, z as stopTipForCli } from "./subcommands-DvXyUjWT.js";
5
+ import { A as renderRawLog, B as submitAndConfirm, C as matchKeyword, D as recentMessageEdges, E as readPtysize, F as restartHintLines, H as writeKeysPaced, I as runSubcommand, L as snapshotStatus, M as resolveOne, N as resolveReadWindow, O as recentReadEdges, P as resolveResumeArgs, R as stdinActivityPath, S as listRecords, T as readNotes, U as writeToIpc, V as waitForLogQuiet, _ as isPidAlive, a as cmdHelp, b as isUserTyping, c as deriveLiveState, d as extractMenu, f as extractNeedsInput, g as isExitRequest, h as isAgentStuck, i as backoffWhileTyping, j as renderRawLogLines, k as renderLogTailLines, l as deriveLiveStatus, m as finalizedLines, n as READ_PAGE_DEFAULT, o as controlCodeFromName, p as extractTaskCounts, r as TYPING_WINDOW_MS, s as cursorAbs, t as GRACEFUL_EXIT_COMMANDS, u as extractBadges, v as isSlashCommand, w as menuSelectKeys, x as lastStdinAt, y as isSubcommand, z as stopTipForCli } from "./subcommands-DbiyHGKA.js";
6
6
  import "./e2e-jb0Hp43q.js";
7
7
  import "./webrtcLink-B7REGtK2.js";
8
8
  import "./remotes-Cim0dBU7.js";
@@ -182,15 +182,45 @@ const BADGE_DEFS = [
182
182
  label: "retry",
183
183
  title: "Waiting for the API — the CLI is auto-retrying on its own backoff (no action needed)",
184
184
  pattern: /Waiting for API response[\s\S]{0,40}will retry in \d/i
185
+ },
186
+ {
187
+ id: "shells",
188
+ label: "$1",
189
+ title: "Background shells running in this session ($1 in the CLI footer)",
190
+ pattern: /· (\d+ shells?)(?= ·|\s*$)/m
191
+ },
192
+ {
193
+ id: "monitors",
194
+ label: "$1",
195
+ title: "Active Monitor watchers in this session ($1 in the CLI footer)",
196
+ pattern: /· (\d+ monitors?)(?= ·|\s*$)/m
197
+ },
198
+ {
199
+ id: "bg-agents",
200
+ label: "$1",
201
+ title: "Background subagents running in this session ($1 in the CLI footer)",
202
+ pattern: /← (\d+ agents?)(?= ·|\s*$)/m
203
+ },
204
+ {
205
+ id: "pr",
206
+ label: "$1",
207
+ title: "This session is linked to a GitHub pull request ($1 in the CLI footer)",
208
+ pattern: /· (PR #\d+)(?= ·|\s*$)/m
185
209
  }
186
210
  ];
187
211
  /**
188
212
  * Which badge ids match the given rendered screen lines. Pure so it's
189
- * unit-tested without a live PTY/log file.
213
+ * unit-tested without a live PTY/log file. A def whose pattern captured a
214
+ * group yields `id:capture` (e.g. "shells:4 shells") so the count travels
215
+ * with the id over the wire; static defs yield the bare id as before.
190
216
  */
191
217
  function matchBadges(lines, defs = BADGE_DEFS) {
192
218
  const text = lines.join("\n");
193
- return defs.filter((d) => d.pattern.test(text)).map((d) => d.id);
219
+ return defs.flatMap((d) => {
220
+ const m = d.pattern.exec(text);
221
+ if (!m) return [];
222
+ return [m[1] !== void 0 ? `${d.id}:${m[1]}` : d.id];
223
+ });
194
224
  }
195
225
  /**
196
226
  * A time-derived flag (NOT screen-matched): lit when the user typed at this
@@ -206,7 +236,19 @@ const TYPING_BADGE = {
206
236
  pattern: /(?!)/
207
237
  };
208
238
  function badgeDef(id, defs = BADGE_DEFS) {
209
- return defs.find((d) => d.id === id) ?? (id === TYPING_BADGE.id ? TYPING_BADGE : void 0);
239
+ const base = id.includes(":") ? id.slice(0, id.indexOf(":")) : id;
240
+ return defs.find((d) => d.id === base) ?? (base === TYPING_BADGE.id ? TYPING_BADGE : void 0);
241
+ }
242
+ /**
243
+ * Rendered chip text for a (possibly dynamic) badge id: resolves the def and
244
+ * substitutes `$1` in its label with the id's captured text. Unknown ids fall
245
+ * back to the raw id so a newer server's badge never renders blank.
246
+ */
247
+ function badgeLabel(id, defs = BADGE_DEFS) {
248
+ const def = badgeDef(id, defs);
249
+ if (!def) return id;
250
+ const arg = id.includes(":") ? id.slice(id.indexOf(":") + 1) : "";
251
+ return def.label.includes("$1") ? def.label.replace("$1", arg) : def.label;
210
252
  }
211
253
 
212
254
  //#endregion
@@ -1184,19 +1226,19 @@ async function runSubcommand(argv) {
1184
1226
  case "restart": return await cmdRestart(rest);
1185
1227
  case "note": return await cmdNote(rest);
1186
1228
  case "serve": {
1187
- const { cmdServe } = await import("./serve-DlUJ7Hg9.js");
1229
+ const { cmdServe } = await import("./serve-D4B43UQC.js");
1188
1230
  return cmdServe(rest);
1189
1231
  }
1190
1232
  case "setup": {
1191
- const { cmdSetup } = await import("./setup-Dalhb8_0.js");
1233
+ const { cmdSetup } = await import("./setup-hUonzP6V.js");
1192
1234
  return cmdSetup(rest);
1193
1235
  }
1194
1236
  case "ws": {
1195
- const { cmdWs } = await import("./ws-DZDjlG3o.js");
1237
+ const { cmdWs } = await import("./ws-CygS4IEs.js");
1196
1238
  return cmdWs(rest);
1197
1239
  }
1198
1240
  case "schedule": {
1199
- const { cmdSchedule } = await import("./schedule-lPUt6BkE.js");
1241
+ const { cmdSchedule } = await import("./schedule-Hu3krhNK.js");
1200
1242
  return cmdSchedule(rest);
1201
1243
  }
1202
1244
  case "remote": {
@@ -1833,7 +1875,7 @@ function branchLabel(g) {
1833
1875
  */
1834
1876
  function badgeLabels(ids) {
1835
1877
  if (!ids || ids.length === 0) return "";
1836
- return ids.map((id) => badgeDef(id)?.label ?? id).join(" ");
1878
+ return ids.map((id) => badgeLabel(id)).join(" ");
1837
1879
  }
1838
1880
  function parseGitStatus(out) {
1839
1881
  let branch = null;
@@ -4216,7 +4258,7 @@ async function cmdNotify(rest) {
4216
4258
  }
4217
4259
  const ensure = async () => {
4218
4260
  if (!argv["ensure-daemon"]) return;
4219
- const { ensureDaemon } = await import("./notifyDaemon-CQZ_wPhN.js");
4261
+ const { ensureDaemon } = await import("./notifyDaemon-Bo-RiQ2N.js");
4220
4262
  await ensureDaemon().catch(() => null);
4221
4263
  };
4222
4264
  await heartbeatWatcher(parent, selfStartedAt);
@@ -4290,7 +4332,7 @@ async function cmdNotifyCursor(args) {
4290
4332
  }
4291
4333
  async function cmdNotifyd(rest) {
4292
4334
  const sub = rest[0] ?? "status";
4293
- const daemon = await import("./notifyDaemon-CQZ_wPhN.js");
4335
+ const daemon = await import("./notifyDaemon-Bo-RiQ2N.js");
4294
4336
  switch (sub) {
4295
4337
  case "run": return daemon.runDaemon();
4296
4338
  case "once": return daemon.runDaemon({ once: true });
@@ -4317,4 +4359,4 @@ async function cmdNotifyd(rest) {
4317
4359
 
4318
4360
  //#endregion
4319
4361
  export { notifyDir as $, renderRawLog as A, submitAndConfirm as B, matchKeyword as C, recentMessageEdges as D, readPtysize as E, restartHintLines as F, gcInboxes as G, writeKeysPaced as H, runSubcommand as I, liveWatchers as J, hostId as K, snapshotStatus as L, resolveOne as M, resolveReadWindow as N, recentReadEdges as O, resolveResumeArgs as P, daemonLockOwnerPath as Q, stdinActivityPath as R, listRecords as S, readNotes as T, writeToIpc as U, waitForLogQuiet as V, appendEvent as W, shouldStealLock as X, readInbox as Y, daemonLockDir as Z, isPidAlive as _, cmdHelp as a, isUserTyping as b, deriveLiveState as c, extractMenu as d, TYPING_BADGE as et, extractNeedsInput as f, isExitRequest as g, isAgentStuck as h, backoffWhileTyping as i, renderRawLogLines as j, renderLogTailLines as k, deriveLiveStatus as l, finalizedLines as m, READ_PAGE_DEFAULT as n, controlCodeFromName as o, extractTaskCounts as p, listInboxParents as q, TYPING_WINDOW_MS as r, cursorAbs as s, GRACEFUL_EXIT_COMMANDS as t, extractBadges as u, isSlashCommand as v, menuSelectKeys as w, lastStdinAt as x, isSubcommand as y, stopTipForCli as z };
4320
- //# sourceMappingURL=subcommands-DvXyUjWT.js.map
4362
+ //# sourceMappingURL=subcommands-DbiyHGKA.js.map
@@ -1,5 +1,5 @@
1
1
  import { n as logger, t as addTransport } from "./logger-CDIsZ-Pp.js";
2
- import { r as getInstalledPackage } from "./versionChecker-CeLrr-kQ.js";
2
+ import { r as getInstalledPackage } from "./versionChecker-D2egG8Wk.js";
3
3
  import { t as agentYesHome } from "./agentYesHome-CtHb5b71.js";
4
4
  import { i as shouldUseLock, r as releaseLock, t as acquireLock } from "./runningLock-CNMl13dC.js";
5
5
  import { t as PidStore } from "./pidStore-BIvsBQ8X.js";
@@ -1901,4 +1901,4 @@ function sleep(ms) {
1901
1901
 
1902
1902
  //#endregion
1903
1903
  export { removeControlCharacters as a, AgentContext as i, agentYes as n, config as r, CLIS_CONFIG as t };
1904
- //# sourceMappingURL=ts-Oyau4Eap.js.map
1904
+ //# sourceMappingURL=ts--ZOQIaTr.js.map
@@ -7,7 +7,7 @@ import { fileURLToPath } from "url";
7
7
 
8
8
  //#region package.json
9
9
  var name = "agent-yes";
10
- var version = "1.200.0";
10
+ var version = "1.202.0";
11
11
 
12
12
  //#endregion
13
13
  //#region ts/versionChecker.ts
@@ -215,4 +215,4 @@ async function displayVersion() {
215
215
 
216
216
  //#endregion
217
217
  export { versionString as i, displayVersion as n, getInstalledPackage as r, checkAndAutoUpdate as t };
218
- //# sourceMappingURL=versionChecker-CeLrr-kQ.js.map
218
+ //# sourceMappingURL=versionChecker-D2egG8Wk.js.map
@@ -2,7 +2,7 @@ import "./logger-CDIsZ-Pp.js";
2
2
  import "./globalPidIndex-CoNr7tS8.js";
3
3
  import "./messageLog-CxrKJj77.js";
4
4
  import "./configShared-aKTg-sa5.js";
5
- import { S as listRecords } from "./subcommands-DvXyUjWT.js";
5
+ import { S as listRecords } from "./subcommands-DbiyHGKA.js";
6
6
  import "./e2e-jb0Hp43q.js";
7
7
  import "./webrtcLink-B7REGtK2.js";
8
8
  import "./remotes-Cim0dBU7.js";
@@ -418,4 +418,4 @@ async function cmdWs(args) {
418
418
 
419
419
  //#endregion
420
420
  export { WS_JSON_SCHEMA, cmdWs, collectWorkspaces, isPathInside, loadProvision, workspaceStatus };
421
- //# sourceMappingURL=ws-DZDjlG3o.js.map
421
+ //# sourceMappingURL=ws-CygS4IEs.js.map
@@ -199,13 +199,42 @@ export const BADGE_META = {
199
199
  label: "typing",
200
200
  title: "The user is typing at this agent's terminal — ay send backs off until they pause",
201
201
  },
202
+ // Dynamic footer counters: the wire id carries the captured footer text
203
+ // after a ":" ("shells:4 shells") and "$1" below is substituted with it,
204
+ // so the chip reads exactly like the CLI footer ("1 shell", "PR #310").
205
+ shells: {
206
+ label: "$1",
207
+ title: "Background shells running in this session ($1 in the CLI footer)",
208
+ },
209
+ monitors: {
210
+ label: "$1",
211
+ title: "Active Monitor watchers in this session ($1 in the CLI footer)",
212
+ },
213
+ "bg-agents": {
214
+ label: "$1",
215
+ title: "Background subagents running in this session ($1 in the CLI footer)",
216
+ },
217
+ pr: {
218
+ label: "$1",
219
+ title: "This session is linked to a GitHub pull request ($1 in the CLI footer)",
220
+ },
202
221
  };
203
222
 
204
223
  // Status-flag chips ("badges") matched against the agent's screen — e.g. an
205
224
  // active /goal loop. [] when e.badges is missing/empty. Returns
206
225
  // { id, label, title } objects ready for the caller to render as chips.
226
+ // Dynamic ids ("shells:4 shells") resolve their meta by the part before the
227
+ // ":" and substitute the rest into "$1" in the label/title; the returned id
228
+ // stays the raw wire value so chips key uniquely.
207
229
  export function badgesFor(e) {
208
- return (e.badges || []).map((id) => ({ id, ...(BADGE_META[id] || { label: id, title: id }) }));
230
+ return (e.badges || []).map((raw) => {
231
+ const i = raw.indexOf(":");
232
+ const base = i === -1 ? raw : raw.slice(0, i);
233
+ const arg = i === -1 ? "" : raw.slice(i + 1);
234
+ const meta = BADGE_META[base] || { label: raw, title: raw };
235
+ const sub = (s) => (s.includes("$1") ? s.replace("$1", arg) : s);
236
+ return { id: raw, label: sub(meta.label), title: sub(meta.title) };
237
+ });
209
238
  }
210
239
 
211
240
  // Time since the agent was last active ("12s" / "5m" / "3h") — measured from
@@ -402,7 +431,8 @@ export function sortEntries(entries, mode = "state") {
402
431
  ? byNewest
403
432
  : mode === "identity"
404
433
  ? (a, b) => fullIdent(a).localeCompare(fullIdent(b)) || byNewest(a, b)
405
- : (a, b) => stateRank(a) - stateRank(b) || gitWeight(b) - gitWeight(a) || byNewest(a, b);
434
+ : (a, b) =>
435
+ stateRank(a) - stateRank(b) || gitWeight(b) - gitWeight(a) || byNewest(a, b);
406
436
  return entries.slice().sort(cmp);
407
437
  }
408
438