claude-yes 1.88.0 → 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-CDrRTQFz.js";
1
+ import { t as CLIS_CONFIG } from "./ts-DOApZ3gR.js";
2
2
  import "./logger-B9h0djqx.js";
3
- import "./versionChecker-BjRotlWY.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-VbHPdSIt.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-BjRotlWY.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-Dnh67Qo3.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-VbHPdSIt.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-CDrRTQFz.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-BjRotlWY.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-DIworIYh.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-CAEEkFLd.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-CAEEkFLd.js");
161
+ const { cmdServe } = await import("./serve-CHhrOT6F.js");
162
162
  return cmdServe(rest);
163
163
  }
164
164
  case "remote": {
@@ -219,45 +219,63 @@ 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
- const onData = (key) => {
238
- if (key === "") {
239
- cleanup();
240
- process.stderr.write("\n");
241
- resolve(null);
242
- } else if (key === "\r" || key === "\n") {
243
- cleanup();
244
- process.stderr.write("\n");
245
- resolve(list[sel]);
246
- } else if (key === "\x1B[A") {
247
- sel = Math.max(0, sel - 1);
248
- redraw();
249
- } else if (key === "\x1B[B") {
250
- sel = Math.min(list.length - 1, sel + 1);
251
- redraw();
252
- } else if (key >= "1" && key <= String(list.length)) {
253
- sel = parseInt(key, 10) - 1;
254
- redraw();
255
- cleanup();
256
- process.stderr.write("\n");
257
- resolve(list[sel]);
241
+ let buf = "";
242
+ const onData = (chunk) => {
243
+ buf += chunk;
244
+ while (buf.length > 0) if (buf[0] === "\x1B") {
245
+ if (buf.length < 3) break;
246
+ const seq = buf.slice(0, 3);
247
+ buf = buf.slice(3);
248
+ if (seq === "\x1B[A") {
249
+ sel = Math.max(0, sel - 1);
250
+ redraw();
251
+ } else if (seq === "\x1B[B") {
252
+ sel = Math.min(list.length - 1, sel + 1);
253
+ redraw();
254
+ }
255
+ } else {
256
+ const key = buf[0];
257
+ buf = buf.slice(1);
258
+ if (key === "") {
259
+ cleanup();
260
+ process.stderr.write("\n");
261
+ resolve(null);
262
+ return;
263
+ } else if (key === "\r" || key === "\n") {
264
+ cleanup();
265
+ process.stderr.write("\n");
266
+ resolve(list[sel]);
267
+ return;
268
+ } else if (key >= "1" && key <= String(list.length)) {
269
+ sel = parseInt(key, 10) - 1;
270
+ redraw();
271
+ cleanup();
272
+ process.stderr.write("\n");
273
+ resolve(list[sel]);
274
+ return;
275
+ }
258
276
  }
259
277
  };
260
- process.stdin.on("data", onData);
278
+ tty.on("data", onData);
261
279
  });
262
280
  }
263
281
  async function resolveOne(keyword, opts) {
@@ -266,10 +284,12 @@ async function resolveOne(keyword, opts) {
266
284
  if (matches.length === 0) throw new Error(`no agent matched "${keyword}"`);
267
285
  if (matches.length === 1) return matches[0];
268
286
  if (opts.latest) return matches[0];
269
- if (process.stderr.isTTY && process.stdin.isTTY) {
287
+ if (process.stderr.isTTY && process.platform !== "win32") try {
270
288
  const chosen = await pickInteractive(matches);
271
289
  if (chosen) return chosen;
272
290
  throw new Error("no agent selected");
291
+ } catch (e) {
292
+ if (e.code === "ENOENT") {} else throw e;
273
293
  }
274
294
  const lines = matches.slice(0, 10).map((r) => ` ${r.pid} ${r.cli} ${r.cwd}`).join("\n");
275
295
  throw new Error(`keyword "${keyword}" matched ${matches.length} agents — disambiguate by pid or pass --latest:\n${lines}`);
@@ -1173,4 +1193,4 @@ async function cmdStatus(rest) {
1173
1193
 
1174
1194
  //#endregion
1175
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 };
1176
- //# sourceMappingURL=subcommands-DIworIYh.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-DIworIYh.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-BjRotlWY.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-CDrRTQFz.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.0";
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-BjRotlWY.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.0",
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,51 +315,79 @@ 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
- const onData = (key: string) => {
339
- if (key === "\x03") {
340
- cleanup();
341
- process.stderr.write("\n");
342
- resolve(null);
343
- } else if (key === "\r" || key === "\n") {
344
- cleanup();
345
- process.stderr.write("\n");
346
- resolve(list[sel]!);
347
- } else if (key === "\x1b[A") {
348
- sel = Math.max(0, sel - 1);
349
- redraw();
350
- } else if (key === "\x1b[B") {
351
- sel = Math.min(list.length - 1, sel + 1);
352
- redraw();
353
- } else if (key >= "1" && key <= String(list.length)) {
354
- sel = parseInt(key, 10) - 1;
355
- redraw();
356
- cleanup();
357
- process.stderr.write("\n");
358
- resolve(list[sel]!);
347
+ // Buffer partial escape sequences — arrow keys (\x1b[A/B) can arrive split
348
+ // across multiple data events on some terminals and PTY wrappers.
349
+ let buf = "";
350
+ const onData = (chunk: string) => {
351
+ buf += chunk;
352
+ while (buf.length > 0) {
353
+ if (buf[0] === "\x1b") {
354
+ if (buf.length < 3) break; // wait for rest of sequence
355
+ const seq = buf.slice(0, 3);
356
+ buf = buf.slice(3);
357
+ if (seq === "\x1b[A") {
358
+ sel = Math.max(0, sel - 1);
359
+ redraw();
360
+ } else if (seq === "\x1b[B") {
361
+ sel = Math.min(list.length - 1, sel + 1);
362
+ redraw();
363
+ }
364
+ // ignore other escape sequences
365
+ } else {
366
+ const key = buf[0]!;
367
+ buf = buf.slice(1);
368
+ if (key === "\x03") {
369
+ cleanup();
370
+ process.stderr.write("\n");
371
+ resolve(null);
372
+ return;
373
+ } else if (key === "\r" || key === "\n") {
374
+ cleanup();
375
+ process.stderr.write("\n");
376
+ resolve(list[sel]!);
377
+ return;
378
+ } else if (key >= "1" && key <= String(list.length)) {
379
+ sel = parseInt(key, 10) - 1;
380
+ redraw();
381
+ cleanup();
382
+ process.stderr.write("\n");
383
+ resolve(list[sel]!);
384
+ return;
385
+ }
386
+ }
359
387
  }
360
388
  };
361
389
 
362
- process.stdin.on("data", onData);
390
+ tty.on("data", onData);
363
391
  });
364
392
  }
365
393
 
@@ -376,10 +404,18 @@ export async function resolveOne(
376
404
  }
377
405
  if (matches.length === 1) return matches[0]!;
378
406
  if (opts.latest) return matches[0]!; // already sorted newest-first
379
- if (process.stderr.isTTY && process.stdin.isTTY) {
380
- const chosen = await pickInteractive(matches);
381
- if (chosen) return chosen;
382
- 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
+ }
383
419
  }
384
420
  const lines = matches
385
421
  .slice(0, 10)