dotacp.protocol
0.1.0-alpha.3
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
<PackageReference Include="dotacp.protocol" Version="0.1.0-alpha.3" />
<PackageVersion Include="dotacp.protocol" Version="0.1.0-alpha.3" />
<PackageReference Include="dotacp.protocol" />
paket add dotacp.protocol --version 0.1.0-alpha.3
#r "nuget: dotacp.protocol, 0.1.0-alpha.3"
#:package dotacp.protocol@0.1.0-alpha.3
#addin nuget:?package=dotacp.protocol&version=0.1.0-alpha.3&prerelease
#tool nuget:?package=dotacp.protocol&version=0.1.0-alpha.3&prerelease
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 initializationAuthenticateRequest/AuthenticateResponse- AuthenticationNewSessionRequest/NewSessionResponse- Session creationPromptRequest/PromptResponse- Sending prompts to agentsReadTextFileRequest/ReadTextFileResponse- File operationsCreateTerminalRequest/CreateTerminalResponse- Terminal management- And many more...
Notifications
SessionNotification- Session updates from agentsCancelNotification- Cancellation notifications- Terminal output notifications
Schema Generation
This package is auto-generated from the official ACP schema. To update it:
- The schema source is in
schema/directory - 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
- dotacp.client - Client implementation guid
- dotacp.agent - Agent implementation guide
- Agent Client Protocol Specification
License
Licensed under the Apache License 2.0. See the LICENSE file for details.
| Product | Versions 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. |
-
.NETFramework 4.7.2
- Newtonsoft.Json (>= 13.0.4)
-
.NETStandard 2.0
- Newtonsoft.Json (>= 13.0.4)
-
net10.0
- Newtonsoft.Json (>= 13.0.4)
-
net8.0
- Newtonsoft.Json (>= 13.0.4)
-
net9.0
- Newtonsoft.Json (>= 13.0.4)
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 |