Skip to content

feat: add command step type execution to workflows#526

Merged
ereslibre merged 7 commits intomainfrom
rover/task-3-U0DoXGvSlzN0
Feb 24, 2026
Merged

feat: add command step type execution to workflows#526
ereslibre merged 7 commits intomainfrom
rover/task-3-U0DoXGvSlzN0

Conversation

@ereslibre
Copy link
Copy Markdown
Collaborator

@ereslibre ereslibre commented Feb 19, 2026

Add support for command step type in workflow execution, allowing workflows to run shell commands directly alongside AI agent steps. This enables mixed workflows where deterministic tasks (builds, linting, tests) execute as subprocesses while AI-driven tasks are dispatched to agent runners.

The step execution logic has been refactored from the run command into WorkflowManager.run(), centralizing the orchestration of both step types. Command steps capture stdout/stderr as step outputs and support allow_failure to continue execution on non-zero exit codes.

Changes

  • Enabled WorkflowStepSchema as a discriminated union of agent and command step types, replacing the previous agent-only schema
  • Added isCommandStep type guard and exported it from rover-schemas
  • Added allow_failure field to WorkflowCommandStepSchema for fault-tolerant command steps
  • Introduced WorkflowManager.run() method that orchestrates step execution: command steps run via launchSync, agent steps are delegated to a caller-provided AgentStepExecutor callback
  • Extracted StepResult, AgentStepExecutor, OnStepComplete, and WorkflowRunResult types into rover-core as shared interfaces
  • Refactored RunnerStepResult and ACPRunnerStepResult to extend the shared StepResult interface
  • Simplified the run command by removing duplicated step-loop logic for ACP and standard modes, replacing it with a single agentStepExecutor callback passed to WorkflowManager.run()
  • Added unit tests for command step schema validation, type guards, and WorkflowManager.run() covering command execution, agent delegation, continueOnError, allow_failure, output accumulation, and step completion callbacks
  • Added E2E tests for workflow creation/inspection with command steps, allow_failure, and mixed step types
  • Added command step execution feature documentation to E2E_TESTS.md
  • Added process execution guidelines to AGENTS.md

Notes

Context injection (handleContextInjection) now only applies to agent steps via the isAgentStep guard, since command steps do not have prompts.

Closes: #524

Co-Authored-By: Rover <noreply@endor.dev>
@ereslibre ereslibre changed the title Enable command step type in command execution feat: add command step type execution to workflows Feb 20, 2026
@ereslibre ereslibre marked this pull request as ready for review February 20, 2026 09:29
@ereslibre
Copy link
Copy Markdown
Collaborator Author

To be merged when this gets released: endorhq/docs#39

@ereslibre ereslibre added this to the v2.2 milestone Feb 20, 2026
@Angelmmiguel Angelmmiguel modified the milestones: v2.2, v2.3 Feb 20, 2026
Copy link
Copy Markdown
Contributor

@Angelmmiguel Angelmmiguel left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM! Nice job and refactor 😄

- **Node version**: Requires Node.js 20+ and pnpm 10+ (see root package.json engines)
- **Monorepo**: Uses pnpm workspaces for package management

### Process Execution
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice!

@ereslibre ereslibre merged commit 157e183 into main Feb 24, 2026
6 checks passed
@ereslibre ereslibre deleted the rover/task-3-U0DoXGvSlzN0 branch February 24, 2026 07:54
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Enable the command step type in workflows

2 participants