@hype-stack/cli 1.17.0 → 1.20.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.
Files changed (69) hide show
  1. package/dist/{cli-CGP_pCsR.js → cli-CG3vutuw.js} +5515 -3717
  2. package/dist/cli.d.ts.map +1 -1
  3. package/dist/commands/community.d.ts +41 -0
  4. package/dist/commands/community.d.ts.map +1 -0
  5. package/dist/commands/compose.d.ts.map +1 -1
  6. package/dist/commands/install-helpers.d.ts +37 -2
  7. package/dist/commands/install-helpers.d.ts.map +1 -1
  8. package/dist/commands/template.d.ts +8 -7
  9. package/dist/commands/template.d.ts.map +1 -1
  10. package/dist/config/bin.js +1 -1
  11. package/dist/core/capabilities.d.ts +56 -0
  12. package/dist/core/capabilities.d.ts.map +1 -0
  13. package/dist/core/codegen.d.ts +9 -0
  14. package/dist/core/codegen.d.ts.map +1 -1
  15. package/dist/core/codemods.d.ts +27 -1
  16. package/dist/core/codemods.d.ts.map +1 -1
  17. package/dist/core/installer.d.ts +54 -6
  18. package/dist/core/installer.d.ts.map +1 -1
  19. package/dist/core/installs.d.ts +7 -1
  20. package/dist/core/installs.d.ts.map +1 -1
  21. package/dist/core/npm-deps.d.ts.map +1 -1
  22. package/dist/core/onboard-catalog.d.ts.map +1 -1
  23. package/dist/core/pack-authoring.d.ts +70 -0
  24. package/dist/core/pack-authoring.d.ts.map +1 -0
  25. package/dist/core/pack-categories.d.ts +13 -0
  26. package/dist/core/pack-categories.d.ts.map +1 -1
  27. package/dist/core/pack-scaffold.d.ts +39 -0
  28. package/dist/core/pack-scaffold.d.ts.map +1 -0
  29. package/dist/core/pack-source.d.ts +49 -0
  30. package/dist/core/pack-source.d.ts.map +1 -0
  31. package/dist/core/pack-validate.d.ts +42 -0
  32. package/dist/core/pack-validate.d.ts.map +1 -0
  33. package/dist/core/pnpm.d.ts +27 -0
  34. package/dist/core/pnpm.d.ts.map +1 -0
  35. package/dist/core/post-setup.d.ts.map +1 -1
  36. package/dist/core/preflight.d.ts +6 -2
  37. package/dist/core/preflight.d.ts.map +1 -1
  38. package/dist/core/prisma-schema.d.ts +59 -0
  39. package/dist/core/prisma-schema.d.ts.map +1 -0
  40. package/dist/core/registries.d.ts +41 -0
  41. package/dist/core/registries.d.ts.map +1 -0
  42. package/dist/core/shell-actions.d.ts +56 -0
  43. package/dist/core/shell-actions.d.ts.map +1 -0
  44. package/dist/core/stack-config.d.ts +3 -1
  45. package/dist/core/stack-config.d.ts.map +1 -1
  46. package/dist/core/swap.d.ts +71 -0
  47. package/dist/core/swap.d.ts.map +1 -0
  48. package/dist/core/variants.d.ts +9 -0
  49. package/dist/core/variants.d.ts.map +1 -1
  50. package/dist/index.js +1 -1
  51. package/dist/mcp/recommendations.d.ts.map +1 -1
  52. package/dist/mcp/server.d.ts +1 -1
  53. package/dist/mcp/server.d.ts.map +1 -1
  54. package/dist/mcp/tools/add-packs.d.ts +9 -3
  55. package/dist/mcp/tools/add-packs.d.ts.map +1 -1
  56. package/dist/mcp/tools/apply-template.d.ts +4 -3
  57. package/dist/mcp/tools/apply-template.d.ts.map +1 -1
  58. package/dist/mcp/tools/pack-authoring.d.ts +31 -0
  59. package/dist/mcp/tools/pack-authoring.d.ts.map +1 -0
  60. package/dist/mcp/tools/search-catalog.d.ts.map +1 -1
  61. package/dist/types/types.d.ts +141 -0
  62. package/dist/types/types.d.ts.map +1 -1
  63. package/dist/ui/family-pick.d.ts +16 -0
  64. package/dist/ui/family-pick.d.ts.map +1 -0
  65. package/dist/ui/pack-select.d.ts +2 -0
  66. package/dist/ui/pack-select.d.ts.map +1 -1
  67. package/dist/utils/fs.d.ts +22 -0
  68. package/dist/utils/fs.d.ts.map +1 -1
  69. package/package.json +1 -1
