langwatch 1.12.1 → 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-OSVJ65OO.js → chunk-7R54TMZZ.js} +2 -2
  8. package/dist/{chunk-OSVJ65OO.js.map → chunk-7R54TMZZ.js.map} +1 -1
  9. package/dist/{chunk-H2DJGGYQ.js → chunk-G64XZMIU.js} +12 -12
  10. package/dist/{chunk-H2DJGGYQ.js.map → chunk-G64XZMIU.js.map} +1 -1
  11. package/dist/{chunk-53NOLJEX.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-IVRETMQH.mjs → chunk-UHRSTPZ5.mjs} +2 -2
  17. package/dist/{chunk-IVRETMQH.mjs.map → chunk-UHRSTPZ5.mjs.map} +1 -1
  18. package/dist/cli/bundle.js +362 -358
  19. package/dist/{implementation-BNaydX6f.d.ts → implementation-BDK4X-CS.d.ts} +1 -1
  20. package/dist/{implementation-DLMEZQgA.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 +324 -99
  24. package/dist/index.js.map +1 -1
  25. package/dist/index.mjs +242 -17
  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-CLDQMYpV.d.ts → types-C3SDhizh.d.ts} +1138 -111
  38. package/dist/{types-DWNdXOWw.d.mts → types-C9abONOS.d.mts} +1138 -111
  39. package/package.json +1 -1
  40. package/dist/chunk-4ERRCKOH.js.map +0 -1
  41. /package/dist/{chunk-53NOLJEX.mjs.map → chunk-N3755EHD.mjs.map} +0 -0
