@adtl/gateway 0.3.1 → 0.3.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 +17 -0
- package/dist/cli.js +44 -14
- package/dist/cli.js.map +1 -1
- package/dist/config.d.ts +49 -44
- package/dist/config.d.ts.map +1 -1
- package/dist/config.js +10 -3
- package/dist/config.js.map +1 -1
- package/dist/gateway.d.ts +1 -1
- package/dist/gateway.js +1 -1
- package/dist/init/fromMcpJson.d.ts +41 -0
- package/dist/init/fromMcpJson.d.ts.map +1 -0
- package/dist/init/fromMcpJson.js +141 -0
- package/dist/init/fromMcpJson.js.map +1 -0
- package/dist/init/index.d.ts +2 -0
- package/dist/init/index.d.ts.map +1 -1
- package/dist/init/index.js +2 -0
- package/dist/init/index.js.map +1 -1
- package/dist/init/run.d.ts +13 -0
- package/dist/init/run.d.ts.map +1 -1
- package/dist/init/run.js +83 -11
- package/dist/init/run.js.map +1 -1
- package/dist/startup.d.ts +2 -0
- package/dist/startup.d.ts.map +1 -1
- package/dist/startup.js +5 -0
- package/dist/startup.js.map +1 -1
- package/package.json +4 -4
- package/src/cli.ts +36 -14
- package/src/config.ts +9 -3
- package/src/gateway.ts +1 -1
- package/src/init/fromMcpJson.ts +165 -0
- package/src/init/index.ts +2 -0
- package/src/init/run.ts +91 -12
- package/src/startup.ts +6 -0
package/README.md
CHANGED
|
@@ -78,6 +78,23 @@ adtl-gateway init -c adtl.yaml --write # update the file (original kept as adt
|
|
|
78
78
|
|
|
79
79
|
Always review the result: a preset is a starting point, not a judgment about your data.
|
|
80
80
|
|
|
81
|
+
#### Starting from Claude Code's `.mcp.json`
|
|
82
|
+
|
|
83
|
+
If your servers are already set up in Claude Code, import them:
|
|
84
|
+
|
|
85
|
+
```sh
|
|
86
|
+
adtl-gateway init -c adtl.yaml --from .mcp.json # print both files, change nothing
|
|
87
|
+
adtl-gateway init -c adtl.yaml --from .mcp.json --write # write them (originals kept as .bak)
|
|
88
|
+
```
|
|
89
|
+
|
|
90
|
+
- Every stdio and HTTP server in `.mcp.json` becomes an upstream, with its command, args, env, url and headers. `${VAR}` and `${VAR:-default}` keep working, because the gateway expands them the same way. Names that aren't valid upstream ids are adjusted (`docs.api` becomes `docs-api`).
|
|
91
|
+
- `adtl.yaml` is created if it doesn't exist, with restrictive defaults and the two example policy rules; then rules are drafted for every tool as above.
|
|
92
|
+
- With `--write`, the imported servers in `.mcp.json` are replaced by one `adtl` entry that runs `npx -y @adtl/gateway@<version> --config adtl.yaml`. Everything else in the file is kept. Restart Claude Code afterwards.
|
|
93
|
+
- SSE servers stay in `.mcp.json`, because the gateway only speaks Streamable HTTP. So do entries that already run the gateway, and upstreams already in `adtl.yaml` are never changed. Re-running is safe.
|
|
94
|
+
- Any file with `mcpServers` works, such as Claude Desktop's `claude_desktop_config.json`. Servers added with `claude mcp add` live in `~/.claude.json` instead; list them with `claude mcp list`.
|
|
95
|
+
|
|
96
|
+
The gateway starts upstream servers with a minimal environment plus their `env:` entries, not your whole shell environment. If a server relied on a variable from your shell, add it under its `env:`, e.g. `GITHUB_TOKEN: "${GITHUB_TOKEN}"`.
|
|
97
|
+
|
|
81
98
|
Labels only get stricter as a session goes on. A session that has read anything untrusted stays untrusted until the session ends.
|
|
82
99
|
|
|
83
100
|
### Policy
|
package/dist/cli.js
CHANGED
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
* servers through ADTL's interceptors.
|
|
5
5
|
*
|
|
6
6
|
* adtl-gateway --config adtl.yaml [--audit]
|
|
7
|
-
* adtl-gateway init --config adtl.yaml [--write]
|
|
7
|
+
* adtl-gateway init --config adtl.yaml [--from .mcp.json] [--write]
|
|
8
8
|
* adtl-gateway hook --config adtl.yaml [--gateway-server adtl]
|
|
9
9
|
*
|
|
10
10
|
* Point your MCP client (e.g. Claude Code's .mcp.json) at this command.
|
|
@@ -17,7 +17,7 @@ import { runHook } from "./hooks/run.js";
|
|
|
17
17
|
import { runInit } from "./init/run.js";
|
|
18
18
|
import { GatewayConfigError, loadGatewayConfig, startGateway } from "./startup.js";
|
|
19
19
|
const USAGE = `Usage: adtl-gateway --config <adtl.yaml> [--audit]
|
|
20
|
-
adtl-gateway init --config <adtl.yaml> [--write]
|
|
20
|
+
adtl-gateway init --config <adtl.yaml> [--from <.mcp.json>] [--write]
|
|
21
21
|
adtl-gateway hook --config <adtl.yaml> [--gateway-server <name>]
|
|
22
22
|
|
|
23
23
|
Runs an MCP server over stdio that forwards tool calls to the upstream
|
|
@@ -34,6 +34,11 @@ init:
|
|
|
34
34
|
for each tool the config doesn't cover yet (presets for GitHub,
|
|
35
35
|
filesystem and fetch; MCP tool hints otherwise). Existing entries are
|
|
36
36
|
never changed. Prints the updated config; review it before using it.
|
|
37
|
+
--from <file> First import the MCP servers of a client config (Claude
|
|
38
|
+
Code's .mcp.json, or any file with "mcpServers") into
|
|
39
|
+
gateway.upstreams, creating the config file if needed.
|
|
40
|
+
With --write, that file is changed to run the gateway
|
|
41
|
+
in place of the imported servers (original kept as .bak).
|
|
37
42
|
--write Update the config file in place (original kept as .bak).
|
|
38
43
|
|
|
39
44
|
hook:
|
|
@@ -69,6 +74,8 @@ function parseArgs(argv) {
|
|
|
69
74
|
out.audit = true;
|
|
70
75
|
else if (a === "--write" && out.init)
|
|
71
76
|
out.write = true;
|
|
77
|
+
else if (a === "--from" && out.init)
|
|
78
|
+
out.from = argv[++i];
|
|
72
79
|
else
|
|
73
80
|
throw new GatewayConfigError(`Unknown argument: ${a}\n\n${USAGE}`);
|
|
74
81
|
}
|
|
@@ -84,7 +91,7 @@ async function main() {
|
|
|
84
91
|
if (!args.config)
|
|
85
92
|
throw new GatewayConfigError(`Missing --config\n\n${USAGE}`);
|
|
86
93
|
if (args.init)
|
|
87
|
-
return init(args.config, args.write === true);
|
|
94
|
+
return init(args.config, args.write === true, args.from);
|
|
88
95
|
if (args.hook)
|
|
89
96
|
return hook(args.config, args.gatewayServer);
|
|
90
97
|
const loaded = await loadGatewayConfig(args.config);
|
|
@@ -111,7 +118,21 @@ async function main() {
|
|
|
111
118
|
console.error(`[adtl-gateway] ${GATEWAY_VERSION} ready (session ${started.gateway.sessionId})`);
|
|
112
119
|
}
|
|
113
120
|
function summarize(r, path, write) {
|
|
114
|
-
const lines =
|
|
121
|
+
const lines = [];
|
|
122
|
+
if (r.mcp) {
|
|
123
|
+
const m = r.mcp;
|
|
124
|
+
for (const i of m.imported)
|
|
125
|
+
lines.push(` imported ${i.name}${i.id !== i.name ? ` as ${i.id}` : ""} from ${m.path}`);
|
|
126
|
+
for (const k of m.kept)
|
|
127
|
+
lines.push(` ${k.name}: already in the config as ${k.id}, kept as it is`);
|
|
128
|
+
for (const s of m.skipped)
|
|
129
|
+
lines.push(` ${s.name}: left in ${m.path} (${s.reason})`);
|
|
130
|
+
if (!m.imported.length && !m.kept.length)
|
|
131
|
+
lines.push(` nothing to import from ${m.path}`);
|
|
132
|
+
}
|
|
133
|
+
if (r.created)
|
|
134
|
+
lines.push(` ${write ? "created" : "would create"} ${path}`);
|
|
135
|
+
lines.push(...r.reports.map((s) => {
|
|
115
136
|
const parts = [`${s.added.length} tools added`];
|
|
116
137
|
if (s.kept.length)
|
|
117
138
|
parts.push(`${s.kept.length} kept`);
|
|
@@ -120,15 +141,21 @@ function summarize(r, path, write) {
|
|
|
120
141
|
if (s.stale.length)
|
|
121
142
|
parts.push(`no longer offered: ${s.stale.join(", ")}`);
|
|
122
143
|
return ` ${s.id} (${s.preset ? `preset ${s.preset}` : "from tool hints, review"}): ${parts.join("; ")}`;
|
|
123
|
-
});
|
|
144
|
+
}));
|
|
124
145
|
for (const f of r.failed)
|
|
125
146
|
lines.push(` ${f.id}: could not connect, skipped (${f.error})`);
|
|
126
|
-
const changed = r.reports.some((s) => s.added.length || s.addedDefaults);
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
147
|
+
const changed = r.created || r.mcp?.changed || r.reports.some((s) => s.added.length || s.addedDefaults);
|
|
148
|
+
let tail;
|
|
149
|
+
if (!changed)
|
|
150
|
+
tail = "Nothing to add.";
|
|
151
|
+
else if (!write)
|
|
152
|
+
tail = "Nothing written. Review the config above, then re-run with --write.";
|
|
153
|
+
else {
|
|
154
|
+
tail = r.created ? `Wrote ${path}.` : `Updated ${path} (original saved as ${path}.bak).`;
|
|
155
|
+
if (r.mcp?.changed)
|
|
156
|
+
tail += ` ${r.mcp.path} now runs the gateway (original saved as ${r.mcp.path}.bak); restart your MCP client.`;
|
|
157
|
+
tail += ' Review every line marked "review".';
|
|
158
|
+
}
|
|
132
159
|
return `${lines.join("\n")}\n${tail}`;
|
|
133
160
|
}
|
|
134
161
|
async function readStdin() {
|
|
@@ -145,10 +172,13 @@ async function hook(config, gatewayServer) {
|
|
|
145
172
|
process.stderr.write(`${out.stderr}\n`);
|
|
146
173
|
process.exitCode = out.exitCode;
|
|
147
174
|
}
|
|
148
|
-
async function init(path, write) {
|
|
149
|
-
const result = await runInit({ path, write });
|
|
150
|
-
if (!write)
|
|
175
|
+
async function init(path, write, from) {
|
|
176
|
+
const result = await runInit({ path, write, ...(from ? { from } : {}) });
|
|
177
|
+
if (!write) {
|
|
151
178
|
process.stdout.write(result.text);
|
|
179
|
+
if (result.mcp?.changed)
|
|
180
|
+
process.stdout.write(`\n# ${result.mcp.path} with --write:\n${result.mcp.text.replace(/^/gm, "# ")}\n`);
|
|
181
|
+
}
|
|
152
182
|
console.error(`[adtl-gateway] init\n${summarize(result, path, write)}`);
|
|
153
183
|
if (result.failed.length && !result.reports.length)
|
|
154
184
|
process.exitCode = 1;
|
package/dist/cli.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"cli.js","sourceRoot":"","sources":["../src/cli.ts"],"names":[],"mappings":";AACA;;;;;;;;;;GAUG;AACH,OAAO,EAAE,oBAAoB,EAAE,MAAM,2CAA2C,CAAC;AACjF,OAAO,EAAE,iBAAiB,EAAE,MAAM,aAAa,CAAC;AAChD,OAAO,EAA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,KAAK,GAAG,GAAG,YAAY,kBAAkB,IAAI,GAAG,YAAY,iBAAiB,CAAC;IACpF,OAAO,CAAC,KAAK,CAAC,KAAK,CAAC,CAAC,CAAC,kBAAmB,GAAa,CAAC,OAAO,EAAE,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC;IACxE,qFAAqF;IACrF,OAAO,CAAC,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,KAAK,MAAM,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;AACnD,CAAC,CAAC,CAAC"}
|
package/dist/config.d.ts
CHANGED
|
@@ -21,7 +21,8 @@
|
|
|
21
21
|
* to: you@example.com
|
|
22
22
|
*
|
|
23
23
|
* `${VAR}` in command, args, env, cwd, url, headers and approval settings is
|
|
24
|
-
* replaced from the gateway's environment. A missing variable is a config error
|
|
24
|
+
* replaced from the gateway's environment. A missing variable is a config error,
|
|
25
|
+
* unless a default is given: `${VAR:-default}`.
|
|
25
26
|
*/
|
|
26
27
|
import { z } from "zod";
|
|
27
28
|
export declare const StdioUpstreamSchema: z.ZodObject<{
|
|
@@ -121,6 +122,7 @@ export declare const EmailConfigSchema: z.ZodObject<{
|
|
|
121
122
|
to: z.ZodUnion<[z.ZodString, z.ZodArray<z.ZodString, "atleastone">]>;
|
|
122
123
|
on: z.ZodDefault<z.ZodArray<z.ZodEnum<["pending", "blocked", "approved", "denied", "timeout", "undeliverable"]>, "atleastone">>;
|
|
123
124
|
}, "strict", z.ZodTypeAny, {
|
|
125
|
+
on: ["approved" | "denied" | "timeout" | "undeliverable" | "pending" | "blocked", ...("approved" | "denied" | "timeout" | "undeliverable" | "pending" | "blocked")[]];
|
|
124
126
|
smtp: {
|
|
125
127
|
host: string;
|
|
126
128
|
port: number;
|
|
@@ -130,7 +132,6 @@ export declare const EmailConfigSchema: z.ZodObject<{
|
|
|
130
132
|
};
|
|
131
133
|
from: string;
|
|
132
134
|
to: string | [string, ...string[]];
|
|
133
|
-
on: ["pending" | "blocked" | "approved" | "denied" | "timeout" | "undeliverable", ...("pending" | "blocked" | "approved" | "denied" | "timeout" | "undeliverable")[]];
|
|
134
135
|
}, {
|
|
135
136
|
smtp: {
|
|
136
137
|
host: string;
|
|
@@ -141,7 +142,7 @@ export declare const EmailConfigSchema: z.ZodObject<{
|
|
|
141
142
|
};
|
|
142
143
|
from: string;
|
|
143
144
|
to: string | [string, ...string[]];
|
|
144
|
-
on?: ["
|
|
145
|
+
on?: ["approved" | "denied" | "timeout" | "undeliverable" | "pending" | "blocked", ...("approved" | "denied" | "timeout" | "undeliverable" | "pending" | "blocked")[]] | undefined;
|
|
145
146
|
}>;
|
|
146
147
|
export declare const ApprovalsConfigSchema: z.ZodObject<{
|
|
147
148
|
/**
|
|
@@ -192,6 +193,7 @@ export declare const ApprovalsConfigSchema: z.ZodObject<{
|
|
|
192
193
|
to: z.ZodUnion<[z.ZodString, z.ZodArray<z.ZodString, "atleastone">]>;
|
|
193
194
|
on: z.ZodDefault<z.ZodArray<z.ZodEnum<["pending", "blocked", "approved", "denied", "timeout", "undeliverable"]>, "atleastone">>;
|
|
194
195
|
}, "strict", z.ZodTypeAny, {
|
|
196
|
+
on: ["approved" | "denied" | "timeout" | "undeliverable" | "pending" | "blocked", ...("approved" | "denied" | "timeout" | "undeliverable" | "pending" | "blocked")[]];
|
|
195
197
|
smtp: {
|
|
196
198
|
host: string;
|
|
197
199
|
port: number;
|
|
@@ -201,7 +203,6 @@ export declare const ApprovalsConfigSchema: z.ZodObject<{
|
|
|
201
203
|
};
|
|
202
204
|
from: string;
|
|
203
205
|
to: string | [string, ...string[]];
|
|
204
|
-
on: ["pending" | "blocked" | "approved" | "denied" | "timeout" | "undeliverable", ...("pending" | "blocked" | "approved" | "denied" | "timeout" | "undeliverable")[]];
|
|
205
206
|
}, {
|
|
206
207
|
smtp: {
|
|
207
208
|
host: string;
|
|
@@ -212,17 +213,12 @@ export declare const ApprovalsConfigSchema: z.ZodObject<{
|
|
|
212
213
|
};
|
|
213
214
|
from: string;
|
|
214
215
|
to: string | [string, ...string[]];
|
|
215
|
-
on?: ["
|
|
216
|
+
on?: ["approved" | "denied" | "timeout" | "undeliverable" | "pending" | "blocked", ...("approved" | "denied" | "timeout" | "undeliverable" | "pending" | "blocked")[]] | undefined;
|
|
216
217
|
}>>;
|
|
217
218
|
}, "strict", z.ZodTypeAny, {
|
|
218
219
|
timeoutSeconds: number;
|
|
219
|
-
ntfy?: {
|
|
220
|
-
server: string;
|
|
221
|
-
topic: string;
|
|
222
|
-
replyTopic?: string | undefined;
|
|
223
|
-
token?: string | undefined;
|
|
224
|
-
} | undefined;
|
|
225
220
|
email?: {
|
|
221
|
+
on: ["approved" | "denied" | "timeout" | "undeliverable" | "pending" | "blocked", ...("approved" | "denied" | "timeout" | "undeliverable" | "pending" | "blocked")[]];
|
|
226
222
|
smtp: {
|
|
227
223
|
host: string;
|
|
228
224
|
port: number;
|
|
@@ -232,15 +228,14 @@ export declare const ApprovalsConfigSchema: z.ZodObject<{
|
|
|
232
228
|
};
|
|
233
229
|
from: string;
|
|
234
230
|
to: string | [string, ...string[]];
|
|
235
|
-
on: ["pending" | "blocked" | "approved" | "denied" | "timeout" | "undeliverable", ...("pending" | "blocked" | "approved" | "denied" | "timeout" | "undeliverable")[]];
|
|
236
231
|
} | undefined;
|
|
237
|
-
}, {
|
|
238
232
|
ntfy?: {
|
|
233
|
+
server: string;
|
|
239
234
|
topic: string;
|
|
240
|
-
server?: string | undefined;
|
|
241
235
|
replyTopic?: string | undefined;
|
|
242
236
|
token?: string | undefined;
|
|
243
237
|
} | undefined;
|
|
238
|
+
}, {
|
|
244
239
|
email?: {
|
|
245
240
|
smtp: {
|
|
246
241
|
host: string;
|
|
@@ -251,9 +246,15 @@ export declare const ApprovalsConfigSchema: z.ZodObject<{
|
|
|
251
246
|
};
|
|
252
247
|
from: string;
|
|
253
248
|
to: string | [string, ...string[]];
|
|
254
|
-
on?: ["
|
|
249
|
+
on?: ["approved" | "denied" | "timeout" | "undeliverable" | "pending" | "blocked", ...("approved" | "denied" | "timeout" | "undeliverable" | "pending" | "blocked")[]] | undefined;
|
|
255
250
|
} | undefined;
|
|
256
251
|
timeoutSeconds?: number | undefined;
|
|
252
|
+
ntfy?: {
|
|
253
|
+
topic: string;
|
|
254
|
+
server?: string | undefined;
|
|
255
|
+
replyTopic?: string | undefined;
|
|
256
|
+
token?: string | undefined;
|
|
257
|
+
} | undefined;
|
|
257
258
|
}>;
|
|
258
259
|
export type ApprovalsConfig = z.infer<typeof ApprovalsConfigSchema>;
|
|
259
260
|
export declare const GatewayConfigSchema: z.ZodObject<{
|
|
@@ -388,6 +389,7 @@ export declare const GatewayConfigSchema: z.ZodObject<{
|
|
|
388
389
|
to: z.ZodUnion<[z.ZodString, z.ZodArray<z.ZodString, "atleastone">]>;
|
|
389
390
|
on: z.ZodDefault<z.ZodArray<z.ZodEnum<["pending", "blocked", "approved", "denied", "timeout", "undeliverable"]>, "atleastone">>;
|
|
390
391
|
}, "strict", z.ZodTypeAny, {
|
|
392
|
+
on: ["approved" | "denied" | "timeout" | "undeliverable" | "pending" | "blocked", ...("approved" | "denied" | "timeout" | "undeliverable" | "pending" | "blocked")[]];
|
|
391
393
|
smtp: {
|
|
392
394
|
host: string;
|
|
393
395
|
port: number;
|
|
@@ -397,7 +399,6 @@ export declare const GatewayConfigSchema: z.ZodObject<{
|
|
|
397
399
|
};
|
|
398
400
|
from: string;
|
|
399
401
|
to: string | [string, ...string[]];
|
|
400
|
-
on: ["pending" | "blocked" | "approved" | "denied" | "timeout" | "undeliverable", ...("pending" | "blocked" | "approved" | "denied" | "timeout" | "undeliverable")[]];
|
|
401
402
|
}, {
|
|
402
403
|
smtp: {
|
|
403
404
|
host: string;
|
|
@@ -408,17 +409,12 @@ export declare const GatewayConfigSchema: z.ZodObject<{
|
|
|
408
409
|
};
|
|
409
410
|
from: string;
|
|
410
411
|
to: string | [string, ...string[]];
|
|
411
|
-
on?: ["
|
|
412
|
+
on?: ["approved" | "denied" | "timeout" | "undeliverable" | "pending" | "blocked", ...("approved" | "denied" | "timeout" | "undeliverable" | "pending" | "blocked")[]] | undefined;
|
|
412
413
|
}>>;
|
|
413
414
|
}, "strict", z.ZodTypeAny, {
|
|
414
415
|
timeoutSeconds: number;
|
|
415
|
-
ntfy?: {
|
|
416
|
-
server: string;
|
|
417
|
-
topic: string;
|
|
418
|
-
replyTopic?: string | undefined;
|
|
419
|
-
token?: string | undefined;
|
|
420
|
-
} | undefined;
|
|
421
416
|
email?: {
|
|
417
|
+
on: ["approved" | "denied" | "timeout" | "undeliverable" | "pending" | "blocked", ...("approved" | "denied" | "timeout" | "undeliverable" | "pending" | "blocked")[]];
|
|
422
418
|
smtp: {
|
|
423
419
|
host: string;
|
|
424
420
|
port: number;
|
|
@@ -428,15 +424,14 @@ export declare const GatewayConfigSchema: z.ZodObject<{
|
|
|
428
424
|
};
|
|
429
425
|
from: string;
|
|
430
426
|
to: string | [string, ...string[]];
|
|
431
|
-
on: ["pending" | "blocked" | "approved" | "denied" | "timeout" | "undeliverable", ...("pending" | "blocked" | "approved" | "denied" | "timeout" | "undeliverable")[]];
|
|
432
427
|
} | undefined;
|
|
433
|
-
}, {
|
|
434
428
|
ntfy?: {
|
|
429
|
+
server: string;
|
|
435
430
|
topic: string;
|
|
436
|
-
server?: string | undefined;
|
|
437
431
|
replyTopic?: string | undefined;
|
|
438
432
|
token?: string | undefined;
|
|
439
433
|
} | undefined;
|
|
434
|
+
}, {
|
|
440
435
|
email?: {
|
|
441
436
|
smtp: {
|
|
442
437
|
host: string;
|
|
@@ -447,9 +442,15 @@ export declare const GatewayConfigSchema: z.ZodObject<{
|
|
|
447
442
|
};
|
|
448
443
|
from: string;
|
|
449
444
|
to: string | [string, ...string[]];
|
|
450
|
-
on?: ["
|
|
445
|
+
on?: ["approved" | "denied" | "timeout" | "undeliverable" | "pending" | "blocked", ...("approved" | "denied" | "timeout" | "undeliverable" | "pending" | "blocked")[]] | undefined;
|
|
451
446
|
} | undefined;
|
|
452
447
|
timeoutSeconds?: number | undefined;
|
|
448
|
+
ntfy?: {
|
|
449
|
+
topic: string;
|
|
450
|
+
server?: string | undefined;
|
|
451
|
+
replyTopic?: string | undefined;
|
|
452
|
+
token?: string | undefined;
|
|
453
|
+
} | undefined;
|
|
453
454
|
}>>;
|
|
454
455
|
/** Timeout for each interceptor invocation, in milliseconds. */
|
|
455
456
|
interceptorTimeoutMs: z.ZodDefault<z.ZodNumber>;
|
|
@@ -465,22 +466,17 @@ export declare const GatewayConfigSchema: z.ZodObject<{
|
|
|
465
466
|
}>;
|
|
466
467
|
mode: "audit" | "active";
|
|
467
468
|
interceptorTimeoutMs: number;
|
|
469
|
+
audit?: string | undefined;
|
|
468
470
|
interceptors?: {
|
|
469
471
|
command: string;
|
|
470
472
|
args: string[];
|
|
471
473
|
env: Record<string, string>;
|
|
472
474
|
cwd?: string | undefined;
|
|
473
475
|
} | undefined;
|
|
474
|
-
audit?: string | undefined;
|
|
475
476
|
approvals?: {
|
|
476
477
|
timeoutSeconds: number;
|
|
477
|
-
ntfy?: {
|
|
478
|
-
server: string;
|
|
479
|
-
topic: string;
|
|
480
|
-
replyTopic?: string | undefined;
|
|
481
|
-
token?: string | undefined;
|
|
482
|
-
} | undefined;
|
|
483
478
|
email?: {
|
|
479
|
+
on: ["approved" | "denied" | "timeout" | "undeliverable" | "pending" | "blocked", ...("approved" | "denied" | "timeout" | "undeliverable" | "pending" | "blocked")[]];
|
|
484
480
|
smtp: {
|
|
485
481
|
host: string;
|
|
486
482
|
port: number;
|
|
@@ -490,7 +486,12 @@ export declare const GatewayConfigSchema: z.ZodObject<{
|
|
|
490
486
|
};
|
|
491
487
|
from: string;
|
|
492
488
|
to: string | [string, ...string[]];
|
|
493
|
-
|
|
489
|
+
} | undefined;
|
|
490
|
+
ntfy?: {
|
|
491
|
+
server: string;
|
|
492
|
+
topic: string;
|
|
493
|
+
replyTopic?: string | undefined;
|
|
494
|
+
token?: string | undefined;
|
|
494
495
|
} | undefined;
|
|
495
496
|
} | undefined;
|
|
496
497
|
}, {
|
|
@@ -503,21 +504,15 @@ export declare const GatewayConfigSchema: z.ZodObject<{
|
|
|
503
504
|
url: string;
|
|
504
505
|
headers?: Record<string, string> | undefined;
|
|
505
506
|
}>;
|
|
507
|
+
audit?: string | undefined;
|
|
506
508
|
interceptors?: {
|
|
507
509
|
command: string;
|
|
508
510
|
args?: string[] | undefined;
|
|
509
511
|
env?: Record<string, string> | undefined;
|
|
510
512
|
cwd?: string | undefined;
|
|
511
513
|
} | undefined;
|
|
512
|
-
audit?: string | undefined;
|
|
513
514
|
mode?: "audit" | "active" | undefined;
|
|
514
515
|
approvals?: {
|
|
515
|
-
ntfy?: {
|
|
516
|
-
topic: string;
|
|
517
|
-
server?: string | undefined;
|
|
518
|
-
replyTopic?: string | undefined;
|
|
519
|
-
token?: string | undefined;
|
|
520
|
-
} | undefined;
|
|
521
516
|
email?: {
|
|
522
517
|
smtp: {
|
|
523
518
|
host: string;
|
|
@@ -528,9 +523,15 @@ export declare const GatewayConfigSchema: z.ZodObject<{
|
|
|
528
523
|
};
|
|
529
524
|
from: string;
|
|
530
525
|
to: string | [string, ...string[]];
|
|
531
|
-
on?: ["
|
|
526
|
+
on?: ["approved" | "denied" | "timeout" | "undeliverable" | "pending" | "blocked", ...("approved" | "denied" | "timeout" | "undeliverable" | "pending" | "blocked")[]] | undefined;
|
|
532
527
|
} | undefined;
|
|
533
528
|
timeoutSeconds?: number | undefined;
|
|
529
|
+
ntfy?: {
|
|
530
|
+
topic: string;
|
|
531
|
+
server?: string | undefined;
|
|
532
|
+
replyTopic?: string | undefined;
|
|
533
|
+
token?: string | undefined;
|
|
534
|
+
} | undefined;
|
|
534
535
|
} | undefined;
|
|
535
536
|
interceptorTimeoutMs?: number | undefined;
|
|
536
537
|
}>;
|
|
@@ -540,7 +541,11 @@ export declare class EnvExpansionError extends Error {
|
|
|
540
541
|
readonly variable: string;
|
|
541
542
|
constructor(variable: string, where: string);
|
|
542
543
|
}
|
|
543
|
-
/**
|
|
544
|
+
/**
|
|
545
|
+
* Replace `${VAR}` with values from `env`, and `${VAR:-default}` with `default`
|
|
546
|
+
* when VAR is unset or empty (as Claude Code's .mcp.json does). `$${VAR}` keeps
|
|
547
|
+
* a literal `${VAR}`.
|
|
548
|
+
*/
|
|
544
549
|
export declare function expandEnv(value: string, env: NodeJS.ProcessEnv, where: string): string;
|
|
545
550
|
export declare function expandUpstream<T extends Upstream>(id: string, u: T, env: NodeJS.ProcessEnv): T;
|
|
546
551
|
/** Expand `${VAR}` in every string of the approvals section. */
|
package/dist/config.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"config.d.ts","sourceRoot":"","sources":["../src/config.ts"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"config.d.ts","sourceRoot":"","sources":["../src/config.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;GAyBG;AACH,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAKxB,eAAO,MAAM,mBAAmB;;;;;;;;;;;;;;;EAOrB,CAAC;AAEZ,eAAO,MAAM,kBAAkB;;;;;;;;;EAKpB,CAAC;AAEZ,eAAO,MAAM,cAAc;;;;;;;;;;;;;;;;;;;;;;;;IAAqD,CAAC;AACjF,MAAM,MAAM,aAAa,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,mBAAmB,CAAC,CAAC;AAChE,MAAM,MAAM,YAAY,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,kBAAkB,CAAC,CAAC;AAC9D,MAAM,MAAM,QAAQ,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,cAAc,CAAC,CAAC;AAEtD,eAAO,MAAM,gBAAgB;;IAGzB,+FAA+F;;IAE/F,6DAA6D;;;;;;;;;;;;;EAItD,CAAC;AAEZ,eAAO,MAAM,iBAAiB;;;;QAMtB,yEAAyE;;;;;;;;;;;;;;;;;;;;;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tF;AAMD,wBAAgB,cAAc,CAAC,CAAC,SAAS,QAAQ,EAAE,EAAE,EAAE,MAAM,EAAE,CAAC,EAAE,CAAC,EAAE,GAAG,EAAE,MAAM,CAAC,UAAU,GAAG,CAAC,CAY9F;AAED,gEAAgE;AAChE,wBAAgB,eAAe,CAAC,CAAC,EAAE,eAAe,EAAE,GAAG,EAAE,MAAM,CAAC,UAAU,GAAG,eAAe,CAQ3F;AAED,wBAAgB,cAAc,CAAC,CAAC,EAAE,QAAQ,GAAG,CAAC,IAAI,YAAY,CAE7D"}
|
package/dist/config.js
CHANGED
|
@@ -21,7 +21,8 @@
|
|
|
21
21
|
* to: you@example.com
|
|
22
22
|
*
|
|
23
23
|
* `${VAR}` in command, args, env, cwd, url, headers and approval settings is
|
|
24
|
-
* replaced from the gateway's environment. A missing variable is a config error
|
|
24
|
+
* replaced from the gateway's environment. A missing variable is a config error,
|
|
25
|
+
* unless a default is given: `${VAR:-default}`.
|
|
25
26
|
*/
|
|
26
27
|
import { z } from "zod";
|
|
27
28
|
import { EMAIL_EVENTS } from "./email.js";
|
|
@@ -111,12 +112,18 @@ export class EnvExpansionError extends Error {
|
|
|
111
112
|
this.name = "EnvExpansionError";
|
|
112
113
|
}
|
|
113
114
|
}
|
|
114
|
-
/**
|
|
115
|
+
/**
|
|
116
|
+
* Replace `${VAR}` with values from `env`, and `${VAR:-default}` with `default`
|
|
117
|
+
* when VAR is unset or empty (as Claude Code's .mcp.json does). `$${VAR}` keeps
|
|
118
|
+
* a literal `${VAR}`.
|
|
119
|
+
*/
|
|
115
120
|
export function expandEnv(value, env, where) {
|
|
116
|
-
return value.replace(/(\$?)\$\{([A-Za-z_][A-Za-z0-9_]*)
|
|
121
|
+
return value.replace(/(\$?)\$\{([A-Za-z_][A-Za-z0-9_]*)(?::-([^}]*))?\}/g, (match, escape, name, fallback) => {
|
|
117
122
|
if (escape)
|
|
118
123
|
return match.slice(1);
|
|
119
124
|
const v = env[name];
|
|
125
|
+
if (fallback !== undefined)
|
|
126
|
+
return v === undefined || v === "" ? fallback : v;
|
|
120
127
|
if (v === undefined)
|
|
121
128
|
throw new EnvExpansionError(name, where);
|
|
122
129
|
return v;
|
package/dist/config.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"config.js","sourceRoot":"","sources":["../src/config.ts"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"config.js","sourceRoot":"","sources":["../src/config.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;GAyBG;AACH,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,EAAE,YAAY,EAAE,MAAM,YAAY,CAAC;AAE1C,MAAM,WAAW,GAAG,iBAAiB,CAAC;AAEtC,MAAM,CAAC,MAAM,mBAAmB,GAAG,CAAC;KACjC,MAAM,CAAC;IACN,OAAO,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,GAAG,CAAC,CAAC,CAAC;IAC1B,IAAI,EAAE,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,MAAM,EAAE,CAAC,CAAC,OAAO,CAAC,EAAE,CAAC;IACrC,GAAG,EAAE,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,MAAM,EAAE,CAAC,CAAC,OAAO,CAAC,EAAE,CAAC;IACrC,GAAG,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE;CAC3B,CAAC;KACD,MAAM,EAAE,CAAC;AAEZ,MAAM,CAAC,MAAM,kBAAkB,GAAG,CAAC;KAChC,MAAM,CAAC;IACN,GAAG,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,GAAG,CAAC,CAAC,CAAC;IACtB,OAAO,EAAE,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,MAAM,EAAE,CAAC,CAAC,OAAO,CAAC,EAAE,CAAC;CAC1C,CAAC;KACD,MAAM,EAAE,CAAC;AAEZ,MAAM,CAAC,MAAM,cAAc,GAAG,CAAC,CA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"./approvals.js";
|
|
5
5
|
import type { AuditSink } from "./audit.js";
|
|
6
6
|
import type { InterceptorInvoker } from "./invoker.js";
|
|
7
|
-
export declare const GATEWAY_VERSION = "0.3.
|
|
7
|
+
export declare const GATEWAY_VERSION = "0.3.2";
|
|
8
8
|
/** `_meta` key on gateway-generated error results describing why a call was stopped. */
|
|
9
9
|
export declare const GATEWAY_DECISION_KEY = "adtl/gateway";
|
|
10
10
|
export interface GatewayLogger {
|
package/dist/gateway.js
CHANGED
|
@@ -27,7 +27,7 @@ import { Server } from "@modelcontextprotocol/sdk/server/index.js";
|
|
|
27
27
|
import { UriTemplate } from "@modelcontextprotocol/sdk/shared/uriTemplate.js";
|
|
28
28
|
import { CallToolRequestSchema, ErrorCode, GetPromptRequestSchema, ListPromptsRequestSchema, ListResourcesRequestSchema, ListResourceTemplatesRequestSchema, ListToolsRequestSchema, McpError, ReadResourceRequestSchema, } from "@modelcontextprotocol/sdk/types.js";
|
|
29
29
|
import { TOOL_SEPARATOR } from "./config.js";
|
|
30
|
-
export const GATEWAY_VERSION = "0.3.
|
|
30
|
+
export const GATEWAY_VERSION = "0.3.2";
|
|
31
31
|
/** `_meta` key on gateway-generated error results describing why a call was stopped. */
|
|
32
32
|
export const GATEWAY_DECISION_KEY = "adtl/gateway";
|
|
33
33
|
const stderrLogger = {
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
import { type Document } from "yaml";
|
|
2
|
+
import type { Upstream } from "../config.js";
|
|
3
|
+
export declare const DEFAULT_GATEWAY_NAME = "adtl";
|
|
4
|
+
export interface McpImport {
|
|
5
|
+
/** Servers moved into gateway.upstreams: name in the client config → upstream id. */
|
|
6
|
+
imported: {
|
|
7
|
+
name: string;
|
|
8
|
+
id: string;
|
|
9
|
+
}[];
|
|
10
|
+
/** Servers already in adtl.yaml under the same id; left as they are. */
|
|
11
|
+
kept: {
|
|
12
|
+
name: string;
|
|
13
|
+
id: string;
|
|
14
|
+
}[];
|
|
15
|
+
/** Servers left in the client config, with why. */
|
|
16
|
+
skipped: {
|
|
17
|
+
name: string;
|
|
18
|
+
reason: string;
|
|
19
|
+
}[];
|
|
20
|
+
/** The client config as it should be once the gateway replaces the imported servers. */
|
|
21
|
+
text: string;
|
|
22
|
+
changed: boolean;
|
|
23
|
+
}
|
|
24
|
+
type Entry = Record<string, unknown>;
|
|
25
|
+
/** True if this client entry already runs adtl-gateway. */
|
|
26
|
+
export declare function isGatewayEntry(entry: Entry): boolean;
|
|
27
|
+
/** A valid upstream id (letters, digits, '-') for a client server name, unique among `taken`. */
|
|
28
|
+
export declare function upstreamId(name: string, taken: Set<string>): string;
|
|
29
|
+
/** The upstream for one client entry, or why it can't be one. */
|
|
30
|
+
export declare function toUpstream(entry: Entry, mcpDir: string, configDir: string): Upstream | {
|
|
31
|
+
skip: string;
|
|
32
|
+
};
|
|
33
|
+
/** What runs the gateway from the client config, with adtl.yaml given relative to the client config's directory. */
|
|
34
|
+
export declare function gatewayEntry(configPath: string, mcpDir: string): Entry;
|
|
35
|
+
/**
|
|
36
|
+
* Add the client's servers to `doc` (adtl.yaml) under gateway.upstreams, and
|
|
37
|
+
* return the client config rewritten to use the gateway.
|
|
38
|
+
*/
|
|
39
|
+
export declare function importMcpServers(mcpText: string, mcpPath: string, doc: Document, configPath: string, gatewayName?: string): McpImport;
|
|
40
|
+
export {};
|
|
41
|
+
//# sourceMappingURL=fromMcpJson.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"fromMcpJson.d.ts","sourceRoot":"","sources":["../../src/init/fromMcpJson.ts"],"names":[],"mappings":"AAgBA,OAAO,EAAS,KAAK,QAAQ,EAAE,MAAM,MAAM,CAAC;AAC5C,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,cAAc,CAAC;AAG7C,eAAO,MAAM,oBAAoB,SAAS,CAAC;AAE3C,MAAM,WAAW,SAAS;IACxB,qFAAqF;IACrF,QAAQ,EAAE;QAAE,IAAI,EAAE,MAAM,CAAC;QAA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