diff options
Diffstat (limited to 'internal/cli/create.go')
| -rw-r--r-- | internal/cli/create.go | 13 |
1 files changed, 8 insertions, 5 deletions
diff --git a/internal/cli/create.go b/internal/cli/create.go index addd034..e5435d3 100644 --- a/internal/cli/create.go +++ b/internal/cli/create.go @@ -15,6 +15,7 @@ func newCreateCmd() *cobra.Command { instructions string workingDir string model string + agentType string parentID string budget float64 timeout string @@ -27,14 +28,15 @@ func newCreateCmd() *cobra.Command { Short: "Create a task via the running server", Args: cobra.ExactArgs(1), RunE: func(cmd *cobra.Command, args []string) error { - return createTask(serverURL, args[0], instructions, workingDir, model, parentID, budget, timeout, priority, autoStart) + return createTask(serverURL, args[0], instructions, workingDir, model, agentType, parentID, budget, timeout, priority, autoStart) }, } - cmd.Flags().StringVar(&serverURL, "server", "http://localhost:8484", "claudomator server URL") + cmd.Flags().StringVar(&serverURL, "server", defaultServerURL, "claudomator server URL") cmd.Flags().StringVarP(&instructions, "instructions", "i", "", "task instructions (required)") cmd.Flags().StringVarP(&workingDir, "working-dir", "d", "", "working directory for the task") - cmd.Flags().StringVarP(&model, "model", "m", "", "claude model to use") + cmd.Flags().StringVarP(&model, "model", "m", "", "model to use") + cmd.Flags().StringVar(&agentType, "agent-type", "claude", "agent type: claude, gemini") cmd.Flags().StringVar(&parentID, "parent-id", "", "parent task ID (makes this a subtask)") cmd.Flags().Float64Var(&budget, "budget", 1.0, "max budget in USD") cmd.Flags().StringVar(&timeout, "timeout", "15m", "task timeout") @@ -45,12 +47,13 @@ func newCreateCmd() *cobra.Command { return cmd } -func createTask(serverURL, name, instructions, workingDir, model, parentID string, budget float64, timeout, priority string, autoStart bool) error { +func createTask(serverURL, name, instructions, workingDir, model, agentType, parentID string, budget float64, timeout, priority string, autoStart bool) error { body := map[string]interface{}{ "name": name, "timeout": timeout, "priority": priority, - "claude": map[string]interface{}{ + "agent": map[string]interface{}{ + "type": agentType, "instructions": instructions, "project_dir": workingDir, "model": model, |
