@catalyst-cloud/cli 0.16.9 → 0.16.11

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 CHANGED
@@ -1,5 +1,13 @@
1
1
  # Changelog
2
2
 
3
+ ## 0.16.11
4
+
5
+ Setup on macOS now downloads missing components before checking local storage access. Failed downloads leave setup waiting and preserve the existing enrollment. Re-run setup to update this computer.
6
+
7
+ ## 0.16.10
8
+
9
+ 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.
10
+
3
11
  ## 0.16.9
4
12
 
5
13
  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.
@@ -15,7 +15,7 @@ import { readExistingOnboardJson, readOnboardTeamInventory, selectedOnboardTeam,
15
15
  import { onboardStateRoot, } from "./onboard.js";
16
16
  // "Run Catalyst's work on this machine": the self-hosted host from catalyst-cloud's deploy/self-host
17
17
  // (a supervisor and a deadline watchdog under Compose), enrolled with the person's own owner or
18
- // admin login. Never the operator token. Native Linux pulls missing images anonymously with an
18
+ // admin login. Never the operator token. Setup prepares missing pinned images anonymously with an
19
19
  // empty disposable Docker config; Darwin custody receives only already-cached pinned images.
20
20
  /** The Compose project name the vendored file declares. */
21
21
  export const RUNNER_PROJECT = "catalyst-host";
@@ -24,9 +24,9 @@ export const RUNNER_SESSION_NETWORK = "catalyst-session-v1";
24
24
  * runner run 38073557245; the unchanged watchdog retains its earlier reviewed pin.
25
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:c175a4176ffdca4ec6689217a2a1c4bcc83cc8e0e93443e3e1d6d449433068f5",
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:29603376bfd88559f8aa13cccbec31f578be61e99eb8f65f1dcea9ea757c1391",
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}$/;
@@ -572,6 +572,29 @@ export function runnerDefaultHostName() {
572
572
  .slice(0, 63);
573
573
  return HOST_NAME.test(base) ? base : "machine";
574
574
  }
575
+ /** Setup's image-preparation boundary, also runnable before an installation is changed.
576
+ * Native custody receives these cached bytes independently and never pulls images itself. */
577
+ export async function prepareRunnerImages(engine, images, nativeArch, signal) {
578
+ for (const ref of images) {
579
+ if (signal?.aborted)
580
+ return { reason: "interrupted" };
581
+ const cached = await engine.imageArch(ref, signal);
582
+ if (signal?.aborted)
583
+ return { reason: "interrupted" };
584
+ if (!cached && !(await engine.pull(ref, signal)))
585
+ return signal?.aborted ? { reason: "interrupted" } : { reason: "runner_images_unavailable", image: ref };
586
+ if (signal?.aborted)
587
+ return { reason: "interrupted" };
588
+ const arch = await engine.imageArch(ref, signal);
589
+ if (signal?.aborted)
590
+ return { reason: "interrupted" };
591
+ if (!arch)
592
+ return { reason: "runner_images_unavailable", image: ref };
593
+ if (arch !== nativeArch)
594
+ return { reason: "runner_image_emulated", image: ref };
595
+ }
596
+ return null;
597
+ }
575
598
  export function onboardRunnerAdapter(input = {}) {
576
599
  const engine = input.engine ?? dockerRunnerEngine();
577
600
  const sleep = input.sleep ??
@@ -958,16 +981,9 @@ export function onboardRunnerAdapter(input = {}) {
958
981
  return false;
959
982
  }
960
983
  };
