@trillet-ai/web-sdk 1.2.7 → 1.2.8

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.
Files changed (2) hide show
  1. package/dist/index.js +3 -3
  2. package/package.json +1 -1
package/dist/index.js CHANGED
@@ -43,15 +43,15 @@ export class TrilletAgent extends EventEmitter {
43
43
  // 1. Get LiveKit token from Trillet API
44
44
  const response = await fetch(TRILLET_API_URL, {
45
45
  method: 'POST',
46
- mode: 'cors',
47
- credentials: 'omit', // Don't send credentials since this is an API key based auth
48
46
  headers: {
49
47
  'Content-Type': 'application/json',
50
48
  'Accept': 'application/json',
51
49
  'x-workspace-id': this.config.workspaceId,
52
50
  'x-api-key': this.config.apiKey,
53
- 'Origin': typeof window !== 'undefined' ? window.location.origin : '*'
51
+ 'Origin': window.location.origin // Explicitly set origin
54
52
  },
53
+ mode: 'cors', // Explicitly request CORS
54
+ credentials: 'include', // Include credentials if needed
55
55
  body: JSON.stringify({
56
56
  agentId: this.config.agentId,
57
57
  dynamic_variables: this.config.variables || {}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@trillet-ai/web-sdk",
3
- "version": "1.2.7",
3
+ "version": "1.2.8",
4
4
  "description": "Trillet Web SDK for real-time audio communication with AI agents",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",