claude-yes 1.37.1 → 1.37.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/cli.js +49 -18
- package/dist/index.js +25 -9
- package/package.json +2 -3
- package/ts/index.ts +22 -7
package/dist/cli.js
CHANGED
|
@@ -21495,7 +21495,7 @@ function getDefaultConfig() {
|
|
|
21495
21495
|
bash: "curl -fsSL https://claude.ai/install.sh | bash",
|
|
21496
21496
|
npm: "npm i -g @anthropic-ai/claude-code@latest"
|
|
21497
21497
|
},
|
|
21498
|
-
ready: [/^\? for shortcuts/, /^>
|
|
21498
|
+
ready: [/^\? for shortcuts/, /^> /, /──────────+/],
|
|
21499
21499
|
typingRespond: {
|
|
21500
21500
|
"1\n": [/│ Do you want to use this API key\?/]
|
|
21501
21501
|
},
|
|
@@ -21841,7 +21841,13 @@ ${prompt}` : prefix;
|
|
|
21841
21841
|
...cliArgs.filter((arg) => !["--continue", "--resume"].includes(arg))
|
|
21842
21842
|
];
|
|
21843
21843
|
logger.info(`Restarting ${cli} ${JSON.stringify([bin, ...args])}`);
|
|
21844
|
-
|
|
21844
|
+
const restartPtyOptions = {
|
|
21845
|
+
name: "xterm-color",
|
|
21846
|
+
...getTerminalDimensions(),
|
|
21847
|
+
cwd: cwd ?? process.cwd(),
|
|
21848
|
+
env: ptyEnv
|
|
21849
|
+
};
|
|
21850
|
+
shell = pty_default.spawn(bin, args, restartPtyOptions);
|
|
21845
21851
|
await pidStore.registerProcess({ pid: shell.pid, cli, args, prompt });
|
|
21846
21852
|
shell.onData(onData);
|
|
21847
21853
|
shell.onExit(onExit);
|
|
@@ -21874,7 +21880,13 @@ ${prompt}` : prefix;
|
|
|
21874
21880
|
logger.debug(`restore|no stored session, using default restore args`);
|
|
21875
21881
|
}
|
|
21876
21882
|
}
|
|
21877
|
-
|
|
21883
|
+
const restorePtyOptions = {
|
|
21884
|
+
name: "xterm-color",
|
|
21885
|
+
...getTerminalDimensions(),
|
|
21886
|
+
cwd: cwd ?? process.cwd(),
|
|
21887
|
+
env: ptyEnv
|
|
21888
|
+
};
|
|
21889
|
+
shell = pty_default.spawn(cli, restoreArgs, restorePtyOptions);
|
|
21878
21890
|
await pidStore.registerProcess({ pid: shell.pid, cli, args: restoreArgs, prompt });
|
|
21879
21891
|
shell.onData(onData);
|
|
21880
21892
|
shell.onExit(onExit);
|
|
@@ -21912,7 +21924,10 @@ ${prompt}` : prefix;
|
|
|
21912
21924
|
}).by((s) => {
|
|
21913
21925
|
if (!useFifo)
|
|
21914
21926
|
return s;
|
|
21915
|
-
const
|
|
21927
|
+
const fifoPath = pidStore.getFifoPath(shell.pid);
|
|
21928
|
+
if (!fifoPath)
|
|
21929
|
+
return s;
|
|
21930
|
+
const ipcResult = createFifoStream(cli, fifoPath);
|
|
21916
21931
|
if (!ipcResult)
|
|
21917
21932
|
return s;
|
|
21918
21933
|
pendingExitCode.promise.finally(() => ipcResult.cleanup());
|
|
@@ -21937,12 +21952,13 @@ ${prompt}` : prefix;
|
|
|
21937
21952
|
ctx.idleWaiter.ping();
|
|
21938
21953
|
pidStore.updateStatus(shell.pid, "active").catch(() => null);
|
|
21939
21954
|
}).forEach(() => ctx.nextStdout.ready()).forkTo(async function rawLogger(f) {
|
|
21940
|
-
|
|
21955
|
+
const rawLogPath = ctx.logPaths.rawLogPath;
|
|
21956
|
+
if (!rawLogPath)
|
|
21941
21957
|
return f.run();
|
|
21942
|
-
return await mkdir8(path14.dirname(
|
|
21943
|
-
logger.debug(`[${cli}-yes] raw logs streaming to ${
|
|
21958
|
+
return await mkdir8(path14.dirname(rawLogPath), { recursive: true }).then(() => {
|
|
21959
|
+
logger.debug(`[${cli}-yes] raw logs streaming to ${rawLogPath}`);
|
|
21944
21960
|
return f.forEach(async (chars) => {
|
|
21945
|
-
await writeFile8(
|
|
21961
|
+
await writeFile8(rawLogPath, chars, { flag: "a" }).catch(() => null);
|
|
21946
21962
|
}).run();
|
|
21947
21963
|
}).catch(() => f.run());
|
|
21948
21964
|
}).by(function consoleResponder(e) {
|
|
@@ -22231,7 +22247,13 @@ ${prompt}` : prefix;
|
|
|
22231
22247
|
...cliArgs.filter((arg) => !["--continue", "--resume"].includes(arg))
|
|
22232
22248
|
];
|
|
22233
22249
|
logger.info(`Restarting ${cli} ${JSON.stringify([bin, ...args])}`);
|
|
22234
|
-
|
|
22250
|
+
const restartPtyOptions = {
|
|
22251
|
+
name: "xterm-color",
|
|
22252
|
+
...getTerminalDimensions(),
|
|
22253
|
+
cwd: cwd ?? process.cwd(),
|
|
22254
|
+
env: ptyEnv
|
|
22255
|
+
};
|
|
22256
|
+
shell = pty_default.spawn(bin, args, restartPtyOptions);
|
|
22235
22257
|
await pidStore.registerProcess({ pid: shell.pid, cli, args, prompt });
|
|
22236
22258
|
shell.onData(onData);
|
|
22237
22259
|
shell.onExit(onExit);
|
|
@@ -22264,7 +22286,13 @@ ${prompt}` : prefix;
|
|
|
22264
22286
|
logger.debug(`restore|no stored session, using default restore args`);
|
|
22265
22287
|
}
|
|
22266
22288
|
}
|
|
22267
|
-
|
|
22289
|
+
const restorePtyOptions = {
|
|
22290
|
+
name: "xterm-color",
|
|
22291
|
+
...getTerminalDimensions(),
|
|
22292
|
+
cwd: cwd ?? process.cwd(),
|
|
22293
|
+
env: ptyEnv
|
|
22294
|
+
};
|
|
22295
|
+
shell = pty_default.spawn(cli, restoreArgs, restorePtyOptions);
|
|
22268
22296
|
await pidStore.registerProcess({ pid: shell.pid, cli, args: restoreArgs, prompt });
|
|
22269
22297
|
shell.onData(onData);
|
|
22270
22298
|
shell.onExit(onExit);
|
|
@@ -22302,7 +22330,10 @@ ${prompt}` : prefix;
|
|
|
22302
22330
|
}).by((s) => {
|
|
22303
22331
|
if (!useFifo)
|
|
22304
22332
|
return s;
|
|
22305
|
-
const
|
|
22333
|
+
const fifoPath = pidStore.getFifoPath(shell.pid);
|
|
22334
|
+
if (!fifoPath)
|
|
22335
|
+
return s;
|
|
22336
|
+
const ipcResult = createFifoStream(cli, fifoPath);
|
|
22306
22337
|
if (!ipcResult)
|
|
22307
22338
|
return s;
|
|
22308
22339
|
pendingExitCode.promise.finally(() => ipcResult.cleanup());
|
|
@@ -22327,12 +22358,13 @@ ${prompt}` : prefix;
|
|
|
22327
22358
|
ctx.idleWaiter.ping();
|
|
22328
22359
|
pidStore.updateStatus(shell.pid, "active").catch(() => null);
|
|
22329
22360
|
}).forEach(() => ctx.nextStdout.ready()).forkTo(async function rawLogger(f) {
|
|
22330
|
-
|
|
22361
|
+
const rawLogPath = ctx.logPaths.rawLogPath;
|
|
22362
|
+
if (!rawLogPath)
|
|
22331
22363
|
return f.run();
|
|
22332
|
-
return await mkdir6(path12.dirname(
|
|
22333
|
-
logger.debug(`[${cli}-yes] raw logs streaming to ${
|
|
22364
|
+
return await mkdir6(path12.dirname(rawLogPath), { recursive: true }).then(() => {
|
|
22365
|
+
logger.debug(`[${cli}-yes] raw logs streaming to ${rawLogPath}`);
|
|
22334
22366
|
return f.forEach(async (chars) => {
|
|
22335
|
-
await writeFile5(
|
|
22367
|
+
await writeFile5(rawLogPath, chars, { flag: "a" }).catch(() => null);
|
|
22336
22368
|
}).run();
|
|
22337
22369
|
}).catch(() => f.run());
|
|
22338
22370
|
}).by(function consoleResponder(e) {
|
|
@@ -27840,8 +27872,7 @@ var package_default = {
|
|
|
27840
27872
|
postbuild: "bun ./ts/postbuild.ts",
|
|
27841
27873
|
demo: "bun run build && bun link && claude-yes -- demo",
|
|
27842
27874
|
dev: "bun ts/index.ts",
|
|
27843
|
-
|
|
27844
|
-
"test:tsgo": "tsgo --test",
|
|
27875
|
+
typecheck: "tsgo --noEmit --skipLibCheck",
|
|
27845
27876
|
fmt: "oxlint --fix --fix-suggestions && oxfmt",
|
|
27846
27877
|
_prepack: "bun run build",
|
|
27847
27878
|
prepare: "husky",
|
|
@@ -28308,5 +28339,5 @@ var { exitCode } = await cliYes(config3);
|
|
|
28308
28339
|
console.log("exiting process");
|
|
28309
28340
|
process.exit(exitCode ?? 1);
|
|
28310
28341
|
|
|
28311
|
-
//# debugId=
|
|
28342
|
+
//# debugId=FE6B11F4BCA4D4BF64756E2164756E21
|
|
28312
28343
|
//# sourceMappingURL=cli.js.map
|
package/dist/index.js
CHANGED
|
@@ -21493,7 +21493,7 @@ function getDefaultConfig() {
|
|
|
21493
21493
|
bash: "curl -fsSL https://claude.ai/install.sh | bash",
|
|
21494
21494
|
npm: "npm i -g @anthropic-ai/claude-code@latest"
|
|
21495
21495
|
},
|
|
21496
|
-
ready: [/^\? for shortcuts/, /^>
|
|
21496
|
+
ready: [/^\? for shortcuts/, /^> /, /──────────+/],
|
|
21497
21497
|
typingRespond: {
|
|
21498
21498
|
"1\n": [/│ Do you want to use this API key\?/]
|
|
21499
21499
|
},
|
|
@@ -21824,7 +21824,13 @@ ${prompt}` : prefix;
|
|
|
21824
21824
|
...cliArgs.filter((arg) => !["--continue", "--resume"].includes(arg))
|
|
21825
21825
|
];
|
|
21826
21826
|
logger.info(`Restarting ${cli} ${JSON.stringify([bin, ...args])}`);
|
|
21827
|
-
|
|
21827
|
+
const restartPtyOptions = {
|
|
21828
|
+
name: "xterm-color",
|
|
21829
|
+
...getTerminalDimensions(),
|
|
21830
|
+
cwd: cwd ?? process.cwd(),
|
|
21831
|
+
env: ptyEnv
|
|
21832
|
+
};
|
|
21833
|
+
shell = pty_default.spawn(bin, args, restartPtyOptions);
|
|
21828
21834
|
await pidStore.registerProcess({ pid: shell.pid, cli, args, prompt });
|
|
21829
21835
|
shell.onData(onData);
|
|
21830
21836
|
shell.onExit(onExit);
|
|
@@ -21857,7 +21863,13 @@ ${prompt}` : prefix;
|
|
|
21857
21863
|
logger.debug(`restore|no stored session, using default restore args`);
|
|
21858
21864
|
}
|
|
21859
21865
|
}
|
|
21860
|
-
|
|
21866
|
+
const restorePtyOptions = {
|
|
21867
|
+
name: "xterm-color",
|
|
21868
|
+
...getTerminalDimensions(),
|
|
21869
|
+
cwd: cwd ?? process.cwd(),
|
|
21870
|
+
env: ptyEnv
|
|
21871
|
+
};
|
|
21872
|
+
shell = pty_default.spawn(cli, restoreArgs, restorePtyOptions);
|
|
21861
21873
|
await pidStore.registerProcess({ pid: shell.pid, cli, args: restoreArgs, prompt });
|
|
21862
21874
|
shell.onData(onData);
|
|
21863
21875
|
shell.onExit(onExit);
|
|
@@ -21895,7 +21907,10 @@ ${prompt}` : prefix;
|
|
|
21895
21907
|
}).by((s) => {
|
|
21896
21908
|
if (!useFifo)
|
|
21897
21909
|
return s;
|
|
21898
|
-
const
|
|
21910
|
+
const fifoPath = pidStore.getFifoPath(shell.pid);
|
|
21911
|
+
if (!fifoPath)
|
|
21912
|
+
return s;
|
|
21913
|
+
const ipcResult = createFifoStream(cli, fifoPath);
|
|
21899
21914
|
if (!ipcResult)
|
|
21900
21915
|
return s;
|
|
21901
21916
|
pendingExitCode.promise.finally(() => ipcResult.cleanup());
|
|
@@ -21920,12 +21935,13 @@ ${prompt}` : prefix;
|
|
|
21920
21935
|
ctx.idleWaiter.ping();
|
|
21921
21936
|
pidStore.updateStatus(shell.pid, "active").catch(() => null);
|
|
21922
21937
|
}).forEach(() => ctx.nextStdout.ready()).forkTo(async function rawLogger(f) {
|
|
21923
|
-
|
|
21938
|
+
const rawLogPath = ctx.logPaths.rawLogPath;
|
|
21939
|
+
if (!rawLogPath)
|
|
21924
21940
|
return f.run();
|
|
21925
|
-
return await mkdir6(path12.dirname(
|
|
21926
|
-
logger.debug(`[${cli}-yes] raw logs streaming to ${
|
|
21941
|
+
return await mkdir6(path12.dirname(rawLogPath), { recursive: true }).then(() => {
|
|
21942
|
+
logger.debug(`[${cli}-yes] raw logs streaming to ${rawLogPath}`);
|
|
21927
21943
|
return f.forEach(async (chars) => {
|
|
21928
|
-
await writeFile5(
|
|
21944
|
+
await writeFile5(rawLogPath, chars, { flag: "a" }).catch(() => null);
|
|
21929
21945
|
}).run();
|
|
21930
21946
|
}).catch(() => f.run());
|
|
21931
21947
|
}).by(function consoleResponder(e) {
|
|
@@ -21972,5 +21988,5 @@ export {
|
|
|
21972
21988
|
CLIS_CONFIG
|
|
21973
21989
|
};
|
|
21974
21990
|
|
|
21975
|
-
//# debugId=
|
|
21991
|
+
//# debugId=6E53A2078062AB9364756E2164756E21
|
|
21976
21992
|
//# sourceMappingURL=index.js.map
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "claude-yes",
|
|
3
|
-
"version": "1.37.
|
|
3
|
+
"version": "1.37.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",
|
|
@@ -66,8 +66,7 @@
|
|
|
66
66
|
"postbuild": "bun ./ts/postbuild.ts",
|
|
67
67
|
"demo": "bun run build && bun link && claude-yes -- demo",
|
|
68
68
|
"dev": "bun ts/index.ts",
|
|
69
|
-
"
|
|
70
|
-
"test:tsgo": "tsgo --test",
|
|
69
|
+
"typecheck": "tsgo --noEmit --skipLibCheck",
|
|
71
70
|
"fmt": "oxlint --fix --fix-suggestions && oxfmt",
|
|
72
71
|
"_prepack": "bun run build",
|
|
73
72
|
"prepare": "husky",
|
package/ts/index.ts
CHANGED
|
@@ -386,7 +386,13 @@ export default async function agentYes({
|
|
|
386
386
|
];
|
|
387
387
|
logger.info(`Restarting ${cli} ${JSON.stringify([bin, ...args])}`);
|
|
388
388
|
|
|
389
|
-
|
|
389
|
+
const restartPtyOptions = {
|
|
390
|
+
name: "xterm-color",
|
|
391
|
+
...getTerminalDimensions(),
|
|
392
|
+
cwd: cwd ?? process.cwd(),
|
|
393
|
+
env: ptyEnv,
|
|
394
|
+
};
|
|
395
|
+
shell = pty.spawn(bin!, args, restartPtyOptions);
|
|
390
396
|
await pidStore.registerProcess({ pid: shell.pid, cli, args, prompt });
|
|
391
397
|
shell.onData(onData);
|
|
392
398
|
shell.onExit(onExit);
|
|
@@ -430,7 +436,13 @@ export default async function agentYes({
|
|
|
430
436
|
}
|
|
431
437
|
}
|
|
432
438
|
|
|
433
|
-
|
|
439
|
+
const restorePtyOptions = {
|
|
440
|
+
name: "xterm-color",
|
|
441
|
+
...getTerminalDimensions(),
|
|
442
|
+
cwd: cwd ?? process.cwd(),
|
|
443
|
+
env: ptyEnv,
|
|
444
|
+
};
|
|
445
|
+
shell = pty.spawn(cli, restoreArgs, restorePtyOptions);
|
|
434
446
|
await pidStore.registerProcess({ pid: shell.pid, cli, args: restoreArgs, prompt });
|
|
435
447
|
shell.onData(onData);
|
|
436
448
|
shell.onExit(onExit);
|
|
@@ -487,7 +499,9 @@ export default async function agentYes({
|
|
|
487
499
|
// read from IPC stream if available (FIFO on Linux, Named Pipes on Windows)
|
|
488
500
|
.by((s) => {
|
|
489
501
|
if (!useFifo) return s;
|
|
490
|
-
const
|
|
502
|
+
const fifoPath = pidStore.getFifoPath(shell.pid);
|
|
503
|
+
if (!fifoPath) return s; // Skip if no valid path
|
|
504
|
+
const ipcResult = createFifoStream(cli, fifoPath);
|
|
491
505
|
if (!ipcResult) return s;
|
|
492
506
|
pendingExitCode.promise.finally(() => ipcResult.cleanup());
|
|
493
507
|
process.stderr.write(`\n Append prompts: ${cli}-yes --append-prompt '...'\n\n`);
|
|
@@ -521,15 +535,16 @@ export default async function agentYes({
|
|
|
521
535
|
.forEach(() => ctx.nextStdout.ready())
|
|
522
536
|
|
|
523
537
|
.forkTo(async function rawLogger(f) {
|
|
524
|
-
|
|
538
|
+
const rawLogPath = ctx.logPaths.rawLogPath;
|
|
539
|
+
if (!rawLogPath) return f.run(); // no stream
|
|
525
540
|
|
|
526
541
|
// try stream the raw log for realtime debugging, including control chars, note: it will be a huge file
|
|
527
|
-
return await mkdir(path.dirname(
|
|
542
|
+
return await mkdir(path.dirname(rawLogPath), { recursive: true })
|
|
528
543
|
.then(() => {
|
|
529
|
-
logger.debug(`[${cli}-yes] raw logs streaming to ${
|
|
544
|
+
logger.debug(`[${cli}-yes] raw logs streaming to ${rawLogPath}`);
|
|
530
545
|
return f
|
|
531
546
|
.forEach(async (chars) => {
|
|
532
|
-
await writeFile(
|
|
547
|
+
await writeFile(rawLogPath, chars, { flag: "a" }).catch(() => null);
|
|
533
548
|
})
|
|
534
549
|
.run();
|
|
535
550
|
})
|