public final class AcpSchema
extends java.lang.Object
| 限定符和类型 | 类和说明 |
|---|---|
static class |
AcpSchema.AgentCapabilities
Agent capabilities
|
static class |
AcpSchema.AgentMessageChunk
Agent message chunk
|
static class |
AcpSchema.AgentThoughtChunk
Agent thought chunk
|
static class |
AcpSchema.Annotations
Annotations for content
|
static class |
AcpSchema.AudioContent
Audio content
|
static class |
AcpSchema.AuthenticateRequest
Authenticate request - authenticates using specified method
|
static class |
AcpSchema.AuthenticateResponse
Authenticate response
|
static class |
AcpSchema.AuthMethod
Authentication method
|
static class |
AcpSchema.AvailableCommand
Available command
|
static class |
AcpSchema.AvailableCommandInput
Available command input
|
static class |
AcpSchema.AvailableCommandsUpdate
Available commands update
|
static class |
AcpSchema.BlobResourceContents
Blob resource contents
|
static class |
AcpSchema.CancelNotification
Cancel notification - cancels ongoing operations
|
static class |
AcpSchema.ClientCapabilities
Client capabilities
|
static interface |
AcpSchema.ContentBlock
Content block - base type for all content
|
static class |
AcpSchema.CreateTerminalRequest
Create terminal request
|
static class |
AcpSchema.CreateTerminalResponse
Create terminal response
|
static class |
AcpSchema.CurrentModeUpdate
Current mode update
|
static interface |
AcpSchema.EmbeddedResourceResource
Embedded resource content
|
static class |
AcpSchema.EnvVariable
Environment variable
|
static class |
AcpSchema.FileSystemCapability
File system capabilities
|
static class |
AcpSchema.HttpHeader
HTTP header
|
static class |
AcpSchema.ImageContent
Image content
|
static class |
AcpSchema.InitializeRequest
Initialize request - establishes connection and negotiates capabilities
|
static class |
AcpSchema.InitializeResponse
Initialize response - returns agent capabilities and auth methods
|
static class |
AcpSchema.JSONRPCError |
static interface |
AcpSchema.JSONRPCMessage
Base type for all JSON-RPC messages.
|
static class |
AcpSchema.JSONRPCNotification
A JSON-RPC notification that does not expect a response.
|
static class |
AcpSchema.JSONRPCRequest
A JSON-RPC request that expects a response.
|
static class |
AcpSchema.JSONRPCResponse
A JSON-RPC response to a request.
|
static class |
AcpSchema.KillTerminalCommandRequest
Kill terminal request
|
static class |
AcpSchema.KillTerminalCommandResponse
Kill terminal response
|
static class |
AcpSchema.LoadSessionRequest
Load existing session request
|
static class |
AcpSchema.LoadSessionResponse
Load session response
|
static class |
AcpSchema.McpCapabilities
MCP capabilities supported by agent
|
static interface |
AcpSchema.McpServer
MCP server configuration.
|
static class |
AcpSchema.McpServerHttp
HTTP MCP server.
|
static class |
AcpSchema.McpServerSse
SSE MCP server.
|
static class |
AcpSchema.McpServerStdio
STDIO MCP server (default transport, no type field in JSON).
|
static class |
AcpSchema.ModelInfo
Model info (UNSTABLE)
|
static class |
AcpSchema.NewSessionRequest
Create new session request
|
static class |
AcpSchema.NewSessionResponse
Create new session response
|
static class |
AcpSchema.PermissionCancelled
Permission cancelled
|
static class |
AcpSchema.PermissionOption
Permission option
|
static class |
AcpSchema.PermissionOptionKind |
static class |
AcpSchema.PermissionSelected
Permission selected
|
static class |
AcpSchema.Plan
Plan update
|
static class |
AcpSchema.PlanEntry
Plan entry
|
static class |
AcpSchema.PlanEntryPriority |
static class |
AcpSchema.PlanEntryStatus |
static class |
AcpSchema.PromptCapabilities
Prompt capabilities
|
static class |
AcpSchema.PromptRequest
Prompt request - sends user message to agent
|
static class |
AcpSchema.PromptResponse
Prompt response - indicates why agent stopped
|
static class |
AcpSchema.ReadTextFileRequest
Read text file request
|
static class |
AcpSchema.ReadTextFileResponse
Read text file response
|
static class |
AcpSchema.ReleaseTerminalRequest
Release terminal request
|
static class |
AcpSchema.ReleaseTerminalResponse
Release terminal response
|
static interface |
AcpSchema.RequestPermissionOutcome
Request permission outcome
|
static class |
AcpSchema.RequestPermissionRequest
Request permission from user
|
static class |
AcpSchema.RequestPermissionResponse
Permission response from user
|
static class |
AcpSchema.Resource
Embedded resource
|
static class |
AcpSchema.ResourceLink
Resource link
|
static class |
AcpSchema.Role |
static class |
AcpSchema.SessionMode
Session mode
|
static class |
AcpSchema.SessionModelState
Session model state (UNSTABLE)
|
static class |
AcpSchema.SessionModeState
Session mode state
|
static class |
AcpSchema.SessionNotification
Session update notification - real-time progress
|
static interface |
AcpSchema.SessionUpdate
Session update - different types of updates
|
static class |
AcpSchema.SetSessionModelRequest
Set session model request (UNSTABLE)
|
static class |
AcpSchema.SetSessionModelResponse
Set session model response (UNSTABLE)
|
static class |
AcpSchema.SetSessionModeRequest
Set session mode request
|
static class |
AcpSchema.SetSessionModeResponse
Set session mode response
|
static class |
AcpSchema.StopReason |
static class |
AcpSchema.TerminalExitStatus
Terminal exit status
|
static class |
AcpSchema.TerminalOutputRequest
Terminal output request
|
static class |
AcpSchema.TerminalOutputResponse
Terminal output response
|
static class |
AcpSchema.TextContent
Text content
|
static class |
AcpSchema.TextResourceContents
Text resource contents
|
static class |
AcpSchema.ToolCall
Tool call
|
static interface |
AcpSchema.ToolCallContent
Tool call content
|
static class |
AcpSchema.ToolCallContentBlock
Tool call content block
|
static class |
AcpSchema.ToolCallDiff
Tool call diff
|
static class |
AcpSchema.ToolCallLocation
Tool call location
|
static class |
AcpSchema.ToolCallStatus |
static class |
AcpSchema.ToolCallTerminal
Tool call terminal
|
static class |
AcpSchema.ToolCallUpdate
Tool call update
|
static class |
AcpSchema.ToolCallUpdateNotification
Tool call update notification
|
static class |
AcpSchema.ToolKind |
static class |
AcpSchema.UserMessageChunk
User message chunk
|
static class |
AcpSchema.WaitForTerminalExitRequest
Wait for terminal exit request
|
static class |
AcpSchema.WaitForTerminalExitResponse
Wait for terminal exit response
|
static class |
AcpSchema.WriteTextFileRequest
Write text file request
|
static class |
AcpSchema.WriteTextFileResponse
Write text file response
|
| 限定符和类型 | 字段和说明 |
|---|---|
static java.lang.String |
JSONRPC_VERSION |
static int |
LATEST_PROTOCOL_VERSION |
static java.lang.String |
METHOD_AUTHENTICATE |
static java.lang.String |
METHOD_FS_READ_TEXT_FILE |
static java.lang.String |
METHOD_FS_WRITE_TEXT_FILE |
static java.lang.String |
METHOD_INITIALIZE |
static java.lang.String |
METHOD_SESSION_CANCEL |
static java.lang.String |
METHOD_SESSION_LOAD |
static java.lang.String |
METHOD_SESSION_NEW |
static java.lang.String |
METHOD_SESSION_PROMPT |
static java.lang.String |
METHOD_SESSION_REQUEST_PERMISSION |
static java.lang.String |
METHOD_SESSION_SET_MODE |
static java.lang.String |
METHOD_SESSION_SET_MODEL |
static java.lang.String |
METHOD_SESSION_UPDATE |
static java.lang.String |
METHOD_TERMINAL_CREATE |
static java.lang.String |
METHOD_TERMINAL_KILL |
static java.lang.String |
METHOD_TERMINAL_OUTPUT |
static java.lang.String |
METHOD_TERMINAL_RELEASE |
static java.lang.String |
METHOD_TERMINAL_WAIT_FOR_EXIT |
| 限定符和类型 | 方法和说明 |
|---|---|
static AcpSchema.JSONRPCMessage |
deserializeJsonRpcMessage(McpJsonMapper jsonMapper,
java.lang.String jsonText)
Deserializes a JSON-RPC message from a JSON string into the appropriate message
type (request, response, or notification).
|
public static final java.lang.String JSONRPC_VERSION
public static final int LATEST_PROTOCOL_VERSION
public static final java.lang.String METHOD_INITIALIZE
public static final java.lang.String METHOD_AUTHENTICATE
public static final java.lang.String METHOD_SESSION_NEW
public static final java.lang.String METHOD_SESSION_LOAD
public static final java.lang.String METHOD_SESSION_PROMPT
public static final java.lang.String METHOD_SESSION_SET_MODE
public static final java.lang.String METHOD_SESSION_SET_MODEL
public static final java.lang.String METHOD_SESSION_CANCEL
public static final java.lang.String METHOD_SESSION_REQUEST_PERMISSION
public static final java.lang.String METHOD_SESSION_UPDATE
public static final java.lang.String METHOD_FS_READ_TEXT_FILE
public static final java.lang.String METHOD_FS_WRITE_TEXT_FILE
public static final java.lang.String METHOD_TERMINAL_CREATE
public static final java.lang.String METHOD_TERMINAL_OUTPUT
public static final java.lang.String METHOD_TERMINAL_RELEASE
public static final java.lang.String METHOD_TERMINAL_WAIT_FOR_EXIT
public static final java.lang.String METHOD_TERMINAL_KILL
public static AcpSchema.JSONRPCMessage deserializeJsonRpcMessage(McpJsonMapper jsonMapper, java.lang.String jsonText) throws java.io.IOException
jsonMapper - The JSON mapper to use for deserializationjsonText - The JSON text to deserializejava.io.IOException - If deserialization failsjava.lang.IllegalArgumentException - If the JSON structure doesn't match any known
message type