@theholocron/cli 5.0.0-alpha.20 → 5.0.0-alpha.201

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.
package/dist/index.d.mts CHANGED
@@ -1,19 +1,22 @@
1
- import { Analytics, Auth, AuthDescription, AuthEvent, AuthEventType, AuthIdentity, AuthUser, CARDINALITY, CapabilityImpls, CapabilityKey, Cardinality, CardinalityFor, Ci, CiRun, CiRunFilter, CiRunStatus, ConnectionStringOptions, CreateAuthUserInput, DeployScriptConfig, DeployScriptResult, Deployment, DeploymentProject, DeploymentProjectSettings, DeploymentRecord, DeploymentTarget, DeploymentTrigger, Dns, DnsRecord, DnsRecordType, EnsureResult, Environment, EnvironmentReviewer, Environments, Errors, Issue, IssueSearchFilter, Issues, LabelDef, LifecycleResult, LifecycleSlot, Logs, NormalizedAuthUser, Notifications, PagesConfig, ParseWebhookInput, ProviderApiError, ProviderIdentity, PullRequest, REQUIRED_CAPABILITIES, RepoRef, RepoSettings, ResolvedCapability, Ruleset, SecretScope, Secrets, Source, StatusCategory, Storage, StorageBranch, TeamEntry, TeamPermission, Tooling, ToolingDoctorReport, TrackerDoctorReport, TrackerUser, Vault, WebhookDashboardInfo, WebhookVerificationError, Wiki, WikiDnsRecord, WikiProvisionOpts, WikiProxyConfig, Workers, isMulti } from "./plugin/capabilities.mjs";
1
+ import { Analytics, Auth, AuthDescription, AuthEvent, AuthEventType, AuthIdentity, AuthUser, CARDINALITY, CapabilityImpls, CapabilityKey, Cardinality, CardinalityFor, Ci, CiRun, CiRunFilter, CiRunStatus, ConnectionStringOptions, CreateAuthUserInput, DeployFunctionConfig, DeployFunctionResult, DeployScriptConfig, DeployScriptResult, Deployment, DeploymentProject, DeploymentProjectSettings, DeploymentRecord, DeploymentTarget, DeploymentTrigger, Dns, DnsRecord, DnsRecordRequest, DnsRecordType, EnsureResult, EnsureWebhookResult, EnsuredResource, Environment, EnvironmentReviewer, Environments, Errors, Issue, IssueSearchFilter, Issues, LabelDef, LifecycleResult, LifecycleSlot, Logs, Monitoring, MonitoringAssertion, MonitoringAssertionComparison, MonitoringAssertionSource, MonitoringCheck, MonitoringCheckInput, MonitoringHttpMethod, NormalizedAuthUser, Notifications, NotificationsAccess, NotificationsApplicationLayout, NotificationsChannelLayout, NotificationsDelivery, NotificationsEveryoneLayout, NotificationsLayout, NotificationsLinksLayout, NotificationsMember, NotificationsOnboardingLayout, NotificationsServerLayout, NotificationsSignIn, NotificationsSignedIn, NotificationsWelcomeLayout, PagesConfig, ParseWebhookInput, ProviderApiError, ProviderIdentity, PullRequest, REQUIRED_CAPABILITIES, RepoRef, RepoSettings, ResolvedCapability, Ruleset, SecretScope, Secrets, ServerInspection, Source, SourceFile, SourceTeamMember, StatusCategory, Storage, StorageBranch, TeamEntry, TeamPermission, Tooling, ToolingDoctorReport, TrackerDoctorReport, TrackerUser, Vault, WebhookDashboardInfo, WebhookVerificationError, Wiki, WikiProvisionOpts, WikiProxyConfig, Workers, isMulti } from "./plugin/capabilities.mjs";
2
2
  import { AuthError, RequestOptions, ResolveTokenConfig as ResolveTokenConfig$1, ResolveTokenInput, RestClient, RestClientConfig, createRestClient } from "@theholocron/http-client";
3
+ import { PackageJson } from "@theholocron/pkg-utils";
3
4
  import { ConfigFileError } from "@theholocron/datapad";
4
- import { WorkspacePackage } from "@theholocron/astromech";
5
5
  import { LogLevel } from "@theholocron/observability/core";
6
- //#region src/auth/auth-resolver.d.ts
6
+ import { WorkspacePackage } from "@theholocron/astromech";
7
+ //#region src/auth/auth-resolver/auth-resolver.type.d.ts
7
8
  type ResolveTokenConfig = Omit<ResolveTokenConfig$1, "getKeyringToken">;
8
- /** Wraps `createResolveToken` from `@theholocron/http` and injects the
9
- * system keyring so plugins stay at a one-liner call site. */
10
- declare function createResolveToken(config: ResolveTokenConfig): (input?: ResolveTokenInput) => string;
11
9
  interface FeatureResolverConfig {
12
10
  /** Env var name for this feature, e.g. `"HOLOCRON_ISSUES_TOKEN"`. */
13
11
  envName: string;
14
12
  /** Keyring account key, e.g. `"github.issues"`. */
15
13
  keyringKey: string;
16
14
  }
15
+ //#endregion
16
+ //#region src/auth/auth-resolver/auth-resolver.d.ts
17
+ /** Wraps `createResolveToken` from `@theholocron/http` and injects the
18
+ * system keyring so plugins stay at a one-liner call site. */
19
+ declare function createResolveToken(config: ResolveTokenConfig): (input?: ResolveTokenInput) => string;
17
20
  /**
18
21
  * Build a strict, single-feature token resolver.
19
22
  *
@@ -23,7 +26,7 @@ interface FeatureResolverConfig {
23
26
  */
24
27
  declare function createFeatureResolver(config: FeatureResolverConfig): (input?: ResolveTokenInput) => string;
25
28
  //#endregion
26
- //#region src/auth/keyring.d.ts
29
+ //#region src/auth/keyring/keyring.d.ts
27
30
  /**
28
31
  * Keyring-backed bootstrap credential store.
29
32
  *
@@ -67,7 +70,20 @@ declare function deleteToken(provider: string): boolean;
67
70
  */
68
71
  declare function listStoredProviders(): string[];
69
72
  //#endregion
70
- //#region src/config/config.d.ts
73
+ //#region src/commands/auth/auth.type.d.ts
74
+ interface VerifyTokenSuccess {
75
+ ok: true;
76
+ /** "workplace: acme" / "user: cnewton@x" — surfaced in success output. */
77
+ subject: string;
78
+ }
79
+ interface VerifyTokenFailure {
80
+ ok: false;
81
+ /** Reason the token was rejected. Surfaces to the operator. */
82
+ message: string;
83
+ }
84
+ type VerifyTokenResult = VerifyTokenSuccess | VerifyTokenFailure;
85
+ //#endregion
86
+ //#region src/config/config/config.type.d.ts
71
87
  /** Structured-logging config. The Axiom **token** never lives here — only in
72
88
  * env vars or the OS keyring — but the non-secret dataset name may. */
73
89
  interface LogConfig {
@@ -141,7 +157,7 @@ interface DocsConfig {
141
157
  * GitHub Pages build source.
142
158
  * "workflow" → GitHub Actions (PUT { build_type: "workflow" })
143
159
  * "branch" → classic gh-pages branch (PUT { build_type: "legacy", source: { branch: "gh-pages", path: "/" } })
144
- * When absent, Pages is not managed by `holocron setup`.
160
+ * When absent, Pages is not managed by `holocron repo setup`.
145
161
  */
146
162
  build?: "workflow" | "branch";
147
163
  /**
@@ -163,7 +179,22 @@ interface RepoConfig {
163
179
  /** "owner/name" — the GitHub repository coordinate. Derived from the git remote when absent. */
164
180
  name?: string;
165
181
  /**
166
- * Branch protection preset applied by `holocron setup`. When omitted,
182
+ * GitHub's repo-level default branch (`HEAD`) — what a fresh clone checks
183
+ * out, what `gh pr create`/the compare UI target by default, and what
184
+ * Sentinel's `validateConfig()` reads (D6: the App only ever reads config
185
+ * from the repo's default branch, never a PR ref, as a security boundary
186
+ * — never widen that to read PR branches instead of fixing this field).
187
+ * Synced by `holocron repo setup`. Omit to leave GitHub's current setting
188
+ * untouched — most repos never need this. Exists for a repo using a
189
+ * `main`/`alpha` prerelease-channel split (CLAUDE.md's Releases section)
190
+ * where active development happens on a non-`main` branch: set this to
191
+ * that branch so Sentinel validates against what's actually being
192
+ * developed, then change it back once that branch merges to `main` for a
193
+ * stable cut and stops being the active branch.
194
+ */
195
+ defaultBranch?: string;
196
+ /**
197
+ * Branch protection preset applied by `holocron repo setup`. When omitted,
167
198
  * no protection is applied and no `branch_protection_level` property is set.
168
199
  * Required-status-check contexts for `"strict"` are derived from the task
169
200
  * manifest — `{ required: true }` tasks + top-level `extraRequiredChecks`
@@ -171,7 +202,7 @@ interface RepoConfig {
171
202
  */
172
203
  protection?: RepoProtection;
173
204
  /**
174
- * GitHub teams granted repository access. Synced by `holocron setup`, which
205
+ * GitHub teams granted repository access. Synced by `holocron repo setup`, which
175
206
  * also writes `.github/CODEOWNERS` for teams with write-or-higher permission.
176
207
  * String shorthand defaults to `push` (Write).
177
208
  */
@@ -206,7 +237,8 @@ interface EnvConfig {
206
237
  namespaces?: string[];
207
238
  }
208
239
  /**
209
- * A single Chromatic project entry in a monorepo `run-chromatic` config.
240
+ * A single Chromatic project entry in a `verification.visualRegression`
241
+ * task's `chromatic-projects` config.
210
242
  * Each entry produces one matrix job in CI, publishing to a separate Chromatic project.
211
243
  *
212
244
  * The `tokenName` maps to a repository secret named `CHROMATIC_PROJECT_TOKEN_<TOKENNAME>`.
@@ -268,18 +300,17 @@ interface StorybookDeployProject {
268
300
  /**
269
301
  * Typed `with:` inputs for reusable workflows.
270
302
  *
271
- * `run-chromatic` accepts either a plain boolean (single-project) or a
272
- * `ChromaticProjectConfig[]` object (multi-project monorepo).
303
+ * `chromatic-projects` (on the `verification.visualRegression` task) takes a
304
+ * `ChromaticProjectConfig[]` directly; each entry's `untraced` glob list may
305
+ * be authored as an array and is newline-joined for you.
273
306
  *
274
- * `docs` / `storybook` are high-level deploy shorthand that `holocron setup`
307
+ * `docs` / `storybook` are high-level deploy shorthand that `holocron repo setup`
275
308
  * translates to `type` / `storybook-projects` before writing the thin caller.
276
309
  * They also drive automatic `paths:` derivation so you never need to write
277
310
  * `paths:` manually for deploy entries.
278
311
  */
279
312
  type WorkflowWithConfig = Record<string, unknown> & {
280
- "run-chromatic"?: boolean | {
281
- projects: ChromaticProjectConfig[];
282
- };
313
+ "chromatic-projects"?: ChromaticProjectConfig[];
283
314
  /**
284
315
  * Docs deployment shorthand. `true` uses the org-standard `docs/` directory;
285
316
  * `{ path: "custom" }` uses a custom directory. Both derive a `paths:` entry automatically.
@@ -299,18 +330,37 @@ interface TaskEntryConfig {
299
330
  with?: WorkflowWithConfig;
300
331
  paths?: string[];
301
332
  linters?: string[];
302
- /** Emit a `.github/workflows/<name>.yml` thin caller + include in `holocron ci`. Default `true`. */
333
+ /** Emit a `.github/workflows/<name>.yml` thin caller + include in `holocron run ci`. Default `true`. */
303
334
  ci?: boolean;
304
335
  /** Write a `package.json` script + let `holocron run <name>` resolve the task. Default `true`. */
305
336
  local?: boolean;
306
- /** The task's CI check context is a required status check + part of `holocron ci`'s default run. */
337
+ /** The task's CI check context is a required status check + part of `holocron run ci`'s default run. */
307
338
  required?: boolean;
339
+ /**
340
+ * Per-repo additions to this task's generated `turbo.json` entry —
341
+ * a separate channel from `with:` (that's the reusable *workflow's*
342
+ * inputs; this is local turbo cache config, unrelated). No-op for a
343
+ * task with no turbo fan-out config in the registry. Mirrors
344
+ * astromech's own `TaskEntry["turbo"]` — kept in sync by hand, since
345
+ * this package doesn't depend on astromech directly.
346
+ */
347
+ turbo?: {
348
+ /** Extra env vars turbo hashes into this task's cache key, appended to the registry default. */
349
+ passThroughEnv?: string[];
350
+ /**
351
+ * Extra input globs appended to the registry default's `inputs`
352
+ * (holocron#845) — for a package whose layout the registry
353
+ * default doesn't cover (e.g. a flat-layout package with no
354
+ * `src/` directory at all).
355
+ */
356
+ inputs?: string[];
357
+ };
308
358
  }
309
359
  interface HolocronConfig {
310
360
  /** Project name. Derived from package.json when absent. */
311
361
  name?: string;
312
362
  description?: string;
313
- /** Project homepage URL. Synced to package.json#homepage and the GitHub repo's website field by `holocron sync`. */
363
+ /** Project homepage URL. Synced to package.json#homepage and the GitHub repo's website field by `holocron repo sync`. */
314
364
  homepage?: string;
315
365
  /**
316
366
  * Active org name for namespaced keyring lookup. When set, token resolution
@@ -336,20 +386,20 @@ interface HolocronConfig {
336
386
  * The task manifest — what this repo runs. Each entry is a task name
337
387
  * (backed by a reusable workflow in `theholocron/.github`), or the object
338
388
  * form to pass `with:` inputs. `@theholocron/astromech` reads this as the
339
- * single source for `holocron run` / `holocron ci` / the generated CI
389
+ * single source for `holocron run` / `holocron run ci` / the generated CI
340
390
  * workflows / `package.json` scripts.
341
391
  *
342
392
  * Supported values (intent-facing vocabulary — epic #672, D3):
343
- * "verification.unitTests" | "verification.typeSafety" | "verification.performance" |
393
+ * "verification.unitTests" | "verification.visualRegression" | "verification.typeSafety" | "verification.performance" |
344
394
  * "sourceQuality.staticAnalysis" | "sourceQuality.formatting" |
345
395
  * "sourceQuality.structuredDataValidation" | "sourceQuality.deadCodeAnalysis" |
346
396
  * "security.secretDetection" | "security.codeScanning" |
347
397
  * "delivery.build" | "delivery.publish" | "delivery.deploy" | "delivery.bundleSize" |
348
- * "platform.repoSync" | "platform.commitStandards" | "platform.repoValidation" |
398
+ * "platform.repoSync" | "platform.notifyCheck" | "platform.commitStandards" | "platform.repoValidation" |
349
399
  * "knowledge.wiki" | "knowledge.docs" | "knowledge.components" |
350
400
  * "review" | "tag" | "stale" | "greetings" | "dependencies" | "bookkeeping"
351
401
  *
352
- * `holocron setup` writes `.github/workflows/<name>.yml` for each entry,
402
+ * `holocron repo setup` writes `.github/workflows/<name>.yml` for each entry,
353
403
  * calling the corresponding reusable workflow in `theholocron/.github`.
354
404
  * Files are overwritten on each run — they are generated artifacts.
355
405
  *
@@ -384,23 +434,37 @@ interface HolocronConfig {
384
434
  * { name: "delivery.deploy", with: { docs: { path: "packages/site" } } }
385
435
  * ```
386
436
  *
387
- * ### run-chromatic
388
- * For a single-project repo, use `"run-chromatic": true` with a
389
- * `CHROMATIC_PROJECT_TOKEN` repository secret.
437
+ * ### verification.visualRegression
438
+ * Its own task, not a `verification.unitTests` sub-job (holocron#394/#1062)
439
+ * — GitHub evaluates a job's `if:` before expanding its `strategy.matrix`,
440
+ * so no `chromatic-projects` default can make a *disabled* Chromatic job
441
+ * disappear from PR checks; only not generating the job at all does. Omit
442
+ * this task entirely for a repo that doesn't use Chromatic — no workflow,
443
+ * no job, no check, not even a skipped one.
390
444
  *
391
- * For monorepos with multiple Storybooks, use the object form:
445
+ * For a single-project repo, use a `CHROMATIC_PROJECT_TOKEN` repository
446
+ * secret with `tokenName: "default"`:
392
447
  * ```ts
393
- * "run-chromatic": {
394
- * projects: [
395
- * { tokenName: "WEB", workingDir: "apps/web" },
396
- * { tokenName: "UI", workingDir: "packages/ui" },
397
- * ]
448
+ * {
449
+ * name: "verification.visualRegression",
450
+ * with: { "chromatic-projects": [{ tokenName: "default", workingDir: "." }] },
451
+ * }
452
+ * ```
453
+ *
454
+ * For monorepos with multiple Storybooks, list one entry per project:
455
+ * ```ts
456
+ * {
457
+ * name: "verification.visualRegression",
458
+ * with: {
459
+ * "chromatic-projects": [
460
+ * { tokenName: "WEB", workingDir: "apps/web" },
461
+ * { tokenName: "UI", workingDir: "packages/ui" },
462
+ * ],
463
+ * },
398
464
  * }
399
465
  * ```
400
466
  * Each `tokenName` maps to a repository secret named
401
- * `CHROMATIC_PROJECT_TOKEN_<TOKENNAME>`. `holocron setup` expands this
402
- * to the flat `run-chromatic: true` + `chromatic-projects: <json>` inputs
403
- * that the reusable workflow accepts.
467
+ * `CHROMATIC_PROJECT_TOKEN_<TOKENNAME>`.
404
468
  *
405
469
  * @example
406
470
  * ["sourceQuality.staticAnalysis", { "name": "delivery.publish", "with": { "run-build": false } }]
@@ -408,7 +472,7 @@ interface HolocronConfig {
408
472
  */
409
473
  tasks?: Array<string | TaskEntryConfig>;
410
474
  /**
411
- * Opt out of `holocron sync`'s `package.json` script writes. Default `true`.
475
+ * Opt out of `holocron repo sync`'s `package.json` script writes. Default `true`.
412
476
  */
413
477
  syncScripts?: boolean;
414
478
  /**
@@ -419,15 +483,15 @@ interface HolocronConfig {
419
483
  holocronScript?: string;
420
484
  /**
421
485
  * Required status-check contexts not backed by a `required` task (codecov
422
- * gates, the bundle-build check, …). `holocron setup` appends these to the
486
+ * gates, the bundle-build check, …). `holocron repo setup` appends these to the
423
487
  * task-derived list from `astromech.requiredChecks()`.
424
488
  */
425
489
  extraRequiredChecks?: string[];
426
490
  /**
427
- * Git hooks `holocron setup` installs. `true` / `{ prePush: true }` writes
428
- * `.husky/pre-push` (runs `holocron ci` before every push); `false` /
491
+ * Git hooks `holocron repo setup` installs. `true` / `{ prePush: true }` writes
492
+ * `.husky/pre-push` (runs `holocron run ci` before every push); `false` /
429
493
  * `{ prePush: false }` opts out. Omitted → on for `protection: "strict"`,
430
- * off otherwise. `--hooks` / `--no-hooks` on `holocron setup` override.
494
+ * off otherwise. `--hooks` / `--no-hooks` on `holocron repo setup` override.
431
495
  */
432
496
  hooks?: boolean | {
433
497
  prePush?: boolean;
@@ -436,7 +500,7 @@ interface HolocronConfig {
436
500
  apps?: AppConfig[];
437
501
  doctor?: DoctorConfig;
438
502
  /**
439
- * Agent runtime that determines where skills are installed by `holocron setup`.
503
+ * Agent runtime that determines where skills are installed by `holocron repo setup`.
440
504
  * Skills are installed to `.agents/skills/<name>/` (canonical) with a
441
505
  * relative symlink at the agent-specific path:
442
506
  * - `"claude"` → `.claude/skills/<name>` → `../../.agents/skills/<name>`
@@ -444,7 +508,7 @@ interface HolocronConfig {
444
508
  */
445
509
  agent?: "claude" | "codex" | "gemini";
446
510
  /**
447
- * Skill names from `@theholocron/skills` to install during `holocron setup`.
511
+ * Skill names from `@theholocron/skills` to install during `holocron repo setup`.
448
512
  * Installed paths are gitignored and managed by setup — do not commit them.
449
513
  *
450
514
  * @example
@@ -452,7 +516,7 @@ interface HolocronConfig {
452
516
  */
453
517
  skills?: string[];
454
518
  /**
455
- * GitHub Pages configuration. When present, `holocron setup` calls the
519
+ * GitHub Pages configuration. When present, `holocron repo setup` calls the
456
520
  * Pages API using `HOLOCRON_DEPLOY_TOKEN` (requires `pages:write` + `repo` scope).
457
521
  * When absent, Pages is left as-is.
458
522
  *
@@ -488,6 +552,29 @@ interface HolocronConfig {
488
552
  * { analytics: "none" }
489
553
  */
490
554
  telemetry?: TelemetryConfig;
555
+ /**
556
+ * ESLint bundle option overrides that Sentinel's centralized static-
557
+ * analysis check (holocron#849) can't otherwise see. Bucket 1 checks
558
+ * never read a PR's own committed files for config — this is the
559
+ * declared source of truth Sentinel reads instead, so its check stays
560
+ * in sync with what each package's own `eslint.config.ts` already
561
+ * enforces locally and in CI.
562
+ */
563
+ eslint?: EslintConfig;
564
+ }
565
+ /**
566
+ * Repo-root-relative directories treated as browser-targeted for eslint's
567
+ * node-builtins compatibility checks — mirrors
568
+ * `@theholocron/eslint-config`'s `library({ browserPackages })` option.
569
+ * Only needed for a package whose own `eslint.config.ts` already declares
570
+ * `browserPackages` (a deliberate outlier, not the norm — see that
571
+ * package's own config file for why).
572
+ *
573
+ * @example
574
+ * { browserPackages: ["packages/github-client/src/app-auth"] }
575
+ */
576
+ interface EslintConfig {
577
+ browserPackages?: string[];
491
578
  }
492
579
  interface ResolvedTuple {
493
580
  provider: string;
@@ -527,7 +614,10 @@ interface ResolvedHolocronConfig {
527
614
  env?: EnvConfig;
528
615
  log?: LogConfig;
529
616
  telemetry?: TelemetryConfig;
617
+ eslint?: EslintConfig;
530
618
  }
619
+ //#endregion
620
+ //#region src/config/config/config.d.ts
531
621
  declare class ConfigError extends Error {
532
622
  name: string;
533
623
  }
@@ -540,83 +630,7 @@ declare function resolvePluginPackage(provider: string): string;
540
630
  declare function resolveEntry(key: CapabilityKey, raw: RawProviderEntry): ResolvedProviderEntry;
541
631
  declare function resolveConfig(raw: HolocronConfig): ResolvedHolocronConfig;
542
632
  //#endregion
543
- //#region src/commands/setup/derived-properties.d.ts
544
- /**
545
- * Derived custom-properties (#677). Unlike the existing 6 GitHub
546
- * custom-properties fields (`lifecycle`, `open_source`, `runtime_environment`,
547
- * `uses_external_packages`, `monorepo`, `branch_protection_level`) — which
548
- * mirror what `holocron.config.ts` already states explicitly — these four are
549
- * *derived*: signal that isn't an explicit config field today (framework
550
- * choice, repo archetype, capability drift). See
551
- * `.notes/tech-holocron-platform.spec.md` → "Custom-properties sync — field
552
- * definitions (#677)" for the full design.
553
- */
554
- type HolocronProfile = "library" | "cli" | "plugin" | "template" | "app" | "docs" | "platform";
555
- interface PackageJsonLike {
556
- name?: string;
557
- private?: boolean;
558
- bin?: unknown;
559
- dependencies?: Record<string, string>;
560
- devDependencies?: Record<string, string>;
561
- }
562
- interface DeriveProfileInput {
563
- rootPackageJson: PackageJsonLike | null;
564
- repoName: string;
565
- isMonorepo: boolean;
566
- /** `packages/*` package.json contents, monorepo repos only — used to find the primary published artifact. */
567
- workspacePackageJsons: PackageJsonLike[];
568
- }
569
- /**
570
- * Repo archetype, in priority order:
571
- * 1. `*-template` repo name → `template` (independent of package shape).
572
- * 2. Monorepo whose primary published artifact is a CLI (some workspace
573
- * package has `bin`) → `platform` — matches `holocron` itself: the CLI is
574
- * the deliverable, the plugin packages are supporting infrastructure for
575
- * it, not separate products.
576
- * 3. Monorepo with no CLI but at least one non-private workspace package →
577
- * `library` — matches `clients`/`configs`/`utils`/`themes`/
578
- * `observability`: a family of published packages, none of them a CLI.
579
- * Checked *before* falling into the root-package branch below, because
580
- * these repos' own root `package.json` is private and often carries
581
- * `@theholocron/astro-config` for a docs site built from the monorepo
582
- * root — without this check they'd wrongly resolve to `docs` off that
583
- * root-level signal alone, when the docs site is a secondary concern of
584
- * a library collection, not what the repo fundamentally is.
585
- * 4. Single-package repo with `package.json#bin` → `cli`.
586
- * 5. Docs-only site (astro/starlight present, root package private, no
587
- * publishable exports) → `docs`.
588
- * 6. Private, non-publishable, non-docs → `app`.
589
- * 7. Otherwise, a single publishable package → `library`.
590
- */
591
- declare function deriveProfile(input: DeriveProfileInput): HolocronProfile;
592
- /**
593
- * Detected build/framework tooling — the literal "does this repo need
594
- * next/vite/tsdown" signal `holocron.config.ts` has no field for today
595
- * (framework choice isn't a config concept, unlike `providers`/`tasks`).
596
- * Curated table, not exhaustive by design — add to `KNOWN_STACK_DEPS` as new
597
- * frameworks show up rather than trying to detect anything on npm.
598
- */
599
- declare function deriveStack(pkg: PackageJsonLike | null): string[];
600
- /** The provider capability keys actually wired in `providers: {}` — zero heuristics. */
601
- declare function deriveCapabilities(providers: ResolvedProvidersConfig | undefined): string[];
602
- declare function deriveCompliance(capabilities: readonly string[]): "compliant" | "non-compliant";
603
- /**
604
- * The Phase B refinement `deriveCompliance()`'s own doc comment names —
605
- * *why* a repo is non-compliant, not just that it is. `[]` when compliant.
606
- * Same `REQUIRED_BASELINE` `deriveCompliance()` checks against — one
607
- * table, not two independently-maintained baselines.
608
- */
609
- declare function missingCapabilities(capabilities: readonly string[]): string[];
610
- /**
611
- * Reads each workspace package's actual `package.json` content (not just
612
- * `readWorkspacePackages()`'s `{ slug, name, dir }` — `deriveProfile()`'s
613
- * `platform` detection needs `bin`, which that helper doesn't carry).
614
- * Missing/invalid files are skipped, matching `readWorkspacePackages()`'s
615
- * own soft-fail behavior.
616
- */
617
- declare function readWorkspacePackageJsons(repoRoot: string, workspacePackages: readonly WorkspacePackage[]): Promise<PackageJsonLike[]>;
618
- //#endregion
619
- //#region src/config/compose.d.ts
633
+ //#region src/config/compose/compose.type.d.ts
620
634
  type TaskEntry = NonNullable<HolocronConfig["tasks"]>[number];
621
635
  /** A single composable capability fragment. */
622
636
  interface Capability {
@@ -655,6 +669,8 @@ interface ComposedPreset {
655
669
  domain?: string;
656
670
  docs?: DocsConfig;
657
671
  }
672
+ //#endregion
673
+ //#region src/config/compose/compose.d.ts
658
674
  /**
659
675
  * Merge any number of capability fragments into a single preset object that
660
676
  * spreads directly into `defineConfig()`.
@@ -678,20 +694,99 @@ interface ComposedPreset {
678
694
  */
679
695
  declare function compose(...args: (Capability | Capability[])[]): ComposedPreset;
680
696
  //#endregion
681
- //#region src/config/define-config.d.ts
697
+ //#region src/config/define-config/define-config.d.ts
682
698
  declare function defineConfig(config: HolocronConfig): HolocronConfig;
683
699
  //#endregion
684
- //#region src/config/load-config.d.ts
700
+ //#region src/config/load-config/load-config.type.d.ts
685
701
  interface LoadedConfig {
686
702
  resolved: ResolvedHolocronConfig;
687
703
  /** Absolute path to the file the config was read from. */
688
704
  filepath: string;
689
705
  }
706
+ //#endregion
707
+ //#region src/config/load-config/load-config.d.ts
690
708
  /**
691
- * Read + parse + resolve `holocron.config.*` from the given directory.
709
+ * Read + parse + resolve `holocron.config.*` starting from the given
710
+ * directory, walking up through ancestors to the nearest `.git` boundary
711
+ * when `cwd` itself has no match — every command is usable from any
712
+ * subdirectory of a repo, not only its exact root (see
713
+ * `@theholocron/datapad`'s own doc comment for the stop conditions).
692
714
  * Throws {@link ConfigFileError} when nothing is found or a file cannot
693
- * be loaded, or `ConfigError` when the config is invalid.
715
+ * be loaded, or `ConfigError` when the config fails schema checks.
694
716
  */
695
717
  declare function loadConfig(cwd: string): Promise<LoadedConfig>;
696
718
  //#endregion
697
- export { Analytics, AppConfig, Auth, AuthDescription, AuthError, AuthEvent, AuthEventType, AuthIdentity, AuthUser, CARDINALITY, Capability, CapabilityConfigPackage, CapabilityImpls, CapabilityKey, Cardinality, CardinalityFor, ChromaticProjectConfig, Ci, CiRun, CiRunFilter, CiRunStatus, ComposedPreset, ConfigError, ConfigFileError, ConnectionStringOptions, CreateAuthUserInput, DeployScriptConfig, DeployScriptResult, Deployment, DeploymentProject, DeploymentProjectSettings, DeploymentRecord, DeploymentTarget, DeploymentTrigger, DeriveProfileInput, Dns, DnsRecord, DnsRecordType, DocsConfig, DoctorConfig, EnsureResult, EnvConfig, Environment, EnvironmentReviewer, Environments, Errors, FeatureResolverConfig, HolocronConfig, HolocronProfile, Issue, IssueSearchFilter, Issues, LabelDef, LifecycleResult, LifecycleSlot, LoadedConfig, LogConfig, Logs, MultiEntry, NormalizedAuthUser, Notifications, PackageJsonLike, PagesConfig, ParseWebhookInput, ProviderApiError, ProviderIdentity, ProviderOptions, PullRequest, REQUIRED_CAPABILITIES, RawProviderEntry, RawProvidersConfig, RepoConfig, RepoProperties, RepoProtection, RepoRef, RepoSettings, type RequestOptions, ResolveTokenConfig, type ResolveTokenInput, ResolvedCapability, ResolvedHolocronConfig, ResolvedProviderEntry, ResolvedProvidersConfig, ResolvedTuple, type RestClient, type RestClientConfig, Ruleset, SecretScope, Secrets, SingleEntry, Source, StatusCategory, Storage, StorageBranch, StorybookDeployProject, TaskEntryConfig, TeamEntry, TeamPermission, TelemetryConfig, Tooling, ToolingDoctorReport, TrackerDoctorReport, TrackerUser, Vault, WebhookDashboardInfo, WebhookVerificationError, Wiki, WikiDnsRecord, WikiProvisionOpts, WikiProxyConfig, Workers, WorkflowWithConfig, compose, createFeatureResolver, createResolveToken, createRestClient, defineConfig, deleteToken, deriveCapabilities, deriveCompliance, deriveProfile, deriveStack, getToken, isMulti, listStoredProviders, loadConfig, missingCapabilities, readWorkspacePackageJsons, resolveConfig, resolveEntry, resolvePluginPackage, setToken };
719
+ //#region src/commands/setup/derived-properties/derived-properties.type.d.ts
720
+ /**
721
+ * Derived custom-properties (#677). Unlike the existing 6 GitHub
722
+ * custom-properties fields (`lifecycle`, `open_source`, `runtime_environment`,
723
+ * `uses_external_packages`, `monorepo`, `branch_protection_level`) — which
724
+ * mirror what `holocron.config.ts` already states explicitly — these four are
725
+ * *derived*: signal that isn't an explicit config field today (framework
726
+ * choice, repo archetype, capability drift). See
727
+ * `.notes/tech-holocron-platform.spec.md` → "Custom-properties sync — field
728
+ * definitions (#677)" for the full design.
729
+ */
730
+ type HolocronProfile = "library" | "cli" | "plugin" | "template" | "app" | "docs" | "platform";
731
+ /** The `package.json` shape profile derivation reads — `@theholocron/pkg-utils`'s `PackageJson`, under the name Sentinel already imports. */
732
+ type PackageJsonLike = PackageJson;
733
+ interface DeriveProfileInput {
734
+ rootPackageJson: PackageJsonLike | null;
735
+ repoName: string;
736
+ isMonorepo: boolean;
737
+ /** `packages/*` package.json contents, monorepo repos only — used to find the primary published artifact. */
738
+ workspacePackageJsons: PackageJsonLike[];
739
+ }
740
+ //#endregion
741
+ //#region src/commands/setup/derived-properties/derived-properties.d.ts
742
+ /**
743
+ * Repo archetype, in priority order:
744
+ * 1. `*-template` repo name → `template` (independent of package shape).
745
+ * 2. Monorepo whose primary published artifact is a CLI (some workspace
746
+ * package has `bin`) → `platform` — matches `holocron` itself: the CLI is
747
+ * the deliverable, the plugin packages are supporting infrastructure for
748
+ * it, not separate products.
749
+ * 3. Monorepo with no CLI but at least one non-private workspace package →
750
+ * `library` — matches `clients`/`configs`/`utils`/`themes`/
751
+ * `observability`: a family of published packages, none of them a CLI.
752
+ * Checked *before* falling into the root-package branch below, because
753
+ * these repos' own root `package.json` is private and often carries
754
+ * `@theholocron/astro-config` for a docs site built from the monorepo
755
+ * root — without this check they'd wrongly resolve to `docs` off that
756
+ * root-level signal alone, when the docs site is a secondary concern of
757
+ * a library collection, not what the repo fundamentally is.
758
+ * 4. Single-package repo with `package.json#bin` → `cli`.
759
+ * 5. Docs-only site (astro/starlight present, root package private, no
760
+ * publishable exports) → `docs`.
761
+ * 6. Private, non-publishable, non-docs → `app`.
762
+ * 7. Otherwise, a single publishable package → `library`.
763
+ */
764
+ declare function deriveProfile(input: DeriveProfileInput): HolocronProfile;
765
+ /**
766
+ * Detected build/framework tooling — the literal "does this repo need
767
+ * next/vite/tsdown" signal `holocron.config.ts` has no field for today
768
+ * (framework choice isn't a config concept, unlike `providers`/`tasks`).
769
+ * Curated table, not exhaustive by design — add to `KNOWN_STACK_DEPS` as new
770
+ * frameworks show up rather than trying to detect anything on npm.
771
+ */
772
+ declare function deriveStack(pkg: PackageJsonLike | null): string[];
773
+ /** The provider capability keys actually wired in `providers: {}` — zero heuristics. */
774
+ declare function deriveCapabilities(providers: ResolvedProvidersConfig | undefined): string[];
775
+ declare function deriveCompliance(capabilities: readonly string[]): "compliant" | "non-compliant";
776
+ /**
777
+ * The Phase B refinement `deriveCompliance()`'s own doc comment names —
778
+ * *why* a repo is non-compliant, not just that it is. `[]` when compliant.
779
+ * Same `REQUIRED_BASELINE` `deriveCompliance()` checks against — one
780
+ * table, not two independently-maintained baselines.
781
+ */
782
+ declare function missingCapabilities(capabilities: readonly string[]): string[];
783
+ /**
784
+ * Reads each workspace package's actual `package.json` content (not just
785
+ * `readWorkspacePackages()`'s `{ slug, name, dir }` — `deriveProfile()`'s
786
+ * `platform` detection needs `bin`, which that helper doesn't carry).
787
+ * Missing/invalid files are skipped, matching `readWorkspacePackages()`'s
788
+ * own soft-fail behavior.
789
+ */
790
+ declare function readWorkspacePackageJsons(repoRoot: string, workspacePackages: readonly WorkspacePackage[]): Promise<PackageJsonLike[]>;
791
+ //#endregion
792
+ export { Analytics, type AppConfig, Auth, AuthDescription, AuthError, AuthEvent, AuthEventType, AuthIdentity, AuthUser, CARDINALITY, type Capability, type CapabilityConfigPackage, CapabilityImpls, CapabilityKey, Cardinality, CardinalityFor, type ChromaticProjectConfig, Ci, CiRun, CiRunFilter, CiRunStatus, type ComposedPreset, ConfigError, ConfigFileError, ConnectionStringOptions, CreateAuthUserInput, DeployFunctionConfig, DeployFunctionResult, DeployScriptConfig, DeployScriptResult, Deployment, DeploymentProject, DeploymentProjectSettings, DeploymentRecord, DeploymentTarget, DeploymentTrigger, type DeriveProfileInput, Dns, DnsRecord, DnsRecordRequest, DnsRecordType, type DocsConfig, type DoctorConfig, EnsureResult, EnsureWebhookResult, EnsuredResource, type EnvConfig, Environment, EnvironmentReviewer, Environments, Errors, type EslintConfig, type FeatureResolverConfig, type HolocronConfig, type HolocronProfile, Issue, IssueSearchFilter, Issues, LabelDef, LifecycleResult, LifecycleSlot, type LoadedConfig, type LogConfig, Logs, Monitoring, MonitoringAssertion, MonitoringAssertionComparison, MonitoringAssertionSource, MonitoringCheck, MonitoringCheckInput, MonitoringHttpMethod, type MultiEntry, NormalizedAuthUser, Notifications, NotificationsAccess, NotificationsApplicationLayout, NotificationsChannelLayout, NotificationsDelivery, NotificationsEveryoneLayout, NotificationsLayout, NotificationsLinksLayout, NotificationsMember, NotificationsOnboardingLayout, NotificationsServerLayout, NotificationsSignIn, NotificationsSignedIn, NotificationsWelcomeLayout, type PackageJsonLike, PagesConfig, ParseWebhookInput, ProviderApiError, ProviderIdentity, type ProviderOptions, PullRequest, REQUIRED_CAPABILITIES, type RawProviderEntry, type RawProvidersConfig, type RepoConfig, type RepoProperties, type RepoProtection, RepoRef, RepoSettings, type RequestOptions, type ResolveTokenConfig, type ResolveTokenInput, ResolvedCapability, type ResolvedHolocronConfig, type ResolvedProviderEntry, type ResolvedProvidersConfig, type ResolvedTuple, type RestClient, type RestClientConfig, Ruleset, SecretScope, Secrets, ServerInspection, type SingleEntry, Source, SourceFile, SourceTeamMember, StatusCategory, Storage, StorageBranch, type StorybookDeployProject, type TaskEntry, type TaskEntryConfig, TeamEntry, TeamPermission, type TelemetryConfig, Tooling, ToolingDoctorReport, TrackerDoctorReport, TrackerUser, Vault, type VerifyTokenFailure, type VerifyTokenResult, type VerifyTokenSuccess, WebhookDashboardInfo, WebhookVerificationError, Wiki, WikiProvisionOpts, WikiProxyConfig, Workers, type WorkflowWithConfig, compose, createFeatureResolver, createResolveToken, createRestClient, defineConfig, deleteToken, deriveCapabilities, deriveCompliance, deriveProfile, deriveStack, getToken, isMulti, listStoredProviders, loadConfig, missingCapabilities, readWorkspacePackageJsons, resolveConfig, resolveEntry, resolvePluginPackage, setToken };