web

package
v0.11.0 Latest Latest
Warning

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

Go to latest
Published: Aug 17, 2026 License: MIT Imports: 25 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type BotInterface added in v0.3.0

type BotInterface interface {
	HandleUpdateAsync(ctx context.Context, update json.RawMessage, remoteAddr string)
	API() telegram.BotAPI
	GetActiveSessions() ([]rag.ActiveSessionInfo, error)
	ForceCloseSession(ctx context.Context, userID storage.ScopeID) (int, error)
	ForceCloseSessionWithProgress(ctx context.Context, userID storage.ScopeID, onProgress rag.ProgressCallback) (*rag.ProcessingStats, error)
	SendTestMessage(ctx context.Context, userID storage.ScopeID, text string, saveToHistory bool) (*rag.TestMessageResult, error)
	// IsAllowedScope authorizes a scope id against the allowlists of all
	// transports (Telegram + Mattermost), not just Telegram.
	IsAllowedScope(scopeID storage.ScopeID) bool
}

BotInterface is an interface that abstracts the bot's functionality needed by the web server.

type Server

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

func (*Server) SetAgentLogRepo added in v0.4.8

func (s *Server) SetAgentLogRepo(repo storage.AgentLogRepository)

SetAgentLogRepo sets the agent log repository (used for debug UI)

func (*Server) SetArtifactRepository added in v0.6.0

func (s *Server) SetArtifactRepository(repo storage.ArtifactRepository)

SetArtifactRepository sets the artifact repository (for debug UI).

func (*Server) SetFileStorage added in v0.10.0

func (s *Server) SetFileStorage(fs files.Storage)

SetFileStorage wires the artifact blob store used by the download handler to read artifact bytes (local disk or S3). Optional: when unset, downloads 500.

func (*Server) SetPeopleRepository added in v0.5.1

func (s *Server) SetPeopleRepository(repo storage.PeopleRepository)

SetPeopleRepository sets the people repository (v0.5.1)

func (*Server) SetScopeRepository added in v0.10.0

func (s *Server) SetScopeRepository(repo storage.ScopeRepository)

SetScopeRepository sets the scope repository, letting the dashboard label channel scopes (Time O/P/G) distinctly from person scopes. Optional: when unset (no resolver), every scope renders as a user.

func (*Server) Start

func (s *Server) Start(ctx context.Context) error

type TopicWithMessages added in v0.5.1

type TopicWithMessages struct {
	storage.TopicExtended
	Messages []storage.Message
}

TopicWithMessages extends TopicExtended with loaded messages for UI display.

Jump to

Keyboard shortcuts

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