release-skill 0.9.3 → 0.9.5

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 (79) hide show
  1. package/.claude-plugin/marketplace.json +1 -1
  2. package/.claude-plugin/plugin.json +1 -1
  3. package/.codebuddy-plugin/plugin.json +1 -1
  4. package/.codex-plugin/plugin.json +2 -2
  5. package/.kimi-plugin/plugin.json +1 -1
  6. package/CHANGELOG.md +58 -0
  7. package/INSTALL.md +2 -2
  8. package/INSTALL.zh-CN.md +2 -2
  9. package/README.md +52 -16
  10. package/README.zh-CN.md +46 -16
  11. package/adapters/claude/.claude-plugin/marketplace.json +1 -1
  12. package/adapters/claude/.claude-plugin/plugin.json +1 -1
  13. package/adapters/claude/bin/consumer-contract-vectors.json +7 -7
  14. package/adapters/claude/bin/foundation-resource-binding.json +1 -1
  15. package/adapters/claude/bin/release-skill.bundle.mjs +1513 -352
  16. package/adapters/claude/schemas/release-plan.schema.json +36 -0
  17. package/adapters/claude/schemas/release-project.schema.json +31 -0
  18. package/adapters/claude/skills/release-finish/SKILL.md +5 -5
  19. package/adapters/claude/skills/release-help/SKILL.md +11 -4
  20. package/adapters/claude/skills/release-prepare/SKILL.md +11 -3
  21. package/adapters/claude/skills/release-verify/SKILL.md +2 -1
  22. package/adapters/codex/.codex-plugin/plugin.json +2 -2
  23. package/adapters/codex/bin/consumer-contract-vectors.json +7 -7
  24. package/adapters/codex/bin/foundation-resource-binding.json +1 -1
  25. package/adapters/codex/bin/release-skill.bundle.mjs +1513 -352
  26. package/adapters/codex/schemas/release-plan.schema.json +36 -0
  27. package/adapters/codex/schemas/release-project.schema.json +31 -0
  28. package/adapters/codex/skills/release-finish/SKILL.md +5 -5
  29. package/adapters/codex/skills/release-help/SKILL.md +11 -4
  30. package/adapters/codex/skills/release-prepare/SKILL.md +11 -3
  31. package/adapters/codex/skills/release-verify/SKILL.md +2 -1
  32. package/adapters/kimi/.kimi-plugin/plugin.json +1 -1
  33. package/adapters/kimi/bin/consumer-contract-vectors.json +7 -7
  34. package/adapters/kimi/bin/foundation-resource-binding.json +1 -1
  35. package/adapters/kimi/bin/release-skill.bundle.mjs +1513 -352
  36. package/adapters/kimi/schemas/release-plan.schema.json +36 -0
  37. package/adapters/kimi/schemas/release-project.schema.json +31 -0
  38. package/adapters/kimi/skills/release-finish/SKILL.md +5 -5
  39. package/adapters/kimi/skills/release-help/SKILL.md +11 -4
  40. package/adapters/kimi/skills/release-prepare/SKILL.md +11 -3
  41. package/adapters/kimi/skills/release-verify/SKILL.md +2 -1
  42. package/adapters/workbuddy/.codebuddy-plugin/plugin.json +1 -1
  43. package/adapters/workbuddy/bin/consumer-contract-vectors.json +7 -7
  44. package/adapters/workbuddy/bin/foundation-resource-binding.json +1 -1
  45. package/adapters/workbuddy/bin/release-skill.bundle.mjs +1513 -352
  46. package/adapters/workbuddy/schemas/release-plan.schema.json +36 -0
  47. package/adapters/workbuddy/schemas/release-project.schema.json +31 -0
  48. package/adapters/workbuddy/skills/release-finish/SKILL.md +5 -5
  49. package/adapters/workbuddy/skills/release-help/SKILL.md +11 -4
  50. package/adapters/workbuddy/skills/release-prepare/SKILL.md +11 -3
  51. package/adapters/workbuddy/skills/release-verify/SKILL.md +2 -1
  52. package/bin/consumer-contract-vectors.json +7 -7
  53. package/bin/foundation-resource-binding.json +1 -1
  54. package/bin/release-skill-cli.mjs +113 -22
  55. package/bin/release-skill.bundle.mjs +1513 -352
  56. package/package.json +4 -4
  57. package/platform-manifest.json +4 -4
  58. package/references/.render-manifest.json +4 -4
  59. package/references/01-state-machine.md +18 -0
  60. package/references/02-project-config.md +20 -0
  61. package/schemas/release-plan.schema.json +36 -0
  62. package/schemas/release-project.schema.json +31 -0
  63. package/skills/release-finish/SKILL.md +5 -5
  64. package/skills/release-help/SKILL.md +11 -4
  65. package/skills/release-prepare/SKILL.md +11 -3
  66. package/skills/release-verify/SKILL.md +2 -1
  67. package/skills-src/release-finish/SKILL.md +5 -5
  68. package/skills-src/release-help/SKILL.md +11 -4
  69. package/skills-src/release-prepare/SKILL.md +11 -3
  70. package/skills-src/release-verify/SKILL.md +2 -1
  71. package/src/commands/post-release-local.mjs +373 -26
  72. package/src/commands/prepare.mjs +361 -16
  73. package/src/commands/ship.mjs +190 -13
  74. package/src/commands/verify.mjs +175 -2
  75. package/src/core/foundation-plugin-verification.mjs +22 -2
  76. package/src/core/plan.mjs +45 -1
  77. package/src/platforms/registry.mjs +97 -0
  78. package/src/producers/foundation-resource-projection.mjs +3 -3
  79. package/src/readme/contract.mjs +23 -3
@@ -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.3"});
12
+ const __bundlePkg = Object.freeze({"name":"release-skill","version":"0.9.5"});
13
13
  // Build-time source digest for the BUNDLE_STALE freshness gate (see above).
14
- const __bundleSourceDigest = "89f84bcd1ad3059c3590a490101b83f8fae25fe0f428345969fdc33f8600b18e";
14
+ const __bundleSourceDigest = "cbcc967eb1306a8f2e88e404a9ffbdb8bfaf0ffb8863fe8c5521cbb4d44346c1";
15
15
 
16
16
  var __create = Object.create;
17
17
  var __defProp = Object.defineProperty;
@@ -48,16 +48,16 @@ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__ge
48
48
  mod
49
49
  ));
50
50
 
