@slates/proto 1.0.0-rc.12 → 1.0.0-rc.14

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 z5 from "zod";
10
+ import z6 from "zod";
11
11
 
12
12
  // src/types/action.ts
13
13
  import z from "zod";
@@ -38,11 +38,34 @@ var slatesActionBase = z.object({
38
38
  name: z.string(),
39
39
  url: z.string()
40
40
  })
41
- )
41
+ ),
42
+ adapter: z.optional(z.nullable(z.string()))
42
43
  });
43
44
  var slatesActionTool = slatesActionBase.extend({
44
45
  type: z.literal("action.tool"),
45
- capabilities: z.object({})
46
+ capabilities: z.object({}),
47
+ isPublic: z.boolean()
48
+ });
49
+ var slatesWebhookRequestMatcher = z.object({
50
+ method: z.string().optional(),
51
+ hasQueryParam: z.string().optional(),
52
+ hasHeader: z.string().optional(),
53
+ jsonBodyField: z.object({
54
+ path: z.string(),
55
+ equals: z.string().optional()
56
+ }).optional(),
57
+ formBodyField: z.object({
58
+ path: z.string(),
59
+ equals: z.string().optional()
60
+ }).optional()
61
+ });
62
+ var slatesWebhookHttp = z.object({
63
+ methods: z.array(z.enum(["GET", "POST", "PUT", "PATCH", "DELETE", "HEAD", "OPTIONS"])).optional(),
64
+ sync: z.object({
65
+ mode: z.enum(["never", "match", "always"]),
66
+ match: z.array(slatesWebhookRequestMatcher).optional(),
67
+ timeoutMs: z.number().int().positive().max(15e3).optional()
68
+ }).optional()
46
69
  });
47
70
  var slatesActionTrigger = slatesActionBase.extend({
48
71
  type: z.literal("action.trigger"),
@@ -55,248 +78,274 @@ var slatesActionTrigger = slatesActionBase.extend({
55
78
  z.object({
56
79
  type: z.literal("webhook"),
57
80
  autoRegistration: z.boolean(),
58
- autoUnregistration: z.boolean()
81
+ autoUnregistration: z.boolean(),
82
+ http: slatesWebhookHttp.optional()
59
83
  })
60
84
  ])
61
85
  });
62
86
  var slatesAction = z.union([slatesActionTool, slatesActionTrigger]);
63
87
 
64
- // src/types/authMethod.ts
88
+ // src/types/adapter.ts
65
89
  import z2 from "zod";
