@icebreakers/monorepo 5.7.0 → 5.8.0

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.
Files changed (26) hide show
  1. package/dist/{baseline-DPfotf4y.mjs → baseline-Cx3VuGue.mjs} +1 -1
  2. package/dist/{catalog-CDEyc1uA.mjs → catalog-BKW8udNq.mjs} +3 -3
  3. package/dist/cli.mjs +67 -65
  4. package/dist/{commands-TS8ABFdP.mjs → commands-C1KOgvKa.mjs} +273 -88
  5. package/dist/{config-C38c_Q8L.mjs → config-ITi4Uywg.mjs} +3 -3
  6. package/dist/{create-flow-CCr2hfSY.mjs → create-flow-C_ar-XrN.mjs} +3 -3
  7. package/dist/{deps-CUdI2DaB.mjs → deps-_M128Hqi.mjs} +3 -3
  8. package/dist/{execute-Vi4qHe-D.mjs → execute-CNGJsU9v.mjs} +2 -2
  9. package/dist/{execute-PX1hT0qv.mjs → execute-DTrS4Jqx.mjs} +2 -2
  10. package/dist/{format-DZ7L34rf.mjs → format-Dxe0grKF.mjs} +1 -1
  11. package/dist/index.d.mts +28 -3
  12. package/dist/index.mjs +10 -10
  13. package/dist/{inputs-_xIVONmB.mjs → inputs-DkBp5uc7.mjs} +1 -1
  14. package/dist/{npm-B25nrSyz.mjs → npm-BttWVZSI.mjs} +1 -1
  15. package/dist/{plan-B5aE_WNF.mjs → plan-DkRsq9Oj.mjs} +1 -1
  16. package/dist/{run-Lu7y1bNf.mjs → run-BHsnON3k.mjs} +4 -4
  17. package/dist/{save-CdCf630Z.mjs → save-DTVXKc6k.mjs} +3 -3
  18. package/dist/{scan-4nboHNXP.mjs → scan-uUmUqFA6.mjs} +2 -2
  19. package/dist/{template-drift-BBhnrHY1.mjs → template-drift-Bhvs_DPa.mjs} +3 -3
  20. package/dist/tooling-entry.mjs +2 -2
  21. package/dist/{transaction-DAhY8EpG.mjs → transaction-ut5-TLoD.mjs} +2 -2
  22. package/dist/{tsconfig-CGntrzBM.mjs → tsconfig-DtgBJ7Vi.mjs} +6 -6
  23. package/dist/{vitest-DkGh4Ygo.mjs → vitest-DkD49zO4.mjs} +1 -1
  24. package/dist/{workspace-tasks-CnB8kkS0.mjs → workspace-tasks-PcOR82ko.mjs} +5 -5
  25. package/package.json +9 -9
  26. package/resources/skills/repoctl/references/commands.md +5 -0
@@ -1,12 +1,12 @@
1
1
  import { t as __exportAll } from "./rolldown-runtime-8H4AJuhK.mjs";
2
- import { A as referenceTarget, B as saveKnipBaseline, C as loadCompiler, D as ownershipFile, E as exists$1, Gt as getWorkspacePackages, Ht as clearWorkspaceCache, I as getKnipConfigurationSuggestions, J as getWorkspaceGraph, K as mergeText, M as formatEnvironmentCache, O as readText, P as checkEnvironmentCache, R as planKnipCheck, S as configReader, St as localize, T as compare$1, Tt as resolveRepoctlLocale, Ut as getWorkspaceData, W as analyzeTurboRuns, Wt as getWorkspacePackageSummaries, Z as getWorkspaceImpact, _ as planTemplateLink, _t as assetsDir$1, at as record$2, b as planGenerate, c as loadTemplateInstanceRegistry$1, ct as renderCreateNewProject, dt as migrateLegacyToolingReferences, et as compareGraphValues, f as recoverTemplateUpgrade, ft as setByPath, g as applyTemplateLinkPlan, gt as validateCleanTargets, h as loadTemplateUpgradeJournal, ht as isWithin, it as readInput, j as relativeFile, jt as fs$2, k as referencePath, l as rebuildTemplateInstanceBaseline, lt as rewriteTemplateSnapshotReferences, m as planTemplateUpgrade, mt as assertSafePath, nt as workspaceDependencyTypes, o as listTemplateInstances, ot as safeFile, p as applyTemplateUpgradePlan, pt as stageFileTransaction, q as withOperationLock, qt as GitClient, rt as hash$1, s as loadTemplateBaseline$1, tt as resolveWorkspaceGraphNode, u as relocateTemplateInstance, w as validateGraph, x as generators, xt as templatesDir, y as applyGeneratePlan, yt as packageDir$1, z as runKnipCheck } from "./workspace-tasks-CnB8kkS0.mjs";
3
- import { a as resolveFullWorkspaceCheckPlan, c as verifyCommitMsg, d as runPnpmCommand, f as logger, i as getKnownRepoCheckCommands, l as verifyPreCommit, n as resolveAffectedCheckContext, o as resolveRecommendedCheckPlan, r as resolveAffectedCheckPlan, s as runRecommendedCheck, t as runCheckWithReport, u as verifyStagedTypecheck } from "./execute-Vi4qHe-D.mjs";
4
- import { B as presetPackageName, C as checkedFile, E as relativeFile$1, F as normalizeTemplateSourceRequest, G as commandConfigDirectory, L as sourceRequestKey, O as package_default$1, P as normalizeTemplateRemoteSource, R as templateSourcePath, S as canonicalDirectory, T as readOptional$1, U as appendConfigPath, V as presetVersion, _ as listToolingCapabilities, b as presetRelativePath, d as loadMonorepoConfig, f as loadMonorepoConfigDetails, g as presetAssetTarget, j as ConfigValidationError, k as version$2, n as defineTsconfigConfig, p as resolveCommandConfig, u as getRepoctlConfigCandidates, v as installedPresetDirectory, w as hash$2, x as readPresetFile, y as parsePresetJson } from "./tsconfig-CGntrzBM.mjs";
5
- import { c as selectCommandOverrides, i as rangesOverlap, l as chinaMirrorsEnvs, r as parseSpecifier, s as resolveCommandValues } from "./scan-4nboHNXP.mjs";
6
- import { A as record$3, C as baselineDirectory, D as parseBaseline, E as isRootAsset, F as toWorkspaceAssetPath, M as summarizeChecks, O as templatePackage, S as checkDependencyAdmission, T as encodeBaseline, a as applyDoctorSuppressions, b as parseWorkspaceLockfile, c as collectSelectedDoctorChecks, d as recommendedRepoScripts, f as inspectInstallSecurity, g as isLegacyReleaseWorkflow, h as supportedVersion, i as hasTemplateDriftIssues, j as getWorkspacePatterns, k as getAssetTargets, l as getDoctorRuleIds, m as settingState, o as validateDoctorSuppressions, p as readSecuritySources, r as formatTemplateDriftReport, s as validateDoctorConfiguration, t as checkTemplateDrift, u as selectDoctorRules, v as inspectPnpmRuntime, w as baselinePath, y as lockfileRecord } from "./template-drift-BBhnrHY1.mjs";
7
- import { t as writeDependencyTransaction } from "./transaction-DAhY8EpG.mjs";
8
- import { i as applyDependencyFixPlan, r as planDependencyFix, t as checkDependencies } from "./deps-CUdI2DaB.mjs";
9
- import { i as applyCatalogMigrationPlan, n as checkCatalogs, r as planCatalogMigration } from "./catalog-CDEyc1uA.mjs";
2
+ import { A as referenceTarget, B as saveKnipBaseline, C as loadCompiler, D as ownershipFile, E as exists$1, Gt as getWorkspacePackages, Ht as clearWorkspaceCache, I as getKnipConfigurationSuggestions, J as getWorkspaceGraph, K as mergeText, M as formatEnvironmentCache, O as readText, P as checkEnvironmentCache, R as planKnipCheck, S as configReader, St as localize, T as compare$1, Tt as resolveRepoctlLocale, Ut as getWorkspaceData, W as analyzeTurboRuns, Wt as getWorkspacePackageSummaries, Z as getWorkspaceImpact, _ as planTemplateLink, _t as assetsDir$1, at as record$3, b as planGenerate, c as loadTemplateInstanceRegistry$1, ct as renderCreateNewProject, dt as migrateLegacyToolingReferences, et as compareGraphValues, f as recoverTemplateUpgrade, ft as setByPath, g as applyTemplateLinkPlan, gt as validateCleanTargets, h as loadTemplateUpgradeJournal, ht as isWithin, it as readInput, j as relativeFile, jt as fs$2, k as referencePath, l as rebuildTemplateInstanceBaseline, lt as rewriteTemplateSnapshotReferences, m as planTemplateUpgrade, mt as assertSafePath, nt as workspaceDependencyTypes, o as listTemplateInstances, ot as safeFile, p as applyTemplateUpgradePlan, pt as stageFileTransaction, q as withOperationLock, qt as GitClient, rt as hash$1, s as loadTemplateBaseline$1, tt as resolveWorkspaceGraphNode, u as relocateTemplateInstance, w as validateGraph, x as generators, xt as templatesDir, y as applyGeneratePlan, yt as packageDir$1, z as runKnipCheck } from "./workspace-tasks-PcOR82ko.mjs";
3
+ import { a as resolveFullWorkspaceCheckPlan, c as verifyCommitMsg, d as runPnpmCommand, f as logger, i as getKnownRepoCheckCommands, l as verifyPreCommit, n as resolveAffectedCheckContext, o as resolveRecommendedCheckPlan, r as resolveAffectedCheckPlan, s as runRecommendedCheck, t as runCheckWithReport, u as verifyStagedTypecheck } from "./execute-CNGJsU9v.mjs";
4
+ import { B as presetPackageName, C as checkedFile, E as relativeFile$1, F as normalizeTemplateSourceRequest, G as commandConfigDirectory, L as sourceRequestKey, O as package_default$1, P as normalizeTemplateRemoteSource, R as templateSourcePath, S as canonicalDirectory, T as readOptional$1, U as appendConfigPath, V as presetVersion, _ as listToolingCapabilities, b as presetRelativePath, d as loadMonorepoConfig, f as loadMonorepoConfigDetails, g as presetAssetTarget, j as ConfigValidationError, k as version$2, n as defineTsconfigConfig, p as resolveCommandConfig, u as getRepoctlConfigCandidates, v as installedPresetDirectory, w as hash$2, x as readPresetFile, y as parsePresetJson } from "./tsconfig-DtgBJ7Vi.mjs";
5
+ import { c as selectCommandOverrides, i as rangesOverlap, l as chinaMirrorsEnvs, r as parseSpecifier, s as resolveCommandValues } from "./scan-uUmUqFA6.mjs";
6
+ import { A as record$4, C as baselineDirectory, D as parseBaseline, E as isRootAsset, F as toWorkspaceAssetPath, M as summarizeChecks, O as templatePackage, S as checkDependencyAdmission, T as encodeBaseline, a as applyDoctorSuppressions, b as parseWorkspaceLockfile, c as collectSelectedDoctorChecks, d as recommendedRepoScripts, f as inspectInstallSecurity, g as isLegacyReleaseWorkflow, h as supportedVersion, i as hasTemplateDriftIssues, j as getWorkspacePatterns, k as getAssetTargets, l as getDoctorRuleIds, m as settingState, o as validateDoctorSuppressions, p as readSecuritySources, r as formatTemplateDriftReport, s as validateDoctorConfiguration, t as checkTemplateDrift, u as selectDoctorRules, v as inspectPnpmRuntime, w as baselinePath, y as lockfileRecord } from "./template-drift-Bhvs_DPa.mjs";
7
+ import { t as writeDependencyTransaction } from "./transaction-ut5-TLoD.mjs";
8
+ import { i as applyDependencyFixPlan, r as planDependencyFix, t as checkDependencies } from "./deps-_M128Hqi.mjs";
9
+ import { i as applyCatalogMigrationPlan, n as checkCatalogs, r as planCatalogMigration } from "./catalog-BKW8udNq.mjs";
10
10
  import { createRequire, isBuiltin } from "node:module";
