@floe-ai/sdk 0.1.0-dev.35 → 0.1.0-dev.37

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.
@@ -1,5 +1,6 @@
1
1
  import { ContextData } from './types';
2
2
  import { EventEmitter } from './types';
3
+ import { Logger } from './logger';
3
4
  import { ScreenshotOptions } from './types';
4
5
  import { SDKConfig } from './types';
5
6
  import { UIAction } from './types';
@@ -94,6 +95,7 @@ export declare interface FloeUserInfo {
94
95
  * Main Onboarding SDK
95
96
  */
96
97
  declare class OnboardingSDK extends EventEmitter {
98
+ private readonly logger;
97
99
  private config;
98
100
  private sessionId;
99
101
  private overlay;
@@ -138,8 +140,9 @@ declare class OnboardingSDK extends EventEmitter {
138
140
  private hasSkippedOnboarding;
139
141
  private _isMinimized;
140
142
  private textModeEnabled;
143
+ private micPermissionDenied;
141
144
  private planProgress;
142
- constructor(config: SDKConfig);
145
+ constructor(config: SDKConfig, logger?: Logger);
143
146
  /**
144
147
  * Generate unique session ID
145
148
  */
@@ -173,6 +176,28 @@ declare class OnboardingSDK extends EventEmitter {
173
176
  * so it works in both voice and text modes.
174
177
  */
175
178
  private setupAudioPlayback;
179
+ /**
180
+ * Initialize devices on `client`, retrying with mic disabled if the browser
181
+ * denies the microphone permission. On a mic permission error the method:
182
+ * - sets textModeEnabled/micPermissionDenied/micEnabled
183
+ * - persists the preference to localStorage
184
+ * - rebuilds PipecatClient with enableMic:false and calls initDevices again
185
+ * - returns the new client so the caller can replace this.pipecatClient
186
+ * Any non-permission error is rethrown unchanged.
187
+ */
188
+ private initDevicesWithMicFallback;
189
+ /**
190
+ * Returns true when the error represents a mic permission denial or cancellation.
191
+ * Covers NotAllowedError (explicit deny), SecurityError (policy block), and
192
+ * AbortError (user dismissed/cancelled the browser prompt).
193
+ */
194
+ private isMicPermissionError;
195
+ /**
196
+ * Switch to text mode automatically when mic permission is denied or cancelled.
197
+ * Mutes the mic in the Pipecat client (if already connected), persists the
198
+ * preference, and re-renders the UI so the text input is immediately visible.
199
+ */
200
+ private enableTextModeFallback;
176
201
  /**
177
202
  * Setup user microphone analysis for waveform visualization
178
203
  */
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@floe-ai/sdk",
3
- "version": "0.1.0-dev.35",
3
+ "version": "0.1.0-dev.37",
4
4
  "description": "Floe AI Onboarding SDK for React applications",
5
5
  "type": "module",
6
6
  "main": "./dist-sdk/floe-sdk.es.js",