Documentation
¶
Index ¶
- type AddMessageRequest
- type AddSummaryRequest
- type Agent
- type BatchDeleteSessionsRequest
- type BatchDeleteSessionsResponse
- type BatchExportSessionsRequest
- type BatchExportSessionsResponse
- type CreateAgentConfigRequest
- type CreateAgentConfigResponse
- type CreateAgentRequest
- type CreateAgentResponse
- type DeleteAgentRequest
- type DeleteAgentResponse
- type DesktopTokenResponse
- type EditAgentConfigRequest
- type EditAgentConfigResponse
- type ExportAgentsResponse
- type HealthResponse
- type ImportAgentRequest
- type ImportAgentResponse
- type Message
- type PullAgentRequest
- type PullAgentResponse
- type PushAgentRequest
- type PushAgentResponse
- type QueueDepthResponse
- type ReadyResponse
- type ResumeElicitationRequest
- type ResumeSessionRequest
- type SessionResponse
- type SessionStatusResponse
- type SessionsResponse
- type SetSessionStarredRequest
- type SteerSessionRequest
- type UpdateMessageRequest
- type UpdateSessionPermissionsRequest
- type UpdateSessionTitleRequest
- type UpdateSessionTitleResponse
- type UpdateSessionTokensRequest
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AddMessageRequest ¶ added in v1.59.0
AddMessageRequest represents a request to add a message to a session
type AddSummaryRequest ¶ added in v1.59.0
type AddSummaryRequest struct {
Summary string `json:"summary"`
Tokens int `json:"tokens,omitempty"`
}
AddSummaryRequest represents a request to add a summary to a session
type Agent ¶
type Agent struct {
Name string `json:"name"`
Description string `json:"description"`
Multi bool `json:"multi"`
}
Agent represents an agent in the API
type BatchDeleteSessionsRequest ¶ added in v1.59.0
type BatchDeleteSessionsRequest struct {
SessionIDs []string `json:"session_ids"`
}
BatchDeleteSessionsRequest represents a request to delete multiple sessions
type BatchDeleteSessionsResponse ¶ added in v1.59.0
type BatchDeleteSessionsResponse struct {
DeletedCount int `json:"deleted_count"`
FailedCount int `json:"failed_count"`
FailedIDs []string `json:"failed_ids,omitempty"`
}
BatchDeleteSessionsResponse represents the response from batch delete
type BatchExportSessionsRequest ¶ added in v1.59.0
type BatchExportSessionsRequest struct {
SessionIDs []string `json:"session_ids"`
Format string `json:"format,omitempty"` // "json" (default) or "zip"
}
BatchExportSessionsRequest represents a request to export multiple sessions
type BatchExportSessionsResponse ¶ added in v1.59.0
type BatchExportSessionsResponse struct {
ExportFormat string `json:"export_format"`
DataURL string `json:"data_url,omitempty"` // Base64 data URL for small exports
FilePath string `json:"file_path,omitempty"` // Temporary file path for large exports
SessionCount int `json:"session_count"`
}
BatchExportSessionsResponse represents the response from batch export
type CreateAgentConfigRequest ¶
type CreateAgentConfigRequest struct {
Filename string `json:"filename"`
Model string `json:"model"`
Description string `json:"description"`
Instruction string `json:"instruction"`
}
CreateAgentConfigRequest represents a request to create an agent manually
type CreateAgentConfigResponse ¶
type CreateAgentConfigResponse struct {
Filepath string `json:"filepath"`
}
CreateAgentConfigResponse represents the response from creating an agent config
type CreateAgentRequest ¶
type CreateAgentRequest struct {
Prompt string `json:"prompt"`
}
CreateAgentRequest represents a request to create an agent
type CreateAgentResponse ¶
CreateAgentResponse represents the response from creating an agent
type DeleteAgentRequest ¶
type DeleteAgentRequest struct {
FilePath string `json:"file_path"`
}
DeleteAgentRequest represents a request to delete an agent
type DeleteAgentResponse ¶
type DeleteAgentResponse struct {
FilePath string `json:"filePath"`
}
DeleteAgentResponse represents the response from deleting an agent
type DesktopTokenResponse ¶
type DesktopTokenResponse struct {
Token string `json:"token"`
}
DesktopTokenResponse represents the response from getting a desktop token
type EditAgentConfigRequest ¶
type EditAgentConfigRequest struct {
AgentConfig latest.Config `json:"agent_config"`
Filename string `json:"filename"`
}
EditAgentConfigRequest represents a request to edit an agent config
type EditAgentConfigResponse ¶
type EditAgentConfigResponse struct {
Message string `json:"message"`
Path string `json:"path"`
Config any `json:"config"`
}
EditAgentConfigResponse represents the response from editing an agent config
type ExportAgentsResponse ¶
type ExportAgentsResponse struct {
ZipPath string `json:"zipPath"`
ZipFile string `json:"zipFile"`
ZipDirectory string `json:"zipDirectory"`
AgentsDir string `json:"agentsDir"`
CreatedAt string `json:"createdAt"`
}
ExportAgentsResponse represents the response from exporting agents
type HealthResponse ¶ added in v1.59.0
HealthResponse represents the response from the health check endpoint
type ImportAgentRequest ¶
type ImportAgentRequest struct {
FilePath string `json:"file_path"`
}
ImportAgentRequest represents a request to import an agent
type ImportAgentResponse ¶
type ImportAgentResponse struct {
OriginalPath string `json:"originalPath"`
TargetPath string `json:"targetPath"`
Description string `json:"description"`
}
ImportAgentResponse represents the response from importing an agent
type Message ¶
type Message struct {
Role chat.MessageRole `json:"role"`
Content string `json:"content"`
MultiContent []chat.MessagePart `json:"multi_content,omitempty"`
}
type PullAgentRequest ¶
type PullAgentRequest struct {
Name string `json:"name"`
}
PullAgentRequest represents a request to pull an agent
type PullAgentResponse ¶
PullAgentResponse represents the response from pulling an agent
type PushAgentRequest ¶
PushAgentRequest represents a request to push an agent
type PushAgentResponse ¶
type PushAgentResponse struct {
Filepath string `json:"filepath"`
Tag string `json:"tag"`
Digest string `json:"digest"`
}
PushAgentResponse represents the response from pushing an agent
type QueueDepthResponse ¶ added in v1.59.0
type QueueDepthResponse struct {
Steer struct {
Depth int `json:"depth"`
Capacity int `json:"capacity"`
} `json:"steer"`
Followup struct {
Depth int `json:"depth"`
Capacity int `json:"capacity"`
} `json:"followup"`
}
QueueDepthResponse represents the queue depth information for a session
type ReadyResponse ¶ added in v1.59.0
type ReadyResponse struct {
Ready bool `json:"ready"`
ActiveSessions int `json:"active_sessions"`
StoreConnected bool `json:"store_connected"`
ToolsetHealth string `json:"toolset_health,omitempty"`
LatestError string `json:"latest_error,omitempty"`
}
ReadyResponse represents the response from the readiness check endpoint
type ResumeElicitationRequest ¶
type ResumeElicitationRequest struct {
Action string `json:"action"` // "accept", "decline", or "cancel"
Content map[string]any `json:"content"` // The submitted form data (only present when action is "accept")
}
ResumeElicitationRequest represents a request to resume with an elicitation response
type ResumeSessionRequest ¶
type ResumeSessionRequest struct {
Confirmation string `json:"confirmation"`
Reason string `json:"reason,omitempty"` // e.g reason for tool call rejection
ToolName string `json:"tool_name,omitempty"` // tool name for approve-tool confirmation
}
ResumeSessionRequest represents a request to resume a session
type SessionResponse ¶
type SessionResponse struct {
ID string `json:"id"`
Title string `json:"title"`
Messages []session.Message `json:"messages,omitempty"`
CreatedAt time.Time `json:"created_at"`
ToolsApproved bool `json:"tools_approved"`
InputTokens int64 `json:"input_tokens"`
OutputTokens int64 `json:"output_tokens"`
WorkingDir string `json:"working_dir,omitempty"`
Permissions *session.PermissionsConfig `json:"permissions,omitempty"`
}
SessionResponse represents a detailed session
type SessionStatusResponse ¶ added in v1.59.0
type SessionStatusResponse struct {
ID string `json:"id"`
Title string `json:"title"`
Streaming bool `json:"streaming"`
Agent string `json:"agent,omitempty"`
InputTokens int64 `json:"input_tokens"`
OutputTokens int64 `json:"output_tokens"`
NumMessages int `json:"num_messages"`
}
SessionStatusResponse represents the current runtime state of a session. Designed for late-joining SSE consumers that need a state snapshot on connect.
type SessionsResponse ¶
type SessionsResponse struct {
ID string `json:"id"`
Title string `json:"title"`
CreatedAt string `json:"created_at"`
NumMessages int `json:"num_messages"`
InputTokens int64 `json:"input_tokens"`
OutputTokens int64 `json:"output_tokens"`
WorkingDir string `json:"working_dir,omitempty"`
}
SessionsResponse represents a session in the sessions list
type SetSessionStarredRequest ¶ added in v1.59.0
type SetSessionStarredRequest struct {
Starred bool `json:"starred"`
}
SetSessionStarredRequest represents a request to star or unstar a session
type SteerSessionRequest ¶ added in v1.44.0
type SteerSessionRequest struct {
Messages []Message `json:"messages"`
}
SteerSessionRequest represents a request to inject user messages into a running agent session. The messages are picked up by the agent loop between tool execution and the next LLM call.
type UpdateMessageRequest ¶ added in v1.59.0
UpdateMessageRequest represents a request to update a message in a session
type UpdateSessionPermissionsRequest ¶
type UpdateSessionPermissionsRequest struct {
Permissions *session.PermissionsConfig `json:"permissions"`
}
UpdateSessionPermissionsRequest represents a request to update session permissions.
type UpdateSessionTitleRequest ¶
type UpdateSessionTitleRequest struct {
Title string `json:"title"`
}
UpdateSessionTitleRequest represents a request to update a session's title
type UpdateSessionTitleResponse ¶
UpdateSessionTitleResponse represents the response from updating a session's title
type UpdateSessionTokensRequest ¶ added in v1.59.0
type UpdateSessionTokensRequest struct {
InputTokens int64 `json:"input_tokens"`
OutputTokens int64 `json:"output_tokens"`
Cost float64 `json:"cost,omitempty"`
}
UpdateSessionTokensRequest represents a request to update session token counts