@theholocron/cli 5.0.0-alpha.502 → 5.0.0-alpha.503

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.
@@ -80,6 +80,44 @@ function validateEnvironmentChoice(entry, what, required = true) {
80
80
  }
81
81
  if (required) throw new ConfigError$1(`${what} needs the name of a vault environment (\`environment\`) or a \`layer\``);
82
82
  }
83
+ // src/config/validate-repo-labels/validate-repo-labels.ts
84
+ /** What an area name may be: the rest of `area:<name>`, so no colon, comma, space or leading symbol. */
85
+ const AREA_NAME = /^[A-Za-z0-9][A-Za-z0-9._-]*$/;
86
+ /** GitHub's longest label name is 50 characters, and `area:` takes five. */
87
+ const MAX_NAME = 45;
88
+ /**
89
+ * Check `repo.labels` (spec `tech-github-area-labels`): each area name must be usable as the suffix of a label (letters,
90
+ * digits, `.`, `_` and `-`, at most 45 characters) and appear once whatever the case (GitHub's labels are
91
+ * case-insensitive), each area needs a list of patterns with at least one that includes a path, and each scope names a
92
+ * declared area.
93
+ *
94
+ * @param labels - `repo.labels`, if the config has it.
95
+ * @throws {ConfigError} Naming the path of the first problem found.
96
+ */
97
+ function validateRepoLabels(labels) {
98
+ if (labels === void 0) return;
99
+ const areas = labels.areas ?? {};
100
+ const seen = /* @__PURE__ */ new Map();
101
+ for (const [name, patterns] of Object.entries(areas)) {
102
+ const at = `\`repo.labels.areas.${name}\``;
103
+ if (!AREA_NAME.test(name) || name.length > MAX_NAME) throw new ConfigError$1(`${at}: ${JSON.stringify(name)} cannot be the name of an \`area:<name>\` label (use letters, digits, ".", "_" or "-", at most ${MAX_NAME} characters)`);
104
+ const lower = name.toLowerCase();
105
+ const first = seen.get(lower);
106
+ if (first !== void 0) throw new ConfigError$1(`${at}: duplicates \`repo.labels.areas.${first}\` (label names ignore case)`);
107
+ seen.set(lower, name);
108
+ if (!Array.isArray(patterns) || patterns.length === 0) throw new ConfigError$1(`${at} needs a list of folder patterns, got none`);
109
+ for (const pattern of patterns) if (typeof pattern !== "string" || pattern.replace(/^!/, "").trim() === "") throw new ConfigError$1(`${at} has an empty pattern`);
110
+ if (patterns.every((p) => p.startsWith("!"))) throw new ConfigError$1(`${at} has only exclusions ("!..."), so no path could be in it`);
111
+ }
112
+ for (const [scope, area] of Object.entries(labels.scopes ?? {})) {
113
+ const at = `\`repo.labels.scopes.${scope}\``;
114
+ if (scope.trim() === "") throw new ConfigError$1("`repo.labels.scopes` has an empty scope name");
115
+ if (typeof area !== "string" || !Object.hasOwn(areas, area)) {
116
+ const known = Object.keys(areas);
117
+ throw new ConfigError$1(`${at} names the unknown area ${JSON.stringify(area)}; ${known.length > 0 ? `the declared areas are ${known.join(", ")}` : "`repo.labels.areas` declares none"}`);
118
+ }
119
+ }
120
+ }
83
121
  // src/credentials-environments/repo-slug/repo-slug.ts
84
122
  /**
85
123
  * The `<org>/<repo>` of the repository at `cwd`, from its `origin` remote. A remote that is missing or cannot be
@@ -346,6 +384,7 @@ function resolveConfig(raw) {
346
384
  if (raw.dev !== void 0) validateDev(raw.dev);
347
385
  if (raw.githubApps !== void 0) validateGitHubApps(raw.githubApps);
348
386
  if (raw.ideas !== void 0) validateIdeas(raw.ideas);
387
+ validateRepoLabels(raw.repo?.labels);
349
388
  validateVariablesSync(raw.repo?.variables);
350
389
  validateSecretsDeploy(raw.repo?.secrets);
351
390
  validateSecretsSync(raw.repo?.secrets);
@@ -288,14 +288,18 @@ interface OrgConfig {
288
288
  };
289
289
  }
290
290
  /**
291
- * The label map of the `repo` block (spec `tech-github-area-labels`, #2430). Names only. This change reads `areas` to
292
- * resolve `--area` on `new issue` and `update issue`; the labels themselves, `setup`, the doctor row and Sentinel's
293
- * labeling are later parts of that spec.
291
+ * The label map of the `repo` block (spec `tech-github-area-labels`, #2430). Names only, checked when the config loads
292
+ * (`validateRepoLabels()`). `holocron setup` makes the `area:<name>` labels, `doctor repo` checks them, `--area` on
293
+ * `new issue` and `update issue` takes the names, and `areaLabelsForFiles()` / `areaLabelsForTitle()` (exported from
294
+ * `@theholocron/cli`) are the one mapping Sentinel and the backfill probe use.
294
295
  */
295
296
  interface RepoLabels {
296
- /** Area name to the folder patterns it covers; the label is `area:<name>`. */
297
+ /**
298
+ * Area name to the folder patterns it covers; the label is `area:<name>`. A pattern is a glob (`cli/**`), a file or a
299
+ * folder; one starting with `!` takes a path out of the area. At least one pattern must include a path.
300
+ */
297
301
  areas?: Record<string, string[]>;
298
- /** A title scope (`feat(sentinel)`) to the area it means. */
302
+ /** A title scope (`feat(sentinel)`) to the area it means; every value must be a declared area. */
299
303
  scopes?: Record<string, string>;
300
304
  }
301
305
  /** The `repo` block: how the GitHub repository is set up and kept in sync by `holocron setup`. */
