@catalyst-cloud/cli 0.16.3 → 0.16.4
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 +4 -0
- package/dist/onboard-runner.js +23 -5
- 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/compose.yaml +17 -0
- package/vendor/self-host/provenance.json +2 -2
package/CHANGELOG.md
CHANGED
package/dist/onboard-runner.js
CHANGED
|
@@ -33,6 +33,12 @@ const JOIN_TOKENS = "/api/v1/hosts/join-tokens";
|
|
|
33
33
|
const CAPACITY = "/api/v1/me/runner-capacity";
|
|
34
34
|
const RUNNER_UID = "10001:10001";
|
|
35
35
|
const DIRS = ["slots", "thoughts", "locks"];
|
|
36
|
+
const DISK_POLICY_KEYS = [
|
|
37
|
+
"CATALYST_SLOTS",
|
|
38
|
+
"CATALYST_SLOT_DISK_MODE", "CATALYST_SLOT_DISK_BUDGET_GIB", "CATALYST_DISK_BUDGET_GIB",
|
|
39
|
+
"CATALYST_WORKSPACE_STORAGE", "CATALYST_WORKSPACE_RETENTION_HOURS",
|
|
40
|
+
"CATALYST_HOST_FREE_FLOOR_GIB", "CATALYST_HOST_DISK_SAMPLE_DIR", "CATALYST_HOST_DISK_SAMPLE_FILE",
|
|
41
|
+
];
|
|
36
42
|
function isUnenrolled(value) {
|
|
37
43
|
return value !== null && "unenrolled" in value;
|
|
38
44
|
}
|
|
@@ -576,7 +582,7 @@ export function onboardRunnerAdapter(input = {}) {
|
|
|
576
582
|
return { account, baseUrl: normalizeBaseUrl(cfg.baseUrl), teamKey, teamId, cloud, dir, info, images,
|
|
577
583
|
...(installation && installation !== "missing" ? { installedName: installation.hostName } : {}) };
|
|
578
584
|
}
|
|
579
|
-
async function desiredEnv(p, joinToken) {
|
|
585
|
+
async function desiredEnv(p, ctx, joinToken) {
|
|
580
586
|
const saved = readEnvFile(join(p.dir, ".env")) ?? {};
|
|
581
587
|
const name = p.installedName || saved.CATALYST_HOST_NAME || chosenName || (input.hostName ?? runnerDefaultHostName)();
|
|
582
588
|
const gid = p.info.vm ? 0 : await engine.socketGid();
|
|
@@ -595,6 +601,8 @@ export function onboardRunnerAdapter(input = {}) {
|
|
|
595
601
|
CATALYST_THOUGHTS_DIR: join(p.dir, "thoughts"),
|
|
596
602
|
CATALYST_POOL_LOCK_DIR: join(p.dir, "locks"),
|
|
597
603
|
CATALYST_SESSION_EGRESS_DIR: p.info.vm ? join(p.dir, "session-egress") : NATIVE_EGRESS_DIR,
|
|
604
|
+
// Saved policy stays in merged(). An explicit value in this run overrides it.
|
|
605
|
+
...Object.fromEntries(DISK_POLICY_KEYS.flatMap(key => ctx.env[key] === undefined ? [] : [[key, ctx.env[key]]])),
|
|
598
606
|
};
|
|
599
607
|
}
|
|
600
608
|
/** The step owns its own keys only; a person's tuning (CATALYST_SLOTS and the rest) is kept. */
|
|
@@ -665,7 +673,7 @@ export function onboardRunnerAdapter(input = {}) {
|
|
|
665
673
|
if (!("dir" in p))
|
|
666
674
|
return p;
|
|
667
675
|
const saved = readEnvFile(join(p.dir, ".env"));
|
|
668
|
-
const want = await desiredEnv(p);
|
|
676
|
+
const want = await desiredEnv(p, ctx);
|
|
669
677
|
if (!want)
|
|
670
678
|
return waiting("runner_docker_socket_unreadable", selected);
|
|
671
679
|
const name = want.CATALYST_HOST_NAME;
|
|
@@ -688,7 +696,14 @@ export function onboardRunnerAdapter(input = {}) {
|
|
|
688
696
|
host.team !== p.teamKey))
|
|
689
697
|
return waiting("runner_enrolled_for_other_team", { ...selected, hostName: name });
|
|
690
698
|
const running = await engine.composeRunning(p.dir, signal);
|
|
691
|
-
|
|
699
|
+
let composeMatches = false;
|
|
700
|
+
try {
|
|
701
|
+
composeMatches = readFileSync(join(p.dir, "compose.yaml")).equals(readFileSync(join(packageRoot(), "vendor", "self-host", "compose.yaml")));
|
|
702
|
+
}
|
|
703
|
+
catch {
|
|
704
|
+
/* A missing or unreadable compose needs an explicitly authorized repair. */
|
|
705
|
+
}
|
|
706
|
+
const changed = !saved || !composeMatches || Object.entries(want).some(([key, value]) => saved[key] !== value);
|
|
692
707
|
const hostEvidence = { ...selected, hostName: name };
|
|
693
708
|
const pending = () => mayAct ? { state: "pending" } : waiting("runner_needs_runner_flag", hostEvidence);
|
|
694
709
|
if (!running || changed)
|
|
@@ -772,6 +787,9 @@ export function onboardRunnerAdapter(input = {}) {
|
|
|
772
787
|
}
|
|
773
788
|
// Mounted read-only into the supervisor (uid 10001), which reads the egress attestation.
|
|
774
789
|
mkdirSync(join(p.dir, "session-egress"), { recursive: true, mode: 0o755 });
|
|
790
|
+
// The canonical compose binds host-native disk samples read-only. A custom sample
|
|
791
|
+
// directory belongs to its operator; only create the install's default directory.
|
|
792
|
+
mkdirSync(join(p.dir, "host-disk"), { recursive: true, mode: 0o755 });
|
|
775
793
|
const compose = readFileSync(join(packageRoot(), "vendor", "self-host", "compose.yaml"));
|
|
776
794
|
let current = null;
|
|
777
795
|
try {
|
|
@@ -797,7 +815,7 @@ export function onboardRunnerAdapter(input = {}) {
|
|
|
797
815
|
return waiting("runner_name_required", selected);
|
|
798
816
|
chosenName = name;
|
|
799
817
|
}
|
|
800
|
-
let want = await desiredEnv(p);
|
|
818
|
+
let want = await desiredEnv(p, ctx);
|
|
801
819
|
if (!want)
|
|
802
820
|
return waiting("runner_docker_socket_unreadable", selected);
|
|
803
821
|
const writeEnv = (values) => {
|
|
@@ -870,7 +888,7 @@ export function onboardRunnerAdapter(input = {}) {
|
|
|
870
888
|
const token = await mintJoinToken(ctx, p, name, signal);
|
|
871
889
|
if (typeof token !== "string")
|
|
872
890
|
return token;
|
|
873
|
-
want = (await desiredEnv(p, token));
|
|
891
|
+
want = (await desiredEnv(p, ctx, token));
|
|
874
892
|
if (!writeEnv(want))
|
|
875
893
|
return { state: "failed", reason: "runner_directory_unavailable", evidence: selected };
|
|
876
894
|
}
|
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.4 — 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.4 — 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.4 — 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.4 — 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.4 — 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.4 — 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.4 — 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.4 — written in this repository for customer accounts -->
|
|
8
8
|
|
|
9
9
|
# What's happening
|
|
10
10
|
|
|
@@ -60,6 +60,8 @@ services:
|
|
|
60
60
|
# The host journal and outbox. Never authoritative: deleting it costs undelivered evidence and
|
|
61
61
|
# never blocks a start (docs/design/disposable-host-contracts.md, "The host journal").
|
|
62
62
|
- supervisor-state:/var/lib/catalyst/supervisor
|
|
63
|
+
# Atomic host-native samples; the VM cannot measure the Mac backing Docker.raw.
|
|
64
|
+
- ${CATALYST_HOST_DISK_SAMPLE_DIR:-./host-disk}:/var/lib/catalyst/host-disk:ro
|
|
63
65
|
# The per-host credential and the tenant's runner org key (CATALYST_ORG_KEY_FILE), on their own
|
|
64
66
|
# volume so the delete-the-state-directory test (removing supervisor-state) never costs an
|
|
65
67
|
# enrollment. The supervisor replaces the credential by rename, so the directory stays writable.
|
|
@@ -94,13 +96,28 @@ services:
|
|
|
94
96
|
CATALYST_HOST_CREDENTIAL_FILE: ${CATALYST_HOST_CREDENTIAL_FILE:-/var/lib/catalyst/host-credential/credential}
|
|
95
97
|
CATALYST_DISK_BUDGET_GIB: ${CATALYST_DISK_BUDGET_GIB:-60}
|
|
96
98
|
CATALYST_WORKSPACE_STORAGE: ${CATALYST_WORKSPACE_STORAGE:-}
|
|
99
|
+
CATALYST_WORKSPACE_RETENTION_HOURS: ${CATALYST_WORKSPACE_RETENTION_HOURS:-2}
|
|
100
|
+
CATALYST_HOST_FREE_FLOOR_GIB: ${CATALYST_HOST_FREE_FLOOR_GIB:-25}
|
|
101
|
+
CATALYST_HOST_DISK_SAMPLE_FILE: ${CATALYST_HOST_DISK_SAMPLE_FILE:-}
|
|
97
102
|
CATALYST_THOUGHTS_DIR: ${CATALYST_THOUGHTS_DIR:-/srv/catalyst/thoughts}
|
|
98
103
|
CATALYST_POOL_LOCK_DIR: ${CATALYST_POOL_LOCK_DIR:-/srv/catalyst/locks}
|
|
99
104
|
CATALYST_ORG_KEY_FILE: ${CATALYST_ORG_KEY_FILE:-/var/lib/catalyst/host-credential/org-key}
|
|
105
|
+
# `attempt`: sessions use their grant's own credential and the host holds no org key (CTC-4921).
|
|
106
|
+
# Unset keeps an existing install on the org key until it opts in.
|
|
107
|
+
CATALYST_SESSION_CREDENTIAL: ${CATALYST_SESSION_CREDENTIAL:-org-key}
|
|
100
108
|
# Every setup and session container joins this network. It must exist before the supervisor
|
|
101
109
|
# takes work: missing or not isolated is not-ready, never the default bridge.
|
|
102
110
|
CATALYST_SESSION_NETWORK: ${CATALYST_SESSION_NETWORK:-catalyst-session-v1}
|
|
103
111
|
CATALYST_SESSION_EGRESS_ATTESTATION: ${CATALYST_SESSION_EGRESS_ATTESTATION:-/var/lib/catalyst/session-egress/attestation.json}
|
|
112
|
+
# CTC-4265: the deadline for each primary workspace clone, in integer milliseconds. Empty is
|
|
113
|
+
# 180000; outside 1000-600000 the supervisor refuses to start. It forwards the value into each
|
|
114
|
+
# session container.
|
|
115
|
+
CATALYST_GIT_CLONE_TIMEOUT_MS: ${CATALYST_GIT_CLONE_TIMEOUT_MS:-}
|
|
116
|
+
# CTC-4265: the root of operator-prepared bare Git references. Empty means no reference and a
|
|
117
|
+
# direct clone every time. This file mounts nothing for it: setting it also needs the opt-in
|
|
118
|
+
# override, `docker compose -f compose.yaml -f compose.git-reference.yaml up -d`, which mounts
|
|
119
|
+
# the root read-only at the same path. Without the override every launch logs a cache miss.
|
|
120
|
+
CATALYST_GIT_REFERENCE_DIR: ${CATALYST_GIT_REFERENCE_DIR:-}
|
|
104
121
|
# SIGTERM re-adopts on the next start instead of stopping phases, so the supervisor needs only
|
|
105
122
|
# long enough to flush its journal.
|
|
106
123
|
stop_grace_period: 30s
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
{
|
|
2
2
|
"repository": "coalesce-labs/catalyst-cloud",
|
|
3
|
-
"commit": "
|
|
3
|
+
"commit": "081ce3fefd52bfa0b0ac76b3d6f87ce373b71c7d",
|
|
4
4
|
"sha256": {
|
|
5
|
-
"deploy/self-host/compose.yaml": "
|
|
5
|
+
"deploy/self-host/compose.yaml": "aa3572bdcbd84c3e13634947dabe941c055ea68df607a140149efb000c6598e8",
|
|
6
6
|
"deploy/self-host/linux-session-egress/session-egress.py": "a20cedfa1e883127ec461e4b7f9588d379fe1633b8244ecd703c81f589d3f142",
|
|
7
7
|
"deploy/self-host/linux-session-egress/catalyst-session-egress.service": "703c150ab23ec87aea47cfc394f63e061b66c4b8c1454a88a9be879c161ce2a5",
|
|
8
8
|
"deploy/self-host/linux-session-egress/catalyst-session-egress-attest.service": "94fa75ea0616f6a1172fc20ca637a5727c36456357e4a977d5bdd65f2fad2e8d",
|