Honua.Sdk.Spec 1.13.1

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

Honua.Sdk.Spec

REST and SSE client for the Honua spec workspace API. Supports validating spec DSL text or canonical JSON documents, compiling them into plans with cost estimates, streaming apply events, cancelling in-flight apply runs, and retrieving cached artifacts by content hash.

Part of the Honua .NET SDK — see the repo README for the full package catalog, browser/WASM support, authentication, and release policy.

Install

Stable releases are on nuget.org and install anonymously. An unversioned add resolves to the newest stable release (the current SDK version is in the repo README). Prereleases stay on the authenticated GitHub Packages feed; see INSTALL.md.

dotnet add package Honua.Sdk.Spec

Quick usage

using Honua.Sdk.Spec;
using Honua.Sdk.Spec.Extensions;
using Honua.Sdk.Spec.Models;
using Microsoft.Extensions.DependencyInjection;

var services = new ServiceCollection();
services.AddHonuaSpec(o => o.BaseAddress = new Uri("https://your-honua-server"));
var provider = services.BuildServiceProvider();

var client = provider.GetRequiredService<IHonuaSpecClient>();

var validation = await client.ValidateAsync(
    new SpecValidateRequest
    {
        Text = File.ReadAllText("pipeline.spec"),
        IncludeCanonicalJson = true,
    },
    cancellationToken);

if (validation.IsValid)
{
    var document = new SpecDocumentRequest
    {
        GrammarVersion = "1.0",
        ProcessFamilyVersion = "1.0",
        Nodes = [/* canonical nodes */],
    };

    await using var stream = await client.ApplyAsync(document, cancellationToken);
    string? completedHash = null;
    await foreach (var ev in stream.Events.WithCancellation(cancellationToken))
    {
        Console.WriteLine($"{ev.Kind} {ev.NodeId}");
        if (completedHash is null &&
            ev.Kind == SpecApplyEventKind.Succeeded &&
            ev.ContentHash is not null)
        {
            completedHash = ev.ContentHash;
        }
    }

    if (completedHash is { } hash)
    {
        var artifact = await client.GetArtifactAsync(hash, cancellationToken);
        Console.WriteLine($"{artifact.ContentHash}: {artifact.ContentType} ({artifact.Content.Length} bytes)");
    }
}

GetArtifactAsync calls GET /v1/spec/artifact/{hash} and returns HonuaSpecArtifact with the raw bytes, response content type, and X-Spec-Content-Hash echo. If the server omits Content-Type, the SDK uses application/octet-stream; if the hash header is absent, it uses the requested hash. Successful responses are treated as binary payloads and buffered into HonuaSpecArtifact.Content; problem-details bodies are read only for non-success responses. Use this for bounded, content-hash-addressed cache artifacts, not unbounded archive or publish/download flows.

Documentation

License

Apache 2.0

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

Showing the top 1 NuGet packages that depend on Honua.Sdk.Spec:

Package Downloads
Honua.Sdk

Umbrella / meta package for the Honua .NET SDK. Installing this package brings in every other Honua.Sdk.* package and exposes a single AddHonua(o => o.BaseAddress = ...) DI registration that fans out across every enabled sub-package. Use the narrower per-package facades (Honua.Sdk.Grpc, Honua.Sdk.Admin, etc.) directly if you want to depend on less.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last Updated
1.13.1 259 10/26/2026
1.12.0 1,749 10/19/2026
1.11.1 2,657 10/13/2026
1.11.0 1,889 10/12/2026
1.10.4 883 10/7/2026
1.10.3 269 10/5/2026
1.10.2 203 10/4/2026
1.10.1 467 9/29/2026
1.10.0 129 9/25/2026
1.9.0 127 9/25/2026
1.8.0 117 9/16/2026
1.7.0 146 9/15/2026
1.6.4 120 9/12/2026