@estuary-ai/sdk 0.2.0 → 0.3.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/README.md +1 -1
- package/dist/index.d.mts +16 -1
- package/dist/index.d.ts +16 -1
- package/dist/index.js +21 -1
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +21 -1
- 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
|
@@ -238,7 +238,7 @@ interface EstuaryConfig {
|
|
|
238
238
|
apiKey: string; // API key (est_...)
|
|
239
239
|
characterId: string; // Character ID
|
|
240
240
|
playerId: string; // End user ID
|
|
241
|
-
audioSampleRate?: number; // Default:
|
|
241
|
+
audioSampleRate?: number; // Default: 24000
|
|
242
242
|
autoReconnect?: boolean; // Default: true
|
|
243
243
|
maxReconnectAttempts?: number; // Default: 5
|
|
244
244
|
reconnectDelayMs?: number; // Default: 2000
|
package/dist/index.d.mts
CHANGED
|
@@ -122,6 +122,15 @@ interface CharacterInfo {
|
|
|
122
122
|
modelStatus: string | null;
|
|
123
123
|
sourceImageUrl: string | null;
|
|
124
124
|
}
|
|
125
|
+
interface ShareOpenResponse {
|
|
126
|
+
sessionToken: string;
|
|
127
|
+
characterId: string;
|
|
128
|
+
playerId: string;
|
|
129
|
+
serverUrl: string;
|
|
130
|
+
character: CharacterInfo & {
|
|
131
|
+
personality?: string | null;
|
|
132
|
+
};
|
|
133
|
+
}
|
|
125
134
|
interface CharacterAction {
|
|
126
135
|
/** Action name (e.g., "follow_user", "sit", "look_at") */
|
|
127
136
|
name: string;
|
|
@@ -339,6 +348,12 @@ declare class EstuaryClient extends TypedEventEmitter<EstuaryEventMap> {
|
|
|
339
348
|
get memory(): MemoryClient;
|
|
340
349
|
/** Fetch character details including 3D model and avatar URLs. */
|
|
341
350
|
getCharacter(characterId?: string): Promise<CharacterInfo>;
|
|
351
|
+
/**
|
|
352
|
+
* Open a permanent share link. Calls the backend's /open endpoint to mint a
|
|
353
|
+
* fresh session token and resolve character metadata (including modelUrl).
|
|
354
|
+
* Use the returned fields to construct an EstuaryClient with sessionToken auth.
|
|
355
|
+
*/
|
|
356
|
+
static openShare(serverUrl: string, shareId: string): Promise<ShareOpenResponse>;
|
|
342
357
|
/** Current session info (null if not connected) */
|
|
343
358
|
get session(): SessionInfo | null;
|
|
344
359
|
/** Current connection state */
|
|
@@ -438,4 +453,4 @@ declare class CharacterClient {
|
|
|
438
453
|
dispose(): void;
|
|
439
454
|
}
|
|
440
455
|
|
|
441
|
-
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 SttResponse, type VoiceManager, type VoiceTransport, parseActions };
|
|
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 };
|
package/dist/index.d.ts
CHANGED
|
@@ -122,6 +122,15 @@ interface CharacterInfo {
|
|
|
122
122
|
modelStatus: string | null;
|
|
123
123
|
sourceImageUrl: string | null;
|
|
124
124
|
}
|
|
125
|
+
interface ShareOpenResponse {
|
|
126
|
+
sessionToken: string;
|
|
127
|
+
characterId: string;
|
|
128
|
+
playerId: string;
|
|
129
|
+
serverUrl: string;
|
|
130
|
+
character: CharacterInfo & {
|
|
131
|
+
personality?: string | null;
|
|
132
|
+
};
|
|
133
|
+
}
|
|
125
134
|
interface CharacterAction {
|
|
126
135
|
/** Action name (e.g., "follow_user", "sit", "look_at") */
|
|
127
136
|
name: string;
|
|
@@ -339,6 +348,12 @@ declare class EstuaryClient extends TypedEventEmitter<EstuaryEventMap> {
|
|
|
339
348
|
get memory(): MemoryClient;
|
|
340
349
|
/** Fetch character details including 3D model and avatar URLs. */
|
|
341
350
|
getCharacter(characterId?: string): Promise<CharacterInfo>;
|
|
351
|
+
/**
|
|
352
|
+
* Open a permanent share link. Calls the backend's /open endpoint to mint a
|
|
353
|
+
* fresh session token and resolve character metadata (including modelUrl).
|
|
354
|
+
* Use the returned fields to construct an EstuaryClient with sessionToken auth.
|
|
355
|
+
*/
|
|
356
|
+
static openShare(serverUrl: string, shareId: string): Promise<ShareOpenResponse>;
|
|
342
357
|
/** Current session info (null if not connected) */
|
|
343
358
|
get session(): SessionInfo | null;
|
|
344
359
|
/** Current connection state */
|
|
@@ -438,4 +453,4 @@ declare class CharacterClient {
|
|
|
438
453
|
dispose(): void;
|
|
439
454
|
}
|
|
440
455
|
|
|
441
|
-
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 SttResponse, type VoiceManager, type VoiceTransport, parseActions };
|
|
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 };
|
package/dist/index.js
CHANGED
|
@@ -9030,7 +9030,7 @@ var SocketManager = class extends TypedEventEmitter {
|
|
|
9030
9030
|
const authPayload = {
|
|
9031
9031
|
character_id: this.config.characterId,
|
|
9032
9032
|
player_id: this.config.playerId,
|
|
9033
|
-
audio_sample_rate: this.config.audioSampleRate ??
|
|
9033
|
+
audio_sample_rate: this.config.audioSampleRate ?? 24e3,
|
|
9034
9034
|
realtime_memory: this.config.realtimeMemory ?? false
|
|
9035
9035
|
};
|
|
9036
9036
|
if (this.config.sessionToken) {
|
|
@@ -9669,6 +9669,26 @@ var EstuaryClient = class extends TypedEventEmitter {
|
|
|
9669
9669
|
}
|
|
9670
9670
|
return this._character.getCharacter(characterId ?? this.config.characterId);
|
|
9671
9671
|
}
|
|
9672
|
+
/**
|
|
9673
|
+
* Open a permanent share link. Calls the backend's /open endpoint to mint a
|
|
9674
|
+
* fresh session token and resolve character metadata (including modelUrl).
|
|
9675
|
+
* Use the returned fields to construct an EstuaryClient with sessionToken auth.
|
|
9676
|
+
*/
|
|
9677
|
+
static async openShare(serverUrl, shareId) {
|
|
9678
|
+
const url2 = `${serverUrl.replace(/\/+$/, "")}/api/v1/share/${shareId}/open`;
|
|
9679
|
+
const res = await fetch(url2, {
|
|
9680
|
+
method: "POST",
|
|
9681
|
+
headers: { "Content-Type": "application/json" }
|
|
9682
|
+
});
|
|
9683
|
+
if (!res.ok) {
|
|
9684
|
+
const detail = await res.text().catch(() => "");
|
|
9685
|
+
throw new exports.EstuaryError(
|
|
9686
|
+
"REST_ERROR" /* REST_ERROR */,
|
|
9687
|
+
`Share open failed (${res.status}): ${detail}`
|
|
9688
|
+
);
|
|
9689
|
+
}
|
|
9690
|
+
return res.json();
|
|
9691
|
+
}
|
|
9672
9692
|
/** Current session info (null if not connected) */
|
|
9673
9693
|
get session() {
|
|
9674
9694
|
return this._sessionInfo;
|