TimeWarp.Contracts 2.0.0-beta.21

Prefix Reserved
This is a prerelease version of TimeWarp.Contracts.
dotnet add package TimeWarp.Contracts --version 2.0.0-beta.21
                    
NuGet\Install-Package TimeWarp.Contracts -Version 2.0.0-beta.21
                    
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="TimeWarp.Contracts" Version="2.0.0-beta.21" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="TimeWarp.Contracts" Version="2.0.0-beta.21" />
                    
Directory.Packages.props
<PackageReference Include="TimeWarp.Contracts" />
                    
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 TimeWarp.Contracts --version 2.0.0-beta.21
                    
#r "nuget: TimeWarp.Contracts, 2.0.0-beta.21"
                    
#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 TimeWarp.Contracts@2.0.0-beta.21
                    
#: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=TimeWarp.Contracts&version=2.0.0-beta.21&prerelease
                    
Install as a Cake Addin
#tool nuget:?package=TimeWarp.Contracts&version=2.0.0-beta.21&prerelease
                    
Install as a Cake Tool

TimeWarp.Contracts

Transport-neutral operation contracts shared by HTTP, CLI, and MCP hosts. One request class is the operation. Each host projects it: this template's contracts generator and FastEndpoint pipeline for HTTP, TimeWarp.Nuru for CLI and MCP. There is no second schema.

The package publishes from source/foundation/ in TimeWarp.Architecture as its own package (TimeWarp.Contracts), versioned with the repository. It targets net10.0 and net11.0. A standalone repository is the home before a stable Nuru release takes the dependency. Dependencies are TimeWarp.Mediator.Contracts and OneOf.

[Operation]

Apply [Operation(name, Description = ...)] to the request class (Query or Command).

  • name is the canonical operation name. It is not an HTTP route, a CLI pattern, or an MCP tool name.
  • Description is the operation summary hosts show in --capabilities, OpenAPI, and MCP tools/list.
  • Kind is not an attribute argument. Generators read it from the mediator interface on the request.

Kind

Request implements OperationKind
IQuery<TResponse> Query
IIdempotentCommand or IIdempotentCommand<TResponse> IdempotentCommand
ICommand or ICommand<TResponse> Command

Test IIdempotentCommand before ICommand. The idempotent interfaces extend the command interfaces, and the more specific kind wins. IQuery<TResponse> stands on its own. A request that implements none of these is omitted from the catalog. The HTTP verb lives on the HTTP binding, supplied by the host that owns [ApiRoute].

Member derivation

Generators derive member metadata. This package does not reflect over request types.

Field Rule
Name The property's declared identifier, as written on the request.
Required True when the property has the required modifier. Otherwise true when the type is non-nullable and the property has no initializer. A nullable annotation (T?) is not required. required wins over a nullable annotation and over an initializer.
Default The property initializer rendered as source text. Omitted when the property has no initializer. Generators do not invent 0, false, null, or default(T).
Allowed values When the member type is an enum, the enum's named constants in declaration order. Omitted for every other type.
Description System.ComponentModel.DescriptionAttribute.Description on the property. Omitted when the attribute is absent. XML documentation is not this field; HTTP OpenAPI keeps using the request's XML docs.

Catalog

OperationCatalog is the document. --capabilities, OpenAPI, and MCP tools/list are projections of it, not separate schemas.

  • OperationDescriptor.ReturnType is the success type's display name. Hosts that return OneOf<TSuccess, SharedProblemDetails> record TSuccess. The problem type is shared and is not repeated on each entry.
  • OperationBindings holds the transports a host actually binds: HTTP route and verb, CLI pattern, MCP tool name. A missing binding means that transport does not expose the operation.

IResponseRenderer<TResponse>

A CLI or MCP host calls Render when a renderer is registered for the response type, and writes that text. HTTP hosts do not consult it. With no renderer, the host writes JSON.

SharedProblemDetails

The RFC 7807 problem type lives in this assembly, in namespace TimeWarp.Foundation.Types. The namespace stays so TypeForwardedTo in TimeWarp.Foundation.Contracts preserves the identity already compiled into callers. It has no ASP.NET Core dependency.

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.  net11.0 is compatible. 
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 TimeWarp.Contracts:

Package Downloads
TimeWarp.Nuru

Route-based CLI framework for .NET - batteries included with telemetry, REPL, and shell completion

TimeWarp.Foundation.Contracts

Shared contracts, request/response markers, route/auth/query source generator, and common types for the TimeWarp foundation layer.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last Updated
2.0.0-beta.21 52 10/18/2026
2.0.0-beta.20 53 10/18/2026