Devolutions.Now.Policy.Api
2026.7.13
Prefix Reserved
dotnet add package Devolutions.Now.Policy.Api --version 2026.7.13
NuGet\Install-Package Devolutions.Now.Policy.Api -Version 2026.7.13
<PackageReference Include="Devolutions.Now.Policy.Api" Version="2026.7.13" />
<PackageVersion Include="Devolutions.Now.Policy.Api" Version="2026.7.13" />
<PackageReference Include="Devolutions.Now.Policy.Api" />
paket add Devolutions.Now.Policy.Api --version 2026.7.13
#r "nuget: Devolutions.Now.Policy.Api, 2026.7.13"
#:package Devolutions.Now.Policy.Api@2026.7.13
#addin nuget:?package=Devolutions.Now.Policy.Api&version=2026.7.13
#tool nuget:?package=Devolutions.Now.Policy.Api&version=2026.7.13
Devolutions NOW package broker API for .NET
Devolutions.Now.Policy.Api contains the .NET DTOs for the Devolutions NOW package broker API. It is the C# mirror of the Rust now-policy-api model crate and is validated against the OpenAPI schema generated from Rust.
Purpose
This package contains request, response, status, health, capabilities, and error DTOs for package broker clients and implementations. It does not perform HTTP transport, named-pipe I/O, policy evaluation, or package-manager execution.
Top-level request DTOs carry RequestKind and RequestVersion; top-level response DTOs carry
ResponseKind and ResponseVersion. Kind properties are fixed discriminators that serialize
automatically and reject mismatched values on deserialization. This is required for further protocol
evolution and allows the client to switch transport from HTTP to other mechanisms without changing
the wire schema.
The DTOs are used to:
- serialize package broker requests from .NET clients;
- deserialize broker health, capability, evaluation, execution, status, and error responses;
- share the same JSON wire shape as the Rust source-of-truth model;
- provide compatibility conversions between package broker API enums and the
Devolutions.Now.Policy.Modelpolicy enums.
Architecture
RequestModels.csdefinesPackageRequestand request context/options.ResponseModels.csdefines evaluation and execution responses plus shared response context, summaries, decisions, policy info, diagnostics, and operation submission.StatusModels.csdefines status query request/response DTOs.MetaModels.csdefines health, capabilities, manager capability, and error DTOs.Enums.csdefines package broker API enums and JSON string enum converters.BrokerJson.csdefines serializer options for the broker wire format.PolicyCompatibility.csmaps compatible API enums to and fromDevolutions.Now.Policy.Modelenums.
OpenAPI relationship
The OpenAPI document is generated by the Rust server template and published under:
policies\rust\now-policy-api\openapi\now-policy-api.yaml
Regenerate it with:
cargo run -p now-policy-server-template --bin generate-now-policy-api-openapi --locked
After schema changes, run the .NET client tests to verify these DTOs still match the Rust contract.
Validation
Useful targeted checks:
dotnet test policies\dotnet\Devolutions.Now.Policy.Client.Tests\Devolutions.Now.Policy.Client.Tests.csproj
dotnet format policies\dotnet\Devolutions.Now.Policy.slnx --verify-no-changes
Run the Rust now-policy-api and now-policy-server-template tests when changing shared API semantics.
| Product | Versions Compatible and additional computed target framework versions. |
|---|---|
| .NET | net9.0 is compatible. net9.0-android was computed. net9.0-browser was computed. net9.0-ios was computed. net9.0-maccatalyst was computed. net9.0-macos was computed. net9.0-tvos was computed. net9.0-windows was computed. 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. |
-
net10.0
- Devolutions.Now.Policy.Model (>= 2026.7.13)
-
net9.0
- Devolutions.Now.Policy.Model (>= 2026.7.13)
NuGet packages (1)
Showing the top 1 NuGet packages that depend on Devolutions.Now.Policy.Api:
| Package | Downloads |
|---|---|
|
Devolutions.Now.Policy.Client
Client logic for communicating with the Devolutions NOW package broker API. |
GitHub repositories
This package is not used by any popular GitHub repositories.
| Version | Downloads | Last Updated |
|---|---|---|
| 2026.7.13 | 280 | 7/13/2026 |