@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
@@ -0,0 +1,39 @@
1
+ import { PackCategory } from '../types/types.js';
2
+ /** A surface a scaffolded pack can ship code for. */
3
+ export type PackSurface = "frontend" | "backend" | "admin" | "mobile";
4
+ export declare const PACK_SURFACES: readonly PackSurface[];
5
+ export interface ScaffoldPackOptions {
6
+ /** Directory to create. Must not already contain anything. */
7
+ packDir: string;
8
+ name: string;
9
+ category: PackCategory;
10
+ displayName: string;
11
+ description: string;
12
+ surfaces: readonly PackSurface[];
13
+ }
14
+ export interface ScaffoldResult {
15
+ packDir: string;
16
+ /** Paths written, relative to `packDir`. */
17
+ files: string[];
18
+ manifestPath: string;
19
+ }
20
+ /** Where the published manifest schema lives, so an author's editor can complete the fields. */
21
+ export declare function manifestSchemaUrl(): string;
22
+ /**
23
+ * Write a pack skeleton that passes `validatePackDir` on the first run.
24
+ *
25
+ * Kept pure and prompt-free so the `community init` command and the MCP tool produce byte-identical
26
+ * packs. An agent scaffolding one and a person scaffolding one should never end up with different
27
+ * conventions to explain to each other.
28
+ */
29
+ export declare function scaffoldPack(options: ScaffoldPackOptions): Promise<ScaffoldResult>;
30
+ /**
31
+ * A readable name from a pack slug, without the category prefix.
32
+ *
33
+ * `pack-analytics` is "Analytics", not "Pack Analytics". The prefix is a naming convention for the
34
+ * directory, and repeating it in the picker just makes every row start with the same word.
35
+ */
36
+ export declare function defaultDisplayName(value: string): string;
37
+ export declare function stripCategoryPrefix(value: string): string;
38
+ export declare function slugifyPackName(value: string): string;
39
+ //# sourceMappingURL=pack-scaffold.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"pack-scaffold.d.ts","sourceRoot":"","sources":["../../src/core/pack-scaffold.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAE,YAAY,EAAY,MAAM,mBAAmB,CAAC;AAEhE,qDAAqD;AACrD,MAAM,MAAM,WAAW,GAAG,UAAU,GAAG,SAAS,GAAG,OAAO,GAAG,QAAQ,CAAC;AAEtE,eAAO,MAAM,aAAa,EAAE,SAAS,WAAW,EAA+C,CAAC;AAEhG,MAAM,WAAW,mBAAmB;IAClC,8DAA8D;IAC9D,OAAO,EAAE,MAAM,CAAC;IAChB,IAAI,EAAE,MAAM,CAAC;IACb,QAAQ,EAAE,YAAY,CAAC;IACvB,WAAW,EAAE,MAAM,CAAC;IACpB,WAAW,EAAE,MAAM,CAAC;IACpB,QAAQ,EAAE,SAAS,WAAW,EAAE,CAAC;CAClC;AAED,MAAM,WAAW,cAAc;IAC7B,OAAO,EAAE,MAAM,CAAC;IAChB,4CAA4C;IAC5C,KAAK,EAAE,MAAM,EAAE,CAAC;IAChB,YAAY,EAAE,MAAM,CAAC;CACtB;AAED,gGAAgG;AAChG,wBAAgB,iBAAiB,IAAI,MAAM,CAE1C;AAED;;;;;;GAMG;AACH,wBAAsB,YAAY,CAAC,OAAO,EAAE,mBAAmB,GAAG,OAAO,CAAC,cAAc,CAAC,CAsDxF;AAED;;;;;GAKG;AACH,wBAAgB,kBAAkB,CAAC,KAAK,EAAE,MAAM,GAAG,MAAM,CAMxD;AAED,wBAAgB,mBAAmB,CAAC,KAAK,EAAE,MAAM,GAAG,MAAM,CAEzD;AAED,wBAAgB,eAAe,CAAC,KAAK,EAAE,MAAM,GAAG,MAAM,CAKrD"}
@@ -0,0 +1,49 @@
1
+ import { PackListItem, PackManifest, PackSource } from '../types/types.js';
2
+ import { PreparedPack } from './installer.js';
3
+ /**
4
+ * Classify a `--community <spec>` argument, or a bare pack name from the catalog.
5
+ *
6
+ * Order matters: a path is checked first so `./github:weird` stays a path, and the registry is the
7
+ * fallback so every invocation that worked before this existed still resolves the same way.
8
+ */
9
+ export declare function parsePackSpec(spec: string): PackSource;
10
+ /** How a source reads in a sentence, for prompts and errors. */
11
+ export declare function describeSource(source: PackSource): string;
12
+ /**
13
+ * Read and sanity-check a pack manifest sitting in `dir`.
14
+ *
15
+ * Only the fields the installer cannot work without are checked here. The full rule set lives in
16
+ * `pack-validate.ts`, which `hype-stack community validate` runs and which an author sees long
17
+ * before anyone installs their pack. This is the last line, phrased for whoever is installing
18
+ * rather than whoever wrote it.
19
+ */
20
+ export declare function readPackManifest(dir: string, source: PackSource): Promise<PackManifest>;
21
+ /**
22
+ * A content hash over everything the pack ships, as `sha256-<hex>`.
23
+ *
24
+ * The registry gets this from the backend, which computes it over the exact bytes it served. For
25
+ * a community pack nobody else is in a position to, so the CLI does it here. It is what lets a
26
+ * later `stack.json` reader tell "the same pack, reinstalled" from "the pack changed underneath
27
+ * me", which for a local checkout under active editing is the common question.
28
+ */
29
+ export declare function hashPackDir(dir: string): Promise<string>;
30
+ /**
31
+ * Fetch a community pack and stage it the way `downloadPack` stages a registry one: files in a
32
+ * temp directory the caller owns and deletes, plus the revision to record in `stack.json`.
33
+ *
34
+ * Registry sources are not handled here. They keep going through `downloadPack`, which is the only
35
+ * path that can authorize a paid pack.
36
+ */
37
+ export declare function preparePackFromSource(source: PackSource, options?: {
38
+ projectRoot?: string;
39
+ }): Promise<PreparedPack>;
40
+ /**
41
+ * Present a community pack to the parts of `compose` that only speak catalog entries: the
42
+ * dependency graph, the picker, the access partition, and the plan summary.
43
+ *
44
+ * Everything a community pack is worth is already in its manifest, so this is a projection rather
45
+ * than a lookup. Tier is pinned free because nothing here goes through licensing, and `community`
46
+ * marks it so the picker and the summary can say whose code this is.
47
+ */
48
+ export declare function toPackListItem(manifest: PackManifest, source: PackSource): PackListItem;
49
+ //# sourceMappingURL=pack-source.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"pack-source.d.ts","sourceRoot":"","sources":["../../src/core/pack-source.ts"],"names":[],"mappings":"AAMA,OAAO,KAAK,EAAE,YAAY,EAAE,YAAY,EAAE,UAAU,EAAkB,MAAM,mBAAmB,CAAC;AAGhG,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,gBAAgB,CAAC;AAKnD;;;;;GAKG;AACH,wBAAgB,aAAa,CAAC,IAAI,EAAE,MAAM,GAAG,UAAU,CAsBtD;AAED,gEAAgE;AAChE,wBAAgB,cAAc,CAAC,MAAM,EAAE,UAAU,GAAG,MAAM,CAczD;AAED;;;;;;;GAOG;AACH,wBAAsB,gBAAgB,CAAC,GAAG,EAAE,MAAM,EAAE,MAAM,EAAE,UAAU,GAAG,OAAO,CAAC,YAAY,CAAC,CAiC7F;AA+BD;;;;;;;GAOG;AACH,wBAAsB,WAAW,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO,CAAC,MAAM,CAAC,CAW9D;AAED;;;;;;GAMG;AACH,wBAAsB,qBAAqB,CACzC,MAAM,EAAE,UAAU,EAClB,OAAO,GAAE;IAAE,WAAW,CAAC,EAAE,MAAM,CAAA;CAAO,GACrC,OAAO,CAAC,YAAY,CAAC,CAoCvB;AAmND;;;;;;;GAOG;AACH,wBAAgB,cAAc,CAAC,QAAQ,EAAE,YAAY,EAAE,MAAM,EAAE,UAAU,GAAG,YAAY,CAcvF"}
@@ -0,0 +1,42 @@
1
+ import { FileStrategy, PackCategory, PackManifest } from '../types/types.js';
2
+ /**
3
+ * How badly a finding breaks things.
4
+ *
5
+ * `error` means the pack cannot install, or will install something broken. `warning` means it
6
+ * works but the author has probably made a mistake they want to know about. The split exists so
7
+ * `community validate` can be run early and often without every in-progress pack looking like a
8
+ * failure.
9
+ */
10
+ export type PackIssueLevel = "error" | "warning";
11
+ export interface PackIssue {
12
+ level: PackIssueLevel;
13
+ /** What is wrong, in the author's terms. */
14
+ message: string;
15
+ /** Where to look, when the finding points at one entry rather than the manifest as a whole. */
16
+ at?: string;
17
+ }
18
+ export interface PackValidation {
19
+ ok: boolean;
20
+ issues: PackIssue[];
21
+ /** Present when the manifest parsed. Absent means nothing else could be checked. */
22
+ manifest?: PackManifest;
23
+ }
24
+ export declare const VALID_STRATEGIES: readonly FileStrategy[];
25
+ export declare const VALID_CATEGORIES: readonly PackCategory[];
26
+ export declare const VALID_SLOTS: readonly ["frontend", "admin", "mobile", "extension"];
27
+ /**
28
+ * Apps a path template may address. These are the keys of `stack.json`'s `paths`, which is the
29
+ * contract between a pack and every project it installs into: a target naming anything else
30
+ * resolves to nothing and the file lands nowhere.
31
+ */
32
+ export declare const VALID_PATH_APPS: readonly ["backend", "frontend", "admin", "mobile", "extension", "enums"];
33
+ /**
34
+ * Check a pack directory the way the installer will read it, and report everything wrong at once.
35
+ *
36
+ * Deliberately whole-manifest rather than fail-fast: someone writing their first pack should get
37
+ * the full list in one run, not fix one typo and rediscover the next. This is the same ground the
38
+ * repo's own `manifest-integrity.test.ts` covers for first-party packs, moved somewhere a
39
+ * community author can actually run it.
40
+ */
41
+ export declare function validatePackDir(dir: string): Promise<PackValidation>;
42
+ //# sourceMappingURL=pack-validate.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"pack-validate.d.ts","sourceRoot":"","sources":["../../src/core/pack-validate.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,YAAY,EAAE,YAAY,EAAE,YAAY,EAAE,MAAM,mBAAmB,CAAC;AAIlF;;;;;;;GAOG;AACH,MAAM,MAAM,cAAc,GAAG,OAAO,GAAG,SAAS,CAAC;AAEjD,MAAM,WAAW,SAAS;IACxB,KAAK,EAAE,cAAc,CAAC;IACtB,4CAA4C;IAC5C,OAAO,EAAE,MAAM,CAAC;IAChB,+FAA+F;IAC/F,EAAE,CAAC,EAAE,MAAM,CAAC;CACb;AAED,MAAM,WAAW,cAAc;IAC7B,EAAE,EAAE,OAAO,CAAC;IACZ,MAAM,EAAE,SAAS,EAAE,CAAC;IACpB,oFAAoF;IACpF,QAAQ,CAAC,EAAE,YAAY,CAAC;CACzB;AAED,eAAO,MAAM,gBAAgB,EAAE,SAAS,YAAY,EAAoE,CAAC;AACzH,eAAO,MAAM,gBAAgB,EAAE,SAAS,YAAY,EAAqC,CAAC;AAC1F,eAAO,MAAM,WAAW,uDAAwD,CAAC;AAEjF;;;;GAIG;AACH,eAAO,MAAM,eAAe,2EAA4E,CAAC;AAEzG;;;;;;;GAOG;AACH,wBAAsB,eAAe,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO,CAAC,cAAc,CAAC,CA4B1E"}
@@ -0,0 +1,27 @@
1
+ import { ExecResult, exec } from '../utils/exec.js';
2
+ /**
3
+ * The generated project pins pnpm 12+, which is a native binary, and two common toolchains cannot
4
+ * reach it from the machine's own `pnpm`:
5
+ *
6
+ * - A corepack that predates pnpm 11 still hardcodes `bin/pnpm.cjs` as pnpm's entry point. That
7
+ * file no longer ships, so corepack downloads the pinned version into its cache and dies loading
8
+ * it: "Cannot find module .../pnpm.cjs".
9
+ * - An older pnpm self-switches to the pinned version with build scripts disabled, which leaves
10
+ * the package's placeholder `bin/pnpm` in place of the real binary. Executing it gives ENOEXEC,
11
+ * or a shell syntax error once the shell reads the placeholder's prose as a script.
12
+ */
13
+ export declare function isBrokenPnpmToolchain(output: string): boolean;
14
+ /** Test seam. */
15
+ export declare function resetPnpmFallback(): void;
16
+ /**
17
+ * Run a command like `exec`, but make `pnpm` invocations survive a machine whose own pnpm cannot
18
+ * reach the project's pinned version. When a pnpm call fails with a known toolchain fingerprint,
19
+ * the same call reruns as `npx -y pnpm@<exact pin>` - npx installs the pinned pnpm with its build
20
+ * scripts enabled, so the native binary actually lands. The point is that `create`, `compose`, and
21
+ * `template` finish on such a machine instead of printing advice.
22
+ *
23
+ * Non-pnpm commands and failures that are not the toolchain's fault pass through untouched, so a
24
+ * real install error never gets retried into running twice.
25
+ */
26
+ export declare function execWithPnpmRecovery(command: string, args: string[], options: Parameters<typeof exec>[2]): Promise<ExecResult>;
27
+ //# sourceMappingURL=pnpm.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"pnpm.d.ts","sourceRoot":"","sources":["../../src/core/pnpm.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,kBAAkB,CAAC;AACnD,OAAO,EAAE,IAAI,EAAE,MAAM,kBAAkB,CAAC;AAExC;;;;;;;;;;GAUG;AACH,wBAAgB,qBAAqB,CAAC,MAAM,EAAE,MAAM,GAAG,OAAO,CAO7D;AA8BD,iBAAiB;AACjB,wBAAgB,iBAAiB,IAAI,IAAI,CAExC;AAED;;;;;;;;;GASG;AACH,wBAAsB,oBAAoB,CACxC,OAAO,EAAE,MAAM,EACf,IAAI,EAAE,MAAM,EAAE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,CAAC;CAChB;AAED,MAAM,WAAW,mBAAmB;IAClC;;;;OAIG;IACH,EAAE,EAAE,OAAO,CAAC;IACZ,KAAK,EAAE,iBAAiB,EAAE,CAAC;IAC3B,iBAAiB,EAAE,gBAAgB,EAAE,CAAC;IACtC,oEAAoE;IACpE,YAAY,EAAE,MAAM,EAAE,CAAC;CACxB;AAQD;;;;;;;;;;;;;;;;;GAiBG;AACH,wBAAsB,gBAAgB,CACpC,SAAS,EAAE,MAAM,EACjB,OAAO,GAAE,oBAAyB,GACjC,OAAO,CAAC,mBAAmB,CAAC,CA2I9B"}
@@ -1,7 +1,11 @@
1
1
  /** Minimum Node the generated template supports. The backend and Vite tooling assume this. */
