@amigo-ai/platform-sdk 0.77.0 → 0.78.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/README.md CHANGED
@@ -446,6 +446,8 @@ const parent = await client.tokens.exchangeClientCredentials({
446
446
  ### Agents
447
447
 
448
448
  ```typescript
449
+ import type { VoiceSessionProvider } from '@amigo-ai/platform-sdk'
450
+
449
451
  // Create an agent
450
452
  const agent = await client.agents.create({
451
453
  name: 'Patient Intake Agent',
@@ -467,6 +469,10 @@ const version = await client.agents.createVersion(agent.id, {
467
469
  thought_visibility: 'private',
468
470
  },
469
471
  },
472
+ voice_config: {
473
+ voice_id: 'voice-abc123',
474
+ session_provider: 'inhouse' satisfies VoiceSessionProvider,
475
+ },
470
476
  })
471
477
 
472
478
  // Get the latest version
@@ -506,9 +512,18 @@ console.log(result.result, result.duration_ms)
506
512
  Services wire together an agent + context graph + phone channel.
507
513
 
508
514
  ```typescript
515
+ import type { VoiceSessionProvider } from '@amigo-ai/platform-sdk'
516
+
509
517
  const { items: services } = await client.services.list()
510
518
  const service = await client.services.get('service-id')
511
519
  console.log(service.agent_name, service.channel_type, service.version_sets)
520
+
521
+ await client.services.update(service.id, {
522
+ voice_config: {
523
+ ...(service.voice_config ?? {}),
524
+ session_provider: 'inhouse' satisfies VoiceSessionProvider,
525
+ },
526
+ })
512
527
  ```
513
528
 
514
529
  ### World Model
@@ -723,9 +738,16 @@ console.log(source.source_type, source.health_status, source.last_sync_at)
723
738
  ### Settings
724
739
 
725
740
  ```typescript
741
+ import type { SttProvider, TtsProvider } from '@amigo-ai/platform-sdk'
742
+
726
743
  // Voice
727
744
  const voice = await client.settings.voice.get()
728
- await client.settings.voice.update({ voice_id: 'new-voice-id', speed: 1.1 })
745
+ await client.settings.voice.update({
746
+ voice_id: 'new-voice-id',
747
+ speed: 1.1,
748
+ stt_provider: 'deepgram' satisfies SttProvider,
749
+ tts_provider: 'cartesia' satisfies TtsProvider,
750
+ })
729
751
 
730
752
  // Retention
731
753
  const retention = await client.settings.retention.get()
package/api.md CHANGED
@@ -53,6 +53,8 @@ Notes:
53
53
  - Pagination and response helpers: `paginate`, `buildLastResponse`, `extractRequestId`
54
54
  - Conversation helpers: `sessionConnectAuthProtocols`, `textStreamAuthProtocols`
55
55
  - Conversation types: `ConversationDetail`, `ConversationListResponse`, `ConversationSummary`, `ConversationTurn`, `ConversationTurnAvailableAction`, `ConversationTurnStateTransition`, `CreateConversationRequest`, `ListConversationsParams`, `SessionConnectUrlParams`, `TextStreamAuthProtocols` (WebSocket constructor subprotocol tuple), `TextStreamUrlParams`, `TurnDoneEvent`, `TurnErrorEvent`, `TurnMessageEvent`, `TurnRequest`, `TurnResponse`, `TurnConversationSnapshot`, `TurnStreamEvent`, `TurnThinkingEvent`, `TurnTokenEvent`, `TurnToolCallCompletedEvent`, `TurnToolCallStartedEvent`
56
+ - Voice provider constants: `STT_PROVIDERS`, `TTS_PROVIDERS`, `VOICE_SESSION_PROVIDERS`
57
+ - Voice provider types: `AgentVoiceConfig`, `ServiceVoiceConfigInput`, `ServiceVoiceConfigOutput`, `SttProvider`, `TtsProvider`, `VoiceSessionProvider`, `VoiceSettingsRequest`, `VoiceSettingsResponse`
56
58
  - Response and hook types: `PaginatedList`, `ListParams`, `LastResponseInfo`, `ResponseMetadata`, `WithResponseMetadata`, `AmigoResponse`, `RetryOptions`, `RateLimitInfo`, `ClientHooks`, `RequestHookContext`, `ResponseHookContext`, `ErrorHookContext`
57
59
  - Generated OpenAPI types: `paths`, `components`, `operations`
58
60
  - Generated API types are produced with `npm run gen-types` from the committed `openapi.json` snapshot.
package/dist/index.cjs CHANGED
@@ -55,11 +55,14 @@ __export(index_exports, {
55
55
  ReconnectingWebSocketError: () => ReconnectingWebSocketError,
56
56
  RefreshTokenExpiredError: () => RefreshTokenExpiredError,
57
57
  RequestTimeoutError: () => RequestTimeoutError,
58
+ STT_PROVIDERS: () => STT_PROVIDERS,
58
59
  ServerError: () => ServerError,
59
60
  ServiceUnavailableError: () => ServiceUnavailableError,
60
61
  SesSetupResource: () => SesSetupResource,
62
+ TTS_PROVIDERS: () => TTS_PROVIDERS,
61
63
  TokenManager: () => TokenManager,
62
64
  TokensResource: () => TokensResource,
65
+ VOICE_SESSION_PROVIDERS: () => VOICE_SESSION_PROVIDERS,
63
66
  ValidationError: () => ValidationError,
64
67
  WebhookVerificationError: () => WebhookVerificationError,
65
68
  WorkspaceEventStreamError: () => WorkspaceEventStreamError,
@@ -5635,6 +5638,18 @@ function toCryptoBuffer(bytes) {
5635
5638
  return copy.buffer;
5636
5639
  }
5637
5640
 
5641
+ // src/resources/voice.ts
5642
+ var voiceSessionProviders = [
5643
+ "inhouse",
5644
+ "openai_realtime",
5645
+ "atlas"
5646
+ ];
5647
+ var VOICE_SESSION_PROVIDERS = voiceSessionProviders;
5648
+ var sttProviders = ["deepgram", "openai", "cartesia"];
5649
+ var STT_PROVIDERS = sttProviders;
5650
+ var ttsProviders = ["cartesia", "elevenlabs", "groq"];
5651
+ var TTS_PROVIDERS = ttsProviders;
5652
+
5638
5653
  // src/core/device-code.ts
5639
5654
  var DeviceCodeExpiredError = class extends AmigoError {
5640
5655
  constructor(message = "Device code expired. Please restart the login flow.") {