@stagewise/mcp-extension-push-notifications 0.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (44) hide show
  1. package/README.md +122 -0
  2. package/dist/capabilities.d.ts +18 -0
  3. package/dist/capabilities.d.ts.map +1 -0
  4. package/dist/capabilities.js +47 -0
  5. package/dist/capabilities.js.map +1 -0
  6. package/dist/client/index.d.ts +2 -0
  7. package/dist/client/index.d.ts.map +1 -0
  8. package/dist/client/index.js +2 -0
  9. package/dist/client/index.js.map +1 -0
  10. package/dist/client/register-push-notifications-client.d.ts +25 -0
  11. package/dist/client/register-push-notifications-client.d.ts.map +1 -0
  12. package/dist/client/register-push-notifications-client.js +116 -0
  13. package/dist/client/register-push-notifications-client.js.map +1 -0
  14. package/dist/constants.d.ts +10 -0
  15. package/dist/constants.d.ts.map +1 -0
  16. package/dist/constants.js +10 -0
  17. package/dist/constants.js.map +1 -0
  18. package/dist/generated/schema.d.ts +516 -0
  19. package/dist/generated/schema.d.ts.map +1 -0
  20. package/dist/generated/schema.js +133 -0
  21. package/dist/generated/schema.js.map +1 -0
  22. package/dist/index.d.ts +7 -0
  23. package/dist/index.d.ts.map +1 -0
  24. package/dist/index.js +6 -0
  25. package/dist/index.js.map +1 -0
  26. package/dist/server/http-subscriptions.d.ts +16 -0
  27. package/dist/server/http-subscriptions.d.ts.map +1 -0
  28. package/dist/server/http-subscriptions.js +235 -0
  29. package/dist/server/http-subscriptions.js.map +1 -0
  30. package/dist/server/index.d.ts +3 -0
  31. package/dist/server/index.d.ts.map +1 -0
  32. package/dist/server/index.js +3 -0
  33. package/dist/server/index.js.map +1 -0
  34. package/dist/server/register-push-notifications-server.d.ts +32 -0
  35. package/dist/server/register-push-notifications-server.d.ts.map +1 -0
  36. package/dist/server/register-push-notifications-server.js +55 -0
  37. package/dist/server/register-push-notifications-server.js.map +1 -0
  38. package/dist/spec.types.d.ts +154 -0
  39. package/dist/spec.types.d.ts.map +1 -0
  40. package/dist/spec.types.js +2 -0
  41. package/dist/spec.types.js.map +1 -0
  42. package/package.json +55 -0
  43. package/schema.json +2466 -0
  44. package/specification/draft/events.md +206 -0
