claude-yes 1.79.0 → 1.80.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,6 +1,6 @@
1
- import { t as CLIS_CONFIG } from "./ts-DCMrcZpL.js";
1
+ import { t as CLIS_CONFIG } from "./ts-DJTdHpX6.js";
2
2
  import "./logger-B9h0djqx.js";
3
- import "./versionChecker-CEkbd2dm.js";
3
+ import "./versionChecker-iWnXmXoS.js";
4
4
  import "./pidStore-C1JXxoPi.js";
5
5
  import "./globalPidIndex-Cr-g75QF.js";
6
6
 
@@ -9,4 +9,4 @@ const SUPPORTED_CLIS = Object.keys(CLIS_CONFIG);
9
9
 
10
10
  //#endregion
11
11
  export { SUPPORTED_CLIS };
12
- //# sourceMappingURL=SUPPORTED_CLIS-BcN2aqoM.js.map
12
+ //# sourceMappingURL=SUPPORTED_CLIS-ujFlzMra.js.map
package/dist/cli.js CHANGED
@@ -1,6 +1,6 @@
1
1
  #!/usr/bin/env bun
2
2
  import { n as logger } from "./logger-B9h0djqx.js";
3
- import { i as versionString, n as displayVersion, r as getInstalledPackage, t as checkAndAutoUpdate } from "./versionChecker-CEkbd2dm.js";
3
+ import { i as versionString, n as displayVersion, r as getInstalledPackage, t as checkAndAutoUpdate } from "./versionChecker-iWnXmXoS.js";
4
4
  import { argv } from "process";
5
5
  import { execFileSync, spawn } from "child_process";
6
6
  import ms from "ms";
@@ -475,7 +475,7 @@ function buildRustArgs(argv, cliFromScript, supportedClis) {
475
475
  }
476
476
  }
