console

package
v0.0.6 Latest Latest
Warning

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

Go to latest
Published: Apr 23, 2026 License: MIT Imports: 12 Imported by: 0

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