outfitter 0.2.6 → 0.3.2

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 (170) hide show
  1. package/README.md +53 -28
  2. package/dist/cli.js +3 -2
  3. package/dist/index.d.ts +95 -135
  4. package/dist/index.js +8 -15
  5. package/dist/shared/{chunk-k59f60cp.js → chunk-3pwh8ys4.js} +3092 -2625
  6. package/package.json +36 -22
  7. package/dist/actions.d.ts +0 -2
  8. package/dist/actions.js +0 -34
  9. package/dist/commands/add.d.ts +0 -54
  10. package/dist/commands/add.js +0 -16
  11. package/dist/commands/check.d.ts +0 -91
  12. package/dist/commands/check.js +0 -14
  13. package/dist/commands/demo.d.ts +0 -21
  14. package/dist/commands/demo.js +0 -8
  15. package/dist/commands/docs-module-loader.d.ts +0 -2
  16. package/dist/commands/docs-module-loader.js +0 -8
  17. package/dist/commands/doctor.d.ts +0 -2
  18. package/dist/commands/doctor.js +0 -13
  19. package/dist/commands/init.d.ts +0 -7
  20. package/dist/commands/init.js +0 -31
  21. package/dist/commands/migrate-kit.d.ts +0 -2
  22. package/dist/commands/migrate-kit.js +0 -15
  23. package/dist/commands/repo.d.ts +0 -3
  24. package/dist/commands/repo.js +0 -9
  25. package/dist/commands/scaffold.d.ts +0 -4
  26. package/dist/commands/scaffold.js +0 -31
  27. package/dist/commands/shared-deps.d.ts +0 -36
  28. package/dist/commands/shared-deps.js +0 -10
  29. package/dist/commands/upgrade-codemods.d.ts +0 -42
  30. package/dist/commands/upgrade-codemods.js +0 -15
  31. package/dist/commands/upgrade-planner.d.ts +0 -58
  32. package/dist/commands/upgrade-planner.js +0 -8
  33. package/dist/commands/upgrade-workspace.d.ts +0 -76
  34. package/dist/commands/upgrade-workspace.js +0 -16
  35. package/dist/commands/upgrade.d.ts +0 -214
  36. package/dist/commands/upgrade.js +0 -25
  37. package/dist/create/index.d.ts +0 -5
  38. package/dist/create/index.js +0 -29
  39. package/dist/create/planner.d.ts +0 -3
  40. package/dist/create/planner.js +0 -21
  41. package/dist/create/presets.d.ts +0 -3
  42. package/dist/create/presets.js +0 -12
  43. package/dist/create/types.d.ts +0 -2
  44. package/dist/create/types.js +0 -1
  45. package/dist/engine/blocks.d.ts +0 -3
  46. package/dist/engine/blocks.js +0 -12
  47. package/dist/engine/collector.d.ts +0 -2
  48. package/dist/engine/collector.js +0 -8
  49. package/dist/engine/config.d.ts +0 -3
  50. package/dist/engine/config.js +0 -12
  51. package/dist/engine/executor.d.ts +0 -3
  52. package/dist/engine/executor.js +0 -16
  53. package/dist/engine/index.d.ts +0 -8
  54. package/dist/engine/index.js +0 -59
  55. package/dist/engine/names.d.ts +0 -2
  56. package/dist/engine/names.js +0 -16
  57. package/dist/engine/post-scaffold.d.ts +0 -3
  58. package/dist/engine/post-scaffold.js +0 -8
  59. package/dist/engine/render-plan.d.ts +0 -7
  60. package/dist/engine/render-plan.js +0 -9
  61. package/dist/engine/template.d.ts +0 -3
  62. package/dist/engine/template.js +0 -17
  63. package/dist/engine/types.d.ts +0 -2
  64. package/dist/engine/types.js +0 -8
  65. package/dist/engine/workspace.d.ts +0 -3
  66. package/dist/engine/workspace.js +0 -13
  67. package/dist/manifest.d.ts +0 -71
  68. package/dist/manifest.js +0 -16
  69. package/dist/output-mode.d.ts +0 -2
  70. package/dist/output-mode.js +0 -10
  71. package/dist/shared/outfitter-193jvzg4.d.ts +0 -5
  72. package/dist/shared/outfitter-1dd0k853.js +0 -194
  73. package/dist/shared/outfitter-1dvma85c.js +0 -322
  74. package/dist/shared/outfitter-1h7k8xxt.js +0 -29
  75. package/dist/shared/outfitter-2ngep1h2.d.ts +0 -5
  76. package/dist/shared/outfitter-2np85etz.js +0 -95
  77. package/dist/shared/outfitter-33w361tc.d.ts +0 -18
  78. package/dist/shared/outfitter-344t1r38.js +0 -1
  79. package/dist/shared/outfitter-3weh61w7.d.ts +0 -25
  80. package/dist/shared/outfitter-4s9meh3j.js +0 -221
  81. package/dist/shared/outfitter-66b25bj8.js +0 -125
  82. package/dist/shared/outfitter-6bkqjk86.d.ts +0 -3
  83. package/dist/shared/outfitter-79vfxt6y.js +0 -269
  84. package/dist/shared/outfitter-7ha7p61k.d.ts +0 -6
  85. package/dist/shared/outfitter-7r12fj7f.js +0 -30
  86. package/dist/shared/outfitter-8y2dfx6n.js +0 -11
  87. package/dist/shared/outfitter-9x1brcmq.js +0 -184
  88. package/dist/shared/outfitter-9zqc2njf.js +0 -859
  89. package/dist/shared/outfitter-a79xrm12.d.ts +0 -17
  90. package/dist/shared/outfitter-amc4jbs1.d.ts +0 -50
  91. package/dist/shared/outfitter-ara3djt0.js +0 -73
  92. package/dist/shared/outfitter-avhm5z6w.js +0 -82
  93. package/dist/shared/outfitter-bkwpbkr9.d.ts +0 -63
  94. package/dist/shared/outfitter-bn9c8p2e.js +0 -204
  95. package/dist/shared/outfitter-bpr28y54.js +0 -70
  96. package/dist/shared/outfitter-cwq39bv4.d.ts +0 -48
  97. package/dist/shared/outfitter-d7pq7d0k.js +0 -196
  98. package/dist/shared/outfitter-dd0btgec.d.ts +0 -40
  99. package/dist/shared/outfitter-e2zz5wv7.d.ts +0 -51
  100. package/dist/shared/outfitter-ehp18x1n.js +0 -1
  101. package/dist/shared/outfitter-gdvm5c0b.d.ts +0 -4
  102. package/dist/shared/outfitter-h1mnzzd1.d.ts +0 -14
  103. package/dist/shared/outfitter-hvsaxgcp.js +0 -1
  104. package/dist/shared/outfitter-hws10ze7.js +0 -532
  105. package/dist/shared/outfitter-j833sxws.js +0 -61
  106. package/dist/shared/outfitter-j8yc7294.d.ts +0 -22
  107. package/dist/shared/outfitter-k112c427.js +0 -21
  108. package/dist/shared/outfitter-k56rmt24.d.ts +0 -30
  109. package/dist/shared/outfitter-ksa1pp4t.d.ts +0 -4
  110. package/dist/shared/outfitter-ksyvwmb5.js +0 -191
  111. package/dist/shared/outfitter-mdt37hqm.js +0 -4
  112. package/dist/shared/outfitter-mtbpabf3.js +0 -91
  113. package/dist/shared/outfitter-mxz69pgy.js +0 -713
  114. package/dist/shared/outfitter-npemy7ta.d.ts +0 -53
  115. package/dist/shared/outfitter-npyfbdmc.d.ts +0 -6
  116. package/dist/shared/outfitter-pyy1zkfh.d.ts +0 -133
  117. package/dist/shared/outfitter-q9agarmb.js +0 -42
  118. package/dist/shared/outfitter-qfh36ddg.d.ts +0 -66
  119. package/dist/shared/outfitter-qn864k6h.js +0 -581
  120. package/dist/shared/outfitter-rdc5v5ms.js +0 -746
  121. package/dist/shared/outfitter-sgtq57qr.d.ts +0 -5
  122. package/dist/shared/outfitter-ttjr95y9.js +0 -98
  123. package/dist/shared/outfitter-vh4xgb93.js +0 -35
  124. package/dist/shared/outfitter-yvksv5qb.js +0 -322
  125. package/dist/shared/outfitter-zwyvewr1.js +0 -36
  126. package/dist/targets/index.d.ts +0 -4
  127. package/dist/targets/index.js +0 -29
  128. package/dist/targets/registry.d.ts +0 -3
  129. package/dist/targets/registry.js +0 -28
  130. package/dist/targets/types.d.ts +0 -2
  131. package/dist/targets/types.js +0 -1
  132. package/templates/.gitkeep +0 -0
  133. package/templates/basic/.gitignore.template +0 -30
  134. package/templates/basic/.lefthook.yml.template +0 -26
  135. package/templates/basic/package.json.template +0 -46
  136. package/templates/basic/src/index.ts.template +0 -26
  137. package/templates/basic/tsconfig.json.template +0 -34
  138. package/templates/cli/.gitignore.template +0 -4
  139. package/templates/cli/.lefthook.yml.template +0 -26
  140. package/templates/cli/README.md.template +0 -35
  141. package/templates/cli/biome.json.template +0 -4
  142. package/templates/cli/package.json.template +0 -45
  143. package/templates/cli/src/cli.ts.template +0 -8
  144. package/templates/cli/src/index.ts.template +0 -7
  145. package/templates/cli/src/program.ts.template +0 -31
  146. package/templates/cli/tsconfig.json.template +0 -34
  147. package/templates/daemon/.gitignore.template +0 -4
  148. package/templates/daemon/.lefthook.yml.template +0 -26
  149. package/templates/daemon/README.md.template +0 -67
  150. package/templates/daemon/biome.json.template +0 -4
  151. package/templates/daemon/package.json.template +0 -48
  152. package/templates/daemon/src/cli.ts.template +0 -96
  153. package/templates/daemon/src/daemon-main.ts.template +0 -79
  154. package/templates/daemon/src/daemon.ts.template +0 -11
  155. package/templates/daemon/src/index.ts.template +0 -7
  156. package/templates/daemon/tsconfig.json.template +0 -23
  157. package/templates/mcp/.gitignore.template +0 -4
  158. package/templates/mcp/.lefthook.yml.template +0 -26
  159. package/templates/mcp/README.md.template +0 -54
  160. package/templates/mcp/biome.json.template +0 -4
  161. package/templates/mcp/package.json.template +0 -45
  162. package/templates/mcp/src/index.ts.template +0 -7
  163. package/templates/mcp/src/mcp.ts.template +0 -79
  164. package/templates/mcp/src/server.ts.template +0 -15
  165. package/templates/mcp/tsconfig.json.template +0 -23
  166. package/templates/minimal/.gitignore.template +0 -30
  167. package/templates/minimal/.lefthook.yml.template +0 -26
  168. package/templates/minimal/package.json.template +0 -46
  169. package/templates/minimal/src/index.ts.template +0 -26
  170. package/templates/minimal/tsconfig.json.template +0 -34
