@rightkit/release 0.6.80 → 0.6.81

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.
Binary file
@@ -0,0 +1 @@
1
+ d6670e755e3c857aac3b7395a692b2760754b64b00cc4ab793db02db8fc4128d rightkit-swap
@@ -2367,7 +2367,18 @@ async function runStages(o, args, root, git, io) {
2367
2367
  else o.out(`${tag} [compile] release admission dry-run skipped here: no broker receipt names the Cargo target of ${uncovered.length ? uncovered.map((w) => path.relative(root, w).replaceAll("\\", "/") || ".").join(", ") : "the app"} yet; the package stage's build runs the same admission rows at its start`);
2368
2368
  }
2369
2369
  let compiledDirs = []; let compiledBins = null; let qualifyOwed = []; let limitedEvidence = [];
2370
- const reportOutputs = (dirs, bins = null) => { compiledDirs = [...dirs]; compiledBins = bins; };
2370
+ const reportOutputs = (dirs, bins = null, byCargoDir = []) => {
2371
+ compiledDirs = [...dirs]; compiledBins = bins;
2372
+ // The compile's broker output folder of each Cargo workspace joins the door run's known outputs (keyed by checkout workspace, as the stage
2373
+ // carriers file theirs): the package stage's map hands them to its first resolution (stage-seam.mjs carriedOutputDir knownOutputDirs).
2374
+ // A folder a stage carrier already recorded for that workspace stays: it is the one the app's own build used.
2375
+ if (!ds) return;
2376
+ let checkoutReal = root; try { checkoutReal = fs.realpathSync.native(root); } catch { /* as given */ }
2377
+ for (const [cargoDir, dir] of byCargoDir) {
2378
+ const key = path.join(checkoutReal, ...(cargoDir === "." ? [] : cargoDir.split("/")));
2379
+ if (!ds.carriedOutputs?.has(key)) (ds.carriedOutputs ??= new Map()).set(key, dir);
2380
+ }
2381
+ };
2371
2382
  if (ok) ok = (await (o.runCompile ?? (() => main(ds ? ["--all", "--commit", commit, "--snapshot", ds.path] : ["--all"], { ...io, cwd: root, readStdin: () => "", ...(ds ? { snapshotLock: ds.lock, classAEarlier: true, seamScope: appDir === "." ? null : [appDir], snapshotLedger: ds.ledger?.entries ?? [], onCompileLedger: (entries) => { ds.compileAdmitted = entries; }, onDirectReceipt: (r) => { directReceipt = r; }, onCompileOutputs: reportOutputs, onQualifyOwed: (list) => { qualifyOwed = list; }, onLimitedEvidence: (list) => { limitedEvidence = list; } } : {}) })))({ reportOutputs })) === 0;
2372
2383
  if (directReceipt) extra = { ...extra, direct: directReceipt };
2373
2384
  // What the plan left to the qualify stage is recorded with the compile, so qualification can prove it is not lost (rightkit#1332, #1333).
