NewHeap.Platform.AI.Generators 36.1.0

There is a newer version of this package available.
See the version list below for details.
dotnet add package NewHeap.Platform.AI.Generators --version 36.1.0
                    
NuGet\Install-Package NewHeap.Platform.AI.Generators -Version 36.1.0
                    
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="NewHeap.Platform.AI.Generators" Version="36.1.0" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="NewHeap.Platform.AI.Generators" Version="36.1.0" />
                    
Directory.Packages.props
<PackageReference Include="NewHeap.Platform.AI.Generators" />
                    
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 NewHeap.Platform.AI.Generators --version 36.1.0
                    
#r "nuget: NewHeap.Platform.AI.Generators, 36.1.0"
                    
#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 NewHeap.Platform.AI.Generators@36.1.0
                    
#: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=NewHeap.Platform.AI.Generators&version=36.1.0
                    
Install as a Cake Addin
#tool nuget:?package=NewHeap.Platform.AI.Generators&version=36.1.0
                    
Install as a Cake Tool

NewHeap.Platform.AI.Generators

Compile-time generator for NewHeap AI tool catalogs. Reference this package as an analyzer, annotate an application-owned class with NhAiToolSet, and annotate supported methods with NhAiTool plus Description.

The generator emits a local INhAiToolCatalog, canonical input/output schemas, SHA-256 contract and catalog hashes, and a deterministic manifest. It reports NHAI diagnostics for invalid IDs or versions, signatures, descriptions, duplicate contracts, missing tool-set metadata, and remote exposure without an authorization boundary. The compiler-hosted generator deliberately has no runtime dependency on NewHeap.Platform.AI.Common.

Generated tools never pass the MVC authorization filter, so the descriptor's policy list is the boundary the tool gate enforces. The generator reads every [Authorize] declaration on the method, the methods it overrides, the tool set and its base types, with the policy from the named Policy argument or the constructor argument. Roles, AuthenticationSchemes and attribute classes other than AuthorizeAttribute itself report NHAI018; express them as a named policy.

Each generated function returns the shared NhAiToolResult shape: the output as data on success, otherwise the stable failure code and message. Only data follows the tool set's serializer options.

Trimmed Native AOT applications must provide an application-owned JsonSerializerContext with metadata for each tool input and output type, then set NhAiToolSet.JsonSerializerContextType to that context. The context no longer needs TaskResult<TOutput>; existing contexts that declare it keep working. The generated function factory uses its serializer options instead of depending on reflection metadata that trimming may remove.

There are no supported framework assets in this package.

Learn more about Target Frameworks and .NET Standard.

This package has no dependencies.

NuGet packages

This package is not used by any NuGet packages.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last Updated
39.1.0 86 11/12/2026
39.0.0 244 11/11/2026
38.1.0 117 11/11/2026
38.0.0 91 11/11/2026
37.0.0 161 11/9/2026
36.1.0 119 11/7/2026
36.0.0 97 11/6/2026
35.0.0 283 11/4/2026
34.0.0 116 11/4/2026
33.0.0 100 11/3/2026
32.0.0 107 11/2/2026
31.0.0 243 11/2/2026
30.0.0 162 11/1/2026
29.0.0 221 10/31/2026
28.0.0 143 10/30/2026
27.0.0 137 10/29/2026
26.0.0 110 10/29/2026
25.0.1 104 10/29/2026
25.0.0 109 10/29/2026
24.0.0 103 10/28/2026
Loading failed