@myagentroam/protocol 0.9.62 → 0.9.64

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/mcp.d.ts ADDED
@@ -0,0 +1,438 @@
1
+ import { z } from 'zod';
2
+ export declare const mcpSourceInputSchema: z.ZodEffects<z.ZodObject<{
3
+ scope: z.ZodEnum<["ENTERPRISE", "ORGANIZATION", "PERSONAL"]>;
4
+ organizationId: z.ZodOptional<z.ZodNumber>;
5
+ name: z.ZodString;
6
+ locator: z.ZodEffects<z.ZodString, string, string>;
7
+ enabled: z.ZodOptional<z.ZodBoolean>;
8
+ }, "strict", z.ZodTypeAny, {
9
+ name: string;
10
+ scope: "PERSONAL" | "ENTERPRISE" | "ORGANIZATION";
11
+ locator: string;
12
+ organizationId?: number | undefined;
13
+ enabled?: boolean | undefined;
14
+ }, {
15
+ name: string;
16
+ scope: "PERSONAL" | "ENTERPRISE" | "ORGANIZATION";
17
+ locator: string;
18
+ organizationId?: number | undefined;
19
+ enabled?: boolean | undefined;
20
+ }>, {
21
+ name: string;
22
+ scope: "PERSONAL" | "ENTERPRISE" | "ORGANIZATION";
23
+ locator: string;
24
+ organizationId?: number | undefined;
25
+ enabled?: boolean | undefined;
26
+ }, {
27
+ name: string;
28
+ scope: "PERSONAL" | "ENTERPRISE" | "ORGANIZATION";
29
+ locator: string;
30
+ organizationId?: number | undefined;
31
+ enabled?: boolean | undefined;
32
+ }>;
33
+ export type McpSourceInput = z.infer<typeof mcpSourceInputSchema>;
34
+ export declare const mcpRuntimeDescriptorSchema: z.ZodDiscriminatedUnion<"transport", [z.ZodObject<{
35
+ transport: z.ZodLiteral<"STDIO">;
36
+ command: z.ZodString;
37
+ args: z.ZodDefault<z.ZodArray<z.ZodString, "many">>;
38
+ environment: z.ZodOptional<z.ZodDefault<z.ZodRecord<z.ZodString, z.ZodObject<{
39
+ secretName: z.ZodString;
40
+ }, "strict", z.ZodTypeAny, {
41
+ secretName: string;
42
+ }, {
43
+ secretName: string;
44
+ }>>>>;
45
+ }, "strict", z.ZodTypeAny, {
46
+ transport: "STDIO";
47
+ command: string;
48
+ args: string[];
49
+ environment?: Record<string, {
50
+ secretName: string;
51
+ }> | undefined;
52
+ }, {
53
+ transport: "STDIO";
54
+ command: string;
55
+ args?: string[] | undefined;
56
+ environment?: Record<string, {
57
+ secretName: string;
58
+ }> | undefined;
59
+ }>, z.ZodObject<{
60
+ transport: z.ZodLiteral<"HTTP">;
61
+ url: z.ZodEffects<z.ZodString, string, string>;
62
+ headers: z.ZodOptional<z.ZodDefault<z.ZodRecord<z.ZodString, z.ZodObject<{
63
+ secretName: z.ZodString;
64
+ }, "strict", z.ZodTypeAny, {
65
+ secretName: string;
66
+ }, {
67
+ secretName: string;
68
+ }>>>>;
69
+ }, "strict", z.ZodTypeAny, {
70
+ transport: "HTTP";
71
+ url: string;
72
+ headers?: Record<string, {
73
+ secretName: string;
74
+ }> | undefined;
75
+ }, {
76
+ transport: "HTTP";
77
+ url: string;
78
+ headers?: Record<string, {
79
+ secretName: string;
80
+ }> | undefined;
81
+ }>]>;
82
+ export type McpRuntimeDescriptor = z.infer<typeof mcpRuntimeDescriptorSchema>;
83
+ export declare const mcpCatalogEntrySchema: z.ZodEffects<z.ZodObject<{
84
+ id: z.ZodString;
85
+ sourceId: z.ZodString;
86
+ scope: z.ZodEnum<["ENTERPRISE", "ORGANIZATION", "PERSONAL"]>;
87
+ ownerOrganizationId: z.ZodOptional<z.ZodNumber>;
88
+ ownerUserId: z.ZodOptional<z.ZodNumber>;
89
+ serverName: z.ZodString;
90
+ displayName: z.ZodString;
91
+ description: z.ZodString;
92
+ version: z.ZodEffects<z.ZodString, string, string>;
93
+ featured: z.ZodBoolean;
94
+ tags: z.ZodArray<z.ZodString, "many">;
95
+ runtime: z.ZodDiscriminatedUnion<"transport", [z.ZodObject<{
96
+ transport: z.ZodLiteral<"STDIO">;
97
+ command: z.ZodString;
98
+ args: z.ZodDefault<z.ZodArray<z.ZodString, "many">>;
99
+ environment: z.ZodOptional<z.ZodDefault<z.ZodRecord<z.ZodString, z.ZodObject<{
100
+ secretName: z.ZodString;
101
+ }, "strict", z.ZodTypeAny, {
102
+ secretName: string;
103
+ }, {
104
+ secretName: string;
105
+ }>>>>;
106
+ }, "strict", z.ZodTypeAny, {
107
+ transport: "STDIO";
108
+ command: string;
109
+ args: string[];
110
+ environment?: Record<string, {
111
+ secretName: string;
112
+ }> | undefined;
113
+ }, {
114
+ transport: "STDIO";
115
+ command: string;
116
+ args?: string[] | undefined;
117
+ environment?: Record<string, {
118
+ secretName: string;
119
+ }> | undefined;
120
+ }>, z.ZodObject<{
121
+ transport: z.ZodLiteral<"HTTP">;
122
+ url: z.ZodEffects<z.ZodString, string, string>;
123
+ headers: z.ZodOptional<z.ZodDefault<z.ZodRecord<z.ZodString, z.ZodObject<{
124
+ secretName: z.ZodString;
125
+ }, "strict", z.ZodTypeAny, {
126
+ secretName: string;
127
+ }, {
128
+ secretName: string;
129
+ }>>>>;
130
+ }, "strict", z.ZodTypeAny, {
131
+ transport: "HTTP";
132
+ url: string;
133
+ headers?: Record<string, {
134
+ secretName: string;
135
+ }> | undefined;
136
+ }, {
137
+ transport: "HTTP";
138
+ url: string;
139
+ headers?: Record<string, {
140
+ secretName: string;
141
+ }> | undefined;
142
+ }>]>;
143
+ createdAt: z.ZodNumber;
144
+ updatedAt: z.ZodNumber;
145
+ }, "strict", z.ZodTypeAny, {
146
+ id: string;
147
+ createdAt: number;
148
+ updatedAt: number;
149
+ displayName: string;
150
+ scope: "PERSONAL" | "ENTERPRISE" | "ORGANIZATION";
151
+ sourceId: string;
152
+ featured: boolean;
153
+ tags: string[];
154
+ description: string;
155
+ serverName: string;
156
+ version: string;
157
+ runtime: {
158
+ transport: "STDIO";
159
+ command: string;
160
+ args: string[];
161
+ environment?: Record<string, {
162
+ secretName: string;
163
+ }> | undefined;
164
+ } | {
165
+ transport: "HTTP";
166
+ url: string;
167
+ headers?: Record<string, {
168
+ secretName: string;
169
+ }> | undefined;
170
+ };
171
+ ownerUserId?: number | undefined;
172
+ ownerOrganizationId?: number | undefined;
173
+ }, {
174
+ id: string;
175
+ createdAt: number;
176
+ updatedAt: number;
177
+ displayName: string;
178
+ scope: "PERSONAL" | "ENTERPRISE" | "ORGANIZATION";
179
+ sourceId: string;
180
+ featured: boolean;
181
+ tags: string[];
182
+ description: string;
183
+ serverName: string;
184
+ version: string;
185
+ runtime: {
186
+ transport: "STDIO";
187
+ command: string;
188
+ args?: string[] | undefined;
189
+ environment?: Record<string, {
190
+ secretName: string;
191
+ }> | undefined;
192
+ } | {
193
+ transport: "HTTP";
194
+ url: string;
195
+ headers?: Record<string, {
196
+ secretName: string;
197
+ }> | undefined;
198
+ };
199
+ ownerUserId?: number | undefined;
200
+ ownerOrganizationId?: number | undefined;
201
+ }>, {
202
+ id: string;
203
+ createdAt: number;
204
+ updatedAt: number;
205
+ displayName: string;
206
+ scope: "PERSONAL" | "ENTERPRISE" | "ORGANIZATION";
207
+ sourceId: string;
208
+ featured: boolean;
209
+ tags: string[];
210
+ description: string;
211
+ serverName: string;
212
+ version: string;
213
+ runtime: {
214
+ transport: "STDIO";
215
+ command: string;
216
+ args: string[];
217
+ environment?: Record<string, {
218
+ secretName: string;
219
+ }> | undefined;
220
+ } | {
221
+ transport: "HTTP";
222
+ url: string;
223
+ headers?: Record<string, {
224
+ secretName: string;
225
+ }> | undefined;
226
+ };
227
+ ownerUserId?: number | undefined;
228
+ ownerOrganizationId?: number | undefined;
229
+ }, {
230
+ id: string;
231
+ createdAt: number;
232
+ updatedAt: number;
233
+ displayName: string;
234
+ scope: "PERSONAL" | "ENTERPRISE" | "ORGANIZATION";
235
+ sourceId: string;
236
+ featured: boolean;
237
+ tags: string[];
238
+ description: string;
239
+ serverName: string;
240
+ version: string;
241
+ runtime: {
242
+ transport: "STDIO";
243
+ command: string;
244
+ args?: string[] | undefined;
245
+ environment?: Record<string, {
246
+ secretName: string;
247
+ }> | undefined;
248
+ } | {
249
+ transport: "HTTP";
250
+ url: string;
251
+ headers?: Record<string, {
252
+ secretName: string;
253
+ }> | undefined;
254
+ };
255
+ ownerUserId?: number | undefined;
256
+ ownerOrganizationId?: number | undefined;
257
+ }>;
258
+ export type McpCatalogEntry = z.infer<typeof mcpCatalogEntrySchema>;
259
+ export declare const mcpInstallationConfigurationSchema: z.ZodObject<{
260
+ arguments: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
261
+ environment: z.ZodOptional<z.ZodDefault<z.ZodRecord<z.ZodString, z.ZodObject<{
262
+ secretName: z.ZodString;
263
+ }, "strict", z.ZodTypeAny, {
264
+ secretName: string;
265
+ }, {
266
+ secretName: string;
267
+ }>>>>;
268
+ headers: z.ZodOptional<z.ZodDefault<z.ZodRecord<z.ZodString, z.ZodObject<{
269
+ secretName: z.ZodString;
270
+ }, "strict", z.ZodTypeAny, {
271
+ secretName: string;
272
+ }, {
273
+ secretName: string;
274
+ }>>>>;
275
+ }, "strict", z.ZodTypeAny, {
276
+ environment?: Record<string, {
277
+ secretName: string;
278
+ }> | undefined;
279
+ headers?: Record<string, {
280
+ secretName: string;
281
+ }> | undefined;
282
+ arguments?: string[] | undefined;
283
+ }, {
284
+ environment?: Record<string, {
285
+ secretName: string;
286
+ }> | undefined;
287
+ headers?: Record<string, {
288
+ secretName: string;
289
+ }> | undefined;
290
+ arguments?: string[] | undefined;
291
+ }>;
292
+ export type McpInstallationConfiguration = z.infer<typeof mcpInstallationConfigurationSchema>;
293
+ export declare const mcpInstallationInputSchema: z.ZodObject<{
294
+ catalogEntryId: z.ZodString;
295
+ enabled: z.ZodDefault<z.ZodBoolean>;
296
+ configuration: z.ZodDefault<z.ZodObject<{
297
+ arguments: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
298
+ environment: z.ZodOptional<z.ZodDefault<z.ZodRecord<z.ZodString, z.ZodObject<{
299
+ secretName: z.ZodString;
300
+ }, "strict", z.ZodTypeAny, {
301
+ secretName: string;
302
+ }, {
303
+ secretName: string;
304
+ }>>>>;
305
+ headers: z.ZodOptional<z.ZodDefault<z.ZodRecord<z.ZodString, z.ZodObject<{
306
+ secretName: z.ZodString;
307
+ }, "strict", z.ZodTypeAny, {
308
+ secretName: string;
309
+ }, {
310
+ secretName: string;
311
+ }>>>>;
312
+ }, "strict", z.ZodTypeAny, {
313
+ environment?: Record<string, {
314
+ secretName: string;
315
+ }> | undefined;
316
+ headers?: Record<string, {
317
+ secretName: string;
318
+ }> | undefined;
319
+ arguments?: string[] | undefined;
320
+ }, {
321
+ environment?: Record<string, {
322
+ secretName: string;
323
+ }> | undefined;
324
+ headers?: Record<string, {
325
+ secretName: string;
326
+ }> | undefined;
327
+ arguments?: string[] | undefined;
328
+ }>>;
329
+ }, "strict", z.ZodTypeAny, {
330
+ enabled: boolean;
331
+ catalogEntryId: string;
332
+ configuration: {
333
+ environment?: Record<string, {
334
+ secretName: string;
335
+ }> | undefined;
336
+ headers?: Record<string, {
337
+ secretName: string;
338
+ }> | undefined;
339
+ arguments?: string[] | undefined;
340
+ };
341
+ }, {
342
+ catalogEntryId: string;
343
+ enabled?: boolean | undefined;
344
+ configuration?: {
345
+ environment?: Record<string, {
346
+ secretName: string;
347
+ }> | undefined;
348
+ headers?: Record<string, {
349
+ secretName: string;
350
+ }> | undefined;
351
+ arguments?: string[] | undefined;
352
+ } | undefined;
353
+ }>;
354
+ export type McpInstallationInput = z.infer<typeof mcpInstallationInputSchema>;
355
+ export declare const installedMcpSchema: z.ZodObject<{
356
+ catalogEntryId: z.ZodString;
357
+ serverName: z.ZodString;
358
+ displayName: z.ZodString;
359
+ version: z.ZodString;
360
+ origin: z.ZodEnum<["NODE", "WORKSPACE"]>;
361
+ enabled: z.ZodBoolean;
362
+ status: z.ZodEnum<["CURRENT", "UPDATE_AVAILABLE", "INVALID", "UNAVAILABLE"]>;
363
+ installedAt: z.ZodNumber;
364
+ }, "strict", z.ZodTypeAny, {
365
+ status: "CURRENT" | "UPDATE_AVAILABLE" | "INVALID" | "UNAVAILABLE";
366
+ displayName: string;
367
+ enabled: boolean;
368
+ installedAt: number;
369
+ serverName: string;
370
+ version: string;
371
+ catalogEntryId: string;
372
+ origin: "NODE" | "WORKSPACE";
373
+ }, {
374
+ status: "CURRENT" | "UPDATE_AVAILABLE" | "INVALID" | "UNAVAILABLE";
375
+ displayName: string;
376
+ enabled: boolean;
377
+ installedAt: number;
378
+ serverName: string;
379
+ version: string;
380
+ catalogEntryId: string;
381
+ origin: "NODE" | "WORKSPACE";
382
+ }>;
383
+ export declare const mcpTargetInspectionSchema: z.ZodObject<{
384
+ targetKind: z.ZodEnum<["NODE", "WORKSPACE"]>;
385
+ installations: z.ZodArray<z.ZodObject<{
386
+ catalogEntryId: z.ZodString;
387
+ serverName: z.ZodString;
388
+ displayName: z.ZodString;
389
+ version: z.ZodString;
390
+ origin: z.ZodEnum<["NODE", "WORKSPACE"]>;
391
+ enabled: z.ZodBoolean;
392
+ status: z.ZodEnum<["CURRENT", "UPDATE_AVAILABLE", "INVALID", "UNAVAILABLE"]>;
393
+ installedAt: z.ZodNumber;
394
+ }, "strict", z.ZodTypeAny, {
395
+ status: "CURRENT" | "UPDATE_AVAILABLE" | "INVALID" | "UNAVAILABLE";
396
+ displayName: string;
397
+ enabled: boolean;
398
+ installedAt: number;
399
+ serverName: string;
400
+ version: string;
401
+ catalogEntryId: string;
402
+ origin: "NODE" | "WORKSPACE";
403
+ }, {
404
+ status: "CURRENT" | "UPDATE_AVAILABLE" | "INVALID" | "UNAVAILABLE";
405
+ displayName: string;
406
+ enabled: boolean;
407
+ installedAt: number;
408
+ serverName: string;
409
+ version: string;
410
+ catalogEntryId: string;
411
+ origin: "NODE" | "WORKSPACE";
412
+ }>, "many">;
413
+ }, "strict", z.ZodTypeAny, {
414
+ targetKind: "NODE" | "WORKSPACE";
415
+ installations: {
416
+ status: "CURRENT" | "UPDATE_AVAILABLE" | "INVALID" | "UNAVAILABLE";
417
+ displayName: string;
418
+ enabled: boolean;
419
+ installedAt: number;
420
+ serverName: string;
421
+ version: string;
422
+ catalogEntryId: string;
423
+ origin: "NODE" | "WORKSPACE";
424
+ }[];
425
+ }, {
426
+ targetKind: "NODE" | "WORKSPACE";
427
+ installations: {
428
+ status: "CURRENT" | "UPDATE_AVAILABLE" | "INVALID" | "UNAVAILABLE";
429
+ displayName: string;
430
+ enabled: boolean;
431
+ installedAt: number;
432
+ serverName: string;
433
+ version: string;
434
+ catalogEntryId: string;
435
+ origin: "NODE" | "WORKSPACE";
436
+ }[];
437
+ }>;
438
+ export type McpTargetInspection = z.infer<typeof mcpTargetInspectionSchema>;
package/dist/mcp.js CHANGED
@@ -1,2 +1,141 @@
1
- /* mar-release-protected */
2
- const _0x130bbc=_0x2f33;(function(_0xbcbe22,_0x49f0ca){const _0x51d315=_0x2f33,_0x135b29=_0xbcbe22();while(!![]){try{const _0xeb9c47=-parseInt(_0x51d315(0x206))/(-0x39a+-0x484+0x81f)+-parseInt(_0x51d315(0x20b))/(-0x5b4*-0x2+0x35f*-0x2+-0x2*0x254)+-parseInt(_0x51d315(0x1f3))/(0x945+0xd68+-0x2*0xb55)*(-parseInt(_0x51d315(0x1ef))/(-0x2d5*-0xb+-0x56*-0x5f+-0x3f0d))+parseInt(_0x51d315(0x1ff))/(-0x10df*0x1+0x1b84+-0x11*0xa0)+-parseInt(_0x51d315(0x1fb))/(0x201d+0x1007+-0x805*0x6)+parseInt(_0x51d315(0x217))/(-0x8b4*-0x1+-0x19dd*0x1+0x1130)+-parseInt(_0x51d315(0x209))/(0x16b1*-0x1+-0x20e4+0x379d)*(-parseInt(_0x51d315(0x223))/(0x131c*-0x1+-0x13e1+-0x456*-0x9));if(_0xeb9c47===_0x49f0ca)break;else _0x135b29['push'](_0x135b29['shift']());}catch(_0xe29b6e){_0x135b29['push'](_0x135b29['shift']());}}}(_0x2763,0xa637c*0x1+-0x2*0x12cc5+-0x1383f));function _0x2763(){const _0x466ffb=['C3rYAw5N','su5wquXjra','B2jQzwn0','t1jhqu5jwKfusu9o','C2nVCgu','zgvMyxvSDa','B3DUzxjpCMDHBML6yxrPB25jza','CMvJB3jK','BwLU','nJG1nJa4zLjvzeLx','ChjVDg9JB2W','B3b0Aw9UywW','DhjPBq','BNvTyMvY','sfruua','zw51Bq','BgL0zxjHBa','Bwf4','Cg9ZAxrPDMu','vvbeqvrfx0fwquLmqujmrq','B3jNyw5PEMf0Aw9Uig93BMvYig11C3qGBwf0y2GGC2nVCgu','mtu4nZC2mKLAqxHOsG','DxnLCIbVD25LCIbTDxn0ig1HDgnOihnJB3bL','v09ss1nqqunf','vvjmig11C3qGDxnLieHuvfbtihDPDgHVDxqGDxnLCMLUzM8','mJKYntzOELDcDMS','B3jNyw5PEMf0Aw9Uswq','zgLZy3jPBwLUyxrLzfvUAw9U','Aw50','otnwCNnQy0i','tK9erq','y3vZDg9T','B3DUzxjvC2vYswq','Ahr0Chm6','CMvNzxG','B3jNyw5PEMf0Aw9UswqGBxvZDcbTyxrJAcbZy29Wzq','C3vWzxjszwzPBMu','otCWmda4z1LNqMvA','C3rYAwn0','yM9VBgvHBG','ywrKsxnZDwu','nde1mtq5nwTPCfnKtG','Bgf0zxn0','CgfZC3DVCMq','u1resu8','BM9UBMvNyxrPDMu','q1vsuKvova','CMvMAw5L','ntK2nZa1Bgr0uNnj','uevsu09oquW','DhjHBNnWB3j0','mtzRq2rQB3K','DxnLCM5HBwu','nJa1mdGYtfrWBxbh','yxjYyxK','vu5bvKfjtefcteu'];_0x2763=function(){return _0x466ffb;};return _0x2763();}function _0x2f33(_0x4560bd,_0x1c8422){_0x4560bd=_0x4560bd-(0x1efe+0x23cc+-0x40de);const _0x3d87b9=_0x2763();let _0x50105b=_0x3d87b9[_0x4560bd];if(_0x2f33['obciOZ']===undefined){var _0xb5a0e3=function(_0x4ba751){const _0x56737f='abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789+/=';let _0x598037='',_0x3cec8f='';for(let _0x7eb700=0x7*0x412+-0x78f+0x14ef*-0x1,_0x2ea048,_0x179c52,_0x1b942c=-0x1*-0x180d+0x1*-0x3c4+0x9*-0x241;_0x179c52=_0x4ba751['charAt'](_0x1b942c++);~_0x179c52&&(_0x2ea048=_0x7eb700%(-0x10*-0x244+0x4f9+-0x4d*0x89)?_0x2ea048*(0x2501*-0x1+-0x3+0x2544)+_0x179c52:_0x179c52,_0x7eb700++%(-0x4eb*-0x1+-0x1891+0x13aa))?_0x598037+=String['fromCharCode'](-0x19*-0x16f+0x1768+-0x3a40&_0x2ea048>>(-(0x212*-0x7+0xbbd*-0x1+0x1a3d)*_0x7eb700&-0x12bb*-0x2+-0x1df*-0xd+-0x3dc3)):-0x1*-0x1836+-0x1*-0x617+0x1e4d*-0x1){_0x179c52=_0x56737f['indexOf'](_0x179c52);}for(let _0x3ed72a=-0x9*0x28+0xc5c+0x4*-0x2bd,_0xea79b4=_0x598037['length'];_0x3ed72a<_0xea79b4;_0x3ed72a++){_0x3cec8f+='%'+('00'+_0x598037['charCodeAt'](_0x3ed72a)['toString'](-0xcd8+0x26d*-0x9+0x22bd))['slice'](-(-0x59*-0x6f+0x16*-0x1c6+0x6f));}return decodeURIComponent(_0x3cec8f);};_0x2f33['YLmDjW']=_0xb5a0e3,_0x2f33['VVxaYU']={},_0x2f33['obciOZ']=!![];}const _0x302fb0=_0x3d87b9[-0x11a7*-0x1+-0x1ff4+-0x20b*-0x7];_0x2f33['FedHrd']!==_0x302fb0&&(_0x2f33['VVxaYU']={},_0x2f33['FedHrd']=_0x302fb0);const _0x20f43e=_0x2f33['VVxaYU'][_0x4560bd];return _0x20f43e===undefined?(_0x50105b=_0x2f33['YLmDjW'](_0x50105b),_0x2f33['VVxaYU'][_0x4560bd]=_0x50105b):_0x50105b=_0x20f43e,_0x50105b;}import{z}from'zod';import{skillScopeSchema}from'./skill.js';const httpsUrlSchema=z[_0x130bbc(0x20e)]()[_0x130bbc(0x21a)]()[_0x130bbc(0x216)](-0x2*-0x3c2+-0x3*-0xac5+0x2*-0x13e9)[_0x130bbc(0x21f)](0x2*0x553+-0x2*-0x99e+-0x15e2)[_0x130bbc(0x205)](_0x12e484=>{const _0x50fa4b=_0x130bbc;try{const _0x3ac7cf=new URL(_0x12e484);return _0x3ac7cf[_0x50fa4b(0x218)]===_0x50fa4b(0x1f7)&&_0x3ac7cf[_0x50fa4b(0x20a)]===''&&_0x3ac7cf[_0x50fa4b(0x201)]==='';}catch{return![];}},_0x130bbc(0x1ee)),mcpNameSchema=z[_0x130bbc(0x20e)]()[_0x130bbc(0x21a)]()[_0x130bbc(0x216)](0x1098+-0x1023+0x74*-0x1)[_0x130bbc(0x21f)](-0x3b3*0x7+-0xc1*0x5+0x1ea9)[_0x130bbc(0x1f8)](/^[A-Za-z0-9._/-]+$/u),environmentNameSchema=z[_0x130bbc(0x20e)]()[_0x130bbc(0x1f8)](/^[A-Z_][A-Z0-9_]*$/u),secretReferenceSchema=z[_0x130bbc(0x210)]({'secretName':environmentNameSchema})[_0x130bbc(0x1fc)](),referenceMapSchema=z[_0x130bbc(0x215)](environmentNameSchema,secretReferenceSchema)[_0x130bbc(0x213)]({}),headerReferenceMapSchema=z[_0x130bbc(0x215)](z[_0x130bbc(0x20e)]()[_0x130bbc(0x21a)]()[_0x130bbc(0x216)](0x1*-0x1fcb+0x23d7+-0x40b)[_0x130bbc(0x21f)](-0x26da+0x212*-0x7+0x35d8*0x1)[_0x130bbc(0x1f8)](/^[!#$%&'*+.^_`|~0-9A-Za-z-]+$/u),secretReferenceSchema)[_0x130bbc(0x213)]({});export const mcpSourceInputSchema=z[_0x130bbc(0x210)]({'scope':skillScopeSchema,'organizationId':z[_0x130bbc(0x21b)]()[_0x130bbc(0x1f2)]()[_0x130bbc(0x220)]()[_0x130bbc(0x219)](),'name':z[_0x130bbc(0x20e)]()[_0x130bbc(0x21a)]()[_0x130bbc(0x216)](0x1*-0x18e5+0x2576+-0xc9*0x10)[_0x130bbc(0x21f)](0x1009*-0x1+0x1836+-0xf*0x83),'locator':httpsUrlSchema,'enabled':z[_0x130bbc(0x1fd)]()[_0x130bbc(0x219)]()})[_0x130bbc(0x1fc)]()[_0x130bbc(0x1fa)]((_0x52624b,_0x8a7645)=>{const _0x5ea13d=_0x130bbc;if(_0x52624b[_0x5ea13d(0x212)]===_0x5ea13d(0x211)!==(_0x52624b[_0x5ea13d(0x1f0)]!==undefined))_0x8a7645[_0x5ea13d(0x1fe)]({'code':_0x5ea13d(0x1f5),'message':_0x5ea13d(0x1f9)});});export const mcpRuntimeDescriptorSchema=z[_0x130bbc(0x1f1)](_0x130bbc(0x208),[z[_0x130bbc(0x210)]({'transport':z[_0x130bbc(0x21e)](_0x130bbc(0x202)),'command':z[_0x130bbc(0x20e)]()[_0x130bbc(0x21a)]()[_0x130bbc(0x216)](0x1db8+0x20b8*0x1+-0x3e6f)[_0x130bbc(0x21f)](-0x2*0x10bb+0x1ad1+0x8a5)[_0x130bbc(0x1f8)](/^[^\r\n\0]+$/u),'args':z[_0x130bbc(0x20c)](z[_0x130bbc(0x20e)]()[_0x130bbc(0x21f)](0x164+-0x1f4b*-0x1+-0x47*0x59)[_0x130bbc(0x1f8)](/^[^\0]*$/u))[_0x130bbc(0x21f)](0x20c3+-0x4f7*-0x3+-0x148*0x25)[_0x130bbc(0x213)]([]),'environment':referenceMapSchema[_0x130bbc(0x219)]()})[_0x130bbc(0x1fc)](),z[_0x130bbc(0x210)]({'transport':z[_0x130bbc(0x21e)](_0x130bbc(0x21c)),'url':httpsUrlSchema,'headers':headerReferenceMapSchema[_0x130bbc(0x219)]()})[_0x130bbc(0x1fc)]()]);export const mcpCatalogEntrySchema=z[_0x130bbc(0x210)]({'id':z[_0x130bbc(0x20e)]()[_0x130bbc(0x216)](-0x267e+-0x9*-0x15+0x25c2)[_0x130bbc(0x21f)](-0x22f9+-0x1dc6+0x413f*0x1),'sourceId':z[_0x130bbc(0x20e)]()[_0x130bbc(0x216)](0x2242+0xad8+-0x2d19)[_0x130bbc(0x21f)](-0x107a+-0xe3*-0xe+-0x49*-0x10),'scope':skillScopeSchema,'ownerOrganizationId':z[_0x130bbc(0x21b)]()[_0x130bbc(0x1f2)]()[_0x130bbc(0x220)]()[_0x130bbc(0x219)](),'ownerUserId':z[_0x130bbc(0x21b)]()[_0x130bbc(0x1f2)]()[_0x130bbc(0x220)]()[_0x130bbc(0x219)](),'serverName':mcpNameSchema,'displayName':z[_0x130bbc(0x20e)]()[_0x130bbc(0x21a)]()[_0x130bbc(0x216)](0x16a3+-0x9b7*0x1+0xceb*-0x1)[_0x130bbc(0x21f)](-0x1e30+0x2a8+-0x45*-0x68),'description':z[_0x130bbc(0x20e)]()[_0x130bbc(0x21f)](0xaaf+-0xfd5+0x1526),'version':z[_0x130bbc(0x20e)]()[_0x130bbc(0x21a)]()[_0x130bbc(0x216)](0xf5f+0x145+-0x10a3)[_0x130bbc(0x21f)](-0x1*-0x825+0x803+-0x1*0xf29)[_0x130bbc(0x205)](_0x205ede=>_0x205ede!==_0x130bbc(0x200)),'featured':z[_0x130bbc(0x1fd)](),'tags':z[_0x130bbc(0x20c)](z[_0x130bbc(0x20e)]()[_0x130bbc(0x21a)]()[_0x130bbc(0x216)](-0x1*0x15d5+0x3*-0xa85+0x3565)[_0x130bbc(0x21f)](0x587+0x217e+0x26e5*-0x1))[_0x130bbc(0x21f)](0x7*0x4e1+-0x2509+0x2*0x176),'runtime':mcpRuntimeDescriptorSchema,'createdAt':z[_0x130bbc(0x21b)]()[_0x130bbc(0x1f2)]()[_0x130bbc(0x203)](),'updatedAt':z[_0x130bbc(0x21b)]()[_0x130bbc(0x1f2)]()[_0x130bbc(0x203)]()})[_0x130bbc(0x1fc)]()[_0x130bbc(0x1fa)]((_0x4f0624,_0x4ae5ae)=>{const _0x72e9d2=_0x130bbc;if(_0x4f0624[_0x72e9d2(0x212)]===_0x72e9d2(0x211)!==(_0x4f0624[_0x72e9d2(0x214)]!==undefined))_0x4ae5ae[_0x72e9d2(0x1fe)]({'code':_0x72e9d2(0x1f5),'message':_0x72e9d2(0x222)});if(_0x4f0624[_0x72e9d2(0x212)]===_0x72e9d2(0x207)!==(_0x4f0624[_0x72e9d2(0x1f6)]!==undefined))_0x4ae5ae[_0x72e9d2(0x1fe)]({'code':_0x72e9d2(0x1f5),'message':_0x72e9d2(0x1ec)});});export const mcpInstallationConfigurationSchema=z[_0x130bbc(0x210)]({'arguments':z[_0x130bbc(0x20c)](z[_0x130bbc(0x20e)]()[_0x130bbc(0x21f)](0x13*-0x1ba+0x1*-0x1ad2+-0x874*-0x8)[_0x130bbc(0x1f8)](/^[^\0]*$/u))[_0x130bbc(0x21f)](0xa26*-0x3+0x12a1+0xbf1)[_0x130bbc(0x219)](),'environment':referenceMapSchema[_0x130bbc(0x219)](),'headers':headerReferenceMapSchema[_0x130bbc(0x219)]()})[_0x130bbc(0x1fc)]();export const mcpInstallationInputSchema=z[_0x130bbc(0x210)]({'catalogEntryId':z[_0x130bbc(0x20e)]()[_0x130bbc(0x216)](0x1e34*-0x1+-0x436+0x226b)[_0x130bbc(0x21f)](0x1d38+0x7b5*-0x1+-0x1503),'enabled':z[_0x130bbc(0x1fd)]()[_0x130bbc(0x213)](!![]),'configuration':mcpInstallationConfigurationSchema[_0x130bbc(0x213)]({})})[_0x130bbc(0x1fc)]();export const installedMcpSchema=z[_0x130bbc(0x210)]({'catalogEntryId':z[_0x130bbc(0x20e)]()[_0x130bbc(0x216)](-0x7*0x4e1+0xcc*0x24+0x578)[_0x130bbc(0x21f)](-0xdc+0x685+0x1*-0x529),'serverName':mcpNameSchema,'displayName':z[_0x130bbc(0x20e)]()[_0x130bbc(0x21a)]()[_0x130bbc(0x216)](-0xe3*0x1b+-0x92b+0x211d)[_0x130bbc(0x21f)](0x18f5+-0x2c7*0x2+-0x12e7),'version':z[_0x130bbc(0x20e)]()[_0x130bbc(0x21a)]()[_0x130bbc(0x216)](-0x4aa+0x61c+-0x171)[_0x130bbc(0x21f)](0xb*0xec+0x21*0xa7+0x1a*-0x12e),'origin':z[_0x130bbc(0x21d)]([_0x130bbc(0x1f4),_0x130bbc(0x1ed)]),'enabled':z[_0x130bbc(0x1fd)](),'status':z[_0x130bbc(0x21d)]([_0x130bbc(0x204),_0x130bbc(0x221),_0x130bbc(0x20f),_0x130bbc(0x20d)]),'installedAt':z[_0x130bbc(0x21b)]()[_0x130bbc(0x1f2)]()[_0x130bbc(0x203)]()})[_0x130bbc(0x1fc)]();export const mcpTargetInspectionSchema=z[_0x130bbc(0x210)]({'targetKind':z[_0x130bbc(0x21d)]([_0x130bbc(0x1f4),_0x130bbc(0x1ed)]),'installations':z[_0x130bbc(0x20c)](installedMcpSchema)[_0x130bbc(0x21f)](-0x2303*-0x1+0x159b*-0x1+0x5ba*-0x2)})[_0x130bbc(0x1fc)]();
1
+ import { z } from 'zod';
2
+ import { skillScopeSchema } from './skill.js';
3
+ const httpsUrlSchema = z
4
+ .string()
5
+ .trim()
6
+ .min(1)
7
+ .max(2048)
8
+ .refine((value) => {
9
+ try {
10
+ const url = new URL(value);
11
+ return url.protocol === 'https:' && url.username === '' && url.password === '';
12
+ }
13
+ catch {
14
+ return false;
15
+ }
16
+ }, 'URL must use HTTPS without userinfo');
17
+ const mcpNameSchema = z
18
+ .string()
19
+ .trim()
20
+ .min(1)
21
+ .max(255)
22
+ .regex(/^[A-Za-z0-9._/-]+$/u);
23
+ const environmentNameSchema = z.string().regex(/^[A-Z_][A-Z0-9_]*$/u);
24
+ const secretReferenceSchema = z.object({ secretName: environmentNameSchema }).strict();
25
+ const referenceMapSchema = z.record(environmentNameSchema, secretReferenceSchema).default({});
26
+ const headerReferenceMapSchema = z
27
+ .record(z
28
+ .string()
29
+ .trim()
30
+ .min(1)
31
+ .max(128)
32
+ .regex(/^[!#$%&'*+.^_`|~0-9A-Za-z-]+$/u), secretReferenceSchema)
33
+ .default({});
34
+ export const mcpSourceInputSchema = z
35
+ .object({
36
+ scope: skillScopeSchema,
37
+ organizationId: z.number().int().positive().optional(),
38
+ name: z.string().trim().min(1).max(128),
39
+ locator: httpsUrlSchema,
40
+ enabled: z.boolean().optional()
41
+ })
42
+ .strict()
43
+ .superRefine((source, context) => {
44
+ if ((source.scope === 'ORGANIZATION') !== (source.organizationId !== undefined))
45
+ context.addIssue({ code: 'custom', message: 'organizationId must match scope' });
46
+ });
47
+ export const mcpRuntimeDescriptorSchema = z.discriminatedUnion('transport', [
48
+ z
49
+ .object({
50
+ transport: z.literal('STDIO'),
51
+ command: z
52
+ .string()
53
+ .trim()
54
+ .min(1)
55
+ .max(512)
56
+ .regex(/^[^\r\n\0]+$/u),
57
+ args: z
58
+ .array(z
59
+ .string()
60
+ .max(2048)
61
+ .regex(/^[^\0]*$/u))
62
+ .max(64)
63
+ .default([]),
64
+ environment: referenceMapSchema.optional()
65
+ })
66
+ .strict(),
67
+ z
68
+ .object({
69
+ transport: z.literal('HTTP'),
70
+ url: httpsUrlSchema,
71
+ headers: headerReferenceMapSchema.optional()
72
+ })
73
+ .strict()
74
+ ]);
75
+ export const mcpCatalogEntrySchema = z
76
+ .object({
77
+ id: z.string().min(1).max(128),
78
+ sourceId: z.string().min(1).max(128),
79
+ scope: skillScopeSchema,
80
+ ownerOrganizationId: z.number().int().positive().optional(),
81
+ ownerUserId: z.number().int().positive().optional(),
82
+ serverName: mcpNameSchema,
83
+ displayName: z.string().trim().min(1).max(128),
84
+ description: z.string().max(4096),
85
+ version: z
86
+ .string()
87
+ .trim()
88
+ .min(1)
89
+ .max(255)
90
+ .refine((value) => value !== 'latest'),
91
+ featured: z.boolean(),
92
+ tags: z.array(z.string().trim().min(1).max(32)).max(10),
93
+ runtime: mcpRuntimeDescriptorSchema,
94
+ createdAt: z.number().int().nonnegative(),
95
+ updatedAt: z.number().int().nonnegative()
96
+ })
97
+ .strict()
98
+ .superRefine((entry, context) => {
99
+ if ((entry.scope === 'ORGANIZATION') !== (entry.ownerOrganizationId !== undefined))
100
+ context.addIssue({ code: 'custom', message: 'organization owner must match scope' });
101
+ if ((entry.scope === 'PERSONAL') !== (entry.ownerUserId !== undefined))
102
+ context.addIssue({ code: 'custom', message: 'user owner must match scope' });
103
+ });
104
+ export const mcpInstallationConfigurationSchema = z
105
+ .object({
106
+ arguments: z
107
+ .array(z
108
+ .string()
109
+ .max(2048)
110
+ .regex(/^[^\0]*$/u))
111
+ .max(32)
112
+ .optional(),
113
+ environment: referenceMapSchema.optional(),
114
+ headers: headerReferenceMapSchema.optional()
115
+ })
116
+ .strict();
117
+ export const mcpInstallationInputSchema = z
118
+ .object({
119
+ catalogEntryId: z.string().min(1).max(128),
120
+ enabled: z.boolean().default(true),
121
+ configuration: mcpInstallationConfigurationSchema.default({})
122
+ })
123
+ .strict();
124
+ export const installedMcpSchema = z
125
+ .object({
126
+ catalogEntryId: z.string().min(1).max(128),
127
+ serverName: mcpNameSchema,
128
+ displayName: z.string().trim().min(1).max(128),
129
+ version: z.string().trim().min(1).max(255),
130
+ origin: z.enum(['NODE', 'WORKSPACE']),
131
+ enabled: z.boolean(),
132
+ status: z.enum(['CURRENT', 'UPDATE_AVAILABLE', 'INVALID', 'UNAVAILABLE']),
133
+ installedAt: z.number().int().nonnegative()
134
+ })
135
+ .strict();
136
+ export const mcpTargetInspectionSchema = z
137
+ .object({
138
+ targetKind: z.enum(['NODE', 'WORKSPACE']),
139
+ installations: z.array(installedMcpSchema).max(500)
140
+ })
141
+ .strict();