windmill-client 1.849.0 → 1.851.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/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.849.0",
129
+ VERSION: "1.851.0",
130
130
  WITH_CREDENTIALS: !getEnv$1("WM_RAW_APP"),
131
131
  interceptors: {
132
132
  request: new Interceptors(),
@@ -4691,7 +4691,7 @@ var SettingService = class {
4691
4691
  * Readable by any authenticated user; every page load reads it. Each value
4692
4692
  * is the raw stored setting, or null when unset.
4693
4693
  *
4694
- * @returns unknown the instance_banner, accent_color and api_base_url settings
4694
+ * @returns unknown the instance_banner, accent_color, api_base_url and api_base_url_applies_to settings
4695
4695
  * @throws ApiError
4696
4696
  */
4697
4697
  static getInstanceUi() {
@@ -12368,587 +12368,606 @@ var SlackAgentsService = class {
12368
12368
  });
12369
12369
  }
12370
12370
  };
12371
- var AiEvalsService = class {
12371
+ var AiService = class {
12372
12372
  /**
12373
- * list eval datasets
12373
+ * one text completion with the workspace's AI config
12374
+ * Sends a system and a user message to the configured provider and returns the text of the answer, with no tools and no streaming. For callers that do not speak a provider's own API through the proxy, such as the CLI and jobs.
12375
+ *
12374
12376
  * @param data The data for the request.
12375
12377
  * @param data.workspace
12376
- * @returns EvalDataset eval datasets list
12378
+ * @param data.requestBody
12379
+ * @returns unknown the answer, and the model that wrote it
12377
12380
  * @throws ApiError
12378
12381
  */
12379
- static listEvalDatasets(data) {
12382
+ static completeAi(data) {
12380
12383
  return request(OpenAPI, {
12381
- method: "GET",
12382
- url: "/w/{workspace}/ai_evals/datasets/list",
12383
- path: { workspace: data.workspace }
12384
+ method: "POST",
12385
+ url: "/w/{workspace}/ai/complete",
12386
+ path: { workspace: data.workspace },
12387
+ body: data.requestBody,
12388
+ mediaType: "application/json"
12384
12389
  });
12385
12390
  }
12386
12391
  /**
12387
- * create an eval dataset
12392
+ * record AI token usage for the calling user
12388
12393
  * @param data The data for the request.
12389
12394
  * @param data.workspace
12390
- * @param data.requestBody new eval dataset
12391
- * @returns string eval dataset created
12395
+ * @param data.requestBody
12396
+ * @returns void usage recorded
12392
12397
  * @throws ApiError
12393
12398
  */
12394
- static createEvalDataset(data) {
12399
+ static recordAiUsage(data) {
12395
12400
  return request(OpenAPI, {
12396
12401
  method: "POST",
12397
- url: "/w/{workspace}/ai_evals/datasets/create",
12402
+ url: "/w/{workspace}/ai/usage",
12398
12403
  path: { workspace: data.workspace },
12399
12404
  body: data.requestBody,
12400
12405
  mediaType: "application/json"
12401
12406
  });
12402
12407
  }
12403
12408
  /**
12404
- * get an eval dataset
12409
+ * list aggregated AI token usage
12405
12410
  * @param data The data for the request.
12406
12411
  * @param data.workspace
12407
- * @param data.path
12408
- * @returns EvalDataset eval dataset
12412
+ * @param data.days
12413
+ * @param data.groupBy
12414
+ * @param data.scope workspace-wide usage (admin only) or the calling user's own
12415
+ * @returns unknown usage buckets
12409
12416
  * @throws ApiError
12410
12417
  */
12411
- static getEvalDataset(data) {
12418
+ static listAiUsage(data) {
12412
12419
  return request(OpenAPI, {
12413
12420
  method: "GET",
12414
- url: "/w/{workspace}/ai_evals/datasets/get/{path}",
12415
- path: {
12416
- workspace: data.workspace,
12417
- path: data.path
12421
+ url: "/w/{workspace}/ai/usage",
12422
+ path: { workspace: data.workspace },
12423
+ query: {
12424
+ days: data.days,
12425
+ group_by: data.groupBy,
12426
+ scope: data.scope
12418
12427
  }
12419
12428
  });
12420
12429
  }
12421
12430
  /**
12422
- * update an eval dataset
12431
+ * list the calling user's AI session backups in the workspace object storage
12423
12432
  * @param data The data for the request.
12424
12433
  * @param data.workspace
12425
- * @param data.path
12426
- * @param data.requestBody updated eval dataset
12427
- * @returns string eval dataset updated
12434
+ * @returns unknown backups, newest first; `enabled` is false when the workspace has no storage for them
12428
12435
  * @throws ApiError
12429
12436
  */
12430
- static updateEvalDataset(data) {
12437
+ static listAiSessionBackups(data) {
12431
12438
  return request(OpenAPI, {
12432
- method: "POST",
12433
- url: "/w/{workspace}/ai_evals/datasets/update/{path}",
12434
- path: {
12435
- workspace: data.workspace,
12436
- path: data.path
12437
- },
12438
- body: data.requestBody,
12439
- mediaType: "application/json"
12439
+ method: "GET",
12440
+ url: "/w/{workspace}/ai/sessions/list",
12441
+ path: { workspace: data.workspace }
12440
12442
  });
12441
12443
  }
12442
12444
  /**
12443
- * delete an eval dataset and all its cases
12444
- * The cases, the runs and their recorded case sets go with it through the foreign keys; the jobs those runs produced are left alone.
12445
- *
12445
+ * fetch whole AI session backups
12446
12446
  * @param data The data for the request.
12447
12447
  * @param data.workspace
12448
- * @param data.path
12449
- * @returns string eval dataset deleted
12448
+ * @param data.requestBody
12449
+ * @returns unknown the backups found; `deferred` lists ids that did not fit the response budget
12450
12450
  * @throws ApiError
12451
12451
  */
12452
- static deleteEvalDataset(data) {
12452
+ static pullAiSessionBackups(data) {
12453
12453
  return request(OpenAPI, {
12454
12454
  method: "POST",
12455
- url: "/w/{workspace}/ai_evals/datasets/delete/{path}",
12456
- path: {
12457
- workspace: data.workspace,
12458
- path: data.path
12459
- }
12455
+ url: "/w/{workspace}/ai/sessions/pull",
12456
+ path: { workspace: data.workspace },
12457
+ body: data.requestBody,
12458
+ mediaType: "application/json"
12460
12459
  });
12461
12460
  }
12462
12461
  /**
12463
- * list the cases of an eval dataset
12462
+ * write changed pieces of AI sessions to their backups, and remove deleted ones
12464
12463
  * @param data The data for the request.
12465
12464
  * @param data.workspace
12466
- * @param data.path
12467
- * @param data.page which page to return (start at 1, default 1)
12468
- * @param data.perPage number of items to return for a given page (default 30, max 100)
12469
- * @returns unknown eval cases
12465
+ * @param data.requestBody
12466
+ * @returns unknown one result per session written or removed, in request order
12470
12467
  * @throws ApiError
12471
12468
  */
12472
- static listEvalCases(data) {
12469
+ static pushAiSessionBackups(data) {
12473
12470
  return request(OpenAPI, {
12474
- method: "GET",
12475
- url: "/w/{workspace}/ai_evals/cases/list/{path}",
12476
- path: {
12477
- workspace: data.workspace,
12478
- path: data.path
12479
- },
12480
- query: {
12481
- page: data.page,
12482
- per_page: data.perPage
12483
- }
12471
+ method: "POST",
12472
+ url: "/w/{workspace}/ai/sessions/push",
12473
+ path: { workspace: data.workspace },
12474
+ body: data.requestBody,
12475
+ mediaType: "application/json"
12484
12476
  });
12485
12477
  }
12486
12478
  /**
12487
- * what the agent under test is right now
12488
- * 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.
12479
+ * share an AI session artifact with the workspace
12480
+ * Stores a read-only copy that any member of the workspace can open by id. Sharing the same artifact again updates that copy, keeps its id, and restarts its retention window.
12489
12481
  *
12490
12482
  * @param data The data for the request.
12491
12483
  * @param data.workspace
12492
- * @param data.path
12493
- * @returns unknown the subject as it is now
12484
+ * @param data.requestBody
12485
+ * @returns SharedAiArtifactInfo the shared copy
12494
12486
  * @throws ApiError
12495
12487
  */
12496
- static evalSubjectState(data) {
12488
+ static shareAiArtifact(data) {
12497
12489
  return request(OpenAPI, {
12498
- method: "GET",
12499
- url: "/w/{workspace}/ai_evals/subject_state",
12490
+ method: "POST",
12491
+ url: "/w/{workspace}/ai/shared_artifacts/share",
12500
12492
  path: { workspace: data.workspace },
12501
- query: { path: data.path }
12493
+ body: data.requestBody,
12494
+ mediaType: "application/json"
12502
12495
  });
12503
12496
  }
12504
12497
  /**
12505
- * the run one iteration of an eval run answered, as its scorers read it
12506
- * 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.
12507
- *
12498
+ * get the calling user's share of one of their AI session artifacts
12508
12499
  * @param data The data for the request.
12509
12500
  * @param data.workspace
12510
- * @param data.jobId The flow job that answered the case.
12511
- * @returns unknown the run and its rendering
12501
+ * @param data.artifactId
12502
+ * @returns unknown the live share, if any, and how long shares last
12512
12503
  * @throws ApiError
12513
12504
  */
12514
- static evalRunPayload(data) {
12505
+ static getAiArtifactShareStatus(data) {
12515
12506
  return request(OpenAPI, {
12516
12507
  method: "GET",
12517
- url: "/w/{workspace}/ai_evals/run_payload",
12508
+ url: "/w/{workspace}/ai/shared_artifacts/status",
12518
12509
  path: { workspace: data.workspace },
12519
- query: { job_id: data.jobId }
12510
+ query: { artifact_id: data.artifactId }
12520
12511
  });
12521
12512
  }
12522
12513
  /**
12523
- * what a new judge agent and a new script scorer are created from
12514
+ * get a shared AI session artifact
12524
12515
  * @param data The data for the request.
12525
12516
  * @param data.workspace
12526
- * @returns unknown scorer defaults
12517
+ * @param data.id
12518
+ * @returns unknown the shared artifact
12527
12519
  * @throws ApiError
12528
12520
  */
12529
- static scorerDefaults(data) {
12521
+ static getSharedAiArtifact(data) {
12530
12522
  return request(OpenAPI, {
12531
12523
  method: "GET",
12532
- url: "/w/{workspace}/ai_evals/scorer_defaults",
12533
- path: { workspace: data.workspace }
12524
+ url: "/w/{workspace}/ai/shared_artifacts/get/{id}",
12525
+ path: {
12526
+ workspace: data.workspace,
12527
+ id: data.id
12528
+ }
12534
12529
  });
12535
12530
  }
12536
12531
  /**
12537
- * list the scorers already in use in this workspace, most recent first
12538
- * 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.
12539
- *
12532
+ * stop sharing an AI session artifact
12540
12533
  * @param data The data for the request.
12541
12534
  * @param data.workspace
12542
- * @param data.kind only scorers of this kind
12543
- * @returns unknown recently used scorers
12535
+ * @param data.id
12536
+ * @returns string share deleted
12544
12537
  * @throws ApiError
12545
12538
  */
12546
- static recentScorers(data) {
12539
+ static unshareAiArtifact(data) {
12547
12540
  return request(OpenAPI, {
12548
- method: "GET",
12549
- url: "/w/{workspace}/ai_evals/scorers/recent",
12550
- path: { workspace: data.workspace },
12551
- query: { kind: data.kind }
12541
+ method: "DELETE",
12542
+ url: "/w/{workspace}/ai/shared_artifacts/delete/{id}",
12543
+ path: {
12544
+ workspace: data.workspace,
12545
+ id: data.id
12546
+ }
12552
12547
  });
12553
12548
  }
12554
12549
  /**
12555
- * run every case of a dataset as one immutable experiment
12550
+ * share an AI session transcript by link
12551
+ * Stores a read-only snapshot of the session that members of the workspace can open by id, or anyone with the link once it is public. Sharing the same session again updates that snapshot and keeps its id.
12552
+ *
12556
12553
  * @param data The data for the request.
12557
12554
  * @param data.workspace
12558
- * @param data.requestBody what to run
12559
- * @returns string id of the created experiment
12555
+ * @param data.requestBody
12556
+ * @returns SharedAiSessionInfo the shared snapshot
12560
12557
  * @throws ApiError
12561
12558
  */
12562
- static runExperiment(data) {
12559
+ static shareAiSession(data) {
12563
12560
  return request(OpenAPI, {
12564
12561
  method: "POST",
12565
- url: "/w/{workspace}/ai_evals/experiments/run",
12562
+ url: "/w/{workspace}/ai/shared_sessions/share",
12566
12563
  path: { workspace: data.workspace },
12567
12564
  body: data.requestBody,
12568
12565
  mediaType: "application/json"
12569
12566
  });
12570
12567
  }
12571
12568
  /**
12572
- * record what a run produced, so it outlives the jobs that produced it
12573
- * 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.
12574
- *
12569
+ * get the calling user's share of one of their AI sessions
12575
12570
  * @param data The data for the request.
12576
12571
  * @param data.workspace
12577
- * @param data.id
12578
- * @returns number how many of the run's cases are recorded
12572
+ * @param data.sessionId
12573
+ * @returns unknown the share, if any
12579
12574
  * @throws ApiError
12580
12575
  */
12581
- static collectExperiment(data) {
12576
+ static getAiSessionShareStatus(data) {
12582
12577
  return request(OpenAPI, {
12583
- method: "POST",
12584
- url: "/w/{workspace}/ai_evals/experiments/collect",
12578
+ method: "GET",
12579
+ url: "/w/{workspace}/ai/shared_sessions/status",
12585
12580
  path: { workspace: data.workspace },
12586
- query: { id: data.id }
12581
+ query: { session_id: data.sessionId }
12587
12582
  });
12588
12583
  }
12589
12584
  /**
12590
- * list every experiment, across datasets
12585
+ * make a shared AI session public, or reserve it to workspace members
12591
12586
  * @param data The data for the request.
12592
12587
  * @param data.workspace
12593
- * @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.
12594
- *
12595
- * @returns EvalExperiment The 100 newest experiments, each naming the dataset it is of. Restricted to datasets the caller can read.
12596
- *
12588
+ * @param data.id
12589
+ * @param data.requestBody
12590
+ * @returns SharedAiSessionInfo the updated share
12597
12591
  * @throws ApiError
12598
12592
  */
12599
- static listAllExperiments(data) {
12593
+ static setAiSessionSharePublic(data) {
12600
12594
  return request(OpenAPI, {
12601
- method: "GET",
12602
- url: "/w/{workspace}/ai_evals/experiments/list_all",
12603
- path: { workspace: data.workspace },
12604
- query: { subject_path: data.subjectPath }
12595
+ method: "POST",
12596
+ url: "/w/{workspace}/ai/shared_sessions/set_public/{id}",
12597
+ path: {
12598
+ workspace: data.workspace,
12599
+ id: data.id
12600
+ },
12601
+ body: data.requestBody,
12602
+ mediaType: "application/json"
12605
12603
  });
12606
12604
  }
12607
12605
  /**
12608
- * read an experiment's results, one row per case
12606
+ * get a shared AI session
12607
+ * A public share is served without authentication; any other one only to a member of the workspace.
12608
+ *
12609
12609
  * @param data The data for the request.
12610
12610
  * @param data.workspace
12611
- * @param data.path
12612
- * @param data.id the experiment to read
12613
- * @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.
12614
- *
12615
- * @returns unknown experiment results
12611
+ * @param data.id
12612
+ * @returns unknown the shared session
12616
12613
  * @throws ApiError
12617
12614
  */
12618
- static experimentResults(data) {
12615
+ static getSharedAiSession(data) {
12619
12616
  return request(OpenAPI, {
12620
12617
  method: "GET",
12621
- url: "/w/{workspace}/ai_evals/experiments/results/{path}",
12618
+ url: "/w/{workspace}/ai_u/shared_sessions/get/{id}",
12622
12619
  path: {
12623
12620
  workspace: data.workspace,
12624
- path: data.path
12625
- },
12626
- query: {
12627
- id: data.id,
12628
- baseline: data.baseline
12621
+ id: data.id
12629
12622
  }
12630
12623
  });
12631
12624
  }
12632
- };
12633
- var PathAutocompleteService = class {
12634
12625
  /**
12635
- * list all paths in a workspace for client-side autocomplete
12636
- * Returns the flat list of all item paths visible to the caller across
12637
- * scripts, flows, apps, raw apps, variables, and resources. Intended to
12638
- * feed an entirely client-side path autocomplete UI: the frontend fetches
12639
- * once (server caches per caller for 60s) and performs all prefix/segment
12640
- * computation locally. Capped at 20,000 paths (5,000 per table).
12641
- *
12626
+ * stop sharing an AI session
12642
12627
  * @param data The data for the request.
12643
12628
  * @param data.workspace
12644
- * @param data.force bypass the server-side cache and re-query the DB, refreshing the
12645
- * cache. Used right after a deploy so the new path appears immediately.
12646
- *
12647
- * @returns unknown deduplicated path list, sorted lexicographically
12629
+ * @param data.id
12630
+ * @returns string share deleted
12648
12631
  * @throws ApiError
12649
12632
  */
12650
- static listPathAutocompletePaths(data) {
12633
+ static unshareAiSession(data) {
12651
12634
  return request(OpenAPI, {
12652
- method: "GET",
12653
- url: "/w/{workspace}/path_autocomplete/list_paths",
12654
- path: { workspace: data.workspace },
12655
- query: { force: data.force }
12635
+ method: "DELETE",
12636
+ url: "/w/{workspace}/ai/shared_sessions/delete/{id}",
12637
+ path: {
12638
+ workspace: data.workspace,
12639
+ id: data.id
12640
+ }
12656
12641
  });
12657
12642
  }
12658
12643
  };
12659
- var RawAppService = class {
12644
+ var AiEvalsService = class {
12660
12645
  /**
12661
- * list all raw apps
12646
+ * list eval datasets
12662
12647
  * @param data The data for the request.
12663
12648
  * @param data.workspace
12664
- * @param data.page which page to return (start at 1, default 1)
12665
- * @param data.perPage number of items to return for a given page (default 30, max 100)
12666
- * @param data.orderDesc order by desc order (default true)
12667
- * @param data.createdBy filter by exact matching user creator. Supports comma-separated list (e.g. 'alice,bob') and negation by prefixing all values with '!' (e.g. '!alice,!bob')
12668
- * @param data.pathStart mask to filter matching starting path
12669
- * @param data.pathExact mask to filter exact matching path
12670
- * @param data.starredOnly (default false)
12671
- * show only the starred items
12672
- *
12673
- * @param data.label Filter by label
12674
- * @param data.includeDraftOnly When true, append per-user draft rows whose path has no
12675
- * deployed counterpart. Synthesized rows carry `draft_only: true`
12676
- * so the home page can render a "Draft" badge. Gated to
12677
- * non-operators + page 0 + no narrowing filters on the backend so
12678
- * picker callers stay deployed-only and pagination stays clean.
12679
- *
12680
- * @returns ListableRawApp All raw apps
12649
+ * @returns EvalDataset eval datasets list
12681
12650
  * @throws ApiError
12682
12651
  */
12683
- static listRawApps(data) {
12652
+ static listEvalDatasets(data) {
12684
12653
  return request(OpenAPI, {
12685
12654
  method: "GET",
12686
- url: "/w/{workspace}/raw_apps/list",
12687
- path: { workspace: data.workspace },
12688
- query: {
12689
- page: data.page,
12690
- per_page: data.perPage,
12691
- order_desc: data.orderDesc,
12692
- created_by: data.createdBy,
12693
- path_start: data.pathStart,
12694
- path_exact: data.pathExact,
12695
- starred_only: data.starredOnly,
12696
- label: data.label,
12697
- include_draft_only: data.includeDraftOnly
12698
- }
12655
+ url: "/w/{workspace}/ai_evals/datasets/list",
12656
+ path: { workspace: data.workspace }
12699
12657
  });
12700
12658
  }
12701
- };
12702
- var AiService = class {
12703
12659
  /**
12704
- * record AI token usage for the calling user
12660
+ * create an eval dataset
12705
12661
  * @param data The data for the request.
12706
12662
  * @param data.workspace
12707
- * @param data.requestBody
12708
- * @returns void usage recorded
12663
+ * @param data.requestBody new eval dataset
12664
+ * @returns string eval dataset created
12709
12665
  * @throws ApiError
12710
12666
  */
12711
- static recordAiUsage(data) {
12667
+ static createEvalDataset(data) {
12712
12668
  return request(OpenAPI, {
12713
12669
  method: "POST",
12714
- url: "/w/{workspace}/ai/usage",
12670
+ url: "/w/{workspace}/ai_evals/datasets/create",
12715
12671
  path: { workspace: data.workspace },
12716
12672
  body: data.requestBody,
12717
12673
  mediaType: "application/json"
12718
12674
  });
12719
12675
  }
12720
12676
  /**
12721
- * list aggregated AI token usage
12677
+ * get an eval dataset
12722
12678
  * @param data The data for the request.
12723
12679
  * @param data.workspace
12724
- * @param data.days
12725
- * @param data.groupBy
12726
- * @param data.scope workspace-wide usage (admin only) or the calling user's own
12727
- * @returns unknown usage buckets
12680
+ * @param data.path
12681
+ * @returns EvalDataset eval dataset
12728
12682
  * @throws ApiError
12729
12683
  */
12730
- static listAiUsage(data) {
12684
+ static getEvalDataset(data) {
12731
12685
  return request(OpenAPI, {
12732
12686
  method: "GET",
12733
- url: "/w/{workspace}/ai/usage",
12734
- path: { workspace: data.workspace },
12735
- query: {
12736
- days: data.days,
12737
- group_by: data.groupBy,
12738
- scope: data.scope
12687
+ url: "/w/{workspace}/ai_evals/datasets/get/{path}",
12688
+ path: {
12689
+ workspace: data.workspace,
12690
+ path: data.path
12739
12691
  }
12740
12692
  });
12741
12693
  }
12742
12694
  /**
12743
- * list the calling user's AI session backups in the workspace object storage
12695
+ * update an eval dataset
12696
+ * @param data The data for the request.
12697
+ * @param data.workspace
12698
+ * @param data.path
12699
+ * @param data.requestBody updated eval dataset
12700
+ * @returns string eval dataset updated
12701
+ * @throws ApiError
12702
+ */
12703
+ static updateEvalDataset(data) {
12704
+ return request(OpenAPI, {
12705
+ method: "POST",
12706
+ url: "/w/{workspace}/ai_evals/datasets/update/{path}",
12707
+ path: {
12708
+ workspace: data.workspace,
12709
+ path: data.path
12710
+ },
12711
+ body: data.requestBody,
12712
+ mediaType: "application/json"
12713
+ });
12714
+ }
12715
+ /**
12716
+ * delete an eval dataset and all its cases
12717
+ * The cases, the runs and their recorded case sets go with it through the foreign keys; the jobs those runs produced are left alone.
12718
+ *
12744
12719
  * @param data The data for the request.
12745
12720
  * @param data.workspace
12746
- * @returns unknown backups, newest first; `enabled` is false when the workspace has no storage for them
12721
+ * @param data.path
12722
+ * @returns string eval dataset deleted
12747
12723
  * @throws ApiError
12748
12724
  */
12749
- static listAiSessionBackups(data) {
12725
+ static deleteEvalDataset(data) {
12750
12726
  return request(OpenAPI, {
12751
- method: "GET",
12752
- url: "/w/{workspace}/ai/sessions/list",
12753
- path: { workspace: data.workspace }
12727
+ method: "POST",
12728
+ url: "/w/{workspace}/ai_evals/datasets/delete/{path}",
12729
+ path: {
12730
+ workspace: data.workspace,
12731
+ path: data.path
12732
+ }
12754
12733
  });
12755
12734
  }
12756
12735
  /**
12757
- * fetch whole AI session backups
12736
+ * list the cases of an eval dataset
12758
12737
  * @param data The data for the request.
12759
12738
  * @param data.workspace
12760
- * @param data.requestBody
12761
- * @returns unknown the backups found; `deferred` lists ids that did not fit the response budget
12739
+ * @param data.path
12740
+ * @param data.page which page to return (start at 1, default 1)
12741
+ * @param data.perPage number of items to return for a given page (default 30, max 100)
12742
+ * @returns unknown eval cases
12762
12743
  * @throws ApiError
12763
12744
  */
12764
- static pullAiSessionBackups(data) {
12745
+ static listEvalCases(data) {
12765
12746
  return request(OpenAPI, {
12766
- method: "POST",
12767
- url: "/w/{workspace}/ai/sessions/pull",
12768
- path: { workspace: data.workspace },
12769
- body: data.requestBody,
12770
- mediaType: "application/json"
12747
+ method: "GET",
12748
+ url: "/w/{workspace}/ai_evals/cases/list/{path}",
12749
+ path: {
12750
+ workspace: data.workspace,
12751
+ path: data.path
12752
+ },
12753
+ query: {
12754
+ page: data.page,
12755
+ per_page: data.perPage
12756
+ }
12771
12757
  });
12772
12758
  }
12773
12759
  /**
12774
- * write changed pieces of AI sessions to their backups, and remove deleted ones
12760
+ * what the agent under test is right now
12761
+ * 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.
12762
+ *
12775
12763
  * @param data The data for the request.
12776
12764
  * @param data.workspace
12777
- * @param data.requestBody
12778
- * @returns unknown one result per session written or removed, in request order
12765
+ * @param data.path
12766
+ * @returns unknown the subject as it is now
12779
12767
  * @throws ApiError
12780
12768
  */
12781
- static pushAiSessionBackups(data) {
12769
+ static evalSubjectState(data) {
12782
12770
  return request(OpenAPI, {
12783
- method: "POST",
12784
- url: "/w/{workspace}/ai/sessions/push",
12771
+ method: "GET",
12772
+ url: "/w/{workspace}/ai_evals/subject_state",
12785
12773
  path: { workspace: data.workspace },
12786
- body: data.requestBody,
12787
- mediaType: "application/json"
12774
+ query: { path: data.path }
12788
12775
  });
12789
12776
  }
12790
12777
  /**
12791
- * share an AI session artifact with the workspace
12792
- * Stores a read-only copy that any member of the workspace can open by id. Sharing the same artifact again updates that copy, keeps its id, and restarts its retention window.
12778
+ * the run one iteration of an eval run answered, as its scorers read it
12779
+ * 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.
12793
12780
  *
12794
12781
  * @param data The data for the request.
12795
12782
  * @param data.workspace
12796
- * @param data.requestBody
12797
- * @returns SharedAiArtifactInfo the shared copy
12783
+ * @param data.jobId The flow job that answered the case.
12784
+ * @returns unknown the run and its rendering
12798
12785
  * @throws ApiError
12799
12786
  */
12800
- static shareAiArtifact(data) {
12787
+ static evalRunPayload(data) {
12801
12788
  return request(OpenAPI, {
12802
- method: "POST",
12803
- url: "/w/{workspace}/ai/shared_artifacts/share",
12789
+ method: "GET",
12790
+ url: "/w/{workspace}/ai_evals/run_payload",
12804
12791
  path: { workspace: data.workspace },
12805
- body: data.requestBody,
12806
- mediaType: "application/json"
12792
+ query: { job_id: data.jobId }
12807
12793
  });
12808
12794
  }
12809
12795
  /**
12810
- * get the calling user's share of one of their AI session artifacts
12796
+ * what a new judge agent and a new script scorer are created from
12811
12797
  * @param data The data for the request.
12812
12798
  * @param data.workspace
12813
- * @param data.artifactId
12814
- * @returns unknown the live share, if any, and how long shares last
12799
+ * @returns unknown scorer defaults
12815
12800
  * @throws ApiError
12816
12801
  */
12817
- static getAiArtifactShareStatus(data) {
12802
+ static scorerDefaults(data) {
12818
12803
  return request(OpenAPI, {
12819
12804
  method: "GET",
12820
- url: "/w/{workspace}/ai/shared_artifacts/status",
12821
- path: { workspace: data.workspace },
12822
- query: { artifact_id: data.artifactId }
12805
+ url: "/w/{workspace}/ai_evals/scorer_defaults",
12806
+ path: { workspace: data.workspace }
12823
12807
  });
12824
12808
  }
12825
12809
  /**
12826
- * get a shared AI session artifact
12810
+ * list the scorers already in use in this workspace, most recent first
12811
+ * 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.
12812
+ *
12827
12813
  * @param data The data for the request.
12828
12814
  * @param data.workspace
12829
- * @param data.id
12830
- * @returns unknown the shared artifact
12815
+ * @param data.kind only scorers of this kind
12816
+ * @returns unknown recently used scorers
12831
12817
  * @throws ApiError
12832
12818
  */
12833
- static getSharedAiArtifact(data) {
12819
+ static recentScorers(data) {
12834
12820
  return request(OpenAPI, {
12835
12821
  method: "GET",
12836
- url: "/w/{workspace}/ai/shared_artifacts/get/{id}",
12837
- path: {
12838
- workspace: data.workspace,
12839
- id: data.id
12840
- }
12822
+ url: "/w/{workspace}/ai_evals/scorers/recent",
12823
+ path: { workspace: data.workspace },
12824
+ query: { kind: data.kind }
12841
12825
  });
12842
12826
  }
12843
12827
  /**
12844
- * stop sharing an AI session artifact
12828
+ * run every case of a dataset as one immutable experiment
12845
12829
  * @param data The data for the request.
12846
12830
  * @param data.workspace
12847
- * @param data.id
12848
- * @returns string share deleted
12831
+ * @param data.requestBody what to run
12832
+ * @returns string id of the created experiment
12849
12833
  * @throws ApiError
12850
12834
  */
12851
- static unshareAiArtifact(data) {
12835
+ static runExperiment(data) {
12852
12836
  return request(OpenAPI, {
12853
- method: "DELETE",
12854
- url: "/w/{workspace}/ai/shared_artifacts/delete/{id}",
12855
- path: {
12856
- workspace: data.workspace,
12857
- id: data.id
12858
- }
12837
+ method: "POST",
12838
+ url: "/w/{workspace}/ai_evals/experiments/run",
12839
+ path: { workspace: data.workspace },
12840
+ body: data.requestBody,
12841
+ mediaType: "application/json"
12859
12842
  });
12860
12843
  }
12861
12844
  /**
12862
- * share an AI session transcript by link
12863
- * Stores a read-only snapshot of the session that members of the workspace can open by id, or anyone with the link once it is public. Sharing the same session again updates that snapshot and keeps its id.
12845
+ * record what a run produced, so it outlives the jobs that produced it
12846
+ * 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.
12864
12847
  *
12865
12848
  * @param data The data for the request.
12866
12849
  * @param data.workspace
12867
- * @param data.requestBody
12868
- * @returns SharedAiSessionInfo the shared snapshot
12850
+ * @param data.id
12851
+ * @returns number how many of the run's cases are recorded
12869
12852
  * @throws ApiError
12870
12853
  */
12871
- static shareAiSession(data) {
12854
+ static collectExperiment(data) {
12872
12855
  return request(OpenAPI, {
12873
12856
  method: "POST",
12874
- url: "/w/{workspace}/ai/shared_sessions/share",
12857
+ url: "/w/{workspace}/ai_evals/experiments/collect",
12875
12858
  path: { workspace: data.workspace },
12876
- body: data.requestBody,
12877
- mediaType: "application/json"
12859
+ query: { id: data.id }
12878
12860
  });
12879
12861
  }
12880
12862
  /**
12881
- * get the calling user's share of one of their AI sessions
12863
+ * list every experiment, across datasets
12882
12864
  * @param data The data for the request.
12883
12865
  * @param data.workspace
12884
- * @param data.sessionId
12885
- * @returns unknown the share, if any
12866
+ * @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.
12867
+ *
12868
+ * @returns EvalExperiment The 100 newest experiments, each naming the dataset it is of. Restricted to datasets the caller can read.
12869
+ *
12886
12870
  * @throws ApiError
12887
12871
  */
12888
- static getAiSessionShareStatus(data) {
12872
+ static listAllExperiments(data) {
12889
12873
  return request(OpenAPI, {
12890
12874
  method: "GET",
12891
- url: "/w/{workspace}/ai/shared_sessions/status",
12875
+ url: "/w/{workspace}/ai_evals/experiments/list_all",
12892
12876
  path: { workspace: data.workspace },
12893
- query: { session_id: data.sessionId }
12877
+ query: { subject_path: data.subjectPath }
12894
12878
  });
12895
12879
  }
12896
12880
  /**
12897
- * make a shared AI session public, or reserve it to workspace members
12881
+ * read an experiment's results, one row per case
12898
12882
  * @param data The data for the request.
12899
12883
  * @param data.workspace
12900
- * @param data.id
12901
- * @param data.requestBody
12902
- * @returns SharedAiSessionInfo the updated share
12884
+ * @param data.path
12885
+ * @param data.id the experiment to read
12886
+ * @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.
12887
+ *
12888
+ * @returns unknown experiment results
12903
12889
  * @throws ApiError
12904
12890
  */
12905
- static setAiSessionSharePublic(data) {
12891
+ static experimentResults(data) {
12906
12892
  return request(OpenAPI, {
12907
- method: "POST",
12908
- url: "/w/{workspace}/ai/shared_sessions/set_public/{id}",
12893
+ method: "GET",
12894
+ url: "/w/{workspace}/ai_evals/experiments/results/{path}",
12909
12895
  path: {
12910
12896
  workspace: data.workspace,
12911
- id: data.id
12897
+ path: data.path
12912
12898
  },
12913
- body: data.requestBody,
12914
- mediaType: "application/json"
12899
+ query: {
12900
+ id: data.id,
12901
+ baseline: data.baseline
12902
+ }
12915
12903
  });
12916
12904
  }
12905
+ };
12906
+ var PathAutocompleteService = class {
12917
12907
  /**
12918
- * get a shared AI session
12919
- * A public share is served without authentication; any other one only to a member of the workspace.
12908
+ * list all paths in a workspace for client-side autocomplete
12909
+ * Returns the flat list of all item paths visible to the caller across
12910
+ * scripts, flows, apps, raw apps, variables, and resources. Intended to
12911
+ * feed an entirely client-side path autocomplete UI: the frontend fetches
12912
+ * once (server caches per caller for 60s) and performs all prefix/segment
12913
+ * computation locally. Capped at 20,000 paths (5,000 per table).
12920
12914
  *
12921
12915
  * @param data The data for the request.
12922
12916
  * @param data.workspace
12923
- * @param data.id
12924
- * @returns unknown the shared session
12917
+ * @param data.force bypass the server-side cache and re-query the DB, refreshing the
12918
+ * cache. Used right after a deploy so the new path appears immediately.
12919
+ *
12920
+ * @returns unknown deduplicated path list, sorted lexicographically
12925
12921
  * @throws ApiError
12926
12922
  */
12927
- static getSharedAiSession(data) {
12923
+ static listPathAutocompletePaths(data) {
12928
12924
  return request(OpenAPI, {
12929
12925
  method: "GET",
12930
- url: "/w/{workspace}/ai_u/shared_sessions/get/{id}",
12931
- path: {
12932
- workspace: data.workspace,
12933
- id: data.id
12934
- }
12926
+ url: "/w/{workspace}/path_autocomplete/list_paths",
12927
+ path: { workspace: data.workspace },
12928
+ query: { force: data.force }
12935
12929
  });
12936
12930
  }
12931
+ };
12932
+ var RawAppService = class {
12937
12933
  /**
12938
- * stop sharing an AI session
12934
+ * list all raw apps
12939
12935
  * @param data The data for the request.
12940
12936
  * @param data.workspace
12941
- * @param data.id
12942
- * @returns string share deleted
12937
+ * @param data.page which page to return (start at 1, default 1)
12938
+ * @param data.perPage number of items to return for a given page (default 30, max 100)
12939
+ * @param data.orderDesc order by desc order (default true)
12940
+ * @param data.createdBy filter by exact matching user creator. Supports comma-separated list (e.g. 'alice,bob') and negation by prefixing all values with '!' (e.g. '!alice,!bob')
12941
+ * @param data.pathStart mask to filter matching starting path
12942
+ * @param data.pathExact mask to filter exact matching path
12943
+ * @param data.starredOnly (default false)
12944
+ * show only the starred items
12945
+ *
12946
+ * @param data.label Filter by label
12947
+ * @param data.includeDraftOnly When true, append per-user draft rows whose path has no
12948
+ * deployed counterpart. Synthesized rows carry `draft_only: true`
12949
+ * so the home page can render a "Draft" badge. Gated to
12950
+ * non-operators + page 0 + no narrowing filters on the backend so
12951
+ * picker callers stay deployed-only and pagination stays clean.
12952
+ *
12953
+ * @returns ListableRawApp All raw apps
12943
12954
  * @throws ApiError
12944
12955
  */
12945
- static unshareAiSession(data) {
12956
+ static listRawApps(data) {
12946
12957
  return request(OpenAPI, {
12947
- method: "DELETE",
12948
- url: "/w/{workspace}/ai/shared_sessions/delete/{id}",
12949
- path: {
12950
- workspace: data.workspace,
12951
- id: data.id
12958
+ method: "GET",
12959
+ url: "/w/{workspace}/raw_apps/list",
12960
+ path: { workspace: data.workspace },
12961
+ query: {
12962
+ page: data.page,
12963
+ per_page: data.perPage,
12964
+ order_desc: data.orderDesc,
12965
+ created_by: data.createdBy,
12966
+ path_start: data.pathStart,
12967
+ path_exact: data.pathExact,
12968
+ starred_only: data.starredOnly,
12969
+ label: data.label,
12970
+ include_draft_only: data.includeDraftOnly
12952
12971
  }
12953
12972
  });
12954
12973
  }
@@ -18954,6 +18973,7 @@ var HubPublishService = class {
18954
18973
  * @param data.workspace
18955
18974
  * @param data.slug hub project slug (3-50 chars, lowercase alphanumeric and hyphens, no leading/trailing hyphen)
18956
18975
  * @param data.folder folder scoping the Hub project source (`{workspace}:{folder}`)
18976
+ * @param data.version id of a reviewed project version to export instead of the current one (see the hub's `/projects/{slug}/versions`)
18957
18977
  * @returns string raw Hub response body (status code is passed through from the Hub)
18958
18978
  * @throws ApiError
18959
18979
  */
@@ -18965,7 +18985,10 @@ var HubPublishService = class {
18965
18985
  workspace: data.workspace,
18966
18986
  slug: data.slug
18967
18987
  },
18968
- query: { folder: data.folder }
18988
+ query: {
18989
+ folder: data.folder,
18990
+ version: data.version
18991
+ }
18969
18992
  });
18970
18993
  }
18971
18994
  /**