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