@theholocron/cli 5.0.0-alpha.450 → 5.0.0-alpha.451

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/cli.mjs CHANGED
@@ -2,21 +2,21 @@
2
2
  import { createRequire } from "node:module";
3
3
  import { homedir, tmpdir } from "node:os";
4
4
  import path, { basename, dirname, isAbsolute, join, relative, resolve, sep } from "node:path";
5
- import { PREFIX, createEnvLookup, detectEnvironment, firstEnv, holocronEnv } from "@theholocron/env-utils/lookup";
5
+ import { PREFIX as PREFIX$1, createEnvLookup, detectEnvironment, firstEnv, holocronEnv } from "@theholocron/env-utils/lookup";
6
6
  import { ProviderApiError, ProviderApiError as ProviderApiError$1, createRestClient, onRetry } from "@theholocron/http-client";
7
- import { addGlobalOptions, groupMenu, tokenContext } from "@theholocron/kyber/flags";
7
+ import { addGlobalOptions, groupMenu as groupMenu$1, tokenContext as tokenContext$1 } from "@theholocron/kyber/flags";
8
8
  import { checkForUpdates } from "@theholocron/kyber/notifier";
9
- import { NonInteractiveError, commandFailureMessage, createProgress, createRetryNotice, declaredVsActual, describeError, logReason, openPath, pad, printCheckRows, printCheckSummary, sanitizeDetail, setProgressListener, statusRow, stripControl, style, summariseChecks, viewJson, withProgress, withSpinner } from "@theholocron/kyber/ui";
9
+ import { NonInteractiveError, commandFailureMessage, createProgress, createRetryNotice, declaredVsActual, describeError, logReason, openPath, pad as pad$1, printCheckRows, printCheckSummary, sanitizeDetail, setProgressListener, statusRow, stripControl, style, summariseChecks, viewJson, withProgress, withSpinner } from "@theholocron/kyber/ui";
10
10
  import { LOG_LEVELS } from "@theholocron/observability/core";
11
11
  import yargs from "yargs";
12
12
  import { hideBin } from "yargs/helpers";
13
13
  import { DRY_RUN_NOOP_EXIT_CODE, createCommandRegistry, createMenu, numeric } from "@theholocron/kyber/menu";
14
14
  import { Entry, findCredentials } from "@napi-rs/keyring";
15
- import { AuthError, DOTENV_FILE, copyToClipboard, createFeatureResolver, createKeyring, dotenvLine, findCredential, finishCredentialsFile, hasCredentials, isGitIgnored, readDotenvFile, resolveValue, resolveValue as resolveValue$2, setCredentials, writeCredentialsFile } from "@theholocron/kyber/secrets";
16
- import { DEFAULT_ORG, DOT_GITHUB_REPO, HOLOCRON_REPO, KNOWN_TASKS, KNOWN_WORKFLOWS, LEGACY_NAMES, PNPM_BUILTIN_COMMANDS, PRERELEASE_CHANNEL, RELEASE_BRANCHES, RESERVED_SCRIPT_NAMES, SUITES, TASKS, aggregateChecks, checkPackageScripts, createAlexignore, createAlexrc, createAstromech, createCommitMsg, createDco, createDependabot, createDevmoji, createEditorconfig, createEditorconfigChecker, createHeader, createLabeler, createPreCommit, createPrePush, createPrepareCommitMsg, createYamlignore, createYamllint, defaultListDirs, defaultPaths, defaultReadJson, deployOnRelease, describeTasks, extractPreviewConfig, frozenReusablePaths, generateThinCallerContent, hostedReusableWorkflows, isDeprecated, isTask, legacyCaller, legacyCallerFile, legacyGate, legacyWorkflowKey, localize, localizeActions, mergeScripts, readWorkspacePackages, resolveTaskName, reusableTemplates, scriptName, stampDeprecated, workflowFile, workflowKey, workflowKeys, workspacePackages } from "@theholocron/astromech";
15
+ import { AuthError, DOTENV_FILE, copyToClipboard, createFeatureResolver as createFeatureResolver$1, createKeyring, dotenvLine, findCredential, finishCredentialsFile, hasCredentials, isGitIgnored, readDotenvFile, resolveValue as resolveValue$1, resolveValue as resolveValue$2, setCredentials, writeCredentialsFile } from "@theholocron/kyber/secrets";
16
+ import { DEFAULT_ORG, DOT_GITHUB_REPO, HOLOCRON_REPO, KNOWN_TASKS, KNOWN_WORKFLOWS, LEGACY_NAMES, PNPM_BUILTIN_COMMANDS, PRERELEASE_CHANNEL, RELEASE_BRANCHES, RESERVED_SCRIPT_NAMES, SUITES, TASKS, aggregateChecks, checkPackageScripts, createAlexignore, createAlexrc, createAstromech, createCommitMsg, createDco, createDependabot, createDevmoji, createEditorconfig, createEditorconfigChecker, createHeader, createLabeler, createPreCommit, createPrePush, createPrepareCommitMsg, createYamlignore, createYamllint, defaultListDirs, defaultPaths, defaultReadJson, deployOnRelease, describeTasks, extractPreviewConfig, frozenReusablePaths, generateThinCallerContent, hostedReusableWorkflows, isDeprecated, isTask, legacyCaller, legacyCallerFile, legacyGate, legacyWorkflowKey, localize, localizeActions, mergeScripts, readWorkspacePackages, resolveTaskName, reusableTemplates, scriptName, stampDeprecated, workflowFile, workflowKey, workflowKeys, workspacePackages as workspacePackages$1 } from "@theholocron/astromech";
17
17
  import { loadTasksConfig } from "@theholocron/astromech/config";
18
18
  import { ConfigError, ConfigError as ConfigError$1, createConfigSystem, lastWins, mergeByKey, shallowMerge, union } from "@theholocron/kyber/config";
19
- import { LoaderError, assertPluginsResolvable, createPluginSystem, isModuleNotFound, resolvePluginPackage } from "@theholocron/kyber/plugins";
19
+ import { LoaderError, assertPluginsResolvable as assertPluginsResolvable$1, createPluginSystem, isModuleNotFound, resolvePluginPackage as resolvePluginPackage$1 } from "@theholocron/kyber/plugins";
20
20
  import { readGitRemote, updateGitignore, upsertManagedBlock } from "@theholocron/git-utils";
21
21
  import { bumpCatalogPins, discoverWorkspacePackages, parseCatalogs, readPackageJson, readPackageJsonSync, resolveWorkspaceGlobs } from "@theholocron/pkg-utils";
22
22
  import { createCliLogger, createCliTelemetry } from "@theholocron/kyber/observability";