@@ -3193,7 +3204,7 @@ async function committedCargoManifests({ o, git, root, commit, scopeDirs, extraW
3193
3204
  const npm = discoverNpmUnits({ root, tracked, readFile, exists });
3194
3205
  const closure = tools.closureOf({ scopeDirs, npmUnits: npm, rustUnits: inventory.units, readFile: readCommitted });
3195
3206
  // Workspaces the unit's own compile builds beside its closure (a crate's consumer rows under ci/consumers/): bound when the commit tracks their manifest.
3196
- const extra = extraWorkspaces.filter((dir) => fileSet.has(`${dir}/Cargo.toml`));
3207
+ const extra = extraWorkspaces.filter((dir) => fileSet.has(dir === "." ? "Cargo.toml" : `${dir}/Cargo.toml`));
3197
3208
  const workspaces = [...new Set([...inventory.units.filter((u) => closure.rust.has(u.name)).map((u) => u.cargoDir), ...extra])].sort();
3198
3209
  o.out(`rightkit-gate: Cargo output scope ${scopeDirs.join(", ")}: ${workspaces.length} workspace(s) (${workspaces.join(", ") || "none"}); dependency directories ${closure.dependencyDirs.join(", ")}`);
3199
3210
  return { manifests: workspaces.map((dir) => path.posix.join(dir, "Cargo.toml")), hasCargo: allManifests.length > 0 };
@@ -3437,7 +3448,9 @@ async function runUnitSnapshot(o, args, root, git, io, option) {
3437
3448
  }
3438
3449
  // The gate package's package stage on the Mac builds and signs its swap helper from crates/rightkit-fs (local-publish.mjs prepareSwapHelper), so that
3439
3450
  // Cargo workspace is bound beside the package's own (0.6.80 on the Mac: RK_CARGO_UNBOUND_WORKSPACE "resolved (none)" for the helper build).
3440
- if (selector === "npm:@rightkit/release" && o.platform === "darwin") consumerScope = [...new Set([...consumerScope, "crates/rightkit-fs"])];
3451
+ // rightkit-fs is a member of the repository's one Cargo workspace (the root Cargo.toml), so the workspace bound is the root ".", not the crate's folder:
3452
+ // binding "crates/rightkit-fs" left the root manifest out of the walk and bound the crate folder, which Cargo never resolves to (0.6.81 on the Mac).
3453
+ if (selector === "npm:@rightkit/release" && o.platform === "darwin") consumerScope = [...new Set([...consumerScope, "."])];
3441
3454
  const bound = option("--to") === "check" || privateUnit.private ? { env: {}, cleanup() {} } : await bindUnitCargo({ o, git, root, ds, executor, which, scopeDirs: [path.posix.dirname(manifest)], extraWorkspaces: consumerScope, ...(toolRun ? { onlyWorkspaces: [path.posix.dirname(manifest)] } : {}) });
3442
3455
  if (bound.refusal) { o.err(`${tag} BLOCKED: RK_SNAPSHOT_OUTPUT_UNPINNED: ${bound.refusal}; nothing ran`); return 1; }
3443
3456
  if (bound.note) o.out(`${tag} ${bound.note}`);
@@ -5881,7 +5894,10 @@ export async function main(argv, io = {}) {
5881
5894
  note: (text) => o.out(`${tag} built programs: ${text}`),
5882
5895
  });
5883
5896
  const outputWorkspaces = (snapshotBroker ? scanResult.scans.map((r) => r.snapshotEvidence?.outputDir) : Object.values(targetDirs ?? {})).filter(Boolean).map((dir) => [dir]);
5884
- o.onCompileOutputs?.(outputWorkspaces.map(([dir]) => dir), builtBins);
5897
+ // Each broker row's output folder with its Cargo workspace (repository-relative), so a later stage of the same door run can resolve that workspace's
5898
+ // target before its own first Cargo call (a multi-workspace app's package admission, CodeRight on the Mac 0.6.80: RK_SPLIT_TARGET_UNRESOLVED).
5899
+ const outputsByCargoDir = snapshotBroker ? scanResult.scans.flatMap((r) => { const unit = unitByName.get(rustUnitOfScanId(r.id, known)); const dir = r.snapshotEvidence?.outputDir; return typeof unit?.cargoDir === "string" && typeof dir === "string" && dir ? [[unit.cargoDir, dir]] : []; }) : [];
5900
+ o.onCompileOutputs?.(outputWorkspaces.map(([dir]) => dir), builtBins, outputsByCargoDir);
5885
5901
  o.out(`${tag} class B keying: ${ROW_DIGEST_STATS.misses} row digest(s) computed in ${(ROW_DIGEST_STATS.ms / 1000).toFixed(1)} s, ${ROW_DIGEST_STATS.hits} reused`);
5886
5902
  if (snapshotBroker) o.out(`${tag} broker compile: ${new Set(scanResult.scans.map((r) => r.snapshotEvidence?.requestId).filter(Boolean)).size} carried request(s) with verified signed receipts (${scanResult.scans.filter((r) => r.snapshotEvidence).length} scan row(s)); no direct receipt on a broker host`);
5887
5903
  else {
package/install-app.mjs CHANGED
@@ -7,6 +7,7 @@ import { detachWithRetry } from "./hdiutil-detach.mjs";
7
7
  import { previousPathOf } from "./in-place-install.mjs";
8
8
  import { assertShippedSwapHelperSigned } from "./swap-helper-bundle.mjs";
9
9
  import { installAppWindows, InstallAppWindowsError } from "./install-app-windows.mjs";
10
+ import { createHash } from "node:crypto";
10
11
  import fs from "node:fs";
11
12
  import os from "node:os";
12
13
  import path from "node:path";
@@ -253,13 +254,31 @@ function coded(code, message) {
253
254
  // A helper that exists must be code-signed (#258): an unsigned one is a typed SWAP_HELPER_UNSIGNED error naming the fix,
254
255
  // never a silent downgrade. No helper at all keeps the documented journaled two-rename fallback, which is logged
255
256
  // (`swap-fallback`, then `replaced {swap}`).
257
+ /**
258
+ * The committed helper reaches a Mac without its executable bit when the gate package was packed on Windows (no mode bits there; 0.6.81), and an
259
+ * installed gate's folder is read-only. Such a helper runs as a private copy with mode 0755 under the temporary folder, named by its sha256; the
260
+ * copy keeps the embedded code signature, which was checked on the shipped file. An executable helper, or any failure here, runs as it is.
261
+ */
262
+ export function runnableHelper(helper, { fsImpl = fs, tmp = os.tmpdir() } = {}) {
263
+ try {
264
+ if (process.platform === "win32" || (fsImpl.statSync(helper).mode & 0o111) !== 0) return helper;
265
+ const bytes = fsImpl.readFileSync(helper);
266
+ const copy = path.join(tmp, `rightkit-swap-${createHash("sha256").update(bytes).digest("hex").slice(0, 16)}`);
267
+ let ready = false;
268
+ try { ready = fsImpl.readFileSync(copy).equals(bytes) && (fsImpl.statSync(copy).mode & 0o111) !== 0; } catch { ready = false; }
269
+ if (!ready) { fsImpl.writeFileSync(copy, bytes, { mode: 0o755 }); fsImpl.chmodSync(copy, 0o755); }
270
+ return copy;
271
+ } catch { return helper; }
272
+ }
273
+
256
274
  export function createSwapPaths({ env = process.env, resolve = resolveSwapHelper, execFileSync = nodeExecFileSync, assertSigned = assertShippedSwapHelperSigned } = {}) {
257
275
  const checked = new Set();
258
276
  return (a, b) => {
259
277
  const helper = resolve({ env });
260
278
  if (!helper) throw coded("ENOHELPER", `${SWAP_HELPER_NAME} helper not found`);
261
279
  if (!checked.has(helper)) { assertSigned({ file: helper, execFileSync }); checked.add(helper); }
262
- try { execFileSync(helper, [a, b], { encoding: "utf8", stdio: ["ignore", "pipe", "pipe"] }); }
280
+ const program = runnableHelper(helper);
281
+ try { execFileSync(program, [a, b], { encoding: "utf8", stdio: ["ignore", "pipe", "pipe"] }); }
263
282
  catch (error) {
264
283
  const text = `${error?.stderr || ""}`.trim();
265
284
  if (error?.code === "ENOENT" || error?.code === "EACCES") throw coded("ENOHELPER", `${helper} cannot run: ${error.code}`);
package/local-publish.mjs CHANGED
@@ -267,7 +267,12 @@ const defaultReadJson = (file) => { try { return JSON.parse(fs.readFileSync(file
267
267
 
268
268
  async function defaultRegistryHas({ kind, name, version }) {
269
269
  if (kind === "npm") {
270
- const view = spawnSync("npm", ["view", `${name}@${version}`, "version", "--prefer-online", "--registry", "https://registry.npmjs.org/"], { encoding: "utf8", windowsHide: true });
270
+ // npm is a .cmd shim on Windows, which Node starts only through cmd.exe: started directly it never ran and the error was empty (0.6.81 on the
271
+ // Dell, the first npm unit packaged there). The arguments are a validated package name, a version and a fixed URL.
272
+ const args = ["view", `${name}@${version}`, "version", "--prefer-online", "--registry", "https://registry.npmjs.org/"];
273
+ const view = process.platform === "win32"
274
+ ? spawnSync(process.env.ComSpec || "cmd.exe", ["/d", "/s", "/c", "npm", ...args], { encoding: "utf8", windowsHide: true })
275
+ : spawnSync("npm", args, { encoding: "utf8", windowsHide: true });
271
276
  const out = `${view.stdout ?? ""}${view.stderr ?? ""}`;
272
277
  if (!view.error && view.status === 0) return (view.stdout ?? "").trim() === version;
273
278
  if (/E404|404 Not Found/i.test(out)) return false;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@rightkit/release",
3
- "version": "0.6.80",
3
+ "version": "0.6.81",
4
4
  "description": "Portable release CLI/SDK with fail-closed public GitHub Releases and private R2 + RightApps distribution.",
5
5
  "license": "MIT OR Apache-2.0",
6
6
  "type": "module",
@@ -87,7 +87,8 @@
87
87
  "!gate/*.test.mjs",
88
88
  "!standalone-clone-evidence.json",
89
89
  "!refusals.json",
90
- "!provenance-real-receipt.fixture.json"
90
+ "!provenance-real-receipt.fixture.json",
91
+ "acceptance-lines.test.mjs"
91
92
  ],
92
93
  "sideEffects": false,
93
94
  "publishConfig": {
@@ -104,7 +105,7 @@
104
105
  "smol-toml": "1.9.1"
105
106
  },
106
107
  "scripts": {
107
- "test": "node --test acceptance-admission.test.mjs acceptance-lines.test.mjs acceptance-cases.test.mjs rule-verdict-cache.test.mjs class-b-dispatch.test.mjs remember-reads.test.mjs sidecar-source.test.mjs caller-levers.test.mjs class-a-cache-history.test.mjs gate-fixed-levers.test.mjs broker-toolchain.test.mjs snapshot-changes.test.mjs gate-serve-changes.test.mjs gate-serve-helper.test.mjs resident-answers.test.mjs probe-memo-kept.test.mjs class-a-lanes.test.mjs feature-partition-targets.test.mjs class-b-target-groups.test.mjs unit-list-lock.test.mjs cargo-profile-check.test.mjs cargo-home-real-path.test.mjs class-a-cache-admission.test.mjs class-b-cache-admission.test.mjs shellcheck-cache-inputs.test.mjs implicit-features.test.mjs test-group-failure-cache.test.mjs sealed-listing-store.test.mjs gate/gate.test.mjs package-files.test.mjs host-gate.test.mjs publish-local-cargo.test.mjs publish-local-npm.test.mjs shell-contract-hub-window.test.mjs cargo-license-notices-paths.test.mjs affected-units.test.mjs batch-workspace.test.mjs unit-list-plan.test.mjs compile-inputs.test.mjs snapshot-dependency-reuse.test.mjs publisher-requirement-scan.test.mjs node-check-cache.test.mjs preparation-diagnostics.test.mjs gate-coverage-timing.test.mjs ci-compile-admission.test.mjs qualification-verify.test.mjs test-run-output.test.mjs feature-partition.test.mjs feature-sets.test.mjs gate-seam.test.mjs serial-row.test.mjs seam-repairs.test.mjs snapshot-lock.test.mjs lock-identity.test.mjs stamp-relay.test.mjs install-tauri-authenticode.test.mjs gate-stage-binding.test.mjs tool-output.test.mjs publication-gate.test.mjs gate-release-admission.test.mjs cache-key-explain.test.mjs external-inputs.test.mjs built-bins.test.mjs probe-memo.test.mjs gate-serve-ask.test.mjs double-pass.test.mjs tool-version-memo.test.mjs workspace-manifests.test.mjs test-failure-cache.test.mjs served-metadata.test.mjs windows-pnpm-identity.test.mjs",
108
+ "test": "node --test acceptance-admission.test.mjs acceptance-lines.test.mjs acceptance-cases.test.mjs rule-verdict-cache.test.mjs class-b-dispatch.test.mjs remember-reads.test.mjs sidecar-source.test.mjs caller-levers.test.mjs class-a-cache-history.test.mjs gate-fixed-levers.test.mjs broker-toolchain.test.mjs snapshot-changes.test.mjs gate-serve-changes.test.mjs gate-serve-helper.test.mjs resident-answers.test.mjs probe-memo-kept.test.mjs class-a-lanes.test.mjs feature-partition-targets.test.mjs class-b-target-groups.test.mjs unit-list-lock.test.mjs cargo-profile-check.test.mjs cargo-home-real-path.test.mjs class-a-cache-admission.test.mjs class-b-cache-admission.test.mjs shellcheck-cache-inputs.test.mjs implicit-features.test.mjs test-group-failure-cache.test.mjs sealed-listing-store.test.mjs gate/gate.test.mjs package-files.test.mjs host-gate.test.mjs publish-local-cargo.test.mjs publish-local-npm.test.mjs shell-contract-hub-window.test.mjs cargo-license-notices-paths.test.mjs rightkit-freshness-direct.test.mjs swap-helper-committed.test.mjs affected-units.test.mjs batch-workspace.test.mjs unit-list-plan.test.mjs compile-inputs.test.mjs snapshot-dependency-reuse.test.mjs publisher-requirement-scan.test.mjs node-check-cache.test.mjs preparation-diagnostics.test.mjs gate-coverage-timing.test.mjs ci-compile-admission.test.mjs qualification-verify.test.mjs test-run-output.test.mjs feature-partition.test.mjs feature-sets.test.mjs gate-seam.test.mjs serial-row.test.mjs seam-repairs.test.mjs snapshot-lock.test.mjs lock-identity.test.mjs stamp-relay.test.mjs install-tauri-authenticode.test.mjs gate-stage-binding.test.mjs tool-output.test.mjs publication-gate.test.mjs gate-release-admission.test.mjs cache-key-explain.test.mjs external-inputs.test.mjs built-bins.test.mjs probe-memo.test.mjs gate-serve-ask.test.mjs double-pass.test.mjs tool-version-memo.test.mjs workspace-manifests.test.mjs test-failure-cache.test.mjs served-metadata.test.mjs windows-pnpm-identity.test.mjs",
108
109
  "test:registry-parity": "node registry-parity.mjs --allow-unpublished",
109
110
  "test:signer:windows": "node sign-release-manifest.integration.mjs",
110
111
  "verify:standalone": "node standalone-clone-verify.mjs"
@@ -661,7 +661,11 @@ function holdFor(holds, name) {
661
661
  * (`tasks`), never permission to seal a stale pin; no exception is derived from right-update's hold list.
662
662
  * - otherwise (doctor): the same rows are informational `newer` lines.
663
663
  */
664
- export function evaluateRightKitFreshness(snapshot, holds, { enforce = false } = {}) {
664
+ export function evaluateRightKitFreshness(snapshot, holds, { enforce = false, declared = null } = {}) {
665
+ // `declared`: the RightKit names the app's own manifests declare (`${ecosystem}\0${name}`). A stale entry the app does not declare is a
666
+ // transitive lock entry: only the RightKit units that depend on it can move it, so it is reported, never refused (Pulse 0.6.80: rightkit-fs
667
+ // 0.4.19, required ^0.4 by the latest rightkit-http, -pdf and others). With no set given every entry is judged as before.
668
+ const isDirect = (entry) => !declared || declared.has(`${entry.ecosystem}\0${entry.name}`);
665
669
  const refusals = [];
666
670
  const newer = [];
667
671
  const tasks = [];
@@ -673,6 +677,10 @@ export function evaluateRightKitFreshness(snapshot, holds, { enforce = false } =
673
677
  const seen = newest.get(`${entry.ecosystem}\0${entry.name}`);
674
678
  if (!seen || compareVersions(entry.version, seen.latest) >= 0) continue;
675
679
  const age = seen.via === "cache" ? ` (latest from cached observation ${seen.observedAt}, ${formatAge(seen.ageMs)} old; last-observed, not current)` : "";
680
+ if (!isDirect(entry)) {
681
+ warnings.push(`${entry.name} ${entry.version} is in the lock only through other RightKit units (latest ${seen.latest}${age}); the app does not declare it, so it moves when those units republish on the new version`);
682
+ continue;
683
+ }
676
684
  const hold = holdFor(holds, entry.name);
677
685
  const line = `${entry.name} pinned ${entry.version} -> latest ${seen.latest}${age}: ${FIX}`;
678
686
  if (hold) tasks.push(`${entry.name} pinned ${entry.version}, latest ${seen.latest}: held by .rightkit/update.json (${hold}); migration lane task, not current and not permission to seal`);
@@ -721,7 +729,9 @@ export async function prepareRightKitResolution({ root, snapshotFile = null, bou
721
729
  // Freshness is an admission gate. A bound snapshot is frozen evidence: seal, resume and upload never re-check it,
722
730
  // so a publication after admission neither mutates nor restarts an admitted build.
723
731
  const enforce = admission && source === "resolved";
724
- const freshness = evaluateRightKitFreshness(snapshot, readUpdateHolds(root), { enforce });
732
+ let declared = null;
733
+ try { declared = new Set(declaredRightKitDependencies(root, ownedRightKitNames(versions, ownership), options.extraLocks ?? []).map((d) => `${d.ecosystem}\0${d.name}`)); } catch { declared = null; }
734
+ const freshness = evaluateRightKitFreshness(snapshot, readUpdateHolds(root), { enforce, declared });
725
735
  if (freshness.refusals.length) {
726
736
  throw new RightKitRegistryError("stale-pin", `RightKit pins are behind the latest published version (build admission refused):\n${freshness.refusals.map((p) => `- ${p}`).join("\n")}`, { problems: freshness.refusals });
727
737
  }
@@ -20,7 +20,7 @@
20
20
  "@rightkit/agent-ui-settings": "0.1.1",
21
21
  "@rightkit/agent-ui-web": "0.1.0",
22
22
  "@rightkit/agent-ui-workbench": "0.1.1",
23
- "@rightkit/app-update": "0.4.6",
23
+ "@rightkit/app-update": "0.4.7",
24
24
  "@rightkit/ax": "0.3.2",
25
25
  "@rightkit/blender-worker": "0.1.1",
26
26
  "@rightkit/ci": "0.3.2",
@@ -33,28 +33,28 @@
33
33
  "@rightkit/html-editor": "0.2.0",
34
34
  "@rightkit/i18n": "0.2.1",
35
35
  "@rightkit/issues-tracker": "0.1.0",
36
- "@rightkit/legal": "0.6.3",
36
+ "@rightkit/legal": "0.6.4",
37
37
  "@rightkit/legal-ui": "0.4.2",
38
- "@rightkit/library-ui": "0.2.5",
38
+ "@rightkit/library-ui": "0.2.6",
39
39
  "@rightkit/license": "0.3.5",
40
40
  "@rightkit/logs": "0.1.7",
41
41
  "@rightkit/mail-ui": "0.2.2",
42
42
  "@rightkit/markdown-editor": "0.2.0",
43
43
  "@rightkit/media-gen-ui": "0.2.1",
44
44
  "@rightkit/media-ui": "0.3.6",
45
- "@rightkit/onboarding": "0.6.9",
45
+ "@rightkit/onboarding": "0.6.10",
46
46
  "@rightkit/outdated": "0.3.1",
47
47
  "@rightkit/pdf-ui": "0.3.1",
48
48
  "@rightkit/platform-ui": "0.4.5",
49
49
  "@rightkit/qa": "0.7.0",
50
50
  "@rightkit/qa-chrome": "0.1.12",
51
51
  "@rightkit/react-shell": "0.7.9",
52
- "@rightkit/release": "0.6.80",
52
+ "@rightkit/release": "0.6.81",
53
53
  "@rightkit/send-ui": "0.1.0",
54
- "@rightkit/settings-ui": "0.7.6",
54
+ "@rightkit/settings-ui": "0.7.7",
55
55
  "@rightkit/social-ui": "0.2.1",
56
56
  "@rightkit/system-ui": "0.2.2",
57
- "@rightkit/tauri": "0.4.5",
57
+ "@rightkit/tauri": "0.4.6",
58
58
  "@rightkit/tauri-shell": "0.1.4",
59
59
  "@rightkit/terminal-ui": "0.1.0",
60
60
  "@rightkit/theme": "0.3.4",
@@ -81,7 +81,8 @@
81
81
  "0.4.0",
82
82
  "0.4.1",
83
83
  "0.4.2",
84
- "0.4.4"
84
+ "0.4.4",
85
+ "0.4.6"
85
86
  ],
86
87
  "@rightkit/ax": [
87
88
  "0.2.0",
@@ -165,7 +166,8 @@
165
166
  "0.5.0",
166
167
  "0.6.0",
167
168
  "0.6.1",
168
- "0.6.2"
169
+ "0.6.2",
170
+ "0.6.3"
169
171
  ],
170
172
  "@rightkit/legal-ui": [
171
173
  "0.1.0",
@@ -228,7 +230,8 @@
228
230
  "0.6.3",
229
231
  "0.6.5",
230
232
  "0.6.6",
231
- "0.6.7"
233
+ "0.6.7",
234
+ "0.6.9"
232
235
  ],
233
236
  "@rightkit/outdated": [
234
237
  "0.2.0",
@@ -442,7 +445,8 @@
442
445
  "0.6.75",
443
446
  "0.6.77",
444
447
  "0.6.78",
445
- "0.6.79"
448
+ "0.6.79",
449
+ "0.6.80"
446
450
  ],
447
451
  "@rightkit/settings-ui": [
448
452
  "0.1.0",
@@ -468,7 +472,8 @@
468
472
  "0.6.1",
469
473
  "0.7.0",
470
474
  "0.7.3",
471
- "0.7.4"
475
+ "0.7.4",
476
+ "0.7.6"
472
477
  ],
473
478
  "@rightkit/shell": [
474
479
  "0.1.0"
@@ -484,7 +489,8 @@
484
489
  "0.2.3",
485
490
  "0.3.0",
486
491
  "0.4.2",
487
- "0.4.3"
492
+ "0.4.3",
493
+ "0.4.5"
488
494
  ],
489
495
  "@rightkit/tauri-shell": [
490
496
  "0.1.1",
@@ -506,6 +512,9 @@
506
512
  ],
507
513
  "@rightkit/video-ui": [
508
514
  "0.2.1"
515
+ ],
516
+ "@rightkit/library-ui": [
517
+ "0.2.5"
509
518
  ]
510
519
  },
511
520
  "cargo": {
@@ -578,7 +587,7 @@
578
587
  "rightkit-approvals": "0.2.2",
579
588
  "rightkit-asr": "0.5.2",
580
589
  "rightkit-assist": "0.1.1",
581
- "rightkit-audio": "0.4.3",
590
+ "rightkit-audio": "0.4.4",
582
591
  "rightkit-autoedit": "0.2.0",
583
592
  "rightkit-automation": "0.7.6",
584
593
  "rightkit-autostart": "0.1.1",
@@ -589,7 +598,7 @@
589
598
  "rightkit-captions": "0.1.1",
590
599
  "rightkit-catalog": "0.1.0",
591
600
  "rightkit-channel-memory": "0.2.3",
592
- "rightkit-chat-bridge": "0.2.2",
601
+ "rightkit-chat-bridge": "0.2.4",
593
602
  "rightkit-child-process": "0.5.17",
594
603
  "rightkit-clipboard": "0.1.0",
595
604
  "rightkit-clipboard-history": "0.4.0",
@@ -626,16 +635,16 @@
626
635
  "rightkit-device-link-core": "0.1.1",
627
636
  "rightkit-device-link-types": "0.1.2",
628
637
  "rightkit-dictation-app-runtime": "0.3.1",
629
- "rightkit-dictation-command-host": "0.3.3",
638
+ "rightkit-dictation-command-host": "0.3.4",
630
639
  "rightkit-dictation-core": "0.3.7",
631
640
  "rightkit-dictation-engine": "0.2.1",
632
641
  "rightkit-dictation-ffi": "0.2.1",
633
642
  "rightkit-dictation-inference": "0.2.4",
634
643
  "rightkit-dictation-models": "0.3.3",
635
- "rightkit-dictation-pill": "0.1.1",
644
+ "rightkit-dictation-pill": "0.1.2",
636
645
  "rightkit-dictation-runtime": "0.2.7",
637
- "rightkit-dictation-tauri": "0.3.3",
638
- "rightkit-dictation-telemetry": "0.2.3",
646
+ "rightkit-dictation-tauri": "0.3.4",
647
+ "rightkit-dictation-telemetry": "0.2.4",
639
648
  "rightkit-dictation-text-pipeline": "0.2.7",
640
649
  "rightkit-disk-cleanup": "0.2.2",
641
650
  "rightkit-docs": "0.1.6",
@@ -692,7 +701,7 @@
692
701
  "rightkit-mesh": "0.2.3",
693
702
  "rightkit-models": "0.7.2",
694
703
  "rightkit-motion": "0.4.0",
695
- "rightkit-notch-ui": "0.2.2",
704
+ "rightkit-notch-ui": "0.2.3",
696
705
  "rightkit-notifications": "0.1.2",
697
706
  "rightkit-now-playing": "0.1.0",
698
707
  "rightkit-oauth": "0.11.1",
@@ -714,7 +723,7 @@
714
723
  "rightkit-profile": "0.1.0",
715
724
  "rightkit-prompt-recipes": "0.2.1",
716
725
  "rightkit-pty": "0.1.3",
717
- "rightkit-qa": "0.10.11",
726
+ "rightkit-qa": "0.10.12",
718
727
  "rightkit-record": "0.4.1",
719
728
  "rightkit-reframe": "0.2.0",
720
729
  "rightkit-remote-compute": "0.2.1",
@@ -736,18 +745,18 @@
736
745
  "rightkit-social-publish": "0.2.0",
737
746
  "rightkit-speech-client": "0.5.0",
738
747
  "rightkit-spend": "0.2.4",
739
- "rightkit-sync": "0.4.3",
748
+ "rightkit-sync": "0.4.4",
740
749
  "rightkit-sync-keys": "0.1.0",
741
750
  "rightkit-sysmem": "0.1.0",
742
751
  "rightkit-system-monitor": "0.3.2",
743
- "rightkit-tauri-shell": "0.8.9",
752
+ "rightkit-tauri-shell": "0.8.10",
744
753
  "rightkit-terminal-ui": "0.1.3",
745
754
  "rightkit-text-polish": "0.1.4",
746
755
  "rightkit-theme": "0.1.1",
747
756
  "rightkit-time": "0.1.5",
748
757
  "rightkit-timeline": "0.1.1",
749
758
  "rightkit-transcript": "0.4.2",
750
- "rightkit-transcript-library": "0.1.7",
759
+ "rightkit-transcript-library": "0.1.8",
751
760
  "rightkit-tts": "0.3.2",
752
761
  "rightkit-tts-qwen": "0.3.0",
753
762
  "rightkit-tts-qwen-sys": "0.1.5",
@@ -905,7 +914,7 @@
905
914
  "@rightkit/qa": "0.7.0",
906
915
  "@rightkit/qa-chrome": "0.1.12",
907
916
  "@rightkit/react-shell": "0.7.7",
908
- "@rightkit/release": "0.6.79",
917
+ "@rightkit/release": "0.6.80",
909
918
  "@rightkit/settings-ui": "0.7.4",
910
919
  "@rightkit/shell": "0.1.1",
911
920
  "@rightkit/tauri": "0.4.3",
@@ -997,7 +1006,8 @@
997
1006
  "0.3.8",
998
1007
  "0.3.9",
999
1008
  "0.4.0",
1000
- "0.4.1"
1009
+ "0.4.1",
1010
+ "0.4.3"
1001
1011
  ],
1002
1012
  "rightkit-automation": [
1003
1013
  "0.3.0",
@@ -1035,7 +1045,9 @@
1035
1045
  ],
1036
1046
  "rightkit-chat-bridge": [
1037
1047
  "0.2.0",
1038
- "0.2.1"
1048
+ "0.2.1",
1049
+ "0.2.2",
1050
+ "0.2.3"
1039
1051
  ],
1040
1052
  "rightkit-child-process": [
1041
1053
  "0.4.0",
@@ -1142,7 +1154,8 @@
1142
1154
  ],
1143
1155
  "rightkit-dictation-command-host": [
1144
1156
  "0.3.0",
1145
- "0.3.1"
1157
+ "0.3.1",
1158
+ "0.3.3"
1146
1159
  ],
1147
1160
  "rightkit-dictation-core": [
1148
1161
  "0.3.1",
@@ -1161,17 +1174,20 @@
1161
1174
  "0.3.1"
1162
1175
  ],
1163
1176
  "rightkit-dictation-pill": [
1164
- "0.1.0"
1177
+ "0.1.0",
1178
+ "0.1.1"
1165
1179
  ],
1166
1180
  "rightkit-dictation-runtime": [
1167
1181
  "0.2.5"
1168
1182
  ],
1169
1183
  "rightkit-dictation-tauri": [
1170
- "0.3.1"
1184
+ "0.3.1",
1185
+ "0.3.3"
1171
1186
  ],
1172
1187
  "rightkit-dictation-telemetry": [
1173
1188
  "0.2.0",
1174
- "0.2.2"
1189
+ "0.2.2",
1190
+ "0.2.3"
1175
1191
  ],
1176
1192
  "rightkit-dictation-text-pipeline": [
1177
1193
  "0.2.5",
@@ -1374,7 +1390,8 @@
1374
1390
  "0.2.0"
1375
1391
  ],
1376
1392
  "rightkit-notch-ui": [
1377
- "0.2.1"
1393
+ "0.2.1",
1394
+ "0.2.2"
1378
1395
  ],
1379
1396
  "rightkit-notifications": [
1380
1397
  "0.1.0",
@@ -1477,7 +1494,8 @@
1477
1494
  "0.9.0",
1478
1495
  "0.9.1",
1479
1496
  "0.10.8",
1480
- "0.10.10"
1497
+ "0.10.10",
1498
+ "0.10.11"
1481
1499
  ],
1482
1500
  "rightkit-qa-driver": [
1483
1501
  "0.3.0",
@@ -1595,7 +1613,8 @@
1595
1613
  "0.3.0",
1596
1614
  "0.4.0",
1597
1615
  "0.4.1",
1598
- "0.4.2"
1616
+ "0.4.2",
1617
+ "0.4.3"
1599
1618
  ],
1600
1619
  "rightkit-system-monitor": [
1601
1620
  "0.3.0",
@@ -1613,7 +1632,8 @@
1613
1632
  "0.5.1",
1614
1633
  "0.6.0",
1615
1634
  "0.8.2",
1616
- "0.8.7"
1635
+ "0.8.7",
1636
+ "0.8.9"
1617
1637
  ],
1618
1638
  "rightkit-text-polish": [
1619
1639
  "0.1.1",
@@ -1634,7 +1654,8 @@
1634
1654
  ],
1635
1655
  "rightkit-transcript-library": [
1636
1656
  "0.1.2",
1637
- "0.1.4"
1657
+ "0.1.4",
1658
+ "0.1.7"
1638
1659
  ],
1639
1660
  "rightkit-tts": [
1640
1661
  "0.1.0",
@@ -31,6 +31,11 @@ export class SwapHelperError extends Error {
31
31
  const helperPath = (packageDir) => path.join(packageDir, ...SWAP_HELPER_BIN);
32
32
  const receiptPath = (packageDir) => path.join(packageDir, ...SWAP_HELPER_RECEIPT);
33
33
  const sha256 = (fs, file) => crypto.createHash("sha256").update(fs.readFileSync(file)).digest("hex");
34
+ /** The committed helper's sha256 (`bin/darwin/rightkit-swap.sha256`, `<hex> rightkit-swap`), or null when the file is absent or unreadable. */
35
+ export function committedSwapHelperDigest(packageDir, fs = nodeFs) {
36
+ try { const m = /^([0-9a-f]{64})\s+\*?rightkit-swap\s*$/m.exec(fs.readFileSync(path.join(packageDir, "bin", "darwin", "rightkit-swap.sha256"), "utf8")); return m ? m[1] : null; }
37
+ catch { return null; }
38
+ }
34
39
  const tail = (text, lines = 30) => String(text ?? "").split(/\r?\n/).slice(-lines).join("\n");
35
40
 
36
41
  /** True when `codesign --verify --strict` accepts the file. Only meaningful on macOS. */
@@ -60,6 +65,9 @@ export function prepareSwapHelper({
60
65
  }) {
61
66
  const dest = helperPath(packageDir);
62
67
  if (platform !== "darwin") {
68
+ // Off the Mac codesign cannot run: the committed helper is taken when its bytes hash to the committed digest (it was verified when it was committed).
69
+ const committed = committedSwapHelperDigest(packageDir, fs);
70
+ if (committed && fs.existsSync(dest) && sha256(fs, dest) === committed) return { file: dest, signed: true, built: false, identity: null };
63
71
  let receipt = null;
64
72
  try { receipt = JSON.parse(fs.readFileSync(receiptPath(packageDir), "utf8")); } catch { /* refused below */ }
65
73
  if (!fs.existsSync(dest) || receipt?.schema !== 1 || receipt.sha256 !== sha256(fs, dest)) {
@@ -68,6 +76,14 @@ export function prepareSwapHelper({
68
76
  return { file: dest, signed: true, built: false, identity: receipt.identity ?? null };
69
77
  }
70
78
  const fail = (code, message) => { throw new SwapHelperError(code, message); };
79
+ // The committed helper: bin/darwin/rightkit-swap is checked in with its sha256 (bin/darwin/rightkit-swap.sha256), signed once. When its bytes
80
+ // hash to the committed digest and its code signature verifies, the pack uses it as it is: no Cargo build and no signing (0.6.81).
81
+ const committedDigest = committedSwapHelperDigest(packageDir, fs);
82
+ if (committedDigest && fs.existsSync(dest) && sha256(fs, dest) === committedDigest) {
83
+ if (!isSwapHelperSigned(dest)) fail("SWAP_HELPER_UNSIGNED", `the committed ${SWAP_HELPER_BIN.join("/")} matches its sha256 but its code signature does not verify`);
84
+ log(`[right-release] using the committed signed ${SWAP_HELPER_BIN.join("/")} (sha256 ${committedDigest})`);
85
+ return { file: dest, signed: true, built: false, identity: null };
86
+ }
71
87
  const built = run("cargo", SWAP_HELPER_CARGO_ARGS, { cwd: workspaceRoot, env });
72
88
  if (built.error || built.status !== 0) fail("SWAP_HELPER_BUILD_FAILED", `rustright cargo ${SWAP_HELPER_CARGO_ARGS.join(" ")} failed (${built.error?.message ?? `exit ${built.status}`})\n${tail(`${built.stdout ?? ""}\n${built.stderr ?? ""}`)}`);
73
89
  const meta = run("cargo", SWAP_HELPER_METADATA_ARGS, { cwd: workspaceRoot, env });
package/unit-gate.mjs CHANGED
@@ -10,7 +10,7 @@ import { readCargoPackage } from "./crate-graph.mjs";
10
10
  import { spawnSync as nodeSpawnSync } from "./background-process.mjs";
11
11
  import { endRun, startRun, stagesTo } from "./gate-stages.mjs";
12
12
  import { RIGHTKIT_REPOSITORY, buildDirectOrigin, directStageEvidence, verifyDirectOrigin } from "./direct-origin.mjs";
13
- import { exclusionsFor } from "./pack-digest.mjs";
13
+ import { SWAP_HELPER_ARCHIVE_BIN, exclusionsFor } from "./pack-digest.mjs";
14
14
  import { verifyQualificationReceipts } from "./qualification-verify.mjs";
15
15
  import { makeCiCompileProof, verifyCiCompileProof } from "./ci-compile-admission.mjs";
16
16
  import { assignJobs, describeCommand, directRowsNotRun, expectedStageCommands } from "./stage-commands.mjs";
@@ -97,7 +97,9 @@ export function writeQualification({ report, artifact, unit, commit, tree, runti
97
97
  if (excluded.length && executor?.kind === "direct") {
98
98
  // A Linux direct origin neither builds nor signs the swap helper (publish.yml's build-swap/sign-swap do, hosted): its archive holds neither
99
99
  // entry, and says so. The Mac rule below is unchanged.
100
- if (!Array.isArray(artifact.contentExcluded) || artifact.contentExcluded.length) throw new Error(`a direct origin's ${unit.name} archive must hold neither ${excluded.join(" nor ")}`);
100
+ // Since 0.6.81 the helper is committed (signed once), so the archive holds it; a signing receipt it must still not hold, and the hosted
101
+ // sign-swap job still binds the helper it publishes.
102
+ if (!Array.isArray(artifact.contentExcluded) || artifact.contentExcluded.some((p) => p !== SWAP_HELPER_ARCHIVE_BIN)) throw new Error(`a direct origin's ${unit.name} archive may hold the committed ${SWAP_HELPER_ARCHIVE_BIN} but no signing receipt (it holds ${(artifact.contentExcluded ?? []).join(", ") || "an unreadable list"})`);
101
103
  content.contentExcluded = [];
102
104
  } else if (excluded.length) {
103
105
  if (!Array.isArray(artifact.contentExcluded) || [...artifact.contentExcluded].sort().join("\n") !== [...excluded].sort().join("\n")) throw new Error(`release needs the qualified ${unit.name} archive to hold ${excluded.join(" and ")}`);