@floe-ai/sdk 0.1.0-dev.21 → 0.1.0-dev.23
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist-sdk/floe-sdk.es.js +3594 -3170
- package/dist-sdk/floe-sdk.es.js.map +1 -1
- package/dist-sdk/floe-sdk.iife.js +58 -53
- package/dist-sdk/floe-sdk.iife.js.map +1 -1
- package/dist-sdk/floe-sdk.umd.js +58 -53
- package/dist-sdk/floe-sdk.umd.js.map +1 -1
- package/dist-sdk/index.d.ts +31 -3
- package/package.json +1 -1
package/dist-sdk/index.d.ts
CHANGED
|
@@ -137,6 +137,8 @@ declare class OnboardingSDK extends EventEmitter {
|
|
|
137
137
|
private isReturningUser;
|
|
138
138
|
private hasSkippedOnboarding;
|
|
139
139
|
private _isMinimized;
|
|
140
|
+
private textModeEnabled;
|
|
141
|
+
private planProgress;
|
|
140
142
|
constructor(config: SDKConfig);
|
|
141
143
|
/**
|
|
142
144
|
* Generate unique session ID
|
|
@@ -155,10 +157,20 @@ declare class OnboardingSDK extends EventEmitter {
|
|
|
155
157
|
* Initialize the SDK and connect to servers
|
|
156
158
|
*/
|
|
157
159
|
init(): Promise<void>;
|
|
160
|
+
/**
|
|
161
|
+
* Setup navigation detection for page navigation events.
|
|
162
|
+
* Ensures navigationCompleteDetector is instantiated and started regardless
|
|
163
|
+
* of text/voice mode — navigation tracking is needed in both modes so the
|
|
164
|
+
* server always knows the current page context.
|
|
165
|
+
*/
|
|
166
|
+
private setupNavigationDetection;
|
|
158
167
|
/**
|
|
159
168
|
* Setup audio playback for bot audio tracks with real-time level analysis.
|
|
160
|
-
* Centralizes all audio element handling
|
|
161
|
-
* This is the single source of truth for audio
|
|
169
|
+
* Centralizes all audio element handling and analyzer instantiation.
|
|
170
|
+
* This is the single source of truth for audio initialization to prevent duplicates.
|
|
171
|
+
*
|
|
172
|
+
* Note: Navigation detection is handled separately by setupNavigationDetection()
|
|
173
|
+
* so it works in both voice and text modes.
|
|
162
174
|
*/
|
|
163
175
|
private setupAudioPlayback;
|
|
164
176
|
/**
|
|
@@ -434,9 +446,25 @@ declare class OnboardingSDK extends EventEmitter {
|
|
|
434
446
|
* Public API Methods
|
|
435
447
|
*/
|
|
436
448
|
/**
|
|
437
|
-
* Send text message
|
|
449
|
+
* Send text message (low-level)
|
|
438
450
|
*/
|
|
439
451
|
sendText(text: string): Promise<void>;
|
|
452
|
+
/**
|
|
453
|
+
* Toggle text mode on/off
|
|
454
|
+
* When text mode is enabled, mic is muted and user types messages.
|
|
455
|
+
* When disabled, mic is re-enabled and voice mode resumes.
|
|
456
|
+
*/
|
|
457
|
+
toggleTextMode(): void;
|
|
458
|
+
/**
|
|
459
|
+
* Send a text message with optimistic UI update.
|
|
460
|
+
* Uses custom 'text_message' RTVI message type (Approach B) instead of
|
|
461
|
+
* Pipecat's native send-text, so the server-side handler can run the full
|
|
462
|
+
* processing pipeline (state machine, system prompt refresh, activity
|
|
463
|
+
* recording, goal extraction, transcript recording) — not just LLM injection.
|
|
464
|
+
*
|
|
465
|
+
* In text mode, TTS is skipped (audio_response: false).
|
|
466
|
+
*/
|
|
467
|
+
sendTextMessage(text: string): Promise<void>;
|
|
440
468
|
/**
|
|
441
469
|
* Toggle microphone mute
|
|
442
470
|
*/
|