Documentation
¶
Index ¶
- type Backend
- type Client
- func (c *Client) AddMessage(ctx context.Context, sessionID string, msg *session.Message) error
- func (c *Client) AddSummary(ctx context.Context, sessionID string, item session.Item) error
- func (c *Client) BatchDeleteSessions(ctx context.Context, sessionIDs []string) (map[string]any, error)
- func (c *Client) BatchExportSessions(ctx context.Context, sessionIDs []string, format string) (map[string]any, error)
- func (c *Client) CompactSession(ctx context.Context, sessionID string) error
- func (c *Client) CreateAgent(ctx context.Context, prompt string) (*api.CreateAgentResponse, error)
- func (c *Client) CreateAgentConfig(ctx context.Context, filename, model, description, instruction string) (*api.CreateAgentConfigResponse, error)
- func (c *Client) CreateSession(ctx context.Context, sessTemplate *session.Session) (*session.Session, error)
- func (c *Client) DeleteAgent(ctx context.Context, filePath string) (*api.DeleteAgentResponse, error)
- func (c *Client) DeleteRemoteSession(ctx context.Context, sessionID string) error
- func (c *Client) DeleteSession(ctx context.Context, id string) error
- func (c *Client) EditAgentConfig(ctx context.Context, filename string, config latest.Config) (*api.EditAgentConfigResponse, error)
- func (c *Client) ExecuteSessionMCPPrompt(ctx context.Context, sessionID, promptName string, args map[string]string) (string, error)
- func (c *Client) ExportAgents(ctx context.Context) (*api.ExportAgentsResponse, error)
- func (c *Client) FollowUpSession(ctx context.Context, sessionID string, messages []api.Message) error
- func (c *Client) GetAgent(ctx context.Context, id string) (*latest.Config, error)
- func (c *Client) GetAgentToolCount(ctx context.Context, agentFilename, agentName string) (int, error)
- func (c *Client) GetAgents(ctx context.Context) ([]api.Agent, error)
- func (c *Client) GetAllSessions(ctx context.Context) ([]session.Session, error)
- func (c *Client) GetAvailableModels(ctx context.Context) ([]string, error)
- func (c *Client) GetDesktopToken(ctx context.Context) (*api.DesktopTokenResponse, error)
- func (c *Client) GetSession(ctx context.Context, id string) (*api.SessionResponse, error)
- func (c *Client) GetSessionMCPPrompts(ctx context.Context, sessionID string) (map[string]any, error)
- func (c *Client) GetSessionQueueStatus(ctx context.Context, sessionID string) (*api.QueueDepthResponse, error)
- func (c *Client) GetSessionRecoveryData(ctx context.Context, sessionID string) (map[string]any, error)
- func (c *Client) GetSessionSkills(ctx context.Context, sessionID string) (map[string]any, error)
- func (c *Client) GetSessionSnapshot(ctx context.Context, sessionID string) (*api.SessionSnapshotResponse, error)
- func (c *Client) GetSessionSnapshots(ctx context.Context, sessionID string) ([]map[string]any, error)
- func (c *Client) GetSessionTools(ctx context.Context, sessionID string) ([]tools.Tool, error)
- func (c *Client) GetSessionToolsets(ctx context.Context, sessionID string) ([]map[string]any, error)
- func (c *Client) GetSessions(ctx context.Context) ([]api.SessionsResponse, error)
- func (c *Client) Health(ctx context.Context) error
- func (c *Client) ImportAgent(ctx context.Context, filePath string) (*api.ImportAgentResponse, error)
- func (c *Client) PauseSession(ctx context.Context, sessionID string) error
- func (c *Client) PullAgent(ctx context.Context, name string) (*api.PullAgentResponse, error)
- func (c *Client) PushAgent(ctx context.Context, filepath, tag string) (*api.PushAgentResponse, error)
- func (c *Client) Ready(ctx context.Context) (*api.ReadyResponse, error)
- func (c *Client) ResetSession(ctx context.Context, sessionID string) error
- func (c *Client) RestartSessionToolset(ctx context.Context, sessionID, toolsetName string) error
- func (c *Client) ResumeElicitation(ctx context.Context, sessionID string, action tools.ElicitationAction, ...) error
- func (c *Client) ResumeSession(ctx context.Context, id, confirmation, reason, toolName string) error
- func (c *Client) RunAgent(ctx context.Context, sessionID, agent string, messages []api.Message, ...) (<-chan agentruntime.Event, error)
- func (c *Client) RunAgentWithAgentName(ctx context.Context, sessionID, agent, agentName string, ...) (<-chan agentruntime.Event, error)
- func (c *Client) SetSessionStarred(ctx context.Context, sessionID string, starred bool) error
- func (c *Client) SteerSession(ctx context.Context, sessionID string, messages []api.Message) error
- func (c *Client) StreamSessionEvents(ctx context.Context, sessionID string) (<-chan agentruntime.Event, error)
- func (c *Client) StreamSessionEventsSince(ctx context.Context, sessionID string, since uint64) (<-chan agentruntime.Event, error)
- func (c *Client) UndoSession(ctx context.Context, sessionID string) error
- func (c *Client) UpdateMessage(ctx context.Context, sessionID, msgID string, msg *session.Message) error
- func (c *Client) UpdateSessionTitle(ctx context.Context, sessionID, title string) error
- func (c *Client) UpdateSessionTokens(ctx context.Context, sessionID string, inputTokens, outputTokens int64, ...) error
- type ClientOption
- type ErrorResponse
- type Option
- type Runtime
- func (r *Runtime) AddMessageToSession(ctx context.Context, msg *session.Message) error
- func (r *Runtime) AddSessionSummary(ctx context.Context, item session.Item) error
- func (r *Runtime) AvailableModels(ctx context.Context) []modelcatalog.ModelChoice
- func (r *Runtime) Close() error
- func (r *Runtime) CurrentAgentInfo(ctx context.Context) agentruntime.CurrentAgentInfo
- func (r *Runtime) CurrentAgentName(ctx context.Context) string
- func (r *Runtime) CurrentAgentSkillsToolset() *skills.ToolSet
- func (r *Runtime) CurrentAgentTools(ctx context.Context) ([]tools.Tool, error)
- func (r *Runtime) CurrentAgentToolsetStatuses() []tools.ToolsetStatus
- func (r *Runtime) CurrentMCPPrompts(ctx context.Context) map[string]tools.PromptInfo
- func (r *Runtime) CycleAgentThinkingLevel(context.Context, string) (effort.Level, error)
- func (r *Runtime) EmitAgentInfo(ctx context.Context, events agentruntime.EventSink)
- func (r *Runtime) EmitStartupInfo(ctx context.Context, _ *session.Session, events agentruntime.EventSink)
- func (r *Runtime) ExecuteMCPPrompt(ctx context.Context, promptName string, args map[string]string) (string, error)
- func (r *Runtime) FollowUp(ctx context.Context, msg agentruntime.QueuedMessage) error
- func (r *Runtime) GetSnapshots(ctx context.Context) ([]map[string]any, error)
- func (r *Runtime) OnBackgroundEvent(handler func(agentruntime.Event))
- func (r *Runtime) OnElicitationRequest(func(agentruntime.Event))
- func (r *Runtime) OnToolsChanged(func(agentruntime.Event))
- func (r *Runtime) PermissionsInfo() *agentruntime.PermissionsInfo
- func (r *Runtime) QueueStatus() agentruntime.QueueStatus
- func (r *Runtime) ReadSkillContent(context.Context, *session.Session, string) (string, error)
- func (r *Runtime) Reset(ctx context.Context) error
- func (r *Runtime) ResetStartupInfo()
- func (r *Runtime) RestartToolset(ctx context.Context, toolsetName string) error
- func (r *Runtime) Resume(ctx context.Context, req agentruntime.ResumeRequest)
- func (r *Runtime) ResumeElicitation(ctx context.Context, action tools.ElicitationAction, content map[string]any, ...) error
- func (r *Runtime) RetireBackgroundEvents()
- func (r *Runtime) Run(ctx context.Context, sess *session.Session) ([]session.Message, error)
- func (r *Runtime) RunSkillFork(context.Context, *session.Session, skills.RunSkillArgs, agentruntime.EventSink) (*tools.ToolCallResult, error)
- func (r *Runtime) RunStream(ctx context.Context, sess *session.Session) <-chan agentruntime.Event
- func (r *Runtime) SessionStore() session.Store
- func (r *Runtime) SetAgentModel(_ context.Context, _, modelRef string) error
- func (r *Runtime) SetAgentThinkingLevel(context.Context, string, effort.Level) (effort.Level, error)
- func (r *Runtime) SetCurrentAgent(ctx context.Context, agentName string) error
- func (r *Runtime) SetSessionStarred(ctx context.Context, starred bool) error
- func (r *Runtime) Steer(ctx context.Context, msg agentruntime.QueuedMessage) error
- func (r *Runtime) Summarize(ctx context.Context, sess *session.Session, _ string, ...)
- func (r *Runtime) SupportsModelSwitching() bool
- func (r *Runtime) TitleGenerator(context.Context) *sessiontitle.Generator
- func (r *Runtime) TogglePause(ctx context.Context) (bool, error)
- func (r *Runtime) Undo(ctx context.Context) error
- func (r *Runtime) UpdateSessionMessage(ctx context.Context, msgID string, msg *session.Message) error
- func (r *Runtime) UpdateSessionTitle(ctx context.Context, sess *session.Session, title string) error
- func (r *Runtime) UpdateSessionTokens(ctx context.Context, inputTokens, outputTokens int64, cost float64) error
- type SessionStore
- func (s *SessionStore) AddError(context.Context, string, *session.Error) error
- func (s *SessionStore) AddEvaluation(context.Context, string, *session.Evaluation) error
- func (s *SessionStore) AddMessage(context.Context, string, *session.Message) (int64, error)
- func (s *SessionStore) AddRoutingDecision(context.Context, string, *session.RoutingDecision) error
- func (s *SessionStore) AddSession(context.Context, *session.Session) error
- func (s *SessionStore) AddSubSession(context.Context, string, *session.Session) error
- func (s *SessionStore) AddSummary(context.Context, string, session.Item) error
- func (s *SessionStore) Close() error
- func (s *SessionStore) DeleteSession(ctx context.Context, id string) error
- func (s *SessionStore) GetSession(context.Context, string) (*session.Session, error)
- func (s *SessionStore) GetSessionByOrigin(context.Context, string, string) (*session.Session, error)
- func (s *SessionStore) GetSessionSummaries(context.Context) ([]session.Summary, error)
- func (s *SessionStore) GetSessions(ctx context.Context) ([]*session.Session, error)
- func (s *SessionStore) PersistCompaction(context.Context, *session.Session, int64, int64, session.Item) error
- func (s *SessionStore) SetSessionStarred(context.Context, string, bool) error
- func (s *SessionStore) UpdateMessage(context.Context, string, int64, *session.Message) error
- func (s *SessionStore) UpdateSession(context.Context, *session.Session) error
- func (s *SessionStore) UpdateSessionTitle(context.Context, string, string) error
- func (s *SessionStore) UpdateSessionTokens(context.Context, string, int64, int64, float64) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Backend ¶
type Backend interface {
// GetAgent retrieves an agent configuration by ID
GetAgent(ctx context.Context, id string) (*latest.Config, error)
// CreateSession creates a new session
CreateSession(ctx context.Context, sessTemplate *session.Session) (*session.Session, error)
// ResumeSession resumes a paused session with optional rejection reason or tool name
ResumeSession(ctx context.Context, id, confirmation, reason, toolName string) error
// ResumeElicitation sends an elicitation response. elicitationID is
// additive: pass "" to fall back to the sole-pending-request behavior.
// Variadic for the same Go-API-compatibility reason as
// [Runtime.ResumeElicitation]: at most one value is meaningful.
ResumeElicitation(ctx context.Context, sessionID string, action tools.ElicitationAction, content map[string]any, elicitationID ...string) error
// RunAgent executes an agent and returns a channel of streaming events.
// model, when non-empty, is applied as a persistent override on the
// session's current agent before the turn starts.
RunAgent(ctx context.Context, sessionID, agent string, messages []api.Message, model string) (<-chan agentruntime.Event, error)
// RunAgentWithAgentName executes an agent with a specific agent name. See RunAgent for the meaning of model.
RunAgentWithAgentName(ctx context.Context, sessionID, agent, agentName string, messages []api.Message, model string) (<-chan agentruntime.Event, error)
// SteerSession injects user messages into a running session mid-turn
SteerSession(ctx context.Context, sessionID string, messages []api.Message) error
// FollowUpSession queues messages for end-of-turn processing
FollowUpSession(ctx context.Context, sessionID string, messages []api.Message) error
// UpdateSessionTitle updates the title of a session
UpdateSessionTitle(ctx context.Context, sessionID, title string) error
// GetAgentToolCount returns the number of tools available for an agent
GetAgentToolCount(ctx context.Context, agentFilename, agentName string) (int, error)
// StreamSessionEvents streams runtime events for a session as they occur
StreamSessionEvents(ctx context.Context, sessionID string) (<-chan agentruntime.Event, error)
// GetAllSessions retrieves all sessions from the remote store
GetAllSessions(ctx context.Context) ([]session.Session, error)
// DeleteRemoteSession deletes a session from the remote store
DeleteRemoteSession(ctx context.Context, sessionID string) error
// GetSessionTools retrieves tools available in a session
GetSessionTools(ctx context.Context, sessionID string) ([]tools.Tool, error)
// GetAvailableModels returns available models for the agent
GetAvailableModels(ctx context.Context) ([]string, error)
// GetSessionMCPPrompts returns available MCP prompts for a session
GetSessionMCPPrompts(ctx context.Context, sessionID string) (map[string]any, error)
// ExecuteSessionMCPPrompt executes an MCP prompt in a session
ExecuteSessionMCPPrompt(ctx context.Context, sessionID, promptName string, args map[string]string) (string, error)
// GetSessionSkills returns available skills for a session
GetSessionSkills(ctx context.Context, sessionID string) (map[string]any, error)
// CompactSession triggers session compaction on the server
CompactSession(ctx context.Context, sessionID string) error
// GetSessionToolsets returns toolset statuses for a session
GetSessionToolsets(ctx context.Context, sessionID string) ([]map[string]any, error)
// RestartSessionToolset restarts a toolset in a session
RestartSessionToolset(ctx context.Context, sessionID, toolsetName string) error
// PauseSession pauses a session
PauseSession(ctx context.Context, sessionID string) error
// GetSessionSnapshots retrieves snapshots for a session
GetSessionSnapshots(ctx context.Context, sessionID string) ([]map[string]any, error)
// UndoSession reverts a session to the previous snapshot
UndoSession(ctx context.Context, sessionID string) error
// ResetSession resets a session to initial state
ResetSession(ctx context.Context, sessionID string) error
// AddMessage adds a message to a session
AddMessage(ctx context.Context, sessionID string, msg *session.Message) error
// UpdateMessage updates a message in a session
UpdateMessage(ctx context.Context, sessionID, msgID string, msg *session.Message) error
// AddSummary adds a summary item to a session
AddSummary(ctx context.Context, sessionID string, item session.Item) error
// UpdateSessionTokens updates token counts for a session
UpdateSessionTokens(ctx context.Context, sessionID string, inputTokens, outputTokens int64, cost float64) error
// SetSessionStarred sets the starred status for a session
SetSessionStarred(ctx context.Context, sessionID string, starred bool) error
}
Backend is the interface that both HTTP and Connect-RPC clients implement for communicating with a remote docker agent server. It provides methods for creating sessions, running agents, and streaming events.
type Client ¶
type Client struct {
// contains filtered or unexported fields
}
Client is an HTTP client for the docker agent server API
func NewClient ¶
func NewClient(baseURL string, opts ...ClientOption) (*Client, error)
NewClient creates a new HTTP client for the docker agent server
func (*Client) AddMessage ¶
AddMessage adds a message to a session.
func (*Client) AddSummary ¶
AddSummary adds a summary item to a session.
func (*Client) BatchDeleteSessions ¶
func (c *Client) BatchDeleteSessions(ctx context.Context, sessionIDs []string) (map[string]any, error)
BatchDeleteSessions deletes multiple sessions in a single operation
func (*Client) BatchExportSessions ¶
func (c *Client) BatchExportSessions(ctx context.Context, sessionIDs []string, format string) (map[string]any, error)
BatchExportSessions exports multiple sessions
func (*Client) CompactSession ¶
CompactSession triggers session compaction on the server.
func (*Client) CreateAgent ¶
CreateAgent creates a new agent using a prompt
func (*Client) CreateAgentConfig ¶
func (c *Client) CreateAgentConfig(ctx context.Context, filename, model, description, instruction string) (*api.CreateAgentConfigResponse, error)
CreateAgentConfig creates a new agent manually with YAML configuration
func (*Client) CreateSession ¶
func (c *Client) CreateSession(ctx context.Context, sessTemplate *session.Session) (*session.Session, error)
CreateSession creates a new session
func (*Client) DeleteAgent ¶
func (c *Client) DeleteAgent(ctx context.Context, filePath string) (*api.DeleteAgentResponse, error)
DeleteAgent deletes an agent by file path
func (*Client) DeleteRemoteSession ¶
DeleteRemoteSession deletes a session from the remote store.
func (*Client) DeleteSession ¶
DeleteSession deletes a session by ID
func (*Client) EditAgentConfig ¶
func (c *Client) EditAgentConfig(ctx context.Context, filename string, config latest.Config) (*api.EditAgentConfigResponse, error)
EditAgentConfig edits an agent configuration
func (*Client) ExecuteSessionMCPPrompt ¶
func (c *Client) ExecuteSessionMCPPrompt(ctx context.Context, sessionID, promptName string, args map[string]string) (string, error)
ExecuteSessionMCPPrompt executes an MCP prompt in a session.
func (*Client) ExportAgents ¶
ExportAgents exports multiple agents as a zip file
func (*Client) FollowUpSession ¶
func (c *Client) FollowUpSession(ctx context.Context, sessionID string, messages []api.Message) error
FollowUpSession queues messages for end-of-turn processing.
func (*Client) GetAgentToolCount ¶
func (c *Client) GetAgentToolCount(ctx context.Context, agentFilename, agentName string) (int, error)
GetAgentToolCount returns the number of tools available for an agent.
func (*Client) GetAllSessions ¶
GetAllSessions retrieves all sessions from the remote store.
func (*Client) GetAvailableModels ¶
GetAvailableModels returns available models for the agent.
func (*Client) GetDesktopToken ¶
GetDesktopToken retrieves a desktop authentication token
func (*Client) GetSession ¶
GetSession retrieves a session by ID
func (*Client) GetSessionMCPPrompts ¶
func (c *Client) GetSessionMCPPrompts(ctx context.Context, sessionID string) (map[string]any, error)
GetSessionMCPPrompts returns available MCP prompts for a session.
func (*Client) GetSessionQueueStatus ¶
func (c *Client) GetSessionQueueStatus(ctx context.Context, sessionID string) (*api.QueueDepthResponse, error)
GetSessionQueueStatus retrieves the queue depth and capacity for a session
func (*Client) GetSessionRecoveryData ¶
func (c *Client) GetSessionRecoveryData(ctx context.Context, sessionID string) (map[string]any, error)
GetSessionRecoveryData retrieves recovery data for a session in case of store failure
func (*Client) GetSessionSkills ¶
GetSessionSkills returns available skills for a session.
func (*Client) GetSessionSnapshot ¶
func (c *Client) GetSessionSnapshot(ctx context.Context, sessionID string) (*api.SessionSnapshotResponse, error)
GetSessionSnapshot retrieves the recovery state and event-stream cursor.
func (*Client) GetSessionSnapshots ¶
func (c *Client) GetSessionSnapshots(ctx context.Context, sessionID string) ([]map[string]any, error)
GetSessionSnapshots retrieves snapshots for a session.
func (*Client) GetSessionTools ¶
GetSessionTools retrieves tools available in a session.
func (*Client) GetSessionToolsets ¶
func (c *Client) GetSessionToolsets(ctx context.Context, sessionID string) ([]map[string]any, error)
GetSessionToolsets returns toolset statuses for a session.
func (*Client) GetSessions ¶
GetSessions retrieves all sessions
func (*Client) ImportAgent ¶
func (c *Client) ImportAgent(ctx context.Context, filePath string) (*api.ImportAgentResponse, error)
ImportAgent imports an agent from a file path
func (*Client) PauseSession ¶
PauseSession pauses a session.
func (*Client) PushAgent ¶
func (c *Client) PushAgent(ctx context.Context, filepath, tag string) (*api.PushAgentResponse, error)
PushAgent pushes an agent to a remote registry
func (*Client) ResetSession ¶
ResetSession resets a session to initial state.
func (*Client) RestartSessionToolset ¶
RestartSessionToolset restarts a toolset in a session.
func (*Client) ResumeElicitation ¶
func (*Client) ResumeSession ¶
func (c *Client) ResumeSession(ctx context.Context, id, confirmation, reason, toolName string) error
ResumeSession resumes a session by ID with optional rejection reason or tool name
func (*Client) RunAgent ¶
func (c *Client) RunAgent(ctx context.Context, sessionID, agent string, messages []api.Message, model string) (<-chan agentruntime.Event, error)
RunAgent executes an agent and returns a channel of streaming events. The optional model override is persisted on the session's current agent before the user messages are appended; pass an empty string to leave the existing override (if any) untouched. EOF without a root StreamStoppedEvent is reported as incomplete; a run is never automatically resubmitted.
func (*Client) RunAgentWithAgentName ¶
func (c *Client) RunAgentWithAgentName(ctx context.Context, sessionID, agent, agentName string, messages []api.Message, model string) (<-chan agentruntime.Event, error)
RunAgentWithAgentName executes an agent with a specific agent name and returns a channel of streaming events. See Client.RunAgent for the semantics of model.
func (*Client) SetSessionStarred ¶
SetSessionStarred sets the starred status for a session.
func (*Client) SteerSession ¶
SteerSession injects user messages into a running session mid-turn.
func (*Client) StreamSessionEvents ¶
func (c *Client) StreamSessionEvents(ctx context.Context, sessionID string) (<-chan agentruntime.Event, error)
StreamSessionEvents replays buffered events, then tails the session. Sequenced streams reconnect after transport drops. A gap produces an ErrorEvent and closes the channel: callers must reload a snapshot before subscribing again. Unsequenced legacy streams cannot safely reconnect and close at EOF.
func (*Client) StreamSessionEventsSince ¶
func (c *Client) StreamSessionEventsSince(ctx context.Context, sessionID string, since uint64) (<-chan agentruntime.Event, error)
StreamSessionEventsSince tails events newer than a snapshot's LastEventSeq. It never replays older history; see StreamSessionEvents for gap handling.
func (*Client) UndoSession ¶
UndoSession reverts a session to the previous snapshot.
func (*Client) UpdateMessage ¶
func (c *Client) UpdateMessage(ctx context.Context, sessionID, msgID string, msg *session.Message) error
UpdateMessage updates a message in a session.
func (*Client) UpdateSessionTitle ¶
UpdateSessionTitle updates the title of a session
type ClientOption ¶
type ClientOption func(*Client)
ClientOption is a function for configuring the Client
func WithAuthToken ¶
func WithAuthToken(token string) ClientOption
WithAuthToken sets the bearer token for authentication
func WithHTTPClient ¶
func WithHTTPClient(client *http.Client) ClientOption
WithHTTPClient sets a custom HTTP client
func WithTimeout ¶
func WithTimeout(timeout time.Duration) ClientOption
WithTimeout sets the non-streaming HTTP timeout (deprecated: prefer per-request timeouts).
type ErrorResponse ¶
type ErrorResponse struct {
Error string `json:"error"`
}
ErrorResponse represents an error response from the API
type Option ¶
type Option func(*Runtime)
Option is a function for configuring the Runtime
func WithRemoteAgentFilename ¶
WithRemoteAgentFilename sets the agent filename to use with the remote API
func WithRemoteCurrentAgent ¶
WithRemoteCurrentAgent sets the current agent name
type Runtime ¶
type Runtime struct {
// contains filtered or unexported fields
}
Runtime implements the Runtime interface using a remote client. It works with any client that implements the Backend interface, including both HTTP (Client) and Connect-RPC (ConnectRPCClient) clients.
func NewRuntime ¶
NewRuntime creates a new remote runtime that implements the Runtime interface. It accepts any client that implements the Backend interface.
func (*Runtime) AddMessageToSession ¶
AddMessageToSession adds a message to the current session on the remote server.
func (*Runtime) AddSessionSummary ¶
AddSessionSummary adds a summary item to the current session on the remote server.
func (*Runtime) AvailableModels ¶
func (r *Runtime) AvailableModels(ctx context.Context) []modelcatalog.ModelChoice
AvailableModels returns available models for the agent.
func (*Runtime) CurrentAgentInfo ¶
func (r *Runtime) CurrentAgentInfo(ctx context.Context) agentruntime.CurrentAgentInfo
func (*Runtime) CurrentAgentName ¶
CurrentAgentName returns the name of the currently active agent. When no specific agent has been selected, it falls back to the first agent declared by the remote team config. The remote lookup happens at most once; the result is cached so subsequent calls are O(1).
func (*Runtime) CurrentAgentSkillsToolset ¶
CurrentAgentSkillsToolset returns nil for remote runtimes since skills are managed server-side.
func (*Runtime) CurrentAgentTools ¶
CurrentAgentTools returns the tools for the current agent from the session.
func (*Runtime) CurrentAgentToolsetStatuses ¶
func (r *Runtime) CurrentAgentToolsetStatuses() []tools.ToolsetStatus
CurrentAgentToolsetStatuses is not implemented for remote runtimes; the remote server owns the toolset lifecycle. Returns an empty slice so callers (TUI) can show an explanatory empty state without erroring.
func (*Runtime) CurrentMCPPrompts ¶
CurrentMCPPrompts returns available MCP prompts from the server.
func (*Runtime) CycleAgentThinkingLevel ¶
CycleAgentThinkingLevel is unsupported on remote runtimes; the server owns model configuration including thinking-effort selection.
func (*Runtime) EmitAgentInfo ¶
func (r *Runtime) EmitAgentInfo(ctx context.Context, events agentruntime.EventSink)
EmitAgentInfo emits agent and team info without re-fetching tool counts.
func (*Runtime) EmitStartupInfo ¶
func (r *Runtime) EmitStartupInfo(ctx context.Context, _ *session.Session, events agentruntime.EventSink)
EmitStartupInfo emits initial agent, team, and toolset information
func (*Runtime) ExecuteMCPPrompt ¶
func (r *Runtime) ExecuteMCPPrompt(ctx context.Context, promptName string, args map[string]string) (string, error)
ExecuteMCPPrompt executes an MCP prompt on the server.
func (*Runtime) FollowUp ¶
func (r *Runtime) FollowUp(ctx context.Context, msg agentruntime.QueuedMessage) error
FollowUp enqueues a message for end-of-turn processing on the remote server.
func (*Runtime) GetSnapshots ¶
GetSnapshots retrieves available snapshots for the current session.
func (*Runtime) OnBackgroundEvent ¶
func (r *Runtime) OnBackgroundEvent(handler func(agentruntime.Event))
OnBackgroundEvent receives server-side recalls and out-of-band events. The subscription outlives individual turns and stops on Close or unregister.
func (*Runtime) OnElicitationRequest ¶
func (r *Runtime) OnElicitationRequest(func(agentruntime.Event))
OnElicitationRequest is a no-op for remote runtimes; elicitation requests arrive on RunStream, or through OnBackgroundEvent when a cursor-based subscription is active, so there is no additional sink to register.
Runtime deliberately does NOT implement LocalRuntime.MirrorsElicitationOnRunStream: embedders that forward RunStream events verbatim (e.g. pkg/app.App) rely on that capability check to forward RunStream elicitations when no background subscription is active.
func (*Runtime) OnToolsChanged ¶
func (r *Runtime) OnToolsChanged(func(agentruntime.Event))
OnToolsChanged is a no-op for remote runtimes; tool-list changes are observed server-side and surface through the run-stream events rather than via an out-of-band callback.
func (*Runtime) PermissionsInfo ¶
func (r *Runtime) PermissionsInfo() *agentruntime.PermissionsInfo
PermissionsInfo returns nil for remote runtime since permissions are handled server-side.
func (*Runtime) QueueStatus ¶
func (r *Runtime) QueueStatus() agentruntime.QueueStatus
func (*Runtime) ReadSkillContent ¶
func (*Runtime) ResetStartupInfo ¶
func (r *Runtime) ResetStartupInfo()
ResetStartupInfo is a no-op for remote runtime.
func (*Runtime) RestartToolset ¶
RestartToolset restarts a toolset on the remote server.
func (*Runtime) Resume ¶
func (r *Runtime) Resume(ctx context.Context, req agentruntime.ResumeRequest)
Resume allows resuming execution after user confirmation
func (*Runtime) ResumeElicitation ¶
func (r *Runtime) ResumeElicitation(ctx context.Context, action tools.ElicitationAction, content map[string]any, elicitationID ...string) error
ResumeElicitation answers a request, running OAuth only for its explicit ID.
func (*Runtime) RetireBackgroundEvents ¶
func (r *Runtime) RetireBackgroundEvents()
RetireBackgroundEvents stops deliveries for a replaced conversation.
func (*Runtime) RunSkillFork ¶
func (r *Runtime) RunSkillFork(context.Context, *session.Session, skills.RunSkillArgs, agentruntime.EventSink) (*tools.ToolCallResult, error)
RunSkillFork is unsupported on remote runtimes; the server owns skill execution.
func (*Runtime) RunStream ¶
RunStream starts the agent's interaction loop and returns a channel of events
func (*Runtime) SessionStore ¶
SessionStore returns a SessionStore that wraps the remote client.
func (*Runtime) SetAgentModel ¶
SetAgentModel queues modelRef as the override to apply on the session's current agent. The override is forwarded to the server on the next Runtime.RunStream call, where the server persists it as the per-agent model override (same effect as the historic dedicated endpoint, just without the extra round trip). A subsequent call before the next turn replaces the queued ref; an empty string clears it.
func (*Runtime) SetAgentThinkingLevel ¶
func (r *Runtime) SetAgentThinkingLevel(context.Context, string, effort.Level) (effort.Level, error)
SetAgentThinkingLevel is unsupported on remote runtimes; the server owns model configuration including thinking-effort selection.
func (*Runtime) SetCurrentAgent ¶
SetCurrentAgent sets the currently active agent for subsequent user messages. It validates the name against the remote team config; an unknown agent is rejected so callers see the same behaviour as LocalRuntime. A failure to fetch the team config (network error, auth failure, missing remote) is propagated rather than silently accepted — the whole point of this check is closing that silent-breakage gap.
func (*Runtime) SetSessionStarred ¶
SetSessionStarred sets the starred status for the current session on the remote server.
func (*Runtime) Steer ¶
func (r *Runtime) Steer(ctx context.Context, msg agentruntime.QueuedMessage) error
Steer enqueues a user message for mid-turn injection into the running agent loop on the remote server.
func (*Runtime) Summarize ¶
func (r *Runtime) Summarize(ctx context.Context, sess *session.Session, _ string, sink agentruntime.EventSink)
Summarize generates a summary for the session by compacting it server-side.
func (*Runtime) SupportsModelSwitching ¶
SupportsModelSwitching returns true for remote runtimes (model switching is handled server-side).
func (*Runtime) TitleGenerator ¶
func (r *Runtime) TitleGenerator(context.Context) *sessiontitle.Generator
TitleGenerator is not supported on remote runtimes (titles are generated server-side).
func (*Runtime) TogglePause ¶
TogglePause pauses/resumes a session on the server.
func (*Runtime) UpdateSessionMessage ¶
func (r *Runtime) UpdateSessionMessage(ctx context.Context, msgID string, msg *session.Message) error
UpdateSessionMessage updates a message in the current session on the remote server.
type SessionStore ¶
type SessionStore struct {
// contains filtered or unexported fields
}
SessionStore wraps a Backend to implement the session.Store interface.
func NewSessionStore ¶
func NewSessionStore(client Backend) *SessionStore
NewSessionStore creates a new SessionStore.
func (*SessionStore) AddEvaluation ¶
func (s *SessionStore) AddEvaluation(context.Context, string, *session.Evaluation) error
AddEvaluation is a no-op: the server persists runtime evaluation events.
func (*SessionStore) AddMessage ¶
func (*SessionStore) AddRoutingDecision ¶
func (s *SessionStore) AddRoutingDecision(context.Context, string, *session.RoutingDecision) error
AddRoutingDecision is a no-op: the server persists runtime routing events.
func (*SessionStore) AddSession ¶
func (*SessionStore) AddSubSession ¶
func (*SessionStore) AddSummary ¶
func (*SessionStore) Close ¶
func (s *SessionStore) Close() error
func (*SessionStore) DeleteSession ¶
func (s *SessionStore) DeleteSession(ctx context.Context, id string) error