@recallai/desktop-sdk 2.0.32 → 2.0.34

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/CHANGELOG.md CHANGED
@@ -1,3 +1,33 @@
1
+ ### 2.0.34 [patch] (MacOS+Windows) - 2026-09-25
2
+ - Fixed issues with Raw Media and multiple SDKs running.
3
+ - Added better diagnostic logging to Raw Media.
4
+ - Fixed Raw Media detecting meetings in the waiting room.
5
+ - Fixed speaker name detection in solo Google Meet meetings on macOS.
6
+ - Fix Raw Media permission requests for Teams on macOS.
7
+ - Improved Slack Huddle detection stability on macOS.
8
+ - Fixed WASAPI device initialization errors on Windows.
9
+ - Fixed Google Meet title detection on macOS.
10
+ - Improved Zoom meeting URL detection and retries on macOS.
11
+ - Improved native Zoom accessibility handling on macOS.
12
+ - Support Zooms latest client update for speaker detection on macOS.
13
+ - Fixed Google Meet local user detection from self-view tiles on macOS.
14
+ - Added localized mute detection for Google Meet on macOS.
15
+ - Fixed Google Meet audio resuming after silence.
16
+ - Fixed Zoom computer-audio disconnected handling on macOS.
17
+ - Support for compliance messaging for Teams on Windows.
18
+
19
+ ### 2.0.33 [patch] (MacOS+Windows) - 2026-09-21
20
+ - Stabilized Raw Media feature
21
+ - Added microphone selection API for ad hoc recordings on windows
22
+ - Improved Desktop SDK npm API documentation
23
+ - Improved macOS capture log performance
24
+ - Fixed compliance messaging for Google Meet links with dashes and large numbers of tabs on macOS
25
+ - Fixed Zoom Web meetings being detected as closed prematurely on macOS
26
+ - Fixed duplicate Zoom Web mic monitor events on macOS
27
+ - Fixed microphone teardown deadlock on macOS
28
+ - Fixed Slack grace period handling on macOS
29
+ - Improved AssemblyAI retry handling for enqueue and deadline failures
30
+
1
31
  ### 2.0.32 [patch] (MacOS+Windows) - 2026-09-15
2
32
  - Added support for detecting Google Meet, Teams Web, and Zoom Web meetings in Chromium browsers without Full Disk Access on macOS 27
3
33
  - Improved Google Meet and Zoom Web detection when starting with only a PIP window visible on macOS 27
package/index.d.ts CHANGED
@@ -1,157 +1,558 @@
1
- export type RecallAiSdkEvent = RecordingStartEvent | RecordingStopEvent | UploadProgressEvent | MeetingDetectedEvent | MeetingUpdatedEvent | MeetingClosedEvent | SdkStateChangeEvent | ErrorEvent | MediaCaptureStatusEvent | ParticipantCaptureStatusEvent | ComplianceMessageStatusEvent | PermissionsGrantedEvent | RealtimeEvent | ShutdownEvent | LogEvent | NetworkStatusEvent;
1
+ /**
2
+ * Payload emitted by any Desktop Recording SDK event.
3
+ *
4
+ * Prefer {@link EventTypeToPayloadMap} when writing event-specific handlers because it preserves
5
+ * the relationship between an event name and its payload type.
6
+ *
7
+ * @see https://docs.recall.ai/docs/desktop-recording-sdk-event-types
8
+ */
9
+ export type RecallAiSdkEvent = RecordingStartEvent | RecordingStopEvent | UploadProgressEvent | MeetingDetectedEvent | MeetingUpdatedEvent | MeetingClosedEvent | SdkStateChangeEvent | ErrorEvent | MediaCaptureStatusEvent | ParticipantCaptureStatusEvent | ComplianceMessageStatusEvent | PermissionsGrantedEvent | PermissionStatusEvent | RealtimeEvent | ShutdownEvent | LogEvent | NetworkStatusEvent | ZoomComputerAudioEvent;
10
+ /** Maps every supported event name to the payload received by its listener. */
2
11
  export type EventTypeToPayloadMap = {
12
+ /** Emitted after media capture has started. */
3
13
  'recording-started': RecordingStartEvent;
14
+ /** Emitted after media capture has ended. Upload processing may still be in progress. */
4
15
  'recording-ended': RecordingStopEvent;
5
16
  /**
6
17
  * @deprecated Recordings are uploaded in parallel to recording now, there is no progress.
7
18
  */
8
19
  'upload-progress': UploadProgressEvent;
20
+ /** Emitted when the SDK detects a supported meeting. */
9
21
  'meeting-detected': MeetingDetectedEvent;
22
+ /** Emitted when information about a detected meeting changes. */
10
23
  'meeting-updated': MeetingUpdatedEvent;
24
+ /** Emitted when a previously detected meeting is no longer active. */
11
25
  'meeting-closed': MeetingClosedEvent;
12
26
  /**
13
27
  * @deprecated Use recording-started/recording-ended instead.
14
28
  */
15
29
  'sdk-state-change': SdkStateChangeEvent;
30
+ /** Emitted when the SDK encounters an asynchronous error. */
16
31
  'error': ErrorEvent;
32
+ /** Emitted when recording-level audio or video capture starts or stops. */
17
33
  'media-capture-status': MediaCaptureStatusEvent;
34
+ /** Emitted when capture of an individual participant's media starts or stops. */
18
35
  'participant-capture-status': ParticipantCaptureStatusEvent;
36
+ /** Emitted when delivery of the configured compliance chat message changes state. */
19
37
  'compliance-message-status': ComplianceMessageStatusEvent;
38
+ /** Emitted when all permissions requested during initialization have been granted. */
20
39
  'permissions-granted': PermissionsGrantedEvent;
40
+ /** Emitted for the current state of each relevant permission. */
21
41
  'permission-status': PermissionStatusEvent;
42
+ /** Emitted for data subscribed to through a `desktop_sdk_callback` realtime endpoint. */
22
43
  'realtime-event': RealtimeEvent;
44
+ /** Emitted when the native SDK process exits. */
23
45
  'shutdown': ShutdownEvent;
46
+ /** Emitted for structured native SDK logs. */
24
47
  'log': LogEvent;
48
+ /** Emitted after a sustained network disconnection or reconnection. */
25
49
  'network-status': NetworkStatusEvent;
50
+ /** Emitted when Zoom's computer audio is disconnected or reconnected. macOS only. */
51
+ 'zoom-computer-audio': ZoomComputerAudioEvent;
26
52
  };
