caplets 0.2.0 → 0.3.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 +45 -4
- package/dist/index.js +8099 -317
- package/package.json +3 -1
- package/schemas/caplet.schema.json +195 -0
- package/schemas/caplets-config.schema.json +11 -3
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "caplets",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.3.0",
|
|
4
4
|
"description": "Progressive disclosure gateway for MCP servers.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"caplets",
|
|
@@ -39,6 +39,8 @@
|
|
|
39
39
|
"dependencies": {
|
|
40
40
|
"@modelcontextprotocol/sdk": "^1.29.0",
|
|
41
41
|
"commander": "^14.0.3",
|
|
42
|
+
"vfile": "^6.0.3",
|
|
43
|
+
"vfile-matter": "^5.0.1",
|
|
42
44
|
"zod": "^4.4.3"
|
|
43
45
|
},
|
|
44
46
|
"devDependencies": {
|
|
@@ -0,0 +1,195 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
3
|
+
"$id": "https://raw.githubusercontent.com/spiritledsoftware/caplets/main/schemas/caplet.schema.json",
|
|
4
|
+
"title": "Caplet file frontmatter",
|
|
5
|
+
"description": "YAML frontmatter schema for a Markdown Caplet file.",
|
|
6
|
+
"type": "object",
|
|
7
|
+
"properties": {
|
|
8
|
+
"$schema": {
|
|
9
|
+
"description": "Optional JSON Schema URL for editor validation.",
|
|
10
|
+
"type": "string",
|
|
11
|
+
"format": "uri"
|
|
12
|
+
},
|
|
13
|
+
"name": {
|
|
14
|
+
"type": "string",
|
|
15
|
+
"minLength": 1,
|
|
16
|
+
"maxLength": 80,
|
|
17
|
+
"description": "Human-readable Caplet display name."
|
|
18
|
+
},
|
|
19
|
+
"description": {
|
|
20
|
+
"type": "string",
|
|
21
|
+
"description": "Compact capability description shown before the full Caplet card is disclosed."
|
|
22
|
+
},
|
|
23
|
+
"tags": {
|
|
24
|
+
"description": "Optional tags for grouping or searching Caplets.",
|
|
25
|
+
"type": "array",
|
|
26
|
+
"items": {
|
|
27
|
+
"type": "string",
|
|
28
|
+
"minLength": 1,
|
|
29
|
+
"maxLength": 80
|
|
30
|
+
}
|
|
31
|
+
},
|
|
32
|
+
"mcpServer": {
|
|
33
|
+
"type": "object",
|
|
34
|
+
"properties": {
|
|
35
|
+
"transport": {
|
|
36
|
+
"description": "Downstream MCP transport. Defaults to stdio when command is present.",
|
|
37
|
+
"type": "string",
|
|
38
|
+
"enum": ["stdio", "http", "sse"]
|
|
39
|
+
},
|
|
40
|
+
"command": {
|
|
41
|
+
"description": "Executable command for stdio servers.",
|
|
42
|
+
"type": "string",
|
|
43
|
+
"minLength": 1
|
|
44
|
+
},
|
|
45
|
+
"args": {
|
|
46
|
+
"description": "Arguments passed to the stdio command.",
|
|
47
|
+
"type": "array",
|
|
48
|
+
"items": {
|
|
49
|
+
"type": "string"
|
|
50
|
+
}
|
|
51
|
+
},
|
|
52
|
+
"env": {
|
|
53
|
+
"description": "Environment variables for stdio servers. Supports ${VAR} and $env:VAR.",
|
|
54
|
+
"type": "object",
|
|
55
|
+
"propertyNames": {
|
|
56
|
+
"type": "string"
|
|
57
|
+
},
|
|
58
|
+
"additionalProperties": {
|
|
59
|
+
"type": "string"
|
|
60
|
+
}
|
|
61
|
+
},
|
|
62
|
+
"cwd": {
|
|
63
|
+
"description": "Working directory for stdio servers.",
|
|
64
|
+
"type": "string",
|
|
65
|
+
"minLength": 1
|
|
66
|
+
},
|
|
67
|
+
"url": {
|
|
68
|
+
"description": "Remote MCP server URL for http or sse transport.",
|
|
69
|
+
"type": "string",
|
|
70
|
+
"minLength": 1
|
|
71
|
+
},
|
|
72
|
+
"auth": {
|
|
73
|
+
"oneOf": [
|
|
74
|
+
{
|
|
75
|
+
"type": "object",
|
|
76
|
+
"properties": {
|
|
77
|
+
"type": {
|
|
78
|
+
"type": "string",
|
|
79
|
+
"const": "none"
|
|
80
|
+
}
|
|
81
|
+
},
|
|
82
|
+
"required": ["type"],
|
|
83
|
+
"additionalProperties": false
|
|
84
|
+
},
|
|
85
|
+
{
|
|
86
|
+
"type": "object",
|
|
87
|
+
"properties": {
|
|
88
|
+
"type": {
|
|
89
|
+
"type": "string",
|
|
90
|
+
"const": "bearer"
|
|
91
|
+
},
|
|
92
|
+
"token": {
|
|
93
|
+
"type": "string",
|
|
94
|
+
"minLength": 1
|
|
95
|
+
}
|
|
96
|
+
},
|
|
97
|
+
"required": ["type", "token"],
|
|
98
|
+
"additionalProperties": false
|
|
99
|
+
},
|
|
100
|
+
{
|
|
101
|
+
"type": "object",
|
|
102
|
+
"properties": {
|
|
103
|
+
"type": {
|
|
104
|
+
"type": "string",
|
|
105
|
+
"const": "headers"
|
|
106
|
+
},
|
|
107
|
+
"headers": {
|
|
108
|
+
"type": "object",
|
|
109
|
+
"propertyNames": {
|
|
110
|
+
"type": "string"
|
|
111
|
+
},
|
|
112
|
+
"additionalProperties": {
|
|
113
|
+
"type": "string",
|
|
114
|
+
"minLength": 1
|
|
115
|
+
}
|
|
116
|
+
}
|
|
117
|
+
},
|
|
118
|
+
"required": ["type", "headers"],
|
|
119
|
+
"additionalProperties": false
|
|
120
|
+
},
|
|
121
|
+
{
|
|
122
|
+
"type": "object",
|
|
123
|
+
"properties": {
|
|
124
|
+
"type": {
|
|
125
|
+
"type": "string",
|
|
126
|
+
"const": "oauth2"
|
|
127
|
+
},
|
|
128
|
+
"authorizationUrl": {
|
|
129
|
+
"type": "string",
|
|
130
|
+
"minLength": 1
|
|
131
|
+
},
|
|
132
|
+
"tokenUrl": {
|
|
133
|
+
"type": "string",
|
|
134
|
+
"minLength": 1
|
|
135
|
+
},
|
|
136
|
+
"issuer": {
|
|
137
|
+
"type": "string",
|
|
138
|
+
"minLength": 1
|
|
139
|
+
},
|
|
140
|
+
"clientId": {
|
|
141
|
+
"type": "string",
|
|
142
|
+
"minLength": 1
|
|
143
|
+
},
|
|
144
|
+
"clientSecret": {
|
|
145
|
+
"type": "string",
|
|
146
|
+
"minLength": 1
|
|
147
|
+
},
|
|
148
|
+
"scopes": {
|
|
149
|
+
"type": "array",
|
|
150
|
+
"items": {
|
|
151
|
+
"type": "string",
|
|
152
|
+
"minLength": 1
|
|
153
|
+
}
|
|
154
|
+
},
|
|
155
|
+
"redirectUri": {
|
|
156
|
+
"type": "string",
|
|
157
|
+
"minLength": 1
|
|
158
|
+
}
|
|
159
|
+
},
|
|
160
|
+
"required": ["type"],
|
|
161
|
+
"additionalProperties": false
|
|
162
|
+
}
|
|
163
|
+
],
|
|
164
|
+
"description": "Authentication settings for a remote MCP server."
|
|
165
|
+
},
|
|
166
|
+
"startupTimeoutMs": {
|
|
167
|
+
"description": "Timeout in milliseconds for starting or checking a downstream server.",
|
|
168
|
+
"type": "integer",
|
|
169
|
+
"exclusiveMinimum": 0,
|
|
170
|
+
"maximum": 9007199254740991
|
|
171
|
+
},
|
|
172
|
+
"callTimeoutMs": {
|
|
173
|
+
"description": "Timeout in milliseconds for downstream tool calls.",
|
|
174
|
+
"type": "integer",
|
|
175
|
+
"exclusiveMinimum": 0,
|
|
176
|
+
"maximum": 9007199254740991
|
|
177
|
+
},
|
|
178
|
+
"toolCacheTtlMs": {
|
|
179
|
+
"description": "Milliseconds downstream tool metadata stays fresh. Set 0 to refresh every time.",
|
|
180
|
+
"type": "integer",
|
|
181
|
+
"minimum": 0,
|
|
182
|
+
"maximum": 9007199254740991
|
|
183
|
+
},
|
|
184
|
+
"disabled": {
|
|
185
|
+
"description": "When true, omit this Caplet from discovery and do not start its MCP server.",
|
|
186
|
+
"type": "boolean"
|
|
187
|
+
}
|
|
188
|
+
},
|
|
189
|
+
"additionalProperties": false,
|
|
190
|
+
"description": "Required MCP server backend configuration for this Caplet."
|
|
191
|
+
}
|
|
192
|
+
},
|
|
193
|
+
"required": ["name", "description", "mcpServer"],
|
|
194
|
+
"additionalProperties": false
|
|
195
|
+
}
|
|
@@ -31,6 +31,8 @@
|
|
|
31
31
|
"maximum": 50
|
|
32
32
|
},
|
|
33
33
|
"mcpServers": {
|
|
34
|
+
"default": {},
|
|
35
|
+
"description": "Downstream MCP servers keyed by stable server ID.",
|
|
34
36
|
"type": "object",
|
|
35
37
|
"propertyNames": {
|
|
36
38
|
"type": "string",
|
|
@@ -180,6 +182,14 @@
|
|
|
180
182
|
],
|
|
181
183
|
"description": "Authentication settings for a remote MCP server."
|
|
182
184
|
},
|
|
185
|
+
"tags": {
|
|
186
|
+
"type": "array",
|
|
187
|
+
"items": {
|
|
188
|
+
"type": "string",
|
|
189
|
+
"minLength": 1,
|
|
190
|
+
"maxLength": 80
|
|
191
|
+
}
|
|
192
|
+
},
|
|
183
193
|
"startupTimeoutMs": {
|
|
184
194
|
"default": 10000,
|
|
185
195
|
"description": "Timeout in milliseconds for starting or checking a downstream server.",
|
|
@@ -209,10 +219,8 @@
|
|
|
209
219
|
},
|
|
210
220
|
"required": ["name", "description"],
|
|
211
221
|
"additionalProperties": false
|
|
212
|
-
}
|
|
213
|
-
"description": "Downstream MCP servers keyed by stable server ID."
|
|
222
|
+
}
|
|
214
223
|
}
|
|
215
224
|
},
|
|
216
|
-
"required": ["mcpServers"],
|
|
217
225
|
"additionalProperties": false
|
|
218
226
|
}
|