@m-kopa/launchpad-cli 0.34.1 → 0.37.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 CHANGED
@@ -6,6 +6,44 @@ 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.37.0 — 2026-06-18
10
+
11
+ Feature (sp-grnted Phase 2, ADR 0028): **grant editors by email**, plus a
12
+ `list-editors` verb.
13
+
14
+ - `grant-editor` / `revoke-editor` now accept a **work email** as well as an id
15
+ (`launchpad grant-editor <slug> alice@m-kopa.com`). The email is resolved to
16
+ the recipient's Entra id via the bot's new `/users/resolve` endpoint — a
17
+ bounded, exact-match lookup within the platform's **existing** directory
18
+ consent (no new Graph permission). Members only: ambiguous emails are refused
19
+ (pass an id instead) and guest/external accounts are rejected.
20
+ - New `launchpad list-editors <slug>` — shows who has editor (BUILD) access.
21
+ - Both verbs now surface that **editor = BUILD rights (clone + deploy)** and that
22
+ browser VIEW access to the running app is a separate Entra-group grant from IT.
23
+
24
+ > Requires the portal-bot deploy that ships `/users/resolve`; until then the
25
+ > email path returns a clear resolver error. The id path is unaffected.
26
+
27
+ ## 0.36.0 — 2026-06-18
28
+
29
+ Feature (sp-rpt9kd, ADR 0029): **`launchpad bug` / `launchpad feature`** — file a
30
+ bug report or feature request straight from the CLI.
31
+
32
+ - Lands as a Linear issue in the team's dedicated inbox (the AIOps
33
+ "Launchpad - Bugs/Features" project), tagged `kind:bug`/`kind:feature`,
34
+ attributed to you. Bot-brokered — the CLI never holds a Linear credential.
35
+ - Non-interactive (`--title`/`--message` or a positional message) so the AI can
36
+ drive it; a TTY prompts for what's missing. `--json` returns `{ identifier, url }`.
37
+ - **Seat-independent acknowledgement** (you get a reference even without a Linear
38
+ seat), **duplicate collapsing**, and **fail-soft** (prints your report back if
39
+ the tracker is unreachable).
40
+ - A small, fixed, non-sensitive context is attached (CLI version, OS, last command
41
+ **name + exit code — never its arguments**, app slug). Server-side rate-limiting
42
+ + cross-reporter dedupe guard against floods.
43
+
44
+ > Requires the portal-bot deploy that ships `POST /reports` + the `ReportRateLimit`
45
+ > DO migration; until then the verbs fail soft.
46
+
9
47
  ## 0.34.1 — 2026-06-18
10
48
 
11
49
  Fix (sp-pvf8r2, Bundle A): `launchpad watch` now shows the **real** provisioning
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.34.1";
22
+ var CLI_VERSION = "0.37.0";
23
23
 
24
24
  // src/config.ts
25
25
  import * as os from "node:os";
@@ -11304,6 +11304,7 @@ var BUNDLED_SKILLS = [
11304
11304
  "launchpad-status",
11305
11305
  "launchpad-destroy",
11306
11306
  "launchpad-identity",
11307
+ "launchpad-report",
11307
11308
  "marquee-share"
11308
11309
  ];
