console

package
v0.0.14 Latest Latest
Warning

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

Go to latest
Published: May 29, 2026 License: MIT Imports: 12 Imported by: ? modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AudioIO

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

AudioIO manages bidirectional audio interfacing with the host OS's microphone and speakers.

func NewAudioIO

func NewAudioIO() *AudioIO

func (*AudioIO) CaptureFrame added in v0.0.5

func (a *AudioIO) CaptureFrame(frame *model.AudioFrame) error

--- agent.AudioOutput Implementation ---

func (*AudioIO) ClearBuffer added in v0.0.5

func (a *AudioIO) ClearBuffer()

func (*AudioIO) Flush added in v0.0.5

func (a *AudioIO) Flush()

func (*AudioIO) Label added in v0.0.5

func (a *AudioIO) Label() string

--- agent.AudioInput Implementation ---

func (*AudioIO) MicFrames

func (a *AudioIO) MicFrames() <-chan *model.AudioFrame

func (*AudioIO) MicTapFrames added in v0.0.5

func (a *AudioIO) MicTapFrames() <-chan *model.AudioFrame

func (*AudioIO) OnAttached added in v0.0.5

func (a *AudioIO) OnAttached()

func (*AudioIO) OnDetached added in v0.0.5

func (a *AudioIO) OnDetached()

func (*AudioIO) OnPlaybackFinished added in v0.0.5

func (a *AudioIO) OnPlaybackFinished(f func(ev agent.PlaybackFinishedEvent))

func (*AudioIO) OnPlaybackStarted added in v0.0.5

func (a *AudioIO) OnPlaybackStarted(f func(ev agent.PlaybackStartedEvent))

func (*AudioIO) Pause added in v0.0.5

func (a *AudioIO) Pause()

func (*AudioIO) PushFrame

func (a *AudioIO) PushFrame(frame *model.AudioFrame)

PushFrame takes audio from the Agent and queues it for the speakers

func (*AudioIO) Resume added in v0.0.5

func (a *AudioIO) Resume()

func (*AudioIO) Start

func (a *AudioIO) Start(ctx context.Context) error

func (*AudioIO) Stop

func (a *AudioIO) Stop() error

func (*AudioIO) Stream added in v0.0.5

func (a *AudioIO) Stream() <-chan *model.AudioFrame

func (*AudioIO) WaitForPlayout added in v0.0.5

func (a *AudioIO) WaitForPlayout(ctx context.Context) error

func (*AudioIO) Write

func (a *AudioIO) Write(frame *model.AudioFrame) error

Write for pipe integration

type AudioIOSource added in v0.0.5

type AudioIOSource interface {
	MicTapFrames() <-chan *model.AudioFrame
}

AudioIOSource represents any audio I/O that can provide mic frames

type ConsoleManager added in v0.0.5

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

ConsoleManager is a singleton that manages console I/O for agent sessions It follows the pattern from the official Python SDK's AgentsConsole

func GetInstance added in v0.0.5

func GetInstance() *ConsoleManager

GetInstance returns the singleton ConsoleManager instance

func (*ConsoleManager) AcquireIO added in v0.0.5

func (cm *ConsoleManager) AcquireIO(ctx context.Context, session *agent.AgentSession) error

Acquire I/O for a session (like python's acquire_io) This should be called when the session starts

func (*ConsoleManager) GetAudioInput added in v0.0.5

func (cm *ConsoleManager) GetAudioInput() *AudioIO

GetAudioInput returns the console audio input

func (*ConsoleManager) IsEnabled added in v0.0.5

func (cm *ConsoleManager) IsEnabled() bool

IsEnabled returns whether console mode is enabled

func (*ConsoleManager) IsIOAcquired added in v0.0.5

func (cm *ConsoleManager) IsIOAcquired() bool

IsIOAcquired returns whether I/O has been acquired

func (*ConsoleManager) Stop added in v0.0.5

func (cm *ConsoleManager) Stop() error

Stop stops the console I/O

type ConsoleModel

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

ConsoleModel drives the interactive terminal UI

func NewConsoleModel

func NewConsoleModel(ctx context.Context, audioIO AudioIOSource, session *agent.AgentSession) *ConsoleModel

func (*ConsoleModel) Init

func (m *ConsoleModel) Init() tea.Cmd

func (*ConsoleModel) Update

func (m *ConsoleModel) Update(msg tea.Msg) (tea.Model, tea.Cmd)

func (*ConsoleModel) View

func (m *ConsoleModel) View() string

Jump to

Keyboard shortcuts

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