langwatch 1.12.0 → 1.13.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 (41) hide show
  1. package/dist/agent/index.d.mts +5 -1
  2. package/dist/agent/index.d.ts +5 -1
  3. package/dist/agent/index.js +239 -14
  4. package/dist/agent/index.js.map +1 -1
  5. package/dist/agent/index.mjs +239 -14
  6. package/dist/agent/index.mjs.map +1 -1
  7. package/dist/{chunk-3WIN2UXZ.js → chunk-7R54TMZZ.js} +2 -2
  8. package/dist/{chunk-3WIN2UXZ.js.map → chunk-7R54TMZZ.js.map} +1 -1
  9. package/dist/{chunk-QLYKPPAW.js → chunk-G64XZMIU.js} +12 -12
  10. package/dist/{chunk-QLYKPPAW.js.map → chunk-G64XZMIU.js.map} +1 -1
  11. package/dist/{chunk-BAE4KYKJ.mjs → chunk-N3755EHD.mjs} +2 -2
  12. package/dist/{chunk-2HA4SJSD.mjs → chunk-NPEK4RSD.mjs} +5 -2
  13. package/dist/{chunk-2HA4SJSD.mjs.map → chunk-NPEK4RSD.mjs.map} +1 -1
  14. package/dist/{chunk-4ERRCKOH.js → chunk-O4J3ZPZY.js} +5 -2
  15. package/dist/chunk-O4J3ZPZY.js.map +1 -0
  16. package/dist/{chunk-F5UYCQT3.mjs → chunk-UHRSTPZ5.mjs} +2 -2
  17. package/dist/{chunk-F5UYCQT3.mjs.map → chunk-UHRSTPZ5.mjs.map} +1 -1
  18. package/dist/cli/bundle.js +362 -357
  19. package/dist/{implementation-rpImK8WS.d.ts → implementation-BDK4X-CS.d.ts} +1 -1
  20. package/dist/{implementation-BA3xa5UR.d.mts → implementation-BOP-3GoX.d.mts} +1 -1
  21. package/dist/index.d.mts +75 -5
  22. package/dist/index.d.ts +75 -5
  23. package/dist/index.js +328 -103
  24. package/dist/index.js.map +1 -1
  25. package/dist/index.mjs +246 -21
  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 +3 -3
  30. package/dist/observability-sdk/index.mjs +2 -2
  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 +3 -3
  34. package/dist/observability-sdk/instrumentation/langchain/index.mjs +1 -1
  35. package/dist/observability-sdk/setup/node/index.js +3 -3
  36. package/dist/observability-sdk/setup/node/index.mjs +2 -2
  37. package/dist/{types-Cr25FO-i.d.ts → types-C3SDhizh.d.ts} +1151 -117
  38. package/dist/{types-DJyJypkv.d.mts → types-C9abONOS.d.mts} +1151 -117
  39. package/package.json +1 -1
  40. package/dist/chunk-4ERRCKOH.js.map +0 -1
  41. /package/dist/{chunk-BAE4KYKJ.mjs.map → chunk-N3755EHD.mjs.map} +0 -0
@@ -394,7 +394,9 @@ interface paths {
394
394
  [name: string]: unknown;
395
395
  };
396
396
  content: {
397
- "application/json": components["schemas"]["Annotation"][];
397
+ "application/json": {
398
+ data: components["schemas"]["Annotation"][];
399
+ };
398
400
  };
399
401
  };
400
402
  /** @description Unexpected error */
@@ -445,7 +447,9 @@ interface paths {
445
447
  [name: string]: unknown;
446
448
  };
447
449
  content: {
448
- "application/json": components["schemas"]["Annotation"][];
450
+ "application/json": {
451
+ data: components["schemas"]["Annotation"][];
452
+ };
449
453
  };
450
454
  };
451
455
  /** @description Unexpected error */
@@ -475,8 +479,8 @@ interface paths {
475
479
  requestBody: {
476
480
  content: {
477
481
  "application/json": {
478
- comment?: string;
479
- isThumbsUp?: boolean;
482
+ comment: string;
483
+ isThumbsUp: boolean;
480
484
  email?: string;
481
485
  };
482
486
  };
@@ -488,7 +492,9 @@ interface paths {
488
492
  [name: string]: unknown;
489
493
  };
490
494
  content: {
491
- "application/json": components["schemas"]["Annotation"];
495
+ "application/json": {
496
+ data: components["schemas"]["Annotation"];
497
+ };
492
498
  };
493
499
  };
494
500
  /** @description Invalid input */
@@ -534,7 +540,9 @@ interface paths {
534
540
  [name: string]: unknown;
535
541
  };
536
542
  content: {
537
- "application/json": components["schemas"]["Annotation"];
543
+ "application/json": {
544
+ data: components["schemas"]["Annotation"];
545
+ };
538
546
  };
539
547
  };
540
548
  /** @description Unexpected error */
