agent-yes 1.216.0 → 1.217.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-Bms-e6S8.js → SUPPORTED_CLIS-DAcpPKu6.js} +2 -2
- package/dist/SUPPORTED_CLIS-uJt4UKxf.js +9 -0
- package/dist/{agentShare-BQWed3Cs.js → agentShare-BTKi7ZJO.js} +2 -2
- package/dist/cli.js +4 -4
- package/dist/index.js +2 -2
- package/dist/{notifyDaemon-du_MTavX.js → notifyDaemon-C4qUwHy5.js} +2 -2
- package/dist/{rustBinary-BolKhxtk.js → rustBinary-DlNyFqnj.js} +2 -2
- package/dist/{schedule-GzK6adNZ.js → schedule-CYgAEFKs.js} +4 -4
- package/dist/{serve-y8qVS3QJ.js → serve-BlvTwJg1.js} +13 -13
- package/dist/{setup-PM8qJZMa.js → setup-DuRamcir.js} +2 -2
- package/dist/{subcommands-D8HQ6HTC.js → subcommands-B0wCF7ha.js} +1 -1
- package/dist/{subcommands-C2gGjmwZ.js → subcommands-CS_xk1MK.js} +7 -7
- package/dist/{ts-ByJL8U8Q.js → ts-CIYZD4--.js} +2 -2
- package/dist/{versionChecker-BcN_sOz5.js → versionChecker-B7DlfwvY.js} +2 -2
- package/dist/{ws-GOni8yuG.js → ws-DEk8hS7K.js} +2 -2
- package/lab/ui/index.html +117 -4
- package/package.json +1 -1
- package/ts/serve.ts +1 -1
- package/dist/SUPPORTED_CLIS-BCJ4STUD.js +0 -9
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { t as CLIS_CONFIG } from "./ts-
|
|
1
|
+
import { t as CLIS_CONFIG } from "./ts-CIYZD4--.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-DAcpPKu6.js.map
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import "./ts-CIYZD4--.js";
|
|
2
|
+
import "./logger-CDIsZ-Pp.js";
|
|
3
|
+
import "./versionChecker-B7DlfwvY.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-DAcpPKu6.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-CS_xk1MK.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-BTKi7ZJO.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-B7DlfwvY.js";
|
|
5
|
+
import { n as getRustBinary } from "./rustBinary-DlNyFqnj.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-B0wCF7ha.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-uJt4UKxf.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-CIYZD4--.js";
|
|
2
2
|
import "./logger-CDIsZ-Pp.js";
|
|
3
|
-
import "./versionChecker-
|
|
3
|
+
import "./versionChecker-B7DlfwvY.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-CS_xk1MK.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-C4qUwHy5.js.map
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { r as getInstalledPackage } from "./versionChecker-
|
|
1
|
+
import { r as getInstalledPackage } from "./versionChecker-B7DlfwvY.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-DlNyFqnj.js.map
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import "./ts-
|
|
1
|
+
import "./ts-CIYZD4--.js";
|
|
2
2
|
import "./logger-CDIsZ-Pp.js";
|
|
3
|
-
import "./versionChecker-
|
|
3
|
+
import "./versionChecker-B7DlfwvY.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-DAcpPKu6.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-CYgAEFKs.js.map
|
|
@@ -1,15 +1,15 @@
|
|
|
1
|
-
import "./ts-
|
|
1
|
+
import "./ts-CIYZD4--.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-B7DlfwvY.js";
|
|
4
|
+
import { t as findSpawnHiddenLauncher } from "./rustBinary-DlNyFqnj.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-DAcpPKu6.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-CS_xk1MK.js";
|
|
13
13
|
import "./e2e-jb0Hp43q.js";
|
|
14
14
|
import "./webrtcLink-B7REGtK2.js";
|
|
15
15
|
import "./remotes-Cim0dBU7.js";
|
|
@@ -1893,7 +1893,7 @@ Options:
|
|
|
1893
1893
|
}
|
|
1894
1894
|
});
|
|
1895
1895
|
if (req.method === "GET" && p === "/api/ws") {
|
|
1896
|
-
const ws = await import("./ws-
|
|
1896
|
+
const ws = await import("./ws-DEk8hS7K.js");
|
|
1897
1897
|
try {
|
|
1898
1898
|
await ws.loadProvision();
|
|
1899
1899
|
} catch (e) {
|
|
@@ -1913,7 +1913,7 @@ Options:
|
|
|
1913
1913
|
if (req.method === "GET" && p === "/api/ws/status") {
|
|
1914
1914
|
const dirRaw = url.searchParams.get("path");
|
|
1915
1915
|
if (!dirRaw) return new Response("missing ?path=<workspace dir>", { status: 400 });
|
|
1916
|
-
const ws = await import("./ws-
|
|
1916
|
+
const ws = await import("./ws-DEk8hS7K.js");
|
|
1917
1917
|
let prov;
|
|
1918
1918
|
try {
|
|
1919
1919
|
prov = await ws.loadProvision();
|
|
@@ -2474,7 +2474,7 @@ Options:
|
|
|
2474
2474
|
const perm = body.perm ?? "r";
|
|
2475
2475
|
if (perm !== "r" && perm !== "rw") return new Response(`invalid perm ${perm} (want r or rw)`, { status: 400 });
|
|
2476
2476
|
try {
|
|
2477
|
-
const { createScopedShare } = await import("./agentShare-
|
|
2477
|
+
const { createScopedShare } = await import("./agentShare-BTKi7ZJO.js");
|
|
2478
2478
|
const share = await createScopedShare({
|
|
2479
2479
|
agent: body.agent,
|
|
2480
2480
|
perm,
|
|
@@ -2489,12 +2489,12 @@ Options:
|
|
|
2489
2489
|
}
|
|
2490
2490
|
}
|
|
2491
2491
|
if (req.method === "GET" && p === "/api/shares") {
|
|
2492
|
-
const { listShares } = await import("./agentShare-
|
|
2492
|
+
const { listShares } = await import("./agentShare-BTKi7ZJO.js");
|
|
2493
2493
|
return Response.json(listShares());
|
|
2494
2494
|
}
|
|
2495
2495
|
const revokeM = /^\/api\/share\/([^/]+)$/.exec(p);
|
|
2496
2496
|
if (req.method === "DELETE" && revokeM) {
|
|
2497
|
-
const { revokeShare } = await import("./agentShare-
|
|
2497
|
+
const { revokeShare } = await import("./agentShare-BTKi7ZJO.js");
|
|
2498
2498
|
const ok = revokeShare(decodeURIComponent(revokeM[1]));
|
|
2499
2499
|
return new Response(ok ? "revoked" : "no such share", { status: ok ? 200 : 404 });
|
|
2500
2500
|
}
|
|
@@ -2543,7 +2543,7 @@ Options:
|
|
|
2543
2543
|
"img-src 'self' data:",
|
|
2544
2544
|
"font-src 'self' data:",
|
|
2545
2545
|
"style-src 'self' 'unsafe-inline' https://cdn.jsdelivr.net",
|
|
2546
|
-
"script-src 'self' 'unsafe-inline' https://cdn.jsdelivr.net",
|
|
2546
|
+
"script-src 'self' 'unsafe-inline' 'unsafe-eval' https://cdn.jsdelivr.net",
|
|
2547
2547
|
"connect-src 'self' https://s.agent-yes.com https://agent-yes.com wss:",
|
|
2548
2548
|
"worker-src 'self'",
|
|
2549
2549
|
"manifest-src 'self'"
|
|
@@ -2680,7 +2680,7 @@ Options:
|
|
|
2680
2680
|
const shutdown = (resolve) => {
|
|
2681
2681
|
if (heartbeat) clearInterval(heartbeat);
|
|
2682
2682
|
closeShare?.();
|
|
2683
|
-
import("./agentShare-
|
|
2683
|
+
import("./agentShare-BTKi7ZJO.js").then((m) => m.revokeAllShares()).catch(() => {});
|
|
2684
2684
|
server?.stop();
|
|
2685
2685
|
Promise.resolve(releaseHostLock?.()).catch(() => {}).then(resolve);
|
|
2686
2686
|
};
|
|
@@ -2693,4 +2693,4 @@ Options:
|
|
|
2693
2693
|
|
|
2694
2694
|
//#endregion
|
|
2695
2695
|
export { cmdServe };
|
|
2696
|
-
//# sourceMappingURL=serve-
|
|
2696
|
+
//# sourceMappingURL=serve-BlvTwJg1.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-BlvTwJg1.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-DuRamcir.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-CS_xk1MK.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-BlvTwJg1.js");
|
|
1241
1241
|
return cmdServe(rest);
|
|
1242
1242
|
}
|
|
1243
1243
|
case "setup": {
|
|
1244
|
-
const { cmdSetup } = await import("./setup-
|
|
1244
|
+
const { cmdSetup } = await import("./setup-DuRamcir.js");
|
|
1245
1245
|
return cmdSetup(rest);
|
|
1246
1246
|
}
|
|
1247
1247
|
case "ws": {
|
|
1248
|
-
const { cmdWs } = await import("./ws-
|
|
1248
|
+
const { cmdWs } = await import("./ws-DEk8hS7K.js");
|
|
1249
1249
|
return cmdWs(rest);
|
|
1250
1250
|
}
|
|
1251
1251
|
case "schedule": {
|
|
1252
|
-
const { cmdSchedule } = await import("./schedule-
|
|
1252
|
+
const { cmdSchedule } = await import("./schedule-CYgAEFKs.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-C4qUwHy5.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-C4qUwHy5.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-CS_xk1MK.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-B7DlfwvY.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-CIYZD4--.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.217.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-B7DlfwvY.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-CS_xk1MK.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-DEk8hS7K.js.map
|
package/lab/ui/index.html
CHANGED
|
@@ -4371,7 +4371,112 @@
|
|
|
4371
4371
|
// e.g. `/fork [selection]`. Templates live in localStorage so they survive
|
|
4372
4372
|
// reloads and can be edited from the menu itself.
|
|
4373
4373
|
const QUICKCMD_KEY = "ay.quickCmds";
|
|
4374
|
-
|
|
4374
|
+
// Two command flavors share the template field:
|
|
4375
|
+
// plain — text sent to the agent's stdin ([selection] filled in)
|
|
4376
|
+
// js:… — a pure-frontend JS function body, run with (text, ay) where
|
|
4377
|
+
// text = the selection and ay = the helper surface below.
|
|
4378
|
+
// The translate entries are the demo: duplicate a line in the
|
|
4379
|
+
// editor, change the language code, done — all localStorage.
|
|
4380
|
+
const DEFAULT_QUICKCMDS = [
|
|
4381
|
+
{ label: "Fork with selection", template: "/fork [selection]" },
|
|
4382
|
+
{ label: "Translate → English", template: 'js: return ay.translate(text, "en")' },
|
|
4383
|
+
{ label: "Translate → 中文", template: 'js: return ay.translate(text, "zh")' },
|
|
4384
|
+
];
|
|
4385
|
+
// Helper surface handed to `js:` quick commands as `ay`.
|
|
4386
|
+
const quickCmdApi = {
|
|
4387
|
+
// Chrome's built-in Translator API (138+, on-device model) when
|
|
4388
|
+
// available; otherwise fall back to a Google Translate tab. Returns ""
|
|
4389
|
+
// when the fallback tab was opened (nothing to show inline).
|
|
4390
|
+
translate: async (text, lang) => {
|
|
4391
|
+
try {
|
|
4392
|
+
if (window.Translator && window.LanguageDetector) {
|
|
4393
|
+
const det = await LanguageDetector.create();
|
|
4394
|
+
const d = await det.detect(String(text).slice(0, 1000));
|
|
4395
|
+
const src = (d && d[0] && d[0].detectedLanguage) || "en";
|
|
4396
|
+
if (src === lang) return text;
|
|
4397
|
+
const tr = await Translator.create({ sourceLanguage: src, targetLanguage: lang });
|
|
4398
|
+
return await tr.translate(text);
|
|
4399
|
+
}
|
|
4400
|
+
} catch {
|
|
4401
|
+
/* model unavailable / language pair unsupported → tab fallback */
|
|
4402
|
+
}
|
|
4403
|
+
quickCmdApi.open(
|
|
4404
|
+
"https://translate.google.com/?sl=auto&tl=" +
|
|
4405
|
+
encodeURIComponent(lang) +
|
|
4406
|
+
"&op=translate&text=" +
|
|
4407
|
+
encodeURIComponent(String(text).slice(0, 5000)),
|
|
4408
|
+
);
|
|
4409
|
+
return "";
|
|
4410
|
+
},
|
|
4411
|
+
copy: (t) => copyText(String(t)),
|
|
4412
|
+
open: (u) => window.open(u, "_blank", "noopener,noreferrer"),
|
|
4413
|
+
send: (t) => sendToSelected(String(t)),
|
|
4414
|
+
show: (t) => showQuickCmdResult(String(t)),
|
|
4415
|
+
};
|
|
4416
|
+
// Result overlay for js: commands — monospace text + Copy, Esc/backdrop
|
|
4417
|
+
// closes. Kept dumb on purpose: a command that wants richer output can
|
|
4418
|
+
// ay.open() its own tab.
|
|
4419
|
+
function showQuickCmdResult(text) {
|
|
4420
|
+
const overlay = document.createElement("div");
|
|
4421
|
+
overlay.className = "launchoverlay";
|
|
4422
|
+
overlay.style.zIndex = "42";
|
|
4423
|
+
const box = document.createElement("div");
|
|
4424
|
+
box.className = "omnibox";
|
|
4425
|
+
box.style.cssText = "padding:16px;width:min(560px,92vw)";
|
|
4426
|
+
const pre = document.createElement("pre");
|
|
4427
|
+
pre.textContent = text;
|
|
4428
|
+
pre.style.cssText =
|
|
4429
|
+
"margin:0;max-height:50vh;overflow:auto;white-space:pre-wrap;word-break:break-word;" +
|
|
4430
|
+
"background:var(--bg);color:var(--fg);border:1px solid var(--line);border-radius:6px;" +
|
|
4431
|
+
"padding:10px;font:13px var(--mono)";
|
|
4432
|
+
box.appendChild(pre);
|
|
4433
|
+
const row = document.createElement("div");
|
|
4434
|
+
row.style.cssText = "display:flex;gap:8px;justify-content:flex-end;margin-top:12px";
|
|
4435
|
+
const mk = (label) => {
|
|
4436
|
+
const b = document.createElement("button");
|
|
4437
|
+
b.type = "button";
|
|
4438
|
+
b.textContent = label;
|
|
4439
|
+
b.style.cssText =
|
|
4440
|
+
"padding:7px 14px;border-radius:6px;font:13px var(--mono);cursor:pointer;" +
|
|
4441
|
+
"border:1px solid var(--line);background:var(--panel2);color:var(--fg)";
|
|
4442
|
+
row.appendChild(b);
|
|
4443
|
+
return b;
|
|
4444
|
+
};
|
|
4445
|
+
mk("Copy").addEventListener("click", () => copyText(text));
|
|
4446
|
+
const close = () => overlay.remove();
|
|
4447
|
+
mk("Close").addEventListener("click", close);
|
|
4448
|
+
box.appendChild(row);
|
|
4449
|
+
overlay.appendChild(box);
|
|
4450
|
+
overlay.addEventListener("pointerdown", (ev) => {
|
|
4451
|
+
if (ev.target === overlay) close();
|
|
4452
|
+
});
|
|
4453
|
+
overlay.tabIndex = -1;
|
|
4454
|
+
overlay.addEventListener("keydown", (ev) => {
|
|
4455
|
+
if (ev.key === "Escape") close();
|
|
4456
|
+
});
|
|
4457
|
+
document.body.appendChild(overlay);
|
|
4458
|
+
overlay.focus();
|
|
4459
|
+
}
|
|
4460
|
+
// Compile-and-run a `js:` command body. Async-wrapped so bodies can await
|
|
4461
|
+
// (ay.translate is async); a returned non-empty string is shown in the
|
|
4462
|
+
// result overlay. Requires 'unsafe-eval' in the CSP — granted for exactly
|
|
4463
|
+
// this: user-authored, user-stored commands running in their own browser.
|
|
4464
|
+
async function runJsQuickCmd(body, selText, term) {
|
|
4465
|
+
try {
|
|
4466
|
+
const fn = new Function(
|
|
4467
|
+
"text",
|
|
4468
|
+
"ay",
|
|
4469
|
+
'"use strict"; return (async () => { ' + body + " })()",
|
|
4470
|
+
);
|
|
4471
|
+
const out = await fn(selText, quickCmdApi);
|
|
4472
|
+
if (typeof out === "string" && out) showQuickCmdResult(out);
|
|
4473
|
+
} catch (err) {
|
|
4474
|
+
showQuickCmdResult("quick command error: " + (err && err.message ? err.message : err));
|
|
4475
|
+
}
|
|
4476
|
+
try {
|
|
4477
|
+
term && term.clearSelection && term.clearSelection();
|
|
4478
|
+
} catch {}
|
|
4479
|
+
}
|
|
4375
4480
|
function loadQuickCmds() {
|
|
4376
4481
|
try {
|
|
4377
4482
|
const v = JSON.parse(localStorage.getItem(QUICKCMD_KEY) || "null");
|
|
@@ -4429,6 +4534,9 @@
|
|
|
4429
4534
|
// A trailing Enter submits it (these are "quick commands", not drafts). The
|
|
4430
4535
|
// selection is cleared so the highlight doesn't linger after firing.
|
|
4431
4536
|
function runQuickCmd(cmd, selText, term) {
|
|
4537
|
+
// `js:` prefix → a frontend function command, not agent stdin.
|
|
4538
|
+
const js = /^js:\s*([\s\S]+)$/.exec(String(cmd.template));
|
|
4539
|
+
if (js) return runJsQuickCmd(js[1], selText, term);
|
|
4432
4540
|
const text = String(cmd.template).replace(/\[selection\]/g, selText || "");
|
|
4433
4541
|
sendToSelected(text + "\r");
|
|
4434
4542
|
try {
|
|
@@ -4526,8 +4634,10 @@
|
|
|
4526
4634
|
if (cmds.length) {
|
|
4527
4635
|
addSep();
|
|
4528
4636
|
for (const cmd of cmds)
|
|
4529
|
-
addItem(
|
|
4530
|
-
|
|
4637
|
+
addItem(
|
|
4638
|
+
cmd.label,
|
|
4639
|
+
{ hint: /^js:/.test(cmd.template) ? "ƒ" : selText ? "[sel]" : "" },
|
|
4640
|
+
() => runQuickCmd(cmd, selText, term),
|
|
4531
4641
|
);
|
|
4532
4642
|
}
|
|
4533
4643
|
addSep();
|
|
@@ -4561,7 +4671,10 @@
|
|
|
4561
4671
|
box.style.width = "min(560px, 92vw)";
|
|
4562
4672
|
box.innerHTML =
|
|
4563
4673
|
'<div style="color:var(--fg);font-size:14px;margin-bottom:6px">Quick commands</div>' +
|
|
4564
|
-
'<div style="color:var(--muted);font-size:12px;margin-bottom:10px">One per line: <code>Label | template</code>. Use <code>[selection]</code> for the highlighted text, e.g. <code>/fork [selection]</code
|
|
4674
|
+
'<div style="color:var(--muted);font-size:12px;margin-bottom:10px">One per line: <code>Label | template</code>. Use <code>[selection]</code> for the highlighted text, e.g. <code>/fork [selection]</code>.<br>' +
|
|
4675
|
+
"A template starting with <code>js:</code> runs as a frontend function body with <code>(text, ay)</code> — " +
|
|
4676
|
+
"<code>text</code> is the selection, <code>ay</code> = {translate(text, lang), copy(t), open(url), send(t), show(t)}. " +
|
|
4677
|
+
'Duplicate the translate line and change the language code to make your own, e.g. <code>Translate → 日本語 | js: return ay.translate(text, "ja")</code>.</div>';
|
|
4565
4678
|
const ta = document.createElement("textarea");
|
|
4566
4679
|
ta.value = quickCmdsToText(loadQuickCmds());
|
|
4567
4680
|
ta.spellcheck = false;
|
package/package.json
CHANGED
package/ts/serve.ts
CHANGED
|
@@ -3358,7 +3358,7 @@ export async function cmdServe(rest: string[]): Promise<number> {
|
|
|
3358
3358
|
"img-src 'self' data:",
|
|
3359
3359
|
"font-src 'self' data:",
|
|
3360
3360
|
"style-src 'self' 'unsafe-inline' https://cdn.jsdelivr.net",
|
|
3361
|
-
"script-src 'self' 'unsafe-inline' https://cdn.jsdelivr.net",
|
|
3361
|
+
"script-src 'self' 'unsafe-inline' 'unsafe-eval' https://cdn.jsdelivr.net",
|
|
3362
3362
|
"connect-src 'self' https://s.agent-yes.com https://agent-yes.com wss:",
|
|
3363
3363
|
"worker-src 'self'",
|
|
3364
3364
|
"manifest-src 'self'",
|
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
import "./ts-ByJL8U8Q.js";
|
|
2
|
-
import "./logger-CDIsZ-Pp.js";
|
|
3
|
-
import "./versionChecker-BcN_sOz5.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-Bms-e6S8.js";
|
|
8
|
-
|
|
9
|
-
export { SUPPORTED_CLIS };
|