agent-yes 1.193.0 → 1.195.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/dist/{SUPPORTED_CLIS-eK4A0Nql.js → SUPPORTED_CLIS-Bdj9qDRm.js} +2 -2
- package/dist/SUPPORTED_CLIS-Daig8XHX.js +8 -0
- package/dist/{agentShare-C2PSaiaa.js → agentShare-M2jaTMlH.js} +2 -2
- package/dist/cli.js +4 -4
- package/dist/index.js +2 -2
- package/dist/{notifyDaemon-pJJzfvcJ.js → notifyDaemon-D5HwUMxH.js} +2 -2
- package/dist/{rustBinary-BEEvKYm_.js → rustBinary-B4pfibDJ.js} +2 -2
- package/dist/{schedule-BuWv8206.js → schedule-1oS-Yxxa.js} +4 -4
- package/dist/{serve-BrCvRObJ.js → serve-Ce708ALB.js} +44 -13
- package/dist/{setup-CL-giduA.js → setup-fTLT9Bf2.js} +2 -2
- package/dist/subcommands-CV5gqRKq.js +9 -0
- package/dist/{subcommands-CYAk7q_c.js → subcommands-CqB9zo8_.js} +305 -12
- package/dist/{ts-Cg0IpitM.js → ts-DDsICrj-.js} +2 -2
- package/dist/{versionChecker-C_ztEPMs.js → versionChecker-B8qEzYDu.js} +2 -2
- package/lab/ui/index.html +348 -4
- package/lab/ui/sw.js +101 -19
- package/package.json +1 -1
- package/ts/messageLog.spec.ts +145 -0
- package/ts/messageLog.ts +147 -0
- package/ts/serve.ts +60 -8
- package/ts/subcommands.ts +270 -5
- package/dist/SUPPORTED_CLIS-wAOAd_rx.js +0 -8
- package/dist/subcommands-B9-HhxcS.js +0 -9
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { t as CLIS_CONFIG } from "./ts-
|
|
1
|
+
import { t as CLIS_CONFIG } from "./ts-DDsICrj-.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-Bdj9qDRm.js.map
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import "./ts-DDsICrj-.js";
|
|
2
|
+
import "./logger-CDIsZ-Pp.js";
|
|
3
|
+
import "./versionChecker-B8qEzYDu.js";
|
|
4
|
+
import "./pidStore-BIvsBQ8X.js";
|
|
5
|
+
import "./globalPidIndex-CoNr7tS8.js";
|
|
6
|
+
import { t as SUPPORTED_CLIS } from "./SUPPORTED_CLIS-Bdj9qDRm.js";
|
|
7
|
+
|
|
8
|
+
export { SUPPORTED_CLIS };
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import "./logger-CDIsZ-Pp.js";
|
|
2
2
|
import "./globalPidIndex-CoNr7tS8.js";
|
|
3
3
|
import "./configShared-0MnIQ652.js";
|
|
4
|
-
import {
|
|
4
|
+
import { M as resolveOne } from "./subcommands-CqB9zo8_.js";
|
|
5
5
|
import "./e2e-BeKjLhmO.js";
|
|
6
6
|
import "./webrtcLink-BG0Xc4-W.js";
|
|
7
7
|
import "./remotes-oSmwSYaV.js";
|
|
@@ -228,4 +228,4 @@ function transformEvent(rawEvent, agentId, forwarded) {
|
|
|
228
228
|
|
|
229
229
|
//#endregion
|
|
230
230
|
export { createScopedShare, listShares, revokeAllShares, revokeShare };
|
|
231
|
-
//# sourceMappingURL=agentShare-
|
|
231
|
+
//# sourceMappingURL=agentShare-M2jaTMlH.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-B8qEzYDu.js";
|
|
5
|
+
import { n as getRustBinary } from "./rustBinary-B4pfibDJ.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-CV5gqRKq.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-Daig8XHX.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-DDsICrj-.js";
|
|
2
2
|
import "./logger-CDIsZ-Pp.js";
|
|
3
|
-
import "./versionChecker-
|
|
3
|
+
import "./versionChecker-B8qEzYDu.js";
|
|
4
4
|
import "./pidStore-BIvsBQ8X.js";
|
|
5
5
|
import "./globalPidIndex-CoNr7tS8.js";
|
|
6
6
|
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { n as logger } from "./logger-CDIsZ-Pp.js";
|
|
2
2
|
import "./globalPidIndex-CoNr7tS8.js";
|
|
3
3
|
import "./configShared-0MnIQ652.js";
|
|
4
|
-
import {
|
|
4
|
+
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-CqB9zo8_.js";
|
|
5
5
|
import "./e2e-BeKjLhmO.js";
|
|
6
6
|
import "./webrtcLink-BG0Xc4-W.js";
|
|
7
7
|
import "./remotes-oSmwSYaV.js";
|
|
@@ -588,4 +588,4 @@ async function ensureDaemon() {
|
|
|
588
588
|
|
|
589
589
|
//#endregion
|
|
590
590
|
export { daemonStatus, ensureDaemon, requestDaemonStop, runDaemon };
|
|
591
|
-
//# sourceMappingURL=notifyDaemon-
|
|
591
|
+
//# sourceMappingURL=notifyDaemon-D5HwUMxH.js.map
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { r as getInstalledPackage } from "./versionChecker-
|
|
1
|
+
import { r as getInstalledPackage } from "./versionChecker-B8qEzYDu.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-B4pfibDJ.js.map
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import "./ts-
|
|
1
|
+
import "./ts-DDsICrj-.js";
|
|
2
2
|
import "./logger-CDIsZ-Pp.js";
|
|
3
|
-
import "./versionChecker-
|
|
3
|
+
import "./versionChecker-B8qEzYDu.js";
|
|
4
4
|
import "./pidStore-BIvsBQ8X.js";
|
|
5
5
|
import "./globalPidIndex-CoNr7tS8.js";
|
|
6
|
-
import { t as SUPPORTED_CLIS } from "./SUPPORTED_CLIS-
|
|
6
|
+
import { t as SUPPORTED_CLIS } from "./SUPPORTED_CLIS-Bdj9qDRm.js";
|
|
7
7
|
import { d as resolveSpawnCwd } from "./workspaceConfig-_GtAZtsi.js";
|
|
8
8
|
import { n as liveEnv, t as ensureNodeRuntime } from "./nodeRuntime-DZRjxpNp.js";
|
|
9
9
|
import { createHash } from "node:crypto";
|
|
@@ -150,4 +150,4 @@ async function cmdSchedule(rest) {
|
|
|
150
150
|
|
|
151
151
|
//#endregion
|
|
152
152
|
export { cmdSchedule };
|
|
153
|
-
//# sourceMappingURL=schedule-
|
|
153
|
+
//# sourceMappingURL=schedule-1oS-Yxxa.js.map
|
|
@@ -1,13 +1,13 @@
|
|
|
1
|
-
import "./ts-
|
|
1
|
+
import "./ts-DDsICrj-.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-B8qEzYDu.js";
|
|
4
|
+
import { t as findSpawnHiddenLauncher } from "./rustBinary-B4pfibDJ.js";
|
|
5
5
|
import "./pidStore-BIvsBQ8X.js";
|
|
6
6
|
import { a as updateGlobalPidStatus } from "./globalPidIndex-CoNr7tS8.js";
|
|
7
7
|
import { t as pgidForWrapper } from "./reaper-CWF2_ATd.js";
|
|
8
8
|
import "./configShared-0MnIQ652.js";
|
|
9
|
-
import { t as SUPPORTED_CLIS } from "./SUPPORTED_CLIS-
|
|
10
|
-
import {
|
|
9
|
+
import { t as SUPPORTED_CLIS } from "./SUPPORTED_CLIS-Bdj9qDRm.js";
|
|
10
|
+
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, tt as recordInbox, u as extractBadges } from "./subcommands-CqB9zo8_.js";
|
|
11
11
|
import "./e2e-BeKjLhmO.js";
|
|
12
12
|
import "./webrtcLink-BG0Xc4-W.js";
|
|
13
13
|
import "./remotes-oSmwSYaV.js";
|
|
@@ -1165,7 +1165,11 @@ Options:
|
|
|
1165
1165
|
} });
|
|
1166
1166
|
}
|
|
1167
1167
|
if (req.method === "GET" && p === "/api/edges") try {
|
|
1168
|
-
|
|
1168
|
+
const [reads, sends] = await Promise.all([recentReadEdges(), recentMessageEdges()]);
|
|
1169
|
+
return Response.json({
|
|
1170
|
+
reads,
|
|
1171
|
+
sends
|
|
1172
|
+
});
|
|
1169
1173
|
} catch (e) {
|
|
1170
1174
|
return new Response(e.message, { status: 500 });
|
|
1171
1175
|
}
|
|
@@ -1551,7 +1555,7 @@ Options:
|
|
|
1551
1555
|
} catch {
|
|
1552
1556
|
return new Response("invalid JSON body", { status: 400 });
|
|
1553
1557
|
}
|
|
1554
|
-
const { keyword, msg = "", code = "enter" } = body;
|
|
1558
|
+
const { keyword, msg = "", code = "enter", from = null } = body;
|
|
1555
1559
|
if (!keyword || typeof keyword !== "string") return new Response("missing keyword", { status: 400 });
|
|
1556
1560
|
try {
|
|
1557
1561
|
const record = await resolveOne(keyword, defaultOpts());
|
|
@@ -1563,9 +1567,35 @@ Options:
|
|
|
1563
1567
|
await writeToIpc(record.fifo_file, trailing);
|
|
1564
1568
|
} else await writeToIpc(record.fifo_file, msg + trailing);
|
|
1565
1569
|
await noteStdinWrite(record.pid, record.fifo_file, !isTerminalReply(msg));
|
|
1570
|
+
if (msg) {
|
|
1571
|
+
const senderParty = from && typeof from === "object" && typeof from.pid === "number" ? {
|
|
1572
|
+
pid: from.pid,
|
|
1573
|
+
cli: String(from.cli ?? "?"),
|
|
1574
|
+
cwd: String(from.cwd ?? ""),
|
|
1575
|
+
agent_id: from.agent_id ?? void 0
|
|
1576
|
+
} : null;
|
|
1577
|
+
await recordInbox({
|
|
1578
|
+
at: Date.now(),
|
|
1579
|
+
from: senderParty,
|
|
1580
|
+
to: {
|
|
1581
|
+
pid: record.pid,
|
|
1582
|
+
cli: record.cli,
|
|
1583
|
+
cwd: record.cwd,
|
|
1584
|
+
agent_id: record.agent_id
|
|
1585
|
+
},
|
|
1586
|
+
body: msg,
|
|
1587
|
+
code: code.toLowerCase() === "enter" ? void 0 : code.toLowerCase(),
|
|
1588
|
+
confirmed: true,
|
|
1589
|
+
wrapped: false,
|
|
1590
|
+
remote: senderParty ? "wire" : void 0
|
|
1591
|
+
});
|
|
1592
|
+
}
|
|
1566
1593
|
return Response.json({
|
|
1567
1594
|
ok: true,
|
|
1568
|
-
pid: record.pid
|
|
1595
|
+
pid: record.pid,
|
|
1596
|
+
cli: record.cli,
|
|
1597
|
+
cwd: record.cwd,
|
|
1598
|
+
agentId: record.agent_id ?? void 0
|
|
1569
1599
|
});
|
|
1570
1600
|
} catch (e) {
|
|
1571
1601
|
return new Response(e.message, { status: 404 });
|
|
@@ -1893,7 +1923,7 @@ Options:
|
|
|
1893
1923
|
const perm = body.perm ?? "r";
|
|
1894
1924
|
if (perm !== "r" && perm !== "rw") return new Response(`invalid perm ${perm} (want r or rw)`, { status: 400 });
|
|
1895
1925
|
try {
|
|
1896
|
-
const { createScopedShare } = await import("./agentShare-
|
|
1926
|
+
const { createScopedShare } = await import("./agentShare-M2jaTMlH.js");
|
|
1897
1927
|
const share = await createScopedShare({
|
|
1898
1928
|
agent: body.agent,
|
|
1899
1929
|
perm,
|
|
@@ -1908,12 +1938,12 @@ Options:
|
|
|
1908
1938
|
}
|
|
1909
1939
|
}
|
|
1910
1940
|
if (req.method === "GET" && p === "/api/shares") {
|
|
1911
|
-
const { listShares } = await import("./agentShare-
|
|
1941
|
+
const { listShares } = await import("./agentShare-M2jaTMlH.js");
|
|
1912
1942
|
return Response.json(listShares());
|
|
1913
1943
|
}
|
|
1914
1944
|
const revokeM = /^\/api\/share\/([^/]+)$/.exec(p);
|
|
1915
1945
|
if (req.method === "DELETE" && revokeM) {
|
|
1916
|
-
const { revokeShare } = await import("./agentShare-
|
|
1946
|
+
const { revokeShare } = await import("./agentShare-M2jaTMlH.js");
|
|
1917
1947
|
const ok = revokeShare(decodeURIComponent(revokeM[1]));
|
|
1918
1948
|
return new Response(ok ? "revoked" : "no such share", { status: ok ? 200 : 404 });
|
|
1919
1949
|
}
|
|
@@ -1990,6 +2020,7 @@ Options:
|
|
|
1990
2020
|
if (req.method === "GET" && p === "/rtc.js") return serveUiFile("rtc.js", "text/javascript; charset=utf-8");
|
|
1991
2021
|
if (req.method === "GET" && p === "/e2e.js") return serveUiFile("e2e.js", "text/javascript; charset=utf-8");
|
|
1992
2022
|
if (req.method === "GET" && p === "/qrcode.js") return serveUiFile("qrcode.js", "text/javascript; charset=utf-8");
|
|
2023
|
+
if (req.method === "GET" && p === "/sw.js") return serveUiFile("sw.js", "text/javascript; charset=utf-8");
|
|
1993
2024
|
if (req.method === "GET" && p === "/manifest.webmanifest") return serveUiFile("manifest.webmanifest", "application/manifest+json");
|
|
1994
2025
|
if (req.method === "GET" && p === "/icon.svg") return serveUiFile("icon.svg", "image/svg+xml");
|
|
1995
2026
|
if (req.method === "GET" && p === "/favicon.ico") return new Response(null, { status: 204 });
|
|
@@ -2094,7 +2125,7 @@ Options:
|
|
|
2094
2125
|
const shutdown = (resolve) => {
|
|
2095
2126
|
if (heartbeat) clearInterval(heartbeat);
|
|
2096
2127
|
closeShare?.();
|
|
2097
|
-
import("./agentShare-
|
|
2128
|
+
import("./agentShare-M2jaTMlH.js").then((m) => m.revokeAllShares()).catch(() => {});
|
|
2098
2129
|
server?.stop();
|
|
2099
2130
|
resolve();
|
|
2100
2131
|
};
|
|
@@ -2107,4 +2138,4 @@ Options:
|
|
|
2107
2138
|
|
|
2108
2139
|
//#endregion
|
|
2109
2140
|
export { cmdServe };
|
|
2110
|
-
//# sourceMappingURL=serve-
|
|
2141
|
+
//# sourceMappingURL=serve-Ce708ALB.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-Ce708ALB.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-fTLT9Bf2.js.map
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import "./logger-CDIsZ-Pp.js";
|
|
2
|
+
import "./globalPidIndex-CoNr7tS8.js";
|
|
3
|
+
import "./configShared-0MnIQ652.js";
|
|
4
|
+
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-CqB9zo8_.js";
|
|
5
|
+
import "./e2e-BeKjLhmO.js";
|
|
6
|
+
import "./webrtcLink-BG0Xc4-W.js";
|
|
7
|
+
import "./remotes-oSmwSYaV.js";
|
|
8
|
+
|
|
9
|
+
export { cmdHelp, isSubcommand, runSubcommand };
|