package/README.md CHANGED
@@ -40,8 +40,7 @@ Top-level commands:
40
40
  - `scaffold <target> [name]` - Add a new capability to an existing project
41
41
  - `add <block>` - Add a tooling block (`claude`, `biome`, `lefthook`, `bootstrap`, `scaffolding`)
42
42
  - `repo <action> <subject>` - Repository maintenance namespace (`check|sync|export`)
43
- - `migrate kit [directory]` - Migrate foundation imports and dependencies to `@outfitter/kit`
44
- - `update` - Check installed `@outfitter/*` versions and optionally show migration guidance
43
+ - `upgrade` - Check installed `@outfitter/*` versions and optionally show migration guidance
45
44
  - `doctor` - Validate local environment and project dependencies
46
45
  - `demo [section]` - Forward to the dedicated demo CLI (`outfitter-demo`)
47
46
 
@@ -63,7 +62,6 @@ Options:
63
62
  - `-n, --name <name>` - Package name
64
63
  - `-b, --bin <name>` - Binary name
65
64
  - `-p, --preset <preset>` - Preset (`minimal`, `cli`, `mcp`, `daemon`)
66
- - `-t, --template <template>` - Deprecated alias for `--preset`
67
65
  - `-s, --structure <mode>` - Project structure (`single` | `workspace`)
