@theholocron/cli 5.0.0-alpha.44 → 5.0.0-alpha.440

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,697 +1,544 @@
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, 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, WikiProvisionOpts, WikiProxyConfig, Workers, isMulti } from "./plugin/capabilities.mjs";
2
- import { AuthError, RequestOptions, ResolveTokenConfig as ResolveTokenConfig$1, ResolveTokenInput, RestClient, RestClientConfig, createRestClient } from "@theholocron/http-client";
3
- import { ConfigFileError } from "@theholocron/datapad";
4
- import { WorkspacePackage } from "@theholocron/astromech";
5
- import { LogLevel } from "@theholocron/observability/core";
6
- //#region src/auth/auth-resolver.d.ts
7
- 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;
1
+ import { $ as DnsRecord, $n as WebhookDashboardInfo, $r as RepoSecretsSync, $t as NotificationsDelivery, A as Cardinality, An as Source, Ar as CapabilityConfigPackage, At as Issues, B as DeployFunctionConfig, Bn as SyncResult, Br as HolocronConfig, Bt as MonitoringAlertSettings, C as BoardStatusCategory, Cn as ResolvedCapability, Cr as TaskEntry, Ct as Issue, D as BoardView, Dn as SecretVisibility, Dr as resolveEntry, Dt as IssueRecord, E as BoardTemplateFile, En as SecretScope, Er as resolveConfig, Et as IssuePriority, F as CiRunStatus, Fn as SourceSecurity, Fr as DocsConfig, Ft as LogsDataset, G as DeploymentProject, Gn as ToolingExportInput, Gr as ProviderOptions, Gt as MonitoringCheckInput, H as DeployScriptConfig, Hn as TeamPermission, Hr as LogConfig, Ht as MonitoringAssertionComparison, I as ConnectionStringOptions, In as SourceTeamMember, Ir as DoctorConfig, It as Monitoring, J as DeploymentTarget, Jn as TrackerDoctorReport, Jr as RepoConfig, Jt as NormalizedAuthUser, K as DeploymentProjectSettings, Kn as ToolingExportIssue, Kr as RawProviderEntry, Kt as MonitoringHttpMethod, L as CreateAuthUserInput, Ln as StatusCategory, Lr as EnvConfig, Lt as MonitoringAlertChannelInput, M as Ci, Mn as SourceFile, Mr as CredentialsConfig, Mt as LifecycleResult, N as CiRun, Nn as SourceRepoInfo, Nr as DevConfig, Nt as LifecycleSlot, O as CapabilityImpls, On as Secrets, Or as resolvePluginPackage, Ot as IssueSearchFilter, P as CiRunFilter, Pn as SourceRulesetDetail, Pr as DevServeConfig, Pt as Logs, Q as Dns, Qn as Vault, Qr as RepoSecretsDeploy, Qt as NotificationsChannelLayout, R as Credentials, Rn as Storage, Rr as EslintConfig, Rt as MonitoringAlertChannelResult, S as BoardStatus, Sn as RepoSettings, Sr as ComposedPreset, St as InspectRelayInput, T as BoardTemplate, Tn as SecretAccess, Tr as credentialsEnvironment, Tt as IssueOrder, U as DeployScriptResult, Un as Tooling, Ur as MultiEntry, Ut as MonitoringAssertionSource, V as DeployFunctionResult, Vn as TeamEntry, Vr as IdeasConfig, Vt as MonitoringAssertion, W as Deployment, Wn as ToolingDoctorReport, Wr as OrgConfig, Wt as MonitoringCheck, X as DiscussionPatch, Xn as TunnelRoute, Xr as RepoProtection, Xt as NotificationsAccess, Y as DeploymentTrigger, Yn as TrackerUser, Yr as RepoProperties, Yt as Notifications, Z as DiscussionPost, Zn as Tunnels, Zr as RepoSecrets, Zt as NotificationsApplicationLayout, _ as BoardFieldType, _n as Projects, _r as compose, _t as ExportInfo, a as REQUIRED_CAPABILITIES, ai as ResolvedProvidersConfig, an as NotificationsMonitoringFeed, ar as KNOWN_STACK_DEPS, at as EnsureRelayResult, b as BoardRule, bn as RelayState, br as LoadedConfig, bt as ImportOptions, c as AddedItem, ci as StorybookDeployProject, cn as NotificationsPinnedLayout, cr as deriveProfile, ct as EnsureWebhookResult, d as AuthDescription, di as WorkflowWithConfig, dn as NotificationsSignIn, dr as readWorkspacePackageJsons, dt as EnsuredTunnel, ei as RepoValidationConfig, en as NotificationsEveryoneLayout, er as Wiki, et as DnsRecordRequest, f as AuthEvent, fi as EnvironmentLayer, fn as NotificationsSignedIn, fr as DeriveProfileInput, ft as Environment, g as BoardField, gn as ParseWebhookInput, gr as ConfigFileError, gt as Errors, h as AuthUser, hn as PagesConfig, hr as StackName, ht as Environments, i as ProviderApiError, ii as ResolvedProviderEntry, in as NotificationsMember, ir as Workers, it as EnsureRelayInput, j as CardinalityFor, jn as SourceBranch, jr as ChromaticProjectConfig, jt as LabelDef, k as CapabilityKey, kn as ServerInspection, kr as AppConfig, kt as IssueSelector, l as Analytics, li as TaskEntryConfig, ln as NotificationsPrsFeed, lr as deriveStack, lt as EnsuredDiscussion, m as AuthIdentity, mn as OrganizationSecretScope, mr as PackageJsonLike, mt as EnvironmentReviewer, n as ElevationRequiredError, ni as RepoVariablesSync, nn as NotificationsLayout, nr as WikiProxyConfig, nt as DuplicateDiscussion, o as WebhookVerificationError, oi as ResolvedTuple, on as NotificationsOnboardingLayout, or as deriveCapabilities, ot as EnsureReport, p as AuthEventType, pn as NotificationsWelcomeLayout, pr as HolocronProfile, pt as EnvironmentEntry, q as DeploymentRecord, qn as ToolingExportResult, qr as RawProvidersConfig, qt as MoveReport, r as MissingTokenError, ri as ResolvedHolocronConfig, rn as NotificationsLinksLayout, rr as WorkerScriptState, rt as EnsureDiscussionInput, s as isMulti, si as SingleEntry, sn as NotificationsPicture, sr as deriveCompliance, st as EnsureResult, t as CARDINALITY, ti as RepoVariables, tn as NotificationsForumTag, tr as WikiProvisionOpts, tt as DnsRecordType, u as Auth, ui as TelemetryConfig, un as NotificationsServerLayout, ur as missingCapabilities, ut as EnsuredResource, v as BoardItem, vn as ProviderIdentity, vr as defineConfig, vt as IdeaRecord, w as BoardSummary, wn as Ruleset, wr as ConfigError, wt as IssueComment, x as BoardState, xn as RepoRef, xr as Capability, xt as ImportResult, y as BoardItemInput, yn as PullRequest, yr as loadConfig, yt as Ideas, z as CredentialsInspection, zn as StorageBranch, zr as GitHubAppConfig, zt as MonitoringAlertChannelState } from "./index-Be9XH2dx.mjs";
2
+ import { AuthError, ResolveTokenConfig as ResolveTokenConfig$1, ResolveTokenInput, ResolveTokenInput as ResolveTokenInput$1, resolveValue } from "@theholocron/kyber/secrets";
3
+ import { CheckRow } from "@theholocron/kyber/ui";
4
+ import "@theholocron/env-utils/lookup";
5
+ import { RequestOptions, RestClient, RestClientConfig, createRestClient } from "@theholocron/http-client";
6
+ import "@theholocron/kyber/plugins";
7
+ import { GitExec } from "@theholocron/git-utils";
8
+ import { ConnectionProbeInput as ConnectionProbeInput$1 } from "@theholocron/kyber/checks";
9
+ import { Stats } from "node:fs";
10
+ import "@theholocron/observability/core";
11
+ import { ConfigDirArea } from "@theholocron/datapad";
12
+ /** A plugin's `verifyToken` result when the provider accepted the token. */
13
+ interface VerifyTokenSuccess {
14
+ /** Always `true` for an accepted token. */
15
+ ok: true;
16
+ /** "workplace: acme" / "user: cnewton@x" — surfaced in success output. */
17
+ subject: string;
18
+ /** When the token stops working, ISO 8601 in UTC, for a provider that reports it. Absent when unknown or never. */
19
+ expiresAt?: string;
20
+ }
21
+ /** A plugin's `verifyToken` result when the provider rejected the token. */
22
+ interface VerifyTokenFailure {
23
+ /** Always `false` for a rejected token. */
24
+ ok: false;
25
+ /** Reason the token was rejected. Surfaces to the operator. */
26
+ message: string;
27
+ }
28
+ /** What a plugin's `verifyToken` returns: the token was accepted, or it was rejected with a reason. */
29
+ type VerifyTokenResult = VerifyTokenSuccess | VerifyTokenFailure;
30
+ /** What a layer's token must do about a permission: `required` it must have it, `absent` it must not. */
31
+ type PermissionRule = "required" | "absent";
32
+ /**
33
+ * When a token is due for rotation (#2157). `maxAgeDays` is the longest a token may go unrotated; `warnDays` is how
34
+ * many days before an expiry the check starts to fail. Both default to `DEFAULT_TOKEN_ROTATION`.
35
+ */
36
+ interface TokenRotation {
37
+ /** The most days old a token may be, counted from when the provider says it was made (or became valid). */
38
+ maxAgeDays?: number;
39
+ /** Fail this many days before the token's own expiry, so it is rotated before it stops working. */
40
+ warnDays?: number;
41
+ }
42
+ /**
43
+ * What a token must carry, declared once next to the plugin's `tokens` list. The permission names are the plugin's own
44
+ * (Cloudflare: `pages`, `dns`); a layer's rules say which are `required` and which `absent`, so a laptop token might
45
+ * need everything while `ci` needs one permission and must have none of the rest.
46
+ */
47
+ interface TokenExpectation {
48
+ /**
49
+ * The layers that hold this token, for a token with no permission rules (a rotation-only check). Default: the layers
50
+ * `permissions` names. A layer in neither has no declared expectations.
51
+ */
52
+ layers?: readonly EnvironmentLayer[];
53
+ /** Per layer, each permission's rule. A layer named here holds the token. */
54
+ permissions?: Readonly<Partial<Record<EnvironmentLayer, Readonly<Record<string, PermissionRule>>>>>;
55
+ /** When the token is due for rotation, in every layer that holds it. Default: `DEFAULT_TOKEN_ROTATION`. */
56
+ rotation?: TokenRotation;
57
+ }
58
+ /** One token a plugin takes, and where it is looked up. */
59
+ interface PluginToken {
60
+ /** The plugin's own environment variable, e.g. `HOLOCRON_ADMIN_TOKEN`. */
61
+ envName: string;
62
+ /** The vendor's own environment variable, e.g. `CLOUDFLARE_API_TOKEN`; read after `envName` and before the keyring. */
63
+ vendorEnvName?: string;
64
+ /** The OS keyring entry, e.g. `github.admin`. */
65
+ keyringKey: string;
66
+ /**
67
+ * `false` when the plugin's `verifyToken` does not apply to this token (it checks a different credential, such as
68
+ * a webhook URL), so `holocron doctor secrets --verify` reports it as set without calling the plugin. Default `true`.
69
+ */
70
+ verifiable?: boolean;
71
+ /**
72
+ * How to check this token when the plugin's one `verifyToken` is for a different credential (the Discord bot token,
73
+ * where `verifyToken` checks a webhook). Wins over the plugin's `verifyToken`.
74
+ */
75
+ verify?: (token: string) => Promise<VerifyTokenResult>;
76
+ /**
77
+ * `true` when the plugin only falls back to this token: nothing needs it unless a call names no better source (the
78
+ * Discord webhook a post uses when it names no channel). The checks that expect every token a plugin lists, such as
79
+ * `holocron doctor secrets`, do not expect it, and `holocron export tokens` marks it as optional when it has none.
80
+ * Default `false`.
81
+ */
82
+ optional?: boolean;
83
+ /**
84
+ * Which layers hold this token and what it must and must not be able to do in each (#2149). One declaration that the
85
+ * token probes, the doctor and the docs check read through `tokenExpectations()`; see `TokenExpectation`.
86
+ */
87
+ expect?: TokenExpectation;
88
+ }
89
+ /** Options for a token resolver, without the keyring lookup, which the CLI supplies itself. */
90
+ type ResolveTokenConfig = Omit<ResolveTokenConfig$1, "keyring" | "orgEnvName">;
91
+ /** Settings for a feature-specific token resolver: which env var and keyring entry it reads. */
11
92
  interface FeatureResolverConfig {
12
93
  /** Env var name for this feature, e.g. `"HOLOCRON_ISSUES_TOKEN"`. */
13
94
  envName: string;
14
95
  /** Keyring account key, e.g. `"github.issues"`. */
15
96
  keyringKey: string;
97
+ /** The vendor named in the "no token" message. Default `GitHub`. */
98
+ vendor?: string;
16
99
  }
