langwatch 1.7.0 → 1.9.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 (43) hide show
  1. package/dist/{chunk-SYJIEBJY.mjs → chunk-2HA4SJSD.mjs} +2 -2
  2. package/dist/{chunk-K6KPNTQO.js → chunk-4ERRCKOH.js} +197 -197
  3. package/dist/{chunk-K6KPNTQO.js.map → chunk-4ERRCKOH.js.map} +1 -1
  4. package/dist/{chunk-GOIVDBO3.mjs → chunk-4XQHESU7.mjs} +3 -3
  5. package/dist/{chunk-GOIVDBO3.mjs.map → chunk-4XQHESU7.mjs.map} +1 -1
  6. package/dist/{chunk-LTDUROCE.mjs → chunk-57L2K66L.mjs} +2 -2
  7. package/dist/{chunk-ZTOXEWNX.js → chunk-73QOHSHU.js} +2 -2
  8. package/dist/{chunk-ZTOXEWNX.js.map → chunk-73QOHSHU.js.map} +1 -1
  9. package/dist/{chunk-MTOAYNSY.mjs → chunk-A52LX4C4.mjs} +3 -3
  10. package/dist/{chunk-3T7YUVMO.js → chunk-HUMHSRVP.js} +16 -16
  11. package/dist/{chunk-3T7YUVMO.js.map → chunk-HUMHSRVP.js.map} +1 -1
  12. package/dist/{chunk-CLTKABMO.js → chunk-LCG5Y2EG.js} +5 -3
  13. package/dist/chunk-LCG5Y2EG.js.map +1 -0
  14. package/dist/{chunk-3KAXFA26.js → chunk-NFFB3DWW.js} +19 -19
  15. package/dist/{chunk-3KAXFA26.js.map → chunk-NFFB3DWW.js.map} +1 -1
  16. package/dist/{chunk-CMZFFKLA.mjs → chunk-WMDQVWA6.mjs} +5 -3
  17. package/dist/{chunk-CMZFFKLA.mjs.map → chunk-WMDQVWA6.mjs.map} +1 -1
  18. package/dist/cli/bundle.js +347 -241
  19. package/dist/{implementation-j4Y9Dc12.d.ts → implementation-BvwOB77X.d.ts} +1 -1
  20. package/dist/{implementation-BRb66Lsz.d.mts → implementation-C1F0eCHp.d.mts} +1 -1
  21. package/dist/index.d.mts +24 -3
  22. package/dist/index.d.ts +24 -3
  23. package/dist/index.js +364 -233
  24. package/dist/index.js.map +1 -1
  25. package/dist/index.mjs +143 -12
  26. package/dist/index.mjs.map +1 -1
  27. package/dist/observability-sdk/index.d.mts +3 -3
  28. package/dist/observability-sdk/index.d.ts +3 -3
  29. package/dist/observability-sdk/index.js +5 -5
  30. package/dist/observability-sdk/index.mjs +4 -4
  31. package/dist/observability-sdk/instrumentation/langchain/index.d.mts +1 -1
  32. package/dist/observability-sdk/instrumentation/langchain/index.d.ts +1 -1
  33. package/dist/observability-sdk/instrumentation/langchain/index.js +18 -18
  34. package/dist/observability-sdk/instrumentation/langchain/index.mjs +2 -2
  35. package/dist/observability-sdk/setup/node/index.js +4 -4
  36. package/dist/observability-sdk/setup/node/index.mjs +3 -3
  37. package/dist/{types-BUivXEKT.d.mts → types-C3NpCWi_.d.mts} +1468 -400
  38. package/dist/{types-CUPefoJS.d.ts → types-jx13nj4M.d.ts} +1468 -400
  39. package/package.json +1 -1
  40. package/dist/chunk-CLTKABMO.js.map +0 -1
  41. /package/dist/{chunk-SYJIEBJY.mjs.map → chunk-2HA4SJSD.mjs.map} +0 -0
  42. /package/dist/{chunk-LTDUROCE.mjs.map → chunk-57L2K66L.mjs.map} +0 -0
  43. /package/dist/{chunk-MTOAYNSY.mjs.map → chunk-A52LX4C4.mjs.map} +0 -0
@@ -1194,6 +1194,30 @@ interface paths {
1194
1194
  patch: operations["patchApiV1ProjectsByProjectIdAnalyticsChartsByChartId"];
1195
1195
  trace?: never;
1196
1196
  };
1197
+ "/api/v1/projects/{projectId}/analytics/charts/{chartId}/placement": {
1198
+ parameters: {
1199
+ query?: never;
1200
+ header?: never;
1201
+ path?: never;
1202
+ cookie?: never;
1203
+ };
1204
+ get?: never;
1205
+ /**
1206
+ * Place a saved workbench chart on a dashboard
1207
+ * @description Places one saved LangWatchQL chart on a dashboard in the same project, at the grid position supplied — or, when no grid row is given, at the next row free on that dashboard, counting charts of every kind. A dashboard that is not in this project is reported as not found, exactly like a chart that is not, and nothing is written.
1208
+ */
1209
+ put: operations["putApiV1ProjectsByProjectIdAnalyticsChartsByChartIdPlacement"];
1210
+ post?: never;
1211
+ /**
1212
+ * Remove a saved workbench chart from its dashboard
1213
+ * @description Removes one saved LangWatchQL chart from whatever dashboard it is on, clearing its grid position along with the dashboard id. Idempotent: unplacing a chart that is not placed answers 204 all the same. The chart itself — its statement, parameter values and specification — is untouched.
1214
+ */
1215
+ delete: operations["deleteApiV1ProjectsByProjectIdAnalyticsChartsByChartIdPlacement"];
1216
+ options?: never;
1217
+ head?: never;
1218
+ patch?: never;
1219
+ trace?: never;
1220
+ };
1197
1221
  "/api/coding-agent/sessions/{sessionId}/events": {
1198
1222
  parameters: {
1199
1223
  query?: never;
@@ -1580,7 +1604,11 @@ interface paths {
1580
1604
  */
1581
1605
  get: operations["getApiExperiments"];
1582
1606
  put?: never;
1583
- post?: never;
1607
+ /**
1608
+ * Create an experiment and its setup
1609
+ * @description Create an evaluations experiment. Send a setup to start from, or send none and get a blank workbench with one inline dataset. The slug it answers with is what every other experiment endpoint takes.
1610
+ */
1611
+ post: operations["postApiExperiments"];
1584
1612
  delete?: never;
1585
1613
  options?: never;
1586
1614
  head?: never;
@@ -1787,6 +1815,70 @@ interface paths {
1787
1815
  patch?: never;
1788
1816
  trace?: never;
1789
1817
  };
1818
+ "/api/experiments/{slug}/workbench-state": {
1819
+ parameters: {
1820
+ query?: never;
1821
+ header?: never;
1822
+ path?: never;
1823
+ cookie?: never;
1824
+ };
1825
+ /**
1826
+ * Read an experiment's setup
1827
+ * @description The experiment's datasets, targets and evaluators, with the version to send back when you save. Ask for `fields=version` to check for changes without transferring the setup.
1828
+ */
1829
+ get: operations["getApiExperimentsBySlugWorkbenchState"];
1830
+ /**
1831
+ * Save an experiment's setup
1832
+ * @description Replace the experiment's setup. Send `expectedVersion` with the version you read and the save is refused with a 409 when someone else wrote first, instead of overwriting their work.
1833
+ */
1834
+ put: operations["putApiExperimentsBySlugWorkbenchState"];
1835
+ post?: never;
1836
+ delete?: never;
1837
+ options?: never;
1838
+ head?: never;
1839
+ patch?: never;
1840
+ trace?: never;
1841
+ };
1842
+ "/api/experiments/{slug}/versions": {
1843
+ parameters: {
1844
+ query?: never;
1845
+ header?: never;
1846
+ path?: never;
1847
+ cookie?: never;
1848
+ };
1849
+ /**
1850
+ * List an experiment's versions
1851
+ * @description Every saved version of the experiment's setup, newest first. Page through them with `limit` and `cursor`.
1852
+ */
1853
+ get: operations["getApiExperimentsBySlugVersions"];
1854
+ put?: never;
1855
+ post?: never;
1856
+ delete?: never;
1857
+ options?: never;
1858
+ head?: never;
1859
+ patch?: never;
1860
+ trace?: never;
1861
+ };
1862
+ "/api/experiments/{slug}/versions/{version}/restore": {
1863
+ parameters: {
1864
+ query?: never;
1865
+ header?: never;
1866
+ path?: never;
1867
+ cookie?: never;
1868
+ };
1869
+ get?: never;
1870
+ put?: never;
1871
+ /**
1872
+ * Restore an experiment version
1873
+ * @description Bring an old setup back by writing it forward as a new save. History is never rewritten: the version you restored from stays in the list, and the restore is one more entry after it.
1874
+ */
1875
+ post: operations["postApiExperimentsBySlugVersionsByVersionRestore"];
1876
+ delete?: never;
1877
+ options?: never;
1878
+ head?: never;
1879
+ patch?: never;
1880
+ trace?: never;
1881
+ };
1790
1882
  "/api/analytics": {
1791
1883
  parameters: {
1792
1884
  query?: never;
@@ -3407,6 +3499,23 @@ interface paths {
3407
3499
  patch?: never;
3408
3500
  trace?: never;
3409
3501
  };
3502
+ "/api/simulation-runs/batches/{batchRunId}": {
3503
+ parameters: {
3504
+ query?: never;
3505
+ header?: never;
3506
+ path?: never;
3507
+ cookie?: never;
3508
+ };
3509
+ /** @description Get the summary of a single batch run, including its completion flag */
3510
+ get: operations["getApiSimulationRunsBatchesByBatchRunId"];
3511
+ put?: never;
3512
+ post?: never;
3513
+ delete?: never;
3514
+ options?: never;
3515
+ head?: never;
3516
+ patch?: never;
3517
+ trace?: never;
3518
+ };
3410
3519
  "/api/suites": {
3411
3520
  parameters: {
3412
3521
  query?: never;
@@ -5444,6 +5553,7 @@ interface operations {
5444
5553
  start: string | number;
5445
5554
  end: string | number;
5446
5555
  };
5556
+ granularitySeconds?: 1 | 60 | 3600;
5447
5557
  };
5448
5558
  };
5449
5559
  };
@@ -5470,6 +5580,9 @@ interface operations {
5470
5580
  };
5471
5581
  truncated: boolean;
5472
5582
  followsTimeWindow: boolean;
5583
+ followsGranularity: boolean;
5584
+ granularitySeconds?: number;
5585
+ coarsenedFromSeconds?: number;
5473
5586
  diagnostics: {
5474
5587
  /** @enum {string} */
5475
5588
  code: "RESULT_TRUNCATED" | "POSSIBLE_FANOUT" | "UNBOUNDED_TIME_RANGE" | "MISSING_TIME_BUCKETS" | "INCOMPLETE_COMPARISON_PERIOD";
@@ -5739,6 +5852,11 @@ interface operations {
5739
5852
  createdAt: string;
5740
5853
  updatedAt: string;
5741
5854
  platformUrl: string;
5855
+ dashboardId: string | null;
5856
+ gridColumn: number;
5857
+ gridRow: number;
5858
+ colSpan: number;
5859
+ rowSpan: number;
5742
5860
  }[];
5743
5861
  };
5744
5862
  };
@@ -5865,6 +5983,11 @@ interface operations {
5865
5983
  createdAt: string;
5866
5984
  updatedAt: string;
5867
5985
  platformUrl: string;
5986
+ dashboardId: string | null;
5987
+ gridColumn: number;
5988
+ gridRow: number;
5989
+ colSpan: number;
5990
+ rowSpan: number;
5868
5991
  };
5869
5992
  };
5870
5993
  };
@@ -5984,6 +6107,11 @@ interface operations {
5984
6107
  createdAt: string;
5985
6108
  updatedAt: string;
5986
6109
  platformUrl: string;
6110
+ dashboardId: string | null;
6111
+ gridColumn: number;
6112
+ gridRow: number;
6113
+ colSpan: number;
6114
+ rowSpan: number;
5987
6115
  };
5988
6116
  };
