@m-kopa/launchpad-cli 0.76.0 → 0.78.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/CHANGELOG.md +35 -0
- package/dist/bundle/upload.d.ts +16 -0
- package/dist/bundle/upload.d.ts.map +1 -1
- package/dist/cli.js +3415 -597
- package/dist/commands/admin-cli-sessions.d.ts +6 -0
- package/dist/commands/admin-cli-sessions.d.ts.map +1 -0
- package/dist/commands/admin.d.ts.map +1 -1
- package/dist/commands/agreement.d.ts +44 -0
- package/dist/commands/agreement.d.ts.map +1 -0
- package/dist/commands/app-lints.d.ts +14 -0
- package/dist/commands/app-lints.d.ts.map +1 -0
- package/dist/commands/deploy-flags.d.ts +2 -0
- package/dist/commands/deploy-flags.d.ts.map +1 -1
- package/dist/commands/deploy.d.ts.map +1 -1
- package/dist/commands/destroy.d.ts +36 -0
- package/dist/commands/destroy.d.ts.map +1 -1
- package/dist/commands/disable.d.ts +42 -0
- package/dist/commands/disable.d.ts.map +1 -0
- package/dist/commands/init.d.ts +10 -0
- package/dist/commands/init.d.ts.map +1 -1
- package/dist/commands/login.d.ts +4 -1
- package/dist/commands/login.d.ts.map +1 -1
- package/dist/commands/status.d.ts +13 -1
- package/dist/commands/status.d.ts.map +1 -1
- package/dist/commands/validate.d.ts.map +1 -1
- package/dist/deploy/preflight.d.ts +134 -0
- package/dist/deploy/preflight.d.ts.map +1 -0
- package/dist/deploy/verify-deploy.d.ts.map +1 -1
- package/dist/destroy-failure.d.ts +23 -0
- package/dist/destroy-failure.d.ts.map +1 -0
- package/dist/dispatcher.d.ts.map +1 -1
- package/dist/http/api-client.d.ts +16 -2
- package/dist/http/api-client.d.ts.map +1 -1
- package/dist/http/error-envelope.d.ts +13 -1
- package/dist/http/error-envelope.d.ts.map +1 -1
- package/dist/http/errors.d.ts +18 -0
- package/dist/http/errors.d.ts.map +1 -1
- package/dist/scaffold/react-api-starter-files.d.ts +7 -0
- package/dist/scaffold/react-api-starter-files.d.ts.map +1 -0
- package/dist/scaffold/react-api-starter.d.ts +26 -0
- package/dist/scaffold/react-api-starter.d.ts.map +1 -0
- package/dist/scaffold/secure-api-template.d.ts +57 -0
- package/dist/scaffold/secure-api-template.d.ts.map +1 -0
- package/dist/version.d.ts +1 -1
- package/package.json +2 -2
- package/skills/launchpad-content-pr/SKILL.md +48 -7
- package/skills/launchpad-deploy/SKILL.md +240 -10
- package/skills/launchpad-deploy-status/SKILL.md +111 -9
- package/skills/launchpad-destroy/SKILL.md +41 -8
- package/skills/launchpad-identity/SKILL.md +31 -1
- package/skills/launchpad-ingest/SKILL.md +11 -6
- package/skills/launchpad-integration-contract/SKILL.md +1 -1
- package/skills/launchpad-onboard/SKILL.md +21 -1
- package/skills/launchpad-report/SKILL.md +1 -1
- package/skills/launchpad-status/SKILL.md +13 -5
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: launchpad-deploy-status
|
|
3
3
|
description: Show the current provisioning stage + failure reason for a Launchpad app via `launchpad status` (Model A drift + deployment_verified) and `launchpad apps` (lifecycle bucket), or watch provisioning live with `launchpad watch`. Renders the M-892 stage trace for in-flight provisioning, and is the canonical home for `launchpad recover` (repair a terminal-failed app record that is actually live). Use when someone says "what's the status of demo-X", "/launchpad-deploy-status", "is my deploy stuck", "watch my deploy go live", "watch provisioning", "my app says failed but it's serving", or after `/launchpad-deploy` reports a non-`done` terminal stage.
|
|
4
|
-
version: 0.
|
|
4
|
+
version: 0.78.0
|
|
5
5
|
---
|
|
6
6
|
|
|
7
7
|
<!-- BEGIN shell-contract (managed by scripts/sync-skill-contract.sh — edit skills/_partials/shell-contract.md) -->
|
|
@@ -70,7 +70,7 @@ inference source resolves.
|
|
|
70
70
|
| What was actually deployed? | `launchpad pull --manifest <slug>` |
|
|
71
71
|
| Is the app stuck in the legacy M-892 zero-touch flow? | See § Legacy below |
|
|
72
72
|
| What broke the most recent deploy? | `launchpad status <slug> --json` + the bot's PR check trail |
|
|
73
|
-
| It says `failed` but the app is live in a browser | `launchpad recover <slug>` — see § Recover below |
|
|
73
|
+
| It says `failed` but the app is live in a browser (a Pages app; `recover` refuses a dispatch app) | `launchpad recover <slug>` — see § Recover below |
|
|
74
74
|
| A container app is `provisioning_failed` at `deployment_verified` (deploy workflow found its secrets missing; a one-step `launchpad deploy` normally prevents this) | `launchpad secrets push`, then `launchpad recover <slug>`; the bot authorizes and verifies the retry run and marks the app live (watch `launchpad status`) |
|
|
75
75
|
|
|
76
76
|
The Model A default is `launchpad status <slug>` (a one-shot read).
|
|
@@ -116,10 +116,18 @@ the canonical reference). Lifecycle-shaped states:
|
|
|
116
116
|
To watch it advance to its terminal state live, use
|
|
117
117
|
`launchpad watch <slug>` (§ Watch).
|
|
118
118
|
- **`provisioning_failed`** — provisioning failed; the failing stage
|
|
119
|
-
and reason are shown inline. If the app is actually live
|
|
120
|
-
§ Recover
|
|
119
|
+
and reason are shown inline. If the app is actually live and is a Pages
|
|
120
|
+
app, see § Recover; for a failed dispatch app see § First deploy stuck at
|
|
121
|
+
`provisioning_failed`.
|
|
121
122
|
- **`destroying` / `destroyed` / `destroy_failed`** — teardown
|
|
122
123
|
states. Route to `/launchpad-destroy`.
|
|
124
|
+
After a destroy that ends `destroy_failed`, run `launchpad destroy <slug>
|
|
125
|
+
--confirm-slug <slug> --yes` again; the teardown resumes from the failed
|
|
126
|
+
step (a second destroy completed in about 80 s on 16 Nov 2026). From CLI
|
|
127
|
+
0.78.0, `launchpad status <slug>` on a `destroy_failed` app shows which
|
|
128
|
+
teardown step failed, the reason the platform recorded, and a next step
|
|
129
|
+
(`--json` adds `failedReason` and `destroyFailure`); an older CLI prints only
|
|
130
|
+
"destroy FAILED".
|
|
123
131
|
|
|
124
132
|
Live-app states:
|
|
125
133
|
|
|
@@ -177,10 +185,14 @@ field. Common values:
|
|
|
177
185
|
- **`failed`** — provisioning failed. See `launchpad status <slug>
|
|
178
186
|
--json` for the most recent error, and the bot's open PR on
|
|
179
187
|
`launchpad-platform` for the apply trace. If the app is actually
|
|
180
|
-
live and serving, repair the record with
|
|
181
|
-
<slug>` (§ Recover).
|
|
188
|
+
live and serving and is a Pages app, repair the record with
|
|
189
|
+
`launchpad recover <slug>` (§ Recover). For a failed dispatch app see
|
|
190
|
+
§ First deploy stuck at `provisioning_failed`.
|
|
182
191
|
- **`destroying` / `destroyed` / `destroy_failed`** — teardown
|
|
183
192
|
states. Route to `/launchpad-destroy`.
|
|
193
|
+
After a destroy that ends `destroy_failed`, run `launchpad destroy <slug>
|
|
194
|
+
--confirm-slug <slug> --yes` again; the teardown resumes from the failed
|
|
195
|
+
step (a second destroy completed in about 80 s on 16 Nov 2026).
|
|
184
196
|
|
|
185
197
|
Restrict to a single slug with `grep` if the list is long —
|
|
186
198
|
`launchpad apps` has no `--json` flag, so the table is the only
|
|
@@ -225,7 +237,7 @@ Next steps:
|
|
|
225
237
|
`live`.
|
|
226
238
|
```
|
|
227
239
|
|
|
228
|
-
Failed deploy:
|
|
240
|
+
Failed deploy (a Pages app; a failed dispatch app gets the destroy-and-deploy-again steps instead of `recover`):
|
|
229
241
|
|
|
230
242
|
```
|
|
231
243
|
App: demo-7
|
|
@@ -262,6 +274,8 @@ from inside the app directory.
|
|
|
262
274
|
|
|
263
275
|
What it does (bot `POST /apps/<slug>/recover`):
|
|
264
276
|
|
|
277
|
+
- **Pages apps (and containers) only.** It checks a Pages project, so on a
|
|
278
|
+
dispatch app it answers `not_live`; use `launchpad status` instead.
|
|
265
279
|
- **Re-derives reality from the live Cloudflare Pages API** — never
|
|
266
280
|
TF state, never the stale record. The record is repaired (flipped
|
|
267
281
|
to `live`) only when the Pages project exists and a successful
|
|
@@ -289,6 +303,92 @@ strictly after live verification. It never touches Cloudflare
|
|
|
289
303
|
resources, the app repo, or TF. After a repair, re-run `launchpad
|
|
290
304
|
status <slug>` — it then reports the live deployment truth.
|
|
291
305
|
|
|
306
|
+
## First deploy stuck at `provisioning_failed` / `bot_pr_ci_failed`
|
|
307
|
+
|
|
308
|
+
A brand-new slug whose FIRST deploy failed shows `launchpad status <slug>` as
|
|
309
|
+
`provisioning_failed` (lifecycle `failed`). There are two different cases; read
|
|
310
|
+
the stage and reason, then use the matching route. Time expectations: the CLI
|
|
311
|
+
waits about 480 s, and a first deploy to `live` took about 8 to 9 minutes in
|
|
312
|
+
three runs on 16-17 Nov 2026.
|
|
313
|
+
|
|
314
|
+
### (a) `bot_pr_ci_failed`: the bootstrap PR check failed
|
|
315
|
+
|
|
316
|
+
Example: `bot_pr_ci_failed: bootstrap PR #1 CI failed: failed checks: npm-audit`.
|
|
317
|
+
The bootstrap pull request runs CI on the platform's starter files, not on the
|
|
318
|
+
owner's app, so a failure here is a platform fault. Do not change your
|
|
319
|
+
lockfile, do not retry, do not use another slug; run `/launchpad-report`. (Run
|
|
320
|
+
`bun audit` on your own app as good practice only; it does not predict this
|
|
321
|
+
check.) The owner cannot retry, resume, abandon or recover this app, but CAN
|
|
322
|
+
free the slug with `launchpad destroy` (below). The starter's dependency
|
|
323
|
+
advisories and the audit script are fixed for new apps, so a new failure here
|
|
324
|
+
is unexpected: report it. `launchpad status` may still suggest running `bun
|
|
325
|
+
audit --prod`; that is not the owner's fix.
|
|
326
|
+
|
|
327
|
+
What the user can and cannot do in case (a):
|
|
328
|
+
|
|
329
|
+
- **Cannot re-run it.** `launchpad deploy` from the same folder stops with
|
|
330
|
+
"no trusted source baseline"; `pull --bootstrap` is for legacy clones only.
|
|
331
|
+
`launchpad deploy --allow-unguarded` meets a 503 `enforced_access_unavailable`.
|
|
332
|
+
Do not loop on any of these.
|
|
333
|
+
- **`launchpad deploy --resume <slug>`**: by design the bot refuses a resume
|
|
334
|
+
from `bot_pr_ci_failed` (409 `not_resumable`; only `tf_apply_failed` is
|
|
335
|
+
resumable). On 16 Nov 2026 `--resume` and `--abandon` both answered "app not
|
|
336
|
+
found (or you have no access)" for such an app. Neither frees the slug.
|
|
337
|
+
- **`launchpad recover <slug>`**: refuses (409 `not_live`). It repairs only an
|
|
338
|
+
app that is verifiably serving, and it checks a Pages project that a
|
|
339
|
+
dispatch app does not have.
|
|
340
|
+
- **`launchpad destroy <slug> --confirm-slug <slug> --yes`**: works. An owner
|
|
341
|
+
can destroy an app whose first deploy failed at `bot_pr_ci_failed`; it
|
|
342
|
+
releases the slug in seconds (proven on production on 17 Nov 2026 with two
|
|
343
|
+
apps). It archives the app repo and frees the slug; nothing needs deleting by
|
|
344
|
+
hand. Only the owner can run it. An older bot answered 409 `no_per_app_tf`;
|
|
345
|
+
if destroy is refused now, do not retry under another slug and run
|
|
346
|
+
`/launchpad-report` with the slug and the refusal text.
|
|
347
|
+
- **Operator route.** The runbook (`docs/runbooks/m-892-zero-touch-demo.md`)
|
|
348
|
+
lists one action for `bot_pr_ci_failed`: "push a fix to the bot PR's branch".
|
|
349
|
+
That needs write access to the app repo, which an app owner normally does not
|
|
350
|
+
have, so it is an operator action, not something to offer the user. It also
|
|
351
|
+
does not restart the stopped provisioning run. On 16 Nov 2026 a fix made
|
|
352
|
+
every check on the bootstrap PR pass, and the app stayed at
|
|
353
|
+
`bot_pr_ci_failed`. Free the slug with `launchpad destroy` instead.
|
|
354
|
+
- **Do not create a second slug** before the destroy, and do not try to clean
|
|
355
|
+
up by hand.
|
|
356
|
+
|
|
357
|
+
Say this to the user. Because a bootstrap check failure is a platform fault,
|
|
358
|
+
run `/launchpad-report` with the slug and the `failed` stage and reason text
|
|
359
|
+
from `launchpad status <slug>`, and ask for confirmation before filing, as that
|
|
360
|
+
skill requires. Offer the destroy so the owner can create the app again; if
|
|
361
|
+
the destroy is refused, report that too, and tell the user not to start a
|
|
362
|
+
second app meanwhile.
|
|
363
|
+
|
|
364
|
+
### (b) `provisioning_failed` at `deployment_verified`: first delivery build failed
|
|
365
|
+
|
|
366
|
+
Example: `dispatch delivery refused: build-failed`. The bootstrap PR merged, and
|
|
367
|
+
the first delivery build (workflow `launchpad-build`) failed on the owner's
|
|
368
|
+
files. The usual causes are a lockfile written by bun 1.4 or newer
|
|
369
|
+
(`Unknown lockfile version`), a missing `hono` or `@m-kopa/platform-auth`
|
|
370
|
+
dependency, or hidden files in the build output; see `/launchpad-deploy`
|
|
371
|
+
§A.2b. The route:
|
|
372
|
+
|
|
373
|
+
```bash
|
|
374
|
+
gh run view <id> -R M-KOPA/launchpad-app-<slug> --log-failed
|
|
375
|
+
```
|
|
376
|
+
|
|
377
|
+
Read the failed job to find the cause, then free the slug:
|
|
378
|
+
|
|
379
|
+
```bash
|
|
380
|
+
launchpad destroy <slug> --confirm-slug <slug> --yes
|
|
381
|
+
```
|
|
382
|
+
|
|
383
|
+
Destroy works in this state (observed twice on 16-17 Nov 2026) and takes about
|
|
384
|
+
2.5 minutes; if it ends `destroy_failed`, run it again. Fix the cause, then
|
|
385
|
+
create the app again with `/launchpad-deploy`.
|
|
386
|
+
|
|
387
|
+
`launchpad recover` does not apply to dispatch apps. From CLI 0.78.0 `launchpad
|
|
388
|
+
status` no longer suggests it for a failed dispatch app: it says to read the
|
|
389
|
+
failed build, fix the cause, run the destroy above and deploy again. An older
|
|
390
|
+
CLI may still print the `recover` line; ignore it.
|
|
391
|
+
|
|
292
392
|
## Legacy — M-892 stage taxonomy
|
|
293
393
|
|
|
294
394
|
The provisioning workflow (Model A first deploys and the legacy
|
|
@@ -329,8 +429,10 @@ and `launchpad status <slug> --json` (the most recent transition).
|
|
|
329
429
|
You no longer parse the bot's `/apps/<sub>/status` shape by hand
|
|
330
430
|
from the playbook — every status surface goes through the CLI.
|
|
331
431
|
|
|
332
|
-
If a legacy app is genuinely stuck mid-pipeline
|
|
333
|
-
|
|
432
|
+
If a legacy app is genuinely stuck mid-pipeline, the recovery paths
|
|
433
|
+
below apply to `tf_apply_failed` and the legacy zero-touch flow only. A first
|
|
434
|
+
deploy that stopped at `bot_pr_ci_failed` is not resumable: see "First deploy
|
|
435
|
+
stuck at `provisioning_failed`" above. The paths are:
|
|
334
436
|
|
|
335
437
|
- **Resume:** `launchpad deploy --resume <slug>` — re-fires the bot
|
|
336
438
|
endpoint and walks the stages again from where they failed.
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: launchpad-destroy
|
|
3
|
-
description: Tear down a Launchpad app end-to-end via `launchpad destroy` — Cloudflare Pages project, edge-auth wiring (gateway KV/audience entries, or the Access app for `auth: access` apps), custom hostname, platform-repo TF, and the app repo (archive-renamed). Owner-only verb with a two-step destructive confirmation. Use when someone says "destroy this app", "/launchpad-destroy", "tear down `<slug>`", "delete the app", or asks to clean up a smoke-test / orphan / retired app.
|
|
4
|
-
version: 0.
|
|
3
|
+
description: Tear down a Launchpad app end-to-end via `launchpad destroy` — Cloudflare resources (Pages project, or the dispatch Worker script), edge-auth wiring (gateway KV/audience entries, or the Access app for `auth: access` apps), custom hostname, platform-repo TF, and the app repo (archive-renamed). Owner-only verb with a two-step destructive confirmation. Use when someone says "destroy this app", "/launchpad-destroy", "tear down `<slug>`", "delete the app", or asks to clean up a smoke-test / orphan / retired app.
|
|
4
|
+
version: 0.78.0
|
|
5
5
|
---
|
|
6
6
|
|
|
7
7
|
<!-- BEGIN shell-contract (managed by scripts/sync-skill-contract.sh — edit skills/_partials/shell-contract.md) -->
|
|
@@ -31,7 +31,9 @@ esac
|
|
|
31
31
|
# /launchpad-destroy
|
|
32
32
|
|
|
33
33
|
Destructive, owner-only verb. Tears down a Launchpad app end-to-end:
|
|
34
|
-
the Cloudflare Pages project
|
|
34
|
+
the app's Cloudflare resources (the Pages project on a Pages app; the Worker
|
|
35
|
+
script in the dispatch namespace on a dispatch app, which has no Pages project),
|
|
36
|
+
the app's edge-auth wiring (gateway
|
|
35
37
|
KV/audience entries for gateway-fronted apps — the default; the
|
|
36
38
|
Access app for `auth: access` apps), custom hostname,
|
|
37
39
|
launchpad-platform TF, and the app repo (archive-renamed, not
|
|
@@ -123,7 +125,11 @@ Every destroy starts with the same shared steps:
|
|
|
123
125
|
There is **no destroy PR and no `destroy:confirmed` label** on this
|
|
124
126
|
path. Workspace apps live in isolated TF state, so there is no
|
|
125
127
|
shared apply to pick up a file deletion — teardown is an explicit
|
|
126
|
-
`terraform destroy
|
|
128
|
+
`terraform destroy`. The CLI's last lines say so: the platform's destroy
|
|
129
|
+
workflow is removing the resources now, with no PR to merge. (An app that never
|
|
130
|
+
got Cloudflare resources, such as a first deploy stopped at `bot_pr_ci_failed`,
|
|
131
|
+
is torn down before any Terraform and the CLI prints `Done:` and that the slug
|
|
132
|
+
is free.)
|
|
127
133
|
|
|
128
134
|
1. The bot fires an **HMAC-signed `repository_dispatch`**
|
|
129
135
|
(`tf-destroy-per-app`): it signs `<slug>|<exp>` with a secret
|
|
@@ -146,6 +152,11 @@ shared apply to pick up a file deletion — teardown is an explicit
|
|
|
146
152
|
`destroy_failed`, repo untouched; re-running `launchpad destroy`
|
|
147
153
|
re-dispatches the teardown.
|
|
148
154
|
|
|
155
|
+
A destroy takes about 2.5 minutes. If it ends `destroy_failed`, run `launchpad destroy <slug>
|
|
156
|
+
--confirm-slug <slug> --yes` again; the teardown resumes from the failed
|
|
157
|
+
step. Verified on 16 Nov 2026: a destroy ended `destroy_failed` although the
|
|
158
|
+
Terraform destroy had passed, and a second destroy completed in about 80 s.
|
|
159
|
+
|
|
149
160
|
### Legacy file-pair path (shared-root apps only)
|
|
150
161
|
|
|
151
162
|
Still shipped, for apps whose TF is the shared-root `<slug>.tf` +
|
|
@@ -178,10 +189,10 @@ Use the platform runbook `docs/runbooks/d1-destroy-export-restore.md` to recover
|
|
|
178
189
|
|---|---|---|
|
|
179
190
|
| `live` (or absent) | App is operational. | Destroy works. |
|
|
180
191
|
| `provisioning` | Initial create still running. | Wait, then destroy. |
|
|
181
|
-
| `failed` | Provisioning failed. | Destroy works (cleans up partial state)
|
|
192
|
+
| `failed` | Provisioning failed. | Destroy works (cleans up partial state), including a first deploy that failed at `bot_pr_ci_failed`. If a Pages app is actually live and serving, consider `launchpad recover <slug>` first — it repairs the record instead of tearing down. |
|
|
182
193
|
| `destroying` | Teardown in flight (workspace: destroy run dispatched; legacy: destroy PR open, tf-apply pending). | Re-running `launchpad destroy` is idempotent — workspace: re-dispatches the run; legacy: returns the existing PR. |
|
|
183
194
|
| `destroyed` | Teardown succeeded + repo archive-renamed. | Re-running exits 0 with `already destroyed at <ts>`. The slug remains retired until platform recovery proves live infrastructure. |
|
|
184
|
-
| `destroy_failed` | The teardown failed or hung. | **Workspace path:** re-run `launchpad destroy` — it re-dispatches from the failure point. **Legacy path:** re-run is rejected with `platform-team intervention required` (409). On both, the app repo is **not** archive-renamed (recovery path stays clean). |
|
|
195
|
+
| `destroy_failed` | The teardown failed or hung. | **Workspace path:** re-run `launchpad destroy` — it re-dispatches from the failure point. From CLI 0.78.0, `launchpad status <slug>` shows which teardown step failed, the reason the platform recorded and a next step (`--json`: `failedReason`, `destroyFailure`); an older CLI prints only "destroy FAILED". **Legacy path:** re-run is rejected with `platform-team intervention required` (409). On both, the app repo is **not** archive-renamed (recovery path stays clean). |
|
|
185
196
|
|
|
186
197
|
## Carve-outs
|
|
187
198
|
|
|
@@ -277,6 +288,26 @@ destroy. Either:
|
|
|
277
288
|
- Get break-glass access from platform-team for this specific
|
|
278
289
|
destroy (audited; one-shot).
|
|
279
290
|
|
|
291
|
+
### A first deploy that failed (`provisioning_failed`)
|
|
292
|
+
|
|
293
|
+
Two cases, both described in `/launchpad-deploy-status` § "First deploy stuck
|
|
294
|
+
at `provisioning_failed`":
|
|
295
|
+
|
|
296
|
+
- **`bot_pr_ci_failed`** (the bootstrap PR check failed, for example
|
|
297
|
+
`npm-audit`): a platform fault, not the owner's lockfile. The owner CAN
|
|
298
|
+
destroy it: `launchpad destroy <slug> --confirm-slug <slug> --yes` releases
|
|
299
|
+
the slug in seconds (proven on production on 17 Nov 2026 with two apps).
|
|
300
|
+
It archives the app repo; the open bootstrap PR stays on the archived repo.
|
|
301
|
+
`launchpad recover` refuses this app (`not_live`); do not use it. Do not
|
|
302
|
+
create a second slug before the destroy, do not change the lockfile and do
|
|
303
|
+
not delete anything by hand. If the destroy is refused (an older bot answers
|
|
304
|
+
409 `no_per_app_tf`), run `/launchpad-report` with the slug and the text.
|
|
305
|
+
- **`deployment_verified`** with `dispatch delivery refused: build-failed`
|
|
306
|
+
(the bootstrap PR merged, the first delivery build failed):
|
|
307
|
+
`launchpad destroy <slug> --confirm-slug <slug> --yes` works (observed twice
|
|
308
|
+
on 16-17 Nov 2026) and takes about 2.5 minutes. If it ends `destroy_failed`,
|
|
309
|
+
run it again. Fix the cause first (see `/launchpad-deploy-status`).
|
|
310
|
+
|
|
280
311
|
### `<slug> is pre-M-1182 main.tf-resident`
|
|
281
312
|
|
|
282
313
|
See "Carve-outs". Platform-team manual cleanup is required.
|
|
@@ -288,7 +319,9 @@ main — neither an `apps/<slug>/` workspace nor a `<slug>.tf` +
|
|
|
288
319
|
`<slug>.allow.tf` file pair (the bot probes both before this 409).
|
|
289
320
|
This usually means: (a) the app was never fully provisioned (look
|
|
290
321
|
at `lifecycle` — likely `failed`), or (b) the TF was hand-removed
|
|
291
|
-
outside of this verb. Either way: platform-team intervention.
|
|
322
|
+
outside of this verb. Either way: platform-team intervention. (A first deploy
|
|
323
|
+
stopped at `bot_pr_ci_failed` no longer lands here: its destroy runs the
|
|
324
|
+
pre-Terraform teardown. An older bot still answers this 409.)
|
|
292
325
|
|
|
293
326
|
### `slug ${urlSlug} is already being destroyed`
|
|
294
327
|
|
|
@@ -380,7 +413,7 @@ On an idempotent re-run against a `destroyed` slug:
|
|
|
380
413
|
- **`/launchpad-deploy-status`** — diagnose `provisioning` /
|
|
381
414
|
`failed` lifecycle stages. Less relevant after destroy lands.
|
|
382
415
|
If the app shows `failed` but is actually live and serving, reach
|
|
383
|
-
for `launchpad recover <slug>` (documented there) before assuming
|
|
416
|
+
for `launchpad recover <slug>` (documented there; Pages apps only) before assuming
|
|
384
417
|
destroy + re-create is the fix — recover repairs the registry
|
|
385
418
|
record against live state. (Recover refuses destroy-side states —
|
|
386
419
|
`destroying` / `destroyed` / `destroy_failed` are owned by this
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: launchpad-identity
|
|
3
3
|
description: Teach an app author how to use the signed-in user's identity inside a Launchpad app - read the gateway-forwarded X-Launchpad-User-Assertion in the app's server code (functions/ on a react+api app, compiled into its Worker on dispatch, or a Pages Function on a legacy Pages app), VERIFY it with @m-kopa/platform-auth (fail-closed), and show who's logged in (sub/email/name). Use when someone says "who is logged in", "show the current user", "get the user's email in my app", "auth in my launchpad app", "read the user identity", "/launchpad-identity", or is wiring up an /api/me for a gateway-fronted app.
|
|
4
|
-
version: 0.
|
|
4
|
+
version: 0.78.0
|
|
5
5
|
---
|
|
6
6
|
|
|
7
7
|
<!-- BEGIN shell-contract (managed by scripts/sync-skill-contract.sh — edit skills/_partials/shell-contract.md) -->
|
|
@@ -121,6 +121,23 @@ the source of truth. If they ever disagree, the contract doc wins.
|
|
|
121
121
|
one audience across apps, a token minted for app A is **replayable** against
|
|
122
122
|
app B (cross-app token replay). Audience-pinning is what stops that.
|
|
123
123
|
|
|
124
|
+
## Which example is for which app shape
|
|
125
|
+
|
|
126
|
+
- **`react+api` app built from the platform starter (the normal dispatch
|
|
127
|
+
case).** The seeded `functions/api/[[path]].ts` is a Hono router that already
|
|
128
|
+
has an auth middleware (`createPlatformAuthMiddleware` from
|
|
129
|
+
`@m-kopa/platform-auth/hono`) and an `/api/me`-style route. Edit that route:
|
|
130
|
+
do not add a second `functions/api/me.js`, which would be a competing route.
|
|
131
|
+
The starter route returns `preferredUsername`, `sub` and `groups`; change it
|
|
132
|
+
to return only what the app needs (`sub`, email, name), and do not return
|
|
133
|
+
`groups` unless the app needs them. An unauthenticated request never gets an
|
|
134
|
+
anonymous 200 body: the middleware answers 401 (or the gateway answers a 302
|
|
135
|
+
to the sign-in page first). Observed on 17 Nov 2026 with an unauthenticated
|
|
136
|
+
client; not checked with a signed-in user. See `/launchpad-deploy` §A.2b.
|
|
137
|
+
- **Legacy Pages app (or any app whose own `functions/` file is a Pages
|
|
138
|
+
handler).** Use the `functions/api/me.js` example below, which returns an
|
|
139
|
+
anonymous shape when the token is missing and verifies it itself.
|
|
140
|
+
|
|
124
141
|
## The canonical handler - `functions/api/me.js`
|
|
125
142
|
|
|
126
143
|
Lifted from the **deployed-and-verified** peoplemgr app
|
|
@@ -215,6 +232,12 @@ What the verified `user` carries (from the contract doc):
|
|
|
215
232
|
> gateway's **login-time snapshot**; never make an access decision from these
|
|
216
233
|
> values. Enforce authorization at the gateway (allowed groups) and
|
|
217
234
|
> server-side, not from `/api/me`.
|
|
235
|
+
>
|
|
236
|
+
> The one exception is `requireRole` in the `launchpad init --secure-template`
|
|
237
|
+
> scaffold. It reads `groups` from the **verified** assertion for coarse roles
|
|
238
|
+
> (writer, admin) and accepts the snapshot lag: removing someone from a role
|
|
239
|
+
> group takes effect at their next gateway sign-in. When revocation must be
|
|
240
|
+
> immediate, look the role up server-side instead.
|
|
218
241
|
|
|
219
242
|
## Reading it from the client
|
|
220
243
|
|
|
@@ -414,6 +437,13 @@ An unverified payload can be forged by anyone who can reach your origin
|
|
|
414
437
|
`launchpad redeploy` if you added them after the last one.
|
|
415
438
|
- [ ] `aud` is your **bare host** (`<slug>.launchpad.m-kopa.us`), no scheme/port.
|
|
416
439
|
- [ ] No authorization decision is made from `/api/me` — attribution only.
|
|
440
|
+
- [ ] Every route that changes data checks the caller's role server-side
|
|
441
|
+
(a new `react+api` app can start from `launchpad init --secure-template`).
|
|
442
|
+
- [ ] If the app keeps its own session (a cookie it mints), the session lasts
|
|
443
|
+
**1 hour or less**, or the assertion is re-verified on every request.
|
|
444
|
+
- [ ] `launchpad validate --app-lints` reports no `route-without-auth` or
|
|
445
|
+
`assertion-*` findings (report only today; the platform plans to run the
|
|
446
|
+
same rules at deploy).
|
|
417
447
|
|
|
418
448
|
## Don'ts
|
|
419
449
|
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: launchpad-ingest
|
|
3
3
|
description: Scaffold a verified ingest endpoint so an approved backend (an approved integration, ADR 0060) can write into a Launchpad react+api app - declare the integration in launchpad.yaml, add a Hono route registered ahead of the user-auth middleware that verifies the gateway's X-Launchpad-Integration-Assertion with @m-kopa/platform-auth, validates the body with zod, and does an idempotent D1 insert keyed on a caller-supplied idempotency key. Use when someone says "let another system push data into my app", "add an ingest endpoint", "receive data from the Sales backend", "approved integration", "machine-to-machine write", "/launchpad-ingest", or asks what a calling team must send.
|
|
4
|
-
version: 0.
|
|
4
|
+
version: 0.78.0
|
|
5
5
|
---
|
|
6
6
|
|
|
7
7
|
<!-- BEGIN shell-contract (managed by scripts/sync-skill-contract.sh — edit skills/_partials/shell-contract.md) -->
|
|
@@ -54,11 +54,16 @@ Add it to `launchpad.yaml`.
|
|
|
54
54
|
The path is an **exact match**: no prefixes, query strings, `%` escapes or trailing `/`.
|
|
55
55
|
Methods are a subset of `POST`, `PUT`, `PATCH`, `DELETE`.
|
|
56
56
|
|
|
57
|
+
A v2 manifest (what `launchpad init` writes) takes it **under `spec:`**; a
|
|
58
|
+
top-level `integrations:` key fails `launchpad validate` with
|
|
59
|
+
`Unrecognized key`. Only a v1alpha1 manifest puts it at the top level.
|
|
60
|
+
|
|
57
61
|
```yaml
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
+
spec:
|
|
63
|
+
integrations:
|
|
64
|
+
- name: sales-backend
|
|
65
|
+
path: /api/ingest/stock-count
|
|
66
|
+
methods: [POST]
|
|
62
67
|
```
|
|
63
68
|
|
|
64
69
|
## Step 2 - create the table
|
|
@@ -269,7 +274,7 @@ Hand the calling team this contract:
|
|
|
269
274
|
|
|
270
275
|
## Checklist before you ship
|
|
271
276
|
|
|
272
|
-
- [ ] `integrations:` declared in `launchpad.yaml` with the exact path the handler serves.
|
|
277
|
+
- [ ] `integrations:` declared in `launchpad.yaml` (under `spec:` on a v2 manifest) with the exact path the handler serves.
|
|
273
278
|
- [ ] Ingest route registered **before** the user-auth middleware.
|
|
274
279
|
- [ ] `verifyIntegrationAssertion` gets the host from `GATEWAY_AUD` (never the request URL), the request method, and `new URL(c.req.url).pathname`.
|
|
275
280
|
- [ ] The returned name is checked against your integration.
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: launchpad-integration-contract
|
|
3
3
|
description: Design the payload contract for an approved integration (ADR 0060) before anyone writes code - which fields the calling backend sends, which the app sets itself, the idempotency key, how the data lands next to what users already enter, business rules like submission windows, versioning, the allow-list request to the platform team, and the handoff note for the calling team. Use when someone says "design the webhook payload", "what should the other team send us", "agree the contract", "set up the integration with <team>", "what does the platform need to approve this", "allow-list", "/launchpad-integration-contract", or before running /launchpad-ingest on an app that already has its own data.
|
|
4
|
-
version: 0.
|
|
4
|
+
version: 0.78.0
|
|
5
5
|
---
|
|
6
6
|
|
|
7
7
|
<!-- BEGIN shell-contract (managed by scripts/sync-skill-contract.sh — edit skills/_partials/shell-contract.md) -->
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: launchpad-onboard
|
|
3
3
|
description: One-time setup for the Launchpad CLI + Claude Code skill bundle. Verifies the `launchpad` CLI is installed and current, runs `launchpad whoami` to confirm the session is fresh, and checks the bundled skills are installed and in lock-step with the CLI. Idempotent — safe to re-run any time. Use when someone says "set me up for Launchpad", "I just got a new machine and want to use Launchpad", "/launchpad-onboard", or any of the other launchpad-* skills fails on a prereq check.
|
|
4
|
-
version: 0.
|
|
4
|
+
version: 0.78.0
|
|
5
5
|
---
|
|
6
6
|
|
|
7
7
|
<!-- BEGIN shell-contract (managed by scripts/sync-skill-contract.sh — edit skills/_partials/shell-contract.md) -->
|
|
@@ -225,3 +225,23 @@ An older manifest with no origin set, for an unregistered static, React or React
|
|
|
225
225
|
A new app with no origin set and KV, R2 or other unsupported wrangler bindings stops before deploying with the reason printed.
|
|
226
226
|
An explicit `--origin pages` is available when required.
|
|
227
227
|
Dispatch apps declare secrets as `secret_text` env vars and set them with `launchpad secrets push` once the first deploy has been delivered.
|
|
228
|
+
|
|
229
|
+
## What changed in November 2026
|
|
230
|
+
|
|
231
|
+
- **Key-shaped literals now block a deploy.** `launchpad deploy` is refused
|
|
232
|
+
(HTTP 400 `secret_scan_violation`) when a file holds a literal that looks like
|
|
233
|
+
a key. The error names the file path and the rule, never the value. Seven
|
|
234
|
+
shape rules were added: `azure-client-secret`, `azure-storage-key`,
|
|
235
|
+
`anthropic-api-key`, `openai-api-key`, `stripe-live-key`, `google-api-key`
|
|
236
|
+
and `private-key-block` (they sit beside the older AWS, GitHub, Slack and SSH
|
|
237
|
+
/ RSA / EC / PGP key rules). Fix: remove the literal from the file (if it was
|
|
238
|
+
real, rotate it), declare the name under `spec.env_vars` as `secret_text`, and
|
|
239
|
+
set the value with `launchpad secrets push`. Then run `launchpad deploy`
|
|
240
|
+
again; "Nothing to deploy - already live" just means the bundle matches what
|
|
241
|
+
is already live.
|
|
242
|
+
- **Personal data is not yet checked.** The platform does not yet block, warn
|
|
243
|
+
about or list files that hold personal data (for example a CSV with name,
|
|
244
|
+
email and phone columns): the detector is merged but switched off, so such a
|
|
245
|
+
file deploys without any message and stays in the app repo's history. The
|
|
246
|
+
owner must not deploy such files. Do not read the lack of a warning as
|
|
247
|
+
approval; ask before bundling any data file.
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: launchpad-report
|
|
3
3
|
description: File a bug report or feature request to the Launchpad team's tracker from the CLI. Use when someone reports something broken, hits an error in a launchpad command, or wishes a feature existed — e.g. "this is broken", "report a bug", "can you file that", "I wish launchpad could…", "/launchpad-bug", "/launchpad-feature". Always confirm and show exactly what you'll send before filing; never file silently.
|
|
4
|
-
version: 0.
|
|
4
|
+
version: 0.78.0
|
|
5
5
|
---
|
|
6
6
|
|
|
7
7
|
<!-- BEGIN shell-contract (managed by scripts/sync-skill-contract.sh — edit skills/_partials/shell-contract.md) -->
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: launchpad-status
|
|
3
3
|
description: Safely refresh a Launchpad clone, show manifest drift, or read the deployed manifest. Wraps bare `launchpad pull` for source sync, `launchpad pull --manifest` for deployed YAML, and `launchpad status` for drift. Use for "sync my clone", "what's deployed", "show drift", "/launchpad-status", "/launchpad-pull", or post-deploy verification.
|
|
4
|
-
version: 0.
|
|
4
|
+
version: 0.78.0
|
|
5
5
|
---
|
|
6
6
|
|
|
7
7
|
<!-- BEGIN shell-contract (managed by scripts/sync-skill-contract.sh — edit skills/_partials/shell-contract.md) -->
|
|
@@ -163,8 +163,9 @@ The lifecycle states (rendered without needing a local manifest):
|
|
|
163
163
|
- **`provisioning_failed`** — the workflow failed; status names the
|
|
164
164
|
failing stage + reason. Fix the cause and re-run
|
|
165
165
|
`launchpad deploy` — or, if the app is actually serving despite
|
|
166
|
-
the failed record, `launchpad recover <slug>` reconciles the
|
|
167
|
-
record against live Cloudflare state
|
|
166
|
+
the failed record on a Pages app, `launchpad recover <slug>` reconciles the
|
|
167
|
+
record against live Cloudflare state (a failed dispatch app: see
|
|
168
|
+
`/launchpad-deploy-status`; recover refuses it).
|
|
168
169
|
- **`destroying` / `destroyed` / `destroy_failed`** — teardown
|
|
169
170
|
phases; route to `/launchpad-destroy`.
|
|
170
171
|
|
|
@@ -336,8 +337,8 @@ launchpad apps # confirm lifecycle is `live`
|
|
|
336
337
|
/launchpad-deploy-status # diagnose the M-892 stage trace
|
|
337
338
|
```
|
|
338
339
|
|
|
339
|
-
If the record says `failed` but the app is actually serving
|
|
340
|
-
`launchpad recover <slug>` reconciles the record against live
|
|
340
|
+
If the record says `failed` but the app is actually serving (a Pages app;
|
|
341
|
+
recover refuses a dispatch app), `launchpad recover <slug>` reconciles the record against live
|
|
341
342
|
Cloudflare state (it verifies; it never fabricates a live state).
|
|
342
343
|
|
|
343
344
|
### "drift: hostnames[0]"
|
|
@@ -384,6 +385,13 @@ CI.
|
|
|
384
385
|
- **Don't** rely on exit-1 firing without `--strict`. The default
|
|
385
386
|
behaviour is report-only.
|
|
386
387
|
|
|
388
|
+
## November 2026 change
|
|
389
|
+
|
|
390
|
+
Deploys are refused when a file holds a key-shaped literal, and files with
|
|
391
|
+
personal data are not yet checked by the platform: see `/launchpad-onboard`
|
|
392
|
+
§ "What changed in November 2026". For a second deploy that stops with "no
|
|
393
|
+
trusted source baseline", see `/launchpad-content-pr`.
|
|
394
|
+
|
|
387
395
|
## Version
|
|
388
396
|
|
|
389
397
|
This skill ships in launchpad-cli v0.56.0+.
|