100
+ /** A resolver from `createFeatureResolver`: call it for the token, or read `token` to see where it looks. */
101
+ type FeatureResolver = ((input?: ResolveTokenInput$1) => string) & {
102
+ /** The environment variable and keyring entry this resolver reads, for `holocron doctor secrets --verify`. */
103
+ readonly token: PluginToken;
104
+ };
105
+ /** A resolver from `createResolveToken`: call it for the token, or read `token` to see where it looks. */
106
+ type TokenResolver = ((input?: ResolveTokenInput$1) => string) & {
107
+ /** The environment variables and keyring entry this resolver reads, for `holocron doctor secrets --verify`. */
108
+ readonly token: PluginToken;
109
+ };
17
110
  /**
18
- * Build a strict, single-feature token resolver.
19
- *
20
- * Resolution chain: `--token flag → envName env var → keyring(keyringKey)`.
21
- * No broad-token fallback — if the feature-specific token is absent the
22
- * operation fails with a message naming the exact env var to set.
23
- */
24
- declare function createFeatureResolver(config: FeatureResolverConfig): (input?: ResolveTokenInput) => string;
25
- //#endregion
26
- //#region src/auth/keyring.d.ts
27
- /**
28
- * Keyring-backed bootstrap credential store.
29
- *
30
- * Every holocron plugin's bootstrap token (the one it needs before it
31
- * can talk to its vendor's API) can be stored in the OS keyring under
32
- * a single reverse-DNS service scope. Managed via `holocron auth`
33
- * subcommands; consulted at position 4 in every plugin's auth
34
- * precedence chain (after --token / HOLOCRON_<X>_TOKEN / <native>_TOKEN).
35
- *
36
- * See `docs/wiki/specifications/tech-auth-bootstrap.spec.md` for the design rationale.
37
- *
38
- * Failure model: keyring access is best-effort. Platforms without a
39
- * supported credential store (some Linux CI images, sandboxed
40
- * environments) will throw from the underlying library. Every export
41
- * here catches and returns a null/empty result rather than propagating
42
- * — the plugin's precedence chain then falls through to
43
- * env-var-only paths, which is exactly how CI is meant to work.
111
+ * The holocron keyring: `get` answers `null` for "not stored" and for "keyring unavailable" alike, so callers fall
112
+ * through to env-var precedence, and remembers the answer for the process (`clearCache` forgets it); `set` and `delete`
113
+ * answer whether they did anything; `list` names the stored providers; `isAvailable` tells an outage from an empty keyring.
44
114
  */
115
+ export declare const keyring: import("@theholocron/kyber/secrets").Keyring;
45
116
  /**
46
- * Store or overwrite a bootstrap token for a provider. Returns true on
47
- * success, false when the underlying keyring is unsupported or errored.
117
+ * Kyber's `createResolveToken` with the keyring, the `HOLOCRON_ORG` variable and the `token` description
118
+ * `holocron doctor secrets --verify` reads filled in, so a plugin stays at a one-liner call site. The chain is the flag, the
119
+ * plugin's variable, the vendor's variable, the `credentials` providers' variables, the keyring.
48
120
  */
49
- declare function setToken(provider: string, token: string): boolean;
121
+ export declare function createResolveToken(config: ResolveTokenConfig): TokenResolver;
50
122
  /**
51
- * Read the bootstrap token for a provider. Returns `null` for both
52
- * "not stored" and "keyring unavailable" — callers can treat them the
53
- * same way (fall through to env-var precedence).
123
+ * Kyber's `createFeatureResolver` for a strict, single-feature token: the flag, the feature's variable, the
124
+ * `credentials` providers' variable of that name, the keyring. No broad-token fallback; if the feature's token is absent
125
+ * the operation fails with a message naming the exact variable to set and `holocron new token`.
54
126
  */
55
- declare function getToken(provider: string): string | null;
127
+ export declare function createFeatureResolver(config: FeatureResolverConfig): FeatureResolver;
56
128
  /**
57
- * Delete a stored token. Returns true when a token was removed, false
58
- * when there was nothing to delete or the keyring is unavailable.
59
- * Distinguishing the two cases isn't worth the surface area — the
60
- * command output makes the situation clear either way.
129
+ * Puts issue keys in creation order without asking the tracker: issue numbers (`#12`, `ENG-12`) rise with creation inside
130
+ * one repository or team, so the trailing number is the order. `oldest` is ascending, `newest` descending; keys with the
131
+ * same number keep their place. A key with no trailing number is an error, because nothing can be said of its age.
61
132
  */