@@ -1361,6 +1365,13 @@ interface Source extends ProviderIdentity {
1361
1365
  * Optional — providers that have no label concept omit this.
1362
1366
  */
1363
1367
  syncLabels?(canonical: ReadonlyArray<LabelDef>, stale: ReadonlyArray<string>): Promise<string>;
1368
+ /**
1369
+ * Make the labels that are missing and leave every existing one exactly as it is (name case aside): no colour or
1370
+ * description is patched and nothing is deleted. For per-repo label families such as `area:<name>`, which are not
1371
+ * in the canonical set `syncLabels` owns.
1372
+ * Optional — providers that have no label concept omit this.
1373
+ */
1374
+ ensureLabels?(labels: ReadonlyArray<LabelDef>): Promise<string>;
1364
1375
  /**
1365
1376
  * Set org-level custom property values on the repo. `string[]` for
1366
1377
  * `multi_select` properties, plain `string` for everything else.
package/dist/index.d.mts CHANGED
@@ -1,4 +1,4 @@
1
- import { $ as CoverageUploadInput, $i as LogConfig, $n as NotificationsWelcomeLayout, $r as Tunnels, $t as IssueOrder, A as Cache, Ai as Capability, An as MonitoringStatusPageResult, Ar as StatusCategory, At as EnsuredTunnel, B as ConnectionStringOptions, Bi as AppConfig, Bn as NotificationsForumTag, Br as ToolingExportResult, Bt as IdeaRecord, C as BoardState, Ca as WorkflowWithConfig, Ci as PackageJsonLike, Cn as MonitoringDashboardState, Cr as Source, Ct as EnsureRelayInput, D as BoardTemplate, Di as defineConfig, Dn as MonitoringHttpMethod, Dr as SourceRulesetDetail, Dt as EnsureWebhookResult, E as BoardSummary, Ei as compose, En as MonitoringHeartbeatUnit, Er as SourceRepoInfo, Et as EnsureResult, F as CardinalityFor, Fi as resolveConfig, Fn as NotificationsAccess, Fr as TeamPermission, Ft as Errors, G as CoverageExpectations, Gi as DevServeConfig, Gn as NotificationsOnboardingLayout, Gr as ToolingWorkspaceFile, Gt as InspectRelayInput, H as CoverageConfigComponent, Hi as ChromaticProjectConfig, Hn as NotificationsLinksLayout, Hr as ToolingOpenLaunch, Ht as ImportOptions, I as Ci, Ii as resolveEntry, In as NotificationsApplicationLayout, Ir as Tooling, It as ErrorsInspection, J as CoverageStatusContext, Ji as EnvConfig, Jn as NotificationsPrsFeed, Jr as ToolingWorkspaceSide, Jt as IssueComment, K as CoverageNameDiff, Ki as DocsConfig, Kn as NotificationsPicture, Kr as ToolingWorkspaceInput, Kt as Issue, L as CiRun, Li as resolvePluginPackage, Ln as NotificationsChannelLayout, Lr as ToolingDoctorReport, Lt as ErrorsOrgState, M as CapabilityImpls, Mi as TaskEntry, Mn as MoveReport, Mr as StorageBranch, Mt as EnvironmentEntry, N as CapabilityKey, Ni as ConfigError, Nn as NormalizedAuthUser, Nr as SyncResult, Nt as EnvironmentReviewer, O as BoardTemplateFile, Oi as loadConfig, On as MonitoringStatusComponentInput, Or as SourceSecurity, Ot as EnsuredDiscussion, P as Cardinality, Pi as credentialsEnvironment, Pn as Notifications, Pr as TeamEntry, Pt as Environments, Q as CoverageUploadGroup, Qi as IdeasConfig, Qn as NotificationsSignedIn, Qr as TunnelRoute, Qt as IssueKind, R as CiRunFilter, Ri as AgentName, Rn as NotificationsDelivery, Rr as ToolingExportInput, Rt as ErrorsProjectState, S as BoardRule, Sa as TelemetryConfig, Si as HolocronProfile, Sn as MonitoringDashboardInput, Sr as ServerInspection, St as EnsureDiscussionInput, T as BoardStatusCategory, Ti as ConfigFileError, Tn as MonitoringHeartbeatResult, Tr as SourceFile, Tt as EnsureReport, U as CoverageConfigDocumentation, Ui as CredentialsConfig, Un as NotificationsMember, Ur as ToolingOpenPlan, Ut as ImportResult, V as Coverage, Vi as CapabilityConfigPackage, Vn as NotificationsLayout, Vr as ToolingOpenInput, Vt as Ideas, W as CoverageConfigInput, Wi as DevConfig, Wn as NotificationsMonitoringFeed, Wr as ToolingOpenWant, Wt as InspectErrorsInput, X as CoverageTokenCheck, Xi as GitHubAppConfig, Xn as NotificationsServerLayout, Xr as TrackerDoctorReport, Xt as IssueEffort, Y as CoverageStatusInput, Yi as EslintConfig, Yn as NotificationsReaction, Yr as ToolingWorkspaceState, Yt as IssueCreateInput, Z as CoverageUploadFlagResult, Zi as HolocronConfig, Zn as NotificationsSignIn, Zr as TrackerUser, Zt as IssueFields, _ as BoardFieldType, _a as ResolvedProvidersConfig, _i as deriveProfile, _n as MonitoringAssertion, _r as Ruleset, _t as DnsRecord, a as REQUIRED_CAPABILITIES, aa as RepoConfig, ai as WikiNavigationState, an as IssueUpdateResult, ar as PullRequest, at as DeployFunctionResult, b as BoardPullRequest, ba as StorybookDeployProject, bi as readWorkspacePackageJsons, bn as MonitoringCheck, br as SecretVisibility, bt as DuplicateDiscussion, c as AddedItem, ca as RepoProtection, ci as WikiProvisionOpts, cn as LifecycleResult, cr as PullRequestFields, ct as Deployment, d as AuthDescription, da as RepoSecretsSync, di as WorkerDeploymentState, dn as LogsDataset, dr as PullRequestPatch, dt as DeploymentRecord, ea as MultiEntry, ei as Vault, en as IssuePatch, er as OrganizationSecretScope, et as CoverageUploadResult, f as AuthEvent, fa as RepoValidationConfig, fi as WorkerScriptState, fn as Monitoring, fr as PullRequestResult, ft as DeploymentTarget, g as BoardField, ga as ResolvedProviderEntry, gi as deriveCompliance, gn as MonitoringAlertSettings, gr as ResolvedCapability, gt as Dns, h as AuthUser, ha as ResolvedHolocronConfig, hi as deriveCapabilities, hn as MonitoringAlertChannelState, hr as RepoSettings, ht as DiscussionPost, i as ProviderApiError, ia as RawProvidersConfig, ii as WikiInstanceState, in as IssueSelector, ir as ProviderIdentity, it as DeployFunctionConfig, j as CacheTokenCheck, ji as ComposedPreset, jn as MonitoringStatusPageState, jr as Storage, jt as Environment, k as BoardView, ki as LoadedConfig, kn as MonitoringStatusPageInput, kr as SourceTeamMember, kt as EnsuredResource, l as Analytics, la as RepoSecrets, li as WikiProxyConfig, ln as LifecycleSlot, lr as PullRequestInput, lt as DeploymentProject, m as AuthIdentity, ma as RepoVariablesSync, mi as KNOWN_STACK_DEPS, mn as MonitoringAlertChannelResult, mr as RepoRef, mt as DiscussionPatch, n as ElevationRequiredError, na as ProviderOptions, ni as Wiki, nn as IssueRecord, nr as ParseWebhookInput, nt as Credentials, o as WebhookVerificationError, oa as RepoLabels, oi as WikiOrganizationState, on as Issues, or as PullRequestChecks, ot as DeployScriptConfig, p as AuthEventType, pa as RepoVariables, pi as Workers, pn as MonitoringAlertChannelInput, pr as RelayState, pt as DeploymentTrigger, q as CoverageRepoReport, qi as DoctorConfig, qn as NotificationsPinnedLayout, qr as ToolingWorkspaceResult, qt as IssueClearable, r as MissingTokenError, ra as RawProviderEntry, ri as WikiInspection, rn as IssueSearchFilter, rr as Projects, rt as CredentialsInspection, s as isMulti, sa as RepoProperties, si as WikiProbe, sn as LabelDef, sr as PullRequestChecksState, st as DeployScriptResult, t as CARDINALITY, ta as OrgConfig, ti as WebhookDashboardInfo, tn as IssuePriority, tr as PagesConfig, tt as CreateAuthUserInput, u as Auth, ua as RepoSecretsDeploy, ui as WikiPublishedState, un as Logs, ur as PullRequestLink, ut as DeploymentProjectSettings, v as BoardItem, va as ResolvedTuple, vi as deriveStack, vn as MonitoringAssertionComparison, vr as SecretAccess, vt as DnsRecordRequest, w as BoardStatus, wa as EnvironmentLayer, wi as StackName, wn as MonitoringHeartbeatInput, wr as SourceBranch, wt as EnsureRelayResult, x as BoardPullRequestChecks, xa as TaskEntryConfig, xi as DeriveProfileInput, xn as MonitoringCheckInput, xr as Secrets, xt as EmojiCheck, y as BoardItemInput, ya as SingleEntry, yi as missingCapabilities, yn as MonitoringAssertionSource, yr as SecretScope, yt as DnsRecordType, z as CiRunStatus, zi as AgentOptions, zn as NotificationsEveryoneLayout, zr as ToolingExportIssue, zt as ExportInfo } from "./index-CquSWZ_0.mjs";
1
+ import { $ as CoverageUploadInput, $i as LogConfig, $n as NotificationsWelcomeLayout, $r as Tunnels, $t as IssueOrder, A as Cache, Ai as Capability, An as MonitoringStatusPageResult, Ar as StatusCategory, At as EnsuredTunnel, B as ConnectionStringOptions, Bi as AppConfig, Bn as NotificationsForumTag, Br as ToolingExportResult, Bt as IdeaRecord, C as BoardState, Ca as WorkflowWithConfig, Ci as PackageJsonLike, Cn as MonitoringDashboardState, Cr as Source, Ct as EnsureRelayInput, D as BoardTemplate, Di as defineConfig, Dn as MonitoringHttpMethod, Dr as SourceRulesetDetail, Dt as EnsureWebhookResult, E as BoardSummary, Ei as compose, En as MonitoringHeartbeatUnit, Er as SourceRepoInfo, Et as EnsureResult, F as CardinalityFor, Fi as resolveConfig, Fn as NotificationsAccess, Fr as TeamPermission, Ft as Errors, G as CoverageExpectations, Gi as DevServeConfig, Gn as NotificationsOnboardingLayout, Gr as ToolingWorkspaceFile, Gt as InspectRelayInput, H as CoverageConfigComponent, Hi as ChromaticProjectConfig, Hn as NotificationsLinksLayout, Hr as ToolingOpenLaunch, Ht as ImportOptions, I as Ci, Ii as resolveEntry, In as NotificationsApplicationLayout, Ir as Tooling, It as ErrorsInspection, J as CoverageStatusContext, Ji as EnvConfig, Jn as NotificationsPrsFeed, Jr as ToolingWorkspaceSide, Jt as IssueComment, K as CoverageNameDiff, Ki as DocsConfig, Kn as NotificationsPicture, Kr as ToolingWorkspaceInput, Kt as Issue, L as CiRun, Li as resolvePluginPackage, Ln as NotificationsChannelLayout, Lr as ToolingDoctorReport, Lt as ErrorsOrgState, M as CapabilityImpls, Mi as TaskEntry, Mn as MoveReport, Mr as StorageBranch, Mt as EnvironmentEntry, N as CapabilityKey, Ni as ConfigError, Nn as NormalizedAuthUser, Nr as SyncResult, Nt as EnvironmentReviewer, O as BoardTemplateFile, Oi as loadConfig, On as MonitoringStatusComponentInput, Or as SourceSecurity, Ot as EnsuredDiscussion, P as Cardinality, Pi as credentialsEnvironment, Pn as Notifications, Pr as TeamEntry, Pt as Environments, Q as CoverageUploadGroup, Qi as IdeasConfig, Qn as NotificationsSignedIn, Qr as TunnelRoute, Qt as IssueKind, R as CiRunFilter, Ri as AgentName, Rn as NotificationsDelivery, Rr as ToolingExportInput, Rt as ErrorsProjectState, S as BoardRule, Sa as TelemetryConfig, Si as HolocronProfile, Sn as MonitoringDashboardInput, Sr as ServerInspection, St as EnsureDiscussionInput, T as BoardStatusCategory, Ti as ConfigFileError, Tn as MonitoringHeartbeatResult, Tr as SourceFile, Tt as EnsureReport, U as CoverageConfigDocumentation, Ui as CredentialsConfig, Un as NotificationsMember, Ur as ToolingOpenPlan, Ut as ImportResult, V as Coverage, Vi as CapabilityConfigPackage, Vn as NotificationsLayout, Vr as ToolingOpenInput, Vt as Ideas, W as CoverageConfigInput, Wi as DevConfig, Wn as NotificationsMonitoringFeed, Wr as ToolingOpenWant, Wt as InspectErrorsInput, X as CoverageTokenCheck, Xi as GitHubAppConfig, Xn as NotificationsServerLayout, Xr as TrackerDoctorReport, Xt as IssueEffort, Y as CoverageStatusInput, Yi as EslintConfig, Yn as NotificationsReaction, Yr as ToolingWorkspaceState, Yt as IssueCreateInput, Z as CoverageUploadFlagResult, Zi as HolocronConfig, Zn as NotificationsSignIn, Zr as TrackerUser, Zt as IssueFields, _ as BoardFieldType, _a as ResolvedProvidersConfig, _i as deriveProfile, _n as MonitoringAssertion, _r as Ruleset, _t as DnsRecord, a as REQUIRED_CAPABILITIES, aa as RepoConfig, ai as WikiNavigationState, an as IssueUpdateResult, ar as PullRequest, at as DeployFunctionResult, b as BoardPullRequest, ba as StorybookDeployProject, bi as readWorkspacePackageJsons, bn as MonitoringCheck, br as SecretVisibility, bt as DuplicateDiscussion, c as AddedItem, ca as RepoProtection, ci as WikiProvisionOpts, cn as LifecycleResult, cr as PullRequestFields, ct as Deployment, d as AuthDescription, da as RepoSecretsSync, di as WorkerDeploymentState, dn as LogsDataset, dr as PullRequestPatch, dt as DeploymentRecord, ea as MultiEntry, ei as Vault, en as IssuePatch, er as OrganizationSecretScope, et as CoverageUploadResult, f as AuthEvent, fa as RepoValidationConfig, fi as WorkerScriptState, fn as Monitoring, fr as PullRequestResult, ft as DeploymentTarget, g as BoardField, ga as ResolvedProviderEntry, gi as deriveCompliance, gn as MonitoringAlertSettings, gr as ResolvedCapability, gt as Dns, h as AuthUser, ha as ResolvedHolocronConfig, hi as deriveCapabilities, hn as MonitoringAlertChannelState, hr as RepoSettings, ht as DiscussionPost, i as ProviderApiError, ia as RawProvidersConfig, ii as WikiInstanceState, in as IssueSelector, ir as ProviderIdentity, it as DeployFunctionConfig, j as CacheTokenCheck, ji as ComposedPreset, jn as MonitoringStatusPageState, jr as Storage, jt as Environment, k as BoardView, ki as LoadedConfig, kn as MonitoringStatusPageInput, kr as SourceTeamMember, kt as EnsuredResource, l as Analytics, la as RepoSecrets, li as WikiProxyConfig, ln as LifecycleSlot, lr as PullRequestInput, lt as DeploymentProject, m as AuthIdentity, ma as RepoVariablesSync, mi as KNOWN_STACK_DEPS, mn as MonitoringAlertChannelResult, mr as RepoRef, mt as DiscussionPatch, n as ElevationRequiredError, na as ProviderOptions, ni as Wiki, nn as IssueRecord, nr as ParseWebhookInput, nt as Credentials, o as WebhookVerificationError, oa as RepoLabels, oi as WikiOrganizationState, on as Issues, or as PullRequestChecks, ot as DeployScriptConfig, p as AuthEventType, pa as RepoVariables, pi as Workers, pn as MonitoringAlertChannelInput, pr as RelayState, pt as DeploymentTrigger, q as CoverageRepoReport, qi as DoctorConfig, qn as NotificationsPinnedLayout, qr as ToolingWorkspaceResult, qt as IssueClearable, r as MissingTokenError, ra as RawProviderEntry, ri as WikiInspection, rn as IssueSearchFilter, rr as Projects, rt as CredentialsInspection, s as isMulti, sa as RepoProperties, si as WikiProbe, sn as LabelDef, sr as PullRequestChecksState, st as DeployScriptResult, t as CARDINALITY, ta as OrgConfig, ti as WebhookDashboardInfo, tn as IssuePriority, tr as PagesConfig, tt as CreateAuthUserInput, u as Auth, ua as RepoSecretsDeploy, ui as WikiPublishedState, un as Logs, ur as PullRequestLink, ut as DeploymentProjectSettings, v as BoardItem, va as ResolvedTuple, vi as deriveStack, vn as MonitoringAssertionComparison, vr as SecretAccess, vt as DnsRecordRequest, w as BoardStatus, wa as EnvironmentLayer, wi as StackName, wn as MonitoringHeartbeatInput, wr as SourceBranch, wt as EnsureRelayResult, x as BoardPullRequestChecks, xa as TaskEntryConfig, xi as DeriveProfileInput, xn as MonitoringCheckInput, xr as Secrets, xt as EmojiCheck, y as BoardItemInput, ya as SingleEntry, yi as missingCapabilities, yn as MonitoringAssertionSource, yr as SecretScope, yt as DnsRecordType, z as CiRunStatus, zi as AgentOptions, zn as NotificationsEveryoneLayout, zr as ToolingExportIssue, zt as ExportInfo } from "./index-D2xS12Vc.mjs";
2
2
  import { AuthError, ResolveTokenConfig as ResolveTokenConfig$1, ResolveTokenInput, ResolveTokenInput as ResolveTokenInput$1, resolveValue } from "@theholocron/kyber/secrets";
3
3
  import { DocsCoverageMode } from "@theholocron/astromech";
4
4
  import { CheckRow } from "@theholocron/kyber/ui";
@@ -658,6 +658,48 @@ export declare const CANONICAL_LABELS: readonly [{
658
658
  readonly color: "ffffff";
659
659
  readonly description: "Won't be addressed";
660
660
  }];
661
+ /**
662
+ * The area a title scope means, by `repo.labels.scopes` (spec `tech-github-area-labels`): `sentinel` gives the area it is
663
+ * mapped to. The scope is matched without regard to case; a scope the map does not name, or a repo with no map, gives
664
+ * `undefined`. It is the area's name, not its label: `areaLabelsForTitle()` adds the prefix.
665
+ */
666
+ export declare function areaForScope(scope: string, scopes: Record<string, string> | undefined): string | undefined;
667
+ /** The colour of every area label: one family, one colour (spec `tech-github-area-labels`). */
668
+ export declare const AREA_LABEL_COLOR = "c5def5";
669
+ /**
670
+ * The labels `holocron setup` makes for the areas a repo declares: `area:<name>`, the one family colour and the
671
+ * description `Changes under <paths>` from the area's own (not excluded) patterns, cut to GitHub's 100 characters. They
672
+ * are never part of `CANONICAL_LABELS`: an area names this repo's folders, so another repo has none of them.
673
+ */
674
+ export declare function areaLabelDefs(areas: Record<string, string[]> | undefined): LabelDef[];
675
+ /**
676
+ * The `area:<name>` labels a set of changed paths earns, in the order the areas are declared (spec
677
+ * `tech-github-area-labels`). An area's patterns are the ones in `repo.labels.areas`; one starting with `!` takes a path
678
+ * out of the area (`docs/**` with `!docs/wiki/**`), so a path is in an area when some pattern includes it and none
679
+ * excludes it. A path in no area earns nothing, which is right, not a failure. This is the one mapping from changed
680
+ * folders to labels in the CLI; Sentinel's `planAreaLabels()` is meant to agree with it.
681
+ */
682
+ export declare function areaLabelsForFiles(files: readonly string[], areas: Record<string, string[]> | undefined): string[];
683
+ /**
684
+ * The `area:<name>` labels the scopes of an issue's title earn, through `repo.labels.scopes` (spec
685
+ * `tech-github-area-labels`): `feat(sentinel): ...` gives `["area:sentinel"]`. An issue has no changed files, so this is
686
+ * its only source of an area. A title with no scope, or a scope the map does not name, earns nothing; the same area
687
+ * from two scopes is given once, in the order of the title.
688
+ */
689
+ export declare function areaLabelsForTitle(title: string, scopes: Record<string, string> | undefined): string[];
690
+ /** The prefix of an area label (spec `tech-github-area-labels`): `area:cli`. */
691
+ export declare const AREA_PREFIX = "area:";
692
+ /**
693
+ * Whether a repository path (forward slashes, from the root) matches one pattern of `repo.labels.areas`. A pattern with
694
+ * a `*` or `?` is a glob (`cli/**`, `docs/**` then `/*.md`); one without is a file (`turbo.json`) or a folder and
695
+ * everything under it (`.holocron`, `.holocron/`).
696
+ */
697
+ export declare function pathMatches(path: string, pattern: string): boolean;
698
+ /**
699
+ * The scopes of a Conventional Commit title: `feat(sentinel): ...` gives `["sentinel"]`, `fix(cli, docs)!: ...` gives
700
+ * `["cli", "docs"]`. A title with no scope, or that is not in the `type(scope): subject` form, gives none.
701
+ */
702
+ export declare function titleScopes(title: string): string[];
661
703
  /** What one token must carry in one layer, as `tokenExpectations()` reads it from a plugin's `PluginToken.expect`. */
662
704
  interface LayerTokenExpectation {
663
705
  /** The token's plugin environment variable (`PluginToken.envName`), its identity in the plugin's list. */
package/dist/index.mjs CHANGED
@@ -1,5 +1,5 @@
1
1
  import { CARDINALITY, ElevationRequiredError, MissingTokenError, ProviderApiError, REQUIRED_CAPABILITIES, WebhookVerificationError, isMulti } from "./plugin/capabilities.mjs";
2
- import { a as placeAreas, c as ConfigError, d as resolveEntry, f as resolvePluginPackage, g as layerEnvironment, h as isEnvironmentLayer, i as loadConfig, l as credentialsEnvironment, m as ENVIRONMENT_LAYERS, n as compose, o as HOLOCRON_AREAS, p as repoSlug, r as defineConfig, s as SHARED_AREAS, t as ConfigFileError, u as resolveConfig } from "./config-system-BqX0yRVh.mjs";
2
+ import { a as placeAreas, c as ConfigError, d as resolveEntry, f as resolvePluginPackage, g as layerEnvironment, h as isEnvironmentLayer, i as loadConfig, l as credentialsEnvironment, m as ENVIRONMENT_LAYERS, n as compose, o as HOLOCRON_AREAS, p as repoSlug, r as defineConfig, s as SHARED_AREAS, t as ConfigFileError, u as resolveConfig } from "./config-system-s8z09jI0.mjs";
3
3
  import { Entry, findCredentials } from "@napi-rs/keyring";
4
4
  import { AuthError, createFeatureResolver as createFeatureResolver$1, createKeyring, createResolveToken as createResolveToken$1, resolveValue } from "@theholocron/kyber/secrets";
5
5
  import { DOCUMENTATION_FLAG, codecovFlagNames, readWorkspacePackages } from "@theholocron/astromech";
@@ -1004,6 +1004,113 @@ const CANONICAL_LABELS = [
1004
1004
  description: "Won't be addressed"
1005
1005
  }
1006
1006
  ];
1007
+ // src/area-labels/area-for-scope/area-for-scope.ts
1008
+ /**
1009
+ * The area a title scope means, by `repo.labels.scopes` (spec `tech-github-area-labels`): `sentinel` gives the area it is
1010
+ * mapped to. The scope is matched without regard to case; a scope the map does not name, or a repo with no map, gives
1011
+ * `undefined`. It is the area's name, not its label: `areaLabelsForTitle()` adds the prefix.
1012
+ */
1013
+ function areaForScope(scope, scopes) {
1014
+ const wanted = scope.trim().toLowerCase();
1015
+ for (const [name, area] of Object.entries(scopes ?? {})) if (name.toLowerCase() === wanted) return area;
1016
+ }
1017
+ // src/area-labels/area-prefix/area-prefix.ts
1018
+ /** The prefix of an area label (spec `tech-github-area-labels`): `area:cli`. */
1019
+ const AREA_PREFIX = "area:";
1020
+ // src/area-labels/area-label-defs/area-label-defs.ts
1021
+ /** The colour of every area label: one family, one colour (spec `tech-github-area-labels`). */
1022
+ const AREA_LABEL_COLOR = "c5def5";
1023
+ /** GitHub refuses a label description longer than this. */
1024
+ const MAX_DESCRIPTION = 100;
1025
+ /**
1026
+ * The labels `holocron setup` makes for the areas a repo declares: `area:<name>`, the one family colour and the
1027
+ * description `Changes under <paths>` from the area's own (not excluded) patterns, cut to GitHub's 100 characters. They
1028
+ * are never part of `CANONICAL_LABELS`: an area names this repo's folders, so another repo has none of them.
1029
+ */
1030
+ function areaLabelDefs(areas) {
1031
+ return Object.entries(areas ?? {}).map(([name, patterns]) => {
1032
+ const text = `Changes under ${patterns.filter((p) => !p.startsWith("!")).join(", ")}`;
1033
+ const description = text.length > MAX_DESCRIPTION ? `${text.slice(0, 99)}…` : text;
1034
+ return {
1035
+ name: `${AREA_PREFIX}${name}`,
1036
+ color: AREA_LABEL_COLOR,
1037
+ description
1038
+ };
1039
+ });
1040
+ }
1041
+ // src/area-labels/path-matches/path-matches.ts
1042
+ /** Turns one glob into the expression a whole path must match: `**` crosses folders, `*` and `?` stay in one. */
1043
+ function globToRegExp(glob) {
1044
+ let out = "";
1045
+ for (let i = 0; i < glob.length; i++) {
1046
+ const c = glob.charAt(i);
1047
+ if (c === "*") {
1048
+ if (glob.charAt(i + 1) === "*") {
1049
+ const slash = glob.charAt(i + 2) === "/";
1050
+ out += slash ? "(?:.*/)?" : ".*";
1051
+ i += slash ? 2 : 1;
1052
+ } else out += "[^/]*";
1053
+ } else if (c === "?") out += "[^/]";
1054
+ else out += c.replace(/[.+^${}()|[\]\\]/g, "\\$&");
1055
+ }
1056
+ return new RegExp(`^${out}$`);
1057
+ }
1058
+ /**
1059
+ * Whether a repository path (forward slashes, from the root) matches one pattern of `repo.labels.areas`. A pattern with
1060
+ * a `*` or `?` is a glob (`cli/**`, `docs/**` then `/*.md`); one without is a file (`turbo.json`) or a folder and
1061
+ * everything under it (`.holocron`, `.holocron/`).
1062
+ */
1063
+ function pathMatches(path, pattern) {
1064
+ const clean = path.replace(/^\.?\//, "");
1065
+ if (/[*?]/.test(pattern)) return globToRegExp(pattern.replace(/^\.?\//, "")).test(clean);
1066
+ const plain = pattern.replace(/^\.?\//, "").replace(/\/+$/, "");
1067
+ return clean === plain || clean.startsWith(`${plain}/`);
1068
+ }
1069
+ // src/area-labels/area-labels-for-files/area-labels-for-files.ts
1070
+ /**
1071
+ * The `area:<name>` labels a set of changed paths earns, in the order the areas are declared (spec
1072
+ * `tech-github-area-labels`). An area's patterns are the ones in `repo.labels.areas`; one starting with `!` takes a path
1073
+ * out of the area (`docs/**` with `!docs/wiki/**`), so a path is in an area when some pattern includes it and none
1074
+ * excludes it. A path in no area earns nothing, which is right, not a failure. This is the one mapping from changed
1075
+ * folders to labels in the CLI; Sentinel's `planAreaLabels()` is meant to agree with it.
1076
+ */
1077
+ function areaLabelsForFiles(files, areas) {
1078
+ const labels = [];
1079
+ for (const [name, patterns] of Object.entries(areas ?? {})) {
1080
+ const include = patterns.filter((p) => !p.startsWith("!"));
1081
+ const exclude = patterns.filter((p) => p.startsWith("!")).map((p) => p.slice(1));
1082
+ if (files.some((file) => include.some((p) => pathMatches(file, p)) && !exclude.some((p) => pathMatches(file, p)))) labels.push(`${AREA_PREFIX}${name}`);
1083
+ }
1084
+ return labels;
1085
+ }
1086
+ // src/area-labels/title-scopes/title-scopes.ts
1087
+ const TITLE = /^\s*[A-Za-z]+(?:\(([^)]*)\))?!?:/;
1088
+ /**
1089
+ * The scopes of a Conventional Commit title: `feat(sentinel): ...` gives `["sentinel"]`, `fix(cli, docs)!: ...` gives
1090
+ * `["cli", "docs"]`. A title with no scope, or that is not in the `type(scope): subject` form, gives none.
1091
+ */
1092
+ function titleScopes(title) {
1093
+ const scope = TITLE.exec(title)?.[1];
1094
+ if (scope === void 0) return [];
1095
+ return scope.split(",").map((s) => s.trim()).filter((s) => s !== "");
1096
+ }
1097
+ // src/area-labels/area-labels-for-title/area-labels-for-title.ts
1098
+ /**
1099
+ * The `area:<name>` labels the scopes of an issue's title earn, through `repo.labels.scopes` (spec
1100
+ * `tech-github-area-labels`): `feat(sentinel): ...` gives `["area:sentinel"]`. An issue has no changed files, so this is
1101
+ * its only source of an area. A title with no scope, or a scope the map does not name, earns nothing; the same area
1102
+ * from two scopes is given once, in the order of the title.
1103
+ */
1104
+ function areaLabelsForTitle(title, scopes) {
1105
+ const labels = [];
1106
+ for (const scope of titleScopes(title)) {
1107
+ const area = areaForScope(scope, scopes);
1108
+ if (area === void 0) continue;
1109
+ const label = `${AREA_PREFIX}${area}`;
1110
+ if (!labels.includes(label)) labels.push(label);
1111
+ }
1112
+ return labels;
1113
+ }
1007
1114
  // src/commands/token-rotation/token-rotation.ts
1008
1115
  /** The rotation policy of a token that declares none: a token is due after 90 days, and an expiry is flagged 14 days ahead. */
1009
1116
  const DEFAULT_TOKEN_ROTATION = {
@@ -1175,4 +1282,4 @@ function resolveCredentialsFile(base, file, makeDir = (dir) => void mkdirSync(di
1175
1282
  isDefault: true
1176
1283
  };
1177
1284
  }
1178
- export { AuthError, BUILTIN_TEMPLATES, CANONICAL_LABELS, CARDINALITY, CUSTOM_EMOJI, ConfigError, ConfigFileError, DEFAULT_TEMPLATES_DIR, DEFAULT_TOKEN_ROTATION, EMOJI_MEDIA_DIR, ElevationRequiredError, HOLOCRON_AREAS, KNOWN_STACK_DEPS, MAX_EMOJI_BYTES, MissingTokenError, PRIVATE_CREDENTIALS_FILE, ProviderApiError, REQUIRED_CAPABILITIES, SHARED_AREAS, WebhookVerificationError, compose, connectionProbe, coverageExpectations, createFeatureResolver, createResolveToken, createRestClient, credentialsEnvironment, defineConfig, deriveCapabilities, deriveCompliance, deriveProfile, deriveStack, emojiConflictProblem, ignoreAdvice, isMulti, keyring, layoutEmojis, layoutReactions, loadConfig, loadEmojiImage, missingCapabilities, orderKeys, parseReaction, pickByCreation, placeAreas, planPullRequestStatus, planReconcile, reactionProblem, reactionSpelling, readKeysLimited, readLinks, readWorkspacePackageJsons, reportProgress, resolveConfig, resolveCredentialsFile, resolveEntry, resolveEnvironmentId, resolvePluginPackage, resolveProjectOptions, resolveValue, roleTeamProblem, sourceProblem, stdoutKind, syncRoles, tagEmojiProblem, tokenExpectations, tokenRotationRows };
1285
+ export { AREA_LABEL_COLOR, AREA_PREFIX, AuthError, BUILTIN_TEMPLATES, CANONICAL_LABELS, CARDINALITY, CUSTOM_EMOJI, ConfigError, ConfigFileError, DEFAULT_TEMPLATES_DIR, DEFAULT_TOKEN_ROTATION, EMOJI_MEDIA_DIR, ElevationRequiredError, HOLOCRON_AREAS, KNOWN_STACK_DEPS, MAX_EMOJI_BYTES, MissingTokenError, PRIVATE_CREDENTIALS_FILE, ProviderApiError, REQUIRED_CAPABILITIES, SHARED_AREAS, WebhookVerificationError, areaForScope, areaLabelDefs, areaLabelsForFiles, areaLabelsForTitle, compose, connectionProbe, coverageExpectations, createFeatureResolver, createResolveToken, createRestClient, credentialsEnvironment, defineConfig, deriveCapabilities, deriveCompliance, deriveProfile, deriveStack, emojiConflictProblem, ignoreAdvice, isMulti, keyring, layoutEmojis, layoutReactions, loadConfig, loadEmojiImage, missingCapabilities, orderKeys, parseReaction, pathMatches, pickByCreation, placeAreas, planPullRequestStatus, planReconcile, reactionProblem, reactionSpelling, readKeysLimited, readLinks, readWorkspacePackageJsons, reportProgress, resolveConfig, resolveCredentialsFile, resolveEntry, resolveEnvironmentId, resolvePluginPackage, resolveProjectOptions, resolveValue, roleTeamProblem, sourceProblem, stdoutKind, syncRoles, tagEmojiProblem, titleScopes, tokenExpectations, tokenRotationRows };
@@ -1,2 +1,2 @@
1
- import { $ as CoverageUploadInput, $n as NotificationsWelcomeLayout, $r as Tunnels, $t as IssueOrder, A as Cache, An as MonitoringStatusPageResult, Ar as StatusCategory, At as EnsuredTunnel, B as ConnectionStringOptions, Bn as NotificationsForumTag, Br as ToolingExportResult, Bt as IdeaRecord, C as BoardState, Cn as MonitoringDashboardState, Cr as Source, Ct as EnsureRelayInput, D as BoardTemplate, Dn as MonitoringHttpMethod, Dr as SourceRulesetDetail, Dt as EnsureWebhookResult, E as BoardSummary, En as MonitoringHeartbeatUnit, Er as SourceRepoInfo, Et as EnsureResult, F as CardinalityFor, Fn as NotificationsAccess, Fr as TeamPermission, Ft as Errors, G as CoverageExpectations, Gn as NotificationsOnboardingLayout, Gr as ToolingWorkspaceFile, Gt as InspectRelayInput, H as CoverageConfigComponent, Hn as NotificationsLinksLayout, Hr as ToolingOpenLaunch, Ht as ImportOptions, I as Ci, In as NotificationsApplicationLayout, Ir as Tooling, It as ErrorsInspection, J as CoverageStatusContext, Jn as NotificationsPrsFeed, Jr as ToolingWorkspaceSide, Jt as IssueComment, K as CoverageNameDiff, Kn as NotificationsPicture, Kr as ToolingWorkspaceInput, Kt as Issue, L as CiRun, Ln as NotificationsChannelLayout, Lr as ToolingDoctorReport, Lt as ErrorsOrgState, M as CapabilityImpls, Mn as MoveReport, Mr as StorageBranch, Mt as EnvironmentEntry, N as CapabilityKey, Nn as NormalizedAuthUser, Nr as SyncResult, Nt as EnvironmentReviewer, O as BoardTemplateFile, On as MonitoringStatusComponentInput, Or as SourceSecurity, Ot as EnsuredDiscussion, P as Cardinality, Pn as Notifications, Pr as TeamEntry, Pt as Environments, Q as CoverageUploadGroup, Qn as NotificationsSignedIn, Qr as TunnelRoute, Qt as IssueKind, R as CiRunFilter, Rn as NotificationsDelivery, Rr as ToolingExportInput, Rt as ErrorsProjectState, S as BoardRule, Sn as MonitoringDashboardInput, Sr as ServerInspection, St as EnsureDiscussionInput, T as BoardStatusCategory, Tn as MonitoringHeartbeatResult, Tr as SourceFile, Tt as EnsureReport, U as CoverageConfigDocumentation, Un as NotificationsMember, Ur as ToolingOpenPlan, Ut as ImportResult, V as Coverage, Vn as NotificationsLayout, Vr as ToolingOpenInput, Vt as Ideas, W as CoverageConfigInput, Wn as NotificationsMonitoringFeed, Wr as ToolingOpenWant, Wt as InspectErrorsInput, X as CoverageTokenCheck, Xn as NotificationsServerLayout, Xr as TrackerDoctorReport, Xt as IssueEffort, Y as CoverageStatusInput, Yn as NotificationsReaction, Yr as ToolingWorkspaceState, Yt as IssueCreateInput, Z as CoverageUploadFlagResult, Zn as NotificationsSignIn, Zr as TrackerUser, Zt as IssueFields, _ as BoardFieldType, _n as MonitoringAssertion, _r as Ruleset, _t as DnsRecord, a as REQUIRED_CAPABILITIES, ai as WikiNavigationState, an as IssueUpdateResult, ar as PullRequest, at as DeployFunctionResult, b as BoardPullRequest, bn as MonitoringCheck, br as SecretVisibility, bt as DuplicateDiscussion, c as AddedItem, ci as WikiProvisionOpts, cn as LifecycleResult, cr as PullRequestFields, ct as Deployment, d as AuthDescription, di as WorkerDeploymentState, dn as LogsDataset, dr as PullRequestPatch, dt as DeploymentRecord, ei as Vault, en as IssuePatch, er as OrganizationSecretScope, et as CoverageUploadResult, f as AuthEvent, fi as WorkerScriptState, fn as Monitoring, fr as PullRequestResult, ft as DeploymentTarget, g as BoardField, gn as MonitoringAlertSettings, gr as ResolvedCapability, gt as Dns, h as AuthUser, hn as MonitoringAlertChannelState, hr as RepoSettings, ht as DiscussionPost, i as ProviderApiError, ii as WikiInstanceState, in as IssueSelector, ir as ProviderIdentity, it as DeployFunctionConfig, j as CacheTokenCheck, jn as MonitoringStatusPageState, jr as Storage, jt as Environment, k as BoardView, kn as MonitoringStatusPageInput, kr as SourceTeamMember, kt as EnsuredResource, l as Analytics, li as WikiProxyConfig, ln as LifecycleSlot, lr as PullRequestInput, lt as DeploymentProject, m as AuthIdentity, mn as MonitoringAlertChannelResult, mr as RepoRef, mt as DiscussionPatch, n as ElevationRequiredError, ni as Wiki, nn as IssueRecord, nr as ParseWebhookInput, nt as Credentials, o as WebhookVerificationError, oi as WikiOrganizationState, on as Issues, or as PullRequestChecks, ot as DeployScriptConfig, p as AuthEventType, pi as Workers, pn as MonitoringAlertChannelInput, pr as RelayState, pt as DeploymentTrigger, q as CoverageRepoReport, qn as NotificationsPinnedLayout, qr as ToolingWorkspaceResult, qt as IssueClearable, r as MissingTokenError, ri as WikiInspection, rn as IssueSearchFilter, rr as Projects, rt as CredentialsInspection, s as isMulti, si as WikiProbe, sn as LabelDef, sr as PullRequestChecksState, st as DeployScriptResult, t as CARDINALITY, ti as WebhookDashboardInfo, tn as IssuePriority, tr as PagesConfig, tt as CreateAuthUserInput, u as Auth, ui as WikiPublishedState, un as Logs, ur as PullRequestLink, ut as DeploymentProjectSettings, v as BoardItem, vn as MonitoringAssertionComparison, vr as SecretAccess, vt as DnsRecordRequest, w as BoardStatus, wn as MonitoringHeartbeatInput, wr as SourceBranch, wt as EnsureRelayResult, x as BoardPullRequestChecks, xn as MonitoringCheckInput, xr as Secrets, xt as EmojiCheck, y as BoardItemInput, yn as MonitoringAssertionSource, yr as SecretScope, yt as DnsRecordType, z as CiRunStatus, zn as NotificationsEveryoneLayout, zr as ToolingExportIssue, zt as ExportInfo } from "../index-CquSWZ_0.mjs";
1
+ import { $ as CoverageUploadInput, $n as NotificationsWelcomeLayout, $r as Tunnels, $t as IssueOrder, A as Cache, An as MonitoringStatusPageResult, Ar as StatusCategory, At as EnsuredTunnel, B as ConnectionStringOptions, Bn as NotificationsForumTag, Br as ToolingExportResult, Bt as IdeaRecord, C as BoardState, Cn as MonitoringDashboardState, Cr as Source, Ct as EnsureRelayInput, D as BoardTemplate, Dn as MonitoringHttpMethod, Dr as SourceRulesetDetail, Dt as EnsureWebhookResult, E as BoardSummary, En as MonitoringHeartbeatUnit, Er as SourceRepoInfo, Et as EnsureResult, F as CardinalityFor, Fn as NotificationsAccess, Fr as TeamPermission, Ft as Errors, G as CoverageExpectations, Gn as NotificationsOnboardingLayout, Gr as ToolingWorkspaceFile, Gt as InspectRelayInput, H as CoverageConfigComponent, Hn as NotificationsLinksLayout, Hr as ToolingOpenLaunch, Ht as ImportOptions, I as Ci, In as NotificationsApplicationLayout, Ir as Tooling, It as ErrorsInspection, J as CoverageStatusContext, Jn as NotificationsPrsFeed, Jr as ToolingWorkspaceSide, Jt as IssueComment, K as CoverageNameDiff, Kn as NotificationsPicture, Kr as ToolingWorkspaceInput, Kt as Issue, L as CiRun, Ln as NotificationsChannelLayout, Lr as ToolingDoctorReport, Lt as ErrorsOrgState, M as CapabilityImpls, Mn as MoveReport, Mr as StorageBranch, Mt as EnvironmentEntry, N as CapabilityKey, Nn as NormalizedAuthUser, Nr as SyncResult, Nt as EnvironmentReviewer, O as BoardTemplateFile, On as MonitoringStatusComponentInput, Or as SourceSecurity, Ot as EnsuredDiscussion, P as Cardinality, Pn as Notifications, Pr as TeamEntry, Pt as Environments, Q as CoverageUploadGroup, Qn as NotificationsSignedIn, Qr as TunnelRoute, Qt as IssueKind, R as CiRunFilter, Rn as NotificationsDelivery, Rr as ToolingExportInput, Rt as ErrorsProjectState, S as BoardRule, Sn as MonitoringDashboardInput, Sr as ServerInspection, St as EnsureDiscussionInput, T as BoardStatusCategory, Tn as MonitoringHeartbeatResult, Tr as SourceFile, Tt as EnsureReport, U as CoverageConfigDocumentation, Un as NotificationsMember, Ur as ToolingOpenPlan, Ut as ImportResult, V as Coverage, Vn as NotificationsLayout, Vr as ToolingOpenInput, Vt as Ideas, W as CoverageConfigInput, Wn as NotificationsMonitoringFeed, Wr as ToolingOpenWant, Wt as InspectErrorsInput, X as CoverageTokenCheck, Xn as NotificationsServerLayout, Xr as TrackerDoctorReport, Xt as IssueEffort, Y as CoverageStatusInput, Yn as NotificationsReaction, Yr as ToolingWorkspaceState, Yt as IssueCreateInput, Z as CoverageUploadFlagResult, Zn as NotificationsSignIn, Zr as TrackerUser, Zt as IssueFields, _ as BoardFieldType, _n as MonitoringAssertion, _r as Ruleset, _t as DnsRecord, a as REQUIRED_CAPABILITIES, ai as WikiNavigationState, an as IssueUpdateResult, ar as PullRequest, at as DeployFunctionResult, b as BoardPullRequest, bn as MonitoringCheck, br as SecretVisibility, bt as DuplicateDiscussion, c as AddedItem, ci as WikiProvisionOpts, cn as LifecycleResult, cr as PullRequestFields, ct as Deployment, d as AuthDescription, di as WorkerDeploymentState, dn as LogsDataset, dr as PullRequestPatch, dt as DeploymentRecord, ei as Vault, en as IssuePatch, er as OrganizationSecretScope, et as CoverageUploadResult, f as AuthEvent, fi as WorkerScriptState, fn as Monitoring, fr as PullRequestResult, ft as DeploymentTarget, g as BoardField, gn as MonitoringAlertSettings, gr as ResolvedCapability, gt as Dns, h as AuthUser, hn as MonitoringAlertChannelState, hr as RepoSettings, ht as DiscussionPost, i as ProviderApiError, ii as WikiInstanceState, in as IssueSelector, ir as ProviderIdentity, it as DeployFunctionConfig, j as CacheTokenCheck, jn as MonitoringStatusPageState, jr as Storage, jt as Environment, k as BoardView, kn as MonitoringStatusPageInput, kr as SourceTeamMember, kt as EnsuredResource, l as Analytics, li as WikiProxyConfig, ln as LifecycleSlot, lr as PullRequestInput, lt as DeploymentProject, m as AuthIdentity, mn as MonitoringAlertChannelResult, mr as RepoRef, mt as DiscussionPatch, n as ElevationRequiredError, ni as Wiki, nn as IssueRecord, nr as ParseWebhookInput, nt as Credentials, o as WebhookVerificationError, oi as WikiOrganizationState, on as Issues, or as PullRequestChecks, ot as DeployScriptConfig, p as AuthEventType, pi as Workers, pn as MonitoringAlertChannelInput, pr as RelayState, pt as DeploymentTrigger, q as CoverageRepoReport, qn as NotificationsPinnedLayout, qr as ToolingWorkspaceResult, qt as IssueClearable, r as MissingTokenError, ri as WikiInspection, rn as IssueSearchFilter, rr as Projects, rt as CredentialsInspection, s as isMulti, si as WikiProbe, sn as LabelDef, sr as PullRequestChecksState, st as DeployScriptResult, t as CARDINALITY, ti as WebhookDashboardInfo, tn as IssuePriority, tr as PagesConfig, tt as CreateAuthUserInput, u as Auth, ui as WikiPublishedState, un as Logs, ur as PullRequestLink, ut as DeploymentProjectSettings, v as BoardItem, vn as MonitoringAssertionComparison, vr as SecretAccess, vt as DnsRecordRequest, w as BoardStatus, wn as MonitoringHeartbeatInput, wr as SourceBranch, wt as EnsureRelayResult, x as BoardPullRequestChecks, xn as MonitoringCheckInput, xr as Secrets, xt as EmojiCheck, y as BoardItemInput, yn as MonitoringAssertionSource, yr as SecretScope, yt as DnsRecordType, z as CiRunStatus, zn as NotificationsEveryoneLayout, zr as ToolingExportIssue, zt as ExportInfo } from "../index-D2xS12Vc.mjs";
2
2
  export { AddedItem, Analytics, Auth, AuthDescription, AuthEvent, AuthEventType, AuthIdentity, AuthUser, BoardField, BoardFieldType, BoardItem, BoardItemInput, BoardPullRequest, BoardPullRequestChecks, BoardRule, BoardState, BoardStatus, BoardStatusCategory, BoardSummary, BoardTemplate, BoardTemplateFile, BoardView, CARDINALITY, Cache, CacheTokenCheck, CapabilityImpls, CapabilityKey, Cardinality, CardinalityFor, Ci, CiRun, CiRunFilter, CiRunStatus, ConnectionStringOptions, Coverage, CoverageConfigComponent, CoverageConfigDocumentation, CoverageConfigInput, CoverageExpectations, CoverageNameDiff, CoverageRepoReport, CoverageStatusContext, CoverageStatusInput, CoverageTokenCheck, CoverageUploadFlagResult, CoverageUploadGroup, CoverageUploadInput, CoverageUploadResult, CreateAuthUserInput, Credentials, CredentialsInspection, DeployFunctionConfig, DeployFunctionResult, DeployScriptConfig, DeployScriptResult, Deployment, DeploymentProject, DeploymentProjectSettings, DeploymentRecord, DeploymentTarget, DeploymentTrigger, DiscussionPatch, DiscussionPost, Dns, DnsRecord, DnsRecordRequest, DnsRecordType, DuplicateDiscussion, ElevationRequiredError, EmojiCheck, EnsureDiscussionInput, EnsureRelayInput, EnsureRelayResult, EnsureReport, EnsureResult, EnsureWebhookResult, EnsuredDiscussion, EnsuredResource, EnsuredTunnel, Environment, EnvironmentEntry, EnvironmentReviewer, Environments, Errors, ErrorsInspection, ErrorsOrgState, ErrorsProjectState, ExportInfo, IdeaRecord, Ideas, ImportOptions, ImportResult, InspectErrorsInput, InspectRelayInput, Issue, IssueClearable, IssueComment, IssueCreateInput, IssueEffort, IssueFields, IssueKind, IssueOrder, IssuePatch, IssuePriority, IssueRecord, IssueSearchFilter, IssueSelector, IssueUpdateResult, Issues, LabelDef, LifecycleResult, LifecycleSlot, Logs, LogsDataset, MissingTokenError, Monitoring, MonitoringAlertChannelInput, MonitoringAlertChannelResult, MonitoringAlertChannelState, MonitoringAlertSettings, MonitoringAssertion, MonitoringAssertionComparison, MonitoringAssertionSource, MonitoringCheck, MonitoringCheckInput, MonitoringDashboardInput, MonitoringDashboardState, MonitoringHeartbeatInput, MonitoringHeartbeatResult, MonitoringHeartbeatUnit, MonitoringHttpMethod, MonitoringStatusComponentInput, MonitoringStatusPageInput, MonitoringStatusPageResult, MonitoringStatusPageState, MoveReport, NormalizedAuthUser, Notifications, NotificationsAccess, NotificationsApplicationLayout, NotificationsChannelLayout, NotificationsDelivery, NotificationsEveryoneLayout, NotificationsForumTag, NotificationsLayout, NotificationsLinksLayout, NotificationsMember, NotificationsMonitoringFeed, NotificationsOnboardingLayout, NotificationsPicture, NotificationsPinnedLayout, NotificationsPrsFeed, NotificationsReaction, NotificationsServerLayout, NotificationsSignIn, NotificationsSignedIn, NotificationsWelcomeLayout, OrganizationSecretScope, PagesConfig, ParseWebhookInput, Projects, ProviderApiError, ProviderIdentity, PullRequest, PullRequestChecks, PullRequestChecksState, PullRequestFields, PullRequestInput, PullRequestLink, PullRequestPatch, PullRequestResult, REQUIRED_CAPABILITIES, RelayState, RepoRef, RepoSettings, ResolvedCapability, Ruleset, SecretAccess, SecretScope, SecretVisibility, Secrets, ServerInspection, Source, SourceBranch, SourceFile, SourceRepoInfo, SourceRulesetDetail, SourceSecurity, SourceTeamMember, StatusCategory, Storage, StorageBranch, SyncResult, TeamEntry, TeamPermission, Tooling, ToolingDoctorReport, ToolingExportInput, ToolingExportIssue, ToolingExportResult, ToolingOpenInput, ToolingOpenLaunch, ToolingOpenPlan, ToolingOpenWant, ToolingWorkspaceFile, ToolingWorkspaceInput, ToolingWorkspaceResult, ToolingWorkspaceSide, ToolingWorkspaceState, TrackerDoctorReport, TrackerUser, TunnelRoute, Tunnels, Vault, WebhookDashboardInfo, WebhookVerificationError, Wiki, WikiInspection, WikiInstanceState, WikiNavigationState, WikiOrganizationState, WikiProbe, WikiProvisionOpts, WikiProxyConfig, WikiPublishedState, WorkerDeploymentState, WorkerScriptState, Workers, isMulti };
@@ -1,4 +1,4 @@
1
- import { Ai as Capability, Ei as compose, ji as ComposedPreset } from "./index-CquSWZ_0.mjs";
1
+ import { Ai as Capability, Ei as compose, ji as ComposedPreset } from "./index-D2xS12Vc.mjs";
2
2
  /** Options for the audit capability. */
3
3
  interface AuditOptions {
4
4
  /** Enable Knip unused-export analysis (default: false). */
package/dist/presets.mjs CHANGED
@@ -1,4 +1,4 @@
1
- import { n as compose } from "./config-system-BqX0yRVh.mjs";
1
+ import { n as compose } from "./config-system-s8z09jI0.mjs";
2
2
  import { DEFAULT_ORG } from "@theholocron/astromech";
3
3
  // src/presets/capabilities/audit.ts
4
4
  /**
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@theholocron/cli",
3
- "version": "5.0.0-alpha.502",
3
+ "version": "5.0.0-alpha.503",
4
4
  "description": "The Holocron CLI - a pluggable, capability-based orchestrator for spinning up and operating software projects.",
5
5
  "keywords": [
6
6
  "cli",
@@ -59,19 +59,19 @@
59
59
  "posthog-node": "^5.74.0",
60
60
  "tsx": "4.23.15",
61
61
  "yargs": "^18.1.0",
62
- "@theholocron/dagobah": "5.0.0-alpha.502",
63
- "@theholocron/astromech": "5.0.0-alpha.502",
62
+ "@theholocron/astromech": "5.0.0-alpha.503",
63
+ "@theholocron/datapad": "5.0.0-alpha.503",
64
+ "@theholocron/dagobah": "5.0.0-alpha.503",
64
65
  "@theholocron/env-utils": "^1.17.0-alpha.5",
65
66
  "@theholocron/git-utils": "^1.17.0-alpha.5",
67
+ "@theholocron/github-client": "^1.58.0-alpha.46",
66
68
  "@theholocron/fs-utils": "^1.17.0-alpha.5",
67
- "@theholocron/github-client": "^1.58.0-alpha.45",
68
- "@theholocron/http-client": "^1.58.0-alpha.45",
69
- "@theholocron/kyber": "5.0.0-alpha.502",
70
- "@theholocron/misc-utils": "^1.17.0-alpha.5",
71
- "@theholocron/json-utils": "^1.17.0-alpha.5",
72
- "@theholocron/observability": "^0.7.0-alpha.5",
69
+ "@theholocron/http-client": "^1.58.0-alpha.46",
70
+ "@theholocron/kyber": "5.0.0-alpha.503",
73
71
  "@theholocron/pkg-utils": "^1.17.0-alpha.5",
74
- "@theholocron/datapad": "5.0.0-alpha.502"
72
+ "@theholocron/json-utils": "^1.17.0-alpha.5",
73
+ "@theholocron/misc-utils": "^1.17.0-alpha.5",
74
+ "@theholocron/observability": "^0.7.0-alpha.5"
75
75
  },
76
76
  "devDependencies": {
77
77
  "@types/node": "^26",