automata-cli 0.1.0-008-test-command.62 → 0.1.0-008-test-command.64

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.
Files changed (2) hide show
  1. package/dist/index.js +18 -14
  2. package/package.json +1 -1
package/dist/index.js CHANGED
@@ -947,6 +947,20 @@ function resolveCommand(name) {
947
947
  }
948
948
  return name;
949
949
  }
950
+ var MODEL_IDS = {
951
+ opus: "claude-opus-4-6",
952
+ sonnet: "claude-sonnet-4-6",
953
+ haiku: "claude-haiku-4-5-20251001"
954
+ };
955
+ function resolveModelOption(opts) {
956
+ const selected = ["opus", "sonnet", "haiku"].filter((m) => opts[m]);
957
+ if (selected.length > 1) {
958
+ process.stderr.write(`Error: --${selected[0]} and --${selected[1]} are mutually exclusive.
959
+ `);
960
+ process.exit(1);
961
+ }
962
+ return selected.length === 1 ? MODEL_IDS[selected[0]] : void 0;
963
+ }
950
964
  function invokeClaudeCode(prompt, options = {}) {
951
965
  if (options.verbose) {
952
966
  return invokeClaudeCodeVerbose(prompt, options.yolo ?? false, options.model);
@@ -1076,7 +1090,7 @@ function handleExitCode(status) {
1076
1090
  }
1077
1091
 
1078
1092
  // src/commands/getReady.ts
1079
- var implementNextCommand = new Command3("implement-next").description("Find the next open GitHub issue matching the configured filter, claim it, and invoke Claude Code").option("--json", "Output issue details as JSON").option("--no-claude", "Skip Claude Code invocation after claiming the issue").option("--query-only", "Print issue content and exit without claiming or invoking Claude").option("--yolo", "Launch Claude Code with --dangerously-skip-permissions").action((options) => {
1093
+ var implementNextCommand = new Command3("implement-next").description("Find the next open GitHub issue matching the configured filter, claim it, and invoke Claude Code").option("--json", "Output issue details as JSON").option("--no-claude", "Skip Claude Code invocation after claiming the issue").option("--query-only", "Print issue content and exit without claiming or invoking Claude").option("--yolo", "Launch Claude Code with --dangerously-skip-permissions").option("--verbose", "Show step-by-step progress summary and final result").option("--opus", "Use claude-opus-4-6").option("--sonnet", "Use claude-sonnet-4-6").option("--haiku", "Use claude-haiku-4-5-20251001").action(async (options) => {
1080
1094
  const config = readConfig();
1081
1095
  if (config.remoteType !== "gh") {
1082
1096
  process.stderr.write(
@@ -1132,25 +1146,15 @@ ${issue.body}
1132
1146
  const prompt = config.claudeSystemPrompt ? `${config.claudeSystemPrompt}
1133
1147
 
1134
1148
  ${issue.body}` : issue.body;
1135
- invokeClaudeCode(prompt, { yolo: options.yolo });
1149
+ const model = resolveModelOption(options);
1150
+ await invokeClaudeCode(prompt, { yolo: options.yolo, verbose: options.verbose, model });
1136
1151
  }
1137
1152
  });
1138
1153
 
1139
1154
  // src/commands/test.ts
1140
1155
  import { Command as Command4 } from "commander";
1141
- var MODEL_IDS = {
1142
- opus: "claude-opus-4-6",
1143
- sonnet: "claude-sonnet-4-6",
1144
- haiku: "claude-haiku-4-5-20251001"
1145
- };
1146
1156
  var testClaudeCmd = new Command4("claude").description("Test Claude Code invocation with a user-supplied prompt").requiredOption("--prompt <string>", "Prompt to send to Claude Code").option("--yolo", "Launch Claude Code with --dangerously-skip-permissions").option("--verbose", "Show step-by-step progress summary and final result").option("--opus", "Use claude-opus-4-6").option("--sonnet", "Use claude-sonnet-4-6").option("--haiku", "Use claude-haiku-4-5-20251001").action(async (options) => {
1147
- const selected = ["opus", "sonnet", "haiku"].filter((m) => options[m]);
1148
- if (selected.length > 1) {
1149
- process.stderr.write(`Error: --${selected[0]} and --${selected[1]} are mutually exclusive.
1150
- `);
1151
- process.exit(1);
1152
- }
1153
- const model = selected.length === 1 ? MODEL_IDS[selected[0]] : void 0;
1157
+ const model = resolveModelOption(options);
1154
1158
  await invokeClaudeCode(options.prompt, { yolo: options.yolo, verbose: options.verbose, model });
1155
1159
  });
1156
1160
  var testCommand = new Command4("test").description("Test commands for verifying automata integrations").addCommand(testClaudeCmd);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "automata-cli",
3
- "version": "0.1.0-008-test-command.62",
3
+ "version": "0.1.0-008-test-command.64",
4
4
  "description": "Automata CLI tool",
5
5
  "type": "module",
6
6
  "bin": {