agent-yes 1.175.0 → 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.
- package/agent-yes.config.schema.json +2 -2
- package/default.config.yaml +45 -0
- package/dist/SUPPORTED_CLIS-BC4fOfBC.js +8 -0
- package/dist/{SUPPORTED_CLIS-DOs4OKwx.js → SUPPORTED_CLIS-TMmgX_p6.js} +2 -2
- package/dist/agentShare-DRfghQz8.js +231 -0
- package/dist/bash-yes.js +10 -0
- package/dist/cli.js +8 -8
- package/dist/cmd-yes.js +10 -0
- package/dist/{e2e-jb0Hp43q.js → e2e-BeKjLhmO.js} +1 -1
- package/dist/{forkNested-DhJxa4q4.js → forkNested-C8q7E6mp.js} +1 -1
- package/dist/index.js +2 -2
- package/dist/{notifyDaemon-EQPDGq-K.js → notifyDaemon-C08fJ2Ai.js} +5 -5
- package/dist/{openBrowser-ChR4llYa.js → openBrowser-BO5RVYwL.js} +1 -1
- package/dist/powershell-yes.js +10 -0
- package/dist/{remotes-BQMr4_En.js → remotes-BIHNxn1a.js} +3 -3
- package/dist/{remotes-CC-4GuJb.js → remotes-DsTnQhyx.js} +3 -3
- package/dist/{rustBinary-B5pGAxJj.js → rustBinary-DZTU07SA.js} +2 -2
- package/dist/{schedule-2gVJxKiN.js → schedule-BQtFOk0z.js} +5 -5
- package/dist/{serve-3WOXuTLt.js → serve-B5PQdiOb.js} +143 -76
- package/dist/{setup-CJQPRwIb.js → setup-BCqFNJoB.js} +3 -3
- package/dist/{share-QregR8a_.js → share-29YbzpbU.js} +6 -6
- package/dist/share-nvqy64A2.js +4 -0
- package/dist/{spawnGate-BFhva-2F.js → spawnGate-C5nBiUZQ.js} +1 -1
- package/dist/{spawnGate-IJDByl2U.js → spawnGate-Clp9xBPX.js} +2 -2
- package/dist/{subcommands-CpA7qj-z.js → subcommands-BbSJ_nTU.js} +736 -714
- package/dist/subcommands-BokdtqqC.js +9 -0
- package/dist/{tray-DXr7iK3E.js → tray-DKwVRBwr.js} +1 -1
- package/dist/{ts-DRUpMU-r.js → ts-Ce7a44Rj.js} +3 -3
- package/dist/{versionChecker-0OpVlsRu.js → versionChecker-C7C7QAPu.js} +2 -2
- package/dist/{webrtcLink-B7REGtK2.js → webrtcLink-BG0Xc4-W.js} +2 -2
- package/dist/{webrtcRemote-Bx-eD_0I.js → webrtcRemote-BLEbZnbY.js} +3 -3
- package/dist/{workspaceConfig-BgqK-31W.js → workspaceConfig-DKd6UvVm.js} +1 -1
- package/lab/ui/index.html +495 -291
- package/lab/ui/qrcode.js +2297 -0
- package/lab/ui/sw.js +2 -1
- package/package.json +8 -2
- package/scripts/build-rgui.ts +78 -0
- package/ts/agentShare.lifecycle.spec.ts +139 -0
- package/ts/agentShare.spec.ts +238 -0
- package/ts/agentShare.ts +330 -0
- package/ts/forkNested.spec.ts +39 -2
- package/ts/index.ts +5 -1
- package/ts/serve.ts +119 -5
- package/ts/share.ts +10 -3
- package/ts/subcommands.ts +29 -0
- package/dist/SUPPORTED_CLIS-7XJNuNWe.js +0 -8
- package/dist/subcommands-CkrKWSp8.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-DRUpMU-r.js";
|
|
2
|
-
import "./logger-CDIsZ-Pp.js";
|
|
3
|
-
import "./versionChecker-0OpVlsRu.js";
|
|
4
|
-
import "./pidStore-BIvsBQ8X.js";
|
|
5
|
-
import "./globalPidIndex-CoNr7tS8.js";
|
|
6
|
-
import { t as SUPPORTED_CLIS } from "./SUPPORTED_CLIS-DOs4OKwx.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-CpA7qj-z.js";
|
|
5
|
-
import "./e2e-jb0Hp43q.js";
|
|
6
|
-
import "./webrtcLink-B7REGtK2.js";
|
|
7
|
-
import "./remotes-CC-4GuJb.js";
|
|
8
|
-
|
|
9
|
-
export { cmdHelp, isSubcommand, runSubcommand };
|