claude-yes 1.169.1 → 1.170.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (61) hide show
  1. package/dist/{SUPPORTED_CLIS-CrkCHeYI.js → SUPPORTED_CLIS-Bz-oXKG8.js} +2 -2
  2. package/dist/SUPPORTED_CLIS-Dby-8X2S.js +8 -0
  3. package/dist/{agent-yes.config-Bl08kMpl.js → agent-yes.config-ugPYTPOd.js} +2 -2
  4. package/dist/{agentYesHome-_eJa3DaX.js → agentYesHome-CtHb5b71.js} +1 -1
  5. package/dist/cli.js +10 -212
  6. package/dist/{configShared-CEyhl0WH.js → configShared-0MnIQ652.js} +1 -1
  7. package/dist/{e2e-BeKjLhmO.js → e2e-jb0Hp43q.js} +1 -1
  8. package/dist/{forkNested-UCKPEgSI.js → forkNested-DhJxa4q4.js} +2 -2
  9. package/dist/{globalPidIndex-DlmmJlO8.js → globalPidIndex-CoNr7tS8.js} +1 -1
  10. package/dist/index.js +4 -4
  11. package/dist/notifyDaemon-BB08sE7n.js +591 -0
  12. package/dist/{openBrowser-CCF1iuQK.js → openBrowser-ChR4llYa.js} +1 -1
  13. package/dist/{pidStore-BfoBWUjc.js → pidStore-BIvsBQ8X.js} +3 -3
  14. package/dist/pidStore-CLxwp0qI.js +5 -0
  15. package/dist/{reaper-C-eWAxIj.js → reaper-CWF2_ATd.js} +27 -3
  16. package/dist/{reaper-BQgDb85W.js → reaper-jfSmog15.js} +1 -1
  17. package/dist/{remotes-cx_GDFPj.js → remotes-BQMr4_En.js} +3 -3
  18. package/dist/{remotes-BmAPylU_.js → remotes-CC-4GuJb.js} +3 -3
  19. package/dist/{runningLock-BobVW1_A.js → runningLock-CNMl13dC.js} +1 -1
  20. package/dist/rustBinary-CYS7148m.js +228 -0
  21. package/dist/{schedule-Bh5bm1xO.js → schedule-D4KvBh5w.js} +7 -7
  22. package/dist/{serve-Bt_KljpT.js → serve-BN0mUK9m.js} +120 -26
  23. package/dist/{setup-D5f1lmYF.js → setup-CUrjwXNE.js} +3 -3
  24. package/dist/{share-D_e2Fwiy.js → share-QregR8a_.js} +2 -2
  25. package/dist/spawnGate-BFhva-2F.js +5 -0
  26. package/dist/{spawnGate-DzPfa1PZ.js → spawnGate-IJDByl2U.js} +3 -3
  27. package/dist/{subcommands-fp7kfr7p.js → subcommands-CbcBfInM.js} +1049 -44
  28. package/dist/subcommands-DOnqoHyP.js +9 -0
  29. package/dist/{tray-CWUpaZF4.js → tray-DXr7iK3E.js} +2 -2
  30. package/dist/{ts-hUFVxJMw.js → ts-kJRKPdFi.js} +8 -8
  31. package/dist/{versionChecker-IuFreIkZ.js → versionChecker-eVbxzEL3.js} +2 -2
  32. package/dist/{webrtcLink-BG0Xc4-W.js → webrtcLink-B7REGtK2.js} +2 -2
  33. package/dist/{webrtcRemote-SybKurg9.js → webrtcRemote-Bx-eD_0I.js} +3 -3
  34. package/dist/{workspaceConfig-BC03X4Y1.js → workspaceConfig-BgqK-31W.js} +37 -6
  35. package/lab/ui/console-logic.js +79 -10
  36. package/lab/ui/index.html +174 -8
  37. package/lab/ui/landing.html +11 -1
  38. package/package.json +1 -1
  39. package/scripts/build-rs.ts +9 -5
  40. package/ts/badges.spec.ts +51 -1
  41. package/ts/badges.ts +35 -1
  42. package/ts/notifyDaemon.spec.ts +276 -0
  43. package/ts/notifyDaemon.ts +698 -0
  44. package/ts/notifyInbox.spec.ts +192 -0
  45. package/ts/notifyInbox.ts +294 -0
  46. package/ts/notifyRouter.spec.ts +355 -0
  47. package/ts/notifyRouter.ts +288 -0
  48. package/ts/notifyStore.spec.ts +308 -0
  49. package/ts/notifyStore.ts +439 -0
  50. package/ts/reaper.spec.ts +18 -1
  51. package/ts/reaper.ts +33 -1
  52. package/ts/rustBinary.ts +30 -0
  53. package/ts/serve.ts +180 -14
  54. package/ts/subcommands.spec.ts +341 -0
  55. package/ts/subcommands.ts +764 -29
  56. package/ts/workspaceConfig.spec.ts +48 -0
  57. package/ts/workspaceConfig.ts +46 -3
  58. package/dist/SUPPORTED_CLIS-D6axJyiC.js +0 -8
  59. package/dist/pidStore-5qyLX3Fh.js +0 -5
  60. package/dist/spawnGate-CQ1Il3Xk.js +0 -5
  61. package/dist/subcommands-B23lSYPq.js +0 -9
