Skip to main content

Crate ironflow_core

Crate ironflow_core 

Source
Expand description

§ironflow-core

Core building blocks for the ironflow workflow engine. This crate provides composable, async operations that can be chained via plain Rust variables to build headless CI/CD, DevOps, and AI-powered workflows.

§Operations

OperationDescription
ShellExecute a shell command with timeout, env control, and kill_on_drop.
AgentInvoke an AI agent (Claude Code by default) with structured output support.
HttpPerform HTTP requests via reqwest with builder-pattern ergonomics.

§Provider trait

The AgentProvider trait abstracts the AI backend. The built-in ClaudeCodeProvider shells out to the claude CLI; swap it for RecordReplayProvider in tests for deterministic, zero-cost replay.

§Quick start

use ironflow_core::prelude::*;

let files = Shell::new("ls -la").await?;

let provider = ClaudeCodeProvider::new();
let review = Agent::new()
    .prompt(&format!("Summarise:\n{}", files.stdout()))
    .model(Model::HAIKU)
    .max_budget_usd(0.10)
    .run(&provider)
    .await?;

println!("{}", review.text());

Modules§

dry_run
Global dry-run mode control.
error
Error types for ironflow operations.
metric_names
Centralised metric name constants for Prometheus instrumentation.
operations
Workflow operations (shell commands, agent calls, HTTP requests).
parallel
Parallel step execution utilities.
prelude
Re-exports of the most commonly used types.
provider
Provider trait and configuration types for agent invocations.
providers
Built-in AgentProvider implementations.
retry
Retry policy for transient failures with exponential backoff.
tracker
Workflow-level cost, token, and duration tracking.
utils
Utility functions for output handling and OOM protection.