claude-yes 1.88.1 → 1.88.2

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-DGhJYVFb.js";
1
+ import { t as CLIS_CONFIG } from "./ts-DOApZ3gR.js";
2
2
  import "./logger-B9h0djqx.js";
3
- import "./versionChecker-DK6U9T31.js";
3
+ import "./versionChecker-CxojFLxT.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-CXRwTMf2.js.map
12
+ //# sourceMappingURL=SUPPORTED_CLIS-D32BUmAN.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-DK6U9T31.js";
3
+ import { i as versionString, n as displayVersion, r as getInstalledPackage, t as checkAndAutoUpdate } from "./versionChecker-CxojFLxT.js";
4
4
  import { argv } from "process";
5
5
  import { execFileSync, spawn } from "child_process";
6
6
  import ms from "ms";
@@ -482,7 +482,7 @@ function buildRustArgs(argv, cliFromScript, supportedClis) {
482
482
  {
483
483
  const rawArg = process.argv[2];
484
484
  const isHelpFlag = rawArg === "-h" || rawArg === "--help";
485
- const { isSubcommand, runSubcommand, cmdHelp } = await import("./subcommands-8Pp3UUwj.js");
485
+ const { isSubcommand, runSubcommand, cmdHelp } = await import("./subcommands-DIxUhK0D.js");
486
486
  if (isHelpFlag && process.argv.length === 3) {
487
487
  cmdHelp();
488
488
  process.exit(0);
@@ -515,7 +515,7 @@ if (config.useRust) {
515
515
  }
516
516
  }
517
517
  if (rustBinary) {
518
- const { SUPPORTED_CLIS } = await import("./SUPPORTED_CLIS-CXRwTMf2.js");
518
+ const { SUPPORTED_CLIS } = await import("./SUPPORTED_CLIS-D32BUmAN.js");
519
519
  const rustArgs = buildRustArgs(process.argv, config.cli, SUPPORTED_CLIS);
520
520
  if (config.verbose) {
521
521
  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-DGhJYVFb.js";
1
+ import { a as removeControlCharacters, i as AgentContext, n as agentYes, r as config, t as CLIS_CONFIG } from "./ts-DOApZ3gR.js";
2
2
  import "./logger-B9h0djqx.js";
3
- import "./versionChecker-DK6U9T31.js";
3
+ import "./versionChecker-CxojFLxT.js";
4
4
  import "./pidStore-C1JXxoPi.js";
5
5
  import "./globalPidIndex-Cr-g75QF.js";
6
6
 
@@ -1,7 +1,7 @@
1
1
  import "./logger-B9h0djqx.js";
2
2
  import "./globalPidIndex-Cr-g75QF.js";
3
3
  import "./remotes-Bjp2GYPz.js";
4
- import { a as listRecords, c as renderRawLog, d as snapshotStatus, f as writeToIpc, l as resolveOne, n as controlCodeFromName, s as readNotes } from "./subcommands-DxafpA6_.js";
4
+ import { a as listRecords, c as renderRawLog, d as snapshotStatus, f as writeToIpc, l as resolveOne, n as controlCodeFromName, s as readNotes } from "./subcommands-Czbgwuy-.js";
5
5
  import yargs from "yargs";
6
6
  import { mkdir, readFile, writeFile } from "fs/promises";
7
7
  import { homedir } from "os";
@@ -312,4 +312,4 @@ Options:
312
312
 
313
313
  //#endregion
314
314
  export { cmdServe };
315
- //# sourceMappingURL=serve-Bk36c6qq.js.map
315
+ //# sourceMappingURL=serve-CHhrOT6F.js.map
@@ -158,7 +158,7 @@ async function runSubcommand(argv) {
158
158
  case "restart": return await cmdRestart(rest);
159
159
  case "note": return await cmdNote(rest);
160
160
  case "serve": {
161
- const { cmdServe } = await import("./serve-Bk36c6qq.js");
161
+ const { cmdServe } = await import("./serve-CHhrOT6F.js");
162
162
  return cmdServe(rest);
163
163
  }
164
164
  case "remote": {
@@ -219,20 +219,24 @@ async function pickInteractive(matches) {
219
219
  };
220
220
  process.stderr.write(`Multiple matches — select with ↑↓ Enter (or type 1-${list.length}):\n`);
221
221
  render();
222
+ const { openSync } = await import("fs");
223
+ const { ReadStream } = await import("tty");
224
+ const tty = new ReadStream(openSync("/dev/tty", "r+"));
225
+ const write = (s) => process.stderr.write(s);
222
226
  return new Promise((resolve) => {
223
- process.stdin.setRawMode(true);
224
- process.stdin.resume();
225
- process.stdin.setEncoding("utf8");
227
+ tty.setRawMode(true);
228
+ tty.resume();
229
+ tty.setEncoding("utf8");
226
230
  const redraw = () => {
227
- process.stderr.write(`\x1b[${list.length}A\x1b[0J`);
231
+ write(`\x1b[${list.length}A\x1b[0J`);
228
232
  render();
229
233
  };
230
234
  const cleanup = () => {
231
- process.stdin.off("data", onData);
235
+ tty.off("data", onData);
232
236
  try {
233
- process.stdin.setRawMode(false);
237
+ tty.setRawMode(false);
234
238
  } catch {}
235
- process.stdin.pause();
239
+ tty.destroy();
236
240
  };
237
241
  let buf = "";
238
242
  const onData = (chunk) => {
@@ -271,7 +275,7 @@ async function pickInteractive(matches) {
271
275
  }
272
276
  }
273
277
  };
274
- process.stdin.on("data", onData);
278
+ tty.on("data", onData);
275
279
  });
276
280
  }
277
281
  async function resolveOne(keyword, opts) {
@@ -280,10 +284,12 @@ async function resolveOne(keyword, opts) {
280
284
  if (matches.length === 0) throw new Error(`no agent matched "${keyword}"`);
281
285
  if (matches.length === 1) return matches[0];
282
286
  if (opts.latest) return matches[0];
283
- if (process.stderr.isTTY && process.stdin.isTTY) {
287
+ if (process.stderr.isTTY && process.platform !== "win32") try {
284
288
  const chosen = await pickInteractive(matches);
285
289
  if (chosen) return chosen;
286
290
  throw new Error("no agent selected");
291
+ } catch (e) {
292
+ if (e.code === "ENOENT") {} else throw e;
287
293
  }
288
294
  const lines = matches.slice(0, 10).map((r) => ` ${r.pid} ${r.cli} ${r.cwd}`).join("\n");
289
295
  throw new Error(`keyword "${keyword}" matched ${matches.length} agents — disambiguate by pid or pass --latest:\n${lines}`);
@@ -1187,4 +1193,4 @@ async function cmdStatus(rest) {
1187
1193
 
1188
1194
  //#endregion
1189
1195
  export { listRecords as a, renderRawLog as c, snapshotStatus as d, writeToIpc as f, isSubcommand as i, resolveOne as l, controlCodeFromName as n, matchKeyword as o, isPidAlive as r, readNotes as s, cmdHelp as t, runSubcommand as u };
1190
- //# sourceMappingURL=subcommands-DxafpA6_.js.map
1196
+ //# sourceMappingURL=subcommands-Czbgwuy-.js.map
@@ -1,6 +1,6 @@
1
1
  import "./logger-B9h0djqx.js";
2
2
  import "./globalPidIndex-Cr-g75QF.js";
3
3
  import "./remotes-Bjp2GYPz.js";
4
- import { a as listRecords, c as renderRawLog, d as snapshotStatus, f as writeToIpc, i as isSubcommand, l as resolveOne, n as controlCodeFromName, o as matchKeyword, r as isPidAlive, s as readNotes, t as cmdHelp, u as runSubcommand } from "./subcommands-DxafpA6_.js";
4
+ import { a as listRecords, c as renderRawLog, d as snapshotStatus, f as writeToIpc, i as isSubcommand, l as resolveOne, n as controlCodeFromName, o as matchKeyword, r as isPidAlive, s as readNotes, t as cmdHelp, u as runSubcommand } from "./subcommands-Czbgwuy-.js";
5
5
 
6
6
  export { cmdHelp, isSubcommand, runSubcommand };
@@ -1,5 +1,5 @@
1
1
  import { n as logger, t as addTransport } from "./logger-B9h0djqx.js";
2
- import { r as getInstalledPackage } from "./versionChecker-DK6U9T31.js";
2
+ import { r as getInstalledPackage } from "./versionChecker-CxojFLxT.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 { r as readGlobalPids } from "./globalPidIndex-Cr-g75QF.js";
@@ -1693,4 +1693,4 @@ function sleep(ms) {
1693
1693
 
1694
1694
  //#endregion
1695
1695
  export { removeControlCharacters as a, AgentContext as i, agentYes as n, config as r, CLIS_CONFIG as t };
1696
- //# sourceMappingURL=ts-DGhJYVFb.js.map
1696
+ //# sourceMappingURL=ts-DOApZ3gR.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.88.1";
10
+ var version = "1.88.2";
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-DK6U9T31.js.map
224
+ //# sourceMappingURL=versionChecker-CxojFLxT.js.map
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "claude-yes",
3
- "version": "1.88.1",
3
+ "version": "1.88.2",
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
@@ -315,24 +315,33 @@ async function pickInteractive(matches: GlobalPidRecord[]): Promise<GlobalPidRec
315
315
  process.stderr.write(`Multiple matches — select with ↑↓ Enter (or type 1-${list.length}):\n`);
316
316
  render();
317
317
 
318
+ // Open /dev/tty directly so the picker works even when stdin is piped
319
+ // (e.g. `! ay tail foo` in Claude Code, or `ay tail foo | head`).
320
+ const { openSync } = await import("fs");
321
+ const { ReadStream } = await import("tty");
322
+ const fd = openSync("/dev/tty", "r+");
323
+ const tty = new ReadStream(fd);
324
+
325
+ const write = (s: string) => process.stderr.write(s);
326
+
318
327
  return new Promise((resolve) => {
319
- process.stdin.setRawMode(true);
320
- process.stdin.resume();
321
- process.stdin.setEncoding("utf8");
328
+ tty.setRawMode(true);
329
+ tty.resume();
330
+ tty.setEncoding("utf8");
322
331
 
323
332
  const redraw = () => {
324
- process.stderr.write(`\x1b[${list.length}A\x1b[0J`);
333
+ write(`\x1b[${list.length}A\x1b[0J`);
325
334
  render();
326
335
  };
327
336
 
328
337
  const cleanup = () => {
329
- process.stdin.off("data", onData);
338
+ tty.off("data", onData);
330
339
  try {
331
- process.stdin.setRawMode(false);
340
+ tty.setRawMode(false);
332
341
  } catch {
333
- /* not a tty */
342
+ /* ignore */
334
343
  }
335
- process.stdin.pause();
344
+ tty.destroy();
336
345
  };
337
346
 
338
347
  // Buffer partial escape sequences — arrow keys (\x1b[A/B) can arrive split
@@ -378,7 +387,7 @@ async function pickInteractive(matches: GlobalPidRecord[]): Promise<GlobalPidRec
378
387
  }
379
388
  };
380
389
 
381
- process.stdin.on("data", onData);
390
+ tty.on("data", onData);
382
391
  });
383
392
  }
384
393
 
@@ -395,10 +404,18 @@ export async function resolveOne(
395
404
  }
396
405
  if (matches.length === 1) return matches[0]!;
397
406
  if (opts.latest) return matches[0]!; // already sorted newest-first
398
- if (process.stderr.isTTY && process.stdin.isTTY) {
399
- const chosen = await pickInteractive(matches);
400
- if (chosen) return chosen;
401
- throw new Error("no agent selected");
407
+ if (process.stderr.isTTY && process.platform !== "win32") {
408
+ try {
409
+ const chosen = await pickInteractive(matches);
410
+ if (chosen) return chosen;
411
+ throw new Error("no agent selected");
412
+ } catch (e) {
413
+ if ((e as NodeJS.ErrnoException).code === "ENOENT") {
414
+ // /dev/tty not available (no controlling terminal), fall through
415
+ } else {
416
+ throw e;
417
+ }
418
+ }
402
419
  }
403
420
  const lines = matches
404
421
  .slice(0, 10)