27
- export type Permission = 'accessibility' | 'screen-capture' | 'microphone' | 'system-audio' | 'full-disk-access' | 'teams-automation' | 'browser-automation';
53
+ /**
54
+ * A permission understood by {@link requestPermission}.
55
+ *
56
+ * These permissions are only required on macOS. Windows reports permission requests as granted
57
+ * because it does not require the corresponding macOS consent flows.
58
+ *
59
+ * `teams-automation` and `browser-automation` enable Raw Media and must be requested from an
60
+ * explicit user action before a meeting. They cannot be included in
61
+ * {@link RecallAiSdkConfig.acquirePermissionsOnStartup}.
62
+ *
63
+ * @see https://docs.recall.ai/docs/macos-permissions
64
+ * @see https://docs.recall.ai/docs/desktop-recording-sdk-raw-media
65
+ */
66
+ export type Permission =
67
+ /** Detect and interact with supported meeting application windows on macOS. */
68
+ 'accessibility'
69
+ /** Capture a meeting window's video and system audio on macOS. */
70
+ | 'screen-capture'
71
+ /** Capture the local microphone on macOS. */
72
+ | 'microphone'
73
+ /** Capture system audio without screen video; unnecessary when `screen-capture` is granted. */
74
+ | 'system-audio'
75
+ /** Read local meeting metadata used by supported legacy detection paths. */
76
+ | 'full-disk-access'
77
+ /** Prepare Microsoft Teams Desktop for Raw Media capture. macOS only. */
78
+ | 'teams-automation'
79
+ /** Prepare the supported default Chromium browser for Google Meet Raw Media. macOS only. */
80
+ | 'browser-automation';
81
+ /** Identifies a meeting or prepared desktop-audio source known to the SDK. */
28
82
  export interface RecallAiSdkWindow {
83
+ /**
84
+ * Stable identifier for this detected meeting or prepared audio source.
85
+ * Pass this value unchanged to recording methods such as {@link startRecording}.
86
+ */
29
87
  id: string;
88
+ /** Meeting title, when the platform makes it available. */
30
89
  title?: string;
90
+ /** Canonical meeting URL, when the platform makes it available. */
31
91
  url?: string;
92
+ /** Recall.ai meeting-platform identifier, when known. */
32
93
  platform?: string;
33
94
  }
95
+ /** Options used to initialize the Desktop Recording SDK. */
34
96
  export interface RecallAiSdkConfig {
97
+ /**
98
+ * Backwards-compatible alias for {@link apiUrl}. When both are supplied, `api_url` wins.
99
+ */
35
100
  api_url?: string;
101
+ /**
102
+ * Base URL for the Recall.ai region containing your workspace, for example
103
+ * `https://us-west-2.recall.ai`. Production URLs must use HTTPS.
104
+ *
105
+ * @see https://docs.recall.ai/docs/regions
106
+ */
36
107
  apiUrl?: string;
108
+ /**
109
+ * macOS permissions to request while initializing. Do not use this option for Raw Media
110
+ * automation permissions; request those separately from an explicit user interaction.
111
+ * Ignored on Windows, where these permission flows are unnecessary.
112
+ */
37
113
  acquirePermissionsOnStartup?: Exclude<Permission, 'teams-automation' | 'browser-automation'>[];
38
114
  [key: string]: any;
39
115
  }
116
+ /** Options used to start recording a detected meeting or prepared desktop-audio source. */
40
117
  export interface StartRecordingConfig {
118
+ /** ID from a meeting event or from {@link prepareDesktopAudioRecording}. */
41
119
  windowId: string;
120
+ /** Short-lived upload token returned by the Create Desktop SDK Upload endpoint. */
42
121
  uploadToken: string;
122
+ /**
123
+ * Disables Raw Media when it is enabled and available in your Recall.ai workspace.
124
+ * Defaults to false.
125
+ *
126
+ * @see https://docs.recall.ai/docs/desktop-recording-sdk-raw-media
127
+ */
128
+ disableRawMedia?: boolean;
43
129
  }
130
+ /** Identifies the active recording to stop. */
44
131
  export interface StopRecordingConfig {
132
+ /** ID originally passed to {@link startRecording}. */
45
133
  windowId: string;
46
134
  }
135
+ /** Identifies the active recording to pause. */
47
136
  export interface PauseRecordingConfig {
137
+ /** ID originally passed to {@link startRecording}. */
48
138
  windowId: string;
49
139
  }
140
+ /** Identifies the paused recording to resume. */
50
141
  export interface ResumeRecordingConfig {
142
+ /** ID originally passed to {@link startRecording}. */
143
+ windowId: string;
144
+ }
145
+ /** Options for sending a chat message through an active Raw Media recording. */
146
+ export interface SendChatMessageConfig {
147
+ /** ID of the active Raw Media recording. */
51
148
  windowId: string;
149
+ /** Message body. Must contain between 1 and 4,096 characters. */
150
+ message: string;
151
+ /** The participant ID, or "everyone". Defaults to "everyone". */
152
+ to?: string;
153
+ /** Whether to pin the message. Defaults to false. */
154
+ pin?: boolean;
52
155
  }
53
156
  /**
54
- * @deprecated Recordings are automatically uploaded based on your rentention configuration. This is now a no-op.
157
+ * @deprecated Recordings are automatically uploaded based on your retention configuration. This is now a no-op.
55
158
  */
56
159
  export interface UploadRecordingConfig {
160
+ /** ID originally passed to {@link startRecording}. */
57
161
  windowId: string;
58
162
  }
