Documentation
¶
Index ¶
Constants ¶
View Source
const ( MessageNodeHello = "node.hello" MessageNodeReady = "node.ready" MessageNodeHeartbeat = "node.heartbeat" MessageToolInvoke = "tool.invoke" MessageToolResult = "tool.result" MessageToolError = "tool.error" MessageToolCancel = "tool.cancel" )
View Source
const ( OperationRuntimeRequest = "runtime.request" OperationContextLocal = "context.local" OperationToolCall = "tool.call" OperationResourceRead = "resource.read" )
View Source
const ( ContextUIResourceURI = "ui://agentdock/context" TaskProgressUIResourceURI = "ui://agentdock/task-progress" FileChangeUIResourceURI = "ui://agentdock/file-change" RecallUIResourceURI = "ui://agentdock/recall" WorkflowUIResourceURI = "ui://agentdock/workflow" DynamicMCPUIResourceURI = "ui://agentdock/dynamic-mcp" ArtifactUIResourceURI = "ui://agentdock/artifact" ACPStatusUIResourceURI = "ui://agentdock/acp-status" )
View Source
const ( ContextUIContract = "agentdock.context.fleet.v1" TaskProgressUIContract = "agentdock.task-progress.v1" FileChangeUIContract = "agentdock.file-change.v1" RecallUIContract = "agentdock.recall.v1" WorkflowUIContract = "agentdock.workflow.v1" DynamicMCPUIContract = "agentdock.dynamic-mcp.v1" ArtifactUIContract = "agentdock.artifact.v1" ACPStatusUIContract = "agentdock.acp-status.v1" )
View Source
const AgentDockUIResourcePrefix = "ui://agentdock/"
View Source
const ConnectionProtocolVersion = "2"
View Source
const MCPAppMIMEType = "text/html;profile=mcp-app"
Variables ¶
This section is empty.
Functions ¶
func UIResourceContract ¶
UIResourceContract returns the renderer contract bound to one AgentDock MCP App URI. URIs identify resources and remain stable; renderer compatibility evolves through the contract string.
Types ¶
type Hello ¶
type Hello struct {
DeviceID string `json:"device_id"`
Version string `json:"version"`
ProtocolVersion string `json:"protocol_version"`
OS string `json:"os"`
Arch string `json:"arch"`
Capabilities []string `json:"capabilities"`
ToolContractHash string `json:"tool_contract_hash"`
Tools []ToolDescriptor `json:"tools"`
UIResources []UIResourceCapability `json:"ui_resources"`
}
Hello is the complete node capability snapshot sent at connection time.
type Message ¶
type Message struct {
Type string `json:"type"`
RequestID string `json:"request_id,omitempty"`
Operation string `json:"operation,omitempty"`
Arguments json.RawMessage `json:"arguments,omitempty"`
Result json.RawMessage `json:"result,omitempty"`
Error *RemoteError `json:"error,omitempty"`
Hello *Hello `json:"hello,omitempty"`
ProtocolVersion string `json:"protocol_version,omitempty"`
HeartbeatMS int `json:"heartbeat_ms,omitempty"`
}
Message is the AgentDock ↔ NexusDock WebSocket envelope.
type RemoteError ¶
type RemoteError struct {
Code string `json:"code"`
Message string `json:"message"`
Category string `json:"category,omitempty"`
Retryable bool `json:"retryable,omitempty"`
Details map[string]any `json:"details,omitempty"`
}
func (*RemoteError) Error ¶
func (e *RemoteError) Error() string
type ToolDescriptor ¶
type ToolDescriptor struct {
Name string `json:"name"`
Title string `json:"title,omitempty"`
Description string `json:"description,omitempty"`
InputSchema map[string]any `json:"inputSchema"`
OutputSchema map[string]any `json:"outputSchema,omitempty"`
Meta map[string]any `json:"_meta,omitempty"`
Annotations map[string]any `json:"annotations,omitempty"`
}
ToolDescriptor is the Bridge projection of an MCP tool descriptor. UI resource capability is deliberately absent: per-tool _meta.ui is presentation binding only.
type UIResourceCapability ¶
type UIResourceCapability struct {
URI string `json:"uri"`
Contract string `json:"contract"`
MIMEType string `json:"mime_type"`
}
UIResourceCapability advertises a resource the node can actually serve through resource.read.
Click to show internal directories.
Click to hide internal directories.