langwatch 1.11.0 → 1.12.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/agent/index.d.mts +7 -1
- package/dist/agent/index.d.ts +7 -1
- package/dist/agent/index.js +26 -1
- package/dist/agent/index.js.map +1 -1
- package/dist/agent/index.mjs +26 -1
- package/dist/agent/index.mjs.map +1 -1
- package/dist/{chunk-2PD3YA5H.js → chunk-3WIN2UXZ.js} +2 -2
- package/dist/{chunk-2PD3YA5H.js.map → chunk-3WIN2UXZ.js.map} +1 -1
- package/dist/{chunk-VMNKKJVI.mjs → chunk-BAE4KYKJ.mjs} +2 -2
- package/dist/{chunk-BS5CNZ5S.mjs → chunk-F5UYCQT3.mjs} +2 -2
- package/dist/{chunk-BS5CNZ5S.mjs.map → chunk-F5UYCQT3.mjs.map} +1 -1
- package/dist/{chunk-AJDFFRSW.js → chunk-QLYKPPAW.js} +12 -12
- package/dist/{chunk-AJDFFRSW.js.map → chunk-QLYKPPAW.js.map} +1 -1
- package/dist/cli/bundle.js +295 -217
- package/dist/{implementation-aczLxVpV.d.mts → implementation-BA3xa5UR.d.mts} +1 -1
- package/dist/{implementation-D58yPTJW.d.ts → implementation-rpImK8WS.d.ts} +1 -1
- package/dist/index.d.mts +55 -2
- package/dist/index.d.ts +55 -2
- package/dist/index.js +89 -33
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +58 -2
- package/dist/index.mjs.map +1 -1
- package/dist/observability-sdk/index.d.mts +3 -3
- package/dist/observability-sdk/index.d.ts +3 -3
- package/dist/observability-sdk/index.js +2 -2
- package/dist/observability-sdk/index.mjs +1 -1
- package/dist/observability-sdk/instrumentation/langchain/index.d.mts +1 -1
- package/dist/observability-sdk/instrumentation/langchain/index.d.ts +1 -1
- package/dist/observability-sdk/setup/node/index.js +3 -3
- package/dist/observability-sdk/setup/node/index.mjs +2 -2
- package/dist/{types-D_YNU-VL.d.ts → types-Cr25FO-i.d.ts} +395 -293
- package/dist/{types-BmMuUDrO.d.mts → types-DJyJypkv.d.mts} +395 -293
- package/package.json +1 -1
- /package/dist/{chunk-VMNKKJVI.mjs.map → chunk-BAE4KYKJ.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-
|
|
12
|
+
} from "./chunk-BAE4KYKJ.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-
|
|
23
|
+
} from "./chunk-F5UYCQT3.mjs";
|
|
24
24
|
import {
|
|
25
25
|
ConsoleLogger,
|
|
26
26
|
NoOpLogger,
|
|
@@ -5778,6 +5778,61 @@ var AnalyticsApiService = class {
|
|
|
5778
5778
|
}
|
|
5779
5779
|
};
|
|
5780
5780
|
|
|
5781
|
+
// src/client-sdk/services/query/query-api.service.ts
|
|
5782
|
+
var QueryApiError = class extends Error {
|
|
5783
|
+
constructor(message, operation, originalError, status) {
|
|
5784
|
+
super(message);
|
|
5785
|
+
this.operation = operation;
|
|
5786
|
+
this.originalError = originalError;
|
|
5787
|
+
this.status = status;
|
|
5788
|
+
this.name = "QueryApiError";
|
|
5789
|
+
}
|
|
5790
|
+
};
|
|
5791
|
+
var QueryApiService = class {
|
|
5792
|
+
constructor(config) {
|
|
5793
|
+
var _a;
|
|
5794
|
+
this.apiClient = (_a = config == null ? void 0 : config.langwatchApiClient) != null ? _a : createLangWatchApiClient();
|
|
5795
|
+
}
|
|
5796
|
+
handleApiError(operation, error, response) {
|
|
5797
|
+
var _a;
|
|
5798
|
+
const status = (_a = response == null ? void 0 : response.status) != null ? _a : extractStatusFromResponse(error);
|
|
5799
|
+
const message = formatApiErrorForOperation({
|
|
5800
|
+
operation,
|
|
5801
|
+
error,
|
|
5802
|
+
options: { status }
|
|
5803
|
+
});
|
|
5804
|
+
throwIfHandledError({ operation, error, response, message });
|
|
5805
|
+
throw new QueryApiError(message, operation, error, status);
|
|
5806
|
+
}
|
|
5807
|
+
/**
|
|
5808
|
+
* Runs one read-only LangWatchQL `SELECT` over the analytics datasets and
|
|
5809
|
+
* returns typed columns, rows, execution statistics, truncation state and
|
|
5810
|
+
* diagnostics, scoped to the caller's project.
|
|
5811
|
+
*/
|
|
5812
|
+
async query(params) {
|
|
5813
|
+
const { data, error, response } = await this.apiClient.POST(
|
|
5814
|
+
"/api/v1/query",
|
|
5815
|
+
{ body: params }
|
|
5816
|
+
);
|
|
5817
|
+
if (error) this.handleApiError("run query", error, response);
|
|
5818
|
+
return data;
|
|
5819
|
+
}
|
|
5820
|
+
/**
|
|
5821
|
+
* Lists the LangWatchQL analytics datasets this key may query, with each
|
|
5822
|
+
* column's type, description, the permissions that unlock it, and whether
|
|
5823
|
+
* this caller holds them — plus each dataset's grain, join keys,
|
|
5824
|
+
* partition-pruning time column, freshness and a runnable example query.
|
|
5825
|
+
*/
|
|
5826
|
+
async schema() {
|
|
5827
|
+
const { data, error, response } = await this.apiClient.GET(
|
|
5828
|
+
"/api/v1/query/schema",
|
|
5829
|
+
{}
|
|
5830
|
+
);
|
|
5831
|
+
if (error) this.handleApiError("discover query schema", error, response);
|
|
5832
|
+
return data;
|
|
5833
|
+
}
|
|
5834
|
+
};
|
|
5835
|
+
|
|
5781
5836
|
// src/client-sdk/services/triggers/triggers-api.service.ts
|
|
5782
5837
|
var TriggersApiError = class extends Error {
|
|
5783
5838
|
constructor(message, operation, originalError) {
|
|
@@ -7502,6 +7557,7 @@ var LangWatch = class {
|
|
|
7502
7557
|
this.dashboards = new DashboardsApiService(this.config);
|
|
7503
7558
|
this.modelProviders = new ModelProvidersApiService(this.config);
|
|
7504
7559
|
this.analytics = new AnalyticsApiService(this.config);
|
|
7560
|
+
this.query = new QueryApiService(this.config);
|
|
7505
7561
|
this.triggers = new TriggersApiService(this.config);
|
|
7506
7562
|
this.graphs = new GraphsApiService(this.config);
|
|
7507
7563
|
this.simulationRuns = new SimulationRunsApiService(this.config);
|