ForgeTrust.AppSurface.Flow 0.1.0-rc.2

This is a prerelease version of ForgeTrust.AppSurface.Flow.
There is a newer version of this package available.
See the version list below for details.
dotnet add package ForgeTrust.AppSurface.Flow --version 0.1.0-rc.2
                    
NuGet\Install-Package ForgeTrust.AppSurface.Flow -Version 0.1.0-rc.2
                    
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="ForgeTrust.AppSurface.Flow" Version="0.1.0-rc.2" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="ForgeTrust.AppSurface.Flow" Version="0.1.0-rc.2" />
                    
Directory.Packages.props
<PackageReference Include="ForgeTrust.AppSurface.Flow" />
                    
Project file
For projects that support Central Package Management (CPM), copy this XML node into the solution Directory.Packages.props file to version the package.
paket add ForgeTrust.AppSurface.Flow --version 0.1.0-rc.2
                    
#r "nuget: ForgeTrust.AppSurface.Flow, 0.1.0-rc.2"
                    
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
#:package ForgeTrust.AppSurface.Flow@0.1.0-rc.2
                    
#:package directive can be used in C# file-based apps starting in .NET 10 preview 4. Copy this into a .cs file before any lines of code to reference the package.
#addin nuget:?package=ForgeTrust.AppSurface.Flow&version=0.1.0-rc.2&prerelease
                    
Install as a Cake Addin
#tool nuget:?package=ForgeTrust.AppSurface.Flow&version=0.1.0-rc.2&prerelease
                    
Install as a Cake Tool

ForgeTrust.AppSurface.Flow

ForgeTrust.AppSurface.Flow provides stable contracts for typed long-running app processes.

Release Guidance

AppSurface has cut the first coordinated v0.1.0 release candidate. Before installing this package from a prerelease feed, read the v0.1.0 RC 2 release note for current release risk, migration guidance, and package readiness.

What It Includes

  • FlowNodeOutcome<TContext> and the sealed outcome records FlowNext<TContext>, FlowWait<TContext>, FlowTimedOut<TContext>, FlowComplete<TContext>, and FlowFaultOutcome<TContext>.
  • IFlowNode<TContext>, FlowExecutionContext<TContext>, and FlowResumeEvent.
  • FlowGraphBuilder<TContext> and immutable FlowDefinition<TContext> graph validation.
  • IFlowDefinitionRegistry for host and adapter lookup by context type, flow id, and version.
  • IFlowRunner<TContext> and InMemoryFlowRunner<TContext> for local tests and examples.
  • Passive AppSurfaceFlowModule service registration.

What It Does Not Include

  • Durable persistence, external event queues, timers, replay, or storage.
  • ASP.NET Core endpoints, middleware, authorization handlers, or UI.
  • Semantic Kernel. Keep agentic or LLM-assisted authoring in samples or future packages until the core process contract has settled.
  • Required preview C# union syntax.

Basic Shape

var definition = FlowGraphBuilder<ApprovalState>
    .Create("approval-request")
    .AddNode("review", new ApprovalReviewNode())
    .StartAt("review")
    .Build();

var result = await runner.RunAsync(definition, new ApprovalState("created"));

Nodes return explicit discriminated outcomes:

public sealed class ApprovalReviewNode : IFlowNode<ApprovalState>
{
    public ValueTask<FlowNodeOutcome<ApprovalState>> ExecuteAsync(
        FlowExecutionContext<ApprovalState> context,
        CancellationToken cancellationToken = default)
    {
        if (context.ResumeEvent is null)
        {
            return ValueTask.FromResult<FlowNodeOutcome<ApprovalState>>(
                FlowNodeOutcome<ApprovalState>.Wait("approval-submitted", context.State));
        }

        return ValueTask.FromResult<FlowNodeOutcome<ApprovalState>>(
            FlowNodeOutcome<ApprovalState>.Complete(context.State with { Status = "approved" }));
    }
}

Decisions And Pitfalls

  • Flow ids, versions, and node ids are durable identifiers. Treat them like persisted schema once real instances exist.
  • Declare every Next target in AddNode. The builder validates missing targets, and runners reject undeclared runtime targets.
  • The in-memory runner stops at waits. It does not persist state, deliver events, or create timers.
  • Use FlowWait<TContext>.Timeout as metadata for durable hosts. The core runner reports the timeout request but does not race timers.
  • Keep context types serializer-friendly if you plan to use Durable Task. The Durable Task adapter validates JSON round-trips before evaluating nodes.
  • Native C# discriminated unions can become authoring sugar later, but this package intentionally ships stable sealed records today.
Product Compatible and additional computed target framework versions.
.NET net10.0 is compatible.  net10.0-android was computed.  net10.0-browser was computed.  net10.0-ios was computed.  net10.0-maccatalyst was computed.  net10.0-macos was computed.  net10.0-tvos was computed.  net10.0-windows was computed. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

NuGet packages (2)

Showing the top 2 NuGet packages that depend on ForgeTrust.AppSurface.Flow:

Package Downloads
ForgeTrust.AppSurface.Flow.DurableTask

ForgeTrust.AppSurface.Flow.DurableTask package for AppSurface application composition.

ForgeTrust.AppSurface.Durable

ForgeTrust.AppSurface.Durable package for AppSurface application composition.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last Updated
0.2.0-preview.8 493 8/23/2026
0.2.0-preview.7 357 8/16/2026
0.2.0-preview.6 358 8/12/2026
0.2.0-preview.5 211 8/1/2026
0.2.0-preview.4 212 7/18/2026
0.2.0-preview.2 541 7/3/2026
0.2.0-preview.1 306 6/28/2026
0.1.0 127 7/2/2026
0.1.0-rc.4 277 6/16/2026
0.1.0-rc.3 142 6/8/2026
0.1.0-rc.2 68 6/3/2026