From d5976820d5bc67f5303966cb465b9122663cf1fe Mon Sep 17 00:00:00 2001 From: Bryan Helmkamp Date: Mon, 30 Mar 2026 12:27:40 -0400 Subject: [PATCH] Rename fabro-workflows crate to fabro-workflow Co-Authored-By: Claude Opus 4.6 (1M context) --- .claude/skills/docs/references/mapping.md | 32 ++-- .config/nextest.toml | 2 +- AGENTS.md | 8 +- Cargo.lock | 8 +- bin/ops/generate-jwt-keys.sh | 2 +- docs-internal/events-strategy.md | 2 +- docs-internal/logging-strategy.md | 2 +- lib/crates/fabro-cli/Cargo.toml | 2 +- lib/crates/fabro-cli/src/commands/asset/cp.rs | 4 +- .../fabro-cli/src/commands/asset/list.rs | 4 +- lib/crates/fabro-cli/src/commands/graph.rs | 2 +- lib/crates/fabro-cli/src/commands/pr/close.rs | 2 +- .../fabro-cli/src/commands/pr/create.rs | 8 +- lib/crates/fabro-cli/src/commands/pr/list.rs | 4 +- lib/crates/fabro-cli/src/commands/pr/merge.rs | 2 +- lib/crates/fabro-cli/src/commands/pr/mod.rs | 4 +- lib/crates/fabro-cli/src/commands/pr/view.rs | 2 +- .../fabro-cli/src/commands/preflight.rs | 4 +- .../fabro-cli/src/commands/run/attach.rs | 12 +- lib/crates/fabro-cli/src/commands/run/cp.rs | 2 +- .../fabro-cli/src/commands/run/create.rs | 4 +- .../fabro-cli/src/commands/run/detached.rs | 8 +- lib/crates/fabro-cli/src/commands/run/diff.rs | 6 +- lib/crates/fabro-cli/src/commands/run/fork.rs | 2 +- .../fabro-cli/src/commands/run/launcher.rs | 4 +- lib/crates/fabro-cli/src/commands/run/logs.rs | 2 +- lib/crates/fabro-cli/src/commands/run/mod.rs | 2 +- .../fabro-cli/src/commands/run/output.rs | 10 +- .../fabro-cli/src/commands/run/preview.rs | 2 +- .../fabro-cli/src/commands/run/resume.rs | 4 +- .../fabro-cli/src/commands/run/rewind.rs | 2 +- .../src/commands/run/run_progress.rs | 6 +- lib/crates/fabro-cli/src/commands/run/ssh.rs | 2 +- .../fabro-cli/src/commands/run/start.rs | 2 +- lib/crates/fabro-cli/src/commands/run/wait.rs | 10 +- .../fabro-cli/src/commands/runs/inspect.rs | 8 +- .../fabro-cli/src/commands/runs/list.rs | 4 +- lib/crates/fabro-cli/src/commands/runs/rm.rs | 4 +- .../fabro-cli/src/commands/store/dump.rs | 2 +- .../fabro-cli/src/commands/system/df.rs | 4 +- .../fabro-cli/src/commands/system/prune.rs | 2 +- lib/crates/fabro-cli/src/commands/validate.rs | 2 +- lib/crates/fabro-core/src/executor.rs | 2 +- lib/crates/fabro-core/src/test_fixtures.rs | 2 +- lib/crates/fabro-server/Cargo.toml | 2 +- lib/crates/fabro-server/src/server.rs | 28 +-- lib/crates/fabro-server/tests/it/api.rs | 10 +- lib/crates/fabro-slack/Cargo.toml | 2 +- .../Cargo.toml | 2 +- .../README.md | 8 +- .../src/artifact.rs | 0 .../src/asset_snapshot.rs | 0 .../src/assets.rs | 0 .../src/condition.rs | 0 .../src/context.rs | 0 .../src/devcontainer_bridge.rs | 0 .../src/error.rs | 0 .../src/event.rs | 0 .../src/git.rs | 0 .../src/graph.rs | 0 .../src/graph/routing.rs | 0 .../src/handler/agent.rs | 0 .../src/handler/command.rs | 0 .../src/handler/conditional.rs | 0 .../src/handler/exit.rs | 0 .../src/handler/fan_in.rs | 0 .../src/handler/human.rs | 0 .../src/handler/llm/api.rs | 0 .../src/handler/llm/cli.rs | 0 .../src/handler/llm/mod.rs | 0 .../src/handler/llm/preamble.rs | 0 .../src/handler/manager_loop.rs | 0 .../src/handler/mod.rs | 0 .../src/handler/parallel.rs | 0 .../src/handler/prompt.rs | 0 .../src/handler/start.rs | 0 .../src/handler/wait.rs | 0 .../src/hook_context.rs | 0 .../src/lib.rs | 2 +- .../src/lifecycle/artifact.rs | 0 .../src/lifecycle/auto_status.rs | 0 .../src/lifecycle/circuit_breaker.rs | 0 .../src/lifecycle/disk.rs | 0 .../src/lifecycle/event.rs | 0 .../src/lifecycle/fidelity.rs | 0 .../src/lifecycle/git.rs | 0 .../src/lifecycle/hook.rs | 0 .../src/lifecycle/mod.rs | 0 .../src/node_handler.rs | 2 +- .../src/operations/create.rs | 0 .../src/operations/fork.rs | 0 .../src/operations/hydrate.rs | 0 .../src/operations/mod.rs | 0 .../src/operations/rebuild_meta.rs | 0 .../src/operations/resume.rs | 0 .../src/operations/rewind.rs | 0 .../src/operations/source.rs | 0 .../src/operations/start.rs | 0 .../src/operations/test_support.rs | 0 .../src/operations/validate.rs | 0 .../src/outcome.rs | 0 .../src/pipeline/execute.rs | 0 .../src/pipeline/execute/tests.rs | 0 .../src/pipeline/finalize.rs | 0 .../src/pipeline/initialize.rs | 0 .../src/pipeline/mod.rs | 0 .../src/pipeline/parse.rs | 0 .../src/pipeline/persist.rs | 0 .../src/pipeline/pull_request.rs | 0 .../src/pipeline/retro.rs | 0 .../src/pipeline/transform.rs | 0 .../src/pipeline/types.rs | 0 .../src/pipeline/validate.rs | 0 .../src/pull_request.rs | 0 .../src/records/checkpoint.rs | 0 .../src/records/conclusion.rs | 0 .../src/records/mod.rs | 0 .../src/records/run.rs | 0 .../src/records/start.rs | 0 .../src/retry.rs | 0 .../src/run_dir.rs | 0 .../src/run_lookup.rs | 0 .../src/run_options.rs | 0 .../src/run_status.rs | 0 .../src/sandbox_git.rs | 0 .../src/test_support.rs | 0 .../src/transforms/file_inlining.rs | 0 .../src/transforms/import.rs | 0 .../src/transforms/mod.rs | 0 .../src/transforms/model_resolution.rs | 0 .../src/transforms/preamble.rs | 0 .../src/transforms/stylesheet.rs | 0 .../src/transforms/stylesheet_application.rs | 0 .../src/transforms/variable_expansion.rs | 0 .../tests/it/attractor_compat.rs | 0 .../tests/it/cp_integration.rs | 0 .../tests/it/daytona_integration.rs | 44 ++--- .../tests/it/integration.rs | 171 +++++++++--------- .../tests/it/main.rs | 0 plan.md | 2 +- 140 files changed, 238 insertions(+), 239 deletions(-) rename lib/crates/{fabro-workflows => fabro-workflow}/Cargo.toml (98%) rename lib/crates/{fabro-workflows => fabro-workflow}/README.md (97%) rename lib/crates/{fabro-workflows => fabro-workflow}/src/artifact.rs (100%) rename lib/crates/{fabro-workflows => fabro-workflow}/src/asset_snapshot.rs (100%) rename lib/crates/{fabro-workflows => fabro-workflow}/src/assets.rs (100%) rename lib/crates/{fabro-workflows => fabro-workflow}/src/condition.rs (100%) rename lib/crates/{fabro-workflows => fabro-workflow}/src/context.rs (100%) rename lib/crates/{fabro-workflows => fabro-workflow}/src/devcontainer_bridge.rs (100%) rename lib/crates/{fabro-workflows => fabro-workflow}/src/error.rs (100%) rename lib/crates/{fabro-workflows => fabro-workflow}/src/event.rs (100%) rename lib/crates/{fabro-workflows => fabro-workflow}/src/git.rs (100%) rename lib/crates/{fabro-workflows => fabro-workflow}/src/graph.rs (100%) rename lib/crates/{fabro-workflows => fabro-workflow}/src/graph/routing.rs (100%) rename lib/crates/{fabro-workflows => fabro-workflow}/src/handler/agent.rs (100%) rename lib/crates/{fabro-workflows => fabro-workflow}/src/handler/command.rs (100%) rename lib/crates/{fabro-workflows => fabro-workflow}/src/handler/conditional.rs (100%) rename lib/crates/{fabro-workflows => fabro-workflow}/src/handler/exit.rs (100%) rename lib/crates/{fabro-workflows => fabro-workflow}/src/handler/fan_in.rs (100%) rename lib/crates/{fabro-workflows => fabro-workflow}/src/handler/human.rs (100%) rename lib/crates/{fabro-workflows => fabro-workflow}/src/handler/llm/api.rs (100%) rename lib/crates/{fabro-workflows => fabro-workflow}/src/handler/llm/cli.rs (100%) rename lib/crates/{fabro-workflows => fabro-workflow}/src/handler/llm/mod.rs (100%) rename lib/crates/{fabro-workflows => fabro-workflow}/src/handler/llm/preamble.rs (100%) rename lib/crates/{fabro-workflows => fabro-workflow}/src/handler/manager_loop.rs (100%) rename lib/crates/{fabro-workflows => fabro-workflow}/src/handler/mod.rs (100%) rename lib/crates/{fabro-workflows => fabro-workflow}/src/handler/parallel.rs (100%) rename lib/crates/{fabro-workflows => fabro-workflow}/src/handler/prompt.rs (100%) rename lib/crates/{fabro-workflows => fabro-workflow}/src/handler/start.rs (100%) rename lib/crates/{fabro-workflows => fabro-workflow}/src/handler/wait.rs (100%) rename lib/crates/{fabro-workflows => fabro-workflow}/src/hook_context.rs (100%) rename lib/crates/{fabro-workflows => fabro-workflow}/src/lib.rs (98%) rename lib/crates/{fabro-workflows => fabro-workflow}/src/lifecycle/artifact.rs (100%) rename lib/crates/{fabro-workflows => fabro-workflow}/src/lifecycle/auto_status.rs (100%) rename lib/crates/{fabro-workflows => fabro-workflow}/src/lifecycle/circuit_breaker.rs (100%) rename lib/crates/{fabro-workflows => fabro-workflow}/src/lifecycle/disk.rs (100%) rename lib/crates/{fabro-workflows => fabro-workflow}/src/lifecycle/event.rs (100%) rename lib/crates/{fabro-workflows => fabro-workflow}/src/lifecycle/fidelity.rs (100%) rename lib/crates/{fabro-workflows => fabro-workflow}/src/lifecycle/git.rs (100%) rename lib/crates/{fabro-workflows => fabro-workflow}/src/lifecycle/hook.rs (100%) rename lib/crates/{fabro-workflows => fabro-workflow}/src/lifecycle/mod.rs (100%) rename lib/crates/{fabro-workflows => fabro-workflow}/src/node_handler.rs (99%) rename lib/crates/{fabro-workflows => fabro-workflow}/src/operations/create.rs (100%) rename lib/crates/{fabro-workflows => fabro-workflow}/src/operations/fork.rs (100%) rename lib/crates/{fabro-workflows => fabro-workflow}/src/operations/hydrate.rs (100%) rename lib/crates/{fabro-workflows => fabro-workflow}/src/operations/mod.rs (100%) rename lib/crates/{fabro-workflows => fabro-workflow}/src/operations/rebuild_meta.rs (100%) rename lib/crates/{fabro-workflows => fabro-workflow}/src/operations/resume.rs (100%) rename lib/crates/{fabro-workflows => fabro-workflow}/src/operations/rewind.rs (100%) rename lib/crates/{fabro-workflows => fabro-workflow}/src/operations/source.rs (100%) rename lib/crates/{fabro-workflows => fabro-workflow}/src/operations/start.rs (100%) rename lib/crates/{fabro-workflows => fabro-workflow}/src/operations/test_support.rs (100%) rename lib/crates/{fabro-workflows => fabro-workflow}/src/operations/validate.rs (100%) rename lib/crates/{fabro-workflows => fabro-workflow}/src/outcome.rs (100%) rename lib/crates/{fabro-workflows => fabro-workflow}/src/pipeline/execute.rs (100%) rename lib/crates/{fabro-workflows => fabro-workflow}/src/pipeline/execute/tests.rs (100%) rename lib/crates/{fabro-workflows => fabro-workflow}/src/pipeline/finalize.rs (100%) rename lib/crates/{fabro-workflows => fabro-workflow}/src/pipeline/initialize.rs (100%) rename lib/crates/{fabro-workflows => fabro-workflow}/src/pipeline/mod.rs (100%) rename lib/crates/{fabro-workflows => fabro-workflow}/src/pipeline/parse.rs (100%) rename lib/crates/{fabro-workflows => fabro-workflow}/src/pipeline/persist.rs (100%) rename lib/crates/{fabro-workflows => fabro-workflow}/src/pipeline/pull_request.rs (100%) rename lib/crates/{fabro-workflows => fabro-workflow}/src/pipeline/retro.rs (100%) rename lib/crates/{fabro-workflows => fabro-workflow}/src/pipeline/transform.rs (100%) rename lib/crates/{fabro-workflows => fabro-workflow}/src/pipeline/types.rs (100%) rename lib/crates/{fabro-workflows => fabro-workflow}/src/pipeline/validate.rs (100%) rename lib/crates/{fabro-workflows => fabro-workflow}/src/pull_request.rs (100%) rename lib/crates/{fabro-workflows => fabro-workflow}/src/records/checkpoint.rs (100%) rename lib/crates/{fabro-workflows => fabro-workflow}/src/records/conclusion.rs (100%) rename lib/crates/{fabro-workflows => fabro-workflow}/src/records/mod.rs (100%) rename lib/crates/{fabro-workflows => fabro-workflow}/src/records/run.rs (100%) rename lib/crates/{fabro-workflows => fabro-workflow}/src/records/start.rs (100%) rename lib/crates/{fabro-workflows => fabro-workflow}/src/retry.rs (100%) rename lib/crates/{fabro-workflows => fabro-workflow}/src/run_dir.rs (100%) rename lib/crates/{fabro-workflows => fabro-workflow}/src/run_lookup.rs (100%) rename lib/crates/{fabro-workflows => fabro-workflow}/src/run_options.rs (100%) rename lib/crates/{fabro-workflows => fabro-workflow}/src/run_status.rs (100%) rename lib/crates/{fabro-workflows => fabro-workflow}/src/sandbox_git.rs (100%) rename lib/crates/{fabro-workflows => fabro-workflow}/src/test_support.rs (100%) rename lib/crates/{fabro-workflows => fabro-workflow}/src/transforms/file_inlining.rs (100%) rename lib/crates/{fabro-workflows => fabro-workflow}/src/transforms/import.rs (100%) rename lib/crates/{fabro-workflows => fabro-workflow}/src/transforms/mod.rs (100%) rename lib/crates/{fabro-workflows => fabro-workflow}/src/transforms/model_resolution.rs (100%) rename lib/crates/{fabro-workflows => fabro-workflow}/src/transforms/preamble.rs (100%) rename lib/crates/{fabro-workflows => fabro-workflow}/src/transforms/stylesheet.rs (100%) rename lib/crates/{fabro-workflows => fabro-workflow}/src/transforms/stylesheet_application.rs (100%) rename lib/crates/{fabro-workflows => fabro-workflow}/src/transforms/variable_expansion.rs (100%) rename lib/crates/{fabro-workflows => fabro-workflow}/tests/it/attractor_compat.rs (100%) rename lib/crates/{fabro-workflows => fabro-workflow}/tests/it/cp_integration.rs (100%) rename lib/crates/{fabro-workflows => fabro-workflow}/tests/it/daytona_integration.rs (98%) rename lib/crates/{fabro-workflows => fabro-workflow}/tests/it/integration.rs (98%) rename lib/crates/{fabro-workflows => fabro-workflow}/tests/it/main.rs (100%) diff --git a/.claude/skills/docs/references/mapping.md b/.claude/skills/docs/references/mapping.md index 7be7d1c18..5d15a1cc8 100644 --- a/.claude/skills/docs/references/mapping.md +++ b/.claude/skills/docs/references/mapping.md @@ -4,25 +4,25 @@ Which source files affect which doc pages. Use this as guidance — also apply j | Source | Docs | |--------|------| -| `lib/crates/fabro-cli/src/main.rs`, `lib/crates/fabro-workflows/src/cli/mod.rs`, `lib/crates/fabro-workflows/src/cli/run.rs` | `docs/reference/cli.mdx` | +| `lib/crates/fabro-cli/src/main.rs`, `lib/crates/fabro-workflow/src/cli/mod.rs`, `lib/crates/fabro-workflow/src/cli/run.rs` | `docs/reference/cli.mdx` | | `lib/crates/fabro-cli/src/cli_config.rs` | `docs/reference/cli-configuration.mdx` | | `lib/crates/fabro-llm/src/cli.rs` | `docs/reference/cli.mdx` | | `lib/crates/fabro-api/src/serve.rs` | `docs/reference/cli.mdx` | -| `lib/crates/fabro-workflows/src/parser/*.rs` | `docs/reference/dot-language.mdx` | -| `lib/crates/fabro-workflows/src/condition.rs` | `docs/reference/dot-language.mdx` | -| `lib/crates/fabro-workflows/src/cli/validate.rs` | `docs/reference/dot-language.mdx` | -| `lib/crates/fabro-workflows/src/stylesheet.rs` | `docs/workflows/stylesheets.mdx` | -| `lib/crates/fabro-workflows/src/transform.rs` | `docs/workflows/variables.mdx` | -| `lib/crates/fabro-workflows/src/handler/*.rs` | `docs/workflows/stages-and-nodes.mdx`, `docs/reference/dot-language.mdx` | -| `lib/crates/fabro-workflows/src/handler/human.rs` | `docs/workflows/human-in-the-loop.mdx` | -| `lib/crates/fabro-workflows/src/cli/run_config.rs` | `docs/execution/run-configuration.mdx` | -| `lib/crates/fabro-workflows/src/engine.rs` | `docs/core-concepts/how-arc-works.mdx` | -| `lib/crates/fabro-workflows/src/context/*.rs` | `docs/execution/context.mdx` | -| `lib/crates/fabro-workflows/src/checkpoint.rs` | `docs/execution/checkpoints.mdx` | -| `lib/crates/fabro-workflows/src/retro.rs`, `lib/crates/fabro-workflows/src/retro_agent.rs` | `docs/execution/retros.mdx` | -| `lib/crates/fabro-workflows/src/interviewer/*.rs` | `docs/execution/interviews.mdx` | -| `lib/crates/fabro-workflows/src/hook/*.rs` | `docs/agents/hooks.mdx` | -| `lib/crates/fabro-workflows/src/daytona_sandbox.rs` | `docs/integrations/daytona.mdx`, `docs/execution/environments.mdx` | +| `lib/crates/fabro-workflow/src/parser/*.rs` | `docs/reference/dot-language.mdx` | +| `lib/crates/fabro-workflow/src/condition.rs` | `docs/reference/dot-language.mdx` | +| `lib/crates/fabro-workflow/src/cli/validate.rs` | `docs/reference/dot-language.mdx` | +| `lib/crates/fabro-workflow/src/stylesheet.rs` | `docs/workflows/stylesheets.mdx` | +| `lib/crates/fabro-workflow/src/transform.rs` | `docs/workflows/variables.mdx` | +| `lib/crates/fabro-workflow/src/handler/*.rs` | `docs/workflows/stages-and-nodes.mdx`, `docs/reference/dot-language.mdx` | +| `lib/crates/fabro-workflow/src/handler/human.rs` | `docs/workflows/human-in-the-loop.mdx` | +| `lib/crates/fabro-workflow/src/cli/run_config.rs` | `docs/execution/run-configuration.mdx` | +| `lib/crates/fabro-workflow/src/engine.rs` | `docs/core-concepts/how-arc-works.mdx` | +| `lib/crates/fabro-workflow/src/context/*.rs` | `docs/execution/context.mdx` | +| `lib/crates/fabro-workflow/src/checkpoint.rs` | `docs/execution/checkpoints.mdx` | +| `lib/crates/fabro-workflow/src/retro.rs`, `lib/crates/fabro-workflow/src/retro_agent.rs` | `docs/execution/retros.mdx` | +| `lib/crates/fabro-workflow/src/interviewer/*.rs` | `docs/execution/interviews.mdx` | +| `lib/crates/fabro-workflow/src/hook/*.rs` | `docs/agents/hooks.mdx` | +| `lib/crates/fabro-workflow/src/daytona_sandbox.rs` | `docs/integrations/daytona.mdx`, `docs/execution/environments.mdx` | | `lib/crates/fabro-agent/src/tools.rs`, `lib/crates/fabro-agent/src/tool_registry.rs`, `lib/crates/fabro-agent/src/tool_execution.rs` | `docs/agents/tools.mdx` | | `lib/crates/fabro-agent/src/v4a_patch.rs` | `docs/agents/tools.mdx` | | `lib/crates/fabro-agent/src/cli.rs` | `docs/agents/permissions.mdx` | diff --git a/.config/nextest.toml b/.config/nextest.toml index 64e384f63..06e0702af 100644 --- a/.config/nextest.toml +++ b/.config/nextest.toml @@ -14,7 +14,7 @@ medium = { max-threads = 4 } # 18-30 MB binaries [[profile.default.overrides]] filter = """ package(fabro-server) - | package(fabro-workflows) + | package(fabro-workflow) | package(fabro-agent) | package(fabro-cli) """ diff --git a/AGENTS.md b/AGENTS.md index 0cb2c23f6..403711ce8 100644 --- a/AGENTS.md +++ b/AGENTS.md @@ -8,7 +8,7 @@ This file provides guidance to Claude Code (claude.ai/code) when working with co - `cargo build --workspace` — build all crates - `cargo nextest run --workspace` — run all unit tests - `cargo nextest run -p fabro-server` — test a single crate -- `cargo nextest run -p fabro-workflows -- test_name` — run a single test +- `cargo nextest run -p fabro-workflow -- test_name` — run a single test - `set -a && source .env && set +a && cargo nextest run --workspace --profile e2e --run-ignored only` — run all E2E live tests (requires credentials in `.env`, see `.env.example`) - `set -a && source .env && set +a && cargo nextest run -p fabro-llm --profile e2e --run-ignored only` — run E2E tests for a single crate - `cargo fmt --check --all` — check formatting @@ -51,7 +51,7 @@ Fabro is an AI-powered workflow orchestration platform. Workflows are defined as ### Rust crates (`lib/crates/`) - **fabro-cli** — CLI entry point. Commands: `run`, `exec`, `serve`, `validate`, `parse`, `cp`, `model`, `doctor`, `init`, `install`, `ps`, `system prune`, `llm` -- **fabro-workflows** — Core workflow engine. Parses Graphviz graphs, runs stages, manages checkpoints/resume, hooks, retros, and human-in-the-loop interactions +- **fabro-workflow** — Core workflow engine. Parses Graphviz graphs, runs stages, manages checkpoints/resume, hooks, retros, and human-in-the-loop interactions - **fabro-agent** — AI coding agent with tool use (Bash, Read, Write, Edit, Glob, Grep, WebFetch). `Sandbox` trait abstracts execution environments - **fabro-server** — Axum HTTP server. Routes for runs, sessions, models, completions, usage. SSE event streaming. Demo mode via header - **fabro-llm** — Unified LLM client with providers: Anthropic, OpenAI, Gemini, OpenAI-compatible, plus retry/middleware/streaming @@ -84,12 +84,12 @@ When working on Rust crates, read the relevant strategy doc **before** making ch ## Shell quoting in sandbox code -When interpolating values into shell command strings (in `fabro-workflows`), always use the `shell_quote()` helper (backed by `shlex::try_quote`). Never use manual `replace('\'', "'\\''")` or unquoted interpolation. This applies to file paths, branch names, URLs, env vars, image names, glob patterns, and any other user-controlled input assembled into a shell script. +When interpolating values into shell command strings (in `fabro-workflow`), always use the `shell_quote()` helper (backed by `shlex::try_quote`). Never use manual `replace('\'', "'\\''")` or unquoted interpolation. This applies to file paths, branch names, URLs, env vars, image names, glob patterns, and any other user-controlled input assembled into a shell script. ## Rust import style - **Types** (structs, enums, traits): import by name — `use crate::outcome::Outcome;` -- **Functions**: import the parent module, call as `module::function()` — `use fabro_workflows::operations; operations::create(...)` +- **Functions**: import the parent module, call as `module::function()` — `use fabro_workflow::operations; operations::create(...)` - **No glob imports** in production code (`use foo::*`). Globs are acceptable in test modules and preludes. Enforced by clippy `wildcard_imports` lint. ## Testing workflows diff --git a/Cargo.lock b/Cargo.lock index ae3f05796..185c806c0 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -1477,7 +1477,7 @@ dependencies = [ "fabro-types", "fabro-util", "fabro-validate", - "fabro-workflows", + "fabro-workflow", "futures", "git2", "httpmock", @@ -1810,7 +1810,7 @@ dependencies = [ "fabro-store", "fabro-types", "fabro-util", - "fabro-workflows", + "fabro-workflow", "futures-util", "hex", "hmac", @@ -1847,7 +1847,7 @@ name = "fabro-slack" version = "0.176.2" dependencies = [ "fabro-interview", - "fabro-workflows", + "fabro-workflow", "futures-util", "reqwest", "rustls", @@ -1972,7 +1972,7 @@ dependencies = [ ] [[package]] -name = "fabro-workflows" +name = "fabro-workflow" version = "0.176.2" dependencies = [ "anyhow", diff --git a/bin/ops/generate-jwt-keys.sh b/bin/ops/generate-jwt-keys.sh index da030dafd..d31210f8c 100755 --- a/bin/ops/generate-jwt-keys.sh +++ b/bin/ops/generate-jwt-keys.sh @@ -7,7 +7,7 @@ openssl pkey -in fabro-jwt-private.pem -pubout -out fabro-jwt-public.pem echo "" echo "Generated:" echo " fabro-jwt-private.pem (private key — for fabro-web / FABRO_JWT_PRIVATE_KEY)" -echo " fabro-jwt-public.pem (public key — for fabro-workflows / FABRO_JWT_PUBLIC_KEY)" +echo " fabro-jwt-public.pem (public key — for fabro-workflow / FABRO_JWT_PUBLIC_KEY)" echo "" echo "Set env vars with the PEM contents (including header/footer lines):" echo "" diff --git a/docs-internal/events-strategy.md b/docs-internal/events-strategy.md index ae088ab8c..70c0c13ce 100644 --- a/docs-internal/events-strategy.md +++ b/docs-internal/events-strategy.md @@ -37,7 +37,7 @@ Every line in `progress.jsonl` has three envelope fields, then the event's own f | `run_id` | string | ULID for this workflow run | | `event` | string | Event name (matches Rust variant, dot-separated for wrapped types) | -The envelope is built in `fabro-workflows/src/event.rs` by `build_event_envelope()`, and file logging is handled by `ProgressLogger`. Field names from the event that collide with envelope keys (`ts`, `run_id`, `event`) are dropped — the `run_id` from `WorkflowRunStarted` populates the envelope itself. +The envelope is built in `fabro-workflow/src/event.rs` by `build_event_envelope()`, and file logging is handled by `ProgressLogger`. Field names from the event that collide with envelope keys (`ts`, `run_id`, `event`) are dropped — the `run_id` from `WorkflowRunStarted` populates the envelope itself. ## Run Completion Contract diff --git a/docs-internal/logging-strategy.md b/docs-internal/logging-strategy.md index 9f670222b..0b6b0d4b1 100644 --- a/docs-internal/logging-strategy.md +++ b/docs-internal/logging-strategy.md @@ -138,7 +138,7 @@ warn!(provider = %provider, attempt = n, error = %err, "Request failed, retrying error!(provider = %provider, error = %err, "Request failed after all retries"); ``` -**fabro-workflows:** +**fabro-workflow:** ```rust info!(pipeline = %name, "Starting pipeline execution"); info!(pipeline = %name, nodes = count, "Pipeline complete"); diff --git a/lib/crates/fabro-cli/Cargo.toml b/lib/crates/fabro-cli/Cargo.toml index 3f69431d0..0a713f587 100644 --- a/lib/crates/fabro-cli/Cargo.toml +++ b/lib/crates/fabro-cli/Cargo.toml @@ -35,7 +35,7 @@ fabro-sandbox = { path = "../fabro-sandbox", features = ["daytona"] } fabro-git-storage = { path = "../fabro-git-storage" } fabro-graphviz = { path = "../fabro-graphviz" } fabro-validate = { path = "../fabro-validate" } -fabro-workflows = { path = "../fabro-workflows" } +fabro-workflow = { path = "../fabro-workflow" } fabro-server = { path = "../fabro-server", optional = true } fabro-telemetry = { path = "../fabro-telemetry" } fabro-store = { path = "../fabro-store" } diff --git a/lib/crates/fabro-cli/src/commands/asset/cp.rs b/lib/crates/fabro-cli/src/commands/asset/cp.rs index be877bed7..a4e90f5b3 100644 --- a/lib/crates/fabro-cli/src/commands/asset/cp.rs +++ b/lib/crates/fabro-cli/src/commands/asset/cp.rs @@ -3,8 +3,8 @@ use std::path::{Path, PathBuf}; use anyhow::{Context, Result, bail}; use fabro_config::FabroSettingsExt; use fabro_store::RuntimeState; -use fabro_workflows::assets::{AssetEntry, scan_assets}; -use fabro_workflows::run_lookup::{resolve_run, runs_base}; +use fabro_workflow::assets::{AssetEntry, scan_assets}; +use fabro_workflow::run_lookup::{resolve_run, runs_base}; use crate::args::{AssetCpArgs, GlobalArgs}; use crate::shared::split_run_path; diff --git a/lib/crates/fabro-cli/src/commands/asset/list.rs b/lib/crates/fabro-cli/src/commands/asset/list.rs index 19f26226e..7f459841b 100644 --- a/lib/crates/fabro-cli/src/commands/asset/list.rs +++ b/lib/crates/fabro-cli/src/commands/asset/list.rs @@ -1,8 +1,8 @@ use anyhow::Result; use fabro_config::FabroSettingsExt; use fabro_store::RuntimeState; -use fabro_workflows::assets::scan_assets; -use fabro_workflows::run_lookup::{resolve_run, runs_base}; +use fabro_workflow::assets::scan_assets; +use fabro_workflow::run_lookup::{resolve_run, runs_base}; use crate::args::{AssetListArgs, GlobalArgs}; use crate::shared::format_size; diff --git a/lib/crates/fabro-cli/src/commands/graph.rs b/lib/crates/fabro-cli/src/commands/graph.rs index 90a026772..5fa3cd891 100644 --- a/lib/crates/fabro-cli/src/commands/graph.rs +++ b/lib/crates/fabro-cli/src/commands/graph.rs @@ -8,7 +8,7 @@ use fabro_config::project::resolve_workflow_path; use fabro_graphviz::render::render_dot; use fabro_util::terminal::Styles; use fabro_validate::Severity; -use fabro_workflows::operations::{ValidateInput, WorkflowInput, validate}; +use fabro_workflow::operations::{ValidateInput, WorkflowInput, validate}; use tracing::debug; use crate::args::{GraphArgs, GraphDirection}; diff --git a/lib/crates/fabro-cli/src/commands/pr/close.rs b/lib/crates/fabro-cli/src/commands/pr/close.rs index 60034c2ae..d3ce2e834 100644 --- a/lib/crates/fabro-cli/src/commands/pr/close.rs +++ b/lib/crates/fabro-cli/src/commands/pr/close.rs @@ -2,7 +2,7 @@ use std::path::Path; use anyhow::{Context, Result}; use fabro_config::FabroSettingsExt; -use fabro_workflows::run_lookup::runs_base; +use fabro_workflow::run_lookup::runs_base; use tracing::info; use crate::args::{GlobalArgs, PrCloseArgs}; diff --git a/lib/crates/fabro-cli/src/commands/pr/create.rs b/lib/crates/fabro-cli/src/commands/pr/create.rs index d8776e3cf..6e3bfddd2 100644 --- a/lib/crates/fabro-cli/src/commands/pr/create.rs +++ b/lib/crates/fabro-cli/src/commands/pr/create.rs @@ -4,12 +4,12 @@ use anyhow::{Context, Result, bail}; use fabro_config::FabroSettingsExt; use fabro_model::Catalog; use fabro_sandbox::daytona::detect_repo_info; -use fabro_workflows::outcome::StageStatus; -use fabro_workflows::pull_request::maybe_open_pull_request; -use fabro_workflows::records::{ +use fabro_workflow::outcome::StageStatus; +use fabro_workflow::pull_request::maybe_open_pull_request; +use fabro_workflow::records::{ Conclusion, ConclusionExt, RunRecord, RunRecordExt, StartRecord, StartRecordExt, }; -use fabro_workflows::run_lookup::{resolve_run_combined, runs_base}; +use fabro_workflow::run_lookup::{resolve_run_combined, runs_base}; use tracing::info; use crate::args::{GlobalArgs, PrCreateArgs}; diff --git a/lib/crates/fabro-cli/src/commands/pr/list.rs b/lib/crates/fabro-cli/src/commands/pr/list.rs index 69354682e..18f9b46db 100644 --- a/lib/crates/fabro-cli/src/commands/pr/list.rs +++ b/lib/crates/fabro-cli/src/commands/pr/list.rs @@ -2,8 +2,8 @@ use std::path::Path; use anyhow::{Context, Result}; use fabro_config::FabroSettingsExt; -use fabro_workflows::pull_request::PullRequestRecord; -use fabro_workflows::run_lookup::{runs_base, scan_runs_combined}; +use fabro_workflow::pull_request::PullRequestRecord; +use fabro_workflow::run_lookup::{runs_base, scan_runs_combined}; use futures::future::join_all; use tracing::info; diff --git a/lib/crates/fabro-cli/src/commands/pr/merge.rs b/lib/crates/fabro-cli/src/commands/pr/merge.rs index a6d8a944e..31ce05d28 100644 --- a/lib/crates/fabro-cli/src/commands/pr/merge.rs +++ b/lib/crates/fabro-cli/src/commands/pr/merge.rs @@ -4,7 +4,7 @@ use anyhow::{Context, Result}; use fabro_config::FabroSettingsExt; use tracing::info; -use fabro_workflows::run_lookup::runs_base; +use fabro_workflow::run_lookup::runs_base; use crate::args::{GlobalArgs, PrMergeArgs}; use crate::user_config::load_user_settings_with_globals; diff --git a/lib/crates/fabro-cli/src/commands/pr/mod.rs b/lib/crates/fabro-cli/src/commands/pr/mod.rs index 5dd28b494..67a36628b 100644 --- a/lib/crates/fabro-cli/src/commands/pr/mod.rs +++ b/lib/crates/fabro-cli/src/commands/pr/mod.rs @@ -8,8 +8,8 @@ use std::path::{Path, PathBuf}; use anyhow::{Context, Result}; -use fabro_workflows::pull_request::PullRequestRecord; -use fabro_workflows::run_lookup::resolve_run_combined; +use fabro_workflow::pull_request::PullRequestRecord; +use fabro_workflow::run_lookup::resolve_run_combined; use crate::args::{GlobalArgs, PrCommand, PrNamespace}; use crate::shared::github::build_github_app_credentials; diff --git a/lib/crates/fabro-cli/src/commands/pr/view.rs b/lib/crates/fabro-cli/src/commands/pr/view.rs index c977a6554..32a931d95 100644 --- a/lib/crates/fabro-cli/src/commands/pr/view.rs +++ b/lib/crates/fabro-cli/src/commands/pr/view.rs @@ -4,7 +4,7 @@ use anyhow::{Context, Result}; use fabro_config::FabroSettingsExt; use tracing::info; -use fabro_workflows::run_lookup::runs_base; +use fabro_workflow::run_lookup::runs_base; use crate::args::{GlobalArgs, PrViewArgs}; use crate::user_config::load_user_settings_with_globals; diff --git a/lib/crates/fabro-cli/src/commands/preflight.rs b/lib/crates/fabro-cli/src/commands/preflight.rs index 658f7e0ab..9baf2ba9a 100644 --- a/lib/crates/fabro-cli/src/commands/preflight.rs +++ b/lib/crates/fabro-cli/src/commands/preflight.rs @@ -10,8 +10,8 @@ use fabro_model::{Catalog, Provider}; use fabro_sandbox::daytona::{DaytonaConfig, detect_repo_info}; use fabro_sandbox::{DockerSandboxConfig, Sandbox, SandboxProvider, SandboxSpec}; use fabro_util::terminal::Styles; -use fabro_workflows::git::{GitSyncStatus, sync_status}; -use fabro_workflows::operations::{ValidateInput, WorkflowInput, validate}; +use fabro_workflow::git::{GitSyncStatus, sync_status}; +use fabro_workflow::operations::{ValidateInput, WorkflowInput, validate}; use crate::args::{GlobalArgs, PreflightArgs}; use crate::shared::github::build_github_app_credentials; diff --git a/lib/crates/fabro-cli/src/commands/run/attach.rs b/lib/crates/fabro-cli/src/commands/run/attach.rs index dafcb2bf5..a2fa31366 100644 --- a/lib/crates/fabro-cli/src/commands/run/attach.rs +++ b/lib/crates/fabro-cli/src/commands/run/attach.rs @@ -13,9 +13,9 @@ use futures::StreamExt; use fabro_interview::{AnswerValue, ConsoleInterviewer}; use fabro_store::{EventEnvelope, RunStore, RuntimeState}; use fabro_util::terminal::Styles; -use fabro_workflows::outcome::StageStatus; -use fabro_workflows::records::{Conclusion, ConclusionExt, RunRecord, RunRecordExt}; -use fabro_workflows::run_status::{RunStatus, RunStatusRecord, RunStatusRecordExt}; +use fabro_workflow::outcome::StageStatus; +use fabro_workflow::records::{Conclusion, ConclusionExt, RunRecord, RunRecordExt}; +use fabro_workflow::run_status::{RunStatus, RunStatusRecord, RunStatusRecordExt}; use tokio::signal::ctrl_c; use tokio::time::{self, sleep}; @@ -695,9 +695,9 @@ mod tests { use chrono::Utc; use fabro_interview::{Answer, AnswerValue}; use fabro_util::terminal::Styles; - use fabro_workflows::outcome::StageStatus; - use fabro_workflows::records::Conclusion; - use fabro_workflows::run_status::{StatusReason, write_run_status}; + use fabro_workflow::outcome::StageStatus; + use fabro_workflow::records::Conclusion; + use fabro_workflow::run_status::{StatusReason, write_run_status}; fn no_color_styles() -> &'static Styles { Box::leak(Box::new(Styles::new(false))) diff --git a/lib/crates/fabro-cli/src/commands/run/cp.rs b/lib/crates/fabro-cli/src/commands/run/cp.rs index c5cf1a015..1182bffc9 100644 --- a/lib/crates/fabro-cli/src/commands/run/cp.rs +++ b/lib/crates/fabro-cli/src/commands/run/cp.rs @@ -5,7 +5,7 @@ use fabro_agent::sandbox::Sandbox; use fabro_config::FabroSettingsExt; use fabro_sandbox::SandboxRecordExt; use fabro_sandbox::reconnect::reconnect; -use fabro_workflows::run_lookup::{resolve_run, runs_base}; +use fabro_workflow::run_lookup::{resolve_run, runs_base}; use tokio::fs; use tracing::{debug, info}; diff --git a/lib/crates/fabro-cli/src/commands/run/create.rs b/lib/crates/fabro-cli/src/commands/run/create.rs index a3ceda0b6..d83c17940 100644 --- a/lib/crates/fabro-cli/src/commands/run/create.rs +++ b/lib/crates/fabro-cli/src/commands/run/create.rs @@ -4,8 +4,8 @@ use crate::args::RunArgs; use fabro_config::{ConfigLayer, FabroSettings}; use fabro_types::RunId; use fabro_util::terminal::Styles; -use fabro_workflows::error::FabroError; -use fabro_workflows::operations::{CreateRunInput, WorkflowInput, create}; +use fabro_workflow::error::FabroError; +use fabro_workflow::operations::{CreateRunInput, WorkflowInput, create}; use super::output::{print_diagnostics_from_error, print_workflow_report_from_persisted}; diff --git a/lib/crates/fabro-cli/src/commands/run/detached.rs b/lib/crates/fabro-cli/src/commands/run/detached.rs index 66cc4d924..855bf4bf4 100644 --- a/lib/crates/fabro-cli/src/commands/run/detached.rs +++ b/lib/crates/fabro-cli/src/commands/run/detached.rs @@ -5,11 +5,11 @@ use anyhow::Result; use fabro_config::FabroSettingsExt; use fabro_interview::FileInterviewer; use fabro_store::RuntimeState; -use fabro_workflows::event::EventEmitter; -use fabro_workflows::operations::{ +use fabro_workflow::event::EventEmitter; +use fabro_workflow::operations::{ StartServices, open_or_hydrate_run, resume as resume_run, start as start_run, }; -use fabro_workflows::records::{RunRecord, RunRecordExt}; +use fabro_workflow::records::{RunRecord, RunRecordExt}; use crate::shared; use crate::store; @@ -21,7 +21,7 @@ pub(crate) async fn execute(run_dir: PathBuf, launcher_path: PathBuf, resume: bo }); let run_record = RunRecord::load(&run_dir)?; - let on_node: fabro_workflows::OnNodeCallback = Some({ + let on_node: fabro_workflow::OnNodeCallback = Some({ let run_id = run_record.run_id.to_string(); let short_id = super::short_run_id(&run_id).to_string(); fabro_proctitle::set(&format!("fabro: {short_id}")); diff --git a/lib/crates/fabro-cli/src/commands/run/diff.rs b/lib/crates/fabro-cli/src/commands/run/diff.rs index 07fef22c6..37e05930d 100644 --- a/lib/crates/fabro-cli/src/commands/run/diff.rs +++ b/lib/crates/fabro-cli/src/commands/run/diff.rs @@ -5,9 +5,9 @@ use anyhow::{Context, Result, bail}; use fabro_config::FabroSettingsExt; use fabro_sandbox::SandboxRecordExt; use fabro_sandbox::reconnect::reconnect; -use fabro_workflows::records::{StartRecord, StartRecordExt}; -use fabro_workflows::run_lookup::{resolve_run_combined, runs_base}; -use fabro_workflows::sandbox_git::GIT_REMOTE; +use fabro_workflow::records::{StartRecord, StartRecordExt}; +use fabro_workflow::run_lookup::{resolve_run_combined, runs_base}; +use fabro_workflow::sandbox_git::GIT_REMOTE; use tracing::{debug, info}; use crate::args::{DiffArgs, GlobalArgs}; diff --git a/lib/crates/fabro-cli/src/commands/run/fork.rs b/lib/crates/fabro-cli/src/commands/run/fork.rs index fdec1153e..733013509 100644 --- a/lib/crates/fabro-cli/src/commands/run/fork.rs +++ b/lib/crates/fabro-cli/src/commands/run/fork.rs @@ -3,7 +3,7 @@ use anyhow::Result; use fabro_config::FabroSettingsExt; use fabro_git_storage::gitobj::Store; use fabro_util::terminal::Styles; -use fabro_workflows::operations::{ +use fabro_workflow::operations::{ ForkRunInput, RewindTarget, build_timeline_or_rebuild, find_run_id_by_prefix_or_store, fork, }; use git2::Repository; diff --git a/lib/crates/fabro-cli/src/commands/run/launcher.rs b/lib/crates/fabro-cli/src/commands/run/launcher.rs index 10be140aa..87e4ee8a4 100644 --- a/lib/crates/fabro-cli/src/commands/run/launcher.rs +++ b/lib/crates/fabro-cli/src/commands/run/launcher.rs @@ -4,7 +4,7 @@ use anyhow::{Context, Result}; use chrono::{DateTime, Utc}; use fabro_config::FabroSettingsExt; use fabro_types::RunId; -use fabro_workflows::records::{RunRecord, RunRecordExt}; +use fabro_workflow::records::{RunRecord, RunRecordExt}; use serde::{Deserialize, Serialize}; #[cfg(test)] @@ -114,7 +114,7 @@ mod tests { use fabro_config::FabroSettings; use fabro_graphviz::graph::Graph; use fabro_types::fixtures; - use fabro_workflows::records::RunRecord; + use fabro_workflow::records::RunRecord; #[test] fn active_launcher_record_for_run_removes_stale_record() { diff --git a/lib/crates/fabro-cli/src/commands/run/logs.rs b/lib/crates/fabro-cli/src/commands/run/logs.rs index a71b8c5cd..c3ad02f10 100644 --- a/lib/crates/fabro-cli/src/commands/run/logs.rs +++ b/lib/crates/fabro-cli/src/commands/run/logs.rs @@ -7,7 +7,7 @@ use chrono::{DateTime, Utc}; use fabro_config::FabroSettingsExt; use fabro_store::RunStore; use fabro_util::terminal::Styles; -use fabro_workflows::run_lookup::{resolve_run_combined, runs_base}; +use fabro_workflow::run_lookup::{resolve_run_combined, runs_base}; use futures::StreamExt; use tokio::time; use tracing::{debug, info, warn}; diff --git a/lib/crates/fabro-cli/src/commands/run/mod.rs b/lib/crates/fabro-cli/src/commands/run/mod.rs index d92d9de88..734249bf2 100644 --- a/lib/crates/fabro-cli/src/commands/run/mod.rs +++ b/lib/crates/fabro-cli/src/commands/run/mod.rs @@ -1,7 +1,7 @@ use anyhow::Result; use fabro_config::FabroSettingsExt; use fabro_util::terminal::Styles; -use fabro_workflows::run_lookup::{resolve_run_combined, runs_base}; +use fabro_workflow::run_lookup::{resolve_run_combined, runs_base}; use crate::args::{GlobalArgs, RunCommands}; use crate::store; diff --git a/lib/crates/fabro-cli/src/commands/run/output.rs b/lib/crates/fabro-cli/src/commands/run/output.rs index fe977a49f..847424c0a 100644 --- a/lib/crates/fabro-cli/src/commands/run/output.rs +++ b/lib/crates/fabro-cli/src/commands/run/output.rs @@ -5,11 +5,11 @@ use fabro_graphviz::graph::Graph; use fabro_store::RuntimeState; use fabro_util::terminal::Styles; use fabro_util::text::strip_goal_decoration; -use fabro_workflows::asset_snapshot::collect_asset_paths; -use fabro_workflows::outcome::{StageStatus, format_cost}; -use fabro_workflows::pipeline::{Persisted, Validated}; -use fabro_workflows::pull_request::PullRequestRecord; -use fabro_workflows::records::{Checkpoint, CheckpointExt, Conclusion, ConclusionExt}; +use fabro_workflow::asset_snapshot::collect_asset_paths; +use fabro_workflow::outcome::{StageStatus, format_cost}; +use fabro_workflow::pipeline::{Persisted, Validated}; +use fabro_workflow::pull_request::PullRequestRecord; +use fabro_workflow::records::{Checkpoint, CheckpointExt, Conclusion, ConclusionExt}; use indicatif::HumanDuration; use crate::shared::{format_tokens_human, print_diagnostics, relative_path, tilde_path}; diff --git a/lib/crates/fabro-cli/src/commands/run/preview.rs b/lib/crates/fabro-cli/src/commands/run/preview.rs index 4c3597019..b3b1d9bd0 100644 --- a/lib/crates/fabro-cli/src/commands/run/preview.rs +++ b/lib/crates/fabro-cli/src/commands/run/preview.rs @@ -2,7 +2,7 @@ use anyhow::{Context, Result}; use fabro_config::FabroSettingsExt; use fabro_sandbox::SandboxRecordExt; use fabro_sandbox::daytona::DaytonaSandbox; -use fabro_workflows::run_lookup::{resolve_run_combined, runs_base}; +use fabro_workflow::run_lookup::{resolve_run_combined, runs_base}; use tracing::info; use crate::args::{GlobalArgs, PreviewArgs}; diff --git a/lib/crates/fabro-cli/src/commands/run/resume.rs b/lib/crates/fabro-cli/src/commands/run/resume.rs index d2c185163..db85ef22f 100644 --- a/lib/crates/fabro-cli/src/commands/run/resume.rs +++ b/lib/crates/fabro-cli/src/commands/run/resume.rs @@ -1,8 +1,8 @@ use anyhow::bail; use fabro_config::FabroSettingsExt; use fabro_util::terminal::Styles; -use fabro_workflows::records::{RunRecord, RunRecordExt}; -use fabro_workflows::run_lookup::{resolve_run_combined, runs_base}; +use fabro_workflow::records::{RunRecord, RunRecordExt}; +use fabro_workflow::run_lookup::{resolve_run_combined, runs_base}; use crate::args::{GlobalArgs, ResumeArgs}; use crate::store; diff --git a/lib/crates/fabro-cli/src/commands/run/rewind.rs b/lib/crates/fabro-cli/src/commands/run/rewind.rs index 996207c5d..3b8c2b4b3 100644 --- a/lib/crates/fabro-cli/src/commands/run/rewind.rs +++ b/lib/crates/fabro-cli/src/commands/run/rewind.rs @@ -5,7 +5,7 @@ use cli_table::{Cell, CellStruct, Color, Style, Table}; use fabro_config::FabroSettingsExt; use fabro_git_storage::gitobj::Store; use fabro_util::terminal::Styles; -use fabro_workflows::operations::{ +use fabro_workflow::operations::{ RewindInput, RewindTarget, RunTimeline, build_timeline_or_rebuild, find_run_id_by_prefix_or_store, rewind, }; diff --git a/lib/crates/fabro-cli/src/commands/run/run_progress.rs b/lib/crates/fabro-cli/src/commands/run/run_progress.rs index 49b4019c4..20374d796 100644 --- a/lib/crates/fabro-cli/src/commands/run/run_progress.rs +++ b/lib/crates/fabro-cli/src/commands/run/run_progress.rs @@ -10,11 +10,11 @@ use indicatif::{MultiProgress, ProgressBar, ProgressDrawTarget, ProgressStyle}; use fabro_agent::AgentEvent; use fabro_interview::{Answer, ConsoleInterviewer, Interviewer, Question}; use fabro_util::version::FABRO_VERSION; -use fabro_workflows::event::{EventEmitter, RunNoticeLevel, WorkflowRunEvent}; -use fabro_workflows::outcome::StageStatus; +use fabro_workflow::event::{EventEmitter, RunNoticeLevel, WorkflowRunEvent}; +use fabro_workflow::outcome::StageStatus; use crate::shared::{format_duration_ms, format_tokens_human, tilde_path}; -use fabro_workflows::outcome::{compute_stage_cost, format_cost}; +use fabro_workflow::outcome::{compute_stage_cost, format_cost}; // ── Cached styles ─────────────────────────────────────────────────────── diff --git a/lib/crates/fabro-cli/src/commands/run/ssh.rs b/lib/crates/fabro-cli/src/commands/run/ssh.rs index 659ec883e..d993b8e84 100644 --- a/lib/crates/fabro-cli/src/commands/run/ssh.rs +++ b/lib/crates/fabro-cli/src/commands/run/ssh.rs @@ -2,7 +2,7 @@ use anyhow::{Context, Result, bail}; use fabro_config::FabroSettingsExt; use fabro_sandbox::SandboxRecordExt; use fabro_sandbox::daytona::DaytonaSandbox; -use fabro_workflows::run_lookup::{resolve_run_combined, runs_base}; +use fabro_workflow::run_lookup::{resolve_run_combined, runs_base}; use tracing::info; use crate::args::{GlobalArgs, SshArgs}; diff --git a/lib/crates/fabro-cli/src/commands/run/start.rs b/lib/crates/fabro-cli/src/commands/run/start.rs index b79d0bd17..b434b9596 100644 --- a/lib/crates/fabro-cli/src/commands/run/start.rs +++ b/lib/crates/fabro-cli/src/commands/run/start.rs @@ -3,7 +3,7 @@ use std::path::Path; use anyhow::{Result, anyhow}; use chrono::Utc; use fabro_config::FabroSettingsExt; -use fabro_workflows::records::{RunRecord, RunRecordExt}; +use fabro_workflow::records::{RunRecord, RunRecordExt}; use super::launcher::{ LauncherRecord, launcher_log_path, launcher_record_path, remove_launcher_record, diff --git a/lib/crates/fabro-cli/src/commands/run/wait.rs b/lib/crates/fabro-cli/src/commands/run/wait.rs index d29d95cb3..6e2ed27fd 100644 --- a/lib/crates/fabro-cli/src/commands/run/wait.rs +++ b/lib/crates/fabro-cli/src/commands/run/wait.rs @@ -4,9 +4,9 @@ use anyhow::{Result, bail}; use fabro_config::FabroSettingsExt; use fabro_types::RunId; use fabro_util::terminal::Styles; -use fabro_workflows::records::{Conclusion, ConclusionExt}; -use fabro_workflows::run_lookup::{resolve_run_combined, runs_base}; -use fabro_workflows::run_status::{RunStatus, RunStatusRecord, RunStatusRecordExt}; +use fabro_workflow::records::{Conclusion, ConclusionExt}; +use fabro_workflow::run_lookup::{resolve_run_combined, runs_base}; +use fabro_workflow::run_status::{RunStatus, RunStatusRecord, RunStatusRecordExt}; use tracing::info; use crate::args::{GlobalArgs, WaitArgs}; @@ -147,8 +147,8 @@ fn print_human_output( mod tests { use super::*; use fabro_types::fixtures; - use fabro_workflows::outcome::StageStatus; - use fabro_workflows::records::Conclusion; + use fabro_workflow::outcome::StageStatus; + use fabro_workflow::records::Conclusion; fn no_color_styles() -> Styles { Styles::new(false) diff --git a/lib/crates/fabro-cli/src/commands/runs/inspect.rs b/lib/crates/fabro-cli/src/commands/runs/inspect.rs index 17b508c5b..8e644dc6a 100644 --- a/lib/crates/fabro-cli/src/commands/runs/inspect.rs +++ b/lib/crates/fabro-cli/src/commands/runs/inspect.rs @@ -4,12 +4,12 @@ use anyhow::Result; use fabro_config::FabroSettingsExt; use fabro_sandbox::SandboxRecordExt; use fabro_types::RunId; -use fabro_workflows::records::{CheckpointExt, ConclusionExt, RunRecordExt, StartRecordExt}; +use fabro_workflow::records::{CheckpointExt, ConclusionExt, RunRecordExt, StartRecordExt}; use serde::Serialize; -use fabro_workflows::records::{Checkpoint, Conclusion, RunRecord, StartRecord}; -use fabro_workflows::run_lookup::{resolve_run_combined, runs_base}; -use fabro_workflows::run_status::RunStatus; +use fabro_workflow::records::{Checkpoint, Conclusion, RunRecord, StartRecord}; +use fabro_workflow::run_lookup::{resolve_run_combined, runs_base}; +use fabro_workflow::run_status::RunStatus; use crate::args::{GlobalArgs, InspectArgs}; use crate::store; diff --git a/lib/crates/fabro-cli/src/commands/runs/list.rs b/lib/crates/fabro-cli/src/commands/runs/list.rs index 73cd4844b..2af86662f 100644 --- a/lib/crates/fabro-cli/src/commands/runs/list.rs +++ b/lib/crates/fabro-cli/src/commands/runs/list.rs @@ -8,8 +8,8 @@ use fabro_config::FabroSettingsExt; use fabro_util::terminal::Styles; use fabro_util::text::strip_goal_decoration; -use fabro_workflows::run_lookup::{StatusFilter, filter_runs, runs_base, scan_runs_combined}; -use fabro_workflows::run_status::RunStatus; +use fabro_workflow::run_lookup::{StatusFilter, filter_runs, runs_base, scan_runs_combined}; +use fabro_workflow::run_status::RunStatus; use crate::args::{GlobalArgs, RunsListArgs}; use crate::shared::{color_if, format_duration_ms, tilde_path}; diff --git a/lib/crates/fabro-cli/src/commands/runs/rm.rs b/lib/crates/fabro-cli/src/commands/runs/rm.rs index 875b27650..7269d8fc6 100644 --- a/lib/crates/fabro-cli/src/commands/runs/rm.rs +++ b/lib/crates/fabro-cli/src/commands/runs/rm.rs @@ -7,8 +7,8 @@ use fabro_store::Store; use tracing::warn; use fabro_sandbox::reconnect::reconnect as reconnect_sandbox; -use fabro_workflows::run_lookup::{resolve_run_combined, runs_base}; -use fabro_workflows::run_status::{RunStatus, RunStatusRecord, write_run_status}; +use fabro_workflow::run_lookup::{resolve_run_combined, runs_base}; +use fabro_workflow::run_status::{RunStatus, RunStatusRecord, write_run_status}; use crate::args::{GlobalArgs, RunsRemoveArgs}; use crate::store; diff --git a/lib/crates/fabro-cli/src/commands/store/dump.rs b/lib/crates/fabro-cli/src/commands/store/dump.rs index 83597a26e..9a72bd9de 100644 --- a/lib/crates/fabro-cli/src/commands/store/dump.rs +++ b/lib/crates/fabro-cli/src/commands/store/dump.rs @@ -4,7 +4,7 @@ use std::path::{Component, Path, PathBuf}; use anyhow::{Context, Result, bail}; use fabro_config::FabroSettingsExt; use fabro_store::{NodeVisitRef, RunSnapshot, RunStore}; -use fabro_workflows::run_lookup::{resolve_run_combined, runs_base}; +use fabro_workflow::run_lookup::{resolve_run_combined, runs_base}; use serde::Serialize; #[cfg(test)] use serde::de::DeserializeOwned; diff --git a/lib/crates/fabro-cli/src/commands/system/df.rs b/lib/crates/fabro-cli/src/commands/system/df.rs index a11b0f9ba..d810beacb 100644 --- a/lib/crates/fabro-cli/src/commands/system/df.rs +++ b/lib/crates/fabro-cli/src/commands/system/df.rs @@ -6,8 +6,8 @@ use cli_table::format::{Border, Justify, Separator}; use cli_table::{Cell, CellStruct, Style, Table}; use fabro_config::FabroSettingsExt; -use fabro_workflows::run_lookup::{logs_base, runs_base, scan_runs_combined}; -use fabro_workflows::run_status::RunStatus; +use fabro_workflow::run_lookup::{logs_base, runs_base, scan_runs_combined}; +use fabro_workflow::run_status::RunStatus; use crate::args::{DfArgs, GlobalArgs}; use crate::shared::format_size; diff --git a/lib/crates/fabro-cli/src/commands/system/prune.rs b/lib/crates/fabro-cli/src/commands/system/prune.rs index 66a30625e..660332b61 100644 --- a/lib/crates/fabro-cli/src/commands/system/prune.rs +++ b/lib/crates/fabro-cli/src/commands/system/prune.rs @@ -6,7 +6,7 @@ use fabro_config::FabroSettingsExt; use fabro_store::Store; use tracing::{debug, info}; -use fabro_workflows::run_lookup::{StatusFilter, filter_runs, runs_base, scan_runs_combined}; +use fabro_workflow::run_lookup::{StatusFilter, filter_runs, runs_base, scan_runs_combined}; use crate::args::{GlobalArgs, RunsPruneArgs}; use crate::shared::format_size; diff --git a/lib/crates/fabro-cli/src/commands/validate.rs b/lib/crates/fabro-cli/src/commands/validate.rs index 7e335d6f7..913594f91 100644 --- a/lib/crates/fabro-cli/src/commands/validate.rs +++ b/lib/crates/fabro-cli/src/commands/validate.rs @@ -3,7 +3,7 @@ use fabro_config::ConfigLayer; use fabro_config::project::resolve_workflow_path; use fabro_util::terminal::Styles; use fabro_validate::Severity; -use fabro_workflows::operations::{ValidateInput, WorkflowInput, validate}; +use fabro_workflow::operations::{ValidateInput, WorkflowInput, validate}; use crate::args::ValidateArgs; use crate::shared::{print_diagnostics, relative_path}; diff --git a/lib/crates/fabro-core/src/executor.rs b/lib/crates/fabro-core/src/executor.rs index 92cb9e47f..d56e68ffb 100644 --- a/lib/crates/fabro-core/src/executor.rs +++ b/lib/crates/fabro-core/src/executor.rs @@ -144,7 +144,7 @@ impl Executor { } } - // Check visit limits (>= matches fabro-workflows semantics) + // Check visit limits (>= matches fabro-workflow semantics) let visits = state.increment_visits(node.id()); if let Some(max) = node.max_visits() { if visits >= max { diff --git a/lib/crates/fabro-core/src/test_fixtures.rs b/lib/crates/fabro-core/src/test_fixtures.rs index dc8c42f8c..dc8fcd6fa 100644 --- a/lib/crates/fabro-core/src/test_fixtures.rs +++ b/lib/crates/fabro-core/src/test_fixtures.rs @@ -231,7 +231,7 @@ impl Graph for TestGraph { Some(o) if o.status == *required_status => {} _ => { // Return the failed node id (the node whose gate is - // checked), matching fabro-workflows convention + // checked), matching fabro-workflow convention return Err(required_node.clone()); } } diff --git a/lib/crates/fabro-server/Cargo.toml b/lib/crates/fabro-server/Cargo.toml index bc16abae3..9c6d633fd 100644 --- a/lib/crates/fabro-server/Cargo.toml +++ b/lib/crates/fabro-server/Cargo.toml @@ -17,7 +17,7 @@ fabro-config = { path = "../fabro-config" } fabro-graphviz = { path = "../fabro-graphviz" } fabro-hooks = { path = "../fabro-hooks" } fabro-interview = { path = "../fabro-interview" } -fabro-workflows = { path = "../fabro-workflows" } +fabro-workflow = { path = "../fabro-workflow" } fabro-sandbox = { path = "../fabro-sandbox", features = ["daytona"] } fabro-github = { path = "../fabro-github" } fabro-agent = { path = "../fabro-agent" } diff --git a/lib/crates/fabro-server/src/server.rs b/lib/crates/fabro-server/src/server.rs index 9d63efc56..880713469 100644 --- a/lib/crates/fabro-server/src/server.rs +++ b/lib/crates/fabro-server/src/server.rs @@ -22,8 +22,8 @@ use fabro_retro::retro::{Retro, extract_stage_durations}; use fabro_store::{InMemoryStore, Store}; use fabro_types::RunId; use fabro_util::redact::redact_jsonl_line; -use fabro_workflows::error::FabroError; -use fabro_workflows::handler::HandlerRegistry; +use fabro_workflow::error::FabroError; +use fabro_workflow::handler::HandlerRegistry; use futures_util::stream; use tokio::sync::broadcast; use tokio::sync::oneshot; @@ -44,11 +44,11 @@ use crate::sessions as sessions_mod; use crate::sessions::{SessionStore, new_session_store}; use fabro_interview::{Answer, Interviewer, QuestionType, WebInterviewer}; use fabro_retro::RetroExt; -use fabro_workflows::context::Context; -use fabro_workflows::event::{EventEmitter, WorkflowRunEvent}; -use fabro_workflows::operations::{self, CreateRunInput, WorkflowInput}; -use fabro_workflows::pipeline::Persisted; -use fabro_workflows::records::{Checkpoint, CheckpointExt}; +use fabro_workflow::context::Context; +use fabro_workflow::event::{EventEmitter, WorkflowRunEvent}; +use fabro_workflow::operations::{self, CreateRunInput, WorkflowInput}; +use fabro_workflow::pipeline::Persisted; +use fabro_workflow::records::{Checkpoint, CheckpointExt}; pub use fabro_api_types::{ ApiQuestion, ApiQuestionOption, PaginatedRunList, PaginationMeta, @@ -728,7 +728,7 @@ async fn execute_run(state: Arc, run_id: RunId) { // Accumulate aggregate usage after execution completes. if let Some(ref cp) = checkpoint { let stage_durations = match run_store.list_events().await { - Ok(events) => fabro_workflows::extract_stage_durations_from_events(&events), + Ok(events) => fabro_workflow::extract_stage_durations_from_events(&events), Err(err) => { tracing::warn!(run_id = %run_id, error = %err, "Failed to load run events from store"); extract_stage_durations(&run_dir) @@ -1600,7 +1600,7 @@ mod tests { use axum::body::Body; use axum::http::Request; use fabro_types::fixtures; - use fabro_workflows::records::{RunRecord, RunRecordExt}; + use fabro_workflow::records::{RunRecord, RunRecordExt}; use tower::ServiceExt; const MINIMAL_DOT: &str = r#"digraph Test { @@ -2516,8 +2516,8 @@ mod tests { let mut status_record = None; for _ in 0..50 { if let Some(record) = run_store.get_status().await.unwrap() { - if record.status == fabro_workflows::run_status::RunStatus::Failed - && record.reason == Some(fabro_workflows::run_status::StatusReason::Cancelled) + if record.status == fabro_workflow::run_status::RunStatus::Failed + && record.reason == Some(fabro_workflow::run_status::StatusReason::Cancelled) { status_record = Some(record); break; @@ -2529,11 +2529,11 @@ mod tests { let status_record = status_record.expect("status record should be persisted"); assert_eq!( status_record.status, - fabro_workflows::run_status::RunStatus::Failed + fabro_workflow::run_status::RunStatus::Failed ); assert_eq!( status_record.reason, - Some(fabro_workflows::run_status::StatusReason::Cancelled) + Some(fabro_workflow::run_status::StatusReason::Cancelled) ); } @@ -2541,7 +2541,7 @@ mod tests { async fn cancel_before_run_transitions_to_running_closes_event_stream() { let state = create_app_state_with_registry_factory(test_db().await, |interviewer| { std::thread::sleep(std::time::Duration::from_millis(200)); - fabro_workflows::handler::default_registry(interviewer, || None) + fabro_workflow::handler::default_registry(interviewer, || None) }); let app = build_router(Arc::clone(&state), AuthMode::Disabled); diff --git a/lib/crates/fabro-server/tests/it/api.rs b/lib/crates/fabro-server/tests/it/api.rs index 5c107c792..3a405c88d 100644 --- a/lib/crates/fabro-server/tests/it/api.rs +++ b/lib/crates/fabro-server/tests/it/api.rs @@ -421,11 +421,11 @@ mod server_lifecycle { use axum::http::{Request, StatusCode}; use fabro_interview::Interviewer; use fabro_server::server::{build_router, create_app_state_with_registry_factory}; - use fabro_workflows::handler::HandlerRegistry; - use fabro_workflows::handler::agent::AgentHandler; - use fabro_workflows::handler::exit::ExitHandler; - use fabro_workflows::handler::human::HumanHandler; - use fabro_workflows::handler::start::StartHandler; + use fabro_workflow::handler::HandlerRegistry; + use fabro_workflow::handler::agent::AgentHandler; + use fabro_workflow::handler::exit::ExitHandler; + use fabro_workflow::handler::human::HumanHandler; + use fabro_workflow::handler::start::StartHandler; use tower::ServiceExt; fn gate_registry(interviewer: Arc) -> HandlerRegistry { diff --git a/lib/crates/fabro-slack/Cargo.toml b/lib/crates/fabro-slack/Cargo.toml index 4cd00485d..97c48e23a 100644 --- a/lib/crates/fabro-slack/Cargo.toml +++ b/lib/crates/fabro-slack/Cargo.toml @@ -14,7 +14,7 @@ workspace = true [dependencies] fabro-interview = { path = "../fabro-interview" } -fabro-workflows = { path = "../fabro-workflows" } +fabro-workflow = { path = "../fabro-workflow" } futures-util.workspace = true serde.workspace = true serde_json.workspace = true diff --git a/lib/crates/fabro-workflows/Cargo.toml b/lib/crates/fabro-workflow/Cargo.toml similarity index 98% rename from lib/crates/fabro-workflows/Cargo.toml rename to lib/crates/fabro-workflow/Cargo.toml index e9eb15e93..f4df489a1 100644 --- a/lib/crates/fabro-workflows/Cargo.toml +++ b/lib/crates/fabro-workflow/Cargo.toml @@ -1,5 +1,5 @@ [package] -name = "fabro-workflows" +name = "fabro-workflow" edition.workspace = true version.workspace = true publish = false diff --git a/lib/crates/fabro-workflows/README.md b/lib/crates/fabro-workflow/README.md similarity index 97% rename from lib/crates/fabro-workflows/README.md rename to lib/crates/fabro-workflow/README.md index df25f6133..a1c67e9fb 100644 --- a/lib/crates/fabro-workflows/README.md +++ b/lib/crates/fabro-workflow/README.md @@ -1,4 +1,4 @@ -# fabro-workflows +# fabro-workflow A DOT-based pipeline runner for multi-stage AI workflows. Define workflows as Graphviz `digraph` files and execute them with pluggable handlers, conditional routing, human-in-the-loop gates, parallel branching, retry policies, and checkpoint-based recovery. @@ -41,7 +41,7 @@ digraph MyPipeline { ### Parsing and Validating a Pipeline ```rust -use fabro_workflows::operations::{create, CreateOptions}; +use fabro_workflow::operations::{create, CreateOptions}; let dot_source = r#"digraph Simple { graph [goal="Run tests"] @@ -64,8 +64,8 @@ assert_eq!(graph.goal(), "Run tests"); ### Running a Pipeline ```rust -use fabro_workflows::operations::start; -use fabro_workflows::pipeline; +use fabro_workflow::operations::start; +use fabro_workflow::pipeline; // Use `operations::start(...)` for the full initialize -> execute -> retro -> finalize flow. // Use `pipeline::initialize(...)` + `pipeline::execute(...)` when you need partial lifecycle control. diff --git a/lib/crates/fabro-workflows/src/artifact.rs b/lib/crates/fabro-workflow/src/artifact.rs similarity index 100% rename from lib/crates/fabro-workflows/src/artifact.rs rename to lib/crates/fabro-workflow/src/artifact.rs diff --git a/lib/crates/fabro-workflows/src/asset_snapshot.rs b/lib/crates/fabro-workflow/src/asset_snapshot.rs similarity index 100% rename from lib/crates/fabro-workflows/src/asset_snapshot.rs rename to lib/crates/fabro-workflow/src/asset_snapshot.rs diff --git a/lib/crates/fabro-workflows/src/assets.rs b/lib/crates/fabro-workflow/src/assets.rs similarity index 100% rename from lib/crates/fabro-workflows/src/assets.rs rename to lib/crates/fabro-workflow/src/assets.rs diff --git a/lib/crates/fabro-workflows/src/condition.rs b/lib/crates/fabro-workflow/src/condition.rs similarity index 100% rename from lib/crates/fabro-workflows/src/condition.rs rename to lib/crates/fabro-workflow/src/condition.rs diff --git a/lib/crates/fabro-workflows/src/context.rs b/lib/crates/fabro-workflow/src/context.rs similarity index 100% rename from lib/crates/fabro-workflows/src/context.rs rename to lib/crates/fabro-workflow/src/context.rs diff --git a/lib/crates/fabro-workflows/src/devcontainer_bridge.rs b/lib/crates/fabro-workflow/src/devcontainer_bridge.rs similarity index 100% rename from lib/crates/fabro-workflows/src/devcontainer_bridge.rs rename to lib/crates/fabro-workflow/src/devcontainer_bridge.rs diff --git a/lib/crates/fabro-workflows/src/error.rs b/lib/crates/fabro-workflow/src/error.rs similarity index 100% rename from lib/crates/fabro-workflows/src/error.rs rename to lib/crates/fabro-workflow/src/error.rs diff --git a/lib/crates/fabro-workflows/src/event.rs b/lib/crates/fabro-workflow/src/event.rs similarity index 100% rename from lib/crates/fabro-workflows/src/event.rs rename to lib/crates/fabro-workflow/src/event.rs diff --git a/lib/crates/fabro-workflows/src/git.rs b/lib/crates/fabro-workflow/src/git.rs similarity index 100% rename from lib/crates/fabro-workflows/src/git.rs rename to lib/crates/fabro-workflow/src/git.rs diff --git a/lib/crates/fabro-workflows/src/graph.rs b/lib/crates/fabro-workflow/src/graph.rs similarity index 100% rename from lib/crates/fabro-workflows/src/graph.rs rename to lib/crates/fabro-workflow/src/graph.rs diff --git a/lib/crates/fabro-workflows/src/graph/routing.rs b/lib/crates/fabro-workflow/src/graph/routing.rs similarity index 100% rename from lib/crates/fabro-workflows/src/graph/routing.rs rename to lib/crates/fabro-workflow/src/graph/routing.rs diff --git a/lib/crates/fabro-workflows/src/handler/agent.rs b/lib/crates/fabro-workflow/src/handler/agent.rs similarity index 100% rename from lib/crates/fabro-workflows/src/handler/agent.rs rename to lib/crates/fabro-workflow/src/handler/agent.rs diff --git a/lib/crates/fabro-workflows/src/handler/command.rs b/lib/crates/fabro-workflow/src/handler/command.rs similarity index 100% rename from lib/crates/fabro-workflows/src/handler/command.rs rename to lib/crates/fabro-workflow/src/handler/command.rs diff --git a/lib/crates/fabro-workflows/src/handler/conditional.rs b/lib/crates/fabro-workflow/src/handler/conditional.rs similarity index 100% rename from lib/crates/fabro-workflows/src/handler/conditional.rs rename to lib/crates/fabro-workflow/src/handler/conditional.rs diff --git a/lib/crates/fabro-workflows/src/handler/exit.rs b/lib/crates/fabro-workflow/src/handler/exit.rs similarity index 100% rename from lib/crates/fabro-workflows/src/handler/exit.rs rename to lib/crates/fabro-workflow/src/handler/exit.rs diff --git a/lib/crates/fabro-workflows/src/handler/fan_in.rs b/lib/crates/fabro-workflow/src/handler/fan_in.rs similarity index 100% rename from lib/crates/fabro-workflows/src/handler/fan_in.rs rename to lib/crates/fabro-workflow/src/handler/fan_in.rs diff --git a/lib/crates/fabro-workflows/src/handler/human.rs b/lib/crates/fabro-workflow/src/handler/human.rs similarity index 100% rename from lib/crates/fabro-workflows/src/handler/human.rs rename to lib/crates/fabro-workflow/src/handler/human.rs diff --git a/lib/crates/fabro-workflows/src/handler/llm/api.rs b/lib/crates/fabro-workflow/src/handler/llm/api.rs similarity index 100% rename from lib/crates/fabro-workflows/src/handler/llm/api.rs rename to lib/crates/fabro-workflow/src/handler/llm/api.rs diff --git a/lib/crates/fabro-workflows/src/handler/llm/cli.rs b/lib/crates/fabro-workflow/src/handler/llm/cli.rs similarity index 100% rename from lib/crates/fabro-workflows/src/handler/llm/cli.rs rename to lib/crates/fabro-workflow/src/handler/llm/cli.rs diff --git a/lib/crates/fabro-workflows/src/handler/llm/mod.rs b/lib/crates/fabro-workflow/src/handler/llm/mod.rs similarity index 100% rename from lib/crates/fabro-workflows/src/handler/llm/mod.rs rename to lib/crates/fabro-workflow/src/handler/llm/mod.rs diff --git a/lib/crates/fabro-workflows/src/handler/llm/preamble.rs b/lib/crates/fabro-workflow/src/handler/llm/preamble.rs similarity index 100% rename from lib/crates/fabro-workflows/src/handler/llm/preamble.rs rename to lib/crates/fabro-workflow/src/handler/llm/preamble.rs diff --git a/lib/crates/fabro-workflows/src/handler/manager_loop.rs b/lib/crates/fabro-workflow/src/handler/manager_loop.rs similarity index 100% rename from lib/crates/fabro-workflows/src/handler/manager_loop.rs rename to lib/crates/fabro-workflow/src/handler/manager_loop.rs diff --git a/lib/crates/fabro-workflows/src/handler/mod.rs b/lib/crates/fabro-workflow/src/handler/mod.rs similarity index 100% rename from lib/crates/fabro-workflows/src/handler/mod.rs rename to lib/crates/fabro-workflow/src/handler/mod.rs diff --git a/lib/crates/fabro-workflows/src/handler/parallel.rs b/lib/crates/fabro-workflow/src/handler/parallel.rs similarity index 100% rename from lib/crates/fabro-workflows/src/handler/parallel.rs rename to lib/crates/fabro-workflow/src/handler/parallel.rs diff --git a/lib/crates/fabro-workflows/src/handler/prompt.rs b/lib/crates/fabro-workflow/src/handler/prompt.rs similarity index 100% rename from lib/crates/fabro-workflows/src/handler/prompt.rs rename to lib/crates/fabro-workflow/src/handler/prompt.rs diff --git a/lib/crates/fabro-workflows/src/handler/start.rs b/lib/crates/fabro-workflow/src/handler/start.rs similarity index 100% rename from lib/crates/fabro-workflows/src/handler/start.rs rename to lib/crates/fabro-workflow/src/handler/start.rs diff --git a/lib/crates/fabro-workflows/src/handler/wait.rs b/lib/crates/fabro-workflow/src/handler/wait.rs similarity index 100% rename from lib/crates/fabro-workflows/src/handler/wait.rs rename to lib/crates/fabro-workflow/src/handler/wait.rs diff --git a/lib/crates/fabro-workflows/src/hook_context.rs b/lib/crates/fabro-workflow/src/hook_context.rs similarity index 100% rename from lib/crates/fabro-workflows/src/hook_context.rs rename to lib/crates/fabro-workflow/src/hook_context.rs diff --git a/lib/crates/fabro-workflows/src/lib.rs b/lib/crates/fabro-workflow/src/lib.rs similarity index 98% rename from lib/crates/fabro-workflows/src/lib.rs rename to lib/crates/fabro-workflow/src/lib.rs index 745cf4e7c..50ff37577 100644 --- a/lib/crates/fabro-workflows/src/lib.rs +++ b/lib/crates/fabro-workflow/src/lib.rs @@ -159,7 +159,7 @@ pub mod test_support; #[doc(hidden)] pub mod transforms; -// Re-export aliases (back-compat with `fabro_workflows::transform::*` imports) +// Re-export aliases (back-compat with `fabro_workflow::transform::*` imports) #[doc(hidden)] pub mod transform { pub use crate::transforms::*; diff --git a/lib/crates/fabro-workflows/src/lifecycle/artifact.rs b/lib/crates/fabro-workflow/src/lifecycle/artifact.rs similarity index 100% rename from lib/crates/fabro-workflows/src/lifecycle/artifact.rs rename to lib/crates/fabro-workflow/src/lifecycle/artifact.rs diff --git a/lib/crates/fabro-workflows/src/lifecycle/auto_status.rs b/lib/crates/fabro-workflow/src/lifecycle/auto_status.rs similarity index 100% rename from lib/crates/fabro-workflows/src/lifecycle/auto_status.rs rename to lib/crates/fabro-workflow/src/lifecycle/auto_status.rs diff --git a/lib/crates/fabro-workflows/src/lifecycle/circuit_breaker.rs b/lib/crates/fabro-workflow/src/lifecycle/circuit_breaker.rs similarity index 100% rename from lib/crates/fabro-workflows/src/lifecycle/circuit_breaker.rs rename to lib/crates/fabro-workflow/src/lifecycle/circuit_breaker.rs diff --git a/lib/crates/fabro-workflows/src/lifecycle/disk.rs b/lib/crates/fabro-workflow/src/lifecycle/disk.rs similarity index 100% rename from lib/crates/fabro-workflows/src/lifecycle/disk.rs rename to lib/crates/fabro-workflow/src/lifecycle/disk.rs diff --git a/lib/crates/fabro-workflows/src/lifecycle/event.rs b/lib/crates/fabro-workflow/src/lifecycle/event.rs similarity index 100% rename from lib/crates/fabro-workflows/src/lifecycle/event.rs rename to lib/crates/fabro-workflow/src/lifecycle/event.rs diff --git a/lib/crates/fabro-workflows/src/lifecycle/fidelity.rs b/lib/crates/fabro-workflow/src/lifecycle/fidelity.rs similarity index 100% rename from lib/crates/fabro-workflows/src/lifecycle/fidelity.rs rename to lib/crates/fabro-workflow/src/lifecycle/fidelity.rs diff --git a/lib/crates/fabro-workflows/src/lifecycle/git.rs b/lib/crates/fabro-workflow/src/lifecycle/git.rs similarity index 100% rename from lib/crates/fabro-workflows/src/lifecycle/git.rs rename to lib/crates/fabro-workflow/src/lifecycle/git.rs diff --git a/lib/crates/fabro-workflows/src/lifecycle/hook.rs b/lib/crates/fabro-workflow/src/lifecycle/hook.rs similarity index 100% rename from lib/crates/fabro-workflows/src/lifecycle/hook.rs rename to lib/crates/fabro-workflow/src/lifecycle/hook.rs diff --git a/lib/crates/fabro-workflows/src/lifecycle/mod.rs b/lib/crates/fabro-workflow/src/lifecycle/mod.rs similarity index 100% rename from lib/crates/fabro-workflows/src/lifecycle/mod.rs rename to lib/crates/fabro-workflow/src/lifecycle/mod.rs diff --git a/lib/crates/fabro-workflows/src/node_handler.rs b/lib/crates/fabro-workflow/src/node_handler.rs similarity index 99% rename from lib/crates/fabro-workflows/src/node_handler.rs rename to lib/crates/fabro-workflow/src/node_handler.rs index 13b61bad8..c49fdd91a 100644 --- a/lib/crates/fabro-workflows/src/node_handler.rs +++ b/lib/crates/fabro-workflow/src/node_handler.rs @@ -22,7 +22,7 @@ use fabro_graphviz::graph::types::Graph as GvGraph; use tokio::time::timeout; /// Production node handler that bridges fabro-core's NodeHandler to the -/// existing fabro-workflows Handler trait via EngineServices. +/// existing fabro-workflow Handler trait via EngineServices. /// /// On each `execute()` call, forks the context, runs the handler, /// then diffs and applies changes back. diff --git a/lib/crates/fabro-workflows/src/operations/create.rs b/lib/crates/fabro-workflow/src/operations/create.rs similarity index 100% rename from lib/crates/fabro-workflows/src/operations/create.rs rename to lib/crates/fabro-workflow/src/operations/create.rs diff --git a/lib/crates/fabro-workflows/src/operations/fork.rs b/lib/crates/fabro-workflow/src/operations/fork.rs similarity index 100% rename from lib/crates/fabro-workflows/src/operations/fork.rs rename to lib/crates/fabro-workflow/src/operations/fork.rs diff --git a/lib/crates/fabro-workflows/src/operations/hydrate.rs b/lib/crates/fabro-workflow/src/operations/hydrate.rs similarity index 100% rename from lib/crates/fabro-workflows/src/operations/hydrate.rs rename to lib/crates/fabro-workflow/src/operations/hydrate.rs diff --git a/lib/crates/fabro-workflows/src/operations/mod.rs b/lib/crates/fabro-workflow/src/operations/mod.rs similarity index 100% rename from lib/crates/fabro-workflows/src/operations/mod.rs rename to lib/crates/fabro-workflow/src/operations/mod.rs diff --git a/lib/crates/fabro-workflows/src/operations/rebuild_meta.rs b/lib/crates/fabro-workflow/src/operations/rebuild_meta.rs similarity index 100% rename from lib/crates/fabro-workflows/src/operations/rebuild_meta.rs rename to lib/crates/fabro-workflow/src/operations/rebuild_meta.rs diff --git a/lib/crates/fabro-workflows/src/operations/resume.rs b/lib/crates/fabro-workflow/src/operations/resume.rs similarity index 100% rename from lib/crates/fabro-workflows/src/operations/resume.rs rename to lib/crates/fabro-workflow/src/operations/resume.rs diff --git a/lib/crates/fabro-workflows/src/operations/rewind.rs b/lib/crates/fabro-workflow/src/operations/rewind.rs similarity index 100% rename from lib/crates/fabro-workflows/src/operations/rewind.rs rename to lib/crates/fabro-workflow/src/operations/rewind.rs diff --git a/lib/crates/fabro-workflows/src/operations/source.rs b/lib/crates/fabro-workflow/src/operations/source.rs similarity index 100% rename from lib/crates/fabro-workflows/src/operations/source.rs rename to lib/crates/fabro-workflow/src/operations/source.rs diff --git a/lib/crates/fabro-workflows/src/operations/start.rs b/lib/crates/fabro-workflow/src/operations/start.rs similarity index 100% rename from lib/crates/fabro-workflows/src/operations/start.rs rename to lib/crates/fabro-workflow/src/operations/start.rs diff --git a/lib/crates/fabro-workflows/src/operations/test_support.rs b/lib/crates/fabro-workflow/src/operations/test_support.rs similarity index 100% rename from lib/crates/fabro-workflows/src/operations/test_support.rs rename to lib/crates/fabro-workflow/src/operations/test_support.rs diff --git a/lib/crates/fabro-workflows/src/operations/validate.rs b/lib/crates/fabro-workflow/src/operations/validate.rs similarity index 100% rename from lib/crates/fabro-workflows/src/operations/validate.rs rename to lib/crates/fabro-workflow/src/operations/validate.rs diff --git a/lib/crates/fabro-workflows/src/outcome.rs b/lib/crates/fabro-workflow/src/outcome.rs similarity index 100% rename from lib/crates/fabro-workflows/src/outcome.rs rename to lib/crates/fabro-workflow/src/outcome.rs diff --git a/lib/crates/fabro-workflows/src/pipeline/execute.rs b/lib/crates/fabro-workflow/src/pipeline/execute.rs similarity index 100% rename from lib/crates/fabro-workflows/src/pipeline/execute.rs rename to lib/crates/fabro-workflow/src/pipeline/execute.rs diff --git a/lib/crates/fabro-workflows/src/pipeline/execute/tests.rs b/lib/crates/fabro-workflow/src/pipeline/execute/tests.rs similarity index 100% rename from lib/crates/fabro-workflows/src/pipeline/execute/tests.rs rename to lib/crates/fabro-workflow/src/pipeline/execute/tests.rs diff --git a/lib/crates/fabro-workflows/src/pipeline/finalize.rs b/lib/crates/fabro-workflow/src/pipeline/finalize.rs similarity index 100% rename from lib/crates/fabro-workflows/src/pipeline/finalize.rs rename to lib/crates/fabro-workflow/src/pipeline/finalize.rs diff --git a/lib/crates/fabro-workflows/src/pipeline/initialize.rs b/lib/crates/fabro-workflow/src/pipeline/initialize.rs similarity index 100% rename from lib/crates/fabro-workflows/src/pipeline/initialize.rs rename to lib/crates/fabro-workflow/src/pipeline/initialize.rs diff --git a/lib/crates/fabro-workflows/src/pipeline/mod.rs b/lib/crates/fabro-workflow/src/pipeline/mod.rs similarity index 100% rename from lib/crates/fabro-workflows/src/pipeline/mod.rs rename to lib/crates/fabro-workflow/src/pipeline/mod.rs diff --git a/lib/crates/fabro-workflows/src/pipeline/parse.rs b/lib/crates/fabro-workflow/src/pipeline/parse.rs similarity index 100% rename from lib/crates/fabro-workflows/src/pipeline/parse.rs rename to lib/crates/fabro-workflow/src/pipeline/parse.rs diff --git a/lib/crates/fabro-workflows/src/pipeline/persist.rs b/lib/crates/fabro-workflow/src/pipeline/persist.rs similarity index 100% rename from lib/crates/fabro-workflows/src/pipeline/persist.rs rename to lib/crates/fabro-workflow/src/pipeline/persist.rs diff --git a/lib/crates/fabro-workflows/src/pipeline/pull_request.rs b/lib/crates/fabro-workflow/src/pipeline/pull_request.rs similarity index 100% rename from lib/crates/fabro-workflows/src/pipeline/pull_request.rs rename to lib/crates/fabro-workflow/src/pipeline/pull_request.rs diff --git a/lib/crates/fabro-workflows/src/pipeline/retro.rs b/lib/crates/fabro-workflow/src/pipeline/retro.rs similarity index 100% rename from lib/crates/fabro-workflows/src/pipeline/retro.rs rename to lib/crates/fabro-workflow/src/pipeline/retro.rs diff --git a/lib/crates/fabro-workflows/src/pipeline/transform.rs b/lib/crates/fabro-workflow/src/pipeline/transform.rs similarity index 100% rename from lib/crates/fabro-workflows/src/pipeline/transform.rs rename to lib/crates/fabro-workflow/src/pipeline/transform.rs diff --git a/lib/crates/fabro-workflows/src/pipeline/types.rs b/lib/crates/fabro-workflow/src/pipeline/types.rs similarity index 100% rename from lib/crates/fabro-workflows/src/pipeline/types.rs rename to lib/crates/fabro-workflow/src/pipeline/types.rs diff --git a/lib/crates/fabro-workflows/src/pipeline/validate.rs b/lib/crates/fabro-workflow/src/pipeline/validate.rs similarity index 100% rename from lib/crates/fabro-workflows/src/pipeline/validate.rs rename to lib/crates/fabro-workflow/src/pipeline/validate.rs diff --git a/lib/crates/fabro-workflows/src/pull_request.rs b/lib/crates/fabro-workflow/src/pull_request.rs similarity index 100% rename from lib/crates/fabro-workflows/src/pull_request.rs rename to lib/crates/fabro-workflow/src/pull_request.rs diff --git a/lib/crates/fabro-workflows/src/records/checkpoint.rs b/lib/crates/fabro-workflow/src/records/checkpoint.rs similarity index 100% rename from lib/crates/fabro-workflows/src/records/checkpoint.rs rename to lib/crates/fabro-workflow/src/records/checkpoint.rs diff --git a/lib/crates/fabro-workflows/src/records/conclusion.rs b/lib/crates/fabro-workflow/src/records/conclusion.rs similarity index 100% rename from lib/crates/fabro-workflows/src/records/conclusion.rs rename to lib/crates/fabro-workflow/src/records/conclusion.rs diff --git a/lib/crates/fabro-workflows/src/records/mod.rs b/lib/crates/fabro-workflow/src/records/mod.rs similarity index 100% rename from lib/crates/fabro-workflows/src/records/mod.rs rename to lib/crates/fabro-workflow/src/records/mod.rs diff --git a/lib/crates/fabro-workflows/src/records/run.rs b/lib/crates/fabro-workflow/src/records/run.rs similarity index 100% rename from lib/crates/fabro-workflows/src/records/run.rs rename to lib/crates/fabro-workflow/src/records/run.rs diff --git a/lib/crates/fabro-workflows/src/records/start.rs b/lib/crates/fabro-workflow/src/records/start.rs similarity index 100% rename from lib/crates/fabro-workflows/src/records/start.rs rename to lib/crates/fabro-workflow/src/records/start.rs diff --git a/lib/crates/fabro-workflows/src/retry.rs b/lib/crates/fabro-workflow/src/retry.rs similarity index 100% rename from lib/crates/fabro-workflows/src/retry.rs rename to lib/crates/fabro-workflow/src/retry.rs diff --git a/lib/crates/fabro-workflows/src/run_dir.rs b/lib/crates/fabro-workflow/src/run_dir.rs similarity index 100% rename from lib/crates/fabro-workflows/src/run_dir.rs rename to lib/crates/fabro-workflow/src/run_dir.rs diff --git a/lib/crates/fabro-workflows/src/run_lookup.rs b/lib/crates/fabro-workflow/src/run_lookup.rs similarity index 100% rename from lib/crates/fabro-workflows/src/run_lookup.rs rename to lib/crates/fabro-workflow/src/run_lookup.rs diff --git a/lib/crates/fabro-workflows/src/run_options.rs b/lib/crates/fabro-workflow/src/run_options.rs similarity index 100% rename from lib/crates/fabro-workflows/src/run_options.rs rename to lib/crates/fabro-workflow/src/run_options.rs diff --git a/lib/crates/fabro-workflows/src/run_status.rs b/lib/crates/fabro-workflow/src/run_status.rs similarity index 100% rename from lib/crates/fabro-workflows/src/run_status.rs rename to lib/crates/fabro-workflow/src/run_status.rs diff --git a/lib/crates/fabro-workflows/src/sandbox_git.rs b/lib/crates/fabro-workflow/src/sandbox_git.rs similarity index 100% rename from lib/crates/fabro-workflows/src/sandbox_git.rs rename to lib/crates/fabro-workflow/src/sandbox_git.rs diff --git a/lib/crates/fabro-workflows/src/test_support.rs b/lib/crates/fabro-workflow/src/test_support.rs similarity index 100% rename from lib/crates/fabro-workflows/src/test_support.rs rename to lib/crates/fabro-workflow/src/test_support.rs diff --git a/lib/crates/fabro-workflows/src/transforms/file_inlining.rs b/lib/crates/fabro-workflow/src/transforms/file_inlining.rs similarity index 100% rename from lib/crates/fabro-workflows/src/transforms/file_inlining.rs rename to lib/crates/fabro-workflow/src/transforms/file_inlining.rs diff --git a/lib/crates/fabro-workflows/src/transforms/import.rs b/lib/crates/fabro-workflow/src/transforms/import.rs similarity index 100% rename from lib/crates/fabro-workflows/src/transforms/import.rs rename to lib/crates/fabro-workflow/src/transforms/import.rs diff --git a/lib/crates/fabro-workflows/src/transforms/mod.rs b/lib/crates/fabro-workflow/src/transforms/mod.rs similarity index 100% rename from lib/crates/fabro-workflows/src/transforms/mod.rs rename to lib/crates/fabro-workflow/src/transforms/mod.rs diff --git a/lib/crates/fabro-workflows/src/transforms/model_resolution.rs b/lib/crates/fabro-workflow/src/transforms/model_resolution.rs similarity index 100% rename from lib/crates/fabro-workflows/src/transforms/model_resolution.rs rename to lib/crates/fabro-workflow/src/transforms/model_resolution.rs diff --git a/lib/crates/fabro-workflows/src/transforms/preamble.rs b/lib/crates/fabro-workflow/src/transforms/preamble.rs similarity index 100% rename from lib/crates/fabro-workflows/src/transforms/preamble.rs rename to lib/crates/fabro-workflow/src/transforms/preamble.rs diff --git a/lib/crates/fabro-workflows/src/transforms/stylesheet.rs b/lib/crates/fabro-workflow/src/transforms/stylesheet.rs similarity index 100% rename from lib/crates/fabro-workflows/src/transforms/stylesheet.rs rename to lib/crates/fabro-workflow/src/transforms/stylesheet.rs diff --git a/lib/crates/fabro-workflows/src/transforms/stylesheet_application.rs b/lib/crates/fabro-workflow/src/transforms/stylesheet_application.rs similarity index 100% rename from lib/crates/fabro-workflows/src/transforms/stylesheet_application.rs rename to lib/crates/fabro-workflow/src/transforms/stylesheet_application.rs diff --git a/lib/crates/fabro-workflows/src/transforms/variable_expansion.rs b/lib/crates/fabro-workflow/src/transforms/variable_expansion.rs similarity index 100% rename from lib/crates/fabro-workflows/src/transforms/variable_expansion.rs rename to lib/crates/fabro-workflow/src/transforms/variable_expansion.rs diff --git a/lib/crates/fabro-workflows/tests/it/attractor_compat.rs b/lib/crates/fabro-workflow/tests/it/attractor_compat.rs similarity index 100% rename from lib/crates/fabro-workflows/tests/it/attractor_compat.rs rename to lib/crates/fabro-workflow/tests/it/attractor_compat.rs diff --git a/lib/crates/fabro-workflows/tests/it/cp_integration.rs b/lib/crates/fabro-workflow/tests/it/cp_integration.rs similarity index 100% rename from lib/crates/fabro-workflows/tests/it/cp_integration.rs rename to lib/crates/fabro-workflow/tests/it/cp_integration.rs diff --git a/lib/crates/fabro-workflows/tests/it/daytona_integration.rs b/lib/crates/fabro-workflow/tests/it/daytona_integration.rs similarity index 98% rename from lib/crates/fabro-workflows/tests/it/daytona_integration.rs rename to lib/crates/fabro-workflow/tests/it/daytona_integration.rs index ea6ab3e37..81dbd520b 100644 --- a/lib/crates/fabro-workflows/tests/it/daytona_integration.rs +++ b/lib/crates/fabro-workflow/tests/it/daytona_integration.rs @@ -25,17 +25,17 @@ use fabro_sandbox::SandboxRecordExt; use fabro_sandbox::daytona::{DaytonaConfig, DaytonaSandbox, DaytonaSnapshotConfig}; use fabro_store::RuntimeState; use fabro_types::RunId; -use fabro_workflows::artifact::sync_artifacts_to_env; -use fabro_workflows::context::Context; -use fabro_workflows::error::FabroError; -use fabro_workflows::event::EventEmitter; -use fabro_workflows::handler::exit::ExitHandler; -use fabro_workflows::handler::start::StartHandler; -use fabro_workflows::handler::{Handler, HandlerRegistry}; -use fabro_workflows::outcome::{Outcome, OutcomeExt, StageStatus}; -use fabro_workflows::records::{Checkpoint, CheckpointExt}; -use fabro_workflows::run_options::{GitCheckpointOptions, RunOptions}; -use fabro_workflows::test_support::WorkflowRunner; +use fabro_workflow::artifact::sync_artifacts_to_env; +use fabro_workflow::context::Context; +use fabro_workflow::error::FabroError; +use fabro_workflow::event::EventEmitter; +use fabro_workflow::handler::exit::ExitHandler; +use fabro_workflow::handler::start::StartHandler; +use fabro_workflow::handler::{Handler, HandlerRegistry}; +use fabro_workflow::outcome::{Outcome, OutcomeExt, StageStatus}; +use fabro_workflow::records::{Checkpoint, CheckpointExt}; +use fabro_workflow::run_options::{GitCheckpointOptions, RunOptions}; +use fabro_workflow::test_support::WorkflowRunner; use ulid::Ulid; fn test_run_id(label: &str) -> RunId { @@ -352,7 +352,7 @@ impl Handler for LargeOutputHandler { _context: &Context, _graph: &Graph, _run_dir: &Path, - _services: &fabro_workflows::handler::EngineServices, + _services: &fabro_workflow::handler::EngineServices, ) -> Result { let mut outcome = Outcome::success(); let large_value = "x".repeat(150 * 1024); @@ -477,7 +477,7 @@ impl Handler for FileWriterHandler { _context: &Context, _graph: &Graph, _run_dir: &Path, - services: &fabro_workflows::handler::EngineServices, + services: &fabro_workflow::handler::EngineServices, ) -> Result { let content = format!("output from {}", node.id); let cmd = format!("echo '{content}' > {}.txt", node.id); @@ -627,7 +627,7 @@ async fn daytona_git_checkpoint_remote_emits_events() { let git_events: Vec<_> = events .iter() .filter_map(|e| { - if let fabro_workflows::event::WorkflowRunEvent::CheckpointCompleted { + if let fabro_workflow::event::WorkflowRunEvent::CheckpointCompleted { node_id, git_commit_sha: Some(sha), .. @@ -680,8 +680,8 @@ async fn daytona_git_checkpoint_remote_emits_events() { // Parallel git branching on Daytona // --------------------------------------------------------------------------- -use fabro_workflows::handler::fan_in::FanInHandler; -use fabro_workflows::handler::parallel::ParallelHandler; +use fabro_workflow::handler::fan_in::FanInHandler; +use fabro_workflow::handler::parallel::ParallelHandler; /// End-to-end: parallel branches get isolated worktrees in Daytona sandbox, /// fan-in fast-forwards to winner. @@ -882,7 +882,7 @@ async fn daytona_parallel_git_branching_e2e() { .filter(|e| { matches!( e, - fabro_workflows::event::WorkflowRunEvent::ParallelStarted { .. } + fabro_workflow::event::WorkflowRunEvent::ParallelStarted { .. } ) }) .collect(); @@ -896,7 +896,7 @@ async fn daytona_parallel_git_branching_e2e() { .filter(|e| { matches!( e, - fabro_workflows::event::WorkflowRunEvent::ParallelCompleted { .. } + fabro_workflow::event::WorkflowRunEvent::ParallelCompleted { .. } ) }) .collect(); @@ -914,8 +914,8 @@ async fn daytona_parallel_git_branching_e2e() { // CLI Backend on Daytona — real CLI tools via exec_command // --------------------------------------------------------------------------- -use fabro_workflows::handler::agent::{CodergenBackend, CodergenResult}; -use fabro_workflows::handler::llm::AgentCliBackend; +use fabro_workflow::handler::agent::{CodergenBackend, CodergenResult}; +use fabro_workflow::handler::llm::AgentCliBackend; /// Helper: run a real CLI backend test on Daytona. /// @@ -1061,7 +1061,7 @@ async fn daytona_cli_gemini() { // Daytona shadow commit E2E with MetadataStore // --------------------------------------------------------------------------- -use fabro_workflows::git::MetadataStore; +use fabro_workflow::git::MetadataStore; /// End-to-end test: pipeline with git checkpointing enabled + `meta_branch` /// writes shadow branch on the host repo and includes `Fabro-Checkpoint` trailer in sandbox commits. @@ -1232,7 +1232,7 @@ impl Handler for AssetCreatorHandler { _context: &Context, _graph: &Graph, _run_dir: &Path, - services: &fabro_workflows::handler::EngineServices, + services: &fabro_workflow::handler::EngineServices, ) -> Result { let script = concat!( "mkdir -p test-results && ", diff --git a/lib/crates/fabro-workflows/tests/it/integration.rs b/lib/crates/fabro-workflow/tests/it/integration.rs similarity index 98% rename from lib/crates/fabro-workflows/tests/it/integration.rs rename to lib/crates/fabro-workflow/tests/it/integration.rs index b851eeebc..034cbe879 100644 --- a/lib/crates/fabro-workflows/tests/it/integration.rs +++ b/lib/crates/fabro-workflow/tests/it/integration.rs @@ -28,27 +28,27 @@ use fabro_llm::provider::Provider; use fabro_store::RuntimeState; use fabro_types::RunId; use fabro_validate::{Severity, validate, validate_or_raise}; -use fabro_workflows::context::Context; -use fabro_workflows::error::{FabroError, FailureSignatureExt}; -use fabro_workflows::event::{EventEmitter, WorkflowRunEvent}; -use fabro_workflows::handler::agent::{AgentHandler, CodergenBackend, CodergenResult}; -use fabro_workflows::handler::command::CommandHandler; -use fabro_workflows::handler::conditional::ConditionalHandler; -use fabro_workflows::handler::default_registry; -use fabro_workflows::handler::exit::ExitHandler; -use fabro_workflows::handler::human::HumanHandler; -use fabro_workflows::handler::llm::AgentApiBackend; -use fabro_workflows::handler::llm::cli::{AgentCliBackend, BackendRouter, parse_cli_response}; -use fabro_workflows::handler::manager_loop::SubWorkflowHandler; -use fabro_workflows::handler::start::StartHandler; -use fabro_workflows::handler::wait::WaitHandler; -use fabro_workflows::handler::{Handler, HandlerRegistry}; -use fabro_workflows::outcome::{Outcome, OutcomeExt, StageStatus}; -use fabro_workflows::records::{Checkpoint, CheckpointExt}; -use fabro_workflows::run_options::{GitCheckpointOptions, RunOptions}; -use fabro_workflows::stylesheet::{apply_stylesheet, parse_stylesheet}; -use fabro_workflows::test_support::{WorkflowRunner, run_graph_with_hooks}; -use fabro_workflows::transform::{ +use fabro_workflow::context::Context; +use fabro_workflow::error::{FabroError, FailureSignatureExt}; +use fabro_workflow::event::{EventEmitter, WorkflowRunEvent}; +use fabro_workflow::handler::agent::{AgentHandler, CodergenBackend, CodergenResult}; +use fabro_workflow::handler::command::CommandHandler; +use fabro_workflow::handler::conditional::ConditionalHandler; +use fabro_workflow::handler::default_registry; +use fabro_workflow::handler::exit::ExitHandler; +use fabro_workflow::handler::human::HumanHandler; +use fabro_workflow::handler::llm::AgentApiBackend; +use fabro_workflow::handler::llm::cli::{AgentCliBackend, BackendRouter, parse_cli_response}; +use fabro_workflow::handler::manager_loop::SubWorkflowHandler; +use fabro_workflow::handler::start::StartHandler; +use fabro_workflow::handler::wait::WaitHandler; +use fabro_workflow::handler::{Handler, HandlerRegistry}; +use fabro_workflow::outcome::{Outcome, OutcomeExt, StageStatus}; +use fabro_workflow::records::{Checkpoint, CheckpointExt}; +use fabro_workflow::run_options::{GitCheckpointOptions, RunOptions}; +use fabro_workflow::stylesheet::{apply_stylesheet, parse_stylesheet}; +use fabro_workflow::test_support::{WorkflowRunner, run_graph_with_hooks}; +use fabro_workflow::transform::{ StylesheetApplicationTransform, Transform, VariableExpansionTransform, }; use ulid::Ulid; @@ -724,11 +724,11 @@ impl Handler for AlwaysFailHandler { async fn execute( &self, node: &Node, - _context: &fabro_workflows::context::Context, + _context: &fabro_workflow::context::Context, _graph: &Graph, _run_dir: &Path, - _services: &fabro_workflows::handler::EngineServices, - ) -> Result { + _services: &fabro_workflow::handler::EngineServices, + ) -> Result { Ok(Outcome::fail_classify(format!( "forced failure for {}", node.id @@ -848,11 +848,11 @@ async fn goal_gate_routes_to_retry_target_when_present() { async fn execute( &self, _node: &Node, - _context: &fabro_workflows::context::Context, + _context: &fabro_workflow::context::Context, _graph: &Graph, _run_dir: &Path, - _services: &fabro_workflows::handler::EngineServices, - ) -> Result { + _services: &fabro_workflow::handler::EngineServices, + ) -> Result { let count = self .call_count .fetch_add(1, std::sync::atomic::Ordering::SeqCst); @@ -1165,7 +1165,7 @@ async fn retry_on_failure_then_succeed() { _context: &Context, _graph: &Graph, _run_dir: &Path, - _services: &fabro_workflows::handler::EngineServices, + _services: &fabro_workflow::handler::EngineServices, ) -> Result { let count = self .call_count @@ -1420,7 +1420,7 @@ impl Handler for CounterHandler { _context: &Context, _graph: &Graph, _run_dir: &Path, - _services: &fabro_workflows::handler::EngineServices, + _services: &fabro_workflow::handler::EngineServices, ) -> Result { let count = self .call_count @@ -1445,7 +1445,7 @@ impl Handler for LargeOutputHandler { _context: &Context, _graph: &Graph, _run_dir: &Path, - _services: &fabro_workflows::handler::EngineServices, + _services: &fabro_workflow::handler::EngineServices, ) -> Result { let mut outcome = Outcome::success(); // 150KB string — well above the 100KB artifact threshold @@ -1469,7 +1469,7 @@ impl Handler for ContextSetterHandler { _context: &Context, _graph: &Graph, _run_dir: &Path, - _services: &fabro_workflows::handler::EngineServices, + _services: &fabro_workflow::handler::EngineServices, ) -> Result { let mut outcome = Outcome::success(); outcome @@ -1678,8 +1678,8 @@ async fn smoke_test_with_mock_codergen_backend() { #[tokio::test] async fn end_to_end_parallel_fan_out_fan_in() { - use fabro_workflows::handler::fan_in::FanInHandler; - use fabro_workflows::handler::parallel::ParallelHandler; + use fabro_workflow::handler::fan_in::FanInHandler; + use fabro_workflow::handler::parallel::ParallelHandler; let input = r#"digraph parallel_test { start [shape=Mdiamond] @@ -2304,7 +2304,7 @@ async fn branching_loop_back_on_failure() { _context: &Context, _graph: &Graph, _run_dir: &Path, - _services: &fabro_workflows::handler::EngineServices, + _services: &fabro_workflow::handler::EngineServices, ) -> Result { let count = self .call_count @@ -2542,8 +2542,8 @@ async fn scenario_ship_a_feature() { #[tokio::test] async fn scenario_parallel_expert_review() { - use fabro_workflows::handler::fan_in::FanInHandler; - use fabro_workflows::handler::parallel::ParallelHandler; + use fabro_workflow::handler::fan_in::FanInHandler; + use fabro_workflow::handler::parallel::ParallelHandler; let input = r#"digraph ParallelReview { start [shape=Mdiamond] @@ -2631,7 +2631,7 @@ async fn scenario_node_retries_on_retry_status() { _context: &Context, _graph: &Graph, _run_dir: &Path, - _services: &fabro_workflows::handler::EngineServices, + _services: &fabro_workflow::handler::EngineServices, ) -> Result { let count = self .call_count @@ -2897,7 +2897,7 @@ async fn manager_loop_stop_condition_satisfied_e2e() { _context: &Context, _graph: &Graph, _run_dir: &Path, - _services: &fabro_workflows::handler::EngineServices, + _services: &fabro_workflow::handler::EngineServices, ) -> Result { let mut outcome = Outcome::success(); outcome @@ -2917,7 +2917,7 @@ async fn manager_loop_stop_condition_satisfied_e2e() { _context: &Context, _graph: &Graph, _run_dir: &Path, - _services: &fabro_workflows::handler::EngineServices, + _services: &fabro_workflow::handler::EngineServices, ) -> Result { tokio::time::sleep(std::time::Duration::from_secs(10)).await; Ok(Outcome::success()) @@ -3007,7 +3007,7 @@ async fn manager_loop_max_cycles_exceeded_e2e() { _context: &Context, _graph: &Graph, _run_dir: &Path, - _services: &fabro_workflows::handler::EngineServices, + _services: &fabro_workflow::handler::EngineServices, ) -> Result { tokio::time::sleep(std::time::Duration::from_secs(10)).await; Ok(Outcome::success()) @@ -3446,7 +3446,7 @@ async fn custom_handler_registration_and_execution() { _context: &Context, _graph: &Graph, _run_dir: &Path, - _services: &fabro_workflows::handler::EngineServices, + _services: &fabro_workflow::handler::EngineServices, ) -> Result { let mut outcome = Outcome::success(); outcome @@ -3707,7 +3707,7 @@ async fn manager_loop_context_flows_e2e() { context: &Context, _graph: &Graph, _run_dir: &Path, - _services: &fabro_workflows::handler::EngineServices, + _services: &fabro_workflow::handler::EngineServices, ) -> Result { let target = context.get_string("review.target", ""); let mut outcome = Outcome::success(); @@ -3733,7 +3733,7 @@ async fn manager_loop_context_flows_e2e() { _context: &Context, _graph: &Graph, _run_dir: &Path, - _services: &fabro_workflows::handler::EngineServices, + _services: &fabro_workflow::handler::EngineServices, ) -> Result { let mut outcome = Outcome::success(); outcome.context_updates.insert( @@ -3879,7 +3879,7 @@ async fn manager_loop_child_dotfile_e2e() { #[tokio::test] async fn import_e2e_through_engine() { - use fabro_workflows::pipeline::{TransformOptions, transform, validate}; + use fabro_workflow::pipeline::{TransformOptions, transform, validate}; let dir = tempfile::tempdir().unwrap(); std::fs::write( @@ -3905,7 +3905,7 @@ async fn import_e2e_through_engine() { ) .unwrap(); - let parsed = fabro_workflows::pipeline::parse( + let parsed = fabro_workflow::pipeline::parse( r#"digraph MergeE2E { graph [goal="Test file imports"] start [shape=Mdiamond] @@ -4056,7 +4056,7 @@ impl Handler for FidelityCapturingHandler { context: &Context, _graph: &Graph, _run_dir: &Path, - _services: &fabro_workflows::handler::EngineServices, + _services: &fabro_workflow::handler::EngineServices, ) -> Result { let fidelity = context.get_string("internal.fidelity", "none"); self.captures @@ -5855,9 +5855,9 @@ mod real_llm { use fabro_config::FabroSettings; use fabro_graphviz::graph::Node; - use fabro_workflows::context::Context; - use fabro_workflows::error::FabroError; - use fabro_workflows::handler::agent::{AgentHandler, CodergenBackend, CodergenResult}; + use fabro_workflow::context::Context; + use fabro_workflow::error::FabroError; + use fabro_workflow::handler::agent::{AgentHandler, CodergenBackend, CodergenResult}; use fabro_llm::client::Client; use fabro_llm::types::{Message, Request}; @@ -5947,15 +5947,15 @@ mod real_llm { use super::{local_env, test_run_id}; use fabro_graphviz::graph::{AttrValue, Edge, Graph}; use fabro_interview::AutoApproveInterviewer; - use fabro_workflows::event::EventEmitter; - use fabro_workflows::handler::HandlerRegistry; - use fabro_workflows::handler::exit::ExitHandler; - use fabro_workflows::handler::human::HumanHandler; - use fabro_workflows::handler::start::StartHandler; - use fabro_workflows::outcome::StageStatus; - use fabro_workflows::records::{Checkpoint, CheckpointExt}; - use fabro_workflows::run_options::RunOptions; - use fabro_workflows::test_support::WorkflowRunner; + use fabro_workflow::event::EventEmitter; + use fabro_workflow::handler::HandlerRegistry; + use fabro_workflow::handler::exit::ExitHandler; + use fabro_workflow::handler::human::HumanHandler; + use fabro_workflow::handler::start::StartHandler; + use fabro_workflow::outcome::StageStatus; + use fabro_workflow::records::{Checkpoint, CheckpointExt}; + use fabro_workflow::run_options::RunOptions; + use fabro_workflow::test_support::WorkflowRunner; #[tokio::test] #[ignore] @@ -6376,7 +6376,7 @@ mod real_llm { registry.register("exit", Box::new(ExitHandler)); registry.register( "prompt", - Box::new(fabro_workflows::handler::prompt::PromptHandler::new(Some( + Box::new(fabro_workflow::handler::prompt::PromptHandler::new(Some( make_llm_backend(client), ))), ); @@ -8338,7 +8338,7 @@ async fn arc_e2e_with_real_llm() { Provider::Anthropic, Vec::new(), )) - as Box) + as Box) }); let run_dir = tempfile::tempdir().unwrap(); @@ -8688,9 +8688,8 @@ async fn large_context_values_are_offloaded_to_artifact_store() { assert_eq!(outcome.status, StageStatus::Success); // The checkpoint context should contain an artifact pointer, not the full value - let checkpoint = - fabro_workflows::records::Checkpoint::load(&dir.path().join("checkpoint.json")) - .expect("checkpoint should load"); + let checkpoint = fabro_workflow::records::Checkpoint::load(&dir.path().join("checkpoint.json")) + .expect("checkpoint should load"); let pointer_value = checkpoint .context_values .get("response.big_output") @@ -8943,11 +8942,11 @@ async fn node_dir_uses_visit_count_on_revisit() { async fn execute( &self, _node: &Node, - _context: &fabro_workflows::context::Context, + _context: &fabro_workflow::context::Context, _graph: &Graph, _run_dir: &Path, - _services: &fabro_workflows::handler::EngineServices, - ) -> Result { + _services: &fabro_workflow::handler::EngineServices, + ) -> Result { let n = self .call_count .fetch_add(1, std::sync::atomic::Ordering::SeqCst); @@ -10275,8 +10274,8 @@ fn parse_real_gemini_json() { // Git checkpoint e2e (Local) // --------------------------------------------------------------------------- -use fabro_workflows::handler::fan_in::FanInHandler; -use fabro_workflows::handler::parallel::ParallelHandler; +use fabro_workflow::handler::fan_in::FanInHandler; +use fabro_workflow::handler::parallel::ParallelHandler; /// A handler that writes a file named `{node_id}.txt` into the sandbox's /// working directory. Used to verify git worktree isolation in parallel branches. @@ -10290,7 +10289,7 @@ impl Handler for FileWriterHandler { _context: &Context, _graph: &Graph, _run_dir: &Path, - services: &fabro_workflows::handler::EngineServices, + services: &fabro_workflow::handler::EngineServices, ) -> Result { let work_dir = services.sandbox.working_directory().to_string(); let file_path = format!("{}/{}.txt", work_dir, node.id); @@ -10492,7 +10491,7 @@ async fn git_checkpoint_host_emits_events_and_diff_patch() { /// shadow branch with checkpoint data and includes `Fabro-Checkpoint` trailer in run-branch commits. #[tokio::test] async fn git_checkpoint_host_writes_shadow_branch() { - use fabro_workflows::git::MetadataStore; + use fabro_workflow::git::MetadataStore; // 1. Create a temporary git repo with an initial commit let repo = tempfile::tempdir().unwrap(); @@ -11125,7 +11124,7 @@ impl Handler for DeterministicFailHandler { _context: &Context, _graph: &Graph, _run_dir: &Path, - _services: &fabro_workflows::handler::EngineServices, + _services: &fabro_workflow::handler::EngineServices, ) -> Result { Ok(Outcome::fail_classify(&self.reason)) } @@ -11142,7 +11141,7 @@ impl Handler for TransientInfraFailHandler { _context: &Context, _graph: &Graph, _run_dir: &Path, - _services: &fabro_workflows::handler::EngineServices, + _services: &fabro_workflow::handler::EngineServices, ) -> Result { Ok(Outcome::fail_classify("connection refused")) } @@ -11159,7 +11158,7 @@ impl Handler for SignatureHintHandler { _context: &Context, _graph: &Graph, _run_dir: &Path, - _services: &fabro_workflows::handler::EngineServices, + _services: &fabro_workflow::handler::EngineServices, ) -> Result { Ok( Outcome::fail_classify("error at line 42 in commit abc123def0") @@ -11194,7 +11193,7 @@ impl Handler for VaryingReasonFailHandler { _context: &Context, _graph: &Graph, _run_dir: &Path, - _services: &fabro_workflows::handler::EngineServices, + _services: &fabro_workflow::handler::EngineServices, ) -> Result { let n = self .counter @@ -11219,7 +11218,7 @@ impl Handler for SucceedOnNthHandler { _context: &Context, _graph: &Graph, _run_dir: &Path, - _services: &fabro_workflows::handler::EngineServices, + _services: &fabro_workflow::handler::EngineServices, ) -> Result { let n = self .counter @@ -11324,7 +11323,7 @@ fn circuit_breaker_restart_graph(signature_limit: Option) -> Graph { #[test] fn e2e_normalize_failure_reason_strips_variable_data() { - use fabro_workflows::error::normalize_failure_reason; + use fabro_workflow::error::normalize_failure_reason; // Two error messages that differ only in line numbers and hex hashes // should normalize to the same string. @@ -11350,7 +11349,7 @@ fn e2e_normalize_failure_reason_strips_variable_data() { #[test] fn e2e_failure_signature_composite_key() { - use fabro_workflows::error::{FailureCategory, FailureSignature}; + use fabro_workflow::error::{FailureCategory, FailureSignature}; let sig = FailureSignature::new( "verify", @@ -11377,7 +11376,7 @@ fn e2e_failure_signature_composite_key() { #[test] fn e2e_failure_signature_hint_priority() { - use fabro_workflows::error::{FailureCategory, FailureSignature}; + use fabro_workflow::error::{FailureCategory, FailureSignature}; let sig = FailureSignature::new( "build", @@ -11394,7 +11393,7 @@ fn e2e_failure_signature_hint_priority() { #[test] fn e2e_only_deterministic_and_structural_tracked() { - use fabro_workflows::error::FailureCategory; + use fabro_workflow::error::FailureCategory; // These should be tracked assert!(FailureCategory::Deterministic.is_signature_tracked()); @@ -11846,7 +11845,7 @@ fn e2e_checkpoint_backward_compat_no_signatures() { #[test] fn e2e_checkpoint_signatures_roundtrip() { - use fabro_workflows::error::{FailureCategory, FailureSignature}; + use fabro_workflow::error::{FailureCategory, FailureSignature}; let dir = tempfile::tempdir().unwrap(); let path = dir.path().join("cp.json"); @@ -12136,7 +12135,7 @@ impl Handler for ClassifiedFailHandler { _context: &Context, _graph: &Graph, _run_dir: &Path, - _services: &fabro_workflows::handler::EngineServices, + _services: &fabro_workflow::handler::EngineServices, ) -> Result { let n = self .counter @@ -12144,7 +12143,7 @@ impl Handler for ClassifiedFailHandler { if n >= self.succeed_on { return Ok(Outcome::success()); } - let failure_class: fabro_workflows::error::FailureCategory = + let failure_class: fabro_workflow::error::FailureCategory = self.failure_class.parse().unwrap(); let mut outcome = Outcome::fail_classify("classified failure"); if let Some(ref mut f) = outcome.failure { @@ -12397,7 +12396,7 @@ impl Handler for HangingHandler { _context: &Context, _graph: &Graph, _run_dir: &Path, - _services: &fabro_workflows::handler::EngineServices, + _services: &fabro_workflow::handler::EngineServices, ) -> Result { tokio::time::sleep(std::time::Duration::from_secs(60)).await; Ok(Outcome::success()) @@ -12418,7 +12417,7 @@ impl Handler for KeepaliveHandler { _context: &Context, _graph: &Graph, _run_dir: &Path, - services: &fabro_workflows::handler::EngineServices, + services: &fabro_workflow::handler::EngineServices, ) -> Result { let start = std::time::Instant::now(); while start.elapsed() < std::time::Duration::from_millis(self.total_ms) { @@ -12597,7 +12596,7 @@ impl Handler for SlowTestHandler { _context: &Context, _graph: &Graph, _run_dir: &Path, - _services: &fabro_workflows::handler::EngineServices, + _services: &fabro_workflow::handler::EngineServices, ) -> Result { tokio::time::sleep(std::time::Duration::from_millis(self.sleep_ms)).await; Ok(Outcome::success()) @@ -12684,7 +12683,7 @@ impl Handler for AssetCreatorHandler { _context: &Context, _graph: &Graph, _run_dir: &Path, - services: &fabro_workflows::handler::EngineServices, + services: &fabro_workflow::handler::EngineServices, ) -> Result { // Create asset files via the sandbox's exec_command let script = concat!( diff --git a/lib/crates/fabro-workflows/tests/it/main.rs b/lib/crates/fabro-workflow/tests/it/main.rs similarity index 100% rename from lib/crates/fabro-workflows/tests/it/main.rs rename to lib/crates/fabro-workflow/tests/it/main.rs diff --git a/plan.md b/plan.md index 45c8811ee..5e5f87575 100644 --- a/plan.md +++ b/plan.md @@ -7,7 +7,7 @@ GitHub issue #126: Subagent IDs are currently full UUID v4 strings (36 chars, e. ## Files to modify ### 1. `lib/crates/fabro-agent/Cargo.toml` -- Add `rand.workspace = true` to `[dependencies]`. (`rand = "0.8"` is already defined in workspace root `Cargo.toml`; other crates like `fabro-cli`, `fabro-llm`, `fabro-workflows` already use it.) +- Add `rand.workspace = true` to `[dependencies]`. (`rand = "0.8"` is already defined in workspace root `Cargo.toml`; other crates like `fabro-cli`, `fabro-llm`, `fabro-workflow` already use it.) - Do **not** remove `uuid.workspace = true` — it's still used in `session.rs:58` for session IDs. ### 2. `lib/crates/fabro-agent/src/subagent.rs`