agent-yes 1.192.2 → 1.193.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.
@@ -1,8 +1,8 @@
1
- import { t as CLIS_CONFIG } from "./ts-Cp_21mny.js";
1
+ import { t as CLIS_CONFIG } from "./ts-Cg0IpitM.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-CryNU1fs.js.map
8
+ //# sourceMappingURL=SUPPORTED_CLIS-eK4A0Nql.js.map
@@ -0,0 +1,8 @@
1
+ import "./ts-Cg0IpitM.js";
2
+ import "./logger-CDIsZ-Pp.js";
3
+ import "./versionChecker-C_ztEPMs.js";
4
+ import "./pidStore-BIvsBQ8X.js";
5
+ import "./globalPidIndex-CoNr7tS8.js";
6
+ import { t as SUPPORTED_CLIS } from "./SUPPORTED_CLIS-eK4A0Nql.js";
7
+
8
+ export { SUPPORTED_CLIS };
@@ -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 { j as resolveOne } from "./subcommands-Cq1mzI8Z.js";
4
+ import { j as resolveOne } from "./subcommands-CYAk7q_c.js";
5
5
  import "./e2e-BeKjLhmO.js";
6
6
  import "./webrtcLink-BG0Xc4-W.js";
7
7
  import "./remotes-oSmwSYaV.js";
