TimeWarp.Contracts
2.0.0-beta.21
Prefix Reserved
dotnet add package TimeWarp.Contracts --version 2.0.0-beta.21
NuGet\Install-Package TimeWarp.Contracts -Version 2.0.0-beta.21
<PackageReference Include="TimeWarp.Contracts" Version="2.0.0-beta.21" />
<PackageVersion Include="TimeWarp.Contracts" Version="2.0.0-beta.21" />
<PackageReference Include="TimeWarp.Contracts" />
paket add TimeWarp.Contracts --version 2.0.0-beta.21
#r "nuget: TimeWarp.Contracts, 2.0.0-beta.21"
#:package TimeWarp.Contracts@2.0.0-beta.21
#addin nuget:?package=TimeWarp.Contracts&version=2.0.0-beta.21&prerelease
#tool nuget:?package=TimeWarp.Contracts&version=2.0.0-beta.21&prerelease
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).
nameis the canonical operation name. It is not an HTTP route, a CLI pattern, or an MCP tool name.Descriptionis the operation summary hosts show in--capabilities, OpenAPI, and MCPtools/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.ReturnTypeis the success type's display name. Hosts that returnOneOf<TSuccess, SharedProblemDetails>recordTSuccess. The problem type is shared and is not repeated on each entry.OperationBindingsholds 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 | Versions 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. |
-
net10.0
- OneOf (>= 3.0.271)
- TimeWarp.Mediator.Contracts (>= 14.0.0-beta.5)
-
net11.0
- OneOf (>= 3.0.271)
- TimeWarp.Mediator.Contracts (>= 14.0.0-beta.5)
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 | 31 | 10/18/2026 |
| 2.0.0-beta.20 | 49 | 10/18/2026 |