59
163
  interface PrepareDesktopAudioRecordingConfig {
60
164
  [key: string]: any;
61
165
  }
166
+ /** Audio endpoint direction used by Windows desktop-audio recordings. */
167
+ export type AudioDeviceDirection = 'input' | 'output';
168
+ /** An audio endpoint available to Windows desktop-audio recordings. */
169
+ export interface AudioDevice {
170
+ /** Platform-specific device identifier accepted by {@link setDesktopAudioDevice}. */
171
+ id: string;
172
+ /** Human-readable device name. */
173
+ name: string;
174
+ /** Whether this endpoint captures microphone input or renders system output. */
175
+ direction: AudioDeviceDirection;
176
+ }
177
+ /** Payload for the `recording-started` event. */
62
178
  export interface RecordingStartEvent {
179
+ /** Meeting or prepared audio source being recorded. */
63
180
  window: RecallAiSdkWindow;
181
+ /**
182
+ * Whether this recording is using Desktop SDK Raw Media. Use this as the source of truth for
183
+ * the active recording; `false` includes recordings that fell back to local capture.
184
+ */
185
+ rawMedia: boolean;
64
186
  }
187
+ /** Payload for the `recording-ended` event. */
65
188
  export interface RecordingStopEvent {
189
+ /** Meeting or prepared audio source whose capture ended. */
66
190
  window: RecallAiSdkWindow;
67
191
  }
192
+ /**
193
+ * Payload for the deprecated `upload-progress` event.
194
+ * @deprecated Recordings upload while capture is in progress and no longer report progress.
195
+ */
68
196
  export interface UploadProgressEvent {
197
+ /** Identifier of the recording source. */
69
198
  window: {
70
199
  id: string;
71
200
  };
201
+ /** Legacy upload progress value. */
72
202
  progress: number;
73
203
  }
204
+ /** Payload for the `meeting-detected` event. */
74
205
  export interface MeetingDetectedEvent {
206
+ /** Newly detected meeting. */
75
207
  window: RecallAiSdkWindow;
76
208
  }
209
+ /** Payload for the `meeting-updated` event. */
77
210
  export interface MeetingUpdatedEvent {
211
+ /** Current meeting data, including any newly resolved title or URL. */
78
212
  window: RecallAiSdkWindow;
79
213
  }
214
+ /** Payload for the `meeting-closed` event. */
80
215
  export interface MeetingClosedEvent {
216
+ /** Meeting that is no longer detected. */
81
217
  window: RecallAiSdkWindow;
82
218
  }
83
219
  /**
84
220
  * @deprecated Use recording-started/recording-ended instead.
85
221
  */
86
222
  export interface SdkStateChangeEvent {
223
+ /** Legacy global SDK state. */
87
224
  sdk: {
88
225
  state: {
226
+ /** Current legacy recording state. */
89
227
  code: 'recording' | 'idle' | 'paused';
90
228
  };
91
229
  };
92
230
  }
231
+ /** Payload describing recording-level media capture availability. */
93
232
  export interface MediaCaptureStatusEvent {
233
+ /** Recording affected by the change. */
94
234
  window: RecallAiSdkWindow;
235
+ /** Media kind whose capture state changed. */
95
236
  type: 'video' | 'audio';
237
+ /** `true` when the SDK is currently capturing this media kind. */
96
238
  capturing: boolean;
97
239
  }
240
+ /** Payload describing capture availability for an individual participant's media. */
98
241
  export interface ParticipantCaptureStatusEvent {
242
+ /** Recording affected by the change. */
99
243
  window: RecallAiSdkWindow;
244
+ /** Numeric identifier of the participant whose capture state changed. */
245
+ participantId: number;
246
+ /** Participant media kind whose capture state changed. */
100
247
  type: 'video' | 'audio' | 'screenshare';
248
+ /** `true` when the SDK is currently capturing this participant media kind. */
101
249
  capturing: boolean;
102
250
  }
251
+ /** Payload for delivery of the compliance message configured on the Desktop SDK Upload. */
103
252
  export interface ComplianceMessageStatusEvent {
253
+ /** Recording for which the compliance message was configured. */
104
254
  window: RecallAiSdkWindow;
255
+ /** Final or current delivery result. */
105
256
  status: 'sent' | 'timeout' | 'cancelled';
106
257
  }
258
+ /**
259
+ * Payload for the legacy aggregate `permissions-granted` event.
260
+ * Use `permission-status` when your UI needs the state of an individual permission.
261
+ */
107
262
  export interface PermissionsGrantedEvent {
108
263
  }
264
+ /** Payload reporting the state of a Desktop Recording SDK permission. */
109
265
  export interface PermissionStatusEvent {
266
+ /** Permission whose state was checked or changed. */
110
267
  permission: Permission;
111
- status: string;
268
+ /** Convenience boolean equivalent to `status === "granted"`. */
269
+ granted: boolean;
270
+ /**
271
+ * Current state. Values are `granted`, `not_requested`, `denied`, `not_installed`, and
272
+ * `error`. Automation permissions use `not_installed` when the required application or
273
+ * supported default browser is unavailable.
274
+ */
275
+ status: 'granted' | 'not_requested' | 'denied' | 'not_installed' | 'error';
112
276
  }
277
+ /** Payload for an asynchronous SDK error. */
113
278
  export interface ErrorEvent {
279
+ /** Meeting associated with the error, when applicable. */
114
280
  window?: RecallAiSdkWindow;
281
+ /** Machine-readable error category. */
115
282
  type: string;
283
+ /** Human-readable diagnostic message. */
116
284
  message: string;
117
285
  }
286
+ /** Payload delivered for a configured `desktop_sdk_callback` realtime event. */
118
287
  export interface RealtimeEvent {
288
+ /** Recording that produced the realtime event. */
119
289
  window: RecallAiSdkWindow;
290
+ /** Configured event name, such as `transcript.data` or `participant_events.join`. */
120
291
  event: string;
292
+ /** Event-specific payload matching the realtime event schema. */
121
293
  data: any;
122
294
  }
