@adea-ai/app-framework-release-tools 0.7.0 → 0.8.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/cli.js CHANGED
@@ -36,6 +36,7 @@ __export(exports_src, {
36
36
  fileIdentity: () => fileIdentity2,
37
37
  finalizeReleasePleaseDraft: () => finalizeReleasePleaseDraft,
38
38
  inspectDailyBatch: () => inspectDailyBatch,
39
+ inspectDailyPreSigning: () => inspectDailyPreSigning,
39
40
  inspectStagedStep: () => inspectStagedStep,
40
41
  planDailyReleaseMatrix: () => planDailyReleaseMatrix,
41
42
  planQualificationRun: () => planQualificationRun2,
@@ -4127,6 +4128,7 @@ import { join as join10 } from "path";
4127
4128
  import { Effect as Effect17 } from "effect";
4128
4129
 
4129
4130
  // src/library/daily-matrix.ts
4131
+ import { createHash as createHash11 } from "crypto";
4130
4132
  import { join as join9 } from "path";
4131
4133
  import { Effect as Effect16 } from "effect";
4132
4134
 
@@ -4417,30 +4419,43 @@ function readNativeReceipt(path, label) {
4417
4419
  const after = await file.stat();
4418
4420
  if (!sameFile(before, after) || before.ctimeMs !== after.ctimeMs)
4419
4421
  throw new Error("Native receipt changed during read");
4420
- return bytes.toString("utf8");
4422
+ return bytes;
4421
4423
  });
4422
4424
  return yield* attempt(() => {
4423
4425
  try {
4424
- return JSON.parse(data);
4426
+ return {
4427
+ value: JSON.parse(new TextDecoder("utf-8", { fatal: true }).decode(data)),
4428
+ size: data.length,
4429
+ digest: "sha256:" + createHash11("sha256").update(data).digest("hex")
4430
+ };
4425
4431
  } catch {
4426
4432
  throw new Error(`Invalid native receipt JSON: ${label}`);
4427
4433
  }
4428
4434
  });
4429
4435
  }).pipe(Effect16.scoped);
4430
4436
  }
