release-skill 0.9.18 → 0.9.20

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 (74) hide show
  1. package/.claude-plugin/plugin.json +1 -1
  2. package/.codebuddy-plugin/plugin.json +1 -1
  3. package/.codex-plugin/plugin.json +2 -2
  4. package/.cursor-plugin/plugin.json +1 -1
  5. package/.kimi-plugin/plugin.json +1 -1
  6. package/.qoder-plugin/plugin.json +1 -1
  7. package/CHANGELOG.md +67 -0
  8. package/INSTALL.md +12 -2
  9. package/INSTALL.zh-CN.md +10 -3
  10. package/README.md +39 -18
  11. package/README.zh-CN.md +30 -18
  12. package/adapters/claude/.claude-plugin/plugin.json +1 -1
  13. package/adapters/claude/bin/release-skill.bundle.mjs +934 -380
  14. package/adapters/claude/skills/release-assess/SKILL.md +41 -17
  15. package/adapters/claude/skills/release-finish/SKILL.md +30 -4
  16. package/adapters/claude/skills/release-help/SKILL.md +51 -97
  17. package/adapters/claude/skills/release-setup/SKILL.md +2 -1
  18. package/adapters/claude/skills/release-verify/SKILL.md +2 -2
  19. package/adapters/codex/.codex-plugin/plugin.json +2 -2
  20. package/adapters/codex/bin/release-skill.bundle.mjs +934 -380
  21. package/adapters/codex/skills/release-assess/SKILL.md +41 -17
  22. package/adapters/codex/skills/release-finish/SKILL.md +30 -4
  23. package/adapters/codex/skills/release-help/SKILL.md +53 -99
  24. package/adapters/codex/skills/release-setup/SKILL.md +2 -1
  25. package/adapters/codex/skills/release-verify/SKILL.md +2 -2
  26. package/adapters/cursor/.cursor-plugin/plugin.json +1 -1
  27. package/adapters/cursor/bin/release-skill.bundle.mjs +934 -380
  28. package/adapters/cursor/skills/release-assess/SKILL.md +41 -17
  29. package/adapters/cursor/skills/release-finish/SKILL.md +30 -4
  30. package/adapters/cursor/skills/release-help/SKILL.md +53 -99
  31. package/adapters/cursor/skills/release-setup/SKILL.md +2 -1
  32. package/adapters/cursor/skills/release-verify/SKILL.md +2 -2
  33. package/adapters/kimi/.kimi-plugin/plugin.json +1 -1
  34. package/adapters/kimi/bin/release-skill.bundle.mjs +934 -380
  35. package/adapters/kimi/skills/release-assess/SKILL.md +41 -17
  36. package/adapters/kimi/skills/release-finish/SKILL.md +30 -4
  37. package/adapters/kimi/skills/release-help/SKILL.md +53 -99
  38. package/adapters/kimi/skills/release-setup/SKILL.md +2 -1
  39. package/adapters/kimi/skills/release-verify/SKILL.md +2 -2
  40. package/adapters/qoder/.qoder-plugin/plugin.json +1 -1
  41. package/adapters/qoder/bin/release-skill.bundle.mjs +934 -380
  42. package/adapters/qoder/skills/release-assess/SKILL.md +41 -17
  43. package/adapters/qoder/skills/release-finish/SKILL.md +30 -4
  44. package/adapters/qoder/skills/release-help/SKILL.md +53 -99
  45. package/adapters/qoder/skills/release-setup/SKILL.md +2 -1
  46. package/adapters/qoder/skills/release-verify/SKILL.md +2 -2
  47. package/adapters/workbuddy/.codebuddy-plugin/plugin.json +1 -1
  48. package/adapters/workbuddy/bin/release-skill.bundle.mjs +934 -380
  49. package/adapters/workbuddy/skills/release-assess/SKILL.md +41 -17
  50. package/adapters/workbuddy/skills/release-finish/SKILL.md +30 -4
  51. package/adapters/workbuddy/skills/release-help/SKILL.md +51 -97
  52. package/adapters/workbuddy/skills/release-setup/SKILL.md +2 -1
  53. package/adapters/workbuddy/skills/release-verify/SKILL.md +2 -2
  54. package/bin/release-skill-cli.mjs +90 -14
  55. package/bin/release-skill.bundle.mjs +934 -380
  56. package/package.json +1 -1
  57. package/platform-manifest.json +4 -4
  58. package/references/02-project-config.md +4 -0
  59. package/skills/release-assess/SKILL.md +41 -17
  60. package/skills/release-finish/SKILL.md +30 -4
  61. package/skills/release-help/SKILL.md +51 -97
  62. package/skills/release-setup/SKILL.md +2 -1
  63. package/skills/release-verify/SKILL.md +2 -2
  64. package/skills-src/release-assess/SKILL.md +41 -17
  65. package/skills-src/release-finish/SKILL.md +30 -4
  66. package/skills-src/release-help/SKILL.md +51 -97
  67. package/skills-src/release-setup/SKILL.md +2 -1
  68. package/skills-src/release-verify/SKILL.md +2 -2
  69. package/src/commands/post-release-finish.mjs +448 -0
  70. package/src/commands/post-release-local.mjs +22 -2
  71. package/src/commands/setup.mjs +8 -1
  72. package/src/commands/ship.mjs +1 -0
  73. package/src/core/adoption-assessment.mjs +9 -5
  74. package/src/platforms/registry.mjs +6 -1