51
- // ../../node_modules/.pnpm/skill-family-harness-node@0.15.0_@pnpm+logger@1001.0.1/node_modules/skill-family-harness-node/src/version.mjs
51
+ // ../../node_modules/.pnpm/skill-family-harness-node@0.16.0_@pnpm+logger@1001.0.1/node_modules/skill-family-harness-node/src/version.mjs
52
52
  var init_version = __esm({
53
- "../../node_modules/.pnpm/skill-family-harness-node@0.15.0_@pnpm+logger@1001.0.1/node_modules/skill-family-harness-node/src/version.mjs"() {
53
+ "../../node_modules/.pnpm/skill-family-harness-node@0.16.0_@pnpm+logger@1001.0.1/node_modules/skill-family-harness-node/src/version.mjs"() {
54
54
  }
55
55
  });
56
56
 
57
- // ../../node_modules/.pnpm/skill-family-contracts@0.15.0/node_modules/skill-family-contracts/src/stability.mjs
57
+ // ../../node_modules/.pnpm/skill-family-contracts@0.16.0/node_modules/skill-family-contracts/src/stability.mjs
58
58
  var CAPABILITY_MATURITY_LEVELS, CANDIDATE_PROMOTION_POLICY, HISTORICAL_CANDIDATE_MIGRATION_POLICY;
59
59
  var init_stability = __esm({
60
- "../../node_modules/.pnpm/skill-family-contracts@0.15.0/node_modules/skill-family-contracts/src/stability.mjs"() {
60
+ "../../node_modules/.pnpm/skill-family-contracts@0.16.0/node_modules/skill-family-contracts/src/stability.mjs"() {
61
61
  CAPABILITY_MATURITY_LEVELS = Object.freeze([
62
62
  "experimental",
63
63
  "candidate",
@@ -100,7 +100,7 @@ var init_stability = __esm({
100
100
  }
101
101
  });
102
102
 
103
- // ../../node_modules/.pnpm/skill-family-contracts@0.15.0/node_modules/skill-family-contracts/src/errors.mjs
103
+ // ../../node_modules/.pnpm/skill-family-contracts@0.16.0/node_modules/skill-family-contracts/src/errors.mjs
104
104
  import { readFileSync } from "node:fs";
105
105
  function deepFreeze(obj) {
106
106
  if (obj === null || typeof obj !== "object") return obj;
@@ -118,7 +118,7 @@ function isRegisteredErrorCode(code) {
118
118
  }
119
119
  var ERROR_REGISTRY, CODE_INDEX, ContractsError, ERROR_CODES;
120
120
  var init_errors = __esm({
121
- "../../node_modules/.pnpm/skill-family-contracts@0.15.0/node_modules/skill-family-contracts/src/errors.mjs"() {
121
+ "../../node_modules/.pnpm/skill-family-contracts@0.16.0/node_modules/skill-family-contracts/src/errors.mjs"() {
122
122
  __name(deepFreeze, "deepFreeze");
123
123
  ERROR_REGISTRY = deepFreeze(JSON.parse(
124
124
  readFileSync(new URL("./error-codes.json", import.meta.url), "utf8")
@@ -140,7 +140,7 @@ var init_errors = __esm({
140
140
  }
141
141
  });
142
142
 
143
- // ../../node_modules/.pnpm/skill-family-contracts@0.15.0/node_modules/skill-family-contracts/src/registry.mjs
143
+ // ../../node_modules/.pnpm/skill-family-contracts@0.16.0/node_modules/skill-family-contracts/src/registry.mjs
144
144
  import { readFileSync as readFileSync2 } from "node:fs";
145
145
  function deepFreeze2(obj) {
146
146
  if (obj === null || typeof obj !== "object") return obj;
@@ -164,7 +164,7 @@ function findSchemaByObject(object, registry = REGISTRY) {
164
164
  }
165
165
  var REGISTRY;
166
166
  var init_registry = __esm({
167
- "../../node_modules/.pnpm/skill-family-contracts@0.15.0/node_modules/skill-family-contracts/src/registry.mjs"() {
167
+ "../../node_modules/.pnpm/skill-family-contracts@0.16.0/node_modules/skill-family-contracts/src/registry.mjs"() {
168
168
  init_errors();
169
169
  __name(deepFreeze2, "deepFreeze");
170
170
  REGISTRY = deepFreeze2(JSON.parse(
@@ -8245,7 +8245,7 @@ var require__ = __commonJS({
8245
8245
  }
8246
8246
  });
8247
8247
 
8248
- // ../../node_modules/.pnpm/skill-family-contracts@0.15.0/node_modules/skill-family-contracts/src/validator.mjs
8248
+ // ../../node_modules/.pnpm/skill-family-contracts@0.16.0/node_modules/skill-family-contracts/src/validator.mjs
8249
8249
  import { readFileSync as readFileSync3 } from "node:fs";
8250
8250
  function detectDialect(schema2) {
8251
8251
  const uri = schema2 && schema2.$schema;
@@ -8374,7 +8374,7 @@ function validateDocument(document2, { schemaId, schema: schema2, dialect, polic
8374
8374
  }
8375
8375
  var import_ajv, import__, SUPPORTED_DIALECTS, DIALECT_CONSTRUCTORS, VALIDATION_POLICIES, DATE_TIME_PATTERN, instanceCache, packageSchemasCache;
8376
8376
  var init_validator = __esm({
8377
- "../../node_modules/.pnpm/skill-family-contracts@0.15.0/node_modules/skill-family-contracts/src/validator.mjs"() {
8377
+ "../../node_modules/.pnpm/skill-family-contracts@0.16.0/node_modules/skill-family-contracts/src/validator.mjs"() {
8378
8378
  import_ajv = __toESM(require_ajv(), 1);
8379
8379
  import__ = __toESM(require__(), 1);
8380
8380
  init_errors();
@@ -8418,7 +8418,7 @@ var init_validator = __esm({
8418
8418
  }
8419
8419
  });
8420
8420
 
8421
- // ../../node_modules/.pnpm/skill-family-contracts@0.15.0/node_modules/skill-family-contracts/src/kernel.mjs
8421
+ // ../../node_modules/.pnpm/skill-family-contracts@0.16.0/node_modules/skill-family-contracts/src/kernel.mjs
8422
8422
  import { readFileSync as readFileSync4 } from "node:fs";
8423
8423
  function deepFreeze3(obj) {
8424
8424
  if (obj === null || typeof obj !== "object") return obj;
@@ -8433,7 +8433,7 @@ function deepFreeze3(obj) {
8433
8433
  }
8434
8434
  var import_ajv2, KERNEL, paramsAjv;
8435
8435
  var init_kernel = __esm({
8436
- "../../node_modules/.pnpm/skill-family-contracts@0.15.0/node_modules/skill-family-contracts/src/kernel.mjs"() {
8436
+ "../../node_modules/.pnpm/skill-family-contracts@0.16.0/node_modules/skill-family-contracts/src/kernel.mjs"() {
8437
8437
  import_ajv2 = __toESM(require_ajv(), 1);
8438
8438
  __name(deepFreeze3, "deepFreeze");
8439
8439
  KERNEL = deepFreeze3(JSON.parse(
@@ -8443,11 +8443,11 @@ var init_kernel = __esm({
8443
8443
  }
8444
8444
  });
8445
8445
 
8446
- // ../../node_modules/.pnpm/skill-family-contracts@0.15.0/node_modules/skill-family-contracts/src/fixtures.mjs
8446
+ // ../../node_modules/.pnpm/skill-family-contracts@0.16.0/node_modules/skill-family-contracts/src/fixtures.mjs
8447
8447
  import { readdirSync, readFileSync as readFileSync5 } from "node:fs";
8448
8448
  var FIXTURE_CLASSES, FIXTURES_DIR;
8449
8449
  var init_fixtures = __esm({
8450
- "../../node_modules/.pnpm/skill-family-contracts@0.15.0/node_modules/skill-family-contracts/src/fixtures.mjs"() {
8450
+ "../../node_modules/.pnpm/skill-family-contracts@0.16.0/node_modules/skill-family-contracts/src/fixtures.mjs"() {
8451
8451
  init_errors();
8452
8452
  init_registry();
8453
8453
  init_kernel();
@@ -8457,11 +8457,11 @@ var init_fixtures = __esm({
8457
8457
  }
8458
8458
  });
8459
8459
 
8460
- // ../../node_modules/.pnpm/skill-family-contracts@0.15.0/node_modules/skill-family-contracts/src/checker.mjs
8460
+ // ../../node_modules/.pnpm/skill-family-contracts@0.16.0/node_modules/skill-family-contracts/src/checker.mjs
8461
8461
  import { readFileSync as readFileSync6 } from "node:fs";
8462
8462
  var RULES_DOCUMENT, CHECK_TYPES, MANDATORY_RULES, RULE_BUDGET;
8463
8463
  var init_checker = __esm({
8464
- "../../node_modules/.pnpm/skill-family-contracts@0.15.0/node_modules/skill-family-contracts/src/checker.mjs"() {
8464
+ "../../node_modules/.pnpm/skill-family-contracts@0.16.0/node_modules/skill-family-contracts/src/checker.mjs"() {
8465
8465
  init_errors();
8466
8466
  init_registry();
8467
8467
  init_fixtures();
@@ -8480,7 +8480,7 @@ var init_checker = __esm({
8480
8480
  }
8481
8481
  });
8482
8482
 
8483
- // ../../node_modules/.pnpm/skill-family-contracts@0.15.0/node_modules/skill-family-contracts/src/consumer-contract-vectors.mjs
8483
+ // ../../node_modules/.pnpm/skill-family-contracts@0.16.0/node_modules/skill-family-contracts/src/consumer-contract-vectors.mjs
8484
8484
  import { readFileSync as readFileSync7 } from "node:fs";
8485
8485
  function deepFreeze4(value) {
8486
8486
  if (value === null || typeof value !== "object" || Object.isFrozen(value)) return value;
@@ -8490,7 +8490,7 @@ function deepFreeze4(value) {
8490
8490
  }
8491
8491
  var VECTOR_SCHEMA, VECTOR_REGISTRY, VECTOR_SETS;
8492
8492
  var init_consumer_contract_vectors = __esm({
8493
- "../../node_modules/.pnpm/skill-family-contracts@0.15.0/node_modules/skill-family-contracts/src/consumer-contract-vectors.mjs"() {
8493
+ "../../node_modules/.pnpm/skill-family-contracts@0.16.0/node_modules/skill-family-contracts/src/consumer-contract-vectors.mjs"() {
8494
8494
  init_errors();
8495
8495
  init_validator();
8496
8496
  VECTOR_SCHEMA = JSON.parse(readFileSync7(
@@ -8508,10 +8508,10 @@ var init_consumer_contract_vectors = __esm({
8508
8508
  }
8509
8509
  });
8510
8510
 
8511
- // ../../node_modules/.pnpm/skill-family-contracts@0.15.0/node_modules/skill-family-contracts/src/token-estimate-consumption.mjs
8511
+ // ../../node_modules/.pnpm/skill-family-contracts@0.16.0/node_modules/skill-family-contracts/src/token-estimate-consumption.mjs
8512
8512
  var TOKEN_ESTIMATE_CONSUMPTION_ERROR_KIND, RECORD_KIND, TOKEN_ESTIMATE_CONSUMPTION, TOKEN_ESTIMATE_CONSUMPTION_REASONS;
8513
8513
  var init_token_estimate_consumption = __esm({
8514
- "../../node_modules/.pnpm/skill-family-contracts@0.15.0/node_modules/skill-family-contracts/src/token-estimate-consumption.mjs"() {
8514
+ "../../node_modules/.pnpm/skill-family-contracts@0.16.0/node_modules/skill-family-contracts/src/token-estimate-consumption.mjs"() {
8515
8515
  init_errors();
8516
8516
  TOKEN_ESTIMATE_CONSUMPTION_ERROR_KIND = "token-estimate-consumption-failed";
8517
8517
  RECORD_KIND = "skill-family.token-estimate-record";
@@ -8543,7 +8543,7 @@ var init_token_estimate_consumption = __esm({
8543
8543
  }
8544
8544
  });
8545
8545
 
8546
- // ../../node_modules/.pnpm/skill-family-contracts@0.15.0/node_modules/skill-family-contracts/src/audit-surface.mjs
8546
+ // ../../node_modules/.pnpm/skill-family-contracts@0.16.0/node_modules/skill-family-contracts/src/audit-surface.mjs
8547
8547
  import { createHash } from "node:crypto";
8548
8548
  import { readFileSync as readFileSync8 } from "node:fs";
8549
8549
  function canonicalJson(value) {
@@ -8582,7 +8582,7 @@ function digestDocument(value, { algorithm = "sha256" } = {}) {
8582
8582
  }
8583
8583
  var AUDIT_DIGEST_ALGORITHMS, BASELINE_PIN_KINDS;
8584
8584
  var init_audit_surface = __esm({
8585
- "../../node_modules/.pnpm/skill-family-contracts@0.15.0/node_modules/skill-family-contracts/src/audit-surface.mjs"() {
8585
+ "../../node_modules/.pnpm/skill-family-contracts@0.16.0/node_modules/skill-family-contracts/src/audit-surface.mjs"() {
8586
8586
  init_errors();
8587
8587
  init_registry();
8588
8588
  init_kernel();
@@ -8599,19 +8599,19 @@ var init_audit_surface = __esm({
8599
8599
  }
8600
8600
  });
8601
8601
 
8602
- // ../../node_modules/.pnpm/skill-family-contracts@0.15.0/node_modules/skill-family-contracts/src/source-authority.mjs
8602
+ // ../../node_modules/.pnpm/skill-family-contracts@0.16.0/node_modules/skill-family-contracts/src/source-authority.mjs
8603
8603
  var SUBJECT_KEYS;
8604
8604
  var init_source_authority = __esm({
8605
- "../../node_modules/.pnpm/skill-family-contracts@0.15.0/node_modules/skill-family-contracts/src/source-authority.mjs"() {
8605
+ "../../node_modules/.pnpm/skill-family-contracts@0.16.0/node_modules/skill-family-contracts/src/source-authority.mjs"() {
8606
8606
  init_validator();
8607
8607
  SUBJECT_KEYS = Object.freeze(["filename", "packageName", "sha256", "version"]);
8608
8608
  }
8609
8609
  });
8610
8610
 
8611
- // ../../node_modules/.pnpm/skill-family-contracts@0.15.0/node_modules/skill-family-contracts/src/index.mjs
8611
+ // ../../node_modules/.pnpm/skill-family-contracts@0.16.0/node_modules/skill-family-contracts/src/index.mjs
8612
8612
  var CONTRACT_OBJECTS, CONTRACT_BOUNDARY;
8613
8613
  var init_src = __esm({
8614
- "../../node_modules/.pnpm/skill-family-contracts@0.15.0/node_modules/skill-family-contracts/src/index.mjs"() {
8614
+ "../../node_modules/.pnpm/skill-family-contracts@0.16.0/node_modules/skill-family-contracts/src/index.mjs"() {
8615
8615
  init_stability();
8616
8616
  init_errors();
8617
8617
  init_registry();
@@ -8677,7 +8677,7 @@ var init_src = __esm({
8677
8677
  }
8678
8678
  });
8679
8679
 
8680
- // ../../node_modules/.pnpm/skill-family-harness-node@0.15.0_@pnpm+logger@1001.0.1/node_modules/skill-family-harness-node/src/errors.mjs
8680
+ // ../../node_modules/.pnpm/skill-family-harness-node@0.16.0_@pnpm+logger@1001.0.1/node_modules/skill-family-harness-node/src/errors.mjs
8681
8681
  function mechanismError(kind, message, extraDetails) {
8682
8682
  const values = Object.values(HARNESS_ERROR_KINDS);
8683
8683
  if (!values.includes(kind)) {
@@ -8688,7 +8688,7 @@ function mechanismError(kind, message, extraDetails) {
8688
8688
  }
8689
8689
  var HARNESS_ERROR_KINDS, HarnessError;
8690
8690
  var init_errors2 = __esm({
8691
- "../../node_modules/.pnpm/skill-family-harness-node@0.15.0_@pnpm+logger@1001.0.1/node_modules/skill-family-harness-node/src/errors.mjs"() {
8691
+ "../../node_modules/.pnpm/skill-family-harness-node@0.16.0_@pnpm+logger@1001.0.1/node_modules/skill-family-harness-node/src/errors.mjs"() {
8692
8692
  init_src();
8693
8693
  HARNESS_ERROR_KINDS = Object.freeze({
8694
8694
  INVALID_PATH: "invalid-path",
@@ -8765,7 +8765,7 @@ var init_errors2 = __esm({
8765
8765
  }
8766
8766
  });
8767
8767
 
8768
- // ../../node_modules/.pnpm/skill-family-harness-node@0.15.0_@pnpm+logger@1001.0.1/node_modules/skill-family-harness-node/src/paths.mjs
8768
+ // ../../node_modules/.pnpm/skill-family-harness-node@0.16.0_@pnpm+logger@1001.0.1/node_modules/skill-family-harness-node/src/paths.mjs
8769
8769
  import { lstat, readFile, realpath, stat } from "node:fs/promises";
8770
8770
  import path from "node:path";
8771
8771
  import process2 from "node:process";
@@ -8996,7 +8996,7 @@ async function readFileContained(root, relPath, { encoding } = {}) {
8996
8996
  }
8997
8997
  var WINDOWS_DRIVE_PATTERN, WINDOWS_UNC_PATTERN, POSIX_UNC_PATTERN, ANCHOR_REALPATH_ATTEMPTS, testHooks;
8998
8998
  var init_paths = __esm({
8999
- "../../node_modules/.pnpm/skill-family-harness-node@0.15.0_@pnpm+logger@1001.0.1/node_modules/skill-family-harness-node/src/paths.mjs"() {
8999
+ "../../node_modules/.pnpm/skill-family-harness-node@0.16.0_@pnpm+logger@1001.0.1/node_modules/skill-family-harness-node/src/paths.mjs"() {
9000
9000
  init_errors2();
9001
9001
  WINDOWS_DRIVE_PATTERN = /^[A-Za-z]:/;
9002
9002
  WINDOWS_UNC_PATTERN = /^\\\\/;
@@ -9015,7 +9015,7 @@ var init_paths = __esm({
9015
9015
  }
9016
9016
  });
9017
9017
 
9018
- // ../../node_modules/.pnpm/skill-family-harness-node@0.15.0_@pnpm+logger@1001.0.1/node_modules/skill-family-harness-node/src/closure.mjs
9018
+ // ../../node_modules/.pnpm/skill-family-harness-node@0.16.0_@pnpm+logger@1001.0.1/node_modules/skill-family-harness-node/src/closure.mjs
9019
9019
  import { createHash as createHash2 } from "node:crypto";
9020
9020
  import path2 from "node:path";
9021
9021
  function digestBytes(bytes) {
@@ -9113,7 +9113,7 @@ async function computeResourceClosure({ root, resources } = {}) {
9113
9113
  }
9114
9114
  var CLOSURE_KIND, CLOSURE_SCHEMA_VERSION, DIGEST_ALGORITHM, ROLES;
9115
9115
  var init_closure = __esm({
9116
- "../../node_modules/.pnpm/skill-family-harness-node@0.15.0_@pnpm+logger@1001.0.1/node_modules/skill-family-harness-node/src/closure.mjs"() {
9116
+ "../../node_modules/.pnpm/skill-family-harness-node@0.16.0_@pnpm+logger@1001.0.1/node_modules/skill-family-harness-node/src/closure.mjs"() {
9117
9117
  init_errors2();
9118
9118
  init_paths();
9119
9119
  CLOSURE_KIND = "skill-family.resource-closure";
@@ -9126,7 +9126,7 @@ var init_closure = __esm({
9126
9126
  }
9127
9127
  });
9128
9128
 
9129
- // ../../node_modules/.pnpm/skill-family-harness-node@0.15.0_@pnpm+logger@1001.0.1/node_modules/skill-family-harness-node/src/native/loader.mjs
9129
+ // ../../node_modules/.pnpm/skill-family-harness-node@0.16.0_@pnpm+logger@1001.0.1/node_modules/skill-family-harness-node/src/native/loader.mjs
9130
9130
  import { createHash as createHash3 } from "node:crypto";
9131
9131
  import { constants as FS_CONSTANTS } from "node:fs";
9132
9132
  import { lstat as lstat2, open, readFile as readFile2, readdir, realpath as realpath2 } from "node:fs/promises";
@@ -9209,7 +9209,7 @@ async function loadNativeBoundReadAddon() {
9209
9209
  }
9210
9210
  var PACKAGE_ROOT, MANIFEST_PATH, SHA256_PATTERN, EXPECTED_EXPORTS, PLATFORM_KEYS;
9211
9211
  var init_loader = __esm({
9212
- "../../node_modules/.pnpm/skill-family-harness-node@0.15.0_@pnpm+logger@1001.0.1/node_modules/skill-family-harness-node/src/native/loader.mjs"() {
9212
+ "../../node_modules/.pnpm/skill-family-harness-node@0.16.0_@pnpm+logger@1001.0.1/node_modules/skill-family-harness-node/src/native/loader.mjs"() {
9213
9213
  PACKAGE_ROOT = path3.dirname(fileURLToPath(import.meta.url));
9214
9214
  MANIFEST_PATH = path3.join(PACKAGE_ROOT, "prebuild-manifest.json");
9215
9215
  SHA256_PATTERN = /^[0-9a-f]{64}$/u;
@@ -9224,7 +9224,7 @@ var init_loader = __esm({
9224
9224
  }
9225
9225
  });
9226
9226
 
9227
- // ../../node_modules/.pnpm/skill-family-harness-node@0.15.0_@pnpm+logger@1001.0.1/node_modules/skill-family-harness-node/src/bound-read.mjs
9227
+ // ../../node_modules/.pnpm/skill-family-harness-node@0.16.0_@pnpm+logger@1001.0.1/node_modules/skill-family-harness-node/src/bound-read.mjs
9228
9228
  import { constants as FS_CONSTANTS2 } from "node:fs";
9229
9229
  import { lstat as lstat3, open as open2, realpath as realpath3 } from "node:fs/promises";
9230
9230
  import path4 from "node:path";
@@ -9449,7 +9449,7 @@ async function readFileBound(root, relPath, { rootBinding, encoding, expectedSha
9449
9449
  }
9450
9450
  var SHA256_PATTERN2, ROOT_BINDING_KIND, ROOT_BINDING_BASIS, MEMBER_POLICY_FAILURE_REASONS, MEMBER_POLICY_FAILURE_REASON_SET;
9451
9451
  var init_bound_read = __esm({
9452
- "../../node_modules/.pnpm/skill-family-harness-node@0.15.0_@pnpm+logger@1001.0.1/node_modules/skill-family-harness-node/src/bound-read.mjs"() {
9452
+ "../../node_modules/.pnpm/skill-family-harness-node@0.16.0_@pnpm+logger@1001.0.1/node_modules/skill-family-harness-node/src/bound-read.mjs"() {
9453
9453
  init_src();
9454
9454
  init_closure();
9455
9455
  init_errors2();
@@ -9481,7 +9481,7 @@ var init_bound_read = __esm({
9481
9481
  }
9482
9482
  });
9483
9483
 
9484
- // ../../node_modules/.pnpm/skill-family-harness-node@0.15.0_@pnpm+logger@1001.0.1/node_modules/skill-family-harness-node/src/filesystem-observation.mjs
9484
+ // ../../node_modules/.pnpm/skill-family-harness-node@0.16.0_@pnpm+logger@1001.0.1/node_modules/skill-family-harness-node/src/filesystem-observation.mjs
9485
9485
  import path5 from "node:path";
9486
9486
  import { lstat as lstat4, readdir as readdir2, readlink } from "node:fs/promises";
9487
9487
  function compareUnicodeCodePoints(left, right) {
@@ -9705,7 +9705,7 @@ async function observeFilesystemTree({ root, rootBinding, symlinkPolicy } = {})
9705
9705
  }
9706
9706
  var SHA256_PATTERN3, SYMLINK_POLICY_KEYS;
9707
9707
  var init_filesystem_observation = __esm({
9708
- "../../node_modules/.pnpm/skill-family-harness-node@0.15.0_@pnpm+logger@1001.0.1/node_modules/skill-family-harness-node/src/filesystem-observation.mjs"() {
9708
+ "../../node_modules/.pnpm/skill-family-harness-node@0.16.0_@pnpm+logger@1001.0.1/node_modules/skill-family-harness-node/src/filesystem-observation.mjs"() {
9709
9709
  init_src();
9710
9710
  init_closure();
9711
9711
  init_errors2();
@@ -9725,7 +9725,7 @@ var init_filesystem_observation = __esm({
9725
9725
  }
9726
9726
  });
9727
9727
 
9728
- // ../../node_modules/.pnpm/skill-family-harness-node@0.15.0_@pnpm+logger@1001.0.1/node_modules/skill-family-harness-node/src/executable-identity.mjs
9728
+ // ../../node_modules/.pnpm/skill-family-harness-node@0.16.0_@pnpm+logger@1001.0.1/node_modules/skill-family-harness-node/src/executable-identity.mjs
9729
9729
  import { lstat as lstat5, readlink as readlink2 } from "node:fs/promises";
9730
9730
  import path6 from "node:path";
9731
9731
  import { TextDecoder as TextDecoder2 } from "node:util";
@@ -10127,7 +10127,7 @@ async function observeExecutableIdentity(input = {}) {
10127
10127
  }
10128
10128
  var POSIX, SHA256_PATTERN4, MAX_SYMLINK_DEPTH, MAX_SYMLINK_BYTES, ROOT_BINDING_KEYS, INPUT_KEYS, LOOKUP_KEYS, WINDOWS_DRIVE, decoder;
10129
10129
  var init_executable_identity = __esm({
10130
- "../../node_modules/.pnpm/skill-family-harness-node@0.15.0_@pnpm+logger@1001.0.1/node_modules/skill-family-harness-node/src/executable-identity.mjs"() {
10130
+ "../../node_modules/.pnpm/skill-family-harness-node@0.16.0_@pnpm+logger@1001.0.1/node_modules/skill-family-harness-node/src/executable-identity.mjs"() {
10131
10131
  init_src();
10132
10132
  init_closure();
10133
10133
  init_errors2();
@@ -10176,7 +10176,7 @@ var init_executable_identity = __esm({
10176
10176
  }
10177
10177
  });
10178
10178
 
10179
- // ../../node_modules/.pnpm/skill-family-harness-node@0.15.0_@pnpm+logger@1001.0.1/node_modules/skill-family-harness-node/src/strict-read.mjs
10179
+ // ../../node_modules/.pnpm/skill-family-harness-node@0.16.0_@pnpm+logger@1001.0.1/node_modules/skill-family-harness-node/src/strict-read.mjs
10180
10180
  import { constants as FS_CONSTANTS3 } from "node:fs";
10181
10181
  import { lstat as lstat6, open as open3 } from "node:fs/promises";
10182
10182
  function sameIdentity(left, right) {
@@ -10277,7 +10277,7 @@ async function readFileStrict(root, relPath, { encoding, expectedSha256 } = {})
10277
10277
  }
10278
10278
  var SHA256_HEX_PATTERN;
10279
10279
  var init_strict_read = __esm({
10280
- "../../node_modules/.pnpm/skill-family-harness-node@0.15.0_@pnpm+logger@1001.0.1/node_modules/skill-family-harness-node/src/strict-read.mjs"() {
10280
+ "../../node_modules/.pnpm/skill-family-harness-node@0.16.0_@pnpm+logger@1001.0.1/node_modules/skill-family-harness-node/src/strict-read.mjs"() {
10281
10281
  init_closure();
10282
10282
  init_errors2();
10283
10283
  init_paths();
@@ -10287,7 +10287,7 @@ var init_strict_read = __esm({
10287
10287
  }
10288
10288
  });
10289
10289
 
10290
- // ../../node_modules/.pnpm/skill-family-harness-node@0.15.0_@pnpm+logger@1001.0.1/node_modules/skill-family-harness-node/src/url-redaction.mjs
10290
+ // ../../node_modules/.pnpm/skill-family-harness-node@0.16.0_@pnpm+logger@1001.0.1/node_modules/skill-family-harness-node/src/url-redaction.mjs
10291
10291
  function redactUrlCredentials(value) {
10292
10292
  let url;
10293
10293
  if (value instanceof URL) {
@@ -10307,13 +10307,13 @@ function redactUrlCredentials(value) {
10307
10307
  }
10308
10308
  var REDACTED_URL_PLACEHOLDER;
10309
10309
  var init_url_redaction = __esm({
10310
- "../../node_modules/.pnpm/skill-family-harness-node@0.15.0_@pnpm+logger@1001.0.1/node_modules/skill-family-harness-node/src/url-redaction.mjs"() {
10310
+ "../../node_modules/.pnpm/skill-family-harness-node@0.16.0_@pnpm+logger@1001.0.1/node_modules/skill-family-harness-node/src/url-redaction.mjs"() {
10311
10311
  REDACTED_URL_PLACEHOLDER = "[redacted-url]";
10312
10312
  __name(redactUrlCredentials, "redactUrlCredentials");
10313
10313
  }
10314
10314
  });
10315
10315
 
10316
- // ../../node_modules/.pnpm/skill-family-harness-node@0.15.0_@pnpm+logger@1001.0.1/node_modules/skill-family-harness-node/src/atomic.mjs
10316
+ // ../../node_modules/.pnpm/skill-family-harness-node@0.16.0_@pnpm+logger@1001.0.1/node_modules/skill-family-harness-node/src/atomic.mjs
10317
10317
  import { createHash as createHash4, randomBytes } from "node:crypto";
10318
10318
  import { constants as FS_CONSTANTS4 } from "node:fs";
10319
10319
  import { link, lstat as lstat7, mkdir, open as open4, realpath as realpath4, rename, rm, unlink } from "node:fs/promises";
@@ -10778,7 +10778,7 @@ async function writeFileAtomic(root, relPath, data, { mode = 420 } = {}) {
10778
10778
  }
10779
10779
  var testHooks2;
10780
10780
  var init_atomic = __esm({
10781
- "../../node_modules/.pnpm/skill-family-harness-node@0.15.0_@pnpm+logger@1001.0.1/node_modules/skill-family-harness-node/src/atomic.mjs"() {
10781
+ "../../node_modules/.pnpm/skill-family-harness-node@0.16.0_@pnpm+logger@1001.0.1/node_modules/skill-family-harness-node/src/atomic.mjs"() {
10782
10782
  init_errors2();
10783
10783
  init_paths();
10784
10784
  testHooks2 = null;
@@ -10804,7 +10804,7 @@ var init_atomic = __esm({
10804
10804
  }
10805
10805
  });
10806
10806
 
10807
- // ../../node_modules/.pnpm/skill-family-harness-node@0.15.0_@pnpm+logger@1001.0.1/node_modules/skill-family-harness-node/src/token-lock.mjs
10807
+ // ../../node_modules/.pnpm/skill-family-harness-node@0.16.0_@pnpm+logger@1001.0.1/node_modules/skill-family-harness-node/src/token-lock.mjs
10808
10808
  import { createHash as createHash5, randomBytes as randomBytes2 } from "node:crypto";
10809
10809
  import { constants as FS_CONSTANTS5 } from "node:fs";
10810
10810
  import { lstat as lstat8, open as open5, realpath as realpath5, unlink as unlink2 } from "node:fs/promises";
@@ -10962,7 +10962,7 @@ async function recoverFilesystemLock(root, relPath, { expectedTokenDigest, confi
10962
10962
  }
10963
10963
  var TOKEN_PATTERN;
10964
10964
  var init_token_lock = __esm({
10965
- "../../node_modules/.pnpm/skill-family-harness-node@0.15.0_@pnpm+logger@1001.0.1/node_modules/skill-family-harness-node/src/token-lock.mjs"() {
10965
+ "../../node_modules/.pnpm/skill-family-harness-node@0.16.0_@pnpm+logger@1001.0.1/node_modules/skill-family-harness-node/src/token-lock.mjs"() {
10966
10966
  init_errors2();
10967
10967
  init_atomic();
10968
10968
  init_paths();
@@ -10981,7 +10981,7 @@ var init_token_lock = __esm({
10981
10981
  }
10982
10982
  });
10983
10983
 
10984
- // ../../node_modules/.pnpm/skill-family-harness-node@0.15.0_@pnpm+logger@1001.0.1/node_modules/skill-family-harness-node/src/baseline.mjs
10984
+ // ../../node_modules/.pnpm/skill-family-harness-node@0.16.0_@pnpm+logger@1001.0.1/node_modules/skill-family-harness-node/src/baseline.mjs
10985
10985
  import { createHash as createHash6 } from "node:crypto";
10986
10986
  import { lstat as lstat9, mkdir as mkdir2, mkdtemp, readdir as readdir3, readFile as readFile3, rm as rm2, writeFile } from "node:fs/promises";
10987
10987
  import os from "node:os";
@@ -11127,7 +11127,7 @@ async function materializeBaseline({ baselineDir, baselineDigest, prefix = "sf-b
11127
11127
  }
11128
11128
  var TEST_HOOKS, DIGEST_PATTERN;
11129
11129
  var init_baseline = __esm({
11130
- "../../node_modules/.pnpm/skill-family-harness-node@0.15.0_@pnpm+logger@1001.0.1/node_modules/skill-family-harness-node/src/baseline.mjs"() {
11130
+ "../../node_modules/.pnpm/skill-family-harness-node@0.16.0_@pnpm+logger@1001.0.1/node_modules/skill-family-harness-node/src/baseline.mjs"() {
11131
11131
  init_errors2();
11132
11132
  TEST_HOOKS = { beforePostDigest: void 0 };
11133
11133
  __name(runTestHook3, "runTestHook");
@@ -11139,7 +11139,7 @@ var init_baseline = __esm({
11139
11139
  }
11140
11140
  });
11141
11141
 
11142
- // ../../node_modules/.pnpm/skill-family-harness-node@0.15.0_@pnpm+logger@1001.0.1/node_modules/skill-family-harness-node/src/workspace.mjs
11142
+ // ../../node_modules/.pnpm/skill-family-harness-node@0.16.0_@pnpm+logger@1001.0.1/node_modules/skill-family-harness-node/src/workspace.mjs
11143
11143
  import fsPromises from "node:fs/promises";
11144
11144
  import os2 from "node:os";
11145
11145
  import path10 from "node:path";
@@ -11204,7 +11204,7 @@ async function withTemporaryWorkspace(fn, options) {
11204
11204
  }
11205
11205
  var CLEANUP_OPTIONS, TemporaryWorkspace;
11206
11206
  var init_workspace = __esm({
11207
- "../../node_modules/.pnpm/skill-family-harness-node@0.15.0_@pnpm+logger@1001.0.1/node_modules/skill-family-harness-node/src/workspace.mjs"() {
11207
+ "../../node_modules/.pnpm/skill-family-harness-node@0.16.0_@pnpm+logger@1001.0.1/node_modules/skill-family-harness-node/src/workspace.mjs"() {
11208
11208
  init_baseline();
11209
11209
  init_errors2();
11210
11210
  init_paths();
@@ -11323,28 +11323,28 @@ var init_workspace = __esm({
11323
11323
  }
11324
11324
  });
11325
11325
 
11326
- // ../../node_modules/.pnpm/skill-family-harness-node@0.15.0_@pnpm+logger@1001.0.1/node_modules/skill-family-harness-node/src/chokepoint.mjs
11326
+ // ../../node_modules/.pnpm/skill-family-harness-node@0.16.0_@pnpm+logger@1001.0.1/node_modules/skill-family-harness-node/src/chokepoint.mjs
11327
11327
  import path11 from "node:path";
11328
11328
  var init_chokepoint = __esm({
11329
- "../../node_modules/.pnpm/skill-family-harness-node@0.15.0_@pnpm+logger@1001.0.1/node_modules/skill-family-harness-node/src/chokepoint.mjs"() {
11329
+ "../../node_modules/.pnpm/skill-family-harness-node@0.16.0_@pnpm+logger@1001.0.1/node_modules/skill-family-harness-node/src/chokepoint.mjs"() {
11330
11330
  init_errors2();
11331
11331
  init_paths();
11332
11332
  }
11333
11333
  });
11334
11334
 
11335
- // ../../node_modules/.pnpm/skill-family-harness-node@0.15.0_@pnpm+logger@1001.0.1/node_modules/skill-family-harness-node/src/validation.mjs
11335
+ // ../../node_modules/.pnpm/skill-family-harness-node@0.16.0_@pnpm+logger@1001.0.1/node_modules/skill-family-harness-node/src/validation.mjs
11336
11336
  var init_validation = __esm({
11337
- "../../node_modules/.pnpm/skill-family-harness-node@0.15.0_@pnpm+logger@1001.0.1/node_modules/skill-family-harness-node/src/validation.mjs"() {
11337
+ "../../node_modules/.pnpm/skill-family-harness-node@0.16.0_@pnpm+logger@1001.0.1/node_modules/skill-family-harness-node/src/validation.mjs"() {
11338
11338
  init_src();
11339
11339
  init_errors2();
11340
11340
  }
11341
11341
  });
11342
11342
 
11343
- // ../../node_modules/.pnpm/skill-family-harness-node@0.15.0_@pnpm+logger@1001.0.1/node_modules/skill-family-harness-node/src/surface-scan.mjs
11343
+ // ../../node_modules/.pnpm/skill-family-harness-node@0.16.0_@pnpm+logger@1001.0.1/node_modules/skill-family-harness-node/src/surface-scan.mjs
11344
11344
  import path12 from "node:path";
11345
11345
  var POLICY_SCHEMA_ID;
11346
11346
  var init_surface_scan = __esm({
11347
- "../../node_modules/.pnpm/skill-family-harness-node@0.15.0_@pnpm+logger@1001.0.1/node_modules/skill-family-harness-node/src/surface-scan.mjs"() {
11347
+ "../../node_modules/.pnpm/skill-family-harness-node@0.16.0_@pnpm+logger@1001.0.1/node_modules/skill-family-harness-node/src/surface-scan.mjs"() {
11348
11348
  init_src();
11349
11349
  init_errors2();
11350
11350
  init_paths();
@@ -11353,12 +11353,12 @@ var init_surface_scan = __esm({
11353
11353
  }
11354
11354
  });
11355
11355
 
11356
- // ../../node_modules/.pnpm/skill-family-harness-node@0.15.0_@pnpm+logger@1001.0.1/node_modules/skill-family-harness-node/src/declared-read-surface.mjs
11356
+ // ../../node_modules/.pnpm/skill-family-harness-node@0.16.0_@pnpm+logger@1001.0.1/node_modules/skill-family-harness-node/src/declared-read-surface.mjs
11357
11357
  import path13 from "node:path";
11358
11358
  import { readFileSync as readFileSync9, readdirSync as readdirSync2, statSync } from "node:fs";
11359
11359
  var WRITE_FS_VERBS, WRITE_FS_APIS, DECLARED_READ_SURFACE_RULES, RESULT_GUARANTEES;
11360
11360
  var init_declared_read_surface = __esm({
11361
- "../../node_modules/.pnpm/skill-family-harness-node@0.15.0_@pnpm+logger@1001.0.1/node_modules/skill-family-harness-node/src/declared-read-surface.mjs"() {
11361
+ "../../node_modules/.pnpm/skill-family-harness-node@0.16.0_@pnpm+logger@1001.0.1/node_modules/skill-family-harness-node/src/declared-read-surface.mjs"() {
11362
11362
  init_errors2();
11363
11363
  WRITE_FS_VERBS = ["writeFile", "appendFile", "mkdir", "rm", "unlink", "rename", "copyFile"];
11364
11364
  WRITE_FS_APIS = WRITE_FS_VERBS.map((verb) => `${verb}Sync`).concat([
@@ -19972,8 +19972,8 @@ var require_graceful_fs = __commonJS({
19972
19972
  fs2.createReadStream = createReadStream2;
19973
19973
  fs2.createWriteStream = createWriteStream;
19974
19974
  var fs$readFile = fs2.readFile;
19975
- fs2.readFile = readFile56;
19976
- function readFile56(path40, options, cb) {
19975
+ fs2.readFile = readFile57;
19976
+ function readFile57(path40, options, cb) {
19977
19977
  if (typeof options === "function")
19978
19978
  cb = options, options = null;
19979
19979
  return go$readFile(path40, options, cb);
@@ -19989,7 +19989,7 @@ var require_graceful_fs = __commonJS({
19989
19989
  }
19990
19990
  __name(go$readFile, "go$readFile");
19991
19991
  }
19992
- __name(readFile56, "readFile");
19992
+ __name(readFile57, "readFile");
19993
19993
  var fs$writeFile = fs2.writeFile;
19994
19994
  fs2.writeFile = writeFile16;
19995
19995
  function writeFile16(path40, data, options, cb) {
@@ -33492,7 +33492,7 @@ var require_dist2 = __commonJS({
33492
33492
  }
33493
33493
  });
33494
33494
 
33495
- // ../../node_modules/.pnpm/skill-family-harness-node@0.15.0_@pnpm+logger@1001.0.1/node_modules/skill-family-harness-node/src/structured-scan.mjs
33495
+ // ../../node_modules/.pnpm/skill-family-harness-node@0.16.0_@pnpm+logger@1001.0.1/node_modules/skill-family-harness-node/src/structured-scan.mjs
33496
33496
  import { mkdtempSync, rmSync, writeFileSync, lstatSync, readlinkSync } from "node:fs";
33497
33497
  import os3 from "node:os";
33498
33498
  import path14 from "node:path";
@@ -33780,7 +33780,7 @@ function scanTreeJsonContent(ctx, relPath, bytes) {
33780
33780
  }
33781
33781
  var import_ipaddr, import_lockfile, import_yaml, POLICY_SCHEMA_ID2, STRUCTURED_SCAN_RULES, URL_PATTERN, EMAIL_PATTERN, HOST_KEY_STRING_PATTERN, HOST_KEY_ARRAY_PATTERN, QUOTED_TOKEN_PATTERN, NPM_SCOPE_PATTERN, IP_RUN_PATTERN, IPV4_SHAPED_PATTERN, HEX_GROUP_SEGMENT_PATTERN, ALPHA_SHORT_SEGMENT_PATTERN, HEX_LETTER_PATTERN, DECIMAL_DIGIT_PATTERN, LOCKFILE_URL_REFERENCE_PATTERN, LOCAL_LOCKFILE_REF_PREFIXES, BUILTIN_ADAPTERS;
33782
33782
  var init_structured_scan = __esm({
33783
- "../../node_modules/.pnpm/skill-family-harness-node@0.15.0_@pnpm+logger@1001.0.1/node_modules/skill-family-harness-node/src/structured-scan.mjs"() {
33783
+ "../../node_modules/.pnpm/skill-family-harness-node@0.16.0_@pnpm+logger@1001.0.1/node_modules/skill-family-harness-node/src/structured-scan.mjs"() {
33784
33784
  init_src();
33785
33785
  import_ipaddr = __toESM(require_ipaddr(), 1);
33786
33786
  import_lockfile = __toESM(require_lib18(), 1);
@@ -33836,10 +33836,10 @@ var init_structured_scan = __esm({
33836
33836
  }
33837
33837
  });
33838
33838
 
33839
- // ../../node_modules/.pnpm/skill-family-harness-node@0.15.0_@pnpm+logger@1001.0.1/node_modules/skill-family-harness-node/src/token-estimate.mjs
33839
+ // ../../node_modules/.pnpm/skill-family-harness-node@0.16.0_@pnpm+logger@1001.0.1/node_modules/skill-family-harness-node/src/token-estimate.mjs
33840
33840
  var GUARANTEES, TOKEN_GUARANTEES, CJK_CODE_POINT_RANGES;
33841
33841
  var init_token_estimate = __esm({
33842
- "../../node_modules/.pnpm/skill-family-harness-node@0.15.0_@pnpm+logger@1001.0.1/node_modules/skill-family-harness-node/src/token-estimate.mjs"() {
33842
+ "../../node_modules/.pnpm/skill-family-harness-node@0.16.0_@pnpm+logger@1001.0.1/node_modules/skill-family-harness-node/src/token-estimate.mjs"() {
33843
33843
  GUARANTEES = Object.freeze([
33844
33844
  "covers-content-text-only",
33845
33845
  "no-model-calls",
@@ -33863,7 +33863,7 @@ var init_token_estimate = __esm({
33863
33863
  }
33864
33864
  });
33865
33865
 
33866
- // ../../node_modules/.pnpm/skill-family-harness-node@0.15.0_@pnpm+logger@1001.0.1/node_modules/skill-family-harness-node/src/state-store.mjs
33866
+ // ../../node_modules/.pnpm/skill-family-harness-node@0.16.0_@pnpm+logger@1001.0.1/node_modules/skill-family-harness-node/src/state-store.mjs
33867
33867
  import { constants as FS_CONSTANTS6 } from "node:fs";
33868
33868
  import {
33869
33869
  link as link2,
@@ -33880,7 +33880,7 @@ import path15 from "node:path";
33880
33880
  import process6 from "node:process";
33881
33881
  var STATE_GENESIS_DIGEST, EVENT_SCHEMA_ID, SNAPSHOT_SCHEMA_ID;
33882
33882
  var init_state_store = __esm({
33883
- "../../node_modules/.pnpm/skill-family-harness-node@0.15.0_@pnpm+logger@1001.0.1/node_modules/skill-family-harness-node/src/state-store.mjs"() {
33883
+ "../../node_modules/.pnpm/skill-family-harness-node@0.16.0_@pnpm+logger@1001.0.1/node_modules/skill-family-harness-node/src/state-store.mjs"() {
33884
33884
  init_src();
33885
33885
  init_errors2();
33886
33886
  init_validation();
@@ -33890,16 +33890,16 @@ var init_state_store = __esm({
33890
33890
  }
33891
33891
  });
33892
33892
 
33893
- // ../../node_modules/.pnpm/skill-family-harness-node@0.15.0_@pnpm+logger@1001.0.1/node_modules/skill-family-harness-node/src/budget-guard.mjs
33893
+ // ../../node_modules/.pnpm/skill-family-harness-node@0.16.0_@pnpm+logger@1001.0.1/node_modules/skill-family-harness-node/src/budget-guard.mjs
33894
33894
  var init_budget_guard = __esm({
33895
- "../../node_modules/.pnpm/skill-family-harness-node@0.15.0_@pnpm+logger@1001.0.1/node_modules/skill-family-harness-node/src/budget-guard.mjs"() {
33895
+ "../../node_modules/.pnpm/skill-family-harness-node@0.16.0_@pnpm+logger@1001.0.1/node_modules/skill-family-harness-node/src/budget-guard.mjs"() {
33896
33896
  init_errors2();
33897
33897
  init_token_lock();
33898
33898
  init_state_store();
33899
33899
  }
33900
33900
  });
33901
33901
 
33902
- // ../../node_modules/.pnpm/skill-family-harness-node@0.15.0_@pnpm+logger@1001.0.1/node_modules/skill-family-harness-node/src/supervise-process.mjs
33902
+ // ../../node_modules/.pnpm/skill-family-harness-node@0.16.0_@pnpm+logger@1001.0.1/node_modules/skill-family-harness-node/src/supervise-process.mjs
33903
33903
  import { spawn as nodeSpawn } from "node:child_process";
33904
33904
  import { constants as FS_CONSTANTS7, existsSync, readFileSync as readFileSync10, statSync as statSync2, writeFileSync as writeFileSync2, renameSync } from "node:fs";
33905
33905
  import { open as openFile, readdir as readdir5, realpath as realpath7, stat as stat2 } from "node:fs/promises";
@@ -34848,7 +34848,7 @@ async function superviseProcess(options, deps = {}) {
34848
34848
  }
34849
34849
  var WATCHDOG_REASONS, TERMINATION_REASONS, PROCESS_STATUSES, ENVELOPE_GUARANTEES, ENVELOPE_KIND, TRACE_KIND, TIMEOUT_POLICY_FIELDS, TIMEOUT_WATCHDOG_REASONS, OUTPUT_LIMIT_FIELDS, MAX_SAFE_OUTPUT_BYTES, RAW_SINK_FIELDS, defaultDeps, WATCHDOG_TO_TERMINATION;
34850
34850
  var init_supervise_process = __esm({
34851
- "../../node_modules/.pnpm/skill-family-harness-node@0.15.0_@pnpm+logger@1001.0.1/node_modules/skill-family-harness-node/src/supervise-process.mjs"() {
34851
+ "../../node_modules/.pnpm/skill-family-harness-node@0.16.0_@pnpm+logger@1001.0.1/node_modules/skill-family-harness-node/src/supervise-process.mjs"() {
34852
34852
  init_errors2();
34853
34853
  WATCHDOG_REASONS = Object.freeze([
34854
34854
  "max_seconds",
@@ -34982,7 +34982,7 @@ var init_supervise_process = __esm({
34982
34982
  }
34983
34983
  });
34984
34984
 
34985
- // ../../node_modules/.pnpm/skill-family-harness-node@0.15.0_@pnpm+logger@1001.0.1/node_modules/skill-family-harness-node/src/request.mjs
34985
+ // ../../node_modules/.pnpm/skill-family-harness-node@0.16.0_@pnpm+logger@1001.0.1/node_modules/skill-family-harness-node/src/request.mjs
34986
34986
  function schemaIdFor(objectName) {
34987
34987
  const registration = findSchemaByObject(objectName);
34988
34988
  if (!registration) {
@@ -34995,7 +34995,7 @@ function schemaIdFor(objectName) {
34995
34995
  }
34996
34996
  var REQUEST_ENVELOPE, REQUEST_SCHEMA_ID, RESULT_SCHEMA_ID;
34997
34997
  var init_request = __esm({
34998
- "../../node_modules/.pnpm/skill-family-harness-node@0.15.0_@pnpm+logger@1001.0.1/node_modules/skill-family-harness-node/src/request.mjs"() {
34998
+ "../../node_modules/.pnpm/skill-family-harness-node@0.16.0_@pnpm+logger@1001.0.1/node_modules/skill-family-harness-node/src/request.mjs"() {
34999
34999
  init_src();
35000
35000
  init_errors2();
35001
35001
  init_validation();
@@ -35009,14 +35009,14 @@ var init_request = __esm({
35009
35009
  }
35010
35010
  });
35011
35011
 
35012
- // ../../node_modules/.pnpm/skill-family-harness-node@0.15.0_@pnpm+logger@1001.0.1/node_modules/skill-family-harness-node/src/host.mjs
35012
+ // ../../node_modules/.pnpm/skill-family-harness-node@0.16.0_@pnpm+logger@1001.0.1/node_modules/skill-family-harness-node/src/host.mjs
35013
35013
  import { constants } from "node:fs";
35014
35014
  import { access, lstat as lstat11, mkdtemp as mkdtemp2, readFile as readFile4, realpath as realpath8, rename as rename3, rm as rm3 } from "node:fs/promises";
35015
35015
  import path17 from "node:path";
35016
35016
  import { spawnSync } from "node:child_process";
35017
35017
  var SCHEMAS;
35018
35018
  var init_host = __esm({
35019
- "../../node_modules/.pnpm/skill-family-harness-node@0.15.0_@pnpm+logger@1001.0.1/node_modules/skill-family-harness-node/src/host.mjs"() {
35019
+ "../../node_modules/.pnpm/skill-family-harness-node@0.16.0_@pnpm+logger@1001.0.1/node_modules/skill-family-harness-node/src/host.mjs"() {
35020
35020
  init_src();
35021
35021
  init_atomic();
35022
35022
  init_closure();
@@ -35030,12 +35030,12 @@ var init_host = __esm({
35030
35030
  }
35031
35031
  });
35032
35032
 
35033
- // ../../node_modules/.pnpm/skill-family-harness-node@0.15.0_@pnpm+logger@1001.0.1/node_modules/skill-family-harness-node/src/peer-adapter.mjs
35033
+ // ../../node_modules/.pnpm/skill-family-harness-node@0.16.0_@pnpm+logger@1001.0.1/node_modules/skill-family-harness-node/src/peer-adapter.mjs
35034
35034
  import { lstat as lstat12, opendir } from "node:fs/promises";
35035
35035
  import { TextDecoder as TextDecoder3 } from "node:util";
35036
35036
  import path18 from "node:path";
35037
35037
  var init_peer_adapter = __esm({
35038
- "../../node_modules/.pnpm/skill-family-harness-node@0.15.0_@pnpm+logger@1001.0.1/node_modules/skill-family-harness-node/src/peer-adapter.mjs"() {
35038
+ "../../node_modules/.pnpm/skill-family-harness-node@0.16.0_@pnpm+logger@1001.0.1/node_modules/skill-family-harness-node/src/peer-adapter.mjs"() {
35039
35039
  init_src();
35040
35040
  init_paths();
35041
35041
  init_bound_read();
@@ -35044,10 +35044,10 @@ var init_peer_adapter = __esm({
35044
35044
  }
35045
35045
  });
35046
35046
 
35047
- // ../../node_modules/.pnpm/skill-family-harness-node@0.15.0_@pnpm+logger@1001.0.1/node_modules/skill-family-harness-node/package.json
35047
+ // ../../node_modules/.pnpm/skill-family-harness-node@0.16.0_@pnpm+logger@1001.0.1/node_modules/skill-family-harness-node/package.json
35048
35048
  var package_default;
35049
35049
  var init_package = __esm({
35050
- "../../node_modules/.pnpm/skill-family-harness-node@0.15.0_@pnpm+logger@1001.0.1/node_modules/skill-family-harness-node/package.json"() {
35050
+ "../../node_modules/.pnpm/skill-family-harness-node@0.16.0_@pnpm+logger@1001.0.1/node_modules/skill-family-harness-node/package.json"() {
35051
35051
  package_default = {
35052
35052
  "//": '~~ Generated by projen. To modify, edit .projenrc.js and run "npx projen".',
35053
35053
  author: "\u5E7F\u5DDE\u5E02\u98CE\u8377\u79D1\u6280\u6709\u9650\u516C\u53F8",
@@ -35060,7 +35060,7 @@ var init_package = __esm({
35060
35060
  dependencies: {
35061
35061
  "@pnpm/lockfile.fs": "1001.1.35",
35062
35062
  "ipaddr.js": "2.5.0",
35063
- "skill-family-contracts": "0.15.0",
35063
+ "skill-family-contracts": "0.16.0",
35064
35064
  yaml: "2.9.0"
35065
35065
  },
35066
35066
  description: "Thin Node.js mechanism runtime for Skill Family engineering contracts.",
@@ -35099,7 +35099,7 @@ var init_package = __esm({
35099
35099
  url: "https://github.com/ifoohoo/skill-family-harness-node.git"
35100
35100
  },
35101
35101
  type: "module",
35102
- version: "0.15.0",
35102
+ version: "0.16.0",
35103
35103
  scripts: {
35104
35104
  check: "node --test",
35105
35105
  test: "node --test"
@@ -35108,19 +35108,19 @@ var init_package = __esm({
35108
35108
  }
35109
35109
  });
35110
35110
 
35111
- // ../../node_modules/.pnpm/skill-family-harness-node@0.15.0_@pnpm+logger@1001.0.1/node_modules/skill-family-harness-node/src/report-version.mjs
35111
+ // ../../node_modules/.pnpm/skill-family-harness-node@0.16.0_@pnpm+logger@1001.0.1/node_modules/skill-family-harness-node/src/report-version.mjs
35112
35112
  var REPORT_RENDERER_VERSION;
35113
35113
  var init_report_version = __esm({
35114
- "../../node_modules/.pnpm/skill-family-harness-node@0.15.0_@pnpm+logger@1001.0.1/node_modules/skill-family-harness-node/src/report-version.mjs"() {
35114
+ "../../node_modules/.pnpm/skill-family-harness-node@0.16.0_@pnpm+logger@1001.0.1/node_modules/skill-family-harness-node/src/report-version.mjs"() {
35115
35115
  init_package();
35116
35116
  REPORT_RENDERER_VERSION = package_default.version;
35117
35117
  }
35118
35118
  });
35119
35119
 
35120
- // ../../node_modules/.pnpm/skill-family-harness-node@0.15.0_@pnpm+logger@1001.0.1/node_modules/skill-family-harness-node/src/report.mjs
35120
+ // ../../node_modules/.pnpm/skill-family-harness-node@0.16.0_@pnpm+logger@1001.0.1/node_modules/skill-family-harness-node/src/report.mjs
35121
35121
  var SUPPORTED_REPORT_LOCALES, EXECUTION_STATUSES, REPORT_AUDIENCES, RESULT_STATE_EXECUTION_STATUSES, REPORT_STYLE_RULES, TRANSLATESE_ZH, TRANSLATESE_EN, UNEXPLAINED_TERMS, REPORT_MODEL_SCHEMA_ID, REPORT_BINDING_SCHEMA_ID, OPERATION_RESULT_SCHEMA_ID, TEXT;
35122
35122
  var init_report = __esm({
35123
- "../../node_modules/.pnpm/skill-family-harness-node@0.15.0_@pnpm+logger@1001.0.1/node_modules/skill-family-harness-node/src/report.mjs"() {
35123
+ "../../node_modules/.pnpm/skill-family-harness-node@0.16.0_@pnpm+logger@1001.0.1/node_modules/skill-family-harness-node/src/report.mjs"() {
35124
35124
  init_src();
35125
35125
  init_closure();
35126
35126
  init_errors2();
@@ -35238,31 +35238,31 @@ var init_report = __esm({
35238
35238
  }
35239
35239
  });
35240
35240
 
35241
- // ../../node_modules/.pnpm/skill-family-harness-node@0.15.0_@pnpm+logger@1001.0.1/node_modules/skill-family-harness-node/src/fixed-set-publication-loader.mjs
35241
+ // ../../node_modules/.pnpm/skill-family-harness-node@0.16.0_@pnpm+logger@1001.0.1/node_modules/skill-family-harness-node/src/fixed-set-publication-loader.mjs
35242
35242
  var init_fixed_set_publication_loader = __esm({
35243
- "../../node_modules/.pnpm/skill-family-harness-node@0.15.0_@pnpm+logger@1001.0.1/node_modules/skill-family-harness-node/src/fixed-set-publication-loader.mjs"() {
35243
+ "../../node_modules/.pnpm/skill-family-harness-node@0.16.0_@pnpm+logger@1001.0.1/node_modules/skill-family-harness-node/src/fixed-set-publication-loader.mjs"() {
35244
35244
  init_loader();
35245
35245
  }
35246
35246
  });
35247
35247
 
35248
- // ../../node_modules/.pnpm/skill-family-harness-node@0.15.0_@pnpm+logger@1001.0.1/node_modules/skill-family-harness-node/src/fixed-set-publication.mjs
35248
+ // ../../node_modules/.pnpm/skill-family-harness-node@0.16.0_@pnpm+logger@1001.0.1/node_modules/skill-family-harness-node/src/fixed-set-publication.mjs
35249
35249
  import { createHash as createHash8 } from "node:crypto";
35250
35250
  import { constants as FS_CONSTANTS8 } from "node:fs";
35251
35251
  import { lstat as lstat13, open as open7, readdir as readdir6, realpath as realpath9 } from "node:fs/promises";
35252
35252
  import path19 from "node:path";
35253
35253
  var ZERO_DIGEST;
35254
35254
  var init_fixed_set_publication = __esm({
35255
- "../../node_modules/.pnpm/skill-family-harness-node@0.15.0_@pnpm+logger@1001.0.1/node_modules/skill-family-harness-node/src/fixed-set-publication.mjs"() {
35255
+ "../../node_modules/.pnpm/skill-family-harness-node@0.16.0_@pnpm+logger@1001.0.1/node_modules/skill-family-harness-node/src/fixed-set-publication.mjs"() {
35256
35256
  init_src();
35257
35257
  init_fixed_set_publication_loader();
35258
35258
  ZERO_DIGEST = "0".repeat(64);
35259
35259
  }
35260
35260
  });
35261
35261
 
35262
- // ../../node_modules/.pnpm/skill-family-harness-node@0.15.0_@pnpm+logger@1001.0.1/node_modules/skill-family-harness-node/src/index.mjs
35262
+ // ../../node_modules/.pnpm/skill-family-harness-node@0.16.0_@pnpm+logger@1001.0.1/node_modules/skill-family-harness-node/src/index.mjs
35263
35263
  var HARNESS_CAPABILITIES, HARNESS_EXCLUSIONS;
35264
35264
  var init_src2 = __esm({
35265
- "../../node_modules/.pnpm/skill-family-harness-node@0.15.0_@pnpm+logger@1001.0.1/node_modules/skill-family-harness-node/src/index.mjs"() {
35265
+ "../../node_modules/.pnpm/skill-family-harness-node@0.16.0_@pnpm+logger@1001.0.1/node_modules/skill-family-harness-node/src/index.mjs"() {
35266
35266
  init_version();
35267
35267
  init_errors2();
35268
35268
  init_paths();
@@ -37092,7 +37092,7 @@ var init_release_assets = __esm({
37092
37092
  }
37093
37093
  });
37094
37094
 
37095
- // ../../node_modules/.pnpm/skill-family-engineering-kit@0.15.0_@pnpm+logger@1001.0.1/node_modules/skill-family-engineering-kit/src/errors.mjs
37095
+ // ../../node_modules/.pnpm/skill-family-engineering-kit@0.16.0_@pnpm+logger@1001.0.1/node_modules/skill-family-engineering-kit/src/errors.mjs
37096
37096
  function kitError(kind, message, extraDetails) {
37097
37097
  const values = Object.values(KIT_ERROR_KINDS);
37098
37098
  if (!values.includes(kind)) {
@@ -37117,7 +37117,7 @@ function invalidParamsError(message, extraDetails) {
37117
37117
  }
37118
37118
  var KIT_ERROR_KINDS, KitError, REFUSED_MUTATION_FLAGS;
37119
37119
  var init_errors4 = __esm({
37120
- "../../node_modules/.pnpm/skill-family-engineering-kit@0.15.0_@pnpm+logger@1001.0.1/node_modules/skill-family-engineering-kit/src/errors.mjs"() {
37120
+ "../../node_modules/.pnpm/skill-family-engineering-kit@0.16.0_@pnpm+logger@1001.0.1/node_modules/skill-family-engineering-kit/src/errors.mjs"() {
37121
37121
  init_src();
37122
37122
  KIT_ERROR_KINDS = Object.freeze({
37123
37123
  // scaffold
@@ -37215,13 +37215,13 @@ var init_errors4 = __esm({
37215
37215
  }
37216
37216
  });
37217
37217
 
37218
- // ../../node_modules/.pnpm/skill-family-engineering-kit@0.15.0_@pnpm+logger@1001.0.1/node_modules/skill-family-engineering-kit/src/gitprobe.mjs
37218
+ // ../../node_modules/.pnpm/skill-family-engineering-kit@0.16.0_@pnpm+logger@1001.0.1/node_modules/skill-family-engineering-kit/src/gitprobe.mjs
37219
37219
  import { spawnSync as spawnSync2 } from "node:child_process";
37220
37220
  import { readFile as readFile6 } from "node:fs/promises";
37221
37221
  import path20 from "node:path";
37222
37222
  var GIT_STATUS_ARGS, GIT_LS_FILES_ARGS, GIT_CHECK_IGNORE_ARGS, GIT_READ_ONLY_ALLOWLIST;
37223
37223
  var init_gitprobe = __esm({
37224
- "../../node_modules/.pnpm/skill-family-engineering-kit@0.15.0_@pnpm+logger@1001.0.1/node_modules/skill-family-engineering-kit/src/gitprobe.mjs"() {
37224
+ "../../node_modules/.pnpm/skill-family-engineering-kit@0.16.0_@pnpm+logger@1001.0.1/node_modules/skill-family-engineering-kit/src/gitprobe.mjs"() {
37225
37225
  GIT_STATUS_ARGS = Object.freeze([
37226
37226
  "--no-optional-locks",
37227
37227
  "-c",
@@ -37253,13 +37253,13 @@ var init_gitprobe = __esm({
37253
37253
  }
37254
37254
  });
37255
37255
 
37256
- // ../../node_modules/.pnpm/skill-family-engineering-kit@0.15.0_@pnpm+logger@1001.0.1/node_modules/skill-family-engineering-kit/src/licensing.mjs
37256
+ // ../../node_modules/.pnpm/skill-family-engineering-kit@0.16.0_@pnpm+logger@1001.0.1/node_modules/skill-family-engineering-kit/src/licensing.mjs
37257
37257
  import { readFileSync as readFileSync12 } from "node:fs";
37258
37258
  import path21 from "node:path";
37259
37259
  import { fileURLToPath as fileURLToPath3 } from "node:url";
37260
37260
  var APACHE_2_TEXT, MIT_TEMPLATE;
37261
37261
  var init_licensing = __esm({
37262
- "../../node_modules/.pnpm/skill-family-engineering-kit@0.15.0_@pnpm+logger@1001.0.1/node_modules/skill-family-engineering-kit/src/licensing.mjs"() {
37262
+ "../../node_modules/.pnpm/skill-family-engineering-kit@0.16.0_@pnpm+logger@1001.0.1/node_modules/skill-family-engineering-kit/src/licensing.mjs"() {
37263
37263
  init_src2();
37264
37264
  init_src();
37265
37265
  init_errors4();
@@ -37274,7 +37274,7 @@ var init_licensing = __esm({
37274
37274
  }
37275
37275
  });
37276
37276
 
37277
- // ../../node_modules/.pnpm/skill-family-engineering-kit@0.15.0_@pnpm+logger@1001.0.1/node_modules/skill-family-engineering-kit/src/workspace.mjs
37277
+ // ../../node_modules/.pnpm/skill-family-engineering-kit@0.16.0_@pnpm+logger@1001.0.1/node_modules/skill-family-engineering-kit/src/workspace.mjs
37278
37278
  import { lstat as lstat16, readdir as readdir8, readFile as readFile7, stat as stat3 } from "node:fs/promises";
37279
37279
  import path22 from "node:path";
37280
37280
  async function resolveTargetRoot(rootInput) {
@@ -37427,7 +37427,7 @@ async function loadTargetFacts(root) {
37427
37427
  }
37428
37428
  var OPAQUE_DIRECTORIES, DEFAULT_HANDWRITTEN_PATTERNS;
37429
37429
  var init_workspace2 = __esm({
37430
- "../../node_modules/.pnpm/skill-family-engineering-kit@0.15.0_@pnpm+logger@1001.0.1/node_modules/skill-family-engineering-kit/src/workspace.mjs"() {
37430
+ "../../node_modules/.pnpm/skill-family-engineering-kit@0.16.0_@pnpm+logger@1001.0.1/node_modules/skill-family-engineering-kit/src/workspace.mjs"() {
37431
37431
  init_errors4();
37432
37432
  OPAQUE_DIRECTORIES = Object.freeze([".git", "node_modules"]);
37433
37433
  DEFAULT_HANDWRITTEN_PATTERNS = Object.freeze([
@@ -37453,12 +37453,12 @@ var init_workspace2 = __esm({
37453
37453
  }
37454
37454
  });
37455
37455
 
37456
- // ../../node_modules/.pnpm/skill-family-engineering-kit@0.15.0_@pnpm+logger@1001.0.1/node_modules/skill-family-engineering-kit/src/migration.mjs
37456
+ // ../../node_modules/.pnpm/skill-family-engineering-kit@0.16.0_@pnpm+logger@1001.0.1/node_modules/skill-family-engineering-kit/src/migration.mjs
37457
37457
  import { lstat as lstat17, readFile as readFile8 } from "node:fs/promises";
37458
37458
  import { TextDecoder as TextDecoder4 } from "node:util";
37459
37459
  var UTF8_STRICT_DECODER, MIGRATION_MANIFEST_SCHEMA_ID, MIGRATION_MANIFEST_STATES, EXCEPTION_REQUIRED_FIELDS, MIGRATION_STATES, REQUIRED_FOUNDATION_PACKAGES, CAPABILITY_DISPOSITIONS, CONSUMER_VERIFICATION_NOT_EVALUATED, VERIFICATION_EVIDENCE_KINDS;
37460
37460
  var init_migration = __esm({
37461
- "../../node_modules/.pnpm/skill-family-engineering-kit@0.15.0_@pnpm+logger@1001.0.1/node_modules/skill-family-engineering-kit/src/migration.mjs"() {
37461
+ "../../node_modules/.pnpm/skill-family-engineering-kit@0.16.0_@pnpm+logger@1001.0.1/node_modules/skill-family-engineering-kit/src/migration.mjs"() {
37462
37462
  init_src();
37463
37463
  init_src2();
37464
37464
  init_workspace2();
@@ -37508,10 +37508,10 @@ var init_migration = __esm({
37508
37508
  }
37509
37509
  });
37510
37510
 
37511
- // ../../node_modules/.pnpm/skill-family-engineering-kit@0.15.0_@pnpm+logger@1001.0.1/node_modules/skill-family-engineering-kit/package.json
37511
+ // ../../node_modules/.pnpm/skill-family-engineering-kit@0.16.0_@pnpm+logger@1001.0.1/node_modules/skill-family-engineering-kit/package.json
37512
37512
  var package_default2;
37513
37513
  var init_package2 = __esm({
37514
- "../../node_modules/.pnpm/skill-family-engineering-kit@0.15.0_@pnpm+logger@1001.0.1/node_modules/skill-family-engineering-kit/package.json"() {
37514
+ "../../node_modules/.pnpm/skill-family-engineering-kit@0.16.0_@pnpm+logger@1001.0.1/node_modules/skill-family-engineering-kit/package.json"() {
37515
37515
  package_default2 = {
37516
37516
  "//": '~~ Generated by projen. To modify, edit .projenrc.js and run "npx projen".',
37517
37517
  author: "\u5E7F\u5DDE\u5E02\u98CE\u8377\u79D1\u6280\u6709\u9650\u516C\u53F8",
@@ -37522,8 +37522,8 @@ var init_package2 = __esm({
37522
37522
  url: "https://github.com/ifoohoo/skill-family-engineering-kit/issues"
37523
37523
  },
37524
37524
  dependencies: {
37525
- "skill-family-contracts": "0.15.0",
37526
- "skill-family-harness-node": "0.15.0"
37525
+ "skill-family-contracts": "0.16.0",
37526
+ "skill-family-harness-node": "0.16.0"
37527
37527
  },
37528
37528
  description: "Build-time scaffold, adoption planning, projection, and checks.",
37529
37529
  engines: {
@@ -37565,7 +37565,7 @@ var init_package2 = __esm({
37565
37565
  url: "https://github.com/ifoohoo/skill-family-engineering-kit.git"
37566
37566
  },
37567
37567
  type: "module",
37568
- version: "0.15.0",
37568
+ version: "0.16.0",
37569
37569
  scripts: {
37570
37570
  check: "node --test",
37571
37571
  test: "node --test"
@@ -37574,22 +37574,22 @@ var init_package2 = __esm({
37574
37574
  }
37575
37575
  });
37576
37576
 
37577
- // ../../node_modules/.pnpm/skill-family-engineering-kit@0.15.0_@pnpm+logger@1001.0.1/node_modules/skill-family-engineering-kit/src/version.mjs
37577
+ // ../../node_modules/.pnpm/skill-family-engineering-kit@0.16.0_@pnpm+logger@1001.0.1/node_modules/skill-family-engineering-kit/src/version.mjs
37578
37578
  var KIT_VERSION;
37579
37579
  var init_version2 = __esm({
37580
- "../../node_modules/.pnpm/skill-family-engineering-kit@0.15.0_@pnpm+logger@1001.0.1/node_modules/skill-family-engineering-kit/src/version.mjs"() {
37580
+ "../../node_modules/.pnpm/skill-family-engineering-kit@0.16.0_@pnpm+logger@1001.0.1/node_modules/skill-family-engineering-kit/src/version.mjs"() {
37581
37581
  init_package2();
37582
37582
  KIT_VERSION = package_default2.version;
37583
37583
  }
37584
37584
  });
37585
37585
 
37586
- // ../../node_modules/.pnpm/skill-family-engineering-kit@0.15.0_@pnpm+logger@1001.0.1/node_modules/skill-family-engineering-kit/src/capability-assessment.mjs
37586
+ // ../../node_modules/.pnpm/skill-family-engineering-kit@0.16.0_@pnpm+logger@1001.0.1/node_modules/skill-family-engineering-kit/src/capability-assessment.mjs
37587
37587
  import { lstat as lstat18, readFile as readFile9 } from "node:fs/promises";
37588
37588
  import path23 from "node:path";
37589
37589
  import { fileURLToPath as fileURLToPath4 } from "node:url";
37590
37590
  var ADOPTION_SCOPES, LOCALES, MODES, DEFAULT_CATALOG_DIR, DECISION_REQUIREMENTS;
37591
37591
  var init_capability_assessment = __esm({
37592
- "../../node_modules/.pnpm/skill-family-engineering-kit@0.15.0_@pnpm+logger@1001.0.1/node_modules/skill-family-engineering-kit/src/capability-assessment.mjs"() {
37592
+ "../../node_modules/.pnpm/skill-family-engineering-kit@0.16.0_@pnpm+logger@1001.0.1/node_modules/skill-family-engineering-kit/src/capability-assessment.mjs"() {
37593
37593
  init_src();
37594
37594
  init_src2();
37595
37595
  init_errors4();
@@ -37613,11 +37613,11 @@ var init_capability_assessment = __esm({
37613
37613
  }
37614
37614
  });
37615
37615
 
37616
- // ../../node_modules/.pnpm/skill-family-engineering-kit@0.15.0_@pnpm+logger@1001.0.1/node_modules/skill-family-engineering-kit/src/skeleton.mjs
37616
+ // ../../node_modules/.pnpm/skill-family-engineering-kit@0.16.0_@pnpm+logger@1001.0.1/node_modules/skill-family-engineering-kit/src/skeleton.mjs
37617
37617
  import { readFile as readFile10 } from "node:fs/promises";
37618
37618
  var KIT_TOOL_NAME, PROJECT_MANIFEST_PATH, MANAGED_LOCK_PATH, PROJECTION_MANIFEST_PATH, IDENTITY_RECORD_PATH, PUBLIC_BOUNDARY_DECLARATION_PATH, PLATFORM_SUBSET_DECLARATION_PATH;
37619
37619
  var init_skeleton = __esm({
37620
- "../../node_modules/.pnpm/skill-family-engineering-kit@0.15.0_@pnpm+logger@1001.0.1/node_modules/skill-family-engineering-kit/src/skeleton.mjs"() {
37620
+ "../../node_modules/.pnpm/skill-family-engineering-kit@0.16.0_@pnpm+logger@1001.0.1/node_modules/skill-family-engineering-kit/src/skeleton.mjs"() {
37621
37621
  init_src();
37622
37622
  init_src2();
37623
37623
  init_errors4();
@@ -37635,12 +37635,12 @@ var init_skeleton = __esm({
37635
37635
  }
37636
37636
  });
37637
37637
 
37638
- // ../../node_modules/.pnpm/skill-family-engineering-kit@0.15.0_@pnpm+logger@1001.0.1/node_modules/skill-family-engineering-kit/src/identity-check.mjs
37638
+ // ../../node_modules/.pnpm/skill-family-engineering-kit@0.16.0_@pnpm+logger@1001.0.1/node_modules/skill-family-engineering-kit/src/identity-check.mjs
37639
37639
  import { readdir as readdir9 } from "node:fs/promises";
37640
37640
  import path24 from "node:path";
37641
37641
  var IDENTITY_SOURCE_PRIORITY;
37642
37642
  var init_identity_check = __esm({
37643
- "../../node_modules/.pnpm/skill-family-engineering-kit@0.15.0_@pnpm+logger@1001.0.1/node_modules/skill-family-engineering-kit/src/identity-check.mjs"() {
37643
+ "../../node_modules/.pnpm/skill-family-engineering-kit@0.16.0_@pnpm+logger@1001.0.1/node_modules/skill-family-engineering-kit/src/identity-check.mjs"() {
37644
37644
  init_src2();
37645
37645
  init_licensing();
37646
37646
  IDENTITY_SOURCE_PRIORITY = Object.freeze([
@@ -37656,11 +37656,11 @@ var init_identity_check = __esm({
37656
37656
  }
37657
37657
  });
37658
37658
 
37659
- // ../../node_modules/.pnpm/skill-family-engineering-kit@0.15.0_@pnpm+logger@1001.0.1/node_modules/skill-family-engineering-kit/src/check.mjs
37659
+ // ../../node_modules/.pnpm/skill-family-engineering-kit@0.16.0_@pnpm+logger@1001.0.1/node_modules/skill-family-engineering-kit/src/check.mjs
37660
37660
  import { readFileSync as readFileSync13 } from "node:fs";
37661
37661
  var CHECK_CLASSES, DOCUMENT_STATES;
37662
37662
  var init_check = __esm({
37663
- "../../node_modules/.pnpm/skill-family-engineering-kit@0.15.0_@pnpm+logger@1001.0.1/node_modules/skill-family-engineering-kit/src/check.mjs"() {
37663
+ "../../node_modules/.pnpm/skill-family-engineering-kit@0.16.0_@pnpm+logger@1001.0.1/node_modules/skill-family-engineering-kit/src/check.mjs"() {
37664
37664
  init_src();
37665
37665
  init_src2();
37666
37666
  init_errors4();
@@ -37689,10 +37689,10 @@ var init_check = __esm({
37689
37689
  }
37690
37690
  });
37691
37691
 
37692
- // ../../node_modules/.pnpm/skill-family-engineering-kit@0.15.0_@pnpm+logger@1001.0.1/node_modules/skill-family-engineering-kit/src/adopt-plan.mjs
37692
+ // ../../node_modules/.pnpm/skill-family-engineering-kit@0.16.0_@pnpm+logger@1001.0.1/node_modules/skill-family-engineering-kit/src/adopt-plan.mjs
37693
37693
  import path25 from "node:path";
37694
37694
  var init_adopt_plan = __esm({
37695
- "../../node_modules/.pnpm/skill-family-engineering-kit@0.15.0_@pnpm+logger@1001.0.1/node_modules/skill-family-engineering-kit/src/adopt-plan.mjs"() {
37695
+ "../../node_modules/.pnpm/skill-family-engineering-kit@0.16.0_@pnpm+logger@1001.0.1/node_modules/skill-family-engineering-kit/src/adopt-plan.mjs"() {
37696
37696
  init_src();
37697
37697
  init_src2();
37698
37698
  init_check();
@@ -37705,12 +37705,12 @@ var init_adopt_plan = __esm({
37705
37705
  }
37706
37706
  });
37707
37707
 
37708
- // ../../node_modules/.pnpm/skill-family-engineering-kit@0.15.0_@pnpm+logger@1001.0.1/node_modules/skill-family-engineering-kit/src/core-check.mjs
37708
+ // ../../node_modules/.pnpm/skill-family-engineering-kit@0.16.0_@pnpm+logger@1001.0.1/node_modules/skill-family-engineering-kit/src/core-check.mjs
37709
37709
  import { lstat as lstat19 } from "node:fs/promises";
37710
37710
  import path26 from "node:path";
37711
37711
  var CORE_CHECK_SECURITY_KINDS, CLASS_READ_PATHS;
37712
37712
  var init_core_check = __esm({
37713
- "../../node_modules/.pnpm/skill-family-engineering-kit@0.15.0_@pnpm+logger@1001.0.1/node_modules/skill-family-engineering-kit/src/core-check.mjs"() {
37713
+ "../../node_modules/.pnpm/skill-family-engineering-kit@0.16.0_@pnpm+logger@1001.0.1/node_modules/skill-family-engineering-kit/src/core-check.mjs"() {
37714
37714
  init_errors4();
37715
37715
  init_check();
37716
37716
  init_skeleton();
@@ -37746,10 +37746,10 @@ var init_core_check = __esm({
37746
37746
  }
37747
37747
  });
37748
37748
 
37749
- // ../../node_modules/.pnpm/skill-family-engineering-kit@0.15.0_@pnpm+logger@1001.0.1/node_modules/skill-family-engineering-kit/src/entry-check.mjs
37749
+ // ../../node_modules/.pnpm/skill-family-engineering-kit@0.16.0_@pnpm+logger@1001.0.1/node_modules/skill-family-engineering-kit/src/entry-check.mjs
37750
37750
  var ENTRY_FORMS, ENTRY_SIDE_EFFECT_CLASSES;
37751
37751
  var init_entry_check = __esm({
37752
- "../../node_modules/.pnpm/skill-family-engineering-kit@0.15.0_@pnpm+logger@1001.0.1/node_modules/skill-family-engineering-kit/src/entry-check.mjs"() {
37752
+ "../../node_modules/.pnpm/skill-family-engineering-kit@0.16.0_@pnpm+logger@1001.0.1/node_modules/skill-family-engineering-kit/src/entry-check.mjs"() {
37753
37753
  init_src2();
37754
37754
  init_src();
37755
37755
  init_errors4();
@@ -37760,11 +37760,11 @@ var init_entry_check = __esm({
37760
37760
  }
37761
37761
  });
37762
37762
 
37763
- // ../../node_modules/.pnpm/skill-family-engineering-kit@0.15.0_@pnpm+logger@1001.0.1/node_modules/skill-family-engineering-kit/src/relock.mjs
37763
+ // ../../node_modules/.pnpm/skill-family-engineering-kit@0.16.0_@pnpm+logger@1001.0.1/node_modules/skill-family-engineering-kit/src/relock.mjs
37764
37764
  import { lstat as lstat20, readFile as readFile11 } from "node:fs/promises";
37765
37765
  import path27 from "node:path";
37766
37766
  var init_relock = __esm({
37767
- "../../node_modules/.pnpm/skill-family-engineering-kit@0.15.0_@pnpm+logger@1001.0.1/node_modules/skill-family-engineering-kit/src/relock.mjs"() {
37767
+ "../../node_modules/.pnpm/skill-family-engineering-kit@0.16.0_@pnpm+logger@1001.0.1/node_modules/skill-family-engineering-kit/src/relock.mjs"() {
37768
37768
  init_src2();
37769
37769
  init_errors4();
37770
37770
  init_skeleton();
@@ -37774,7 +37774,7 @@ var init_relock = __esm({
37774
37774
  }
37775
37775
  });
37776
37776
 
37777
- // ../../node_modules/.pnpm/skill-family-engineering-kit@0.15.0_@pnpm+logger@1001.0.1/node_modules/skill-family-engineering-kit/src/projection.mjs
37777
+ // ../../node_modules/.pnpm/skill-family-engineering-kit@0.16.0_@pnpm+logger@1001.0.1/node_modules/skill-family-engineering-kit/src/projection.mjs
37778
37778
  import {
37779
37779
  chmod,
37780
37780
  lstat as lstat21,
@@ -39113,7 +39113,7 @@ async function runProjection({ root, manifest: manifestInput, candidateRoot, fau
39113
39113
  }
39114
39114
  var SHA256_HEX_PATTERN2, V2_KIND, OWNER_KIND, TARGET_FACTS_CONTROL_PATHS, PROJECTION_AUTHORITY_BINDING_KINDS, BASE64_PATTERN;
39115
39115
  var init_projection = __esm({
39116
- "../../node_modules/.pnpm/skill-family-engineering-kit@0.15.0_@pnpm+logger@1001.0.1/node_modules/skill-family-engineering-kit/src/projection.mjs"() {
39116
+ "../../node_modules/.pnpm/skill-family-engineering-kit@0.16.0_@pnpm+logger@1001.0.1/node_modules/skill-family-engineering-kit/src/projection.mjs"() {
39117
39117
  init_src();
39118
39118
  init_src2();
39119
39119
  init_errors4();
@@ -39186,12 +39186,12 @@ var init_projection = __esm({
39186
39186
  }
39187
39187
  });
39188
39188
 
39189
- // ../../node_modules/.pnpm/skill-family-engineering-kit@0.15.0_@pnpm+logger@1001.0.1/node_modules/skill-family-engineering-kit/src/report.mjs
39189
+ // ../../node_modules/.pnpm/skill-family-engineering-kit@0.16.0_@pnpm+logger@1001.0.1/node_modules/skill-family-engineering-kit/src/report.mjs
39190
39190
  import process7 from "node:process";
39191
39191
  import { lstat as lstat22, readFile as readFile13, realpath as realpath12, rm as rm5, stat as stat5 } from "node:fs/promises";
39192
39192
  import path29 from "node:path";
39193
39193
  var init_report2 = __esm({
39194
- "../../node_modules/.pnpm/skill-family-engineering-kit@0.15.0_@pnpm+logger@1001.0.1/node_modules/skill-family-engineering-kit/src/report.mjs"() {
39194
+ "../../node_modules/.pnpm/skill-family-engineering-kit@0.16.0_@pnpm+logger@1001.0.1/node_modules/skill-family-engineering-kit/src/report.mjs"() {
39195
39195
  init_src2();
39196
39196
  init_src();
39197
39197
  init_errors4();
@@ -39199,11 +39199,11 @@ var init_report2 = __esm({
39199
39199
  }
39200
39200
  });
39201
39201
 
39202
- // ../../node_modules/.pnpm/skill-family-engineering-kit@0.15.0_@pnpm+logger@1001.0.1/node_modules/skill-family-engineering-kit/src/scaffold.mjs
39202
+ // ../../node_modules/.pnpm/skill-family-engineering-kit@0.16.0_@pnpm+logger@1001.0.1/node_modules/skill-family-engineering-kit/src/scaffold.mjs
39203
39203
  import { lstat as lstat23, mkdir as mkdir4, readdir as readdir11 } from "node:fs/promises";
39204
39204
  import path30 from "node:path";
39205
39205
  var init_scaffold = __esm({
39206
- "../../node_modules/.pnpm/skill-family-engineering-kit@0.15.0_@pnpm+logger@1001.0.1/node_modules/skill-family-engineering-kit/src/scaffold.mjs"() {
39206
+ "../../node_modules/.pnpm/skill-family-engineering-kit@0.16.0_@pnpm+logger@1001.0.1/node_modules/skill-family-engineering-kit/src/scaffold.mjs"() {
39207
39207
  init_src();
39208
39208
  init_src2();
39209
39209
  init_errors4();
@@ -39213,11 +39213,11 @@ var init_scaffold = __esm({
39213
39213
  }
39214
39214
  });
39215
39215
 
39216
- // ../../node_modules/.pnpm/skill-family-engineering-kit@0.15.0_@pnpm+logger@1001.0.1/node_modules/skill-family-engineering-kit/src/host-drivers.mjs
39216
+ // ../../node_modules/.pnpm/skill-family-engineering-kit@0.16.0_@pnpm+logger@1001.0.1/node_modules/skill-family-engineering-kit/src/host-drivers.mjs
39217
39217
  import path31 from "node:path";
39218
39218
  var CAPABILITIES, DRIVERS, HOST_DRIVER_IDS;
39219
39219
  var init_host_drivers = __esm({
39220
- "../../node_modules/.pnpm/skill-family-engineering-kit@0.15.0_@pnpm+logger@1001.0.1/node_modules/skill-family-engineering-kit/src/host-drivers.mjs"() {
39220
+ "../../node_modules/.pnpm/skill-family-engineering-kit@0.16.0_@pnpm+logger@1001.0.1/node_modules/skill-family-engineering-kit/src/host-drivers.mjs"() {
39221
39221
  init_src2();
39222
39222
  CAPABILITIES = Object.freeze(["cli", "version", "payload", "registry", "discover", "enabled", "reload", "smoke", "uninstall"]);
39223
39223
  DRIVERS = Object.freeze({
@@ -39228,7 +39228,7 @@ var init_host_drivers = __esm({
39228
39228
  }
39229
39229
  });
39230
39230
 
39231
- // ../../node_modules/.pnpm/skill-family-engineering-kit@0.15.0_@pnpm+logger@1001.0.1/node_modules/skill-family-engineering-kit/src/host-profiles.mjs
39231
+ // ../../node_modules/.pnpm/skill-family-engineering-kit@0.16.0_@pnpm+logger@1001.0.1/node_modules/skill-family-engineering-kit/src/host-profiles.mjs
39232
39232
  import { realpathSync as realpathSync2 } from "node:fs";
39233
39233
  import { fileURLToPath as fileURLToPath5 } from "node:url";
39234
39234
  function bundledHostProfilesRoot() {
@@ -39311,7 +39311,7 @@ async function resolveHostId(options = {}) {
39311
39311
  }
39312
39312
  var HOST_DESCRIPTOR_SCHEMA_ID, HOST_REGISTRY_SCHEMA_ID, HOST_ID_PATTERN;
39313
39313
  var init_host_profiles = __esm({
39314
- "../../node_modules/.pnpm/skill-family-engineering-kit@0.15.0_@pnpm+logger@1001.0.1/node_modules/skill-family-engineering-kit/src/host-profiles.mjs"() {
39314
+ "../../node_modules/.pnpm/skill-family-engineering-kit@0.16.0_@pnpm+logger@1001.0.1/node_modules/skill-family-engineering-kit/src/host-profiles.mjs"() {
39315
39315
  init_src();
39316
39316
  init_src2();
39317
39317
  init_errors4();
@@ -39331,10 +39331,10 @@ var init_host_profiles = __esm({
39331
39331
  }
39332
39332
  });
39333
39333
 
39334
- // ../../node_modules/.pnpm/skill-family-engineering-kit@0.15.0_@pnpm+logger@1001.0.1/node_modules/skill-family-engineering-kit/src/host.mjs
39334
+ // ../../node_modules/.pnpm/skill-family-engineering-kit@0.16.0_@pnpm+logger@1001.0.1/node_modules/skill-family-engineering-kit/src/host.mjs
39335
39335
  import path32 from "node:path";
39336
39336
  var init_host2 = __esm({
39337
- "../../node_modules/.pnpm/skill-family-engineering-kit@0.15.0_@pnpm+logger@1001.0.1/node_modules/skill-family-engineering-kit/src/host.mjs"() {
39337
+ "../../node_modules/.pnpm/skill-family-engineering-kit@0.16.0_@pnpm+logger@1001.0.1/node_modules/skill-family-engineering-kit/src/host.mjs"() {
39338
39338
  init_src();
39339
39339
  init_src2();
39340
39340
  init_errors4();
@@ -39343,7 +39343,7 @@ var init_host2 = __esm({
39343
39343
  }
39344
39344
  });
39345
39345
 
39346
- // ../../node_modules/.pnpm/skill-family-engineering-kit@0.15.0_@pnpm+logger@1001.0.1/node_modules/skill-family-engineering-kit/src/host-verification-drivers.mjs
39346
+ // ../../node_modules/.pnpm/skill-family-engineering-kit@0.16.0_@pnpm+logger@1001.0.1/node_modules/skill-family-engineering-kit/src/host-verification-drivers.mjs
39347
39347
  import path33 from "node:path";
39348
39348
  function nativeStage(name, commands) {
39349
39349
  return Object.freeze({
@@ -39549,7 +39549,7 @@ function qoderJsonOk(stdoutText) {
39549
39549
  }
39550
39550
  var CONTROLLED_NATIVE_LIFECYCLE_FIXTURE_PROTOCOL, NATIVE_TREE_ROLES, QODER_NATIVE_LIFECYCLE, WORKBUDDY_NATIVE_LIFECYCLE, KIMI_DRIVER, WORKBUDDY_DRIVER, CLAUDE_DRIVER, CODEX_DRIVER, QODER_DRIVER, BUILT_IN_HOST_VERIFICATION_DRIVERS;
39551
39551
  var init_host_verification_drivers = __esm({
39552
- "../../node_modules/.pnpm/skill-family-engineering-kit@0.15.0_@pnpm+logger@1001.0.1/node_modules/skill-family-engineering-kit/src/host-verification-drivers.mjs"() {
39552
+ "../../node_modules/.pnpm/skill-family-engineering-kit@0.16.0_@pnpm+logger@1001.0.1/node_modules/skill-family-engineering-kit/src/host-verification-drivers.mjs"() {
39553
39553
  CONTROLLED_NATIVE_LIFECYCLE_FIXTURE_PROTOCOL = "skill-family.controlled-native-lifecycle-fixture/v1";
39554
39554
  NATIVE_TREE_ROLES = Object.freeze({
39555
39555
  preflight: Object.freeze([]),
@@ -39715,11 +39715,11 @@ var init_host_verification_drivers = __esm({
39715
39715
  }
39716
39716
  });
39717
39717
 
39718
- // ../../node_modules/.pnpm/skill-family-engineering-kit@0.15.0_@pnpm+logger@1001.0.1/node_modules/skill-family-engineering-kit/src/host-verification.mjs
39718
+ // ../../node_modules/.pnpm/skill-family-engineering-kit@0.16.0_@pnpm+logger@1001.0.1/node_modules/skill-family-engineering-kit/src/host-verification.mjs
39719
39719
  import { lstat as lstat24, mkdir as mkdir5, readdir as readdir12, realpath as realpath13, stat as stat6 } from "node:fs/promises";
39720
39720
  import path34 from "node:path";
39721
39721
  var init_host_verification = __esm({
39722
- "../../node_modules/.pnpm/skill-family-engineering-kit@0.15.0_@pnpm+logger@1001.0.1/node_modules/skill-family-engineering-kit/src/host-verification.mjs"() {
39722
+ "../../node_modules/.pnpm/skill-family-engineering-kit@0.16.0_@pnpm+logger@1001.0.1/node_modules/skill-family-engineering-kit/src/host-verification.mjs"() {
39723
39723
  init_src();
39724
39724
  init_src2();
39725
39725
  init_errors4();
@@ -39728,7 +39728,7 @@ var init_host_verification = __esm({
39728
39728
  }
39729
39729
  });
39730
39730
 
39731
- // ../../node_modules/.pnpm/skill-family-engineering-kit@0.15.0_@pnpm+logger@1001.0.1/node_modules/skill-family-engineering-kit/src/plugin-verification.mjs
39731
+ // ../../node_modules/.pnpm/skill-family-engineering-kit@0.16.0_@pnpm+logger@1001.0.1/node_modules/skill-family-engineering-kit/src/plugin-verification.mjs
39732
39732
  import { mkdir as mkdir6, readdir as readdir13, realpath as realpath14, stat as stat7 } from "node:fs/promises";
39733
39733
  import path35 from "node:path";
39734
39734
  function fail3(message, details = {}) {
@@ -40371,7 +40371,7 @@ async function runPluginVerification({ request, bindings, hostsRoot } = {}) {
40371
40371
  }
40372
40372
  var REQUEST_SCHEMA, RESULT_SCHEMA, ACTION, SHA256, COMMIT, NATIVE_LIFECYCLE_STAGES;
40373
40373
  var init_plugin_verification = __esm({
40374
- "../../node_modules/.pnpm/skill-family-engineering-kit@0.15.0_@pnpm+logger@1001.0.1/node_modules/skill-family-engineering-kit/src/plugin-verification.mjs"() {
40374
+ "../../node_modules/.pnpm/skill-family-engineering-kit@0.16.0_@pnpm+logger@1001.0.1/node_modules/skill-family-engineering-kit/src/plugin-verification.mjs"() {
40375
40375
  init_src();
40376
40376
  init_src2();
40377
40377
  init_errors4();
@@ -40436,11 +40436,11 @@ var init_plugin_verification = __esm({
40436
40436
  }
40437
40437
  });
40438
40438
 
40439
- // ../../node_modules/.pnpm/skill-family-engineering-kit@0.15.0_@pnpm+logger@1001.0.1/node_modules/skill-family-engineering-kit/src/skill-family-directory-verification.mjs
40439
+ // ../../node_modules/.pnpm/skill-family-engineering-kit@0.16.0_@pnpm+logger@1001.0.1/node_modules/skill-family-engineering-kit/src/skill-family-directory-verification.mjs
40440
40440
  import { mkdir as mkdir7, readdir as readdir14, realpath as realpath15, stat as stat8 } from "node:fs/promises";
40441
40441
  import path36 from "node:path";
40442
40442
  var init_skill_family_directory_verification = __esm({
40443
- "../../node_modules/.pnpm/skill-family-engineering-kit@0.15.0_@pnpm+logger@1001.0.1/node_modules/skill-family-engineering-kit/src/skill-family-directory-verification.mjs"() {
40443
+ "../../node_modules/.pnpm/skill-family-engineering-kit@0.16.0_@pnpm+logger@1001.0.1/node_modules/skill-family-engineering-kit/src/skill-family-directory-verification.mjs"() {
40444
40444
  init_src();
40445
40445
  init_src2();
40446
40446
  init_errors4();
@@ -40449,12 +40449,12 @@ var init_skill_family_directory_verification = __esm({
40449
40449
  }
40450
40450
  });
40451
40451
 
40452
- // ../../node_modules/.pnpm/skill-family-engineering-kit@0.15.0_@pnpm+logger@1001.0.1/node_modules/skill-family-engineering-kit/src/qualification.mjs
40452
+ // ../../node_modules/.pnpm/skill-family-engineering-kit@0.16.0_@pnpm+logger@1001.0.1/node_modules/skill-family-engineering-kit/src/qualification.mjs
40453
40453
  import { lstat as lstat25, mkdir as mkdir8, readdir as readdir15, realpath as realpath16, stat as stat9 } from "node:fs/promises";
40454
40454
  import path37 from "node:path";
40455
40455
  var QUALIFICATION_NOTICE;
40456
40456
  var init_qualification = __esm({
40457
- "../../node_modules/.pnpm/skill-family-engineering-kit@0.15.0_@pnpm+logger@1001.0.1/node_modules/skill-family-engineering-kit/src/qualification.mjs"() {
40457
+ "../../node_modules/.pnpm/skill-family-engineering-kit@0.16.0_@pnpm+logger@1001.0.1/node_modules/skill-family-engineering-kit/src/qualification.mjs"() {
40458
40458
  init_src();
40459
40459
  init_src();
40460
40460
  init_src2();
@@ -40469,10 +40469,10 @@ var init_qualification = __esm({
40469
40469
  }
40470
40470
  });
40471
40471
 
40472
- // ../../node_modules/.pnpm/skill-family-engineering-kit@0.15.0_@pnpm+logger@1001.0.1/node_modules/skill-family-engineering-kit/src/index.mjs
40472
+ // ../../node_modules/.pnpm/skill-family-engineering-kit@0.16.0_@pnpm+logger@1001.0.1/node_modules/skill-family-engineering-kit/src/index.mjs
40473
40473
  var TOP_LEVEL_COMMANDS, FORBIDDEN_SIDE_EFFECTS, COMMAND_SIDE_EFFECTS, KIT_EXIT_CODES;
40474
40474
  var init_src3 = __esm({
40475
- "../../node_modules/.pnpm/skill-family-engineering-kit@0.15.0_@pnpm+logger@1001.0.1/node_modules/skill-family-engineering-kit/src/index.mjs"() {
40475
+ "../../node_modules/.pnpm/skill-family-engineering-kit@0.16.0_@pnpm+logger@1001.0.1/node_modules/skill-family-engineering-kit/src/index.mjs"() {
40476
40476
  init_src();
40477
40477
  init_adopt_plan();
40478
40478
  init_check();
@@ -41768,6 +41768,91 @@ function getPlatform(id) {
41768
41768
  if (!platform) throw new Error(`unknown platform: ${id}`);
41769
41769
  return platform;
41770
41770
  }
41771
+ function standaloneIdentityCore(platformOrId, fields) {
41772
+ const platform = typeof platformOrId === "string" ? getPlatform(platformOrId) : platformOrId;
41773
+ const id = platform?.id;
41774
+ if (id !== "claude" && id !== "codex") {
41775
+ throw new Error(`standalone-index install identity is unsupported for platform "${id ?? "<unknown>"}"`);
41776
+ }
41777
+ const { name, source, version } = fields;
41778
+ if (typeof name !== "string" || name.length === 0 || !source || typeof source !== "object" || Array.isArray(source) || typeof source.source !== "string" || typeof source.ref !== "string" || source.ref.length === 0 || typeof source.sha !== "string" || !STANDALONE_SHA_RE.test(source.sha)) {
41779
+ throw new Error(`${id} standalone-index install identity has invalid owned fields`);
41780
+ }
41781
+ if (id === "claude") {
41782
+ if (source.source !== "github" || typeof source.repo !== "string" || source.repo.length === 0 || typeof version !== "string" || version.length === 0) {
41783
+ throw new Error("Claude standalone-index install identity requires github repo, ref, sha, and version");
41784
+ }
41785
+ return {
41786
+ name,
41787
+ source: { source: "github", repo: source.repo, ref: source.ref, sha: source.sha },
41788
+ version
41789
+ };
41790
+ }
41791
+ if (source.source !== "url" || typeof source.url !== "string" || source.url.length === 0) {
41792
+ throw new Error("Codex standalone-index install identity requires url, ref, and sha");
41793
+ }
41794
+ return {
41795
+ name,
41796
+ source: { source: "url", url: source.url, ref: source.ref, sha: source.sha }
41797
+ };
41798
+ }
41799
+ function buildExpectedStandaloneIndexInstallIdentity(platformOrId, frozenIdentity = {}) {
41800
+ const platform = typeof platformOrId === "string" ? getPlatform(platformOrId) : platformOrId;
41801
+ const id = platform?.id;
41802
+ const { name, repo, tag, sha, version } = frozenIdentity;
41803
+ if (typeof repo !== "string" || repo.length === 0 || typeof tag !== "string" || tag.length === 0) {
41804
+ throw new Error("standalone-index expected identity requires a plugin repository and tag");
41805
+ }
41806
+ if (id === "claude") {
41807
+ return standaloneIdentityCore(platform, {
41808
+ name,
41809
+ version,
41810
+ source: { source: "github", repo, ref: tag, sha }
41811
+ });
41812
+ }
41813
+ if (id === "codex") {
41814
+ return standaloneIdentityCore(platform, {
41815
+ name,
41816
+ source: { source: "url", url: `https://github.com/${repo}.git`, ref: `refs/tags/${tag}`, sha }
41817
+ });
41818
+ }
41819
+ return standaloneIdentityCore(platform, { name, source: {}, version });
41820
+ }
41821
+ function projectObservedStandaloneIndexInstallIdentity(platformOrId, entry) {
41822
+ const platform = typeof platformOrId === "string" ? getPlatform(platformOrId) : platformOrId;
41823
+ const id = platform?.id;
41824
+ if (!entry || typeof entry !== "object" || Array.isArray(entry)) {
41825
+ throw new Error("standalone-index observed identity requires an entry object");
41826
+ }
41827
+ const source = entry.source;
41828
+ if (!source || typeof source !== "object" || Array.isArray(source)) {
41829
+ throw new Error("standalone-index observed identity requires a source object");
41830
+ }
41831
+ if (id === "claude") {
41832
+ return standaloneIdentityCore(platform, {
41833
+ name: entry.name,
41834
+ version: entry.version,
41835
+ source: {
41836
+ source: source.source,
41837
+ repo: source.repo,
41838
+ ref: source.ref,
41839
+ sha: source.sha
41840
+ }
41841
+ });
41842
+ }
41843
+ if (id === "codex") {
41844
+ return standaloneIdentityCore(platform, {
41845
+ name: entry.name,
41846
+ source: {
41847
+ source: source.source,
41848
+ url: source.url,
41849
+ ref: source.ref,
41850
+ sha: source.sha
41851
+ }
41852
+ });
41853
+ }
41854
+ return standaloneIdentityCore(platform, { name: entry.name, source });
41855
+ }
41771
41856
  function resolveSkillProjectionSurfaceHost(surfaceId, registry = PLATFORMS) {
41772
41857
  const platform = registry.find((item) => item.skillProjectionSurface === surfaceId);
41773
41858
  return platform?.buildAdapter?.name ?? null;
@@ -41982,7 +42067,7 @@ async function normalizeHostId(hostId, { fallback = false } = {}) {
41982
42067
  throw err;
41983
42068
  }
41984
42069
  }
41985
- var CLAUDE, CODEX, KIMI, CODEBUDDY, PLATFORMS, VALID_DISTRIBUTION_TYPES, VALID_ACTION_TYPES, VALID_SOURCE_FORMS, VALID_MARKETPLACE_REF_FORMS, VALID_LIST_OUTPUTS, VALID_CLI_OUTPUTS, VALID_ENTRY_VERSION_BINDING, VALID_INSTALL_METHODS, VALID_REF_STRENGTHS, VALID_OUTPUT_PROTOCOLS, VALID_IDENTITY_EVIDENCE, VALID_DEGRADATION_POLICIES, SKILL_PROJECTION_SURFACE_PATTERN, cachedHostsRoot, normalizedHostIds;
42070
+ var CLAUDE, CODEX, KIMI, CODEBUDDY, PLATFORMS, VALID_DISTRIBUTION_TYPES, VALID_ACTION_TYPES, VALID_SOURCE_FORMS, VALID_MARKETPLACE_REF_FORMS, VALID_LIST_OUTPUTS, VALID_CLI_OUTPUTS, VALID_ENTRY_VERSION_BINDING, VALID_INSTALL_METHODS, VALID_REF_STRENGTHS, VALID_OUTPUT_PROTOCOLS, VALID_IDENTITY_EVIDENCE, VALID_DEGRADATION_POLICIES, SKILL_PROJECTION_SURFACE_PATTERN, STANDALONE_SHA_RE, cachedHostsRoot, normalizedHostIds;
41986
42071
  var init_registry2 = __esm({
41987
42072
  async "src/platforms/registry.mjs"() {
41988
42073
  init_src3();
@@ -42269,6 +42354,10 @@ var init_registry2 = __esm({
42269
42354
  VALID_DEGRADATION_POLICIES = /* @__PURE__ */ new Set(["block", "human-attestation", "human-attestation-with-fallback"]);
42270
42355
  SKILL_PROJECTION_SURFACE_PATTERN = /^platforms\/[a-z0-9]+(?:-[a-z0-9]+)*$/u;
42271
42356
  __name(getPlatform, "getPlatform");
42357
+ STANDALONE_SHA_RE = /^[0-9a-f]{40}$/u;
42358
+ __name(standaloneIdentityCore, "standaloneIdentityCore");
42359
+ __name(buildExpectedStandaloneIndexInstallIdentity, "buildExpectedStandaloneIndexInstallIdentity");
42360
+ __name(projectObservedStandaloneIndexInstallIdentity, "projectObservedStandaloneIndexInstallIdentity");
42272
42361
  __name(resolveSkillProjectionSurfaceHost, "resolveSkillProjectionSurfaceHost");
42273
42362
  __name(assertRegistry, "assertRegistry");
42274
42363
  assertRegistry();
@@ -43160,6 +43249,7 @@ function validatePlanActionCompleteness(plan, options = {}) {
43160
43249
  }
43161
43250
  if (production && externalMarketplace && dist.marketplaceSourceType === "standalone-index") {
43162
43251
  const params = action.parameters;
43252
+ const bootstrap = dist.firstReleaseBootstrap === "manual-index-checkpoint";
43163
43253
  if (params) {
43164
43254
  if (!params.marketplaceIndexPath) {
43165
43255
  failures.push(
@@ -43176,6 +43266,38 @@ function validatePlanActionCompleteness(plan, options = {}) {
43176
43266
  `unit "${unitId}", action "${action.id}": parameters.selectedEntry is required for production standalone-index`
43177
43267
  );
43178
43268
  }
43269
+ if (bootstrap) {
43270
+ if (params.firstReleaseBootstrap !== "manual-index-checkpoint") {
43271
+ failures.push(
43272
+ `unit "${unitId}", action "${action.id}": parameters.firstReleaseBootstrap must be manual-index-checkpoint for a bootstrap distribution`
43273
+ );
43274
+ }
43275
+ if (params.marketplaceIndexSha !== null) {
43276
+ failures.push(
43277
+ `unit "${unitId}", action "${action.id}": parameters.marketplaceIndexSha must remain null until the manual index checkpoint`
43278
+ );
43279
+ }
43280
+ let expectedEntry = null;
43281
+ try {
43282
+ expectedEntry = buildExpectedStandaloneIndexInstallIdentity(platform, {
43283
+ name: plugin,
43284
+ version: targetVersion,
43285
+ repo: publicRepo,
43286
+ tag: expectedTag,
43287
+ sha: frozen?.commit
43288
+ });
43289
+ } catch {
43290
+ }
43291
+ if (!expectedEntry || canonicalJson2(params.selectedEntry) !== canonicalJson2(expectedEntry)) {
43292
+ failures.push(
43293
+ `unit "${unitId}", action "${action.id}": bootstrap selectedEntry does not match the frozen plugin repository, tag, commit, and version`
43294
+ );
43295
+ }
43296
+ } else if (params.firstReleaseBootstrap !== void 0 || params.marketplaceIndexSha !== void 0) {
43297
+ failures.push(
43298
+ `unit "${unitId}", action "${action.id}": bootstrap-only fields are not allowed without firstReleaseBootstrap`
43299
+ );
43300
+ }
43179
43301
  }
43180
43302
  }
43181
43303
  if (!externalMarketplace && dist.marketplaceSourceType === "bundled-family") {
@@ -43205,6 +43327,14 @@ function validatePlanActionCompleteness(plan, options = {}) {
43205
43327
  _checkRequired(action, "expected.ref", action.expected?.ref, action.parameters?.ref, unitId, failures);
43206
43328
  _checkRequired(action, "expected.marketplaceLocation", action.expected?.marketplaceLocation, "external", unitId, failures);
43207
43329
  _checkRequired(action, "expected.marketplaceCommitSha", action.expected?.marketplaceCommitSha, action.parameters?.marketplaceCommitSha, unitId, failures);
43330
+ if (dist.firstReleaseBootstrap === "manual-index-checkpoint") {
43331
+ _checkRequired(action, "expected.firstReleaseBootstrap", action.expected?.firstReleaseBootstrap, "manual-index-checkpoint", unitId, failures);
43332
+ if (action.expected?.marketplaceIndexSha !== null) {
43333
+ failures.push(
43334
+ `unit "${unitId}", action "${action.id}": expected.marketplaceIndexSha must be null until the manual index checkpoint`
43335
+ );
43336
+ }
43337
+ }
43208
43338
  } else {
43209
43339
  _checkRequired(action, "expected.repo", action.expected?.repo, publicRepo, unitId, failures);
43210
43340
  _checkRequired(action, "expected.ref", action.expected?.ref, expectedTag, unitId, failures);
@@ -47797,7 +47927,17 @@ function isSafeRelativePath(value) {
47797
47927
  return typeof value === "string" && value.length > 0 && !value.startsWith("/") && !value.includes("\\") && !value.includes(":") && !value.includes("\0") && value.split("/").every((part) => part.length > 0 && part !== "." && part !== "..");
47798
47928
  }
47799
47929
  function decodeCanonicalBase64(value) {
47800
- if (typeof value !== "string" || !BASE64_PATTERN2.test(value)) return null;
47930
+ if (typeof value !== "string" || value.length % 4 !== 0) return null;
47931
+ let paddingStart = -1;
47932
+ for (let index = 0; index < value.length; index += 1) {
47933
+ const code = value.charCodeAt(index);
47934
+ if (code === 61) {
47935
+ if (paddingStart === -1) paddingStart = index;
47936
+ continue;
47937
+ }
47938
+ if (paddingStart !== -1 || !(code >= 65 && code <= 90 || code >= 97 && code <= 122 || code >= 48 && code <= 57 || code === 43 || code === 47)) return null;
47939
+ }
47940
+ if (paddingStart !== -1 && value.length - paddingStart > 2 || paddingStart !== -1 && paddingStart % 4 < 2) return null;
47801
47941
  const decoded = Buffer.from(value, "base64");
47802
47942
  return decoded.toString("base64") === value ? decoded : null;
47803
47943
  }
@@ -48075,7 +48215,7 @@ async function verifyFrozenPluginWithFoundation({
48075
48215
  ...extraInstallAudit.extraInstalledLinks.length > 0 ? { extraInstalledLinks: extraInstallAudit.extraInstalledLinks } : {}
48076
48216
  };
48077
48217
  }
48078
- var FOUNDATION_PLUGIN_DRIVER_VERSION, SHA256_PATTERN5, BASE64_PATTERN2;
48218
+ var FOUNDATION_PLUGIN_DRIVER_VERSION, SHA256_PATTERN5;
48079
48219
  var init_foundation_plugin_verification = __esm({
48080
48220
  async "src/core/foundation-plugin-verification.mjs"() {
48081
48221
  init_src();
@@ -48086,7 +48226,6 @@ var init_foundation_plugin_verification = __esm({
48086
48226
  init_errors3();
48087
48227
  FOUNDATION_PLUGIN_DRIVER_VERSION = "1.0.0";
48088
48228
  SHA256_PATTERN5 = /^[0-9a-f]{64}$/u;
48089
- BASE64_PATTERN2 = /^(?:[A-Za-z0-9+/]{4})*(?:[A-Za-z0-9+/]{2}==|[A-Za-z0-9+/]{3}=)?$/u;
48090
48229
  __name(isSafeRelativePath, "isSafeRelativePath");
48091
48230
  __name(decodeCanonicalBase64, "decodeCanonicalBase64");
48092
48231
  __name(hasExactKeys, "hasExactKeys");
@@ -59983,7 +60122,7 @@ var require_entry_index = __commonJS({
59983
60122
  var {
59984
60123
  appendFile,
59985
60124
  mkdir: mkdir35,
59986
- readFile: readFile56,
60125
+ readFile: readFile57,
59987
60126
  readdir: readdir34,
59988
60127
  rm: rm19,
59989
60128
  writeFile: writeFile16
@@ -60175,7 +60314,7 @@ ${hashEntry(stringified)} ${stringified}`);
60175
60314
  __name(ls, "ls");
60176
60315
  module.exports.bucketEntries = bucketEntries;
60177
60316
  async function bucketEntries(bucket, filter) {
60178
- const data = await readFile56(bucket, "utf8");
60317
+ const data = await readFile57(bucket, "utf8");
60179
60318
  return _bucketEntries(data, filter);
60180
60319
  }
60181
60320
  __name(bucketEntries, "bucketEntries");
@@ -64485,7 +64624,7 @@ var require_verify = __commonJS({
64485
64624
  "use strict";
64486
64625
  var {
64487
64626
  mkdir: mkdir35,
64488
- readFile: readFile56,
64627
+ readFile: readFile57,
64489
64628
  rm: rm19,
64490
64629
  stat: stat22,
64491
64630
  truncate,
@@ -64712,7 +64851,7 @@ var require_verify = __commonJS({
64712
64851
  __name(writeVerifile, "writeVerifile");
64713
64852
  module.exports.lastRun = lastRun;
64714
64853
  async function lastRun(cache) {
64715
- const data = await readFile56(path40.join(cache, "_lastverified"), { encoding: "utf8" });
64854
+ const data = await readFile57(path40.join(cache, "_lastverified"), { encoding: "utf8" });
64716
64855
  return /* @__PURE__ */ new Date(+data);
64717
64856
  }
64718
64857
  __name(lastRun, "lastRun");
@@ -76634,11 +76773,11 @@ var require_normalize = __commonJS({
76634
76773
  // ../../node_modules/.pnpm/@npmcli+package-json@7.0.5/node_modules/@npmcli/package-json/lib/read-package.js
76635
76774
  var require_read_package = __commonJS({
76636
76775
  "../../node_modules/.pnpm/@npmcli+package-json@7.0.5/node_modules/@npmcli/package-json/lib/read-package.js"(exports, module) {
76637
- var { readFile: readFile56 } = __require("fs/promises");
76776
+ var { readFile: readFile57 } = __require("fs/promises");
76638
76777
  var parseJSON = require_lib33();
76639
76778
  async function read(filename) {
76640
76779
  try {
76641
- const data = await readFile56(filename, "utf8");
76780
+ const data = await readFile57(filename, "utf8");
76642
76781
  return data;
76643
76782
  } catch (err) {
76644
76783
  err.message = `Could not read package.json: ${err}`;
@@ -76771,7 +76910,7 @@ var require_sort2 = __commonJS({
76771
76910
  // ../../node_modules/.pnpm/@npmcli+package-json@7.0.5/node_modules/@npmcli/package-json/lib/index.js
76772
76911
  var require_lib40 = __commonJS({
76773
76912
  "../../node_modules/.pnpm/@npmcli+package-json@7.0.5/node_modules/@npmcli/package-json/lib/index.js"(exports, module) {
76774
- var { readFile: readFile56, writeFile: writeFile16 } = __require("node:fs/promises");
76913
+ var { readFile: readFile57, writeFile: writeFile16 } = __require("node:fs/promises");
76775
76914
  var { resolve: resolve42 } = __require("node:path");
76776
76915
  var parseJSON = require_lib33();
76777
76916
  var updateDeps = require_update_dependencies();
@@ -76897,7 +77036,7 @@ var require_lib40 = __commonJS({
76897
77036
  const indexFile = resolve42(this.path, "index.js");
76898
77037
  let indexFileContent;
76899
77038
  try {
76900
- indexFileContent = await readFile56(indexFile, "utf8");
77039
+ indexFileContent = await readFile57(indexFile, "utf8");
76901
77040
  } catch (err) {
76902
77041
  throw parseErr;
76903
77042
  }
@@ -89198,7 +89337,7 @@ var require_dist16 = __commonJS({
89198
89337
  var require_provenance = __commonJS({
89199
89338
  "../../node_modules/.pnpm/libnpmpublish@11.2.0/node_modules/libnpmpublish/lib/provenance.js"(exports, module) {
89200
89339
  var sigstore = require_dist16();
89201
- var { readFile: readFile56 } = __require("node:fs/promises");
89340
+ var { readFile: readFile57 } = __require("node:fs/promises");
89202
89341
  var ci = require_ci_info();
89203
89342
  var { env } = process;
89204
89343
  var INTOTO_PAYLOAD_TYPE = "application/vnd.in-toto+json";
@@ -89390,7 +89529,7 @@ var require_provenance = __commonJS({
89390
89529
  var verifyProvenance = /* @__PURE__ */ __name(async (subject, provenancePath) => {
89391
89530
  let provenanceBundle;
89392
89531
  try {
89393
- provenanceBundle = JSON.parse(await readFile56(provenancePath));
89532
+ provenanceBundle = JSON.parse(await readFile57(provenancePath));
89394
89533
  } catch (err) {
89395
89534
  err.message = `Invalid provenance provided: ${err.message}`;
89396
89535
  throw err;
@@ -99475,7 +99614,7 @@ var require_entry_index2 = __commonJS({
99475
99614
  var {
99476
99615
  appendFile,
99477
99616
  mkdir: mkdir35,
99478
- readFile: readFile56,
99617
+ readFile: readFile57,
99479
99618
  readdir: readdir34,
99480
99619
  rm: rm19,
99481
99620
  writeFile: writeFile16
@@ -99667,7 +99806,7 @@ ${hashEntry(stringified)} ${stringified}`);
99667
99806
  __name(ls, "ls");
99668
99807
  module.exports.bucketEntries = bucketEntries;
99669
99808
  async function bucketEntries(bucket, filter) {
99670
- const data = await readFile56(bucket, "utf8");
99809
+ const data = await readFile57(bucket, "utf8");
99671
99810
  return _bucketEntries(data, filter);
99672
99811
  }
99673
99812
  __name(bucketEntries, "bucketEntries");
@@ -105356,7 +105495,7 @@ var require_verify3 = __commonJS({
105356
105495
  "use strict";
105357
105496
  var {
105358
105497
  mkdir: mkdir35,
105359
- readFile: readFile56,
105498
+ readFile: readFile57,
105360
105499
  rm: rm19,
105361
105500
  stat: stat22,
105362
105501
  truncate,
@@ -105583,7 +105722,7 @@ var require_verify3 = __commonJS({
105583
105722
  __name(writeVerifile, "writeVerifile");
105584
105723
  module.exports.lastRun = lastRun;
105585
105724
  async function lastRun(cache) {
105586
- const data = await readFile56(path40.join(cache, "_lastverified"), { encoding: "utf8" });
105725
+ const data = await readFile57(path40.join(cache, "_lastverified"), { encoding: "utf8" });
105587
105726
  return /* @__PURE__ */ new Date(+data);
105588
105727
  }
105589
105728
  __name(lastRun, "lastRun");
@@ -112382,6 +112521,136 @@ async function verifyPublicSourceAuthorityReceiptOffline({ plan, root }) {
112382
112521
  function defaultClock() {
112383
112522
  return (/* @__PURE__ */ new Date()).toISOString();
112384
112523
  }
112524
+ function parseMarketplaceHead(stdout) {
112525
+ if (typeof stdout !== "string") return null;
112526
+ let sha = null;
112527
+ let defaultBranch = null;
112528
+ for (const line of stdout.trim().split("\n").filter(Boolean)) {
112529
+ const tab = line.indexOf(" ");
112530
+ if (tab < 0) continue;
112531
+ const left = line.slice(0, tab);
112532
+ const right = line.slice(tab + 1);
112533
+ if (right !== "HEAD") continue;
112534
+ if (left.startsWith("ref: refs/heads/")) defaultBranch = left.slice("ref: refs/heads/".length);
112535
+ else if (EXTERNAL_MARKETPLACE_SHA_RE2.test(left)) sha = left;
112536
+ }
112537
+ return sha && defaultBranch ? { sha, defaultBranch } : null;
112538
+ }
112539
+ async function defaultObserveMarketplaceHead(repo, { githubHost = "github.com" } = {}) {
112540
+ try {
112541
+ const { stdout } = await execFile6("git", [
112542
+ "ls-remote",
112543
+ "--symref",
112544
+ `https://${githubHost}/${repo}.git`,
112545
+ "HEAD"
112546
+ ], { shell: false, encoding: "utf8", timeout: 3e4 });
112547
+ const parsed = parseMarketplaceHead(stdout);
112548
+ return parsed ? { status: "observed", ...parsed } : { status: "unknown", error: "could not resolve marketplace HEAD" };
112549
+ } catch (error) {
112550
+ return { status: "unknown", error: error.message };
112551
+ }
112552
+ }
112553
+ function decodeMarketplaceIndex(content) {
112554
+ if (typeof content !== "string") return null;
112555
+ try {
112556
+ return JSON.parse(Buffer.from(content.replace(/\s/g, ""), "base64").toString("utf8"));
112557
+ } catch {
112558
+ return null;
112559
+ }
112560
+ }
112561
+ async function defaultFetchMarketplaceIndex(repo, path40, ref, { githubHost = "github.com" } = {}) {
112562
+ try {
112563
+ const { stdout } = await execFile6("gh", [
112564
+ "api",
112565
+ `repos/${repo}/contents/${path40}?ref=${ref}`,
112566
+ "--jq",
112567
+ ".content"
112568
+ ], {
112569
+ shell: false,
112570
+ encoding: "utf8",
112571
+ timeout: 3e4,
112572
+ env: { ...process.env, GH_HOST: githubHost }
112573
+ });
112574
+ const index = decodeMarketplaceIndex(stdout);
112575
+ return index && typeof index === "object" ? { status: "fetched", index } : { status: "unknown", error: "could not decode marketplace index" };
112576
+ } catch (error) {
112577
+ return { status: "unknown", error: error.message };
112578
+ }
112579
+ }
112580
+ async function verifyFirstReleaseBootstrapIndexes({
112581
+ actions,
112582
+ plan,
112583
+ evidence,
112584
+ observeHeadFn,
112585
+ fetchIndexFn
112586
+ }) {
112587
+ const bindings = /* @__PURE__ */ new Map();
112588
+ for (const action of actions) {
112589
+ if (action.parameters?.firstReleaseBootstrap !== FIRST_RELEASE_BOOTSTRAP_MODE) continue;
112590
+ const params = action.parameters;
112591
+ const githubHost = params.githubHost ?? "github.com";
112592
+ const failDeferred = /* @__PURE__ */ __name(async (reason, observed2 = null) => {
112593
+ await evidence.append({
112594
+ phase: "verify-marketplace-bootstrap-index",
112595
+ actionId: action.id,
112596
+ actionType: action.type,
112597
+ status: "needs-input",
112598
+ reason,
112599
+ ...observed2 ? { observed: observed2 } : {}
112600
+ });
112601
+ throw new ReleaseError(
112602
+ CONSUMER_VERIFICATION_DEFERRED,
112603
+ `first-release bootstrap marketplace index is not an exact match for action "${action.id}"; complete the manual index checkpoint and retry verify with the same plan`,
112604
+ { actionId: action.id, reason, observed: observed2, nextState: "NEEDS_MANUAL_ATTESTATIONS" }
112605
+ );
112606
+ }, "failDeferred");
112607
+ const observed = await observeHeadFn(params.repo, { githubHost });
112608
+ if (observed?.status !== "observed" || !EXTERNAL_MARKETPLACE_SHA_RE2.test(observed.sha ?? "") || !observed.defaultBranch) {
112609
+ await failDeferred(`could not observe current marketplace HEAD: ${observed?.error ?? "unknown"}`, observed);
112610
+ }
112611
+ const path40 = params.marketplaceIndexPath;
112612
+ const fetched = await fetchIndexFn(params.repo, path40, observed.sha, { githubHost });
112613
+ if (fetched?.status !== "fetched" || !fetched.index || typeof fetched.index !== "object") {
112614
+ await failDeferred(`could not read marketplace index at ${observed.sha}: ${fetched?.error ?? "unknown"}`, observed);
112615
+ }
112616
+ const index = fetched.index;
112617
+ if (index.name !== params.marketplaceName) {
112618
+ await failDeferred(`marketplace name mismatch: expected ${params.marketplaceName}, got ${index.name}`, { ...observed, name: index.name });
112619
+ }
112620
+ if (!Array.isArray(index.plugins)) {
112621
+ await failDeferred("marketplace index plugins must be an array", { ...observed, pluginsType: typeof index.plugins });
112622
+ }
112623
+ const entries = index.plugins.filter((entry) => entry && entry.name === params.plugin);
112624
+ let projectedEntry = null;
112625
+ if (entries.length === 1) {
112626
+ try {
112627
+ projectedEntry = projectObservedStandaloneIndexInstallIdentity(params.consumer, entries[0]);
112628
+ } catch {
112629
+ projectedEntry = null;
112630
+ }
112631
+ }
112632
+ if (entries.length !== 1 || !projectedEntry || canonicalJson2(projectedEntry) !== canonicalJson2(params.selectedEntry)) {
112633
+ await failDeferred("marketplace selectedEntry is missing, duplicated, or does not exactly match the plan-bound expected entry", {
112634
+ ...observed,
112635
+ entryCount: entries.length,
112636
+ selectedEntry: projectedEntry ?? entries[0] ?? null
112637
+ });
112638
+ }
112639
+ bindings.set(action.id, {
112640
+ marketplaceIndexSha: observed.sha,
112641
+ marketplaceIndexRef: action.type === "claude-marketplace-install" ? observed.defaultBranch : observed.sha
112642
+ });
112643
+ await evidence.append({
112644
+ phase: "verify-marketplace-bootstrap-index",
112645
+ actionId: action.id,
112646
+ actionType: action.type,
112647
+ status: "observed",
112648
+ marketplaceIndexSha: observed.sha,
112649
+ marketplaceIndexRef: action.type === "claude-marketplace-install" ? observed.defaultBranch : observed.sha
112650
+ });
112651
+ }
112652
+ return bindings;
112653
+ }
112385
112654
  function isValidDigest2(digest3) {
112386
112655
  return typeof digest3 === "string" && /^[a-f0-9]{64}$/.test(digest3);
112387
112656
  }
@@ -112916,7 +113185,9 @@ async function verifyRelease(options) {
112916
113185
  previousVerifyRun,
112917
113186
  execFn,
112918
113187
  configPath: configPathOpt,
112919
- runPluginVerificationFn
113188
+ runPluginVerificationFn,
113189
+ observeFirstReleaseMarketplaceHeadFn,
113190
+ fetchFirstReleaseMarketplaceIndexFn
112920
113191
  } = options ?? {};
112921
113192
  const clockFn = typeof clockOpt === "function" ? clockOpt : defaultClock;
112922
113193
  if (!sourceRunPath) {
@@ -113130,6 +113401,13 @@ async function verifyRelease(options) {
113130
113401
  const consumerGateResults = [];
113131
113402
  const consumerVerificationReceipts = [];
113132
113403
  const actions = plan.externalActions ?? [];
113404
+ const bootstrapIndexBindings = await verifyFirstReleaseBootstrapIndexes({
113405
+ actions,
113406
+ plan,
113407
+ evidence,
113408
+ observeHeadFn: observeFirstReleaseMarketplaceHeadFn ?? defaultObserveMarketplaceHead,
113409
+ fetchIndexFn: fetchFirstReleaseMarketplaceIndexFn ?? defaultFetchMarketplaceIndex
113410
+ });
113133
113411
  const trustedVerifyRuns = [];
113134
113412
  const planDir = dirname10(planPath);
113135
113413
  const releaseDir = basename9(planDir) === "plans" ? dirname10(planDir) : planDir;
@@ -113326,10 +113604,21 @@ async function verifyRelease(options) {
113326
113604
  root,
113327
113605
  runDir
113328
113606
  };
113607
+ const bootstrapBinding = bootstrapIndexBindings.get(action.id) ?? null;
113329
113608
  const actionInput = {
113330
113609
  actionType: adapterActionType,
113331
113610
  ...action.parameters
113332
113611
  };
113612
+ if (bootstrapBinding) {
113613
+ actionInput.marketplaceCommitSha = bootstrapBinding.marketplaceIndexSha;
113614
+ actionInput.marketplaceIndexSha = bootstrapBinding.marketplaceIndexSha;
113615
+ actionInput.ref = bootstrapBinding.marketplaceIndexRef;
113616
+ actionInput.sourceDescriptor = {
113617
+ ...actionInput.sourceDescriptor,
113618
+ marketplaceCommitSha: bootstrapBinding.marketplaceIndexSha,
113619
+ ref: bootstrapBinding.marketplaceIndexRef
113620
+ };
113621
+ }
113333
113622
  const unit = (plan.units ?? []).find((u) => u.id === action.unitId);
113334
113623
  const typeToDist = {
113335
113624
  "claude-marketplace-install": "claude-plugin",
@@ -113383,6 +113672,7 @@ async function verifyRelease(options) {
113383
113672
  actionType: action.type,
113384
113673
  status: VERIFICATION_RESOLVED_TYPES.NOT_REQUIRED_UNCHANGED,
113385
113674
  installationContractDigest: currentDigest,
113675
+ ...bootstrapBinding ? { marketplaceIndexSha: bootstrapBinding.marketplaceIndexSha, marketplaceIndexRef: bootstrapBinding.marketplaceIndexRef } : {},
113386
113676
  reason: "\u5B89\u88C5\u5951\u7EA6\u6458\u8981\u672A\u53D8\u5316\uFF0C\u8DF3\u8FC7\u9A8C\u8BC1"
113387
113677
  });
113388
113678
  consumerVerificationReceipts.push({
@@ -113400,7 +113690,8 @@ async function verifyRelease(options) {
113400
113690
  actionId: action.id,
113401
113691
  actionType: action.type,
113402
113692
  status: VERIFICATION_RESOLVED_TYPES.NOT_REQUIRED_UNCHANGED,
113403
- installationContractDigest: currentDigest
113693
+ installationContractDigest: currentDigest,
113694
+ ...bootstrapBinding ? { marketplaceIndexSha: bootstrapBinding.marketplaceIndexSha, marketplaceIndexRef: bootstrapBinding.marketplaceIndexRef } : {}
113404
113695
  });
113405
113696
  return;
113406
113697
  }
@@ -113419,8 +113710,14 @@ async function verifyRelease(options) {
113419
113710
  { actionId: action.id }
113420
113711
  );
113421
113712
  }
113713
+ const expectedInput = bootstrapBinding ? {
113714
+ ...action.expected,
113715
+ marketplaceCommitSha: bootstrapBinding.marketplaceIndexSha,
113716
+ marketplaceIndexSha: bootstrapBinding.marketplaceIndexSha,
113717
+ ref: bootstrapBinding.marketplaceIndexRef
113718
+ } : action.expected;
113422
113719
  const verifyResult = await adapter.verify(
113423
- { ...actionInput, expected: action.expected },
113720
+ { ...actionInput, expected: expectedInput },
113424
113721
  marketplaceContext
113425
113722
  );
113426
113723
  const isHumanConfirmed = verifyResult.observation?.humanConfirmed === true;
@@ -113431,6 +113728,7 @@ async function verifyRelease(options) {
113431
113728
  status: resolvedStatus,
113432
113729
  observation: verifyResult.observation,
113433
113730
  error: verifyResult.error,
113731
+ ...bootstrapBinding ? { marketplaceIndexSha: bootstrapBinding.marketplaceIndexSha, marketplaceIndexRef: bootstrapBinding.marketplaceIndexRef } : {},
113434
113732
  ...dist?.installationContractDigest ? { installationContractDigest: dist.installationContractDigest } : {}
113435
113733
  };
113436
113734
  adapterChecks.push(check);
@@ -113450,7 +113748,8 @@ async function verifyRelease(options) {
113450
113748
  phase: "verify-marketplace",
113451
113749
  actionId: action.id,
113452
113750
  actionType: action.type,
113453
- status: check.status
113751
+ status: check.status,
113752
+ ...bootstrapBinding ? { marketplaceIndexSha: bootstrapBinding.marketplaceIndexSha, marketplaceIndexRef: bootstrapBinding.marketplaceIndexRef } : {}
113454
113753
  });
113455
113754
  if (check.status === "FAILED") {
113456
113755
  throw new ReleaseError(
@@ -113890,7 +114189,7 @@ async function verifyRelease(options) {
113890
114189
  throw err;
113891
114190
  }
113892
114191
  }
113893
- var execFile6, VERIFICATION_RESOLVED_TYPES, ADAPTER_ACTION_TYPE_MAP2, defaultNpmExecutor;
114192
+ var execFile6, VERIFICATION_RESOLVED_TYPES, ADAPTER_ACTION_TYPE_MAP2, FIRST_RELEASE_BOOTSTRAP_MODE, EXTERNAL_MARKETPLACE_SHA_RE2, defaultNpmExecutor;
113894
114193
  var init_verify = __esm({
113895
114194
  async "src/commands/verify.mjs"() {
113896
114195
  init_src2();
@@ -113909,6 +114208,7 @@ var init_verify = __esm({
113909
114208
  init_frozen_marker();
113910
114209
  await init_foundation_plugin_verification();
113911
114210
  init_public_path();
114211
+ init_digest();
113912
114212
  init_npm();
113913
114213
  init_verification_gates();
113914
114214
  await init_skill_resource_closure();
@@ -113939,6 +114239,13 @@ var init_verify = __esm({
113939
114239
  "codebuddy-marketplace-install": "codebuddy-marketplace-install"
113940
114240
  };
113941
114241
  __name(defaultClock, "defaultClock");
114242
+ FIRST_RELEASE_BOOTSTRAP_MODE = "manual-index-checkpoint";
114243
+ EXTERNAL_MARKETPLACE_SHA_RE2 = /^[0-9a-f]{40}$/;
114244
+ __name(parseMarketplaceHead, "parseMarketplaceHead");
114245
+ __name(defaultObserveMarketplaceHead, "defaultObserveMarketplaceHead");
114246
+ __name(decodeMarketplaceIndex, "decodeMarketplaceIndex");
114247
+ __name(defaultFetchMarketplaceIndex, "defaultFetchMarketplaceIndex");
114248
+ __name(verifyFirstReleaseBootstrapIndexes, "verifyFirstReleaseBootstrapIndexes");
113942
114249
  __name(isValidDigest2, "isValidDigest");
113943
114250
  __name(collectMissingManualAttestations, "collectMissingManualAttestations");
113944
114251
  __name(matchesSubset2, "matchesSubset");
@@ -121363,6 +121670,17 @@ function extractManifestSkillNames(skills) {
121363
121670
  function findSkillNames(content, manifestSkillNames) {
121364
121671
  return manifestSkillNames.filter((name) => content.includes(name));
121365
121672
  }
121673
+ function hasInstallCommand(content) {
121674
+ if (/npm\s+install|npx\s+release-skill|npm\s+i\s+release-skill/i.test(content)) {
121675
+ return true;
121676
+ }
121677
+ const codeBlocks = [
121678
+ ...[...content.matchAll(/```[^\n]*\n([\s\S]*?)```/g)].map((match) => match[1]),
121679
+ ...[...content.matchAll(/`([^`\n]+)`/g)].map((match) => match[1])
121680
+ ];
121681
+ const pluginInstall = /^(?:[$>]\s*)?(?:codex\s+plugin\s+add|claude\s+plugin\s+install)\s+\S+/i;
121682
+ return codeBlocks.some((block) => block.split("\n").some((line) => pluginInstall.test(line.trim())));
121683
+ }
121366
121684
  async function evaluateReadme({ snapshotDir, pluginManifest }) {
121367
121685
  const findings = [];
121368
121686
  const enPath = path39.join(snapshotDir, "README.md");
@@ -121403,7 +121721,7 @@ async function evaluateReadme({ snapshotDir, pluginManifest }) {
121403
121721
  safeFirstCommand: enMarkers.has("safe-first-command")
121404
121722
  };
121405
121723
  const readabilityChecks = {
121406
- hasInstall: enContent ? /npm\s+install|npx\s+release-skill|npm\s+i\s+release-skill/i.test(enContent) : false,
121724
+ hasInstall: enContent ? hasInstallCommand(enContent) : false,
121407
121725
  hasMinimalExample: enContent ? /```[\s\S]*?(release-skill|assess|prepare|help)[\s\S]*?```/i.test(enContent) : false,
121408
121726
  hasFailureDiagnosis: enContent ? /CONFIG_INVALID|PARTIAL|GATE_FAILED|if.*fail|如果.*失败|故障|troubleshoot/i.test(enContent) : false,
121409
121727
  hasNextSteps: enContent ? /next.*step|下一步|后续|see.*also|参阅|进一步/i.test(enContent) : false
@@ -121463,6 +121781,7 @@ var init_contract2 = __esm({
121463
121781
  __name(resolveSkillName, "resolveSkillName");
121464
121782
  __name(extractManifestSkillNames, "extractManifestSkillNames");
121465
121783
  __name(findSkillNames, "findSkillNames");
121784
+ __name(hasInstallCommand, "hasInstallCommand");
121466
121785
  __name(evaluateReadme, "evaluateReadme");
121467
121786
  }
121468
121787
  });
@@ -127326,6 +127645,7 @@ __export(prepare_exports, {
127326
127645
  decodeExternalMarketplaceIndex: () => decodeExternalMarketplaceIndex,
127327
127646
  observeOriginAhead: () => observeOriginAhead,
127328
127647
  parseExternalMarketplaceLsRemote: () => parseExternalMarketplaceLsRemote,
127648
+ parseFirstReleasePluginRepositoryRefs: () => parseFirstReleasePluginRepositoryRefs,
127329
127649
  prepareRelease: () => prepareRelease,
127330
127650
  readHeadCommitTimestamp: () => readHeadCommitTimestamp,
127331
127651
  readLatestFrozenPlan: () => readLatestFrozenPlan,
@@ -128195,7 +128515,7 @@ function parseExternalMarketplaceLsRemote(stdout) {
128195
128515
  if (right !== "HEAD") continue;
128196
128516
  if (left.startsWith("ref: refs/heads/")) {
128197
128517
  defaultBranch = left.slice("ref: refs/heads/".length);
128198
- } else if (EXTERNAL_MARKETPLACE_SHA_RE2.test(left)) {
128518
+ } else if (EXTERNAL_MARKETPLACE_SHA_RE3.test(left)) {
128199
128519
  sha = left;
128200
128520
  }
128201
128521
  }
@@ -128250,13 +128570,74 @@ async function defaultFetchExternalMarketplaceIndex(repo, manifestPath, ref, { g
128250
128570
  return { status: "unknown", error: error.message };
128251
128571
  }
128252
128572
  }
128573
+ function parseFirstReleasePluginRepositoryRefs(stdout, tag) {
128574
+ if (typeof stdout !== "string" || typeof tag !== "string" || tag.length === 0) {
128575
+ return { hasRefs: false, tagExists: false };
128576
+ }
128577
+ const refs = [];
128578
+ let hasRefs = false;
128579
+ for (const line of stdout.trim().split("\n").filter(Boolean)) {
128580
+ const tabIndex = line.indexOf(" ");
128581
+ if (tabIndex < 0) continue;
128582
+ const sha = line.slice(0, tabIndex);
128583
+ const ref = line.slice(tabIndex + 1);
128584
+ if (EXTERNAL_MARKETPLACE_SHA_RE3.test(sha)) {
128585
+ hasRefs = true;
128586
+ if (ref && ref !== "HEAD") refs.push(ref);
128587
+ }
128588
+ }
128589
+ const target = `refs/tags/${tag}`;
128590
+ return {
128591
+ hasRefs,
128592
+ tagExists: refs.includes(target) || refs.includes(`${target}^{}`)
128593
+ };
128594
+ }
128595
+ async function defaultObserveFirstReleasePluginRepository(repo, tag, { githubHost = "github.com" } = {}) {
128596
+ const url = `https://${githubHost}/${repo}.git`;
128597
+ let repositoryRefs;
128598
+ try {
128599
+ const { stdout } = await execFile9(
128600
+ "git",
128601
+ ["ls-remote", "--symref", url],
128602
+ { shell: false, encoding: "utf8", timeout: 3e4 }
128603
+ );
128604
+ repositoryRefs = parseFirstReleasePluginRepositoryRefs(String(stdout ?? ""), tag);
128605
+ } catch (error) {
128606
+ return { status: "unknown", error: error.message };
128607
+ }
128608
+ let releaseExists = false;
128609
+ try {
128610
+ await execFile9(
128611
+ "gh",
128612
+ ["api", `repos/${repo}/releases/tags/${tag}`],
128613
+ {
128614
+ shell: false,
128615
+ encoding: "utf8",
128616
+ timeout: 3e4,
128617
+ env: { ...process.env, GH_HOST: githubHost }
128618
+ }
128619
+ );
128620
+ releaseExists = true;
128621
+ } catch (error) {
128622
+ const diagnostic = `${error?.stderr ?? ""} ${error?.message ?? ""}`;
128623
+ if (!/\b404\b|not found/i.test(diagnostic)) {
128624
+ return { status: "unknown", error: error.message };
128625
+ }
128626
+ }
128627
+ return { status: repositoryRefs.hasRefs ? "non-empty" : "empty", tagExists: repositoryRefs.tagExists, releaseExists };
128628
+ }
128629
+ function isFirstReleaseBootstrap(dist) {
128630
+ return dist?.firstReleaseBootstrap === FIRST_RELEASE_BOOTSTRAP_MODE2;
128631
+ }
128253
128632
  async function resolveExternalMarketplaceFreezes({
128254
128633
  unitResults,
128255
128634
  resolvedVersions,
128256
128635
  offline,
128257
128636
  evidence,
128258
128637
  observeHeadFn,
128259
- fetchIndexFn
128638
+ fetchIndexFn,
128639
+ productionAssets = null,
128640
+ observePluginRepositoryFn = defaultObserveFirstReleasePluginRepository
128260
128641
  }) {
128261
128642
  const freezes = /* @__PURE__ */ new Map();
128262
128643
  for (let index = 0; index < unitResults.length; index += 1) {
@@ -128264,8 +128645,24 @@ async function resolveExternalMarketplaceFreezes({
128264
128645
  const version = resolvedVersions[index];
128265
128646
  const githubHost = unit.production?.githubHost ?? "github.com";
128266
128647
  for (const dist of unit.distributions ?? []) {
128648
+ if (isFirstReleaseBootstrap(dist) && dist.marketplaceSourceType !== "standalone-index") {
128649
+ throw new ReleaseError(
128650
+ GATE_FAILED,
128651
+ `unit "${unit.id}" ${dist.type} first-release bootstrap requires marketplaceSourceType standalone-index`,
128652
+ { unitId: unit.id, distributionType: dist.type }
128653
+ );
128654
+ }
128267
128655
  if (dist.marketplaceSourceType !== "standalone-index") continue;
128268
- if (!dist.marketplaceRepo) continue;
128656
+ if (!dist.marketplaceRepo) {
128657
+ if (isFirstReleaseBootstrap(dist)) {
128658
+ throw new ReleaseError(
128659
+ GATE_FAILED,
128660
+ `unit "${unit.id}" ${dist.type} first-release bootstrap requires marketplaceRepo`,
128661
+ { unitId: unit.id, distributionType: dist.type }
128662
+ );
128663
+ }
128664
+ continue;
128665
+ }
128269
128666
  const platform = PLATFORMS.find((p) => p.distributionType === dist.type);
128270
128667
  if (!platform) {
128271
128668
  throw new ReleaseError(
@@ -128281,8 +128678,15 @@ async function resolveExternalMarketplaceFreezes({
128281
128678
  { unitId: unit.id, marketplaceSourceType: dist.marketplaceSourceType }
128282
128679
  );
128283
128680
  }
128681
+ if (isFirstReleaseBootstrap(dist) && dist.type !== "claude-plugin" && dist.type !== "codex-plugin") {
128682
+ throw new ReleaseError(
128683
+ GATE_FAILED,
128684
+ `unit "${unit.id}" ${dist.type} first-release bootstrap is supported only for claude-plugin or codex-plugin standalone-index distributions`,
128685
+ { unitId: unit.id, distributionType: dist.type }
128686
+ );
128687
+ }
128284
128688
  const observed = await observeHeadFn(dist.marketplaceRepo, { githubHost });
128285
- if (observed.status !== "observed" || !EXTERNAL_MARKETPLACE_SHA_RE2.test(observed.sha ?? "") || !observed.defaultBranch) {
128689
+ if (observed.status !== "observed" || !EXTERNAL_MARKETPLACE_SHA_RE3.test(observed.sha ?? "") || !observed.defaultBranch) {
128286
128690
  throw new ReleaseError(
128287
128691
  GATE_FAILED,
128288
128692
  `unit "${unit.id}" could not freeze external marketplace "${dist.marketplaceRepo}" HEAD: ${observed.error ?? "unknown"}`,
@@ -128314,21 +128718,61 @@ async function resolveExternalMarketplaceFreezes({
128314
128718
  { unitId: unit.id, marketplaceRepo: dist.marketplaceRepo }
128315
128719
  );
128316
128720
  }
128317
- const pluginEntries = Array.isArray(marketplaceIndex.plugins) ? marketplaceIndex.plugins.filter((entry) => entry && entry.name === dist.plugin) : [];
128318
- if (pluginEntries.length !== 1) {
128721
+ if (!Array.isArray(marketplaceIndex.plugins)) {
128722
+ throw new ReleaseError(
128723
+ GATE_FAILED,
128724
+ `unit "${unit.id}" ${dist.type} external marketplace index plugins must be an array`,
128725
+ { unitId: unit.id, marketplaceRepo: dist.marketplaceRepo }
128726
+ );
128727
+ }
128728
+ const pluginEntries = marketplaceIndex.plugins.filter((entry) => entry && entry.name === dist.plugin);
128729
+ if (isFirstReleaseBootstrap(dist) && pluginEntries.length > 0) {
128730
+ throw new ReleaseError(
128731
+ GATE_FAILED,
128732
+ `unit "${unit.id}" first-release bootstrap requires the marketplace entry to be absent, found ${pluginEntries.length} matching entries`,
128733
+ { unitId: unit.id, marketplaceRepo: dist.marketplaceRepo }
128734
+ );
128735
+ }
128736
+ if (pluginEntries.length !== 1 && !isFirstReleaseBootstrap(dist)) {
128319
128737
  throw new ReleaseError(
128320
128738
  GATE_FAILED,
128321
128739
  `unit "${unit.id}" external marketplace index must contain exactly one plugin entry named "${dist.plugin}", found ${pluginEntries.length}`,
128322
128740
  { unitId: unit.id, marketplaceRepo: dist.marketplaceRepo }
128323
128741
  );
128324
128742
  }
128325
- if (platform.marketplaceEntryCarriesVersion && pluginEntries[0].version !== version) {
128743
+ let selectedEntry = pluginEntries[0];
128744
+ if (!isFirstReleaseBootstrap(dist) && platform.marketplaceEntryCarriesVersion && selectedEntry.version !== version) {
128326
128745
  throw new ReleaseError(
128327
128746
  GATE_FAILED,
128328
128747
  `unit "${unit.id}" external marketplace index entry version "${pluginEntries[0].version}" does not match target version "${version}"`,
128329
128748
  { unitId: unit.id, marketplaceRepo: dist.marketplaceRepo }
128330
128749
  );
128331
128750
  }
128751
+ if (isFirstReleaseBootstrap(dist)) {
128752
+ const asset = productionAssets?.[index];
128753
+ if (!asset || !EXTERNAL_MARKETPLACE_SHA_RE3.test(asset.commit ?? "") || !asset.tag) {
128754
+ throw new ReleaseError(
128755
+ GATE_FAILED,
128756
+ `unit "${unit.id}" first-release bootstrap requires a frozen plugin tag and commit`,
128757
+ { unitId: unit.id, distributionType: dist.type }
128758
+ );
128759
+ }
128760
+ const pluginState = await observePluginRepositoryFn(unit.publicRepo, asset.tag, { githubHost });
128761
+ if (pluginState?.status !== "empty" || pluginState.tagExists !== false || pluginState.releaseExists !== false) {
128762
+ throw new ReleaseError(
128763
+ GATE_FAILED,
128764
+ `unit "${unit.id}" first-release bootstrap requires an empty plugin repository without the target tag or release`,
128765
+ { unitId: unit.id, publicRepo: unit.publicRepo, tag: asset.tag, observed: pluginState }
128766
+ );
128767
+ }
128768
+ selectedEntry = buildExpectedStandaloneIndexInstallIdentity(platform, {
128769
+ name: dist.plugin,
128770
+ repo: unit.publicRepo,
128771
+ tag: asset.tag,
128772
+ sha: asset.commit,
128773
+ version
128774
+ });
128775
+ }
128332
128776
  const marketplaceRef = platform.marketplaceRefForm === "name" ? observed.defaultBranch : sha;
128333
128777
  freezes.set(`${unit.id} ${dist.type}`, {
128334
128778
  // 向后兼容字段(buildExternalActions 使用 repo / ref / marketplace)
@@ -128341,7 +128785,8 @@ async function resolveExternalMarketplaceFreezes({
128341
128785
  marketplaceRef,
128342
128786
  marketplaceIndexPath: manifestPath,
128343
128787
  marketplaceName: marketplaceIndex.name,
128344
- selectedEntry: pluginEntries[0]
128788
+ selectedEntry,
128789
+ ...isFirstReleaseBootstrap(dist) ? { firstReleaseBootstrap: FIRST_RELEASE_BOOTSTRAP_MODE2, marketplaceIndexSha: null } : {}
128345
128790
  });
128346
128791
  await evidence.append({
128347
128792
  phase: "external-marketplace-freeze",
@@ -128353,7 +128798,8 @@ async function resolveExternalMarketplaceFreezes({
128353
128798
  marketplaceRef,
128354
128799
  marketplaceIndexPath: manifestPath,
128355
128800
  marketplaceName: marketplaceIndex.name,
128356
- selectedEntry: pluginEntries[0],
128801
+ selectedEntry,
128802
+ ...isFirstReleaseBootstrap(dist) ? { firstReleaseBootstrap: FIRST_RELEASE_BOOTSTRAP_MODE2, marketplaceIndexSha: null } : {},
128357
128803
  defaultBranch: observed.defaultBranch
128358
128804
  });
128359
128805
  }
@@ -128688,7 +129134,11 @@ function buildExternalActions(unitResults, resolvedVersions, productionAssets, e
128688
129134
  ...externalMarketplace && freeze ? {
128689
129135
  marketplaceIndexPath: freeze.marketplaceIndexPath,
128690
129136
  marketplaceName: freeze.marketplaceName,
128691
- selectedEntry: freeze.selectedEntry
129137
+ selectedEntry: freeze.selectedEntry,
129138
+ ...freeze.firstReleaseBootstrap ? {
129139
+ firstReleaseBootstrap: freeze.firstReleaseBootstrap,
129140
+ marketplaceIndexSha: null
129141
+ } : {}
128692
129142
  } : {}
128693
129143
  },
128694
129144
  expected: {
@@ -128703,7 +129153,11 @@ function buildExternalActions(unitResults, resolvedVersions, productionAssets, e
128703
129153
  entrySkill: dist.entrySkill,
128704
129154
  entrySkillFound: true,
128705
129155
  manifestDigest: asset.manifestDigest,
128706
- ...externalMarketplace ? { marketplaceLocation: "external", marketplaceCommitSha: freeze.marketplaceCommitSha } : {}
129156
+ ...externalMarketplace ? { marketplaceLocation: "external", marketplaceCommitSha: freeze.marketplaceCommitSha } : {},
129157
+ ...externalMarketplace && freeze?.firstReleaseBootstrap ? {
129158
+ firstReleaseBootstrap: freeze.firstReleaseBootstrap,
129159
+ marketplaceIndexSha: null
129160
+ } : {}
128707
129161
  },
128708
129162
  status: "PENDING"
128709
129163
  });
@@ -129351,6 +129805,123 @@ async function runPreHookPublicSurfaceGate({
129351
129805
  } finally {
129352
129806
  }
129353
129807
  }
129808
+ function prepareRetryPathArg(path40) {
129809
+ return relative26(process.cwd(), resolve31(path40)) || ".";
129810
+ }
129811
+ function buildPrepareRetryArgv(options, unitIds) {
129812
+ const argv = [
129813
+ "release-skill",
129814
+ "prepare",
129815
+ "--root",
129816
+ prepareRetryPathArg(options.root)
129817
+ ];
129818
+ if (typeof options.version === "string" && options.version.length > 0) {
129819
+ argv.push("--target-version", options.version);
129820
+ }
129821
+ argv.push(options.offline ? "--offline" : "--online");
129822
+ if (options.production) argv.push("--production");
129823
+ argv.push("--workflow", options.workflow);
129824
+ if (typeof options.testSelection === "string") {
129825
+ argv.push("--test-selection", options.testSelection);
129826
+ }
129827
+ if (typeof options.output === "string") {
129828
+ argv.push("--output", prepareRetryPathArg(options.output));
129829
+ }
129830
+ if (options.hookCache === false) argv.push("--no-hook-cache");
129831
+ for (const unitId of unitIds) argv.push("--unit", unitId);
129832
+ return argv;
129833
+ }
129834
+ function buildDeferredReleaseDiagnostics(options, deferredUnitIds) {
129835
+ if (deferredUnitIds.length === 0) return null;
129836
+ return {
129837
+ deferredUnitIds: [...deferredUnitIds],
129838
+ nextPrepareArgv: buildPrepareRetryArgv(options, deferredUnitIds)
129839
+ };
129840
+ }
129841
+ function resolveRequestedReleaseUnits(config, requestedUnitIds, retryOptions) {
129842
+ const availableUnits = config.releaseUnits ?? [];
129843
+ const availableUnitIds = availableUnits.map((unit) => unit.id);
129844
+ if (requestedUnitIds === void 0) {
129845
+ return {
129846
+ explicit: false,
129847
+ selectedUnits: availableUnits,
129848
+ selectedUnitIds: availableUnitIds,
129849
+ deferredUnitIds: [],
129850
+ receiptSelected: Boolean(config.publicSourceAuthorityReceipt)
129851
+ };
129852
+ }
129853
+ if (!Array.isArray(requestedUnitIds) || requestedUnitIds.length === 0) {
129854
+ throw new ReleaseError(
129855
+ CONFIG_INVALID,
129856
+ "explicit release-unit selection must contain at least one unit id",
129857
+ { requestedUnitIds, availableUnitIds }
129858
+ );
129859
+ }
129860
+ const invalidUnitIds = requestedUnitIds.filter(
129861
+ (unitId) => typeof unitId !== "string" || unitId.length === 0
129862
+ );
129863
+ const seen = /* @__PURE__ */ new Set();
129864
+ const duplicateUnitIds = [];
129865
+ for (const unitId of requestedUnitIds) {
129866
+ if (seen.has(unitId) && !duplicateUnitIds.includes(unitId)) duplicateUnitIds.push(unitId);
129867
+ seen.add(unitId);
129868
+ }
129869
+ const availableSet = new Set(availableUnitIds);
129870
+ const unknownUnitIds = requestedUnitIds.filter(
129871
+ (unitId) => typeof unitId === "string" && unitId.length > 0 && !availableSet.has(unitId)
129872
+ );
129873
+ if (invalidUnitIds.length > 0 || duplicateUnitIds.length > 0 || unknownUnitIds.length > 0) {
129874
+ throw new ReleaseError(
129875
+ CONFIG_INVALID,
129876
+ "release-unit selection contains empty, duplicate, or unknown unit ids",
129877
+ {
129878
+ requestedUnitIds,
129879
+ availableUnitIds,
129880
+ invalidUnitIds,
129881
+ duplicateUnitIds,
129882
+ unknownUnitIds
129883
+ }
129884
+ );
129885
+ }
129886
+ const selectedSet = new Set(requestedUnitIds);
129887
+ const selectedUnits = availableUnits.filter((unit) => selectedSet.has(unit.id));
129888
+ const selectedUnitIds = selectedUnits.map((unit) => unit.id);
129889
+ const deferredUnitIds = availableUnitIds.filter((unitId) => !selectedSet.has(unitId));
129890
+ const deferredReleaseDiagnostics = buildDeferredReleaseDiagnostics(retryOptions, deferredUnitIds);
129891
+ const receipt = config.publicSourceAuthorityReceipt;
129892
+ let receiptSelected = false;
129893
+ if (receipt) {
129894
+ const receiptSet = /* @__PURE__ */ new Set([receipt.coordinatorUnitId, ...receipt.subjectUnitIds]);
129895
+ const dependencyUnitIds = availableUnitIds.filter((unitId) => receiptSet.has(unitId));
129896
+ receiptSelected = dependencyUnitIds.some((unitId) => selectedSet.has(unitId));
129897
+ if (receiptSelected) {
129898
+ const missingUnitIds = dependencyUnitIds.filter((unitId) => !selectedSet.has(unitId));
129899
+ if (missingUnitIds.length > 0) {
129900
+ const retryUnitIds = availableUnitIds.filter(
129901
+ (unitId) => selectedSet.has(unitId) || receiptSet.has(unitId)
129902
+ );
129903
+ throw new ReleaseError(
129904
+ GATE_FAILED,
129905
+ "release-unit selection does not include the complete public source-authority dependency closure",
129906
+ {
129907
+ selectedUnitIds,
129908
+ missingUnitIds,
129909
+ dependencyUnitIds,
129910
+ retryArgv: buildPrepareRetryArgv(retryOptions, retryUnitIds)
129911
+ }
129912
+ );
129913
+ }
129914
+ }
129915
+ }
129916
+ return {
129917
+ explicit: true,
129918
+ selectedUnits,
129919
+ selectedUnitIds,
129920
+ deferredUnitIds,
129921
+ deferredReleaseDiagnostics,
129922
+ receiptSelected
129923
+ };
129924
+ }
129354
129925
  async function prepareRelease(options) {
129355
129926
  const {
129356
129927
  root,
@@ -129364,7 +129935,8 @@ async function prepareRelease(options) {
129364
129935
  production = false,
129365
129936
  workflow = "full",
129366
129937
  observePreviousPublicBaselineFn,
129367
- testSelection = "full"
129938
+ testSelection = "full",
129939
+ unitIds
129368
129940
  } = options ?? {};
129369
129941
  const WORKFLOW_KINDS2 = /* @__PURE__ */ new Set(["full", "docs", "config", "marketplace"]);
129370
129942
  if (!WORKFLOW_KINDS2.has(workflow)) {
@@ -129438,7 +130010,20 @@ async function prepareRelease(options) {
129438
130010
  try {
129439
130011
  await evidence.append({ phase: "config", status: "started" });
129440
130012
  const { config, configPath, configDigest } = await loadProjectConfig({ root: realRoot });
129441
- const adoptionWarnings = collectExpectedPublicSurfaceAdoptionWarnings(config);
130013
+ const releaseSelection = resolveRequestedReleaseUnits(config, unitIds, {
130014
+ root,
130015
+ version,
130016
+ offline,
130017
+ production,
130018
+ workflow,
130019
+ testSelection: typeof options?.testSelection === "string" ? testSelection : void 0,
130020
+ output,
130021
+ hookCache: options?.hookCache
130022
+ });
130023
+ const configUnits = releaseSelection.selectedUnits;
130024
+ const selectedConfig = { ...config, releaseUnits: configUnits };
130025
+ const selectedUnitIdSet = new Set(releaseSelection.selectedUnitIds);
130026
+ const adoptionWarnings = collectExpectedPublicSurfaceAdoptionWarnings(selectedConfig);
129442
130027
  const runWarnings = [...adoptionWarnings];
129443
130028
  await evidence.append({
129444
130029
  phase: "config",
@@ -129453,6 +130038,16 @@ async function prepareRelease(options) {
129453
130038
  ...warning
129454
130039
  });
129455
130040
  }
130041
+ if (releaseSelection.explicit) {
130042
+ await evidence.append({
130043
+ phase: "release-scope",
130044
+ status: "selected",
130045
+ mode: "selected",
130046
+ selectedUnitIds: releaseSelection.selectedUnitIds,
130047
+ deferredUnitIds: releaseSelection.deferredUnitIds,
130048
+ ...releaseSelection.deferredReleaseDiagnostics ? { nextPrepareArgv: releaseSelection.deferredReleaseDiagnostics.nextPrepareArgv } : {}
130049
+ });
130050
+ }
129456
130051
  await evidence.append({ phase: "bundle-freshness", status: "started" });
129457
130052
  const bundleFreshnessFn = options.bundleFreshnessFn ?? assertBundleFreshness;
129458
130053
  let bundleFreshness;
@@ -129500,7 +130095,6 @@ async function prepareRelease(options) {
129500
130095
  "consumer-verify"
129501
130096
  ]
129502
130097
  });
129503
- const configUnits = config.releaseUnits ?? [];
129504
130098
  const resolvedVersions = await resolveAllUnitVersions(
129505
130099
  configUnits,
129506
130100
  realRoot,
@@ -129629,7 +130223,7 @@ async function prepareRelease(options) {
129629
130223
  hooks: declaredHooks.map((h) => `${h.name}: ${h.executable} ${h.args.join(" ")}`)
129630
130224
  });
129631
130225
  }
129632
- const declaredVerificationGates = config.verificationGates ?? [];
130226
+ const declaredVerificationGates = (config.verificationGates ?? []).filter((gate) => selectedUnitIdSet.has(gate.scope.unit));
129633
130227
  if (declaredVerificationGates.length > 0) {
129634
130228
  await evidence.append({
129635
130229
  phase: "verification-gate-authorization",
@@ -129709,7 +130303,7 @@ async function prepareRelease(options) {
129709
130303
  });
129710
130304
  }
129711
130305
  await runPreHookPublicSurfaceGate({
129712
- config,
130306
+ config: selectedConfig,
129713
130307
  root: realRoot,
129714
130308
  resolvedVersions,
129715
130309
  evidence,
@@ -130079,7 +130673,7 @@ async function prepareRelease(options) {
130079
130673
  }
130080
130674
  }
130081
130675
  const { unitResults, snapshotDigests } = await processSnapshots(
130082
- config,
130676
+ selectedConfig,
130083
130677
  realRoot,
130084
130678
  evidence,
130085
130679
  runDir,
@@ -130191,13 +130785,26 @@ async function prepareRelease(options) {
130191
130785
  skipSkillResourceClosure,
130192
130786
  workflow
130193
130787
  });
130788
+ for (const { unit } of unitResults) {
130789
+ for (const dist of unit.distributions ?? []) {
130790
+ if (isFirstReleaseBootstrap(dist) && (!production || offline)) {
130791
+ throw new ReleaseError(
130792
+ GATE_FAILED,
130793
+ `unit "${unit.id}" ${dist.type} first-release bootstrap requires online production prepare`,
130794
+ { unitId: unit.id, distributionType: dist.type }
130795
+ );
130796
+ }
130797
+ }
130798
+ }
130194
130799
  const externalMarketplaceFreezes = production ? await resolveExternalMarketplaceFreezes({
130195
130800
  unitResults,
130196
130801
  resolvedVersions,
130197
130802
  offline,
130198
130803
  evidence,
130199
130804
  observeHeadFn: options.observeExternalMarketplaceHeadFn ?? defaultObserveExternalMarketplaceHead,
130200
- fetchIndexFn: options.fetchExternalMarketplaceIndexFn ?? defaultFetchExternalMarketplaceIndex
130805
+ fetchIndexFn: options.fetchExternalMarketplaceIndexFn ?? defaultFetchExternalMarketplaceIndex,
130806
+ productionAssets,
130807
+ observePluginRepositoryFn: options.observeFirstReleasePluginRepositoryFn ?? defaultObserveFirstReleasePluginRepository
130201
130808
  }) : /* @__PURE__ */ new Map();
130202
130809
  const units = await Promise.all(unitResults.map(async ({ unit, manifest }, idx) => {
130203
130810
  const unitVersion = resolvedVersions[idx];
@@ -130277,6 +130884,10 @@ async function prepareRelease(options) {
130277
130884
  frozenDist.marketplaceIndexPath = freeze.marketplaceIndexPath;
130278
130885
  frozenDist.marketplaceName = freeze.marketplaceName;
130279
130886
  frozenDist.selectedEntry = freeze.selectedEntry;
130887
+ if (freeze.firstReleaseBootstrap) {
130888
+ frozenDist.firstReleaseBootstrap = freeze.firstReleaseBootstrap;
130889
+ frozenDist.marketplaceIndexSha = null;
130890
+ }
130280
130891
  }
130281
130892
  }
130282
130893
  return frozenDist;
@@ -130351,7 +130962,7 @@ async function prepareRelease(options) {
130351
130962
  }
130352
130963
  }
130353
130964
  let publicSourceAuthorityReceipt = null;
130354
- if (config.publicSourceAuthorityReceipt) {
130965
+ if (config.publicSourceAuthorityReceipt && releaseSelection.receiptSelected) {
130355
130966
  if (workflow === "config" && configDecision?.publishPath === "no-publish-needed") {
130356
130967
  await evidence.append({
130357
130968
  phase: "public-source-authority-receipt",
@@ -130536,7 +131147,7 @@ async function prepareRelease(options) {
130536
131147
  totalFindingCount: 0
130537
131148
  }
130538
131149
  } : {},
130539
- verificationGates: config.verificationGates ?? [],
131150
+ verificationGates: declaredVerificationGates,
130540
131151
  snapshotDigest: overallSnapshotDigest,
130541
131152
  ...humanConsumersStrategy ? { humanConsumersStrategy } : {},
130542
131153
  ...production ? {
@@ -130597,6 +131208,13 @@ async function prepareRelease(options) {
130597
131208
  completedAt: clock ? clock() : (/* @__PURE__ */ new Date()).toISOString()
130598
131209
  });
130599
131210
  const nextSteps = [];
131211
+ if (releaseSelection.explicit && releaseSelection.deferredUnitIds.length > 0) {
131212
+ nextSteps.push({
131213
+ code: "DEFERRED_RELEASE_UNITS",
131214
+ message: `Prepare the deferred release units separately: ${releaseSelection.deferredUnitIds.join(", ")}`,
131215
+ argv: releaseSelection.deferredReleaseDiagnostics.nextPrepareArgv
131216
+ });
131217
+ }
130600
131218
  if (!production) {
130601
131219
  nextSteps.push({
130602
131220
  code: "NON_PRODUCTION_PLAN_NOT_PUBLISHABLE",
@@ -130608,7 +131226,14 @@ async function prepareRelease(options) {
130608
131226
  planDigest,
130609
131227
  evidenceDir,
130610
131228
  warnings: runWarnings,
130611
- nextSteps
131229
+ nextSteps,
131230
+ ...releaseSelection.explicit ? {
131231
+ releaseScope: {
131232
+ mode: "selected",
131233
+ selectedUnitIds: releaseSelection.selectedUnitIds,
131234
+ deferredUnitIds: releaseSelection.deferredUnitIds
131235
+ }
131236
+ } : {}
130612
131237
  };
130613
131238
  } catch (err) {
130614
131239
  try {
@@ -130632,7 +131257,7 @@ async function prepareRelease(options) {
130632
131257
  await lock.release();
130633
131258
  }
130634
131259
  }
130635
- var execFile9, CONSUMER_INSTALL_RECIPE_VERSION2, HOOK_EXECUTION_ORDER, EXTERNAL_MARKETPLACE_SHA_RE2;
131260
+ var execFile9, CONSUMER_INSTALL_RECIPE_VERSION2, FIRST_RELEASE_BOOTSTRAP_MODE2, HOOK_EXECUTION_ORDER, EXTERNAL_MARKETPLACE_SHA_RE3;
130636
131261
  var init_prepare = __esm({
130637
131262
  async "src/commands/prepare.mjs"() {
130638
131263
  init_src2();
@@ -130673,6 +131298,7 @@ var init_prepare = __esm({
130673
131298
  init_bounded_output();
130674
131299
  execFile9 = promisify12(execFileCb12);
130675
131300
  CONSUMER_INSTALL_RECIPE_VERSION2 = "consumer-install-v1";
131301
+ FIRST_RELEASE_BOOTSTRAP_MODE2 = "manual-index-checkpoint";
130676
131302
  __name(resolveUnitVersion, "resolveUnitVersion");
130677
131303
  __name(resolveAllUnitVersions, "resolveAllUnitVersions");
130678
131304
  HOOK_EXECUTION_ORDER = Object.freeze(["lint", "docs", "build", "test", "typecheck"]);
@@ -130691,11 +131317,14 @@ var init_prepare = __esm({
130691
131317
  __name(enumerateFrozenTagPaths, "enumerateFrozenTagPaths");
130692
131318
  __name(collectPostPublishCommandCandidates, "collectPostPublishCommandCandidates");
130693
131319
  __name(assertPrivateExecutionDeclarations, "assertPrivateExecutionDeclarations");
130694
- EXTERNAL_MARKETPLACE_SHA_RE2 = /^[0-9a-f]{40}$/;
131320
+ EXTERNAL_MARKETPLACE_SHA_RE3 = /^[0-9a-f]{40}$/;
130695
131321
  __name(parseExternalMarketplaceLsRemote, "parseExternalMarketplaceLsRemote");
130696
131322
  __name(decodeExternalMarketplaceIndex, "decodeExternalMarketplaceIndex");
130697
131323
  __name(defaultObserveExternalMarketplaceHead, "defaultObserveExternalMarketplaceHead");
130698
131324
  __name(defaultFetchExternalMarketplaceIndex, "defaultFetchExternalMarketplaceIndex");
131325
+ __name(parseFirstReleasePluginRepositoryRefs, "parseFirstReleasePluginRepositoryRefs");
131326
+ __name(defaultObserveFirstReleasePluginRepository, "defaultObserveFirstReleasePluginRepository");
131327
+ __name(isFirstReleaseBootstrap, "isFirstReleaseBootstrap");
130699
131328
  __name(resolveExternalMarketplaceFreezes, "resolveExternalMarketplaceFreezes");
130700
131329
  __name(buildExternalActions, "buildExternalActions");
130701
131330
  __name(computeSourceAuthorityClosure, "computeSourceAuthorityClosure");
@@ -130704,6 +131333,10 @@ var init_prepare = __esm({
130704
131333
  __name(resolveDistributionManifestFacts, "resolveDistributionManifestFacts");
130705
131334
  __name(runPrepareSkillResourceClosureGate, "runPrepareSkillResourceClosureGate");
130706
131335
  __name(runPreHookPublicSurfaceGate, "runPreHookPublicSurfaceGate");
131336
+ __name(prepareRetryPathArg, "prepareRetryPathArg");
131337
+ __name(buildPrepareRetryArgv, "buildPrepareRetryArgv");
131338
+ __name(buildDeferredReleaseDiagnostics, "buildDeferredReleaseDiagnostics");
131339
+ __name(resolveRequestedReleaseUnits, "resolveRequestedReleaseUnits");
130707
131340
  __name(prepareRelease, "prepareRelease");
130708
131341
  }
130709
131342
  });
@@ -130781,14 +131414,22 @@ var init_hooks2 = __esm({
130781
131414
  // src/commands/post-release-local.mjs
130782
131415
  var post_release_local_exports = {};
130783
131416
  __export(post_release_local_exports, {
131417
+ assertLocalFinishRun: () => assertLocalFinishRun,
130784
131418
  assertVerifiedReleaseRun: () => assertVerifiedReleaseRun,
130785
131419
  derivePostReleaseChecklist: () => derivePostReleaseChecklist,
130786
131420
  unavailablePostReleaseChecklist: () => unavailablePostReleaseChecklist,
130787
131421
  updateLocalHostPlugins: () => updateLocalHostPlugins
130788
131422
  });
130789
- import { access as access2 } from "node:fs/promises";
131423
+ import { access as access2, readFile as readFile36 } from "node:fs/promises";
130790
131424
  import { homedir } from "node:os";
130791
131425
  import { join as join27, relative as relative27 } from "node:path";
131426
+ function attachFoundationFailure(error, { envelope, stdout }) {
131427
+ Object.defineProperties(error, {
131428
+ foundationEnvelope: { value: envelope, enumerable: false },
131429
+ foundationStdout: { value: stdout, enumerable: false }
131430
+ });
131431
+ return error;
131432
+ }
130792
131433
  function actionTarget(plan, action, host) {
130793
131434
  const parameters = action.parameters ?? {};
130794
131435
  const sourceDescriptor = parameters.sourceDescriptor ?? {};
@@ -130873,13 +131514,35 @@ function assertExecutableTarget(target) {
130873
131514
  throw new Error(`local host update requires the frozen public commit for unit ${target.unitId}`);
130874
131515
  }
130875
131516
  }
130876
- function derivePostReleaseChecklist(plan) {
131517
+ function buildShipNextStep({ root, statePath, unitIds }) {
131518
+ const argv = ["release-skill", "ship"];
131519
+ if (typeof root === "string" && root.length > 0) argv.push("--root", root);
131520
+ if (typeof statePath === "string" && statePath.length > 0) argv.push("--state", statePath);
131521
+ if (Array.isArray(unitIds) && unitIds.length > 0) {
131522
+ for (const unitId of unitIds) argv.push("--unit", unitId);
131523
+ }
131524
+ return {
131525
+ code: "COMPLETE_POST_VERIFY",
131526
+ message: "Complete the postVerify phase with ship before running post-release.",
131527
+ argv
131528
+ };
131529
+ }
131530
+ function derivePostReleaseChecklist(plan, {
131531
+ runPath,
131532
+ root,
131533
+ statePath,
131534
+ unitIds,
131535
+ postVerifyComplete = false
131536
+ } = {}) {
130877
131537
  if (!plan || typeof plan !== "object" || typeof plan.digest !== "string") {
130878
131538
  throw new Error("a frozen release plan with digest is required");
130879
131539
  }
130880
131540
  const units = plan.units ?? [];
130881
131541
  const uncovered = units.filter((unit) => !BRANCH_ACTION_INCLUDED.has(unit.productionConfig?.branchStrategy));
130882
131542
  const targets = pluginTargets(plan);
131543
+ const hasPendingPostVerify = postVerifyHooks(plan).length > 0 && !postVerifyComplete && targets.length > 0;
131544
+ const hasStatePath = typeof statePath === "string" && statePath.length > 0;
131545
+ const selectedUnitIds = Array.isArray(unitIds) ? unitIds : void 0;
130883
131546
  return {
130884
131547
  command: "post-release",
130885
131548
  status: "AWAITING_USER_DECISION",
@@ -130895,13 +131558,143 @@ function derivePostReleaseChecklist(plan) {
130895
131558
  }))
130896
131559
  },
130897
131560
  localHostUpdate: {
130898
- promptRequired: targets.length > 0,
130899
- available: targets.length > 0,
131561
+ promptRequired: targets.length > 0 && !hasPendingPostVerify,
131562
+ available: targets.length > 0 && !hasPendingPostVerify,
131563
+ ...!hasPendingPostVerify && runPath ? { runPath } : {},
131564
+ ...hasPendingPostVerify ? {
131565
+ ...hasStatePath ? { nextSteps: [buildShipNextStep({ root, statePath, unitIds: selectedUnitIds })] } : {}
131566
+ } : {},
130900
131567
  hosts: [...new Set(targets.map((target) => target.host))].sort(),
130901
131568
  targets
130902
131569
  }
130903
131570
  };
130904
131571
  }
131572
+ function postVerifyHooks(plan) {
131573
+ if (plan?.planVersion === void 0) return [];
131574
+ return normalizePostPublishView(plan).flatMap((declaration) => (declaration.hooks ?? []).filter((hook) => hook.phase === "postVerify").map((hook) => ({
131575
+ actionId: postPublishActionId({ planVersion: plan.planVersion, unitId: declaration.unitId, localId: hook.id }),
131576
+ hook,
131577
+ unitId: declaration.unitId
131578
+ })));
131579
+ }
131580
+ function localFinishEvidenceError(message, { cause, root, statePath, unitIds } = {}) {
131581
+ const error = new Error(`local host update evidence is not ready: ${message}; next step: obtain approval if required, then complete the postVerify phase with ship before rerunning post-release`);
131582
+ error.code = "LOCAL_FINISH_EVIDENCE_NOT_READY";
131583
+ const hasStatePath = typeof statePath === "string" && statePath.length > 0;
131584
+ error.details = {
131585
+ cause: {
131586
+ code: cause?.code ?? "LOCAL_FINISH_EVIDENCE_NOT_READY",
131587
+ message: cause?.message ?? message
131588
+ },
131589
+ ...hasStatePath ? {
131590
+ nextSteps: [buildShipNextStep({ root, statePath, unitIds })]
131591
+ } : {}
131592
+ };
131593
+ return error;
131594
+ }
131595
+ async function updateLocalHostPlugins({
131596
+ plan: _suppliedPlan,
131597
+ planPath,
131598
+ runPath,
131599
+ runRecord: _suppliedRunRecord,
131600
+ production: _suppliedProduction,
131601
+ root = process.cwd(),
131602
+ statePath,
131603
+ unitIds,
131604
+ ...options
131605
+ } = {}) {
131606
+ if (!planPath || !runPath) {
131607
+ throw localFinishEvidenceError(
131608
+ "planPath and runPath are required before local host updates",
131609
+ { root, statePath, unitIds }
131610
+ );
131611
+ }
131612
+ let plan;
131613
+ let runRecord;
131614
+ try {
131615
+ plan = JSON.parse(await readFile36(planPath, "utf8"));
131616
+ runRecord = await loadRun(runPath, {
131617
+ requireDigest: true,
131618
+ authorityPlanPath: planPath
131619
+ });
131620
+ } catch (cause) {
131621
+ throw localFinishEvidenceError(cause.message, { cause, root, statePath, unitIds });
131622
+ }
131623
+ await assertLocalFinishRun({
131624
+ plan,
131625
+ planPath,
131626
+ runPath,
131627
+ runRecord,
131628
+ production: Boolean(plan.production),
131629
+ root,
131630
+ statePath,
131631
+ unitIds
131632
+ });
131633
+ return updateLocalHostPluginsInternal({
131634
+ plan,
131635
+ root,
131636
+ ...options
131637
+ });
131638
+ }
131639
+ async function assertLocalFinishRun({
131640
+ plan,
131641
+ planPath,
131642
+ runPath,
131643
+ runRecord,
131644
+ production = false,
131645
+ root,
131646
+ statePath,
131647
+ unitIds
131648
+ } = {}) {
131649
+ const hooks = postVerifyHooks(plan);
131650
+ if (hooks.length === 0) {
131651
+ try {
131652
+ await validateRunLineage(runRecord, { plan, planPath, runPath, production });
131653
+ assertVerifiedReleaseRun(plan, runRecord);
131654
+ } catch (cause) {
131655
+ throw localFinishEvidenceError(cause.message, { cause, root, statePath, unitIds, plan });
131656
+ }
131657
+ return { runPath, phase: "verify" };
131658
+ }
131659
+ if (runRecord?.command !== "postverify" || runRecord?.status !== "DISTRIBUTED") {
131660
+ throw localFinishEvidenceError("the plan declares postVerify hooks, so the supplied verify run cannot authorize local-finish", { root, statePath, unitIds, plan });
131661
+ }
131662
+ if (runRecord.planDigest !== plan?.digest) {
131663
+ throw localFinishEvidenceError("postVerify run is not bound to the frozen plan", { root, statePath, unitIds, plan });
131664
+ }
131665
+ if (typeof runRecord.sourceRunPath !== "string" || typeof runRecord.sourceRunId !== "string" || typeof runRecord.sourceRunDigest !== "string") {
131666
+ throw localFinishEvidenceError("completed postVerify run has incomplete verify-run lineage", { root, statePath, unitIds, plan });
131667
+ }
131668
+ const checkpoints = Array.isArray(runRecord.checkpoints) ? runRecord.checkpoints : null;
131669
+ const expectedIds = hooks.map(({ actionId }) => actionId);
131670
+ const actualIds = checkpoints?.map((checkpoint) => checkpoint?.actionId) ?? [];
131671
+ if (!checkpoints || actualIds.length !== expectedIds.length || new Set(actualIds).size !== actualIds.length || actualIds.some((id) => !expectedIds.includes(id)) || expectedIds.some((id) => !actualIds.includes(id)) || checkpoints.some((checkpoint) => checkpoint.actionType !== "postpublish-hook" || !["succeeded", "NO_CHANGE"].includes(checkpoint.status))) {
131672
+ throw localFinishEvidenceError("postVerify checkpoints must match each declared hook exactly and be succeeded or NO_CHANGE", { root, statePath, unitIds, plan });
131673
+ }
131674
+ let sourceRun;
131675
+ try {
131676
+ sourceRun = await loadRun(runRecord.sourceRunPath, {
131677
+ requireDigest: true,
131678
+ authorityPlanPath: planPath
131679
+ });
131680
+ } catch (cause) {
131681
+ throw localFinishEvidenceError(cause.message, { cause, root, statePath, unitIds, plan });
131682
+ }
131683
+ if (sourceRun.command !== "verify" || sourceRun.status !== "VERIFIED" || sourceRun.runId !== runRecord.sourceRunId || sourceRun.runDigest !== runRecord.sourceRunDigest || sourceRun.planDigest !== plan.digest) {
131684
+ throw localFinishEvidenceError("postVerify lineage does not point to the same-plan VERIFIED run", { root, statePath, unitIds, plan });
131685
+ }
131686
+ try {
131687
+ await validateRunLineage(sourceRun, {
131688
+ plan,
131689
+ planPath,
131690
+ runPath: runRecord.sourceRunPath,
131691
+ production
131692
+ });
131693
+ } catch (cause) {
131694
+ throw localFinishEvidenceError(cause.message, { cause, root, statePath, unitIds, plan });
131695
+ }
131696
+ return { runPath, sourceRunPath: runRecord.sourceRunPath, phase: "postverify" };
131697
+ }
130905
131698
  function unavailablePostReleaseChecklist(plan, error) {
130906
131699
  return {
130907
131700
  command: "post-release",
@@ -130927,7 +131720,11 @@ function hostEnvironment(host, { kimiHome } = {}) {
130927
131720
  env.HOME ??= homedir();
130928
131721
  env.PATH ??= "/usr/bin:/bin";
130929
131722
  env.GIT_TERMINAL_PROMPT = "0";
130930
- if (host === "workbuddy") env.CODEBUDDY_CONFIG_DIR = join27(env.HOME, ".workbuddy");
131723
+ if (host === "codebuddy") env.CODEBUDDY_CONFIG_DIR = join27(env.HOME, ".codebuddy");
131724
+ if (host === "workbuddy") {
131725
+ env.CODEBUDDY_CONFIG_DIR = join27(env.HOME, ".workbuddy");
131726
+ env.WORKBUDDY_CONFIG_DIR = join27(env.HOME, ".workbuddy");
131727
+ }
130931
131728
  if (host === "kimi" && kimiHome) env.KIMI_CONFIG_DIR = kimiHome;
130932
131729
  return env;
130933
131730
  }
@@ -130963,7 +131760,7 @@ async function defaultRun(command2, args2, options = {}) {
130963
131760
  watchdogReason: envelope.watchdogReason,
130964
131761
  ...envelope.evidence?.spawnError ? { spawnError: envelope.evidence.spawnError } : {}
130965
131762
  };
130966
- throw error;
131763
+ throw attachFoundationFailure(error, { envelope, stdout });
130967
131764
  }
130968
131765
  return { stdout, stderr };
130969
131766
  }, { prefix: "release-skill-host-command-" });
@@ -130978,12 +131775,17 @@ async function commandAvailable(command2, host, run6) {
130978
131775
  }
130979
131776
  }
130980
131777
  async function defaultDetect(host, run6 = defaultRun) {
130981
- if (host === "codebuddy" || host === "workbuddy") {
130982
- for (const command2 of ["codebuddy", "cbc", CODEBUDDY_MACOS_PATH]) {
131778
+ if (host === "codebuddy") {
131779
+ for (const command2 of ["codebuddy", "cbc"]) {
130983
131780
  if (await commandAvailable(command2, host, run6)) return { available: true, command: command2 };
130984
131781
  }
130985
131782
  return { available: false, reason: "CodeBuddy/WorkBuddy CLI not found" };
130986
131783
  }
131784
+ if (host === "workbuddy") {
131785
+ if (process.platform !== "darwin") return { available: false, status: "SKIPPED_UNSUPPORTED_PLATFORM", reason: "WorkBuddy local update is supported only on macOS" };
131786
+ if (await commandAvailable(CODEBUDDY_MACOS_PATH, host, run6)) return { available: true, command: CODEBUDDY_MACOS_PATH };
131787
+ return { available: false, reason: "WorkBuddy embedded CLI not found" };
131788
+ }
130987
131789
  if (host === "kimi") {
130988
131790
  if (!await commandAvailable("kimi", host, run6)) return { available: false, reason: "kimi CLI not found" };
130989
131791
  try {
@@ -131003,6 +131805,64 @@ function parseJson2(stdout, label) {
131003
131805
  throw new Error(`${label} did not return JSON`);
131004
131806
  }
131005
131807
  }
131808
+ function foundationEnvelopeFromError(error) {
131809
+ return error?.foundationEnvelope ?? null;
131810
+ }
131811
+ function foundationStdoutFromError(error) {
131812
+ return error?.foundationStdout ?? null;
131813
+ }
131814
+ function isCodeBuddyResidualEnvelope(error) {
131815
+ const envelope = foundationEnvelopeFromError(error);
131816
+ const evidence = envelope?.evidence;
131817
+ const signals = evidence?.signalSequence;
131818
+ const signal = signals?.[0];
131819
+ return envelope?.ok === false && envelope.exitStatus === 124 && envelope.processStatus === "TERMINATED" && envelope.terminationReason === "child_exit" && envelope.watchdogReason === "residual_process_group" && evidence?.childExitCode === 0 && (evidence.childSignal === null || evidence.childSignal === void 0) && evidence.residualGroupCleanupCompleted === true && evidence.forcedKill === false && evidence.outputLimitExceeded === null && Array.isArray(signals) && signals.length === 1 && signal?.signal === "SIGTERM" && signal.requestedMode === "process_group" && signal.successfulMode === "process_group";
131820
+ }
131821
+ function isCodeBuddyReadCommand(target, command2, args2) {
131822
+ return target.host === "codebuddy" && (command2 === "codebuddy" || command2 === "cbc" || command2 === CODEBUDDY_MACOS_PATH) && Array.isArray(args2) && (args2.every((value, index) => value === CODEBUDDY_PLUGIN_LIST_ARGS[index]) && args2.length === CODEBUDDY_PLUGIN_LIST_ARGS.length || args2.every((value, index) => value === CODEBUDDY_MARKETPLACE_LIST_ARGS[index]) && args2.length === CODEBUDDY_MARKETPLACE_LIST_ARGS.length);
131823
+ }
131824
+ function isCodeBuddyWriteCommand(target, command2, args2, kind) {
131825
+ if (target.host !== "codebuddy" || !["codebuddy", "cbc", CODEBUDDY_MACOS_PATH].includes(command2)) return false;
131826
+ const expected = kind === "marketplace-update" ? ["plugin", "marketplace", "update", target.marketplace] : ["plugin", "update", `${target.plugin}@${target.marketplace}`, "--scope", "user"];
131827
+ return Array.isArray(args2) && args2.length === expected.length && args2.every((value, index) => value === expected[index]);
131828
+ }
131829
+ async function runCodeBuddyRead(target, command2, args2, label, env, run6) {
131830
+ try {
131831
+ return { output: await run6(command2, [...args2], { env }), recovered: false };
131832
+ } catch (error) {
131833
+ if (!isCodeBuddyReadCommand(target, command2, args2) || !isCodeBuddyResidualEnvelope(error)) throw error;
131834
+ const residualStdout = foundationStdoutFromError(error);
131835
+ if (typeof residualStdout !== "string") throw error;
131836
+ parseJson2(residualStdout, label);
131837
+ return {
131838
+ output: { stdout: residualStdout, stderr: "" },
131839
+ recovered: true
131840
+ };
131841
+ }
131842
+ }
131843
+ function exactCodeBuddyMarketplaceObservation(target, stdout) {
131844
+ const parsed = parseJson2(stdout, `${target.host} marketplace list`);
131845
+ if (!Array.isArray(parsed)) throw new Error(`${target.host} marketplace list did not return an array`);
131846
+ const matches = parsed.filter((entry) => entry?.name === target.marketplace);
131847
+ if (matches.length !== 1) {
131848
+ throw new Error(`${target.host} marketplace list did not contain exactly one ${target.marketplace}`);
131849
+ }
131850
+ if (matches[0].type !== "git") {
131851
+ throw new Error(`${target.host} marketplace ${target.marketplace} is not a git marketplace`);
131852
+ }
131853
+ return { installed: true, exact: true, found: matches[0] };
131854
+ }
131855
+ async function observeCodeBuddyMarketplaceAfterResidual(target, command2, env, run6) {
131856
+ const observed = await runCodeBuddyRead(
131857
+ target,
131858
+ command2,
131859
+ CODEBUDDY_MARKETPLACE_LIST_ARGS,
131860
+ `${target.host} marketplace list`,
131861
+ env,
131862
+ run6
131863
+ );
131864
+ return exactCodeBuddyMarketplaceObservation(target, observed.output.stdout);
131865
+ }
131006
131866
  function exactPluginObservation(target, stdout) {
131007
131867
  const selector = `${target.plugin}@${target.marketplace}`;
131008
131868
  const parsed = parseJson2(stdout, `${target.host} plugin list`);
@@ -131120,7 +131980,8 @@ async function runStructuredUpdate(target, detected, run6, {
131120
131980
  }) {
131121
131981
  if (target.host === "codebuddy" || target.host === "workbuddy") {
131122
131982
  const env2 = hostEnvironment(target.host);
131123
- const listed = await run6(detected.command, ["plugin", "list", "--json"], { env: env2 });
131983
+ const listedObservation = target.host === "codebuddy" ? await runCodeBuddyRead(target, detected.command, CODEBUDDY_PLUGIN_LIST_ARGS, `${target.host} plugin list`, env2, run6) : { output: await run6(detected.command, [...CODEBUDDY_PLUGIN_LIST_ARGS], { env: env2 }), recovered: false };
131984
+ const listed = listedObservation.output;
131124
131985
  const observed = exactPluginObservation(target, listed.stdout);
131125
131986
  if (target.sourceForm !== "bundled-family" || target.pluginRepo !== target.marketplaceRepo || target.pluginCommit !== target.marketplaceCommit) {
131126
131987
  return {
@@ -131128,7 +131989,13 @@ async function runStructuredUpdate(target, detected, run6, {
131128
131989
  reason: `${target.host} source identity is not eligible for a frozen bundled-family update`
131129
131990
  };
131130
131991
  }
131131
- if (observed.exact) return { status: "ALREADY_CURRENT", version: target.version };
131992
+ if (observed.exact) {
131993
+ return {
131994
+ status: "ALREADY_CURRENT",
131995
+ version: target.version,
131996
+ ...listedObservation.recovered ? { residualRecovery: true } : {}
131997
+ };
131998
+ }
131132
131999
  if (!observed.installed) {
131133
132000
  return {
131134
132001
  status: "MANUAL_REQUIRED",
@@ -131158,18 +132025,54 @@ async function runStructuredUpdate(target, detected, run6, {
131158
132025
  reason: `${target.host} frozen tag and mutable ref do not both resolve to ${target.pluginCommit}`
131159
132026
  };
131160
132027
  }
131161
- await run6(detected.command, ["plugin", "marketplace", "update", target.marketplace], { env: env2 });
131162
- await run6(detected.command, [
131163
- "plugin",
131164
- "update",
131165
- `${target.plugin}@${target.marketplace}`,
131166
- "--scope",
131167
- "user"
131168
- ], { env: env2 });
131169
- const afterList = await run6(detected.command, ["plugin", "list", "--json"], { env: env2 });
131170
- const after2 = exactPluginObservation(target, afterList.stdout);
132028
+ let marketplaceRecovered = false;
132029
+ try {
132030
+ await run6(detected.command, ["plugin", "marketplace", "update", target.marketplace], { env: env2 });
132031
+ } catch (error) {
132032
+ if (!isCodeBuddyWriteCommand(target, detected.command, ["plugin", "marketplace", "update", target.marketplace], "marketplace-update") || !isCodeBuddyResidualEnvelope(error)) throw error;
132033
+ await observeCodeBuddyMarketplaceAfterResidual(target, detected.command, env2, run6);
132034
+ marketplaceRecovered = true;
132035
+ }
132036
+ let after2;
132037
+ let pluginRecovered = false;
132038
+ try {
132039
+ await run6(detected.command, [
132040
+ "plugin",
132041
+ "update",
132042
+ `${target.plugin}@${target.marketplace}`,
132043
+ "--scope",
132044
+ "user"
132045
+ ], { env: env2 });
132046
+ } catch (error) {
132047
+ if (!isCodeBuddyWriteCommand(target, detected.command, [
132048
+ "plugin",
132049
+ "update",
132050
+ `${target.plugin}@${target.marketplace}`,
132051
+ "--scope",
132052
+ "user"
132053
+ ], "plugin-update") || !isCodeBuddyResidualEnvelope(error)) throw error;
132054
+ const afterList = await runCodeBuddyRead(
132055
+ target,
132056
+ detected.command,
132057
+ CODEBUDDY_PLUGIN_LIST_ARGS,
132058
+ `${target.host} plugin list`,
132059
+ env2,
132060
+ run6
132061
+ );
132062
+ after2 = exactPluginObservation(target, afterList.output.stdout);
132063
+ pluginRecovered = true;
132064
+ }
132065
+ if (!pluginRecovered) {
132066
+ const afterList = target.host === "codebuddy" ? await runCodeBuddyRead(target, detected.command, CODEBUDDY_PLUGIN_LIST_ARGS, `${target.host} plugin list`, env2, run6) : { output: await run6(detected.command, [...CODEBUDDY_PLUGIN_LIST_ARGS], { env: env2 }), recovered: false };
132067
+ after2 = exactPluginObservation(target, afterList.output.stdout);
132068
+ }
131171
132069
  if (!after2.exact) throw new Error(`${target.host} did not update to the frozen plugin identity`);
131172
- return { status: "UPDATED", version: target.version, restartRequired: true };
132070
+ return {
132071
+ status: "UPDATED",
132072
+ version: target.version,
132073
+ restartRequired: true,
132074
+ ...marketplaceRecovered || listedObservation.recovered || pluginRecovered ? { residualRecovery: true } : {}
132075
+ };
131173
132076
  }
131174
132077
  const command2 = detected.command;
131175
132078
  const env = hostEnvironment(target.host);
@@ -131245,9 +132148,9 @@ expect {
131245
132148
  timeout { exit 95 }
131246
132149
  eof { exit 96 }
131247
132150
  }
131248
- expect -re {> $}
132151
+ expect -re $promptPattern
131249
132152
  }
131250
- -re {> $} {}
132153
+ -re $promptPattern {}
131251
132154
  timeout { exit 93 }
131252
132155
  eof { exit 94 }
131253
132156
  }
@@ -131259,8 +132162,9 @@ foreach variable {RELEASE_SKILL_KIMI_COMMAND RELEASE_SKILL_KIMI_INSTALL_URL RELE
131259
132162
  set kimiCommand $env(RELEASE_SKILL_KIMI_COMMAND)
131260
132163
  set installUrl $env(RELEASE_SKILL_KIMI_INSTALL_URL)
131261
132164
  set removePlugin $env(RELEASE_SKILL_KIMI_REMOVE_PLUGIN)
132165
+ set promptPattern {(?:(?:^|\\r|\\n)> |(?:^|\\r|\\n)(?:\\033\\[[0-9;?]*[ -/]*[@-~])*\u2502[ \\t]*>[ \\t]*\u2502(?:\\033\\[[0-9;?]*[ -/]*[@-~])*)(?![^\\n]|\\n)}
131262
132166
  spawn $kimiCommand
131263
- expect -re {> $}
132167
+ expect -re $promptPattern
131264
132168
  ${removeCommand}send -- "/plugins install $installUrl\\r"
131265
132169
  expect {
131266
132170
  -nocase -re {trust and install} {
@@ -131273,9 +132177,9 @@ expect {
131273
132177
  timeout { exit 91 }
131274
132178
  eof { exit 92 }
131275
132179
  }
131276
- expect -re {> $}
132180
+ expect -re $promptPattern
131277
132181
  send -- "/reload\\r"
131278
- expect -re {> $}
132182
+ expect -re $promptPattern
131279
132183
  send -- "/exit\\r"
131280
132184
  expect eof
131281
132185
  `;
@@ -131402,6 +132306,8 @@ function aggregateStatus(results) {
131402
132306
  }
131403
132307
  function failedHostResult(target, error) {
131404
132308
  const message = error?.message ?? String(error);
132309
+ const details = error?.details;
132310
+ const publicDetails = details && typeof details === "object" && !Array.isArray(details) ? Object.fromEntries(Object.entries(details).filter(([key]) => key !== "foundationEnvelope" && key !== "foundationStdout" && key !== "foundationStderr")) : details;
131405
132311
  return {
131406
132312
  host: target.host,
131407
132313
  unitId: target.unitId,
@@ -131409,10 +132315,10 @@ function failedHostResult(target, error) {
131409
132315
  error: message,
131410
132316
  reason: typeof error?.reason === "string" ? error.reason : message,
131411
132317
  ...error?.code !== void 0 ? { code: error.code } : {},
131412
- ...error?.details !== void 0 ? { details: error.details } : {}
132318
+ ...publicDetails !== void 0 ? { details: publicDetails } : {}
131413
132319
  };
131414
132320
  }
131415
- async function updateLocalHostPlugins({
132321
+ async function updateLocalHostPluginsInternal({
131416
132322
  plan,
131417
132323
  root = process.cwd(),
131418
132324
  confirmPlanDigest,
@@ -131423,7 +132329,7 @@ async function updateLocalHostPlugins({
131423
132329
  verifyInstalledPayload = verifyInstalledMarketplacePayload
131424
132330
  } = {}) {
131425
132331
  const effectiveKimiHome = kimiHome ?? process.env.KIMI_CONFIG_DIR ?? join27(homedir(), ".kimi-code");
131426
- const checklist = derivePostReleaseChecklist(plan);
132332
+ const checklist = derivePostReleaseChecklist(plan, { postVerifyComplete: true });
131427
132333
  if (confirmPlanDigest !== plan.digest) {
131428
132334
  throw new Error("plan digest confirmation does not match the frozen release plan");
131429
132335
  }
@@ -131440,7 +132346,7 @@ async function updateLocalHostPlugins({
131440
132346
  results.push({
131441
132347
  host: target.host,
131442
132348
  unitId: target.unitId,
131443
- status: "SKIPPED_NOT_INSTALLED",
132349
+ status: detected?.status ?? "SKIPPED_NOT_INSTALLED",
131444
132350
  reason: detected?.reason ?? "host unavailable"
131445
132351
  });
131446
132352
  continue;
@@ -131468,13 +132374,15 @@ async function updateLocalHostPlugins({
131468
132374
  releaseStatusChanged: false
131469
132375
  };
131470
132376
  }
131471
- var HOSTS_BY_ACTION, DISTRIBUTION_BY_ACTION, BRANCH_ACTION_INCLUDED, CODEBUDDY_MACOS_PATH, SAFE_ENV_KEYS;
132377
+ var HOSTS_BY_ACTION, DISTRIBUTION_BY_ACTION, BRANCH_ACTION_INCLUDED, CODEBUDDY_MACOS_PATH, SAFE_ENV_KEYS, CODEBUDDY_PLUGIN_LIST_ARGS, CODEBUDDY_MARKETPLACE_LIST_ARGS;
131472
132378
  var init_post_release_local = __esm({
131473
132379
  async "src/commands/post-release-local.mjs"() {
131474
132380
  init_src2();
131475
132381
  await init_registry2();
131476
132382
  init_codebuddy();
131477
132383
  await init_plugin_marketplace();
132384
+ init_postpublish();
132385
+ await init_run();
131478
132386
  HOSTS_BY_ACTION = Object.freeze({
131479
132387
  "claude-marketplace-install": ["claude"],
131480
132388
  "codex-marketplace-install": ["codex"],
@@ -131509,12 +132417,22 @@ var init_post_release_local = __esm({
131509
132417
  "NODE_EXTRA_CA_CERTS",
131510
132418
  "CLAUDE_CONFIG_DIR",
131511
132419
  "CODEX_HOME",
131512
- "KIMI_CONFIG_DIR"
132420
+ "KIMI_CONFIG_DIR",
132421
+ "CODEBUDDY_CONFIG_DIR",
132422
+ "WORKBUDDY_CONFIG_DIR"
131513
132423
  ]);
132424
+ CODEBUDDY_PLUGIN_LIST_ARGS = Object.freeze(["plugin", "list", "--json"]);
132425
+ CODEBUDDY_MARKETPLACE_LIST_ARGS = Object.freeze(["plugin", "marketplace", "list"]);
132426
+ __name(attachFoundationFailure, "attachFoundationFailure");
131514
132427
  __name(actionTarget, "actionTarget");
131515
132428
  __name(pluginTargets, "pluginTargets");
131516
132429
  __name(assertExecutableTarget, "assertExecutableTarget");
132430
+ __name(buildShipNextStep, "buildShipNextStep");
131517
132431
  __name(derivePostReleaseChecklist, "derivePostReleaseChecklist");
132432
+ __name(postVerifyHooks, "postVerifyHooks");
132433
+ __name(localFinishEvidenceError, "localFinishEvidenceError");
132434
+ __name(updateLocalHostPlugins, "updateLocalHostPlugins");
132435
+ __name(assertLocalFinishRun, "assertLocalFinishRun");
131518
132436
  __name(unavailablePostReleaseChecklist, "unavailablePostReleaseChecklist");
131519
132437
  __name(assertVerifiedReleaseRun, "assertVerifiedReleaseRun");
131520
132438
  __name(hostEnvironment, "hostEnvironment");
@@ -131522,6 +132440,14 @@ var init_post_release_local = __esm({
131522
132440
  __name(commandAvailable, "commandAvailable");
131523
132441
  __name(defaultDetect, "defaultDetect");
131524
132442
  __name(parseJson2, "parseJson");
132443
+ __name(foundationEnvelopeFromError, "foundationEnvelopeFromError");
132444
+ __name(foundationStdoutFromError, "foundationStdoutFromError");
132445
+ __name(isCodeBuddyResidualEnvelope, "isCodeBuddyResidualEnvelope");
132446
+ __name(isCodeBuddyReadCommand, "isCodeBuddyReadCommand");
132447
+ __name(isCodeBuddyWriteCommand, "isCodeBuddyWriteCommand");
132448
+ __name(runCodeBuddyRead, "runCodeBuddyRead");
132449
+ __name(exactCodeBuddyMarketplaceObservation, "exactCodeBuddyMarketplaceObservation");
132450
+ __name(observeCodeBuddyMarketplaceAfterResidual, "observeCodeBuddyMarketplaceAfterResidual");
131525
132451
  __name(exactPluginObservation, "exactPluginObservation");
131526
132452
  __name(normalizeGitSource, "normalizeGitSource");
131527
132453
  __name(observeMarketplace, "observeMarketplace");
@@ -131536,7 +132462,7 @@ var init_post_release_local = __esm({
131536
132462
  __name(runKimiUpdate, "runKimiUpdate");
131537
132463
  __name(aggregateStatus, "aggregateStatus");
131538
132464
  __name(failedHostResult, "failedHostResult");
131539
- __name(updateLocalHostPlugins, "updateLocalHostPlugins");
132465
+ __name(updateLocalHostPluginsInternal, "updateLocalHostPluginsInternal");
131540
132466
  }
131541
132467
  });
131542
132468
 
@@ -131546,7 +132472,7 @@ __export(approve_exports, {
131546
132472
  approvePlan: () => approvePlan,
131547
132473
  approvePostPublishHook: () => approvePostPublishHook
131548
132474
  });
131549
- import { readFile as readFile36, writeFile as writeFile8 } from "node:fs/promises";
132475
+ import { readFile as readFile37, writeFile as writeFile8 } from "node:fs/promises";
131550
132476
  import { resolve as resolve33, dirname as dirname17, basename as basename13 } from "node:path";
131551
132477
  function defaultClock2() {
131552
132478
  return (/* @__PURE__ */ new Date()).toISOString();
@@ -131570,7 +132496,7 @@ async function approvePlan(options) {
131570
132496
  }
131571
132497
  let planRaw;
131572
132498
  try {
131573
- planRaw = await readFile36(planPath, "utf8");
132499
+ planRaw = await readFile37(planPath, "utf8");
131574
132500
  } catch (err) {
131575
132501
  throw new ReleaseError(
131576
132502
  GATE_FAILED,
@@ -131698,7 +132624,7 @@ async function approvePlan(options) {
131698
132624
  await writeFile8(immutableApprovalPath, json, { encoding: "utf8", flag: "wx", mode: 384 });
131699
132625
  } catch (error) {
131700
132626
  if (error.code !== "EEXIST") throw error;
131701
- const existing = await readFile36(immutableApprovalPath, "utf8");
132627
+ const existing = await readFile37(immutableApprovalPath, "utf8");
131702
132628
  if (existing !== json) {
131703
132629
  throw new ReleaseError(
131704
132630
  GATE_FAILED,
@@ -131749,7 +132675,7 @@ async function approvePostPublishHook(options) {
131749
132675
  }
131750
132676
  let planRaw;
131751
132677
  try {
131752
- planRaw = await readFile36(planPath, "utf8");
132678
+ planRaw = await readFile37(planPath, "utf8");
131753
132679
  } catch (err) {
131754
132680
  throw new ReleaseError(GATE_FAILED, `cannot read release plan: ${err.message}`, { planPath, cause: err.code });
131755
132681
  }
@@ -131809,7 +132735,7 @@ async function approvePostPublishHook(options) {
131809
132735
  await writeFile8(immutableApprovalPath, json, { encoding: "utf8", flag: "wx", mode: 384 });
131810
132736
  } catch (error) {
131811
132737
  if (error.code !== "EEXIST") throw error;
131812
- const existing = await readFile36(immutableApprovalPath, "utf8");
132738
+ const existing = await readFile37(immutableApprovalPath, "utf8");
131813
132739
  if (existing !== json) {
131814
132740
  throw new ReleaseError(
131815
132741
  GATE_FAILED,
@@ -131960,7 +132886,7 @@ __export(publish_exports, {
131960
132886
  classifyPreObservation: () => classifyPreObservation,
131961
132887
  publishRelease: () => publishRelease
131962
132888
  });
131963
- import { readFile as readFile37, mkdir as mkdir22 } from "node:fs/promises";
132889
+ import { readFile as readFile38, mkdir as mkdir22 } from "node:fs/promises";
131964
132890
  import { isAbsolute as isAbsolute23, join as join28, relative as relative28 } from "node:path";
131965
132891
  function assertInsideAssetRoot(assetRoot, candidate, label) {
131966
132892
  const rel = relative28(assetRoot, candidate);
@@ -132193,7 +133119,7 @@ async function publishRelease(options) {
132193
133119
  const captureBaselineActual = typeof captureBaselineFn === "function" ? captureBaselineFn : captureBaseline;
132194
133120
  let planRaw;
132195
133121
  try {
132196
- planRaw = await readFile37(planPath, "utf8");
133122
+ planRaw = await readFile38(planPath, "utf8");
132197
133123
  } catch (err) {
132198
133124
  throw new ReleaseError(GATE_FAILED, `cannot read release plan: ${err.message}`, { planPath, cause: err.code });
132199
133125
  }
@@ -132384,7 +133310,7 @@ async function publishRelease(options) {
132384
133310
  await evidence.append({ phase: "safety-gate", gate: "approval-load", status: "started" });
132385
133311
  let approvalRaw;
132386
133312
  try {
132387
- approvalRaw = await readFile37(approvalPath, "utf8");
133313
+ approvalRaw = await readFile38(approvalPath, "utf8");
132388
133314
  } catch (err) {
132389
133315
  throw new ReleaseError(
132390
133316
  GATE_FAILED,
@@ -133021,7 +133947,7 @@ var reconcile_exports = {};
133021
133947
  __export(reconcile_exports, {
133022
133948
  reconcileRelease: () => reconcileRelease
133023
133949
  });
133024
- import { readFile as readFile38, mkdir as mkdir23 } from "node:fs/promises";
133950
+ import { readFile as readFile39, mkdir as mkdir23 } from "node:fs/promises";
133025
133951
  import { join as join29 } from "node:path";
133026
133952
  function defaultClock5() {
133027
133953
  return (/* @__PURE__ */ new Date()).toISOString();
@@ -133050,7 +133976,7 @@ async function reconcileRelease(options) {
133050
133976
  }
133051
133977
  let planRaw;
133052
133978
  try {
133053
- planRaw = await readFile38(planPath, "utf8");
133979
+ planRaw = await readFile39(planPath, "utf8");
133054
133980
  } catch (err) {
133055
133981
  throw new ReleaseError(GATE_FAILED, `cannot read release plan: ${err.message}`, { planPath, cause: err.code });
133056
133982
  }
@@ -133173,7 +134099,7 @@ async function reconcileRelease(options) {
133173
134099
  { sourceRunId: sourceRun.runId }
133174
134100
  );
133175
134101
  }
133176
- const sourceApprovalRaw = await readFile38(consumedApprovalPath, "utf8").catch((error) => {
134102
+ const sourceApprovalRaw = await readFile39(consumedApprovalPath, "utf8").catch((error) => {
133177
134103
  throw new ReleaseError(GATE_FAILED, "source run approval authority is unavailable", {
133178
134104
  sourceRunId: sourceRun.runId,
133179
134105
  cause: error.code
@@ -133335,7 +134261,7 @@ async function reconcileRelease(options) {
133335
134261
  if (approvalPath) {
133336
134262
  let approvalRaw;
133337
134263
  try {
133338
- approvalRaw = await readFile38(approvalPath, "utf8");
134264
+ approvalRaw = await readFile39(approvalPath, "utf8");
133339
134265
  } catch (err) {
133340
134266
  throw new ReleaseError(
133341
134267
  GATE_FAILED,
@@ -134801,7 +135727,7 @@ var init_notify_handoff = __esm({
134801
135727
  // src/core/proposal-inbox.mjs
134802
135728
  import { execFile as execFileCb14 } from "node:child_process";
134803
135729
  import { promisify as promisify14 } from "node:util";
134804
- import { mkdir as mkdir26, mkdtemp as mkdtemp8, readFile as readFile39, rm as rm12, writeFile as writeFile11 } from "node:fs/promises";
135730
+ import { mkdir as mkdir26, mkdtemp as mkdtemp8, readFile as readFile40, rm as rm12, writeFile as writeFile11 } from "node:fs/promises";
134805
135731
  import { tmpdir as tmpdir6 } from "node:os";
134806
135732
  import { dirname as dirname19, join as join32 } from "node:path";
134807
135733
  function defaultExec2(command2, args2, options = {}) {
@@ -134981,7 +135907,7 @@ async function observeProposalInboxGitPush(params) {
134981
135907
  const targetPath2 = join32(cloneDir, proposalPath);
134982
135908
  let existing = null;
134983
135909
  try {
134984
- existing = await readFile39(targetPath2, "utf8");
135910
+ existing = await readFile40(targetPath2, "utf8");
134985
135911
  } catch {
134986
135912
  existing = null;
134987
135913
  }
@@ -135142,7 +136068,7 @@ async function deliverProposalLocalFile(params) {
135142
136068
  const targetPath2 = join32(workspaceRealpath, proposalPath);
135143
136069
  let existing = null;
135144
136070
  try {
135145
- existing = await readFile39(targetPath2, "utf8");
136071
+ existing = await readFile40(targetPath2, "utf8");
135146
136072
  } catch {
135147
136073
  existing = null;
135148
136074
  }
@@ -135639,7 +136565,7 @@ var init_preset_gitwrite = __esm({
135639
136565
  });
135640
136566
 
135641
136567
  // src/core/marketplace-registry-entry.mjs
135642
- import { readFile as readFile40 } from "node:fs/promises";
136568
+ import { readFile as readFile41 } from "node:fs/promises";
135643
136569
  import { join as join34 } from "node:path";
135644
136570
  function updateRegistryEntry(registry, params) {
135645
136571
  const { entryKey, fieldsFromPlan, contextProjection } = params ?? {};
@@ -135705,7 +136631,7 @@ async function executeMarketplaceRegistryEntryHook(params) {
135705
136631
  const absoluteRegistry = join34(worktree, registryPath);
135706
136632
  let raw;
135707
136633
  try {
135708
- raw = await readFile40(absoluteRegistry, "utf8");
136634
+ raw = await readFile41(absoluteRegistry, "utf8");
135709
136635
  } catch {
135710
136636
  throw new ReleaseError(
135711
136637
  REMOTE_CONFLICT,
@@ -135757,7 +136683,7 @@ var init_marketplace_registry_entry = __esm({
135757
136683
  });
135758
136684
 
135759
136685
  // src/core/docs-refresh-preset.mjs
135760
- import { mkdir as mkdir27, readFile as readFile41, writeFile as writeFile12 } from "node:fs/promises";
136686
+ import { mkdir as mkdir27, readFile as readFile42, writeFile as writeFile12 } from "node:fs/promises";
135761
136687
  import { dirname as dirname20, isAbsolute as isAbsolute24, join as join35, relative as relative29, resolve as resolve34 } from "node:path";
135762
136688
  function resolvePayloadSource(payloadDir, from) {
135763
136689
  const sourcePath = resolve34(payloadDir, from);
@@ -135795,7 +136721,7 @@ async function executeDocsRefreshHook(params) {
135795
136721
  const mutate = /* @__PURE__ */ __name(async (worktree) => {
135796
136722
  for (const mapping of mappings) {
135797
136723
  const sourcePath = resolvePayloadSource(payloadDir, mapping.from);
135798
- let content = await readFile41(sourcePath).catch(() => null);
136724
+ let content = await readFile42(sourcePath).catch(() => null);
135799
136725
  if (content === null) {
135800
136726
  throw new ReleaseError(
135801
136727
  GATE_FAILED,
@@ -136012,7 +136938,7 @@ __export(distribute_exports, {
136012
136938
  });
136013
136939
  import { execFile as execFileCb16 } from "node:child_process";
136014
136940
  import { promisify as promisify16 } from "node:util";
136015
- import { realpath as realpath32, lstat as lstat43, mkdir as mkdir28, readFile as readFile42, rm as rm15 } from "node:fs/promises";
136941
+ import { realpath as realpath32, lstat as lstat43, mkdir as mkdir28, readFile as readFile43, rm as rm15 } from "node:fs/promises";
136016
136942
  import { mkdtemp as mkdtemp10 } from "node:fs/promises";
136017
136943
  import { tmpdir as tmpdir8 } from "node:os";
136018
136944
  import { isAbsolute as isAbsolute25, join as join36, relative as relative30, resolve as resolve35 } from "node:path";
@@ -136111,7 +137037,7 @@ async function distributeRelease(options) {
136111
137037
  const hookRunner = typeof runHookFn === "function" ? runHookFn : runHook;
136112
137038
  let planRaw;
136113
137039
  try {
136114
- planRaw = await readFile42(planPath, "utf8");
137040
+ planRaw = await readFile43(planPath, "utf8");
136115
137041
  } catch (err) {
136116
137042
  throw new ReleaseError(GATE_FAILED, `cannot read release plan: ${err.message}`, { planPath, cause: err.code });
136117
137043
  }
@@ -136226,7 +137152,7 @@ async function distributeRelease(options) {
136226
137152
  await evidence.append({ phase: "safety-gate", gate: "approval-load", status: "started" });
136227
137153
  let approvalRaw;
136228
137154
  try {
136229
- approvalRaw = await readFile42(approvalPath, "utf8");
137155
+ approvalRaw = await readFile43(approvalPath, "utf8");
136230
137156
  } catch (err) {
136231
137157
  throw new ReleaseError(GATE_FAILED, `cannot read approval record: ${err.message}`, { approvalPath, cause: err.code });
136232
137158
  }
@@ -136338,7 +137264,7 @@ async function distributeRelease(options) {
136338
137264
  for (const hookApprovalPath of hookApprovalPaths) {
136339
137265
  let hookApprovalRaw;
136340
137266
  try {
136341
- hookApprovalRaw = await readFile42(hookApprovalPath, "utf8");
137267
+ hookApprovalRaw = await readFile43(hookApprovalPath, "utf8");
136342
137268
  } catch (err) {
136343
137269
  await failBlocked(new ReleaseError(
136344
137270
  GATE_FAILED,
@@ -137443,7 +138369,7 @@ __export(postverify_exports, {
137443
138369
  });
137444
138370
  import { execFile as execFileCb17 } from "node:child_process";
137445
138371
  import { promisify as promisify17 } from "node:util";
137446
- import { mkdir as mkdir29, readFile as readFile43, realpath as realpath33, rm as rm16 } from "node:fs/promises";
138372
+ import { mkdir as mkdir29, readFile as readFile44, realpath as realpath33, rm as rm16 } from "node:fs/promises";
137447
138373
  import { mkdtemp as mkdtemp11 } from "node:fs/promises";
137448
138374
  import { tmpdir as tmpdir9 } from "node:os";
137449
138375
  import { join as join37 } from "node:path";
@@ -137476,7 +138402,7 @@ async function postVerifyRelease(options) {
137476
138402
  const hookRunner = typeof runHookFn === "function" ? runHookFn : runHook;
137477
138403
  let planRaw;
137478
138404
  try {
137479
- planRaw = await readFile43(planPath, "utf8");
138405
+ planRaw = await readFile44(planPath, "utf8");
137480
138406
  } catch (err) {
137481
138407
  throw new ReleaseError(GATE_FAILED, `cannot read release plan: ${err.message}`, { planPath, cause: err.code });
137482
138408
  }
@@ -137510,7 +138436,7 @@ async function postVerifyRelease(options) {
137510
138436
  }
137511
138437
  let approvalRaw;
137512
138438
  try {
137513
- approvalRaw = await readFile43(approvalPath, "utf8");
138439
+ approvalRaw = await readFile44(approvalPath, "utf8");
137514
138440
  } catch (err) {
137515
138441
  throw new ReleaseError(GATE_FAILED, `cannot read approval record: ${err.message}`, { approvalPath, cause: err.code });
137516
138442
  }
@@ -137583,16 +138509,16 @@ async function postVerifyRelease(options) {
137583
138509
  validatePostPublishDeclaration(declaration, { unitId: declaration.unitId });
137584
138510
  await verifyExecutionBundle({ planPath, postPublish: declaration });
137585
138511
  const declaredHooks = declaration.hooks ?? [];
137586
- const postVerifyHooks2 = declaredHooks.filter((hook) => (hook.phase ?? "distribute") === "postVerify");
137587
- prepared.push({ declaration, postVerifyHooks: postVerifyHooks2 });
138512
+ const postVerifyHooks3 = declaredHooks.filter((hook) => (hook.phase ?? "distribute") === "postVerify");
138513
+ prepared.push({ declaration, postVerifyHooks: postVerifyHooks3 });
137588
138514
  }
137589
- const postVerifyHooks = prepared.flatMap((prep) => prep.postVerifyHooks);
138515
+ const postVerifyHooks2 = prepared.flatMap((prep) => prep.postVerifyHooks);
137590
138516
  const approvedHookIds = /* @__PURE__ */ new Set();
137591
138517
  const hookApprovalPaths = postpublishApprovalPaths ?? [];
137592
138518
  for (const hookApprovalPath of hookApprovalPaths) {
137593
138519
  let hookApprovalRaw;
137594
138520
  try {
137595
- hookApprovalRaw = await readFile43(hookApprovalPath, "utf8");
138521
+ hookApprovalRaw = await readFile44(hookApprovalPath, "utf8");
137596
138522
  } catch (err) {
137597
138523
  throw new ReleaseError(
137598
138524
  GATE_FAILED,
@@ -137747,7 +138673,7 @@ async function postVerifyRelease(options) {
137747
138673
  status: "started",
137748
138674
  sourceVerifyRunId: verifyRun.runId,
137749
138675
  sourcePublishRunId: publishRun.runId,
137750
- hookCount: postVerifyHooks.length,
138676
+ hookCount: postVerifyHooks2.length,
137751
138677
  dryRun: dryRun === true
137752
138678
  });
137753
138679
  await snapshot(DISTRIBUTING2);
@@ -138227,7 +139153,7 @@ var release_metadata_exports = {};
138227
139153
  __export(release_metadata_exports, {
138228
139154
  updatePreviousPublicBaselines: () => updatePreviousPublicBaselines
138229
139155
  });
138230
- import { lstat as lstat44, readFile as readFile44 } from "node:fs/promises";
139156
+ import { lstat as lstat44, readFile as readFile45 } from "node:fs/promises";
138231
139157
  import { resolve as resolve36 } from "node:path";
138232
139158
  function assertOid(value, label) {
138233
139159
  if (typeof value !== "string" || !/^[a-f0-9]{40,64}$/.test(value)) {
@@ -138243,8 +139169,8 @@ async function updatePreviousPublicBaselines(options = {}) {
138243
139169
  let configStat;
138244
139170
  try {
138245
139171
  [plan, configRaw, configStat] = await Promise.all([
138246
- readFile44(planPath, "utf8").then(JSON.parse),
138247
- readFile44(configPath, "utf8"),
139172
+ readFile45(planPath, "utf8").then(JSON.parse),
139173
+ readFile45(configPath, "utf8"),
138248
139174
  lstat44(configPath)
138249
139175
  ]);
138250
139176
  } catch (error) {
@@ -138329,8 +139255,72 @@ var ship_exports = {};
138329
139255
  __export(ship_exports, {
138330
139256
  advanceShip: () => advanceShip
138331
139257
  });
138332
- import { readFile as readFile45, lstat as lstat45, mkdir as mkdir30 } from "node:fs/promises";
139258
+ import { readFile as readFile46, lstat as lstat45, mkdir as mkdir30 } from "node:fs/promises";
138333
139259
  import { basename as basename14, dirname as dirname21, resolve as resolve37 } from "node:path";
139260
+ function normalizeNewShipUnitIds(releaseUnits, requestedUnitIds) {
139261
+ if (requestedUnitIds === void 0) return void 0;
139262
+ const availableUnitIds = (releaseUnits ?? []).map((unit) => unit.id);
139263
+ if (!Array.isArray(requestedUnitIds) || requestedUnitIds.length === 0) {
139264
+ throw new ReleaseError(
139265
+ CONFIG_INVALID,
139266
+ "explicit ship release-unit selection must contain at least one unit id",
139267
+ { requestedUnitIds, availableUnitIds }
139268
+ );
139269
+ }
139270
+ const requestedSet = new Set(requestedUnitIds);
139271
+ const invalid5 = requestedUnitIds.filter((unitId) => typeof unitId !== "string" || unitId.length === 0);
139272
+ const unknown = requestedUnitIds.filter((unitId) => !availableUnitIds.includes(unitId));
139273
+ if (invalid5.length > 0 || requestedSet.size !== requestedUnitIds.length || unknown.length > 0) {
139274
+ throw new ReleaseError(
139275
+ CONFIG_INVALID,
139276
+ "ship release-unit selection contains empty, duplicate, or unknown unit ids",
139277
+ { requestedUnitIds, availableUnitIds }
139278
+ );
139279
+ }
139280
+ return availableUnitIds.filter((unitId) => requestedSet.has(unitId));
139281
+ }
139282
+ function sameUnitSelection(left, right) {
139283
+ return Array.isArray(left) && Array.isArray(right) && left.length === right.length && new Set(left).size === left.length && new Set(right).size === right.length && left.every((unitId) => right.includes(unitId));
139284
+ }
139285
+ function sameUnitOrder(left, right) {
139286
+ return Array.isArray(left) && Array.isArray(right) && left.length === right.length && left.every((unitId, index) => unitId === right[index]);
139287
+ }
139288
+ function unitScopeMismatch(statePath, stateUnitIds, requestedUnitIds, message) {
139289
+ return new ReleaseError(
139290
+ GATE_FAILED,
139291
+ message,
139292
+ {
139293
+ reason: "SHIP_STATE_UNIT_SCOPE_MISMATCH",
139294
+ statePath,
139295
+ stateUnitIds: stateUnitIds ?? null,
139296
+ requestedUnitIds: requestedUnitIds ?? null
139297
+ }
139298
+ );
139299
+ }
139300
+ function assertFrozenPlanUnitScope({ statePath, stateUnitIds, expectedUnitIds, plan }) {
139301
+ const planUnitIds = (plan.units ?? []).map((unit) => unit.id);
139302
+ const exactMatch = Array.isArray(expectedUnitIds) && planUnitIds.length === expectedUnitIds.length && planUnitIds.every((unitId, index) => unitId === expectedUnitIds[index]);
139303
+ if (!exactMatch) {
139304
+ throw unitScopeMismatch(
139305
+ statePath,
139306
+ stateUnitIds,
139307
+ planUnitIds,
139308
+ "ship state release-unit scope does not match frozen plan.units"
139309
+ );
139310
+ }
139311
+ }
139312
+ async function readFrozenPlanForUnitScope(planPath, statePath, stateUnitIds) {
139313
+ try {
139314
+ return JSON.parse(await readFile46(planPath, "utf8"));
139315
+ } catch (error) {
139316
+ throw unitScopeMismatch(
139317
+ statePath,
139318
+ stateUnitIds,
139319
+ null,
139320
+ `cannot verify ship state release-unit scope against frozen plan: ${error.message}`
139321
+ );
139322
+ }
139323
+ }
138334
139324
  async function writeJsonAtomic(path40, value) {
138335
139325
  await mkdir30(dirname21(path40), { recursive: true });
138336
139326
  const { stateDigest: _oldDigest, ...body } = value;
@@ -138349,7 +139339,7 @@ async function readState(path40) {
138349
139339
  if (!stat22.isFile() || stat22.isSymbolicLink()) {
138350
139340
  throw new Error("ship state must be a regular non-symlink file");
138351
139341
  }
138352
- const state = JSON.parse(await readFile45(path40, "utf8"));
139342
+ const state = JSON.parse(await readFile46(path40, "utf8"));
138353
139343
  const { stateDigest, ...body } = state;
138354
139344
  if (typeof stateDigest !== "string" || stateDigest !== sha256Hex(canonicalJson2(body)) || body.statePath !== path40) {
138355
139345
  throw new Error("ship state digest or authority path does not match");
@@ -138398,7 +139388,8 @@ async function defaultDependencies() {
138398
139388
  readMaxApprovalMs: /* @__PURE__ */ __name(() => MAX_APPROVAL_MS, "readMaxApprovalMs")
138399
139389
  };
138400
139390
  }
138401
- function publicState2(state) {
139391
+ function publicState2(state, { postRelease } = {}) {
139392
+ const visiblePostRelease = postRelease === void 0 ? state.postRelease : postRelease;
138402
139393
  return {
138403
139394
  command: "ship",
138404
139395
  status: state.status,
@@ -138407,6 +139398,7 @@ function publicState2(state) {
138407
139398
  ...state.hooks && state.hooks.length > 0 ? {
138408
139399
  hooks: state.hooks
138409
139400
  } : {},
139401
+ ...state.selectedUnitIds ? { selectedUnitIds: state.selectedUnitIds } : {},
138410
139402
  ...state.planPath ? {
138411
139403
  planPath: state.planPath,
138412
139404
  planDigest: state.planDigest,
@@ -138422,7 +139414,7 @@ function publicState2(state) {
138422
139414
  ...state.requirements ? { requirements: state.requirements } : {},
138423
139415
  ...state.manualFollowUps ? { manualFollowUps: state.manualFollowUps } : {},
138424
139416
  ...state.metadataUpdate ? { metadataUpdate: state.metadataUpdate } : {},
138425
- ...state.postRelease ? { postRelease: state.postRelease } : {},
139417
+ ...visiblePostRelease ? { postRelease: visiblePostRelease } : {},
138426
139418
  externalActionsIncludedInPlanApproval: true,
138427
139419
  verificationGatesIncludedInPlanApproval: true,
138428
139420
  postPublishCheckpointApprovalsIncludedInPlanApproval: false
@@ -138446,7 +139438,7 @@ function projectActionTarget(action) {
138446
139438
  }
138447
139439
  async function buildApprovalSummary(planPath, maxApprovalMs = MAX_APPROVAL_MS) {
138448
139440
  try {
138449
- const plan = JSON.parse(await readFile45(planPath, "utf8"));
139441
+ const plan = JSON.parse(await readFile46(planPath, "utf8"));
138450
139442
  const approvalWindowHours = deriveApprovalWindowHours(maxApprovalMs);
138451
139443
  const actions = (plan.externalActions ?? []).map((action) => ({
138452
139444
  id: action.id,
@@ -138511,19 +139503,19 @@ async function buildApprovalSummary(planPath, maxApprovalMs = MAX_APPROVAL_MS) {
138511
139503
  );
138512
139504
  }
138513
139505
  }
138514
- async function allUnclosedPostVerifyHooksUngated(state, postVerifyHooks, planVersion) {
138515
- if (!Array.isArray(postVerifyHooks) || postVerifyHooks.length === 0) return false;
138516
- let candidates = postVerifyHooks;
139506
+ async function allUnclosedPostVerifyHooksUngated(state, postVerifyHooks2, planVersion) {
139507
+ if (!Array.isArray(postVerifyHooks2) || postVerifyHooks2.length === 0) return false;
139508
+ let candidates = postVerifyHooks2;
138517
139509
  if (state.postVerify?.runPath) {
138518
139510
  try {
138519
- const record = JSON.parse(await readFile45(state.postVerify.runPath, "utf8"));
139511
+ const record = JSON.parse(await readFile46(state.postVerify.runPath, "utf8"));
138520
139512
  const checkpoints = Array.isArray(record.checkpoints) ? record.checkpoints : [];
138521
139513
  const closedIds = new Set(
138522
139514
  checkpoints.filter((cp4) => cp4?.actionType === "postpublish-hook" && (cp4.status === "succeeded" || cp4.status === "NO_CHANGE")).map((cp4) => cp4.actionId)
138523
139515
  );
138524
- candidates = postVerifyHooks.filter(({ hook, unitId }) => !closedIds.has(postPublishActionId({ planVersion, unitId, localId: hook.id })));
139516
+ candidates = postVerifyHooks2.filter(({ hook, unitId }) => !closedIds.has(postPublishActionId({ planVersion, unitId, localId: hook.id })));
138525
139517
  } catch {
138526
- candidates = postVerifyHooks;
139518
+ candidates = postVerifyHooks2;
138527
139519
  }
138528
139520
  }
138529
139521
  if (candidates.length === 0) return false;
@@ -138553,12 +139545,31 @@ async function advanceShip(options = {}, injected = {}) {
138553
139545
  );
138554
139546
  }
138555
139547
  }
139548
+ if (state && options.unitIds !== void 0) {
139549
+ if (!Array.isArray(state.selectedUnitIds)) {
139550
+ throw unitScopeMismatch(
139551
+ statePath,
139552
+ null,
139553
+ options.unitIds,
139554
+ "an existing full-scope or legacy ship state cannot acquire --unit; provide a new --state path"
139555
+ );
139556
+ }
139557
+ if (!sameUnitSelection(state.selectedUnitIds, options.unitIds)) {
139558
+ throw unitScopeMismatch(
139559
+ statePath,
139560
+ state.selectedUnitIds,
139561
+ options.unitIds,
139562
+ "ship state release-unit scope does not match the requested --unit values"
139563
+ );
139564
+ }
139565
+ }
138556
139566
  if (state?.gitTransport) {
138557
139567
  process.env.RELEASE_SKILL_GIT_TRANSPORT = state.gitTransport;
138558
139568
  }
138559
139569
  if (!state) {
138560
139570
  const loaded = await deps.loadProjectConfig({ root });
138561
139571
  const hooks = Object.keys(loaded.config.hooks ?? {}).sort();
139572
+ const selectedUnitIds = normalizeNewShipUnitIds(loaded.config.releaseUnits, options.unitIds);
138562
139573
  state = {
138563
139574
  schemaVersion: 2,
138564
139575
  root,
@@ -138566,6 +139577,7 @@ async function advanceShip(options = {}, injected = {}) {
138566
139577
  targetVersion: options.targetVersion ?? null,
138567
139578
  configDigest: loaded.configDigest,
138568
139579
  hooks,
139580
+ ...selectedUnitIds ? { selectedUnitIds } : {},
138569
139581
  status: "NEW",
138570
139582
  createdAt: (/* @__PURE__ */ new Date()).toISOString(),
138571
139583
  updatedAt: (/* @__PURE__ */ new Date()).toISOString()
@@ -138577,8 +139589,52 @@ async function advanceShip(options = {}, injected = {}) {
138577
139589
  state.updatedAt = (/* @__PURE__ */ new Date()).toISOString();
138578
139590
  await writeJsonAtomic(statePath, state);
138579
139591
  }
139592
+ if (state.planPath && Array.isArray(state.selectedUnitIds)) {
139593
+ const frozenPlan = await readFrozenPlanForUnitScope(
139594
+ state.planPath,
139595
+ statePath,
139596
+ state.selectedUnitIds
139597
+ );
139598
+ assertFrozenPlanUnitScope({
139599
+ statePath,
139600
+ stateUnitIds: state.selectedUnitIds,
139601
+ expectedUnitIds: state.selectedUnitIds,
139602
+ plan: frozenPlan
139603
+ });
139604
+ }
138580
139605
  if (state.status === "NEW") {
138581
139606
  const loaded = await deps.loadProjectConfig({ root });
139607
+ let stateChanged = false;
139608
+ if (Array.isArray(state.selectedUnitIds)) {
139609
+ const normalizedStateUnitIds = normalizeNewShipUnitIds(
139610
+ loaded.config.releaseUnits,
139611
+ state.selectedUnitIds
139612
+ );
139613
+ if (!sameUnitSelection(normalizedStateUnitIds, state.selectedUnitIds)) {
139614
+ throw unitScopeMismatch(
139615
+ statePath,
139616
+ state.selectedUnitIds,
139617
+ normalizedStateUnitIds,
139618
+ "ship state release-unit scope no longer matches project configuration"
139619
+ );
139620
+ }
139621
+ if (!sameUnitOrder(normalizedStateUnitIds, state.selectedUnitIds)) {
139622
+ if (state.planPath) {
139623
+ throw unitScopeMismatch(
139624
+ statePath,
139625
+ state.selectedUnitIds,
139626
+ normalizedStateUnitIds,
139627
+ "frozen ship state release-unit order no longer matches project configuration"
139628
+ );
139629
+ }
139630
+ state = {
139631
+ ...state,
139632
+ selectedUnitIds: normalizedStateUnitIds,
139633
+ updatedAt: (/* @__PURE__ */ new Date()).toISOString()
139634
+ };
139635
+ stateChanged = true;
139636
+ }
139637
+ }
138582
139638
  if (loaded.configDigest !== state.configDigest) {
138583
139639
  const hooks = Object.keys(loaded.config.hooks ?? {}).sort();
138584
139640
  state = {
@@ -138588,8 +139644,9 @@ async function advanceShip(options = {}, injected = {}) {
138588
139644
  status: "NEW",
138589
139645
  updatedAt: (/* @__PURE__ */ new Date()).toISOString()
138590
139646
  };
138591
- await writeJsonAtomic(statePath, state);
139647
+ stateChanged = true;
138592
139648
  }
139649
+ if (stateChanged) await writeJsonAtomic(statePath, state);
138593
139650
  const prepared = await deps.prepareRelease({
138594
139651
  root,
138595
139652
  version: state.targetVersion ?? void 0,
@@ -138597,11 +139654,23 @@ async function advanceShip(options = {}, injected = {}) {
138597
139654
  production: true,
138598
139655
  hooksAuthorized: true,
138599
139656
  verificationGatesAuthorized: true,
138600
- hookCache: true
138601
- });
139657
+ hookCache: true,
139658
+ ...state.selectedUnitIds ? { unitIds: state.selectedUnitIds } : {}
139659
+ });
139660
+ let frozenPlan = null;
139661
+ if (Array.isArray(state.selectedUnitIds) || deps.preflightGitTransports) {
139662
+ frozenPlan = Array.isArray(state.selectedUnitIds) ? await readFrozenPlanForUnitScope(prepared.planPath, statePath, state.selectedUnitIds) : JSON.parse(await readFile46(prepared.planPath, "utf8"));
139663
+ }
139664
+ if (Array.isArray(state.selectedUnitIds)) {
139665
+ assertFrozenPlanUnitScope({
139666
+ statePath,
139667
+ stateUnitIds: state.selectedUnitIds,
139668
+ expectedUnitIds: state.selectedUnitIds,
139669
+ plan: frozenPlan
139670
+ });
139671
+ }
138602
139672
  let transportPreflight = null;
138603
139673
  if (deps.preflightGitTransports) {
138604
- const frozenPlan = JSON.parse(await readFile45(prepared.planPath, "utf8"));
138605
139674
  transportPreflight = await deps.preflightGitTransports(frozenPlan);
138606
139675
  process.env.RELEASE_SKILL_GIT_TRANSPORT = transportPreflight.transport;
138607
139676
  }
@@ -138687,7 +139756,7 @@ async function advanceShip(options = {}, injected = {}) {
138687
139756
  }
138688
139757
  let postVerifyRanThisCall = false;
138689
139758
  if (state.status === "PUBLISHED" || state.status === "NEEDS_MANUAL_ATTESTATIONS") {
138690
- const plan = JSON.parse(await readFile45(state.planPath, "utf8"));
139759
+ const plan = JSON.parse(await readFile46(state.planPath, "utf8"));
138691
139760
  const hasDistributeWork = normalizePostPublishView(plan).some((declaration) => (declaration.targets?.length ?? 0) > 0 || (declaration.hooks?.length ?? 0) > 0);
138692
139761
  const needsDistribution = hasDistributeWork;
138693
139762
  if (needsDistribution && deps.distributeRelease) {
@@ -138742,15 +139811,6 @@ async function advanceShip(options = {}, injected = {}) {
138742
139811
  updatedAt: (/* @__PURE__ */ new Date()).toISOString()
138743
139812
  };
138744
139813
  await writeJsonAtomic(statePath, state);
138745
- if (verified.status === "VERIFIED") {
138746
- try {
138747
- state.postRelease = derivePostReleaseChecklist(plan);
138748
- } catch (error) {
138749
- state.postRelease = unavailablePostReleaseChecklist(plan, error);
138750
- }
138751
- state.updatedAt = (/* @__PURE__ */ new Date()).toISOString();
138752
- await writeJsonAtomic(statePath, state);
138753
- }
138754
139814
  } catch (error) {
138755
139815
  if (error?.code !== CONSUMER_VERIFICATION_DEFERRED) throw error;
138756
139816
  state = {
@@ -138761,8 +139821,8 @@ async function advanceShip(options = {}, injected = {}) {
138761
139821
  };
138762
139822
  await writeJsonAtomic(statePath, state);
138763
139823
  }
138764
- const postVerifyHooks = normalizePostPublishView(plan).flatMap((declaration) => declaration.hooks ?? []).filter((hook) => hook.phase === "postVerify");
138765
- if (state.status === "VERIFIED" && postVerifyHooks.length > 0 && deps.postVerifyRelease) {
139824
+ const postVerifyHooks2 = normalizePostPublishView(plan).flatMap((declaration) => declaration.hooks ?? []).filter((hook) => hook.phase === "postVerify");
139825
+ if (state.status === "VERIFIED" && postVerifyHooks2.length > 0 && deps.postVerifyRelease) {
138766
139826
  postVerifyRanThisCall = true;
138767
139827
  let postVerifyOutcome;
138768
139828
  try {
@@ -138796,7 +139856,7 @@ async function advanceShip(options = {}, injected = {}) {
138796
139856
  }
138797
139857
  const reentryApprovalPaths = options.postpublishApprovalPaths ?? [];
138798
139858
  if (state.status === "VERIFIED" && deps.postVerifyRelease && !postVerifyRanThisCall && (!state.postVerify || state.postVerify.status !== "DISTRIBUTED")) {
138799
- const reentryPlan = JSON.parse(await readFile45(state.planPath, "utf8"));
139859
+ const reentryPlan = JSON.parse(await readFile46(state.planPath, "utf8"));
138800
139860
  const reentryPostVerifyHooks = normalizePostPublishView(reentryPlan).flatMap((declaration) => (declaration.hooks ?? []).map((hook) => ({ hook, unitId: declaration.unitId }))).filter(({ hook }) => hook.phase === "postVerify");
138801
139861
  const approvallessRetryAllowed = reentryApprovalPaths.length === 0 && await allUnclosedPostVerifyHooksUngated(state, reentryPostVerifyHooks, reentryPlan.planVersion);
138802
139862
  if (reentryPostVerifyHooks.length > 0 && (reentryApprovalPaths.length > 0 || approvallessRetryAllowed)) {
@@ -138830,6 +139890,24 @@ async function advanceShip(options = {}, injected = {}) {
138830
139890
  await writeJsonAtomic(statePath, state);
138831
139891
  }
138832
139892
  }
139893
+ if (state.status === "VERIFIED") {
139894
+ const finalPlan = JSON.parse(await readFile46(state.planPath, "utf8"));
139895
+ const hasPostVerify = normalizePostPublishView(finalPlan).some((declaration) => (declaration.hooks ?? []).some((hook) => hook.phase === "postVerify"));
139896
+ const localFinishRunPath = hasPostVerify ? state.postVerify?.status === "DISTRIBUTED" ? state.postVerify.runPath : void 0 : state.verifyRunPath;
139897
+ let postRelease;
139898
+ try {
139899
+ postRelease = derivePostReleaseChecklist(finalPlan, {
139900
+ root,
139901
+ statePath,
139902
+ unitIds: state.selectedUnitIds,
139903
+ runPath: localFinishRunPath,
139904
+ postVerifyComplete: !hasPostVerify || state.postVerify?.status === "DISTRIBUTED"
139905
+ });
139906
+ } catch (error) {
139907
+ postRelease = unavailablePostReleaseChecklist(finalPlan, error);
139908
+ }
139909
+ return publicState2(state, { postRelease });
139910
+ }
138833
139911
  return publicState2(state);
138834
139912
  }
138835
139913
  var HOUR_MS, ACTION_TARGET_FIELDS;
@@ -138841,6 +139919,12 @@ var init_ship = __esm({
138841
139919
  init_postpublish();
138842
139920
  await init_post_release_local();
138843
139921
  init_errors3();
139922
+ __name(normalizeNewShipUnitIds, "normalizeNewShipUnitIds");
139923
+ __name(sameUnitSelection, "sameUnitSelection");
139924
+ __name(sameUnitOrder, "sameUnitOrder");
139925
+ __name(unitScopeMismatch, "unitScopeMismatch");
139926
+ __name(assertFrozenPlanUnitScope, "assertFrozenPlanUnitScope");
139927
+ __name(readFrozenPlanForUnitScope, "readFrozenPlanForUnitScope");
138844
139928
  __name(writeJsonAtomic, "writeJsonAtomic");
138845
139929
  __name(readState, "readState");
138846
139930
  __name(defaultDependencies, "defaultDependencies");
@@ -139795,7 +140879,7 @@ var attest_exports = {};
139795
140879
  __export(attest_exports, {
139796
140880
  recordManualAttestation: () => recordManualAttestation
139797
140881
  });
139798
- import { readFile as readFile46 } from "node:fs/promises";
140882
+ import { readFile as readFile47 } from "node:fs/promises";
139799
140883
  import { resolve as resolve38, join as join39 } from "node:path";
139800
140884
  async function validateInstalledConsumerClosure({
139801
140885
  root,
@@ -139813,7 +140897,7 @@ async function validateInstalledConsumerClosure({
139813
140897
  ]);
139814
140898
  let plan;
139815
140899
  try {
139816
- plan = JSON.parse(await readFile46(planPath, "utf8"));
140900
+ plan = JSON.parse(await readFile47(planPath, "utf8"));
139817
140901
  } catch (error) {
139818
140902
  throw new ReleaseError(
139819
140903
  GATE_FAILED,
@@ -139887,7 +140971,7 @@ async function recordManualAttestation(options = {}, injected = {}) {
139887
140971
  const requirementPath = join39(authorityDir, descriptor.requirementFile);
139888
140972
  let requirement;
139889
140973
  try {
139890
- requirement = JSON.parse(await readFile46(requirementPath, "utf8"));
140974
+ requirement = JSON.parse(await readFile47(requirementPath, "utf8"));
139891
140975
  } catch (error) {
139892
140976
  throw new ReleaseError(
139893
140977
  GATE_FAILED,
@@ -139971,7 +141055,7 @@ var init_attest = __esm({
139971
141055
  });
139972
141056
 
139973
141057
  // src/artifacts/policy.mjs
139974
- import { readFile as readFile47 } from "node:fs/promises";
141058
+ import { readFile as readFile48 } from "node:fs/promises";
139975
141059
  import { join as join40 } from "node:path";
139976
141060
  import { createHash as createHash19 } from "node:crypto";
139977
141061
  function validateArtifactPolicy(policy) {
@@ -140071,7 +141155,7 @@ async function parseSafeYamlWithinRoot(root, policyPath) {
140071
141155
  const fullPath = join40(root, policyPath);
140072
141156
  let content;
140073
141157
  try {
140074
- content = await readFile47(fullPath, "utf8");
141158
+ content = await readFile48(fullPath, "utf8");
140075
141159
  } catch (err) {
140076
141160
  throw new ReleaseError(
140077
141161
  ARTIFACT_POLICY_INVALID,
@@ -140182,7 +141266,7 @@ var init_policy = __esm({
140182
141266
  });
140183
141267
 
140184
141268
  // src/artifacts/entry.mjs
140185
- import { lstat as lstat46, readdir as readdir30, readFile as readFile48 } from "node:fs/promises";
141269
+ import { lstat as lstat46, readdir as readdir30, readFile as readFile49 } from "node:fs/promises";
140186
141270
  import { join as join41 } from "node:path";
140187
141271
  import { promisify as promisify21 } from "node:util";
140188
141272
  import { execFile as execFile14 } from "node:child_process";
@@ -140227,7 +141311,7 @@ async function enumerateTreeEntries(root, dirPath, relBase) {
140227
141311
  const subEntries = await enumerateTreeEntries(root, absPath, relPath);
140228
141312
  entries.push(...subEntries);
140229
141313
  } else {
140230
- const content = await readFile48(absPath);
141314
+ const content = await readFile49(absPath);
140231
141315
  entries.push(
140232
141316
  Object.freeze({
140233
141317
  path: relPath,
@@ -140290,7 +141374,7 @@ async function readEntry({ root, path: path40, source = "worktree" } = {}) {
140290
141374
  { path: path40, nlink: st.nlink }
140291
141375
  );
140292
141376
  }
140293
- const content = await readFile48(absPath);
141377
+ const content = await readFile49(absPath);
140294
141378
  return Object.freeze({
140295
141379
  kind: "regular",
140296
141380
  path: path40,
@@ -140554,7 +141638,7 @@ var init_graph = __esm({
140554
141638
  });
140555
141639
 
140556
141640
  // src/artifacts/producer-registry.mjs
140557
- import { readFile as readFile49, readdir as readdir31, stat as stat19, mkdir as mkdir32, writeFile as writeFile14, rm as rm18 } from "node:fs/promises";
141641
+ import { readFile as readFile50, readdir as readdir31, stat as stat19, mkdir as mkdir32, writeFile as writeFile14, rm as rm18 } from "node:fs/promises";
140558
141642
  import { join as join42 } from "node:path";
140559
141643
  import { mkdtemp as mkdtemp13 } from "node:fs/promises";
140560
141644
  import { tmpdir as tmpdir11 } from "node:os";
@@ -140586,7 +141670,7 @@ async function createBuiltInProducerRegistry() {
140586
141670
  const lockfilePath = join42(new URL("../../..", import.meta.url).pathname, "pnpm-lock.yaml");
140587
141671
  let lockfileBytes;
140588
141672
  try {
140589
- lockfileBytes = await readFile49(lockfilePath);
141673
+ lockfileBytes = await readFile50(lockfilePath);
140590
141674
  } catch {
140591
141675
  lockfileBytes = Buffer.from("");
140592
141676
  }
@@ -140603,7 +141687,7 @@ async function createBuiltInProducerRegistry() {
140603
141687
  const allModuleBytes = await Promise.all(
140604
141688
  allModulePaths.map(async (p) => {
140605
141689
  try {
140606
- return await readFile49(p);
141690
+ return await readFile50(p);
140607
141691
  } catch {
140608
141692
  return Buffer.from("");
140609
141693
  }
@@ -140629,7 +141713,7 @@ async function readDirEntries(dirPath, relBase = "") {
140629
141713
  if (st.isDirectory()) {
140630
141714
  entries.push(...await readDirEntries(absPath, relPath));
140631
141715
  } else {
140632
- const content = await readFile49(absPath);
141716
+ const content = await readFile50(absPath);
140633
141717
  entries.push(Object.freeze({
140634
141718
  path: relPath,
140635
141719
  type: "blob",
@@ -141156,7 +142240,7 @@ var init_state = __esm({
141156
142240
  });
141157
142241
 
141158
142242
  // src/artifacts/artifact-plan.mjs
141159
- import { writeFile as writeFile15, mkdir as mkdir33, readFile as readFile50, rename as rename5, open as open14 } from "node:fs/promises";
142243
+ import { writeFile as writeFile15, mkdir as mkdir33, readFile as readFile51, rename as rename5, open as open14 } from "node:fs/promises";
141160
142244
  import { dirname as dirname23 } from "node:path";
141161
142245
  function assemblePlan({
141162
142246
  operation,
@@ -141845,7 +142929,7 @@ var init_adoption = __esm({
141845
142929
  // src/artifacts/inspect.mjs
141846
142930
  import { promisify as promisify24 } from "node:util";
141847
142931
  import { execFile as execFile17 } from "node:child_process";
141848
- import { readdir as readdir32, stat as stat20, readFile as readFile51 } from "node:fs/promises";
142932
+ import { readdir as readdir32, stat as stat20, readFile as readFile52 } from "node:fs/promises";
141849
142933
  import { join as join43 } from "node:path";
141850
142934
  async function hasNestedGitRoots(root) {
141851
142935
  try {
@@ -142117,7 +143201,7 @@ var init_inspect = __esm({
142117
143201
  });
142118
143202
 
142119
143203
  // src/artifacts/resolution.mjs
142120
- import { mkdir as mkdir34, open as open15, readFile as readFile52, stat as stat21, lstat as lstat47, chmod as chmod6 } from "node:fs/promises";
143204
+ import { mkdir as mkdir34, open as open15, readFile as readFile53, stat as stat21, lstat as lstat47, chmod as chmod6 } from "node:fs/promises";
142121
143205
  import { join as join44, resolve as resolve39, relative as relative31, isAbsolute as isAbsolute27, basename as basename15 } from "node:path";
142122
143206
  function decodeBuffer(value, label) {
142123
143207
  if (value == null) return null;
@@ -142449,7 +143533,7 @@ async function submitResolution({
142449
143533
  async function readAndValidateResolvedFile(resolvedPath) {
142450
143534
  let content;
142451
143535
  try {
142452
- content = await readFile52(resolvedPath);
143536
+ content = await readFile53(resolvedPath);
142453
143537
  } catch (err) {
142454
143538
  throw new ReleaseError(MISSING_PARAMETERS, `cannot read resolved file: ${err.message}`, { resolvedPath, cause: err.code });
142455
143539
  }
@@ -142617,7 +143701,7 @@ var artifacts_exports = {};
142617
143701
  __export(artifacts_exports, {
142618
143702
  runArtifactsCommand: () => runArtifactsCommand
142619
143703
  });
142620
- import { readFile as readFile53 } from "node:fs/promises";
143704
+ import { readFile as readFile54 } from "node:fs/promises";
142621
143705
  import { join as join45 } from "node:path";
142622
143706
  async function runArtifactsCommand({ subcommand, args: args2, root } = {}) {
142623
143707
  if (!VALID_SUBCOMMANDS.has(subcommand)) {
@@ -142746,7 +143830,7 @@ async function handleAdopt({ args: args2, root }) {
142746
143830
  { subcommand: "adopt" }
142747
143831
  );
142748
143832
  }
142749
- const planRaw = await readFile53(planPath, "utf8");
143833
+ const planRaw = await readFile54(planPath, "utf8");
142750
143834
  const plan = JSON.parse(planRaw);
142751
143835
  if (expectedDigest && plan.planDigest !== expectedDigest) {
142752
143836
  throw new ReleaseError(
@@ -142761,7 +143845,7 @@ async function handleAdopt({ args: args2, root }) {
142761
143845
  if (artifact.path) {
142762
143846
  const entry = await readEntry({ root, path: artifact.path, source: "worktree" });
142763
143847
  if (entry.kind === "regular") {
142764
- const bytes = await readFile53(join45(root, artifact.path));
143848
+ const bytes = await readFile54(join45(root, artifact.path));
142765
143849
  currentEntries.set(artifact.id, Object.freeze({ ...entry, bytes, content: bytes }));
142766
143850
  } else {
142767
143851
  currentEntries.set(artifact.id, entry);
@@ -142826,7 +143910,7 @@ async function handleBootstrap({ args: args2, root }) {
142826
143910
  { subcommand: "bootstrap" }
142827
143911
  );
142828
143912
  }
142829
- const planRaw = await readFile53(planPath, "utf8");
143913
+ const planRaw = await readFile54(planPath, "utf8");
142830
143914
  const adoptionPlan = JSON.parse(planRaw);
142831
143915
  const currentEntries = /* @__PURE__ */ new Map();
142832
143916
  for (const id of new Set((adoptionPlan.protectedHunks ?? []).map((h) => h.artifactId))) {
@@ -142838,12 +143922,12 @@ async function handleBootstrap({ args: args2, root }) {
142838
143922
  if (entry.kind !== "regular") {
142839
143923
  throw new ReleaseError("PLAN_STALE", `artifact is no longer a regular file: ${id}`, { id });
142840
143924
  }
142841
- const bytes = await readFile53(join45(root, artifactPath));
143925
+ const bytes = await readFile54(join45(root, artifactPath));
142842
143926
  currentEntries.set(id, Object.freeze({ ...entry, bytes, content: bytes }));
142843
143927
  }
142844
143928
  let replacementBytes;
142845
143929
  if (action === "replace" && replacementPath) {
142846
- replacementBytes = await readFile53(replacementPath);
143930
+ replacementBytes = await readFile54(replacementPath);
142847
143931
  }
142848
143932
  const updated = await discardBootstrapHunk({
142849
143933
  adoptionPlan,
@@ -142881,7 +143965,7 @@ async function handleResolve({ args: args2, root }) {
142881
143965
  { subcommand: "resolve" }
142882
143966
  );
142883
143967
  }
142884
- const planRaw = await readFile53(planPath, "utf8");
143968
+ const planRaw = await readFile54(planPath, "utf8");
142885
143969
  const plan = JSON.parse(planRaw);
142886
143970
  if (plan.planDigest !== expectedDigest) {
142887
143971
  throw new ReleaseError(
@@ -143699,7 +144783,7 @@ __export(route_exports, {
143699
144783
  resolvePreviousReleaseCommit: () => resolvePreviousReleaseCommit
143700
144784
  });
143701
144785
  import { execFileSync } from "node:child_process";
143702
- import { lstat as lstat48, readdir as readdir33, readFile as readFile54 } from "node:fs/promises";
144786
+ import { lstat as lstat48, readdir as readdir33, readFile as readFile55 } from "node:fs/promises";
143703
144787
  import { relative as relative32, resolve as resolve40, basename as basename16, dirname as dirname24, join as join46 } from "node:path";
143704
144788
  function classifyPath(path40) {
143705
144789
  if (typeof path40 !== "string" || path40.length === 0) return "ignore";
@@ -143786,7 +144870,7 @@ async function resolvePreviousReleaseCommit(root) {
143786
144870
  if (!file.endsWith(".json")) continue;
143787
144871
  let plan;
143788
144872
  try {
143789
- plan = JSON.parse(await readFile54(resolve40(plansDir, file), "utf8"));
144873
+ plan = JSON.parse(await readFile55(resolve40(plansDir, file), "utf8"));
143790
144874
  } catch {
143791
144875
  continue;
143792
144876
  }
@@ -143912,7 +144996,7 @@ async function readRunRouting(root, options = {}) {
143912
144996
  let authorityMissing = false;
143913
144997
  let markerlessRunDebris = false;
143914
144998
  try {
143915
- await readFile54(runPath);
144999
+ await readFile55(runPath);
143916
145000
  authorityExists = true;
143917
145001
  } catch (error) {
143918
145002
  if (error.code === "ENOENT") {
@@ -144067,7 +145151,7 @@ async function isMarkerlessRunDebris(runDirectory) {
144067
145151
  const evidenceFiles = await readDirectory(join46(runDirectory, "evidence", evidenceEntry.name));
144068
145152
  if (!evidenceFiles || evidenceFiles.length !== 1 || evidenceFiles[0].name !== "release-skill-install-evidence.json" || !evidenceFiles[0].isFile() || evidenceFiles[0].isSymbolicLink()) return false;
144069
145153
  try {
144070
- const evidenceRecord = JSON.parse(await readFile54(
145154
+ const evidenceRecord = JSON.parse(await readFile55(
144071
145155
  join46(runDirectory, "evidence", evidenceEntry.name, evidenceFiles[0].name),
144072
145156
  "utf8"
144073
145157
  ));
@@ -144152,8 +145236,8 @@ async function isProvenPreAuthorityFailure(runDir, runName) {
144152
145236
  let summary;
144153
145237
  let events;
144154
145238
  try {
144155
- summary = JSON.parse(await readFile54(summaryPath, "utf8"));
144156
- events = (await readFile54(evidencePath, "utf8")).trim().split("\n").filter(Boolean).map((line) => JSON.parse(line));
145239
+ summary = JSON.parse(await readFile55(summaryPath, "utf8"));
145240
+ events = (await readFile55(evidencePath, "utf8")).trim().split("\n").filter(Boolean).map((line) => JSON.parse(line));
144157
145241
  } catch {
144158
145242
  return false;
144159
145243
  }
@@ -144238,7 +145322,7 @@ async function readLegacyPostverifyRecovery(runPath) {
144238
145322
  if (run6.command !== "postverify" || run6.status !== "DISTRIBUTED") {
144239
145323
  throw new ReleaseError(GATE_FAILED, "legacy postverify status is not terminal DISTRIBUTED");
144240
145324
  }
144241
- const planRaw = await readFile54(run6.planPath, "utf8");
145325
+ const planRaw = await readFile55(run6.planPath, "utf8");
144242
145326
  const plan = JSON.parse(planRaw);
144243
145327
  validatePlan(plan);
144244
145328
  if (!plan.digest || plan.digest !== computePlanDigest(plan)) {
@@ -144269,7 +145353,7 @@ async function readLegacyPostverifyRecovery(runPath) {
144269
145353
  runPath: run6.sourceRunPath,
144270
145354
  production
144271
145355
  });
144272
- const summary = JSON.parse(await readFile54(join46(resolve40(runPath, ".."), "summary.json"), "utf8"));
145356
+ const summary = JSON.parse(await readFile55(join46(resolve40(runPath, ".."), "summary.json"), "utf8"));
144273
145357
  if (!summary || summary.status !== run6.status) {
144274
145358
  throw new ReleaseError(GATE_FAILED, "legacy postverify summary status does not match its sealed run status");
144275
145359
  }
@@ -144643,7 +145727,7 @@ Workflow Profiles:
144643
145727
  });
144644
145728
 
144645
145729
  // bin/release-skill-cli.mjs
144646
- import { readFile as readFile55 } from "node:fs/promises";
145730
+ import { readFile as readFile56 } from "node:fs/promises";
144647
145731
  import { basename as basename17, dirname as dirname25, join as join47, resolve as resolve41 } from "node:path";
144648
145732
  import { execFile as execFileCb22 } from "node:child_process";
144649
145733
  import { promisify as promisify26 } from "node:util";
@@ -144726,6 +145810,27 @@ async function exitAfterFlush(exitCode) {
144726
145810
  process.exit(exitCode);
144727
145811
  }
144728
145812
  __name(exitAfterFlush, "exitAfterFlush");
145813
+ function publicErrorDetails(error) {
145814
+ const details = error?.details;
145815
+ if (!details || typeof details !== "object" || Array.isArray(details)) return {};
145816
+ const output = {};
145817
+ if (details.cause && typeof details.cause === "object" && !Array.isArray(details.cause)) {
145818
+ const cause = {};
145819
+ if (typeof details.cause.code === "string") cause.code = details.cause.code;
145820
+ if (typeof details.cause.message === "string") cause.message = details.cause.message;
145821
+ if (Object.keys(cause).length > 0) output.cause = cause;
145822
+ }
145823
+ if (Array.isArray(details.nextSteps)) {
145824
+ const nextSteps = details.nextSteps.filter((step) => step && typeof step === "object" && !Array.isArray(step)).map((step) => ({
145825
+ ...typeof step.code === "string" ? { code: step.code } : {},
145826
+ ...typeof step.message === "string" ? { message: step.message } : {},
145827
+ ...Array.isArray(step.argv) && step.argv.every((arg) => typeof arg === "string") ? { argv: [...step.argv] } : {}
145828
+ })).filter((step) => Object.keys(step).length > 0);
145829
+ if (nextSteps.length > 0) output.nextSteps = nextSteps;
145830
+ }
145831
+ return output;
145832
+ }
145833
+ __name(publicErrorDetails, "publicErrorDetails");
144729
145834
  async function checkDependency(command2, versionArgs = ["--version"]) {
144730
145835
  try {
144731
145836
  const { stdout } = await execFile19(command2, versionArgs, {
@@ -144942,7 +146047,7 @@ Options:
144942
146047
  performs an append-only hooks edit of an existing config (create-once is untouched)
144943
146048
  --select-hooks <ids> Comma-separated proposal ids to adopt (propose-hooks mode)
144944
146049
  --foundation-profile <path> Explicit foundation postPublish profile JSON (proposal input only; never auto-applied)
144945
- --unit <id> Release unit whose declared release documents are refreshed (docs refresh)
146050
+ --unit <id> Select a release unit for prepare/ship (repeatable); docs refresh accepts one unit
144946
146051
  --confirm-refresh <sha256:...> Confirm the exact dry-run refreshDigest before any document write
144947
146052
  --ack-local-document-write Acknowledge the explicit local release-document write (docs refresh --write)
144948
146053
  --platform <id> Legacy attestation platform: kimi or codebuddy
@@ -145117,6 +146222,7 @@ if (command === "ship" && (args.includes("--help") || args.includes("-h"))) {
145117
146222
  options: {
145118
146223
  targetVersion: "--target-version <version>",
145119
146224
  state: "--state <path>",
146225
+ unit: "--unit <id> (repeatable before plan freeze)",
145120
146226
  approve: "--approve --actor <name>"
145121
146227
  },
145122
146228
  message: "Repeat the same command to resume from the same state. For parallel or cross-session versions, use .release-skill/ships/<version>.json."
@@ -145130,6 +146236,7 @@ Usage:
145130
146236
  Options:
145131
146237
  --target-version <version> Specify the target version
145132
146238
  --state <path> Specify the durable state file
146239
+ --unit <id> Select a release unit before plan freeze (repeatable)
145133
146240
  --approve --actor <name> Approve the plan bound to the current state
145134
146241
 
145135
146242
  Repeat the same command to resume from the same state.
@@ -145324,6 +146431,7 @@ function printShipApprovalSummary(result2) {
145324
146431
  const summary = result2.approvalSummary;
145325
146432
  if (!summary) return;
145326
146433
  console.log("Approval summary:");
146434
+ console.log(` This approval covers only these release units: ${(summary.units ?? []).map((unit) => unit.id).join(", ") || "none"}`);
145327
146435
  for (const unit of summary.units ?? []) {
145328
146436
  console.log(` Unit ${unit.id} ${unit.targetVersion}`);
145329
146437
  console.log(` Public repo: ${unit.publicRepo}`);
@@ -145354,6 +146462,13 @@ if (command === "ship") {
145354
146462
  return idx !== -1 && args[idx + 1] ? args[idx + 1] : void 0;
145355
146463
  }, "value");
145356
146464
  const root = resolve41(value("--root") ?? process.cwd());
146465
+ const hasUnitSelection = args.includes("--unit");
146466
+ const unitIds = [];
146467
+ for (let i = 0; i < args.length; i += 1) {
146468
+ if (args[i] === "--unit") {
146469
+ unitIds.push(args[i + 1] && !args[i + 1].startsWith("--") ? args[i + 1] : "");
146470
+ }
146471
+ }
145357
146472
  const postpublishApprovalPaths = [];
145358
146473
  for (let i = 0; i < args.length; i += 1) {
145359
146474
  if (args[i] === "--hook-approval" && args[i + 1]) {
@@ -145393,6 +146508,7 @@ if (command === "ship") {
145393
146508
  planApprovalDigest: value("--approve-plan"),
145394
146509
  actor: value("--actor"),
145395
146510
  adapterRegistry,
146511
+ ...hasUnitSelection ? { unitIds } : {},
145396
146512
  ...postpublishApprovalPaths.length > 0 ? { postpublishApprovalPaths } : {}
145397
146513
  });
145398
146514
  if (hasJson) {
@@ -145423,9 +146539,15 @@ if (command === "ship") {
145423
146539
  } else {
145424
146540
  console.log("Post-release: branch advancement was already included; skip the merge question.");
145425
146541
  }
145426
- if (result2.postRelease.localHostUpdate?.promptRequired) {
146542
+ const localHostUpdate = result2.postRelease.localHostUpdate;
146543
+ if (localHostUpdate?.available === true && typeof localHostUpdate.runPath === "string") {
145427
146544
  console.log(`Post-release: ask whether to update local host plugins (${result2.postRelease.localHostUpdate.hosts.join(", ")}).`);
145428
- console.log(`Post-release command: release-skill post-release --plan ${result2.planPath} --run ${result2.verifyRunPath}`);
146545
+ console.log(`Post-release command: release-skill post-release --plan ${result2.planPath} --run ${localHostUpdate.runPath}`);
146546
+ console.log("Choose --hosts before adding --update-local-hosts to perform a local update.");
146547
+ } else {
146548
+ for (const step of localHostUpdate?.nextSteps ?? []) {
146549
+ console.log(`Next [${step.code}] ${step.message} (${step.argv.join(" ")})`);
146550
+ }
145429
146551
  }
145430
146552
  }
145431
146553
  for (const followUp of result2.manualFollowUps ?? []) {
@@ -145515,6 +146637,13 @@ if (command === "prepare") {
145515
146637
  const output = outputIdx !== -1 && args[outputIdx + 1] ? resolve41(args[outputIdx + 1]) : void 0;
145516
146638
  const runDirIdx = args.indexOf("--run-dir");
145517
146639
  const runDir = runDirIdx !== -1 && args[runDirIdx + 1] ? resolve41(args[runDirIdx + 1]) : void 0;
146640
+ const hasUnitSelection = args.includes("--unit");
146641
+ const unitIds = [];
146642
+ for (let i = 0; i < args.length; i += 1) {
146643
+ if (args[i] === "--unit") {
146644
+ unitIds.push(args[i + 1] && !args[i + 1].startsWith("--") ? args[i + 1] : "");
146645
+ }
146646
+ }
145518
146647
  try {
145519
146648
  const { prepareRelease: prepareRelease2 } = await init_prepare().then(() => prepare_exports);
145520
146649
  const { readFile: readFileFs } = await import("node:fs/promises");
@@ -145529,7 +146658,8 @@ if (command === "prepare") {
145529
146658
  workflow,
145530
146659
  testSelection,
145531
146660
  output,
145532
- runDir
146661
+ runDir,
146662
+ ...hasUnitSelection ? { unitIds } : {}
145533
146663
  });
145534
146664
  const planContent = await readFileFs(result2.planPath, "utf8");
145535
146665
  const plan = JSON.parse(planContent);
@@ -145553,7 +146683,8 @@ if (command === "prepare") {
145553
146683
  unitId: action.unitId
145554
146684
  })),
145555
146685
  warnings: result2.warnings,
145556
- nextSteps: result2.nextSteps ?? []
146686
+ nextSteps: result2.nextSteps ?? [],
146687
+ ...result2.releaseScope ? { releaseScope: result2.releaseScope } : {}
145557
146688
  }, null, 2));
145558
146689
  } else {
145559
146690
  for (const warning of result2.warnings) {
@@ -145563,7 +146694,11 @@ if (command === "prepare") {
145563
146694
  console.log(`Plan digest: ${result2.planDigest}`);
145564
146695
  console.log(`Evidence: ${result2.evidenceDir}`);
145565
146696
  for (const step of result2.nextSteps ?? []) {
145566
- console.log(`Next [${step.code}] ${step.message}`);
146697
+ console.log(`Next [${step.code}] ${step.message}${step.argv ? ` (${step.argv.join(" ")})` : ""}`);
146698
+ }
146699
+ if (result2.releaseScope) {
146700
+ console.log(`Release scope: ${result2.releaseScope.selectedUnitIds.join(", ")}`);
146701
+ console.log(`Deferred units: ${result2.releaseScope.deferredUnitIds.join(", ") || "none"}`);
145567
146702
  }
145568
146703
  if (plan.workflowKind && plan.workflowKind !== "full") {
145569
146704
  console.log(`Workflow: ${plan.workflowKind}`);
@@ -145756,55 +146891,68 @@ if (command === "post-release") {
145756
146891
  const planPath = value("--plan") ? resolve41(value("--plan")) : void 0;
145757
146892
  const runPath = value("--run") ? resolve41(value("--run")) : void 0;
145758
146893
  if (!planPath || !runPath) {
145759
- const message = "post-release requires --plan <path> and --run <verified-run-path>";
146894
+ const message = "post-release requires --plan <path> and --run <verify-or-postverify-run-path>";
145760
146895
  if (hasJson) console.log(JSON.stringify({ error: "MISSING_PARAMETERS", message, exitCode: 1 }));
145761
146896
  else console.error(`Error: ${message}`);
145762
146897
  await exitAfterFlush(1);
145763
146898
  }
145764
146899
  try {
145765
146900
  const {
145766
- assertVerifiedReleaseRun: assertVerifiedReleaseRun2,
145767
146901
  derivePostReleaseChecklist: derivePostReleaseChecklist2,
145768
146902
  updateLocalHostPlugins: updateLocalHostPlugins2
145769
146903
  } = await init_post_release_local().then(() => post_release_local_exports);
145770
146904
  const { validatePlan: validatePlan2 } = await init_plan().then(() => plan_exports);
145771
146905
  const {
145772
146906
  loadRun: loadRun2,
145773
- resolveRunPath: resolveRunPath2,
145774
- validateRunLineage: validateRunLineage2
146907
+ resolveRunPath: resolveRunPath2
145775
146908
  } = await init_run().then(() => run_exports);
145776
- const plan = JSON.parse(await readFile55(planPath, "utf8"));
146909
+ const plan = JSON.parse(await readFile56(planPath, "utf8"));
145777
146910
  validatePlan2(plan);
146911
+ const updateRequested = args.includes("--update-local-hosts");
145778
146912
  const resolvedRunPath = await resolveRunPath2(runPath);
145779
146913
  const runRecord = await loadRun2(resolvedRunPath, {
145780
146914
  requireDigest: true,
145781
146915
  authorityPlanPath: planPath
145782
146916
  });
145783
- await validateRunLineage2(runRecord, {
145784
- plan,
145785
- planPath,
145786
- runPath: resolvedRunPath,
145787
- production: Boolean(plan.production)
145788
- });
145789
- assertVerifiedReleaseRun2(plan, runRecord);
145790
- const updateRequested = args.includes("--update-local-hosts");
146917
+ if (!updateRequested) {
146918
+ const { assertLocalFinishRun: assertLocalFinishRun2 } = await init_post_release_local().then(() => post_release_local_exports);
146919
+ await assertLocalFinishRun2({
146920
+ plan,
146921
+ planPath,
146922
+ runPath: resolvedRunPath,
146923
+ runRecord,
146924
+ production: Boolean(plan.production),
146925
+ root: resolve41(value("--root") ?? process.cwd())
146926
+ });
146927
+ }
145791
146928
  const hostsIndex = args.indexOf("--hosts");
145792
146929
  const rawHosts = hostsIndex !== -1 && args[hostsIndex + 1] && !args[hostsIndex + 1].startsWith("--") ? args[hostsIndex + 1] : "";
145793
146930
  const selectedHosts = rawHosts.split(",").map((host) => host.trim()).filter(Boolean);
145794
146931
  const result2 = updateRequested ? await updateLocalHostPlugins2({
145795
- plan,
146932
+ planPath,
146933
+ runPath: resolvedRunPath,
145796
146934
  root: resolve41(value("--root") ?? process.cwd()),
145797
146935
  confirmPlanDigest: value("--confirm-plan"),
145798
146936
  selectedHosts
145799
- }) : derivePostReleaseChecklist2(plan);
146937
+ }) : derivePostReleaseChecklist2(plan, {
146938
+ runPath: runRecord.command === "postverify" && runRecord.status === "DISTRIBUTED" ? resolvedRunPath : runRecord.command === "verify" ? resolvedRunPath : void 0,
146939
+ root: resolve41(value("--root") ?? process.cwd()),
146940
+ postVerifyComplete: runRecord.command === "postverify" && runRecord.status === "DISTRIBUTED"
146941
+ });
145800
146942
  if (hasJson) {
145801
146943
  console.log(JSON.stringify(result2, null, 2));
145802
146944
  } else if (!updateRequested) {
145803
146945
  console.log(`Post-release status: ${result2.status}`);
145804
146946
  if (result2.merge.promptRequired) console.log("Ask whether the user wants to merge the remaining branch.");
145805
146947
  else console.log("Branch advancement was already included in the release workflow; skip the merge question.");
145806
- if (result2.localHostUpdate.promptRequired) {
146948
+ if (result2.localHostUpdate.available === true && typeof result2.localHostUpdate.runPath === "string") {
145807
146949
  console.log(`Ask whether to update local host plugins: ${result2.localHostUpdate.hosts.join(", ")}`);
146950
+ console.log(`Post-release command: release-skill post-release --plan ${planPath} --run ${result2.localHostUpdate.runPath}`);
146951
+ console.log("Choose --hosts before adding --update-local-hosts to perform a local update.");
146952
+ } else {
146953
+ for (const step of result2.localHostUpdate.nextSteps ?? []) {
146954
+ console.log(`Next [${step.code}] ${step.message} (${step.argv.join(" ")})`);
146955
+ }
145808
146956
  }
145809
146957
  } else {
145810
146958
  console.log(`Local host update: ${result2.status}`);
@@ -145820,9 +146968,15 @@ if (command === "post-release") {
145820
146968
  console.log(JSON.stringify({
145821
146969
  error: err.code ?? "POST_RELEASE_FAILED",
145822
146970
  message: err.message,
146971
+ details: publicErrorDetails(err),
145823
146972
  exitCode: err.exitCode ?? 1
145824
146973
  }));
145825
- } else console.error(`Error: ${err.message}`);
146974
+ } else {
146975
+ console.error(`Error: ${err.message}`);
146976
+ for (const step of err.details?.nextSteps ?? []) {
146977
+ console.error(`Next [${step.code}] ${step.message} (${step.argv.join(" ")})`);
146978
+ }
146979
+ }
145826
146980
  await exitAfterFlush(err.exitCode ?? 1);
145827
146981
  }
145828
146982
  }
@@ -145869,9 +147023,9 @@ if (command === "verify") {
145869
147023
  derivePostReleaseChecklist: derivePostReleaseChecklist2,
145870
147024
  unavailablePostReleaseChecklist: unavailablePostReleaseChecklist2
145871
147025
  } = await init_post_release_local().then(() => post_release_local_exports);
145872
- const plan = JSON.parse(await readFile55(planPath, "utf8"));
147026
+ const plan = JSON.parse(await readFile56(planPath, "utf8"));
145873
147027
  try {
145874
- result2.postRelease = derivePostReleaseChecklist2(plan);
147028
+ result2.postRelease = derivePostReleaseChecklist2(plan, { root, runPath: result2.runPath });
145875
147029
  } catch (error) {
145876
147030
  result2.postRelease = unavailablePostReleaseChecklist2(plan, error);
145877
147031
  }
@@ -145896,8 +147050,14 @@ if (command === "verify") {
145896
147050
  } else if (result2.postRelease?.merge.promptRequired) {
145897
147051
  console.log("Post-release: ask whether to merge the remaining branch.");
145898
147052
  }
145899
- if (result2.postRelease?.localHostUpdate.promptRequired) {
147053
+ if (result2.postRelease?.localHostUpdate?.available === true && typeof result2.postRelease.localHostUpdate.runPath === "string") {
145900
147054
  console.log(`Post-release: ask whether to update local host plugins (${result2.postRelease.localHostUpdate.hosts.join(", ")}).`);
147055
+ console.log(`Post-release command: release-skill post-release --plan ${planPath} --run ${result2.postRelease.localHostUpdate.runPath}`);
147056
+ console.log("Choose --hosts before adding --update-local-hosts to perform a local update.");
147057
+ } else {
147058
+ for (const step of result2.postRelease?.localHostUpdate?.nextSteps ?? []) {
147059
+ console.log(`Next [${step.code}] ${step.message} (${step.argv.join(" ")})`);
147060
+ }
145901
147061
  }
145902
147062
  }
145903
147063
  await exitAfterFlush(result2.status === "VERIFIED" ? 0 : 1);
@@ -145906,6 +147066,7 @@ if (command === "verify") {
145906
147066
  const errOutput = {
145907
147067
  error: err.code ?? "UNKNOWN_ERROR",
145908
147068
  message: err.message,
147069
+ details: err.details ?? {},
145909
147070
  exitCode: err.exitCode ?? 1
145910
147071
  };
145911
147072
  console.log(JSON.stringify(errOutput));