agent-yes 1.175.1 → 1.176.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 (47) hide show
  1. package/agent-yes.config.schema.json +2 -2
  2. package/default.config.yaml +45 -0
  3. package/dist/SUPPORTED_CLIS-BC4fOfBC.js +8 -0
  4. package/dist/{SUPPORTED_CLIS-DH7pORiR.js → SUPPORTED_CLIS-TMmgX_p6.js} +2 -2
  5. package/dist/agentShare-DRfghQz8.js +231 -0
  6. package/dist/bash-yes.js +10 -0
  7. package/dist/cli.js +8 -8
  8. package/dist/cmd-yes.js +10 -0
  9. package/dist/{e2e-jb0Hp43q.js → e2e-BeKjLhmO.js} +1 -1
  10. package/dist/{forkNested-DhJxa4q4.js → forkNested-C8q7E6mp.js} +1 -1
  11. package/dist/index.js +2 -2
  12. package/dist/{notifyDaemon-CLRNmdHy.js → notifyDaemon-C08fJ2Ai.js} +5 -5
  13. package/dist/{openBrowser-ChR4llYa.js → openBrowser-BO5RVYwL.js} +1 -1
  14. package/dist/powershell-yes.js +10 -0
  15. package/dist/{remotes-BQMr4_En.js → remotes-BIHNxn1a.js} +3 -3
  16. package/dist/{remotes-CC-4GuJb.js → remotes-DsTnQhyx.js} +3 -3
  17. package/dist/{rustBinary-DSN5ekb5.js → rustBinary-DZTU07SA.js} +2 -2
  18. package/dist/{schedule-DXGDI0Uo.js → schedule-BQtFOk0z.js} +5 -5
  19. package/dist/{serve-DgQjFYQC.js → serve-B5PQdiOb.js} +143 -76
  20. package/dist/{setup-DHVydU-j.js → setup-BCqFNJoB.js} +3 -3
  21. package/dist/{share-QregR8a_.js → share-29YbzpbU.js} +6 -6
  22. package/dist/share-nvqy64A2.js +4 -0
  23. package/dist/{spawnGate-BFhva-2F.js → spawnGate-C5nBiUZQ.js} +1 -1
  24. package/dist/{spawnGate-IJDByl2U.js → spawnGate-Clp9xBPX.js} +2 -2
  25. package/dist/{subcommands-DjA3FgJk.js → subcommands-BbSJ_nTU.js} +736 -714
  26. package/dist/subcommands-BokdtqqC.js +9 -0
  27. package/dist/{tray-DXr7iK3E.js → tray-DKwVRBwr.js} +1 -1
  28. package/dist/{ts-PerHq0yJ.js → ts-Ce7a44Rj.js} +3 -3
  29. package/dist/{versionChecker-CfZx87hW.js → versionChecker-C7C7QAPu.js} +2 -2
  30. package/dist/{webrtcLink-B7REGtK2.js → webrtcLink-BG0Xc4-W.js} +2 -2
  31. package/dist/{webrtcRemote-Bx-eD_0I.js → webrtcRemote-BLEbZnbY.js} +3 -3
  32. package/dist/{workspaceConfig-BgqK-31W.js → workspaceConfig-DKd6UvVm.js} +1 -1
  33. package/lab/ui/index.html +495 -291
  34. package/lab/ui/qrcode.js +2297 -0
  35. package/lab/ui/sw.js +2 -1
  36. package/package.json +8 -2
  37. package/scripts/build-rgui.ts +78 -0
  38. package/ts/agentShare.lifecycle.spec.ts +139 -0
  39. package/ts/agentShare.spec.ts +238 -0
  40. package/ts/agentShare.ts +330 -0
  41. package/ts/forkNested.spec.ts +39 -2
  42. package/ts/index.ts +5 -1
  43. package/ts/serve.ts +119 -5
  44. package/ts/share.ts +10 -3
  45. package/ts/subcommands.ts +29 -0
  46. package/dist/SUPPORTED_CLIS-COSdc1BZ.js +0 -8
  47. package/dist/subcommands-C9u1em-X.js +0 -9
