@estuary-ai/sdk 0.3.0 → 0.4.1
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/README.md +25 -0
- package/dist/index.d.mts +18 -1
- package/dist/index.d.ts +18 -1
- package/dist/index.js +3 -0
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +3 -0
- package/dist/index.mjs.map +1 -1
- package/package.json +70 -70
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/README.md
CHANGED
|
@@ -247,7 +247,32 @@ interface EstuaryConfig {
|
|
|
247
247
|
realtimeMemory?: boolean; // Enable real-time memory extraction events. Default: false
|
|
248
248
|
suppressMicDuringPlayback?: boolean; // Mute mic while bot audio plays (software AEC). Default: false
|
|
249
249
|
autoInterruptOnSpeech?: boolean; // Interrupt bot audio when user speaks. Default: true
|
|
250
|
+
capabilities?: SessionCapabilities; // Per-session device capability declaration
|
|
250
251
|
}
|
|
252
|
+
|
|
253
|
+
interface SessionCapabilities {
|
|
254
|
+
version?: string; // Schema version, defaults to "1"
|
|
255
|
+
camera?: boolean; // Device has a usable camera
|
|
256
|
+
microphone?: boolean; // Device has a usable microphone
|
|
257
|
+
speaker?: boolean; // Device has a usable speaker
|
|
258
|
+
}
|
|
259
|
+
```
|
|
260
|
+
|
|
261
|
+
### Capability Declaration
|
|
262
|
+
|
|
263
|
+
Tell the server what the device can physically do. The server hides tools that require a missing capability — e.g. `request_camera_image` is suppressed when `camera: false`, so the LLM won't ask to see the camera on text-only clients.
|
|
264
|
+
|
|
265
|
+
When `capabilities` is omitted, the server defaults every field to `true` for backward compatibility — existing clients keep working unchanged.
|
|
266
|
+
|
|
267
|
+
```typescript
|
|
268
|
+
const client = new EstuaryClient({
|
|
269
|
+
serverUrl, apiKey, characterId, playerId,
|
|
270
|
+
capabilities: {
|
|
271
|
+
camera: false, // No camera on this client (e.g. share link, text-only widget)
|
|
272
|
+
microphone: true,
|
|
273
|
+
speaker: true,
|
|
274
|
+
},
|
|
275
|
+
});
|
|
251
276
|
```
|
|
252
277
|
|
|
253
278
|
## Runtime Properties
|
package/dist/index.d.mts
CHANGED
|
@@ -27,8 +27,25 @@ interface EstuaryConfig {
|
|
|
27
27
|
suppressMicDuringPlayback?: boolean;
|
|
28
28
|
/** Proactively interrupt bot audio when user starts speaking (default: true) */
|
|
29
29
|
autoInterruptOnSpeech?: boolean;
|
|
30
|
+
/** Per-session client capability declaration. Tells the server what the device
|
|
31
|
+
* can physically do (camera, microphone, speaker). When omitted, the server
|
|
32
|
+
* defaults all fields to true for backward compatibility. Tools requiring a
|
|
33
|
+
* capability are hidden from the LLM when that capability is false (e.g.
|
|
34
|
+
* `request_camera_image` is suppressed when `camera: false`). */
|
|
35
|
+
capabilities?: SessionCapabilities;
|
|
30
36
|
}
|
|
31
37
|
type VoiceTransport = 'websocket' | 'livekit' | 'auto';
|
|
38
|
+
/** Per-session client capability declaration. Pass on `EstuaryConfig.capabilities`. */
|
|
39
|
+
interface SessionCapabilities {
|
|
40
|
+
/** Schema version. Defaults to "1" when omitted. */
|
|
41
|
+
version?: string;
|
|
42
|
+
/** Device has a camera the SDK can call `sendCameraImage()` against. */
|
|
43
|
+
camera?: boolean;
|
|
44
|
+
/** Device has a microphone usable for voice capture. */
|
|
45
|
+
microphone?: boolean;
|
|
46
|
+
/** Device has a speaker usable for TTS playback. */
|
|
47
|
+
speaker?: boolean;
|
|
48
|
+
}
|
|
32
49
|
declare enum ConnectionState {
|
|
33
50
|
Disconnected = "disconnected",
|
|
34
51
|
Connecting = "connecting",
|
|
@@ -453,4 +470,4 @@ declare class CharacterClient {
|
|
|
453
470
|
dispose(): void;
|
|
454
471
|
}
|
|
455
472
|
|
|
456
|
-
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 SessionInfo, type ShareOpenResponse, type SttResponse, type VoiceManager, type VoiceTransport, parseActions };
|
|
473
|
+
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 SessionCapabilities, type SessionInfo, type ShareOpenResponse, type SttResponse, type VoiceManager, type VoiceTransport, parseActions };
|
package/dist/index.d.ts
CHANGED
|
@@ -27,8 +27,25 @@ interface EstuaryConfig {
|
|
|
27
27
|
suppressMicDuringPlayback?: boolean;
|
|
28
28
|
/** Proactively interrupt bot audio when user starts speaking (default: true) */
|
|
29
29
|
autoInterruptOnSpeech?: boolean;
|
|
30
|
+
/** Per-session client capability declaration. Tells the server what the device
|
|
31
|
+
* can physically do (camera, microphone, speaker). When omitted, the server
|
|
32
|
+
* defaults all fields to true for backward compatibility. Tools requiring a
|
|
33
|
+
* capability are hidden from the LLM when that capability is false (e.g.
|
|
34
|
+
* `request_camera_image` is suppressed when `camera: false`). */
|
|
35
|
+
capabilities?: SessionCapabilities;
|
|
30
36
|
}
|
|
31
37
|
type VoiceTransport = 'websocket' | 'livekit' | 'auto';
|
|
38
|
+
/** Per-session client capability declaration. Pass on `EstuaryConfig.capabilities`. */
|
|
39
|
+
interface SessionCapabilities {
|
|
40
|
+
/** Schema version. Defaults to "1" when omitted. */
|
|
41
|
+
version?: string;
|
|
42
|
+
/** Device has a camera the SDK can call `sendCameraImage()` against. */
|
|
43
|
+
camera?: boolean;
|
|
44
|
+
/** Device has a microphone usable for voice capture. */
|
|
45
|
+
microphone?: boolean;
|
|
46
|
+
/** Device has a speaker usable for TTS playback. */
|
|
47
|
+
speaker?: boolean;
|
|
48
|
+
}
|
|
32
49
|
declare enum ConnectionState {
|
|
33
50
|
Disconnected = "disconnected",
|
|
34
51
|
Connecting = "connecting",
|
|
@@ -453,4 +470,4 @@ declare class CharacterClient {
|
|
|
453
470
|
dispose(): void;
|
|
454
471
|
}
|
|
455
472
|
|
|
456
|
-
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 SessionInfo, type ShareOpenResponse, type SttResponse, type VoiceManager, type VoiceTransport, parseActions };
|
|
473
|
+
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 SessionCapabilities, type SessionInfo, type ShareOpenResponse, type SttResponse, type VoiceManager, type VoiceTransport, parseActions };
|
package/dist/index.js
CHANGED
|
@@ -9038,6 +9038,9 @@ var SocketManager = class extends TypedEventEmitter {
|
|
|
9038
9038
|
} else if (this.config.apiKey) {
|
|
9039
9039
|
authPayload.api_key = this.config.apiKey;
|
|
9040
9040
|
}
|
|
9041
|
+
if (this.config.capabilities) {
|
|
9042
|
+
authPayload.capabilities = { version: "1", ...this.config.capabilities };
|
|
9043
|
+
}
|
|
9041
9044
|
this.socket.emit("authenticate", authPayload);
|
|
9042
9045
|
};
|
|
9043
9046
|
const onSessionInfo = (data) => {
|