@icebreakers/monorepo 5.5.10 → 5.7.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 (49) hide show
  1. package/README.md +2 -0
  2. package/dist/baseline-DPfotf4y.mjs +146 -0
  3. package/dist/bundle-B9vRch4R.mjs +49 -0
  4. package/dist/catalog-CDEyc1uA.mjs +299 -0
  5. package/dist/cli.mjs +1487 -156
  6. package/dist/commands-TS8ABFdP.mjs +13820 -0
  7. package/dist/config-C38c_Q8L.mjs +66 -0
  8. package/dist/{create-flow-C811m80z.mjs → create-flow-CCr2hfSY.mjs} +103 -40
  9. package/dist/deps-CUdI2DaB.mjs +47 -0
  10. package/dist/execute-PX1hT0qv.mjs +68 -0
  11. package/dist/execute-Vi4qHe-D.mjs +663 -0
  12. package/dist/format-DZ7L34rf.mjs +28 -0
  13. package/dist/index-CoCTFWZJ.d.mts +2150 -0
  14. package/dist/index.d.mts +1741 -111
  15. package/dist/index.mjs +60 -6
  16. package/dist/inputs-_xIVONmB.mjs +50 -0
  17. package/dist/npm-B25nrSyz.mjs +82 -0
  18. package/dist/plan-B5aE_WNF.mjs +75 -0
  19. package/dist/run-Lu7y1bNf.mjs +165 -0
  20. package/dist/save-CdCf630Z.mjs +79 -0
  21. package/dist/scan-4nboHNXP.mjs +293 -0
  22. package/dist/template-drift-BBhnrHY1.mjs +2740 -0
  23. package/dist/tooling-entry.d.mts +1 -1
  24. package/dist/tooling-entry.mjs +2 -1
  25. package/dist/transaction-DAhY8EpG.mjs +168 -0
  26. package/dist/tsconfig-CGntrzBM.mjs +1483 -0
  27. package/dist/{tooling-BfXlmCi-.mjs → vitest-DkGh4Ygo.mjs} +108 -167
  28. package/dist/workspace-tasks-CnB8kkS0.mjs +4435 -0
  29. package/package.json +25 -7
  30. package/resources/api-report/runner.cjs +76 -0
  31. package/resources/devcontainer/setup.mjs +36 -0
  32. package/resources/knip/reporter.mjs +46 -0
  33. package/resources/maintenance/migration-lanes.mjs +141 -0
  34. package/resources/maintenance/migration-lock.mjs +119 -0
  35. package/resources/maintenance/migrations.mjs +215 -0
  36. package/resources/maintenance/presets.mjs +130 -0
  37. package/resources/maintenance/validate.mjs +233 -0
  38. package/resources/maintenance/workflow.yml +151 -0
  39. package/resources/skills/repoctl/SKILL.md +4 -2
  40. package/resources/skills/repoctl/references/commands.md +224 -13
  41. package/resources/skills/repoctl/references/config.md +70 -6
  42. package/resources/skills/repoctl/references/dependencies.md +37 -0
  43. package/resources/skills/repoctl/references/knip.md +34 -0
  44. package/resources/skills/repoctl/references/templates.md +26 -2
  45. package/dist/commands-CIzCAxyY.mjs +0 -5672
  46. package/dist/config-p842Knhq.mjs +0 -114
  47. package/dist/index-DDQKKYet.d.mts +0 -1025
  48. package/dist/types-m8JLwKzl.mjs +0 -499
  49. package/dist/workspace-MCKewElu.mjs +0 -123