@@ -0,0 +1,516 @@
1
+ import { z } from 'zod/v4';
2
+ import { type JSONValue } from '../spec.types.js';
3
+ /** JSON data accepted in event-specific structured data. */
4
+ export declare const JSONPrimitiveSchema: z.ZodNullable<z.ZodUnion<readonly [z.ZodString, z.ZodNumber, z.ZodBoolean]>>;
5
+ /** JSON data accepted in event-specific structured data. */
6
+ export declare const JSONValueSchema: z.ZodSchema<JSONValue>;
7
+ /** Parameters for retrieving pending durable events. */
8
+ export declare const GetEventsParamsSchema: z.ZodIntersection<z.ZodRecord<z.ZodString, z.ZodUnknown>, z.ZodObject<{
9
+ limit: z.ZodOptional<z.ZodNumber>;
10
+ }, z.core.$strip>>;
11
+ /** Retrieves a bounded page of events pending for the authenticated consumer. */
12
+ export declare const GetEventsRequestSchema: z.ZodObject<{
13
+ jsonrpc: z.ZodLiteral<"2.0">;
14
+ id: z.ZodUnion<readonly [z.ZodString, z.ZodNumber]>;
15
+ method: z.ZodLiteral<"io.stagewise/push-notifications/get">;
16
+ params: z.ZodIntersection<z.ZodRecord<z.ZodString, z.ZodUnknown>, z.ZodObject<{
17
+ limit: z.ZodOptional<z.ZodNumber>;
18
+ }, z.core.$strip>>;
19
+ }, z.core.$strip>;
20
+ /** Parameters for acknowledging durable acceptance of events. */
21
+ export declare const AcknowledgeEventsParamsSchema: z.ZodIntersection<z.ZodRecord<z.ZodString, z.ZodUnknown>, z.ZodObject<{
22
+ eventIds: z.ZodArray<z.ZodString>;
23
+ }, z.core.$strip>>;
24
+ /** Acknowledges durable client acceptance of one or more events. */
25
+ export declare const AcknowledgeEventsRequestSchema: z.ZodObject<{
26
+ jsonrpc: z.ZodLiteral<"2.0">;
27
+ id: z.ZodUnion<readonly [z.ZodString, z.ZodNumber]>;
28
+ method: z.ZodLiteral<"io.stagewise/push-notifications/ack">;
29
+ params: z.ZodIntersection<z.ZodRecord<z.ZodString, z.ZodUnknown>, z.ZodObject<{
30
+ eventIds: z.ZodArray<z.ZodString>;
31
+ }, z.core.$strip>>;
32
+ }, z.core.$strip>;
33
+ /** Empty, idempotent acknowledgement result. */
34
+ export declare const AcknowledgeEventsResultSchema: z.ZodObject<{
35
+ _meta: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
36
+ }, z.core.$strip>;
37
+ /** Empty Push Notifications subscriptions/listen notification filter. */
38
+ export declare const PushNotificationsSubscriptionSchema: z.ZodRecord<z.ZodString, z.ZodNever>;
39
+ /** Extension-owned fields added to subscriptions/listen notifications. */
40
+ export declare const PushNotificationsSubscriptionNotificationsSchema: z.ZodObject<{
41
+ 'io.stagewise/push-notifications': z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodNever>>;
42
+ }, z.core.$strip>;
43
+ /** Push Notifications fields returned in notifications/subscriptions/acknowledged. */
44
+ export declare const PushNotificationsSubscriptionAcknowledgedNotificationsSchema: z.ZodObject<{
45
+ 'io.stagewise/push-notifications': z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodNever>>;
46
+ }, z.core.$strip>;
47
+ /** Empty capability object indicating support for the extension. */
48
+ export declare const PushNotificationsExtensionCapabilitySchema: z.ZodRecord<z.ZodString, z.ZodNever>;
49
+ /** Extensible MCP extension capability map. */
50
+ export declare const ExtensionCapabilitiesSchema: z.ZodIntersection<z.ZodRecord<z.ZodString, z.ZodUnknown>, z.ZodObject<{
51
+ 'io.stagewise/push-notifications': z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodNever>>;
52
+ }, z.core.$strip>>;
53
+ /** Capability container used by discovery and initialization negotiation. */
54
+ export declare const PushNotificationsCapabilitiesSchema: z.ZodIntersection<z.ZodRecord<z.ZodString, z.ZodUnknown>, z.ZodObject<{
55
+ extensions: z.ZodOptional<z.ZodIntersection<z.ZodRecord<z.ZodString, z.ZodUnknown>, z.ZodObject<{
56
+ 'io.stagewise/push-notifications': z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodNever>>;
57
+ }, z.core.$strip>>>;
58
+ }, z.core.$strip>>;
59
+ /** Future MCP per-request client capability metadata. */
60
+ export declare const PushNotificationsClientCapabilitiesMetaSchema: z.ZodIntersection<z.ZodRecord<z.ZodString, z.ZodUnknown>, z.ZodObject<{
61
+ 'io.modelcontextprotocol/clientCapabilities': z.ZodOptional<z.ZodIntersection<z.ZodRecord<z.ZodString, z.ZodUnknown>, z.ZodObject<{
62
+ extensions: z.ZodOptional<z.ZodIntersection<z.ZodRecord<z.ZodString, z.ZodUnknown>, z.ZodObject<{
63
+ 'io.stagewise/push-notifications': z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodNever>>;
64
+ }, z.core.$strip>>>;
65
+ }, z.core.$strip>>>;
66
+ }, z.core.$strip>>;
67
+ /** Future MCP server discovery request. */
68
+ export declare const ServerDiscoverRequestSchema: z.ZodObject<{
69
+ jsonrpc: z.ZodLiteral<"2.0">;
70
+ id: z.ZodUnion<readonly [z.ZodString, z.ZodNumber]>;
71
+ method: z.ZodLiteral<"server/discover">;
72
+ params: z.ZodRecord<z.ZodString, z.ZodUnknown>;
73
+ }, z.core.$strip>;
74
+ /** Future MCP server discovery result. */
75
+ export declare const ServerDiscoverResultSchema: z.ZodIntersection<z.ZodObject<{
76
+ _meta: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
77
+ }, z.core.$strip>, z.ZodObject<{
78
+ capabilities: z.ZodIntersection<z.ZodRecord<z.ZodString, z.ZodUnknown>, z.ZodObject<{
79
+ extensions: z.ZodOptional<z.ZodIntersection<z.ZodRecord<z.ZodString, z.ZodUnknown>, z.ZodObject<{
80
+ 'io.stagewise/push-notifications': z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodNever>>;
81
+ }, z.core.$strip>>>;
82
+ }, z.core.$strip>>;
83
+ }, z.core.$strip>>;
84
+ /** Future MCP notification subscription request. */
85
+ export declare const SubscriptionsListenRequestSchema: z.ZodObject<{
86
+ jsonrpc: z.ZodLiteral<"2.0">;
87
+ id: z.ZodUnion<readonly [z.ZodString, z.ZodNumber]>;
88
+ method: z.ZodLiteral<"subscriptions/listen">;
89
+ params: z.ZodIntersection<z.ZodRecord<z.ZodString, z.ZodUnknown>, z.ZodObject<{
90
+ notifications: z.ZodIntersection<z.ZodObject<{
91
+ 'io.stagewise/push-notifications': z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodNever>>;
92
+ }, z.core.$strip>, z.ZodRecord<z.ZodString, z.ZodUnknown>>;
93
+ }, z.core.$strip>>;
94
+ }, z.core.$strip>;
95
+ /** Empty acknowledgement for a subscription request. */
96
+ export declare const SubscriptionsListenResultSchema: z.ZodObject<{
97
+ _meta: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
98
+ }, z.core.$strip>;
99
+ /** Notification confirming accepted subscription filters. */
100
+ export declare const SubscriptionsAcknowledgedNotificationSchema: z.ZodObject<{
101
+ jsonrpc: z.ZodLiteral<"2.0">;
102
+ method: z.ZodLiteral<"notifications/subscriptions/acknowledged">;
103
+ params: z.ZodIntersection<z.ZodObject<{
104
+ _meta: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
105
+ }, z.core.$strip>, z.ZodObject<{
106
+ notifications: z.ZodIntersection<z.ZodObject<{
107
+ 'io.stagewise/push-notifications': z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodNever>>;
108
+ }, z.core.$strip>, z.ZodRecord<z.ZodString, z.ZodUnknown>>;
109
+ }, z.core.$strip>>;
110
+ }, z.core.$strip>;
111
+ /** JSON-RPC error data for a missing client capability. */
112
+ export declare const MissingRequiredClientCapabilityDataSchema: z.ZodObject<{
113
+ requiredCapabilities: z.ZodIntersection<z.ZodRecord<z.ZodString, z.ZodUnknown>, z.ZodObject<{
114
+ extensions: z.ZodOptional<z.ZodIntersection<z.ZodRecord<z.ZodString, z.ZodUnknown>, z.ZodObject<{
115
+ 'io.stagewise/push-notifications': z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodNever>>;
116
+ }, z.core.$strip>>>;
117
+ }, z.core.$strip>>;
118
+ }, z.core.$strip>;
119
+ /** A durable event produced by an MCP server. */
120
+ export declare const PushNotificationSchema: z.ZodObject<{
121
+ eventId: z.ZodString;
122
+ sourceId: z.ZodString;
123
+ type: z.ZodString;
124
+ createdAt: z.ZodISODateTime;
125
+ content: z.ZodArray<z.ZodUnion<readonly [z.ZodObject<{
126
+ type: z.ZodLiteral<"text">;
127
+ text: z.ZodString;
128
+ annotations: z.ZodOptional<z.ZodObject<{
129
+ audience: z.ZodOptional<z.ZodArray<z.ZodEnum<{
130
+ user: "user";
131
+ assistant: "assistant";
132
+ }>>>;
133
+ priority: z.ZodOptional<z.ZodNumber>;
134
+ lastModified: z.ZodOptional<z.ZodISODateTime>;
135
+ }, z.core.$strip>>;
136
+ _meta: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
137
+ }, z.core.$strip>, z.ZodObject<{
138
+ type: z.ZodLiteral<"image">;
139
+ data: z.ZodString;
140
+ mimeType: z.ZodString;
141
+ annotations: z.ZodOptional<z.ZodObject<{
142
+ audience: z.ZodOptional<z.ZodArray<z.ZodEnum<{
143
+ user: "user";
144
+ assistant: "assistant";
145
+ }>>>;
146
+ priority: z.ZodOptional<z.ZodNumber>;
147
+ lastModified: z.ZodOptional<z.ZodISODateTime>;
148
+ }, z.core.$strip>>;
149
+ _meta: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
150
+ }, z.core.$strip>, z.ZodObject<{
151
+ type: z.ZodLiteral<"audio">;
152
+ data: z.ZodString;
153
+ mimeType: z.ZodString;
154
+ annotations: z.ZodOptional<z.ZodObject<{
155
+ audience: z.ZodOptional<z.ZodArray<z.ZodEnum<{
156
+ user: "user";
157
+ assistant: "assistant";
158
+ }>>>;
159
+ priority: z.ZodOptional<z.ZodNumber>;
160
+ lastModified: z.ZodOptional<z.ZodISODateTime>;
161
+ }, z.core.$strip>>;
162
+ _meta: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
163
+ }, z.core.$strip>, z.ZodObject<{
164
+ uri: z.ZodString;
165
+ description: z.ZodOptional<z.ZodString>;
166
+ mimeType: z.ZodOptional<z.ZodString>;
167
+ size: z.ZodOptional<z.ZodNumber>;
168
+ annotations: z.ZodOptional<z.ZodObject<{
169
+ audience: z.ZodOptional<z.ZodArray<z.ZodEnum<{
170
+ user: "user";
171
+ assistant: "assistant";
172
+ }>>>;
173
+ priority: z.ZodOptional<z.ZodNumber>;
174
+ lastModified: z.ZodOptional<z.ZodISODateTime>;
175
+ }, z.core.$strip>>;
176
+ _meta: z.ZodOptional<z.ZodObject<{}, z.core.$loose>>;
177
+ icons: z.ZodOptional<z.ZodArray<z.ZodObject<{
178
+ src: z.ZodString;
179
+ mimeType: z.ZodOptional<z.ZodString>;
180
+ sizes: z.ZodOptional<z.ZodArray<z.ZodString>>;
181
+ theme: z.ZodOptional<z.ZodEnum<{
182
+ light: "light";
183
+ dark: "dark";
184
+ }>>;
185
+ }, z.core.$strip>>>;
186
+ name: z.ZodString;
187
+ title: z.ZodOptional<z.ZodString>;
188
+ type: z.ZodLiteral<"resource_link">;
189
+ }, z.core.$strip>, z.ZodObject<{
190
+ type: z.ZodLiteral<"resource">;
191
+ resource: z.ZodUnion<readonly [z.ZodObject<{
192
+ uri: z.ZodString;
193
+ mimeType: z.ZodOptional<z.ZodString>;
194
+ _meta: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
195
+ text: z.ZodString;
196
+ }, z.core.$strip>, z.ZodObject<{
197
+ uri: z.ZodString;
198
+ mimeType: z.ZodOptional<z.ZodString>;
199
+ _meta: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
200
+ blob: z.ZodString;
201
+ }, z.core.$strip>]>;
202
+ annotations: z.ZodOptional<z.ZodObject<{
203
+ audience: z.ZodOptional<z.ZodArray<z.ZodEnum<{
204
+ user: "user";
205
+ assistant: "assistant";
206
+ }>>>;
207
+ priority: z.ZodOptional<z.ZodNumber>;
208
+ lastModified: z.ZodOptional<z.ZodISODateTime>;
209
+ }, z.core.$strip>>;
210
+ _meta: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
211
+ }, z.core.$strip>]>>;
212
+ data: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodType<JSONValue, unknown, z.core.$ZodTypeInternals<JSONValue, unknown>>>>;
213
+ }, z.core.$strict>;
214
+ /** Result of retrieving pending events for the authenticated consumer. */
215
+ export declare const GetEventsResultSchema: z.ZodIntersection<z.ZodObject<{
216
+ _meta: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
217
+ }, z.core.$strip>, z.ZodObject<{
218
+ events: z.ZodArray<z.ZodObject<{
219
+ eventId: z.ZodString;
220
+ sourceId: z.ZodString;
221
+ type: z.ZodString;
222
+ createdAt: z.ZodISODateTime;
223
+ content: z.ZodArray<z.ZodUnion<readonly [z.ZodObject<{
224
+ type: z.ZodLiteral<"text">;
225
+ text: z.ZodString;
226
+ annotations: z.ZodOptional<z.ZodObject<{
227
+ audience: z.ZodOptional<z.ZodArray<z.ZodEnum<{
228
+ user: "user";
229
+ assistant: "assistant";
230
+ }>>>;
231
+ priority: z.ZodOptional<z.ZodNumber>;
232
+ lastModified: z.ZodOptional<z.ZodISODateTime>;
233
+ }, z.core.$strip>>;
234
+ _meta: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
235
+ }, z.core.$strip>, z.ZodObject<{
236
+ type: z.ZodLiteral<"image">;
237
+ data: z.ZodString;
238
+ mimeType: z.ZodString;
239
+ annotations: z.ZodOptional<z.ZodObject<{
240
+ audience: z.ZodOptional<z.ZodArray<z.ZodEnum<{
241
+ user: "user";
242
+ assistant: "assistant";
243
+ }>>>;
244
+ priority: z.ZodOptional<z.ZodNumber>;
245
+ lastModified: z.ZodOptional<z.ZodISODateTime>;
246
+ }, z.core.$strip>>;
247
+ _meta: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
248
+ }, z.core.$strip>, z.ZodObject<{
249
+ type: z.ZodLiteral<"audio">;
250
+ data: z.ZodString;
251
+ mimeType: z.ZodString;
252
+ annotations: z.ZodOptional<z.ZodObject<{
253
+ audience: z.ZodOptional<z.ZodArray<z.ZodEnum<{
254
+ user: "user";
255
+ assistant: "assistant";
256
+ }>>>;
257
+ priority: z.ZodOptional<z.ZodNumber>;
258
+ lastModified: z.ZodOptional<z.ZodISODateTime>;
259
+ }, z.core.$strip>>;
260
+ _meta: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
261
+ }, z.core.$strip>, z.ZodObject<{
262
+ uri: z.ZodString;
263
+ description: z.ZodOptional<z.ZodString>;
264
+ mimeType: z.ZodOptional<z.ZodString>;
265
+ size: z.ZodOptional<z.ZodNumber>;
266
+ annotations: z.ZodOptional<z.ZodObject<{
267
+ audience: z.ZodOptional<z.ZodArray<z.ZodEnum<{
268
+ user: "user";
269
+ assistant: "assistant";
270
+ }>>>;
271
+ priority: z.ZodOptional<z.ZodNumber>;
272
+ lastModified: z.ZodOptional<z.ZodISODateTime>;
273
+ }, z.core.$strip>>;
274
+ _meta: z.ZodOptional<z.ZodObject<{}, z.core.$loose>>;
275
+ icons: z.ZodOptional<z.ZodArray<z.ZodObject<{
276
+ src: z.ZodString;
277
+ mimeType: z.ZodOptional<z.ZodString>;
278
+ sizes: z.ZodOptional<z.ZodArray<z.ZodString>>;
279
+ theme: z.ZodOptional<z.ZodEnum<{
280
+ light: "light";
281
+ dark: "dark";
282
+ }>>;
283
+ }, z.core.$strip>>>;
284
+ name: z.ZodString;
285
+ title: z.ZodOptional<z.ZodString>;
286
+ type: z.ZodLiteral<"resource_link">;
287
+ }, z.core.$strip>, z.ZodObject<{
288
+ type: z.ZodLiteral<"resource">;
289
+ resource: z.ZodUnion<readonly [z.ZodObject<{
290
+ uri: z.ZodString;
291
+ mimeType: z.ZodOptional<z.ZodString>;
292
+ _meta: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
293
+ text: z.ZodString;
294
+ }, z.core.$strip>, z.ZodObject<{
295
+ uri: z.ZodString;
296
+ mimeType: z.ZodOptional<z.ZodString>;
297
+ _meta: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
298
+ blob: z.ZodString;
299
+ }, z.core.$strip>]>;
300
+ annotations: z.ZodOptional<z.ZodObject<{
301
+ audience: z.ZodOptional<z.ZodArray<z.ZodEnum<{
302
+ user: "user";
303
+ assistant: "assistant";
304
+ }>>>;
305
+ priority: z.ZodOptional<z.ZodNumber>;
306
+ lastModified: z.ZodOptional<z.ZodISODateTime>;
307
+ }, z.core.$strip>>;
308
+ _meta: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
309
+ }, z.core.$strip>]>>;
310
+ data: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodType<JSONValue, unknown, z.core.$ZodTypeInternals<JSONValue, unknown>>>>;
311
+ }, z.core.$strict>>;
312
+ hasMore: z.ZodBoolean;
313
+ }, z.core.$strip>>;
314
+ /** Parameters sent with a subscribed push notification. */
315
+ export declare const PushNotificationNotificationParamsSchema: z.ZodIntersection<z.ZodObject<{
316
+ _meta: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
317
+ }, z.core.$strip>, z.ZodObject<{
318
+ event: z.ZodObject<{
319
+ eventId: z.ZodString;
320
+ sourceId: z.ZodString;
321
+ type: z.ZodString;
322
+ createdAt: z.ZodISODateTime;
323
+ content: z.ZodArray<z.ZodUnion<readonly [z.ZodObject<{
324
+ type: z.ZodLiteral<"text">;
325
+ text: z.ZodString;
326
+ annotations: z.ZodOptional<z.ZodObject<{
327
+ audience: z.ZodOptional<z.ZodArray<z.ZodEnum<{
328
+ user: "user";
329
+ assistant: "assistant";
330
+ }>>>;
331
+ priority: z.ZodOptional<z.ZodNumber>;
332
+ lastModified: z.ZodOptional<z.ZodISODateTime>;
333
+ }, z.core.$strip>>;
334
+ _meta: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
335
+ }, z.core.$strip>, z.ZodObject<{
336
+ type: z.ZodLiteral<"image">;
337
+ data: z.ZodString;
338
+ mimeType: z.ZodString;
339
+ annotations: z.ZodOptional<z.ZodObject<{
340
+ audience: z.ZodOptional<z.ZodArray<z.ZodEnum<{
341
+ user: "user";
342
+ assistant: "assistant";
343
+ }>>>;
344
+ priority: z.ZodOptional<z.ZodNumber>;
345
+ lastModified: z.ZodOptional<z.ZodISODateTime>;
346
+ }, z.core.$strip>>;
347
+ _meta: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
348
+ }, z.core.$strip>, z.ZodObject<{
349
+ type: z.ZodLiteral<"audio">;
350
+ data: z.ZodString;
351
+ mimeType: z.ZodString;
352
+ annotations: z.ZodOptional<z.ZodObject<{
353
+ audience: z.ZodOptional<z.ZodArray<z.ZodEnum<{
354
+ user: "user";
355
+ assistant: "assistant";
356
+ }>>>;
357
+ priority: z.ZodOptional<z.ZodNumber>;
358
+ lastModified: z.ZodOptional<z.ZodISODateTime>;
359
+ }, z.core.$strip>>;
360
+ _meta: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
361
+ }, z.core.$strip>, z.ZodObject<{
362
+ uri: z.ZodString;
363
+ description: z.ZodOptional<z.ZodString>;
364
+ mimeType: z.ZodOptional<z.ZodString>;
365
+ size: z.ZodOptional<z.ZodNumber>;
366
+ annotations: z.ZodOptional<z.ZodObject<{
367
+ audience: z.ZodOptional<z.ZodArray<z.ZodEnum<{
368
+ user: "user";
369
+ assistant: "assistant";
370
+ }>>>;
371
+ priority: z.ZodOptional<z.ZodNumber>;
372
+ lastModified: z.ZodOptional<z.ZodISODateTime>;
373
+ }, z.core.$strip>>;
374
+ _meta: z.ZodOptional<z.ZodObject<{}, z.core.$loose>>;
375
+ icons: z.ZodOptional<z.ZodArray<z.ZodObject<{
376
+ src: z.ZodString;
377
+ mimeType: z.ZodOptional<z.ZodString>;
378
+ sizes: z.ZodOptional<z.ZodArray<z.ZodString>>;
379
+ theme: z.ZodOptional<z.ZodEnum<{
380
+ light: "light";
381
+ dark: "dark";
382
+ }>>;
383
+ }, z.core.$strip>>>;
384
+ name: z.ZodString;
385
+ title: z.ZodOptional<z.ZodString>;
386
+ type: z.ZodLiteral<"resource_link">;
387
+ }, z.core.$strip>, z.ZodObject<{
388
+ type: z.ZodLiteral<"resource">;
389
+ resource: z.ZodUnion<readonly [z.ZodObject<{
390
+ uri: z.ZodString;
391
+ mimeType: z.ZodOptional<z.ZodString>;
392
+ _meta: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
393
+ text: z.ZodString;
394
+ }, z.core.$strip>, z.ZodObject<{
395
+ uri: z.ZodString;
396
+ mimeType: z.ZodOptional<z.ZodString>;
397
+ _meta: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
398
+ blob: z.ZodString;
399
+ }, z.core.$strip>]>;
400
+ annotations: z.ZodOptional<z.ZodObject<{
401
+ audience: z.ZodOptional<z.ZodArray<z.ZodEnum<{
402
+ user: "user";
403
+ assistant: "assistant";
404
+ }>>>;
405
+ priority: z.ZodOptional<z.ZodNumber>;
406
+ lastModified: z.ZodOptional<z.ZodISODateTime>;
407
+ }, z.core.$strip>>;
408
+ _meta: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
409
+ }, z.core.$strip>]>>;
410
+ data: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodType<JSONValue, unknown, z.core.$ZodTypeInternals<JSONValue, unknown>>>>;
411
+ }, z.core.$strict>;
412
+ }, z.core.$strip>>;
413
+ /** Optional low-latency delivery of an event already available through retrieval. */
414
+ export declare const PushNotificationNotificationSchema: z.ZodObject<{
415
+ jsonrpc: z.ZodLiteral<"2.0">;
416
+ method: z.ZodLiteral<"io.stagewise/push-notifications/event">;
417
+ params: z.ZodIntersection<z.ZodObject<{
418
+ _meta: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
419
+ }, z.core.$strip>, z.ZodObject<{
420
+ event: z.ZodObject<{
421
+ eventId: z.ZodString;
422
+ sourceId: z.ZodString;
423
+ type: z.ZodString;
424
+ createdAt: z.ZodISODateTime;
425
+ content: z.ZodArray<z.ZodUnion<readonly [z.ZodObject<{
426
+ type: z.ZodLiteral<"text">;
427
+ text: z.ZodString;
428
+ annotations: z.ZodOptional<z.ZodObject<{
429
+ audience: z.ZodOptional<z.ZodArray<z.ZodEnum<{
430
+ user: "user";
431
+ assistant: "assistant";
432
+ }>>>;
433
+ priority: z.ZodOptional<z.ZodNumber>;
434
+ lastModified: z.ZodOptional<z.ZodISODateTime>;
435
+ }, z.core.$strip>>;
436
+ _meta: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
437
+ }, z.core.$strip>, z.ZodObject<{
438
+ type: z.ZodLiteral<"image">;
439
+ data: z.ZodString;
440
+ mimeType: z.ZodString;
441
+ annotations: z.ZodOptional<z.ZodObject<{
442
+ audience: z.ZodOptional<z.ZodArray<z.ZodEnum<{
443
+ user: "user";
444
+ assistant: "assistant";
445
+ }>>>;
446
+ priority: z.ZodOptional<z.ZodNumber>;
447
+ lastModified: z.ZodOptional<z.ZodISODateTime>;
448
+ }, z.core.$strip>>;
449
+ _meta: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
450
+ }, z.core.$strip>, z.ZodObject<{
451
+ type: z.ZodLiteral<"audio">;
452
+ data: z.ZodString;
453
+ mimeType: z.ZodString;
454
+ annotations: z.ZodOptional<z.ZodObject<{
455
+ audience: z.ZodOptional<z.ZodArray<z.ZodEnum<{
456
+ user: "user";
457
+ assistant: "assistant";
458
+ }>>>;
459
+ priority: z.ZodOptional<z.ZodNumber>;
460
+ lastModified: z.ZodOptional<z.ZodISODateTime>;
461
+ }, z.core.$strip>>;
462
+ _meta: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
463
+ }, z.core.$strip>, z.ZodObject<{
464
+ uri: z.ZodString;
465
+ description: z.ZodOptional<z.ZodString>;
466
+ mimeType: z.ZodOptional<z.ZodString>;
467
+ size: z.ZodOptional<z.ZodNumber>;
468
+ annotations: z.ZodOptional<z.ZodObject<{
469
+ audience: z.ZodOptional<z.ZodArray<z.ZodEnum<{
470
+ user: "user";
471
+ assistant: "assistant";
472
+ }>>>;
473
+ priority: z.ZodOptional<z.ZodNumber>;
474
+ lastModified: z.ZodOptional<z.ZodISODateTime>;
475
+ }, z.core.$strip>>;
476
+ _meta: z.ZodOptional<z.ZodObject<{}, z.core.$loose>>;
477
+ icons: z.ZodOptional<z.ZodArray<z.ZodObject<{
478
+ src: z.ZodString;
479
+ mimeType: z.ZodOptional<z.ZodString>;
480
+ sizes: z.ZodOptional<z.ZodArray<z.ZodString>>;
481
+ theme: z.ZodOptional<z.ZodEnum<{
482
+ light: "light";
483
+ dark: "dark";
484
+ }>>;
485
+ }, z.core.$strip>>>;
486
+ name: z.ZodString;
487
+ title: z.ZodOptional<z.ZodString>;
488
+ type: z.ZodLiteral<"resource_link">;
489
+ }, z.core.$strip>, z.ZodObject<{
490
+ type: z.ZodLiteral<"resource">;
491
+ resource: z.ZodUnion<readonly [z.ZodObject<{
492
+ uri: z.ZodString;
493
+ mimeType: z.ZodOptional<z.ZodString>;
494
+ _meta: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
495
+ text: z.ZodString;
496
+ }, z.core.$strip>, z.ZodObject<{
497
+ uri: z.ZodString;
498
+ mimeType: z.ZodOptional<z.ZodString>;
499
+ _meta: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
500
+ blob: z.ZodString;
501
+ }, z.core.$strip>]>;
502
+ annotations: z.ZodOptional<z.ZodObject<{
503
+ audience: z.ZodOptional<z.ZodArray<z.ZodEnum<{
504
+ user: "user";
505
+ assistant: "assistant";
506
+ }>>>;
507
+ priority: z.ZodOptional<z.ZodNumber>;
508
+ lastModified: z.ZodOptional<z.ZodISODateTime>;
509
+ }, z.core.$strip>>;
510
+ _meta: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
511
+ }, z.core.$strip>]>>;
512
+ data: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodType<JSONValue, unknown, z.core.$ZodTypeInternals<JSONValue, unknown>>>>;
513
+ }, z.core.$strict>;
514
+ }, z.core.$strip>>;
515
+ }, z.core.$strip>;
516
+ //# sourceMappingURL=schema.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"schema.d.ts","sourceRoot":"","sources":["../../src/generated/schema.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,CAAC,EAAE,MAAM,QAAQ,CAAC;AAI3B,OAAO,EAAE,KAAK,SAAS,EAAE,MAAM,kBAAkB,CAAC;AAuBlD,4DAA4D;AAC5D,eAAO,MAAM,mBAAmB,8EAA4D,CAAC;AAE7F,4DAA4D;AAC5D,eAAO,MAAM,eAAe,EAAE,CAAC,CAAC,SAAS,CAAC,SAAS,CAAiH,CAAC;AAErK,wDAAwD;AACxD,eAAO,MAAM,qBAAqB;;kBAG/B,CAAC;AAEJ,iFAAiF;AACjF,eAAO,MAAM,sBAAsB;;;;;;;iBAGjC,CAAC;AAEH,iEAAiE;AACjE,eAAO,MAAM,6BAA6B;;kBAGvC,CAAC;AAEJ,oEAAoE;AACpE,eAAO,MAAM,8BAA8B;;;;;;;iBAGzC,CAAC;AAEH,gDAAgD;AAChD,eAAO,MAAM,6BAA6B;;iBAAe,CAAC;AAE1D,yEAAyE;AACzE,eAAO,MAAM,mCAAmC,sCAAkC,CAAC;AAEnF,0EAA0E;AAC1E,eAAO,MAAM,gDAAgD;;iBAE3D,CAAC;AAEH,sFAAsF;AACtF,eAAO,MAAM,4DAA4D;;iBAEvE,CAAC;AAEH,oEAAoE;AACpE,eAAO,MAAM,0CAA0C,sCAAkC,CAAC;AAE1F,+CAA+C;AAC/C,eAAO,MAAM,2BAA2B;;kBAErC,CAAC;AAEJ,6EAA6E;AAC7E,eAAO,MAAM,mCAAmC;;;;kBAE7C,CAAC;AAEJ,yDAAyD;AACzD,eAAO,MAAM,6CAA6C;;;;;;kBAEvD,CAAC;AAEJ,2CAA2C;AAC3C,eAAO,MAAM,2BAA2B;;;;;iBAGtC,CAAC;AAEH,0CAA0C;AAC1C,eAAO,MAAM,0BAA0B;;;;;;;;kBAEpC,CAAC;AAEJ,oDAAoD;AACpD,eAAO,MAAM,gCAAgC;;;;;;;;;iBAK3C,CAAC;AAEH,wDAAwD;AACxD,eAAO,MAAM,+BAA+B;;iBAAe,CAAC;AAE5D,6DAA6D;AAC7D,eAAO,MAAM,2CAA2C;;;;;;;;;;iBAKtD,CAAC;AAEH,2DAA2D;AAC3D,eAAO,MAAM,yCAAyC;;;;;;iBAEpD,CAAC;AAGH,iDAAiD;AACjD,eAAO,MAAM,sBAAsB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;kBAaxB,CAAC;AAEZ,0EAA0E;AAC1E,eAAO,MAAM,qBAAqB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;kBAK/B,CAAC;AAEJ,2DAA2D;AAC3D,eAAO,MAAM,wCAAwC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;kBAGlD,CAAC;AAEJ,qFAAqF;AACrF,eAAO,MAAM,kCAAkC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;iBAG7C,CAAC"}
@@ -0,0 +1,133 @@
1
+ // Generated by ts-to-zod
2
+ // Run `pnpm generate:schemas` to regenerate.
3
+ import { z } from 'zod/v4';
4
+ import { ContentBlockSchema, } from '@modelcontextprotocol/core';
5
+ const JSONRPCRequestSchema = z.object({
6
+ jsonrpc: z.literal('2.0'),
7
+ id: z.union([z.string(), z.number()]),
8
+ method: z.string(),
9
+ params: z.unknown().optional()
10
+ });
11
+ const JSONRPCNotificationSchema = z.object({
12
+ jsonrpc: z.literal('2.0'),
13
+ method: z.string(),
14
+ params: z.unknown().optional()
15
+ });
16
+ const ResultSchema = z.object({
17
+ _meta: z.record(z.string(), z.unknown()).optional()
18
+ });
19
+ const NotificationParamsSchema = z.object({
20
+ _meta: z.record(z.string(), z.unknown()).optional()
21
+ });
22
+ /** JSON data accepted in event-specific structured data. */
23
+ export const JSONPrimitiveSchema = z.union([z.string(), z.number(), z.boolean()]).nullable();
24
+ /** JSON data accepted in event-specific structured data. */
25
+ export const JSONValueSchema = z.lazy(() => z.union([JSONPrimitiveSchema, z.array(JSONValueSchema), z.record(z.string(), JSONValueSchema)]));
26
+ /** Parameters for retrieving pending durable events. */
27
+ export const GetEventsParamsSchema = z.record(z.string(), z.unknown()).and(z.object({
28
+ /** Requested maximum page size. Must be a positive integer. */
29
+ limit: z.number().int().positive().optional()
30
+ }));
31
+ /** Retrieves a bounded page of events pending for the authenticated consumer. */
32
+ export const GetEventsRequestSchema = JSONRPCRequestSchema.extend({
33
+ method: z.literal('io.stagewise/push-notifications/get'),
34
+ params: GetEventsParamsSchema
35
+ });
36
+ /** Parameters for acknowledging durable acceptance of events. */
37
+ export const AcknowledgeEventsParamsSchema = z.record(z.string(), z.unknown()).and(z.object({
38
+ /** Event identifiers already committed to durable client storage. */
39
+ eventIds: z.array(z.string().min(1)).min(1)
40
+ }));
41
+ /** Acknowledges durable client acceptance of one or more events. */
42
+ export const AcknowledgeEventsRequestSchema = JSONRPCRequestSchema.extend({
43
+ method: z.literal('io.stagewise/push-notifications/ack'),
44
+ params: AcknowledgeEventsParamsSchema
45
+ });
46
+ /** Empty, idempotent acknowledgement result. */
47
+ export const AcknowledgeEventsResultSchema = ResultSchema;
48
+ /** Empty Push Notifications subscriptions/listen notification filter. */
49
+ export const PushNotificationsSubscriptionSchema = z.record(z.string(), z.never());
50
+ /** Extension-owned fields added to subscriptions/listen notifications. */
51
+ export const PushNotificationsSubscriptionNotificationsSchema = z.object({
52
+ 'io.stagewise/push-notifications': PushNotificationsSubscriptionSchema.optional()
53
+ });
54
+ /** Push Notifications fields returned in notifications/subscriptions/acknowledged. */
55
+ export const PushNotificationsSubscriptionAcknowledgedNotificationsSchema = z.object({
56
+ 'io.stagewise/push-notifications': PushNotificationsSubscriptionSchema.optional()
57
+ });
58
+ /** Empty capability object indicating support for the extension. */
59
+ export const PushNotificationsExtensionCapabilitySchema = z.record(z.string(), z.never());
60
+ /** Extensible MCP extension capability map. */
61
+ export const ExtensionCapabilitiesSchema = z.record(z.string(), z.unknown()).and(z.object({
62
+ 'io.stagewise/push-notifications': PushNotificationsExtensionCapabilitySchema.optional()
63
+ }));
64
+ /** Capability container used by discovery and initialization negotiation. */
65
+ export const PushNotificationsCapabilitiesSchema = z.record(z.string(), z.unknown()).and(z.object({
66
+ extensions: ExtensionCapabilitiesSchema.optional()
67
+ }));
68
+ /** Future MCP per-request client capability metadata. */
69
+ export const PushNotificationsClientCapabilitiesMetaSchema = z.record(z.string(), z.unknown()).and(z.object({
70
+ 'io.modelcontextprotocol/clientCapabilities': PushNotificationsCapabilitiesSchema.optional()
71
+ }));
72
+ /** Future MCP server discovery request. */
73
+ export const ServerDiscoverRequestSchema = JSONRPCRequestSchema.extend({
74
+ method: z.literal('server/discover'),
75
+ params: z.record(z.string(), z.unknown())
76
+ });
77
+ /** Future MCP server discovery result. */
78
+ export const ServerDiscoverResultSchema = ResultSchema.and(z.object({
79
+ capabilities: PushNotificationsCapabilitiesSchema
80
+ }));
81
+ /** Future MCP notification subscription request. */
82
+ export const SubscriptionsListenRequestSchema = JSONRPCRequestSchema.extend({
83
+ method: z.literal('subscriptions/listen'),
84
+ params: z.record(z.string(), z.unknown()).and(z.object({
85
+ notifications: PushNotificationsSubscriptionNotificationsSchema.and(z.record(z.string(), z.unknown()))
86
+ }))
87
+ });
88
+ /** Empty acknowledgement for a subscription request. */
89
+ export const SubscriptionsListenResultSchema = ResultSchema;
90
+ /** Notification confirming accepted subscription filters. */
91
+ export const SubscriptionsAcknowledgedNotificationSchema = JSONRPCNotificationSchema.extend({
92
+ method: z.literal('notifications/subscriptions/acknowledged'),
93
+ params: NotificationParamsSchema.and(z.object({
94
+ notifications: PushNotificationsSubscriptionAcknowledgedNotificationsSchema.and(z.record(z.string(), z.unknown()))
95
+ }))
96
+ });
97
+ /** JSON-RPC error data for a missing client capability. */
98
+ export const MissingRequiredClientCapabilityDataSchema = z.object({
99
+ requiredCapabilities: PushNotificationsCapabilitiesSchema
100
+ });
101
+ /** A durable event produced by an MCP server. */
102
+ export const PushNotificationSchema = z.object({
103
+ /** Stable, globally unique identifier and deduplication key. */
104
+ eventId: z.string(),
105
+ /** Stable identifier for the environment or channel that produced the event. */
106
+ sourceId: z.string(),
107
+ /** Open event type whose data contract is owned by the producer. */
108
+ type: z.string(),
109
+ /** ISO 8601 date-time at which the source created the event. */
110
+ createdAt: z.iso.datetime(),
111
+ /** Ordered MCP content blocks carrying the event's interoperable content. */
112
+ content: z.array(ContentBlockSchema),
113
+ /** Optional structured JSON data defined by the event type. */
114
+ data: z.record(z.string(), JSONValueSchema).optional()
115
+ }).strict();
116
+ /** Result of retrieving pending events for the authenticated consumer. */
117
+ export const GetEventsResultSchema = ResultSchema.and(z.object({
118
+ /** Complete pending events in deterministic server order. */
119
+ events: z.array(PushNotificationSchema),
120
+ /** Whether additional pending events were available when this page was read. */
121
+ hasMore: z.boolean()
122
+ }));
123
+ /** Parameters sent with a subscribed push notification. */
124
+ export const PushNotificationNotificationParamsSchema = NotificationParamsSchema.and(z.object({
125
+ /** Complete durable event already pending for the authenticated consumer. */
126
+ event: PushNotificationSchema
127
+ }));
128
+ /** Optional low-latency delivery of an event already available through retrieval. */
129
+ export const PushNotificationNotificationSchema = JSONRPCNotificationSchema.extend({
130
+ method: z.literal('io.stagewise/push-notifications/event'),
131
+ params: PushNotificationNotificationParamsSchema
132
+ });
133
+ //# sourceMappingURL=schema.js.map