SharpClaw.ModuleSDK
0.5.0-dev.20260920.1
dotnet add package SharpClaw.ModuleSDK --version 0.5.0-dev.20260920.1
NuGet\Install-Package SharpClaw.ModuleSDK -Version 0.5.0-dev.20260920.1
<PackageReference Include="SharpClaw.ModuleSDK" Version="0.5.0-dev.20260920.1" />
<PackageVersion Include="SharpClaw.ModuleSDK" Version="0.5.0-dev.20260920.1" />
<PackageReference Include="SharpClaw.ModuleSDK" />
paket add SharpClaw.ModuleSDK --version 0.5.0-dev.20260920.1
#r "nuget: SharpClaw.ModuleSDK, 0.5.0-dev.20260920.1"
#:package SharpClaw.ModuleSDK@0.5.0-dev.20260920.1
#addin nuget:?package=SharpClaw.ModuleSDK&version=0.5.0-dev.20260920.1&prerelease
#tool nuget:?package=SharpClaw.ModuleSDK&version=0.5.0-dev.20260920.1&prerelease
SharpClaw.ModuleSDK
SharpClaw.ModuleSDK gives package authors one dependency-injection surface for services, actions, events, tools, storage, chat behavior, contracts, endpoints, and CLI commands. SharpClawModuleCompiler validates the complete contribution graph before the host starts package code.
Minimal Package
Implement ISharpClawModule. Keep the identity stable, and register all behavior through the supplied IServiceCollection. Normal constructor injection remains available to every handler.
public sealed class AuditModule : ISharpClawModule
{
public ModuleIdentity Identity { get; } = new(
"audit",
"Audit",
"audit");
public void ConfigureServices(IServiceCollection services)
{
services.AddScoped<AuditStore>();
services.AddTool<AuditLookupTool>(AuditTools.Lookup);
}
}
Registration Map
| API | Result |
|---|---|
AddAction(...).UseTerminal<T> |
One typed action and one stable terminal identity. |
OnAction, OnActionCategory, OnAnyAction |
Exact, category, or wildcard action interception. |
AddEvent and event hook extensions |
Typed event definitions and ordered event behavior. |
AddTool<T> |
One scoped IToolHandler. |
AddHttpEndpoint<T> |
One scoped authenticated HTTP handler. |
AddWebSocketEndpoint<T> |
One scoped authenticated WebSocket handler. |
AddCliCommand<T> |
One scoped CLI handler. |
ExportContract<T> and RequireContract<T> |
One exact shared service boundary. |
AddStorage |
One declared storage contract through the host gateway. |
Manifest Authority
Use PackageManifestLoader to read package.json in tools and tests. It uses the same bounded parser as both production hosts. SharpClawModuleCompiler.Compile compares the manifest identity and requested effects with the code declarations.
Low-Level Control
Action descriptors retain capability, timeout, safe-point, repeat, continuation, schema, and sensitive-data controls. Hook ordering remains explicit through HookOrdering. Host-issued ActionContext, ToolInvocation, endpoint requests, and CLI invocations expose the authenticated caller, features, trace, deadline, and cancellation authority.
Authorization
AddAuthorizationPolicy<TPolicy> exports the neutral authorization contract and registers its typed action terminal. RequireAuthorization consumes the active provider. AddAuthorizationRestriction<TRestriction> adds an ordered restriction that can preserve or deny access but cannot grant it.
Use SharpClaw.ModuleSDK.Testing to compile the real manifest. The test host invokes actions, events, tools, commands, and endpoints through production dispatch maps.
| 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. |
-
net10.0
- SharpClaw.Contracts (= 0.5.0-dev.20260920.1)
NuGet packages (5)
Showing the top 5 NuGet packages that depend on SharpClaw.ModuleSDK:
| Package | Downloads |
|---|---|
|
SharpClaw.ModuleHost.InProcess
Supports opt-in in-process SharpClaw .NET module loading with collectible assembly contexts and host-shared contract assemblies. |
|
|
SharpClaw.ModuleSDK.Testing
Runs SharpClaw module action and event graphs against the production Core dispatcher in isolated tests. |
|
|
SharpClaw.ModuleSDK.HostOperations
Neutral typed contracts for host module and Tool operations. |
|
|
SharpClaw.AgentOrchestration.Contracts
Neutral typed contracts shared by SharpClaw Agent Orchestration modules. |
|
|
SharpClaw.SidecarHost.InProcess
Supports opt-in in-process SharpClaw .NET module loading with collectible assembly contexts and host-shared contract assemblies. |
GitHub repositories
This package is not used by any popular GitHub repositories.
| Version | Downloads | Last Updated |
|---|---|---|
| 0.5.0-dev.20260920.1 | 85 | 9/20/2026 |
| 0.5.0-dev.20260919.3 | 96 | 9/19/2026 |
| 0.5.0-beta.22 | 122 | 9/2/2026 |
| 0.5.0-beta.21 | 98 | 9/2/2026 |
| 0.5.0-beta.20 | 95 | 9/2/2026 |
| 0.5.0-beta.19 | 106 | 9/2/2026 |
| 0.5.0-beta.9 | 223 | 8/22/2026 |
| 0.5.0-beta.8 | 95 | 8/22/2026 |
| 0.5.0-beta.7 | 94 | 8/21/2026 |
| 0.5.0-beta.6 | 96 | 8/21/2026 |
| 0.5.0-beta.5 | 98 | 8/16/2026 |
| 0.5.0-beta.4 | 91 | 8/15/2026 |
| 0.5.0-beta.3 | 96 | 8/14/2026 |