caplets 0.1.0 → 0.2.1
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/LICENSE +1 -1
- package/README.md +327 -2
- package/dist/index.js +3271 -106
- package/package.json +7 -3
- package/schemas/caplets-config.schema.json +218 -0
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "caplets",
|
|
3
|
-
"version": "0.1
|
|
3
|
+
"version": "0.2.1",
|
|
4
4
|
"description": "Progressive disclosure gateway for MCP servers.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"caplets",
|
|
@@ -14,7 +14,7 @@
|
|
|
14
14
|
"url": "https://github.com/spiritledsoftware/caplets/issues"
|
|
15
15
|
},
|
|
16
16
|
"license": "MIT",
|
|
17
|
-
"author": "
|
|
17
|
+
"author": "Spirit-Led Software LLC",
|
|
18
18
|
"repository": {
|
|
19
19
|
"type": "git",
|
|
20
20
|
"url": "git+https://github.com/spiritledsoftware/caplets.git"
|
|
@@ -24,6 +24,7 @@
|
|
|
24
24
|
},
|
|
25
25
|
"files": [
|
|
26
26
|
"dist",
|
|
27
|
+
"schemas",
|
|
27
28
|
"README.md",
|
|
28
29
|
"LICENSE"
|
|
29
30
|
],
|
|
@@ -37,6 +38,7 @@
|
|
|
37
38
|
},
|
|
38
39
|
"dependencies": {
|
|
39
40
|
"@modelcontextprotocol/sdk": "^1.29.0",
|
|
41
|
+
"commander": "^14.0.3",
|
|
40
42
|
"zod": "^4.4.3"
|
|
41
43
|
},
|
|
42
44
|
"devDependencies": {
|
|
@@ -67,9 +69,11 @@
|
|
|
67
69
|
"lint": "oxlint .",
|
|
68
70
|
"lint:fix": "oxlint --fix .",
|
|
69
71
|
"release": "pnpm build && changeset publish",
|
|
72
|
+
"schema:check": "rolldown -c rolldown.schema.config.ts && node dist-schema/generate-config-schema.js --check && rm -rf dist-schema",
|
|
73
|
+
"schema:generate": "rolldown -c rolldown.schema.config.ts && node dist-schema/generate-config-schema.js && rm -rf dist-schema",
|
|
70
74
|
"typecheck": "tsc --noEmit",
|
|
71
75
|
"test": "vitest run",
|
|
72
|
-
"verify": "pnpm format:check && pnpm lint && pnpm typecheck && pnpm test && pnpm build",
|
|
76
|
+
"verify": "pnpm format:check && pnpm lint && pnpm typecheck && pnpm schema:check && pnpm test && pnpm build",
|
|
73
77
|
"version-packages": "changeset version"
|
|
74
78
|
}
|
|
75
79
|
}
|
|
@@ -0,0 +1,218 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
3
|
+
"$id": "https://raw.githubusercontent.com/spiritledsoftware/caplets/main/schemas/caplets-config.schema.json",
|
|
4
|
+
"title": "Caplets config",
|
|
5
|
+
"description": "Configuration file for the Caplets progressive MCP disclosure gateway.",
|
|
6
|
+
"type": "object",
|
|
7
|
+
"properties": {
|
|
8
|
+
"$schema": {
|
|
9
|
+
"description": "Optional JSON Schema URL for editor validation.",
|
|
10
|
+
"type": "string",
|
|
11
|
+
"format": "uri"
|
|
12
|
+
},
|
|
13
|
+
"version": {
|
|
14
|
+
"default": 1,
|
|
15
|
+
"description": "Caplets config schema version.",
|
|
16
|
+
"type": "number",
|
|
17
|
+
"const": 1
|
|
18
|
+
},
|
|
19
|
+
"defaultSearchLimit": {
|
|
20
|
+
"default": 20,
|
|
21
|
+
"description": "Default maximum number of same-server search results.",
|
|
22
|
+
"type": "integer",
|
|
23
|
+
"exclusiveMinimum": 0,
|
|
24
|
+
"maximum": 9007199254740991
|
|
25
|
+
},
|
|
26
|
+
"maxSearchLimit": {
|
|
27
|
+
"default": 50,
|
|
28
|
+
"description": "Maximum accepted search_tools limit.",
|
|
29
|
+
"type": "integer",
|
|
30
|
+
"exclusiveMinimum": 0,
|
|
31
|
+
"maximum": 50
|
|
32
|
+
},
|
|
33
|
+
"mcpServers": {
|
|
34
|
+
"type": "object",
|
|
35
|
+
"propertyNames": {
|
|
36
|
+
"type": "string",
|
|
37
|
+
"pattern": "^[a-zA-Z0-9_-]{1,64}$"
|
|
38
|
+
},
|
|
39
|
+
"additionalProperties": {
|
|
40
|
+
"type": "object",
|
|
41
|
+
"properties": {
|
|
42
|
+
"name": {
|
|
43
|
+
"type": "string",
|
|
44
|
+
"minLength": 1,
|
|
45
|
+
"maxLength": 80,
|
|
46
|
+
"description": "Human-readable server display name."
|
|
47
|
+
},
|
|
48
|
+
"description": {
|
|
49
|
+
"type": "string",
|
|
50
|
+
"description": "Capability description shown to agents before downstream tools are disclosed."
|
|
51
|
+
},
|
|
52
|
+
"transport": {
|
|
53
|
+
"description": "Downstream MCP transport. Defaults to stdio when command is present.",
|
|
54
|
+
"type": "string",
|
|
55
|
+
"enum": ["stdio", "http", "sse"]
|
|
56
|
+
},
|
|
57
|
+
"command": {
|
|
58
|
+
"description": "Executable command for stdio servers.",
|
|
59
|
+
"type": "string",
|
|
60
|
+
"minLength": 1
|
|
61
|
+
},
|
|
62
|
+
"args": {
|
|
63
|
+
"description": "Arguments passed to the stdio command.",
|
|
64
|
+
"type": "array",
|
|
65
|
+
"items": {
|
|
66
|
+
"type": "string"
|
|
67
|
+
}
|
|
68
|
+
},
|
|
69
|
+
"env": {
|
|
70
|
+
"description": "Environment variables for stdio servers. Supports ${VAR} and $env:VAR.",
|
|
71
|
+
"type": "object",
|
|
72
|
+
"propertyNames": {
|
|
73
|
+
"type": "string"
|
|
74
|
+
},
|
|
75
|
+
"additionalProperties": {
|
|
76
|
+
"type": "string"
|
|
77
|
+
}
|
|
78
|
+
},
|
|
79
|
+
"cwd": {
|
|
80
|
+
"description": "Working directory for stdio servers.",
|
|
81
|
+
"type": "string",
|
|
82
|
+
"minLength": 1
|
|
83
|
+
},
|
|
84
|
+
"url": {
|
|
85
|
+
"description": "Remote MCP server URL for http or sse transport.",
|
|
86
|
+
"type": "string",
|
|
87
|
+
"format": "uri"
|
|
88
|
+
},
|
|
89
|
+
"auth": {
|
|
90
|
+
"oneOf": [
|
|
91
|
+
{
|
|
92
|
+
"type": "object",
|
|
93
|
+
"properties": {
|
|
94
|
+
"type": {
|
|
95
|
+
"type": "string",
|
|
96
|
+
"const": "none"
|
|
97
|
+
}
|
|
98
|
+
},
|
|
99
|
+
"required": ["type"],
|
|
100
|
+
"additionalProperties": false
|
|
101
|
+
},
|
|
102
|
+
{
|
|
103
|
+
"type": "object",
|
|
104
|
+
"properties": {
|
|
105
|
+
"type": {
|
|
106
|
+
"type": "string",
|
|
107
|
+
"const": "bearer"
|
|
108
|
+
},
|
|
109
|
+
"token": {
|
|
110
|
+
"type": "string",
|
|
111
|
+
"minLength": 1
|
|
112
|
+
}
|
|
113
|
+
},
|
|
114
|
+
"required": ["type", "token"],
|
|
115
|
+
"additionalProperties": false
|
|
116
|
+
},
|
|
117
|
+
{
|
|
118
|
+
"type": "object",
|
|
119
|
+
"properties": {
|
|
120
|
+
"type": {
|
|
121
|
+
"type": "string",
|
|
122
|
+
"const": "headers"
|
|
123
|
+
},
|
|
124
|
+
"headers": {
|
|
125
|
+
"type": "object",
|
|
126
|
+
"propertyNames": {
|
|
127
|
+
"type": "string"
|
|
128
|
+
},
|
|
129
|
+
"additionalProperties": {
|
|
130
|
+
"type": "string",
|
|
131
|
+
"minLength": 1
|
|
132
|
+
}
|
|
133
|
+
}
|
|
134
|
+
},
|
|
135
|
+
"required": ["type", "headers"],
|
|
136
|
+
"additionalProperties": false
|
|
137
|
+
},
|
|
138
|
+
{
|
|
139
|
+
"type": "object",
|
|
140
|
+
"properties": {
|
|
141
|
+
"type": {
|
|
142
|
+
"type": "string",
|
|
143
|
+
"const": "oauth2"
|
|
144
|
+
},
|
|
145
|
+
"authorizationUrl": {
|
|
146
|
+
"type": "string",
|
|
147
|
+
"format": "uri"
|
|
148
|
+
},
|
|
149
|
+
"tokenUrl": {
|
|
150
|
+
"type": "string",
|
|
151
|
+
"format": "uri"
|
|
152
|
+
},
|
|
153
|
+
"issuer": {
|
|
154
|
+
"type": "string",
|
|
155
|
+
"format": "uri"
|
|
156
|
+
},
|
|
157
|
+
"clientId": {
|
|
158
|
+
"type": "string",
|
|
159
|
+
"minLength": 1
|
|
160
|
+
},
|
|
161
|
+
"clientSecret": {
|
|
162
|
+
"type": "string",
|
|
163
|
+
"minLength": 1
|
|
164
|
+
},
|
|
165
|
+
"scopes": {
|
|
166
|
+
"type": "array",
|
|
167
|
+
"items": {
|
|
168
|
+
"type": "string",
|
|
169
|
+
"minLength": 1
|
|
170
|
+
}
|
|
171
|
+
},
|
|
172
|
+
"redirectUri": {
|
|
173
|
+
"type": "string",
|
|
174
|
+
"format": "uri"
|
|
175
|
+
}
|
|
176
|
+
},
|
|
177
|
+
"required": ["type"],
|
|
178
|
+
"additionalProperties": false
|
|
179
|
+
}
|
|
180
|
+
],
|
|
181
|
+
"description": "Authentication settings for a remote MCP server."
|
|
182
|
+
},
|
|
183
|
+
"startupTimeoutMs": {
|
|
184
|
+
"default": 10000,
|
|
185
|
+
"description": "Timeout in milliseconds for starting or checking a downstream server.",
|
|
186
|
+
"type": "integer",
|
|
187
|
+
"exclusiveMinimum": 0,
|
|
188
|
+
"maximum": 9007199254740991
|
|
189
|
+
},
|
|
190
|
+
"callTimeoutMs": {
|
|
191
|
+
"default": 60000,
|
|
192
|
+
"description": "Timeout in milliseconds for downstream tool calls.",
|
|
193
|
+
"type": "integer",
|
|
194
|
+
"exclusiveMinimum": 0,
|
|
195
|
+
"maximum": 9007199254740991
|
|
196
|
+
},
|
|
197
|
+
"toolCacheTtlMs": {
|
|
198
|
+
"default": 30000,
|
|
199
|
+
"description": "Milliseconds downstream tool metadata stays fresh. Set 0 to refresh every time.",
|
|
200
|
+
"type": "integer",
|
|
201
|
+
"minimum": 0,
|
|
202
|
+
"maximum": 9007199254740991
|
|
203
|
+
},
|
|
204
|
+
"disabled": {
|
|
205
|
+
"default": false,
|
|
206
|
+
"description": "When true, omit this server from Caplets discovery and do not start it.",
|
|
207
|
+
"type": "boolean"
|
|
208
|
+
}
|
|
209
|
+
},
|
|
210
|
+
"required": ["name", "description"],
|
|
211
|
+
"additionalProperties": false
|
|
212
|
+
},
|
|
213
|
+
"description": "Downstream MCP servers keyed by stable server ID."
|
|
214
|
+
}
|
|
215
|
+
},
|
|
216
|
+
"required": ["mcpServers"],
|
|
217
|
+
"additionalProperties": false
|
|
218
|
+
}
|