@@ -9,9 +9,9 @@ const __bundlePkgRoot = __bundleResolve(__bundleDirname(__bundleFileURLToPath(im
9
9
  // Provide a real require() for CJS packages bundled into ESM (e.g. yaml, ajv).
10
10
  const __bundleRealRequire = __bundleCreateRequire(import.meta.url);
11
11
  // Package identity injected at build time — closure-independent --version probe.
12
- const __bundlePkg = Object.freeze({"name":"release-skill","version":"0.9.18"});
12
+ const __bundlePkg = Object.freeze({"name":"release-skill","version":"0.9.20"});
13
13
  // Build-time source digest for the BUNDLE_STALE freshness gate (see above).
14
- const __bundleSourceDigest = "9bf830cde9028791cf42aa68d65a8c2e4f05f6a924c4bed6db3d5b33aa459062";
14
+ const __bundleSourceDigest = "826d7969c27d91224343a3853edb9e1611a07ba4dfe0ab65661f8e7b45bb8738";
15
15
 
16
16
  var __create = Object.create;
17
17
  var __defProp = Object.defineProperty;
@@ -2577,8 +2577,8 @@ var require_resolve = __commonJS({
2577
2577
  return count;
2578
2578
  }
2579
2579
  __name(countKeys, "countKeys");
2580
- function getFullPath(resolver, id = "", normalize6) {
2581
- if (normalize6 !== false)
2580
+ function getFullPath(resolver, id = "", normalize8) {
2581
+ if (normalize8 !== false)
2582
2582
  id = normalizeId(id);
2583
2583
  const p = resolver.parse(id);
2584
2584
  return _getFullPath(resolver, p);
@@ -3384,7 +3384,7 @@ var require_compile = __commonJS({
3384
3384
  const schOrFunc = root.refs[ref];
3385
3385
  if (schOrFunc)
3386
3386
  return schOrFunc;
3387
- let _sch = resolve43.call(this, root, ref);
3387
+ let _sch = resolve44.call(this, root, ref);
3388
3388
  if (_sch === void 0) {
3389
3389
  const schema2 = (_a = root.localRefs) === null || _a === void 0 ? void 0 : _a[ref];
3390
3390
  const { schemaId } = this.opts;
@@ -3415,13 +3415,13 @@ var require_compile = __commonJS({
3415
3415
  return s1.schema === s2.schema && s1.root === s2.root && s1.baseId === s2.baseId;
3416
3416
  }
3417
3417
  __name(sameSchemaEnv, "sameSchemaEnv");
3418
- function resolve43(root, ref) {
3418
+ function resolve44(root, ref) {
3419
3419
  let sch;
3420
3420
  while (typeof (sch = this.refs[ref]) == "string")
3421
3421
  ref = sch;
3422
3422
  return sch || this.schemas[ref] || resolveSchema.call(this, root, ref);
3423
3423
  }
3424
- __name(resolve43, "resolve");
3424
+ __name(resolve44, "resolve");
3425
3425
  function resolveSchema(root, ref) {
3426
3426
  const p = this.opts.uriResolver.parse(ref);
3427
3427
  const refPath = (0, resolve_1._getFullPath)(this.opts.uriResolver, p);
@@ -4265,7 +4265,7 @@ var require_fast_uri = __commonJS({
4265
4265
  return decodedScheme;
4266
4266
  }
4267
4267
  __name(decodeValidScheme, "decodeValidScheme");
4268
- function normalize6(uri, options) {
4268
+ function normalize8(uri, options) {
4269
4269
  if (typeof uri === "string") {
4270
4270
  uri = /** @type {T} */
4271
4271
  normalizeString(uri, options);
@@ -4275,8 +4275,8 @@ var require_fast_uri = __commonJS({
4275
4275
  }
4276
4276
  return uri;
4277
4277
  }
4278
- __name(normalize6, "normalize");
4279
- function resolve43(baseURI, relativeURI, options) {
4278
+ __name(normalize8, "normalize");
4279
+ function resolve44(baseURI, relativeURI, options) {
4280
4280
  const schemelessOptions = options ? Object.assign({ scheme: "null" }, options) : { scheme: "null" };
4281
4281
  const {
4282
4282
  parsed: baseParsed,
@@ -4309,7 +4309,7 @@ var require_fast_uri = __commonJS({
4309
4309
  schemelessOptions.skipEscape = true;
4310
4310
  return serialize(resolved, schemelessOptions);
4311
4311
  }
4312
- __name(resolve43, "resolve");
4312
+ __name(resolve44, "resolve");
4313
4313
  function resolveComponent(base, relative35, options, skipNormalization) {
4314
4314
  const target = {};
4315
4315
  if (!skipNormalization) {
@@ -4650,8 +4650,8 @@ var require_fast_uri = __commonJS({
4650
4650
  __name(normalizeComparableURI, "normalizeComparableURI");
4651
4651
  var fastUri = {
4652
4652
  SCHEMES,
4653
- normalize: normalize6,
4654
- resolve: resolve43,
4653
+ normalize: normalize8,
4654
+ resolve: resolve44,
4655
4655
  resolveComponent,
4656
4656
  equal,
4657
4657
  serialize,
@@ -16032,13 +16032,13 @@ var require_lib2 = __commonJS({
16032
16032
  }
16033
16033
  __name(cleanupOnExit, "cleanupOnExit");
16034
16034
  function serializeActiveFile(absoluteName) {
16035
- return new Promise((resolve43) => {
16035
+ return new Promise((resolve44) => {
16036
16036
  if (!activeFiles[absoluteName]) {
16037
16037
  activeFiles[absoluteName] = [];
16038
16038
  }
16039
- activeFiles[absoluteName].push(resolve43);
16039
+ activeFiles[absoluteName].push(resolve44);
16040
16040
  if (activeFiles[absoluteName].length === 1) {
16041
- resolve43();
16041
+ resolve44();
16042
16042
  }
16043
16043
  });
16044
16044
  }
@@ -17336,12 +17336,12 @@ var require_isexe = __commonJS({
17336
17336
  if (typeof Promise !== "function") {
17337
17337
  throw new TypeError("callback not provided");
17338
17338
  }
17339
- return new Promise(function(resolve43, reject) {
17339
+ return new Promise(function(resolve44, reject) {
17340
17340
  isexe(path40, options || {}, function(er, is) {
17341
17341
  if (er) {
17342
17342
  reject(er);
17343
17343
  } else {
17344
- resolve43(is);
17344
+ resolve44(is);
17345
17345
  }
17346
17346
  });
17347
17347
  });
@@ -17405,30 +17405,30 @@ var require_which = __commonJS({
17405
17405
  opt = {};
17406
17406
  const { pathEnv, pathExt, pathExtExe } = getPathInfo(cmd, opt);
17407
17407
  const found = [];
17408
- const step = /* @__PURE__ */ __name((i) => new Promise((resolve43, reject) => {
17408
+ const step2 = /* @__PURE__ */ __name((i) => new Promise((resolve44, reject) => {
17409
17409
  if (i === pathEnv.length)
17410
- return opt.all && found.length ? resolve43(found) : reject(getNotFoundError(cmd));
17410
+ return opt.all && found.length ? resolve44(found) : reject(getNotFoundError(cmd));
17411
17411
  const ppRaw = pathEnv[i];
17412
17412
  const pathPart = /^".*"$/.test(ppRaw) ? ppRaw.slice(1, -1) : ppRaw;
17413
17413
  const pCmd = path40.join(pathPart, cmd);
17414
17414
  const p = !pathPart && /^\.[\\\/]/.test(cmd) ? cmd.slice(0, 2) + pCmd : pCmd;
17415
- resolve43(subStep(p, i, 0));
17415
+ resolve44(subStep(p, i, 0));
17416
17416
  }), "step");
17417
- const subStep = /* @__PURE__ */ __name((p, i, ii) => new Promise((resolve43, reject) => {
17417
+ const subStep = /* @__PURE__ */ __name((p, i, ii) => new Promise((resolve44, reject) => {
17418
17418
  if (ii === pathExt.length)
17419
- return resolve43(step(i + 1));
17419
+ return resolve44(step2(i + 1));
17420
17420
  const ext = pathExt[ii];
17421
17421
  isexe(p + ext, { pathExt: pathExtExe }, (er, is) => {
17422
17422
  if (!er && is) {
17423
17423
  if (opt.all)
17424
17424
  found.push(p + ext);
17425
17425
  else
17426
- return resolve43(p + ext);
17426
+ return resolve44(p + ext);
17427
17427
  }
17428
- return resolve43(subStep(p, i, ii + 1));
17428
+ return resolve44(subStep(p, i, ii + 1));
17429
17429
  });
17430
17430
  }), "subStep");
17431
- return cb ? step(0).then((res) => cb(null, res), cb) : step(0);
17431
+ return cb ? step2(0).then((res) => cb(null, res), cb) : step2(0);
17432
17432
  }, "which");
17433
17433
  var whichSync = /* @__PURE__ */ __name((cmd, opt) => {
17434
17434
  opt = opt || {};
@@ -17501,30 +17501,30 @@ var require_which2 = __commonJS({
17501
17501
  opt = {};
17502
17502
  const { pathEnv, pathExt, pathExtExe } = getPathInfo(cmd, opt);
17503
17503
  const found = [];
17504
- const step = /* @__PURE__ */ __name((i) => new Promise((resolve43, reject) => {
17504
+ const step2 = /* @__PURE__ */ __name((i) => new Promise((resolve44, reject) => {
17505
17505
  if (i === pathEnv.length)
17506
- return opt.all && found.length ? resolve43(found) : reject(getNotFoundError(cmd));
17506
+ return opt.all && found.length ? resolve44(found) : reject(getNotFoundError(cmd));
17507
17507
  const ppRaw = pathEnv[i];
17508
17508
  const pathPart = /^".*"$/.test(ppRaw) ? ppRaw.slice(1, -1) : ppRaw;
17509
17509
  const pCmd = path40.join(pathPart, cmd);
17510
17510
  const p = !pathPart && /^\.[\\\/]/.test(cmd) ? cmd.slice(0, 2) + pCmd : pCmd;
17511
- resolve43(subStep(p, i, 0));
17511
+ resolve44(subStep(p, i, 0));
17512
17512
  }), "step");
17513
- const subStep = /* @__PURE__ */ __name((p, i, ii) => new Promise((resolve43, reject) => {
17513
+ const subStep = /* @__PURE__ */ __name((p, i, ii) => new Promise((resolve44, reject) => {
17514
17514
  if (ii === pathExt.length)
17515
- return resolve43(step(i + 1));
17515
+ return resolve44(step2(i + 1));
17516
17516
  const ext = pathExt[ii];
17517
17517
  isexe(p + ext, { pathExt: pathExtExe }, (er, is) => {
17518
17518
  if (!er && is) {
17519
17519
  if (opt.all)
17520
17520
  found.push(p + ext);
17521
17521
  else
17522
- return resolve43(p + ext);
17522
+ return resolve44(p + ext);
17523
17523
  }
17524
- return resolve43(subStep(p, i, ii + 1));
17524
+ return resolve44(subStep(p, i, ii + 1));
17525
17525
  });
17526
17526
  }), "subStep");
17527
- return cb ? step(0).then((res) => cb(null, res), cb) : step(0);
17527
+ return cb ? step2(0).then((res) => cb(null, res), cb) : step2(0);
17528
17528
  }, "which");
17529
17529
  var whichSync = /* @__PURE__ */ __name((cmd, opt) => {
17530
17530
  opt = opt || {};
@@ -18726,7 +18726,7 @@ var require_kill = __commonJS({
18726
18726
  return spawnedPromise;
18727
18727
  }
18728
18728
  let timeoutId;
18729
- const timeoutPromise = new Promise((resolve43, reject) => {
18729
+ const timeoutPromise = new Promise((resolve44, reject) => {
18730
18730
  timeoutId = setTimeout(() => {
18731
18731
  timeoutKill(spawned, killSignal, reject);
18732
18732
  }, timeout);
@@ -18848,7 +18848,7 @@ var require_get_stream = __commonJS({
18848
18848
  };
18849
18849
  const { maxBuffer } = options;
18850
18850
  const stream2 = bufferStream(options);
18851
- await new Promise((resolve43, reject) => {
18851
+ await new Promise((resolve44, reject) => {
18852
18852
  const rejectPromise = /* @__PURE__ */ __name((error) => {
18853
18853
  if (error && stream2.getBufferedLength() <= BufferConstants.MAX_LENGTH) {
18854
18854
  error.bufferedData = stream2.getBufferedValue();
@@ -18858,7 +18858,7 @@ var require_get_stream = __commonJS({
18858
18858
  (async () => {
18859
18859
  try {
18860
18860
  await streamPipelinePromisified(inputStream, stream2);
18861
- resolve43();
18861
+ resolve44();
18862
18862
  } catch (error) {
18863
18863
  rejectPromise(error);
18864
18864
  }
@@ -19019,9 +19019,9 @@ var require_promise = __commonJS({
19019
19019
  return spawned;
19020
19020
  }, "mergePromise");
19021
19021
  var getSpawnedPromise = /* @__PURE__ */ __name((spawned) => {
19022
- return new Promise((resolve43, reject) => {
19022
+ return new Promise((resolve44, reject) => {
19023
19023
  spawned.on("exit", (exitCode, signal) => {
19024
- resolve43({ exitCode, signal });
19024
+ resolve44({ exitCode, signal });
19025
19025
  });
19026
19026
  spawned.on("error", (error) => {
19027
19027
  reject(error);
@@ -21140,10 +21140,10 @@ var require_commonjs = __commonJS({
21140
21140
  * Return a void Promise that resolves once the stream ends.
21141
21141
  */
21142
21142
  async promise() {
21143
- return new Promise((resolve43, reject) => {
21143
+ return new Promise((resolve44, reject) => {
21144
21144
  this.on(DESTROYED, () => reject(new Error("stream destroyed")));
21145
21145
  this.on("error", (er) => reject(er));
21146
- this.on("end", () => resolve43());
21146
+ this.on("end", () => resolve44());
21147
21147
  });
21148
21148
  }
21149
21149
  /**
@@ -21167,7 +21167,7 @@ var require_commonjs = __commonJS({
21167
21167
  return Promise.resolve({ done: false, value: res });
21168
21168
  if (this[EOF])
21169
21169
  return stop();
21170
- let resolve43;
21170
+ let resolve44;
21171
21171
  let reject;
21172
21172
  const onerr = /* @__PURE__ */ __name((er) => {
21173
21173
  this.off("data", ondata);
@@ -21181,19 +21181,19 @@ var require_commonjs = __commonJS({
21181
21181
  this.off("end", onend);
21182
21182
  this.off(DESTROYED, ondestroy);
21183
21183
  this.pause();
21184
- resolve43({ value, done: !!this[EOF] });
21184
+ resolve44({ value, done: !!this[EOF] });
21185
21185
  }, "ondata");
21186
21186
  const onend = /* @__PURE__ */ __name(() => {
21187
21187
  this.off("error", onerr);
21188
21188
  this.off("data", ondata);
21189
21189
  this.off(DESTROYED, ondestroy);
21190
21190
  stop();
21191
- resolve43({ done: true, value: void 0 });
21191
+ resolve44({ done: true, value: void 0 });
21192
21192
  }, "onend");
21193
21193
  const ondestroy = /* @__PURE__ */ __name(() => onerr(new Error("stream destroyed")), "ondestroy");
21194
21194
  return new Promise((res2, rej) => {
21195
21195
  reject = rej;
21196
- resolve43 = res2;
21196
+ resolve44 = res2;
21197
21197
  this.once(DESTROYED, ondestroy);
21198
21198
  this.once("error", onerr);
21199
21199
  this.once("end", onend);
@@ -21659,7 +21659,7 @@ var require_lib9 = __commonJS({
21659
21659
  module.exports.fromStream = fromStream;
21660
21660
  function fromStream(stream, opts) {
21661
21661
  const istream = integrityStream(opts);
21662
- return new Promise((resolve43, reject) => {
21662
+ return new Promise((resolve44, reject) => {
21663
21663
  stream.pipe(istream);
21664
21664
  stream.on("error", reject);
21665
21665
  istream.on("error", reject);
@@ -21667,7 +21667,7 @@ var require_lib9 = __commonJS({
21667
21667
  istream.on("integrity", (s) => {
21668
21668
  sri = s;
21669
21669
  });
21670
- istream.on("end", () => resolve43(sri));
21670
+ istream.on("end", () => resolve44(sri));
21671
21671
  istream.resume();
21672
21672
  });
21673
21673
  }
@@ -21728,7 +21728,7 @@ var require_lib9 = __commonJS({
21728
21728
  ));
21729
21729
  }
21730
21730
  const checker = integrityStream(opts);
21731
- return new Promise((resolve43, reject) => {
21731
+ return new Promise((resolve44, reject) => {
21732
21732
  stream.pipe(checker);
21733
21733
  stream.on("error", reject);
21734
21734
  checker.on("error", reject);
@@ -21736,7 +21736,7 @@ var require_lib9 = __commonJS({
21736
21736
  checker.on("verified", (s) => {
21737
21737
  verified = s;
21738
21738
  });
21739
- checker.on("end", () => resolve43(verified));
21739
+ checker.on("end", () => resolve44(verified));
21740
21740
  checker.resume();
21741
21741
  });
21742
21742
  }
@@ -23903,7 +23903,7 @@ var require_lib11 = __commonJS({
23903
23903
  return mod && mod.__esModule ? mod : { "default": mod };
23904
23904
  };
23905
23905
  Object.defineProperty(exports, "__esModule", { value: true });
23906
- exports.isAbsolute = isAbsolute32;
23906
+ exports.isAbsolute = isAbsolute34;
23907
23907
  exports.indexOfDepPathSuffix = indexOfDepPathSuffix;
23908
23908
  exports.parseDepPath = parseDepPath;
23909
23909
  exports.removeSuffix = removeSuffix;
@@ -23917,10 +23917,10 @@ var require_lib11 = __commonJS({
23917
23917
  exports.createPeerDepGraphHash = createPeerDepGraphHash;
23918
23918
  var crypto_hash_1 = require_lib10();
23919
23919
  var semver_1 = __importDefault(require_semver2());
23920
- function isAbsolute32(dependencyPath) {
23920
+ function isAbsolute34(dependencyPath) {
23921
23921
  return dependencyPath[0] !== "/";
23922
23922
  }
23923
- __name(isAbsolute32, "isAbsolute");
23923
+ __name(isAbsolute34, "isAbsolute");
23924
23924
  function indexOfDepPathSuffix(depPath) {
23925
23925
  if (!depPath.endsWith(")"))
23926
23926
  return { peersIndex: -1, patchHashIndex: -1 };
@@ -24906,14 +24906,14 @@ var require_reduce = __commonJS({
24906
24906
  }
24907
24907
  __name(_arrayReduce, "_arrayReduce");
24908
24908
  function _iterableReduce(xf, acc, iter) {
24909
- var step = iter.next();
24910
- while (!step.done) {
24911
- acc = xf["@@transducer/step"](acc, step.value);
24909
+ var step2 = iter.next();
24910
+ while (!step2.done) {
24911
+ acc = xf["@@transducer/step"](acc, step2.value);
24912
24912
  if (acc && acc["@@transducer/reduced"]) {
24913
24913
  acc = acc["@@transducer/value"];
24914
24914
  break;
24915
24915
  }
24916
- step = iter.next();
24916
+ step2 = iter.next();
24917
24917
  }
24918
24918
  return xf["@@transducer/result"](acc);
24919
24919
  }
@@ -25382,9 +25382,9 @@ var require_write = __commonJS({
25382
25382
  var lockfileName_js_1 = require_lockfileName();
25383
25383
  var lockfileFormatConverters_js_1 = require_lockfileFormatConverters();
25384
25384
  async function writeFileAtomic2(filename, data) {
25385
- return new Promise((resolve43, reject) => {
25385
+ return new Promise((resolve44, reject) => {
25386
25386
  (0, write_file_atomic_1.default)(filename, data, {}, (err) => {
25387
- err != null ? reject(err) : resolve43();
25387
+ err != null ? reject(err) : resolve44();
25388
25388
  });
25389
25389
  });
25390
25390
  }
@@ -25490,14 +25490,14 @@ var require_existsWantedLockfile = __commonJS({
25490
25490
  mergeGitBranchLockfiles: false
25491
25491
  }) {
25492
25492
  const wantedLockfile = await (0, lockfileName_js_1.getWantedLockfileName)(opts);
25493
- return new Promise((resolve43, reject) => {
25493
+ return new Promise((resolve44, reject) => {
25494
25494
  fs_1.default.access(path_1.default.join(pkgPath, wantedLockfile), (err) => {
25495
25495
  if (err == null) {
25496
- resolve43(true);
25496
+ resolve44(true);
25497
25497
  return;
25498
25498
  }
25499
25499
  if (err.code === "ENOENT") {
25500
- resolve43(false);
25500
+ resolve44(false);
25501
25501
  return;
25502
25502
  }
25503
25503
  reject(err);
@@ -34434,21 +34434,21 @@ async function superviseProcess(options, deps = {}) {
34434
34434
  let tickInFlight = false;
34435
34435
  let resolveLifecycle;
34436
34436
  let rejectLifecycle;
34437
- const lifecyclePromise = new Promise((resolve43, reject) => {
34438
- resolveLifecycle = resolve43;
34437
+ const lifecyclePromise = new Promise((resolve44, reject) => {
34438
+ resolveLifecycle = resolve44;
34439
34439
  rejectLifecycle = reject;
34440
34440
  });
34441
34441
  let resolveChildClosed;
34442
34442
  let resolveStdoutClosed;
34443
34443
  let resolveStderrClosed;
34444
- const childClosed = new Promise((resolve43) => {
34445
- resolveChildClosed = resolve43;
34444
+ const childClosed = new Promise((resolve44) => {
34445
+ resolveChildClosed = resolve44;
34446
34446
  });
34447
- const stdoutClosed = new Promise((resolve43) => {
34448
- resolveStdoutClosed = resolve43;
34447
+ const stdoutClosed = new Promise((resolve44) => {
34448
+ resolveStdoutClosed = resolve44;
34449
34449
  });
34450
- const stderrClosed = new Promise((resolve43) => {
34451
- resolveStderrClosed = resolve43;
34450
+ const stderrClosed = new Promise((resolve44) => {
34451
+ resolveStderrClosed = resolve44;
34452
34452
  });
34453
34453
  let child;
34454
34454
  try {
@@ -39937,15 +39937,15 @@ import path33 from "node:path";
39937
39937
  function nativeStage(name, commands) {
39938
39938
  return Object.freeze({
39939
39939
  name,
39940
- commands: Object.freeze(commands.map(({ step, args: args2 }) => Object.freeze({ step, args: Object.freeze(args2) }))),
39940
+ commands: Object.freeze(commands.map(({ step: step2, args: args2 }) => Object.freeze({ step: step2, args: Object.freeze(args2) }))),
39941
39941
  treeRoles: NATIVE_TREE_ROLES[name]
39942
39942
  });
39943
39943
  }
39944
39944
  function qoderNativeLifecyclePlan({ request, roots, prompt }) {
39945
39945
  const global2 = ["--cwd", roots.workspaceRoot, "--config-dir", roots.temporaryRoot];
39946
39946
  const plugin = `${request.source.pluginId}@${request.source.marketplaceId}`;
39947
- const invoke = /* @__PURE__ */ __name((step) => ({ step, args: [...global2, "-p", "-o", "json", "--no-session-persistence", prompt] }), "invoke");
39948
- const manage = /* @__PURE__ */ __name((step, ...args2) => ({ step, args: [...global2, "plugins", ...args2] }), "manage");
39947
+ const invoke = /* @__PURE__ */ __name((step2) => ({ step: step2, args: [...global2, "-p", "-o", "json", "--no-session-persistence", prompt] }), "invoke");
39948
+ const manage = /* @__PURE__ */ __name((step2, ...args2) => ({ step: step2, args: [...global2, "plugins", ...args2] }), "manage");
39949
39949
  return Object.freeze([
39950
39950
  nativeStage("preflight", [{ step: "version-probe", args: ["--version"] }]),
39951
39951
  nativeStage("validate-v1", [manage("plugin-validate", "validate", roots.sourceRoot, "--json", "--strict")]),
@@ -39975,8 +39975,8 @@ function qoderNativeLifecyclePlan({ request, roots, prompt }) {
39975
39975
  }
39976
39976
  function workBuddyNativeLifecyclePlan({ request, roots, prompt }) {
39977
39977
  const plugin = `${request.source.pluginId}@${request.source.marketplaceId}`;
39978
- const invoke = /* @__PURE__ */ __name((step) => ({ step, args: ["-p", prompt, "--output-format", "stream-json", "--permission-mode", "dontAsk", "--no-session-persistence"] }), "invoke");
39979
- const manage = /* @__PURE__ */ __name((step, ...args2) => ({ step, args: ["plugin", ...args2] }), "manage");
39978
+ const invoke = /* @__PURE__ */ __name((step2) => ({ step: step2, args: ["-p", prompt, "--output-format", "stream-json", "--permission-mode", "dontAsk", "--no-session-persistence"] }), "invoke");
39979
+ const manage = /* @__PURE__ */ __name((step2, ...args2) => ({ step: step2, args: ["plugin", ...args2] }), "manage");
39980
39980
  return Object.freeze([
39981
39981
  nativeStage("preflight", [{ step: "version-probe", args: ["--version"] }]),
39982
39982
  nativeStage("validate-v1", [manage("plugin-validate", "validate", roots.sourceRoot)]),
@@ -40007,7 +40007,7 @@ function workBuddyNativeLifecyclePlan({ request, roots, prompt }) {
40007
40007
  function ownKeys2(value) {
40008
40008
  return value && typeof value === "object" && !Array.isArray(value) ? Object.keys(value).sort().join(",") : "";
40009
40009
  }
40010
- function evaluateControlledNativeLifecycleFixture({ bytes, hostId, stage, step } = {}) {
40010
+ function evaluateControlledNativeLifecycleFixture({ bytes, hostId, stage, step: step2 } = {}) {
40011
40011
  let text;
40012
40012
  try {
40013
40013
  text = new TextDecoder("utf-8", { fatal: true }).decode(bytes);
@@ -40022,10 +40022,10 @@ function evaluateControlledNativeLifecycleFixture({ bytes, hostId, stage, step }
40022
40022
  } catch {
40023
40023
  return Object.freeze({ status: "indeterminate" });
40024
40024
  }
40025
- if (ownKeys2(event) !== "hostId,invocation,protocol,stage,stageCode,step" || event.protocol !== CONTROLLED_NATIVE_LIFECYCLE_FIXTURE_PROTOCOL || event.hostId !== hostId || event.stage !== stage || event.step !== step || !Array.isArray(event.invocation)) {
40025
+ if (ownKeys2(event) !== "hostId,invocation,protocol,stage,stageCode,step" || event.protocol !== CONTROLLED_NATIVE_LIFECYCLE_FIXTURE_PROTOCOL || event.hostId !== hostId || event.stage !== stage || event.step !== step2 || !Array.isArray(event.invocation)) {
40026
40026
  return Object.freeze({ status: "indeterminate" });
40027
40027
  }
40028
- const invocationStep = step.includes("invoke");
40028
+ const invocationStep = step2.includes("invoke");
40029
40029
  if (!invocationStep && event.invocation.length !== 0) return Object.freeze({ status: "indeterminate" });
40030
40030
  if (invocationStep) {
40031
40031
  if (event.invocation.length !== 1 || ownKeys2(event.invocation[0]) !== "callId,result") {
@@ -40035,7 +40035,7 @@ function evaluateControlledNativeLifecycleFixture({ bytes, hostId, stage, step }
40035
40035
  if (typeof pair.callId !== "string" || pair.callId.length === 0 || ownKeys2(pair.result) !== "callId,outcome" || pair.result.callId !== pair.callId || !["blocked", "succeeded"].includes(pair.result.outcome)) {
40036
40036
  return Object.freeze({ status: "indeterminate" });
40037
40037
  }
40038
- const expectedOutcome = step === "plugin-invoke-negative" ? "blocked" : "succeeded";
40038
+ const expectedOutcome = step2 === "plugin-invoke-negative" ? "blocked" : "succeeded";
40039
40039
  if (pair.result.outcome !== expectedOutcome) return Object.freeze({ status: "failed" });
40040
40040
  }
40041
40041
  if (event.stageCode === `${stage}:ok`) return Object.freeze({ status: "observed" });
@@ -41449,8 +41449,8 @@ function assertRootIsolation2(roots, sourceRoot, hostsRoot) {
41449
41449
  if (roots.existingUserStateRoot && contained(roots.existingUserStateRoot, write)) throw fail4("existing user state root overlaps a write root");
41450
41450
  }
41451
41451
  }
41452
- function commandObservation(step, envelope, streams, limits) {
41453
- return { step, execution: { spawned: envelope?.evidence?.pid !== void 0, exitStatus: envelope?.exitStatus ?? null, processStatus: envelope?.processStatus ?? null, terminationReason: envelope?.terminationReason ?? null, watchdogReason: envelope?.watchdogReason ?? null, runnerModelOverrideAbsent: true }, streams: streams || null, outputByteLimits: limits || null, outputLimitExceeded: envelope?.evidence?.outputLimitExceeded ?? null };
41452
+ function commandObservation(step2, envelope, streams, limits) {
41453
+ return { step: step2, execution: { spawned: envelope?.evidence?.pid !== void 0, exitStatus: envelope?.exitStatus ?? null, processStatus: envelope?.processStatus ?? null, terminationReason: envelope?.terminationReason ?? null, watchdogReason: envelope?.watchdogReason ?? null, runnerModelOverrideAbsent: true }, streams: streams || null, outputByteLimits: limits || null, outputLimitExceeded: envelope?.evidence?.outputLimitExceeded ?? null };
41454
41454
  }
41455
41455
  async function observeTreeSafe(root, rootBinding2) {
41456
41456
  try {
@@ -41508,10 +41508,10 @@ function qualifiedPluginId(channel) {
41508
41508
  if (!simple.test(channel.pluginId) || !simple.test(channel.marketplaceId)) throw fail4("channel identities must be simple plugin and marketplace names");
41509
41509
  return `${channel.pluginId}@${channel.marketplaceId}`;
41510
41510
  }
41511
- function argsFor(driver, step, channel, locator) {
41511
+ function argsFor(driver, step2, channel, locator) {
41512
41512
  const id = qualifiedPluginId(channel);
41513
- if (step === "marketplace-add") return driver.hostId === "claude" ? ["plugin", "marketplace", "add", locator] : ["plugin", "marketplace", "add", locator, "--ref", channel.sourceRef, "--json"];
41514
- if (step === "plugin-install") return driver.hostId === "claude" ? ["plugin", "install", id] : ["plugin", "add", id, "--json"];
41513
+ if (step2 === "marketplace-add") return driver.hostId === "claude" ? ["plugin", "marketplace", "add", locator] : ["plugin", "marketplace", "add", locator, "--ref", channel.sourceRef, "--json"];
41514
+ if (step2 === "plugin-install") return driver.hostId === "claude" ? ["plugin", "install", id] : ["plugin", "add", id, "--json"];
41515
41515
  return ["plugin", "list", "--json"];
41516
41516
  }
41517
41517
  function channelEnvironment(driver, roots) {
@@ -41577,11 +41577,11 @@ async function runChannel(request, bindings, preflight, facts) {
41577
41577
  if (cause.commandObservation) facts.input.probe = cause.commandObservation;
41578
41578
  return finish(cause?.code === "SFC2004" ? "indeterminate" : "rejected", cause?.code === "SFC2004" ? "boundary-state-indeterminate" : "executable-observation-mismatch");
41579
41579
  }
41580
- for (const step of ["marketplace-add", "plugin-install", "plugin-list"]) {
41580
+ for (const step2 of ["marketplace-add", "plugin-install", "plugin-list"]) {
41581
41581
  try {
41582
- const run6 = await runCommand({ step, command: executablePath, args: argsFor(driver, step, request.source.channel, bindings.channelLocator) }, temporary, timeoutPolicy, limits, path35.join(evidence, step), env);
41582
+ const run6 = await runCommand({ step: step2, command: executablePath, args: argsFor(driver, step2, request.source.channel, bindings.channelLocator) }, temporary, timeoutPolicy, limits, path35.join(evidence, step2), env);
41583
41583
  recordCommand(run6.observation);
41584
- outputs[step] = run6.stdout;
41584
+ outputs[step2] = run6.stdout;
41585
41585
  if (run6.envelope.ok !== true || run6.observation.outputLimitExceeded !== null) return finish("failed", "execution-failed");
41586
41586
  } catch (cause) {
41587
41587
  if (cause.commandObservation) recordCommand(cause.commandObservation);
@@ -47557,16 +47557,16 @@ function validatePostPublishDeclaration(postPublish, options = {}) {
47557
47557
  fail5(`${unitLabel}steps must be an array`);
47558
47558
  }
47559
47559
  const stepNames = /* @__PURE__ */ new Set();
47560
- postPublish.steps.forEach((step, index) => {
47560
+ postPublish.steps.forEach((step2, index) => {
47561
47561
  const where = `${unitLabel}steps[${index}]`;
47562
- validateHookCommand(where, step);
47563
- if (typeof step.name !== "string" || !SAFE_ID_RE2.test(step.name)) {
47564
- fail5(`${where}.name must match /^[a-z0-9][a-z0-9._-]*$/`, { name: step?.name });
47562
+ validateHookCommand(where, step2);
47563
+ if (typeof step2.name !== "string" || !SAFE_ID_RE2.test(step2.name)) {
47564
+ fail5(`${where}.name must match /^[a-z0-9][a-z0-9._-]*$/`, { name: step2?.name });
47565
47565
  }
47566
- if (stepNames.has(step.name)) {
47567
- fail5(`${unitLabel}duplicate step name "${step.name}"`);
47566
+ if (stepNames.has(step2.name)) {
47567
+ fail5(`${unitLabel}duplicate step name "${step2.name}"`);
47568
47568
  }
47569
- stepNames.add(step.name);
47569
+ stepNames.add(step2.name);
47570
47570
  });
47571
47571
  }
47572
47572
  if (postPublish.assertMainVersionAhead !== void 0 && typeof postPublish.assertMainVersionAhead !== "boolean") {
@@ -55386,12 +55386,12 @@ var require_body = __commonJS({
55386
55386
  if (resTimeout && resTimeout.unref) {
55387
55387
  resTimeout.unref();
55388
55388
  }
55389
- return new Promise((resolve43) => {
55389
+ return new Promise((resolve44) => {
55390
55390
  if (stream !== upstream) {
55391
55391
  upstream.on("error", (er) => stream.emit("error", er));
55392
55392
  upstream.pipe(stream);
55393
55393
  }
55394
- resolve43();
55394
+ resolve44();
55395
55395
  }).then(() => stream.concat()).then((buf) => {
55396
55396
  clearTimeout(resTimeout);
55397
55397
  return buf;
@@ -56157,7 +56157,7 @@ var require_lib20 = __commonJS({
56157
56157
  var fetch = /* @__PURE__ */ __name(async (url, opts) => {
56158
56158
  if (/^data:/.test(url)) {
56159
56159
  const request = new Request(url, opts);
56160
- return Promise.resolve().then(() => new Promise((resolve43, reject) => {
56160
+ return Promise.resolve().then(() => new Promise((resolve44, reject) => {
56161
56161
  let type, data;
56162
56162
  try {
56163
56163
  const { pathname, search } = new URL2(url);
@@ -56181,10 +56181,10 @@ var require_lib20 = __commonJS({
56181
56181
  if (type) {
56182
56182
  headers["Content-Type"] = type;
56183
56183
  }
56184
- return resolve43(new Response(data, { headers }));
56184
+ return resolve44(new Response(data, { headers }));
56185
56185
  }));
56186
56186
  }
56187
- return new Promise((resolve43, reject) => {
56187
+ return new Promise((resolve44, reject) => {
56188
56188
  const request = new Request(url, opts);
56189
56189
  let options;
56190
56190
  try {
@@ -56303,7 +56303,7 @@ var require_lib20 = __commonJS({
56303
56303
  requestOpts.body = void 0;
56304
56304
  requestOpts.headers.delete("content-length");
56305
56305
  }
56306
- resolve43(fetch(new Request(locationURL, requestOpts)));
56306
+ resolve44(fetch(new Request(locationURL, requestOpts)));
56307
56307
  finalize();
56308
56308
  return;
56309
56309
  }
@@ -56331,7 +56331,7 @@ var require_lib20 = __commonJS({
56331
56331
  const codings = headers.get("Content-Encoding");
56332
56332
  if (!request.compress || request.method === "HEAD" || codings === null || res.statusCode === 204 || res.statusCode === 304) {
56333
56333
  response = new Response(body, responseOptions);
56334
- resolve43(response);
56334
+ resolve44(response);
56335
56335
  return;
56336
56336
  }
56337
56337
  const zlibOptions = {
@@ -56350,7 +56350,7 @@ var require_lib20 = __commonJS({
56350
56350
  ).pipe(unzip),
56351
56351
  responseOptions
56352
56352
  );
56353
- resolve43(response);
56353
+ resolve44(response);
56354
56354
  return;
56355
56355
  }
56356
56356
  if (codings === "deflate" || codings === "x-deflate") {
@@ -56362,7 +56362,7 @@ var require_lib20 = __commonJS({
56362
56362
  (er) => decoder3.emit("error", er)
56363
56363
  ).pipe(decoder3);
56364
56364
  response = new Response(decoder3, responseOptions);
56365
- resolve43(response);
56365
+ resolve44(response);
56366
56366
  });
56367
56367
  return;
56368
56368
  }
@@ -56380,11 +56380,11 @@ var require_lib20 = __commonJS({
56380
56380
  (er) => decoder2.emit("error", er)
56381
56381
  ).pipe(decoder2);
56382
56382
  response = new Response(decoder2, responseOptions);
56383
- resolve43(response);
56383
+ resolve44(response);
56384
56384
  return;
56385
56385
  }
56386
56386
  response = new Response(body, responseOptions);
56387
- resolve43(response);
56387
+ resolve44(response);
56388
56388
  });
56389
56389
  writeToStream(req, request);
56390
56390
  });
@@ -56642,12 +56642,12 @@ var require_lib21 = __commonJS({
56642
56642
  return process.emit("input", "end", ...args2);
56643
56643
  }, "end"),
56644
56644
  read: /* @__PURE__ */ __name(function(...args2) {
56645
- let resolve43, reject;
56645
+ let resolve44, reject;
56646
56646
  const promise = new Promise((_resolve, _reject) => {
56647
- resolve43 = _resolve;
56647
+ resolve44 = _resolve;
56648
56648
  reject = _reject;
56649
56649
  });
56650
- process.emit("input", "read", resolve43, reject, ...args2);
56650
+ process.emit("input", "read", resolve44, reject, ...args2);
56651
56651
  return promise;
56652
56652
  }, "read")
56653
56653
  }
@@ -58287,7 +58287,7 @@ var require_npa = __commonJS({
58287
58287
  spec = arg;
58288
58288
  }
58289
58289
  }
58290
- return resolve43(name, spec, where, arg);
58290
+ return resolve44(name, spec, where, arg);
58291
58291
  }
58292
58292
  __name(npa, "npa");
58293
58293
  function isFileSpec(spec) {
@@ -58310,7 +58310,7 @@ var require_npa = __commonJS({
58310
58310
  return spec.toLowerCase().startsWith("npm:");
58311
58311
  }
58312
58312
  __name(isAliasSpec, "isAliasSpec");
58313
- function resolve43(name, spec, where, arg) {
58313
+ function resolve44(name, spec, where, arg) {
58314
58314
  const res = new Result({
58315
58315
  raw: arg,
58316
58316
  name,
@@ -58342,7 +58342,7 @@ var require_npa = __commonJS({
58342
58342
  return fromRegistry(res);
58343
58343
  }
58344
58344
  }
58345
- __name(resolve43, "resolve");
58345
+ __name(resolve44, "resolve");
58346
58346
  function toPurl(arg, reg = defaultRegistry) {
58347
58347
  const res = npa(arg);
58348
58348
  if (res.type !== "version") {
@@ -58643,7 +58643,7 @@ var require_npa = __commonJS({
58643
58643
  }
58644
58644
  __name(fromRegistry, "fromRegistry");
58645
58645
  module.exports = npa;
58646
- module.exports.resolve = resolve43;
58646
+ module.exports.resolve = resolve44;
58647
58647
  module.exports.toPurl = toPurl;
58648
58648
  module.exports.Result = Result;
58649
58649
  }
@@ -60431,7 +60431,7 @@ var require_lib25 = __commonJS({
60431
60431
  module.exports.fromStream = fromStream;
60432
60432
  function fromStream(stream, opts) {
60433
60433
  const istream = integrityStream(opts);
60434
- return new Promise((resolve43, reject) => {
60434
+ return new Promise((resolve44, reject) => {
60435
60435
  stream.pipe(istream);
60436
60436
  stream.on("error", reject);
60437
60437
  istream.on("error", reject);
@@ -60439,7 +60439,7 @@ var require_lib25 = __commonJS({
60439
60439
  istream.on("integrity", (s) => {
60440
60440
  sri = s;
60441
60441
  });
60442
- istream.on("end", () => resolve43(sri));
60442
+ istream.on("end", () => resolve44(sri));
60443
60443
  istream.resume();
60444
60444
  });
60445
60445
  }
@@ -60500,7 +60500,7 @@ var require_lib25 = __commonJS({
60500
60500
  ));
60501
60501
  }
60502
60502
  const checker = integrityStream(opts);
60503
- return new Promise((resolve43, reject) => {
60503
+ return new Promise((resolve44, reject) => {
60504
60504
  stream.pipe(checker);
60505
60505
  stream.on("error", reject);
60506
60506
  checker.on("error", reject);
@@ -60508,7 +60508,7 @@ var require_lib25 = __commonJS({
60508
60508
  checker.on("verified", (s) => {
60509
60509
  verified = s;
60510
60510
  });
60511
- checker.on("end", () => resolve43(verified));
60511
+ checker.on("end", () => resolve44(verified));
60512
60512
  checker.resume();
60513
60513
  });
60514
60514
  }
@@ -61146,10 +61146,10 @@ var require_minipass = __commonJS({
61146
61146
  }
61147
61147
  // stream.promise().then(() => done, er => emitted error)
61148
61148
  promise() {
61149
- return new Promise((resolve43, reject) => {
61149
+ return new Promise((resolve44, reject) => {
61150
61150
  this.on(DESTROYED, () => reject(new Error("stream destroyed")));
61151
61151
  this.on("error", (er) => reject(er));
61152
- this.on("end", () => resolve43());
61152
+ this.on("end", () => resolve44());
61153
61153
  });
61154
61154
  }
61155
61155
  // for await (let chunk of stream)
@@ -61160,7 +61160,7 @@ var require_minipass = __commonJS({
61160
61160
  return Promise.resolve({ done: false, value: res });
61161
61161
  if (this[EOF])
61162
61162
  return Promise.resolve({ done: true });
61163
- let resolve43 = null;
61163
+ let resolve44 = null;
61164
61164
  let reject = null;
61165
61165
  const onerr = /* @__PURE__ */ __name((er) => {
61166
61166
  this.removeListener("data", ondata);
@@ -61171,17 +61171,17 @@ var require_minipass = __commonJS({
61171
61171
  this.removeListener("error", onerr);
61172
61172
  this.removeListener("end", onend);
61173
61173
  this.pause();
61174
- resolve43({ value, done: !!this[EOF] });
61174
+ resolve44({ value, done: !!this[EOF] });
61175
61175
  }, "ondata");
61176
61176
  const onend = /* @__PURE__ */ __name(() => {
61177
61177
  this.removeListener("error", onerr);
61178
61178
  this.removeListener("data", ondata);
61179
- resolve43({ done: true });
61179
+ resolve44({ done: true });
61180
61180
  }, "onend");
61181
61181
  const ondestroy = /* @__PURE__ */ __name(() => onerr(new Error("stream destroyed")), "ondestroy");
61182
61182
  return new Promise((res2, rej) => {
61183
61183
  reject = rej;
61184
- resolve43 = res2;
61184
+ resolve44 = res2;
61185
61185
  this.once(DESTROYED, ondestroy);
61186
61186
  this.once("error", onerr);
61187
61187
  this.once("end", onend);
@@ -61654,11 +61654,11 @@ var require_polyfill = __commonJS({
61654
61654
  utimes
61655
61655
  } = __require("fs/promises");
61656
61656
  var {
61657
- dirname: dirname27,
61658
- isAbsolute: isAbsolute32,
61657
+ dirname: dirname28,
61658
+ isAbsolute: isAbsolute34,
61659
61659
  join: join50,
61660
61660
  parse: parse2,
61661
- resolve: resolve43,
61661
+ resolve: resolve44,
61662
61662
  sep: sep11,
61663
61663
  toNamespacedPath
61664
61664
  } = __require("path");
@@ -61758,7 +61758,7 @@ var require_polyfill = __commonJS({
61758
61758
  }
61759
61759
  __name(getStats, "getStats");
61760
61760
  async function checkParentDir(destStat, src, dest, opts) {
61761
- const destParent = dirname27(dest);
61761
+ const destParent = dirname28(dest);
61762
61762
  const dirExists = await pathExists2(destParent);
61763
61763
  if (dirExists) {
61764
61764
  return getStatsForCopy(destStat, src, dest, opts);
@@ -61776,8 +61776,8 @@ var require_polyfill = __commonJS({
61776
61776
  }
61777
61777
  __name(pathExists2, "pathExists");
61778
61778
  async function checkParentPaths(src, srcStat, dest) {
61779
- const srcParent = resolve43(dirname27(src));
61780
- const destParent = resolve43(dirname27(dest));
61779
+ const srcParent = resolve44(dirname28(src));
61780
+ const destParent = resolve44(dirname28(dest));
61781
61781
  if (destParent === srcParent || destParent === parse2(destParent).root) {
61782
61782
  return;
61783
61783
  }
@@ -61801,7 +61801,7 @@ var require_polyfill = __commonJS({
61801
61801
  return checkParentPaths(src, srcStat, destParent);
61802
61802
  }
61803
61803
  __name(checkParentPaths, "checkParentPaths");
61804
- var normalizePathToArray = /* @__PURE__ */ __name((path40) => resolve43(path40).split(sep11).filter(Boolean), "normalizePathToArray");
61804
+ var normalizePathToArray = /* @__PURE__ */ __name((path40) => resolve44(path40).split(sep11).filter(Boolean), "normalizePathToArray");
61805
61805
  function isSrcSubdir(src, dest) {
61806
61806
  const srcArr = normalizePathToArray(src);
61807
61807
  const destArr = normalizePathToArray(dest);
@@ -61946,8 +61946,8 @@ var require_polyfill = __commonJS({
61946
61946
  __name(copyDir, "copyDir");
61947
61947
  async function onLink(destStat, src, dest) {
61948
61948
  let resolvedSrc = await readlink4(src);
61949
- if (!isAbsolute32(resolvedSrc)) {
61950
- resolvedSrc = resolve43(dirname27(src), resolvedSrc);
61949
+ if (!isAbsolute34(resolvedSrc)) {
61950
+ resolvedSrc = resolve44(dirname28(src), resolvedSrc);
61951
61951
  }
61952
61952
  if (!destStat) {
61953
61953
  return symlink(resolvedSrc, dest);
@@ -61961,8 +61961,8 @@ var require_polyfill = __commonJS({
61961
61961
  }
61962
61962
  throw err;
61963
61963
  }
61964
- if (!isAbsolute32(resolvedDest)) {
61965
- resolvedDest = resolve43(dirname27(dest), resolvedDest);
61964
+ if (!isAbsolute34(resolvedDest)) {
61965
+ resolvedDest = resolve44(dirname28(dest), resolvedDest);
61966
61966
  }
61967
61967
  if (isSrcSubdir(resolvedSrc, resolvedDest)) {
61968
61968
  throw new ERR_FS_CP_EINVAL({
@@ -62068,7 +62068,7 @@ var require_readdir_scoped = __commonJS({
62068
62068
  // ../../node_modules/.pnpm/@npmcli+fs@5.0.0/node_modules/@npmcli/fs/lib/move-file.js
62069
62069
  var require_move_file = __commonJS({
62070
62070
  "../../node_modules/.pnpm/@npmcli+fs@5.0.0/node_modules/@npmcli/fs/lib/move-file.js"(exports, module) {
62071
- var { dirname: dirname27, join: join50, resolve: resolve43, relative: relative35, isAbsolute: isAbsolute32 } = __require("path");
62071
+ var { dirname: dirname28, join: join50, resolve: resolve44, relative: relative35, isAbsolute: isAbsolute34 } = __require("path");
62072
62072
  var fs = __require("fs/promises");
62073
62073
  var pathExists2 = /* @__PURE__ */ __name(async (path40) => {
62074
62074
  try {
@@ -62089,7 +62089,7 @@ var require_move_file = __commonJS({
62089
62089
  if (!options.overwrite && await pathExists2(destination)) {
62090
62090
  throw new Error(`The destination file exists: ${destination}`);
62091
62091
  }
62092
- await fs.mkdir(dirname27(destination), { recursive: true });
62092
+ await fs.mkdir(dirname28(destination), { recursive: true });
62093
62093
  try {
62094
62094
  await fs.rename(source, destination);
62095
62095
  } catch (error) {
@@ -62112,12 +62112,12 @@ var require_move_file = __commonJS({
62112
62112
  if (root) {
62113
62113
  await Promise.all(symlinks.map(async ({ source: symSource, destination: symDestination }) => {
62114
62114
  let target = await fs.readlink(symSource);
62115
- if (isAbsolute32(target)) {
62116
- target = resolve43(symDestination, relative35(symSource, target));
62115
+ if (isAbsolute34(target)) {
62116
+ target = resolve44(symDestination, relative35(symSource, target));
62117
62117
  }
62118
62118
  let targetStat = "file";
62119
62119
  try {
62120
- targetStat = await fs.stat(resolve43(dirname27(symSource), target));
62120
+ targetStat = await fs.stat(resolve44(dirname28(symSource), target));
62121
62121
  if (targetStat.isDirectory()) {
62122
62122
  targetStat = "junction";
62123
62123
  }
@@ -62348,7 +62348,7 @@ async function pMap(iterable, mapper, {
62348
62348
  const cleanup = /* @__PURE__ */ __name(() => {
62349
62349
  signal?.removeEventListener("abort", signalListener);
62350
62350
  }, "cleanup");
62351
- const resolve43 = /* @__PURE__ */ __name((value) => {
62351
+ const resolve44 = /* @__PURE__ */ __name((value) => {
62352
62352
  resolve_(value);
62353
62353
  cleanup();
62354
62354
  }, "resolve");
@@ -62380,7 +62380,7 @@ async function pMap(iterable, mapper, {
62380
62380
  }
62381
62381
  isResolved = true;
62382
62382
  if (skippedIndexesMap.size === 0) {
62383
- resolve43(result2);
62383
+ resolve44(result2);
62384
62384
  return;
62385
62385
  }
62386
62386
  const pureResult = [];
@@ -62390,7 +62390,7 @@ async function pMap(iterable, mapper, {
62390
62390
  }
62391
62391
  pureResult.push(value);
62392
62392
  }
62393
- resolve43(pureResult);
62393
+ resolve44(pureResult);
62394
62394
  }
62395
62395
  return;
62396
62396
  }
@@ -67065,10 +67065,10 @@ var require_verify = __commonJS({
67065
67065
  markEndTime
67066
67066
  ];
67067
67067
  const stats = {};
67068
- for (const step of steps) {
67069
- const label = step.name;
67068
+ for (const step2 of steps) {
67069
+ const label = step2.name;
67070
67070
  const start = /* @__PURE__ */ new Date();
67071
- const s = await step(cache, opts);
67071
+ const s = await step2(cache, opts);
67072
67072
  if (s) {
67073
67073
  Object.keys(s).forEach((k) => {
67074
67074
  stats[k] = s[k];
@@ -67119,8 +67119,8 @@ var require_verify = __commonJS({
67119
67119
  liveContent.add(integrity[algo].toString());
67120
67120
  }
67121
67121
  });
67122
- await new Promise((resolve43, reject) => {
67123
- indexStream.on("end", resolve43).on("error", reject);
67122
+ await new Promise((resolve44, reject) => {
67123
+ indexStream.on("end", resolve44).on("error", reject);
67124
67124
  });
67125
67125
  const contentDir = contentPath.contentDir(cache);
67126
67126
  const files = await glob(path40.join(contentDir, "**"), {
@@ -67498,13 +67498,13 @@ var require_lib29 = __commonJS({
67498
67498
  unref: options.unref,
67499
67499
  maxRetryTime: options.maxRetryTime
67500
67500
  });
67501
- return new Promise(function(resolve43, reject) {
67501
+ return new Promise(function(resolve44, reject) {
67502
67502
  operation.attempt(async (number) => {
67503
67503
  try {
67504
67504
  const result2 = await fn((err) => {
67505
67505
  throw Object.assign(new Error("Retrying"), { code: "EPROMISERETRY", retried: err });
67506
67506
  }, number, operation);
67507
- return resolve43(result2);
67507
+ return resolve44(result2);
67508
67508
  } catch (err) {
67509
67509
  if (!isRetryError(err)) {
67510
67510
  return reject(err);
@@ -68389,8 +68389,8 @@ var require_helpers = __commonJS({
68389
68389
  function req(url, opts = {}) {
68390
68390
  const href = typeof url === "string" ? url : url.href;
68391
68391
  const req2 = (href.startsWith("https:") ? https : http).request(url, opts);
68392
- const promise = new Promise((resolve43, reject) => {
68393
- req2.once("response", resolve43).once("error", reject).end();
68392
+ const promise = new Promise((resolve44, reject) => {
68393
+ req2.once("response", resolve44).once("error", reject).end();
68394
68394
  });
68395
68395
  req2.then = promise.then.bind(promise);
68396
68396
  return req2;
@@ -68705,7 +68705,7 @@ var require_parse_proxy_response = __commonJS({
68705
68705
  var debug_1 = __importDefault(require_src());
68706
68706
  var debug = (0, debug_1.default)("https-proxy-agent:parse-proxy-response");
68707
68707
  function parseProxyResponse(socket) {
68708
- return new Promise((resolve43, reject) => {
68708
+ return new Promise((resolve44, reject) => {
68709
68709
  let buffersLength = 0;
68710
68710
  const buffers = [];
68711
68711
  function read() {
@@ -68775,7 +68775,7 @@ var require_parse_proxy_response = __commonJS({
68775
68775
  }
68776
68776
  debug("got proxy server response: %o %o", firstLine, headers);
68777
68777
  cleanup();
68778
- resolve43({
68778
+ resolve44({
68779
68779
  connect: {
68780
68780
  statusCode,
68781
68781
  statusText,
@@ -72601,15 +72601,15 @@ var require_socksclient = __commonJS({
72601
72601
  "use strict";
72602
72602
  var __awaiter = exports && exports.__awaiter || function(thisArg, _arguments, P, generator) {
72603
72603
  function adopt(value) {
72604
- return value instanceof P ? value : new P(function(resolve43) {
72605
- resolve43(value);
72604
+ return value instanceof P ? value : new P(function(resolve44) {
72605
+ resolve44(value);
72606
72606
  });
72607
72607
  }
72608
72608
  __name(adopt, "adopt");
72609
- return new (P || (P = Promise))(function(resolve43, reject) {
72609
+ return new (P || (P = Promise))(function(resolve44, reject) {
72610
72610
  function fulfilled(value) {
72611
72611
  try {
72612
- step(generator.next(value));
72612
+ step2(generator.next(value));
72613
72613
  } catch (e) {
72614
72614
  reject(e);
72615
72615
  }
@@ -72617,17 +72617,17 @@ var require_socksclient = __commonJS({
72617
72617
  __name(fulfilled, "fulfilled");
72618
72618
  function rejected(value) {
72619
72619
  try {
72620
- step(generator["throw"](value));
72620
+ step2(generator["throw"](value));
72621
72621
  } catch (e) {
72622
72622
  reject(e);
72623
72623
  }
72624
72624
  }
72625
72625
  __name(rejected, "rejected");
72626
- function step(result2) {
72627
- result2.done ? resolve43(result2.value) : adopt(result2.value).then(fulfilled, rejected);
72626
+ function step2(result2) {
72627
+ result2.done ? resolve44(result2.value) : adopt(result2.value).then(fulfilled, rejected);
72628
72628
  }
72629
- __name(step, "step");
72630
- step((generator = generator.apply(thisArg, _arguments || [])).next());
72629
+ __name(step2, "step");
72630
+ step2((generator = generator.apply(thisArg, _arguments || [])).next());
72631
72631
  });
72632
72632
  };
72633
72633
  Object.defineProperty(exports, "__esModule", { value: true });
@@ -72662,13 +72662,13 @@ var require_socksclient = __commonJS({
72662
72662
  * @returns { Promise }
72663
72663
  */
72664
72664
  static createConnection(options, callback) {
72665
- return new Promise((resolve43, reject) => {
72665
+ return new Promise((resolve44, reject) => {
72666
72666
  try {
72667
72667
  (0, helpers_1.validateSocksClientOptions)(options, ["connect"]);
72668
72668
  } catch (err) {
72669
72669
  if (typeof callback === "function") {
72670
72670
  callback(err);
72671
- return resolve43(err);
72671
+ return resolve44(err);
72672
72672
  } else {
72673
72673
  return reject(err);
72674
72674
  }
@@ -72679,16 +72679,16 @@ var require_socksclient = __commonJS({
72679
72679
  client.removeAllListeners();
72680
72680
  if (typeof callback === "function") {
72681
72681
  callback(null, info);
72682
- resolve43(info);
72682
+ resolve44(info);
72683
72683
  } else {
72684
- resolve43(info);
72684
+ resolve44(info);
72685
72685
  }
72686
72686
  });
72687
72687
  client.once("error", (err) => {
72688
72688
  client.removeAllListeners();
72689
72689
  if (typeof callback === "function") {
72690
72690
  callback(err);
72691
- resolve43(err);
72691
+ resolve44(err);
72692
72692
  } else {
72693
72693
  reject(err);
72694
72694
  }
@@ -72705,13 +72705,13 @@ var require_socksclient = __commonJS({
72705
72705
  * @returns { Promise }
72706
72706
  */
72707
72707
  static createConnectionChain(options, callback) {
72708
- return new Promise((resolve43, reject) => __awaiter(this, void 0, void 0, function* () {
72708
+ return new Promise((resolve44, reject) => __awaiter(this, void 0, void 0, function* () {
72709
72709
  try {
72710
72710
  (0, helpers_1.validateSocksClientChainOptions)(options);
72711
72711
  } catch (err) {
72712
72712
  if (typeof callback === "function") {
72713
72713
  callback(err);
72714
- return resolve43(err);
72714
+ return resolve44(err);
72715
72715
  } else {
72716
72716
  return reject(err);
72717
72717
  }
@@ -72737,14 +72737,14 @@ var require_socksclient = __commonJS({
72737
72737
  }
72738
72738
  if (typeof callback === "function") {
72739
72739
  callback(null, { socket: sock });
72740
- resolve43({ socket: sock });
72740
+ resolve44({ socket: sock });
72741
72741
  } else {
72742
- resolve43({ socket: sock });
72742
+ resolve44({ socket: sock });
72743
72743
  }
72744
72744
  } catch (err) {
72745
72745
  if (typeof callback === "function") {
72746
72746
  callback(err);
72747
- resolve43(err);
72747
+ resolve44(err);
72748
72748
  } else {
72749
72749
  reject(err);
72750
72750
  }
@@ -73432,12 +73432,12 @@ var require_dist7 = __commonJS({
73432
73432
  let { host } = opts;
73433
73433
  const { port, lookup: lookupFn = dns.lookup } = opts;
73434
73434
  if (shouldLookup) {
73435
- host = await new Promise((resolve43, reject) => {
73435
+ host = await new Promise((resolve44, reject) => {
73436
73436
  lookupFn(host, {}, (err, res) => {
73437
73437
  if (err) {
73438
73438
  reject(err);
73439
73439
  } else {
73440
- resolve43(res);
73440
+ resolve44(res);
73441
73441
  }
73442
73442
  });
73443
73443
  });
@@ -74294,8 +74294,8 @@ var require_entry = __commonJS({
74294
74294
  let body = null;
74295
74295
  if (this.response.status === 200) {
74296
74296
  let cacheWriteResolve, cacheWriteReject;
74297
- const cacheWritePromise = new Promise((resolve43, reject) => {
74298
- cacheWriteResolve = resolve43;
74297
+ const cacheWritePromise = new Promise((resolve44, reject) => {
74298
+ cacheWriteResolve = resolve44;
74299
74299
  cacheWriteReject = reject;
74300
74300
  }).catch((err) => {
74301
74301
  body.emit("error", err);
@@ -77288,9 +77288,9 @@ var require_lib35 = __commonJS({
77288
77288
  if (opts.shell) {
77289
77289
  return spawnWithShell(cmd, args2, opts, extra);
77290
77290
  }
77291
- let resolve43, reject;
77291
+ let resolve44, reject;
77292
77292
  const promise = new Promise((_resolve, _reject) => {
77293
- resolve43 = _resolve;
77293
+ resolve44 = _resolve;
77294
77294
  reject = _reject;
77295
77295
  });
77296
77296
  const closeError = new Error("command failed");
@@ -77323,7 +77323,7 @@ var require_lib35 = __commonJS({
77323
77323
  if (code || signal) {
77324
77324
  rejectWithOpts(closeError, { code, signal });
77325
77325
  } else {
77326
- resolve43(getResult({ code, signal }));
77326
+ resolve44(getResult({ code, signal }));
77327
77327
  }
77328
77328
  });
77329
77329
  return promise;
@@ -78304,8 +78304,8 @@ var require_lib36 = __commonJS({
78304
78304
  // ../../node_modules/.pnpm/npm-normalize-package-bin@5.0.0/node_modules/npm-normalize-package-bin/lib/index.js
78305
78305
  var require_lib37 = __commonJS({
78306
78306
  "../../node_modules/.pnpm/npm-normalize-package-bin@5.0.0/node_modules/npm-normalize-package-bin/lib/index.js"(exports, module) {
78307
- var { join: join50, basename: basename20 } = __require("path");
78308
- var normalize6 = /* @__PURE__ */ __name((pkg) => !pkg.bin ? removeBin(pkg) : typeof pkg.bin === "string" ? normalizeString(pkg) : Array.isArray(pkg.bin) ? normalizeArray(pkg) : typeof pkg.bin === "object" ? normalizeObject(pkg) : removeBin(pkg), "normalize");
78307
+ var { join: join50, basename: basename21 } = __require("path");
78308
+ var normalize8 = /* @__PURE__ */ __name((pkg) => !pkg.bin ? removeBin(pkg) : typeof pkg.bin === "string" ? normalizeString(pkg) : Array.isArray(pkg.bin) ? normalizeArray(pkg) : typeof pkg.bin === "object" ? normalizeObject(pkg) : removeBin(pkg), "normalize");
78309
78309
  var normalizeString = /* @__PURE__ */ __name((pkg) => {
78310
78310
  if (!pkg.name) {
78311
78311
  return removeBin(pkg);
@@ -78315,7 +78315,7 @@ var require_lib37 = __commonJS({
78315
78315
  }, "normalizeString");
78316
78316
  var normalizeArray = /* @__PURE__ */ __name((pkg) => {
78317
78317
  pkg.bin = pkg.bin.reduce((acc, k) => {
78318
- acc[basename20(k)] = k;
78318
+ acc[basename21(k)] = k;
78319
78319
  return acc;
78320
78320
  }, {});
78321
78321
  return normalizeObject(pkg);
@@ -78329,7 +78329,7 @@ var require_lib37 = __commonJS({
78329
78329
  const clean = {};
78330
78330
  let hasBins = false;
78331
78331
  Object.keys(orig).forEach((binKey) => {
78332
- const base = join50("/", basename20(binKey.replace(/\\|:/g, "/"))).slice(1);
78332
+ const base = join50("/", basename21(binKey.replace(/\\|:/g, "/"))).slice(1);
78333
78333
  if (typeof orig[binKey] !== "string" || !base) {
78334
78334
  return;
78335
78335
  }
@@ -78347,7 +78347,7 @@ var require_lib37 = __commonJS({
78347
78347
  }
78348
78348
  return pkg;
78349
78349
  }, "normalizeObject");
78350
- module.exports = normalize6;
78350
+ module.exports = normalize8;
78351
78351
  }
78352
78352
  });
78353
78353
 
@@ -78643,13 +78643,13 @@ var require_is = __commonJS({
78643
78643
  var require_find = __commonJS({
78644
78644
  "../../node_modules/.pnpm/@npmcli+git@7.0.2/node_modules/@npmcli/git/lib/find.js"(exports, module) {
78645
78645
  var is = require_is();
78646
- var { dirname: dirname27 } = __require("path");
78646
+ var { dirname: dirname28 } = __require("path");
78647
78647
  module.exports = async ({ cwd = process.cwd(), root } = {}) => {
78648
78648
  while (true) {
78649
78649
  if (await is({ cwd })) {
78650
78650
  return cwd;
78651
78651
  }
78652
- const next = dirname27(cwd);
78652
+ const next = dirname28(cwd);
78653
78653
  if (cwd === root || cwd === next) {
78654
78654
  return null;
78655
78655
  }
@@ -79162,19 +79162,19 @@ var require_normalize = __commonJS({
79162
79162
  }
79163
79163
  }
79164
79164
  __name(asyncSteps, "asyncSteps");
79165
- async function normalize6(pkg, opts) {
79165
+ async function normalize8(pkg, opts) {
79166
79166
  if (!pkg.content) {
79167
79167
  throw new Error("Can not normalize without content");
79168
79168
  }
79169
79169
  await asyncSteps(pkg, opts);
79170
79170
  syncSteps(pkg, opts);
79171
79171
  }
79172
- __name(normalize6, "normalize");
79172
+ __name(normalize8, "normalize");
79173
79173
  function syncNormalize(pkg, opts) {
79174
79174
  syncSteps(pkg, opts);
79175
79175
  }
79176
79176
  __name(syncNormalize, "syncNormalize");
79177
- module.exports = { normalize: normalize6, syncNormalize };
79177
+ module.exports = { normalize: normalize8, syncNormalize };
79178
79178
  }
79179
79179
  });
79180
79180
 
@@ -79319,12 +79319,12 @@ var require_sort2 = __commonJS({
79319
79319
  var require_lib40 = __commonJS({
79320
79320
  "../../node_modules/.pnpm/@npmcli+package-json@7.0.5/node_modules/@npmcli/package-json/lib/index.js"(exports, module) {
79321
79321
  var { readFile: readFile58, writeFile: writeFile16 } = __require("node:fs/promises");
79322
- var { resolve: resolve43 } = __require("node:path");
79322
+ var { resolve: resolve44 } = __require("node:path");
79323
79323
  var parseJSON = require_lib33();
79324
79324
  var updateDeps = require_update_dependencies();
79325
79325
  var updateScripts = require_update_scripts();
79326
79326
  var updateWorkspaces = require_update_workspaces();
79327
- var { normalize: normalize6, syncNormalize } = require_normalize();
79327
+ var { normalize: normalize8, syncNormalize } = require_normalize();
79328
79328
  var { read, parse: parse2 } = require_read_package();
79329
79329
  var { packageSort } = require_sort2();
79330
79330
  var knownSteps = /* @__PURE__ */ new Set([
@@ -79441,7 +79441,7 @@ var require_lib40 = __commonJS({
79441
79441
  parseErr = err;
79442
79442
  }
79443
79443
  if (parseErr) {
79444
- const indexFile = resolve43(this.path, "index.js");
79444
+ const indexFile = resolve44(this.path, "index.js");
79445
79445
  let indexFileContent;
79446
79446
  try {
79447
79447
  indexFileContent = await readFile58(indexFile, "utf8");
@@ -79497,7 +79497,7 @@ var require_lib40 = __commonJS({
79497
79497
  }
79498
79498
  get filename() {
79499
79499
  if (this.path) {
79500
- return resolve43(this.path, "package.json");
79500
+ return resolve44(this.path, "package.json");
79501
79501
  }
79502
79502
  return void 0;
79503
79503
  }
@@ -79511,8 +79511,8 @@ var require_lib40 = __commonJS({
79511
79511
  if (!this.content) {
79512
79512
  throw new Error("Can not update without content. Please `load` or `create`");
79513
79513
  }
79514
- for (const step of knownSteps) {
79515
- this.#manifest = step({ content, originalContent: this.content });
79514
+ for (const step2 of knownSteps) {
79515
+ this.#manifest = step2({ content, originalContent: this.content });
79516
79516
  }
79517
79517
  for (const [key, value] of Object.entries(content)) {
79518
79518
  if (!knownKeys.has(key)) {
@@ -79551,19 +79551,19 @@ var require_lib40 = __commonJS({
79551
79551
  if (!opts.steps) {
79552
79552
  opts.steps = this.constructor.normalizeSteps;
79553
79553
  }
79554
- await normalize6(this, opts);
79554
+ await normalize8(this, opts);
79555
79555
  return this;
79556
79556
  }
79557
79557
  async prepare(opts = {}) {
79558
79558
  if (!opts.steps) {
79559
79559
  opts.steps = this.constructor.prepareSteps;
79560
79560
  }
79561
- await normalize6(this, opts);
79561
+ await normalize8(this, opts);
79562
79562
  return this;
79563
79563
  }
79564
79564
  async fix(opts = {}) {
79565
79565
  opts.steps = this.constructor.fixSteps;
79566
- await normalize6(this, opts);
79566
+ await normalize8(this, opts);
79567
79567
  return this;
79568
79568
  }
79569
79569
  };
@@ -89128,12 +89128,12 @@ var require_fetcher = __commonJS({
89128
89128
  };
89129
89129
  exports.DefaultFetcher = DefaultFetcher;
89130
89130
  var writeBufferToStream = /* @__PURE__ */ __name(async (stream, buffer) => {
89131
- return new Promise((resolve43, reject) => {
89131
+ return new Promise((resolve44, reject) => {
89132
89132
  stream.write(buffer, (err) => {
89133
89133
  if (err) {
89134
89134
  reject(err);
89135
89135
  }
89136
- resolve43(true);
89136
+ resolve44(true);
89137
89137
  });
89138
89138
  });
89139
89139
  }, "writeBufferToStream");
@@ -89838,7 +89838,7 @@ var require_target = __commonJS({
89838
89838
  var error_1 = require_error9();
89839
89839
  async function readTarget(tuf, targetPath2) {
89840
89840
  const path40 = await getTargetPath(tuf, targetPath2);
89841
- return new Promise((resolve43, reject) => {
89841
+ return new Promise((resolve44, reject) => {
89842
89842
  fs_1.default.readFile(path40, "utf-8", (err, data) => {
89843
89843
  if (err) {
89844
89844
  reject(new error_1.TUFError({
@@ -89847,7 +89847,7 @@ var require_target = __commonJS({
89847
89847
  cause: err
89848
89848
  }));
89849
89849
  } else {
89850
- resolve43(data);
89850
+ resolve44(data);
89851
89851
  }
89852
89852
  });
89853
89853
  });
@@ -96280,12 +96280,12 @@ var require_body2 = __commonJS({
96280
96280
  if (resTimeout && resTimeout.unref) {
96281
96281
  resTimeout.unref();
96282
96282
  }
96283
- return new Promise((resolve43) => {
96283
+ return new Promise((resolve44) => {
96284
96284
  if (stream !== upstream) {
96285
96285
  upstream.on("error", (er) => stream.emit("error", er));
96286
96286
  upstream.pipe(stream);
96287
96287
  }
96288
- resolve43();
96288
+ resolve44();
96289
96289
  }).then(() => stream.concat()).then((buf) => {
96290
96290
  clearTimeout(resTimeout);
96291
96291
  return buf;
@@ -97050,7 +97050,7 @@ var require_lib44 = __commonJS({
97050
97050
  var fetch = /* @__PURE__ */ __name(async (url, opts) => {
97051
97051
  if (/^data:/.test(url)) {
97052
97052
  const request = new Request(url, opts);
97053
- return Promise.resolve().then(() => new Promise((resolve43, reject) => {
97053
+ return Promise.resolve().then(() => new Promise((resolve44, reject) => {
97054
97054
  let type, data;
97055
97055
  try {
97056
97056
  const { pathname, search } = new URL2(url);
@@ -97074,10 +97074,10 @@ var require_lib44 = __commonJS({
97074
97074
  if (type) {
97075
97075
  headers["Content-Type"] = type;
97076
97076
  }
97077
- return resolve43(new Response(data, { headers }));
97077
+ return resolve44(new Response(data, { headers }));
97078
97078
  }));
97079
97079
  }
97080
- return new Promise((resolve43, reject) => {
97080
+ return new Promise((resolve44, reject) => {
97081
97081
  const request = new Request(url, opts);
97082
97082
  let options;
97083
97083
  try {
@@ -97196,7 +97196,7 @@ var require_lib44 = __commonJS({
97196
97196
  requestOpts.body = void 0;
97197
97197
  requestOpts.headers.delete("content-length");
97198
97198
  }
97199
- resolve43(fetch(new Request(locationURL, requestOpts)));
97199
+ resolve44(fetch(new Request(locationURL, requestOpts)));
97200
97200
  finalize();
97201
97201
  return;
97202
97202
  }
@@ -97224,7 +97224,7 @@ var require_lib44 = __commonJS({
97224
97224
  const codings = headers.get("Content-Encoding");
97225
97225
  if (!request.compress || request.method === "HEAD" || codings === null || res.statusCode === 204 || res.statusCode === 304) {
97226
97226
  response = new Response(body, responseOptions);
97227
- resolve43(response);
97227
+ resolve44(response);
97228
97228
  return;
97229
97229
  }
97230
97230
  const zlibOptions = {
@@ -97243,7 +97243,7 @@ var require_lib44 = __commonJS({
97243
97243
  ).pipe(unzip),
97244
97244
  responseOptions
97245
97245
  );
97246
- resolve43(response);
97246
+ resolve44(response);
97247
97247
  return;
97248
97248
  }
97249
97249
  if (codings === "deflate" || codings === "x-deflate") {
@@ -97255,7 +97255,7 @@ var require_lib44 = __commonJS({
97255
97255
  (er) => decoder3.emit("error", er)
97256
97256
  ).pipe(decoder3);
97257
97257
  response = new Response(decoder3, responseOptions);
97258
- resolve43(response);
97258
+ resolve44(response);
97259
97259
  });
97260
97260
  return;
97261
97261
  }
@@ -97273,11 +97273,11 @@ var require_lib44 = __commonJS({
97273
97273
  (er) => decoder2.emit("error", er)
97274
97274
  ).pipe(decoder2);
97275
97275
  response = new Response(decoder2, responseOptions);
97276
- resolve43(response);
97276
+ resolve44(response);
97277
97277
  return;
97278
97278
  }
97279
97279
  response = new Response(body, responseOptions);
97280
- resolve43(response);
97280
+ resolve44(response);
97281
97281
  });
97282
97282
  writeToStream(req, request);
97283
97283
  });
@@ -97531,12 +97531,12 @@ var require_lib45 = __commonJS({
97531
97531
  return process.emit("input", "end");
97532
97532
  }, "end"),
97533
97533
  read: /* @__PURE__ */ __name(function(...args2) {
97534
- let resolve43, reject;
97534
+ let resolve44, reject;
97535
97535
  const promise = new Promise((_resolve, _reject) => {
97536
- resolve43 = _resolve;
97536
+ resolve44 = _resolve;
97537
97537
  reject = _reject;
97538
97538
  });
97539
- process.emit("input", "read", resolve43, reject, ...args2);
97539
+ process.emit("input", "read", resolve44, reject, ...args2);
97540
97540
  return promise;
97541
97541
  }, "read")
97542
97542
  }
@@ -99945,7 +99945,7 @@ var require_npa2 = __commonJS({
99945
99945
  spec = arg;
99946
99946
  }
99947
99947
  }
99948
- return resolve43(name, spec, where, arg);
99948
+ return resolve44(name, spec, where, arg);
99949
99949
  }
99950
99950
  __name(npa, "npa");
99951
99951
  function isFileSpec(spec) {
@@ -99968,7 +99968,7 @@ var require_npa2 = __commonJS({
99968
99968
  return spec.toLowerCase().startsWith("npm:");
99969
99969
  }
99970
99970
  __name(isAliasSpec, "isAliasSpec");
99971
- function resolve43(name, spec, where, arg) {
99971
+ function resolve44(name, spec, where, arg) {
99972
99972
  const res = new Result({
99973
99973
  raw: arg,
99974
99974
  name,
@@ -100000,7 +100000,7 @@ var require_npa2 = __commonJS({
100000
100000
  return fromRegistry(res);
100001
100001
  }
100002
100002
  }
100003
- __name(resolve43, "resolve");
100003
+ __name(resolve44, "resolve");
100004
100004
  function toPurl(arg, reg = defaultRegistry) {
100005
100005
  const res = npa(arg);
100006
100006
  if (res.type !== "version") {
@@ -100301,7 +100301,7 @@ var require_npa2 = __commonJS({
100301
100301
  }
100302
100302
  __name(fromRegistry, "fromRegistry");
100303
100303
  module.exports = npa;
100304
- module.exports.resolve = resolve43;
100304
+ module.exports.resolve = resolve44;
100305
100305
  module.exports.toPurl = toPurl;
100306
100306
  module.exports.Result = Result;
100307
100307
  }
@@ -100875,7 +100875,7 @@ var require_lib49 = __commonJS({
100875
100875
  module.exports.fromStream = fromStream;
100876
100876
  function fromStream(stream, opts) {
100877
100877
  const istream = integrityStream(opts);
100878
- return new Promise((resolve43, reject) => {
100878
+ return new Promise((resolve44, reject) => {
100879
100879
  stream.pipe(istream);
100880
100880
  stream.on("error", reject);
100881
100881
  istream.on("error", reject);
@@ -100883,7 +100883,7 @@ var require_lib49 = __commonJS({
100883
100883
  istream.on("integrity", (s) => {
100884
100884
  sri = s;
100885
100885
  });
100886
- istream.on("end", () => resolve43(sri));
100886
+ istream.on("end", () => resolve44(sri));
100887
100887
  istream.resume();
100888
100888
  });
100889
100889
  }
@@ -100944,7 +100944,7 @@ var require_lib49 = __commonJS({
100944
100944
  ));
100945
100945
  }
100946
100946
  const checker = integrityStream(opts);
100947
- return new Promise((resolve43, reject) => {
100947
+ return new Promise((resolve44, reject) => {
100948
100948
  stream.pipe(checker);
100949
100949
  stream.on("error", reject);
100950
100950
  checker.on("error", reject);
@@ -100952,7 +100952,7 @@ var require_lib49 = __commonJS({
100952
100952
  checker.on("verified", (s) => {
100953
100953
  verified = s;
100954
100954
  });
100955
- checker.on("end", () => resolve43(verified));
100955
+ checker.on("end", () => resolve44(verified));
100956
100956
  checker.resume();
100957
100957
  });
100958
100958
  }
@@ -101515,11 +101515,11 @@ var require_polyfill2 = __commonJS({
101515
101515
  utimes
101516
101516
  } = __require("fs/promises");
101517
101517
  var {
101518
- dirname: dirname27,
101519
- isAbsolute: isAbsolute32,
101518
+ dirname: dirname28,
101519
+ isAbsolute: isAbsolute34,
101520
101520
  join: join50,
101521
101521
  parse: parse2,
101522
- resolve: resolve43,
101522
+ resolve: resolve44,
101523
101523
  sep: sep11,
101524
101524
  toNamespacedPath
101525
101525
  } = __require("path");
@@ -101619,7 +101619,7 @@ var require_polyfill2 = __commonJS({
101619
101619
  }
101620
101620
  __name(getStats, "getStats");
101621
101621
  async function checkParentDir(destStat, src, dest, opts) {
101622
- const destParent = dirname27(dest);
101622
+ const destParent = dirname28(dest);
101623
101623
  const dirExists = await pathExists2(destParent);
101624
101624
  if (dirExists) {
101625
101625
  return getStatsForCopy(destStat, src, dest, opts);
@@ -101637,8 +101637,8 @@ var require_polyfill2 = __commonJS({
101637
101637
  }
101638
101638
  __name(pathExists2, "pathExists");
101639
101639
  async function checkParentPaths(src, srcStat, dest) {
101640
- const srcParent = resolve43(dirname27(src));
101641
- const destParent = resolve43(dirname27(dest));
101640
+ const srcParent = resolve44(dirname28(src));
101641
+ const destParent = resolve44(dirname28(dest));
101642
101642
  if (destParent === srcParent || destParent === parse2(destParent).root) {
101643
101643
  return;
101644
101644
  }
@@ -101662,7 +101662,7 @@ var require_polyfill2 = __commonJS({
101662
101662
  return checkParentPaths(src, srcStat, destParent);
101663
101663
  }
101664
101664
  __name(checkParentPaths, "checkParentPaths");
101665
- var normalizePathToArray = /* @__PURE__ */ __name((path40) => resolve43(path40).split(sep11).filter(Boolean), "normalizePathToArray");
101665
+ var normalizePathToArray = /* @__PURE__ */ __name((path40) => resolve44(path40).split(sep11).filter(Boolean), "normalizePathToArray");
101666
101666
  function isSrcSubdir(src, dest) {
101667
101667
  const srcArr = normalizePathToArray(src);
101668
101668
  const destArr = normalizePathToArray(dest);
@@ -101807,8 +101807,8 @@ var require_polyfill2 = __commonJS({
101807
101807
  __name(copyDir, "copyDir");
101808
101808
  async function onLink(destStat, src, dest) {
101809
101809
  let resolvedSrc = await readlink4(src);
101810
- if (!isAbsolute32(resolvedSrc)) {
101811
- resolvedSrc = resolve43(dirname27(src), resolvedSrc);
101810
+ if (!isAbsolute34(resolvedSrc)) {
101811
+ resolvedSrc = resolve44(dirname28(src), resolvedSrc);
101812
101812
  }
101813
101813
  if (!destStat) {
101814
101814
  return symlink(resolvedSrc, dest);
@@ -101822,8 +101822,8 @@ var require_polyfill2 = __commonJS({
101822
101822
  }
101823
101823
  throw err;
101824
101824
  }
101825
- if (!isAbsolute32(resolvedDest)) {
101826
- resolvedDest = resolve43(dirname27(dest), resolvedDest);
101825
+ if (!isAbsolute34(resolvedDest)) {
101826
+ resolvedDest = resolve44(dirname28(dest), resolvedDest);
101827
101827
  }
101828
101828
  if (isSrcSubdir(resolvedSrc, resolvedDest)) {
101829
101829
  throw new ERR_FS_CP_EINVAL({
@@ -101929,7 +101929,7 @@ var require_readdir_scoped2 = __commonJS({
101929
101929
  // ../../node_modules/.pnpm/@npmcli+fs@4.0.0/node_modules/@npmcli/fs/lib/move-file.js
101930
101930
  var require_move_file2 = __commonJS({
101931
101931
  "../../node_modules/.pnpm/@npmcli+fs@4.0.0/node_modules/@npmcli/fs/lib/move-file.js"(exports, module) {
101932
- var { dirname: dirname27, join: join50, resolve: resolve43, relative: relative35, isAbsolute: isAbsolute32 } = __require("path");
101932
+ var { dirname: dirname28, join: join50, resolve: resolve44, relative: relative35, isAbsolute: isAbsolute34 } = __require("path");
101933
101933
  var fs = __require("fs/promises");
101934
101934
  var pathExists2 = /* @__PURE__ */ __name(async (path40) => {
101935
101935
  try {
@@ -101950,7 +101950,7 @@ var require_move_file2 = __commonJS({
101950
101950
  if (!options.overwrite && await pathExists2(destination)) {
101951
101951
  throw new Error(`The destination file exists: ${destination}`);
101952
101952
  }
101953
- await fs.mkdir(dirname27(destination), { recursive: true });
101953
+ await fs.mkdir(dirname28(destination), { recursive: true });
101954
101954
  try {
101955
101955
  await fs.rename(source, destination);
101956
101956
  } catch (error) {
@@ -101973,12 +101973,12 @@ var require_move_file2 = __commonJS({
101973
101973
  if (root) {
101974
101974
  await Promise.all(symlinks.map(async ({ source: symSource, destination: symDestination }) => {
101975
101975
  let target = await fs.readlink(symSource);
101976
- if (isAbsolute32(target)) {
101977
- target = resolve43(symDestination, relative35(symSource, target));
101976
+ if (isAbsolute34(target)) {
101977
+ target = resolve44(symDestination, relative35(symSource, target));
101978
101978
  }
101979
101979
  let targetStat = "file";
101980
101980
  try {
101981
- targetStat = await fs.stat(resolve43(dirname27(symSource), target));
101981
+ targetStat = await fs.stat(resolve44(dirname28(symSource), target));
101982
101982
  if (targetStat.isDirectory()) {
101983
101983
  targetStat = "junction";
101984
101984
  }
@@ -104920,7 +104920,7 @@ var require_commonjs9 = __commonJS({
104920
104920
  var TYPEMASK = 1023;
104921
104921
  var entToType = /* @__PURE__ */ __name((s) => s.isFile() ? IFREG : s.isDirectory() ? IFDIR : s.isSymbolicLink() ? IFLNK : s.isCharacterDevice() ? IFCHR : s.isBlockDevice() ? IFBLK : s.isSocket() ? IFSOCK : s.isFIFO() ? IFIFO : UNKNOWN, "entToType");
104922
104922
  var normalizeCache = /* @__PURE__ */ new Map();
104923
- var normalize6 = /* @__PURE__ */ __name((s) => {
104923
+ var normalize8 = /* @__PURE__ */ __name((s) => {
104924
104924
  const c = normalizeCache.get(s);
104925
104925
  if (c)
104926
104926
  return c;
@@ -104933,7 +104933,7 @@ var require_commonjs9 = __commonJS({
104933
104933
  const c = normalizeNocaseCache.get(s);
104934
104934
  if (c)
104935
104935
  return c;
104936
- const n = normalize6(s.toLowerCase());
104936
+ const n = normalize8(s.toLowerCase());
104937
104937
  normalizeNocaseCache.set(s, n);
104938
104938
  return n;
104939
104939
  }, "normalizeNocase");
@@ -105111,7 +105111,7 @@ var require_commonjs9 = __commonJS({
105111
105111
  */
105112
105112
  constructor(name, type = UNKNOWN, root, roots, nocase, children, opts) {
105113
105113
  this.name = name;
105114
- this.#matchName = nocase ? normalizeNocase(name) : normalize6(name);
105114
+ this.#matchName = nocase ? normalizeNocase(name) : normalize8(name);
105115
105115
  this.#type = type & TYPEMASK;
105116
105116
  this.nocase = nocase;
105117
105117
  this.roots = roots;
@@ -105204,7 +105204,7 @@ var require_commonjs9 = __commonJS({
105204
105204
  return this.parent || this;
105205
105205
  }
105206
105206
  const children = this.children();
105207
- const name = this.nocase ? normalizeNocase(pathPart) : normalize6(pathPart);
105207
+ const name = this.nocase ? normalizeNocase(pathPart) : normalize8(pathPart);
105208
105208
  for (const p of children) {
105209
105209
  if (p.#matchName === name) {
105210
105210
  return p;
@@ -105449,7 +105449,7 @@ var require_commonjs9 = __commonJS({
105449
105449
  * directly.
105450
105450
  */
105451
105451
  isNamed(n) {
105452
- return !this.nocase ? this.#matchName === normalize6(n) : this.#matchName === normalizeNocase(n);
105452
+ return !this.nocase ? this.#matchName === normalize8(n) : this.#matchName === normalizeNocase(n);
105453
105453
  }
105454
105454
  /**
105455
105455
  * Return the Path object corresponding to the target of a symbolic link.
@@ -105588,7 +105588,7 @@ var require_commonjs9 = __commonJS({
105588
105588
  #readdirMaybePromoteChild(e, c) {
105589
105589
  for (let p = c.provisional; p < c.length; p++) {
105590
105590
  const pchild = c[p];
105591
- const name = this.nocase ? normalizeNocase(e.name) : normalize6(e.name);
105591
+ const name = this.nocase ? normalizeNocase(e.name) : normalize8(e.name);
105592
105592
  if (name !== pchild.#matchName) {
105593
105593
  continue;
105594
105594
  }
@@ -105757,9 +105757,9 @@ var require_commonjs9 = __commonJS({
105757
105757
  if (this.#asyncReaddirInFlight) {
105758
105758
  await this.#asyncReaddirInFlight;
105759
105759
  } else {
105760
- let resolve43 = /* @__PURE__ */ __name(() => {
105760
+ let resolve44 = /* @__PURE__ */ __name(() => {
105761
105761
  }, "resolve");
105762
- this.#asyncReaddirInFlight = new Promise((res) => resolve43 = res);
105762
+ this.#asyncReaddirInFlight = new Promise((res) => resolve44 = res);
105763
105763
  try {
105764
105764
  for (const e of await this.#fs.promises.readdir(fullpath, {
105765
105765
  withFileTypes: true
@@ -105772,7 +105772,7 @@ var require_commonjs9 = __commonJS({
105772
105772
  children.provisional = 0;
105773
105773
  }
105774
105774
  this.#asyncReaddirInFlight = void 0;
105775
- resolve43();
105775
+ resolve44();
105776
105776
  }
105777
105777
  return children.slice(0, children.provisional);
105778
105778
  }
@@ -107936,10 +107936,10 @@ var require_verify3 = __commonJS({
107936
107936
  markEndTime
107937
107937
  ];
107938
107938
  const stats = {};
107939
- for (const step of steps) {
107940
- const label = step.name;
107939
+ for (const step2 of steps) {
107940
+ const label = step2.name;
107941
107941
  const start = /* @__PURE__ */ new Date();
107942
- const s = await step(cache, opts);
107942
+ const s = await step2(cache, opts);
107943
107943
  if (s) {
107944
107944
  Object.keys(s).forEach((k) => {
107945
107945
  stats[k] = s[k];
@@ -107990,8 +107990,8 @@ var require_verify3 = __commonJS({
107990
107990
  liveContent.add(integrity[algo].toString());
107991
107991
  }
107992
107992
  });
107993
- await new Promise((resolve43, reject) => {
107994
- indexStream.on("end", resolve43).on("error", reject);
107993
+ await new Promise((resolve44, reject) => {
107994
+ indexStream.on("end", resolve44).on("error", reject);
107995
107995
  });
107996
107996
  const contentDir = contentPath.contentDir(cache);
107997
107997
  const files = await glob(path40.join(contentDir, "**"), {
@@ -108547,7 +108547,7 @@ var require_promise_retry = __commonJS({
108547
108547
  fn = temp;
108548
108548
  }
108549
108549
  operation = retry.operation(options);
108550
- return new Promise(function(resolve43, reject) {
108550
+ return new Promise(function(resolve44, reject) {
108551
108551
  operation.attempt(function(number) {
108552
108552
  Promise.resolve().then(function() {
108553
108553
  return fn(function(err) {
@@ -108556,7 +108556,7 @@ var require_promise_retry = __commonJS({
108556
108556
  }
108557
108557
  throw errcode(new Error("Retrying"), "EPROMISERETRY", { retried: err });
108558
108558
  }, number);
108559
- }).then(resolve43, function(err) {
108559
+ }).then(resolve44, function(err) {
108560
108560
  if (isRetryError(err)) {
108561
108561
  err = err.retried;
108562
108562
  if (operation.retry(err || new Error())) {
@@ -109449,8 +109449,8 @@ var require_entry4 = __commonJS({
109449
109449
  let body = null;
109450
109450
  if (this.response.status === 200) {
109451
109451
  let cacheWriteResolve, cacheWriteReject;
109452
- const cacheWritePromise = new Promise((resolve43, reject) => {
109453
- cacheWriteResolve = resolve43;
109452
+ const cacheWritePromise = new Promise((resolve44, reject) => {
109453
+ cacheWriteResolve = resolve44;
109454
109454
  cacheWriteReject = reject;
109455
109455
  }).catch((err) => {
109456
109456
  body.emit("error", err);
@@ -118375,6 +118375,7 @@ function buildAssessmentReport({
118375
118375
  findings,
118376
118376
  hookDurations,
118377
118377
  gateSuggestions,
118378
+ gateDiagnostics = [],
118378
118379
  next = null
118379
118380
  }) {
118380
118381
  const sortedFindings = [...findings].sort((a, b) => (CATEGORY_RANK[a.category] ?? 9) - (CATEGORY_RANK[b.category] ?? 9) || a.code.localeCompare(b.code) || (a.fieldPath ?? "").localeCompare(b.fieldPath ?? "") || (a.unitId ?? "").localeCompare(b.unitId ?? ""));
@@ -118420,6 +118421,7 @@ function buildAssessmentReport({
118420
118421
  findings: sortedFindings,
118421
118422
  hookDurations,
118422
118423
  gateSuggestions,
118424
+ gateDiagnostics,
118423
118425
  workflowPrerequisites,
118424
118426
  unobserved,
118425
118427
  next,
@@ -118449,7 +118451,7 @@ function renderSummary({ config, status, findings, topology, gateSuggestions, ne
118449
118451
  }
118450
118452
  }
118451
118453
  if (gateSuggestions.length > 0) {
118452
- lines.push(`gate \u5019\u9009\u5EFA\u8BAE ${gateSuggestions.length} \u6761\uFF08\u9700\u4EBA\u5DE5\u786E\u8BA4\uFF0C\u672A\u5199\u5165\u914D\u7F6E\uFF09`);
118454
+ lines.push(`\u53EF\u6267\u884C gate \u8349\u6848 ${gateSuggestions.length} \u6761\uFF08\u9700\u4EBA\u5DE5\u786E\u8BA4\uFF0C\u672A\u5199\u5165\u914D\u7F6E\uFF09`);
118453
118455
  }
118454
118456
  if (next) {
118455
118457
  lines.push(`\u4E0B\u4E00\u6B65: ${next}`);
@@ -121985,6 +121987,7 @@ async function reportNotConfigured(root, configPath) {
121985
121987
  findings: [],
121986
121988
  hookDurations: [],
121987
121989
  gateSuggestions: [],
121990
+ gateDiagnostics: [],
121988
121991
  workflowPrerequisites: {
121989
121992
  full: { met: false, note: "\u7F3A\u5C11 .release-skill/project.yaml\uFF1B\u5148\u5B8C\u6210\u9996\u6B21 setup\u3002" },
121990
121993
  docs: { met: false, note: "\u7F3A\u5C11\u914D\u7F6E\uFF1Bdocs-only \u5DE5\u4F5C\u6D41\u5206\u7C7B\u7531 release-route \u51B3\u5B9A\u3002" },
@@ -122072,6 +122075,7 @@ async function reportConfigLoadError(root, configPath, error) {
122072
122075
  findings,
122073
122076
  hookDurations: [],
122074
122077
  gateSuggestions: [],
122078
+ gateDiagnostics: [],
122075
122079
  workflowPrerequisites: {
122076
122080
  full: { met: false, note: "\u914D\u7F6E\u65E0\u6CD5\u901A\u8FC7\u6821\u9A8C\u3002" },
122077
122081
  docs: { met: false, note: "\u914D\u7F6E\u65E0\u6CD5\u901A\u8FC7\u6821\u9A8C\u3002" },
@@ -122432,7 +122436,10 @@ async function assessAdoption({ root } = {}) {
122432
122436
  findings.push(...deriveLongHookSuggestions(hookDurations));
122433
122437
  findings.push(derivePreHookPublicSurfaceFinding({ config, hookDurations }));
122434
122438
  findings.push(...deriveCheckOnlySuggestions(config.hooks));
122435
- const gateSuggestions = deriveGateSuggestions({ declaredUnits, candidates });
122439
+ const configuredGateIds = new Set((config.verificationGates ?? []).map((gate) => gate.id));
122440
+ const unconfiguredGateAssessments = deriveGateSuggestions({ declaredUnits, candidates }).filter((entry) => !configuredGateIds.has(entry.id));
122441
+ const gateSuggestions = unconfiguredGateAssessments.filter((entry) => entry.draft !== null);
122442
+ const gateDiagnostics = unconfiguredGateAssessments.filter((entry) => entry.draft === null);
122436
122443
  const hasBlocking = findings.some((f) => f.category === FINDING_CATEGORY.MANDATORY_GAP);
122437
122444
  const next = hasBlocking ? "\u4FEE\u590D\u5168\u90E8\u5FC5\u9009\u7F3A\u53E3\u540E\u91CD\u65B0\u8FD0\u884C release-skill setup --assess-adoption\u3002" : null;
122438
122445
  return buildAssessmentReport({
@@ -122443,6 +122450,7 @@ async function assessAdoption({ root } = {}) {
122443
122450
  findings,
122444
122451
  hookDurations,
122445
122452
  gateSuggestions,
122453
+ gateDiagnostics,
122446
122454
  next
122447
122455
  });
122448
122456
  }
@@ -131517,7 +131525,7 @@ function collectPostPublishCommandCandidates(postPublish) {
131517
131525
  }
131518
131526
  }, "visit");
131519
131527
  visit2("materialize", postPublish.materialize?.command);
131520
- for (const step of postPublish.steps ?? []) visit2(`steps[${step.name}]`, step.command);
131528
+ for (const step2 of postPublish.steps ?? []) visit2(`steps[${step2.name}]`, step2.command);
131521
131529
  for (const hook of postPublish.hooks ?? []) {
131522
131530
  if (Array.isArray(hook.command)) visit2(`hooks[${hook.id}]`, hook.command);
131523
131531
  }
@@ -134549,16 +134557,18 @@ __export(post_release_local_exports, {
134549
134557
  assertLocalFinishRun: () => assertLocalFinishRun,
134550
134558
  assertVerifiedReleaseRun: () => assertVerifiedReleaseRun,
134551
134559
  derivePostReleaseChecklist: () => derivePostReleaseChecklist,
134560
+ runLocalFinishCommand: () => defaultRun,
134552
134561
  unavailablePostReleaseChecklist: () => unavailablePostReleaseChecklist,
134553
134562
  updateLocalHostPlugins: () => updateLocalHostPlugins
134554
134563
  });
134555
134564
  import { access as access2, readFile as readFile38, mkdir as mkdir23, mkdtemp as mkdtemp7, cp as cp2, rename as rename5, rm as rm11, lstat as lstat44, realpath as realpath32, chmod as chmod5 } from "node:fs/promises";
134556
134565
  import { homedir } from "node:os";
134557
134566
  import { join as join29, relative as relative29, isAbsolute as isAbsolute26, normalize as normalize5 } from "node:path";
134558
- function attachFoundationFailure(error, { envelope, stdout }) {
134567
+ function attachFoundationFailure(error, { envelope, stdout, stderr }) {
134559
134568
  Object.defineProperties(error, {
134560
134569
  foundationEnvelope: { value: envelope, enumerable: false },
134561
- foundationStdout: { value: stdout, enumerable: false }
134570
+ foundationStdout: { value: stdout, enumerable: false },
134571
+ foundationStderr: { value: stderr, enumerable: false }
134562
134572
  });
134563
134573
  return error;
134564
134574
  }
@@ -134681,6 +134691,7 @@ function hubTargets(plan) {
134681
134691
  unitId: declaration.unitId,
134682
134692
  host,
134683
134693
  plugin: local.plugin,
134694
+ version: unit?.targetVersion,
134684
134695
  hub,
134685
134696
  message: `${manualInstruction[host]} Install or upgrade ${local.plugin} from Hub ${hub.name}; release-skill does not execute or probe this action.`,
134686
134697
  ...unit?.publicRepo ? { publicRepo: unit.publicRepo } : {},
@@ -134776,9 +134787,26 @@ function buildShipNextStep({ root, statePath, unitIds }) {
134776
134787
  argv
134777
134788
  };
134778
134789
  }
134790
+ function buildFinishCommand({ root, planPath, runPath }) {
134791
+ if (![root, planPath, runPath].every((value) => typeof value === "string" && value.length > 0)) return void 0;
134792
+ return {
134793
+ argv: [
134794
+ "release-skill",
134795
+ "post-release",
134796
+ "--root",
134797
+ root,
134798
+ "--plan",
134799
+ planPath,
134800
+ "--run",
134801
+ runPath,
134802
+ "--finish"
134803
+ ]
134804
+ };
134805
+ }
134779
134806
  function derivePostReleaseChecklist(plan, {
134780
134807
  runPath,
134781
134808
  root,
134809
+ planPath,
134782
134810
  statePath,
134783
134811
  unitIds,
134784
134812
  postVerifyComplete = false
@@ -134798,10 +134826,12 @@ function derivePostReleaseChecklist(plan, {
134798
134826
  const hasPendingPostVerify = postVerifyHooks(plan).length > 0 && !postVerifyComplete && targets.length > 0;
134799
134827
  const hasStatePath = typeof statePath === "string" && statePath.length > 0;
134800
134828
  const selectedUnitIds = Array.isArray(unitIds) ? unitIds : void 0;
134829
+ const finishCommand = hasPendingPostVerify ? void 0 : buildFinishCommand({ root, planPath, runPath });
134801
134830
  return {
134802
134831
  command: "post-release",
134803
134832
  status: "AWAITING_USER_DECISION",
134804
134833
  planDigest: plan.digest,
134834
+ ...finishCommand ? { finishCommand } : {},
134805
134835
  merge: {
134806
134836
  promptRequired: uncovered.length > 0,
134807
134837
  alreadyHandledByRelease: uncovered.length === 0,
@@ -135015,7 +135045,7 @@ async function defaultRun(command2, args2, options = {}) {
135015
135045
  watchdogReason: envelope.watchdogReason,
135016
135046
  ...envelope.evidence?.spawnError ? { spawnError: envelope.evidence.spawnError } : {}
135017
135047
  };
135018
- throw attachFoundationFailure(error, { envelope, stdout });
135048
+ throw attachFoundationFailure(error, { envelope, stdout, stderr });
135019
135049
  }
135020
135050
  return { stdout, stderr };
135021
135051
  }, { prefix: "release-skill-host-command-" });
@@ -136406,6 +136436,7 @@ var init_post_release_local = __esm({
136406
136436
  __name(assertExecutableTarget, "assertExecutableTarget");
136407
136437
  __name(assertQoderExecutableTarget, "assertQoderExecutableTarget");
136408
136438
  __name(buildShipNextStep, "buildShipNextStep");
136439
+ __name(buildFinishCommand, "buildFinishCommand");
136409
136440
  __name(derivePostReleaseChecklist, "derivePostReleaseChecklist");
136410
136441
  __name(postVerifyHooks, "postVerifyHooks");
136411
136442
  __name(localFinishEvidenceError, "localFinishEvidenceError");
@@ -136787,7 +136818,7 @@ function defaultSleep(ms) {
136787
136818
  if (process.env.RELEASE_SKILL_OBSERVE_RETRY_NO_WAIT === "1") {
136788
136819
  return Promise.resolve();
136789
136820
  }
136790
- return new Promise((resolve43) => setTimeout(resolve43, ms));
136821
+ return new Promise((resolve44) => setTimeout(resolve44, ms));
136791
136822
  }
136792
136823
  function isPropagatingMissing(result2) {
136793
136824
  if (result2 == null) return true;
@@ -141832,28 +141863,28 @@ async function distributeRelease(options) {
141832
141863
  fileCount: publicFiles.length
141833
141864
  });
141834
141865
  }
141835
- for (const step of declaration.steps ?? []) {
141866
+ for (const step2 of declaration.steps ?? []) {
141836
141867
  if (dryRun === true) {
141837
- await evidence.append({ phase: "postpublish-step", step: step.name, status: "skipped", reason: "DRY_RUN" });
141868
+ await evidence.append({ phase: "postpublish-step", step: step2.name, status: "skipped", reason: "DRY_RUN" });
141838
141869
  continue;
141839
141870
  }
141840
141871
  if (pendingHookApprovals.length > 0) {
141841
141872
  await evidence.append({
141842
141873
  phase: "postpublish-step",
141843
- step: step.name,
141874
+ step: step2.name,
141844
141875
  status: "skipped",
141845
141876
  reason: "AWAITING_CHECKPOINT_APPROVAL",
141846
141877
  pendingHookApprovals: pendingHookApprovals.map((hook) => hook.id)
141847
141878
  });
141848
141879
  continue;
141849
141880
  }
141850
- await evidence.append({ phase: "postpublish-step", step: step.name, status: "started" });
141881
+ await evidence.append({ phase: "postpublish-step", step: step2.name, status: "started" });
141851
141882
  const stepResult = await hookRunner(
141852
141883
  {
141853
- command: step.command,
141854
- ...step.cwd ? { cwd: step.cwd } : {},
141855
- ...step.timeoutMs !== void 0 ? { timeoutMs: step.timeoutMs } : {},
141856
- ...step.envAllowlist ? { envAllowlist: step.envAllowlist } : {}
141884
+ command: step2.command,
141885
+ ...step2.cwd ? { cwd: step2.cwd } : {},
141886
+ ...step2.timeoutMs !== void 0 ? { timeoutMs: step2.timeoutMs } : {},
141887
+ ...step2.envAllowlist ? { envAllowlist: step2.envAllowlist } : {}
141857
141888
  },
141858
141889
  {
141859
141890
  // F-04: steps run in the execution worktree (see materialize).
@@ -141865,7 +141896,7 @@ async function distributeRelease(options) {
141865
141896
  if (stepResult.exitCode !== 0) {
141866
141897
  await evidence.append({
141867
141898
  phase: "postpublish-step",
141868
- step: step.name,
141899
+ step: step2.name,
141869
141900
  status: "failed",
141870
141901
  exitCode: stepResult.exitCode,
141871
141902
  stdoutTail: boundedOutputTail(stepResult.stdout),
@@ -141873,11 +141904,11 @@ async function distributeRelease(options) {
141873
141904
  });
141874
141905
  await failBlocked(new ReleaseError(
141875
141906
  GATE_FAILED,
141876
- `postPublish step "${step.name}" exited with code ${stepResult.exitCode}`,
141877
- { step: step.name, exitCode: stepResult.exitCode }
141907
+ `postPublish step "${step2.name}" exited with code ${stepResult.exitCode}`,
141908
+ { step: step2.name, exitCode: stepResult.exitCode }
141878
141909
  ));
141879
141910
  }
141880
- await evidence.append({ phase: "postpublish-step", step: step.name, status: "passed" });
141911
+ await evidence.append({ phase: "postpublish-step", step: step2.name, status: "passed" });
141881
141912
  }
141882
141913
  await evidence.append({
141883
141914
  phase: "distribute",
@@ -143827,6 +143858,7 @@ async function advanceShip(options = {}, injected = {}) {
143827
143858
  try {
143828
143859
  postRelease = derivePostReleaseChecklist(finalPlan, {
143829
143860
  root,
143861
+ planPath: state.planPath,
143830
143862
  statePath,
143831
143863
  unitIds: state.selectedUnitIds,
143832
143864
  runPath: localFinishRunPath,
@@ -144312,22 +144344,22 @@ function classifyProbeFailure(text) {
144312
144344
  return "transport";
144313
144345
  }
144314
144346
  function renderMarketplaceIndex(marketplace, params = {}) {
144315
- const fail10 = /* @__PURE__ */ __name((message, details = {}) => {
144347
+ const fail11 = /* @__PURE__ */ __name((message, details = {}) => {
144316
144348
  throw new ReleaseError(GATE_FAILED, `marketplace index render failed: ${message}`, details);
144317
144349
  }, "fail");
144318
144350
  if (!marketplace || typeof marketplace !== "object" || Array.isArray(marketplace)) {
144319
- fail10("marketplace metadata is required");
144351
+ fail11("marketplace metadata is required");
144320
144352
  }
144321
144353
  if (marketplace.form !== "github" && marketplace.form !== "url") {
144322
- fail10('marketplace.form must be "github" or "url"', { form: marketplace.form });
144354
+ fail11('marketplace.form must be "github" or "url"', { form: marketplace.form });
144323
144355
  }
144324
144356
  const { pluginName, ref, sha = null, dependencyUrl = null } = params;
144325
- if (typeof marketplace.name !== "string" || marketplace.name.length === 0) fail10("marketplace.name must be a non-empty string");
144326
- if (typeof marketplace.owner !== "string" || marketplace.owner.length === 0) fail10("marketplace.owner must be a non-empty string");
144327
- if (typeof pluginName !== "string" || pluginName.length === 0) fail10("pluginName must be a non-empty string");
144328
- if (typeof ref !== "string" || ref.length === 0) fail10("ref must be a non-empty tag");
144357
+ if (typeof marketplace.name !== "string" || marketplace.name.length === 0) fail11("marketplace.name must be a non-empty string");
144358
+ if (typeof marketplace.owner !== "string" || marketplace.owner.length === 0) fail11("marketplace.owner must be a non-empty string");
144359
+ if (typeof pluginName !== "string" || pluginName.length === 0) fail11("pluginName must be a non-empty string");
144360
+ if (typeof ref !== "string" || ref.length === 0) fail11("ref must be a non-empty tag");
144329
144361
  if (sha !== null && !SHA_RE6.test(sha)) {
144330
- fail10("sha must be the full 40-hex commit hash from the actual push result", { sha });
144362
+ fail11("sha must be the full 40-hex commit hash from the actual push result", { sha });
144331
144363
  }
144332
144364
  let source;
144333
144365
  if (marketplace.form === "github") {
@@ -144339,7 +144371,7 @@ function renderMarketplaceIndex(marketplace, params = {}) {
144339
144371
  };
144340
144372
  } else {
144341
144373
  if (typeof dependencyUrl !== "string" || !isAllowedGitRemoteUrl(dependencyUrl)) {
144342
- fail10("url form requires the payload-mirror dependency remoteUrl", {});
144374
+ fail11("url form requires the payload-mirror dependency remoteUrl", {});
144343
144375
  }
144344
144376
  source = {
144345
144377
  source: "url",
@@ -144984,6 +145016,447 @@ var init_attest = __esm({
144984
145016
  }
144985
145017
  });
144986
145018
 
145019
+ // src/commands/post-release-finish.mjs
145020
+ var post_release_finish_exports = {};
145021
+ __export(post_release_finish_exports, {
145022
+ runPostReleaseFinish: () => runPostReleaseFinish
145023
+ });
145024
+ import { realpath as realpath36 } from "node:fs/promises";
145025
+ import { basename as basename17, dirname as dirname24, isAbsolute as isAbsolute31, normalize as normalize6, resolve as resolve40 } from "node:path";
145026
+ function fail10(message) {
145027
+ const error = new Error(message);
145028
+ error.code = "POST_RELEASE_FINISH_INVALID";
145029
+ error.exitCode = 1;
145030
+ throw error;
145031
+ }
145032
+ function assertPlainObject(value, label) {
145033
+ if (!value || typeof value !== "object" || Array.isArray(value)) fail10(`${label} must be an object`);
145034
+ }
145035
+ function assertClosed2(value, allowed, label) {
145036
+ assertPlainObject(value, label);
145037
+ const unknown = Object.keys(value).filter((field) => !allowed.has(field));
145038
+ if (unknown.length > 0) fail10(`${label} contains unknown fields: ${unknown.join(", ")}`);
145039
+ }
145040
+ function nonEmptyString(value, label) {
145041
+ if (typeof value !== "string" || value.trim().length === 0) fail10(`${label} must be a non-empty string`);
145042
+ return value;
145043
+ }
145044
+ function normalizedAbsolutePath(value, label) {
145045
+ nonEmptyString(value, label);
145046
+ if (!isAbsolute31(value) || normalize6(value) !== value) fail10(`${label} must be a normalized absolute path`);
145047
+ return value;
145048
+ }
145049
+ async function readFeedback(feedbackPath) {
145050
+ if (feedbackPath === void 0) return null;
145051
+ normalizedAbsolutePath(feedbackPath, "finish feedback path");
145052
+ let receipt;
145053
+ try {
145054
+ receipt = await readFileStrict(dirname24(feedbackPath), basename17(feedbackPath), { encoding: "utf8" });
145055
+ } catch (cause) {
145056
+ fail10(`cannot strictly read finish feedback: ${cause.message}`);
145057
+ }
145058
+ let value;
145059
+ try {
145060
+ value = JSON.parse(receipt.content);
145061
+ } catch (cause) {
145062
+ fail10(`finish feedback is not valid JSON: ${cause.message}`);
145063
+ }
145064
+ return value;
145065
+ }
145066
+ function targetKey(unitId, host) {
145067
+ return `${unitId}\0${host}`;
145068
+ }
145069
+ function validateFeedback(raw, { projectRoot, planDigest, configDigest, selectedTargets, setupSkill }) {
145070
+ if (raw === null) return { merge: null, hosts: [], setup: null };
145071
+ assertClosed2(raw, FEEDBACK_FIELDS, "finish feedback");
145072
+ for (const field of ["planDigest", "configDigest", "projectRoot"]) nonEmptyString(raw[field], `finish feedback.${field}`);
145073
+ if (raw.planDigest !== planDigest) fail10("finish feedback planDigest does not match the frozen plan");
145074
+ if (raw.configDigest !== configDigest) fail10("finish feedback configDigest does not match the current project configuration");
145075
+ if (normalizedAbsolutePath(raw.projectRoot, "finish feedback.projectRoot") !== projectRoot) {
145076
+ fail10("finish feedback projectRoot does not match the current project root");
145077
+ }
145078
+ let merge = null;
145079
+ if (raw.merge !== void 0) {
145080
+ assertClosed2(raw.merge, MERGE_FIELDS, "finish feedback.merge");
145081
+ if (!["completed", "skipped", "pending"].includes(raw.merge.outcome)) fail10("finish feedback.merge.outcome is invalid");
145082
+ nonEmptyString(raw.merge.summary, "finish feedback.merge.summary");
145083
+ merge = { ...raw.merge, basis: "agent-reported" };
145084
+ }
145085
+ const targetsByKey = new Map(selectedTargets.map((target) => [targetKey(target.unitId, target.host), target]));
145086
+ const hosts = [];
145087
+ const seen = /* @__PURE__ */ new Set();
145088
+ if (raw.hosts !== void 0 && !Array.isArray(raw.hosts)) fail10("finish feedback.hosts must be an array");
145089
+ for (const [index, host] of (raw.hosts ?? []).entries()) {
145090
+ assertClosed2(host, HOST_FIELDS, `finish feedback.hosts[${index}]`);
145091
+ for (const field of ["unitId", "host", "plugin", "version", "summary"]) {
145092
+ nonEmptyString(host[field], `finish feedback.hosts[${index}].${field}`);
145093
+ }
145094
+ if (!["current", "pending", "failed"].includes(host.installation)) fail10(`finish feedback.hosts[${index}].installation is invalid`);
145095
+ if (typeof host.loaded !== "boolean") fail10(`finish feedback.hosts[${index}].loaded must be boolean`);
145096
+ if (host.installation !== "current" && host.loaded) fail10(`finish feedback.hosts[${index}] cannot be loaded unless installation is current`);
145097
+ if (host.skillFile !== void 0) normalizedAbsolutePath(host.skillFile, `finish feedback.hosts[${index}].skillFile`);
145098
+ const key = targetKey(host.unitId, host.host);
145099
+ if (seen.has(key)) fail10(`finish feedback contains duplicate host result for ${host.unitId}/${host.host}`);
145100
+ seen.add(key);
145101
+ const target = targetsByKey.get(key);
145102
+ if (!target) fail10(`finish feedback host ${host.unitId}/${host.host} is outside the selected frozen targets`);
145103
+ if (host.plugin !== target.plugin || host.version !== target.version) {
145104
+ fail10(`finish feedback host ${host.unitId}/${host.host} does not match the frozen plugin identity`);
145105
+ }
145106
+ hosts.push({ ...host, basis: "agent-reported" });
145107
+ }
145108
+ let setup = null;
145109
+ if (raw.setup !== void 0) {
145110
+ if (!setupSkill) fail10("finish feedback.setup is not allowed when releaseFinish.setupSkill is not configured");
145111
+ assertClosed2(raw.setup, SETUP_FIELDS, "finish feedback.setup");
145112
+ for (const field of ["host", "unitId", "skillFile", "summary"]) nonEmptyString(raw.setup[field], `finish feedback.setup.${field}`);
145113
+ normalizedAbsolutePath(raw.setup.skillFile, "finish feedback.setup.skillFile");
145114
+ if (!["completed", "pending", "failed"].includes(raw.setup.outcome)) fail10("finish feedback.setup.outcome is invalid");
145115
+ const host = hosts.find((entry) => entry.host === raw.setup.host && entry.unitId === raw.setup.unitId);
145116
+ if (!host || host.installation !== "current" || host.loaded !== true || host.skillFile !== raw.setup.skillFile) {
145117
+ fail10("finish feedback.setup is not bound to one selected, current, loaded host and matching skillFile");
145118
+ }
145119
+ setup = { ...raw.setup, basis: "agent-reported" };
145120
+ }
145121
+ return { merge, hosts, setup };
145122
+ }
145123
+ function step(status, summary, extra = {}) {
145124
+ if (!STEP_STATUSES.has(status)) throw new Error(`unknown finish step status: ${status}`);
145125
+ return { status, summary, ...extra };
145126
+ }
145127
+ function resultToInstallation(result2, target) {
145128
+ if (!result2) return null;
145129
+ if (["UPDATED", "ALREADY_CURRENT"].includes(result2.status) && result2.version !== target.version) {
145130
+ return {
145131
+ unitId: target.unitId,
145132
+ host: target.host,
145133
+ plugin: target.plugin,
145134
+ version: target.version,
145135
+ installation: "failed",
145136
+ loaded: false,
145137
+ summary: `\u5BBF\u4E3B\u66F4\u65B0\u7ED3\u679C\u7248\u672C ${result2.version ?? "(missing)"} \u4E0E\u51BB\u7ED3\u7248\u672C ${target.version} \u4E0D\u4E00\u81F4\u3002`,
145138
+ basis: "script-observed",
145139
+ updateStatus: result2.status
145140
+ };
145141
+ }
145142
+ if (["UPDATED", "ALREADY_CURRENT"].includes(result2.status)) {
145143
+ return {
145144
+ unitId: target.unitId,
145145
+ host: target.host,
145146
+ plugin: target.plugin,
145147
+ version: target.version,
145148
+ installation: "current",
145149
+ loaded: false,
145150
+ summary: result2.status === "UPDATED" ? "\u811A\u672C\u5DF2\u66F4\u65B0\u5E76\u590D\u9A8C\u5B89\u88C5\u8F7D\u8377\uFF1B\u4ECD\u9700\u7531\u5F53\u524D\u667A\u80FD\u4F53\u786E\u8BA4\u5BBF\u4E3B\u5B9E\u9645\u52A0\u8F7D\u3002" : "\u811A\u672C\u5DF2\u786E\u8BA4\u5B89\u88C5\u8F7D\u8377\u4E0E\u51BB\u7ED3\u7248\u672C\u4E00\u81F4\uFF1B\u4ECD\u9700\u7531\u5F53\u524D\u667A\u80FD\u4F53\u786E\u8BA4\u5BBF\u4E3B\u5B9E\u9645\u52A0\u8F7D\u3002",
145151
+ basis: "script-observed",
145152
+ updateStatus: result2.status,
145153
+ ...result2.restartRequired ? { restartRequired: true } : {}
145154
+ };
145155
+ }
145156
+ return {
145157
+ unitId: target.unitId,
145158
+ host: target.host,
145159
+ plugin: target.plugin,
145160
+ version: target.version,
145161
+ installation: result2.status === "FAILED" ? "failed" : "pending",
145162
+ loaded: false,
145163
+ summary: result2.reason ?? result2.error ?? `\u5BBF\u4E3B\u66F4\u65B0\u7ED3\u679C\u4E3A ${result2.status}\u3002`,
145164
+ basis: "script-observed",
145165
+ updateStatus: result2.status
145166
+ };
145167
+ }
145168
+ function gitReadEnvironment() {
145169
+ const env = { GIT_OPTIONAL_LOCKS: "0", GIT_TERMINAL_PROMPT: "0" };
145170
+ for (const key of ["PATH", "HOME", "TMPDIR", "LANG", "LC_ALL"]) {
145171
+ if (process.env[key] !== void 0) env[key] = process.env[key];
145172
+ }
145173
+ return env;
145174
+ }
145175
+ async function observeGitCommand({ root, args: args2, run: run6 }) {
145176
+ const argv = ["git", ...args2];
145177
+ try {
145178
+ const result2 = await run6("git", args2, { cwd: root, env: gitReadEnvironment() });
145179
+ return { argv, status: "SUCCEEDED", exitStatus: 0, stdout: result2.stdout, stderr: result2.stderr };
145180
+ } catch (cause) {
145181
+ return {
145182
+ argv,
145183
+ status: "FAILED",
145184
+ exitStatus: cause?.exitStatus ?? cause?.code ?? null,
145185
+ stdout: cause?.stdout ?? cause?.foundationStdout ?? "",
145186
+ stderr: cause?.stderr ?? cause?.foundationStderr ?? "",
145187
+ message: cause?.message ?? String(cause)
145188
+ };
145189
+ }
145190
+ }
145191
+ async function inspectSourceBranch({ root, config, run: run6 }) {
145192
+ const policy = config.releaseFinish?.sourceBranchCheck ?? "remind";
145193
+ const targetBranch = config.project.defaultBranch;
145194
+ if (policy === "skip") {
145195
+ return step("SKIPPED", "\u9879\u76EE\u914D\u7F6E\u5DF2\u5173\u95ED\u6E90\u7801\u5206\u652F\u68C0\u67E5\u3002", { policy, targetBranch, basis: "script-observed" });
145196
+ }
145197
+ const branchResult = await observeGitCommand({ root, args: ["branch", "--show-current"], run: run6 });
145198
+ const statusResult = await observeGitCommand({ root, args: ["status", "--short", "--branch"], run: run6 });
145199
+ const commands = [branchResult, statusResult];
145200
+ if (commands.some((command2) => command2.status === "FAILED")) {
145201
+ return step("FAILED", "\u6E90\u7801\u5206\u652F\u53EA\u8BFB\u68C0\u67E5\u81F3\u5C11\u4E00\u6761 Git \u547D\u4EE4\u5931\u8D25\u3002", {
145202
+ policy,
145203
+ targetBranch,
145204
+ commands,
145205
+ basis: "script-observed"
145206
+ });
145207
+ }
145208
+ try {
145209
+ const currentBranch = branchResult.stdout.trim();
145210
+ const lines = statusResult.stdout.replace(/\r/gu, "").split("\n").filter(Boolean);
145211
+ const tracking = lines[0]?.startsWith("## ") ? lines[0].slice(3) : "";
145212
+ const changed = (lines[0]?.startsWith("## ") ? lines.slice(1) : lines).length > 0;
145213
+ const detached = currentBranch.length === 0;
145214
+ const aligned = !detached && currentBranch === targetBranch;
145215
+ return step("COMPLETE", detached ? "\u5DF2\u5B8C\u6210\u53EA\u8BFB\u68C0\u67E5\uFF1B\u5F53\u524D\u4E3A detached HEAD\uFF0C\u672A\u731C\u6D4B\u540E\u7EED Git \u64CD\u4F5C\u3002" : aligned ? `\u5DF2\u5B8C\u6210\u53EA\u8BFB\u68C0\u67E5\uFF1B\u5F53\u524D\u5206\u652F\u4E3A\u76EE\u6807\u5206\u652F ${targetBranch}\u3002` : `\u5DF2\u5B8C\u6210\u53EA\u8BFB\u68C0\u67E5\uFF1B\u5F53\u524D\u5206\u652F ${currentBranch} \u4E0E\u76EE\u6807\u5206\u652F ${targetBranch} \u4E0D\u540C\u3002`, {
145216
+ policy,
145217
+ targetBranch,
145218
+ currentBranch: detached ? null : currentBranch,
145219
+ detached,
145220
+ aligned,
145221
+ changed,
145222
+ tracking: tracking || null,
145223
+ rawStatus: statusResult.stdout,
145224
+ commands,
145225
+ basis: "script-observed"
145226
+ });
145227
+ } catch (cause) {
145228
+ return step("FAILED", `\u6E90\u7801\u5206\u652F\u53EA\u8BFB\u68C0\u67E5\u5931\u8D25\uFF1A${cause.message}`, {
145229
+ policy,
145230
+ targetBranch,
145231
+ commands,
145232
+ basis: "script-observed"
145233
+ });
145234
+ }
145235
+ }
145236
+ function finishStatus(steps) {
145237
+ const statuses = Object.values(steps).map((entry) => entry.status);
145238
+ if (statuses.includes("FAILED")) return "FAILED";
145239
+ if (statuses.includes("PENDING")) return "PENDING";
145240
+ return "COMPLETE";
145241
+ }
145242
+ async function runPostReleaseFinish({
145243
+ root = process.cwd(),
145244
+ plan,
145245
+ planPath,
145246
+ runPath,
145247
+ selectedHosts = [],
145248
+ updateRequested = false,
145249
+ skipLocalHosts = false,
145250
+ confirmPlanDigest,
145251
+ cursorPluginsRoot,
145252
+ feedbackPath,
145253
+ updateLocalHostPluginsFn = updateLocalHostPlugins,
145254
+ run: run6 = defaultRun
145255
+ } = {}) {
145256
+ const projectRoot = await realpath36(resolve40(root));
145257
+ const loaded = await loadProjectConfig({ root: projectRoot });
145258
+ const checklist = derivePostReleaseChecklist(plan, {
145259
+ root: projectRoot,
145260
+ planPath,
145261
+ runPath,
145262
+ postVerifyComplete: true
145263
+ });
145264
+ const selected = new Set(selectedHosts);
145265
+ const unknownHosts = [...selected].filter((host) => !checklist.localHostUpdate.hosts.includes(host));
145266
+ if (unknownHosts.length > 0) fail10(`selected hosts are not declared by the plan: ${unknownHosts.join(", ")}`);
145267
+ const selectedTargets = checklist.localHostUpdate.targets.filter((target) => selected.has(target.host));
145268
+ const feedback = validateFeedback(await readFeedback(feedbackPath), {
145269
+ projectRoot,
145270
+ planDigest: plan.digest,
145271
+ configDigest: loaded.configDigest,
145272
+ selectedTargets,
145273
+ setupSkill: loaded.config.releaseFinish?.setupSkill
145274
+ });
145275
+ let update = null;
145276
+ if (updateRequested) {
145277
+ update = await updateLocalHostPluginsFn({
145278
+ planPath,
145279
+ runPath,
145280
+ root: projectRoot,
145281
+ confirmPlanDigest,
145282
+ selectedHosts,
145283
+ cursorPluginsRoot
145284
+ });
145285
+ }
145286
+ const nextActions = [];
145287
+ let mergeStep;
145288
+ if (!checklist.merge.promptRequired) {
145289
+ mergeStep = step("COMPLETE", "\u53D1\u5E03\u6D41\u7A0B\u5DF2\u8986\u76D6\u5206\u652F\u63A8\u8FDB\uFF0C\u65E0\u9700\u989D\u5916\u5408\u5E76\u51B3\u5B9A\u3002", { basis: "script-observed" });
145290
+ } else if (!feedback.merge) {
145291
+ mergeStep = step("PENDING", "\u5C1A\u672A\u63D0\u4F9B\u5269\u4F59\u53D1\u5E03\u5206\u652F\u7684\u5904\u7406\u7ED3\u679C\u3002");
145292
+ nextActions.push({ type: "decide-merge", units: checklist.merge.units });
145293
+ } else {
145294
+ const status = feedback.merge.outcome === "completed" ? "COMPLETE" : feedback.merge.outcome === "skipped" ? "SKIPPED" : "PENDING";
145295
+ mergeStep = step(status, feedback.merge.summary, { basis: feedback.merge.basis, outcome: feedback.merge.outcome });
145296
+ if (status === "PENDING") nextActions.push({ type: "decide-merge", units: checklist.merge.units });
145297
+ }
145298
+ const observations = [];
145299
+ const feedbackByKey = new Map(feedback.hosts.map((entry) => [targetKey(entry.unitId, entry.host), entry]));
145300
+ const updateByKey = new Map((update?.results ?? []).map((entry) => [targetKey(entry.unitId, entry.host), entry]));
145301
+ const updateKeepsFeedback = !updateRequested || selectedTargets.every((target) => {
145302
+ const result2 = updateByKey.get(targetKey(target.unitId, target.host));
145303
+ return result2?.status === "ALREADY_CURRENT" && result2.version === target.version;
145304
+ });
145305
+ for (const target of selectedTargets) {
145306
+ const reported = feedbackByKey.get(targetKey(target.unitId, target.host));
145307
+ const updateResult = updateByKey.get(targetKey(target.unitId, target.host));
145308
+ const scriptObservation = resultToInstallation(updateResult, target);
145309
+ if (!scriptObservation) {
145310
+ if (reported) observations.push(reported);
145311
+ continue;
145312
+ }
145313
+ if (scriptObservation.installation === "current" && scriptObservation.updateStatus === "ALREADY_CURRENT" && reported?.installation === "current") {
145314
+ observations.push({
145315
+ ...scriptObservation,
145316
+ loaded: reported.loaded,
145317
+ ...reported.skillFile ? { skillFile: reported.skillFile } : {},
145318
+ loadSummary: reported.summary,
145319
+ loadBasis: "agent-reported"
145320
+ });
145321
+ } else {
145322
+ observations.push(scriptObservation);
145323
+ }
145324
+ }
145325
+ let hostUpdateStep;
145326
+ let hostLoadStep;
145327
+ const hasTargets = checklist.localHostUpdate.targets.length > 0;
145328
+ if (skipLocalHosts) {
145329
+ hostUpdateStep = step("SKIPPED", "\u8C03\u7528\u8005\u5DF2\u660E\u786E\u8DF3\u8FC7\u672C\u8F6E\u5BBF\u4E3B\u66F4\u65B0\u3002");
145330
+ hostLoadStep = step("SKIPPED", "\u672C\u8F6E\u8DF3\u8FC7\u5BBF\u4E3B\u66F4\u65B0\uFF0C\u56E0\u6B64\u4E0D\u68C0\u67E5\u76EE\u6807\u63D2\u4EF6\u52A0\u8F7D\u3002");
145331
+ } else if (!hasTargets) {
145332
+ hostUpdateStep = step("SKIPPED", "\u51BB\u7ED3\u8BA1\u5212\u6CA1\u6709\u9002\u7528\u7684\u672C\u673A\u5BBF\u4E3B\u76EE\u6807\u3002");
145333
+ hostLoadStep = step("SKIPPED", "\u6CA1\u6709\u9002\u7528\u7684\u5BBF\u4E3B\u52A0\u8F7D\u76EE\u6807\u3002");
145334
+ } else if (selectedTargets.length === 0) {
145335
+ hostUpdateStep = step("PENDING", "\u5C1A\u672A\u9009\u62E9\u672C\u8F6E\u8981\u5904\u7406\u7684\u5BBF\u4E3B\u3002", { availableHosts: checklist.localHostUpdate.hosts });
145336
+ hostLoadStep = step("PENDING", "\u9700\u5148\u9009\u62E9\u5BBF\u4E3B\u5E76\u786E\u8BA4\u5B89\u88C5\u7ED3\u679C\u3002");
145337
+ nextActions.push({ type: "choose-local-hosts", hosts: checklist.localHostUpdate.hosts, targets: checklist.localHostUpdate.targets });
145338
+ } else {
145339
+ const failed = observations.filter((entry) => entry.installation === "failed");
145340
+ const current = observations.filter((entry) => entry.installation === "current");
145341
+ const missing = selectedTargets.filter((target) => !observations.some((entry) => entry.unitId === target.unitId && entry.host === target.host));
145342
+ const pending = observations.filter((entry) => entry.installation === "pending");
145343
+ hostUpdateStep = step(
145344
+ failed.length > 0 ? "FAILED" : missing.length > 0 || pending.length > 0 ? "PENDING" : "COMPLETE",
145345
+ failed.length > 0 ? "\u81F3\u5C11\u4E00\u4E2A\u6240\u9009\u5BBF\u4E3B\u7684\u5B89\u88C5\u6216\u66F4\u65B0\u5931\u8D25\u3002" : missing.length > 0 || pending.length > 0 ? "\u90E8\u5206\u6240\u9009\u5BBF\u4E3B\u7F3A\u5C11\u5B89\u88C5\u7ED3\u679C\u6216\u4ECD\u5F85\u5904\u7406\u3002" : "\u6240\u9009\u5BBF\u4E3B\u7684\u5B89\u88C5\u5747\u5DF2\u786E\u8BA4\u4E3A\u76EE\u6807\u7248\u672C\u3002",
145346
+ { observations }
145347
+ );
145348
+ const unloaded = observations.filter((entry) => entry.installation === "current" && entry.loaded !== true);
145349
+ const loadedHosts = observations.filter((entry) => entry.installation === "current" && entry.loaded === true);
145350
+ hostLoadStep = step(
145351
+ failed.length > 0 ? "FAILED" : loadedHosts.length !== selectedTargets.length ? "PENDING" : "COMPLETE",
145352
+ failed.length > 0 ? "\u5BBF\u4E3B\u5B89\u88C5\u5931\u8D25\uFF0C\u65E0\u6CD5\u5B8C\u6210\u52A0\u8F7D\u786E\u8BA4\u3002" : loadedHosts.length !== selectedTargets.length ? "\u5C1A\u672A\u786E\u8BA4\u5168\u90E8\u6240\u9009\u5BBF\u4E3B\u5DF2\u5B9E\u9645\u52A0\u8F7D\u76EE\u6807\u63D2\u4EF6\u548C\u5165\u53E3\u3002" : "\u5F53\u524D\u667A\u80FD\u4F53\u5DF2\u62A5\u544A\u5168\u90E8\u6240\u9009\u5BBF\u4E3B\u52A0\u8F7D\u76EE\u6807\u5165\u53E3\u3002",
145353
+ { observations }
145354
+ );
145355
+ if (missing.length > 0 || pending.length > 0) nextActions.push({ type: "observe-host-installation", targets: [...missing, ...pending] });
145356
+ if (unloaded.length > 0) nextActions.push({ type: "check-host-load", projectRoot, observations: unloaded });
145357
+ }
145358
+ const setupSkill = loaded.config.releaseFinish?.setupSkill;
145359
+ const candidates = observations.filter((entry) => entry.installation === "current" && entry.loaded === true && typeof entry.skillFile === "string");
145360
+ const candidateOwners = new Set(candidates.map((entry) => `${entry.plugin}\0${entry.version}\0${entry.skillFile}`));
145361
+ const effectiveSetup = updateKeepsFeedback ? feedback.setup : null;
145362
+ let setupStep;
145363
+ if (!setupSkill) {
145364
+ setupStep = step("SKIPPED", "\u9879\u76EE\u672A\u914D\u7F6E releaseFinish.setupSkill\u3002");
145365
+ } else if (skipLocalHosts) {
145366
+ setupStep = step("SKIPPED", "\u8C03\u7528\u8005\u5DF2\u660E\u786E\u8DF3\u8FC7\u5BBF\u4E3B\u66F4\u65B0\u548C\u52A0\u8F7D\uFF0C\u672C\u8F6E\u4E0D\u6267\u884C setup\u3002", { setupSkill });
145367
+ } else if (candidateOwners.size > 1) {
145368
+ setupStep = step("PENDING", `\u76EE\u6807\u5165\u53E3 ${setupSkill} \u5B58\u5728\u591A\u4E2A\u63D2\u4EF6\u8EAB\u4EFD\u5F52\u5C5E\uFF0C\u4E0D\u80FD\u7528\u5355\u4E2A setup \u53CD\u9988\u5B8C\u6574\u6536\u5C3E\u3002`, {
145369
+ setupSkill,
145370
+ candidates
145371
+ });
145372
+ nextActions.push({ type: "disambiguate-setup", setupSkill, projectRoot, candidates });
145373
+ } else if (effectiveSetup) {
145374
+ const status = effectiveSetup.outcome === "completed" ? "COMPLETE" : effectiveSetup.outcome === "failed" ? "FAILED" : "PENDING";
145375
+ setupStep = step(status, effectiveSetup.summary, {
145376
+ setupSkill,
145377
+ result: effectiveSetup,
145378
+ basis: "agent-reported"
145379
+ });
145380
+ if (status === "PENDING") nextActions.push({ type: "invoke-setup", setupSkill, projectRoot, resume: effectiveSetup });
145381
+ } else {
145382
+ setupStep = step("PENDING", candidates.length > 0 ? `\u76EE\u6807\u5165\u53E3 ${setupSkill} \u5DF2\u6709\u53EF\u7528\u5BBF\u4E3B\uFF0C\u4F46\u672A\u6536\u5230\u5B9E\u9645 setup \u7ED3\u679C\u3002` : `\u76EE\u6807\u5165\u53E3 ${setupSkill} \u5C1A\u7F3A\u53EF\u7528\u7684\u5DF2\u52A0\u8F7D\u5BBF\u4E3B\u4E0E\u6280\u80FD\u5143\u6570\u636E\u3002`, { setupSkill, candidates });
145383
+ if (candidates.length > 0) {
145384
+ nextActions.push({
145385
+ type: "invoke-setup",
145386
+ setupSkill,
145387
+ projectRoot,
145388
+ intent: "read-only-diagnosis",
145389
+ authorization: "No new write authority is granted by this request.",
145390
+ candidates: candidates.map((entry) => ({
145391
+ unitId: entry.unitId,
145392
+ host: entry.host,
145393
+ plugin: entry.plugin,
145394
+ version: entry.version,
145395
+ skillFile: entry.skillFile
145396
+ })),
145397
+ hostObservations: observations
145398
+ });
145399
+ } else {
145400
+ nextActions.push({
145401
+ type: "resolve-setup-target",
145402
+ setupSkill,
145403
+ projectRoot,
145404
+ reason: hasTargets ? "no-loaded-candidates" : "no-host-targets",
145405
+ targets: checklist.localHostUpdate.targets
145406
+ });
145407
+ }
145408
+ }
145409
+ const sourceBranchStep = await inspectSourceBranch({ root: projectRoot, config: loaded.config, run: run6 });
145410
+ const steps = {
145411
+ merge: mergeStep,
145412
+ "host-update": hostUpdateStep,
145413
+ "host-load": hostLoadStep,
145414
+ setup: setupStep,
145415
+ "source-branch": sourceBranchStep
145416
+ };
145417
+ return {
145418
+ command: "post-release",
145419
+ ...update ? { operation: "finish-with-local-host-update", localHostUpdate: update } : { checklist },
145420
+ finish: {
145421
+ status: finishStatus(steps),
145422
+ projectRoot,
145423
+ planDigest: plan.digest,
145424
+ configDigest: loaded.configDigest,
145425
+ steps,
145426
+ nextActions,
145427
+ releaseStatusChanged: false
145428
+ }
145429
+ };
145430
+ }
145431
+ var STEP_STATUSES, FEEDBACK_FIELDS, MERGE_FIELDS, HOST_FIELDS, SETUP_FIELDS;
145432
+ var init_post_release_finish = __esm({
145433
+ async "src/commands/post-release-finish.mjs"() {
145434
+ init_src2();
145435
+ await init_config();
145436
+ await init_post_release_local();
145437
+ STEP_STATUSES = /* @__PURE__ */ new Set(["COMPLETE", "PENDING", "FAILED", "SKIPPED"]);
145438
+ FEEDBACK_FIELDS = /* @__PURE__ */ new Set(["planDigest", "configDigest", "projectRoot", "merge", "hosts", "setup"]);
145439
+ MERGE_FIELDS = /* @__PURE__ */ new Set(["outcome", "summary"]);
145440
+ HOST_FIELDS = /* @__PURE__ */ new Set(["unitId", "host", "installation", "loaded", "plugin", "version", "skillFile", "summary"]);
145441
+ SETUP_FIELDS = /* @__PURE__ */ new Set(["host", "unitId", "skillFile", "outcome", "summary"]);
145442
+ __name(fail10, "fail");
145443
+ __name(assertPlainObject, "assertPlainObject");
145444
+ __name(assertClosed2, "assertClosed");
145445
+ __name(nonEmptyString, "nonEmptyString");
145446
+ __name(normalizedAbsolutePath, "normalizedAbsolutePath");
145447
+ __name(readFeedback, "readFeedback");
145448
+ __name(targetKey, "targetKey");
145449
+ __name(validateFeedback, "validateFeedback");
145450
+ __name(step, "step");
145451
+ __name(resultToInstallation, "resultToInstallation");
145452
+ __name(gitReadEnvironment, "gitReadEnvironment");
145453
+ __name(observeGitCommand, "observeGitCommand");
145454
+ __name(inspectSourceBranch, "inspectSourceBranch");
145455
+ __name(finishStatus, "finishStatus");
145456
+ __name(runPostReleaseFinish, "runPostReleaseFinish");
145457
+ }
145458
+ });
145459
+
144987
145460
  // src/artifacts/policy.mjs
144988
145461
  import { readFile as readFile49 } from "node:fs/promises";
144989
145462
  import { join as join42 } from "node:path";
@@ -146171,7 +146644,7 @@ var init_state = __esm({
146171
146644
 
146172
146645
  // src/artifacts/artifact-plan.mjs
146173
146646
  import { writeFile as writeFile15, mkdir as mkdir35, readFile as readFile52, rename as rename6, open as open14 } from "node:fs/promises";
146174
- import { dirname as dirname24 } from "node:path";
146647
+ import { dirname as dirname25 } from "node:path";
146175
146648
  function assemblePlan({
146176
146649
  operation,
146177
146650
  bindings,
@@ -146194,7 +146667,7 @@ function assemblePlan({
146194
146667
  return Object.freeze(plan);
146195
146668
  }
146196
146669
  async function writePlan(plan, outputPath) {
146197
- const dir = dirname24(outputPath);
146670
+ const dir = dirname25(outputPath);
146198
146671
  await mkdir35(dir, { recursive: true });
146199
146672
  const tmpPath = `${outputPath}.tmp`;
146200
146673
  const content = JSON.stringify(plan, null, 2);
@@ -147132,7 +147605,7 @@ var init_inspect = __esm({
147132
147605
 
147133
147606
  // src/artifacts/resolution.mjs
147134
147607
  import { mkdir as mkdir36, open as open15, readFile as readFile54, stat as stat21, lstat as lstat49, chmod as chmod7 } from "node:fs/promises";
147135
- import { join as join46, resolve as resolve40, relative as relative33, isAbsolute as isAbsolute31, basename as basename17 } from "node:path";
147608
+ import { join as join46, resolve as resolve41, relative as relative33, isAbsolute as isAbsolute32, basename as basename18 } from "node:path";
147136
147609
  function decodeBuffer(value, label) {
147137
147610
  if (value == null) return null;
147138
147611
  if (Buffer.isBuffer(value)) return value;
@@ -147252,18 +147725,18 @@ async function assertNoSymlinksInPath(root, artifactId) {
147252
147725
  }
147253
147726
  }
147254
147727
  async function assertSafeResolvedPath(root, artifactId, resolvedPath) {
147255
- const resolutionDir = resolve40(root, ".release-skill", "resolution", artifactId);
147256
- const resolved = resolve40(resolvedPath);
147728
+ const resolutionDir = resolve41(root, ".release-skill", "resolution", artifactId);
147729
+ const resolved = resolve41(resolvedPath);
147257
147730
  await assertNoSymlinksInPath(root, artifactId);
147258
147731
  const rel = relative33(resolutionDir, resolved);
147259
- if (rel.startsWith("..") || isAbsolute31(rel)) {
147732
+ if (rel.startsWith("..") || isAbsolute32(rel)) {
147260
147733
  throw new ReleaseError(
147261
147734
  PATH_UNSAFE,
147262
147735
  `resolvedPath must be inside resolution directory ${resolutionDir}`,
147263
147736
  { resolvedPath, resolutionDir }
147264
147737
  );
147265
147738
  }
147266
- const filename = basename17(resolvedPath);
147739
+ const filename = basename18(resolvedPath);
147267
147740
  if (filename !== `${artifactId}.resolved`) {
147268
147741
  throw new ReleaseError(
147269
147742
  PATH_UNSAFE,
@@ -147271,7 +147744,7 @@ async function assertSafeResolvedPath(root, artifactId, resolvedPath) {
147271
147744
  { resolvedPath, expected: `${artifactId}.resolved`, actual: filename }
147272
147745
  );
147273
147746
  }
147274
- if (resolved !== resolve40(resolutionDir, `${artifactId}.resolved`)) {
147747
+ if (resolved !== resolve41(resolutionDir, `${artifactId}.resolved`)) {
147275
147748
  throw new ReleaseError(
147276
147749
  PATH_UNSAFE,
147277
147750
  "resolvedPath must be the exact materialized resolution file",
@@ -148714,7 +149187,7 @@ __export(route_exports, {
148714
149187
  });
148715
149188
  import { execFileSync } from "node:child_process";
148716
149189
  import { lstat as lstat50, readdir as readdir34, readFile as readFile56 } from "node:fs/promises";
148717
- import { relative as relative34, resolve as resolve41, basename as basename18, dirname as dirname25, join as join48 } from "node:path";
149190
+ import { relative as relative34, resolve as resolve42, basename as basename19, dirname as dirname26, join as join48 } from "node:path";
148718
149191
  function classifyPath(path40) {
148719
149192
  if (typeof path40 !== "string" || path40.length === 0) return "ignore";
148720
149193
  const p = path40.replace(/\\+/g, "/");
@@ -148759,7 +149232,7 @@ function bucketPaths(paths) {
148759
149232
  return { ...buckets, mixed: categoryCount > 1 };
148760
149233
  }
148761
149234
  async function classifyWorktreeDiff(root) {
148762
- const cwd = resolve41(root);
149235
+ const cwd = resolve42(root);
148763
149236
  let output;
148764
149237
  try {
148765
149238
  output = execFileSync(
@@ -148791,16 +149264,16 @@ async function classifyWorktreeDiff(root) {
148791
149264
  return bucketPaths(paths);
148792
149265
  }
148793
149266
  async function resolvePreviousReleaseCommit(root) {
148794
- const cwd = resolve41(root);
149267
+ const cwd = resolve42(root);
148795
149268
  try {
148796
- const plansDir = resolve41(cwd, ".release-skill", "plans");
149269
+ const plansDir = resolve42(cwd, ".release-skill", "plans");
148797
149270
  const planFiles = await readdir34(plansDir).catch(() => []);
148798
149271
  let best = null;
148799
149272
  for (const file of planFiles) {
148800
149273
  if (!file.endsWith(".json")) continue;
148801
149274
  let plan;
148802
149275
  try {
148803
- plan = JSON.parse(await readFile56(resolve41(plansDir, file), "utf8"));
149276
+ plan = JSON.parse(await readFile56(resolve42(plansDir, file), "utf8"));
148804
149277
  } catch {
148805
149278
  continue;
148806
149279
  }
@@ -148835,7 +149308,7 @@ async function objectExistsLocally(root, sha) {
148835
149308
  }
148836
149309
  }
148837
149310
  async function classifyBaselineSurface(root, prevCommit) {
148838
- const cwd = resolve41(root);
149311
+ const cwd = resolve42(root);
148839
149312
  let diffOutput = "";
148840
149313
  try {
148841
149314
  diffOutput = execFileSync(
@@ -148880,9 +149353,9 @@ async function classifyBaselineSurface(root, prevCommit) {
148880
149353
  return { status: "determinable", categories: buckets, kind, paths: allPaths };
148881
149354
  }
148882
149355
  async function readRunRouting(root, options = {}) {
148883
- const cwd = resolve41(root);
149356
+ const cwd = resolve42(root);
148884
149357
  const targetVersion = options.targetVersion ?? null;
148885
- const runsDir = resolve41(cwd, ".release-skill", "runs");
149358
+ const runsDir = resolve42(cwd, ".release-skill", "runs");
148886
149359
  let runDirs;
148887
149360
  try {
148888
149361
  runDirs = await readdir34(runsDir);
@@ -148920,8 +149393,8 @@ async function readRunRouting(root, options = {}) {
148920
149393
  const records = [];
148921
149394
  const diagnostics = [];
148922
149395
  for (const runDir of runDirs) {
148923
- let runPath = resolve41(runsDir, runDir, "release-run.json");
148924
- const runDirectory = resolve41(runsDir, runDir);
149396
+ let runPath = resolve42(runsDir, runDir, "release-run.json");
149397
+ const runDirectory = resolve42(runsDir, runDir);
148925
149398
  let authorityExists = false;
148926
149399
  let authorityMissing = false;
148927
149400
  let markerlessRunDebris = false;
@@ -148932,7 +149405,7 @@ async function readRunRouting(root, options = {}) {
148932
149405
  if (error.code === "ENOENT") {
148933
149406
  authorityMissing = true;
148934
149407
  if (/^(prepare|assess|hooks-validate)-/.test(runDir)) continue;
148935
- const statesPath = resolve41(runsDir, runDir, "states");
149408
+ const statesPath = resolve42(runsDir, runDir, "states");
148936
149409
  const stateInspection = await inspectStateDirectory(statesPath);
148937
149410
  if (!stateInspection.ok) {
148938
149411
  records.push({
@@ -148947,7 +149420,7 @@ async function readRunRouting(root, options = {}) {
148947
149420
  }
148948
149421
  const slots = stateInspection.entries.filter((name) => /^\d{6}\.json$/.test(name)).sort();
148949
149422
  if (slots.length > 0) {
148950
- runPath = resolve41(runsDir, runDir, "states", slots.at(-1));
149423
+ runPath = resolve42(runsDir, runDir, "states", slots.at(-1));
148951
149424
  authorityExists = true;
148952
149425
  }
148953
149426
  }
@@ -149191,7 +149664,7 @@ async function isProvenPreAuthorityFailure(runDir, runName) {
149191
149664
  const validLegacyTimestamp = /* @__PURE__ */ __name((value) => typeof value === "string" && /^\d{4}-\d{2}-\d{2}T\d{2}:\d{2}:\d{2}(?:\.\d+)?(?:Z|[+-]\d{2}:\d{2})$/.test(value) && Number.isFinite(Date.parse(value)), "validLegacyTimestamp");
149192
149665
  const validLegacyError = /* @__PURE__ */ __name((error) => error && typeof error === "object" && !Array.isArray(error) && typeof error.code === "string" && error.code.length > 0 && (error.message === void 0 || typeof error.message === "string"), "validLegacyError");
149193
149666
  const validLegacyEvent = /* @__PURE__ */ __name((event, runId) => event && typeof event === "object" && !Array.isArray(event) && event.schemaVersion === 1 && !Object.hasOwn(event, "producer") && typeof event.runId === "string" && event.runId === runId && Number.isSafeInteger(event.sequence) && event.sequence >= 1 && validLegacyTimestamp(event.timestamp) && event.command === "publish" && typeof event.phase === "string" && (legacyPreAuthorityPhases.has(event.phase) || event.phase === "publish") && typeof event.status === "string" && event.status.length > 0 && (event.error === void 0 || event.error === null || validLegacyError(event.error)) && (event.duration === void 0 || Number.isSafeInteger(event.duration) && event.duration >= 0) && (event.details === void 0 || event.details !== null && typeof event.details === "object" && !Array.isArray(event.details)), "validLegacyEvent");
149194
- const legacyRunId = basename18(runDir);
149667
+ const legacyRunId = basename19(runDir);
149195
149668
  const legacyTerminal = events.at(-1);
149196
149669
  const legacyValid = summary && summary.status === "FAILED" && validLegacyError(summary.error) && typeof summary.error.message === "string" && legacyInputFailure.test(summary.error.message) && !legacyUnsafeFailure.test(summary.error.message) && (summary.recoveryActionCode === void 0 || summary.recoveryActionCode === "RETRY_COMMAND") && summary.runPath === void 0 && summary.finalRunDigest === void 0 && summary.latestStatePath === void 0 && summary.checkpointStatuses === void 0 && Array.isArray(events) && events.length >= 2 && events.every((event, index) => validLegacyEvent(event, legacyRunId) && event.sequence === index + 1) && legacyTerminal.phase === "publish" && legacyTerminal.status === "failed" && validLegacyError(legacyTerminal.error) && legacyTerminal.error.code === summary.error.code && events.slice(0, -1).filter((event) => event.status === "failed").every((event) => event.phase === "safety-gate" && legacyPreAuthorityGates.has(event.gate) && validLegacyError(event.error)) && !events.some((event) => event.phase === "global-preflight-arbitration" && event.status !== "pre-observe") && !events.slice(0, -1).some((event) => event.phase === "publish" || /checkpoint|execute|postpublish/i.test(event.phase) || Object.hasOwn(event, "prePersistedRunPath") || Object.hasOwn(event, "checkpointCount") || Object.hasOwn(event, "checkpointStatuses"));
149197
149670
  if (legacyValid) return true;
@@ -149227,7 +149700,7 @@ async function isProvenPreAuthorityFailure(runDir, runName) {
149227
149700
  findingCount: /* @__PURE__ */ __name((value) => Number.isSafeInteger(value) && value >= 0, "findingCount")
149228
149701
  };
149229
149702
  const validDetails = /* @__PURE__ */ __name((value) => value === void 0 || value !== null && typeof value === "object" && !Array.isArray(value) && Object.entries(value).every(([key, detail]) => !detailValidators[key] || detailValidators[key](detail)), "validDetails");
149230
- const validEnvelope = /* @__PURE__ */ __name((event) => event && typeof event === "object" && Object.keys(event).every((key) => envelopeKeys.has(key)) && event.schemaVersion === 2 && typeof event.runId === "string" && event.runId === basename18(runDir) && Number.isSafeInteger(event.sequence) && event.sequence >= 1 && validTimestamp(event.timestamp) && event.command === "publish" && typeof event.phase === "string" && event.phase.length > 0 && typeof event.status === "string" && event.status.length > 0 && sameProducer(event.producer) && (event.error === void 0 || event.error === null || typeof event.error === "object" && !Array.isArray(event.error) && Object.keys(event.error).every((key) => key === "code" || key === "message") && typeof event.error.code === "string" && event.error.code.length > 0 && (event.error.message === void 0 || typeof event.error.message === "string")) && (event.duration === void 0 || Number.isSafeInteger(event.duration) && event.duration >= 0) && validDetails(event.details), "validEnvelope");
149703
+ const validEnvelope = /* @__PURE__ */ __name((event) => event && typeof event === "object" && Object.keys(event).every((key) => envelopeKeys.has(key)) && event.schemaVersion === 2 && typeof event.runId === "string" && event.runId === basename19(runDir) && Number.isSafeInteger(event.sequence) && event.sequence >= 1 && validTimestamp(event.timestamp) && event.command === "publish" && typeof event.phase === "string" && event.phase.length > 0 && typeof event.status === "string" && event.status.length > 0 && sameProducer(event.producer) && (event.error === void 0 || event.error === null || typeof event.error === "object" && !Array.isArray(event.error) && Object.keys(event.error).every((key) => key === "code" || key === "message") && typeof event.error.code === "string" && event.error.code.length > 0 && (event.error.message === void 0 || typeof event.error.message === "string")) && (event.duration === void 0 || Number.isSafeInteger(event.duration) && event.duration >= 0) && validDetails(event.details), "validEnvelope");
149231
149704
  if (summary.status !== "FAILED" || summary.recoveryActionCode !== "RETRY_COMMAND" || summary.evidencePath !== "evidence.jsonl" || !sameProducer(summary.producer) || !Array.isArray(events) || events.length === 0) return false;
149232
149705
  let previousSequence = 0;
149233
149706
  let firstFailure = null;
@@ -149283,7 +149756,7 @@ async function readLegacyPostverifyRecovery(runPath) {
149283
149756
  runPath: run6.sourceRunPath,
149284
149757
  production
149285
149758
  });
149286
- const summary = JSON.parse(await readFile56(join48(resolve41(runPath, ".."), "summary.json"), "utf8"));
149759
+ const summary = JSON.parse(await readFile56(join48(resolve42(runPath, ".."), "summary.json"), "utf8"));
149287
149760
  if (!summary || summary.status !== run6.status) {
149288
149761
  throw new ReleaseError(GATE_FAILED, "legacy postverify summary status does not match its sealed run status");
149289
149762
  }
@@ -149300,16 +149773,16 @@ async function readLegacyPostverifyRecovery(runPath) {
149300
149773
  throw new ReleaseError(GATE_FAILED, "legacy postverify DISTRIBUTED run has incomplete checkpoints");
149301
149774
  }
149302
149775
  return {
149303
- runPath: resolve41(runPath),
149776
+ runPath: resolve42(runPath),
149304
149777
  run: run6,
149305
149778
  plan,
149306
- lineage: [{ run: parent, runPath: resolve41(run6.sourceRunPath) }],
149779
+ lineage: [{ run: parent, runPath: resolve42(run6.sourceRunPath) }],
149307
149780
  recoveryActionCode: null,
149308
149781
  legacyPostverify: true
149309
149782
  };
149310
149783
  } catch (error) {
149311
149784
  return {
149312
- runPath: resolve41(runPath),
149785
+ runPath: resolve42(runPath),
149313
149786
  recoveryActionCode: "DIAGNOSE",
149314
149787
  diagnostic: { code: error.code ?? GATE_FAILED, message: error.message }
149315
149788
  };
@@ -149658,7 +150131,7 @@ Workflow Profiles:
149658
150131
 
149659
150132
  // bin/release-skill-cli.mjs
149660
150133
  import { readFile as readFile57 } from "node:fs/promises";
149661
- import { basename as basename19, dirname as dirname26, join as join49, resolve as resolve42 } from "node:path";
150134
+ import { basename as basename20, dirname as dirname27, isAbsolute as isAbsolute33, join as join49, normalize as normalize7, resolve as resolve43 } from "node:path";
149662
150135
  import { execFile as execFileCb22 } from "node:child_process";
149663
150136
  import { promisify as promisify26 } from "node:util";
149664
150137
 
@@ -149759,11 +150232,11 @@ function publicErrorDetails(error) {
149759
150232
  if (Object.keys(cause).length > 0) output.cause = cause;
149760
150233
  }
149761
150234
  if (Array.isArray(details.nextSteps)) {
149762
- const nextSteps = details.nextSteps.filter((step) => step && typeof step === "object" && !Array.isArray(step)).map((step) => ({
149763
- ...typeof step.code === "string" ? { code: step.code } : {},
149764
- ...typeof step.message === "string" ? { message: step.message } : {},
149765
- ...Array.isArray(step.argv) && step.argv.every((arg) => typeof arg === "string") ? { argv: [...step.argv] } : {}
149766
- })).filter((step) => Object.keys(step).length > 0);
150235
+ const nextSteps = details.nextSteps.filter((step2) => step2 && typeof step2 === "object" && !Array.isArray(step2)).map((step2) => ({
150236
+ ...typeof step2.code === "string" ? { code: step2.code } : {},
150237
+ ...typeof step2.message === "string" ? { message: step2.message } : {},
150238
+ ...Array.isArray(step2.argv) && step2.argv.every((arg) => typeof arg === "string") ? { argv: [...step2.argv] } : {}
150239
+ })).filter((step2) => Object.keys(step2).length > 0);
149767
150240
  if (nextSteps.length > 0) output.nextSteps = nextSteps;
149768
150241
  }
149769
150242
  return output;
@@ -150024,6 +150497,9 @@ Options:
150024
150497
  --hosts <ids> Comma-separated local hosts for post-release update: claude,codex,kimi,codebuddy,workbuddy,qoder,cursor. No local host is updated unless --hosts contains at least one id
150025
150498
  --cursor-plugins-root <absolute-directory> Required for Cursor Local installation/update; quit Cursor before running
150026
150499
  --confirm-plan <digest> Confirm the exact VERIFIED plan before local host mutation
150500
+ --finish Run the complete post-release finish orchestration and return COMPLETE/PENDING/FAILED
150501
+ --finish-feedback <absolute-json-file> Read bound agent-reported host loading and setup results
150502
+ --skip-local-hosts Explicitly skip host update, loading, and setup for this finish run
150027
150503
  --no-hook-cache Force every prepare hook to run in full; neither read nor write the hook cache
150028
150504
  --json Output results as JSON
150029
150505
  --version Show version and exit
@@ -150066,7 +150542,7 @@ if (!command && (args.includes("--version") || args.includes("-v"))) {
150066
150542
  } else {
150067
150543
  const { readFileSync: readFileSync17 } = await import("node:fs");
150068
150544
  const { fileURLToPath: fileURLToPath7 } = await import("node:url");
150069
- const pkgPath = join49(dirname26(fileURLToPath7(import.meta.url)), "..", "package.json");
150545
+ const pkgPath = join49(dirname27(fileURLToPath7(import.meta.url)), "..", "package.json");
150070
150546
  pkg = JSON.parse(readFileSync17(pkgPath, "utf8"));
150071
150547
  }
150072
150548
  if (hasJson) {
@@ -150359,7 +150835,7 @@ if (command === "verify-records") {
150359
150835
  if (command === "setup") {
150360
150836
  const rootIdx = args.indexOf("--root");
150361
150837
  const rawRoot = rootIdx !== -1 && args[rootIdx + 1] ? args[rootIdx + 1] : process.cwd();
150362
- const root = resolve42(rawRoot);
150838
+ const root = resolve43(rawRoot);
150363
150839
  const answersIdx = args.indexOf("--answers");
150364
150840
  const answersPath = answersIdx !== -1 && args[answersIdx + 1] ? args[answersIdx + 1] : void 0;
150365
150841
  const confirmationIdx = args.indexOf("--confirm-setup");
@@ -150475,7 +150951,7 @@ if (command === "setup") {
150475
150951
  if (command === "assess") {
150476
150952
  const rootIdx = args.indexOf("--root");
150477
150953
  const rawRoot = rootIdx !== -1 && args[rootIdx + 1] ? args[rootIdx + 1] : process.cwd();
150478
- const root = resolve42(rawRoot);
150954
+ const root = resolve43(rawRoot);
150479
150955
  const offline = args.includes("--offline") || !args.includes("--online");
150480
150956
  const outputIdx = args.indexOf("--output");
150481
150957
  const output = outputIdx !== -1 && args[outputIdx + 1] ? args[outputIdx + 1] : void 0;
@@ -150506,7 +150982,7 @@ if (command === "assess") {
150506
150982
  if (command === "hooks") {
150507
150983
  const subcommand = positional[1];
150508
150984
  const rootIdx = args.indexOf("--root");
150509
- const root = resolve42(rootIdx !== -1 && args[rootIdx + 1] ? args[rootIdx + 1] : process.cwd());
150985
+ const root = resolve43(rootIdx !== -1 && args[rootIdx + 1] ? args[rootIdx + 1] : process.cwd());
150510
150986
  if (subcommand !== "validate") {
150511
150987
  const message = "hooks requires subcommand: hooks validate";
150512
150988
  if (hasJson) console.log(JSON.stringify({ error: "MISSING_PARAMETERS", message }));
@@ -150573,7 +151049,7 @@ if (command === "ship") {
150573
151049
  const idx = args.indexOf(flag);
150574
151050
  return idx !== -1 && args[idx + 1] ? args[idx + 1] : void 0;
150575
151051
  }, "value");
150576
- const root = resolve42(value("--root") ?? process.cwd());
151052
+ const root = resolve43(value("--root") ?? process.cwd());
150577
151053
  const hasUnitSelection = args.includes("--unit");
150578
151054
  const unitIds = [];
150579
151055
  for (let i = 0; i < args.length; i += 1) {
@@ -150584,7 +151060,7 @@ if (command === "ship") {
150584
151060
  const postpublishApprovalPaths = [];
150585
151061
  for (let i = 0; i < args.length; i += 1) {
150586
151062
  if (args[i] === "--hook-approval" && args[i + 1]) {
150587
- postpublishApprovalPaths.push(resolve42(args[i + 1]));
151063
+ postpublishApprovalPaths.push(resolve43(args[i + 1]));
150588
151064
  }
150589
151065
  }
150590
151066
  try {
@@ -150658,14 +151134,14 @@ if (command === "ship") {
150658
151134
  const localHostUpdate = result2.postRelease.localHostUpdate;
150659
151135
  if (localHostUpdate?.promptRequired === true) {
150660
151136
  console.log(`Post-release: ask whether to update local host plugins (${result2.postRelease.localHostUpdate.hosts.join(", ")}).`);
150661
- if (localHostUpdate.available === true && typeof localHostUpdate.runPath === "string") {
150662
- console.log(`Post-release command: release-skill post-release --plan ${result2.planPath} --run ${localHostUpdate.runPath}`);
150663
- console.log("Choose --hosts before adding --update-local-hosts to perform a local update.");
151137
+ if (result2.postRelease.finishCommand) {
151138
+ console.log(`Post-release finish command: ${result2.postRelease.finishCommand.argv.join(" ")}`);
151139
+ console.log("Choose --hosts before adding --update-local-hosts, or use --skip-local-hosts.");
150664
151140
  }
150665
151141
  printHubManualTargets(localHostUpdate.targets);
150666
151142
  } else {
150667
- for (const step of localHostUpdate?.nextSteps ?? []) {
150668
- console.log(`Next [${step.code}] ${step.message} (${step.argv.join(" ")})`);
151143
+ for (const step2 of localHostUpdate?.nextSteps ?? []) {
151144
+ console.log(`Next [${step2.code}] ${step2.message} (${step2.argv.join(" ")})`);
150669
151145
  }
150670
151146
  }
150671
151147
  }
@@ -150696,7 +151172,7 @@ if (command === "attest") {
150696
151172
  const idx = args.indexOf(flag);
150697
151173
  return idx !== -1 && args[idx + 1] ? args[idx + 1] : void 0;
150698
151174
  }, "value");
150699
- const root = resolve42(value("--root") ?? process.cwd());
151175
+ const root = resolve43(value("--root") ?? process.cwd());
150700
151176
  try {
150701
151177
  const { recordManualAttestation: recordManualAttestation2 } = await Promise.resolve().then(() => (init_attest(), attest_exports));
150702
151178
  const result2 = await recordManualAttestation2({
@@ -150734,7 +151210,7 @@ if (command === "attest") {
150734
151210
  if (command === "prepare") {
150735
151211
  const rootIdx = args.indexOf("--root");
150736
151212
  const rawRoot = rootIdx !== -1 && args[rootIdx + 1] ? args[rootIdx + 1] : process.cwd();
150737
- const root = resolve42(rawRoot);
151213
+ const root = resolve43(rawRoot);
150738
151214
  const offline = args.includes("--offline") || !args.includes("--online");
150739
151215
  let targetVersion;
150740
151216
  for (const flag of ["--target-version", "--version"]) {
@@ -150753,9 +151229,9 @@ if (command === "prepare") {
150753
151229
  const testSelectionIdx = args.indexOf("--test-selection");
150754
151230
  const testSelection = testSelectionIdx !== -1 && args[testSelectionIdx + 1] ? args[testSelectionIdx + 1] : void 0;
150755
151231
  const outputIdx = args.indexOf("--output");
150756
- const output = outputIdx !== -1 && args[outputIdx + 1] ? resolve42(args[outputIdx + 1]) : void 0;
151232
+ const output = outputIdx !== -1 && args[outputIdx + 1] ? resolve43(args[outputIdx + 1]) : void 0;
150757
151233
  const runDirIdx = args.indexOf("--run-dir");
150758
- const runDir = runDirIdx !== -1 && args[runDirIdx + 1] ? resolve42(args[runDirIdx + 1]) : void 0;
151234
+ const runDir = runDirIdx !== -1 && args[runDirIdx + 1] ? resolve43(args[runDirIdx + 1]) : void 0;
150759
151235
  const hasUnitSelection = args.includes("--unit");
150760
151236
  const unitIds = [];
150761
151237
  for (let i = 0; i < args.length; i += 1) {
@@ -150812,8 +151288,8 @@ if (command === "prepare") {
150812
151288
  console.log(`Plan frozen at: ${result2.planPath}`);
150813
151289
  console.log(`Plan digest: ${result2.planDigest}`);
150814
151290
  console.log(`Evidence: ${result2.evidenceDir}`);
150815
- for (const step of result2.nextSteps ?? []) {
150816
- console.log(`Next [${step.code}] ${step.message}${step.argv ? ` (${step.argv.join(" ")})` : ""}`);
151291
+ for (const step2 of result2.nextSteps ?? []) {
151292
+ console.log(`Next [${step2.code}] ${step2.message}${step2.argv ? ` (${step2.argv.join(" ")})` : ""}`);
150817
151293
  }
150818
151294
  if (result2.releaseScope) {
150819
151295
  console.log(`Release scope: ${result2.releaseScope.selectedUnitIds.join(", ")}`);
@@ -150853,7 +151329,7 @@ if (command === "approve") {
150853
151329
  const actorIdx = args.indexOf("--actor");
150854
151330
  const actor = actorIdx !== -1 && args[actorIdx + 1] ? args[actorIdx + 1] : void 0;
150855
151331
  const outputIdx = args.indexOf("--output");
150856
- const outputPath = outputIdx !== -1 && args[outputIdx + 1] ? resolve42(args[outputIdx + 1]) : void 0;
151332
+ const outputPath = outputIdx !== -1 && args[outputIdx + 1] ? resolve43(args[outputIdx + 1]) : void 0;
150857
151333
  const hookIdx = args.indexOf("--hook");
150858
151334
  const hookId = hookIdx !== -1 && args[hookIdx + 1] ? args[hookIdx + 1] : void 0;
150859
151335
  const runIdIdx = args.indexOf("--run-id");
@@ -150871,7 +151347,7 @@ if (command === "approve") {
150871
151347
  try {
150872
151348
  const { approvePostPublishHook: approvePostPublishHook2 } = await init_approve().then(() => approve_exports);
150873
151349
  const record = await approvePostPublishHook2({
150874
- planPath: resolve42(planPath),
151350
+ planPath: resolve43(planPath),
150875
151351
  hookId,
150876
151352
  actor,
150877
151353
  ...runId ? { runId } : {}
@@ -150909,13 +151385,13 @@ if (command === "approve") {
150909
151385
  const { readFile: readFileFs } = await import("node:fs/promises");
150910
151386
  let resolvedDigest = expectedDigest;
150911
151387
  if (!resolvedDigest) {
150912
- const planRaw = await readFileFs(resolve42(planPath), "utf8");
151388
+ const planRaw = await readFileFs(resolve43(planPath), "utf8");
150913
151389
  const planObj = JSON.parse(planRaw);
150914
151390
  resolvedDigest = computePlanDigest2(planObj);
150915
151391
  }
150916
- const resolvedPlanPath = resolve42(planPath);
150917
- const planDir = dirname26(resolvedPlanPath);
150918
- const releaseDir = basename19(planDir) === "plans" && basename19(resolvedPlanPath) === `${resolvedDigest}.json` ? dirname26(planDir) : planDir;
151392
+ const resolvedPlanPath = resolve43(planPath);
151393
+ const planDir = dirname27(resolvedPlanPath);
151394
+ const releaseDir = basename20(planDir) === "plans" && basename20(resolvedPlanPath) === `${resolvedDigest}.json` ? dirname27(planDir) : planDir;
150919
151395
  const approvalPath = outputPath ?? join49(releaseDir, "approval-record.json");
150920
151396
  const record = await approvePlan2({ planPath, expectedDigest: resolvedDigest, actor, outputPath: approvalPath });
150921
151397
  if (hasJson) {
@@ -150943,13 +151419,13 @@ if (command === "approve") {
150943
151419
  if (command === "reconcile") {
150944
151420
  const rootIdx = args.indexOf("--root");
150945
151421
  const rawRoot = rootIdx !== -1 && args[rootIdx + 1] ? args[rootIdx + 1] : process.cwd();
150946
- const root = resolve42(rawRoot);
151422
+ const root = resolve43(rawRoot);
150947
151423
  const planIdx = args.indexOf("--plan");
150948
- const planPath = planIdx !== -1 && args[planIdx + 1] ? resolve42(args[planIdx + 1]) : void 0;
151424
+ const planPath = planIdx !== -1 && args[planIdx + 1] ? resolve43(args[planIdx + 1]) : void 0;
150949
151425
  const runIdx = args.indexOf("--run");
150950
- const runPath = runIdx !== -1 && args[runIdx + 1] ? resolve42(args[runIdx + 1]) : void 0;
151426
+ const runPath = runIdx !== -1 && args[runIdx + 1] ? resolve43(args[runIdx + 1]) : void 0;
150951
151427
  const approvalIdx = args.indexOf("--approval");
150952
- const approvalPath = approvalIdx !== -1 && args[approvalIdx + 1] ? resolve42(args[approvalIdx + 1]) : void 0;
151428
+ const approvalPath = approvalIdx !== -1 && args[approvalIdx + 1] ? resolve43(args[approvalIdx + 1]) : void 0;
150953
151429
  if (!planPath || !runPath) {
150954
151430
  const msg = "reconcile requires --plan <path> and --run <path>";
150955
151431
  if (hasJson) {
@@ -151007,8 +151483,55 @@ if (command === "post-release") {
151007
151483
  const idx = args.indexOf(flag);
151008
151484
  return idx !== -1 && args[idx + 1] ? args[idx + 1] : void 0;
151009
151485
  }, "value");
151010
- const planPath = value("--plan") ? resolve42(value("--plan")) : void 0;
151011
- const runPath = value("--run") ? resolve42(value("--run")) : void 0;
151486
+ const planPath = value("--plan") ? resolve43(value("--plan")) : void 0;
151487
+ const runPath = value("--run") ? resolve43(value("--run")) : void 0;
151488
+ const finishRequested = args.includes("--finish");
151489
+ const skipLocalHosts = args.includes("--skip-local-hosts");
151490
+ const feedbackValue = value("--finish-feedback");
151491
+ if (finishRequested || skipLocalHosts || args.includes("--finish-feedback")) {
151492
+ const valued = /* @__PURE__ */ new Set([
151493
+ "--root",
151494
+ "--plan",
151495
+ "--run",
151496
+ "--confirm-plan",
151497
+ "--hosts",
151498
+ "--cursor-plugins-root",
151499
+ "--finish-feedback"
151500
+ ]);
151501
+ const booleans = /* @__PURE__ */ new Set(["--finish", "--skip-local-hosts", "--update-local-hosts", "--json"]);
151502
+ const seen = /* @__PURE__ */ new Set();
151503
+ let parameterError;
151504
+ for (let index = 1; index < args.length; index += 1) {
151505
+ const token = args[index];
151506
+ if (valued.has(token)) {
151507
+ if (seen.has(token)) parameterError ??= `post-release finish does not accept duplicate ${token}`;
151508
+ seen.add(token);
151509
+ const next = args[index + 1];
151510
+ if (!next || next.startsWith("-")) parameterError ??= `post-release finish requires a value for ${token}`;
151511
+ else index += 1;
151512
+ continue;
151513
+ }
151514
+ if (booleans.has(token)) {
151515
+ if (seen.has(token)) parameterError ??= `post-release finish does not accept duplicate ${token}`;
151516
+ seen.add(token);
151517
+ continue;
151518
+ }
151519
+ parameterError ??= `post-release finish does not accept ${token}`;
151520
+ }
151521
+ const rawHosts = value("--hosts");
151522
+ if (!finishRequested) parameterError ??= "--skip-local-hosts and --finish-feedback require --finish";
151523
+ if (skipLocalHosts && (args.includes("--update-local-hosts") || typeof rawHosts === "string" && rawHosts.trim().length > 0)) {
151524
+ parameterError ??= "--skip-local-hosts conflicts with --update-local-hosts and --hosts";
151525
+ }
151526
+ if (feedbackValue && (!isAbsolute33(feedbackValue) || normalize7(feedbackValue) !== feedbackValue)) {
151527
+ parameterError ??= "--finish-feedback requires a normalized absolute JSON file path";
151528
+ }
151529
+ if (parameterError) {
151530
+ if (hasJson) console.log(JSON.stringify({ error: "POST_RELEASE_FINISH_INVALID", message: parameterError, exitCode: 1 }));
151531
+ else console.error(`Error: ${parameterError}`);
151532
+ await exitAfterFlush(1);
151533
+ }
151534
+ }
151012
151535
  if (!planPath || !runPath) {
151013
151536
  const message = "post-release requires --plan <path> and --run <verify-or-postverify-run-path>";
151014
151537
  if (hasJson) console.log(JSON.stringify({ error: "MISSING_PARAMETERS", message, exitCode: 1 }));
@@ -151033,7 +151556,7 @@ if (command === "post-release") {
151033
151556
  requireDigest: true,
151034
151557
  authorityPlanPath: planPath
151035
151558
  });
151036
- if (!updateRequested) {
151559
+ if (!updateRequested || finishRequested) {
151037
151560
  const { assertLocalFinishRun: assertLocalFinishRun2 } = await init_post_release_local().then(() => post_release_local_exports);
151038
151561
  await assertLocalFinishRun2({
151039
151562
  plan,
@@ -151041,26 +151564,49 @@ if (command === "post-release") {
151041
151564
  runPath: resolvedRunPath,
151042
151565
  runRecord,
151043
151566
  production: Boolean(plan.production),
151044
- root: resolve42(value("--root") ?? process.cwd())
151567
+ root: resolve43(value("--root") ?? process.cwd())
151045
151568
  });
151046
151569
  }
151047
151570
  const hostsIndex = args.indexOf("--hosts");
151048
151571
  const rawHosts = hostsIndex !== -1 && args[hostsIndex + 1] && !args[hostsIndex + 1].startsWith("--") ? args[hostsIndex + 1] : "";
151049
151572
  const selectedHosts = rawHosts.split(",").map((host) => host.trim()).filter(Boolean);
151050
- const result2 = updateRequested ? await updateLocalHostPlugins2({
151573
+ const root = resolve43(value("--root") ?? process.cwd());
151574
+ const result2 = finishRequested ? await (async () => {
151575
+ const { runPostReleaseFinish: runPostReleaseFinish2 } = await init_post_release_finish().then(() => post_release_finish_exports);
151576
+ return runPostReleaseFinish2({
151577
+ root,
151578
+ plan,
151579
+ planPath,
151580
+ runPath: resolvedRunPath,
151581
+ selectedHosts,
151582
+ updateRequested,
151583
+ skipLocalHosts,
151584
+ confirmPlanDigest: value("--confirm-plan"),
151585
+ cursorPluginsRoot: value("--cursor-plugins-root"),
151586
+ feedbackPath: feedbackValue
151587
+ });
151588
+ })() : updateRequested ? await updateLocalHostPlugins2({
151051
151589
  planPath,
151052
151590
  runPath: resolvedRunPath,
151053
- root: resolve42(value("--root") ?? process.cwd()),
151591
+ root,
151054
151592
  confirmPlanDigest: value("--confirm-plan"),
151055
151593
  selectedHosts,
151056
151594
  cursorPluginsRoot: value("--cursor-plugins-root")
151057
151595
  }) : derivePostReleaseChecklist2(plan, {
151058
151596
  runPath: runRecord.command === "postverify" && runRecord.status === "DISTRIBUTED" ? resolvedRunPath : runRecord.command === "verify" ? resolvedRunPath : void 0,
151059
- root: resolve42(value("--root") ?? process.cwd()),
151597
+ root: resolve43(value("--root") ?? process.cwd()),
151060
151598
  postVerifyComplete: runRecord.command === "postverify" && runRecord.status === "DISTRIBUTED"
151061
151599
  });
151062
151600
  if (hasJson) {
151063
151601
  console.log(JSON.stringify(result2, null, 2));
151602
+ } else if (finishRequested) {
151603
+ console.log(`Post-release finish: ${result2.finish.status}`);
151604
+ for (const [name, outcome] of Object.entries(result2.finish.steps)) {
151605
+ console.log(` ${name}: ${outcome.status} - ${outcome.summary}`);
151606
+ }
151607
+ for (const action of result2.finish.nextActions) {
151608
+ console.log(`Next [${action.type}] ${JSON.stringify(action)}`);
151609
+ }
151064
151610
  } else if (!updateRequested) {
151065
151611
  console.log(`Post-release status: ${result2.status}`);
151066
151612
  if (result2.merge.promptRequired) console.log("Ask whether the user wants to merge the remaining branch.");
@@ -151073,8 +151619,8 @@ if (command === "post-release") {
151073
151619
  }
151074
151620
  printHubManualTargets(result2.localHostUpdate.targets);
151075
151621
  } else {
151076
- for (const step of result2.localHostUpdate.nextSteps ?? []) {
151077
- console.log(`Next [${step.code}] ${step.message} (${step.argv.join(" ")})`);
151622
+ for (const step2 of result2.localHostUpdate.nextSteps ?? []) {
151623
+ console.log(`Next [${step2.code}] ${step2.message} (${step2.argv.join(" ")})`);
151078
151624
  }
151079
151625
  }
151080
151626
  } else {
@@ -151084,6 +151630,9 @@ if (command === "post-release") {
151084
151630
  }
151085
151631
  console.log("The release remains VERIFIED; restart updated hosts before using the new plugin bytes.");
151086
151632
  }
151633
+ if (finishRequested) {
151634
+ await exitAfterFlush(result2.finish.status === "COMPLETE" ? 0 : result2.finish.status === "PENDING" ? 2 : 1);
151635
+ }
151087
151636
  const success = !updateRequested || ["UPDATED", "ALREADY_CURRENT", "NO_APPLICABLE_HOSTS"].includes(result2.status);
151088
151637
  await exitAfterFlush(success ? 0 : 1);
151089
151638
  } catch (err) {
@@ -151096,8 +151645,8 @@ if (command === "post-release") {
151096
151645
  }));
151097
151646
  } else {
151098
151647
  console.error(`Error: ${err.message}`);
151099
- for (const step of err.details?.nextSteps ?? []) {
151100
- console.error(`Next [${step.code}] ${step.message} (${step.argv.join(" ")})`);
151648
+ for (const step2 of err.details?.nextSteps ?? []) {
151649
+ console.error(`Next [${step2.code}] ${step2.message} (${step2.argv.join(" ")})`);
151101
151650
  }
151102
151651
  }
151103
151652
  await exitAfterFlush(err.exitCode ?? 1);
@@ -151110,11 +151659,11 @@ if (command === "verify") {
151110
151659
  }, "cursorValue");
151111
151660
  const rootIdx = args.indexOf("--root");
151112
151661
  const rawRoot = rootIdx !== -1 && args[rootIdx + 1] ? args[rootIdx + 1] : process.cwd();
151113
- const root = resolve42(rawRoot);
151662
+ const root = resolve43(rawRoot);
151114
151663
  const planIdx = args.indexOf("--plan");
151115
- const planPath = planIdx !== -1 && args[planIdx + 1] ? resolve42(args[planIdx + 1]) : void 0;
151664
+ const planPath = planIdx !== -1 && args[planIdx + 1] ? resolve43(args[planIdx + 1]) : void 0;
151116
151665
  const runIdx = args.indexOf("--run");
151117
- const runPath = runIdx !== -1 && args[runIdx + 1] ? resolve42(args[runIdx + 1]) : void 0;
151666
+ const runPath = runIdx !== -1 && args[runIdx + 1] ? resolve43(args[runIdx + 1]) : void 0;
151118
151667
  const verificationGatesAuthorized = args.includes("--acknowledge-gate-side-effects");
151119
151668
  if (!planPath || !runPath) {
151120
151669
  const msg = "verify requires --plan <path> and --run <path>";
@@ -151156,7 +151705,11 @@ if (command === "verify") {
151156
151705
  } = await init_post_release_local().then(() => post_release_local_exports);
151157
151706
  const plan = JSON.parse(await readFile57(planPath, "utf8"));
151158
151707
  try {
151159
- result2.postRelease = derivePostReleaseChecklist2(plan, { root, runPath: result2.runPath });
151708
+ result2.postRelease = derivePostReleaseChecklist2(plan, {
151709
+ root,
151710
+ planPath,
151711
+ runPath: result2.runPath
151712
+ });
151160
151713
  } catch (error) {
151161
151714
  result2.postRelease = unavailablePostReleaseChecklist2(plan, error);
151162
151715
  }
@@ -151183,14 +151736,14 @@ if (command === "verify") {
151183
151736
  }
151184
151737
  if (result2.postRelease?.localHostUpdate?.promptRequired === true) {
151185
151738
  console.log(`Post-release: ask whether to update local host plugins (${result2.postRelease.localHostUpdate.hosts.join(", ")}).`);
151186
- if (result2.postRelease.localHostUpdate.available === true && typeof result2.postRelease.localHostUpdate.runPath === "string") {
151187
- console.log(`Post-release command: release-skill post-release --plan ${planPath} --run ${result2.postRelease.localHostUpdate.runPath}`);
151188
- console.log("Choose --hosts before adding --update-local-hosts to perform a local update.");
151739
+ if (result2.postRelease.finishCommand) {
151740
+ console.log(`Post-release finish command: ${result2.postRelease.finishCommand.argv.join(" ")}`);
151741
+ console.log("Choose --hosts before adding --update-local-hosts, or use --skip-local-hosts.");
151189
151742
  }
151190
151743
  printHubManualTargets(result2.postRelease.localHostUpdate.targets);
151191
151744
  } else {
151192
- for (const step of result2.postRelease?.localHostUpdate?.nextSteps ?? []) {
151193
- console.log(`Next [${step.code}] ${step.message} (${step.argv.join(" ")})`);
151745
+ for (const step2 of result2.postRelease?.localHostUpdate?.nextSteps ?? []) {
151746
+ console.log(`Next [${step2.code}] ${step2.message} (${step2.argv.join(" ")})`);
151194
151747
  }
151195
151748
  }
151196
151749
  }
@@ -151264,7 +151817,7 @@ This command creates an independent postVerify run and never reads or writes shi
151264
151817
  }
151265
151818
  return firstValue;
151266
151819
  }, "value");
151267
- const root = resolve42(value("--root") ?? process.cwd());
151820
+ const root = resolve43(value("--root") ?? process.cwd());
151268
151821
  const planPath = value("--plan");
151269
151822
  const approvalPath = value("--approval");
151270
151823
  const runPath = value("--run");
@@ -151275,7 +151828,7 @@ This command creates an independent postVerify run and never reads or writes shi
151275
151828
  if (!next || next.startsWith("-")) {
151276
151829
  malformedValuedFlag ??= "--hook-approval";
151277
151830
  } else {
151278
- postpublishApprovalPaths.push(resolve42(next));
151831
+ postpublishApprovalPaths.push(resolve43(next));
151279
151832
  }
151280
151833
  }
151281
151834
  }
@@ -151291,9 +151844,9 @@ This command creates an independent postVerify run and never reads or writes shi
151291
151844
  try {
151292
151845
  const { postVerifyRelease: postVerifyRelease2 } = await init_postverify().then(() => postverify_exports);
151293
151846
  const result2 = await postVerifyRelease2({
151294
- planPath: resolve42(planPath),
151295
- approvalPath: resolve42(approvalPath),
151296
- sourceRunPath: resolve42(runPath),
151847
+ planPath: resolve43(planPath),
151848
+ approvalPath: resolve43(approvalPath),
151849
+ sourceRunPath: resolve43(runPath),
151297
151850
  root,
151298
151851
  ...postpublishApprovalPaths.length > 0 ? { postpublishApprovalPaths } : {}
151299
151852
  });
@@ -151304,9 +151857,10 @@ This command creates an independent postVerify run and never reads or writes shi
151304
151857
  } = await init_post_release_local().then(() => post_release_local_exports);
151305
151858
  let plan;
151306
151859
  try {
151307
- plan = JSON.parse(await readFile57(resolve42(planPath), "utf8"));
151860
+ plan = JSON.parse(await readFile57(resolve43(planPath), "utf8"));
151308
151861
  result2.postRelease = derivePostReleaseChecklist2(plan, {
151309
151862
  root,
151863
+ planPath: resolve43(planPath),
151310
151864
  runPath: result2.runPath,
151311
151865
  postVerifyComplete: true
151312
151866
  });
@@ -151327,9 +151881,9 @@ This command creates an independent postVerify run and never reads or writes shi
151327
151881
  } else if (result2.postRelease?.localHostUpdate?.promptRequired === true) {
151328
151882
  const localHostUpdate = result2.postRelease.localHostUpdate;
151329
151883
  console.log(`Post-release: ask whether to update local host plugins (${localHostUpdate.hosts.join(", ")}).`);
151330
- if (localHostUpdate.available === true && typeof localHostUpdate.runPath === "string") {
151331
- console.log(`Post-release command: release-skill post-release --plan ${resolve42(planPath)} --run ${localHostUpdate.runPath}`);
151332
- console.log("Choose --hosts before adding --update-local-hosts to perform a local update.");
151884
+ if (result2.postRelease.finishCommand) {
151885
+ console.log(`Post-release finish command: ${result2.postRelease.finishCommand.argv.join(" ")}`);
151886
+ console.log("Choose --hosts before adding --update-local-hosts, or use --skip-local-hosts.");
151333
151887
  }
151334
151888
  printHubManualTargets(localHostUpdate.targets);
151335
151889
  }
@@ -151352,11 +151906,11 @@ This command creates an independent postVerify run and never reads or writes shi
151352
151906
  if (command === "publish") {
151353
151907
  const rootIdx = args.indexOf("--root");
151354
151908
  const rawRoot = rootIdx !== -1 && args[rootIdx + 1] ? args[rootIdx + 1] : process.cwd();
151355
- const root = resolve42(rawRoot);
151909
+ const root = resolve43(rawRoot);
151356
151910
  const planIdx = args.indexOf("--plan");
151357
- const planPath = planIdx !== -1 && args[planIdx + 1] ? resolve42(args[planIdx + 1]) : void 0;
151911
+ const planPath = planIdx !== -1 && args[planIdx + 1] ? resolve43(args[planIdx + 1]) : void 0;
151358
151912
  const approvalIdx = args.indexOf("--approval");
151359
- const approvalPath = approvalIdx !== -1 && args[approvalIdx + 1] ? resolve42(args[approvalIdx + 1]) : void 0;
151913
+ const approvalPath = approvalIdx !== -1 && args[approvalIdx + 1] ? resolve43(args[approvalIdx + 1]) : void 0;
151360
151914
  if (!planPath || !approvalPath) {
151361
151915
  const msg = "publish requires --plan <path> and --approval <path>";
151362
151916
  if (hasJson) {
@@ -151412,9 +151966,9 @@ if (command === "publish") {
151412
151966
  if (command === "artifacts") {
151413
151967
  const rootIdx = args.indexOf("--root");
151414
151968
  const rawRoot = rootIdx !== -1 && args[rootIdx + 1] ? args[rootIdx + 1] : process.cwd();
151415
- const root = resolve42(rawRoot);
151969
+ const root = resolve43(rawRoot);
151416
151970
  const outputIdx = args.indexOf("--output");
151417
- const output = outputIdx !== -1 && args[outputIdx + 1] ? resolve42(args[outputIdx + 1]) : void 0;
151971
+ const output = outputIdx !== -1 && args[outputIdx + 1] ? resolve43(args[outputIdx + 1]) : void 0;
151418
151972
  const subcommand = positional[1] ?? "status";
151419
151973
  try {
151420
151974
  const { runArtifactsCommand: runArtifactsCommand2 } = await init_artifacts().then(() => artifacts_exports);
@@ -151481,7 +152035,7 @@ if (command === "docs") {
151481
152035
  );
151482
152036
  }
151483
152037
  }
151484
- const root = resolve42(rawRoot);
152038
+ const root = resolve43(rawRoot);
151485
152039
  const valuedDocsFlags = /* @__PURE__ */ new Set(["--root", "--unit", "--confirm-refresh"]);
151486
152040
  const booleanDocsFlags = /* @__PURE__ */ new Set(["--json", "--write", "--ack-local-document-write"]);
151487
152041
  let docsSubcommand;
@@ -151564,7 +152118,7 @@ if (command === "distribute") {
151564
152118
  const idx = args.indexOf(flag);
151565
152119
  return idx !== -1 && args[idx + 1] ? args[idx + 1] : void 0;
151566
152120
  }, "value");
151567
- const root = resolve42(value("--root") ?? process.cwd());
152121
+ const root = resolve43(value("--root") ?? process.cwd());
151568
152122
  const planPath = value("--plan");
151569
152123
  const approvalPath = value("--approval");
151570
152124
  const runPath = value("--run");
@@ -151572,7 +152126,7 @@ if (command === "distribute") {
151572
152126
  const postpublishApprovalPaths = [];
151573
152127
  for (let i = 0; i < args.length; i += 1) {
151574
152128
  if (args[i] === "--hook-approval" && args[i + 1]) {
151575
- postpublishApprovalPaths.push(resolve42(args[i + 1]));
152129
+ postpublishApprovalPaths.push(resolve43(args[i + 1]));
151576
152130
  }
151577
152131
  }
151578
152132
  if (args.includes("--list-presets")) {