Axial.Guardrails
0.17.0
Prefix Reserved
dotnet add package Axial.Guardrails --version 0.17.0
NuGet\Install-Package Axial.Guardrails -Version 0.17.0
<PackageReference Include="Axial.Guardrails" Version="0.17.0" />
<PackageVersion Include="Axial.Guardrails" Version="0.17.0" />
<PackageReference Include="Axial.Guardrails" />
paket add Axial.Guardrails --version 0.17.0
#r "nuget: Axial.Guardrails, 0.17.0"
#:package Axial.Guardrails@0.17.0
#addin nuget:?package=Axial.Guardrails&version=0.17.0
#tool nuget:?package=Axial.Guardrails&version=0.17.0
Axial
<picture> <source media="(prefers-color-scheme: dark)" srcset="docs/content/img/axial-readme-dark.svg"> <source media="(prefers-color-scheme: light)" srcset="docs/content/img/axial-readme-light.svg"> <img alt="Axial" src="docs/content/img/axial-readme-light.svg" width="160"> </picture>
Write asynchronous F# workflows whose expected failures and required dependencies are visible in their types.
Axial is close to 1.0. Expect small refinements, not large API changes.
- Works with the code you have.
Asyncbinds directly inflow { }.TaskandTask<Result<_, _>>(FsToolkit'sTaskResult) bind throughColdTask, which passes in the flow's cancellation token. If that code throws, the exception is a defect, not one of your errors. Add Axial to an existing Task application - Cancellation and time belong to the runtime. Interrupting a flow stops its child fibers and waits for their cleanup. Timeouts, retries and sleeps read the runtime clock, so a test controls time. Concurrency
- Guardrails is optional. Core Axial needs no analyzer. Add
Axial.Guardrailswhen the code settles, or when an agent is writing it. Guardrails
Your first flow
A handler usually needs services and can fail, but a Task signature shows neither fact. Flow<'env, 'error, 'value>
makes both part of the contract.
open Axial
type CheckoutError =
| OrderNotFound of orderId: int
| PaymentDeclined of reason: string
type Receipt = { OrderId: int; Total: decimal; Reference: string }
type CheckoutEnv =
{ FindTotal: int -> ColdTask<Result<decimal, CheckoutError>>
Charge: decimal -> ColdTask<Result<string, CheckoutError>> }
let checkout orderId : Flow<CheckoutEnv, CheckoutError, Receipt> =
flow {
let! findTotal = Flow.envWith _.FindTotal
let! charge = Flow.envWith _.Charge
let! total = findTotal orderId
let! reference = charge total
return { OrderId = orderId; Total = total; Reference = reference }
}
The application supplies live functions. A test supplies a record of fakes. The workflow does not change.
Adding a timeout and a retry leaves the signature unchanged:
open System
let checkoutOrder orderId : Flow<CheckoutEnv, CheckoutError, Receipt> =
checkout orderId
|> Flow.retry (Schedule.recurs 2)
|> Flow.timeout (TimeSpan.FromSeconds 5.0) (PaymentDeclined "checkout timed out")
Clock, random, GUID and logging come from the runtime, not from 'env. Flow.runTest env swaps in a manual clock,
seeded random, sequential GUIDs and a recording log; time moves only when the test advances it. Override one for a
single flow with Flow.withClock, Flow.withRandom, Flow.withGuid or Flow.withLogSink.
See runtime services.
Install
dotnet add package Axial
Package family
Axial: the core workflow model: typed failures, dependencies, concurrency, resources, schedules, streams, and runtime platform services.Axial.Process: external process composition, pipelines, streaming output, typed failures, cancellation, and cleanup. Process docsAxial.HttpClient: typed HTTP requests, response handling, and reliability policies. HTTP docsAxial.Configuration: layered environment, argument, JSON, browser, and Microsoft configuration decoded by Reified, with redacted secrets. Configuration docsAxial.Console: standard streams, redirection, and terminal control. Console docsAxial.FileSystem: file-system access, streaming traversal, atomic writes, and the append log. FileSystem docsAxial.WebSocket: typed WebSocket client sessions and errors. WebSocket docsAxial.Hosting,Axial.Hosting.AspNetCore,Axial.Hosting.GenHttp,Axial.Hosting.Node, andAxial.Hosting.Browser: host adapters. Hosting docsAxial.ElmishFlows: Elmish commands and subscriptions backed by workflows. Elmish docsAxial.TelemetryandAxial.Telemetry.JavaScript: .NET and Fable tracing, metrics, and dumps. Telemetry docsAxial.GuardrailsandAxial.Tool: effect-boundary analysis and theaxialpolicy CLI. Guardrails docs
See the package maturity table for each package's rating and application evidence. The package catalogue links the first-class libraries and the complete compatibility matrix.
Documentation and examples
- Getting started
- Add Axial to an existing Task application
- Failures and defects
- Dependencies and services
- Concurrency
- Process
- HTTP client
- Runnable examples
- Integration reference application and HTTP host examples
Reified integration
Reified declares value, model, JSON, and HTTP contracts. Axial's optional server adapters execute Reified HTTP contracts as workflows; neither core depends on the other. Axial 0.12 requires Reified 0.12.1 or later, whose Fable schema builder supports typed schema construction and Config.load decoding on Fable.
Learn more about Target Frameworks and .NET Standard.
This package has no dependencies.
NuGet packages
This package is not used by any NuGet packages.
GitHub repositories
This package is not used by any popular GitHub repositories.
| Version | Downloads | Last Updated |
|---|---|---|
| 0.17.0 | 55 | 11/27/2026 |
| 0.16.0 | 70 | 11/25/2026 |
| 0.15.0 | 105 | 11/19/2026 |
| 0.14.1 | 108 | 11/8/2026 |
| 0.14.0 | 100 | 11/8/2026 |
| 0.13.0 | 125 | 11/7/2026 |
| 0.12.0 | 125 | 11/5/2026 |
| 0.11.3 | 116 | 10/19/2026 |
| 0.11.2 | 113 | 10/19/2026 |
| 0.11.1 | 99 | 10/19/2026 |
| 0.11.0 | 125 | 10/19/2026 |
| 0.10.0 | 175 | 10/1/2026 |
| 0.9.3 | 332 | 9/14/2026 |
| 0.9.2 | 126 | 9/14/2026 |
| 0.9.1 | 119 | 9/11/2026 |
| 0.9.0 | 110 | 9/11/2026 |
| 0.8.0 | 111 | 9/11/2026 |
| 0.7.1 | 141 | 8/18/2026 |
| 0.7.0 | 155 | 8/17/2026 |