68
66
  - `--workspace-name <name>` - Workspace root package name
69
67
  - `--local` - Use `workspace:*` for `@outfitter/*` dependencies
@@ -83,7 +81,7 @@ Examples:
83
81
  outfitter init my-lib --preset minimal --yes
84
82
  outfitter init cli my-project --yes
85
83
  outfitter init my-workspace --preset mcp --structure workspace --workspace-name @acme/root
86
- outfitter init . --template basic --name my-lib
84
+ outfitter init . --preset minimal --name my-lib
87
85
  ```
88
86
 
89
87
  ### `scaffold`
@@ -165,25 +163,6 @@ outfitter repo check exports --json
165
163
  outfitter repo check readme
166
164
  ```
167
165
 
168
- ### `migrate kit`
169
-
170
- Codemod for kit-first foundation adoption.
171
-
172
- ```bash
173
- outfitter migrate kit [directory] [options]
174
- ```
175
-
176
- Options:
177
-
178
- - `--dry-run` - Preview changes without writing files
179
-
180
- Examples:
181
-
182
- ```bash
183
- outfitter migrate kit --dry-run
184
- outfitter migrate kit .
185
- ```
186
-
187
166
  ### `upgrade`
188
167
 
189
168
  Check installed `@outfitter/*` packages against npm versions.
@@ -231,10 +210,58 @@ Options:
231
210
 
232
211
  Use `outfitter-demo` (or `cli-demo`) directly for the dedicated demo app.
233
212
 
213
+ ### `schema`
214
+
215
+ Machine-readable introspection of registered actions. Agents can discover CLI capabilities without scraping `--help`.
216
+
217
+ ```bash
218
+ outfitter schema # Human-readable summary
219
+ outfitter schema <action-id> # Detail view for a single action
220
+ outfitter schema --output json # Machine-readable JSON manifest
221
+ outfitter schema --output json --pretty # Pretty-printed JSON
222
+ outfitter schema --surface cli # Filter by surface
223
+ ```
224
+
225
+ Subcommands for surface map management:
226
+
227
+ ```bash
228
+ outfitter schema generate # Write .outfitter/surface.json
229
+ outfitter schema generate --dry-run # Print without writing
230
+ outfitter schema diff # Compare runtime vs committed
231
+ outfitter schema diff --output json # Structured diff as JSON
232
+ ```
233
+
234
+ ### `check`
235
+
236
+ Compare local config blocks against the registry for drift detection.
237
+
238
+ ```bash
239
+ outfitter check [options]
240
+ outfitter check tsdoc [options]
241
+ ```
242
+
243
+ Options:
244
+
245
+ - `-v, --verbose` - Show diffs for drifted files
246
+ - `-b, --block <name>` - Check a specific block only
247
+ - `-o, --output <mode>` - Output mode (`human`, `json`, `jsonl`)
248
+ - `--cwd <path>` - Working directory
249
+
250
+ `check tsdoc` checks TSDoc coverage on exported declarations:
251
+
252
+ ```bash
253
+ outfitter check tsdoc # Human-readable coverage report
254
+ outfitter check tsdoc --strict # Fail if coverage is below threshold
255
+ outfitter check tsdoc --output json # Machine-readable JSON output
256
+ outfitter check tsdoc --summary # Compact output
257
+ outfitter check tsdoc --level undocumented # Filter by coverage level
258
+ outfitter check tsdoc --package @outfitter/cli # Filter to specific package
259
+ ```
260
+
234
261
  ## Command Conventions
235
262
 
236
263
  Canonical boundary and command conventions are documented in
