Repository F# setup
open System
open System.IO
open System.Threading
open System.Threading.Tasks
open Axial
open Axial.Layers
open Axial.Console
open Axial.FileSystem
open Axial.Hosting
open Axial.Hosting.Browser
open Axial.Hosting.Node
open Axial.PlatformService
open Axial.State
open Axial.Telemetry
open Axial.Telemetry.JavaScript

Platform services

Platform services expose common host capabilities to Flow with cancellation, replaceable implementations, and typed errors where callers can recover. They are supporting parts of Axial Core rather than separate documentation contexts.

Higher-level libraries build their own programming models on top of Axial and these capabilities. Axial.Process composes external commands and streams. Axial.HttpClient models HTTP requests, responses, and reliability. Each has its own guides and API reference.

Service Wraps Axial API
Clock DateTimeOffset.UtcNow Current time and derived Unix-time readers
Logging Host logging Structured messages and exception-preserving logging
Randomness and GUIDs System.Random, Guid.NewGuid() Explicit random values, byte generation, and GUID creation
Environment variables Environment.GetEnvironmentVariable Required and parsed reads with EnvironmentVariableError
Console System.Console Standard streams, redirection, and terminal control
File system System.IO.File and Directory File and directory operations with FileSystemError
open Axial
open Axial.Console

A workflow declares the capability it needs:

let greet name : Flow<#IHasConsole, Never, unit> =
    Console.writeLine $"Hello, {name}."

The host supplies the live implementation at the edge. Tests supply a recording or in-memory implementation of the same contract.

In this section

  1. Platform-service bundle — clock, logging, randomness, GUIDs, and environment variables.
  2. Console — standard streams, redirection, and terminal control.
  3. File system — files, directories, paths, and typed failures.
  4. Using existing services — compose BaseRuntime with application dependencies.

Telemetry instruments the runtime rather than defining a workflow dependency. Hosting supplies environments and application lifecycle integration.