windmill-client 1.795.0 → 1.797.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/client.d.ts +14 -4
- package/dist/client.mjs +18 -8
- package/dist/core/OpenAPI.mjs +1 -1
- package/dist/index.js +386 -15
- package/dist/index.mjs +2 -2
- package/dist/services.gen.d.ts +205 -3
- package/dist/services.gen.mjs +366 -7
- package/dist/types.gen.d.ts +953 -6
- package/package.json +1 -1
package/dist/client.d.ts
CHANGED
|
@@ -275,31 +275,41 @@ export declare function deleteS3File(s3object: S3Object, workspace?: string | un
|
|
|
275
275
|
/**
|
|
276
276
|
* Sign S3 objects to be used by anonymous users in public apps
|
|
277
277
|
* @param s3objects s3 objects to sign
|
|
278
|
+
* @param expirySecs how long the signature stays valid, in seconds (default 43200 = 12h, clamped to [60, 604800])
|
|
278
279
|
* @returns signed s3 objects
|
|
279
280
|
*/
|
|
280
|
-
export declare function signS3Objects(s3objects: S3Object[]
|
|
281
|
+
export declare function signS3Objects(s3objects: S3Object[], { expirySecs }?: {
|
|
282
|
+
expirySecs?: number;
|
|
283
|
+
}): Promise<S3Object[]>;
|
|
281
284
|
/**
|
|
282
285
|
* Sign S3 object to be used by anonymous users in public apps
|
|
283
286
|
* @param s3object s3 object to sign
|
|
287
|
+
* @param expirySecs how long the signature stays valid, in seconds (default 43200 = 12h, clamped to [60, 604800])
|
|
284
288
|
* @returns signed s3 object
|
|
285
289
|
*/
|
|
286
|
-
export declare function signS3Object(s3object: S3Object
|
|
290
|
+
export declare function signS3Object(s3object: S3Object, { expirySecs }?: {
|
|
291
|
+
expirySecs?: number;
|
|
292
|
+
}): Promise<S3Object>;
|
|
287
293
|
/**
|
|
288
294
|
* Generate a presigned public URL for an array of S3 objects.
|
|
289
295
|
* If an S3 object is not signed yet, it will be signed first.
|
|
290
296
|
* @param s3Objects s3 objects to sign
|
|
297
|
+
* @param expirySecs how long the signature stays valid, in seconds (default 43200 = 12h, clamped to [60, 604800])
|
|
291
298
|
* @returns list of signed public URLs
|
|
292
299
|
*/
|
|
293
|
-
export declare function getPresignedS3PublicUrls(s3Objects: S3Object[], { baseUrl }?: {
|
|
300
|
+
export declare function getPresignedS3PublicUrls(s3Objects: S3Object[], { baseUrl, expirySecs }?: {
|
|
294
301
|
baseUrl?: string;
|
|
302
|
+
expirySecs?: number;
|
|
295
303
|
}): Promise<string[]>;
|
|
296
304
|
/**
|
|
297
305
|
* Generate a presigned public URL for an S3 object. If the S3 object is not signed yet, it will be signed first.
|
|
298
306
|
* @param s3Object s3 object to sign
|
|
307
|
+
* @param expirySecs how long the signature stays valid, in seconds (default 43200 = 12h, clamped to [60, 604800])
|
|
299
308
|
* @returns signed public URL
|
|
300
309
|
*/
|
|
301
|
-
export declare function getPresignedS3PublicUrl(s3Objects: S3Object, { baseUrl }?: {
|
|
310
|
+
export declare function getPresignedS3PublicUrl(s3Objects: S3Object, { baseUrl, expirySecs }?: {
|
|
302
311
|
baseUrl?: string;
|
|
312
|
+
expirySecs?: number;
|
|
303
313
|
}): Promise<string>;
|
|
304
314
|
/**
|
|
305
315
|
* Get URLs needed for resuming a flow after this step
|
package/dist/client.mjs
CHANGED
|
@@ -672,36 +672,42 @@ async function deleteS3File(s3object, workspace = void 0) {
|
|
|
672
672
|
/**
|
|
673
673
|
* Sign S3 objects to be used by anonymous users in public apps
|
|
674
674
|
* @param s3objects s3 objects to sign
|
|
675
|
+
* @param expirySecs how long the signature stays valid, in seconds (default 43200 = 12h, clamped to [60, 604800])
|
|
675
676
|
* @returns signed s3 objects
|
|
676
677
|
*/
|
|
677
|
-
async function signS3Objects(s3objects) {
|
|
678
|
+
async function signS3Objects(s3objects, { expirySecs } = {}) {
|
|
678
679
|
const signedKeys = await AppService.signS3Objects({
|
|
679
680
|
workspace: getWorkspace(),
|
|
680
|
-
requestBody: {
|
|
681
|
+
requestBody: {
|
|
682
|
+
s3_objects: s3objects.map(parseS3Object),
|
|
683
|
+
expiry_secs: expirySecs
|
|
684
|
+
}
|
|
681
685
|
});
|
|
682
686
|
return signedKeys;
|
|
683
687
|
}
|
|
684
688
|
/**
|
|
685
689
|
* Sign S3 object to be used by anonymous users in public apps
|
|
686
690
|
* @param s3object s3 object to sign
|
|
691
|
+
* @param expirySecs how long the signature stays valid, in seconds (default 43200 = 12h, clamped to [60, 604800])
|
|
687
692
|
* @returns signed s3 object
|
|
688
693
|
*/
|
|
689
|
-
async function signS3Object(s3object) {
|
|
690
|
-
const [signedObject] = await signS3Objects([s3object]);
|
|
694
|
+
async function signS3Object(s3object, { expirySecs } = {}) {
|
|
695
|
+
const [signedObject] = await signS3Objects([s3object], { expirySecs });
|
|
691
696
|
return signedObject;
|
|
692
697
|
}
|
|
693
698
|
/**
|
|
694
699
|
* Generate a presigned public URL for an array of S3 objects.
|
|
695
700
|
* If an S3 object is not signed yet, it will be signed first.
|
|
696
701
|
* @param s3Objects s3 objects to sign
|
|
702
|
+
* @param expirySecs how long the signature stays valid, in seconds (default 43200 = 12h, clamped to [60, 604800])
|
|
697
703
|
* @returns list of signed public URLs
|
|
698
704
|
*/
|
|
699
|
-
async function getPresignedS3PublicUrls(s3Objects, { baseUrl } = {}) {
|
|
705
|
+
async function getPresignedS3PublicUrls(s3Objects, { baseUrl, expirySecs } = {}) {
|
|
700
706
|
baseUrl ??= getPublicBaseUrl();
|
|
701
707
|
const s3Objs = s3Objects.map(parseS3Object);
|
|
702
708
|
const s3ObjsToSign = s3Objs.map((s3Obj, index) => [s3Obj, index]).filter(([s3Obj, _]) => s3Obj.presigned === void 0);
|
|
703
709
|
if (s3ObjsToSign.length > 0) {
|
|
704
|
-
const signedS3Objs = await signS3Objects(s3ObjsToSign.map(([s3Obj, _]) => s3Obj));
|
|
710
|
+
const signedS3Objs = await signS3Objects(s3ObjsToSign.map(([s3Obj, _]) => s3Obj), { expirySecs });
|
|
705
711
|
for (let i = 0; i < s3ObjsToSign.length; i++) {
|
|
706
712
|
const [_, originalIndex] = s3ObjsToSign[i];
|
|
707
713
|
s3Objs[originalIndex] = parseS3Object(signedS3Objs[i]);
|
|
@@ -718,10 +724,14 @@ async function getPresignedS3PublicUrls(s3Objects, { baseUrl } = {}) {
|
|
|
718
724
|
/**
|
|
719
725
|
* Generate a presigned public URL for an S3 object. If the S3 object is not signed yet, it will be signed first.
|
|
720
726
|
* @param s3Object s3 object to sign
|
|
727
|
+
* @param expirySecs how long the signature stays valid, in seconds (default 43200 = 12h, clamped to [60, 604800])
|
|
721
728
|
* @returns signed public URL
|
|
722
729
|
*/
|
|
723
|
-
async function getPresignedS3PublicUrl(s3Objects, { baseUrl } = {}) {
|
|
724
|
-
const [s3Object] = await getPresignedS3PublicUrls([s3Objects], {
|
|
730
|
+
async function getPresignedS3PublicUrl(s3Objects, { baseUrl, expirySecs } = {}) {
|
|
731
|
+
const [s3Object] = await getPresignedS3PublicUrls([s3Objects], {
|
|
732
|
+
baseUrl,
|
|
733
|
+
expirySecs
|
|
734
|
+
});
|
|
725
735
|
return s3Object;
|
|
726
736
|
}
|
|
727
737
|
/**
|
package/dist/core/OpenAPI.mjs
CHANGED
package/dist/index.js
CHANGED
|
@@ -126,7 +126,7 @@ const OpenAPI = {
|
|
|
126
126
|
PASSWORD: void 0,
|
|
127
127
|
TOKEN: getEnv$1("WM_TOKEN"),
|
|
128
128
|
USERNAME: void 0,
|
|
129
|
-
VERSION: "1.
|
|
129
|
+
VERSION: "1.797.0",
|
|
130
130
|
WITH_CREDENTIALS: !getEnv$1("WM_RAW_APP"),
|
|
131
131
|
interceptors: {
|
|
132
132
|
request: new Interceptors(),
|
|
@@ -5279,17 +5279,17 @@ var ResourceService = class {
|
|
|
5279
5279
|
* get a single resource version, with its value
|
|
5280
5280
|
* @param data The data for the request.
|
|
5281
5281
|
* @param data.workspace
|
|
5282
|
-
* @param data.version
|
|
5282
|
+
* @param data.id The version's id, not its number.
|
|
5283
5283
|
* @returns unknown resource version
|
|
5284
5284
|
* @throws ApiError
|
|
5285
5285
|
*/
|
|
5286
5286
|
static getResourceVersion(data) {
|
|
5287
5287
|
return request(OpenAPI, {
|
|
5288
5288
|
method: "GET",
|
|
5289
|
-
url: "/w/{workspace}/resources/history/v/{
|
|
5289
|
+
url: "/w/{workspace}/resources/history/v/{id}",
|
|
5290
5290
|
path: {
|
|
5291
5291
|
workspace: data.workspace,
|
|
5292
|
-
|
|
5292
|
+
id: data.id
|
|
5293
5293
|
}
|
|
5294
5294
|
});
|
|
5295
5295
|
}
|
|
@@ -5297,17 +5297,17 @@ var ResourceService = class {
|
|
|
5297
5297
|
* restore a resource to a previous version
|
|
5298
5298
|
* @param data The data for the request.
|
|
5299
5299
|
* @param data.workspace
|
|
5300
|
-
* @param data.version
|
|
5300
|
+
* @param data.id The version's id, not its number.
|
|
5301
5301
|
* @returns string resource restored
|
|
5302
5302
|
* @throws ApiError
|
|
5303
5303
|
*/
|
|
5304
5304
|
static restoreResourceVersion(data) {
|
|
5305
5305
|
return request(OpenAPI, {
|
|
5306
5306
|
method: "POST",
|
|
5307
|
-
url: "/w/{workspace}/resources/history/restore/v/{
|
|
5307
|
+
url: "/w/{workspace}/resources/history/restore/v/{id}",
|
|
5308
5308
|
path: {
|
|
5309
5309
|
workspace: data.workspace,
|
|
5310
|
-
|
|
5310
|
+
id: data.id
|
|
5311
5311
|
}
|
|
5312
5312
|
});
|
|
5313
5313
|
}
|
|
@@ -11070,6 +11070,268 @@ var FlowConversationsService = class {
|
|
|
11070
11070
|
});
|
|
11071
11071
|
}
|
|
11072
11072
|
};
|
|
11073
|
+
var AiEvalsService = class {
|
|
11074
|
+
/**
|
|
11075
|
+
* list eval datasets
|
|
11076
|
+
* @param data The data for the request.
|
|
11077
|
+
* @param data.workspace
|
|
11078
|
+
* @returns EvalDataset eval datasets list
|
|
11079
|
+
* @throws ApiError
|
|
11080
|
+
*/
|
|
11081
|
+
static listEvalDatasets(data) {
|
|
11082
|
+
return request(OpenAPI, {
|
|
11083
|
+
method: "GET",
|
|
11084
|
+
url: "/w/{workspace}/ai_evals/datasets/list",
|
|
11085
|
+
path: { workspace: data.workspace }
|
|
11086
|
+
});
|
|
11087
|
+
}
|
|
11088
|
+
/**
|
|
11089
|
+
* create an eval dataset
|
|
11090
|
+
* @param data The data for the request.
|
|
11091
|
+
* @param data.workspace
|
|
11092
|
+
* @param data.requestBody new eval dataset
|
|
11093
|
+
* @returns string eval dataset created
|
|
11094
|
+
* @throws ApiError
|
|
11095
|
+
*/
|
|
11096
|
+
static createEvalDataset(data) {
|
|
11097
|
+
return request(OpenAPI, {
|
|
11098
|
+
method: "POST",
|
|
11099
|
+
url: "/w/{workspace}/ai_evals/datasets/create",
|
|
11100
|
+
path: { workspace: data.workspace },
|
|
11101
|
+
body: data.requestBody,
|
|
11102
|
+
mediaType: "application/json"
|
|
11103
|
+
});
|
|
11104
|
+
}
|
|
11105
|
+
/**
|
|
11106
|
+
* get an eval dataset
|
|
11107
|
+
* @param data The data for the request.
|
|
11108
|
+
* @param data.workspace
|
|
11109
|
+
* @param data.path
|
|
11110
|
+
* @returns EvalDataset eval dataset
|
|
11111
|
+
* @throws ApiError
|
|
11112
|
+
*/
|
|
11113
|
+
static getEvalDataset(data) {
|
|
11114
|
+
return request(OpenAPI, {
|
|
11115
|
+
method: "GET",
|
|
11116
|
+
url: "/w/{workspace}/ai_evals/datasets/get/{path}",
|
|
11117
|
+
path: {
|
|
11118
|
+
workspace: data.workspace,
|
|
11119
|
+
path: data.path
|
|
11120
|
+
}
|
|
11121
|
+
});
|
|
11122
|
+
}
|
|
11123
|
+
/**
|
|
11124
|
+
* update an eval dataset
|
|
11125
|
+
* @param data The data for the request.
|
|
11126
|
+
* @param data.workspace
|
|
11127
|
+
* @param data.path
|
|
11128
|
+
* @param data.requestBody updated eval dataset
|
|
11129
|
+
* @returns string eval dataset updated
|
|
11130
|
+
* @throws ApiError
|
|
11131
|
+
*/
|
|
11132
|
+
static updateEvalDataset(data) {
|
|
11133
|
+
return request(OpenAPI, {
|
|
11134
|
+
method: "POST",
|
|
11135
|
+
url: "/w/{workspace}/ai_evals/datasets/update/{path}",
|
|
11136
|
+
path: {
|
|
11137
|
+
workspace: data.workspace,
|
|
11138
|
+
path: data.path
|
|
11139
|
+
},
|
|
11140
|
+
body: data.requestBody,
|
|
11141
|
+
mediaType: "application/json"
|
|
11142
|
+
});
|
|
11143
|
+
}
|
|
11144
|
+
/**
|
|
11145
|
+
* delete an eval dataset and all its cases
|
|
11146
|
+
* The cases, the runs and their recorded case sets go with it through the foreign keys; the jobs those runs produced are left alone.
|
|
11147
|
+
*
|
|
11148
|
+
* @param data The data for the request.
|
|
11149
|
+
* @param data.workspace
|
|
11150
|
+
* @param data.path
|
|
11151
|
+
* @returns string eval dataset deleted
|
|
11152
|
+
* @throws ApiError
|
|
11153
|
+
*/
|
|
11154
|
+
static deleteEvalDataset(data) {
|
|
11155
|
+
return request(OpenAPI, {
|
|
11156
|
+
method: "POST",
|
|
11157
|
+
url: "/w/{workspace}/ai_evals/datasets/delete/{path}",
|
|
11158
|
+
path: {
|
|
11159
|
+
workspace: data.workspace,
|
|
11160
|
+
path: data.path
|
|
11161
|
+
}
|
|
11162
|
+
});
|
|
11163
|
+
}
|
|
11164
|
+
/**
|
|
11165
|
+
* list the cases of an eval dataset
|
|
11166
|
+
* @param data The data for the request.
|
|
11167
|
+
* @param data.workspace
|
|
11168
|
+
* @param data.path
|
|
11169
|
+
* @param data.page which page to return (start at 1, default 1)
|
|
11170
|
+
* @param data.perPage number of items to return for a given page (default 30, max 100)
|
|
11171
|
+
* @returns unknown eval cases
|
|
11172
|
+
* @throws ApiError
|
|
11173
|
+
*/
|
|
11174
|
+
static listEvalCases(data) {
|
|
11175
|
+
return request(OpenAPI, {
|
|
11176
|
+
method: "GET",
|
|
11177
|
+
url: "/w/{workspace}/ai_evals/cases/list/{path}",
|
|
11178
|
+
path: {
|
|
11179
|
+
workspace: data.workspace,
|
|
11180
|
+
path: data.path
|
|
11181
|
+
},
|
|
11182
|
+
query: {
|
|
11183
|
+
page: data.page,
|
|
11184
|
+
per_page: data.perPage
|
|
11185
|
+
}
|
|
11186
|
+
});
|
|
11187
|
+
}
|
|
11188
|
+
/**
|
|
11189
|
+
* what the agent under test is right now
|
|
11190
|
+
* The version it is deployed at. Small on purpose: the results endpoint reports the same thing but harvests scores and reads every job to do it, so it is not something to ask for on its own.
|
|
11191
|
+
*
|
|
11192
|
+
* @param data The data for the request.
|
|
11193
|
+
* @param data.workspace
|
|
11194
|
+
* @param data.path
|
|
11195
|
+
* @returns unknown the subject as it is now
|
|
11196
|
+
* @throws ApiError
|
|
11197
|
+
*/
|
|
11198
|
+
static evalSubjectState(data) {
|
|
11199
|
+
return request(OpenAPI, {
|
|
11200
|
+
method: "GET",
|
|
11201
|
+
url: "/w/{workspace}/ai_evals/subject_state",
|
|
11202
|
+
path: { workspace: data.workspace },
|
|
11203
|
+
query: { path: data.path }
|
|
11204
|
+
});
|
|
11205
|
+
}
|
|
11206
|
+
/**
|
|
11207
|
+
* the run one iteration of an eval run answered, as its scorers read it
|
|
11208
|
+
* Called by the step a run's flow places between the agent and its scorers. Every tool call is enriched with the arguments, result, status and duration of the job that ran it, and with the schema of the script version it ran, none of which the flow itself can read.
|
|
11209
|
+
*
|
|
11210
|
+
* @param data The data for the request.
|
|
11211
|
+
* @param data.workspace
|
|
11212
|
+
* @param data.jobId The flow job that answered the case.
|
|
11213
|
+
* @returns unknown the run and its rendering
|
|
11214
|
+
* @throws ApiError
|
|
11215
|
+
*/
|
|
11216
|
+
static evalRunPayload(data) {
|
|
11217
|
+
return request(OpenAPI, {
|
|
11218
|
+
method: "GET",
|
|
11219
|
+
url: "/w/{workspace}/ai_evals/run_payload",
|
|
11220
|
+
path: { workspace: data.workspace },
|
|
11221
|
+
query: { job_id: data.jobId }
|
|
11222
|
+
});
|
|
11223
|
+
}
|
|
11224
|
+
/**
|
|
11225
|
+
* what a new judge agent and a new script scorer are created from
|
|
11226
|
+
* @param data The data for the request.
|
|
11227
|
+
* @param data.workspace
|
|
11228
|
+
* @returns unknown scorer defaults
|
|
11229
|
+
* @throws ApiError
|
|
11230
|
+
*/
|
|
11231
|
+
static scorerDefaults(data) {
|
|
11232
|
+
return request(OpenAPI, {
|
|
11233
|
+
method: "GET",
|
|
11234
|
+
url: "/w/{workspace}/ai_evals/scorer_defaults",
|
|
11235
|
+
path: { workspace: data.workspace }
|
|
11236
|
+
});
|
|
11237
|
+
}
|
|
11238
|
+
/**
|
|
11239
|
+
* list the scorers already in use in this workspace, most recent first
|
|
11240
|
+
* Filtered twice, both times by what the caller can read: the datasets they come from, and the runnables themselves. A scorer they could not run does not appear.
|
|
11241
|
+
*
|
|
11242
|
+
* @param data The data for the request.
|
|
11243
|
+
* @param data.workspace
|
|
11244
|
+
* @param data.kind only scorers of this kind
|
|
11245
|
+
* @returns unknown recently used scorers
|
|
11246
|
+
* @throws ApiError
|
|
11247
|
+
*/
|
|
11248
|
+
static recentScorers(data) {
|
|
11249
|
+
return request(OpenAPI, {
|
|
11250
|
+
method: "GET",
|
|
11251
|
+
url: "/w/{workspace}/ai_evals/scorers/recent",
|
|
11252
|
+
path: { workspace: data.workspace },
|
|
11253
|
+
query: { kind: data.kind }
|
|
11254
|
+
});
|
|
11255
|
+
}
|
|
11256
|
+
/**
|
|
11257
|
+
* run every case of a dataset as one immutable experiment
|
|
11258
|
+
* @param data The data for the request.
|
|
11259
|
+
* @param data.workspace
|
|
11260
|
+
* @param data.requestBody what to run
|
|
11261
|
+
* @returns string id of the created experiment
|
|
11262
|
+
* @throws ApiError
|
|
11263
|
+
*/
|
|
11264
|
+
static runExperiment(data) {
|
|
11265
|
+
return request(OpenAPI, {
|
|
11266
|
+
method: "POST",
|
|
11267
|
+
url: "/w/{workspace}/ai_evals/experiments/run",
|
|
11268
|
+
path: { workspace: data.workspace },
|
|
11269
|
+
body: data.requestBody,
|
|
11270
|
+
mediaType: "application/json"
|
|
11271
|
+
});
|
|
11272
|
+
}
|
|
11273
|
+
/**
|
|
11274
|
+
* record what a run produced, so it outlives the jobs that produced it
|
|
11275
|
+
* Called by a run's own flow as its last step. The answers and scores a run produced live in its jobs, which have their own retention; this copies them onto the run's rows. Reading a run does the same, so this is what covers a run nobody opened.
|
|
11276
|
+
*
|
|
11277
|
+
* @param data The data for the request.
|
|
11278
|
+
* @param data.workspace
|
|
11279
|
+
* @param data.id
|
|
11280
|
+
* @returns number how many of the run's cases are recorded
|
|
11281
|
+
* @throws ApiError
|
|
11282
|
+
*/
|
|
11283
|
+
static collectExperiment(data) {
|
|
11284
|
+
return request(OpenAPI, {
|
|
11285
|
+
method: "POST",
|
|
11286
|
+
url: "/w/{workspace}/ai_evals/experiments/collect",
|
|
11287
|
+
path: { workspace: data.workspace },
|
|
11288
|
+
query: { id: data.id }
|
|
11289
|
+
});
|
|
11290
|
+
}
|
|
11291
|
+
/**
|
|
11292
|
+
* list every experiment, across datasets
|
|
11293
|
+
* @param data The data for the request.
|
|
11294
|
+
* @param data.workspace
|
|
11295
|
+
* @param data.subjectPath Restrict to one agent's runs, which is what makes the list a history rather than a log. Runs of what is deployed, of a past version, and of the edits waiting on top are all that agent's, so this does not discriminate by kind.
|
|
11296
|
+
*
|
|
11297
|
+
* @returns EvalExperiment The 100 newest experiments, each naming the dataset it is of. Restricted to datasets the caller can read.
|
|
11298
|
+
*
|
|
11299
|
+
* @throws ApiError
|
|
11300
|
+
*/
|
|
11301
|
+
static listAllExperiments(data) {
|
|
11302
|
+
return request(OpenAPI, {
|
|
11303
|
+
method: "GET",
|
|
11304
|
+
url: "/w/{workspace}/ai_evals/experiments/list_all",
|
|
11305
|
+
path: { workspace: data.workspace },
|
|
11306
|
+
query: { subject_path: data.subjectPath }
|
|
11307
|
+
});
|
|
11308
|
+
}
|
|
11309
|
+
/**
|
|
11310
|
+
* read an experiment's results, one row per case
|
|
11311
|
+
* @param data The data for the request.
|
|
11312
|
+
* @param data.workspace
|
|
11313
|
+
* @param data.path
|
|
11314
|
+
* @param data.id the experiment to read
|
|
11315
|
+
* @param data.baseline The experiment every column is compared against. A delta is only computed between two scores of the same scorer id, and a column the baseline was never scored with reports it rather than showing a difference.
|
|
11316
|
+
*
|
|
11317
|
+
* @returns unknown experiment results
|
|
11318
|
+
* @throws ApiError
|
|
11319
|
+
*/
|
|
11320
|
+
static experimentResults(data) {
|
|
11321
|
+
return request(OpenAPI, {
|
|
11322
|
+
method: "GET",
|
|
11323
|
+
url: "/w/{workspace}/ai_evals/experiments/results/{path}",
|
|
11324
|
+
path: {
|
|
11325
|
+
workspace: data.workspace,
|
|
11326
|
+
path: data.path
|
|
11327
|
+
},
|
|
11328
|
+
query: {
|
|
11329
|
+
id: data.id,
|
|
11330
|
+
baseline: data.baseline
|
|
11331
|
+
}
|
|
11332
|
+
});
|
|
11333
|
+
}
|
|
11334
|
+
};
|
|
11073
11335
|
var PathAutocompleteService = class {
|
|
11074
11336
|
/**
|
|
11075
11337
|
* list all paths in a workspace for client-side autocomplete
|
|
@@ -11139,6 +11401,47 @@ var RawAppService = class {
|
|
|
11139
11401
|
});
|
|
11140
11402
|
}
|
|
11141
11403
|
};
|
|
11404
|
+
var AiService = class {
|
|
11405
|
+
/**
|
|
11406
|
+
* record AI token usage for the calling user
|
|
11407
|
+
* @param data The data for the request.
|
|
11408
|
+
* @param data.workspace
|
|
11409
|
+
* @param data.requestBody
|
|
11410
|
+
* @returns void usage recorded
|
|
11411
|
+
* @throws ApiError
|
|
11412
|
+
*/
|
|
11413
|
+
static recordAiUsage(data) {
|
|
11414
|
+
return request(OpenAPI, {
|
|
11415
|
+
method: "POST",
|
|
11416
|
+
url: "/w/{workspace}/ai/usage",
|
|
11417
|
+
path: { workspace: data.workspace },
|
|
11418
|
+
body: data.requestBody,
|
|
11419
|
+
mediaType: "application/json"
|
|
11420
|
+
});
|
|
11421
|
+
}
|
|
11422
|
+
/**
|
|
11423
|
+
* list aggregated AI token usage
|
|
11424
|
+
* @param data The data for the request.
|
|
11425
|
+
* @param data.workspace
|
|
11426
|
+
* @param data.days
|
|
11427
|
+
* @param data.groupBy
|
|
11428
|
+
* @param data.scope workspace-wide usage (admin only) or the calling user's own
|
|
11429
|
+
* @returns unknown usage buckets
|
|
11430
|
+
* @throws ApiError
|
|
11431
|
+
*/
|
|
11432
|
+
static listAiUsage(data) {
|
|
11433
|
+
return request(OpenAPI, {
|
|
11434
|
+
method: "GET",
|
|
11435
|
+
url: "/w/{workspace}/ai/usage",
|
|
11436
|
+
path: { workspace: data.workspace },
|
|
11437
|
+
query: {
|
|
11438
|
+
days: data.days,
|
|
11439
|
+
group_by: data.groupBy,
|
|
11440
|
+
scope: data.scope
|
|
11441
|
+
}
|
|
11442
|
+
});
|
|
11443
|
+
}
|
|
11444
|
+
};
|
|
11142
11445
|
var TriggerService = class {
|
|
11143
11446
|
/**
|
|
11144
11447
|
* resume all suspended jobs for a specific trigger
|
|
@@ -17057,6 +17360,62 @@ var HubPublishService = class {
|
|
|
17057
17360
|
});
|
|
17058
17361
|
}
|
|
17059
17362
|
/**
|
|
17363
|
+
* take a hub project submission back out of review
|
|
17364
|
+
* Requires the caller to be a workspace admin. Forwards the request to the
|
|
17365
|
+
* configured Hub scoped to the `{workspace}:{folder}` source and returns
|
|
17366
|
+
* the Hub's status code and raw response body. Everything pushed for the
|
|
17367
|
+
* submission is kept, so it can be fixed and submitted again.
|
|
17368
|
+
*
|
|
17369
|
+
* @param data The data for the request.
|
|
17370
|
+
* @param data.workspace
|
|
17371
|
+
* @param data.slug hub project slug (3-50 chars, lowercase alphanumeric and hyphens, no leading/trailing hyphen)
|
|
17372
|
+
* @param data.folder workspace folder scoping the Hub publication: a workspace can publish
|
|
17373
|
+
* one Hub project per folder and the Hub-side source key is
|
|
17374
|
+
* `{workspace}:{folder}`
|
|
17375
|
+
*
|
|
17376
|
+
* @returns string raw Hub response body (status code is passed through from the Hub)
|
|
17377
|
+
* @throws ApiError
|
|
17378
|
+
*/
|
|
17379
|
+
static withdrawHubProject(data) {
|
|
17380
|
+
return request(OpenAPI, {
|
|
17381
|
+
method: "POST",
|
|
17382
|
+
url: "/w/{workspace}/hub/projects/{slug}/withdraw",
|
|
17383
|
+
path: {
|
|
17384
|
+
workspace: data.workspace,
|
|
17385
|
+
slug: data.slug
|
|
17386
|
+
},
|
|
17387
|
+
query: { folder: data.folder }
|
|
17388
|
+
});
|
|
17389
|
+
}
|
|
17390
|
+
/**
|
|
17391
|
+
* discard the pending update to a published hub project
|
|
17392
|
+
* Requires the caller to be a workspace admin. Forwards the request to the
|
|
17393
|
+
* configured Hub scoped to the `{workspace}:{folder}` source and returns
|
|
17394
|
+
* the Hub's status code and raw response body. The published project is
|
|
17395
|
+
* left untouched.
|
|
17396
|
+
*
|
|
17397
|
+
* @param data The data for the request.
|
|
17398
|
+
* @param data.workspace
|
|
17399
|
+
* @param data.slug hub project slug (3-50 chars, lowercase alphanumeric and hyphens, no leading/trailing hyphen)
|
|
17400
|
+
* @param data.folder workspace folder scoping the Hub publication: a workspace can publish
|
|
17401
|
+
* one Hub project per folder and the Hub-side source key is
|
|
17402
|
+
* `{workspace}:{folder}`
|
|
17403
|
+
*
|
|
17404
|
+
* @returns string raw Hub response body (status code is passed through from the Hub)
|
|
17405
|
+
* @throws ApiError
|
|
17406
|
+
*/
|
|
17407
|
+
static discardHubProjectUpdate(data) {
|
|
17408
|
+
return request(OpenAPI, {
|
|
17409
|
+
method: "POST",
|
|
17410
|
+
url: "/w/{workspace}/hub/projects/{slug}/discard_update",
|
|
17411
|
+
path: {
|
|
17412
|
+
workspace: data.workspace,
|
|
17413
|
+
slug: data.slug
|
|
17414
|
+
},
|
|
17415
|
+
query: { folder: data.folder }
|
|
17416
|
+
});
|
|
17417
|
+
}
|
|
17418
|
+
/**
|
|
17060
17419
|
* get the hub project linked to a workspace folder
|
|
17061
17420
|
* Requires the caller to be a workspace admin. Forwards the request to the
|
|
17062
17421
|
* configured Hub scoped to the `{workspace}:{folder}` source and returns
|
|
@@ -18229,36 +18588,42 @@ async function deleteS3File(s3object, workspace = void 0) {
|
|
|
18229
18588
|
/**
|
|
18230
18589
|
* Sign S3 objects to be used by anonymous users in public apps
|
|
18231
18590
|
* @param s3objects s3 objects to sign
|
|
18591
|
+
* @param expirySecs how long the signature stays valid, in seconds (default 43200 = 12h, clamped to [60, 604800])
|
|
18232
18592
|
* @returns signed s3 objects
|
|
18233
18593
|
*/
|
|
18234
|
-
async function signS3Objects(s3objects) {
|
|
18594
|
+
async function signS3Objects(s3objects, { expirySecs } = {}) {
|
|
18235
18595
|
const signedKeys = await AppService.signS3Objects({
|
|
18236
18596
|
workspace: getWorkspace(),
|
|
18237
|
-
requestBody: {
|
|
18597
|
+
requestBody: {
|
|
18598
|
+
s3_objects: s3objects.map(parseS3Object),
|
|
18599
|
+
expiry_secs: expirySecs
|
|
18600
|
+
}
|
|
18238
18601
|
});
|
|
18239
18602
|
return signedKeys;
|
|
18240
18603
|
}
|
|
18241
18604
|
/**
|
|
18242
18605
|
* Sign S3 object to be used by anonymous users in public apps
|
|
18243
18606
|
* @param s3object s3 object to sign
|
|
18607
|
+
* @param expirySecs how long the signature stays valid, in seconds (default 43200 = 12h, clamped to [60, 604800])
|
|
18244
18608
|
* @returns signed s3 object
|
|
18245
18609
|
*/
|
|
18246
|
-
async function signS3Object(s3object) {
|
|
18247
|
-
const [signedObject] = await signS3Objects([s3object]);
|
|
18610
|
+
async function signS3Object(s3object, { expirySecs } = {}) {
|
|
18611
|
+
const [signedObject] = await signS3Objects([s3object], { expirySecs });
|
|
18248
18612
|
return signedObject;
|
|
18249
18613
|
}
|
|
18250
18614
|
/**
|
|
18251
18615
|
* Generate a presigned public URL for an array of S3 objects.
|
|
18252
18616
|
* If an S3 object is not signed yet, it will be signed first.
|
|
18253
18617
|
* @param s3Objects s3 objects to sign
|
|
18618
|
+
* @param expirySecs how long the signature stays valid, in seconds (default 43200 = 12h, clamped to [60, 604800])
|
|
18254
18619
|
* @returns list of signed public URLs
|
|
18255
18620
|
*/
|
|
18256
|
-
async function getPresignedS3PublicUrls(s3Objects, { baseUrl: baseUrl$1 } = {}) {
|
|
18621
|
+
async function getPresignedS3PublicUrls(s3Objects, { baseUrl: baseUrl$1, expirySecs } = {}) {
|
|
18257
18622
|
baseUrl$1 ??= getPublicBaseUrl();
|
|
18258
18623
|
const s3Objs = s3Objects.map(parseS3Object);
|
|
18259
18624
|
const s3ObjsToSign = s3Objs.map((s3Obj, index) => [s3Obj, index]).filter(([s3Obj, _]) => s3Obj.presigned === void 0);
|
|
18260
18625
|
if (s3ObjsToSign.length > 0) {
|
|
18261
|
-
const signedS3Objs = await signS3Objects(s3ObjsToSign.map(([s3Obj, _]) => s3Obj));
|
|
18626
|
+
const signedS3Objs = await signS3Objects(s3ObjsToSign.map(([s3Obj, _]) => s3Obj), { expirySecs });
|
|
18262
18627
|
for (let i = 0; i < s3ObjsToSign.length; i++) {
|
|
18263
18628
|
const [_, originalIndex] = s3ObjsToSign[i];
|
|
18264
18629
|
s3Objs[originalIndex] = parseS3Object(signedS3Objs[i]);
|
|
@@ -18275,10 +18640,14 @@ async function getPresignedS3PublicUrls(s3Objects, { baseUrl: baseUrl$1 } = {})
|
|
|
18275
18640
|
/**
|
|
18276
18641
|
* Generate a presigned public URL for an S3 object. If the S3 object is not signed yet, it will be signed first.
|
|
18277
18642
|
* @param s3Object s3 object to sign
|
|
18643
|
+
* @param expirySecs how long the signature stays valid, in seconds (default 43200 = 12h, clamped to [60, 604800])
|
|
18278
18644
|
* @returns signed public URL
|
|
18279
18645
|
*/
|
|
18280
|
-
async function getPresignedS3PublicUrl(s3Objects, { baseUrl: baseUrl$1 } = {}) {
|
|
18281
|
-
const [s3Object] = await getPresignedS3PublicUrls([s3Objects], {
|
|
18646
|
+
async function getPresignedS3PublicUrl(s3Objects, { baseUrl: baseUrl$1, expirySecs } = {}) {
|
|
18647
|
+
const [s3Object] = await getPresignedS3PublicUrls([s3Objects], {
|
|
18648
|
+
baseUrl: baseUrl$1,
|
|
18649
|
+
expirySecs
|
|
18650
|
+
});
|
|
18282
18651
|
return s3Object;
|
|
18283
18652
|
}
|
|
18284
18653
|
/**
|
|
@@ -19170,6 +19539,8 @@ var src_default = wmill;
|
|
|
19170
19539
|
//#endregion
|
|
19171
19540
|
exports.AdminService = AdminService;
|
|
19172
19541
|
exports.AgentWorkersService = AgentWorkersService;
|
|
19542
|
+
exports.AiEvalsService = AiEvalsService;
|
|
19543
|
+
exports.AiService = AiService;
|
|
19173
19544
|
exports.AmqpTriggerService = AmqpTriggerService;
|
|
19174
19545
|
exports.ApiError = ApiError;
|
|
19175
19546
|
exports.AppService = AppService;
|
package/dist/index.mjs
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { ApiError } from "./core/ApiError.mjs";
|
|
2
2
|
import { CancelError, CancelablePromise } from "./core/CancelablePromise.mjs";
|
|
3
3
|
import { OpenAPI } from "./core/OpenAPI.mjs";
|
|
4
|
-
import { AdminService, AgentWorkersService, AmqpTriggerService, AppService, AssetService, AuditService, AzureTriggerService, CaptureService, ConcurrencyGroupsService, ConfigService, DataMetricService, DbtService, DocumentationService, DraftService, EmailTriggerService, FavoriteService, FlowConversationsService, FlowService, FolderService, GcpTriggerService, GitSyncService, GranularAclService, GroupService, HealthService, HelpersService, HttpTriggerService, HubPublishService, IndexSearchService, InputService, IntegrationService, JobService, KafkaTriggerService, McpOauthService, McpService, MetricsService, MqttTriggerService, NativeTriggerService, NatsTriggerService, NpmProxyService, OauthService, OidcService, OpenapiService, PathAutocompleteService, PostgresTriggerService, RawAppService, ResourceService, ScheduleService, ScriptService, ServiceLogsService, SettingService, SettingsService, SqsTriggerService, TeamsService, TokenService, TriggerService, UserService, VariableService, VolumeService, WebsocketTriggerService, WorkerService, WorkspaceDependenciesService, WorkspaceIntegrationService, WorkspaceService } from "./services.gen.mjs";
|
|
4
|
+
import { AdminService, AgentWorkersService, AiEvalsService, AiService, AmqpTriggerService, AppService, AssetService, AuditService, AzureTriggerService, CaptureService, ConcurrencyGroupsService, ConfigService, DataMetricService, DbtService, DocumentationService, DraftService, EmailTriggerService, FavoriteService, FlowConversationsService, FlowService, FolderService, GcpTriggerService, GitSyncService, GranularAclService, GroupService, HealthService, HelpersService, HttpTriggerService, HubPublishService, IndexSearchService, InputService, IntegrationService, JobService, KafkaTriggerService, McpOauthService, McpService, MetricsService, MqttTriggerService, NativeTriggerService, NatsTriggerService, NpmProxyService, OauthService, OidcService, OpenapiService, PathAutocompleteService, PostgresTriggerService, RawAppService, ResourceService, ScheduleService, ScriptService, ServiceLogsService, SettingService, SettingsService, SqsTriggerService, TeamsService, TokenService, TriggerService, UserService, VariableService, VolumeService, WebsocketTriggerService, WorkerService, WorkspaceDependenciesService, WorkspaceIntegrationService, WorkspaceService } from "./services.gen.mjs";
|
|
5
5
|
import { parseS3Object } from "./s3Types.mjs";
|
|
6
6
|
import { appendPartition, datatable, ducklake, upsertPartition } from "./sqlUtils.mjs";
|
|
7
7
|
import { SHARED_FOLDER, StepSuspend, WorkflowCtx, _workflowCtx, appendToResultStream, base64ToUint8Array, cancelJob, commitKafkaOffsets, databaseUrlFromResource, deleteS3File, denoS3LightClientSettings, getApprovalUrls, getFlowUserState, getIdToken, getInternalState, getPresignedS3PublicUrl, getPresignedS3PublicUrls, getProgress, getResource, getResult, getResultMaybe, getResumeEndpoints, getResumeUrls, getRootJobId, getState, getStatePath, getVariable, getWorkspace, loadS3File, loadS3FileStream, parallel, requestInteractiveSlackApproval, requestInteractiveTeamsApproval, resolveDefaultResource, runFlow, runFlowAsync, runScript, runScriptAsync, runScriptByHash, runScriptByHashAsync, runScriptByPath, runScriptByPathAsync, setClient, setFlowUserState, setInternalState, setProgress, setResource, setState, setVariable, setWorkflowCtx, signS3Object, signS3Objects, sleep, step, streamResult, task, taskFlow, taskScript, uint8ArrayToBase64, usernameToEmail, waitForApproval, waitJob, workflow, writeS3File } from "./client.mjs";
|
|
@@ -95,4 +95,4 @@ const wmill = {
|
|
|
95
95
|
var src_default = wmill;
|
|
96
96
|
|
|
97
97
|
//#endregion
|
|
98
|
-
export { AdminService, AgentWorkersService, AmqpTriggerService, ApiError, AppService, AssetService, AuditService, AzureTriggerService, CancelError, CancelablePromise, CaptureService, ConcurrencyGroupsService, ConfigService, DataMetricService, DbtService, DocumentationService, DraftService, EmailTriggerService, FavoriteService, FlowConversationsService, FlowService, FolderService, GcpTriggerService, GitSyncService, GranularAclService, GroupService, HealthService, HelpersService, HttpTriggerService, HubPublishService, IndexSearchService, InputService, IntegrationService, JobService, KafkaTriggerService, McpOauthService, McpService, MetricsService, MqttTriggerService, NativeTriggerService, NatsTriggerService, NpmProxyService, OauthService, OidcService, OpenAPI, OpenapiService, PathAutocompleteService, PostgresTriggerService, RawAppService, ResourceService, ScheduleService, ScriptService, ServiceLogsService, SettingService, SettingsService, SqsTriggerService, StepSuspend, TeamsService, TokenService, TriggerService, UserService, VariableService, VolumeService, WebsocketTriggerService, WorkerService, WorkflowCtx, WorkspaceDependenciesService, WorkspaceIntegrationService, WorkspaceService, _workflowCtx, appendPartition, appendToResultStream, cancelJob, commitKafkaOffsets, datatable, src_default as default, deleteS3File, denoS3LightClientSettings, ducklake, getApprovalUrls, getFlowUserState, getIdToken, getPresignedS3PublicUrl, getPresignedS3PublicUrls, getProgress, getResource, getResumeUrls, getRootJobId, getState, getVariable, loadS3File, loadS3FileStream, parallel, requestInteractiveSlackApproval, requestInteractiveTeamsApproval, runFlow, runFlowAsync, runScript, runScriptAsync, runScriptByHash, runScriptByHashAsync, runScriptByPath, runScriptByPathAsync, setClient, setFlowUserState, setProgress, setResource, setState, setVariable, setWorkflowCtx, signS3Object, signS3Objects, sleep, step, streamResult, task, taskFlow, taskScript, upsertPartition, usernameToEmail, waitForApproval, waitJob, workflow, writeS3File };
|
|
98
|
+
export { AdminService, AgentWorkersService, AiEvalsService, AiService, AmqpTriggerService, ApiError, AppService, AssetService, AuditService, AzureTriggerService, CancelError, CancelablePromise, CaptureService, ConcurrencyGroupsService, ConfigService, DataMetricService, DbtService, DocumentationService, DraftService, EmailTriggerService, FavoriteService, FlowConversationsService, FlowService, FolderService, GcpTriggerService, GitSyncService, GranularAclService, GroupService, HealthService, HelpersService, HttpTriggerService, HubPublishService, IndexSearchService, InputService, IntegrationService, JobService, KafkaTriggerService, McpOauthService, McpService, MetricsService, MqttTriggerService, NativeTriggerService, NatsTriggerService, NpmProxyService, OauthService, OidcService, OpenAPI, OpenapiService, PathAutocompleteService, PostgresTriggerService, RawAppService, ResourceService, ScheduleService, ScriptService, ServiceLogsService, SettingService, SettingsService, SqsTriggerService, StepSuspend, TeamsService, TokenService, TriggerService, UserService, VariableService, VolumeService, WebsocketTriggerService, WorkerService, WorkflowCtx, WorkspaceDependenciesService, WorkspaceIntegrationService, WorkspaceService, _workflowCtx, appendPartition, appendToResultStream, cancelJob, commitKafkaOffsets, datatable, src_default as default, deleteS3File, denoS3LightClientSettings, ducklake, getApprovalUrls, getFlowUserState, getIdToken, getPresignedS3PublicUrl, getPresignedS3PublicUrls, getProgress, getResource, getResumeUrls, getRootJobId, getState, getVariable, loadS3File, loadS3FileStream, parallel, requestInteractiveSlackApproval, requestInteractiveTeamsApproval, runFlow, runFlowAsync, runScript, runScriptAsync, runScriptByHash, runScriptByHashAsync, runScriptByPath, runScriptByPathAsync, setClient, setFlowUserState, setProgress, setResource, setState, setVariable, setWorkflowCtx, signS3Object, signS3Objects, sleep, step, streamResult, task, taskFlow, taskScript, upsertPartition, usernameToEmail, waitForApproval, waitJob, workflow, writeS3File };
|