961
- for (const ref of Object.values(p.images)) {
962
- if (!(await engine.imageArch(ref, signal)) && !p.info.vm) {
963
- await engine.pull(ref, signal);
964
- }
965
- const arch = await engine.imageArch(ref, signal);
966
- if (!arch)
967
- return waiting("runner_images_unavailable", { ...selected, image: ref });
968
- if (arch !== p.info.arch)
969
- return waiting("runner_image_emulated", { ...selected, image: ref });
970
- }
984
+ const imagesRefused = await prepareRunnerImages(engine, Object.values(p.images), p.info.arch, signal);
985
+ if (imagesRefused)
986
+ return waiting(imagesRefused.reason, { ...selected, ...(imagesRefused.image ? { image: imagesRefused.image } : {}) });
971
987
  if (p.info.vm) {
972
988
  const capability = await engine.vmCapabilities(p.dir, p.images.supervisor, p.baseUrl, signal);
973
989
  if (capability !== "ready")
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@catalyst-cloud/cli",
3
- "version": "0.16.9",
3
+ "version": "0.16.11",
4
4
  "description": "Set up Catalyst Cloud, check your tickets and manage your account from the command line.",
5
5
  "license": "MIT",
6
6
  "type": "module",
@@ -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.9 — written in this repository for customer accounts -->
7
+ <!-- vendored-from: @catalyst-cloud/catalyst-skills@0.16.11 — 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.9 — written in this repository for customer accounts -->
7
+ <!-- vendored-from: @catalyst-cloud/catalyst-skills@0.16.11 — 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.9 — written in this repository for customer accounts -->
7
+ <!-- vendored-from: @catalyst-cloud/catalyst-skills@0.16.11 — 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.9 — written in this repository for customer accounts -->
7
+ <!-- vendored-from: @catalyst-cloud/catalyst-skills@0.16.11 — written in this repository for customer accounts -->
8
8
 
9
9
  # Run this project
10
10
 
@@ -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.9 — written in this repository for customer accounts -->
7
+ <!-- vendored-from: @catalyst-cloud/catalyst-skills@0.16.11 — 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.9 — written in this repository for customer accounts -->
7
+ <!-- vendored-from: @catalyst-cloud/catalyst-skills@0.16.11 — 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.9 — written in this repository for customer accounts -->
7
+ <!-- vendored-from: @catalyst-cloud/catalyst-skills@0.16.11 — 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.9 — written in this repository for customer accounts -->
7
+ <!-- vendored-from: @catalyst-cloud/catalyst-skills@0.16.11 — 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": "d75c21a5a64a3200f882f14d15c80eb365637e91d2d101cc6c20568f689ffe8d",
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": "64bc6251fbd7033067fab74d855293b901e05d3280a3f5fcb76811440dcbeb5d",
16
+ "verifierSha256": "d8aeac8fe6192ecafc024eec8a018a7589e2a885c5c7139f1b543a37413f3d7d",
17
17
  "verifierDeclarationsSha256": "624428ced2eb18b045b761b49e20b7f52c0fc6c3132689571103ece7b4a1083f"
18
18
  }
@@ -522,11 +522,14 @@ 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
+ }
525
528
  function receiveStagingChannel(path, before, stagedFile, observedAncestors) {
526
529
  const current = directory(path, true);
527
530
  if (sameDirectoryAuthority(before, current))
528
531
  return current;
529
- if (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)
532
+ if (!isInitialGuestOwnerProjection(before, current, stagedFile))
530
533
  throw failure("ancestor_identity");
531
534
  const channel = observedAncestors.find((ancestor) => ancestor.path === path);
532
535
  if (!channel || !sameDirectoryAuthority(channel.stat, before))
@@ -535,6 +538,28 @@ function receiveStagingChannel(path, before, stagedFile, observedAncestors) {
535
538
  channel.stat = current;
536
539
  return current;
537
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
+ }
538
563
  function isMissing(error) {
539
564
  return error instanceof Error && "code" in error && error.code === "ENOENT";
540
565
  }
@@ -621,7 +646,7 @@ async function exchange(options, bootstrap) {
621
646
  expiresAtMs: options.deadlineMs
622
647
  }));
623
648
  let requests = directory(options.requestDir, true);
624
- const responses = directory(options.responseDir, true);
649
+ let responses = directory(options.responseDir, true);
625
650
  const creationPaths = bootstrap ? bootstrapPaths(authority, options.tenant, options.repository) : [];
626
651
  if (bootstrap)
627
652
  checkBootstrapDirectories(creationPaths, true);
@@ -683,6 +708,7 @@ async function exchange(options, bootstrap) {
683
708
  if (!Number.isSafeInteger(nowMs) || nowMs < previousNow || nowMs >= options.deadlineMs)
684
709
  throw failure("deadline");
685
710
  previousNow = nowMs;
711
+ responses = receiveWaitingResponseChannel(options.responseDir, responses, owned, aliasAncestors, responsePath);
686
712
  checkAncestors(aliasAncestors);
687
713
  for (const [path, expected] of [
688
714
  [options.requestDir, requests],
@@ -1,16 +1,16 @@
1
1
  {
2
2
  "repository": "coalesce-labs/catalyst-cloud",
3
- "commit": "72e4e20f866e0c0885d1b40fc0e1a1026a2487a6",
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": "64bc6251fbd7033067fab74d855293b901e05d3280a3f5fcb76811440dcbeb5d",
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": "c7816e0ffa4ae46b6d19f79359bbddbc889bd88f948c7e3e1ab36cccaaf45382",
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",