11309
11310
  function isBundleManaged(name) {
@@ -12421,8 +12422,9 @@ async function runEditor(action, args, io, deps) {
12421
12422
  const verb = action === "grant" ? "grant-editor" : "revoke-editor";
12422
12423
  const parsed = parseArgs14(args);
12423
12424
  if (parsed === null) {
12424
- io.err(`usage: launchpad ${verb} <slug> <id> [--yes] [--json]`);
12425
- io.err(" <id> is the recipient's value from `launchpad whoami --share`.");
12425
+ io.err(`usage: launchpad ${verb} <slug> <id|email> [--yes] [--json]`);
12426
+ io.err(" <id> is the recipient's value from `launchpad whoami --share`,");
12427
+ io.err(" or pass their @-email and it is resolved to their id.");
12426
12428
  return 64;
12427
12429
  }
12428
12430
  const { slug, target, yes, json } = parsed;
@@ -12432,15 +12434,21 @@ async function runEditor(action, args, io, deps) {
12432
12434
  }
12433
12435
  try {
12434
12436
  const cfg = deps.loadConfig();
12437
+ const resolved = await resolveTarget(verb, target, cfg, deps, io);
12438
+ if (resolved.kind === "error")
12439
+ return resolved.exit;
12440
+ const editorId = resolved.id;
12441
+ const label = resolved.label;
12435
12442
  const current = await deps.apiJson(cfg, {
12436
12443
  path: `/apps/${slug}`
12437
12444
  });
12438
- const alreadyEditor = current.record.editors.includes(target);
12445
+ const alreadyEditor = current.record.editors.includes(editorId);
12439
12446
  if (!yes) {
12440
12447
  const noop = action === "grant" && alreadyEditor || action === "revoke" && !alreadyEditor;
12448
+ const subject = resolved.resolvedFromEmail ? `${label} (id ${editorId})` : label;
12441
12449
  io.out(action === "grant" ? `About to grant editor access on "${slug}" to:
12442
- ${target}` : `About to revoke editor access on "${slug}" from:
12443
- ${target}`);
12450
+ ${subject}` : `About to revoke editor access on "${slug}" from:
12451
+ ${subject}`);
12444
12452
  if (noop) {
12445
12453
  io.out(action === "grant" ? " (already an editor — this will be a no-op)" : " (not currently an editor — this will be a no-op)");
12446
12454
  }
@@ -12450,7 +12458,7 @@ async function runEditor(action, args, io, deps) {
12450
12458
  return 0;
12451
12459
  }
12452
12460
  }
12453
- const result = await mutateWithRetry(action, slug, target, current.record.version, cfg, deps);
12461
+ const result = await mutateWithRetry(action, slug, editorId, current.record.version, cfg, deps);
12454
12462
  if (result.kind === "conflict") {
12455
12463
  io.err(`launchpad ${verb}: the app record for "${slug}" changed during the ${action} — re-run \`launchpad ${verb} ${slug} ${target}\`.`);
12456
12464
  return CONFLICT_EXIT;
@@ -12461,16 +12469,21 @@ async function runEditor(action, args, io, deps) {
12461
12469
  ok: true,
12462
12470
  slug,
12463
12471
  action,
12464
- editor: target,
12472
+ editor: editorId,
12473
+ input: target,
12465
12474
  changed,
12466
12475
  editors: result.record.editors
12467
12476
  }));
12468
12477
  return 0;
12469
12478
  }
12470
12479
  if (!changed) {
12471
- io.out(action === "grant" ? `${target} was already an editor on "${slug}" — no change.` : `${target} was not an editor on "${slug}" — no change.`);
12480
+ io.out(action === "grant" ? `${label} was already an editor on "${slug}" — no change.` : `${label} was not an editor on "${slug}" — no change.`);
12472
12481
  } else {
12473
- io.out(action === "grant" ? `✓ ${target} is now an editor on "${slug}".` : `✓ ${target} is no longer an editor on "${slug}".`);
12482
+ io.out(action === "grant" ? `✓ ${label} is now an editor on "${slug}".` : `✓ ${label} is no longer an editor on "${slug}".`);
12483
+ }
12484
+ if (action === "grant") {
12485
+ io.out(" Note: editor access = BUILD rights (clone + deploy). Opening the");
12486
+ io.out(" running app in a browser is a separate Entra-group grant from IT.");
12474
12487
  }
12475
12488
  return 0;
