Skip to content

Comments

feat(workflows): add pipeline step type for in-process command execution#14

Open
sfo2001 wants to merge 2 commits intoopenclaw:mainfrom
sfo2001:feat/pipeline-step-type
Open

feat(workflows): add pipeline step type for in-process command execution#14
sfo2001 wants to merge 2 commits intoopenclaw:mainfrom
sfo2001:feat/pipeline-step-type

Conversation

@sfo2001
Copy link

@sfo2001 sfo2001 commented Feb 15, 2026

Motivation

Workflow steps currently execute via /bin/sh, so using lobster's stdlib commands (map, sort, jq-filter, each) from a workflow requires spawning a separate lobster process. The pipeline step type runs commands in-process through the existing registry, avoiding the shell round-trip and making stdlib commands first-class citizens in workflow definitions.

Summary

  • Workflow steps can now use pipeline: "command | chain" instead of command: "shell string"
  • Pipeline steps run in-process via the command registry (no shell spawn), enabling use of stdlib commands like map, sort, each directly in workflow YAML
  • Exactly one of command or pipeline is required per step; validation rejects both or neither
  • cwd is not supported for pipeline steps (raises clear error)
  • Passes registry through RunContext from CLI to workflow runner

Changes

Category Files
Workflow runner src/workflows/file.ts (+runPipelineStep, stdinToStream, validation)
CLI src/cli.ts (pass registry into workflow run context)
Registry src/commands/registry.ts (export Registry interface)
Tests test/workflow_pipeline_step.test.ts (268 lines)

+366 / -9 lines across 4 files.

Test plan

  • pnpm build passes
  • pnpm lint passes
  • node --test dist/test/workflow_pipeline_step.test.js
  • Existing workflow tests still pass (backward-compatible, command steps unchanged)

Use of AI

sfo2001 and others added 2 commits February 15, 2026 11:29
Dead code left over from the clawd-only refactor in 5679042.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Workflow steps can now use `pipeline:` instead of `command:` to execute
lobster pipeline expressions in-process via the registry, avoiding the
overhead and context loss of shell-spawned bin wrappers.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
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.

1 participant