@@ -1,8 +1,8 @@
1
- import { t as CLIS_CONFIG } from "./ts-hUFVxJMw.js";
1
+ import { t as CLIS_CONFIG } from "./ts-kJRKPdFi.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-CrkCHeYI.js.map
8
+ //# sourceMappingURL=SUPPORTED_CLIS-Bz-oXKG8.js.map
@@ -0,0 +1,8 @@
1
+ import "./ts-kJRKPdFi.js";
2
+ import "./logger-CDIsZ-Pp.js";
3
+ import "./versionChecker-eVbxzEL3.js";
4
+ import "./pidStore-BIvsBQ8X.js";
5
+ import "./globalPidIndex-CoNr7tS8.js";
6
+ import { t as SUPPORTED_CLIS } from "./SUPPORTED_CLIS-Bz-oXKG8.js";
7
+
8
+ export { SUPPORTED_CLIS };
@@ -1,5 +1,5 @@
1
1
  import { n as logger } from "./logger-CDIsZ-Pp.js";
2
- import { n as normalizeAgentYesConfig, t as loadSharedCliDefaults } from "./configShared-CEyhl0WH.js";
2
+ import { n as normalizeAgentYesConfig, t as loadSharedCliDefaults } from "./configShared-0MnIQ652.js";
3
3
  import os from "node:os";
4
4
  import { access, mkdir, readFile, writeFile } from "node:fs/promises";
5
5
  import path from "node:path";
