claude-yes 1.171.0 → 1.172.1
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-Clcx4HvI.js +8 -0
- package/dist/{SUPPORTED_CLIS-CLwNa69l.js → SUPPORTED_CLIS-xu3icB0y.js} +2 -2
- package/dist/cli.js +4 -4
- package/dist/index.js +2 -2
- package/dist/{notifyDaemon-DKoSrGSO.js → notifyDaemon-7R67TpDt.js} +2 -2
- package/dist/{rustBinary-4qI6-ALa.js → rustBinary-BuiXu824.js} +2 -2
- package/dist/{schedule-DclnMR6W.js → schedule-CHKqyia1.js} +4 -4
- package/dist/{serve-B6suh4Mj.js → serve-ENvlzE1l.js} +24 -7
- package/dist/{setup-Bt9v70jO.js → setup-NpTqpWr8.js} +2 -2
- package/dist/{subcommands-CGFVw3RU.js → subcommands-D-e8_Mm8.js} +6 -6
- package/dist/{subcommands-BG8zmd95.js → subcommands-D9Rvdyoq.js} +1 -1
- package/dist/{ts-CJuOKFYC.js → ts-B1n_pNP0.js} +2 -2
- package/dist/{versionChecker-OhTh_a0W.js → versionChecker-1N1BMsKq.js} +2 -2
- package/lab/ui/console-logic.js +12 -7
- package/lab/ui/index.html +9 -2
- package/package.json +1 -1
- package/ts/serve.ts +53 -13
- package/dist/SUPPORTED_CLIS-vi4ofK0T.js +0 -8
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import "./ts-B1n_pNP0.js";
|
|
2
|
+
import "./logger-CDIsZ-Pp.js";
|
|
3
|
+
import "./versionChecker-1N1BMsKq.js";
|
|
4
|
+
import "./pidStore-BIvsBQ8X.js";
|
|
5
|
+
import "./globalPidIndex-CoNr7tS8.js";
|
|
6
|
+
import { t as SUPPORTED_CLIS } from "./SUPPORTED_CLIS-xu3icB0y.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-B1n_pNP0.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-xu3icB0y.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-1N1BMsKq.js";
|
|
5
|
+
import { n as getRustBinary } from "./rustBinary-BuiXu824.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-D9Rvdyoq.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-Clcx4HvI.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-B1n_pNP0.js";
|
|
2
2
|
import "./logger-CDIsZ-Pp.js";
|
|
3
|
-
import "./versionChecker-
|
|
3
|
+
import "./versionChecker-1N1BMsKq.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 { D as renderLogTailLines, G as hostId, J as readInbox, K as listInboxParents, 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 { D as renderLogTailLines, G as hostId, J as readInbox, K as listInboxParents, 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-D-e8_Mm8.js";
|
|
5
5
|
import "./e2e-jb0Hp43q.js";
|
|
6
6
|
import "./webrtcLink-B7REGtK2.js";
|
|
7
7
|
import "./remotes-CC-4GuJb.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-7R67TpDt.js.map
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { r as getInstalledPackage } from "./versionChecker-
|
|
1
|
+
import { r as getInstalledPackage } from "./versionChecker-1N1BMsKq.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-BuiXu824.js.map
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import "./ts-
|
|
1
|
+
import "./ts-B1n_pNP0.js";
|
|
2
2
|
import "./logger-CDIsZ-Pp.js";
|
|
3
|
-
import "./versionChecker-
|
|
3
|
+
import "./versionChecker-1N1BMsKq.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-xu3icB0y.js";
|
|
7
7
|
import { d as resolveSpawnCwd } from "./workspaceConfig-BgqK-31W.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-CHKqyia1.js.map
|
|
@@ -1,13 +1,13 @@
|
|
|
1
|
-
import "./ts-
|
|
1
|
+
import "./ts-B1n_pNP0.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-1N1BMsKq.js";
|
|
4
|
+
import { t as findSpawnHiddenLauncher } from "./rustBinary-BuiXu824.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 { A as resolveOne, E as readPtysize, F as snapshotStatus, H as TYPING_BADGE, O as renderRawLog, S as listRecords, T as readNotes, V as writeToIpc, b as isUserTyping, f as extractNeedsInput, l as deriveLiveStatus, o as controlCodeFromName, p as extractTaskCounts, u as extractBadges } from "./subcommands-
|
|
9
|
+
import { t as SUPPORTED_CLIS } from "./SUPPORTED_CLIS-xu3icB0y.js";
|
|
10
|
+
import { A as resolveOne, E as readPtysize, F as snapshotStatus, H as TYPING_BADGE, O as renderRawLog, S as listRecords, T as readNotes, V as writeToIpc, b as isUserTyping, f as extractNeedsInput, l as deriveLiveStatus, o as controlCodeFromName, p as extractTaskCounts, u as extractBadges } from "./subcommands-D-e8_Mm8.js";
|
|
11
11
|
import "./e2e-jb0Hp43q.js";
|
|
12
12
|
import "./webrtcLink-B7REGtK2.js";
|
|
13
13
|
import "./remotes-CC-4GuJb.js";
|
|
@@ -845,11 +845,27 @@ Options:
|
|
|
845
845
|
if (!root) return null;
|
|
846
846
|
return ensureRepoWatch(root).val;
|
|
847
847
|
};
|
|
848
|
+
const meaningfulStdinAt = /* @__PURE__ */ new Map();
|
|
849
|
+
const anyDaemonWriteAt = /* @__PURE__ */ new Map();
|
|
850
|
+
const isTerminalReply = (s) => /^\x1b\[(\d+;\d+R|\?[\d;]*c|>[\d;]*c|\d*n)$/.test(s);
|
|
851
|
+
const noteStdinWrite = async (pid, fifo, meaningful) => {
|
|
852
|
+
const mt = await stat(fifo).then((s) => s.mtimeMs).catch(() => null);
|
|
853
|
+
if (mt == null) return;
|
|
854
|
+
anyDaemonWriteAt.set(pid, mt);
|
|
855
|
+
if (meaningful) meaningfulStdinAt.set(pid, mt);
|
|
856
|
+
};
|
|
857
|
+
const resolveLastStdinAt = async (r) => {
|
|
858
|
+
const meaningful = meaningfulStdinAt.get(r.pid) ?? null;
|
|
859
|
+
if (!r.fifo_file) return meaningful;
|
|
860
|
+
const mtime = await stat(r.fifo_file).then((s) => s.mtimeMs).catch(() => null);
|
|
861
|
+
if (mtime == null) return meaningful;
|
|
862
|
+
return mtime > (anyDaemonWriteAt.get(r.pid) ?? 0) ? mtime : meaningful;
|
|
863
|
+
};
|
|
848
864
|
const withMeta = async (r) => {
|
|
849
865
|
const status = await deriveLiveStatus(r);
|
|
850
866
|
const question = status !== "exited" && !r.unresponsive ? await logNeedsInput(r.log_file, r.cli) : null;
|
|
851
867
|
const lastActiveAt = r.log_file ? await stat(r.log_file).then((s) => s.mtimeMs).catch(() => r.started_at) : r.started_at;
|
|
852
|
-
const lastStdinAt = status !== "exited"
|
|
868
|
+
const lastStdinAt = status !== "exited" ? await resolveLastStdinAt(r) : null;
|
|
853
869
|
return {
|
|
854
870
|
...r,
|
|
855
871
|
last_active_at: lastActiveAt,
|
|
@@ -1117,6 +1133,7 @@ Options:
|
|
|
1117
1133
|
await new Promise((r) => setTimeout(r, 200));
|
|
1118
1134
|
await writeToIpc(record.fifo_file, trailing);
|
|
1119
1135
|
} else await writeToIpc(record.fifo_file, msg + trailing);
|
|
1136
|
+
await noteStdinWrite(record.pid, record.fifo_file, !isTerminalReply(msg));
|
|
1120
1137
|
return Response.json({
|
|
1121
1138
|
ok: true,
|
|
1122
1139
|
pid: record.pid
|
|
@@ -1560,4 +1577,4 @@ Options:
|
|
|
1560
1577
|
|
|
1561
1578
|
//#endregion
|
|
1562
1579
|
export { cmdServe };
|
|
1563
|
-
//# sourceMappingURL=serve-
|
|
1580
|
+
//# sourceMappingURL=serve-ENvlzE1l.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-ENvlzE1l.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-NpTqpWr8.js.map
|
|
@@ -1126,15 +1126,15 @@ async function runSubcommand(argv) {
|
|
|
1126
1126
|
case "restart": return await cmdRestart(rest);
|
|
1127
1127
|
case "note": return await cmdNote(rest);
|
|
1128
1128
|
case "serve": {
|
|
1129
|
-
const { cmdServe } = await import("./serve-
|
|
1129
|
+
const { cmdServe } = await import("./serve-ENvlzE1l.js");
|
|
1130
1130
|
return cmdServe(rest);
|
|
1131
1131
|
}
|
|
1132
1132
|
case "setup": {
|
|
1133
|
-
const { cmdSetup } = await import("./setup-
|
|
1133
|
+
const { cmdSetup } = await import("./setup-NpTqpWr8.js");
|
|
1134
1134
|
return cmdSetup(rest);
|
|
1135
1135
|
}
|
|
1136
1136
|
case "schedule": {
|
|
1137
|
-
const { cmdSchedule } = await import("./schedule-
|
|
1137
|
+
const { cmdSchedule } = await import("./schedule-CHKqyia1.js");
|
|
1138
1138
|
return cmdSchedule(rest);
|
|
1139
1139
|
}
|
|
1140
1140
|
case "remote": {
|
|
@@ -3963,7 +3963,7 @@ async function cmdNotify(rest) {
|
|
|
3963
3963
|
}
|
|
3964
3964
|
const ensure = async () => {
|
|
3965
3965
|
if (!argv["ensure-daemon"]) return;
|
|
3966
|
-
const { ensureDaemon } = await import("./notifyDaemon-
|
|
3966
|
+
const { ensureDaemon } = await import("./notifyDaemon-7R67TpDt.js");
|
|
3967
3967
|
await ensureDaemon().catch(() => null);
|
|
3968
3968
|
};
|
|
3969
3969
|
await heartbeatWatcher(parent, selfStartedAt);
|
|
@@ -4037,7 +4037,7 @@ async function cmdNotifyCursor(args) {
|
|
|
4037
4037
|
}
|
|
4038
4038
|
async function cmdNotifyd(rest) {
|
|
4039
4039
|
const sub = rest[0] ?? "status";
|
|
4040
|
-
const daemon = await import("./notifyDaemon-
|
|
4040
|
+
const daemon = await import("./notifyDaemon-7R67TpDt.js");
|
|
4041
4041
|
switch (sub) {
|
|
4042
4042
|
case "run": return daemon.runDaemon();
|
|
4043
4043
|
case "once": return daemon.runDaemon({ once: true });
|
|
@@ -4064,4 +4064,4 @@ async function cmdNotifyd(rest) {
|
|
|
4064
4064
|
|
|
4065
4065
|
//#endregion
|
|
4066
4066
|
export { resolveOne as A, writeKeysPaced as B, matchKeyword as C, renderLogTailLines as D, readPtysize as E, snapshotStatus as F, hostId as G, TYPING_BADGE as H, stdinActivityPath as I, readInbox as J, listInboxParents as K, stopTipForCli as L, resolveResumeArgs as M, restartHintLines as N, renderRawLog as O, runSubcommand as P, notifyDir as Q, submitAndConfirm as R, listRecords as S, readNotes as T, appendEvent as U, writeToIpc 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, resolveReadWindow as j, renderRawLogLines 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, waitForLogQuiet as z };
|
|
4067
|
-
//# sourceMappingURL=subcommands-
|
|
4067
|
+
//# sourceMappingURL=subcommands-D-e8_Mm8.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 resolveOne, B as writeKeysPaced, C as matchKeyword, D as renderLogTailLines, E as readPtysize, F as snapshotStatus, I as stdinActivityPath, L as stopTipForCli, M as resolveResumeArgs, N as restartHintLines, O as renderRawLog, P as runSubcommand, R as submitAndConfirm, S as listRecords, T as readNotes, V as writeToIpc, _ 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 resolveReadWindow, k as renderRawLogLines, 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 waitForLogQuiet } from "./subcommands-
|
|
4
|
+
import { A as resolveOne, B as writeKeysPaced, C as matchKeyword, D as renderLogTailLines, E as readPtysize, F as snapshotStatus, I as stdinActivityPath, L as stopTipForCli, M as resolveResumeArgs, N as restartHintLines, O as renderRawLog, P as runSubcommand, R as submitAndConfirm, S as listRecords, T as readNotes, V as writeToIpc, _ 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 resolveReadWindow, k as renderRawLogLines, 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 waitForLogQuiet } from "./subcommands-D-e8_Mm8.js";
|
|
5
5
|
import "./e2e-jb0Hp43q.js";
|
|
6
6
|
import "./webrtcLink-B7REGtK2.js";
|
|
7
7
|
import "./remotes-CC-4GuJb.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-1N1BMsKq.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-B1n_pNP0.js.map
|
|
@@ -7,7 +7,7 @@ import { fileURLToPath } from "url";
|
|
|
7
7
|
|
|
8
8
|
//#region package.json
|
|
9
9
|
var name = "claude-yes";
|
|
10
|
-
var version = "1.
|
|
10
|
+
var version = "1.172.1";
|
|
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-1N1BMsKq.js.map
|
package/lab/ui/console-logic.js
CHANGED
|
@@ -348,7 +348,7 @@ function agentForestNodes(list) {
|
|
|
348
348
|
// flat entry list BEFORE layeredRows builds the room/peer/agent tree (which keeps
|
|
349
349
|
// the given order for siblings and first-seen order for room/peer groups). So
|
|
350
350
|
// sorting reorders roots and siblings without breaking the nesting.
|
|
351
|
-
export const SORT_MODES = ["state", "active", "created", "identity"];
|
|
351
|
+
export const SORT_MODES = ["state", "active", "stdin", "created", "identity"];
|
|
352
352
|
|
|
353
353
|
// Attention-first state ranking: someone scanning the fleet wants the agents that
|
|
354
354
|
// need them (needs_input) up top, then the wedged ones (stuck), then live work,
|
|
@@ -383,21 +383,26 @@ function lastActive(e) {
|
|
|
383
383
|
|
|
384
384
|
// Return a NEW array sorted for display per `mode` (default "state"):
|
|
385
385
|
// - "state": attention-first state, then git busyness, then newest.
|
|
386
|
-
// - "active": most recently active first (last_active_at desc).
|
|
386
|
+
// - "active": most recently active first (last_active_at, i.e. stdout, desc).
|
|
387
|
+
// - "stdin": most recently FED first (last_stdin_at desc) — which agent was
|
|
388
|
+
// just driven/typed-into/`ay send`-ed. Agents never fed sort last.
|
|
387
389
|
// - "created": newest first (started_at desc).
|
|
388
390
|
// - "identity": user@host:owner/repo/branch (alphabetical).
|
|
389
391
|
// Every comparator falls back to newest-first so order is total & deterministic.
|
|
390
392
|
export function sortEntries(entries, mode = "state") {
|
|
391
393
|
const byNewest = (a, b) => (b.started_at || 0) - (a.started_at || 0);
|
|
392
394
|
const byActive = (a, b) => lastActive(b) - lastActive(a) || byNewest(a, b);
|
|
395
|
+
const byStdin = (a, b) => (b.last_stdin_at ?? 0) - (a.last_stdin_at ?? 0) || byNewest(a, b);
|
|
393
396
|
const cmp =
|
|
394
397
|
mode === "active"
|
|
395
398
|
? byActive
|
|
396
|
-
: mode === "
|
|
397
|
-
?
|
|
398
|
-
: mode === "
|
|
399
|
-
?
|
|
400
|
-
:
|
|
399
|
+
: mode === "stdin"
|
|
400
|
+
? byStdin
|
|
401
|
+
: mode === "created"
|
|
402
|
+
? byNewest
|
|
403
|
+
: mode === "identity"
|
|
404
|
+
? (a, b) => fullIdent(a).localeCompare(fullIdent(b)) || byNewest(a, b)
|
|
405
|
+
: (a, b) => stateRank(a) - stateRank(b) || gitWeight(b) - gitWeight(a) || byNewest(a, b);
|
|
401
406
|
return entries.slice().sort(cmp);
|
|
402
407
|
}
|
|
403
408
|
|
package/lab/ui/index.html
CHANGED
|
@@ -2860,7 +2860,10 @@
|
|
|
2860
2860
|
const listEl = $("list");
|
|
2861
2861
|
if (!listEl) return;
|
|
2862
2862
|
for (const el of listEl.querySelectorAll(".row[data-key]")) {
|
|
2863
|
-
const
|
|
2863
|
+
const key = el.getAttribute("data-key");
|
|
2864
|
+
// Mirror rowFlags: never pulse the agent you have open (you see its input
|
|
2865
|
+
// live; also stops your own terminal's protocol replies blinking the row).
|
|
2866
|
+
const on = key !== sel && (flashUntil.get(key) || 0) > now;
|
|
2864
2867
|
el.classList.toggle("stdinflash", on);
|
|
2865
2868
|
}
|
|
2866
2869
|
}, 200);
|
|
@@ -3451,9 +3454,13 @@
|
|
|
3451
3454
|
// Extra row classes for collaborative presence: a yellow bar when a human
|
|
3452
3455
|
// peer is watching this agent, plus the stdin pulse while its input just
|
|
3453
3456
|
// advanced. Empty in the solo case, so a single-user list is unchanged.
|
|
3457
|
+
// The pulse is suppressed on the agent YOU have open (e._key === sel): you
|
|
3458
|
+
// already see its input land live in the terminal, so a flash there is
|
|
3459
|
+
// redundant — and it's the only row your own terminal's protocol replies
|
|
3460
|
+
// could ever nudge, so this also keeps a resize from blinking your own row.
|
|
3454
3461
|
function rowFlags(e) {
|
|
3455
3462
|
const peers = focusByKey.get(e._key) || 0;
|
|
3456
|
-
const flash = (flashUntil.get(e._key) || 0) > Date.now();
|
|
3463
|
+
const flash = e._key !== sel && (flashUntil.get(e._key) || 0) > Date.now();
|
|
3457
3464
|
return (peers ? " peerfocus" : "") + (flash ? " stdinflash" : "");
|
|
3458
3465
|
}
|
|
3459
3466
|
// A yellow chip showing how many peers are watching this agent ("" if none).
|
package/package.json
CHANGED
package/ts/serve.ts
CHANGED
|
@@ -1232,6 +1232,47 @@ export async function cmdServe(rest: string[]): Promise<number> {
|
|
|
1232
1232
|
return ensureRepoWatch(root).val; // cached — the request path never spawns `git status`
|
|
1233
1233
|
};
|
|
1234
1234
|
|
|
1235
|
+
// Denoised "last meaningful stdin" tracking — drives the console's stdin flash
|
|
1236
|
+
// and the `stdin` sort order. The FIFO's mtime alone is too noisy: xterm forwards
|
|
1237
|
+
// the agent TUI's terminal-protocol auto-replies (cursor-position / device-
|
|
1238
|
+
// attributes reports) to stdin, so a mere resize/redraw would bump it and the row
|
|
1239
|
+
// would false-flash. So we stamp what WE write, split two ways: `meaningfulStdinAt`
|
|
1240
|
+
// skips those auto-replies; `anyDaemonWriteAt` records every write we make. A FIFO
|
|
1241
|
+
// mtime NEWER than any write we made can only be a local `ay send` (which writes
|
|
1242
|
+
// the FIFO directly, bypassing us) — always meaningful — so it still counts. See
|
|
1243
|
+
// resolveLastStdinAt below and the /api/send handler that stamps these.
|
|
1244
|
+
const meaningfulStdinAt = new Map<number, number>();
|
|
1245
|
+
const anyDaemonWriteAt = new Map<number, number>();
|
|
1246
|
+
// A payload that is PURELY a terminal auto-reply (Cursor Position Report, Device
|
|
1247
|
+
// Attributes, Device Status Report) — protocol chatter a TUI emits on redraw/resize,
|
|
1248
|
+
// not a keystroke. Anchored so a chunk that also carries real input never matches;
|
|
1249
|
+
// real typing (incl. arrow keys like `ESC[A`) never looks like one of these.
|
|
1250
|
+
const isTerminalReply = (s: string) => /^\x1b\[(\d+;\d+R|\?[\d;]*c|>[\d;]*c|\d*n)$/.test(s);
|
|
1251
|
+
// Stamp both maps after a daemon FIFO write, keyed off the FIFO's post-write mtime
|
|
1252
|
+
// (so `anyDaemonWriteAt` is exactly our write's mtime — an external write bumps it
|
|
1253
|
+
// strictly higher, which is how resolveLastStdinAt tells them apart with no clock skew).
|
|
1254
|
+
const noteStdinWrite = async (pid: number, fifo: string, meaningful: boolean) => {
|
|
1255
|
+
const mt = await stat(fifo)
|
|
1256
|
+
.then((s) => s.mtimeMs)
|
|
1257
|
+
.catch(() => null);
|
|
1258
|
+
if (mt == null) return;
|
|
1259
|
+
anyDaemonWriteAt.set(pid, mt);
|
|
1260
|
+
if (meaningful) meaningfulStdinAt.set(pid, mt);
|
|
1261
|
+
};
|
|
1262
|
+
// last_stdin_at for a record: newest of (a) the last meaningful write we made and
|
|
1263
|
+
// (b) a FIFO write we did NOT make (a local `ay send`, always meaningful). A mtime
|
|
1264
|
+
// at/below our last write means the newest write was ours → use the meaningful stamp
|
|
1265
|
+
// (which excludes auto-replies); a strictly newer mtime is an external real write.
|
|
1266
|
+
const resolveLastStdinAt = async (r: { pid: number; fifo_file?: string | null }) => {
|
|
1267
|
+
const meaningful = meaningfulStdinAt.get(r.pid) ?? null;
|
|
1268
|
+
if (!r.fifo_file) return meaningful;
|
|
1269
|
+
const mtime = await stat(r.fifo_file)
|
|
1270
|
+
.then((s) => s.mtimeMs)
|
|
1271
|
+
.catch(() => null);
|
|
1272
|
+
if (mtime == null) return meaningful;
|
|
1273
|
+
return mtime > (anyDaemonWriteAt.get(r.pid) ?? 0) ? mtime : meaningful;
|
|
1274
|
+
};
|
|
1275
|
+
|
|
1235
1276
|
// One agent record decorated for the console: the latest OSC title + a git
|
|
1236
1277
|
// snapshot (skipped for exited agents — their repo state is no longer live).
|
|
1237
1278
|
const withMeta = async (r: Awaited<ReturnType<typeof listRecords>>[number]) => {
|
|
@@ -1255,19 +1296,13 @@ export async function cmdServe(rest: string[]): Promise<number> {
|
|
|
1255
1296
|
.then((s) => s.mtimeMs)
|
|
1256
1297
|
.catch(() => r.started_at)
|
|
1257
1298
|
: r.started_at;
|
|
1258
|
-
// Last-stdin time:
|
|
1259
|
-
//
|
|
1260
|
-
//
|
|
1261
|
-
//
|
|
1262
|
-
//
|
|
1263
|
-
//
|
|
1264
|
-
|
|
1265
|
-
const lastStdinAt =
|
|
1266
|
-
status !== "exited" && r.fifo_file
|
|
1267
|
-
? await stat(r.fifo_file)
|
|
1268
|
-
.then((s) => s.mtimeMs)
|
|
1269
|
-
.catch(() => null)
|
|
1270
|
-
: null;
|
|
1299
|
+
// Last-stdin time: when this agent was last fed MEANINGFUL input — a real
|
|
1300
|
+
// keystroke, the console composer, or an `ay send` (local or remote) — but NOT
|
|
1301
|
+
// the TUI's terminal-protocol auto-replies, which would otherwise make a resize
|
|
1302
|
+
// or redraw look like input. The console flashes a row when this advances (so a
|
|
1303
|
+
// collaborator sees input land even when they weren't the one sending it) and can
|
|
1304
|
+
// sort by it. See resolveLastStdinAt / noteStdinWrite. Null for exited agents.
|
|
1305
|
+
const lastStdinAt = status !== "exited" ? await resolveLastStdinAt(r) : null;
|
|
1271
1306
|
return {
|
|
1272
1307
|
...r,
|
|
1273
1308
|
last_active_at: lastActiveAt,
|
|
@@ -1667,6 +1702,11 @@ export async function cmdServe(rest: string[]): Promise<number> {
|
|
|
1667
1702
|
} else {
|
|
1668
1703
|
await writeToIpc(record.fifo_file, msg + trailing);
|
|
1669
1704
|
}
|
|
1705
|
+
// Record this write for the stdin flash / sort. A payload that is purely a
|
|
1706
|
+
// terminal auto-reply (xterm answering the TUI's cursor/DA query, forwarded
|
|
1707
|
+
// over this same wire) is protocol noise, not input — stamp anyDaemonWriteAt
|
|
1708
|
+
// but not the "meaningful" time, so a resize/redraw can't trip the flash.
|
|
1709
|
+
await noteStdinWrite(record.pid, record.fifo_file, !isTerminalReply(msg));
|
|
1670
1710
|
return Response.json({ ok: true, pid: record.pid });
|
|
1671
1711
|
} catch (e) {
|
|
1672
1712
|
return new Response((e as Error).message, { status: 404 });
|
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
import "./ts-CJuOKFYC.js";
|
|
2
|
-
import "./logger-CDIsZ-Pp.js";
|
|
3
|
-
import "./versionChecker-OhTh_a0W.js";
|
|
4
|
-
import "./pidStore-BIvsBQ8X.js";
|
|
5
|
-
import "./globalPidIndex-CoNr7tS8.js";
|
|
6
|
-
import { t as SUPPORTED_CLIS } from "./SUPPORTED_CLIS-CLwNa69l.js";
|
|
7
|
-
|
|
8
|
-
export { SUPPORTED_CLIS };
|