authflow-cli 0.4.0 → 0.5.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 +157 -5
- package/dist/checks.d.ts +30 -0
- package/dist/checks.js +36 -0
- package/dist/checks.js.map +1 -0
- package/dist/client-conformance.d.ts +5 -1
- package/dist/client-conformance.js +9 -1
- package/dist/client-conformance.js.map +1 -1
- package/dist/commands/doctor.js +5 -1
- package/dist/commands/doctor.js.map +1 -1
- package/dist/commands/probe.js +1 -1
- package/dist/commands/probe.js.map +1 -1
- package/dist/commands/register.js +30 -2
- package/dist/commands/register.js.map +1 -1
- package/dist/commands/set-domain.d.ts +34 -0
- package/dist/commands/set-domain.js +162 -0
- package/dist/commands/set-domain.js.map +1 -0
- package/dist/config.d.ts +32 -1
- package/dist/config.js.map +1 -1
- package/dist/custom-domain.d.ts +96 -0
- package/dist/custom-domain.js +289 -0
- package/dist/custom-domain.js.map +1 -0
- package/dist/doctor.d.ts +31 -23
- package/dist/doctor.js +271 -57
- package/dist/doctor.js.map +1 -1
- package/dist/google-redirect.d.ts +5 -1
- package/dist/google-redirect.js +11 -5
- package/dist/google-redirect.js.map +1 -1
- package/dist/mcp/server.d.ts +8 -1
- package/dist/mcp/server.js +145 -11
- package/dist/mcp/server.js.map +1 -1
- package/dist/program.js +4 -1
- package/dist/program.js.map +1 -1
- package/dist/rail.d.ts +16 -0
- package/dist/rail.js +39 -0
- package/dist/rail.js.map +1 -1
- package/dist/resource-urls.d.ts +27 -0
- package/dist/resource-urls.js +56 -0
- package/dist/resource-urls.js.map +1 -0
- package/dist/status.d.ts +15 -1
- package/dist/status.js +59 -5
- package/dist/status.js.map +1 -1
- package/dist/surface.d.ts +1 -0
- package/dist/surface.js +1 -0
- package/dist/surface.js.map +1 -1
- package/dist/tenant-host.d.ts +49 -0
- package/dist/tenant-host.js +367 -0
- package/dist/tenant-host.js.map +1 -0
- package/dist/version.d.ts +10 -0
- package/dist/version.js +27 -0
- package/dist/version.js.map +1 -0
- package/package.json +4 -4
package/README.md
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
# Authflow CLI
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
Minimal TypeScript CLI for Authflow Rail onboarding. Wraps the public admin and Origin Protocol surfaces so a tenant can register a resource, connect Stripe, serve it on their own hostname, mint a local identity header, run the conformance probe, and scaffold the origin sidecar — without reading rail source.
|
|
4
4
|
|
|
5
|
-
|
|
5
|
+
License: Apache-2.0. See [LICENSE](LICENSE).
|
|
6
6
|
|
|
7
7
|
`authflow mcp` exposes the same operations as an MCP server, so a coding agent can onboard a server against the codebase it already has open. The tenant-facing walkthrough is [Onboard with your agent](../../docs/onboarding/agent.md). Command reference: [`authflow mcp`](#authflow-mcp).
|
|
8
8
|
|
|
@@ -28,7 +28,7 @@ authflow --help
|
|
|
28
28
|
cd sdk/cli
|
|
29
29
|
npm install
|
|
30
30
|
npm run build
|
|
31
|
-
|
|
31
|
+
node dist/cli.js --help
|
|
32
32
|
```
|
|
33
33
|
|
|
34
34
|
During development (no build step):
|
|
@@ -43,7 +43,7 @@ npm run authflow -- --help
|
|
|
43
43
|
| Env | Flag | Used by |
|
|
44
44
|
| --- | --- | --- |
|
|
45
45
|
| `AUTHFLOW_ISSUER` | `--issuer` | all HTTP commands |
|
|
46
|
-
| `AUTHFLOW_ADMIN_API_KEY` | `--admin-key` | `init`, `register`, `connect`, `set-connected-account`, `set-origin`, `status`, `get`, `list`, `plan`, `rotate-origin-key` (mint with `authflow signup`) |
|
|
46
|
+
| `AUTHFLOW_ADMIN_API_KEY` | `--admin-key` | `init`, `register`, `connect`, `set-connected-account`, `set-origin`, `set-domain`, `status`, `get`, `list`, `plan`, `rotate-origin-key`, and `doctor` when it should read the receipt (mint with `authflow signup`) |
|
|
47
47
|
| `AUTHFLOW_ORIGIN_API_KEY` | `--origin-key` | `mint-header`, `probe`, `set-origin` (for its probe) |
|
|
48
48
|
| `AUTHFLOW_RESOURCE` / `AUTHFLOW_GATEWAY_URL` | `--gateway-url` / `--receipt` | curl hint on `mint-header` |
|
|
49
49
|
|
|
@@ -154,6 +154,86 @@ The command also prints the client MCP config for the gateway URL. Use it verbat
|
|
|
154
154
|
pointed at the origin's own hostname gets `403 invalid_origin_identity`, which is the origin
|
|
155
155
|
correctly refusing an unsigned request, not an auth bug.
|
|
156
156
|
|
|
157
|
+
### `authflow set-domain`
|
|
158
|
+
|
|
159
|
+
Serves a resource on your own hostname, so an MCP URL your clients already use keeps working. Run it
|
|
160
|
+
**before the resource has ever gone live**. The canonical URL is stamped on entitlements and Stripe
|
|
161
|
+
objects, so the rail refuses to change it afterwards (`409 resource_already_live`) and a resource
|
|
162
|
+
that is already live needs a new registration instead. Subdomains only: `mcp.example.com`, not
|
|
163
|
+
`example.com`.
|
|
164
|
+
|
|
165
|
+
```bash
|
|
166
|
+
authflow set-domain --slug video --host mcp.example.com
|
|
167
|
+
authflow set-domain --slug video --host mcp.example.com --path /api/mcp --wait
|
|
168
|
+
authflow set-domain --slug video --wait
|
|
169
|
+
```
|
|
170
|
+
|
|
171
|
+
The first two set the host. The third has no `--host`, which means **re-verify the host already set
|
|
172
|
+
on this resource**. There is no separate verify command, so that is how you re-check after adding
|
|
173
|
+
the DNS records. It reads the resource's receipt and stops with this error if there is no host to
|
|
174
|
+
check:
|
|
175
|
+
|
|
176
|
+
```
|
|
177
|
+
no custom domain set on video; pass --host
|
|
178
|
+
```
|
|
179
|
+
|
|
180
|
+
Otherwise it asks the rail to verify the host, and with `--wait` it keeps polling exactly as
|
|
181
|
+
described below. Every "run this next" line the CLI prints is this form, because it needs no host or
|
|
182
|
+
path to retype.
|
|
183
|
+
|
|
184
|
+
`--host` is the bare hostname, with no scheme, path or port. `--path` is the public MCP path on that
|
|
185
|
+
host, and goes with `--host`; on its own it is an error. It is sent only when you pass it: the rail
|
|
186
|
+
uses `/mcp` the first time a host is set and keeps the stored path afterwards, so setting the host
|
|
187
|
+
again without `--path` never resets a path you chose.
|
|
188
|
+
|
|
189
|
+
The rail answers with the DNS records to create at your registrar, and the command prints them:
|
|
190
|
+
|
|
191
|
+
```
|
|
192
|
+
TYPE NAME VALUE PURPOSE
|
|
193
|
+
TXT _authflow-verify.mcp.example.com authflow-verify=… ownership
|
|
194
|
+
CNAME mcp.example.com customers.example-edge.net traffic
|
|
195
|
+
CNAME _acme-challenge.mcp.example.com mcp.example.com.….dcv.… certificate
|
|
196
|
+
```
|
|
197
|
+
|
|
198
|
+
| Record | Purpose |
|
|
199
|
+
| --- | --- |
|
|
200
|
+
| `_authflow-verify` TXT | Proves you own the host. The rail checks it before it provisions anything. |
|
|
201
|
+
| Traffic CNAME | Points the host at Authflow's edge. |
|
|
202
|
+
| `_acme-challenge` CNAME | Lets the certificate be issued and renewed with no further action from you. |
|
|
203
|
+
|
|
204
|
+
The certificate record is listed only once provisioning has begun, which is after ownership is
|
|
205
|
+
verified, so a first run shows two records. It appears on a later check.
|
|
206
|
+
|
|
207
|
+
Registrars such as GoDaddy usually want only the host part of the name, not the full name: for
|
|
208
|
+
`mcp.example.com` enter `mcp`, and for `_authflow-verify.mcp.example.com` enter
|
|
209
|
+
`_authflow-verify.mcp`. The command prints that hint with your own host in it.
|
|
210
|
+
|
|
211
|
+
`--wait` polls the rail's verify endpoint, straight away and then every 15 seconds, until the domain
|
|
212
|
+
is ready. It gives up after 1800 seconds unless `--timeout <seconds>` says otherwise. If the
|
|
213
|
+
certificate record appears while it waits, it prints it as a new record to add.
|
|
214
|
+
|
|
215
|
+
| Exit | When |
|
|
216
|
+
| --- | --- |
|
|
217
|
+
| `0` | The state is `ready`. Without `--wait`: the host was set, or re-checked, and the state is not a failure. |
|
|
218
|
+
| `1` | `--wait` timed out, or the state is `blocked`, `moved` or `removed`. The rail's `last_error` is printed. |
|
|
219
|
+
|
|
220
|
+
| State | Meaning |
|
|
221
|
+
| --- | --- |
|
|
222
|
+
| `awaiting_ownership` | Waiting for the ownership TXT record. |
|
|
223
|
+
| `provisioning` | Ownership verified. The hostname and certificate are being provisioned. |
|
|
224
|
+
| `awaiting_traffic` | Waiting for the traffic and certificate CNAMEs. |
|
|
225
|
+
| `ready` | Serving. |
|
|
226
|
+
| `moved` | DNS no longer points at Authflow. |
|
|
227
|
+
| `blocked` | The hostname is blocked. |
|
|
228
|
+
| `removed` | The hostname was removed. |
|
|
229
|
+
|
|
230
|
+
Once it is ready the resource's URL is `https://{host}{path}`, and the client config the command
|
|
231
|
+
prints names that URL. Hand that to your users, not the slug URL. To check the result from the
|
|
232
|
+
outside, run `authflow doctor --host mcp.example.com`.
|
|
233
|
+
|
|
234
|
+
You can also set the host at registration with `authflow register --public-host`. Afterwards,
|
|
235
|
+
`set-domain` with `--host` changes it, and `set-domain` without `--host` re-checks it.
|
|
236
|
+
|
|
157
237
|
### `authflow status`
|
|
158
238
|
|
|
159
239
|
Where onboarding actually got to, and the command that clears each remaining step.
|
|
@@ -182,6 +262,26 @@ gateway: https://staging.rails.authflow.ai/video/mcp
|
|
|
182
262
|
"Stripe onboarding complete" is ticked only when this resource has an account attached **and** Stripe
|
|
183
263
|
has not listed `stripe_onboarding_complete` as pending. No account is not "charges enabled."
|
|
184
264
|
|
|
265
|
+
A resource on its own hostname gets one more step, which stays unticked while the receipt lists
|
|
266
|
+
`custom_domain_dns` as pending. It shows the state, the DNS records to add, and the command that
|
|
267
|
+
re-checks them:
|
|
268
|
+
|
|
269
|
+
```
|
|
270
|
+
[ ] custom domain DNS
|
|
271
|
+
mcp.example.com: awaiting_traffic (waiting for the traffic and certificate CNAMEs)
|
|
272
|
+
|
|
273
|
+
TYPE NAME VALUE PURPOSE
|
|
274
|
+
TXT _authflow-verify.mcp.example.com authflow-verify=… ownership
|
|
275
|
+
CNAME mcp.example.com customers.example-edge.net traffic
|
|
276
|
+
CNAME _acme-challenge.mcp.example.com mcp.example.com.….dcv.… certificate
|
|
277
|
+
|
|
278
|
+
next: authflow set-domain --slug video --wait
|
|
279
|
+
```
|
|
280
|
+
|
|
281
|
+
Once the domain is ready the step is ticked, the records stay listed as what to leave in place, and
|
|
282
|
+
the client config names your URL. `--json` adds a structured `customDomain` object with the host,
|
|
283
|
+
path, state, CNAME target and records. Resources on the gateway host are unchanged.
|
|
284
|
+
|
|
185
285
|
Use it to resume an onboarding whose earlier steps may or may not have finished — a deploy that got
|
|
186
286
|
backgrounded, a terminal that was closed. `doctor` answers "is the rail up", which is a different
|
|
187
287
|
question: the rail can be perfectly healthy while a resource sits half-configured and rejects every
|
|
@@ -196,7 +296,7 @@ Prints the same framework-specific origin integration plan as `authflow_integrat
|
|
|
196
296
|
authflow plan --slug video --framework dotnet
|
|
197
297
|
```
|
|
198
298
|
|
|
199
|
-
`--framework` is one of `dotnet`, `typescript`, `python`, or `proxy`.
|
|
299
|
+
`--framework` is one of `dotnet`, `typescript`, `python`, or `proxy`. The generic, credential-free form of those plans is [Integration plans](../../docs/onboarding/integration-plans.md).
|
|
200
300
|
|
|
201
301
|
### `authflow get` / `authflow list`
|
|
202
302
|
|
|
@@ -250,6 +350,38 @@ authflow doctor --issuer https://staging.rails.authflow.ai --slug video --client
|
|
|
250
350
|
authflow doctor --client all --dry-run
|
|
251
351
|
```
|
|
252
352
|
|
|
353
|
+
With an admin key, `--slug` reads the resource's receipt and probes the PRM and the 401 challenge
|
|
354
|
+
where the receipt says they are. For a resource on its own hostname that is the tenant's host, and a
|
|
355
|
+
PRM whose `resource` is not the receipt's `resource` fails.
|
|
356
|
+
|
|
357
|
+
`--host` verifies a tenant's own hostname from the outside, the way a client would see it:
|
|
358
|
+
|
|
359
|
+
```bash
|
|
360
|
+
authflow doctor --issuer https://staging.rails.authflow.ai --host mcp.example.com
|
|
361
|
+
authflow doctor --issuer https://staging.rails.authflow.ai --host mcp.example.com --slug video
|
|
362
|
+
```
|
|
363
|
+
|
|
364
|
+
Like the rest of `doctor`, it needs the issuer (`--issuer` or `AUTHFLOW_ISSUER`).
|
|
365
|
+
|
|
366
|
+
| Check | Passes when |
|
|
367
|
+
| --- | --- |
|
|
368
|
+
| `host custom domain` | The rail reports the domain `ready`. Skipped, with the reason, when doctor has no receipt to read. |
|
|
369
|
+
| `host DNS: traffic CNAME` | The host is a CNAME to the receipt's `cname_target`. |
|
|
370
|
+
| `host DNS: _acme-challenge CNAME` | The certificate CNAME is there and matches the receipt. Skipped while the rail has not issued one yet. |
|
|
371
|
+
| `host DNS: _authflow-verify TXT` | The ownership TXT is there and matches the receipt. |
|
|
372
|
+
| `host TLS certificate` | The certificate is trusted for the host and has at least 7 days left. The issuer and expiry are printed. |
|
|
373
|
+
| `host http redirects to https` | Plain `http://` answers with a redirect to `https://` on the same host. |
|
|
374
|
+
| `host PRM (path)` | The PRM is served at the well-known path followed by the resource's path, and names the tenant's URL as its `resource`. |
|
|
375
|
+
| `host PRM (root)` | The same document is served at the bare well-known path, which Claude Code probes. |
|
|
376
|
+
| `host 401 challenge` | An unauthenticated MCP request gets a 401 whose `resource_metadata` is an https URL on the host. |
|
|
377
|
+
|
|
378
|
+
With an admin key the receipt is found by `--slug`, or by the host among the resources the key owns.
|
|
379
|
+
Without one, the DNS checks only confirm that each record exists and report `SKIP` rather than
|
|
380
|
+
claiming they were compared. A DNS lookup that fails (a resolver timeout, say) is reported as a
|
|
381
|
+
lookup failure, not as a missing record. If the TLS check fails, the PRM and 401 checks are skipped
|
|
382
|
+
because every https request would fail with the same misleading error. With `--host`, the PRM and
|
|
383
|
+
401 checks of `--slug` are replaced by these, which probe the same URLs.
|
|
384
|
+
|
|
253
385
|
### `authflow register`
|
|
254
386
|
|
|
255
387
|
```bash
|
|
@@ -275,6 +407,14 @@ authflow register --file resource.json --out receipt.json
|
|
|
275
407
|
|
|
276
408
|
`origin_base_uri` may be `null` or omitted, which registers a draft — see `authflow set-origin`.
|
|
277
409
|
|
|
410
|
+
To serve the resource on your own hostname from the start, add `--public-host` (and, if it is not
|
|
411
|
+
`/mcp`, `--public-path`). They are shorthand for `public_host` and `public_path` in the file, and
|
|
412
|
+
override it. The receipt then lists the DNS records to add; see `authflow set-domain`.
|
|
413
|
+
|
|
414
|
+
```bash
|
|
415
|
+
authflow register --file resource.json --public-host mcp.example.com --public-path /api/mcp
|
|
416
|
+
```
|
|
417
|
+
|
|
278
418
|
Writes the registration receipt to `--out` (default `receipt.json`). The one-time `origin_api_key` is
|
|
279
419
|
**not** written to that file: receipts get committed, pasted into issues, and handed to agents, and
|
|
280
420
|
the key is a live bearer credential for the usage endpoint. It is printed to the terminal instead, so
|
|
@@ -370,6 +510,7 @@ Tools:
|
|
|
370
510
|
| `authflow_start_stripe_connect` | Hosted Stripe onboarding link; resumable |
|
|
371
511
|
| `authflow_set_connected_account` | Attach an existing `acct_…` |
|
|
372
512
|
| `authflow_set_origin` | Supply the origin and promote to live |
|
|
513
|
+
| `authflow_set_custom_domain` | Serve a resource on the tenant's own hostname, or, with no `host`, re-verify the one already set: returns the DNS records to add and the state. With `wait` it re-verifies every 15 seconds for under a minute and returns the progress |
|
|
373
514
|
| `authflow_probe` | Conformance probe against the origin |
|
|
374
515
|
| `authflow_mint_test_header` | Signed identity header for local verifier testing |
|
|
375
516
|
| `authflow_rotate_origin_key` | Rotate the origin API key (invalidates the old one immediately) |
|
|
@@ -379,6 +520,17 @@ stay in the MCP client config rather than in the conversation. `write_secrets` i
|
|
|
379
520
|
tools that issue a key; prefer it, because a key returned in a tool result is a credential in a chat
|
|
380
521
|
transcript.
|
|
381
522
|
|
|
523
|
+
`authflow_set_custom_domain` is the twin of `authflow set-domain`, and returns the receipt plus the
|
|
524
|
+
DNS records as text for the agent to hand to the user, since only they can create them at their
|
|
525
|
+
registrar. `host` is optional with the same meaning as `--host`: leave it out and the tool
|
|
526
|
+
re-verifies the host already set, so the second call, once the user has added the records, is just
|
|
527
|
+
the slug and `wait`. `path` is sent only when given, and needs `host`. Its wait is deliberately short: a tool call that outlives the client's request timeout is
|
|
528
|
+
dropped together with its result, and DNS and certificate issuance usually take longer than a
|
|
529
|
+
minute. If the state is not `ready`, the agent tells the user to finish the records and calls again
|
|
530
|
+
with `wait`. A domain that is `blocked`, `moved` or `removed` comes back as a tool error.
|
|
531
|
+
`authflow_doctor` takes `host` for the same checks as `authflow doctor --host`, and
|
|
532
|
+
`authflow_register_resource` takes `public_host` and `public_path` like `authflow register`.
|
|
533
|
+
|
|
382
534
|
Every receipt a tool returns carries `client_mcp_config` — the config for reaching the resource
|
|
383
535
|
through the gateway. Hand the user that, never the origin's hostname, which rejects unsigned requests
|
|
384
536
|
by design.
|
package/dist/checks.d.ts
ADDED
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* What every doctor-style check produces, and the one network helper they share.
|
|
3
|
+
*
|
|
4
|
+
* These lived in doctor.ts. They moved here so doctor.ts can call the tenant-host checks without
|
|
5
|
+
* those checks importing doctor.ts back: that import cycle was the only reason they could not be
|
|
6
|
+
* their own module. doctor.ts re-exports all three, so existing imports keep working.
|
|
7
|
+
*/
|
|
8
|
+
export type DoctorCheck = {
|
|
9
|
+
name: string;
|
|
10
|
+
pass: boolean;
|
|
11
|
+
skipped?: boolean;
|
|
12
|
+
detail: string;
|
|
13
|
+
/** What to do about it. Empty when the check passed. */
|
|
14
|
+
remedy?: string;
|
|
15
|
+
};
|
|
16
|
+
export type FetchOutcome = {
|
|
17
|
+
ok: boolean;
|
|
18
|
+
status?: number;
|
|
19
|
+
body?: string;
|
|
20
|
+
headers?: Headers;
|
|
21
|
+
location?: string;
|
|
22
|
+
error?: string;
|
|
23
|
+
};
|
|
24
|
+
/**
|
|
25
|
+
* An MCP `initialize` with no credentials: what a client sends first, and what the paywall has to
|
|
26
|
+
* answer with a 401. Shared so the gateway check and the tenant-host check cannot drift apart.
|
|
27
|
+
*/
|
|
28
|
+
export declare function unauthenticatedInitialize(): RequestInit;
|
|
29
|
+
/** Network failures are a diagnosis here, not an exception — every one of them is a real finding. */
|
|
30
|
+
export declare function fetchOrNull(url: string, init?: RequestInit): Promise<FetchOutcome>;
|
package/dist/checks.js
ADDED
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* What every doctor-style check produces, and the one network helper they share.
|
|
3
|
+
*
|
|
4
|
+
* These lived in doctor.ts. They moved here so doctor.ts can call the tenant-host checks without
|
|
5
|
+
* those checks importing doctor.ts back: that import cycle was the only reason they could not be
|
|
6
|
+
* their own module. doctor.ts re-exports all three, so existing imports keep working.
|
|
7
|
+
*/
|
|
8
|
+
const timeoutMs = 15_000;
|
|
9
|
+
/**
|
|
10
|
+
* An MCP `initialize` with no credentials: what a client sends first, and what the paywall has to
|
|
11
|
+
* answer with a 401. Shared so the gateway check and the tenant-host check cannot drift apart.
|
|
12
|
+
*/
|
|
13
|
+
export function unauthenticatedInitialize() {
|
|
14
|
+
return {
|
|
15
|
+
method: "POST",
|
|
16
|
+
headers: { "Content-Type": "application/json", Accept: "application/json, text/event-stream" },
|
|
17
|
+
body: JSON.stringify({ jsonrpc: "2.0", id: 1, method: "initialize", params: {} }),
|
|
18
|
+
};
|
|
19
|
+
}
|
|
20
|
+
/** Network failures are a diagnosis here, not an exception — every one of them is a real finding. */
|
|
21
|
+
export async function fetchOrNull(url, init = {}) {
|
|
22
|
+
try {
|
|
23
|
+
const response = await fetch(url, { ...init, signal: AbortSignal.timeout(timeoutMs) });
|
|
24
|
+
return {
|
|
25
|
+
ok: true,
|
|
26
|
+
status: response.status,
|
|
27
|
+
body: await response.text(),
|
|
28
|
+
headers: response.headers,
|
|
29
|
+
location: response.headers.get("location") ?? undefined,
|
|
30
|
+
};
|
|
31
|
+
}
|
|
32
|
+
catch (err) {
|
|
33
|
+
return { ok: false, error: err instanceof Error ? err.message : String(err) };
|
|
34
|
+
}
|
|
35
|
+
}
|
|
36
|
+
//# sourceMappingURL=checks.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"checks.js","sourceRoot":"","sources":["../src/checks.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAoBH,MAAM,SAAS,GAAG,MAAM,CAAC;AAEzB;;;GAGG;AACH,MAAM,UAAU,yBAAyB;IACvC,OAAO;QACL,MAAM,EAAE,MAAM;QACd,OAAO,EAAE,EAAE,cAAc,EAAE,kBAAkB,EAAE,MAAM,EAAE,qCAAqC,EAAE;QAC9F,IAAI,EAAE,IAAI,CAAC,SAAS,CAAC,EAAE,OAAO,EAAE,KAAK,EAAE,EAAE,EAAE,CAAC,EAAE,MAAM,EAAE,YAAY,EAAE,MAAM,EAAE,EAAE,EAAE,CAAC;KAClF,CAAC;AACJ,CAAC;AAED,qGAAqG;AACrG,MAAM,CAAC,KAAK,UAAU,WAAW,CAAC,GAAW,EAAE,OAAoB,EAAE;IACnE,IAAI,CAAC;QACH,MAAM,QAAQ,GAAG,MAAM,KAAK,CAAC,GAAG,EAAE,EAAE,GAAG,IAAI,EAAE,MAAM,EAAE,WAAW,CAAC,OAAO,CAAC,SAAS,CAAC,EAAE,CAAC,CAAC;QACvF,OAAO;YACL,EAAE,EAAE,IAAI;YACR,MAAM,EAAE,QAAQ,CAAC,MAAM;YACvB,IAAI,EAAE,MAAM,QAAQ,CAAC,IAAI,EAAE;YAC3B,OAAO,EAAE,QAAQ,CAAC,OAAO;YACzB,QAAQ,EAAE,QAAQ,CAAC,OAAO,CAAC,GAAG,CAAC,UAAU,CAAC,IAAI,SAAS;SACxD,CAAC;IACJ,CAAC;IAAC,OAAO,GAAG,EAAE,CAAC;QACb,OAAO,EAAE,EAAE,EAAE,KAAK,EAAE,KAAK,EAAE,GAAG,YAAY,KAAK,CAAC,CAAC,CAAC,GAAG,CAAC,OAAO,CAAC,CAAC,CAAC,MAAM,CAAC,GAAG,CAAC,EAAE,CAAC;IAChF,CAAC;AACH,CAAC"}
|
|
@@ -12,6 +12,7 @@
|
|
|
12
12
|
*/
|
|
13
13
|
import { type ClientId } from "./client-fixtures.js";
|
|
14
14
|
import { type DoctorReport } from "./doctor.js";
|
|
15
|
+
import type { HostProbes } from "./tenant-host.js";
|
|
15
16
|
export type ClientConformanceOptions = {
|
|
16
17
|
issuer: string;
|
|
17
18
|
clients: ClientId[];
|
|
@@ -30,5 +31,8 @@ export declare function runDoctorAndConnect(issuer: string, options?: {
|
|
|
30
31
|
slug?: string;
|
|
31
32
|
client?: string;
|
|
32
33
|
dryRun?: boolean;
|
|
33
|
-
|
|
34
|
+
adminKey?: string;
|
|
35
|
+
/** A tenant's own hostname to verify end to end; see `DoctorOptions.host`. */
|
|
36
|
+
host?: string;
|
|
37
|
+
} & HostProbes): Promise<DoctorReport>;
|
|
34
38
|
export declare function runClientConformance(options: ClientConformanceOptions): Promise<DoctorReport>;
|
|
@@ -31,7 +31,13 @@ const chatgptCimdFetchAdvisoryDetail = `Advisory — not proven. ChatGPT's CIMD
|
|
|
31
31
|
const dcr400Footer = "A DCR 400 is the interesting result. Paste error= and error_description= verbatim into a rail " +
|
|
32
32
|
"bug; do not work around it client-side.";
|
|
33
33
|
export async function runDoctorAndConnect(issuer, options = {}) {
|
|
34
|
-
const report = await runDoctor(issuer, options.slug
|
|
34
|
+
const report = await runDoctor(issuer, options.slug, {
|
|
35
|
+
adminKey: options.adminKey,
|
|
36
|
+
host: options.host,
|
|
37
|
+
dns: options.dns,
|
|
38
|
+
tls: options.tls,
|
|
39
|
+
now: options.now,
|
|
40
|
+
});
|
|
35
41
|
if (!options.client) {
|
|
36
42
|
return report;
|
|
37
43
|
}
|
|
@@ -48,6 +54,8 @@ export async function runDoctorAndConnect(issuer, options = {}) {
|
|
|
48
54
|
const google = await checkGoogleRedirectUri(report.issuer, {
|
|
49
55
|
slug: options.slug,
|
|
50
56
|
dryRun: options.dryRun,
|
|
57
|
+
// Read the resource identifier from where the receipt says the PRM lives.
|
|
58
|
+
prmUrl: report.endpoints?.prmUrl,
|
|
51
59
|
});
|
|
52
60
|
const checks = [...report.checks, ...extra.checks, ...google];
|
|
53
61
|
return {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"client-conformance.js","sourceRoot":"","sources":["../src/client-conformance.ts"],"names":[],"mappings":"AAAA;;;;;;;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AK,CAAC,OAAO,CAAC,KAAK,CAAC,EAAE,CAAC;QAC1B,OAAO,EAAE,CAAC;IACZ,CAAC;IACD,OAAO,KAAK,CAAC,GAAG,CAAC,CAAC,KAAK,EAAE,EAAE,CAAC,MAAM,CAAC,KAAK,CAAC,CAAC,CAAC;AAC7C,CAAC"}
|
package/dist/commands/doctor.js
CHANGED
|
@@ -6,7 +6,9 @@ export function doctorCommand(program) {
|
|
|
6
6
|
.command("doctor")
|
|
7
7
|
.description("Check that the rail is reachable, serving a consistent Origin Protocol surface, and (with --client) accepts real MCP client OAuth registration. With --client and --slug (not --dry-run), also drive authorize through login and ask Google whether the rail's redirect_uri is registered")
|
|
8
8
|
.option("--issuer <url>", "Authflow issuer (default: AUTHFLOW_ISSUER)")
|
|
9
|
-
.option("--slug <slug>", "Also check this resource's PRM document and gateway 401 challenge")
|
|
9
|
+
.option("--slug <slug>", "Also check this resource's PRM document and gateway 401 challenge (read from the receipt when an admin key is available, so a resource on its own hostname is probed there)")
|
|
10
|
+
.option("--host <host>", "Also verify a tenant's own hostname end to end: the three DNS records, TLS certificate issuer and expiry, http to https redirect, PRM at both well-known paths, and the 401's resource_metadata. With an admin key, DNS is compared against the receipt (found by --slug, or by the host)")
|
|
11
|
+
.option("--admin-key <key>", "Admin API key (default: AUTHFLOW_ADMIN_API_KEY). Distinguishes a draft 404 from an unknown slug, and catches a stale key after a sandbox reset.")
|
|
10
12
|
.option("--client <name>", "Replay MCP client OAuth registration: cursor, claude, chatgpt, or all")
|
|
11
13
|
.option("--dry-run", "With --client: discovery only, do not POST DCR registrations")
|
|
12
14
|
.option("--json", "Emit the report as JSON")
|
|
@@ -16,8 +18,10 @@ export function doctorCommand(program) {
|
|
|
16
18
|
}
|
|
17
19
|
const report = await runDoctorAndConnect(requireIssuer(opts.issuer), {
|
|
18
20
|
slug: opts.slug,
|
|
21
|
+
host: opts.host,
|
|
19
22
|
client: opts.client,
|
|
20
23
|
dryRun: opts.dryRun,
|
|
24
|
+
adminKey: opts.adminKey,
|
|
21
25
|
});
|
|
22
26
|
console.log(opts.json ? JSON.stringify(report, null, 2) : formatDoctorReport(report));
|
|
23
27
|
process.exitCode = report.pass ? 0 : 1;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"doctor.js","sourceRoot":"","sources":["../../src/commands/doctor.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,mBAAmB,EAAE,MAAM,0BAA0B,CAAC;AAC/D,OAAO,EAAE,aAAa,EAAE,MAAM,cAAc,CAAC;AAC7C,OAAO,EAAE,kBAAkB,EAAE,MAAM,cAAc,CAAC;AAElD,MAAM,UAAU,aAAa,CAAC,OAAgB;IAC5C,OAAO;SACJ,OAAO,CAAC,QAAQ,CAAC;SACjB,WAAW,CACV,2RAA2R,CAC5R;SACA,MAAM,CAAC,gBAAgB,EAAE,4CAA4C,CAAC;SACtE,MAAM,
|
|
1
|
+
{"version":3,"file":"doctor.js","sourceRoot":"","sources":["../../src/commands/doctor.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,mBAAmB,EAAE,MAAM,0BAA0B,CAAC;AAC/D,OAAO,EAAE,aAAa,EAAE,MAAM,cAAc,CAAC;AAC7C,OAAO,EAAE,kBAAkB,EAAE,MAAM,cAAc,CAAC;AAElD,MAAM,UAAU,aAAa,CAAC,OAAgB;IAC5C,OAAO;SACJ,OAAO,CAAC,QAAQ,CAAC;SACjB,WAAW,CACV,2RAA2R,CAC5R;SACA,MAAM,CAAC,gBAAgB,EAAE,4CAA4C,CAAC;SACtE,MAAM,CACL,eAAe,EACf,6KAA6K,CAC9K;SACA,MAAM,CACL,eAAe,EACf,2RAA2R,CAC5R;SACA,MAAM,CAAC,mBAAmB,EAAE,iJAAiJ,CAAC;SAC9K,MAAM,CAAC,iBAAiB,EAAE,uEAAuE,CAAC;SAClG,MAAM,CAAC,WAAW,EAAE,8DAA8D,CAAC;SACnF,MAAM,CAAC,QAAQ,EAAE,yBAAyB,CAAC;SAC3C,MAAM,CACL,KAAK,EAAE,IAQN,EAAE,EAAE;QACH,IAAI,IAAI,CAAC,MAAM,IAAI,CAAC,IAAI,CAAC,MAAM,EAAE,CAAC;YAChC,MAAM,IAAI,KAAK,CAAC,uCAAuC,CAAC,CAAC;QAC3D,CAAC;QAED,MAAM,MAAM,GAAG,MAAM,mBAAmB,CAAC,aAAa,CAAC,IAAI,CAAC,MAAM,CAAC,EAAE;YACnE,IAAI,EAAE,IAAI,CAAC,IAAI;YACf,IAAI,EAAE,IAAI,CAAC,IAAI;YACf,MAAM,EAAE,IAAI,CAAC,MAAM;YACnB,MAAM,EAAE,IAAI,CAAC,MAAM;YACnB,QAAQ,EAAE,IAAI,CAAC,QAAQ;SACxB,CAAC,CAAC;QAEH,OAAO,CAAC,GAAG,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC,CAAC,IAAI,CAAC,SAAS,CAAC,MAAM,EAAE,IAAI,EAAE,CAAC,CAAC,CAAC,CAAC,CAAC,kBAAkB,CAAC,MAAM,CAAC,CAAC,CAAC;QACtF,OAAO,CAAC,QAAQ,GAAG,MAAM,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;IACzC,CAAC,CACF,CAAC;AACN,CAAC"}
|
package/dist/commands/probe.js
CHANGED
|
@@ -2,7 +2,7 @@ import { apiJson, bearer, requireIssuer, requireOriginKey } from "../config.js";
|
|
|
2
2
|
export function probeCommand(program) {
|
|
3
3
|
program
|
|
4
4
|
.command("probe")
|
|
5
|
-
.description("
|
|
5
|
+
.description("Probe origin §6.2 fail-closed behaviour and the Stripe connected-account money path")
|
|
6
6
|
.option("--slug <slug>", "Ignored: the origin API key is already bound to one resource. Accepted so documented invocations do not fail.")
|
|
7
7
|
.option("--issuer <url>", "Authflow issuer (default: AUTHFLOW_ISSUER)")
|
|
8
8
|
.option("--origin-key <key>", "Origin API key (default: AUTHFLOW_ORIGIN_API_KEY)")
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"probe.js","sourceRoot":"","sources":["../../src/commands/probe.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,OAAO,EAAE,MAAM,EAAE,aAAa,EAAE,gBAAgB,EAAE,MAAM,cAAc,CAAC;AAgBhF,MAAM,UAAU,YAAY,CAAC,OAAgB;IAC3C,OAAO;SACJ,OAAO,CAAC,OAAO,CAAC;SAChB,WAAW,CAAC,
|
|
1
|
+
{"version":3,"file":"probe.js","sourceRoot":"","sources":["../../src/commands/probe.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,OAAO,EAAE,MAAM,EAAE,aAAa,EAAE,gBAAgB,EAAE,MAAM,cAAc,CAAC;AAgBhF,MAAM,UAAU,YAAY,CAAC,OAAgB;IAC3C,OAAO;SACJ,OAAO,CAAC,OAAO,CAAC;SAChB,WAAW,CAAC,qFAAqF,CAAC;SAClG,MAAM,CACL,eAAe,EACf,+GAA+G,CAChH;SACA,MAAM,CAAC,gBAAgB,EAAE,4CAA4C,CAAC;SACtE,MAAM,CAAC,oBAAoB,EAAE,mDAAmD,CAAC;SACjF,MAAM,CAAC,KAAK,EAAE,IAA4D,EAAE,EAAE;QAC7E,MAAM,MAAM,GAAG,aAAa,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC;QAC1C,MAAM,SAAS,GAAG,gBAAgB,CAAC,IAAI,CAAC,SAAS,CAAC,CAAC;QAEnD,MAAM,EAAE,IAAI,EAAE,GAAG,MAAM,OAAO,CAAoB,GAAG,MAAM,wBAAwB,EAAE;YACnF,MAAM,EAAE,MAAM;YACd,OAAO,EAAE;gBACP,GAAG,MAAM,CAAC,SAAS,CAAC;gBACpB,MAAM,EAAE,kBAAkB;aAC3B;YACD,gBAAgB,EAAE,CAAC,GAAG,CAAC;SACxB,CAAC,CAAC;QAEH,OAAO,CAAC,GAAG,CAAC,WAAW,IAAI,CAAC,MAAM,EAAE,CAAC,CAAC;QACtC,IAAI,IAAI,CAAC,KAAK,EAAE,CAAC;YACf,OAAO,CAAC,GAAG,CAAC,W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CAAC;YACN,OAAO,CAAC,GAAG,CAAC,eAAe,CAAC,CAAC;YAC7B,OAAO,CAAC,QAAQ,GAAG,CAAC,CAAC;QACvB,CAAC;IACH,CAAC,CAAC,CAAC;AACP,CAAC;AAED,SAAS,GAAG,CAAC,KAAa,EAAE,KAAa;IACvC,OAAO,KAAK,CAAC,MAAM,IAAI,KAAK,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,KAAK,GAAG,GAAG,CAAC,MAAM,CAAC,KAAK,GAAG,KAAK,CAAC,MAAM,CAAC,CAAC;AAClF,CAAC"}
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { readFile, writeFile } from "node:fs/promises";
|
|
2
2
|
import { apiJson, bearer, requireAdminKey, requireIssuer } from "../config.js";
|
|
3
|
+
import { parsePublicHost, parsePublicPath } from "../custom-domain.js";
|
|
3
4
|
import { secretTargets, writeOriginApiKey } from "../secrets.js";
|
|
4
5
|
import { formatCursorMcpConfig, formatReadiness, resourceReadiness } from "../status.js";
|
|
5
6
|
export function registerCommand(program) {
|
|
@@ -13,18 +14,21 @@ export function registerCommand(program) {
|
|
|
13
14
|
.option("--write-secrets <target>", `Store the origin API key and redact it from the receipt (${secretTargets.join(" | ")})`)
|
|
14
15
|
.option("--secret-destination <value>", "user-secrets: project dir (default .) · env-file: path (default .env.local) · keyvault: vault name")
|
|
15
16
|
.option("--keep-secret-in-receipt", "Leave the origin API key in the receipt file as plaintext (not recommended)")
|
|
17
|
+
.option("--public-host <host>", "Serve the resource on your own hostname (a subdomain) instead of the gateway's slug URL. Sent as public_host; the receipt then lists the DNS records to add")
|
|
18
|
+
.option("--public-path <path>", "Public MCP path on that host (default /mcp). Sent as public_path")
|
|
16
19
|
.action(async (opts) => {
|
|
17
20
|
const issuer = requireIssuer(opts.issuer);
|
|
18
21
|
const adminKey = requireAdminKey(opts.adminKey);
|
|
19
22
|
const target = parseTarget(opts.writeSecrets);
|
|
20
23
|
const draftRaw = (await readFile(opts.file, "utf8")).replace(/^\uFEFF/, "");
|
|
21
|
-
let
|
|
24
|
+
let parsed;
|
|
22
25
|
try {
|
|
23
|
-
|
|
26
|
+
parsed = JSON.parse(draftRaw);
|
|
24
27
|
}
|
|
25
28
|
catch {
|
|
26
29
|
throw new Error(`--file ${opts.file} is not valid JSON.`);
|
|
27
30
|
}
|
|
31
|
+
const draft = withPublicHost(parsed, opts);
|
|
28
32
|
const { body, status } = await apiJson(`${issuer}/admin/resources`, {
|
|
29
33
|
method: "POST",
|
|
30
34
|
headers: {
|
|
@@ -89,6 +93,30 @@ export function registerCommand(program) {
|
|
|
89
93
|
}
|
|
90
94
|
});
|
|
91
95
|
}
|
|
96
|
+
/**
|
|
97
|
+
* --public-host and --public-path are shorthand for the same two fields in the file, and win over
|
|
98
|
+
* it. A path with no host is refused here: the rail would have nothing to apply it to, and the
|
|
99
|
+
* silent outcome is a resource on the slug URL that the tenant believes is on their own.
|
|
100
|
+
*/
|
|
101
|
+
function withPublicHost(draft, opts) {
|
|
102
|
+
if (opts.publicHost === undefined && opts.publicPath === undefined) {
|
|
103
|
+
return draft;
|
|
104
|
+
}
|
|
105
|
+
if (draft === null || typeof draft !== "object" || Array.isArray(draft)) {
|
|
106
|
+
throw new Error(`--file ${opts.file} must hold a JSON object to combine it with --public-host / --public-path.`);
|
|
107
|
+
}
|
|
108
|
+
const merged = { ...draft };
|
|
109
|
+
if (opts.publicHost !== undefined) {
|
|
110
|
+
merged.public_host = parsePublicHost(opts.publicHost, "--public-host", "--public-path");
|
|
111
|
+
}
|
|
112
|
+
if (opts.publicPath !== undefined) {
|
|
113
|
+
merged.public_path = parsePublicPath(opts.publicPath, "--public-path");
|
|
114
|
+
}
|
|
115
|
+
if (merged.public_path !== undefined && merged.public_host === undefined) {
|
|
116
|
+
throw new Error("--public-path needs a host: pass --public-host (or set public_host in the file).");
|
|
117
|
+
}
|
|
118
|
+
return merged;
|
|
119
|
+
}
|
|
92
120
|
function parseTarget(raw) {
|
|
93
121
|
if (raw === undefined) {
|
|
94
122
|
return undefined;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"register.js","sourceRoot":"","sources":["../../src/commands/register.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,SAAS,EAAE,MAAM,kBAAkB,CAAC;AAEvD,OAAO,EAAE,OAAO,EAAE,MAAM,EAA4B,eAAe,EAAE,aAAa,EAAE,MAAM,cAAc,CAAC;AACzG,OAAO,EAAqB,aAAa,EAAE,iBAAiB,EAAE,MAAM,eAAe,CAAC;AACpF,OAAO,EAAE,qBAAqB,EAAE,eAAe,EAAE,iBAAiB,EAAE,MAAM,cAAc,CAAC;
|
|
1
|
+
{"version":3,"file":"register.js","sourceRoot":"","sources":["../../src/commands/register.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,SAAS,EAAE,MAAM,kBAAkB,CAAC;AAEvD,OAAO,EAAE,OAAO,EAAE,MAAM,EAA4B,eAAe,EAAE,aAAa,EAAE,MAAM,cAAc,CAAC;AACzG,OAAO,EAAE,eAAe,EAAE,eAAe,EAAE,MAAM,qBAAqB,CAAC;AACvE,OAAO,EAAqB,aAAa,EAAE,iBAAiB,EAAE,MAAM,eAAe,CAAC;AACpF,OAAO,EAAE,qBAAqB,EAAE,eAAe,EAAE,iBAAiB,EAAE,MAAM,cAAc,CAAC;AAczF,MAAM,UAAU,eAAe,CAAC,OAAgB;IAC9C,OAAO;SACJ,OAAO,CAAC,UAAU,CAAC;SACnB,WAAW,CAAC,kEAAkE,CAAC;SAC/E,cAAc,CAAC,mBAAmB,EAAE,yCAAyC,CAAC;SAC9E,MAAM,CAAC,gBAAgB,EAAE,4CAA4C,CAAC;SACtE,MAAM,CAAC,mBAAmB,EAAE,iDAAiD,CAAC;SAC9E,MAAM,CAAC,kBAAkB,EAAE,qBAAqB,EAAE,cAAc,CAAC;SACjE,MAAM,CACL,0BAA0B,EAC1B,4DAA4D,aAAa,CAAC,IAAI,CAAC,KAAK,CAAC,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AI,OAAO,KAAK,KAAK,QAAQ,IAAI,KAAK,CAAC,OAAO,CAAC,KAAK,CAAC,EAAE,CAAC;QACxE,MAAM,IAAI,KAAK,CACb,UAAU,IAAI,CAAC,IAAI,4EAA4E,CAChG,CAAC;IACJ,CAAC;IAED,MAAM,MAAM,GAA4B,EAAE,GAAI,KAAiC,EAAE,CAAC;IAClF,IAAI,IAAI,CAAC,UAAU,KAAK,SAAS,EAAE,CAAC;QAClC,MAAM,CAAC,WAAW,GAAG,eAAe,CAAC,IAAI,CAAC,UAAU,EAAE,eAAe,EAAE,eAAe,CAAC,CAAC;IAC1F,CAAC;IACD,IAAI,IAAI,CAAC,UAAU,KAAK,SAAS,EAAE,CAAC;QAClC,MAAM,CAAC,WAAW,GAAG,eAAe,CAAC,IAAI,CAAC,UAAU,EAAE,eAAe,CAAC,CAAC;IACzE,CAAC;IACD,IAAI,MAAM,CAAC,WAAW,KAAK,SAAS,IAAI,MAAM,CAAC,WAAW,KAAK,SAAS,EAAE,CAAC;QACzE,MAAM,IAAI,KAAK,CAAC,kFAAkF,CAAC,CAAC;IACtG,CAAC;IAED,OAAO,MAAM,CAAC;AAChB,CAAC;AAED,SAAS,WAAW,CAAC,GAAY;IAC/B,IAAI,GAAG,KAAK,SAAS,EAAE,CAAC;QACtB,OAAO,SAAS,CAAC;IACnB,CAAC;IAED,MAAM,KAAK,GAAG,GAAG,CAAC,IAAI,EAAkB,CAAC;IACzC,IAAI,CAAC,aAAa,CAAC,QAAQ,CAAC,KAAK,CAAC,EAAE,CAAC;QACnC,MAAM,IAAI,KAAK,CAAC,mCAAmC,aAAa,CAAC,IAAI,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC;IACjF,CAAC;IACD,OAAO,KAAK,CAAC;AACf,CAAC"}
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
import type { Command } from "commander";
|
|
2
|
+
export type SetDomainOptions = {
|
|
3
|
+
slug: string;
|
|
4
|
+
/** Omit to re-verify the host already set on the resource. */
|
|
5
|
+
host?: string;
|
|
6
|
+
path?: string;
|
|
7
|
+
wait?: boolean;
|
|
8
|
+
timeout?: string;
|
|
9
|
+
issuer?: string;
|
|
10
|
+
adminKey?: string;
|
|
11
|
+
};
|
|
12
|
+
/** Injectable so tests can drive the wait without real time or a real terminal. */
|
|
13
|
+
export type SetDomainEnvironment = {
|
|
14
|
+
sleep?: (ms: number) => Promise<void>;
|
|
15
|
+
now?: () => number;
|
|
16
|
+
log?: (line: string) => void;
|
|
17
|
+
};
|
|
18
|
+
/**
|
|
19
|
+
* Serve a resource on the tenant's own hostname: the "bring your existing MCP URL" step.
|
|
20
|
+
*
|
|
21
|
+
* Setting the host is the easy half. The rail answers with the DNS records the tenant has to create
|
|
22
|
+
* at a registrar this CLI cannot reach, so the command's job is to put those records on screen
|
|
23
|
+
* exactly as the rail issued them and then, with --wait, to confirm they took.
|
|
24
|
+
*
|
|
25
|
+
* There is no separate verify command, so this is also how a tenant re-checks after adding the
|
|
26
|
+
* records: with no --host it verifies the host already set on the resource instead of setting one.
|
|
27
|
+
*/
|
|
28
|
+
export declare function setDomainCommand(program: Command, env?: SetDomainEnvironment): void;
|
|
29
|
+
/**
|
|
30
|
+
* Returns the exit code instead of setting it: 0 when the domain is ready (or, without --wait,
|
|
31
|
+
* when it was set or re-checked and is not in a failure state), 1 when it timed out or is blocked,
|
|
32
|
+
* moved, or removed.
|
|
33
|
+
*/
|
|
34
|
+
export declare function runSetDomain(opts: SetDomainOptions, env?: SetDomainEnvironment): Promise<number>;
|