@m-kopa/launchpad-cli 0.32.1 → 0.33.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 +49 -0
- package/dist/cli.js +649 -5
- package/dist/commands/status.d.ts +24 -0
- package/dist/commands/status.d.ts.map +1 -1
- package/dist/commands/watch.d.ts +9 -0
- package/dist/commands/watch.d.ts.map +1 -0
- package/dist/dispatcher.d.ts.map +1 -1
- package/dist/version.d.ts +1 -1
- package/dist/watch/capabilities.d.ts +23 -0
- package/dist/watch/capabilities.d.ts.map +1 -0
- package/dist/watch/engine.d.ts +35 -0
- package/dist/watch/engine.d.ts.map +1 -0
- package/dist/watch/index.d.ts +19 -0
- package/dist/watch/index.d.ts.map +1 -0
- package/dist/watch/model.d.ts +69 -0
- package/dist/watch/model.d.ts.map +1 -0
- package/dist/watch/phases.d.ts +20 -0
- package/dist/watch/phases.d.ts.map +1 -0
- package/dist/watch/render.d.ts +55 -0
- package/dist/watch/render.d.ts.map +1 -0
- package/dist/watch/sanitize.d.ts +14 -0
- package/dist/watch/sanitize.d.ts.map +1 -0
- package/package.json +2 -1
- package/skills/launchpad-content-pr/SKILL.md +25 -13
- package/skills/launchpad-deploy/SKILL.md +8 -5
- package/skills/launchpad-deploy-status/SKILL.md +34 -5
- package/skills/launchpad-destroy/SKILL.md +1 -1
- package/skills/launchpad-identity/SKILL.md +1 -1
- package/skills/launchpad-onboard/SKILL.md +4 -4
- package/skills/launchpad-status/SKILL.md +3 -3
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { type CliConfig } from "../config.js";
|
|
1
2
|
import { type DeploymentStatusView, type StandingExceptionView } from "../deploy/deployment-status.js";
|
|
2
3
|
import { type Manifest } from "@m-kopa/launchpad-engine";
|
|
3
4
|
import type { Command } from "../dispatcher.js";
|
|
@@ -7,6 +8,24 @@ interface StatusArgs {
|
|
|
7
8
|
readonly file: string;
|
|
8
9
|
readonly json: boolean;
|
|
9
10
|
readonly strict: boolean;
|
|
11
|
+
/** `--watch`: delegate to the live `launchpad watch` renderer (sp-wtch7q). */
|
|
12
|
+
readonly watch: boolean;
|
|
13
|
+
}
|
|
14
|
+
/** The bot's `/apps/<slug>/lifecycle` response (sp-st5hw9) — mirrors the
|
|
15
|
+
* bot-side `LifecycleResponse`. Lets status show provisioning progress + a
|
|
16
|
+
* clear failed state instead of the misleading "no deployed manifest yet". */
|
|
17
|
+
interface LifecycleView {
|
|
18
|
+
readonly slug: string;
|
|
19
|
+
readonly state: "provisioning" | "live" | "failed" | "destroying" | "destroyed" | "destroy_failed";
|
|
20
|
+
readonly stage?: string;
|
|
21
|
+
readonly submissionId?: string;
|
|
22
|
+
readonly failedAt?: {
|
|
23
|
+
readonly stage: string;
|
|
24
|
+
readonly message: string;
|
|
25
|
+
readonly retryable: boolean;
|
|
26
|
+
};
|
|
27
|
+
readonly liveUrl?: string;
|
|
28
|
+
readonly lifecycleReason?: string;
|
|
10
29
|
}
|
|
11
30
|
/** What status reports, in machine-readable form for downstream
|
|
12
31
|
* consumers (M-1187 destroy, M-1189 update-skill). The lifecycle states
|
|
@@ -56,6 +75,11 @@ export interface StatusJsonOutput {
|
|
|
56
75
|
* Absent when the bot pre-dates the endpoint. */
|
|
57
76
|
readonly standingExceptions?: readonly StandingExceptionView[];
|
|
58
77
|
}
|
|
78
|
+
/** Fetch the app's provisioning lifecycle (sp-st5hw9). Returns null when the
|
|
79
|
+
* bot doesn't recognise the slug OR predates the endpoint — BOTH surface as a
|
|
80
|
+
* 404, so the caller degrades to the manifest-diff path (which raises a real
|
|
81
|
+
* not-found itself for a truly-unknown slug). Auth / forbidden propagate. */
|
|
82
|
+
export declare function fetchLifecycle(cfg: CliConfig, slug: string): Promise<LifecycleView | null>;
|
|
59
83
|
/**
|
|
60
84
|
* Compute drift over the v1 closed field set (AC5).
|
|
61
85
|
*
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"status.d.ts","sourceRoot":"","sources":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C;CAChE;AAED;;;8EAG8E;AAC9E,wBAAsB,cAAc,CAClC,GAAG,EAAE,SAAS,EACd,IAAI,EAAE,MAAM,GACX,OAAO,CAAC,aAAa,GAAG,IAAI,CAAC,CAO/B;AA4QD;;;;;;;;;GASG;AACH,wBAAgB,YAAY,CAC1B,KAAK,EAAE,QAAQ,EACf,QAAQ,EAAE,QAAQ,GACjB,aAAa,CAAC;IAAE,IAAI,EAAE,MAAM,CAAC;IAAC,KAAK,EAAE,OAAO,CAAC;IAAC,QAAQ,EAAE,OAAO,CAAA;CAAE,CAAC,CA2DpE;AAuRD;0BAC0B;AAC1B,wBAAgB,SAAS,CACvB,IAAI,EAAE,SAAS,MAAM,EAAE,EACvB,GAAG,GAAE,MAAsB,EAC3B,IAAI,CAAC,EAAE,CAAC,IAAI,EAAE,MAAM,KAAK,IAAI,GAC5B,UAAU,GAAG,MAAM,CA2ErB"}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import type { Command } from "../dispatcher.js";
|
|
2
|
+
/** Resolve the slug from args or the cwd, or return an error string. */
|
|
3
|
+
export declare function resolveWatchSlug(args: readonly string[], cwd: string, warn: (line: string) => void): {
|
|
4
|
+
slug: string;
|
|
5
|
+
} | {
|
|
6
|
+
error: string;
|
|
7
|
+
};
|
|
8
|
+
export declare const watchCommand: Command;
|
|
9
|
+
//# sourceMappingURL=watch.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"watch.d.ts","sourceRoot":"","sources":["../../src/commands/watch.ts"],"names":[],"mappings":"AAKA,OAAO,KAAK,EAAE,OAAO,EAAmB,MAAM,kBAAkB,CAAC;AAWjE,wEAAwE;AACxE,wBAAgB,gBAAgB,CAC9B,IAAI,EAAE,SAAS,MAAM,EAAE,EACvB,GAAG,EAAE,MAAM,EACX,IAAI,EAAE,CAAC,IAAI,EAAE,MAAM,KAAK,IAAI,GAC3B;IAAE,IAAI,EAAE,MAAM,CAAA;CAAE,GAAG;IAAE,KAAK,EAAE,MAAM,CAAA;CAAE,CA2BtC;AAYD,eAAO,MAAM,YAAY,EAAE,OAI1B,CAAC"}
|
package/dist/dispatcher.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"dispatcher.d.ts","sourceRoot":"","sources":["../src/dispatcher.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"dispatcher.d.ts","sourceRoot":"","sources":["../src/dispatcher.ts"],"names":[],"mappings":"AAoDA,MAAM,WAAW,KAAK;IACpB,sDAAsD;IACtD,QAAQ,CAAC,GAAG,EAAE,CAAC,IAAI,EAAE,MAAM,KAAK,IAAI,CAAC;IACrC,wCAAwC;IACxC,QAAQ,CAAC,GAAG,EAAE,CAAC,IAAI,EAAE,MAAM,KAAK,IAAI,CAAC;CACtC;AAED,MAAM,MAAM,QAAQ,GAAG,MAAM,CAAC;AAE9B,MAAM,WAAW,OAAO;IACtB,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;IACtB,QAAQ,CAAC,OAAO,EAAE,MAAM,CAAC;IACzB,QAAQ,CAAC,GAAG,EAAE,CAAC,IAAI,EAAE,SAAS,MAAM,EAAE,EAAE,EAAE,EAAE,KAAK,KAAK,OAAO,CAAC,QAAQ,CAAC,CAAC;IACxE;;;OAGG;IACH,QAAQ,CAAC,MAAM,CAAC,EAAE,OAAO,CAAC;CAC3B;AAED;;;;GAIG;AACH,eAAO,MAAM,QAAQ,EAAE,SAAS,OAAO,EAkCtC,CAAC;AAEF;;;GAGG;AACH,wBAAsB,QAAQ,CAC5B,IAAI,EAAE,SAAS,MAAM,EAAE,EACvB,EAAE,EAAE,KAAK,EACT,QAAQ,GAAE,SAAS,OAAO,EAAa,GACtC,OAAO,CAAC,QAAQ,CAAC,CAmBnB;AAED,wBAAgB,SAAS,CAAC,EAAE,EAAE,KAAK,EAAE,QAAQ,EAAE,SAAS,OAAO,EAAE,GAAG,IAAI,CAyBvE"}
|
package/dist/version.d.ts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export declare const CLI_VERSION = "0.
|
|
1
|
+
export declare const CLI_VERSION = "0.33.0";
|
|
2
2
|
//# sourceMappingURL=version.d.ts.map
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
export type RenderTier = "inline" | "ascii" | "append" | "plain";
|
|
2
|
+
export interface TerminalCaps {
|
|
3
|
+
readonly isTTY: boolean;
|
|
4
|
+
/** Cursor-control / VT escape sequences are safe to emit. */
|
|
5
|
+
readonly ansi: boolean;
|
|
6
|
+
/** Unicode box/braille glyphs render correctly. */
|
|
7
|
+
readonly unicode: boolean;
|
|
8
|
+
}
|
|
9
|
+
export interface ProbeEnv {
|
|
10
|
+
readonly platform: NodeJS.Platform;
|
|
11
|
+
readonly env: NodeJS.ProcessEnv;
|
|
12
|
+
readonly isTTY: boolean;
|
|
13
|
+
}
|
|
14
|
+
export declare function probeCapabilities(p: ProbeEnv): TerminalCaps;
|
|
15
|
+
export declare function selectTier(caps: TerminalCaps): RenderTier;
|
|
16
|
+
/** Convenience: probe the live process + pick a tier. */
|
|
17
|
+
export declare function detectTier(stream?: {
|
|
18
|
+
isTTY?: boolean;
|
|
19
|
+
}): {
|
|
20
|
+
caps: TerminalCaps;
|
|
21
|
+
tier: RenderTier;
|
|
22
|
+
};
|
|
23
|
+
//# sourceMappingURL=capabilities.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"capabilities.d.ts","sourceRoot":"","sources":["../../src/watch/capabilities.ts"],"names":[],"mappings":"AAaA,MAAM,MAAM,UAAU,GAAG,QAAQ,GAAG,OAAO,GAAG,QAAQ,GAAG,OAAO,CAAC;AAEjE,MAAM,WAAW,YAAY;IAC3B,QAAQ,CAAC,KAAK,EAAE,OAAO,CAAC;IACxB,6DAA6D;IAC7D,QAAQ,CAAC,IAAI,EAAE,OAAO,CAAC;IACvB,mDAAmD;IACnD,QAAQ,CAAC,OAAO,EAAE,OAAO,CAAC;CAC3B;AAED,MAAM,WAAW,QAAQ;IACvB,QAAQ,CAAC,QAAQ,EAAE,MAAM,CAAC,QAAQ,CAAC;IACnC,QAAQ,CAAC,GAAG,EAAE,MAAM,CAAC,UAAU,CAAC;IAChC,QAAQ,CAAC,KAAK,EAAE,OAAO,CAAC;CACzB;AAqBD,wBAAgB,iBAAiB,CAAC,CAAC,EAAE,QAAQ,GAAG,YAAY,CAsB3D;AAED,wBAAgB,UAAU,CAAC,IAAI,EAAE,YAAY,GAAG,UAAU,CAIzD;AAED,yDAAyD;AACzD,wBAAgB,UAAU,CAAC,MAAM,GAAE;IAAE,KAAK,CAAC,EAAE,OAAO,CAAA;CAAmB,GAAG;IACxE,IAAI,EAAE,YAAY,CAAC;IACnB,IAAI,EAAE,UAAU,CAAC;CAClB,CAOA"}
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
import { type LifecycleSnapshot, type WatchSnapshot } from "./model.js";
|
|
2
|
+
export type WatchOutcome = "live" | "failed" | "timeout" | "interrupted" | "not_found";
|
|
3
|
+
export interface WatchEngineDeps {
|
|
4
|
+
/** One poll. Resolves to the lifecycle, or null when the slug is
|
|
5
|
+
* unknown to the bot (terminal: nothing to watch). Throws on transient
|
|
6
|
+
* / network / 5xx errors (the loop backs off and retries). */
|
|
7
|
+
readonly fetchLifecycle: () => Promise<LifecycleSnapshot | null>;
|
|
8
|
+
readonly now: () => number;
|
|
9
|
+
/** Resolves after `ms`, or early if `signal` aborts. */
|
|
10
|
+
readonly sleep: (ms: number, signal: AbortSignal) => Promise<void>;
|
|
11
|
+
/** Aborts the watch (wired to SIGINT/SIGTERM by the caller). */
|
|
12
|
+
readonly signal: AbortSignal;
|
|
13
|
+
/** Called every poll with the latest snapshot (the live frame). */
|
|
14
|
+
readonly onTick: (snapshot: WatchSnapshot) => void;
|
|
15
|
+
/** Called once on a terminal state (live/failed) with the final frame. */
|
|
16
|
+
readonly onTerminal: (snapshot: WatchSnapshot) => void;
|
|
17
|
+
/** Non-fatal: a transient poll error the loop is retrying. */
|
|
18
|
+
readonly onPollError?: (error: unknown, nextRetryMs: number) => void;
|
|
19
|
+
}
|
|
20
|
+
export interface WatchEngineOptions {
|
|
21
|
+
readonly pollIntervalMs?: number;
|
|
22
|
+
readonly backoffFactor?: number;
|
|
23
|
+
readonly maxBackoffMs?: number;
|
|
24
|
+
readonly maxDurationMs?: number;
|
|
25
|
+
}
|
|
26
|
+
export interface WatchResult {
|
|
27
|
+
readonly outcome: WatchOutcome;
|
|
28
|
+
/** The last snapshot rendered (null only if the very first poll said
|
|
29
|
+
* the slug is unknown). */
|
|
30
|
+
readonly snapshot: WatchSnapshot | null;
|
|
31
|
+
}
|
|
32
|
+
export declare function runWatchLoop(slug: string, deps: WatchEngineDeps, options?: WatchEngineOptions): Promise<WatchResult>;
|
|
33
|
+
/** Real interruptible sleep (production). */
|
|
34
|
+
export declare function makeRealSleep(): (ms: number, signal: AbortSignal) => Promise<void>;
|
|
35
|
+
//# sourceMappingURL=engine.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"engine.d.ts","sourceRoot":"","sources":["../../src/watch/engine.ts"],"names":[],"mappings":"AAQA,OAAO,EAAc,KAAK,iBAAiB,EAAE,KAAK,aAAa,EAAE,MAAM,YAAY,CAAC;AAEpF,MAAM,MAAM,YAAY,GACpB,MAAM,GACN,QAAQ,GACR,SAAS,GACT,aAAa,GACb,WAAW,CAAC;AAEhB,MAAM,WAAW,eAAe;IAC9B;;mEAE+D;IAC/D,QAAQ,CAAC,cAAc,EAAE,MAAM,OAAO,CAAC,iBAAiB,GAAG,IAAI,CAAC,CAAC;IACjE,QAAQ,CAAC,GAAG,EAAE,MAAM,MAAM,CAAC;IAC3B,wDAAwD;IACxD,QAAQ,CAAC,KAAK,EAAE,CAAC,EAAE,EAAE,MAAM,EAAE,MAAM,EAAE,WAAW,KAAK,OAAO,CAAC,IAAI,CAAC,CAAC;IACnE,gEAAgE;IAChE,QAAQ,CAAC,MAAM,EAAE,WAAW,CAAC;IAC7B,mEAAmE;IACnE,QAAQ,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE,aAAa,KAAK,IAAI,CAAC;IACnD,0EAA0E;IAC1E,QAAQ,CAAC,UAAU,EAAE,CAAC,QAAQ,EAAE,aAAa,KAAK,IAAI,CAAC;IACvD,8DAA8D;IAC9D,QAAQ,CAAC,WAAW,CAAC,EAAE,CAAC,KAAK,EAAE,OAAO,EAAE,WAAW,EAAE,MAAM,KAAK,IAAI,CAAC;CACtE;AAED,MAAM,WAAW,kBAAkB;IACjC,QAAQ,CAAC,cAAc,CAAC,EAAE,MAAM,CAAC;IACjC,QAAQ,CAAC,aAAa,CAAC,EAAE,MAAM,CAAC;IAChC,QAAQ,CAAC,YAAY,CAAC,EAAE,MAAM,CAAC;IAC/B,QAAQ,CAAC,aAAa,CAAC,EAAE,MAAM,CAAC;CACjC;AASD,MAAM,WAAW,WAAW;IAC1B,QAAQ,CAAC,OAAO,EAAE,YAAY,CAAC;IAC/B;gCAC4B;IAC5B,QAAQ,CAAC,QAAQ,EAAE,aAAa,GAAG,IAAI,CAAC;CACzC;AAED,wBAAsB,YAAY,CAChC,IAAI,EAAE,MAAM,EACZ,IAAI,EAAE,eAAe,EACrB,OAAO,GAAE,kBAAuB,GAC/B,OAAO,CAAC,WAAW,CAAC,CA2CtB;AAED,6CAA6C;AAC7C,wBAAgB,aAAa,IAAI,CAAC,EAAE,EAAE,MAAM,EAAE,MAAM,EAAE,WAAW,KAAK,OAAO,CAAC,IAAI,CAAC,CAclF"}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import type { CliIo, ExitCode } from "../dispatcher.js";
|
|
2
|
+
import { type WatchEngineOptions } from "./engine.js";
|
|
3
|
+
export interface RunWatchDeps {
|
|
4
|
+
readonly now?: () => number;
|
|
5
|
+
readonly stdout?: {
|
|
6
|
+
isTTY?: boolean;
|
|
7
|
+
write: (s: string) => void;
|
|
8
|
+
};
|
|
9
|
+
/** Test seam for signal registration; defaults to process. */
|
|
10
|
+
readonly onSignal?: (handler: () => void) => () => void;
|
|
11
|
+
readonly engineOptions?: WatchEngineOptions;
|
|
12
|
+
}
|
|
13
|
+
/**
|
|
14
|
+
* Watch a slug provision to live. Returns an exit code:
|
|
15
|
+
* 0 live (or timed-out-but-still-going); 1 failed / not-found;
|
|
16
|
+
* 2 auth/transport; 130 interrupted (Ctrl-C).
|
|
17
|
+
*/
|
|
18
|
+
export declare function runWatch(slug: string, io: CliIo, deps?: RunWatchDeps): Promise<ExitCode>;
|
|
19
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/watch/index.ts"],"names":[],"mappings":"AAcA,OAAO,KAAK,EAAE,KAAK,EAAE,QAAQ,EAAE,MAAM,kBAAkB,CAAC;AAExD,OAAO,EAA+B,KAAK,kBAAkB,EAAE,MAAM,aAAa,CAAC;AA6CnF,MAAM,WAAW,YAAY;IAC3B,QAAQ,CAAC,GAAG,CAAC,EAAE,MAAM,MAAM,CAAC;IAC5B,QAAQ,CAAC,MAAM,CAAC,EAAE;QAAE,KAAK,CAAC,EAAE,OAAO,CAAC;QAAC,KAAK,EAAE,CAAC,CAAC,EAAE,MAAM,KAAK,IAAI,CAAA;KAAE,CAAC;IAClE,8DAA8D;IAC9D,QAAQ,CAAC,QAAQ,CAAC,EAAE,CAAC,OAAO,EAAE,MAAM,IAAI,KAAK,MAAM,IAAI,CAAC;IACxD,QAAQ,CAAC,aAAa,CAAC,EAAE,kBAAkB,CAAC;CAC7C;AAWD;;;;GAIG;AACH,wBAAsB,QAAQ,CAAC,IAAI,EAAE,MAAM,EAAE,EAAE,EAAE,KAAK,EAAE,IAAI,GAAE,YAAiB,GAAG,OAAO,CAAC,QAAQ,CAAC,CA2ElG"}
|
|
@@ -0,0 +1,69 @@
|
|
|
1
|
+
import { type PhaseName } from "./phases.js";
|
|
2
|
+
/** The subset of the bot's LifecycleView the watcher consumes. */
|
|
3
|
+
export interface LifecycleSnapshot {
|
|
4
|
+
readonly state: "provisioning" | "live" | "failed" | "destroying" | "destroyed" | "destroy_failed";
|
|
5
|
+
readonly stage?: string;
|
|
6
|
+
readonly failedAt?: {
|
|
7
|
+
readonly stage: string;
|
|
8
|
+
readonly message: string;
|
|
9
|
+
readonly retryable: boolean;
|
|
10
|
+
};
|
|
11
|
+
readonly liveUrl?: string;
|
|
12
|
+
}
|
|
13
|
+
export type PhaseStatus = "pending" | "active" | "done" | "failed";
|
|
14
|
+
export interface PhaseView {
|
|
15
|
+
readonly name: PhaseName;
|
|
16
|
+
readonly status: PhaseStatus;
|
|
17
|
+
/** Observed client-side elapsed for this phase, or null when unknown
|
|
18
|
+
* (the phase completed before the watch attached, or hasn't started). */
|
|
19
|
+
readonly elapsedMs: number | null;
|
|
20
|
+
}
|
|
21
|
+
export type Terminal = "live" | "failed" | null;
|
|
22
|
+
export interface WatchSnapshot {
|
|
23
|
+
readonly slug: string;
|
|
24
|
+
readonly phases: readonly PhaseView[];
|
|
25
|
+
readonly currentStage: string | null;
|
|
26
|
+
/** N in "stage N/15" (15 when live). */
|
|
27
|
+
readonly stageOrdinal: number | null;
|
|
28
|
+
readonly totalStages: number;
|
|
29
|
+
readonly terminal: Terminal;
|
|
30
|
+
readonly failure: {
|
|
31
|
+
readonly stage: string;
|
|
32
|
+
readonly message: string;
|
|
33
|
+
readonly retryable: boolean;
|
|
34
|
+
} | null;
|
|
35
|
+
readonly liveUrl: string | null;
|
|
36
|
+
readonly startedAtMs: number;
|
|
37
|
+
readonly elapsedTotalMs: number;
|
|
38
|
+
}
|
|
39
|
+
/**
|
|
40
|
+
* Accumulates lifecycle observations into a renderable snapshot. One
|
|
41
|
+
* instance per watch session; `ingest` is called once per poll tick.
|
|
42
|
+
*/
|
|
43
|
+
export declare class WatchModel {
|
|
44
|
+
private readonly slug;
|
|
45
|
+
private startedAtMs;
|
|
46
|
+
/** First time each stage was observed (client-side). */
|
|
47
|
+
private readonly stageFirstSeen;
|
|
48
|
+
/** Order in which stages were first observed. */
|
|
49
|
+
private readonly observedOrder;
|
|
50
|
+
private currentStage;
|
|
51
|
+
private terminal;
|
|
52
|
+
private failure;
|
|
53
|
+
private liveUrl;
|
|
54
|
+
constructor(slug: string);
|
|
55
|
+
/** Fold one poll result into the model. */
|
|
56
|
+
ingest(view: LifecycleSnapshot, nowMs: number): void;
|
|
57
|
+
/** True once a terminal (live/failed) state has been observed. */
|
|
58
|
+
isTerminal(): boolean;
|
|
59
|
+
/** Render the current snapshot as of `nowMs`. */
|
|
60
|
+
snapshot(nowMs: number): WatchSnapshot;
|
|
61
|
+
/**
|
|
62
|
+
* Observed elapsed for a phase: from the first observed stage in the
|
|
63
|
+
* phase to the first observed stage of a LATER phase (or `nowMs` if the
|
|
64
|
+
* phase is still the active one). null when we never observed the
|
|
65
|
+
* phase's start (it completed before the watch attached).
|
|
66
|
+
*/
|
|
67
|
+
private phaseElapsed;
|
|
68
|
+
}
|
|
69
|
+
//# sourceMappingURL=model.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"model.d.ts","sourceRoot":"","sources":["../../src/watch/model.ts"],"names":[],"mappings":"AAWA,OAAO,EAEL,KAAK,SAAS,EAKf,MAAM,aAAa,CAAC;AAErB,kEAAkE;AAClE,MAAM,WAAW,iBAAiB;IAChC,QAAQ,CAAC,KAAK,EACV,cAAc,GACd,MAAM,GACN,QAAQ,GACR,YAAY,GACZ,WAAW,GACX,gBAAgB,CAAC;IACrB,QAAQ,CAAC,KAAK,CAAC,EAAE,MAAM,CAAC;IACxB,QAAQ,CAAC,QAAQ,CAAC,EAAE;QAClB,QAAQ,CAAC,KAAK,EAAE,MAAM,CAAC;QACvB,QAAQ,CAAC,OAAO,EAAE,MAAM,CAAC;QACzB,QAAQ,CAAC,SAAS,EAAE,OAAO,CAAC;KAC7B,CAAC;IACF,QAAQ,CAAC,OAAO,CAAC,EAAE,MAAM,CAAC;CAC3B;A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;IAC9C,OAAO,CAAC,YAAY,CAAuB;IAC3C,OAAO,CAAC,QAAQ,CAAkB;IAClC,OAAO,CAAC,OAAO,CAA8C;IAC7D,OAAO,CAAC,OAAO,CAAuB;gBAET,IAAI,EAAE,MAAM;IAEzC,2CAA2C;IAC3C,MAAM,CAAC,IAAI,EAAE,iBAAiB,EAAE,KAAK,EAAE,MAAM,GAAG,IAAI;IAmBpD,kEAAkE;IAClE,UAAU,IAAI,OAAO;IAIrB,iDAAiD;IACjD,QAAQ,CAAC,KAAK,EAAE,MAAM,GAAG,aAAa;IAsDtC;;;;;OAKG;IACH,OAAO,CAAC,YAAY;CA4BrB"}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
/** The six phases, in display order. */
|
|
2
|
+
export declare const PHASE_NAMES: readonly ["Repo", "Build", "Infra", "Certificate", "Access", "Verify"];
|
|
3
|
+
export type PhaseName = (typeof PHASE_NAMES)[number];
|
|
4
|
+
/**
|
|
5
|
+
* The 15 working stages in happy-path order. `done` is terminal and is
|
|
6
|
+
* NOT a working stage — reaching it means the Verify phase is complete
|
|
7
|
+
* (the app is live). `stage N/15` uses a stage's index in this array.
|
|
8
|
+
*/
|
|
9
|
+
export declare const STAGE_ORDER: readonly ["pending", "repo_created", "bootstrap_pr_opened", "bootstrap_pr_merged", "content_seeded", "tf_pr_opened", "tf_pr_merged", "tf_applied", "cert_active", "policy_attached", "tf_env_pr_opened", "tf_env_pr_merged", "tf_env_applied", "ready_for_content", "deployment_verified"];
|
|
10
|
+
export declare const TOTAL_STAGES: 15;
|
|
11
|
+
/** 1-based ordinal of a working stage, or null if not a working stage. */
|
|
12
|
+
export declare function ordinalOfStage(stage: string): number | null;
|
|
13
|
+
/**
|
|
14
|
+
* The phase a stage belongs to. Returns null for an unrecognised stage
|
|
15
|
+
* (the model then keeps the last-known active phase rather than guessing).
|
|
16
|
+
*/
|
|
17
|
+
export declare function phaseOfStage(stage: string): PhaseName | null;
|
|
18
|
+
/** Index of a phase in PHASE_NAMES (display/ordering), or -1. */
|
|
19
|
+
export declare function phaseIndex(phase: PhaseName): number;
|
|
20
|
+
//# sourceMappingURL=phases.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"phases.d.ts","sourceRoot":"","sources":["../../src/watch/phases.ts"],"names":[],"mappings":"AAWA,wCAAwC;AACxC,eAAO,MAAM,WAAW,wEAOd,CAAC;AAEX,MAAM,MAAM,SAAS,GAAG,CAAC,OAAO,WAAW,CAAC,CAAC,MAAM,CAAC,CAAC;AAErD;;;;GAIG;AACH,eAAO,MAAM,WAAW,4RAgBd,CAAC;AAEX,eAAO,MAAM,YAAY,IAAqB,CAAC;AAmC/C,0EAA0E;AAC1E,wBAAgB,cAAc,CAAC,KAAK,EAAE,MAAM,GAAG,MAAM,GAAG,IAAI,CAG3D;AAED;;;GAGG;AACH,wBAAgB,YAAY,CAAC,KAAK,EAAE,MAAM,GAAG,SAAS,GAAG,IAAI,CAE5D;AAED,iEAAiE;AACjE,wBAAgB,UAAU,CAAC,KAAK,EAAE,SAAS,GAAG,MAAM,CAEnD"}
|
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
import type { RenderTier } from "./capabilities.js";
|
|
2
|
+
import type { WatchSnapshot } from "./model.js";
|
|
3
|
+
type GlyphStyle = "unicode" | "ascii";
|
|
4
|
+
export declare const CURSOR_HIDE = "\u001B[?25l";
|
|
5
|
+
export declare const CURSOR_SHOW = "\u001B[?25h";
|
|
6
|
+
export declare function styleForTier(tier: RenderTier): GlyphStyle;
|
|
7
|
+
export declare function launchpadUrl(slug: string): string;
|
|
8
|
+
/** ms → "M:SS" (or `dash` when unknown/null). */
|
|
9
|
+
export declare function formatDuration(ms: number | null, dash?: string): string;
|
|
10
|
+
/** The live provisioning frame (multi-line) for inline/ascii tiers. */
|
|
11
|
+
export declare function renderProvisioningFrame(s: WatchSnapshot, opts: {
|
|
12
|
+
style: GlyphStyle;
|
|
13
|
+
spinnerFrame: number;
|
|
14
|
+
}): string;
|
|
15
|
+
/** One-line compact update for the append-only tier. */
|
|
16
|
+
export declare function renderAppendLine(s: WatchSnapshot, opts: {
|
|
17
|
+
style: GlyphStyle;
|
|
18
|
+
spinnerFrame: number;
|
|
19
|
+
}): string;
|
|
20
|
+
/**
|
|
21
|
+
* Plain, ASCII-only, escape-free line for the non-TTY tier (pipes / CI).
|
|
22
|
+
* Mirrors the existing `launchpad status` one-liner style so piped output
|
|
23
|
+
* stays familiar and never carries control sequences.
|
|
24
|
+
*/
|
|
25
|
+
export declare function renderPlainLine(s: WatchSnapshot): string;
|
|
26
|
+
/** Final LIVE frame. */
|
|
27
|
+
export declare function renderLiveFrame(s: WatchSnapshot, opts: {
|
|
28
|
+
style: GlyphStyle;
|
|
29
|
+
}): string;
|
|
30
|
+
/** Final FAILED frame. */
|
|
31
|
+
export declare function renderFailedFrame(s: WatchSnapshot, opts: {
|
|
32
|
+
style: GlyphStyle;
|
|
33
|
+
}): string;
|
|
34
|
+
/**
|
|
35
|
+
* Owns the cursor mechanics for the redraw tiers. `write` receives raw
|
|
36
|
+
* strings (the renderer's own trusted ANSI + already-sanitised content).
|
|
37
|
+
*/
|
|
38
|
+
export declare class Renderer {
|
|
39
|
+
private readonly write;
|
|
40
|
+
private readonly tier;
|
|
41
|
+
private prevLines;
|
|
42
|
+
private spinnerFrame;
|
|
43
|
+
private cursorHidden;
|
|
44
|
+
private readonly style;
|
|
45
|
+
constructor(write: (s: string) => void, tier: RenderTier);
|
|
46
|
+
/** Per-poll live frame. No-op for the plain tier (caller handles it). */
|
|
47
|
+
tick(s: WatchSnapshot): void;
|
|
48
|
+
/** Final frame; settles the view (no spinner) and restores the cursor. */
|
|
49
|
+
terminal(s: WatchSnapshot): void;
|
|
50
|
+
/** Restore the terminal on any exit path (also called from signal handlers). */
|
|
51
|
+
restoreCursor(): void;
|
|
52
|
+
private redraw;
|
|
53
|
+
}
|
|
54
|
+
export {};
|
|
55
|
+
//# sourceMappingURL=render.d.ts.map
|
|
@@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,CAiBvF;AAED;;;GAGG;AACH,qBAAa,QAAQ;IAOjB,OAAO,CAAC,QAAQ,CAAC,KAAK;IACtB,OAAO,CAAC,QAAQ,CAAC,IAAI;IAPvB,OAAO,CAAC,SAAS,CAAK;IACtB,OAAO,CAAC,YAAY,CAAK;IACzB,OAAO,CAAC,YAAY,CAAS;IAC7B,OAAO,CAAC,QAAQ,CAAC,KAAK,CAAa;gBAGhB,KAAK,EAAE,CAAC,CAAC,EAAE,MAAM,KAAK,IAAI,EAC1B,IAAI,EAAE,UAAU;IAKnC,yEAAyE;IACzE,IAAI,CAAC,CAAC,EAAE,aAAa,GAAG,IAAI;IAc5B,0EAA0E;IAC1E,QAAQ,CAAC,CAAC,EAAE,aAAa,GAAG,IAAI;IAchC,gFAAgF;IAChF,aAAa,IAAI,IAAI;IAOrB,OAAO,CAAC,MAAM;CAKf"}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Strip all control characters from an untrusted string so nothing it
|
|
3
|
+
* contains can be interpreted as a terminal control sequence. Printable
|
|
4
|
+
* text (incl. full Unicode) is preserved; an ESC that would introduce a
|
|
5
|
+
* CSI/OSC sequence is removed, so the rest renders as inert literal text.
|
|
6
|
+
*/
|
|
7
|
+
export declare function sanitizeForTerminal(input: string): string;
|
|
8
|
+
/**
|
|
9
|
+
* Sanitise + bound a value to a single line of at most `max` glyphs, so a
|
|
10
|
+
* pathologically long bot string can't blow the layout. Adds an ellipsis
|
|
11
|
+
* when truncated.
|
|
12
|
+
*/
|
|
13
|
+
export declare function sanitizeField(input: string | null | undefined, max?: number): string;
|
|
14
|
+
//# sourceMappingURL=sanitize.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"sanitize.d.ts","sourceRoot":"","sources":["../../src/watch/sanitize.ts"],"names":[],"mappings":"AAkBA;;;;;GAKG;AACH,wBAAgB,mBAAmB,CAAC,KAAK,EAAE,MAAM,GAAG,MAAM,CAOzD;AAED;;;;GAIG;AACH,wBAAgB,aAAa,CAAC,KAAK,EAAE,MAAM,GAAG,IAAI,GAAG,SAAS,EAAE,GAAG,SAAM,GAAG,MAAM,CAKjF"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@m-kopa/launchpad-cli",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.33.0",
|
|
4
4
|
"description": "Launchpad CLI — clone / deploy / review / merge against Launchpad-managed apps. Talks to the portal-bot endpoints (SCOPE-M-760 / T4).",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"bin": {
|
|
@@ -50,6 +50,7 @@
|
|
|
50
50
|
"lint": "eslint src tests",
|
|
51
51
|
"typecheck": "tsc --noEmit",
|
|
52
52
|
"check:version-sync": "bash scripts/check-version-sync.sh",
|
|
53
|
+
"check:runtime-deps": "node scripts/check-runtime-deps.mjs",
|
|
53
54
|
"check:installer-syntax": "bash scripts/check-installer-syntax.sh",
|
|
54
55
|
"check:skill-contract": "bash scripts/sync-skill-contract.sh --check",
|
|
55
56
|
"check:skill-bash-dialect": "bash scripts/check-skill-bash-dialect.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 and 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.33.0
|
|
5
5
|
---
|
|
6
6
|
|
|
7
7
|
<!-- BEGIN shell-contract (managed by scripts/sync-skill-contract.sh — edit skills/_partials/shell-contract.md) -->
|
|
@@ -96,11 +96,17 @@ What happens:
|
|
|
96
96
|
the bundle **directly to `main`** on `launchpad-app-<slug>` via
|
|
97
97
|
the Git Data API — you are the commit author, the bot is the
|
|
98
98
|
committer. No PR, no merge step.
|
|
99
|
-
- The CLI
|
|
100
|
-
committed as <sha>`, then "Committed; build pending".
|
|
101
|
-
**
|
|
102
|
-
|
|
103
|
-
the
|
|
99
|
+
- The CLI prints the bot's 202 ack — `✓ Bundle accepted —
|
|
100
|
+
committed as <sha>`, then "Committed; build pending". By default it
|
|
101
|
+
then **waits for the Pages build and verifies it** (up to ~180s):
|
|
102
|
+
it byte-compares the served entrypoint against what you shipped and
|
|
103
|
+
prints `✓ Verified — the live deployment serves exactly what you
|
|
104
|
+
shipped`, or exits non-zero if the build fails or the served bytes
|
|
105
|
+
don't match (sp-dplvfy). Tune with `--verify-timeout=<secs>`, or skip
|
|
106
|
+
it with `--no-verify` (commit only, return immediately). When verify
|
|
107
|
+
is skipped or times out (`pending`), the commit landed but the build
|
|
108
|
+
is still async and can fail afterwards — confirm with
|
|
109
|
+
`launchpad status`.
|
|
104
110
|
|
|
105
111
|
Flags worth knowing:
|
|
106
112
|
|
|
@@ -117,11 +123,15 @@ Flags worth knowing:
|
|
|
117
123
|
Exit codes:
|
|
118
124
|
|
|
119
125
|
- **0** — bundle accepted and committed (or "nothing to deploy"
|
|
120
|
-
when `main` already matches the bundle)
|
|
121
|
-
|
|
126
|
+
when `main` already matches the bundle), **and** default in-line
|
|
127
|
+
verification confirmed the live deployment serves it. With
|
|
128
|
+
`--no-verify`, or if verification times out at `pending`, exit 0
|
|
129
|
+
means only that the commit landed — confirm with `launchpad status`.
|
|
122
130
|
- **non-zero** — gate rejections are rendered with per-file detail
|
|
123
|
-
on stderr; fix the bundle and re-run.
|
|
124
|
-
|
|
131
|
+
on stderr; fix the bundle and re-run. A build failure or a
|
|
132
|
+
served-content mismatch caught by default verification also exits
|
|
133
|
+
non-zero. For provisioning-phase failures see
|
|
134
|
+
`/launchpad-deploy-status <slug>`.
|
|
125
135
|
|
|
126
136
|
## What the bot enforces on every bundle
|
|
127
137
|
|
|
@@ -263,9 +273,11 @@ Once you've shipped first content, the daily-use verbs are:
|
|
|
263
273
|
hand-rolled change bypasses the bundle policy, secret-scan,
|
|
264
274
|
build-command gates, and the standing-exception ledger. Use
|
|
265
275
|
`launchpad deploy`.
|
|
266
|
-
- Do **not** treat exit 0 from `launchpad deploy`
|
|
267
|
-
|
|
268
|
-
|
|
276
|
+
- Do **not** treat exit 0 from `launchpad deploy --no-verify` (or a
|
|
277
|
+
run whose verification timed out at `pending`) as "live". The commit
|
|
278
|
+
landed, but the build is still async and can fail afterwards —
|
|
279
|
+
verify with `launchpad status`. A default deploy (verification on)
|
|
280
|
+
already byte-checks the served content before exiting 0.
|
|
269
281
|
- Do **not** re-implement the server-side gates locally.
|
|
270
282
|
`launchpad validate` plus the CLI's own app-boundary pre-flight
|
|
271
283
|
cover the local half; the bot enforces the rest server-side and
|
|
@@ -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.33.0
|
|
5
5
|
---
|
|
6
6
|
|
|
7
7
|
<!-- BEGIN shell-contract (managed by scripts/sync-skill-contract.sh — edit skills/_partials/shell-contract.md) -->
|
|
@@ -271,8 +271,10 @@ fresh slug auto-provisions:
|
|
|
271
271
|
5–10 minutes. **Your bundle ships with the provisioning run** — when
|
|
272
272
|
lifecycle reaches `live`, this deploy's content is what's serving.
|
|
273
273
|
**No second deploy needed**; re-deploying is only for the rare case
|
|
274
|
-
where the app comes up live *without* your content. Watch
|
|
275
|
-
`launchpad
|
|
274
|
+
where the app comes up live *without* your content. **Watch it go
|
|
275
|
+
live in real time with `launchpad watch <slug>`** (a self-updating
|
|
276
|
+
view of the provisioning pipeline that exits when the app is live or
|
|
277
|
+
failed); `launchpad status <slug>` is the one-shot equivalent.
|
|
276
278
|
- **Subsequent deploys** (slug already live): the bot extracts the
|
|
277
279
|
tarball, runs the ingest gates (see below), commits the bundle
|
|
278
280
|
straight onto `main` of `launchpad-app-<slug>` via the GitHub App
|
|
@@ -314,8 +316,9 @@ re-trying.
|
|
|
314
316
|
|
|
315
317
|
The CLI exits as soon as the bot acknowledges the upload (202). For
|
|
316
318
|
subsequent deploys it prints the commit short-SHA + repo; for first
|
|
317
|
-
deploys it prints provisioning guidance.
|
|
318
|
-
|
|
319
|
+
deploys it prints provisioning guidance. Run `launchpad watch <slug>`
|
|
320
|
+
to watch lifecycle progress live to its terminal state (or
|
|
321
|
+
`launchpad status <slug>` for a one-shot check).
|
|
319
322
|
|
|
320
323
|
Flags — there is nothing useful to pass on the Model A path:
|
|
321
324
|
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: launchpad-deploy-status
|
|
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)
|
|
4
|
-
version: 0.
|
|
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.33.0
|
|
5
5
|
---
|
|
6
6
|
|
|
7
7
|
<!-- BEGIN shell-contract (managed by scripts/sync-skill-contract.sh — edit skills/_partials/shell-contract.md) -->
|
|
@@ -56,6 +56,7 @@ inference source resolves.
|
|
|
56
56
|
|
|
57
57
|
| Question | Verb |
|
|
58
58
|
|---|---|
|
|
59
|
+
| Watch a first deploy provision to live in real time | `launchpad watch <slug>` — see § Watch below |
|
|
59
60
|
| Is my local manifest in sync with what's deployed? | `launchpad status <slug>` |
|
|
60
61
|
| What lifecycle bucket is the app in? | `launchpad apps` |
|
|
61
62
|
| What was actually deployed? | `launchpad pull <slug>` |
|
|
@@ -63,8 +64,34 @@ inference source resolves.
|
|
|
63
64
|
| What broke the most recent deploy? | `launchpad status <slug> --json` + the bot's PR check trail |
|
|
64
65
|
| It says `failed` but the app is live in a browser | `launchpad recover <slug>` — see § Recover below |
|
|
65
66
|
|
|
66
|
-
The Model A default is `launchpad status <slug
|
|
67
|
-
|
|
67
|
+
The Model A default is `launchpad status <slug>` (a one-shot read).
|
|
68
|
+
For an in-flight first deploy, `launchpad watch <slug>` is the live
|
|
69
|
+
view. The other verbs are specialisations.
|
|
70
|
+
|
|
71
|
+
## Watch — live provisioning (`launchpad watch`)
|
|
72
|
+
|
|
73
|
+
For a first deploy still provisioning, `launchpad watch <slug>` (alias:
|
|
74
|
+
`launchpad status <slug> --watch`) renders the pipeline live and updates
|
|
75
|
+
in place until the app is **live** or **failed** — no manual re-running:
|
|
76
|
+
|
|
77
|
+
```bash
|
|
78
|
+
launchpad watch <slug>
|
|
79
|
+
```
|
|
80
|
+
|
|
81
|
+
- The 15 workflow stages are grouped into six phases (Repo · Build ·
|
|
82
|
+
Infra · Certificate · Access · Verify) with a spinner on the active
|
|
83
|
+
phase and a `stage N/15` counter. Slug inference matches
|
|
84
|
+
`launchpad status` (manifest slug, then the `launchpad-app-<slug>/`
|
|
85
|
+
dirname).
|
|
86
|
+
- On **live** it settles to a final frame with the app URL; on
|
|
87
|
+
**failed** it shows the failing stage, the reason, and the exact
|
|
88
|
+
recovery command (`launchpad deploy --resume <slug>`, or
|
|
89
|
+
`launchpad recover <slug>` for a terminal-failed-but-live record —
|
|
90
|
+
see § Recover). Exit `0` live, `1` failed, `130` on `Ctrl-C`.
|
|
91
|
+
- `Ctrl-C` stops **watching** only — it never affects provisioning.
|
|
92
|
+
- It adapts to the terminal (full glyphs → ASCII → plain when piped/CI),
|
|
93
|
+
so it is safe to run anywhere. It is **read-only** — it polls the same
|
|
94
|
+
lifecycle `launchpad status` reads, and makes no change.
|
|
68
95
|
|
|
69
96
|
## Standard (Model A) status
|
|
70
97
|
|
|
@@ -77,6 +104,8 @@ the canonical reference). Lifecycle-shaped states:
|
|
|
77
104
|
|
|
78
105
|
- **`provisioning`** — first deploy still in flight. The live
|
|
79
106
|
workflow stage is shown inline (`stage: …`); see § Stage taxonomy.
|
|
107
|
+
To watch it advance to its terminal state live, use
|
|
108
|
+
`launchpad watch <slug>` (§ Watch).
|
|
80
109
|
- **`provisioning_failed`** — provisioning failed; the failing stage
|
|
81
110
|
and reason are shown inline. If the app is actually live, see
|
|
82
111
|
§ Recover.
|
|
@@ -90,7 +119,7 @@ Live-app states:
|
|
|
90
119
|
- **`drift: <field list>`** — local and deployed differ on at least
|
|
91
120
|
one v1 closed-set field (`metadata.name`, `metadata.team`,
|
|
92
121
|
`metadata.owner`, `metadata.description`, `deployment.type`,
|
|
93
|
-
`access.
|
|
122
|
+
`access.allowed_entra_groups`, `hostnames[0]`, `build.command`,
|
|
94
123
|
`build.destination_dir`, `build.root_dir`, `production_env.*`).
|
|
95
124
|
Run `launchpad deploy` to roll the local manifest out.
|
|
96
125
|
- **`live_no_content`** — provisioned, but no content deployed yet.
|
|
@@ -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.
|
|
4
|
+
version: 0.33.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-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 a Pages Function, 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.33.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.33.0
|
|
5
5
|
---
|
|
6
6
|
|
|
7
7
|
<!-- BEGIN shell-contract (managed by scripts/sync-skill-contract.sh — edit skills/_partials/shell-contract.md) -->
|
|
@@ -39,9 +39,9 @@ a copy-pasteable fix for any red row.
|
|
|
39
39
|
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
|
-
`/launchpad-content-pr`, `/launchpad-status`, `/launchpad-destroy
|
|
43
|
-
assume the machine is already onboarded and fail
|
|
44
|
-
missing — pointing back here.
|
|
42
|
+
`/launchpad-content-pr`, `/launchpad-status`, `/launchpad-destroy`,
|
|
43
|
+
`/launchpad-identity`) assume the machine is already onboarded and fail
|
|
44
|
+
loudly if a prereq is missing — pointing back here.
|
|
45
45
|
|
|
46
46
|
## Zero non-Launchpad dependencies
|
|
47
47
|
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: launchpad-status
|
|
3
3
|
description: Show whether a Launchpad app's local launchpad.yaml matches what's deployed, and read the deployed manifest. Wraps `launchpad pull` (fetch deployed YAML) and `launchpad status` (drift report). Use when someone says "is my app in sync", "what's deployed", "show drift", "/launchpad-status", "/launchpad-pull", or after `launchpad deploy` to verify the change landed.
|
|
4
|
-
version: 0.
|
|
4
|
+
version: 0.33.0
|
|
5
5
|
---
|
|
6
6
|
|
|
7
7
|
<!-- BEGIN shell-contract (managed by scripts/sync-skill-contract.sh — edit skills/_partials/shell-contract.md) -->
|
|
@@ -132,7 +132,7 @@ union of states, not just a drift verdict. The drift pair:
|
|
|
132
132
|
one field in the v1 closed set:
|
|
133
133
|
`metadata.name`, `metadata.team`, `metadata.owner`,
|
|
134
134
|
`metadata.description`, `deployment.type`,
|
|
135
|
-
`access.
|
|
135
|
+
`access.allowed_entra_groups`, `hostnames[0]`, `build.command`,
|
|
136
136
|
`build.destination_dir`, `build.root_dir`, `production_env.*`.
|
|
137
137
|
|
|
138
138
|
The lifecycle states (rendered without needing a local manifest):
|
|
@@ -328,7 +328,7 @@ edge-auth + cert re-issuance — the gateway hostname/cert for an
|
|
|
328
328
|
`auth: gateway` app, or the Cf Access app for an `auth: access` one —
|
|
329
329
|
which the bot handles.)
|
|
330
330
|
|
|
331
|
-
### "drift: access.
|
|
331
|
+
### "drift: access.allowed_entra_groups"
|
|
332
332
|
|
|
333
333
|
Group binding changed in your local manifest. This is the
|
|
334
334
|
**load-bearing** drift — it controls who can access the app. After
|