@blazingagents/sdk 0.10.0 → 0.11.0

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/errors.js CHANGED
@@ -28,7 +28,7 @@ export class BlazingAgentsError extends Error {
28
28
  [BLAZING_AGENTS_ERROR_SYMBOL] = true;
29
29
  // Stryker restore BooleanLiteral
30
30
  constructor({ code, details, headers, message, param, requestId, responseBody, responseBodyTruncated, status, }, options) {
31
- super(message, options);
31
+ super(`[${code}] ${message}`, options);
32
32
  this.name = BLAZING_AGENTS_ERROR_NAME;
33
33
  this.code = code;
34
34
  this.details = details;
package/dist/http.js CHANGED
@@ -7,7 +7,8 @@ const REQUEST_ABORTED_MESSAGE = "The request was aborted before any HTTP respons
7
7
  /**
8
8
  * The fetch client — a thin wrapper in the stripe/openai-node shape.
9
9
  * `apiKey` rides the `Authorization: Bearer ${apiKey}` header; `baseUrl`
10
- * defaults to the local api dev port. No OpenAI wire compatibility.
10
+ * defaults to `DEFAULT_BASE_URL` in `client.ts`
11
+ * (`https://api.blazingagents.com`). No OpenAI wire compatibility.
11
12
  */
12
13
  function buildUrl(baseUrl, path, query) {
13
14
  const url = `${baseUrl}${path}`;
package/dist/relay.js CHANGED
@@ -102,7 +102,7 @@ function safeErrorResponse(error) {
102
102
  if (requestId) {
103
103
  headers.set("x-request-id", requestId);
104
104
  }
105
- return errorResponse(status, error.code, error.message, headers);
105
+ return errorResponse(status, error.code, error.message.slice(`[${error.code}] `.length), headers);
106
106
  }
107
107
  return errorResponse(500, "internal_error", "Request failed.");
108
108
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@blazingagents/sdk",
3
- "version": "0.10.0",
3
+ "version": "0.11.0",
4
4
  "description": "TypeScript SDK for the Blazing Agents API",
5
5
  "homepage": "https://docs.blazingagents.com",
6
6
  "bugs": {