@@ -226,4 +226,4 @@ async function getDefaultConfig() {
226
226
 
227
227
  //#endregion
228
228
  export { agent_yes_config_default as default };
229
- //# sourceMappingURL=agent-yes.config-Bl08kMpl.js.map
229
+ //# sourceMappingURL=agent-yes.config-ugPYTPOd.js.map
@@ -22,4 +22,4 @@ function agentYesHome() {
22
22
 
23
23
  //#endregion
24
24
  export { agentYesHome as t };
25
- //# sourceMappingURL=agentYesHome-_eJa3DaX.js.map
25
+ //# sourceMappingURL=agentYesHome-CtHb5b71.js.map
package/dist/cli.js CHANGED
@@ -1,15 +1,13 @@
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, r as getInstalledPackage, t as checkAndAutoUpdate } from "./versionChecker-IuFreIkZ.js";
4
+ import { i as versionString, n as displayVersion, t as checkAndAutoUpdate } from "./versionChecker-eVbxzEL3.js";
5
+ import { n as getRustBinary } from "./rustBinary-CYS7148m.js";
5
6
  import { argv } from "process";
6
- import { execFileSync, spawn } from "child_process";
7
+ import { spawn } from "child_process";
7
8
  import ms from "ms";
8
9
  import yargs from "yargs";
9
10
  import { hideBin } from "yargs/helpers";
10
- import { existsSync, mkdirSync, unlinkSync } from "fs";
11
- import { chmod, copyFile } from "fs/promises";
12
- import path from "path";
13
11
 
14
12
  //#region ts/parseCliArgs.ts
15
13
  /**
@@ -244,206 +242,6 @@ function parseCliArgs(argv, supportedClis) {
244
242
  };
245
243
  }
246
244
 
247
- //#endregion
248
- //#region ts/rustBinary.ts
249
- /**
250
- * Rust binary helper - finds or downloads the appropriate prebuilt binary
251
- */
252
- const PLATFORM_MAP = {
253
- "linux-x64": "agent-yes-linux-x64-musl",
254
- "linux-arm64": "agent-yes-linux-arm64-musl",
255
- "darwin-x64": "agent-yes-darwin-x64",
256
- "darwin-arm64": "agent-yes-darwin-arm64",
257
- "win32-x64": "agent-yes-win32-x64"
258
- };
259
- /**
260
- * Get the binary name for the current platform
261
- */
262
- function getBinaryName() {
263
- const platform = process.platform;
264
- const arch = process.arch;
265
- const binaryName = PLATFORM_MAP[`${platform}-${arch}`];
266
- if (!binaryName) throw new Error(`Unsupported platform: ${platform}-${arch}. Supported: ${Object.keys(PLATFORM_MAP).join(", ")}`);
267
- return binaryName + (platform === "win32" ? ".exe" : "");
268
- }
269
- /**
270
- * Get the directory where binaries are stored
271
- */
272
- function getBinDir() {
273
- const packageBinDir = path.resolve(import.meta.dirname ?? import.meta.dir, "../bin");
274
- if (existsSync(packageBinDir)) return packageBinDir;
275
- const cacheDir = process.env.AGENT_YES_CACHE_DIR || path.join(process.env.XDG_CACHE_HOME || path.join(process.env.HOME || "/tmp", ".cache"), "agent-yes");
276
- return path.join(cacheDir, "bin", getInstalledPackage().version);
277
- }
278
- /**
279
- * Find the Rust binary, checking multiple locations
280
- */
281
- function findRustBinary(verbose = false) {
282
- const binaryName = getBinaryName();
283
- const ext = process.platform === "win32" ? ".exe" : "";
284
- const searchPaths = [
285
- path.resolve(import.meta.dirname ?? import.meta.dir, `../rs/target/release/agent-yes${ext}`),
286
- path.resolve(import.meta.dirname ?? import.meta.dir, `../rs/target/debug/agent-yes${ext}`),
287
- path.join(getBinDir(), binaryName),
288
- path.join(getBinDir(), binaryName)
289
- ];
290
- if (verbose) {
291
- console.log(`[rust] Looking for binary: ${binaryName}`);
292
- console.log(`[rust] Search paths:`);
293
- }
294
- for (const p of searchPaths) {
295
- if (verbose) console.log(`[rust] - ${p}: ${existsSync(p) ? "FOUND" : "not found"}`);
296
- if (existsSync(p)) return p;
297
- }
298
- }
299
- /**
300
- * Get GitHub release download URL for the binary
301
- */
302
- function getDownloadUrl(version = "latest") {
303
- const binaryName = getBinaryName().replace(/\.exe$/, "");
304
- const ext = process.platform === "win32" ? ".zip" : ".tar.gz";
305
- if (version === "latest") return `https://github.com/snomiao/agent-yes/releases/latest/download/${binaryName}${ext}`;
306
- return `https://github.com/snomiao/agent-yes/releases/download/v${version}/${binaryName}${ext}`;
307
- }
308
- /**
309
- * Download and extract the binary
310
- */
311
- async function downloadBinary(verbose = false) {
312
- const binDir = getBinDir();
313
- const binaryName = getBinaryName();
314
- const binaryPath = path.join(binDir, binaryName);
315
- mkdirSync(binDir, { recursive: true });
316
- const url = getDownloadUrl(getInstalledPackage().version);
317
- if (verbose) console.log(`[rust] Downloading binary from: ${url}`);
318
- const response = await fetch(url);
319
- if (!response.ok) throw new Error(`Failed to download binary: ${response.status} ${response.statusText}`);
320
- if (process.platform === "win32") {
321
- const tempZipPath = path.join(binDir, "temp.zip");
322
- await Bun.write(tempZipPath, await response.arrayBuffer());
323
- await Bun.spawn([
324
- "powershell",
325
- "-Command",
326
- `Expand-Archive -Path '${tempZipPath}' -DestinationPath '${binDir}' -Force`
327
- ], {
328
- cwd: binDir,
329
- stdio: [
330
- "ignore",
331
- "pipe",
332
- "pipe"
333
- ]
334
- }).exited;
335
- try {
336
- unlinkSync(tempZipPath);
337
- } catch {}
338
- } else {
339
- const tarPath = path.join(binDir, "temp.tar.gz");
340
- await Bun.write(tarPath, await response.arrayBuffer());
341
- await Bun.spawn([
342
- "tar",
343
- "-xzf",
344
- tarPath,
345
- "-C",
346
- binDir
347
- ], {
348
- cwd: binDir,
349
- stdio: [
350
- "ignore",
351
- "pipe",
352
- "pipe"
353
- ]
354
- }).exited;
355
- const possibleNames = [
356
- "agent-yes",
357
- binaryName.replace(/-musl$/, "").replace(/-gnu$/, ""),
358
- binaryName
359
- ];
360
- for (const name of possibleNames) {
361
- const extractedPath = path.join(binDir, name);
362
- if (existsSync(extractedPath) && extractedPath !== binaryPath) {
363
- try {
364
- await copyFile(extractedPath, binaryPath);
365
- unlinkSync(extractedPath);
366
- } catch {}
367
- break;
368
- }
369
- }
370
- try {
371
- unlinkSync(tarPath);
372
- } catch {}
373
- await chmod(binaryPath, 493);
374
- }
375
- if (verbose) console.log(`[rust] Binary downloaded to: ${binaryPath}`);
376
- return binaryPath;
377
- }
378
- /**
379
- * Get the version of a Rust binary by running it with --version
380
- */
381
- function getRustBinaryVersion(binaryPath) {
382
- try {
383
- const match = execFileSync(binaryPath, ["--version"], {
384
- timeout: 5e3,
385
- encoding: "utf8",
386
- stdio: [
387
- "ignore",
388
- "pipe",
389
- "ignore"
390
- ]
391
- }).match(/(\d+\.\d+\.\d+)/);
392
- return match ? match[1] ?? null : null;
393
- } catch {
394
- return null;
395
- }
396
- }
397
- /**
398
- * Check if a binary path is inside a git repo (dev build), and rebuild if outdated.
399
- * Returns the same path if up-to-date or rebuilt, undefined if rebuild failed.
400
- */
401
- function autoRebuildIfOutdated(binaryPath, verbose) {
402
- if (!binaryPath.includes("/target/release") && !binaryPath.includes("/target/debug")) return true;
403
- const binaryVersion = getRustBinaryVersion(binaryPath);
404
- const pkgVersion = getInstalledPackage().version;
405
- if (verbose) console.log(`[rust] Binary version: ${binaryVersion}, package version: ${pkgVersion}`);
406
- if (binaryVersion === pkgVersion) return true;
407
- const rsDir = binaryPath.replace(/\/target\/(release|debug)\/agent-yes.*$/, "");
408
- if (!existsSync(path.join(rsDir, "Cargo.toml"))) {
409
- if (verbose) console.log(`[rust] Cannot find Cargo.toml at ${rsDir}, skipping rebuild`);
410
- return true;
411
- }
412
- process.stderr.write(`\x1b[33m[rust] Binary outdated (${binaryVersion ?? "unknown"} → ${pkgVersion}), rebuilding…\x1b[0m\n`);
413
- try {
414
- execFileSync("cargo", ["build", ...binaryPath.includes("/target/release") ? ["--release"] : []], {
415
- cwd: rsDir,
416
- stdio: "inherit",
417
- timeout: 3e5
418
- });
419
- process.stderr.write(`\x1b[32m[rust] Rebuild complete\x1b[0m\n`);
420
- return true;
421
- } catch {
422
- process.stderr.write(`\x1b[31m[rust] Auto-rebuild failed, using outdated binary\x1b[0m\n`);
423
- return true;
424
- }
425
- }
426
- /**
427
- * Get or download the Rust binary
428
- */
429
- async function getRustBinary(options = {}) {
430
- const { verbose = false, forceDownload = false } = options;
431
- if (!forceDownload) {
432
- const existing = findRustBinary(verbose);
433
- if (existing) {
434
- if (verbose) console.log(`[rust] Using existing binary: ${existing}`);
435
- autoRebuildIfOutdated(existing, verbose);
436
- return existing;
437
- }
438
- }
439
- if (verbose) console.log(`[rust] Binary not found, downloading...`);
440
- try {
441
- return await downloadBinary(verbose);
442
- } catch (err) {
443
- throw new Error(`Failed to get Rust binary: ${err instanceof Error ? err.message : err}\nYou can build manually with: cd rs && cargo build --release`);
444
- }
445
- }
446
-
447
245
  //#endregion
448
246
  //#region ts/buildRustArgs.ts
449
247
  /**
@@ -487,7 +285,7 @@ function buildRustArgs(argv, cliFromScript, supportedClis) {
487
285
  const rawArg = process.argv[2];
488
286
  const managerCommands = !invokedCliName(process.argv);
489
287
  const isHelpFlag = rawArg === "-h" || rawArg === "--help";
490
- const { isSubcommand, runSubcommand, cmdHelp } = await import("./subcommands-B23lSYPq.js");
288
+ const { isSubcommand, runSubcommand, cmdHelp } = await import("./subcommands-DOnqoHyP.js");
491
289
  if (isHelpFlag && process.argv.length === 3) {
492
290
  await cmdHelp(managerCommands);
493
291
  process.exit(0);
@@ -501,16 +299,16 @@ await checkAndAutoUpdate();
501
299
  logger.info(versionString());
502
300
  const config = parseCliArgs(process.argv);
503
301
  if (config.tray) {
504
- const { startTray } = await import("./tray-CWUpaZF4.js");
302
+ const { startTray } = await import("./tray-DXr7iK3E.js");
505
303
  await startTray();
506
304
  await new Promise(() => {});
507
305
  }
508
306
  {
509
- const { ensureTray } = await import("./tray-CWUpaZF4.js");
307
+ const { ensureTray } = await import("./tray-DXr7iK3E.js");
510
308
  ensureTray();
511
309
  }
512
310
  if (!config.showVersion && !config.appendPrompt && !config.tray) {
513
- const { waitForSpawnCapacity } = await import("./spawnGate-CQ1Il3Xk.js");
311
+ const { waitForSpawnCapacity } = await import("./spawnGate-BFhva-2F.js");
514
312
  await waitForSpawnCapacity({
515
313
  onWait: (reason, waitedMs) => {
516
314
  if (config.verbose || waitedMs === 0) console.error(`[agent-yes] spawn gate: ${reason} — waiting…`);
@@ -529,14 +327,14 @@ if (config.useRust) {
529
327
  }
530
328
  }
531
329
  if (rustBinary) {
532
- const { SUPPORTED_CLIS } = await import("./SUPPORTED_CLIS-D6axJyiC.js");
330
+ const { SUPPORTED_CLIS } = await import("./SUPPORTED_CLIS-Dby-8X2S.js");
533
331
  const rustArgs = buildRustArgs(process.argv, config.cli, SUPPORTED_CLIS);
534
332
  if (config.verbose) {
535
333
  console.log(`[rust] Using binary: ${rustBinary}`);
536
334
  console.log(`[rust] Args: ${rustArgs.join(" ")}`);
537
335
  }
538
336
  const attach = config.attach || process.env.AGENT_YES_ATTACH === "1";
539
- const { shouldForkNested, buildSpawnTutorial, waitForFifo } = await import("./forkNested-UCKPEgSI.js");
337
+ const { shouldForkNested, buildSpawnTutorial, waitForFifo } = await import("./forkNested-DhJxa4q4.js");
540
338
  if (shouldForkNested({
541
339
  isTTY: Boolean(process.stdout.isTTY),
542
340
  ayPid: process.env.AGENT_YES_PID,
@@ -594,7 +392,7 @@ if (config.showVersion) {
594
392
  process.exit(0);
595
393
  }
596
394
  if (config.appendPrompt) {
597
- const { PidStore } = await import("./pidStore-5qyLX3Fh.js");
395
+ const { PidStore } = await import("./pidStore-CLxwp0qI.js");
598
396
  const ipcPath = await PidStore.findActiveFifo(process.cwd());
599
397
  if (!ipcPath) {
600
398
  console.error("No active agent with IPC found in current directory.");
@@ -69,4 +69,4 @@ async function loadSharedCliDefaults(fromUrl = import.meta.url) {
69
69
 
70
70
  //#endregion
71
71
  export { normalizeAgentYesConfig as n, loadSharedCliDefaults as t };
72
- //# sourceMappingURL=configShared-CEyhl0WH.js.map
72
+ //# sourceMappingURL=configShared-0MnIQ652.js.map
@@ -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-BeKjLhmO.js.map
175
+ //# sourceMappingURL=e2e-jb0Hp43q.js.map
@@ -1,4 +1,4 @@
1
- import { t as agentYesHome } from "./agentYesHome-_eJa3DaX.js";
1
+ import { t as agentYesHome } from "./agentYesHome-CtHb5b71.js";
2
2
  import { existsSync } from "fs";
3
3
  import path from "path";
4
4
 
@@ -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-UCKPEgSI.js.map
59
+ //# sourceMappingURL=forkNested-DhJxa4q4.js.map
@@ -188,4 +188,4 @@ async function pruneOldLogs(maxAgeMs = retentionMs()) {
188
188
 
189
189
  //#endregion
190
190
  export { updateGlobalPidStatus as a, readGlobalPids as i, maybeCompactGlobalPids as n, pruneOldLogs as r, appendGlobalPid as t };
191
- //# sourceMappingURL=globalPidIndex-DlmmJlO8.js.map
191
+ //# sourceMappingURL=globalPidIndex-CoNr7tS8.js.map
package/dist/index.js CHANGED
@@ -1,7 +1,7 @@
1
- import { a as removeControlCharacters, i as AgentContext, n as agentYes, r as config, t as CLIS_CONFIG } from "./ts-hUFVxJMw.js";
1
+ import { a as removeControlCharacters, i as AgentContext, n as agentYes, r as config, t as CLIS_CONFIG } from "./ts-kJRKPdFi.js";
2
2
  import "./logger-CDIsZ-Pp.js";
3
- import "./versionChecker-IuFreIkZ.js";
4
- import "./pidStore-BfoBWUjc.js";
5
- import "./globalPidIndex-DlmmJlO8.js";
3
+ import "./versionChecker-eVbxzEL3.js";
4
+ import "./pidStore-BIvsBQ8X.js";
5
+ import "./globalPidIndex-CoNr7tS8.js";
6
6
 
7
7
  export { AgentContext, CLIS_CONFIG, config, agentYes as default, removeControlCharacters };