langwatch 1.17.0 → 1.19.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.
Files changed (32) hide show
  1. package/dist/agent/index.js +21 -2
  2. package/dist/agent/index.js.map +1 -1
  3. package/dist/agent/index.mjs +21 -2
  4. package/dist/agent/index.mjs.map +1 -1
  5. package/dist/{chunk-RY3NFLJU.js → chunk-CSV7B7B5.js} +2 -2
  6. package/dist/{chunk-RY3NFLJU.js.map → chunk-CSV7B7B5.js.map} +1 -1
  7. package/dist/{chunk-JW2EQIMC.mjs → chunk-PIYOJF6V.mjs} +2 -2
  8. package/dist/{chunk-XVFH6IXS.mjs → chunk-SY5HSL5G.mjs} +2 -2
  9. package/dist/{chunk-XVFH6IXS.mjs.map → chunk-SY5HSL5G.mjs.map} +1 -1
  10. package/dist/{chunk-DCUUYUIA.js → chunk-WGLVIV4J.js} +12 -12
  11. package/dist/{chunk-DCUUYUIA.js.map → chunk-WGLVIV4J.js.map} +1 -1
  12. package/dist/cli/bundle.js +264 -253
  13. package/dist/{implementation-C4KfYlhX.d.mts → implementation-CeTvnq6e.d.mts} +1 -1
  14. package/dist/{implementation-Cw7DHUnF.d.ts → implementation-CsQrexpY.d.ts} +1 -1
  15. package/dist/index.d.mts +2 -2
  16. package/dist/index.d.ts +2 -2
  17. package/dist/index.js +63 -52
  18. package/dist/index.js.map +1 -1
  19. package/dist/index.mjs +32 -21
  20. package/dist/index.mjs.map +1 -1
  21. package/dist/observability-sdk/index.d.mts +3 -3
  22. package/dist/observability-sdk/index.d.ts +3 -3
  23. package/dist/observability-sdk/index.js +2 -2
  24. package/dist/observability-sdk/index.mjs +1 -1
  25. package/dist/observability-sdk/instrumentation/langchain/index.d.mts +1 -1
  26. package/dist/observability-sdk/instrumentation/langchain/index.d.ts +1 -1
  27. package/dist/observability-sdk/setup/node/index.js +3 -3
  28. package/dist/observability-sdk/setup/node/index.mjs +2 -2
  29. package/dist/{types-BdF0MXO_.d.mts → types-ofe1fAYQ.d.mts} +1687 -70
  30. package/dist/{types-e6FbupXu.d.ts → types-wuYJPoFb.d.ts} +1687 -70
  31. package/package.json +1 -1
  32. /package/dist/{chunk-JW2EQIMC.mjs.map → chunk-PIYOJF6V.mjs.map} +0 -0
package/dist/index.mjs CHANGED
@@ -9,7 +9,7 @@ import {
9
9
  import {
10
10
  ensureSetup,
11
11
  resolveEndpoint
12
- } from "./chunk-JW2EQIMC.mjs";
12
+ } from "./chunk-PIYOJF6V.mjs";
13
13
  import {
14
14
  LANGWATCH_SDK_LANGUAGE,
15
15
  LANGWATCH_SDK_NAME_CLIENT,
@@ -20,7 +20,7 @@ import {
20
20
  buildAuthHeaders,
21
21
  getLangWatchLogger,
22
22
  version
23
- } from "./chunk-XVFH6IXS.mjs";
23
+ } from "./chunk-SY5HSL5G.mjs";
24
24
  import {
25
25
  ConsoleLogger,
26
26
  NoOpLogger,
@@ -5143,6 +5143,25 @@ var EvaluatorsApiError = class extends Error {
5143
5143
  }
5144
5144
  };
5145
5145
 
5146
+ // src/client-sdk/services/_shared/throw-handled-error.ts
5147
+ function throwIfHandledError({
5148
+ operation,
5149
+ error,
5150
+ response,
5151
+ status,
5152
+ message
5153
+ }) {
5154
+ var _a;
5155
+ const resolved = (_a = status != null ? status : response == null ? void 0 : response.status) != null ? _a : extractStatusFromResponse(error);
5156
+ const handledError = handledErrorFrom({
5157
+ operation,
5158
+ body: error,
5159
+ status: resolved,
5160
+ message
5161
+ });
5162
+ if (handledError) throw handledError;
5163
+ }
5164
+
5146
5165
  // src/client-sdk/services/evaluators/evaluators-api.service.ts