package/dist/cli.d.ts.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"cli.d.ts","sourceRoot":"","sources":["../src/cli.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AAqBpC,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,eAAe,CAAC;AAyB1D,6EAA6E;AAC7E,wBAAgB,cAAc,CAAC,KAAK,EAAE,MAAM,GAAG,SAAS,GAAG,OAAO,GAAG,MAAM,GAAG,SAAS,CAEtF;AAwBD,0EAA0E;AAC1E,wBAAgB,iBAAiB,CAAC,OAAO,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAAG,oBAAoB,CAYxF;AAoCD,wBAAgB,aAAa,IAAI,OAAO,CAiRvC"}
1
+ {"version":3,"file":"cli.d.ts","sourceRoot":"","sources":["../src/cli.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AA2BpC,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,eAAe,CAAC;AA8B1D,6EAA6E;AAC7E,wBAAgB,cAAc,CAAC,KAAK,EAAE,MAAM,GAAG,SAAS,GAAG,OAAO,GAAG,MAAM,GAAG,SAAS,CAEtF;AAwBD,0EAA0E;AAC1E,wBAAgB,iBAAiB,CAAC,OAAO,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAAG,oBAAoB,CAYxF;AAoCD,wBAAgB,aAAa,IAAI,OAAO,CA4UvC"}
@@ -0,0 +1,41 @@
1
+ import { CustomizationOptions, PackCategory } from '../types/types.js';
2
+ export interface CommunityAddOptions extends CustomizationOptions {
3
+ cwd?: string;
4
+ force?: boolean;
5
+ yes?: boolean;
6
+ }
7
+ /**
8
+ * Install one community pack from a directory, a git repository, or an npm package.
9
+ *
10
+ * Deliberately a thin wrapper over `compose`. A community pack goes through the exact same
11
+ * pipeline as a catalog one, dependency resolution through migration prompt, and duplicating any
12
+ * of that here would guarantee the two drift: the copy that gets exercised less would be the one
13
+ * with the bug. Everything specific to community packs (fetching, the trust prompt, the name
14
+ * checks) lives in compose's own staging step, where it applies to `--community` too.
15
+ */
16
+ export declare function communityAddCommand(spec: string, options?: CommunityAddOptions): Promise<void>;
17
+ /**
18
+ * Check a pack directory and report everything wrong with it.
19
+ *
20
+ * Exits non-zero on an error so it can sit in an author's CI, and stays quiet enough to be run
21
+ * constantly while writing one.
22
+ */
23
+ export declare function communityValidateCommand(dir?: string): Promise<void>;
24
+ export interface CommunityInitOptions {
25
+ name?: string;
26
+ category?: PackCategory;
27
+ yes?: boolean;
28
+ }
29
+ /** Scaffold a new pack that validates on the first run. */
30
+ export declare function communityInitCommand(dir?: string, options?: CommunityInitOptions): Promise<void>;
31
+ /**
32
+ * Show which community packs a project carries and where each came from.
33
+ *
34
+ * Worth its own command because once third-party code is in a project, "what is in here that we
35
+ * did not write" is a question people actually have to answer, and `installedPacks` alone cannot:
36
+ * it is a list of names, and a community pack's name resolves to nothing anyone can look up.
37
+ */
38
+ export declare function communityListCommand(options?: {
39
+ cwd?: string;
40
+ }): Promise<void>;
41
+ //# sourceMappingURL=community.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"community.d.ts","sourceRoot":"","sources":["../../src/commands/community.ts"],"names":[],"mappings":"AAUA,OAAO,KAAK,EAAE,oBAAoB,EAAiB,YAAY,EAA2B,MAAM,mBAAmB,CAAC;AAQpH,MAAM,WAAW,mBAAoB,SAAQ,oBAAoB;IAC/D,GAAG,CAAC,EAAE,MAAM,CAAC;IACb,KAAK,CAAC,EAAE,OAAO,CAAC;IAChB,GAAG,CAAC,EAAE,OAAO,CAAC;CACf;AAED;;;;;;;;GAQG;AACH,wBAAsB,mBAAmB,CAAC,IAAI,EAAE,MAAM,EAAE,OAAO,GAAE,mBAAwB,GAAG,OAAO,CAAC,IAAI,CAAC,CAExG;AAID;;;;;GAKG;AACH,wBAAsB,wBAAwB,CAAC,GAAG,CAAC,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC,CAyB1E;AAUD,MAAM,WAAW,oBAAoB;IACnC,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,QAAQ,CAAC,EAAE,YAAY,CAAC;IACxB,GAAG,CAAC,EAAE,OAAO,CAAC;CACf;AASD,2DAA2D;AAC3D,wBAAsB,oBAAoB,CAAC,GAAG,CAAC,EAAE,MAAM,EAAE,OAAO,GAAE,oBAAyB,GAAG,OAAO,CAAC,IAAI,CAAC,CA6F1G;AAID;;;;;;GAMG;AACH,wBAAsB,oBAAoB,CAAC,OAAO,GAAE;IAAE,GAAG,CAAC,EAAE,MAAM,CAAA;CAAO,GAAG,OAAO,CAAC,IAAI,CAAC,CAwBxF"}
@@ -1 +1 @@
1
- {"version":3,"file":"compose.d.ts","sourceRoot":"","sources":["../../src/commands/compose.ts"],"names":[],"mappings":"AA+BA,OAAO,KAAK,EAAE,cAAc,EAAE,YAAY,EAAE,aAAa,EAAyB,MAAM,mBAAmB,CAAC;AAqB5G,wBAAsB,cAAc,CAAC,OAAO,GAAE,cAAmB,GAAG,OAAO,CAAC,IAAI,CAAC,CAkThF;AAkLD;;;;;GAKG;AACH,wBAAgB,4BAA4B,CAAC,SAAS,EAAE,aAAa,EAAE,EAAE,KAAK,EAAE,YAAY,EAAE,GAAG,MAAM,EAAE,CAUxG;AAID;;;;GAIG;AACH,wBAAgB,qBAAqB,CAAC,GAAG,EAAE,MAAM,GAAG,aAAa,CAIhE"}
1
+ {"version":3,"file":"compose.d.ts","sourceRoot":"","sources":["../../src/commands/compose.ts"],"names":[],"mappings":"AAyCA,OAAO,KAAK,EAAE,cAAc,EAAE,YAAY,EAAE,aAAa,EAAyB,MAAM,mBAAmB,CAAC;AAsB5G,wBAAsB,cAAc,CAAC,OAAO,GAAE,cAAmB,GAAG,OAAO,CAAC,IAAI,CAAC,CAwchF;AA8RD;;;;;GAKG;AACH,wBAAgB,4BAA4B,CAAC,SAAS,EAAE,aAAa,EAAE,EAAE,KAAK,EAAE,YAAY,EAAE,GAAG,MAAM,EAAE,CAUxG;AAID;;;;GAIG;AACH,wBAAgB,qBAAqB,CAAC,GAAG,EAAE,MAAM,GAAG,aAAa,CAIhE"}
@@ -10,16 +10,45 @@ export declare function authorizeUnowned(packs: PackListItem[], installedSet: Se
10
10
  export declare function stateTag(state: PackState, price: number): string;
11
11
  /** Tell the user which packs were dropped and offer to open purchase pages for locked ones. */
12
12
  export declare function handleBlocked(blocked: string[], isLocked: (name: string) => boolean, packsByName: Map<string, PackListItem>): Promise<void>;
13
- export declare function showPlanSummary(installable: string[], packsByName: Map<string, PackListItem>): void;
13
+ /**
14
+ * The plan, as the last thing shown before the "Install N packs?" confirm.
15
+ *
16
+ * Community packs are marked with where they came from, and every npm package they will pull in is
17
+ * listed. That second part is the disclosure the trust prompt cannot make, because the manifest
18
+ * had not been fetched yet when the prompt ran. Nothing in a pack executes, but a dependency it
19
+ * asks for is a real package from a real registry, and the person confirming should see the names.
20
+ */
21
+ /** One resolved template slot, for the review: which family, which variant, whether it is the default. */
22
+ export interface SlotPick {
23
+ label: string;
24
+ pack: string;
25
+ isDefault: boolean;
26
+ }
27
+ export interface PlanSummaryOptions {
28
+ /** Staged community packs, so the summary can say where each came from and what npm it adds. */
29
+ community?: readonly PreparedPack[];
30
+ /** Template slot picks, shown ahead of the install order. */
31
+ picks?: readonly SlotPick[];
32
+ }
33
+ export declare function showPlanSummary(installable: string[], packsByName: Map<string, PackListItem>, { community, picks }?: PlanSummaryOptions): void;
14
34
  /**
15
35
  * Turn a denial into something the user can act on. A credential problem and an
16
36
  * entitlement problem look identical from the outside but need opposite fixes, so
17
37
  * they get different messages instead of one vague "access denied".
18
38
  */
19
39
  export declare function describeDownloadDenial(name: string, reason: DownloadDeniedReason): string;
20
- /** Fetch each pack's manifest and download its files into a temp dir, in install order. */
40
+ /**
41
+ * Collect every pack in the plan into install order, downloading the ones that need downloading.
42
+ *
43
+ * A name present in `staged` is a community pack that was already fetched: its manifest had to be
44
+ * read before the dependency graph could be resolved, so re-fetching it here would be a second
45
+ * network round trip for bytes already on disk. Everything else goes through the registry, which
46
+ * is the only path that can authorize a paid pack. Both kinds come back as the same `PreparedPack`,
47
+ * so nothing downstream has to care which lane a pack arrived through.
48
+ */
21
49
  export declare function downloadPacks(order: string[], auth: {
22
50
  token?: string | null;
51
+ staged?: Map<string, PreparedPack>;
23
52
  }): Promise<PreparedPack[]>;
24
53
  export declare function installNpmForPacks(args: {
25
54
  prepared: PreparedPack[];
@@ -53,5 +82,11 @@ export declare function resolveOverwrites(args: {
53
82
  yes: boolean;
54
83
  /** Per-pack selected slots, used to scope which files count as conflicts. */
55
84
  slotsByPack?: Map<string, PackSlot[]>;
85
+ /**
86
+ * Resolved target paths the user already decided to replace, so they are never asked again.
87
+ * A starter swap fills this with the files both starters ship: replacing the starter was the
88
+ * decision, and one prompt per file would only let them answer it inconsistently.
89
+ */
90
+ preapproved?: Set<string>;
56
91
  }): Promise<Set<string>>;
57
92
  //# sourceMappingURL=install-helpers.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"install-helpers.d.ts","sourceRoot":"","sources":["../../src/commands/install-helpers.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,CAAC,MAAM,gBAAgB,CAAC;AAMpC,OAAO,EAAqB,KAAK,YAAY,EAAwB,MAAM,sBAAsB,CAAC;AASlG,OAAO,KAAK,EACV,oBAAoB,EACpB,oBAAoB,EACpB,YAAY,EAEZ,QAAQ,EACR,WAAW,EACX,UAAU,EACX,MAAM,mBAAmB,CAAC;AAI3B,MAAM,MAAM,SAAS,GAAG,MAAM,GAAG,OAAO,GAAG,QAAQ,CAAC;AAEpD,wBAAgB,YAAY,CAAC,KAAK,EAAE,OAAO,GAAG,MAAM,CAEnD;AAED,0GAA0G;AAC1G,wBAAsB,gBAAgB,CACpC,KAAK,EAAE,YAAY,EAAE,EACrB,YAAY,EAAE,GAAG,CAAC,MAAM,CAAC,EACzB,IAAI,EAAE;IAAE,KAAK,CAAC,EAAE,MAAM,GAAG,IAAI,CAAA;CAAE,GAC9B,OAAO,CAAC,oBAAoB,CAAC,CAI/B;AAED,wBAAgB,QAAQ,CAAC,KAAK,EAAE,SAAS,EAAE,KAAK,EAAE,MAAM,GAAG,M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CAAC;IACpB,GAAG,EAAE,MAAM,CAAC;IACZ,KAAK,EAAE,OAAO,CAAC;IACf,GAAG,EAAE,OAAO,CAAC;IACb,6EAA6E;IAC7E,WAAW,CAAC,EAAE,GAAG,CAAC,MAAM,EAAE,QAAQ,EAAE,CAAC,CAAC;IACtC;;;;OAIG;IACH,WAAW,CAAC,EAAE,GAAG,CAAC,MAAM,CAAC,CAAC;CAC3B,GAAG,OAAO,CAAC,GAAG,CAAC,MAAM,CAAC,CAAC,CA0DvB"}
@@ -1,13 +1,14 @@
1
1
  import { TemplateCommandOptions } from '../types/types.js';
2
2
  /**
3
- * Install a template. The template expands to its starter/layout slot variants
4
- * plus a fixed set of feature packs, installs them like a normal compose, then
5
- * layers the template's frontend override files (landing page, etc.) on top so
6
- * the template takes responsibility for those paths.
3
+ * Install a template. The template expands to one variant per slot (starter,
4
+ * layout, billing, any pack family it ships) plus a fixed set of feature packs,
5
+ * installs them like a normal compose, then layers the template's frontend
6
+ * override files (landing page, etc.) on top so the template takes
7
+ * responsibility for those paths.
7
8
  *
8
- * Built for template making: you can swap the starter/layout variants for a
9
- * different same-family pack, and add extra packs that fall outside the
10
- * template's predefined scope.
9
+ * Built for template making: you can swap any slot for a different pack of the
10
+ * same family, and add extra packs that fall outside the template's predefined
11
+ * scope.
11
12
  */
12
13
  export declare function templateCommand(options?: TemplateCommandOptions): Promise<void>;
13
14
  //# sourceMappingURL=template.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"template.d.ts","sourceRoot":"","sources":["../../src/commands/template.ts"],"names":[],"mappings":"AA6BA,OAAO,KAAK,EAIV,sBAAsB,EAGvB,MAAM,mBAAmB,CAAC;AAoB3B;;;;;;;;;GASG;AACH,wBAAsB,eAAe,CAAC,OAAO,GAAE,sBAA2B,GAAG,OAAO,CAAC,IAAI,CAAC,CA8YzF"}
1
+ {"version":3,"file":"template.d.ts","sourceRoot":"","sources":["../../src/commands/template.ts"],"names":[],"mappings":"AAgCA,OAAO,KAAK,EAKV,sBAAsB,EAIvB,MAAM,mBAAmB,CAAC;AAsB3B;;;;;;;;;;GAUG;AAEH,wBAAsB,eAAe,CAAC,OAAO,GAAE,sBAA2B,GAAG,OAAO,CAAC,IAAI,CAAC,CAwczF"}
@@ -1,5 +1,5 @@
1
1
  #!/usr/bin/env node
2
- import { d as e, n as t, t as n, u as r } from "../cli-CGP_pCsR.js";
2
+ import { d as e, n as t, t as n, u as r } from "../cli-CG3vutuw.js";
3
3
  import { z as i } from "zod";
4
4
  import * as a from "@sentry/node";
5
5
  //#region src/core/sentry.ts
@@ -0,0 +1,56 @@
1
+ import { PackCapability, PackManifest, StackConfig } from '../types/types.js';
2
+ /**
3
+ * Capabilities are the contract between a starter and everything installed on top of it. A
4
+ * starter lists what it `provides`; a layout or feature pack lists what it `requires`. The names
5
+ * are the five things a starter can differ in, nothing finer: the point is a check that cannot
6
+ * rot, not a taxonomy.
7
+ */
8
+ export declare const KNOWN_CAPABILITIES: readonly PackCapability[];
9
+ export declare function isKnownCapability(value: string): value is PackCapability;
10
+ /** Everything the installed packs and the packs about to land provide, together. */
11
+ export declare function providedCapabilities(config: StackConfig, manifests: PackManifest[]): Set<PackCapability>;
12
+ export interface UnsatisfiedRequirement {
13
+ pack: string;
14
+ missing: PackCapability[];
15
+ }
16
+ /**
17
+ * Which packs in a plan need a capability nothing provides. Checked against the union of what is
18
+ * installed and what is in the plan, so a starter and a feature pack selected together satisfy
19
+ * each other, and a feature added later is checked against the starter already in place.
20
+ */
21
+ export declare function findUnsatisfiedRequirements(options: {
22
+ manifests: PackManifest[];
23
+ config: StackConfig;
24
+ }): UnsatisfiedRequirement[];
25
+ /** One line per unsatisfied pack, naming the capability and where it comes from. */
26
+ export declare function describeUnsatisfiedRequirement(item: UnsatisfiedRequirement): string;
27
+ /**
28
+ * A starter swap is an upgrade when the new starter provides everything the installed one did.
29
+ * That is the one direction a swap can take without breaking the packs already on top, so it is
30
+ * the one the CLI performs on its own; the other direction is a rebuild, not a swap.
31
+ */
32
+ export declare function isCapabilityUpgrade(installedProvides: readonly string[], nextProvides: readonly string[]): boolean;
33
+ export interface AppAlignment<T extends StackConfig> {
34
+ config: T;
35
+ /** What changed, for the log. Empty when the project already matched the starter. */
36
+ notes: string[];
37
+ }
38
+ /**
39
+ * Make the project's optional-app registration follow the starter. A starter that does not
40
+ * provide `admin` ships no admin login, users, or organizations views, so an `apps/admin` left in
41
+ * `stack.json` would collect feature packs' admin widgets that import starter modules which are
42
+ * not there. Dropping the app from `apps`/`paths` (the directory stays on disk, untouched) makes
43
+ * every admin-slot file and codemod skip, exactly as in a project that never had the app. When a
44
+ * starter that provides `admin` lands later, the app is registered again from the directory
45
+ * that is still there, so the upgrade from the free starter needs no re-clone.
46
+ */
47
+ export declare function alignAppsWithStarter<T extends StackConfig>(options: {
48
+ config: T;
49
+ /** The starter about to land: its name and what it provides, from the catalog or its manifest. */
50
+ starter: {
51
+ name: string;
52
+ provides?: PackCapability[];
53
+ };
54
+ projectRoot: string;
55
+ }): Promise<AppAlignment<T>>;
56
+ //# sourceMappingURL=capabilities.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"capabilities.d.ts","sourceRoot":"","sources":["../../src/core/capabilities.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,cAAc,EAAE,YAAY,EAAE,WAAW,EAAc,MAAM,mBAAmB,CAAC;AAI/F;;;;;GAKG;AACH,eAAO,MAAM,kBAAkB,EAAE,SAAS,cAAc,EAMvD,CAAC;AAEF,wBAAgB,iBAAiB,CAAC,KAAK,EAAE,MAAM,GAAG,KAAK,IAAI,cAAc,CAExE;AAED,oFAAoF;AACpF,wBAAgB,oBAAoB,CAAC,MAAM,EAAE,WAAW,EAAE,SAAS,EAAE,YAAY,EAAE,GAAG,GAAG,CAAC,cAAc,CAAC,CASxG;AAED,MAAM,WAAW,sBAAsB;IACrC,IAAI,EAAE,MAAM,CAAC;IACb,OAAO,EAAE,cAAc,EAAE,CAAC;CAC3B;AAED;;;;GAIG;AACH,wBAAgB,2BAA2B,CAAC,OAAO,EAAE;IACnD,SAAS,EAAE,YAAY,EAAE,CAAC;IAC1B,MAAM,EAAE,WAAW,CAAC;CACrB,GAAG,sBAAsB,EAAE,CAW3B;AAED,oFAAoF;AACpF,wBAAgB,8BAA8B,CAAC,IAAI,EAAE,sBAAsB,GAAG,MAAM,CAQnF;AAED;;;;GAIG;AACH,wBAAgB,mBAAmB,CAAC,iBAAiB,EAAE,SAAS,MAAM,EAAE,EAAE,YAAY,EAAE,SAAS,MAAM,EAAE,GAAG,OAAO,CAGlH;AAED,MAAM,WAAW,YAAY,CAAC,CAAC,SAAS,WAAW;IACjD,MAAM,EAAE,CAAC,CAAC;IACV,qFAAqF;IACrF,KAAK,EAAE,MAAM,EAAE,CAAC;CACjB;AAED;;;;;;;;GAQG;AACH,wBAAsB,oBAAoB,CAAC,CAAC,SAAS,WAAW,EAAE,OAAO,EAAE;IACzE,MAAM,EAAE,CAAC,CAAC;IACV,kGAAkG;IAClG,OAAO,EAAE;QAAE,IAAI,EAAE,MAAM,CAAC;QAAC,QAAQ,CAAC,EAAE,cAAc,EAAE,CAAA;KAAE,CAAC;IACvD,WAAW,EAAE,MAAM,CAAC;CACrB,GAAG,OAAO,CAAC,YAAY,CAAC,CAAC,CAAC,CAAC,CA6B3B"}
@@ -33,6 +33,15 @@ export declare function promptPackCodegen(options: {
33
33
  dbReady?: boolean;
34
34
  /** True when the project was just scaffolded, so the dev DB has no real data and is safe to reset. */
35
35
  freshScaffold?: boolean;
36
+ /**
37
+ * Whether anything that just landed changed the Prisma schema. False skips the migration half
38
+ * of this entirely: no reachability probe, no prompt, no manual steps. A frontend-only pack has
39
+ * no business asking about the database, and probing it would warn that Docker is down for a
40
+ * database the install never needed.
41
+ *
42
+ * Defaults to true, which is the behavior every caller had before this existed.
43
+ */
44
+ schemaChanged?: boolean;
36
45
  /** Name for the migration `migrate dev` records, e.g. "init" from `create`. Defaults to "add-packs". */
37
46
  migrationName?: string;
38
47
  runCommand?: CodegenCommandRunner;
@@ -1 +1 @@
1
- {"version":3,"file":"codegen.d.ts","sourceRoot":"","sources":["../../src/core/codegen.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,mBAAmB,CAAC;AAGpD,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,kBAAkB,CAAC;AAKnD,MAAM,MAAM,oBAAoB,GAAG,CAAC,OAAO,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,EAAE,EAAE,OAAO,EAAE;IAAE,GAAG,EAAE,MAAM,CAAA;CAAE,KAAK,OAAO,CAAC,UAAU,CAAC,CAAC;AA2DtH;;;;;;;;;;;;;;;;;;;;;GAqBG;AACH,wBAAsB,iBAAiB,CAAC,OAAO,EAAE;IAC/C,WAAW,EAAE,MAAM,CAAC;IACpB,KAAK,EAAE,UAAU,CAAC;IAClB,WAAW,EAAE,OAAO,CAAC;IACrB,uGAAuG;IACvG,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,sGAAsG;IACtG,aAAa,CAAC,EAAE,OAAO,CAAC;IACxB,wGAAwG;IACxG,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB,UAAU,CAAC,EAAE,oBAAoB,CAAC;IAClC,uGAAuG;IACvG,YAAY,CAAC,EAAE,oBAAoB,CAAC;CACrC,GAAG,OAAO,CAAC,OAAO,CAAC,CAkHnB"}
1
+ {"version":3,"file":"codegen.d.ts","sourceRoot":"","sources":["../../src/core/codegen.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,mBAAmB,CAAC;AAGpD,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,kBAAkB,CAAC;AAKnD,MAAM,MAAM,oBAAoB,GAAG,CAAC,OAAO,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,EAAE,EAAE,OAAO,EAAE;IAAE,GAAG,EAAE,MAAM,CAAA;CAAE,KAAK,OAAO,CAAC,UAAU,CAAC,CAAC;AA2DtH;;;;;;;;;;;;;;;;;;;;;GAqBG;AACH,wBAAsB,iBAAiB,CAAC,OAAO,EAAE;IAC/C,WAAW,EAAE,MAAM,CAAC;IACpB,KAAK,EAAE,UAAU,CAAC;IAClB,WAAW,EAAE,OAAO,CAAC;IACrB,uGAAuG;IACvG,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,sGAAsG;IACtG,aAAa,CAAC,EAAE,OAAO,CAAC;IACxB;;;;;;;OAOG;IACH,aAAa,CAAC,EAAE,OAAO,CAAC;IACxB,wGAAwG;IACxG,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB,UAAU,CAAC,EAAE,oBAAoB,CAAC;IAClC,uGAAuG;IACvG,YAAY,CAAC,EAAE,oBAAoB,CAAC;CACrC,GAAG,OAAO,CAAC,OAAO,CAAC,CAmInB"}
@@ -1,4 +1,4 @@
1
- import { PackContextEntry, PackDashboardRow, PackEnumEntry, PackEnvEntry, PackFile, PackFrontendRoute, PackNavbarAction, PackNavEntry, PackJob, PackOnboardingStep, PackOrgDetailComponent, PackPermissionEntry, PackProvider, PackRoute, PackSdkConfiguration, PackSettingsTab, PackSlot, PackSocket, StackPaths } from '../types/types.js';
1
+ import { PackContextEntry, PackDashboardRow, PackEnumEntry, PackEnvEntry, PackFile, PackFrontendRoute, PackNavbarAction, PackNavEntry, PackJob, PackOnboardingStep, PackOrgDetailComponent, PackPermissionEntry, PackProvider, PackRoute, PackSdkConfiguration, PackSettingsTab, PackSlot, ShellActionArea, PackSocket, StackPaths } from '../types/types.js';
2
2
  /** Replace the template workspace scope with the project scope, preserving `@hype-stack/cli`. */
3
3
  export declare function rewriteTemplateScope(content: string, newScope: string): string;
4
4
  /**
@@ -115,6 +115,19 @@ export declare function patchJobs(jobs: PackJob[], paths: StackPaths, projectRoo
115
115
  export declare function patchDashboardRows(rows: PackDashboardRow[], paths: StackPaths, projectRoot: string): Promise<void>;
116
116
  export declare function patchOrgDetailsRows(components: PackOrgDetailComponent[], paths: StackPaths, projectRoot: string): Promise<void>;
117
117
  export declare function patchOrgDetailsCards(components: PackOrgDetailComponent[], paths: StackPaths, projectRoot: string): Promise<void>;
118
+ interface ShellActionAreaSpec {
119
+ /** Name of the exported array the area's entries live in. */
120
+ arrayName: string;
121
+ /** Element type of that array, as written in the file. */
122
+ typeName: string;
123
+ /** Which shells can render this area. */
124
+ shells: readonly PackSlot[];
125
+ }
126
+ /**
127
+ * Where each area lives. Web areas resolve against the frontend or admin shell
128
+ * (whichever the pack was selected for); the drawer area only exists on mobile.
129
+ */
130
+ export declare const SHELL_ACTION_AREAS: Record<ShellActionArea, ShellActionAreaSpec>;
118
131
  export interface PatchActionsOptions {
119
132
  actions: PackNavbarAction[];
120
133
  paths: StackPaths;
@@ -122,8 +135,21 @@ export interface PatchActionsOptions {
122
135
  /** App shell to target (frontend by default, admin when retargeted). */
123
136
  slot?: PackSlot;
124
137
  }
138
+ export interface PatchShellActionsOptions extends PatchActionsOptions {
139
+ area: ShellActionArea;
140
+ }
125
141
  export declare function patchNavbarActions(options: PatchActionsOptions): Promise<void>;
126
142
  export declare function patchUserMenuActions(options: PatchActionsOptions): Promise<void>;
143
+ /** The actions file for a shell, relative to the project root. */
144
+ export declare function resolveShellActionsFile(slot: PackSlot | undefined, paths: StackPaths): string;
145
+ /**
146
+ * Add actions to one area of one shell. Idempotent: an action already in the
147
+ * area (by id) is left alone, an import already present is not repeated. The
148
+ * file is created from the shell's template when missing, and an area export
149
+ * missing from an older file is appended, so a project generated before an area
150
+ * existed still gets it wired.
151
+ */
152
+ export declare function patchShellActions({ actions, area, paths, projectRoot, slot, }: PatchShellActionsOptions): Promise<void>;
127
153
  export interface PatchProvidersOptions {
128
154
  providers: PackProvider[];
129
155
  paths: StackPaths;
@@ -1 +1 @@
1
- {"version":3,"file":"codemods.d.ts","sourceRoot":"","sources":["../../src/core/codemods.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EACV,gBAAgB,EAChB,gBAAgB,EAChB,aAAa,EACb,YAAY,EACZ,Q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;IACH,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB;;;OAGG;IACH,QAAQ,CAAC,EAAE,OAAO,CAAC;CACpB;AAED;;;;;;;;;GASG;AACH,wBAAsB,uBAAuB,CAAC,OAAO,EAAE,8BAA8B,GAAG,OAAO,CAAC,IAAI,CAAC,CAkDpG;AAoOD;;;;;;;;;;;;GAYG;AACH,wBAAsB,sBAAsB,CAAC,IAAI,EAAE;IAAE,KAAK,EAAE,UAAU,CAAC;IAAC,WAAW,EAAE,MAAM,CAAA;CAAE,GAAG,OAAO,CAAC,IAAI,CAAC,CAsD5G"}
@@ -1,9 +1,30 @@
1
- import { PackManifest, PackSlot, SourceRevision, StackConfig, TemplateManifest } from '../types/types.js';
1
+ import { PackManifest, PackSlot, PackSource, ShellActionRecord, SourceRevision, StackConfig, StackPaths, TemplateManifest } from '../types/types.js';
2
2
  export interface InstallResult {
3
3
  installed: string[];
4
4
  skipped: string[];
5
5
  errors: string[];
6
+ /** Shell actions this install wired, for `markPackInstalled` to record. */
7
+ shellActions: ShellActionRecord[];
6
8
  }
9
+ /**
10
+ * Whether any of the files that just landed contribute to the Prisma schema.
11
+ *
12
+ * Packs add models by dropping a file into `{{backend.prisma}}/schema/` and letting Prisma's
13
+ * multi-file schema do the merging, so "this install needs a migration" is exactly "something
14
+ * landed under the backend's prisma directory". Nothing else touches the schema: no codemod
15
+ * writes `.prisma`, and a schema file that was skipped because it already existed changed
16
+ * nothing, which is why this reads `installed` rather than the manifest.
17
+ *
18
+ * Takes the raw target templates `InstallResult.installed` holds (`installFile` returns
19
+ * `file.target`), so it resolves each one before comparing. Directory entries are covered by the
20
+ * same containment test as single files. `TemplateOverlayResult.installed` mixes those templates
21
+ * with plain project-relative paths from `overlayDir`; both work, since a path with no `{{}}` in
22
+ * it comes back from `resolvePathTemplate` untouched.
23
+ *
24
+ * Returns true when the project's `stack.json` predates the `backend.prisma` path key: without
25
+ * it there is no way to tell, and the conservative answer is to keep asking.
26
+ */
27
+ export declare function touchesPrismaSchema(installedTargets: string[], paths: StackPaths, projectRoot: string): boolean;
7
28
  interface PackInstallOptions {
8
29
  manifest: PackManifest;
9
30
  config: StackConfig;
@@ -25,11 +46,29 @@ export interface FileConflict {
25
46
  targetPath: string;
26
47
  }
27
48
  /**
28
- * Find every file that `applyPackInstall` would silently skip because its target already exists.
29
- * Only `create` files can conflict: `skip-if-exists` is an intentional no-op and `merge` /
30
- * `merge-json` edit the existing file in place. Deduplicated by resolved path so the same target is
31
- * never reported twice.
49
+ * Every file a pack would write into this project, as absolute target paths, walking directory
50
+ * entries down to their files. Merge strategies are left out: those edit a file the project owns
51
+ * rather than putting one down. This is what a starter swap diffs to know which of the old
52
+ * starter's files the new one does not ship.
32
53
  */
54
+ export declare function listPackTargets(options: {
55
+ manifest: PackManifest;
56
+ packDir: string;
57
+ config: StackConfig;
58
+ projectRoot: string;
59
+ slots?: PackSlot[];
60
+ }): Promise<Set<string>>;
61
+ /**
62
+ * The resolved target path of every `create` entry a pack would install, directory entries
63
+ * included. This is the granularity `installFile` and `findInstallConflicts` decide at, so an
64
+ * overwrite approval has to name one of these, not a file inside a directory entry.
65
+ */
66
+ export declare function listPackEntryTargets(options: {
67
+ manifest: PackManifest;
68
+ config: StackConfig;
69
+ projectRoot: string;
70
+ slots?: PackSlot[];
71
+ }): Promise<string[]>;
33
72
  export declare function findInstallConflicts(options: {
34
73
  packs: PreparedPack[];
35
74
  config: StackConfig;
@@ -51,13 +90,18 @@ export declare function planPackInstall(options: PackInstallOptions): Promise<st
51
90
  export declare function applyPackInstall(options: PackInstallOptions): Promise<InstallResult>;
52
91
  export interface PreparedPack {
53
92
  manifest: PackManifest;
54
- /** Directory holding the pack files downloaded from the backend. */
93
+ /** Directory holding the staged pack files. Always a temp dir the caller owns and deletes. */
55
94
  packDir: string;
56
95
  /**
57
96
  * Where these files came from, as reported by the download. Recorded in `stack.json` so the
58
97
  * project knows which revision of the pack it has. Null against an API that predates it.
59
98
  */
60
99
  revision?: SourceRevision | null;
100
+ /**
101
+ * Which lane the pack arrived through. Absent means the registry, which is what every install
102
+ * was before community packs existed.
103
+ */
104
+ source?: PackSource;
61
105
  }
62
106
  export interface InstallPlanResult {
63
107
  installed: string[];
@@ -105,6 +149,10 @@ export declare function markPackInstalled(options: {
105
149
  projectRoot: string;
106
150
  /** Provenance from the download. Absent against an API that does not report one. */
107
151
  revision?: SourceRevision | null;
152
+ /** Which lane the pack arrived through. Absent (or `registry`) for the catalog. */
153
+ source?: PackSource;
154
+ /** Shell actions the install wired, from `InstallResult.shellActions`. Replaces the pack's previous records. */
155
+ shellActions?: ShellActionRecord[];
108
156
  }): Promise<StackConfig>;
109
157
  export interface TemplateOverlayResult {
110
158
  installed: string[];
@@ -1 +1 @@
1
- {"version":3,"file":"installer.d.ts","sourceRoot":"","sources":["../../src/core/installer.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAEV,YAAY,EACZ,QAAQ,EACR,cAAc,EACd,WAAW,EAEX,gBAAgB,EACjB,MAAM,mBAAmB,CAAC;AAmC3B,MAAM,WAAW,aAAa;IAC5B,SAAS,EAAE,MAAM,EAAE,CAAC;IACpB,OAAO,EAAE,MAAM,EAAE,CAAC;IAClB,MAAM,EAAE,MAAM,EAAE,CAAC;CAClB;AAgSD,UAAU,kBAAkB;IAC1B,QAAQ,EAAE,YAAY,CAAC;IACvB,MAAM,EAAE,WAAW,CAAC;IACpB,WAAW,EAAE,MAAM,CAAC;IACpB,KAAK,EAAE,OAAO,CAAC;IACf,+FAA+F;IAC/F,SAAS,CAAC,EAAE,GAAG,CAAC,MAAM,CAAC,CAAC;IACxB,oEAAoE;IACpE,OAAO,EAAE,MAAM,CAAC;IAChB,8EAA8E;IAC9E,KAAK,CAAC,EAAE,QAAQ,EAAE,CAAC;CACpB;AAED,MAAM,WAAW,YAAY;IAC3B,4CAA4C;IAC5C,QAAQ,EAAE,MAAM,CAAC;IACjB,iDAAiD;IACjD,MAAM,EAAE,MAAM,CAAC;IACf,8DAA8D;IAC9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,CAAC,iBAAiB,CAAC,CAwE7B;AAED;;;;;;;;;;;GAWG;AACH,wBAAsB,iBAAiB,CAAC,OAAO,EAAE;IAC/C,MAAM,EAAE,WAAW,CAAC;IACpB,wFAAwF;IACxF,QAAQ,EAAE,YAAY,GAAG,MAAM,CAAC;IAChC,WAAW,EAAE,MAAM,CAAC;IACpB,oFAAoF;IACpF,QAAQ,CAAC,EAAE,cAAc,GAAG,IAAI,CAAC;IACjC,mFAAmF;IACnF,MAAM,CAAC,EAAE,UAAU,CAAC;IACpB,gHAAgH;IAChH,YAAY,CAAC,EAAE,iBAAiB,EAAE,CAAC;CACpC,GAAG,OAAO,CAAC,WAAW,CAAC,CAuBvB;AAcD,MAAM,WAAW,qBAAqB;IACpC,SAAS,EAAE,MAAM,EAAE,CAAC;IACpB,MAAM,EAAE,MAAM,EAAE,CAAC;CAClB;AAED;;;;;;;;;;;;;;;;;;;;;GAqBG;AACH,wBAAsB,oBAAoB,CAAC,OAAO,EAAE;IAClD,QAAQ,EAAE,gBAAgB,CAAC;IAC3B,MAAM,EAAE,WAAW,CAAC;IACpB,WAAW,EAAE,MAAM,CAAC;IACpB,iFAAiF;IACjF,WAAW,EAAE,MAAM,CAAC;CACrB,GAAG,OAAO,CAAC,qBAAqB,CAAC,CAiIjC"}
@@ -1,4 +1,4 @@
1
- import { InstallKind, InstallRecord, SourceRevision, StackConfig } from '../types/types.js';
1
+ import { InstallKind, InstallRecord, PackSource, SourceRevision, StackConfig } from '../types/types.js';
2
2
  /**
3
3
  * The install log in `stack.json`: what landed in the project, from which revision, and when.
4
4
  *
@@ -18,6 +18,12 @@ export declare function buildInstallRecord(options: {
18
18
  commit?: string | null;
19
19
  /** Used when the download reported no revision, e.g. the version from the local manifest. */
20
20
  version?: string;
21
+ /**
22
+ * Where the files came from, for anything outside our own registry. A `registry` source is
23
+ * dropped rather than written out: it is the default, and a record that states the obvious on
24
+ * every entry makes the ones that matter harder to spot.
25
+ */
26
+ source?: PackSource;
21
27
  /** Defaults to now. Injected by tests so timestamps are predictable. */
22
28
  installedAt?: Date;
23
29
  }): InstallRecord;
@@ -1 +1 @@
1
- {"version":3,"file":"installs.d.ts","sourceRoot":"","sources":["../../src/core/installs.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,WAAW,EAAE,aAAa,EAAE,cAAc,EAAE,WAAW,EAAE,MAAM,mBAAmB,CAAC;AAEjG;;;;;GAKG;AAEH;;;;GAIG;AACH,wBAAgB,kBAAkB,CAAC,OAAO,EAAE;IAC1C,IAAI,EAAE,WAAW,CAAC;IAClB,EAAE,EAAE,MAAM,CAAC;IACX,QAAQ,CAAC,EAAE,cAAc,GAAG,IAAI,CAAC;IACjC,8FAA8F;IAC9F,MAAM,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IACvB,6FAA6F;IAC7F,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,wEAAwE;IACxE,WAAW,CAAC,EAAE,IAAI,CAAC;CACpB,GAAG,aAAa,CAahB;AAED,oFAAoF;AACpF,wBAAgB,aAAa,CAAC,MAAM,EAAE,WAAW,EAAE,MAAM,EAAE,aAAa,GAAG,WAAW,CAErF;AAED;;;;GAIG;AACH,wBAAgB,aAAa,CAAC,MAAM,EAAE,WAAW,EAAE,IAAI,EAAE,WAAW,EAAE,EAAE,EAAE,MAAM,GAAG,aAAa,GAAG,IAAI,CAGtG;AAED,qGAAqG;AACrG,wBAAgB,WAAW,CAAC,MAAM,EAAE,MAAM,GAAG,IAAI,GAAG,SAAS,GAAG,MAAM,GAAG,IAAI,CAE5E"}
1
+ {"version":3,"file":"installs.d.ts","sourceRoot":"","sources":["../../src/core/installs.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,WAAW,EAAE,aAAa,EAAE,UAAU,EAAE,cAAc,EAAE,WAAW,EAAE,MAAM,mBAAmB,CAAC;AAE7G;;;;;GAKG;AAEH;;;;GAIG;AACH,wBAAgB,kBAAkB,CAAC,OAAO,EAAE;IAC1C,IAAI,EA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G,EAAE;IAAE,UAAU,EAAE;QAAE,OAAO,EAAE,UAAU,CAAA;KAAE,CAAA;CAAE,EAAE,GAAG,SAAS,GACzD,UAAU,EAAE,CAWd;AAED;;;;GAIG;AACH,wBAAgB,iBAAiB,CAAC,QAAQ,EAAE,UAAU,EAAE,GAAG,UAAU,EAAE,CAStE;AAED;;;;GAIG;AACH,eAAO,MAAM,QAAQ,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,EAAE,CAsB7C,CAAC;AAEF,4EAA4E;AAC5E,wBAAgB,eAAe,CAAC,cAAc,EAAE,MAAM,EAAE,GAAG,MAAM,EAAE,CAalE"}
@@ -0,0 +1,70 @@
1
+ import { StackPaths } from '../types/types.js';
2
+ /**
3
+ * The pack format, as data an agent can act on.
4
+ *
5
+ * This exists because the failure mode when an agent writes a pack blind is not a crash: it is a
6
+ * manifest that installs cleanly and quietly does nothing, because a file was never declared or a
7
+ * target named an app the project does not have. Handing over the rules up front is far cheaper
8
+ * than letting it discover them one validation error at a time.
9
+ *
10
+ * Everything here is derived from the constants `validatePackDir` actually enforces, so the guide
11
+ * cannot drift from the checks. Prose that is not enforced anywhere is kept to the `conventions`
12
+ * and `mistakes` lists, where it is clearly advice rather than a rule.
13
+ */
14
+ export interface WiringField {
15
+ field: string;
16
+ patches: string;
17
+ purpose: string;
18
+ surface: "backend" | "frontend" | "admin" | "shared";
19
+ }
20
+ /**
21
+ * Every manifest field that makes the CLI patch a file, and what it patches.
22
+ *
23
+ * This list is the one thing an agent cannot infer from the JSON schema alone: the schema says a
24
+ * field takes an array of objects, but not that declaring it is how a route ends up registered.
25
+ * Keep it in step with the dispatch chain in `applyPackInstall`.
26
+ */
27
+ export declare const WIRING_FIELDS: readonly WiringField[];
28
+ export declare const FILE_STRATEGY_NOTES: Readonly<Record<string, string>>;
29
+ /** Rules the validator enforces. Breaking one of these fails `validate_pack`. */
30
+ export declare const HARD_RULES: readonly string[];
31
+ /** Advice the validator does not enforce, but that separates a good pack from a working one. */
32
+ export declare const CONVENTIONS: readonly string[];
33
+ /** The ways packs actually go wrong, phrased as the symptom so it is recognisable. */
34
+ export declare const COMMON_MISTAKES: readonly string[];
35
+ /** Hosting a pack: the three free ways, and the one that lets a registry decide who gets it. */
36
+ export declare const PUBLISHING: readonly string[];
37
+ export interface AuthoringGuide {
38
+ format: {
39
+ summary: string;
40
+ required: readonly string[];
41
+ schemaUrl: string;
42
+ categories: readonly string[];
43
+ surfaces: readonly string[];
44
+ strategies: Readonly<Record<string, string>>;
45
+ slots: readonly string[];
46
+ };
47
+ wiring: readonly WiringField[];
48
+ rules: readonly string[];
49
+ conventions: readonly string[];
50
+ mistakes: readonly string[];
51
+ workflow: readonly string[];
52
+ /** How to host a pack so others can install it, including behind a paywall. */
53
+ publishing: readonly string[];
54
+ /** Path templates this specific project resolves, when the guide was asked for inside one. */
55
+ projectPathTemplates?: readonly string[];
56
+ /** Packs already installed here, so a dependency can name something real. */
57
+ installedPacks?: readonly string[];
58
+ }
59
+ /**
60
+ * Build the guide, narrowed to a project when one is available.
61
+ *
62
+ * The project-aware half is what makes this worth a tool call rather than a docs link: an agent
63
+ * writing a pack for a specific app should be told the path templates that app actually resolves
64
+ * and the packs it can legally depend on, instead of guessing from a generic list.
65
+ */
66
+ export declare function buildAuthoringGuide(project?: {
67
+ paths?: StackPaths | null;
68
+ installedPacks?: readonly string[];
69
+ }): AuthoringGuide;
70
+ //# sourceMappingURL=pack-authoring.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"pack-authoring.d.ts","sourceRoot":"","sources":["../../src/core/pack-authoring.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,mBAAmB,CAAC;AAEpD;;;;;;;;;;;GAWG;AAEH,MAAM,WAAW,WAAW;IAC1B,KAAK,EAAE,MAAM,CAAC;IACd,OAAO,EAAE,MAAM,CAAC;IAChB,OAAO,EAAE,MAAM,CAAC;IAChB,OAAO,EAAE,SAAS,GAAG,UAAU,GAAG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AS,MAAM,EAAE,CAAC;CACpC;AAED;;;;;;GAMG;AACH,wBAAgB,mBAAmB,CAAC,OAAO,CAAC,EAAE;IAC5C,KAAK,CAAC,EAAE,UAAU,GAAG,IAAI,CAAC;IAC1B,cAAc,CAAC,EAAE,SAAS,MAAM,EAAE,CAAC;CACpC,GAAG,cAAc,CA2BjB"}
@@ -17,6 +17,14 @@ export interface PackChoiceGroup {
17
17
  * groups (starter, features), which install without a slot.
18
18
  */
19
19
  slot?: PackSlot;
20
+ /**
21
+ * Swappable family this group resolves to one pick (e.g. `pack-billing`). Set on the one-of
22
+ * groups carved out of the feature list; starter and layout groups are families too but are
23
+ * addressed by category, so they leave this unset.
24
+ */
25
+ family?: string;
26
+ /** The group may be answered with "none". Only feature families are optional. */
27
+ optional?: boolean;
20
28
  }
21
29
  /** Fixed order the picker walks the modules in: foundation first, then shell, then add-ons. */
22
30
  export declare const CATEGORY_ORDER: PackCategory[];
@@ -39,4 +47,9 @@ export interface BuildPackChoiceGroupsOptions {
39
47
  * dropped, so a fully-installed module never shows an empty prompt.
40
48
  */
41
49
  export declare function buildPackChoiceGroups(selectable: PackListItem[], options?: BuildPackChoiceGroupsOptions): PackChoiceGroup[];
50
+ /**
51
+ * The backend names each family ("Billing" for `pack-billing`). Older backends send no label, so
52
+ * fall back to the family id with its `pack-` prefix dropped and the words capitalised.
53
+ */
54
+ export declare function familyLabel(family: string, members: PackListItem[]): string;
42
55
  //# sourceMappingURL=pack-categories.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"pack-categories.d.ts","sourceRoot":"","sources":["../../src/core/pack-categories.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,YAAY,EAAE,YAAY,EAAE,QAAQ,EAAE,MAAM,mBAAmB,CAAC;AAE9E,sDAAsD;AACtD,MAAM,MAAM,UAAU,GAAG,QAAQ,GAAG,UAAU,CAAC;AAE/C,MAAM,WAAW,eAAe;IAC9B,QAAQ,EAAE,YAAY,CAAC;IACvB,sCAAs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