@@ -228,4 +228,4 @@ function transformEvent(rawEvent, agentId, forwarded) {
228
228
 
229
229
  //#endregion
230
230
  export { createScopedShare, listShares, revokeAllShares, revokeShare };
231
- //# sourceMappingURL=agentShare-BY9WWDBm.js.map
231
+ //# sourceMappingURL=agentShare-C2PSaiaa.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-CaOEu_WC.js";
5
- import { n as getRustBinary } from "./rustBinary-CeRekAdR.js";
4
+ import { i as versionString, n as displayVersion, t as checkAndAutoUpdate } from "./versionChecker-C_ztEPMs.js";
5
+ import { n as getRustBinary } from "./rustBinary-BEEvKYm_.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-BnEmKfiM.js");
288
+ const { isSubcommand, runSubcommand, cmdHelp } = await import("./subcommands-B9-HhxcS.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-wrXQttpW.js");
330
+ const { SUPPORTED_CLIS } = await import("./SUPPORTED_CLIS-wAOAd_rx.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-Cp_21mny.js";
1
+ import { a as removeControlCharacters, i as AgentContext, n as agentYes, r as config, t as CLIS_CONFIG } from "./ts-Cg0IpitM.js";
2
2
  import "./logger-CDIsZ-Pp.js";
3
- import "./versionChecker-CaOEu_WC.js";
3
+ import "./versionChecker-C_ztEPMs.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 { G as hostId, J as readInbox, K as listInboxParents, O as renderLogTailLines, 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-Cq1mzI8Z.js";
4
+ import { G as hostId, J as readInbox, K as listInboxParents, O as renderLogTailLines, 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-CYAk7q_c.js";
5
5
  import "./e2e-BeKjLhmO.js";
6
6
  import "./webrtcLink-BG0Xc4-W.js";
7
7
  import "./remotes-oSmwSYaV.js";
@@ -588,4 +588,4 @@ async function ensureDaemon() {
588
588
 
589
589
  //#endregion
590
590
  export { daemonStatus, ensureDaemon, requestDaemonStop, runDaemon };
591
- //# sourceMappingURL=notifyDaemon-BPcU9HOC.js.map
591
+ //# sourceMappingURL=notifyDaemon-pJJzfvcJ.js.map
@@ -1,4 +1,4 @@
1
- import { r as getInstalledPackage } from "./versionChecker-CaOEu_WC.js";
1
+ import { r as getInstalledPackage } from "./versionChecker-C_ztEPMs.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-CeRekAdR.js.map
228
+ //# sourceMappingURL=rustBinary-BEEvKYm_.js.map
@@ -1,9 +1,9 @@
1
- import "./ts-Cp_21mny.js";
1
+ import "./ts-Cg0IpitM.js";
2
2
  import "./logger-CDIsZ-Pp.js";
3
- import "./versionChecker-CaOEu_WC.js";
3
+ import "./versionChecker-C_ztEPMs.js";
4
4
  import "./pidStore-BIvsBQ8X.js";
5
5
  import "./globalPidIndex-CoNr7tS8.js";
6
- import { t as SUPPORTED_CLIS } from "./SUPPORTED_CLIS-CryNU1fs.js";
6
+ import { t as SUPPORTED_CLIS } from "./SUPPORTED_CLIS-eK4A0Nql.js";
7
7
  import { d as resolveSpawnCwd } from "./workspaceConfig-_GtAZtsi.js";
8
8
  import { n as liveEnv, t as ensureNodeRuntime } from "./nodeRuntime-DZRjxpNp.js";
9
9
  import { createHash } from "node:crypto";
@@ -150,4 +150,4 @@ async function cmdSchedule(rest) {
150
150
 
151
151
  //#endregion
152
152
  export { cmdSchedule };
153
- //# sourceMappingURL=schedule-DCVkaHCo.js.map
153
+ //# sourceMappingURL=schedule-BuWv8206.js.map
@@ -1,13 +1,13 @@
1
- import "./ts-Cp_21mny.js";
1
+ import "./ts-Cg0IpitM.js";
2
2
  import "./logger-CDIsZ-Pp.js";
3
- import { r as getInstalledPackage } from "./versionChecker-CaOEu_WC.js";
4
- import { t as findSpawnHiddenLauncher } from "./rustBinary-CeRekAdR.js";
3
+ import { r as getInstalledPackage } from "./versionChecker-C_ztEPMs.js";
4
+ import { t as findSpawnHiddenLauncher } from "./rustBinary-BEEvKYm_.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-CryNU1fs.js";
10
- import { $ as TYPING_BADGE, D as recentReadEdges, E as readPtysize, H as writeToIpc, I as snapshotStatus, O as renderLogTailLines, S as listRecords, T as readNotes, b as isUserTyping, f as extractNeedsInput, j as resolveOne, k as renderRawLog, l as deriveLiveStatus, o as controlCodeFromName, p as extractTaskCounts, u as extractBadges } from "./subcommands-Cq1mzI8Z.js";
9
+ import { t as SUPPORTED_CLIS } from "./SUPPORTED_CLIS-eK4A0Nql.js";
10
+ import { $ as TYPING_BADGE, D as recentReadEdges, E as readPtysize, H as writeToIpc, I as snapshotStatus, O as renderLogTailLines, S as listRecords, T as readNotes, b as isUserTyping, f as extractNeedsInput, j as resolveOne, k as renderRawLog, l as deriveLiveStatus, o as controlCodeFromName, p as extractTaskCounts, u as extractBadges } from "./subcommands-CYAk7q_c.js";
11
11
  import "./e2e-BeKjLhmO.js";
12
12
  import "./webrtcLink-BG0Xc4-W.js";
13
13
  import "./remotes-oSmwSYaV.js";
@@ -1893,7 +1893,7 @@ Options:
1893
1893
  const perm = body.perm ?? "r";
1894
1894
  if (perm !== "r" && perm !== "rw") return new Response(`invalid perm ${perm} (want r or rw)`, { status: 400 });
1895
1895
  try {
1896
- const { createScopedShare } = await import("./agentShare-BY9WWDBm.js");
1896
+ const { createScopedShare } = await import("./agentShare-C2PSaiaa.js");
1897
1897
  const share = await createScopedShare({
1898
1898
  agent: body.agent,
1899
1899
  perm,
@@ -1908,12 +1908,12 @@ Options:
1908
1908
  }
1909
1909
  }
1910
1910
  if (req.method === "GET" && p === "/api/shares") {
1911
- const { listShares } = await import("./agentShare-BY9WWDBm.js");
1911
+ const { listShares } = await import("./agentShare-C2PSaiaa.js");
1912
1912
  return Response.json(listShares());
1913
1913
  }
1914
1914
  const revokeM = /^\/api\/share\/([^/]+)$/.exec(p);
1915
1915
  if (req.method === "DELETE" && revokeM) {
1916
- const { revokeShare } = await import("./agentShare-BY9WWDBm.js");
1916
+ const { revokeShare } = await import("./agentShare-C2PSaiaa.js");
1917
1917
  const ok = revokeShare(decodeURIComponent(revokeM[1]));
1918
1918
  return new Response(ok ? "revoked" : "no such share", { status: ok ? 200 : 404 });
1919
1919
  }
@@ -2094,7 +2094,7 @@ Options:
2094
2094
  const shutdown = (resolve) => {
2095
2095
  if (heartbeat) clearInterval(heartbeat);
2096
2096
  closeShare?.();
2097
- import("./agentShare-BY9WWDBm.js").then((m) => m.revokeAllShares()).catch(() => {});
2097
+ import("./agentShare-C2PSaiaa.js").then((m) => m.revokeAllShares()).catch(() => {});
2098
2098
  server?.stop();
2099
2099
  resolve();
2100
2100
  };
@@ -2107,4 +2107,4 @@ Options:
2107
2107
 
2108
2108
  //#endregion
2109
2109
  export { cmdServe };
2110
- //# sourceMappingURL=serve-Dxxm6cs6.js.map
2110
+ //# sourceMappingURL=serve-BrCvRObJ.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-Dxxm6cs6.js");
35
+ const { cmdServe } = await import("./serve-BrCvRObJ.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-CnHHrqP9.js.map
45
+ //# sourceMappingURL=setup-CL-giduA.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 renderRawLogLines, B as waitForLogQuiet, C as matchKeyword, D as recentReadEdges, E as readPtysize, F as runSubcommand, H as writeToIpc, I as snapshotStatus, L as stdinActivityPath, M as resolveReadWindow, N as resolveResumeArgs, O as renderLogTailLines, P as restartHintLines, R as stopTipForCli, S as listRecords, T as readNotes, V as writeKeysPaced, _ 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 resolveOne, k as renderRawLog, 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 submitAndConfirm } from "./subcommands-Cq1mzI8Z.js";
4
+ import { A as renderRawLogLines, B as waitForLogQuiet, C as matchKeyword, D as recentReadEdges, E as readPtysize, F as runSubcommand, H as writeToIpc, I as snapshotStatus, L as stdinActivityPath, M as resolveReadWindow, N as resolveResumeArgs, O as renderLogTailLines, P as restartHintLines, R as stopTipForCli, S as listRecords, T as readNotes, V as writeKeysPaced, _ 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 resolveOne, k as renderRawLog, 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 submitAndConfirm } from "./subcommands-CYAk7q_c.js";
5
5
  import "./e2e-BeKjLhmO.js";
6
6
  import "./webrtcLink-BG0Xc4-W.js";
7
7
  import "./remotes-oSmwSYaV.js";
@@ -1147,15 +1147,15 @@ async function runSubcommand(argv) {
1147
1147
  case "restart": return await cmdRestart(rest);
1148
1148
  case "note": return await cmdNote(rest);
1149
1149
  case "serve": {
1150
- const { cmdServe } = await import("./serve-Dxxm6cs6.js");
1150
+ const { cmdServe } = await import("./serve-BrCvRObJ.js");
1151
1151
  return cmdServe(rest);
1152
1152
  }
1153
1153
  case "setup": {
1154
- const { cmdSetup } = await import("./setup-CnHHrqP9.js");
1154
+ const { cmdSetup } = await import("./setup-CL-giduA.js");
1155
1155
  return cmdSetup(rest);
1156
1156
  }
1157
1157
  case "schedule": {
1158
- const { cmdSchedule } = await import("./schedule-DCVkaHCo.js");
1158
+ const { cmdSchedule } = await import("./schedule-BuWv8206.js");
1159
1159
  return cmdSchedule(rest);
1160
1160
  }
1161
1161
  case "remote": {
@@ -2730,7 +2730,7 @@ async function cmdSpawn(rest) {
2730
2730
  * (`send`, `key`, `select`): refuse a self-targeting loop, and require that THIS
2731
2731
  * sender actually looked at THIS target recently — an agent is blocked, an
2732
2732
  * interactive human is only warned — unless `force`. Returns the sender context
2733
- * so a caller can reuse it (e.g. `send`'s `[ay-msg …]` header). Extracted from
2733
+ * so a caller can reuse it (e.g. `send`'s `<ay-msg …>` header). Extracted from
2734
2734
  * cmdSend so the action commands enforce the identical guard.
2735
2735
  */
2736
2736
  async function enforceSendGuards(record, force) {
@@ -2931,8 +2931,8 @@ async function cmdSend(rest) {
2931
2931
  let suffix = "";
2932
2932
  if (sender.agent && !isSlashCommand(body)) {
2933
2933
  const nonce = randomBytes$1(4).toString("hex");
2934
- prefix = `[ay-msg ${nonce} from ${sender.agent.cli} #${sender.agent.pid} @ ${shortenPath(sender.agent.cwd)} — reply: ay send ${replyTarget} "..."]\n`;
2935
- suffix = `\n[/ay-msg ${nonce}]`;
2934
+ prefix = `<ay-msg ${nonce} from ${sender.agent.cli} #${sender.agent.pid} @ ${shortenPath(sender.agent.cwd)} — reply: ay send ${replyTarget} "...">\n`;
2935
+ suffix = `\n</ay-msg ${nonce}>`;
2936
2936
  }
2937
2937
  const fullBody = prefix + body + suffix;
2938
2938
  const noWait = Boolean(argv.noWait) || process.env.AGENT_YES_SEND_NO_WAIT === "1";
@@ -4004,7 +4004,7 @@ async function cmdNotify(rest) {
4004
4004
  }
4005
4005
  const ensure = async () => {
4006
4006
  if (!argv["ensure-daemon"]) return;
4007
- const { ensureDaemon } = await import("./notifyDaemon-BPcU9HOC.js");
4007
+ const { ensureDaemon } = await import("./notifyDaemon-pJJzfvcJ.js");
4008
4008
  await ensureDaemon().catch(() => null);
4009
4009
  };
4010
4010
  await heartbeatWatcher(parent, selfStartedAt);
@@ -4078,7 +4078,7 @@ async function cmdNotifyCursor(args) {
4078
4078
  }
4079
4079
  async function cmdNotifyd(rest) {
4080
4080
  const sub = rest[0] ?? "status";
4081
- const daemon = await import("./notifyDaemon-BPcU9HOC.js");
4081
+ const daemon = await import("./notifyDaemon-pJJzfvcJ.js");
4082
4082
  switch (sub) {
4083
4083
  case "run": return daemon.runDaemon();
4084
4084
  case "once": return daemon.runDaemon({ once: true });
@@ -4105,4 +4105,4 @@ async function cmdNotifyd(rest) {
4105
4105
 
4106
4106
  //#endregion
4107
4107
  export { TYPING_BADGE as $, renderRawLogLines as A, waitForLogQuiet as B, matchKeyword as C, recentReadEdges as D, readPtysize as E, runSubcommand as F, hostId as G, writeToIpc as H, snapshotStatus as I, readInbox as J, listInboxParents as K, stdinActivityPath as L, resolveReadWindow as M, resolveResumeArgs as N, renderLogTailLines as O, restartHintLines as P, notifyDir as Q, stopTipForCli as R, listRecords as S, readNotes as T, appendEvent as U, writeKeysPaced 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, resolveOne as j, renderRawLog 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, submitAndConfirm as z };
4108
- //# sourceMappingURL=subcommands-Cq1mzI8Z.js.map
4108
+ //# sourceMappingURL=subcommands-CYAk7q_c.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-CaOEu_WC.js";
2
+ import { r as getInstalledPackage } from "./versionChecker-C_ztEPMs.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-Cp_21mny.js.map
1827
+ //# sourceMappingURL=ts-Cg0IpitM.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.192.2";
10
+ var version = "1.193.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-CaOEu_WC.js.map
218
+ //# sourceMappingURL=versionChecker-C_ztEPMs.js.map
package/lab/ui/index.html CHANGED
@@ -1947,6 +1947,7 @@
1947
1947
  </p>
1948
1948
  <div class="srow">
1949
1949
  <button class="primary" id="exposeGo" type="button">Expose &amp; open</button>
1950
+ <button id="exposeCopy" type="button">Copy link</button>
1950
1951
  <button id="exposeCancel" type="button">Cancel</button>
1951
1952
  </div>
1952
1953
  </div>
@@ -3364,11 +3365,9 @@
3364
3365
 
3365
3366
  // Agree → mint the exposure on its host and open the claim link (which sets
3366
3367
  // the 8h cookie and redirects to the app), then refresh the manager list.
3367
- async function doExpose() {
3368
- const tx = exposePendingTx || localTx;
3369
- const port = exposePendingPort;
3370
- $("exposePrompt").hidden = true;
3371
- if (!port) return;
3368
+ // Create (or reuse) the exposure and mint a fresh single-use claim link.
3369
+ // Returns the {url, claim, …} info, or null on failure (with a message).
3370
+ async function exposeNow(port, tx) {
3372
3371
  let info = null;
3373
3372
  try {
3374
3373
  const r = await tx.post("/api/expose", { port });
@@ -3377,11 +3376,48 @@
3377
3376
  if (!info || !info.claim) {
3378
3377
  $("exposeEmpty").hidden = false;
3379
3378
  $("exposeEmpty").textContent = "Couldn't expose port " + port + " (is `ay serve` reachable?).";
3380
- return;
3379
+ return null;
3381
3380
  }
3381
+ return info;
3382
+ }
3383
+ async function copyText(s) {
3384
+ try {
3385
+ await navigator.clipboard.writeText(s);
3386
+ return true;
3387
+ } catch {
3388
+ return false;
3389
+ }
3390
+ }
3391
+ // Briefly show "Copied!" on a button, then restore its label.
3392
+ function flashCopied(btn) {
3393
+ if (!btn) return;
3394
+ const orig = btn.textContent;
3395
+ btn.textContent = "Copied!";
3396
+ setTimeout(() => {
3397
+ btn.textContent = orig;
3398
+ }, 1200);
3399
+ }
3400
+ async function doExpose() {
3401
+ const tx = exposePendingTx || localTx;
3402
+ const port = exposePendingPort;
3403
+ $("exposePrompt").hidden = true;
3404
+ if (!port) return;
3405
+ const info = await exposeNow(port, tx);
3406
+ if (!info) return;
3382
3407
  window.open(info.claim, "_blank", "noopener,noreferrer");
3383
3408
  refreshExposeList();
3384
3409
  }
3410
+ async function doExposeCopy() {
3411
+ const tx = exposePendingTx || localTx;
3412
+ const port = exposePendingPort;
3413
+ if (!port) return;
3414
+ const info = await exposeNow(port, tx);
3415
+ if (!info) return;
3416
+ await copyText(info.claim);
3417
+ flashCopied($("exposeCopy"));
3418
+ $("exposePrompt").hidden = true;
3419
+ refreshExposeList();
3420
+ }
3385
3421
 
3386
3422
  // Gather active exposures from every live host and render the manager rows.
3387
3423
  async function refreshExposeList() {
@@ -3449,6 +3485,21 @@
3449
3485
  };
3450
3486
  row.appendChild(openBtn);
3451
3487
 
3488
+ const copyBtn = document.createElement("button");
3489
+ copyBtn.textContent = "Copy";
3490
+ // Mint a fresh single-use claim link and copy it (to share access).
3491
+ copyBtn.onclick = async () => {
3492
+ let link = ex.url;
3493
+ try {
3494
+ const r = await ex._tx.post("/api/expose", { port: ex.port });
3495
+ const info = r.ok ? JSON.parse(r.text) : null;
3496
+ if (info && info.claim) link = info.claim;
3497
+ } catch {}
3498
+ await copyText(link);
3499
+ flashCopied(copyBtn);
3500
+ };
3501
+ row.appendChild(copyBtn);
3502
+
3452
3503
  const revoke = document.createElement("button");
3453
3504
  revoke.className = "danger";
3454
3505
  revoke.textContent = "Revoke";
@@ -3514,6 +3565,7 @@
3514
3565
  (function exposeModalBoot() {
3515
3566
  $("portsbtn")?.addEventListener("click", () => openExposeManager(true));
3516
3567
  $("exposeGo")?.addEventListener("click", doExpose);
3568
+ $("exposeCopy")?.addEventListener("click", doExposeCopy);
3517
3569
  $("exposeCancel")?.addEventListener("click", () => {
3518
3570
  $("exposePrompt").hidden = true;
3519
3571
  $("exposeTitle").textContent = "Exposed ports";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "agent-yes",
3
- "version": "1.192.2",
3
+ "version": "1.193.0",
4
4
  "description": "A wrapper tool that automates interactions with various AI CLI tools by automatically handling common prompts and responses.",
5
5
  "keywords": [
6
6
  "ai",
package/ts/subcommands.ts CHANGED
@@ -2654,7 +2654,7 @@ async function cmdSpawn(rest: string[]): Promise<number> {
2654
2654
  * (`send`, `key`, `select`): refuse a self-targeting loop, and require that THIS
2655
2655
  * sender actually looked at THIS target recently — an agent is blocked, an
2656
2656
  * interactive human is only warned — unless `force`. Returns the sender context
2657
- * so a caller can reuse it (e.g. `send`'s `[ay-msg …]` header). Extracted from
2657
+ * so a caller can reuse it (e.g. `send`'s `<ay-msg …>` header). Extracted from
2658
2658
  * cmdSend so the action commands enforce the identical guard.
2659
2659
  */
2660
2660
  async function enforceSendGuards(
@@ -2966,15 +2966,19 @@ async function cmdSend(rest: string[]): Promise<number> {
2966
2966
  // The header/footer pair shares a random nonce so the recipient can trust the
2967
2967
  // block's boundaries: text INSIDE the body can't forge a matching open/close
2968
2968
  // marker (the nonce is generated here, after the body was authored), so a
2969
- // spoofed "[from …]" line or a premature "[/ay-msg]" embedded in a message
2969
+ // spoofed "[from …]" line or a premature "</ay-msg …>" embedded in a message.
2970
+ // XML-style tags (not [brackets]): LLM recipients pattern-match <tag>…</tag>
2971
+ // pairs as structural containers far more reliably, and the closing tag keeps
2972
+ // the nonce because nonce-match — not tag syntax — is what makes it forgery-
2973
+ // proof, so strict-XML validity is deliberately sacrificed for that.
2970
2974
  // can't impersonate another sender or truncate/extend the trusted region.
2971
2975
  const replyTarget = sender.agent?.agent_id || sender.agent?.pid;
2972
2976
  let prefix = "";
2973
2977
  let suffix = "";
2974
2978
  if (sender.agent && !isSlashCommand(body)) {
2975
2979
  const nonce = randomBytes(4).toString("hex");
2976
- prefix = `[ay-msg ${nonce} from ${sender.agent.cli} #${sender.agent.pid} @ ${shortenPath(sender.agent.cwd)} — reply: ay send ${replyTarget} "..."]\n`;
2977
- suffix = `\n[/ay-msg ${nonce}]`;
2980
+ prefix = `<ay-msg ${nonce} from ${sender.agent.cli} #${sender.agent.pid} @ ${shortenPath(sender.agent.cwd)} — reply: ay send ${replyTarget} "...">\n`;
2981
+ suffix = `\n</ay-msg ${nonce}>`;
2978
2982
  }
2979
2983
 
2980
2984
  const fullBody = prefix + body + suffix;
@@ -1,8 +0,0 @@
1
- import "./ts-Cp_21mny.js";
2
- import "./logger-CDIsZ-Pp.js";
3
- import "./versionChecker-CaOEu_WC.js";
4
- import "./pidStore-BIvsBQ8X.js";
5
- import "./globalPidIndex-CoNr7tS8.js";
6
- import { t as SUPPORTED_CLIS } from "./SUPPORTED_CLIS-CryNU1fs.js";
7
-
8
- export { SUPPORTED_CLIS };