@m-kopa/launchpad-cli 0.78.0 → 0.79.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 +6 -0
- package/dist/cli.js +2 -1
- package/dist/commands/skills.d.ts +1 -1
- package/dist/commands/skills.d.ts.map +1 -1
- package/dist/version.d.ts +1 -1
- package/package.json +1 -1
- package/skills/README.md +1 -0
- package/skills/launchpad-content-pr/SKILL.md +1 -1
- package/skills/launchpad-deploy/SKILL.md +62 -6
- package/skills/launchpad-deploy-status/SKILL.md +1 -1
- package/skills/launchpad-destroy/SKILL.md +1 -1
- package/skills/launchpad-fix-findings/SKILL.md +218 -0
- package/skills/launchpad-identity/SKILL.md +82 -2
- package/skills/launchpad-ingest/SKILL.md +1 -1
- package/skills/launchpad-integration-contract/SKILL.md +1 -1
- package/skills/launchpad-onboard/SKILL.md +2 -2
- package/skills/launchpad-report/SKILL.md +1 -1
- package/skills/launchpad-status/SKILL.md +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -6,6 +6,12 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/).
|
|
|
6
6
|
This project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html);
|
|
7
7
|
pre-1.0 minor bumps may carry breaking changes per ADR 0005.
|
|
8
8
|
|
|
9
|
+
## 0.79.0 - 2026-11-17
|
|
10
|
+
|
|
11
|
+
### Added
|
|
12
|
+
|
|
13
|
+
- The Claude Code skills carry the "build it safe" guidance. `launchpad-deploy` now has a "Build it safe" section (rules to follow before an app handles real data) and a data-file check before the first deploy. `launchpad-identity` adds patterns for using the signed-in user's identity safely. A new skill, `launchpad-fix-findings`, walks an app author through fixing security and quality findings. `launchpad skills` installs and updates it with the others (one line added to the bundled skills list). No other CLI behaviour changes.
|
|
14
|
+
|
|
9
15
|
## 0.78.0 - 2026-11-17
|
|
10
16
|
|
|
11
17
|
### Fixed
|
package/dist/cli.js
CHANGED
|
@@ -19,7 +19,7 @@ var __toESM = (mod, isNodeMode, target) => {
|
|
|
19
19
|
var __require = /* @__PURE__ */ createRequire(import.meta.url);
|
|
20
20
|
|
|
21
21
|
// src/version.ts
|
|
22
|
-
var CLI_VERSION = "0.
|
|
22
|
+
var CLI_VERSION = "0.79.0";
|
|
23
23
|
|
|
24
24
|
// src/config.ts
|
|
25
25
|
import { readFileSync } from "node:fs";
|
|
@@ -19367,6 +19367,7 @@ var BUNDLED_SKILLS = [
|
|
|
19367
19367
|
"launchpad-identity",
|
|
19368
19368
|
"launchpad-ingest",
|
|
19369
19369
|
"launchpad-integration-contract",
|
|
19370
|
+
"launchpad-fix-findings",
|
|
19370
19371
|
"launchpad-report",
|
|
19371
19372
|
"marquee-share"
|
|
19372
19373
|
];
|
|
@@ -5,7 +5,7 @@ import type { Command } from "../dispatcher.js";
|
|
|
5
5
|
* "bundled list matches the skills dir" test in `tests/skills-command.test.ts`
|
|
6
6
|
* enforces this so a newly-added skill dir can't silently go un-installed.
|
|
7
7
|
*/
|
|
8
|
-
export declare const BUNDLED_SKILLS: readonly ["launchpad-onboard", "launchpad-deploy", "launchpad-deploy-status", "launchpad-content-pr", "launchpad-status", "launchpad-destroy", "launchpad-identity", "launchpad-ingest", "launchpad-integration-contract", "launchpad-report", "marquee-share"];
|
|
8
|
+
export declare const BUNDLED_SKILLS: readonly ["launchpad-onboard", "launchpad-deploy", "launchpad-deploy-status", "launchpad-content-pr", "launchpad-status", "launchpad-destroy", "launchpad-identity", "launchpad-ingest", "launchpad-integration-contract", "launchpad-fix-findings", "launchpad-report", "marquee-share"];
|
|
9
9
|
export declare const skillsCommand: Command;
|
|
10
10
|
interface InstallEnv {
|
|
11
11
|
readonly bundleDir: string;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"skills.d.ts","sourceRoot":"","sources":["../../src/commands/skills.ts"],"names":[],"mappings":"AAiCA,OAAO,KAAK,EAAS,OAAO,EAAY,MAAM,kBAAkB,CAAC;AASjE;;;;;GAKG;AACH,eAAO,MAAM,cAAc,
|
|
1
|
+
{"version":3,"file":"skills.d.ts","sourceRoot":"","sources":["../../src/commands/skills.ts"],"names":[],"mappings":"AAiCA,OAAO,KAAK,EAAS,OAAO,EAAY,MAAM,kBAAkB,CAAC;AASjE;;;;;GAKG;AACH,eAAO,MAAM,cAAc,2RAiBjB,CAAC;AAcX,eAAO,MAAM,aAAa,EAAE,OAK3B,CAAC;AA2CF,UAAU,UAAU;IAClB,QAAQ,CAAC,SAAS,EAAE,MAAM,CAAC;IAC3B,QAAQ,CAAC,aAAa,EAAE,MAAM,CAAC;CAChC;AAED;;;GAGG;AACH,wBAAgB,iBAAiB,IAAI,UAAU,CAQ9C"}
|
package/dist/version.d.ts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export declare const CLI_VERSION = "0.
|
|
1
|
+
export declare const CLI_VERSION = "0.79.0";
|
|
2
2
|
//# sourceMappingURL=version.d.ts.map
|
package/package.json
CHANGED
package/skills/README.md
CHANGED
|
@@ -18,6 +18,7 @@ skills/
|
|
|
18
18
|
├── launchpad-identity/SKILL.md # dev / how-to-build skill (see below)
|
|
19
19
|
├── launchpad-ingest/SKILL.md # dev skill: verified ingest for approved integrations
|
|
20
20
|
├── launchpad-integration-contract/SKILL.md # design skill: agree an integration payload + allow-list request
|
|
21
|
+
├── launchpad-fix-findings/SKILL.md # operator skill: fix security findings AIOps sent for an app
|
|
21
22
|
└── marquee-share/ # vendored from M-KOPA/marquee, do
|
|
22
23
|
# not hand-edit — managed by
|
|
23
24
|
# scripts/sync-marquee-share-skill.sh
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: launchpad-content-pr
|
|
3
3
|
description: Push a content change to a Launchpad app via `launchpad deploy` and verify it shipped via `launchpad status`. Covers the post-first-deploy iteration loop (edit → deploy → verify) - subsequent deploys commit directly to the app repo's main, then the dispatch delivery (or, for a legacy Pages app, the Pages build) runs asynchronously, so verification is its own step. Use when someone says "push a content change", "ship an update", "/launchpad-content-pr", "verify my deploy", or after `/launchpad-deploy` reports `done` and they want to follow up with an edit.
|
|
4
|
-
version: 0.
|
|
4
|
+
version: 0.79.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-deploy
|
|
3
3
|
description: Walk a Launchpad user through deploying an app from their local working directory (Model A — `launchpad init` + `launchpad deploy`). Wraps the CLI verbs end-to-end: detects the app shape, scaffolds `launchpad.yaml`, resolves the allowed Entra group via `launchpad groups`, bundles the CWD via `launchpad deploy`, and watches the rollout via `launchpad status`. Use when someone says "deploy a new app", "ship my app to Launchpad", "/launchpad-deploy", "I have an app locally — get it on Launchpad", or any variant. Resume/abandon for legacy in-flight provisioning is at the bottom.
|
|
4
|
-
version: 0.
|
|
4
|
+
version: 0.79.0
|
|
5
5
|
---
|
|
6
6
|
|
|
7
7
|
<!-- BEGIN shell-contract (managed by scripts/sync-skill-contract.sh — edit skills/_partials/shell-contract.md) -->
|
|
@@ -80,6 +80,18 @@ Never type the acceptance phrase, never pipe input into `accept`, and never clai
|
|
|
80
80
|
An AI agent may not accept the agreement for a person.
|
|
81
81
|
`launchpad destroy` is never blocked by the agreement.
|
|
82
82
|
|
|
83
|
+
## Build it safe
|
|
84
|
+
|
|
85
|
+
Follow these five rules while you write or change the app, and tell the user when their app breaks one:
|
|
86
|
+
|
|
87
|
+
1. **No file with people's details in what the app publishes.** No CSV, Excel, JSON, database or SQL dump with names, phone numbers, emails, IDs or similar in `public/`, `static/`, `dist/` or anything else the app serves. Keep the data in a store (for example D1) and return it from a route that checks the signed-in user.
|
|
88
|
+
2. **Every route that returns or changes data checks the signed-in user on the server.** Verify the identity the platform sends (see `/launchpad-identity`). A check in the page or the browser is not enough: anyone can call the route directly.
|
|
89
|
+
3. **Writes and deletes need a role or group check** on the server, not only a signed-in user. `/launchpad-identity` § "Only this group may write" shows how.
|
|
90
|
+
4. **No password or key in code**, config or a committed `.env`. Declare the name in `launchpad.yaml` and set the value with `launchpad secrets push` (§A.4).
|
|
91
|
+
5. **A route that calls an AI or another service with the app's key** fixes the model, the request size and the destination in server code, and needs a signed-in user. Never forward whatever the browser sends.
|
|
92
|
+
|
|
93
|
+
**What the platform checks, and what it does not.** The gateway checks sign-in and the app's audience before a request reaches the app. At deploy the bot scans the bundle for secrets (§A.5). The platform does **not** check that your routes verify the user, that writes have a role check, or that you publish no data file with people's details. Those are the app author's job; `launchpad validate --app-lints` and the data-file check in §A.4 help, but they do not prove the app safe.
|
|
94
|
+
|
|
83
95
|
## Constants (single source of truth)
|
|
84
96
|
|
|
85
97
|
These values are referenced by `/launchpad-deploy-status`,
|
|
@@ -213,6 +225,7 @@ This is interactive by default. It will ask for:
|
|
|
213
225
|
server-side; you don't need to pre-check.
|
|
214
226
|
- **team** — for the registry.
|
|
215
227
|
- **owner email** — must be a valid email address.
|
|
228
|
+
- **second owner** — not an `init` prompt, but ask now: "Who should be the second owner of this app, so it is not left without an owner when you are away?" Note the email. After the first deploy is live, add them with `launchpad add-owner <slug> <email>` (§A.6).
|
|
216
229
|
- **deployment type** — `static`, `react`, `react+api`, or
|
|
217
230
|
`container`. The detector pre-selects the right one for Vite/React
|
|
218
231
|
layouts; the user overrides if needed.
|
|
@@ -324,7 +337,8 @@ build fails with `Could not resolve "hono/cloudflare-pages"` and the app ends
|
|
|
324
337
|
Every command must exit 0. The functions compile catches a missing `hono` or
|
|
325
338
|
`@m-kopa/platform-auth`; `launchpad validate` and `launchpad deploy
|
|
326
339
|
--dry-run` do not.
|
|
327
|
-
4. **`launchpad validate
|
|
340
|
+
4. **`launchpad validate --app-lints` and the data-file check (§A.4), then ONE
|
|
341
|
+
`launchpad deploy`.** The first deploy
|
|
328
342
|
ships the content; do not deploy again to check.
|
|
329
343
|
|
|
330
344
|
**When `init` writes no starter.** `init` writes nothing beyond the manifest
|
|
@@ -433,15 +447,45 @@ Use `launchpad groups whoami` to remind the user which groups
|
|
|
433
447
|
**they** are currently a member of — handy when an app is gated and
|
|
434
448
|
they want to confirm they'll still be able to reach it.
|
|
435
449
|
|
|
436
|
-
### A.4
|
|
450
|
+
### A.4 Validate before shipping
|
|
437
451
|
|
|
438
452
|
```bash
|
|
439
|
-
launchpad validate
|
|
453
|
+
launchpad validate --app-lints
|
|
440
454
|
```
|
|
441
455
|
|
|
442
456
|
Parses `launchpad.yaml` and reports problems (it accepts both the v1alpha1
|
|
443
|
-
and the v2 manifest). Doesn't talk to the bot by default.
|
|
444
|
-
|
|
457
|
+
and the v2 manifest). Doesn't talk to the bot by default. Run it before every
|
|
458
|
+
deploy.
|
|
459
|
+
|
|
460
|
+
`--app-lints` also reads the app's server code (folders such as `functions/`,
|
|
461
|
+
`server/`, `api/`, `backend/`, `worker/`) and reports:
|
|
462
|
+
|
|
463
|
+
- `route-without-auth`: a file with write routes (POST, PUT, PATCH, DELETE)
|
|
464
|
+
where no identity check is in reach;
|
|
465
|
+
- `assertion-decoded-without-verify`, `assertion-read-without-platform-auth`,
|
|
466
|
+
`assertion-verified-without-platform-auth`: the identity header is read
|
|
467
|
+
without `@m-kopa/platform-auth` verifying it;
|
|
468
|
+
- `app-session-over-1h`: the app keeps its own session for more than an hour.
|
|
469
|
+
|
|
470
|
+
It is report only: findings never change the exit code, and deploy does not
|
|
471
|
+
run these lints today. It does not look at read routes, it cannot tell a role
|
|
472
|
+
check from a plain sign-in check, and it does not see data files. Show the user
|
|
473
|
+
every finding and fix it (see §"Build it safe" and `/launchpad-identity`)
|
|
474
|
+
before you deploy.
|
|
475
|
+
|
|
476
|
+
**Data-file check.** Before every deploy, list the data files the app could
|
|
477
|
+
publish:
|
|
478
|
+
|
|
479
|
+
```bash
|
|
480
|
+
find . \( -path ./node_modules -o -path ./.git \) -prune -o -type f \( -iname '*.csv' -o -iname '*.tsv' -o -iname '*.xls' -o -iname '*.xlsx' -o -iname '*.json' -o -iname '*.db' -o -iname '*.sqlite' -o -iname '*.sqlite3' -o -iname '*.sql' -o -iname '*.parquet' \) ! -name 'package.json' ! -name 'package-lock.json' ! -name 'tsconfig*.json' ! -name 'authz-attestation.json' -print
|
|
481
|
+
```
|
|
482
|
+
|
|
483
|
+
Ignore config files and schema migrations (SQL with only `CREATE` or `ALTER`). For every other file, open its first lines (headers or
|
|
484
|
+
keys only; never print rows into the chat) and look for people's details. If a
|
|
485
|
+
file has them and sits in a folder the app serves or bundles (`public/`,
|
|
486
|
+
`static/`, `dist/`, `src/`, the app root), stop and ask the user before you
|
|
487
|
+
deploy: the data belongs in a store behind a signed-in route (§"Build it
|
|
488
|
+
safe", rule 1). Never delete a data file without the user's yes.
|
|
445
489
|
|
|
446
490
|
Add `--strict-groups` to *additionally* resolve the manifest's
|
|
447
491
|
allowed Entra group online — it catches typo'd / renamed / ineligible
|
|
@@ -698,6 +742,18 @@ Flags — there is nothing useful to pass on the Model A path:
|
|
|
698
742
|
Run `/launchpad-status` to confirm; `/launchpad-content-pr` is no
|
|
699
743
|
longer needed under Model A (the first deploy already shipped your
|
|
700
744
|
content)."
|
|
745
|
+
On a first deploy, add the second owner the user named in §A.2. A co-owner
|
|
746
|
+
gets full owner rights, including destroy, so name the person and the app
|
|
747
|
+
and wait for the user's yes in this conversation. Then run (the Bash tool
|
|
748
|
+
is not a terminal, so the command needs `--yes`; the user's answer is the
|
|
749
|
+
confirmation):
|
|
750
|
+
|
|
751
|
+
```bash
|
|
752
|
+
launchpad add-owner <slug> <email> --yes
|
|
753
|
+
```
|
|
754
|
+
|
|
755
|
+
`launchpad list-owners <slug>` shows the owners afterwards (as Entra ids,
|
|
756
|
+
not emails).
|
|
701
757
|
- **`couldn't reach the served URL to verify: served URL redirected (HTTP 302)`**
|
|
702
758
|
after a successful deploy is expected for an app behind gateway sign-in: the
|
|
703
759
|
CLI has no browser session, so the app sends it to sign-in. It is not a
|
|
@@ -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.79.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-destroy
|
|
3
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.
|
|
4
|
+
version: 0.79.0
|
|
5
5
|
---
|
|
6
6
|
|
|
7
7
|
<!-- BEGIN shell-contract (managed by scripts/sync-skill-contract.sh — edit skills/_partials/shell-contract.md) -->
|
|
@@ -0,0 +1,218 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: launchpad-fix-findings
|
|
3
|
+
description: Help an app owner fix security findings that AIOps sent for their Launchpad app, one at a time, and put the fixed app live. Checks the caller's role with `launchpad apps`, takes a fresh `launchpad clone`, explains each finding in plain words and asks yes or no before changing anything, makes the smallest fix per finding kind (published data files, routes with no server-side sign-in check, writes open to everyone, keys in code, open AI or service proxies), tests, deploys with `launchpad deploy`, confirms with `launchpad status`, and writes a summary the owner sends to AIOps. Use when someone says "fix the security findings", "AIOps sent me findings", "fix my app's security issues", "/launchpad-fix-findings", or pastes a findings note for an app.
|
|
4
|
+
version: 0.79.0
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
<!-- BEGIN shell-contract (managed by scripts/sync-skill-contract.sh — edit skills/_partials/shell-contract.md) -->
|
|
8
|
+
## Shell contract — read this first
|
|
9
|
+
|
|
10
|
+
Every fenced `bash` block below MUST be sent to the `Bash` tool **verbatim**.
|
|
11
|
+
Do not rewrite into PowerShell, cmd, zsh-isms, or "equivalent" forms.
|
|
12
|
+
|
|
13
|
+
- macOS / Linux: the `Bash` tool runs system bash.
|
|
14
|
+
- Windows: the `Bash` tool runs Git for Windows (MSYS) bash. `$HOME`,
|
|
15
|
+
forward slashes, `test -f`, `command -v`, heredocs, and `[[ … ]]` all
|
|
16
|
+
work. There is no reason to translate to `Test-Path`, `$env:USERPROFILE`,
|
|
17
|
+
`Get-Content`, `Where-Object`, `Get-ChildItem`, or backslash paths —
|
|
18
|
+
doing so will fail with `/usr/bin/bash: syntax error`.
|
|
19
|
+
|
|
20
|
+
If a step genuinely needs OS branching, branch *inside* bash:
|
|
21
|
+
|
|
22
|
+
```bash
|
|
23
|
+
case "$(uname -s)" in
|
|
24
|
+
Darwin) : ;;
|
|
25
|
+
Linux) : ;;
|
|
26
|
+
MINGW*|MSYS*|CYGWIN*) : ;;
|
|
27
|
+
esac
|
|
28
|
+
```
|
|
29
|
+
<!-- END shell-contract -->
|
|
30
|
+
|
|
31
|
+
# /launchpad-fix-findings
|
|
32
|
+
|
|
33
|
+
The owner pastes the findings AIOps sent for one app. Fix them safely, one
|
|
34
|
+
at a time, and put the fixed app live. The owner decides; you explain and ask.
|
|
35
|
+
|
|
36
|
+
Ask the owner for three things if they did not give them: the app's slug on
|
|
37
|
+
Launchpad, the commit AIOps scanned (if the note gives one), and the findings
|
|
38
|
+
text ("What we found", "Steps to fix", "Also seen").
|
|
39
|
+
|
|
40
|
+
## Stop and ask the owner
|
|
41
|
+
|
|
42
|
+
Stop and ask before you would: delete data or a data file; change who can open
|
|
43
|
+
the app; turn the app off; use a group name or ID, or a list of devices or
|
|
44
|
+
systems, that the findings do not give; use any flag that skips a check; or
|
|
45
|
+
make any change you are not sure is safe. If the app is no longer needed, say
|
|
46
|
+
so: the owner asks AIOps to retire it.
|
|
47
|
+
|
|
48
|
+
## 1. Set up
|
|
49
|
+
|
|
50
|
+
```bash
|
|
51
|
+
launchpad --version
|
|
52
|
+
```
|
|
53
|
+
|
|
54
|
+
If it is older than the version in this skill's frontmatter, run `launchpad
|
|
55
|
+
update`, then `launchpad --version` again: right after a release, `update` can
|
|
56
|
+
report success and leave the old version in place. Use `/launchpad-onboard` if
|
|
57
|
+
any command fails on sign-in or setup.
|
|
58
|
+
|
|
59
|
+
Check that the owner may work on this app:
|
|
60
|
+
|
|
61
|
+
```bash
|
|
62
|
+
launchpad apps
|
|
63
|
+
```
|
|
64
|
+
|
|
65
|
+
The app must be in the list with ROLE `owner` or `editor`. If it is not, or if
|
|
66
|
+
any command later says the caller has no role or is not authorised, **stop**:
|
|
67
|
+
tell the owner to ask AIOps for access. Do not look for another copy of the
|
|
68
|
+
app and do not try to give anyone a role.
|
|
69
|
+
|
|
70
|
+
Take a fresh copy. Make a new empty folder, then clone inside it; the clone
|
|
71
|
+
makes its own sub-folder `launchpad-app-<slug>`, and you work only there:
|
|
72
|
+
|
|
73
|
+
```bash
|
|
74
|
+
mkdir -p "$HOME/launchpad-fix-<slug>"
|
|
75
|
+
cd "$HOME/launchpad-fix-<slug>"
|
|
76
|
+
launchpad clone <slug>
|
|
77
|
+
```
|
|
78
|
+
|
|
79
|
+
Do not use an old copy on the computer: a deploy from a folder without a
|
|
80
|
+
trusted baseline is refused. If the findings name a commit, compare it with
|
|
81
|
+
the `Base revision` that `launchpad clone` printed (also stored in
|
|
82
|
+
`launchpad-app-<slug>/.launchpad/base-sha`) and say whether they match. If
|
|
83
|
+
the note gives no commit, say so and work from the clone as it is. Read the
|
|
84
|
+
files as the clone wrote them; line numbers in the note may have drifted, so
|
|
85
|
+
find the code the note describes rather than trusting a line number.
|
|
86
|
+
|
|
87
|
+
Read `launchpad.yaml` to learn the app shape (`static`, `react`, `react+api`,
|
|
88
|
+
`container`) and the audience (`allowed_entra_group(s)`). A v2 manifest says
|
|
89
|
+
`spec.origin: dispatch` for Workers dispatch; a v1 manifest, or a v2 one
|
|
90
|
+
without it, means a legacy Pages app; a container has no origin field.
|
|
91
|
+
|
|
92
|
+
## 2. Explain before you change
|
|
93
|
+
|
|
94
|
+
For each finding, read the code it points to. Then tell the owner, in plain
|
|
95
|
+
words and briefly:
|
|
96
|
+
|
|
97
|
+
- what the problem is;
|
|
98
|
+
- who could see or change what today;
|
|
99
|
+
- what you plan to change;
|
|
100
|
+
- if the finding no longer matches the code, say so;
|
|
101
|
+
- if you found the same problem in more places than the note lists, list them.
|
|
102
|
+
|
|
103
|
+
Re-scan for each finding kind across every folder of the clone except
|
|
104
|
+
`node_modules/` and `.git/`, including scripts, sub-apps and workflow files: a
|
|
105
|
+
note can list fewer files than the code has. Never print a password, key or row of people's data
|
|
106
|
+
in the chat; name the file and line only.
|
|
107
|
+
|
|
108
|
+
Then list what is missing, as plain items the owner must get from AIOps
|
|
109
|
+
before that part can ship: for example a group ID, the live value of a
|
|
110
|
+
setting, or who runs a job that calls the app. Say which fixes can go ahead
|
|
111
|
+
without them. Do not ask the owner technical questions they cannot answer.
|
|
112
|
+
|
|
113
|
+
End with one question and wait: **"Shall I make these changes?"** Change
|
|
114
|
+
nothing before the owner says yes.
|
|
115
|
+
|
|
116
|
+
## 3. Fix each finding with the smallest change
|
|
117
|
+
|
|
118
|
+
Follow §"Build it safe" in `/launchpad-deploy` and the patterns in
|
|
119
|
+
`/launchpad-identity`. Per finding kind:
|
|
120
|
+
|
|
121
|
+
- **A data file with people's details is published with the app.** Take it
|
|
122
|
+
out of what the app publishes (`public/`, `static/`, `dist/`, the bundle).
|
|
123
|
+
If the app needs the data, load it from a store behind a route that checks
|
|
124
|
+
the signed-in user. Ask before you delete any data file.
|
|
125
|
+
- **A route returns or changes data without a check.** Make every such route
|
|
126
|
+
check the signed-in user on the server. A check in the page or the browser is
|
|
127
|
+
not enough.
|
|
128
|
+
- `react+api` (Pages or dispatch): verify `X-Launchpad-User-Assertion` with
|
|
129
|
+
`@m-kopa/platform-auth` in a middleware before the routes
|
|
130
|
+
(`/launchpad-identity`).
|
|
131
|
+
- Container: **read how the app already gets the signed-in user first**
|
|
132
|
+
(search for `X-User-`, `x-user-`, `identity`, `auth`). The platform sends
|
|
133
|
+
`X-User-Sub`, `X-User-Email` and, when present, `X-User-Groups`. If the app
|
|
134
|
+
already has a function that reads these, use it and extend it (for
|
|
135
|
+
example to read `X-User-Groups` for a group check); do not add a second
|
|
136
|
+
reader beside it. Exempt the
|
|
137
|
+
`containers[].healthcheck` path and any path the Dockerfile `HEALTHCHECK`
|
|
138
|
+
calls. If the app gates the headers on its own setting, say which setting
|
|
139
|
+
and that it must be on live; ask AIOps to confirm, because you cannot see
|
|
140
|
+
live values.
|
|
141
|
+
- Find every caller with no user session (health checks, scheduled jobs,
|
|
142
|
+
other systems) and keep them working. If the code does not show who calls
|
|
143
|
+
a route, list it as a question for AIOps (step 2), not for the owner.
|
|
144
|
+
- **Anyone signed in can change or delete data.** Add a server-side group
|
|
145
|
+
check before every write (`/launchpad-identity` § "Only this group may
|
|
146
|
+
write"). It needs the exact Entra group ID. **Never guess a group name or
|
|
147
|
+
ID.** If the findings do not give it, tell the owner what to ask AIOps for
|
|
148
|
+
(the group name and its ID, and confirmation that the group is in the
|
|
149
|
+
sign-in token), and do not deploy that fix until you have it. Check a value
|
|
150
|
+
you were given with `launchpad groups show <name>`. Hold the ID as a
|
|
151
|
+
setting declared in `launchpad.yaml`, never as a guess in code.
|
|
152
|
+
- **A password or key is in the code.** Remove it from the code, tell the
|
|
153
|
+
owner they must replace (rotate) it with the service that issued it, and
|
|
154
|
+
store the new value as a Launchpad secret: declare the name in
|
|
155
|
+
`launchpad.yaml` and set it with `launchpad secrets push`
|
|
156
|
+
(`/launchpad-deploy` §A.4). Never put a password or key in the chat, a file
|
|
157
|
+
you write, or a commit message. A secret already in git history needs
|
|
158
|
+
AIOps; say so in the summary.
|
|
159
|
+
- **A route forwards any request to an AI or another service with the app's
|
|
160
|
+
key.** Limit it to what the app needs: fixed model, fixed size limits, fixed
|
|
161
|
+
destination, chosen in server code. Require a signed-in user.
|
|
162
|
+
- **Too many people can open the app.** Do **not** change the audience
|
|
163
|
+
(`allowed_entra_group(s)`), even if the note says to narrow it. Say what you
|
|
164
|
+
recommend; the owner and AIOps decide together.
|
|
165
|
+
|
|
166
|
+
No other changes: no redesign, no new features, no tidy-up of code that works.
|
|
167
|
+
|
|
168
|
+
## 4. Test before you deploy
|
|
169
|
+
|
|
170
|
+
Run the app's own checks (install, lint, type check, tests, build). Use the
|
|
171
|
+
lock file the app already has:
|
|
172
|
+
|
|
173
|
+
- `bun.lock`: `npx --yes bun@1.3.4 install` (the platform builds with bun 1.3.4);
|
|
174
|
+
- `package-lock.json`: `npm ci`.
|
|
175
|
+
|
|
176
|
+
If the app has separate parts, install only the part you changed. Do not build
|
|
177
|
+
or run a container image. If a check cannot run here (it needs a database or a
|
|
178
|
+
secret the owner does not have), say which check and why; never skip it
|
|
179
|
+
silently and never invent data that looks like real people. Test the changed
|
|
180
|
+
code in the smallest way you can instead.
|
|
181
|
+
|
|
182
|
+
For each fix, show that the old behaviour is gone: for example, a request with
|
|
183
|
+
no signed-in user gets 401, a user outside the group gets 403 on a write, a
|
|
184
|
+
forged `X-User-*` header on a non-container app is ignored.
|
|
185
|
+
|
|
186
|
+
Then run the platform checks from `/launchpad-deploy` §A.4:
|
|
187
|
+
`launchpad validate --app-lints` and the data-file check. Show any finding.
|
|
188
|
+
|
|
189
|
+
## 5. Deploy and confirm
|
|
190
|
+
|
|
191
|
+
```bash
|
|
192
|
+
launchpad deploy
|
|
193
|
+
launchpad status <slug>
|
|
194
|
+
```
|
|
195
|
+
|
|
196
|
+
If the deploy is refused, show the message exactly and follow it. Do not use a
|
|
197
|
+
flag that skips a check (for example `--allow-unguarded` or
|
|
198
|
+
`--allow-preflight-failure`) without asking first. Confirm with `launchpad
|
|
199
|
+
status <slug>` that the new commit is live; for a dispatch app,
|
|
200
|
+
`v2 delivery: state delivered`.
|
|
201
|
+
|
|
202
|
+
## 6. Summary for AIOps
|
|
203
|
+
|
|
204
|
+
When the app is live, write a short summary the owner sends to AIOps
|
|
205
|
+
themselves: each finding, what you changed, how you tested it, and anything
|
|
206
|
+
you could not fix and why (for example a group ID still needed, or a secret
|
|
207
|
+
in git history). Plain words, no passwords, no keys, no people's details. The
|
|
208
|
+
owner deploys and reports; AIOps then checks the live app.
|
|
209
|
+
|
|
210
|
+
## Don'ts
|
|
211
|
+
|
|
212
|
+
- Do **not** start without an `owner` or `editor` role from `launchpad apps`.
|
|
213
|
+
- Do **not** work in an old copy of the app; use the fresh clone.
|
|
214
|
+
- Do **not** change the app's audience, delete data, or turn the app off
|
|
215
|
+
without the owner's explicit yes.
|
|
216
|
+
- Do **not** guess a group name or ID.
|
|
217
|
+
- Do **not** build or run a container image locally.
|
|
218
|
+
- Do **not** send any message to anyone; the owner sends the summary.
|
|
@@ -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.79.0
|
|
5
5
|
---
|
|
6
6
|
|
|
7
7
|
<!-- BEGIN shell-contract (managed by scripts/sync-skill-contract.sh — edit skills/_partials/shell-contract.md) -->
|
|
@@ -263,9 +263,89 @@ Container apps behind the gateway (AIO-811) get the same signed-in identity. The
|
|
|
263
263
|
- **The container Worker verifies the assertion for you.** The generated `container-worker.ts` reads `X-Launchpad-User-Assertion`, verifies it with `@m-kopa/platform-auth` against `GATEWAY_ISSUER`, `GATEWAY_AUD` and `GATEWAY_JWKS_URL`, and returns 401 if it is missing or invalid. It is the only gate, because the container has no public hostname and no Cloudflare Access app.
|
|
264
264
|
- **Your container process receives plain headers after that check:** `X-User-Sub` (Entra `oid`) and `X-User-Email` (tenant UPN), plus `X-User-Groups` when groups are present. Inbound `X-User-*` headers are stripped before the Worker sets its own, so a client cannot forge them.
|
|
265
265
|
- **Do not re-verify in the container unless you need to.** The raw assertion is checked at the container Worker and your process sees only the `X-User-*` headers.
|
|
266
|
-
-
|
|
266
|
+
- Who may open the app is set by `access.allowed_entra_group`. A route that returns or changes data still checks `X-User-Sub` itself, and a write also checks the group (§ Safe patterns per app shape).
|
|
267
267
|
- The legacy `auth: access` container mode (Cloudflare Access JWT, `CF_ACCESS_*`) still works for existing apps but is limited by the Zero Trust seat cap. New container apps should use `auth: gateway`.
|
|
268
268
|
|
|
269
|
+
## Safe patterns per app shape
|
|
270
|
+
|
|
271
|
+
| App shape | What your server code reads | How to trust it |
|
|
272
|
+
|---|---|---|
|
|
273
|
+
| Pages or dispatch `react+api` (and a legacy Pages app with Functions) | `X-Launchpad-User-Assertion` | Verify it with `@m-kopa/platform-auth` (above). Never read `X-User-*` here: the gateway strips client copies and nothing sets them for these apps, and anyone who reaches a Pages origin directly can send any header. |
|
|
274
|
+
| Dispatch `static` or `react` | nothing (no server code) | No route check is possible. Limit who opens the whole app with `access.allowed_entra_group(s)`. |
|
|
275
|
+
| `type: container` (`auth: gateway` or `auth: access`) | `X-User-Sub`, `X-User-Email`, `X-User-Groups` | The generated container Worker verifies the token, deletes any client `X-User-*`, then sets these. Trust them inside the container only. |
|
|
276
|
+
|
|
277
|
+
Rules for every shape:
|
|
278
|
+
|
|
279
|
+
- Run the check in server middleware before the routes. No verified user:
|
|
280
|
+
**401**. Verified user in the wrong group: **403**.
|
|
281
|
+
- **Container: exempt the health path.** The platform health probe calls the
|
|
282
|
+
manifest's `containers[].healthcheck` path with no user headers, so a check
|
|
283
|
+
on that path marks the app unhealthy. Exempt any path your own Dockerfile
|
|
284
|
+
`HEALTHCHECK` calls, too. The container Worker answers its own `/health`
|
|
285
|
+
without reaching your code.
|
|
286
|
+
- **Groups are Entra group object IDs, not names.** The gateway sends them in
|
|
287
|
+
lowercase. Lowercase your configured IDs too and compare IDs, never names.
|
|
288
|
+
- **The groups can be absent.** In the token, a missing `groups` claim reads
|
|
289
|
+
as an empty list. On a container, `X-User-Groups` (comma separated, no
|
|
290
|
+
spaces) is sent only when the user has at least one group. Treat a missing
|
|
291
|
+
header as "no groups" (403 on a group-gated route), not as "not signed in".
|
|
292
|
+
- **Which groups the token carries.** The token holds the groups that Entra
|
|
293
|
+
put in the user's sign-in token, as of that sign-in: a user added to a group
|
|
294
|
+
later is not in the list until they sign in again. Which groups Entra puts
|
|
295
|
+
there is set in Entra, not in code. The gateway can also admit a user to the
|
|
296
|
+
app through a live membership check on a group that is not in their token,
|
|
297
|
+
so a route check on that same group would refuse them. Before you rely on a
|
|
298
|
+
per-route group check, **ask AIOps to confirm the group is in the token**.
|
|
299
|
+
- **Never guess a group ID.** Look it up with `launchpad groups show <name>`
|
|
300
|
+
(it also accepts an ID and prints the display name, so you can confirm an ID
|
|
301
|
+
you were given). If the user does not know the exact group, ask them to get
|
|
302
|
+
it from AIOps.
|
|
303
|
+
|
|
304
|
+
### Only this group may write
|
|
305
|
+
|
|
306
|
+
A new `react+api` app: start from `launchpad init --type react+api
|
|
307
|
+
--secure-template`. Its `requireRole("writer")` refuses every write unless the
|
|
308
|
+
caller's verified groups include an ID listed in `ROLE_WRITER_GROUP_IDS`, and
|
|
309
|
+
its test fails if a write route lacks the check. For an existing Hono app
|
|
310
|
+
behind `createPlatformAuthMiddleware` (it stores the verified user as
|
|
311
|
+
`c.get("user")`), the same check is:
|
|
312
|
+
|
|
313
|
+
```js
|
|
314
|
+
// Comma-separated Entra group object IDs. Unset or empty: every write is refused.
|
|
315
|
+
export function requireGroup(envKey) {
|
|
316
|
+
return async (c, next) => {
|
|
317
|
+
const allowed = String(c.env?.[envKey] ?? '')
|
|
318
|
+
.split(',')
|
|
319
|
+
.map((g) => g.trim().toLowerCase())
|
|
320
|
+
.filter((g) => g !== '');
|
|
321
|
+
const groups = (c.get('user')?.groups ?? []).map((g) => g.toLowerCase());
|
|
322
|
+
if (allowed.length === 0 || !groups.some((g) => allowed.includes(g))) {
|
|
323
|
+
return c.json({ error: 'forbidden' }, 403);
|
|
324
|
+
}
|
|
325
|
+
await next();
|
|
326
|
+
};
|
|
327
|
+
}
|
|
328
|
+
|
|
329
|
+
// app.post('/items', requireGroup('ROLE_WRITER_GROUP_IDS'), handler);
|
|
330
|
+
```
|
|
331
|
+
|
|
332
|
+
On dispatch, set the IDs as a plain value in `launchpad.yaml` (a group ID is
|
|
333
|
+
not a secret):
|
|
334
|
+
|
|
335
|
+
```yaml
|
|
336
|
+
spec:
|
|
337
|
+
env_vars:
|
|
338
|
+
ROLE_WRITER_GROUP_IDS:
|
|
339
|
+
type: plain_text
|
|
340
|
+
value: <group object ID from launchpad groups show>
|
|
341
|
+
```
|
|
342
|
+
|
|
343
|
+
In a container, read the headers instead: no `X-User-Sub` is 401; split
|
|
344
|
+
`X-User-Groups` on `,`, trim and lowercase each ID (a missing header is an
|
|
345
|
+
empty list); no allowed ID is 403. A container setting is declared under
|
|
346
|
+
`containers[].env`, every such name must also be listed in
|
|
347
|
+
`secrets.bindings`, and its value is set with `launchpad secrets push`.
|
|
348
|
+
|
|
269
349
|
## Dispatch rules (`spec.origin: dispatch`)
|
|
270
350
|
|
|
271
351
|
The verify code is the same on dispatch. What changes is how `functions/`
|
|
@@ -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.79.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-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.79.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.79.0
|
|
5
5
|
---
|
|
6
6
|
|
|
7
7
|
<!-- BEGIN shell-contract (managed by scripts/sync-skill-contract.sh — edit skills/_partials/shell-contract.md) -->
|
|
@@ -40,7 +40,7 @@ This is the **only** skill that mutates the user's machine (it can
|
|
|
40
40
|
trigger `launchpad login` and suggest installs). The other skills
|
|
41
41
|
(`/launchpad-deploy`, `/launchpad-deploy-status`,
|
|
42
42
|
`/launchpad-content-pr`, `/launchpad-status`, `/launchpad-destroy`,
|
|
43
|
-
`/launchpad-identity`, `/launchpad-ingest`) assume the machine is already onboarded and fail
|
|
43
|
+
`/launchpad-identity`, `/launchpad-ingest`, `/launchpad-fix-findings`) assume the machine is already onboarded and fail
|
|
44
44
|
loudly if a prereq is missing — pointing back here.
|
|
45
45
|
|
|
46
46
|
After `launchpad clone <slug>`, refresh that same directory with bare
|
|
@@ -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.79.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.79.0
|
|
5
5
|
---
|
|
6
6
|
|
|
7
7
|
<!-- BEGIN shell-contract (managed by scripts/sync-skill-contract.sh — edit skills/_partials/shell-contract.md) -->
|