@rightkit/release 0.6.84 → 0.6.85
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/bin/darwin/rightkit-swap +0 -0
- package/deps.mjs +0 -0
- package/lsclean.sh +0 -0
- package/ownership-approval.mjs +19 -3
- package/ownership-evidence.mjs +1 -0
- package/ownership-verdict.mjs +1 -0
- package/package.json +1 -1
- package/publish-local-npm.mjs +2 -1
- package/release-qa-command.mjs +1 -1
- package/release.mjs +0 -0
- package/rightkit-versions.json +10 -7
- package/upload-large.mjs +0 -0
package/bin/darwin/rightkit-swap
CHANGED
|
File without changes
|
package/deps.mjs
CHANGED
|
File without changes
|
package/lsclean.sh
CHANGED
|
File without changes
|
package/ownership-approval.mjs
CHANGED
|
@@ -230,15 +230,31 @@ export function resolveKeyLogTrust(trust, logBytes) {
|
|
|
230
230
|
const enrollmentComplete = REQUIRED_HOSTS.every((platform) => completedPlatforms.has(platform));
|
|
231
231
|
return { ok: true, trust: { ...trust, ownershipKeys: verified.keys, ownershipAllKeys: verified.allKeys, enrollmentComplete, revokedKeyIds: [...new Set([...(trust.revokedKeyIds ?? []), ...verified.revokedKeyIds])] }, keyLogDigest: logDigest, checkpoint: verified.checkpoint };
|
|
232
232
|
}
|
|
233
|
-
|
|
233
|
+
// The registry this gate ships (ownership-repositories.json). The host's protected copy was written by the retired
|
|
234
|
+
// trust-sync and can no longer be refreshed, so a repository registered here but missing there (a renamed origin, a new
|
|
235
|
+
// app) takes its registration from the shipped list (#1775). A repository in neither is still refused.
|
|
236
|
+
let shippedRegistry;
|
|
237
|
+
export function shippedRepositories() {
|
|
238
|
+
if (shippedRegistry === undefined) {
|
|
239
|
+
try {
|
|
240
|
+
const data = JSON.parse(readFileSync(new URL("./ownership-repositories.json", import.meta.url), "utf8"));
|
|
241
|
+
shippedRegistry = Array.isArray(data?.repositories) ? data.repositories : [];
|
|
242
|
+
} catch { shippedRegistry = []; }
|
|
243
|
+
}
|
|
244
|
+
return shippedRegistry;
|
|
245
|
+
}
|
|
246
|
+
const validShippedEntry = (entry) => entry && Array.isArray(entry.roots) && entry.roots.length > 0 && entry.roots.every((root) => exactRepositoryPath(root)) && ["public", "private"].includes(entry.visibility);
|
|
247
|
+
export function verifyRepositoryRegistration(trust, repositoryIdentity, { files = [], shipped = shippedRepositories() } = {}) {
|
|
234
248
|
const validation = validateTrustRegistry(trust);
|
|
235
249
|
if (!validation.ok) return { ok: false, problems: validation.problems };
|
|
236
250
|
let identity;
|
|
237
251
|
try { identity = canonicalRepositoryIdentity(repositoryIdentity); } catch { return { ok: false, problems: ["invalid repository identity"] }; }
|
|
238
|
-
const
|
|
252
|
+
const hostRegistration = trust.repositories.find((entry) => entry.repositoryIdentity === identity);
|
|
253
|
+
const shippedRegistration = hostRegistration ? null : shipped.find((entry) => entry?.repositoryIdentity === identity && validShippedEntry(entry));
|
|
254
|
+
const registration = hostRegistration ?? shippedRegistration;
|
|
239
255
|
if (!registration) return { ok: false, problems: ["repository is not registered in protected trust"] };
|
|
240
256
|
const problems = files.filter((file) => !exactRepositoryPath(file) || !registration.roots.some((root) => withinRoot(file, root))).map((file) => `path outside registered repository roots or malformed: ${file}`);
|
|
241
|
-
return { ok: problems.length === 0, problems, registration };
|
|
257
|
+
return { ok: problems.length === 0, problems, registration, ...(shippedRegistration ? { warnings: [`repository registration for ${identity} comes from this gate's shipped list; this host's protected registry does not have it (warning only)`] } : {}) };
|
|
242
258
|
}
|
|
243
259
|
export function provenanceContentDigest(files) {
|
|
244
260
|
return sha256([...files].map(({ path: file, content }) => ({ path: file, sha256: createHash("sha256").update(content).digest("hex") })).sort((a, b) => a.path.localeCompare(b.path)));
|
package/ownership-evidence.mjs
CHANGED
|
@@ -125,6 +125,7 @@ function createEvidence(repoRoot, {
|
|
|
125
125
|
const origin = useCommittedSource ? source.origin : git(root, ["remote", "get-url", "origin"], gitRunner);
|
|
126
126
|
repositoryIdentity = canonicalRepositoryIdentity(origin);
|
|
127
127
|
registrationCheck = verifyRepositoryRegistration(trustState.trust, repositoryIdentity);
|
|
128
|
+
evidenceDiagnostics.push(...(registrationCheck.warnings ?? []));
|
|
128
129
|
if (!registrationCheck.ok) {
|
|
129
130
|
if (!enrollmentPending) throw new Error(registrationCheck.problems.join("; "));
|
|
130
131
|
evidenceDiagnostics.push(...registrationCheck.problems);
|
package/ownership-verdict.mjs
CHANGED
|
@@ -52,6 +52,7 @@ export function ownershipVerdict(report, trust) {
|
|
|
52
52
|
] });
|
|
53
53
|
} catch { return refuse("RK_OWNERSHIP_INVALID_REGISTRATION", ["protected repository registry is missing or malformed"]); }
|
|
54
54
|
if (!noRegistry && !registration.ok) return refuse("RK_OWNERSHIP_INVALID_REGISTRATION", registration.problems);
|
|
55
|
+
if (!noRegistry) warnings.push(...(registration.warnings ?? []));
|
|
55
56
|
const scannedRoots = report.metadata.roots?.map((entry) => entry.root) ?? [report.metadata.pathPrefix?.replace(/\/$/, "") || "."];
|
|
56
57
|
if (!noRegistry && (new Set(scannedRoots).size !== scannedRoots.length || sha256([...scannedRoots].sort()) !== sha256([...registration.registration.roots].sort())))
|
|
57
58
|
return refuse("RK_OWNERSHIP_INVALID_REGISTRATION", ["scan roots do not exactly cover protected repository registration"]);
|
package/package.json
CHANGED
package/publish-local-npm.mjs
CHANGED
|
@@ -121,7 +121,8 @@ export function publishLocalNpm(argv, { run = spawnSync, log = console.log, plat
|
|
|
121
121
|
if (!fs.existsSync(o.archive)) fail(`--archive ${o.archive} does not exist`);
|
|
122
122
|
tgzFile = path.join(work, path.basename(o.archive));
|
|
123
123
|
fs.copyFileSync(o.archive, tgzFile, fs.constants.COPYFILE_EXCL);
|
|
124
|
-
|
|
124
|
+
// By name from its own folder: GNU tar (first on PATH under Git Bash) reads a drive-letter path such as D:\x.tgz as a remote host.
|
|
125
|
+
const inner = run("tar", ["-xzOf", path.basename(tgzFile), "package/package.json"], { cwd: work, encoding: "utf8", maxBuffer: 1 << 24 });
|
|
125
126
|
let packedManifest = null;
|
|
126
127
|
try { packedManifest = inner.status === 0 ? JSON.parse(String(inner.stdout ?? "")) : null; } catch { packedManifest = null; }
|
|
127
128
|
if (!packedManifest) fail(`--archive ${o.archive} has no readable package/package.json`);
|
package/release-qa-command.mjs
CHANGED
|
@@ -206,13 +206,13 @@ export async function runQa({ stage, platform, releaseIdArg, configPath, deps =
|
|
|
206
206
|
// The journeys runner builds with `rustright cargo` in the app root, not through the seam, so the broker checks the stage's Class A
|
|
207
207
|
// verdict against that directory (its workspace is the cwd relative to the snapshot). Hand it the verdict for that directory, derived
|
|
208
208
|
// from the stage's root verdict exactly as the seam derives one for each of its own calls (seam-broker.mjs verdictForCwd).
|
|
209
|
+
const runCwd = appRoot;
|
|
209
210
|
const stageEnv = deps.env ?? process.env;
|
|
210
211
|
const classAForRoot = sourceListing && stageEnv[CLASS_A_ENV] ? (deps.verdictForCwd ?? verdictForCwd)(stageEnv, runCwd) : null;
|
|
211
212
|
const runEnv = {
|
|
212
213
|
...process.env, ...(sourceListing ? { [QA_SOURCE_LISTING_ENV]: sourceListing } : {}), ...(classAForRoot ? { [CLASS_A_ENV]: classAForRoot } : {}), RIGHT_RELEASE_QA_STAGE: stage, RIGHT_RELEASE_QA_COMMIT: source.commit, RIGHT_RELEASE_QA_RELEASE_ID: releaseId,
|
|
213
214
|
...(sealed ? { RIGHT_RELEASE_QA_SEALED_DIR: sealed.sealedDir } : {}), ...(installedDirs.length ? { RIGHTKIT_QA_INSTALLED_DIRS: installedDirs.join(";") } : {}), ...(installedQa?.env ?? {}),
|
|
214
215
|
};
|
|
215
|
-
const runCwd = appRoot;
|
|
216
216
|
const args = ["run", "--config", qaConfig, ...((config.qa.args?.[stage] ?? []).map(expand))];
|
|
217
217
|
run = (deps.spawnRunner ?? spawnSync)(runnerFile, args, {
|
|
218
218
|
cwd: runCwd, encoding: "utf8", windowsHide: true, maxBuffer: 64 * 1024 * 1024,
|
package/release.mjs
CHANGED
|
File without changes
|
package/rightkit-versions.json
CHANGED
|
@@ -49,7 +49,7 @@
|
|
|
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.
|
|
52
|
+
"@rightkit/release": "0.6.85",
|
|
53
53
|
"@rightkit/send-ui": "0.1.0",
|
|
54
54
|
"@rightkit/settings-ui": "0.7.7",
|
|
55
55
|
"@rightkit/social-ui": "0.2.1",
|
|
@@ -449,7 +449,8 @@
|
|
|
449
449
|
"0.6.80",
|
|
450
450
|
"0.6.81",
|
|
451
451
|
"0.6.82",
|
|
452
|
-
"0.6.83"
|
|
452
|
+
"0.6.83",
|
|
453
|
+
"0.6.84"
|
|
453
454
|
],
|
|
454
455
|
"@rightkit/settings-ui": [
|
|
455
456
|
"0.1.0",
|
|
@@ -553,7 +554,7 @@
|
|
|
553
554
|
"rightkit-agent-engine-attention": "0.2.1",
|
|
554
555
|
"rightkit-agent-engine-cli": "0.1.1",
|
|
555
556
|
"rightkit-agent-engine-core": "0.1.4",
|
|
556
|
-
"rightkit-agent-engine-history": "0.1.
|
|
557
|
+
"rightkit-agent-engine-history": "0.1.6",
|
|
557
558
|
"rightkit-agent-engine-mobile-runtime": "0.1.1",
|
|
558
559
|
"rightkit-agent-engine-protocol": "0.4.1",
|
|
559
560
|
"rightkit-agent-engine-runtime-middleware": "0.1.4",
|
|
@@ -713,7 +714,7 @@
|
|
|
713
714
|
"rightkit-overlay": "0.2.4",
|
|
714
715
|
"rightkit-overlay-win": "0.1.7",
|
|
715
716
|
"rightkit-owner-approvals": "0.1.3",
|
|
716
|
-
"rightkit-ownership": "0.4.
|
|
717
|
+
"rightkit-ownership": "0.4.7",
|
|
717
718
|
"rightkit-passkeys": "0.1.0",
|
|
718
719
|
"rightkit-pdf": "0.3.6",
|
|
719
720
|
"rightkit-pipeline": "0.2.0",
|
|
@@ -917,7 +918,7 @@
|
|
|
917
918
|
"@rightkit/qa": "0.7.0",
|
|
918
919
|
"@rightkit/qa-chrome": "0.1.12",
|
|
919
920
|
"@rightkit/react-shell": "0.7.7",
|
|
920
|
-
"@rightkit/release": "0.6.
|
|
921
|
+
"@rightkit/release": "0.6.84",
|
|
921
922
|
"@rightkit/settings-ui": "0.7.4",
|
|
922
923
|
"@rightkit/shell": "0.1.1",
|
|
923
924
|
"@rightkit/tauri": "0.4.3",
|
|
@@ -1465,7 +1466,8 @@
|
|
|
1465
1466
|
"0.3.1",
|
|
1466
1467
|
"0.4.0",
|
|
1467
1468
|
"0.4.1",
|
|
1468
|
-
"0.4.2"
|
|
1469
|
+
"0.4.2",
|
|
1470
|
+
"0.4.6"
|
|
1469
1471
|
],
|
|
1470
1472
|
"rightkit-pdf": [
|
|
1471
1473
|
"0.1.0",
|
|
@@ -1795,7 +1797,8 @@
|
|
|
1795
1797
|
"0.2.0"
|
|
1796
1798
|
],
|
|
1797
1799
|
"rightkit-agent-engine-history": [
|
|
1798
|
-
"0.1.4"
|
|
1800
|
+
"0.1.4",
|
|
1801
|
+
"0.1.5"
|
|
1799
1802
|
],
|
|
1800
1803
|
"rightkit-agent-engine-runtime-resources": [
|
|
1801
1804
|
"0.1.1"
|
package/upload-large.mjs
CHANGED
|
File without changes
|