agent-yes 1.175.1 → 1.176.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.
Files changed (47) hide show
  1. package/agent-yes.config.schema.json +2 -2
  2. package/default.config.yaml +45 -0
  3. package/dist/SUPPORTED_CLIS-BC4fOfBC.js +8 -0
  4. package/dist/{SUPPORTED_CLIS-DH7pORiR.js → SUPPORTED_CLIS-TMmgX_p6.js} +2 -2
  5. package/dist/agentShare-DRfghQz8.js +231 -0
  6. package/dist/bash-yes.js +10 -0
  7. package/dist/cli.js +8 -8
  8. package/dist/cmd-yes.js +10 -0
  9. package/dist/{e2e-jb0Hp43q.js → e2e-BeKjLhmO.js} +1 -1
  10. package/dist/{forkNested-DhJxa4q4.js → forkNested-C8q7E6mp.js} +1 -1
  11. package/dist/index.js +2 -2
  12. package/dist/{notifyDaemon-CLRNmdHy.js → notifyDaemon-C08fJ2Ai.js} +5 -5
  13. package/dist/{openBrowser-ChR4llYa.js → openBrowser-BO5RVYwL.js} +1 -1
  14. package/dist/powershell-yes.js +10 -0
  15. package/dist/{remotes-BQMr4_En.js → remotes-BIHNxn1a.js} +3 -3
  16. package/dist/{remotes-CC-4GuJb.js → remotes-DsTnQhyx.js} +3 -3
  17. package/dist/{rustBinary-DSN5ekb5.js → rustBinary-DZTU07SA.js} +2 -2
  18. package/dist/{schedule-DXGDI0Uo.js → schedule-BQtFOk0z.js} +5 -5
  19. package/dist/{serve-DgQjFYQC.js → serve-B5PQdiOb.js} +143 -76
  20. package/dist/{setup-DHVydU-j.js → setup-BCqFNJoB.js} +3 -3
  21. package/dist/{share-QregR8a_.js → share-29YbzpbU.js} +6 -6
  22. package/dist/share-nvqy64A2.js +4 -0
  23. package/dist/{spawnGate-BFhva-2F.js → spawnGate-C5nBiUZQ.js} +1 -1
  24. package/dist/{spawnGate-IJDByl2U.js → spawnGate-Clp9xBPX.js} +2 -2
  25. package/dist/{subcommands-DjA3FgJk.js → subcommands-BbSJ_nTU.js} +736 -714
  26. package/dist/subcommands-BokdtqqC.js +9 -0
  27. package/dist/{tray-DXr7iK3E.js → tray-DKwVRBwr.js} +1 -1
  28. package/dist/{ts-PerHq0yJ.js → ts-Ce7a44Rj.js} +3 -3
  29. package/dist/{versionChecker-CfZx87hW.js → versionChecker-C7C7QAPu.js} +2 -2
  30. package/dist/{webrtcLink-B7REGtK2.js → webrtcLink-BG0Xc4-W.js} +2 -2
  31. package/dist/{webrtcRemote-Bx-eD_0I.js → webrtcRemote-BLEbZnbY.js} +3 -3
  32. package/dist/{workspaceConfig-BgqK-31W.js → workspaceConfig-DKd6UvVm.js} +1 -1
  33. package/lab/ui/index.html +495 -291
  34. package/lab/ui/qrcode.js +2297 -0
  35. package/lab/ui/sw.js +2 -1
  36. package/package.json +8 -2
  37. package/scripts/build-rgui.ts +78 -0
  38. package/ts/agentShare.lifecycle.spec.ts +139 -0
  39. package/ts/agentShare.spec.ts +238 -0
  40. package/ts/agentShare.ts +330 -0
  41. package/ts/forkNested.spec.ts +39 -2
  42. package/ts/index.ts +5 -1
  43. package/ts/serve.ts +119 -5
  44. package/ts/share.ts +10 -3
  45. package/ts/subcommands.ts +29 -0
  46. package/dist/SUPPORTED_CLIS-COSdc1BZ.js +0 -8
  47. package/dist/subcommands-C9u1em-X.js +0 -9
@@ -131,8 +131,8 @@
131
131
  },
