@m-kopa/launchpad-cli 0.24.0 → 0.26.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.
Files changed (40) hide show
  1. package/CHANGELOG.md +92 -0
  2. package/dist/bundle/upload.d.ts +34 -2
  3. package/dist/bundle/upload.d.ts.map +1 -1
  4. package/dist/cli.js +585 -266
  5. package/dist/commands/deploy-flags.d.ts +6 -0
  6. package/dist/commands/deploy-flags.d.ts.map +1 -1
  7. package/dist/commands/deploy.d.ts +10 -13
  8. package/dist/commands/deploy.d.ts.map +1 -1
  9. package/dist/commands/destroy.d.ts +1 -1
  10. package/dist/commands/destroy.d.ts.map +1 -1
  11. package/dist/commands/envvars.d.ts +2 -2
  12. package/dist/commands/envvars.d.ts.map +1 -1
  13. package/dist/commands/infer-slug.d.ts +37 -0
  14. package/dist/commands/infer-slug.d.ts.map +1 -0
  15. package/dist/commands/logs.d.ts +2 -2
  16. package/dist/commands/logs.d.ts.map +1 -1
  17. package/dist/commands/merge.d.ts +2 -2
  18. package/dist/commands/merge.d.ts.map +1 -1
  19. package/dist/commands/pull.d.ts +1 -1
  20. package/dist/commands/pull.d.ts.map +1 -1
  21. package/dist/commands/recover.d.ts +12 -0
  22. package/dist/commands/recover.d.ts.map +1 -0
  23. package/dist/commands/review.d.ts +2 -2
  24. package/dist/commands/review.d.ts.map +1 -1
  25. package/dist/commands/status.d.ts +18 -4
  26. package/dist/commands/status.d.ts.map +1 -1
  27. package/dist/deploy/apply.d.ts +5 -2
  28. package/dist/deploy/apply.d.ts.map +1 -1
  29. package/dist/deploy/deployment-status.d.ts +18 -0
  30. package/dist/deploy/deployment-status.d.ts.map +1 -1
  31. package/dist/deploy/rollback.d.ts.map +1 -1
  32. package/dist/dispatcher.d.ts.map +1 -1
  33. package/dist/version.d.ts +1 -1
  34. package/package.json +1 -1
  35. package/skills/launchpad-content-pr/SKILL.md +1 -1
  36. package/skills/launchpad-deploy/SKILL.md +1 -1
  37. package/skills/launchpad-deploy-status/SKILL.md +6 -4
  38. package/skills/launchpad-destroy/SKILL.md +1 -1
  39. package/skills/launchpad-onboard/SKILL.md +1 -1
  40. package/skills/launchpad-status/SKILL.md +13 -6