295
+ /** Payload emitted when the native Desktop Recording SDK process exits. */
123
296
  export interface ShutdownEvent {
297
+ /** Native process exit code, or `0` when no exit code is available. */
124
298
  code: number;
299
+ /** Signal that terminated the process, or an empty string when it exited normally. */
125
300
  signal: string;
126
301
  }
302
+ /** Payload emitted after a sustained network state change. */
127
303
  export interface NetworkStatusEvent {
304
+ /** Whether the network disconnected or recovered after a disconnection. */
128
305
  status: 'reconnected' | 'disconnected';
129
306
  }
307
+ /**
308
+ * Payload emitted after a sustained change to Zoom's computer-audio connection.
309
+ *
310
+ * `disconnected` means the local user is in the meeting without computer audio (for example
311
+ * dialled in by phone, or handed off to a Zoom Room). They remain audible to their own
312
+ * microphone, so the SDK keeps capturing it; an explicit mute is reported by neither status.
313
+ */
314
+ export interface ZoomComputerAudioEvent {
315
+ /** Recording affected by the change. */
316
+ window: RecallAiSdkWindow;
317
+ /** Whether Zoom's computer audio is currently connected. */
318
+ status: 'connected' | 'disconnected';
319
+ }
320
+ /** Structured diagnostic log emitted by the native SDK. */
130
321
  export interface LogEvent {
322
+ /** Log severity. */
131
323
  level: 'debug' | 'info' | 'warning' | 'error';
324
+ /** Formatted log message. */
132
325
  message: string;
326
+ /** Native logging subsystem. */
133
327
  subsystem: string;
328
+ /** Native logging category. */
134
329
  category: string;
330
+ /** Associated meeting ID, or an empty string for SDK-wide messages. */
135
331
  window_id: string;
136
332
  }
333
+ /**
334
+ * Starts the native Desktop Recording SDK process and begins meeting detection.
335
+ *
336
+ * Call this once during application startup, after registering any listeners that must observe
337
+ * initial permission and meeting-detection events. Supported on macOS and Windows; Linux is not
338
+ * supported. The returned promise resolves after the native process accepts its configuration.
339
+ *
340
+ * @param options SDK initialization and region configuration.
341
+ * @returns `null` after initialization succeeds.
342
+ * @throws If the platform is unsupported, the API URL is invalid, or the native SDK cannot start.
343
+ * @see https://docs.recall.ai/docs/desktop-sdk
344
+ * @see https://docs.recall.ai/docs/dsdk-supported-platforms
345
+ */
137
346
  export declare function init(options: RecallAiSdkConfig): Promise<null>;
347
+ /**
348
+ * Gracefully stops active SDK work and terminates the native Desktop Recording SDK process.
349
+ *
350
+ * Supported on macOS and Windows. Call {@link init} again before issuing more SDK commands. This
351
+ * method waits for the process to exit and force-terminates it after five seconds if necessary.
352
+ *
353
+ * @returns `null` after shutdown has been acknowledged.
354
+ * @throws If the SDK is not running or the shutdown command fails.
355
+ */
138
356
  export declare function shutdown(): Promise<null>;
357
+ /**
358
+ * Produces a diagnostic macOS accessibility-tree dump for a running application.
359
+ *
360
+ * This is an internal troubleshooting API, is unsupported on Windows, and should not be used by
361
+ * production integrations.
362
+ *
363
+ * @param procName Name of the process to inspect.
364
+ * @returns The native diagnostic command result.
365
+ */
139
366
  export declare function dumpAXTree(procName: string): Promise<any>;
367
+ /**
368
+ * Produces diagnostic information about applications visible to macOS accessibility APIs.
369
+ *
370
+ * This is an internal troubleshooting API, is unsupported on Windows, and should not be used by
371
+ * production integrations.
372
+ *
373
+ * @returns The native diagnostic command result.
374
+ */
140
375
  export declare function dumpAllApplications(): Promise<any>;
376
+ /**
377
+ * Starts recording a detected meeting or a source returned by
378
+ * {@link prepareDesktopAudioRecording}.
379
+ *
380
+ * Supported on macOS and Windows. `windowId` must come from the SDK and `uploadToken` must come
381
+ * from a newly created Desktop SDK Upload. On supported macOS meeting platforms, the SDK uses Raw
382
+ * Media when it is enabled and available; otherwise it records locally. Resolve capture mode from
383
+ * `recording-started.rawMedia` rather than predicting it from configuration.
384
+ *
385
+ * The returned promise only confirms that the start command was accepted. Listen for
386
+ * `recording-started` to confirm that media capture began and `error` for asynchronous failures.
387
+ * Starting a different recording stops the currently active recording.
388
+ *
389
+ * @param config Meeting/source ID, upload token, and optional Raw Media override.
390
+ * @returns `null` after the start command is accepted.
391
+ * @throws If the source is unknown, already recorded, permissions are insufficient, or startup fails.
392
+ * @see https://docs.recall.ai/docs/desktop-sdk
393
+ * @see https://docs.recall.ai/docs/desktop-recording-sdk-raw-media
394
+ */
141
395
  export declare function startRecording(config: StartRecordingConfig): Promise<null>;
396
+ /**
397
+ * Stops the active recording for a meeting or prepared desktop-audio source.
398
+ *
399
+ * Supported for local recordings on macOS and Windows and for Raw Media recordings on macOS. The
400
+ * returned promise confirms command handling, not completion of cloud artifact processing. Listen
401
+ * for `recording-ended` for capture completion and use Desktop SDK Upload webhooks for final upload
402
+ * status.
403
+ *
404
+ * @param config ID originally passed to {@link startRecording}.
405
+ * @returns `null` after the stop command is handled.
406
+ * @throws If the SDK is not running or the command cannot be delivered.
407
+ */
142
408
  export declare function stopRecording({ windowId }: StopRecordingConfig): Promise<null>;
