@estuary-ai/sdk 0.1.22 → 0.1.23

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 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
@@ -2,7 +2,7 @@
2
2
 
3
3
  [![npm](https://img.shields.io/npm/v/@estuary-ai/sdk)](https://www.npmjs.com/package/@estuary-ai/sdk)
4
4
 
5
- TypeScript SDK for the [Estuary](https://www.estuary-ai.com) real-time AI conversation platform. Build applications with persistent AI characters that remember, hear, and see.
5
+ Web SDK for the [Estuary](https://www.estuary-ai.com) real-time AI conversation platform. Build applications with persistent AI characters that remember, hear, and see.
6
6
 
7
7
  ## Installation
8
8
 
@@ -242,7 +242,7 @@ interface EstuaryConfig {
242
242
 
243
243
  ## Exports
244
244
 
245
- Key exports for TypeScript users:
245
+ Key exports:
246
246
 
247
247
  ```typescript
248
248
  // Client
@@ -26,5 +26,5 @@ var EstuaryError = class extends Error {
26
26
  };
27
27
 
28
28
  export { ErrorCode, EstuaryError };
29
- //# sourceMappingURL=chunk-6M5LSBMK.mjs.map
30
- //# sourceMappingURL=chunk-6M5LSBMK.mjs.map
29
+ //# sourceMappingURL=chunk-W5QYPYX3.mjs.map
30
+ //# sourceMappingURL=chunk-W5QYPYX3.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../src/errors.ts"],"names":["ErrorCode"],"mappings":";AAAO,IAAK,SAAA,qBAAAA,UAAAA,KAAL;AACL,EAAAA,WAAA,mBAAA,CAAA,GAAoB,mBAAA;AACpB,EAAAA,WAAA,aAAA,CAAA,GAAc,aAAA;AACd,EAAAA,WAAA,oBAAA,CAAA,GAAqB,oBAAA;AACrB,EAAAA,WAAA,gBAAA,CAAA,GAAiB,gBAAA;AACjB,EAAAA,WAAA,qBAAA,CAAA,GAAsB,qBAAA;AACtB,EAAAA,WAAA,sBAAA,CAAA,GAAuB,sBAAA;AACvB,EAAAA,WAAA,kBAAA,CAAA,GAAmB,kBAAA;AACnB,EAAAA,WAAA,qBAAA,CAAA,GAAsB,qBAAA;AACtB,EAAAA,WAAA,mBAAA,CAAA,GAAoB,mBAAA;AACpB,EAAAA,WAAA,eAAA,CAAA,GAAgB,eAAA;AAChB,EAAAA,WAAA,YAAA,CAAA,GAAa,YAAA;AACb,EAAAA,WAAA,SAAA,CAAA,GAAU,SAAA;AAZA,EAAA,OAAAA,UAAAA;AAAA,CAAA,EAAA,SAAA,IAAA,EAAA;AAeL,IAAM,YAAA,GAAN,cAA2B,KAAA,CAAM;AAAA,EAC7B,IAAA;AAAA,EACA,OAAA;AAAA,EAET,WAAA,CAAY,IAAA,EAAiB,OAAA,EAAiB,OAAA,EAAmB;AAC/D,IAAA,KAAA,CAAM,OAAO,CAAA;AACb,IAAA,IAAA,CAAK,IAAA,GAAO,cAAA;AACZ,IAAA,IAAA,CAAK,IAAA,GAAO,IAAA;AACZ,IAAA,IAAA,CAAK,OAAA,GAAU,OAAA;AAAA,EACjB;AACF","file":"chunk-W5QYPYX3.mjs","sourcesContent":["export enum ErrorCode {\n CONNECTION_FAILED = 'CONNECTION_FAILED',\n AUTH_FAILED = 'AUTH_FAILED',\n CONNECTION_TIMEOUT = 'CONNECTION_TIMEOUT',\n QUOTA_EXCEEDED = 'QUOTA_EXCEEDED',\n VOICE_NOT_SUPPORTED = 'VOICE_NOT_SUPPORTED',\n VOICE_ALREADY_ACTIVE = 'VOICE_ALREADY_ACTIVE',\n VOICE_NOT_ACTIVE = 'VOICE_NOT_ACTIVE',\n LIVEKIT_UNAVAILABLE = 'LIVEKIT_UNAVAILABLE',\n MICROPHONE_DENIED = 'MICROPHONE_DENIED',\n NOT_CONNECTED = 'NOT_CONNECTED',\n REST_ERROR = 'REST_ERROR',\n UNKNOWN = 'UNKNOWN',\n}\n\nexport class EstuaryError extends Error {\n readonly code: ErrorCode;\n readonly details?: unknown;\n\n constructor(code: ErrorCode, message: string, details?: unknown) {\n super(message);\n this.name = 'EstuaryError';\n this.code = code;\n this.details = details;\n }\n}\n"]}
package/dist/index.d.mts CHANGED
@@ -109,6 +109,16 @@ interface MemoryUpdatedEvent {
109
109
  newMemories: MemoryData[];
110
110
  timestamp: string;
111
111
  }
112
+ interface CharacterInfo {
113
+ id: string;
114
+ name: string;
115
+ tagline: string | null;
116
+ avatar: string | null;
117
+ modelUrl: string | null;
118
+ modelPreviewUrl: string | null;
119
+ modelStatus: string | null;
120
+ sourceImageUrl: string | null;
121
+ }
112
122
  interface CharacterAction {
113
123
  /** Action name (e.g., "follow_user", "sit", "look_at") */
114
124
  name: string;
@@ -309,6 +319,7 @@ declare class EstuaryClient extends TypedEventEmitter<EstuaryEventMap> {
309
319
  private voiceManager;
310
320
  private audioPlayer;
311
321
  private _memory;
322
+ private _character;
312
323
  private _sessionInfo;
313
324
  private actionParsers;
314
325
  private _hasAutoInterrupted;
@@ -316,6 +327,8 @@ declare class EstuaryClient extends TypedEventEmitter<EstuaryEventMap> {
316
327
  constructor(config: EstuaryConfig);
317
328
  /** Memory API client for querying memories, graphs, and facts */
318
329
  get memory(): MemoryClient;
330
+ /** Fetch character details including 3D model and avatar URLs. */
331
+ getCharacter(characterId?: string): Promise<CharacterInfo>;
319
332
  /** Current session info (null if not connected) */
320
333
  get session(): SessionInfo | null;
321
334
  /** Current connection state */
@@ -346,6 +359,9 @@ declare class EstuaryClient extends TypedEventEmitter<EstuaryEventMap> {
346
359
  toggleMute(): void;
347
360
  /** Whether the microphone is muted */
348
361
  get isMuted(): boolean;
362
+ /** Get/set suppressMicDuringPlayback at runtime (no reconnect needed) */
363
+ get suppressMicDuringPlayback(): boolean;
364
+ set suppressMicDuringPlayback(enabled: boolean);
349
365
  /** Whether voice is currently active */
350
366
  get isVoiceActive(): boolean;
351
367
  private ensureConnected;
@@ -394,4 +410,12 @@ declare function parseActions(text: string): {
394
410
  cleanText: string;
395
411
  };
396
412
 
397
- export { type BotResponse, type BotVoice, type CameraCaptureRequest, type CharacterAction, 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 };
413
+ declare class CharacterClient {
414
+ private rest;
415
+ constructor(rest: RestClient);
416
+ /** Fetch character details including 3D model and avatar URLs. */
417
+ getCharacter(characterId: string): Promise<CharacterInfo>;
418
+ dispose(): void;
419
+ }
420
+
421
+ 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 };
package/dist/index.d.ts CHANGED
@@ -109,6 +109,16 @@ interface MemoryUpdatedEvent {
109
109
  newMemories: MemoryData[];
110
110
  timestamp: string;
111
111
  }
112
+ interface CharacterInfo {
113
+ id: string;
114
+ name: string;
115
+ tagline: string | null;
116
+ avatar: string | null;
117
+ modelUrl: string | null;
118
+ modelPreviewUrl: string | null;
119
+ modelStatus: string | null;
120
+ sourceImageUrl: string | null;
121
+ }
112
122
  interface CharacterAction {
113
123
  /** Action name (e.g., "follow_user", "sit", "look_at") */
114
124
  name: string;
@@ -309,6 +319,7 @@ declare class EstuaryClient extends TypedEventEmitter<EstuaryEventMap> {
309
319
  private voiceManager;
310
320
  private audioPlayer;
311
321
  private _memory;
322
+ private _character;
312
323
  private _sessionInfo;
313
324
  private actionParsers;
314
325
  private _hasAutoInterrupted;
@@ -316,6 +327,8 @@ declare class EstuaryClient extends TypedEventEmitter<EstuaryEventMap> {
316
327
  constructor(config: EstuaryConfig);
317
328
  /** Memory API client for querying memories, graphs, and facts */
318
329
  get memory(): MemoryClient;
330
+ /** Fetch character details including 3D model and avatar URLs. */
331
+ getCharacter(characterId?: string): Promise<CharacterInfo>;
319
332
  /** Current session info (null if not connected) */
320
333
  get session(): SessionInfo | null;
321
334
  /** Current connection state */
@@ -346,6 +359,9 @@ declare class EstuaryClient extends TypedEventEmitter<EstuaryEventMap> {
346
359
  toggleMute(): void;
347
360
  /** Whether the microphone is muted */
348
361
  get isMuted(): boolean;
362
+ /** Get/set suppressMicDuringPlayback at runtime (no reconnect needed) */
363
+ get suppressMicDuringPlayback(): boolean;
364
+ set suppressMicDuringPlayback(enabled: boolean);
349
365
  /** Whether voice is currently active */
350
366
  get isVoiceActive(): boolean;
351
367
  private ensureConnected;
@@ -394,4 +410,12 @@ declare function parseActions(text: string): {
394
410
  cleanText: string;
395
411
  };
396
412
 
397
- export { type BotResponse, type BotVoice, type CameraCaptureRequest, type CharacterAction, 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 };
413
+ declare class CharacterClient {
414
+ private rest;
415
+ constructor(rest: RestClient);
416
+ /** Fetch character details including 3D model and avatar URLs. */
417
+ getCharacter(characterId: string): Promise<CharacterInfo>;
418
+ dispose(): void;
419
+ }
420
+
421
+ 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 };
package/dist/index.js CHANGED
@@ -880,6 +880,30 @@ var MemoryClient = class {
880
880
  }
881
881
  };
882
882
 
883
+ // src/rest/character-client.ts
884
+ var CharacterClient = class {
885
+ rest;
886
+ constructor(rest) {
887
+ this.rest = rest;
888
+ }
889
+ /** Fetch character details including 3D model and avatar URLs. */
890
+ async getCharacter(characterId) {
891
+ const raw = await this.rest.get(`/api/agents/${characterId}`);
892
+ return {
893
+ id: raw.id,
894
+ name: raw.name,
895
+ tagline: raw.tagline ?? null,
896
+ avatar: raw.avatar ?? null,
897
+ modelUrl: raw.modelUrl ?? null,
898
+ modelPreviewUrl: raw.modelPreviewUrl ?? null,
899
+ modelStatus: raw.modelStatus ?? null,
900
+ sourceImageUrl: raw.sourceImageUrl ?? null
901
+ };
902
+ }
903
+ dispose() {
904
+ }
905
+ };
906
+
883
907
  // src/audio/audio-player.ts
884
908
  var AudioPlayer = class {
885
909
  sampleRate;
@@ -1130,6 +1154,7 @@ var EstuaryClient = class extends TypedEventEmitter {
1130
1154
  voiceManager = null;
1131
1155
  audioPlayer = null;
1132
1156
  _memory;
1157
+ _character;
1133
1158
  _sessionInfo = null;
1134
1159
  actionParsers = /* @__PURE__ */ new Map();
1135
1160
  _hasAutoInterrupted = false;
@@ -1142,11 +1167,16 @@ var EstuaryClient = class extends TypedEventEmitter {
1142
1167
  this.forwardSocketEvents();
1143
1168
  const restClient = new RestClient(config.serverUrl, config.apiKey);
1144
1169
  this._memory = new MemoryClient(restClient, config.characterId, config.playerId);
1170
+ this._character = new CharacterClient(restClient);
1145
1171
  }
1146
1172
  /** Memory API client for querying memories, graphs, and facts */
1147
1173
  get memory() {
1148
1174
  return this._memory;
1149
1175
  }
1176
+ /** Fetch character details including 3D model and avatar URLs. */
1177
+ async getCharacter(characterId) {
1178
+ return this._character.getCharacter(characterId ?? this.config.characterId);
1179
+ }
1150
1180
  /** Current session info (null if not connected) */
1151
1181
  get session() {
1152
1182
  return this._sessionInfo;
@@ -1277,6 +1307,13 @@ var EstuaryClient = class extends TypedEventEmitter {
1277
1307
  get isMuted() {
1278
1308
  return this.voiceManager?.isMuted ?? false;
1279
1309
  }
1310
+ /** Get/set suppressMicDuringPlayback at runtime (no reconnect needed) */
1311
+ get suppressMicDuringPlayback() {
1312
+ return this.config.suppressMicDuringPlayback ?? false;
1313
+ }
1314
+ set suppressMicDuringPlayback(enabled) {
1315
+ this.config.suppressMicDuringPlayback = enabled;
1316
+ }
1280
1317
  /** Whether voice is currently active */
1281
1318
  get isVoiceActive() {
1282
1319
  return this.voiceManager?.isActive ?? false;