Skip to main content

licoup_workflow_runtime/
lib.rs

1//! Event-driven workflow execution: durable admission, routing, node
2//! execution and the graph driver.
3//!
4//! The generic execution machinery — capability adapters, the node facade,
5//! the continuous driver, and the in-process drive bookkeeping — is owned by
6//! `acativa::runtime` and re-exported here under the same module paths. What
7//! this crate owns is the LicoUp composition on top of it: the strategy
8//! service's `execute` vocabulary, the Assistant preflight and package
9//! importer, the Membership-profile port surface, and the evolution seams
10//! that read the host's catalog.
11//!
12//! ```text
13//!   licoup  ──►  licoup-workflow-runtime  ──►  licoup-workflow-store  ──►  licoup-workflow
14//!     (composes)            (executes)                   (persists)               (pure machine)
15//! ```
16//!
17//! Nothing here reaches back into the host. Everything the runtime needs from
18//! above arrives through [`ports`]: the host installs its answers once at its
19//! crate root, and a process that installs none runs fail-closed.
20
21// Generic execution machinery, re-exported under the established module
22// paths so `licoup_workflow_runtime::adapter::*` (and driver/node) keep
23// resolving for this crate and its consumers.
24pub use acativa::runtime::{adapter, driver, node};
25
26mod assistant;
27pub mod evolution;
28mod package;
29pub mod ports;
30mod service;
31
32// Routing and admission control are the durable store's own contracts. They
33// are re-exported at this path because the runtime is their first reader.
34pub use licoup_workflow_store::{control, routing};
35
36pub use acativa::runtime::adapter::{
37    AdapterError, AdapterExecutionStatus, CancelOutcome, CooperativeDrainAdapter,
38    NodeCapabilityAdapter, NodeInvocation, PauseOutcome, ResumeOutcome,
39    SingleWriterSessionRegistry, SteerOutcome, SyntheticCapabilityAdapter,
40};
41pub use assistant::{
42    ASSISTANT_TEMPORARY_DEFINITION_PREFIX, AssistantPreflight, PreflightFailure, PreflightReceipt,
43    preflight_assistant_graph,
44};
45pub use control::{
46    AdmissionConflict, AdmissionReceipt, AdmissionRequest, ControlOperation, ControlScope,
47    ControlledStore, InMemoryControlledStore, InterventionProxy, OperationGrant, VerifiedPrincipal,
48};
49pub use driver::{
50    ContinuousNodeDriver, DispatchedEffectReport, DriverError, DriverStepOutcome, GraphPauseReport,
51    GraphStopReport, PerNodePauseOutcome, PerNodeStopOutcome, ResultReentry,
52};
53pub use evolution::{
54    AdoptedPlanningDefaultSeam, AgentModelOptionSeam, CallbackContextFacts, CallbackCostFacts,
55    CallbackEvolutionEnricher, CallbackEvolutionPayload, CallbackFacts, CallbackObservationFacts,
56    CallbackSuggestions, DefaultEvolutionContextPort, DefaultEvolutionObservationPort,
57    DefaultEvolutionStrategyPort, EffectRecheckContext, EffectRecheckFailure, EffectRecheckReceipt,
58    EvolutionContextPort, EvolutionCostPort, EvolutionObservationPort, EvolutionStrategyPort,
59    GroupBGapReport, GroupBIntegrationGaps, LedgerEvolutionCostPort, NodeObservationSummary,
60    PlanningScopeSeam, StrategySourceSeam, StrategySuggestion, StrategyVersionSeam,
61    recheck_before_effect,
62};
63pub use node::{
64    CancellationFacts, InvocationRecord, NodeExecutionError, NodeExecutionOutcome,
65    NodeExecutionReceipt, NodeFacade, NodeObservation, PauseResult, ResumeResult, SteerResult,
66    StopResult,
67};
68pub use package::{PreparedPackage, StrategyPackageImporter, synthetic_fixture_package_bytes};
69pub use ports::{
70    ActorTurnError, CandidateFilters, EffectPort, HostPorts, ModelFactsPort, PriceFacts,
71    ProfileSnapshotAuthority, ResolvedRuntime, SharedSnapshotAuthority, StrategyEffectPermit,
72    TargetFacts, UsageLedgerPort, host_ports, install_host_ports, project_profile_snapshot,
73    project_profile_snapshots, rank_candidates, route_receipt,
74};
75pub use routing::{
76    ActivationRule, ChannelKind, DeliveryMode, FairDispatchQueue, FrozenTargetRecipient,
77    FrozenTargets, NodeCapability, NodeFeatureIndex, NodeLifecycleState, NodeMetadata, QueueBounds,
78    QueueCapacityExceeded, QueuedItem, RecipientEffectStatus, Subscription, SubscriptionPredicate,
79    SubscriptionRegistry, SubscriptionScope, TargetSelector,
80};
81pub use service::{ActorTurnPort, AssistantWakePort, StrategyService, TurnCancelDisposition};
82
83pub use licoup_workflow_store::{
84    BindingCandidate, BindingValue, STRATEGY_SCHEMA_VERSION, StrategyAuthorization,
85    StrategyDefinition, StrategyDefinitionSummary, StrategyDiagnostic, StrategyError,
86    StrategyErrorCode, StrategyProjection, StrategyStore, WorkflowStore,
87};