agent-yes 1.201.0 → 1.203.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/default.config.yaml +8 -8
- package/dist/SUPPORTED_CLIS-C2KLyNR9.js +9 -0
- package/dist/{SUPPORTED_CLIS-CnGjmp53.js → SUPPORTED_CLIS-CME2rXAO.js} +2 -2
- package/dist/{agentShare-lDreSLQE.js → agentShare-LmDLDvCN.js} +2 -2
- package/dist/cli.js +4 -4
- package/dist/index.js +2 -2
- package/dist/{notifyDaemon-C4VzLmmO.js → notifyDaemon-CW7E0ON1.js} +2 -2
- package/dist/{rustBinary-CVZsX0za.js → rustBinary-5fGeqzPe.js} +2 -2
- package/dist/{schedule-hdbXBwpG.js → schedule-bPb_0xnY.js} +4 -4
- package/dist/{serve-DEEesVYn.js → serve-B9RuI_Hb.js} +12 -12
- package/dist/{setup-DZbnDas9.js → setup-CnzMLgtM.js} +2 -2
- package/dist/{subcommands-IwpLJA-n.js → subcommands-cqz_xIKK.js} +1 -1
- package/dist/{subcommands-De-OHc0k.js → subcommands-t8QPivG7.js} +53 -11
- package/dist/{ts-ZOEYyQAX.js → ts-DVxj4HLs.js} +2 -2
- package/dist/{versionChecker-CBtAasFe.js → versionChecker-mq5B0hM3.js} +2 -2
- package/dist/{ws-DLiI3C6R.js → ws-BSyEbL--.js} +2 -2
- package/lab/ui/console-logic.js +43 -4
- package/lab/ui/index.html +65 -21
- package/lab/ui/qrcode.js +548 -565
- package/lab/ui/room-client.js +70 -91
- package/lab/ui/sw.js +17 -7
- package/package.json +7 -7
- package/scripts/build-rgui.ts +3 -1
- package/ts/agentShare.spec.ts +5 -3
- package/ts/badges.spec.ts +84 -1
- package/ts/badges.ts +69 -5
- package/ts/notifyDaemon.spec.ts +2 -8
- package/ts/notifyDaemon.ts +32 -33
- package/ts/notifyInbox.spec.ts +2 -1
- package/ts/notifyRouter.spec.ts +7 -11
- package/ts/notifyStore.spec.ts +4 -1
- package/ts/notifyStore.ts +18 -14
- package/ts/serve.spec.ts +4 -6
- package/ts/serve.ts +69 -17
- package/ts/subcommands.ts +46 -18
- package/ts/ws.spec.ts +31 -7
- package/ts/ws.ts +15 -4
- package/dist/SUPPORTED_CLIS-BbWt8-ON.js +0 -9
package/default.config.yaml
CHANGED
|
@@ -109,7 +109,7 @@ clis:
|
|
|
109
109
|
# list ("client ignores rate-limit drop") or an agent's own summary
|
|
110
110
|
# (INGEST_RATE_LIMIT_PER_MIN) armed the loop and typed "retry" into a
|
|
111
111
|
# perfectly healthy session.
|
|
112
|
-
- pattern:
|
|
112
|
+
- pattern: "API Error.{0,4}429"
|
|
113
113
|
flags: i
|
|
114
114
|
- pattern: 'API Error[\s\S]{0,60}rate.?limit'
|
|
115
115
|
flags: i
|
|
@@ -117,7 +117,7 @@ clis:
|
|
|
117
117
|
- hit your usage limit
|
|
118
118
|
# Session/5-hour limit banners keep the distinctive "… limit reached"
|
|
119
119
|
# phrase; a bare "session limit" matched ordinary prose.
|
|
120
|
-
- pattern:
|
|
120
|
+
- pattern: "(session|5-hour) limit reached"
|
|
121
121
|
flags: i
|
|
122
122
|
restoreArgs:
|
|
123
123
|
- --continue
|
|
@@ -221,7 +221,7 @@ clis:
|
|
|
221
221
|
# list ("client ignores rate-limit drop") or an agent's own summary
|
|
222
222
|
# (INGEST_RATE_LIMIT_PER_MIN) armed the loop and typed "retry" into a
|
|
223
223
|
# perfectly healthy session.
|
|
224
|
-
- pattern:
|
|
224
|
+
- pattern: "API Error.{0,4}429"
|
|
225
225
|
flags: i
|
|
226
226
|
- pattern: 'API Error[\s\S]{0,60}rate.?limit'
|
|
227
227
|
flags: i
|
|
@@ -229,7 +229,7 @@ clis:
|
|
|
229
229
|
- hit your usage limit
|
|
230
230
|
# Session/5-hour limit banners keep the distinctive "… limit reached"
|
|
231
231
|
# phrase; a bare "session limit" matched ordinary prose.
|
|
232
|
-
- pattern:
|
|
232
|
+
- pattern: "(session|5-hour) limit reached"
|
|
233
233
|
flags: i
|
|
234
234
|
restoreArgs:
|
|
235
235
|
- --continue
|
|
@@ -338,7 +338,7 @@ clis:
|
|
|
338
338
|
# list ("client ignores rate-limit drop") or an agent's own summary
|
|
339
339
|
# (INGEST_RATE_LIMIT_PER_MIN) armed the loop and typed "retry" into a
|
|
340
340
|
# perfectly healthy session.
|
|
341
|
-
- pattern:
|
|
341
|
+
- pattern: "API Error.{0,4}429"
|
|
342
342
|
flags: i
|
|
343
343
|
- pattern: 'API Error[\s\S]{0,60}rate.?limit'
|
|
344
344
|
flags: i
|
|
@@ -346,7 +346,7 @@ clis:
|
|
|
346
346
|
- hit your usage limit
|
|
347
347
|
# Session/5-hour limit banners keep the distinctive "… limit reached"
|
|
348
348
|
# phrase; a bare "session limit" matched ordinary prose.
|
|
349
|
-
- pattern:
|
|
349
|
+
- pattern: "(session|5-hour) limit reached"
|
|
350
350
|
flags: i
|
|
351
351
|
restoreArgs:
|
|
352
352
|
- --continue
|
|
@@ -545,7 +545,7 @@ clis:
|
|
|
545
545
|
bash:
|
|
546
546
|
promptArg: typed
|
|
547
547
|
ready:
|
|
548
|
-
- pattern:
|
|
548
|
+
- pattern: "[$#] $"
|
|
549
549
|
flags: m
|
|
550
550
|
working: []
|
|
551
551
|
enter: []
|
|
@@ -570,7 +570,7 @@ clis:
|
|
|
570
570
|
powershell:
|
|
571
571
|
promptArg: typed
|
|
572
572
|
ready:
|
|
573
|
-
- pattern:
|
|
573
|
+
- pattern: "^PS .*>"
|
|
574
574
|
flags: m
|
|
575
575
|
working: []
|
|
576
576
|
enter: []
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import "./ts-DVxj4HLs.js";
|
|
2
|
+
import "./logger-CDIsZ-Pp.js";
|
|
3
|
+
import "./versionChecker-mq5B0hM3.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-CME2rXAO.js";
|
|
8
|
+
|
|
9
|
+
export { SUPPORTED_CLIS };
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { t as CLIS_CONFIG } from "./ts-
|
|
1
|
+
import { t as CLIS_CONFIG } from "./ts-DVxj4HLs.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-CME2rXAO.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 { M as resolveOne } from "./subcommands-
|
|
5
|
+
import { M as resolveOne } from "./subcommands-t8QPivG7.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-LmDLDvCN.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-mq5B0hM3.js";
|
|
5
|
+
import { n as getRustBinary } from "./rustBinary-5fGeqzPe.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-cqz_xIKK.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-C2KLyNR9.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-DVxj4HLs.js";
|
|
2
2
|
import "./logger-CDIsZ-Pp.js";
|
|
3
|
-
import "./versionChecker-
|
|
3
|
+
import "./versionChecker-mq5B0hM3.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 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-
|
|
5
|
+
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-t8QPivG7.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-CW7E0ON1.js.map
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { r as getInstalledPackage } from "./versionChecker-
|
|
1
|
+
import { r as getInstalledPackage } from "./versionChecker-mq5B0hM3.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-5fGeqzPe.js.map
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import "./ts-
|
|
1
|
+
import "./ts-DVxj4HLs.js";
|
|
2
2
|
import "./logger-CDIsZ-Pp.js";
|
|
3
|
-
import "./versionChecker-
|
|
3
|
+
import "./versionChecker-mq5B0hM3.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-CME2rXAO.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-bPb_0xnY.js.map
|
|
@@ -1,14 +1,14 @@
|
|
|
1
|
-
import "./ts-
|
|
1
|
+
import "./ts-DVxj4HLs.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-mq5B0hM3.js";
|
|
4
|
+
import { t as findSpawnHiddenLauncher } from "./rustBinary-5fGeqzPe.js";
|
|
5
5
|
import "./pidStore-BIvsBQ8X.js";
|
|
6
6
|
import { a as updateGlobalPidStatus } from "./globalPidIndex-CoNr7tS8.js";
|
|
7
7
|
import { r as recordInbox } from "./messageLog-CxrKJj77.js";
|
|
8
8
|
import { t as pgidForWrapper } from "./reaper-BUHCyxdF.js";
|
|
9
9
|
import "./configShared-aKTg-sa5.js";
|
|
10
|
-
import { t as SUPPORTED_CLIS } from "./SUPPORTED_CLIS-
|
|
11
|
-
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, u as extractBadges } from "./subcommands-
|
|
10
|
+
import { t as SUPPORTED_CLIS } from "./SUPPORTED_CLIS-CME2rXAO.js";
|
|
11
|
+
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, u as extractBadges } from "./subcommands-t8QPivG7.js";
|
|
12
12
|
import "./e2e-jb0Hp43q.js";
|
|
13
13
|
import "./webrtcLink-B7REGtK2.js";
|
|
14
14
|
import "./remotes-Cim0dBU7.js";
|
|
@@ -1442,7 +1442,7 @@ Options:
|
|
|
1442
1442
|
}
|
|
1443
1443
|
});
|
|
1444
1444
|
if (req.method === "GET" && p === "/api/ws") {
|
|
1445
|
-
const ws = await import("./ws-
|
|
1445
|
+
const ws = await import("./ws-BSyEbL--.js");
|
|
1446
1446
|
try {
|
|
1447
1447
|
await ws.loadProvision();
|
|
1448
1448
|
} catch (e) {
|
|
@@ -1462,7 +1462,7 @@ Options:
|
|
|
1462
1462
|
if (req.method === "GET" && p === "/api/ws/status") {
|
|
1463
1463
|
const dirRaw = url.searchParams.get("path");
|
|
1464
1464
|
if (!dirRaw) return new Response("missing ?path=<workspace dir>", { status: 400 });
|
|
1465
|
-
const ws = await import("./ws-
|
|
1465
|
+
const ws = await import("./ws-BSyEbL--.js");
|
|
1466
1466
|
let prov;
|
|
1467
1467
|
try {
|
|
1468
1468
|
prov = await ws.loadProvision();
|
|
@@ -2018,7 +2018,7 @@ Options:
|
|
|
2018
2018
|
const perm = body.perm ?? "r";
|
|
2019
2019
|
if (perm !== "r" && perm !== "rw") return new Response(`invalid perm ${perm} (want r or rw)`, { status: 400 });
|
|
2020
2020
|
try {
|
|
2021
|
-
const { createScopedShare } = await import("./agentShare-
|
|
2021
|
+
const { createScopedShare } = await import("./agentShare-LmDLDvCN.js");
|
|
2022
2022
|
const share = await createScopedShare({
|
|
2023
2023
|
agent: body.agent,
|
|
2024
2024
|
perm,
|
|
@@ -2033,12 +2033,12 @@ Options:
|
|
|
2033
2033
|
}
|
|
2034
2034
|
}
|
|
2035
2035
|
if (req.method === "GET" && p === "/api/shares") {
|
|
2036
|
-
const { listShares } = await import("./agentShare-
|
|
2036
|
+
const { listShares } = await import("./agentShare-LmDLDvCN.js");
|
|
2037
2037
|
return Response.json(listShares());
|
|
2038
2038
|
}
|
|
2039
2039
|
const revokeM = /^\/api\/share\/([^/]+)$/.exec(p);
|
|
2040
2040
|
if (req.method === "DELETE" && revokeM) {
|
|
2041
|
-
const { revokeShare } = await import("./agentShare-
|
|
2041
|
+
const { revokeShare } = await import("./agentShare-LmDLDvCN.js");
|
|
2042
2042
|
const ok = revokeShare(decodeURIComponent(revokeM[1]));
|
|
2043
2043
|
return new Response(ok ? "revoked" : "no such share", { status: ok ? 200 : 404 });
|
|
2044
2044
|
}
|
|
@@ -2220,7 +2220,7 @@ Options:
|
|
|
2220
2220
|
const shutdown = (resolve) => {
|
|
2221
2221
|
if (heartbeat) clearInterval(heartbeat);
|
|
2222
2222
|
closeShare?.();
|
|
2223
|
-
import("./agentShare-
|
|
2223
|
+
import("./agentShare-LmDLDvCN.js").then((m) => m.revokeAllShares()).catch(() => {});
|
|
2224
2224
|
server?.stop();
|
|
2225
2225
|
resolve();
|
|
2226
2226
|
};
|
|
@@ -2233,4 +2233,4 @@ Options:
|
|
|
2233
2233
|
|
|
2234
2234
|
//#endregion
|
|
2235
2235
|
export { cmdServe };
|
|
2236
|
-
//# sourceMappingURL=serve-
|
|
2236
|
+
//# sourceMappingURL=serve-B9RuI_Hb.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-B9RuI_Hb.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-CnzMLgtM.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-t8QPivG7.js";
|
|
6
6
|
import "./e2e-jb0Hp43q.js";
|
|
7
7
|
import "./webrtcLink-B7REGtK2.js";
|
|
8
8
|
import "./remotes-Cim0dBU7.js";
|
|
@@ -182,15 +182,45 @@ const BADGE_DEFS = [
|
|
|
182
182
|
label: "retry",
|
|
183
183
|
title: "Waiting for the API — the CLI is auto-retrying on its own backoff (no action needed)",
|
|
184
184
|
pattern: /Waiting for API response[\s\S]{0,40}will retry in \d/i
|
|
185
|
+
},
|
|
186
|
+
{
|
|
187
|
+
id: "shells",
|
|
188
|
+
label: "$1",
|
|
189
|
+
title: "Background shells running in this session ($1 in the CLI footer)",
|
|
190
|
+
pattern: /· (\d+ shells?)(?= ·|\s*$)/m
|
|
191
|
+
},
|
|
192
|
+
{
|
|
193
|
+
id: "monitors",
|
|
194
|
+
label: "$1",
|
|
195
|
+
title: "Active Monitor watchers in this session ($1 in the CLI footer)",
|
|
196
|
+
pattern: /· (\d+ monitors?)(?= ·|\s*$)/m
|
|
197
|
+
},
|
|
198
|
+
{
|
|
199
|
+
id: "bg-agents",
|
|
200
|
+
label: "$1",
|
|
201
|
+
title: "Background subagents running in this session ($1 in the CLI footer)",
|
|
202
|
+
pattern: /← (\d+ agents?)(?= ·|\s*$)/m
|
|
203
|
+
},
|
|
204
|
+
{
|
|
205
|
+
id: "pr",
|
|
206
|
+
label: "$1",
|
|
207
|
+
title: "This session is linked to a GitHub pull request ($1 in the CLI footer)",
|
|
208
|
+
pattern: /· (PR #\d+)(?= ·|\s*$)/m
|
|
185
209
|
}
|
|
186
210
|
];
|
|
187
211
|
/**
|
|
188
212
|
* Which badge ids match the given rendered screen lines. Pure so it's
|
|
189
|
-
* unit-tested without a live PTY/log file.
|
|
213
|
+
* unit-tested without a live PTY/log file. A def whose pattern captured a
|
|
214
|
+
* group yields `id:capture` (e.g. "shells:4 shells") so the count travels
|
|
215
|
+
* with the id over the wire; static defs yield the bare id as before.
|
|
190
216
|
*/
|
|
191
217
|
function matchBadges(lines, defs = BADGE_DEFS) {
|
|
192
218
|
const text = lines.join("\n");
|
|
193
|
-
return defs.
|
|
219
|
+
return defs.flatMap((d) => {
|
|
220
|
+
const m = d.pattern.exec(text);
|
|
221
|
+
if (!m) return [];
|
|
222
|
+
return [m[1] !== void 0 ? `${d.id}:${m[1]}` : d.id];
|
|
223
|
+
});
|
|
194
224
|
}
|
|
195
225
|
/**
|
|
196
226
|
* A time-derived flag (NOT screen-matched): lit when the user typed at this
|
|
@@ -206,7 +236,19 @@ const TYPING_BADGE = {
|
|
|
206
236
|
pattern: /(?!)/
|
|
207
237
|
};
|
|
208
238
|
function badgeDef(id, defs = BADGE_DEFS) {
|
|
209
|
-
|
|
239
|
+
const base = id.includes(":") ? id.slice(0, id.indexOf(":")) : id;
|
|
240
|
+
return defs.find((d) => d.id === base) ?? (base === TYPING_BADGE.id ? TYPING_BADGE : void 0);
|
|
241
|
+
}
|
|
242
|
+
/**
|
|
243
|
+
* Rendered chip text for a (possibly dynamic) badge id: resolves the def and
|
|
244
|
+
* substitutes `$1` in its label with the id's captured text. Unknown ids fall
|
|
245
|
+
* back to the raw id so a newer server's badge never renders blank.
|
|
246
|
+
*/
|
|
247
|
+
function badgeLabel(id, defs = BADGE_DEFS) {
|
|
248
|
+
const def = badgeDef(id, defs);
|
|
249
|
+
if (!def) return id;
|
|
250
|
+
const arg = id.includes(":") ? id.slice(id.indexOf(":") + 1) : "";
|
|
251
|
+
return def.label.includes("$1") ? def.label.replace("$1", arg) : def.label;
|
|
210
252
|
}
|
|
211
253
|
|
|
212
254
|
//#endregion
|
|
@@ -1184,19 +1226,19 @@ async function runSubcommand(argv) {
|
|
|
1184
1226
|
case "restart": return await cmdRestart(rest);
|
|
1185
1227
|
case "note": return await cmdNote(rest);
|
|
1186
1228
|
case "serve": {
|
|
1187
|
-
const { cmdServe } = await import("./serve-
|
|
1229
|
+
const { cmdServe } = await import("./serve-B9RuI_Hb.js");
|
|
1188
1230
|
return cmdServe(rest);
|
|
1189
1231
|
}
|
|
1190
1232
|
case "setup": {
|
|
1191
|
-
const { cmdSetup } = await import("./setup-
|
|
1233
|
+
const { cmdSetup } = await import("./setup-CnzMLgtM.js");
|
|
1192
1234
|
return cmdSetup(rest);
|
|
1193
1235
|
}
|
|
1194
1236
|
case "ws": {
|
|
1195
|
-
const { cmdWs } = await import("./ws-
|
|
1237
|
+
const { cmdWs } = await import("./ws-BSyEbL--.js");
|
|
1196
1238
|
return cmdWs(rest);
|
|
1197
1239
|
}
|
|
1198
1240
|
case "schedule": {
|
|
1199
|
-
const { cmdSchedule } = await import("./schedule-
|
|
1241
|
+
const { cmdSchedule } = await import("./schedule-bPb_0xnY.js");
|
|
1200
1242
|
return cmdSchedule(rest);
|
|
1201
1243
|
}
|
|
1202
1244
|
case "remote": {
|
|
@@ -1833,7 +1875,7 @@ function branchLabel(g) {
|
|
|
1833
1875
|
*/
|
|
1834
1876
|
function badgeLabels(ids) {
|
|
1835
1877
|
if (!ids || ids.length === 0) return "";
|
|
1836
|
-
return ids.map((id) =>
|
|
1878
|
+
return ids.map((id) => badgeLabel(id)).join(" ");
|
|
1837
1879
|
}
|
|
1838
1880
|
function parseGitStatus(out) {
|
|
1839
1881
|
let branch = null;
|
|
@@ -4216,7 +4258,7 @@ async function cmdNotify(rest) {
|
|
|
4216
4258
|
}
|
|
4217
4259
|
const ensure = async () => {
|
|
4218
4260
|
if (!argv["ensure-daemon"]) return;
|
|
4219
|
-
const { ensureDaemon } = await import("./notifyDaemon-
|
|
4261
|
+
const { ensureDaemon } = await import("./notifyDaemon-CW7E0ON1.js");
|
|
4220
4262
|
await ensureDaemon().catch(() => null);
|
|
4221
4263
|
};
|
|
4222
4264
|
await heartbeatWatcher(parent, selfStartedAt);
|
|
@@ -4290,7 +4332,7 @@ async function cmdNotifyCursor(args) {
|
|
|
4290
4332
|
}
|
|
4291
4333
|
async function cmdNotifyd(rest) {
|
|
4292
4334
|
const sub = rest[0] ?? "status";
|
|
4293
|
-
const daemon = await import("./notifyDaemon-
|
|
4335
|
+
const daemon = await import("./notifyDaemon-CW7E0ON1.js");
|
|
4294
4336
|
switch (sub) {
|
|
4295
4337
|
case "run": return daemon.runDaemon();
|
|
4296
4338
|
case "once": return daemon.runDaemon({ once: true });
|
|
@@ -4317,4 +4359,4 @@ async function cmdNotifyd(rest) {
|
|
|
4317
4359
|
|
|
4318
4360
|
//#endregion
|
|
4319
4361
|
export { notifyDir 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, liveWatchers as J, hostId as K, snapshotStatus as L, resolveOne as M, resolveReadWindow as N, recentReadEdges as O, resolveResumeArgs as P, daemonLockOwnerPath as Q, stdinActivityPath as R, listRecords as S, readNotes as T, writeToIpc as U, waitForLogQuiet as V, appendEvent as W, shouldStealLock as X, readInbox as Y, daemonLockDir as Z, isPidAlive as _, cmdHelp as a, isUserTyping as b, deriveLiveState as c, extractMenu as d, TYPING_BADGE 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, listInboxParents 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, stopTipForCli as z };
|
|
4320
|
-
//# sourceMappingURL=subcommands-
|
|
4362
|
+
//# sourceMappingURL=subcommands-t8QPivG7.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-mq5B0hM3.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-DVxj4HLs.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.203.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-mq5B0hM3.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-t8QPivG7.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-BSyEbL--.js.map
|
package/lab/ui/console-logic.js
CHANGED
|
@@ -199,13 +199,42 @@ export const BADGE_META = {
|
|
|
199
199
|
label: "typing",
|
|
200
200
|
title: "The user is typing at this agent's terminal — ay send backs off until they pause",
|
|
201
201
|
},
|
|
202
|
+
// Dynamic footer counters: the wire id carries the captured footer text
|
|
203
|
+
// after a ":" ("shells:4 shells") and "$1" below is substituted with it,
|
|
204
|
+
// so the chip reads exactly like the CLI footer ("1 shell", "PR #310").
|
|
205
|
+
shells: {
|
|
206
|
+
label: "$1",
|
|
207
|
+
title: "Background shells running in this session ($1 in the CLI footer)",
|
|
208
|
+
},
|
|
209
|
+
monitors: {
|
|
210
|
+
label: "$1",
|
|
211
|
+
title: "Active Monitor watchers in this session ($1 in the CLI footer)",
|
|
212
|
+
},
|
|
213
|
+
"bg-agents": {
|
|
214
|
+
label: "$1",
|
|
215
|
+
title: "Background subagents running in this session ($1 in the CLI footer)",
|
|
216
|
+
},
|
|
217
|
+
pr: {
|
|
218
|
+
label: "$1",
|
|
219
|
+
title: "This session is linked to a GitHub pull request ($1 in the CLI footer)",
|
|
220
|
+
},
|
|
202
221
|
};
|
|
203
222
|
|
|
204
223
|
// Status-flag chips ("badges") matched against the agent's screen — e.g. an
|
|
205
224
|
// active /goal loop. [] when e.badges is missing/empty. Returns
|
|
206
225
|
// { id, label, title } objects ready for the caller to render as chips.
|
|
226
|
+
// Dynamic ids ("shells:4 shells") resolve their meta by the part before the
|
|
227
|
+
// ":" and substitute the rest into "$1" in the label/title; the returned id
|
|
228
|
+
// stays the raw wire value so chips key uniquely.
|
|
207
229
|
export function badgesFor(e) {
|
|
208
|
-
return (e.badges || []).map((
|
|
230
|
+
return (e.badges || []).map((raw) => {
|
|
231
|
+
const i = raw.indexOf(":");
|
|
232
|
+
const base = i === -1 ? raw : raw.slice(0, i);
|
|
233
|
+
const arg = i === -1 ? "" : raw.slice(i + 1);
|
|
234
|
+
const meta = BADGE_META[base] || { label: raw, title: raw };
|
|
235
|
+
const sub = (s) => (s.includes("$1") ? s.replace("$1", arg) : s);
|
|
236
|
+
return { id: raw, label: sub(meta.label), title: sub(meta.title) };
|
|
237
|
+
});
|
|
209
238
|
}
|
|
210
239
|
|
|
211
240
|
// Time since the agent was last active ("12s" / "5m" / "3h") — measured from
|
|
@@ -224,8 +253,10 @@ export function age(e, now = Date.now()) {
|
|
|
224
253
|
}
|
|
225
254
|
|
|
226
255
|
// Filter predicate: every space-separated token must match. A `key:value` token
|
|
227
|
-
// matches against the mnemonic tags (repo/wt/cli/host)
|
|
228
|
-
// case-insensitive substring search over
|
|
256
|
+
// matches against the mnemonic tags (repo/wt/cli/host) or the explicit keys
|
|
257
|
+
// below; a bare token is a case-insensitive substring search over
|
|
258
|
+
// title/prompt/cli/cwd/status plus the device label (user@host) and room, so
|
|
259
|
+
// typing a hostname or username narrows without needing a tag.
|
|
229
260
|
export function matches(e, toks) {
|
|
230
261
|
const hay =
|
|
231
262
|
(e.title || "") +
|
|
@@ -237,6 +268,10 @@ export function matches(e, toks) {
|
|
|
237
268
|
(e.cwd || "") +
|
|
238
269
|
" " +
|
|
239
270
|
e.status +
|
|
271
|
+
" " +
|
|
272
|
+
(e._host || "") +
|
|
273
|
+
" " +
|
|
274
|
+
(e._room || "") +
|
|
240
275
|
(e.git?.dirty ? " dirty" : "");
|
|
241
276
|
return toks.every((tok) => {
|
|
242
277
|
tok = tok.toLowerCase();
|
|
@@ -253,6 +288,9 @@ export function matches(e, toks) {
|
|
|
253
288
|
return String(e._host || "")
|
|
254
289
|
.toLowerCase()
|
|
255
290
|
.includes(v);
|
|
291
|
+
// user: matches just the username half of the device label ("sno@taka"
|
|
292
|
+
// → "sno"), unlike host:/device: which match the whole label.
|
|
293
|
+
if (k === "user") return deviceParts(e._host).user.toLowerCase().includes(v);
|
|
256
294
|
return tagsFor(e).some(([tk, tv]) => tk === k && tv.toLowerCase().includes(v));
|
|
257
295
|
}
|
|
258
296
|
return hay.toLowerCase().includes(tok);
|
|
@@ -402,7 +440,8 @@ export function sortEntries(entries, mode = "state") {
|
|
|
402
440
|
? byNewest
|
|
403
441
|
: mode === "identity"
|
|
404
442
|
? (a, b) => fullIdent(a).localeCompare(fullIdent(b)) || byNewest(a, b)
|
|
405
|
-
: (a, b) =>
|
|
443
|
+
: (a, b) =>
|
|
444
|
+
stateRank(a) - stateRank(b) || gitWeight(b) - gitWeight(a) || byNewest(a, b);
|
|
406
445
|
return entries.slice().sort(cmp);
|
|
407
446
|
}
|
|
408
447
|
|