409
+ /**
410
+ * Pauses media capture for an active recording without ending the recording.
411
+ *
412
+ * Supported for local recordings on macOS and Windows and for Raw Media recordings on macOS. Use
413
+ * the same `windowId` that was passed to {@link startRecording}. Call {@link resumeRecording} to
414
+ * continue the recording.
415
+ *
416
+ * @param config Active recording ID.
417
+ * @returns `null` after the pause command is handled.
418
+ * @throws If the SDK is not running or the command cannot be delivered.
419
+ */
143
420
  export declare function pauseRecording({ windowId }: PauseRecordingConfig): Promise<null>;
421
+ /**
422
+ * Resumes media capture for a paused recording.
423
+ *
424
+ * Supported for local recordings on macOS and Windows and for Raw Media recordings on macOS. Use
425
+ * the same `windowId` that was passed to {@link startRecording}.
426
+ *
427
+ * @param config Paused recording ID.
428
+ * @returns `null` after the resume command is handled.
429
+ * @throws If the SDK is not running or the command cannot be delivered.
430
+ */
144
431
  export declare function resumeRecording({ windowId }: ResumeRecordingConfig): Promise<null>;
145
432
  /**
146
- * @deprecated Recordings are automatically uploaded based on your rentention configuration. This is now a no-op.
433
+ * Sends a chat message through an active Desktop SDK Raw Media recording.
434
+ *
435
+ * Supported for Microsoft Teams Desktop and supported Chromium-based Google Meet browsers on
436
+ * macOS when `recording-started.rawMedia` is `true`. This method is not available for local
437
+ * recordings or on Windows. The returned promise confirms that the message was accepted and queued
438
+ * for the Raw Media connection; it does not confirm that the meeting platform displayed it.
439
+ *
440
+ * @param config Active Raw Media recording ID, message, recipient, and pin behavior.
441
+ * @returns `null` after the message is queued.
442
+ * @throws If the message is empty or exceeds 4,096 characters, the recipient is empty, or no Raw
443
+ * Media recording is active for `windowId`.
444
+ * @see https://docs.recall.ai/docs/desktop-recording-sdk-raw-media
445
+ */
446
+ export declare function sendChatMessage({ windowId, message, to, pin, }: SendChatMessageConfig): Promise<null>;
447
+ /**
448
+ * Legacy no-op retained for backwards compatibility.
449
+ *
450
+ * Recordings upload automatically according to their retention configuration. Observe Desktop SDK
451
+ * Upload webhooks instead of calling this method.
452
+ *
453
+ * @deprecated Recordings upload automatically; this method does nothing.
454
+ * @param config Legacy recording identifier. The value is ignored.
455
+ * @returns `null` after the no-op command is handled.
147
456
  */
148
457
  export declare function uploadRecording({ windowId }: UploadRecordingConfig): Promise<null>;
458
+ /**
459
+ * Prepares an audio-only source for an in-person or whole-desktop recording.
460
+ *
461
+ * Supported on macOS and Windows. This does not start recording: pass the returned ID to
462
+ * {@link startRecording} with a Desktop SDK Upload token. On Windows, audio devices selected with
463
+ * {@link setDesktopAudioDevice} apply to this source. Device selection does not affect detected
464
+ * meeting recordings.
465
+ *
466
+ * @param config Optional internal compatibility settings. Most integrations should omit this.
467
+ * @returns A generated source ID to pass as `windowId` to {@link startRecording}.
468
+ * @throws If the SDK cannot prepare desktop audio capture.
469
+ * @see https://docs.recall.ai/docs/adhoc-meetings-in-person-meetings
470
+ */
149
471
  export declare function prepareDesktopAudioRecording(config?: PrepareDesktopAudioRecordingConfig): Promise<string>;
472
+ /**
473
+ * Lists the audio devices that can be selected for recordings created with
474
+ * {@link prepareDesktopAudioRecording}. This API is only for
475
+ * `prepareDesktopAudioRecording` recordings, does not affect detected meeting recordings, and
476
+ * is only available on Windows.
477
+ *
478
+ * @returns The active Windows audio input and output devices.
479
+ * @throws On macOS, or when Windows audio endpoints cannot be enumerated.
480
+ */
481
+ export declare function listDevices(): Promise<AudioDevice[]>;
482
+ /**
483
+ * Selects an audio device for recordings created with {@link prepareDesktopAudioRecording}.
484
+ * This API is only for `prepareDesktopAudioRecording` recordings and does not affect detected
485
+ * meeting recordings. It is only available on Windows. Pass `null` to restore automatic device
486
+ * selection for the direction.
487
+ *
488
+ * A selection applies to subsequently prepared desktop-audio recordings and, when supported, the
489
+ * currently prepared desktop-audio source.
490
+ *
491
+ * @param id Device ID from {@link listDevices}, or `null` to use automatic selection.
492
+ * @param dir Whether to select the input or output endpoint.
493
+ * @returns `null` after the selection is applied.
494
+ * @throws On macOS, for an invalid device ID, or when the selection cannot be applied.
495
+ */
496
+ export declare function setDesktopAudioDevice(id: string | null, dir: AudioDeviceDirection): Promise<null>;
497
+ /**
498
+ * Requests or checks a Desktop Recording SDK permission.
499
+ *
500
+ * macOS may display a system prompt or open the relevant System Settings pane. Observe
501
+ * `permission-status` for the resulting state; promise resolution does not by itself mean the user
502
+ * granted access. Windows does not require these macOS permissions and reports requests as granted.
503
+ *
504
+ * Request `teams-automation` and `browser-automation` only from an explicit user interaction and
505
+ * before a meeting starts. Automation setup may restart Teams or the supported default browser and
506
+ * must not be requested through `acquirePermissionsOnStartup`.
507
+ *
508
+ * @param permission Permission to request.
509
+ * @returns `null` after the request is accepted.
510
+ * @throws If the SDK is not running or the request cannot be delivered.
511
+ * @see https://docs.recall.ai/docs/macos-permissions
512
+ * @see https://docs.recall.ai/docs/desktop-recording-sdk-raw-media
513
+ */
150
514
  export declare function requestPermission(permission: Permission): Promise<null>;