11
11
  import { findWorkspaceDir } from "@pnpm/find-workspace-dir";
12
12
  import { findWorkspacePackages } from "@pnpm/workspace.find-packages";
@@ -932,14 +932,14 @@ function presetTemplateDeclarations(layers) {
932
932
  }
933
933
  //#endregion
934
934
  //#region src/core/template-catalog/entries.ts
935
- function record$1(value) {
935
+ function record$2(value) {
936
936
  return value && typeof value === "object" && !Array.isArray(value) ? value : void 0;
937
937
  }
938
938
  function definition(value) {
939
939
  const data = typeof value === "string" ? {
940
940
  source: value,
941
941
  target: value
942
- } : record$1(value);
942
+ } : record$2(value);
943
943
  if (!data || ["source", "target"].some((key) => typeof data[key] !== "string" || !data[key].trim() || data[key].includes("\0"))) return;
944
944
  if (["label", "description"].some((key) => data[key] !== void 0 && typeof data[key] !== "string")) return;
945
945
  if (data["category"] !== void 0 && (typeof data["category"] !== "string" || !isTemplateCategory(data["category"]))) return;
@@ -981,7 +981,7 @@ function resolveCatalogEntries(context, diagnostics) {
981
981
  "templatesDir",
982
982
  "templateMap",
983
983
  "choices"
984
- ].filter((field) => record$1(raw)?.[field] === null).map((field) => `commands.create.${field}`), ...Object.entries(record$1(raw?.templateMap) ?? {}).filter(([, value]) => value === null).map(([key]) => appendConfigPath("commands.create.templateMap", key))];
984
+ ].filter((field) => record$2(raw)?.[field] === null).map((field) => `commands.create.${field}`), ...Object.entries(record$2(raw?.templateMap) ?? {}).filter(([, value]) => value === null).map(([key]) => appendConfigPath("commands.create.templateMap", key))];
985
985
  for (const configPath of paths) if (!diagnostics.some((item) => item.configPath === configPath)) diagnostics.push({
986
986
  id: "template-definition",
987
987
  status: "fail",
@@ -990,7 +990,7 @@ function resolveCatalogEntries(context, diagnostics) {
990
990
  detail: localize("Template configuration cannot be null.", "模板配置不能为 null。")
991
991
  });
992
992
  }
