Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AgentInfo ¶
type AgentInfo struct {
ID string `json:"id"`
Name string `json:"name"`
Status string `json:"status"`
}
AgentInfo describes one supported agent entry returned by /v1/agents.
type AgentModelsFactory ¶
AgentModelsFactory resolves selectable model options for one agent.
type Config ¶
type Config struct {
AuthToken string
DataDir string
Agents []AgentInfo
AllowedAgentIDs []string
AllowedRoots []string
Store ThreadStore
TurnController *runtime.TurnController
Agent agents.Streamer
TurnAgentFactory TurnAgentFactory
AgentModelsFactory AgentModelsFactory
AgentIdleTTL time.Duration
Logger *observability.Logger
ContextRecentTurns int
ContextMaxChars int
CompactMaxChars int
PermissionTimeout time.Duration
// FrontendHandler, if non-nil, is served for any request that does not
// match /healthz or /v1/*. Intended for the embedded web UI.
FrontendHandler http.Handler
}
Config controls HTTP API behavior.
type Server ¶
type Server struct {
// contains filtered or unexported fields
}
Server serves the HTTP API.
type ThreadStore ¶
type ThreadStore interface {
UpsertClient(ctx context.Context, clientID string) error
CreateThread(ctx context.Context, params storage.CreateThreadParams) (storage.Thread, error)
GetThread(ctx context.Context, threadID string) (storage.Thread, error)
DeleteThread(ctx context.Context, threadID string) error
UpdateThreadTitle(ctx context.Context, threadID, title string) error
UpdateThreadSummary(ctx context.Context, threadID, summary string) error
UpdateThreadAgentOptions(ctx context.Context, threadID, agentOptionsJSON string) error
UpsertAgentConfigCatalog(ctx context.Context, params storage.UpsertAgentConfigCatalogParams) error
GetAgentConfigCatalog(ctx context.Context, agentID, modelID string) (storage.AgentConfigCatalog, error)
ListAgentConfigCatalogsByAgent(ctx context.Context, agentID string) ([]storage.AgentConfigCatalog, error)
GetAgentSlashCommands(ctx context.Context, agentID string) (storage.AgentSlashCommands, error)
UpsertAgentSlashCommands(ctx context.Context, params storage.UpsertAgentSlashCommandsParams) error
GetSessionTranscriptCache(ctx context.Context, agentID, cwd, sessionID string) (storage.SessionTranscriptCache, error)
UpsertSessionTranscriptCache(ctx context.Context, params storage.UpsertSessionTranscriptCacheParams) error
GetSessionConfigCache(ctx context.Context, agentID, cwd, sessionID string) (storage.SessionConfigCache, error)
UpsertSessionConfigCache(ctx context.Context, params storage.UpsertSessionConfigCacheParams) error
ListThreads(ctx context.Context) ([]storage.Thread, error)
CreateTurn(ctx context.Context, params storage.CreateTurnParams) (storage.Turn, error)
CreateTurnAttachments(ctx context.Context, params []storage.CreateTurnAttachmentParams) error
GetTurnAttachment(ctx context.Context, attachmentID string) (storage.TurnAttachment, error)
GetTurn(ctx context.Context, turnID string) (storage.Turn, error)
ListTurnsByThread(ctx context.Context, threadID string) ([]storage.Turn, error)
AppendEvent(ctx context.Context, turnID, eventType, dataJSON string) (storage.Event, error)
ListEventsByTurn(ctx context.Context, turnID string) ([]storage.Event, error)
FinalizeTurn(ctx context.Context, params storage.FinalizeTurnParams) error
ListRecentDirectories(ctx context.Context, clientID string, limit int) ([]string, error)
}
ThreadStore is the storage contract required by HTTP APIs.
Click to show internal directories.
Click to hide internal directories.