git-doc-mcp 0.1.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.
Files changed (107) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +543 -0
  3. package/dist/audit/index.d.ts +2 -0
  4. package/dist/audit/index.d.ts.map +1 -0
  5. package/dist/audit/index.js +2 -0
  6. package/dist/audit/index.js.map +1 -0
  7. package/dist/audit/logger.d.ts +81 -0
  8. package/dist/audit/logger.d.ts.map +1 -0
  9. package/dist/audit/logger.js +179 -0
  10. package/dist/audit/logger.js.map +1 -0
  11. package/dist/cli/commands/serve.d.ts +44 -0
  12. package/dist/cli/commands/serve.d.ts.map +1 -0
  13. package/dist/cli/commands/serve.js +360 -0
  14. package/dist/cli/commands/serve.js.map +1 -0
  15. package/dist/cli/index.d.ts +21 -0
  16. package/dist/cli/index.d.ts.map +1 -0
  17. package/dist/cli/index.js +71 -0
  18. package/dist/cli/index.js.map +1 -0
  19. package/dist/http/client.d.ts +39 -0
  20. package/dist/http/client.d.ts.map +1 -0
  21. package/dist/http/client.js +114 -0
  22. package/dist/http/client.js.map +1 -0
  23. package/dist/http/index.d.ts +7 -0
  24. package/dist/http/index.d.ts.map +1 -0
  25. package/dist/http/index.js +7 -0
  26. package/dist/http/index.js.map +1 -0
  27. package/dist/http/redirect-utils.d.ts +27 -0
  28. package/dist/http/redirect-utils.d.ts.map +1 -0
  29. package/dist/http/redirect-utils.js +73 -0
  30. package/dist/http/redirect-utils.js.map +1 -0
  31. package/dist/index.d.ts +36 -0
  32. package/dist/index.d.ts.map +1 -0
  33. package/dist/index.js +44 -0
  34. package/dist/index.js.map +1 -0
  35. package/dist/manifest/index.d.ts +7 -0
  36. package/dist/manifest/index.d.ts.map +1 -0
  37. package/dist/manifest/index.js +7 -0
  38. package/dist/manifest/index.js.map +1 -0
  39. package/dist/manifest/loader.d.ts +55 -0
  40. package/dist/manifest/loader.d.ts.map +1 -0
  41. package/dist/manifest/loader.js +222 -0
  42. package/dist/manifest/loader.js.map +1 -0
  43. package/dist/manifest/schema.d.ts +909 -0
  44. package/dist/manifest/schema.d.ts.map +1 -0
  45. package/dist/manifest/schema.js +148 -0
  46. package/dist/manifest/schema.js.map +1 -0
  47. package/dist/rate-limit/index.d.ts +6 -0
  48. package/dist/rate-limit/index.d.ts.map +1 -0
  49. package/dist/rate-limit/index.js +6 -0
  50. package/dist/rate-limit/index.js.map +1 -0
  51. package/dist/rate-limit/limiter.d.ts +38 -0
  52. package/dist/rate-limit/limiter.d.ts.map +1 -0
  53. package/dist/rate-limit/limiter.js +55 -0
  54. package/dist/rate-limit/limiter.js.map +1 -0
  55. package/dist/sandbox/context.d.ts +69 -0
  56. package/dist/sandbox/context.d.ts.map +1 -0
  57. package/dist/sandbox/context.js +134 -0
  58. package/dist/sandbox/context.js.map +1 -0
  59. package/dist/sandbox/executor.d.ts +50 -0
  60. package/dist/sandbox/executor.d.ts.map +1 -0
  61. package/dist/sandbox/executor.js +259 -0
  62. package/dist/sandbox/executor.js.map +1 -0
  63. package/dist/sandbox/index.d.ts +8 -0
  64. package/dist/sandbox/index.d.ts.map +1 -0
  65. package/dist/sandbox/index.js +8 -0
  66. package/dist/sandbox/index.js.map +1 -0
  67. package/dist/sandbox/url-validator.d.ts +40 -0
  68. package/dist/sandbox/url-validator.d.ts.map +1 -0
  69. package/dist/sandbox/url-validator.js +178 -0
  70. package/dist/sandbox/url-validator.js.map +1 -0
  71. package/dist/secrets/index.d.ts +7 -0
  72. package/dist/secrets/index.d.ts.map +1 -0
  73. package/dist/secrets/index.js +7 -0
  74. package/dist/secrets/index.js.map +1 -0
  75. package/dist/secrets/manager.d.ts +55 -0
  76. package/dist/secrets/manager.d.ts.map +1 -0
  77. package/dist/secrets/manager.js +94 -0
  78. package/dist/secrets/manager.js.map +1 -0
  79. package/dist/secrets/patterns.d.ts +33 -0
  80. package/dist/secrets/patterns.d.ts.map +1 -0
  81. package/dist/secrets/patterns.js +71 -0
  82. package/dist/secrets/patterns.js.map +1 -0
  83. package/dist/server/index.d.ts +6 -0
  84. package/dist/server/index.d.ts.map +1 -0
  85. package/dist/server/index.js +6 -0
  86. package/dist/server/index.js.map +1 -0
  87. package/dist/server/mcp.d.ts +60 -0
  88. package/dist/server/mcp.d.ts.map +1 -0
  89. package/dist/server/mcp.js +173 -0
  90. package/dist/server/mcp.js.map +1 -0
  91. package/dist/worker/index.d.ts +7 -0
  92. package/dist/worker/index.d.ts.map +1 -0
  93. package/dist/worker/index.js +7 -0
  94. package/dist/worker/index.js.map +1 -0
  95. package/dist/worker/process.d.ts +64 -0
  96. package/dist/worker/process.d.ts.map +1 -0
  97. package/dist/worker/process.js +222 -0
  98. package/dist/worker/process.js.map +1 -0
  99. package/dist/worker/protocol.d.ts +83 -0
  100. package/dist/worker/protocol.d.ts.map +1 -0
  101. package/dist/worker/protocol.js +55 -0
  102. package/dist/worker/protocol.js.map +1 -0
  103. package/dist/worker/worker-entry.d.ts +30 -0
  104. package/dist/worker/worker-entry.d.ts.map +1 -0
  105. package/dist/worker/worker-entry.js +136 -0
  106. package/dist/worker/worker-entry.js.map +1 -0
  107. package/package.json +55 -0
