Expand description
Pure domain model and shared vocabulary for Aion durable workflows.
This leaf crate defines the stable identifiers, payload carrier, history events, workflow filters, schedule settings, search attributes, statuses, and error taxonomy used by every other Aion component.
§Example
use aion_core::{Payload, WorkflowId};
use serde_json::json;
let workflow_id = WorkflowId::new_v4();
let payload = Payload::from_json(&json!({ "workflow_id": workflow_id.to_string() }))?;
assert_eq!(payload.to_json()?["workflow_id"], workflow_id.to_string());Re-exports§
pub use activity_event::ActivityEvent;pub use activity_event::ActivityEventKind;pub use activity_event::MessageRole;pub use activity_event::ProgressDetail;pub use activity_event::StopKind;pub use agent_outcome::AgentOutcome;pub use agent_outcome::AgentOutcomeError;pub use cluster_event::ClusterCommand;pub use cluster_event::ClusterDeployment;pub use cluster_event::ClusterEvent;pub use cluster_event::ClusterEventMeta;pub use cluster_event::ClusterPeer;pub use cluster_event::ClusterShard;pub use cluster_event::ClusterSnapshot;pub use cluster_event::ClusterStreamError;pub use cluster_event::ClusterWorker;pub use cluster_event::DeploymentAssociation;pub use cluster_event::DesiredState;pub use cluster_event::NamespacePlacementWire;pub use cluster_event::PutOutcome;pub use cluster_event::WorkerDeathReason;pub use cluster_event::WorkerTransport;pub use current_step::current_step;pub use current_step::open_steps;pub use describe::DescribeWorkflowResponse;pub use describe::RunGeneration;pub use describe::UnservedActivity;pub use describe_live::AttemptLiveness;pub use describe_live::CurrentStep;pub use describe_live::DescribeLiveResponse;pub use describe_live::HeartbeatNote;pub use describe_live::LiveAttempt;pub use describe_live::OpenStep;pub use describe_live::StepState;pub use describe_live::TranscriptStreamHead;pub use describe_live::TranscriptTail;pub use error::ActivityError;pub use error::ActivityErrorKind;pub use error::WorkflowError;pub use event::DEFAULT_TASK_QUEUE;pub use event::DISPLAY_NAME_ATTRIBUTE;pub use event::Event;pub use event::EventEnvelope;pub use event::START_TIME_TASK_QUEUE_ATTRIBUTE;pub use event::TimerCancelCause;pub use event::WithTimeoutOutcome;pub use event::display_name;pub use event::display_name_from_attributes;pub use event::start_time_task_queue;pub use filter::WorkflowFilter;pub use filter::WorkflowSummary;pub use filter::failure_projection;pub use ids::ActivityId;pub use ids::IdError;pub use ids::PackageVersion;pub use ids::RunId;pub use ids::TimerId;pub use ids::TimerIdKind;pub use ids::WorkflowId;pub use intervention::ApprovalDecision;pub use intervention::InjectPriority;pub use intervention::InterventionCapabilities;pub use intervention::InterventionCommand;pub use intervention::InterventionKind;pub use intervention::InterventionOutcome;pub use intervention::InterventionPrimitive;pub use listing::DEFAULT_NAMESPACE;pub use listing::INTERNAL_WORKFLOW_TYPES;pub use listing::NAMESPACE_ATTRIBUTE;pub use listing::SortDirection;pub use listing::WorkflowKind;pub use listing::WorkflowListFilter;pub use listing::WorkflowListPage;pub use listing::WorkflowListRequest;pub use listing::WorkflowSort;pub use listing::WorkflowSortField;pub use listing::is_internal_workflow_type;pub use listing::namespace_from_attributes;pub use payload::ContentType;pub use payload::Payload;pub use payload::PayloadElision;pub use payload::PayloadError;pub use schedule::CatchUpPolicy;pub use schedule::OverlapPolicy;pub use schedule::ScheduleConfig;pub use schedule::ScheduleId;pub use schedule::TriggerSpec;pub use search::SearchAttributeError;pub use search::SearchAttributeSchema;pub use search::SearchAttributeType;pub use search::SearchAttributeValue;pub use search::search_attributes_from_events;pub use status::WorkflowStatus;pub use status::current_lease_terminal;pub use status::run_segment;pub use status::status_from_events;pub use workloop::AlarmCause;pub use workloop::CarryContract;pub use workloop::HealthSample;pub use workloop::HealthStatus;pub use workloop::InvariantAlarm;pub use workloop::InvariantSpec;pub use workloop::ToleranceSpec;pub use workloop::WORKFLOW_KIND_ATTRIBUTE;pub use workloop::WORKLOOP_KIND;pub use workloop::WorkloopArming;pub use workloop::WorkloopSpec;pub use workloop::WorkloopSpecError;pub use workloop::hatch_workflow_id;pub use workloop::workflow_kind;pub use workloop::workflow_kind_from_attributes;
Modules§
- activity_
event - Agent-observability transcript events for the ops console real-time channel.
The
ActivityEventenvelope for the agent-observability real-time channel. - agent_
outcome - The canonical agent-outcome record every harness emits from the seam. The canonical agent-outcome record — the ONE shape every agent harness emits as a completed agent activity’s result.
- cluster_
event - Cluster topology and ownership events for the ops console real-time channel (WS3). Cluster topology and ownership events for the ops console real-time channel (WS3).
- current_
step - Which step a run is on, folded from its own history. Which step a run is on, folded from its own history.
- describe
- Describe-workflow response projection (summary + event history). Describe-workflow response projection.
- describe_
live - The live describe projection: current step, attempt liveness, notes, transcript. The live describe projection: what a run is doing RIGHT NOW, in one shape.
- error
- Error types shared by workflow engines, callers, and activities. Error types shared by workflow and activity histories.
- event
- Durable workflow history events and envelopes. Workflow history events and their deterministic recording envelope.
- filter
- Workflow visibility filters and summaries. Workflow query filters and lightweight workflow summaries.
- ids
- Strongly typed identifiers for workflows, runs, activities, timers, and schedules. Strongly typed identifiers for workflows, activities, timers, and runs.
- intervention
- Harness-neutral mid-run intervention commands for the ops console control channel.
The
InterventionCommandtype — the harness-neutral mid-run control vocabulary. - listing
- The workflow list contract: filter, sort, request, page. The workflow list contract: filter, sort, request, and page.
- payload
- Type-erased payload bytes with explicit content-type metadata. Opaque serialized payloads carried through histories and errors.
- schedule
- Schedule configuration, trigger, and catch-up policy models. Schedule identifiers, trigger specifications, and persisted schedule configuration.
- search
- Search-attribute schemas and values used by visibility queries. Typed search attributes used by workflow visibility projections.
- status
- Workflow lifecycle status derivation. Workflow status projection from authoritative event history.
- workloop
- Workloop vocabulary: arming, invariants, tolerance, health, alarms, hatch identity. Workloop domain vocabulary: arming, invariants, tolerance, health, alarms, and the hatch dedupe identity.