Documentation
¶
Overview ¶
Package compatbinding mounts the existing binding.Runtime behind one coarse graph element. It is a migration oracle, not a reference architecture: its ports preserve current behavior while the binding internals are decomposed into ordinary perception, interaction, cognition, and action elements.
Index ¶
Constants ¶
const SessionServiceName = "compat.binding.session"
Variables ¶
This section is empty.
Functions ¶
func Descriptor ¶
func Descriptor() element.Descriptor
Types ¶
type Call ¶
type Call struct {
Kind CallKind
Context context.Context
Settings binding.Settings
Audio perception.Frame
Video perception.Frame
Text binding.TextInput
ToolResult trajectory.ToolResult
Reason string
Truncate binding.Truncation
Done chan error
}
Call stays in-process and is intentionally absent from descriptor bundles for remote placement. The compatibility element is local-only; decomposed elements use serializable protocol payloads.
type CallKind ¶
type CallKind string
const ( CallUpdate CallKind = "update" CallAudio CallKind = "audio" CallVideo CallKind = "video" CallText CallKind = "text" CallToolResult CallKind = "tool_result" CallCommitAudio CallKind = "commit_audio" CallCreateResponse CallKind = "create_response" CallCancel CallKind = "cancel" CallTruncate CallKind = "truncate" )
type Config ¶
type Config struct {
Name string `json:"name"`
Ownership binding.Ownership `json:"ownership"`
Capabilities binding.Capabilities `json:"capabilities"`
}
type Factory ¶
type Factory struct{}
func (Factory) Descriptor ¶
func (Factory) Descriptor() element.Descriptor
func (Factory) ValidateConfig ¶
func (Factory) ValidateConfig(source json.RawMessage) error
type Holder ¶
type Holder struct {
// contains filtered or unexported fields
}
Holder is the management-plane handle published during mount.
func (*Holder) RequestClose ¶
RequestClose records the session-level cause for the lifecycle disposer. The request is separate from graph cancellation so final sink events can be drained and acknowledged before output queues close.
func (*Holder) Status ¶
Status and Trajectory are management-plane reads and therefore do not compete with realtime observation channels.
func (*Holder) Trajectory ¶
func (holder *Holder) Trajectory() (trajectory.Snapshot, error)
type SessionService ¶
SessionService provides session-scoped coeffects without putting a Binding, Sink, dispatcher function, or secret into Graph IR.
type SinkEvent ¶
type SinkEvent struct {
Kind SinkEventKind
// Context and Done are local-only synchronization coeffects. The coarse
// compatibility element is deliberately not remotely placeable: existing
// Sink methods are synchronous, so an adapter must return the downstream
// result to the legacy producer instead of merely acknowledging enqueue.
Context context.Context
Done chan error
TurnOutcome binding.TurnOutcome
Activity binding.ActivityEvent
Transcript binding.TranscriptEvent
Observation perception.Observation
Utterance action.Utterance
Text string
Frame action.Frame
SpeechEnd action.Outcome
ToolCalls binding.ToolCallEvent
Failure binding.ErrorEvent
Debug binding.DebugEvent
}
type SinkEventKind ¶
type SinkEventKind string
const ( EventTurnBegin SinkEventKind = "turn_begin" EventTurnEnd SinkEventKind = "turn_end" EventActivity SinkEventKind = "activity" EventTranscript SinkEventKind = "transcript" EventObservation SinkEventKind = "observation" EventSpeechReserved SinkEventKind = "speech_reserved" EventSpeechReserveCanceled SinkEventKind = "speech_reservation_cancelled" EventSpeechBegin SinkEventKind = "speech_begin" EventSpeechText SinkEventKind = "speech_text" EventSpeechAudio SinkEventKind = "speech_audio" EventSpeechEnd SinkEventKind = "speech_end" EventToolCalls SinkEventKind = "tool_calls" EventFailed SinkEventKind = "failed" EventDebug SinkEventKind = "debug" )