agent-yes 1.110.0 → 1.111.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-Dh1CAhi9.js → SUPPORTED_CLIS-C81Qxc4I.js} +2 -2
- package/dist/SUPPORTED_CLIS-CyyetE45.js +8 -0
- package/dist/cli.js +3 -3
- package/dist/index.js +2 -2
- package/dist/{serve-BmM1r9No.js → serve-DuW7ZOfs.js} +14 -6
- package/dist/{subcommands-D3b7vKgY.js → subcommands-Bh5nxq2S.js} +2 -2
- package/dist/{subcommands-D4eVn3eY.js → subcommands-CuJU_Pu1.js} +1 -1
- package/dist/{ts--IvDnRaR.js → ts-PSRJy-Q0.js} +2 -2
- package/dist/{versionChecker-DSdFfx6l.js → versionChecker-DeSKN0_s.js} +2 -2
- package/lab/ui/index.html +14 -1
- package/package.json +1 -1
- package/ts/serve.ts +17 -1
- package/dist/SUPPORTED_CLIS-CGb1oNZd.js +0 -8
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { t as CLIS_CONFIG } from "./ts
|
|
1
|
+
import { t as CLIS_CONFIG } from "./ts-PSRJy-Q0.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-C81Qxc4I.js.map
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import "./ts-PSRJy-Q0.js";
|
|
2
|
+
import "./logger-B9h0djqx.js";
|
|
3
|
+
import "./versionChecker-DeSKN0_s.js";
|
|
4
|
+
import "./pidStore-DBjlqzo8.js";
|
|
5
|
+
import "./globalPidIndex-yVd3mbsV.js";
|
|
6
|
+
import { t as SUPPORTED_CLIS } from "./SUPPORTED_CLIS-C81Qxc4I.js";
|
|
7
|
+
|
|
8
|
+
export { SUPPORTED_CLIS };
|
package/dist/cli.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
#!/usr/bin/env bun
|
|
2
2
|
import { n as logger } from "./logger-B9h0djqx.js";
|
|
3
|
-
import { i as versionString, n as displayVersion, r as getInstalledPackage, t as checkAndAutoUpdate } from "./versionChecker-
|
|
3
|
+
import { i as versionString, n as displayVersion, r as getInstalledPackage, t as checkAndAutoUpdate } from "./versionChecker-DeSKN0_s.js";
|
|
4
4
|
import { argv } from "process";
|
|
5
5
|
import { execFileSync, spawn } from "child_process";
|
|
6
6
|
import ms from "ms";
|
|
@@ -482,7 +482,7 @@ function buildRustArgs(argv, cliFromScript, supportedClis) {
|
|
|
482
482
|
{
|
|
483
483
|
const rawArg = process.argv[2];
|
|
484
484
|
const isHelpFlag = rawArg === "-h" || rawArg === "--help";
|
|
485
|
-
const { isSubcommand, runSubcommand, cmdHelp } = await import("./subcommands-
|
|
485
|
+
const { isSubcommand, runSubcommand, cmdHelp } = await import("./subcommands-CuJU_Pu1.js");
|
|
486
486
|
if (isHelpFlag && process.argv.length === 3) {
|
|
487
487
|
cmdHelp();
|
|
488
488
|
process.exit(0);
|
|
@@ -515,7 +515,7 @@ if (config.useRust) {
|
|
|
515
515
|
}
|
|
516
516
|
}
|
|
517
517
|
if (rustBinary) {
|
|
518
|
-
const { SUPPORTED_CLIS } = await import("./SUPPORTED_CLIS-
|
|
518
|
+
const { SUPPORTED_CLIS } = await import("./SUPPORTED_CLIS-CyyetE45.js");
|
|
519
519
|
const rustArgs = buildRustArgs(process.argv, config.cli, SUPPORTED_CLIS);
|
|
520
520
|
if (config.verbose) {
|
|
521
521
|
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-PSRJy-Q0.js";
|
|
2
2
|
import "./logger-B9h0djqx.js";
|
|
3
|
-
import "./versionChecker-
|
|
3
|
+
import "./versionChecker-DeSKN0_s.js";
|
|
4
4
|
import "./pidStore-DBjlqzo8.js";
|
|
5
5
|
import "./globalPidIndex-yVd3mbsV.js";
|
|
6
6
|
|
|
@@ -1,14 +1,14 @@
|
|
|
1
|
-
import "./ts
|
|
1
|
+
import "./ts-PSRJy-Q0.js";
|
|
2
2
|
import "./logger-B9h0djqx.js";
|
|
3
|
-
import "./versionChecker-
|
|
3
|
+
import "./versionChecker-DeSKN0_s.js";
|
|
4
4
|
import "./pidStore-DBjlqzo8.js";
|
|
5
5
|
import "./globalPidIndex-yVd3mbsV.js";
|
|
6
|
-
import { t as SUPPORTED_CLIS } from "./SUPPORTED_CLIS-
|
|
6
|
+
import { t as SUPPORTED_CLIS } from "./SUPPORTED_CLIS-C81Qxc4I.js";
|
|
7
7
|
import "./remotes-C3xPRtfg.js";
|
|
8
|
-
import { c as listRecords, d as renderRawLog, f as resolveOne, g as writeToIpc, m as snapshotStatus, r as controlCodeFromName, u as readNotes } from "./subcommands-
|
|
8
|
+
import { c as listRecords, d as renderRawLog, f as resolveOne, g as writeToIpc, m as snapshotStatus, r as controlCodeFromName, u as readNotes } from "./subcommands-Bh5nxq2S.js";
|
|
9
9
|
import yargs from "yargs";
|
|
10
10
|
import { mkdir, open, readFile, writeFile } from "fs/promises";
|
|
11
|
-
import { homedir } from "os";
|
|
11
|
+
import { homedir, hostname, userInfo } from "os";
|
|
12
12
|
import path from "path";
|
|
13
13
|
import { fileURLToPath } from "node:url";
|
|
14
14
|
import { watch } from "node:fs";
|
|
@@ -241,6 +241,14 @@ Options:
|
|
|
241
241
|
return new Response(e.message, { status: 500 });
|
|
242
242
|
}
|
|
243
243
|
}
|
|
244
|
+
if (req.method === "GET" && p === "/api/whoami") {
|
|
245
|
+
let user = "";
|
|
246
|
+
try {
|
|
247
|
+
user = userInfo().username;
|
|
248
|
+
} catch {}
|
|
249
|
+
const host = hostname();
|
|
250
|
+
return Response.json({ host: user ? `${user}@${host}` : host });
|
|
251
|
+
}
|
|
244
252
|
if (req.method === "GET" && p === "/api/notes") {
|
|
245
253
|
const notes = await readNotes();
|
|
246
254
|
return Response.json(Object.fromEntries(notes));
|
|
@@ -552,4 +560,4 @@ Options:
|
|
|
552
560
|
|
|
553
561
|
//#endregion
|
|
554
562
|
export { cmdServe };
|
|
555
|
-
//# sourceMappingURL=serve-
|
|
563
|
+
//# sourceMappingURL=serve-DuW7ZOfs.js.map
|
|
@@ -163,7 +163,7 @@ async function runSubcommand(argv) {
|
|
|
163
163
|
case "restart": return await cmdRestart(rest);
|
|
164
164
|
case "note": return await cmdNote(rest);
|
|
165
165
|
case "serve": {
|
|
166
|
-
const { cmdServe } = await import("./serve-
|
|
166
|
+
const { cmdServe } = await import("./serve-DuW7ZOfs.js");
|
|
167
167
|
return cmdServe(rest);
|
|
168
168
|
}
|
|
169
169
|
case "setup": {
|
|
@@ -1595,4 +1595,4 @@ async function cmdStatus(rest) {
|
|
|
1595
1595
|
|
|
1596
1596
|
//#endregion
|
|
1597
1597
|
export { finalizedLines as a, listRecords as c, renderRawLog as d, resolveOne as f, writeToIpc as g, stopTipForCli as h, cursorAbs as i, matchKeyword as l, snapshotStatus as m, cmdHelp as n, isPidAlive as o, runSubcommand as p, controlCodeFromName as r, isSubcommand as s, GRACEFUL_EXIT_COMMANDS as t, readNotes as u };
|
|
1598
|
-
//# sourceMappingURL=subcommands-
|
|
1598
|
+
//# sourceMappingURL=subcommands-Bh5nxq2S.js.map
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import "./logger-B9h0djqx.js";
|
|
2
2
|
import "./globalPidIndex-yVd3mbsV.js";
|
|
3
3
|
import "./remotes-C3xPRtfg.js";
|
|
4
|
-
import { a as finalizedLines, c as listRecords, d as renderRawLog, f as resolveOne, g as writeToIpc, h as stopTipForCli, i as cursorAbs, l as matchKeyword, m as snapshotStatus, n as cmdHelp, o as isPidAlive, p as runSubcommand, r as controlCodeFromName, s as isSubcommand, t as GRACEFUL_EXIT_COMMANDS, u as readNotes } from "./subcommands-
|
|
4
|
+
import { a as finalizedLines, c as listRecords, d as renderRawLog, f as resolveOne, g as writeToIpc, h as stopTipForCli, i as cursorAbs, l as matchKeyword, m as snapshotStatus, n as cmdHelp, o as isPidAlive, p as runSubcommand, r as controlCodeFromName, s as isSubcommand, t as GRACEFUL_EXIT_COMMANDS, u as readNotes } from "./subcommands-Bh5nxq2S.js";
|
|
5
5
|
|
|
6
6
|
export { cmdHelp, isSubcommand, runSubcommand };
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { n as logger, t as addTransport } from "./logger-B9h0djqx.js";
|
|
2
|
-
import { r as getInstalledPackage } from "./versionChecker-
|
|
2
|
+
import { r as getInstalledPackage } from "./versionChecker-DeSKN0_s.js";
|
|
3
3
|
import { n as agentYesHome, t as PidStore } from "./pidStore-DBjlqzo8.js";
|
|
4
4
|
import { i as shouldUseLock, r as releaseLock, t as acquireLock } from "./runningLock-CJxsoGdb.js";
|
|
5
5
|
import { i as readGlobalPids } from "./globalPidIndex-yVd3mbsV.js";
|
|
@@ -1714,4 +1714,4 @@ function sleep(ms) {
|
|
|
1714
1714
|
|
|
1715
1715
|
//#endregion
|
|
1716
1716
|
export { removeControlCharacters as a, AgentContext as i, agentYes as n, config as r, CLIS_CONFIG as t };
|
|
1717
|
-
//# sourceMappingURL=ts
|
|
1717
|
+
//# sourceMappingURL=ts-PSRJy-Q0.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.111.0";
|
|
11
11
|
|
|
12
12
|
//#endregion
|
|
13
13
|
//#region ts/versionChecker.ts
|
|
@@ -221,4 +221,4 @@ async function displayVersion() {
|
|
|
221
221
|
|
|
222
222
|
//#endregion
|
|
223
223
|
export { versionString as i, displayVersion as n, getInstalledPackage as r, checkAndAutoUpdate as t };
|
|
224
|
-
//# sourceMappingURL=versionChecker-
|
|
224
|
+
//# sourceMappingURL=versionChecker-DeSKN0_s.js.map
|
package/lab/ui/index.html
CHANGED
|
@@ -1252,7 +1252,11 @@
|
|
|
1252
1252
|
s.live = true;
|
|
1253
1253
|
s.devices = new Set();
|
|
1254
1254
|
const out = (Array.isArray(arr) ? arr : []).map((e) => {
|
|
1255
|
-
|
|
1255
|
+
// codehost stamps _host per agent; agent-yes share rooms fall back to
|
|
1256
|
+
// the room's device label (from /api/whoami). Local stays unlabelled
|
|
1257
|
+
// (no deviceLabel) so a single-machine view keeps its clean path-only
|
|
1258
|
+
// identity instead of a blank "@:" prefix.
|
|
1259
|
+
const host = e._host || s.deviceLabel || "";
|
|
1256
1260
|
if (host) s.devices.add(host);
|
|
1257
1261
|
return { ...e, _room: s.id, _key: s.id + "#" + e.pid, _host: host };
|
|
1258
1262
|
});
|
|
@@ -1661,6 +1665,15 @@
|
|
|
1661
1665
|
await c.connect();
|
|
1662
1666
|
s.client = c;
|
|
1663
1667
|
s.tx = rtcTx(c);
|
|
1668
|
+
// agent-yes share (unlike codehost) sends no per-agent device id, so
|
|
1669
|
+
// every machine's rows would be unlabelled. Ask the host who it is
|
|
1670
|
+
// once and tag this room's agents with it in listSource. Best-effort:
|
|
1671
|
+
// an older host with no /api/whoami just leaves rows device-less.
|
|
1672
|
+
try {
|
|
1673
|
+
s.deviceLabel = (await s.tx.fetchJSON("/api/whoami"))?.host || "";
|
|
1674
|
+
} catch {
|
|
1675
|
+
s.deviceLabel = "";
|
|
1676
|
+
}
|
|
1664
1677
|
}
|
|
1665
1678
|
s.live = true;
|
|
1666
1679
|
} catch (e) {
|
package/package.json
CHANGED
package/ts/serve.ts
CHANGED
|
@@ -2,7 +2,7 @@ import { mkdir, open, readFile, writeFile } from "fs/promises";
|
|
|
2
2
|
import { watch } from "node:fs";
|
|
3
3
|
import { fileURLToPath } from "node:url";
|
|
4
4
|
import { createHash, randomBytes, timingSafeEqual } from "crypto";
|
|
5
|
-
import { homedir } from "os";
|
|
5
|
+
import { homedir, hostname, userInfo } from "os";
|
|
6
6
|
import path from "path";
|
|
7
7
|
import yargs from "yargs";
|
|
8
8
|
import {
|
|
@@ -320,6 +320,22 @@ export async function cmdServe(rest: string[]): Promise<number> {
|
|
|
320
320
|
}
|
|
321
321
|
}
|
|
322
322
|
|
|
323
|
+
// GET /api/whoami — this host's device label (user@host), so a remote
|
|
324
|
+
// console can tag each agent with the machine it came from. Unlike codehost,
|
|
325
|
+
// `ay serve --share` carries no per-agent device id; the viewer fetches this
|
|
326
|
+
// once per room and stamps it. os.userInfo()/hostname() are cross-platform
|
|
327
|
+
// (Windows included), so every machine reports a name, not just Unix ones.
|
|
328
|
+
if (req.method === "GET" && p === "/api/whoami") {
|
|
329
|
+
let user = "";
|
|
330
|
+
try {
|
|
331
|
+
user = userInfo().username;
|
|
332
|
+
} catch {
|
|
333
|
+
/* userInfo throws if there's no passwd entry (some containers) */
|
|
334
|
+
}
|
|
335
|
+
const host = hostname();
|
|
336
|
+
return Response.json({ host: user ? `${user}@${host}` : host });
|
|
337
|
+
}
|
|
338
|
+
|
|
323
339
|
// GET /api/notes
|
|
324
340
|
if (req.method === "GET" && p === "/api/notes") {
|
|
325
341
|
const notes = await readNotes();
|
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
import "./ts--IvDnRaR.js";
|
|
2
|
-
import "./logger-B9h0djqx.js";
|
|
3
|
-
import "./versionChecker-DSdFfx6l.js";
|
|
4
|
-
import "./pidStore-DBjlqzo8.js";
|
|
5
|
-
import "./globalPidIndex-yVd3mbsV.js";
|
|
6
|
-
import { t as SUPPORTED_CLIS } from "./SUPPORTED_CLIS-Dh1CAhi9.js";
|
|
7
|
-
|
|
8
|
-
export { SUPPORTED_CLIS };
|