4431
- var verifyDailyReleaseMatrixEffect = (options) => Effect16.gen(function* () {
4437
+ var verifiedMatrix = (options, verifyPrior) => Effect16.gen(function* () {
4432
4438
  const { config, identity, artifacts, receipts } = options;
4433
4439
  const { tag } = identity;
4434
4440
  yield* attempt(() => assertDailyIdentity(identity));
4435
4441
  const matrix = yield* attempt(() => planDailyReleaseMatrix(config, tag));
4436
- yield* exactDirectory(artifacts, matrix.assets);
4437
- yield* exactDirectory(receipts, matrix.checks.map((c) => c.name + ".json"));
4442
+ if (verifyPrior && matrix.profile !== expandedDesktopDailyProfile)
4443
+ return yield* fail("Pre-signing validation requires the expanded Daily profile");
4444
+ const payloadNames = new Set(matrix.checks.flatMap((check) => check.assets));
4445
+ const selected = verifyPrior ? matrix.assets.filter((name) => payloadNames.has(name)) : matrix.assets;
4446
+ const receiptNames = matrix.checks.map((check) => check.name + ".json");
4447
+ yield* exactDirectory(artifacts, selected);
4448
+ yield* exactDirectory(receipts, receiptNames);
4438
4449
  const inventory = new Map;
4439
- for (const name of matrix.assets)
4450
+ const checkedReceipts = [];
4451
+ const claims = [];
4452
+ for (const name of selected)
4440
4453
  inventory.set(name, yield* fileIdentityEffect(join9(artifacts, name), name));
4441
4454
  for (const check of matrix.checks) {
4442
- const r = yield* readNativeReceipt(join9(receipts, check.name + ".json"), check.name);
4443
- yield* attempt(() => validateDailyNativeEvidence(r, "framework/daily-native-receipt/v2", {
4455
+ const filename = check.name + ".json";
4456
+ const raw = yield* readNativeReceipt(join9(receipts, filename), check.name);
4457
+ checkedReceipts.push({ name: filename, size: raw.size, digest: raw.digest });
4458
+ const valid = yield* attempt(() => validateDailyNativeEvidence(raw.value, "framework/daily-native-receipt/v2", {
4444
4459
  appId: matrix.appId,
4445
4460
  profile: matrix.profile,
4446
4461
  signing: requiresDailyInstallerSigning(matrix.profile, check) ? installerSigningPolicy(config, check) : undefined,
@@ -4449,14 +4464,57 @@ var verifyDailyReleaseMatrixEffect = (options) => Effect16.gen(function* () {
4449
4464
  assets: check.assets.map((name) => inventory.get(name)),
4450
4465
  baselineNames: (priorTag) => priorDailyInstallerNames(config, priorTag, check)
4451
4466
  }));
4467
+ if (verifyPrior && "upgrade" in valid.observations) {
4468
+ const claim = {
4469
+ appId: matrix.appId,
4470
+ check: check.name,
4471
+ platform: check.platform,
4472
+ upgrade: valid.observations.upgrade,
4473
+ ...valid.installerSigning ? { installerSigning: valid.installerSigning } : {}
4474
+ };
4475
+ claims.push(claim);
4476
+ }
4477
+ }
4478
+ const assets = [...inventory.values()];
4479
+ if (verifyPrior) {
4480
+ for (const claim of claims)
4481
+ if ((yield* step(() => verifyPrior(claim))) !== true)
4482
+ return yield* fail("Prior Daily installer or payload is not independently authorized");
4483
+ yield* exactDirectory(artifacts, selected);
4484
+ yield* exactDirectory(receipts, receiptNames);
4485
+ for (const [root, files] of [
4486
+ [artifacts, assets],
4487
+ [receipts, checkedReceipts]
4488
+ ]) {
4489
+ for (const expected of files) {
4490
+ const actual = yield* fileIdentityEffect(join9(root, expected.name), expected.name);
4491
+ if (actual.digest !== expected.digest || actual.size !== expected.size)
4492
+ return yield* fail("Daily pre-signing input changed during validation");
4493
+ }
4494
+ }
4452
4495
  }
4496
+ return { profile: matrix.profile, appId: matrix.appId, identity, assets, checkedReceipts };
4497
+ });
4498
+ var verifyDailyReleaseMatrixEffect = (options) => Effect16.map(verifiedMatrix(options), ({ profile, appId, identity, assets }) => ({
4499
+ profile,
4500
+ appId,
4501
+ identity,
4502
+ assets
4503
+ }));
4504
+ var inspectDailyPreSigningEffect = (options, verifyPrior) => Effect16.gen(function* () {
4505
+ if (typeof verifyPrior !== "function")
4506
+ return yield* fail("Expected an independent prior verifier");
4507
+ const { checkedReceipts, ...payloads } = yield* verifiedMatrix(options, verifyPrior);
4453
4508
  return {
4454
- profile: matrix.profile,
4455
- appId: matrix.appId,
4456
- identity,
4457
- assets: [...inventory.values()]
4509
+ ...payloads,
4510
+ receipts: checkedReceipts,
4511
+ descriptorSigningAuthorized: false,
4512
+ promotionAuthorized: false
4458
4513
  };
4459
4514
  });
4515
+ function inspectDailyPreSigning(options, verifyPrior) {
4516
+ return runReleaseLibrary(provideLibraryPorts()(inspectDailyPreSigningEffect(options, verifyPrior)));
4517
+ }
4460
4518
  function verifyDailyReleaseMatrix(options) {
4461
4519
  return runReleaseLibrary(provideLibraryPorts()(verifyDailyReleaseMatrixEffect(options)));
4462
4520
  }
@@ -4654,7 +4712,7 @@ function createDailyNativeReceipt(options) {
4654
4712
  })));
4655
4713
  }
4656
4714
  // src/library/linux-reproducibility.ts
4657
- import { createHash as createHash11 } from "crypto";
4715
+ import { createHash as createHash12 } from "crypto";
4658
4716
  import { lstat as lstat6, readFile as readFile6, readdir as readdir5, realpath } from "fs/promises";
4659
4717
  import { isAbsolute as isAbsolute2, join as join12, resolve as resolve6 } from "path";
4660
4718
 
@@ -4784,7 +4842,7 @@ async function compareLinuxReproducibility(rawInput) {
4784
4842
  observed.push({ path, file });
4785
4843
  check2(file.size <= 65536, "Producer receipt is too large");
4786
4844
  const bytes = await readFile6(path);
4787
- check2(bytes.length === file.size && createHash11("sha256").update(bytes).digest("hex") === file.sha256, "Producer receipt changed");
4845
+ check2(bytes.length === file.size && createHash12("sha256").update(bytes).digest("hex") === file.sha256, "Producer receipt changed");
4788
4846
  let receipt;
4789
4847
  try {
4790
4848
  receipt = JSON.parse(bytes.toString("utf8"));
@@ -4930,7 +4988,7 @@ function createMacosDmg(options) {
4930
4988
  import { Effect as Effect22 } from "effect";
4931
4989
 
4932
4990
  // src/library/local-release.ts
4933
- import { createHash as createHash13 } from "crypto";
4991
+ import { createHash as createHash14 } from "crypto";
4934
4992
  import { constants as constants3 } from "fs";
4935
4993
  import { dirname as dirname2, join as join15, resolve as resolve9 } from "path";
4936
4994
  import { Cause as Cause2, Effect as Effect21, Exit as Exit3 } from "effect";
@@ -5100,7 +5158,7 @@ function createFeedReleaseCutProvider(options) {
5100
5158
  }
5101
5159
 
5102
5160
  // src/library/feed-state.ts
5103
- import { createHash as createHash12 } from "crypto";
5161
+ import { createHash as createHash13 } from "crypto";
5104
5162
  import { Effect as Effect20 } from "effect";
5105
5163
 
5106
5164
  // ../../src/shared/discard-stream.ts
@@ -5348,7 +5406,7 @@ var verifyFeedReleaseEffect = (options) => Effect20.gen(function* () {
5348
5406
  if (!listed)
5349
5407
  return yield* fail(`Missing signed descriptor: ${policy.name}`);
5350
5408
  const bytes = yield* feedObject(feed, `${tag}/${policy.name}`, 65536);
5351
- if (!bytes || bytes.length !== listed.size || createHash12("sha256").update(bytes).digest("hex") !== listed.sha256)
5409
+ if (!bytes || bytes.length !== listed.size || createHash13("sha256").update(bytes).digest("hex") !== listed.sha256)
5352
5410
  return yield* fail(`Signed descriptor differs from its release: ${policy.name}`);
5353
5411
  const verified = verifyReleaseDescriptor(json(bytes), {
5354
5412
  appId: policy.appId,
@@ -5492,7 +5550,7 @@ var jsonBytes = (value) => Buffer.from(JSON.stringify(value, null, 2) + `
5492
5550
  var describe = (key, bytes, cacheControl) => ({
5493
5551
  key,
5494
5552
  size: bytes.length,
5495
- sha256: createHash13("sha256").update(bytes).digest("hex"),
5553
+ sha256: createHash14("sha256").update(bytes).digest("hex"),
5496
5554
  contentType: "application/json",
5497
5555
  cacheControl
5498
5556
  });
@@ -5581,7 +5639,7 @@ var stageLocalReleaseEffect = (options) => Effect21.gen(function* () {
5581
5639
  if (artifact.size > 65536)
5582
5640
  return yield* fail("Signed descriptor is too large");
5583
5641
  const bytes = yield* step(() => fs.readFile(join15(directory, policy.name)));
5584
- if ("sha256:" + createHash13("sha256").update(bytes).digest("hex") !== artifact.digest)
5642
+ if ("sha256:" + createHash14("sha256").update(bytes).digest("hex") !== artifact.digest)
5585
5643
  return yield* fail("Signed descriptor changed");
5586
5644
  let parsed;
5587
5645
  try {
@@ -5940,12 +5998,12 @@ var selectRetainedReleaseBuildEffect = (options) => Effect23.gen(function* () {
5940
5998
  });
5941
5999
  var selectRetainedReleaseBuild = (options) => runReleaseLibrary(provideLibraryPorts({ run: planGitHubRun(options.env, options.run) })(selectRetainedReleaseBuildEffect(options)));
5942
6000
  // src/library/staging.ts
5943
- import { createHash as createHash14 } from "crypto";
6001
+ import { createHash as createHash15 } from "crypto";
5944
6002
  import { join as join16, resolve as resolve10 } from "path";
5945
6003
  import { Effect as Effect24 } from "effect";
5946
6004
  var copyHashed = (input, output, size) => Effect24.tryPromise({
5947
6005
  try: async (signal) => {
5948
- const hash = createHash14("sha256");
6006
+ const hash = createHash15("sha256");
5949
6007
  let copied = 0;
5950
6008
  for await (const chunk of input.createReadStream({
5951
6009
  autoClose: false
@@ -6015,7 +6073,7 @@ import { join as join36 } from "path";
6015
6073
  import { Effect as Effect25 } from "effect";
6016
6074
 
6017
6075
  // ../../src/installer/installer-archive-members.ts
6018
- import { createHash as createHash15 } from "crypto";
6076
+ import { createHash as createHash16 } from "crypto";
6019
6077
  import { lstat as lstat7, open as open5 } from "fs/promises";
6020
6078
  import { isAbsolute as isAbsolute4, relative as relative4, sep as sep2 } from "path";
6021
6079
 
@@ -6122,7 +6180,7 @@ async function assertEmbeddedArchive(path, size, archive) {
6122
6180
  const position = size - archive.size - marker.length, actual = Buffer.alloc(marker.length);
6123
6181
  if ((await file.read(actual, 0, actual.length, position)).bytesRead !== actual.length || !actual.equals(marker))
6124
6182
  throw new Error("Installer archive marker is missing");
6125
- const hash = createHash15("sha256");
6183
+ const hash = createHash16("sha256");
6126
6184
  let read = 0;
6127
6185
  for await (const chunk of file.createReadStream({
6128
6186
  start: position + marker.length,
@@ -7009,7 +7067,7 @@ function assertInstallerRendererObservation(value, offline = false) {
7009
7067
  }
7010
7068
 
7011
7069
  // ../../src/installer/installed-payload.ts
7012
- import { createHash as createHash16 } from "crypto";
7070
+ import { createHash as createHash17 } from "crypto";
7013
7071
  import { lstat as lstat12, open as open6, realpath as realpath5, rm as rm7 } from "fs/promises";
7014
7072
  import { once as once2 } from "events";
7015
7073
  import { join as join21, resolve as resolve13 } from "path";
@@ -7035,7 +7093,7 @@ async function command2(args, env, limit, collect) {
7035
7093
  const errors = (async () => {
7036
7094
  for await (const _part of child.stderr) {}
7037
7095
  })();
7038
- const hash = createHash16("sha256"), chunks = [];
7096
+ const hash = createHash17("sha256"), chunks = [];
7039
7097
  let size = 0;
7040
7098
  try {
7041
7099
  for await (const part of child.stdout) {
@@ -7089,7 +7147,7 @@ async function readMembers(archive, limits, collect) {
7089
7147
  failure ??= new Error("Archive member missing or ambiguous");
7090
7148
  return entry.resume();
7091
7149
  }
7092
- const hash = createHash16("sha256"), chunks = [];
7150
+ const hash = createHash17("sha256"), chunks = [];
7093
7151
  const member = { digest: "", size: 0, bytes: Buffer.alloc(0), count: 1 };
7094
7152
  members.set(entry.path, member);
7095
7153
  entry.on("data", (chunk) => {
@@ -7231,7 +7289,7 @@ async function extractCandidateRuntime(options) {
7231
7289
  const child = spawn(), errors = (async () => {
7232
7290
  for await (const _part of child.stderr) {}
7233
7291
  })();
7234
- const hash = createHash16("sha256");
7292
+ const hash = createHash17("sha256");
7235
7293
  let size = 0;
7236
7294
  try {
7237
7295
  for await (const part of child.stdout) {
@@ -7465,7 +7523,7 @@ function planUpdateHandoff(options) {
7465
7523
  }
7466
7524
 
7467
7525
  // ../../src/updates/install/update-extraction.ts
7468
- import { createHash as createHash17 } from "crypto";
7526
+ import { createHash as createHash18 } from "crypto";
7469
7527
  import { constants as constants4 } from "fs";
7470
7528
  import { lstat as lstat13, mkdir as mkdir7, mkdtemp as mkdtemp8, open as open7, readFile as readFile8, realpath as realpath7, rm as rm8, symlink } from "fs/promises";
7471
7529
  import { isAbsolute as isAbsolute6, join as join22 } from "path";
@@ -7540,7 +7598,7 @@ async function extractBoundArchive(options, descriptor, verifyBeforeExtraction)
7540
7598
  done(null, chunk);
7541
7599
  }
7542
7600
  });
7543
- const hash = createHash17("sha256");
7601
+ const hash = createHash18("sha256");
7544
7602
  let compressedBytes = 0;
7545
7603
  const verifyInput = new Transform({
7546
7604
  transform(chunk, _encoding, done) {
@@ -7696,7 +7754,7 @@ async function extractBoundArchive(options, descriptor, verifyBeforeExtraction)
7696
7754
  }
7697
7755
 
7698
7756
  // ../../src/updates/install/update-swap.ts
7699
- import { createHash as createHash18 } from "crypto";
7757
+ import { createHash as createHash19 } from "crypto";
7700
7758
  import { constants as constants7 } from "fs";
7701
7759
  import { lstat as lstat14, open as open10, readdir as readdir9, readFile as readFile9, readlink as readlink2 } from "fs/promises";
7702
7760
  import { basename as basename8, dirname as dirname6, join as join25 } from "path";
@@ -8052,7 +8110,7 @@ async function readTreeFileBytes(file, buffer, length, position) {
8052
8110
  }
8053
8111
  async function readUpdateTreeDigest(tree, options = {}) {
8054
8112
  const allowHardLinkedFiles = options.allowHardLinkedFiles === true;
8055
- const hash = createHash18("sha256");
8113
+ const hash = createHash19("sha256");
8056
8114
  hash.update("adea-framework-update-tree\x00v1\x00", "utf8");
8057
8115
  const root = await lstat14(tree, { bigint: true });
8058
8116
  if (!root.isDirectory() || root.isSymbolicLink())
@@ -9070,7 +9128,7 @@ import { lstat as lstat20, mkdir as mkdir10, rename as rename2, writeFile as wri
9070
9128
  import { join as join35, resolve as resolve16 } from "path";
9071
9129
 
9072
9130
  // ../../src/installer/upgrade-asset-download.ts
9073
- import { createHash as createHash19 } from "crypto";
9131
+ import { createHash as createHash20 } from "crypto";
9074
9132
  import { open as open11, unlink as unlink3 } from "fs/promises";
9075
9133
 
9076
9134
  // ../../src/installer/write-all.ts
@@ -9108,7 +9166,7 @@ async function downloadAsset(options) {
9108
9166
  discardStream(response.body);
9109
9167
  throw error;
9110
9168
  }
9111
- const hash = createHash19("sha256");
9169
+ const hash = createHash20("sha256");
9112
9170
  let completed = false;
9113
9171
  try {
9114
9172
  let size = 0;
@@ -9148,7 +9206,7 @@ async function downloadAsset(options) {
9148
9206
  }
9149
9207
 
9150
9208
  // ../../src/updates/feed/update-discovery.ts
9151
- import { createHash as createHash20 } from "crypto";
9209
+ import { createHash as createHash21 } from "crypto";
9152
9210
  var MAX_POINTER_BYTES = 262144;
9153
9211
  var MAX_LEDGER_BYTES2 = 1024 * 1024;
9154
9212
  async function discoverSignedRelease(options) {
@@ -9184,7 +9242,7 @@ async function discoverSignedRelease(options) {
9184
9242
  throw new Error("No qualified channel descriptor is available");
9185
9243
  const { tag } = selected;
9186
9244
  const bytes = await readReleaseBytes(await get(`${tag}/${discoveryName}`), 65536);
9187
- if (bytes.length !== listed.size || createHash20("sha256").update(bytes).digest("hex") !== listed.sha256)
9245
+ if (bytes.length !== listed.size || createHash21("sha256").update(bytes).digest("hex") !== listed.sha256)
9188
9246
  throw new Error("Channel descriptor differs from its release");
9189
9247
  let signed;
9190
9248
  try {
@@ -9736,7 +9794,7 @@ async function stageLinuxPackagePairWithInspection(options, inspect) {
9736
9794
  }
9737
9795
  var stageLinuxPackagePair = (options) => stageLinuxPackagePairWithInspection(options, inspectWithNativeTools);
9738
9796
  // src/library/linux-format-producer.ts
9739
- import { createHash as createHash21 } from "crypto";
9797
+ import { createHash as createHash22 } from "crypto";
9740
9798
  import { createReadStream as createReadStream2, createWriteStream } from "fs";
9741
9799
  import {
9742
9800
  chmod as chmod4,
@@ -9761,7 +9819,7 @@ var commandName = /^[a-z0-9][a-z0-9@+._-]{0,63}$/;
9761
9819
  var debDependencyAtom = /^[a-z0-9][a-z0-9+.-]{0,63}(?: \(>= (?:0|[1-9]\d{0,8})(?:\.(?:0|[1-9]\d{0,8})){1,3}\))?$/;
9762
9820
  var sha2562 = /^[a-f0-9]{64}$/;
9763
9821
  var sum = async (path) => {
9764
- const hash = createHash21("sha256");
9822
+ const hash = createHash22("sha256");
9765
9823
  for await (const chunk of createReadStream2(path))
9766
9824
  hash.update(chunk);
9767
9825
  return hash.digest("hex");
@@ -10063,7 +10121,7 @@ exec "$root/${installed}/${policy.launcher}" "$@"
10063
10121
  }
10064
10122
  // src/library/windows-standalone.ts
10065
10123
  import { execFile as execFile5 } from "child_process";
10066
- import { createHash as createHash22 } from "crypto";
10124
+ import { createHash as createHash23 } from "crypto";
10067
10125
  import { constants as constants8 } from "fs";
10068
10126
  import { copyFile as copyFile2, lstat as lstat22, mkdtemp as mkdtemp13, open as open15, readFile as readFile13, readdir as readdir14, rm as rm13, writeFile as writeFile14 } from "fs/promises";
10069
10127
  import { tmpdir as tmpdir6 } from "os";
@@ -10255,7 +10313,7 @@ async function assertStandaloneWindowsPayload(exe, members) {
10255
10313
  throw new Error("Invalid Windows setup payload marker");
10256
10314
  let cursor = offset + marker.length;
10257
10315
  for (const member of members) {
10258
- const hash = createHash22("sha256");
10316
+ const hash = createHash23("sha256");
10259
10317
  const end = cursor + member.size;
10260
10318
  while (cursor < end) {
10261
10319
  const bytes = await read(cursor, Math.min(end - cursor, 1048576));
@@ -10394,7 +10452,7 @@ function electrobunArtifacts(appName, platform) {
10394
10452
 
10395
10453
  // src/library/daily-native-observer.ts
10396
10454
  import { execFile as execFile6 } from "child_process";
10397
- import { createHash as createHash23, randomBytes as randomBytes4 } from "crypto";
10455
+ import { createHash as createHash24, randomBytes as randomBytes4 } from "crypto";
10398
10456
  import { join as join40, resolve as resolve20 } from "path";
10399
10457
  import { Effect as Effect26 } from "effect";
10400
10458
  var runDailyNativeDriver = (script, input, env) => new Promise((finish, reject) => {
@@ -10472,7 +10530,7 @@ function driverPath(value) {
10472
10530
  throw new Error("Invalid native observer path");
10473
10531
  return value;
10474
10532
  }
10475
- var fixtureDigest = (nonce) => "sha256:" + createHash23("sha256").update(nonce).digest("hex");
10533
+ var fixtureDigest = (nonce) => "sha256:" + createHash24("sha256").update(nonce).digest("hex");
10476
10534
  var confirmFixture = (value, nonce) => isRecord(value) && hasExactOwnKeys(value, ["digest"]) && value.digest === fixtureDigest(nonce);
10477
10535
  var observeDailyNativeEffect = (options, run) => Effect26.gen(function* () {
10478
10536
  const { env, platform: os, arch, cwd } = yield* ReleaseConfig;
@@ -10762,7 +10820,7 @@ var provideLivePorts = (program) => program.pipe(Effect28.provideService(Release
10762
10820
  }));
10763
10821
 
10764
10822
  // src/commands/prepare-stable-catalog.ts
10765
- import { createHash as createHash24 } from "crypto";
10823
+ import { createHash as createHash25 } from "crypto";
10766
10824
  import { createReadStream as createReadStream3 } from "fs";
10767
10825
  import { lstat as lstat23, mkdir as mkdir13, readFile as readFile14, readdir as readdir15, rm as rm14, writeFile as writeFile15 } from "fs/promises";
10768
10826
  import { basename as basename18, dirname as dirname16, join as join42 } from "path";
@@ -11005,7 +11063,7 @@ var measure = async (path) => {
11005
11063
  const st = await lstat23(path);
11006
11064
  if (!st.isFile())
11007
11065
  throw new Error("Expected ordinary installer file");
11008
- const hash = createHash24("sha256");
11066
+ const hash = createHash25("sha256");
11009
11067
  for await (const chunk of createReadStream3(path))
11010
11068
  hash.update(chunk);
11011
11069
  return { name: basename18(path), size: st.size, sha256: hash.digest("hex") };
@@ -11067,14 +11125,14 @@ import { basename as basename19, dirname as dirname17, isAbsolute as isAbsolute9
11067
11125
  import { Effect as Effect29 } from "effect";
11068
11126
 
11069
11127
  // src/library/verified-git-source.ts
11070
- import { createHash as createHash25 } from "crypto";
11128
+ import { createHash as createHash26 } from "crypto";
11071
11129
  var id2 = /^[a-f0-9]{40}$/;
11072
11130
  var pathPart = /^[A-Za-z0-9][A-Za-z0-9._-]*$/;
11073
11131
  async function object2(git, type, oid, max) {
11074
11132
  if (!id2.test(oid))
11075
11133
  throw new Error("Invalid source object");
11076
11134
  const bytes = await git(["cat-file", type, oid]);
11077
- if (bytes.length > max || createHash25("sha1").update(`${type} ${bytes.length}\x00`).update(bytes).digest("hex") !== oid)
11135
+ if (bytes.length > max || createHash26("sha1").update(`${type} ${bytes.length}\x00`).update(bytes).digest("hex") !== oid)
11078
11136
  throw new Error("Source object identity mismatch");
11079
11137
  return bytes;
11080
11138
  }
@@ -11369,9 +11427,9 @@ import { lstat as lstat24, mkdir as mkdir14, readFile as readFile15, readdir as
11369
11427
  import { dirname as dirname18, isAbsolute as isAbsolute10, join as join44 } from "path";
11370
11428
 
11371
11429
  // src/library/apt/apt-metadata.ts
11372
- import { createHash as createHash26 } from "crypto";
11430
+ import { createHash as createHash27 } from "crypto";
11373
11431
  import { gzipSync } from "zlib";
11374
- var sha2564 = (data) => createHash26("sha256").update(data).digest("hex");
11432
+ var sha2564 = (data) => createHash27("sha256").update(data).digest("hex");
11375
11433
  function stageAptMetadata({ policy, tag, assets, deb, control, now }) {
11376
11434
  if (!/^v(?:0|[1-9][0-9]*)\.(?:0|[1-9][0-9]*)\.(?:0|[1-9][0-9]*)$/.test(tag))
11377
11435
  throw new Error("Invalid release tag");
@@ -11570,7 +11628,7 @@ import { open as open16 } from "fs/promises";
11570
11628
  import { isAbsolute as isAbsolute11 } from "path";
11571
11629
 
11572
11630
  // src/library/release-retention.ts
11573
- import { createHash as createHash27 } from "crypto";
11631
+ import { createHash as createHash28 } from "crypto";
11574
11632
  var day = 86400000;
11575
11633
  var safeTag = /^v(?:0|[1-9]\d*)\.(?:0|[1-9]\d*)\.(?:0|[1-9]\d*)(?:-dev\.(?:0|[1-9]\d*))?$/;
11576
11634
  var safeAsset = /^[a-zA-Z0-9][a-zA-Z0-9._+-]{0,254}$/;
@@ -11598,7 +11656,7 @@ function unique(rows, key, caption) {
11598
11656
  var byKey = (a, b) => a.key.localeCompare(b.key);
11599
11657
  var ordered = (rows, key) => rows.toSorted((a, b) => key(a).localeCompare(key(b)));
11600
11658
  var stable = (value) => JSON.stringify(value);
11601
- var fingerprint = (value) => createHash27("sha256").update(stable(value)).digest("hex");
11659
+ var fingerprint = (value) => createHash28("sha256").update(stable(value)).digest("hex");
11602
11660
  var latestFirst = (a, b) => date(b.publishedAt) - date(a.publishedAt) || a.tag.localeCompare(b.tag);
11603
11661
  function planReleaseRetention(snapshot) {
11604
11662
  const { app } = snapshot;
@@ -11772,7 +11830,7 @@ if (false) {}
11772
11830
 
11773
11831
  // src/linux-channel-proof-cli.ts
11774
11832
  import { spawnSync as spawnSync4 } from "child_process";
11775
- import { createHash as createHash28 } from "crypto";
11833
+ import { createHash as createHash29 } from "crypto";
11776
11834
  import { createReadStream as createReadStream4 } from "fs";
11777
11835
  import { constants as constants10, createWriteStream as createWriteStream2 } from "fs";
11778
11836
  import { lstat as lstat25, mkdtemp as mkdtemp15, open as open17, readFile as readFile16, realpath as realpath13, rm as rm17 } from "fs/promises";
@@ -11786,7 +11844,7 @@ function check4(ok, message) {
11786
11844
  }
11787
11845
  async function hash2(path) {
11788
11846
  check4((await lstat25(path)).isFile(), "artifact must be a regular file");
11789
- const digest = createHash28("sha256");
11847
+ const digest = createHash29("sha256");
11790
11848
  for await (const chunk of createReadStream4(path))
11791
11849
  digest.update(chunk);
11792
11850
  return digest.digest("hex");
@@ -11950,14 +12008,14 @@ function verifyFlatpakCapabilities(policy, result) {
11950
12008
 
11951
12009
  // src/linux-rpm-metadata-proof.ts
11952
12010
  import { spawnSync as spawnSync5 } from "child_process";
11953
- import { createHash as createHash29 } from "crypto";
12011
+ import { createHash as createHash30 } from "crypto";
11954
12012
  import { constants as constants11 } from "fs";
11955
12013
  import { lstat as lstat26, open as open18, realpath as realpath14 } from "fs/promises";
11956
12014
  import { isAbsolute as isAbsolute12, join as join46, relative as relative7, resolve as resolve23 } from "path";
11957
12015
  import { gunzipSync as gunzipSync2 } from "zlib";
11958
12016
  var maxCompressed = 16 * 1024 * 1024;
11959
12017
  var maxOpen = 32 * 1024 * 1024;
11960
- var digest5 = (bytes) => createHash29("sha256").update(bytes).digest("hex");
12018
+ var digest5 = (bytes) => createHash30("sha256").update(bytes).digest("hex");
11961
12019
  function ensure(ok, reason) {
11962
12020
  if (!ok)
11963
12021
  throw new Error(reason);
@@ -12045,7 +12103,7 @@ async function digestRegular(path, expectedSize) {
12045
12103
  try {
12046
12104
  const stat = await file.stat();
12047
12105
  ensure(stat.isFile() && stat.size === expectedSize && stat.size > 0 && stat.size <= 4 * 1024 * 1024 * 1024, "Invalid RPM file");
12048
- const hash = createHash29("sha256");
12106
+ const hash = createHash30("sha256");
12049
12107
  let size = 0;
12050
12108
  for await (const chunk of file.createReadStream({ autoClose: false })) {
12051
12109
  size += chunk.length;
@@ -12119,7 +12177,7 @@ async function verifyRpmRepository(stage, fingerprint) {
12119
12177
  }
12120
12178
 
12121
12179
  // src/library/arch-publish.ts
12122
- import { createHash as createHash30 } from "crypto";
12180
+ import { createHash as createHash31 } from "crypto";
12123
12181
  import { join as join47 } from "path";
12124
12182
  import { tmpdir as tmpdir9 } from "os";
12125
12183
  import { Effect as Effect31 } from "effect";
@@ -12350,7 +12408,7 @@ var readLicense = (url) => Effect31.gen(function* () {
12350
12408
  return yield* fail("Release license is unavailable");
12351
12409
  }
12352
12410
  const bytes = yield* step(() => readReleaseBytes(response, MAX_LICENSE_BYTES));
12353
- const sha256 = yield* step(async () => createHash30("sha256").update(bytes).digest("hex"));
12411
+ const sha256 = yield* step(async () => createHash31("sha256").update(bytes).digest("hex"));
12354
12412
  return { url, sha256 };
12355
12413
  });
12356
12414
  var git2 = (args) => Effect31.gen(function* () {
@@ -12392,7 +12450,7 @@ var verifyArchRelease = (options) => Effect31.gen(function* () {
12392
12450
  if (!listed)
12393
12451
  return yield* fail(`Missing signed descriptor: ${descriptorPolicy.name}`);
12394
12452
  const bytes = yield* feedBytes(options.feed, `${options.tag}/${descriptorPolicy.name}`, 65536);
12395
- if (!bytes || bytes.length !== listed.size || createHash30("sha256").update(bytes).digest("hex") !== listed.sha256)
12453
+ if (!bytes || bytes.length !== listed.size || createHash31("sha256").update(bytes).digest("hex") !== listed.sha256)
12396
12454
  return yield* fail(`Signed descriptor differs from its release: ${descriptorPolicy.name}`);
12397
12455
  const json = yield* step(async () => {
12398
12456
  try {
package/dist/index.js CHANGED
@@ -35,6 +35,7 @@ __export(exports_src, {
35
35
  fileIdentity: () => fileIdentity2,
36
36
  finalizeReleasePleaseDraft: () => finalizeReleasePleaseDraft,
37
37
  inspectDailyBatch: () => inspectDailyBatch,
38
+ inspectDailyPreSigning: () => inspectDailyPreSigning,
38
39
  inspectStagedStep: () => inspectStagedStep,
39
40
  planDailyReleaseMatrix: () => planDailyReleaseMatrix,
40
41
  planQualificationRun: () => planQualificationRun2,
@@ -3985,6 +3986,7 @@ import { join as join9 } from "path";
3985
3986
  import { Effect as Effect17 } from "effect";
3986
3987
 
3987
3988
  // src/library/daily-matrix.ts
3989
+ import { createHash as createHash11 } from "crypto";
3988
3990
  import { join as join8 } from "path";
3989
3991
  import { Effect as Effect16 } from "effect";
3990
3992
 
@@ -4275,30 +4277,43 @@ function readNativeReceipt(path, label) {
4275
4277
  const after = await file.stat();
4276
4278
  if (!sameFile(before, after) || before.ctimeMs !== after.ctimeMs)
4277
4279
  throw new Error("Native receipt changed during read");
4278
- return bytes.toString("utf8");
4280
+ return bytes;
4279
4281
  });
4280
4282
  return yield* attempt(() => {
4281
4283
  try {
4282
- return JSON.parse(data);
4284
+ return {
4285
+ value: JSON.parse(new TextDecoder("utf-8", { fatal: true }).decode(data)),
4286
+ size: data.length,
4287
+ digest: "sha256:" + createHash11("sha256").update(data).digest("hex")
4288
+ };
4283
4289
  } catch {
4284
4290
  throw new Error(`Invalid native receipt JSON: ${label}`);
4285
4291
  }
4286
4292
  });
4287
4293
  }).pipe(Effect16.scoped);
4288
4294
  }
4289
- var verifyDailyReleaseMatrixEffect = (options) => Effect16.gen(function* () {
4295
+ var verifiedMatrix = (options, verifyPrior) => Effect16.gen(function* () {
4290
4296
  const { config, identity, artifacts, receipts } = options;
4291
4297
  const { tag } = identity;
4292
4298
  yield* attempt(() => assertDailyIdentity(identity));
4293
4299
  const matrix = yield* attempt(() => planDailyReleaseMatrix(config, tag));
4294
- yield* exactDirectory(artifacts, matrix.assets);
4295
- yield* exactDirectory(receipts, matrix.checks.map((c) => c.name + ".json"));
4300
+ if (verifyPrior && matrix.profile !== expandedDesktopDailyProfile)
4301
+ return yield* fail("Pre-signing validation requires the expanded Daily profile");
4302
+ const payloadNames = new Set(matrix.checks.flatMap((check) => check.assets));
4303
+ const selected = verifyPrior ? matrix.assets.filter((name) => payloadNames.has(name)) : matrix.assets;
4304
+ const receiptNames = matrix.checks.map((check) => check.name + ".json");
4305
+ yield* exactDirectory(artifacts, selected);
4306
+ yield* exactDirectory(receipts, receiptNames);
4296
4307
  const inventory = new Map;
4297
- for (const name of matrix.assets)
4308
+ const checkedReceipts = [];
4309
+ const claims = [];
4310
+ for (const name of selected)
4298
4311
  inventory.set(name, yield* fileIdentityEffect(join8(artifacts, name), name));
4299
4312
  for (const check of matrix.checks) {
4300
- const r = yield* readNativeReceipt(join8(receipts, check.name + ".json"), check.name);
4301
- yield* attempt(() => validateDailyNativeEvidence(r, "framework/daily-native-receipt/v2", {
4313
+ const filename = check.name + ".json";
4314
+ const raw = yield* readNativeReceipt(join8(receipts, filename), check.name);
4315
+ checkedReceipts.push({ name: filename, size: raw.size, digest: raw.digest });
4316
+ const valid = yield* attempt(() => validateDailyNativeEvidence(raw.value, "framework/daily-native-receipt/v2", {
4302
4317
  appId: matrix.appId,
4303
4318
  profile: matrix.profile,
4304
4319
  signing: requiresDailyInstallerSigning(matrix.profile, check) ? installerSigningPolicy(config, check) : undefined,
@@ -4307,14 +4322,57 @@ var verifyDailyReleaseMatrixEffect = (options) => Effect16.gen(function* () {
4307
4322
  assets: check.assets.map((name) => inventory.get(name)),
4308
4323
  baselineNames: (priorTag) => priorDailyInstallerNames(config, priorTag, check)
4309
4324
  }));
4325
+ if (verifyPrior && "upgrade" in valid.observations) {
4326
+ const claim = {
4327
+ appId: matrix.appId,
4328
+ check: check.name,
4329
+ platform: check.platform,
4330
+ upgrade: valid.observations.upgrade,
4331
+ ...valid.installerSigning ? { installerSigning: valid.installerSigning } : {}
4332
+ };
4333
+ claims.push(claim);
4334
+ }
4335
+ }
4336
+ const assets = [...inventory.values()];
4337
+ if (verifyPrior) {
4338
+ for (const claim of claims)
4339
+ if ((yield* step(() => verifyPrior(claim))) !== true)
4340
+ return yield* fail("Prior Daily installer or payload is not independently authorized");
4341
+ yield* exactDirectory(artifacts, selected);
4342
+ yield* exactDirectory(receipts, receiptNames);
4343
+ for (const [root, files] of [
4344
+ [artifacts, assets],
4345
+ [receipts, checkedReceipts]
4346
+ ]) {
4347
+ for (const expected of files) {
4348
+ const actual = yield* fileIdentityEffect(join8(root, expected.name), expected.name);
4349
+ if (actual.digest !== expected.digest || actual.size !== expected.size)
4350
+ return yield* fail("Daily pre-signing input changed during validation");
4351
+ }
4352
+ }
4310
4353
  }
4354
+ return { profile: matrix.profile, appId: matrix.appId, identity, assets, checkedReceipts };
4355
+ });
4356
+ var verifyDailyReleaseMatrixEffect = (options) => Effect16.map(verifiedMatrix(options), ({ profile, appId, identity, assets }) => ({
4357
+ profile,
4358
+ appId,
4359
+ identity,
4360
+ assets
4361
+ }));
4362
+ var inspectDailyPreSigningEffect = (options, verifyPrior) => Effect16.gen(function* () {
4363
+ if (typeof verifyPrior !== "function")
4364
+ return yield* fail("Expected an independent prior verifier");
4365
+ const { checkedReceipts, ...payloads } = yield* verifiedMatrix(options, verifyPrior);
4311
4366
  return {
4312
- profile: matrix.profile,
4313
- appId: matrix.appId,
4314
- identity,
4315
- assets: [...inventory.values()]
4367
+ ...payloads,
4368
+ receipts: checkedReceipts,
4369
+ descriptorSigningAuthorized: false,
4370
+ promotionAuthorized: false
4316
4371
  };
4317
4372
  });
4373
+ function inspectDailyPreSigning(options, verifyPrior) {
4374
+ return runReleaseLibrary(provideLibraryPorts()(inspectDailyPreSigningEffect(options, verifyPrior)));
4375
+ }
4318
4376
  function verifyDailyReleaseMatrix(options) {
4319
4377
  return runReleaseLibrary(provideLibraryPorts()(verifyDailyReleaseMatrixEffect(options)));
4320
4378
  }
@@ -4512,7 +4570,7 @@ function createDailyNativeReceipt(options) {
4512
4570
  })));
4513
4571
  }
4514
4572
  // src/library/linux-reproducibility.ts
4515
- import { createHash as createHash11 } from "crypto";
4573
+ import { createHash as createHash12 } from "crypto";
4516
4574
  import { lstat as lstat6, readFile as readFile6, readdir as readdir4, realpath } from "fs/promises";
4517
4575
  import { isAbsolute as isAbsolute2, join as join11, resolve as resolve6 } from "path";
4518
4576
 
@@ -4642,7 +4700,7 @@ async function compareLinuxReproducibility(rawInput) {
4642
4700
  observed.push({ path, file });
4643
4701
  check2(file.size <= 65536, "Producer receipt is too large");
4644
4702
  const bytes = await readFile6(path);
4645
- check2(bytes.length === file.size && createHash11("sha256").update(bytes).digest("hex") === file.sha256, "Producer receipt changed");
4703
+ check2(bytes.length === file.size && createHash12("sha256").update(bytes).digest("hex") === file.sha256, "Producer receipt changed");
4646
4704
  let receipt;
4647
4705
  try {
4648
4706
  receipt = JSON.parse(bytes.toString("utf8"));
@@ -4788,7 +4846,7 @@ function createMacosDmg(options) {
4788
4846
  import { Effect as Effect22 } from "effect";
4789
4847
 
4790
4848
  // src/library/local-release.ts
4791
- import { createHash as createHash13 } from "crypto";
4849
+ import { createHash as createHash14 } from "crypto";
4792
4850
  import { constants as constants3 } from "fs";
4793
4851
  import { dirname as dirname2, join as join14, resolve as resolve9 } from "path";
4794
4852
  import { Cause as Cause2, Effect as Effect21, Exit as Exit3 } from "effect";
@@ -4958,7 +5016,7 @@ function createFeedReleaseCutProvider(options) {
4958
5016
  }
4959
5017
 
4960
5018
  // src/library/feed-state.ts
4961
- import { createHash as createHash12 } from "crypto";
5019
+ import { createHash as createHash13 } from "crypto";
4962
5020
  import { Effect as Effect20 } from "effect";
4963
5021
 
4964
5022
  // ../../src/shared/discard-stream.ts
@@ -5206,7 +5264,7 @@ var verifyFeedReleaseEffect = (options) => Effect20.gen(function* () {
5206
5264
  if (!listed)
5207
5265
  return yield* fail(`Missing signed descriptor: ${policy.name}`);
5208
5266
  const bytes = yield* feedObject(feed, `${tag}/${policy.name}`, 65536);
5209
- if (!bytes || bytes.length !== listed.size || createHash12("sha256").update(bytes).digest("hex") !== listed.sha256)
5267
+ if (!bytes || bytes.length !== listed.size || createHash13("sha256").update(bytes).digest("hex") !== listed.sha256)
5210
5268
  return yield* fail(`Signed descriptor differs from its release: ${policy.name}`);
5211
5269
  const verified = verifyReleaseDescriptor(json(bytes), {
5212
5270
  appId: policy.appId,
@@ -5350,7 +5408,7 @@ var jsonBytes = (value) => Buffer.from(JSON.stringify(value, null, 2) + `
5350
5408
  var describe = (key, bytes, cacheControl) => ({
5351
5409
  key,
5352
5410
  size: bytes.length,
5353
- sha256: createHash13("sha256").update(bytes).digest("hex"),
5411
+ sha256: createHash14("sha256").update(bytes).digest("hex"),
5354
5412
  contentType: "application/json",
5355
5413
  cacheControl
5356
5414
  });
@@ -5439,7 +5497,7 @@ var stageLocalReleaseEffect = (options) => Effect21.gen(function* () {
5439
5497
  if (artifact.size > 65536)
5440
5498
  return yield* fail("Signed descriptor is too large");
5441
5499
  const bytes = yield* step(() => fs.readFile(join14(directory, policy.name)));
5442
- if ("sha256:" + createHash13("sha256").update(bytes).digest("hex") !== artifact.digest)
5500
+ if ("sha256:" + createHash14("sha256").update(bytes).digest("hex") !== artifact.digest)
5443
5501
  return yield* fail("Signed descriptor changed");
5444
5502
  let parsed;
5445
5503
  try {
@@ -5798,12 +5856,12 @@ var selectRetainedReleaseBuildEffect = (options) => Effect23.gen(function* () {
5798
5856
  });
5799
5857
  var selectRetainedReleaseBuild = (options) => runReleaseLibrary(provideLibraryPorts({ run: planGitHubRun(options.env, options.run) })(selectRetainedReleaseBuildEffect(options)));
5800
5858
  // src/library/staging.ts
5801
- import { createHash as createHash14 } from "crypto";
5859
+ import { createHash as createHash15 } from "crypto";
5802
5860
  import { join as join15, resolve as resolve10 } from "path";
5803
5861
  import { Effect as Effect24 } from "effect";
5804
5862
  var copyHashed = (input, output, size) => Effect24.tryPromise({
5805
5863
  try: async (signal) => {
5806
- const hash = createHash14("sha256");
5864
+ const hash = createHash15("sha256");
5807
5865
  let copied = 0;
5808
5866
  for await (const chunk of input.createReadStream({
5809
5867
  autoClose: false
@@ -5873,7 +5931,7 @@ import { join as join35 } from "path";
5873
5931
  import { Effect as Effect25 } from "effect";
5874
5932
 
5875
5933
  // ../../src/installer/installer-archive-members.ts
5876
- import { createHash as createHash15 } from "crypto";
5934
+ import { createHash as createHash16 } from "crypto";
5877
5935
  import { lstat as lstat7, open as open4 } from "fs/promises";
5878
5936
  import { isAbsolute as isAbsolute4, relative as relative3, sep as sep2 } from "path";
5879
5937
 
@@ -5980,7 +6038,7 @@ async function assertEmbeddedArchive(path, size, archive) {
5980
6038
  const position = size - archive.size - marker.length, actual = Buffer.alloc(marker.length);
5981
6039
  if ((await file.read(actual, 0, actual.length, position)).bytesRead !== actual.length || !actual.equals(marker))
5982
6040
  throw new Error("Installer archive marker is missing");
5983
- const hash = createHash15("sha256");
6041
+ const hash = createHash16("sha256");
5984
6042
  let read = 0;
5985
6043
  for await (const chunk of file.createReadStream({
5986
6044
  start: position + marker.length,
@@ -6867,7 +6925,7 @@ function assertInstallerRendererObservation(value, offline = false) {
6867
6925
  }
6868
6926
 
6869
6927
  // ../../src/installer/installed-payload.ts
6870
- import { createHash as createHash16 } from "crypto";
6928
+ import { createHash as createHash17 } from "crypto";
6871
6929
  import { lstat as lstat12, open as open5, realpath as realpath5, rm as rm7 } from "fs/promises";
6872
6930
  import { once as once2 } from "events";
6873
6931
  import { join as join20, resolve as resolve13 } from "path";
@@ -6893,7 +6951,7 @@ async function command2(args, env, limit, collect) {
6893
6951
  const errors = (async () => {
6894
6952
  for await (const _part of child.stderr) {}
6895
6953
  })();
6896
- const hash = createHash16("sha256"), chunks = [];
6954
+ const hash = createHash17("sha256"), chunks = [];
6897
6955
  let size = 0;
6898
6956
  try {
6899
6957
  for await (const part of child.stdout) {
@@ -6947,7 +7005,7 @@ async function readMembers(archive, limits, collect) {
6947
7005
  failure ??= new Error("Archive member missing or ambiguous");
6948
7006
  return entry.resume();
6949
7007
  }
6950
- const hash = createHash16("sha256"), chunks = [];
7008
+ const hash = createHash17("sha256"), chunks = [];
6951
7009
  const member = { digest: "", size: 0, bytes: Buffer.alloc(0), count: 1 };
6952
7010
  members.set(entry.path, member);
6953
7011
  entry.on("data", (chunk) => {
@@ -7089,7 +7147,7 @@ async function extractCandidateRuntime(options) {
7089
7147
  const child = spawn(), errors = (async () => {
7090
7148
  for await (const _part of child.stderr) {}
7091
7149
  })();
7092
- const hash = createHash16("sha256");
7150
+ const hash = createHash17("sha256");
7093
7151
  let size = 0;
7094
7152
  try {
7095
7153
  for await (const part of child.stdout) {
@@ -7323,7 +7381,7 @@ function planUpdateHandoff(options) {
7323
7381
  }
7324
7382
 
7325
7383
  // ../../src/updates/install/update-extraction.ts
7326
- import { createHash as createHash17 } from "crypto";
7384
+ import { createHash as createHash18 } from "crypto";
7327
7385
  import { constants as constants4 } from "fs";
7328
7386
  import { lstat as lstat13, mkdir as mkdir7, mkdtemp as mkdtemp8, open as open6, readFile as readFile8, realpath as realpath7, rm as rm8, symlink } from "fs/promises";
7329
7387
  import { isAbsolute as isAbsolute6, join as join21 } from "path";
@@ -7398,7 +7456,7 @@ async function extractBoundArchive(options, descriptor, verifyBeforeExtraction)
7398
7456
  done(null, chunk);
7399
7457
  }
7400
7458
  });
7401
- const hash = createHash17("sha256");
7459
+ const hash = createHash18("sha256");
7402
7460
  let compressedBytes = 0;
7403
7461
  const verifyInput = new Transform({
7404
7462
  transform(chunk, _encoding, done) {
@@ -7554,7 +7612,7 @@ async function extractBoundArchive(options, descriptor, verifyBeforeExtraction)
7554
7612
  }
7555
7613
 
7556
7614
  // ../../src/updates/install/update-swap.ts
7557
- import { createHash as createHash18 } from "crypto";
7615
+ import { createHash as createHash19 } from "crypto";
7558
7616
  import { constants as constants7 } from "fs";
7559
7617
  import { lstat as lstat14, open as open9, readdir as readdir8, readFile as readFile9, readlink as readlink2 } from "fs/promises";
7560
7618
  import { basename as basename8, dirname as dirname6, join as join24 } from "path";
@@ -7910,7 +7968,7 @@ async function readTreeFileBytes(file, buffer, length, position) {
7910
7968
  }
7911
7969
  async function readUpdateTreeDigest(tree, options = {}) {
7912
7970
  const allowHardLinkedFiles = options.allowHardLinkedFiles === true;
7913
- const hash = createHash18("sha256");
7971
+ const hash = createHash19("sha256");
7914
7972
  hash.update("adea-framework-update-tree\x00v1\x00", "utf8");
7915
7973
  const root = await lstat14(tree, { bigint: true });
7916
7974
  if (!root.isDirectory() || root.isSymbolicLink())
@@ -8928,7 +8986,7 @@ import { lstat as lstat20, mkdir as mkdir10, rename as rename2, writeFile as wri
8928
8986
  import { join as join34, resolve as resolve16 } from "path";
8929
8987
 
8930
8988
  // ../../src/installer/upgrade-asset-download.ts
8931
- import { createHash as createHash19 } from "crypto";
8989
+ import { createHash as createHash20 } from "crypto";
8932
8990
  import { open as open10, unlink as unlink3 } from "fs/promises";
8933
8991
 
8934
8992
  // ../../src/installer/write-all.ts
@@ -8966,7 +9024,7 @@ async function downloadAsset(options) {
8966
9024
  discardStream(response.body);
8967
9025
  throw error;
8968
9026
  }
8969
- const hash = createHash19("sha256");
9027
+ const hash = createHash20("sha256");
8970
9028
  let completed = false;
8971
9029
  try {
8972
9030
  let size = 0;
@@ -9006,7 +9064,7 @@ async function downloadAsset(options) {
9006
9064
  }
9007
9065
 
9008
9066
  // ../../src/updates/feed/update-discovery.ts
9009
- import { createHash as createHash20 } from "crypto";
9067
+ import { createHash as createHash21 } from "crypto";
9010
9068
  var MAX_POINTER_BYTES = 262144;
9011
9069
  var MAX_LEDGER_BYTES2 = 1024 * 1024;
9012
9070
  async function discoverSignedRelease(options) {
@@ -9042,7 +9100,7 @@ async function discoverSignedRelease(options) {
9042
9100
  throw new Error("No qualified channel descriptor is available");
9043
9101
  const { tag } = selected;
9044
9102
  const bytes = await readReleaseBytes(await get(`${tag}/${discoveryName}`), 65536);
9045
- if (bytes.length !== listed.size || createHash20("sha256").update(bytes).digest("hex") !== listed.sha256)
9103
+ if (bytes.length !== listed.size || createHash21("sha256").update(bytes).digest("hex") !== listed.sha256)
9046
9104
  throw new Error("Channel descriptor differs from its release");
9047
9105
  let signed;
9048
9106
  try {
@@ -9626,7 +9684,7 @@ async function stageLinuxPackagePairWithInspection(options, inspect) {
9626
9684
  }
9627
9685
  var stageLinuxPackagePair = (options) => stageLinuxPackagePairWithInspection(options, inspectWithNativeTools);
9628
9686
  // src/library/linux-format-producer.ts
9629
- import { createHash as createHash21 } from "crypto";
9687
+ import { createHash as createHash22 } from "crypto";
9630
9688
  import { createReadStream as createReadStream2, createWriteStream } from "fs";
9631
9689
  import {
9632
9690
  chmod as chmod4,
@@ -9651,7 +9709,7 @@ var commandName = /^[a-z0-9][a-z0-9@+._-]{0,63}$/;
9651
9709
  var debDependencyAtom = /^[a-z0-9][a-z0-9+.-]{0,63}(?: \(>= (?:0|[1-9]\d{0,8})(?:\.(?:0|[1-9]\d{0,8})){1,3}\))?$/;
9652
9710
  var sha2562 = /^[a-f0-9]{64}$/;
9653
9711
  var sum = async (path) => {
9654
- const hash = createHash21("sha256");
9712
+ const hash = createHash22("sha256");
9655
9713
  for await (const chunk of createReadStream2(path))
9656
9714
  hash.update(chunk);
9657
9715
  return hash.digest("hex");
@@ -9953,7 +10011,7 @@ exec "$root/${installed}/${policy.launcher}" "$@"
9953
10011
  }
9954
10012
  // src/library/windows-standalone.ts
9955
10013
  import { execFile as execFile5 } from "child_process";
9956
- import { createHash as createHash22 } from "crypto";
10014
+ import { createHash as createHash23 } from "crypto";
9957
10015
  import { constants as constants8 } from "fs";
9958
10016
  import { copyFile as copyFile2, lstat as lstat22, mkdtemp as mkdtemp13, open as open14, readFile as readFile13, readdir as readdir13, rm as rm13, writeFile as writeFile14 } from "fs/promises";
9959
10017
  import { tmpdir as tmpdir6 } from "os";
@@ -10145,7 +10203,7 @@ async function assertStandaloneWindowsPayload(exe, members) {
10145
10203
  throw new Error("Invalid Windows setup payload marker");
10146
10204
  let cursor = offset + marker.length;
10147
10205
  for (const member of members) {
10148
- const hash = createHash22("sha256");
10206
+ const hash = createHash23("sha256");
10149
10207
  const end = cursor + member.size;
10150
10208
  while (cursor < end) {
10151
10209
  const bytes = await read(cursor, Math.min(end - cursor, 1048576));
@@ -10280,6 +10338,7 @@ export {
10280
10338
  fileIdentity2 as fileIdentity,
10281
10339
  finalizeReleasePleaseDraft,
10282
10340
  inspectDailyBatch,
10341
+ inspectDailyPreSigning,
10283
10342
  inspectStagedStep,
10284
10343
  planDailyReleaseMatrix,
10285
10344
  planQualificationRun2 as planQualificationRun,
@@ -1 +1 @@
1
- {"version":"0.7.0","commit":"edcb5f981812dabb4e14e1e755fdea5df5776816"}
1
+ {"version":"0.8.0","commit":"824726346474b659a68f86be31a0bc63f4fb38d8"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@adea-ai/app-framework-release-tools",
3
- "version": "0.7.0",
3
+ "version": "0.8.0",
4
4
  "description": "Host-side release tooling for @adea-ai/app-framework apps, on Effect: the release CLIs and the framework package publish. Installing it never adds Effect to the framework itself.",
5
5
  "license": "Apache-2.0",
6
6
  "repository": {