Documentation
¶
Index ¶
- type Agent
- type CreateAgentConfigRequest
- type CreateAgentConfigResponse
- type CreateAgentRequest
- type CreateAgentResponse
- type DeleteAgentRequest
- type DeleteAgentResponse
- type DesktopTokenResponse
- type EditAgentConfigRequest
- type EditAgentConfigResponse
- type ExportAgentsResponse
- type ImportAgentRequest
- type ImportAgentResponse
- type Message
- type PullAgentRequest
- type PullAgentResponse
- type PushAgentRequest
- type PushAgentResponse
- type ResumeCodeReceivedOauthRequest
- type ResumeElicitationRequest
- type ResumeSessionRequest
- type ResumeStartOauthRequest
- type SessionResponse
- type SessionsResponse
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
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 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 v2.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 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"`
}
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 ResumeCodeReceivedOauthRequest ¶
type ResumeCodeReceivedOauthRequest struct {
Code string `json:"code"`
State string `json:"state"`
}
ResumeCodeReceivedOauthRequest represents the response from getting the OAuth URL with code and state
type ResumeElicitationRequest ¶ added in v1.7.0
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"`
}
ResumeSessionRequest represents a request to resume a session
type ResumeStartOauthRequest ¶
type ResumeStartOauthRequest struct {
Confirmation bool `json:"confirmation"`
}
ResumeStartOauthRequest represents the user approval to start the OAuth flow
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 int `json:"input_tokens"`
OutputTokens int `json:"output_tokens"`
WorkingDir string `json:"working_dir,omitempty"`
}
SessionResponse represents a detailed session
type SessionsResponse ¶
type SessionsResponse struct {
ID string `json:"id"`
Title string `json:"title"`
CreatedAt string `json:"created_at"`
NumMessages int `json:"num_messages"`
InputTokens int `json:"input_tokens"`
OutputTokens int `json:"output_tokens"`
GetMostRecentAgentFilename string `json:"most_recent_agent_filename"`
WorkingDir string `json:"working_dir,omitempty"`
}
SessionsResponse represents a session in the sessions list