server

package
v1.18.1 Latest Latest
Warning

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

Go to latest
Published: Jan 5, 2026 License: Apache-2.0 Imports: 25 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Listen

func Listen(ctx context.Context, addr string) (net.Listener, error)

func NewSourceLoader added in v1.8.2

func NewSourceLoader(ctx context.Context, inner config.Source, refreshInterval time.Duration) *sourceLoader

NewSourceLoader creates a new source loader that caches and periodically refreshes a config source.

Types

type Server

type Server struct {
	// contains filtered or unexported fields
}

func New

func New(ctx context.Context, sessionStore session.Store, runConfig *config.RuntimeConfig, refreshInterval time.Duration, agentSources config.Sources) (*Server, error)

func (*Server) Serve

func (s *Server) Serve(ctx context.Context, ln net.Listener) error

type SessionManager added in v1.8.2

type SessionManager struct {
	Sources config.Sources
	// contains filtered or unexported fields
}

SessionManager manages sessions for HTTP and Connect-RPC servers.

func NewSessionManager added in v1.8.2

func NewSessionManager(ctx context.Context, sources config.Sources, sessionStore session.Store, refreshInterval time.Duration, runConfig *config.RuntimeConfig) *SessionManager

NewSessionManager creates a new session manager.

func (*SessionManager) CreateSession added in v1.8.2

func (sm *SessionManager) CreateSession(ctx context.Context, sessionTemplate *session.Session) (*session.Session, error)

CreateSession creates a new session from a template.

func (*SessionManager) DeleteSession added in v1.8.2

func (sm *SessionManager) DeleteSession(ctx context.Context, sessionID string) error

DeleteSession deletes a session by ID.

func (*SessionManager) GetSession added in v1.8.2

func (sm *SessionManager) GetSession(ctx context.Context, id string) (*session.Session, error)

GetSession retrieves a session by ID.

func (*SessionManager) GetSessions added in v1.8.2

func (sm *SessionManager) GetSessions(ctx context.Context) ([]*session.Session, error)

GetSessions retrieves all sessions.

func (*SessionManager) ResumeElicitation added in v1.8.2

func (sm *SessionManager) ResumeElicitation(ctx context.Context, sessionID, action string, content map[string]any) error

ResumeElicitation resumes an elicitation request.

func (*SessionManager) ResumeSession added in v1.8.2

func (sm *SessionManager) ResumeSession(ctx context.Context, sessionID, confirmation string) error

ResumeSession resumes a paused session.

func (*SessionManager) RunSession added in v1.8.2

func (sm *SessionManager) RunSession(ctx context.Context, sessionID, agentFilename, currentAgent string, messages []api.Message) (<-chan runtime.Event, error)

RunSession runs a session with the given messages.

func (*SessionManager) ToggleToolApproval added in v1.8.2

func (sm *SessionManager) ToggleToolApproval(ctx context.Context, sessionID string) error

ToggleToolApproval toggles the tool approval mode for a session.

Jump to

Keyboard shortcuts

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