5989
6117
  };
@@ -6251,6 +6379,11 @@ interface operations {
6251
6379
  createdAt: string;
6252
6380
  updatedAt: string;
6253
6381
  platformUrl: string;
6382
+ dashboardId: string | null;
6383
+ gridColumn: number;
6384
+ gridRow: number;
6385
+ colSpan: number;
6386
+ rowSpan: number;
6254
6387
  };
6255
6388
  };
6256
6389
  };
@@ -6356,78 +6489,55 @@ interface operations {
6356
6489
  };
6357
6490
  };
6358
6491
  };
6359
- getApiCodingAgentSessionsBySessionIdEvents: {
6492
+ putApiV1ProjectsByProjectIdAnalyticsChartsByChartIdPlacement: {
6360
6493
  parameters: {
6361
- query?: {
6362
- /** @description Comma-separated event kinds to include. Known kinds: model_call, compaction, rate_limit, api_error, retries_exhausted, tool_result, tool_decision, user_prompt, subagent_completed. */
6363
- kinds?: string;
6364
- /** @description Opaque keyset cursor from the previous response's nextCursor. */
6365
- cursor?: string;
6366
- limit?: number;
6367
- /** @description Epoch ms lower bound on event time; with `to`, prunes storage partitions for faster reads. */
6368
- from?: number;
6369
- /** @description Epoch ms upper bound on event time. */
6370
- to?: number;
6371
- };
6494
+ query?: never;
6372
6495
  header?: never;
6373
6496
  path: {
6374
- /** @description The agent's own session id (session.id / conversation id). */
6375
- sessionId: string;
6497
+ projectId: string;
6498
+ chartId: string;
6376
6499
  };
6377
6500
  cookie?: never;
6378
6501
  };
6379
- requestBody?: never;
6502
+ requestBody: {
6503
+ content: {
6504
+ "application/json": {
6505
+ dashboardId: string;
6506
+ gridColumn?: number;
6507
+ gridRow?: number;
6508
+ colSpan?: number;
6509
+ rowSpan?: number;
6510
+ };
6511
+ };
6512
+ };
6380
6513
  responses: {
6381
- /** @description One page of session events plus the cursor for the next page */
6514
+ /** @description The chart, now placed */
6382
6515
  200: {
6383
6516
  headers: {
6384
6517
  [name: string]: unknown;
6385
6518
  };
6386
6519
  content: {
6387
6520
  "application/json": {
6388
- events: {
6389
- sessionId: string;
6390
- timeUnixMs: number;
6391
- recordId: string;
6392
- eventKind: string;
6393
- agent: string;
6394
- sessionKeySource: string;
6395
- traceId: string;
6396
- spanId: string;
6397
- promptId: string;
6398
- querySource: string;
6399
- agentType: string;
6400
- eventSequence: number;
6401
- requestId: string;
6402
- model: string;
6403
- inputTokens: number;
6404
- outputTokens: number;
6405
- cacheReadTokens: number;
6406
- cacheCreationTokens: number;
6407
- costUsd: number;
6408
- durationMs: number;
6409
- ttftMs: number;
6410
- attempt: number;
6411
- speed: string;
6412
- stopReason: string;
6413
- preTokens: number;
6414
- postTokens: number;
6415
- compactionTrigger: string;
6416
- precomputeReuse: string;
6417
- statusCode: string;
6418
- errorType: string;
6419
- rateLimitCarrier: string;
6420
- retryDurationMs: number;
6421
- toolName: string;
6422
- success: string;
6423
- decision: string;
6424
- decisionSource: string;
6425
- toolInputBytes: number;
6426
- toolResultBytes: number;
6427
- promptChars: number;
6428
- totalTokens: number;
6429
- }[];
6430
- nextCursor: string | null;
6521
+ id: string;
6522
+ name: string;
6523
+ definition: {
6524
+ version: number;
6525
+ sql: string;
6526
+ parameters: {
6527
+ [key: string]: unknown;
6528
+ };
6529
+ vegaLiteSpec?: {
6530
+ [key: string]: unknown;
6531
+ };
6532
+ };
6533
+ createdAt: string;
6534
+ updatedAt: string;
6535
+ platformUrl: string;
6536
+ dashboardId: string | null;
6537
+ gridColumn: number;
6538
+ gridRow: number;
6539
+ colSpan: number;
6540
+ rowSpan: number;
6431
6541
  };
6432
6542
  };
6433
6543
  };
@@ -6438,8 +6548,16 @@ interface operations {
6438
6548
  };
6439
6549
  content: {
6440
6550
  "application/json": {
6441
- error: string;
6442
- message?: string;
6551
+ error: {
6552
+ type: string;
6553
+ code: string;
6554
+ message: string;
6555
+ meta?: {
6556
+ [key: string]: unknown;
6557
+ };
6558
+ trace_id?: string;
6559
+ span_id?: string;
6560
+ };
6443
6561
  };
6444
6562
  };
6445
6563
  };
@@ -6450,110 +6568,274 @@ interface operations {
6450
6568
  };
6451
6569
  content: {
6452
6570
  "application/json": {
6453
- error: string;
6454
- message?: string;
6571
+ error: {
6572
+ type: string;
6573
+ code: string;
6574
+ message: string;
6575
+ meta?: {
6576
+ [key: string]: unknown;
6577
+ };
6578
+ trace_id?: string;
6579
+ span_id?: string;
6580
+ };
6455
6581
  };
6456
6582
  };
6457
6583
  };
6458
- /** @description Unprocessable Entity */
6459
- 422: {
6584
+ /** @description Forbidden */
6585
+ 403: {
6460
6586
  headers: {
6461
6587
  [name: string]: unknown;
6462
6588
  };
6463
6589
  content: {
6464
6590
  "application/json": {
6465
- error: string;
6466
- message?: string;
6591
+ error: {
6592
+ type: string;
6593
+ code: string;
6594
+ message: string;
6595
+ meta?: {
6596
+ [key: string]: unknown;
6597
+ };
6598
+ trace_id?: string;
6599
+ span_id?: string;
6600
+ };
6467
6601
  };
6468
6602
  };
6469
6603
  };
6470
- /** @description Internal Server Error */
6471
- 500: {
6604
+ /** @description No chart with this id in this project */
6605
+ 404: {
6472
6606
  headers: {
6473
6607
  [name: string]: unknown;
6474
6608
  };
6475
6609
  content: {
6476
6610
  "application/json": {
6477
- error: string;
6478
- message?: string;
6611
+ error: {
6612
+ type: string;
6613
+ code: string;
6614
+ message: string;
6615
+ meta?: {
6616
+ [key: string]: unknown;
6617
+ };
6618
+ trace_id?: string;
6619
+ span_id?: string;
6620
+ };
6479
6621
  };
6480
6622
  };
6481
6623
  };
6482
- };
6483
- };
6484
- getApiCodingAgentPullRequestUsage: {
6485
- parameters: {
6486
- query: {
6487
- /** @description The repository as "owner/name". */
6488
- repository: string;
6489
- /** @description The pull request number. */
6490
- pullRequest: number;
6491
- host?: string;
6624
+ /** @description Internal Server Error */
6625
+ 500: {
6626
+ headers: {
6627
+ [name: string]: unknown;
6628
+ };
6629
+ content: {
6630
+ "application/json": {
6631
+ error: {
6632
+ type: string;
6633
+ code: string;
6634
+ message: string;
6635
+ meta?: {
6636
+ [key: string]: unknown;
6637
+ };
6638
+ trace_id?: string;
6639
+ span_id?: string;
6640
+ };
6641
+ };
6642
+ };
6492
6643
  };
6644
+ };
6645
+ };
6646
+ deleteApiV1ProjectsByProjectIdAnalyticsChartsByChartIdPlacement: {
6647
+ parameters: {
6648
+ query?: never;
6493
6649
  header?: never;
6494
- path?: never;
6650
+ path: {
6651
+ projectId: string;
6652
+ chartId: string;
6653
+ };
6495
6654
  cookie?: never;
6496
6655
  };
6497
6656
  requestBody?: never;
6498
6657
  responses: {
6499
- /** @description The pull request's usage rollup */
6500
- 200: {
6658
+ /** @description The chart is no longer on any dashboard */
6659
+ 204: {
6660
+ headers: {
6661
+ [name: string]: unknown;
6662
+ };
6663
+ content?: never;
6664
+ };
6665
+ /** @description Bad Request */
6666
+ 400: {
6501
6667
  headers: {
6502
6668
  [name: string]: unknown;
6503
6669
  };
6504
6670
  content: {
6505
6671
  "application/json": {
6506
- pullRequest: {
6507
- repositoryHost: string;
6508
- repositoryFullName: string;
6509
- prNumber: number;
6510
- headBranch: string;
6511
- htmlUrl: string;
6512
- state: string;
6513
- isDraft: boolean;
6514
- authorLogin: string | null;
6515
- prCreatedAtMs: number;
6516
- prClosedAtMs: number | null;
6517
- prMergedAtMs: number | null;
6672
+ error: {
6673
+ type: string;
6674
+ code: string;
6675
+ message: string;
6676
+ meta?: {
6677
+ [key: string]: unknown;
6678
+ };
6679
+ trace_id?: string;
6680
+ span_id?: string;
6518
6681
  };
6519
- rows: {
6520
- projectId: string;
6521
- projectSlug: string;
6522
- contributorLabel: string;
6523
- contributorIsProject: boolean;
6524
- agent: string;
6525
- models: string[];
6526
- sessionsCount: number;
6527
- inputTokens: number;
6528
- outputTokens: number;
6529
- cacheReadTokens: number;
6530
- cacheCreationTokens: number;
6531
- totalTokens: number;
6532
- costUsd: number | null;
6533
- billedCostUsd: number | null;
6534
- nonBilledCostUsd: number | null;
6535
- }[];
6536
- totals: {
6537
- sessionsCount: number;
6538
- inputTokens: number;
6539
- outputTokens: number;
6540
- cacheReadTokens: number;
6541
- cacheCreationTokens: number;
6542
- totalTokens: number;
6543
- costUsd: number | null;
6544
- billedCostUsd: number | null;
6545
- nonBilledCostUsd: number | null;
6682
+ };
6683
+ };
6684
+ };
6685
+ /** @description Unauthorized */
6686
+ 401: {
6687
+ headers: {
6688
+ [name: string]: unknown;
6689
+ };
6690
+ content: {
6691
+ "application/json": {
6692
+ error: {
6693
+ type: string;
6694
+ code: string;
6695
+ message: string;
6696
+ meta?: {
6697
+ [key: string]: unknown;
6698
+ };
6699
+ trace_id?: string;
6700
+ span_id?: string;
6546
6701
  };
6547
- modelBreakdown: {
6702
+ };
6703
+ };
6704
+ };
6705
+ /** @description Forbidden */
6706
+ 403: {
6707
+ headers: {
6708
+ [name: string]: unknown;
6709
+ };
6710
+ content: {
6711
+ "application/json": {
6712
+ error: {
6713
+ type: string;
6714
+ code: string;
6715
+ message: string;
6716
+ meta?: {
6717
+ [key: string]: unknown;
6718
+ };
6719
+ trace_id?: string;
6720
+ span_id?: string;
6721
+ };
6722
+ };
6723
+ };
6724
+ };
6725
+ /** @description No chart with this id in this project */
6726
+ 404: {
6727
+ headers: {
6728
+ [name: string]: unknown;
6729
+ };
6730
+ content: {
6731
+ "application/json": {
6732
+ error: {
6733
+ type: string;
6734
+ code: string;
6735
+ message: string;
6736
+ meta?: {
6737
+ [key: string]: unknown;
6738
+ };
6739
+ trace_id?: string;
6740
+ span_id?: string;
6741
+ };
6742
+ };
6743
+ };
6744
+ };
6745
+ /** @description Internal Server Error */
6746
+ 500: {
6747
+ headers: {
6748
+ [name: string]: unknown;
6749
+ };
6750
+ content: {
6751
+ "application/json": {
6752
+ error: {
6753
+ type: string;
6754
+ code: string;
6755
+ message: string;
6756
+ meta?: {
6757
+ [key: string]: unknown;
6758
+ };
6759
+ trace_id?: string;
6760
+ span_id?: string;
6761
+ };
6762
+ };
6763
+ };
6764
+ };
6765
+ };
6766
+ };
6767
+ getApiCodingAgentSessionsBySessionIdEvents: {
6768
+ parameters: {
6769
+ query?: {
6770
+ /** @description Comma-separated event kinds to include. Known kinds: model_call, compaction, rate_limit, api_error, retries_exhausted, tool_result, tool_decision, user_prompt, subagent_completed. */
6771
+ kinds?: string;
6772
+ /** @description Opaque keyset cursor from the previous response's nextCursor. */
6773
+ cursor?: string;
6774
+ limit?: number;
6775
+ /** @description Epoch ms lower bound on event time; with `to`, prunes storage partitions for faster reads. */
6776
+ from?: number;
6777
+ /** @description Epoch ms upper bound on event time. */
6778
+ to?: number;
6779
+ };
6780
+ header?: never;
6781
+ path: {
6782
+ /** @description The agent's own session id (session.id / conversation id). */
6783
+ sessionId: string;
6784
+ };
6785
+ cookie?: never;
6786
+ };
6787
+ requestBody?: never;
6788
+ responses: {
6789
+ /** @description One page of session events plus the cursor for the next page */
6790
+ 200: {
6791
+ headers: {
6792
+ [name: string]: unknown;
6793
+ };
6794
+ content: {
6795
+ "application/json": {
6796
+ events: {
6797
+ sessionId: string;
6798
+ timeUnixMs: number;
6799
+ recordId: string;
6800
+ eventKind: string;
6801
+ agent: string;
6802
+ sessionKeySource: string;
6803
+ traceId: string;
6804
+ spanId: string;
6805
+ promptId: string;
6806
+ querySource: string;
6807
+ agentType: string;
6808
+ eventSequence: number;
6809
+ requestId: string;
6548
6810
  model: string;
6549
6811
  inputTokens: number;
6550
6812
  outputTokens: number;
6551
6813
  cacheReadTokens: number;
6552
6814
  cacheCreationTokens: number;
6815
+ costUsd: number;
6816
+ durationMs: number;
6817
+ ttftMs: number;
6818
+ attempt: number;
6819
+ speed: string;
6820
+ stopReason: string;
6821
+ preTokens: number;
6822
+ postTokens: number;
6823
+ compactionTrigger: string;
6824
+ precomputeReuse: string;
6825
+ statusCode: string;
6826
+ errorType: string;
6827
+ rateLimitCarrier: string;
6828
+ retryDurationMs: number;
6829
+ toolName: string;
6830
+ success: string;
6831
+ decision: string;
6832
+ decisionSource: string;
6833
+ toolInputBytes: number;
6834
+ toolResultBytes: number;
6835
+ promptChars: number;
6553
6836
  totalTokens: number;
6554
- costUsd: number | null;
6555
- tokensKnown: boolean;
6556
6837
  }[];
6838
+ nextCursor: string | null;
6557
6839
  };
6558
6840
  };
6559
6841
  };
@@ -6607,22 +6889,148 @@ interface operations {
6607
6889
  };
6608
6890
  };
6609
6891
  };
6610
- getApiDashboards: {
6892
+ getApiCodingAgentPullRequestUsage: {
6611
6893
  parameters: {
6612
- query?: never;
6894
+ query: {
6895
+ /** @description The repository as "owner/name". */
6896
+ repository: string;
6897
+ /** @description The pull request number. */
6898
+ pullRequest: number;
6899
+ host?: string;
6900
+ };
6613
6901
  header?: never;
6614
6902
  path?: never;
6615
6903
  cookie?: never;
6616
6904
  };
6617
6905
  requestBody?: never;
6618
- responses: never;
6619
- };
6620
- postApiDashboards: {
6621
- parameters: {
6622
- query?: never;
6623
- header?: never;
6624
- path?: never;
6625
- cookie?: never;
6906
+ responses: {
6907
+ /** @description The pull request's usage rollup */
6908
+ 200: {
6909
+ headers: {
6910
+ [name: string]: unknown;
6911
+ };
6912
+ content: {
6913
+ "application/json": {
6914
+ pullRequest: {
6915
+ repositoryHost: string;
6916
+ repositoryFullName: string;
6917
+ prNumber: number;
6918
+ headBranch: string;
6919
+ htmlUrl: string;
6920
+ state: string;
6921
+ isDraft: boolean;
6922
+ authorLogin: string | null;
6923
+ prCreatedAtMs: number;
6924
+ prClosedAtMs: number | null;
6925
+ prMergedAtMs: number | null;
6926
+ };
6927
+ rows: {
6928
+ projectId: string;
6929
+ projectSlug: string;
6930
+ contributorLabel: string;
6931
+ contributorIsProject: boolean;
6932
+ agent: string;
6933
+ models: string[];
6934
+ sessionsCount: number;
6935
+ inputTokens: number;
6936
+ outputTokens: number;
6937
+ cacheReadTokens: number;
6938
+ cacheCreationTokens: number;
6939
+ totalTokens: number;
6940
+ costUsd: number | null;
6941
+ billedCostUsd: number | null;
6942
+ nonBilledCostUsd: number | null;
6943
+ }[];
6944
+ totals: {
6945
+ sessionsCount: number;
6946
+ inputTokens: number;
6947
+ outputTokens: number;
6948
+ cacheReadTokens: number;
6949
+ cacheCreationTokens: number;
6950
+ totalTokens: number;
6951
+ costUsd: number | null;
6952
+ billedCostUsd: number | null;
6953
+ nonBilledCostUsd: number | null;
6954
+ };
6955
+ modelBreakdown: {
6956
+ model: string;
6957
+ inputTokens: number;
6958
+ outputTokens: number;
6959
+ cacheReadTokens: number;
6960
+ cacheCreationTokens: number;
6961
+ totalTokens: number;
6962
+ costUsd: number | null;
6963
+ tokensKnown: boolean;
6964
+ }[];
6965
+ };
6966
+ };
6967
+ };
6968
+ /** @description Bad Request */
6969
+ 400: {
6970
+ headers: {
6971
+ [name: string]: unknown;
6972
+ };
6973
+ content: {
6974
+ "application/json": {
6975
+ error: string;
6976
+ message?: string;
6977
+ };
6978
+ };
6979
+ };
6980
+ /** @description Unauthorized */
6981
+ 401: {
6982
+ headers: {
6983
+ [name: string]: unknown;
6984
+ };
6985
+ content: {
6986
+ "application/json": {
6987
+ error: string;
6988
+ message?: string;
6989
+ };
6990
+ };
6991
+ };
6992
+ /** @description Unprocessable Entity */
6993
+ 422: {
6994
+ headers: {
6995
+ [name: string]: unknown;
6996
+ };
6997
+ content: {
6998
+ "application/json": {
6999
+ error: string;
7000
+ message?: string;
7001
+ };
7002
+ };
7003
+ };
7004
+ /** @description Internal Server Error */
7005
+ 500: {
7006
+ headers: {
7007
+ [name: string]: unknown;
7008
+ };
7009
+ content: {
7010
+ "application/json": {
7011
+ error: string;
7012
+ message?: string;
7013
+ };
7014
+ };
7015
+ };
7016
+ };
7017
+ };
7018
+ getApiDashboards: {
7019
+ parameters: {
7020
+ query?: never;
7021
+ header?: never;
7022
+ path?: never;
7023
+ cookie?: never;
7024
+ };
7025
+ requestBody?: never;
7026
+ responses: never;
7027
+ };
7028
+ postApiDashboards: {
7029
+ parameters: {
7030
+ query?: never;
7031
+ header?: never;
7032
+ path?: never;
7033
+ cookie?: never;
6626
7034
  };
6627
7035
  requestBody: {
6628
7036
  content: {
@@ -7694,6 +8102,99 @@ interface operations {
7694
8102
  };
7695
8103
  };
7696
8104
  };
8105
+ postApiExperiments: {
8106
+ parameters: {
8107
+ query?: never;
8108
+ header?: never;
8109
+ path?: never;
8110
+ cookie?: never;
8111
+ };
8112
+ requestBody: {
8113
+ content: {
8114
+ "application/json": {
8115
+ /** @description Name for the experiment. A draft name is picked when omitted. */
8116
+ name?: string;
8117
+ /** @description Setup to start from. Omit for a blank workbench with one inline dataset. */
8118
+ state?: {
8119
+ [key: string]: unknown;
8120
+ };
8121
+ };
8122
+ };
8123
+ };
8124
+ responses: {
8125
+ /** @description Experiment created */
8126
+ 200: {
8127
+ headers: {
8128
+ [name: string]: unknown;
8129
+ };
8130
+ content: {
8131
+ "application/json": {
8132
+ /** @description Identifier of the created experiment */
8133
+ id: string;
8134
+ /** @description Slug to address the experiment by */
8135
+ slug: string;
8136
+ /** @description Version of the saved setup, starting at 1 */
8137
+ version: number;
8138
+ };
8139
+ };
8140
+ };
8141
+ /** @description The setup did not match the schema (experiment_invalid_workbench_state) or points at something that no longer exists (experiment_workbench_missing_reference) */
8142
+ 400: {
8143
+ headers: {
8144
+ [name: string]: unknown;
8145
+ };
8146
+ content: {
8147
+ "application/json": {
8148
+ /** @description Stable failure code; branch on this */
8149
+ error: string;
8150
+ message?: string;
8151
+ /** @description Who the failure is attributable to: customer, platform, provider */
8152
+ fault?: string;
8153
+ tips?: string[];
8154
+ docsUrl?: string;
8155
+ } & {
8156
+ [key: string]: unknown;
8157
+ };
8158
+ };
8159
+ };
8160
+ /** @description Unauthorized */
8161
+ 401: {
8162
+ headers: {
8163
+ [name: string]: unknown;
8164
+ };
8165
+ content: {
8166
+ "application/json": {
8167
+ error: string;
8168
+ message?: string;
8169
+ };
8170
+ };
8171
+ };
8172
+ /** @description Unprocessable Entity */
8173
+ 422: {
8174
+ headers: {
8175
+ [name: string]: unknown;
8176
+ };
8177
+ content: {
8178
+ "application/json": {
8179
+ error: string;
8180
+ message?: string;
8181
+ };
8182
+ };
8183
+ };
8184
+ /** @description Internal Server Error */
8185
+ 500: {
8186
+ headers: {
8187
+ [name: string]: unknown;
8188
+ };
8189
+ content: {
8190
+ "application/json": {
8191
+ error: string;
8192
+ message?: string;
8193
+ };
8194
+ };
8195
+ };
8196
+ };
8197
+ };
7697
8198
  getApiEvaluationsList: {
7698
8199
  parameters: {
7699
8200
  query?: never;
@@ -8485,72 +8986,566 @@ interface operations {
8485
8986
  };
8486
8987
  };
8487
8988
  };
8488
- /** @description The body is larger than 30MB. Refused before it is read, so the response is the plain sentence `Payload Too Large` rather than a JSON error */
8489
- 413: {
8989
+ /** @description The body is larger than 30MB. Refused before it is read, so the response is the plain sentence `Payload Too Large` rather than a JSON error */
8990
+ 413: {
8991
+ headers: {
8992
+ [name: string]: unknown;
8993
+ };
8994
+ content: {
8995
+ "text/plain": string;
8996
+ };
8997
+ };
8998
+ };
8999
+ };
9000
+ postApiExperimentsBySlugRun: {
9001
+ parameters: {
9002
+ query?: never;
9003
+ header?: never;
9004
+ path: {
9005
+ slug: string;
9006
+ };
9007
+ cookie?: never;
9008
+ };
9009
+ requestBody?: {
9010
+ content: {
9011
+ "application/json": {
9012
+ /** @description Rows to evaluate inline, instead of the experiment's saved dataset. Mutually exclusive with dataset_id. */
9013
+ data?: {
9014
+ [key: string]: unknown;
9015
+ }[];
9016
+ /** @description A saved dataset to evaluate, instead of the one the experiment is configured with. Mutually exclusive with data. */
9017
+ dataset_id?: string;
9018
+ /** @description Constant inputs applied to every row, overriding fields of the same name */
9019
+ parameters?: {
9020
+ [key: string]: string | number | boolean;
9021
+ };
9022
+ /** @description Run only these rows of the dataset, by zero-based index */
9023
+ row_indices?: number[];
9024
+ };
9025
+ };
9026
+ };
9027
+ responses: {
9028
+ /** @description Run started */
9029
+ 200: {
9030
+ headers: {
9031
+ [name: string]: unknown;
9032
+ };
9033
+ content: {
9034
+ "application/json": {
9035
+ /** @description Identifier to poll this run with */
9036
+ runId: string;
9037
+ /** @constant */
9038
+ status: "running";
9039
+ /** @description Number of cells this run will execute */
9040
+ total: number;
9041
+ /** @description Link to the run in the LangWatch app */
9042
+ runUrl?: string;
9043
+ };
9044
+ "text/event-stream": string;
9045
+ };
9046
+ };
9047
+ /** @description The body was not valid JSON, failed input validation, or the experiment has no dataset configured */
9048
+ 400: {
9049
+ headers: {
9050
+ [name: string]: unknown;
9051
+ };
9052
+ content: {
9053
+ "application/json": {
9054
+ error: string;
9055
+ };
9056
+ };
9057
+ };
9058
+ /** @description Missing or invalid API key, or the key lacks the permission */
9059
+ 401: {
9060
+ headers: {
9061
+ [name: string]: unknown;
9062
+ };
9063
+ content: {
9064
+ "application/json": {
9065
+ /** @description Stable failure code; branch on this */
9066
+ error: string;
9067
+ message?: string;
9068
+ /** @description Who the failure is attributable to: customer, platform, provider */
9069
+ fault?: string;
9070
+ tips?: string[];
9071
+ docsUrl?: string;
9072
+ } & {
9073
+ [key: string]: unknown;
9074
+ };
9075
+ };
9076
+ };
9077
+ /** @description No such experiment or run in this project */
9078
+ 404: {
9079
+ headers: {
9080
+ [name: string]: unknown;
9081
+ };
9082
+ content: {
9083
+ "application/json": {
9084
+ /** @description Stable failure code; branch on this */
9085
+ error: string;
9086
+ message?: string;
9087
+ /** @description Who the failure is attributable to: customer, platform, provider */
9088
+ fault?: string;
9089
+ tips?: string[];
9090
+ docsUrl?: string;
9091
+ } & {
9092
+ [key: string]: unknown;
9093
+ };
9094
+ };
9095
+ };
9096
+ };
9097
+ };
9098
+ getApiExperimentsRuns: {
9099
+ parameters: {
9100
+ query: {
9101
+ /** @description Slug of the experiment whose runs you want */
9102
+ experimentSlug: string;
9103
+ /** @description 1-based page number */
9104
+ page?: number;
9105
+ /** @description Runs per page, capped at 200 */
9106
+ pageSize?: number;
9107
+ };
9108
+ header?: never;
9109
+ path?: never;
9110
+ cookie?: never;
9111
+ };
9112
+ requestBody?: never;
9113
+ responses: {
9114
+ /** @description Runs for the experiment */
9115
+ 200: {
9116
+ headers: {
9117
+ [name: string]: unknown;
9118
+ };
9119
+ content: {
9120
+ "application/json": {
9121
+ experimentId: string;
9122
+ experimentSlug: string;
9123
+ runs: {
9124
+ experimentId: string;
9125
+ runId: string;
9126
+ workflowVersion: {
9127
+ id: string;
9128
+ version: string;
9129
+ commitMessage: string;
9130
+ author: {
9131
+ name: string | null;
9132
+ image: string | null;
9133
+ } | null;
9134
+ } | null;
9135
+ timestamps: {
9136
+ createdAt: number;
9137
+ updatedAt: number;
9138
+ finishedAt?: number | null;
9139
+ stoppedAt?: number | null;
9140
+ };
9141
+ progress?: number | null;
9142
+ total?: number | null;
9143
+ summary: {
9144
+ datasetCost?: number;
9145
+ evaluationsCost?: number;
9146
+ datasetAverageCost?: number;
9147
+ datasetAverageDuration?: number;
9148
+ evaluationsAverageCost?: number;
9149
+ evaluationsAverageDuration?: number;
9150
+ evaluations: {
9151
+ [key: string]: {
9152
+ name: string;
9153
+ averageScore: number | null;
9154
+ averagePassed?: number;
9155
+ };
9156
+ };
9157
+ };
9158
+ }[];
9159
+ pagination: {
9160
+ page: number;
9161
+ pageSize: number;
9162
+ totalHits: number;
9163
+ hasMore: boolean;
9164
+ };
9165
+ };
9166
+ };
9167
+ };
9168
+ /** @description experimentSlug was not supplied */
9169
+ 400: {
9170
+ headers: {
9171
+ [name: string]: unknown;
9172
+ };
9173
+ content: {
9174
+ "application/json": {
9175
+ error: string;
9176
+ };
9177
+ };
9178
+ };
9179
+ /** @description Missing or invalid API key, or the key lacks the permission */
9180
+ 401: {
9181
+ headers: {
9182
+ [name: string]: unknown;
9183
+ };
9184
+ content: {
9185
+ "application/json": {
9186
+ /** @description Stable failure code; branch on this */
9187
+ error: string;
9188
+ message?: string;
9189
+ /** @description Who the failure is attributable to: customer, platform, provider */
9190
+ fault?: string;
9191
+ tips?: string[];
9192
+ docsUrl?: string;
9193
+ } & {
9194
+ [key: string]: unknown;
9195
+ };
9196
+ };
9197
+ };
9198
+ /** @description No such experiment or run in this project */
9199
+ 404: {
9200
+ headers: {
9201
+ [name: string]: unknown;
9202
+ };
9203
+ content: {
9204
+ "application/json": {
9205
+ /** @description Stable failure code; branch on this */
9206
+ error: string;
9207
+ message?: string;
9208
+ /** @description Who the failure is attributable to: customer, platform, provider */
9209
+ fault?: string;
9210
+ tips?: string[];
9211
+ docsUrl?: string;
9212
+ } & {
9213
+ [key: string]: unknown;
9214
+ };
9215
+ };
9216
+ };
9217
+ };
9218
+ };
9219
+ getApiExperimentsRunsByRunId: {
9220
+ parameters: {
9221
+ query?: never;
9222
+ header?: never;
9223
+ path: {
9224
+ runId: string;
9225
+ };
9226
+ cookie?: never;
9227
+ };
9228
+ requestBody?: never;
9229
+ responses: {
9230
+ /** @description Run state */
9231
+ 200: {
9232
+ headers: {
9233
+ [name: string]: unknown;
9234
+ };
9235
+ content: {
9236
+ "application/json": {
9237
+ runId: string;
9238
+ /** @enum {string} */
9239
+ status: "pending" | "running" | "completed" | "failed" | "stopped";
9240
+ /** @description Cells finished so far */
9241
+ progress: number;
9242
+ /** @description Cells in the run */
9243
+ total: number;
9244
+ /** @description Unix milliseconds */
9245
+ startedAt?: number;
9246
+ /** @description Unix milliseconds; set once the run is no longer running */
9247
+ finishedAt?: number;
9248
+ /** @description Present when completed */
9249
+ summary?: {
9250
+ runId: string;
9251
+ /** @description Cells the run set out to execute */
9252
+ totalCells: number;
9253
+ completedCells: number;
9254
+ failedCells: number;
9255
+ /** @description Wall-clock milliseconds */
9256
+ duration: number;
9257
+ /** @description Non-zero means some rows may be missing from the stored results */
9258
+ chDispatchFailures?: number;
9259
+ timestamps: {
9260
+ startedAt: number;
9261
+ finishedAt?: number;
9262
+ stoppedAt?: number;
9263
+ };
9264
+ targets?: {
9265
+ targetId: string;
9266
+ name: string;
9267
+ passed: number;
9268
+ failed: number;
9269
+ avgLatency: number;
9270
+ totalCost: number;
9271
+ }[];
9272
+ evaluators?: {
9273
+ evaluatorId: string;
9274
+ name: string;
9275
+ passed: number;
9276
+ failed: number;
9277
+ passRate: number;
9278
+ avgScore?: number;
9279
+ }[];
9280
+ totalPassed?: number;
9281
+ totalFailed?: number;
9282
+ passRate?: number;
9283
+ totalCost?: number;
9284
+ /** @description Link to the run in the LangWatch app */
9285
+ runUrl?: string;
9286
+ };
9287
+ /** @description Stable failure code, present when failed. Not display copy: render your own wording keyed on it. */
9288
+ error?: string;
9289
+ /** @description The full failure envelope, when the failure carried one */
9290
+ domainError?: {
9291
+ /** @description Stable failure code; branch on this */
9292
+ code: string;
9293
+ /** @description Deprecated alias of code, for older clients */
9294
+ kind: string;
9295
+ message?: string;
9296
+ meta?: {
9297
+ [key: string]: unknown;
9298
+ };
9299
+ httpStatus?: number;
9300
+ /** @description Who the failure is attributable to: customer, platform, provider */
9301
+ fault?: string;
9302
+ traceId?: string;
9303
+ tips?: string[];
9304
+ docsUrl?: string;
9305
+ };
9306
+ /** @description Trace id for failures that carry no code, to quote in support */
9307
+ traceId?: string;
9308
+ };
9309
+ };
9310
+ };
9311
+ /** @description Missing or invalid API key, or the key lacks the permission */
9312
+ 401: {
9313
+ headers: {
9314
+ [name: string]: unknown;
9315
+ };
9316
+ content: {
9317
+ "application/json": {
9318
+ /** @description Stable failure code; branch on this */
9319
+ error: string;
9320
+ message?: string;
9321
+ /** @description Who the failure is attributable to: customer, platform, provider */
9322
+ fault?: string;
9323
+ tips?: string[];
9324
+ docsUrl?: string;
9325
+ } & {
9326
+ [key: string]: unknown;
9327
+ };
9328
+ };
9329
+ };
9330
+ /** @description No such experiment or run in this project */
9331
+ 404: {
9332
+ headers: {
9333
+ [name: string]: unknown;
9334
+ };
9335
+ content: {
9336
+ "application/json": {
9337
+ /** @description Stable failure code; branch on this */
9338
+ error: string;
9339
+ message?: string;
9340
+ /** @description Who the failure is attributable to: customer, platform, provider */
9341
+ fault?: string;
9342
+ tips?: string[];
9343
+ docsUrl?: string;
9344
+ } & {
9345
+ [key: string]: unknown;
9346
+ };
9347
+ };
9348
+ };
9349
+ };
9350
+ };
9351
+ getApiExperimentsRunsByRunIdResults: {
9352
+ parameters: {
9353
+ query?: {
9354
+ /** @description Owning experiment. Required once the run has aged out of the status cache. */
9355
+ experimentSlug?: string;
9356
+ };
9357
+ header?: never;
9358
+ path: {
9359
+ runId: string;
9360
+ };
9361
+ cookie?: never;
9362
+ };
9363
+ requestBody?: never;
9364
+ responses: {
9365
+ /** @description Rows and evaluations for the run */
9366
+ 200: {
9367
+ headers: {
9368
+ [name: string]: unknown;
9369
+ };
9370
+ content: {
9371
+ "application/json": {
9372
+ experimentId: string;
9373
+ runId: string;
9374
+ projectId: string;
9375
+ workflowVersionId?: string | null;
9376
+ progress?: number | null;
9377
+ total?: number | null;
9378
+ /** @description Resolves the targetId each dataset row and evaluation carries */
9379
+ targets?: {
9380
+ id: string;
9381
+ name: string;
9382
+ type: string;
9383
+ promptId?: string | null;
9384
+ promptVersion?: number | null;
9385
+ agentId?: string | null;
9386
+ evaluatorId?: string | null;
9387
+ model?: string | null;
9388
+ metadata?: {
9389
+ [key: string]: string | number | boolean;
9390
+ } | null;
9391
+ }[] | null;
9392
+ /** @description One row per dataset entry, with what the target predicted */
9393
+ dataset: {
9394
+ index: number;
9395
+ targetId?: string | null;
9396
+ entry: {
9397
+ [key: string]: unknown;
9398
+ };
9399
+ predicted?: {
9400
+ [key: string]: unknown;
9401
+ };
9402
+ cost?: number | null;
9403
+ duration?: number | null;
9404
+ /** @description The engine's own string. Prefer domainError.code to branch on */
9405
+ error?: string | null;
9406
+ /** @description Set on rows written since failures started carrying codes */
9407
+ domainError?: {
9408
+ /** @description Stable failure code; branch on this */
9409
+ code: string;
9410
+ /** @description Deprecated alias of code, for older clients */
9411
+ kind: string;
9412
+ message?: string;
9413
+ meta?: {
9414
+ [key: string]: unknown;
9415
+ };
9416
+ httpStatus?: number;
9417
+ /** @description Who the failure is attributable to: customer, platform, provider */
9418
+ fault?: string;
9419
+ traceId?: string;
9420
+ tips?: string[];
9421
+ docsUrl?: string;
9422
+ };
9423
+ traceId?: string | null;
9424
+ }[];
9425
+ /** @description One row per evaluator per dataset entry */
9426
+ evaluations: {
9427
+ evaluator: string;
9428
+ name?: string | null;
9429
+ targetId?: string | null;
9430
+ /** @enum {string} */
9431
+ status: "processed" | "skipped" | "error";
9432
+ index: number;
9433
+ score?: number | null;
9434
+ label?: string | null;
9435
+ passed?: boolean | null;
9436
+ details?: string | null;
9437
+ cost?: number | null;
9438
+ duration?: number | null;
9439
+ inputs?: {
9440
+ [key: string]: unknown;
9441
+ } | null;
9442
+ }[];
9443
+ timestamps: {
9444
+ createdAt: number;
9445
+ updatedAt: number;
9446
+ finishedAt?: number | null;
9447
+ stoppedAt?: number | null;
9448
+ };
9449
+ };
9450
+ };
9451
+ };
9452
+ /** @description Missing or invalid API key, or the key lacks the permission */
9453
+ 401: {
9454
+ headers: {
9455
+ [name: string]: unknown;
9456
+ };
9457
+ content: {
9458
+ "application/json": {
9459
+ /** @description Stable failure code; branch on this */
9460
+ error: string;
9461
+ message?: string;
9462
+ /** @description Who the failure is attributable to: customer, platform, provider */
9463
+ fault?: string;
9464
+ tips?: string[];
9465
+ docsUrl?: string;
9466
+ } & {
9467
+ [key: string]: unknown;
9468
+ };
9469
+ };
9470
+ };
9471
+ /** @description No such experiment or run in this project */
9472
+ 404: {
8490
9473
  headers: {
8491
9474
  [name: string]: unknown;
8492
9475
  };
8493
9476
  content: {
8494
- "text/plain": string;
9477
+ "application/json": {
9478
+ /** @description Stable failure code; branch on this */
9479
+ error: string;
9480
+ message?: string;
9481
+ /** @description Who the failure is attributable to: customer, platform, provider */
9482
+ fault?: string;
9483
+ tips?: string[];
9484
+ docsUrl?: string;
9485
+ } & {
9486
+ [key: string]: unknown;
9487
+ };
8495
9488
  };
8496
9489
  };
8497
9490
  };
8498
9491
  };
8499
- postApiExperimentsBySlugRun: {
9492
+ getApiExperimentsBySlugWorkbenchState: {
8500
9493
  parameters: {
8501
- query?: never;
9494
+ query?: {
9495
+ /** @description Set to `version` to answer with the version and timestamp only */
9496
+ fields?: "version";
9497
+ };
8502
9498
  header?: never;
8503
9499
  path: {
8504
9500
  slug: string;
8505
9501
  };
8506
9502
  cookie?: never;
8507
9503
  };
8508
- requestBody?: {
8509
- content: {
8510
- "application/json": {
8511
- /** @description Rows to evaluate inline, instead of the experiment's saved dataset. Mutually exclusive with dataset_id. */
8512
- data?: {
8513
- [key: string]: unknown;
8514
- }[];
8515
- /** @description A saved dataset to evaluate, instead of the one the experiment is configured with. Mutually exclusive with data. */
8516
- dataset_id?: string;
8517
- /** @description Constant inputs applied to every row, overriding fields of the same name */
8518
- parameters?: {
8519
- [key: string]: string | number | boolean;
8520
- };
8521
- /** @description Run only these rows of the dataset, by zero-based index */
8522
- row_indices?: number[];
8523
- };
8524
- };
8525
- };
9504
+ requestBody?: never;
8526
9505
  responses: {
8527
- /** @description Run started */
9506
+ /** @description The experiment's setup, or its version alone */
8528
9507
  200: {
8529
9508
  headers: {
8530
9509
  [name: string]: unknown;
8531
9510
  };
8532
9511
  content: {
8533
9512
  "application/json": {
8534
- /** @description Identifier to poll this run with */
8535
- runId: string;
8536
- /** @constant */
8537
- status: "running";
8538
- /** @description Number of cells this run will execute */
8539
- total: number;
8540
- /** @description Link to the run in the LangWatch app */
8541
- runUrl?: string;
9513
+ id: string;
9514
+ slug: string;
9515
+ name: string | null;
9516
+ /** @description The experiment setup: datasets, targets and evaluators. Read it, change it, send it back whole. */
9517
+ state: {
9518
+ [key: string]: unknown;
9519
+ } | null;
9520
+ /** @description Send this back as expectedVersion to save safely */
9521
+ version: number;
9522
+ /** @description ISO 8601 timestamp of the last save */
9523
+ updatedAt: string;
9524
+ } | {
9525
+ id: string;
9526
+ slug: string;
9527
+ version: number;
9528
+ /** @description ISO 8601 timestamp of the last save */
9529
+ updatedAt: string;
8542
9530
  };
8543
- "text/event-stream": string;
8544
9531
  };
8545
9532
  };
8546
- /** @description The body was not valid JSON, failed input validation, or the experiment has no dataset configured */
9533
+ /** @description The experiment is not an evaluations workbench (experiment_type_mismatch) */
8547
9534
  400: {
8548
9535
  headers: {
8549
9536
  [name: string]: unknown;
8550
9537
  };
8551
9538
  content: {
8552
9539
  "application/json": {
9540
+ /** @description Stable failure code; branch on this */
8553
9541
  error: string;
9542
+ message?: string;
9543
+ /** @description Who the failure is attributable to: customer, platform, provider */
9544
+ fault?: string;
9545
+ tips?: string[];
9546
+ docsUrl?: string;
9547
+ } & {
9548
+ [key: string]: unknown;
8554
9549
  };
8555
9550
  };
8556
9551
  };
@@ -8594,84 +9589,58 @@ interface operations {
8594
9589
  };
8595
9590
  };
8596
9591
  };
8597
- getApiExperimentsRuns: {
9592
+ putApiExperimentsBySlugWorkbenchState: {
8598
9593
  parameters: {
8599
- query: {
8600
- /** @description Slug of the experiment whose runs you want */
8601
- experimentSlug: string;
8602
- /** @description 1-based page number */
8603
- page?: number;
8604
- /** @description Runs per page, capped at 200 */
8605
- pageSize?: number;
8606
- };
9594
+ query?: never;
8607
9595
  header?: never;
8608
- path?: never;
9596
+ path: {
9597
+ slug: string;
9598
+ };
8609
9599
  cookie?: never;
8610
9600
  };
8611
- requestBody?: never;
9601
+ requestBody: {
9602
+ content: {
9603
+ "application/json": {
9604
+ /** @description The full setup to save */
9605
+ state: {
9606
+ [key: string]: unknown;
9607
+ };
9608
+ /** @description The version you read. Sending it refuses the save when someone else already wrote on top of it. */
9609
+ expectedVersion?: number;
9610
+ /** @description Names this version in the history list */
9611
+ commitMessage?: string;
9612
+ };
9613
+ };
9614
+ };
8612
9615
  responses: {
8613
- /** @description Runs for the experiment */
9616
+ /** @description Setup saved */
8614
9617
  200: {
8615
9618
  headers: {
8616
9619
  [name: string]: unknown;
8617
9620
  };
8618
9621
  content: {
8619
9622
  "application/json": {
8620
- experimentId: string;
8621
- experimentSlug: string;
8622
- runs: {
8623
- experimentId: string;
8624
- runId: string;
8625
- workflowVersion: {
8626
- id: string;
8627
- version: string;
8628
- commitMessage: string;
8629
- author: {
8630
- name: string | null;
8631
- image: string | null;
8632
- } | null;
8633
- } | null;
8634
- timestamps: {
8635
- createdAt: number;
8636
- updatedAt: number;
8637
- finishedAt?: number | null;
8638
- stoppedAt?: number | null;
8639
- };
8640
- progress?: number | null;
8641
- total?: number | null;
8642
- summary: {
8643
- datasetCost?: number;
8644
- evaluationsCost?: number;
8645
- datasetAverageCost?: number;
8646
- datasetAverageDuration?: number;
8647
- evaluationsAverageCost?: number;
8648
- evaluationsAverageDuration?: number;
8649
- evaluations: {
8650
- [key: string]: {
8651
- name: string;
8652
- averageScore: number | null;
8653
- averagePassed?: number;
8654
- };
8655
- };
8656
- };
8657
- }[];
8658
- pagination: {
8659
- page: number;
8660
- pageSize: number;
8661
- totalHits: number;
8662
- hasMore: boolean;
8663
- };
9623
+ /** @description The version the save produced */
9624
+ version: number;
8664
9625
  };
8665
9626
  };
8666
9627
  };
8667
- /** @description experimentSlug was not supplied */
9628
+ /** @description The setup did not match the schema (experiment_invalid_workbench_state), points at something that no longer exists (experiment_workbench_missing_reference), or the experiment is not an evaluations workbench (experiment_type_mismatch) */
8668
9629
  400: {
8669
9630
  headers: {
8670
9631
  [name: string]: unknown;
8671
9632
  };
8672
9633
  content: {
8673
9634
  "application/json": {
9635
+ /** @description Stable failure code; branch on this */
8674
9636
  error: string;
9637
+ message?: string;
9638
+ /** @description Who the failure is attributable to: customer, platform, provider */
9639
+ fault?: string;
9640
+ tips?: string[];
9641
+ docsUrl?: string;
9642
+ } & {
9643
+ [key: string]: unknown;
8675
9644
  };
8676
9645
  };
8677
9646
  };
@@ -8713,97 +9682,89 @@ interface operations {
8713
9682
  };
8714
9683
  };
8715
9684
  };
8716
- };
8717
- };
8718
- getApiExperimentsRunsByRunId: {
8719
- parameters: {
8720
- query?: never;
8721
- header?: never;
8722
- path: {
8723
- runId: string;
8724
- };
8725
- cookie?: never;
8726
- };
8727
- requestBody?: never;
8728
- responses: {
8729
- /** @description Run state */
8730
- 200: {
9685
+ /** @description Someone else saved since you read this state (experiment_stale_workbench_state). `currentVersion` carries the version to read again. */
9686
+ 409: {
8731
9687
  headers: {
8732
9688
  [name: string]: unknown;
8733
9689
  };
8734
9690
  content: {
8735
9691
  "application/json": {
8736
- runId: string;
8737
- /** @enum {string} */
8738
- status: "pending" | "running" | "completed" | "failed" | "stopped";
8739
- /** @description Cells finished so far */
8740
- progress: number;
8741
- /** @description Cells in the run */
8742
- total: number;
8743
- /** @description Unix milliseconds */
8744
- startedAt?: number;
8745
- /** @description Unix milliseconds; set once the run is no longer running */
8746
- finishedAt?: number;
8747
- /** @description Present when completed */
8748
- summary?: {
8749
- runId: string;
8750
- /** @description Cells the run set out to execute */
8751
- totalCells: number;
8752
- completedCells: number;
8753
- failedCells: number;
8754
- /** @description Wall-clock milliseconds */
8755
- duration: number;
8756
- /** @description Non-zero means some rows may be missing from the stored results */
8757
- chDispatchFailures?: number;
8758
- timestamps: {
8759
- startedAt: number;
8760
- finishedAt?: number;
8761
- stoppedAt?: number;
8762
- };
8763
- targets?: {
8764
- targetId: string;
8765
- name: string;
8766
- passed: number;
8767
- failed: number;
8768
- avgLatency: number;
8769
- totalCost: number;
8770
- }[];
8771
- evaluators?: {
8772
- evaluatorId: string;
8773
- name: string;
8774
- passed: number;
8775
- failed: number;
8776
- passRate: number;
8777
- avgScore?: number;
8778
- }[];
8779
- totalPassed?: number;
8780
- totalFailed?: number;
8781
- passRate?: number;
8782
- totalCost?: number;
8783
- /** @description Link to the run in the LangWatch app */
8784
- runUrl?: string;
8785
- };
8786
- /** @description Stable failure code, present when failed. Not display copy: render your own wording keyed on it. */
8787
- error?: string;
8788
- /** @description The full failure envelope, when the failure carried one */
8789
- domainError?: {
8790
- /** @description Stable failure code; branch on this */
8791
- code: string;
8792
- /** @description Deprecated alias of code, for older clients */
8793
- kind: string;
8794
- message?: string;
8795
- meta?: {
8796
- [key: string]: unknown;
8797
- };
8798
- httpStatus?: number;
8799
- /** @description Who the failure is attributable to: customer, platform, provider */
8800
- fault?: string;
8801
- traceId?: string;
8802
- tips?: string[];
8803
- docsUrl?: string;
8804
- };
8805
- /** @description Trace id for failures that carry no code, to quote in support */
8806
- traceId?: string;
9692
+ /** @description Stable failure code; branch on this */
9693
+ error: string;
9694
+ message?: string;
9695
+ /** @description Who the failure is attributable to: customer, platform, provider */
9696
+ fault?: string;
9697
+ tips?: string[];
9698
+ docsUrl?: string;
9699
+ /** @description The stored version now. Read the setup again at this one. */
9700
+ currentVersion: number;
9701
+ } & {
9702
+ [key: string]: unknown;
9703
+ };
9704
+ };
9705
+ };
9706
+ };
9707
+ };
9708
+ getApiExperimentsBySlugVersions: {
9709
+ parameters: {
9710
+ query?: {
9711
+ /** @description Versions per page, capped at 100 */
9712
+ limit?: number;
9713
+ /** @description The `nextCursor` of the previous page */
9714
+ cursor?: number;
9715
+ };
9716
+ header?: never;
9717
+ path: {
9718
+ slug: string;
9719
+ };
9720
+ cookie?: never;
9721
+ };
9722
+ requestBody?: never;
9723
+ responses: {
9724
+ /** @description Versions of the experiment */
9725
+ 200: {
9726
+ headers: {
9727
+ [name: string]: unknown;
9728
+ };
9729
+ content: {
9730
+ "application/json": {
9731
+ /** @description Newest first */
9732
+ versions: {
9733
+ version: number;
9734
+ /** @description True for a version written by an ordinary save */
9735
+ autoSaved: boolean;
9736
+ commitMessage: string | null;
9737
+ /**
9738
+ * @description Who wrote it: user, langy or api
9739
+ * @example user
9740
+ */
9741
+ authorLabel: string;
9742
+ /** @description User id, when a person wrote it */
9743
+ authorId: string | null;
9744
+ /** @description ISO 8601 timestamp */
9745
+ createdAt: string;
9746
+ }[];
9747
+ /** @description Pass as `cursor` to read the next page, null on the last one */
9748
+ nextCursor: number | null;
9749
+ };
9750
+ };
9751
+ };
9752
+ /** @description The experiment is not an evaluations workbench (experiment_type_mismatch) */
9753
+ 400: {
9754
+ headers: {
9755
+ [name: string]: unknown;
9756
+ };
9757
+ content: {
9758
+ "application/json": {
9759
+ /** @description Stable failure code; branch on this */
9760
+ error: string;
9761
+ message?: string;
9762
+ /** @description Who the failure is attributable to: customer, platform, provider */
9763
+ fault?: string;
9764
+ tips?: string[];
9765
+ docsUrl?: string;
9766
+ } & {
9767
+ [key: string]: unknown;
8807
9768
  };
8808
9769
  };
8809
9770
  };
@@ -8847,104 +9808,47 @@ interface operations {
8847
9808
  };
8848
9809
  };
8849
9810
  };
8850
- getApiExperimentsRunsByRunIdResults: {
9811
+ postApiExperimentsBySlugVersionsByVersionRestore: {
8851
9812
  parameters: {
8852
- query?: {
8853
- /** @description Owning experiment. Required once the run has aged out of the status cache. */
8854
- experimentSlug?: string;
8855
- };
9813
+ query?: never;
8856
9814
  header?: never;
8857
9815
  path: {
8858
- runId: string;
9816
+ /** @description The version to restore, as listed by `GET /api/experiments/{slug}/versions` */
9817
+ version: number;
9818
+ slug: string;
8859
9819
  };
8860
9820
  cookie?: never;
8861
9821
  };
8862
9822
  requestBody?: never;
8863
9823
  responses: {
8864
- /** @description Rows and evaluations for the run */
9824
+ /** @description Version restored */
8865
9825
  200: {
8866
9826
  headers: {
8867
9827
  [name: string]: unknown;
8868
9828
  };
8869
9829
  content: {
8870
9830
  "application/json": {
8871
- experimentId: string;
8872
- runId: string;
8873
- projectId: string;
8874
- workflowVersionId?: string | null;
8875
- progress?: number | null;
8876
- total?: number | null;
8877
- /** @description Resolves the targetId each dataset row and evaluation carries */
8878
- targets?: {
8879
- id: string;
8880
- name: string;
8881
- type: string;
8882
- promptId?: string | null;
8883
- promptVersion?: number | null;
8884
- agentId?: string | null;
8885
- evaluatorId?: string | null;
8886
- model?: string | null;
8887
- metadata?: {
8888
- [key: string]: string | number | boolean;
8889
- } | null;
8890
- }[] | null;
8891
- /** @description One row per dataset entry, with what the target predicted */
8892
- dataset: {
8893
- index: number;
8894
- targetId?: string | null;
8895
- entry: {
8896
- [key: string]: unknown;
8897
- };
8898
- predicted?: {
8899
- [key: string]: unknown;
8900
- };
8901
- cost?: number | null;
8902
- duration?: number | null;
8903
- /** @description The engine's own string. Prefer domainError.code to branch on */
8904
- error?: string | null;
8905
- /** @description Set on rows written since failures started carrying codes */
8906
- domainError?: {
8907
- /** @description Stable failure code; branch on this */
8908
- code: string;
8909
- /** @description Deprecated alias of code, for older clients */
8910
- kind: string;
8911
- message?: string;
8912
- meta?: {
8913
- [key: string]: unknown;
8914
- };
8915
- httpStatus?: number;
8916
- /** @description Who the failure is attributable to: customer, platform, provider */
8917
- fault?: string;
8918
- traceId?: string;
8919
- tips?: string[];
8920
- docsUrl?: string;
8921
- };
8922
- traceId?: string | null;
8923
- }[];
8924
- /** @description One row per evaluator per dataset entry */
8925
- evaluations: {
8926
- evaluator: string;
8927
- name?: string | null;
8928
- targetId?: string | null;
8929
- /** @enum {string} */
8930
- status: "processed" | "skipped" | "error";
8931
- index: number;
8932
- score?: number | null;
8933
- label?: string | null;
8934
- passed?: boolean | null;
8935
- details?: string | null;
8936
- cost?: number | null;
8937
- duration?: number | null;
8938
- inputs?: {
8939
- [key: string]: unknown;
8940
- } | null;
8941
- }[];
8942
- timestamps: {
8943
- createdAt: number;
8944
- updatedAt: number;
8945
- finishedAt?: number | null;
8946
- stoppedAt?: number | null;
8947
- };
9831
+ /** @description The new version the restore wrote. History is never rewritten, so the restored version is still in the list. */
9832
+ version: number;
9833
+ };
9834
+ };
9835
+ };
9836
+ /** @description The setup did not match the schema (experiment_invalid_workbench_state), points at something that no longer exists (experiment_workbench_missing_reference), or the experiment is not an evaluations workbench (experiment_type_mismatch) */
9837
+ 400: {
9838
+ headers: {
9839
+ [name: string]: unknown;
9840
+ };
9841
+ content: {
9842
+ "application/json": {
9843
+ /** @description Stable failure code; branch on this */
9844
+ error: string;
9845
+ message?: string;
9846
+ /** @description Who the failure is attributable to: customer, platform, provider */
9847
+ fault?: string;
9848
+ tips?: string[];
9849
+ docsUrl?: string;
9850
+ } & {
9851
+ [key: string]: unknown;
8948
9852
  };
8949
9853
  };
8950
9854
  };
@@ -8986,6 +9890,27 @@ interface operations {
8986
9890
  };
8987
9891
  };
8988
9892
  };
9893
+ /** @description Someone else saved since you read this state (experiment_stale_workbench_state). `currentVersion` carries the version to read again. */
9894
+ 409: {
9895
+ headers: {
9896
+ [name: string]: unknown;
9897
+ };
9898
+ content: {
9899
+ "application/json": {
9900
+ /** @description Stable failure code; branch on this */
9901
+ error: string;
9902
+ message?: string;
9903
+ /** @description Who the failure is attributable to: customer, platform, provider */
9904
+ fault?: string;
9905
+ tips?: string[];
9906
+ docsUrl?: string;
9907
+ /** @description The stored version now. Read the setup again at this one. */
9908
+ currentVersion: number;
9909
+ } & {
9910
+ [key: string]: unknown;
9911
+ };
9912
+ };
9913
+ };
8989
9914
  };
8990
9915
  };
8991
9916
  postApiAnalytics: {
@@ -10632,6 +11557,15 @@ interface operations {
10632
11557
  /** @default null */
10633
11558
  rpd?: number | null;
10634
11559
  };
11560
+ /**
11561
+ * @default {
11562
+ * "maxOpenSessions": null
11563
+ * }
11564
+ */
11565
+ realtime?: {
11566
+ /** @default null */
11567
+ maxOpenSessions?: number | null;
11568
+ };
10635
11569
  /**
10636
11570
  * @default {
10637
11571
  * "tags": []
@@ -11062,6 +11996,15 @@ interface operations {
11062
11996
  /** @default null */
11063
11997
  rpd?: number | null;
11064
11998
  };
11999
+ /**
12000
+ * @default {
12001
+ * "maxOpenSessions": null
12002
+ * }
12003
+ */
12004
+ realtime?: {
12005
+ /** @default null */
12006
+ maxOpenSessions?: number | null;
12007
+ };
11065
12008
  /**
11066
12009
  * @default {
11067
12010
  * "tags": []
@@ -21614,7 +22557,10 @@ interface operations {
21614
22557
  parameters: {
21615
22558
  name: string;
21616
22559
  description?: string;
22560
+ /** @description The value the run uses when it supplies none. A secret parameter cannot carry one. */
21617
22561
  defaultValue?: string | number | boolean;
22562
+ /** @description Whether the value is a credential, supplied when the run starts and delivered to the target as secrets.NAME. A secret parameter is rejected when it also carries defaultValue. */
22563
+ secret?: boolean;
21618
22564
  }[];
21619
22565
  /** Format: uri */
21620
22566
  platformUrl: string;
@@ -21687,11 +22633,14 @@ interface operations {
21687
22633
  criteria?: string[];
21688
22634
  /** @default [] */
21689
22635
  labels?: string[];
21690
- /** @description The parameters this scenario declares by name, each with an optional description and default. A run supplies values for these names, readable from the scenario's own text as params.NAME. */
22636
+ /** @description The parameters this scenario declares by name, each with an optional description and default. A run supplies values for these names, readable from the scenario's own text as params.NAME. A parameter marked secret carries no default: its value is supplied per run, encrypted, delivered to the target as secrets.NAME, and never readable from the scenario's own text. */
21691
22637
  parameters?: {
21692
22638
  name: string;
21693
22639
  description?: string;
22640
+ /** @description The value the run uses when it supplies none. A secret parameter cannot carry one. */
21694
22641
  defaultValue?: string | number | boolean;
22642
+ /** @description Whether the value is a credential, supplied when the run starts and delivered to the target as secrets.NAME. A secret parameter is rejected when it also carries defaultValue. */
22643
+ secret?: boolean;
21695
22644
  }[];
21696
22645
  };
21697
22646
  };
@@ -21712,7 +22661,10 @@ interface operations {
21712
22661
  parameters: {
21713
22662
  name: string;
21714
22663
  description?: string;
22664
+ /** @description The value the run uses when it supplies none. A secret parameter cannot carry one. */
21715
22665
  defaultValue?: string | number | boolean;
22666
+ /** @description Whether the value is a credential, supplied when the run starts and delivered to the target as secrets.NAME. A secret parameter is rejected when it also carries defaultValue. */
22667
+ secret?: boolean;
21716
22668
  }[];
21717
22669
  /** Format: uri */
21718
22670
  platformUrl: string;
@@ -21795,7 +22747,10 @@ interface operations {
21795
22747
  parameters: {
21796
22748
  name: string;
21797
22749
  description?: string;
22750
+ /** @description The value the run uses when it supplies none. A secret parameter cannot carry one. */
21798
22751
  defaultValue?: string | number | boolean;
22752
+ /** @description Whether the value is a credential, supplied when the run starts and delivered to the target as secrets.NAME. A secret parameter is rejected when it also carries defaultValue. */
22753
+ secret?: boolean;
21799
22754
  }[];
21800
22755
  /** Format: uri */
21801
22756
  platformUrl: string;
@@ -21880,11 +22835,14 @@ interface operations {
21880
22835
  situation?: string;
21881
22836
  criteria?: string[];
21882
22837
  labels?: string[];
21883
- /** @description The parameters this scenario declares by name, each with an optional description and default. A run supplies values for these names, readable from the scenario's own text as params.NAME. */
22838
+ /** @description The parameters this scenario declares by name, each with an optional description and default. A run supplies values for these names, readable from the scenario's own text as params.NAME. A parameter marked secret carries no default: its value is supplied per run, encrypted, delivered to the target as secrets.NAME, and never readable from the scenario's own text. */
21884
22839
  parameters?: {
21885
22840
  name: string;
21886
22841
  description?: string;
22842
+ /** @description The value the run uses when it supplies none. A secret parameter cannot carry one. */
21887
22843
  defaultValue?: string | number | boolean;
22844
+ /** @description Whether the value is a credential, supplied when the run starts and delivered to the target as secrets.NAME. A secret parameter is rejected when it also carries defaultValue. */
22845
+ secret?: boolean;
21888
22846
  }[];
21889
22847
  };
21890
22848
  };
@@ -21905,7 +22863,10 @@ interface operations {
21905
22863
  parameters: {
21906
22864
  name: string;
21907
22865
  description?: string;
22866
+ /** @description The value the run uses when it supplies none. A secret parameter cannot carry one. */
21908
22867
  defaultValue?: string | number | boolean;
22868
+ /** @description Whether the value is a credential, supplied when the run starts and delivered to the target as secrets.NAME. A secret parameter is rejected when it also carries defaultValue. */
22869
+ secret?: boolean;
21909
22870
  }[];
21910
22871
  /** Format: uri */
21911
22872
  platformUrl: string;
@@ -23082,11 +24043,18 @@ interface operations {
23082
24043
  passCount: number;
23083
24044
  failCount: number;
23084
24045
  runningCount: number;
24046
+ settledCount: number;
23085
24047
  stalledCount: number;
23086
24048
  lastRunAt: number;
23087
24049
  lastUpdatedAt: number;
23088
24050
  firstCompletedAt: number | null;
24051
+ /**
24052
+ * @deprecated
24053
+ * @description Deprecated: read settledCount and isComplete instead. It carries the last update time of a batch where no run is running.
24054
+ */
23089
24055
  allCompletedAt: number | null;
24056
+ /** @description True when every run of the batch reached a terminal status. */
24057
+ isComplete: boolean;
23090
24058
  }[];
23091
24059
  hasMore?: boolean;
23092
24060
  nextCursor?: string;
@@ -23143,6 +24111,106 @@ interface operations {
23143
24111
  };
23144
24112
  };
23145
24113
  };
24114
+ getApiSimulationRunsBatchesByBatchRunId: {
24115
+ parameters: {
24116
+ query?: never;
24117
+ header?: never;
24118
+ path: {
24119
+ batchRunId: string;
24120
+ };
24121
+ cookie?: never;
24122
+ };
24123
+ requestBody?: never;
24124
+ responses: {
24125
+ /** @description Success */
24126
+ 200: {
24127
+ headers: {
24128
+ [name: string]: unknown;
24129
+ };
24130
+ content: {
24131
+ "application/json": {
24132
+ batchRunId: string;
24133
+ totalCount: number;
24134
+ passCount: number;
24135
+ failCount: number;
24136
+ runningCount: number;
24137
+ settledCount: number;
24138
+ stalledCount: number;
24139
+ lastRunAt: number;
24140
+ lastUpdatedAt: number;
24141
+ firstCompletedAt: number | null;
24142
+ /**
24143
+ * @deprecated
24144
+ * @description Deprecated: read settledCount and isComplete instead. It carries the last update time of a batch where no run is running.
24145
+ */
24146
+ allCompletedAt: number | null;
24147
+ /** @description True when every run of the batch reached a terminal status. */
24148
+ isComplete: boolean;
24149
+ };
24150
+ };
24151
+ };
24152
+ /** @description Bad Request */
24153
+ 400: {
24154
+ headers: {
24155
+ [name: string]: unknown;
24156
+ };
24157
+ content: {
24158
+ "application/json": {
24159
+ error: string;
24160
+ message?: string;
24161
+ };
24162
+ };
24163
+ };
24164
+ /** @description Unauthorized */
24165
+ 401: {
24166
+ headers: {
24167
+ [name: string]: unknown;
24168
+ };
24169
+ content: {
24170
+ "application/json": {
24171
+ error: string;
24172
+ message?: string;
24173
+ };
24174
+ };
24175
+ };
24176
+ /** @description Batch run not found */
24177
+ 404: {
24178
+ headers: {
24179
+ [name: string]: unknown;
24180
+ };
24181
+ content: {
24182
+ "application/json": {
24183
+ error: string;
24184
+ message?: string;
24185
+ };
24186
+ };
24187
+ };
24188
+ /** @description Unprocessable Entity */
24189
+ 422: {
24190
+ headers: {
24191
+ [name: string]: unknown;
24192
+ };
24193
+ content: {
24194
+ "application/json": {
24195
+ error: string;
24196
+ message?: string;
24197
+ };
24198
+ };
24199
+ };
24200
+ /** @description Internal Server Error */
24201
+ 500: {
24202
+ headers: {
24203
+ [name: string]: unknown;
24204
+ };
24205
+ content: {
24206
+ "application/json": {
24207
+ error: string;
24208
+ message?: string;
24209
+ };
24210
+ };
24211
+ };
24212
+ };
24213
+ };
23146
24214
  getApiSuites: {
23147
24215
  parameters: {
23148
24216
  query?: never;