@@ -0,0 +1,909 @@
1
+ /**
2
+ * Zod schema for git-doc-mcp manifest files.
3
+ * @module manifest/schema
4
+ */
5
+ import { z } from 'zod';
6
+ /**
7
+ * Schema version for future compatibility.
8
+ */
9
+ export declare const SchemaVersionSchema: z.ZodString;
10
+ /**
11
+ * Secret scope pattern for URL validation.
12
+ * Examples: "https://api.github.com/*", "https://raw.githubusercontent.com"
13
+ */
14
+ export declare const SecretScopeSchema: z.ZodString;
15
+ /**
16
+ * Secret declaration in a manifest.
17
+ */
18
+ export declare const SecretSchema: z.ZodObject<{
19
+ name: z.ZodString;
20
+ description: z.ZodOptional<z.ZodString>;
21
+ scope: z.ZodUnion<[z.ZodString, z.ZodArray<z.ZodString, "many">]>;
22
+ required: z.ZodDefault<z.ZodBoolean>;
23
+ }, "strip", z.ZodTypeAny, {
24
+ name: string;
25
+ scope: string | string[];
26
+ required: boolean;
27
+ description?: string | undefined;
28
+ }, {
29
+ name: string;
30
+ scope: string | string[];
31
+ description?: string | undefined;
32
+ required?: boolean | undefined;
33
+ }>;
34
+ /**
35
+ * Tool annotation hints for MCP clients.
36
+ */
37
+ export declare const ToolAnnotationsSchema: z.ZodObject<{
38
+ title: z.ZodOptional<z.ZodString>;
39
+ readOnlyHint: z.ZodDefault<z.ZodBoolean>;
40
+ destructiveHint: z.ZodDefault<z.ZodBoolean>;
41
+ idempotentHint: z.ZodDefault<z.ZodBoolean>;
42
+ openWorldHint: z.ZodDefault<z.ZodBoolean>;
43
+ }, "strip", z.ZodTypeAny, {
44
+ readOnlyHint: boolean;
45
+ destructiveHint: boolean;
46
+ idempotentHint: boolean;
47
+ openWorldHint: boolean;
48
+ title?: string | undefined;
49
+ }, {
50
+ title?: string | undefined;
51
+ readOnlyHint?: boolean | undefined;
52
+ destructiveHint?: boolean | undefined;
53
+ idempotentHint?: boolean | undefined;
54
+ openWorldHint?: boolean | undefined;
55
+ }>;
56
+ /**
57
+ * JSON Schema for tool input validation.
58
+ */
59
+ export declare const InputSchemaSchema: z.ZodObject<{
60
+ type: z.ZodLiteral<"object">;
61
+ properties: z.ZodRecord<z.ZodString, z.ZodUnknown>;
62
+ required: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
63
+ additionalProperties: z.ZodOptional<z.ZodBoolean>;
64
+ }, "strip", z.ZodTypeAny, {
65
+ type: "object";
66
+ properties: Record<string, unknown>;
67
+ required?: string[] | undefined;
68
+ additionalProperties?: boolean | undefined;
69
+ }, {
70
+ type: "object";
71
+ properties: Record<string, unknown>;
72
+ required?: string[] | undefined;
73
+ additionalProperties?: boolean | undefined;
74
+ }>;
75
+ /**
76
+ * Tool definition in a manifest.
77
+ */
78
+ export declare const ToolSchema: z.ZodObject<{
79
+ name: z.ZodString;
80
+ title: z.ZodOptional<z.ZodString>;
81
+ description: z.ZodString;
82
+ inputSchema: z.ZodObject<{
83
+ type: z.ZodLiteral<"object">;
84
+ properties: z.ZodRecord<z.ZodString, z.ZodUnknown>;
85
+ required: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
86
+ additionalProperties: z.ZodOptional<z.ZodBoolean>;
87
+ }, "strip", z.ZodTypeAny, {
88
+ type: "object";
89
+ properties: Record<string, unknown>;
90
+ required?: string[] | undefined;
91
+ additionalProperties?: boolean | undefined;
92
+ }, {
93
+ type: "object";
94
+ properties: Record<string, unknown>;
95
+ required?: string[] | undefined;
96
+ additionalProperties?: boolean | undefined;
97
+ }>;
98
+ action: z.ZodString;
99
+ actionHash: z.ZodString;
100
+ annotations: z.ZodOptional<z.ZodObject<{
101
+ title: z.ZodOptional<z.ZodString>;
102
+ readOnlyHint: z.ZodDefault<z.ZodBoolean>;
103
+ destructiveHint: z.ZodDefault<z.ZodBoolean>;
104
+ idempotentHint: z.ZodDefault<z.ZodBoolean>;
105
+ openWorldHint: z.ZodDefault<z.ZodBoolean>;
106
+ }, "strip", z.ZodTypeAny, {
107
+ readOnlyHint: boolean;
108
+ destructiveHint: boolean;
109
+ idempotentHint: boolean;
110
+ openWorldHint: boolean;
111
+ title?: string | undefined;
112
+ }, {
113
+ title?: string | undefined;
114
+ readOnlyHint?: boolean | undefined;
115
+ destructiveHint?: boolean | undefined;
116
+ idempotentHint?: boolean | undefined;
117
+ openWorldHint?: boolean | undefined;
118
+ }>>;
119
+ }, "strip", z.ZodTypeAny, {
120
+ name: string;
121
+ description: string;
122
+ inputSchema: {
123
+ type: "object";
124
+ properties: Record<string, unknown>;
125
+ required?: string[] | undefined;
126
+ additionalProperties?: boolean | undefined;
127
+ };
128
+ action: string;
129
+ actionHash: string;
130
+ title?: string | undefined;
131
+ annotations?: {
132
+ readOnlyHint: boolean;
133
+ destructiveHint: boolean;
134
+ idempotentHint: boolean;
135
+ openWorldHint: boolean;
136
+ title?: string | undefined;
137
+ } | undefined;
138
+ }, {
139
+ name: string;
140
+ description: string;
141
+ inputSchema: {
142
+ type: "object";
143
+ properties: Record<string, unknown>;
144
+ required?: string[] | undefined;
145
+ additionalProperties?: boolean | undefined;
146
+ };
147
+ action: string;
148
+ actionHash: string;
149
+ title?: string | undefined;
150
+ annotations?: {
151
+ title?: string | undefined;
152
+ readOnlyHint?: boolean | undefined;
153
+ destructiveHint?: boolean | undefined;
154
+ idempotentHint?: boolean | undefined;
155
+ openWorldHint?: boolean | undefined;
156
+ } | undefined;
157
+ }>;
158
+ /**
159
+ * Resource definition in a manifest.
160
+ */
161
+ export declare const ResourceSchema: z.ZodObject<{
162
+ name: z.ZodString;
163
+ uri: z.ZodString;
164
+ description: z.ZodOptional<z.ZodString>;
165
+ mimeType: z.ZodOptional<z.ZodString>;
166
+ }, "strip", z.ZodTypeAny, {
167
+ name: string;
168
+ uri: string;
169
+ description?: string | undefined;
170
+ mimeType?: string | undefined;
171
+ }, {
172
+ name: string;
173
+ uri: string;
174
+ description?: string | undefined;
175
+ mimeType?: string | undefined;
176
+ }>;
177
+ /**
178
+ * Prompt argument definition.
179
+ */
180
+ export declare const PromptArgSchema: z.ZodObject<{
181
+ name: z.ZodString;
182
+ description: z.ZodOptional<z.ZodString>;
183
+ required: z.ZodDefault<z.ZodBoolean>;
184
+ }, "strip", z.ZodTypeAny, {
185
+ name: string;
186
+ required: boolean;
187
+ description?: string | undefined;
188
+ }, {
189
+ name: string;
190
+ description?: string | undefined;
191
+ required?: boolean | undefined;
192
+ }>;
193
+ /**
194
+ * Text content in a prompt message (MCP TextContent).
195
+ */
196
+ export declare const PromptTextContentSchema: z.ZodObject<{
197
+ type: z.ZodLiteral<"text">;
198
+ text: z.ZodString;
199
+ }, "strip", z.ZodTypeAny, {
200
+ type: "text";
201
+ text: string;
202
+ }, {
203
+ type: "text";
204
+ text: string;
205
+ }>;
206
+ /**
207
+ * Embedded resource content in a prompt message (MCP EmbeddedResource).
208
+ */
209
+ export declare const PromptResourceContentSchema: z.ZodObject<{
210
+ type: z.ZodLiteral<"resource">;
211
+ resource: z.ZodObject<{
212
+ uri: z.ZodString;
213
+ text: z.ZodOptional<z.ZodString>;
214
+ mimeType: z.ZodOptional<z.ZodString>;
215
+ }, "strip", z.ZodTypeAny, {
216
+ uri: string;
217
+ mimeType?: string | undefined;
218
+ text?: string | undefined;
219
+ }, {
220
+ uri: string;
221
+ mimeType?: string | undefined;
222
+ text?: string | undefined;
223
+ }>;
224
+ }, "strip", z.ZodTypeAny, {
225
+ type: "resource";
226
+ resource: {
227
+ uri: string;
228
+ mimeType?: string | undefined;
229
+ text?: string | undefined;
230
+ };
231
+ }, {
232
+ type: "resource";
233
+ resource: {
234
+ uri: string;
235
+ mimeType?: string | undefined;
236
+ text?: string | undefined;
237
+ };
238
+ }>;
239
+ /**
240
+ * Content block in a prompt message.
241
+ * Matches MCP ContentBlock subset relevant for declarative prompts.
242
+ */
243
+ export declare const PromptContentSchema: z.ZodDiscriminatedUnion<"type", [z.ZodObject<{
244
+ type: z.ZodLiteral<"text">;
245
+ text: z.ZodString;
246
+ }, "strip", z.ZodTypeAny, {
247
+ type: "text";
248
+ text: string;
249
+ }, {
250
+ type: "text";
251
+ text: string;
252
+ }>, z.ZodObject<{
253
+ type: z.ZodLiteral<"resource">;
254
+ resource: z.ZodObject<{
255
+ uri: z.ZodString;
256
+ text: z.ZodOptional<z.ZodString>;
257
+ mimeType: z.ZodOptional<z.ZodString>;
258
+ }, "strip", z.ZodTypeAny, {
259
+ uri: string;
260
+ mimeType?: string | undefined;
261
+ text?: string | undefined;
262
+ }, {
263
+ uri: string;
264
+ mimeType?: string | undefined;
265
+ text?: string | undefined;
266
+ }>;
267
+ }, "strip", z.ZodTypeAny, {
268
+ type: "resource";
269
+ resource: {
270
+ uri: string;
271
+ mimeType?: string | undefined;
272
+ text?: string | undefined;
273
+ };
274
+ }, {
275
+ type: "resource";
276
+ resource: {
277
+ uri: string;
278
+ mimeType?: string | undefined;
279
+ text?: string | undefined;
280
+ };
281
+ }>]>;
282
+ /**
283
+ * A message in a prompt template (MCP PromptMessage).
284
+ */
285
+ export declare const PromptMessageSchema: z.ZodObject<{
286
+ role: z.ZodEnum<["user", "assistant"]>;
287
+ content: z.ZodDiscriminatedUnion<"type", [z.ZodObject<{
288
+ type: z.ZodLiteral<"text">;
289
+ text: z.ZodString;
290
+ }, "strip", z.ZodTypeAny, {
291
+ type: "text";
292
+ text: string;
293
+ }, {
294
+ type: "text";
295
+ text: string;
296
+ }>, z.ZodObject<{
297
+ type: z.ZodLiteral<"resource">;
298
+ resource: z.ZodObject<{
299
+ uri: z.ZodString;
300
+ text: z.ZodOptional<z.ZodString>;
301
+ mimeType: z.ZodOptional<z.ZodString>;
302
+ }, "strip", z.ZodTypeAny, {
303
+ uri: string;
304
+ mimeType?: string | undefined;
305
+ text?: string | undefined;
306
+ }, {
307
+ uri: string;
308
+ mimeType?: string | undefined;
309
+ text?: string | undefined;
310
+ }>;
311
+ }, "strip", z.ZodTypeAny, {
312
+ type: "resource";
313
+ resource: {
314
+ uri: string;
315
+ mimeType?: string | undefined;
316
+ text?: string | undefined;
317
+ };
318
+ }, {
319
+ type: "resource";
320
+ resource: {
321
+ uri: string;
322
+ mimeType?: string | undefined;
323
+ text?: string | undefined;
324
+ };
325
+ }>]>;
326
+ }, "strip", z.ZodTypeAny, {
327
+ role: "user" | "assistant";
328
+ content: {
329
+ type: "text";
330
+ text: string;
331
+ } | {
332
+ type: "resource";
333
+ resource: {
334
+ uri: string;
335
+ mimeType?: string | undefined;
336
+ text?: string | undefined;
337
+ };
338
+ };
339
+ }, {
340
+ role: "user" | "assistant";
341
+ content: {
342
+ type: "text";
343
+ text: string;
344
+ } | {
345
+ type: "resource";
346
+ resource: {
347
+ uri: string;
348
+ mimeType?: string | undefined;
349
+ text?: string | undefined;
350
+ };
351
+ };
352
+ }>;
353
+ /**
354
+ * Prompt definition in a manifest.
355
+ *
356
+ * When `messages` is provided, they are returned directly (with {{arg}} substitution).
357
+ * When omitted, a single user message is built from `description` + args.
358
+ */
359
+ export declare const PromptSchema: z.ZodObject<{
360
+ name: z.ZodString;
361
+ title: z.ZodOptional<z.ZodString>;
362
+ description: z.ZodString;
363
+ args: z.ZodOptional<z.ZodArray<z.ZodObject<{
364
+ name: z.ZodString;
365
+ description: z.ZodOptional<z.ZodString>;
366
+ required: z.ZodDefault<z.ZodBoolean>;
367
+ }, "strip", z.ZodTypeAny, {
368
+ name: string;
369
+ required: boolean;
370
+ description?: string | undefined;
371
+ }, {
372
+ name: string;
373
+ description?: string | undefined;
374
+ required?: boolean | undefined;
375
+ }>, "many">>;
376
+ messages: z.ZodOptional<z.ZodArray<z.ZodObject<{
377
+ role: z.ZodEnum<["user", "assistant"]>;
378
+ content: z.ZodDiscriminatedUnion<"type", [z.ZodObject<{
379
+ type: z.ZodLiteral<"text">;
380
+ text: z.ZodString;
381
+ }, "strip", z.ZodTypeAny, {
382
+ type: "text";
383
+ text: string;
384
+ }, {
385
+ type: "text";
386
+ text: string;
387
+ }>, z.ZodObject<{
388
+ type: z.ZodLiteral<"resource">;
389
+ resource: z.ZodObject<{
390
+ uri: z.ZodString;
391
+ text: z.ZodOptional<z.ZodString>;
392
+ mimeType: z.ZodOptional<z.ZodString>;
393
+ }, "strip", z.ZodTypeAny, {
394
+ uri: string;
395
+ mimeType?: string | undefined;
396
+ text?: string | undefined;
397
+ }, {
398
+ uri: string;
399
+ mimeType?: string | undefined;
400
+ text?: string | undefined;
401
+ }>;
402
+ }, "strip", z.ZodTypeAny, {
403
+ type: "resource";
404
+ resource: {
405
+ uri: string;
406
+ mimeType?: string | undefined;
407
+ text?: string | undefined;
408
+ };
409
+ }, {
410
+ type: "resource";
411
+ resource: {
412
+ uri: string;
413
+ mimeType?: string | undefined;
414
+ text?: string | undefined;
415
+ };
416
+ }>]>;
417
+ }, "strip", z.ZodTypeAny, {
418
+ role: "user" | "assistant";
419
+ content: {
420
+ type: "text";
421
+ text: string;
422
+ } | {
423
+ type: "resource";
424
+ resource: {
425
+ uri: string;
426
+ mimeType?: string | undefined;
427
+ text?: string | undefined;
428
+ };
429
+ };
430
+ }, {
431
+ role: "user" | "assistant";
432
+ content: {
433
+ type: "text";
434
+ text: string;
435
+ } | {
436
+ type: "resource";
437
+ resource: {
438
+ uri: string;
439
+ mimeType?: string | undefined;
440
+ text?: string | undefined;
441
+ };
442
+ };
443
+ }>, "many">>;
444
+ }, "strip", z.ZodTypeAny, {
445
+ name: string;
446
+ description: string;
447
+ title?: string | undefined;
448
+ args?: {
449
+ name: string;
450
+ required: boolean;
451
+ description?: string | undefined;
452
+ }[] | undefined;
453
+ messages?: {
454
+ role: "user" | "assistant";
455
+ content: {
456
+ type: "text";
457
+ text: string;
458
+ } | {
459
+ type: "resource";
460
+ resource: {
461
+ uri: string;
462
+ mimeType?: string | undefined;
463
+ text?: string | undefined;
464
+ };
465
+ };
466
+ }[] | undefined;
467
+ }, {
468
+ name: string;
469
+ description: string;
470
+ title?: string | undefined;
471
+ args?: {
472
+ name: string;
473
+ description?: string | undefined;
474
+ required?: boolean | undefined;
475
+ }[] | undefined;
476
+ messages?: {
477
+ role: "user" | "assistant";
478
+ content: {
479
+ type: "text";
480
+ text: string;
481
+ } | {
482
+ type: "resource";
483
+ resource: {
484
+ uri: string;
485
+ mimeType?: string | undefined;
486
+ text?: string | undefined;
487
+ };
488
+ };
489
+ }[] | undefined;
490
+ }>;
491
+ /**
492
+ * Complete manifest schema.
493
+ */
494
+ export declare const ManifestSchema: z.ZodObject<{
495
+ schemaVersion: z.ZodString;
496
+ name: z.ZodString;
497
+ version: z.ZodString;
498
+ description: z.ZodOptional<z.ZodString>;
499
+ instructions: z.ZodOptional<z.ZodString>;
500
+ secrets: z.ZodOptional<z.ZodArray<z.ZodObject<{
501
+ name: z.ZodString;
502
+ description: z.ZodOptional<z.ZodString>;
503
+ scope: z.ZodUnion<[z.ZodString, z.ZodArray<z.ZodString, "many">]>;
504
+ required: z.ZodDefault<z.ZodBoolean>;
505
+ }, "strip", z.ZodTypeAny, {
506
+ name: string;
507
+ scope: string | string[];
508
+ required: boolean;
509
+ description?: string | undefined;
510
+ }, {
511
+ name: string;
512
+ scope: string | string[];
513
+ description?: string | undefined;
514
+ required?: boolean | undefined;
515
+ }>, "many">>;
516
+ tools: z.ZodArray<z.ZodObject<{
517
+ name: z.ZodString;
518
+ title: z.ZodOptional<z.ZodString>;
519
+ description: z.ZodString;
520
+ inputSchema: z.ZodObject<{
521
+ type: z.ZodLiteral<"object">;
522
+ properties: z.ZodRecord<z.ZodString, z.ZodUnknown>;
523
+ required: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
524
+ additionalProperties: z.ZodOptional<z.ZodBoolean>;
525
+ }, "strip", z.ZodTypeAny, {
526
+ type: "object";
527
+ properties: Record<string, unknown>;
528
+ required?: string[] | undefined;
529
+ additionalProperties?: boolean | undefined;
530
+ }, {
531
+ type: "object";
532
+ properties: Record<string, unknown>;
533
+ required?: string[] | undefined;
534
+ additionalProperties?: boolean | undefined;
535
+ }>;
536
+ action: z.ZodString;
537
+ actionHash: z.ZodString;
538
+ annotations: z.ZodOptional<z.ZodObject<{
539
+ title: z.ZodOptional<z.ZodString>;
540
+ readOnlyHint: z.ZodDefault<z.ZodBoolean>;
541
+ destructiveHint: z.ZodDefault<z.ZodBoolean>;
542
+ idempotentHint: z.ZodDefault<z.ZodBoolean>;
543
+ openWorldHint: z.ZodDefault<z.ZodBoolean>;
544
+ }, "strip", z.ZodTypeAny, {
545
+ readOnlyHint: boolean;
546
+ destructiveHint: boolean;
547
+ idempotentHint: boolean;
548
+ openWorldHint: boolean;
549
+ title?: string | undefined;
550
+ }, {
551
+ title?: string | undefined;
552
+ readOnlyHint?: boolean | undefined;
553
+ destructiveHint?: boolean | undefined;
554
+ idempotentHint?: boolean | undefined;
555
+ openWorldHint?: boolean | undefined;
556
+ }>>;
557
+ }, "strip", z.ZodTypeAny, {
558
+ name: string;
559
+ description: string;
560
+ inputSchema: {
561
+ type: "object";
562
+ properties: Record<string, unknown>;
563
+ required?: string[] | undefined;
564
+ additionalProperties?: boolean | undefined;
565
+ };
566
+ action: string;
567
+ actionHash: string;
568
+ title?: string | undefined;
569
+ annotations?: {
570
+ readOnlyHint: boolean;
571
+ destructiveHint: boolean;
572
+ idempotentHint: boolean;
573
+ openWorldHint: boolean;
574
+ title?: string | undefined;
575
+ } | undefined;
576
+ }, {
577
+ name: string;
578
+ description: string;
579
+ inputSchema: {
580
+ type: "object";
581
+ properties: Record<string, unknown>;
582
+ required?: string[] | undefined;
583
+ additionalProperties?: boolean | undefined;
584
+ };
585
+ action: string;
586
+ actionHash: string;
587
+ title?: string | undefined;
588
+ annotations?: {
589
+ title?: string | undefined;
590
+ readOnlyHint?: boolean | undefined;
591
+ destructiveHint?: boolean | undefined;
592
+ idempotentHint?: boolean | undefined;
593
+ openWorldHint?: boolean | undefined;
594
+ } | undefined;
595
+ }>, "many">;
596
+ resources: z.ZodOptional<z.ZodArray<z.ZodObject<{
597
+ name: z.ZodString;
598
+ uri: z.ZodString;
599
+ description: z.ZodOptional<z.ZodString>;
600
+ mimeType: z.ZodOptional<z.ZodString>;
601
+ }, "strip", z.ZodTypeAny, {
602
+ name: string;
603
+ uri: string;
604
+ description?: string | undefined;
605
+ mimeType?: string | undefined;
606
+ }, {
607
+ name: string;
608
+ uri: string;
609
+ description?: string | undefined;
610
+ mimeType?: string | undefined;
611
+ }>, "many">>;
612
+ prompts: z.ZodOptional<z.ZodArray<z.ZodObject<{
613
+ name: z.ZodString;
614
+ title: z.ZodOptional<z.ZodString>;
615
+ description: z.ZodString;
616
+ args: z.ZodOptional<z.ZodArray<z.ZodObject<{
617
+ name: z.ZodString;
618
+ description: z.ZodOptional<z.ZodString>;
619
+ required: z.ZodDefault<z.ZodBoolean>;
620
+ }, "strip", z.ZodTypeAny, {
621
+ name: string;
622
+ required: boolean;
623
+ description?: string | undefined;
624
+ }, {
625
+ name: string;
626
+ description?: string | undefined;
627
+ required?: boolean | undefined;
628
+ }>, "many">>;
629
+ messages: z.ZodOptional<z.ZodArray<z.ZodObject<{
630
+ role: z.ZodEnum<["user", "assistant"]>;
631
+ content: z.ZodDiscriminatedUnion<"type", [z.ZodObject<{
632
+ type: z.ZodLiteral<"text">;
633
+ text: z.ZodString;
634
+ }, "strip", z.ZodTypeAny, {
635
+ type: "text";
636
+ text: string;
637
+ }, {
638
+ type: "text";
639
+ text: string;
640
+ }>, z.ZodObject<{
641
+ type: z.ZodLiteral<"resource">;
642
+ resource: z.ZodObject<{
643
+ uri: z.ZodString;
644
+ text: z.ZodOptional<z.ZodString>;
645
+ mimeType: z.ZodOptional<z.ZodString>;
646
+ }, "strip", z.ZodTypeAny, {
647
+ uri: string;
648
+ mimeType?: string | undefined;
649
+ text?: string | undefined;
650
+ }, {
651
+ uri: string;
652
+ mimeType?: string | undefined;
653
+ text?: string | undefined;
654
+ }>;
655
+ }, "strip", z.ZodTypeAny, {
656
+ type: "resource";
657
+ resource: {
658
+ uri: string;
659
+ mimeType?: string | undefined;
660
+ text?: string | undefined;
661
+ };
662
+ }, {
663
+ type: "resource";
664
+ resource: {
665
+ uri: string;
666
+ mimeType?: string | undefined;
667
+ text?: string | undefined;
668
+ };
669
+ }>]>;
670
+ }, "strip", z.ZodTypeAny, {
671
+ role: "user" | "assistant";
672
+ content: {
673
+ type: "text";
674
+ text: string;
675
+ } | {
676
+ type: "resource";
677
+ resource: {
678
+ uri: string;
679
+ mimeType?: string | undefined;
680
+ text?: string | undefined;
681
+ };
682
+ };
683
+ }, {
684
+ role: "user" | "assistant";
685
+ content: {
686
+ type: "text";
687
+ text: string;
688
+ } | {
689
+ type: "resource";
690
+ resource: {
691
+ uri: string;
692
+ mimeType?: string | undefined;
693
+ text?: string | undefined;
694
+ };
695
+ };
696
+ }>, "many">>;
697
+ }, "strip", z.ZodTypeAny, {
698
+ name: string;
699
+ description: string;
700
+ title?: string | undefined;
701
+ args?: {
702
+ name: string;
703
+ required: boolean;
704
+ description?: string | undefined;
705
+ }[] | undefined;
706
+ messages?: {
707
+ role: "user" | "assistant";
708
+ content: {
709
+ type: "text";
710
+ text: string;
711
+ } | {
712
+ type: "resource";
713
+ resource: {
714
+ uri: string;
715
+ mimeType?: string | undefined;
716
+ text?: string | undefined;
717
+ };
718
+ };
719
+ }[] | undefined;
720
+ }, {
721
+ name: string;
722
+ description: string;
723
+ title?: string | undefined;
724
+ args?: {
725
+ name: string;
726
+ description?: string | undefined;
727
+ required?: boolean | undefined;
728
+ }[] | undefined;
729
+ messages?: {
730
+ role: "user" | "assistant";
731
+ content: {
732
+ type: "text";
733
+ text: string;
734
+ } | {
735
+ type: "resource";
736
+ resource: {
737
+ uri: string;
738
+ mimeType?: string | undefined;
739
+ text?: string | undefined;
740
+ };
741
+ };
742
+ }[] | undefined;
743
+ }>, "many">>;
744
+ }, "strip", z.ZodTypeAny, {
745
+ name: string;
746
+ schemaVersion: string;
747
+ version: string;
748
+ tools: {
749
+ name: string;
750
+ description: string;
751
+ inputSchema: {
752
+ type: "object";
753
+ properties: Record<string, unknown>;
754
+ required?: string[] | undefined;
755
+ additionalProperties?: boolean | undefined;
756
+ };
757
+ action: string;
758
+ actionHash: string;
759
+ title?: string | undefined;
760
+ annotations?: {
761
+ readOnlyHint: boolean;
762
+ destructiveHint: boolean;
763
+ idempotentHint: boolean;
764
+ openWorldHint: boolean;
765
+ title?: string | undefined;
766
+ } | undefined;
767
+ }[];
768
+ description?: string | undefined;
769
+ instructions?: string | undefined;
770
+ secrets?: {
771
+ name: string;
772
+ scope: string | string[];
773
+ required: boolean;
774
+ description?: string | undefined;
775
+ }[] | undefined;
776
+ resources?: {
777
+ name: string;
778
+ uri: string;
779
+ description?: string | undefined;
780
+ mimeType?: string | undefined;
781
+ }[] | undefined;
782
+ prompts?: {
783
+ name: string;
784
+ description: string;
785
+ title?: string | undefined;
786
+ args?: {
787
+ name: string;
788
+ required: boolean;
789
+ description?: string | undefined;
790
+ }[] | undefined;
791
+ messages?: {
792
+ role: "user" | "assistant";
793
+ content: {
794
+ type: "text";
795
+ text: string;
796
+ } | {
797
+ type: "resource";
798
+ resource: {
799
+ uri: string;
800
+ mimeType?: string | undefined;
801
+ text?: string | undefined;
802
+ };
803
+ };
804
+ }[] | undefined;
805
+ }[] | undefined;
806
+ }, {
807
+ name: string;
808
+ schemaVersion: string;
809
+ version: string;
810
+ tools: {
811
+ name: string;
812
+ description: string;
813
+ inputSchema: {
814
+ type: "object";
815
+ properties: Record<string, unknown>;
816
+ required?: string[] | undefined;
817
+ additionalProperties?: boolean | undefined;
818
+ };
819
+ action: string;
820
+ actionHash: string;
821
+ title?: string | undefined;
822
+ annotations?: {
823
+ title?: string | undefined;
824
+ readOnlyHint?: boolean | undefined;
825
+ destructiveHint?: boolean | undefined;
826
+ idempotentHint?: boolean | undefined;
827
+ openWorldHint?: boolean | undefined;
828
+ } | undefined;
829
+ }[];
830
+ description?: string | undefined;
831
+ instructions?: string | undefined;
832
+ secrets?: {
833
+ name: string;
834
+ scope: string | string[];
835
+ description?: string | undefined;
836
+ required?: boolean | undefined;
837
+ }[] | undefined;
838
+ resources?: {
839
+ name: string;
840
+ uri: string;
841
+ description?: string | undefined;
842
+ mimeType?: string | undefined;
843
+ }[] | undefined;
844
+ prompts?: {
845
+ name: string;
846
+ description: string;
847
+ title?: string | undefined;
848
+ args?: {
849
+ name: string;
850
+ description?: string | undefined;
851
+ required?: boolean | undefined;
852
+ }[] | undefined;
853
+ messages?: {
854
+ role: "user" | "assistant";
855
+ content: {
856
+ type: "text";
857
+ text: string;
858
+ } | {
859
+ type: "resource";
860
+ resource: {
861
+ uri: string;
862
+ mimeType?: string | undefined;
863
+ text?: string | undefined;
864
+ };
865
+ };
866
+ }[] | undefined;
867
+ }[] | undefined;
868
+ }>;
869
+ /**
870
+ * Parsed manifest type.
871
+ */
872
+ export type Manifest = z.infer<typeof ManifestSchema>;
873
+ /**
874
+ * Secret type.
875
+ */
876
+ export type Secret = z.infer<typeof SecretSchema>;
877
+ /**
878
+ * Tool type.
879
+ */
880
+ export type Tool = z.infer<typeof ToolSchema>;
881
+ /**
882
+ * Resource type.
883
+ */
884
+ export type Resource = z.infer<typeof ResourceSchema>;
885
+ /**
886
+ * Prompt type.
887
+ */
888
+ export type Prompt = z.infer<typeof PromptSchema>;
889
+ /**
890
+ * Prompt message type.
891
+ */
892
+ export type PromptMessage = z.infer<typeof PromptMessageSchema>;
893
+ /**
894
+ * Prompt content type.
895
+ */
896
+ export type PromptContent = z.infer<typeof PromptContentSchema>;
897
+ /**
898
+ * Tool annotations type.
899
+ */
900
+ export type ToolAnnotations = z.infer<typeof ToolAnnotationsSchema>;
901
+ /**
902
+ * Parse and validate a manifest from YAML content.
903
+ */
904
+ export declare function parseManifest(yamlContent: string, parseYaml: (content: string) => unknown): Manifest;
905
+ /**
906
+ * Validate a manifest object.
907
+ */
908
+ export declare function validateManifest(manifest: unknown): Manifest;
909
+ //# sourceMappingURL=schema.d.ts.map