@slates/proto 1.0.0-rc.26 → 1.0.0-rc.27

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.
@@ -7,7 +7,7 @@ import {
7
7
  } from "@lowerdeck/error";
8
8
 
9
9
  // src/messages/action.ts
10
- import z8 from "zod";
10
+ import z9 from "zod";
11
11
 
12
12
  // src/types/action.ts
13
13
  import z from "zod";
@@ -94,7 +94,7 @@ var slatesAuthenticationMethod = z3.object({
94
94
  handleChangedInput: z3.object({ enabled: z3.boolean() }).optional(),
95
95
  handleTokenRefresh: z3.object({ enabled: z3.boolean() }).optional(),
96
96
  getProfile: z3.object({ enabled: z3.boolean() }).optional(),
97
- adminSetup: z3.object({ enabled: z3.boolean() }).optional()
97
+ adminSetup: z3.object({ enabled: z3.boolean(), required: z3.boolean().optional() }).optional()
98
98
  }),
99
99
  docs: z3.array(
100
100
  z3.object({
@@ -111,196 +111,232 @@ var slatesAuthenticationMethod = z3.object({
111
111
  )
112
112
  });
113
113
 
114
- // src/types/participant.ts
114
+ // src/types/error.ts
115
+ import z5 from "zod";
116
+
117
+ // src/messages/tracing.ts
115
118
  import z4 from "zod";
116
- var slatesParticipant = z4.object({
117
- type: z4.union([z4.literal("consumer"), z4.literal("hub")]),
118
- id: z4.string(),
119
- name: z4.string(),
120
- description: z4.string().optional(),
121
- metadata: z4.record(z4.string(), z4.any()).optional()
119
+ var slatesRequestTraceTextBody = z4.object({
120
+ contentType: z4.string().optional(),
121
+ text: z4.string(),
122
+ truncated: z4.boolean().optional()
123
+ });
124
+ var slatesRequestTrace = z4.object({
125
+ startedAt: z4.string(),
126
+ durationMs: z4.number().nonnegative(),
127
+ request: z4.object({
128
+ method: z4.string(),
129
+ url: z4.string(),
130
+ headers: z4.record(z4.string(), z4.string()).optional(),
131
+ body: slatesRequestTraceTextBody.optional()
132
+ }),
133
+ response: z4.object({
134
+ status: z4.number(),
135
+ statusText: z4.string().optional(),
136
+ headers: z4.record(z4.string(), z4.string()).optional(),
137
+ body: slatesRequestTraceTextBody.optional()
138
+ }).optional(),
139
+ error: z4.object({
140
+ code: z4.string().optional(),
141
+ message: z4.string()
142
+ }).optional()
143
+ });
144
+ var withRequestTraces = (shape) => z4.object({
145
+ ...shape,
146
+ requestTraces: z4.array(slatesRequestTrace).optional()
147
+ });
148
+
149
+ // src/types/error.ts
150
+ var slatesErrorResponse = z5.looseObject({
151
+ code: z5.string(),
152
+ kind: z5.string(),
153
+ message: z5.string(),
154
+ retryable: z5.boolean().optional(),
155
+ status: z5.number().optional(),
156
+ issues: z5.array(
157
+ z5.looseObject({
158
+ path: z5.array(z5.string()).optional(),
159
+ code: z5.string().optional(),
160
+ message: z5.string()
161
+ })
162
+ ).optional(),
163
+ provider: z5.looseObject({
164
+ key: z5.string().optional(),
165
+ service: z5.string().optional(),
166
+ operation: z5.string().optional()
167
+ }).optional(),
168
+ upstream: z5.looseObject({
169
+ status: z5.number().optional(),
170
+ code: z5.string().optional(),
171
+ type: z5.string().optional(),
172
+ requestId: z5.string().optional(),
173
+ method: z5.string().optional(),
174
+ url: z5.string().optional()
175
+ }).optional(),
176
+ // The upstream API's own error code, next to the normalized protocol `code`.
177
+ upstreamCode: z5.string().optional(),
178
+ baggage: z5.record(z5.string(), z5.unknown()).optional(),
179
+ requestTraces: z5.array(slatesRequestTrace).optional()
180
+ });
181
+
182
+ // src/types/participant.ts
183
+ import z6 from "zod";
184
+ var slatesParticipant = z6.object({
185
+ type: z6.union([z6.literal("consumer"), z6.literal("hub")]),
186
+ id: z6.string(),
187
+ name: z6.string(),
188
+ description: z6.string().optional(),
189
+ metadata: z6.record(z6.string(), z6.any()).optional()
122
190
  });
123
191
 
124
192
  // src/types/toolCategory.ts
125
- import z5 from "zod";
126
- var slatesToolCategory = z5.object({
127
- id: z5.string(),
128
- name: z5.string(),
129
- description: z5.string().optional(),
130
- imageUrl: z5.string().optional()
193
+ import z7 from "zod";
194
+ var slatesToolCategory = z7.object({
195
+ id: z7.string(),
196
+ name: z7.string(),
197
+ description: z7.string().optional(),
198
+ imageUrl: z7.string().optional()
131
199
  });
132
200
 
133
201
  // src/types/triggerGroup.ts
134
- import z6 from "zod";
135
- var slatesTriggerRoutingMatcher = z6.record(z6.string(), z6.any());
136
- var slatesTriggerGroupInvocation = z6.union([
137
- z6.object({
138
- type: z6.literal("polling"),
139
- intervalSeconds: z6.number().min(60 * 10)
202
+ import z8 from "zod";
203
+ var slatesTriggerRoutingMatcher = z8.record(z8.string(), z8.any());
204
+ var slatesTriggerGroupInvocation = z8.union([
205
+ z8.object({
206
+ type: z8.literal("polling"),
207
+ intervalSeconds: z8.number().min(60 * 10)
140
208
  }),
141
- z6.object({
142
- type: z6.literal("gateway")
209
+ z8.object({
210
+ type: z8.literal("gateway")
143
211
  }),
144
- z6.object({
145
- type: z6.literal("webhook"),
146
- registration: z6.union([
147
- z6.object({
148
- mode: z6.literal("auto")
212
+ z8.object({
213
+ type: z8.literal("webhook"),
214
+ registration: z8.union([
215
+ z8.object({
216
+ mode: z8.literal("auto")
149
217
  }),
150
- z6.object({
151
- mode: z6.literal("manual"),
152
- userConfigSchema: z6.record(z6.string(), z6.any()),
153
- fullConfigSchema: z6.record(z6.string(), z6.any())
218
+ z8.object({
219
+ mode: z8.literal("manual"),
220
+ userConfigSchema: z8.record(z8.string(), z8.any()),
221
+ fullConfigSchema: z8.record(z8.string(), z8.any())
154
222
  })
155
223
  ])
156
224
  })
157
225
  ]);
158
- var slatesTriggerGroup = z6.object({
159
- id: z6.string(),
160
- name: z6.string(),
161
- description: z6.string().optional(),
162
- metadata: z6.record(z6.string(), z6.any()).optional(),
226
+ var slatesTriggerGroup = z8.object({
227
+ id: z8.string(),
228
+ name: z8.string(),
229
+ description: z8.string().optional(),
230
+ metadata: z8.record(z8.string(), z8.any()).optional(),
163
231
  invocation: slatesTriggerGroupInvocation
164
232
  });
165
- var slatesWebhookTargetOwnership = z6.enum(["single_user", "multi_user"]);
166
- var slatesWebhookTarget = z6.object({
167
- webhookTargetIdentifier: z6.string(),
168
- name: z6.string(),
169
- description: z6.string().optional(),
170
- metadata: z6.record(z6.string(), z6.any()),
171
- webhookTargetPayload: z6.any(),
233
+ var slatesWebhookTargetOwnership = z8.enum(["single_user", "multi_user"]);
234
+ var slatesWebhookTarget = z8.object({
235
+ webhookTargetIdentifier: z8.string(),
236
+ name: z8.string(),
237
+ description: z8.string().optional(),
238
+ metadata: z8.record(z8.string(), z8.any()),
239
+ webhookTargetPayload: z8.any(),
172
240
  targetOwnership: slatesWebhookTargetOwnership
173
241
  });
174
242
 
175
- // src/messages/tracing.ts
176
- import z7 from "zod";
177
- var slatesRequestTraceTextBody = z7.object({
178
- contentType: z7.string().optional(),
179
- text: z7.string(),
180
- truncated: z7.boolean().optional()
181
- });
182
- var slatesRequestTrace = z7.object({
183
- startedAt: z7.string(),
184
- durationMs: z7.number().nonnegative(),
185
- request: z7.object({
186
- method: z7.string(),
187
- url: z7.string(),
188
- headers: z7.record(z7.string(), z7.string()).optional(),
189
- body: slatesRequestTraceTextBody.optional()
190
- }),
191
- response: z7.object({
192
- status: z7.number(),
193
- statusText: z7.string().optional(),
194
- headers: z7.record(z7.string(), z7.string()).optional(),
195
- body: slatesRequestTraceTextBody.optional()
196
- }).optional(),
197
- error: z7.object({
198
- code: z7.string().optional(),
199
- message: z7.string()
200
- }).optional()
201
- });
202
- var withRequestTraces = (shape) => z7.object({
203
- ...shape,
204
- requestTraces: z7.array(slatesRequestTrace).optional()
205
- });
206
-
207
243
  // src/messages/action.ts
208
- var slatesWebhookHttpResponse = z8.object({
209
- status: z8.number().int().min(100).max(599),
210
- headers: z8.record(z8.string(), z8.string()),
211
- body: z8.object({
212
- encoding: z8.literal("base64"),
213
- content: z8.string()
244
+ var slatesWebhookHttpResponse = z9.object({
245
+ status: z9.number().int().min(100).max(599),
246
+ headers: z9.record(z9.string(), z9.string()),
247
+ body: z9.object({
248
+ encoding: z9.literal("base64"),
249
+ content: z9.string()
214
250
  }).nullable()
215
251
  });
216
- var slatesMessageActionsListRequest = z8.object({
217
- jsonrpc: z8.literal("2.0"),
218
- method: z8.literal("slates/actions.list"),
219
- id: z8.string(),
220
- params: z8.object({
221
- includeAdapterActions: z8.optional(z8.nullable(z8.boolean()))
252
+ var slatesMessageActionsListRequest = z9.object({
253
+ jsonrpc: z9.literal("2.0"),
254
+ method: z9.literal("slates/actions.list"),
255
+ id: z9.string(),
256
+ params: z9.object({
257
+ includeAdapterActions: z9.optional(z9.nullable(z9.boolean()))
222
258
  })
223
259
  });
224
- var slatesMessageActionsListResponse = z8.object({
225
- jsonrpc: z8.literal("2.0"),
226
- id: z8.string(),
227
- result: z8.object({
228
- actions: z8.array(slatesAction)
260
+ var slatesMessageActionsListResponse = z9.object({
261
+ jsonrpc: z9.literal("2.0"),
262
+ id: z9.string(),
263
+ result: z9.object({
264
+ actions: z9.array(slatesAction)
229
265
  })
230
266
  });
231
- var slatesMessageActionGetRequest = z8.object({
232
- jsonrpc: z8.literal("2.0"),
233
- method: z8.literal("slates/action.get"),
234
- id: z8.string(),
235
- params: z8.object({
236
- actionId: z8.string()
267
+ var slatesMessageActionGetRequest = z9.object({
268
+ jsonrpc: z9.literal("2.0"),
269
+ method: z9.literal("slates/action.get"),
270
+ id: z9.string(),
271
+ params: z9.object({
272
+ actionId: z9.string()
237
273
  })
238
274
  });
239
- var slatesMessageActionGetResponse = z8.object({
240
- jsonrpc: z8.literal("2.0"),
241
- id: z8.string(),
242
- result: z8.object({
275
+ var slatesMessageActionGetResponse = z9.object({
276
+ jsonrpc: z9.literal("2.0"),
277
+ id: z9.string(),
278
+ result: z9.object({
243
279
  action: slatesAction
244
280
  })
245
281
  });
246
- var slatesMessageActionInvokeRequest = z8.object({
247
- jsonrpc: z8.literal("2.0"),
248
- method: z8.literal("slates/action.tool.invoke"),
249
- id: z8.string(),
250
- params: z8.object({
251
- actionId: z8.string(),
252
- input: z8.record(z8.string(), z8.any())
282
+ var slatesMessageActionInvokeRequest = z9.object({
283
+ jsonrpc: z9.literal("2.0"),
284
+ method: z9.literal("slates/action.tool.invoke"),
285
+ id: z9.string(),
286
+ params: z9.object({
287
+ actionId: z9.string(),
288
+ input: z9.record(z9.string(), z9.any())
253
289
  })
254
290
  });
255
- var slatesMessageActionInvokeResponse = z8.object({
256
- jsonrpc: z8.literal("2.0"),
257
- id: z8.string(),
291
+ var slatesMessageActionInvokeResponse = z9.object({
292
+ jsonrpc: z9.literal("2.0"),
293
+ id: z9.string(),
258
294
  result: withRequestTraces({
259
- output: z8.record(z8.string(), z8.any()),
260
- message: z8.string().optional(),
261
- attachments: z8.array(
262
- z8.object({
263
- mimeType: z8.string().optional(),
264
- attachmentHash: z8.string().optional(),
265
- content: z8.union([
266
- z8.object({
267
- type: z8.literal("url"),
268
- url: z8.string(),
269
- headers: z8.record(z8.string(), z8.string()).optional(),
270
- query: z8.record(z8.string(), z8.string()).optional(),
271
- refreshReference: z8.unknown().optional(),
272
- refreshAt: z8.string().optional()
295
+ output: z9.record(z9.string(), z9.any()),
296
+ message: z9.string().optional(),
297
+ attachments: z9.array(
298
+ z9.object({
299
+ mimeType: z9.string().optional(),
300
+ attachmentHash: z9.string().optional(),
301
+ content: z9.union([
302
+ z9.object({
303
+ type: z9.literal("url"),
304
+ url: z9.string(),
305
+ headers: z9.record(z9.string(), z9.string()).optional(),
306
+ query: z9.record(z9.string(), z9.string()).optional(),
307
+ refreshReference: z9.unknown().optional(),
308
+ refreshAt: z9.string().optional()
273
309
  }),
274
- z8.object({
275
- type: z8.literal("content"),
276
- encoding: z8.union([z8.literal("base64"), z8.literal("utf-8")]),
277
- content: z8.string()
310
+ z9.object({
311
+ type: z9.literal("content"),
312
+ encoding: z9.union([z9.literal("base64"), z9.literal("utf-8")]),
313
+ content: z9.string()
278
314
  }),
279
- z8.object({
280
- type: z8.literal("upload_reference"),
281
- referenceId: z8.string()
315
+ z9.object({
316
+ type: z9.literal("upload_reference"),
317
+ referenceId: z9.string()
282
318
  })
283
319
  ])
284
320
  })
285
321
  ).optional()
286
322
  })
287
323
  });
288
- var slatesMessageActionTriggerEventMapRequest = z8.object({
289
- jsonrpc: z8.literal("2.0"),
290
- method: z8.literal("slates/action.trigger.map_event"),
291
- id: z8.string(),
292
- params: z8.object({
293
- actionId: z8.string(),
294
- input: z8.record(z8.string(), z8.any())
324
+ var slatesMessageActionTriggerEventMapRequest = z9.object({
325
+ jsonrpc: z9.literal("2.0"),
326
+ method: z9.literal("slates/action.trigger.map_event"),
327
+ id: z9.string(),
328
+ params: z9.object({
329
+ actionId: z9.string(),
330
+ input: z9.record(z9.string(), z9.any())
295
331
  })
296
332
  });
297
- var slatesMessageActionTriggerEventMapResponse = z8.object({
298
- jsonrpc: z8.literal("2.0"),
299
- id: z8.string(),
333
+ var slatesMessageActionTriggerEventMapResponse = z9.object({
334
+ jsonrpc: z9.literal("2.0"),
335
+ id: z9.string(),
300
336
  result: withRequestTraces({
301
- type: z8.string(),
302
- id: z8.string(),
303
- output: z8.record(z8.string(), z8.any())
337
+ type: z9.string(),
338
+ id: z9.string(),
339
+ output: z9.record(z9.string(), z9.any())
304
340
  })
305
341
  });
306
342
  var slatesActionResponsesByMethod = {
@@ -317,34 +353,34 @@ var slatesActionRequestsByMethod = {
317
353
  };
318
354
 
319
355
  // src/messages/adapter.ts
320
- import z9 from "zod";
321
- var slatesMessageAdaptersListRequest = z9.object({
322
- jsonrpc: z9.literal("2.0"),
323
- method: z9.literal("slates/adapters.list"),
324
- id: z9.string(),
325
- params: z9.object({
326
- includeAdapters: z9.optional(z9.nullable(z9.boolean()))
356
+ import z10 from "zod";
357
+ var slatesMessageAdaptersListRequest = z10.object({
358
+ jsonrpc: z10.literal("2.0"),
359
+ method: z10.literal("slates/adapters.list"),
360
+ id: z10.string(),
361
+ params: z10.object({
362
+ includeAdapters: z10.optional(z10.nullable(z10.boolean()))
327
363
  })
328
364
  });
329
- var slatesMessageAdaptersListResponse = z9.object({
330
- jsonrpc: z9.literal("2.0"),
331
- id: z9.string(),
332
- result: z9.object({
333
- adapters: z9.array(slatesAdapter)
365
+ var slatesMessageAdaptersListResponse = z10.object({
366
+ jsonrpc: z10.literal("2.0"),
367
+ id: z10.string(),
368
+ result: z10.object({
369
+ adapters: z10.array(slatesAdapter)
334
370
  })
335
371
  });
336
- var slatesMessageAdapterGetRequest = z9.object({
337
- jsonrpc: z9.literal("2.0"),
338
- method: z9.literal("slates/adapter.get"),
339
- id: z9.string(),
340
- params: z9.object({
341
- adapterId: z9.string()
372
+ var slatesMessageAdapterGetRequest = z10.object({
373
+ jsonrpc: z10.literal("2.0"),
374
+ method: z10.literal("slates/adapter.get"),
375
+ id: z10.string(),
376
+ params: z10.object({
377
+ adapterId: z10.string()
342
378
  })
343
379
  });
344
- var slatesMessageAdapterGetResponse = z9.object({
345
- jsonrpc: z9.literal("2.0"),
346
- id: z9.string(),
347
- result: z9.object({
380
+ var slatesMessageAdapterGetResponse = z10.object({
381
+ jsonrpc: z10.literal("2.0"),
382
+ id: z10.string(),
383
+ result: z10.object({
348
384
  adapter: slatesAdapter
349
385
  })
350
386
  });
@@ -358,219 +394,219 @@ var slatesAdapterRequestsByMethod = {
358
394
  };
359
395
 
360
396
  // src/messages/auth.ts
361
- import z10 from "zod";
362
- var slatesMessageSetAuthNotification = z10.object({
363
- jsonrpc: z10.literal("2.0"),
364
- method: z10.literal("slates/auth.set"),
365
- params: z10.object({
366
- authenticationMethodId: z10.string(),
367
- output: z10.record(z10.string(), z10.any())
397
+ import z11 from "zod";
398
+ var slatesMessageSetAuthNotification = z11.object({
399
+ jsonrpc: z11.literal("2.0"),
400
+ method: z11.literal("slates/auth.set"),
401
+ params: z11.object({
402
+ authenticationMethodId: z11.string(),
403
+ output: z11.record(z11.string(), z11.any())
368
404
  })
369
405
  });
370
- var slatesMessageAuthMethodsListRequest = z10.object({
371
- jsonrpc: z10.literal("2.0"),
372
- method: z10.literal("slates/auth.methods.list"),
373
- id: z10.string(),
374
- params: z10.object({})
406
+ var slatesMessageAuthMethodsListRequest = z11.object({
407
+ jsonrpc: z11.literal("2.0"),
408
+ method: z11.literal("slates/auth.methods.list"),
409
+ id: z11.string(),
410
+ params: z11.object({})
375
411
  });
376
- var slatesMessageAuthMethodsListResponse = z10.object({
377
- jsonrpc: z10.literal("2.0"),
378
- id: z10.string(),
379
- result: z10.object({
380
- authenticationMethods: z10.array(slatesAuthenticationMethod)
412
+ var slatesMessageAuthMethodsListResponse = z11.object({
413
+ jsonrpc: z11.literal("2.0"),
414
+ id: z11.string(),
415
+ result: z11.object({
416
+ authenticationMethods: z11.array(slatesAuthenticationMethod)
381
417
  })
382
418
  });
383
- var slatesMessageAuthMethodGetRequest = z10.object({
384
- jsonrpc: z10.literal("2.0"),
385
- method: z10.literal("slates/auth.method.get"),
386
- id: z10.string(),
387
- params: z10.object({
388
- authenticationMethodId: z10.string()
419
+ var slatesMessageAuthMethodGetRequest = z11.object({
420
+ jsonrpc: z11.literal("2.0"),
421
+ method: z11.literal("slates/auth.method.get"),
422
+ id: z11.string(),
423
+ params: z11.object({
424
+ authenticationMethodId: z11.string()
389
425
  })
390
426
  });
391
- var slatesMessageAuthMethodGetResponse = z10.object({
392
- jsonrpc: z10.literal("2.0"),
393
- id: z10.string(),
394
- result: z10.object({
427
+ var slatesMessageAuthMethodGetResponse = z11.object({
428
+ jsonrpc: z11.literal("2.0"),
429
+ id: z11.string(),
430
+ result: z11.object({
395
431
  authenticationMethod: slatesAuthenticationMethod
396
432
  })
397
433
  });
398
- var slatesMessageAuthInputChangedRequest = z10.object({
399
- jsonrpc: z10.literal("2.0"),
400
- method: z10.literal("slates/auth.input.changed"),
401
- id: z10.string(),
402
- params: z10.object({
403
- authenticationMethodId: z10.string(),
404
- previousInput: z10.record(z10.string(), z10.any()).nullable(),
405
- newInput: z10.record(z10.string(), z10.any())
434
+ var slatesMessageAuthInputChangedRequest = z11.object({
435
+ jsonrpc: z11.literal("2.0"),
436
+ method: z11.literal("slates/auth.input.changed"),
437
+ id: z11.string(),
438
+ params: z11.object({
439
+ authenticationMethodId: z11.string(),
440
+ previousInput: z11.record(z11.string(), z11.any()).nullable(),
441
+ newInput: z11.record(z11.string(), z11.any())
406
442
  })
407
443
  });
408
- var slatesMessageAuthInputChangedResponse = z10.object({
409
- jsonrpc: z10.literal("2.0"),
410
- id: z10.string(),
444
+ var slatesMessageAuthInputChangedResponse = z11.object({
445
+ jsonrpc: z11.literal("2.0"),
446
+ id: z11.string(),
411
447
  result: withRequestTraces({
412
- input: z10.record(z10.string(), z10.any()).optional()
448
+ input: z11.record(z11.string(), z11.any()).optional()
413
449
  })
414
450
  });
415
- var slatesMessageAuthDefaultInputGetRequest = z10.object({
416
- jsonrpc: z10.literal("2.0"),
417
- method: z10.literal("slates/auth.input.get_default"),
418
- id: z10.string(),
419
- params: z10.object({
420
- authenticationMethodId: z10.string()
451
+ var slatesMessageAuthDefaultInputGetRequest = z11.object({
452
+ jsonrpc: z11.literal("2.0"),
453
+ method: z11.literal("slates/auth.input.get_default"),
454
+ id: z11.string(),
455
+ params: z11.object({
456
+ authenticationMethodId: z11.string()
421
457
  })
422
458
  });
423
- var slatesMessageAuthDefaultInputGetResponse = z10.object({
424
- jsonrpc: z10.literal("2.0"),
425
- id: z10.string(),
459
+ var slatesMessageAuthDefaultInputGetResponse = z11.object({
460
+ jsonrpc: z11.literal("2.0"),
461
+ id: z11.string(),
426
462
  result: withRequestTraces({
427
- input: z10.record(z10.string(), z10.any())
463
+ input: z11.record(z11.string(), z11.any())
428
464
  })
429
465
  });
430
- var slatesMessageAuthAuthorizationUrlGetRequest = z10.object({
431
- jsonrpc: z10.literal("2.0"),
432
- method: z10.literal("slates/auth.authorization_url.get"),
433
- id: z10.string(),
434
- params: z10.object({
435
- authenticationMethodId: z10.string(),
436
- redirectUri: z10.string(),
437
- state: z10.string(),
438
- input: z10.record(z10.string(), z10.any()),
439
- clientId: z10.string(),
440
- clientSecret: z10.string(),
441
- scopes: z10.array(z10.string())
466
+ var slatesMessageAuthAuthorizationUrlGetRequest = z11.object({
467
+ jsonrpc: z11.literal("2.0"),
468
+ method: z11.literal("slates/auth.authorization_url.get"),
469
+ id: z11.string(),
470
+ params: z11.object({
471
+ authenticationMethodId: z11.string(),
472
+ redirectUri: z11.string(),
473
+ state: z11.string(),
474
+ input: z11.record(z11.string(), z11.any()),
475
+ clientId: z11.string(),
476
+ clientSecret: z11.string(),
477
+ scopes: z11.array(z11.string())
442
478
  })
443
479
  });
444
- var slatesMessageAuthAuthorizationUrlGetResponse = z10.object({
445
- jsonrpc: z10.literal("2.0"),
446
- id: z10.string(),
480
+ var slatesMessageAuthAuthorizationUrlGetResponse = z11.object({
481
+ jsonrpc: z11.literal("2.0"),
482
+ id: z11.string(),
447
483
  result: withRequestTraces({
448
- authorizationUrl: z10.string(),
449
- input: z10.record(z10.string(), z10.any()).optional(),
450
- callbackState: z10.record(z10.string(), z10.any()).optional()
484
+ authorizationUrl: z11.string(),
485
+ input: z11.record(z11.string(), z11.any()).optional(),
486
+ callbackState: z11.record(z11.string(), z11.any()).optional()
451
487
  })
452
488
  });
453
- var slatesMessageAuthAuthorizationCallbackHandleRequest = z10.object({
454
- jsonrpc: z10.literal("2.0"),
455
- method: z10.literal("slates/auth.authorization_callback.handle"),
456
- id: z10.string(),
457
- params: z10.object({
458
- authenticationMethodId: z10.string(),
459
- code: z10.string(),
460
- state: z10.string(),
461
- redirectUri: z10.string(),
462
- input: z10.record(z10.string(), z10.any()),
463
- clientId: z10.string(),
464
- clientSecret: z10.string(),
465
- scopes: z10.array(z10.string()),
466
- callbackParams: z10.record(z10.string(), z10.string()).optional(),
467
- callbackState: z10.record(z10.string(), z10.any()).optional()
468
- })
469
- });
470
- var slatesMessageAuthAuthorizationCallbackHandleResponse = z10.object({
471
- jsonrpc: z10.literal("2.0"),
472
- id: z10.string(),
489
+ var slatesMessageAuthAuthorizationCallbackHandleRequest = z11.object({
490
+ jsonrpc: z11.literal("2.0"),
491
+ method: z11.literal("slates/auth.authorization_callback.handle"),
492
+ id: z11.string(),
493
+ params: z11.object({
494
+ authenticationMethodId: z11.string(),
495
+ code: z11.string(),
496
+ state: z11.string(),
497
+ redirectUri: z11.string(),
498
+ input: z11.record(z11.string(), z11.any()),
499
+ clientId: z11.string(),
500
+ clientSecret: z11.string(),
501
+ scopes: z11.array(z11.string()),
502
+ callbackParams: z11.record(z11.string(), z11.string()).optional(),
503
+ callbackState: z11.record(z11.string(), z11.any()).optional()
504
+ })
505
+ });
506
+ var slatesMessageAuthAuthorizationCallbackHandleResponse = z11.object({
507
+ jsonrpc: z11.literal("2.0"),
508
+ id: z11.string(),
473
509
  result: withRequestTraces({
474
- output: z10.record(z10.string(), z10.any()),
475
- input: z10.record(z10.string(), z10.any()).optional(),
476
- scopes: z10.array(z10.string()).optional(),
477
- routingMatchers: z10.array(slatesTriggerRoutingMatcher).optional()
510
+ output: z11.record(z11.string(), z11.any()),
511
+ input: z11.record(z11.string(), z11.any()).optional(),
512
+ scopes: z11.array(z11.string()).optional(),
513
+ routingMatchers: z11.array(slatesTriggerRoutingMatcher).optional()
478
514
  })
479
515
  });
480
- var slatesMessageAuthAdminAuthorizationUrlGetRequest = z10.object({
481
- jsonrpc: z10.literal("2.0"),
482
- method: z10.literal("slates/auth.admin_authorization_url.get"),
483
- id: z10.string(),
516
+ var slatesMessageAuthAdminAuthorizationUrlGetRequest = z11.object({
517
+ jsonrpc: z11.literal("2.0"),
518
+ method: z11.literal("slates/auth.admin_authorization_url.get"),
519
+ id: z11.string(),
484
520
  params: slatesMessageAuthAuthorizationUrlGetRequest.shape.params
485
521
  });
486
- var slatesMessageAuthAdminAuthorizationUrlGetResponse = z10.object({
487
- jsonrpc: z10.literal("2.0"),
488
- id: z10.string(),
522
+ var slatesMessageAuthAdminAuthorizationUrlGetResponse = z11.object({
523
+ jsonrpc: z11.literal("2.0"),
524
+ id: z11.string(),
489
525
  result: withRequestTraces({
490
- authorizationUrl: z10.string(),
491
- input: z10.record(z10.string(), z10.any()).optional(),
492
- callbackState: z10.record(z10.string(), z10.any()).optional()
526
+ authorizationUrl: z11.string(),
527
+ input: z11.record(z11.string(), z11.any()).optional(),
528
+ callbackState: z11.record(z11.string(), z11.any()).optional()
493
529
  })
494
530
  });
495
- var slatesMessageAuthAdminCallbackHandleRequest = z10.object({
496
- jsonrpc: z10.literal("2.0"),
497
- method: z10.literal("slates/auth.admin_callback.handle"),
498
- id: z10.string(),
499
- params: z10.object({
500
- authenticationMethodId: z10.string(),
501
- code: z10.string().optional(),
502
- state: z10.string(),
503
- redirectUri: z10.string(),
504
- input: z10.record(z10.string(), z10.any()),
505
- clientId: z10.string(),
506
- clientSecret: z10.string(),
507
- scopes: z10.array(z10.string()),
508
- callbackParams: z10.record(z10.string(), z10.string()).optional(),
509
- callbackState: z10.record(z10.string(), z10.any()).optional()
510
- })
511
- });
512
- var slatesMessageAuthAdminCallbackHandleResponse = z10.object({
513
- jsonrpc: z10.literal("2.0"),
514
- id: z10.string(),
531
+ var slatesMessageAuthAdminCallbackHandleRequest = z11.object({
532
+ jsonrpc: z11.literal("2.0"),
533
+ method: z11.literal("slates/auth.admin_callback.handle"),
534
+ id: z11.string(),
535
+ params: z11.object({
536
+ authenticationMethodId: z11.string(),
537
+ code: z11.string().optional(),
538
+ state: z11.string(),
539
+ redirectUri: z11.string(),
540
+ input: z11.record(z11.string(), z11.any()),
541
+ clientId: z11.string(),
542
+ clientSecret: z11.string(),
543
+ scopes: z11.array(z11.string()),
544
+ callbackParams: z11.record(z11.string(), z11.string()).optional(),
545
+ callbackState: z11.record(z11.string(), z11.any()).optional()
546
+ })
547
+ });
548
+ var slatesMessageAuthAdminCallbackHandleResponse = z11.object({
549
+ jsonrpc: z11.literal("2.0"),
550
+ id: z11.string(),
515
551
  result: withRequestTraces({
516
- instructions: z10.string().optional()
552
+ instructions: z11.string().optional()
517
553
  })
518
554
  });
519
- var slatesMessageAuthTokenRefreshHandleRequest = z10.object({
520
- jsonrpc: z10.literal("2.0"),
521
- method: z10.literal("slates/auth.token_refresh.handle"),
522
- id: z10.string(),
523
- params: z10.object({
524
- authenticationMethodId: z10.string(),
525
- output: z10.record(z10.string(), z10.any()),
526
- input: z10.record(z10.string(), z10.any()),
527
- clientId: z10.string(),
528
- clientSecret: z10.string(),
529
- scopes: z10.array(z10.string())
555
+ var slatesMessageAuthTokenRefreshHandleRequest = z11.object({
556
+ jsonrpc: z11.literal("2.0"),
557
+ method: z11.literal("slates/auth.token_refresh.handle"),
558
+ id: z11.string(),
559
+ params: z11.object({
560
+ authenticationMethodId: z11.string(),
561
+ output: z11.record(z11.string(), z11.any()),
562
+ input: z11.record(z11.string(), z11.any()),
563
+ clientId: z11.string(),
564
+ clientSecret: z11.string(),
565
+ scopes: z11.array(z11.string())
530
566
  })
531
567
  });
532
- var slatesMessageAuthTokenRefreshHandleResponse = z10.object({
533
- jsonrpc: z10.literal("2.0"),
534
- id: z10.string(),
568
+ var slatesMessageAuthTokenRefreshHandleResponse = z11.object({
569
+ jsonrpc: z11.literal("2.0"),
570
+ id: z11.string(),
535
571
  result: withRequestTraces({
536
- output: z10.record(z10.string(), z10.any()),
537
- input: z10.record(z10.string(), z10.any()).optional(),
538
- routingMatchers: z10.array(slatesTriggerRoutingMatcher).optional()
572
+ output: z11.record(z11.string(), z11.any()),
573
+ input: z11.record(z11.string(), z11.any()).optional(),
574
+ routingMatchers: z11.array(slatesTriggerRoutingMatcher).optional()
539
575
  })
540
576
  });
541
- var slatesMessageAuthProfileGetRequest = z10.object({
542
- jsonrpc: z10.literal("2.0"),
543
- method: z10.literal("slates/auth.profile.get"),
544
- id: z10.string(),
545
- params: z10.object({
546
- authenticationMethodId: z10.string(),
547
- output: z10.record(z10.string(), z10.any()),
548
- input: z10.record(z10.string(), z10.any()),
549
- scopes: z10.array(z10.string())
577
+ var slatesMessageAuthProfileGetRequest = z11.object({
578
+ jsonrpc: z11.literal("2.0"),
579
+ method: z11.literal("slates/auth.profile.get"),
580
+ id: z11.string(),
581
+ params: z11.object({
582
+ authenticationMethodId: z11.string(),
583
+ output: z11.record(z11.string(), z11.any()),
584
+ input: z11.record(z11.string(), z11.any()),
585
+ scopes: z11.array(z11.string())
550
586
  })
551
587
  });
552
- var slatesMessageAuthProfileGetResponse = z10.object({
553
- jsonrpc: z10.literal("2.0"),
554
- id: z10.string(),
588
+ var slatesMessageAuthProfileGetResponse = z11.object({
589
+ jsonrpc: z11.literal("2.0"),
590
+ id: z11.string(),
555
591
  result: withRequestTraces({
556
- profile: z10.record(z10.string(), z10.any())
592
+ profile: z11.record(z11.string(), z11.any())
557
593
  })
558
594
  });
559
- var slatesMessageAuthOutputGetRequest = z10.object({
560
- jsonrpc: z10.literal("2.0"),
561
- method: z10.literal("slates/auth.output.get"),
562
- id: z10.string(),
563
- params: z10.object({
564
- authenticationMethodId: z10.string(),
565
- input: z10.record(z10.string(), z10.any())
595
+ var slatesMessageAuthOutputGetRequest = z11.object({
596
+ jsonrpc: z11.literal("2.0"),
597
+ method: z11.literal("slates/auth.output.get"),
598
+ id: z11.string(),
599
+ params: z11.object({
600
+ authenticationMethodId: z11.string(),
601
+ input: z11.record(z11.string(), z11.any())
566
602
  })
567
603
  });
568
- var slatesMessageAuthOutputGetResponse = z10.object({
569
- jsonrpc: z10.literal("2.0"),
570
- id: z10.string(),
604
+ var slatesMessageAuthOutputGetResponse = z11.object({
605
+ jsonrpc: z11.literal("2.0"),
606
+ id: z11.string(),
571
607
  result: withRequestTraces({
572
- output: z10.record(z10.string(), z10.any()),
573
- scopes: z10.array(z10.string()).optional()
608
+ output: z11.record(z11.string(), z11.any()),
609
+ scopes: z11.array(z11.string()).optional()
574
610
  })
575
611
  });
576
612
  var slatesAuthResponsesByMethod = {
@@ -604,69 +640,69 @@ var slatesAuthNotificationsByMethod = {
604
640
  };
605
641
 
606
642
  // src/messages/config.ts
607
- import z11 from "zod";
608
- var slatesMessageSetConfigNotification = z11.object({
609
- jsonrpc: z11.literal("2.0"),
610
- method: z11.literal("slates/config.set"),
611
- params: z11.object({
612
- config: z11.record(z11.string(), z11.any())
643
+ import z12 from "zod";
644
+ var slatesMessageSetConfigNotification = z12.object({
645
+ jsonrpc: z12.literal("2.0"),
646
+ method: z12.literal("slates/config.set"),
647
+ params: z12.object({
648
+ config: z12.record(z12.string(), z12.any())
613
649
  })
614
650
  });
615
- var slatesMessageConfigSchemaGetRequest = z11.object({
616
- jsonrpc: z11.literal("2.0"),
617
- method: z11.literal("slates/config.schema.get"),
618
- id: z11.string(),
619
- params: z11.object({})
651
+ var slatesMessageConfigSchemaGetRequest = z12.object({
652
+ jsonrpc: z12.literal("2.0"),
653
+ method: z12.literal("slates/config.schema.get"),
654
+ id: z12.string(),
655
+ params: z12.object({})
620
656
  });
621
- var slatesMessageConfigSchemaGetResponse = z11.object({
622
- jsonrpc: z11.literal("2.0"),
623
- id: z11.string(),
624
- result: z11.object({
625
- schema: z11.record(z11.string(), z11.any()),
626
- docs: z11.array(
627
- z11.object({
628
- type: z11.literal("docs.config.general").optional(),
629
- name: z11.string(),
630
- url: z11.string()
657
+ var slatesMessageConfigSchemaGetResponse = z12.object({
658
+ jsonrpc: z12.literal("2.0"),
659
+ id: z12.string(),
660
+ result: z12.object({
661
+ schema: z12.record(z12.string(), z12.any()),
662
+ docs: z12.array(
663
+ z12.object({
664
+ type: z12.literal("docs.config.general").optional(),
665
+ name: z12.string(),
666
+ url: z12.string()
631
667
  })
632
668
  )
633
669
  })
634
670
  });
635
- var slatesMessageConfigChangedRequest = z11.object({
636
- jsonrpc: z11.literal("2.0"),
637
- method: z11.literal("slates/config.changed"),
638
- id: z11.string(),
639
- params: z11.object({
640
- previousConfig: z11.record(z11.string(), z11.any()).nullable(),
641
- newConfig: z11.record(z11.string(), z11.any())
671
+ var slatesMessageConfigChangedRequest = z12.object({
672
+ jsonrpc: z12.literal("2.0"),
673
+ method: z12.literal("slates/config.changed"),
674
+ id: z12.string(),
675
+ params: z12.object({
676
+ previousConfig: z12.record(z12.string(), z12.any()).nullable(),
677
+ newConfig: z12.record(z12.string(), z12.any())
642
678
  })
643
679
  });
644
- var slatesMessageConfigChangedResponse = z11.object({
645
- jsonrpc: z11.literal("2.0"),
646
- id: z11.string(),
680
+ var slatesMessageConfigChangedResponse = z12.object({
681
+ jsonrpc: z12.literal("2.0"),
682
+ id: z12.string(),
647
683
  result: withRequestTraces({
648
- success: z11.boolean(),
649
- config: z11.record(z11.string(), z11.any()).optional(),
650
- errors: z11.array(
651
- z11.object({
652
- code: z11.string(),
653
- message: z11.string(),
654
- path: z11.array(z11.string()).optional()
684
+ success: z12.boolean(),
685
+ config: z12.record(z12.string(), z12.any()).optional(),
686
+ errors: z12.array(
687
+ z12.object({
688
+ code: z12.string(),
689
+ message: z12.string(),
690
+ path: z12.array(z12.string()).optional()
655
691
  })
656
692
  ).optional()
657
693
  })
658
694
  });
659
- var slatesMessageConfigDefaultGetRequest = z11.object({
660
- jsonrpc: z11.literal("2.0"),
661
- method: z11.literal("slates/config.get_default"),
662
- id: z11.string(),
663
- params: z11.object({})
695
+ var slatesMessageConfigDefaultGetRequest = z12.object({
696
+ jsonrpc: z12.literal("2.0"),
697
+ method: z12.literal("slates/config.get_default"),
698
+ id: z12.string(),
699
+ params: z12.object({})
664
700
  });
665
- var slatesMessageConfigDefaultGetResponse = z11.object({
666
- jsonrpc: z11.literal("2.0"),
667
- id: z11.string(),
701
+ var slatesMessageConfigDefaultGetResponse = z12.object({
702
+ jsonrpc: z12.literal("2.0"),
703
+ id: z12.string(),
668
704
  result: withRequestTraces({
669
- config: z11.record(z11.string(), z11.any()).nullable()
705
+ config: z12.record(z12.string(), z12.any()).nullable()
670
706
  })
671
707
  });
672
708
  var slatesConfigResponsesByMethod = {
@@ -684,32 +720,32 @@ var slatesConfigNotificationsByMethod = {
684
720
  };
685
721
 
686
722
  // src/messages/controlFlow.ts
687
- import z12 from "zod";
723
+ import z13 from "zod";
688
724
 
689
725
  // src/version.ts
690
726
  var SLATES_PROTOCOL_VERSION = "slates@2026-01-01";
691
727
 
692
728
  // src/messages/controlFlow.ts
693
- var slatesMessageHelloNotification = z12.object({
694
- jsonrpc: z12.literal("2.0"),
695
- method: z12.literal("slates/hello"),
696
- params: z12.object({
697
- protocol: z12.literal(SLATES_PROTOCOL_VERSION)
729
+ var slatesMessageHelloNotification = z13.object({
730
+ jsonrpc: z13.literal("2.0"),
731
+ method: z13.literal("slates/hello"),
732
+ params: z13.object({
733
+ protocol: z13.literal(SLATES_PROTOCOL_VERSION)
698
734
  })
699
735
  });
700
- var slatesMessageSetParticipantsNotification = z12.object({
701
- jsonrpc: z12.literal("2.0"),
702
- method: z12.literal("slates/participant.set"),
703
- params: z12.object({
704
- participants: z12.array(slatesParticipant)
736
+ var slatesMessageSetParticipantsNotification = z13.object({
737
+ jsonrpc: z13.literal("2.0"),
738
+ method: z13.literal("slates/participant.set"),
739
+ params: z13.object({
740
+ participants: z13.array(slatesParticipant)
705
741
  })
706
742
  });
707
- var slatesMessageSessionStartNotification = z12.object({
708
- jsonrpc: z12.literal("2.0"),
709
- method: z12.literal("slates/session.start"),
710
- params: z12.object({
711
- sessionId: z12.string(),
712
- state: z12.record(z12.string(), z12.any())
743
+ var slatesMessageSessionStartNotification = z13.object({
744
+ jsonrpc: z13.literal("2.0"),
745
+ method: z13.literal("slates/session.start"),
746
+ params: z13.object({
747
+ sessionId: z13.string(),
748
+ state: z13.record(z13.string(), z13.any())
713
749
  })
714
750
  });
715
751
  var slatesControlFlowNotificationsByMethod = {
@@ -719,53 +755,53 @@ var slatesControlFlowNotificationsByMethod = {
719
755
  };
720
756
 
721
757
  // src/messages/hub.ts
722
- import z13 from "zod";
723
- var slatesMessageHubCapabilitiesSetNotification = z13.object({
724
- jsonrpc: z13.literal("2.0"),
725
- method: z13.literal("slates/hub.capabilities.set"),
726
- params: z13.object({
727
- capabilities: z13.object({
728
- attachments: z13.object({
729
- directUpload: z13.object({
730
- enabled: z13.boolean(),
731
- maxAttachmentSizeBytes: z13.number().optional()
758
+ import z14 from "zod";
759
+ var slatesMessageHubCapabilitiesSetNotification = z14.object({
760
+ jsonrpc: z14.literal("2.0"),
761
+ method: z14.literal("slates/hub.capabilities.set"),
762
+ params: z14.object({
763
+ capabilities: z14.object({
764
+ attachments: z14.object({
765
+ directUpload: z14.object({
766
+ enabled: z14.boolean(),
767
+ maxAttachmentSizeBytes: z14.number().optional()
732
768
  })
733
769
  }).optional(),
734
- adapters: z13.boolean().optional(),
735
- triggers: z13.boolean().optional()
770
+ adapters: z14.boolean().optional(),
771
+ triggers: z14.boolean().optional()
736
772
  })
737
773
  })
738
774
  });
739
- var slatesMessageHubLiveInvocationSetNotification = z13.object({
740
- jsonrpc: z13.literal("2.0"),
741
- method: z13.literal("slates/hub.live_invocation.set"),
742
- params: z13.object({
743
- token: z13.string(),
744
- baseUrl: z13.string()
775
+ var slatesMessageHubLiveInvocationSetNotification = z14.object({
776
+ jsonrpc: z14.literal("2.0"),
777
+ method: z14.literal("slates/hub.live_invocation.set"),
778
+ params: z14.object({
779
+ token: z14.string(),
780
+ baseUrl: z14.string()
745
781
  })
746
782
  });
747
783
  var slatesHubNotificationsByMethod = {
748
784
  "slates/hub.capabilities.set": slatesMessageHubCapabilitiesSetNotification,
749
785
  "slates/hub.live_invocation.set": slatesMessageHubLiveInvocationSetNotification
750
786
  };
751
- var slatesMessageProviderCapabilitiesGetRequest = z13.object({
752
- jsonrpc: z13.literal("2.0"),
753
- method: z13.literal("slates/provider.capabilities.get"),
754
- id: z13.string(),
755
- params: z13.object({})
787
+ var slatesMessageProviderCapabilitiesGetRequest = z14.object({
788
+ jsonrpc: z14.literal("2.0"),
789
+ method: z14.literal("slates/provider.capabilities.get"),
790
+ id: z14.string(),
791
+ params: z14.object({})
756
792
  });
757
- var slatesMessageProviderCapabilitiesGetResponse = z13.object({
758
- jsonrpc: z13.literal("2.0"),
759
- id: z13.string(),
760
- result: z13.object({
761
- capabilities: z13.object({
762
- hub: z13.object({
763
- capabilitiesNotification: z13.boolean().optional(),
764
- liveInvocation: z13.boolean().optional()
793
+ var slatesMessageProviderCapabilitiesGetResponse = z14.object({
794
+ jsonrpc: z14.literal("2.0"),
795
+ id: z14.string(),
796
+ result: z14.object({
797
+ capabilities: z14.object({
798
+ hub: z14.object({
799
+ capabilitiesNotification: z14.boolean().optional(),
800
+ liveInvocation: z14.boolean().optional()
765
801
  }).optional(),
766
- provider: z13.object({
767
- triggerGroups: z13.boolean().optional(),
768
- toolCategories: z13.boolean().optional()
802
+ provider: z14.object({
803
+ triggerGroups: z14.boolean().optional(),
804
+ toolCategories: z14.boolean().optional()
769
805
  }).optional()
770
806
  })
771
807
  })
@@ -778,29 +814,29 @@ var slatesHubResponsesByMethod = {
778
814
  };
779
815
 
780
816
  // src/messages/identify.ts
781
- import z14 from "zod";
782
- var slatesMessageProviderIdentifyRequest = z14.object({
783
- jsonrpc: z14.literal("2.0"),
784
- method: z14.literal("slates/provider.identify"),
785
- id: z14.string(),
786
- params: z14.object({})
817
+ import z15 from "zod";
818
+ var slatesMessageProviderIdentifyRequest = z15.object({
819
+ jsonrpc: z15.literal("2.0"),
820
+ method: z15.literal("slates/provider.identify"),
821
+ id: z15.string(),
822
+ params: z15.object({})
787
823
  });
788
- var slatesMessageProviderIdentifyResponse = z14.object({
789
- jsonrpc: z14.literal("2.0"),
790
- id: z14.string(),
791
- result: z14.object({
792
- protocol: z14.literal(SLATES_PROTOCOL_VERSION),
793
- provider: z14.object({
794
- type: z14.literal("provider"),
795
- id: z14.string(),
796
- name: z14.string(),
797
- description: z14.string().optional(),
798
- metadata: z14.record(z14.string(), z14.any()).optional()
824
+ var slatesMessageProviderIdentifyResponse = z15.object({
825
+ jsonrpc: z15.literal("2.0"),
826
+ id: z15.string(),
827
+ result: z15.object({
828
+ protocol: z15.literal(SLATES_PROTOCOL_VERSION),
829
+ provider: z15.object({
830
+ type: z15.literal("provider"),
831
+ id: z15.string(),
832
+ name: z15.string(),
833
+ description: z15.string().optional(),
834
+ metadata: z15.record(z15.string(), z15.any()).optional()
799
835
  }),
800
- docs: z14.array(
801
- z14.object({
802
- name: z14.string(),
803
- url: z14.string()
836
+ docs: z15.array(
837
+ z15.object({
838
+ name: z15.string(),
839
+ url: z15.string()
804
840
  })
805
841
  )
806
842
  })
@@ -813,81 +849,81 @@ var slatesIdentifyRequestsByMethod = {
813
849
  };
814
850
 
815
851
  // src/messages/legacyTrigger.ts
816
- import z15 from "zod";
817
- var slatesMessageActionTriggerEventsPollRequest = z15.object({
818
- jsonrpc: z15.literal("2.0"),
819
- method: z15.literal("slates/action.trigger.poll_events"),
820
- id: z15.string(),
821
- params: z15.object({
822
- actionId: z15.string(),
823
- state: z15.any().nullable()
852
+ import z16 from "zod";
853
+ var slatesMessageActionTriggerEventsPollRequest = z16.object({
854
+ jsonrpc: z16.literal("2.0"),
855
+ method: z16.literal("slates/action.trigger.poll_events"),
856
+ id: z16.string(),
857
+ params: z16.object({
858
+ actionId: z16.string(),
859
+ state: z16.any().nullable()
824
860
  })
825
861
  });
826
- var slatesMessageActionTriggerEventsPollResponse = z15.object({
827
- jsonrpc: z15.literal("2.0"),
828
- id: z15.string(),
862
+ var slatesMessageActionTriggerEventsPollResponse = z16.object({
863
+ jsonrpc: z16.literal("2.0"),
864
+ id: z16.string(),
829
865
  result: withRequestTraces({
830
- inputs: z15.array(z15.record(z15.string(), z15.any())),
831
- updatedState: z15.any().nullable().optional()
866
+ inputs: z16.array(z16.record(z16.string(), z16.any())),
867
+ updatedState: z16.any().nullable().optional()
832
868
  })
833
869
  });
834
- var slatesMessageActionTriggerWebhookHandleRequest = z15.object({
835
- jsonrpc: z15.literal("2.0"),
836
- method: z15.literal("slates/action.trigger.webhook_handle"),
837
- id: z15.string(),
838
- params: z15.object({
839
- actionId: z15.string(),
840
- url: z15.string(),
841
- method: z15.string(),
842
- headers: z15.record(z15.string(), z15.string()),
843
- body: z15.object({
844
- encoding: z15.literal("base64"),
845
- content: z15.string()
870
+ var slatesMessageActionTriggerWebhookHandleRequest = z16.object({
871
+ jsonrpc: z16.literal("2.0"),
872
+ method: z16.literal("slates/action.trigger.webhook_handle"),
873
+ id: z16.string(),
874
+ params: z16.object({
875
+ actionId: z16.string(),
876
+ url: z16.string(),
877
+ method: z16.string(),
878
+ headers: z16.record(z16.string(), z16.string()),
879
+ body: z16.object({
880
+ encoding: z16.literal("base64"),
881
+ content: z16.string()
846
882
  }).nullable(),
847
- state: z15.any().nullable(),
848
- registrationDetails: z15.any().nullable().optional()
883
+ state: z16.any().nullable(),
884
+ registrationDetails: z16.any().nullable().optional()
849
885
  })
850
886
  });
851
- var slatesMessageActionTriggerWebhookHandleResponse = z15.object({
852
- jsonrpc: z15.literal("2.0"),
853
- id: z15.string(),
887
+ var slatesMessageActionTriggerWebhookHandleResponse = z16.object({
888
+ jsonrpc: z16.literal("2.0"),
889
+ id: z16.string(),
854
890
  result: withRequestTraces({
855
- inputs: z15.array(z15.record(z15.string(), z15.any())),
856
- updatedState: z15.any().nullable().optional(),
891
+ inputs: z16.array(z16.record(z16.string(), z16.any())),
892
+ updatedState: z16.any().nullable().optional(),
857
893
  response: slatesWebhookHttpResponse.nullable().optional()
858
894
  })
859
895
  });
860
- var slatesMessageActionTriggerWebhookRegisterRequest = z15.object({
861
- jsonrpc: z15.literal("2.0"),
862
- method: z15.literal("slates/action.trigger.webhook_register"),
863
- id: z15.string(),
864
- params: z15.object({
865
- actionId: z15.string(),
866
- webhookBaseUrl: z15.string()
896
+ var slatesMessageActionTriggerWebhookRegisterRequest = z16.object({
897
+ jsonrpc: z16.literal("2.0"),
898
+ method: z16.literal("slates/action.trigger.webhook_register"),
899
+ id: z16.string(),
900
+ params: z16.object({
901
+ actionId: z16.string(),
902
+ webhookBaseUrl: z16.string()
867
903
  })
868
904
  });
869
- var slatesMessageActionTriggerWebhookRegisterResponse = z15.object({
870
- jsonrpc: z15.literal("2.0"),
871
- id: z15.string(),
905
+ var slatesMessageActionTriggerWebhookRegisterResponse = z16.object({
906
+ jsonrpc: z16.literal("2.0"),
907
+ id: z16.string(),
872
908
  result: withRequestTraces({
873
- registrationDetails: z15.any(),
874
- state: z15.any().optional()
909
+ registrationDetails: z16.any(),
910
+ state: z16.any().optional()
875
911
  })
876
912
  });
877
- var slatesMessageActionTriggerWebhookUnregisterRequest = z15.object({
878
- jsonrpc: z15.literal("2.0"),
879
- method: z15.literal("slates/action.trigger.webhook_unregister"),
880
- id: z15.string(),
881
- params: z15.object({
882
- actionId: z15.string(),
883
- webhookBaseUrl: z15.string(),
884
- registrationDetails: z15.any(),
885
- state: z15.any().optional()
913
+ var slatesMessageActionTriggerWebhookUnregisterRequest = z16.object({
914
+ jsonrpc: z16.literal("2.0"),
915
+ method: z16.literal("slates/action.trigger.webhook_unregister"),
916
+ id: z16.string(),
917
+ params: z16.object({
918
+ actionId: z16.string(),
919
+ webhookBaseUrl: z16.string(),
920
+ registrationDetails: z16.any(),
921
+ state: z16.any().optional()
886
922
  })
887
923
  });
888
- var slatesMessageActionTriggerWebhookUnregisterResponse = z15.object({
889
- jsonrpc: z15.literal("2.0"),
890
- id: z15.string(),
924
+ var slatesMessageActionTriggerWebhookUnregisterResponse = z16.object({
925
+ jsonrpc: z16.literal("2.0"),
926
+ id: z16.string(),
891
927
  result: withRequestTraces({})
892
928
  });
893
929
  var slatesLegacyTriggerResponsesByMethod = {
@@ -904,18 +940,18 @@ var slatesLegacyTriggerRequestsByMethod = {
904
940
  };
905
941
 
906
942
  // src/messages/toolCategory.ts
907
- import z16 from "zod";
908
- var slatesMessageToolCategoriesListRequest = z16.object({
909
- jsonrpc: z16.literal("2.0"),
910
- method: z16.literal("slates/tool_categories.list"),
911
- id: z16.string(),
912
- params: z16.object({})
943
+ import z17 from "zod";
944
+ var slatesMessageToolCategoriesListRequest = z17.object({
945
+ jsonrpc: z17.literal("2.0"),
946
+ method: z17.literal("slates/tool_categories.list"),
947
+ id: z17.string(),
948
+ params: z17.object({})
913
949
  });
914
- var slatesMessageToolCategoriesListResponse = z16.object({
915
- jsonrpc: z16.literal("2.0"),
916
- id: z16.string(),
917
- result: z16.object({
918
- toolCategories: z16.array(slatesToolCategory)
950
+ var slatesMessageToolCategoriesListResponse = z17.object({
951
+ jsonrpc: z17.literal("2.0"),
952
+ id: z17.string(),
953
+ result: z17.object({
954
+ toolCategories: z17.array(slatesToolCategory)
919
955
  })
920
956
  });
921
957
  var slatesToolCategoryResponsesByMethod = {
@@ -926,237 +962,237 @@ var slatesToolCategoryRequestsByMethod = {
926
962
  };
927
963
 
928
964
  // src/messages/triggerGroup.ts
929
- import z17 from "zod";
930
- var slatesTriggerGroupWebhookEvent = z17.object({
931
- matchers: z17.array(slatesTriggerRoutingMatcher),
932
- payload: z17.record(z17.string(), z17.any()),
933
- idempotencyKey: z17.string().optional(),
934
- triggerIds: z17.array(z17.string())
935
- });
936
- var slatesTriggerGroupWebhookSkipped = z17.object({
937
- reason: z17.string()
938
- });
939
- var slatesTriggerGroupPollEvent = z17.object({
940
- payload: z17.record(z17.string(), z17.any()),
941
- idempotencyKey: z17.string().optional(),
942
- triggerIds: z17.array(z17.string())
943
- });
944
- var slatesMessageTriggerGroupsListRequest = z17.object({
945
- jsonrpc: z17.literal("2.0"),
946
- method: z17.literal("slates/trigger_groups.list"),
947
- id: z17.string(),
948
- params: z17.object({})
949
- });
950
- var slatesMessageTriggerGroupsListResponse = z17.object({
951
- jsonrpc: z17.literal("2.0"),
952
- id: z17.string(),
953
- result: z17.object({
954
- triggerGroups: z17.array(slatesTriggerGroup)
955
- })
956
- });
957
- var slatesMessageTriggerGroupGetRequest = z17.object({
958
- jsonrpc: z17.literal("2.0"),
959
- method: z17.literal("slates/trigger_group.get"),
960
- id: z17.string(),
961
- params: z17.object({
962
- triggerGroupId: z17.string()
963
- })
964
- });
965
- var slatesMessageTriggerGroupGetResponse = z17.object({
966
- jsonrpc: z17.literal("2.0"),
967
- id: z17.string(),
968
- result: z17.object({
965
+ import z18 from "zod";
966
+ var slatesTriggerGroupWebhookEvent = z18.object({
967
+ matchers: z18.array(slatesTriggerRoutingMatcher),
968
+ payload: z18.record(z18.string(), z18.any()),
969
+ idempotencyKey: z18.string().optional(),
970
+ triggerIds: z18.array(z18.string())
971
+ });
972
+ var slatesTriggerGroupWebhookSkipped = z18.object({
973
+ reason: z18.string()
974
+ });
975
+ var slatesTriggerGroupPollEvent = z18.object({
976
+ payload: z18.record(z18.string(), z18.any()),
977
+ idempotencyKey: z18.string().optional(),
978
+ triggerIds: z18.array(z18.string())
979
+ });
980
+ var slatesMessageTriggerGroupsListRequest = z18.object({
981
+ jsonrpc: z18.literal("2.0"),
982
+ method: z18.literal("slates/trigger_groups.list"),
983
+ id: z18.string(),
984
+ params: z18.object({})
985
+ });
986
+ var slatesMessageTriggerGroupsListResponse = z18.object({
987
+ jsonrpc: z18.literal("2.0"),
988
+ id: z18.string(),
989
+ result: z18.object({
990
+ triggerGroups: z18.array(slatesTriggerGroup)
991
+ })
992
+ });
993
+ var slatesMessageTriggerGroupGetRequest = z18.object({
994
+ jsonrpc: z18.literal("2.0"),
995
+ method: z18.literal("slates/trigger_group.get"),
996
+ id: z18.string(),
997
+ params: z18.object({
998
+ triggerGroupId: z18.string()
999
+ })
1000
+ });
1001
+ var slatesMessageTriggerGroupGetResponse = z18.object({
1002
+ jsonrpc: z18.literal("2.0"),
1003
+ id: z18.string(),
1004
+ result: z18.object({
969
1005
  triggerGroup: slatesTriggerGroup
970
1006
  })
971
1007
  });
972
- var slatesMessageTriggerGroupWebhookTargetsListRequest = z17.object({
973
- jsonrpc: z17.literal("2.0"),
974
- method: z17.literal("slates/trigger_group.webhook.targets_list"),
975
- id: z17.string(),
976
- params: z17.object({
977
- triggerGroupId: z17.string(),
978
- pageToken: z17.any().nullable().optional()
1008
+ var slatesMessageTriggerGroupWebhookTargetsListRequest = z18.object({
1009
+ jsonrpc: z18.literal("2.0"),
1010
+ method: z18.literal("slates/trigger_group.webhook.targets_list"),
1011
+ id: z18.string(),
1012
+ params: z18.object({
1013
+ triggerGroupId: z18.string(),
1014
+ pageToken: z18.any().nullable().optional()
979
1015
  })
980
1016
  });
981
- var slatesMessageTriggerGroupWebhookTargetsListResponse = z17.object({
982
- jsonrpc: z17.literal("2.0"),
983
- id: z17.string(),
1017
+ var slatesMessageTriggerGroupWebhookTargetsListResponse = z18.object({
1018
+ jsonrpc: z18.literal("2.0"),
1019
+ id: z18.string(),
984
1020
  result: withRequestTraces({
985
- targets: z17.array(slatesWebhookTarget),
986
- nextPageToken: z17.any().nullable(),
987
- isPartial: z17.boolean().optional()
1021
+ targets: z18.array(slatesWebhookTarget),
1022
+ nextPageToken: z18.any().nullable(),
1023
+ isPartial: z18.boolean().optional()
988
1024
  })
989
1025
  });
990
- var slatesMessageTriggerGroupWebhookRegisterRequest = z17.object({
991
- jsonrpc: z17.literal("2.0"),
992
- method: z17.literal("slates/trigger_group.webhook.register"),
993
- id: z17.string(),
994
- params: z17.object({
995
- triggerGroupId: z17.string(),
996
- webhookTargetIdentifier: z17.string(),
997
- webhookTargetPayload: z17.any(),
998
- webhookUrl: z17.string()
1026
+ var slatesMessageTriggerGroupWebhookRegisterRequest = z18.object({
1027
+ jsonrpc: z18.literal("2.0"),
1028
+ method: z18.literal("slates/trigger_group.webhook.register"),
1029
+ id: z18.string(),
1030
+ params: z18.object({
1031
+ triggerGroupId: z18.string(),
1032
+ webhookTargetIdentifier: z18.string(),
1033
+ webhookTargetPayload: z18.any(),
1034
+ webhookUrl: z18.string()
999
1035
  })
1000
1036
  });
1001
- var slatesMessageTriggerGroupWebhookRegisterResponse = z17.object({
1002
- jsonrpc: z17.literal("2.0"),
1003
- id: z17.string(),
1037
+ var slatesMessageTriggerGroupWebhookRegisterResponse = z18.object({
1038
+ jsonrpc: z18.literal("2.0"),
1039
+ id: z18.string(),
1004
1040
  result: withRequestTraces({
1005
- webhookRegistrationIdentifier: z17.string(),
1006
- webhookRegistrationPayload: z17.any()
1041
+ webhookRegistrationIdentifier: z18.string(),
1042
+ webhookRegistrationPayload: z18.any()
1007
1043
  })
1008
1044
  });
1009
- var slatesMessageTriggerGroupWebhookUnregisterRequest = z17.object({
1010
- jsonrpc: z17.literal("2.0"),
1011
- method: z17.literal("slates/trigger_group.webhook.unregister"),
1012
- id: z17.string(),
1013
- params: z17.object({
1014
- triggerGroupId: z17.string(),
1015
- webhookRegistrationIdentifier: z17.string(),
1016
- webhookRegistrationPayload: z17.any()
1045
+ var slatesMessageTriggerGroupWebhookUnregisterRequest = z18.object({
1046
+ jsonrpc: z18.literal("2.0"),
1047
+ method: z18.literal("slates/trigger_group.webhook.unregister"),
1048
+ id: z18.string(),
1049
+ params: z18.object({
1050
+ triggerGroupId: z18.string(),
1051
+ webhookRegistrationIdentifier: z18.string(),
1052
+ webhookRegistrationPayload: z18.any()
1017
1053
  })
1018
1054
  });
1019
- var slatesMessageTriggerGroupWebhookUnregisterResponse = z17.object({
1020
- jsonrpc: z17.literal("2.0"),
1021
- id: z17.string(),
1055
+ var slatesMessageTriggerGroupWebhookUnregisterResponse = z18.object({
1056
+ jsonrpc: z18.literal("2.0"),
1057
+ id: z18.string(),
1022
1058
  result: withRequestTraces({})
1023
1059
  });
1024
- var slatesMessageTriggerGroupWebhookManualSetupRequest = z17.object({
1025
- jsonrpc: z17.literal("2.0"),
1026
- method: z17.literal("slates/trigger_group.webhook.manual_setup"),
1027
- id: z17.string(),
1028
- params: z17.object({
1029
- triggerGroupId: z17.string(),
1030
- webhookUrl: z17.string()
1031
- })
1032
- });
1033
- var slatesMessageTriggerGroupWebhookManualSetupResponse = z17.object({
1034
- jsonrpc: z17.literal("2.0"),
1035
- id: z17.string(),
1036
- result: z17.object({
1037
- webhookSetupDocument: z17.string(),
1038
- partialWebhookRegistrationPayload: z17.any()
1039
- })
1040
- });
1041
- var slatesMessageTriggerGroupWebhookManualFinishRequest = z17.object({
1042
- jsonrpc: z17.literal("2.0"),
1043
- method: z17.literal("slates/trigger_group.webhook.manual_finish"),
1044
- id: z17.string(),
1045
- params: z17.object({
1046
- triggerGroupId: z17.string(),
1047
- webhookUrl: z17.string(),
1048
- partialWebhookRegistrationPayload: z17.any(),
1049
- userWebhookRegistrationPayload: z17.any()
1050
- })
1051
- });
1052
- var slatesMessageTriggerGroupWebhookManualFinishResponse = z17.object({
1053
- jsonrpc: z17.literal("2.0"),
1054
- id: z17.string(),
1060
+ var slatesMessageTriggerGroupWebhookManualSetupRequest = z18.object({
1061
+ jsonrpc: z18.literal("2.0"),
1062
+ method: z18.literal("slates/trigger_group.webhook.manual_setup"),
1063
+ id: z18.string(),
1064
+ params: z18.object({
1065
+ triggerGroupId: z18.string(),
1066
+ webhookUrl: z18.string()
1067
+ })
1068
+ });
1069
+ var slatesMessageTriggerGroupWebhookManualSetupResponse = z18.object({
1070
+ jsonrpc: z18.literal("2.0"),
1071
+ id: z18.string(),
1072
+ result: z18.object({
1073
+ webhookSetupDocument: z18.string(),
1074
+ partialWebhookRegistrationPayload: z18.any()
1075
+ })
1076
+ });
1077
+ var slatesMessageTriggerGroupWebhookManualFinishRequest = z18.object({
1078
+ jsonrpc: z18.literal("2.0"),
1079
+ method: z18.literal("slates/trigger_group.webhook.manual_finish"),
1080
+ id: z18.string(),
1081
+ params: z18.object({
1082
+ triggerGroupId: z18.string(),
1083
+ webhookUrl: z18.string(),
1084
+ partialWebhookRegistrationPayload: z18.any(),
1085
+ userWebhookRegistrationPayload: z18.any()
1086
+ })
1087
+ });
1088
+ var slatesMessageTriggerGroupWebhookManualFinishResponse = z18.object({
1089
+ jsonrpc: z18.literal("2.0"),
1090
+ id: z18.string(),
1055
1091
  result: withRequestTraces({
1056
- webhookRegistrationPayload: z17.any()
1057
- })
1058
- });
1059
- var slatesMessageTriggerGroupWebhookProcessRequest = z17.object({
1060
- jsonrpc: z17.literal("2.0"),
1061
- method: z17.literal("slates/trigger_group.webhook.process"),
1062
- id: z17.string(),
1063
- params: z17.object({
1064
- triggerGroupId: z17.string(),
1065
- url: z17.string(),
1066
- method: z17.string(),
1067
- headers: z17.record(z17.string(), z17.string()),
1068
- body: z17.object({
1069
- encoding: z17.literal("base64"),
1070
- content: z17.string()
1092
+ webhookRegistrationPayload: z18.any()
1093
+ })
1094
+ });
1095
+ var slatesMessageTriggerGroupWebhookProcessRequest = z18.object({
1096
+ jsonrpc: z18.literal("2.0"),
1097
+ method: z18.literal("slates/trigger_group.webhook.process"),
1098
+ id: z18.string(),
1099
+ params: z18.object({
1100
+ triggerGroupId: z18.string(),
1101
+ url: z18.string(),
1102
+ method: z18.string(),
1103
+ headers: z18.record(z18.string(), z18.string()),
1104
+ body: z18.object({
1105
+ encoding: z18.literal("base64"),
1106
+ content: z18.string()
1071
1107
  }).nullable(),
1072
- webhookRegistrationPayload: z17.any()
1108
+ webhookRegistrationPayload: z18.any()
1073
1109
  })
1074
1110
  });
1075
- var slatesMessageTriggerGroupWebhookProcessResponse = z17.object({
1076
- jsonrpc: z17.literal("2.0"),
1077
- id: z17.string(),
1111
+ var slatesMessageTriggerGroupWebhookProcessResponse = z18.object({
1112
+ jsonrpc: z18.literal("2.0"),
1113
+ id: z18.string(),
1078
1114
  result: withRequestTraces({
1079
- events: z17.array(slatesTriggerGroupWebhookEvent),
1115
+ events: z18.array(slatesTriggerGroupWebhookEvent),
1080
1116
  response: slatesWebhookHttpResponse.nullable().optional(),
1081
1117
  skipped: slatesTriggerGroupWebhookSkipped.nullable().optional()
1082
1118
  })
1083
1119
  });
1084
- var slatesMessageTriggerGroupRoutingMatchersGetRequest = z17.object({
1085
- jsonrpc: z17.literal("2.0"),
1086
- method: z17.literal("slates/trigger_group.routing_matchers.get"),
1087
- id: z17.string(),
1088
- params: z17.object({
1089
- triggerGroupId: z17.string()
1120
+ var slatesMessageTriggerGroupRoutingMatchersGetRequest = z18.object({
1121
+ jsonrpc: z18.literal("2.0"),
1122
+ method: z18.literal("slates/trigger_group.routing_matchers.get"),
1123
+ id: z18.string(),
1124
+ params: z18.object({
1125
+ triggerGroupId: z18.string()
1090
1126
  })
1091
1127
  });
1092
- var slatesMessageTriggerGroupRoutingMatchersGetResponse = z17.object({
1093
- jsonrpc: z17.literal("2.0"),
1094
- id: z17.string(),
1128
+ var slatesMessageTriggerGroupRoutingMatchersGetResponse = z18.object({
1129
+ jsonrpc: z18.literal("2.0"),
1130
+ id: z18.string(),
1095
1131
  result: withRequestTraces({
1096
- matchers: z17.array(slatesTriggerRoutingMatcher)
1132
+ matchers: z18.array(slatesTriggerRoutingMatcher)
1097
1133
  })
1098
1134
  });
1099
- var slatesMessageTriggerGroupPollingPollRequest = z17.object({
1100
- jsonrpc: z17.literal("2.0"),
1101
- method: z17.literal("slates/trigger_group.polling.poll"),
1102
- id: z17.string(),
1103
- params: z17.object({
1104
- triggerGroupId: z17.string(),
1105
- state: z17.any().nullable()
1135
+ var slatesMessageTriggerGroupPollingPollRequest = z18.object({
1136
+ jsonrpc: z18.literal("2.0"),
1137
+ method: z18.literal("slates/trigger_group.polling.poll"),
1138
+ id: z18.string(),
1139
+ params: z18.object({
1140
+ triggerGroupId: z18.string(),
1141
+ state: z18.any().nullable()
1106
1142
  })
1107
1143
  });
1108
- var slatesMessageTriggerGroupPollingPollResponse = z17.object({
1109
- jsonrpc: z17.literal("2.0"),
1110
- id: z17.string(),
1144
+ var slatesMessageTriggerGroupPollingPollResponse = z18.object({
1145
+ jsonrpc: z18.literal("2.0"),
1146
+ id: z18.string(),
1111
1147
  result: withRequestTraces({
1112
- updatedState: z17.any().nullable().optional(),
1113
- events: z17.array(slatesTriggerGroupPollEvent)
1148
+ updatedState: z18.any().nullable().optional(),
1149
+ events: z18.array(slatesTriggerGroupPollEvent)
1114
1150
  })
1115
1151
  });
1116
- var slatesMessageTriggerGroupGatewayConnectRequest = z17.object({
1117
- jsonrpc: z17.literal("2.0"),
1118
- method: z17.literal("slates/trigger_group.gateway.connect"),
1119
- id: z17.string(),
1120
- params: z17.object({
1121
- triggerGroupId: z17.string(),
1122
- state: z17.any().nullable()
1152
+ var slatesMessageTriggerGroupGatewayConnectRequest = z18.object({
1153
+ jsonrpc: z18.literal("2.0"),
1154
+ method: z18.literal("slates/trigger_group.gateway.connect"),
1155
+ id: z18.string(),
1156
+ params: z18.object({
1157
+ triggerGroupId: z18.string(),
1158
+ state: z18.any().nullable()
1123
1159
  })
1124
1160
  });
1125
- var slatesMessageTriggerGroupGatewayConnectResponse = z17.object({
1126
- jsonrpc: z17.literal("2.0"),
1127
- id: z17.string(),
1161
+ var slatesMessageTriggerGroupGatewayConnectResponse = z18.object({
1162
+ jsonrpc: z18.literal("2.0"),
1163
+ id: z18.string(),
1128
1164
  result: withRequestTraces({
1129
- url: z17.string(),
1130
- state: z17.any().nullable().optional()
1165
+ url: z18.string(),
1166
+ state: z18.any().nullable().optional()
1131
1167
  })
1132
1168
  });
1133
- var slatesMessageTriggerGroupGatewayReceiveRequest = z17.object({
1134
- jsonrpc: z17.literal("2.0"),
1135
- method: z17.literal("slates/trigger_group.gateway.receive"),
1136
- id: z17.string(),
1137
- params: z17.object({
1138
- triggerGroupId: z17.string(),
1139
- state: z17.any().nullable(),
1140
- frames: z17.array(z17.string()),
1141
- closed: z17.object({ code: z17.number(), reason: z17.string() }).nullable().optional()
1169
+ var slatesMessageTriggerGroupGatewayReceiveRequest = z18.object({
1170
+ jsonrpc: z18.literal("2.0"),
1171
+ method: z18.literal("slates/trigger_group.gateway.receive"),
1172
+ id: z18.string(),
1173
+ params: z18.object({
1174
+ triggerGroupId: z18.string(),
1175
+ state: z18.any().nullable(),
1176
+ frames: z18.array(z18.string()),
1177
+ closed: z18.object({ code: z18.number(), reason: z18.string() }).nullable().optional()
1142
1178
  })
1143
1179
  });
1144
- var slatesMessageTriggerGroupGatewayReceiveResponse = z17.object({
1145
- jsonrpc: z17.literal("2.0"),
1146
- id: z17.string(),
1180
+ var slatesMessageTriggerGroupGatewayReceiveResponse = z18.object({
1181
+ jsonrpc: z18.literal("2.0"),
1182
+ id: z18.string(),
1147
1183
  result: withRequestTraces({
1148
- state: z17.any().nullable().optional(),
1149
- send: z17.array(z17.string()),
1150
- events: z17.array(slatesTriggerGroupPollEvent),
1151
- heartbeat: z17.object({
1152
- intervalMs: z17.number().int().positive(),
1153
- frame: z17.string(),
1184
+ state: z18.any().nullable().optional(),
1185
+ send: z18.array(z18.string()),
1186
+ events: z18.array(slatesTriggerGroupPollEvent),
1187
+ heartbeat: z18.object({
1188
+ intervalMs: z18.number().int().positive(),
1189
+ frame: z18.string(),
1154
1190
  // The hub requires `heartbeatAcked` between beats and reconnects otherwise.
1155
- expectsAck: z17.boolean().optional()
1191
+ expectsAck: z18.boolean().optional()
1156
1192
  }).nullable().optional(),
1157
1193
  // Set when these frames included the provider's acknowledgement of a heartbeat.
1158
- heartbeatAcked: z17.boolean().optional(),
1159
- close: z17.object({ reconnect: z17.boolean(), reason: z17.string().optional() }).nullable().optional()
1194
+ heartbeatAcked: z18.boolean().optional(),
1195
+ close: z18.object({ reconnect: z18.boolean(), reason: z18.string().optional() }).nullable().optional()
1160
1196
  })
1161
1197
  });
1162
1198
  var slatesTriggerGroupResponsesByMethod = {
@@ -1348,7 +1384,7 @@ var createSlatesProviderProtoHandler = (cb) => ({
1348
1384
  });
1349
1385
  var toSlateErrorResponse = (error, defaults = {}) => {
1350
1386
  let slateError = getSlateErrorResponse(error);
1351
- if (slateError) return slateError;
1387
+ if (slateError) return withUpstreamCode(slateError);
1352
1388
  let serviceError = getServiceErrorData(error);
1353
1389
  if (serviceError) {
1354
1390
  return mapServiceErrorToSlateErrorResponse(serviceError, defaults);
@@ -1401,6 +1437,13 @@ var getServiceErrorData = (error) => {
1401
1437
  }
1402
1438
  return null;
1403
1439
  };
1440
+ var UPSTREAM_CODE_PATTERN = /^[\w.:-]{1,128}$/;
1441
+ var normalizeUpstreamCode = (value) => typeof value === "string" && UPSTREAM_CODE_PATTERN.test(value) ? value : void 0;
1442
+ var withUpstreamCode = (response) => {
1443
+ let { upstreamCode: rawUpstreamCode, ...rest } = response;
1444
+ let upstreamCode = normalizeUpstreamCode(rawUpstreamCode) ?? normalizeUpstreamCode(response.upstream?.code);
1445
+ return upstreamCode ? { ...rest, upstreamCode } : rest;
1446
+ };
1404
1447
  var mapKind = (code) => {
1405
1448
  if (code.startsWith("declaration.")) return "declaration";
1406
1449
  if (code.startsWith("input.")) return "validation";
@@ -1448,6 +1491,7 @@ var mapIssues = (errors) => {
1448
1491
  };
1449
1492
  var mapServiceErrorToSlateErrorResponse = (error, defaults = {}) => {
1450
1493
  let code = defaults.code ?? mapServiceErrorCode(error.code, error.status);
1494
+ let upstreamCode = normalizeUpstreamCode(error.upstreamCode);
1451
1495
  let extraEntries = Object.entries(error).filter(
1452
1496
  ([key]) => ![
1453
1497
  "status",
@@ -1468,6 +1512,7 @@ var mapServiceErrorToSlateErrorResponse = (error, defaults = {}) => {
1468
1512
  retryable: mapRetryable(code),
1469
1513
  status: error.status,
1470
1514
  ...mapIssues(error.errors) ? { issues: mapIssues(error.errors) } : {},
1515
+ ...upstreamCode ? { upstreamCode } : {},
1471
1516
  baggage: {
1472
1517
  serviceError: {
1473
1518
  code: error.code,
@@ -1517,6 +1562,7 @@ export {
1517
1562
  slatesConfigRequestsByMethod,
1518
1563
  slatesConfigResponsesByMethod,
1519
1564
  slatesControlFlowNotificationsByMethod,
1565
+ slatesErrorResponse,
1520
1566
  slatesHubNotificationsByMethod,
1521
1567
  slatesHubRequestsByMethod,
1522
1568
  slatesHubResponsesByMethod,