132
132
  "promptArg": {
133
133
  "type": "string",
134
- "description": "How to pass the prompt: 'first-arg', 'last-arg', or a flag like '--prompt'",
135
- "examples": ["first-arg", "last-arg", "--prompt", "-p"]
134
+ "description": "How to pass the prompt: 'first-arg', 'last-arg', a flag like '--prompt', or 'typed' to type it into an interactive session after the prompt is ready (shells)",
135
+ "examples": ["first-arg", "last-arg", "--prompt", "-p", "typed"]
136
136
  },
137
137
  "noEOL": {
138
138
  "type": "boolean",
@@ -479,3 +479,48 @@ clis:
479
479
  npm: "npm i -g opencode-ai"
480
480
  enter: []
481
481
  ready: []
482
+
483
+ # Bare interactive shells. Unlike the agent CLIs above, these aren't AI tools
484
+ # — they're a plain login shell you can drive from the console and launch
485
+ # other agents inside (e.g. `ay bash 'claude'`). `promptArg: typed` means any
486
+ # initial command is TYPED into the shell after its prompt is ready (see the
487
+ # run loop), rather than passed as an argv — so `bash -c` never runs-and-exits
488
+ # and the session stays interactive. No `working`/`enter` markers: a shell has
489
+ # no spinner and no auto-acceptable menus. The `ready` regex anchors on the
490
+ # prompt suffix so the typed command lands at the prompt instead of waiting on
491
+ # the force-ready fallback; with no match it still force-readies after 10s.
492
+ bash:
493
+ promptArg: typed
494
+ ready:
495
+ - pattern: '[$#] $'
496
+ flags: m
497
+ working: []
498
+ enter: []
499
+ fatal: []
500
+ exitCommands:
501
+ - exit
502
+
503
+ # Windows only (cmd.exe is absent on macOS/Linux, so `ay cmd` there just
504
+ # reports command-not-found). Prompt looks like `C:\Users\me>`.
505
+ cmd:
506
+ promptArg: typed
507
+ ready:
508
+ - pattern: '^[A-Za-z]:\\.*>'
509
+ flags: m
510
+ working: []
511
+ enter: []
512
+ fatal: []
513
+ exitCommands:
514
+ - exit
515
+
516
+ # Windows only (Windows PowerShell 5.1). Prompt looks like `PS C:\Users\me>`.
517
+ powershell:
518
+ promptArg: typed
519
+ ready:
520
+ - pattern: '^PS .*>'
521
+ flags: m
522
+ working: []
523
+ enter: []
524
+ fatal: []
525
+ exitCommands:
526
+ - exit
@@ -0,0 +1,8 @@
1
+ import "./ts-Ce7a44Rj.js";
2
+ import "./logger-CDIsZ-Pp.js";
3
+ import "./versionChecker-C7C7QAPu.js";
4
+ import "./pidStore-BIvsBQ8X.js";
5
+ import "./globalPidIndex-CoNr7tS8.js";
6
+ import { t as SUPPORTED_CLIS } from "./SUPPORTED_CLIS-TMmgX_p6.js";
7
+
8
+ export { SUPPORTED_CLIS };
@@ -1,8 +1,8 @@
1
- import { t as CLIS_CONFIG } from "./ts-PerHq0yJ.js";
1
+ import { t as CLIS_CONFIG } from "./ts-Ce7a44Rj.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-DH7pORiR.js.map
8
+ //# sourceMappingURL=SUPPORTED_CLIS-TMmgX_p6.js.map
@@ -0,0 +1,231 @@
1
+ import "./logger-CDIsZ-Pp.js";
2
+ import "./globalPidIndex-CoNr7tS8.js";
3
+ import "./configShared-0MnIQ652.js";
4
+ import { j as resolveOne } from "./subcommands-BbSJ_nTU.js";
5
+ import "./e2e-BeKjLhmO.js";
6
+ import "./webrtcLink-BG0Xc4-W.js";
7
+ import "./remotes-DsTnQhyx.js";
8
+ import { r as startShare } from "./share-29YbzpbU.js";
9
+
10
+ //#region ts/agentShare.ts
11
+ const MAX_SHARES = 8;
12
+ const DEFAULT_SHARE_TTL_MS = 1440 * 60 * 1e3;
13
+ const shares = /* @__PURE__ */ new Map();
14
+ function lsOpts(all = false) {
15
+ return {
16
+ all,
17
+ active: false,
18
+ json: true,
19
+ latest: true,
20
+ cwdScope: null
21
+ };
22
+ }
23
+ function listShares() {
24
+ return [...shares.values()].sort((a, b) => b.createdAt - a.createdAt).map(({ close: _close, ...s }) => s);
25
+ }
26
+ function revokeShare(shareId) {
27
+ const s = shares.get(shareId);
28
+ if (!s) return false;
29
+ try {
30
+ s.close();
31
+ } catch {}
32
+ shares.delete(shareId);
33
+ return true;
34
+ }
35
+ function revokeAllShares() {
36
+ for (const id of [...shares.keys()]) revokeShare(id);
37
+ }
38
+ /** Resolve a keyword to a live agent and mint a fresh view-only share room for it. */
39
+ async function createScopedShare(opts) {
40
+ if (shares.size >= MAX_SHARES) throw new Error(`too many active shares (max ${MAX_SHARES}) — revoke one first`);
41
+ const record = await resolveOne(opts.agent, lsOpts(true));
42
+ const agentId = record.agent_id;
43
+ if (!agentId) throw new Error(`agent ${record.pid} has no stable agent_id — cannot share (restart it)`);
44
+ const label = `${record.cli}${record.cwd ? " · " + record.cwd.split("/").filter(Boolean).pop() : ""}`;
45
+ const { room, link, close } = await startShare({
46
+ localFetch: scopedFetch(agentId, opts.localFetch, opts.perm ?? "r"),
47
+ apiToken: opts.apiToken,
48
+ sighost: opts.sighost
49
+ });
50
+ const shareId = "s" + Math.abs(hashStr(room + agentId + link)).toString(36);
51
+ const createdAt = Date.now();
52
+ const ttl = opts.ttlMs ?? DEFAULT_SHARE_TTL_MS;
53
+ const expiresAt = createdAt + ttl;
54
+ const stop = () => close();
55
+ const expiryTimer = setTimeout(() => revokeShare(shareId), ttl);
56
+ expiryTimer.unref?.();
57
+ const share = {
58
+ shareId,
59
+ agentId,
60
+ perm: opts.perm ?? "r",
61
+ room,
62
+ link,
63
+ label,
64
+ createdAt,
65
+ expiresAt,
66
+ close: () => {
67
+ clearTimeout(expiryTimer);
68
+ stop();
69
+ }
70
+ };
71
+ shares.set(shareId, share);
72
+ const { close: _c, ...pub } = share;
73
+ return pub;
74
+ }
75
+ function hashStr(s) {
76
+ let h = 0;
77
+ for (let i = 0; i < s.length; i++) h = Math.imul(31, h) + s.charCodeAt(i) | 0;
78
+ return h;
79
+ }
80
+ function forbidden(msg = "read-only share") {
81
+ return new Response(msg, { status: 403 });
82
+ }
83
+ function scopedFetch(agentId, inner, perm = "r") {
84
+ return async (req) => {
85
+ const url = new URL(req.url);
86
+ const p = url.pathname;
87
+ const method = req.method;
88
+ if (method === "GET" && p === "/api/version") return inner(req);
89
+ if (method === "GET" && p === "/api/whoami") return withShareFlag(await inner(req), agentId, perm);
90
+ if (method === "GET" && (p === "/api/ls" || p === "/api/ls/subscribe")) {
91
+ const scopedUrl = new URL(url);
92
+ scopedUrl.searchParams.set("keyword", agentId);
93
+ scopedUrl.searchParams.delete("all");
94
+ const res = await inner(new Request(scopedUrl.toString(), req));
95
+ return p === "/api/ls" ? filterLsJson(res, agentId) : filterLsSse(res, agentId);
96
+ }
97
+ const m = /^\/api\/(read|tail|status|size)\/(.+)$/.exec(p) && method === "GET" ? /^\/api\/(read|tail|status|size)\/(.+)$/.exec(p) : null;
98
+ if (m) {
99
+ if (!await targetIsAgent(decodeURIComponent(m[2]), agentId)) return forbidden("agent not shared");
100
+ return inner(req);
101
+ }
102
+ if (perm.includes("w")) {
103
+ if (method === "POST" && p === "/api/send") {
104
+ let kw;
105
+ try {
106
+ kw = JSON.parse(await req.clone().text())?.keyword;
107
+ } catch {
108
+ return forbidden("bad body");
109
+ }
110
+ if (kw == null || !await targetIsAgent(String(kw), agentId)) return forbidden("agent not shared");
111
+ return inner(req);
112
+ }
113
+ const rz = method === "POST" ? /^\/api\/resize\/(.+)$/.exec(p) : null;
114
+ if (rz) {
115
+ if (!await targetIsAgent(decodeURIComponent(rz[1]), agentId)) return forbidden("agent not shared");
116
+ return inner(req);
117
+ }
118
+ if (method === "POST" && p === "/api/presence") return inner(req);
119
+ }
120
+ return forbidden();
121
+ };
122
+ }
123
+ async function targetIsAgent(keyword, agentId) {
124
+ try {
125
+ return (await resolveOne(keyword, lsOpts(true))).agent_id === agentId;
126
+ } catch {
127
+ return false;
128
+ }
129
+ }
130
+ async function withShareFlag(res, agentId, perm) {
131
+ if (!res.ok) return res;
132
+ let body;
133
+ try {
134
+ body = await res.json();
135
+ } catch {
136
+ return res;
137
+ }
138
+ const obj = body && typeof body === "object" ? body : {};
139
+ return Response.json({
140
+ ...obj,
141
+ share: {
142
+ perm,
143
+ agent_id: agentId,
144
+ readonly: perm === "r"
145
+ }
146
+ });
147
+ }
148
+ async function filterLsJson(res, agentId) {
149
+ if (!res.ok) return res;
150
+ let arr;
151
+ try {
152
+ arr = await res.json();
153
+ } catch {
154
+ return res;
155
+ }
156
+ const kept = Array.isArray(arr) ? arr.filter((r) => r && typeof r === "object" && r.agent_id === agentId) : [];
157
+ return Response.json(kept, { status: res.status });
158
+ }
159
+ function filterLsSse(res, agentId) {
160
+ if (!res.ok || !res.body) return res;
161
+ const reader = res.body.getReader();
162
+ const dec = new TextDecoder();
163
+ const enc = new TextEncoder();
164
+ const forwarded = /* @__PURE__ */ new Set();
165
+ let buf = "";
166
+ const stream = new ReadableStream({
167
+ async pull(ctrl) {
168
+ for (;;) {
169
+ const { done, value } = await reader.read();
170
+ if (done) {
171
+ ctrl.close();
172
+ return;
173
+ }
174
+ buf += dec.decode(value, { stream: true });
175
+ let sep;
176
+ let emittedSomething = false;
177
+ while ((sep = buf.indexOf("\n\n")) !== -1) {
178
+ const rawEvent = buf.slice(0, sep);
179
+ buf = buf.slice(sep + 2);
180
+ const out = transformEvent(rawEvent, agentId, forwarded);
181
+ if (out !== null) {
182
+ ctrl.enqueue(enc.encode(out + "\n\n"));
183
+ emittedSomething = true;
184
+ }
185
+ }
186
+ if (emittedSomething) return;
187
+ }
188
+ },
189
+ cancel() {
190
+ reader.cancel().catch(() => {});
191
+ }
192
+ });
193
+ return new Response(stream, {
194
+ status: res.status,
195
+ headers: {
196
+ "Content-Type": "text/event-stream",
197
+ "Cache-Control": "no-cache",
198
+ Connection: "keep-alive"
199
+ }
200
+ });
201
+ }
202
+ function transformEvent(rawEvent, agentId, forwarded) {
203
+ const trimmed = rawEvent.replace(/\r/g, "");
204
+ if (!trimmed.trim()) return null;
205
+ if (!/^data:/m.test(trimmed)) return trimmed;
206
+ const payload = trimmed.split("\n").filter((l) => l.startsWith("data:")).map((l) => l.slice(5).replace(/^ /, "")).join("\n");
207
+ let obj;
208
+ try {
209
+ obj = JSON.parse(payload);
210
+ } catch {
211
+ return null;
212
+ }
213
+ const upsert = (obj.upsert ?? []).filter((r) => r && r.agent_id === agentId);
214
+ for (const r of upsert) forwarded.add(r.pid);
215
+ const remove = (obj.remove ?? []).filter((pid) => forwarded.has(pid));
216
+ for (const pid of remove) forwarded.delete(pid);
217
+ if (!obj.full && upsert.length === 0 && remove.length === 0) return null;
218
+ const next = obj.full ? {
219
+ full: true,
220
+ upsert,
221
+ remove
222
+ } : {
223
+ upsert,
224
+ remove
225
+ };
226
+ return "data: " + JSON.stringify(next);
227
+ }
228
+
229
+ //#endregion
230
+ export { createScopedShare, listShares, revokeAllShares, revokeShare };
231
+ //# sourceMappingURL=agentShare-DRfghQz8.js.map
@@ -0,0 +1,10 @@
1
+ #!/usr/bin/env bun
2
+ import { existsSync } from "node:fs";
3
+ import { join, dirname } from "node:path";
4
+ import { fileURLToPath } from "node:url";
5
+ const root = join(dirname(fileURLToPath(import.meta.url)), "..");
6
+ if (typeof Bun !== "undefined" && existsSync(join(root, ".git"))) {
7
+ await import("../ts/cli.ts");
8
+ } else {
9
+ await import("./cli.js");
10
+ }
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-CfZx87hW.js";
5
- import { n as getRustBinary } from "./rustBinary-DSN5ekb5.js";
4
+ import { i as versionString, n as displayVersion, t as checkAndAutoUpdate } from "./versionChecker-C7C7QAPu.js";
5
+ import { n as getRustBinary } from "./rustBinary-DZTU07SA.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-C9u1em-X.js");
288
+ const { isSubcommand, runSubcommand, cmdHelp } = await import("./subcommands-BokdtqqC.js");
289
289
  if (isHelpFlag && process.argv.length === 3) {
290
290
  await cmdHelp(managerCommands);
291
291
  process.exit(0);
@@ -299,16 +299,16 @@ await checkAndAutoUpdate();
299
299
  logger.info(versionString());
300
300
  const config = parseCliArgs(process.argv);
301
301
  if (config.tray) {
302
- const { startTray } = await import("./tray-DXr7iK3E.js");
302
+ const { startTray } = await import("./tray-DKwVRBwr.js");
303
303
  await startTray();
304
304
  await new Promise(() => {});
305
305
  }
306
306
  {
307
- const { ensureTray } = await import("./tray-DXr7iK3E.js");
307
+ const { ensureTray } = await import("./tray-DKwVRBwr.js");
308
308
  ensureTray();
309
309
  }
310
310
  if (!config.showVersion && !config.appendPrompt && !config.tray) {
311
- const { waitForSpawnCapacity } = await import("./spawnGate-BFhva-2F.js");
311
+ const { waitForSpawnCapacity } = await import("./spawnGate-C5nBiUZQ.js");
312
312
  await waitForSpawnCapacity({
313
313
  onWait: (reason, waitedMs) => {
314
314
  if (config.verbose || waitedMs === 0) console.error(`[agent-yes] spawn gate: ${reason} — waiting…`);
@@ -327,14 +327,14 @@ if (config.useRust) {
327
327
  }
328
328
  }
329
329
  if (rustBinary) {
330
- const { SUPPORTED_CLIS } = await import("./SUPPORTED_CLIS-COSdc1BZ.js");
330
+ const { SUPPORTED_CLIS } = await import("./SUPPORTED_CLIS-BC4fOfBC.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}`);
334
334
  console.log(`[rust] Args: ${rustArgs.join(" ")}`);
335
335
  }
336
336
  const attach = config.attach || process.env.AGENT_YES_ATTACH === "1";
337
- const { shouldForkNested, buildSpawnTutorial, waitForFifo } = await import("./forkNested-DhJxa4q4.js");
337
+ const { shouldForkNested, buildSpawnTutorial, waitForFifo } = await import("./forkNested-C8q7E6mp.js");
338
338
  if (shouldForkNested({
339
339
  isTTY: Boolean(process.stdout.isTTY),
340
340
  ayPid: process.env.AGENT_YES_PID,
@@ -0,0 +1,10 @@
1
+ #!/usr/bin/env bun
2
+ import { existsSync } from "node:fs";
3
+ import { join, dirname } from "node:path";
4
+ import { fileURLToPath } from "node:url";
5
+ const root = join(dirname(fileURLToPath(import.meta.url)), "..");
6
+ if (typeof Bun !== "undefined" && existsSync(join(root, ".git"))) {
7
+ await import("../ts/cli.ts");
8
+ } else {
9
+ await import("./cli.js");
10
+ }
@@ -172,4 +172,4 @@ function randomHex(n) {
172
172
 
173
173
  //#endregion
174
174
  export { computeTranscriptHash as a, open as c, randomHex as d, seal as f, MAX_CHUNK as i, packEnvelope as l, FLAG_CONFIRM as n, deriveAuthToken as o, unpackEnvelope as p, MARKER as r, deriveDirKeys as s, CONFIRM_TIMEOUT_MS as t, parseSecret as u };
175
- //# sourceMappingURL=e2e-jb0Hp43q.js.map
175
+ //# sourceMappingURL=e2e-BeKjLhmO.js.map
@@ -56,4 +56,4 @@ async function waitForFifo(pid, timeoutMs = 2e3, aborted) {
56
56
 
57
57
  //#endregion
58
58
  export { buildSpawnTutorial, shouldForkNested, waitForFifo };
59
- //# sourceMappingURL=forkNested-DhJxa4q4.js.map
59
+ //# sourceMappingURL=forkNested-C8q7E6mp.js.map
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-PerHq0yJ.js";
1
+ import { a as removeControlCharacters, i as AgentContext, n as agentYes, r as config, t as CLIS_CONFIG } from "./ts-Ce7a44Rj.js";
2
2
  import "./logger-CDIsZ-Pp.js";
3
- import "./versionChecker-CfZx87hW.js";
3
+ import "./versionChecker-C7C7QAPu.js";
4
4
  import "./pidStore-BIvsBQ8X.js";
5
5
  import "./globalPidIndex-CoNr7tS8.js";
6
6
 
@@ -1,10 +1,10 @@
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-DjA3FgJk.js";
5
- import "./e2e-jb0Hp43q.js";
6
- import "./webrtcLink-B7REGtK2.js";
7
- import "./remotes-CC-4GuJb.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-BbSJ_nTU.js";
5
+ import "./e2e-BeKjLhmO.js";
6
+ import "./webrtcLink-BG0Xc4-W.js";
7
+ import "./remotes-DsTnQhyx.js";
8
8
  import { mkdir, readFile, rename, rm, stat, writeFile } from "fs/promises";
9
9
  import { randomUUID } from "node:crypto";
10
10
  import { execFile } from "node:child_process";
@@ -588,4 +588,4 @@ async function ensureDaemon() {
588
588
 
589
589
  //#endregion
590
590
  export { daemonStatus, ensureDaemon, requestDaemonStop, runDaemon };
591
- //# sourceMappingURL=notifyDaemon-CLRNmdHy.js.map
591
+ //# sourceMappingURL=notifyDaemon-C08fJ2Ai.js.map
@@ -68,4 +68,4 @@ async function offerOpenInBrowser(url, prompt = "Open in browser now? [Y/n] ") {
68
68
 
69
69
  //#endregion
70
70
  export { offerOpenInBrowser };
71
- //# sourceMappingURL=openBrowser-ChR4llYa.js.map
71
+ //# sourceMappingURL=openBrowser-BO5RVYwL.js.map
@@ -0,0 +1,10 @@
1
+ #!/usr/bin/env bun
2
+ import { existsSync } from "node:fs";
3
+ import { join, dirname } from "node:path";
4
+ import { fileURLToPath } from "node:url";
5
+ const root = join(dirname(fileURLToPath(import.meta.url)), "..");
6
+ if (typeof Bun !== "undefined" && existsSync(join(root, ".git"))) {
7
+ await import("../ts/cli.ts");
8
+ } else {
9
+ await import("./cli.js");
10
+ }
@@ -1,5 +1,5 @@
1
- import "./e2e-jb0Hp43q.js";
2
- import "./webrtcLink-B7REGtK2.js";
3
- import { a as resolveRemoteSpec, i as readRemotes, n as deleteRemoteAlias, o as writeRemoteAlias, r as parseDirectRemoteSpec, t as cmdRemote } from "./remotes-CC-4GuJb.js";
1
+ import "./e2e-BeKjLhmO.js";
2
+ import "./webrtcLink-BG0Xc4-W.js";
3
+ import { a as resolveRemoteSpec, i as readRemotes, n as deleteRemoteAlias, o as writeRemoteAlias, r as parseDirectRemoteSpec, t as cmdRemote } from "./remotes-DsTnQhyx.js";
4
4
 
5
5
  export { cmdRemote };
@@ -1,4 +1,4 @@
1
- import { n as isWebrtcSpec } from "./webrtcLink-B7REGtK2.js";
1
+ import { n as isWebrtcSpec } from "./webrtcLink-BG0Xc4-W.js";
2
2
  import { mkdir, readFile, writeFile } from "fs/promises";
3
3
  import { homedir } from "os";
4
4
  import path from "path";
@@ -86,7 +86,7 @@ async function resolveRemoteSpec(spec) {
86
86
  * The bridge lives for the rest of the process (torn down on `process.exit`).
87
87
  */
88
88
  async function resolveWebrtc(link, keyword) {
89
- const { startWebrtcBridge } = await import("./webrtcRemote-Bx-eD_0I.js");
89
+ const { startWebrtcBridge } = await import("./webrtcRemote-BLEbZnbY.js");
90
90
  const bridge = await startWebrtcBridge(link);
91
91
  return {
92
92
  url: bridge.baseUrl,
@@ -173,4 +173,4 @@ async function cmdRemote(rest) {
173
173
 
174
174
  //#endregion
175
175
  export { resolveRemoteSpec as a, readRemotes as i, deleteRemoteAlias as n, writeRemoteAlias as o, parseDirectRemoteSpec as r, cmdRemote as t };
176
- //# sourceMappingURL=remotes-CC-4GuJb.js.map
176
+ //# sourceMappingURL=remotes-DsTnQhyx.js.map
@@ -1,4 +1,4 @@
1
- import { r as getInstalledPackage } from "./versionChecker-CfZx87hW.js";
1
+ import { r as getInstalledPackage } from "./versionChecker-C7C7QAPu.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-DSN5ekb5.js.map
228
+ //# sourceMappingURL=rustBinary-DZTU07SA.js.map
@@ -1,10 +1,10 @@
1
- import "./ts-PerHq0yJ.js";
1
+ import "./ts-Ce7a44Rj.js";
2
2
  import "./logger-CDIsZ-Pp.js";
3
- import "./versionChecker-CfZx87hW.js";
3
+ import "./versionChecker-C7C7QAPu.js";
4
4
  import "./pidStore-BIvsBQ8X.js";
5
5
  import "./globalPidIndex-CoNr7tS8.js";
6
- import { t as SUPPORTED_CLIS } from "./SUPPORTED_CLIS-DH7pORiR.js";
7
- import { d as resolveSpawnCwd } from "./workspaceConfig-BgqK-31W.js";
6
+ import { t as SUPPORTED_CLIS } from "./SUPPORTED_CLIS-TMmgX_p6.js";
7
+ import { d as resolveSpawnCwd } from "./workspaceConfig-DKd6UvVm.js";
8
8
  import { createHash } from "node:crypto";
9
9
 
10
10
  //#region ts/oxmgrService.ts
@@ -141,4 +141,4 @@ async function cmdSchedule(rest) {
141
141
 
142
142
  //#endregion
143
143
  export { cmdSchedule };
144
- //# sourceMappingURL=schedule-DXGDI0Uo.js.map
144
+ //# sourceMappingURL=schedule-BQtFOk0z.js.map