Help us shape the future of Go! Take the 2026 Go Developer Survey

api

package
v1.43.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Apr 8, 2026 License: Apache-2.0 Imports: 4 Imported by: 0

Documentation

Index

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

type CreateAgentResponse struct {
	Path string `json:"path"`
	Out  string `json:"out"`
}

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 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

type PullAgentResponse struct {
	Name        string `json:"name"`
	Description string `json:"description"`
}

PullAgentResponse represents the response from pulling an agent

type PushAgentRequest

type PushAgentRequest struct {
	Filepath string `json:"filepath"`
	Tag      string `json:"tag"`
}

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 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 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 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

type UpdateSessionTitleResponse struct {
	ID    string `json:"id"`
	Title string `json:"title"`
}

UpdateSessionTitleResponse represents the response from updating a session's title

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL