@theholocron/cli 5.0.0-alpha.244 → 5.0.0-alpha.246

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.
@@ -0,0 +1,634 @@
1
+ import { Ht as TeamEntry, Tt as PagesConfig, h as CapabilityKey } from "./index-DvQb3PcL.mjs";
2
+ import { LogLevel } from "@theholocron/observability/core";
3
+ //#region src/config/config/config.type.d.ts
4
+ /** Structured-logging config. The Axiom **token** never lives here — only in
5
+ * env vars or the OS keyring — but the non-secret dataset name may. */
6
+ interface LogConfig {
7
+ /**
8
+ * Default log level. The lowest-priority level source: `--verbose` /
9
+ * `--quiet` and `HOLOCRON_LOG_LEVEL` both outrank it.
10
+ */
11
+ level?: LogLevel;
12
+ /**
13
+ * Axiom log-shipping. Set `axiom.dataset` to opt local runs into Axiom
14
+ * without exporting `HOLOCRON_AXIOM_DATASET` — the CLI then pairs it with
15
+ * the token from `HOLOCRON_AXIOM_TOKEN` / `AXIOM_TOKEN` or the OS keyring
16
+ * (`holocron auth set axiom[.<org>] <TOKEN>`). Env vars still win. In CI,
17
+ * prefer the `HOLOCRON_AXIOM_DATASET` variable.
18
+ */
19
+ axiom?: {
20
+ /** Target Axiom dataset, e.g. `"holocron-local"`. */
21
+ dataset?: string;
22
+ };
23
+ }
24
+ /**
25
+ * CLI self-telemetry config — the committed, reviewable override layer over the
26
+ * env-var + shipped-fallback activation (ADR-0007 / ADR-0008). No secret lives
27
+ * here; the Sentry DSN and PostHog key come from env vars or ship as fallbacks.
28
+ *
29
+ * Precedence: `HOLOCRON_TELEMETRY=false` (env) → `telemetry.enabled` (this) →
30
+ * default on. `enabled` never *re-enables* what the env var turned off.
31
+ */
32
+ interface TelemetryConfig {
33
+ /**
34
+ * Repo-level opt-out — the committed peer of `HOLOCRON_TELEMETRY=false`.
35
+ * `false` installs the no-op sinks for the whole run. Default on.
36
+ */
37
+ enabled?: boolean;
38
+ /**
39
+ * Usage-analytics provider. `"none"` disables PostHog usage analytics while
40
+ * leaving error reporting (Sentry) untouched. Default `"posthog"`.
41
+ */
42
+ analytics?: "posthog" | "none";
43
+ }
44
+ type ProviderOptions = Record<string, unknown>;
45
+ /**
46
+ * The shape a capability config package's default export must satisfy.
47
+ * Config packages let teams share a pre-bundled provider + options across
48
+ * repos (Level 1 of the shareable-configs story, issue #75).
49
+ *
50
+ * @example
51
+ * // @acme/holocron-vault/index.ts
52
+ * import type { CapabilityConfigPackage } from '@theholocron/cli'
53
+ * export default {
54
+ * provider: '1password',
55
+ * options: { vault: 'acme-app' },
56
+ * } satisfies CapabilityConfigPackage
57
+ */
58
+ interface CapabilityConfigPackage {
59
+ provider: string;
60
+ options?: ProviderOptions;
61
+ }
62
+ type SingleEntry = string | [provider: string, options: ProviderOptions];
63
+ type MultiEntry = Array<string | [provider: string, options: ProviderOptions]>;
64
+ type RawProviderEntry = SingleEntry | MultiEntry;
65
+ type RawProvidersConfig = Partial<Record<CapabilityKey, RawProviderEntry>>;
66
+ type RepoProtection = "balanced" | "strict" | "none";
67
+ /**
68
+ * Raw `docs` config as written by the user. `build` is optional so the
69
+ * field can be declared without committing to a build type yet; setup
70
+ * will error if `docs` is present but `build` is absent.
71
+ */
72
+ interface DocsConfig {
73
+ /**
74
+ * GitHub Pages build source.
75
+ * "workflow" → GitHub Actions (PUT { build_type: "workflow" })
76
+ * "branch" → classic gh-pages branch (PUT { build_type: "legacy", source: { branch: "gh-pages", path: "/" } })
77
+ * When absent, Pages is not managed by `holocron repo setup`.
78
+ */
79
+ build?: "workflow" | "branch";
80
+ /**
81
+ * Custom domain / CNAME (e.g. "docs.theholocron.dev").
82
+ * When set and `homepage` is not explicitly provided, setup derives
83
+ * `homepage` as `https://{domain}/` for package.json and the repo website field.
84
+ */
85
+ domain?: string;
86
+ /** Enforce HTTPS. Only effective once the custom domain is DNS-verified. */
87
+ https?: boolean;
88
+ }
89
+ interface RepoProperties {
90
+ lifecycle?: "active" | "experimental" | "deprecated";
91
+ open_source?: boolean;
92
+ runtime_environment?: "node" | "browser" | "universal" | "none";
93
+ uses_external_packages?: boolean;
94
+ }
95
+ /**
96
+ * GitHub Actions variables, declared so a workflow that reads `vars.NAME` finds it. Values are plain text, so
97
+ * never put a secret here; secrets go through the `secrets` capability.
98
+ */
99
+ interface RepoVariables {
100
+ /** Repository-level variables. */
101
+ repo?: Record<string, string>;
102
+ /**
103
+ * Organization-level variables. A bare string is visible to every repository; `visibility: "private"` limits it
104
+ * to private ones. Declare these in one repo only (the one that owns the org's configuration).
105
+ */
106
+ org?: Record<string, string | {
107
+ value: string;
108
+ visibility?: "all" | "private";
109
+ }>;
110
+ /** Delete variables that exist but are not declared here. Off by default: they are left alone. */
111
+ prune?: boolean;
112
+ }
113
+ interface RepoConfig {
114
+ /** "owner/name" — the GitHub repository coordinate. Derived from the git remote when absent. */
115
+ name?: string;
116
+ /**
117
+ * GitHub's repo-level default branch (`HEAD`) — what a fresh clone checks
118
+ * out, what `gh pr create`/the compare UI target by default, and what
119
+ * Sentinel's `validateConfig()` reads (D6: the App only ever reads config
120
+ * from the repo's default branch, never a PR ref, as a security boundary
121
+ * — never widen that to read PR branches instead of fixing this field).
122
+ * Synced by `holocron repo setup`. Omit to leave GitHub's current setting
123
+ * untouched — most repos never need this. Exists for a repo using a
124
+ * `main`/`alpha` prerelease-channel split (CLAUDE.md's Releases section)
125
+ * where active development happens on a non-`main` branch: set this to
126
+ * that branch so Sentinel validates against what's actually being
127
+ * developed, then change it back once that branch merges to `main` for a
128
+ * stable cut and stops being the active branch.
129
+ */
130
+ defaultBranch?: string;
131
+ /**
132
+ * Branch protection preset applied by `holocron repo setup`. When omitted,
133
+ * no protection is applied and no `branch_protection_level` property is set.
134
+ * Required-status-check contexts for `"strict"` are derived from the task
135
+ * manifest — `{ required: true }` tasks + top-level `extraRequiredChecks`
136
+ * (see `astromech.requiredChecks()`).
137
+ */
138
+ protection?: RepoProtection;
139
+ /**
140
+ * GitHub teams granted repository access. Synced by `holocron repo setup`, which
141
+ * also writes `.github/CODEOWNERS` for teams with write-or-higher permission.
142
+ * String shorthand defaults to `push` (Write).
143
+ */
144
+ teams?: TeamEntry[];
145
+ /** GitHub topics set on the repository. */
146
+ topics?: string[];
147
+ /** GitHub custom properties synced to the org dashboard. */
148
+ properties?: RepoProperties;
149
+ /** GitHub Actions variables reconciled by `holocron repo setup`. */
150
+ variables?: RepoVariables;
151
+ }
152
+ interface AppConfig {
153
+ name: string;
154
+ path: string;
155
+ kind?: string;
156
+ }
157
+ interface DoctorConfig {
158
+ checks?: string[];
159
+ }
160
+ interface EnvConfig {
161
+ /**
162
+ * Namespace prefixes used by this project's env vars.
163
+ * Listed from least- to most-specific (cascade model — last wins).
164
+ * Tooling reads this to generate `.env.example`, validate required
165
+ * vars, and produce documentation.
166
+ *
167
+ * @example
168
+ * // Project-only prefix
169
+ * namespaces: ["CLI_TEMPLATE"]
170
+ *
171
+ * // Org-wide defaults + project-specific overrides
172
+ * namespaces: ["HOLOCRON", "MY_CLI"]
173
+ */
174
+ namespaces?: string[];
175
+ }
176
+ /**
177
+ * A single Chromatic project entry in a `verification.visualRegression`
178
+ * task's `chromatic-projects` config.
179
+ * Each entry produces one matrix job in CI, publishing to a separate Chromatic project.
180
+ *
181
+ * The `tokenName` maps to a repository secret named `CHROMATIC_PROJECT_TOKEN_<TOKENNAME>`.
182
+ * Additional fields correspond to chromaui/action inputs and are passed through directly.
183
+ *
184
+ * @see https://www.chromatic.com/docs/monorepos/
185
+ */
186
+ interface ChromaticProjectConfig {
187
+ /**
188
+ * Secret suffix. The CI job reads `CHROMATIC_PROJECT_TOKEN_<tokenName>`.
189
+ * Must be uppercase (e.g. `"WEB"`, `"UI"`).
190
+ */
191
+ tokenName: string;
192
+ /**
193
+ * Path to run the Chromatic build from, relative to the repo root.
194
+ * Typically the package directory (e.g. `"apps/web"`, `"packages/ui"`).
195
+ */
196
+ workingDir: string;
197
+ /**
198
+ * Script name to build Storybook. Defaults to `"build:storybook"`.
199
+ * Must accept `--output-dir` pass-through (use `turbo run … --` at root).
200
+ */
201
+ buildScript?: string;
202
+ /**
203
+ * Path to the Storybook folder relative to `workingDir`, for TurboSnap.
204
+ * Tells Chromatic where to find `.storybook/` when the Storybook config
205
+ * is in a subdirectory. Corresponds to `--storybook-base-dir`.
206
+ */
207
+ storybookBaseDir?: string;
208
+ /**
209
+ * Glob patterns of files/dirs that should NOT trigger a TurboSnap bailout
210
+ * when changed. Useful for ignoring non-UI changes in a monorepo
211
+ * (e.g. `"./packages/!(ui)/**"` to focus TurboSnap on the UI package).
212
+ * Corresponds to `--untraced`. Accepts a single glob string or array.
213
+ */
214
+ untraced?: string | string[];
215
+ /**
216
+ * Glob patterns matching story files to snapshot. When set, only matching
217
+ * stories are captured. Corresponds to `--only-story-files`.
218
+ * Cannot be combined with `onlyStoryNames`.
219
+ */
220
+ onlyStoryFiles?: string;
221
+ /**
222
+ * Exit with code 0 even when visual changes are detected.
223
+ * Useful during initial setup before baselines are approved.
224
+ * Corresponds to `--exit-zero-on-changes`.
225
+ */
226
+ exitZeroOnChanges?: boolean;
227
+ }
228
+ /**
229
+ * A single Storybook app in a deploy workflow config.
230
+ * `name` becomes the sandbox sub-path (`_site/sandbox/<name>/`).
231
+ * `path` is the working directory relative to the repo root; defaults to `"."` (repo root) when omitted.
232
+ */
233
+ interface StorybookDeployProject {
234
+ name?: string;
235
+ path?: string;
236
+ }
237
+ /**
238
+ * Typed `with:` inputs for reusable workflows.
239
+ *
240
+ * `chromatic-projects` (on the `verification.visualRegression` task) takes a
241
+ * `ChromaticProjectConfig[]` directly; each entry's `untraced` glob list may
242
+ * be authored as an array and is newline-joined for you.
243
+ *
244
+ * `docs` / `storybook` are high-level deploy shorthand that `holocron repo setup`
245
+ * translates to `type` / `storybook-projects` before writing the thin caller.
246
+ * They also drive automatic `paths:` derivation so you never need to write
247
+ * `paths:` manually for deploy entries.
248
+ */
249
+ type WorkflowWithConfig = Record<string, unknown> & {
250
+ "chromatic-projects"?: ChromaticProjectConfig[];
251
+ /**
252
+ * Docs deployment shorthand. `true` uses the org-standard `docs/` directory;
253
+ * `{ path: "custom" }` uses a custom directory. Both derive a `paths:` entry automatically.
254
+ */
255
+ docs?: true | {
256
+ path: string;
257
+ };
258
+ /** Storybook apps to deploy alongside docs. Each entry's `path` is appended to `paths:`. */
259
+ storybook?: StorybookDeployProject[];
260
+ };
261
+ /**
262
+ * A `tasks` manifest entry in object form. A bare string entry is shorthand
263
+ * for `{ name, ci: true, local: true }`.
264
+ */
265
+ interface TaskEntryConfig {
266
+ name: string;
267
+ with?: WorkflowWithConfig;
268
+ paths?: string[];
269
+ linters?: string[];
270
+ /** Emit a `.github/workflows/<name>.yml` thin caller + include in `holocron run ci`. Default `true`. */
271
+ ci?: boolean;
272
+ /** Write a `package.json` script + let `holocron run <name>` resolve the task. Default `true`. */
273
+ local?: boolean;
274
+ /** The task's CI check context is a required status check + part of `holocron run ci`'s default run. */
275
+ required?: boolean;
276
+ /**
277
+ * Per-repo additions to this task's generated `turbo.json` entry —
278
+ * a separate channel from `with:` (that's the reusable *workflow's*
279
+ * inputs; this is local turbo cache config, unrelated). No-op for a
280
+ * task with no turbo fan-out config in the registry. Mirrors
281
+ * astromech's own `TaskEntry["turbo"]` — kept in sync by hand, since
282
+ * this package doesn't depend on astromech directly.
283
+ */
284
+ turbo?: {
285
+ /** Extra env vars turbo hashes into this task's cache key, appended to the registry default. */
286
+ passThroughEnv?: string[];
287
+ /**
288
+ * Extra input globs appended to the registry default's `inputs`
289
+ * (holocron#845) — for a package whose layout the registry
290
+ * default doesn't cover (e.g. a flat-layout package with no
291
+ * `src/` directory at all).
292
+ */
293
+ inputs?: string[];
294
+ };
295
+ }
296
+ interface HolocronConfig {
297
+ /** Project name. Derived from package.json when absent. */
298
+ name?: string;
299
+ description?: string;
300
+ /** Project homepage URL. Synced to package.json#homepage and the GitHub repo's website field by `holocron repo sync`. */
301
+ homepage?: string;
302
+ /**
303
+ * Active org name for namespaced keyring lookup. When set, token resolution
304
+ * tries `<service>.<org>` before the unnamespaced `<service>` fallback, so
305
+ * a single machine can hold credentials for multiple GitHub orgs without
306
+ * collision. Overridden by `--org` CLI flag or `HOLOCRON_ORG` env var.
307
+ */
308
+ org?: string;
309
+ /**
310
+ * Org canonical domain (e.g. `"theholocron.dev"`). Subdomains are derived
311
+ * from this — `preview: true` on a deploy workflow resolves the preview base
312
+ * domain as `preview.<domain>`, giving URLs like `<repo>-pr-<n>.<domain>`.
313
+ */
314
+ domain?: string;
315
+ /**
316
+ * Repository identity and metadata. When set, `PluginLoader` injects
317
+ * `repo.name` into every plugin's `RuntimeContext.repo` so plugins that
318
+ * need a repo (github, etc.) don't require `--repo` on every invocation.
319
+ * `--repo` on the command line still overrides.
320
+ */
321
+ repo?: RepoConfig;
322
+ /**
323
+ * The task manifest — what this repo runs. Each entry is a task name
324
+ * (backed by a reusable workflow in `theholocron/.github`), or the object
325
+ * form to pass `with:` inputs. `@theholocron/astromech` reads this as the
326
+ * single source for `holocron run` / `holocron run ci` / the generated CI
327
+ * workflows / `package.json` scripts.
328
+ *
329
+ * Supported values (intent-facing vocabulary — epic #672, D3):
330
+ * "verification.unitTests" | "verification.visualRegression" | "verification.typeSafety" | "verification.performance" |
331
+ * "sourceQuality.staticAnalysis" | "sourceQuality.formatting" |
332
+ * "sourceQuality.structuredDataValidation" | "sourceQuality.deadCodeAnalysis" |
333
+ * "security.secretDetection" | "security.codeScanning" |
334
+ * "delivery.build" | "delivery.publish" | "delivery.deploy" | "delivery.bundleSize" |
335
+ * "platform.repoSync" | "platform.notifyCheck" | "platform.commitStandards" | "platform.repoValidation" |
336
+ * "knowledge.wiki" | "knowledge.docs" | "knowledge.components" |
337
+ * "review" | "tag" | "stale" | "greetings" | "dependencies" | "bookkeeping"
338
+ *
339
+ * `holocron repo setup` writes `.github/workflows/<name>.yml` for each entry,
340
+ * calling the corresponding reusable workflow in `theholocron/.github`.
341
+ * Files are overwritten on each run — they are generated artifacts.
342
+ *
343
+ * ### delivery.deploy / knowledge.docs / knowledge.components
344
+ * `delivery.deploy` uses `docs` and/or `storybook` in `with:` — setup
345
+ * derives `paths:` automatically. `docs: true` uses the org-standard
346
+ * `docs/` directory; `docs: { path: "custom" }` overrides it.
347
+ * `knowledge.docs` / `knowledge.components` are the same underlying
348
+ * mechanism, each dedicated to exactly one type — they imply the
349
+ * corresponding shorthand, so a repo using them never has to spell out
350
+ * `docs: true` / `storybook: […]` itself.
351
+ *
352
+ * ```ts
353
+ * // Docs only (standard layout)
354
+ * { name: "delivery.deploy", with: { docs: true } }
355
+ * // …or equivalently, the dedicated task:
356
+ * "knowledge.docs"
357
+ *
358
+ * // Docs + monorepo storybooks
359
+ * {
360
+ * name: "delivery.deploy",
361
+ * with: {
362
+ * docs: true,
363
+ * storybook: [
364
+ * { name: "web", path: "apps/web" },
365
+ * { name: "ui", path: "packages/ui" },
366
+ * ],
367
+ * },
368
+ * }
369
+ *
370
+ * // Non-standard docs location
371
+ * { name: "delivery.deploy", with: { docs: { path: "packages/site" } } }
372
+ * ```
373
+ *
374
+ * ### verification.visualRegression
375
+ * Its own task, not a `verification.unitTests` sub-job (holocron#394/#1062)
376
+ * — GitHub evaluates a job's `if:` before expanding its `strategy.matrix`,
377
+ * so no `chromatic-projects` default can make a *disabled* Chromatic job
378
+ * disappear from PR checks; only not generating the job at all does. Omit
379
+ * this task entirely for a repo that doesn't use Chromatic — no workflow,
380
+ * no job, no check, not even a skipped one.
381
+ *
382
+ * For a single-project repo, use a `CHROMATIC_PROJECT_TOKEN` repository
383
+ * secret with `tokenName: "default"`:
384
+ * ```ts
385
+ * {
386
+ * name: "verification.visualRegression",
387
+ * with: { "chromatic-projects": [{ tokenName: "default", workingDir: "." }] },
388
+ * }
389
+ * ```
390
+ *
391
+ * For monorepos with multiple Storybooks, list one entry per project:
392
+ * ```ts
393
+ * {
394
+ * name: "verification.visualRegression",
395
+ * with: {
396
+ * "chromatic-projects": [
397
+ * { tokenName: "WEB", workingDir: "apps/web" },
398
+ * { tokenName: "UI", workingDir: "packages/ui" },
399
+ * ],
400
+ * },
401
+ * }
402
+ * ```
403
+ * Each `tokenName` maps to a repository secret named
404
+ * `CHROMATIC_PROJECT_TOKEN_<TOKENNAME>`.
405
+ *
406
+ * @example
407
+ * ["sourceQuality.staticAnalysis", { "name": "delivery.publish", "with": { "run-build": false } }]
408
+ * { "name": "delivery.deploy", "with": { "docs": true } }
409
+ */
410
+ tasks?: Array<string | TaskEntryConfig>;
411
+ /**
412
+ * Opt out of `holocron repo sync`'s `package.json` script writes. Default `true`.
413
+ */
414
+ syncScripts?: boolean;
415
+ /**
416
+ * The command the synced `"holocron"` `package.json` script runs. Default
417
+ * `"holocron"` (the installed bin). This repo overrides it to run its own
418
+ * build (`"node cli/cli/dist/cli.mjs"`).
419
+ */
420
+ holocronScript?: string;
421
+ /**
422
+ * Required status-check contexts not backed by a `required` task (codecov
423
+ * gates, the bundle-build check, …). `holocron repo setup` appends these to the
424
+ * task-derived list from `astromech.requiredChecks()`.
425
+ */
426
+ extraRequiredChecks?: string[];
427
+ /**
428
+ * Git hooks `holocron repo setup` installs. `true` / `{ prePush: true }` writes
429
+ * `.husky/pre-push` (runs `holocron run ci` before every push); `false` /
430
+ * `{ prePush: false }` opts out. Omitted → on for `protection: "strict"`,
431
+ * off otherwise. `--hooks` / `--no-hooks` on `holocron repo setup` override.
432
+ */
433
+ hooks?: boolean | {
434
+ prePush?: boolean;
435
+ };
436
+ providers: RawProvidersConfig;
437
+ apps?: AppConfig[];
438
+ doctor?: DoctorConfig;
439
+ /**
440
+ * Agent runtime that determines where skills are installed by `holocron repo setup`.
441
+ * Skills are installed to `.agents/skills/<name>/` (canonical) with a
442
+ * relative symlink at the agent-specific path:
443
+ * - `"claude"` → `.claude/skills/<name>` → `../../.agents/skills/<name>`
444
+ * - `"codex"` | `"gemini"` → logged as unsupported; skipped gracefully.
445
+ */
446
+ agent?: "claude" | "codex" | "gemini";
447
+ /**
448
+ * Skill names from `@theholocron/skills` to install during `holocron repo setup`.
449
+ * Installed paths are gitignored and managed by setup — do not commit them.
450
+ *
451
+ * @example
452
+ * ["git-safety", "pr-workflow", "commit-standards"]
453
+ */
454
+ skills?: string[];
455
+ /**
456
+ * GitHub Pages configuration. When present, `holocron repo setup` calls the
457
+ * Pages API using `HOLOCRON_DEPLOY_TOKEN` (requires `pages:write` + `repo` scope).
458
+ * When absent, Pages is left as-is.
459
+ *
460
+ * @example
461
+ * { build: "workflow", domain: "docs.theholocron.dev", https: true }
462
+ */
463
+ docs?: DocsConfig;
464
+ /**
465
+ * Environment variable namespace configuration.
466
+ * Declares the prefix(es) this project uses for its env vars so that
467
+ * tooling can generate `.env.example`, validate required vars, and
468
+ * produce accurate documentation without hard-coding prefix strings.
469
+ *
470
+ * @example
471
+ * { namespaces: ["HOLOCRON", "MY_CLI"] }
472
+ */
473
+ env?: EnvConfig;
474
+ /**
475
+ * Structured-logging config. Only the level belongs here — Axiom
476
+ * credentials come from env vars, never a committed file.
477
+ *
478
+ * @example
479
+ * { level: "debug" }
480
+ */
481
+ log?: LogConfig;
482
+ /**
483
+ * CLI self-telemetry override layer. Env var (`HOLOCRON_TELEMETRY=false`)
484
+ * still wins; this is the committed way to opt a repo out or drop usage
485
+ * analytics while keeping error reporting.
486
+ *
487
+ * @example
488
+ * { enabled: false }
489
+ * { analytics: "none" }
490
+ */
491
+ telemetry?: TelemetryConfig;
492
+ /**
493
+ * ESLint bundle option overrides that Sentinel's centralized static-
494
+ * analysis check (holocron#849) can't otherwise see. Bucket 1 checks
495
+ * never read a PR's own committed files for config — this is the
496
+ * declared source of truth Sentinel reads instead, so its check stays
497
+ * in sync with what each package's own `eslint.config.ts` already
498
+ * enforces locally and in CI.
499
+ */
500
+ eslint?: EslintConfig;
501
+ }
502
+ /**
503
+ * Repo-root-relative directories treated as browser-targeted for eslint's
504
+ * node-builtins compatibility checks — mirrors
505
+ * `@theholocron/eslint-config`'s `library({ browserPackages })` option.
506
+ * Only needed for a package whose own `eslint.config.ts` already declares
507
+ * `browserPackages` (a deliberate outlier, not the norm — see that
508
+ * package's own config file for why).
509
+ *
510
+ * @example
511
+ * { browserPackages: ["packages/github-client/src/app-auth"] }
512
+ */
513
+ interface EslintConfig {
514
+ browserPackages?: string[];
515
+ }
516
+ interface ResolvedTuple {
517
+ provider: string;
518
+ /** Resolved package name (`@theholocron/holocron-plugin-<provider>` for short refs). */
519
+ packageName: string;
520
+ options: ProviderOptions;
521
+ }
522
+ type ResolvedProviderEntry = {
523
+ cardinality: "single";
524
+ tuple: ResolvedTuple;
525
+ } | {
526
+ cardinality: "many";
527
+ tuples: ResolvedTuple[];
528
+ };
529
+ type ResolvedProvidersConfig = Partial<Record<CapabilityKey, ResolvedProviderEntry>>;
530
+ interface ResolvedHolocronConfig {
531
+ name: string;
532
+ description?: string;
533
+ homepage?: string;
534
+ org?: string;
535
+ domain?: string;
536
+ repo?: RepoConfig;
537
+ tasks?: Array<string | TaskEntryConfig>;
538
+ syncScripts?: boolean;
539
+ holocronScript?: string;
540
+ extraRequiredChecks?: string[];
541
+ hooks?: boolean | {
542
+ prePush?: boolean;
543
+ };
544
+ providers: ResolvedProvidersConfig;
545
+ apps: AppConfig[];
546
+ doctor: DoctorConfig;
547
+ agent?: "claude" | "codex" | "gemini";
548
+ skills?: string[];
549
+ /** Resolved Pages config. `build` is guaranteed present when this field exists. */
550
+ docs?: PagesConfig;
551
+ env?: EnvConfig;
552
+ log?: LogConfig;
553
+ telemetry?: TelemetryConfig;
554
+ eslint?: EslintConfig;
555
+ }
556
+ //#endregion
557
+ //#region src/config/config/config.d.ts
558
+ declare class ConfigError extends Error {
559
+ name: string;
560
+ }
561
+ /**
562
+ * Resolve `"github"` → `"@theholocron/holocron-plugin-github"`.
563
+ * Fully-qualified names (scoped or not) are honored verbatim, which
564
+ * is how third-party plugins published outside the org work.
565
+ */
566
+ declare function resolvePluginPackage(provider: string): string;
567
+ declare function resolveEntry(key: CapabilityKey, raw: RawProviderEntry): ResolvedProviderEntry;
568
+ declare function resolveConfig(raw: HolocronConfig): ResolvedHolocronConfig;
569
+ //#endregion
570
+ //#region src/config/compose/compose.type.d.ts
571
+ type TaskEntry = NonNullable<HolocronConfig["tasks"]>[number];
572
+ /** A single composable capability fragment. */
573
+ interface Capability {
574
+ /** Unique identifier — used for deduplication and dependency resolution. */
575
+ id: string;
576
+ /** Other capability IDs that must be present in the same compose() call. */
577
+ requires?: string[];
578
+ /** Task entries contributed by this capability. Merged by name; last writer wins. */
579
+ tasks?: TaskEntry[];
580
+ /** Provider config. Shallow-merged at the top level; later capabilities override per-key. */
581
+ providers?: RawProvidersConfig;
582
+ /**
583
+ * Required status-check contexts **not** backed by a `required` task
584
+ * (codecov gates, `Storybook Publish`, …). Unioned across all capabilities
585
+ * onto the top-level `extraRequiredChecks`. Task-backed checks come from
586
+ * `{ required: true }` task entries via `astromech.requiredChecks()`.
587
+ */
588
+ extraRequiredChecks?: string[];
589
+ /** Repo config fragment. Scalar fields: last writer wins. properties/topics/teams: merged. */
590
+ repo?: Partial<Omit<RepoConfig, "name">>;
591
+ /** Org name. Last writer wins. */
592
+ org?: string;
593
+ /** Org canonical domain. Last writer wins. */
594
+ domain?: string;
595
+ /** Docs site config. Last writer wins. */
596
+ docs?: DocsConfig;
597
+ }
598
+ /** The merged result of a compose() call. Spreads into defineConfig(). */
599
+ interface ComposedPreset {
600
+ tasks: TaskEntry[];
601
+ providers: RawProvidersConfig;
602
+ repo: Partial<Omit<RepoConfig, "name">>;
603
+ /** Non-task required-check contexts, unioned across capabilities. */
604
+ extraRequiredChecks: string[];
605
+ org?: string;
606
+ domain?: string;
607
+ docs?: DocsConfig;
608
+ }
609
+ //#endregion
610
+ //#region src/config/compose/compose.d.ts
611
+ /**
612
+ * Merge any number of capability fragments into a single preset object that
613
+ * spreads directly into `defineConfig()`.
614
+ *
615
+ * - Accepts individual capabilities or nested arrays (for bundle presets).
616
+ * - Deduplicates by `id` — when the same ID appears more than once, the last
617
+ * occurrence wins. This lets callers override bundle defaults by listing an
618
+ * explicit capability after the bundle.
619
+ * - Validates all `requires` at call time and throws `ConfigError` if any are
620
+ * unmet, listing every missing dependency in a single message.
621
+ *
622
+ * @example
623
+ * // docs-only site — no typecheck
624
+ * const preset = compose(node(), docs());
625
+ *
626
+ * // library with docs
627
+ * const preset = compose(node(), typecheck(), docs());
628
+ *
629
+ * // nextjs() is a bundle that returns Capability[]
630
+ * const preset = compose(node(), nextjs());
631
+ */
632
+ declare function compose(...args: (Capability | Capability[])[]): ComposedPreset;
633
+ //#endregion
634
+ export { SingleEntry as A, RepoProperties as C, ResolvedProviderEntry as D, ResolvedHolocronConfig as E, TaskEntryConfig as M, TelemetryConfig as N, ResolvedProvidersConfig as O, WorkflowWithConfig as P, RepoConfig as S, RepoVariables as T, LogConfig as _, ConfigError as a, RawProviderEntry as b, resolvePluginPackage as c, ChromaticProjectConfig as d, DocsConfig as f, HolocronConfig as g, EslintConfig as h, TaskEntry as i, StorybookDeployProject as j, ResolvedTuple as k, AppConfig as l, EnvConfig as m, Capability as n, resolveConfig as o, DoctorConfig as p, ComposedPreset as r, resolveEntry as s, compose as t, CapabilityConfigPackage as u, MultiEntry as v, RepoProtection as w, RawProvidersConfig as x, ProviderOptions as y };