server

package
v0.1.1 Latest Latest
Warning

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

Go to latest
Published: Mar 28, 2026 License: MIT Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ExtractFiles

func ExtractFiles(text string) (string, []string)

ExtractFiles extracts /tmp/gua-* file paths from agent response text.

func FormatInbound

func FormatInbound(msg channel.InboundMessage, p channel.Presenter) agent.Message

FormatInbound converts an InboundMessage into an agent Message, using the presenter to annotate media files in a platform-specific way.

func MergeFiles

func MergeFiles(paths ...[]string) []string

MergeFiles deduplicates file paths. Paths are assumed to be pre-validated (ExtractFiles already checks isSendableFile; agent Files are trusted).

Types

type Server

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

Server orchestrates a Channel and an Agent.

func New

func New(ch channel.Channel, a agent.Agent) *Server

New creates a Server that bridges the given channel and agent.

func (*Server) Run

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

Run starts the server. Blocks until ctx is canceled.

Jump to

Keyboard shortcuts

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