Expand description
Typed Workflow IR and validation for CodeWhale.
This crate deliberately stops at the Rust-owned IR boundary. Runtime tool exposure, worktree application, replay, and model execution are layered on top only after their cancellation and evidence semantics are proven.
Re-exports§
pub use fleet_exact::EXACT_FLEET_SCHEMA_KIND;pub use fleet_exact::EXACT_FLEET_SCHEMA_REVISION;pub use fleet_exact::ExactFleet;pub use fleet_exact::ExactFleetError;pub use fleet_exact::ExactMember;pub use fleet_exact::FrozenRoute;pub use fleet_exact::LEGACY_FLEET_SCHEMA_KIND;pub use fleet_exact::PermissionCeiling;pub use fleet_exact::ROLE_ALIASES;pub use fleet_exact::ROUTER_PUBLIC_ID;pub use fleet_exact::ROUTER_PUBLIC_ROLE;pub use fleet_exact::ReasoningTier;pub use fleet_exact::RequestedReasoning;pub use fleet_exact::RouterMember;pub use fleet_exact::ShellCeiling;pub use fleet_exact::canonical_member_key;pub use fleet_exact::canonical_role_key;pub use fleet_preflight::CredentialReadiness;pub use fleet_preflight::EndpointIdentity;pub use fleet_preflight::PreflightError;pub use fleet_preflight::PreflightedRoute;pub use fleet_preflight::RoutePreflight;pub use fleet_reasoning::EffectiveReasoning;pub use fleet_reasoning::EffectiveReasoningSource;pub use fleet_reasoning::FAITHFUL_WIRE_TIERS;pub use fleet_reasoning::FleetTaskReceipt;pub use fleet_reasoning::ProviderEffectiveReasoning;pub use fleet_reasoning::ProviderReasoningControl;pub use fleet_reasoning::ROUTER_CALL_REASONING;pub use fleet_reasoning::ROUTER_MAX_OUTPUT_TOKENS;pub use fleet_reasoning::ROUTER_REASONING_FIELD;pub use fleet_reasoning::ROUTER_SUMMARY_MAX_CHARS;pub use fleet_reasoning::ROUTING_SCOPE;pub use fleet_reasoning::ReasoningCapability;pub use fleet_reasoning::ReasoningResolveError;pub use fleet_reasoning::ResolvedReasoning;pub use fleet_reasoning::RouterAvailability;pub use fleet_reasoning::RouterCallDisclosure;pub use fleet_reasoning::RouterCallInput;pub use fleet_reasoning::RouterCallPlan;pub use fleet_reasoning::RouterDecision;pub use fleet_reasoning::RouterDecisionError;pub use fleet_reasoning::RouterIdentity;pub use fleet_reasoning::RoutingDisclosure;pub use fleet_reasoning::RoutingPayload;pub use fleet_reasoning::TaskShape;pub use fleet_reasoning::bounded_routing_payload;pub use fleet_reasoning::parse_router_decision;pub use fleet_reasoning::resolve_exact_member_reasoning;pub use fleet_reasoning::resolve_legacy_reasoning;pub use fleet_reasoning::router_call_plan;pub use fleet_reasoning::router_system_prompt;pub use fleet_reasoning::router_user_message;pub use fleet_reasoning::transport_disclosure;pub use fleet_snapshot::FleetSnapshot;pub use fleet_snapshot::FleetSnapshotLegacyRole;pub use fleet_snapshot::FleetSnapshotMember;pub use fleet_snapshot::FleetSnapshotRouter;pub use fleet_snapshot::QualifiedFleetId;pub use fleet_snapshot::captured_legacy_inline_router;pub use fleet_snapshot::verify_snapshot_content_hash;pub use reasoning_router::CapturedReasoningRouter;pub use reasoning_router::FleetRouterRef;pub use reasoning_router::LEGACY_INLINE_ROUTER_ORIGIN;pub use reasoning_router::QualifiedRouterId;pub use reasoning_router::REASONING_ROUTER_DIR;pub use reasoning_router::REASONING_ROUTER_SCHEMA_KIND;pub use reasoning_router::REASONING_ROUTER_SERVICE_KIND;pub use reasoning_router::ReasoningRouterError;pub use reasoning_router::ReasoningRouterProfile;pub use reasoning_router::RouterCallReasoning;pub use redaction::REDACTION_ABSOLUTE_PATH;pub use redaction::REDACTION_RELATIVE_PATH;pub use redaction::REDACTION_SECRET;pub use redaction::Redaction;pub use redaction::redact_for_disclosure;
Modules§
- experimental_
search - Provider-neutral experimental search authoring for Workflow.
- fleet_
composition - Setup-time Fleet composition: a suggestion schema with no runtime authority.
- fleet_
exact - Exact named-Fleet schema — fully resolved members, no late model choice.
- fleet_
preflight - Worker route preflight: everything about a route that must be true and frozen before a Workflow starts, and certainly before any Router is asked anything.
- fleet_
reasoning - The one requested → effective reasoning resolver, with provider capability normalization, preserved provenance, and durable receipts that carry disclosure without content.
- fleet_
snapshot - Immutable Fleet snapshot taken at Workflow start.
- reasoning_
router - The Adaptive Reasoning Router — a saved, reusable service, not a Fleet member.
- redaction
- Redaction for anything that can reach a log, a span, or a durable receipt.
Structs§
- Branch
Candidate - Branch
Result - Branch
Spec - Branch
Tournament - Budget
Spec - Completion
Request - Completion
Response - Cond
Spec - Control
Node Result - Elevation
Options - Options that refine elevation assessment beyond the IR itself.
- Expand
Spec - Fleet
Document - A parsed fleet file plus the provenance a Workflow snapshot needs.
- Fleet
Role Map - Named fleet roster: role name → AgentProfile id.
- Fleet
Search Root - One labelled place fleet files are looked up.
- Gate
Spec - One gate node in a Workflow definition.
- Gate
Status Line - Handoff
Artifact - Lane-scoped handoff artifact produced by a role for the next role.
- Iteration
Receipt - What one iteration actually did.
- Lane
Gate Board - In-memory (and serializable) gate + handoff store for one lane.
- Leaf
Result - Leaf
Spec - Loop
Until Spec - Mock
Leaf Outcome - Mock
Model Provider - Mock
Workflow Executor - Model
Capabilities - Model
Policy - Named
Fleet - Parsed named fleet file.
- Pareto
Frontier - Permission
Spec - Phase
- Phase
Plan - Promotion
Gate - Promotion
Gate Decision - Promotion
Policy - Provider
Model - Provider
Registry - Reduce
Spec - Replay
Control Record - Replay
Leaf Record - Replay
Options - Resolved
Model - Resolved
Workflow Agent - Result of resolving a workflow step against a fleet roster.
- Review
Repair Bounds - Explicit ceilings on a review→repair loop. There is no unbounded variant.
- Review
Repair Loop - A bounded review→repair loop over one lane’s artifact.
- Review
Repair Policy - Policy knobs that are not ceilings.
- Route
Receipt - The exact route a reviewer or verifier ran on.
- Sequence
Spec - Student
Replay Metrics - Student
Replay Result - Student
Replay Test Result - Task
- Teacher
Candidate - Teacher
Review Report - Teacher
Review Spec - Workflow
Config - Workflow
Execution - Workflow
Fleet Limits - Workflow
Fleet Shape - Workflow
Memo Usage - Workflow
Plan - Workflow
Plan Elevation - Summary of why a Workflow plan needs (or does not need) elevated approval.
- Workflow
Replay Executor - Workflow
Replay Trace - Workflow
Spec - Workflow
Usage
Enums§
- Agent
Type - Control
Node Kind - Failure
Policy - Fleet
Role Resolve Error - Fleet
Schema - Which form a
fleets/<name>.tomlfile is in. - Gate
Error - Gate
Kind - Kind of verification / review gate.
- GateOn
- When a gate fires relative to role lifecycle.
- Gate
OnFail - Policy when a gate fails.
- Gate
Outcome - Outcome reported by a verifier/reviewer/human for a gate evaluation.
- Gate
State - Live state of one gate within a lane.
- Isolation
Mode - Iteration
Verdict - The verdict a reviewer/verifier pair produced for one iteration.
- Javascript
Workflow Error - Json
Repair Error - Model
Policy Error - Model
Provider Error - Model
Role - Model
Selection Source - Named
Fleet Error - Plan
Risk Hint - Coarse risk classification from the structured plan
riskfield. - Promotion
Strategy - Review
Repair Error - Refusal from
ReviewRepairLoop::begin_iterationorReviewRepairLoop::record_iteration. - Routed
By - Who chose the route for a step. Distinguishing these is the difference between “the user picked this model” and “a Router picked it”.
- Stop
Reason - Why a review→repair loop stopped. Every variant is terminal.
- Task
Mode - Teacher
Candidate Kind - Teacher
Candidate Status - Tournament
Ordering - Workflow
Execution Error - Workflow
Fleet Limit Error - Workflow
Node - Workflow
Replay Error - Workflow
RunStatus - Workflow
Validation Error
Constants§
- DEFAULT_
FLEET_ WORKFLOW_ MAX_ AGENTS - Default hard ceiling on total agents a Fleet-shaped Workflow plan may launch. Matches the imperative VM lifetime cap (1_000 agents per run).
- DEFAULT_
FLEET_ WORKFLOW_ MAX_ DEPTH - DEFAULT_
HIGH_ BUDGET_ THRESHOLD - Default soft token budget from product config (
[workflow].default_token_budget). Plans requesting more than this are treated as high-budget. - STOPSHIP_
REQUIRED_ ROLES - Required roles for the stopship dogfood fleet (#4178).
Traits§
Functions§
- assess_
plan_ risk_ string - Lightweight assessment from a planner
riskstring alone (before IR lower). - assess_
workflow_ elevation - Assess elevation for a compiled
WorkflowSpec. - compile_
javascript_ workflow - compile_
typescript_ workflow - compute_
leaf_ input_ hash - exact_
schema_ revision - The schema revision an exact document is expected to declare.
- is_
shell_ tool - True for a tool that can run a shell command.
- is_
write_ tool - True for a tool that can modify files.
- leaf_
is_ write_ capable - A leaf is write-capable when it can mutate the workspace.
- leaf_
wants_ worktree - Effective worktree flag for a leaf given whether it is being lowered inside a parallel branch.
- load_
named_ fleet - Load fleet by name from search paths (first hit wins).
- load_
named_ fleet_ file - normalize_
file_ scope_ root - Normalize the suffix-glob spelling accepted by declarative workflow
file_scopeinto the concrete directory root enforced at runtime. - normalize_
token - Normalize a role/profile token: trim, lowercase. Returns
Noneif empty or if the token contains whitespace / quotes / backticks /=. - parse_
json_ with_ repair - parse_
named_ fleet - Parse a fleet TOML document.
- repair_
json_ text_ once - resolve_
workflow_ agent - Resolve step identity from optional
role+ optional explicitprofileagainst a fleet role map. - scopes_
overlap - stopship_
gate_ pipeline - Canonical stopship-style gate pipeline (scout → implementer → reviewer → verifier → release_lead).
- teacher_
candidates_ from_ execution - validate_
role_ token - Validate a role token the same way leaf profiles are validated.