@@ -2678,6 +2678,108 @@ interface paths {
2678
2678
  patch: operations["patchApiGraphsById"];
2679
2679
  trace?: never;
2680
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
+ };
2681
2783
  "/api/me/usage": {
2682
2784
  parameters: {
2683
2785
  query?: never;
@@ -3902,7 +4004,7 @@ interface paths {
3902
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. */
3903
4005
  get: operations["listTestSuites"];
3904
4006
  put?: never;
3905
- /** @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. */
3906
4008
  post: operations["createTestSuite"];
3907
4009
  delete?: never;
3908
4010
  options?: never;
@@ -3928,8 +4030,8 @@ interface paths {
3928
4030
  delete: operations["archiveTestSuite"];
3929
4031
  options?: never;
3930
4032
  head?: never;
3931
- /** @description Rename a test suite. The slug is kept, so links and run history stay where they are. */
3932
- 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"];
3933
4035
  trace?: never;
3934
4036
  };
3935
4037
  "/api/v1/test-suites/{id}/run": {
@@ -5734,6 +5836,13 @@ interface operations {
5734
5836
  inflight: number;
5735
5837
  maxConcurrency: number;
5736
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;
5737
5846
  createdAt: string;
5738
5847
  updatedAt: string;
5739
5848
  /** Format: uri */
@@ -5836,6 +5945,13 @@ interface operations {
5836
5945
  inflight: number;
5837
5946
  maxConcurrency: number;
5838
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;
5839
5955
  createdAt: string;
5840
5956
  updatedAt: string;
5841
5957
  /** Format: uri */
@@ -5919,6 +6035,13 @@ interface operations {
5919
6035
  inflight: number;
5920
6036
  maxConcurrency: number;
5921
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;
5922
6045
  createdAt: string;
5923
6046
  updatedAt: string;
5924
6047
  /** Format: uri */
@@ -6017,6 +6140,13 @@ interface operations {
6017
6140
  inflight: number;
6018
6141
  maxConcurrency: number;
6019
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;
6020
6150
  createdAt: string;
6021
6151
  updatedAt: string;
6022
6152
  /** Format: uri */
@@ -6144,6 +6274,13 @@ interface operations {
6144
6274
  inflight: number;
6145
6275
  maxConcurrency: number;
6146
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;
6147
6284
  createdAt: string;
6148
6285
  updatedAt: string;
6149
6286
  /** Format: uri */
@@ -6202,6 +6339,13 @@ interface operations {
6202
6339
  };
6203
6340
  content?: never;
6204
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
+ };
6205
6349
  };
6206
6350
  };
6207
6351
  callConnectedAgent: {
@@ -18037,102 +18181,110 @@ interface operations {
18037
18181
  };
18038
18182
  };
18039
18183
  };
18040
- getApiMeUsage: {
18184
+ registerLangyControlSession: {
18041
18185
  parameters: {
18042
- query?: {
18043
- windowStartMs?: number;
18044
- windowEndMs?: number;
18045
- };
18186
+ query?: never;
18046
18187
  header?: never;
18047
18188
  path?: never;
18048
18189
  cookie?: never;
18049
18190
  };
18050
- requestBody?: never;
18051
- responses: {
18052
- /** @description Success */
18053
- 200: {
18054
- headers: {
18055
- [name: string]: unknown;
18056
- };
18057
- content: {
18058
- "application/json": {
18059
- summary: {
18060
- spentUsd: number;
18061
- billedUsd: number;
18062
- requests: number;
18063
- promptTokens: number;
18064
- completionTokens: number;
18065
- mostUsedModel: {
18066
- name: string;
18067
- usagePct: number;
18068
- } | null;
18069
- };
18070
- dailyBuckets: {
18071
- day: string;
18072
- spentUsd: number;
18073
- billedUsd: number;
18074
- requests: number;
18075
- }[];
18076
- breakdownByModel: {
18077
- label: string;
18078
- spentUsd: number;
18079
- billedUsd: number;
18080
- requests: number;
18081
- }[];
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;
18082
18222
  };
18083
18223
  };
18084
18224
  };
18085
- /** @description Bad Request */
18086
- 400: {
18225
+ };
18226
+ responses: {
18227
+ /** @description The folder is shared */
18228
+ 200: {
18087
18229
  headers: {
18088
18230
  [name: string]: unknown;
18089
18231
  };
18090
18232
  content: {
18091
18233
  "application/json": {
18092
- error: string;
18093
- 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;
18094
18261
  };
18095
18262
  };
18096
18263
  };
18097
- /** @description Unauthorized */
18264
+ /** @description The session key is not valid: a refused frame */
18098
18265
  401: {
18099
18266
  headers: {
18100
18267
  [name: string]: unknown;
18101
18268
  };
18102
- content: {
18103
- "application/json": {
18104
- error: string;
18105
- message?: string;
18106
- };
18107
- };
18269
+ content?: never;
18108
18270
  };
18109
- /** @description Unprocessable Entity */
18110
- 422: {
18271
+ /** @description The key is not a Langy session key, or it controls no conversation: a refused frame */
18272
+ 403: {
18111
18273
  headers: {
18112
18274
  [name: string]: unknown;
18113
18275
  };
18114
- content: {
18115
- "application/json": {
18116
- error: string;
18117
- message?: string;
18118
- };
18119
- };
18276
+ content?: never;
18120
18277
  };
18121
- /** @description Internal Server Error */
18122
- 500: {
18278
+ /** @description The body is not a register frame */
18279
+ 422: {
18123
18280
  headers: {
18124
18281
  [name: string]: unknown;
18125
18282
  };
18126
- content: {
18127
- "application/json": {
18128
- error: string;
18129
- message?: string;
18130
- };
18131
- };
18283
+ content?: never;
18132
18284
  };
18133
18285
  };
18134
18286
  };
18135
- getApiMeProject: {
18287
+ pollLangyControlSession: {
18136
18288
  parameters: {
18137
18289
  query?: never;
18138
18290
  header?: never;
@@ -18141,52 +18293,539 @@ interface operations {
18141
18293
  };
18142
18294
  requestBody?: never;
18143
18295
  responses: {
18144
- /** @description Success */
18296
+ /** @description The frames waiting for the folder, possibly none */
18145
18297
  200: {
18146
18298
  headers: {
18147
18299
  [name: string]: unknown;
18148
18300
  };
18149
18301
  content: {
18150
18302
  "application/json": {
18151
- id: string;
18152
- name: string;
18153
- slug: string;
18154
- isPersonal: boolean;
18155
- };
18156
- };
18157
- };
18158
- /** @description Bad Request */
18159
- 400: {
18160
- headers: {
18161
- [name: string]: unknown;
18162
- };
18163
- content: {
18164
- "application/json": {
18165
- error: string;
18166
- message?: string;
18167
- };
18168
- };
18169
- };
18170
- /** @description Unauthorized */
18171
- 401: {
18172
- headers: {
18173
- [name: string]: unknown;
18174
- };
18175
- content: {
18176
- "application/json": {
18177
- error: string;
18178
- message?: string;
18179
- };
18180
- };
18181
- };
18182
- /** @description Unprocessable Entity */
18183
- 422: {
18184
- headers: {
18185
- [name: string]: unknown;
18186
- };
18187
- content: {
18188
- "application/json": {
18189
- error: string;
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": {
18816
+ error: string;
18817
+ message?: string;
18818
+ };
18819
+ };
18820
+ };
18821
+ /** @description Unprocessable Entity */
18822
+ 422: {
18823
+ headers: {
18824
+ [name: string]: unknown;
18825
+ };
18826
+ content: {
18827
+ "application/json": {
18828
+ error: string;
18190
18829
  message?: string;
18191
18830
  };
18192
18831
  };
@@ -23761,6 +24400,24 @@ interface operations {
23761
24400
  metCriteria: string[];
23762
24401
  unmetCriteria: string[];
23763
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
+ }[];
23764
24421
  } | null;
23765
24422
  } | {
23766
24423
  /** @constant */
@@ -23900,6 +24557,35 @@ interface operations {
23900
24557
  content: string;
23901
24558
  encryptedValue?: string;
23902
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
+ } | {
23903
24589
  role?: "system" | "developer" | "user" | "assistant" | "function" | "tool" | "unknown";
23904
24590
  content?: string | ({
23905
24591
  /** @constant */
@@ -24442,6 +25128,10 @@ interface operations {
24442
25128
  minTurns?: number | null;
24443
25129
  /** @description The test suite this scenario is filed in, or null when unfiled. Absent on servers that predate test suites. */
24444
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
+ };
24445
25135
  /** Format: uri */
24446
25136
  platformUrl: string;
24447
25137
  }[];
@@ -24534,6 +25224,10 @@ interface operations {
24534
25224
  minTurns?: number | null;
24535
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. */
24536
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
+ };
24537
25231
  };
24538
25232
  };
24539
25233
  };
@@ -24570,6 +25264,10 @@ interface operations {
24570
25264
  minTurns?: number | null;
24571
25265
  /** @description The test suite this scenario is filed in, or null when unfiled. Absent on servers that predate test suites. */
24572
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
+ };
24573
25271
  /** Format: uri */
24574
25272
  platformUrl: string;
24575
25273
  };
@@ -24668,6 +25366,10 @@ interface operations {
24668
25366
  minTurns?: number | null;
24669
25367
  /** @description The test suite this scenario is filed in, or null when unfiled. Absent on servers that predate test suites. */
24670
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
+ };
24671
25373
  /** Format: uri */
24672
25374
  platformUrl: string;
24673
25375
  };
@@ -24772,6 +25474,10 @@ interface operations {
24772
25474
  minTurns?: number | null;
24773
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. */
24774
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
+ };
24775
25481
  };
24776
25482
  };
24777
25483
  };
@@ -24808,6 +25514,10 @@ interface operations {
24808
25514
  minTurns?: number | null;
24809
25515
  /** @description The test suite this scenario is filed in, or null when unfiled. Absent on servers that predate test suites. */
24810
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
+ };
24811
25521
  /** Format: uri */
24812
25522
  platformUrl: string;
24813
25523
  };
@@ -24997,6 +25707,10 @@ interface operations {
24997
25707
  minTurns?: number | null;
24998
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. */
24999
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
+ };
25000
25714
  };
25001
25715
  };
25002
25716
  };
@@ -25033,6 +25747,10 @@ interface operations {
25033
25747
  minTurns?: number | null;
25034
25748
  /** @description The test suite this scenario is filed in, or null when unfiled. Absent on servers that predate test suites. */
25035
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
+ };
25036
25754
  /** Format: uri */
25037
25755
  platformUrl: string;
25038
25756
  };
@@ -25258,6 +25976,10 @@ interface operations {
25258
25976
  judgeModel: string | null;
25259
25977
  maxTurns: number | null;
25260
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
+ };
25261
25983
  };
25262
25984
  };
