authflow-cli 0.5.0 → 0.7.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.
Files changed (80) hide show
  1. package/README.md +84 -495
  2. package/dist/brand-mark.d.ts +1 -0
  3. package/dist/brand-mark.js +6 -0
  4. package/dist/brand-mark.js.map +1 -0
  5. package/dist/checks.js.map +1 -1
  6. package/dist/cli.js +2 -2
  7. package/dist/cli.js.map +1 -1
  8. package/dist/client-conformance.js.map +1 -1
  9. package/dist/commands/account.d.ts +2 -0
  10. package/dist/commands/account.js +105 -0
  11. package/dist/commands/account.js.map +1 -0
  12. package/dist/commands/feedback.d.ts +6 -0
  13. package/dist/commands/feedback.js +46 -0
  14. package/dist/commands/feedback.js.map +1 -0
  15. package/dist/commands/init.d.ts +7 -0
  16. package/dist/commands/init.js +50 -12
  17. package/dist/commands/init.js.map +1 -1
  18. package/dist/commands/mcp.js +11 -6
  19. package/dist/commands/mcp.js.map +1 -1
  20. package/dist/commands/plan.js +7 -7
  21. package/dist/commands/plan.js.map +1 -1
  22. package/dist/commands/probe.js +9 -5
  23. package/dist/commands/probe.js.map +1 -1
  24. package/dist/commands/register.js +25 -13
  25. package/dist/commands/register.js.map +1 -1
  26. package/dist/commands/rotate-origin-key.js +15 -10
  27. package/dist/commands/rotate-origin-key.js.map +1 -1
  28. package/dist/commands/scaffold.js +7 -4
  29. package/dist/commands/scaffold.js.map +1 -1
  30. package/dist/commands/set-domain.js.map +1 -1
  31. package/dist/commands/signup.d.ts +1 -0
  32. package/dist/commands/signup.js +4 -50
  33. package/dist/commands/signup.js.map +1 -1
  34. package/dist/config.d.ts +16 -0
  35. package/dist/config.js +58 -4
  36. package/dist/config.js.map +1 -1
  37. package/dist/credentials.d.ts +31 -0
  38. package/dist/credentials.js +223 -0
  39. package/dist/credentials.js.map +1 -0
  40. package/dist/custom-domain.js.map +1 -1
  41. package/dist/doctor.d.ts +21 -0
  42. package/dist/doctor.js +76 -19
  43. package/dist/doctor.js.map +1 -1
  44. package/dist/feedback.d.ts +75 -0
  45. package/dist/feedback.js +82 -0
  46. package/dist/feedback.js.map +1 -0
  47. package/dist/google-redirect.js.map +1 -1
  48. package/dist/integration-plans.json +80 -0
  49. package/dist/integration.d.ts +17 -23
  50. package/dist/integration.js +29 -236
  51. package/dist/integration.js.map +1 -1
  52. package/dist/login-callback.d.ts +29 -0
  53. package/dist/login-callback.js +79 -0
  54. package/dist/login-callback.js.map +1 -0
  55. package/dist/login.d.ts +26 -0
  56. package/dist/login.js +227 -0
  57. package/dist/login.js.map +1 -0
  58. package/dist/management.d.ts +28 -0
  59. package/dist/management.js +102 -0
  60. package/dist/management.js.map +1 -0
  61. package/dist/mcp/management-server.d.ts +4 -0
  62. package/dist/mcp/management-server.js +124 -0
  63. package/dist/mcp/management-server.js.map +1 -0
  64. package/dist/mcp/server.js +74 -35
  65. package/dist/mcp/server.js.map +1 -1
  66. package/dist/program.js +23 -1
  67. package/dist/program.js.map +1 -1
  68. package/dist/rail.d.ts +6 -0
  69. package/dist/rail.js +26 -0
  70. package/dist/rail.js.map +1 -1
  71. package/dist/secrets.d.ts +51 -18
  72. package/dist/secrets.js +234 -89
  73. package/dist/secrets.js.map +1 -1
  74. package/dist/status.js +10 -2
  75. package/dist/status.js.map +1 -1
  76. package/dist/surface.d.ts +1 -0
  77. package/dist/surface.js +1 -0
  78. package/dist/surface.js.map +1 -1
  79. package/dist/version.js.map +1 -1
  80. package/package.json +11 -10