62
- declare function deleteToken(provider: string): boolean;
133
+ export declare function orderKeys(keys: readonly string[], order: IssueOrder): string[];
63
134
  /**
64
- * List provider slugs with a stored token in this service scope.
65
- * Uses the library's `findCredentials(service)` — supported on all
66
- * platforms the underlying credential store supports.
135
+ * Keeps the first or last `limit` of a listing by creation time, returned oldest first. `createdAt` reads an item's
136
+ * ISO timestamp; items created in the same instant keep their listed order. The cut happens on what the listing already
137
+ * holds, so no request is spent on an item that is dropped.
67
138
  */
68
- declare function listStoredProviders(): string[];
69
- //#endregion
70
- //#region src/config/config.d.ts
71
- /** Structured-logging config. The Axiom **token** never lives here — only in
72
- * env vars or the OS keyring — but the non-secret dataset name may. */
73
- interface LogConfig {
74
- /**
75
- * Default log level. The lowest-priority level source: `--verbose` /
76
- * `--quiet` and `HOLOCRON_LOG_LEVEL` both outrank it.
77
- */
78
- level?: LogLevel;
79
- /**
80
- * Axiom log-shipping. Set `axiom.dataset` to opt local runs into Axiom
81
- * without exporting `HOLOCRON_AXIOM_DATASET` — the CLI then pairs it with
82
- * the token from `HOLOCRON_AXIOM_TOKEN` / `AXIOM_TOKEN` or the OS keyring
83
- * (`holocron auth set axiom[.<org>] <TOKEN>`). Env vars still win. In CI,
84
- * prefer the `HOLOCRON_AXIOM_DATASET` variable.
85
- */
86
- axiom?: {
87
- /** Target Axiom dataset, e.g. `"holocron-local"`. */
88
- dataset?: string;
89
- };
139
+ export declare function pickByCreation<T>(items: readonly T[], createdAt: (item: T) => string, order: IssueOrder, limit: number): T[];
140
+ /** What {@link readKeysLimited} needs. */
141
+ interface ReadKeysLimitedInput<T> {
142
+ /** The issue keys to choose from. */
143
+ keys: readonly string[];
144
+ /** Which end of the creation order to take first. */
145
+ order: IssueOrder;
146
+ /** How many items to keep. */
147
+ limit: number;
148
+ /** The most issues fetched at once. */
149
+ concurrency: number;
150
+ /** Fetches one issue by key. */
151
+ fetch: (key: string) => Promise<T>;
152
+ /** Whether a fetched issue counts against the limit; false skips it without using the budget. */
153
+ keep: (item: T) => boolean;
90
154
  }
91
155
  /**
92
- * CLI self-telemetry config — the committed, reviewable override layer over the
93
- * env-var + shipped-fallback activation (ADR-0007 / ADR-0008). No secret lives
94
- * here; the Sentry DSN and PostHog key come from env vars or ship as fallbacks.
95
- *
96
- * Precedence: `HOLOCRON_TELEMETRY=false` (env) → `telemetry.enabled` (this) →
97
- * default on. `enabled` never *re-enables* what the env var turned off.
156
+ * Reads an explicit list of issues in creation order until `limit` of them are kept. The keys are sorted by number first
157
+ * (see {@link orderKeys}), then fetched in small steps of at most `concurrency`, each step no bigger than the places
158
+ * still open, so an issue that is later skipped (a pull request, a closed one) is replaced by the next key and nothing
159
+ * beyond the budget is fetched unless a skip made room. Within a step the fetches run together; the results keep the key
160
+ * order. The kept items come back oldest first, whichever end was chosen.
98
161
  */
99
- interface TelemetryConfig {
100
- /**
101
- * Repo-level opt-out — the committed peer of `HOLOCRON_TELEMETRY=false`.
102
- * `false` installs the no-op sinks for the whole run. Default on.
103
- */
104
- enabled?: boolean;
105
- /**
106
- * Usage-analytics provider. `"none"` disables PostHog usage analytics while
107
- * leaving error reporting (Sentry) untouched. Default `"posthog"`.
108
- */
109
- analytics?: "posthog" | "none";
110
- }
111
- type ProviderOptions = Record<string, unknown>;
162
+ export declare function readKeysLimited<T>(input: ReadKeysLimitedInput<T>): Promise<T[]>;
112
163
  /**
113
- * The shape a capability config package's default export must satisfy.
114
- * Config packages let teams share a pre-bundled provider + options across
115
- * repos (Level 1 of the shareable-configs story, issue #75).
164
+ * Calls a provider's optional `onProgress` hook with how many items are done of how many. A hook that throws is
165
+ * ignored, because a progress counter must never change or stop the read or write it reports on.
116
166
  *
117
- * @example
118
- * // @acme/holocron-vault/index.ts
119
- * import type { CapabilityConfigPackage } from '@theholocron/cli'
120
- * export default {
121
- * provider: '1password',
122
- * options: { vault: 'acme-app' },
123
- * } satisfies CapabilityConfigPackage
124
- */
125
- interface CapabilityConfigPackage {
126
- provider: string;
127
- options?: ProviderOptions;
128
- }
129
- type SingleEntry = string | [provider: string, options: ProviderOptions];
130
- type MultiEntry = Array<string | [provider: string, options: ProviderOptions]>;
131
- type RawProviderEntry = SingleEntry | MultiEntry;
132
- type RawProvidersConfig = Partial<Record<CapabilityKey, RawProviderEntry>>;
133
- type RepoProtection = "balanced" | "strict" | "none";
134
- /**
135
- * Raw `docs` config as written by the user. `build` is optional so the
136
- * field can be declared without committing to a build type yet; setup
137
- * will error if `docs` is present but `build` is absent.
167
+ * @param onProgress - The hook from `ExportInfo` or `ImportOptions`; nothing happens when it is not given.
168
+ * @param done - How many items are finished.
169
+ * @param total - How many items there are.
138
170
  */
139
- interface DocsConfig {
140
- /**
141
- * GitHub Pages build source.
142
- * "workflow" → GitHub Actions (PUT { build_type: "workflow" })
143
- * "branch" → classic gh-pages branch (PUT { build_type: "legacy", source: { branch: "gh-pages", path: "/" } })
144
- * When absent, Pages is not managed by `holocron setup`.
145
- */
146
- build?: "workflow" | "branch";
147
- /**
148
- * Custom domain / CNAME (e.g. "docs.theholocron.dev").
149
- * When set and `homepage` is not explicitly provided, setup derives
150
- * `homepage` as `https://{domain}/` for package.json and the repo website field.
151
- */
152
- domain?: string;
153
- /** Enforce HTTPS. Only effective once the custom domain is DNS-verified. */
154
- https?: boolean;
171
+ export declare function reportProgress(onProgress: ((done: number, total: number) => void) | undefined, done: number, total: number): void;
172
+ /** One line a probe reports: `info` for a fact, `ok` / `fail` for a result, `heading` to title the rows that follow. */
173
+ interface ProbeRow {
174
+ /** `ok` or `fail` for a result, `info` for a fact, `heading` to title the rows that follow. */
175
+ status: "ok" | "fail" | "info" | "heading";
176
+ /** The row's short title. */
177
+ label: string;
178
+ /** Further detail, when there is some. */
179
+ detail?: string;
155
180
  }
156
- interface RepoProperties {
157
- lifecycle?: "active" | "experimental" | "deprecated";
158
- open_source?: boolean;
159
- runtime_environment?: "node" | "browser" | "universal" | "none";
160
- uses_external_packages?: boolean;
181
+ /** What a probe is handed. Everything it prints or changes goes through this, so the runner can enforce the rules. */
182
+ interface ProbeContext {
183
+ /** What the person typed after the probe name (`probe deps who vitest` hands `["vitest"]`). */
184
+ args?: readonly string[];
185
+ /**
186
+ * `--lcov <path>`: where a probe that measures coverage also writes an lcov report, on top of the rows it prints.
187
+ * Relative to the repo root. Unset when the flag was not given.
188
+ */
189
+ lcov?: string;
190
+ /** `--dry-run`: `write` calls are announced and skipped. */
191
+ dryRun: boolean;
192
+ /** Report one line. The text is scrubbed of secrets before it is printed. */
193
+ say(row: ProbeRow): void;
194
+ /**
195
+ * Change something on the provider. The only way to: on `--dry-run` it prints `would <label>` and does not call `fn`,
196
+ * and a probe that did not declare `writes: true` cannot call it.
197
+ */
198
+ write<T>(label: string, fn: () => Promise<T>): Promise<T | undefined>;
199
+ /** Register how to undo something this probe made. Runs in reverse order on success, failure and Ctrl-C. */
200
+ cleanup(label: string, fn: () => Promise<void>): void;
201
+ /** Mark a value (a token, a signing secret) as one that must never be printed. */
202
+ secret(value: string | undefined): void;
161
203
  }
162
- interface RepoConfig {
163
- /** "owner/name" — the GitHub repository coordinate. Derived from the git remote when absent. */
164
- name?: string;
204
+ /** A named, on-demand poke at a live provider. */
205
+ interface Probe {
206
+ /** One sentence for `holocron probe`'s listing. */
207
+ summary: string;
208
+ /** Whether it creates or changes anything on the provider. Asked about first, and needs `--yes` without a terminal. */
209
+ writes: boolean;
165
210
  /**
166
- * Branch protection preset applied by `holocron setup`. When omitted,
167
- * no protection is applied and no `branch_protection_level` property is set.
168
- * Required-status-check contexts for `"strict"` are derived from the task
169
- * manifest — `{ required: true }` tasks + top-level `extraRequiredChecks`
170
- * (see `astromech.requiredChecks()`).
211
+ * Where the probe's rows go. Unset, stdout. A probe whose own output is the data on stdout (a `NAME=value` stream
212
+ * for a pipe) sets `stderr`, so the rows never mix with it.
171
213
  */
172
- protection?: RepoProtection;
214
+ reportsTo?: "stderr";
173
215
  /**
174
- * GitHub teams granted repository access. Synced by `holocron setup`, which
175
- * also writes `.github/CODEOWNERS` for teams with write-or-higher permission.
176
- * String shorthand defaults to `push` (Write).
216
+ * Whether the probe is about a token, so `holocron probe` may point it at a different one: `--token <provider>=<value>`,
217
+ * `--environment <layer or name>` (the provider's token from that vault Environment), or, on a terminal with neither,
218
+ * a question that asks which. Unset, the probe uses the token the provider normally resolves.
177
219
  */
178
- teams?: TeamEntry[];
179
- /** GitHub topics set on the repository. */
180
- topics?: string[];
181
- /** GitHub custom properties synced to the org dashboard. */
182
- properties?: RepoProperties;
183
- }
184
- interface AppConfig {
185
- name: string;
186
- path: string;
187
- kind?: string;
188
- }
189
- interface DoctorConfig {
190
- checks?: string[];
191
- }
192
- interface EnvConfig {
193
- /**
194
- * Namespace prefixes used by this project's env vars.
195
- * Listed from least- to most-specific (cascade model — last wins).
196
- * Tooling reads this to generate `.env.example`, validate required
197
- * vars, and produce documentation.
198
- *
199
- * @example
200
- * // Project-only prefix
201
- * namespaces: ["CLI_TEMPLATE"]
202
- *
203
- * // Org-wide defaults + project-specific overrides
204
- * namespaces: ["HOLOCRON", "MY_CLI"]
205
- */
206
- namespaces?: string[];
220
+ acceptsToken?: boolean;
221
+ /** Runs the probe, reporting and changing things only through `ctx`. */
222
+ run(ctx: ProbeContext): Promise<void>;
207
223
  }
224
+ /** A plugin's probes by name (kebab-case), as returned from `createPlugin` next to `capabilities`. */
225
+ type PluginProbes = Record<string, Probe>;
208
226
  /**
209
- * A single Chromatic project entry in a monorepo `run-chromatic` config.
210
- * Each entry produces one matrix job in CI, publishing to a separate Chromatic project.
211
- *
212
- * The `tokenName` maps to a repository secret named `CHROMATIC_PROJECT_TOKEN_<TOKENNAME>`.
213
- * Additional fields correspond to chromaui/action inputs and are passed through directly.
214
- *
215
- * @see https://www.chromatic.com/docs/monorepos/
227
+ * One step of a provider's `setup` or `doctor`, in the shape the shared renderer prints (`printCheckRows`): an id, a
228
+ * title, `ok` / `fail` / `skip`, one line of detail and, for a failure, a line per problem.
216
229
  */
217
- interface ChromaticProjectConfig {
218
- /**
219
- * Secret suffix. The CI job reads `CHROMATIC_PROJECT_TOKEN_<tokenName>`.
220
- * Must be uppercase (e.g. `"WEB"`, `"UI"`).
221
- */
222
- tokenName: string;
230
+ type ProviderRow = CheckRow;
231
+ /** What a provider's `setup` and `doctor` are handed. */
232
+ interface ProviderActionContext {
223
233
  /**
224
- * Path to run the Chromatic build from, relative to the repo root.
225
- * Typically the package directory (e.g. `"apps/web"`, `"packages/ui"`).
234
+ * `--dry-run`: `setup` reports what it would change as `ok` rows and changes nothing. `doctor` never changes
235
+ * anything, so it ignores this.
226
236
  */
227
- workingDir: string;
228
- /**
229
- * Script name to build Storybook. Defaults to `"build:storybook"`.
230
- * Must accept `--output-dir` pass-through (use `turbo run … --` at root).
231
- */
232
- buildScript?: string;
233
- /**
234
- * Path to the Storybook folder relative to `workingDir`, for TurboSnap.
235
- * Tells Chromatic where to find `.storybook/` when the Storybook config
236
- * is in a subdirectory. Corresponds to `--storybook-base-dir`.
237
- */
238
- storybookBaseDir?: string;
239
- /**
240
- * Glob patterns of files/dirs that should NOT trigger a TurboSnap bailout
241
- * when changed. Useful for ignoring non-UI changes in a monorepo
242
- * (e.g. `"./packages/!(ui)/**"` to focus TurboSnap on the UI package).
243
- * Corresponds to `--untraced`. Accepts a single glob string or array.
244
- */
245
- untraced?: string | string[];
246
- /**
247
- * Glob patterns matching story files to snapshot. When set, only matching
248
- * stories are captured. Corresponds to `--only-story-files`.
249
- * Cannot be combined with `onlyStoryNames`.
250
- */
251
- onlyStoryFiles?: string;
252
- /**
253
- * Exit with code 0 even when visual changes are detected.
254
- * Useful during initial setup before baselines are approved.
255
- * Corresponds to `--exit-zero-on-changes`.
256
- */
257
- exitZeroOnChanges?: boolean;
237
+ dryRun: boolean;
258
238
  }
259
239
  /**
260
- * A single Storybook app in a deploy workflow config.
261
- * `name` becomes the sandbox sub-path (`_site/sandbox/<name>/`).
262
- * `path` is the working directory relative to the repo root; defaults to `"."` (repo root) when omitted.
240
+ * Something only one provider has (a Linear team's automation, a Discord server's roles) and no provider-neutral
241
+ * command can express. It reports one row per step and does not stop at the first failure: a step that fails is a
242
+ * `fail` row and the next step still runs. It never prints a token.
263
243
  */
264
- interface StorybookDeployProject {
265
- name?: string;
266
- path?: string;
244
+ type ProviderAction = (ctx: ProviderActionContext) => Promise<ProviderRow[]>;
245
+ /** A provider's `setup` and `doctor`, as `holocron provider <name> setup|doctor` finds them. */
246
+ interface ProviderActions {
247
+ /** Makes what the provider's own config block declares. Optional. */
248
+ setup?: ProviderAction;
249
+ /** Compares what the provider's own config block declares with what exists, read-only. Optional. */
250
+ doctor?: ProviderAction;
251
+ }
252
+ /** What a connection probe needs to check a provider's host and token: kyber's input, with the plugin's `verifyToken` as `verify`. */
253
+ export interface ConnectionProbeInput extends Omit<ConnectionProbeInput$1, "verify"> {
254
+ /** The plugin's `verifyToken`: asks the provider who the token belongs to. */
255
+ verify: (token: string) => Promise<VerifyTokenResult>;
267
256
  }
268
257
  /**
269
- * Typed `with:` inputs for reusable workflows.
270
- *
271
- * `run-chromatic` accepts either a plain boolean (single-project) or a
272
- * `ChromaticProjectConfig[]` object (multi-project monorepo).
273
- *
274
- * `docs` / `storybook` are high-level deploy shorthand that `holocron setup`
275
- * translates to `type` / `storybook-projects` before writing the thin caller.
276
- * They also drive automatic `paths:` derivation so you never need to write
277
- * `paths:` manually for deploy entries.
278
- */
279
- type WorkflowWithConfig = Record<string, unknown> & {
280
- "run-chromatic"?: boolean | {
281
- projects: ChromaticProjectConfig[];
282
- };
283
- /**
284
- * Docs deployment shorthand. `true` uses the org-standard `docs/` directory;
285
- * `{ path: "custom" }` uses a custom directory. Both derive a `paths:` entry automatically.
286
- */
287
- docs?: true | {
288
- path: string;
289
- };
290
- /** Storybook apps to deploy alongside docs. Each entry's `path` is appended to `paths:`. */
291
- storybook?: StorybookDeployProject[];
292
- };
293
- /**
294
- * A `tasks` manifest entry in object form. A bare string entry is shorthand
295
- * for `{ name, ci: true, local: true }`.
258
+ * The `connection` probe every provider offers, for telling a network problem from a credential problem. The checks are
259
+ * kyber's `connectionProbe`; this types the result as the plugin system's {@link Probe} and `verify` as `VerifyTokenResult`.
296
260
  */
297
- interface TaskEntryConfig {
298
- name: string;
299
- with?: WorkflowWithConfig;
300
- paths?: string[];
301
- linters?: string[];
302
- /** Emit a `.github/workflows/<name>.yml` thin caller + include in `holocron ci`. Default `true`. */
303
- ci?: boolean;
304
- /** Write a `package.json` script + let `holocron run <name>` resolve the task. Default `true`. */
305
- local?: boolean;
306
- /** The task's CI check context is a required status check + part of `holocron ci`'s default run. */
307
- required?: boolean;
261
+ export declare function connectionProbe(input: ConnectionProbeInput): Probe;
262
+ interface RoleSyncOutcome {
263
+ role: string;
264
+ team: string;
265
+ plan: RoleSyncPlan;
266
+ /** Members the role was given to (empty on a dry run). */
267
+ added: string[];
268
+ /** Members the role was taken from (empty on a dry run or with `keep`). */
269
+ removed: string[];
308
270
  }
309
- interface HolocronConfig {
310
- /** Project name. Derived from package.json when absent. */
311
- name?: string;
312
- description?: string;
313
- /** Project homepage URL. Synced to package.json#homepage and the GitHub repo's website field by `holocron sync`. */
314
- homepage?: string;
315
- /**
316
- * Active org name for namespaced keyring lookup. When set, token resolution
317
- * tries `<service>.<org>` before the unnamespaced `<service>` fallback, so
318
- * a single machine can hold credentials for multiple GitHub orgs without
319
- * collision. Overridden by `--org` CLI flag or `HOLOCRON_ORG` env var.
320
- */
321
- org?: string;
322
- /**
323
- * Org canonical domain (e.g. `"theholocron.dev"`). Subdomains are derived
324
- * from this — `preview: true` on a deploy workflow resolves the preview base
325
- * domain as `preview.<domain>`, giving URLs like `<repo>-pr-<n>.<domain>`.
326
- */
327
- domain?: string;
328
- /**
329
- * Repository identity and metadata. When set, `PluginLoader` injects
330
- * `repo.name` into every plugin's `RuntimeContext.repo` so plugins that
331
- * need a repo (github, etc.) don't require `--repo` on every invocation.
332
- * `--repo` on the command line still overrides.
333
- */
334
- repo?: RepoConfig;
335
- /**
336
- * The task manifest — what this repo runs. Each entry is a task name
337
- * (backed by a reusable workflow in `theholocron/.github`), or the object
338
- * form to pass `with:` inputs. `@theholocron/astromech` reads this as the
339
- * single source for `holocron run` / `holocron ci` / the generated CI
340
- * workflows / `package.json` scripts.
341
- *
342
- * Supported values (intent-facing vocabulary — epic #672, D3):
343
- * "verification.unitTests" | "verification.typeSafety" | "verification.performance" |
344
- * "sourceQuality.staticAnalysis" | "sourceQuality.formatting" |
345
- * "sourceQuality.structuredDataValidation" | "sourceQuality.deadCodeAnalysis" |
346
- * "security.secretDetection" | "security.codeScanning" |
347
- * "delivery.build" | "delivery.publish" | "delivery.deploy" | "delivery.bundleSize" |
348
- * "platform.repoSync" | "platform.commitStandards" | "platform.repoValidation" |
349
- * "knowledge.wiki" | "knowledge.docs" | "knowledge.components" |
350
- * "review" | "tag" | "stale" | "greetings" | "dependencies" | "bookkeeping"
351
- *
352
- * `holocron setup` writes `.github/workflows/<name>.yml` for each entry,
353
- * calling the corresponding reusable workflow in `theholocron/.github`.
354
- * Files are overwritten on each run — they are generated artifacts.
355
- *
356
- * ### delivery.deploy / knowledge.docs / knowledge.components
357
- * `delivery.deploy` uses `docs` and/or `storybook` in `with:` — setup
358
- * derives `paths:` automatically. `docs: true` uses the org-standard
359
- * `docs/` directory; `docs: { path: "custom" }` overrides it.
360
- * `knowledge.docs` / `knowledge.components` are the same underlying
361
- * mechanism, each dedicated to exactly one type — they imply the
362
- * corresponding shorthand, so a repo using them never has to spell out
363
- * `docs: true` / `storybook: […]` itself.
364
- *
365
- * ```ts
366
- * // Docs only (standard layout)
367
- * { name: "delivery.deploy", with: { docs: true } }
368
- * // …or equivalently, the dedicated task:
369
- * "knowledge.docs"
370
- *
371
- * // Docs + monorepo storybooks
372
- * {
373
- * name: "delivery.deploy",
374
- * with: {
375
- * docs: true,
376
- * storybook: [
377
- * { name: "web", path: "apps/web" },
378
- * { name: "ui", path: "packages/ui" },
379
- * ],
380
- * },
381
- * }
382
- *
383
- * // Non-standard docs location
384
- * { name: "delivery.deploy", with: { docs: { path: "packages/site" } } }
385
- * ```
386
- *
387
- * ### run-chromatic
388
- * For a single-project repo, use `"run-chromatic": true` with a
389
- * `CHROMATIC_PROJECT_TOKEN` repository secret.
390
- *
391
- * For monorepos with multiple Storybooks, use the object form:
392
- * ```ts
393
- * "run-chromatic": {
394
- * projects: [
395
- * { tokenName: "WEB", workingDir: "apps/web" },
396
- * { tokenName: "UI", workingDir: "packages/ui" },
397
- * ]
398
- * }
399
- * ```
400
- * 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.
404
- *
405
- * @example
406
- * ["sourceQuality.staticAnalysis", { "name": "delivery.publish", "with": { "run-build": false } }]
407
- * { "name": "delivery.deploy", "with": { "docs": true } }
408
- */
409
- tasks?: Array<string | TaskEntryConfig>;
410
- /**
411
- * Opt out of `holocron sync`'s `package.json` script writes. Default `true`.
412
- */
413
- syncScripts?: boolean;
414
- /**
415
- * The command the synced `"holocron"` `package.json` script runs. Default
416
- * `"holocron"` (the installed bin). This repo overrides it to run its own
417
- * build (`"node packages/cli/dist/cli.mjs"`).
418
- */
419
- holocronScript?: string;
420
- /**
421
- * Required status-check contexts not backed by a `required` task (codecov
422
- * gates, the bundle-build check, …). `holocron setup` appends these to the
423
- * task-derived list from `astromech.requiredChecks()`.
424
- */
425
- extraRequiredChecks?: string[];
426
- /**
427
- * Git hooks `holocron setup` installs. `true` / `{ prePush: true }` writes
428
- * `.husky/pre-push` (runs `holocron ci` before every push); `false` /
429
- * `{ prePush: false }` opts out. Omitted → on for `protection: "strict"`,
430
- * off otherwise. `--hooks` / `--no-hooks` on `holocron setup` override.
431
- */
432
- hooks?: boolean | {
433
- prePush?: boolean;
434
- };
435
- providers: RawProvidersConfig;
436
- apps?: AppConfig[];
437
- doctor?: DoctorConfig;
438
- /**
439
- * Agent runtime that determines where skills are installed by `holocron setup`.
440
- * Skills are installed to `.agents/skills/<name>/` (canonical) with a
441
- * relative symlink at the agent-specific path:
442
- * - `"claude"` → `.claude/skills/<name>` → `../../.agents/skills/<name>`
443
- * - `"codex"` | `"gemini"` → logged as unsupported; skipped gracefully.
444
- */
445
- agent?: "claude" | "codex" | "gemini";
446
- /**
447
- * Skill names from `@theholocron/skills` to install during `holocron setup`.
448
- * Installed paths are gitignored and managed by setup — do not commit them.
449
- *
450
- * @example
451
- * ["git-safety", "pr-workflow", "commit-standards"]
452
- */
453
- skills?: string[];
454
- /**
455
- * GitHub Pages configuration. When present, `holocron setup` calls the
456
- * Pages API using `HOLOCRON_DEPLOY_TOKEN` (requires `pages:write` + `repo` scope).
457
- * When absent, Pages is left as-is.
458
- *
459
- * @example
460
- * { build: "workflow", domain: "docs.theholocron.dev", https: true }
461
- */
462
- docs?: DocsConfig;
463
- /**
464
- * Environment variable namespace configuration.
465
- * Declares the prefix(es) this project uses for its env vars so that
466
- * tooling can generate `.env.example`, validate required vars, and
467
- * produce accurate documentation without hard-coding prefix strings.
468
- *
469
- * @example
470
- * { namespaces: ["HOLOCRON", "MY_CLI"] }
471
- */
472
- env?: EnvConfig;
473
- /**
474
- * Structured-logging config. Only the level belongs here — Axiom
475
- * credentials come from env vars, never a committed file.
476
- *
477
- * @example
478
- * { level: "debug" }
479
- */
480
- log?: LogConfig;
481
- /**
482
- * CLI self-telemetry override layer. Env var (`HOLOCRON_TELEMETRY=false`)
483
- * still wins; this is the committed way to opt a repo out or drop usage
484
- * analytics while keeping error reporting.
485
- *
486
- * @example
487
- * { enabled: false }
488
- * { analytics: "none" }
489
- */
490
- telemetry?: TelemetryConfig;
271
+ /** One person: their GitHub account and their member id on the notifications provider. */
272
+ interface MemberLink {
273
+ /** The GitHub user id, as a string. It survives a rename; the login does not. */
274
+ github: string;
275
+ /** The GitHub login when the link was made; for reports only. */
276
+ login: string;
277
+ /** The member's id on the notifications provider (for Discord, the user id). */
278
+ member: string;
491
279
  }
492
- interface ResolvedTuple {
493
- provider: string;
494
- /** Resolved package name (`@theholocron/holocron-plugin-<provider>` for short refs). */
495
- packageName: string;
496
- options: ProviderOptions;
280
+ /** The file that says which server member is which GitHub account. */
281
+ interface LinksFile {
282
+ /** The file format version. */
283
+ version: 1;
284
+ /** One entry per linked person. */
285
+ links: MemberLink[];
497
286
  }
498
- type ResolvedProviderEntry = {
499
- cardinality: "single";
500
- tuple: ResolvedTuple;
501
- } | {
502
- cardinality: "many";
503
- tuples: ResolvedTuple[];
504
- };
505
- type ResolvedProvidersConfig = Partial<Record<CapabilityKey, ResolvedProviderEntry>>;
506
- interface ResolvedHolocronConfig {
507
- name: string;
508
- description?: string;
509
- homepage?: string;
287
+ interface RoleSyncPlan {
288
+ /** Team members who are linked and do not hold the role: give it to them. */
289
+ add: Array<{
290
+ member: string;
291
+ login: string;
292
+ }>;
293
+ /** Holders linked to a GitHub account that is no longer on the team: take it away. */
294
+ remove: Array<{
295
+ member: string;
296
+ login: string;
297
+ }>;
298
+ /** Team members with no link: the role cannot reach them until they link their account. */
299
+ unlinked: SourceTeamMember[];
300
+ /** Holders with no link at all. Left alone, because nothing says they should not have it. */
301
+ unknownHolders: Array<{
302
+ member: string;
303
+ name?: string;
304
+ }>;
305
+ /** Linked team members who already hold the role. */
306
+ inSync: number;
307
+ }
308
+ /** What {@link syncRoles} needs: the providers, the links, and the roles to keep equal to their teams. */
309
+ interface SyncRolesInput {
310
+ /** The provider that lists and changes who holds a role. */
311
+ notifications: Notifications;
312
+ /** The provider that lists a team's members. */
313
+ source: Source;
314
+ /** Who is which person, from the links file. */
315
+ links: LinksFile;
316
+ /** Each role and the team it follows. */
317
+ roles: ReadonlyArray<{
318
+ name: string;
319
+ team: string;
320
+ }>;
321
+ /** The organisation the teams are in; defaults to the source's own. */
510
322
  org?: string;
511
- domain?: string;
512
- repo?: RepoConfig;
513
- tasks?: Array<string | TaskEntryConfig>;
514
- syncScripts?: boolean;
515
- holocronScript?: string;
516
- extraRequiredChecks?: string[];
517
- hooks?: boolean | {
518
- prePush?: boolean;
519
- };
520
- providers: ResolvedProvidersConfig;
521
- apps: AppConfig[];
522
- doctor: DoctorConfig;
523
- agent?: "claude" | "codex" | "gemini";
524
- skills?: string[];
525
- /** Resolved Pages config. `build` is guaranteed present when this field exists. */
526
- docs?: PagesConfig;
527
- env?: EnvConfig;
528
- log?: LogConfig;
529
- telemetry?: TelemetryConfig;
323
+ /** Report what would change without changing anything. */
324
+ dryRun?: boolean;
325
+ /** Give the role to new team members but do not take it from people who left. */
326
+ keep?: boolean;
327
+ /** Where progress lines go; nowhere when left out. */
328
+ print?: (line: string) => void;
530
329
  }
531
- declare class ConfigError extends Error {
532
- name: string;
330
+ /** What {@link syncRoles} did. */
331
+ interface SyncRolesResult {
332
+ /** One entry per role whose plan could be made. */
333
+ roles: RoleSyncOutcome[];
334
+ /** Steps that failed; the run carried on past each. */
335
+ failures: Array<{
336
+ step: string;
337
+ message: string;
338
+ }>;
339
+ /** Roles given or taken. */
340
+ ok: number;
341
+ /** Already in sync, left alone, or only previewed. */
342
+ skipped: number;
533
343
  }
344
+ /** What a source provider needs to be able to do to feed a role sync, or the reason it cannot. */
345
+ export declare function sourceProblem(source: Source | undefined): string | undefined;
346
+ /** Reads the links file; a file that does not exist yet is an empty one, a damaged one throws. */
347
+ export declare function readLinks(source: Source, layout: NotificationsLayout, org: string | undefined, provider: string): Promise<LinksFile>;
348
+ /**
349
+ * The first role the layout declares for two different teams, or undefined. Names compare ignoring case, as
350
+ * the server does; the role would be synced against one team and then the other, so the last would win.
351
+ */
352
+ export declare function roleTeamProblem(layout: {
353
+ roles?: ReadonlyArray<{
354
+ name: string;
355
+ team?: string;
356
+ }>;
357
+ }): string | undefined;
534
358
  /**
535
- * Resolve `"github"` → `"@theholocron/holocron-plugin-github"`.
536
- * Fully-qualified names (scoped or not) are honored verbatim, which
537
- * is how third-party plugins published outside the org work.
359
+ * Makes each role's holders equal its team, one role after another. This is the sync itself, with no setup in
360
+ * front of it: the caller has already picked the providers, read the links and checked the layout. `holocron
361
+ * sync roles` and Sentinel's role sync are two callers of it. A step that fails is recorded and the
362
+ * run goes on; nothing here throws for a provider error. Idempotent: a role that already matches changes nothing.
363
+ * Lines go to `input.print` when it is given, and nowhere otherwise.
538
364
  */
539
- declare function resolvePluginPackage(provider: string): string;
540
- declare function resolveEntry(key: CapabilityKey, raw: RawProviderEntry): ResolvedProviderEntry;
541
- declare function resolveConfig(raw: HolocronConfig): ResolvedHolocronConfig;
542
- //#endregion
543
- //#region src/commands/setup/derived-properties.d.ts
365
+ export declare function syncRoles(input: SyncRolesInput): Promise<SyncRolesResult>;
544
366
  /**
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.
367
+ * The labels every repository gets from `setup`, with their GitHub colours (hex, no `#`) and descriptions. A
368
+ * plugin that makes labels of its own, such as Linear's setup, takes the colour of the one with the same name.
553
369
  */
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>;
370
+ export declare const CANONICAL_LABELS: readonly [{
371
+ readonly name: "bug";
372
+ readonly color: "d73a4a";
373
+ readonly description: "Something isn't working";
374
+ }, {
375
+ readonly name: "chore";
376
+ readonly color: "ededed";
377
+ readonly description: "Maintenance, no user-facing change";
378
+ }, {
379
+ readonly name: "ci";
380
+ readonly color: "0075ca";
381
+ readonly description: "CI/CD pipeline changes";
382
+ }, {
383
+ readonly name: "dependencies";
384
+ readonly color: "0366d6";
385
+ readonly description: "Dependency update";
386
+ }, {
387
+ readonly name: "documentation";
388
+ readonly color: "0075ca";
389
+ readonly description: "Documentation only";
390
+ }, {
391
+ readonly name: "duplicate";
392
+ readonly color: "cfd3d7";
393
+ readonly description: "Already reported";
394
+ }, {
395
+ readonly name: "enhancement";
396
+ readonly color: "a2eeef";
397
+ readonly description: "New feature or request";
398
+ }, {
399
+ readonly name: "good first issue";
400
+ readonly color: "7057ff";
401
+ readonly description: "Good for newcomers";
402
+ }, {
403
+ readonly name: "help wanted";
404
+ readonly color: "008672";
405
+ readonly description: "Extra attention needed";
406
+ }, {
407
+ readonly name: "invalid";
408
+ readonly color: "e4e669";
409
+ readonly description: "Doesn't seem right";
410
+ }, {
411
+ readonly name: "performance";
412
+ readonly color: "fbca04";
413
+ readonly description: "Performance improvement";
414
+ }, {
415
+ readonly name: "question";
416
+ readonly color: "d876e3";
417
+ readonly description: "Further information requested";
418
+ }, {
419
+ readonly name: "refactor";
420
+ readonly color: "cfd3d7";
421
+ readonly description: "Code restructuring";
422
+ }, {
423
+ readonly name: "released";
424
+ readonly color: "ededed";
425
+ readonly description: "Included in a release";
426
+ }, {
427
+ readonly name: "test";
428
+ readonly color: "bfd4f2";
429
+ readonly description: "Test-related changes";
430
+ }, {
431
+ readonly name: "triage";
432
+ readonly color: "e4e669";
433
+ readonly description: "Needs investigation";
434
+ }, {
435
+ readonly name: "wontfix";
436
+ readonly color: "ffffff";
437
+ readonly description: "Won't be addressed";
438
+ }];
439
+ /** What one token must carry in one layer, as `tokenExpectations()` reads it from a plugin's `PluginToken.expect`. */
440
+ interface LayerTokenExpectation {
441
+ /** The token's plugin environment variable (`PluginToken.envName`), its identity in the plugin's list. */
442
+ envName: string;
443
+ /** The layer that holds it. */
444
+ layer: EnvironmentLayer;
445
+ /** Every permission with its rule. Empty for a layer that holds the token with no permission rules. */
446
+ rules: Readonly<Record<string, PermissionRule>>;
447
+ /** The permissions the token must have, in declaration order. */
448
+ required: readonly string[];
449
+ /** The permissions the token must not have, in declaration order. */
450
+ absent: readonly string[];
451
+ /** When the token is due for rotation: the declared policy over `DEFAULT_TOKEN_ROTATION`. */
452
+ rotation: Required<TokenRotation>;
561
453
  }
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[];
454
+ /** Which of the declared expectations to return; both left out returns all of them. */
455
+ interface TokenExpectationFilter {
456
+ /** Only this layer. */
457
+ layer?: string;
458
+ /** Only the token with this `envName`. */
459
+ envName?: string;
568
460
  }
569
461
  /**
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`.
462
+ * Reads what a plugin's tokens declare (`PluginToken.expect`) as one entry per token and layer that holds it, in the
463
+ * order of `ENVIRONMENT_LAYERS`. The one reader the token probes, the doctor and the docs check share, so none of them
464
+ * walks the declaration itself. A token with no `expect` yields nothing; a layer no token holds is never listed.
590
465
  */
591
- declare function deriveProfile(input: DeriveProfileInput): HolocronProfile;
466
+ export declare function tokenExpectations(tokens: readonly PluginToken[], filter?: TokenExpectationFilter): LayerTokenExpectation[];
467
+ /** When a provider says a token was made and when it stops working. Each is an ISO date or time, left out when unknown. */
468
+ interface TokenLifetime {
469
+ /** When the token was made, or became valid when that is all the provider says (Cloudflare `not_before`). */
470
+ createdAt?: string;
471
+ /** When the token expires. Unset for a token that never does. */
472
+ expiresAt?: string;
473
+ }
474
+ /** The rotation policy of a token that declares none: a token is due after 90 days, and an expiry is flagged 14 days ahead. */
475
+ export declare const DEFAULT_TOKEN_ROTATION: Required<TokenRotation>;
592
476
  /**
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.
477
+ * Rows saying whether a token is due for rotation, from what its provider exposes. Provider-neutral: a token probe reads
478
+ * the lifetime however its provider offers it and hands it here, with the layer's `rotation` from `tokenExpectations()`.
479
+ * `lifetime` is `undefined` when the provider exposes nothing (the row says so rather than passing), and a date the
480
+ * provider gave that does not parse is an `info` row, never a pass. An expired or near-expiry token fails, and so does
481
+ * one older than `maxAgeDays`. Only dates are printed, never the token.
598
482
  */
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";
483
+ export declare function tokenRotationRows(lifetime: TokenLifetime | undefined, rotation: Required<TokenRotation>, now: Date): ProbeRow[];
603
484
  /**
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.
485
+ * What stdout is. A token is never written to a `terminal` (it would sit in scrollback) or to `other` (a redirect to
486
+ * a regular file, which would leave plaintext tokens on disk without the protections of the file option); only a
487
+ * `pipe` receives the lines. On a terminal they go to the file option instead, or the clipboard when asked.
608
488
  */
609
- declare function missingCapabilities(capabilities: readonly string[]): string[];
489
+ type AuthExportOutKind = "terminal" | "pipe" | "other";
610
490
  /**
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.
491
+ * What file descriptor `fd` (stdout) is, for deciding where tokens may go: a `terminal`, a `pipe` (a FIFO, or the
492
+ * socket some shells and runners use for one), or `other` (a regular file, a device, or anything that cannot be
493
+ * inspected). Only a pipe is safe to write the lines to, so anything unknown is `other`.
616
494
  */
617
- declare function readWorkspacePackageJsons(repoRoot: string, workspacePackages: readonly WorkspacePackage[]): Promise<PackageJsonLike[]>;
618
- //#endregion
619
- //#region src/config/compose.d.ts
620
- type TaskEntry = NonNullable<HolocronConfig["tasks"]>[number];
621
- /** A single composable capability fragment. */
622
- interface Capability {
623
- /** Unique identifier — used for deduplication and dependency resolution. */
624
- id: string;
625
- /** Other capability IDs that must be present in the same compose() call. */
626
- requires?: string[];
627
- /** Task entries contributed by this capability. Merged by name; last writer wins. */
628
- tasks?: TaskEntry[];
629
- /** Provider config. Shallow-merged at the top level; later capabilities override per-key. */
630
- providers?: RawProvidersConfig;
631
- /**
632
- * Required status-check contexts **not** backed by a `required` task
633
- * (codecov gates, `Storybook Publish`, …). Unioned across all capabilities
634
- * onto the top-level `extraRequiredChecks`. Task-backed checks come from
635
- * `{ required: true }` task entries via `astromech.requiredChecks()`.
636
- */
637
- extraRequiredChecks?: string[];
638
- /** Repo config fragment. Scalar fields: last writer wins. properties/topics/teams: merged. */
639
- repo?: Partial<Omit<RepoConfig, "name">>;
640
- /** Org name. Last writer wins. */
641
- org?: string;
642
- /** Org canonical domain. Last writer wins. */
643
- domain?: string;
644
- /** Docs site config. Last writer wins. */
645
- docs?: DocsConfig;
646
- }
647
- /** The merged result of a compose() call. Spreads into defineConfig(). */
648
- interface ComposedPreset {
649
- tasks: TaskEntry[];
650
- providers: RawProvidersConfig;
651
- repo: Partial<Omit<RepoConfig, "name">>;
652
- /** Non-task required-check contexts, unioned across capabilities. */
653
- extraRequiredChecks: string[];
654
- org?: string;
655
- domain?: string;
656
- docs?: DocsConfig;
657
- }
495
+ export declare function stdoutKind(isTerminal: boolean, fd?: number, stat?: (fd: number) => Pick<Stats, "isFIFO" | "isSocket">): AuthExportOutKind;
658
496
  /**
659
- * Merge any number of capability fragments into a single preset object that
660
- * spreads directly into `defineConfig()`.
661
- *
662
- * - Accepts individual capabilities or nested arrays (for bundle presets).
663
- * - Deduplicates by `id` — when the same ID appears more than once, the last
664
- * occurrence wins. This lets callers override bundle defaults by listing an
665
- * explicit capability after the bundle.
666
- * - Validates all `requires` at call time and throws `ConfigError` if any are
667
- * unmet, listing every missing dependency in a single message.
668
- *
669
- * @example
670
- * // docs-only site — no typecheck
671
- * const preset = compose(node(), docs());
672
- *
673
- * // library with docs
674
- * const preset = compose(node(), typecheck(), docs());
497
+ * The vault Environment `holocron sync secrets --env <environment>` reads. A layer word (`local`, `dev`, `ci`, `prod`) is the
498
+ * Environment of that layer of this repository, `<org/repo> - <layer>`; any other text is a literal Environment name.
499
+ * A literal name wins only when it is not exactly a layer word, so an Environment that is itself called `prod` cannot be
500
+ * addressed by that name (spec `tech-environment-layers`, #2069).
675
501
  *
676
- * // nextjs() is a bundle that returns Capability[]
677
- * const preset = compose(node(), nextjs());
502
+ * @param id - The `--env` value the user gave.
503
+ * @param input - Where the repository is (its `origin` remote is read there), and optionally how to read it.
504
+ * @throws {ConfigError} For a layer word when the remote cannot be read (the message names the `environment` option).
678
505
  */
679
- declare function compose(...args: (Capability | Capability[])[]): ComposedPreset;
680
- //#endregion
681
- //#region src/config/define-config.d.ts
682
- declare function defineConfig(config: HolocronConfig): HolocronConfig;
683
- //#endregion
684
- //#region src/config/load-config.d.ts
685
- interface LoadedConfig {
686
- resolved: ResolvedHolocronConfig;
687
- /** Absolute path to the file the config was read from. */
688
- filepath: string;
506
+ export declare function resolveEnvironmentId(id: string, input: {
507
+ repoRoot: string;
508
+ gitExec?: GitExec;
509
+ }): Promise<string>;
510
+ /** The line that says how to fix a credentials path the version control ignore rules do not cover. */
511
+ export declare function ignoreAdvice(isDefault: boolean, choose: string): string;
512
+ /** The file `export tokens` and `new github-app` write by default, relative to the repository root. */
513
+ export declare const PRIVATE_CREDENTIALS_FILE = ".holocron/.private/.credentials";
514
+ /** Where a credentials file goes: its absolute path, and whether it is the default one in the private directory. */
515
+ interface CredentialsFileTarget {
516
+ path: string;
517
+ /** True when no `--file` was given, so the file is in `.holocron/.private/` and a missing ignore rule is fixed by `sync`. */
518
+ isDefault: boolean;
689
519
  }
690
520
  /**
691
- * Read + parse + resolve `holocron.config.*` from the given directory.
692
- * Throws {@link ConfigFileError} when nothing is found or a file cannot
693
- * be loaded, or `ConfigError` when the config is invalid.
521
+ * The credentials file for a command: `file` (relative to `base`) when given, else `.holocron/.private/.credentials`
522
+ * under `base`. The default's directory is created when missing (owner-only), because the ignore check can only ask
523
+ * about a path whose directory exists and the file cannot be written without it.
524
+ */
525
+ export declare function resolveCredentialsFile(base: string, file: string | undefined, makeDir?: (dir: string) => void): CredentialsFileTarget;
526
+ /**
527
+ * The closed list of area files `loadConfig` reads from `.holocron/` (the directory is `.<config name>`, set by kyber):
528
+ * `.holocron/notifications.*` fills `providers.notifications`' `layout`, `.holocron/repo.*` fills keys of `repo`, and `.holocron/org.*` fills provider options (`teamId`, `accountId`) a config leaves out.
529
+ * A file not on this list is never read.
530
+ */
531
+ export declare const HOLOCRON_AREAS: readonly ["notifications", "repo", "org"];
532
+ /**
533
+ * The areas a config in a subdirectory also reads from the repository root's `.holocron/` (SPEC-0069): only `org`,
534
+ * because its values are the organization's and every config needs them. `repo` and `notifications` describe the
535
+ * repository itself, so an app's config does not take them from the root.
536
+ */
537
+ export declare const SHARED_AREAS: readonly ["org"];
538
+ /**
539
+ * Put the area files of `.holocron/` into the config as loaded, before `deriveDefaults` runs: `notifications` becomes
540
+ * the `layout` of the notifications provider and `repo` supplies keys of `repo` and `org` fills the provider options a config leaves out. A value set both inline and in a file
541
+ * is a `ConfigError` naming both (no merge, no precedence). With no area files the config is returned as it was.
694
542
  */
695
- declare function loadConfig(cwd: string): Promise<LoadedConfig>;
696
- //#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, DeployFunctionConfig, DeployFunctionResult, DeployScriptConfig, DeployScriptResult, Deployment, DeploymentProject, DeploymentProjectSettings, DeploymentRecord, DeploymentTarget, DeploymentTrigger, DeriveProfileInput, Dns, DnsRecord, DnsRecordRequest, 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, WikiProvisionOpts, WikiProxyConfig, Workers, WorkflowWithConfig, compose, createFeatureResolver, createResolveToken, createRestClient, defineConfig, deleteToken, deriveCapabilities, deriveCompliance, deriveProfile, deriveStack, getToken, isMulti, listStoredProviders, loadConfig, missingCapabilities, readWorkspacePackageJsons, resolveConfig, resolveEntry, resolvePluginPackage, setToken };
543
+ export declare function placeAreas(areas: ConfigDirArea[], raw: HolocronConfig): HolocronConfig;
544
+ export { AddedItem, Analytics, type AppConfig, Auth, AuthDescription, AuthError, AuthEvent, AuthEventType, type AuthExportOutKind, AuthIdentity, AuthUser, BoardField, BoardFieldType, BoardItem, BoardItemInput, BoardRule, BoardState, BoardStatus, BoardStatusCategory, BoardSummary, BoardTemplate, BoardTemplateFile, BoardView, CARDINALITY, type Capability, type CapabilityConfigPackage, CapabilityImpls, CapabilityKey, Cardinality, CardinalityFor, type ChromaticProjectConfig, Ci, CiRun, CiRunFilter, CiRunStatus, type ComposedPreset, ConfigError, ConfigFileError, ConnectionStringOptions, CreateAuthUserInput, Credentials, type CredentialsConfig, CredentialsInspection, DeployFunctionConfig, DeployFunctionResult, DeployScriptConfig, DeployScriptResult, Deployment, DeploymentProject, DeploymentProjectSettings, DeploymentRecord, DeploymentTarget, DeploymentTrigger, type DeriveProfileInput, type DevConfig, type DevServeConfig, DiscussionPatch, DiscussionPost, Dns, DnsRecord, DnsRecordRequest, DnsRecordType, type DocsConfig, type DoctorConfig, DuplicateDiscussion, ElevationRequiredError, EnsureDiscussionInput, EnsureRelayInput, EnsureRelayResult, EnsureReport, EnsureResult, EnsureWebhookResult, EnsuredDiscussion, EnsuredResource, EnsuredTunnel, type EnvConfig, Environment, EnvironmentEntry, type EnvironmentLayer, EnvironmentReviewer, Environments, Errors, type EslintConfig, ExportInfo, type FeatureResolver, type FeatureResolverConfig, type GitHubAppConfig, type HolocronConfig, type HolocronProfile, IdeaRecord, Ideas, type IdeasConfig, ImportOptions, ImportResult, InspectRelayInput, Issue, IssueComment, IssueOrder, IssuePriority, IssueRecord, IssueSearchFilter, IssueSelector, Issues, KNOWN_STACK_DEPS, LabelDef, type LayerTokenExpectation, LifecycleResult, LifecycleSlot, type LinksFile, type LoadedConfig, type LogConfig, Logs, LogsDataset, type MemberLink, MissingTokenError, Monitoring, MonitoringAlertChannelInput, MonitoringAlertChannelResult, MonitoringAlertChannelState, MonitoringAlertSettings, MonitoringAssertion, MonitoringAssertionComparison, MonitoringAssertionSource, MonitoringCheck, MonitoringCheckInput, MonitoringHttpMethod, MoveReport, type MultiEntry, NormalizedAuthUser, Notifications, NotificationsAccess, NotificationsApplicationLayout, NotificationsChannelLayout, NotificationsDelivery, NotificationsEveryoneLayout, NotificationsForumTag, NotificationsLayout, NotificationsLinksLayout, NotificationsMember, NotificationsMonitoringFeed, NotificationsOnboardingLayout, NotificationsPicture, NotificationsPinnedLayout, NotificationsPrsFeed, NotificationsServerLayout, NotificationsSignIn, NotificationsSignedIn, NotificationsWelcomeLayout, type OrgConfig, OrganizationSecretScope, type PackageJsonLike, PagesConfig, ParseWebhookInput, type PermissionRule, type PluginProbes, type PluginToken, type Probe, type ProbeContext, type ProbeRow, Projects, type ProviderAction, type ProviderActionContext, type ProviderActions, ProviderApiError, ProviderIdentity, type ProviderOptions, type ProviderRow, PullRequest, REQUIRED_CAPABILITIES, type RawProviderEntry, type RawProvidersConfig, type ReadKeysLimitedInput, RelayState, type RepoConfig, type RepoProperties, type RepoProtection, RepoRef, type RepoSecrets, type RepoSecretsDeploy, type RepoSecretsSync, RepoSettings, type RepoValidationConfig, type RepoVariables, type RepoVariablesSync, type RequestOptions, type ResolveTokenConfig, type ResolveTokenInput, ResolvedCapability, type ResolvedHolocronConfig, type ResolvedProviderEntry, type ResolvedProvidersConfig, type ResolvedTuple, type RestClient, type RestClientConfig, Ruleset, SecretAccess, SecretScope, SecretVisibility, Secrets, ServerInspection, type SingleEntry, Source, SourceBranch, SourceFile, SourceRepoInfo, SourceRulesetDetail, SourceSecurity, SourceTeamMember, type StackName, StatusCategory, Storage, StorageBranch, type StorybookDeployProject, SyncResult, type SyncRolesInput, type SyncRolesResult, type TaskEntry, type TaskEntryConfig, TeamEntry, TeamPermission, type TelemetryConfig, type TokenExpectation, type TokenExpectationFilter, type TokenLifetime, type TokenResolver, type TokenRotation, Tooling, ToolingDoctorReport, ToolingExportInput, ToolingExportIssue, ToolingExportResult, TrackerDoctorReport, TrackerUser, TunnelRoute, Tunnels, Vault, type VerifyTokenFailure, type VerifyTokenResult, type VerifyTokenSuccess, WebhookDashboardInfo, WebhookVerificationError, Wiki, WikiProvisionOpts, WikiProxyConfig, WorkerScriptState, Workers, type WorkflowWithConfig, compose, createRestClient, credentialsEnvironment, defineConfig, deriveCapabilities, deriveCompliance, deriveProfile, deriveStack, isMulti, loadConfig, missingCapabilities, readWorkspacePackageJsons, resolveConfig, resolveEntry, resolvePluginPackage, resolveValue };