@catalyst-cloud/cli 0.16.8 → 0.16.10
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/CHANGELOG.md +8 -0
- package/dist/onboard-runner-custody.js +18 -3
- package/dist/onboard-runner.js +25 -13
- package/package.json +1 -1
- package/skills/catalyst-github/SKILL.md +1 -1
- package/skills/catalyst-linear/SKILL.md +1 -1
- package/skills/catalyst-onboard/SKILL.md +1 -1
- package/skills/run-this-project/SKILL.md +1 -1
- package/skills/unstick/SKILL.md +1 -1
- package/skills/what-needs-me/SKILL.md +1 -1
- package/skills/what-this-repo-needs/SKILL.md +1 -1
- package/skills/whats-happening/SKILL.md +1 -1
- package/vendor/self-host/darwin-thoughts-custody/manifest.json +2 -2
- package/vendor/self-host/darwin-thoughts-custody/verifier.mjs +42 -2
- package/vendor/self-host/provenance.json +3 -3
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,13 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## 0.16.10
|
|
4
|
+
|
|
5
|
+
Setup on macOS now accepts the initial ownership mapping of its private response folder during the local storage check. Signed file-access verification remains required. Re-run setup to update this computer.
|
|
6
|
+
|
|
7
|
+
## 0.16.9
|
|
8
|
+
|
|
9
|
+
Setup on macOS now accepts Docker’s initial folder ownership mapping during the local storage check. Updating this computer keeps its verified file-access enrollment and can resume an interrupted update to a newer version.
|
|
10
|
+
|
|
3
11
|
## 0.16.8
|
|
4
12
|
|
|
5
13
|
Setup can resume an update stopped by a local storage check. Failed access checks keep the earlier settings and report which check stopped setup.
|
|
@@ -244,6 +244,7 @@ function factory(ports) {
|
|
|
244
244
|
const nodeHash = executable(executables.nodeExecutable, principal, roots);
|
|
245
245
|
const dockerHash = executable(executables.dockerExecutable, principal, roots);
|
|
246
246
|
let authority;
|
|
247
|
+
let producerSupervisorImage = input.supervisorImage;
|
|
247
248
|
if (existing) {
|
|
248
249
|
custody.walk(state, false, 0o700, true);
|
|
249
250
|
const runtime = record(parse(custody.read(join(state, "runtime.json"), 4096)), ["version", "nodeExecutable", "nodeExecutableSha256"]);
|
|
@@ -256,9 +257,14 @@ function factory(ports) {
|
|
|
256
257
|
authority.nativeHome !== principal.home || authority.thoughtsRoot !== thoughtsRoot ||
|
|
257
258
|
authority.locksRoot !== locksRoot || authority.requestsRoot !== requestsRoot ||
|
|
258
259
|
authority.responsesRoot !== responsesRoot || row.privateKeyFile !== privateKeyFile ||
|
|
259
|
-
row.
|
|
260
|
+
row.dockerExecutable !== executables.dockerExecutable ||
|
|
260
261
|
row.dockerExecutableSha256 !== dockerHash)
|
|
261
262
|
fail("existing_authority_mismatch");
|
|
263
|
+
if (typeof row.supervisorImage !== "string")
|
|
264
|
+
fail("existing_authority_mismatch");
|
|
265
|
+
image(row.supervisorImage);
|
|
266
|
+
if (row.supervisorImage.split("@sha256:")[0] !== input.supervisorImage.split("@sha256:")[0])
|
|
267
|
+
fail("existing_authority_mismatch");
|
|
262
268
|
let key;
|
|
263
269
|
try {
|
|
264
270
|
key = createPrivateKey({ key: custody.read(privateKeyFile, 4096), type: "pkcs8", format: "der" });
|
|
@@ -268,15 +274,20 @@ function factory(ports) {
|
|
|
268
274
|
}
|
|
269
275
|
if (key.asymmetricKeyType !== "ed25519" || createPublicKey(key).export({ type: "spki", format: "der" }).toString("base64") !== authority.publicKey)
|
|
270
276
|
fail("private_key_authority_mismatch");
|
|
277
|
+
// The enrolled producer attests its helper image. A runtime update does not re-enroll it.
|
|
278
|
+
producerSupervisorImage = row.supervisorImage;
|
|
271
279
|
}
|
|
272
280
|
custody.recheck();
|
|
273
281
|
alive();
|
|
274
282
|
const engine = await ports.engineIdentity({ ...executables, principal,
|
|
275
|
-
supervisorImage: input.supervisorImage,
|
|
283
|
+
supervisorImage: input.supervisorImage, producerSupervisorImage,
|
|
284
|
+
runnerImage: input.runnerImage, deadlineMs: input.deadlineMs, signal });
|
|
276
285
|
alive();
|
|
277
286
|
if (!/^unix:\/\/\/[^,\0]+$/.test(engine.endpoint) || normalize(engine.endpoint.slice(7)) !== engine.endpoint.slice(7) ||
|
|
278
287
|
!engine.cachedSupervisor || !engine.cachedRunner || !/^[A-Za-z0-9][A-Za-z0-9_.:-]{0,255}$/.test(engine.daemonId))
|
|
279
288
|
fail("engine_endpoint_or_cache_invalid");
|
|
289
|
+
if (engine.cachedProducerSupervisor !== true)
|
|
290
|
+
fail("producer_helper_cache_unavailable");
|
|
280
291
|
if (engine.runnerCustodyVersion !== "v1")
|
|
281
292
|
fail("runner_custody_label_unqualified");
|
|
282
293
|
if (authority && (authority.endpoint !== engine.endpoint || authority.daemonId !== engine.daemonId))
|
|
@@ -333,7 +344,7 @@ function factory(ports) {
|
|
|
333
344
|
await ports.service({ ...executables, uid: principal.uid, serviceLabel: LABEL, plistPath, deadlineMs: input.deadlineMs, signal });
|
|
334
345
|
alive();
|
|
335
346
|
const receipt = await ports.receiveBootstrap({ ...executables, authority, configPath,
|
|
336
|
-
supervisorImage:
|
|
347
|
+
supervisorImage: producerSupervisorImage, deadlineMs: input.deadlineMs, signal });
|
|
337
348
|
alive();
|
|
338
349
|
if (ports.now() >= input.deadlineMs)
|
|
339
350
|
fail("startup_proof_expired");
|
|
@@ -459,6 +470,9 @@ async function actualEngine(input) {
|
|
|
459
470
|
const run = (args) => command(input.dockerExecutable, ["--config", config, "--host", selected, ...args], input.deadlineMs, 16384, input.signal);
|
|
460
471
|
const daemon = await run(["info", "--format", "{{.ID}}"]);
|
|
461
472
|
const supervisor = await run(["image", "inspect", "--format", "{{.Id}}", input.supervisorImage]);
|
|
473
|
+
const producerSupervisorImage = input.producerSupervisorImage ?? input.supervisorImage;
|
|
474
|
+
const producerSupervisor = producerSupervisorImage === input.supervisorImage ? supervisor :
|
|
475
|
+
await run(["image", "inspect", "--format", "{{.Id}}", producerSupervisorImage]);
|
|
462
476
|
const runner = await run(["image", "inspect", "--format", "{{json .}}", input.runnerImage]);
|
|
463
477
|
if (daemon.code !== 0)
|
|
464
478
|
fail("engine_identity_unavailable");
|
|
@@ -492,6 +506,7 @@ async function actualEngine(input) {
|
|
|
492
506
|
}
|
|
493
507
|
return { endpoint: selected, daemonId: daemon.stdout,
|
|
494
508
|
cachedSupervisor: supervisor.code === 0 && /^sha256:[a-f0-9]{64}$/.test(supervisor.stdout),
|
|
509
|
+
cachedProducerSupervisor: producerSupervisor.code === 0 && /^sha256:[a-f0-9]{64}$/.test(producerSupervisor.stdout),
|
|
495
510
|
cachedRunner: runnerId !== undefined,
|
|
496
511
|
...(runnerCustodyVersion === undefined ? {} : { runnerCustodyVersion }) };
|
|
497
512
|
}
|
package/dist/onboard-runner.js
CHANGED
|
@@ -20,13 +20,13 @@ import { onboardStateRoot, } from "./onboard.js";
|
|
|
20
20
|
/** The Compose project name the vendored file declares. */
|
|
21
21
|
export const RUNNER_PROJECT = "catalyst-host";
|
|
22
22
|
export const RUNNER_SESSION_NETWORK = "catalyst-session-v1";
|
|
23
|
-
/**
|
|
24
|
-
* runner run
|
|
25
|
-
*
|
|
23
|
+
/** Qualified public images from main 72e4e20f86: host run 38073557244 and
|
|
24
|
+
* runner run 38073557245; the unchanged watchdog retains its earlier reviewed pin.
|
|
25
|
+
* Explicit environment values override these pins; a saved runner image is preserved. */
|
|
26
26
|
export const RUNNER_HOST_IMAGES = {
|
|
27
|
-
supervisor: "ghcr.io/coalesce-labs/catalyst-supervisor@sha256:
|
|
27
|
+
supervisor: "ghcr.io/coalesce-labs/catalyst-supervisor@sha256:5aa2e7ab67d85c837a81e272ee089c8438ae1ba5b886b05354515be4058d15f6",
|
|
28
28
|
watchdog: "ghcr.io/coalesce-labs/catalyst-deadline-watchdog@sha256:a5999dbf229ac432b83c2ed3fe43fa251366baceb73af2f57590890a6a758f0d",
|
|
29
|
-
runner: "ghcr.io/coalesce-labs/catalyst-runner@sha256:
|
|
29
|
+
runner: "ghcr.io/coalesce-labs/catalyst-runner@sha256:dc83c11d357f1f5fa1ec55c669d02e9ff6f5ec9633a9bdc6fc15fbe7497f9655",
|
|
30
30
|
};
|
|
31
31
|
const IMAGE_REF = /^[a-z0-9][a-z0-9._:/-]{0,255}@sha256:[0-9a-f]{64}$/;
|
|
32
32
|
const HOST_NAME = /^[A-Za-z0-9][A-Za-z0-9._-]{0,62}$/;
|
|
@@ -243,18 +243,30 @@ export function dockerRunnerEngine(deps = {}) {
|
|
|
243
243
|
const baseUrl = origins[0].slice("CATALYST_MIRROR_URL=".length);
|
|
244
244
|
if (!HOST_NAME.test(hostName))
|
|
245
245
|
return "unverified";
|
|
246
|
-
//
|
|
247
|
-
//
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
(!saved || !IMAGE_REF.test(saved.CATALYST_SUPERVISOR_IMAGE ?? "") ||
|
|
246
|
+
// An interrupted update can leave saved intent ahead of the actual runtime.
|
|
247
|
+
// A later requested pin still requires the same publisher and installation identity.
|
|
248
|
+
if (config.Image !== supervisorImage) {
|
|
249
|
+
if (!saved || !IMAGE_REF.test(saved.CATALYST_SUPERVISOR_IMAGE ?? "") ||
|
|
251
250
|
typeof config.Image !== "string" || !IMAGE_REF.test(config.Image) ||
|
|
252
|
-
(config.Image !== saved.CATALYST_SUPERVISOR_IMAGE && saved.CATALYST_SUPERVISOR_IMAGE !== supervisorImage) ||
|
|
253
251
|
config.Image.split("@sha256:")[0] !== supervisorImage.split("@sha256:")[0] ||
|
|
254
252
|
saved.CATALYST_SUPERVISOR_IMAGE.split("@sha256:")[0] !== supervisorImage.split("@sha256:")[0] ||
|
|
255
253
|
saved.CATALYST_HOST_NAME !== hostName ||
|
|
256
|
-
normalizeBaseUrl(saved.CATALYST_MIRROR_URL ?? "") !== normalizeBaseUrl(baseUrl))
|
|
257
|
-
|
|
254
|
+
normalizeBaseUrl(saved.CATALYST_MIRROR_URL ?? "") !== normalizeBaseUrl(baseUrl))
|
|
255
|
+
return "unverified";
|
|
256
|
+
if (config.Image !== saved.CATALYST_SUPERVISOR_IMAGE && saved.CATALYST_SUPERVISOR_IMAGE !== supervisorImage) {
|
|
257
|
+
// Prove the configured old digest names this exact cached runtime, without a pull.
|
|
258
|
+
const imageRead = await docker(["image", "inspect", config.Image], { signal });
|
|
259
|
+
if (imageRead.code !== 0 || signal?.aborted)
|
|
260
|
+
return "unverified";
|
|
261
|
+
const cached = JSON.parse(imageRead.stdout);
|
|
262
|
+
const runtimeImage = rows[0]?.Image;
|
|
263
|
+
if (!Array.isArray(cached) || cached.length !== 1 ||
|
|
264
|
+
typeof runtimeImage !== "string" || !/^sha256:[a-f0-9]{64}$/.test(runtimeImage) ||
|
|
265
|
+
cached[0]?.Id !== runtimeImage || !Array.isArray(cached[0]?.RepoDigests) ||
|
|
266
|
+
!cached[0].RepoDigests.includes(config.Image))
|
|
267
|
+
return "unverified";
|
|
268
|
+
}
|
|
269
|
+
}
|
|
258
270
|
return { dir, hostName, baseUrl: normalizeBaseUrl(baseUrl) };
|
|
259
271
|
}
|
|
260
272
|
catch {
|
package/package.json
CHANGED
|
@@ -4,7 +4,7 @@ description: >-
|
|
|
4
4
|
Catalyst's GitHub: show a ticket's pull request with its checks, reviews and review threads, say whether it is mergeable under this repository's policy, and explain what a PR accumulates as the ticket moves (the branch, the draft, the rewrite, the force-pushes, the labels, the queue). Use when someone asks "show me the PR", "what are the checks saying", "why hasn't it merged", "what does the queue need", "what does that label mean", or wants the branch and merge conventions Catalyst follows.
|
|
5
5
|
allowed-tools: Bash(catalyst:*) Bash(npx -p @catalyst-cloud/cli catalyst:*)
|
|
6
6
|
---
|
|
7
|
-
<!-- vendored-from: @catalyst-cloud/catalyst-skills@0.16.
|
|
7
|
+
<!-- vendored-from: @catalyst-cloud/catalyst-skills@0.16.10 — written in this repository for customer accounts -->
|
|
8
8
|
|
|
9
9
|
# Catalyst's GitHub
|
|
10
10
|
|
|
@@ -4,7 +4,7 @@ description: >-
|
|
|
4
4
|
Catalyst's view of Linear on the customer's own cloud account. Reads a ticket with its comments, relations, labels, linked pull requests and agent sessions inline, from the cloud API by default, with local replica reads available as an explicit opt-in, always naming the source; searches tickets, PRs, projects and initiatives; writes comments, card moves, labels and new tickets through the account's agent proxy as the app actor, with every route, stage id, label id and marker read from the account's contract. Knows what a ticket accumulates as Catalyst works it (phase-outcome comments, the document per phase, the agent session, the labels, the single blocks relation, the bookkeeping marker, the eyes acknowledgement). Use when a person says "show me the ticket", "what did Catalyst write on it", "comment on it", "move it", "label it" or "file a ticket". Not for raising a decision for a human (what-needs-me) and not for pull requests (catalyst-github).
|
|
5
5
|
allowed-tools: Bash(catalyst:*) Bash(npx -p @catalyst-cloud/cli catalyst:*)
|
|
6
6
|
---
|
|
7
|
-
<!-- vendored-from: @catalyst-cloud/catalyst-skills@0.16.
|
|
7
|
+
<!-- vendored-from: @catalyst-cloud/catalyst-skills@0.16.10 — written in this repository for customer accounts -->
|
|
8
8
|
|
|
9
9
|
# Catalyst Linear
|
|
10
10
|
|
|
@@ -4,7 +4,7 @@ description: >-
|
|
|
4
4
|
Set up Catalyst Cloud and say whether setup is working. Walks a person from nothing to their first ticket running, one step at a time: the coding account, the project, the integrations and connected accounts, each repository's settings file, then one real ticket moving. Also logs this machine in, reads the readiness verdict with who can fix each failure, and checks the optional local replica. Use when someone says "set me up", "onboard me", "I just signed up", "get me started", "what do I do first", "log me in", "which account is this machine on", "am I set up", "what is missing", "why does nothing happen" or "is the replica running", when a login expired, or when a skill script exits 2 saying this machine is not connected. Does every step a key can do through the catalyst CLI, hands over the exact page for the steps only a browser can do, and never claims a step it did not watch succeed.
|
|
5
5
|
allowed-tools: Bash(catalyst:*) Bash(npx -p @catalyst-cloud/cli catalyst:*)
|
|
6
6
|
---
|
|
7
|
-
<!-- vendored-from: @catalyst-cloud/catalyst-skills@0.16.
|
|
7
|
+
<!-- vendored-from: @catalyst-cloud/catalyst-skills@0.16.10 — written in this repository for customer accounts -->
|
|
8
8
|
|
|
9
9
|
# Onboard me
|
|
10
10
|
|
|
@@ -4,7 +4,7 @@ description: >-
|
|
|
4
4
|
Own one Catalyst Cloud project end to end until it closes. Use when the person says "run this project for me", "own this until it ships", "keep this moving", or hands you a project id or a set of tickets to drive. Subscribes to the account's event stream for the scope through the catalyst CLI, reacts to each change in the same turn, makes tickets ready and moves them to dispatch, parks what should stop, chases stalls, escalates inward, and keeps one status summary current. Writes to Linear as the app actor; never polls.
|
|
5
5
|
allowed-tools: Bash(catalyst:*) Bash(npx -p @catalyst-cloud/cli catalyst:*)
|
|
6
6
|
---
|
|
7
|
-
<!-- vendored-from: @catalyst-cloud/catalyst-skills@0.16.
|
|
7
|
+
<!-- vendored-from: @catalyst-cloud/catalyst-skills@0.16.10 — written in this repository for customer accounts -->
|
|
8
8
|
|
|
9
9
|
# Run this project
|
|
10
10
|
|
package/skills/unstick/SKILL.md
CHANGED
|
@@ -4,7 +4,7 @@ description: >-
|
|
|
4
4
|
Get a stuck Catalyst Cloud ticket moving again. Use when the person asks "why is this parked and can you release it?", "unpark this", "get things flowing again", "the outage is over, retry what failed", or hands you a ticket that is not moving. Reads why nothing runs and what holds the ticket through the catalyst CLI, decides whether the recorded cause is fixed, previews the release, releases every governor holding the ticket the right way (or one failure class across a team), and raises an ask only for what a person has to do. Never releases a cause it cannot show changed without saying so.
|
|
5
5
|
allowed-tools: Bash(catalyst:*) Bash(npx -p @catalyst-cloud/cli catalyst:*)
|
|
6
6
|
---
|
|
7
|
-
<!-- vendored-from: @catalyst-cloud/catalyst-skills@0.16.
|
|
7
|
+
<!-- vendored-from: @catalyst-cloud/catalyst-skills@0.16.10 — written in this repository for customer accounts -->
|
|
8
8
|
|
|
9
9
|
# Unstick
|
|
10
10
|
|
|
@@ -4,7 +4,7 @@ description: >-
|
|
|
4
4
|
The human's decision inbox on Catalyst Cloud, and the one way an agent raises a decision on their behalf. Use when the person asks "what needs me?", "what am I blocking?", or when active work is gated on a choice only they can make. Lists open asks ranked by how much open work each one holds, files an ask through the cloud's ask route with the account's own template, and records the answer so the held work releases. Never answers as the human, never duplicates an open ask.
|
|
5
5
|
allowed-tools: Bash(catalyst:*) Bash(npx -p @catalyst-cloud/cli catalyst:*)
|
|
6
6
|
---
|
|
7
|
-
<!-- vendored-from: @catalyst-cloud/catalyst-skills@0.16.
|
|
7
|
+
<!-- vendored-from: @catalyst-cloud/catalyst-skills@0.16.10 — written in this repository for customer accounts -->
|
|
8
8
|
|
|
9
9
|
# What needs me
|
|
10
10
|
|
|
@@ -4,7 +4,7 @@ description: >-
|
|
|
4
4
|
What environment variable names does this repository need, and where does each one come from? Scans the repository offline (no login, no network) and lists the names in three groups (build/test, deploy-only, bindings), each with where it was found, what uses it, and where a local value would come from. Never reads a value or prints one. Also checks the environment variable table in `.catalyst/catalyst.toml` offline. Use when someone asks "what does catalyst.env.json mean", "what env vars does this repo need", "why does the container need this", or before reviewing or writing the declaration.
|
|
5
5
|
allowed-tools: Bash(catalyst:*) Bash(npx -p @catalyst-cloud/cli catalyst:*)
|
|
6
6
|
---
|
|
7
|
-
<!-- vendored-from: @catalyst-cloud/catalyst-skills@0.16.
|
|
7
|
+
<!-- vendored-from: @catalyst-cloud/catalyst-skills@0.16.10 — written in this repository for customer accounts -->
|
|
8
8
|
|
|
9
9
|
# What this repository needs
|
|
10
10
|
|
|
@@ -4,7 +4,7 @@ description: >-
|
|
|
4
4
|
Use for "what's happening?", "what machines do we have?", "how much capacity do we have?", "where are we?", "why is that stuck?", "what closed?", "what's next?", "how does this work?", "why did it do that?", "how does it prioritise?" and "what does this setting do, where is it set?" in Catalyst Cloud, or asks for something to be done rather than known. Reads the contract via catalyst CLI. Read-only: route work/decisions, never answer as the human.
|
|
5
5
|
allowed-tools: Bash(catalyst:*) Bash(npx -p @catalyst-cloud/cli catalyst:*)
|
|
6
6
|
---
|
|
7
|
-
<!-- vendored-from: @catalyst-cloud/catalyst-skills@0.16.
|
|
7
|
+
<!-- vendored-from: @catalyst-cloud/catalyst-skills@0.16.10 — written in this repository for customer accounts -->
|
|
8
8
|
|
|
9
9
|
# What's happening
|
|
10
10
|
|
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
"inputs": {
|
|
5
5
|
"packages/host-isolation/src/darwin-thoughts-producer.ts": "038fb63d8121fb1665ec31869f45604aedd96dd7d9b15a415d578fea9a0ad507",
|
|
6
6
|
"packages/protocol/src/darwin-thoughts-custody.ts": "3515efc22b0a3cfb512ff1acaf649c6eafb978b894c724fabb01c325aea51075",
|
|
7
|
-
"packages/host-isolation/src/darwin-thoughts-custody.ts": "
|
|
7
|
+
"packages/host-isolation/src/darwin-thoughts-custody.ts": "1042a0280b305d87fbf9300dfd04c632a58140c60714fa128a7b30003260fa03",
|
|
8
8
|
"deploy/self-host/darwin-thoughts-custody/producer-entry.ts": "27c8ff591c8dc4d1a4c65dd154157df5191ead1fb0af673bfd7099d5226d37bc",
|
|
9
9
|
"deploy/self-host/darwin-thoughts-custody/verifier-entry.ts": "80bc1e72943e43bc33d76ba205bd79751f58ca34d622e35f7e50e3b661f65464",
|
|
10
10
|
"deploy/self-host/darwin-thoughts-custody/generate.ts": "bfe1bef175fa8243be0558e1ddee6ddbcfbd622922e3a5df850e8621f18e7b26",
|
|
@@ -13,6 +13,6 @@
|
|
|
13
13
|
"deploy/self-host/darwin-thoughts-custody/service.plist.in": "66e9a2c175d2500b1f7130e7c04a5ed07f22bc7425661777f514fa3f2a816496"
|
|
14
14
|
},
|
|
15
15
|
"artifactSha256": "0e0f1bbdac23813e8ee57b6eb4ae3dfd24c3f1c51ebe0c3d119a1448734ea05e",
|
|
16
|
-
"verifierSha256": "
|
|
16
|
+
"verifierSha256": "d8aeac8fe6192ecafc024eec8a018a7589e2a885c5c7139f1b543a37413f3d7d",
|
|
17
17
|
"verifierDeclarationsSha256": "624428ced2eb18b045b761b49e20b7f52c0fc6c3132689571103ece7b4a1083f"
|
|
18
18
|
}
|
|
@@ -522,6 +522,44 @@ function checkAncestors(expected) {
|
|
|
522
522
|
}
|
|
523
523
|
}
|
|
524
524
|
}
|
|
525
|
+
function isInitialGuestOwnerProjection(before, current, stagedFile) {
|
|
526
|
+
return before.dev === current.dev && before.ino === current.ino && before.mode === current.mode && before.uid === 0n && before.gid === 0n && current.uid === 10001n && current.gid === 10001n && process.getuid?.() === 10001 && process.geteuid?.() === 10001 && process.getgid?.() === 10001 && stagedFile.uid === 10001n && stagedFile.gid === 10001n;
|
|
527
|
+
}
|
|
528
|
+
function receiveStagingChannel(path, before, stagedFile, observedAncestors) {
|
|
529
|
+
const current = directory(path, true);
|
|
530
|
+
if (sameDirectoryAuthority(before, current))
|
|
531
|
+
return current;
|
|
532
|
+
if (!isInitialGuestOwnerProjection(before, current, stagedFile))
|
|
533
|
+
throw failure("ancestor_identity");
|
|
534
|
+
const channel = observedAncestors.find((ancestor) => ancestor.path === path);
|
|
535
|
+
if (!channel || !sameDirectoryAuthority(channel.stat, before))
|
|
536
|
+
throw failure("ancestor_identity");
|
|
537
|
+
checkAncestors(observedAncestors.filter((ancestor) => ancestor.path !== path));
|
|
538
|
+
channel.stat = current;
|
|
539
|
+
return current;
|
|
540
|
+
}
|
|
541
|
+
function receiveWaitingResponseChannel(path, before, stagedFile, observedAncestors, responsePath) {
|
|
542
|
+
const current = directory(path, true);
|
|
543
|
+
if (sameDirectoryAuthority(before, current))
|
|
544
|
+
return current;
|
|
545
|
+
if (!isInitialGuestOwnerProjection(before, current, stagedFile))
|
|
546
|
+
throw failure("ancestor_identity");
|
|
547
|
+
const channel = observedAncestors.find((ancestor) => ancestor.path === path);
|
|
548
|
+
if (!channel || !sameDirectoryAuthority(channel.stat, before))
|
|
549
|
+
throw failure("ancestor_identity");
|
|
550
|
+
checkAncestors(observedAncestors.filter((ancestor) => ancestor.path !== path));
|
|
551
|
+
try {
|
|
552
|
+
fs.lstatSync(responsePath);
|
|
553
|
+
throw failure("ancestor_identity");
|
|
554
|
+
} catch (error) {
|
|
555
|
+
if (!isMissing(error))
|
|
556
|
+
throw error;
|
|
557
|
+
}
|
|
558
|
+
if (!sameDirectoryAuthority(current, directory(path, true)))
|
|
559
|
+
throw failure("ancestor_identity");
|
|
560
|
+
channel.stat = current;
|
|
561
|
+
return current;
|
|
562
|
+
}
|
|
525
563
|
function isMissing(error) {
|
|
526
564
|
return error instanceof Error && "code" in error && error.code === "ENOENT";
|
|
527
565
|
}
|
|
@@ -607,8 +645,8 @@ async function exchange(options, bootstrap) {
|
|
|
607
645
|
issuedAtMs,
|
|
608
646
|
expiresAtMs: options.deadlineMs
|
|
609
647
|
}));
|
|
610
|
-
|
|
611
|
-
|
|
648
|
+
let requests = directory(options.requestDir, true);
|
|
649
|
+
let responses = directory(options.responseDir, true);
|
|
612
650
|
const creationPaths = bootstrap ? bootstrapPaths(authority, options.tenant, options.repository) : [];
|
|
613
651
|
if (bootstrap)
|
|
614
652
|
checkBootstrapDirectories(creationPaths, true);
|
|
@@ -651,6 +689,7 @@ async function exchange(options, bootstrap) {
|
|
|
651
689
|
} finally {
|
|
652
690
|
fs.closeSync(fd);
|
|
653
691
|
}
|
|
692
|
+
requests = receiveStagingChannel(options.requestDir, requests, owned, aliasAncestors);
|
|
654
693
|
checkAncestors(aliasAncestors);
|
|
655
694
|
if (!sameDirectoryAuthority(requests, directory(options.requestDir, true)))
|
|
656
695
|
throw failure("channel_identity");
|
|
@@ -669,6 +708,7 @@ async function exchange(options, bootstrap) {
|
|
|
669
708
|
if (!Number.isSafeInteger(nowMs) || nowMs < previousNow || nowMs >= options.deadlineMs)
|
|
670
709
|
throw failure("deadline");
|
|
671
710
|
previousNow = nowMs;
|
|
711
|
+
responses = receiveWaitingResponseChannel(options.responseDir, responses, owned, aliasAncestors, responsePath);
|
|
672
712
|
checkAncestors(aliasAncestors);
|
|
673
713
|
for (const [path, expected] of [
|
|
674
714
|
[options.requestDir, requests],
|
|
@@ -1,16 +1,16 @@
|
|
|
1
1
|
{
|
|
2
2
|
"repository": "coalesce-labs/catalyst-cloud",
|
|
3
|
-
"commit": "
|
|
3
|
+
"commit": "82a177dc44a0a2d2bb5eb159f3deb3038601b79a",
|
|
4
4
|
"sha256": {
|
|
5
5
|
"deploy/self-host/compose.yaml": "0ffb7671c7ea49d8490d6e97093ada0afcb31da3b00092a8768150b090cca0bc",
|
|
6
6
|
"deploy/self-host/compose.darwin-thoughts.yaml": "6269d66d6f487175ab8560d0648e65c8a0eccb86f69a8dc24daf41d8ae1dcf02",
|
|
7
7
|
"deploy/self-host/darwin-thoughts-custody/producer.mjs": "0e0f1bbdac23813e8ee57b6eb4ae3dfd24c3f1c51ebe0c3d119a1448734ea05e",
|
|
8
|
-
"deploy/self-host/darwin-thoughts-custody/verifier.mjs": "
|
|
8
|
+
"deploy/self-host/darwin-thoughts-custody/verifier.mjs": "d8aeac8fe6192ecafc024eec8a018a7589e2a885c5c7139f1b543a37413f3d7d",
|
|
9
9
|
"deploy/self-host/darwin-thoughts-custody/verifier.d.mts": "624428ced2eb18b045b761b49e20b7f52c0fc6c3132689571103ece7b4a1083f",
|
|
10
10
|
"deploy/self-host/darwin-thoughts-custody/watchdog.mjs": "6b5c7204aacd296c85a216d4f1b3adbe2084024fe37200ec1d24dfc2dec2e12d",
|
|
11
11
|
"deploy/self-host/darwin-thoughts-custody/watchdog-deadline.mjs": "a642e6d8968f56f635056d3b258e5c4ad186c638a273c26b4528e85b7d2a6346",
|
|
12
12
|
"deploy/self-host/darwin-thoughts-custody/service.plist.in": "66e9a2c175d2500b1f7130e7c04a5ed07f22bc7425661777f514fa3f2a816496",
|
|
13
|
-
"deploy/self-host/darwin-thoughts-custody/manifest.json": "
|
|
13
|
+
"deploy/self-host/darwin-thoughts-custody/manifest.json": "f3814f54f6d6586ec04e76940919a88880cfe44de4461db0d98130a7354ea3f5",
|
|
14
14
|
"deploy/self-host/linux-session-egress/session-egress.py": "a20cedfa1e883127ec461e4b7f9588d379fe1633b8244ecd703c81f589d3f142",
|
|
15
15
|
"deploy/self-host/linux-session-egress/catalyst-session-egress.service": "703c150ab23ec87aea47cfc394f63e061b66c4b8c1454a88a9be879c161ce2a5",
|
|
16
16
|
"deploy/self-host/linux-session-egress/catalyst-session-egress-attest.service": "94fa75ea0616f6a1172fc20ca637a5727c36456357e4a977d5bdd65f2fad2e8d",
|