agent-yes 1.179.0 → 1.181.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-Do3V3vX8.js +8 -0
- package/dist/{SUPPORTED_CLIS-Lx4_UKX2.js → SUPPORTED_CLIS-Dr9nuhhJ.js} +2 -2
- package/dist/{agentShare-DYQgfwK-.js → agentShare-CO3WvhhK.js} +2 -2
- package/dist/cli.js +4 -4
- package/dist/index.js +2 -2
- package/dist/{notifyDaemon-DUFWVXE_.js → notifyDaemon-RrSGnk8y.js} +2 -2
- package/dist/{rustBinary-BZVl-irH.js → rustBinary-TmEmA8-Z.js} +2 -2
- package/dist/{schedule-7TtW1VLI.js → schedule-Dn21cWJc.js} +4 -4
- package/dist/{serve-CJQoN_zp.js → serve-mgHilzwX.js} +48 -32
- package/dist/{setup-CDhPQcZd.js → setup-C4tV45C-.js} +2 -2
- package/dist/{subcommands-By_1Mwch.js → subcommands-DPesJGLU.js} +6 -6
- package/dist/{subcommands-BfOS62aw.js → subcommands-TgD2PgkV.js} +1 -1
- package/dist/{ts-Dp71mzdg.js → ts-D03587mT.js} +2 -2
- package/dist/{versionChecker-CwY3UG2F.js → versionChecker-Dg5qWFeC.js} +2 -2
- package/package.json +1 -1
- package/ts/serve.ts +42 -11
- package/dist/SUPPORTED_CLIS-f_pXE42d.js +0 -8
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import "./ts-D03587mT.js";
|
|
2
|
+
import "./logger-CDIsZ-Pp.js";
|
|
3
|
+
import "./versionChecker-Dg5qWFeC.js";
|
|
4
|
+
import "./pidStore-BIvsBQ8X.js";
|
|
5
|
+
import "./globalPidIndex-CoNr7tS8.js";
|
|
6
|
+
import { t as SUPPORTED_CLIS } from "./SUPPORTED_CLIS-Dr9nuhhJ.js";
|
|
7
|
+
|
|
8
|
+
export { SUPPORTED_CLIS };
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { t as CLIS_CONFIG } from "./ts-
|
|
1
|
+
import { t as CLIS_CONFIG } from "./ts-D03587mT.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-Dr9nuhhJ.js.map
|
|
@@ -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 { j as resolveOne } from "./subcommands-
|
|
4
|
+
import { j as resolveOne } from "./subcommands-DPesJGLU.js";
|
|
5
5
|
import "./e2e-BeKjLhmO.js";
|
|
6
6
|
import "./webrtcLink-BG0Xc4-W.js";
|
|
7
7
|
import "./remotes-DsTnQhyx.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-CO3WvhhK.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-Dg5qWFeC.js";
|
|
5
|
+
import { n as getRustBinary } from "./rustBinary-TmEmA8-Z.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-TgD2PgkV.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-Do3V3vX8.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-D03587mT.js";
|
|
2
2
|
import "./logger-CDIsZ-Pp.js";
|
|
3
|
-
import "./versionChecker-
|
|
3
|
+
import "./versionChecker-Dg5qWFeC.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 { G as hostId, J as readInbox, K as listInboxParents, O as renderLogTailLines, Q as notifyDir, S as listRecords, U as appendEvent, W as gcInboxes, X as daemonLockDir, Y as shouldStealLock, Z as daemonLockOwnerPath, _ as isPidAlive, c as deriveLiveState, q as liveWatchers } from "./subcommands-
|
|
4
|
+
import { G as hostId, J as readInbox, K as listInboxParents, O as renderLogTailLines, Q as notifyDir, S as listRecords, U as appendEvent, W as gcInboxes, X as daemonLockDir, Y as shouldStealLock, Z as daemonLockOwnerPath, _ as isPidAlive, c as deriveLiveState, q as liveWatchers } from "./subcommands-DPesJGLU.js";
|
|
5
5
|
import "./e2e-BeKjLhmO.js";
|
|
6
6
|
import "./webrtcLink-BG0Xc4-W.js";
|
|
7
7
|
import "./remotes-DsTnQhyx.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-RrSGnk8y.js.map
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { r as getInstalledPackage } from "./versionChecker-
|
|
1
|
+
import { r as getInstalledPackage } from "./versionChecker-Dg5qWFeC.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-TmEmA8-Z.js.map
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import "./ts-
|
|
1
|
+
import "./ts-D03587mT.js";
|
|
2
2
|
import "./logger-CDIsZ-Pp.js";
|
|
3
|
-
import "./versionChecker-
|
|
3
|
+
import "./versionChecker-Dg5qWFeC.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-Dr9nuhhJ.js";
|
|
7
7
|
import { d as resolveSpawnCwd } from "./workspaceConfig-DKd6UvVm.js";
|
|
8
8
|
import { createHash } from "node:crypto";
|
|
9
9
|
|
|
@@ -141,4 +141,4 @@ async function cmdSchedule(rest) {
|
|
|
141
141
|
|
|
142
142
|
//#endregion
|
|
143
143
|
export { cmdSchedule };
|
|
144
|
-
//# sourceMappingURL=schedule-
|
|
144
|
+
//# sourceMappingURL=schedule-Dn21cWJc.js.map
|
|
@@ -1,13 +1,13 @@
|
|
|
1
|
-
import "./ts-
|
|
1
|
+
import "./ts-D03587mT.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-Dg5qWFeC.js";
|
|
4
|
+
import { t as findSpawnHiddenLauncher } from "./rustBinary-TmEmA8-Z.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 { $ as TYPING_BADGE, D as recentReadEdges, E as readPtysize, H as writeToIpc, I as snapshotStatus, O as renderLogTailLines, S as listRecords, T as readNotes, b as isUserTyping, f as extractNeedsInput, j as resolveOne, k as renderRawLog, l as deriveLiveStatus, o as controlCodeFromName, p as extractTaskCounts, u as extractBadges } from "./subcommands-
|
|
9
|
+
import { t as SUPPORTED_CLIS } from "./SUPPORTED_CLIS-Dr9nuhhJ.js";
|
|
10
|
+
import { $ as TYPING_BADGE, D as recentReadEdges, E as readPtysize, H as writeToIpc, I as snapshotStatus, O as renderLogTailLines, S as listRecords, T as readNotes, b as isUserTyping, f as extractNeedsInput, j as resolveOne, k as renderRawLog, l as deriveLiveStatus, o as controlCodeFromName, p as extractTaskCounts, u as extractBadges } from "./subcommands-DPesJGLU.js";
|
|
11
11
|
import "./e2e-BeKjLhmO.js";
|
|
12
12
|
import "./webrtcLink-BG0Xc4-W.js";
|
|
13
13
|
import "./remotes-DsTnQhyx.js";
|
|
@@ -1114,15 +1114,29 @@ Options:
|
|
|
1114
1114
|
};
|
|
1115
1115
|
const byWrapper = new Map(records.map((r) => [r.wrapper_pid ?? r.pid, r.pid]));
|
|
1116
1116
|
const nid = (pid) => `${ns}/${pid}`;
|
|
1117
|
-
const
|
|
1117
|
+
const embedBase = `${url.protocol}//${url.host}`;
|
|
1118
|
+
const NODE_W = 520;
|
|
1119
|
+
const sizeOf = async (pid) => {
|
|
1120
|
+
const s = await readPtysize(pid).catch(() => null);
|
|
1121
|
+
const aspect = s?.cols && s?.rows ? s.cols / (2 * s.rows) : 2;
|
|
1122
|
+
return {
|
|
1123
|
+
w: NODE_W,
|
|
1124
|
+
h: Math.round(Math.min(NODE_W * 2, Math.max(96, NODE_W / aspect)))
|
|
1125
|
+
};
|
|
1126
|
+
};
|
|
1127
|
+
const hintsOf = async (r) => {
|
|
1128
|
+
const embed = { url: `${embedBase}/r/#node=${r.pid}&embed&k=${encodeURIComponent(token)}` };
|
|
1118
1129
|
const lines = await logPreviewLines(r.log_file);
|
|
1119
|
-
if (!lines?.length) return
|
|
1120
|
-
return {
|
|
1121
|
-
|
|
1122
|
-
|
|
1123
|
-
|
|
1124
|
-
|
|
1125
|
-
|
|
1130
|
+
if (!lines?.length) return { embed };
|
|
1131
|
+
return {
|
|
1132
|
+
embed,
|
|
1133
|
+
preview: {
|
|
1134
|
+
kind: "terminal",
|
|
1135
|
+
title: await logTitle(r.log_file) ?? `${r.cli} #${r.pid}`,
|
|
1136
|
+
status: r.status,
|
|
1137
|
+
lines
|
|
1138
|
+
}
|
|
1139
|
+
};
|
|
1126
1140
|
};
|
|
1127
1141
|
const nodes = await Promise.all(records.map(async (r, i) => ({
|
|
1128
1142
|
id: nid(r.pid),
|
|
@@ -1134,16 +1148,13 @@ Options:
|
|
|
1134
1148
|
status: r.status,
|
|
1135
1149
|
parent: r.parent_pid && byWrapper.has(r.parent_pid) ? nid(byWrapper.get(r.parent_pid)) : void 0,
|
|
1136
1150
|
pos: {
|
|
1137
|
-
x: i % 8 *
|
|
1138
|
-
y: Math.floor(i / 8) *
|
|
1139
|
-
},
|
|
1140
|
-
size: {
|
|
1141
|
-
w: 256,
|
|
1142
|
-
h: 128
|
|
1151
|
+
x: i % 8 * (NODE_W + 64),
|
|
1152
|
+
y: Math.floor(i / 8) * 480
|
|
1143
1153
|
},
|
|
1154
|
+
size: await sizeOf(r.pid),
|
|
1144
1155
|
inputs: [textIn],
|
|
1145
1156
|
outputs: [textOut],
|
|
1146
|
-
renderHints: await
|
|
1157
|
+
renderHints: await hintsOf(r)
|
|
1147
1158
|
})));
|
|
1148
1159
|
const codex = records.filter((r) => r.cli === "codex").sort((a, b) => (b.last_active_at ?? 0) - (a.last_active_at ?? 0))[0];
|
|
1149
1160
|
nodes.push({
|
|
@@ -1157,15 +1168,15 @@ Options:
|
|
|
1157
1168
|
parent: void 0,
|
|
1158
1169
|
pos: {
|
|
1159
1170
|
x: 0,
|
|
1160
|
-
y: -
|
|
1171
|
+
y: -560
|
|
1161
1172
|
},
|
|
1162
|
-
size: {
|
|
1163
|
-
w:
|
|
1164
|
-
h:
|
|
1173
|
+
size: codex ? await sizeOf(codex.pid) : {
|
|
1174
|
+
w: NODE_W,
|
|
1175
|
+
h: 260
|
|
1165
1176
|
},
|
|
1166
1177
|
inputs: [textIn],
|
|
1167
1178
|
outputs: [textOut],
|
|
1168
|
-
renderHints: codex ? await
|
|
1179
|
+
renderHints: codex ? await hintsOf(codex) : void 0
|
|
1169
1180
|
});
|
|
1170
1181
|
const present = new Set(nodes.map((n) => n.id));
|
|
1171
1182
|
const edges = (await recentReadEdges()).filter((e) => e.by !== e.target && present.has(nid(e.target)) && present.has(nid(e.by))).map((e) => ({
|
|
@@ -1731,7 +1742,7 @@ Options:
|
|
|
1731
1742
|
const perm = body.perm ?? "r";
|
|
1732
1743
|
if (perm !== "r" && perm !== "rw") return new Response(`invalid perm ${perm} (want r or rw)`, { status: 400 });
|
|
1733
1744
|
try {
|
|
1734
|
-
const { createScopedShare } = await import("./agentShare-
|
|
1745
|
+
const { createScopedShare } = await import("./agentShare-CO3WvhhK.js");
|
|
1735
1746
|
const share = await createScopedShare({
|
|
1736
1747
|
agent: body.agent,
|
|
1737
1748
|
perm,
|
|
@@ -1746,12 +1757,12 @@ Options:
|
|
|
1746
1757
|
}
|
|
1747
1758
|
}
|
|
1748
1759
|
if (req.method === "GET" && p === "/api/shares") {
|
|
1749
|
-
const { listShares } = await import("./agentShare-
|
|
1760
|
+
const { listShares } = await import("./agentShare-CO3WvhhK.js");
|
|
1750
1761
|
return Response.json(listShares());
|
|
1751
1762
|
}
|
|
1752
1763
|
const revokeM = /^\/api\/share\/([^/]+)$/.exec(p);
|
|
1753
1764
|
if (req.method === "DELETE" && revokeM) {
|
|
1754
|
-
const { revokeShare } = await import("./agentShare-
|
|
1765
|
+
const { revokeShare } = await import("./agentShare-CO3WvhhK.js");
|
|
1755
1766
|
const ok = revokeShare(decodeURIComponent(revokeM[1]));
|
|
1756
1767
|
return new Response(ok ? "revoked" : "no such share", { status: ok ? 200 : 404 });
|
|
1757
1768
|
}
|
|
@@ -1772,11 +1783,12 @@ Options:
|
|
|
1772
1783
|
"worker-src 'self'",
|
|
1773
1784
|
"manifest-src 'self'"
|
|
1774
1785
|
].join("; ");
|
|
1775
|
-
const
|
|
1786
|
+
const RGUI_CSP = CONSOLE_CSP.replace("frame-ancestors 'none'", "frame-ancestors *");
|
|
1787
|
+
const serveUiFile = async (name, type, csp = CONSOLE_CSP) => {
|
|
1776
1788
|
try {
|
|
1777
1789
|
const buf = await readFile(path.join(uiDir, name));
|
|
1778
1790
|
const headers = { "Content-Type": type };
|
|
1779
|
-
if (type.includes("text/html")) headers["Content-Security-Policy"] =
|
|
1791
|
+
if (type.includes("text/html")) headers["Content-Security-Policy"] = csp;
|
|
1780
1792
|
return new Response(buf, { headers });
|
|
1781
1793
|
} catch {
|
|
1782
1794
|
return new Response("UI assets not found in this install — use the /api endpoints", { status: 404 });
|
|
@@ -1785,6 +1797,10 @@ Options:
|
|
|
1785
1797
|
const httpFetch = async (req) => {
|
|
1786
1798
|
const p = new URL(req.url).pathname;
|
|
1787
1799
|
if (req.method === "GET" && (p === "/" || p === "/index.html")) return serveUiFile("index.html", "text/html; charset=utf-8");
|
|
1800
|
+
if (req.method === "GET" && p === "/r") return Response.redirect("/r/", 302);
|
|
1801
|
+
if (req.method === "GET" && (p === "/r/" || p === "/r/index.html")) return serveUiFile("rgui/dist/index.html", "text/html; charset=utf-8", RGUI_CSP);
|
|
1802
|
+
if (req.method === "GET" && p === "/r/main.js") return serveUiFile("rgui/dist/main.js", "text/javascript; charset=utf-8");
|
|
1803
|
+
if (req.method === "GET" && p === "/r/main.js.map") return serveUiFile("rgui/dist/main.js.map", "application/json");
|
|
1788
1804
|
if (req.method === "GET" && p === "/room-client.js") return serveUiFile("room-client.js", "text/javascript; charset=utf-8");
|
|
1789
1805
|
if (req.method === "GET" && p === "/console-logic.js") return serveUiFile("console-logic.js", "text/javascript; charset=utf-8");
|
|
1790
1806
|
if (req.method === "GET" && p === "/e2e.js") return serveUiFile("e2e.js", "text/javascript; charset=utf-8");
|
|
@@ -1891,7 +1907,7 @@ Options:
|
|
|
1891
1907
|
const shutdown = (resolve) => {
|
|
1892
1908
|
if (heartbeat) clearInterval(heartbeat);
|
|
1893
1909
|
closeShare?.();
|
|
1894
|
-
import("./agentShare-
|
|
1910
|
+
import("./agentShare-CO3WvhhK.js").then((m) => m.revokeAllShares()).catch(() => {});
|
|
1895
1911
|
server?.stop();
|
|
1896
1912
|
resolve();
|
|
1897
1913
|
};
|
|
@@ -1904,4 +1920,4 @@ Options:
|
|
|
1904
1920
|
|
|
1905
1921
|
//#endregion
|
|
1906
1922
|
export { cmdServe };
|
|
1907
|
-
//# sourceMappingURL=serve-
|
|
1923
|
+
//# sourceMappingURL=serve-mgHilzwX.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-mgHilzwX.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-C4tV45C-.js.map
|
|
@@ -1145,15 +1145,15 @@ async function runSubcommand(argv) {
|
|
|
1145
1145
|
case "restart": return await cmdRestart(rest);
|
|
1146
1146
|
case "note": return await cmdNote(rest);
|
|
1147
1147
|
case "serve": {
|
|
1148
|
-
const { cmdServe } = await import("./serve-
|
|
1148
|
+
const { cmdServe } = await import("./serve-mgHilzwX.js");
|
|
1149
1149
|
return cmdServe(rest);
|
|
1150
1150
|
}
|
|
1151
1151
|
case "setup": {
|
|
1152
|
-
const { cmdSetup } = await import("./setup-
|
|
1152
|
+
const { cmdSetup } = await import("./setup-C4tV45C-.js");
|
|
1153
1153
|
return cmdSetup(rest);
|
|
1154
1154
|
}
|
|
1155
1155
|
case "schedule": {
|
|
1156
|
-
const { cmdSchedule } = await import("./schedule-
|
|
1156
|
+
const { cmdSchedule } = await import("./schedule-Dn21cWJc.js");
|
|
1157
1157
|
return cmdSchedule(rest);
|
|
1158
1158
|
}
|
|
1159
1159
|
case "remote": {
|
|
@@ -3991,7 +3991,7 @@ async function cmdNotify(rest) {
|
|
|
3991
3991
|
}
|
|
3992
3992
|
const ensure = async () => {
|
|
3993
3993
|
if (!argv["ensure-daemon"]) return;
|
|
3994
|
-
const { ensureDaemon } = await import("./notifyDaemon-
|
|
3994
|
+
const { ensureDaemon } = await import("./notifyDaemon-RrSGnk8y.js");
|
|
3995
3995
|
await ensureDaemon().catch(() => null);
|
|
3996
3996
|
};
|
|
3997
3997
|
await heartbeatWatcher(parent, selfStartedAt);
|
|
@@ -4065,7 +4065,7 @@ async function cmdNotifyCursor(args) {
|
|
|
4065
4065
|
}
|
|
4066
4066
|
async function cmdNotifyd(rest) {
|
|
4067
4067
|
const sub = rest[0] ?? "status";
|
|
4068
|
-
const daemon = await import("./notifyDaemon-
|
|
4068
|
+
const daemon = await import("./notifyDaemon-RrSGnk8y.js");
|
|
4069
4069
|
switch (sub) {
|
|
4070
4070
|
case "run": return daemon.runDaemon();
|
|
4071
4071
|
case "once": return daemon.runDaemon({ once: true });
|
|
@@ -4092,4 +4092,4 @@ async function cmdNotifyd(rest) {
|
|
|
4092
4092
|
|
|
4093
4093
|
//#endregion
|
|
4094
4094
|
export { TYPING_BADGE as $, renderRawLogLines as A, waitForLogQuiet as B, matchKeyword as C, recentReadEdges as D, readPtysize as E, runSubcommand as F, hostId as G, writeToIpc as H, snapshotStatus as I, readInbox as J, listInboxParents as K, stdinActivityPath as L, resolveReadWindow as M, resolveResumeArgs as N, renderLogTailLines as O, restartHintLines as P, notifyDir as Q, stopTipForCli as R, listRecords as S, readNotes as T, appendEvent as U, writeKeysPaced as V, gcInboxes as W, daemonLockDir as X, shouldStealLock as Y, daemonLockOwnerPath as Z, isPidAlive as _, cmdHelp as a, isUserTyping as b, deriveLiveState as c, extractMenu as d, extractNeedsInput as f, isExitRequest as g, isAgentStuck as h, backoffWhileTyping as i, resolveOne as j, renderRawLog as k, deriveLiveStatus as l, finalizedLines as m, READ_PAGE_DEFAULT as n, controlCodeFromName as o, extractTaskCounts as p, liveWatchers 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, submitAndConfirm as z };
|
|
4095
|
-
//# sourceMappingURL=subcommands-
|
|
4095
|
+
//# sourceMappingURL=subcommands-DPesJGLU.js.map
|
|
@@ -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 { A as renderRawLogLines, B as waitForLogQuiet, C as matchKeyword, D as recentReadEdges, E as readPtysize, F as runSubcommand, H as writeToIpc, I as snapshotStatus, L as stdinActivityPath, M as resolveReadWindow, N as resolveResumeArgs, O as renderLogTailLines, P as restartHintLines, R as stopTipForCli, S as listRecords, T as readNotes, V as writeKeysPaced, _ 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 resolveOne, k as renderRawLog, 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 submitAndConfirm } from "./subcommands-
|
|
4
|
+
import { A as renderRawLogLines, B as waitForLogQuiet, C as matchKeyword, D as recentReadEdges, E as readPtysize, F as runSubcommand, H as writeToIpc, I as snapshotStatus, L as stdinActivityPath, M as resolveReadWindow, N as resolveResumeArgs, O as renderLogTailLines, P as restartHintLines, R as stopTipForCli, S as listRecords, T as readNotes, V as writeKeysPaced, _ 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 resolveOne, k as renderRawLog, 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 submitAndConfirm } from "./subcommands-DPesJGLU.js";
|
|
5
5
|
import "./e2e-BeKjLhmO.js";
|
|
6
6
|
import "./webrtcLink-BG0Xc4-W.js";
|
|
7
7
|
import "./remotes-DsTnQhyx.js";
|
|
@@ -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-Dg5qWFeC.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";
|
|
@@ -1824,4 +1824,4 @@ function sleep(ms) {
|
|
|
1824
1824
|
|
|
1825
1825
|
//#endregion
|
|
1826
1826
|
export { removeControlCharacters as a, AgentContext as i, agentYes as n, config as r, CLIS_CONFIG as t };
|
|
1827
|
-
//# sourceMappingURL=ts-
|
|
1827
|
+
//# sourceMappingURL=ts-D03587mT.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.
|
|
10
|
+
var version = "1.181.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-
|
|
218
|
+
//# sourceMappingURL=versionChecker-Dg5qWFeC.js.map
|
package/package.json
CHANGED
package/ts/serve.ts
CHANGED
|
@@ -1649,11 +1649,28 @@ export async function cmdServe(rest: string[]): Promise<number> {
|
|
|
1649
1649
|
// renderHints.preview: the REAL agent TUI tail (redacted in
|
|
1650
1650
|
// logPreviewLines), drawn by rgui's federatedTerminalPreview as a live
|
|
1651
1651
|
// terminal card on the mirroring host
|
|
1652
|
-
|
|
1652
|
+
// renderHints.embed: the publisher's own single-agent live view — the
|
|
1653
|
+
// consumer iframes it over the node rect (preview stays the LOD
|
|
1654
|
+
// fallback). Carries the serve token: the feed itself is gated by the
|
|
1655
|
+
// same token, so its consumers hold it already.
|
|
1656
|
+
const embedBase = `${url.protocol}//${url.host}`;
|
|
1657
|
+
// node size mirrors the agent's REAL PTY aspect so a consumer that
|
|
1658
|
+
// derives height from width (otoji chain slots) shows the embed with no
|
|
1659
|
+
// letterboxing. Terminal cells are ~1:2 (w:h), so px aspect = cols/(2*rows).
|
|
1660
|
+
const NODE_W = 520;
|
|
1661
|
+
const sizeOf = async (pid: number) => {
|
|
1662
|
+
const s = await readPtysize(pid).catch(() => null);
|
|
1663
|
+
const aspect = s?.cols && s?.rows ? s.cols / (2 * s.rows) : 2;
|
|
1664
|
+
return { w: NODE_W, h: Math.round(Math.min(NODE_W * 2, Math.max(96, NODE_W / aspect))) };
|
|
1665
|
+
};
|
|
1666
|
+
const hintsOf = async (r: (typeof records)[number]) => {
|
|
1667
|
+
const embed = {
|
|
1668
|
+
url: `${embedBase}/r/#node=${r.pid}&embed&k=${encodeURIComponent(token)}`,
|
|
1669
|
+
};
|
|
1653
1670
|
const lines = await logPreviewLines(r.log_file);
|
|
1654
|
-
if (!lines?.length) return
|
|
1671
|
+
if (!lines?.length) return { embed };
|
|
1655
1672
|
const title = (await logTitle(r.log_file)) ?? `${r.cli} #${r.pid}`;
|
|
1656
|
-
return { preview: { kind: "terminal", title, status: r.status, lines } };
|
|
1673
|
+
return { embed, preview: { kind: "terminal", title, status: r.status, lines } };
|
|
1657
1674
|
};
|
|
1658
1675
|
const nodes = await Promise.all(
|
|
1659
1676
|
records.map(async (r, i) => ({
|
|
@@ -1665,11 +1682,11 @@ export async function cmdServe(rest: string[]): Promise<number> {
|
|
|
1665
1682
|
owner: `agent-yes:${origin}`,
|
|
1666
1683
|
status: r.status,
|
|
1667
1684
|
parent: r.parent_pid && byWrapper.has(r.parent_pid) ? nid(byWrapper.get(r.parent_pid)!) : undefined,
|
|
1668
|
-
pos: { x: (i % 8) *
|
|
1669
|
-
size:
|
|
1685
|
+
pos: { x: (i % 8) * (NODE_W + 64), y: Math.floor(i / 8) * 480 },
|
|
1686
|
+
size: await sizeOf(r.pid),
|
|
1670
1687
|
inputs: [textIn],
|
|
1671
1688
|
outputs: [textOut],
|
|
1672
|
-
renderHints: await
|
|
1689
|
+
renderHints: await hintsOf(r),
|
|
1673
1690
|
})),
|
|
1674
1691
|
);
|
|
1675
1692
|
const codex = records
|
|
@@ -1684,11 +1701,11 @@ export async function cmdServe(rest: string[]): Promise<number> {
|
|
|
1684
1701
|
owner: `agent-yes:${origin}`,
|
|
1685
1702
|
status: codex?.status ?? "offline",
|
|
1686
1703
|
parent: undefined,
|
|
1687
|
-
pos: { x: 0, y: -
|
|
1688
|
-
size: { w:
|
|
1704
|
+
pos: { x: 0, y: -560 },
|
|
1705
|
+
size: codex ? await sizeOf(codex.pid) : { w: NODE_W, h: 260 },
|
|
1689
1706
|
inputs: [textIn],
|
|
1690
1707
|
outputs: [textOut],
|
|
1691
|
-
renderHints: codex ? await
|
|
1708
|
+
renderHints: codex ? await hintsOf(codex) : undefined,
|
|
1692
1709
|
});
|
|
1693
1710
|
const present = new Set(nodes.map((n) => n.id));
|
|
1694
1711
|
const edges = (await recentReadEdges())
|
|
@@ -2606,11 +2623,15 @@ export async function cmdServe(rest: string[]): Promise<number> {
|
|
|
2606
2623
|
"worker-src 'self'",
|
|
2607
2624
|
"manifest-src 'self'",
|
|
2608
2625
|
].join("; ");
|
|
2609
|
-
|
|
2626
|
+
// The /r (rgui) page is embeddable: its #node=<pid>&embed view is the
|
|
2627
|
+
// federation renderHints.embed target, iframed by OTHER rgui hosts over the
|
|
2628
|
+
// node rect — so frame-ancestors opens up, unlike the console's 'none'.
|
|
2629
|
+
const RGUI_CSP = CONSOLE_CSP.replace("frame-ancestors 'none'", "frame-ancestors *");
|
|
2630
|
+
const serveUiFile = async (name: string, type: string, csp = CONSOLE_CSP): Promise<Response> => {
|
|
2610
2631
|
try {
|
|
2611
2632
|
const buf = await readFile(path.join(uiDir, name));
|
|
2612
2633
|
const headers: Record<string, string> = { "Content-Type": type };
|
|
2613
|
-
if (type.includes("text/html")) headers["Content-Security-Policy"] =
|
|
2634
|
+
if (type.includes("text/html")) headers["Content-Security-Policy"] = csp;
|
|
2614
2635
|
return new Response(buf, { headers });
|
|
2615
2636
|
} catch {
|
|
2616
2637
|
return new Response("UI assets not found in this install — use the /api endpoints", {
|
|
@@ -2622,6 +2643,16 @@ export async function cmdServe(rest: string[]): Promise<number> {
|
|
|
2622
2643
|
const p = new URL(req.url).pathname;
|
|
2623
2644
|
if (req.method === "GET" && (p === "/" || p === "/index.html"))
|
|
2624
2645
|
return serveUiFile("index.html", "text/html; charset=utf-8");
|
|
2646
|
+
// /r — the rgui forest page (built to lab/ui/rgui/dist by scripts/build-rgui.ts),
|
|
2647
|
+
// served here so renderHints.embed URLs work with no extra host. Relative
|
|
2648
|
+
// asset paths need the trailing slash, so bare /r redirects.
|
|
2649
|
+
if (req.method === "GET" && p === "/r") return Response.redirect("/r/", 302);
|
|
2650
|
+
if (req.method === "GET" && (p === "/r/" || p === "/r/index.html"))
|
|
2651
|
+
return serveUiFile("rgui/dist/index.html", "text/html; charset=utf-8", RGUI_CSP);
|
|
2652
|
+
if (req.method === "GET" && p === "/r/main.js")
|
|
2653
|
+
return serveUiFile("rgui/dist/main.js", "text/javascript; charset=utf-8");
|
|
2654
|
+
if (req.method === "GET" && p === "/r/main.js.map")
|
|
2655
|
+
return serveUiFile("rgui/dist/main.js.map", "application/json");
|
|
2625
2656
|
if (req.method === "GET" && p === "/room-client.js")
|
|
2626
2657
|
return serveUiFile("room-client.js", "text/javascript; charset=utf-8");
|
|
2627
2658
|
if (req.method === "GET" && p === "/console-logic.js")
|
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
import "./ts-Dp71mzdg.js";
|
|
2
|
-
import "./logger-CDIsZ-Pp.js";
|
|
3
|
-
import "./versionChecker-CwY3UG2F.js";
|
|
4
|
-
import "./pidStore-BIvsBQ8X.js";
|
|
5
|
-
import "./globalPidIndex-CoNr7tS8.js";
|
|
6
|
-
import { t as SUPPORTED_CLIS } from "./SUPPORTED_CLIS-Lx4_UKX2.js";
|
|
7
|
-
|
|
8
|
-
export { SUPPORTED_CLIS };
|