@estuary-ai/sdk 0.5.0 → 0.7.0
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/LICENSE +21 -21
- package/dist/index.d.mts +38 -1
- package/dist/index.d.ts +38 -1
- package/dist/index.js +246 -151
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +11196 -7848
- package/dist/index.mjs.map +1 -1
- package/package.json +71 -71
package/LICENSE
CHANGED
|
@@ -1,21 +1,21 @@
|
|
|
1
|
-
MIT License
|
|
2
|
-
|
|
3
|
-
Copyright (c) 2026 estuary.ai
|
|
4
|
-
|
|
5
|
-
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
-
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
-
in the Software without restriction, including without limitation the rights
|
|
8
|
-
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
-
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
-
furnished to do so, subject to the following conditions:
|
|
11
|
-
|
|
12
|
-
The above copyright notice and this permission notice shall be included in all
|
|
13
|
-
copies or substantial portions of the Software.
|
|
14
|
-
|
|
15
|
-
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
-
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
-
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
-
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
-
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
-
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
-
SOFTWARE.
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2026 estuary.ai
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
package/dist/index.d.mts
CHANGED
|
@@ -91,6 +91,34 @@ interface QuotaExceededData {
|
|
|
91
91
|
remaining: number;
|
|
92
92
|
tier: string;
|
|
93
93
|
}
|
|
94
|
+
/**
|
|
95
|
+
* Emitted when the server ends the session due to inactivity (no conversation
|
|
96
|
+
* activity for the server's idle timeout). The server disconnects the socket
|
|
97
|
+
* right after; the SDK does not auto-reconnect from this — call connect()
|
|
98
|
+
* again on explicit user intent to resume.
|
|
99
|
+
*/
|
|
100
|
+
interface SessionTimeoutData {
|
|
101
|
+
reason: string;
|
|
102
|
+
idleSeconds: number;
|
|
103
|
+
timeoutSeconds: number;
|
|
104
|
+
}
|
|
105
|
+
/**
|
|
106
|
+
* Emitted when the server releases the CALL's voice resources after voice
|
|
107
|
+
* inactivity (no user speech for the server's voice-idle timeout) while the
|
|
108
|
+
* session itself stays connected — e.g. the user kept texting with a silent
|
|
109
|
+
* call open. The LiveKit room is already deleted server-side; the SDK has
|
|
110
|
+
* released the microphone and disposed the voice transport (voiceStopped is
|
|
111
|
+
* also emitted). The socket remains connected and text chat continues.
|
|
112
|
+
*
|
|
113
|
+
* Recommended UX: present this as an auto-muted microphone rather than a
|
|
114
|
+
* dropped call — keep the call UI open, show the mic as muted, and call
|
|
115
|
+
* startVoice() again when the user unmutes.
|
|
116
|
+
*/
|
|
117
|
+
interface VoiceTimeoutData {
|
|
118
|
+
reason: string;
|
|
119
|
+
idleSeconds: number;
|
|
120
|
+
timeoutSeconds: number;
|
|
121
|
+
}
|
|
94
122
|
interface LiveKitTokenResponse {
|
|
95
123
|
token: string;
|
|
96
124
|
url: string;
|
|
@@ -208,6 +236,8 @@ type EstuaryEventMap = {
|
|
|
208
236
|
error: (error: Error) => void;
|
|
209
237
|
authError: (error: string) => void;
|
|
210
238
|
quotaExceeded: (data: QuotaExceededData) => void;
|
|
239
|
+
sessionTimeout: (data: SessionTimeoutData) => void;
|
|
240
|
+
voiceTimeout: (data: VoiceTimeoutData) => void;
|
|
211
241
|
cameraCaptureRequest: (request: CameraCaptureRequest) => void;
|
|
212
242
|
characterAction: (action: CharacterAction) => void;
|
|
213
243
|
voiceStarted: () => void;
|
|
@@ -454,6 +484,13 @@ declare class EstuaryClient extends TypedEventEmitter<EstuaryEventMap> {
|
|
|
454
484
|
startVoice(): Promise<void>;
|
|
455
485
|
/** Stop voice input */
|
|
456
486
|
stopVoice(): Promise<void>;
|
|
487
|
+
/**
|
|
488
|
+
* Tear down voice state without requiring an active manager — used when the
|
|
489
|
+
* server ends the session out from under us. Unlike stopVoice(), this also
|
|
490
|
+
* disposes a manager whose transport already died (LiveKit room deleted →
|
|
491
|
+
* isActive is false but the local mic track was never released).
|
|
492
|
+
*/
|
|
493
|
+
private releaseVoice;
|
|
457
494
|
/** Toggle microphone mute */
|
|
458
495
|
toggleMute(): void;
|
|
459
496
|
/** Whether the microphone is muted */
|
|
@@ -525,4 +562,4 @@ declare class CharacterClient {
|
|
|
525
562
|
dispose(): void;
|
|
526
563
|
}
|
|
527
564
|
|
|
528
|
-
export { type BotResponse, type BotVoice, type CameraCaptureRequest, type CharacterAction, CharacterClient, type CharacterInfo, ConnectionState, type CoreFact, type CoreFactsResponse, ErrorCode, EstuaryClient, type EstuaryConfig, EstuaryError, type EstuaryEventMap, type InterruptData, type LiveKitTokenResponse, MemoryClient, type MemoryData, type MemoryGraphEdge, type MemoryGraphNode, type MemoryGraphOptions, type MemoryGraphResponse, type MemoryListOptions, type MemoryListResponse, type MemorySearchOptions, type MemorySearchResponse, type MemoryStatsResponse, type MemoryTimelineOptions, type MemoryTimelineResponse, type MemoryUpdatedEvent, type ParsedAction, type QuotaExceededData, type ScriptController, type ScriptEndReason, type ScriptLine, type ScriptLineStartedInfo, type ScriptOptions, type ScriptState, type SessionCapabilities, type SessionInfo, type ShareOpenResponse, type SttResponse, type VoiceManager, type VoiceTransport, parseActions };
|
|
565
|
+
export { type BotResponse, type BotVoice, type CameraCaptureRequest, type CharacterAction, CharacterClient, type CharacterInfo, ConnectionState, type CoreFact, type CoreFactsResponse, ErrorCode, EstuaryClient, type EstuaryConfig, EstuaryError, type EstuaryEventMap, type InterruptData, type LiveKitTokenResponse, MemoryClient, type MemoryData, type MemoryGraphEdge, type MemoryGraphNode, type MemoryGraphOptions, type MemoryGraphResponse, type MemoryListOptions, type MemoryListResponse, type MemorySearchOptions, type MemorySearchResponse, type MemoryStatsResponse, type MemoryTimelineOptions, type MemoryTimelineResponse, type MemoryUpdatedEvent, type ParsedAction, type QuotaExceededData, type ScriptController, type ScriptEndReason, type ScriptLine, type ScriptLineStartedInfo, type ScriptOptions, type ScriptState, type SessionCapabilities, type SessionInfo, type SessionTimeoutData, type ShareOpenResponse, type SttResponse, type VoiceManager, type VoiceTimeoutData, type VoiceTransport, parseActions };
|
package/dist/index.d.ts
CHANGED
|
@@ -91,6 +91,34 @@ interface QuotaExceededData {
|
|
|
91
91
|
remaining: number;
|
|
92
92
|
tier: string;
|
|
93
93
|
}
|
|
94
|
+
/**
|
|
95
|
+
* Emitted when the server ends the session due to inactivity (no conversation
|
|
96
|
+
* activity for the server's idle timeout). The server disconnects the socket
|
|
97
|
+
* right after; the SDK does not auto-reconnect from this — call connect()
|
|
98
|
+
* again on explicit user intent to resume.
|
|
99
|
+
*/
|
|
100
|
+
interface SessionTimeoutData {
|
|
101
|
+
reason: string;
|
|
102
|
+
idleSeconds: number;
|
|
103
|
+
timeoutSeconds: number;
|
|
104
|
+
}
|
|
105
|
+
/**
|
|
106
|
+
* Emitted when the server releases the CALL's voice resources after voice
|
|
107
|
+
* inactivity (no user speech for the server's voice-idle timeout) while the
|
|
108
|
+
* session itself stays connected — e.g. the user kept texting with a silent
|
|
109
|
+
* call open. The LiveKit room is already deleted server-side; the SDK has
|
|
110
|
+
* released the microphone and disposed the voice transport (voiceStopped is
|
|
111
|
+
* also emitted). The socket remains connected and text chat continues.
|
|
112
|
+
*
|
|
113
|
+
* Recommended UX: present this as an auto-muted microphone rather than a
|
|
114
|
+
* dropped call — keep the call UI open, show the mic as muted, and call
|
|
115
|
+
* startVoice() again when the user unmutes.
|
|
116
|
+
*/
|
|
117
|
+
interface VoiceTimeoutData {
|
|
118
|
+
reason: string;
|
|
119
|
+
idleSeconds: number;
|
|
120
|
+
timeoutSeconds: number;
|
|
121
|
+
}
|
|
94
122
|
interface LiveKitTokenResponse {
|
|
95
123
|
token: string;
|
|
96
124
|
url: string;
|
|
@@ -208,6 +236,8 @@ type EstuaryEventMap = {
|
|
|
208
236
|
error: (error: Error) => void;
|
|
209
237
|
authError: (error: string) => void;
|
|
210
238
|
quotaExceeded: (data: QuotaExceededData) => void;
|
|
239
|
+
sessionTimeout: (data: SessionTimeoutData) => void;
|
|
240
|
+
voiceTimeout: (data: VoiceTimeoutData) => void;
|
|
211
241
|
cameraCaptureRequest: (request: CameraCaptureRequest) => void;
|
|
212
242
|
characterAction: (action: CharacterAction) => void;
|
|
213
243
|
voiceStarted: () => void;
|
|
@@ -454,6 +484,13 @@ declare class EstuaryClient extends TypedEventEmitter<EstuaryEventMap> {
|
|
|
454
484
|
startVoice(): Promise<void>;
|
|
455
485
|
/** Stop voice input */
|
|
456
486
|
stopVoice(): Promise<void>;
|
|
487
|
+
/**
|
|
488
|
+
* Tear down voice state without requiring an active manager — used when the
|
|
489
|
+
* server ends the session out from under us. Unlike stopVoice(), this also
|
|
490
|
+
* disposes a manager whose transport already died (LiveKit room deleted →
|
|
491
|
+
* isActive is false but the local mic track was never released).
|
|
492
|
+
*/
|
|
493
|
+
private releaseVoice;
|
|
457
494
|
/** Toggle microphone mute */
|
|
458
495
|
toggleMute(): void;
|
|
459
496
|
/** Whether the microphone is muted */
|
|
@@ -525,4 +562,4 @@ declare class CharacterClient {
|
|
|
525
562
|
dispose(): void;
|
|
526
563
|
}
|
|
527
564
|
|
|
528
|
-
export { type BotResponse, type BotVoice, type CameraCaptureRequest, type CharacterAction, CharacterClient, type CharacterInfo, ConnectionState, type CoreFact, type CoreFactsResponse, ErrorCode, EstuaryClient, type EstuaryConfig, EstuaryError, type EstuaryEventMap, type InterruptData, type LiveKitTokenResponse, MemoryClient, type MemoryData, type MemoryGraphEdge, type MemoryGraphNode, type MemoryGraphOptions, type MemoryGraphResponse, type MemoryListOptions, type MemoryListResponse, type MemorySearchOptions, type MemorySearchResponse, type MemoryStatsResponse, type MemoryTimelineOptions, type MemoryTimelineResponse, type MemoryUpdatedEvent, type ParsedAction, type QuotaExceededData, type ScriptController, type ScriptEndReason, type ScriptLine, type ScriptLineStartedInfo, type ScriptOptions, type ScriptState, type SessionCapabilities, type SessionInfo, type ShareOpenResponse, type SttResponse, type VoiceManager, type VoiceTransport, parseActions };
|
|
565
|
+
export { type BotResponse, type BotVoice, type CameraCaptureRequest, type CharacterAction, CharacterClient, type CharacterInfo, ConnectionState, type CoreFact, type CoreFactsResponse, ErrorCode, EstuaryClient, type EstuaryConfig, EstuaryError, type EstuaryEventMap, type InterruptData, type LiveKitTokenResponse, MemoryClient, type MemoryData, type MemoryGraphEdge, type MemoryGraphNode, type MemoryGraphOptions, type MemoryGraphResponse, type MemoryListOptions, type MemoryListResponse, type MemorySearchOptions, type MemorySearchResponse, type MemoryStatsResponse, type MemoryTimelineOptions, type MemoryTimelineResponse, type MemoryUpdatedEvent, type ParsedAction, type QuotaExceededData, type ScriptController, type ScriptEndReason, type ScriptLine, type ScriptLineStartedInfo, type ScriptOptions, type ScriptState, type SessionCapabilities, type SessionInfo, type SessionTimeoutData, type ShareOpenResponse, type SttResponse, type VoiceManager, type VoiceTimeoutData, type VoiceTransport, parseActions };
|