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.
- package/dist/{SUPPORTED_CLIS-VbHPdSIt.js → SUPPORTED_CLIS-D32BUmAN.js} +3 -3
- package/dist/cli.js +3 -3
- package/dist/index.js +2 -2
- package/dist/{serve-CAEEkFLd.js → serve-CHhrOT6F.js} +2 -2
- package/dist/{subcommands-DIworIYh.js → subcommands-Czbgwuy-.js} +52 -32
- package/dist/{subcommands-Dnh67Qo3.js → subcommands-DIxUhK0D.js} +1 -1
- package/dist/{ts-CDrRTQFz.js → ts-DOApZ3gR.js} +2 -2
- package/dist/{versionChecker-BjRotlWY.js → versionChecker-CxojFLxT.js} +2 -2
- package/package.json +1 -1
- package/ts/subcommands.ts +70 -34
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { t as CLIS_CONFIG } from "./ts-
|
|
1
|
+
import { t as CLIS_CONFIG } from "./ts-DOApZ3gR.js";
|
|
2
2
|
import "./logger-B9h0djqx.js";
|
|
3
|
-
import "./versionChecker-
|
|
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-
|
|
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-
|
|
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-
|
|
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-
|
|
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-
|
|
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-
|
|
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-
|
|
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-
|
|
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-
|
|
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
|
-
|
|
224
|
-
|
|
225
|
-
|
|
227
|
+
tty.setRawMode(true);
|
|
228
|
+
tty.resume();
|
|
229
|
+
tty.setEncoding("utf8");
|
|
226
230
|
const redraw = () => {
|
|
227
|
-
|
|
231
|
+
write(`\x1b[${list.length}A\x1b[0J`);
|
|
228
232
|
render();
|
|
229
233
|
};
|
|
230
234
|
const cleanup = () => {
|
|
231
|
-
|
|
235
|
+
tty.off("data", onData);
|
|
232
236
|
try {
|
|
233
|
-
|
|
237
|
+
tty.setRawMode(false);
|
|
234
238
|
} catch {}
|
|
235
|
-
|
|
239
|
+
tty.destroy();
|
|
236
240
|
};
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
|
|
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
|
-
|
|
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.
|
|
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-
|
|
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-
|
|
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-
|
|
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-
|
|
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.
|
|
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-
|
|
224
|
+
//# sourceMappingURL=versionChecker-CxojFLxT.js.map
|
package/package.json
CHANGED
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
|
-
|
|
320
|
-
|
|
321
|
-
|
|
328
|
+
tty.setRawMode(true);
|
|
329
|
+
tty.resume();
|
|
330
|
+
tty.setEncoding("utf8");
|
|
322
331
|
|
|
323
332
|
const redraw = () => {
|
|
324
|
-
|
|
333
|
+
write(`\x1b[${list.length}A\x1b[0J`);
|
|
325
334
|
render();
|
|
326
335
|
};
|
|
327
336
|
|
|
328
337
|
const cleanup = () => {
|
|
329
|
-
|
|
338
|
+
tty.off("data", onData);
|
|
330
339
|
try {
|
|
331
|
-
|
|
340
|
+
tty.setRawMode(false);
|
|
332
341
|
} catch {
|
|
333
|
-
/*
|
|
342
|
+
/* ignore */
|
|
334
343
|
}
|
|
335
|
-
|
|
344
|
+
tty.destroy();
|
|
336
345
|
};
|
|
337
346
|
|
|
338
|
-
|
|
339
|
-
|
|
340
|
-
|
|
341
|
-
|
|
342
|
-
|
|
343
|
-
|
|
344
|
-
|
|
345
|
-
|
|
346
|
-
|
|
347
|
-
|
|
348
|
-
|
|
349
|
-
|
|
350
|
-
|
|
351
|
-
|
|
352
|
-
|
|
353
|
-
|
|
354
|
-
|
|
355
|
-
|
|
356
|
-
|
|
357
|
-
|
|
358
|
-
|
|
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
|
-
|
|
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.
|
|
380
|
-
|
|
381
|
-
|
|
382
|
-
|
|
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)
|