@@ -0,0 +1,2150 @@
1
+ import { ConfigValues, SimpleGit, SimpleGitOptions } from "simple-git";
2
+ import { ResolvedTemplateParameters, ResolvedTemplateRemoteSource, TemplateCategory, TemplateChoice, TemplateDefinition, TemplateInstanceMovePlan, TemplateParameterPrompt, TemplateParameterRender, TemplateParameterValues, TemplateRemoteSource } from "@icebreakers/monorepo-templates";
3
+ import { IcebreakerCommitlintConfig, IcebreakerCommitlintOptions } from "@icebreakers/commitlint-config";
4
+ import { IcebreakerEslintConfig, UserConfigItem, UserDefinedOptions } from "@icebreakers/eslint-config";
5
+ import { IcebreakerStylelintConfig, StylelintConfig } from "@icebreakers/stylelint-config";
6
+ import { ViteUserConfig } from "vitest/config";
7
+ import { Configuration } from "lint-staged";
8
+ //#region src/types/dependencies.d.ts
9
+ type DependencySection = 'dependencies' | 'devDependencies' | 'peerDependencies' | 'optionalDependencies';
10
+ /** An intentional version cohort, selected by exact workspace-relative directories. */
11
+ interface DependencyVersionGroup {
12
+ name: string;
13
+ workspaces: string[];
14
+ dependencies: string[];
15
+ sections?: DependencySection[];
16
+ reason: string;
17
+ /** Report these declarations as an explicit exception; never include them in fixes. */
18
+ ignore?: boolean;
19
+ }
20
+ interface DependenciesCommandConfig {
21
+ groups?: DependencyVersionGroup[];
22
+ }
23
+ type DependencyProtocol = 'semver' | 'npm' | 'catalog' | 'workspace' | 'file' | 'link' | 'git' | 'url' | 'unknown';
24
+ type DependencyGroupStatus = 'consistent' | 'equivalent' | 'compatible' | 'conflict' | 'uncomparable' | 'managed' | 'exception';
25
+ interface DependencyOccurrence {
26
+ name: string;
27
+ section: DependencySection;
28
+ workspace: string;
29
+ path: string;
30
+ packageName: string | null;
31
+ specifier: string;
32
+ protocol: DependencyProtocol;
33
+ source: string | null;
34
+ range: string | null;
35
+ }
36
+ interface DependencyConsistencyGroup {
37
+ dependency: string;
38
+ section: DependencySection;
39
+ group: string;
40
+ reason: string | null;
41
+ status: DependencyGroupStatus;
42
+ detail: string;
43
+ occurrences: DependencyOccurrence[];
44
+ }
45
+ interface DependencyReport {
46
+ schemaVersion: 1;
47
+ workspaceDir: string;
48
+ groups: DependencyConsistencyGroup[];
49
+ summary: Record<DependencyGroupStatus, number>;
50
+ }
51
+ interface DependencyFixOptions {
52
+ dependency: string;
53
+ section: DependencySection;
54
+ /** The default cohort is named "default". */
55
+ group?: string;
56
+ /** Explicit semver range, or npm alias with the same source package. */
57
+ to: string;
58
+ }
59
+ interface DependencyFileChange {
60
+ path: string;
61
+ beforeHash: string;
62
+ afterHash: string;
63
+ section: DependencySection;
64
+ dependency: string;
65
+ before: string;
66
+ after: string;
67
+ }
68
+ /** Serializable preview. Apply checks every input and regenerates the proposed changes. */
69
+ interface DependencyFixPlan {
70
+ schemaVersion: 1;
71
+ workspaceDir: string;
72
+ selection: Required<DependencyFixOptions>;
73
+ inputs: {
74
+ path: string;
75
+ hash: string;
76
+ }[];
77
+ files: DependencyFileChange[];
78
+ nextSteps: string[];
79
+ }
80
+ interface DependencyApplyResult {
81
+ status: 'applied' | 'unchanged';
82
+ changed: string[];
83
+ nextSteps: string[];
84
+ }
85
+ //#endregion
86
+ //#region src/types/cli.d.ts
87
+ /**
88
+ * CLI 公用参数,保证各命令对外暴露一致的行为。
89
+ */
90
+ interface CliOpts {
91
+ /**
92
+ * 是否开启交互模式,开启后每一步都会提示用户确认。
93
+ * @default false
94
+ */
95
+ interactive?: boolean;
96
+ /**
97
+ * 是否使用 core 版资产,只同步最精简的文件集合。
98
+ * @default false
99
+ */
100
+ core?: boolean;
101
+ /**
102
+ * 输出目录(相对 `cwd`),用于放置生成或拷贝出来的文件。
103
+ * @default ''
104
+ */
105
+ outDir?: string;
106
+ /**
107
+ * 命令执行的工作目录。
108
+ * @default process.cwd()
109
+ */
110
+ cwd?: string;
111
+ /**
112
+ * 是否跳过已有文件的覆写;开启后保留旧文件不做对比。
113
+ * @default false
114
+ */
115
+ skipOverwrite?: boolean;
116
+ /**
117
+ * 跳过交互并接受默认写入策略。upgrade 中等价于覆盖 drifted 标准资产。
118
+ * @default false
119
+ */
120
+ yes?: boolean;
121
+ /**
122
+ * 显式覆盖已有文件。
123
+ * @default false
124
+ */
125
+ overwrite?: boolean;
126
+ /**
127
+ * 显式不覆盖已有文件。
128
+ * @default false
129
+ */
130
+ noOverwrite?: boolean;
131
+ /**
132
+ * 是否允许覆盖未标记的自定义 release workflow。
133
+ * @default false
134
+ */
135
+ overwriteRelease?: boolean;
136
+ }
137
+ //#endregion
138
+ //#region src/commands/ai.d.ts
139
+ type AgenticTemplateFormat = 'md' | 'json';
140
+ interface GenerateAgenticTemplateOptions {
141
+ cwd?: string;
142
+ output?: string;
143
+ force?: boolean;
144
+ format?: AgenticTemplateFormat;
145
+ /**
146
+ * 任务名,用于快速生成带目录与后缀的文件。
147
+ */
148
+ name?: string;
149
+ /**
150
+ * 基础目录,配合 name 使用。
151
+ * @default 'agentic/prompts'
152
+ */
153
+ baseDir?: string;
154
+ /**
155
+ * 自动生成目录时使用的自定义文件夹名称。
156
+ * @default 自动生成的时间戳
157
+ */
158
+ folderName?: string;
159
+ }
160
+ type AgenticTemplateTask = string | (Omit<GenerateAgenticTemplateOptions, 'cwd'> & {
161
+ name?: string;
162
+ });
163
+ declare const defaultAgenticBaseDir = "agentic/prompts";
164
+ declare function createTimestampFolderName(date?: Date): string;
165
+ /**
166
+ * 生成 Agentic 任务提示词模板,默认写入 agentic/prompts/<timestamp>/prompt.md,可自定义输出路径。
167
+ */
168
+ declare function generateAgenticTemplate(options?: GenerateAgenticTemplateOptions): Promise<string>;
169
+ declare function loadAgenticTasks(filePath: string, cwd: string): Promise<AgenticTemplateTask[]>;
170
+ declare function generateAgenticTemplates(tasks: AgenticTemplateTask[], defaults?: GenerateAgenticTemplateOptions): Promise<string[]>;
171
+ //#endregion
172
+ //#region src/types/presets.d.ts
173
+ /** Explicit identity of an already installed npm package; ranges and tags are not accepted. */
174
+ interface OrganizationPresetReference {
175
+ packageName: string;
176
+ version: string;
177
+ }
178
+ interface OrganizationPresetTemplate extends Omit<TemplateDefinition, 'remote'> {
179
+ label?: string;
180
+ description?: string;
181
+ category?: TemplateCategory;
182
+ }
183
+ interface OrganizationPresetAsset {
184
+ /** File inside the preset package. */
185
+ source: string;
186
+ /** Explicit engineering asset path inside the consuming workspace. */
187
+ target: string;
188
+ }
189
+ /** Pure JSON, stored as repoctl.preset.json in the published package root. */
190
+ interface OrganizationPresetManifest {
191
+ schemaVersion: 1;
192
+ requires: {
193
+ repoctl: string;
194
+ };
195
+ extends?: OrganizationPresetReference[];
196
+ config?: Omit<MonorepoConfig, 'presets'>;
197
+ templates?: Record<string, OrganizationPresetTemplate>;
198
+ /** Recommendations only; applying a preset never installs these capabilities. */
199
+ capabilities?: Array<{
200
+ id: string;
201
+ reason?: string;
202
+ }>;
203
+ assets?: OrganizationPresetAsset[];
204
+ }
205
+ interface OrganizationPresetSource extends OrganizationPresetReference {
206
+ id: string;
207
+ directory: string;
208
+ manifestFile: string;
209
+ manifestHash: string;
210
+ packageJsonHash: string;
211
+ }
212
+ interface OrganizationPresetLayer {
213
+ source: OrganizationPresetSource;
214
+ manifest: OrganizationPresetManifest;
215
+ }
216
+ interface OrganizationPresetDiagnostic {
217
+ id: 'preset.invalid-reference' | 'preset.missing-package' | 'preset.version-mismatch' | 'preset.invalid-manifest' | 'preset.incompatible' | 'preset.cycle' | 'preset.duplicate' | 'preset.conflicting-version' | 'preset.limit';
218
+ status: 'warn' | 'fail';
219
+ path: string;
220
+ source: string | null;
221
+ detail: string;
222
+ }
223
+ interface OrganizationPresetResolution {
224
+ /** Canonical workspace root for valid nonempty references; otherwise normalized absolute cwd without filesystem reads. */
225
+ workspaceDir: string;
226
+ /** Lowest to highest precedence; dependencies precede the presets that extend them. */
227
+ layers: OrganizationPresetLayer[];
228
+ diagnostics: OrganizationPresetDiagnostic[];
229
+ /** Every read package/manifest is part of any later write plan's preconditions. */
230
+ inputs: Array<{
231
+ path: string;
232
+ hash: string;
233
+ }>;
234
+ locations: Array<{
235
+ packageName: string;
236
+ fromDirectory: string;
237
+ directory: string;
238
+ }>;
239
+ }
240
+ interface ConfigValueSource {
241
+ kind: 'default' | 'preset' | 'project' | 'cli';
242
+ file?: string | null;
243
+ packageName?: string;
244
+ version?: string;
245
+ }
246
+ interface ConfigSourceLayer {
247
+ source: ConfigValueSource;
248
+ config: MonorepoConfig;
249
+ }
250
+ //#endregion
251
+ //#region src/core/config/validation/schema.d.ts
252
+ interface ConfigDiagnostic {
253
+ id: 'config.unknown-field' | 'config.invalid-type' | 'config.invalid-value' | 'config.conflict' | 'config.load-failed';
254
+ path: string;
255
+ actualType: string;
256
+ expected: string;
257
+ suggestion: string;
258
+ }
259
+ //#endregion
260
+ //#region src/core/template-catalog/types.d.ts
261
+ type CreateTemplateDefinition = TemplateDefinition & Partial<Pick<TemplateChoice, 'label' | 'category' | 'description'>>;
262
+ interface TemplateCatalogEntry extends TemplateChoice {
263
+ sourceDir: string;
264
+ remote?: TemplateRemoteSource;
265
+ /** Present for a template declared by an installed organization preset. */
266
+ preset?: OrganizationPresetReference;
267
+ origin: 'builtin' | 'custom';
268
+ overridesBuiltin: boolean;
269
+ configFile: string | null;
270
+ configPath?: string;
271
+ short?: string;
272
+ disabled?: boolean | string;
273
+ }
274
+ interface TemplateCatalogDiagnostic {
275
+ id: 'template-definition' | 'template-choice' | 'template-override' | 'templates-directory' | ConfigDiagnostic['id'];
276
+ status: 'warn' | 'fail';
277
+ detail: string;
278
+ configFile: string | null;
279
+ configPath: string;
280
+ template?: string;
281
+ configDiagnostic?: ConfigDiagnostic;
282
+ }
283
+ interface TemplateCatalog {
284
+ workspaceDir: string;
285
+ configFile: string | null;
286
+ templatesDir: string;
287
+ entries: TemplateCatalogEntry[];
288
+ choices: CreateChoiceOption[];
289
+ diagnostics: TemplateCatalogDiagnostic[];
290
+ }
291
+ interface ResolveTemplateCatalogOptions {
292
+ cwd?: string;
293
+ /** Override the template root for inspection; relative paths use the invocation directory. */
294
+ templatesDir?: string;
295
+ }
296
+ //#endregion
297
+ //#region src/core/template-catalog/index.d.ts
298
+ /** Resolve declarations only; never generate files or execute template code. */
299
+ declare function resolveTemplateCatalog(options?: ResolveTemplateCatalogOptions): Promise<TemplateCatalog>;
300
+ //#endregion
301
+ //#region src/core/template-catalog/definitions.d.ts
302
+ interface BuiltinTemplatePaths {
303
+ 'tsdown': ['tsdown', 'packages/tsdown'];
304
+ 'vue-lib': ['vue-lib', 'packages/vue-lib'];
305
+ 'hono-server': ['server', 'apps/server'];
306
+ 'react-vite': ['react-vite', 'apps/react-vite'];
307
+ 'next': ['next', 'apps/next'];
308
+ 'vue-hono': ['client', 'apps/client'];
309
+ 'vitepress': ['vitepress', 'apps/website'];
310
+ 'cli': ['cli', 'apps/cli'];
311
+ 'nimbus': ['nimbus', 'apps/docs'];
312
+ 'react-lib': ['react-lib', 'packages/react-lib'];
313
+ }
314
+ declare const templateMap: { readonly [Key in keyof BuiltinTemplatePaths]: {
315
+ readonly source: BuiltinTemplatePaths[Key][0];
316
+ readonly target: BuiltinTemplatePaths[Key][1];
317
+ }; };
318
+ declare function getTemplateMap(extra?: Record<string, string | TemplateDefinition>): Record<string, TemplateDefinition>;
319
+ declare function getCreateChoices(choices?: CreateChoiceOption[]): CreateChoiceOption[];
320
+ //#endregion
321
+ //#region src/core/template-source/types.d.ts
322
+ interface TemplateSourceOptions {
323
+ cwd?: string;
324
+ cacheDir?: string;
325
+ offline?: boolean;
326
+ timeoutMs?: number;
327
+ }
328
+ interface TemplateSourceRequest {
329
+ source: TemplateRemoteSource;
330
+ templatePath: string;
331
+ }
332
+ interface ResolvedTemplateSource {
333
+ sourceDir: string;
334
+ request: TemplateSourceRequest;
335
+ resolved: ResolvedTemplateRemoteSource;
336
+ digest: string;
337
+ cache: 'hit' | 'downloaded';
338
+ }
339
+ //#endregion
340
+ //#region src/core/template-source/index.d.ts
341
+ /** Prepare verified assets only. Never installs dependencies, executes remote scripts or writes the target workspace. */
342
+ declare function resolveRemoteTemplateSource(source: TemplateRemoteSource, templatePath?: string, options?: TemplateSourceOptions): Promise<ResolvedTemplateSource>;
343
+ //#endregion
344
+ //#region src/commands/create/parameters/prepare.d.ts
345
+ interface CreateParameterReport {
346
+ schemaVersion: 1;
347
+ values: ResolvedTemplateParameters['report'];
348
+ files: TemplateParameterRender['files'];
349
+ package: TemplateParameterRender['package'];
350
+ excludedPaths: string[];
351
+ }
352
+ //#endregion
353
+ //#region src/commands/create/plan.d.ts
354
+ type CreateNewProjectType = keyof typeof templateMap;
355
+ interface CreateNewProjectOptions {
356
+ /** Strict values for repoctl.template.json; sensitive values stay in memory only. */
357
+ parameters?: TemplateParameterValues;
358
+ /** Optional prompt adapter; programmatic callers are noninteractive by default. */
359
+ parameterPrompt?: TemplateParameterPrompt;
360
+ /** For remote sources, use only an exact verified cache entry. */
361
+ offline?: boolean;
362
+ /** Asset cache directory; relative paths use cwd. */
363
+ cacheDir?: string;
364
+ /**
365
+ * 目标项目名。
366
+ * 未提供时使用模板映射中的 `target`。
367
+ * @default undefined
368
+ */
369
+ name?: string;
370
+ /**
371
+ * 生成目标的工作目录。
372
+ * @default process.cwd()
373
+ */
374
+ cwd?: string;
375
+ /**
376
+ * 是否把模板里的 `package.json` 输出为 `package.mock.json`。
377
+ * @default false
378
+ */
379
+ renameJson?: boolean;
380
+ /**
381
+ * 模板类型。
382
+ * 未提供时优先读取 `commands.create.defaultTemplate`,最后回退到 `'tsdown'`。
383
+ * @default 'tsdown'
384
+ */
385
+ type?: CreateNewProjectType | string;
386
+ }
387
+ interface CreateNewProjectPlan {
388
+ parameterization?: CreateParameterReport;
389
+ cwd: string;
390
+ requestedTemplate: string;
391
+ template: string;
392
+ usedFallback: boolean;
393
+ sourceDir: string;
394
+ targetName: string;
395
+ targetDir: string;
396
+ targetExists: boolean;
397
+ renameJson: boolean;
398
+ hasPackageJson: boolean;
399
+ packageJsonFileName: 'package.json' | 'package.mock.json';
400
+ packageName: string;
401
+ templateDefinition: TemplateDefinition;
402
+ templateInfo: TemplateCatalogEntry;
403
+ sourceResolution?: ResolvedTemplateSource;
404
+ }
405
+ /** Read-only creation preview; fetch remote assets explicitly before planning. */
406
+ declare function resolveCreateNewProjectPlan(options?: CreateNewProjectOptions): Promise<CreateNewProjectPlan>;
407
+ //#endregion
408
+ //#region src/commands/create/index.d.ts
409
+ /** Shared generation path for creation and disposable author validation. */
410
+ declare function applyCreateNewProjectPlan(plan: CreateNewProjectPlan, includeGitMetadata?: boolean): Promise<void>;
411
+ /** Create files first and atomically register provenance only after every transformation succeeds. */
412
+ declare function createNewProject(options?: CreateNewProjectOptions): Promise<void>;
413
+ //#endregion
414
+ //#region src/commands/deps/admission/types.d.ts
415
+ interface DependencyAdmissionRule {
416
+ id: string;
417
+ /** Exact workspace names, relative paths, directory/**, or * for all. */
418
+ workspaces: string[];
419
+ /** Exact names or @scope/*. Deny matches declaration/target; allow checks the target. */
420
+ dependencies: string[];
421
+ /** allow is an allowlist for the selected workspaces/sections; deny forbids matches. */
422
+ effect: 'allow' | 'deny';
423
+ /** Explicit scope prevents accidental application to development or peer declarations. */
424
+ sections: DependencySection[];
425
+ reason: string;
426
+ alternative?: string;
427
+ severity?: 'warn' | 'fail';
428
+ }
429
+ interface DependencyAdmissionException {
430
+ rule: string;
431
+ /** Exact workspace-relative directory. */
432
+ workspace: string;
433
+ /** Exact manifest dependency key; alias targets cannot broaden an exception. */
434
+ dependency: string;
435
+ section: DependencySection;
436
+ reason: string;
437
+ /** Valid through this YYYY-MM-DD date in UTC; warnings start seven days beforehand. */
438
+ expiresOn?: string;
439
+ }
440
+ interface DependencyAdmissionConfig {
441
+ rules: DependencyAdmissionRule[];
442
+ exceptions?: DependencyAdmissionException[];
443
+ }
444
+ interface AdmissionDeclaration {
445
+ workspace: string;
446
+ path: string;
447
+ section: DependencySection;
448
+ name: string;
449
+ target: string | null;
450
+ }
451
+ interface DependencyAdmissionFinding {
452
+ id: 'admission-denied' | 'admission-not-allowed' | 'admission-conflict' | 'admission-resolution' | 'admission-unused-exception' | 'admission-expired-exception' | 'admission-expiring-exception' | 'admission-selector-unmatched';
453
+ key: string;
454
+ status: 'warn' | 'fail';
455
+ rule: string;
456
+ detail: string;
457
+ declaration?: AdmissionDeclaration;
458
+ reason?: string;
459
+ alternative?: string;
460
+ baseline: 'new' | 'existing';
461
+ }
462
+ interface DependencyAdmissionReport {
463
+ schemaVersion: 1;
464
+ kind: 'dependency-admission';
465
+ workspaceDir: string;
466
+ /** Policy fingerprint excludes absolute paths, locale and current time. */
467
+ policyHash: string;
468
+ mode: 'full' | 'added';
469
+ declarations: AdmissionDeclaration[];
470
+ skipped: Array<AdmissionDeclaration & {
471
+ reason: string;
472
+ }>;
473
+ findings: DependencyAdmissionFinding[];
474
+ exceptions: Array<DependencyAdmissionException & {
475
+ declaration: AdmissionDeclaration;
476
+ }>;
477
+ summary: {
478
+ fail: number;
479
+ warn: number;
480
+ existing: number;
481
+ waived: number;
482
+ };
483
+ }
484
+ interface DependencyAdmissionOptions {
485
+ config?: DependencyAdmissionConfig;
486
+ /** An earlier reviewed report made with the same policy. Invalid/missing data fails. */
487
+ baseline?: unknown;
488
+ /** Explicitly request full checking even when a baseline was supplied. */
489
+ full?: boolean;
490
+ /** Optional deterministic clock for programmatic integrations. */
491
+ now?: Date;
492
+ }
493
+ //#endregion
494
+ //#region src/types/doctor.d.ts
495
+ /** Reasoned waiver for one stable doctor rule ID. */
496
+ interface DoctorSuppression {
497
+ id: string;
498
+ reason: string;
499
+ /** UTC calendar date (YYYY-MM-DD), inclusive through the end of that day. */
500
+ expires?: string;
501
+ /** Optional exact workspace-relative finding path, e.g. packages/app/package.json. */
502
+ path?: string;
503
+ }
504
+ interface DoctorCommandConfig {
505
+ /** Exact stable rule IDs. Omitted runs all; an empty array explicitly runs none. */
506
+ rules?: string[];
507
+ suppressions?: DoctorSuppression[];
508
+ }
509
+ interface DoctorOptions extends DoctorCommandConfig {}
510
+ //#endregion
511
+ //#region src/commands/doctor/types.d.ts
512
+ type DoctorStatus = 'pass' | 'warn' | 'fail';
513
+ interface DoctorCheck {
514
+ id: string;
515
+ title: string;
516
+ status: DoctorStatus;
517
+ detail: string;
518
+ fix?: string;
519
+ suppression?: DoctorSuppression & {
520
+ state: 'active' | 'expired';
521
+ };
522
+ /** Workspace-relative manifest path, when the rule targets a package. */
523
+ path?: string;
524
+ /** Stable manifest field name; never translated. */
525
+ field?: string;
526
+ }
527
+ interface DoctorSummary {
528
+ pass: number;
529
+ warn: number;
530
+ fail: number;
531
+ }
532
+ interface DoctorSuppressionReport extends DoctorSuppression {
533
+ state: 'active' | 'expired';
534
+ matched: number;
535
+ }
536
+ interface DoctorReport {
537
+ cwd: string;
538
+ workspaceDir: string;
539
+ packageCount: number;
540
+ checks: DoctorCheck[];
541
+ /** Effective counts, excluding actively suppressed findings. */
542
+ summary: DoctorSummary;
543
+ /** Original counts, retained even when findings are suppressed. */
544
+ rawSummary?: DoctorSummary;
545
+ suppressions?: DoctorSuppressionReport[];
546
+ }
547
+ //#endregion
548
+ //#region src/commands/doctor/security/types.d.ts
549
+ type InstallPolicyKey = 'minimumReleaseAge' | 'minimumReleaseAgeStrict' | 'minimumReleaseAgeExclude' | 'minimumReleaseAgeIgnoreMissingTime' | 'trustPolicy' | 'trustPolicyExclude' | 'trustPolicyIgnoreAfter' | 'trustLockfile' | 'allowBuilds' | 'onlyBuiltDependencies' | 'onlyBuiltDependenciesFile' | 'neverBuiltDependencies' | 'ignoredBuiltDependencies' | 'ignoreDepScripts' | 'ignoreScripts' | 'dangerouslyAllowAllBuilds' | 'strictDepBuilds';
550
+ interface InstallSecurityExpectations {
551
+ minimumReleaseAge?: number;
552
+ trustPolicy?: 'no-downgrade';
553
+ requireBuildApproval?: boolean;
554
+ severity?: 'warn' | 'fail';
555
+ /** Document exact pnpm exception selectors without changing pnpm's policy. */
556
+ exceptions?: Array<{
557
+ key: 'minimumReleaseAgeExclude' | 'trustPolicyExclude';
558
+ package: string;
559
+ reason: string;
560
+ }>;
561
+ }
562
+ interface InstallSecurityOptions {
563
+ /** Explicit version for auditing another pnpm installation; never activates that version. */
564
+ pnpmVersion?: string;
565
+ expectations?: InstallSecurityExpectations;
566
+ }
567
+ interface InstallSecuritySetting {
568
+ key: InstallPolicyKey;
569
+ source: string;
570
+ configured: boolean;
571
+ state: 'active' | 'unsupported' | 'removed' | 'unknown' | 'invalid';
572
+ /** Only validated policy values; credential-bearing selectors are reduced to package names. */
573
+ value: number | boolean | string | string[] | null;
574
+ }
575
+ interface InstallBuildDecision {
576
+ package: string;
577
+ selector: 'package' | 'version' | 'artifact';
578
+ decision: 'allow' | 'deny' | 'pending';
579
+ source: string;
580
+ }
581
+ interface InstallSecurityReport {
582
+ schemaVersion: 1;
583
+ kind: 'install-security';
584
+ workspaceDir: string;
585
+ pnpm: {
586
+ version: string | null;
587
+ evidence: 'explicit' | 'observed' | 'declared' | 'unknown';
588
+ };
589
+ settings: InstallSecuritySetting[];
590
+ builds: {
591
+ decisions: InstallBuildDecision[];
592
+ pendingPackages: string[];
593
+ override: 'none' | 'ignore-scripts' | 'allow-all' | 'conflict' | 'unknown';
594
+ default: 'unreviewed' | 'allowed' | 'blocked' | 'unknown';
595
+ };
596
+ checks: DoctorCheck[];
597
+ summary: {
598
+ pass: number;
599
+ warn: number;
600
+ fail: number;
601
+ };
602
+ limitations: string[];
603
+ }
604
+ interface InstallSecurityPresetPlan {
605
+ schemaVersion: 1;
606
+ kind: 'install-security-preset';
607
+ preset: 'balanced';
608
+ workspaceDir: string;
609
+ pnpmVersion: string;
610
+ /** Hash of recognized active policy inputs, including global and environment values. */
611
+ policyHash: string;
612
+ beforeHash: string;
613
+ afterHash: string;
614
+ /** Safe added policy keys only; the plan never contains complete configuration contents. */
615
+ additions: Partial<Record<InstallPolicyKey, number | boolean | string | string[] | Record<string, boolean>>>;
616
+ preserved: InstallPolicyKey[];
617
+ diff: string;
618
+ }
619
+ //#endregion
620
+ //#region src/commands/init/tooling/types.d.ts
621
+ declare const initToolingTargets: readonly ["commitlint", "eslint", "stylelint", "lint-staged", "tsconfig", "vitest"];
622
+ type InitToolingTarget = (typeof initToolingTargets)[number];
623
+ interface InitToolingExecutionOptions {
624
+ targets?: InitToolingTarget[];
625
+ all?: boolean;
626
+ force?: boolean;
627
+ }
628
+ interface InitToolingResult {
629
+ selectedTargets: InitToolingTarget[];
630
+ writtenFiles: string[];
631
+ skippedFiles: string[];
632
+ updatedPackageJson: boolean;
633
+ }
634
+ //#endregion
635
+ //#region src/commands/init/tooling/index.d.ts
636
+ declare function normalizeInitToolingTargets(input: string[]): InitToolingTarget[];
637
+ declare function initTooling(cwd: string, options?: InitToolingExecutionOptions): Promise<InitToolingResult>;
638
+ //#endregion
639
+ //#region src/commands/init/index.d.ts
640
+ type InitPreset = 'minimal' | 'standard';
641
+ interface InitCommandRuntimeOptions {
642
+ tooling?: readonly InitToolingTarget[];
643
+ all?: boolean;
644
+ force?: boolean;
645
+ overwrite?: boolean;
646
+ yes?: boolean;
647
+ preset?: InitPreset;
648
+ }
649
+ declare function initMetadata(cwd: string): Promise<void>;
650
+ /**
651
+ * 初始化命令入口,根据配置逐步生成基础文件。
652
+ */
653
+ declare function init(cwd: string, options?: InitCommandRuntimeOptions): Promise<void>;
654
+ //#endregion
655
+ //#region src/core/codeowners/types.d.ts
656
+ interface CodeownersConfig {
657
+ /** Exact package names or workspace-relative directory paths. */
658
+ owners: Record<string, string[]>;
659
+ }
660
+ interface CodeownersDiagnostic {
661
+ code: 'INVALID_CONFIG' | 'INVALID_OWNER' | 'UNKNOWN_WORKSPACE' | 'AMBIGUOUS_WORKSPACE' | 'MISSING_OWNER' | 'UNSUPPORTED_PATH' | 'INVALID_MARKERS' | 'POSSIBLE_SHADOW' | 'INACTIVE_FILE';
662
+ severity: 'error' | 'warning';
663
+ message: string;
664
+ source: string;
665
+ line?: number;
666
+ }
667
+ interface WorkspaceOwnership {
668
+ path: string;
669
+ name?: string;
670
+ private: boolean;
671
+ owners: string[];
672
+ sources: string[];
673
+ }
674
+ interface CodeownersReport {
675
+ schemaVersion: 1;
676
+ workspaceDir: string;
677
+ configFile: string | null;
678
+ configFiles: string[];
679
+ packages: WorkspaceOwnership[];
680
+ diagnostics: CodeownersDiagnostic[];
681
+ }
682
+ interface CodeownersPlan extends CodeownersReport {
683
+ file: string;
684
+ before: string | null;
685
+ after: string;
686
+ diff: string;
687
+ changed: boolean;
688
+ /** Hashes cover workspace discovery, package metadata, and config candidates. */
689
+ inputs: Record<string, string | null>;
690
+ }
691
+ interface CodeownersOptions {
692
+ cwd: string;
693
+ query?: string;
694
+ }
695
+ //#endregion
696
+ //#region src/types/workspace.d.ts
697
+ /**
698
+ * 工作区工具可接收的筛选选项。
699
+ */
700
+ interface GetWorkspacePackagesOptions {
701
+ /**
702
+ * 是否在结果中排除 workspace 根包。
703
+ * @default true
704
+ */
705
+ ignoreRootPackage?: boolean;
706
+ /**
707
+ * 是否过滤掉标记为 `private` 的包。
708
+ * @default true
709
+ */
710
+ ignorePrivatePackage?: boolean;
711
+ /**
712
+ * 自定义 glob,覆盖 `pnpm-workspace.yaml` 的 `packages` 配置。
713
+ * @default workspace manifest `packages`
714
+ */
715
+ patterns?: string[];
716
+ }
717
+ /**
718
+ * 兼容 pnpm workspace manifest 的轻量结构。
719
+ */
720
+ interface WorkspacePackageManifest {
721
+ name?: string;
722
+ version?: string;
723
+ private?: boolean;
724
+ description?: string;
725
+ scripts?: Record<string, string>;
726
+ dependencies?: Record<string, string>;
727
+ devDependencies?: Record<string, string>;
728
+ peerDependencies?: Record<string, string>;
729
+ optionalDependencies?: Record<string, string>;
730
+ }
731
+ /**
732
+ * 轻量的 workspace package 结构,避免导出类型泄漏到 pnpm 内部实现细节。
733
+ */
734
+ interface WorkspacePackage {
735
+ rootDir: string;
736
+ rootDirRealPath: string;
737
+ modulesDir?: string;
738
+ manifest: WorkspacePackageManifest;
739
+ writeProjectManifest?: unknown;
740
+ }
741
+ /**
742
+ * 附加 package.json 绝对路径后的 workspace package。
743
+ */
744
+ interface WorkspacePackageWithJsonPath extends WorkspacePackage {
745
+ pkgJsonPath: string;
746
+ }
747
+ /**
748
+ * 适合 CLI 与 JSON 输出消费的 workspace package 摘要。
749
+ */
750
+ interface WorkspacePackageSummary {
751
+ name?: string;
752
+ description?: string;
753
+ private: boolean;
754
+ rootDir: string;
755
+ relativeDir: string;
756
+ pkgJsonPath: string;
757
+ }
758
+ /**
759
+ * workspace package 摘要集合。
760
+ */
761
+ interface WorkspacePackageSummaryData {
762
+ cwd: string;
763
+ workspaceDir: string;
764
+ packages: WorkspacePackageSummary[];
765
+ }
766
+ /**
767
+ * 工作区基础信息与包集合。
768
+ */
769
+ interface WorkspaceData {
770
+ cwd: string;
771
+ workspaceDir: string;
772
+ packages: WorkspacePackageWithJsonPath[];
773
+ }
774
+ //#endregion
775
+ //#region src/core/workspace-graph/types.d.ts
776
+ type WorkspaceDependencyType = 'dependencies' | 'devDependencies' | 'peerDependencies' | 'optionalDependencies';
777
+ interface WorkspaceGraphNode {
778
+ /** Stable workspace-relative directory; names need not be unique. */
779
+ id: string;
780
+ name?: string;
781
+ version?: string;
782
+ private: boolean;
783
+ }
784
+ interface WorkspaceGraphEdge {
785
+ /** Consumer node ID. */
786
+ source: string;
787
+ /** Dependency node ID. */
788
+ target: string;
789
+ type: WorkspaceDependencyType;
790
+ /** Manifest key, which can be an alias of the target name. */
791
+ dependency: string;
792
+ specifier: string;
793
+ /** semver denotes a matching local candidate, not lockfile installation proof. */
794
+ resolution: 'workspace' | 'local' | 'semver';
795
+ }
796
+ interface WorkspaceGraphDiagnostic {
797
+ code: 'duplicate_name' | 'unresolved_dependency' | 'ambiguous_dependency' | 'incompatible_version' | 'invalid_specifier' | 'unresolved_specifier';
798
+ source?: string;
799
+ dependency: string;
800
+ type?: WorkspaceDependencyType;
801
+ specifier?: string;
802
+ candidates: string[];
803
+ }
804
+ interface WorkspaceGraphFilter {
805
+ /** Exact names or workspace-relative directories; selected nodes and incident edges. */
806
+ packages?: string[];
807
+ dependencyTypes?: WorkspaceDependencyType[];
808
+ }
809
+ interface WorkspaceGraphOptions extends GetWorkspacePackagesOptions, WorkspaceGraphFilter {}
810
+ interface WorkspaceGraph {
811
+ schemaVersion: 1;
812
+ cwd: string;
813
+ workspaceDir: string;
814
+ dependencyTypes: WorkspaceDependencyType[];
815
+ nodes: WorkspaceGraphNode[];
816
+ edges: WorkspaceGraphEdge[];
817
+ diagnostics: WorkspaceGraphDiagnostic[];
818
+ }
819
+ interface WorkspaceWhyResult {
820
+ schemaVersion: 1;
821
+ from: string;
822
+ to: string;
823
+ found: boolean;
824
+ /** One deterministic shortest path of node IDs, including both endpoints. */
825
+ path: string[];
826
+ edges: WorkspaceGraphEdge[];
827
+ dependencyTypes: WorkspaceDependencyType[];
828
+ diagnostics: WorkspaceGraphDiagnostic[];
829
+ }
830
+ interface WorkspaceImpactOptions {
831
+ direct?: boolean;
832
+ dependencyTypes?: WorkspaceDependencyType[];
833
+ }
834
+ interface WorkspaceImpactResult {
835
+ schemaVersion: 1;
836
+ target: string;
837
+ directOnly: boolean;
838
+ dependencyTypes: WorkspaceDependencyType[];
839
+ consumers: Array<{
840
+ id: string;
841
+ /** Minimum number of dependency edges from this consumer to the target. */
842
+ distance: number;
843
+ direct: boolean;
844
+ path: string[];
845
+ }>;
846
+ diagnostics: WorkspaceGraphDiagnostic[];
847
+ }
848
+ //#endregion
849
+ //#region src/core/workspace-boundaries/types.d.ts
850
+ type BoundarySeverity = 'warn' | 'fail';
851
+ /** Fields intersect; values within a field are alternatives. */
852
+ interface WorkspaceBoundarySelector {
853
+ /** Exact package names. */
854
+ packages?: string[];
855
+ /** Exact workspace paths, or a directory followed by /**. */
856
+ paths?: string[];
857
+ tags?: string[];
858
+ private?: boolean;
859
+ }
860
+ interface WorkspaceBoundaryRule {
861
+ id: string;
862
+ from: WorkspaceBoundarySelector;
863
+ /** Alternatives; an empty list denies all internal dependencies. */
864
+ allow: WorkspaceBoundarySelector[];
865
+ /** Defaults to all four manifest dependency fields. */
866
+ dependencyTypes?: WorkspaceDependencyType[];
867
+ severity?: BoundarySeverity;
868
+ }
869
+ interface WorkspaceBoundaryException {
870
+ /** A configured rule ID, or the built-in cycle rule. */
871
+ rule: string;
872
+ /** Exact workspace-relative directory IDs, including . for root. */
873
+ source: string;
874
+ target: string;
875
+ type: WorkspaceDependencyType;
876
+ reason: string;
877
+ }
878
+ interface WorkspaceBoundariesConfig {
879
+ tags?: Record<string, Omit<WorkspaceBoundarySelector, 'tags'>>;
880
+ rules?: WorkspaceBoundaryRule[];
881
+ /** Defaults to runtime dependencies + optional dependencies, severity fail. */
882
+ cycles?: false | {
883
+ dependencyTypes?: WorkspaceDependencyType[];
884
+ severity?: BoundarySeverity;
885
+ };
886
+ exceptions?: WorkspaceBoundaryException[];
887
+ }
888
+ interface WorkspaceBoundaryFinding {
889
+ id: 'boundary-rule' | 'boundary-cycle' | 'boundary-config' | 'boundary-selector-unmatched' | 'boundary-graph' | 'boundary-exception-unused';
890
+ status: BoundarySeverity;
891
+ detail: string;
892
+ rule?: string;
893
+ path?: string;
894
+ field?: string;
895
+ /** Closed representative cycle, or the two endpoints of a violating edge. */
896
+ chain?: string[];
897
+ edges?: WorkspaceGraphEdge[];
898
+ /** All members of the strongly connected component; one finding per component. */
899
+ members?: string[];
900
+ }
901
+ interface WorkspaceBoundariesReport {
902
+ schemaVersion: 1;
903
+ workspaceDir: string;
904
+ configFile: string | null;
905
+ packageCount: number;
906
+ findings: WorkspaceBoundaryFinding[];
907
+ /** Every waived edge remains visible together with its required reason. */
908
+ exceptions: Array<WorkspaceBoundaryException & {
909
+ edges: WorkspaceGraphEdge[];
910
+ }>;
911
+ summary: {
912
+ warn: number;
913
+ fail: number;
914
+ waived: number;
915
+ };
916
+ }
917
+ //#endregion
918
+ //#region src/types/clean.d.ts
919
+ /**
920
+ * `repo workspace clean` 命令配置,可控制自动选择、排除包等行为。
921
+ */
922
+ interface CleanCommandConfig {
923
+ /**
924
+ * 是否跳过交互直接清理全部。
925
+ * @default false
926
+ */
927
+ autoConfirm?: boolean;
928
+ /** 仅输出完整清理计划,不删除目录或修改元数据。 */
929
+ dryRun?: boolean;
930
+ /**
931
+ * 不允许被清理的包名列表。
932
+ * @default []
933
+ */
934
+ ignorePackages?: string[];
935
+ /**
936
+ * 是否包含 private 包。
937
+ * @default true
938
+ */
939
+ includePrivate?: boolean;
940
+ /**
941
+ * 显式指定根 devDependencies.repoctl 的版本;未设置时保留现有版本,缺失时使用 latest。
942
+ * @default 当前依赖版本
943
+ */
944
+ pinnedVersion?: string;
945
+ }
946
+ //#endregion
947
+ //#region src/commands/api-report/types.d.ts
948
+ interface PublicApiEntryConfig {
949
+ /** Built declaration path relative to this workspace package. */
950
+ entryPoint: string;
951
+ /** Explicit .api.md baseline path relative to the workspace root. */
952
+ baseline: string;
953
+ }
954
+ interface PublicApiPackageConfig {
955
+ entries: Record<string, PublicApiEntryConfig>;
956
+ /** Relative to the workspace package; defaults to tsconfig.json. */
957
+ tsconfig?: string;
958
+ }
959
+ type PublicApiConfig = Record<string, PublicApiPackageConfig>;
960
+ interface PublicApiOptions {
961
+ /** Exact package names or explicit ./workspace paths; defaults to all workspaces. */
962
+ packages?: string[];
963
+ timeoutMs?: number;
964
+ signal?: AbortSignal;
965
+ }
966
+ interface PublicApiDiagnostic {
967
+ code: string;
968
+ severity: 'warning' | 'error';
969
+ message: string;
970
+ file?: string;
971
+ line?: number;
972
+ }
973
+ interface PublicApiEntryReport {
974
+ workspace: string;
975
+ packageName: string | null;
976
+ subpath: string;
977
+ entryPoint: string;
978
+ baseline: string;
979
+ status: 'new' | 'changed' | 'unchanged' | 'failed';
980
+ before: string | null;
981
+ after: string | null;
982
+ /** Fingerprint of the native compiler inputs, for stale-plan detection. */
983
+ inputHash: string | null;
984
+ /** Native compiler input digests; paths may reference installed external types. */
985
+ inputs: Array<{
986
+ path: string;
987
+ hash: string;
988
+ }>;
989
+ beforeHash: string | null;
990
+ afterHash: string | null;
991
+ diff: string | null;
992
+ diagnostics: PublicApiDiagnostic[];
993
+ changeIntents: string[];
994
+ }
995
+ interface PublicApiReport {
996
+ schemaVersion: 1;
997
+ kind: 'public-api-report';
998
+ workspaceDir: string;
999
+ configurationHash: string;
1000
+ selection: string[];
1001
+ tool: {
1002
+ version: string;
1003
+ moduleHash: string;
1004
+ } | null;
1005
+ status: 'unchanged' | 'changes' | 'failed' | 'skipped';
1006
+ entries: PublicApiEntryReport[];
1007
+ skipped: Array<{
1008
+ workspace: string;
1009
+ reason: 'not-configured';
1010
+ }>;
1011
+ diagnostics: PublicApiDiagnostic[];
1012
+ review: string;
1013
+ }
1014
+ interface PublicApiUpdatePlan {
1015
+ schemaVersion: 1;
1016
+ kind: 'public-api-update';
1017
+ report: PublicApiReport;
1018
+ }
1019
+ interface PublicApiUpdateResult {
1020
+ status: 'applied' | 'unchanged';
1021
+ changed: string[];
1022
+ }
1023
+ //#endregion
1024
+ //#region src/types/project-references.d.ts
1025
+ /** Explicit compilation projects, independently of npm dependency relationships. */
1026
+ interface ProjectReferencesConfig {
1027
+ /** Required for plan application; existing references can always be checked. */
1028
+ enabled?: boolean;
1029
+ /** Existing solution tsconfig, relative to the workspace. @default 'tsconfig.json' */
1030
+ root?: string;
1031
+ /** Workspace-relative config globs; defaults to each package's tsconfig.json. */
1032
+ projects?: string[];
1033
+ /** Workspace-relative config globs omitted from managed discovery. */
1034
+ exclude?: string[];
1035
+ /** Explicit compilation edges between discovered configs; no npm edge inference. */
1036
+ relations?: Array<{
1037
+ source: string;
1038
+ target: string;
1039
+ }>;
1040
+ }
1041
+ interface ProjectReferencesDiagnostic {
1042
+ code: 'config' | 'missing' | 'incompatible' | 'cycle' | 'ownership' | 'unselected';
1043
+ path: string;
1044
+ message: string;
1045
+ }
1046
+ interface ProjectReferencesOperation {
1047
+ path: string;
1048
+ before: string | null;
1049
+ after: string;
1050
+ beforeHash: string | null;
1051
+ afterHash: string;
1052
+ diff: string | null;
1053
+ }
1054
+ interface ProjectReferencesPlan {
1055
+ schemaVersion: 1;
1056
+ workspaceDir: string;
1057
+ enabled: boolean;
1058
+ root: string;
1059
+ action: 'disabled' | 'blocked' | 'update' | 'unchanged';
1060
+ /** Selected configs, excluding manual reference targets. */
1061
+ projects: string[];
1062
+ diagnostics: ProjectReferencesDiagnostic[];
1063
+ operations: ProjectReferencesOperation[];
1064
+ /** Fingerprints include configuration, discovery and compiler-read inputs. */
1065
+ inputs: Record<string, string>;
1066
+ validation: Array<{
1067
+ config: string;
1068
+ cwd: string;
1069
+ command: string[];
1070
+ }>;
1071
+ }
1072
+ interface ProjectReferencesCheck {
1073
+ schemaVersion: 1;
1074
+ ok: boolean;
1075
+ plan: ProjectReferencesPlan;
1076
+ }
1077
+ interface ProjectReferencesApplyResult {
1078
+ schemaVersion: 1;
1079
+ changed: string[];
1080
+ recoveryFiles: string[];
1081
+ validation: ProjectReferencesPlan['validation'];
1082
+ }
1083
+ //#endregion
1084
+ //#region src/types/config/tooling.d.ts
1085
+ /**
1086
+ * `tooling.commitlint` 配置块。
1087
+ *
1088
+ * 该对象会与 `@icebreakers/commitlint-config` 的默认配置合并。
1089
+ */
1090
+ interface CommitlintToolingConfig extends IcebreakerCommitlintOptions {}
1091
+ /**
1092
+ * `tooling.eslint` 配置块。
1093
+ *
1094
+ * 该对象会与 `@icebreakers/eslint-config` 的默认 flat config 合并。
1095
+ */
1096
+ interface EslintToolingConfig extends UserDefinedOptions {
1097
+ /**
1098
+ * 额外传给 `createEslint(...userConfigs)` 的后续配置项。
1099
+ * 在 `defineEslintConfig({ options, configs })` 中也可以放到顶层 `configs`。
1100
+ * @default []
1101
+ */
1102
+ configs?: UserConfigItem[];
1103
+ }
1104
+ /**
1105
+ * `tooling.stylelint` 配置块。
1106
+ *
1107
+ * 该对象会与 `@icebreakers/stylelint-config` 的默认配置合并。
1108
+ */
1109
+ interface StylelintToolingConfig extends StylelintConfig {}
1110
+ /**
1111
+ * `tooling.lintStaged` 配置块。
1112
+ */
1113
+ interface LintStagedToolingConfig {
1114
+ /**
1115
+ * 调用 repo CLI 的基础命令。
1116
+ * 通常保持为 `pnpm exec repo`,以便 Husky 与 lint-staged 入口统一。
1117
+ * @default 'pnpm exec repo'
1118
+ */
1119
+ repoCommand?: string;
1120
+ /**
1121
+ * 直接透传完整的 lint-staged 原生配置。
1122
+ * 一旦提供,monorepo 默认规则将不再自动注入。
1123
+ * @default undefined
1124
+ */
1125
+ config?: Configuration;
1126
+ }
1127
+ /**
1128
+ * `tooling.tsconfig` 配置块。
1129
+ *
1130
+ * 该对象会与 monorepo 内置的 TypeScript 基线配置合并。
1131
+ */
1132
+ interface TsconfigToolingConfig {
1133
+ /**
1134
+ * 顶层 `extends` 字段。
1135
+ * @default undefined
1136
+ */
1137
+ extends?: string | string[];
1138
+ /**
1139
+ * TypeScript `compilerOptions` 配置。
1140
+ * @default undefined
1141
+ */
1142
+ compilerOptions?: Record<string, unknown>;
1143
+ /**
1144
+ * 顶层 `include` 字段。
1145
+ * @default undefined
1146
+ */
1147
+ include?: string[];
1148
+ /**
1149
+ * 顶层 `exclude` 字段。
1150
+ * @default undefined
1151
+ */
1152
+ exclude?: string[];
1153
+ /**
1154
+ * 顶层 `files` 字段。
1155
+ * @default undefined
1156
+ */
1157
+ files?: string[];
1158
+ /**
1159
+ * 顶层 `references` 字段。
1160
+ * @default undefined
1161
+ */
1162
+ references?: Array<{
1163
+ path: string;
1164
+ }>;
1165
+ /**
1166
+ * 顶层 `compileOnSave` 字段。
1167
+ * @default undefined
1168
+ */
1169
+ compileOnSave?: boolean;
1170
+ }
1171
+ /**
1172
+ * `tooling.vitest` 配置块。
1173
+ *
1174
+ * 这些字段会参与根级 Vitest 配置的自动推导。
1175
+ */
1176
+ interface VitestToolingConfig {
1177
+ /**
1178
+ * 项目扫描与 workspace 文件解析的根目录。
1179
+ * @default process.cwd()
1180
+ */
1181
+ rootDir?: string;
1182
+ /**
1183
+ * 显式指定需要扫描的项目根目录。
1184
+ * 未提供时优先从 `pnpm-workspace.yaml` 推导,失败后回退到 `['packages', 'apps']`。
1185
+ * @default undefined
1186
+ */
1187
+ projectRoots?: string[];
1188
+ /**
1189
+ * 子项目 Vitest 配置文件候选名列表。
1190
+ * @default ['vitest.config.ts', 'vitest.config.mts', 'vitest.config.js', 'vitest.config.cjs', 'vitest.workspace.ts', 'vitest.workspace.mts']
1191
+ */
1192
+ configCandidates?: string[];
1193
+ /**
1194
+ * workspace 配置文件名。
1195
+ * @default 'pnpm-workspace.yaml'
1196
+ */
1197
+ workspaceFile?: string;
1198
+ /**
1199
+ * 是否把根级 `vitest.config.*` 也加入 `test.projects`。
1200
+ * @default false
1201
+ */
1202
+ includeWorkspaceRootConfig?: boolean;
1203
+ /**
1204
+ * coverage 需要额外排除的 glob。
1205
+ * @default undefined
1206
+ */
1207
+ coverageExclude?: string[];
1208
+ /**
1209
+ * 是否开启 coverage。
1210
+ * @default true
1211
+ */
1212
+ coverageEnabled?: boolean;
1213
+ /**
1214
+ * 是否对未被测试覆盖的文件也统计 coverage。
1215
+ * @default false
1216
+ */
1217
+ coverageAll?: boolean;
1218
+ /**
1219
+ * 是否跳过 100% 覆盖文件的输出。
1220
+ * @default true
1221
+ */
1222
+ coverageSkipFull?: boolean;
1223
+ /**
1224
+ * 直接透传到最终 `vitest.config.*` 返回值的完整配置覆盖项。
1225
+ * 适合配置 `test.coverage`、`resolve.alias`、`plugins` 等原生 Vitest/Vite 字段。
1226
+ * @default undefined
1227
+ */
1228
+ overrides?: ViteUserConfig;
1229
+ }
1230
+ /**
1231
+ * `tooling.vitestProject` 配置块。
1232
+ *
1233
+ * 用于单个 package/app 的项目级 Vitest 默认值。
1234
+ */
1235
+ interface VitestProjectToolingConfig {
1236
+ /**
1237
+ * 测试环境内的 alias 映射。
1238
+ * @default undefined
1239
+ */
1240
+ alias?: Array<{
1241
+ find: string | RegExp;
1242
+ replacement: string;
1243
+ }>;
1244
+ /**
1245
+ * 是否启用 Vitest globals。
1246
+ * @default true
1247
+ */
1248
+ globals?: boolean;
1249
+ /**
1250
+ * 单测默认超时时间,单位毫秒。
1251
+ * @default 60000
1252
+ */
1253
+ testTimeout?: number;
1254
+ /**
1255
+ * 测试环境类型。
1256
+ * @default 'node'
1257
+ */
1258
+ environment?: string;
1259
+ }
1260
+ /**
1261
+ * `tooling.husky` 配置块。
1262
+ */
1263
+ interface HuskyToolingConfig {
1264
+ /**
1265
+ * pre-commit 钩子执行命令。
1266
+ * 未设置时默认运行 `pnpm exec lint-staged`。
1267
+ * @default undefined
1268
+ */
1269
+ preCommitCommand?: string;
1270
+ /**
1271
+ * commit-msg 钩子执行命令。
1272
+ * 可通过 `{editFile}` 占位符注入 commit message 文件路径。
1273
+ * 未设置时默认运行 `pnpm exec commitlint --edit {editFile}`。
1274
+ * @default undefined
1275
+ */
1276
+ commitMsgCommand?: string;
1277
+ }
1278
+ /**
1279
+ * `repoctl.config.ts` 中 `tooling` 总配置。
1280
+ *
1281
+ * 每个字段分别映射到对应的配置工厂与验证命令。
1282
+ */
1283
+ interface ToolingConfig {
1284
+ /** Explicit public declaration entrypoints and reviewed API baselines. */
1285
+ apiReports?: PublicApiConfig;
1286
+ commitlint?: CommitlintToolingConfig;
1287
+ eslint?: EslintToolingConfig;
1288
+ stylelint?: StylelintToolingConfig;
1289
+ lintStaged?: LintStagedToolingConfig;
1290
+ tsconfig?: TsconfigToolingConfig;
1291
+ projectReferences?: ProjectReferencesConfig;
1292
+ vitest?: VitestToolingConfig;
1293
+ vitestProject?: VitestProjectToolingConfig;
1294
+ husky?: HuskyToolingConfig;
1295
+ }
1296
+ //#endregion
1297
+ //#region src/types/env-cache.d.ts
1298
+ interface EnvCacheSuppression {
1299
+ rule: string;
1300
+ reason: string;
1301
+ package?: string;
1302
+ task?: string;
1303
+ variable?: string;
1304
+ path?: string;
1305
+ }
1306
+ interface EnvCacheConfig {
1307
+ /** Build is checked by default; task reachability is not inferred from source code. */
1308
+ tasks?: string[];
1309
+ include?: string[];
1310
+ exclude?: string[];
1311
+ frameworkInference?: boolean;
1312
+ suppressions?: EnvCacheSuppression[];
1313
+ }
1314
+ interface EnvCacheOptions {
1315
+ tasks?: string[];
1316
+ frameworkInference?: boolean;
1317
+ }
1318
+ interface EnvCacheEvidence {
1319
+ path: string;
1320
+ line: number;
1321
+ column: number;
1322
+ kind: 'process-env' | 'import-meta-env' | 'example' | 'dynamic';
1323
+ }
1324
+ interface EnvCacheVariable {
1325
+ name: string;
1326
+ coverage: 'hash' | 'passthrough' | 'inferred' | 'builtin' | 'missing' | 'unknown';
1327
+ evidence: EnvCacheEvidence[];
1328
+ declarations: Array<{
1329
+ path: string;
1330
+ field: string;
1331
+ pattern: string;
1332
+ }>;
1333
+ }
1334
+ interface EnvCacheFinding {
1335
+ rule: string;
1336
+ severity: 'info' | 'warn' | 'fail';
1337
+ package: string;
1338
+ task: string | null;
1339
+ variable: string | null;
1340
+ path: string | null;
1341
+ line: number | null;
1342
+ message: string;
1343
+ suppression?: {
1344
+ reason: string;
1345
+ index: number;
1346
+ };
1347
+ }
1348
+ interface EnvCacheTask {
1349
+ package: string;
1350
+ path: string;
1351
+ task: string;
1352
+ cache: boolean | null;
1353
+ variables: EnvCacheVariable[];
1354
+ dynamic: EnvCacheEvidence[];
1355
+ files: Array<{
1356
+ path: string;
1357
+ coverage: 'global' | 'task' | 'default' | 'missing' | 'unknown';
1358
+ }>;
1359
+ }
1360
+ interface EnvCacheReport {
1361
+ schemaVersion: 1;
1362
+ kind: 'environment-cache-check';
1363
+ status: 'pass' | 'warn' | 'fail';
1364
+ tasks: EnvCacheTask[];
1365
+ findings: EnvCacheFinding[];
1366
+ summary: {
1367
+ info: number;
1368
+ warn: number;
1369
+ fail: number;
1370
+ suppressed: number;
1371
+ };
1372
+ limitations: string[];
1373
+ }
1374
+ //#endregion
1375
+ //#region src/commands/release/lines/types.d.ts
1376
+ /** Git branches and npm channels; stable and maintenance use pnpm's native main lane. */
1377
+ interface ReleaseBranchesConfig {
1378
+ /** Primary stable branch. Defaults to main. */
1379
+ stable?: string;
1380
+ maintenance?: Array<{
1381
+ branch: string;
1382
+ range: string;
1383
+ tag: string;
1384
+ }>;
1385
+ /** Omitted keeps alpha/beta/rc/next; an empty array disables prerelease branches. */
1386
+ prerelease?: Array<{
1387
+ branch: string;
1388
+ lane: string;
1389
+ tag: string;
1390
+ target?: string;
1391
+ }>;
1392
+ }
1393
+ interface ReleaseBranchRule {
1394
+ branch: string;
1395
+ kind: 'stable' | 'maintenance' | 'prerelease';
1396
+ lane: string;
1397
+ range: string;
1398
+ excludedRanges: string[];
1399
+ distTag: string;
1400
+ /** Stable or maintenance branch reached when exiting this prerelease lane. */
1401
+ target: string;
1402
+ }
1403
+ //#endregion
1404
+ //#region src/types/release.d.ts
1405
+ interface ReleaseAfterPublishHookConfig {
1406
+ /** 执行结果未知时是否允许重试;仅适用于可安全重复执行的脚本。默认 false。 */
1407
+ idempotent?: boolean;
1408
+ /** package.json 中要通过 `pnpm run` 执行的脚本名。 */
1409
+ script: string;
1410
+ /**
1411
+ * 脚本失败时是否只记录警告并继续。
1412
+ * @default false
1413
+ */
1414
+ continueOnError?: boolean;
1415
+ }
1416
+ interface ReleaseCommandConfig {
1417
+ /** Stable, maintenance and prerelease branch mappings. */
1418
+ branches?: ReleaseBranchesConfig;
1419
+ /**
1420
+ * version 与 publish 阶段执行的根 package.json 校验脚本。
1421
+ * 配置后完整替换内置的 build、lint、test。
1422
+ * @default ['build', 'lint', 'test']
1423
+ */
1424
+ qualityScripts?: string[];
1425
+ hooks?: {
1426
+ /**
1427
+ * qualityScripts 通过后追加执行的校验脚本。
1428
+ * 任一脚本失败都会中止版本或发布流程。
1429
+ * @default []
1430
+ */
1431
+ verify?: string[];
1432
+ /**
1433
+ * pnpm version 前执行的根 package.json 脚本。
1434
+ * @default []
1435
+ */
1436
+ beforeVersion?: string[];
1437
+ /**
1438
+ * pnpm version 后执行的根 package.json 脚本。
1439
+ * @default []
1440
+ */
1441
+ afterVersion?: string[];
1442
+ /**
1443
+ * pnpm publish 前执行的根 package.json 脚本。
1444
+ * @default []
1445
+ */
1446
+ beforePublish?: string[];
1447
+ /**
1448
+ * npm metadata 与 GitHub Release 处理完成后执行的根 package.json 脚本。
1449
+ * 在新发布或恢复未完成发布时执行;跨 runner 恢复会跳过已完成的脚本。
1450
+ * @default []
1451
+ */
1452
+ afterPublish?: ReleaseAfterPublishHookConfig[];
1453
+ };
1454
+ }
1455
+ //#endregion
1456
+ //#region src/types/config.d.ts
1457
+ interface AiCommandConfig {
1458
+ /**
1459
+ * 默认输出路径,不填则自动创建 `agentic/prompts/<timestamp>/prompt.md` 文件夹与模板。
1460
+ * @default undefined
1461
+ */
1462
+ output?: string;
1463
+ /**
1464
+ * 默认存放目录,配合 name / tasks 批量生成时使用。
1465
+ * @default 'agentic/prompts'
1466
+ */
1467
+ baseDir?: string;
1468
+ /**
1469
+ * 是否允许覆盖已存在文件。
1470
+ * @default false
1471
+ */
1472
+ force?: boolean;
1473
+ /**
1474
+ * 模板格式。
1475
+ * @default 'md'
1476
+ */
1477
+ format?: AgenticTemplateFormat;
1478
+ /**
1479
+ * 任务清单文件路径(JSON 数组),用于批量生成。
1480
+ * @default undefined
1481
+ */
1482
+ tasksFile?: string;
1483
+ }
1484
+ /**
1485
+ * `repo package create` 命令的配置项。
1486
+ * 模板参数与交互回调仅由单次创建调用传入。
1487
+ */
1488
+ interface CreateCommandConfig extends Partial<Omit<CreateNewProjectOptions, 'cwd' | 'parameters' | 'parameterPrompt'>> {
1489
+ /**
1490
+ * 自定义模板根目录,相对路径按配置文件所在目录解析。
1491
+ * @default 已安装模板包的 templates 目录
1492
+ */
1493
+ templatesDir?: string;
1494
+ /**
1495
+ * 扩展模板映射表,key 为类型,value 为模板来源/目标路径。
1496
+ * @default 内置 `templateMap`
1497
+ */
1498
+ templateMap?: Record<string, string | CreateTemplateDefinition>;
1499
+ /**
1500
+ * 自定义交互提示的选项列表。
1501
+ * @default 已解析目录中的全部模板
1502
+ */
1503
+ choices?: CreateChoiceOption[];
1504
+ /**
1505
+ * 当未选择模板时使用的默认模板。
1506
+ * @default 'tsdown'
1507
+ */
1508
+ defaultTemplate?: CreateNewProjectOptions['type'];
1509
+ }
1510
+ /**
1511
+ * CLI 交互式选择框的选项结构。
1512
+ */
1513
+ interface CreateChoiceOption {
1514
+ /**
1515
+ * 唯一值,将回传给命令逻辑使用。
1516
+ * @default undefined
1517
+ */
1518
+ value: string;
1519
+ /**
1520
+ * 选项展示名称。
1521
+ * @default value
1522
+ */
1523
+ name?: string;
1524
+ /**
1525
+ * 选项描述信息。
1526
+ * @default undefined
1527
+ */
1528
+ description?: string;
1529
+ /**
1530
+ * 短名称,用于命令行紧凑展示。
1531
+ * @default undefined
1532
+ */
1533
+ short?: string;
1534
+ /**
1535
+ * 设置为 true 或字符串即可禁用该选项并显示原因。
1536
+ * @default false
1537
+ */
1538
+ disabled?: boolean | string;
1539
+ }
1540
+ /**
1541
+ * `repo workspace upgrade` 命令配置,覆盖脚本、目标文件等能力。
1542
+ */
1543
+ interface UpgradeCommandConfig extends Partial<CliOpts> {
1544
+ /**
1545
+ * 额外需要写入的目标文件列表。
1546
+ * @default []
1547
+ */
1548
+ targets?: string[];
1549
+ /**
1550
+ * 是否与默认目标合并,false 表示完全覆盖。
1551
+ * @default true
1552
+ */
1553
+ mergeTargets?: boolean;
1554
+ /**
1555
+ * 需要写入 package.json 的脚本集合。
1556
+ * @default {}
1557
+ */
1558
+ scripts?: Record<string, string>;
1559
+ /**
1560
+ * 是否跳过生成 pnpm change intent markdown。
1561
+ * @default true
1562
+ */
1563
+ skipChangesetMarkdown?: boolean;
1564
+ }
1565
+ /**
1566
+ * `repo workspace init` / `repo tooling init` 共享配置,用于跳过部分初始化步骤并配置 tooling 默认目标。
1567
+ */
1568
+ interface InitCommandConfig {
1569
+ /**
1570
+ * 是否跳过 README 生成。
1571
+ * @default false
1572
+ */
1573
+ skipReadme?: boolean;
1574
+ /**
1575
+ * 是否跳过 package.json 写入。
1576
+ * @default false
1577
+ */
1578
+ skipPkgJson?: boolean;
1579
+ /**
1580
+ * 是否跳过 pnpm versioning 元数据的更新。
1581
+ * @default false
1582
+ */
1583
+ skipChangeset?: boolean;
1584
+ /**
1585
+ * 是否跳过 Issue 模版 discussions 链接的更新。
1586
+ * @default false
1587
+ */
1588
+ skipIssueTemplateConfig?: boolean;
1589
+ /**
1590
+ * 额外要生成的 tooling 配置文件列表。
1591
+ * @default []
1592
+ */
1593
+ tooling?: InitToolingTarget[];
1594
+ /**
1595
+ * 初始化预设。
1596
+ * @default undefined
1597
+ */
1598
+ preset?: InitPreset;
1599
+ /**
1600
+ * 是否覆盖已存在的 tooling 配置文件。
1601
+ * @default false
1602
+ */
1603
+ force?: boolean;
1604
+ }
1605
+ /**
1606
+ * `monorepo env mirror` 命令配置,可增加额外的环境变量镜像。
1607
+ */
1608
+ interface MirrorCommandConfig {
1609
+ /**
1610
+ * 需要注入的环境变量键值对。
1611
+ * @default {}
1612
+ */
1613
+ env?: Record<string, string>;
1614
+ }
1615
+ /**
1616
+ * 项目级配置入口,按命令划分可插拔的配置块。
1617
+ */
1618
+ interface MonorepoConfig {
1619
+ /** Installed JSON-only organization packages, pinned to exact versions. */
1620
+ presets?: OrganizationPresetReference[];
1621
+ /** Offline admission of direct third-party declarations, also checked by doctor. */
1622
+ dependencyPolicy?: DependencyAdmissionConfig;
1623
+ /** Internal manifest dependency policies, also checked by doctor when configured. */
1624
+ boundaries?: WorkspaceBoundariesConfig;
1625
+ /** Exact workspace names or relative paths mapped to GitHub owners. */
1626
+ codeowners?: CodeownersConfig;
1627
+ /** Optional installation policy expectations; pnpm remains the installer. */
1628
+ installationSecurity?: InstallSecurityExpectations;
1629
+ /**
1630
+ * 按命令分类的可选配置。
1631
+ * 各字段默认均为 `undefined`,命令执行时会按各自逻辑回退到内置默认值。
1632
+ * @default {}
1633
+ */
1634
+ commands?: {
1635
+ ai?: AiCommandConfig;
1636
+ create?: CreateCommandConfig;
1637
+ clean?: CleanCommandConfig;
1638
+ deps?: DependenciesCommandConfig;
1639
+ doctor?: DoctorCommandConfig;
1640
+ env?: EnvCacheConfig;
1641
+ upgrade?: UpgradeCommandConfig;
1642
+ init?: InitCommandConfig;
1643
+ mirror?: MirrorCommandConfig;
1644
+ release?: ReleaseCommandConfig;
1645
+ };
1646
+ /**
1647
+ * 按工程化能力分类的可选配置。
1648
+ * 这些配置通常会被 `repoctl/tooling` 中的 helper 消费。
1649
+ * @default {}
1650
+ */
1651
+ tooling?: ToolingConfig;
1652
+ }
1653
+ //#endregion
1654
+ //#region src/types/removal.d.ts
1655
+ interface WorkspaceRemovalOptions {
1656
+ target: string;
1657
+ /** Remove only the exact manifest dependency fields shown by the plan. */
1658
+ removeReferences?: boolean;
1659
+ }
1660
+ interface WorkspaceRemovalBlocker {
1661
+ code: 'git_unavailable' | 'dirty_target' | 'nested_repository' | 'consumers' | 'graph_incomplete' | 'unsupported_manifest';
1662
+ paths: string[];
1663
+ }
1664
+ interface WorkspaceRemovalEntry {
1665
+ /** Path relative to the selected package; . denotes its directory. */
1666
+ path: string;
1667
+ kind: 'directory' | 'file' | 'symlink';
1668
+ mode: number;
1669
+ mtimeMs: number;
1670
+ size?: number;
1671
+ hash?: string;
1672
+ link?: string;
1673
+ }
1674
+ interface WorkspaceRemovalFile {
1675
+ path: string;
1676
+ before: string;
1677
+ after: string;
1678
+ beforeHash: string;
1679
+ afterHash: string;
1680
+ fields: string[];
1681
+ }
1682
+ interface WorkspaceRemovalPlan {
1683
+ schemaVersion: 1;
1684
+ kind: 'workspace-removal';
1685
+ workspaceDir: string;
1686
+ selection: {
1687
+ target: string;
1688
+ removeReferences: boolean;
1689
+ };
1690
+ target: WorkspaceGraphNode;
1691
+ canApply: boolean;
1692
+ blockers: WorkspaceRemovalBlocker[];
1693
+ consumers: WorkspaceImpactResult['consumers'];
1694
+ references: WorkspaceGraphEdge[];
1695
+ diagnostics: WorkspaceGraphDiagnostic[];
1696
+ files: WorkspaceRemovalFile[];
1697
+ inputs: {
1698
+ path: string;
1699
+ hash: string;
1700
+ }[];
1701
+ inventory: WorkspaceRemovalEntry[];
1702
+ workspaces: string[];
1703
+ git: {
1704
+ root: string;
1705
+ head: string;
1706
+ } | null;
1707
+ review: {
1708
+ /** Tracked text files outside the target; neither imports nor dynamic config are resolved. */
1709
+ scope: 'git-tracked-text-literal-matches';
1710
+ scanned: string[];
1711
+ matches: {
1712
+ path: string;
1713
+ values: string[];
1714
+ }[];
1715
+ skipped: string[];
1716
+ };
1717
+ nextSteps: string[];
1718
+ }
1719
+ interface WorkspaceRemovalResult {
1720
+ status: 'applied' | 'unchanged';
1721
+ removed: string[];
1722
+ changed: string[];
1723
+ /** The operation committed, but its own recovery files require manual cleanup. */
1724
+ cleanupPending: string[];
1725
+ nextSteps: string[];
1726
+ }
1727
+ //#endregion
1728
+ //#region src/types/move.d.ts
1729
+ interface WorkspaceMoveOptions {
1730
+ target: string;
1731
+ /** Workspace-relative destination; omit for a package-name-only change. */
1732
+ to?: string;
1733
+ /** New npm package name; omit for a directory-only move. */
1734
+ name?: string;
1735
+ }
1736
+ interface WorkspaceMoveReview {
1737
+ scope: 'git-tracked-text-candidates';
1738
+ scanned: string[];
1739
+ skipped: string[];
1740
+ tasks: {
1741
+ path: string;
1742
+ line: number;
1743
+ reason: string;
1744
+ }[];
1745
+ }
1746
+ interface WorkspaceMovePlan {
1747
+ schemaVersion: 1;
1748
+ kind: 'workspace-move';
1749
+ workspaceDir: string;
1750
+ selection: {
1751
+ target: string;
1752
+ to: string;
1753
+ name?: string;
1754
+ };
1755
+ target: WorkspaceGraphNode;
1756
+ destination: {
1757
+ id: string;
1758
+ name?: string;
1759
+ };
1760
+ canApply: boolean;
1761
+ blockers: {
1762
+ code: string;
1763
+ paths: string[];
1764
+ }[];
1765
+ consumers: WorkspaceImpactResult['consumers'];
1766
+ references: WorkspaceGraphEdge[];
1767
+ diagnostics: WorkspaceGraphDiagnostic[];
1768
+ /** Paths are relative to the workspace before moving the package. */
1769
+ files: WorkspaceRemovalFile[];
1770
+ inputs: {
1771
+ path: string;
1772
+ hash: string;
1773
+ }[];
1774
+ inventory: WorkspaceRemovalEntry[];
1775
+ workspaces: WorkspaceGraphNode[];
1776
+ git: {
1777
+ root: string;
1778
+ head: string;
1779
+ } | null;
1780
+ /** Registered targets change in the same transaction; identity and baselines are retained. */
1781
+ templateInstances: TemplateInstanceMovePlan;
1782
+ review: WorkspaceMoveReview;
1783
+ nextSteps: string[];
1784
+ }
1785
+ interface WorkspaceMoveResult {
1786
+ status: 'applied' | 'unchanged';
1787
+ moved: {
1788
+ from: string;
1789
+ to: string;
1790
+ } | null;
1791
+ renamed: {
1792
+ from?: string;
1793
+ to: string;
1794
+ } | null;
1795
+ changed: string[];
1796
+ cleanupPending: string[];
1797
+ nextSteps: string[];
1798
+ }
1799
+ //#endregion
1800
+ //#region src/tooling/types.d.ts
1801
+ /**
1802
+ * `commitlint.config.*` 最终导出的配置类型。
1803
+ *
1804
+ */
1805
+ type MonorepoCommitlintConfig = IcebreakerCommitlintConfig;
1806
+ /**
1807
+ * `eslint.config.js` 最终导出的 flat config 类型。
1808
+ */
1809
+ type MonorepoEslintConfig = IcebreakerEslintConfig;
1810
+ /**
1811
+ * `stylelint.config.js` 最终导出的配置类型。
1812
+ *
1813
+ */
1814
+ type MonorepoStylelintConfig = IcebreakerStylelintConfig;
1815
+ /**
1816
+ * `lint-staged` 最终配置对象。
1817
+ *
1818
+ * key 为 glob pattern,value 为命令数组或命令生成函数。
1819
+ */
1820
+ interface MonorepoLintStagedConfig {
1821
+ [pattern: string]: string[] | ((files: string[]) => string | string[]);
1822
+ }
1823
+ /**
1824
+ * `tsconfig.json` 最终导出的配置对象。
1825
+ */
1826
+ interface MonorepoTsconfig {
1827
+ extends?: string | string[];
1828
+ compilerOptions?: Record<string, unknown>;
1829
+ include?: string[];
1830
+ exclude?: string[];
1831
+ files?: string[];
1832
+ references?: Array<{
1833
+ path: string;
1834
+ }>;
1835
+ compileOnSave?: boolean;
1836
+ }
1837
+ interface DefineConfigOptions<TConfig> {
1838
+ cwd?: string;
1839
+ options?: TConfig;
1840
+ }
1841
+ interface DefineEslintConfigOptions extends DefineConfigOptions<EslintToolingConfig> {
1842
+ /**
1843
+ * 额外传给 ESLint flat config 工厂的配置片段。
1844
+ *
1845
+ * 这等价于 `options.configs`,但更贴近 flat config 的“基础 options + 后续 configs”写法。
1846
+ */
1847
+ configs?: UserConfigItem[];
1848
+ }
1849
+ /**
1850
+ * `createMonorepoLintStagedConfig()` 与 `defineLintStagedConfig()` 的配置项。
1851
+ */
1852
+ interface MonorepoLintStagedConfigOptions extends LintStagedToolingConfig {}
1853
+ /**
1854
+ * `createMonorepoVitestConfig()` 与 `defineVitestConfig()` 的共享配置项。
1855
+ *
1856
+ * 这些值会先参与 monorepo 级默认配置计算,再产出最终的 Vitest `test` 配置。
1857
+ */
1858
+ interface MonorepoVitestConfigOptions extends VitestToolingConfig {}
1859
+ /**
1860
+ * `createMonorepoVitestProjectConfig()` 的项目级配置项。
1861
+ */
1862
+ interface MonorepoVitestProjectConfigOptions extends VitestProjectToolingConfig {}
1863
+ /**
1864
+ * `createMonorepoVitestConfig()` 返回的标准结果结构。
1865
+ *
1866
+ * 该类型可用于约束自定义封装或二次 merge 的返回值。
1867
+ */
1868
+ interface MonorepoVitestConfigResult extends Omit<ViteUserConfig, 'test'> {
1869
+ test: NonNullable<ViteUserConfig['test']> & {
1870
+ projects?: NonNullable<ViteUserConfig['test']>['projects'];
1871
+ coverage?: NonNullable<NonNullable<ViteUserConfig['test']>['coverage']> & {
1872
+ enabled?: boolean;
1873
+ all?: boolean;
1874
+ skipFull?: boolean;
1875
+ exclude?: string[];
1876
+ };
1877
+ forceRerunTriggers?: string[];
1878
+ };
1879
+ }
1880
+ /**
1881
+ * 单个 package/app 的 `vitest.config.*` 最终导出结构。
1882
+ */
1883
+ interface MonorepoVitestProjectConfigResult {
1884
+ test: {
1885
+ alias?: Array<{
1886
+ find: string | RegExp;
1887
+ replacement: string;
1888
+ }>;
1889
+ globals: boolean;
1890
+ testTimeout: number;
1891
+ environment?: string;
1892
+ };
1893
+ }
1894
+ /**
1895
+ * `defineVitestConfig()` 的最终覆盖项。
1896
+ */
1897
+ type MonorepoVitestConfigOverrides = ViteUserConfig;
1898
+ interface DefineVitestConfigOptions {
1899
+ cwd?: string;
1900
+ options?: MonorepoVitestConfigOptions;
1901
+ overrides?: MonorepoVitestConfigOverrides;
1902
+ }
1903
+ interface DefineVitestProjectConfigOptions {
1904
+ cwd?: string;
1905
+ options?: MonorepoVitestProjectConfigOptions;
1906
+ }
1907
+ //#endregion
1908
+ //#region src/tooling/lint-staged.d.ts
1909
+ /**
1910
+ * 创建适用于当前仓库约定的 `lint-staged` 配置。
1911
+ *
1912
+ * 默认行为:
1913
+ * - `*.{js,jsx,mjs,ts,tsx,mts,cts}` 运行 `eslint --fix`
1914
+ * - `*.vue` 同时运行 `eslint --fix` 与 `stylelint --fix --allow-empty-input`
1915
+ * - TypeScript/Vue files and workspace `package.json` files share one
1916
+ * `pnpm exec repo verify staged-typecheck` task to avoid concurrent builds
1917
+ * - 样式文件运行 `stylelint --fix --allow-empty-input`
1918
+ *
1919
+ * @param options 可配置 `repoCommand`,默认值为 `pnpm exec repo`
1920
+ * @returns 可直接导出的 `lint-staged` 配置对象
1921
+ *
1922
+ * @example
1923
+ * ```js
1924
+ * import { createMonorepoLintStagedConfig } from 'repoctl/tooling'
1925
+ *
1926
+ * export default createMonorepoLintStagedConfig({
1927
+ * repoCommand: 'pnpm exec repo',
1928
+ * })
1929
+ * ```
1930
+ */
1931
+ declare function createMonorepoLintStagedConfig(options?: MonorepoLintStagedConfigOptions): MonorepoLintStagedConfig;
1932
+ /**
1933
+ * 从 `repoctl.config.ts` 读取 `tooling.lintStaged`,并生成 `lint-staged` 配置。
1934
+ *
1935
+ * @param input `cwd` 用于指定配置文件解析起点,`options` 用于追加运行时覆盖项
1936
+ * @returns 可直接导出的 `lint-staged` 配置对象
1937
+ */
1938
+ declare function defineLintStagedConfig(input?: DefineConfigOptions<MonorepoLintStagedConfigOptions>): Promise<MonorepoLintStagedConfig>;
1939
+ //#endregion
1940
+ //#region src/tooling/linters.d.ts
1941
+ /**
1942
+ * 基于 `@icebreakers/commitlint-config` 创建 commitlint 配置。
1943
+ *
1944
+ * 适合在需要手动传入覆盖项时使用;如果只想读取 `repoctl.config.ts` 默认值,
1945
+ * 优先使用 `defineCommitlintConfig()`。
1946
+ *
1947
+ * @param options 额外合并到默认 commitlint 配置上的字段
1948
+ * @returns 可直接作为 `commitlint.config.ts` 默认导出的配置对象
1949
+ *
1950
+ * @example
1951
+ * ```ts
1952
+ * import { createMonorepoCommitlintConfig } from 'repoctl/tooling'
1953
+ *
1954
+ * export default createMonorepoCommitlintConfig({
1955
+ * rules: {
1956
+ * 'subject-case': [0],
1957
+ * },
1958
+ * })
1959
+ * ```
1960
+ */
1961
+ declare function createMonorepoCommitlintConfig(options?: CommitlintToolingConfig): MonorepoCommitlintConfig;
1962
+ /**
1963
+ * 从 `repoctl.config.ts` 读取 `tooling.commitlint`,并生成 commitlint 配置。
1964
+ *
1965
+ * @param input `cwd` 用于指定配置文件解析起点,`options` 用于追加运行时覆盖项
1966
+ * @returns 可直接导出的 commitlint 配置对象
1967
+ *
1968
+ * @example
1969
+ * ```ts
1970
+ * import { defineCommitlintConfig } from 'repoctl/tooling'
1971
+ *
1972
+ * export default await defineCommitlintConfig()
1973
+ * ```
1974
+ */
1975
+ declare function defineCommitlintConfig(input?: DefineConfigOptions<CommitlintToolingConfig>): Promise<MonorepoCommitlintConfig>;
1976
+ /**
1977
+ * 基于 `@icebreakers/eslint-config` 创建 ESLint 配置。
1978
+ *
1979
+ * 默认会追加一个用于忽略 `fixtures` 目录的 glob,除非显式传入其他 `ignores`。
1980
+ *
1981
+ * @param options 额外 ESLint 配置;`ignores` 默认会忽略 `fixtures` 目录
1982
+ * @param extraConfigs 额外追加的 flat config 片段,等价于 `options.configs`
1983
+ * @returns 可直接作为 `eslint.config.js` 默认导出的 flat config
1984
+ *
1985
+ * @example
1986
+ * ```js
1987
+ * import { createMonorepoEslintConfig } from 'repoctl/tooling'
1988
+ *
1989
+ * export default createMonorepoEslintConfig(
1990
+ * { ignores: ['dist/**'] },
1991
+ * { rules: { 'no-console': 'off' } },
1992
+ * )
1993
+ * ```
1994
+ */
1995
+ declare function createMonorepoEslintConfig(options?: EslintToolingConfig, ...extraConfigs: UserConfigItem[]): MonorepoEslintConfig;
1996
+ /**
1997
+ * 从 `repoctl.config.ts` 读取 `tooling.eslint`,并生成 ESLint 配置。
1998
+ *
1999
+ * @param input `cwd` 用于指定配置文件解析起点,`options` 与 `configs` 用于追加运行时覆盖项
2000
+ * @returns 可直接导出的 ESLint flat config
2001
+ *
2002
+ * @example
2003
+ * ```js
2004
+ * import { defineEslintConfig } from 'repoctl/tooling'
2005
+ *
2006
+ * export default await defineEslintConfig(
2007
+ * { ignores: ['dist/**'] },
2008
+ * { rules: { 'no-console': 'off' } },
2009
+ * )
2010
+ * ```
2011
+ */
2012
+ declare function defineEslintConfig(input?: DefineEslintConfigOptions | EslintToolingConfig, ...configs: UserConfigItem[]): Promise<MonorepoEslintConfig>;
2013
+ /**
2014
+ * 基于 `@icebreakers/stylelint-config` 创建 Stylelint 配置。
2015
+ *
2016
+ * @param options 额外合并到默认 stylelint 配置上的字段
2017
+ * @returns 可直接作为 `stylelint.config.js` 默认导出的配置对象
2018
+ */
2019
+ declare function createMonorepoStylelintConfig(options?: StylelintToolingConfig): MonorepoStylelintConfig;
2020
+ /**
2021
+ * 从 `repoctl.config.ts` 读取 `tooling.stylelint`,并生成 Stylelint 配置。
2022
+ *
2023
+ * @param input `cwd` 用于指定配置文件解析起点,`options` 用于追加运行时覆盖项
2024
+ * @returns 可直接导出的 Stylelint 配置对象
2025
+ */
2026
+ declare function defineStylelintConfig(input?: DefineConfigOptions<StylelintToolingConfig>): Promise<MonorepoStylelintConfig>;
2027
+ //#endregion
2028
+ //#region src/tooling/shared.d.ts
2029
+ /**
2030
+ * 读取当前工作目录下的 `repoctl.config.*` 中 `tooling` 配置块。
2031
+ *
2032
+ * @param cwd 配置文件解析起点。默认使用 `process.cwd()`
2033
+ * @returns 标准化后的 tooling 配置;未配置时返回空对象
2034
+ *
2035
+ * @example
2036
+ * ```ts
2037
+ * import { loadMonorepoToolingConfig } from 'repoctl/tooling'
2038
+ *
2039
+ * const tooling = await loadMonorepoToolingConfig()
2040
+ * console.log(tooling.vitest?.includeWorkspaceRootConfig)
2041
+ * ```
2042
+ */
2043
+ declare function loadMonorepoToolingConfig(cwd?: string): Promise<NonNullable<ToolingConfig>>;
2044
+ //#endregion
2045
+ //#region src/tooling/tsconfig.d.ts
2046
+ /**
2047
+ * 创建 monorepo 内置的 TypeScript 基线配置。
2048
+ *
2049
+ * @param options 额外覆盖项,会与包内置 `tsconfig.base.json` 合并
2050
+ * @returns 可直接写入或二次扩展的 `tsconfig.json` 配置对象
2051
+ */
2052
+ declare function createMonorepoTsconfig(options?: TsconfigToolingConfig): MonorepoTsconfig;
2053
+ /**
2054
+ * 从 `repoctl.config.ts` 读取 `tooling.tsconfig`,并生成最终的 TypeScript 配置对象。
2055
+ *
2056
+ * @param input `cwd` 用于指定配置文件解析起点,`options` 用于追加运行时覆盖项
2057
+ * @returns 可直接写入或导出的 `tsconfig.json` 配置对象
2058
+ */
2059
+ declare function defineTsconfigConfig(input?: DefineConfigOptions<TsconfigToolingConfig>): Promise<MonorepoTsconfig>;
2060
+ //#endregion
2061
+ //#region src/tooling/vitest/index.d.ts
2062
+ /**
2063
+ * 创建 monorepo 根级 Vitest 配置。
2064
+ *
2065
+ * 默认值:
2066
+ * - `rootDir`: `process.cwd()`
2067
+ * - `workspaceFile`: `'pnpm-workspace.yaml'`
2068
+ * - `projectRoots`: 自动从 workspace packages 推导,失败时回退到 `['packages', 'apps']`
2069
+ * - `includeWorkspaceRootConfig`: `false`
2070
+ * - `coverageEnabled`: `true`
2071
+ * - `coverageAll`: `false`
2072
+ * - `coverageSkipFull`: `true`
2073
+ *
2074
+ * @param options Vitest 默认配置生成参数
2075
+ * @returns 仅包含 `test` 字段的 Vitest 配置片段
2076
+ *
2077
+ * @example
2078
+ * ```ts
2079
+ * import { createMonorepoVitestConfig } from 'repoctl/tooling'
2080
+ *
2081
+ * export default {
2082
+ * ...createMonorepoVitestConfig({
2083
+ * includeWorkspaceRootConfig: false,
2084
+ * coverageExclude: ['dist output glob'],
2085
+ * }),
2086
+ * }
2087
+ * ```
2088
+ */
2089
+ declare function createMonorepoVitestConfig(options?: MonorepoVitestConfigOptions): MonorepoVitestConfigResult;
2090
+ /**
2091
+ * 从 `repoctl.config.ts` 读取 `tooling.vitest`,再叠加运行时 `options` 与 `overrides`
2092
+ * 生成最终 Vitest 配置。
2093
+ *
2094
+ * 优先级从低到高:
2095
+ * 1. `repoctl.config.ts -> tooling.vitest`
2096
+ * 2. `options`
2097
+ * 3. `overrides`
2098
+ *
2099
+ * 推荐把“参与默认值推导”的字段放在 `options`,把“最终局部覆盖”放在 `overrides`。
2100
+ *
2101
+ * @param input `options` 会先与 `tooling.vitest` 合并;`overrides` 用于最终局部覆盖;`cwd` 用于配置文件解析起点
2102
+ * @returns 可直接作为 `defineConfig()` 返回值的 Vitest 配置对象
2103
+ *
2104
+ * @example
2105
+ * ```ts
2106
+ * import { defineVitestConfig } from 'repoctl/tooling'
2107
+ * import { defineConfig } from 'vitest/config'
2108
+ *
2109
+ * export default defineConfig(async () => await defineVitestConfig({
2110
+ * options: {
2111
+ * includeWorkspaceRootConfig: false,
2112
+ * },
2113
+ * overrides: {
2114
+ * test: {
2115
+ * coverage: {
2116
+ * exclude: ['dist output glob'],
2117
+ * skipFull: true,
2118
+ * },
2119
+ * },
2120
+ * },
2121
+ * }))
2122
+ * ```
2123
+ */
2124
+ declare function defineVitestConfig(input?: DefineVitestConfigOptions): Promise<MonorepoVitestConfigResult>;
2125
+ /**
2126
+ * 创建项目级 Vitest 配置。
2127
+ *
2128
+ * 默认值:
2129
+ * - `globals`: `true`
2130
+ * - `testTimeout`: `60_000`
2131
+ * - `environment`: `'node'`
2132
+ *
2133
+ * @param options 单个 package/app 的 Vitest 配置项
2134
+ * @returns 可直接给项目内 `vitest.config.ts` 使用的 `test` 配置片段
2135
+ */
2136
+ declare function createMonorepoVitestProjectConfig(options?: MonorepoVitestProjectConfigOptions): MonorepoVitestProjectConfigResult;
2137
+ /**
2138
+ * 从 `repoctl.config.ts` 读取 `tooling.vitestProject`,再叠加运行时 `options`
2139
+ * 生成单个 package/app 的项目级 Vitest 配置。
2140
+ *
2141
+ * 优先级从低到高:
2142
+ * 1. `repoctl.config.ts -> tooling.vitestProject`
2143
+ * 2. `options`
2144
+ *
2145
+ * @param input `cwd` 用于配置文件解析起点,`options` 用于追加项目内局部覆盖项
2146
+ * @returns 可直接传给 `defineProject()` 或与其他 Vite/Vitest 配置 merge 的项目级配置片段
2147
+ */
2148
+ declare function defineVitestProjectConfig(input?: DefineVitestProjectConfigOptions): Promise<MonorepoVitestProjectConfigResult>;
2149
+ //#endregion
2150
+ export { ReleaseBranchRule as $, TemplateCatalogDiagnostic as $n, WorkspacePackage as $t, MonorepoVitestProjectConfigResult as A, AdmissionDeclaration as An, DependencyReport as Ar, PublicApiReport as At, WorkspaceRemovalFile as B, CreateNewProjectPlan as Bn, WorkspaceBoundarySelector as Bt, MonorepoLintStagedConfigOptions as C, DoctorReport as Cn, DependencyConsistencyGroup as Cr, ProjectReferencesPlan as Ct, MonorepoVitestConfigOverrides as D, DoctorCommandConfig as Dn, DependencyGroupStatus as Dr, PublicApiEntryReport as Dt, MonorepoVitestConfigOptions as E, DoctorSuppressionReport as En, DependencyFixPlan as Er, PublicApiEntryConfig as Et, WorkspaceMovePlan as F, DependencyAdmissionReport as Fn, WorkspaceBoundariesConfig as Ft, CreateChoiceOption as G, TemplateSourceRequest as Gn, WorkspaceGraphFilter as Gt, WorkspaceRemovalPlan as H, resolveRemoteTemplateSource as Hn, WorkspaceGraph as Ht, WorkspaceMoveResult as I, DependencyAdmissionRule as In, WorkspaceBoundariesReport as It, MirrorCommandConfig as J, templateMap as Jn, WorkspaceImpactOptions as Jt, CreateCommandConfig as K, getCreateChoices as Kn, WorkspaceGraphNode as Kt, WorkspaceMoveReview as L, applyCreateNewProjectPlan as Ln, WorkspaceBoundaryException as Lt, SimpleGit as M, DependencyAdmissionException as Mn, DependencyVersionGroup as Mr, PublicApiUpdateResult as Mt, SimpleGitOptions as N, DependencyAdmissionFinding as Nn, CleanCommandConfig as Nt, MonorepoVitestConfigResult as O, DoctorOptions as On, DependencyOccurrence as Or, PublicApiOptions as Ot, WorkspaceMoveOptions as P, DependencyAdmissionOptions as Pn, BoundarySeverity as Pt, ReleaseCommandConfig as Q, TemplateCatalog as Qn, WorkspaceData as Qt, WorkspaceRemovalBlocker as R, createNewProject as Rn, WorkspaceBoundaryFinding as Rt, MonorepoLintStagedConfig as S, DoctorCheck as Sn, DependencyApplyResult as Sr, ProjectReferencesOperation as St, MonorepoTsconfig as T, DoctorSummary as Tn, DependencyFixOptions as Tr, PublicApiDiagnostic as Tt, WorkspaceRemovalResult as U, ResolvedTemplateSource as Un, WorkspaceGraphDiagnostic as Ut, WorkspaceRemovalOptions as V, resolveCreateNewProjectPlan as Vn, WorkspaceDependencyType as Vt, AiCommandConfig as W, TemplateSourceOptions as Wn, WorkspaceGraphEdge as Wt, UpgradeCommandConfig as X, CreateTemplateDefinition as Xn, WorkspaceWhyResult as Xt, MonorepoConfig as Y, resolveTemplateCatalog as Yn, WorkspaceImpactResult as Yt, ReleaseAfterPublishHookConfig as Z, ResolveTemplateCatalogOptions as Zn, GetWorkspacePackagesOptions as Zt, DefineEslintConfigOptions as _, InstallSecurityExpectations as _n, generateAgenticTemplate as _r, VitestToolingConfig as _t, createMonorepoTsconfig as a, CodeownersDiagnostic as an, OrganizationPresetDiagnostic as ar, EnvCacheReport as at, MonorepoCommitlintConfig as b, InstallSecurityReport as bn, CliOpts as br, ProjectReferencesConfig as bt, createMonorepoCommitlintConfig as c, CodeownersReport as cn, OrganizationPresetReference as cr, EnvCacheVariable as ct, defineCommitlintConfig as d, initMetadata as dn, OrganizationPresetTemplate as dr, HuskyToolingConfig as dt, WorkspacePackageManifest as en, TemplateCatalogEntry as er, ReleaseBranchesConfig as et, defineEslintConfig as f, initTooling as fn, AgenticTemplateFormat as fr, LintStagedToolingConfig as ft, DefineConfigOptions as g, InstallPolicyKey as gn, defaultAgenticBaseDir as gr, VitestProjectToolingConfig as gt, defineLintStagedConfig as h, InstallBuildDecision as hn, createTimestampFolderName as hr, TsconfigToolingConfig as ht, defineVitestProjectConfig as i, CodeownersConfig as in, OrganizationPresetAsset as ir, EnvCacheOptions as it, ConfigValues as j, DependencyAdmissionConfig as jn, DependencySection as jr, PublicApiUpdatePlan as jt, MonorepoVitestProjectConfigOptions as k, DoctorSuppression as kn, DependencyProtocol as kr, PublicApiPackageConfig as kt, createMonorepoEslintConfig as l, WorkspaceOwnership as ln, OrganizationPresetResolution as lr, CommitlintToolingConfig as lt, createMonorepoLintStagedConfig as m, initToolingTargets as mn, GenerateAgenticTemplateOptions as mr, ToolingConfig as mt, createMonorepoVitestProjectConfig as n, WorkspacePackageSummaryData as nn, ConfigSourceLayer as nr, EnvCacheEvidence as nt, defineTsconfigConfig as o, CodeownersOptions as on, OrganizationPresetLayer as or, EnvCacheSuppression as ot, defineStylelintConfig as p, normalizeInitToolingTargets as pn, AgenticTemplateTask as pr, StylelintToolingConfig as pt, InitCommandConfig as q, getTemplateMap as qn, WorkspaceGraphOptions as qt, defineVitestConfig as r, WorkspacePackageWithJsonPath as rn, ConfigValueSource as rr, EnvCacheFinding as rt, loadMonorepoToolingConfig as s, CodeownersPlan as sn, OrganizationPresetManifest as sr, EnvCacheTask as st, createMonorepoVitestConfig as t, WorkspacePackageSummary as tn, ConfigDiagnostic as tr, EnvCacheConfig as tt, createMonorepoStylelintConfig as u, init as un, OrganizationPresetSource as ur, EslintToolingConfig as ut, DefineVitestConfigOptions as v, InstallSecurityOptions as vn, generateAgenticTemplates as vr, ProjectReferencesApplyResult as vt, MonorepoStylelintConfig as w, DoctorStatus as wn, DependencyFileChange as wr, PublicApiConfig as wt, MonorepoEslintConfig as x, InstallSecuritySetting as xn, DependenciesCommandConfig as xr, ProjectReferencesDiagnostic as xt, DefineVitestProjectConfigOptions as y, InstallSecurityPresetPlan as yn, loadAgenticTasks as yr, ProjectReferencesCheck as yt, WorkspaceRemovalEntry as z, CreateNewProjectOptions as zn, WorkspaceBoundaryRule as zt };