@stagewise/mcp-extension-push-notifications 0.1.0 → 0.2.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.
package/LICENSE ADDED
@@ -0,0 +1,201 @@
1
+ Apache License
2
+ Version 2.0, January 2004
3
+ http://www.apache.org/licenses/
4
+
5
+ TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
6
+
7
+ 1. Definitions.
8
+
9
+ "License" shall mean the terms and conditions for use, reproduction,
10
+ and distribution as defined by Sections 1 through 9 of this document.
11
+
12
+ "Licensor" shall mean the copyright owner or entity authorized by
13
+ the copyright owner that is granting the License.
14
+
15
+ "Legal Entity" shall mean the union of the acting entity and all
16
+ other entities that control, are controlled by, or are under common
17
+ control with that entity. For the purposes of this definition,
18
+ "control" means (i) the power, direct or indirect, to cause the
19
+ direction or management of such entity, whether by contract or
20
+ otherwise, or (ii) ownership of fifty percent (50%) or more of the
21
+ outstanding shares, or (iii) beneficial ownership of such entity.
22
+
23
+ "You" (or "Your") shall mean an individual or Legal Entity
24
+ exercising permissions granted by this License.
25
+
26
+ "Source" form shall mean the preferred form for making modifications,
27
+ including but not limited to software source code, documentation
28
+ source, and configuration files.
29
+
30
+ "Object" form shall mean any form resulting from mechanical
31
+ transformation or translation of a Source form, including but
32
+ not limited to compiled object code, generated documentation,
33
+ and conversions to other media types.
34
+
35
+ "Work" shall mean the work of authorship, whether in Source or
36
+ Object form, made available under the License, as indicated by a
37
+ copyright notice that is included in or attached to the work
38
+ (an example is provided in the Appendix below).
39
+
40
+ "Derivative Works" shall mean any work, whether in Source or Object
41
+ form, that is based on (or derived from) the Work and for which the
42
+ editorial revisions, annotations, elaborations, or other modifications
43
+ represent, as a whole, an original work of authorship. For the purposes
44
+ of this License, Derivative Works shall not include works that remain
45
+ separable from, or merely link (or bind by name) to the interfaces of,
46
+ the Work and Derivative Works thereof.
47
+
48
+ "Contribution" shall mean any work of authorship, including
49
+ the original version of the Work and any modifications or additions
50
+ to that Work or Derivative Works thereof, that is intentionally
51
+ submitted to Licensor for inclusion in the Work by the copyright owner
52
+ or by an individual or Legal Entity authorized to submit on behalf of
53
+ the copyright owner. For the purposes of this definition, "submitted"
54
+ means any form of electronic, verbal, or written communication sent
55
+ to the Licensor or its representatives, including but not limited to
56
+ communication on electronic mailing lists, source code control systems,
57
+ and issue tracking systems that are managed by, or on behalf of, the
58
+ Licensor for the purpose of discussing and improving the Work, but
59
+ excluding communication that is conspicuously marked or otherwise
60
+ designated in writing by the copyright owner as "Not a Contribution."
61
+
62
+ "Contributor" shall mean Licensor and any individual or Legal Entity
63
+ on behalf of whom a Contribution has been received by Licensor and
64
+ subsequently incorporated within the Work.
65
+
66
+ 2. Grant of Copyright License. Subject to the terms and conditions of
67
+ this License, each Contributor hereby grants to You a perpetual,
68
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
69
+ copyright license to reproduce, prepare Derivative Works of,
70
+ publicly display, publicly perform, sublicense, and distribute the
71
+ Work and such Derivative Works in Source or Object form.
72
+
73
+ 3. Grant of Patent License. Subject to the terms and conditions of
74
+ this License, each Contributor hereby grants to You a perpetual,
75
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
76
+ (except as stated in this section) patent license to make, have made,
77
+ use, offer to sell, sell, import, and otherwise transfer the Work,
78
+ where such license applies only to those patent claims licensable
79
+ by such Contributor that are necessarily infringed by their
80
+ Contribution(s) alone or by combination of their Contribution(s)
81
+ with the Work to which such Contribution(s) was submitted. If You
82
+ institute patent litigation against any entity (including a
83
+ cross-claim or counterclaim in a lawsuit) alleging that the Work
84
+ or a Contribution incorporated within the Work constitutes direct
85
+ or contributory patent infringement, then any patent licenses
86
+ granted to You under this License for that Work shall terminate
87
+ as of the date such litigation is filed.
88
+
89
+ 4. Redistribution. You may reproduce and distribute copies of the
90
+ Work or Derivative Works thereof in any medium, with or without
91
+ modifications, and in Source or Object form, provided that You
92
+ meet the following conditions:
93
+
94
+ (a) You must give any other recipients of the Work or
95
+ Derivative Works a copy of this License; and
96
+
97
+ (b) You must cause any modified files to carry prominent notices
98
+ stating that You changed the files; and
99
+
100
+ (c) You must retain, in the Source form of any Derivative Works
101
+ that You distribute, all copyright, patent, trademark, and
102
+ attribution notices from the Source form of the Work,
103
+ excluding those notices that do not pertain to any part of
104
+ the Derivative Works; and
105
+
106
+ (d) If the Work includes a "NOTICE" text file as part of its
107
+ distribution, then any Derivative Works that You distribute must
108
+ include a readable copy of the attribution notices contained
109
+ within such NOTICE file, excluding those notices that do not
110
+ pertain to any part of the Derivative Works, in at least one
111
+ of the following places: within a NOTICE text file distributed
112
+ as part of the Derivative Works; within the Source form or
113
+ documentation, if provided along with the Derivative Works; or,
114
+ within a display generated by the Derivative Works, if and
115
+ wherever such third-party notices normally appear. The contents
116
+ of the NOTICE file are for informational purposes only and
117
+ do not modify the License. You may add Your own attribution
118
+ notices within Derivative Works that You distribute, alongside
119
+ or as an addendum to the NOTICE text from the Work, provided
120
+ that such additional attribution notices cannot be construed
121
+ as modifying the License.
122
+
123
+ You may add Your own copyright statement to Your modifications and
124
+ may provide additional or different license terms and conditions
125
+ for use, reproduction, or distribution of Your modifications, or
126
+ for any such Derivative Works as a whole, provided Your use,
127
+ reproduction, and distribution of the Work otherwise complies with
128
+ the conditions stated in this License.
129
+
130
+ 5. Submission of Contributions. Unless You explicitly state otherwise,
131
+ any Contribution intentionally submitted for inclusion in the Work
132
+ by You to the Licensor shall be under the terms and conditions of
133
+ this License, without any additional terms or conditions.
134
+ Notwithstanding the above, nothing herein shall supersede or modify
135
+ the terms of any separate license agreement you may have executed
136
+ with Licensor regarding such Contributions.
137
+
138
+ 6. Trademarks. This License does not grant permission to use the trade
139
+ names, trademarks, service marks, or product names of the Licensor,
140
+ except as required for reasonable and customary use in describing the
141
+ origin of the Work and reproducing the content of the NOTICE file.
142
+
143
+ 7. Disclaimer of Warranty. Unless required by applicable law or
144
+ agreed to in writing, Licensor provides the Work (and each
145
+ Contributor provides its Contributions) on an "AS IS" BASIS,
146
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
147
+ implied, including, without limitation, any warranties or conditions
148
+ of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
149
+ PARTICULAR PURPOSE. You are solely responsible for determining the
150
+ appropriateness of using or redistributing the Work and assume any
151
+ risks associated with Your exercise of permissions under this License.
152
+
153
+ 8. Limitation of Liability. In no event and under no legal theory,
154
+ whether in tort (including negligence), contract, or otherwise,
155
+ unless required by applicable law (such as deliberate and grossly
156
+ negligent acts) or agreed to in writing, shall any Contributor be
157
+ liable to You for damages, including any direct, indirect, special,
158
+ incidental, or consequential damages of any character arising as a
159
+ result of this License or out of the use or inability to use the
160
+ Work (including but not limited to damages for loss of goodwill,
161
+ work stoppage, computer failure or malfunction, or any and all
162
+ other commercial damages or losses), even if such Contributor
163
+ has been advised of the possibility of such damages.
164
+
165
+ 9. Accepting Warranty or Additional Liability. While redistributing
166
+ the Work or Derivative Works thereof, You may choose to offer,
167
+ and charge a fee for, acceptance of support, warranty, indemnity,
168
+ or other liability obligations and/or rights consistent with this
169
+ License. However, in accepting such obligations, You may act only
170
+ on Your own behalf and on Your sole responsibility, not on behalf
171
+ of any other Contributor, and only if You agree to indemnify,
172
+ defend, and hold each Contributor harmless for any liability
173
+ incurred by, or claims asserted against, such Contributor by reason
174
+ of your accepting any such warranty or additional liability.
175
+
176
+ END OF TERMS AND CONDITIONS
177
+
178
+ APPENDIX: How to apply the Apache License to your work.
179
+
180
+ To apply the Apache License to your work, attach the following
181
+ boilerplate notice, with the fields enclosed by brackets "[]"
182
+ replaced with your own identifying information. (Don't include
183
+ the brackets!) The text should be enclosed in the appropriate
184
+ comment syntax for the file format. We also recommend that a
185
+ file or class name and description of purpose be included on the
186
+ same "printed page" as the copyright notice for easier
187
+ identification within third-party archives.
188
+
189
+ Copyright [yyyy] [name of copyright owner]
190
+
191
+ Licensed under the Apache License, Version 2.0 (the "License");
192
+ you may not use this file except in compliance with the License.
193
+ You may obtain a copy of the License at
194
+
195
+ http://www.apache.org/licenses/LICENSE-2.0
196
+
197
+ Unless required by applicable law or agreed to in writing, software
198
+ distributed under the License is distributed on an "AS IS" BASIS,
199
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
200
+ See the License for the specific language governing permissions and
201
+ limitations under the License.
package/README.md CHANGED
@@ -85,7 +85,7 @@ await store.append(consumerKey, event);
85
85
  await events.sendEvent({ event }, { metadata: requestMeta });