package/CHANGELOG.md CHANGED
@@ -6,6 +6,98 @@ 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.26.1 — 2026-06-11
10
+
11
+ Two `launchpad status` UX faults found live by the owner (fast-track,
12
+ type:bug).
13
+
14
+ ### Fixed
15
+
16
+ - **Slug inference now reads the local manifest** (Fault 1). Bare
17
+ `launchpad status` in a directory named e.g. `AI-Audit-Assistant/`
18
+ containing a valid `launchpad.yaml` (`metadata.name: ai-audit`) used
19
+ to fail with "slug not provided + cannot infer from cwd" — inference
20
+ only knew the `launchpad-app-<slug>` directory-name convention and the
21
+ manifest's own declared slug was ignored. Resolution order is now:
22
+ (1) explicit positional / `--slug`, (2) the local manifest's slug
23
+ (`./launchpad.yaml` or `--file`; v1 `metadata.name` / v2
24
+ `metadata.slug`), (3) the directory-name convention. When the manifest
25
+ and the directory name disagree, the manifest wins with a stderr note.
26
+ Applied consistently across every verb that infers (`status`, `pull`,
27
+ `recover`, `logs`, `review`, `merge`, `envvars`, `destroy`, legacy
28
+ `deploy`) — the five drifted copies of the helper are centralised in
29
+ one module (`recover`'s inference was dirname-first; it is now
30
+ manifest-first like everything else).
31
+ - **`launchpad status <slug>` no longer demands a local manifest**
32
+ (Fault 2). With an explicit (or inferred) slug and no local
33
+ `launchpad.yaml`, status used to exit 2 on ENOENT — after already
34
+ fetching the lifecycle and even saying the app was live in its own
35
+ error text. It now degrades to the live-truth-only view: lifecycle +
36
+ deployment block (live/failed/in-progress, trigger, build outcome,
37
+ standing exceptions) plus a one-line "drift not checked" note, exit 0.
38
+ `--json` carries `"drift": null` and the `live_drift_unknown` state as
39
+ the not-evaluated discriminant. `--strict` without a manifest exits 0
40
+ (drift can't be evaluated; status says so) unless the live build
41
+ itself failed, which exits 1. The hard exit-2 error remains for a
42
+ present-but-unreadable or invalid manifest, and the usage error
43
+ remains when no slug can be resolved at all.
44
+
45
+ (Note: 0.26.0 was never published to npm — a failed docs gate, since
46
+ fixed — so this release ships 0.26.0's `recover` verb and these fixes
47
+ together.)
48
+
49
+ ## 0.26.0 — 2026-06-11
50
+
51
+ ### Added
52
+
53
+ - **`launchpad recover [<slug>]`** (sp-devlp1 AC12). Repairs an app whose
54
+ registry record is stuck at a terminal provisioning failure although the
55
+ app is actually live (the ai-audit class: a since-fixed platform bug
56
+ failed the record after content shipped, leaving `launchpad status`
57
+ short-circuited on the failed lifecycle with no CLI way out). The bot
58
+ verifies LIVE Cloudflare state first — Pages project exists + a
59
+ successful production deployment is serving — and only then reconciles
60
+ the record to `live`, preserving every non-lifecycle field. A not-live
61
+ app is refused with exactly what was checked and the next steps
62
+ (`deploy --resume` / `--abandon` / re-deploy): recover never fabricates
63
+ a live state. Owner/editor/break-glass gated, audited, fail-closed
64
+ (Cloudflare unreachable → nothing changes). Recovering a healthy app is
65
+ a no-op success.
66
+
67
+ ### Fixed
68
+
69
+ - **`launchpad deploy` usage text no longer advertises the removed
70
+ `--platform-repo` flag** (apply runs server-side via portal-bot). The
71
+ banner now reflects the real mode surface, and a misused flag (e.g.
72
+ bare `deploy --yes`) prints a pointed one-line error instead of a wall
73
+ of stale usage.
74
+ - **Policy-rejected deploys now say the retry is clean.** A
75
+ bundle-policy / app-boundary / build-command rejection leaves no
76
+ residue (nothing committed, no slug claimed, no staged bundle) — the
77
+ error now states that explicitly: fix the file and re-run
78
+ `launchpad deploy`.
79
+
80
+ ## 0.25.0 — 2026-06-11
81
+
82
+ ### Changed
83
+
84
+ - **Redeploying an unchanged app is a clean no-op** (sp-devlp1 AC1 / ADR
85
+ 0025). The bot diffs the bundle against the managed repo's `main` (git
86
+ tree-diff) before gating: nothing changed → `launchpad deploy` prints
87
+ "Nothing to deploy" and exits 0 — no policy failure, no junk commit, no
88
+ rebuild. Deploys that DO change files commit only the changed files.
89
+ - **Policy gates judge what you changed, not what you have** (AC2).
90
+ Already-live files are never re-flagged; their pre-existing violations
91
+ surface as a non-blocking drift report (and in `launchpad status`'s new
92
+ standing-exceptions block). Secrets are the exception: a secret anywhere
93
+ in the upload — including one already on `main` — always blocks, with
94
+ rotation guidance.
95
+ - **`deploy --apply` no longer requires local git state** (AC3). The bot
96
+ resolves `launchpad.yaml` at the managed repo's `main` HEAD; your local
97
+ history can share zero commits with the managed repo. New `--at <sha>`
98
+ pins a specific managed-repo commit; `rollback` now uses it too (fixing
99
+ its local-HEAD keying).
100
+
9
101
  ## 0.24.0 — 2026-06-11
