agent-yes 1.211.3-beta.527.1 → 1.211.3
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/dist/{SUPPORTED_CLIS-jvhaZqEP.js → SUPPORTED_CLIS-BppqsQec.js} +2 -2
- package/dist/SUPPORTED_CLIS-Dxj2Q_b3.js +9 -0
- package/dist/{agentShare-7lEjnK_9.js → agentShare-cbONedtw.js} +2 -2
- package/dist/cli.js +4 -4
- package/dist/index.js +2 -2
- package/dist/{notifyDaemon-C8CtJdxK.js → notifyDaemon-BkrCKksX.js} +2 -2
- package/dist/{rustBinary-CHYzH02o.js → rustBinary-oYotD-7H.js} +2 -2
- package/dist/{schedule-rIiBm-On.js → schedule-B-BWbR4a.js} +4 -4
- package/dist/{serve-DoHKVCBn.js → serve-CznlttbS.js} +13 -38
- package/dist/{setup-DycYUuo4.js → setup-veFN34HB.js} +2 -2
- package/dist/{subcommands-DFDq9gA9.js → subcommands-D-TsalTB.js} +1 -1
- package/dist/{subcommands-BNnkYYZK.js → subcommands-DiK7eUJD.js} +7 -7
- package/dist/{ts-CFe-aeR2.js → ts-DynoQKte.js} +2 -2
- package/dist/{versionChecker-NbU-oeN4.js → versionChecker-B6FXmz4I.js} +2 -2
- package/dist/{ws-DBUUr5Y_.js → ws-BdliucQB.js} +2 -2
- package/package.json +1 -1
- package/ts/serve.ts +1 -45
- package/dist/SUPPORTED_CLIS-B_flLWhz.js +0 -9
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { t as CLIS_CONFIG } from "./ts-
|
|
1
|
+
import { t as CLIS_CONFIG } from "./ts-DynoQKte.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-BppqsQec.js.map
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import "./ts-DynoQKte.js";
|
|
2
|
+
import "./logger-CDIsZ-Pp.js";
|
|
3
|
+
import "./versionChecker-B6FXmz4I.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-BppqsQec.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-
|
|
5
|
+
import { M as resolveOne } from "./subcommands-DiK7eUJD.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-
|
|
232
|
+
//# sourceMappingURL=agentShare-cbONedtw.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-
|
|
5
|
-
import { n as getRustBinary } from "./rustBinary-
|
|
4
|
+
import { i as versionString, n as displayVersion, t as checkAndAutoUpdate } from "./versionChecker-B6FXmz4I.js";
|
|
5
|
+
import { n as getRustBinary } from "./rustBinary-oYotD-7H.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-
|
|
288
|
+
const { isSubcommand, runSubcommand, cmdHelp } = await import("./subcommands-D-TsalTB.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-
|
|
330
|
+
const { SUPPORTED_CLIS } = await import("./SUPPORTED_CLIS-Dxj2Q_b3.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-
|
|
1
|
+
import { a as removeControlCharacters, i as AgentContext, n as agentYes, r as config, t as CLIS_CONFIG } from "./ts-DynoQKte.js";
|
|
2
2
|
import "./logger-CDIsZ-Pp.js";
|
|
3
|
-
import "./versionChecker-
|
|
3
|
+
import "./versionChecker-B6FXmz4I.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 daemonLockOwnerPath, G as gcInboxes, J as listInboxParents, K as hostId, Q as daemonLockDir, S as listRecords, W as appendEvent, X as readInbox, Y as liveWatchers, Z as shouldStealLock, _ as isPidAlive, c as deriveLiveState, et as notifyDir, k as renderLogTailLines } from "./subcommands-
|
|
5
|
+
import { $ as daemonLockOwnerPath, G as gcInboxes, J as listInboxParents, K as hostId, Q as daemonLockDir, S as listRecords, W as appendEvent, X as readInbox, Y as liveWatchers, Z as shouldStealLock, _ as isPidAlive, c as deriveLiveState, et as notifyDir, k as renderLogTailLines } from "./subcommands-DiK7eUJD.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-
|
|
592
|
+
//# sourceMappingURL=notifyDaemon-BkrCKksX.js.map
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { r as getInstalledPackage } from "./versionChecker-
|
|
1
|
+
import { r as getInstalledPackage } from "./versionChecker-B6FXmz4I.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-
|
|
228
|
+
//# sourceMappingURL=rustBinary-oYotD-7H.js.map
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import "./ts-
|
|
1
|
+
import "./ts-DynoQKte.js";
|
|
2
2
|
import "./logger-CDIsZ-Pp.js";
|
|
3
|
-
import "./versionChecker-
|
|
3
|
+
import "./versionChecker-B6FXmz4I.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-
|
|
7
|
+
import { t as SUPPORTED_CLIS } from "./SUPPORTED_CLIS-BppqsQec.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-
|
|
154
|
+
//# sourceMappingURL=schedule-B-BWbR4a.js.map
|
|
@@ -1,15 +1,15 @@
|
|
|
1
|
-
import "./ts-
|
|
1
|
+
import "./ts-DynoQKte.js";
|
|
2
2
|
import "./logger-CDIsZ-Pp.js";
|
|
3
|
-
import { r as getInstalledPackage } from "./versionChecker-
|
|
4
|
-
import { t as findSpawnHiddenLauncher } from "./rustBinary-
|
|
3
|
+
import { r as getInstalledPackage } from "./versionChecker-B6FXmz4I.js";
|
|
4
|
+
import { t as findSpawnHiddenLauncher } from "./rustBinary-oYotD-7H.js";
|
|
5
5
|
import { t as agentYesHome$1 } from "./agentYesHome-CtHb5b71.js";
|
|
6
6
|
import "./pidStore-BIvsBQ8X.js";
|
|
7
7
|
import { a as updateGlobalPidStatus } from "./globalPidIndex-CoNr7tS8.js";
|
|
8
8
|
import { r as recordInbox } from "./messageLog-CxrKJj77.js";
|
|
9
9
|
import { t as pgidForWrapper } from "./reaper-BUHCyxdF.js";
|
|
10
10
|
import "./configShared-aKTg-sa5.js";
|
|
11
|
-
import { t as SUPPORTED_CLIS } from "./SUPPORTED_CLIS-
|
|
12
|
-
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, f as extractNeedsInput, k as renderLogTailLines, l as deriveLiveStatus, o as controlCodeFromName, p as extractTaskCounts, q as isTransientLockMkdirError, tt as TYPING_BADGE, u as extractBadges } from "./subcommands-
|
|
11
|
+
import { t as SUPPORTED_CLIS } from "./SUPPORTED_CLIS-BppqsQec.js";
|
|
12
|
+
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, f as extractNeedsInput, k as renderLogTailLines, l as deriveLiveStatus, o as controlCodeFromName, p as extractTaskCounts, q as isTransientLockMkdirError, tt as TYPING_BADGE, u as extractBadges } from "./subcommands-DiK7eUJD.js";
|
|
13
13
|
import "./e2e-jb0Hp43q.js";
|
|
14
14
|
import "./webrtcLink-B7REGtK2.js";
|
|
15
15
|
import "./remotes-Cim0dBU7.js";
|
|
@@ -1511,23 +1511,7 @@ Options:
|
|
|
1511
1511
|
const PRESENCE_TTL_MS = 12e3;
|
|
1512
1512
|
const negoApplied = /* @__PURE__ */ new Map();
|
|
1513
1513
|
const negoTimers = /* @__PURE__ */ new Map();
|
|
1514
|
-
const negoCapsGoneAt = /* @__PURE__ */ new Map();
|
|
1515
1514
|
const NEGO_DEBOUNCE_MS = 350;
|
|
1516
|
-
const NEGO_WITHDRAW_GRACE_MS = 3e4;
|
|
1517
|
-
const hasRealTty = (pid) => {
|
|
1518
|
-
if (process.platform === "win32") return false;
|
|
1519
|
-
try {
|
|
1520
|
-
const out = execFileSync("ps", [
|
|
1521
|
-
"-o",
|
|
1522
|
-
"tty=",
|
|
1523
|
-
"-p",
|
|
1524
|
-
String(pid)
|
|
1525
|
-
], { timeout: 2e3 }).toString().trim();
|
|
1526
|
-
return out !== "" && !out.includes("?");
|
|
1527
|
-
} catch {
|
|
1528
|
-
return false;
|
|
1529
|
-
}
|
|
1530
|
-
};
|
|
1531
1515
|
const winsizePathFor = (pid) => path.join(process.env.AGENT_YES_HOME ?? path.join(homedir(), ".agent-yes"), "winsize", String(pid));
|
|
1532
1516
|
const liveCapsFor = (pid) => {
|
|
1533
1517
|
const now = Date.now();
|
|
@@ -1542,8 +1526,7 @@ Options:
|
|
|
1542
1526
|
const prev = negoApplied.get(pid);
|
|
1543
1527
|
try {
|
|
1544
1528
|
if (eff) {
|
|
1545
|
-
|
|
1546
|
-
if (prev && Math.abs(prev.cols - eff.cols) <= 1 && Math.abs(prev.rows - eff.rows) <= 1) return;
|
|
1529
|
+
if (prev && prev.cols === eff.cols && prev.rows === eff.rows) return;
|
|
1547
1530
|
const content = `${eff.cols} ${eff.rows} ${Date.now()}\n`;
|
|
1548
1531
|
await mkdir(path.dirname(file), { recursive: true });
|
|
1549
1532
|
await writeFile(file, content);
|
|
@@ -1553,15 +1536,7 @@ Options:
|
|
|
1553
1536
|
});
|
|
1554
1537
|
} else {
|
|
1555
1538
|
if (!prev) return;
|
|
1556
|
-
if (!hasRealTty(pid)) return;
|
|
1557
|
-
const gone = negoCapsGoneAt.get(pid);
|
|
1558
|
-
if (!gone) {
|
|
1559
|
-
negoCapsGoneAt.set(pid, Date.now());
|
|
1560
|
-
return;
|
|
1561
|
-
}
|
|
1562
|
-
if (Date.now() - gone < NEGO_WITHDRAW_GRACE_MS) return;
|
|
1563
1539
|
negoApplied.delete(pid);
|
|
1564
|
-
negoCapsGoneAt.delete(pid);
|
|
1565
1540
|
try {
|
|
1566
1541
|
if (await readFile(file, "utf-8") !== prev.content) return;
|
|
1567
1542
|
await unlink(file);
|
|
@@ -1893,7 +1868,7 @@ Options:
|
|
|
1893
1868
|
}
|
|
1894
1869
|
});
|
|
1895
1870
|
if (req.method === "GET" && p === "/api/ws") {
|
|
1896
|
-
const ws = await import("./ws-
|
|
1871
|
+
const ws = await import("./ws-BdliucQB.js");
|
|
1897
1872
|
try {
|
|
1898
1873
|
await ws.loadProvision();
|
|
1899
1874
|
} catch (e) {
|
|
@@ -1913,7 +1888,7 @@ Options:
|
|
|
1913
1888
|
if (req.method === "GET" && p === "/api/ws/status") {
|
|
1914
1889
|
const dirRaw = url.searchParams.get("path");
|
|
1915
1890
|
if (!dirRaw) return new Response("missing ?path=<workspace dir>", { status: 400 });
|
|
1916
|
-
const ws = await import("./ws-
|
|
1891
|
+
const ws = await import("./ws-BdliucQB.js");
|
|
1917
1892
|
let prov;
|
|
1918
1893
|
try {
|
|
1919
1894
|
prov = await ws.loadProvision();
|
|
@@ -2474,7 +2449,7 @@ Options:
|
|
|
2474
2449
|
const perm = body.perm ?? "r";
|
|
2475
2450
|
if (perm !== "r" && perm !== "rw") return new Response(`invalid perm ${perm} (want r or rw)`, { status: 400 });
|
|
2476
2451
|
try {
|
|
2477
|
-
const { createScopedShare } = await import("./agentShare-
|
|
2452
|
+
const { createScopedShare } = await import("./agentShare-cbONedtw.js");
|
|
2478
2453
|
const share = await createScopedShare({
|
|
2479
2454
|
agent: body.agent,
|
|
2480
2455
|
perm,
|
|
@@ -2489,12 +2464,12 @@ Options:
|
|
|
2489
2464
|
}
|
|
2490
2465
|
}
|
|
2491
2466
|
if (req.method === "GET" && p === "/api/shares") {
|
|
2492
|
-
const { listShares } = await import("./agentShare-
|
|
2467
|
+
const { listShares } = await import("./agentShare-cbONedtw.js");
|
|
2493
2468
|
return Response.json(listShares());
|
|
2494
2469
|
}
|
|
2495
2470
|
const revokeM = /^\/api\/share\/([^/]+)$/.exec(p);
|
|
2496
2471
|
if (req.method === "DELETE" && revokeM) {
|
|
2497
|
-
const { revokeShare } = await import("./agentShare-
|
|
2472
|
+
const { revokeShare } = await import("./agentShare-cbONedtw.js");
|
|
2498
2473
|
const ok = revokeShare(decodeURIComponent(revokeM[1]));
|
|
2499
2474
|
return new Response(ok ? "revoked" : "no such share", { status: ok ? 200 : 404 });
|
|
2500
2475
|
}
|
|
@@ -2680,7 +2655,7 @@ Options:
|
|
|
2680
2655
|
const shutdown = (resolve) => {
|
|
2681
2656
|
if (heartbeat) clearInterval(heartbeat);
|
|
2682
2657
|
closeShare?.();
|
|
2683
|
-
import("./agentShare-
|
|
2658
|
+
import("./agentShare-cbONedtw.js").then((m) => m.revokeAllShares()).catch(() => {});
|
|
2684
2659
|
server?.stop();
|
|
2685
2660
|
Promise.resolve(releaseHostLock?.()).catch(() => {}).then(resolve);
|
|
2686
2661
|
};
|
|
@@ -2693,4 +2668,4 @@ Options:
|
|
|
2693
2668
|
|
|
2694
2669
|
//#endregion
|
|
2695
2670
|
export { cmdServe };
|
|
2696
|
-
//# sourceMappingURL=serve-
|
|
2671
|
+
//# sourceMappingURL=serve-CznlttbS.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-
|
|
35
|
+
const { cmdServe } = await import("./serve-CznlttbS.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-veFN34HB.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-
|
|
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-DiK7eUJD.js";
|
|
6
6
|
import "./e2e-jb0Hp43q.js";
|
|
7
7
|
import "./webrtcLink-B7REGtK2.js";
|
|
8
8
|
import "./remotes-Cim0dBU7.js";
|
|
@@ -1237,19 +1237,19 @@ async function runSubcommand(argv) {
|
|
|
1237
1237
|
case "restart": return await cmdRestart(rest);
|
|
1238
1238
|
case "note": return await cmdNote(rest);
|
|
1239
1239
|
case "serve": {
|
|
1240
|
-
const { cmdServe } = await import("./serve-
|
|
1240
|
+
const { cmdServe } = await import("./serve-CznlttbS.js");
|
|
1241
1241
|
return cmdServe(rest);
|
|
1242
1242
|
}
|
|
1243
1243
|
case "setup": {
|
|
1244
|
-
const { cmdSetup } = await import("./setup-
|
|
1244
|
+
const { cmdSetup } = await import("./setup-veFN34HB.js");
|
|
1245
1245
|
return cmdSetup(rest);
|
|
1246
1246
|
}
|
|
1247
1247
|
case "ws": {
|
|
1248
|
-
const { cmdWs } = await import("./ws-
|
|
1248
|
+
const { cmdWs } = await import("./ws-BdliucQB.js");
|
|
1249
1249
|
return cmdWs(rest);
|
|
1250
1250
|
}
|
|
1251
1251
|
case "schedule": {
|
|
1252
|
-
const { cmdSchedule } = await import("./schedule-
|
|
1252
|
+
const { cmdSchedule } = await import("./schedule-B-BWbR4a.js");
|
|
1253
1253
|
return cmdSchedule(rest);
|
|
1254
1254
|
}
|
|
1255
1255
|
case "remote": {
|
|
@@ -4269,7 +4269,7 @@ async function cmdNotify(rest) {
|
|
|
4269
4269
|
}
|
|
4270
4270
|
const ensure = async () => {
|
|
4271
4271
|
if (!argv["ensure-daemon"]) return;
|
|
4272
|
-
const { ensureDaemon } = await import("./notifyDaemon-
|
|
4272
|
+
const { ensureDaemon } = await import("./notifyDaemon-BkrCKksX.js");
|
|
4273
4273
|
await ensureDaemon().catch(() => null);
|
|
4274
4274
|
};
|
|
4275
4275
|
await heartbeatWatcher(parent, selfStartedAt);
|
|
@@ -4343,7 +4343,7 @@ async function cmdNotifyCursor(args) {
|
|
|
4343
4343
|
}
|
|
4344
4344
|
async function cmdNotifyd(rest) {
|
|
4345
4345
|
const sub = rest[0] ?? "status";
|
|
4346
|
-
const daemon = await import("./notifyDaemon-
|
|
4346
|
+
const daemon = await import("./notifyDaemon-BkrCKksX.js");
|
|
4347
4347
|
switch (sub) {
|
|
4348
4348
|
case "run": return daemon.runDaemon();
|
|
4349
4349
|
case "once": return daemon.runDaemon({ once: true });
|
|
@@ -4370,4 +4370,4 @@ async function cmdNotifyd(rest) {
|
|
|
4370
4370
|
|
|
4371
4371
|
//#endregion
|
|
4372
4372
|
export { daemonLockOwnerPath 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, listInboxParents as J, hostId as K, snapshotStatus as L, resolveOne as M, resolveReadWindow as N, recentReadEdges as O, resolveResumeArgs as P, daemonLockDir as Q, stdinActivityPath as R, listRecords as S, readNotes as T, writeToIpc as U, waitForLogQuiet as V, appendEvent as W, readInbox as X, liveWatchers as Y, shouldStealLock as Z, isPidAlive as _, cmdHelp as a, isUserTyping as b, deriveLiveState as c, extractMenu as d, notifyDir 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, isTransientLockMkdirError as q, TYPING_WINDOW_MS as r, cursorAbs as s, GRACEFUL_EXIT_COMMANDS as t, TYPING_BADGE as tt, extractBadges as u, isSlashCommand as v, menuSelectKeys as w, lastStdinAt as x, isSubcommand as y, stopTipForCli as z };
|
|
4373
|
-
//# sourceMappingURL=subcommands-
|
|
4373
|
+
//# sourceMappingURL=subcommands-DiK7eUJD.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-
|
|
2
|
+
import { r as getInstalledPackage } from "./versionChecker-B6FXmz4I.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-
|
|
1904
|
+
//# sourceMappingURL=ts-DynoQKte.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.211.3
|
|
10
|
+
var version = "1.211.3";
|
|
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-
|
|
218
|
+
//# sourceMappingURL=versionChecker-B6FXmz4I.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-
|
|
5
|
+
import { S as listRecords } from "./subcommands-DiK7eUJD.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-
|
|
421
|
+
//# sourceMappingURL=ws-BdliucQB.js.map
|
package/package.json
CHANGED
package/ts/serve.ts
CHANGED
|
@@ -1881,36 +1881,9 @@ export async function cmdServe(rest: string[]): Promise<number> {
|
|
|
1881
1881
|
// died → TTL), the size is withdrawn: the file is deleted ONLY if its content
|
|
1882
1882
|
// is still our own last write (so `ay attach`'s pushed size is never
|
|
1883
1883
|
// clobbered) and the wrapper falls back to the real tty size.
|
|
1884
|
-
//
|
|
1885
|
-
// Two guards keep the withdraw from CAUSING the churn it exists to undo:
|
|
1886
|
-
// • grace: quick switch-away-and-back (⌘↑/⌘↓ cycling) must not reflow the
|
|
1887
|
-
// TUI twice, so the last negotiated size lingers NEGO_WITHDRAW_GRACE_MS
|
|
1888
|
-
// after the final cap leaves before the file is removed.
|
|
1889
|
-
// • headless agents (console-spawned, `ps -o tty=` says "??") have NO real
|
|
1890
|
-
// terminal to yield to — withdrawing would drop the wrapper to its 80×24
|
|
1891
|
-
// default and visibly shrink every future open. For them the negotiated
|
|
1892
|
-
// size persists until the next viewer arrives.
|
|
1893
1884
|
const negoApplied = new Map<number, { cols: number; rows: number; content: string }>();
|
|
1894
1885
|
const negoTimers = new Map<number, ReturnType<typeof setTimeout>>();
|
|
1895
|
-
const negoCapsGoneAt = new Map<number, number>(); // pid → when the last cap left
|
|
1896
1886
|
const NEGO_DEBOUNCE_MS = 350;
|
|
1897
|
-
const NEGO_WITHDRAW_GRACE_MS = 30_000;
|
|
1898
|
-
// Does the agent have a real controlling terminal? Darwin/Linux `ps` prints
|
|
1899
|
-
// "??"/"?" for none. Errors (ps missing, pid gone) and Windows report
|
|
1900
|
-
// "no tty" — the safe side, since withdrawing is what needs a tty to exist.
|
|
1901
|
-
const hasRealTty = (pid: number): boolean => {
|
|
1902
|
-
if (process.platform === "win32") return false;
|
|
1903
|
-
try {
|
|
1904
|
-
const out = execFileSync("ps", ["-o", "tty=", "-p", String(pid)], {
|
|
1905
|
-
timeout: 2000,
|
|
1906
|
-
})
|
|
1907
|
-
.toString()
|
|
1908
|
-
.trim();
|
|
1909
|
-
return out !== "" && !out.includes("?");
|
|
1910
|
-
} catch {
|
|
1911
|
-
return false;
|
|
1912
|
-
}
|
|
1913
|
-
};
|
|
1914
1887
|
const winsizePathFor = (pid: number) =>
|
|
1915
1888
|
path.join(
|
|
1916
1889
|
process.env.AGENT_YES_HOME ?? path.join(homedir(), ".agent-yes"),
|
|
@@ -1932,31 +1905,14 @@ export async function cmdServe(rest: string[]): Promise<number> {
|
|
|
1932
1905
|
const prev = negoApplied.get(pid);
|
|
1933
1906
|
try {
|
|
1934
1907
|
if (eff) {
|
|
1935
|
-
|
|
1936
|
-
// ±1-cell dead band: a viewer's reported capacity jitters by a row/col
|
|
1937
|
-
// between visits (open-time layout vs steady state), and a 1-cell
|
|
1938
|
-
// SIGWINCH reflow on every re-visit is exactly the churn users notice.
|
|
1939
|
-
if (prev && Math.abs(prev.cols - eff.cols) <= 1 && Math.abs(prev.rows - eff.rows) <= 1)
|
|
1940
|
-
return;
|
|
1908
|
+
if (prev && prev.cols === eff.cols && prev.rows === eff.rows) return;
|
|
1941
1909
|
const content = `${eff.cols} ${eff.rows} ${Date.now()}\n`;
|
|
1942
1910
|
await mkdir(path.dirname(file), { recursive: true });
|
|
1943
1911
|
await writeFile(file, content);
|
|
1944
1912
|
negoApplied.set(pid, { ...eff, content });
|
|
1945
1913
|
} else {
|
|
1946
1914
|
if (!prev) return;
|
|
1947
|
-
// Headless agent: nothing to yield to — keep the negotiated size until
|
|
1948
|
-
// the next viewer shows up (the wrapper would otherwise snap to 80×24).
|
|
1949
|
-
if (!hasRealTty(pid)) return;
|
|
1950
|
-
// Grace: hold the size briefly so ⌘-cycling away and back doesn't
|
|
1951
|
-
// reflow the TUI twice. The 5s sweep re-runs this until it expires.
|
|
1952
|
-
const gone = negoCapsGoneAt.get(pid);
|
|
1953
|
-
if (!gone) {
|
|
1954
|
-
negoCapsGoneAt.set(pid, Date.now());
|
|
1955
|
-
return;
|
|
1956
|
-
}
|
|
1957
|
-
if (Date.now() - gone < NEGO_WITHDRAW_GRACE_MS) return;
|
|
1958
1915
|
negoApplied.delete(pid);
|
|
1959
|
-
negoCapsGoneAt.delete(pid);
|
|
1960
1916
|
try {
|
|
1961
1917
|
// withdraw only what we wrote — a different content means ay attach
|
|
1962
1918
|
// (or a direct /api/resize) owns the size now; leave it alone.
|
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
import "./ts-CFe-aeR2.js";
|
|
2
|
-
import "./logger-CDIsZ-Pp.js";
|
|
3
|
-
import "./versionChecker-NbU-oeN4.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-jvhaZqEP.js";
|
|
8
|
-
|
|
9
|
-
export { SUPPORTED_CLIS };
|