@yawlabs/caddy-mcp 2.5.7 → 2.5.9
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/bin/caddy-mcp.mjs +5 -5
- package/dist/index.js +8 -1
- package/dist/server.js +8 -1
- package/package.json +5 -4
package/README.md
CHANGED
|
@@ -306,7 +306,7 @@ npm install
|
|
|
306
306
|
npm run lint # Biome check
|
|
307
307
|
npm run lint:fix # Auto-fix
|
|
308
308
|
npm run build # tsup bundle
|
|
309
|
-
npm test # Vitest (
|
|
309
|
+
npm test # Vitest (782 unit tests, +39 POSIX-only unix-socket and launcher tests; +39 live-Caddy integration tests gated by CADDY_MCP_INTEGRATION=1)
|
|
310
310
|
npm run typecheck # tsc --noEmit
|
|
311
311
|
```
|
|
312
312
|
|
package/bin/caddy-mcp.mjs
CHANGED
|
@@ -68,8 +68,8 @@
|
|
|
68
68
|
* real oam 0.8.2 host, the MCP handshake never answered. Piping the streams
|
|
69
69
|
* explicitly completes it, to both oam and Node. The sandbox spawn from a
|
|
70
70
|
* supported oam host pipes too -- one rule for every oam host, verified with a
|
|
71
|
-
* real handshake on 0.15.2. A Node host keeps
|
|
72
|
-
* same fds untouched.
|
|
71
|
+
* real handshake on 0.18.0 (first measured on 0.15.2). A Node host keeps
|
|
72
|
+
* `inherit`, which hands over the same fds untouched.
|
|
73
73
|
*
|
|
74
74
|
* The sandbox asks for a spawn; it does not guarantee one. Discovery can still
|
|
75
75
|
* come up empty -- no usable oam binary, or a spawn that fails -- and under
|
|
@@ -112,7 +112,7 @@
|
|
|
112
112
|
* "unauthenticated". The env list is derived from the shipped bundle.
|
|
113
113
|
*
|
|
114
114
|
* MINIMUM OAM VERSION
|
|
115
|
-
* The latest oam release, 0.
|
|
115
|
+
* The latest oam release, 0.18.0 -- bump OAM_MIN when oam ships a newer one.
|
|
116
116
|
* Only the current oam is used and verified; an older one is passed over. The
|
|
117
117
|
* floor is not cosmetic: before 0.9.0 `child_process.execFile` ran its
|
|
118
118
|
* arguments through a SHELL, `exec` accepted `timeout` and ignored it,
|
|
@@ -142,7 +142,7 @@ import { delimiter, join } from "node:path";
|
|
|
142
142
|
import { fileURLToPath } from "node:url";
|
|
143
143
|
|
|
144
144
|
/** Oldest oam this server is served on. See MINIMUM OAM VERSION above. */
|
|
145
|
-
const OAM_MIN = [0,
|
|
145
|
+
const OAM_MIN = [0, 18, 0];
|
|
146
146
|
|
|
147
147
|
/**
|
|
148
148
|
* Bound on each `oam --version` probe. A healthy oam answers in milliseconds;
|
|
@@ -357,7 +357,7 @@ function sandboxFlags() {
|
|
|
357
357
|
// Omitting the flag DENIES the category (oam reads an absent --allow-net as
|
|
358
358
|
// false, a bare one as "*"), and denial costs nothing here: oam has no unix
|
|
359
359
|
// socket transport at all, so api.ts's node:http `socketPath` dial cannot work
|
|
360
|
-
// under oam whether the grant is open or closed. Re-verified against oam 0.
|
|
360
|
+
// under oam whether the grant is open or closed. Re-verified against oam 0.18.0 --
|
|
361
361
|
// bare grant lets an unrelated host through, omitted grant denies it.
|
|
362
362
|
//
|
|
363
363
|
// This mirrors getMalformedUnixUrl's predicate in src/api.ts, NOT the stricter
|
package/dist/index.js
CHANGED
|
@@ -1633,7 +1633,14 @@ function registerRouteTools(server) {
|
|
|
1633
1633
|
"Optional stable @id for the route. When set, repeat calls REPLACE the route in place (idempotent). When omitted, the route is APPENDED \u2014 calling twice with identical args creates a duplicate route. @ids are config-global in Caddy: if this id is already used by a non-route object the call refuses rather than clobbering it."
|
|
1634
1634
|
)
|
|
1635
1635
|
},
|
|
1636
|
-
|
|
1636
|
+
// destructiveHint is TRUE because the hint covers the whole tool and a host
|
|
1637
|
+
// gates on it before it can see whether the call carries an `id`: with one,
|
|
1638
|
+
// an existing route under that @id is REPLACED wholesale by a PATCH -- its
|
|
1639
|
+
// matchers, its handlers, a subroute holding a whole site's nested routes,
|
|
1640
|
+
// all of it -- which is not the "only additive updates" MCP reserves
|
|
1641
|
+
// destructiveHint:false for. Without an `id` the call only appends. Same
|
|
1642
|
+
// worst-case rule as caddy_config_set and caddy_config_by_id.
|
|
1643
|
+
{ readOnlyHint: false, destructiveHint: true, idempotentHint: false, openWorldHint: false },
|
|
1637
1644
|
async ({ from, to, server: srv, id }) => {
|
|
1638
1645
|
const match = parseFrom(from.trim());
|
|
1639
1646
|
if (match.host?.[0]?.trim() === "" || match.host === void 0 && match.path === void 0) {
|
package/dist/server.js
CHANGED
|
@@ -1631,7 +1631,14 @@ function registerRouteTools(server) {
|
|
|
1631
1631
|
"Optional stable @id for the route. When set, repeat calls REPLACE the route in place (idempotent). When omitted, the route is APPENDED \u2014 calling twice with identical args creates a duplicate route. @ids are config-global in Caddy: if this id is already used by a non-route object the call refuses rather than clobbering it."
|
|
1632
1632
|
)
|
|
1633
1633
|
},
|
|
1634
|
-
|
|
1634
|
+
// destructiveHint is TRUE because the hint covers the whole tool and a host
|
|
1635
|
+
// gates on it before it can see whether the call carries an `id`: with one,
|
|
1636
|
+
// an existing route under that @id is REPLACED wholesale by a PATCH -- its
|
|
1637
|
+
// matchers, its handlers, a subroute holding a whole site's nested routes,
|
|
1638
|
+
// all of it -- which is not the "only additive updates" MCP reserves
|
|
1639
|
+
// destructiveHint:false for. Without an `id` the call only appends. Same
|
|
1640
|
+
// worst-case rule as caddy_config_set and caddy_config_by_id.
|
|
1641
|
+
{ readOnlyHint: false, destructiveHint: true, idempotentHint: false, openWorldHint: false },
|
|
1635
1642
|
async ({ from, to, server: srv, id }) => {
|
|
1636
1643
|
const match = parseFrom(from.trim());
|
|
1637
1644
|
if (match.host?.[0]?.trim() === "" || match.host === void 0 && match.path === void 0) {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@yawlabs/caddy-mcp",
|
|
3
|
-
"version": "2.5.
|
|
3
|
+
"version": "2.5.9",
|
|
4
4
|
"mcpName": "io.github.YawLabs/caddy-mcp",
|
|
5
5
|
"description": "Caddy MCP server for Claude Code, Cursor, and any MCP client: admin API, config, routes, reverse proxy, TLS, PKI, metrics",
|
|
6
6
|
"license": "MIT",
|
|
@@ -38,15 +38,16 @@
|
|
|
38
38
|
"start": "node dist/index.js"
|
|
39
39
|
},
|
|
40
40
|
"dependencies": {
|
|
41
|
-
"@modelcontextprotocol/sdk": "^1.
|
|
41
|
+
"@modelcontextprotocol/sdk": "^1.32.1",
|
|
42
42
|
"zod": "^4.3.6"
|
|
43
43
|
},
|
|
44
44
|
"overrides": {
|
|
45
45
|
"hono": "^4.13.5",
|
|
46
46
|
"@hono/node-server": "^1.19.15",
|
|
47
47
|
"postcss": "^8.5.23",
|
|
48
|
-
"ip-address": "^10.3
|
|
49
|
-
"
|
|
48
|
+
"ip-address": "^10.7.3",
|
|
49
|
+
"proxy-addr": "^2.0.8",
|
|
50
|
+
"fast-uri": "^3.1.8",
|
|
50
51
|
"qs": "^6.16.0",
|
|
51
52
|
"esbuild": "^0.28.1"
|
|
52
53
|
},
|