agent-yes 1.263.0 → 1.264.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-DlxOPg-j.js +11 -0
- package/dist/{SUPPORTED_CLIS-DjFlWHpg.js → SUPPORTED_CLIS-JcVs6jt7.js} +2 -2
- package/dist/{agentShare-BP6wiu_5.js → agentShare-B8h_JkOw.js} +3 -3
- package/dist/{callback-B0PQUZcK.js → callback-C9rkbjgR.js} +3 -3
- package/dist/{callback-DFUFLIZQ.js → callback-DlJ_glcF.js} +3 -3
- package/dist/cli.js +9 -9
- package/dist/{cwdConflictWarn-B_047KCF.js → cwdConflictWarn-DZTxTGXq.js} +2 -2
- package/dist/{forkNested-CBdhC852.js → forkNested-CgJ1rTnT.js} +2 -2
- package/dist/globalPidIndex-CQX_0JSB.js +4 -0
- package/dist/{globalPidIndex-pwp7Vb7o.js → globalPidIndex-Dq4KY2IV.js} +2 -8
- package/dist/index.js +4 -4
- package/dist/{notifyDaemon-BskLhHdg.js → notifyDaemon--TDDJupp.js} +3 -3
- package/dist/pidStore-D-b8I6Qx.js +6 -0
- package/dist/{pidStore-DfSm1jog.js → pidStore-DJqSZPJi.js} +11 -7
- package/dist/{rustBinary-Borvwmya.js → rustBinary-DA-C6PjH.js} +2 -2
- package/dist/{schedule-BSEIVKQ0.js → schedule-CdgYYRti.js} +6 -6
- package/dist/{serve-BEdLsSpv.js → serve-Z8FAjest.js} +20 -20
- package/dist/{setup-DFRvZ_ku.js → setup-D6B85mUe.js} +2 -2
- package/dist/{spawnGate-D-68B907.js → spawnGate-D0E1uRP7.js} +2 -2
- package/dist/spawnGate-DqKBA07k.js +5 -0
- package/dist/{subcommands-B1YlmRaZ.js → subcommands-C2ipqBtq.js} +2 -2
- package/dist/{subcommands-Bo1MSwuC.js → subcommands-C3w4bg6x.js} +134 -90
- package/dist/{terminal-BMQWojIp.js → terminal-iObUHvkj.js} +2 -2
- package/dist/{todoCli-DNOk38lq.js → todoCli-CngDeaT2.js} +2 -2
- package/dist/{trayApp-CjB5QhdV.js → trayApp-BUI7SXiY.js} +2 -2
- package/dist/trayApp-Cb9a-quB.js +5 -0
- package/dist/{ts-BSHR_dga.js → ts-ClHKe4d8.js} +123 -5
- package/dist/{versionChecker-BTLZ3PAb.js → versionChecker-DRAbaxo-.js} +2 -2
- package/dist/{widget-BVss0Z9Y.js → widget-BRBsnbLn.js} +3 -3
- package/dist/{ws-DMudFezi.js → ws-BppNz49U.js} +3 -3
- package/dist/{ws-DxNNwnrc.js → ws-CAFA4oXH.js} +2 -2
- package/package.json +1 -1
- package/ts/globalPidIndex.spec.ts +5 -20
- package/ts/globalPidIndex.ts +9 -19
- package/ts/identity.spec.ts +108 -0
- package/ts/identity.ts +124 -0
- package/ts/index.ts +12 -4
- package/ts/messageLog.ts +0 -2
- package/ts/pidStore.spec.ts +14 -24
- package/ts/pidStore.ts +13 -10
- package/ts/subcommands.spec.ts +11 -120
- package/ts/subcommands.ts +13 -103
- package/ts/titleScanner.spec.ts +65 -0
- package/ts/titleScanner.ts +137 -0
- package/dist/SUPPORTED_CLIS--5E9wO4L.js +0 -11
- package/dist/globalPidIndex-CHA__9Xf.js +0 -4
- package/dist/pidStore-1PQ4ARnh.js +0 -6
- package/dist/spawnGate-DbSHnfqA.js +0 -5
- package/dist/trayApp-DrdktFnW.js +0 -5
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { t as invokedCliName } from "./invokedCli-uqM2YYA7.js";
|
|
2
2
|
import { n as logger } from "./logger-CDIsZ-Pp.js";
|
|
3
3
|
import { t as agentYesHome } from "./agentYesHome-CtmsY6I-.js";
|
|
4
|
-
import { a as
|
|
4
|
+
import { a as updateGlobalPidStatus, i as readGlobalPids } from "./globalPidIndex-Dq4KY2IV.js";
|
|
5
5
|
import { a as recordOutbox, i as recordMessage, n as readMailbox, t as partyMatches } from "./messageLog-BYFwioFY.js";
|
|
6
6
|
import { t as loadSharedCliDefaults } from "./configShared-DtHMBCl7.js";
|
|
7
7
|
import { n as isWebrtcSpec } from "./webrtcLink-CS4D-3G1.js";
|
|
@@ -13,10 +13,110 @@ import { appendFile, mkdir, open, readFile, readdir, rename, rm, stat, writeFile
|
|
|
13
13
|
import { homedir } from "os";
|
|
14
14
|
import path from "path";
|
|
15
15
|
import { randomUUID } from "node:crypto";
|
|
16
|
-
import
|
|
16
|
+
import { readFileSync } from "node:fs";
|
|
17
|
+
import path$1 from "node:path";
|
|
18
|
+
import os$1, { homedir as homedir$1, hostname as hostname$1, userInfo as userInfo$1 } from "node:os";
|
|
17
19
|
import { fileURLToPath } from "node:url";
|
|
18
20
|
import { randomBytes as randomBytes$1 } from "crypto";
|
|
19
21
|
|
|
22
|
+
//#region ts/identity.ts
|
|
23
|
+
/**
|
|
24
|
+
* The standardized agent identity string:
|
|
25
|
+
*
|
|
26
|
+
* <username>@<hostname>:<path>:<branch>#<pid>
|
|
27
|
+
* e.g. sno@Mac:~/ws/symval/symval/tree/crm:main#30402
|
|
28
|
+
*
|
|
29
|
+
* One line answers "who is this agent" across every surface that names one —
|
|
30
|
+
* the `ay send` envelope header, `ay whoami`, logs. The branch segment usually
|
|
31
|
+
* carries the lane name for free (worktree checkouts like `crm-yamamoto-wifi`
|
|
32
|
+
* or `fix/t173-tone-core` name their purpose), which is why there is no
|
|
33
|
+
* separate role concept.
|
|
34
|
+
*
|
|
35
|
+
* Parsing (right-to-left, for consumers that need it): `#<pid>` from the end;
|
|
36
|
+
* the branch is after the last `:` (git forbids `:` in ref names); the
|
|
37
|
+
* username is before the first `@`; the hostname is between that `@` and the
|
|
38
|
+
* next `:` (hostnames contain no `:`). The path in the middle may itself
|
|
39
|
+
* contain `@`/`:` (Windows drives), which is why parsing anchors on the ends.
|
|
40
|
+
*
|
|
41
|
+
* Every token is clamped before rendering: the identity is embedded in the
|
|
42
|
+
* `<ay-msg …>` envelope's OPEN tag, which is not nonce-protected — whitespace
|
|
43
|
+
* or `>` in a token could forge header structure.
|
|
44
|
+
*/
|
|
45
|
+
/** Replace anything outside a conservative charset so a token can never break
|
|
46
|
+
* out of the envelope header line. Collapses runs to a single `-`. */
|
|
47
|
+
function safeToken(raw, max) {
|
|
48
|
+
return raw.replace(/[^A-Za-z0-9._-]+/g, "-").replace(/^-+|-+$/g, "").slice(0, max);
|
|
49
|
+
}
|
|
50
|
+
/** The local username, header-safe ("John Smith" → "John-Smith"). */
|
|
51
|
+
function localUser() {
|
|
52
|
+
try {
|
|
53
|
+
return safeToken(userInfo$1().username, 32) || "unknown";
|
|
54
|
+
} catch {
|
|
55
|
+
return "unknown";
|
|
56
|
+
}
|
|
57
|
+
}
|
|
58
|
+
/** The local hostname's first label ("Macs-MBP.local" → "Macs-MBP"). */
|
|
59
|
+
function localHost() {
|
|
60
|
+
return safeToken(hostname$1().split(".")[0] ?? "", 32) || "unknown";
|
|
61
|
+
}
|
|
62
|
+
/**
|
|
63
|
+
* The checked-out branch of the git repo containing `cwd`, or a short commit
|
|
64
|
+
* id when detached, or null when `cwd` is not inside a git checkout. Pure
|
|
65
|
+
* file reads — never spawns git — so it is cheap enough to run on every send:
|
|
66
|
+
* walk up to the nearest `.git`, follow a worktree's `gitdir:` indirection
|
|
67
|
+
* file, then parse `HEAD`.
|
|
68
|
+
*/
|
|
69
|
+
function readGitBranch(cwd) {
|
|
70
|
+
let dir = path$1.resolve(cwd);
|
|
71
|
+
for (let depth = 0; depth < 32; depth++) {
|
|
72
|
+
const dotGit = path$1.join(dir, ".git");
|
|
73
|
+
let gitDir = null;
|
|
74
|
+
try {
|
|
75
|
+
const content = readFileSync(dotGit, "utf8");
|
|
76
|
+
const m = /^gitdir:\s*(.+)\s*$/m.exec(content);
|
|
77
|
+
gitDir = m ? path$1.resolve(dir, m[1].trim()) : null;
|
|
78
|
+
} catch (err) {
|
|
79
|
+
if (err?.code === "EISDIR") gitDir = dotGit;
|
|
80
|
+
}
|
|
81
|
+
if (gitDir) try {
|
|
82
|
+
const head = readFileSync(path$1.join(gitDir, "HEAD"), "utf8").trim();
|
|
83
|
+
const ref = /^ref:\s*refs\/heads\/(.+)$/.exec(head);
|
|
84
|
+
if (ref) return safeBranch(ref[1]);
|
|
85
|
+
if (/^[0-9a-f]{40}$/i.test(head)) return head.slice(0, 12);
|
|
86
|
+
return null;
|
|
87
|
+
} catch {
|
|
88
|
+
return null;
|
|
89
|
+
}
|
|
90
|
+
const parent = path$1.dirname(dir);
|
|
91
|
+
if (parent === dir) return null;
|
|
92
|
+
dir = parent;
|
|
93
|
+
}
|
|
94
|
+
return null;
|
|
95
|
+
}
|
|
96
|
+
/** Branch names never contain `:`/space/`~`/`^` (git forbids them), but they
|
|
97
|
+
* DO allow `/` and `#` — keep `/` (readable, unambiguous: parsing anchors on
|
|
98
|
+
* `#<pid>` at the end) and clamp everything else defensively. */
|
|
99
|
+
function safeBranch(raw) {
|
|
100
|
+
return raw.replace(/[^A-Za-z0-9._/#-]+/g, "-").replace(/^-+|-+$/g, "").slice(0, 64);
|
|
101
|
+
}
|
|
102
|
+
/** Abbreviate the home directory to `~`, mirroring how `ay ls` prints cwds. */
|
|
103
|
+
function tildify(p) {
|
|
104
|
+
const home = homedir$1();
|
|
105
|
+
return p.startsWith(home) ? "~" + p.slice(home.length) : p;
|
|
106
|
+
}
|
|
107
|
+
/**
|
|
108
|
+
* Render the standardized identity for an agent. `user`/`host` default to the
|
|
109
|
+
* local machine (correct for the envelope: the sending wrapper runs on the
|
|
110
|
+
* agent's own host), `branch` auto-detects from `cwd` unless given.
|
|
111
|
+
*/
|
|
112
|
+
function formatIdentity(parts) {
|
|
113
|
+
const user = parts.user ?? localUser();
|
|
114
|
+
const host = parts.host ?? localHost();
|
|
115
|
+
const branch = parts.branch === void 0 ? readGitBranch(parts.cwd) : parts.branch;
|
|
116
|
+
return `${user}@${host}:${tildify(parts.cwd)}${branch ? `:${branch}` : ""}#${parts.pid}`;
|
|
117
|
+
}
|
|
118
|
+
|
|
119
|
+
//#endregion
|
|
20
120
|
//#region ts/agentTree.ts
|
|
21
121
|
/**
|
|
22
122
|
* Link records into a forest via parent_pid === wrapper_pid. Records whose
|
|
@@ -1213,7 +1313,11 @@ async function cmdWhoami(rest) {
|
|
|
1213
1313
|
const ageMin = Math.max(0, Math.round((Date.now() - self.started_at) / 6e4));
|
|
1214
1314
|
const lines = [
|
|
1215
1315
|
`agent ${self.cli} #${self.pid}${self.agent_id ? ` (agent_id ${self.agent_id})` : ""}`,
|
|
1216
|
-
`
|
|
1316
|
+
`identity ${formatIdentity({
|
|
1317
|
+
cwd: self.cwd,
|
|
1318
|
+
pid: self.pid
|
|
1319
|
+
})}`,
|
|
1320
|
+
`title ${self.title ?? "-"}`,
|
|
1217
1321
|
`state ${state}${question ? ` — ${question}` : ""}`,
|
|
1218
1322
|
`cwd ${self.cwd}`,
|
|
1219
1323
|
`started ${new Date(self.started_at).toISOString()} (${ageMin}m ago)`,
|
|
@@ -1221,7 +1325,10 @@ async function cmdWhoami(rest) {
|
|
|
1221
1325
|
`log ${self.log_file ?? "-"}`,
|
|
1222
1326
|
`fifo ${self.fifo_file ?? "-"}`,
|
|
1223
1327
|
`reply ${reply} "..."`,
|
|
1224
|
-
`envelope <ay-msg from ${self.cli}
|
|
1328
|
+
`envelope <ay-msg from ${self.cli} ${formatIdentity({
|
|
1329
|
+
cwd: self.cwd,
|
|
1330
|
+
pid: self.pid
|
|
1331
|
+
})} — reply: ${reply} "...">…</ay-msg>`
|
|
1225
1332
|
];
|
|
1226
1333
|
process.stdout.write(lines.join("\n") + "\n");
|
|
1227
1334
|
return 0;
|
|
@@ -1268,7 +1375,7 @@ async function readLocalTsPids(cwd) {
|
|
|
1268
1375
|
exit_code: d.exitCode ?? null,
|
|
1269
1376
|
exit_reason: d.exitReason ?? null,
|
|
1270
1377
|
started_at: d.startedAt ?? 0,
|
|
1271
|
-
|
|
1378
|
+
title: d.title ?? null
|
|
1272
1379
|
}));
|
|
1273
1380
|
}
|
|
1274
1381
|
/** Merge by pid; later entries (typically from the global file) win. */
|
|
@@ -1298,7 +1405,6 @@ const SUBCOMMANDS = new Set([
|
|
|
1298
1405
|
"head",
|
|
1299
1406
|
"send",
|
|
1300
1407
|
"msgs",
|
|
1301
|
-
"role",
|
|
1302
1408
|
"key",
|
|
1303
1409
|
"select",
|
|
1304
1410
|
"spawn",
|
|
@@ -1409,7 +1515,6 @@ async function runSubcommand(argv) {
|
|
|
1409
1515
|
case "head": return await cmdRead(rest, { mode: "head" });
|
|
1410
1516
|
case "send": return await cmdSend(rest);
|
|
1411
1517
|
case "msgs": return await cmdMsgs(rest);
|
|
1412
|
-
case "role": return await cmdRole(rest);
|
|
1413
1518
|
case "key": return await cmdKey(rest);
|
|
1414
1519
|
case "select": return await cmdSelect(rest);
|
|
1415
1520
|
case "spawn": return await cmdSpawn(rest);
|
|
@@ -1419,7 +1524,7 @@ async function runSubcommand(argv) {
|
|
|
1419
1524
|
case "restart": return await cmdRestart(rest);
|
|
1420
1525
|
case "note": return await cmdNote(rest);
|
|
1421
1526
|
case "todo": {
|
|
1422
|
-
const { runTodoSubcommand } = await import("./todoCli-
|
|
1527
|
+
const { runTodoSubcommand } = await import("./todoCli-CngDeaT2.js");
|
|
1423
1528
|
return runTodoSubcommand(rest);
|
|
1424
1529
|
}
|
|
1425
1530
|
case "ch":
|
|
@@ -1428,35 +1533,35 @@ async function runSubcommand(argv) {
|
|
|
1428
1533
|
return cmdCh(rest);
|
|
1429
1534
|
}
|
|
1430
1535
|
case "term": {
|
|
1431
|
-
const { cmdTerm } = await import("./terminal-
|
|
1536
|
+
const { cmdTerm } = await import("./terminal-iObUHvkj.js");
|
|
1432
1537
|
return cmdTerm(rest);
|
|
1433
1538
|
}
|
|
1434
1539
|
case "widget": {
|
|
1435
|
-
const { cmdWidget } = await import("./widget-
|
|
1540
|
+
const { cmdWidget } = await import("./widget-BRBsnbLn.js");
|
|
1436
1541
|
return cmdWidget(rest);
|
|
1437
1542
|
}
|
|
1438
1543
|
case "mint": {
|
|
1439
|
-
const { cmdMint } = await import("./widget-
|
|
1544
|
+
const { cmdMint } = await import("./widget-BRBsnbLn.js");
|
|
1440
1545
|
return cmdMint(rest);
|
|
1441
1546
|
}
|
|
1442
1547
|
case "serve": {
|
|
1443
|
-
const { cmdServe } = await import("./serve-
|
|
1548
|
+
const { cmdServe } = await import("./serve-Z8FAjest.js");
|
|
1444
1549
|
return cmdServe(rest);
|
|
1445
1550
|
}
|
|
1446
1551
|
case "tray": {
|
|
1447
|
-
const { cmdTray } = await import("./trayApp-
|
|
1552
|
+
const { cmdTray } = await import("./trayApp-Cb9a-quB.js");
|
|
1448
1553
|
return cmdTray(rest);
|
|
1449
1554
|
}
|
|
1450
1555
|
case "setup": {
|
|
1451
|
-
const { cmdSetup } = await import("./setup-
|
|
1556
|
+
const { cmdSetup } = await import("./setup-D6B85mUe.js");
|
|
1452
1557
|
return cmdSetup(rest);
|
|
1453
1558
|
}
|
|
1454
1559
|
case "ws": {
|
|
1455
|
-
const { cmdWs } = await import("./ws-
|
|
1560
|
+
const { cmdWs } = await import("./ws-BppNz49U.js");
|
|
1456
1561
|
return cmdWs(rest);
|
|
1457
1562
|
}
|
|
1458
1563
|
case "schedule": {
|
|
1459
|
-
const { cmdSchedule } = await import("./schedule-
|
|
1564
|
+
const { cmdSchedule } = await import("./schedule-CdgYYRti.js");
|
|
1460
1565
|
return cmdSchedule(rest);
|
|
1461
1566
|
}
|
|
1462
1567
|
case "remote": {
|
|
@@ -1468,7 +1573,7 @@ async function runSubcommand(argv) {
|
|
|
1468
1573
|
return cmdExpose(rest);
|
|
1469
1574
|
}
|
|
1470
1575
|
case "callback": {
|
|
1471
|
-
const { cmdCallback } = await import("./callback-
|
|
1576
|
+
const { cmdCallback } = await import("./callback-C9rkbjgR.js");
|
|
1472
1577
|
return cmdCallback(rest);
|
|
1473
1578
|
}
|
|
1474
1579
|
case "reap":
|
|
@@ -1539,7 +1644,7 @@ async function cmdHelp(managerCommands = true) {
|
|
|
1539
1644
|
const wsLines = managerCommands ? " ay ws ls [--status] list <owner>/<repo>/tree/<branch> workspaces\n ay ws new <owner>/<repo>[@branch] clone/refresh a workspace (ay ws help for more)\n" : ``;
|
|
1540
1645
|
const self = process.env.AGENT_YES_PID ? await resolveSender() : null;
|
|
1541
1646
|
const agentSection = self ? await buildAgentContextSection(self) : "";
|
|
1542
|
-
process.stdout.write(agentSection + "ay - agent-yes CLI\n\nManagement:\n ay ls [keyword] list running agents\n ay tail [-f] [-n N] <keyword> last N lines (96), -f to follow\n ay read <keyword> [page opts] paginate: --last/--head N, --range A:B,\n --before-line L [--limit N]\n ay cat <keyword> full log\n ay head <keyword> first N lines\n ay send <keyword> <msg> send a message (keyword '.' = agent in this cwd)\n ay msgs [keyword] [--in|--out] inter-agent message log (sent + received)\n ay
|
|
1647
|
+
process.stdout.write(agentSection + "ay - agent-yes CLI\n\nManagement:\n ay ls [keyword] list running agents\n ay tail [-f] [-n N] <keyword> last N lines (96), -f to follow\n ay read <keyword> [page opts] paginate: --last/--head N, --range A:B,\n --before-line L [--limit N]\n ay cat <keyword> full log\n ay head <keyword> first N lines\n ay send <keyword> <msg> send a message (keyword '.' = agent in this cwd)\n ay msgs [keyword] [--in|--out] inter-agent message log (sent + received)\n ay ch mk|join|send|read|tail <topic> local-first E2E channels: AI ↔ humans on a topic (ay ch help)\n ay term embed <pid> <script> to embed a live read-only agent terminal in a page (ay term help)\n ay widget ls | read selection|dom read an opted-in page widget's context (selection/DOM) (ay widget help)\n ay mint <target> --caps ... mint a scoped, short-TTL capability token (embeddable in a page)\n ay key <keyword> <key...> send raw keystrokes (down/up/enter/esc/…) — drives menus\n ay select <keyword> <N> pick option N of a needs_input selection menu\n ay attach <keyword> interactive attach (detach: Ctrl-\\)\n ay stop <keyword> graceful shutdown (/exit for claude/codex)\n ay exit <keyword> [reason] graceful shutdown, recording who/why (= 'ay send <kw> exit')\n ay restart <keyword> [--fresh] stop (if live) + relaunch resuming the session; --fresh replays the prompt\n ay status <keyword> agent status snapshot\n ay whoami [--json] (inside an agent) your own registry identity + reply address\n ay result <keyword> [--wait] pull an agent's structured result envelope\n ay result set '<json>' (inside an agent) deposit your result envelope\n ay reap kill process groups leaked by dead agents\n ay deepseek|ds [-- <codex args>] run codex via the local DeepSeek adapter (DEEPSEEK_API_KEY)\n" + wsLines + "\nRemote:\n" + setupLine + " ay schedule <when> <cli> -- <msg> run an agent on a schedule (HH:MM or cron)\n ay serve [--port N] start HTTP API server (prints token)\n ay serve status show serve daemon/server status\n ay remote add <alias> http://<token>@<host>:<port>\n ay remote ls / rm <alias> manage saved remotes\n ay expose <port> share localhost:<port> at https://<id>.agent-yes.com (private link)\n ay callback --expires 7d mint an embeddable message-me widget for one agent\n ay ls <token>@<host>:<port> connect inline (no alias needed)\n ay send <token>@<host>:<port>:<kw> <msg>\n\nRun an agent:\n ay [claude|codex|gemini|...] [options] -- [prompt]\n ay claude -- \"fix the bug in auth.ts\"\n ay claude --help full agent-runner options\n\nLabs (examples at https://github.com/snomiao/agent-yes/tree/main/lab):\n local-role-play/ designer + builder on one machine\n http-remote/ ay serve remote access demo\n p2p-pairing/ libp2p P2P (needs: cargo build --features swarm)\n");
|
|
1543
1648
|
return 0;
|
|
1544
1649
|
}
|
|
1545
1650
|
function matchKeyword(record, keyword) {
|
|
@@ -3359,9 +3464,11 @@ async function cmdSend(rest) {
|
|
|
3359
3464
|
let nonce;
|
|
3360
3465
|
if (sender.agent && !isSlashCommand(body) && !raw) {
|
|
3361
3466
|
nonce = randomBytes$1(4).toString("hex");
|
|
3362
|
-
const
|
|
3363
|
-
|
|
3364
|
-
|
|
3467
|
+
const identity = formatIdentity({
|
|
3468
|
+
cwd: sender.agent.cwd,
|
|
3469
|
+
pid: sender.agent.pid
|
|
3470
|
+
});
|
|
3471
|
+
prefix = `<ay-msg ${nonce} from ${sender.agent.cli} ${identity} — reply: ay send ${replyTarget} "...">\n`;
|
|
3365
3472
|
suffix = `\n</ay-msg ${nonce}>`;
|
|
3366
3473
|
if (/^\s*<ay-msg\s/.test(body)) process.stderr.write("warning: body already starts with an <ay-msg …> header — ay send adds the envelope automatically, so the recipient will see a DOUBLE wrapper. Send the bare body instead (or pass --raw if you really mean to deliver a pre-built envelope verbatim; forwarding a quoted message inside a plain body is fine).\n");
|
|
3367
3474
|
}
|
|
@@ -3395,15 +3502,13 @@ async function cmdSend(rest) {
|
|
|
3395
3502
|
pid: sender.agent.pid,
|
|
3396
3503
|
cli: sender.agent.cli,
|
|
3397
3504
|
cwd: sender.agent.cwd,
|
|
3398
|
-
agent_id: sender.agent.agent_id
|
|
3399
|
-
role: sender.agent.role ?? void 0
|
|
3505
|
+
agent_id: sender.agent.agent_id
|
|
3400
3506
|
} : null,
|
|
3401
3507
|
to: {
|
|
3402
3508
|
pid: record.pid,
|
|
3403
3509
|
cli: record.cli,
|
|
3404
3510
|
cwd: record.cwd,
|
|
3405
|
-
agent_id: record.agent_id
|
|
3406
|
-
role: record.role ?? void 0
|
|
3511
|
+
agent_id: record.agent_id
|
|
3407
3512
|
},
|
|
3408
3513
|
body,
|
|
3409
3514
|
code: trailing === "\r" ? void 0 : codeName,
|
|
@@ -3524,67 +3629,6 @@ async function cmdMsgs(rest) {
|
|
|
3524
3629
|
}
|
|
3525
3630
|
return 0;
|
|
3526
3631
|
}
|
|
3527
|
-
/**
|
|
3528
|
-
* `ay role [name]` / `ay role <keyword> <name>` — read or set an agent's
|
|
3529
|
-
* self-declared lane/role name ("pm", "crm", …). The role rides in the
|
|
3530
|
-
* `ay send` envelope header (`from claude #123 (pm) @ …`) so recipients don't
|
|
3531
|
-
* translate cwd/pid into a lane by hand — the emergent `[pm→qa]` body prefixes
|
|
3532
|
-
* exist exactly because the envelope lacked this. With no args: print the
|
|
3533
|
-
* calling agent's role. With one arg: set the calling agent's role (requires
|
|
3534
|
-
* agent context). With two args: resolve the keyword and set that agent's role.
|
|
3535
|
-
* `--clear` removes it. Roles are clamped by sanitizeRole (they render into the
|
|
3536
|
-
* non-nonce-protected open tag).
|
|
3537
|
-
*/
|
|
3538
|
-
const ROLE_RESOLVE_OPTS = {
|
|
3539
|
-
all: false,
|
|
3540
|
-
active: false,
|
|
3541
|
-
cwdScope: null,
|
|
3542
|
-
latest: false,
|
|
3543
|
-
json: false
|
|
3544
|
-
};
|
|
3545
|
-
async function cmdRole(rest) {
|
|
3546
|
-
const argv = await yargs(rest).usage("Usage: ay role [name] | ay role <keyword> <name> | ay role [keyword] --clear").option("clear", {
|
|
3547
|
-
type: "boolean",
|
|
3548
|
-
default: false,
|
|
3549
|
-
description: "Remove the role"
|
|
3550
|
-
}).help(false).version(false).exitProcess(false).parseAsync();
|
|
3551
|
-
const args = argv._.slice(0).map(String);
|
|
3552
|
-
let target = null;
|
|
3553
|
-
let newRole;
|
|
3554
|
-
if (args.length === 2) {
|
|
3555
|
-
target = await resolveOne(args[0], ROLE_RESOLVE_OPTS);
|
|
3556
|
-
newRole = args[1];
|
|
3557
|
-
} else if (args.length === 1 && argv.clear) target = await resolveOne(args[0], ROLE_RESOLVE_OPTS);
|
|
3558
|
-
else if (args.length === 1) {
|
|
3559
|
-
target = await resolveSender();
|
|
3560
|
-
if (!target) {
|
|
3561
|
-
process.stderr.write("ay role: no agent context (AGENT_YES_PID unset or unregistered) — from a human shell, name the agent: ay role <keyword> <name>\n");
|
|
3562
|
-
return 1;
|
|
3563
|
-
}
|
|
3564
|
-
newRole = args[0];
|
|
3565
|
-
} else {
|
|
3566
|
-
target = await resolveSender();
|
|
3567
|
-
if (!target) {
|
|
3568
|
-
process.stderr.write("ay role: no agent context — from a human shell, name the agent: ay role <keyword> [<name>|--clear]\n");
|
|
3569
|
-
return 1;
|
|
3570
|
-
}
|
|
3571
|
-
}
|
|
3572
|
-
if (newRole === void 0 && !argv.clear) {
|
|
3573
|
-
process.stdout.write(`${target.role ?? ""}\n`);
|
|
3574
|
-
return 0;
|
|
3575
|
-
}
|
|
3576
|
-
let role = null;
|
|
3577
|
-
if (!argv.clear) {
|
|
3578
|
-
role = sanitizeRole(newRole);
|
|
3579
|
-
if (!role) {
|
|
3580
|
-
process.stderr.write(`ay role: invalid role ${JSON.stringify(newRole)} — use 1-32 chars of [A-Za-z0-9._-]\n`);
|
|
3581
|
-
return 1;
|
|
3582
|
-
}
|
|
3583
|
-
}
|
|
3584
|
-
await updateGlobalPidStatus(target.pid, { role });
|
|
3585
|
-
process.stdout.write(role ? `pid ${target.pid} (${target.cli}): role set to "${role}" — envelopes now read: from ${target.cli} #${target.pid} (${role}) @ ${shortenPath(target.cwd)}\n` : `pid ${target.pid} (${target.cli}): role cleared\n`);
|
|
3586
|
-
return 0;
|
|
3587
|
-
}
|
|
3588
3632
|
async function resolveWritableAgent(keyword, opts) {
|
|
3589
3633
|
const record = await resolveOne(keyword, opts);
|
|
3590
3634
|
if (!record.fifo_file) throw new Error(`pid ${record.pid}: no fifo_file recorded — this agent didn't register a stdin FIFO (an older agent, or one not started with --stdpush). Restarting it (ay restart ${record.pid}) re-registers one.`);
|
|
@@ -4017,7 +4061,7 @@ async function cmdAttach(rest) {
|
|
|
4017
4061
|
const winsizeDir = path.join(ayHome, "winsize");
|
|
4018
4062
|
await mkdir(winsizeDir, { recursive: true });
|
|
4019
4063
|
const winsizePath = path.join(winsizeDir, String(record.pid));
|
|
4020
|
-
const { resolveDaemonHttpBase, loadTokenReadOnly } = await import("./serve-
|
|
4064
|
+
const { resolveDaemonHttpBase, loadTokenReadOnly } = await import("./serve-Z8FAjest.js");
|
|
4021
4065
|
const daemonBase = await resolveDaemonHttpBase().catch(() => null);
|
|
4022
4066
|
const daemonToken = daemonBase ? await loadTokenReadOnly().catch(() => null) ?? "" : "";
|
|
4023
4067
|
const capViewer = `attach:${process.pid}`;
|
|
@@ -4727,7 +4771,7 @@ async function cmdNotify(rest) {
|
|
|
4727
4771
|
}
|
|
4728
4772
|
const ensure = async () => {
|
|
4729
4773
|
if (!argv["ensure-daemon"]) return;
|
|
4730
|
-
const { ensureDaemon } = await import("./notifyDaemon
|
|
4774
|
+
const { ensureDaemon } = await import("./notifyDaemon--TDDJupp.js");
|
|
4731
4775
|
await ensureDaemon().catch(() => null);
|
|
4732
4776
|
};
|
|
4733
4777
|
await heartbeatWatcher(parent, selfStartedAt);
|
|
@@ -4801,7 +4845,7 @@ async function cmdNotifyCursor(args) {
|
|
|
4801
4845
|
}
|
|
4802
4846
|
async function cmdNotifyd(rest) {
|
|
4803
4847
|
const sub = rest[0] ?? "status";
|
|
4804
|
-
const daemon = await import("./notifyDaemon
|
|
4848
|
+
const daemon = await import("./notifyDaemon--TDDJupp.js");
|
|
4805
4849
|
switch (sub) {
|
|
4806
4850
|
case "run": return daemon.runDaemon();
|
|
4807
4851
|
case "once": return daemon.runDaemon({ once: true });
|
|
@@ -4828,4 +4872,4 @@ async function cmdNotifyd(rest) {
|
|
|
4828
4872
|
|
|
4829
4873
|
//#endregion
|
|
4830
4874
|
export { listInboxParents as $, readNotes as A, restartHintLines as B, isUserTyping as C, menuSelectKeys as D, matchKeyword as E, renderRawLog as F, submitAndConfirm as G, snapshotStatus as H, renderRawLogLines as I, writeToIpc as J, waitForLogQuiet as K, resolveOne as L, recentMessageEdges as M, recentReadEdges as N, readAgentPtysize as O, renderLogTailLines as P, isTransientLockMkdirError as Q, resolveReadWindow as R, isUnknownManagerToken as S, listRecords as T, stdinActivityPath as U, runSubcommand as V, stopTipForCli as W, gcInboxes as X, appendEvent as Y, hostId as Z, isAgentStuck as _, backoffWhileTyping as a, notifyDir as at, isSlashCommand as b, controlCodeFromName as c, deriveLiveStatus as d, liveWatchers as et, extractBadges as f, finalizedLines as g, extractTaskCounts as h, TYPING_WINDOW_MS as i, daemonLockOwnerPath as it, readPtysize as j, readLogForRender as k, cursorAbs as l, extractNeedsInput as m, MAX_RENDER_BYTES as n, shouldStealLock as nt, cmdDeepseek as o, TYPING_BADGE as ot, extractMenu as p, writeKeysPaced as q, READ_PAGE_DEFAULT as r, daemonLockDir as rt, cmdHelp as s, GRACEFUL_EXIT_COMMANDS as t, readInbox as tt, deriveLiveState as u, isExitRequest as v, lastStdinAt as w, isSubcommand as x, isPidAlive as y, resolveResumeArgs as z };
|
|
4831
|
-
//# sourceMappingURL=subcommands-
|
|
4875
|
+
//# sourceMappingURL=subcommands-C3w4bg6x.js.map
|
|
@@ -98,7 +98,7 @@ async function cmdTermMint(args) {
|
|
|
98
98
|
if (flags.ro && flags.interactive) throw new Error("--ro and --interactive are mutually exclusive");
|
|
99
99
|
const ttlSec = parseTtlSec(typeof flags.ttl === "string" ? flags.ttl : "15m");
|
|
100
100
|
const canSend = flags.interactive === true;
|
|
101
|
-
const { mintScopedTermToken } = await import("./serve-
|
|
101
|
+
const { mintScopedTermToken } = await import("./serve-Z8FAjest.js");
|
|
102
102
|
const r = await mintScopedTermToken(pid, {
|
|
103
103
|
ttlSec,
|
|
104
104
|
canSend
|
|
@@ -135,4 +135,4 @@ async function cmdTerm(args) {
|
|
|
135
135
|
|
|
136
136
|
//#endregion
|
|
137
137
|
export { cmdTerm };
|
|
138
|
-
//# sourceMappingURL=terminal-
|
|
138
|
+
//# sourceMappingURL=terminal-iObUHvkj.js.map
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import "./logger-CDIsZ-Pp.js";
|
|
2
2
|
import { _ as isKnownKind, a as renderTree, d as openStore, i as renderDigest, l as CycleError, n as buildTreeJSON, o as unblockedTasks, p as LIFECYCLES, s as describeBlock, t as reconcileTodos, x as removeControlCharacters } from "./todoAutomation-BQRW614S.js";
|
|
3
3
|
import "./JsonlStore-CPGIR0Wy.js";
|
|
4
|
-
import { i as readGlobalPids } from "./globalPidIndex-
|
|
4
|
+
import { i as readGlobalPids } from "./globalPidIndex-Dq4KY2IV.js";
|
|
5
5
|
import yargs from "yargs";
|
|
6
6
|
|
|
7
7
|
//#region ts/todoCli.ts
|
|
@@ -456,4 +456,4 @@ async function runTodoSubcommand(rest0) {
|
|
|
456
456
|
|
|
457
457
|
//#endregion
|
|
458
458
|
export { runTodoSubcommand };
|
|
459
|
-
//# sourceMappingURL=todoCli-
|
|
459
|
+
//# sourceMappingURL=todoCli-CngDeaT2.js.map
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { n as findTrayLauncher } from "./rustBinary-
|
|
1
|
+
import { n as findTrayLauncher } from "./rustBinary-DA-C6PjH.js";
|
|
2
2
|
import { t as agentYesHome } from "./agentYesHome-CtmsY6I-.js";
|
|
3
3
|
import { existsSync } from "node:fs";
|
|
4
4
|
import path from "node:path";
|
|
@@ -97,4 +97,4 @@ async function cmdTray(args) {
|
|
|
97
97
|
|
|
98
98
|
//#endregion
|
|
99
99
|
export { trayHiddenMarker as a, launchTray as i, hasDesktop as n, isTrayHidden as r, cmdTray as t };
|
|
100
|
-
//# sourceMappingURL=trayApp-
|
|
100
|
+
//# sourceMappingURL=trayApp-BUI7SXiY.js.map
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import { n as __esmMin, r as __exportAll } from "./chunk-cZBX9HZv.js";
|
|
2
2
|
import { n as logger, t as addTransport } from "./logger-CDIsZ-Pp.js";
|
|
3
|
-
import { r as getInstalledPackage } from "./versionChecker-
|
|
3
|
+
import { r as getInstalledPackage } from "./versionChecker-DRAbaxo-.js";
|
|
4
4
|
import { t as agentYesHome } from "./agentYesHome-CtmsY6I-.js";
|
|
5
5
|
import { d as openStore, p as LIFECYCLES, x as removeControlCharacters } from "./todoAutomation-BQRW614S.js";
|
|
6
6
|
import { i as shouldUseLock, r as releaseLock, t as acquireLock } from "./runningLock-DBoONoM-.js";
|
|
7
|
-
import { i as readGlobalPids } from "./globalPidIndex-
|
|
8
|
-
import { t as PidStore } from "./pidStore-
|
|
7
|
+
import { i as readGlobalPids } from "./globalPidIndex-Dq4KY2IV.js";
|
|
8
|
+
import { t as PidStore } from "./pidStore-DJqSZPJi.js";
|
|
9
9
|
import { r as recordInbox } from "./messageLog-BYFwioFY.js";
|
|
10
10
|
import { n as register, r as sweep } from "./reaper-C4BvNylH.js";
|
|
11
11
|
import { arch, platform } from "process";
|
|
@@ -446,6 +446,118 @@ async function createLinuxFifo(cli, customPath) {
|
|
|
446
446
|
}
|
|
447
447
|
}
|
|
448
448
|
|
|
449
|
+
//#endregion
|
|
450
|
+
//#region ts/titleScanner.ts
|
|
451
|
+
/**
|
|
452
|
+
* Incremental scanner for terminal-title escapes (OSC 0/2) in the child CLI's
|
|
453
|
+
* PTY stream — the TS-runtime mirror of rs/src/title_scanner.rs; keep the two
|
|
454
|
+
* in sync.
|
|
455
|
+
*
|
|
456
|
+
* Coding-agent CLIs (claude, opencode, codex) continuously set the terminal
|
|
457
|
+
* title to a summary of what they are doing (`ESC ] 0 ; <title> BEL`, also
|
|
458
|
+
* terminated by `ESC \`). The wrapper observes the stream anyway, so scanning
|
|
459
|
+
* it yields a live "what is this agent doing" label for free — surfaced as
|
|
460
|
+
* `title` in the pid registry and shown by `ay whoami` / `ay ls --json`.
|
|
461
|
+
*
|
|
462
|
+
* Fed arbitrary chunk boundaries: a sequence split across reads still parses.
|
|
463
|
+
* The scanner only observes — it never modifies the stream.
|
|
464
|
+
*/
|
|
465
|
+
/** A title longer than this is a runaway OSC without terminator — discard. */
|
|
466
|
+
const MAX_TITLE_LEN = 512;
|
|
467
|
+
/** What we store/display. */
|
|
468
|
+
const STORED_TITLE_LEN = 256;
|
|
469
|
+
var State = /* @__PURE__ */ function(State) {
|
|
470
|
+
State[State["Ground"] = 0] = "Ground";
|
|
471
|
+
State[State["Esc"] = 1] = "Esc";
|
|
472
|
+
State[State["OscParam"] = 2] = "OscParam";
|
|
473
|
+
State[State["OscTitle"] = 3] = "OscTitle";
|
|
474
|
+
State[State["OscOther"] = 4] = "OscOther";
|
|
475
|
+
State[State["OscTitleEsc"] = 5] = "OscTitleEsc";
|
|
476
|
+
State[State["OscOtherEsc"] = 6] = "OscOtherEsc";
|
|
477
|
+
return State;
|
|
478
|
+
}(State || {});
|
|
479
|
+
var TitleScanner = class {
|
|
480
|
+
state = State.Ground;
|
|
481
|
+
param = "";
|
|
482
|
+
title = "";
|
|
483
|
+
/** Feed one output chunk; returns the LAST complete title in it, if any. */
|
|
484
|
+
feed(chunk) {
|
|
485
|
+
let found = null;
|
|
486
|
+
for (const c of chunk) switch (this.state) {
|
|
487
|
+
case State.Ground:
|
|
488
|
+
if (c === "\x1B") this.state = State.Esc;
|
|
489
|
+
break;
|
|
490
|
+
case State.Esc:
|
|
491
|
+
if (c === "]") {
|
|
492
|
+
this.param = "";
|
|
493
|
+
this.state = State.OscParam;
|
|
494
|
+
} else if (c !== "\x1B") this.state = State.Ground;
|
|
495
|
+
break;
|
|
496
|
+
case State.OscParam:
|
|
497
|
+
if (c >= "0" && c <= "9" && this.param.length < 4) this.param += c;
|
|
498
|
+
else if (c === ";") if (this.param === "0" || this.param === "2") {
|
|
499
|
+
this.title = "";
|
|
500
|
+
this.state = State.OscTitle;
|
|
501
|
+
} else this.state = State.OscOther;
|
|
502
|
+
else if (c === "\x07") this.state = State.Ground;
|
|
503
|
+
else if (c === "\x1B") this.state = State.OscOtherEsc;
|
|
504
|
+
else this.state = State.OscOther;
|
|
505
|
+
break;
|
|
506
|
+
case State.OscTitle:
|
|
507
|
+
if (c === "\x07") {
|
|
508
|
+
found = cleanTitle(this.title);
|
|
509
|
+
this.state = State.Ground;
|
|
510
|
+
} else if (c === "\x1B") this.state = State.OscTitleEsc;
|
|
511
|
+
else if (this.title.length >= MAX_TITLE_LEN) this.state = State.OscOther;
|
|
512
|
+
else this.title += c;
|
|
513
|
+
break;
|
|
514
|
+
case State.OscTitleEsc:
|
|
515
|
+
if (c === "\\") found = cleanTitle(this.title);
|
|
516
|
+
this.state = State.Ground;
|
|
517
|
+
break;
|
|
518
|
+
case State.OscOther:
|
|
519
|
+
if (c === "\x07") this.state = State.Ground;
|
|
520
|
+
else if (c === "\x1B") this.state = State.OscOtherEsc;
|
|
521
|
+
break;
|
|
522
|
+
case State.OscOtherEsc:
|
|
523
|
+
this.state = State.Ground;
|
|
524
|
+
break;
|
|
525
|
+
}
|
|
526
|
+
return found || null;
|
|
527
|
+
}
|
|
528
|
+
};
|
|
529
|
+
/** Strip control chars (they can't be typed into a title bar) and clamp. */
|
|
530
|
+
function cleanTitle(raw) {
|
|
531
|
+
return raw.replace(/[\x00-\x1f\x7f]/g, "").trim().slice(0, STORED_TITLE_LEN);
|
|
532
|
+
}
|
|
533
|
+
/**
|
|
534
|
+
* Change-gated + rate-limited publisher: registry writes take the
|
|
535
|
+
* cross-runtime lock, while claude retitles every few seconds — the steady
|
|
536
|
+
* state must cost zero writes, and a retitle burst collapses to one write per
|
|
537
|
+
* window. Call `poll()` from any recurring point in the run loop so the final
|
|
538
|
+
* title still lands within a window after the CLI goes quiet.
|
|
539
|
+
*/
|
|
540
|
+
var TitlePublisher = class {
|
|
541
|
+
latest = null;
|
|
542
|
+
written = null;
|
|
543
|
+
writtenAt = 0;
|
|
544
|
+
constructor(write, minIntervalMs = 2e3) {
|
|
545
|
+
this.write = write;
|
|
546
|
+
this.minIntervalMs = minIntervalMs;
|
|
547
|
+
}
|
|
548
|
+
observe(title) {
|
|
549
|
+
this.latest = title;
|
|
550
|
+
this.poll();
|
|
551
|
+
}
|
|
552
|
+
poll(now = Date.now()) {
|
|
553
|
+
if (this.latest === null || this.latest === this.written) return;
|
|
554
|
+
if (now - this.writtenAt < this.minIntervalMs) return;
|
|
555
|
+
this.write(this.latest);
|
|
556
|
+
this.written = this.latest;
|
|
557
|
+
this.writtenAt = now;
|
|
558
|
+
}
|
|
559
|
+
};
|
|
560
|
+
|
|
449
561
|
//#endregion
|
|
450
562
|
//#region ts/idleWaiter.ts
|
|
451
563
|
/**
|
|
@@ -1569,7 +1681,6 @@ async function agentYes({ cli, cliArgs = [], skipPermissions = false, prompt, ro
|
|
|
1569
1681
|
const parentPid = Number.isInteger(inheritedAyPid) && inheritedAyPid > 0 ? inheritedAyPid : void 0;
|
|
1570
1682
|
ptyEnv.AGENT_YES_PID = String(process.pid);
|
|
1571
1683
|
delete ptyEnv.AGENT_YES_AGENT_ID;
|
|
1572
|
-
delete ptyEnv.AGENT_YES_ROLE;
|
|
1573
1684
|
stripClaudeSessionPin(ptyEnv);
|
|
1574
1685
|
if (cliConf?.env) for (const [key, raw] of Object.entries(cliConf.env)) {
|
|
1575
1686
|
let unresolved = false;
|
|
@@ -1600,10 +1711,17 @@ async function agentYes({ cli, cliArgs = [], skipPermissions = false, prompt, ro
|
|
|
1600
1711
|
ptyOptions
|
|
1601
1712
|
});
|
|
1602
1713
|
shellWrite = (data) => shell.write(data);
|
|
1714
|
+
const titleScanner = new TitleScanner();
|
|
1715
|
+
const titlePublisher = new TitlePublisher((title) => {
|
|
1716
|
+
pidStore.updateTitle(shell.pid, title).catch(() => null);
|
|
1717
|
+
});
|
|
1603
1718
|
function onData(data) {
|
|
1604
1719
|
const currentPid = shell.pid;
|
|
1605
1720
|
xtermProxy.write(data);
|
|
1606
1721
|
globalAgentRegistry.appendStdout(currentPid, data);
|
|
1722
|
+
const title = titleScanner.feed(data);
|
|
1723
|
+
if (title) titlePublisher.observe(title);
|
|
1724
|
+
else titlePublisher.poll();
|
|
1607
1725
|
}
|
|
1608
1726
|
shell.onData(onData);
|
|
1609
1727
|
try {
|
|
@@ -2181,4 +2299,4 @@ function sleep(ms) {
|
|
|
2181
2299
|
|
|
2182
2300
|
//#endregion
|
|
2183
2301
|
export { hasTodoStore as a, permissionBadge as c, answerAsk as i, AgentContext as l, agentYes as n, listAsks as o, config as r, listAsksForProject as s, CLIS_CONFIG as t, CLAUDE_SESSION_PIN_ENV as u };
|
|
2184
|
-
//# sourceMappingURL=ts-
|
|
2302
|
+
//# sourceMappingURL=ts-ClHKe4d8.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.264.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-DRAbaxo-.js.map
|
|
@@ -28,7 +28,7 @@ function parseFlags(args, known) {
|
|
|
28
28
|
}
|
|
29
29
|
/** Resolve the local daemon base URL + token (flags override discovery). */
|
|
30
30
|
async function daemonTarget(flags) {
|
|
31
|
-
const { resolveDaemonHttpBase, loadTokenReadOnly } = await import("./serve-
|
|
31
|
+
const { resolveDaemonHttpBase, loadTokenReadOnly } = await import("./serve-Z8FAjest.js");
|
|
32
32
|
const base = typeof flags.base === "string" ? flags.base : await resolveDaemonHttpBase();
|
|
33
33
|
if (!base) throw new Error("no running ay serve daemon found — start `ay serve` or pass --base <url> (e.g. http://127.0.0.1:PORT)");
|
|
34
34
|
const token = typeof flags.token === "string" ? flags.token : await loadTokenReadOnly() ?? "";
|
|
@@ -186,7 +186,7 @@ async function cmdMint(args) {
|
|
|
186
186
|
const bad = caps.filter((c) => !KNOWN_CAPS.has(c));
|
|
187
187
|
if (bad.length) throw new Error(`unknown cap(s): ${bad.join(", ")} (valid: ${[...KNOWN_CAPS].join(", ")})`);
|
|
188
188
|
const ttlSec = parseTtlSec(typeof flags.ttl === "string" ? flags.ttl : "15m");
|
|
189
|
-
const { mintScopedTermToken } = await import("./serve-
|
|
189
|
+
const { mintScopedTermToken } = await import("./serve-Z8FAjest.js");
|
|
190
190
|
const r = await mintScopedTermToken(target, {
|
|
191
191
|
ttlSec,
|
|
192
192
|
caps
|
|
@@ -202,4 +202,4 @@ async function cmdMint(args) {
|
|
|
202
202
|
|
|
203
203
|
//#endregion
|
|
204
204
|
export { cmdMint, cmdWidget };
|
|
205
|
-
//# sourceMappingURL=widget-
|
|
205
|
+
//# sourceMappingURL=widget-BRBsnbLn.js.map
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import "./logger-CDIsZ-Pp.js";
|
|
2
|
-
import "./globalPidIndex-
|
|
2
|
+
import "./globalPidIndex-Dq4KY2IV.js";
|
|
3
3
|
import "./messageLog-BYFwioFY.js";
|
|
4
4
|
import "./e2e-CUMZC53I.js";
|
|
5
5
|
import "./configShared-DtHMBCl7.js";
|
|
6
|
-
import "./subcommands-
|
|
6
|
+
import "./subcommands-C3w4bg6x.js";
|
|
7
7
|
import "./webrtcLink-CS4D-3G1.js";
|
|
8
8
|
import "./remotes-Cn-wszbK.js";
|
|
9
|
-
import { a as isPathInside, c as walkWorkspaces, i as importProvisionModule, l as workspaceStatus, n as cmdWs, o as loadProvision, r as collectWorkspaces, s as resolveOperand, t as WS_JSON_SCHEMA } from "./ws-
|
|
9
|
+
import { a as isPathInside, c as walkWorkspaces, i as importProvisionModule, l as workspaceStatus, n as cmdWs, o as loadProvision, r as collectWorkspaces, s as resolveOperand, t as WS_JSON_SCHEMA } from "./ws-CAFA4oXH.js";
|
|
10
10
|
|
|
11
11
|
export { WS_JSON_SCHEMA, cmdWs, collectWorkspaces, isPathInside, loadProvision, walkWorkspaces, workspaceStatus };
|