@@ -602,8 +610,8 @@ interface paths {
602
610
  requestBody: {
603
611
  content: {
604
612
  "application/json": {
605
- comment?: string;
606
- isThumbsUp?: boolean;
613
+ comment: string;
614
+ isThumbsUp: boolean;
607
615
  email?: string;
608
616
  };
609
617
  };
@@ -616,8 +624,7 @@ interface paths {
616
624
  };
617
625
  content: {
618
626
  "application/json": {
619
- status?: string;
620
- message?: string;
627
+ data: components["schemas"]["Annotation"];
621
628
  };
622
629
  };
623
630
  };
@@ -2671,6 +2678,108 @@ interface paths {
2671
2678
  patch: operations["patchApiGraphsById"];
2672
2679
  trace?: never;
2673
2680
  };
2681
+ "/api/v1/langy/control/connect/register": {
2682
+ parameters: {
2683
+ query?: never;
2684
+ header?: never;
2685
+ path?: never;
2686
+ cookie?: never;
2687
+ };
2688
+ get?: never;
2689
+ put?: never;
2690
+ /** @description Share a folder over HTTP, for a network that blocks WebSockets. The body is the register frame of the control protocol. Answers with the registered frame and the instance token the poll and frames endpoints are addressed with, or with a refused frame. */
2691
+ post: operations["registerLangyControlSession"];
2692
+ delete?: never;
2693
+ options?: never;
2694
+ head?: never;
2695
+ patch?: never;
2696
+ trace?: never;
2697
+ };
2698
+ "/api/v1/langy/control/connect/poll": {
2699
+ parameters: {
2700
+ query?: never;
2701
+ header?: never;
2702
+ path?: never;
2703
+ cookie?: never;
2704
+ };
2705
+ /** @description Wait for the next frames of a shared folder, then answer with what is waiting or with an empty list. Each poll is also the folder's heartbeat, so a command line that polls reads connected. Addressed with the instance token in the X-Agent-Instance-Token header. */
2706
+ get: operations["pollLangyControlSession"];
2707
+ put?: never;
2708
+ post?: never;
2709
+ delete?: never;
2710
+ options?: never;
2711
+ head?: never;
2712
+ patch?: never;
2713
+ trace?: never;
2714
+ };
2715
+ "/api/v1/langy/control/connect/frames": {
2716
+ parameters: {
2717
+ query?: never;
2718
+ header?: never;
2719
+ path?: never;
2720
+ cookie?: never;
2721
+ };
2722
+ get?: never;
2723
+ put?: never;
2724
+ /** @description Post the frames the command line has for the platform: the acknowledgement of a call, its result, a permission the developer has to answer first, and the deregister that ends the share. */
2725
+ post: operations["postLangyControlFrames"];
2726
+ delete?: never;
2727
+ options?: never;
2728
+ head?: never;
2729
+ patch?: never;
2730
+ trace?: never;
2731
+ };
2732
+ "/api/v1/langy/control/requests": {
2733
+ parameters: {
2734
+ query?: never;
2735
+ header?: never;
2736
+ path?: never;
2737
+ cookie?: never;
2738
+ };
2739
+ /** @description List the open requests Langy made for a folder of mine in this project. Only the person Langy asked ever sees a request, and each one expires fifteen minutes after it was made. */
2740
+ get: operations["listLangyControlRequests"];
2741
+ put?: never;
2742
+ post?: never;
2743
+ delete?: never;
2744
+ options?: never;
2745
+ head?: never;
2746
+ patch?: never;
2747
+ trace?: never;
2748
+ };
2749
+ "/api/v1/langy/control/requests/{id}/approve": {
2750
+ parameters: {
2751
+ query?: never;
2752
+ header?: never;
2753
+ path?: never;
2754
+ cookie?: never;
2755
+ };
2756
+ get?: never;
2757
+ put?: never;
2758
+ /** @description Approve one request and share the current folder with the conversation that asked. Answers with a Langy session key scoped to that conversation, which is never shown again. A request is single use: a second approval is refused. */
2759
+ post: operations["approveLangyControlRequest"];
2760
+ delete?: never;
2761
+ options?: never;
2762
+ head?: never;
2763
+ patch?: never;
2764
+ trace?: never;
2765
+ };
2766
+ "/api/v1/langy/control/requests/{id}/cancel": {
2767
+ parameters: {
2768
+ query?: never;
2769
+ header?: never;
2770
+ path?: never;
2771
+ cookie?: never;
2772
+ };
2773
+ get?: never;
2774
+ put?: never;
2775
+ /** @description Refuse one request from the terminal. The card in the chat reads that sharing was cancelled, and Langy's next turn offers the choice again. */
2776
+ post: operations["cancelLangyControlRequest"];
2777
+ delete?: never;
2778
+ options?: never;
2779
+ head?: never;
2780
+ patch?: never;
2781
+ trace?: never;
2782
+ };
2674
2783
  "/api/me/usage": {
2675
2784
  parameters: {
2676
2785
  query?: never;
@@ -3895,7 +4004,7 @@ interface paths {
3895
4004
  /** @description List the project's test suites. Archived suites are left out unless includeArchived is set. Run plans are not test suites and are listed by the run plans family. */
3896
4005
  get: operations["listTestSuites"];
3897
4006
  put?: never;
3898
- /** @description Create a test suite. It starts empty: scenarios join it by being filed into it, and the targets a run goes against are sent with the run. */
4007
+ /** @description Create a test suite. It starts with no scenario: scenarios join it by being filed into it, and the targets a run goes against are sent with the run. It may declare fields and attach evaluators from the start. */
3899
4008
  post: operations["createTestSuite"];
3900
4009
  delete?: never;
3901
4010
  options?: never;
@@ -3921,8 +4030,8 @@ interface paths {
3921
4030
  delete: operations["archiveTestSuite"];
3922
4031
  options?: never;
3923
4032
  head?: never;
3924
- /** @description Rename a test suite. The slug is kept, so links and run history stay where they are. */
3925
- patch: operations["renameTestSuite"];
4033
+ /** @description Edit a test suite: its name, the fields it declares, the evaluators attached to it. Send only what changes. The slug is kept on a rename, so links and run history stay where they are. */
4034
+ patch: operations["updateTestSuite"];
3926
4035
  trace?: never;
3927
4036
  };
3928
4037
  "/api/v1/test-suites/{id}/run": {
@@ -4579,23 +4688,23 @@ interface components {
4579
4688
  schemas: {
4580
4689
  Annotation: {
4581
4690
  /** @description The ID of the annotation */
4582
- id?: string;
4691
+ id: string;
4583
4692
  /** @description The ID of the project */
4584
- projectId?: string;
4693
+ projectId: string;
4585
4694
  /** @description The ID of the trace */
4586
- traceId?: string;
4695
+ traceId: string;
4587
4696
  /** @description The comment of the annotation */
4588
- comment?: string;
4697
+ comment: string | null;
4589
4698
  /** @description The thumbs up status of the annotation */
4590
- isThumbsUp?: boolean;
4699
+ isThumbsUp: boolean | null;
4591
4700
  /** @description The ID of the user */
4592
- userId?: string;
4701
+ userId: string | null;
4593
4702
  /** @description The created at of the annotation */
4594
- createdAt?: string;
4703
+ createdAt: string;
4595
4704
  /** @description The updated at of the annotation */
4596
- updatedAt?: string;
4705
+ updatedAt: string;
4597
4706
  /** @description The email of the user */
4598
- email?: string;
4707
+ email: string | null;
4599
4708
  };
4600
4709
  Error: {
4601
4710
  /** Format: int32 */
@@ -5727,6 +5836,13 @@ interface operations {
5727
5836
  inflight: number;
5728
5837
  maxConcurrency: number;
5729
5838
  }[];
5839
+ /** @description Whether the credential making this request can run simulations against the agent. False for a personal development agent that belongs to somebody else, which is listed all the same so it can be told apart from the other agents of the same name. */
5840
+ selectable: boolean;
5841
+ /**
5842
+ * @description Why the agent cannot be run by this credential. Null when it can.
5843
+ * @enum {string|null}
5844
+ */
5845
+ notSelectableReason: "owned_by_another_person" | null;
5730
5846
  createdAt: string;
5731
5847
  updatedAt: string;
5732
5848
  /** Format: uri */
@@ -5829,6 +5945,13 @@ interface operations {
5829
5945
  inflight: number;
5830
5946
  maxConcurrency: number;
5831
5947
  }[];
5948
+ /** @description Whether the credential making this request can run simulations against the agent. False for a personal development agent that belongs to somebody else, which is listed all the same so it can be told apart from the other agents of the same name. */
5949
+ selectable: boolean;
5950
+ /**
5951
+ * @description Why the agent cannot be run by this credential. Null when it can.
5952
+ * @enum {string|null}
5953
+ */
5954
+ notSelectableReason: "owned_by_another_person" | null;
5832
5955
  createdAt: string;
5833
5956
  updatedAt: string;
5834
5957
  /** Format: uri */
@@ -5912,6 +6035,13 @@ interface operations {
5912
6035
  inflight: number;
5913
6036
  maxConcurrency: number;
5914
6037
  }[];
6038
+ /** @description Whether the credential making this request can run simulations against the agent. False for a personal development agent that belongs to somebody else, which is listed all the same so it can be told apart from the other agents of the same name. */
6039
+ selectable: boolean;
6040
+ /**
6041
+ * @description Why the agent cannot be run by this credential. Null when it can.
6042
+ * @enum {string|null}
6043
+ */
6044
+ notSelectableReason: "owned_by_another_person" | null;
5915
6045
  createdAt: string;
5916
6046
  updatedAt: string;
5917
6047
  /** Format: uri */
@@ -6010,6 +6140,13 @@ interface operations {
6010
6140
  inflight: number;
6011
6141
  maxConcurrency: number;
6012
6142
  }[];
6143
+ /** @description Whether the credential making this request can run simulations against the agent. False for a personal development agent that belongs to somebody else, which is listed all the same so it can be told apart from the other agents of the same name. */
6144
+ selectable: boolean;
6145
+ /**
6146
+ * @description Why the agent cannot be run by this credential. Null when it can.
6147
+ * @enum {string|null}
6148
+ */
6149
+ notSelectableReason: "owned_by_another_person" | null;
6013
6150
  createdAt: string;
6014
6151
  updatedAt: string;
6015
6152
  /** Format: uri */
@@ -6137,6 +6274,13 @@ interface operations {
6137
6274
  inflight: number;
6138
6275
  maxConcurrency: number;
6139
6276
  }[];
6277
+ /** @description Whether the credential making this request can run simulations against the agent. False for a personal development agent that belongs to somebody else, which is listed all the same so it can be told apart from the other agents of the same name. */
6278
+ selectable: boolean;
6279
+ /**
6280
+ * @description Why the agent cannot be run by this credential. Null when it can.
6281
+ * @enum {string|null}
6282
+ */
6283
+ notSelectableReason: "owned_by_another_person" | null;
6140
6284
  createdAt: string;
6141
6285
  updatedAt: string;
6142
6286
  /** Format: uri */
@@ -6195,6 +6339,13 @@ interface operations {
6195
6339
  };
6196
6340
  content?: never;
6197
6341
  };
6342
+ /** @description No process is holding the connected agent right now */
6343
+ 503: {
6344
+ headers: {
6345
+ [name: string]: unknown;
6346
+ };
6347
+ content?: never;
6348
+ };
6198
6349
  };
6199
6350
  };
6200
6351
  callConnectedAgent: {
@@ -18030,102 +18181,110 @@ interface operations {
18030
18181
  };
18031
18182
  };
18032
18183
  };
18033
- getApiMeUsage: {
18184
+ registerLangyControlSession: {
18034
18185
  parameters: {
18035
- query?: {
18036
- windowStartMs?: number;
18037
- windowEndMs?: number;
18038
- };
18186
+ query?: never;
18039
18187
  header?: never;
18040
18188
  path?: never;
18041
18189
  cookie?: never;
18042
18190
  };
18043
- requestBody?: never;
18044
- responses: {
18045
- /** @description Success */
18046
- 200: {
18047
- headers: {
18048
- [name: string]: unknown;
18049
- };
18050
- content: {
18051
- "application/json": {
18052
- summary: {
18053
- spentUsd: number;
18054
- billedUsd: number;
18055
- requests: number;
18056
- promptTokens: number;
18057
- completionTokens: number;
18058
- mostUsedModel: {
18059
- name: string;
18060
- usagePct: number;
18061
- } | null;
18062
- };
18063
- dailyBuckets: {
18064
- day: string;
18065
- spentUsd: number;
18066
- billedUsd: number;
18067
- requests: number;
18068
- }[];
18069
- breakdownByModel: {
18070
- label: string;
18071
- spentUsd: number;
18072
- billedUsd: number;
18073
- requests: number;
18074
- }[];
18191
+ requestBody?: {
18192
+ content: {
18193
+ "application/json": {
18194
+ /** @enum {number} */
18195
+ protocol: 1;
18196
+ /** @enum {string} */
18197
+ type: "register";
18198
+ cli: {
18199
+ name: string;
18200
+ version: string;
18201
+ };
18202
+ instance: {
18203
+ id: string;
18204
+ hostname: string;
18205
+ username: string;
18206
+ pid: number;
18207
+ startedAt: string;
18208
+ /** @default [] */
18209
+ inFlightCallIds?: string[];
18210
+ };
18211
+ workspace: {
18212
+ root: string;
18213
+ name: string;
18214
+ gitBranch?: string;
18215
+ gitRemote?: string;
18216
+ gitDirty?: boolean;
18217
+ os: string;
18218
+ nodeVersion?: string;
18219
+ pythonVersion?: string;
18220
+ ghAuthenticated?: boolean;
18221
+ packageManager?: string;
18075
18222
  };
18076
18223
  };
18077
18224
  };
18078
- /** @description Bad Request */
18079
- 400: {
18225
+ };
18226
+ responses: {
18227
+ /** @description The folder is shared */
18228
+ 200: {
18080
18229
  headers: {
18081
18230
  [name: string]: unknown;
18082
18231
  };
18083
18232
  content: {
18084
18233
  "application/json": {
18085
- error: string;
18086
- message?: string;
18234
+ /** @description The registered frame, or the refused frame with its reason. */
18235
+ frame: {
18236
+ /** @constant */
18237
+ protocol: 1;
18238
+ /** @constant */
18239
+ type: "registered";
18240
+ instanceId: string;
18241
+ heartbeatIntervalMs: number;
18242
+ conversation: {
18243
+ id: string;
18244
+ title: string;
18245
+ url: string;
18246
+ };
18247
+ policy: {
18248
+ skipPermissions: boolean;
18249
+ };
18250
+ } | {
18251
+ /** @constant */
18252
+ protocol: 1;
18253
+ /** @constant */
18254
+ type: "refused";
18255
+ /** @enum {string} */
18256
+ code: "api_key_invalid" | "key_type_not_allowed" | "conversation_mismatch" | "workspace_already_connected" | "replica_count_unsupported" | "protocol_invalid";
18257
+ message: string;
18258
+ };
18259
+ /** @description The token the poll and frames endpoints are addressed with, in the X-Agent-Instance-Token header. Present when the register was accepted. */
18260
+ instanceToken?: string;
18087
18261
  };
18088
18262
  };
18089
18263
  };
18090
- /** @description Unauthorized */
18264
+ /** @description The session key is not valid: a refused frame */
18091
18265
  401: {
18092
18266
  headers: {
18093
18267
  [name: string]: unknown;
18094
18268
  };
18095
- content: {
18096
- "application/json": {
18097
- error: string;
18098
- message?: string;
18099
- };
18100
- };
18269
+ content?: never;
18101
18270
  };
18102
- /** @description Unprocessable Entity */
18103
- 422: {
18271
+ /** @description The key is not a Langy session key, or it controls no conversation: a refused frame */
18272
+ 403: {
18104
18273
  headers: {
18105
18274
  [name: string]: unknown;
18106
18275
  };
18107
- content: {
18108
- "application/json": {
18109
- error: string;
18110
- message?: string;
18111
- };
18112
- };
18276
+ content?: never;
18113
18277
  };
18114
- /** @description Internal Server Error */
18115
- 500: {
18278
+ /** @description The body is not a register frame */
18279
+ 422: {
18116
18280
  headers: {
18117
18281
  [name: string]: unknown;
18118
18282
  };
18119
- content: {
18120
- "application/json": {
18121
- error: string;
18122
- message?: string;
18123
- };
18124
- };
18283
+ content?: never;
18125
18284
  };
18126
18285
  };
18127
18286
  };
18128
- getApiMeProject: {
18287
+ pollLangyControlSession: {
18129
18288
  parameters: {
18130
18289
  query?: never;
18131
18290
  header?: never;
@@ -18134,39 +18293,526 @@ interface operations {
18134
18293
  };
18135
18294
  requestBody?: never;
18136
18295
  responses: {
18137
- /** @description Success */
18296
+ /** @description The frames waiting for the folder, possibly none */
18138
18297
  200: {
18139
18298
  headers: {
18140
18299
  [name: string]: unknown;
18141
18300
  };
18142
18301
  content: {
18143
18302
  "application/json": {
18144
- id: string;
18145
- name: string;
18146
- slug: string;
18147
- isPersonal: boolean;
18148
- };
18149
- };
18150
- };
18151
- /** @description Bad Request */
18152
- 400: {
18153
- headers: {
18154
- [name: string]: unknown;
18155
- };
18156
- content: {
18157
- "application/json": {
18158
- error: string;
18159
- message?: string;
18160
- };
18161
- };
18162
- };
18163
- /** @description Unauthorized */
18164
- 401: {
18165
- headers: {
18166
- [name: string]: unknown;
18167
- };
18168
- content: {
18169
- "application/json": {
18303
+ /** @description The frames waiting for the folder; empty once the poll wait passes with none. */
18304
+ frames: ({
18305
+ /** @constant */
18306
+ protocol: 1;
18307
+ /** @constant */
18308
+ type: "registered";
18309
+ instanceId: string;
18310
+ heartbeatIntervalMs: number;
18311
+ conversation: {
18312
+ id: string;
18313
+ title: string;
18314
+ url: string;
18315
+ };
18316
+ policy: {
18317
+ skipPermissions: boolean;
18318
+ };
18319
+ } | {
18320
+ /** @constant */
18321
+ protocol: 1;
18322
+ /** @constant */
18323
+ type: "refused";
18324
+ /** @enum {string} */
18325
+ code: "api_key_invalid" | "key_type_not_allowed" | "conversation_mismatch" | "workspace_already_connected" | "replica_count_unsupported" | "protocol_invalid";
18326
+ message: string;
18327
+ } | {
18328
+ /** @constant */
18329
+ protocol: 1;
18330
+ /** @constant */
18331
+ type: "call";
18332
+ call: {
18333
+ callId: string;
18334
+ conversationId: string;
18335
+ turnId: string;
18336
+ deadlineAt: number;
18337
+ } & ({
18338
+ /** @constant */
18339
+ tool: "local_read";
18340
+ params: {
18341
+ path: string;
18342
+ offset?: number;
18343
+ limit?: number;
18344
+ };
18345
+ } | {
18346
+ /** @constant */
18347
+ tool: "local_write";
18348
+ params: {
18349
+ path: string;
18350
+ content: string;
18351
+ };
18352
+ } | {
18353
+ /** @constant */
18354
+ tool: "local_edit";
18355
+ params: {
18356
+ path: string;
18357
+ edits: {
18358
+ oldText: string;
18359
+ newText: string;
18360
+ }[];
18361
+ };
18362
+ } | {
18363
+ /** @constant */
18364
+ tool: "local_bash";
18365
+ params: {
18366
+ command: string;
18367
+ timeout?: number;
18368
+ background?: boolean;
18369
+ };
18370
+ } | {
18371
+ /** @constant */
18372
+ tool: "local_grep";
18373
+ params: {
18374
+ pattern: string;
18375
+ path?: string;
18376
+ glob?: string;
18377
+ ignoreCase?: boolean;
18378
+ literal?: boolean;
18379
+ context?: number;
18380
+ limit?: number;
18381
+ };
18382
+ } | {
18383
+ /** @constant */
18384
+ tool: "local_find";
18385
+ params: {
18386
+ pattern: string;
18387
+ path?: string;
18388
+ limit?: number;
18389
+ };
18390
+ } | {
18391
+ /** @constant */
18392
+ tool: "local_ls";
18393
+ params: {
18394
+ path?: string;
18395
+ limit?: number;
18396
+ };
18397
+ });
18398
+ } | {
18399
+ /** @constant */
18400
+ protocol: 1;
18401
+ /** @constant */
18402
+ type: "cancel";
18403
+ callId: string;
18404
+ } | {
18405
+ /** @constant */
18406
+ protocol: 1;
18407
+ /** @constant */
18408
+ type: "permission";
18409
+ callId: string;
18410
+ /** @enum {string} */
18411
+ decision: "allow_once" | "allow_pattern" | "deny" | "expired";
18412
+ } | {
18413
+ /** @constant */
18414
+ protocol: 1;
18415
+ /** @constant */
18416
+ type: "policy";
18417
+ skipPermissions: boolean;
18418
+ } | {
18419
+ /** @constant */
18420
+ protocol: 1;
18421
+ /** @constant */
18422
+ type: "disconnect";
18423
+ reason: string;
18424
+ })[];
18425
+ };
18426
+ };
18427
+ };
18428
+ /** @description The instance token is not known; share the folder again */
18429
+ 410: {
18430
+ headers: {
18431
+ [name: string]: unknown;
18432
+ };
18433
+ content?: never;
18434
+ };
18435
+ };
18436
+ };
18437
+ postLangyControlFrames: {
18438
+ parameters: {
18439
+ query?: never;
18440
+ header?: never;
18441
+ path?: never;
18442
+ cookie?: never;
18443
+ };
18444
+ requestBody?: {
18445
+ content: {
18446
+ "application/json": {
18447
+ /** @description Ack, result, permission_required and deregister frames, in order. */
18448
+ frames: ({
18449
+ /** @enum {number} */
18450
+ protocol: 1;
18451
+ /** @enum {string} */
18452
+ type: "register";
18453
+ cli: {
18454
+ name: string;
18455
+ version: string;
18456
+ };
18457
+ instance: {
18458
+ id: string;
18459
+ hostname: string;
18460
+ username: string;
18461
+ pid: number;
18462
+ startedAt: string;
18463
+ /** @default [] */
18464
+ inFlightCallIds?: string[];
18465
+ };
18466
+ workspace: {
18467
+ root: string;
18468
+ name: string;
18469
+ gitBranch?: string;
18470
+ gitRemote?: string;
18471
+ gitDirty?: boolean;
18472
+ os: string;
18473
+ nodeVersion?: string;
18474
+ pythonVersion?: string;
18475
+ ghAuthenticated?: boolean;
18476
+ packageManager?: string;
18477
+ };
18478
+ } | {
18479
+ /** @enum {number} */
18480
+ protocol: 1;
18481
+ /** @enum {string} */
18482
+ type: "ack";
18483
+ callId: string;
18484
+ } | {
18485
+ /** @enum {number} */
18486
+ protocol: 1;
18487
+ /** @enum {string} */
18488
+ type: "result";
18489
+ callId: string;
18490
+ ok: boolean;
18491
+ text?: string;
18492
+ output?: {
18493
+ exitCode: number | null;
18494
+ stdout: string;
18495
+ stderr: string;
18496
+ truncated: boolean;
18497
+ logPath?: string;
18498
+ pid?: number;
18499
+ durationMs: number;
18500
+ };
18501
+ error?: {
18502
+ /** @enum {string} */
18503
+ code: "path_refused" | "command_refused" | "permission_denied" | "permission_expired" | "cancelled" | "timeout" | "exec_failed" | "not_found";
18504
+ message: string;
18505
+ };
18506
+ } | {
18507
+ /** @enum {number} */
18508
+ protocol: 1;
18509
+ /** @enum {string} */
18510
+ type: "permission_required";
18511
+ callId: string;
18512
+ summary: string;
18513
+ pattern: string;
18514
+ reason: string;
18515
+ skipOffered: boolean;
18516
+ segments?: {
18517
+ command: string;
18518
+ pattern: string;
18519
+ readOnly: boolean;
18520
+ }[];
18521
+ timeoutSeconds?: number;
18522
+ } | {
18523
+ /** @enum {number} */
18524
+ protocol: 1;
18525
+ /** @enum {string} */
18526
+ type: "permission_answered";
18527
+ callId: string;
18528
+ /** @enum {string} */
18529
+ decision: "allow_once" | "allow_pattern" | "deny";
18530
+ patterns?: string[];
18531
+ } | {
18532
+ /** @enum {number} */
18533
+ protocol: 1;
18534
+ /** @enum {string} */
18535
+ type: "deregister";
18536
+ })[];
18537
+ };
18538
+ };
18539
+ };
18540
+ responses: {
18541
+ /** @description The frames were taken */
18542
+ 200: {
18543
+ headers: {
18544
+ [name: string]: unknown;
18545
+ };
18546
+ content: {
18547
+ "application/json": {
18548
+ /** @description How many frames were taken. */
18549
+ accepted: number;
18550
+ };
18551
+ };
18552
+ };
18553
+ /** @description The instance token is not known; share the folder again */
18554
+ 410: {
18555
+ headers: {
18556
+ [name: string]: unknown;
18557
+ };
18558
+ content?: never;
18559
+ };
18560
+ /** @description The body is not a list of frames */
18561
+ 422: {
18562
+ headers: {
18563
+ [name: string]: unknown;
18564
+ };
18565
+ content?: never;
18566
+ };
18567
+ };
18568
+ };
18569
+ listLangyControlRequests: {
18570
+ parameters: {
18571
+ query?: never;
18572
+ header?: never;
18573
+ path?: never;
18574
+ cookie?: never;
18575
+ };
18576
+ requestBody?: never;
18577
+ responses: {
18578
+ /** @description Success */
18579
+ 200: {
18580
+ headers: {
18581
+ [name: string]: unknown;
18582
+ };
18583
+ content: {
18584
+ "application/json": {
18585
+ requests: {
18586
+ id: string;
18587
+ conversationId: string;
18588
+ conversationTitle: string;
18589
+ conversationUrl: string;
18590
+ projectId: string;
18591
+ projectName: string;
18592
+ createdAt: string;
18593
+ expiresAt: string;
18594
+ }[];
18595
+ };
18596
+ };
18597
+ };
18598
+ };
18599
+ };
18600
+ approveLangyControlRequest: {
18601
+ parameters: {
18602
+ query?: never;
18603
+ header?: never;
18604
+ path: {
18605
+ /** @description The control request id. */
18606
+ id: string;
18607
+ };
18608
+ cookie?: never;
18609
+ };
18610
+ requestBody: {
18611
+ content: {
18612
+ "application/json": {
18613
+ workspace: {
18614
+ root: string;
18615
+ name: string;
18616
+ gitBranch?: string;
18617
+ gitRemote?: string;
18618
+ gitDirty?: boolean;
18619
+ os: string;
18620
+ nodeVersion?: string;
18621
+ pythonVersion?: string;
18622
+ ghAuthenticated?: boolean;
18623
+ packageManager?: string;
18624
+ };
18625
+ };
18626
+ };
18627
+ };
18628
+ responses: {
18629
+ /** @description Success */
18630
+ 200: {
18631
+ headers: {
18632
+ [name: string]: unknown;
18633
+ };
18634
+ content: {
18635
+ "application/json": {
18636
+ sessionKey: string;
18637
+ endpoint: string;
18638
+ conversation: {
18639
+ id: string;
18640
+ title: string;
18641
+ url: string;
18642
+ };
18643
+ };
18644
+ };
18645
+ };
18646
+ };
18647
+ };
18648
+ cancelLangyControlRequest: {
18649
+ parameters: {
18650
+ query?: never;
18651
+ header?: never;
18652
+ path: {
18653
+ /** @description The control request id. */
18654
+ id: string;
18655
+ };
18656
+ cookie?: never;
18657
+ };
18658
+ requestBody?: never;
18659
+ responses: {
18660
+ /** @description Success */
18661
+ 200: {
18662
+ headers: {
18663
+ [name: string]: unknown;
18664
+ };
18665
+ content: {
18666
+ "application/json": {
18667
+ /** @description The request that was cancelled. */
18668
+ id: string;
18669
+ /**
18670
+ * @description Always true once the request is gone.
18671
+ * @constant
18672
+ */
18673
+ cancelled: true;
18674
+ };
18675
+ };
18676
+ };
18677
+ };
18678
+ };
18679
+ getApiMeUsage: {
18680
+ parameters: {
18681
+ query?: {
18682
+ windowStartMs?: number;
18683
+ windowEndMs?: number;
18684
+ };
18685
+ header?: never;
18686
+ path?: never;
18687
+ cookie?: never;
18688
+ };
18689
+ requestBody?: never;
18690
+ responses: {
18691
+ /** @description Success */
18692
+ 200: {
18693
+ headers: {
18694
+ [name: string]: unknown;
18695
+ };
18696
+ content: {
18697
+ "application/json": {
18698
+ summary: {
18699
+ spentUsd: number;
18700
+ billedUsd: number;
18701
+ requests: number;
18702
+ promptTokens: number;
18703
+ completionTokens: number;
18704
+ mostUsedModel: {
18705
+ name: string;
18706
+ usagePct: number;
18707
+ } | null;
18708
+ };
18709
+ dailyBuckets: {
18710
+ day: string;
18711
+ spentUsd: number;
18712
+ billedUsd: number;
18713
+ requests: number;
18714
+ }[];
18715
+ breakdownByModel: {
18716
+ label: string;
18717
+ spentUsd: number;
18718
+ billedUsd: number;
18719
+ requests: number;
18720
+ }[];
18721
+ };
18722
+ };
18723
+ };
18724
+ /** @description Bad Request */
18725
+ 400: {
18726
+ headers: {
18727
+ [name: string]: unknown;
18728
+ };
18729
+ content: {
18730
+ "application/json": {
18731
+ error: string;
18732
+ message?: string;
18733
+ };
18734
+ };
18735
+ };
18736
+ /** @description Unauthorized */
18737
+ 401: {
18738
+ headers: {
18739
+ [name: string]: unknown;
18740
+ };
18741
+ content: {
18742
+ "application/json": {
18743
+ error: string;
18744
+ message?: string;
18745
+ };
18746
+ };
18747
+ };
18748
+ /** @description Unprocessable Entity */
18749
+ 422: {
18750
+ headers: {
18751
+ [name: string]: unknown;
18752
+ };
18753
+ content: {
18754
+ "application/json": {
18755
+ error: string;
18756
+ message?: string;
18757
+ };
18758
+ };
18759
+ };
18760
+ /** @description Internal Server Error */
18761
+ 500: {
18762
+ headers: {
18763
+ [name: string]: unknown;
18764
+ };
18765
+ content: {
18766
+ "application/json": {
18767
+ error: string;
18768
+ message?: string;
18769
+ };
18770
+ };
18771
+ };
18772
+ };
18773
+ };
18774
+ getApiMeProject: {
18775
+ parameters: {
18776
+ query?: never;
18777
+ header?: never;
18778
+ path?: never;
18779
+ cookie?: never;
18780
+ };
18781
+ requestBody?: never;
18782
+ responses: {
18783
+ /** @description Success */
18784
+ 200: {
18785
+ headers: {
18786
+ [name: string]: unknown;
18787
+ };
18788
+ content: {
18789
+ "application/json": {
18790
+ id: string;
18791
+ name: string;
18792
+ slug: string;
18793
+ isPersonal: boolean;
18794
+ };
18795
+ };
18796
+ };
18797
+ /** @description Bad Request */
18798
+ 400: {
18799
+ headers: {
18800
+ [name: string]: unknown;
18801
+ };
18802
+ content: {
18803
+ "application/json": {
18804
+ error: string;
18805
+ message?: string;
18806
+ };
18807
+ };
18808
+ };
18809
+ /** @description Unauthorized */
18810
+ 401: {
18811
+ headers: {
18812
+ [name: string]: unknown;
18813
+ };
18814
+ content: {
18815
+ "application/json": {
18170
18816
  error: string;
18171
18817
  message?: string;
18172
18818
  };
@@ -23754,6 +24400,24 @@ interface operations {
23754
24400
  metCriteria: string[];
23755
24401
  unmetCriteria: string[];
23756
24402
  error?: string;
24403
+ evaluations?: {
24404
+ evaluatorId: string;
24405
+ name: string;
24406
+ /** @enum {string} */
24407
+ status: "passed" | "failed" | "scored" | "skipped" | "error";
24408
+ required: boolean;
24409
+ passed?: boolean;
24410
+ score?: number;
24411
+ label?: string;
24412
+ details?: string;
24413
+ cost?: {
24414
+ currency: string;
24415
+ amount: number;
24416
+ };
24417
+ inputs?: {
24418
+ [key: string]: string;
24419
+ };
24420
+ }[];
23757
24421
  } | null;
23758
24422
  } | {
23759
24423
  /** @constant */
@@ -23893,6 +24557,35 @@ interface operations {
23893
24557
  content: string;
23894
24558
  encryptedValue?: string;
23895
24559
  }) | {
24560
+ role?: string;
24561
+ content: ({
24562
+ /** @constant */
24563
+ type: "text";
24564
+ text: string;
24565
+ citations?: unknown[] | null;
24566
+ } | {
24567
+ /** @constant */
24568
+ type: "tool_use";
24569
+ id: string;
24570
+ name: string;
24571
+ input?: unknown;
24572
+ } | {
24573
+ /** @constant */
24574
+ type: "tool_result";
24575
+ tool_use_id: string;
24576
+ content?: string | unknown[];
24577
+ is_error?: boolean;
24578
+ } | {
24579
+ /** @constant */
24580
+ type: "thinking";
24581
+ thinking: string;
24582
+ signature?: string;
24583
+ } | {
24584
+ /** @constant */
24585
+ type: "redacted_thinking";
24586
+ data: string;
24587
+ })[];
24588
+ } | {
23896
24589
  role?: "system" | "developer" | "user" | "assistant" | "function" | "tool" | "unknown";
23897
24590
  content?: string | ({
23898
24591
  /** @constant */
@@ -24435,6 +25128,10 @@ interface operations {
24435
25128
  minTurns?: number | null;
24436
25129
  /** @description The test suite this scenario is filed in, or null when unfiled. Absent on servers that predate test suites. */
24437
25130
  testSuiteId?: string | null;
25131
+ /** @description The value this scenario carries for each field its test suite declares, keyed by field identifier. A field with no value has no key. Absent on servers that predate suite fields. */
25132
+ fields?: {
25133
+ [key: string]: string | number | boolean;
25134
+ };
24438
25135
  /** Format: uri */
24439
25136
  platformUrl: string;
24440
25137
  }[];
@@ -24527,6 +25224,10 @@ interface operations {
24527
25224
  minTurns?: number | null;
24528
25225
  /** @description The test suite to file this scenario in. It must name a non-archived test suite of the same project. null files the scenario into the project's Default test suite. */
24529
25226
  testSuiteId?: string | null;
25227
+ /** @description The value for each field the test suite declares, keyed by field identifier: text, a number or a boolean, in the field's own type. A field the suite does not declare answers 422 scenario_field_unknown; a value of the wrong type answers 422 scenario_field_type_invalid. An empty value clears the field. */
25228
+ fields?: {
25229
+ [key: string]: string | number | boolean;
25230
+ };
24530
25231
  };
24531
25232
  };
24532
25233
  };
@@ -24563,6 +25264,10 @@ interface operations {
24563
25264
  minTurns?: number | null;
24564
25265
  /** @description The test suite this scenario is filed in, or null when unfiled. Absent on servers that predate test suites. */
24565
25266
  testSuiteId?: string | null;
25267
+ /** @description The value this scenario carries for each field its test suite declares, keyed by field identifier. A field with no value has no key. Absent on servers that predate suite fields. */
25268
+ fields?: {
25269
+ [key: string]: string | number | boolean;
25270
+ };
24566
25271
  /** Format: uri */
24567
25272
  platformUrl: string;
24568
25273
  };
@@ -24661,6 +25366,10 @@ interface operations {
24661
25366
  minTurns?: number | null;
24662
25367
  /** @description The test suite this scenario is filed in, or null when unfiled. Absent on servers that predate test suites. */
24663
25368
  testSuiteId?: string | null;
25369
+ /** @description The value this scenario carries for each field its test suite declares, keyed by field identifier. A field with no value has no key. Absent on servers that predate suite fields. */
25370
+ fields?: {
25371
+ [key: string]: string | number | boolean;
25372
+ };
24664
25373
  /** Format: uri */
24665
25374
  platformUrl: string;
24666
25375
  };
@@ -24765,6 +25474,10 @@ interface operations {
24765
25474
  minTurns?: number | null;
24766
25475
  /** @description The test suite to file this scenario in. It must name a non-archived test suite of the same project. null files the scenario into the project's Default test suite. */
24767
25476
  testSuiteId?: string | null;
25477
+ /** @description The value for each field the test suite declares, keyed by field identifier: text, a number or a boolean, in the field's own type. A field the suite does not declare answers 422 scenario_field_unknown; a value of the wrong type answers 422 scenario_field_type_invalid. An empty value clears the field. Send the full record; an empty record clears every value. */
25478
+ fields?: {
25479
+ [key: string]: string | number | boolean;
25480
+ };
24768
25481
  };
24769
25482
  };
24770
25483
  };
@@ -24801,6 +25514,10 @@ interface operations {
24801
25514
  minTurns?: number | null;
24802
25515
  /** @description The test suite this scenario is filed in, or null when unfiled. Absent on servers that predate test suites. */
24803
25516
  testSuiteId?: string | null;
25517
+ /** @description The value this scenario carries for each field its test suite declares, keyed by field identifier. A field with no value has no key. Absent on servers that predate suite fields. */
25518
+ fields?: {
25519
+ [key: string]: string | number | boolean;
25520
+ };
24804
25521
  /** Format: uri */
24805
25522
  platformUrl: string;
24806
25523
  };
@@ -24990,6 +25707,10 @@ interface operations {
24990
25707
  minTurns?: number | null;
24991
25708
  /** @description The test suite to file this scenario in. It must name a non-archived test suite of the same project. null files the scenario into the project's Default test suite. */
24992
25709
  testSuiteId?: string | null;
25710
+ /** @description The value for each field the test suite declares, keyed by field identifier: text, a number or a boolean, in the field's own type. A field the suite does not declare answers 422 scenario_field_unknown; a value of the wrong type answers 422 scenario_field_type_invalid. An empty value clears the field. Send the full record; an empty record clears every value. */
25711
+ fields?: {
25712
+ [key: string]: string | number | boolean;
25713
+ };
24993
25714
  };
24994
25715
  };
24995
25716
  };
@@ -25026,6 +25747,10 @@ interface operations {
25026
25747
  minTurns?: number | null;
25027
25748
  /** @description The test suite this scenario is filed in, or null when unfiled. Absent on servers that predate test suites. */
25028
25749
  testSuiteId?: string | null;
25750
+ /** @description The value this scenario carries for each field its test suite declares, keyed by field identifier. A field with no value has no key. Absent on servers that predate suite fields. */
25751
+ fields?: {
25752
+ [key: string]: string | number | boolean;
25753
+ };
25029
25754
  /** Format: uri */
25030
25755
  platformUrl: string;
25031
25756
  };
@@ -25251,6 +25976,10 @@ interface operations {
25251
25976
  judgeModel: string | null;
25252
25977
  maxTurns: number | null;
25253
25978
  minTurns: number | null;
25979
+ /** @description The field values as this version saved them. Absent on servers that predate suite fields. */
25980
+ fields?: {
25981
+ [key: string]: string | number | boolean;
25982
+ };
25254
25983
  };
25255
25984
  };
25256
25985
  };
@@ -26143,6 +26872,25 @@ interface operations {
26143
26872
  metCriteria?: string[];
26144
26873
  unmetCriteria?: string[];
26145
26874
  error?: string | null;
26875
+ /** @description One result per evaluator that ran on the scenario. Absent on a run with no evaluators, and on servers that predate evaluators. */
26876
+ evaluations?: {
26877
+ evaluatorId: string;
26878
+ name: string;
26879
+ /** @enum {string} */
26880
+ status: "passed" | "failed" | "scored" | "skipped" | "error";
26881
+ required: boolean;
26882
+ passed?: boolean;
26883
+ score?: number;
26884
+ label?: string;
26885
+ details?: string;
26886
+ cost?: {
26887
+ currency: string;
26888
+ amount: number;
26889
+ };
26890
+ inputs?: {
26891
+ [key: string]: string;
26892
+ };
26893
+ }[];
26146
26894
  } | null;
26147
26895
  messages: {
26148
26896
  role: string;
@@ -26246,6 +26994,25 @@ interface operations {
26246
26994
  metCriteria?: string[];
26247
26995
  unmetCriteria?: string[];
26248
26996
  error?: string | null;
26997
+ /** @description One result per evaluator that ran on the scenario. Absent on a run with no evaluators, and on servers that predate evaluators. */
26998
+ evaluations?: {
26999
+ evaluatorId: string;
27000
+ name: string;
27001
+ /** @enum {string} */
27002
+ status: "passed" | "failed" | "scored" | "skipped" | "error";
27003
+ required: boolean;
27004
+ passed?: boolean;
27005
+ score?: number;
27006
+ label?: string;
27007
+ details?: string;
27008
+ cost?: {
27009
+ currency: string;
27010
+ amount: number;
27011
+ };
27012
+ inputs?: {
27013
+ [key: string]: string;
27014
+ };
27015
+ }[];
26249
27016
  } | null;
26250
27017
  messages: {
26251
27018
  role: string;
@@ -27532,6 +28299,29 @@ interface operations {
27532
28299
  judgeModel: string | null;
27533
28300
  /** @description The labels the plan carries. */
27534
28301
  labels: string[];
28302
+ /** @description The plan's own evaluators. Absent on servers that predate evaluators on this family. */
28303
+ evaluators?: {
28304
+ /** @description The attachment id. Stable across edits of the attachment. */
28305
+ id: string;
28306
+ /** @description The id of the saved evaluator this attachment runs. */
28307
+ evaluatorId: string;
28308
+ /** @description Whether a failing result fails the scenario. A score-only evaluator reports and never gates. */
28309
+ required: boolean;
28310
+ /** @description Where each evaluator input reads its value, keyed by input name. Inputs left out are unmapped; a required input left unmapped refuses the run. */
28311
+ mappings: {
28312
+ [key: string]: {
28313
+ /** @constant */
28314
+ type: "source";
28315
+ /** @enum {string} */
28316
+ sourceId: "conversation" | "scenario" | "trace";
28317
+ path: string[];
28318
+ } | {
28319
+ /** @constant */
28320
+ type: "value";
28321
+ value: string;
28322
+ };
28323
+ };
28324
+ }[];
27535
28325
  /** @description When the plan was archived, or null while it is active. */
27536
28326
  archivedAt: string | null;
27537
28327
  /** @description When the plan was created. */
@@ -27600,6 +28390,29 @@ interface operations {
27600
28390
  judgeModel?: string | null;
27601
28391
  /** @description The scenarios a test_suites or scenarios scope covers. Read by a scenarios scope alone; a scope that states a rule resolves its own list at run time. */
27602
28392
  scenarioIds?: string[];
28393
+ /** @description The plan's own evaluators, run beside the ones attached to the test suites its scenarios belong to. A plan evaluator reads the conversation and the trace, never a scenario field. Leave it out to keep what the plan already holds. */
28394
+ evaluators?: {
28395
+ /** @description The attachment id. Stable across edits of the attachment. */
28396
+ id: string;
28397
+ /** @description The id of the saved evaluator this attachment runs. */
28398
+ evaluatorId: string;
28399
+ /** @description Whether a failing result fails the scenario. A score-only evaluator reports and never gates. */
28400
+ required: boolean;
28401
+ /** @description Where each evaluator input reads its value, keyed by input name. Inputs left out are unmapped; a required input left unmapped refuses the run. */
28402
+ mappings: {
28403
+ [key: string]: {
28404
+ /** @constant */
28405
+ type: "source";
28406
+ /** @enum {string} */
28407
+ sourceId: "conversation" | "scenario" | "trace";
28408
+ path: string[];
28409
+ } | {
28410
+ /** @constant */
28411
+ type: "value";
28412
+ value: string;
28413
+ };
28414
+ };
28415
+ }[];
27603
28416
  };
27604
28417
  /** @description Repeat the same key to make a retry join the batch the first call started instead of running everything again. Defaults to a new key per call. */
27605
28418
  idempotencyKey?: string;
@@ -27739,6 +28552,29 @@ interface operations {
27739
28552
  judgeModel: string | null;
27740
28553
  /** @description The labels the plan carries. */
27741
28554
  labels: string[];
28555
+ /** @description The plan's own evaluators. Absent on servers that predate evaluators on this family. */
28556
+ evaluators?: {
28557
+ /** @description The attachment id. Stable across edits of the attachment. */
28558
+ id: string;
28559
+ /** @description The id of the saved evaluator this attachment runs. */
28560
+ evaluatorId: string;
28561
+ /** @description Whether a failing result fails the scenario. A score-only evaluator reports and never gates. */
28562
+ required: boolean;
28563
+ /** @description Where each evaluator input reads its value, keyed by input name. Inputs left out are unmapped; a required input left unmapped refuses the run. */
28564
+ mappings: {
28565
+ [key: string]: {
28566
+ /** @constant */
28567
+ type: "source";
28568
+ /** @enum {string} */
28569
+ sourceId: "conversation" | "scenario" | "trace";
28570
+ path: string[];
28571
+ } | {
28572
+ /** @constant */
28573
+ type: "value";
28574
+ value: string;
28575
+ };
28576
+ };
28577
+ }[];
27742
28578
  /** @description When the plan was archived, or null while it is active. */
27743
28579
  archivedAt: string | null;
27744
28580
  /** @description When the plan was created. */
@@ -27901,6 +28737,39 @@ interface operations {
27901
28737
  scenarioIds: string[];
27902
28738
  /** @description How many scenarios are filed in it. */
27903
28739
  scenarioCount: number;
28740
+ /** @description The fields the test suite declares. Absent on servers that predate fields on this family. */
28741
+ fields?: {
28742
+ /** @description The field name, as scenarios and evaluator mappings address it. Lowercase letters, digits and underscores, starting with a letter. */
28743
+ identifier: string;
28744
+ /**
28745
+ * @description The value type every scenario carries for this field.
28746
+ * @enum {string}
28747
+ */
28748
+ type: "text" | "number" | "boolean";
28749
+ }[];
28750
+ /** @description The evaluators attached to the test suite. Absent on servers that predate evaluators on this family. */
28751
+ evaluators?: {
28752
+ /** @description The attachment id. Stable across edits of the attachment. */
28753
+ id: string;
28754
+ /** @description The id of the saved evaluator this attachment runs. */
28755
+ evaluatorId: string;
28756
+ /** @description Whether a failing result fails the scenario. A score-only evaluator reports and never gates. */
28757
+ required: boolean;
28758
+ /** @description Where each evaluator input reads its value, keyed by input name. Inputs left out are unmapped; a required input left unmapped refuses the run. */
28759
+ mappings: {
28760
+ [key: string]: {
28761
+ /** @constant */
28762
+ type: "source";
28763
+ /** @enum {string} */
28764
+ sourceId: "conversation" | "scenario" | "trace";
28765
+ path: string[];
28766
+ } | {
28767
+ /** @constant */
28768
+ type: "value";
28769
+ value: string;
28770
+ };
28771
+ };
28772
+ }[];
27904
28773
  /** @description When the suite was archived, or null while it is active. */
27905
28774
  archivedAt: string | null;
27906
28775
  /** @description When the suite was created. */
@@ -27929,6 +28798,39 @@ interface operations {
27929
28798
  "application/json": {
27930
28799
  /** @description The test suite name, as it reads in the platform. */
27931
28800
  name: string;
28801
+ /** @description The fields the test suite declares, in the order the platform shows them. Up to 30. An identifier is lowercase letters, digits and underscores, starting with a letter; the type is text, number or boolean. */
28802
+ fields?: {
28803
+ /** @description The field name, as scenarios and evaluator mappings address it. Lowercase letters, digits and underscores, starting with a letter. */
28804
+ identifier: string;
28805
+ /**
28806
+ * @description The value type every scenario carries for this field.
28807
+ * @enum {string}
28808
+ */
28809
+ type: "text" | "number" | "boolean";
28810
+ }[];
28811
+ /** @description The evaluators that run after every scenario run. Up to 20. A required evaluator that fails fails the scenario; a score-only evaluator reports and never gates. */
28812
+ evaluators?: {
28813
+ /** @description The attachment id. Stable across edits of the attachment. */
28814
+ id: string;
28815
+ /** @description The id of the saved evaluator this attachment runs. */
28816
+ evaluatorId: string;
28817
+ /** @description Whether a failing result fails the scenario. A score-only evaluator reports and never gates. */
28818
+ required: boolean;
28819
+ /** @description Where each evaluator input reads its value, keyed by input name. Inputs left out are unmapped; a required input left unmapped refuses the run. */
28820
+ mappings: {
28821
+ [key: string]: {
28822
+ /** @constant */
28823
+ type: "source";
28824
+ /** @enum {string} */
28825
+ sourceId: "conversation" | "scenario" | "trace";
28826
+ path: string[];
28827
+ } | {
28828
+ /** @constant */
28829
+ type: "value";
28830
+ value: string;
28831
+ };
28832
+ };
28833
+ }[];
27932
28834
  };
27933
28835
  };
27934
28836
  };
@@ -27950,6 +28852,39 @@ interface operations {
27950
28852
  scenarioIds: string[];
27951
28853
  /** @description How many scenarios are filed in it. */
27952
28854
  scenarioCount: number;
28855
+ /** @description The fields the test suite declares. Absent on servers that predate fields on this family. */
28856
+ fields?: {
28857
+ /** @description The field name, as scenarios and evaluator mappings address it. Lowercase letters, digits and underscores, starting with a letter. */
28858
+ identifier: string;
28859
+ /**
28860
+ * @description The value type every scenario carries for this field.
28861
+ * @enum {string}
28862
+ */
28863
+ type: "text" | "number" | "boolean";
28864
+ }[];
28865
+ /** @description The evaluators attached to the test suite. Absent on servers that predate evaluators on this family. */
28866
+ evaluators?: {
28867
+ /** @description The attachment id. Stable across edits of the attachment. */
28868
+ id: string;
28869
+ /** @description The id of the saved evaluator this attachment runs. */
28870
+ evaluatorId: string;
28871
+ /** @description Whether a failing result fails the scenario. A score-only evaluator reports and never gates. */
28872
+ required: boolean;
28873
+ /** @description Where each evaluator input reads its value, keyed by input name. Inputs left out are unmapped; a required input left unmapped refuses the run. */
28874
+ mappings: {
28875
+ [key: string]: {
28876
+ /** @constant */
28877
+ type: "source";
28878
+ /** @enum {string} */
28879
+ sourceId: "conversation" | "scenario" | "trace";
28880
+ path: string[];
28881
+ } | {
28882
+ /** @constant */
28883
+ type: "value";
28884
+ value: string;
28885
+ };
28886
+ };
28887
+ }[];
27953
28888
  /** @description When the suite was archived, or null while it is active. */
27954
28889
  archivedAt: string | null;
27955
28890
  /** @description When the suite was created. */
@@ -27995,6 +28930,39 @@ interface operations {
27995
28930
  scenarioIds: string[];
27996
28931
  /** @description How many scenarios are filed in it. */
27997
28932
  scenarioCount: number;
28933
+ /** @description The fields the test suite declares. Absent on servers that predate fields on this family. */
28934
+ fields?: {
28935
+ /** @description The field name, as scenarios and evaluator mappings address it. Lowercase letters, digits and underscores, starting with a letter. */
28936
+ identifier: string;
28937
+ /**
28938
+ * @description The value type every scenario carries for this field.
28939
+ * @enum {string}
28940
+ */
28941
+ type: "text" | "number" | "boolean";
28942
+ }[];
28943
+ /** @description The evaluators attached to the test suite. Absent on servers that predate evaluators on this family. */
28944
+ evaluators?: {
28945
+ /** @description The attachment id. Stable across edits of the attachment. */
28946
+ id: string;
28947
+ /** @description The id of the saved evaluator this attachment runs. */
28948
+ evaluatorId: string;
28949
+ /** @description Whether a failing result fails the scenario. A score-only evaluator reports and never gates. */
28950
+ required: boolean;
28951
+ /** @description Where each evaluator input reads its value, keyed by input name. Inputs left out are unmapped; a required input left unmapped refuses the run. */
28952
+ mappings: {
28953
+ [key: string]: {
28954
+ /** @constant */
28955
+ type: "source";
28956
+ /** @enum {string} */
28957
+ sourceId: "conversation" | "scenario" | "trace";
28958
+ path: string[];
28959
+ } | {
28960
+ /** @constant */
28961
+ type: "value";
28962
+ value: string;
28963
+ };
28964
+ };
28965
+ }[];
27998
28966
  /** @description When the suite was archived, or null while it is active. */
27999
28967
  archivedAt: string | null;
28000
28968
  /** @description When the suite was created. */
@@ -28049,7 +29017,7 @@ interface operations {
28049
29017
  };
28050
29018
  };
28051
29019
  };
28052
- renameTestSuite: {
29020
+ updateTestSuite: {
28053
29021
  parameters: {
28054
29022
  query?: never;
28055
29023
  header?: never;
@@ -28062,8 +29030,41 @@ interface operations {
28062
29030
  requestBody: {
28063
29031
  content: {
28064
29032
  "application/json": {
28065
- /** @description The test suite name, as it reads in the platform. */
28066
- name: string;
29033
+ /** @description The new name. The slug is kept. */
29034
+ name?: string;
29035
+ /** @description The full list of fields the suite declares. A field an attached evaluator still reads cannot be removed: answers 422 suite_field_in_use. */
29036
+ fields?: {
29037
+ /** @description The field name, as scenarios and evaluator mappings address it. Lowercase letters, digits and underscores, starting with a letter. */
29038
+ identifier: string;
29039
+ /**
29040
+ * @description The value type every scenario carries for this field.
29041
+ * @enum {string}
29042
+ */
29043
+ type: "text" | "number" | "boolean";
29044
+ }[];
29045
+ /** @description The full list of evaluators attached to the suite. An evaluator the project does not hold answers 422 suite_evaluator_not_found; a mapping the run cannot read answers 422 suite_evaluator_mapping_invalid. */
29046
+ evaluators?: {
29047
+ /** @description The attachment id. Stable across edits of the attachment. */
29048
+ id: string;
29049
+ /** @description The id of the saved evaluator this attachment runs. */
29050
+ evaluatorId: string;
29051
+ /** @description Whether a failing result fails the scenario. A score-only evaluator reports and never gates. */
29052
+ required: boolean;
29053
+ /** @description Where each evaluator input reads its value, keyed by input name. Inputs left out are unmapped; a required input left unmapped refuses the run. */
29054
+ mappings: {
29055
+ [key: string]: {
29056
+ /** @constant */
29057
+ type: "source";
29058
+ /** @enum {string} */
29059
+ sourceId: "conversation" | "scenario" | "trace";
29060
+ path: string[];
29061
+ } | {
29062
+ /** @constant */
29063
+ type: "value";
29064
+ value: string;
29065
+ };
29066
+ };
29067
+ }[];
28067
29068
  };
28068
29069
  };
28069
29070
  };
@@ -28085,6 +29086,39 @@ interface operations {
28085
29086
  scenarioIds: string[];
28086
29087
  /** @description How many scenarios are filed in it. */
28087
29088
  scenarioCount: number;
29089
+ /** @description The fields the test suite declares. Absent on servers that predate fields on this family. */
29090
+ fields?: {
29091
+ /** @description The field name, as scenarios and evaluator mappings address it. Lowercase letters, digits and underscores, starting with a letter. */
29092
+ identifier: string;
29093
+ /**
29094
+ * @description The value type every scenario carries for this field.
29095
+ * @enum {string}
29096
+ */
29097
+ type: "text" | "number" | "boolean";
29098
+ }[];
29099
+ /** @description The evaluators attached to the test suite. Absent on servers that predate evaluators on this family. */
29100
+ evaluators?: {
29101
+ /** @description The attachment id. Stable across edits of the attachment. */
29102
+ id: string;
29103
+ /** @description The id of the saved evaluator this attachment runs. */
29104
+ evaluatorId: string;
29105
+ /** @description Whether a failing result fails the scenario. A score-only evaluator reports and never gates. */
29106
+ required: boolean;
29107
+ /** @description Where each evaluator input reads its value, keyed by input name. Inputs left out are unmapped; a required input left unmapped refuses the run. */
29108
+ mappings: {
29109
+ [key: string]: {
29110
+ /** @constant */
29111
+ type: "source";
29112
+ /** @enum {string} */
29113
+ sourceId: "conversation" | "scenario" | "trace";
29114
+ path: string[];
29115
+ } | {
29116
+ /** @constant */
29117
+ type: "value";
29118
+ value: string;
29119
+ };
29120
+ };
29121
+ }[];
28088
29122
  /** @description When the suite was archived, or null while it is active. */
28089
29123
  archivedAt: string | null;
28090
29124
  /** @description When the suite was created. */