5147
5166
  var EvaluatorsApiService = class {
5148
5167
  constructor(config) {
@@ -5153,6 +5172,7 @@ var EvaluatorsApiService = class {
5153
5172
  const message = formatApiErrorForOperation({ operation, error, options: {
5154
5173
  status: extractStatusFromResponse(error)
5155
5174
  } });
5175
+ throwIfHandledError({ operation, error, message });
5156
5176
  throw new EvaluatorsApiError(message, operation, error);
5157
5177
  }
5158
5178
  /**
@@ -5241,6 +5261,7 @@ var ScenariosApiService = class {
5241
5261
  const message = formatApiErrorForOperation({ operation, error, options: {
5242
5262
  status: extractStatusFromResponse(error)
5243
5263
  } });
5264
+ throwIfHandledError({ operation, error, message });
5244
5265
  throw new ScenariosApiError(message, operation, error);
5245
5266
  }
5246
5267
  async getAll() {
@@ -5331,6 +5352,7 @@ var SuitesApiService = class {
5331
5352
  const message = formatApiErrorForOperation({ operation, error, options: {
5332
5353
  status: extractStatusFromResponse(error)
5333
5354
  } });
5355
+ throwIfHandledError({ operation, error, message });
5334
5356
  throw new SuitesApiError(message, operation, error);
5335
5357
  }
5336
5358
  async getAll(options) {
@@ -5394,25 +5416,6 @@ var SuitesApiService = class {
5394
5416
  }
5395
5417
  };
5396
5418
 
5397
- // src/client-sdk/services/_shared/throw-handled-error.ts
5398
- function throwIfHandledError({
5399
- operation,
5400
- error,
5401
- response,
5402
- status,
5403
- message
5404
- }) {
5405
- var _a;
5406
- const resolved = (_a = status != null ? status : response == null ? void 0 : response.status) != null ? _a : extractStatusFromResponse(error);
5407
- const handledError = handledErrorFrom({
5408
- operation,
5409
- body: error,
5410
- status: resolved,
5411
- message
5412
- });
5413
- if (handledError) throw handledError;
5414
- }
5415
-
5416
5419
  // src/client-sdk/services/run-plans/run-plans-api.service.ts
5417
5420
  var RunPlansApiError = class extends Error {
5418
5421
  constructor(message, operation, originalError, status) {
@@ -5885,6 +5888,7 @@ var AgentsApiService = class {
5885
5888
  const message = formatApiErrorForOperation({ operation, error, options: {
5886
5889
  status: extractStatusFromResponse(error)
5887
5890
  } });
5891
+ throwIfHandledError({ operation, error, message });
5888
5892
  throw new AgentsApiError(message, operation, error);
5889
5893
  }
5890
5894
  async list(params) {
@@ -5968,6 +5972,7 @@ var AnnotationsApiService = class {
5968
5972
  const message = formatApiErrorForOperation({ operation, error, options: {
5969
5973
  status: extractStatusFromResponse(error)
5970
5974
  } });
5975
+ throwIfHandledError({ operation, error, message });
5971
5976
  throw new AnnotationsApiError(message, operation, error);
5972
5977
  }
5973
5978
  async getAll() {
@@ -6036,6 +6041,7 @@ var DashboardsApiService = class {
6036
6041
  const message = formatApiErrorForOperation({ operation, error, options: {
6037
6042
  status: extractStatusFromResponse(error)
6038
6043
  } });
6044
+ throwIfHandledError({ operation, error, message });
6039
6045
  throw new DashboardsApiError(message, operation, error);
6040
6046
  }
6041
6047
  async list() {
@@ -6092,6 +6098,7 @@ var ModelProvidersApiService = class {
6092
6098
  const message = formatApiErrorForOperation({ operation, error, options: {
6093
6099
  status: extractStatusFromResponse(error)
6094
6100
  } });
6101
+ throwIfHandledError({ operation, error, message });
6095
6102
  throw new ModelProvidersApiError(message, operation, error);
6096
6103
  }
6097
6104
  async list() {
@@ -6131,6 +6138,7 @@ var AnalyticsApiService = class {
6131
6138
  const message = formatApiErrorForOperation({ operation, error, options: {
6132
6139
  status: extractStatusFromResponse(error)
6133
6140
  } });
6141
+ throwIfHandledError({ operation, error, message });
6134
6142
  throw new AnalyticsApiError(message, operation, error);
6135
6143
  }
6136
6144
  async timeseries(params) {
@@ -6230,6 +6238,7 @@ var TriggersApiService = class {
6230
6238
  const message = formatApiErrorForOperation({ operation, error, options: {
6231
6239
  status: extractStatusFromResponse(error)
6232
6240
  } });
6241
+ throwIfHandledError({ operation, error, message });
6233
6242
  throw new TriggersApiError(message, operation, error);
6234
6243
  }
6235
6244
  async getAll() {
@@ -6286,6 +6295,7 @@ var GraphsApiService = class {
6286
6295
  const message = formatApiErrorForOperation({ operation, error, options: {
6287
6296
  status: extractStatusFromResponse(error)
6288
6297
  } });
6298
+ throwIfHandledError({ operation, error, message });
6289
6299
  throw new GraphsApiError(message, operation, error);
6290
6300
  }
6291
6301
  async getAll(dashboardId) {
@@ -6344,6 +6354,7 @@ var SimulationRunsApiService = class {
6344
6354
  const message = formatApiErrorForOperation({ operation, error, options: {
6345
6355
  status: extractStatusFromResponse(error)
6346
6356
  } });
6357
+ throwIfHandledError({ operation, error, message });
6347
6358
  throw new SimulationRunsApiError(message, operation, error);
6348
6359
  }
6349
6360
  async getAll(params) {