agentscli

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Aug 30, 2026 License: Apache-2.0 Imports: 24 Imported by: 0

Documentation

Overview

Package agentscli provides the embedded LiveKit Agents command-line runtime. Parsing help and version commands performs no RTC, network, plugin, or telemetry initialization.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func FormatDownloadFailureMessage

func FormatDownloadFailureMessage(failures []PluginDownloadFailure) string

func FormatVersionInfo

func FormatVersionInfo() string

func Main

func Main[UserData any](options agents.ServerOptions[UserData], args []string) int

Main runs the embedded CLI and returns a process exit code. The caller is responsible for os.Exit, which keeps deferred cleanup reliable and testable.

func MainApp

func MainApp[UserData any](ctx context.Context, app AppOptions[UserData], args []string, streams IO) int

Types

type AppOptions

type AppOptions[UserData any] struct {
	Server  agents.ServerOptions[UserData]
	Console ConsoleRunner
	Plugins []agents.Plugin
}

type ConsoleOptions

type ConsoleOptions struct {
	ConnectAddress string
	Record         bool
	Logger         *slog.Logger
}

type ConsoleRunner

type ConsoleRunner func(context.Context, ConsoleOptions) error

func NewConsoleRunner

func NewConsoleRunner[UserData any](server agents.ServerOptions[UserData]) ConsoleRunner

NewConsoleRunner returns the built-in in-process console runner. The transport is initialized only when the console command is actually invoked.

type IO

type IO struct {
	Stdin   io.Reader
	Stdout  io.Writer
	Stderr  io.Writer
	Getenv  func(string) string
	Signals <-chan os.Signal
}

type PluginDownloadFailure

type PluginDownloadFailure struct {
	Plugin agents.Plugin
	Err    error
}

func DownloadPluginFiles

func DownloadPluginFiles(ctx context.Context, logger *slog.Logger, plugins []agents.Plugin) []PluginDownloadFailure

type VersionDetails

type VersionDetails struct {
	SDK            string
	WorkerProtocol int
	Go             string
	VCSRevision    string
	VCSModified    bool
	Dependencies   map[string]string
}

func VersionInfo

func VersionInfo() VersionDetails

Jump to

Keyboard shortcuts

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