993
- const extra = record$1(createConfig.templateMap);
993
+ const extra = record$2(createConfig.templateMap);
994
994
  if (createConfig.templateMap !== void 0 && !extra) diagnostics.push({
995
995
  id: "template-definition",
996
996
  status: "fail",
@@ -1058,7 +1058,7 @@ function resolveCatalogChoices(context, entries, diagnostics) {
1058
1058
  detail: localize("choices must be an array.", "choices 必须是数组。")
1059
1059
  });
1060
1060
  for (const [index, raw] of (Array.isArray(choices) ? choices : []).entries()) {
1061
- const choice = record$1(raw);
1061
+ const choice = record$2(raw);
1062
1062
  const key = choice?.["value"];
1063
1063
  const configPath = `commands.create.choices[${index}]`;
1064
1064
  if (!choice || typeof key !== "string" || !entries.has(key) || selected.has(key) || [
@@ -1459,7 +1459,7 @@ async function downloadGitTemplate(source, directory, timeout) {
1459
1459
  async function resolveRemoteTemplateSource(source, templatePath = ".", options = {}) {
1460
1460
  const request = normalizeTemplateSourceRequest(source, templatePath);
1461
1461
  const cwd = path$1.resolve(options.cwd ?? process.cwd());
1462
- const npm = request.source.kind === "npm" ? await import("./npm-B25nrSyz.mjs") : void 0;
1462
+ const npm = request.source.kind === "npm" ? await import("./npm-BttWVZSI.mjs") : void 0;
1463
1463
  const configuration = request.source.kind === "npm" ? await npm.npmTemplateConfiguration(request.source, cwd) : void 0;
1464
1464
  if (request.source.kind === "npm") request.source.registry = configuration.registry;
1465
1465
  const cacheDir = path$1.resolve(cwd, options.cacheDir ?? path$1.join(process.env["XDG_CACHE_HOME"] ?? path$1.join(homedir(), ".cache"), "repoctl", "template-sources-v1"));
@@ -1715,7 +1715,7 @@ async function discoverDoctorManifests(workspaceDir, patterns) {
1715
1715
  try {
1716
1716
  const text = (await readFile(path$1.join(workspaceDir, filename), "utf8")).replace(/^\uFEFF/, "");
1717
1717
  const value = filename.endsWith(".yaml") ? YAML.parse(text) : filename.endsWith(".json5") ? JSON5.parse(text) : JSON.parse(text);
1718
- const data = record$3(value);
1718
+ const data = record$4(value);
1719
1719
  if (!data) entry.error = "invalid_structure";
1720
1720
  else {
1721
1721
  entry.data = data;
@@ -1731,11 +1731,11 @@ async function discoverDoctorManifests(workspaceDir, patterns) {
1731
1731
  //#endregion
1732
1732
  //#region src/commands/doctor/context.ts
1733
1733
  function rootPackageJson(data = {}) {
1734
- const stringMap = (value) => Object.fromEntries(Object.entries(record$3(value) ?? {}).filter((item) => typeof item[1] === "string"));
1734
+ const stringMap = (value) => Object.fromEntries(Object.entries(record$4(value) ?? {}).filter((item) => typeof item[1] === "string"));
1735
1735
  return {
1736
1736
  ...data,
1737
1737
  packageManager: typeof data["packageManager"] === "string" ? data["packageManager"] : void 0,
1738
- engines: typeof record$3(data["engines"])?.["node"] === "string" ? { node: record$3(data["engines"])["node"] } : {},
1738
+ engines: typeof record$4(data["engines"])?.["node"] === "string" ? { node: record$4(data["engines"])["node"] } : {},
1739
1739
  dependencies: stringMap(data["dependencies"]),
1740
1740
  devDependencies: stringMap(data["devDependencies"]),
1741
1741
  scripts: stringMap(data["scripts"])
@@ -1776,7 +1776,7 @@ async function collectDoctorContext(cwd) {
1776
1776
  let workspacePatterns = [];
1777
1777
  let workspaceManifestError = false;
1778
1778
  if (hasWorkspaceManifest) try {
1779
- const workspace = record$3(YAML.parse(await fs$2.readFile(workspaceManifestPath, "utf8")));
1779
+ const workspace = record$4(YAML.parse(await fs$2.readFile(workspaceManifestPath, "utf8")));
1780
1780
  const patterns = workspace?.["packages"];
1781
1781
  if (!workspace || patterns !== void 0 && (!Array.isArray(patterns) || patterns.some((value) => typeof value !== "string" || !value))) throw new Error("Invalid workspace patterns");
1782
1782
  workspacePatterns = patterns === void 0 ? [".", "**"] : getWorkspacePatterns(workspace);
@@ -2458,7 +2458,7 @@ var ReleaseCommandError = class extends Error {
2458
2458
  function invalid(field) {
2459
2459
  throw new ReleaseCommandError(`Invalid release branch configuration: ${field}`);
2460
2460
  }
2461
- function record(value, fields, field) {
2461
+ function record$1(value, fields, field) {
2462
2462
  if (!value || typeof value !== "object" || Array.isArray(value) || Object.keys(value).some((key) => !fields.includes(key))) invalid(field);
2463
2463
  return value;
2464
2464
  }
@@ -2485,7 +2485,7 @@ function releasePullRequestHead(rule) {
2485
2485
  }
2486
2486
  /** Build one deterministic mapping used by planning, preparation, publishing, CI and recovery. */
2487
2487
  function resolveReleaseBranches(input = {}) {
2488
- const config = record(input, [
2488
+ const config = record$1(input, [
2489
2489
  "stable",
2490
2490
  "maintenance",
2491
2491
  "prerelease"
@@ -2493,7 +2493,7 @@ function resolveReleaseBranches(input = {}) {
2493
2493
  const stable = branch$1(config["stable"] === void 0 ? "main" : config["stable"], "branches.stable");
2494
2494
  const maintenance = list(config["maintenance"] === void 0 ? [] : config["maintenance"], "branches.maintenance").map((value, index) => {
2495
2495
  const field = `branches.maintenance[${index}]`;
2496
- const item = record(value, [
2496
+ const item = record$1(value, [
2497
2497
  "branch",
2498
2498
  "range",
2499
2499
  "tag"
@@ -2539,7 +2539,7 @@ function resolveReleaseBranches(input = {}) {
2539
2539
  }));
2540
2540
  const prerelease = list(config["prerelease"] === void 0 ? defaults : config["prerelease"], "branches.prerelease").map((value, index) => {
2541
2541
  const field = `branches.prerelease[${index}]`;
2542
- const item = record(value, [
2542
+ const item = record$1(value, [
2543
2543
  "branch",
2544
2544
  "lane",
2545
2545
  "tag",
@@ -3289,10 +3289,10 @@ async function readDoctorManifest(workspaceDir) {
3289
3289
  function planMissingRootScripts(original) {
3290
3290
  let manifest;
3291
3291
  try {
3292
- manifest = record$2(JSON.parse(original.replace(/^\uFEFF/, "")));
3292
+ manifest = record$3(JSON.parse(original.replace(/^\uFEFF/, "")));
3293
3293
  } catch {}
3294
3294
  if (!manifest) return { notes: ["package.json must be a valid JSON object; repair it manually."] };
3295
- const scripts = manifest["scripts"] === void 0 ? {} : record$2(manifest["scripts"]);
3295
+ const scripts = manifest["scripts"] === void 0 ? {} : record$3(manifest["scripts"]);
3296
3296
  if (!scripts) return { notes: ["scripts is not an object; repair it manually before adding recommended scripts."] };
3297
3297
  const additions = Object.entries(recommendedRepoScripts).filter(([name]) => !Object.hasOwn(scripts, name)).map(([name, command]) => ({
3298
3298
  name,
@@ -3353,10 +3353,10 @@ async function planDoctorFix(cwd, options = {}) {
3353
3353
  };
3354
3354
  }
3355
3355
  function validatePlan(value, workspaceDir) {
3356
- const plan = record$2(value);
3356
+ const plan = record$3(value);
3357
3357
  if (!plan || plan["schemaVersion"] !== 1 || plan["workspaceDir"] !== workspaceDir || !Array.isArray(plan["operations"]) || plan["operations"].length > 1) throw new Error("Invalid doctor fix plan or workspace. Generate a new plan.");
3358
3358
  return plan["operations"].map((value) => {
3359
- const operation = record$2(value);
3359
+ const operation = record$3(value);
3360
3360
  if (!operation || typeof operation["before"] !== "string") throw new Error("Invalid doctor fix operation.");
3361
3361
  const expected = planMissingRootScripts(operation["before"]).operation;
3362
3362
  if (!expected || !isDeepStrictEqual(operation, expected)) throw new Error("Unsupported or modified doctor fix operation. Generate a new plan.");
@@ -3631,7 +3631,7 @@ var package_default = {
3631
3631
  type: "module",
3632
3632
  version: "0.0.0",
3633
3633
  "private": true,
3634
- packageManager: "pnpm@12.8.1",
3634
+ packageManager: "pnpm@12.9.1",
3635
3635
  description: "Source workspace for repoctl and Icebreaker's shared development packages",
3636
3636
  author: "ice breaker <hi@sonofmagic.top>",
3637
3637
  license: "MIT",
@@ -3729,10 +3729,10 @@ var package_default = {
3729
3729
  "@icebreakers/eslint-config": "workspace:*",
3730
3730
  "@icebreakers/monorepo": "workspace:*",
3731
3731
  "@icebreakers/stylelint-config": "workspace:*",
3732
- "@types/node": "^26.6.3",
3732
+ "@types/node": "^26.6.4",
3733
3733
  "@vitest/coverage-v8": "~5.0.3",
3734
- "eslint": "^10.11.0",
3735
- "execa": "^10.0.1",
3734
+ "eslint": "^10.12.0",
3735
+ "execa": "^10.1.0",
3736
3736
  "husky": "^9.1.7",
3737
3737
  "lint-staged": "^17.6.0",
3738
3738
  "make-fetch-happen": "15.0.6",
@@ -3743,7 +3743,7 @@ var package_default = {
3743
3743
  "tailwindcss": "^4.3.3",
3744
3744
  "tsd": "^0.33.0",
3745
3745
  "tsdown": "0.23.0",
3746
- "turbo": "^2.11.6",
3746
+ "turbo": "^2.11.7",
3747
3747
  "typescript": "^6.0.3",
3748
3748
  "vitest": "~5.0.3",
3749
3749
  "yaml": "^2.9.1"
@@ -4517,6 +4517,11 @@ async function readPendingIntents(cwd) {
4517
4517
  function getReleaseEnv(options) {
4518
4518
  return options.env ?? process.env;
4519
4519
  }
4520
+ /** CLI 预检与发布调度共享模式优先级,确保核验入口不加载可执行配置。 */
4521
+ function resolveReleaseMode(options) {
4522
+ const requested = options.mode && options.mode !== "auto" ? options.mode : (options.env ?? process.env)["REPO_RELEASE_MODE"]?.trim();
4523
+ return requested && requested !== "auto" ? requested : "auto";
4524
+ }
4520
4525
  function run(command, args, options) {
4521
4526
  const result = (options.spawn ?? spawnSync)(command, args, {
4522
4527
  cwd: options.cwd,
@@ -4830,11 +4835,28 @@ function runScripts(scripts, options, extraEnv) {
4830
4835
  } } : {}
4831
4836
  });
4832
4837
  }
4838
+ function verificationEnvironment(options) {
4839
+ const env = { ...options.env ?? process.env };
4840
+ for (const variable of [
4841
+ "REPO_RELEASE_MODE",
4842
+ "REPO_RELEASE_PACKAGE",
4843
+ "REPO_RELEASE_VERSION",
4844
+ "REPO_RELEASE_DRY_RUN",
4845
+ "REPO_RELEASE_RECOVERY_SOURCE_SHA",
4846
+ "REPO_RELEASE_SOURCE_SHA",
4847
+ "REPO_RELEASE_ACKNOWLEDGE_HOOKS"
4848
+ ]) delete env[variable];
4849
+ return env;
4850
+ }
4833
4851
  async function runQualityScripts(options) {
4834
4852
  await assertWorkspaceDependencyProtocols(options.cwd);
4835
4853
  const config = resolveCommandValues("release", options.config).values;
4836
- runScripts(config.qualityScripts, options);
4837
- runScripts(config.hooks?.verify ?? [], options);
4854
+ const verificationOptions = {
4855
+ ...options,
4856
+ env: verificationEnvironment(options)
4857
+ };
4858
+ runScripts(config.qualityScripts, verificationOptions);
4859
+ runScripts(config.hooks?.verify ?? [], verificationOptions);
4838
4860
  }
4839
4861
  function runReleaseHooks(phase, options) {
4840
4862
  runScripts(options.config?.hooks?.[phase] ?? [], options);
@@ -5501,12 +5523,14 @@ var PublishState = class {
5501
5523
  };
5502
5524
  //#endregion
5503
5525
  //#region src/commands/release/publish/registry.ts
5504
- const visibilityBudget = 3e5;
5526
+ const visibilityBudget = 9e5;
5527
+ const refreshBudget = 3e5;
5505
5528
  const pollInterval = 1e4;
5529
+ const progressInterval = 6e4;
5506
5530
  function sleep(milliseconds, options) {
5507
5531
  return options.sleep?.(milliseconds) ?? new Promise((resolve) => setTimeout(resolve, milliseconds));
5508
5532
  }
5509
- async function refreshRegistry(state, options, packages = state.candidates, deadline = performance.now() + visibilityBudget) {
5533
+ async function refreshRegistry(state, options, packages = state.candidates, deadline = performance.now() + refreshBudget) {
5510
5534
  const unknown = [];
5511
5535
  const pending = state.unconfirmed(packages);
5512
5536
  for (const [index, pkg] of pending.entries()) {
@@ -5542,6 +5566,9 @@ async function refreshRegistry(state, options, packages = state.candidates, dead
5542
5566
  async function confirmVisibility(state, options, packages, initialDelay = 0) {
5543
5567
  let remaining = visibilityBudget;
5544
5568
  let delay = initialDelay;
5569
+ let lastProgress = 0;
5570
+ let pendingVersions = state.unconfirmed(packages).map(packageKey).join(", ");
5571
+ if (pendingVersions && !options.quiet) logger.info(`Waiting up to ${visibilityBudget / 6e4} minutes for npm registry visibility; pending versions: ${pendingVersions}`);
5545
5572
  while (state.unconfirmed(packages).length && remaining > 0) {
5546
5573
  const started = performance.now();
5547
5574
  const wait = Math.min(delay, remaining);
@@ -5551,10 +5578,17 @@ async function confirmVisibility(state, options, packages, initialDelay = 0) {
5551
5578
  await refreshRegistry(state, options, packages, queryStarted + remaining);
5552
5579
  await state.save(options.cwd, "confirming");
5553
5580
  remaining -= performance.now() - queryStarted;
5581
+ const elapsed = visibilityBudget - remaining;
5582
+ const nextPendingVersions = state.unconfirmed(packages).map(packageKey).join(", ");
5583
+ if (nextPendingVersions && remaining > 0 && !options.quiet && (nextPendingVersions !== pendingVersions || elapsed - lastProgress >= progressInterval)) {
5584
+ logger.info(`Waiting for npm registry visibility (${Math.floor(elapsed / 1e3)}s/${visibilityBudget / 1e3}s); pending versions: ${nextPendingVersions}`);
5585
+ lastProgress = elapsed;
5586
+ }
5587
+ pendingVersions = nextPendingVersions;
5554
5588
  delay = pollInterval;
5555
5589
  }
5556
5590
  const pending = state.unconfirmed(packages);
5557
- if (pending.length) throw new ReleaseCommandError(`npm registry visibility confirmation timed out after 5 minutes; pending versions: ${pending.map(packageKey).join(", ")}`);
5591
+ if (pending.length) throw new ReleaseCommandError(`npm registry visibility confirmation timed out after ${visibilityBudget / 6e4} minutes; pending versions: ${pending.map(packageKey).join(", ")}. Upload evidence is preserved in repoctl-publish-progress.json; resume confirmation without re-uploading accepted versions.`);
5558
5592
  if (packages.length && !options.quiet) logger.info("npm registry visibility confirmed for all requested versions.");
5559
5593
  }
5560
5594
  //#endregion
@@ -5943,6 +5977,160 @@ async function publishLifecycle(options, selected, distTag = "latest") {
5943
5977
  return packages;
5944
5978
  }
5945
5979
  //#endregion
5980
+ //#region src/core/oidc/identity.ts
5981
+ const npmRegistry = "https://registry.npmjs.org";
5982
+ const npmAudience = "npm:registry.npmjs.org";
5983
+ const requestTimeout = 15e3;
5984
+ const identityKeys = [
5985
+ "iss",
5986
+ "aud",
5987
+ "sub",
5988
+ "repository",
5989
+ "repository_id",
5990
+ "repository_owner_id",
5991
+ "workflow_ref",
5992
+ "job_workflow_ref",
5993
+ "event_name",
5994
+ "runner_environment",
5995
+ "environment"
5996
+ ];
5997
+ function publicMessage(value, secrets) {
5998
+ let message = typeof value === "string" ? value : "npm did not return a recognizable error message";
5999
+ for (const secret of secrets) if (secret) message = message.replaceAll(secret, "[redacted]");
6000
+ return message.replaceAll(/\beyJ[\w-]+\.[\w-]+\.[\w-]+\b/g, "[redacted]").replaceAll(/\bnpm_[a-z0-9]+\b/gi, "[redacted]").replaceAll(/\p{Cc}/gu, " ").slice(0, 500);
6001
+ }
6002
+ function record(value) {
6003
+ return value !== null && typeof value === "object" && !Array.isArray(value) ? value : {};
6004
+ }
6005
+ async function requestIdentity(env, fetcher) {
6006
+ const requestToken = env["ACTIONS_ID_TOKEN_REQUEST_TOKEN"];
6007
+ const requestUrl = env["ACTIONS_ID_TOKEN_REQUEST_URL"];
6008
+ if (!requestToken || !requestUrl || !env["GITHUB_REPOSITORY"] || !env["GITHUB_WORKFLOW_REF"]) throw new Error("OIDC audit requires a GitHub-hosted job with id-token: write, GITHUB_REPOSITORY and GITHUB_WORKFLOW_REF");
6009
+ let response;
6010
+ try {
6011
+ const url = new URL(requestUrl);
6012
+ if (url.protocol !== "https:" || url.username || url.password) throw new Error("invalid OIDC request URL");
6013
+ url.searchParams.set("audience", npmAudience);
6014
+ response = await fetcher(url, {
6015
+ headers: { Authorization: `Bearer ${requestToken}` },
6016
+ signal: AbortSignal.timeout(requestTimeout),
6017
+ redirect: "error"
6018
+ });
6019
+ } catch {
6020
+ throw new Error("GitHub OIDC request failed, timed out or returned an invalid response; no credentials were saved");
6021
+ }
6022
+ if (!response.ok) throw new Error(`GitHub OIDC request failed: HTTP ${response.status}`);
6023
+ let body;
6024
+ try {
6025
+ body = record(await response.json());
6026
+ } catch {
6027
+ throw new Error("GitHub OIDC returned an invalid JSON response");
6028
+ }
6029
+ if (typeof body["value"] !== "string" || !body["value"]) throw new Error("GitHub OIDC response is missing an identity token");
6030
+ const idToken = body["value"];
6031
+ let claims;
6032
+ try {
6033
+ const segments = idToken.split(".");
6034
+ if (segments.length !== 3) throw new Error("invalid JWT");
6035
+ claims = record(JSON.parse(Buffer.from(segments[1], "base64url").toString("utf8")));
6036
+ } catch {
6037
+ throw new Error("GitHub OIDC identity claims could not be parsed");
6038
+ }
6039
+ if (claims["iss"] !== "https://token.actions.githubusercontent.com" || claims["aud"] !== "npm:registry.npmjs.org" || claims["repository"] !== env["GITHUB_REPOSITORY"] || claims["workflow_ref"] !== env["GITHUB_WORKFLOW_REF"] || claims["runner_environment"] !== "github-hosted") throw new Error("GitHub OIDC identity does not match the current GitHub-hosted workflow; no npm exchanges were attempted");
6040
+ return {
6041
+ idToken,
6042
+ requestToken,
6043
+ identity: Object.fromEntries(identityKeys.filter((key) => typeof claims[key] === "string").map((key) => [key, publicMessage(claims[key], [idToken, requestToken])]))
6044
+ };
6045
+ }
6046
+ //#endregion
6047
+ //#region src/core/oidc/exchange.ts
6048
+ async function exchangePackage(name, idToken, requestToken, fetcher) {
6049
+ try {
6050
+ const response = await fetcher(new URL(`/-/npm/v1/oidc/token/exchange/package/${encodeURIComponent(name)}`, npmRegistry), {
6051
+ method: "POST",
6052
+ headers: {
6053
+ Authorization: `Bearer ${idToken}`,
6054
+ Accept: "application/json"
6055
+ },
6056
+ body: "",
6057
+ signal: AbortSignal.timeout(requestTimeout),
6058
+ redirect: "error"
6059
+ });
6060
+ let body;
6061
+ try {
6062
+ body = record(await response.json());
6063
+ } catch {
6064
+ return {
6065
+ package: name,
6066
+ ok: false,
6067
+ status: response.status,
6068
+ message: "npm returned an invalid JSON response"
6069
+ };
6070
+ }
6071
+ const token = typeof body["token"] === "string" ? body["token"] : "";
6072
+ const ok = response.ok && token.length > 0;
6073
+ return {
6074
+ package: name,
6075
+ ok,
6076
+ status: response.status,
6077
+ message: ok ? "OIDC token exchange succeeded" : response.ok ? "npm response is missing an exchange token" : publicMessage(body["message"] ?? record(body["body"])["message"], [
6078
+ idToken,
6079
+ requestToken,
6080
+ token
6081
+ ])
6082
+ };
6083
+ } catch {
6084
+ return {
6085
+ package: name,
6086
+ ok: false,
6087
+ status: null,
6088
+ message: "npm token exchange request failed or timed out"
6089
+ };
6090
+ }
6091
+ }
6092
+ //#endregion
6093
+ //#region src/commands/release/oidc/index.ts
6094
+ /** 逐包核验官方 npm 的短时凭据交换;不发布、不执行 hooks,也不保存凭据。 */
6095
+ async function auditReleaseOidc(options) {
6096
+ clearWorkspaceCache();
6097
+ const { packages } = await getWorkspaceData(options.cwd);
6098
+ const candidates = packages.filter(({ manifest }) => typeof manifest.name === "string" && typeof manifest.version === "string");
6099
+ if (!candidates.length) throw new ReleaseCommandError("OIDC audit found no versioned publishable workspace packages");
6100
+ if (candidates.some(({ manifest }) => {
6101
+ const registry = record(record(manifest)["publishConfig"])["registry"];
6102
+ return registry !== void 0 && (typeof registry !== "string" || registry.replace(/\/$/, "") !== "https://registry.npmjs.org");
6103
+ })) throw new ReleaseCommandError("OIDC audit supports only the official npm registry; no credentials were requested");
6104
+ const fetcher = options.fetch ?? globalThis.fetch;
6105
+ const { idToken, requestToken, identity } = await requestIdentity(options.env ?? process.env, fetcher);
6106
+ const names = [...new Set(candidates.map((pkg) => pkg.manifest.name))].sort();
6107
+ const results = [];
6108
+ for (let start = 0; start < names.length; start += 4) results.push(...await Promise.all(names.slice(start, start + 4).map((name) => exchangePackage(name, idToken, requestToken, fetcher))));
6109
+ const hints = results.some((result) => result.status === 404) ? [
6110
+ "HTTP 404 alone does not prove that a package is missing or that its trusted publisher has expired. Check the npm package settings and the repository, workflow and environment identity.",
6111
+ "If npm explicitly reports Expired, delete and recreate the trusted publisher, then complete its first successful publish within 48 hours. Token exchange alone does not validate the configuration.",
6112
+ "npm policy: https://github.blog/changelog/2026-10-02-unvalidated-npm-trusted-publishing-configurations-now-expire/"
6113
+ ] : ["Token exchange success confirms current exchange access only. It does not complete the first successful publish required to validate a new trusted publisher."];
6114
+ return {
6115
+ schemaVersion: 1,
6116
+ identity,
6117
+ results,
6118
+ ok: results.every((result) => result.ok),
6119
+ hints
6120
+ };
6121
+ }
6122
+ async function runReleaseOidcAudit(options) {
6123
+ const env = getReleaseEnv(options);
6124
+ if (options.sourceSha || env["REPO_RELEASE_RECOVERY_SOURCE_SHA"]?.trim() || options.dryRun || env["REPO_RELEASE_DRY_RUN"] === "true" || options.packageName || options.packageVersion || env["REPO_RELEASE_PACKAGE"]?.trim() || env["REPO_RELEASE_VERSION"]?.trim()) throw new ReleaseCommandError("oidc-audit cannot be combined with source-sha, dry-run, package or version recovery options");
6125
+ const report = await auditReleaseOidc({
6126
+ cwd: options.cwd,
6127
+ env
6128
+ });
6129
+ process.stdout.write(`${JSON.stringify(report, null, 2)}\n`);
6130
+ if (!report.ok) throw new ReleaseCommandError(`npm OIDC audit failed for ${report.results.filter((result) => !result.ok).length}/${report.results.length} packages; see the safe report above`);
6131
+ return report;
6132
+ }
6133
+ //#endregion
5946
6134
  //#region src/commands/release/plan/native.ts
5947
6135
  var PlanError = class extends Error {
5948
6136
  id;
@@ -6721,11 +6909,6 @@ async function recoverUnpublished(options) {
6721
6909
  runAfterPublishHooks(packages, options);
6722
6910
  return packages;
6723
6911
  }
6724
- function resolveMode(options) {
6725
- const requested = options.mode && options.mode !== "auto" ? options.mode : getReleaseEnv(options)["REPO_RELEASE_MODE"]?.trim();
6726
- if (requested && requested !== "auto") return requested;
6727
- return "auto";
6728
- }
6729
6912
  async function publishStableCi(options) {
6730
6913
  const github = resolveGitHub(options);
6731
6914
  if (github.readReleaseState && github.writeReleaseState) {
@@ -6741,11 +6924,12 @@ async function publishStableCi(options) {
6741
6924
  return packages;
6742
6925
  }
6743
6926
  async function releaseCi(options) {
6927
+ const mode = resolveReleaseMode(options);
6928
+ if (mode === "oidc-audit") return runReleaseOidcAudit(options);
6744
6929
  options = {
6745
6930
  ...options,
6746
6931
  config: options.config ?? await resolveCommandConfig("release", options.cwd) ?? {}
6747
6932
  };
6748
- const mode = resolveMode(options);
6749
6933
  const source = options.sourceSha ?? getReleaseEnv(options)["REPO_RELEASE_RECOVERY_SOURCE_SHA"]?.trim();
6750
6934
  if (source) return recoverSource({
6751
6935
  ...options,
@@ -6761,7 +6945,7 @@ async function releaseCi(options) {
6761
6945
  ...options,
6762
6946
  dryRun: options.dryRun ?? getReleaseEnv(options)["REPO_RELEASE_DRY_RUN"] === "true"
6763
6947
  });
6764
- if (mode !== "auto") throw new ReleaseCommandError(`unknown release CI mode ${mode}; expected auto, prepare, publish, publish-unpublished, or reconcile`);
6948
+ if (mode !== "auto") throw new ReleaseCommandError(`unknown release CI mode ${mode}; expected auto, prepare, publish, publish-unpublished, reconcile, or oidc-audit`);
6765
6949
  const eventName = getReleaseEnv(options)["GITHUB_EVENT_NAME"]?.trim();
6766
6950
  if (eventName && eventName !== "workflow_dispatch") {
6767
6951
  if (!shouldRunRelease(await readReleaseTriggerContext(options))) {
@@ -7315,7 +7499,7 @@ function reportPath(value) {
7315
7499
  }
7316
7500
  function targets(value) {
7317
7501
  if (typeof value === "string") return [value];
7318
- const conditions = record$2(value);
7502
+ const conditions = record$3(value);
7319
7503
  if (!conditions || Object.keys(conditions).some((condition) => condition.startsWith("types@"))) return [];
7320
7504
  if (Object.hasOwn(conditions, "types")) return targets(conditions["types"]);
7321
7505
  return Object.values(conditions).flatMap(targets);
@@ -7327,7 +7511,7 @@ async function entryPaths(root, workspace, subpath, config, tsconfig = "tsconfig
7327
7511
  const relative = (filename) => workspace === "." ? filename : `${workspace}/${filename}`;
7328
7512
  const packageJson = await safeFile(root, relative("package.json"));
7329
7513
  const manifest = JSON.parse(await readFile(packageJson, "utf8"));
7330
- const exports = record$2(manifest["exports"]);
7514
+ const exports = record$3(manifest["exports"]);
7331
7515
  const exported = exports && Object.keys(exports).some((key) => key.startsWith(".")) ? exports[subpath] : subpath === "." ? manifest["exports"] : void 0;
7332
7516
  const declarations = targets(exported).map((item) => item.replace(/^\.\//u, "").replace(/(?<!\.d)\.(cjs|mjs|js)$/u, (_, ext) => ext === "js" ? ".d.ts" : ext === "mjs" ? ".d.mts" : ".d.cts"));
7333
7517
  const types = manifest["types"] ?? manifest["typings"];
@@ -7347,14 +7531,14 @@ async function entryPaths(root, workspace, subpath, config, tsconfig = "tsconfig
7347
7531
  //#endregion
7348
7532
  //#region src/commands/api-report/settings.ts
7349
7533
  function configValue(input) {
7350
- const config = record$2(input);
7534
+ const config = record$3(input);
7351
7535
  if (!config) throw new Error("tooling.apiReports must map exact workspace selectors to entry configurations.");
7352
7536
  for (const value of Object.values(config)) {
7353
- const item = record$2(value);
7354
- const entries = record$2(item?.["entries"]);
7537
+ const item = record$3(value);
7538
+ const entries = record$3(item?.["entries"]);
7355
7539
  if (!item || Object.keys(item).some((key) => !["entries", "tsconfig"].includes(key)) || !entries || !Object.keys(entries).length || item["tsconfig"] !== void 0 && typeof item["tsconfig"] !== "string") throw new Error("Each apiReports package requires a nonempty entries map and optional tsconfig path.");
7356
7540
  for (const [subpath, entry] of Object.entries(entries)) {
7357
- const data = record$2(entry);
7541
+ const data = record$3(entry);
7358
7542
  if (subpath !== "." && !/^\.\/[\w./-]+$/iu.test(subpath) || subpath.includes("..") || !data || Object.keys(data).some((key) => !["entryPoint", "baseline"].includes(key)) || typeof data["entryPoint"] !== "string" || typeof data["baseline"] !== "string") throw new Error("API entries require a literal public subpath, entryPoint and baseline strings.");
7359
7543
  }
7360
7544
  }
@@ -7454,11 +7638,11 @@ async function extractPublicApi(root, tool, packageJson, entryPoint, tsconfig, o
7454
7638
  }
7455
7639
  let result;
7456
7640
  try {
7457
- result = record$2(JSON.parse(stdout));
7641
+ result = record$3(JSON.parse(stdout));
7458
7642
  } catch {
7459
7643
  throw new Error("API Extractor returned invalid analysis output.");
7460
7644
  }
7461
- if (!result || typeof result["succeeded"] !== "boolean" || !Array.isArray(result["diagnostics"]) || result["report"] !== null && typeof result["report"] !== "string" || result["succeeded"] && (!Array.isArray(result["inputs"]) || result["inputs"].some((item) => !record$2(item) || typeof item.path !== "string" || !path.isAbsolute(item.path) || typeof item.hash !== "string" || !/^[a-f\d]{64}$/u.test(item.hash))) || result["succeeded"] && (processFailed || typeof result["inputHash"] !== "string" || !/^[a-f\d]{64}$/u.test(result["inputHash"]) || typeof result["report"] !== "string" || !result["report"].startsWith("## API Report File for ")) || result["diagnostics"].some((item) => !record$2(item) || typeof item.code !== "string" || typeof item.message !== "string" || !["warning", "error"].includes(item.severity))) throw new Error("API Extractor returned an incomplete analysis result.");
7645
+ if (!result || typeof result["succeeded"] !== "boolean" || !Array.isArray(result["diagnostics"]) || result["report"] !== null && typeof result["report"] !== "string" || result["succeeded"] && (!Array.isArray(result["inputs"]) || result["inputs"].some((item) => !record$3(item) || typeof item.path !== "string" || !path.isAbsolute(item.path) || typeof item.hash !== "string" || !/^[a-f\d]{64}$/u.test(item.hash))) || result["succeeded"] && (processFailed || typeof result["inputHash"] !== "string" || !/^[a-f\d]{64}$/u.test(result["inputHash"]) || typeof result["report"] !== "string" || !result["report"].startsWith("## API Report File for ")) || result["diagnostics"].some((item) => !record$3(item) || typeof item.code !== "string" || typeof item.message !== "string" || !["warning", "error"].includes(item.severity))) throw new Error("API Extractor returned an incomplete analysis result.");
7462
7646
  return {
7463
7647
  inputs: result["inputs"] ?? [],
7464
7648
  inputHash: typeof result["inputHash"] === "string" ? result["inputHash"] : null,
@@ -7705,18 +7889,18 @@ async function readPeerLockfile(root) {
7705
7889
  try {
7706
7890
  const documents = parseAllDocuments(await readFile(path$1.join(root, "pnpm-lock.yaml"), "utf8"));
7707
7891
  if (documents.some((doc) => doc.errors.length)) return { state: "unsupported" };
7708
- const candidates = documents.map((doc) => record$2(doc.toJSON())).filter((doc) => {
7709
- const importers = record$2(doc?.["importers"]);
7892
+ const candidates = documents.map((doc) => record$3(doc.toJSON())).filter((doc) => {
7893
+ const importers = record$3(doc?.["importers"]);
7710
7894
  return importers && Object.values(importers).some((value) => [
7711
7895
  "dependencies",
7712
7896
  "devDependencies",
7713
7897
  "optionalDependencies"
7714
- ].some((section) => record$2(value)?.[section] !== void 0));
7898
+ ].some((section) => record$3(value)?.[section] !== void 0));
7715
7899
  });
7716
7900
  if (candidates.length !== 1 || Number(candidates[0]["lockfileVersion"]) !== 9) return { state: "unsupported" };
7717
7901
  return {
7718
7902
  state: "supported",
7719
- importers: record$2(candidates[0]["importers"])
7903
+ importers: record$3(candidates[0]["importers"])
7720
7904
  };
7721
7905
  } catch (error) {
7722
7906
  if (error.code === "ENOENT") return { state: "absent" };
@@ -7725,7 +7909,7 @@ async function readPeerLockfile(root) {
7725
7909
  }
7726
7910
  function lockedPeerVersion(lock, directory, name, specifiers, source, range) {
7727
7911
  if (lock.state !== "supported") return { state: lock.state };
7728
- const entry = record$2(record$2(record$2(lock.importers[directory])?.["devDependencies"])?.[name]);
7912
+ const entry = record$3(record$3(record$3(lock.importers[directory])?.["devDependencies"])?.[name]);
7729
7913
  if (!entry || typeof entry["specifier"] !== "string" || !specifiers.includes(entry["specifier"]) || typeof entry["version"] !== "string") return { state: "stale" };
7730
7914
  let version = entry["version"].split("(")[0];
7731
7915
  if (version.startsWith(`${source}@`)) version = version.slice(source.length + 1);
@@ -7782,10 +7966,10 @@ function resolvePeerSpecifier(name, input, directory, packages, workspace) {
7782
7966
  let effective = input;
7783
7967
  if (input.startsWith("catalog:")) {
7784
7968
  const catalog = input.slice(8);
7785
- const named = record$2(workspace["catalogs"]);
7969
+ const named = record$3(workspace["catalogs"]);
7786
7970
  const isDefault = !catalog || catalog === "default";
7787
7971
  const duplicateDefault = workspace["catalog"] != null && named?.["default"] != null;
7788
- const value = (isDefault ? duplicateDefault ? void 0 : record$2(workspace["catalog"] ?? named?.["default"]) : record$2(named?.[catalog]))?.[name];
7972
+ const value = (isDefault ? duplicateDefault ? void 0 : record$3(workspace["catalog"] ?? named?.["default"]) : record$3(named?.[catalog]))?.[name];
7789
7973
  if (typeof value === "string" && !value.startsWith("catalog:")) effective = value;
7790
7974
  else return {
7791
7975
  source: null,
@@ -7834,7 +8018,7 @@ async function checkPeerDependencies(cwd) {
7834
8018
  ignorePrivatePackage: false,
7835
8019
  ignoreRootPackage: false
7836
8020
  });
7837
- const workspace = record$2(parse$1(await readFile(path$1.join(workspaceDir, "pnpm-workspace.yaml"), "utf8"))) ?? {};
8021
+ const workspace = record$3(parse$1(await readFile(path$1.join(workspaceDir, "pnpm-workspace.yaml"), "utf8"))) ?? {};
7838
8022
  const lockfile = await readPeerLockfile(workspaceDir);
7839
8023
  const targets = packages.map((pkg) => ({
7840
8024
  name: pkg.manifest.name ?? null,
@@ -7859,11 +8043,11 @@ async function checkPeerDependencies(cwd) {
7859
8043
  }
7860
8044
  };
7861
8045
  for (const pkg of packages.toSorted((a, b) => a.rootDir.localeCompare(b.rootDir))) {
7862
- const manifest = record$2(pkg.manifest);
7863
- const peers = record$2(manifest["peerDependencies"]);
7864
- const dev = record$2(manifest["devDependencies"]);
8046
+ const manifest = record$3(pkg.manifest);
8047
+ const peers = record$3(manifest["peerDependencies"]);
8048
+ const dev = record$3(manifest["devDependencies"]);
7865
8049
  if (manifest["peerDependencies"] !== void 0 && !peers || manifest["devDependencies"] !== void 0 && !dev) throw new Error(`Invalid peer/development dependency map: ${pkg.rootDir}`);
7866
- const metadata = record$2(manifest["peerDependenciesMeta"]);
8050
+ const metadata = record$3(manifest["peerDependenciesMeta"]);
7867
8051
  for (const [name, value] of Object.entries(peers ?? {}).sort(([a], [b]) => a.localeCompare(b))) {
7868
8052
  const testValue = dev?.[name];
7869
8053
  if (typeof value !== "string" || testValue !== void 0 && typeof testValue !== "string") throw new Error(`Invalid peer/development specifier: ${pkg.rootDir} ${name}`);
@@ -7873,7 +8057,7 @@ async function checkPeerDependencies(cwd) {
7873
8057
  packageName: pkg.manifest.name ?? null,
7874
8058
  path: path$1.relative(workspaceDir, pkg.rootDir).replaceAll("\\", "/") || ".",
7875
8059
  peer: name,
7876
- optional: record$2(metadata?.[name])?.["optional"] === true,
8060
+ optional: record$3(metadata?.[name])?.["optional"] === true,
7877
8061
  peerSpecifier: value,
7878
8062
  testSpecifier: typeof testValue === "string" ? testValue : null,
7879
8063
  peerRange: peer.range,
@@ -7904,7 +8088,7 @@ const presetValues = {
7904
8088
  };
7905
8089
  function renderAdditions(content, additions) {
7906
8090
  const document = YAML.parseDocument(content);
7907
- if (document.errors.length || !record$2(document.toJS())) throw new Error("Cannot plan changes to invalid pnpm-workspace.yaml.");
8091
+ if (document.errors.length || !record$3(document.toJS())) throw new Error("Cannot plan changes to invalid pnpm-workspace.yaml.");
7908
8092
  for (const [key, value] of Object.entries(additions)) {
7909
8093
  if (document.has(key)) throw new Error(`Preset refuses to overwrite an existing ${key}.`);
7910
8094
  document.set(key, structuredClone(value));
@@ -7948,7 +8132,7 @@ async function planInstallSecurityPreset(cwd, options = {}) {
7948
8132
  };
7949
8133
  }
7950
8134
  async function applyInstallSecurityPreset(cwd, plan) {
7951
- if (!plan || plan.schemaVersion !== 1 || plan.kind !== "install-security-preset" || plan.preset !== "balanced" || typeof plan.workspaceDir !== "string" || typeof plan.pnpmVersion !== "string" || !/^[a-f\d]{64}$/u.test(plan.policyHash) || !/^[a-f\d]{64}$/u.test(plan.beforeHash) || !/^[a-f\d]{64}$/u.test(plan.afterHash) || !record$2(plan.additions) || Object.entries(plan.additions).some(([key, value]) => !Object.hasOwn(presetValues, key) || !isDeepStrictEqual(value, presetValues[key]))) throw new Error("Invalid installation security preset plan.");
8135
+ if (!plan || plan.schemaVersion !== 1 || plan.kind !== "install-security-preset" || plan.preset !== "balanced" || typeof plan.workspaceDir !== "string" || typeof plan.pnpmVersion !== "string" || !/^[a-f\d]{64}$/u.test(plan.policyHash) || !/^[a-f\d]{64}$/u.test(plan.beforeHash) || !/^[a-f\d]{64}$/u.test(plan.afterHash) || !record$3(plan.additions) || Object.entries(plan.additions).some(([key, value]) => !Object.hasOwn(presetValues, key) || !isDeepStrictEqual(value, presetValues[key]))) throw new Error("Invalid installation security preset plan.");
7952
8136
  const current = await planInstallSecurityPreset(cwd);
7953
8137
  if (current.workspaceDir !== plan.workspaceDir || current.pnpmVersion !== plan.pnpmVersion) throw new Error("Security preset belongs to a different workspace or pnpm version.");
7954
8138
  const original = await readInput(current.workspaceDir, "pnpm-workspace.yaml");
@@ -9505,8 +9689,8 @@ async function readOwnership(root, inputs) {
9505
9689
  }
9506
9690
  const original = await readText(root, ownershipFile, inputs);
9507
9691
  const state = JSON.parse(original.replace(/^\uFEFF/, ""));
9508
- if (record$2(state) && Object.hasOwn(state, "transaction")) throw new Error("Pending TypeScript references transaction. Verify no writer is active, preserve backups and reconcile the registry before retrying.");
9509
- if (!record$2(state) || state.schemaVersion !== 1 || Object.keys(state).some((key) => !["schemaVersion", "configs"].includes(key)) || !record$2(state.configs)) throw new Error("Invalid TypeScript reference ownership registry.");
9692
+ if (record$3(state) && Object.hasOwn(state, "transaction")) throw new Error("Pending TypeScript references transaction. Verify no writer is active, preserve backups and reconcile the registry before retrying.");
9693
+ if (!record$3(state) || state.schemaVersion !== 1 || Object.keys(state).some((key) => !["schemaVersion", "configs"].includes(key)) || !record$3(state.configs)) throw new Error("Invalid TypeScript reference ownership registry.");
9510
9694
  for (const [file, references] of Object.entries(state.configs)) {
9511
9695
  relativeFile(file);
9512
9696
  if (!Array.isArray(references) || references.length !== new Set(references).size || references.some((ref) => typeof ref !== "string" || referencePath(file, referenceTarget(file, ref)) !== ref)) throw new Error(`Invalid managed project references: ${file}`);
@@ -9568,7 +9752,7 @@ function renderReferences(ts, config, references) {
9568
9752
  //#region src/commands/project-references/settings.ts
9569
9753
  function parseSettings(value) {
9570
9754
  if (value === void 0) return {};
9571
- const config = record$2(value);
9755
+ const config = record$3(value);
9572
9756
  if (!config || Object.keys(config).some((key) => ![
9573
9757
  "enabled",
9574
9758
  "root",
@@ -9582,7 +9766,7 @@ function parseSettings(value) {
9582
9766
  if (config["relations"] !== void 0) {
9583
9767
  if (!Array.isArray(config["relations"])) throw new TypeError("projectReferences.relations must be an array.");
9584
9768
  for (const value of config["relations"]) {
9585
- const edge = record$2(value);
9769
+ const edge = record$3(value);
9586
9770
  if (!edge || Object.keys(edge).some((key) => !["source", "target"].includes(key))) throw new Error("Invalid projectReferences relation.");
9587
9771
  relativeFile(edge["source"]);
9588
9772
  relativeFile(edge["target"]);
@@ -9592,7 +9776,7 @@ function parseSettings(value) {
9592
9776
  }
9593
9777
  function validateLayers(layers) {
9594
9778
  for (const layer of layers) {
9595
- const tooling = record$2(record$2(layer)?.["tooling"]);
9779
+ const tooling = record$3(record$3(layer)?.["tooling"]);
9596
9780
  if (tooling && Object.hasOwn(tooling, "projectReferences")) parseSettings(tooling["projectReferences"]);
9597
9781
  }
9598
9782
  }
@@ -9719,7 +9903,7 @@ async function planProjectReferences(cwd) {
9719
9903
  await validateGraph([.../* @__PURE__ */ new Set([plan.root, ...projected.keys()])].sort(compare$1), projected, read, plan.diagnostics);
9720
9904
  for (const project of plan.projects) {
9721
9905
  const pkg = packages.filter((pkg) => project.startsWith(`${pkg.relative}/`)).at(-1);
9722
- const script = record$2(record$2(pkg.manifest)?.["scripts"])?.["typecheck"];
9906
+ const script = record$3(record$3(pkg.manifest)?.["scripts"])?.["typecheck"];
9723
9907
  plan.validation.push({
9724
9908
  config: project,
9725
9909
  cwd: pkg.relative,
@@ -12793,14 +12977,14 @@ function moveManifestChanges(contents, graph, target, to, name, gitRoot = graph.
12793
12977
  manifest.name = name;
12794
12978
  fields.push("name");
12795
12979
  }
12796
- const repository = record$2(manifest.repository);
12980
+ const repository = record$3(manifest.repository);
12797
12981
  if (to !== target.id && repository && typeof repository["directory"] === "string" && path.resolve(gitRoot, repository["directory"]) === path.join(graph.workspaceDir, target.id)) {
12798
12982
  repository["directory"] = path.relative(gitRoot, path.join(graph.workspaceDir, to));
12799
12983
  fields.push("repository.directory");
12800
12984
  }
12801
12985
  }
12802
12986
  for (const section of workspaceDependencyTypes) {
12803
- const dependencies = record$2(manifest[section]);
12987
+ const dependencies = record$3(manifest[section]);
12804
12988
  for (const [dependency, specifier] of Object.entries(dependencies ?? {})) {
12805
12989
  if (typeof specifier !== "string") continue;
12806
12990
  const next = dependencyValue(graph.workspaceDir, node.id, specifier, target, to, name);
@@ -12816,7 +13000,7 @@ function moveManifestChanges(contents, graph, target, to, name, gitRoot = graph.
12816
13000
  }
12817
13001
  }
12818
13002
  for (const section of ["dependenciesMeta", "peerDependenciesMeta"]) {
12819
- const metadata = record$2(manifest[section]);
13003
+ const metadata = record$3(manifest[section]);
12820
13004
  for (const dependency of renamedDependencies) if (metadata && Object.hasOwn(metadata, dependency)) {
12821
13005
  renameKey(metadata, dependency, name);
12822
13006
  fields.push(`${section}.${dependency} → ${name}`);
@@ -12830,7 +13014,7 @@ function moveWorkspaceManifest(before, from, to) {
12830
13014
  if (from === to) return;
12831
13015
  const document = YAML.parseDocument(before);
12832
13016
  const original = document.toJS();
12833
- if (document.errors.length || !record$2(original) || !Array.isArray(original.packages) || original.packages.some((item) => typeof item !== "string")) throw new Error("Moving requires a valid packages array in pnpm-workspace.yaml.");
13017
+ if (document.errors.length || !record$3(original) || !Array.isArray(original.packages) || original.packages.some((item) => typeof item !== "string")) throw new Error("Moving requires a valid packages array in pnpm-workspace.yaml.");
12834
13018
  const packages = original.packages;
12835
13019
  if (packages.some((item) => item.startsWith("!") && matchesGlob(to, item.slice(1)))) throw new Error("The destination is excluded by pnpm-workspace.yaml; review its package patterns first.");
12836
13020
  const updated = packages.map((item) => item === from || item === `./${from}` ? to : item);
@@ -12849,7 +13033,7 @@ function moveTypeScriptConfig(root, file, before, target, to, name) {
12849
13033
  const fields = [];
12850
13034
  let config;
12851
13035
  try {
12852
- config = record$2(parse$2(before));
13036
+ config = record$3(parse$2(before));
12853
13037
  } catch {
12854
13038
  tasks.push({
12855
13039
  path: file,
@@ -12892,9 +13076,9 @@ function moveTypeScriptConfig(root, file, before, target, to, name) {
12892
13076
  update(config, key, "");
12893
13077
  }
12894
13078
  if (Array.isArray(config["references"])) {
12895
- for (const [index, reference] of config["references"].entries()) if (record$2(reference)) update(reference, "path", `references.${index}.`);
13079
+ for (const [index, reference] of config["references"].entries()) if (record$3(reference)) update(reference, "path", `references.${index}.`);
12896
13080
  }
12897
- const options = record$2(config["compilerOptions"]);
13081
+ const options = record$3(config["compilerOptions"]);
12898
13082
  if (options) {
12899
13083
  const base = path.relative(root, path.resolve(root, directory, typeof options["baseUrl"] === "string" ? options["baseUrl"] : "."));
12900
13084
  const nextBase = movedPath(base, target.id, to);
@@ -12906,7 +13090,7 @@ function moveTypeScriptConfig(root, file, before, target, to, name) {
12906
13090
  "declarationDir",
12907
13091
  "typeRoots"
12908
13092
  ]) update(options, key, "compilerOptions.");
12909
- const aliases = record$2(options["paths"]);
13093
+ const aliases = record$3(options["paths"]);
12910
13094
  if (aliases && config["extends"] && typeof options["baseUrl"] !== "string") tasks.push({
12911
13095
  path: file,
12912
13096
  line: 1,
@@ -13071,7 +13255,7 @@ async function planWorkspaceMove(cwd, options) {
13071
13255
  code: "nested_repository",
13072
13256
  paths: inventory.repositories
13073
13257
  });
13074
- const diagnostics = await relevantDiagnostics(graph, target, record$2(YAML.parse(contents.get("pnpm-workspace.yaml"))) ?? {});
13258
+ const diagnostics = await relevantDiagnostics(graph, target, record$3(YAML.parse(contents.get("pnpm-workspace.yaml"))) ?? {});
13075
13259
  if (diagnostics.length) blockers.push({
13076
13260
  code: "graph_incomplete",
13077
13261
  paths: [...new Set(diagnostics.flatMap((item) => item.source ? [item.source] : item.candidates))].sort()
@@ -13141,7 +13325,7 @@ async function planWorkspaceMove(cwd, options) {
13141
13325
  //#endregion
13142
13326
  //#region src/commands/workspace/move/verify.ts
13143
13327
  function validateMovePlan(plan) {
13144
- if (!record$2(plan) || plan.schemaVersion !== 1 || plan.kind !== "workspace-move" || typeof plan.workspaceDir !== "string" || !record$2(plan.selection) || !record$2(plan.target) || !record$2(plan.destination) || typeof plan.target.id !== "string" || typeof plan.destination.id !== "string" || plan.selection.target !== `./${plan.target.id}` || plan.selection.to !== plan.destination.id || plan.selection.name !== plan.destination.name || typeof plan.canApply !== "boolean" || !Array.isArray(plan.blockers) || !Array.isArray(plan.inputs) || !Array.isArray(plan.files) || !Array.isArray(plan.inventory) || !Array.isArray(plan.workspaces) || plan.inputs.some((item) => !record$2(item) || typeof item.path !== "string" || !/^[a-f\d]{64}$/u.test(item.hash)) || plan.files.some((item) => !record$2(item) || typeof item.path !== "string" || typeof item.before !== "string" || typeof item.after !== "string" || item.beforeHash !== hash$1(item.before) || item.afterHash !== hash$1(item.after) || !plan.inputs.some((input) => input.path === item.path && input.hash === item.beforeHash)) || new Set(plan.inputs.map((item) => item.path)).size !== plan.inputs.length || new Set(plan.files.map((item) => item.path)).size !== plan.files.length || !record$2(plan.templateInstances) || plan.templateInstances.from !== plan.target.id || plan.templateInstances.to !== plan.destination.id || !/^[a-f\d]{64}$/u.test(plan.templateInstances.beforeHash) || !/^[a-f\d]{64}$/u.test(plan.templateInstances.afterHash) || !Array.isArray(plan.templateInstances.relocations) || plan.templateInstances.relocations.some((item) => !record$2(item) || !/^[a-f\d]{24}$/u.test(item.id) || typeof item.from !== "string" || item.to !== movedPath(item.from, plan.target.id, plan.destination.id))) throw new Error("Invalid workspace move plan.");
13328
+ if (!record$3(plan) || plan.schemaVersion !== 1 || plan.kind !== "workspace-move" || typeof plan.workspaceDir !== "string" || !record$3(plan.selection) || !record$3(plan.target) || !record$3(plan.destination) || typeof plan.target.id !== "string" || typeof plan.destination.id !== "string" || plan.selection.target !== `./${plan.target.id}` || plan.selection.to !== plan.destination.id || plan.selection.name !== plan.destination.name || typeof plan.canApply !== "boolean" || !Array.isArray(plan.blockers) || !Array.isArray(plan.inputs) || !Array.isArray(plan.files) || !Array.isArray(plan.inventory) || !Array.isArray(plan.workspaces) || plan.inputs.some((item) => !record$3(item) || typeof item.path !== "string" || !/^[a-f\d]{64}$/u.test(item.hash)) || plan.files.some((item) => !record$3(item) || typeof item.path !== "string" || typeof item.before !== "string" || typeof item.after !== "string" || item.beforeHash !== hash$1(item.before) || item.afterHash !== hash$1(item.after) || !plan.inputs.some((input) => input.path === item.path && input.hash === item.beforeHash)) || new Set(plan.inputs.map((item) => item.path)).size !== plan.inputs.length || new Set(plan.files.map((item) => item.path)).size !== plan.files.length || !record$3(plan.templateInstances) || plan.templateInstances.from !== plan.target.id || plan.templateInstances.to !== plan.destination.id || !/^[a-f\d]{64}$/u.test(plan.templateInstances.beforeHash) || !/^[a-f\d]{64}$/u.test(plan.templateInstances.afterHash) || !Array.isArray(plan.templateInstances.relocations) || plan.templateInstances.relocations.some((item) => !record$3(item) || !/^[a-f\d]{24}$/u.test(item.id) || typeof item.from !== "string" || item.to !== movedPath(item.from, plan.target.id, plan.destination.id))) throw new Error("Invalid workspace move plan.");
13145
13329
  }
13146
13330
  async function verifyMovePostState(plan, recoveryPaths = [], requireHead = true) {
13147
13331
  const root = plan.workspaceDir;
@@ -13330,16 +13514,16 @@ function removalManifestChanges(contents, references) {
13330
13514
  const manifest = JSON.parse(before);
13331
13515
  const fields = [];
13332
13516
  for (const edge of edges) {
13333
- const dependencies = record$2(manifest[edge.type]);
13517
+ const dependencies = record$3(manifest[edge.type]);
13334
13518
  if (!dependencies || dependencies[edge.dependency] !== edge.specifier) throw new Error(`Manifest changed while computing removal references: ${file}`);
13335
13519
  delete dependencies[edge.dependency];
13336
13520
  fields.push(`${edge.type}.${edge.dependency}`);
13337
- if (edge.type === "peerDependencies" && Object.hasOwn(record$2(manifest.peerDependenciesMeta) ?? {}, edge.dependency)) {
13521
+ if (edge.type === "peerDependencies" && Object.hasOwn(record$3(manifest.peerDependenciesMeta) ?? {}, edge.dependency)) {
13338
13522
  delete manifest.peerDependenciesMeta[edge.dependency];
13339
13523
  fields.push(`peerDependenciesMeta.${edge.dependency}`);
13340
13524
  }
13341
13525
  }
13342
- for (const name of new Set(edges.map((edge) => edge.dependency))) if (workspaceDependencyTypes.every((section) => !Object.hasOwn(record$2(manifest[section]) ?? {}, name)) && Object.hasOwn(record$2(manifest.dependenciesMeta) ?? {}, name)) {
13526
+ for (const name of new Set(edges.map((edge) => edge.dependency))) if (workspaceDependencyTypes.every((section) => !Object.hasOwn(record$3(manifest[section]) ?? {}, name)) && Object.hasOwn(record$3(manifest.dependenciesMeta) ?? {}, name)) {
13343
13527
  delete manifest.dependenciesMeta[name];
13344
13528
  fields.push(`dependenciesMeta.${name}`);
13345
13529
  }
@@ -13465,7 +13649,7 @@ async function planWorkspaceRemoval(cwd, options) {
13465
13649
  code: "consumers",
13466
13650
  paths: consumers.map((item) => item.id)
13467
13651
  });
13468
- const diagnostics = await relevantDiagnostics(graph, target, record$2(YAML.parse(contents.get("pnpm-workspace.yaml"))) ?? {});
13652
+ const diagnostics = await relevantDiagnostics(graph, target, record$3(YAML.parse(contents.get("pnpm-workspace.yaml"))) ?? {});
13469
13653
  if (diagnostics.length) blockers.push({
13470
13654
  code: "graph_incomplete",
13471
13655
  paths: [...new Set(diagnostics.flatMap((item) => item.source ? [item.source] : item.candidates))].sort()
@@ -13592,7 +13776,7 @@ async function cleanupRemovalRecovery(root, recovery, inventory) {
13592
13776
  //#endregion
13593
13777
  //#region src/commands/workspace/remove/verify.ts
13594
13778
  function validateRemovalPlan(plan) {
13595
- if (!record$2(plan) || plan.schemaVersion !== 1 || plan.kind !== "workspace-removal" || typeof plan.workspaceDir !== "string" || !record$2(plan.selection) || !record$2(plan.target) || typeof plan.target.id !== "string" || typeof plan.selection.target !== "string" || typeof plan.selection.removeReferences !== "boolean" || typeof plan.canApply !== "boolean" || !Array.isArray(plan.inputs) || !Array.isArray(plan.files) || !Array.isArray(plan.inventory) || !Array.isArray(plan.workspaces) || !Array.isArray(plan.blockers) || !record$2(plan.review) || !Array.isArray(plan.nextSteps) || plan.nextSteps.some((step) => typeof step !== "string") || plan.inputs.some((item) => !record$2(item) || typeof item.path !== "string" || typeof item.hash !== "string") || plan.files.some((item) => !record$2(item) || typeof item.path !== "string" || typeof item.before !== "string" || typeof item.after !== "string" || item.beforeHash !== hash$1(item.before) || item.afterHash !== hash$1(item.after) || !plan.inputs.some((input) => input.path === item.path && input.hash === item.beforeHash)) || plan.workspaces.some((item) => typeof item !== "string") || !plan.workspaces.includes(plan.target.id) || plan.selection.target !== `./${plan.target.id}` || plan.review.scope !== "git-tracked-text-literal-matches" || !Array.isArray(plan.review.scanned) || !Array.isArray(plan.review.matches) || !Array.isArray(plan.review.skipped) || new Set(plan.inputs.map((item) => item.path)).size !== plan.inputs.length || new Set(plan.files.map((item) => item.path)).size !== plan.files.length) throw new Error("Invalid workspace removal plan.");
13779
+ if (!record$3(plan) || plan.schemaVersion !== 1 || plan.kind !== "workspace-removal" || typeof plan.workspaceDir !== "string" || !record$3(plan.selection) || !record$3(plan.target) || typeof plan.target.id !== "string" || typeof plan.selection.target !== "string" || typeof plan.selection.removeReferences !== "boolean" || typeof plan.canApply !== "boolean" || !Array.isArray(plan.inputs) || !Array.isArray(plan.files) || !Array.isArray(plan.inventory) || !Array.isArray(plan.workspaces) || !Array.isArray(plan.blockers) || !record$3(plan.review) || !Array.isArray(plan.nextSteps) || plan.nextSteps.some((step) => typeof step !== "string") || plan.inputs.some((item) => !record$3(item) || typeof item.path !== "string" || typeof item.hash !== "string") || plan.files.some((item) => !record$3(item) || typeof item.path !== "string" || typeof item.before !== "string" || typeof item.after !== "string" || item.beforeHash !== hash$1(item.before) || item.afterHash !== hash$1(item.after) || !plan.inputs.some((input) => input.path === item.path && input.hash === item.beforeHash)) || plan.workspaces.some((item) => typeof item !== "string") || !plan.workspaces.includes(plan.target.id) || plan.selection.target !== `./${plan.target.id}` || plan.review.scope !== "git-tracked-text-literal-matches" || !Array.isArray(plan.review.scanned) || !Array.isArray(plan.review.matches) || !Array.isArray(plan.review.skipped) || new Set(plan.inputs.map((item) => item.path)).size !== plan.inputs.length || new Set(plan.files.map((item) => item.path)).size !== plan.files.length) throw new Error("Invalid workspace removal plan.");
13596
13780
  }
13597
13781
  async function verifyRemovalPostState(plan, requireHead = true) {
13598
13782
  const root = plan.workspaceDir;
@@ -13709,6 +13893,7 @@ var commands_exports = /* @__PURE__ */ __exportAll({
13709
13893
  applyWorkspaceArtifactPlan: () => applyWorkspaceArtifactPlan,
13710
13894
  applyWorkspaceMovePlan: () => applyWorkspaceMovePlan,
13711
13895
  applyWorkspaceRemovalPlan: () => applyWorkspaceRemovalPlan,
13896
+ auditReleaseOidc: () => auditReleaseOidc,
13712
13897
  checkCatalogs: () => checkCatalogs,
13713
13898
  checkDependencies: () => checkDependencies,
13714
13899
  checkDependencyAdmission: () => checkDependencyAdmission,
@@ -13817,4 +14002,4 @@ var commands_exports = /* @__PURE__ */ __exportAll({
13817
14002
  verifyStagedTypecheck: () => verifyStagedTypecheck
13818
14003
  });
13819
14004
  //#endregion
13820
- export { GitHubApiError as $, resolveAffectedCheckMatrix as A, updateIssueTemplateConfig as At, syncSkills as B, generateAgenticTemplates as Bt, applyOrganizationPresetAssets as C, getCreateChoices as Ct, applyInstallSecurityPreset as D, createTemplateCatalog as Dt, planDevContainer as E, resolveRemoteTemplateSource as Et, upgradeMonorepo as F, cleanProjects as Ft, prepareStable as G, createReleasePullRequest as H, formatUpgradePlan as I, verifyPrePush as It, reconcileRelease as J, publishStable as K, checkTemplates as L, createTimestampFolderName as Lt, applyPublicApiUpdate as M, explainMonorepoConfig as Mt, planPublicApiUpdate as N, sanitizeConfigReport as Nt, planInstallSecurityPreset as O, resolveTemplateCatalog as Ot, formatPublicApiReport as P, validateConfigFile as Pt, GitHubClient as Q, getSkillTargetPaths as R, defaultAgenticBaseDir as Rt, detectMaintenanceVersionChange as S, resolveCreateNewProjectPlan as St, applyDevContainerPlan as T, templateMap as Tt, recoverUnpublished as U, repairReleaseNotes as V, loadAgenticTasks as Vt, releaseCi as W, exitPrerelease as X, enterPrerelease as Y, releasePrerelease as Z, applyProjectReferencesPlan as _, resolveReleaseBranches as _t, planWorkspaceMove as a, initTooling as at, getMaintenanceWorkflow as b, createNewProject as bt, applyToolingCapability as c, createContext as ct, planTemplateValidation as d, collectEnvSnapshot as dt, parsePublishSummary as et, releaseSnapshot as f, collectEnvSupportBundle as ft, syncProjectReferences as g, planUpgrade as gt, checkProjectReferences as h, planDoctorFix as ht, applyWorkspaceMovePlan as i, initMetadata as it, checkPublicApi as j, inspectMonorepoConfig as jt, checkPeerDependencies as k, loadTemplateCatalogContext as kt, planToolingCapability as l, collectEnvInfo as lt, createReleasePlan as m, applyDoctorFixPlan as mt, applyWorkspaceRemovalPlan as n, setVscodeBinaryMirror as nt, applyWorkspaceArtifactPlan as o, normalizeInitToolingTargets as ot, createSnapshotPlan as p, runDoctor as pt, releaseStable as q, planWorkspaceRemoval as r, init as rt, planWorkspaceArtifact as s, initToolingTargets as st, commands_exports as t, renderReleasePullRequest as tt, validateTemplate as u, collectEnvPaths as ut, planProjectReferences as v, applyUpgradePlan as vt, planOrganizationPresetAssets as w, getTemplateMap as wt, prepareMaintenanceUpgrade as x, defaultTemplate as xt, checkPackages as y, applyCreateNewProjectPlan as yt, skillTargets as z, generateAgenticTemplate as zt };
14005
+ export { GitHubClient as $, resolveAffectedCheckMatrix as A, resolveTemplateCatalog as At, syncSkills as B, defaultAgenticBaseDir as Bt, applyOrganizationPresetAssets as C, defaultTemplate as Ct, applyInstallSecurityPreset as D, templateMap as Dt, planDevContainer as E, getTemplateMap as Et, upgradeMonorepo as F, sanitizeConfigReport as Ft, prepareStable as G, createReleasePullRequest as H, generateAgenticTemplates as Ht, formatUpgradePlan as I, validateConfigFile as It, reconcileRelease as J, publishStable as K, checkTemplates as L, cleanProjects as Lt, applyPublicApiUpdate as M, updateIssueTemplateConfig as Mt, planPublicApiUpdate as N, inspectMonorepoConfig as Nt, planInstallSecurityPreset as O, resolveRemoteTemplateSource as Ot, formatPublicApiReport as P, explainMonorepoConfig as Pt, auditReleaseOidc as Q, getSkillTargetPaths as R, verifyPrePush as Rt, detectMaintenanceVersionChange as S, createNewProject as St, applyDevContainerPlan as T, getCreateChoices as Tt, recoverUnpublished as U, loadAgenticTasks as Ut, repairReleaseNotes as V, generateAgenticTemplate as Vt, releaseCi as W, exitPrerelease as X, enterPrerelease as Y, releasePrerelease as Z, applyProjectReferencesPlan as _, planDoctorFix as _t, planWorkspaceMove as a, init as at, getMaintenanceWorkflow as b, applyUpgradePlan as bt, applyToolingCapability as c, normalizeInitToolingTargets as ct, planTemplateValidation as d, collectEnvInfo as dt, GitHubApiError as et, releaseSnapshot as f, collectEnvPaths as ft, syncProjectReferences as g, applyDoctorFixPlan as gt, checkProjectReferences as h, runDoctor as ht, applyWorkspaceMovePlan as i, setVscodeBinaryMirror as it, checkPublicApi as j, loadTemplateCatalogContext as jt, checkPeerDependencies as k, createTemplateCatalog as kt, planToolingCapability as l, initToolingTargets as lt, createReleasePlan as m, collectEnvSupportBundle as mt, applyWorkspaceRemovalPlan as n, resolveReleaseMode as nt, applyWorkspaceArtifactPlan as o, initMetadata as ot, createSnapshotPlan as p, collectEnvSnapshot as pt, releaseStable as q, planWorkspaceRemoval as r, renderReleasePullRequest as rt, planWorkspaceArtifact as s, initTooling as st, commands_exports as t, parsePublishSummary as tt, validateTemplate as u, createContext as ut, planProjectReferences as v, planUpgrade as vt, planOrganizationPresetAssets as w, resolveCreateNewProjectPlan as wt, prepareMaintenanceUpgrade as x, applyCreateNewProjectPlan as xt, checkPackages as y, resolveReleaseBranches as yt, skillTargets as z, createTimestampFolderName as zt };