package/README.md CHANGED
@@ -1,539 +1,128 @@
1
1
  # Authflow CLI
2
2
 
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.
3
+ Browser-authorized creator management and an optional local MCP adapter. The primary entry point is the hosted management MCP at `https://staging.rails.authflow.ai/management/mcp`. It includes onboarding, resource management, integration guidance, and documentation. See [Onboard with your agent](../../docs/onboarding/agent.md).
4
4
 
5
- License: Apache-2.0. See [LICENSE](LICENSE).
6
-
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
-
9
- ## Install
10
-
11
- The command is `authflow`. The npm package is [`authflow-cli`](https://www.npmjs.com/package/authflow-cli) (npm blocked the unscoped name `authflow`). No repo checkout is required:
12
-
13
- ```bash
14
- npx -y -p authflow-cli authflow --help
15
- npx -y -p authflow-cli authflow init --slug video --price 900 --credits 12
16
- ```
17
-
18
- Or install globally and drop the `npx` prefix:
19
-
20
- ```bash
21
- npm install -g authflow-cli
22
- authflow --help
23
- ```
5
+ ## Verified workspace onboarding
24
6
 
25
- ## From this repo (development)
26
-
27
- ```bash
28
- cd sdk/cli
29
- npm install
30
- npm run build
31
- node dist/cli.js --help
32
- ```
33
-
34
- During development (no build step):
35
-
36
- ```bash
37
- npx tsx src/cli.ts --help
38
- npm run authflow -- --help
39
- ```
40
-
41
- ## Config
42
-
43
- | Env | Flag | Used by |
44
- | --- | --- | --- |
45
- | `AUTHFLOW_ISSUER` | `--issuer` | all HTTP commands |
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
- | `AUTHFLOW_ORIGIN_API_KEY` | `--origin-key` | `mint-header`, `probe`, `set-origin` (for its probe) |
48
- | `AUTHFLOW_RESOURCE` / `AUTHFLOW_GATEWAY_URL` | `--gateway-url` / `--receipt` | curl hint on `mint-header` |
49
-
50
- Issuer is the Origin Protocol issuer origin, with no trailing slash: staging is `https://staging.rails.authflow.ai`, local is typically `https://localhost:7062`. For an already-registered resource it is the `issuer` field of the receipt. See [tenant quickstart §1](../../docs/onboarding/tenant-quickstart.md#environments-and-hostnames).
51
-
52
- ## Commands
53
-
54
- ### `authflow signup`
55
-
56
- Mints a per-tenant admin API key. This is how a creator gets `AUTHFLOW_ADMIN_API_KEY` without the rail operator handing them one.
7
+ Install the pinned adapter and sign in. First-time authorization creates your personal workspace when you approve consent; no portal setup or admin key is required.
57
8
 
58
9
  ```bash
10
+ npm install -g authflow-cli@0.7.0
59
11
  export AUTHFLOW_ISSUER=https://staging.rails.authflow.ai
60
- npx -y -p authflow-cli authflow signup --email you@example.com
12
+ authflow login
13
+ authflow workspace list
14
+ authflow resource create --file resource.json
15
+ authflow plan --slug my-mcp --framework typescript
16
+ authflow resource origin my-mcp --file origin.json
17
+ authflow resource verify my-mcp
18
+ authflow resource publish my-mcp
61
19
  ```
62
20
 
63
- The key (`afa_test_` on staging, `afa_live_` in production) is shown once and written to `.env.local` by default. It can only register and manage slugs created with that key. The operator bearer still exists as a super-admin.
64
-
65
- ### `authflow init`
66
-
67
- The whole onboarding path in one command: register the resource, put the origin API key in a secret
68
- store, print the config to paste into your MCP server, and probe the origin if it is already up.
69
-
70
- ```bash
71
- export AUTHFLOW_ISSUER=https://staging.rails.authflow.ai
72
- export AUTHFLOW_ADMIN_API_KEY=…
73
-
74
- authflow init --slug video --price 900 --credits 12
75
- ```
76
-
77
- Neither a Stripe account nor a deployed origin is required. Both are deferrable, in any order, and
78
- omitting either registers a **draft**: priced and registered, with a receipt you can build against,
79
- but not routable. That is the normal case — you rarely have a connected Stripe account or an origin
80
- URL before you have built anything.
81
-
82
- The receipt's `pending_requirements` lists what is still outstanding:
21
+ `resource.json` for free authenticated access:
83
22
 
84
- | Requirement | Clear it with |
85
- | --- | --- |
86
- | `origin_base_uri` | `authflow set-origin --slug video --origin-url https://…` |
87
- | `connected_account_id` | `authflow connect --slug video` (hosted KYC) or `authflow set-connected-account --slug video --account acct_…` (you already have the id) |
88
- | `stripe_onboarding_complete` | finish Stripe's form, then `authflow connect --slug video` again |
89
-
90
- Re-running `init` against a slug this admin key already owns resumes it: `409 slug_owned_by_caller`
91
- is not a dead end. `--connected-account` and `--origin-url` then attach instead of failing. A slug
92
- owned by someone else still returns `slug_taken`.
93
-
94
- The resource goes live once the list is empty. Add `--connect` to `init` to get the Stripe
95
- onboarding link from the first command instead of running `connect` separately.
96
-
97
- Useful flags:
98
-
99
- | Flag | Default | Meaning |
100
- | --- | --- | --- |
101
- | `--integration <dotnet\|proxy>` | `dotnet` | Which origin config to print |
102
- | `--write-secrets <target>` | `user-secrets` | `user-secrets`, `env-file`, or `keyvault` |
103
- | `--secret-destination <value>` | — | Project dir, env-file path, or vault name |
104
- | `--connected-account <acct>` | — | Attach a Stripe account you already have |
105
- | `--connect` | — | Start Stripe onboarding and print the hosted link |
106
- | `--origin-url <url>` | — | Supply the origin now instead of later |
107
- | `--no-probe` | — | Skip the conformance probe |
108
-
109
- ### `authflow connect`
110
-
111
- Starts or resumes Stripe Connect Standard onboarding and prints the hosted link the creator opens to
112
- complete KYC.
113
-
114
- ```bash
115
- authflow connect --slug video
116
- authflow connect --slug video --wait # poll until Stripe reports the account can take charges
117
- authflow connect --slug video --connected-account acct_… # attach an account you already have
118
- ```
119
-
120
- Account links are single-use and expire in minutes. Re-running is the expected way to get a fresh
121
- one: it resumes the same Stripe account rather than creating another, so retrying never leaves
122
- abandoned accounts behind. Run it again after the form is submitted to confirm `charges_enabled` and
123
- promote the resource.
124
-
125
- `--connected-account` skips hosted KYC and is the same PUT as `authflow set-connected-account`.
126
-
127
- ### `authflow set-connected-account`
128
-
129
- Attach a Stripe Standard account id the platform already has. This is the CLI twin of
130
- `authflow_set_connected_account` and of `PUT /admin/resources/{slug}/connected-account`. Use it when
131
- `connect` would otherwise start a new hosted onboarding you do not need.
132
-
133
- ```bash
134
- authflow set-connected-account --slug video --account acct_…
135
- ```
136
-
137
- ### `authflow set-origin`
138
-
139
- Points a draft at its origin, promoting it to live if nothing else is pending, then runs the
140
- conformance probe.
141
-
142
- ```bash
143
- authflow set-origin --slug video --origin-url https://video-xyz.azurecontainerapps.io
144
- ```
145
-
146
- Pass the base URI without `/mcp`; the gateway appends it.
147
-
148
- The probe runs automatically because this is the moment the resource starts accepting traffic, and a
149
- closing "remember to verify" is a step that gets skipped. It needs `AUTHFLOW_ORIGIN_API_KEY` (or
150
- `--origin-key`) — the admin key cannot stand in, because the probe authenticates as the origin. If
151
- the key is not available the command says so and completes; `--no-probe` skips it deliberately.
152
-
153
- The command also prints the client MCP config for the gateway URL. Use it verbatim: an MCP client
154
- pointed at the origin's own hostname gets `403 invalid_origin_identity`, which is the origin
155
- correctly refusing an unsigned request, not an auth bug.
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
23
+ ```json
24
+ { "slug": "my-mcp", "display_name": "My MCP", "access_mode": "free" }
178
25
  ```
179
26
 
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.
27
+ `origin.json`:
183
28
 
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
29
+ ```json
30
+ { "origin_base_uri": "https://my-origin.example.com" }
196
31
  ```
197
32
 
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. |
33
+ Free and gateway-metered origins verify signed identity with public keys. They do not require an origin credential. Every resource starts as a draft and requires conformance verification and explicit publication.
203
34
 
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.
35
+ For paid access, include `access_mode: "paid"`, `currency: "usd"`, `price_amount_minor: 900`, and `credits_per_period: 12`. Gateway metering is the default, with `metering_default_units: 1` and `tool_units: {}`. Configure per-tool costs by supplying a replacement map such as `{ "preview": 0, "generate": 3 }`. Use `metering_mode: "origin_reported"` when your origin must determine completion or report variable costs. Never charge one call through both mechanisms.
206
36
 
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.
37
+ Connect Stripe with `authflow stripe onboard` or `authflow stripe connect-existing`. These return authenticated Authflow links for the owner's browser. Then refresh status; returning from Stripe alone does not prove readiness. Authflow charges a 9% fee on paid sales; monthly platform plans are not implemented.
210
38
 
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.
39
+ ## Creator commands
214
40
 
215
- | Exit | When |
41
+ | Command | Purpose |
216
42
  | --- | --- |
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 |
43
+ | `login [--workspace <id>] [--no-browser]` | Browser authorization with PKCE and workspace consent |
44
+ | `logout` | Revoke authorization and remove the OS-stored credential |
45
+ | `logout --local-only` | Clear this device only |
46
+ | `workspace list`, `workspace overview` | Workspace and recent activity |
47
+ | `workspace usage`, `workspace earnings` | Usage ledger debits and compensations, and paid-sales earnings |
48
+ | `workspace rename <name>` | Rename the authorized workspace |
49
+ | `resource list`, `resource get <slug>` | Receipts, status, and requirements |
50
+ | `resource create --file <json>` | Create a draft; keys are never printed |
51
+ | `resource update <slug> --file <json>` | Patch supplied name, offer, and metering fields |
52
+ | `resource origin <slug> --file <json>` | Set the private origin base URL without `/mcp` |
53
+ | `resource domain <slug> --file <json>` | Set `public_host` and `public_path` before first publication |
54
+ | `resource domain-refresh <slug>` | Refresh DNS/certificate readiness |
55
+ | `resource verify <slug>` | Probe the exact current configuration |
56
+ | `resource publish <slug>`, `resource disable <slug>` | Explicitly change traffic availability |
57
+ | `resource rotate-key <slug> --write-secrets <target> --secret-destination <value>` | Deliver an origin-reported usage credential |
58
+ | `stripe status`, `stripe onboard`, `stripe connect-existing` | Readiness and authenticated owner actions |
59
+ | `plan --slug <slug> --framework <framework>` | Resource-specific plan from Rail's canonical templates |
60
+ | `docs search <query>`, `docs get <path>` | Search and read Authflow's indexed public documentation through your login |
61
+ | `feedback --kind <kind> --summary <text>` | Tell the Authflow team what was confusing, broken or missing, or leave a suggestion; sent through your login when there is one, anonymously otherwise |
62
+ | `mcp` | Local management MCP with the protected CLI login |
63
+ | `mcp --legacy-admin` | The older admin-key MCP adapter, kept for migration and recovery |
64
+
65
+ Management commands accept `--issuer`; workspace operations also accept `--workspace`. Omitted PATCH fields preserve values. A supplied `tool_units` map replaces the old map. Actual offer/access/metering changes invalidate verification and publication; re-verify and explicitly publish. A name-only update preserves the policy.
66
+
67
+ ## Legacy admin-key commands
68
+
69
+ These older commands call the operator `/admin` API with `--admin-key` (default: `AUTHFLOW_ADMIN_API_KEY`) instead of your login. They remain for operators and for migrating existing tenant keys; new creators use the commands above. A tenant admin key can still register drafts and read, re-point, re-domain or re-key its own resources, but attaching Stripe and publishing are operator-only on this surface and answer `410 verified_account_required`.
70
+
71
+ | Command | Purpose |
221
72
  | --- | --- |
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.
73
+ | `register --file <json>` | Register a resource through the admin API and write the receipt |
74
+ | `init --slug <slug>` | Register, store the origin key and print origin configuration |
75
+ | `list`, `get --slug <slug>`, `status --slug <slug>` | Receipts and readiness for resources this admin key owns |
76
+ | `set-origin --slug <slug> --origin-url <url>` | Set or move the origin base URI, then probe it |
77
+ | `set-domain --slug <slug>` | Claim a resource's own hostname, or re-verify the one already set |
78
+ | `rotate-origin-key --slug <slug>` | Issue a new origin API key |
79
+ | `connect --slug <slug>`, `set-connected-account --slug <slug> --account <acct>` | Stripe Connect (operator credential only) |
80
+ | `signup` | Retired. Exits with an error that points to `login`; it never mints a key |
236
81
 
237
- ### `authflow status`
82
+ ## Direct secret delivery
238
83
 
239
- Where onboarding actually got to, and the command that clears each remaining step.
84
+ Paid origin-reported resources need a credential for the usage endpoint. Choose an explicit destination before issuance:
240
85
 
241
86
  ```bash
242
- authflow status --slug video
87
+ authflow resource rotate-key my-mcp --write-secrets keyvault --secret-destination my-vault
88
+ authflow resource rotate-key my-mcp --write-secrets user-secrets --secret-destination ./MyOrigin.csproj
89
+ authflow resource rotate-key my-mcp --write-secrets env-file --secret-destination ./.env.local
243
90
  ```
244
91
 
245
- ```
246
- resource: video
247
- status: draft
248
- gateway: https://staging.rails.authflow.ai/video/mcp
249
-
250
- [x] resource registered
251
- [ ] origin URI set
252
- no origin — the gateway has nowhere to forward to
253
- next: authflow set-origin --slug video --origin-url https://your-origin.example
254
- [ ] Stripe connected
255
- no connected account — nothing can be charged
256
- next: authflow connect --slug video (or authflow set-connected-account --slug video --account acct_…)
257
- [ ] Stripe onboarding complete
258
- no connected account — attach one before Stripe can confirm charges
259
- next: authflow connect --slug video (or authflow set-connected-account --slug video --account acct_…)
260
- ```
261
-
262
- "Stripe onboarding complete" is ticked only when this resource has an account attached **and** Stripe
263
- has not listed `stripe_onboarding_complete` as pending. No account is not "charges enabled."
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
92
+ Use only the command for your destination. Key Vault secret names include the resource identity, avoiding collisions across workspaces/resources/environments. Destination preflight happens before rotation. Free/gateway resources return `not_required` without rotating. For origin-reported creation, the same destination flags can store the one-time key directly.
277
93
 
278
- next: authflow set-domain --slug video --wait
279
- ```
94
+ Key values stay out of normal output and errors. Secret writers avoid process arguments containing values where supported. Env files are plaintext development storage: exclude them from source control. Azure delivery uses the signed-in Azure CLI identity. A bounded metadata check confirms destination reachability and catches known authentication/network failures before rotation. It cannot prove `secrets/set` permission without writing: identities with write-only permission remain supported, and actual delivery determines write access.
280
95
 
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.
96
+ `origin_key_stored_at` confirms storage only, and `deployment_updated: false` means application bindings and deployment still need work. If delivery fails after issuance, the old key may already be revoked. Repair access, inspect state, and explicitly rotate again; the command never retries that mutation silently.
284
97
 
285
- Use it to resume an onboarding whose earlier steps may or may not have finished — a deploy that got
286
- backgrounded, a terminal that was closed. `doctor` answers "is the rail up", which is a different
287
- question: the rail can be perfectly healthy while a resource sits half-configured and rejects every
288
- request. Exit code is non-zero until the resource can take paid traffic, so it works as a deploy
289
- gate. `--json` emits the report for scripting.
98
+ ## Authflow MCP
290
99
 
291
- ### `authflow plan`
292
-
293
- Prints the same framework-specific origin integration plan as `authflow_integration_plan`.
294
-
295
- ```bash
296
- authflow plan --slug video --framework dotnet
297
- ```
298
-
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).
300
-
301
- ### `authflow get` / `authflow list`
302
-
303
- ```bash
304
- authflow get --slug video # one receipt, plus the client MCP config
305
- authflow list # every resource this admin key owns
306
- ```
307
-
308
- `list` is the recovery path for a forgotten slug, which `get` cannot be — it needs the slug you are
309
- trying to remember. If a registration reported the slug was taken and it is not in `list`, another
310
- tenant owns it and you need a different name; slugs are global because they are the gateway path
311
- segment.
312
-
313
- ### `authflow rotate-origin-key`
314
-
315
- ```bash
316
- authflow rotate-origin-key --slug video --write-secrets user-secrets
317
- ```
318
-
319
- The recovery path for a lost origin API key, which is shown only once. The previous key stops working
320
- the moment the command returns, so update the origin's secret store immediately or its usage reports
321
- and probes will start failing.
322
-
323
- ### `authflow doctor`
324
-
325
- Preflights a rail deployment before you spend time debugging your own origin.
326
-
327
- ```bash
328
- authflow doctor --issuer https://staging.rails.authflow.ai --slug video
329
- ```
330
-
331
- Checks that the issuer is reachable, that the Origin Protocol keys document is served and
332
- self-consistent (issuer byte-match, protocol version, a usable Ed25519 key, no private key
333
- material), and — with `--slug` — that the resource's PRM document resolves and the gateway answers
334
- an unauthenticated connect with a `401` carrying `resource_metadata`.
335
-
336
- Run this first when anything looks broken. It separates the two failures that are indistinguishable
337
- from the outside: a hostname that is not bound to the rail returns `404` on every path including
338
- `/healthz`, which reads exactly like a broken endpoint. Exit code is non-zero on any failure.
339
-
340
- `--client cursor|claude|chatgpt|all` additionally replays that MCP client's real OAuth registration
341
- against the authorization server (the failure that presents as "this server does not work in
342
- Cursor"). `--dry-run` is discovery only and does not POST DCR. Live DCR registrations are stamped
343
- `authflow-cli doctor-connect` so a cleanup sweep can reclaim them.
344
-
345
- A `400` from the rail's DCR endpoint is the interesting result: paste `error=` and
346
- `error_description=` verbatim into a rail bug. Do not work around it client-side.
347
-
348
- ```bash
349
- authflow doctor --issuer https://staging.rails.authflow.ai --slug video --client cursor
350
- authflow doctor --client all --dry-run
351
- ```
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
-
385
- ### `authflow register`
386
-
387
- ```bash
388
- export AUTHFLOW_ISSUER=https://staging.rails.authflow.ai
389
- export AUTHFLOW_ADMIN_API_KEY=…
390
- authflow register --file resource.json --out receipt.json
391
- ```
392
-
393
- `resource.json` uses the same snake_case fields as `POST /admin/resources` (see [tenant quickstart](../../docs/onboarding/tenant-quickstart.md) §3):
100
+ For a remote client, add `https://staging.rails.authflow.ai/management/mcp` and complete browser consent. For a local adapter, run `authflow login` first, then configure:
394
101
 
395
102
  ```json
396
103
  {
397
- "slug": "video",
398
- "origin_base_uri": "https://video-xyz.azurecontainerapps.io",
399
- "display_name": "Snyder Video",
400
- "connected_account_id": "acct_…",
401
- "currency": "usd",
402
- "price_amount_minor": 900,
403
- "credits_per_period": 12,
404
- "price_version": 1
104
+ "mcpServers": {
105
+ "authflow": {
106
+ "command": "npx",
107
+ "args": ["-y", "-p", "authflow-cli@0.7.0", "authflow", "mcp"],
108
+ "env": { "AUTHFLOW_ISSUER": "https://staging.rails.authflow.ai" }
109
+ }
110
+ }
405
111
  }
406
112
  ```
407
113
 
408
- `origin_base_uri` may be `null` or omitted, which registers a draft — see `authflow set-origin`.
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
-
418
- Writes the registration receipt to `--out` (default `receipt.json`). The one-time `origin_api_key` is
419
- **not** written to that file: receipts get committed, pasted into issues, and handed to agents, and
420
- the key is a live bearer credential for the usage endpoint. It is printed to the terminal instead, so
421
- nothing is lost. `--keep-secret-in-receipt` restores the old behaviour if you really need it.
422
-
423
- Better still, have the CLI store it for you:
424
-
425
- ```bash
426
- authflow register --file resource.json --write-secrets user-secrets --secret-destination ./src/MyMcpServer
427
- ```
428
-
429
- `env-file` writes `.env.local` (and adds it to `.gitignore`); `keyvault` calls
430
- `az keyvault secret set` and needs `--secret-destination <vault>`.
431
-
432
- Lost the key? `authflow rotate-origin-key --slug <slug>`.
433
-
434
- Registration also prints the client MCP config and, for a draft, the remaining steps — a registered
435
- resource is not yet a reachable one, and from the outside the two are indistinguishable.
436
-
437
- ### `authflow mint-header`
438
-
439
- Dev/staging only (`OriginProtocol:EnableDevEndpoints`). Mints a signed `X-Authflow-Identity` without OAuth.
440
-
441
- ```bash
442
- export AUTHFLOW_ORIGIN_API_KEY=afo_test_…
443
- authflow mint-header --tier standard --ttl 90 --grant-credits 3 --receipt receipt.json
444
- ```
445
-
446
- Prints the header and, when a gateway URL is known, a ready-to-paste `curl` against it.
447
-
448
- ### `authflow probe`
449
-
450
- Asks the rail to probe the registered origin with valid and deliberately broken identity headers.
451
-
452
- ```bash
453
- authflow probe
454
- authflow probe --slug video
455
- ```
456
-
457
- The origin API key is bound to one resource, so `--slug` is optional and ignored. It exists so a
458
- documented `authflow probe --slug …` does not fail. Renders a pass/fail table. Exit code is
459
- non-zero when any check fails or the origin is unreachable.
114
+ Both expose workspace overview/rename, resource lifecycle, usage, earnings, Stripe actions, integration plans, docs search/read, and `authflow_send_feedback`, which agents use to report confusion, workarounds, missing tools, or suggestions to the Authflow team. Tools require their authorized workspace and scope; read-only consent cannot write. Personal identity/security and consumer billing are outside this creator tool surface. Tool results never include origin keys or OAuth credentials.
460
115
 
461
- ### `authflow scaffold`
116
+ Integration templates are versioned in `rail/docs/onboarding/integration-plans.json`. Rail's resource-specific endpoint, hosted/local MCP, and modern `plan` consume this source; generic documentation is generated from it.
462
117
 
463
- ```bash
464
- authflow scaffold --receipt receipt.json --upstream http://upstream:3000
465
- ```
118
+ ## Runtime and verification
466
119
 
467
- Writes:
120
+ Credentials use Windows Credential Manager, macOS Keychain, or an available unlocked Linux secret service. There is no plaintext login fallback. Browser login uses a local callback. Refresh is serialized across processes; writes are not automatically retried. Read resource/Stripe state after interruptions.
468
121
 
469
- - `.env` — `AUTHFLOW_ISSUER`, `AUTHFLOW_RESOURCE`, `AUTHFLOW_ORIGIN_API_KEY`, `AUTHFLOW_UPSTREAM_BASE_URI`
470
- - `docker-compose.authflow.yml` — `authflow-origin-proxy` in front of an upstream placeholder
122
+ Staging issuer: `https://staging.rails.authflow.ai`. Local Compose defaults to `http://127.0.0.1:8080` (respect a configured `RAIL_PORT`). Production Rail provisioning is separate from this release.
471
123
 
472
- See [origin-proxy.md](../../docs/onboarding/origin-proxy.md) for the forwarded-header contract and the
473
- nonce-cache options.
124
+ Origin diagnostics such as `doctor`, `probe`, `mint-header`, and `scaffold` remain available via command help for operators. They are not prerequisites for normal creator onboarding. Use `resource verify` with your scoped login; never ask a new creator for a tenant admin credential.
474
125
 
475
- ### `authflow mcp`
126
+ Gateway metering cannot infer all failures after a streamed response begins. Use origin-reported debit/compensation when provider completion determines the charge. The [tenant quickstart](../../docs/onboarding/tenant-quickstart.md) and [Origin Protocol v1](../../docs/origin-protocol/v1.md) define the integration contract.
476
127
 
477
- Runs the onboarding operations as an MCP server on stdio, so a coding agent can do the onboarding
478
- instead of a human running commands. The agent already has the creator's codebase; what it lacks is
479
- a way to talk to the rail. This supplies exactly that, and nothing more — the server never reads or
480
- writes source files. It hands back an integration plan and the agent applies it.
481
-
482
- Add it to Cursor or Claude Desktop:
483
-
484
- ```json
485
- {
486
- "mcpServers": {
487
- "authflow": {
488
- "command": "npx",
489
- "args": ["-y", "-p", "authflow-cli", "authflow", "mcp"],
490
- "env": {
491
- "AUTHFLOW_ISSUER": "https://staging.rails.authflow.ai",
492
- "AUTHFLOW_ADMIN_API_KEY": "…"
493
- }
494
- }
495
- }
496
- }
497
- ```
498
-
499
- Tools:
500
-
501
- | Tool | Does |
502
- | --- | --- |
503
- | `authflow_signup` | Mint a per-tenant admin API key (no existing credential) |
504
- | `authflow_doctor` | Preflight the rail; distinguishes a bad hostname from an outage |
505
- | `authflow_register_resource` | Register and price a resource; optionally store the key in a secret store |
506
- | `authflow_get_resource` | Current receipt, `status`, and `pending_requirements` |
507
- | `authflow_list_resources` | Every resource this key owns — how an agent recovers an unknown slug |
508
- | `authflow_status` | Per-step readiness with the command that clears each one; use it to resume |
509
- | `authflow_integration_plan` | Config, snippets, verification steps, and invariants for `dotnet`, `typescript`, `python`, or `proxy` |
510
- | `authflow_start_stripe_connect` | Hosted Stripe onboarding link; resumable |
511
- | `authflow_set_connected_account` | Attach an existing `acct_…` |
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 |
514
- | `authflow_probe` | Conformance probe against the origin |
515
- | `authflow_mint_test_header` | Signed identity header for local verifier testing |
516
- | `authflow_rotate_origin_key` | Rotate the origin API key (invalidates the old one immediately) |
517
-
518
- Every tool takes `issuer` and `admin_key` optionally, falling back to the environment, so credentials
519
- stay in the MCP client config rather than in the conversation. `write_secrets` is available on both
520
- tools that issue a key; prefer it, because a key returned in a tool result is a credential in a chat
521
- transcript.
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
-
534
- Every receipt a tool returns carries `client_mcp_config` — the config for reaching the resource
535
- through the gateway. Hand the user that, never the origin's hostname, which rejects unsigned requests
536
- by design.
537
-
538
- Authentication is a per-tenant `afa_` admin API key from `authflow signup` (or `authflow_signup`).
539
- The operator bearer still works as a super-admin. Per-creator OAuth is not required for onboarding.
128
+ License: Apache-2.0. See [LICENSE](LICENSE).
@@ -0,0 +1 @@
1
+ export declare const brandMarkPng = "iVBORw0KGgoAAAANSUhEUgAAADAAAAAwCAYAAABXAvmHAAAKtUlEQVR4nO1Ze2ydZRn/Pc/7fpdz6enmGIFhEJlO7DbmlCgg0hEYlwUYibZB0Wg0XFUiGhOJcW0jihhN1H8ICfoPQaXHKH+IjkvclmxcNnAD1l27lQ22tVvXbT1tz+X73vcx73u6rhvr7kCIe5Onp5dz3u/5Pb/nXuDsOXvOng/1oTN7nRDaoDATctivi+O+KXYR0G4AOvw9/6+HzqDlqbMddPeTyQ/KVXWVKZWJU8BWLKmyhRgl0Z4yFV5Zu2VaNtu+cuW/h4B2OV0m9BnRvxNMrWTu/Hj596VCfL+kAHI5UA2AAsSJAPErPUgGFLYN78oAHfcCMxUA88Ey0CkKrWSbOofmdJv4tVpNDNUMIRFC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