@catalyst-cloud/cli 0.16.36 → 0.16.37
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/agent-repoint.js +18 -10
- package/dist/runner-auto-update.js +20 -3
- 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/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,9 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## 0.16.37
|
|
4
|
+
|
|
5
|
+
On a Mac with thoughts custody, every runner update failed after 0.16.35 or 0.16.36 pointed the runner update agent at a CLI installed under a different node. The update log showed `custody_restore_failed:runtime_custody_mismatch`. The custody records the node it was set up with, and refuses any other. The update agent now runs the CLI under that recorded node, whether `catalyst runner auto-update on` or the global install writes it. Installing this release globally repairs an agent that was already moved, and keeps the previous agent file beside it, as `<file>.before-0.16.37`. A Mac without thoughts custody, and Linux, are unchanged.
|
|
6
|
+
|
|
3
7
|
## 0.16.36
|
|
4
8
|
|
|
5
9
|
`catalyst setup --only codex-attribution` turns on Codex attribution on a machine that is already set up, without running the other setup steps. It adds the codex function to `~/.zshrc` and `~/.bashrc`, and on a Mac the login agent. Before it first changes an rc file, it keeps a byte-for-byte copy beside it, ending in `.before-codex-attribution`, and never overwrites an earlier copy. Running it again changes nothing. `--dry-run` shows exactly what it would add and changes nothing, and `--json` prints the result as one document.
|
package/dist/agent-repoint.js
CHANGED
|
@@ -13,7 +13,7 @@ import { dirname, join } from "node:path";
|
|
|
13
13
|
import { fileURLToPath } from "node:url";
|
|
14
14
|
import { compareVersions, exactVersion } from "./approved-release.js";
|
|
15
15
|
import { LEGACY_PACKAGE_NAME, readManifest } from "./config.js";
|
|
16
|
-
import { AUTO_UPDATE_LABEL, defaultRun, enableAutoUpdate, launchAgentPath, scheduledPath, systemdUnitPaths, writeFileAtomic, } from "./runner-auto-update.js";
|
|
16
|
+
import { AUTO_UPDATE_LABEL, custodyNode, defaultRun, enableAutoUpdate, launchAgentPath, scheduledPath, systemdUnitPaths, writeFileAtomic, } from "./runner-auto-update.js";
|
|
17
17
|
import { CLAUDE_PATH_ENV, resolveClaude } from "./update-plugin.js";
|
|
18
18
|
/** Long enough for an in-place update (under a minute on a Mac measured 2026-10-24), well inside the
|
|
19
19
|
* installer's 600-second budget for the whole npm install. */
|
|
@@ -47,13 +47,14 @@ function unitProgram(text) {
|
|
|
47
47
|
return programOf(unitWords(exec), env("PATH"), env(CLAUDE_PATH_ENV));
|
|
48
48
|
}
|
|
49
49
|
function programOf(args, path, claude) {
|
|
50
|
-
const [
|
|
51
|
-
|
|
50
|
+
const node = args.length === 7 ? (args[0] ?? null) : null;
|
|
51
|
+
const [cli, ...rest] = node === null ? args : args.slice(1);
|
|
52
|
+
if (cli === undefined || !cli.startsWith("/") || (node !== null && !node.startsWith("/")) || rest.length !== 5)
|
|
52
53
|
return null;
|
|
53
54
|
const [a, b, c, d, dir] = rest;
|
|
54
55
|
if (a !== "runner" || b !== "update" || c !== "--auto" || d !== "--dir" || dir === undefined || !dir.startsWith("/"))
|
|
55
56
|
return null;
|
|
56
|
-
return { cli, dir, path, claude };
|
|
57
|
+
return { node, cli, dir, path, claude };
|
|
57
58
|
}
|
|
58
59
|
const real = (path) => {
|
|
59
60
|
try {
|
|
@@ -165,12 +166,16 @@ function decide(deps, seen) {
|
|
|
165
166
|
return { action: "skipped", reason: "agent_unrecognized" };
|
|
166
167
|
seen.dir = program.dir;
|
|
167
168
|
const from = real(program.cli);
|
|
168
|
-
|
|
169
|
+
// CTC-7030: an agent already on this install is rewritten only when it runs under another node
|
|
170
|
+
// than its thoughts custody was set up with, which would refuse every update.
|
|
171
|
+
const node = platform === "darwin" ? custodyNode(program.dir) : null;
|
|
172
|
+
const current = from !== null && from === real(deps.self);
|
|
173
|
+
if (current && program.node === node)
|
|
169
174
|
return { action: "skipped", reason: "already_current" };
|
|
170
175
|
// A program that no longer exists runs nothing, so any working copy is better. One that exists
|
|
171
176
|
// moves only when it is a catalyst CLI older than this one.
|
|
172
|
-
let fromVersion = null;
|
|
173
|
-
if (from !== null) {
|
|
177
|
+
let fromVersion = current ? deps.version : null;
|
|
178
|
+
if (from !== null && !current) {
|
|
174
179
|
fromVersion = cliVersionAt(program.cli);
|
|
175
180
|
if (fromVersion === null)
|
|
176
181
|
return { action: "skipped", reason: "agent_cli_unrecognized" };
|
|
@@ -195,6 +200,7 @@ function decide(deps, seen) {
|
|
|
195
200
|
home: deps.home,
|
|
196
201
|
uid: deps.uid,
|
|
197
202
|
cli: deps.self,
|
|
203
|
+
node,
|
|
198
204
|
path: scheduledPath(deps.self, deps.nodeExecutable, program.path ?? deps.env.PATH),
|
|
199
205
|
claude: program.claude ?? resolveClaude(deps.home, deps.env),
|
|
200
206
|
run: deps.run,
|
|
@@ -207,7 +213,7 @@ function decide(deps, seen) {
|
|
|
207
213
|
}
|
|
208
214
|
if (status.state !== "on")
|
|
209
215
|
return { action: "failed", detail: status.detail };
|
|
210
|
-
return { action: "repointed", from: program.cli, fromVersion, to: deps.self, backup };
|
|
216
|
+
return { action: "repointed", from: program.cli, fromVersion, to: deps.self, backup, ...(node !== null ? { node } : {}) };
|
|
211
217
|
}
|
|
212
218
|
catch (err) {
|
|
213
219
|
return { action: "failed", detail: (err instanceof Error ? err.message : String(err)).slice(0, 160) };
|
|
@@ -215,8 +221,10 @@ function decide(deps, seen) {
|
|
|
215
221
|
}
|
|
216
222
|
/** One line for the person, or null when there is nothing to say. */
|
|
217
223
|
export function repointLine(result, version) {
|
|
218
|
-
if (result.action === "repointed")
|
|
219
|
-
|
|
224
|
+
if (result.action === "repointed") {
|
|
225
|
+
const under = result.node === undefined ? "" : `, under ${result.node}, the node this machine's thoughts custody was set up with,`;
|
|
226
|
+
return `catalyst: the runner update agent now runs ${result.to} (${version})${under} instead of ${result.from} (${result.fromVersion ?? "missing"}). The previous agent file is kept at ${result.backup}.`;
|
|
227
|
+
}
|
|
220
228
|
if (result.action === "skipped" && result.reason === "agent_not_writable")
|
|
221
229
|
return `catalyst: the runner update agent at ${result.agent} runs an older catalyst, and this install cannot change it. Ask whoever installed it to run: catalyst runner auto-update on`;
|
|
222
230
|
if (result.action === "skipped" && result.reason === "agent_busy")
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { spawnSync } from "node:child_process";
|
|
2
|
-
import { existsSync, mkdirSync, readFileSync, renameSync, unlinkSync, writeFileSync } from "node:fs";
|
|
2
|
+
import { accessSync, constants, existsSync, mkdirSync, readFileSync, renameSync, unlinkSync, writeFileSync } from "node:fs";
|
|
3
3
|
import { dirname, join } from "node:path";
|
|
4
4
|
import { CLAUDE_PATH_ENV } from "./update-plugin.js";
|
|
5
5
|
// The schedule that runs `catalyst runner update --auto` every 15 minutes (CTC-4646): a LaunchAgent
|
|
@@ -35,7 +35,7 @@ export function systemdUnitPaths(home) {
|
|
|
35
35
|
return { service: join(base, `${AUTO_UPDATE_UNIT}.service`), timer: join(base, `${AUTO_UPDATE_UNIT}.timer`) };
|
|
36
36
|
}
|
|
37
37
|
export function launchAgentPlist(deps, dir) {
|
|
38
|
-
const args = [deps.cli, "runner", "update", "--auto", "--dir", dir];
|
|
38
|
+
const args = [...(deps.node ? [deps.node] : []), deps.cli, "runner", "update", "--auto", "--dir", dir];
|
|
39
39
|
return [
|
|
40
40
|
'<?xml version="1.0" encoding="UTF-8"?>',
|
|
41
41
|
'<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">',
|
|
@@ -129,6 +129,23 @@ export function autoUpdateStatus(deps) {
|
|
|
129
129
|
}
|
|
130
130
|
return { state: "unsupported", detail: `platform_${platform}` };
|
|
131
131
|
}
|
|
132
|
+
/** CTC-7030: the node a Mac's thoughts custody was set up with, when that node is still there. The
|
|
133
|
+
* custody records it by path and hash beside the runner directory, and every update re-attests the
|
|
134
|
+
* custody under the node that runs it, refusing any other. A CLI installed under a different node
|
|
135
|
+
* (the daily job's own prefix) must therefore still run under this one. */
|
|
136
|
+
export function custodyNode(dir) {
|
|
137
|
+
try {
|
|
138
|
+
const runtime = JSON.parse(readFileSync(join(dirname(dir), "darwin-thoughts-custody", "runtime.json"), "utf8"));
|
|
139
|
+
const node = runtime.nodeExecutable;
|
|
140
|
+
if (typeof node !== "string" || !node.startsWith("/"))
|
|
141
|
+
return null;
|
|
142
|
+
accessSync(node, constants.X_OK);
|
|
143
|
+
return node;
|
|
144
|
+
}
|
|
145
|
+
catch {
|
|
146
|
+
return null;
|
|
147
|
+
}
|
|
148
|
+
}
|
|
132
149
|
/** Install and start the schedule. Rewrites the files every time, so a moved CLI or PATH is picked up. */
|
|
133
150
|
export function enableAutoUpdate(deps, dir) {
|
|
134
151
|
const platform = deps.platform ?? process.platform;
|
|
@@ -136,7 +153,7 @@ export function enableAutoUpdate(deps, dir) {
|
|
|
136
153
|
if (platform === "darwin") {
|
|
137
154
|
const uid = deps.uid ?? process.getuid?.() ?? 0;
|
|
138
155
|
const path = launchAgentPath(deps.home);
|
|
139
|
-
const text = launchAgentPlist(deps, dir);
|
|
156
|
+
const text = launchAgentPlist({ ...deps, node: deps.node === undefined ? custodyNode(dir) : deps.node }, dir);
|
|
140
157
|
const unchanged = existsSync(path) && readFileSync(path, "utf8") === text;
|
|
141
158
|
const domain = `gui/${uid}`;
|
|
142
159
|
const loaded = run("launchctl", ["print", `${domain}/${AUTO_UPDATE_LABEL}`]).status === 0;
|
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.37 — 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.37 — 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.37 — 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.37 — 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.37 — 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.37 — 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.37 — 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.37 — written in this repository for customer accounts -->
|
|
8
8
|
|
|
9
9
|
# What's happening
|
|
10
10
|
|