Overview
PipelineConfig defines all parameters needed to execute a Magpie pipeline. Each adapter (CLI, Discord, Teams) builds a config from environment variables and passes it to run_pipeline().
Defined in crates/magpie-core/src/pipeline.rs:26-48.
Struct Definition
Fields
Directory containing the target repository. Used directly when
github_org is None. When github_org is set, this serves as a fallback for dry-run mode.Default: . (current directory)The main branch to branch from and merge PRs into (e.g.
main, master, develop).Default: "main"Shell command to run tests. Used in CI loops and blueprint test phases.Default:
"cargo test"Example: "npm test", "pytest", "cargo test --workspace"Shell command to run linter. Executed after tests in CI phase.Default:
"cargo clippy"Example: "eslint .", "cargo clippy -- -D warnings"Maximum number of CI retry rounds. Each round runs lint + test, and on failure, the agent gets another chance to fix issues.Default:
2Note: For TDD/Diagnostic blueprints, the first test+lint runs inside the blueprint. If those pass, the CI loop is skipped entirely.Optional Plane.so integration config. When set, Magpie creates issues and updates them with PR links.Default:
NoneWhen
true, agent steps are replaced with shell echo stubs. Useful for testing pipeline orchestration without running the full LLM.Default: falseGitHub organization to restrict repo access to. When set:
- Pipeline parses the repo name from the task message (e.g. “in magpie-core” →
<org>/magpie-core) - Validates the repo belongs to this org
- Clones the repo into a fresh sandbox
None, repo_dir is used directly (static single-repo mode).Default: NoneExample: "anomalyco", "my-company"Directory for JSONL trace files. When set, all agent calls (both Tier 1
claude_call() and Tier 2 MagpieAgent) write structured logs.Default: NoneUsage: CLI --trace flag sets this to a timestamped directory.When set, pipeline runs execute inside a Daytona sandbox (remote environment). If
None, commands execute locally.Default: NoneFeature: Requires daytona feature flagWarm sandbox pool. When set, the pipeline tries to acquire a pre-built sandbox before falling back to cold creation.Default:
NoneFeature: Only available with daytona feature flagNote: This is an optimization for faster startup times in multi-repo environments.Default Configuration
Usage Example
CLI Adapter (Single Repo)
Discord Bot (Multi-Repo)
Testing with Dry Run
Notes
- Thread Safety: Config is
Cloneand can be shared across threads. Thepoolfield usesArcfor shared ownership. - Validation: The pipeline validates
github_orgconstraints at runtime and returnsPipelineStatus::SetupFailedif repo parsing fails. - CI Optimization: TDD and Diagnostic blueprints run tests internally. If those pass,
max_ci_roundsis effectively skipped (starts at round N+1).
See Also
- PipelineResult — Return value of
run_pipeline() - TaskComplexity — Classification that determines blueprint selection
- Blueprint — Orchestration structure executed by the pipeline