VoiceLoop class
Wires the voice agent loop together end-to-end.
Constructors
- VoiceLoop({required SendPayload send, required SnapshotFactory captureSnapshot, ScrollerResolver? scrollerResolver, HighlightCallback? highlightCallback, BackHandler? onBack, HighlightDispatcher? standaloneHighlightDispatcher, RequestSnapshotCallback? onRequestSnapshot, MissionStatusListener? onMissionStatus, void afterStep()?, StepVerifier verifier = const Verifier(), Explorer explorer = const Explorer(), MissionOutcomeListener? onMissionTelemetry, StepOutcomeListener? onStepTelemetry, NearMissListener? onNearMiss, Duration stepTimeout = const Duration(seconds: 30), Duration missionTimeout = const Duration(minutes: 3), int retriesPerStep = 2, Duration retryDelay = const Duration(milliseconds: 450), Duration postExecuteSettle = const Duration(milliseconds: 400)})
Properties
-
activeMissionIds
→ Iterable<
String> -
no setter
- hashCode → int
-
The hash code for this object.
no setterinherited
- isBusy → bool
-
no setter
- onMissionStatus → MissionStatusListener?
-
Host-side observer for mission lifecycle events.
final
- onRequestSnapshot → RequestSnapshotCallback?
-
See RequestSnapshotCallback.
final
- runner ↔ MissionRunner
-
The runner this loop owns.
latefinal
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- send → SendPayload
-
final
- standaloneHighlightDispatcher → HighlightDispatcher?
-
See HighlightDispatcher.
final
Methods
-
cancelAllMissions(
) → void - Withdraw every running and queued mission (kill-switch flip, teardown).
-
dispose(
) → void - Cancel every in-flight mission and clear state.
-
handlePayload(
Uint8List bytes) → Future< void> -
Feed bytes from the LiveKit data-channel
onDatacallback here. -
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited
Static Methods
-
fitResponseFrame(
Map< String, dynamic> json, int maxBytes) → Map<String, dynamic> ? -
Shrink a request/response frame the backend is WAITING on so it fits
maxBytes, instead of letting the transport cap drop it:find_candidates_responsesheds its lowest-ranked (trailing) candidates,info_query_responseshortensvalue. Null for any other type, or when even the minimal frame cannot fit (the queue then substitutes a failure). -
redactForLog(
Map< String, dynamic> json) → Map<String, dynamic> -
A copy of an inbound frame safe for the (debug-only) wire log: the
value of every
set_text/typestep (params.text) is replaced by<redacted len=N>. Whether the target is a PIN / password field is only known later, on the device, so every typed value is redacted.
Constants
- kHighlightMissionPrefix → const String
- Id prefix of the internal highlight missions.