515
+ /**
516
+ * Forces the native SDK process to exit unexpectedly for restart and error-handling tests.
517
+ *
518
+ * This is an internal test API and should never be called by production integrations.
519
+ *
520
+ * @returns A promise that normally rejects when the forced shutdown closes the native process.
521
+ */
151
522
  export declare function testUnexpectedShutdown(): Promise<null>;
523
+ /**
524
+ * Registers an in-process listener for a Desktop Recording SDK event.
525
+ *
526
+ * Register important listeners before calling {@link init} so they receive initial permission and
527
+ * already-active meeting events. A listener remains registered across automatic native-process
528
+ * restarts until explicitly removed.
529
+ *
530
+ * @param type Event name.
531
+ * @param callback Function invoked synchronously for each matching event payload.
532
+ * @see https://docs.recall.ai/docs/desktop-recording-sdk-event-types
533
+ */
152
534
  export declare function addEventListener<T extends keyof EventTypeToPayloadMap>(type: T, callback: (event: EventTypeToPayloadMap[T]) => void): void;
535
+ /**
536
+ * Removes one event listener previously registered with {@link addEventListener}.
537
+ *
538
+ * The callback must be the same function reference used during registration. If the listener is
539
+ * not registered, this method has no effect.
540
+ *
541
+ * @param type Event name used during registration.
542
+ * @param callback Original callback function reference.
543
+ */
153
544
  export declare function removeEventListener<T extends keyof EventTypeToPayloadMap>(type: T, callback: (event: EventTypeToPayloadMap[T]) => void): void;
545
+ /**
546
+ * Removes every event listener registered through this module.
547
+ *
548
+ * This affects all event types and does not stop or shut down the SDK.
549
+ */
154
550
  export declare function removeAllEventListeners(): void;
