Sylin.Koan.Jobs 0.20.7

dotnet add package Sylin.Koan.Jobs --version 0.20.7
                    
NuGet\Install-Package Sylin.Koan.Jobs -Version 0.20.7
                    
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="Sylin.Koan.Jobs" Version="0.20.7" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="Sylin.Koan.Jobs" Version="0.20.7" />
                    
Directory.Packages.props
<PackageReference Include="Sylin.Koan.Jobs" />
                    
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 Sylin.Koan.Jobs --version 0.20.7
                    
#r "nuget: Sylin.Koan.Jobs, 0.20.7"
                    
#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 Sylin.Koan.Jobs@0.20.7
                    
#: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=Sylin.Koan.Jobs&version=0.20.7
                    
Install as a Cake Addin
#tool nuget:?package=Sylin.Koan.Jobs&version=0.20.7
                    
Install as a Cake Tool

Sylin.Koan.Jobs

Reference Sylin.Koan.Jobs when an Entity-owned business transition should run outside the request that requested it, survive retries, and remain inspectable.

Install

dotnet add package Sylin.Koan.Jobs

The package composes through the application's existing AddKoan() call. No Jobs-specific registration is required. With no durable Data provider, the automatic ledger is deliberately in-memory; reference SQLite, PostgreSQL, SQL Server, MongoDB, or another durable Koan Data provider when work must survive restart.

Usage: run Entity-owned work

public sealed class ReviewRequest : Entity<ReviewRequest>, IKoanJob<ReviewRequest>
{
    public ReviewPriority Priority { get; set; }

    public static Task Execute(ReviewRequest request, JobContext context, CancellationToken ct)
    {
        request.Assess();
        return context.Progress(1, "Ready for review");
    }
}

await review.Job.Submit();
var status = await review.Job.Status();

The same pointwise intent applies to a business selection or a provider-bounded Entity stream:

JobSubmission selected = await reviews
    .Where(review => review.Priority == ReviewPriority.High)
    .Submit();

JobSubmission streamed = await ReviewRequest
    .QueryStream(review => review.Priority == ReviewPriority.High)
    .Submit();

JobSubmission is a fixed-size summary of ledger acceptance, not handler completion. Accepted counts new ledger records plus declared-idempotency coalesces; PendingCommit says those records are still contingent on the ambient transaction. A source or submission failure throws JobSubmissionException, and cancellation throws JobSubmissionCanceledException; both preserve the confirmed accepted prefix without retaining per-item handles.

The package registers its coordinator, worker, ledger, health contributor, and Communication-backed wake hint through AddKoan() discovery. Application registration code is not required.

Submission also captures every composed IKoanContextCarrier before its first asynchronous boundary. Execution restores that opaque context before loading the work item; an absent registered axis is explicitly suppressed. Unknown axes or invalid carrier data dead-letter the job before application handler code. Tenant and subject values therefore survive a durable hop without Jobs naming either concept or requiring application plumbing.

Capability ladder

Composed infrastructure Elected behavior
No durable data adapter In-memory ledger; work is lost on restart
SQLite, Postgres, SQL Server, Mongo, or another durable adapter Data-backed ledger; job state survives restart
Shared durable store across nodes Competing consumers share the ledger
Direct Communication connector that claims framework signals, such as RabbitMQ The same internal wake hint crosses nodes; the ledger remains the source of truth

Inspect jobs:ledger, jobs:wake, and communication:framework-signals:default through /.well-known/Koan/facts or koan://facts. The standard /health/ready response includes queue depth, running depth, reclaim backlog, and oldest queued age in Development; production returns only aggregate readiness. Per-work-item status and history are available through entity.Job and Entity.Jobs.

Optional retained throughput is one operation surface rather than a framework Entity. Enable JobsOptions.MetricsEnabled, then read outcome totals that survive ledger retention:

var outcomes = await JobMetrics.Summary(
    typeof(ReviewRequest).FullName!,
    DateTimeOffset.UtcNow.AddDays(-1),
    DateTimeOffset.UtcNow);

Boundaries

  • Execution is at-least-once; handlers must be idempotent.
  • The in-memory tier is development/test convenience, not durability.
  • [JobPersistence(JobPersistenceMode.DataStore)] fails host composition when no durable Data adapter is available; Koan never silently weakens that declared requirement to in-memory execution.
  • Durable SQLite behavior does not prove every distributed provider or topology.
  • Source submission is pointwise, sequential, and not collection-atomic. A provider call that throws is not reported as confirmed acceptance; retry that item under the job's declared idempotency policy.
  • A custom MCP or HTTP action that submits work remains responsible for its business authorization.
  • Metrics are derived, opt-in, and lossy-tolerant; the Jobs ledger remains the source of truth.
  • Use a window or batch as the job for large sources; do not create an unbounded job per input row.

Use the Jobs reference for the greenfield API map and the Jobs guide for scheduling, retries, chains, gates, and testing. For deterministic tests against the production engine, reference Sylin.Koan.Jobs.Testing.

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 (3)

Showing the top 3 NuGet packages that depend on Sylin.Koan.Jobs:

Package Downloads
Sylin.Koan.Mcp.Operations

Governed MCP operations for Koan Jobs and Cache, with explicit enablement, exact grants, destructive confirmation, and mutation audit.

Sylin.Koan.Jobs.Transport.Messaging

Cross-node push-dispatch for Koan.Jobs over Koan.Messaging. Referencing this package fans a lightweight "job ready" wake across nodes so workers claim newly-submitted work without waiting out the poll interval. The ledger remains the truth; the signal only trims dispatch latency.

Sylin.Koan.Jobs.Testing

Deterministically drive Koan Jobs through its production execution engine from any test framework.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last Updated
0.20.7 35 7/30/2026
0.20.6 123 7/23/2026
0.20.5 93 7/23/2026
0.20.3 112 7/22/2026
0.20.2 161 7/21/2026
0.17.0 141 6/12/2026