237
- [`docs/BOUNDARY-CONVENTIONS.md`](../../docs/BOUNDARY-CONVENTIONS.md).
264
+ [Architecture: Boundary Conventions](../../docs/ARCHITECTURE.md#boundary-conventions).
238
265
 
239
266
  Quick model status:
240
267
 
@@ -250,10 +277,8 @@ Root exports:
250
277
  import {
251
278
  runDoctor,
252
279
  runInit,
253
- runMigrateKit,
254
280
  runScaffold,
255
281
  type InitOptions,
256
- type MigrateKitOptions,
257
282
  type ScaffoldOptions,
258
283
  } from "outfitter";
259
284
  ```
@@ -262,7 +287,7 @@ Command subpath exports:
262
287
 
263
288
  ```typescript
264
289
  import { runAdd } from "outfitter/commands/add";
265
- import { runUpdate } from "outfitter/commands/update";
290
+ import { runUpgrade } from "outfitter/commands/upgrade";
266
291
  ```
267
292
 
268
293
  Example:
@@ -284,7 +309,7 @@ if (result.isErr()) {
284
309
 
285
310
  ## Requirements
286
311
 
287
- - Bun >= 1.3.7
312
+ - Bun >= 1.3.9
288
313
 
289
314
  ## Related Packages
290
315
 
package/dist/cli.js CHANGED
@@ -2,7 +2,7 @@
2
2
  import {
3
3
  createRepoCommand,
4
4
  outfitterActions
5
- } from "./shared/chunk-k59f60cp.js";
5
+ } from "./shared/chunk-3pwh8ys4.js";
6
6
 
7
7
  // src/cli.ts
8
8
  import { readFileSync } from "node:fs";
@@ -43,7 +43,8 @@ function createProgram() {
43
43
  requestId,
44
44
  logger: logger.child({ action: action.id, requestId })
45
45
  });
46
- }
46
+ },
47
+ schema: { programName: "outfitter", surface: {} }
47
48
  })) {
48
49
  cli.register(command);
49
50
  }
package/dist/index.d.ts CHANGED
@@ -13,19 +13,19 @@ interface DoctorOptions {
13
13
  * Result of a single health check.
14
14
  */
15
15
  interface CheckResult {
16
- /** Whether the check passed */
17
- readonly passed: boolean;
18
16
  /** Error message if check failed */
19
17
  readonly error?: string;
18
+ /** Whether the check passed */
19
+ readonly passed: boolean;
20
20
  }
21
21
  /**
22
22
  * Bun version check result.
23
23
  */
24
24
  interface BunVersionCheck extends CheckResult {
25
- /** Current Bun version */
26
- readonly version: string;
27
25
  /** Required minimum version */
28
26
  readonly required: string;
27
+ /** Current Bun version */
28
+ readonly version: string;
29
29
  }
30
30
  /**
31
31
  * Package.json validation result.
@@ -51,8 +51,6 @@ interface DependenciesCheck extends CheckResult {
51
51
  interface ConfigFilesCheck {
52
52
  /** Whether tsconfig.json exists */
53
53
  readonly tsconfig: boolean;
54
- /** Whether biome.json exists */
55
- readonly biome?: boolean;
56
54
  }
57
55
  /**
58
56
  * Directories check result.
@@ -60,17 +58,15 @@ interface ConfigFilesCheck {
60
58
  interface DirectoriesCheck {
61
59
  /** Whether src directory exists */
62
60
  readonly src: boolean;
63
- /** Whether tests directory exists */
64
- readonly tests?: boolean;
65
61
  }
66
62
  /**
67
63
  * Summary of all checks.
68
64
  */
69
65
  interface DoctorSummary {
70
- /** Number of passed checks */
71
- readonly passed: number;
72
66
  /** Number of failed checks */
73
67
  readonly failed: number;
68
+ /** Number of passed checks */
69
+ readonly passed: number;
74
70
  /** Total number of checks */
75
71
  readonly total: number;
76
72
  }
@@ -86,10 +82,27 @@ interface DoctorResult {
86
82
  readonly configFiles: ConfigFilesCheck;
87
83
  readonly directories: DirectoriesCheck;
88
84
  };
85
+ /** Exit code (0 = all passed, 1 = some failed) */
86
+ readonly exitCode: number;
87
+ /** Whether this is a workspace root (affects which checks apply) */
88
+ readonly isWorkspaceRoot?: boolean;
89
+ /** Checks intentionally skipped at workspace root */
90
+ readonly skippedChecks?: readonly string[];
89
91
  /** Summary of all checks */
90
92
  readonly summary: DoctorSummary;
91
- /** Exit code (0 = all passed, 1 = some failed) */
93
+ /** Per-member summary when running at a workspace root */
94
+ readonly workspaceMembers?: readonly WorkspaceMemberHealth[];
95
+ }
96
+ /**
97
+ * Health summary for a workspace member package.
98
+ */
99
+ interface WorkspaceMemberHealth {
100
+ /** Member exit code (0 = pass, 1 = failed checks) */
92
101
  readonly exitCode: number;
102
+ /** Workspace-relative member path (for example, apps/my-cli) */
103
+ readonly path: string;
104
+ /** Summary for the member doctor run */
105
+ readonly summary: DoctorSummary;
93
106
  }
94
107
  /**
95
108
  * Runs the doctor command programmatically.
@@ -137,18 +150,18 @@ import { Result as Result3 } from "@outfitter/contracts";
137
150
  import { AddBlockResult } from "@outfitter/tooling";
138
151
  import { Command as Command2 } from "commander";
139
152
  interface PostScaffoldResult {
140
- readonly installResult: "success" | "failed" | "skipped";
141
- readonly installError?: string | undefined;
142
- readonly gitInitResult: "success" | "failed" | "skipped" | "already-repo";
143
153
  readonly gitCommitResult: "success" | "failed" | "skipped";
144
154
  readonly gitError?: string | undefined;
155
+ readonly gitInitResult: "success" | "failed" | "skipped" | "already-repo";
156
+ readonly installError?: string | undefined;
157
+ readonly installResult: "success" | "failed" | "skipped";
145
158
  readonly nextSteps: readonly string[];
146
159
  }
147
160
  import { NotFoundError, Result as Result2, ValidationError } from "@outfitter/contracts";
148
161
  /**
149
162
  * Unique identifier for a scaffold target.
150
163
  */
151
- type TargetId = "minimal" | "cli" | "mcp" | "daemon" | "api" | "worker" | "web" | "lib";
164
+ type TargetId = "minimal" | "cli" | "mcp" | "daemon" | "library" | "full-stack" | "api" | "worker" | "web";
152
165
  /**
153
166
  * Whether the target produces a runnable application or a library package.
154
167
  */
@@ -165,14 +178,14 @@ type TargetScope = "init-only" | "scaffold-only" | "both";
165
178
  * Complete definition for a scaffold target.
166
179
  */
167
180
  interface TargetDefinition {
168
- readonly id: TargetId;
169
- readonly description: string;
170
181
  readonly category: TargetCategory;
171
- readonly placement: "apps" | "packages";
172
- readonly templateDir: string;
173
182
  readonly defaultBlocks: readonly string[];
174
- readonly status: TargetStatus;
183
+ readonly description: string;
184
+ readonly id: TargetId;
185
+ readonly placement: "apps" | "packages";
186
+ readonly presetDir: string;
175
187
  readonly scope: TargetScope;
188
+ readonly status: TargetStatus;
176
189
  }
177
190
  declare const TARGET_REGISTRY: ReadonlyMap<TargetId, TargetDefinition>;
178
191
  declare const TARGET_IDS: readonly TargetId[];
@@ -190,45 +203,43 @@ declare function listTargets(filter?: {
190
203
  readonly category?: TargetCategory;
191
204
  }): readonly TargetDefinition[];
192
205
  type InitStructure = "single" | "workspace";
193
- type InitPresetId = Extract<TargetId, "minimal" | "cli" | "mcp" | "daemon">;
206
+ type InitPresetId = Extract<TargetId, "minimal" | "cli" | "mcp" | "daemon" | "library" | "full-stack">;
194
207
  /**
195
208
  * Options for the init command.
196
209
  */
197
210
  interface InitOptions {
198
- readonly targetDir: string;
199
- readonly name: string | undefined;
200
211
  readonly bin?: string | undefined;
212
+ readonly dryRun?: boolean | undefined;
213
+ readonly force: boolean;
214
+ readonly installTimeout?: number | undefined;
215
+ readonly local?: boolean | undefined;
216
+ readonly name: string | undefined;
217
+ readonly noTooling?: boolean | undefined;
201
218
  readonly preset?: InitPresetId | undefined;
202
- /** @deprecated Use `preset` instead. */
203
- readonly template?: string | undefined;
219
+ readonly skipCommit?: boolean | undefined;
220
+ readonly skipGit?: boolean | undefined;
221
+ readonly skipInstall?: boolean | undefined;
204
222
  readonly structure?: InitStructure | undefined;
205
- readonly workspaceName?: string | undefined;
206
- readonly local?: boolean | undefined;
207
- readonly force: boolean;
223
+ readonly targetDir: string;
208
224
  readonly with?: string | undefined;
209
- readonly noTooling?: boolean | undefined;
225
+ readonly workspaceName?: string | undefined;
210
226
  readonly yes?: boolean | undefined;
211
- readonly dryRun?: boolean | undefined;
212
- readonly skipInstall?: boolean | undefined;
213
- readonly skipGit?: boolean | undefined;
214
- readonly skipCommit?: boolean | undefined;
215
- readonly installTimeout?: number | undefined;
216
227
  }
217
228
  /**
218
229
  * Result of running init.
219
230
  */
220
231
  interface InitResult {
221
- readonly structure: InitStructure;
222
- readonly rootDir: string;
223
- readonly projectDir: string;
224
- readonly preset: InitPresetId;
225
- readonly packageName: string;
226
232
  readonly blocksAdded?: AddBlockResult | undefined;
227
- readonly postScaffold: PostScaffoldResult;
228
233
  readonly dryRunPlan?: {
229
234
  readonly operations: readonly unknown[];
230
235
  readonly summary: Record<string, number>;
231
236
  } | undefined;
237
+ readonly packageName: string;
238
+ readonly postScaffold: PostScaffoldResult;
239
+ readonly preset: InitPresetId;
240
+ readonly projectDir: string;
241
+ readonly rootDir: string;
242
+ readonly structure: InitStructure;
232
243
  }
233
244
  /**
234
245
  * Error returned when initialization fails.
@@ -245,67 +256,15 @@ declare function printInitResults(result: InitResult, options?: {
245
256
  * @deprecated Use action-registry CLI wiring via `buildCliCommands(outfitterActions, ...)`.
246
257
  */
247
258
  declare function initCommand(program: Command2): void;
248
- import { OutputMode as OutputMode3 } from "@outfitter/cli/types";
249
- import { Result as Result4 } from "@outfitter/contracts";
250
- import { Command as Command3 } from "commander";
251
- interface DiffPreview {
252
- readonly path: string;
253
- readonly preview: string;
254
- }
255
- /**
256
- * Options for the migrate-kit command.
257
- */
258
- interface MigrateKitOptions {
259
- /** Target directory to migrate (defaults to cwd). */
260
- readonly targetDir?: string | undefined;
261
- /** Run codemod without writing changes to disk. */
262
- readonly dryRun?: boolean | undefined;
263
- }
264
- /**
265
- * Result from migrate-kit execution.
266
- */
267
- interface MigrateKitResult {
268
- readonly targetDir: string;
269
- readonly dryRun: boolean;
270
- readonly packageJsonFiles: number;
271
- readonly sourceFiles: number;
272
- readonly manifestUpdates: number;
273
- readonly importRewrites: number;
274
- readonly changedFiles: readonly string[];
275
- readonly diffs: readonly DiffPreview[];
276
- }
277
- /**
278
- * Error returned when migration fails.
279
- */
280
- declare class MigrateKitError extends Error {
281
- readonly _tag: "MigrateKitError";
282
- constructor(message: string);
283
- }
284
- /**
285
- * Runs the migrate-kit codemod programmatically.
286
- */
287
- declare function runMigrateKit(options: MigrateKitOptions): Promise<Result4<MigrateKitResult, MigrateKitError>>;
288
- /**
289
- * Print migrate-kit results.
290
- */
291
- declare function printMigrateKitResults(result: MigrateKitResult, options?: {
292
- mode?: OutputMode3;
293
- }): Promise<void>;
294
- /**
295
- * Register `migrate kit` command directly on Commander.
296
- *
297
- * @deprecated Use action-registry CLI wiring via `buildCliCommands(outfitterActions, ...)`.
298
- */
299
- declare function migrateKitCommand(program: Command3): void;
300
- import { Command as Command5 } from "commander";
259
+ import { Command as Command4 } from "commander";
301
260
  type DocsMdxMode = "strict" | "lossy";
302
261
  interface DocsBaseOptions {
303
262
  readonly cwd?: string;
304
- readonly workspaceRoot?: string;
305
- readonly packagesDir?: string;
306
- readonly outputDir?: string;
307
263
  readonly excludedFilenames?: readonly string[];
308
264
  readonly mdxMode?: DocsMdxMode;
265
+ readonly outputDir?: string;
266
+ readonly packagesDir?: string;
267
+ readonly workspaceRoot?: string;
309
268
  }
310
269
  interface ExecuteCheckCommandOptions extends DocsBaseOptions {}
311
270
  interface ExecuteSyncCommandOptions extends DocsBaseOptions {}
@@ -317,70 +276,70 @@ interface ExecuteExportCommandOptions extends DocsBaseOptions {
317
276
  }
318
277
  type RepoCheckSubject = "docs" | "exports" | "readme" | "registry" | "changeset" | "tree" | "boundary-invocations";
319
278
  interface RepoCommandIo {
320
- readonly out?: (line: string) => void;
321
279
  readonly err?: (line: string) => void;
280
+ readonly out?: (line: string) => void;
322
281
  }
323
282
  interface RepoToolingInvocation {
324
- readonly command: "check-exports" | "check-readme-imports" | "check-bunup-registry" | "check-changeset" | "check-clean-tree" | "check-boundary-invocations";
325
283
  readonly args: readonly string[];
284
+ readonly command: "check-exports" | "check-readme-imports" | "check-bunup-registry" | "check-changeset" | "check-clean-tree" | "check-boundary-invocations";
326
285
  readonly cwd: string;
327
286
  }
328
287
  interface CreateRepoCommandOptions {
329
288
  readonly commandName?: string;
330
289
  readonly io?: RepoCommandIo;
331
290
  readonly runDocsCheck?: (options: ExecuteCheckCommandOptions, io: Required<RepoCommandIo>) => Promise<number>;
332
- readonly runDocsSync?: (options: ExecuteSyncCommandOptions, io: Required<RepoCommandIo>) => Promise<number>;
333
291
  readonly runDocsExport?: (options: ExecuteExportCommandOptions, io: Required<RepoCommandIo>) => Promise<number>;
292
+ readonly runDocsSync?: (options: ExecuteSyncCommandOptions, io: Required<RepoCommandIo>) => Promise<number>;
334
293
  readonly runToolingCommand?: (input: RepoToolingInvocation) => Promise<number>;
335
294
  }
336
- declare function createRepoCommand(options?: CreateRepoCommandOptions): Command5;
337
- import { OutputMode as OutputMode4 } from "@outfitter/cli/types";
338
- import { Result as Result5 } from "@outfitter/contracts";
295
+ declare function createRepoCommand(options?: CreateRepoCommandOptions): Command4;
296
+ import { OutputMode as OutputMode3 } from "@outfitter/cli/types";
297
+ import { Result as Result4 } from "@outfitter/contracts";
339
298
  import { AddBlockResult as AddBlockResult2 } from "@outfitter/tooling";
340
- import { Command as Command6 } from "commander";
299
+ import { Command as Command5 } from "commander";
341
300
  interface ScaffoldOptions {
342
- readonly target: string;
343
- readonly name?: string | undefined;
301
+ readonly cwd: string;
302
+ readonly dryRun: boolean;
344
303
  readonly force: boolean;
304
+ readonly installTimeout?: number | undefined;
305
+ readonly local?: boolean | undefined;
306
+ readonly name?: string | undefined;
307
+ readonly noTooling?: boolean | undefined;
345
308
  readonly skipInstall: boolean;
346
- readonly dryRun: boolean;
309
+ readonly target: string;
347
310
  readonly with?: string | undefined;
348
- readonly noTooling?: boolean | undefined;
349
- readonly local?: boolean | undefined;
350
- readonly cwd: string;
351
- readonly installTimeout?: number | undefined;
352
311
  }
353
312
  interface ScaffoldCommandResult {
354
- readonly target: string;
355
- readonly rootDir: string;
356
- readonly targetDir: string;
313
+ readonly blocksAdded?: AddBlockResult2 | undefined;
357
314
  readonly converted: boolean;
315
+ readonly dryRunPlan?: {
316
+ readonly operations: readonly unknown[];
317
+ readonly summary: Record<string, number>;
318
+ } | undefined;
358
319
  readonly movedExisting?: {
359
320
  readonly from: string;
360
321
  readonly to: string;
361
322
  readonly name: string;
362
323
  } | undefined;
363
- readonly workspacePatternsUpdated: boolean;
364
- readonly blocksAdded?: AddBlockResult2 | undefined;
365
324
  readonly postScaffold: PostScaffoldResult;
366
- readonly dryRunPlan?: {
367
- readonly operations: readonly unknown[];
368
- readonly summary: Record<string, number>;
369
- } | undefined;
325
+ readonly rootDir: string;
326
+ readonly target: string;
327
+ readonly targetDir: string;
328
+ readonly workspacePatternsUpdated: boolean;
370
329
  }
371
330
  declare class ScaffoldCommandError extends Error {
372
331
  readonly _tag: "ScaffoldCommandError";
373
332
  constructor(message: string);
374
333
  }
375
- declare function runScaffold(options: ScaffoldOptions): Promise<Result5<ScaffoldCommandResult, ScaffoldCommandError>>;
334
+ declare function runScaffold(options: ScaffoldOptions): Promise<Result4<ScaffoldCommandResult, ScaffoldCommandError>>;
376
335
  declare function printScaffoldResults(result: ScaffoldCommandResult, options?: {
377
- readonly mode?: OutputMode4;
336
+ readonly mode?: OutputMode3;
378
337
  }): Promise<void>;
379
338
  /**
380
339
  * @deprecated Use action-registry CLI wiring via `buildCliCommands(outfitterActions, ...)`.
381
340
  */
382
- declare function scaffoldCommand(program: Command6): void;
383
- import { Result as Result6, ValidationError as ValidationError2 } from "@outfitter/contracts";
341
+ declare function scaffoldCommand(program: Command5): void;
342
+ import { Result as Result5, ValidationError as ValidationError2 } from "@outfitter/contracts";
384
343
  /**
385
344
  * Create planner types for kit-first project scaffolding.
386
345
  *
@@ -389,26 +348,27 @@ import { Result as Result6, ValidationError as ValidationError2 } from "@outfitt
389
348
  */
390
349
  type CreatePresetId = "basic" | "cli" | "daemon" | "mcp";
391
350
  interface CreatePresetDefinition {
351
+ readonly defaultBlocks: readonly string[];
392
352
  readonly id: CreatePresetId;
393
- readonly template: CreatePresetId;
353
+ readonly presetDir: CreatePresetId;
394
354
  readonly summary: string;
395
- readonly defaultBlocks: readonly string[];
396
355
  }
397
356
  interface CreateProjectInput {
398
- readonly name: string;
399
- readonly targetDir: string;
400
- readonly preset: CreatePresetId;
401
- readonly packageName?: string;
402
357
  readonly description?: string;
403
- readonly version?: string;
404
358
  readonly includeTooling?: boolean;
405
359
  readonly local?: boolean;
360
+ readonly name: string;
361
+ readonly packageName?: string;
362
+ readonly preset: CreatePresetId;
363
+ readonly targetDir: string;
364
+ readonly version?: string;
406
365
  readonly year?: string;
407
366
  }
408
367
  type CreatePlanChange = {
409
- readonly type: "copy-template";
410
- readonly template: string;
368
+ readonly type: "copy-preset";
369
+ readonly preset: string;
411
370
  readonly targetDir: string;
371
+ readonly includeTooling: boolean;
412
372
  readonly overlayBaseTemplate: boolean;
413
373
  } | {
414
374
  readonly type: "inject-shared-config";
@@ -420,6 +380,7 @@ type CreatePlanChange = {
420
380
  readonly blocks: readonly string[];
421
381
  };
422
382
  interface CreateProjectPlan {
383
+ readonly changes: readonly CreatePlanChange[];
423
384
  readonly preset: CreatePresetDefinition;
424
385
  readonly values: {
425
386
  readonly packageName: string;
@@ -429,10 +390,9 @@ interface CreateProjectPlan {
429
390
  readonly binName: string;
430
391
  readonly year: string;
431
392
  };
432
- readonly changes: readonly CreatePlanChange[];
433
393
  }
434
- declare function planCreateProject(input: CreateProjectInput): Result6<CreateProjectPlan, ValidationError2>;
394
+ declare function planCreateProject(input: CreateProjectInput): Result5<CreateProjectPlan, ValidationError2>;
435
395
  declare const CREATE_PRESETS: Readonly<Record<CreatePresetId, CreatePresetDefinition>>;
436
396
  declare const CREATE_PRESET_IDS: CreatePresetId[];
437
397
  declare function getCreatePreset(id: string): CreatePresetDefinition | undefined;
438
- export { scaffoldCommand, runScaffold, runMigrateKit, runInit, runDoctor, resolvePlacement, printScaffoldResults, printMigrateKitResults, printInitResults, printDoctorResults, planCreateProject, outfitterActions, migrateKitCommand, listTargets, initCommand, getTarget, getScaffoldTarget, getReadyTarget, getInitTarget, getCreatePreset, doctorCommand, createRepoCommand, TargetStatus, TargetScope, TargetId, TargetDefinition, TargetCategory, TARGET_REGISTRY, TARGET_IDS, ScaffoldOptions, ScaffoldCommandResult, ScaffoldCommandError, SCAFFOLD_TARGET_IDS, RepoToolingInvocation, RepoCommandIo, RepoCheckSubject, READY_TARGET_IDS, PackageJsonCheck, MigrateKitResult, MigrateKitOptions, MigrateKitError, InitStructure, InitResult, InitPresetId, InitOptions, InitError, INIT_TARGET_IDS, DoctorSummary, DoctorResult, DoctorOptions, DirectoriesCheck, DependenciesCheck, CreateRepoCommandOptions, CreateProjectPlan, CreateProjectInput, CreatePresetId, CreatePresetDefinition, CreatePlanChange, ConfigFilesCheck, CheckResult, CREATE_PRESET_IDS, CREATE_PRESETS, BunVersionCheck };
398
+ export { scaffoldCommand, runScaffold, runInit, runDoctor, resolvePlacement, printScaffoldResults, printInitResults, printDoctorResults, planCreateProject, outfitterActions, listTargets, initCommand, getTarget, getScaffoldTarget, getReadyTarget, getInitTarget, getCreatePreset, doctorCommand, createRepoCommand, TargetStatus, TargetScope, TargetId, TargetDefinition, TargetCategory, TARGET_REGISTRY, TARGET_IDS, ScaffoldOptions, ScaffoldCommandResult, ScaffoldCommandError, SCAFFOLD_TARGET_IDS, RepoToolingInvocation, RepoCommandIo, RepoCheckSubject, READY_TARGET_IDS, PackageJsonCheck, InitStructure, InitResult, InitPresetId, InitOptions, InitError, INIT_TARGET_IDS, DoctorSummary, DoctorResult, DoctorOptions, DirectoriesCheck, DependenciesCheck, CreateRepoCommandOptions, CreateProjectPlan, CreateProjectInput, CreatePresetId, CreatePresetDefinition, CreatePlanChange, ConfigFilesCheck, CheckResult, CREATE_PRESET_IDS, CREATE_PRESETS, BunVersionCheck };
package/dist/index.js CHANGED
@@ -1,7 +1,6 @@
1
1
  import {
2
2
  INIT_TARGET_IDS,
3
3
  InitError,
4
- MigrateKitError,
5
4
  READY_TARGET_IDS,
6
5
  SCAFFOLD_TARGET_IDS,
7
6
  ScaffoldCommandError,
@@ -17,19 +16,16 @@ import {
17
16
  getTarget,
18
17
  initCommand,
19
18
  listTargets,
20
- migrateKitCommand,
21
19
  outfitterActions,
22
20
  printDoctorResults,
23
21
  printInitResults,
24
- printMigrateKitResults,
25
22
  printScaffoldResults,
26
23
  resolvePlacement,
27
24
  runDoctor,
28
25
  runInit,
29
- runMigrateKit,
30
26
  runScaffold,
31
27
  scaffoldCommand
32
- } from "./shared/chunk-k59f60cp.js";
28
+ } from "./shared/chunk-3pwh8ys4.js";
33
29
  // src/create/planner.ts
34
30
  import { Result, ValidationError } from "@outfitter/contracts";
35
31
 
@@ -37,25 +33,25 @@ import { Result, ValidationError } from "@outfitter/contracts";
37
33
  var CREATE_PRESETS = {
38
34
  basic: {
39
35
  id: "basic",
40
- template: "basic",
36
+ presetDir: "basic",
41
37
  summary: "Minimal Bun + TypeScript project.",
42
38
  defaultBlocks: ["scaffolding"]
43
39
  },
44
40
  cli: {
45
41
  id: "cli",
46
- template: "cli",
42
+ presetDir: "cli",
47
43
  summary: "CLI starter with Outfitter command ergonomics.",
48
44
  defaultBlocks: ["scaffolding"]
49
45
  },
50
46
  daemon: {
51
47
  id: "daemon",
52
- template: "daemon",
48
+ presetDir: "daemon",
53
49
  summary: "Daemon + control CLI starter.",
54
50
  defaultBlocks: ["scaffolding"]
55
51
  },
56
52
  mcp: {
57
53
  id: "mcp",
58
- template: "mcp",
54
+ presetDir: "mcp",
59
55
  summary: "MCP server starter.",
60
56
  defaultBlocks: ["scaffolding"]
61
57
  }
@@ -109,9 +105,10 @@ function planCreateProject(input) {
109
105
  const defaultBlocks = includeTooling ? [...preset.defaultBlocks] : [];
110
106
  const changes = [
111
107
  {
112
- type: "copy-template",
113
- template: preset.template,
108
+ type: "copy-preset",
109
+ preset: preset.presetDir,
114
110
  targetDir,
111
+ includeTooling,
115
112
  overlayBaseTemplate: true
116
113
  },
117
114
  { type: "inject-shared-config" }
@@ -139,17 +136,14 @@ function planCreateProject(input) {
139
136
  export {
140
137
  scaffoldCommand,
141
138
  runScaffold,
142
- runMigrateKit,
143
139
  runInit,
144
140
  runDoctor,
145
141
  resolvePlacement,
146
142
  printScaffoldResults,
147
- printMigrateKitResults,
148
143
  printInitResults,
149
144
  printDoctorResults,
150
145
  planCreateProject,
151
146
  outfitterActions,
152
- migrateKitCommand,
153
147
  listTargets,
154
148
  initCommand,
155
149
  getTarget,
@@ -164,7 +158,6 @@ export {
164
158
  ScaffoldCommandError,
165
159
  SCAFFOLD_TARGET_IDS,
166
160
  READY_TARGET_IDS,
167
- MigrateKitError,
168
161
  InitError,
169
162
  INIT_TARGET_IDS,
170
163
  CREATE_PRESET_IDS,