477
477
  {
478
- const { isSubcommand, runSubcommand } = await import("./subcommands-DQY6uKK-.js");
478
+ const { isSubcommand, runSubcommand } = await import("./subcommands-BVcxPfly.js");
479
479
  if (isSubcommand(process.argv[2])) {
480
480
  const code = await runSubcommand(process.argv);
481
481
  process.exit(code ?? 0);
@@ -504,7 +504,7 @@ if (config.useRust) {
504
504
  }
505
505
  }
506
506
  if (rustBinary) {
507
- const { SUPPORTED_CLIS } = await import("./SUPPORTED_CLIS-BcN2aqoM.js");
507
+ const { SUPPORTED_CLIS } = await import("./SUPPORTED_CLIS-ujFlzMra.js");
508
508
  const rustArgs = buildRustArgs(process.argv, config.cli, SUPPORTED_CLIS);
509
509
  if (config.verbose) {
510
510
  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-DCMrcZpL.js";
1
+ import { a as removeControlCharacters, i as AgentContext, n as agentYes, r as config, t as CLIS_CONFIG } from "./ts-DJTdHpX6.js";
2
2
  import "./logger-B9h0djqx.js";
3
- import "./versionChecker-CEkbd2dm.js";
3
+ import "./versionChecker-iWnXmXoS.js";
4
4
  import "./pidStore-C1JXxoPi.js";
5
5
  import "./globalPidIndex-Cr-g75QF.js";
6
6
 
@@ -128,6 +128,7 @@ function parseArgs(rest) {
128
128
  if ([
129
129
  "all",
130
130
  "active",
131
+ "follow",
131
132
  "json",
132
133
  "latest"
133
134
  ].includes(key) || !next || next.startsWith("-")) flags[key] = true;
@@ -259,6 +260,7 @@ async function cmdLs(rest) {
259
260
  const hints = ["\n"];
260
261
  if (alive) {
261
262
  hints.push(` cy tail ${alive.pid} # view latest output\n`);
263
+ hints.push(` cy tail -f ${alive.pid} # follow live output\n`);
262
264
  hints.push(` cy send ${alive.pid} "next: ..." # send a prompt\n`);
263
265
  hints.push(` cy send ${alive.pid} "" --code=ctrl-c # interrupt\n`);
264
266
  }
@@ -290,6 +292,7 @@ async function cmdRead(rest, { mode }) {
290
292
  const { flags, positional } = parseArgs(rest);
291
293
  const opts = commonOpts(flags);
292
294
  const keyword = positional[0];
295
+ const follow = !!(flags.f || flags.follow);
293
296
  const nFlag = typeof flags.n === "string" ? Number(flags.n) : void 0;
294
297
  const n = nFlag !== void 0 && Number.isFinite(nFlag) && nFlag > 0 ? Math.floor(nFlag) : mode === "cat" ? 0 : 96;
295
298
  const record = await resolveOne(keyword, opts);
@@ -302,16 +305,39 @@ async function cmdRead(rest, { mode }) {
302
305
  throw new Error(`pid ${record.pid}: log file not found at ${logPath}`);
303
306
  }
304
307
  if (!stats.isFile()) throw new Error(`pid ${record.pid}: log path is not a file: ${logPath}`);
305
- const rendered = await renderRawLog(await readFile(logPath), {
308
+ const buf = await readFile(logPath);
309
+ const rendered = await renderRawLog(buf, {
306
310
  mode,
307
311
  n
308
312
  });
309
313
  process.stderr.write(`[pid ${record.pid} ${shortenPath(record.cwd)}]\n`);
310
314
  process.stdout.write(rendered);
311
315
  if (!rendered.endsWith("\n")) process.stdout.write("\n");
316
+ if (follow) {
317
+ process.stderr.write(`following... (Ctrl-C to stop)\n`);
318
+ let offset = buf.length;
319
+ const { watch } = await import("fs");
320
+ const ansiRe = /\x1b\[[0-?]*[ -/]*[@-~]|\x1b\][^\x07\x1b]*(?:\x07|\x1b\\)|\x1b[@-Z\\-_]/g;
321
+ const ctrlRe = /[\x00-\x08\x0b\x0c\x0e-\x1f\x7f]/g;
322
+ await new Promise((resolve) => {
323
+ const watcher = watch(logPath, async () => {
324
+ const full = await readFile(logPath);
325
+ if (full.length <= offset) return;
326
+ const chunk = full.slice(offset);
327
+ offset = full.length;
328
+ const text = new TextDecoder().decode(chunk).replace(ansiRe, "").replace(ctrlRe, "");
329
+ if (text.trim()) process.stdout.write(text.trimStart());
330
+ });
331
+ process.on("SIGINT", () => {
332
+ watcher.close();
333
+ resolve();
334
+ });
335
+ });
336
+ return 0;
337
+ }
312
338
  process.stderr.write(`
313
339
  cy ls # list all agents
314
- cy send ${record.pid} "next: ..." # send a prompt\n cy send ${record.pid} "" --code=ctrl-c # interrupt\n`);
340
+ cy tail -f ${record.pid} # follow live output\n cy send ${record.pid} "next: ..." # send a prompt\n cy send ${record.pid} "" --code=ctrl-c # interrupt\n`);
315
341
  return 0;
316
342
  }
317
343
  /**
@@ -453,4 +479,4 @@ async function cmdRestart(rest) {
453
479
 
454
480
  //#endregion
455
481
  export { isSubcommand, runSubcommand };
456
- //# sourceMappingURL=subcommands-DQY6uKK-.js.map
482
+ //# sourceMappingURL=subcommands-BVcxPfly.js.map
@@ -1,5 +1,5 @@
1
1
  import { n as logger, t as addTransport } from "./logger-B9h0djqx.js";
2
- import { r as getInstalledPackage } from "./versionChecker-CEkbd2dm.js";
2
+ import { r as getInstalledPackage } from "./versionChecker-iWnXmXoS.js";
3
3
  import { i as shouldUseLock, r as releaseLock, t as acquireLock } from "./runningLock-C22d9SRJ.js";
4
4
  import { t as PidStore } from "./pidStore-C1JXxoPi.js";
5
5
  import { arch, platform } from "process";
@@ -1679,4 +1679,4 @@ function sleep(ms) {
1679
1679
 
1680
1680
  //#endregion
1681
1681
  export { removeControlCharacters as a, AgentContext as i, agentYes as n, config as r, CLIS_CONFIG as t };
1682
- //# sourceMappingURL=ts-DCMrcZpL.js.map
1682
+ //# sourceMappingURL=ts-DJTdHpX6.js.map
@@ -7,7 +7,7 @@ import { fileURLToPath } from "url";
7
7
 
8
8
  //#region package.json
9
9
  var name = "claude-yes";
10
- var version = "1.79.0";
10
+ var version = "1.80.0";
11
11
 
12
12
  //#endregion
13
13
  //#region ts/versionChecker.ts
@@ -221,4 +221,4 @@ async function displayVersion() {
221
221
 
222
222
  //#endregion
223
223
  export { versionString as i, displayVersion as n, getInstalledPackage as r, checkAndAutoUpdate as t };
224
- //# sourceMappingURL=versionChecker-CEkbd2dm.js.map
224
+ //# sourceMappingURL=versionChecker-iWnXmXoS.js.map
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "claude-yes",
3
- "version": "1.79.0",
3
+ "version": "1.80.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
@@ -149,7 +149,11 @@ export function parseArgs(rest: string[]): ParsedArgs {
149
149
  const key = arg.slice(2);
150
150
  const next = rest[i + 1];
151
151
  // Boolean flags: --all, --json, --latest
152
- if (["all", "active", "json", "latest"].includes(key) || !next || next.startsWith("-")) {
152
+ if (
153
+ ["all", "active", "follow", "json", "latest"].includes(key) ||
154
+ !next ||
155
+ next.startsWith("-")
156
+ ) {
153
157
  flags[key] = true;
154
158
  } else {
155
159
  flags[key] = next;
@@ -352,6 +356,7 @@ async function cmdLs(rest: string[]): Promise<number> {
352
356
  const hints: string[] = ["\n"];
353
357
  if (alive) {
354
358
  hints.push(` cy tail ${alive.pid} # view latest output\n`);
359
+ hints.push(` cy tail -f ${alive.pid} # follow live output\n`);
355
360
  hints.push(` cy send ${alive.pid} "next: ..." # send a prompt\n`);
356
361
  hints.push(` cy send ${alive.pid} "" --code=ctrl-c # interrupt\n`);
357
362
  }
@@ -400,6 +405,7 @@ async function cmdRead(rest: string[], { mode }: ReadOpts): Promise<number> {
400
405
  const { flags, positional } = parseArgs(rest);
401
406
  const opts = commonOpts(flags);
402
407
  const keyword = positional[0];
408
+ const follow = !!(flags.f || flags.follow);
403
409
 
404
410
  const nFlag = typeof flags.n === "string" ? Number(flags.n) : undefined;
405
411
  const n =
@@ -431,9 +437,35 @@ async function cmdRead(rest: string[], { mode }: ReadOpts): Promise<number> {
431
437
  process.stdout.write(rendered);
432
438
  if (!rendered.endsWith("\n")) process.stdout.write("\n");
433
439
 
440
+ if (follow) {
441
+ process.stderr.write(`following... (Ctrl-C to stop)\n`);
442
+ let offset = buf.length;
443
+ const { watch } = await import("fs");
444
+ // oxlint-disable-next-line no-control-regex -- intentional: strip ANSI/control
445
+ const ansiRe = /\x1b\[[0-?]*[ -/]*[@-~]|\x1b\][^\x07\x1b]*(?:\x07|\x1b\\)|\x1b[@-Z\\-_]/g;
446
+ // oxlint-disable-next-line no-control-regex -- intentional: strip control chars
447
+ const ctrlRe = /[\x00-\x08\x0b\x0c\x0e-\x1f\x7f]/g;
448
+ await new Promise<void>((resolve) => {
449
+ const watcher = watch(logPath, async () => {
450
+ const full = await readFile(logPath);
451
+ if (full.length <= offset) return;
452
+ const chunk = full.slice(offset);
453
+ offset = full.length;
454
+ const text = new TextDecoder().decode(chunk).replace(ansiRe, "").replace(ctrlRe, "");
455
+ if (text.trim()) process.stdout.write(text.trimStart());
456
+ });
457
+ process.on("SIGINT", () => {
458
+ watcher.close();
459
+ resolve();
460
+ });
461
+ });
462
+ return 0;
463
+ }
464
+
434
465
  process.stderr.write(
435
466
  `\n` +
436
467
  ` cy ls # list all agents\n` +
468
+ ` cy tail -f ${record.pid} # follow live output\n` +
437
469
  ` cy send ${record.pid} "next: ..." # send a prompt\n` +
438
470
  ` cy send ${record.pid} "" --code=ctrl-c # interrupt\n`,
439
471
  );