Skip to main content

Crate codewhale_workflow

Crate codewhale_workflow 

Source
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.

Structs§

BranchCandidate
BranchResult
BranchSpec
BranchTournament
BudgetSpec
CompletionRequest
CompletionResponse
CondSpec
ControlNodeResult
ElevationOptions
Options that refine elevation assessment beyond the IR itself.
ExpandSpec
FleetRoleMap
Named fleet roster: role name → AgentProfile id.
GateSpec
One gate node in a Workflow definition.
GateStatusLine
HandoffArtifact
Lane-scoped handoff artifact produced by a role for the next role.
LaneGateBoard
In-memory (and serializable) gate + handoff store for one lane.
LeafResult
LeafSpec
LoopUntilSpec
MockLeafOutcome
MockModelProvider
MockWorkflowExecutor
ModelCapabilities
ModelPolicy
NamedFleet
Parsed named fleet file.
ParetoFrontier
PermissionSpec
Phase
PhasePlan
PromotionGate
PromotionGateDecision
PromotionPolicy
ProviderModel
ProviderRegistry
ReduceSpec
ReplayControlRecord
ReplayLeafRecord
ReplayOptions
ResolvedModel
ResolvedWorkflowAgent
Result of resolving a workflow step against a fleet roster.
SequenceSpec
StudentReplayMetrics
StudentReplayResult
StudentReplayTestResult
Task
TeacherCandidate
TeacherReviewReport
TeacherReviewSpec
WorkflowConfig
WorkflowExecution
WorkflowFleetLimits
WorkflowFleetShape
WorkflowMemoUsage
WorkflowPlan
WorkflowPlanElevation
Summary of why a Workflow plan needs (or does not need) elevated approval.
WorkflowReplayExecutor
WorkflowReplayTrace
WorkflowSpec
WorkflowUsage

Enums§

AgentType
ControlNodeKind
FailurePolicy
FleetRoleResolveError
GateError
GateKind
Kind of verification / review gate.
GateOn
When a gate fires relative to role lifecycle.
GateOnFail
Policy when a gate fails.
GateOutcome
Outcome reported by a verifier/reviewer/human for a gate evaluation.
GateState
Live state of one gate within a lane.
IsolationMode
JavascriptWorkflowError
JsonRepairError
ModelPolicyError
ModelProviderError
ModelRole
ModelSelectionSource
NamedFleetError
PlanRiskHint
Coarse risk classification from the structured plan risk field.
PromotionStrategy
TaskMode
TeacherCandidateKind
TeacherCandidateStatus
WorkflowExecutionError
WorkflowFleetLimitError
WorkflowNode
WorkflowReplayError
WorkflowRunStatus
WorkflowValidationError

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§

ModelProvider

Functions§

assess_plan_risk_string
Lightweight assessment from a planner risk string alone (before IR lower).
assess_workflow_elevation
Assess elevation for a compiled WorkflowSpec.
compile_javascript_workflow
compile_typescript_workflow
compute_leaf_input_hash
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_token
Normalize a role/profile token: trim, lowercase. Returns None if 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 explicit profile against 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.

Type Aliases§

JavascriptWorkflowResult
WorkflowIr
WorkflowPhase
WorkflowRole
WorkflowTask