66
- var slatesAuthenticationMethod = z2.object({
90
+ var slatesAdapter = z2.object({
67
91
  id: z2.string(),
68
92
  name: z2.string(),
69
- type: z2.union([
70
- z2.literal("auth.oauth"),
71
- z2.literal("auth.token"),
72
- z2.literal("auth.service_account"),
73
- z2.literal("auth.custom")
74
- ]),
75
- scopes: z2.array(
93
+ capabilities: z2.array(
76
94
  z2.object({
77
95
  id: z2.string(),
78
- title: z2.string(),
79
- description: z2.string().optional(),
80
- defaultChecked: z2.boolean().optional()
96
+ value: z2.any()
97
+ })
98
+ )
99
+ });
100
+
101
+ // src/types/authMethod.ts
102
+ import z3 from "zod";
103
+ var slatesAuthenticationMethod = z3.object({
104
+ id: z3.string(),
105
+ name: z3.string(),
106
+ type: z3.union([
107
+ z3.literal("auth.oauth"),
108
+ z3.literal("auth.token"),
109
+ z3.literal("auth.service_account"),
110
+ z3.literal("auth.custom")
111
+ ]),
112
+ scopes: z3.array(
113
+ z3.object({
114
+ id: z3.string(),
115
+ title: z3.string(),
116
+ description: z3.string().optional(),
117
+ defaultChecked: z3.boolean().optional()
81
118
  })
82
119
  ).optional(),
83
- inputSchema: z2.record(z2.string(), z2.any()),
84
- outputSchema: z2.record(z2.string(), z2.any()),
85
- capabilities: z2.object({
86
- getDefaultInput: z2.object({ enabled: z2.boolean() }).optional(),
87
- handleChangedInput: z2.object({ enabled: z2.boolean() }).optional(),
88
- handleTokenRefresh: z2.object({ enabled: z2.boolean() }).optional(),
89
- getProfile: z2.object({ enabled: z2.boolean() }).optional()
120
+ inputSchema: z3.record(z3.string(), z3.any()),
121
+ outputSchema: z3.record(z3.string(), z3.any()),
122
+ capabilities: z3.object({
123
+ getDefaultInput: z3.object({ enabled: z3.boolean() }).optional(),
124
+ handleChangedInput: z3.object({ enabled: z3.boolean() }).optional(),
125
+ handleTokenRefresh: z3.object({ enabled: z3.boolean() }).optional(),
126
+ getProfile: z3.object({ enabled: z3.boolean() }).optional()
90
127
  }),
91
- docs: z2.array(
92
- z2.object({
93
- type: z2.union([
94
- z2.literal("docs.auth.oauth"),
95
- z2.literal("docs.auth.oauth_scopes"),
96
- z2.literal("docs.auth.token"),
97
- z2.literal("docs.auth.service_account"),
98
- z2.literal("docs.auth.custom")
128
+ docs: z3.array(
129
+ z3.object({
130
+ type: z3.union([
131
+ z3.literal("docs.auth.oauth"),
132
+ z3.literal("docs.auth.oauth_scopes"),
133
+ z3.literal("docs.auth.token"),
134
+ z3.literal("docs.auth.service_account"),
135
+ z3.literal("docs.auth.custom")
99
136
  ]).optional(),
100
- name: z2.string(),
101
- url: z2.string()
137
+ name: z3.string(),
138
+ url: z3.string()
102
139
  })
103
140
  )
104
141
  });
105
142
 
106
143
  // src/types/participant.ts
107
- import z3 from "zod";
108
- var slatesParticipant = z3.object({
109
- type: z3.union([z3.literal("consumer"), z3.literal("hub")]),
110
- id: z3.string(),
111
- name: z3.string(),
112
- description: z3.string().optional(),
113
- metadata: z3.record(z3.string(), z3.any()).optional()
144
+ import z4 from "zod";
145
+ var slatesParticipant = z4.object({
146
+ type: z4.union([z4.literal("consumer"), z4.literal("hub")]),
147
+ id: z4.string(),
148
+ name: z4.string(),
149
+ description: z4.string().optional(),
150
+ metadata: z4.record(z4.string(), z4.any()).optional()
114
151
  });
115
152
 
116
153
  // src/messages/tracing.ts
117
- import z4 from "zod";
118
- var slatesRequestTraceTextBody = z4.object({
119
- contentType: z4.string().optional(),
120
- text: z4.string(),
121
- truncated: z4.boolean().optional()
122
- });
123
- var slatesRequestTrace = z4.object({
124
- startedAt: z4.string(),
125
- durationMs: z4.number().nonnegative(),
126
- request: z4.object({
127
- method: z4.string(),
128
- url: z4.string(),
129
- headers: z4.record(z4.string(), z4.string()).optional(),
154
+ import z5 from "zod";
155
+ var slatesRequestTraceTextBody = z5.object({
156
+ contentType: z5.string().optional(),
157
+ text: z5.string(),
158
+ truncated: z5.boolean().optional()
159
+ });
160
+ var slatesRequestTrace = z5.object({
161
+ startedAt: z5.string(),
162
+ durationMs: z5.number().nonnegative(),
163
+ request: z5.object({
164
+ method: z5.string(),
165
+ url: z5.string(),
166
+ headers: z5.record(z5.string(), z5.string()).optional(),
130
167
  body: slatesRequestTraceTextBody.optional()
131
168
  }),
132
- response: z4.object({
133
- status: z4.number(),
134
- statusText: z4.string().optional(),
135
- headers: z4.record(z4.string(), z4.string()).optional(),
169
+ response: z5.object({
170
+ status: z5.number(),
171
+ statusText: z5.string().optional(),
172
+ headers: z5.record(z5.string(), z5.string()).optional(),
136
173
  body: slatesRequestTraceTextBody.optional()
137
174
  }).optional(),
138
- error: z4.object({
139
- code: z4.string().optional(),
140
- message: z4.string()
175
+ error: z5.object({
176
+ code: z5.string().optional(),
177
+ message: z5.string()
141
178
  }).optional()
142
179
  });
143
- var withRequestTraces = (shape) => z4.object({
180
+ var withRequestTraces = (shape) => z5.object({
144
181
  ...shape,
145
- requestTraces: z4.array(slatesRequestTrace).optional()
182
+ requestTraces: z5.array(slatesRequestTrace).optional()
146
183
  });
147
184
 
148
185
  // src/messages/action.ts
149
- var slatesMessageActionsListRequest = z5.object({
150
- jsonrpc: z5.literal("2.0"),
151
- method: z5.literal("slates/actions.list"),
152
- id: z5.string(),
153
- params: z5.object({})
154
- });
155
- var slatesMessageActionsListResponse = z5.object({
156
- jsonrpc: z5.literal("2.0"),
157
- id: z5.string(),
158
- result: z5.object({
159
- actions: z5.array(slatesAction)
186
+ var slatesWebhookHttpResponse = z6.object({
187
+ status: z6.number().int().min(100).max(599),
188
+ headers: z6.record(z6.string(), z6.string()),
189
+ body: z6.object({
190
+ encoding: z6.literal("base64"),
191
+ content: z6.string()
192
+ }).nullable()
193
+ });
194
+ var slatesMessageActionsListRequest = z6.object({
195
+ jsonrpc: z6.literal("2.0"),
196
+ method: z6.literal("slates/actions.list"),
197
+ id: z6.string(),
198
+ params: z6.object({
199
+ includeAdapterActions: z6.optional(z6.nullable(z6.boolean()))
200
+ })
201
+ });
202
+ var slatesMessageActionsListResponse = z6.object({
203
+ jsonrpc: z6.literal("2.0"),
204
+ id: z6.string(),
205
+ result: z6.object({
206
+ actions: z6.array(slatesAction)
160
207
  })
161
208
  });
162
- var slatesMessageActionGetRequest = z5.object({
163
- jsonrpc: z5.literal("2.0"),
164
- method: z5.literal("slates/action.get"),
165
- id: z5.string(),
166
- params: z5.object({
167
- actionId: z5.string()
209
+ var slatesMessageActionGetRequest = z6.object({
210
+ jsonrpc: z6.literal("2.0"),
211
+ method: z6.literal("slates/action.get"),
212
+ id: z6.string(),
213
+ params: z6.object({
214
+ actionId: z6.string()
168
215
  })
169
216
  });
170
- var slatesMessageActionGetResponse = z5.object({
171
- jsonrpc: z5.literal("2.0"),
172
- id: z5.string(),
173
- result: z5.object({
217
+ var slatesMessageActionGetResponse = z6.object({
218
+ jsonrpc: z6.literal("2.0"),
219
+ id: z6.string(),
220
+ result: z6.object({
174
221
  action: slatesAction
175
222
  })
176
223
  });
177
- var slatesMessageActionInvokeRequest = z5.object({
178
- jsonrpc: z5.literal("2.0"),
179
- method: z5.literal("slates/action.tool.invoke"),
180
- id: z5.string(),
181
- params: z5.object({
182
- actionId: z5.string(),
183
- input: z5.record(z5.string(), z5.any())
224
+ var slatesMessageActionInvokeRequest = z6.object({
225
+ jsonrpc: z6.literal("2.0"),
226
+ method: z6.literal("slates/action.tool.invoke"),
227
+ id: z6.string(),
228
+ params: z6.object({
229
+ actionId: z6.string(),
230
+ input: z6.record(z6.string(), z6.any())
184
231
  })
185
232
  });
186
- var slatesMessageActionInvokeResponse = z5.object({
187
- jsonrpc: z5.literal("2.0"),
188
- id: z5.string(),
233
+ var slatesMessageActionInvokeResponse = z6.object({
234
+ jsonrpc: z6.literal("2.0"),
235
+ id: z6.string(),
189
236
  result: withRequestTraces({
190
- output: z5.record(z5.string(), z5.any()),
191
- message: z5.string().optional(),
192
- attachments: z5.array(
193
- z5.object({
194
- mimeType: z5.string().optional(),
195
- content: z5.union([
196
- z5.object({
197
- type: z5.literal("url"),
198
- url: z5.string()
237
+ output: z6.record(z6.string(), z6.any()),
238
+ message: z6.string().optional(),
239
+ attachments: z6.array(
240
+ z6.object({
241
+ mimeType: z6.string().optional(),
242
+ content: z6.union([
243
+ z6.object({
244
+ type: z6.literal("url"),
245
+ url: z6.string()
199
246
  }),
200
- z5.object({
201
- type: z5.literal("content"),
202
- encoding: z5.union([z5.literal("base64"), z5.literal("utf-8")]),
203
- content: z5.string()
247
+ z6.object({
248
+ type: z6.literal("content"),
249
+ encoding: z6.union([z6.literal("base64"), z6.literal("utf-8")]),
250
+ content: z6.string()
204
251
  })
205
252
  ])
206
253
  })
207
254
  ).optional()
208
255
  })
209
256
  });
210
- var slatesMessageActionTriggerEventMapRequest = z5.object({
211
- jsonrpc: z5.literal("2.0"),
212
- method: z5.literal("slates/action.trigger.map_event"),
213
- id: z5.string(),
214
- params: z5.object({
215
- actionId: z5.string(),
216
- input: z5.record(z5.string(), z5.any())
257
+ var slatesMessageActionTriggerEventMapRequest = z6.object({
258
+ jsonrpc: z6.literal("2.0"),
259
+ method: z6.literal("slates/action.trigger.map_event"),
260
+ id: z6.string(),
261
+ params: z6.object({
262
+ actionId: z6.string(),
263
+ input: z6.record(z6.string(), z6.any())
217
264
  })
218
265
  });
219
- var slatesMessageActionTriggerEventMapResponse = z5.object({
220
- jsonrpc: z5.literal("2.0"),
221
- id: z5.string(),
266
+ var slatesMessageActionTriggerEventMapResponse = z6.object({
267
+ jsonrpc: z6.literal("2.0"),
268
+ id: z6.string(),
222
269
  result: withRequestTraces({
223
- type: z5.string(),
224
- id: z5.string(),
225
- output: z5.record(z5.string(), z5.any())
270
+ type: z6.string(),
271
+ id: z6.string(),
272
+ output: z6.record(z6.string(), z6.any())
226
273
  })
227
274
  });
228
- var slatesMessageActionTriggerEventsPollRequest = z5.object({
229
- jsonrpc: z5.literal("2.0"),
230
- method: z5.literal("slates/action.trigger.poll_events"),
231
- id: z5.string(),
232
- params: z5.object({
233
- actionId: z5.string(),
234
- state: z5.any().nullable()
275
+ var slatesMessageActionTriggerEventsPollRequest = z6.object({
276
+ jsonrpc: z6.literal("2.0"),
277
+ method: z6.literal("slates/action.trigger.poll_events"),
278
+ id: z6.string(),
279
+ params: z6.object({
280
+ actionId: z6.string(),
281
+ state: z6.any().nullable()
235
282
  })
236
283
  });
237
- var slatesMessageActionTriggerEventsPollResponse = z5.object({
238
- jsonrpc: z5.literal("2.0"),
239
- id: z5.string(),
284
+ var slatesMessageActionTriggerEventsPollResponse = z6.object({
285
+ jsonrpc: z6.literal("2.0"),
286
+ id: z6.string(),
240
287
  result: withRequestTraces({
241
- inputs: z5.array(z5.record(z5.string(), z5.any())),
242
- updatedState: z5.any().nullable().optional()
288
+ inputs: z6.array(z6.record(z6.string(), z6.any())),
289
+ updatedState: z6.any().nullable().optional()
243
290
  })
244
291
  });
245
- var slatesMessageActionTriggerWebhookHandleRequest = z5.object({
246
- jsonrpc: z5.literal("2.0"),
247
- method: z5.literal("slates/action.trigger.webhook_handle"),
248
- id: z5.string(),
249
- params: z5.object({
250
- actionId: z5.string(),
251
- url: z5.string(),
252
- method: z5.string(),
253
- headers: z5.record(z5.string(), z5.string()),
254
- body: z5.object({
255
- encoding: z5.literal("base64"),
256
- content: z5.string()
292
+ var slatesMessageActionTriggerWebhookHandleRequest = z6.object({
293
+ jsonrpc: z6.literal("2.0"),
294
+ method: z6.literal("slates/action.trigger.webhook_handle"),
295
+ id: z6.string(),
296
+ params: z6.object({
297
+ actionId: z6.string(),
298
+ url: z6.string(),
299
+ method: z6.string(),
300
+ headers: z6.record(z6.string(), z6.string()),
301
+ body: z6.object({
302
+ encoding: z6.literal("base64"),
303
+ content: z6.string()
257
304
  }).nullable(),
258
- state: z5.any().nullable()
305
+ state: z6.any().nullable(),
306
+ registrationDetails: z6.any().nullable().optional()
259
307
  })
260
308
  });
261
- var slatesMessageActionTriggerWebhookHandleResponse = z5.object({
262
- jsonrpc: z5.literal("2.0"),
263
- id: z5.string(),
309
+ var slatesMessageActionTriggerWebhookHandleResponse = z6.object({
310
+ jsonrpc: z6.literal("2.0"),
311
+ id: z6.string(),
264
312
  result: withRequestTraces({
265
- inputs: z5.array(z5.record(z5.string(), z5.any())),
266
- updatedState: z5.any().nullable().optional()
313
+ inputs: z6.array(z6.record(z6.string(), z6.any())),
314
+ updatedState: z6.any().nullable().optional(),
315
+ response: slatesWebhookHttpResponse.nullable().optional()
267
316
  })
268
317
  });
269
- var slatesMessageActionTriggerWebhookRegisterRequest = z5.object({
270
- jsonrpc: z5.literal("2.0"),
271
- method: z5.literal("slates/action.trigger.webhook_register"),
272
- id: z5.string(),
273
- params: z5.object({
274
- actionId: z5.string(),
275
- webhookBaseUrl: z5.string()
318
+ var slatesMessageActionTriggerWebhookRegisterRequest = z6.object({
319
+ jsonrpc: z6.literal("2.0"),
320
+ method: z6.literal("slates/action.trigger.webhook_register"),
321
+ id: z6.string(),
322
+ params: z6.object({
323
+ actionId: z6.string(),
324
+ webhookBaseUrl: z6.string()
276
325
  })
277
326
  });
278
- var slatesMessageActionTriggerWebhookRegisterResponse = z5.object({
279
- jsonrpc: z5.literal("2.0"),
280
- id: z5.string(),
327
+ var slatesMessageActionTriggerWebhookRegisterResponse = z6.object({
328
+ jsonrpc: z6.literal("2.0"),
329
+ id: z6.string(),
281
330
  result: withRequestTraces({
282
- registrationDetails: z5.any(),
283
- state: z5.any().optional()
331
+ registrationDetails: z6.any(),
332
+ state: z6.any().optional()
284
333
  })
285
334
  });
286
- var slatesMessageActionTriggerWebhookUnregisterRequest = z5.object({
287
- jsonrpc: z5.literal("2.0"),
288
- method: z5.literal("slates/action.trigger.webhook_unregister"),
289
- id: z5.string(),
290
- params: z5.object({
291
- actionId: z5.string(),
292
- webhookBaseUrl: z5.string(),
293
- registrationDetails: z5.any(),
294
- state: z5.any().optional()
335
+ var slatesMessageActionTriggerWebhookUnregisterRequest = z6.object({
336
+ jsonrpc: z6.literal("2.0"),
337
+ method: z6.literal("slates/action.trigger.webhook_unregister"),
338
+ id: z6.string(),
339
+ params: z6.object({
340
+ actionId: z6.string(),
341
+ webhookBaseUrl: z6.string(),
342
+ registrationDetails: z6.any(),
343
+ state: z6.any().optional()
295
344
  })
296
345
  });
297
- var slatesMessageActionTriggerWebhookUnregisterResponse = z5.object({
298
- jsonrpc: z5.literal("2.0"),
299
- id: z5.string(),
346
+ var slatesMessageActionTriggerWebhookUnregisterResponse = z6.object({
347
+ jsonrpc: z6.literal("2.0"),
348
+ id: z6.string(),
300
349
  result: withRequestTraces({})
301
350
  });
302
351
  var slatesActionResponsesByMethod = {
@@ -320,179 +369,220 @@ var slatesActionRequestsByMethod = {
320
369
  "slates/action.trigger.webhook_unregister": slatesMessageActionTriggerWebhookUnregisterRequest
321
370
  };
322
371
 
372
+ // src/messages/adapter.ts
373
+ import z7 from "zod";
374
+ var slatesMessageAdaptersListRequest = z7.object({
375
+ jsonrpc: z7.literal("2.0"),
376
+ method: z7.literal("slates/adapters.list"),
377
+ id: z7.string(),
378
+ params: z7.object({
379
+ includeAdapters: z7.optional(z7.nullable(z7.boolean()))
380
+ })
381
+ });
382
+ var slatesMessageAdaptersListResponse = z7.object({
383
+ jsonrpc: z7.literal("2.0"),
384
+ id: z7.string(),
385
+ result: z7.object({
386
+ adapters: z7.array(slatesAdapter)
387
+ })
388
+ });
389
+ var slatesMessageAdapterGetRequest = z7.object({
390
+ jsonrpc: z7.literal("2.0"),
391
+ method: z7.literal("slates/adapter.get"),
392
+ id: z7.string(),
393
+ params: z7.object({
394
+ adapterId: z7.string()
395
+ })
396
+ });
397
+ var slatesMessageAdapterGetResponse = z7.object({
398
+ jsonrpc: z7.literal("2.0"),
399
+ id: z7.string(),
400
+ result: z7.object({
401
+ adapter: slatesAdapter
402
+ })
403
+ });
404
+ var slatesAdapterResponsesByMethod = {
405
+ "slates/adapters.list": slatesMessageAdaptersListResponse,
406
+ "slates/adapter.get": slatesMessageAdapterGetResponse
407
+ };
408
+ var slatesAdapterRequestsByMethod = {
409
+ "slates/adapters.list": slatesMessageAdaptersListRequest,
410
+ "slates/adapter.get": slatesMessageAdapterGetRequest
411
+ };
412
+
323
413
  // src/messages/auth.ts
324
- import z6 from "zod";
325
- var slatesMessageSetAuthNotification = z6.object({
326
- jsonrpc: z6.literal("2.0"),
327
- method: z6.literal("slates/auth.set"),
328
- params: z6.object({
329
- authenticationMethodId: z6.string(),
330
- output: z6.record(z6.string(), z6.any())
414
+ import z8 from "zod";
415
+ var slatesMessageSetAuthNotification = z8.object({
416
+ jsonrpc: z8.literal("2.0"),
417
+ method: z8.literal("slates/auth.set"),
418
+ params: z8.object({
419
+ authenticationMethodId: z8.string(),
420
+ output: z8.record(z8.string(), z8.any())
331
421
  })
332
422
  });
333
- var slatesMessageAuthMethodsListRequest = z6.object({
334
- jsonrpc: z6.literal("2.0"),
335
- method: z6.literal("slates/auth.methods.list"),
336
- id: z6.string(),
337
- params: z6.object({})
423
+ var slatesMessageAuthMethodsListRequest = z8.object({
424
+ jsonrpc: z8.literal("2.0"),
425
+ method: z8.literal("slates/auth.methods.list"),
426
+ id: z8.string(),
427
+ params: z8.object({})
338
428
  });
339
- var slatesMessageAuthMethodsListResponse = z6.object({
340
- jsonrpc: z6.literal("2.0"),
341
- id: z6.string(),
342
- result: z6.object({
343
- authenticationMethods: z6.array(slatesAuthenticationMethod)
429
+ var slatesMessageAuthMethodsListResponse = z8.object({
430
+ jsonrpc: z8.literal("2.0"),
431
+ id: z8.string(),
432
+ result: z8.object({
433
+ authenticationMethods: z8.array(slatesAuthenticationMethod)
344
434
  })
345
435
  });
346
- var slatesMessageAuthMethodGetRequest = z6.object({
347
- jsonrpc: z6.literal("2.0"),
348
- method: z6.literal("slates/auth.method.get"),
349
- id: z6.string(),
350
- params: z6.object({
351
- authenticationMethodId: z6.string()
436
+ var slatesMessageAuthMethodGetRequest = z8.object({
437
+ jsonrpc: z8.literal("2.0"),
438
+ method: z8.literal("slates/auth.method.get"),
439
+ id: z8.string(),
440
+ params: z8.object({
441
+ authenticationMethodId: z8.string()
352
442
  })
353
443
  });
354
- var slatesMessageAuthMethodGetResponse = z6.object({
355
- jsonrpc: z6.literal("2.0"),
356
- id: z6.string(),
357
- result: z6.object({
444
+ var slatesMessageAuthMethodGetResponse = z8.object({
445
+ jsonrpc: z8.literal("2.0"),
446
+ id: z8.string(),
447
+ result: z8.object({
358
448
  authenticationMethod: slatesAuthenticationMethod
359
449
  })
360
450
  });
361
- var slatesMessageAuthInputChangedRequest = z6.object({
362
- jsonrpc: z6.literal("2.0"),
363
- method: z6.literal("slates/auth.input.changed"),
364
- id: z6.string(),
365
- params: z6.object({
366
- authenticationMethodId: z6.string(),
367
- previousInput: z6.record(z6.string(), z6.any()).nullable(),
368
- newInput: z6.record(z6.string(), z6.any())
451
+ var slatesMessageAuthInputChangedRequest = z8.object({
452
+ jsonrpc: z8.literal("2.0"),
453
+ method: z8.literal("slates/auth.input.changed"),
454
+ id: z8.string(),
455
+ params: z8.object({
456
+ authenticationMethodId: z8.string(),
457
+ previousInput: z8.record(z8.string(), z8.any()).nullable(),
458
+ newInput: z8.record(z8.string(), z8.any())
369
459
  })
370
460
  });
371
- var slatesMessageAuthInputChangedResponse = z6.object({
372
- jsonrpc: z6.literal("2.0"),
373
- id: z6.string(),
461
+ var slatesMessageAuthInputChangedResponse = z8.object({
462
+ jsonrpc: z8.literal("2.0"),
463
+ id: z8.string(),
374
464
  result: withRequestTraces({
375
- input: z6.record(z6.string(), z6.any()).optional()
465
+ input: z8.record(z8.string(), z8.any()).optional()
376
466
  })
377
467
  });
378
- var slatesMessageAuthDefaultInputGetRequest = z6.object({
379
- jsonrpc: z6.literal("2.0"),
380
- method: z6.literal("slates/auth.input.get_default"),
381
- id: z6.string(),
382
- params: z6.object({
383
- authenticationMethodId: z6.string()
468
+ var slatesMessageAuthDefaultInputGetRequest = z8.object({
469
+ jsonrpc: z8.literal("2.0"),
470
+ method: z8.literal("slates/auth.input.get_default"),
471
+ id: z8.string(),
472
+ params: z8.object({
473
+ authenticationMethodId: z8.string()
384
474
  })
385
475
  });
386
- var slatesMessageAuthDefaultInputGetResponse = z6.object({
387
- jsonrpc: z6.literal("2.0"),
388
- id: z6.string(),
476
+ var slatesMessageAuthDefaultInputGetResponse = z8.object({
477
+ jsonrpc: z8.literal("2.0"),
478
+ id: z8.string(),
389
479
  result: withRequestTraces({
390
- input: z6.record(z6.string(), z6.any())
480
+ input: z8.record(z8.string(), z8.any())
391
481
  })
392
482
  });
393
- var slatesMessageAuthAuthorizationUrlGetRequest = z6.object({
394
- jsonrpc: z6.literal("2.0"),
395
- method: z6.literal("slates/auth.authorization_url.get"),
396
- id: z6.string(),
397
- params: z6.object({
398
- authenticationMethodId: z6.string(),
399
- redirectUri: z6.string(),
400
- state: z6.string(),
401
- input: z6.record(z6.string(), z6.any()),
402
- clientId: z6.string(),
403
- clientSecret: z6.string(),
404
- scopes: z6.array(z6.string())
483
+ var slatesMessageAuthAuthorizationUrlGetRequest = z8.object({
484
+ jsonrpc: z8.literal("2.0"),
485
+ method: z8.literal("slates/auth.authorization_url.get"),
486
+ id: z8.string(),
487
+ params: z8.object({
488
+ authenticationMethodId: z8.string(),
489
+ redirectUri: z8.string(),
490
+ state: z8.string(),
491
+ input: z8.record(z8.string(), z8.any()),
492
+ clientId: z8.string(),
493
+ clientSecret: z8.string(),
494
+ scopes: z8.array(z8.string())
405
495
  })
406
496
  });
407
- var slatesMessageAuthAuthorizationUrlGetResponse = z6.object({
408
- jsonrpc: z6.literal("2.0"),
409
- id: z6.string(),
497
+ var slatesMessageAuthAuthorizationUrlGetResponse = z8.object({
498
+ jsonrpc: z8.literal("2.0"),
499
+ id: z8.string(),
410
500
  result: withRequestTraces({
411
- authorizationUrl: z6.string(),
412
- input: z6.record(z6.string(), z6.any()).optional(),
413
- callbackState: z6.record(z6.string(), z6.any()).optional()
501
+ authorizationUrl: z8.string(),
502
+ input: z8.record(z8.string(), z8.any()).optional(),
503
+ callbackState: z8.record(z8.string(), z8.any()).optional()
414
504
  })
415
505
  });
416
- var slatesMessageAuthAuthorizationCallbackHandleRequest = z6.object({
417
- jsonrpc: z6.literal("2.0"),
418
- method: z6.literal("slates/auth.authorization_callback.handle"),
419
- id: z6.string(),
420
- params: z6.object({
421
- authenticationMethodId: z6.string(),
422
- code: z6.string(),
423
- state: z6.string(),
424
- redirectUri: z6.string(),
425
- input: z6.record(z6.string(), z6.any()),
426
- clientId: z6.string(),
427
- clientSecret: z6.string(),
428
- scopes: z6.array(z6.string()),
429
- callbackParams: z6.record(z6.string(), z6.string()).optional(),
430
- callbackState: z6.record(z6.string(), z6.any()).optional()
506
+ var slatesMessageAuthAuthorizationCallbackHandleRequest = z8.object({
507
+ jsonrpc: z8.literal("2.0"),
508
+ method: z8.literal("slates/auth.authorization_callback.handle"),
509
+ id: z8.string(),
510
+ params: z8.object({
511
+ authenticationMethodId: z8.string(),
512
+ code: z8.string(),
513
+ state: z8.string(),
514
+ redirectUri: z8.string(),
515
+ input: z8.record(z8.string(), z8.any()),
516
+ clientId: z8.string(),
517
+ clientSecret: z8.string(),
518
+ scopes: z8.array(z8.string()),
519
+ callbackParams: z8.record(z8.string(), z8.string()).optional(),
520
+ callbackState: z8.record(z8.string(), z8.any()).optional()
431
521
  })
432
522
  });
433
- var slatesMessageAuthAuthorizationCallbackHandleResponse = z6.object({
434
- jsonrpc: z6.literal("2.0"),
435
- id: z6.string(),
523
+ var slatesMessageAuthAuthorizationCallbackHandleResponse = z8.object({
524
+ jsonrpc: z8.literal("2.0"),
525
+ id: z8.string(),
436
526
  result: withRequestTraces({
437
- output: z6.record(z6.string(), z6.any()),
438
- input: z6.record(z6.string(), z6.any()).optional(),
439
- scopes: z6.array(z6.string()).optional()
527
+ output: z8.record(z8.string(), z8.any()),
528
+ input: z8.record(z8.string(), z8.any()).optional(),
529
+ scopes: z8.array(z8.string()).optional()
440
530
  })
441
531
  });
442
- var slatesMessageAuthTokenRefreshHandleRequest = z6.object({
443
- jsonrpc: z6.literal("2.0"),
444
- method: z6.literal("slates/auth.token_refresh.handle"),
445
- id: z6.string(),
446
- params: z6.object({
447
- authenticationMethodId: z6.string(),
448
- output: z6.record(z6.string(), z6.any()),
449
- input: z6.record(z6.string(), z6.any()),
450
- clientId: z6.string(),
451
- clientSecret: z6.string(),
452
- scopes: z6.array(z6.string())
532
+ var slatesMessageAuthTokenRefreshHandleRequest = z8.object({
533
+ jsonrpc: z8.literal("2.0"),
534
+ method: z8.literal("slates/auth.token_refresh.handle"),
535
+ id: z8.string(),
536
+ params: z8.object({
537
+ authenticationMethodId: z8.string(),
538
+ output: z8.record(z8.string(), z8.any()),
539
+ input: z8.record(z8.string(), z8.any()),
540
+ clientId: z8.string(),
541
+ clientSecret: z8.string(),
542
+ scopes: z8.array(z8.string())
453
543
  })
454
544
  });
455
- var slatesMessageAuthTokenRefreshHandleResponse = z6.object({
456
- jsonrpc: z6.literal("2.0"),
457
- id: z6.string(),
545
+ var slatesMessageAuthTokenRefreshHandleResponse = z8.object({
546
+ jsonrpc: z8.literal("2.0"),
547
+ id: z8.string(),
458
548
  result: withRequestTraces({
459
- output: z6.record(z6.string(), z6.any()),
460
- input: z6.record(z6.string(), z6.any()).optional()
549
+ output: z8.record(z8.string(), z8.any()),
550
+ input: z8.record(z8.string(), z8.any()).optional()
461
551
  })
462
552
  });
463
- var slatesMessageAuthProfileGetRequest = z6.object({
464
- jsonrpc: z6.literal("2.0"),
465
- method: z6.literal("slates/auth.profile.get"),
466
- id: z6.string(),
467
- params: z6.object({
468
- authenticationMethodId: z6.string(),
469
- output: z6.record(z6.string(), z6.any()),
470
- input: z6.record(z6.string(), z6.any()),
471
- scopes: z6.array(z6.string())
553
+ var slatesMessageAuthProfileGetRequest = z8.object({
554
+ jsonrpc: z8.literal("2.0"),
555
+ method: z8.literal("slates/auth.profile.get"),
556
+ id: z8.string(),
557
+ params: z8.object({
558
+ authenticationMethodId: z8.string(),
559
+ output: z8.record(z8.string(), z8.any()),
560
+ input: z8.record(z8.string(), z8.any()),
561
+ scopes: z8.array(z8.string())
472
562
  })
473
563
  });
474
- var slatesMessageAuthProfileGetResponse = z6.object({
475
- jsonrpc: z6.literal("2.0"),
476
- id: z6.string(),
564
+ var slatesMessageAuthProfileGetResponse = z8.object({
565
+ jsonrpc: z8.literal("2.0"),
566
+ id: z8.string(),
477
567
  result: withRequestTraces({
478
- profile: z6.record(z6.string(), z6.any())
568
+ profile: z8.record(z8.string(), z8.any())
479
569
  })
480
570
  });
481
- var slatesMessageAuthOutputGetRequest = z6.object({
482
- jsonrpc: z6.literal("2.0"),
483
- method: z6.literal("slates/auth.output.get"),
484
- id: z6.string(),
485
- params: z6.object({
486
- authenticationMethodId: z6.string(),
487
- input: z6.record(z6.string(), z6.any())
571
+ var slatesMessageAuthOutputGetRequest = z8.object({
572
+ jsonrpc: z8.literal("2.0"),
573
+ method: z8.literal("slates/auth.output.get"),
574
+ id: z8.string(),
575
+ params: z8.object({
576
+ authenticationMethodId: z8.string(),
577
+ input: z8.record(z8.string(), z8.any())
488
578
  })
489
579
  });
490
- var slatesMessageAuthOutputGetResponse = z6.object({
491
- jsonrpc: z6.literal("2.0"),
492
- id: z6.string(),
580
+ var slatesMessageAuthOutputGetResponse = z8.object({
581
+ jsonrpc: z8.literal("2.0"),
582
+ id: z8.string(),
493
583
  result: withRequestTraces({
494
- output: z6.record(z6.string(), z6.any()),
495
- scopes: z6.array(z6.string()).optional()
584
+ output: z8.record(z8.string(), z8.any()),
585
+ scopes: z8.array(z8.string()).optional()
496
586
  })
497
587
  });
498
588
  var slatesAuthResponsesByMethod = {
@@ -522,69 +612,69 @@ var slatesAuthNotificationsByMethod = {
522
612
  };
523
613
 
524
614
  // src/messages/config.ts
525
- import z7 from "zod";
526
- var slatesMessageSetConfigNotification = z7.object({
527
- jsonrpc: z7.literal("2.0"),
528
- method: z7.literal("slates/config.set"),
529
- params: z7.object({
530
- config: z7.record(z7.string(), z7.any())
615
+ import z9 from "zod";
616
+ var slatesMessageSetConfigNotification = z9.object({
617
+ jsonrpc: z9.literal("2.0"),
618
+ method: z9.literal("slates/config.set"),
619
+ params: z9.object({
620
+ config: z9.record(z9.string(), z9.any())
531
621
  })
532
622
  });
533
- var slatesMessageConfigSchemaGetRequest = z7.object({
534
- jsonrpc: z7.literal("2.0"),
535
- method: z7.literal("slates/config.schema.get"),
536
- id: z7.string(),
537
- params: z7.object({})
623
+ var slatesMessageConfigSchemaGetRequest = z9.object({
624
+ jsonrpc: z9.literal("2.0"),
625
+ method: z9.literal("slates/config.schema.get"),
626
+ id: z9.string(),
627
+ params: z9.object({})
538
628
  });
539
- var slatesMessageConfigSchemaGetResponse = z7.object({
540
- jsonrpc: z7.literal("2.0"),
541
- id: z7.string(),
542
- result: z7.object({
543
- schema: z7.record(z7.string(), z7.any()),
544
- docs: z7.array(
545
- z7.object({
546
- type: z7.literal("docs.config.general").optional(),
547
- name: z7.string(),
548
- url: z7.string()
629
+ var slatesMessageConfigSchemaGetResponse = z9.object({
630
+ jsonrpc: z9.literal("2.0"),
631
+ id: z9.string(),
632
+ result: z9.object({
633
+ schema: z9.record(z9.string(), z9.any()),
634
+ docs: z9.array(
635
+ z9.object({
636
+ type: z9.literal("docs.config.general").optional(),
637
+ name: z9.string(),
638
+ url: z9.string()
549
639
  })
550
640
  )
551
641
  })
552
642
  });
553
- var slatesMessageConfigChangedRequest = z7.object({
554
- jsonrpc: z7.literal("2.0"),
555
- method: z7.literal("slates/config.changed"),
556
- id: z7.string(),
557
- params: z7.object({
558
- previousConfig: z7.record(z7.string(), z7.any()).nullable(),
559
- newConfig: z7.record(z7.string(), z7.any())
643
+ var slatesMessageConfigChangedRequest = z9.object({
644
+ jsonrpc: z9.literal("2.0"),
645
+ method: z9.literal("slates/config.changed"),
646
+ id: z9.string(),
647
+ params: z9.object({
648
+ previousConfig: z9.record(z9.string(), z9.any()).nullable(),
649
+ newConfig: z9.record(z9.string(), z9.any())
560
650
  })
561
651
  });
562
- var slatesMessageConfigChangedResponse = z7.object({
563
- jsonrpc: z7.literal("2.0"),
564
- id: z7.string(),
652
+ var slatesMessageConfigChangedResponse = z9.object({
653
+ jsonrpc: z9.literal("2.0"),
654
+ id: z9.string(),
565
655
  result: withRequestTraces({
566
- success: z7.boolean(),
567
- config: z7.record(z7.string(), z7.any()).optional(),
568
- errors: z7.array(
569
- z7.object({
570
- code: z7.string(),
571
- message: z7.string(),
572
- path: z7.array(z7.string()).optional()
656
+ success: z9.boolean(),
657
+ config: z9.record(z9.string(), z9.any()).optional(),
658
+ errors: z9.array(
659
+ z9.object({
660
+ code: z9.string(),
661
+ message: z9.string(),
662
+ path: z9.array(z9.string()).optional()
573
663
  })
574
664
  ).optional()
575
665
  })
576
666
  });
577
- var slatesMessageConfigDefaultGetRequest = z7.object({
578
- jsonrpc: z7.literal("2.0"),
579
- method: z7.literal("slates/config.get_default"),
580
- id: z7.string(),
581
- params: z7.object({})
667
+ var slatesMessageConfigDefaultGetRequest = z9.object({
668
+ jsonrpc: z9.literal("2.0"),
669
+ method: z9.literal("slates/config.get_default"),
670
+ id: z9.string(),
671
+ params: z9.object({})
582
672
  });
583
- var slatesMessageConfigDefaultGetResponse = z7.object({
584
- jsonrpc: z7.literal("2.0"),
585
- id: z7.string(),
673
+ var slatesMessageConfigDefaultGetResponse = z9.object({
674
+ jsonrpc: z9.literal("2.0"),
675
+ id: z9.string(),
586
676
  result: withRequestTraces({
587
- config: z7.record(z7.string(), z7.any()).nullable()
677
+ config: z9.record(z9.string(), z9.any()).nullable()
588
678
  })
589
679
  });
590
680
  var slatesConfigResponsesByMethod = {
@@ -602,32 +692,32 @@ var slatesConfigNotificationsByMethod = {
602
692
  };
603
693
 
604
694
  // src/messages/controlFlow.ts
605
- import z8 from "zod";
695
+ import z10 from "zod";
606
696
 
607
697
  // src/version.ts
608
698
  var SLATES_PROTOCOL_VERSION = "slates@2026-01-01";
609
699
 
610
700
  // src/messages/controlFlow.ts
611
- var slatesMessageHelloNotification = z8.object({
612
- jsonrpc: z8.literal("2.0"),
613
- method: z8.literal("slates/hello"),
614
- params: z8.object({
615
- protocol: z8.literal(SLATES_PROTOCOL_VERSION)
701
+ var slatesMessageHelloNotification = z10.object({
702
+ jsonrpc: z10.literal("2.0"),
703
+ method: z10.literal("slates/hello"),
704
+ params: z10.object({
705
+ protocol: z10.literal(SLATES_PROTOCOL_VERSION)
616
706
  })
617
707
  });
618
- var slatesMessageSetParticipantsNotification = z8.object({
619
- jsonrpc: z8.literal("2.0"),
620
- method: z8.literal("slates/participant.set"),
621
- params: z8.object({
622
- participants: z8.array(slatesParticipant)
708
+ var slatesMessageSetParticipantsNotification = z10.object({
709
+ jsonrpc: z10.literal("2.0"),
710
+ method: z10.literal("slates/participant.set"),
711
+ params: z10.object({
712
+ participants: z10.array(slatesParticipant)
623
713
  })
624
714
  });
625
- var slatesMessageSessionStartNotification = z8.object({
626
- jsonrpc: z8.literal("2.0"),
627
- method: z8.literal("slates/session.start"),
628
- params: z8.object({
629
- sessionId: z8.string(),
630
- state: z8.record(z8.string(), z8.any())
715
+ var slatesMessageSessionStartNotification = z10.object({
716
+ jsonrpc: z10.literal("2.0"),
717
+ method: z10.literal("slates/session.start"),
718
+ params: z10.object({
719
+ sessionId: z10.string(),
720
+ state: z10.record(z10.string(), z10.any())
631
721
  })
632
722
  });
633
723
  var slatesControlFlowNotificationsByMethod = {
@@ -637,29 +727,29 @@ var slatesControlFlowNotificationsByMethod = {
637
727
  };
638
728
 
639
729
  // src/messages/identify.ts
640
- import z9 from "zod";
641
- var slatesMessageProviderIdentifyRequest = z9.object({
642
- jsonrpc: z9.literal("2.0"),
643
- method: z9.literal("slates/provider.identify"),
644
- id: z9.string(),
645
- params: z9.object({})
730
+ import z11 from "zod";
731
+ var slatesMessageProviderIdentifyRequest = z11.object({
732
+ jsonrpc: z11.literal("2.0"),
733
+ method: z11.literal("slates/provider.identify"),
734
+ id: z11.string(),
735
+ params: z11.object({})
646
736
  });
647
- var slatesMessageProviderIdentifyResponse = z9.object({
648
- jsonrpc: z9.literal("2.0"),
649
- id: z9.string(),
650
- result: z9.object({
651
- protocol: z9.literal(SLATES_PROTOCOL_VERSION),
652
- provider: z9.object({
653
- type: z9.literal("provider"),
654
- id: z9.string(),
655
- name: z9.string(),
656
- description: z9.string().optional(),
657
- metadata: z9.record(z9.string(), z9.any()).optional()
737
+ var slatesMessageProviderIdentifyResponse = z11.object({
738
+ jsonrpc: z11.literal("2.0"),
739
+ id: z11.string(),
740
+ result: z11.object({
741
+ protocol: z11.literal(SLATES_PROTOCOL_VERSION),
742
+ provider: z11.object({
743
+ type: z11.literal("provider"),
744
+ id: z11.string(),
745
+ name: z11.string(),
746
+ description: z11.string().optional(),
747
+ metadata: z11.record(z11.string(), z11.any()).optional()
658
748
  }),
659
- docs: z9.array(
660
- z9.object({
661
- name: z9.string(),
662
- url: z9.string()
749
+ docs: z11.array(
750
+ z11.object({
751
+ name: z11.string(),
752
+ url: z11.string()
663
753
  })
664
754
  )
665
755
  })
@@ -674,12 +764,14 @@ var slatesIdentifyRequestsByMethod = {
674
764
  // src/messages/index.ts
675
765
  var slatesResponsesByMethod = {
676
766
  ...slatesActionResponsesByMethod,
767
+ ...slatesAdapterResponsesByMethod,
677
768
  ...slatesAuthResponsesByMethod,
678
769
  ...slatesConfigResponsesByMethod,
679
770
  ...slatesIdentifyResponsesByMethod
680
771
  };
681
772
  var slatesRequestsByMethod = {
682
773
  ...slatesActionRequestsByMethod,
774
+ ...slatesAdapterRequestsByMethod,
683
775
  ...slatesAuthRequestsByMethod,
684
776
  ...slatesConfigRequestsByMethod,
685
777
  ...slatesIdentifyRequestsByMethod
@@ -958,6 +1050,9 @@ export {
958
1050
  slatesActionScopes,
959
1051
  slatesActionTool,
960
1052
  slatesActionTrigger,
1053
+ slatesAdapter,
1054
+ slatesAdapterRequestsByMethod,
1055
+ slatesAdapterResponsesByMethod,
961
1056
  slatesAuthNotificationsByMethod,
962
1057
  slatesAuthRequestsByMethod,
963
1058
  slatesAuthResponsesByMethod,
@@ -984,6 +1079,10 @@ export {
984
1079
  slatesMessageActionTriggerWebhookUnregisterResponse,
985
1080
  slatesMessageActionsListRequest,
986
1081
  slatesMessageActionsListResponse,
1082
+ slatesMessageAdapterGetRequest,
1083
+ slatesMessageAdapterGetResponse,
1084
+ slatesMessageAdaptersListRequest,
1085
+ slatesMessageAdaptersListResponse,
987
1086
  slatesMessageAuthAuthorizationCallbackHandleRequest,
988
1087
  slatesMessageAuthAuthorizationCallbackHandleResponse,
989
1088
  slatesMessageAuthAuthorizationUrlGetRequest,
@@ -1021,5 +1120,8 @@ export {
1021
1120
  slatesRequestTraceTextBody,
1022
1121
  slatesRequestsByMethod,
1023
1122
  slatesResponsesByMethod,
1123
+ slatesWebhookHttp,
1124
+ slatesWebhookHttpResponse,
1125
+ slatesWebhookRequestMatcher,
1024
1126
  withRequestTraces
1025
1127
  };