12476
12489
  } catch (e) {
@@ -12523,9 +12536,109 @@ async function sendMutation(action, slug, target, version, cfg, deps) {
12523
12536
  function describe32(e) {
12524
12537
  return e instanceof Error ? e.message : String(e);
12525
12538
  }
12539
+ async function resolveTarget(verb, target, cfg, deps, io) {
12540
+ if (!target.includes("@")) {
12541
+ return { kind: "id", id: target, label: target, resolvedFromEmail: false };
12542
+ }
12543
+ const body = await deps.apiJson(cfg, {
12544
+ path: `/users/resolve?email=${encodeURIComponent(target)}`,
12545
+ nonThrowingStatuses: [400, 403, 404, 409, 502, 503]
12546
+ });
12547
+ if (typeof body.oid === "string" && body.oid.length > 0) {
12548
+ return { kind: "id", id: body.oid, label: target, resolvedFromEmail: true };
12549
+ }
12550
+ io.err(resolveErrorMessage(verb, target, body));
12551
+ return { kind: "error", exit: 1 };
12552
+ }
12553
+ function resolveErrorMessage(verb, email, body) {
12554
+ const fallback = `pass their id from \`launchpad whoami --share\` instead.`;
12555
+ switch (body.error) {
12556
+ case "user_not_found":
12557
+ return `launchpad ${verb}: no Entra user matches "${email}" — check the address, or ${fallback}`;
12558
+ case "ambiguous_email":
12559
+ return `launchpad ${verb}: "${email}" matches more than one user — ${fallback}`;
12560
+ case "guest_unsupported":
12561
+ return `launchpad ${verb}: "${email}" is a guest/external user — grant-by-email is members-only; ${fallback}`;
12562
+ case "bad_request":
12563
+ return `launchpad ${verb}: "${email}" is not a valid email address.`;
12564
+ default:
12565
+ return `launchpad ${verb}: could not resolve "${email}"${body.message ? `: ${body.message}` : ""} — ${fallback}`;
12566
+ }
12567
+ }
12526
12568
  var grantEditorCommand = makeEditorCommand("grant");
12527
12569
  var revokeEditorCommand = makeEditorCommand("revoke");
12528
12570
 
12571
+ // src/commands/list-editors.ts
12572
+ function realDeps2() {
12573
+ return { loadConfig, apiJson };
12574
+ }
12575
+ function parseArgs15(args) {
12576
+ let slug;
12577
+ let json = false;
12578
+ for (const a of args) {
12579
+ if (a === "--json")
12580
+ json = true;
12581
+ else if (slug === undefined)
12582
+ slug = a;
12583
+ }
12584
+ if (slug === undefined)
12585
+ return null;
12586
+ return { slug, json };
12587
+ }
12588
+ async function runListEditors(args, io, deps) {
12589
+ const parsed = parseArgs15(args);
12590
+ if (parsed === null) {
12591
+ io.err("usage: launchpad list-editors <slug> [--json]");
12592
+ return 64;
12593
+ }
12594
+ const { slug, json } = parsed;
12595
+ try {
12596
+ const cfg = deps.loadConfig();
12597
+ const current = await deps.apiJson(cfg, {
12598
+ path: `/apps/${slug}`
12599
+ });
12600
+ const editors = current.record.editors;
12601
+ if (json) {
12602
+ io.out(JSON.stringify({ slug, editors }));
12603
+ return 0;
12604
+ }
12605
+ if (editors.length === 0) {
12606
+ io.out(`No editors on "${slug}" — only the owner has BUILD access.`);
12607
+ } else {
12608
+ io.out(`Editors on "${slug}" (${editors.length}):`);
12609
+ for (const e of editors)
12610
+ io.out(` ${e}`);
12611
+ }
12612
+ io.out("");
12613
+ io.out("Editor access = BUILD rights (clone + deploy). Browser VIEW access to");
12614
+ io.out("the running app is a separate Entra-group grant from IT.");
12615
+ return 0;
12616
+ } catch (e) {
12617
+ if (e instanceof UnauthenticatedError) {
12618
+ io.err(e.message);
12619
+ return 1;
12620
+ }
12621
+ if (e instanceof ForbiddenError) {
12622
+ io.err(`launchpad list-editors: not authorised to view editors on "${slug}".`);
12623
+ return 1;
12624
+ }
12625
+ if (e instanceof NotFoundError) {
12626
+ io.err(`launchpad list-editors: no app "${slug}" — check the slug with \`launchpad apps\`.`);
12627
+ return 1;
12628
+ }
12629
+ io.err(`launchpad list-editors failed: ${e instanceof Error ? e.message : String(e)}`);
12630
+ return 1;
12631
+ }
12632
+ }
12633
+ function makeListEditorsCommand(deps = realDeps2()) {
12634
+ return {
12635
+ name: "list-editors",
12636
+ summary: "list the developers with editor (BUILD) access to an app",
12637
+ run: (args, io) => runListEditors(args, io, deps)
12638
+ };
12639
+ }
12640
+ var listEditorsCommand = makeListEditorsCommand();
12641
+
12529
12642
  // src/update-notifier.ts
12530
12643
  import { spawn as spawn6 } from "node:child_process";
12531
12644
  import { homedir as homedir4 } from "node:os";
@@ -12924,6 +13037,179 @@ var emitTelemetryCommand = {
12924
13037
  }
12925
13038
  };
12926
13039
 
13040
+ // src/commands/report.ts
13041
+ import { createInterface as createInterface6 } from "node:readline/promises";
13042
+ import { platform } from "node:os";
13043
+
13044
+ // src/report/breadcrumb.ts
13045
+ import { writeFileSync as writeFileSync10, readFileSync as readFileSync22, mkdirSync as mkdirSync6 } from "node:fs";
13046
+ import { homedir as homedir6 } from "node:os";
13047
+ import { join as join17, dirname as dirname11 } from "node:path";
13048
+ function breadcrumbPath() {
13049
+ return join17(homedir6(), ".launchpad", "last-run.json");
13050
+ }
13051
+ function writeBreadcrumb(verb, exit) {
13052
+ try {
13053
+ const p = breadcrumbPath();
13054
+ mkdirSync6(dirname11(p), { recursive: true });
13055
+ writeFileSync10(p, JSON.stringify({ verb, exit, ts: Date.now() }), "utf8");
13056
+ } catch {}
13057
+ }
13058
+ function readBreadcrumb() {
13059
+ try {
13060
+ const raw = JSON.parse(readFileSync22(breadcrumbPath(), "utf8"));
13061
+ if (typeof raw !== "object" || raw === null)
13062
+ return null;
13063
+ const r = raw;
13064
+ if (typeof r.verb !== "string")
13065
+ return null;
13066
+ const exit = typeof r.exit === "number" && Number.isFinite(r.exit) ? Math.trunc(r.exit) : 0;
13067
+ return { verb: r.verb, exit };
13068
+ } catch {
13069
+ return null;
13070
+ }
13071
+ }
13072
+
13073
+ // src/commands/report.ts
13074
+ function realDeps3() {
13075
+ return {
13076
+ loadConfig,
13077
+ apiJson,
13078
+ isTty: () => process.stdout.isTTY === true && process.stdin.isTTY === true,
13079
+ prompt: async (question) => {
13080
+ const rl = createInterface6({ input: process.stdin, output: process.stdout });
13081
+ try {
13082
+ return (await rl.question(question)).trim();
13083
+ } finally {
13084
+ rl.close();
13085
+ }
13086
+ },
13087
+ cliVersion: CLI_VERSION,
13088
+ os: platform(),
13089
+ cwd: () => process.cwd(),
13090
+ readBreadcrumb
13091
+ };
13092
+ }
13093
+ function parseArgs16(args) {
13094
+ let title;
13095
+ let message;
13096
+ let positional;
13097
+ let json = false;
13098
+ for (let i = 0;i < args.length; i++) {
13099
+ const a = args[i];
13100
+ if (a === "--json")
13101
+ json = true;
13102
+ else if (a === "--title") {
13103
+ const v = args[i + 1];
13104
+ if (v !== undefined && !v.startsWith("-")) {
13105
+ title = v;
13106
+ i++;
13107
+ }
13108
+ } else if (a === "--message" || a === "-m") {
13109
+ const v = args[i + 1];
13110
+ if (v !== undefined && !v.startsWith("-")) {
13111
+ message = v;
13112
+ i++;
13113
+ }
13114
+ } else if (a !== undefined && !a.startsWith("-") && positional === undefined) {
13115
+ positional = a;
13116
+ }
13117
+ }
13118
+ return { title, message, positional, json };
13119
+ }
13120
+ var NOUN = { bug: "bug report", feature: "feature request" };
13121
+ async function runReport(kind, args, io, deps) {
13122
+ const verb = kind;
13123
+ const parsed = parseArgs16(args);
13124
+ let message = parsed.message ?? parsed.positional ?? "";
13125
+ let title = parsed.title ?? "";
13126
+ if (message === "" && deps.isTty()) {
13127
+ title = title || await deps.prompt(`${NOUN[kind]} — title: `);
13128
+ message = await deps.prompt("description: ");
13129
+ }
13130
+ if (title === "")
13131
+ title = deriveTitle(message);
13132
+ if (title === "" && message === "") {
13133
+ io.err(`usage: launchpad ${verb} "<description>" [--title <t>] [--json]`);
13134
+ return 64;
13135
+ }
13136
+ const ctx = buildContext(deps);
13137
+ try {
13138
+ const cfg = deps.loadConfig();
13139
+ const resp = await deps.apiJson(cfg, {
13140
+ method: "POST",
13141
+ path: "/reports",
13142
+ jsonBody: { kind, title, message, context: ctx },
13143
+ nonThrowingStatuses: [400, 429, 502, 503]
13144
+ });
13145
+ if (parsed.json) {
13146
+ io.out(JSON.stringify(resp));
13147
+ return resp.identifier !== undefined ? 0 : 1;
13148
+ }
13149
+ if (resp.identifier !== undefined) {
13150
+ if (resp.duplicate === true) {
13151
+ io.out(`✓ Already reported as ${resp.identifier} — thanks, no need to file again.`);
13152
+ } else {
13153
+ io.out(`✓ Filed your ${NOUN[kind]} as ${resp.identifier}.`);
13154
+ io.out(" The team is notified — no further action needed.");
13155
+ if (resp.url)
13156
+ io.out(` ${resp.url}`);
13157
+ }
13158
+ return 0;
13159
+ }
13160
+ if (resp.error === "rate_limited") {
13161
+ io.err(`launchpad ${verb}: ${resp.message ?? "rate limited"} (retry in ~${resp.retryAfterSec ?? 60}s).`);
13162
+ return 1;
13163
+ }
13164
+ if (resp.error === "bad_request") {
13165
+ io.err(`launchpad ${verb}: ${resp.message ?? "invalid report"}.`);
13166
+ return 64;
13167
+ }
13168
+ return failSoft(verb, kind, title, message, io);
13169
+ } catch (e) {
13170
+ if (e instanceof UnauthenticatedError) {
13171
+ io.err(`${e.message}`);
13172
+ return 1;
13173
+ }
13174
+ return failSoft(verb, kind, title, message, io);
13175
+ }
13176
+ }
13177
+ function failSoft(verb, kind, title, message, io) {
13178
+ io.err(`launchpad ${verb}: couldn't reach the tracker — your ${NOUN[kind]} was NOT filed.`);
13179
+ io.err("Here it is to paste manually:");
13180
+ io.err(` Title: ${title}`);
13181
+ if (message)
13182
+ io.err(` ${message}`);
13183
+ return 1;
13184
+ }
13185
+ function deriveTitle(message) {
13186
+ const firstLine = message.split(`
13187
+ `)[0]?.trim() ?? "";
13188
+ return firstLine.length > 80 ? `${firstLine.slice(0, 77)}…` : firstLine;
13189
+ }
13190
+ function buildContext(deps) {
13191
+ const ctx = {
13192
+ cliVersion: deps.cliVersion,
13193
+ os: deps.os
13194
+ };
13195
+ const crumb = deps.readBreadcrumb();
13196
+ if (crumb) {
13197
+ ctx.lastVerb = crumb.verb;
13198
+ ctx.lastExit = String(crumb.exit);
13199
+ }
13200
+ const slug = inferSlugFromCwd(deps.cwd());
13201
+ if (slug)
13202
+ ctx.appSlug = slug;
13203
+ return ctx;
13204
+ }
13205
+ function makeReportCommand(kind, deps = realDeps3()) {
13206
+ return {
13207
+ name: kind,
13208
+ summary: kind === "bug" ? "file a bug report (lands in the team's Linear inbox)" : "file a feature request (lands in the team's Linear inbox)",
13209
+ run: (args, io) => runReport(kind, args, io, deps)
13210
+ };
13211
+ }
13212
+
12927
13213
  // src/dispatcher.ts
12928
13214
  var COMMANDS = [
12929
13215
  loginCommand,
@@ -12954,6 +13240,9 @@ var COMMANDS = [
12954
13240
  secretsCommand,
12955
13241
  grantEditorCommand,
12956
13242
  revokeEditorCommand,
13243
+ listEditorsCommand,
13244
+ makeReportCommand("bug"),
13245
+ makeReportCommand("feature"),
12957
13246
  refreshUpdateCacheCommand,
12958
13247
  emitTelemetryCommand
12959
13248
  ];
@@ -12975,7 +13264,11 @@ async function dispatch(argv, io, commands = COMMANDS) {
12975
13264
  io.err("Run `launchpad --help` for the list of available commands.");
12976
13265
  return 64;
12977
13266
  }
12978
- return cmd.run(rest, io);
13267
+ const code = await cmd.run(rest, io);
13268
+ if (!cmd.hidden && verb !== "bug" && verb !== "feature") {
13269
+ writeBreadcrumb(verb, code);
13270
+ }
13271
+ return code;
12979
13272
  }
12980
13273
  function printHelp6(io, commands) {
12981
13274
  io.out("launchpad — manage Launchpad-deployed apps from the command line.");
@@ -1 +1 @@
1
- {"version":3,"file":"editors.d.ts","sourceRoot":"","sources":["../../src/commands/editors.ts"],"names":[],"mappings":"AAuBA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,cAAc,CAAC;AAC9C,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,uBAAuB,CAAC;AAC/D,OA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,CAAC,CAAC,CAAC,CAAC;IAC7E,QAAQ,CAAC,KAAK,EAAE,MAAM,OAAO,CAAC;IAC9B,QAAQ,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE,MAAM,KAAK,OAAO,CAAC,MAAM,CAAC,CAAC;CACxD;AA8DD,wBAAgB,iBAAiB,CAAC,MAAM,EAAE,YAAY,EAAE,IAAI,GAAE,UAAuB,GAAG,OAAO,CAU9F;AAuQD,eAAO,MAAM,kBAAkB,EAAE,OAAoC,CAAC;AACtE,eAAO,MAAM,mBAAmB,EAAE,OAAqC,CAAC"}
@@ -0,0 +1,10 @@
1
+ import type { CliConfig } from "../config.js";
2
+ import type { ApiRequestOptions } from "../http/api-client.js";
3
+ import type { Command } from "../dispatcher.js";
4
+ export interface ListEditorsDeps {
5
+ readonly loadConfig: () => CliConfig;
6
+ readonly apiJson: <T>(cfg: CliConfig, opts: ApiRequestOptions) => Promise<T>;
7
+ }
8
+ export declare function makeListEditorsCommand(deps?: ListEditorsDeps): Command;
9
+ export declare const listEditorsCommand: Command;
10
+ //# sourceMappingURL=list-editors.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"list-editors.d.ts","sourceRoot":"","sources":["../../src/commands/list-editors.ts"],"names":[],"mappings":"AAaA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,cAAc,CAAC;AAC9C,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,uBAAuB,CAAC;AAC/D,OAAO,KAAK,EAAS,OAAO,EAAY,MAAM,kBAAkB,CAAC;AAEjE,MAAM,WAAW,eAAe;IAC9B,QAAQ,CAAC,UAAU,EAAE,MAAM,SAAS,CAAC;IACrC,QAAQ,CAAC,OAAO,EAAE,CAAC,CAAC,EAAE,GAAG,EAAE,SAAS,EAAE,IAAI,EAAE,iBAAiB,KAAK,OAAO,CAAC,CAAC,CAAC,CAAC;CAC9E;AAyFD,wBAAgB,sBAAsB,CACpC,IAAI,GAAE,eAA4B,GACjC,OAAO,CAMT;AAED,eAAO,MAAM,kBAAkB,EAAE,OAAkC,CAAC"}
@@ -0,0 +1,17 @@
1
+ import { readBreadcrumb } from "../report/breadcrumb.js";
2
+ import type { CliConfig } from "../config.js";
3
+ import type { ApiRequestOptions } from "../http/api-client.js";
4
+ import type { Command } from "../dispatcher.js";
5
+ export type ReportKind = "bug" | "feature";
6
+ export interface ReportDeps {
7
+ readonly loadConfig: () => CliConfig;
8
+ readonly apiJson: <T>(cfg: CliConfig, opts: ApiRequestOptions) => Promise<T>;
9
+ readonly isTty: () => boolean;
10
+ readonly prompt: (question: string) => Promise<string>;
11
+ readonly cliVersion: string;
12
+ readonly os: string;
13
+ readonly cwd: () => string;
14
+ readonly readBreadcrumb: typeof readBreadcrumb;
15
+ }
16
+ export declare function makeReportCommand(kind: ReportKind, deps?: ReportDeps): Command;
17
+ //# sourceMappingURL=report.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"report.d.ts","sourceRoot":"","sources":["../../src/commands/report.ts"],"names":[],"mappings":"AAkBA,OAAO,EAAE,cAAc,EAAE,MAAM,yBAAyB,CAAC;AACzD,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,cAAc,CAAC;AAC9C,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,uBAAuB,CAAC;AAC/D,OAAO,KAAK,EAAS,OAAO,EAAY,MAAM,kBAAkB,CAAC;AAEjE,MAAM,MAAM,UAAU,GAAG,KAAK,GAAG,SAAS,CAAC;AAE3C,MAAM,WAAW,UAAU;IACzB,QAAQ,CAAC,UAAU,EAAE,MAAM,SAAS,CAAC;IACrC,QAAQ,CAAC,OAAO,EAAE,CAAC,CAAC,EAAE,GAAG,EAAE,SAAS,EAAE,IAAI,EAAE,iBAAiB,KAAK,OAAO,CAAC,CAAC,CAAC,CAAC;IAC7E,QAAQ,CAAC,KAAK,EAAE,MAAM,OAAO,CAAC;IAC9B,QAAQ,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE,MAAM,KAAK,OAAO,CAAC,MAAM,CAAC,CAAC;IACvD,QAAQ,CAAC,UAAU,EAAE,MAAM,CAAC;IAC5B,QAAQ,CAAC,EAAE,EAAE,MAAM,CAAC;IACpB,QAAQ,CAAC,GAAG,EAAE,MAAM,MAAM,CAAC;IAC3B,QAAQ,CAAC,cAAc,EAAE,OAAO,cAAc,CAAC;CAChD;AA0KD,wBAAgB,iBAAiB,CAAC,IAAI,EAAE,UAAU,EAAE,IAAI,GAAE,UAAuB,GAAG,OAAO,CAS1F"}
@@ -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", "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-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,uLAajB,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"}
1
+ {"version":3,"file":"skills.d.ts","sourceRoot":"","sources":["../../src/commands/skills.ts"],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ED,wBAAgB,SAAS,CAAC,EAAE,EAAE,KAAK,EAAE,QAAQ,EAAE,SAAS,OAAO,EAAE,GAAG,IAAI,CAyBvE"}
1
+ {"version":3,"file":"dispatcher.d.ts","sourceRoot":"","sources":["../src/dispatcher.ts"],"names":[],"mappings":"AAwDA,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,EAsCtC,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,CA0BnB;AAED,wBAAgB,SAAS,CAAC,EAAE,EAAE,KAAK,EAAE,QAAQ,EAAE,SAAS,OAAO,EAAE,GAAG,IAAI,CAyBvE"}
@@ -0,0 +1,9 @@
1
+ export interface Breadcrumb {
2
+ readonly verb: string;
3
+ readonly exit: number;
4
+ }
5
+ /** Record the verb + exit code. Best-effort; never throws. */
6
+ export declare function writeBreadcrumb(verb: string, exit: number): void;
7
+ /** Read the last breadcrumb, or null. Best-effort; never throws. */
8
+ export declare function readBreadcrumb(): Breadcrumb | null;
9
+ //# sourceMappingURL=breadcrumb.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"breadcrumb.d.ts","sourceRoot":"","sources":["../../src/report/breadcrumb.ts"],"names":[],"mappings":"AAeA,MAAM,WAAW,UAAU;IACzB,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;IACtB,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;CACvB;AAMD,8DAA8D;AAC9D,wBAAgB,eAAe,CAAC,IAAI,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,GAAG,IAAI,CAQhE;AAED,oEAAoE;AACpE,wBAAgB,cAAc,IAAI,UAAU,GAAG,IAAI,CAYlD"}
package/dist/version.d.ts CHANGED
@@ -1,2 +1,2 @@
1
- export declare const CLI_VERSION = "0.34.1";
1
+ export declare const CLI_VERSION = "0.37.0";
2
2
  //# sourceMappingURL=version.d.ts.map
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@m-kopa/launchpad-cli",
3
- "version": "0.34.1",
4
- "description": "Launchpad CLI clone / deploy / review / merge against Launchpad-managed apps. Talks to the portal-bot endpoints (SCOPE-M-760 / T4).",
3
+ "version": "0.37.0",
4
+ "description": "Launchpad CLI \u2014 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": {
7
7
  "launchpad": "./dist/cli.js"
@@ -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.34.1
4
+ version: 0.37.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.34.1
4
+ version: 0.37.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-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.34.1
4
+ version: 0.37.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 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.34.1
4
+ version: 0.37.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.34.1
4
+ version: 0.37.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.34.1
4
+ version: 0.37.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,71 @@
1
+ ---
2
+ name: launchpad-report
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.37.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
+ ## What this does
32
+
33
+ `launchpad bug` and `launchpad feature` file a report straight into the team's
34
+ Linear inbox (bot-brokered — no credentials needed locally). Use them when the
35
+ user reports a problem or wishes for a feature.
36
+
37
+ ## Rules (read first)
38
+
39
+ 1. **Never file silently.** Before running the command, show the user the exact
40
+ title + description you're about to send and ask them to confirm. The CLI
41
+ attaches a little non-sensitive context automatically (CLI version, OS, last
42
+ command name + exit code, app slug) — you don't add it.
43
+ 2. **Don't paste secrets.** Put only the user's description in `--message`. Never
44
+ include tokens, secret values, or full command lines with arguments.
45
+ 3. **Don't double-file.** One report per issue per conversation. If you already
46
+ filed it (or the CLI says it's a duplicate), tell the user the reference rather
47
+ than filing again.
48
+
49
+ ## How to file
50
+
51
+ Pick the verb by intent — a defect is a `bug`, a wish is a `feature`:
52
+
53
+ ```bash
54
+ launchpad bug --title "watch hangs after a failed deploy" \
55
+ --message "After a failed deploy, launchpad watch never exits." --json
56
+ ```
57
+
58
+ ```bash
59
+ launchpad feature --title "pin a default region" \
60
+ --message "Allow a default region in launchpad.yaml so I don't pass --region." --json
61
+ ```
62
+
63
+ `--json` returns `{ "identifier": "AIO-…", "url": "…" }`. Report the `identifier`
64
+ back to the user as confirmation (they may not have a Linear seat to open the URL).
65
+
66
+ ## Handling the result
67
+
68
+ - **Success** → tell the user: "Filed as `AIO-…` — the team's notified."
69
+ - **Duplicate** (`"duplicate": true`) → "That's already tracked as `AIO-…`."
70
+ - **Failure / non-zero exit** → the CLI prints the report back; offer it to the
71
+ user to file manually. Do not retry in a loop.
@@ -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.34.1
4
+ version: 0.37.0
5
5
  ---
6
6
 
7
7
  <!-- BEGIN shell-contract (managed by scripts/sync-skill-contract.sh — edit skills/_partials/shell-contract.md) -->