NewHeap.Platform.AI.Generators 24.0.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 24.0.0
                    
NuGet\Install-Package NewHeap.Platform.AI.Generators -Version 24.0.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="24.0.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="24.0.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 24.0.0
                    
#r "nuget: NewHeap.Platform.AI.Generators, 24.0.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@24.0.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=24.0.0
                    
Install as a Cake Addin
#tool nuget:?package=NewHeap.Platform.AI.Generators&version=24.0.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
26.0.0 0 10/29/2026
25.0.1 0 10/29/2026
25.0.0 0 10/29/2026
24.0.0 38 10/28/2026
23.0.1 52 10/28/2026
23.0.0 70 10/27/2026
22.0.0 72 10/26/2026
21.0.0 62 10/25/2026
20.0.0 60 10/24/2026
19.0.0 54 10/23/2026
18.0.0 77 10/22/2026
17.0.0 71 10/22/2026
16.0.0 89 10/21/2026
15.0.0 125 10/19/2026
14.0.0 97 10/17/2026
13.0.0 91 10/16/2026
12.0.0 89 10/16/2026
11.0.2 99 10/15/2026
11.0.1 88 10/15/2026
11.0.0 89 10/15/2026
Loading failed