claude-yes 1.35.0 → 1.35.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 CHANGED
@@ -21027,7 +21027,10 @@ function getDefaultConfig() {
21027
21027
  },
21028
21028
  amp: {
21029
21029
  help: "",
21030
- install: "npm i -g @sourcegraph/amp"
21030
+ install: "npm i -g @sourcegraph/amp",
21031
+ enter: [
21032
+ /^.{0,4} Approve /
21033
+ ]
21031
21034
  }
21032
21035
  }
21033
21036
  });
@@ -27844,7 +27847,7 @@ var package_default = {
27844
27847
 
27845
27848
  // ts/parseCliArgs.ts
27846
27849
  function parseCliArgs(argv) {
27847
- const cliName = argv[1]?.split(/[/\\]/).at(-1)?.replace(/(\.[jt]s)?$/, "").replace(/^(cli|agent)(-yes$)?/, "").replace(/-yes$/, "") || undefined;
27850
+ const cliName = argv[1]?.split(/[/\\]/).at(-1)?.replace(/(\.[jt]s)?$/, "").replace(/^(cli|agent)(-yes$)?/, "").replace(/^ay$/, "").replace(/-yes$/, "") || undefined;
27848
27851
  const parsedArgv = yargs_default(hideBin(argv)).usage("Usage: $0 [cli] [agent-yes args] [agent-cli args] [--] [prompts...]").example("$0 claude --idle=30s -- solve all todos in my codebase, commit one by one", "Run Claude with a 30 seconds idle timeout, and the prompt is everything after `--`").option("robust", {
27849
27852
  type: "boolean",
27850
27853
  default: true,
@@ -27958,7 +27961,7 @@ function parseCliArgs(argv) {
27958
27961
  return {
27959
27962
  cwd: process.cwd(),
27960
27963
  env: process.env,
27961
- cli: cliName || parsedArgv.cli || parsedArgv._[0]?.toString()?.replace?.(/-yes$/, ""),
27964
+ cli: cliName || parsedArgv.cli || (dashIndex !== 0 ? parsedArgv._[0]?.toString()?.replace?.(/-yes$/, "") : undefined),
27962
27965
  cliArgs: cliArgsForSpawn,
27963
27966
  prompt: [parsedArgv.prompt, dashPrompt].filter(Boolean).join(" ") || undefined,
27964
27967
  install: parsedArgv.install,
@@ -28187,5 +28190,5 @@ var { exitCode } = await cliYes(config3);
28187
28190
  console.log("exiting process");
28188
28191
  process.exit(exitCode ?? 1);
28189
28192
 
28190
- //# debugId=C4007A87ED18C3B264756E2164756E21
28193
+ //# debugId=624A56792A6F741964756E2164756E21
28191
28194
  //# sourceMappingURL=cli.js.map
package/dist/index.js CHANGED
@@ -21025,7 +21025,10 @@ function getDefaultConfig() {
21025
21025
  },
21026
21026
  amp: {
21027
21027
  help: "",
21028
- install: "npm i -g @sourcegraph/amp"
21028
+ install: "npm i -g @sourcegraph/amp",
21029
+ enter: [
21030
+ /^.{0,4} Approve /
21031
+ ]
21029
21032
  }
21030
21033
  }
21031
21034
  });
@@ -21722,5 +21725,5 @@ export {
21722
21725
  CLIS_CONFIG
21723
21726
  };
21724
21727
 
21725
- //# debugId=9A92FE5B1254037264756E2164756E21
21728
+ //# debugId=41F67CAFCE0253CB64756E2164756E21
21726
21729
  //# sourceMappingURL=index.js.map
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "claude-yes",
3
- "version": "1.35.0",
3
+ "version": "1.35.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",
@@ -228,4 +228,21 @@ describe("CLI argument parsing", () => {
228
228
  expect(result.cli).toBe("codex");
229
229
  expect(result.prompt).toBe("Implement feature");
230
230
  });
231
+
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
+ ]);
239
+
240
+ // "ay" is a wrapper script like "agent-yes", so cliName is stripped to undefined
241
+ // cli.ts will default this to "claude" at runtime
242
+ expect(result.cli).toBeUndefined();
243
+ expect(result.cliArgs).toEqual([]);
244
+ expect(result.prompt).toBe("hello");
245
+ expect(result.verbose).toBe(false);
246
+ expect(result.robust).toBe(true);
247
+ });
231
248
  });
@@ -17,6 +17,7 @@ export function parseCliArgs(argv: string[]) {
17
17
  .at(-1)
18
18
  ?.replace(/(\.[jt]s)?$/, "")
19
19
  .replace(/^(cli|agent)(-yes$)?/, "")
20
+ .replace(/^ay$/, "") // treat standalone "ay" same as "agent-yes"
20
21
  .replace(/-yes$/, "") || undefined;
21
22
 
22
23
  // Parse args with yargs (same logic as cli.ts:16-73)
@@ -174,7 +175,7 @@ export function parseCliArgs(argv: string[]) {
174
175
  env: process.env as Record<string, string>,
175
176
  cli: (cliName ||
176
177
  parsedArgv.cli ||
177
- parsedArgv._[0]?.toString()?.replace?.(/-yes$/, "")) as (typeof SUPPORTED_CLIS)[number],
178
+ (dashIndex !== 0 ? parsedArgv._[0]?.toString()?.replace?.(/-yes$/, "") : undefined)) as (typeof SUPPORTED_CLIS)[number],
178
179
  cliArgs: cliArgsForSpawn,
179
180
  prompt: [parsedArgv.prompt, dashPrompt].filter(Boolean).join(" ") || undefined,
180
181
  install: parsedArgv.install,