2
2
  export declare const MIN_NODE_MAJOR = 20;
3
- /** pnpm 9 is the first release with the workspace protocol behavior the template relies on. */
4
- export declare const MIN_PNPM_MAJOR = 9;
3
+ /**
4
+ * The template pins pnpm 12 (`packageManager`), and older pnpm cannot even switch to it: the
5
+ * self-switch installs the pinned version with build scripts off, leaving a placeholder where
6
+ * the native binary should be. Requiring 12 up front turns that dead end into one clear step.
7
+ */
8
+ export declare const MIN_PNPM_MAJOR = 12;
5
9
  export type RequirementLevel = "required" | "recommended";
6
10
  export interface RequirementResult {
7
11
  name: string;
@@ -1 +1 @@
1
- {"version":3,"file":"preflight.d.ts","sourceRoot":"","sources":["../../src/core/preflight.ts"],"names":[],"mappings":"AAOA,8FAA8F;AAC9F,eAAO,MAAM,cAAc,KAAK,CAAC;AACjC,+FAA+F;AAC/F,eAAO,MAAM,cAAc,IAAI,CAAC;AAEhC,MAAM,MAAM,gBAAgB,GAAG,UAAU,GAAG,aAAa,CAAC;AAE1D,MAAM,WAAW,iBAAiB;IAChC,IAAI,EAAE,MAAM,CAAC;IACb,KAAK,EAAE,gBAAgB,CAAC;IACxB,EAAE,EAAE,OAAO,CAAC;IACZ,qFAAqF;IACrF,MAAM,EAAE,MAAM,CAAC;IACf,sDAAsD;IACtD,GAAG,CAAC,EAAE,MAAM,C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,CAAC,IAAI,CAAC,CAmC9D"}
@@ -0,0 +1,59 @@
1
+ import { PackFile, StackPaths } from '../types/types.js';
2
+ /** A top-level Prisma block. All four share one namespace, so all four can collide. */
3
+ export type PrismaDeclarationKind = "model" | "enum" | "type" | "view";
4
+ export interface PrismaDeclaration {
5
+ kind: PrismaDeclarationKind;
6
+ name: string;
7
+ }
8
+ /**
9
+ * Top-level declarations in a Prisma schema file.
10
+ *
11
+ * A regex rather than a parser: the only thing anyone needs off a `.prisma` file here is which
12
+ * names it claims, and that is the one part of the grammar guaranteed to sit at column zero. A
13
+ * real parser would be a dependency, a build step, and a version to keep in step with the
14
+ * template's Prisma, all to answer a question `^model Foo {` already answers.
15
+ */
16
+ export declare function scanPrismaDeclarations(source: string): PrismaDeclaration[];
17
+ /**
18
+ * Every name the project's schema already claims, mapped to the file that claims it.
19
+ *
20
+ * Prisma's multi-file schema is a plain directory: whatever is in it gets concatenated, and the
21
+ * project's own models sit alongside every pack's. That is what makes it so easy for packs to
22
+ * contribute, and it is exactly why two of them can quietly claim the same name.
23
+ */
24
+ export declare function readProjectDeclarations(paths: StackPaths, projectRoot: string): Promise<Map<string, string>>;
25
+ /** Every name a staged pack is about to add, mapped to the schema file it ships. */
26
+ export declare function readPackDeclarations(options: {
27
+ files: PackFile[];
28
+ packDir: string;
29
+ paths: StackPaths;
30
+ projectRoot: string;
31
+ }): Promise<Map<string, PrismaDeclaration & {
32
+ file: string;
33
+ }>>;
34
+ export interface PrismaCollision {
35
+ name: string;
36
+ kind: PrismaDeclarationKind;
37
+ /** The pack's schema file that declares it. */
38
+ incomingFile: string;
39
+ /** The schema file already in the project that declares it. */
40
+ existingFile: string;
41
+ }
42
+ /**
43
+ * Names a pack would add that the project's schema already claims.
44
+ *
45
+ * Worth catching before anything is written, because the failure it prevents is so much worse than
46
+ * it looks. Prisma concatenates the schema directory, so a duplicate `model Subscription` does not
47
+ * fail the install: it fails `prisma validate`, which means `generate` fails, which means the
48
+ * backend will not build, and the error names two files rather than the two packs that put them
49
+ * there. This turns that into a sentence naming both packs, before the project is touched.
50
+ *
51
+ * A name a pack re-declares identically to its own earlier install is still a collision here. That
52
+ * is the reinstall case, which `findInstallConflicts` already handles by asking about the file.
53
+ */
54
+ export declare function findPrismaCollisions(incoming: Map<string, PrismaDeclaration & {
55
+ file: string;
56
+ }>, claimed: Map<string, string>, ownFiles: Set<string>): PrismaCollision[];
57
+ /** The blocking error a collision produces, phrased so it names both sides. */
58
+ export declare function describeCollision(packName: string, collision: PrismaCollision): string;
59
+ //# sourceMappingURL=prisma-schema.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"prisma-schema.d.ts","sourceRoot":"","sources":["../../src/core/prisma-schema.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,QAAQ,EAAE,UAAU,EAAE,MAAM,mBAAmB,CAAC;AAI9D,uFAAuF;AACvF,MAAM,MAAM,qBAAqB,GAAG,OAAO,GAAG,MAAM,GAAG,MAAM,GAAG,MAAM,CAAC;AAEvE,MAAM,WAAW,iBAAiB;IAChC,IAAI,EAAE,qBAAqB,CAAC;IAC5B,IAAI,EAAE,MAAM,CAAC;CACd;AAED;;;;;;;GAOG;AACH,wBAAgB,sBAAsB,CAAC,MAAM,EAAE,MAAM,GAAG,iBAAiB,EAAE,CAM1E;AAED;;;;;;GAMG;AACH,wBAAsB,uBAAuB,CAAC,KAAK,EAAE,UAAU,EAAE,WAAW,EAAE,MAAM,GAAG,OAAO,CAAC,GAAG,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC,CAoBlH;AAED,oFAAoF;AACpF,wBAAsB,oBAAoB,CAAC,OAAO,EAAE;IAClD,KAAK,EAAE,QAAQ,EAAE,CAAC;IAClB,OAAO,EAAE,MAAM,CAAC;IAChB,KAAK,EAAE,UAAU,CAAC;IAClB,WAAW,EAAE,MAAM,CAAC;CACrB,GAAG,OAAO,CAAC,GAAG,CAAC,MAAM,EAAE,iBAAiB,GAAG;IAAE,IAAI,EAAE,MAAM,CAAA;CAAE,CAAC,CAAC,CAwB7D;AA4BD,MAAM,WAAW,eAAe;IAC9B,IAAI,EAAE,MAAM,CAAC;IACb,IAAI,EAAE,qBAAqB,CAAC;IAC5B,+CAA+C;IAC/C,YAAY,EAAE,MAAM,CAAC;IACrB,+DAA+D;IAC/D,YAAY,EAAE,MAAM,CAAC;CACtB;AAED;;;;;;;;;;;GAWG;AACH,wBAAgB,oBAAoB,CAClC,QAAQ,EAAE,GAAG,CAAC,MAAM,EAAE,iBAAiB,GAAG;IAAE,IAAI,EAAE,MAAM,CAAA;CAAE,CAAC,EAC3D,OAAO,EAAE,GAAG,CAAC,MAAM,EAAE,MAAM,CAAC,EAC5B,QAAQ,EAAE,GAAG,CAAC,MAAM,CAAC,GACpB,eAAe,EAAE,CAanB;AAED,+EAA+E;AAC/E,wBAAgB,iBAAiB,CAAC,QAAQ,EAAE,MAAM,EAAE,SAAS,EAAE,eAAe,GAAG,MAAM,CAQtF"}
@@ -0,0 +1,41 @@
1
+ import { RegistryEntry } from '../types/types.js';
2
+ export declare const USER_REGISTRIES_FILE = "registries.json";
3
+ /** The file a person keeps registries in, for every project on the machine. */
4
+ export declare function getUserRegistriesPath(): string;
5
+ export interface NamespacedName {
6
+ namespace: string;
7
+ name: string;
8
+ }
9
+ /** Split `@acme/pack-x` into its halves, or null when the string is not that shape. */
10
+ export declare function parseNamespacedName(spec: string): NamespacedName | null;
11
+ /**
12
+ * Turn a raw `registries` map into validated entries, keyed by namespace.
13
+ *
14
+ * `where` names the file for the error message, since a broken entry in the user file and a broken
15
+ * entry in the project file look identical from the inside and need fixing in different places.
16
+ */
17
+ export declare function normalizeRegistries(raw: unknown, where: string): Map<string, RegistryEntry>;
18
+ /**
19
+ * Every registry this project can reach: the person's own file first, then the project's
20
+ * `stack.json`, with the project winning when both define a namespace. A project that pins a
21
+ * registry should get that registry on every machine it is checked out on.
22
+ */
23
+ export declare function loadRegistries(projectRoot: string): Promise<Map<string, RegistryEntry>>;
24
+ export interface RegistryRequest {
25
+ url: string;
26
+ headers: Record<string, string>;
27
+ }
28
+ /**
29
+ * The exact request for one pack: `{name}` substituted, `${VAR}` expanded, params on the query.
30
+ *
31
+ * Expansion is the one place a secret exists in memory as a value. It happens here, at request
32
+ * time, never at config-load time, so a registry whose token is missing only fails when a pack is
33
+ * actually asked for, and nothing between the config file and the socket ever holds the value.
34
+ */
35
+ export declare function buildRegistryRequest(options: {
36
+ namespace: string;
37
+ entry: RegistryEntry;
38
+ name: string;
39
+ env?: NodeJS.ProcessEnv;
40
+ }): RegistryRequest;
41
+ //# sourceMappingURL=registries.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"registries.d.ts","sourceRoot":"","sources":["../../src/core/registries.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAoB,aAAa,EAAe,MAAM,mBAAmB,CAAC;AAsBtF,eAAO,MAAM,oBAAoB,oBAAoB,CAAC;AAEtD,+EAA+E;AAC/E,wBAAgB,qBAAqB,IAAI,MAAM,CAE9C;AAED,MAAM,WAAW,cAAc;IAC7B,SAAS,EAAE,MAAM,CAAC;IAClB,IAAI,EAAE,MAAM,CAAC;CACd;AAED,uFAAuF;AACvF,wBAAgB,mBAAmB,CAAC,IAAI,EAAE,MAAM,GAAG,cAAc,GAAG,IAAI,CAGvE;AAED;;;;;GAKG;AACH,wBAAgB,mBAAmB,CAAC,GAAG,EAAE,OAAO,EAAE,KAAK,EAAE,MAAM,GAAG,GAAG,CAAC,MAAM,EAAE,aAAa,CAAC,CAoC3F;AAYD;;;;GAIG;AACH,wBAAsB,cAAc,CAAC,WAAW,EAAE,MAAM,GAAG,OAAO,CAAC,GAAG,CAAC,MAAM,EAAE,aAAa,CAAC,CAAC,CAc7F;AAED,MAAM,WAAW,eAAe;IAC9B,GAAG,EAAE,MAAM,CAAC;IACZ,OAAO,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;CACjC;AAED;;;;;;GAMG;AACH,wBAAgB,oBAAoB,CAAC,OAAO,EAAE;IAC5C,SAAS,EAAE,MAAM,CAAC;IAClB,KAAK,EAAE,aAAa,CAAC;IACrB,IAAI,EAAE,MAAM,CAAC;IACb,GAAG,CAAC,EAAE,MAAM,CAAC,UAAU,CAAC;CACzB,GAAG,eAAe,CAwBlB"}
@@ -0,0 +1,56 @@
1
+ import { PackManifest, PackSlot, ShellActionRecord, StackConfig, StackPaths } from '../types/types.js';
2
+ /**
3
+ * Shell actions are the components packs hand to layouts (see `ShellActionArea`). This module
4
+ * owns the two halves that make them survive any install order: turning a manifest into the
5
+ * exact records that apply to a project, and rebuilding the actions files from the records
6
+ * `stack.json` keeps.
7
+ *
8
+ * The patchers in `codemods.ts` are idempotent, so applying the same record twice is a no-op.
9
+ * That is what makes replay safe to run after every install: it can only add what an overwrite
10
+ * dropped, never duplicate what survived.
11
+ */
12
+ /** Which apps the project actually ships, so an action never wires into a shell that is not there. */
13
+ export interface ShellAvailability {
14
+ admin: boolean;
15
+ mobile: boolean;
16
+ extension: boolean;
17
+ }
18
+ /**
19
+ * Resolve a manifest's shell actions to the records that apply to this project.
20
+ *
21
+ * Web areas follow the shells the pack was selected for, and nothing else: an action pinned to
22
+ * one shell wires only there and only when that shell was selected, an unpinned one wires into
23
+ * every selected shell. That is the admin-safety rule from before this record existed (the org
24
+ * switcher must never land in the admin app). The drawer area is mobile-only and is not part of
25
+ * the frontend/admin selection, so it wires whenever the project ships a mobile app, the same way
26
+ * mobile-pinned nav entries do.
27
+ */
28
+ export declare function collectShellActionRecords(options: {
29
+ manifest: PackManifest;
30
+ /** Shells the pack was selected for. Defaults to frontend, matching the file installer. */
31
+ slots?: PackSlot[];
32
+ apps: ShellAvailability;
33
+ }): ShellActionRecord[];
34
+ /**
35
+ * Merge a pack's records into the project's list. A pack's previous records are dropped first, so
36
+ * reinstalling a pack whose manifest changed leaves exactly its current actions, and nothing a
37
+ * stale manifest once declared.
38
+ */
39
+ export declare function mergeShellActionRecords(existing: ShellActionRecord[] | undefined, pack: string, records: ShellActionRecord[]): ShellActionRecord[];
40
+ /** Write a set of records into the actions files they belong to, grouped so each file is patched once per area. */
41
+ export declare function applyShellActionRecords(options: {
42
+ records: ShellActionRecord[];
43
+ paths: StackPaths;
44
+ projectRoot: string;
45
+ }): Promise<void>;
46
+ /**
47
+ * Rebuild every actions file from the record. Runs at the end of an install and after a template
48
+ * overlay, the two moments a file may have been replaced wholesale. Skips shells the project no
49
+ * longer has paths for, so a record from a removed app cannot fail the install.
50
+ */
51
+ export declare function replayShellActions(options: {
52
+ config: StackConfig;
53
+ paths: StackPaths;
54
+ projectRoot: string;
55
+ }): Promise<void>;
56
+ //# sourceMappingURL=shell-actions.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"shell-actions.d.ts","sourceRoot":"","sources":["../../src/core/shell-actions.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,YAAY,EAEZ,QAAQ,EAER,iBAAiB,EACjB,WAAW,EACX,UAAU,EACX,MAAM,mBAAmB,CAAC;AAG3B;;;;;;;;;GASG;AAEH,sGAAsG;AACtG,MAAM,WAAW,iBAAiB;IAChC,KAAK,EAAE,OAAO,CAAC;IACf,MAAM,EAAE,OAAO,CAAC;IAChB,SAAS,EAAE,OAAO,CAAC;CACpB;AAcD;;;;;;;;;GASG;AACH,wBAAgB,yBAAyB,CAAC,OAAO,EAAE;IACjD,QAAQ,EAAE,YAAY,CAAC;IACvB,2FAA2F;IAC3F,KAAK,CAAC,EAAE,QAAQ,EAAE,CAAC;IACnB,IAAI,EAAE,iBAAiB,CAAC;CACzB,GAAG,iBAAiB,EAAE,CAuBtB;AAED;;;;GAIG;AACH,wBAAgB,uBAAuB,CACrC,QAAQ,EAAE,iBAAiB,EAAE,GAAG,SAAS,EACzC,IAAI,EAAE,MAAM,EACZ,OAAO,EAAE,iBAAiB,EAAE,GAC3B,iBAAiB,EAAE,CAGrB;AAED,mHAAmH;AACnH,wBAAsB,uBAAuB,CAAC,OAAO,EAAE;IACrD,OAAO,EAAE,iBAAiB,EAAE,CAAC;IAC7B,KAAK,EAAE,UAAU,CAAC;IAClB,WAAW,EAAE,MAAM,CAAC;CACrB,GAAG,OAAO,CAAC,IAAI,CAAC,CAehB;AAED;;;;GAIG;AACH,wBAAsB,kBAAkB,CAAC,OAAO,EAAE;IAChD,MAAM,EAAE,WAAW,CAAC;IACpB,KAAK,EAAE,UAAU,CAAC;IAClB,WAAW,EAAE,MAAM,CAAC;CACrB,GAAG,OAAO,CAAC,IAAI,CAAC,CAKhB"}
@@ -9,7 +9,9 @@ export declare function getDefaultPaths(workspace: DetectedWorkspace): StackPath
9
9
  * template repo commit the project was cloned from. `init` on an existing project leaves it empty:
10
10
  * there is no honest way to say where code that is already on disk came from.
11
11
  */
12
- export declare function createStackConfig(name: string, workspace: DetectedWorkspace, installs?: InstallRecord[]): StackConfig;
12
+ export declare function createStackConfig(name: string, workspace: DetectedWorkspace, installs?: InstallRecord[]): StackConfig & {
13
+ paths: StackPaths;
14
+ };
13
15
  export declare function ensureStackConfig(cwd: string): Promise<StackConfig | null>;
14
16
  export declare function isHypeStackProject(cwd: string): Promise<boolean>;
15
17
  export declare function resolvePathTemplate(template: string, paths: StackPaths): string;
@@ -1 +1 @@
1
- {"version":3,"file":"stack-config.d.ts","sourceRoot":"","sources":["../../src/core/stack-config.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,iBAAiB,EAAE,aAAa,EAAE,WAAW,EAAE,UAAU,EAAE,MAAM,mBAAmB,CAAC;AAGnG,wBAAsB,eAAe,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO,CAAC,WAAW,GAAG,IAAI,CAAC,CAG9E;AAED,wBAAsB,cAAc,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO,CAAC,OAAO,CAAC,CAGlE;AAED,wBAAsB,gBAAgB,CAAC,GAAG,EAAE,MAAM,EAAE,MAAM,EAAE,WAAW,GAAG,OAAO,CAAC,IAAI,CAAC,CAGtF;AAED,wBAAsB,eAAe,CAAC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,QAAQ,GAAE,aAAa,EAAO,GAG7B,WAAW,GAAG;IAAE,KAAK,EAAE,UAAU,CAAA;CAAE,CAWrC;AAED,wBAAsB,iBAAiB,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO,CAAC,WAAW,GAAG,IAAI,CAAC,CAMhF;AAED,wBAAsB,kBAAkB,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO,CAAC,OAAO,CAAC,CAOtE;AAED,wBAAgB,mBAAmB,CAAC,QAAQ,EAAE,MAAM,EAAE,KAAK,EAAE,UAAU,GAAG,MAAM,CAY/E"}
@@ -0,0 +1,71 @@
1
+ import { PackSlot, StackConfig, StackPaths } from '../types/types.js';
2
+ import { PreparedPack } from './installer.js';
3
+ /**
4
+ * Swapping one family variant for another (the free auth starter for a SaaS starter, say) is an
5
+ * install of the new pack plus two things a plain install never does: the files only the old pack
6
+ * shipped have to go, and the old pack's records in `stack.json` have to go with them. Both live
7
+ * here so the compose command stays a sequence of steps and the swap stays one decision.
8
+ */
9
+ export interface SwapPlan {
10
+ /** Absolute paths the old pack put down that the new pack does not ship. Deleted after the new pack lands. */
11
+ superseded: string[];
12
+ /**
13
+ * Absolute paths both packs ship, and the new pack's manifest entries (files or whole
14
+ * directories) that cover any of them. The installer decides overwrites per manifest entry, so
15
+ * a shared file inside a directory entry only lands when the directory itself is approved.
16
+ */
17
+ shared: string[];
18
+ }
19
+ /**
20
+ * Diff the two packs' file sets. A file both ship is the new pack's to overwrite, since replacing
21
+ * the starter is the decision the user already made. A file only the old pack ships is deleted
22
+ * once the new one is installed: an orphaned module the new starter never imports is dead weight
23
+ * at best and a failing test at worst (the free starter's personal-workspace test would fail on
24
+ * a SaaS starter's auth config, which never creates one).
25
+ */
26
+ export declare function planVariantSwap(options: {
27
+ installed: PreparedPack;
28
+ next: PreparedPack;
29
+ config: StackConfig;
30
+ projectRoot: string;
31
+ slots?: PackSlot[];
32
+ }): Promise<SwapPlan>;
33
+ /**
34
+ * Delete the superseded files and prune the directories that emptied out, never leaving the
35
+ * project root. Returns what was actually removed (a file the user already deleted is not an
36
+ * error, it is the state we wanted).
37
+ */
38
+ export declare function removeSupersededFiles(options: {
39
+ plan: SwapPlan;
40
+ projectRoot: string;
41
+ }): Promise<string[]>;
42
+ /**
43
+ * Forget the old pack: out of `installedPacks`, its shell actions, and its capabilities, so the
44
+ * replay at the end of the install rebuilds the actions files without it and the requirement
45
+ * check sees only the new starter. The install log keeps its history; that is the record of what
46
+ * happened, not of what is here.
47
+ */
48
+ export declare function forgetInstalledPack(config: StackConfig, pack: string): StackConfig;
49
+ /**
50
+ * Put the installed layouts back on top after a starter swap. Two things the swap undid: the
51
+ * incoming starter's base shell files overwrote the layout's `override` copies (both ship
52
+ * `components/layouts`, and the swap lets the starter win on every shared file), and an app the
53
+ * starter registered again (the admin app, after the free starter) has no layout in it at all.
54
+ * Re-applying each layout with the slots it should now cover fixes both: its overrides land
55
+ * again, its files for the newly registered shell are created, and its codemods are idempotent.
56
+ * Only the files the swap touched are approved for overwrite, so a layout file the user edited
57
+ * and the swap never reached stays as it is.
58
+ */
59
+ export declare function reapplyLayoutsAfterSwap(options: {
60
+ layouts: PreparedPack[];
61
+ slotsByPack: Map<string, PackSlot[]>;
62
+ /** Files the swap overwrote (`SwapPlan.shared` of every swap), which a layout may own. */
63
+ overwrite: Set<string>;
64
+ config: StackConfig & {
65
+ paths: StackPaths;
66
+ };
67
+ projectRoot: string;
68
+ }): Promise<StackConfig & {
69
+ paths: StackPaths;
70
+ }>;
71
+ //# sourceMappingURL=swap.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"swap.d.ts","sourceRoot":"","sources":["../../src/core/swap.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,QAAQ,EAAE,WAAW,EAAE,UAAU,EAAE,MAAM,mBAAmB,CAAC;AAE3E,OAAO,EAA2D,KAAK,YAAY,EAAE,MAAM,gBAAgB,CAAC;AAI5G;;;;;GAKG;AAEH,MAAM,WAAW,QAAQ;IACvB,8GAA8G;IAC9G,UAAU,EAAE,MAAM,EAAE,CAAC;IACrB;;;;OAIG;IACH,MAAM,EAAE,MAAM,EAAE,CAAC;CAClB;AAED;;;;;;GAMG;AACH,wBAAsB,eAAe,CAAC,OAAO,EAAE;IAC7C,SAAS,EAAE,YAAY,CAAC;IACxB,IAAI,EAAE,YAAY,CAAC;IACnB,MAAM,EAAE,WAAW,CAAC;IACpB,WAAW,EAAE,MAAM,CAAC;IACpB,KAAK,CAAC,EAAE,QAAQ,EAAE,CAAC;CACpB,GAAG,OAAO,CAAC,QAAQ,CAAC,CAqBpB;AAED;;;;GAIG;AACH,wBAAsB,qBAAqB,CAAC,OAAO,EAAE;IAAE,IAAI,EAAE,QAAQ,CAAC;IAAC,WAAW,EAAE,MAAM,CAAA;CAAE,GAAG,OAAO,CAAC,MAAM,EAAE,CAAC,CAiB/G;AAcD;;;;;GAKG;AACH,wBAAgB,mBAAmB,CAAC,MAAM,EAAE,WAAW,EAAE,IAAI,EAAE,MAAM,GAAG,WAAW,CAQlF;AAED;;;;;;;;;GASG;AACH,wBAAsB,uBAAuB,CAAC,OAAO,EAAE;IACrD,OAAO,EAAE,YAAY,EAAE,CAAC;IACxB,WAAW,EAAE,GAAG,CAAC,MAAM,EAAE,QAAQ,EAAE,CAAC,CAAC;IACrC,0FAA0F;IAC1F,SAAS,EAAE,GAAG,CAAC,MAAM,CAAC,CAAC;IACvB,MAAM,EAAE,WAAW,GAAG;QAAE,KAAK,EAAE,UAAU,CAAA;KAAE,CAAC;IAC5C,WAAW,EAAE,MAAM,CAAC;CACrB,GAAG,OAAO,CAAC,WAAW,GAAG;IAAE,KAAK,EAAE,UAAU,CAAA;CAAE,CAAC,CAwB/C"}
@@ -96,4 +96,13 @@ export declare function findFamilyReplacements(candidates: string[], present: st
96
96
  * future, because membership comes from the backend's `family` field.
97
97
  */
98
98
  export declare function findFamilyVariantConflicts(selectedNames: string[], packs: PackListItem[]): FamilyVariantConflict[];
99
+ /**
100
+ * Check a `--variants family=pack` map against the template's slots before anything installs.
101
+ * Two mistakes used to pass silently: a family the template has no slot for (a typo like
102
+ * `starter=`, or `pack-billing` on a template without billing) was ignored, so the default went in
103
+ * as if nothing had been asked; and a pack from another family (`starter-saas=layout-basic`) was
104
+ * taken as the pick. Both end with the wrong code on disk, so both are errors here. Returns one
105
+ * message per problem, empty when the map is fine.
106
+ */
107
+ export declare function validateVariantChoices(slots: TemplateSlot[], variants: Record<string, string>): string[];
99
108
  //# sourceMappingURL=variants.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"variants.d.ts","sourceRoot":"","sources":["../../src/core/variants.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,YAAY,EAAE,YAAY,EAAE,MAAM,mBAAmB,CAAC;AAEpE;;;;;;;GAOG;AACH,MAAM,WAAW,cAAc;IAC7B,oCAAoC;IACpC,MAAM,EAAE,GAAG,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;IAC5B,iFAAiF;IACjF,QAAQ,EAAE,GAAG,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;CAC/B;AAED;;;GAGG;AACH,wBAAgB,mBAAmB,CAAC,KAAK,EAAE,YAAY,EAAE,EAAE,OAAO,GAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAM,GAAG,cAAc,CAa/G;AAED;;;;;;;;;;;;;;;GAeG;AACH,wBAAgB,cAAc,CAAC,KAAK,EAAE,YAAY,EAAE,EAAE,UAAU,EAAE,MAAM,EAAE,EAAE,GAAG,EAAE,cAAc,GAAG,MAAM,EAAE,CAYzG;AAED,2GAA2G;AAC3G,wBAAgB,cAAc,CAAC,IAAI,EAAE,MAAM,EAAE,GAAG,EAAE,cAAc,GAAG,MAAM,CAIxE;AAED;;;;;;;;;;;;;;GAcG;AACH,wBAAgB,4BAA4B,CAC1C,KAAK,EAAE,YAAY,EAAE,EACrB,QAAQ,EAAE,MAAM,EAAE,EAClB,SAAS,GAAE,MAAM,EAAO,GACvB,cAAc,CA8BhB;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i as n, l as r, o as i, r as a, s as o, t as s } from "./cli-CGP_pCsR.js";
1
+ import { a as e, c as t, i as n, l as r, o as i, r as a, s as o, t as s } from "./cli-CG3vutuw.js";
2
2
  export { i as composeCommand, r as createCommand, s as createProgram, e as deployCommand, o as ensureInit, t as initCommand, n as loginCommand, a as logoutCommand };
@@ -1 +1 @@
1
- {"version":3,"file":"recommendations.d.ts","sourceRoot":"","sources":["../../src/mcp/recommendations.ts"],"names":[],"mappings":"AAAA;;;;;;;;;GASG;AAEH,MAAM,WAAW,cAAc;IAC7B,oDAAoD;IACpD,QAAQ,EAAE,MAAM,CAAC;IACjB,gDAAgD;IAChD,WAAW,EAAE,MAAM,CAAC;IACpB,kEAAkE;IAClE,YAAY,EAAE,SAAS,MAAM,EAAE,CAAC;IAChC,yDAAyD;IACzD,MAAM,EAAE,MAAM,CAAC;CAChB;AAED,eAAO,MAAM,eAAe,EAAE,SAAS,cAAc,EAapD,CAAC;AAEF,MAAM,WAAW,cAAc;IAC7B,6EAA6E;IAC7E,WAAW,CAAC,EAAE,IAAI,CAAC;IACnB,mEAAmE;IACnE,kBAAkB,CAAC,EAAE,MAAM,CAAC;CAC7B;AAED,gGAAgG;AAChG,wBAAgB,YAAY,CAAC,IAAI,EAAE,MAAM,GAAG,cAAc,GAAG,IAAI,CAMhE;AAED,8EAA8E;AAC9E,wBAAgB,WAAW,CAAC,SAAS,EAAE,SAAS,MAAM,EAAE,GAAG,MAAM,EAAE,CAKlE;AAMD,MAAM,WAAW,YAAY;IAC3B,QAAQ,EAAE,MAAM,CAAC;IACjB,MAAM,EAAE,MAAM,CAAC;CAChB;AAED;;;;;GAKG;AACH,wBAAgB,aAAa,CAAC,IAAI,EAAE;IAClC,OAAO,EAAE,SAAS,MAAM,EAAE,CAAC;IAC3B,SAAS,EAAE,SAAS,MAAM,EAAE,CAAC;IAC7B,UAAU,EAAE,CAAC,IAAI,EAAE,MAAM,KAAK,MAAM,GAAG,SAAS,CAAC;CAClD,GAAG,YAAY,EAAE,CAqCjB;AAED;;;GAGG;AACH,wBAAgB,oBAAoB,IAAI,MAAM,CAO7C"}
1
+ {"version":3,"file":"recommendations.d.ts","sourceRoot":"","sources":["../../src/mcp/recommendations.ts"],"names":[],"mappings":"AAAA;;;;;;;;;GASG;AAEH,MAAM,WAAW,cAAc;IAC7B,oDAAoD;IACpD,QAAQ,EAAE,MAAM,CAAC;IACjB,gDAAgD;IAChD,WAAW,EAAE,MAAM,CAAC;IACpB,kEAAkE;IAClE,YAAY,EAAE,SAAS,MAAM,EAAE,CAAC;IAChC,yDAAyD;IACzD,MAAM,EAAE,MAAM,CAAC;CAChB;AAED,eAAO,MAAM,eAAe,EAAE,SAAS,cAAc,EAcpD,CAAC;AAEF,MAAM,WAAW,cAAc;IAC7B,6EAA6E;IAC7E,WAAW,CAAC,EAAE,IAAI,CAAC;IACnB,mEAAmE;IACnE,kBAAkB,CAAC,EAAE,MAAM,CAAC;CAC7B;AAED,gGAAgG;AAChG,wBAAgB,YAAY,CAAC,IAAI,EAAE,MAAM,GAAG,cAAc,GAAG,IAAI,CAMhE;AAED,8EAA8E;AAC9E,wBAAgB,WAAW,CAAC,SAAS,EAAE,SAAS,MAAM,EAAE,GAAG,MAAM,EAAE,CAKlE;AAMD,MAAM,WAAW,YAAY;IAC3B,QAAQ,EAAE,MAAM,CAAC;IACjB,MAAM,EAAE,MAAM,CAAC;CAChB;AAED;;;;;GAKG;AACH,wBAAgB,aAAa,CAAC,IAAI,EAAE;IAClC,OAAO,EAAE,SAAS,MAAM,EAAE,CAAC;IAC3B,SAAS,EAAE,SAAS,MAAM,EAAE,CAAC;IAC7B,UAAU,EAAE,CAAC,IAAI,EAAE,MAAM,KAAK,MAAM,GAAG,SAAS,CAAC;CAClD,GAAG,YAAY,EAAE,CAqCjB;AAED;;;GAGG;AACH,wBAAgB,oBAAoB,IAAI,MAAM,CAO7C"}
@@ -1,7 +1,7 @@
1
1
  import { McpServer } from '@modelcontextprotocol/sdk/server/mcp.js';
2
2
  export declare const SERVER_NAME = "hype-stack";
3
3
  /** Tool names, in the order they are registered. Asserted by the tests. */
4
- export declare const TOOL_NAMES: readonly ["search_catalog", "plan_install", "create_application", "add_packs", "apply_template", "setup_project", "inspect_stack", "env_status", "auth_status"];
4
+ export declare const TOOL_NAMES: readonly ["search_catalog", "plan_install", "create_application", "add_packs", "apply_template", "setup_project", "inspect_stack", "env_status", "auth_status", "pack_authoring_guide", "validate_pack"];
5
5
  /**
6
6
  * Build the server with every tool registered. Split out from {@link runMcpServer}
7
7
  * so tests can drive it over an in-memory transport without spawning a process.
@@ -1 +1 @@
1
- {"version":3,"file":"server.d.ts","sourceRoot":"","sources":["../../src/mcp/server.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,yCAAyC,CAAC;AAmBpE,eAAO,MAAM,WAAW,eAAe,CAAC;AAExC,2EAA2E;AAC3E,eAAO,MAAM,UAAU,iKAUb,CAAC;AAEX;;;GAGG;AACH,wBAAgB,eAAe,IAAI,SAAS,CAmH3C;AAcD,sEAAsE;AACtE,wBAAsB,YAAY,IAAI,OAAO,CAAC,IAAI,CAAC,CAgBlD"}
1
+ {"version":3,"file":"server.d.ts","sourceRoot":"","sources":["../../src/mcp/server.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,yCAAyC,CAAC;AA2BpE,eAAO,MAAM,WAAW,eAAe,CAAC;AAExC,2EAA2E;AAC3E,eAAO,MAAM,UAAU,0MAYb,CAAC;AAEX;;;GAGG;AACH,wBAAgB,eAAe,IAAI,SAAS,CA4I3C;AAgBD,sEAAsE;AACtE,wBAAsB,YAAY,IAAI,OAAO,CAAC,IAAI,CAAC,CAgBlD"}
@@ -1,7 +1,8 @@
1
1
  import { z } from 'zod';
2
2
  import { ToolPayload } from '../result.js';
3
3
  export declare const addPacksSchema: {
4
- packs: z.ZodArray<z.ZodString>;
4
+ packs: z.ZodDefault<z.ZodArray<z.ZodString>>;
5
+ community: z.ZodDefault<z.ZodArray<z.ZodString>>;
5
6
  cwd: z.ZodOptional<z.ZodString>;
6
7
  onConflict: z.ZodDefault<z.ZodEnum<{
7
8
  overwrite: "overwrite";
@@ -9,16 +10,21 @@ export declare const addPacksSchema: {
9
10
  }>>;
10
11
  };
11
12
  export interface AddPacksArgs {
12
- packs: string[];
13
+ packs?: string[];
14
+ community?: string[];
13
15
  cwd?: string;
14
16
  onConflict?: "keep" | "overwrite";
15
17
  }
16
18
  /**
17
- * Install packs into an existing project.
19
+ * Install packs into an existing project, from the catalog or from a community source.
18
20
  *
19
21
  * There is no prompt to fall back on here, so the caller has to state a conflict
20
22
  * policy up front and the run stops with a structured reason if it hits anything
21
23
  * else that needs a decision (no project, missing license, unknown pack).
24
+ *
25
+ * Both lanes go through one call because they go through one installer: dependency resolution and
26
+ * install order have to see every pack at once, or a community pack that depends on a catalog one
27
+ * resolves against half a graph.
22
28
  */
23
29
  export declare function addPacks(args: AddPacksArgs): Promise<ToolPayload>;
24
30
  //# sourceMappingURL=add-packs.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"add-packs.d.ts","sourceRoot":"","sources":["../../../src/mcp/tools/add-packs.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAIxB,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,cAAc,CAAC;AAGhD,eAAO,MAAM,cAAc;;;;;;;CAU1B,CAAC;AAEF,MAAM,WAAW,YAAY;IAC3B,KAAK,EAAE,MAAM,EAAE,CAAC;IAChB,GAAG,CAAC,EAAE,MAAM,CAAC;IACb,UAAU,CAAC,EAAE,MAAM,GAAG,WAAW,CAAC;CACnC;AAED;;;;;;GAMG;AACH,wBAAsB,QAAQ,CAAC,IAAI,EAAE,YAAY,GAAG,OAAO,CAAC,WAAW,CAAC,CA6BvE"}
1
+ {"version":3,"file":"add-packs.d.ts","sourceRoot":"","sources":["../../../src/mcp/tools/add-packs.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAKxB,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,cAAc,CAAC;AAGhD,eAAO,MAAM,cAAc;;;;;;;;CAgB1B,CAAC;AAEF,MAAM,WAAW,YAAY;IAC3B,KAAK,CAAC,EAAE,MAAM,EAAE,CAAC;IACjB,SAAS,CAAC,EAAE,MAAM,EAAE,CAAC;IACrB,GAAG,CAAC,EAAE,MAAM,CAAC;IACb,UAAU,CAAC,EAAE,MAAM,GAAG,WAAW,CAAC;CACnC;AAED;;;;;;;;;;GAUG;AACH,wBAAsB,QAAQ,CAAC,IAAI,EAAE,YAAY,GAAG,OAAO,CAAC,WAAW,CAAC,CA2CvE"}
@@ -18,9 +18,10 @@ export interface ApplyTemplateArgs {
18
18
  onConflict?: "keep" | "overwrite";
19
19
  }
20
20
  /**
21
- * Install a template: its starter, layout, fixed packs, and frontend overrides.
22
- * Slot variants must be passed explicitly since there is no picker to fall back
23
- * on; anything left out uses the template's default.
21
+ * Install a template: one variant per slot (starter, layout, billing, any
22
+ * family it ships), its fixed packs, and frontend overrides. Slot variants must
23
+ * be passed explicitly since there is no picker to fall back on; anything left
24
+ * out uses the template's default.
24
25
  */
25
26
  export declare function applyTemplate(args: ApplyTemplateArgs): Promise<ToolPayload>;
26
27
  //# sourceMappingURL=apply-template.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"apply-template.d.ts","sourceRoot":"","sources":["../../../src/mcp/tools/apply-template.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAIxB,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,cAAc,CAAC;AAGhD,eAAO,MAAM,mBAAmB;;;;;;;;;CAY/B,CAAC;AAEF,MAAM,WAAW,iBAAiB;IAChC,UAAU,EAAE,MAAM,CAAC;IACnB,GAAG,CAAC,EAAE,MAAM,CAAC;IACb,QAAQ,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;IAClC,KAAK,CAAC,EAAE,MAAM,EAAE,CAAC;IACjB,UAAU,CAAC,EAAE,MAAM,GAAG,WAAW,CAAC;CACnC;AAED;;;;GAIG;AACH,wBAAsB,aAAa,CAAC,IAAI,EAAE,iBAAiB,GAAG,OAAO,CAAC,WAAW,CAAC,CAyBjF"}
1
+ {"version":3,"file":"apply-template.d.ts","sourceRoot":"","sources":["../../../src/mcp/tools/apply-template.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAIxB,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,cAAc,CAAC;AAGhD,eAAO,MAAM,mBAAmB;;;;;;;;;CAc/B,CAAC;AAEF,MAAM,WAAW,iBAAiB;IAChC,UAAU,EAAE,MAAM,CAAC;IACnB,GAAG,CAAC,EAAE,MAAM,CAAC;IACb,QAAQ,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;IAClC,KAAK,CAAC,EAAE,MAAM,EAAE,CAAC;IACjB,UAAU,CAAC,EAAE,MAAM,GAAG,WAAW,CAAC;CACnC;AAED;;;;;GAKG;AAEH,wBAAsB,aAAa,CAAC,IAAI,EAAE,iBAAiB,GAAG,OAAO,CAAC,WAAW,CAAC,CAyBjF"}