caplets 0.3.0 → 0.5.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/README.md +168 -24
- package/dist/index.js +26060 -244
- package/package.json +3 -1
- package/schemas/caplet.schema.json +511 -2
- package/schemas/caplets-config.schema.json +568 -0
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "caplets",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.5.0",
|
|
4
4
|
"description": "Progressive disclosure gateway for MCP servers.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"caplets",
|
|
@@ -37,8 +37,10 @@
|
|
|
37
37
|
"access": "public"
|
|
38
38
|
},
|
|
39
39
|
"dependencies": {
|
|
40
|
+
"@apidevtools/swagger-parser": "^12.1.0",
|
|
40
41
|
"@modelcontextprotocol/sdk": "^1.29.0",
|
|
41
42
|
"commander": "^14.0.3",
|
|
43
|
+
"graphql": "^16.14.0",
|
|
42
44
|
"vfile": "^6.0.3",
|
|
43
45
|
"vfile-matter": "^5.0.1",
|
|
44
46
|
"zod": "^4.4.3"
|
|
@@ -137,6 +137,72 @@
|
|
|
137
137
|
"type": "string",
|
|
138
138
|
"minLength": 1
|
|
139
139
|
},
|
|
140
|
+
"resourceMetadataUrl": {
|
|
141
|
+
"type": "string",
|
|
142
|
+
"minLength": 1
|
|
143
|
+
},
|
|
144
|
+
"authorizationServerMetadataUrl": {
|
|
145
|
+
"type": "string",
|
|
146
|
+
"minLength": 1
|
|
147
|
+
},
|
|
148
|
+
"openidConfigurationUrl": {
|
|
149
|
+
"type": "string",
|
|
150
|
+
"minLength": 1
|
|
151
|
+
},
|
|
152
|
+
"clientId": {
|
|
153
|
+
"type": "string",
|
|
154
|
+
"minLength": 1
|
|
155
|
+
},
|
|
156
|
+
"clientSecret": {
|
|
157
|
+
"type": "string",
|
|
158
|
+
"minLength": 1
|
|
159
|
+
},
|
|
160
|
+
"scopes": {
|
|
161
|
+
"type": "array",
|
|
162
|
+
"items": {
|
|
163
|
+
"type": "string",
|
|
164
|
+
"minLength": 1
|
|
165
|
+
}
|
|
166
|
+
},
|
|
167
|
+
"redirectUri": {
|
|
168
|
+
"type": "string",
|
|
169
|
+
"minLength": 1
|
|
170
|
+
}
|
|
171
|
+
},
|
|
172
|
+
"required": ["type"],
|
|
173
|
+
"additionalProperties": false
|
|
174
|
+
},
|
|
175
|
+
{
|
|
176
|
+
"type": "object",
|
|
177
|
+
"properties": {
|
|
178
|
+
"type": {
|
|
179
|
+
"type": "string",
|
|
180
|
+
"const": "oidc"
|
|
181
|
+
},
|
|
182
|
+
"authorizationUrl": {
|
|
183
|
+
"type": "string",
|
|
184
|
+
"minLength": 1
|
|
185
|
+
},
|
|
186
|
+
"tokenUrl": {
|
|
187
|
+
"type": "string",
|
|
188
|
+
"minLength": 1
|
|
189
|
+
},
|
|
190
|
+
"issuer": {
|
|
191
|
+
"type": "string",
|
|
192
|
+
"minLength": 1
|
|
193
|
+
},
|
|
194
|
+
"resourceMetadataUrl": {
|
|
195
|
+
"type": "string",
|
|
196
|
+
"minLength": 1
|
|
197
|
+
},
|
|
198
|
+
"authorizationServerMetadataUrl": {
|
|
199
|
+
"type": "string",
|
|
200
|
+
"minLength": 1
|
|
201
|
+
},
|
|
202
|
+
"openidConfigurationUrl": {
|
|
203
|
+
"type": "string",
|
|
204
|
+
"minLength": 1
|
|
205
|
+
},
|
|
140
206
|
"clientId": {
|
|
141
207
|
"type": "string",
|
|
142
208
|
"minLength": 1
|
|
@@ -187,9 +253,452 @@
|
|
|
187
253
|
}
|
|
188
254
|
},
|
|
189
255
|
"additionalProperties": false,
|
|
190
|
-
"description": "
|
|
256
|
+
"description": "MCP server backend configuration for this Caplet."
|
|
257
|
+
},
|
|
258
|
+
"openapiEndpoint": {
|
|
259
|
+
"type": "object",
|
|
260
|
+
"properties": {
|
|
261
|
+
"specPath": {
|
|
262
|
+
"description": "Local OpenAPI specification path.",
|
|
263
|
+
"type": "string",
|
|
264
|
+
"minLength": 1
|
|
265
|
+
},
|
|
266
|
+
"specUrl": {
|
|
267
|
+
"description": "Remote OpenAPI specification URL.",
|
|
268
|
+
"type": "string",
|
|
269
|
+
"minLength": 1
|
|
270
|
+
},
|
|
271
|
+
"baseUrl": {
|
|
272
|
+
"description": "Override base URL for OpenAPI requests.",
|
|
273
|
+
"type": "string",
|
|
274
|
+
"minLength": 1
|
|
275
|
+
},
|
|
276
|
+
"auth": {
|
|
277
|
+
"oneOf": [
|
|
278
|
+
{
|
|
279
|
+
"type": "object",
|
|
280
|
+
"properties": {
|
|
281
|
+
"type": {
|
|
282
|
+
"type": "string",
|
|
283
|
+
"const": "none"
|
|
284
|
+
}
|
|
285
|
+
},
|
|
286
|
+
"required": ["type"],
|
|
287
|
+
"additionalProperties": false
|
|
288
|
+
},
|
|
289
|
+
{
|
|
290
|
+
"type": "object",
|
|
291
|
+
"properties": {
|
|
292
|
+
"type": {
|
|
293
|
+
"type": "string",
|
|
294
|
+
"const": "bearer"
|
|
295
|
+
},
|
|
296
|
+
"token": {
|
|
297
|
+
"type": "string",
|
|
298
|
+
"minLength": 1
|
|
299
|
+
}
|
|
300
|
+
},
|
|
301
|
+
"required": ["type", "token"],
|
|
302
|
+
"additionalProperties": false
|
|
303
|
+
},
|
|
304
|
+
{
|
|
305
|
+
"type": "object",
|
|
306
|
+
"properties": {
|
|
307
|
+
"type": {
|
|
308
|
+
"type": "string",
|
|
309
|
+
"const": "headers"
|
|
310
|
+
},
|
|
311
|
+
"headers": {
|
|
312
|
+
"type": "object",
|
|
313
|
+
"propertyNames": {
|
|
314
|
+
"type": "string"
|
|
315
|
+
},
|
|
316
|
+
"additionalProperties": {
|
|
317
|
+
"type": "string",
|
|
318
|
+
"minLength": 1
|
|
319
|
+
}
|
|
320
|
+
}
|
|
321
|
+
},
|
|
322
|
+
"required": ["type", "headers"],
|
|
323
|
+
"additionalProperties": false
|
|
324
|
+
},
|
|
325
|
+
{
|
|
326
|
+
"type": "object",
|
|
327
|
+
"properties": {
|
|
328
|
+
"type": {
|
|
329
|
+
"type": "string",
|
|
330
|
+
"const": "oauth2"
|
|
331
|
+
},
|
|
332
|
+
"authorizationUrl": {
|
|
333
|
+
"type": "string",
|
|
334
|
+
"minLength": 1
|
|
335
|
+
},
|
|
336
|
+
"tokenUrl": {
|
|
337
|
+
"type": "string",
|
|
338
|
+
"minLength": 1
|
|
339
|
+
},
|
|
340
|
+
"issuer": {
|
|
341
|
+
"type": "string",
|
|
342
|
+
"minLength": 1
|
|
343
|
+
},
|
|
344
|
+
"resourceMetadataUrl": {
|
|
345
|
+
"type": "string",
|
|
346
|
+
"minLength": 1
|
|
347
|
+
},
|
|
348
|
+
"authorizationServerMetadataUrl": {
|
|
349
|
+
"type": "string",
|
|
350
|
+
"minLength": 1
|
|
351
|
+
},
|
|
352
|
+
"openidConfigurationUrl": {
|
|
353
|
+
"type": "string",
|
|
354
|
+
"minLength": 1
|
|
355
|
+
},
|
|
356
|
+
"clientId": {
|
|
357
|
+
"type": "string",
|
|
358
|
+
"minLength": 1
|
|
359
|
+
},
|
|
360
|
+
"clientSecret": {
|
|
361
|
+
"type": "string",
|
|
362
|
+
"minLength": 1
|
|
363
|
+
},
|
|
364
|
+
"scopes": {
|
|
365
|
+
"type": "array",
|
|
366
|
+
"items": {
|
|
367
|
+
"type": "string",
|
|
368
|
+
"minLength": 1
|
|
369
|
+
}
|
|
370
|
+
},
|
|
371
|
+
"redirectUri": {
|
|
372
|
+
"type": "string",
|
|
373
|
+
"minLength": 1
|
|
374
|
+
}
|
|
375
|
+
},
|
|
376
|
+
"required": ["type"],
|
|
377
|
+
"additionalProperties": false
|
|
378
|
+
},
|
|
379
|
+
{
|
|
380
|
+
"type": "object",
|
|
381
|
+
"properties": {
|
|
382
|
+
"type": {
|
|
383
|
+
"type": "string",
|
|
384
|
+
"const": "oidc"
|
|
385
|
+
},
|
|
386
|
+
"authorizationUrl": {
|
|
387
|
+
"type": "string",
|
|
388
|
+
"minLength": 1
|
|
389
|
+
},
|
|
390
|
+
"tokenUrl": {
|
|
391
|
+
"type": "string",
|
|
392
|
+
"minLength": 1
|
|
393
|
+
},
|
|
394
|
+
"issuer": {
|
|
395
|
+
"type": "string",
|
|
396
|
+
"minLength": 1
|
|
397
|
+
},
|
|
398
|
+
"resourceMetadataUrl": {
|
|
399
|
+
"type": "string",
|
|
400
|
+
"minLength": 1
|
|
401
|
+
},
|
|
402
|
+
"authorizationServerMetadataUrl": {
|
|
403
|
+
"type": "string",
|
|
404
|
+
"minLength": 1
|
|
405
|
+
},
|
|
406
|
+
"openidConfigurationUrl": {
|
|
407
|
+
"type": "string",
|
|
408
|
+
"minLength": 1
|
|
409
|
+
},
|
|
410
|
+
"clientId": {
|
|
411
|
+
"type": "string",
|
|
412
|
+
"minLength": 1
|
|
413
|
+
},
|
|
414
|
+
"clientSecret": {
|
|
415
|
+
"type": "string",
|
|
416
|
+
"minLength": 1
|
|
417
|
+
},
|
|
418
|
+
"scopes": {
|
|
419
|
+
"type": "array",
|
|
420
|
+
"items": {
|
|
421
|
+
"type": "string",
|
|
422
|
+
"minLength": 1
|
|
423
|
+
}
|
|
424
|
+
},
|
|
425
|
+
"redirectUri": {
|
|
426
|
+
"type": "string",
|
|
427
|
+
"minLength": 1
|
|
428
|
+
}
|
|
429
|
+
},
|
|
430
|
+
"required": ["type"],
|
|
431
|
+
"additionalProperties": false
|
|
432
|
+
}
|
|
433
|
+
],
|
|
434
|
+
"description": "Explicit OpenAPI request auth config. Use {\"type\":\"none\"} for public APIs."
|
|
435
|
+
},
|
|
436
|
+
"requestTimeoutMs": {
|
|
437
|
+
"description": "Timeout in milliseconds for OpenAPI HTTP requests.",
|
|
438
|
+
"type": "integer",
|
|
439
|
+
"exclusiveMinimum": 0,
|
|
440
|
+
"maximum": 9007199254740991
|
|
441
|
+
},
|
|
442
|
+
"operationCacheTtlMs": {
|
|
443
|
+
"description": "Milliseconds OpenAPI operation metadata stays fresh. Set 0 to refresh every time.",
|
|
444
|
+
"type": "integer",
|
|
445
|
+
"minimum": 0,
|
|
446
|
+
"maximum": 9007199254740991
|
|
447
|
+
},
|
|
448
|
+
"disabled": {
|
|
449
|
+
"description": "When true, omit this Caplet from discovery.",
|
|
450
|
+
"type": "boolean"
|
|
451
|
+
}
|
|
452
|
+
},
|
|
453
|
+
"required": ["auth"],
|
|
454
|
+
"additionalProperties": false,
|
|
455
|
+
"description": "OpenAPI endpoint backend configuration for this Caplet."
|
|
456
|
+
},
|
|
457
|
+
"graphqlEndpoint": {
|
|
458
|
+
"type": "object",
|
|
459
|
+
"properties": {
|
|
460
|
+
"endpointUrl": {
|
|
461
|
+
"type": "string",
|
|
462
|
+
"minLength": 1,
|
|
463
|
+
"description": "GraphQL HTTP endpoint URL."
|
|
464
|
+
},
|
|
465
|
+
"schemaPath": {
|
|
466
|
+
"description": "Local GraphQL SDL or introspection path.",
|
|
467
|
+
"type": "string",
|
|
468
|
+
"minLength": 1
|
|
469
|
+
},
|
|
470
|
+
"schemaUrl": {
|
|
471
|
+
"description": "Remote GraphQL SDL or introspection URL.",
|
|
472
|
+
"type": "string",
|
|
473
|
+
"minLength": 1
|
|
474
|
+
},
|
|
475
|
+
"introspection": {
|
|
476
|
+
"description": "Load schema through endpoint introspection.",
|
|
477
|
+
"type": "boolean",
|
|
478
|
+
"const": true
|
|
479
|
+
},
|
|
480
|
+
"operations": {
|
|
481
|
+
"description": "Configured GraphQL operations keyed by stable tool name.",
|
|
482
|
+
"type": "object",
|
|
483
|
+
"propertyNames": {
|
|
484
|
+
"type": "string",
|
|
485
|
+
"pattern": "^[a-zA-Z0-9_-]{1,64}$"
|
|
486
|
+
},
|
|
487
|
+
"additionalProperties": {
|
|
488
|
+
"type": "object",
|
|
489
|
+
"properties": {
|
|
490
|
+
"document": {
|
|
491
|
+
"description": "Inline GraphQL operation document.",
|
|
492
|
+
"type": "string",
|
|
493
|
+
"minLength": 1
|
|
494
|
+
},
|
|
495
|
+
"documentPath": {
|
|
496
|
+
"description": "Path to a GraphQL operation document.",
|
|
497
|
+
"type": "string",
|
|
498
|
+
"minLength": 1
|
|
499
|
+
},
|
|
500
|
+
"operationName": {
|
|
501
|
+
"description": "Operation name to execute.",
|
|
502
|
+
"type": "string",
|
|
503
|
+
"minLength": 1
|
|
504
|
+
},
|
|
505
|
+
"description": {
|
|
506
|
+
"description": "Operation capability description.",
|
|
507
|
+
"type": "string",
|
|
508
|
+
"minLength": 1
|
|
509
|
+
}
|
|
510
|
+
},
|
|
511
|
+
"additionalProperties": false
|
|
512
|
+
}
|
|
513
|
+
},
|
|
514
|
+
"auth": {
|
|
515
|
+
"oneOf": [
|
|
516
|
+
{
|
|
517
|
+
"type": "object",
|
|
518
|
+
"properties": {
|
|
519
|
+
"type": {
|
|
520
|
+
"type": "string",
|
|
521
|
+
"const": "none"
|
|
522
|
+
}
|
|
523
|
+
},
|
|
524
|
+
"required": ["type"],
|
|
525
|
+
"additionalProperties": false
|
|
526
|
+
},
|
|
527
|
+
{
|
|
528
|
+
"type": "object",
|
|
529
|
+
"properties": {
|
|
530
|
+
"type": {
|
|
531
|
+
"type": "string",
|
|
532
|
+
"const": "bearer"
|
|
533
|
+
},
|
|
534
|
+
"token": {
|
|
535
|
+
"type": "string",
|
|
536
|
+
"minLength": 1
|
|
537
|
+
}
|
|
538
|
+
},
|
|
539
|
+
"required": ["type", "token"],
|
|
540
|
+
"additionalProperties": false
|
|
541
|
+
},
|
|
542
|
+
{
|
|
543
|
+
"type": "object",
|
|
544
|
+
"properties": {
|
|
545
|
+
"type": {
|
|
546
|
+
"type": "string",
|
|
547
|
+
"const": "headers"
|
|
548
|
+
},
|
|
549
|
+
"headers": {
|
|
550
|
+
"type": "object",
|
|
551
|
+
"propertyNames": {
|
|
552
|
+
"type": "string"
|
|
553
|
+
},
|
|
554
|
+
"additionalProperties": {
|
|
555
|
+
"type": "string",
|
|
556
|
+
"minLength": 1
|
|
557
|
+
}
|
|
558
|
+
}
|
|
559
|
+
},
|
|
560
|
+
"required": ["type", "headers"],
|
|
561
|
+
"additionalProperties": false
|
|
562
|
+
},
|
|
563
|
+
{
|
|
564
|
+
"type": "object",
|
|
565
|
+
"properties": {
|
|
566
|
+
"type": {
|
|
567
|
+
"type": "string",
|
|
568
|
+
"const": "oauth2"
|
|
569
|
+
},
|
|
570
|
+
"authorizationUrl": {
|
|
571
|
+
"type": "string",
|
|
572
|
+
"minLength": 1
|
|
573
|
+
},
|
|
574
|
+
"tokenUrl": {
|
|
575
|
+
"type": "string",
|
|
576
|
+
"minLength": 1
|
|
577
|
+
},
|
|
578
|
+
"issuer": {
|
|
579
|
+
"type": "string",
|
|
580
|
+
"minLength": 1
|
|
581
|
+
},
|
|
582
|
+
"resourceMetadataUrl": {
|
|
583
|
+
"type": "string",
|
|
584
|
+
"minLength": 1
|
|
585
|
+
},
|
|
586
|
+
"authorizationServerMetadataUrl": {
|
|
587
|
+
"type": "string",
|
|
588
|
+
"minLength": 1
|
|
589
|
+
},
|
|
590
|
+
"openidConfigurationUrl": {
|
|
591
|
+
"type": "string",
|
|
592
|
+
"minLength": 1
|
|
593
|
+
},
|
|
594
|
+
"clientId": {
|
|
595
|
+
"type": "string",
|
|
596
|
+
"minLength": 1
|
|
597
|
+
},
|
|
598
|
+
"clientSecret": {
|
|
599
|
+
"type": "string",
|
|
600
|
+
"minLength": 1
|
|
601
|
+
},
|
|
602
|
+
"scopes": {
|
|
603
|
+
"type": "array",
|
|
604
|
+
"items": {
|
|
605
|
+
"type": "string",
|
|
606
|
+
"minLength": 1
|
|
607
|
+
}
|
|
608
|
+
},
|
|
609
|
+
"redirectUri": {
|
|
610
|
+
"type": "string",
|
|
611
|
+
"minLength": 1
|
|
612
|
+
}
|
|
613
|
+
},
|
|
614
|
+
"required": ["type"],
|
|
615
|
+
"additionalProperties": false
|
|
616
|
+
},
|
|
617
|
+
{
|
|
618
|
+
"type": "object",
|
|
619
|
+
"properties": {
|
|
620
|
+
"type": {
|
|
621
|
+
"type": "string",
|
|
622
|
+
"const": "oidc"
|
|
623
|
+
},
|
|
624
|
+
"authorizationUrl": {
|
|
625
|
+
"type": "string",
|
|
626
|
+
"minLength": 1
|
|
627
|
+
},
|
|
628
|
+
"tokenUrl": {
|
|
629
|
+
"type": "string",
|
|
630
|
+
"minLength": 1
|
|
631
|
+
},
|
|
632
|
+
"issuer": {
|
|
633
|
+
"type": "string",
|
|
634
|
+
"minLength": 1
|
|
635
|
+
},
|
|
636
|
+
"resourceMetadataUrl": {
|
|
637
|
+
"type": "string",
|
|
638
|
+
"minLength": 1
|
|
639
|
+
},
|
|
640
|
+
"authorizationServerMetadataUrl": {
|
|
641
|
+
"type": "string",
|
|
642
|
+
"minLength": 1
|
|
643
|
+
},
|
|
644
|
+
"openidConfigurationUrl": {
|
|
645
|
+
"type": "string",
|
|
646
|
+
"minLength": 1
|
|
647
|
+
},
|
|
648
|
+
"clientId": {
|
|
649
|
+
"type": "string",
|
|
650
|
+
"minLength": 1
|
|
651
|
+
},
|
|
652
|
+
"clientSecret": {
|
|
653
|
+
"type": "string",
|
|
654
|
+
"minLength": 1
|
|
655
|
+
},
|
|
656
|
+
"scopes": {
|
|
657
|
+
"type": "array",
|
|
658
|
+
"items": {
|
|
659
|
+
"type": "string",
|
|
660
|
+
"minLength": 1
|
|
661
|
+
}
|
|
662
|
+
},
|
|
663
|
+
"redirectUri": {
|
|
664
|
+
"type": "string",
|
|
665
|
+
"minLength": 1
|
|
666
|
+
}
|
|
667
|
+
},
|
|
668
|
+
"required": ["type"],
|
|
669
|
+
"additionalProperties": false
|
|
670
|
+
}
|
|
671
|
+
],
|
|
672
|
+
"description": "Explicit GraphQL request auth config. Use {\"type\":\"none\"} for public APIs."
|
|
673
|
+
},
|
|
674
|
+
"requestTimeoutMs": {
|
|
675
|
+
"description": "Timeout in milliseconds for GraphQL HTTP requests.",
|
|
676
|
+
"type": "integer",
|
|
677
|
+
"exclusiveMinimum": 0,
|
|
678
|
+
"maximum": 9007199254740991
|
|
679
|
+
},
|
|
680
|
+
"operationCacheTtlMs": {
|
|
681
|
+
"description": "Milliseconds GraphQL operation metadata stays fresh. Set 0 to refresh every time.",
|
|
682
|
+
"type": "integer",
|
|
683
|
+
"minimum": 0,
|
|
684
|
+
"maximum": 9007199254740991
|
|
685
|
+
},
|
|
686
|
+
"selectionDepth": {
|
|
687
|
+
"description": "Maximum depth for auto-generated GraphQL selection sets.",
|
|
688
|
+
"type": "integer",
|
|
689
|
+
"exclusiveMinimum": 0,
|
|
690
|
+
"maximum": 5
|
|
691
|
+
},
|
|
692
|
+
"disabled": {
|
|
693
|
+
"description": "When true, omit this Caplet from discovery.",
|
|
694
|
+
"type": "boolean"
|
|
695
|
+
}
|
|
696
|
+
},
|
|
697
|
+
"required": ["endpointUrl", "auth"],
|
|
698
|
+
"additionalProperties": false,
|
|
699
|
+
"description": "GraphQL endpoint backend configuration for this Caplet."
|
|
191
700
|
}
|
|
192
701
|
},
|
|
193
|
-
"required": ["name", "description"
|
|
702
|
+
"required": ["name", "description"],
|
|
194
703
|
"additionalProperties": false
|
|
195
704
|
}
|