86
86
  ```
87
87
 
88
- Acknowledgement is idempotent. Acknowledged IDs disappear immediately from pending retrieval. Retention of payloads and acknowledgement tombstones is server policy.
88
+ Acknowledgement is idempotent. Acknowledged IDs disappear immediately from pending retrieval. Retention of payloads and acknowledgement tombstones is server policy. Applications that expose several MCP extensions can pass `registerDiscoveryHandler: false` and register one composed `server/discover` handler.
89
89
 
90
90
  ## HTTP subscriptions
91
91
 
@@ -1 +1 @@
1
- {"version":3,"file":"register-push-notifications-client.d.ts","sourceRoot":"","sources":["../../src/client/register-push-notifications-client.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,MAAM,EAAE,cAAc,EAAE,MAAM,8BAA8B,CAAC;AAuB3E,OAAO,KAAK,EACV,uBAAuB,EACvB,eAAe,EACf,eAAe,EACf,4BAA4B,EAE5B,6BAA6B,EAC7B,oBAAoB,EACrB,MAAM,kBAAkB,CAAC;AAE1B,MAAM,MAAM,+BAA+B,GAAG,IAAI,CAChD,MAAM,EACJ,gBAAgB,GAChB,uBAAuB,GACvB,sBAAsB,GACtB,SAAS,GACT,wBAAwB,CAC3B,GAAG;IACF,0BAA0B,CAAC,CAAC,MAAM,EAAE,MAAM,GAAG,IAAI,CAAC;CACnD,CAAC;AAEF,MAAM,WAAW,sCAAsC;IACrD,OAAO,CAAC,CAAC,YAAY,EAAE,4BAA4B,GAAG,IAAI,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC;CAC5E;AAED,MAAM,WAAW,+BAA+B;IAC9C,QAAQ,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;IACnC,OAAO,CAAC,EAAE,cAAc,CAAC;CAC1B;AAED,MAAM,WAAW,mCAAmC;IAClD,QAAQ,CAAC,MAAM,EAAE,OAAO,CAAC,IAAI,CAAC,CAAC;CAChC;AAED,MAAM,WAAW,iCAAiC;IAChD,QAAQ,CACN,OAAO,CAAC,EAAE,+BAA+B,GACxC,OAAO,CAAC,oBAAoB,CAAC,CAAC;IACjC,SAAS,CACP,MAAM,CAAC,EAAE,eAAe,EACxB,OAAO,CAAC,EAAE,+BAA+B,GACxC,OAAO,CAAC,eAAe,CAAC,CAAC;IAC5B,iBAAiB,CACf,MAAM,EAAE,uBAAuB,EAC/B,OAAO,CAAC,EAAE,+BAA+B,GACxC,OAAO,CAAC,IAAI,CAAC,CAAC;IACjB,MAAM,CACJ,YAAY,CAAC,EAAE,6BAA6B,EAC5C,OAAO,CAAC,EAAE,+BAA+B,GACxC,OAAO,CAAC,mCAAmC,CAAC,CAAC;IAChD,+BAA+B,CAC7B,OAAO,CAAC,EAAE,+BAA+B,GACxC,OAAO,CAAC,OAAO,CAAC,CAAC;IACpB,wBAAwB,IAAI,6BAA6B,GAAG,SAAS,CAAC;CACvE;AAYD,wBAAgB,+BAA+B,CAC7C,MAAM,EAAE,+BAA+B,EACvC,OAAO,GAAE,sCAA2C,GACnD,iCAAiC,CAoJnC"}
1
+ {"version":3,"file":"register-push-notifications-client.d.ts","sourceRoot":"","sources":["../../src/client/register-push-notifications-client.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,MAAM,EAAE,cAAc,EAAE,MAAM,8BAA8B,CAAC;AAwB3E,OAAO,KAAK,EACV,uBAAuB,EACvB,eAAe,EACf,eAAe,EACf,4BAA4B,EAE5B,6BAA6B,EAC7B,oBAAoB,EACrB,MAAM,kBAAkB,CAAC;AAE1B,MAAM,MAAM,+BAA+B,GAAG,IAAI,CAChD,MAAM,EACJ,gBAAgB,GAChB,u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/mcp-extension-client';
1
2
  import { resolveServerPushNotificationsSupport, withPushNotificationsCapability, withPushNotificationsClientCapability, } from '../capabilities.js';
2
- import { PUSH_NOTIFICATIONS_ACK_METHOD, PUSH_NOTIFICATIONS_GET_METHOD, PUSH_NOTIFICATIONS_NOTIFICATION_METHOD, SERVER_DISCOVER_METHOD, SUBSCRIPTIONS_ACKNOWLEDGED_METHOD, SUBSCRIPTIONS_LISTEN_METHOD, } from '../constants.js';
3
+ import { PUSH_NOTIFICATIONS_ACK_METHOD, PUSH_NOTIFICATIONS_GET_METHOD, PUSH_NOTIFICATIONS_NOTIFICATION_METHOD, SERVER_DISCOVER_METHOD, SUBSCRIPTIONS_LISTEN_METHOD, } from '../constants.js';
3
4
  import { AcknowledgeEventsResultSchema, GetEventsResultSchema, PushNotificationNotificationParamsSchema, ServerDiscoverResultSchema, SubscriptionsAcknowledgedNotificationSchema, SubscriptionsListenResultSchema, } from '../generated/schema.js';
4
5
  function paramsWithCapability(params, metadata) {
5
6
  return {
@@ -62,9 +63,13 @@ export function registerPushNotificationsClient(client, options = {}) {
62
63
  params,
63
64
  });
64
65
  });
65
- client.setNotificationHandler(SUBSCRIPTIONS_ACKNOWLEDGED_METHOD, { params: SubscriptionsAcknowledgedNotificationSchema.shape.params }, (params) => {
66
+ registerSubscriptionAcknowledgementHandler(client, 'io.stagewise/push-notifications', (params) => {
67
+ const subscription = SubscriptionsAcknowledgedNotificationSchema.shape.params.parse(params)
68
+ .notifications['io.stagewise/push-notifications'];
69
+ if (!subscription)
70
+ return;
66
71
  markServerSupport();
67
- acknowledged = params.notifications['io.stagewise/push-notifications'];
72
+ acknowledged = subscription;
68
73
  resolveAcknowledgement?.();
69
74
  resolveAcknowledgement = undefined;
70
75
  });
@@ -1 +1 @@
1
- {"version":3,"file":"register-push-notifications-client.js","sourceRoot":"","sources":["../../src/client/register-push-notifications-client.ts"],"names":[],"mappings":"AAEA,OAAO,EACL,qCAAqC,EACrC,+BAA+B,EAC/B,qCAAqC,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BACF,EACD,cAAc,EAAE,QAAQ,CACzB;aACF,EACD,+BAA+B,EAC/B;gBACE,GAAG,cAAc,EAAE,OAAO;gBAC1B,UAAU,EAAE,cAAc,EAAE,OAAO,EAAE,UAAU,IAAI,CAAC,GAAG,EAAE,CAAC,SAAS,CAAC;gBACpE,sBAAsB,EAAE,IAAI;aAC7B,CACF,CAAC;YACF,MAAM,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC,GAAG,EAAE,CAAC,SAAS,CAAC,CAAC;YAC7C,KAAK,MAAM,CAAC,KAAK,CAAC,GAAG,EAAE,CAAC,SAAS,CAAC,CAAC;YACnC,MAAM,OAAO,CAAC,IAAI,CAAC,CAAC,eAAe,EAAE,MAAM,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC,KAAK,EAAE,EAAE;gBAC5D,sBAAsB,GAAG,SAAS,CAAC;gBACnC,MAAM,KAAK,CAAC;YACd,CAAC,CAAC,CAAC;YACH,OAAO,EAAE,MAAM,EAAE,CAAC;QACpB,CAAC;QACD,+BAA+B;QAC/B,wBAAwB,EAAE,GAAG,EAAE,CAAC,YAAY;KAC7C,CAAC;AACJ,CAAC"}
1
+ {"version":3,"file":"register-push-notifications-client.js","sourceRoot":"","sources":["../../src/client/register-push-notifications-client.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,0CAA0C,EAAE,MAAM,iCAAiC,CAAC;AAE7F,OAAO,EACL,qCAAqC,EACrC,+BAA+B,EAC/B,qCAAqC,GACtC,MAAM,oBAAoB,CAAC;AAC5B,OAAO,EACL,6BAA6B,EAC7B,6BAA6B,EAC7B,sCAAsC,EACtC,sBAAsB,EACtB,2BAA2B,GAC5B,MAAM,iBAAiB,CAAC;AACzB,OAAO,EACL,6BAA6B,EAC7B,qBAAqB,EACrB,wCAAwC,EACxC,0BAA0B,EAC1B,2CAA2C,EAC3C,+BAA+B,GAChC,MAAM,wBAAwB,CAAC;AAyDhC,SAAS,oBAAoB,CAC3B,MAAS,EACT,QAAkC;IAElC,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AAC,GAAG,EAAE,CAAC,SAAS,CAAC,CAAC;YAC7C,KAAK,MAAM,CAAC,KAAK,CAAC,GAAG,EAAE,CAAC,SAAS,CAAC,CAAC;YACnC,MAAM,OAAO,CAAC,IAAI,CAAC,CAAC,eAAe,EAAE,MAAM,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC,KAAK,EAAE,EAAE;gBAC5D,sBAAsB,GAAG,SAAS,CAAC;gBACnC,MAAM,KAAK,CAAC;YACd,CAAC,CAAC,CAAC;YACH,OAAO,EAAE,MAAM,EAAE,CAAC;QACpB,CAAC;QACD,+BAA+B;QAC/B,wBAAwB,EAAE,GAAG,EAAE,CAAC,YAAY;KAC7C,CAAC;AACJ,CAAC"}
@@ -1,5 +1,5 @@
1
1
  import { z } from 'zod/v4';
2
- import { type JSONValue } from '../spec.types.js';
2
+ import type { JSONValue } from '../spec.types.js';
3
3
  /** JSON data accepted in event-specific structured data. */
4
4
  export declare const JSONPrimitiveSchema: z.ZodNullable<z.ZodUnion<readonly [z.ZodString, z.ZodNumber, z.ZodBoolean]>>;
5
5
  /** JSON data accepted in event-specific structured data. */
@@ -210,6 +210,9 @@ export declare const PushNotificationSchema: z.ZodObject<{
210
210
  _meta: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
211
211
  }, z.core.$strip>]>>;
212
212
  data: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodType<JSONValue, unknown, z.core.$ZodTypeInternals<JSONValue, unknown>>>>;
213
+ resourceLink: z.ZodOptional<z.ZodObject<{
214
+ uri: z.ZodString;
215
+ }, z.core.$strip>>;
213
216
  }, z.core.$strict>;
214
217
  /** Result of retrieving pending events for the authenticated consumer. */
215
218
  export declare const GetEventsResultSchema: z.ZodIntersection<z.ZodObject<{
@@ -308,6 +311,9 @@ export declare const GetEventsResultSchema: z.ZodIntersection<z.ZodObject<{
308
311
  _meta: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
309
312
  }, z.core.$strip>]>>;
310
313
  data: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodType<JSONValue, unknown, z.core.$ZodTypeInternals<JSONValue, unknown>>>>;
314
+ resourceLink: z.ZodOptional<z.ZodObject<{
315
+ uri: z.ZodString;
316
+ }, z.core.$strip>>;
311
317
  }, z.core.$strict>>;
312
318
  hasMore: z.ZodBoolean;
313
319
  }, z.core.$strip>>;
@@ -408,6 +414,9 @@ export declare const PushNotificationNotificationParamsSchema: z.ZodIntersection
408
414
  _meta: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
409
415
  }, z.core.$strip>]>>;
410
416
  data: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodType<JSONValue, unknown, z.core.$ZodTypeInternals<JSONValue, unknown>>>>;
417
+ resourceLink: z.ZodOptional<z.ZodObject<{
418
+ uri: z.ZodString;
419
+ }, z.core.$strip>>;
411
420
  }, z.core.$strict>;
412
421
  }, z.core.$strip>>;
413
422
  /** Optional low-latency delivery of an event already available through retrieval. */
@@ -510,6 +519,9 @@ export declare const PushNotificationNotificationSchema: z.ZodObject<{
510
519
  _meta: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
511
520
  }, z.core.$strip>]>>;
512
521
  data: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodType<JSONValue, unknown, z.core.$ZodTypeInternals<JSONValue, unknown>>>>;
522
+ resourceLink: z.ZodOptional<z.ZodObject<{
523
+ uri: z.ZodString;
524
+ }, z.core.$strip>>;
513
525
  }, z.core.$strict>;
514
526
  }, z.core.$strip>>;
515
527
  }, z.core.$strip>;
@@ -1 +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,8EAA4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;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;kBAMlD,CAAC;AAEJ,qFAAqF;AACrF,eAAO,MAAM,kCAAkC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;iBAI3C,CAAC"}
@@ -1,47 +1,55 @@
1
1
  // Generated by ts-to-zod
2
2
  // Run `pnpm generate:schemas` to regenerate.
3
+ import { ContentBlockSchema } from '@modelcontextprotocol/core';
3
4
  import { z } from 'zod/v4';
4
- import { ContentBlockSchema, } from '@modelcontextprotocol/core';
5
5
  const JSONRPCRequestSchema = z.object({
6
6
  jsonrpc: z.literal('2.0'),
7
7
  id: z.union([z.string(), z.number()]),
8
8
  method: z.string(),
9
- params: z.unknown().optional()
9
+ params: z.unknown().optional(),
10
10
  });
11
11
  const JSONRPCNotificationSchema = z.object({
12
12
  jsonrpc: z.literal('2.0'),
13
13
  method: z.string(),
14
- params: z.unknown().optional()
14
+ params: z.unknown().optional(),
15
15
  });
16
16
  const ResultSchema = z.object({
17
- _meta: z.record(z.string(), z.unknown()).optional()
17
+ _meta: z.record(z.string(), z.unknown()).optional(),
18
18
  });
19
19
  const NotificationParamsSchema = z.object({
20
- _meta: z.record(z.string(), z.unknown()).optional()
20
+ _meta: z.record(z.string(), z.unknown()).optional(),
21
21
  });
22
22
  /** JSON data accepted in event-specific structured data. */
23
- export const JSONPrimitiveSchema = z.union([z.string(), z.number(), z.boolean()]).nullable();
23
+ export const JSONPrimitiveSchema = z
24
+ .union([z.string(), z.number(), z.boolean()])
25
+ .nullable();
24
26
  /** 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)]));
27
+ export const JSONValueSchema = z.lazy(() => z.union([
28
+ JSONPrimitiveSchema,
29
+ z.array(JSONValueSchema),
30
+ z.record(z.string(), JSONValueSchema),
31
+ ]));
26
32
  /** Parameters for retrieving pending durable events. */
27
33
  export const GetEventsParamsSchema = z.record(z.string(), z.unknown()).and(z.object({
28
34
  /** Requested maximum page size. Must be a positive integer. */
29
- limit: z.number().int().positive().optional()
35
+ limit: z.number().int().positive().optional(),
30
36
  }));
31
37
  /** Retrieves a bounded page of events pending for the authenticated consumer. */
32
38
  export const GetEventsRequestSchema = JSONRPCRequestSchema.extend({
33
39
  method: z.literal('io.stagewise/push-notifications/get'),
34
- params: GetEventsParamsSchema
40
+ params: GetEventsParamsSchema,
35
41
  });
36
42
  /** Parameters for acknowledging durable acceptance of events. */
37
- export const AcknowledgeEventsParamsSchema = z.record(z.string(), z.unknown()).and(z.object({
43
+ export const AcknowledgeEventsParamsSchema = z
44
+ .record(z.string(), z.unknown())
45
+ .and(z.object({
38
46
  /** Event identifiers already committed to durable client storage. */
39
- eventIds: z.array(z.string().min(1)).min(1)
47
+ eventIds: z.array(z.string().min(1)).min(1),
40
48
  }));
41
49
  /** Acknowledges durable client acceptance of one or more events. */
42
50
  export const AcknowledgeEventsRequestSchema = JSONRPCRequestSchema.extend({
43
51
  method: z.literal('io.stagewise/push-notifications/ack'),
44
- params: AcknowledgeEventsParamsSchema
52
+ params: AcknowledgeEventsParamsSchema,
45
53
  });
46
54
  /** Empty, idempotent acknowledgement result. */
47
55
  export const AcknowledgeEventsResultSchema = ResultSchema;
@@ -49,41 +57,47 @@ export const AcknowledgeEventsResultSchema = ResultSchema;
49
57
  export const PushNotificationsSubscriptionSchema = z.record(z.string(), z.never());
50
58
  /** Extension-owned fields added to subscriptions/listen notifications. */
51
59
  export const PushNotificationsSubscriptionNotificationsSchema = z.object({
52
- 'io.stagewise/push-notifications': PushNotificationsSubscriptionSchema.optional()
60
+ 'io.stagewise/push-notifications': PushNotificationsSubscriptionSchema.optional(),
53
61
  });
54
62
  /** Push Notifications fields returned in notifications/subscriptions/acknowledged. */
55
63
  export const PushNotificationsSubscriptionAcknowledgedNotificationsSchema = z.object({
56
- 'io.stagewise/push-notifications': PushNotificationsSubscriptionSchema.optional()
64
+ 'io.stagewise/push-notifications': PushNotificationsSubscriptionSchema.optional(),
57
65
  });
58
66
  /** Empty capability object indicating support for the extension. */
59
67
  export const PushNotificationsExtensionCapabilitySchema = z.record(z.string(), z.never());
60
68
  /** 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()
69
+ export const ExtensionCapabilitiesSchema = z
70
+ .record(z.string(), z.unknown())
71
+ .and(z.object({
72
+ 'io.stagewise/push-notifications': PushNotificationsExtensionCapabilitySchema.optional(),
63
73
  }));
64
74
  /** 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()
75
+ export const PushNotificationsCapabilitiesSchema = z
76
+ .record(z.string(), z.unknown())
77
+ .and(z.object({
78
+ extensions: ExtensionCapabilitiesSchema.optional(),
67
79
  }));
68
80
  /** 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()
81
+ export const PushNotificationsClientCapabilitiesMetaSchema = z
82
+ .record(z.string(), z.unknown())
83
+ .and(z.object({
84
+ 'io.modelcontextprotocol/clientCapabilities': PushNotificationsCapabilitiesSchema.optional(),
71
85
  }));
72
86
  /** Future MCP server discovery request. */
73
87
  export const ServerDiscoverRequestSchema = JSONRPCRequestSchema.extend({
74
88
  method: z.literal('server/discover'),
75
- params: z.record(z.string(), z.unknown())
89
+ params: z.record(z.string(), z.unknown()),
76
90
  });
77
91
  /** Future MCP server discovery result. */
78
92
  export const ServerDiscoverResultSchema = ResultSchema.and(z.object({
79
- capabilities: PushNotificationsCapabilitiesSchema
93
+ capabilities: PushNotificationsCapabilitiesSchema,
80
94
  }));
81
95
  /** Future MCP notification subscription request. */
82
96
  export const SubscriptionsListenRequestSchema = JSONRPCRequestSchema.extend({
83
97
  method: z.literal('subscriptions/listen'),
84
98
  params: z.record(z.string(), z.unknown()).and(z.object({
85
- notifications: PushNotificationsSubscriptionNotificationsSchema.and(z.record(z.string(), z.unknown()))
86
- }))
99
+ notifications: PushNotificationsSubscriptionNotificationsSchema.and(z.record(z.string(), z.unknown())),
100
+ })),
87
101
  });
88
102
  /** Empty acknowledgement for a subscription request. */
89
103
  export const SubscriptionsListenResultSchema = ResultSchema;
@@ -91,15 +105,16 @@ export const SubscriptionsListenResultSchema = ResultSchema;
91
105
  export const SubscriptionsAcknowledgedNotificationSchema = JSONRPCNotificationSchema.extend({
92
106
  method: z.literal('notifications/subscriptions/acknowledged'),
93
107
  params: NotificationParamsSchema.and(z.object({
94
- notifications: PushNotificationsSubscriptionAcknowledgedNotificationsSchema.and(z.record(z.string(), z.unknown()))
95
- }))
108
+ notifications: PushNotificationsSubscriptionAcknowledgedNotificationsSchema.and(z.record(z.string(), z.unknown())),
109
+ })),
96
110
  });
97
111
  /** JSON-RPC error data for a missing client capability. */
98
112
  export const MissingRequiredClientCapabilityDataSchema = z.object({
99
- requiredCapabilities: PushNotificationsCapabilitiesSchema
113
+ requiredCapabilities: PushNotificationsCapabilitiesSchema,
100
114
  });
101
115
  /** A durable event produced by an MCP server. */
102
- export const PushNotificationSchema = z.object({
116
+ export const PushNotificationSchema = z
117
+ .object({
103
118
  /** Stable, globally unique identifier and deduplication key. */
104
119
  eventId: z.string(),
105
120
  /** Stable identifier for the environment or channel that produced the event. */
@@ -111,23 +126,36 @@ export const PushNotificationSchema = z.object({
111
126
  /** Ordered MCP content blocks carrying the event's interoperable content. */
112
127
  content: z.array(ContentBlockSchema),
113
128
  /** Optional structured JSON data defined by the event type. */
114
- data: z.record(z.string(), JSONValueSchema).optional()
115
- }).strict();
129
+ data: z.record(z.string(), JSONValueSchema).optional(),
130
+ /**
131
+ * Optional link to an MCP resource that this notification relates to.
132
+ * When present, clients that have the resource open may suppress or
133
+ * replace the notification with a lightweight notice, relying on the
134
+ * resource subscription for automatic updates instead.
135
+ */
136
+ resourceLink: z
137
+ .object({
138
+ /** The URI of the referenced MCP resource. */
139
+ uri: z.string(),
140
+ })
141
+ .optional(),
142
+ })
143
+ .strict();
116
144
  /** Result of retrieving pending events for the authenticated consumer. */
117
145
  export const GetEventsResultSchema = ResultSchema.and(z.object({
118
146
  /** Complete pending events in deterministic server order. */
119
147
  events: z.array(PushNotificationSchema),
120
148
  /** Whether additional pending events were available when this page was read. */
121
- hasMore: z.boolean()
149
+ hasMore: z.boolean(),
122
150
  }));
123
151
  /** Parameters sent with a subscribed push notification. */
124
152
  export const PushNotificationNotificationParamsSchema = NotificationParamsSchema.and(z.object({
125
153
  /** Complete durable event already pending for the authenticated consumer. */
126
- event: PushNotificationSchema
154
+ event: PushNotificationSchema,
127
155
  }));
128
156
  /** Optional low-latency delivery of an event already available through retrieval. */
129
157
  export const PushNotificationNotificationSchema = JSONRPCNotificationSchema.extend({
130
158
  method: z.literal('io.stagewise/push-notifications/event'),
131
- params: PushNotificationNotificationParamsSchema
159
+ params: PushNotificationNotificationParamsSchema,
132
160
  });
133
161
  //# sourceMappingURL=schema.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"schema.js","sourceRoot":"","sources":["../../src/generated/schema.ts"],"names":[],"mappings":"AAAA,yBAAyB;AACzB,6CAA6C;AAC7C,OAAO,EAAE,CAAC,EAAE,MAAM,QAAQ,CAAC;AAC3B,OAAO,EACL,kBAAkB,GACnB,MAAM,4BAA4B,CAAC;AAGpC,MAAM,oBAAoB,GAAG,CAAC,CAAC,MAAM,CAAC;IAClC,OAAO,EAAE,CAAC,CAAC,OAAO,CAAC,KAAK,CAAC;IACzB,EAAE,EAAE,CAAC,CAA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;;;OAKG;IACH,YAAY,EAAE,CAAC;SACZ,MAAM,CAAC;QACN,8CAA8C;QAC9C,GAAG,EAAE,CAAC,CAAC,MAAM,EAAE;KAChB,CAAC;SACD,QAAQ,EAAE;CACd,CAAC;KACD,MAAM,EAAE,CAAC;AAEZ,0EAA0E;AAC1E,MAAM,CAAC,MAAM,qBAAqB,GAAG,YAAY,CAAC,GAAG,CACnD,CAAC,CAAC,MAAM,CAAC;IACP,6DAA6D;IAC7D,MAAM,EAAE,CAAC,CAAC,KAAK,CAAC,sBAAsB,CAAC;IACvC,gFAAgF;IAChF,OAAO,EAAE,CAAC,CAAC,OAAO,EAAE;CACrB,CAAC,CACH,CAAC;AAEF,2DAA2D;AAC3D,MAAM,CAAC,MAAM,wCAAwC,GACnD,wBAAwB,CAAC,GAAG,CAC1B,CAAC,CAAC,MAAM,CAAC;IACP,6EAA6E;IAC7E,KAAK,EAAE,sBAAsB;CAC9B,CAAC,CACH,CAAC;AAEJ,qFAAqF;AACrF,MAAM,CAAC,MAAM,kCAAkC,GAC7C,yBAAyB,CAAC,MAAM,CAAC;IAC/B,MAAM,EAAE,CAAC,CAAC,OAAO,CAAC,uCAAuC,CAAC;IAC1D,MAAM,EAAE,wCAAwC;CACjD,CAAC,CAAC"}
@@ -10,6 +10,8 @@ export interface PushNotificationsServerHandlers {
10
10
  }
11
11
  export interface RegisterPushNotificationsServerOptions {
12
12
  acceptInitializationCapabilities?: boolean;
13
+ /** Disable when an application composes discovery through another handler. */
14
+ registerDiscoveryHandler?: boolean;
13
15
  }
14
16
  export declare class PushNotificationsProtocolError extends Error {
15
17
  readonly code: number;
@@ -1 +1 @@
1
- {"version":3,"file":"register-push-notifications-server.d.ts","sourceRoot":"","sources":["../../src/server/register-push-notifications-server.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,EAAE,MAAM,8BAA8B,CAAC;AAwBxE,OAAO,KAAK,EACV,uBAAuB,EACvB,eAAe,EACf,eAAe,E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AED,wBAAgB,+BAA+B,CAC7C,MAAM,EAAE,+BAA+B,EACvC,QAAQ,EAAE,+BAA+B,EACzC,OAAO,GAAE,sCAA2C,GACnD,iCAAiC,CAmEnC"}
1
+ {"version":3,"file":"register-push-notifications-server.d.ts","sourceRoot":"","sources":["../../src/server/register-push-notifications-server.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,EAAE,MAAM,8BAA8B,CAAC;AAwBxE,OAAO,KAAK,EACV,uBAAuB,EACvB,eAAe,EACf,eAAe,EACf,kCAAkC,EACnC,MAAM,kBAAkB,CAAC;AAE1B,MAAM,MAAM,+BAA+B,GAAG,IAAI,CAChD,MAAM,EACJ,uBAAuB,GACvB,cAAc,GACd,sBAAsB,GACtB,mBAAmB,CACtB,GAAG;IACF,0BAA0B,CAAC,CAAC,MAAM,EAAE,MAAM,GAAG,IAAI,CAAC;CACnD,CAAC;AACF,MAAM,MAAM,+BAA+B,GAAG,WAAW,CAAC;AAE1D,MAAM,WAAW,+BAA+B;IAC9C,SAAS,CACP,MAAM,EAAE,eAAe,EACvB,OAAO,EAAE,+BAA+B,GACvC,OAAO,CAAC,eAAe,CAAC,GAAG,eAAe,CAAC;IAC9C,iBAAiB,CACf,MAAM,EAAE,uBAAuB,EAC/B,OAAO,EAAE,+BAA+B,GACvC,OAAO,CAAC,IAAI,CAAC,GAAG,IAAI,CAAC;CACzB;AAED,MAAM,WAAW,sCAAsC;IACrD,gCAAgC,CAAC,EAAE,OAAO,CAAC;IAC3C,8EAA8E;IAC9E,wBAAwB,CAAC,EAAE,OAAO,CAAC;CACpC;AAED,qBAAa,8BAA+B,SAAQ,KAAK;IACvD,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;IACtB,QAAQ,CAAC,IAAI,CAAC,EAAE,OAAO,CAAC;IAExB,YAAY,KAAK,EAAE;QAAE,IAAI,EAAE,MAAM,CAAC;QAAC,OAAO,EAAE,MAAM,CAAC;QAAC,IAAI,CAAC,EAAE,OAAO,CAAA;KAAE,EAKnE;CACF;AAED,MAAM,WAAW,iCAAiC;IAChD,+BAA+B,CAAC,QAAQ,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAAG,OAAO,CAAC;IAC7E,gFAAgF;IAChF,SAAS,CACP,MAAM,EAAE,kCAAkC,EAC1C,OAAO,CAAC,EAAE;QACR,QAAQ,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;QACnC,gBAAgB,CAAC,EAAE,MAAM,GAAG,MAAM,CAAC;KACpC,GACA,OAAO,CAAC,IAAI,CAAC,CAAC;CAClB;AAED,wBAAgB,+BAA+B,CAC7C,MAAM,EAAE,+BAA+B,EACvC,QAAQ,EAAE,+BAA+B,EACzC,OAAO,GAAE,sCAA2C,GACnD,iCAAiC,CAqEnC"}
@@ -23,10 +23,12 @@ export function registerPushNotificationsServer(server, handlers, options = {})
23
23
  throw new PushNotificationsProtocolError(missingPushNotificationsCapabilityError());
24
24
  }
25
25
  };
26
- server.setRequestHandler(SERVER_DISCOVER_METHOD, {
27
- params: z.record(z.string(), z.unknown()),
28
- result: ServerDiscoverResultSchema,
29
- }, () => ({ capabilities: pushNotificationsCapabilities() }));
26
+ if (options.registerDiscoveryHandler !== false) {
27
+ server.setRequestHandler(SERVER_DISCOVER_METHOD, {
28
+ params: z.record(z.string(), z.unknown()),
29
+ result: ServerDiscoverResultSchema,
30
+ }, () => ({ capabilities: pushNotificationsCapabilities() }));
31
+ }
30
32
  server.setRequestHandler(PUSH_NOTIFICATIONS_GET_METHOD, { params: GetEventsParamsSchema, result: GetEventsResultSchema }, async (params, context) => {
31
33
  requireSupport(context);
32
34
  return GetEventsResultSchema.parse(await handlers.getEvents(params, context));
@@ -1 +1 @@
1
- {"version":3,"file":"register-push-notifications-server.js","sourceRoot":"","sources":["../../src/server/register-push-notifications-server.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,CAAC,EAAE,MAAM,QAAQ,CAAC;AAE3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wCAAwC,CAAC,KAAK,CAAC,MAAM,CAAC;aAC/D,EACD,EAAE,gBAAgB,EAAE,mBAAmB,EAAE,gBAAgB,EAAE,CAC5D,CAAC;QACJ,CAAC;KACF,CAAC;AACJ,CAAC"}
1
+ {"version":3,"file":"register-push-notifications-server.js","sourceRoot":"","sources":["../../src/server/register-push-notifications-server.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,CAAC,EAAE,MAAM,QAAQ,CAAC;AAE3B,OAAO,EACL,wCAAwC,EACxC,8BAA8B,EAC9B,uCAAuC,EACvC,6BAA6B,EAC7B,+BAA+B,GAChC,MAAM,oBAAoB,CAAC;AAC5B,OAAO,EACL,6BAA6B,EAC7B,6BAA6B,EAC7B,sCAAsC,EACtC,sBAAsB,GACvB,MAAM,iBAAiB,CAAC;AACzB,OAAO,EACL,6BAA6B,EAC7B,6BAA6B,EAC7B,qBAAqB,EACrB,qBAAqB,EACrB,wCAAwC,EACxC,0BAA0B,GAC3B,MAAM,wBAAwB,CAAC;AAoChC,MAAM,OAAO,8BAA+B,SAAQ,KAAK;IAC9C,IAAI,CAAS;IACb,IAAI,CAAW;IAExB,YAAY,KAAwD;QAClE,KAAK,CAAC,KAAK,CAAC,OAAO,CAAC,CAAC;QACrB,IAAI,CAAC,IAAI,GAAG,gCAAgC,CAAC;QAC7C,IAAI,CAAC,IAAI,GAAG,KAAK,CAAC,IAAI,CAAC;QACvB,IAAI,CAAC,IAAI,GAAG,KAAK,CAAC,IAAI,CAAC;IACzB,CAAC;CACF;AAcD,MAAM,UAAU,+BAA+B,CAC7C,MAAuC,EACvC,QAAyC,EACzC,OAAO,GAA2C,EAAE;IAEpD,MAAM,CAAC,oBAAoB,CAAC,+BAA+B,CAAC,EAAE,CAAC,CAAC,CAAC;IAEjE,MAAM,QAAQ,GAAG,CAAC,QAAkC,EAAW,EAAE,CAC/D,wCAAwC,CAAC,QAAQ,CAAC;QAClD,CAAC,OAAO,CAAC,gCAAgC,KAAK,IAAI;YAChD,8BAA8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OAAO,EAAE,CAAC;IACZ,CAAC,CACF,CAAC;IAEF,OAAO;QACL,+BAA+B,EAAE,QAAQ;QACzC,KAAK,CAAC,SAAS,CAAC,MAAM,EAAE,mBAAmB;YACzC,IAAI,CAAC,QAAQ,CAAC,mBAAmB,EAAE,QAAQ,CAAC,EAAE,CAAC;gBAC7C,MAAM,IAAI,8BAA8B,CACtC,uCAAuC,EAAE,CAC1C,CAAC;YACJ,CAAC;YACD,MAAM,MAAM,CAAC,YAAY,CACvB;gBACE,MAAM,EAAE,sCAAsC;gBAC9C,MAAM,EAAE,wCAAwC,CAAC,KAAK,CAAC,MAAM,CAAC;aAC/D,EACD,EAAE,gBAAgB,EAAE,mBAAmB,EAAE,gBAAgB,EAAE,CAC5D,CAAC;QACJ,CAAC;KACF,CAAC;AACJ,CAAC"}
@@ -45,6 +45,16 @@ export interface PushNotification {
45
45
  data?: {
46
46
  [key: string]: JSONValue;
47
47
  };
48
+ /**
49
+ * Optional link to an MCP resource that this notification relates to.
50
+ * When present, clients that have the resource open may suppress or
51
+ * replace the notification with a lightweight notice, relying on the
52
+ * resource subscription for automatic updates instead.
53
+ */
54
+ resourceLink?: {
55
+ /** The URI of the referenced MCP resource. */
56
+ uri: string;
57
+ };
48
58
  }
49
59
  /** Parameters for retrieving pending durable events. */
50
60
  export interface GetEventsParams {
@@ -1 +1 @@
1
- {"version":3,"file":"spec.types.d.ts","sourceRoot":"","sources":["../src/spec.types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,8BAA8B,CAAC;AAEjE;;;;;;GAMG;AAEH,UAAU,cAAc;IACtB,OAAO,EAAE,KAAK,CAAC;IACf,EAAE,EAAE,MAAM,GAAG,MAAM,CAAC;IACpB,MAAM,EAAE,MAAM,CAAC;IACf,MAAM,CAAC,EAAE,OAAO,CAAC;CAClB;AAED,UAAU,mBAAmB;IAC3B,OAAO,EAAE,KAAK,CAAC;IACf,MAAM,EAAE,MAAM,CAAC;IACf,M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EAAE,MAAM,GAAG,OAAO,CAAC;SACxB,CAAC;KACH,CAAC;CACH;AAED,2DAA2D;AAC3D,MAAM,WAAW,mCAAmC;IAClD,oBAAoB,EAAE,6BAA6B,CAAC;CACrD"}
package/package.json CHANGED
@@ -1,10 +1,19 @@
1
1
  {
2
2
  "name": "@stagewise/mcp-extension-push-notifications",
3
- "version": "0.1.0",
3
+ "version": "0.2.0",
4
4
  "type": "module",
5
5
  "sideEffects": false,
6
6
  "description": "Push Notifications extension for the Model Context Protocol",
7
7
  "license": "Apache-2.0",
8
+ "repository": {
9
+ "type": "git",
10
+ "url": "https://github.com/stagewise-io/klex.git",
11
+ "directory": "packages/mcp-extension-push-notifications"
12
+ },
13
+ "publishConfig": {
14
+ "access": "public",
15
+ "provenance": false
16
+ },
8
17
  "exports": {
9
18
  ".": {
10
19
  "types": "./dist/index.d.ts",
@@ -22,6 +31,7 @@
22
31
  },
23
32
  "files": [
24
33
  "dist",
34
+ "LICENSE",
25
35
  "schema.json",
26
36
  "specification",
27
37
  "README.md"
@@ -32,7 +42,12 @@
32
42
  "clean": "rm -rf dist",
33
43
  "build": "pnpm run generate:schemas && pnpm run clean && tsc -p tsconfig.build.json",
34
44
  "typecheck": "tsc --noEmit",
35
- "test": "vitest run"
45
+ "test": "pnpm run generate:schemas && vitest run",
46
+ "prepack": "pnpm build",
47
+ "verify": "node ../../scripts/verify-mcp-extension-packages.mjs"
48
+ },
49
+ "dependencies": {
50
+ "@stagewise/mcp-extension-client": "0.1.1"
36
51
  },
37
52
  "peerDependencies": {
38
53
  "@modelcontextprotocol/client": "2.0.0-beta.4",
package/schema.json CHANGED
@@ -254,10 +254,7 @@
254
254
  "type": "array",
255
255
  "items": {
256
256
  "type": "string",
257
- "enum": [
258
- "user",
259
- "assistant"
260
- ]
257
+ "enum": ["user", "assistant"]
261
258
  }
262
259
  },
263
260
  "priority": {
@@ -304,10 +301,7 @@
304
301
  "type": "array",
305
302
  "items": {
306
303
  "type": "string",
307
- "enum": [
308
- "user",
309
- "assistant"
310
- ]
304
+ "enum": ["user", "assistant"]
311
305
  }
312
306
  },
313
307
  "priority": {
@@ -354,10 +348,7 @@
354
348
  "type": "array",
355
349
  "items": {
356
350
  "type": "string",
357
- "enum": [
358
- "user",
359
- "assistant"
360
- ]
351
+ "enum": ["user", "assistant"]
361
352
  }
362
353
  },
363
354
  "priority": {
@@ -412,10 +403,7 @@
412
403
  },
413
404
  "theme": {
414
405
  "type": "string",
415
- "enum": [
416
- "light",
417
- "dark"
418
- ]
406
+ "enum": ["light", "dark"]
419
407
  }
420
408
  },
421
409
  "required": ["src"],
@@ -441,10 +429,7 @@
441
429
  "type": "array",
442
430
  "items": {
443
431
  "type": "string",
444
- "enum": [
445
- "user",
446
- "assistant"
447
- ]
432
+ "enum": ["user", "assistant"]
448
433
  }
449
434
  },
450
435
  "priority": {
@@ -537,10 +522,7 @@
537
522
  "type": "array",
538
523
  "items": {
539
524
  "type": "string",
540
- "enum": [
541
- "user",
542
- "assistant"
543
- ]
525
+ "enum": ["user", "assistant"]
544
526
  }
545
527
  },
546
528
  "priority": {
@@ -578,6 +560,16 @@
578
560
  "additionalProperties": {
579
561
  "$ref": "#/$defs/__schema0"
580
562
  }
563
+ },
564
+ "resourceLink": {
565
+ "type": "object",
566
+ "properties": {
567
+ "uri": {
568
+ "type": "string"
569
+ }
570
+ },
571
+ "required": ["uri"],
572
+ "additionalProperties": false
581
573
  }
582
574
  },
583
575
  "required": [
@@ -809,10 +801,7 @@
809
801
  "type": "array",
810
802
  "items": {
811
803
  "type": "string",
812
- "enum": [
813
- "user",
814
- "assistant"
815
- ]
804
+ "enum": ["user", "assistant"]
816
805
  }
817
806
  },
818
807
  "priority": {
@@ -859,10 +848,7 @@
859
848
  "type": "array",
860
849
  "items": {
861
850
  "type": "string",
862
- "enum": [
863
- "user",
864
- "assistant"
865
- ]
851
+ "enum": ["user", "assistant"]
866
852
  }
867
853
  },
868
854
  "priority": {
@@ -909,10 +895,7 @@
909
895
  "type": "array",
910
896
  "items": {
911
897
  "type": "string",
912
- "enum": [
913
- "user",
914
- "assistant"
915
- ]
898
+ "enum": ["user", "assistant"]
916
899
  }
917
900
  },
918
901
  "priority": {
@@ -967,10 +950,7 @@
967
950
  },
968
951
  "theme": {
969
952
  "type": "string",
970
- "enum": [
971
- "light",
972
- "dark"
973
- ]
953
+ "enum": ["light", "dark"]
974
954
  }
975
955
  },
976
956
  "required": ["src"],
@@ -996,10 +976,7 @@
996
976
  "type": "array",
997
977
  "items": {
998
978
  "type": "string",
999
- "enum": [
1000
- "user",
1001
- "assistant"
1002
- ]
979
+ "enum": ["user", "assistant"]
1003
980
  }
1004
981
  },
1005
982
  "priority": {
@@ -1092,10 +1069,7 @@
1092
1069
  "type": "array",
1093
1070
  "items": {
1094
1071
  "type": "string",
1095
- "enum": [
1096
- "user",
1097
- "assistant"
1098
- ]
1072
+ "enum": ["user", "assistant"]
1099
1073
  }
1100
1074
  },
1101
1075
  "priority": {
@@ -1133,6 +1107,16 @@
1133
1107
  "additionalProperties": {
1134
1108
  "$ref": "#/$defs/__schema0"
1135
1109
  }
1110
+ },
1111
+ "resourceLink": {
1112
+ "type": "object",
1113
+ "properties": {
1114
+ "uri": {
1115
+ "type": "string"
1116
+ }
1117
+ },
1118
+ "required": ["uri"],
1119
+ "additionalProperties": false
1136
1120
  }
1137
1121
  },
1138
1122
  "required": [
@@ -1259,10 +1243,7 @@
1259
1243
  "type": "array",
1260
1244
  "items": {
1261
1245
  "type": "string",
1262
- "enum": [
1263
- "user",
1264
- "assistant"
1265
- ]
1246
+ "enum": ["user", "assistant"]
1266
1247
  }
1267
1248
  },
1268
1249
  "priority": {
@@ -1309,10 +1290,7 @@
1309
1290
  "type": "array",
1310
1291
  "items": {
1311
1292
  "type": "string",
1312
- "enum": [
1313
- "user",
1314
- "assistant"
1315
- ]
1293
+ "enum": ["user", "assistant"]
1316
1294
  }
1317
1295
  },
1318
1296
  "priority": {
@@ -1359,10 +1337,7 @@
1359
1337
  "type": "array",
1360
1338
  "items": {
1361
1339
  "type": "string",
1362
- "enum": [
1363
- "user",
1364
- "assistant"
1365
- ]
1340
+ "enum": ["user", "assistant"]
1366
1341
  }
1367
1342
  },
1368
1343
  "priority": {
@@ -1417,10 +1392,7 @@
1417
1392
  },
1418
1393
  "theme": {
1419
1394
  "type": "string",
1420
- "enum": [
1421
- "light",
1422
- "dark"
1423
- ]
1395
+ "enum": ["light", "dark"]
1424
1396
  }
1425
1397
  },
1426
1398
  "required": ["src"],
@@ -1446,10 +1418,7 @@
1446
1418
  "type": "array",
1447
1419
  "items": {
1448
1420
  "type": "string",
1449
- "enum": [
1450
- "user",
1451
- "assistant"
1452
- ]
1421
+ "enum": ["user", "assistant"]
1453
1422
  }
1454
1423
  },
1455
1424
  "priority": {
@@ -1542,10 +1511,7 @@
1542
1511
  "type": "array",
1543
1512
  "items": {
1544
1513
  "type": "string",
1545
- "enum": [
1546
- "user",
1547
- "assistant"
1548
- ]
1514
+ "enum": ["user", "assistant"]
1549
1515
  }
1550
1516
  },
1551
1517
  "priority": {
@@ -1583,6 +1549,16 @@
1583
1549
  "additionalProperties": {
1584
1550
  "$ref": "#/$defs/__schema0"
1585
1551
  }
1552
+ },
1553
+ "resourceLink": {
1554
+ "type": "object",
1555
+ "properties": {
1556
+ "uri": {
1557
+ "type": "string"
1558
+ }
1559
+ },
1560
+ "required": ["uri"],
1561
+ "additionalProperties": false
1586
1562
  }
1587
1563
  },
1588
1564
  "required": [
@@ -1684,10 +1660,7 @@
1684
1660
  "type": "array",
1685
1661
  "items": {
1686
1662
  "type": "string",
1687
- "enum": [
1688
- "user",
1689
- "assistant"
1690
- ]
1663
+ "enum": ["user", "assistant"]
1691
1664
  }
1692
1665
  },
1693
1666
  "priority": {
@@ -1734,10 +1707,7 @@
1734
1707
  "type": "array",
1735
1708
  "items": {
1736
1709
  "type": "string",
1737
- "enum": [
1738
- "user",
1739
- "assistant"
1740
- ]
1710
+ "enum": ["user", "assistant"]
1741
1711
  }
1742
1712
  },
1743
1713
  "priority": {
@@ -1784,10 +1754,7 @@
1784
1754
  "type": "array",
1785
1755
  "items": {
1786
1756
  "type": "string",
1787
- "enum": [
1788
- "user",
1789
- "assistant"
1790
- ]
1757
+ "enum": ["user", "assistant"]
1791
1758
  }
1792
1759
  },
1793
1760
  "priority": {
@@ -1842,10 +1809,7 @@
1842
1809
  },
1843
1810
  "theme": {
1844
1811
  "type": "string",
1845
- "enum": [
1846
- "light",
1847
- "dark"
1848
- ]
1812
+ "enum": ["light", "dark"]
1849
1813
  }
1850
1814
  },
1851
1815
  "required": ["src"],
@@ -1871,10 +1835,7 @@
1871
1835
  "type": "array",
1872
1836
  "items": {
1873
1837
  "type": "string",
1874
- "enum": [
1875
- "user",
1876
- "assistant"
1877
- ]
1838
+ "enum": ["user", "assistant"]
1878
1839
  }
1879
1840
  },
1880
1841
  "priority": {
@@ -1967,10 +1928,7 @@
1967
1928
  "type": "array",
1968
1929
  "items": {
1969
1930
  "type": "string",
1970
- "enum": [
1971
- "user",
1972
- "assistant"
1973
- ]
1931
+ "enum": ["user", "assistant"]
1974
1932
  }
1975
1933
  },
1976
1934
  "priority": {
@@ -2008,6 +1966,16 @@
2008
1966
  "additionalProperties": {
2009
1967
  "$ref": "#/$defs/__schema0"
2010
1968
  }
1969
+ },
1970
+ "resourceLink": {
1971
+ "type": "object",
1972
+ "properties": {
1973
+ "uri": {
1974
+ "type": "string"
1975
+ }
1976
+ },
1977
+ "required": ["uri"],
1978
+ "additionalProperties": false
2011
1979
  }
2012
1980
  },
2013
1981
  "required": ["eventId", "sourceId", "type", "createdAt", "content"],
@@ -26,6 +26,7 @@ interface PushNotification {
26
26
  createdAt: string;
27
27
  content: ContentBlock[];
28
28
  data?: Record<string, JSONValue>;
29
+ resourceLink?: { uri: string };
29
30
  }
30
31
  ```
31
32
 
@@ -36,6 +37,14 @@ interface PushNotification {
36
37
  - `content` is an ordered array using the canonical MCP `ContentBlock` definition
37
38
  from the extension package's pinned MCP SDK revision. It MAY be empty.
38
39
  - `data` is optional JSON whose fields and semantics are defined by `type`.
40
+ - `resourceLink` optionally identifies an MCP resource that this notification
41
+ relates to. The resource URI is scoped to the same MCP server that produced
42
+ the event. When a client has the referenced resource open with an active
43
+ subscription, it MAY suppress the notification entirely because the
44
+ resource subscription delivers updates through a separate mechanism. When the
45
+ resource is open but not subscribed, a client MAY replace the notification
46
+ with a lightweight notice. When the resource is not open, the client MUST
47
+ deliver the full notification so the agent can decide whether to open it.
39
48
 
40
49
  `content` supports the MCP text, image, audio, embedded-resource, and resource-link
41
50
  representations. A producer SHOULD inline only bounded media; base64 increases