@stagewise/mcp-extension-push-notifications 0.1.0 → 0.1.1
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 +201 -0
- package/README.md +1 -1
- package/dist/client/register-push-notifications-client.d.ts.map +1 -1
- package/dist/client/register-push-notifications-client.js +8 -3
- package/dist/client/register-push-notifications-client.js.map +1 -1
- package/dist/generated/schema.d.ts +1 -1
- package/dist/generated/schema.d.ts.map +1 -1
- package/dist/generated/schema.js +49 -33
- package/dist/generated/schema.js.map +1 -1
- package/dist/server/register-push-notifications-server.d.ts +2 -0
- package/dist/server/register-push-notifications-server.d.ts.map +1 -1
- package/dist/server/register-push-notifications-server.js +6 -4
- package/dist/server/register-push-notifications-server.js.map +1 -1
- package/package.json +14 -11
- package/schema.json +24 -96
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;
|
|
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,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,CAwJnC"}
|
|
@@ -1,5 +1,6 @@
|
|
|
1
|
+
import { registerSubscriptionAcknowledgementHandler } from '@stagewise/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,
|
|
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
|
|
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 =
|
|
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,GACtC,MAAM,oBAAoB,CAAC;AAC5B,OAAO,EACL,6BAA6B,EAC7B,6BAA6B,EAC7B,sCAAsC,EACtC,sBAAsB,EACtB,
|
|
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,OAAO;QACL,GAAG,MAAM;QACT,KAAK,EAAE,qCAAqC,CAAC,QAAQ,IAAI,EA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K,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 {
|
|
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. */
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"schema.d.ts","sourceRoot":"","sources":["../../src/generated/schema.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"schema.d.ts","sourceRoot":"","sources":["../../src/generated/schema.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,CAAC,EAAE,MAAM,QAAQ,CAAC;AAE3B,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,kBAAkB,CAAC;AAuBlD,4DAA4D;AAC5D,eAAO,MAAM,mBAAmB,8EAEnB,CAAC;AAEd,4DAA4D;AAC5D,eAAO,MAAM,eAAe,EAAE,CAAC,CAAC,SAAS,CAAC,SAAS,CAMlD,CAAC;AAEF,wDAAwD;AACxD,eAAO,MAAM,qBAAqB;;kBAKjC,CAAC;AAEF,iFAAiF;AACjF,eAAO,MAAM,sBAAsB;;;;;;;iBAGjC,CAAC;AAEH,iEAAiE;AACjE,eAAO,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;;;;;;;;;;;;;;;;;;;;;;;kBAOjC,CAAC;AAEF,2DAA2D;AAC3D,eAAO,MAAM,wCAAwC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;kBAMlD,CAAC;AAEJ,qFAAqF;AACrF,eAAO,MAAM,kCAAkC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;iBAI3C,CAAC"}
|
package/dist/generated/schema.js
CHANGED
|
@@ -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
|
|
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([
|
|
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
|
|
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
|
|
62
|
-
|
|
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
|
|
66
|
-
|
|
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
|
|
70
|
-
|
|
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
|
|
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,24 @@ 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
|
-
})
|
|
129
|
+
data: z.record(z.string(), JSONValueSchema).optional(),
|
|
130
|
+
})
|
|
131
|
+
.strict();
|
|
116
132
|
/** Result of retrieving pending events for the authenticated consumer. */
|
|
117
133
|
export const GetEventsResultSchema = ResultSchema.and(z.object({
|
|
118
134
|
/** Complete pending events in deterministic server order. */
|
|
119
135
|
events: z.array(PushNotificationSchema),
|
|
120
136
|
/** Whether additional pending events were available when this page was read. */
|
|
121
|
-
hasMore: z.boolean()
|
|
137
|
+
hasMore: z.boolean(),
|
|
122
138
|
}));
|
|
123
139
|
/** Parameters sent with a subscribed push notification. */
|
|
124
140
|
export const PushNotificationNotificationParamsSchema = NotificationParamsSchema.and(z.object({
|
|
125
141
|
/** Complete durable event already pending for the authenticated consumer. */
|
|
126
|
-
event: PushNotificationSchema
|
|
142
|
+
event: PushNotificationSchema,
|
|
127
143
|
}));
|
|
128
144
|
/** Optional low-latency delivery of an event already available through retrieval. */
|
|
129
145
|
export const PushNotificationNotificationSchema = JSONRPCNotificationSchema.extend({
|
|
130
146
|
method: z.literal('io.stagewise/push-notifications/event'),
|
|
131
|
-
params: PushNotificationNotificationParamsSchema
|
|
147
|
+
params: PushNotificationNotificationParamsSchema,
|
|
132
148
|
});
|
|
133
149
|
//# sourceMappingURL=schema.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"schema.js","sourceRoot":"","sources":["../../src/generated/schema.ts"],"names":[],"mappings":"AAAA,yBAAyB;AACzB,6CAA6C;
|
|
1
|
+
{"version":3,"file":"schema.js","sourceRoot":"","sources":["../../src/generated/schema.ts"],"names":[],"mappings":"AAAA,yBAAyB;AACzB,6CAA6C;AAE7C,OAAO,EAAE,kBAAkB,EAAE,MAAM,4BAA4B,CAAC;AAChE,OAAO,EAAE,CAAC,EAAE,MAAM,QAAQ,CAAC;AAI3B,MAAM,oBAAoB,GAAG,CAAC,CAAC,MAAM,CAAC;IACpC,OAAO,EAAE,CAAC,CAAC,OAAO,CAAC,KAAK,CAAC;IACzB,EAAE,EAAE,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,MAAM,EAAE,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,CAAC;IACrC,MAAM,EAAE,CAAC,CAAC,MAAM,EAAE;IAClB,MAAM,EAAE,CAAC,CAAC,OAAO,EAAE,CAAC,QAAQ,EAAE;CAC/B,CAAC,CAAC;AAEH,MAAM,yBAAyB,GAAG,CAAC,CAAC,MAAM,CAAC;IACzC,OAAO,EAAE,CAAC,CAAC,OAAO,CAAC,KAAK,CAAC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,EAAE,CAAC,CAAC,MAAM,EAAE;IACnB,gFAAgF;IAChF,QAAQ,EAAE,CAAC,CAAC,MAAM,EAAE;IACpB,oEAAoE;IACpE,IAAI,EAAE,CAAC,CAAC,MAAM,EAAE;IAChB,gEAAgE;IAChE,SAAS,EAAE,CAAC,CAAC,GAAG,CAAC,QAAQ,EAAE;IAC3B,6EAA6E;IAC7E,OAAO,EAAE,CAAC,CAAC,KAAK,CAAC,kBAAkB,CAAC;IACpC,+DAA+D;IAC/D,IAAI,EAAE,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,MAAM,EAAE,EAAE,eAAe,CAAC,CAAC,QAAQ,EAAE;CACvD,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,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;
|
|
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,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+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
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
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;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;
|
|
1
|
+
{"version":3,"file":"register-push-notifications-server.js","sourceRoot":"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AE,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"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@stagewise/mcp-extension-push-notifications",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.1",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"sideEffects": false,
|
|
6
6
|
"description": "Push Notifications extension for the Model Context Protocol",
|
|
@@ -26,13 +26,8 @@
|
|
|
26
26
|
"specification",
|
|
27
27
|
"README.md"
|
|
28
28
|
],
|
|
29
|
-
"
|
|
30
|
-
"
|
|
31
|
-
"check:schema": "pnpm run typecheck && tsx scripts/generate-schemas.ts --check",
|
|
32
|
-
"clean": "rm -rf dist",
|
|
33
|
-
"build": "pnpm run generate:schemas && pnpm run clean && tsc -p tsconfig.build.json",
|
|
34
|
-
"typecheck": "tsc --noEmit",
|
|
35
|
-
"test": "vitest run"
|
|
29
|
+
"dependencies": {
|
|
30
|
+
"@stagewise/mcp-extension-client": "0.1.0"
|
|
36
31
|
},
|
|
37
32
|
"peerDependencies": {
|
|
38
33
|
"@modelcontextprotocol/client": "2.0.0-beta.4",
|
|
@@ -44,12 +39,20 @@
|
|
|
44
39
|
"@modelcontextprotocol/client": "2.0.0-beta.4",
|
|
45
40
|
"@modelcontextprotocol/core": "2.0.0-beta.4",
|
|
46
41
|
"@modelcontextprotocol/server": "2.0.0-beta.4",
|
|
47
|
-
"@stagewise/typescript-config": "workspace:*",
|
|
48
42
|
"@types/node": "24.10.1",
|
|
49
43
|
"ts-to-zod": "5.1.0",
|
|
50
44
|
"tsx": "4.23.1",
|
|
51
45
|
"typescript": "7.0.2",
|
|
52
46
|
"vitest": "4.1.10",
|
|
53
|
-
"zod": "4.4.3"
|
|
47
|
+
"zod": "4.4.3",
|
|
48
|
+
"@stagewise/typescript-config": "0.0.0"
|
|
49
|
+
},
|
|
50
|
+
"scripts": {
|
|
51
|
+
"generate:schemas": "tsx scripts/generate-schemas.ts",
|
|
52
|
+
"check:schema": "pnpm run typecheck && tsx scripts/generate-schemas.ts --check",
|
|
53
|
+
"clean": "rm -rf dist",
|
|
54
|
+
"build": "pnpm run generate:schemas && pnpm run clean && tsc -p tsconfig.build.json",
|
|
55
|
+
"typecheck": "tsc --noEmit",
|
|
56
|
+
"test": "pnpm run generate:schemas && vitest run"
|
|
54
57
|
}
|
|
55
|
-
}
|
|
58
|
+
}
|
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": {
|
|
@@ -809,10 +791,7 @@
|
|
|
809
791
|
"type": "array",
|
|
810
792
|
"items": {
|
|
811
793
|
"type": "string",
|
|
812
|
-
"enum": [
|
|
813
|
-
"user",
|
|
814
|
-
"assistant"
|
|
815
|
-
]
|
|
794
|
+
"enum": ["user", "assistant"]
|
|
816
795
|
}
|
|
817
796
|
},
|
|
818
797
|
"priority": {
|
|
@@ -859,10 +838,7 @@
|
|
|
859
838
|
"type": "array",
|
|
860
839
|
"items": {
|
|
861
840
|
"type": "string",
|
|
862
|
-
"enum": [
|
|
863
|
-
"user",
|
|
864
|
-
"assistant"
|
|
865
|
-
]
|
|
841
|
+
"enum": ["user", "assistant"]
|
|
866
842
|
}
|
|
867
843
|
},
|
|
868
844
|
"priority": {
|
|
@@ -909,10 +885,7 @@
|
|
|
909
885
|
"type": "array",
|
|
910
886
|
"items": {
|
|
911
887
|
"type": "string",
|
|
912
|
-
"enum": [
|
|
913
|
-
"user",
|
|
914
|
-
"assistant"
|
|
915
|
-
]
|
|
888
|
+
"enum": ["user", "assistant"]
|
|
916
889
|
}
|
|
917
890
|
},
|
|
918
891
|
"priority": {
|
|
@@ -967,10 +940,7 @@
|
|
|
967
940
|
},
|
|
968
941
|
"theme": {
|
|
969
942
|
"type": "string",
|
|
970
|
-
"enum": [
|
|
971
|
-
"light",
|
|
972
|
-
"dark"
|
|
973
|
-
]
|
|
943
|
+
"enum": ["light", "dark"]
|
|
974
944
|
}
|
|
975
945
|
},
|
|
976
946
|
"required": ["src"],
|
|
@@ -996,10 +966,7 @@
|
|
|
996
966
|
"type": "array",
|
|
997
967
|
"items": {
|
|
998
968
|
"type": "string",
|
|
999
|
-
"enum": [
|
|
1000
|
-
"user",
|
|
1001
|
-
"assistant"
|
|
1002
|
-
]
|
|
969
|
+
"enum": ["user", "assistant"]
|
|
1003
970
|
}
|
|
1004
971
|
},
|
|
1005
972
|
"priority": {
|
|
@@ -1092,10 +1059,7 @@
|
|
|
1092
1059
|
"type": "array",
|
|
1093
1060
|
"items": {
|
|
1094
1061
|
"type": "string",
|
|
1095
|
-
"enum": [
|
|
1096
|
-
"user",
|
|
1097
|
-
"assistant"
|
|
1098
|
-
]
|
|
1062
|
+
"enum": ["user", "assistant"]
|
|
1099
1063
|
}
|
|
1100
1064
|
},
|
|
1101
1065
|
"priority": {
|
|
@@ -1259,10 +1223,7 @@
|
|
|
1259
1223
|
"type": "array",
|
|
1260
1224
|
"items": {
|
|
1261
1225
|
"type": "string",
|
|
1262
|
-
"enum": [
|
|
1263
|
-
"user",
|
|
1264
|
-
"assistant"
|
|
1265
|
-
]
|
|
1226
|
+
"enum": ["user", "assistant"]
|
|
1266
1227
|
}
|
|
1267
1228
|
},
|
|
1268
1229
|
"priority": {
|
|
@@ -1309,10 +1270,7 @@
|
|
|
1309
1270
|
"type": "array",
|
|
1310
1271
|
"items": {
|
|
1311
1272
|
"type": "string",
|
|
1312
|
-
"enum": [
|
|
1313
|
-
"user",
|
|
1314
|
-
"assistant"
|
|
1315
|
-
]
|
|
1273
|
+
"enum": ["user", "assistant"]
|
|
1316
1274
|
}
|
|
1317
1275
|
},
|
|
1318
1276
|
"priority": {
|
|
@@ -1359,10 +1317,7 @@
|
|
|
1359
1317
|
"type": "array",
|
|
1360
1318
|
"items": {
|
|
1361
1319
|
"type": "string",
|
|
1362
|
-
"enum": [
|
|
1363
|
-
"user",
|
|
1364
|
-
"assistant"
|
|
1365
|
-
]
|
|
1320
|
+
"enum": ["user", "assistant"]
|
|
1366
1321
|
}
|
|
1367
1322
|
},
|
|
1368
1323
|
"priority": {
|
|
@@ -1417,10 +1372,7 @@
|
|
|
1417
1372
|
},
|
|
1418
1373
|
"theme": {
|
|
1419
1374
|
"type": "string",
|
|
1420
|
-
"enum": [
|
|
1421
|
-
"light",
|
|
1422
|
-
"dark"
|
|
1423
|
-
]
|
|
1375
|
+
"enum": ["light", "dark"]
|
|
1424
1376
|
}
|
|
1425
1377
|
},
|
|
1426
1378
|
"required": ["src"],
|
|
@@ -1446,10 +1398,7 @@
|
|
|
1446
1398
|
"type": "array",
|
|
1447
1399
|
"items": {
|
|
1448
1400
|
"type": "string",
|
|
1449
|
-
"enum": [
|
|
1450
|
-
"user",
|
|
1451
|
-
"assistant"
|
|
1452
|
-
]
|
|
1401
|
+
"enum": ["user", "assistant"]
|
|
1453
1402
|
}
|
|
1454
1403
|
},
|
|
1455
1404
|
"priority": {
|
|
@@ -1542,10 +1491,7 @@
|
|
|
1542
1491
|
"type": "array",
|
|
1543
1492
|
"items": {
|
|
1544
1493
|
"type": "string",
|
|
1545
|
-
"enum": [
|
|
1546
|
-
"user",
|
|
1547
|
-
"assistant"
|
|
1548
|
-
]
|
|
1494
|
+
"enum": ["user", "assistant"]
|
|
1549
1495
|
}
|
|
1550
1496
|
},
|
|
1551
1497
|
"priority": {
|
|
@@ -1684,10 +1630,7 @@
|
|
|
1684
1630
|
"type": "array",
|
|
1685
1631
|
"items": {
|
|
1686
1632
|
"type": "string",
|
|
1687
|
-
"enum": [
|
|
1688
|
-
"user",
|
|
1689
|
-
"assistant"
|
|
1690
|
-
]
|
|
1633
|
+
"enum": ["user", "assistant"]
|
|
1691
1634
|
}
|
|
1692
1635
|
},
|
|
1693
1636
|
"priority": {
|
|
@@ -1734,10 +1677,7 @@
|
|
|
1734
1677
|
"type": "array",
|
|
1735
1678
|
"items": {
|
|
1736
1679
|
"type": "string",
|
|
1737
|
-
"enum": [
|
|
1738
|
-
"user",
|
|
1739
|
-
"assistant"
|
|
1740
|
-
]
|
|
1680
|
+
"enum": ["user", "assistant"]
|
|
1741
1681
|
}
|
|
1742
1682
|
},
|
|
1743
1683
|
"priority": {
|
|
@@ -1784,10 +1724,7 @@
|
|
|
1784
1724
|
"type": "array",
|
|
1785
1725
|
"items": {
|
|
1786
1726
|
"type": "string",
|
|
1787
|
-
"enum": [
|
|
1788
|
-
"user",
|
|
1789
|
-
"assistant"
|
|
1790
|
-
]
|
|
1727
|
+
"enum": ["user", "assistant"]
|
|
1791
1728
|
}
|
|
1792
1729
|
},
|
|
1793
1730
|
"priority": {
|
|
@@ -1842,10 +1779,7 @@
|
|
|
1842
1779
|
},
|
|
1843
1780
|
"theme": {
|
|
1844
1781
|
"type": "string",
|
|
1845
|
-
"enum": [
|
|
1846
|
-
"light",
|
|
1847
|
-
"dark"
|
|
1848
|
-
]
|
|
1782
|
+
"enum": ["light", "dark"]
|
|
1849
1783
|
}
|
|
1850
1784
|
},
|
|
1851
1785
|
"required": ["src"],
|
|
@@ -1871,10 +1805,7 @@
|
|
|
1871
1805
|
"type": "array",
|
|
1872
1806
|
"items": {
|
|
1873
1807
|
"type": "string",
|
|
1874
|
-
"enum": [
|
|
1875
|
-
"user",
|
|
1876
|
-
"assistant"
|
|
1877
|
-
]
|
|
1808
|
+
"enum": ["user", "assistant"]
|
|
1878
1809
|
}
|
|
1879
1810
|
},
|
|
1880
1811
|
"priority": {
|
|
@@ -1967,10 +1898,7 @@
|
|
|
1967
1898
|
"type": "array",
|
|
1968
1899
|
"items": {
|
|
1969
1900
|
"type": "string",
|
|
1970
|
-
"enum": [
|
|
1971
|
-
"user",
|
|
1972
|
-
"assistant"
|
|
1973
|
-
]
|
|
1901
|
+
"enum": ["user", "assistant"]
|
|
1974
1902
|
}
|
|
1975
1903
|
},
|
|
1976
1904
|
"priority": {
|