@@ -39,7 +39,7 @@ import { ADR_DIR, ADR_STATUSES, CLOSED_STATUSES, SPEC_DIRS, SPEC_STATUSES, WITHD
39
39
  import { loadConfigPath } from "@theholocron/datapad";
40
40
  import { moveMajorTag } from "@theholocron/kyber/git";
41
41
  import { lintCommitMsgFile } from "@theholocron/astromech/lint";
42
- import { fetchLatestFromNpm, runUpgradeNode } from "@theholocron/astromech/upgrade";
42
+ import { fetchLatestFromNpm, runUpgradeNode as runUpgradeNode$1 } from "@theholocron/astromech/upgrade";
43
43
  // src/auth/auth.ts
44
44
  /**
45
45
  * The CLI's credentials: the OS keyring every plugin's bootstrap token lives in, and the two token resolvers built on
@@ -67,8 +67,8 @@ const keyring = createKeyring({
67
67
  * `credentials` providers' variable of that name, the keyring. No broad-token fallback; if the feature's token is absent
68
68
  * the operation fails with a message naming the exact variable to set and `holocron new token`.
69
69
  */
70
- function createFeatureResolver$1(config) {
71
- return Object.assign(createFeatureResolver({
70
+ function createFeatureResolver(config) {
71
+ return Object.assign(createFeatureResolver$1({
72
72
  ...config,
73
73
  vendor: config.vendor ?? "GitHub",
74
74
  setCommand: (key) => `holocron new token ${key} <token>`,
@@ -1208,7 +1208,7 @@ const getEntry = registry.getEntry;
1208
1208
  */
1209
1209
  const menu = createMenu({
1210
1210
  bin: "holocron",
1211
- envPrefix: PREFIX
1211
+ envPrefix: PREFIX$1
1212
1212
  });
1213
1213
  const launchMenu = menu.launchMenu;
1214
1214
  /** The env var a Holocron dry-run preview child gets (`HOLOCRON_DRY_RUN_PREVIEW`). */
@@ -1291,7 +1291,7 @@ function groupByNamespace(taskNames) {
1291
1291
  const byMenuOrder = (a, b) => {
1292
1292
  const ia = RUN_MENU_NAMESPACE_ORDER.indexOf(a);
1293
1293
  const ib = RUN_MENU_NAMESPACE_ORDER.indexOf(b);
1294
- if (ia !== -1 || ib !== -1) return (ia === -1 ? Infinity : ia) - (ib === -1 ? Infinity : ib);
1294
+ if (ia !== -1 || ib !== -1) return (ia === -1 ? 1e400 : ia) - (ib === -1 ? 1e400 : ib);
1295
1295
  return 0;
1296
1296
  };
1297
1297
  for (const key of [...groups.keys()].sort(byMenuOrder)) ordered.set(key, groups.get(key));
@@ -1346,7 +1346,7 @@ async function launchGroupMenu(parent, argv) {
1346
1346
  });
1347
1347
  }
1348
1348
  /** The hidden `$0` of a command group: bare `holocron <group>` opens the menu at that group. */
1349
- const groupMenu$1 = (parent) => groupMenu(parent, launchGroupMenu);
1349
+ const groupMenu = (parent) => groupMenu$1(parent, launchGroupMenu);
1350
1350
  // src/credentials-environments/derives-environment/derives-environment.ts
1351
1351
  /** The providers whose `credentials` entry may leave `environment` out and have it derived (#2063). */
1352
1352
  const DERIVING = /* @__PURE__ */ new Set(["1password"]);
@@ -1466,16 +1466,16 @@ function layerEnvironment(slug, layer) {
1466
1466
  */
1467
1467
  function validateEnvironmentChoice(entry, what, required = true) {
1468
1468
  const { environment, layer } = entry;
1469
- if (environment !== void 0 && layer !== void 0) throw new ConfigError(`${what} sets both \`layer\` and \`environment\`: name the Environment one way`);
1469
+ if (environment !== void 0 && layer !== void 0) throw new ConfigError$1(`${what} sets both \`layer\` and \`environment\`: name the Environment one way`);
1470
1470
  if (layer !== void 0) {
1471
- if (!isEnvironmentLayer(layer)) throw new ConfigError(`${what} has \`layer\` ${JSON.stringify(layer)}: use ${ENVIRONMENT_LAYERS.map((l) => `"${l}"`).join(", ")}, or \`environment\` for a literal name`);
1471
+ if (!isEnvironmentLayer(layer)) throw new ConfigError$1(`${what} has \`layer\` ${JSON.stringify(layer)}: use ${ENVIRONMENT_LAYERS.map((l) => `"${l}"`).join(", ")}, or \`environment\` for a literal name`);
1472
1472
  return layer;
1473
1473
  }
1474
1474
  if (environment !== void 0) {
1475
- if (typeof environment !== "string" || environment.trim() === "") throw new ConfigError(`${what} needs the name of a vault environment, got an empty \`environment\``);
1475
+ if (typeof environment !== "string" || environment.trim() === "") throw new ConfigError$1(`${what} needs the name of a vault environment, got an empty \`environment\``);
1476
1476
  return environment;
1477
1477
  }
1478
- if (required) throw new ConfigError(`${what} needs the name of a vault environment (\`environment\`) or a \`layer\``);
1478
+ if (required) throw new ConfigError$1(`${what} needs the name of a vault environment (\`environment\`) or a \`layer\``);
1479
1479
  }
1480
1480
  // src/credentials-environments/repo-slug/repo-slug.ts
1481
1481
  /**
@@ -1484,7 +1484,7 @@ function validateEnvironmentChoice(entry, what, required = true) {
1484
1484
  */
1485
1485
  async function repoSlug(cwd, exec) {
1486
1486
  const remote = await readGitRemote(cwd, exec ? { exec } : {});
1487
- if (!remote) throw new ConfigError(`cannot derive the 1Password Environment name: the \`origin\` remote of ${cwd} is missing or not an owner/repo URL. Give the \`credentials\` provider an \`environment\` option to name it.`);
1487
+ if (!remote) throw new ConfigError$1(`cannot derive the 1Password Environment name: the \`origin\` remote of ${cwd} is missing or not an owner/repo URL. Give the \`credentials\` provider an \`environment\` option to name it.`);
1488
1488
  return remote.slug;
1489
1489
  }
1490
1490
  // src/credentials-environments/unsynced-layer/unsynced-layer.ts
@@ -1514,12 +1514,12 @@ function unsyncedLayerMessage(what, layer) {
1514
1514
  */
1515
1515
  async function assertSyncableLayer(id, input) {
1516
1516
  if (isEnvironmentLayer(id)) {
1517
- if (isUnsyncedLayer(id)) throw new ConfigError(unsyncedLayerMessage(`\`sync secrets --env ${id}\``, id));
1517
+ if (isUnsyncedLayer(id)) throw new ConfigError$1(unsyncedLayerMessage(`\`sync secrets --env ${id}\``, id));
1518
1518
  return;
1519
1519
  }
1520
1520
  const slug = await repoSlug(input.repoRoot, input.gitExec).catch(() => void 0);
1521
1521
  if (slug === void 0) return;
1522
- for (const layer of UNSYNCED_LAYERS) if (id === layerEnvironment(slug, layer)) throw new ConfigError(unsyncedLayerMessage(`\`sync secrets --env\` for ${JSON.stringify(id)}`, layer));
1522
+ for (const layer of UNSYNCED_LAYERS) if (id === layerEnvironment(slug, layer)) throw new ConfigError$1(unsyncedLayerMessage(`\`sync secrets --env\` for ${JSON.stringify(id)}`, layer));
1523
1523
  }
1524
1524
  // src/config/validate-secrets-deploy/validate-secrets-deploy.ts
1525
1525
  /**
@@ -1534,11 +1534,11 @@ function validateSecretsDeploy(secrets) {
1534
1534
  for (const entry of secrets?.deploy ?? []) {
1535
1535
  const named = validateEnvironmentChoice(entry, "a `repo.secrets.deploy` entry");
1536
1536
  const label = `\`repo.secrets.deploy\` entry for ${JSON.stringify(named)}`;
1537
- if (isUnsyncedLayer(entry.layer)) throw new ConfigError(unsyncedLayerMessage(label, entry.layer));
1537
+ if (isUnsyncedLayer(entry.layer)) throw new ConfigError$1(unsyncedLayerMessage(label, entry.layer));
1538
1538
  const { keys, prefix } = entry;
1539
- if (keys !== void 0 && (!Array.isArray(keys) || keys.some((k) => typeof k !== "string" || k === ""))) throw new ConfigError(`${label} has \`keys\` that is not a list of key names`);
1540
- if (prefix !== void 0 && (typeof prefix !== "string" || prefix === "")) throw new ConfigError(`${label} has an empty \`prefix\``);
1541
- if ((keys === void 0 || keys.length === 0) && prefix === void 0) throw new ConfigError(`${label} needs \`keys\` (a list of names) or \`prefix\` (such as "SENTINEL_"): a deployment never receives every key`);
1539
+ if (keys !== void 0 && (!Array.isArray(keys) || keys.some((k) => typeof k !== "string" || k === ""))) throw new ConfigError$1(`${label} has \`keys\` that is not a list of key names`);
1540
+ if (prefix !== void 0 && (typeof prefix !== "string" || prefix === "")) throw new ConfigError$1(`${label} has an empty \`prefix\``);
1541
+ if ((keys === void 0 || keys.length === 0) && prefix === void 0) throw new ConfigError$1(`${label} needs \`keys\` (a list of names) or \`prefix\` (such as "SENTINEL_"): a deployment never receives every key`);
1542
1542
  }
1543
1543
  }
1544
1544
  // src/config/validate-secrets-sync/validate-secrets-sync.ts
@@ -1559,26 +1559,26 @@ function validateSecretsSync(secrets) {
1559
1559
  for (const entry of secrets?.sync ?? []) {
1560
1560
  const named = validateEnvironmentChoice(entry, "a `repo.secrets.sync` entry");
1561
1561
  const label = `\`repo.secrets.sync\` entry for ${JSON.stringify(named)}`;
1562
- if (isUnsyncedLayer(entry.layer)) throw new ConfigError(unsyncedLayerMessage(label, entry.layer));
1562
+ if (isUnsyncedLayer(entry.layer)) throw new ConfigError$1(unsyncedLayerMessage(label, entry.layer));
1563
1563
  const scope = entry.scope ?? "repo";
1564
1564
  if (!scope.startsWith("org=")) {
1565
- if (entry.visibility !== void 0 || entry.repos !== void 0) throw new ConfigError(`${label} sets \`visibility\` or \`repos\` on scope ${JSON.stringify(scope)}: only an organization scope ("org=<name>") has readers to name`);
1565
+ if (entry.visibility !== void 0 || entry.repos !== void 0) throw new ConfigError$1(`${label} sets \`visibility\` or \`repos\` on scope ${JSON.stringify(scope)}: only an organization scope ("org=<name>") has readers to name`);
1566
1566
  continue;
1567
1567
  }
1568
1568
  const org = scope.slice(4);
1569
- if (entry.visibility !== void 0 && entry.visibility !== "selected") throw new ConfigError(`${label} has visibility ${JSON.stringify(entry.visibility)}: a secret is never readable by every repository, so use "selected" with \`repos\``);
1569
+ if (entry.visibility !== void 0 && entry.visibility !== "selected") throw new ConfigError$1(`${label} has visibility ${JSON.stringify(entry.visibility)}: a secret is never readable by every repository, so use "selected" with \`repos\``);
1570
1570
  const { repos } = entry;
1571
- if (!Array.isArray(repos) || repos.length === 0 || repos.some((r) => typeof r !== "string" || !/^(?:[^/]+\/)?[^/]+$/.test(r))) throw new ConfigError(`${label} needs \`repos\`, a non-empty list of the repositories (\`name\` or \`<org>/name\`) that can read the secrets: an organization secret is never readable by every repository`);
1571
+ if (!Array.isArray(repos) || repos.length === 0 || repos.some((r) => typeof r !== "string" || !/^(?:[^/]+\/)?[^/]+$/.test(r))) throw new ConfigError$1(`${label} needs \`repos\`, a non-empty list of the repositories (\`name\` or \`<org>/name\`) that can read the secrets: an organization secret is never readable by every repository`);
1572
1572
  const names = repos.map((r) => {
1573
1573
  const slash = r.indexOf("/");
1574
- if ((slash < 0 ? org : r.slice(0, slash)) !== org) throw new ConfigError(`${label} lists repository ${JSON.stringify(r)}: use a name in ${JSON.stringify(org)}, such as "holocron"`);
1574
+ if ((slash < 0 ? org : r.slice(0, slash)) !== org) throw new ConfigError$1(`${label} lists repository ${JSON.stringify(r)}: use a name in ${JSON.stringify(org)}, such as "holocron"`);
1575
1575
  return r.slice(slash + 1);
1576
1576
  });
1577
1577
  const list = [...new Set(names)].sort().join(", ");
1578
1578
  for (const key of entry.keys ?? []) {
1579
1579
  const id = `${org}/${key.toUpperCase()}`;
1580
1580
  const seen = readers.get(id);
1581
- if (seen !== void 0 && seen !== list) throw new ConfigError(`${label} lists ${key}, which another \`repo.secrets.sync\` entry at org=${org} gives different readers [${seen}]: a secret has one reader list`);
1581
+ if (seen !== void 0 && seen !== list) throw new ConfigError$1(`${label} lists ${key}, which another \`repo.secrets.sync\` entry at org=${org} gives different readers [${seen}]: a secret has one reader list`);
1582
1582
  readers.set(id, list);
1583
1583
  }
1584
1584
  }
@@ -1597,18 +1597,18 @@ const key = (name) => name.toUpperCase();
1597
1597
  function validateVariablesSync(variables) {
1598
1598
  const entries = variables?.sync;
1599
1599
  if (!entries || entries.length === 0) return;
1600
- if (variables?.prune === true) throw new ConfigError("`repo.variables.prune` cannot be combined with `repo.variables.sync`: pruning would delete the variables the sync writes");
1600
+ if (variables?.prune === true) throw new ConfigError$1("`repo.variables.prune` cannot be combined with `repo.variables.sync`: pruning would delete the variables the sync writes");
1601
1601
  for (const entry of entries) {
1602
1602
  const named = validateEnvironmentChoice(entry, "a `repo.variables.sync` entry");
1603
1603
  const label = `\`repo.variables.sync\` entry for ${JSON.stringify(named)}`;
1604
- if (!Array.isArray(entry.keys) || entry.keys.length === 0 || entry.keys.some((k) => typeof k !== "string" || k === "")) throw new ConfigError(`${label} needs \`keys\`, a list of variable names`);
1604
+ if (!Array.isArray(entry.keys) || entry.keys.length === 0 || entry.keys.some((k) => typeof k !== "string" || k === "")) throw new ConfigError$1(`${label} needs \`keys\`, a list of variable names`);
1605
1605
  const scope = entry.scope ?? "repo";
1606
1606
  const org = scope.startsWith("org=") ? scope.slice(4) : void 0;
1607
- if (scope !== "repo" && (org === void 0 || org === "")) throw new ConfigError(`${label} has scope ${JSON.stringify(scope)}: use "repo" or "org=<name>"`);
1608
- if (entry.visibility !== void 0 && entry.visibility !== "all" && entry.visibility !== "private") throw new ConfigError(`${label} has visibility ${JSON.stringify(entry.visibility)}: use "all" or "private"`);
1607
+ if (scope !== "repo" && (org === void 0 || org === "")) throw new ConfigError$1(`${label} has scope ${JSON.stringify(scope)}: use "repo" or "org=<name>"`);
1608
+ if (entry.visibility !== void 0 && entry.visibility !== "all" && entry.visibility !== "private") throw new ConfigError$1(`${label} has visibility ${JSON.stringify(entry.visibility)}: use "all" or "private"`);
1609
1609
  const literal = new Set(Object.keys((org === void 0 ? variables?.repo : variables?.org) ?? {}).map(key));
1610
1610
  const both = entry.keys.filter((k) => literal.has(key(k)));
1611
- if (both.length > 0) throw new ConfigError(`${label} lists ${both.join(", ")}, which \`repo.variables.${org === void 0 ? "repo" : "org"}\` also gives a value: keep one source per name`);
1611
+ if (both.length > 0) throw new ConfigError$1(`${label} lists ${both.join(", ")}, which \`repo.variables.${org === void 0 ? "repo" : "org"}\` also gives a value: keep one source per name`);
1612
1612
  }
1613
1613
  }
1614
1614
  // src/config/config/config.ts
@@ -1619,9 +1619,9 @@ const COMMUNITY_PREFIX = "holocron-plugin-";
1619
1619
  * Fully-qualified names (scoped or not) are honored verbatim, which
1620
1620
  * is how third-party plugins published outside the org work.
1621
1621
  */
1622
- function resolvePluginPackage$1(provider) {
1623
- if (!provider) throw new ConfigError$1("provider name is empty");
1624
- return resolvePluginPackage(provider, PLUGIN_PREFIX, COMMUNITY_PREFIX);
1622
+ function resolvePluginPackage(provider) {
1623
+ if (!provider) throw new ConfigError("provider name is empty");
1624
+ return resolvePluginPackage$1(provider, PLUGIN_PREFIX, COMMUNITY_PREFIX);
1625
1625
  }
1626
1626
  /** A bare `[provider, options]` tuple, with both elements present? */
1627
1627
  function isOptionsTuple(value) {
@@ -1634,13 +1634,13 @@ function isOptionsTuple(value) {
1634
1634
  function normalizeEntry(entry) {
1635
1635
  if (typeof entry === "string") return {
1636
1636
  provider: entry,
1637
- packageName: resolvePluginPackage$1(entry),
1637
+ packageName: resolvePluginPackage(entry),
1638
1638
  options: {}
1639
1639
  };
1640
1640
  const [provider, options] = entry;
1641
1641
  return {
1642
1642
  provider,
1643
- packageName: resolvePluginPackage$1(provider),
1643
+ packageName: resolvePluginPackage(provider),
1644
1644
  options
1645
1645
  };
1646
1646
  }
@@ -1648,13 +1648,13 @@ function normalizeEntry(entry) {
1648
1648
  function resolveEntry(key, raw) {
1649
1649
  const cardinality = CARDINALITY[key];
1650
1650
  if (typeof raw === "string") {
1651
- if (cardinality === "many") throw new ConfigError$1(`\`${key}\` accepts multiple providers; wrap a single one in an array: ["${raw}"]`);
1651
+ if (cardinality === "many") throw new ConfigError(`\`${key}\` accepts multiple providers; wrap a single one in an array: ["${raw}"]`);
1652
1652
  return {
1653
1653
  cardinality: "single",
1654
1654
  tuple: normalizeEntry(raw)
1655
1655
  };
1656
1656
  }
1657
- if (!Array.isArray(raw)) throw new ConfigError$1(`\`${key}\` entry must be a string or array, got ${typeof raw}`);
1657
+ if (!Array.isArray(raw)) throw new ConfigError(`\`${key}\` entry must be a string or array, got ${typeof raw}`);
1658
1658
  if (isOptionsTuple(raw)) {
1659
1659
  if (cardinality === "many") return {
1660
1660
  cardinality: "many",
@@ -1665,13 +1665,13 @@ function resolveEntry(key, raw) {
1665
1665
  tuple: normalizeEntry(raw)
1666
1666
  };
1667
1667
  }
1668
- if (cardinality === "single") throw new ConfigError$1(`\`${key}\` accepts exactly one provider; got a multi-provider list with ${raw.length} entries`);
1668
+ if (cardinality === "single") throw new ConfigError(`\`${key}\` accepts exactly one provider; got a multi-provider list with ${raw.length} entries`);
1669
1669
  return {
1670
1670
  cardinality: "many",
1671
1671
  tuples: raw.map((entry, idx) => {
1672
1672
  if (typeof entry === "string") return normalizeEntry(entry);
1673
1673
  if (isOptionsTuple(entry)) return normalizeEntry(entry);
1674
- throw new ConfigError$1(`\`${key}[${idx}]\` must be a provider string or [provider, options] tuple`);
1674
+ throw new ConfigError(`\`${key}[${idx}]\` must be a provider string or [provider, options] tuple`);
1675
1675
  })
1676
1676
  };
1677
1677
  }
@@ -1679,11 +1679,11 @@ function resolveEntry(key, raw) {
1679
1679
  const HOSTNAME = /^[A-Za-z0-9]([A-Za-z0-9-]*[A-Za-z0-9])?(\.[A-Za-z0-9]([A-Za-z0-9-]*[A-Za-z0-9])?)+$/;
1680
1680
  /** Throws a {@link ConfigError} naming the first thing wrong with the `githubApps` list. */
1681
1681
  function validateGitHubApps(apps) {
1682
- if (!Array.isArray(apps)) throw new ConfigError$1("`githubApps` must be a list of { name, manifest, environment }");
1682
+ if (!Array.isArray(apps)) throw new ConfigError("`githubApps` must be a list of { name, manifest, environment }");
1683
1683
  apps.forEach((app, idx) => {
1684
1684
  for (const key of ["name", "manifest"]) {
1685
1685
  const value = app?.[key];
1686
- if (typeof value !== "string" || value.trim() === "") throw new ConfigError$1(`\`githubApps[${idx}].${key}\` must be a non-empty string`);
1686
+ if (typeof value !== "string" || value.trim() === "") throw new ConfigError(`\`githubApps[${idx}].${key}\` must be a non-empty string`);
1687
1687
  }
1688
1688
  validateEnvironmentChoice(app, `\`githubApps[${idx}]\``);
1689
1689
  });
@@ -1692,11 +1692,11 @@ function validateGitHubApps(apps) {
1692
1692
  function validateIdeas(ideas) {
1693
1693
  const nonEmpty = (value) => typeof value === "string" && value.trim() !== "";
1694
1694
  const isObject = (value) => typeof value === "object" && value !== null && !Array.isArray(value);
1695
- if (!isObject(ideas)) throw new ConfigError$1("`ideas` must be an object: { states?, dir? (deprecated) }");
1696
- if (ideas.dir !== void 0 && !nonEmpty(ideas.dir)) throw new ConfigError$1("`ideas.dir` must be the path of the notes folder, got an empty value");
1695
+ if (!isObject(ideas)) throw new ConfigError("`ideas` must be an object: { states?, dir? (deprecated) }");
1696
+ if (ideas.dir !== void 0 && !nonEmpty(ideas.dir)) throw new ConfigError("`ideas.dir` must be the path of the notes folder, got an empty value");
1697
1697
  if (ideas.states !== void 0) {
1698
- if (!isObject(ideas.states)) throw new ConfigError$1("`ideas.states` must be an object: { file? }");
1699
- if (ideas.states.file !== void 0 && !nonEmpty(ideas.states.file)) throw new ConfigError$1("`ideas.states.file` must be a state name, got an empty value");
1698
+ if (!isObject(ideas.states)) throw new ConfigError("`ideas.states` must be an object: { file? }");
1699
+ if (ideas.states.file !== void 0 && !nonEmpty(ideas.states.file)) throw new ConfigError("`ideas.states.file` must be a state name, got an empty value");
1700
1700
  }
1701
1701
  }
1702
1702
  /** Throws a {@link ConfigError} naming the first thing wrong with the `dev` block. */
@@ -1704,17 +1704,17 @@ function validateDev(dev) {
1704
1704
  const nonEmpty = (value) => typeof value === "string" && value.trim() !== "";
1705
1705
  validateEnvironmentChoice(dev, "`dev`", false);
1706
1706
  if (dev.tunnel !== void 0) {
1707
- if (!nonEmpty(dev.tunnel.name)) throw new ConfigError$1("`dev.tunnel.name` must be a name, got an empty value");
1708
- if (typeof dev.tunnel.hostname !== "string" || !HOSTNAME.test(dev.tunnel.hostname)) throw new ConfigError$1(`\`dev.tunnel.hostname\` must be a hostname such as sentinel-dev.example.dev (no scheme or path), got ${JSON.stringify(dev.tunnel.hostname)}`);
1707
+ if (!nonEmpty(dev.tunnel.name)) throw new ConfigError("`dev.tunnel.name` must be a name, got an empty value");
1708
+ if (typeof dev.tunnel.hostname !== "string" || !HOSTNAME.test(dev.tunnel.hostname)) throw new ConfigError(`\`dev.tunnel.hostname\` must be a hostname such as sentinel-dev.example.dev (no scheme or path), got ${JSON.stringify(dev.tunnel.hostname)}`);
1709
1709
  }
1710
- if (dev.port !== void 0 && !(Number.isInteger(dev.port) && dev.port >= 1 && dev.port <= 65535)) throw new ConfigError$1(`\`dev.port\` must be a port from 1 to 65535, got ${JSON.stringify(dev.port)}`);
1711
- if (dev.command !== void 0 && !(Array.isArray(dev.command) && dev.command.length > 0 && dev.command.every(nonEmpty))) throw new ConfigError$1("`dev.command` must be the program and its arguments, e.g. [\"pnpm\", \"run\", \"serve\"]");
1710
+ if (dev.port !== void 0 && !(Number.isInteger(dev.port) && dev.port >= 1 && dev.port <= 65535)) throw new ConfigError(`\`dev.port\` must be a port from 1 to 65535, got ${JSON.stringify(dev.port)}`);
1711
+ if (dev.command !== void 0 && !(Array.isArray(dev.command) && dev.command.length > 0 && dev.command.every(nonEmpty))) throw new ConfigError("`dev.command` must be the program and its arguments, e.g. [\"pnpm\", \"run\", \"serve\"]");
1712
1712
  if (dev.serve !== void 0) {
1713
1713
  const { serve } = dev;
1714
- if (!nonEmpty(serve.handler)) throw new ConfigError$1("`dev.serve.handler` must be the path of the module that exports the handler");
1715
- if (serve.export !== void 0 && !nonEmpty(serve.export)) throw new ConfigError$1("`dev.serve.export` must be the name of the handler's export, got an empty value");
1716
- if (serve.required !== void 0 && !(Array.isArray(serve.required) && serve.required.every(nonEmpty))) throw new ConfigError$1("`dev.serve.required` must be a list of variable names");
1717
- if (serve.logging !== void 0 && !(nonEmpty(serve.logging.tokenVar) && nonEmpty(serve.logging.datasetVar))) throw new ConfigError$1("`dev.serve.logging` needs a `tokenVar` and a `datasetVar`, both variable names");
1714
+ if (!nonEmpty(serve.handler)) throw new ConfigError("`dev.serve.handler` must be the path of the module that exports the handler");
1715
+ if (serve.export !== void 0 && !nonEmpty(serve.export)) throw new ConfigError("`dev.serve.export` must be the name of the handler's export, got an empty value");
1716
+ if (serve.required !== void 0 && !(Array.isArray(serve.required) && serve.required.every(nonEmpty))) throw new ConfigError("`dev.serve.required` must be a list of variable names");
1717
+ if (serve.logging !== void 0 && !(nonEmpty(serve.logging.tokenVar) && nonEmpty(serve.logging.datasetVar))) throw new ConfigError("`dev.serve.logging` needs a `tokenVar` and a `datasetVar`, both variable names");
1718
1718
  }
1719
1719
  }
1720
1720
  /** Throws a {@link ConfigError} when the `vault` entry's options name an Environment two ways, or a `layer` that is no layer word. */
@@ -1739,24 +1739,24 @@ function credentialsEnvironment(tuple, config) {
1739
1739
  }
1740
1740
  /** Validates a raw `holocron.config` and resolves its provider entries; throws `ConfigError` when `name` or `providers` is missing or an entry is malformed. */
1741
1741
  function resolveConfig(raw) {
1742
- if (!raw.name) throw new ConfigError$1("`name` is required");
1743
- if (!raw.providers || typeof raw.providers !== "object") throw new ConfigError$1("`providers` block is required");
1742
+ if (!raw.name) throw new ConfigError("`name` is required");
1743
+ if (!raw.providers || typeof raw.providers !== "object") throw new ConfigError("`providers` block is required");
1744
1744
  const providers = {};
1745
1745
  for (const [key, entry] of Object.entries(raw.providers)) {
1746
1746
  if (entry === void 0) continue;
1747
1747
  providers[key] = resolveEntry(key, entry);
1748
1748
  }
1749
- for (const required of REQUIRED_CAPABILITIES) if (!providers[required]) throw new ConfigError$1(`required capability \`${required}\` is missing from providers`);
1749
+ for (const required of REQUIRED_CAPABILITIES) if (!providers[required]) throw new ConfigError(`required capability \`${required}\` is missing from providers`);
1750
1750
  let docs;
1751
1751
  if (raw.docs !== void 0) {
1752
- if (!raw.docs.build) throw new ConfigError$1("`docs.build` is required when `docs` is set");
1752
+ if (!raw.docs.build) throw new ConfigError("`docs.build` is required when `docs` is set");
1753
1753
  docs = raw.docs;
1754
1754
  }
1755
1755
  const docsCoverage = raw.repoValidation?.docsCoverage;
1756
- if (docsCoverage !== void 0 && !DOCS_COVERAGE_MODES.includes(docsCoverage)) throw new ConfigError$1(`\`repoValidation.docsCoverage\` must be one of ${DOCS_COVERAGE_MODES.map((m) => `"${m}"`).join(", ")}, got ${JSON.stringify(docsCoverage)}`);
1756
+ if (docsCoverage !== void 0 && !DOCS_COVERAGE_MODES.includes(docsCoverage)) throw new ConfigError(`\`repoValidation.docsCoverage\` must be one of ${DOCS_COVERAGE_MODES.map((m) => `"${m}"`).join(", ")}, got ${JSON.stringify(docsCoverage)}`);
1757
1757
  if (raw.credentials !== void 0) {
1758
1758
  const environment = raw.credentials.environment;
1759
- if (typeof environment !== "string" || environment.trim() === "") throw new ConfigError$1("`credentials.environment` must be the name of an environment, got an empty value");
1759
+ if (typeof environment !== "string" || environment.trim() === "") throw new ConfigError("`credentials.environment` must be the name of an environment, got an empty value");
1760
1760
  }
1761
1761
  if (raw.dev !== void 0) validateDev(raw.dev);
1762
1762
  if (raw.githubApps !== void 0) validateGitHubApps(raw.githubApps);
@@ -1768,8 +1768,8 @@ function resolveConfig(raw) {
1768
1768
  const credentialsEntry = providers.credentials;
1769
1769
  if (credentialsEntry?.cardinality === "many") for (const tuple of credentialsEntry.tuples) {
1770
1770
  const own = tuple.options.environment;
1771
- if (own !== void 0 && (typeof own !== "string" || own.trim() === "")) throw new ConfigError$1(`the \`environment\` option of the \`${tuple.provider}\` credentials provider must be the name of an environment, got an empty value`);
1772
- if (credentialsEnvironment(tuple, raw) === void 0 && !derivesEnvironment(tuple.provider)) throw new ConfigError$1(`the \`${tuple.provider}\` credentials provider has no environment to read: give it an \`environment\` option or set \`credentials.environment\``);
1771
+ if (own !== void 0 && (typeof own !== "string" || own.trim() === "")) throw new ConfigError(`the \`environment\` option of the \`${tuple.provider}\` credentials provider must be the name of an environment, got an empty value`);
1772
+ if (credentialsEnvironment(tuple, raw) === void 0 && !derivesEnvironment(tuple.provider)) throw new ConfigError(`the \`${tuple.provider}\` credentials provider has no environment to read: give it an \`environment\` option or set \`credentials.environment\``);
1773
1773
  }
1774
1774
  const homepage = raw.homepage ?? (docs?.domain ? `https://${docs.domain}/` : void 0);
1775
1775
  return {
@@ -1964,19 +1964,19 @@ function withLayout(entry, layout) {
1964
1964
  * not set or already has an inline `layout`.
1965
1965
  */
1966
1966
  function placeNotifications(raw, area) {
1967
- if (typeof area.value !== "object" || area.value === null || Array.isArray(area.value)) throw new ConfigError(`${area.path} must export the notifications layout as an object`);
1967
+ if (typeof area.value !== "object" || area.value === null || Array.isArray(area.value)) throw new ConfigError$1(`${area.path} must export the notifications layout as an object`);
1968
1968
  const entry = raw.providers?.notifications;
1969
1969
  const hint = `Set it in one place: remove the inline \`layout\` or delete ${area.path}`;
1970
1970
  let placed;
1971
- if (entry === void 0) throw new ConfigError(`${area.path} holds the notifications layout, but providers.notifications is not set. Add \`notifications: ["discord", { guildId }]\` to providers`);
1971
+ if (entry === void 0) throw new ConfigError$1(`${area.path} holds the notifications layout, but providers.notifications is not set. Add \`notifications: ["discord", { guildId }]\` to providers`);
1972
1972
  else if (Array.isArray(entry) && !isTuple$1(entry)) {
1973
1973
  const index = findDiscord(entry);
1974
- if (index === -1) throw new ConfigError(`${area.path} holds the notifications layout, but providers.notifications has no discord entry`);
1974
+ if (index === -1) throw new ConfigError$1(`${area.path} holds the notifications layout, but providers.notifications has no discord entry`);
1975
1975
  const target = entry[index];
1976
- if (isTuple$1(target) && target[1].layout !== void 0) throw new ConfigError(`the notifications layout is set in providers.notifications and in ${area.path}. ${hint}`);
1976
+ if (isTuple$1(target) && target[1].layout !== void 0) throw new ConfigError$1(`the notifications layout is set in providers.notifications and in ${area.path}. ${hint}`);
1977
1977
  placed = entry.map((item, i) => i === index ? withLayout(item, area.value) : item);
1978
1978
  } else {
1979
- if (isTuple$1(entry) && entry[1].layout !== void 0) throw new ConfigError(`the notifications layout is set in providers.notifications and in ${area.path}. ${hint}`);
1979
+ if (isTuple$1(entry) && entry[1].layout !== void 0) throw new ConfigError$1(`the notifications layout is set in providers.notifications and in ${area.path}. ${hint}`);
1980
1980
  placed = withLayout(entry, area.value);
1981
1981
  }
1982
1982
  return {
@@ -2002,16 +2002,16 @@ const isTuple = (entry) => Array.isArray(entry) && entry.length === 2 && typeof
2002
2002
  * each with a closed list of string options.
2003
2003
  */
2004
2004
  function validate(area) {
2005
- if (!isObject$1(area.value)) throw new ConfigError(`${area.path} must export the org settings as an object`);
2005
+ if (!isObject$1(area.value)) throw new ConfigError$1(`${area.path} must export the org settings as an object`);
2006
2006
  const { domain, ...rest } = area.value;
2007
- if (domain !== void 0 && (typeof domain !== "string" || domain === "")) throw new ConfigError(`${area.path}: "domain" must be a non-empty string`);
2007
+ if (domain !== void 0 && (typeof domain !== "string" || domain === "")) throw new ConfigError$1(`${area.path}: "domain" must be a non-empty string`);
2008
2008
  for (const [provider, options] of Object.entries(rest)) {
2009
2009
  const allowed = ORG_OPTIONS[provider];
2010
- if (allowed === void 0) throw new ConfigError(`${area.path} has an unknown provider "${provider}". Known: ${Object.keys(ORG_OPTIONS).join(", ")}`);
2011
- if (!isObject$1(options)) throw new ConfigError(`${area.path}: "${provider}" must be an object of options`);
2010
+ if (allowed === void 0) throw new ConfigError$1(`${area.path} has an unknown provider "${provider}". Known: ${Object.keys(ORG_OPTIONS).join(", ")}`);
2011
+ if (!isObject$1(options)) throw new ConfigError$1(`${area.path}: "${provider}" must be an object of options`);
2012
2012
  for (const [option, value] of Object.entries(options)) {
2013
- if (!allowed.includes(option)) throw new ConfigError(`${area.path}: "${provider}.${option}" is not an org option. Known: ${allowed.join(", ")}`);
2014
- if (typeof value !== "string" || value === "") throw new ConfigError(`${area.path}: "${provider}.${option}" must be a non-empty string`);
2013
+ if (!allowed.includes(option)) throw new ConfigError$1(`${area.path}: "${provider}.${option}" is not an org option. Known: ${allowed.join(", ")}`);
2014
+ if (typeof value !== "string" || value === "") throw new ConfigError$1(`${area.path}: "${provider}.${option}" must be a non-empty string`);
2015
2015
  }
2016
2016
  }
2017
2017
  return {
@@ -2052,7 +2052,7 @@ function fill(entry, org, capability) {
2052
2052
  if (values === void 0 || Object.keys(values).length === 0) return entry;
2053
2053
  const filled = {};
2054
2054
  for (const [option, { value, path }] of Object.entries(values)) {
2055
- if (options[option] !== void 0) throw new ConfigError(`${provider}.${option} is set in providers.${capability} and in ${path}. Set it in one place: remove the inline option or the key from ${path}`);
2055
+ if (options[option] !== void 0) throw new ConfigError$1(`${provider}.${option} is set in providers.${capability} and in ${path}. Set it in one place: remove the inline option or the key from ${path}`);
2056
2056
  filled[option] = value;
2057
2057
  }
2058
2058
  return [provider, {
@@ -2072,7 +2072,7 @@ function fill(entry, org, capability) {
2072
2072
  */
2073
2073
  function placeOrg(raw, area) {
2074
2074
  const { domain, providers: org } = merge(area);
2075
- if (domain !== void 0 && raw.domain !== void 0) throw new ConfigError(`domain is set in the config and in ${domain.path}. Set it in one place: remove the inline value or the key from ${domain.path}`);
2075
+ if (domain !== void 0 && raw.domain !== void 0) throw new ConfigError$1(`domain is set in the config and in ${domain.path}. Set it in one place: remove the inline value or the key from ${domain.path}`);
2076
2076
  const withDomain = domain === void 0 ? raw : {
2077
2077
  ...raw,
2078
2078
  domain: domain.value
@@ -2092,10 +2092,10 @@ function placeOrg(raw, area) {
2092
2092
  * both.
2093
2093
  */
2094
2094
  function placeRepo(raw, area) {
2095
- if (typeof area.value !== "object" || area.value === null || Array.isArray(area.value)) throw new ConfigError(`${area.path} must export the repo settings as an object`);
2095
+ if (typeof area.value !== "object" || area.value === null || Array.isArray(area.value)) throw new ConfigError$1(`${area.path} must export the repo settings as an object`);
2096
2096
  const fromFile = area.value;
2097
2097
  const inline = raw.repo ?? {};
2098
- for (const key of Object.keys(fromFile)) if (inline[key] !== void 0) throw new ConfigError(`repo.${key} is set in the config and in ${area.path}. Set it in one place: remove the inline value or the key from ${area.path}`);
2098
+ for (const key of Object.keys(fromFile)) if (inline[key] !== void 0) throw new ConfigError$1(`repo.${key} is set in the config and in ${area.path}. Set it in one place: remove the inline value or the key from ${area.path}`);
2099
2099
  return {
2100
2100
  ...raw,
2101
2101
  repo: {
@@ -2301,7 +2301,7 @@ system$1.compose;
2301
2301
  * @throws {ConfigError} When the entry still has no `environment`.
2302
2302
  */
2303
2303
  function resolvedEnvironment(entry) {
2304
- if (entry.environment === void 0) throw new ConfigError(`an entry names the layer ${JSON.stringify(entry.layer)} but its Environment was not derived: load the config with loadConfig()`);
2304
+ if (entry.environment === void 0) throw new ConfigError$1(`an entry names the layer ${JSON.stringify(entry.layer)} but its Environment was not derived: load the config with loadConfig()`);
2305
2305
  return entry.environment;
2306
2306
  }
2307
2307
  // src/commands/contexts/contexts.ts
@@ -2434,7 +2434,7 @@ const holocron = holocronEnv();
2434
2434
  * lines go.
2435
2435
  */
2436
2436
  function resolveCliDataset(opts, isGlobal) {
2437
- return holocron.get("AXIOM_DATASET") ?? (isGlobal ? void 0 : opts.configAxiomDataset) ?? resolveValue$2(["AXIOM_DATASET"], void 0, { prefix: PREFIX });
2437
+ return holocron.get("AXIOM_DATASET") ?? (isGlobal ? void 0 : opts.configAxiomDataset) ?? resolveValue$1(["AXIOM_DATASET"], void 0, { prefix: PREFIX$1 });
2438
2438
  }
2439
2439
  /**
2440
2440
  * Resolve Axiom credentials for the CLI.
@@ -2449,7 +2449,7 @@ function resolveCliAxiom(opts, ctx) {
2449
2449
  if (fromEnv) return fromEnv;
2450
2450
  const dataset = resolveCliDataset(opts, contextForCommand(ctx.command ?? "") === "global");
2451
2451
  if (!dataset) return void 0;
2452
- const org = opts.org ?? env$9.get(`${PREFIX}_ORG`);
2452
+ const org = opts.org ?? env$9.get(`${PREFIX$1}_ORG`);
2453
2453
  const token = holocron.get("AXIOM_TOKEN") || (org ? keyring.get(`axiom.${org}`) : null) || keyring.get("axiom");
2454
2454
  return token ? {
2455
2455
  dataset,
@@ -2457,7 +2457,7 @@ function resolveCliAxiom(opts, ctx) {
2457
2457
  } : void 0;
2458
2458
  }
2459
2459
  const logger = createCliLogger({
2460
- envPrefix: PREFIX,
2460
+ envPrefix: PREFIX$1,
2461
2461
  resolveAxiom: resolveCliAxiom
2462
2462
  });
2463
2463
  /**
@@ -2521,7 +2521,7 @@ function resolvePostHogHost() {
2521
2521
  * `NO_HOLOCRON_TELEMETRY`); see ADR-0007 / ADR-0008.
2522
2522
  */
2523
2523
  const telemetry = createCliTelemetry({
2524
- envPrefix: PREFIX,
2524
+ envPrefix: PREFIX$1,
2525
2525
  dsn: resolveDsn,
2526
2526
  posthogKey: resolvePostHogKey,
2527
2527
  posthogHost: resolvePostHogHost,
@@ -2579,8 +2579,8 @@ function applyResolvedConfig(argv, resolved) {
2579
2579
  }
2580
2580
  // src/commands/token-context/token-context.ts
2581
2581
  /** Parses --token values and returns the context spread, or null on parse error (exits with code 1). */
2582
- function tokenContext$1(rawTokens) {
2583
- return tokenContext(rawTokens, reportError);
2582
+ function tokenContext(rawTokens) {
2583
+ return tokenContext$1(rawTokens, reportError);
2584
2584
  }
2585
2585
  // src/plugin/workspace/workspace.ts
2586
2586
  /**
@@ -2630,8 +2630,8 @@ var WorkspaceContextError = class extends Error {
2630
2630
  *
2631
2631
  * Call it right after `await loader.load()` in a `workspace` command.
2632
2632
  */
2633
- function assertPluginsResolvable$1(loader, command) {
2634
- assertPluginsResolvable(loader, command, (cmd, packages) => new WorkspaceContextError(cmd, packages));
2633
+ function assertPluginsResolvable(loader, command) {
2634
+ assertPluginsResolvable$1(loader, command, (cmd, packages) => new WorkspaceContextError(cmd, packages));
2635
2635
  }
2636
2636
  // src/plugin/loader/loader.ts
2637
2637
  /**
@@ -3240,7 +3240,7 @@ async function runNotificationsChannelAdd(input) {
3240
3240
  /* v8 ignore next -- the real loader is only built outside tests, which always inject one */
3241
3241
  const loader = input.loader ?? new PluginLoader(input.loaded.resolved, input.context);
3242
3242
  await loader.load();
3243
- assertPluginsResolvable$1(loader, "new channel");
3243
+ assertPluginsResolvable(loader, "new channel");
3244
3244
  const dryRun = input.context.dryRun ?? false;
3245
3245
  print(`Holocron new channel — ${input.name}${dryRun ? " (dry-run)" : ""}`);
3246
3246
  try {
@@ -3350,7 +3350,7 @@ async function runPropertiesApply(input) {
3350
3350
  };
3351
3351
  const loader = input.loader ?? new PluginLoader(input.loaded.resolved, input.context);
3352
3352
  await loader.load();
3353
- assertPluginsResolvable$1(loader, "apply properties");
3353
+ assertPluginsResolvable(loader, "apply properties");
3354
3354
  if (!loader.has("source")) return stop("skip", whyMissing(loader, "source", "no `source` provider to read the property with"));
3355
3355
  const source = loader.get("source");
3356
3356
  if (!source.getOrgPropertyValues || !source.addOrgPropertyValues) return stop("skip", `the \`${source.providerName}\` provider cannot read or change an organization property`);
@@ -3407,7 +3407,7 @@ const repoPropertiesApplyCommand = {
3407
3407
  describe: "Add without asking"
3408
3408
  }),
3409
3409
  handler: async (argv) => {
3410
- const tokens = tokenContext$1(argv.token);
3410
+ const tokens = tokenContext(argv.token);
3411
3411
  if (!tokens) return;
3412
3412
  const loaded = await loadConfig(argv.cwd);
3413
3413
  applyResolvedConfig(argv, loaded.resolved);
@@ -3427,7 +3427,7 @@ const repoPropertiesApplyCommand = {
3427
3427
  const applyCommand = {
3428
3428
  command: "apply",
3429
3429
  describe: "Apply organization-level settings the repo's config depends on",
3430
- builder: (y) => y.command(repoPropertiesApplyCommand).command(groupMenu$1("apply")),
3430
+ builder: (y) => y.command(repoPropertiesApplyCommand).command(groupMenu("apply")),
3431
3431
  handler: () => {}
3432
3432
  };
3433
3433
  // src/commands/auth/auth-check.args.ts
@@ -3498,7 +3498,7 @@ async function runAuthSet(input) {
3498
3498
  env: input.env
3499
3499
  });
3500
3500
  const isFeatureKey = provider.includes(".");
3501
- const packageName = isFeatureKey ? null : resolvePluginPackage$1(provider);
3501
+ const packageName = isFeatureKey ? null : resolvePluginPackage(provider);
3502
3502
  if (!token) {
3503
3503
  print(style.fail(`no token supplied for \`${keyringKey}\`.`));
3504
3504
  print(style.hint(` pass as positional arg: holocron new token ${provider} <token>`));
@@ -3623,7 +3623,7 @@ async function runAuthCheck(input) {
3623
3623
  message: "stored"
3624
3624
  };
3625
3625
  }
3626
- const packageName = resolvePluginPackage$1(provider);
3626
+ const packageName = resolvePluginPackage(provider);
3627
3627
  try {
3628
3628
  const module = await importer(packageName);
3629
3629
  if (typeof module.verifyToken !== "function") {
@@ -3787,7 +3787,7 @@ const authCheckCommand = {
3787
3787
  async function resolveMonitoringChecks(input) {
3788
3788
  const loader = input.loader ?? new PluginLoader(input.loaded.resolved, input.context);
3789
3789
  await loader.load();
3790
- assertPluginsResolvable$1(loader, "check monitor");
3790
+ assertPluginsResolvable(loader, "check monitor");
3791
3791
  return [...loader.get("monitoring").checks];
3792
3792
  }
3793
3793
  /**
@@ -3976,9 +3976,9 @@ function configuredTeamId(resolved) {
3976
3976
  * @param env - The environment to read. Default `process.env`; a test passes its own.
3977
3977
  */
3978
3978
  function resolveVercelCredentials(resolved, env) {
3979
- const vercelToken = resolveValue(["VERCEL_TOKEN"], env, { prefix: PREFIX });
3980
- const vercelTeamId = resolveValue(["VERCEL_TEAM_ID"], env, { prefix: PREFIX }) ?? configuredTeamId(resolved);
3981
- const bypassSecret = resolveValue(["VERCEL_PROTECTION_BYPASS_SECRET"], env, { prefix: PREFIX });
3979
+ const vercelToken = resolveValue$2(["VERCEL_TOKEN"], env, { prefix: PREFIX$1 });
3980
+ const vercelTeamId = resolveValue$2(["VERCEL_TEAM_ID"], env, { prefix: PREFIX$1 }) ?? configuredTeamId(resolved);
3981
+ const bypassSecret = resolveValue$2(["VERCEL_PROTECTION_BYPASS_SECRET"], env, { prefix: PREFIX$1 });
3982
3982
  return {
3983
3983
  ...vercelToken ? { vercelToken } : {},
3984
3984
  ...vercelTeamId ? { vercelTeamId } : {},
@@ -3999,7 +3999,7 @@ const monitoringCheckCommand = {
3999
3999
  describe: "Run every configured `monitoring` check against a given URL instead of its own configured url",
4000
4000
  builder: monitoringCheckArgs,
4001
4001
  handler: async (argv) => {
4002
- const tokens = tokenContext$1(argv.token);
4002
+ const tokens = tokenContext(argv.token);
4003
4003
  if (!tokens) return;
4004
4004
  const [url] = await promptForPositionals(getEntry("check monitor"), argv);
4005
4005
  const loaded = await loadConfig(argv.cwd);
@@ -4052,7 +4052,7 @@ const monitoringRunResolvedCommand = {
4052
4052
  const checkCommand = {
4053
4053
  command: "check",
4054
4054
  describe: "Check a stored token, or run monitoring checks against a URL",
4055
- builder: (y) => y.command(authCheckCommand).command(monitoringCheckCommand).command(monitoringRunResolvedCommand).command(groupMenu$1("check")),
4055
+ builder: (y) => y.command(authCheckCommand).command(monitoringCheckCommand).command(monitoringRunResolvedCommand).command(groupMenu("check")),
4056
4056
  handler: () => {}
4057
4057
  };
4058
4058
  // src/commands/notifications-dedupe/notifications-dedupe.ts
@@ -4084,7 +4084,7 @@ async function runNotificationsDedupe(input) {
4084
4084
  /* v8 ignore next -- the real loader is only built outside tests, which always inject one */
4085
4085
  const loader = input.loader ?? new PluginLoader(input.loaded.resolved, input.context);
4086
4086
  await loader.load();
4087
- assertPluginsResolvable$1(loader, "cleanup posts");
4087
+ assertPluginsResolvable(loader, "cleanup posts");
4088
4088
  const dryRun = input.context.dryRun ?? false;
4089
4089
  const report = {
4090
4090
  status: "ok",
@@ -4194,7 +4194,7 @@ const notificationsDedupeCommand = {
4194
4194
  describe: "Delete the extra posts of a forum that has more than one post for the same key",
4195
4195
  builder: notificationsDedupeArgs,
4196
4196
  handler: async (argv) => {
4197
- const tokens = tokenContext$1(argv.token);
4197
+ const tokens = tokenContext(argv.token);
4198
4198
  if (!tokens) return;
4199
4199
  const loaded = await loadConfig(argv.cwd);
4200
4200
  applyResolvedConfig(argv, loaded.resolved);
@@ -4417,7 +4417,7 @@ async function runCleanupBranches(input) {
4417
4417
  // c8 ignore next -- real PluginLoader construction is integration-level; unit tests always supply loader
4418
4418
  const loader = input.loader ?? new PluginLoader(input.loaded.resolved, input.context);
4419
4419
  await loader.load();
4420
- assertPluginsResolvable$1(loader, "cleanup branches");
4420
+ assertPluginsResolvable(loader, "cleanup branches");
4421
4421
  if (!loader.has("source")) throw new Error("source capability is not configured — add a source provider to holocron.config.json");
4422
4422
  const source = loader.get("source");
4423
4423
  const { listPullRequests, listPullRequestCommits, listBranches, deleteBranch } = source;
@@ -4542,7 +4542,7 @@ const repoCleanupBranchesCommand = {
4542
4542
  describe: "List the branches whose pull request is merged and delete the ones you pick (local, remote or both)",
4543
4543
  builder: repoCleanupBranchesArgs,
4544
4544
  handler: async (argv) => {
4545
- const tokens = tokenContext$1(argv.token);
4545
+ const tokens = tokenContext(argv.token);
4546
4546
  if (!tokens) return;
4547
4547
  const loaded = await loadConfig(argv.cwd);
4548
4548
  applyResolvedConfig(argv, loaded.resolved);
@@ -4564,7 +4564,7 @@ const repoCleanupBranchesCommand = {
4564
4564
  const cleanupCommand = {
4565
4565
  command: "cleanup",
4566
4566
  describe: "Clean up what a repo or a forum accumulates (merged branches, duplicate posts)",
4567
- builder: (y) => y.command(repoCleanupBranchesCommand).command(notificationsDedupeCommand).command(groupMenu$1("cleanup")),
4567
+ builder: (y) => y.command(repoCleanupBranchesCommand).command(notificationsDedupeCommand).command(groupMenu("cleanup")),
4568
4568
  handler: () => {}
4569
4569
  };
4570
4570
  // src/commands/clone/clone.args.ts
@@ -4773,7 +4773,7 @@ async function runClone(input) {
4773
4773
  }
4774
4774
  // src/commands/clone/clone.command.ts
4775
4775
  const env$6 = createEnvLookup();
4776
- const resolveCloneToken = createFeatureResolver$1({
4776
+ const resolveCloneToken = createFeatureResolver({
4777
4777
  envName: "HOLOCRON_READ_TOKEN",
4778
4778
  keyringKey: "github.read"
4779
4779
  });
@@ -4782,7 +4782,7 @@ const cloneCommand = {
4782
4782
  describe: "Clone a single repo (org/repo) or every repo in an org (org)",
4783
4783
  builder: cloneArgs,
4784
4784
  handler: async (argv) => {
4785
- const tokens = tokenContext$1(argv.token);
4785
+ const tokens = tokenContext(argv.token);
4786
4786
  if (!tokens) return;
4787
4787
  let token;
4788
4788
  try {
@@ -4882,17 +4882,17 @@ function resolveProjectOptions(options, fallbackOwner) {
4882
4882
  */
4883
4883
  async function openProjects(input, command) {
4884
4884
  const entry = input.loaded.resolved.providers.projects;
4885
- if (entry?.cardinality !== "single") throw new ConfigError$1(`${command}: needs a \`projects\` provider in holocron.config.ts, e.g. providers: { projects: "github" }`);
4885
+ if (entry?.cardinality !== "single") throw new ConfigError(`${command}: needs a \`projects\` provider in holocron.config.ts, e.g. providers: { projects: "github" }`);
4886
4886
  const loader = input.loader ?? new PluginLoader(input.loaded.resolved, input.context);
4887
4887
  await withSpinner("Loading plugins…", () => loader.load());
4888
- assertPluginsResolvable$1(loader, command);
4888
+ assertPluginsResolvable(loader, command);
4889
4889
  if (!loader.has("projects")) {
4890
4890
  const failure = loader.loadFailures().find((f) => f.key === "projects");
4891
- throw new ConfigError$1(`${command}: the \`projects\` provider is not available${failure ? ` (\`${failure.provider}\` failed to load: ${describeError(failure.error)})` : ""}`);
4891
+ throw new ConfigError(`${command}: the \`projects\` provider is not available${failure ? ` (\`${failure.provider}\` failed to load: ${describeError(failure.error)})` : ""}`);
4892
4892
  }
4893
4893
  const resolved = resolveProjectOptions(entry.tuple.options, input.owner ?? input.context.org ?? "");
4894
- if (!resolved.ok) throw new ConfigError$1(`${command}: providers.projects is wrong: ${resolved.problems.join("; ")}`);
4895
- if (resolved.options.owner === "") throw new ConfigError$1(`${command}: needs an owner: set \`org\` in holocron.config.ts, the provider's \`org\` option, or pass --org`);
4894
+ if (!resolved.ok) throw new ConfigError(`${command}: providers.projects is wrong: ${resolved.problems.join("; ")}`);
4895
+ if (resolved.options.owner === "") throw new ConfigError(`${command}: needs an owner: set \`org\` in holocron.config.ts, the provider's \`org\` option, or pass --org`);
4896
4896
  return {
4897
4897
  projects: loader.get("projects"),
4898
4898
  options: resolved.options
@@ -5014,7 +5014,7 @@ const projectCloseCommand = {
5014
5014
  describe: "Close a board (reversible)",
5015
5015
  builder: projectCloseArgs,
5016
5016
  handler: async (argv) => {
5017
- const tokens = tokenContext$1(argv.token);
5017
+ const tokens = tokenContext(argv.token);
5018
5018
  if (!tokens) return;
5019
5019
  const loaded = await loadConfig(argv.cwd);
5020
5020
  applyResolvedConfig(argv, loaded.resolved);
@@ -5036,7 +5036,7 @@ const projectCloseCommand = {
5036
5036
  const closeCommand = {
5037
5037
  command: "close",
5038
5038
  describe: "Close a project board",
5039
- builder: (y) => y.command(projectCloseCommand).command(groupMenu$1("close")),
5039
+ builder: (y) => y.command(projectCloseCommand).command(groupMenu("close")),
5040
5040
  handler: () => {}
5041
5041
  };
5042
5042
  // src/commands/cleanup-preview/cleanup-preview.args.ts
@@ -5063,7 +5063,7 @@ async function runCleanupPreview(input) {
5063
5063
  // c8 ignore next -- real PluginLoader construction is integration-level; unit tests always supply loader
5064
5064
  const loader = input.loader ?? new PluginLoader(input.loaded.resolved, input.context);
5065
5065
  await loader.load();
5066
- assertPluginsResolvable$1(loader, "deploy cleanup-preview");
5066
+ assertPluginsResolvable(loader, "deploy cleanup-preview");
5067
5067
  logger.info({
5068
5068
  pr: input.prNumber,
5069
5069
  project: input.project
@@ -5196,7 +5196,7 @@ const cleanupPreviewCommand = {
5196
5196
  describe: "List and delete Cloudflare Pages preview deployments for a GitHub PR",
5197
5197
  builder: cleanupPreviewArgs,
5198
5198
  handler: async (argv) => {
5199
- const tokens = tokenContext$1(argv.token);
5199
+ const tokens = tokenContext(argv.token);
5200
5200
  if (!tokens) return;
5201
5201
  const [pr] = await promptForPositionals(getEntry("deploy cleanup-preview"), argv);
5202
5202
  const loaded = await loadConfig(argv.cwd);
@@ -5643,7 +5643,7 @@ async function runDeploy(input) {
5643
5643
  const logger = input.logger ?? getLogger();
5644
5644
  const loader = input.loader ?? new PluginLoader(input.loaded.resolved, input.context);
5645
5645
  await loader.load();
5646
- assertPluginsResolvable$1(loader, "deploy");
5646
+ assertPluginsResolvable(loader, "deploy");
5647
5647
  const dryRun = input.context.dryRun ?? false;
5648
5648
  logger.info({
5649
5649
  branch: input.branch,
@@ -5725,7 +5725,7 @@ async function runDeployFromFiles(input) {
5725
5725
  const logger = input.logger ?? getLogger();
5726
5726
  const loader = input.loader ?? new PluginLoader(input.loaded.resolved, input.context);
5727
5727
  await loader.load();
5728
- assertPluginsResolvable$1(loader, "deploy");
5728
+ assertPluginsResolvable(loader, "deploy");
5729
5729
  const dryRun = input.context.dryRun ?? false;
5730
5730
  const walkFiles = input.walkFiles ?? defaultWalkFiles$1;
5731
5731
  const readFile = input.readFile ?? ((p) => readFileSync(p, "utf8"));
@@ -5813,7 +5813,7 @@ const deployCommand = {
5813
5813
  process.exitCode = 1;
5814
5814
  return;
5815
5815
  }
5816
- const tokens = tokenContext$1(argv.token);
5816
+ const tokens = tokenContext(argv.token);
5817
5817
  if (!tokens) return;
5818
5818
  const loaded = await loadConfig(argv.cwd);
5819
5819
  applyResolvedConfig(argv, loaded.resolved);
@@ -6013,7 +6013,7 @@ async function runTunnelUp(input) {
6013
6013
  };
6014
6014
  const loader = input.loader ?? new PluginLoader(input.loaded.resolved, input.context);
6015
6015
  await withSpinner("Loading plugins…", () => loader.load());
6016
- assertPluginsResolvable$1(loader, COMMAND$7);
6016
+ assertPluginsResolvable(loader, COMMAND$7);
6017
6017
  const dryRun = input.context.dryRun ?? false;
6018
6018
  print(style.header(`Holocron new tunnel — ${input.hostname}${dryRun ? " (dry-run)" : ""}`));
6019
6019
  print("");
@@ -6110,7 +6110,7 @@ const tunnelUpCommand = {
6110
6110
  describe: "Make a named tunnel with a stable public hostname that reaches a local port",
6111
6111
  builder: tunnelUpArgs,
6112
6112
  handler: async (argv) => {
6113
- const tokens = tokenContext$1(argv.token);
6113
+ const tokens = tokenContext(argv.token);
6114
6114
  if (!tokens) return;
6115
6115
  const loaded = await loadConfig(argv.cwd);
6116
6116
  applyResolvedConfig(argv, loaded.resolved);
@@ -6168,7 +6168,7 @@ async function runDev(input) {
6168
6168
  };
6169
6169
  const loader = input.loader ?? new PluginLoader(input.loaded.resolved, input.context);
6170
6170
  await withSpinner("Loading plugins…", () => loader.load());
6171
- assertPluginsResolvable$1(loader, COMMAND$6);
6171
+ assertPluginsResolvable(loader, COMMAND$6);
6172
6172
  const dryRun = input.context.dryRun ?? false;
6173
6173
  const [program, ...args] = input.command;
6174
6174
  const shown = input.command.join(" ");
@@ -6207,7 +6207,7 @@ async function runDev(input) {
6207
6207
  return finish("fail");
6208
6208
  }
6209
6209
  row(true, `vault ${input.environment}`, `${Object.keys(values).length} variables, passed to the application`);
6210
- const appEnvironment = values[`${PREFIX}_ENVIRONMENT`] ?? values["ENVIRONMENT"] ?? APP_ENVIRONMENT;
6210
+ const appEnvironment = values[`${PREFIX$1}_ENVIRONMENT`] ?? values["ENVIRONMENT"] ?? APP_ENVIRONMENT;
6211
6211
  let token;
6212
6212
  try {
6213
6213
  token = await loader.get("tunnels").tunnelToken(tunnel.tunnelId);
@@ -6225,10 +6225,10 @@ async function runDev(input) {
6225
6225
  args,
6226
6226
  env: {
6227
6227
  ENVIRONMENT: appEnvironment,
6228
- [`${PREFIX}_ENVIRONMENT`]: appEnvironment,
6228
+ [`${PREFIX$1}_ENVIRONMENT`]: appEnvironment,
6229
6229
  ...values,
6230
6230
  PORT: String(input.port),
6231
- [`${PREFIX}_PORT`]: String(input.port)
6231
+ [`${PREFIX$1}_PORT`]: String(input.port)
6232
6232
  }
6233
6233
  },
6234
6234
  companion: {
@@ -6267,7 +6267,7 @@ const devCommand = {
6267
6267
  describe: "Run an application locally behind its development tunnel, with its secrets from the vault (command after --)",
6268
6268
  builder: (y) => devArgs(y).command(devServeCommand),
6269
6269
  handler: async (argv) => {
6270
- const tokens = tokenContext$1(argv.token);
6270
+ const tokens = tokenContext(argv.token);
6271
6271
  if (!tokens) return;
6272
6272
  const loaded = await loadConfig(argv.cwd);
6273
6273
  applyResolvedConfig(argv, loaded.resolved);
@@ -6344,7 +6344,7 @@ const CALLER_IDS = [
6344
6344
  "ci"
6345
6345
  ];
6346
6346
  /** The `ci.` a hosting repo puts before its callers' file names (`ci.yml` is the reusable itself, not a prefixed caller). */
6347
- const PREFIX$1 = "ci.";
6347
+ const PREFIX = "ci.";
6348
6348
  /**
6349
6349
  * What is wrong with the names of the generated callers, one line each. A caller is named for its task id in three
6350
6350
  * places: the file (`workflowFile(id)`, `ci.` first in the repo that hosts the reusables), the workflow `name:` and each
@@ -6355,7 +6355,7 @@ const PREFIX$1 = "ci.";
6355
6355
  function callerProblems(callers) {
6356
6356
  return callers.flatMap(({ file, name, jobs }) => {
6357
6357
  const base = file.replace(/\.yml$/, "");
6358
- const prefix = base.startsWith(PREFIX$1) ? PREFIX$1 : "";
6358
+ const prefix = base.startsWith(PREFIX) ? PREFIX : "";
6359
6359
  const stem = base.slice(prefix.length);
6360
6360
  const oldFiles = Object.hasOwn(LEGACY_NAMES, stem) ? workflowKeys(stem).map((id) => `${prefix}${workflowFile(id)}`) : [];
6361
6361
  if (oldFiles.length > 0 && !(oldFiles.length === 1 && oldFiles[0] === file)) return [`${file}: an old caller name; the flat name is ${oldFiles.join(", ")}`];
@@ -6817,7 +6817,7 @@ async function runDoctorDns(input) {
6817
6817
  const logger = input.logger ?? getLogger();
6818
6818
  const loader = input.loader ?? new PluginLoader(input.loaded.resolved, input.context);
6819
6819
  await loader.load();
6820
- assertPluginsResolvable$1(loader, "doctor dns");
6820
+ assertPluginsResolvable(loader, "doctor dns");
6821
6821
  const expected = expectedDnsRecords(input.loaded.resolved, {
6822
6822
  ...loader.has("deployment") ? { deployment: loader.get("deployment") } : {},
6823
6823
  ...loader.has("wiki") ? { wiki: loader.get("wiki") } : {},
@@ -6907,7 +6907,7 @@ const doctorDnsCommand = {
6907
6907
  command: "dns",
6908
6908
  describe: "Check that the DNS records the config makes setup write exist and point where they should (read-only)",
6909
6909
  handler: async (argv) => {
6910
- const tokens = tokenContext$1(argv.token);
6910
+ const tokens = tokenContext(argv.token);
6911
6911
  if (!tokens) return;
6912
6912
  const loaded = await loadConfig(argv.cwd);
6913
6913
  applyResolvedConfig(argv, loaded.resolved);
@@ -6940,7 +6940,7 @@ async function runDoctorEnvironments(input) {
6940
6940
  const logger = input.logger ?? getLogger();
6941
6941
  const loader = input.loader ?? new PluginLoader(input.loaded.resolved, input.context);
6942
6942
  await loader.load();
6943
- assertPluginsResolvable$1(loader, "doctor environments");
6943
+ assertPluginsResolvable(loader, "doctor environments");
6944
6944
  const row = await checkEnvironments(loader, Object.keys(input.loaded.resolved.repo?.secrets?.environments ?? {}));
6945
6945
  printCheckRows([row], print);
6946
6946
  const summary = summariseChecks([row]);
@@ -6983,7 +6983,7 @@ const doctorEnvironmentsCommand = {
6983
6983
  command: "environments",
6984
6984
  describe: "Check that the deployment environments the config relies on exist (read-only)",
6985
6985
  handler: async (argv) => {
6986
- const tokens = tokenContext$1(argv.token);
6986
+ const tokens = tokenContext(argv.token);
6987
6987
  if (!tokens) return;
6988
6988
  const loaded = await loadConfig(argv.cwd);
6989
6989
  applyResolvedConfig(argv, loaded.resolved);
@@ -7106,7 +7106,7 @@ async function runDoctorGitHubApp(input) {
7106
7106
  const loader = input.loader ?? new PluginLoader(input.loaded.resolved, input.context);
7107
7107
  if (instances.length > 0) {
7108
7108
  await loader.load();
7109
- assertPluginsResolvable$1(loader, "doctor github-app");
7109
+ assertPluginsResolvable(loader, "doctor github-app");
7110
7110
  }
7111
7111
  const rows = [];
7112
7112
  if (instances.length === 0) rows.push(row$13("github-app", "reachable", "skip", "no `githubApps` are declared in holocron.config.ts"));
@@ -7187,7 +7187,7 @@ const doctorGitHubAppCommand = {
7187
7187
  command: "github-app",
7188
7188
  describe: "Compare each registered GitHub App's events, permissions and installations with its manifest (read-only)",
7189
7189
  handler: async (argv) => {
7190
- const tokens = tokenContext$1(argv.token);
7190
+ const tokens = tokenContext(argv.token);
7191
7191
  if (!tokens) return;
7192
7192
  const loaded = await loadConfig(argv.cwd);
7193
7193
  applyResolvedConfig(argv, loaded.resolved);
@@ -7216,14 +7216,14 @@ function datasetTargets(config) {
7216
7216
  const targets = [{
7217
7217
  id: "cli",
7218
7218
  label: "the CLI",
7219
- variable: `${PREFIX}_AXIOM_DATASET`,
7219
+ variable: `${PREFIX$1}_AXIOM_DATASET`,
7220
7220
  name: resolveCliDataset({ configAxiomDataset: config.log?.axiom?.dataset }, false),
7221
7221
  fix: "run `holocron setup`, which provisions it"
7222
7222
  }, {
7223
7223
  id: "sentinel",
7224
7224
  label: "Sentinel",
7225
7225
  variable: SENTINEL_VARIABLE,
7226
- name: resolveValue$2([SENTINEL_VARIABLE]),
7226
+ name: resolveValue$1([SENTINEL_VARIABLE]),
7227
7227
  fix: "create it in Axiom (setup provisions only the CLI's dataset)"
7228
7228
  }];
7229
7229
  const other = config.dev?.serve?.logging?.datasetVar;
@@ -7231,7 +7231,7 @@ function datasetTargets(config) {
7231
7231
  id: idOf(other),
7232
7232
  label: `the service behind ${other}`,
7233
7233
  variable: other,
7234
- name: resolveValue$2([other]),
7234
+ name: resolveValue$1([other]),
7235
7235
  fix: "create it in Axiom (setup provisions only the CLI's dataset)"
7236
7236
  });
7237
7237
  return targets;
@@ -7258,7 +7258,7 @@ async function runDoctorLogs(input) {
7258
7258
  const logger = input.logger ?? getLogger();
7259
7259
  const loader = input.loader ?? new PluginLoader(input.loaded.resolved, input.context);
7260
7260
  await loader.load();
7261
- assertPluginsResolvable$1(loader, "doctor logs");
7261
+ assertPluginsResolvable(loader, "doctor logs");
7262
7262
  const rows = [];
7263
7263
  if (!loader.has("logs")) {
7264
7264
  const failure = loader.loadFailures().find((f) => f.key === "logs");
@@ -7292,8 +7292,8 @@ async function checkLogs(logs, targets) {
7292
7292
  else if (!logs.readDataset) rows.push(row$12(id, title, "skip", `${logs.providerName} cannot read a dataset`));
7293
7293
  else rows.push(...await checkDataset(logs, target, target.name, id, title));
7294
7294
  }
7295
- const org = resolveValue$2(["AXIOM_ORG"], void 0, { prefix: PREFIX });
7296
- rows.push(org ? row$12("logs:org", "organization", "ok", `${PREFIX}_AXIOM_ORG (or AXIOM_ORG) is set`) : row$12("logs:org", "organization", "skip", `${PREFIX}_AXIOM_ORG (or AXIOM_ORG) is not set here; Sentinel's log links and check-dispatched need it`));
7295
+ const org = resolveValue$1(["AXIOM_ORG"], void 0, { prefix: PREFIX$1 });
7296
+ rows.push(org ? row$12("logs:org", "organization", "ok", `${PREFIX$1}_AXIOM_ORG (or AXIOM_ORG) is set`) : row$12("logs:org", "organization", "skip", `${PREFIX$1}_AXIOM_ORG (or AXIOM_ORG) is not set here; Sentinel's log links and check-dispatched need it`));
7297
7297
  return rows;
7298
7298
  }
7299
7299
  /** Whether the provider accepts the token. `usable` is false when it was refused or could not be tried. */
@@ -7342,7 +7342,7 @@ const doctorLogsCommand = {
7342
7342
  command: "logs",
7343
7343
  describe: "Check the Axiom datasets the setup ships logs to exist and the token reaches them (read-only)",
7344
7344
  handler: async (argv) => {
7345
- const tokens = tokenContext$1(argv.token);
7345
+ const tokens = tokenContext(argv.token);
7346
7346
  if (!tokens) return;
7347
7347
  const loaded = await loadConfig(argv.cwd);
7348
7348
  applyResolvedConfig(argv, loaded.resolved);
@@ -7376,7 +7376,7 @@ async function runDoctorMonitoring(input) {
7376
7376
  const logger = input.logger ?? getLogger();
7377
7377
  const loader = input.loader ?? new PluginLoader(input.loaded.resolved, input.context);
7378
7378
  await loader.load();
7379
- assertPluginsResolvable$1(loader, "doctor monitoring");
7379
+ assertPluginsResolvable(loader, "doctor monitoring");
7380
7380
  const rows = [await checkRow(loader)];
7381
7381
  printCheckRows(rows, print);
7382
7382
  const summary = summariseChecks(rows);
@@ -7498,7 +7498,7 @@ const doctorMonitoringCommand = {
7498
7498
  command: "monitoring",
7499
7499
  describe: "Check the monitoring checks the config declares against the ones the provider holds (read-only)",
7500
7500
  handler: async (argv) => {
7501
- const tokens = tokenContext$1(argv.token);
7501
+ const tokens = tokenContext(argv.token);
7502
7502
  if (!tokens) return;
7503
7503
  const loaded = await loadConfig(argv.cwd);
7504
7504
  applyResolvedConfig(argv, loaded.resolved);
@@ -8005,7 +8005,7 @@ async function runNotificationsSetup(input$1) {
8005
8005
  /* v8 ignore next -- the real loader is only built outside tests, which always inject one */
8006
8006
  const loader = input$1.loader ?? new PluginLoader(input$1.loaded.resolved, input$1.context);
8007
8007
  if (!input$1.preloaded) await loader.load();
8008
- assertPluginsResolvable$1(loader, "setup notifications");
8008
+ assertPluginsResolvable(loader, "setup notifications");
8009
8009
  const dryRun = input$1.context.dryRun ?? false;
8010
8010
  const report = {
8011
8011
  status: "ok",
@@ -8742,7 +8742,7 @@ async function runNotificationsSyncRoles(input) {
8742
8742
  /* v8 ignore next -- the real loader is only built outside tests, which always inject one */
8743
8743
  const loader = input.loader ?? new PluginLoader(input.loaded.resolved, input.context);
8744
8744
  await loader.load();
8745
- assertPluginsResolvable$1(loader, "sync roles");
8745
+ assertPluginsResolvable(loader, "sync roles");
8746
8746
  const dryRun = input.context.dryRun ?? false;
8747
8747
  const report = {
8748
8748
  status: "ok",
@@ -8848,7 +8848,7 @@ async function runNotificationsLink(input) {
8848
8848
  /* v8 ignore next -- the real loader is only built outside tests, which always inject one */
8849
8849
  const loader = input.loader ?? new PluginLoader(input.loaded.resolved, input.context);
8850
8850
  await loader.load();
8851
- assertPluginsResolvable$1(loader, "link account");
8851
+ assertPluginsResolvable(loader, "link account");
8852
8852
  const dryRun = input.context.dryRun ?? false;
8853
8853
  const refuse = (message, reason = message) => {
8854
8854
  print(` ${style.fail(message)}`);
@@ -9344,7 +9344,7 @@ async function runDoctorNotifications(input) {
9344
9344
  /* v8 ignore next -- the real loader is only built outside tests, which always inject one */
9345
9345
  const loader = input.loader ?? new PluginLoader(input.loaded.resolved, input.context);
9346
9346
  await loader.load();
9347
- assertPluginsResolvable$1(loader, "doctor notifications");
9347
+ assertPluginsResolvable(loader, "doctor notifications");
9348
9348
  const checks = [];
9349
9349
  const add = (id, title, problems, pass) => {
9350
9350
  checks.push({
@@ -9897,7 +9897,7 @@ const doctorNotificationsCommand = {
9897
9897
  describe: "Check the layout against the server and the secrets store, step by step (a full run leaves one test post in the test channel; --built-only posts nothing unless --deliver)",
9898
9898
  builder: doctorNotificationsArgs,
9899
9899
  handler: async (argv) => {
9900
- const tokens = tokenContext$1(argv.token);
9900
+ const tokens = tokenContext(argv.token);
9901
9901
  if (!tokens) return;
9902
9902
  const loaded = await loadConfig(argv.cwd);
9903
9903
  applyResolvedConfig(argv, loaded.resolved);
@@ -10396,7 +10396,7 @@ async function runDoctorProject(input) {
10396
10396
  const logger = input.logger ?? getLogger();
10397
10397
  const loader = input.loader ?? new PluginLoader(input.loaded.resolved, input.context);
10398
10398
  await loader.load();
10399
- assertPluginsResolvable$1(loader, "doctor project");
10399
+ assertPluginsResolvable(loader, "doctor project");
10400
10400
  const rows = await checkBoards(input, loader);
10401
10401
  printCheckRows(rows, print);
10402
10402
  const summary = summariseChecks(rows);
@@ -10479,7 +10479,7 @@ const doctorProjectCommand = {
10479
10479
  describe: "Compare each declared project board with its template, and report items that need a status (read-only)",
10480
10480
  builder: doctorProjectArgs,
10481
10481
  handler: async (argv) => {
10482
- const tokens = tokenContext$1(argv.token);
10482
+ const tokens = tokenContext(argv.token);
10483
10483
  if (!tokens) return;
10484
10484
  const loaded = await loadConfig(argv.cwd);
10485
10485
  applyResolvedConfig(argv, loaded.resolved);
@@ -10613,7 +10613,7 @@ async function upsertBranchProtection(source, dryRun, requiredChecks) {
10613
10613
  message: "created"
10614
10614
  };
10615
10615
  } catch (err) {
10616
- if (!(err instanceof ProviderApiError$1) || err.status !== 403) return {
10616
+ if (!(err instanceof ProviderApiError) || err.status !== 403) return {
10617
10617
  capability: "source",
10618
10618
  step,
10619
10619
  status: "fail",
@@ -10630,7 +10630,7 @@ async function upsertBranchProtection(source, dryRun, requiredChecks) {
10630
10630
  message: `classic protection on ${repo.defaultBranch}`
10631
10631
  };
10632
10632
  } catch (err) {
10633
- if (err instanceof ProviderApiError$1 && err.status === 403) return {
10633
+ if (err instanceof ProviderApiError && err.status === 403) return {
10634
10634
  capability: "source",
10635
10635
  step,
10636
10636
  status: "skip",
@@ -11035,7 +11035,7 @@ function repoChecks(config, repoRoot) {
11035
11035
  try {
11036
11036
  rulesets = await source.listRulesets();
11037
11037
  } catch (err) {
11038
- if (err instanceof ProviderApiError$1 && err.status === 403) return { skip: "rulesets are not available on this plan (classic branch protection is not read)" };
11038
+ if (err instanceof ProviderApiError && err.status === 403) return { skip: "rulesets are not available on this plan (classic branch protection is not read)" };
11039
11039
  throw err;
11040
11040
  }
11041
11041
  const found = rulesets.find((r) => r.name === RULESET_NAME);
@@ -11133,7 +11133,7 @@ async function runDoctorRepo(input) {
11133
11133
  const logger = input.logger ?? getLogger();
11134
11134
  const loader = input.loader ?? new PluginLoader(input.loaded.resolved, input.context);
11135
11135
  await loader.load();
11136
- assertPluginsResolvable$1(loader, "doctor repo");
11136
+ assertPluginsResolvable(loader, "doctor repo");
11137
11137
  const checks = repoChecks(input.loaded.resolved, input.context.repoRoot);
11138
11138
  const rows = [];
11139
11139
  if (!loader.has("source")) {
@@ -11205,7 +11205,7 @@ const doctorRepoCommand = {
11205
11205
  command: "repo",
11206
11206
  describe: "Check the repository settings against the config (read-only): description, topics, labels, teams, protection, security",
11207
11207
  handler: async (argv) => {
11208
- const tokens = tokenContext$1(argv.token);
11208
+ const tokens = tokenContext(argv.token);
11209
11209
  if (!tokens) return;
11210
11210
  const loaded = await loadConfig(argv.cwd);
11211
11211
  applyResolvedConfig(argv, loaded.resolved);
@@ -12246,14 +12246,14 @@ const MATRIX_LEGEND = [
12246
12246
  "? could not read this place"
12247
12247
  ];
12248
12248
  const heading = (column) => `${column.group} ${column.label}`;
12249
- function pad$1(text, width) {
12249
+ function pad(text, width) {
12250
12250
  return text + " ".repeat(Math.max(0, width - text.length));
12251
12251
  }
12252
12252
  /** The block as a table: one line per name, one column per place. */
12253
12253
  function table(name, rows, columns) {
12254
12254
  const nameWidth = Math.max(name.length, ...rows.map((row) => row.name.length));
12255
12255
  const widths = columns.map((column) => Math.max(heading(column).length, ...rows.map((row) => row.cells[column.id].length)));
12256
- const line = (first, cells) => [pad$1(first, nameWidth), ...cells.map((cell, i) => pad$1(cell, widths[i]))].join(" ").trimEnd();
12256
+ const line = (first, cells) => [pad(first, nameWidth), ...cells.map((cell, i) => pad(cell, widths[i]))].join(" ").trimEnd();
12257
12257
  return [line(name, columns.map((column) => heading(column))), ...rows.map((row) => line(row.name, columns.map((column) => row.cells[column.id])))];
12258
12258
  }
12259
12259
  /** The block turned on its side: one short paragraph per name, for a terminal too narrow for the table. */
@@ -12958,14 +12958,14 @@ async function runDoctorSecrets(input) {
12958
12958
  const getLoader = () => loading ??= (async () => {
12959
12959
  const loader = input.loader ?? new PluginLoader(config, input.context);
12960
12960
  await loader.load();
12961
- assertPluginsResolvable$1(loader, "doctor secrets");
12961
+ assertPluginsResolvable(loader, "doctor secrets");
12962
12962
  return loader;
12963
12963
  })();
12964
12964
  if ((wants("local") || wants("dev")) && withSecrets) {
12965
12965
  ran = true;
12966
12966
  const credentialsLoader = input.credentialsLoader ?? new PluginLoader(config, input.context, void 0, { readCredentials: false });
12967
12967
  await credentialsLoader.load();
12968
- assertPluginsResolvable$1(credentialsLoader, "doctor secrets");
12968
+ assertPluginsResolvable(credentialsLoader, "doctor secrets");
12969
12969
  const credentials = await credentialsRows({
12970
12970
  loaded: input.loaded,
12971
12971
  context: input.context,
@@ -13125,7 +13125,7 @@ function parseEnvList(values) {
13125
13125
  const unknown = [...new Set(names.filter((name) => !DOCTOR_ENVIRONMENTS.includes(name)))];
13126
13126
  if (unknown.length > 0) {
13127
13127
  const shown = unknown.map((name) => name === "" ? "(empty)" : JSON.stringify(name)).join(", ");
13128
- throw new ConfigError(`--env does not know ${shown}: use ${allowed}, comma-separated or repeated`);
13128
+ throw new ConfigError$1(`--env does not know ${shown}: use ${allowed}, comma-separated or repeated`);
13129
13129
  }
13130
13130
  return DOCTOR_ENVIRONMENTS.filter((env) => names.includes(env));
13131
13131
  }
@@ -13167,7 +13167,7 @@ const doctorSecretsCommand = {
13167
13167
  }),
13168
13168
  handler: async (argv) => {
13169
13169
  const environments = parseEnvList(argv.env);
13170
- const tokens = tokenContext$1(argv.token);
13170
+ const tokens = tokenContext(argv.token);
13171
13171
  if (!tokens) return;
13172
13172
  const loaded = await loadConfig(argv.cwd);
13173
13173
  applyResolvedConfig(argv, loaded.resolved);
@@ -13249,7 +13249,7 @@ async function chooseToken(provider) {
13249
13249
  * directory of the config that was loaded so a `--cwd` run finds the plugins installed there.
13250
13250
  */
13251
13251
  function defaultProviderTokens(loaded, importer = createDefaultImporter(dirname(loaded.filepath))) {
13252
- return async (provider) => (await importer(resolvePluginPackage$1(provider))).tokens ?? [];
13252
+ return async (provider) => (await importer(resolvePluginPackage(provider))).tokens ?? [];
13253
13253
  }
13254
13254
  // src/commands/secrets-sync/resolve-environment-id/resolve-environment-id.ts
13255
13255
  /**
@@ -13616,7 +13616,7 @@ async function runDoctorTokens(input) {
13616
13616
  const makeLoader = input.makeLoader ?? ((context) => new PluginLoader(input.loaded.resolved, context));
13617
13617
  const loader = input.loader ?? makeLoader(input.context);
13618
13618
  await loader.load();
13619
- assertPluginsResolvable$1(loader, "doctor tokens");
13619
+ assertPluginsResolvable(loader, "doctor tokens");
13620
13620
  const rows = [];
13621
13621
  const probes = loader.probes();
13622
13622
  const declared = [];
@@ -13861,7 +13861,7 @@ const DEEP_CHECKS = [
13861
13861
  command: "tokens",
13862
13862
  describe: "Check every token the plugins declare for a layer has the permissions it should, no more, and is not due for rotation (read-only, goes online)",
13863
13863
  handler: async (argv) => {
13864
- const tokens = tokenContext$1(argv.token);
13864
+ const tokens = tokenContext(argv.token);
13865
13865
  if (!tokens) return;
13866
13866
  const loaded = await loadConfig(argv.cwd);
13867
13867
  applyResolvedConfig(argv, loaded.resolved);
@@ -14048,7 +14048,7 @@ async function runDoctor(input) {
14048
14048
  const print = input.print ?? ((line) => console.log(line));
14049
14049
  const loader = input.loader ?? new PluginLoader(input.loaded.resolved, input.context);
14050
14050
  await withSpinner("Loading plugins…", () => loader.load());
14051
- assertPluginsResolvable$1(loader, "doctor");
14051
+ assertPluginsResolvable(loader, "doctor");
14052
14052
  const rows = [];
14053
14053
  const config = input.loaded.resolved;
14054
14054
  print("");
@@ -14085,7 +14085,7 @@ async function runDoctor(input) {
14085
14085
  status: row.status,
14086
14086
  detail: row.logMessage ?? row.message
14087
14087
  }, `doctor: ${row.capability}`);
14088
- print(statusRow(row.status, [`${pad(row.capability, 14)} via ${pad(row.provider, 14)}`, row.message]));
14088
+ print(statusRow(row.status, [`${pad$1(row.capability, 14)} via ${pad$1(row.provider, 14)}`, row.message]));
14089
14089
  }
14090
14090
  const summary = rows.reduce((acc, r) => {
14091
14091
  acc[r.status] += 1;
@@ -14242,7 +14242,7 @@ const doctorCommand = {
14242
14242
  describe: "Load the config and run a smoke check against every provider",
14243
14243
  builder: doctorArgs,
14244
14244
  handler: async (argv) => {
14245
- const tokens = tokenContext$1(argv.token);
14245
+ const tokens = tokenContext(argv.token);
14246
14246
  if (!tokens) return;
14247
14247
  const loaded = await loadConfig(argv.cwd);
14248
14248
  applyResolvedConfig(argv, loaded.resolved);
@@ -14704,7 +14704,7 @@ async function runRequestsExport(input) {
14704
14704
  }, input.context);
14705
14705
  /* v8 ignore stop */
14706
14706
  await loader.load();
14707
- assertPluginsResolvable$1(loader, "export requests");
14707
+ assertPluginsResolvable(loader, "export requests");
14708
14708
  const loaded = loader.has("tooling") ? loader.get("tooling") : [];
14709
14709
  const rows = [];
14710
14710
  const targets = [];
@@ -14797,7 +14797,7 @@ const requestsExportCommand = {
14797
14797
  describe: "Write without asking (required without a terminal)"
14798
14798
  }),
14799
14799
  handler: async (argv) => {
14800
- const tokens = tokenContext$1(argv.token);
14800
+ const tokens = tokenContext(argv.token);
14801
14801
  if (!tokens) return;
14802
14802
  const loaded = await loadConfig(argv.cwd);
14803
14803
  applyResolvedConfig(argv, loaded.resolved);
@@ -14819,7 +14819,7 @@ const requestsExportCommand = {
14819
14819
  const exportCommand = {
14820
14820
  command: "export",
14821
14821
  describe: "Export the stored tokens, or the request collections, to use them elsewhere",
14822
- builder: (y) => y.command(authExportCommand).command(requestsExportCommand).command(groupMenu$1("export")),
14822
+ builder: (y) => y.command(authExportCommand).command(requestsExportCommand).command(groupMenu("export")),
14823
14823
  handler: () => {}
14824
14824
  };
14825
14825
  // src/commands/skills/skills.args.ts
@@ -15084,7 +15084,7 @@ function tryRealpath(path) {
15084
15084
  */
15085
15085
  function resolvePreviewDeployPaths(gitRoot, cwdValue) {
15086
15086
  if (!cwdValue || cwdValue === ".") return void 0;
15087
- const all = workspacePackages(gitRoot, {
15087
+ const all = workspacePackages$1(gitRoot, {
15088
15088
  readJson: defaultReadJson,
15089
15089
  listDirs: defaultListDirs
15090
15090
  });
@@ -15813,7 +15813,7 @@ async function execStep(capability, step, dryRun, body, opts = {}) {
15813
15813
  if (typeof note === "string") result.message = note;
15814
15814
  return result;
15815
15815
  } catch (err) {
15816
- if (err instanceof ProviderApiError$1) {
15816
+ if (err instanceof ProviderApiError) {
15817
15817
  if (err.status !== void 0 && opts.skipCodes?.includes(err.status)) return {
15818
15818
  capability,
15819
15819
  step,
@@ -16053,7 +16053,7 @@ async function runSetup(input) {
16053
16053
  const logger = getLogger();
16054
16054
  const loader = input.loader ?? new PluginLoader(input.loaded.resolved, input.context);
16055
16055
  await withSpinner("Loading plugins…", () => loader.load());
16056
- assertPluginsResolvable$1(loader, "setup");
16056
+ assertPluginsResolvable(loader, "setup");
16057
16057
  const config = input.loaded.resolved;
16058
16058
  const dryRun = input.context.dryRun ?? false;
16059
16059
  const steps = [];
@@ -16291,7 +16291,7 @@ async function runSetup(input) {
16291
16291
  }
16292
16292
  if (loader.has("source") && config.docs) {
16293
16293
  const source = loader.get("source");
16294
- const resolveDeployToken = createFeatureResolver$1({
16294
+ const resolveDeployToken = createFeatureResolver({
16295
16295
  envName: "HOLOCRON_DEPLOY_TOKEN",
16296
16296
  keyringKey: "github.deploy"
16297
16297
  });
@@ -16877,7 +16877,7 @@ const skillsUpdateCommand = {
16877
16877
  const installCommand = {
16878
16878
  command: "install",
16879
16879
  describe: "Install agent skills from the @theholocron/skills registry",
16880
- builder: (y) => y.command(skillsInstallCommand).command(groupMenu$1("install")),
16880
+ builder: (y) => y.command(skillsInstallCommand).command(groupMenu("install")),
16881
16881
  handler: () => {}
16882
16882
  };
16883
16883
  // src/commands/notifications-link/notifications-link.args.ts
@@ -16891,7 +16891,7 @@ const notificationsLinkCommand = {
16891
16891
  describe: "Link your server account to your GitHub account by signing in with the provider",
16892
16892
  builder: notificationsLinkArgs,
16893
16893
  handler: async (argv) => {
16894
- const tokens = tokenContext$1(argv.token);
16894
+ const tokens = tokenContext(argv.token);
16895
16895
  if (!tokens) return;
16896
16896
  const loaded = await loadConfig(argv.cwd);
16897
16897
  applyResolvedConfig(argv, loaded.resolved);
@@ -16911,7 +16911,7 @@ const notificationsLinkCommand = {
16911
16911
  const linkCommand = {
16912
16912
  command: "link",
16913
16913
  describe: "Link a GitHub account to a member of a notifications service",
16914
- builder: (y) => y.command(notificationsLinkCommand).command(groupMenu$1("link")),
16914
+ builder: (y) => y.command(notificationsLinkCommand).command(groupMenu("link")),
16915
16915
  handler: () => {}
16916
16916
  };
16917
16917
  // src/commands/auth/auth-list.command.ts
@@ -16955,7 +16955,7 @@ const projectListCommand = {
16955
16955
  command: "projects",
16956
16956
  describe: "List the boards of the organization, with their number, name and state",
16957
16957
  handler: async (argv) => {
16958
- const tokens = tokenContext$1(argv.token);
16958
+ const tokens = tokenContext(argv.token);
16959
16959
  if (!tokens) return;
16960
16960
  const loaded = await loadConfig(argv.cwd);
16961
16961
  applyResolvedConfig(argv, loaded.resolved);
@@ -16986,7 +16986,7 @@ async function runSecretsList(input) {
16986
16986
  const logger = input.logger ?? getLogger();
16987
16987
  const loader = input.loader ?? new PluginLoader(input.loaded.resolved, input.context);
16988
16988
  await loader.load();
16989
- assertPluginsResolvable$1(loader, "list secrets");
16989
+ assertPluginsResolvable(loader, "list secrets");
16990
16990
  if (!loader.has("secrets")) throw new Error("`secrets` capability is not configured — add a `secrets` provider to holocron.config.json");
16991
16991
  const secrets = loader.get("secrets");
16992
16992
  const groups = [];
@@ -17097,7 +17097,7 @@ const secretsListCommand = {
17097
17097
  describe: "List the names of the secrets at each scope (never the values)",
17098
17098
  builder: secretsListArgs,
17099
17099
  handler: async (argv) => {
17100
- const tokens = tokenContext$1(argv.token);
17100
+ const tokens = tokenContext(argv.token);
17101
17101
  if (!tokens) return;
17102
17102
  const loaded = await loadConfig(argv.cwd);
17103
17103
  applyResolvedConfig(argv, loaded.resolved);
@@ -17124,7 +17124,7 @@ const secretsListCommand = {
17124
17124
  const listCommand = {
17125
17125
  command: "list",
17126
17126
  describe: "List projects, secrets, skills or stored tokens",
17127
- builder: (y) => y.command(secretsListCommand).command(projectListCommand).command(authListCommand).command(skillsListCommand).command(groupMenu$1("list")),
17127
+ builder: (y) => y.command(secretsListCommand).command(projectListCommand).command(authListCommand).command(skillsListCommand).command(groupMenu("list")),
17128
17128
  handler: () => {}
17129
17129
  };
17130
17130
  // src/commands/menu/menu.command.ts
@@ -17160,7 +17160,7 @@ const menuCommand = (version) => ({
17160
17160
  function parseLimit(value, command) {
17161
17161
  if (value === void 0) return void 0;
17162
17162
  const text = String(value).trim();
17163
- if (!/^[1-9]\d*$/.test(text) || !Number.isSafeInteger(Number(text))) throw new ConfigError$1(`${command}: --limit "${text}" is not a positive whole number`);
17163
+ if (!/^[1-9]\d*$/.test(text) || !Number.isSafeInteger(Number(text))) throw new ConfigError(`${command}: --limit "${text}" is not a positive whole number`);
17164
17164
  return Number(text);
17165
17165
  }
17166
17166
  // src/commands/migrate/collect-records/collect-records.ts
@@ -17269,7 +17269,7 @@ async function openSide(input) {
17269
17269
  cardinality: "single",
17270
17270
  tuple: {
17271
17271
  provider: endpoint.provider,
17272
- packageName: resolvePluginPackage$1(endpoint.provider),
17272
+ packageName: resolvePluginPackage(endpoint.provider),
17273
17273
  options: {
17274
17274
  ...ownOptions,
17275
17275
  ...endpoint.options
@@ -17284,7 +17284,7 @@ async function openSide(input) {
17284
17284
  };
17285
17285
  const loader = input.makeLoader?.(resolved, input.context) ?? new PluginLoader(resolved, input.context);
17286
17286
  await loader.load();
17287
- assertPluginsResolvable$1(loader, input.command ?? "migrate");
17287
+ assertPluginsResolvable(loader, input.command ?? "migrate");
17288
17288
  const side = {
17289
17289
  ok: true,
17290
17290
  provider: endpoint.provider
@@ -17316,7 +17316,7 @@ function parseOptionPairs(text, flag) {
17316
17316
  const options = {};
17317
17317
  for (const pair of text.split(",").filter((p) => p.trim() !== "")) {
17318
17318
  const eq = pair.indexOf("=");
17319
- if (eq <= 0) throw new ConfigError$1(`${flag}: "${pair}" is not key=value`);
17319
+ if (eq <= 0) throw new ConfigError(`${flag}: "${pair}" is not key=value`);
17320
17320
  options[pair.slice(0, eq).trim()] = pair.slice(eq + 1).trim();
17321
17321
  }
17322
17322
  return options;
@@ -17330,7 +17330,7 @@ function parseOptionPairs(text, flag) {
17330
17330
  function parseEndpoint(spec, flag = "--from") {
17331
17331
  const colon = spec.indexOf(":");
17332
17332
  const provider = (colon === -1 ? spec : spec.slice(0, colon)).trim();
17333
- if (!/^[a-z][a-z0-9-]*$/.test(provider)) throw new ConfigError$1(`${flag}: "${spec}" does not start with a provider name, e.g. github or linear:team=ENG`);
17333
+ if (!/^[a-z][a-z0-9-]*$/.test(provider)) throw new ConfigError(`${flag}: "${spec}" does not start with a provider name, e.g. github or linear:team=ENG`);
17334
17334
  return {
17335
17335
  provider,
17336
17336
  options: parseOptionPairs(colon === -1 ? "" : spec.slice(colon + 1), flag)
@@ -17576,7 +17576,7 @@ async function runMigrate(input) {
17576
17576
  /** What each subcommand does after yargs: load the config and tokens, build its scope from the org, run, set the exit code. */
17577
17577
  async function handleMigrate(argv, scope) {
17578
17578
  const limit = parseLimit(argv.limit, "migrate");
17579
- const tokens = tokenContext$1(argv.token);
17579
+ const tokens = tokenContext(argv.token);
17580
17580
  if (!tokens) return;
17581
17581
  const loaded = await loadConfig(argv.cwd);
17582
17582
  applyResolvedConfig(argv, loaded.resolved);
@@ -17670,7 +17670,7 @@ const migrateIssuesCommand = {
17670
17670
  a.all,
17671
17671
  a.sourceMilestone,
17672
17672
  a.keys
17673
- ].filter(Boolean).length !== 1) throw new ConfigError$1("migrate issues: pass exactly one of --all, --source-milestone or --keys");
17673
+ ].filter(Boolean).length !== 1) throw new ConfigError("migrate issues: pass exactly one of --all, --source-milestone or --keys");
17674
17674
  return handleMigrate(a, () => ({
17675
17675
  kind: "issues",
17676
17676
  selector: a.all ? { all: true } : a.sourceMilestone ? { milestone: a.sourceMilestone } : { keys: a.keys.split(",").map((k) => k.trim()).filter(Boolean) }
@@ -17699,7 +17699,7 @@ const migrateProjectCommand = {
17699
17699
  const migrateCommand = {
17700
17700
  command: "migrate <subcommand>",
17701
17701
  describe: "Move issues, or a whole board, from one tracker to another (GitHub and Linear) and say what did not carry over",
17702
- builder: (y) => y.command(migrateIssueCommand).command(migrateIssuesCommand).command(migrateProjectCommand).command(groupMenu$1("migrate")),
17702
+ builder: (y) => y.command(migrateIssueCommand).command(migrateIssuesCommand).command(migrateProjectCommand).command(groupMenu("migrate")),
17703
17703
  handler: () => {}
17704
17704
  };
17705
17705
  // src/commands/project/move/move.ts
@@ -17723,7 +17723,7 @@ async function runProjectMove(input) {
17723
17723
  };
17724
17724
  const loader = input.loader ?? new PluginLoader(input.loaded.resolved, input.context);
17725
17725
  await loader.load();
17726
- assertPluginsResolvable$1(loader, "move issues");
17726
+ assertPluginsResolvable(loader, "move issues");
17727
17727
  const opened = await openBoardContext({
17728
17728
  loaded: input.loaded,
17729
17729
  context: input.context,
@@ -17820,7 +17820,7 @@ const projectMoveCommand = {
17820
17820
  describe: "Move the open items of one board to another, with their status and priority; closed ones stay behind",
17821
17821
  builder: projectMoveArgs,
17822
17822
  handler: async (argv) => {
17823
- const tokens = tokenContext$1(argv.token);
17823
+ const tokens = tokenContext(argv.token);
17824
17824
  if (!tokens) return;
17825
17825
  const loaded = await loadConfig(argv.cwd);
17826
17826
  applyResolvedConfig(argv, loaded.resolved);
@@ -17843,7 +17843,7 @@ const projectMoveCommand = {
17843
17843
  const moveCommand = {
17844
17844
  command: "move",
17845
17845
  describe: "Move the open items of one project board to another",
17846
- builder: (y) => y.command(projectMoveCommand).command(groupMenu$1("move")),
17846
+ builder: (y) => y.command(projectMoveCommand).command(groupMenu("move")),
17847
17847
  handler: () => {}
17848
17848
  };
17849
17849
  // src/commands/auth/auth-set.args.ts
@@ -18180,7 +18180,7 @@ async function runIdeasPromote(input) {
18180
18180
  }, input.context);
18181
18181
  /* v8 ignore stop */
18182
18182
  await loader.load();
18183
- assertPluginsResolvable$1(loader, "new spec");
18183
+ assertPluginsResolvable(loader, "new spec");
18184
18184
  if (!loader.has("issues")) {
18185
18185
  const failure = loader.loadFailures().find((f) => f.key === "issues");
18186
18186
  return finish([row$3(input.issue, "fail", `the \`issues\` provider is not available${failure ? ` (${describeError(failure.error)})` : ""}`)]);
@@ -18246,7 +18246,7 @@ const ideasPromoteCommand = {
18246
18246
  describe: "Write without asking (required without a terminal)"
18247
18247
  }),
18248
18248
  handler: async (argv) => {
18249
- const tokens = tokenContext$1(argv.token);
18249
+ const tokens = tokenContext(argv.token);
18250
18250
  if (!tokens) return;
18251
18251
  const loaded = await loadConfig(argv.cwd);
18252
18252
  applyResolvedConfig(argv, loaded.resolved);
@@ -18312,7 +18312,7 @@ async function runIssueCreate(input) {
18312
18312
  }, input.context);
18313
18313
  /* v8 ignore stop */
18314
18314
  await loader.load();
18315
- assertPluginsResolvable$1(loader, "new issue");
18315
+ assertPluginsResolvable(loader, "new issue");
18316
18316
  if (!loader.has("issues")) {
18317
18317
  const failure = loader.loadFailures().find((f) => f.key === "issues");
18318
18318
  return finish([row$2(title, "fail", `the \`issues\` provider is not available${failure ? ` (${describeError(failure.error)})` : ""}`)]);
@@ -18376,7 +18376,7 @@ const issueCreateCommand = {
18376
18376
  describe: "File without asking (required without a terminal)"
18377
18377
  }),
18378
18378
  handler: async (argv) => {
18379
- const tokens = tokenContext$1(argv.token);
18379
+ const tokens = tokenContext(argv.token);
18380
18380
  if (!tokens) return;
18381
18381
  const loaded = await loadConfig(argv.cwd);
18382
18382
  applyResolvedConfig(argv, loaded.resolved);
@@ -18429,7 +18429,7 @@ const notificationsChannelAddCommand = {
18429
18429
  describe: "Create a channel, optionally with a webhook whose URL is stored as a secret",
18430
18430
  builder: notificationsChannelAddArgs,
18431
18431
  handler: async (argv) => {
18432
- const tokens = tokenContext$1(argv.token);
18432
+ const tokens = tokenContext(argv.token);
18433
18433
  if (!tokens) return;
18434
18434
  const [name] = await promptForPositionals(getEntry("new channel"), argv);
18435
18435
  const loaded = await loadConfig(argv.cwd);
@@ -18599,7 +18599,7 @@ async function runNotificationsCreateServer(input) {
18599
18599
  /* v8 ignore next -- the real loader is only built outside tests, which always inject one */
18600
18600
  const loader = input.loader ?? new PluginLoader(input.loaded.resolved, input.context);
18601
18601
  await loader.load();
18602
- assertPluginsResolvable$1(loader, "new server");
18602
+ assertPluginsResolvable(loader, "new server");
18603
18603
  const dryRun = input.context.dryRun ?? false;
18604
18604
  const sleep = input.sleep ?? ((ms) => new Promise((resolve) => setTimeout(resolve, ms)));
18605
18605
  const refuse = (message, reason = message) => {
@@ -18752,7 +18752,7 @@ const notificationsCreateServerCommand = {
18752
18752
  describe: "Create the server the layout describes, apply it, invite its owner and hand it over",
18753
18753
  builder: notificationsCreateServerArgs,
18754
18754
  handler: async (argv) => {
18755
- const tokens = tokenContext$1(argv.token);
18755
+ const tokens = tokenContext(argv.token);
18756
18756
  if (!tokens) return;
18757
18757
  const loaded = await loadConfig(argv.cwd);
18758
18758
  applyResolvedConfig(argv, loaded.resolved);
@@ -19964,7 +19964,7 @@ const projectCreateCommand = {
19964
19964
  describe: "Make a board from a template",
19965
19965
  builder: projectCreateArgs,
19966
19966
  handler: async (argv) => {
19967
- const tokens = tokenContext$1(argv.token);
19967
+ const tokens = tokenContext(argv.token);
19968
19968
  if (!tokens) return;
19969
19969
  const loaded = await loadConfig(argv.cwd);
19970
19970
  applyResolvedConfig(argv, loaded.resolved);
@@ -20008,11 +20008,11 @@ async function runSecretSet(input) {
20008
20008
  const logger = input.logger ?? getLogger();
20009
20009
  const loader = input.loader ?? new PluginLoader(input.loaded.resolved, input.context);
20010
20010
  await loader.load();
20011
- assertPluginsResolvable$1(loader, "new secret");
20011
+ assertPluginsResolvable(loader, "new secret");
20012
20012
  const dryRun = input.context.dryRun ?? false;
20013
20013
  const scope = input.scope ?? { kind: "repo" };
20014
20014
  if (!loader.has("secrets")) throw new Error("`secrets` capability is not configured — add a `secrets` provider to holocron.config.json");
20015
- const value = await resolveValue$1(input);
20015
+ const value = await resolveValue(input);
20016
20016
  if (!value) throw new Error(`no value for secret \`${input.name}\` — pass it positionally, via --from-stdin, --from-env <NAME>, or set $${input.name} in the environment`);
20017
20017
  print(`Holocron secret set — ${input.name} (${describeScope(scope)})${dryRun ? " (dry-run)" : ""}`);
20018
20018
  if (dryRun) {
@@ -20056,7 +20056,7 @@ async function runSecretSet(input) {
20056
20056
  };
20057
20057
  }
20058
20058
  }
20059
- async function resolveValue$1(input) {
20059
+ async function resolveValue(input) {
20060
20060
  if (input.value) return input.value;
20061
20061
  if (input.fromStdin) return (await (input.readStdin ?? defaultReadStdin)()).replace(/\r?\n$/, "");
20062
20062
  if (input.fromEnv) return env$4.get(input.fromEnv);
@@ -20100,7 +20100,7 @@ const secretSetCommand = {
20100
20100
  describe: "Set a single secret via the configured `secrets` capability",
20101
20101
  builder: secretSetArgs,
20102
20102
  handler: async (argv) => {
20103
- const tokens = tokenContext$1(argv.token);
20103
+ const tokens = tokenContext(argv.token);
20104
20104
  if (!tokens) return;
20105
20105
  const [name] = await promptForPositionals(getEntry("new secret"), argv);
20106
20106
  const scopeArg = argv.scope;
@@ -20773,7 +20773,7 @@ const newRepoCommand = {
20773
20773
  builder: newRepoArgs,
20774
20774
  handler: async (argv) => {
20775
20775
  try {
20776
- const tokens = tokenContext$1(argv.token);
20776
+ const tokens = tokenContext(argv.token);
20777
20777
  if (!tokens) return;
20778
20778
  const adminToken = tokens.cliTokens?.["github"] ?? tokens.cliToken;
20779
20779
  const answers = await askNewRepoAnswers(argv);
@@ -20826,7 +20826,7 @@ const newRepoCommand = {
20826
20826
  const newCommand = {
20827
20827
  command: "new",
20828
20828
  describe: "Create a repo, plugin, channel, server, secret, token, tunnel, GitHub App, project, spec or issue",
20829
- builder: (y) => y.command(newRepoCommand).command(pluginCreateCommand).command(notificationsChannelAddCommand).command(githubAppCreateCommand).command(projectCreateCommand).command(secretSetCommand).command(notificationsCreateServerCommand).command(ideasPromoteCommand).command(issueCreateCommand).command(authSetCommand).command(tunnelUpCommand).command(groupMenu$1("new")),
20829
+ builder: (y) => y.command(newRepoCommand).command(pluginCreateCommand).command(notificationsChannelAddCommand).command(githubAppCreateCommand).command(projectCreateCommand).command(secretSetCommand).command(notificationsCreateServerCommand).command(ideasPromoteCommand).command(issueCreateCommand).command(authSetCommand).command(tunnelUpCommand).command(groupMenu("new")),
20830
20830
  handler: () => {}
20831
20831
  };
20832
20832
  // src/commands/probe/probe.args.ts
@@ -23116,7 +23116,7 @@ const probeCommand = {
23116
23116
  describe: "Poke a live provider on purpose: inspect it, or run a proof that cleans up after itself",
23117
23117
  builder: probeArgs,
23118
23118
  handler: async (argv) => {
23119
- const tokens = tokenContext$1(argv.token);
23119
+ const tokens = tokenContext(argv.token);
23120
23120
  if (!tokens) return;
23121
23121
  const loaded = await loadConfig(argv.cwd);
23122
23122
  applyResolvedConfig(argv, loaded.resolved);
@@ -23186,7 +23186,7 @@ async function runProvider(input) {
23186
23186
  /* v8 ignore next -- the real loader is only built outside tests, which always inject one */
23187
23187
  const loader = input.loader ?? new PluginLoader(input.loaded.resolved, input.context);
23188
23188
  await loader.load();
23189
- assertPluginsResolvable$1(loader, "provider");
23189
+ assertPluginsResolvable(loader, "provider");
23190
23190
  const groups = loader.providerActions();
23191
23191
  if (input.options && !input.provider) return fail(print, "`--with` needs a provider name", "e.g. `holocron provider linear doctor --with team=ENG`");
23192
23192
  if (!input.provider) {
@@ -23305,9 +23305,9 @@ async function readWithOptions(values, cwd) {
23305
23305
  try {
23306
23306
  loaded = await loadConfigPath(filepath);
23307
23307
  } catch (err) {
23308
- throw new ConfigError$1(`--with ${value}: ${describeError(err)}`);
23308
+ throw new ConfigError(`--with ${value}: ${describeError(err)}`);
23309
23309
  }
23310
- if (!isObject(loaded)) throw new ConfigError$1(`--with ${value}: must hold an object of the provider's options`);
23310
+ if (!isObject(loaded)) throw new ConfigError(`--with ${value}: must hold an object of the provider's options`);
23311
23311
  options = {
23312
23312
  ...options,
23313
23313
  ...loaded
@@ -23336,7 +23336,7 @@ const providerCommand = {
23336
23336
  describe: "Set up or check what only one provider has, from its block of holocron.config or --with",
23337
23337
  builder: providerArgs,
23338
23338
  handler: async (argv) => {
23339
- const tokens = tokenContext$1(argv.token);
23339
+ const tokens = tokenContext(argv.token);
23340
23340
  if (!tokens) return;
23341
23341
  const options = await readWithOptions(argv.with, argv.cwd);
23342
23342
  const loaded = await loadConfig(argv.cwd);
@@ -23676,8 +23676,8 @@ async function filterNewPackages(entries, cwd, exec, print, nameWidth, dirWidth)
23676
23676
  const publishedVersion = view.exitCode === 0 ? view.stdout.trim() : "";
23677
23677
  if (publishedVersion) {
23678
23678
  print(statusRow("skip", [
23679
- pad(entry.name, nameWidth),
23680
- pad(entry.dir, dirWidth),
23679
+ pad$1(entry.name, nameWidth),
23680
+ pad$1(entry.dir, dirWidth),
23681
23681
  `already published (v${publishedVersion})`
23682
23682
  ]));
23683
23683
  continue;
@@ -23915,7 +23915,7 @@ async function runPublish(input = {}) {
23915
23915
  ];
23916
23916
  if (dryRun) {
23917
23917
  print("");
23918
- for (const entry of newEntries) print(style.dim(` ${pad(entry.name, nameWidth)} ${pad(entry.dir, dirWidth)} would publish (v${entry.version})`));
23918
+ for (const entry of newEntries) print(style.dim(` ${pad$1(entry.name, nameWidth)} ${pad$1(entry.dir, dirWidth)} would publish (v${entry.version})`));
23919
23919
  print(style.dim(` would run: pnpm ${redactOtp(publishArgs, otp).join(" ")}`));
23920
23920
  printSummary(print, dryRun, packageNames.length, 0, skippedCount);
23921
23921
  printNextSteps(print, env, packageNames, identity, releaseWorkflowFile(cwd));
@@ -23942,8 +23942,8 @@ async function runPublish(input = {}) {
23942
23942
  print(` pnpm --filter @theholocron/cli run start:source publish package --initial --otp <6-digit-code>`);
23943
23943
  }
23944
23944
  for (const entry of newEntries) print(statusRow("fail", [
23945
- pad(entry.name, nameWidth),
23946
- pad(entry.dir, dirWidth),
23945
+ pad$1(entry.name, nameWidth),
23946
+ pad$1(entry.dir, dirWidth),
23947
23947
  "publish failed"
23948
23948
  ]));
23949
23949
  printSummary(print, dryRun, 0, packageNames.length, skippedCount);
@@ -23958,8 +23958,8 @@ async function runPublish(input = {}) {
23958
23958
  };
23959
23959
  }
23960
23960
  for (const entry of newEntries) print(statusRow("ok", [
23961
- pad(entry.name, nameWidth),
23962
- pad(entry.dir, dirWidth),
23961
+ pad$1(entry.name, nameWidth),
23962
+ pad$1(entry.dir, dirWidth),
23963
23963
  `published (v${entry.version})`
23964
23964
  ]));
23965
23965
  printSummary(print, dryRun, packageNames.length, 0, skippedCount);
@@ -24444,7 +24444,7 @@ const publishPackageCommand = {
24444
24444
  const publishCommand = {
24445
24445
  command: "publish",
24446
24446
  describe: "Version and publish workspace packages",
24447
- builder: (y) => y.command(npmBumpVersionsCommand).command(moveTagCommand).command(publishPackageCommand).command(groupMenu$1("publish")),
24447
+ builder: (y) => y.command(npmBumpVersionsCommand).command(moveTagCommand).command(publishPackageCommand).command(groupMenu("publish")),
24448
24448
  handler: () => {}
24449
24449
  };
24450
24450
  // src/commands/project/plan-reconcile/plan-reconcile.ts
@@ -24527,7 +24527,7 @@ async function runProjectReconcile(input) {
24527
24527
  /* v8 ignore next -- the real loader is only built outside tests, which always inject one */
24528
24528
  const loader = input.loader ?? new PluginLoader(input.loaded.resolved, input.context);
24529
24529
  await loader.load();
24530
- assertPluginsResolvable$1(loader, "reconcile project");
24530
+ assertPluginsResolvable(loader, "reconcile project");
24531
24531
  const dryRun = input.context.dryRun ?? false;
24532
24532
  const report = {
24533
24533
  status: "ok",
@@ -24665,7 +24665,7 @@ const projectReconcileCommand = {
24665
24665
  describe: "Set item statuses where a rule says so: blocked, unblocked, closed (status only)",
24666
24666
  builder: projectReconcileArgs,
24667
24667
  handler: async (argv) => {
24668
- const tokens = tokenContext$1(argv.token);
24668
+ const tokens = tokenContext(argv.token);
24669
24669
  if (!tokens) return;
24670
24670
  const loaded = await loadConfig(argv.cwd);
24671
24671
  applyResolvedConfig(argv, loaded.resolved);
@@ -24685,7 +24685,7 @@ const projectReconcileCommand = {
24685
24685
  const reconcileCommand = {
24686
24686
  command: "reconcile",
24687
24687
  describe: "Set project board item statuses where a rule says so",
24688
- builder: (y) => y.command(projectReconcileCommand).command(groupMenu$1("reconcile")),
24688
+ builder: (y) => y.command(projectReconcileCommand).command(groupMenu("reconcile")),
24689
24689
  handler: () => {}
24690
24690
  };
24691
24691
  // src/commands/auth/auth-unset.args.ts
@@ -24704,7 +24704,7 @@ const authUnsetCommand = {
24704
24704
  const removeCommand = {
24705
24705
  command: "remove",
24706
24706
  describe: "Remove a stored token or installed skills",
24707
- builder: (y) => y.command(authUnsetCommand).command(skillsRemoveCommand).command(groupMenu$1("remove")),
24707
+ builder: (y) => y.command(authUnsetCommand).command(skillsRemoveCommand).command(groupMenu("remove")),
24708
24708
  handler: () => {}
24709
24709
  };
24710
24710
  // src/commands/monitoring-resolve-checks/monitoring-resolve-checks.ts
@@ -24742,7 +24742,7 @@ const monitoringResolveChecksCommand = {
24742
24742
  describe: "Load config/plugins and write the configured `monitoring` checks to a file as JSON — the untrusted half of the delivery.previewCheck split (holocron#1030/#1032)",
24743
24743
  builder: monitoringResolveChecksArgs,
24744
24744
  handler: async (argv) => {
24745
- const tokens = tokenContext$1(argv.token);
24745
+ const tokens = tokenContext(argv.token);
24746
24746
  if (!tokens) return;
24747
24747
  const loaded = await loadConfig(argv.cwd);
24748
24748
  applyResolvedConfig(argv, loaded.resolved);
@@ -24762,7 +24762,7 @@ const monitoringResolveChecksCommand = {
24762
24762
  const resolveCommand = {
24763
24763
  command: "resolve",
24764
24764
  describe: "Resolve configuration into a file for a later, trusted step",
24765
- builder: (y) => y.command(monitoringResolveChecksCommand).command(groupMenu$1("resolve")),
24765
+ builder: (y) => y.command(monitoringResolveChecksCommand).command(groupMenu("resolve")),
24766
24766
  handler: () => {}
24767
24767
  };
24768
24768
  // src/commands/run/run.args.ts
@@ -24872,7 +24872,7 @@ const notificationsSetupCommand = {
24872
24872
  describe: "Apply the server layout a notifications provider declares in holocron.config.ts",
24873
24873
  builder: notificationsSetupArgs,
24874
24874
  handler: async (argv) => {
24875
- const tokens = tokenContext$1(argv.token);
24875
+ const tokens = tokenContext(argv.token);
24876
24876
  if (!tokens) return;
24877
24877
  const loaded = await loadConfig(argv.cwd);
24878
24878
  applyResolvedConfig(argv, loaded.resolved);
@@ -24952,7 +24952,7 @@ const projectSetupCommand = {
24952
24952
  command: "project",
24953
24953
  describe: "Make each board providers.projects declares match its template, creating the ones that are missing",
24954
24954
  handler: async (argv) => {
24955
- const tokens = tokenContext$1(argv.token);
24955
+ const tokens = tokenContext(argv.token);
24956
24956
  if (!tokens) return;
24957
24957
  const loaded = await loadConfig(argv.cwd);
24958
24958
  applyResolvedConfig(argv, loaded.resolved);
@@ -24984,7 +24984,7 @@ const setupCommand = {
24984
24984
  describe: "Apply infra setup actions across every configured capability",
24985
24985
  builder: (y) => setupArgs(y).command(notificationsSetupCommand).command(projectSetupCommand),
24986
24986
  handler: async (argv) => {
24987
- const tokens = tokenContext$1(argv.token);
24987
+ const tokens = tokenContext(argv.token);
24988
24988
  if (!tokens) return;
24989
24989
  const loaded = await loadConfig(argv.cwd);
24990
24990
  applyResolvedConfig(argv, loaded.resolved);
@@ -25026,7 +25026,7 @@ const configShowCommand = {
25026
25026
  const showCommand = {
25027
25027
  command: "show",
25028
25028
  describe: "Show the resolved holocron config",
25029
- builder: (y) => y.command(configShowCommand).command(groupMenu$1("show")),
25029
+ builder: (y) => y.command(configShowCommand).command(groupMenu("show")),
25030
25030
  handler: () => {}
25031
25031
  };
25032
25032
  // src/commands/ideas-sync/resolve-ideas-provider/resolve-ideas-provider.ts
@@ -25045,7 +25045,7 @@ function resolveIdeasProvider(resolved, env) {
25045
25045
  cardinality: "single",
25046
25046
  tuple: {
25047
25047
  provider: "obsidian",
25048
- packageName: resolvePluginPackage$1("obsidian"),
25048
+ packageName: resolvePluginPackage("obsidian"),
25049
25049
  options: dir === void 0 ? {} : { dir }
25050
25050
  }
25051
25051
  };
@@ -25203,7 +25203,7 @@ async function runIdeasSync(input) {
25203
25203
  }, input.context);
25204
25204
  /* v8 ignore stop */
25205
25205
  await reader.load();
25206
- assertPluginsResolvable$1(reader, "sync ideas");
25206
+ assertPluginsResolvable(reader, "sync ideas");
25207
25207
  if (!reader.has("ideas")) {
25208
25208
  const failure = reader.loadFailures().find((f) => f.key === "ideas");
25209
25209
  return finish([row$1("ideas", "fail", `the \`ideas\` provider is not available${failure ? ` (${describeError(failure.error)})` : ""}`)]);
@@ -25243,7 +25243,7 @@ async function runIdeasSync(input) {
25243
25243
  /* v8 ignore next -- the real loader is only built outside tests, which always inject one */
25244
25244
  const loader = input.loader ?? new PluginLoader(input.loaded.resolved, input.context);
25245
25245
  await loader.load();
25246
- assertPluginsResolvable$1(loader, "sync ideas");
25246
+ assertPluginsResolvable(loader, "sync ideas");
25247
25247
  const issues = loader.has("issues") ? loader.get("issues") : void 0;
25248
25248
  for (const idea of ready) {
25249
25249
  const path = idea.key;
@@ -25302,7 +25302,7 @@ const ideasSyncCommand = {
25302
25302
  describe: "File without asking (required without a terminal)"
25303
25303
  }),
25304
25304
  handler: async (argv) => {
25305
- const tokens = tokenContext$1(argv.token);
25305
+ const tokens = tokenContext(argv.token);
25306
25306
  if (!tokens) return;
25307
25307
  const loaded = await loadConfig(argv.cwd);
25308
25308
  applyResolvedConfig(argv, loaded.resolved);
@@ -25333,7 +25333,7 @@ const notificationsSyncRolesCommand = {
25333
25333
  describe: "Make who holds a server role match a team, through the links file",
25334
25334
  builder: notificationsSyncRolesArgs,
25335
25335
  handler: async (argv) => {
25336
- const tokens = tokenContext$1(argv.token);
25336
+ const tokens = tokenContext(argv.token);
25337
25337
  if (!tokens) return;
25338
25338
  const loaded = await loadConfig(argv.cwd);
25339
25339
  applyResolvedConfig(argv, loaded.resolved);
@@ -25484,18 +25484,18 @@ async function runSecretsSync(input) {
25484
25484
  const logger = input.logger ?? getLogger();
25485
25485
  const loader = input.loader ?? new PluginLoader(input.loaded.resolved, input.context);
25486
25486
  await withSpinner("Loading plugins…", () => loader.load());
25487
- assertPluginsResolvable$1(loader, "sync secrets");
25487
+ assertPluginsResolvable(loader, "sync secrets");
25488
25488
  logger.info({
25489
25489
  environment: input.environmentId,
25490
25490
  dryRun: (input.context.dryRun ?? false) || void 0
25491
25491
  }, "sync secrets: start");
25492
25492
  const dryRun = input.context.dryRun ?? false;
25493
25493
  const variablesOnly = (input.variableRoutes?.length ?? 0) > 0 && input.secretRoutes?.length === 0 && !input.projectId;
25494
- if ((loader.has("deployment") && !variablesOnly && Boolean(input.projectId) || input.workerScript) && !input.deployFilter) throw new ConfigError(`no \`repo.secrets.deploy\` entry for environment ${JSON.stringify(input.environmentId)}: a deployment or a Worker receives only the keys named by \`keys\` or \`prefix\`, never every key. Add { environment: ${JSON.stringify(input.environmentId)}, prefix: "<PREFIX>_" } (or keys: [...]) to repo.secrets.deploy`);
25494
+ if ((loader.has("deployment") && !variablesOnly && Boolean(input.projectId) || input.workerScript) && !input.deployFilter) throw new ConfigError$1(`no \`repo.secrets.deploy\` entry for environment ${JSON.stringify(input.environmentId)}: a deployment or a Worker receives only the keys named by \`keys\` or \`prefix\`, never every key. Add { environment: ${JSON.stringify(input.environmentId)}, prefix: "<PREFIX>_" } (or keys: [...]) to repo.secrets.deploy`);
25495
25495
  const namesSecretsDestination = input.secretRoutes !== void 0 || Boolean(input.githubSecretKeys?.length);
25496
- if (!namesSecretsDestination && input.githubSecretScope !== void 0) throw new ConfigError(`--github-secret-scope names a scope but no keys: pass the keys to write with --github-secret <KEY>, or declare environment ${JSON.stringify(input.environmentId)} in \`repo.secrets.sync\``);
25497
- if (!namesSecretsDestination && !input.projectId && !input.workerScript) throw new ConfigError(noSecretsEntryMessage(input.environmentId, input.loaded.resolved.repo?.secrets?.sync ?? []));
25498
- for (const route of input.secretRoutes ?? [{ scope: input.githubSecretScope ?? { kind: "repo" } }]) if (route.scope.kind === "organization" && !route.scope.repos?.length) throw new ConfigError(`organization secrets (org=${route.scope.name}) need an explicit reader list: declare them in \`repo.secrets.sync\` with \`repos: [...]\` (visibility "selected"), never "all"`);
25496
+ if (!namesSecretsDestination && input.githubSecretScope !== void 0) throw new ConfigError$1(`--github-secret-scope names a scope but no keys: pass the keys to write with --github-secret <KEY>, or declare environment ${JSON.stringify(input.environmentId)} in \`repo.secrets.sync\``);
25497
+ if (!namesSecretsDestination && !input.projectId && !input.workerScript) throw new ConfigError$1(noSecretsEntryMessage(input.environmentId, input.loaded.resolved.repo?.secrets?.sync ?? []));
25498
+ for (const route of input.secretRoutes ?? [{ scope: input.githubSecretScope ?? { kind: "repo" } }]) if (route.scope.kind === "organization" && !route.scope.repos?.length) throw new ConfigError$1(`organization secrets (org=${route.scope.name}) need an explicit reader list: declare them in \`repo.secrets.sync\` with \`repos: [...]\` (visibility "selected"), never "all"`);
25499
25499
  const targets = input.targets ?? ["production", "preview"];
25500
25500
  print(style.header(`Holocron sync secrets — environment ${input.environmentId}${dryRun ? " (dry-run)" : ""}`));
25501
25501
  print(style.dim(` vault: ${vaultProviderName(loader)}`));
@@ -25824,7 +25824,7 @@ const secretsSyncCommand = {
25824
25824
  describe: "Read a vault environment + fan KEY=VALUEs out to secrets + deployment env vars",
25825
25825
  builder: secretsSyncArgs,
25826
25826
  handler: async (argv) => {
25827
- const tokens = tokenContext$1(argv.token);
25827
+ const tokens = tokenContext(argv.token);
25828
25828
  if (!tokens) return;
25829
25829
  const githubSecretScope = argv.githubSecretScope ? parseScope(argv.githubSecretScope) : void 0;
25830
25830
  const environmentId = argv.env;
@@ -25966,7 +25966,7 @@ function realSpecsSyncIo(repoRoot) {
25966
25966
  * body (`retry_after`), and the client has already waited for the short ones.
25967
25967
  */
25968
25968
  function rateLimitedFor(err) {
25969
- if (!(err instanceof ProviderApiError$1) || err.status !== 429) return void 0;
25969
+ if (!(err instanceof ProviderApiError) || err.status !== 429) return void 0;
25970
25970
  const seconds = /"retry_after":\s*([\d.]+)/.exec(String(err.details))?.[1];
25971
25971
  return seconds === void 0 ? 0 : Math.ceil(Number(seconds));
25972
25972
  }
@@ -26162,7 +26162,7 @@ async function runSpecsSync(input) {
26162
26162
  /* v8 ignore next -- the real loader is only built outside tests, which always inject one */
26163
26163
  const loader = input.loader ?? new PluginLoader(input.loaded.resolved, input.context);
26164
26164
  await loader.load();
26165
- assertPluginsResolvable$1(loader, "sync specs");
26165
+ assertPluginsResolvable(loader, "sync specs");
26166
26166
  const dryRun = input.context.dryRun ?? false;
26167
26167
  const refuse = (message, reason = message) => {
26168
26168
  print(` ${style.fail(message)}`);
@@ -26357,7 +26357,7 @@ const specsSyncCommand = {
26357
26357
  describe: "Keep each ADR and spec in step with a post in a forum channel",
26358
26358
  builder: specsSyncArgs,
26359
26359
  handler: async (argv) => {
26360
- const tokens = tokenContext$1(argv.token);
26360
+ const tokens = tokenContext(argv.token);
26361
26361
  if (!tokens) return;
26362
26362
  const loaded = await loadConfig(argv.cwd);
26363
26363
  applyResolvedConfig(argv, loaded.resolved);
@@ -26620,7 +26620,7 @@ async function runSyncGithub(input) {
26620
26620
  if (createPr && branch) try {
26621
26621
  await client.git.createRef(repo, `refs/heads/${branch}`, newCommitSha);
26622
26622
  } catch (err) {
26623
- if (!(err instanceof ProviderApiError) || err.status !== 422) throw err;
26623
+ if (!(err instanceof ProviderApiError$1) || err.status !== 422) throw err;
26624
26624
  await client.git.updateRef(repo, `heads/${branch}`, newCommitSha, true);
26625
26625
  }
26626
26626
  else await client.git.updateRef(repo, `heads/${targetBranch}`, newCommitSha);
@@ -26645,7 +26645,7 @@ async function runSyncGithub(input) {
26645
26645
  })).html_url;
26646
26646
  print(` → PR opened: ${prUrl}`);
26647
26647
  } catch (err) {
26648
- if (err instanceof ProviderApiError && err.status === 422 && String(err.details).includes("already exists")) print(` → PR already open for ${branch} — branch updated, ready to merge`);
26648
+ if (err instanceof ProviderApiError$1 && err.status === 422 && String(err.details).includes("already exists")) print(` → PR already open for ${branch} — branch updated, ready to merge`);
26649
26649
  else print(` ⚠ PR creation failed: ${errorMessage(err)}`);
26650
26650
  }
26651
26651
  return done({
@@ -26676,7 +26676,7 @@ const syncGithubArgs = (y) => y.option("repo", {
26676
26676
  describe: "Write generated files to this local directory instead of pushing (for validation)"
26677
26677
  });
26678
26678
  // src/commands/sync-github/sync-github.command.ts
26679
- const resolveSyncToken = createFeatureResolver$1({
26679
+ const resolveSyncToken = createFeatureResolver({
26680
26680
  envName: "HOLOCRON_SYNC_TOKEN",
26681
26681
  keyringKey: "github.sync"
26682
26682
  });
@@ -26686,7 +26686,7 @@ const syncGithubCommand = {
26686
26686
  builder: syncGithubArgs,
26687
26687
  handler: async (argv) => {
26688
26688
  const outputDir = argv["output-dir"];
26689
- const parsed = tokenContext$1(argv.token);
26689
+ const parsed = tokenContext(argv.token);
26690
26690
  if (!parsed) return;
26691
26691
  let token;
26692
26692
  if (outputDir) token = "no-token-needed";
@@ -26723,7 +26723,7 @@ function parseSince(value, now = Date.now()) {
26723
26723
  const span = /^(\d+)([mhdw])$/.exec(value.trim());
26724
26724
  if (span) return new Date(now - Number(span[1]) * UNITS[span[2]]).toISOString();
26725
26725
  const at = Date.parse(value);
26726
- if (Number.isNaN(at)) throw new ConfigError$1(`sync issues: --since "${value}" is not a date or a span like 30m, 12h, 7d or 2w`);
26726
+ if (Number.isNaN(at)) throw new ConfigError(`sync issues: --since "${value}" is not a date or a span like 30m, 12h, 7d or 2w`);
26727
26727
  return new Date(at).toISOString();
26728
26728
  }
26729
26729
  // src/commands/sync-issues/run-sync-issues/run-sync-issues.ts
@@ -26864,7 +26864,7 @@ const syncIssuesCommand = {
26864
26864
  handler: async (argv) => {
26865
26865
  const since = argv.since ? parseSince(argv.since) : void 0;
26866
26866
  const limit = parseLimit(argv.limit, "sync issues");
26867
- const tokens = tokenContext$1(argv.token);
26867
+ const tokens = tokenContext(argv.token);
26868
26868
  if (!tokens) return;
26869
26869
  const loaded = await loadConfig(argv.cwd);
26870
26870
  applyResolvedConfig(argv, loaded.resolved);
@@ -26983,7 +26983,7 @@ const NPM_BASE = "https://www.npmjs.com/package";
26983
26983
  * `undefined` when the workspace has no public package (a single-package repo
26984
26984
  * has no table to show).
26985
26985
  */
26986
- function workspacePackages$1(repoRoot, discover = discoverWorkspacePackages) {
26986
+ function workspacePackages(repoRoot, discover = discoverWorkspacePackages) {
26987
26987
  const rows = discover(repoRoot).flatMap(({ name, manifest }) => name && !manifest.private ? [{
26988
26988
  name,
26989
26989
  homepage: typeof manifest.homepage === "string" ? manifest.homepage : ""
@@ -27107,7 +27107,7 @@ async function runSyncReadme(input) {
27107
27107
  description,
27108
27108
  homepage,
27109
27109
  scripts,
27110
- packages: workspacePackages$1(repoRoot, discoverFn)
27110
+ packages: workspacePackages(repoRoot, discoverFn)
27111
27111
  });
27112
27112
  const markerSections = {
27113
27113
  ...sections.packages !== void 0 && { packages: sections.packages },
@@ -27215,7 +27215,7 @@ async function runSyncTooling(input) {
27215
27215
  }, input.context);
27216
27216
  /* v8 ignore stop */
27217
27217
  await loader.load();
27218
- assertPluginsResolvable$1(loader, "sync tooling");
27218
+ assertPluginsResolvable(loader, "sync tooling");
27219
27219
  if (!loader.has("tooling")) {
27220
27220
  const failure = loader.loadFailures().find((f) => f.key === "tooling");
27221
27221
  return finish([row("tooling", "fail", `the \`tooling\` provider is not available${failure ? ` (${describeError(failure.error)})` : ""}`)]);
@@ -27240,7 +27240,7 @@ const syncToolingCommand = {
27240
27240
  command: "tooling",
27241
27241
  describe: "Sync each tooling provider (collections, environments, specs) without running the rest of setup",
27242
27242
  handler: async (argv) => {
27243
- const tokens = tokenContext$1(argv.token);
27243
+ const tokens = tokenContext(argv.token);
27244
27244
  if (!tokens) return;
27245
27245
  const loaded = await loadConfig(argv.cwd);
27246
27246
  applyResolvedConfig(argv, loaded.resolved);
@@ -28093,7 +28093,7 @@ const syncCommand = {
28093
28093
  describe: "Sync state from config to the provider and local files (labels, properties, teams, topics, keywords, description, homepage, readme, workflows, scripts, wiki)",
28094
28094
  builder: (y) => syncArgs(y).command(syncGithubCommand).command(syncIssuesCommand).command(syncReadmeCommand).command(ideasSyncCommand).command(syncToolingCommand).command(specsSyncCommand).command(secretsSyncCommand).command(notificationsSyncRolesCommand),
28095
28095
  handler: async (argv) => {
28096
- const tokens = tokenContext$1(argv.token);
28096
+ const tokens = tokenContext(argv.token);
28097
28097
  if (!tokens) return;
28098
28098
  const loaded = await loadConfig(argv.cwd);
28099
28099
  applyResolvedConfig(argv, loaded.resolved);
@@ -28114,7 +28114,7 @@ const syncCommand = {
28114
28114
  const updateCommand = {
28115
28115
  command: "update",
28116
28116
  describe: "Update installed agent skills to their latest versions",
28117
- builder: (y) => y.command(skillsUpdateCommand).command(groupMenu$1("update")),
28117
+ builder: (y) => y.command(skillsUpdateCommand).command(groupMenu("update")),
28118
28118
  handler: () => {}
28119
28119
  };
28120
28120
  // src/commands/upgrade-deps/upgrade-deps.ts
@@ -28321,8 +28321,8 @@ const upgradeDepsCommand = {
28321
28321
  * `holocron upgrade node` — the generic Node.js pin rewrite lives in `@theholocron/astromech/upgrade`; this
28322
28322
  * binds it to the command-scoped logger.
28323
28323
  */
28324
- function runUpgradeNode$1(input) {
28325
- return runUpgradeNode({
28324
+ function runUpgradeNode(input) {
28325
+ return runUpgradeNode$1({
28326
28326
  logger: getLogger(),
28327
28327
  ...input
28328
28328
  });
@@ -28348,7 +28348,7 @@ const upgradeNodeCommand = {
28348
28348
  const extraRaw = JSON.parse(raw).upgrade?.node?.extra;
28349
28349
  if (Array.isArray(extraRaw)) extra = extraRaw;
28350
28350
  } catch {}
28351
- const report = await runUpgradeNode$1({
28351
+ const report = await runUpgradeNode({
28352
28352
  to: Number(to),
28353
28353
  ...argv.from != null ? { from: argv.from } : {},
28354
28354
  cwd: argv.cwd,
@@ -28365,7 +28365,7 @@ const upgradeNodeCommand = {
28365
28365
  const upgradeCommand = {
28366
28366
  command: "upgrade",
28367
28367
  describe: "Upgrade toolchain version pins across the repo",
28368
- builder: (y) => y.command(upgradeNodeCommand).command(upgradeDepsCommand).command(groupMenu$1("upgrade")),
28368
+ builder: (y) => y.command(upgradeNodeCommand).command(upgradeDepsCommand).command(groupMenu("upgrade")),
28369
28369
  handler: () => {}
28370
28370
  };
28371
28371
  // src/cli/own-package-json.ts