@m-kopa/launchpad-cli 0.74.0 → 0.74.1
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 +4 -0
- package/dist/cli.js +1 -1
- package/dist/version.d.ts +1 -1
- package/package.json +1 -1
- package/skills/launchpad-content-pr/SKILL.md +1 -1
- package/skills/launchpad-deploy/SKILL.md +1 -1
- package/skills/launchpad-deploy-status/SKILL.md +1 -1
- package/skills/launchpad-destroy/SKILL.md +1 -1
- package/skills/launchpad-identity/SKILL.md +1 -1
- package/skills/launchpad-ingest/SKILL.md +39 -26
- package/skills/launchpad-onboard/SKILL.md +1 -1
- package/skills/launchpad-report/SKILL.md +1 -1
- package/skills/launchpad-status/SKILL.md +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -6,6 +6,10 @@ 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.74.1 - 2026-10-06
|
|
10
|
+
|
|
11
|
+
- The `launchpad-ingest` skill's handler is split into `integrationConfig`, `verifiedIntegration` and a short route, so the scaffolded code passes complexity gates such as fallow. Behaviour is unchanged.
|
|
12
|
+
|
|
9
13
|
## 0.74.0 - 2026-10-06
|
|
10
14
|
|
|
11
15
|
### Added
|
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.74.
|
|
22
|
+
var CLI_VERSION = "0.74.1";
|
|
23
23
|
|
|
24
24
|
// src/config.ts
|
|
25
25
|
import { readFileSync } from "node:fs";
|
package/dist/version.d.ts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export declare const CLI_VERSION = "0.74.
|
|
1
|
+
export declare const CLI_VERSION = "0.74.1";
|
|
2
2
|
//# sourceMappingURL=version.d.ts.map
|
package/package.json
CHANGED
|
@@ -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.74.
|
|
4
|
+
version: 0.74.1
|
|
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.74.
|
|
4
|
+
version: 0.74.1
|
|
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-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.74.
|
|
4
|
+
version: 0.74.1
|
|
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 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.74.
|
|
4
|
+
version: 0.74.1
|
|
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-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.74.
|
|
4
|
+
version: 0.74.1
|
|
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-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.74.
|
|
4
|
+
version: 0.74.1
|
|
5
5
|
---
|
|
6
6
|
|
|
7
7
|
<!-- BEGIN shell-contract (managed by scripts/sync-skill-contract.sh — edit skills/_partials/shell-contract.md) -->
|
|
@@ -129,33 +129,46 @@ function jwksFor(url: string): ReturnType<typeof createJwksCache> {
|
|
|
129
129
|
return jwks;
|
|
130
130
|
}
|
|
131
131
|
|
|
132
|
+
/** Issuer, host and JWKS URL from the platform's env, or null when unset.
|
|
133
|
+
* The host comes from GATEWAY_AUD, never from the request URL: on a Pages
|
|
134
|
+
* origin the request arrives addressed to <project>.pages.dev. */
|
|
135
|
+
function integrationConfig(env: IngestEnv): { issuer: string; host: string; jwksUrl: string } | null {
|
|
136
|
+
const issuer = env.GATEWAY_ISSUER || env.CF_ACCESS_TEAM_DOMAIN;
|
|
137
|
+
const host = env.GATEWAY_AUD || env.CF_ACCESS_AUD;
|
|
138
|
+
if (!issuer || !host) return null;
|
|
139
|
+
const jwksUrl = env.GATEWAY_JWKS_URL || env.JWKS_URL || `${issuer.replace(/\/$/, "")}/.well-known/jwks.json`;
|
|
140
|
+
return { issuer, host, jwksUrl };
|
|
141
|
+
}
|
|
142
|
+
|
|
143
|
+
/** The verified integration name, or null. Forged, expired, wrong host, wrong
|
|
144
|
+
* route, or a user/CLI token all fail closed. */
|
|
145
|
+
async function verifiedIntegration(
|
|
146
|
+
req: Request,
|
|
147
|
+
config: { issuer: string; host: string; jwksUrl: string },
|
|
148
|
+
): Promise<string | null> {
|
|
149
|
+
const token = req.headers.get(INTEGRATION_ASSERTION_HEADER_NAME);
|
|
150
|
+
if (!token) return null;
|
|
151
|
+
try {
|
|
152
|
+
const { name } = await verifyIntegrationAssertion(token, {
|
|
153
|
+
issuer: config.issuer,
|
|
154
|
+
host: config.host,
|
|
155
|
+
method: req.method,
|
|
156
|
+
path: new URL(req.url).pathname,
|
|
157
|
+
jwks: jwksFor(config.jwksUrl),
|
|
158
|
+
});
|
|
159
|
+
return name;
|
|
160
|
+
} catch {
|
|
161
|
+
return null;
|
|
162
|
+
}
|
|
163
|
+
}
|
|
164
|
+
|
|
132
165
|
/** Register BEFORE the user-auth middleware: machine callers have no user session. */
|
|
133
166
|
export function registerIngestRoutes<E extends { Bindings: IngestEnv }>(app: Hono<E>): void {
|
|
134
167
|
app.post("/ingest/stock-count", async (c) => {
|
|
135
|
-
const
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
const host = env.GATEWAY_AUD || env.CF_ACCESS_AUD;
|
|
140
|
-
const url =
|
|
141
|
-
env.GATEWAY_JWKS_URL || env.JWKS_URL || (issuer ? `${issuer.replace(/\/$/, "")}/.well-known/jwks.json` : undefined);
|
|
142
|
-
if (!issuer || !host || !url) return c.json({ error: "integration_unconfigured" }, 503);
|
|
143
|
-
|
|
144
|
-
const token = c.req.header(INTEGRATION_ASSERTION_HEADER_NAME);
|
|
145
|
-
if (!token) return c.json({ error: "unauthorized" }, 401);
|
|
146
|
-
let name: string;
|
|
147
|
-
try {
|
|
148
|
-
({ name } = await verifyIntegrationAssertion(token, {
|
|
149
|
-
issuer,
|
|
150
|
-
host,
|
|
151
|
-
method: c.req.method,
|
|
152
|
-
path: new URL(c.req.url).pathname,
|
|
153
|
-
jwks: jwksFor(url),
|
|
154
|
-
}));
|
|
155
|
-
} catch {
|
|
156
|
-
// Forged, expired, wrong host, wrong route, or a user/CLI token: fail closed.
|
|
157
|
-
return c.json({ error: "unauthorized" }, 401);
|
|
158
|
-
}
|
|
168
|
+
const config = integrationConfig(c.env);
|
|
169
|
+
if (config === null) return c.json({ error: "integration_unconfigured" }, 503);
|
|
170
|
+
const name = await verifiedIntegration(c.req.raw, config);
|
|
171
|
+
if (name === null) return c.json({ error: "unauthorized" }, 401);
|
|
159
172
|
if (name !== INTEGRATION) return c.json({ error: "forbidden" }, 403);
|
|
160
173
|
|
|
161
174
|
const parsed = StockCount.safeParse(await c.req.json().catch(() => null));
|
|
@@ -163,7 +176,7 @@ export function registerIngestRoutes<E extends { Bindings: IngestEnv }>(app: Hon
|
|
|
163
176
|
return c.json({ error: "invalid_body", fields: parsed.error.issues.map((i) => i.path.join(".")) }, 400);
|
|
164
177
|
}
|
|
165
178
|
const row = parsed.data;
|
|
166
|
-
const result = await env.DB.prepare(
|
|
179
|
+
const result = await c.env.DB.prepare(
|
|
167
180
|
`INSERT INTO stock_counts (idempotency_key, serial, count_month, agent_id, counted_at)
|
|
168
181
|
VALUES (?, ?, ?, ?, ?)
|
|
169
182
|
ON CONFLICT(idempotency_key) DO NOTHING`,
|
|
@@ -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.74.
|
|
4
|
+
version: 0.74.1
|
|
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-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.74.
|
|
4
|
+
version: 0.74.1
|
|
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.74.
|
|
4
|
+
version: 0.74.1
|
|
5
5
|
---
|
|
6
6
|
|
|
7
7
|
<!-- BEGIN shell-contract (managed by scripts/sync-skill-contract.sh — edit skills/_partials/shell-contract.md) -->
|