25263
25985
  };
@@ -26150,6 +26872,25 @@ interface operations {
26150
26872
  metCriteria?: string[];
26151
26873
  unmetCriteria?: string[];
26152
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
+ }[];
26153
26894
  } | null;
26154
26895
  messages: {
26155
26896
  role: string;
@@ -26253,6 +26994,25 @@ interface operations {
26253
26994
  metCriteria?: string[];
26254
26995
  unmetCriteria?: string[];
26255
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
+ }[];
26256
27016
  } | null;
26257
27017
  messages: {
26258
27018
  role: string;
@@ -27539,6 +28299,29 @@ interface operations {
27539
28299
  judgeModel: string | null;
27540
28300
  /** @description The labels the plan carries. */
27541
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
+ }[];
27542
28325
  /** @description When the plan was archived, or null while it is active. */
27543
28326
  archivedAt: string | null;
27544
28327
  /** @description When the plan was created. */
@@ -27607,6 +28390,29 @@ interface operations {
27607
28390
  judgeModel?: string | null;
27608
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. */
27609
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
+ }[];
27610
28416
  };
27611
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. */
27612
28418
  idempotencyKey?: string;
@@ -27746,6 +28552,29 @@ interface operations {
27746
28552
  judgeModel: string | null;
27747
28553
  /** @description The labels the plan carries. */
27748
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
+ }[];
27749
28578
  /** @description When the plan was archived, or null while it is active. */
