@yawlabs/caddy-mcp 1.2.1 → 1.2.2
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 +1 -1
- package/dist/index.js +5 -3
- package/dist/server.js +5 -3
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -116,7 +116,7 @@ Use the same JSON block shown above in any of these.
|
|
|
116
116
|
### TLS & config conversion (2)
|
|
117
117
|
|
|
118
118
|
- **caddy_tls** — Check or set TLS settings: ACME email, ACME CA URL. PATCH first; on a fresh install, POSTs a minimal config. On an existing config it deep-merges into the issuer path and PUTs the result back, preserving siblings (custom certs, `on_demand`, additional policies). Refuses with a shape-specific error if the existing structure is unexpected — never clobbers.
|
|
119
|
-
- **caddy_adapt** — Convert a
|
|
119
|
+
- **caddy_adapt** — Convert a config in any registered adapter format to Caddy JSON without applying it. `caddyfile` (built-in, default) plus any adapter module compiled into your Caddy binary — e.g., `nginx` ([caddy-nginx-adapter](https://github.com/caddyserver/nginx-adapter)), `yaml` ([caddy-yaml](https://github.com/abiosoft/caddy-yaml)). Great for previewing or porting from existing configs.
|
|
120
120
|
|
|
121
121
|
### Server operations (6)
|
|
122
122
|
|
package/dist/index.js
CHANGED
|
@@ -330,10 +330,12 @@ function formatWarning(w) {
|
|
|
330
330
|
function registerAdaptTools(server) {
|
|
331
331
|
server.tool(
|
|
332
332
|
"caddy_adapt",
|
|
333
|
-
"Convert a
|
|
333
|
+
"Convert a config in any registered adapter format to Caddy JSON without loading it. Useful for previewing what a Caddyfile produces, or for porting from nginx/yaml configs when Caddy is built with the matching adapter module ('caddyfile' is built-in; 'nginx', 'yaml', etc. require their adapter modules to be compiled into the Caddy binary). Returns the adapted JSON and any warnings separately.",
|
|
334
334
|
{
|
|
335
|
-
config: z.string().describe("The raw config text (e.g., Caddyfile contents)"),
|
|
336
|
-
adapter: z.string().regex(/^[a-z0-9_-]+$/i, "Adapter must be alphanumeric, hyphens, or underscores").max(64).optional().default("caddyfile").describe(
|
|
335
|
+
config: z.string().describe("The raw config text (e.g., Caddyfile contents, nginx.conf, yaml)"),
|
|
336
|
+
adapter: z.string().regex(/^[a-z0-9_-]+$/i, "Adapter must be alphanumeric, hyphens, or underscores").max(64).optional().default("caddyfile").describe(
|
|
337
|
+
"Config format adapter. Must match an adapter Caddy was built with. Built-in: 'caddyfile' (default). Common external adapters: 'nginx' (caddy-nginx-adapter), 'yaml' (caddy-yaml)."
|
|
338
|
+
)
|
|
337
339
|
},
|
|
338
340
|
{ readOnlyHint: true, destructiveHint: false, idempotentHint: true, openWorldHint: false },
|
|
339
341
|
async ({ config, adapter }) => {
|
package/dist/server.js
CHANGED
|
@@ -328,10 +328,12 @@ function formatWarning(w) {
|
|
|
328
328
|
function registerAdaptTools(server) {
|
|
329
329
|
server.tool(
|
|
330
330
|
"caddy_adapt",
|
|
331
|
-
"Convert a
|
|
331
|
+
"Convert a config in any registered adapter format to Caddy JSON without loading it. Useful for previewing what a Caddyfile produces, or for porting from nginx/yaml configs when Caddy is built with the matching adapter module ('caddyfile' is built-in; 'nginx', 'yaml', etc. require their adapter modules to be compiled into the Caddy binary). Returns the adapted JSON and any warnings separately.",
|
|
332
332
|
{
|
|
333
|
-
config: z.string().describe("The raw config text (e.g., Caddyfile contents)"),
|
|
334
|
-
adapter: z.string().regex(/^[a-z0-9_-]+$/i, "Adapter must be alphanumeric, hyphens, or underscores").max(64).optional().default("caddyfile").describe(
|
|
333
|
+
config: z.string().describe("The raw config text (e.g., Caddyfile contents, nginx.conf, yaml)"),
|
|
334
|
+
adapter: z.string().regex(/^[a-z0-9_-]+$/i, "Adapter must be alphanumeric, hyphens, or underscores").max(64).optional().default("caddyfile").describe(
|
|
335
|
+
"Config format adapter. Must match an adapter Caddy was built with. Built-in: 'caddyfile' (default). Common external adapters: 'nginx' (caddy-nginx-adapter), 'yaml' (caddy-yaml)."
|
|
336
|
+
)
|
|
335
337
|
},
|
|
336
338
|
{ readOnlyHint: true, destructiveHint: false, idempotentHint: true, openWorldHint: false },
|
|
337
339
|
async ({ config, adapter }) => {
|