agent-yes 1.42.0 → 1.42.1
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 +6 -3
- package/dist/index.js +3 -2
- package/package.json +2 -1
- package/ts/cli.ts +3 -3
- package/ts/parseCliArgs.spec.ts +1 -6
- package/ts/parseCliArgs.ts +3 -1
- package/ts/pidStore.ts +2 -0
package/dist/cli.js
CHANGED
|
@@ -20691,7 +20691,7 @@ var init_SqliteAdapter = __esm(() => {
|
|
|
20691
20691
|
});
|
|
20692
20692
|
|
|
20693
20693
|
// ts/pidStore.ts
|
|
20694
|
-
import { writeFile as writeFile3 } from "fs/promises";
|
|
20694
|
+
import { mkdir as mkdir4, writeFile as writeFile3 } from "fs/promises";
|
|
20695
20695
|
import path10 from "path";
|
|
20696
20696
|
|
|
20697
20697
|
class PidStore {
|
|
@@ -20837,6 +20837,7 @@ fifo/
|
|
|
20837
20837
|
|
|
20838
20838
|
`;
|
|
20839
20839
|
try {
|
|
20840
|
+
await mkdir4(this.storeDir, { recursive: true });
|
|
20840
20841
|
await writeFile3(gitignorePath, gitignoreContent, { flag: "wx" });
|
|
20841
20842
|
logger.debug(`[pidStore] Created .gitignore in ${this.storeDir}`);
|
|
20842
20843
|
} catch (error) {
|
|
@@ -27799,6 +27800,7 @@ var package_default = {
|
|
|
27799
27800
|
},
|
|
27800
27801
|
dependencies: {
|
|
27801
27802
|
"@snomiao/bun-pty": "^0.3.4",
|
|
27803
|
+
"better-sqlite3": "^12.1.0",
|
|
27802
27804
|
"bun-pty": "^0.4.8",
|
|
27803
27805
|
"from-node-stream": "^0.1.2"
|
|
27804
27806
|
},
|
|
@@ -28016,7 +28018,7 @@ var logger2 = import_winston3.default.createLogger({
|
|
|
28016
28018
|
// ts/pidStore.ts
|
|
28017
28019
|
init_logger();
|
|
28018
28020
|
init_SqliteAdapter();
|
|
28019
|
-
import { writeFile as writeFile7 } from "fs/promises";
|
|
28021
|
+
import { mkdir as mkdir8, writeFile as writeFile7 } from "fs/promises";
|
|
28020
28022
|
import path14 from "path";
|
|
28021
28023
|
|
|
28022
28024
|
class PidStore2 {
|
|
@@ -28162,6 +28164,7 @@ fifo/
|
|
|
28162
28164
|
|
|
28163
28165
|
`;
|
|
28164
28166
|
try {
|
|
28167
|
+
await mkdir8(this.storeDir, { recursive: true });
|
|
28165
28168
|
await writeFile7(gitignorePath, gitignoreContent, { flag: "wx" });
|
|
28166
28169
|
logger.debug(`[pidStore] Created .gitignore in ${this.storeDir}`);
|
|
28167
28170
|
} catch (error) {
|
|
@@ -28239,5 +28242,5 @@ var { exitCode } = await cliYes(config3);
|
|
|
28239
28242
|
console.log("exiting process");
|
|
28240
28243
|
process.exit(exitCode ?? 1);
|
|
28241
28244
|
|
|
28242
|
-
//# debugId=
|
|
28245
|
+
//# debugId=98AF926D60C85D6464756E2164756E21
|
|
28243
28246
|
//# sourceMappingURL=cli.js.map
|
package/dist/index.js
CHANGED
|
@@ -20689,7 +20689,7 @@ var init_SqliteAdapter = __esm(() => {
|
|
|
20689
20689
|
});
|
|
20690
20690
|
|
|
20691
20691
|
// ts/pidStore.ts
|
|
20692
|
-
import { writeFile as writeFile3 } from "fs/promises";
|
|
20692
|
+
import { mkdir as mkdir4, writeFile as writeFile3 } from "fs/promises";
|
|
20693
20693
|
import path10 from "path";
|
|
20694
20694
|
|
|
20695
20695
|
class PidStore {
|
|
@@ -20835,6 +20835,7 @@ fifo/
|
|
|
20835
20835
|
|
|
20836
20836
|
`;
|
|
20837
20837
|
try {
|
|
20838
|
+
await mkdir4(this.storeDir, { recursive: true });
|
|
20838
20839
|
await writeFile3(gitignorePath, gitignoreContent, { flag: "wx" });
|
|
20839
20840
|
logger.debug(`[pidStore] Created .gitignore in ${this.storeDir}`);
|
|
20840
20841
|
} catch (error) {
|
|
@@ -21898,5 +21899,5 @@ export {
|
|
|
21898
21899
|
CLIS_CONFIG
|
|
21899
21900
|
};
|
|
21900
21901
|
|
|
21901
|
-
//# debugId=
|
|
21902
|
+
//# debugId=F8ADD6A538CD260C64756E2164756E21
|
|
21902
21903
|
//# sourceMappingURL=index.js.map
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "agent-yes",
|
|
3
|
-
"version": "1.42.
|
|
3
|
+
"version": "1.42.1",
|
|
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",
|
|
@@ -77,6 +77,7 @@
|
|
|
77
77
|
},
|
|
78
78
|
"dependencies": {
|
|
79
79
|
"@snomiao/bun-pty": "^0.3.4",
|
|
80
|
+
"better-sqlite3": "^12.1.0",
|
|
80
81
|
"bun-pty": "^0.4.8",
|
|
81
82
|
"from-node-stream": "^0.1.2"
|
|
82
83
|
},
|
package/ts/cli.ts
CHANGED
|
@@ -24,20 +24,20 @@ if (config.appendPrompt) {
|
|
|
24
24
|
const { connect } = await import("net");
|
|
25
25
|
await new Promise<void>((resolve, reject) => {
|
|
26
26
|
const client = connect(ipcPath);
|
|
27
|
-
client.on(
|
|
27
|
+
client.on("connect", () => {
|
|
28
28
|
client.write(config.appendPrompt + "\r");
|
|
29
29
|
client.end();
|
|
30
30
|
console.log(`Sent prompt to Windows named pipe: ${ipcPath}`);
|
|
31
31
|
resolve();
|
|
32
32
|
});
|
|
33
|
-
client.on(
|
|
33
|
+
client.on("error", (error) => {
|
|
34
34
|
console.error(`Failed to connect to named pipe: ${error}`);
|
|
35
35
|
reject(error);
|
|
36
36
|
});
|
|
37
37
|
// Timeout after 5 seconds
|
|
38
38
|
setTimeout(() => {
|
|
39
39
|
client.destroy();
|
|
40
|
-
reject(new Error(
|
|
40
|
+
reject(new Error("Connection timeout"));
|
|
41
41
|
}, 5000);
|
|
42
42
|
});
|
|
43
43
|
} else {
|
package/ts/parseCliArgs.spec.ts
CHANGED
|
@@ -230,12 +230,7 @@ describe("CLI argument parsing", () => {
|
|
|
230
230
|
});
|
|
231
231
|
|
|
232
232
|
it("should parse ay -- hello command (ay is wrapper, so CLI is undefined)", () => {
|
|
233
|
-
const result = parseCliArgs([
|
|
234
|
-
"node",
|
|
235
|
-
"/path/to/ay",
|
|
236
|
-
"--",
|
|
237
|
-
"hello",
|
|
238
|
-
]);
|
|
233
|
+
const result = parseCliArgs(["node", "/path/to/ay", "--", "hello"]);
|
|
239
234
|
|
|
240
235
|
// "ay" is a wrapper script like "agent-yes", so cliName is stripped to undefined
|
|
241
236
|
// cli.ts will default this to "claude" at runtime
|
package/ts/parseCliArgs.ts
CHANGED
|
@@ -190,7 +190,9 @@ export function parseCliArgs(argv: string[]) {
|
|
|
190
190
|
env: process.env as Record<string, string>,
|
|
191
191
|
cli: (cliName ||
|
|
192
192
|
parsedArgv.cli ||
|
|
193
|
-
(dashIndex !== 0
|
|
193
|
+
(dashIndex !== 0
|
|
194
|
+
? parsedArgv._[0]?.toString()?.replace?.(/-yes$/, "")
|
|
195
|
+
: undefined)) as (typeof SUPPORTED_CLIS)[number],
|
|
194
196
|
cliArgs: cliArgsForSpawn,
|
|
195
197
|
prompt: [parsedArgv.prompt, dashPrompt].filter(Boolean).join(" ") || undefined,
|
|
196
198
|
install: parsedArgv.install,
|
package/ts/pidStore.ts
CHANGED
|
@@ -217,6 +217,8 @@ fifo/
|
|
|
217
217
|
`;
|
|
218
218
|
|
|
219
219
|
try {
|
|
220
|
+
// Ensure parent directory exists before writing .gitignore
|
|
221
|
+
await mkdir(this.storeDir, { recursive: true });
|
|
220
222
|
await writeFile(gitignorePath, gitignoreContent, { flag: "wx" }); // wx = create only if doesn't exist
|
|
221
223
|
logger.debug(`[pidStore] Created .gitignore in ${this.storeDir}`);
|
|
222
224
|
} catch (error: any) {
|