claude-yes 1.76.1 → 1.78.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.
- package/dist/{SUPPORTED_CLIS-NThDjEO4.js → SUPPORTED_CLIS-eyTIFAJl.js} +3 -3
- package/dist/cli.js +3 -3
- package/dist/index.js +2 -2
- package/dist/{subcommands-DSm9WL-6.js → subcommands-Ctgm4cEn.js} +25 -8
- package/dist/{ts-DzPtU2gf.js → ts-B2M_r506.js} +2 -2
- package/dist/{versionChecker-B-_IVIfU.js → versionChecker-CoV20GQ7.js} +2 -2
- package/package.json +1 -1
- package/ts/subcommands.ts +45 -8
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { t as CLIS_CONFIG } from "./ts-
|
|
1
|
+
import { t as CLIS_CONFIG } from "./ts-B2M_r506.js";
|
|
2
2
|
import "./logger-B9h0djqx.js";
|
|
3
|
-
import "./versionChecker-
|
|
3
|
+
import "./versionChecker-CoV20GQ7.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-eyTIFAJl.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-CoV20GQ7.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-
|
|
478
|
+
const { isSubcommand, runSubcommand } = await import("./subcommands-Ctgm4cEn.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-
|
|
507
|
+
const { SUPPORTED_CLIS } = await import("./SUPPORTED_CLIS-eyTIFAJl.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-
|
|
1
|
+
import { a as removeControlCharacters, i as AgentContext, n as agentYes, r as config, t as CLIS_CONFIG } from "./ts-B2M_r506.js";
|
|
2
2
|
import "./logger-B9h0djqx.js";
|
|
3
|
-
import "./versionChecker-
|
|
3
|
+
import "./versionChecker-CoV20GQ7.js";
|
|
4
4
|
import "./pidStore-C1JXxoPi.js";
|
|
5
5
|
import "./globalPidIndex-Cr-g75QF.js";
|
|
6
6
|
|
|
@@ -213,13 +213,21 @@ async function cmdLs(rest) {
|
|
|
213
213
|
};
|
|
214
214
|
const fixedWidth = widths.pid + widths.cli + widths.status + widths.age + widths.cwd + 10;
|
|
215
215
|
const promptBudget = Math.max(20, termWidth - fixedWidth - 1);
|
|
216
|
-
const
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
status
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
216
|
+
const IDLE_THRESHOLD_MS = 60 * 1e3;
|
|
217
|
+
const rows = await Promise.all(records.map(async (r) => {
|
|
218
|
+
let displayStatus = r.status;
|
|
219
|
+
if (r.status === "active" && r.log_file) {
|
|
220
|
+
const mtime = await stat(r.log_file).then((s) => s.mtimeMs).catch(() => null);
|
|
221
|
+
if (mtime !== null && Date.now() - mtime > IDLE_THRESHOLD_MS) displayStatus = "idle";
|
|
222
|
+
}
|
|
223
|
+
return {
|
|
224
|
+
pid: String(r.pid),
|
|
225
|
+
cli: r.cli,
|
|
226
|
+
status: displayStatus,
|
|
227
|
+
age: humanizeAge(Date.now() - r.started_at),
|
|
228
|
+
cwd: shortenPath(r.cwd),
|
|
229
|
+
prompt: truncate(r.prompt ?? "", promptBudget)
|
|
230
|
+
};
|
|
223
231
|
}));
|
|
224
232
|
const header = [
|
|
225
233
|
"PID".padEnd(widths.pid),
|
|
@@ -238,6 +246,10 @@ async function cmdLs(rest) {
|
|
|
238
246
|
r.cwd.padEnd(widths.cwd),
|
|
239
247
|
r.prompt
|
|
240
248
|
].join(" ") + "\n");
|
|
249
|
+
if (!opts.json && records.length > 0) {
|
|
250
|
+
const example = records[0].pid;
|
|
251
|
+
process.stderr.write(`\n cy tail ${example} # view latest output\n cy read ${example} # full rendered log\n cy send ${example} "next: ..." # send a prompt\n cy send ${example} "" --code=ctrl-c # interrupt\n`);
|
|
252
|
+
}
|
|
241
253
|
return 0;
|
|
242
254
|
}
|
|
243
255
|
function humanizeAge(ms) {
|
|
@@ -278,8 +290,12 @@ async function cmdRead(rest, { mode }) {
|
|
|
278
290
|
mode,
|
|
279
291
|
n
|
|
280
292
|
});
|
|
293
|
+
process.stderr.write(`[pid ${record.pid} ${shortenPath(record.cwd)}]\n`);
|
|
281
294
|
process.stdout.write(rendered);
|
|
282
295
|
if (!rendered.endsWith("\n")) process.stdout.write("\n");
|
|
296
|
+
process.stderr.write(`
|
|
297
|
+
cy ls # list all agents
|
|
298
|
+
cy send ${record.pid} "next: ..." # send a prompt\n cy send ${record.pid} "" --code=ctrl-c # interrupt\n`);
|
|
283
299
|
return 0;
|
|
284
300
|
}
|
|
285
301
|
/**
|
|
@@ -331,6 +347,7 @@ async function cmdSend(rest) {
|
|
|
331
347
|
const payload = (message ?? "") + trailing;
|
|
332
348
|
await writeToIpc(fifoPath, payload);
|
|
333
349
|
process.stdout.write(`sent to pid ${record.pid} (${record.cli}): ${truncate(payload, 80)}\n`);
|
|
350
|
+
process.stderr.write(`\n cy tail ${record.pid} # watch output\n cy ls # list all agents\n`);
|
|
334
351
|
return 0;
|
|
335
352
|
}
|
|
336
353
|
function controlCodeFromName(name) {
|
|
@@ -388,4 +405,4 @@ async function writeToIpc(ipcPath, payload) {
|
|
|
388
405
|
|
|
389
406
|
//#endregion
|
|
390
407
|
export { isSubcommand, runSubcommand };
|
|
391
|
-
//# sourceMappingURL=subcommands-
|
|
408
|
+
//# sourceMappingURL=subcommands-Ctgm4cEn.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-
|
|
2
|
+
import { r as getInstalledPackage } from "./versionChecker-CoV20GQ7.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-
|
|
1682
|
+
//# sourceMappingURL=ts-B2M_r506.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.
|
|
10
|
+
var version = "1.78.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-
|
|
224
|
+
//# sourceMappingURL=versionChecker-CoV20GQ7.js.map
|
package/package.json
CHANGED
package/ts/subcommands.ts
CHANGED
|
@@ -288,14 +288,26 @@ async function cmdLs(rest: string[]): Promise<number> {
|
|
|
288
288
|
const fixedWidth = widths.pid + widths.cli + widths.status + widths.age + widths.cwd + 5 * 2; // 5 separators of " "
|
|
289
289
|
const promptBudget = Math.max(20, termWidth - fixedWidth - 1);
|
|
290
290
|
|
|
291
|
-
const
|
|
292
|
-
|
|
293
|
-
|
|
294
|
-
|
|
295
|
-
|
|
296
|
-
|
|
297
|
-
|
|
298
|
-
|
|
291
|
+
const IDLE_THRESHOLD_MS = 60 * 1000;
|
|
292
|
+
const rows = await Promise.all(
|
|
293
|
+
records.map(async (r) => {
|
|
294
|
+
let displayStatus = r.status;
|
|
295
|
+
if (r.status === "active" && r.log_file) {
|
|
296
|
+
const mtime = await stat(r.log_file)
|
|
297
|
+
.then((s) => s.mtimeMs)
|
|
298
|
+
.catch(() => null);
|
|
299
|
+
if (mtime !== null && Date.now() - mtime > IDLE_THRESHOLD_MS) displayStatus = "idle";
|
|
300
|
+
}
|
|
301
|
+
return {
|
|
302
|
+
pid: String(r.pid),
|
|
303
|
+
cli: r.cli,
|
|
304
|
+
status: displayStatus,
|
|
305
|
+
age: humanizeAge(Date.now() - r.started_at),
|
|
306
|
+
cwd: shortenPath(r.cwd),
|
|
307
|
+
prompt: truncate(r.prompt ?? "", promptBudget),
|
|
308
|
+
};
|
|
309
|
+
}),
|
|
310
|
+
);
|
|
299
311
|
|
|
300
312
|
const header =
|
|
301
313
|
[
|
|
@@ -321,6 +333,17 @@ async function cmdLs(rest: string[]): Promise<number> {
|
|
|
321
333
|
);
|
|
322
334
|
}
|
|
323
335
|
|
|
336
|
+
if (!opts.json && records.length > 0) {
|
|
337
|
+
const example = records[0]!.pid;
|
|
338
|
+
process.stderr.write(
|
|
339
|
+
`\n` +
|
|
340
|
+
` cy tail ${example} # view latest output\n` +
|
|
341
|
+
` cy read ${example} # full rendered log\n` +
|
|
342
|
+
` cy send ${example} "next: ..." # send a prompt\n` +
|
|
343
|
+
` cy send ${example} "" --code=ctrl-c # interrupt\n`,
|
|
344
|
+
);
|
|
345
|
+
}
|
|
346
|
+
|
|
324
347
|
return 0;
|
|
325
348
|
}
|
|
326
349
|
|
|
@@ -385,8 +408,16 @@ async function cmdRead(rest: string[], { mode }: ReadOpts): Promise<number> {
|
|
|
385
408
|
|
|
386
409
|
const buf = await readFile(logPath);
|
|
387
410
|
const rendered = await renderRawLog(buf, { mode, n });
|
|
411
|
+
process.stderr.write(`[pid ${record.pid} ${shortenPath(record.cwd)}]\n`);
|
|
388
412
|
process.stdout.write(rendered);
|
|
389
413
|
if (!rendered.endsWith("\n")) process.stdout.write("\n");
|
|
414
|
+
|
|
415
|
+
process.stderr.write(
|
|
416
|
+
`\n` +
|
|
417
|
+
` cy ls # list all agents\n` +
|
|
418
|
+
` cy send ${record.pid} "next: ..." # send a prompt\n` +
|
|
419
|
+
` cy send ${record.pid} "" --code=ctrl-c # interrupt\n`,
|
|
420
|
+
);
|
|
390
421
|
return 0;
|
|
391
422
|
}
|
|
392
423
|
|
|
@@ -463,6 +494,12 @@ async function cmdSend(rest: string[]): Promise<number> {
|
|
|
463
494
|
const payload = (message ?? "") + trailing;
|
|
464
495
|
await writeToIpc(fifoPath, payload);
|
|
465
496
|
process.stdout.write(`sent to pid ${record.pid} (${record.cli}): ${truncate(payload, 80)}\n`);
|
|
497
|
+
|
|
498
|
+
process.stderr.write(
|
|
499
|
+
`\n` +
|
|
500
|
+
` cy tail ${record.pid} # watch output\n` +
|
|
501
|
+
` cy ls # list all agents\n`,
|
|
502
|
+
);
|
|
466
503
|
return 0;
|
|
467
504
|
}
|
|
468
505
|
|