xmcp 0.5.9 → 0.6.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/dist/cli.js +9 -9
- package/dist/compiler/config/index.d.ts +1 -135
- package/dist/compiler/config/schemas/experimental/index.d.ts +0 -106
- package/dist/compiler/config/schemas/index.d.ts +0 -1
- package/dist/compiler/config/utils.d.ts +1 -2
- package/dist/index.d.ts +0 -1
- package/dist/index.js +1 -1
- package/dist/runtime/adapter-express.js +5 -5
- package/dist/runtime/adapter-nextjs.js +10 -10
- package/dist/runtime/http.js +8 -8
- package/package.json +1 -1
- package/dist/auth/oauth/factory.d.ts +0 -12
- package/dist/auth/oauth/index.d.ts +0 -5
- package/dist/auth/oauth/providers/proxy-provider.d.ts +0 -13
- package/dist/auth/oauth/router.d.ts +0 -4
- package/dist/auth/oauth/storage/memory-storage.d.ts +0 -12
- package/dist/auth/oauth/types.d.ts +0 -112
- package/dist/compiler/config/schemas/experimental/oauth.d.ts +0 -100
|
@@ -115,116 +115,10 @@ export declare const configSchema: z.ZodObject<{
|
|
|
115
115
|
} | undefined;
|
|
116
116
|
}>]>>;
|
|
117
117
|
experimental: z.ZodOptional<z.ZodObject<{
|
|
118
|
-
oauth: z.ZodOptional<z.ZodEffects<z.ZodObject<{
|
|
119
|
-
endpoints: z.ZodObject<{
|
|
120
|
-
authorizationUrl: z.ZodString;
|
|
121
|
-
tokenUrl: z.ZodString;
|
|
122
|
-
revocationUrl: z.ZodOptional<z.ZodString>;
|
|
123
|
-
userInfoUrl: z.ZodOptional<z.ZodString>;
|
|
124
|
-
registerUrl: z.ZodString;
|
|
125
|
-
}, "strip", z.ZodTypeAny, {
|
|
126
|
-
authorizationUrl: string;
|
|
127
|
-
tokenUrl: string;
|
|
128
|
-
registerUrl: string;
|
|
129
|
-
revocationUrl?: string | undefined;
|
|
130
|
-
userInfoUrl?: string | undefined;
|
|
131
|
-
}, {
|
|
132
|
-
authorizationUrl: string;
|
|
133
|
-
tokenUrl: string;
|
|
134
|
-
registerUrl: string;
|
|
135
|
-
revocationUrl?: string | undefined;
|
|
136
|
-
userInfoUrl?: string | undefined;
|
|
137
|
-
}>;
|
|
138
|
-
issuerUrl: z.ZodString;
|
|
139
|
-
baseUrl: z.ZodString;
|
|
140
|
-
serviceDocumentationUrl: z.ZodOptional<z.ZodString>;
|
|
141
|
-
pathPrefix: z.ZodOptional<z.ZodString>;
|
|
142
|
-
defaultScopes: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
|
|
143
|
-
}, "strip", z.ZodTypeAny, {
|
|
144
|
-
endpoints: {
|
|
145
|
-
authorizationUrl: string;
|
|
146
|
-
tokenUrl: string;
|
|
147
|
-
registerUrl: string;
|
|
148
|
-
revocationUrl?: string | undefined;
|
|
149
|
-
userInfoUrl?: string | undefined;
|
|
150
|
-
};
|
|
151
|
-
issuerUrl: string;
|
|
152
|
-
baseUrl: string;
|
|
153
|
-
serviceDocumentationUrl?: string | undefined;
|
|
154
|
-
pathPrefix?: string | undefined;
|
|
155
|
-
defaultScopes?: string[] | undefined;
|
|
156
|
-
}, {
|
|
157
|
-
endpoints: {
|
|
158
|
-
authorizationUrl: string;
|
|
159
|
-
tokenUrl: string;
|
|
160
|
-
registerUrl: string;
|
|
161
|
-
revocationUrl?: string | undefined;
|
|
162
|
-
userInfoUrl?: string | undefined;
|
|
163
|
-
};
|
|
164
|
-
issuerUrl: string;
|
|
165
|
-
baseUrl: string;
|
|
166
|
-
serviceDocumentationUrl?: string | undefined;
|
|
167
|
-
pathPrefix?: string | undefined;
|
|
168
|
-
defaultScopes?: string[] | undefined;
|
|
169
|
-
}>, {
|
|
170
|
-
endpoints: {
|
|
171
|
-
authorizationUrl: string;
|
|
172
|
-
tokenUrl: string;
|
|
173
|
-
registerUrl: string;
|
|
174
|
-
revocationUrl?: string | undefined;
|
|
175
|
-
userInfoUrl?: string | undefined;
|
|
176
|
-
};
|
|
177
|
-
issuerUrl: string;
|
|
178
|
-
baseUrl: string;
|
|
179
|
-
pathPrefix: string;
|
|
180
|
-
defaultScopes: string[];
|
|
181
|
-
serviceDocumentationUrl?: string | undefined;
|
|
182
|
-
}, {
|
|
183
|
-
endpoints: {
|
|
184
|
-
authorizationUrl: string;
|
|
185
|
-
tokenUrl: string;
|
|
186
|
-
registerUrl: string;
|
|
187
|
-
revocationUrl?: string | undefined;
|
|
188
|
-
userInfoUrl?: string | undefined;
|
|
189
|
-
};
|
|
190
|
-
issuerUrl: string;
|
|
191
|
-
baseUrl: string;
|
|
192
|
-
serviceDocumentationUrl?: string | undefined;
|
|
193
|
-
pathPrefix?: string | undefined;
|
|
194
|
-
defaultScopes?: string[] | undefined;
|
|
195
|
-
}>>;
|
|
196
118
|
adapter: z.ZodOptional<z.ZodEnum<["express", "nextjs"]>>;
|
|
197
119
|
}, "strip", z.ZodTypeAny, {
|
|
198
|
-
oauth?: {
|
|
199
|
-
endpoints: {
|
|
200
|
-
authorizationUrl: string;
|
|
201
|
-
tokenUrl: string;
|
|
202
|
-
registerUrl: string;
|
|
203
|
-
revocationUrl?: string | undefined;
|
|
204
|
-
userInfoUrl?: string | undefined;
|
|
205
|
-
};
|
|
206
|
-
issuerUrl: string;
|
|
207
|
-
baseUrl: string;
|
|
208
|
-
pathPrefix: string;
|
|
209
|
-
defaultScopes: string[];
|
|
210
|
-
serviceDocumentationUrl?: string | undefined;
|
|
211
|
-
} | undefined;
|
|
212
120
|
adapter?: "express" | "nextjs" | undefined;
|
|
213
121
|
}, {
|
|
214
|
-
oauth?: {
|
|
215
|
-
endpoints: {
|
|
216
|
-
authorizationUrl: string;
|
|
217
|
-
tokenUrl: string;
|
|
218
|
-
registerUrl: string;
|
|
219
|
-
revocationUrl?: string | undefined;
|
|
220
|
-
userInfoUrl?: string | undefined;
|
|
221
|
-
};
|
|
222
|
-
issuerUrl: string;
|
|
223
|
-
baseUrl: string;
|
|
224
|
-
serviceDocumentationUrl?: string | undefined;
|
|
225
|
-
pathPrefix?: string | undefined;
|
|
226
|
-
defaultScopes?: string[] | undefined;
|
|
227
|
-
} | undefined;
|
|
228
122
|
adapter?: "express" | "nextjs" | undefined;
|
|
229
123
|
}>>;
|
|
230
124
|
paths: z.ZodOptional<z.ZodEffects<z.ZodObject<{
|
|
@@ -301,20 +195,6 @@ export declare const configSchema: z.ZodObject<{
|
|
|
301
195
|
};
|
|
302
196
|
} | undefined;
|
|
303
197
|
experimental?: {
|
|
304
|
-
oauth?: {
|
|
305
|
-
endpoints: {
|
|
306
|
-
authorizationUrl: string;
|
|
307
|
-
tokenUrl: string;
|
|
308
|
-
registerUrl: string;
|
|
309
|
-
revocationUrl?: string | undefined;
|
|
310
|
-
userInfoUrl?: string | undefined;
|
|
311
|
-
};
|
|
312
|
-
issuerUrl: string;
|
|
313
|
-
baseUrl: string;
|
|
314
|
-
pathPrefix: string;
|
|
315
|
-
defaultScopes: string[];
|
|
316
|
-
serviceDocumentationUrl?: string | undefined;
|
|
317
|
-
} | undefined;
|
|
318
198
|
adapter?: "express" | "nextjs" | undefined;
|
|
319
199
|
} | undefined;
|
|
320
200
|
paths?: {
|
|
@@ -351,20 +231,6 @@ export declare const configSchema: z.ZodObject<{
|
|
|
351
231
|
} | undefined;
|
|
352
232
|
} | undefined;
|
|
353
233
|
experimental?: {
|
|
354
|
-
oauth?: {
|
|
355
|
-
endpoints: {
|
|
356
|
-
authorizationUrl: string;
|
|
357
|
-
tokenUrl: string;
|
|
358
|
-
registerUrl: string;
|
|
359
|
-
revocationUrl?: string | undefined;
|
|
360
|
-
userInfoUrl?: string | undefined;
|
|
361
|
-
};
|
|
362
|
-
issuerUrl: string;
|
|
363
|
-
baseUrl: string;
|
|
364
|
-
serviceDocumentationUrl?: string | undefined;
|
|
365
|
-
pathPrefix?: string | undefined;
|
|
366
|
-
defaultScopes?: string[] | undefined;
|
|
367
|
-
} | undefined;
|
|
368
234
|
adapter?: "express" | "nextjs" | undefined;
|
|
369
235
|
} | undefined;
|
|
370
236
|
paths?: {
|
|
@@ -388,4 +254,4 @@ type BundlerConfigType = {
|
|
|
388
254
|
export type XmcpConfigInputSchema = Omit<z.input<typeof configSchema>, "bundler"> & BundlerConfigType;
|
|
389
255
|
export type XmcpConfigOutputSchema = Omit<z.output<typeof configSchema>, "bundler"> & BundlerConfigType;
|
|
390
256
|
export type { ResolvedHttpConfig, ResolvedStdioConfig, ResolvedPathsConfig, ResolvedExperimentalConfig, } from "./utils";
|
|
391
|
-
export type { HttpTransportConfig, StdioTransportConfig, CorsConfig,
|
|
257
|
+
export type { HttpTransportConfig, StdioTransportConfig, CorsConfig, ExperimentalConfig, PathsConfig, BundlerConfig, TemplateConfig, TypescriptConfig, } from "./schemas";
|
|
@@ -2,116 +2,10 @@ import { z } from "zod/v3";
|
|
|
2
2
|
export declare const adapterConfigSchema: z.ZodEnum<["express", "nextjs"]>;
|
|
3
3
|
export type AdapterConfig = z.infer<typeof adapterConfigSchema>;
|
|
4
4
|
export declare const experimentalConfigSchema: z.ZodObject<{
|
|
5
|
-
oauth: z.ZodOptional<z.ZodEffects<z.ZodObject<{
|
|
6
|
-
endpoints: z.ZodObject<{
|
|
7
|
-
authorizationUrl: z.ZodString;
|
|
8
|
-
tokenUrl: z.ZodString;
|
|
9
|
-
revocationUrl: z.ZodOptional<z.ZodString>;
|
|
10
|
-
userInfoUrl: z.ZodOptional<z.ZodString>;
|
|
11
|
-
registerUrl: z.ZodString;
|
|
12
|
-
}, "strip", z.ZodTypeAny, {
|
|
13
|
-
authorizationUrl: string;
|
|
14
|
-
tokenUrl: string;
|
|
15
|
-
registerUrl: string;
|
|
16
|
-
revocationUrl?: string | undefined;
|
|
17
|
-
userInfoUrl?: string | undefined;
|
|
18
|
-
}, {
|
|
19
|
-
authorizationUrl: string;
|
|
20
|
-
tokenUrl: string;
|
|
21
|
-
registerUrl: string;
|
|
22
|
-
revocationUrl?: string | undefined;
|
|
23
|
-
userInfoUrl?: string | undefined;
|
|
24
|
-
}>;
|
|
25
|
-
issuerUrl: z.ZodString;
|
|
26
|
-
baseUrl: z.ZodString;
|
|
27
|
-
serviceDocumentationUrl: z.ZodOptional<z.ZodString>;
|
|
28
|
-
pathPrefix: z.ZodOptional<z.ZodString>;
|
|
29
|
-
defaultScopes: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
|
|
30
|
-
}, "strip", z.ZodTypeAny, {
|
|
31
|
-
endpoints: {
|
|
32
|
-
authorizationUrl: string;
|
|
33
|
-
tokenUrl: string;
|
|
34
|
-
registerUrl: string;
|
|
35
|
-
revocationUrl?: string | undefined;
|
|
36
|
-
userInfoUrl?: string | undefined;
|
|
37
|
-
};
|
|
38
|
-
issuerUrl: string;
|
|
39
|
-
baseUrl: string;
|
|
40
|
-
serviceDocumentationUrl?: string | undefined;
|
|
41
|
-
pathPrefix?: string | undefined;
|
|
42
|
-
defaultScopes?: string[] | undefined;
|
|
43
|
-
}, {
|
|
44
|
-
endpoints: {
|
|
45
|
-
authorizationUrl: string;
|
|
46
|
-
tokenUrl: string;
|
|
47
|
-
registerUrl: string;
|
|
48
|
-
revocationUrl?: string | undefined;
|
|
49
|
-
userInfoUrl?: string | undefined;
|
|
50
|
-
};
|
|
51
|
-
issuerUrl: string;
|
|
52
|
-
baseUrl: string;
|
|
53
|
-
serviceDocumentationUrl?: string | undefined;
|
|
54
|
-
pathPrefix?: string | undefined;
|
|
55
|
-
defaultScopes?: string[] | undefined;
|
|
56
|
-
}>, {
|
|
57
|
-
endpoints: {
|
|
58
|
-
authorizationUrl: string;
|
|
59
|
-
tokenUrl: string;
|
|
60
|
-
registerUrl: string;
|
|
61
|
-
revocationUrl?: string | undefined;
|
|
62
|
-
userInfoUrl?: string | undefined;
|
|
63
|
-
};
|
|
64
|
-
issuerUrl: string;
|
|
65
|
-
baseUrl: string;
|
|
66
|
-
pathPrefix: string;
|
|
67
|
-
defaultScopes: string[];
|
|
68
|
-
serviceDocumentationUrl?: string | undefined;
|
|
69
|
-
}, {
|
|
70
|
-
endpoints: {
|
|
71
|
-
authorizationUrl: string;
|
|
72
|
-
tokenUrl: string;
|
|
73
|
-
registerUrl: string;
|
|
74
|
-
revocationUrl?: string | undefined;
|
|
75
|
-
userInfoUrl?: string | undefined;
|
|
76
|
-
};
|
|
77
|
-
issuerUrl: string;
|
|
78
|
-
baseUrl: string;
|
|
79
|
-
serviceDocumentationUrl?: string | undefined;
|
|
80
|
-
pathPrefix?: string | undefined;
|
|
81
|
-
defaultScopes?: string[] | undefined;
|
|
82
|
-
}>>;
|
|
83
5
|
adapter: z.ZodOptional<z.ZodEnum<["express", "nextjs"]>>;
|
|
84
6
|
}, "strip", z.ZodTypeAny, {
|
|
85
|
-
oauth?: {
|
|
86
|
-
endpoints: {
|
|
87
|
-
authorizationUrl: string;
|
|
88
|
-
tokenUrl: string;
|
|
89
|
-
registerUrl: string;
|
|
90
|
-
revocationUrl?: string | undefined;
|
|
91
|
-
userInfoUrl?: string | undefined;
|
|
92
|
-
};
|
|
93
|
-
issuerUrl: string;
|
|
94
|
-
baseUrl: string;
|
|
95
|
-
pathPrefix: string;
|
|
96
|
-
defaultScopes: string[];
|
|
97
|
-
serviceDocumentationUrl?: string | undefined;
|
|
98
|
-
} | undefined;
|
|
99
7
|
adapter?: "express" | "nextjs" | undefined;
|
|
100
8
|
}, {
|
|
101
|
-
oauth?: {
|
|
102
|
-
endpoints: {
|
|
103
|
-
authorizationUrl: string;
|
|
104
|
-
tokenUrl: string;
|
|
105
|
-
registerUrl: string;
|
|
106
|
-
revocationUrl?: string | undefined;
|
|
107
|
-
userInfoUrl?: string | undefined;
|
|
108
|
-
};
|
|
109
|
-
issuerUrl: string;
|
|
110
|
-
baseUrl: string;
|
|
111
|
-
serviceDocumentationUrl?: string | undefined;
|
|
112
|
-
pathPrefix?: string | undefined;
|
|
113
|
-
defaultScopes?: string[] | undefined;
|
|
114
|
-
} | undefined;
|
|
115
9
|
adapter?: "express" | "nextjs" | undefined;
|
|
116
10
|
}>;
|
|
117
11
|
export type ExperimentalConfig = z.infer<typeof experimentalConfigSchema>;
|
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
export { httpTransportConfigSchema, corsConfigSchema, type HttpTransportConfig, type CorsConfig, } from "./transport/http";
|
|
2
2
|
export { stdioTransportConfigSchema, type StdioTransportConfig, } from "./transport/stdio";
|
|
3
|
-
export { oauthConfigSchema, type OAuthConfig } from "./experimental/oauth";
|
|
4
3
|
export { experimentalConfigSchema, type ExperimentalConfig, type AdapterConfig, } from "./experimental";
|
|
5
4
|
export { pathsConfigSchema, type PathsConfig, DEFAULT_PATHS } from "./paths";
|
|
6
5
|
export { bundlerConfigSchema, type BundlerConfig } from "./bundler";
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type { HttpTransportConfig } from "./schemas";
|
|
2
|
-
import { httpTransportConfigSchema, stdioTransportConfigSchema, templateConfigSchema, typescriptConfigSchema, corsConfigSchema,
|
|
2
|
+
import { httpTransportConfigSchema, stdioTransportConfigSchema, templateConfigSchema, typescriptConfigSchema, corsConfigSchema, experimentalConfigSchema } from "./schemas";
|
|
3
3
|
import type { z } from "zod/v3";
|
|
4
4
|
import type { XmcpConfigOutputSchema } from "./index";
|
|
5
5
|
import type { CorsConfig } from "./schemas";
|
|
@@ -14,7 +14,6 @@ export type ResolvedPathsConfig = {
|
|
|
14
14
|
resources: string | null;
|
|
15
15
|
};
|
|
16
16
|
export declare function getResolvedPathsConfig(userConfig: XmcpConfigOutputSchema): ResolvedPathsConfig;
|
|
17
|
-
export declare function getResolvedOAuthConfig(userConfig: XmcpConfigOutputSchema): z.output<typeof oauthConfigSchema> | null;
|
|
18
17
|
export type ResolvedStdioConfig = Extract<z.output<typeof stdioTransportConfigSchema>, object> | null;
|
|
19
18
|
export declare function getResolvedStdioConfig(userConfig: XmcpConfigOutputSchema): ResolvedStdioConfig;
|
|
20
19
|
export declare function getResolvedTemplateConfig(userConfig: XmcpConfigOutputSchema): z.output<typeof templateConfigSchema>;
|
package/dist/index.d.ts
CHANGED
|
@@ -4,7 +4,6 @@ export type { PromptMetadata } from "./types/prompt";
|
|
|
4
4
|
export type { ResourceMetadata } from "./types/resource";
|
|
5
5
|
export type { OpenAIMetadata, OpenAIToolInvocation } from "./types/openai-meta";
|
|
6
6
|
export type { XmcpConfigInputSchema as XmcpConfig } from "./compiler/config";
|
|
7
|
-
export type { OAuthConfigOptions } from "./auth/oauth";
|
|
8
7
|
import "./types/declarations";
|
|
9
8
|
export { apiKeyAuthMiddleware } from "./auth/api-key";
|
|
10
9
|
export { jwtAuthMiddleware } from "./auth/jwt";
|