dotacp.protocol 0.1.0-alpha.3

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

dotacp.protocol

Type-safe .NET protocol definitions for the Agent Client Protocol (ACP).

What is dotacp.protocol?

This package contains the core protocol definitions and data models for ACP, auto-generated from the official ACP schema (v0.10.8). It provides:

  • Type-safe Protocol Models: Complete C# representations of all ACP request/response types
  • Type Aliases & Enums: Domain-specific types for protocol identifiers, modes, and options
  • JSON Serialization Support: Built-in converters for complex types like union types and discriminated unions
  • Constants & Metadata: Protocol version info and method name constants for both agents and clients

Dependencies

  • .NET Standard 2.0 or higher
  • Newtonsoft.Json (v13.0.4+) for JSON serialization

Installation

dotnet add package dotacp.protocol

Or reference the project directly:

<ItemGroup>
    <ProjectReference Include="path/to/protocol/protocol.csproj" />
</ItemGroup>

Usage

Protocol Metadata

Access protocol version and method constants:

using dotacp.protocol;

// Get protocol version
var version = ProtocolMeta.Version; // 1

// Agent method names
string initMethod = AgentMethods.Initialize;
string sessionPrompt = AgentMethods.SessionPrompt;

// Client method names
string fsRead = ClientMethods.FsReadTextFile;
string terminal = ClientMethods.TerminalCreate;

Working with Protocol Messages

Use the auto-generated protocol models in your client or agent implementations:

var initRequest = new InitializeRequest
{
    ProtocolVersion = ProtocolMeta.Version,
    ClientCapabilities = new ClientCapabilities
    {
        Fs = new FileSystemCapability
        {
            ReadTextFile = true,
            WriteTextFile = true
        },
        Terminal = true
    }
};

// Serialize to JSON automatically handled by Newtonsoft.Json
var json = JsonConvert.SerializeObject(initRequest);

// Deserialize back
var deserialized = JsonConvert.DeserializeObject<InitializeRequest>(json);

Type Aliases

The protocol uses type aliases for semantic clarity:

// Permission option identifiers
var permId = new PermissionOptionId("com.example.action");

// Session identifiers
SessionId sessionId = "session-123";

Union Types & Discriminated Unions

The protocol supports union types with automatic JSON conversion:

// RequestId can be a string, number, or null
RequestId requestId = "request-1";
RequestId requestIdNum = 42L;
var requestIdNull = RequestId.Null;

// Automatically serialized correctly based on type

Key Types

Request/Response Types

  • InitializeRequest / InitializeResponse - Protocol initialization
  • AuthenticateRequest / AuthenticateResponse - Authentication
  • NewSessionRequest / NewSessionResponse - Session creation
  • PromptRequest / PromptResponse - Sending prompts to agents
  • ReadTextFileRequest / ReadTextFileResponse - File operations
  • CreateTerminalRequest / CreateTerminalResponse - Terminal management
  • And many more...

Notifications

  • SessionNotification - Session updates from agents
  • CancelNotification - Cancellation notifications
  • Terminal output notifications

Schema Generation

This package is auto-generated from the official ACP schema. To update it:

  1. The schema source is in schema/ directory
  2. Execute the schema generation script: ./scripts/gen-schema.ps1

The generated code includes:

  • All protocol types and interfaces
  • JSON converters for special types
  • XML documentation comments

Protocol Version

This package implements ACP Protocol Version 1 based on the ACP v0.10.8 specification.

See Also

License

Licensed under the Apache License 2.0. See the LICENSE file for details.

Product Compatible and additional computed target framework versions.
.NET net5.0 was computed.  net5.0-windows was computed.  net6.0 was computed.  net6.0-android was computed.  net6.0-ios was computed.  net6.0-maccatalyst was computed.  net6.0-macos was computed.  net6.0-tvos was computed.  net6.0-windows was computed.  net7.0 was computed.  net7.0-android was computed.  net7.0-ios was computed.  net7.0-maccatalyst was computed.  net7.0-macos was computed.  net7.0-tvos was computed.  net7.0-windows was computed.  net8.0 is compatible.  net8.0-android was computed.  net8.0-browser was computed.  net8.0-ios was computed.  net8.0-maccatalyst was computed.  net8.0-macos was computed.  net8.0-tvos was computed.  net8.0-windows was computed.  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. 
.NET Core netcoreapp2.0 was computed.  netcoreapp2.1 was computed.  netcoreapp2.2 was computed.  netcoreapp3.0 was computed.  netcoreapp3.1 was computed. 
.NET Standard netstandard2.0 is compatible.  netstandard2.1 was computed. 
.NET Framework net461 was computed.  net462 was computed.  net463 was computed.  net47 was computed.  net471 was computed.  net472 is compatible.  net48 was computed.  net481 was computed. 
MonoAndroid monoandroid was computed. 
MonoMac monomac was computed. 
MonoTouch monotouch was computed. 
Tizen tizen40 was computed.  tizen60 was computed. 
Xamarin.iOS xamarinios was computed. 
Xamarin.Mac xamarinmac was computed. 
Xamarin.TVOS xamarintvos was computed. 
Xamarin.WatchOS xamarinwatchos was computed. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

NuGet packages (2)

Showing the top 2 NuGet packages that depend on dotacp.protocol:

Package Downloads
dotacp.client

This package provides the tools needed to integrate Agent Client Protocol (ACP) agent support into editors, IDEs, and other client applications.

dotacp.agent

This package provides the tools needed to build Agent Client Protocol (ACP) agent implementations in .NET.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last Updated
2026.5.10 187 5/10/2026
2026.3.18 181 3/18/2026
2026.3.12-beta.1 70 3/12/2026
0.1.0-beta.2 65 3/9/2026
0.1.0-beta.1 66 3/5/2026
0.1.0-alpha.4 63 3/3/2026
0.1.0-alpha.3 67 3/2/2026
0.1.0-alpha.2 67 3/2/2026
0.1.0-alpha.1 65 3/1/2026