@simfinity/constellation-client 1.0.17 → 1.0.19

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/dist/index.cjs CHANGED
@@ -54,7 +54,7 @@ var WebClient = class {
54
54
  const response = await fetch(`${this.config.sessionEndpoint}/prepare_session`, {
55
55
  method: "POST",
56
56
  headers: {
57
- "Authorization": `Bearer ${this.config.key}`,
57
+ "Sim-Api-Key": `${this.config.key}`,
58
58
  "Content-Type": "application/json",
59
59
  "Accept": "application/json"
60
60
  },
@@ -303,8 +303,9 @@ var WebClient = class {
303
303
  });
304
304
  }
305
305
  send(type, data = null) {
306
+ var _a;
306
307
  if (!this.ws || this.ws.readyState != WebSocket.OPEN) {
307
- throw new Error("Stream is not opened");
308
+ throw new Error(`Stream is not opened. State=${(_a = this.ws) == null ? void 0 : _a.readyState}`);
308
309
  }
309
310
  this.ws.send(JSON.stringify({ type, ...data && { data } }));
310
311
  }
package/dist/index.d.cts CHANGED
@@ -1,7 +1,7 @@
1
1
  /**
2
2
  * Available server-side LLM types
3
3
  */
4
- type LlmType = "openai";
4
+ type LlmType = "openai" | "gemini";
5
5
  /**
6
6
  * Configuration required to initiate a connection with the stream server:
7
7
  *
package/dist/index.d.ts CHANGED
@@ -1,7 +1,7 @@
1
1
  /**
2
2
  * Available server-side LLM types
3
3
  */
4
- type LlmType = "openai";
4
+ type LlmType = "openai" | "gemini";
5
5
  /**
6
6
  * Configuration required to initiate a connection with the stream server:
7
7
  *
package/dist/index.js CHANGED
@@ -28,7 +28,7 @@ var WebClient = class {
28
28
  const response = await fetch(`${this.config.sessionEndpoint}/prepare_session`, {
29
29
  method: "POST",
30
30
  headers: {
31
- "Authorization": `Bearer ${this.config.key}`,
31
+ "Sim-Api-Key": `${this.config.key}`,
32
32
  "Content-Type": "application/json",
33
33
  "Accept": "application/json"
34
34
  },
@@ -277,8 +277,9 @@ var WebClient = class {
277
277
  });
278
278
  }
279
279
  send(type, data = null) {
280
+ var _a;
280
281
  if (!this.ws || this.ws.readyState != WebSocket.OPEN) {
281
- throw new Error("Stream is not opened");
282
+ throw new Error(`Stream is not opened. State=${(_a = this.ws) == null ? void 0 : _a.readyState}`);
282
283
  }
283
284
  this.ws.send(JSON.stringify({ type, ...data && { data } }));
284
285
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@simfinity/constellation-client",
3
- "version": "1.0.17",
3
+ "version": "1.0.19",
4
4
  "type": "module",
5
5
  "exports": {
6
6
  ".": {