@estuary-ai/sdk 0.6.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/dist/index.d.mts +19 -1
- package/dist/index.d.ts +19 -1
- package/dist/index.js +14 -0
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +14 -0
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
package/dist/index.d.mts
CHANGED
|
@@ -102,6 +102,23 @@ interface SessionTimeoutData {
|
|
|
102
102
|
idleSeconds: number;
|
|
103
103
|
timeoutSeconds: number;
|
|
104
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
|
+
}
|
|
105
122
|
interface LiveKitTokenResponse {
|
|
106
123
|
token: string;
|
|
107
124
|
url: string;
|
|
@@ -220,6 +237,7 @@ type EstuaryEventMap = {
|
|
|
220
237
|
authError: (error: string) => void;
|
|
221
238
|
quotaExceeded: (data: QuotaExceededData) => void;
|
|
222
239
|
sessionTimeout: (data: SessionTimeoutData) => void;
|
|
240
|
+
voiceTimeout: (data: VoiceTimeoutData) => void;
|
|
223
241
|
cameraCaptureRequest: (request: CameraCaptureRequest) => void;
|
|
224
242
|
characterAction: (action: CharacterAction) => void;
|
|
225
243
|
voiceStarted: () => void;
|
|
@@ -544,4 +562,4 @@ declare class CharacterClient {
|
|
|
544
562
|
dispose(): void;
|
|
545
563
|
}
|
|
546
564
|
|
|
547
|
-
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
|
@@ -102,6 +102,23 @@ interface SessionTimeoutData {
|
|
|
102
102
|
idleSeconds: number;
|
|
103
103
|
timeoutSeconds: number;
|
|
104
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
|
+
}
|
|
105
122
|
interface LiveKitTokenResponse {
|
|
106
123
|
token: string;
|
|
107
124
|
url: string;
|
|
@@ -220,6 +237,7 @@ type EstuaryEventMap = {
|
|
|
220
237
|
authError: (error: string) => void;
|
|
221
238
|
quotaExceeded: (data: QuotaExceededData) => void;
|
|
222
239
|
sessionTimeout: (data: SessionTimeoutData) => void;
|
|
240
|
+
voiceTimeout: (data: VoiceTimeoutData) => void;
|
|
223
241
|
cameraCaptureRequest: (request: CameraCaptureRequest) => void;
|
|
224
242
|
characterAction: (action: CharacterAction) => void;
|
|
225
243
|
voiceStarted: () => void;
|
|
@@ -544,4 +562,4 @@ declare class CharacterClient {
|
|
|
544
562
|
dispose(): void;
|
|
545
563
|
}
|
|
546
564
|
|
|
547
|
-
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.js
CHANGED
|
@@ -8998,6 +8998,13 @@ function toSessionTimeoutData(wire) {
|
|
|
8998
8998
|
timeoutSeconds: wire.timeout_seconds
|
|
8999
8999
|
};
|
|
9000
9000
|
}
|
|
9001
|
+
function toVoiceTimeoutData(wire) {
|
|
9002
|
+
return {
|
|
9003
|
+
reason: wire.reason,
|
|
9004
|
+
idleSeconds: wire.idle_seconds,
|
|
9005
|
+
timeoutSeconds: wire.timeout_seconds
|
|
9006
|
+
};
|
|
9007
|
+
}
|
|
9001
9008
|
function toLiveKitTokenResponse(wire) {
|
|
9002
9009
|
return {
|
|
9003
9010
|
token: wire.token,
|
|
@@ -9178,6 +9185,9 @@ var SocketManager = class extends TypedEventEmitter {
|
|
|
9178
9185
|
this.serverEndedSession = true;
|
|
9179
9186
|
this.emit("sessionTimeout", toSessionTimeoutData(data));
|
|
9180
9187
|
});
|
|
9188
|
+
this.socket.on("voice_timeout", (data) => {
|
|
9189
|
+
this.emit("voiceTimeout", toVoiceTimeoutData(data));
|
|
9190
|
+
});
|
|
9181
9191
|
this.socket.on("camera_capture", (data) => {
|
|
9182
9192
|
this.emit("cameraCaptureRequest", toCameraCaptureRequest(data));
|
|
9183
9193
|
});
|
|
@@ -10278,6 +10288,10 @@ var EstuaryClient = class extends TypedEventEmitter {
|
|
|
10278
10288
|
void this.releaseVoice();
|
|
10279
10289
|
this.emit("sessionTimeout", data);
|
|
10280
10290
|
});
|
|
10291
|
+
this.socketManager.on("voiceTimeout", (data) => {
|
|
10292
|
+
void this.releaseVoice();
|
|
10293
|
+
this.emit("voiceTimeout", data);
|
|
10294
|
+
});
|
|
10281
10295
|
this.socketManager.on("cameraCaptureRequest", (request) => this.emit("cameraCaptureRequest", request));
|
|
10282
10296
|
this.socketManager.on("livekitConnected", (room) => this.emit("livekitConnected", room));
|
|
10283
10297
|
this.socketManager.on("livekitDisconnected", () => this.emit("livekitDisconnected"));
|