551
+ /**
552
+ * Desktop Recording SDK API.
553
+ *
554
+ * The same functions are also available as named exports.
555
+ */
155
556
  declare const RecallAiSdk: {
156
557
  init: typeof init;
157
558
  shutdown: typeof shutdown;
@@ -159,8 +560,11 @@ declare const RecallAiSdk: {
159
560
  stopRecording: typeof stopRecording;
160
561
  pauseRecording: typeof pauseRecording;
161
562
  resumeRecording: typeof resumeRecording;
563
+ sendChatMessage: typeof sendChatMessage;
162
564
  uploadRecording: typeof uploadRecording;
163
565
  prepareDesktopAudioRecording: typeof prepareDesktopAudioRecording;
566
+ listDevices: typeof listDevices;
567
+ setDesktopAudioDevice: typeof setDesktopAudioDevice;
164
568
  requestPermission: typeof requestPermission;
165
569
  addEventListener: typeof addEventListener;
166
570
  removeEventListener: typeof removeEventListener;
package/index.js CHANGED
@@ -41,8 +41,11 @@ exports.startRecording = startRecording;
41
41
  exports.stopRecording = stopRecording;
42
42
  exports.pauseRecording = pauseRecording;
43
43
  exports.resumeRecording = resumeRecording;
44
+ exports.sendChatMessage = sendChatMessage;
44
45
  exports.uploadRecording = uploadRecording;
45
46
  exports.prepareDesktopAudioRecording = prepareDesktopAudioRecording;
47
+ exports.listDevices = listDevices;
48
+ exports.setDesktopAudioDevice = setDesktopAudioDevice;
46
49
  exports.requestPermission = requestPermission;
47
50
  exports.testUnexpectedShutdown = testUnexpectedShutdown;
48
51
  exports.addEventListener = addEventListener;
@@ -593,6 +596,19 @@ async function doInit(options) {
593
596
  await sendCommand("init", { config: JSON.stringify(options) });
594
597
  flushLogBuffer();
595
598
  }
599
+ /**
600
+ * Starts the native Desktop Recording SDK process and begins meeting detection.
601
+ *
602
+ * Call this once during application startup, after registering any listeners that must observe
603
+ * initial permission and meeting-detection events. Supported on macOS and Windows; Linux is not
604
+ * supported. The returned promise resolves after the native process accepts its configuration.
605
+ *
606
+ * @param options SDK initialization and region configuration.
607
+ * @returns `null` after initialization succeeds.
608
+ * @throws If the platform is unsupported, the API URL is invalid, or the native SDK cannot start.
609
+ * @see https://docs.recall.ai/docs/desktop-sdk
610
+ * @see https://docs.recall.ai/docs/dsdk-supported-platforms
611
+ */
596
612
  async function init(options) {
597
613
  if (process.platform !== "darwin" && process.platform !== "win32") {
598
614
  throw new Error(`Platform ${process.platform} is not supported by Desktop SDK`);
@@ -611,6 +627,15 @@ async function init(options) {
611
627
  await doInit(initConfig);
612
628
  return null;
613
629
  }
630
+ /**
631
+ * Gracefully stops active SDK work and terminates the native Desktop Recording SDK process.
632
+ *
633
+ * Supported on macOS and Windows. Call {@link init} again before issuing more SDK commands. This
634
+ * method waits for the process to exit and force-terminates it after five seconds if necessary.
635
+ *
636
+ * @returns `null` after shutdown has been acknowledged.
637
+ * @throws If the SDK is not running or the shutdown command fails.
638
+ */
614
639
  async function shutdown() {
615
640
  const result = await sendCommand("shutdown");
616
641
  if (proc) {
@@ -631,51 +656,240 @@ async function shutdown() {
631
656
  }
632
657
  return result;
633
658
  }
659
+ /**
660
+ * Produces a diagnostic macOS accessibility-tree dump for a running application.
661
+ *
662
+ * This is an internal troubleshooting API, is unsupported on Windows, and should not be used by
663
+ * production integrations.
664
+ *
665
+ * @param procName Name of the process to inspect.
666
+ * @returns The native diagnostic command result.
667
+ */
634
668
  function dumpAXTree(procName) {
635
669
  return sendCommand("dumpAXTree", { procName });
636
670
  }
671
+ /**
672
+ * Produces diagnostic information about applications visible to macOS accessibility APIs.
673
+ *
674
+ * This is an internal troubleshooting API, is unsupported on Windows, and should not be used by
675
+ * production integrations.
676
+ *
677
+ * @returns The native diagnostic command result.
678
+ */
637
679
  function dumpAllApplications() {
638
680
  return sendCommand("dumpAllApplications", {});
639
681
  }
682
+ /**
683
+ * Starts recording a detected meeting or a source returned by
684
+ * {@link prepareDesktopAudioRecording}.
685
+ *
686
+ * Supported on macOS and Windows. `windowId` must come from the SDK and `uploadToken` must come
687
+ * from a newly created Desktop SDK Upload. On supported macOS meeting platforms, the SDK uses Raw
688
+ * Media when it is enabled and available; otherwise it records locally. Resolve capture mode from
689
+ * `recording-started.rawMedia` rather than predicting it from configuration.
690
+ *
691
+ * The returned promise only confirms that the start command was accepted. Listen for
692
+ * `recording-started` to confirm that media capture began and `error` for asynchronous failures.
693
+ * Starting a different recording stops the currently active recording.
694
+ *
695
+ * @param config Meeting/source ID, upload token, and optional Raw Media override.
696
+ * @returns `null` after the start command is accepted.
697
+ * @throws If the source is unknown, already recorded, permissions are insufficient, or startup fails.
698
+ * @see https://docs.recall.ai/docs/desktop-sdk
699
+ * @see https://docs.recall.ai/docs/desktop-recording-sdk-raw-media
700
+ */
640
701
  function startRecording(config) {
641
702
  return sendCommand("startRecording", { config: JSON.stringify(config) });
642
703
  }
704
+ /**
705
+ * Stops the active recording for a meeting or prepared desktop-audio source.
706
+ *
707
+ * Supported for local recordings on macOS and Windows and for Raw Media recordings on macOS. The
708
+ * returned promise confirms command handling, not completion of cloud artifact processing. Listen
709
+ * for `recording-ended` for capture completion and use Desktop SDK Upload webhooks for final upload
710
+ * status.
711
+ *
712
+ * @param config ID originally passed to {@link startRecording}.
713
+ * @returns `null` after the stop command is handled.
714
+ * @throws If the SDK is not running or the command cannot be delivered.
715
+ */
643
716
  function stopRecording({ windowId }) {
644
717
  return sendCommand("stopRecording", { windowId });
645
718
  }
719
+ /**
720
+ * Pauses media capture for an active recording without ending the recording.
721
+ *
722
+ * Supported for local recordings on macOS and Windows and for Raw Media recordings on macOS. Use
723
+ * the same `windowId` that was passed to {@link startRecording}. Call {@link resumeRecording} to
724
+ * continue the recording.
725
+ *
726
+ * @param config Active recording ID.
727
+ * @returns `null` after the pause command is handled.
728
+ * @throws If the SDK is not running or the command cannot be delivered.
729
+ */
646
730
  function pauseRecording({ windowId }) {
647
731
  return sendCommand("pauseRecording", { windowId });
648
732
  }
733
+ /**
734
+ * Resumes media capture for a paused recording.
735
+ *
736
+ * Supported for local recordings on macOS and Windows and for Raw Media recordings on macOS. Use
737
+ * the same `windowId` that was passed to {@link startRecording}.
738
+ *
739
+ * @param config Paused recording ID.
740
+ * @returns `null` after the resume command is handled.
741
+ * @throws If the SDK is not running or the command cannot be delivered.
742
+ */
649
743
  function resumeRecording({ windowId }) {
650
744
  return sendCommand("resumeRecording", { windowId });
651
745
  }
652
746
  /**
653
- * @deprecated Recordings are automatically uploaded based on your rentention configuration. This is now a no-op.
747
+ * Sends a chat message through an active Desktop SDK Raw Media recording.
748
+ *
749
+ * Supported for Microsoft Teams Desktop and supported Chromium-based Google Meet browsers on
750
+ * macOS when `recording-started.rawMedia` is `true`. This method is not available for local
751
+ * recordings or on Windows. The returned promise confirms that the message was accepted and queued
752
+ * for the Raw Media connection; it does not confirm that the meeting platform displayed it.
753
+ *
754
+ * @param config Active Raw Media recording ID, message, recipient, and pin behavior.
755
+ * @returns `null` after the message is queued.
756
+ * @throws If the message is empty or exceeds 4,096 characters, the recipient is empty, or no Raw
757
+ * Media recording is active for `windowId`.
758
+ * @see https://docs.recall.ai/docs/desktop-recording-sdk-raw-media
759
+ */
760
+ function sendChatMessage({ windowId, message, to = "everyone", pin = false, }) {
761
+ return sendCommand("sendChatMessage", { windowId, message, to, pin });
762
+ }
763
+ /**
764
+ * Legacy no-op retained for backwards compatibility.
765
+ *
766
+ * Recordings upload automatically according to their retention configuration. Observe Desktop SDK
767
+ * Upload webhooks instead of calling this method.
768
+ *
769
+ * @deprecated Recordings upload automatically; this method does nothing.
770
+ * @param config Legacy recording identifier. The value is ignored.
771
+ * @returns `null` after the no-op command is handled.
654
772
  */
655
773
  function uploadRecording({ windowId }) {
656
774
  return sendCommand("uploadRecording", { windowId });
657
775
  }
776
+ /**
777
+ * Prepares an audio-only source for an in-person or whole-desktop recording.
778
+ *
779
+ * Supported on macOS and Windows. This does not start recording: pass the returned ID to
780
+ * {@link startRecording} with a Desktop SDK Upload token. On Windows, audio devices selected with
781
+ * {@link setDesktopAudioDevice} apply to this source. Device selection does not affect detected
782
+ * meeting recordings.
783
+ *
784
+ * @param config Optional internal compatibility settings. Most integrations should omit this.
785
+ * @returns A generated source ID to pass as `windowId` to {@link startRecording}.
786
+ * @throws If the SDK cannot prepare desktop audio capture.
787
+ * @see https://docs.recall.ai/docs/adhoc-meetings-in-person-meetings
788
+ */
658
789
  function prepareDesktopAudioRecording(config) {
659
790
  return sendCommand("prepareDesktopAudioRecording", { ...config });
660
791
  }
792
+ /**
793
+ * Lists the audio devices that can be selected for recordings created with
794
+ * {@link prepareDesktopAudioRecording}. This API is only for
795
+ * `prepareDesktopAudioRecording` recordings, does not affect detected meeting recordings, and
796
+ * is only available on Windows.
797
+ *
798
+ * @returns The active Windows audio input and output devices.
799
+ * @throws On macOS, or when Windows audio endpoints cannot be enumerated.
800
+ */
801
+ function listDevices() {
802
+ return sendCommand("listDevices");
803
+ }
804
+ /**
805
+ * Selects an audio device for recordings created with {@link prepareDesktopAudioRecording}.
806
+ * This API is only for `prepareDesktopAudioRecording` recordings and does not affect detected
807
+ * meeting recordings. It is only available on Windows. Pass `null` to restore automatic device
808
+ * selection for the direction.
809
+ *
810
+ * A selection applies to subsequently prepared desktop-audio recordings and, when supported, the
811
+ * currently prepared desktop-audio source.
812
+ *
813
+ * @param id Device ID from {@link listDevices}, or `null` to use automatic selection.
814
+ * @param dir Whether to select the input or output endpoint.
815
+ * @returns `null` after the selection is applied.
816
+ * @throws On macOS, for an invalid device ID, or when the selection cannot be applied.
817
+ */
818
+ function setDesktopAudioDevice(id, dir) {
819
+ return sendCommand("setDesktopAudioDevice", { id, dir });
820
+ }
821
+ /**
822
+ * Requests or checks a Desktop Recording SDK permission.
823
+ *
824
+ * macOS may display a system prompt or open the relevant System Settings pane. Observe
825
+ * `permission-status` for the resulting state; promise resolution does not by itself mean the user
826
+ * granted access. Windows does not require these macOS permissions and reports requests as granted.
827
+ *
828
+ * Request `teams-automation` and `browser-automation` only from an explicit user interaction and
829
+ * before a meeting starts. Automation setup may restart Teams or the supported default browser and
830
+ * must not be requested through `acquirePermissionsOnStartup`.
831
+ *
832
+ * @param permission Permission to request.
833
+ * @returns `null` after the request is accepted.
834
+ * @throws If the SDK is not running or the request cannot be delivered.
835
+ * @see https://docs.recall.ai/docs/macos-permissions
836
+ * @see https://docs.recall.ai/docs/desktop-recording-sdk-raw-media
837
+ */
661
838
  function requestPermission(permission) {
662
839
  return sendCommand("requestPermission", { permission });
663
840
  }
841
+ /**
842
+ * Forces the native SDK process to exit unexpectedly for restart and error-handling tests.
843
+ *
844
+ * This is an internal test API and should never be called by production integrations.
845
+ *
846
+ * @returns A promise that normally rejects when the forced shutdown closes the native process.
847
+ */
664
848
  function testUnexpectedShutdown() {
665
849
  return sendCommand("unexpectedShutdown", {});
666
850
  }
851
+ /**
852
+ * Registers an in-process listener for a Desktop Recording SDK event.
853
+ *
854
+ * Register important listeners before calling {@link init} so they receive initial permission and
855
+ * already-active meeting events. A listener remains registered across automatic native-process
856
+ * restarts until explicitly removed.
857
+ *
858
+ * @param type Event name.
859
+ * @param callback Function invoked synchronously for each matching event payload.
860
+ * @see https://docs.recall.ai/docs/desktop-recording-sdk-event-types
861
+ */
667
862
  function addEventListener(type, callback) {
668
863
  listeners.push({ type, callback });
669
864
  }
865
+ /**
866
+ * Removes one event listener previously registered with {@link addEventListener}.
867
+ *
868
+ * The callback must be the same function reference used during registration. If the listener is
869
+ * not registered, this method has no effect.
870
+ *
871
+ * @param type Event name used during registration.
872
+ * @param callback Original callback function reference.
873
+ */
670
874
  function removeEventListener(type, callback) {
671
875
  const index = listeners.findIndex(l => l.type === type && l.callback === callback);
672
876
  if (index !== -1) {
673
877
  listeners.splice(index, 1);
674
878
  }
675
879
  }
880
+ /**
881
+ * Removes every event listener registered through this module.
882
+ *
883
+ * This affects all event types and does not stop or shut down the SDK.
884
+ */
676
885
  function removeAllEventListeners() {
677
886
  listeners.length = 0;
678
887
  }
888
+ /**
889
+ * Desktop Recording SDK API.
890
+ *
891
+ * The same functions are also available as named exports.
892
+ */
679
893
  const RecallAiSdk = {
680
894
  init,
681
895
  shutdown,
@@ -683,8 +897,11 @@ const RecallAiSdk = {
683
897
  stopRecording,
684
898
  pauseRecording,
685
899
  resumeRecording,
900
+ sendChatMessage,
686
901
  uploadRecording,
687
902
  prepareDesktopAudioRecording,
903
+ listDevices,
904
+ setDesktopAudioDevice,
688
905
  requestPermission,
689
906
  addEventListener,
690
907
  removeEventListener,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@recallai/desktop-sdk",
3
- "version": "2.0.32",
3
+ "version": "2.0.34",
4
4
  "description": "Recall Desktop SDK",
5
5
  "main": "./index.js",
6
6
  "types": "./index.d.ts",
@@ -20,5 +20,5 @@
20
20
  "@types/node": "^24.2.0",
21
21
  "typescript": "^5.3.3"
22
22
  },
23
- "commit_sha": "1cab51febc7e772224284187e2b25fdbb6b6bbda"
23
+ "commit_sha": "4cbd5366bfce03afa9434e4828689ec3ddd4afd9"
24
24
  }