27750
28579
  archivedAt: string | null;
27751
28580
  /** @description When the plan was created. */
@@ -27908,6 +28737,39 @@ interface operations {
27908
28737
  scenarioIds: string[];
27909
28738
  /** @description How many scenarios are filed in it. */
27910
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
+ }[];
27911
28773
  /** @description When the suite was archived, or null while it is active. */
27912
28774
  archivedAt: string | null;
27913
28775
  /** @description When the suite was created. */
@@ -27936,6 +28798,39 @@ interface operations {
27936
28798
  "application/json": {
27937
28799
  /** @description The test suite name, as it reads in the platform. */
27938
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
+ }[];
27939
28834
  };
27940
28835
  };
27941
28836
  };
@@ -27957,6 +28852,39 @@ interface operations {
27957
28852
  scenarioIds: string[];
27958
28853
  /** @description How many scenarios are filed in it. */
27959
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
+ }[];
27960
28888
  /** @description When the suite was archived, or null while it is active. */
27961
28889
  archivedAt: string | null;
27962
28890
  /** @description When the suite was created. */
@@ -28002,6 +28930,39 @@ interface operations {
28002
28930
  scenarioIds: string[];
28003
28931
  /** @description How many scenarios are filed in it. */
28004
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
+ }[];
28005
28966
  /** @description When the suite was archived, or null while it is active. */
28006
28967
  archivedAt: string | null;
28007
28968
  /** @description When the suite was created. */
@@ -28056,7 +29017,7 @@ interface operations {
28056
29017
  };
28057
29018
  };
28058
29019
  };
28059
- renameTestSuite: {
29020
+ updateTestSuite: {
28060
29021
  parameters: {
28061
29022
  query?: never;
28062
29023
  header?: never;
@@ -28069,8 +29030,41 @@ interface operations {
28069
29030
  requestBody: {
28070
29031
  content: {
28071
29032
  "application/json": {
28072
- /** @description The test suite name, as it reads in the platform. */
28073
- 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
+ }[];
28074
29068
  };
28075
29069
  };
28076
29070
  };
@@ -28092,6 +29086,39 @@ interface operations {
28092
29086
  scenarioIds: string[];
28093
29087
  /** @description How many scenarios are filed in it. */
28094
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
+ }[];
28095
29122
  /** @description When the suite was archived, or null while it is active. */
28096
29123
  archivedAt: string | null;
28097
29124
  /** @description When the suite was created. */