10
102
 
11
103
  ### Changed
@@ -1,5 +1,17 @@
1
1
  import type { CliConfig } from "../config.js";
2
2
  import type { WorkerArtifact } from "./cron-bundle.js";
3
+ /** Drift report riding on a success response (sp-devlp1 T3 / D2):
4
+ * policy violations observed in content already live on managed
5
+ * main — non-blocking, recorded server-side in the queryable
6
+ * standing-exception inventory. */
7
+ export interface StandingExceptionsSummary {
8
+ readonly count: number;
9
+ readonly entries: ReadonlyArray<{
10
+ readonly path: string;
11
+ readonly rule: string;
12
+ }>;
13
+ readonly message?: string;
14
+ }
3
15
  /**
4
16
  * Response shape from the bot's deploy-bundle endpoint when the
5
17
  * bundle was committed to the per-app repo (HTTP 202, status="accepted").
@@ -10,6 +22,26 @@ export interface DeployBundleAccepted {
10
22
  readonly commit_sha: string;
11
23
  readonly repo: string;
12
24
  readonly message: string;
25
+ /** "delta" (gates judged the changed-set) or "full" (fallback). */
26
+ readonly gating?: "delta" | "full";
27
+ readonly committed_file_count?: number;
28
+ /** Files the bot's server-side app-boundary stripped (inferred
29
+ * contract, never-shippable paths). */
30
+ readonly boundary_stripped?: readonly string[];
31
+ readonly standing_exceptions?: StandingExceptionsSummary;
32
+ }
33
+ /**
34
+ * Response shape when managed main already matches the upload
35
+ * byte-for-byte (HTTP 200, sp-devlp1 AC1): no commit was created,
36
+ * no CF Pages build was triggered.
37
+ */
38
+ export interface DeployBundleNothingToDeploy {
39
+ readonly outcome: "nothing-to-deploy";
40
+ readonly slug: string;
41
+ readonly head_sha: string;
42
+ readonly message: string;
43
+ readonly boundary_stripped?: readonly string[];
44
+ readonly standing_exceptions?: StandingExceptionsSummary;
13
45
  }
14
46
  /**
15
47
  * Response shape when the slug was never registered before and the
@@ -27,8 +59,8 @@ export interface DeployBundleProvisioningStarted {
27
59
  readonly appType: string;
28
60
  readonly message: string;
29
61
  }
30
- /** Either 202 success shape. */
31
- export type DeployBundleSuccess = DeployBundleAccepted | DeployBundleProvisioningStarted;
62
+ /** Any success shape (202 accepted / 202 provisioning / 200 no-op). */
63
+ export type DeployBundleSuccess = DeployBundleAccepted | DeployBundleProvisioningStarted | DeployBundleNothingToDeploy;
32
64
  /** Structured error shape from the bot on validation failure. */
33
65
  export interface DeployBundleError {
34
66
  readonly error: string;
@@ -1 +1 @@
1
- {"version":3,"file":"upload.d.ts","sourceRoot":"","sources":["../../src/bundle/upload.ts"],"names":[],"mappings":"AAaA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,cAAc,CAAC;AAE9C,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,kBAAkB,CAAC;AAgBvD;;;GAGG;AACH,MAAM,WAAW,oBAAoB;IACnC,QAAQ,CAAC,MAAM,EAAE,UAAU,CAAC;IAC5B,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;IACtB,QAAQ,CAAC,UAAU,EAAE,MAAM,CAAC;IAC5B,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;IACtB,QAAQ,CAAC,OAAO,EAAE,MAAM,CAAC;CAC1B;AAED;;;;;;;;GAQG;AACH,MAAM,WAAW,+BAA+B;IAC9C,QAAQ,CAAC,MAAM,EAAE,sBAAsB,CAAC;IACxC,QAAQ,CAAC,IAAI,EAAE,MAAM,CAA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