realtime

package module
v0.0.0-...-073b321 Latest Latest
Warning

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

Go to latest
Published: Nov 27, 2026 License: MIT Imports: 15 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.

README

Realtime plugin bridge

src/ctn/realtime binds res/int/realtime to the language-neutral intelligence.realtime/v1 Ext plugin contract. A guest provider opens one explicit model session per process. The host receives a session ID and can send text or audio, commit a turn, request a response, interrupt, send a tool result, receive events, and close. Optional audio controls clear uncommitted input or truncate conversation audio to what was actually played.

Operations are open, send_text, send_audio, commit_audio, respond, interrupt, send_tool_result, receive, clear_input_audio, truncate_audio, and close. Inputs and events are bounded. The bridge never opens a microphone, plays audio, executes tool calls, or chooses an endpoint or model. Hosts must authorize calls and close the plugin process.

testdata/v1 contains language-neutral JSON fixtures for non-Go bindings.

Documentation

Overview

Package realtime binds intelligence.realtime/v1 to the Ext plugin engine. It transports explicit model-session operations and never opens devices or executes proposed tools.

Index

Constants

View Source
const ContractName = "intelligence.realtime"
View Source
const ContractVersion = "v1"
View Source
const Protocol = ContractName + "/" + ContractVersion

Variables

View Source
var ContractRef = plugin.ContractRef{Name: ContractName, Version: ContractVersion}

Functions

func Descriptor

func Descriptor(identity plugin.Identity) plugin.Descriptor

func PackageExecutable

func PackageExecutable(options ExecutablePackage) (packagekit.Manifest, error)

func RegisterProvider

func RegisterProvider(registry *author.Registry, provider domain.Provider, authorize func(context.Context, plugin.Request) error) (*plugin.Descriptor, error)

func ServeCurrentExecutable

func ServeCurrentExecutable(ctx context.Context, id, version string, provider domain.Provider, authorize func(context.Context, plugin.Request) error) error

func ServeStdio

func ServeStdio(ctx context.Context, identity plugin.Identity, provider domain.Provider, authorize func(context.Context, plugin.Request) error) error

Types

type Client

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

Client opens a model conversation through an already admitted Ext session.

func NewClient

func NewClient(caller author.Caller) *Client

func (*Client) Open

func (c *Client) Open(ctx context.Context, request domain.OpenRequest) (*SessionClient, error)

type ExecutablePackage

type ExecutablePackage struct{ ID, Version, Binary, OutputDir, OS, Arch string }

type Guest

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

Guest keeps one live model session per provider process. Hosts that need parallel conversations launch separate verified processes.

type SessionClient

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

SessionClient implements the portable realtime.Session and AudioControl.

func (*SessionClient) ClearInputAudio

func (c *SessionClient) ClearInputAudio(ctx context.Context) error

func (*SessionClient) Close

func (c *SessionClient) Close() error

func (*SessionClient) CloseContext

func (c *SessionClient) CloseContext(ctx context.Context) error

func (*SessionClient) CommitAudio

func (c *SessionClient) CommitAudio(ctx context.Context) error

func (*SessionClient) Interrupt

func (c *SessionClient) Interrupt(ctx context.Context) error

func (*SessionClient) Receive

func (c *SessionClient) Receive(ctx context.Context) (domain.Event, error)

func (*SessionClient) Respond

func (c *SessionClient) Respond(ctx context.Context) error

func (*SessionClient) SendAudio

func (c *SessionClient) SendAudio(ctx context.Context, value []byte) error

func (*SessionClient) SendText

func (c *SessionClient) SendText(ctx context.Context, value string) error

func (*SessionClient) SendToolResult

func (c *SessionClient) SendToolResult(ctx context.Context, callID string, result []byte) error

func (*SessionClient) TruncateAudio

func (c *SessionClient) TruncateAudio(ctx context.Context, itemID string, contentIndex, playedMS int) error

Jump to

Keyboard shortcuts

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