package/ts/subcommands.ts CHANGED
@@ -171,6 +171,29 @@ async function lastReadAt(by: string, target: number): Promise<number | null> {
171
171
  return map.get(`${by}${READS_KEY_SEP}${target}`) ?? null;
172
172
  }
173
173
 
174
+ /** Recent agent→agent read/tail edges (skips "human" readers), for the /rgui
175
+ * relationship-wire view. `by`/`target` are pids. */
176
+ export interface ReadEdge {
177
+ by: number;
178
+ target: number;
179
+ at: number;
180
+ }
181
+ export async function recentReadEdges(windowMs = READ_WINDOW_MS): Promise<ReadEdge[]> {
182
+ const now = Date.now();
183
+ const map = await readReads();
184
+ const out: ReadEdge[] = [];
185
+ for (const [key, at] of map) {
186
+ if (now - at > windowMs) continue;
187
+ const i = key.indexOf(READS_KEY_SEP);
188
+ const by = key.slice(0, i);
189
+ if (!by.startsWith("agent:")) continue; // agent→agent only
190
+ const byPid = Number(by.slice("agent:".length));
191
+ const target = Number(key.slice(i + 1));
192
+ if (byPid && target && byPid !== target) out.push({ by: byPid, target, at });
193
+ }
194
+ return out;
195
+ }
196
+
174
197
  // Identify the sender. An agent launched by `ay` inherits AGENT_YES_PID=<wrapper
175
198
  // pid>; the registered agent record carries that same wrapper_pid, so we map the
176
199
  // env value back to the agent's own canonical record. Falls back to a direct pid
@@ -3189,12 +3212,18 @@ export function stopTipForCli(cli: string, pid: number): string | null {
3189
3212
  /// claude — `/exit`
3190
3213
  /// codex — `/exit`
3191
3214
  /// gemini — `/quit`
3215
+ /// bash/cmd/powershell — `exit` (the shell builtin; closes the session at a
3216
+ /// bare prompt, far cleaner than Ctrl+C which would instead hit whatever
3217
+ /// app is running in the foreground).
3192
3218
  /// Other CLIs aren't in the table because their reliable graceful-exit
3193
3219
  /// command isn't well-known here; `ay stop` falls back to double Ctrl+C.
3194
3220
  export const GRACEFUL_EXIT_COMMANDS: Record<string, string> = {
3195
3221
  claude: "/exit",
3196
3222
  codex: "/exit",
3197
3223
  gemini: "/quit",
3224
+ bash: "exit",
3225
+ cmd: "exit",
3226
+ powershell: "exit",
3198
3227
  };
3199
3228
 
3200
3229
  export function controlCodeFromName(name: string): string {
@@ -1,8 +0,0 @@
1
- import "./ts-PerHq0yJ.js";
2
- import "./logger-CDIsZ-Pp.js";
3
- import "./versionChecker-CfZx87hW.js";
4
- import "./pidStore-BIvsBQ8X.js";
5
- import "./globalPidIndex-CoNr7tS8.js";
6
- import { t as SUPPORTED_CLIS } from "./SUPPORTED_CLIS-DH7pORiR.js";
7
-
8
- export { SUPPORTED_CLIS };
@@ -1,9 +0,0 @@
1
- import "./logger-CDIsZ-Pp.js";
2
- import "./globalPidIndex-CoNr7tS8.js";
3
- import "./configShared-0MnIQ652.js";
4
- import { A as resolveOne, B as writeKeysPaced, C as matchKeyword, D as renderLogTailLines, E as readPtysize, F as snapshotStatus, I as stdinActivityPath, L as stopTipForCli, M as resolveResumeArgs, N as restartHintLines, O as renderRawLog, P as runSubcommand, R as submitAndConfirm, S as listRecords, T as readNotes, V as writeToIpc, _ 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 resolveReadWindow, k as renderRawLogLines, 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 waitForLogQuiet } from "./subcommands-DjA3FgJk.js";
5
- import "./e2e-jb0Hp43q.js";
6
- import "./webrtcLink-B7REGtK2.js";
7
- import "./remotes-CC-4GuJb.js";
8
-
9
- export { cmdHelp, isSubcommand, runSubcommand };