@sovr/sdk 7.0.2 → 7.0.4

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.js CHANGED
@@ -352,9 +352,11 @@ var SOVRClient = class {
352
352
  async getStatus() {
353
353
  const statusPath = this.mode === "cloud" ? "/api/sovr/v1/cloud/status" : "/api/mcp/status-v2";
354
354
  const url = `${this.baseUrl}${statusPath}`;
355
- const res = await this.fetchFn(url, {
356
- headers: { "User-Agent": `@sovr/sdk/${SDK_VERSION}` }
357
- });
355
+ const headers = { "User-Agent": `@sovr/sdk/${SDK_VERSION}` };
356
+ if (this.mode === "cloud") {
357
+ headers["X-SOVR-API-Key"] = this.apiKey;
358
+ }
359
+ const res = await this.fetchFn(url, { headers });
358
360
  return await res.json();
359
361
  }
360
362
  /**
@@ -364,9 +366,11 @@ var SOVRClient = class {
364
366
  async healthCheck() {
365
367
  const healthPath = this.mode === "cloud" ? "/api/sovr/v1/cloud/status" : "/api/mcp/health";
366
368
  const url = `${this.baseUrl}${healthPath}`;
367
- const res = await this.fetchFn(url, {
368
- headers: { "User-Agent": `@sovr/sdk/${SDK_VERSION}` }
369
- });
369
+ const headers = { "User-Agent": `@sovr/sdk/${SDK_VERSION}` };
370
+ if (this.mode === "cloud") {
371
+ headers["X-SOVR-API-Key"] = this.apiKey;
372
+ }
373
+ const res = await this.fetchFn(url, { headers });
370
374
  return await res.json();
371
375
  }
372
376
  // ====================================================================
package/dist/index.mjs CHANGED
@@ -320,9 +320,11 @@ var SOVRClient = class {
320
320
  async getStatus() {
321
321
  const statusPath = this.mode === "cloud" ? "/api/sovr/v1/cloud/status" : "/api/mcp/status-v2";
322
322
  const url = `${this.baseUrl}${statusPath}`;
323
- const res = await this.fetchFn(url, {
324
- headers: { "User-Agent": `@sovr/sdk/${SDK_VERSION}` }
325
- });
323
+ const headers = { "User-Agent": `@sovr/sdk/${SDK_VERSION}` };
324
+ if (this.mode === "cloud") {
325
+ headers["X-SOVR-API-Key"] = this.apiKey;
326
+ }
327
+ const res = await this.fetchFn(url, { headers });
326
328
  return await res.json();
327
329
  }
328
330
  /**
@@ -332,9 +334,11 @@ var SOVRClient = class {
332
334
  async healthCheck() {
333
335
  const healthPath = this.mode === "cloud" ? "/api/sovr/v1/cloud/status" : "/api/mcp/health";
334
336
  const url = `${this.baseUrl}${healthPath}`;
335
- const res = await this.fetchFn(url, {
336
- headers: { "User-Agent": `@sovr/sdk/${SDK_VERSION}` }
337
- });
337
+ const headers = { "User-Agent": `@sovr/sdk/${SDK_VERSION}` };
338
+ if (this.mode === "cloud") {
339
+ headers["X-SOVR-API-Key"] = this.apiKey;
340
+ }
341
+ const res = await this.fetchFn(url, { headers });
338
342
  return await res.json();
339
343
  }
340
344
  // ====================================================================
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@sovr/sdk",
3
- "version": "7.0.2",
4
- "description": "The Execution Firewall for AI Agents \u2014 Official Node.js/TypeScript SDK for SOVR",
3
+ "version": "7.0.4",
4
+ "description": "The Execution Firewall for AI Agents Official Node.js/TypeScript SDK for SOVR",
5
5
  "main": "dist/index.js",
6
6
  "module": "dist/index.mjs",
7
7
  "types": "dist/index.d.ts",
@@ -54,4 +54,4 @@
54
54
  "typescript": "^5.0.0",
55
55
  "vitest": "^1.0.0"
56
56
  }
57
- }
57
+ }