mugib_sdk 1.0.23
mugib_sdk: ^1.0.23 copied to clipboard
Official Flutter SDK for Mugib chat sessions, voice agents, and session payload with one apiKey.
Changelog #
1.0.23 #
- Voice: lower playback buffer default (960 frames ≈ 40ms @ 24kHz, was 166ms) for faster time-to-first-audio and response latency
- Voice: parallel WebSocket connect + playback setup during call start
1.0.22 #
- Voice:
echo_guard_msandbarge_in_thresholdcome from Mugib/tokenand WebSocketready— no per-app tuning; Admin settings are the single source of truth - Voice:
MugibVoiceTokenincludes server echo-guard fields;VoiceEchoGuard.applyServerConfig
1.0.21 #
- Voice: echo guard — suppresses mic uplink during agent playback unless input
level exceeds a barge-in threshold; sends
client_stateto the server every ~150 ms - Voice:
preferSpeaker(defaultfalse) onMugibVoiceClient/MugibVoiceSession— earpiece/receiver routing on iOS and Android for cleaner AEC; opt in to loudspeaker when needed (preferSpeaker: true) - Voice:
VoiceEchoGuard— coordinates client-side gating withVoicePlaybackCoordinator(grace window + level-based barge-in) - Voice: Android
speakerphonefollowspreferSpeakerinstead of always forcing speaker - Voice: iOS audio session no longer forces
defaultToSpeakerunlesspreferSpeakeris true - Server (Mugib backend): matching uplink gate via
voice.echo_guard_msandvoice.barge_in_thresholdsettings (migration 130) - Voice:
MugibVoiceService.client()— forwardspreferSpeakertoMugibVoiceClient
Upgrade note: If you previously worked around echo with allow_interruption: false
in Portal, you can re-enable barge-in and rely on echo guard instead.
1.0.20 #
- Voice: rollback to the stable 1.0.12 stack — removes Silero VAD, uplink level gates, and post-greeting mic blocks that caused cut-offs, delay, and silent uplink on iOS/web
- Voice: mic uplink stays open when barge-in is enabled; pauses only when the agent has interruption disabled and PCM is still playing
- Voice:
VoicePlaybackCoordinatordeferslisteninguntil agent audio drains
1.0.12 #
- Voice: defer
listeningUI/state until buffered agent PCM finishes playing, so false VAD/echo signals no longer cut agent speech mid-sentence - Voice: wire
allowInterruptionfrom/token— mic uplink stays open when barge-in is enabled (default); uplink pauses during agent playback only when the agent has interruption disabled - Voice:
VoicePlaybackCoordinatorkeeps playback and call state in sync; realinterruptedevents still flush audio immediately for user barge-in
1.0.11 #
- Voice:
MugibVoiceClient.inputLevel— smoothed mic input level stream (0.0–1.0) for building a live level meter so users can confirm their mic is captured - Example: full voice-call screen — connect/end, mute, live transcript bubbles,
call state pill + timer, animated mic orb + input level meter, and friendly
error UI mapped from
MugibVoiceErrorCode - Deps: upgrade
web_socket_channel2 → 3,record5 → 6,http→ 1.5,flutter_lints4 → 5 (no breaking public API changes) - Deps: drop unused
permission_handler— microphone permission is handled byrecord.hasPermission(), so consumers no longer pull its heavier Android setup
1.0.10 #
- Voice:
MugibTranscript.partial— server streams incremental STT; replace the last line for the same role whenpartialis true - Voice:
MugibVoiceClient.transcriptLines— ready-to-render transcript list (no manual partial handling in your UI) - Voice:
MugibTranscriptBufferhelper for custom transcript UIs - Requires Mugib backend with accumulated voice transcript +
partialWebSocket field
1.0.9 #
- Fix: configure VoIP audio session for speaker-mode voice chat (like ChatGPT/Gemini)
— iOS
voiceChat+defaultToSpeaker, AndroidVOICE_COMMUNICATION+MODE_IN_COMMUNICATION+ speakerphone for hardware AEC - Add
audio_sessiondependency; mic stays open during agent speech (barge-in is enforced server-side via Portalallow_interruption, not in the SDK)
1.0.8 #
- Fix: stop clearing agent audio on
state: listening(onlyinterruptedclears playback) - Fix: pause mic uplink while agent speaks when
allow_interruptionis false (reduces phone echo) - Read
allow_interruptionfrom/tokenresponse (voice agent setting)
1.0.7 #
- Fix: voice
userContextpayload — sendexpect_context=1on WebSocket URL so the server waits for the context frame (matches browser widget reliability) - Fix: open WebSocket before PCM playback setup for faster context delivery
- Requires backend with voice payload/KB fixes (
expect_context, sync KB inject)
1.0.6 #
- Docs: explain proactive triggers — configured in Portal (
projects/{id}/triggers), optional read viagetWidgetTriggers(); returns[]when none configured - Docs: remove legacy
mugib_voicepackage references — usemugib_sdkonly - Requires backend with fix for
GET /api/v1/widget/triggers(200 + empty array, not 500)
1.0.5 #
- Docs: sync install version to
^1.0.4+ across repo guides - Add
@DeprecatedisGeminiLivealias →isMugibVoiceAi(migration from 1.0.3) - Remove stale
gemini_session.dartfrom package tree
1.0.4 #
- Fix: SSE streaming no longer drops spaces between tokens — parse
data:lines per the SSE spec (strip at most one optional separator space, not all leading whitespace). Fixes merged words insendStream().
1.0.3 #
- Rebrand voice stack as Mugib Voice AI in docs and public API (remove Gemini naming)
- Rename
GeminiVoiceSession→MugibVoiceSession(internal) - Rename
isGeminiLive→isMugibVoiceAion agent/token models
1.0.2 #
- Docs: clarify SDK scope — app connects to Agent; KB/MCP/tools run server-side
- Docs: move handoff poll and tool approval buttons to optional Advanced section
- Docs: minimal quick-start example (
send()+send("yes")for confirmations) - Code comments: label
poll()/confirmTool()as optional UI helpers
1.0.1 #
- Focus SDK on chat + voice + session payload; widget config/triggers read-only on [MugibClient]
- Remove KB/stats from main client facade (advanced via [MugibApiClient] / [MugibKbService])
- Add
getWidgetTriggers()for/api/v1/widget/triggers
1.0.0 #
- Unified
mugib_sdkpackage: chat + voice + KB + widget APIs - Chat: sessions, messages (JSON + SSE), payload, handoff poll, tool confirmations, conversions, CSAT
- Voice: Mugib Voice AI calls (from former
mugib_voice) - KB: list / add / update / delete via tenant API
- Widget config, stats, metrics