@catalyst-cloud/cli 0.16.40 → 0.16.41
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/README.md +1 -1
- package/dist/runner-command.js +5 -4
- package/dist/update-command.js +7 -5
- package/dist/update-policy.js +1 -1
- package/dist/update-windows.js +10 -12
- package/dist/update.js +1 -2
- 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.41
|
|
4
|
+
|
|
5
|
+
A runner's automatic update schedule now applies a newly approved runner release at its next check, instead of waiting for one of four set times of day. An owner who wants set times can still choose them with `catalyst update policy windows <HH:MM,...>`, and `catalyst update policy windows default` goes back to applying at the next check. `catalyst runner update` still applies a release at once, and `catalyst update policy` shows which setting is in effect.
|
|
6
|
+
|
|
3
7
|
## 0.16.40
|
|
4
8
|
|
|
5
9
|
`catalyst flow --repo <owner/name> --period 2w --granularity day` prints a repository's open pull request counts by the day, or by the hour with `--granularity hour`. `--json` prints the same buckets the SDK's `flow.series()` returns.
|
package/README.md
CHANGED
|
@@ -346,7 +346,7 @@ The skill files themselves are written by whichever install command you ran, in
|
|
|
346
346
|
|
|
347
347
|
The new CLI is installed beside the old one, and your `catalyst` command runs it at the same path. A running local replica restarts on it and keeps its synced data; a stopped one stays stopped. CLI, SDK and image updates keep their existing policy against moving to an older version. Ordinary CLI startup never replaces skills with its bundled copy.
|
|
348
348
|
|
|
349
|
-
On a machine checking for releases every 15 minutes (`catalyst runner auto-update on`), that check applies the same component policies. Otherwise components move when you run `catalyst update`. That check moves the runner images to a newer release
|
|
349
|
+
On a machine checking for releases every 15 minutes (`catalyst runner auto-update on`), that check applies the same component policies. Otherwise components move when you run `catalyst update`. That check moves the runner images to a newer release as soon as it finds one, with no set times of day. An update does not stop work that is already running: that work finishes on the image it started with. If you want updates only at set times, `catalyst update policy windows 06:00,18:00 --time-zone America/Chicago` sets your own times, `catalyst update policy windows default` goes back to none, and `catalyst runner update` or `catalyst update` applies a waiting release at once. Each component is on by default; turn one off with `catalyst update policy <component> off` (for example `cli`), and `catalyst update policy` lists every setting. If you turned the installer's daily update off, the CLI and both skills packs start held, and `catalyst update policy cli on` turns the CLI back on.
|
|
350
350
|
|
|
351
351
|
The installer's daily job runs the same release check, so it moves the CLI and the Cloud skills only to the approved release and keeps your holds. Until the development skills join the release, it refreshes them from their repository.
|
|
352
352
|
|
package/dist/runner-command.js
CHANGED
|
@@ -9,7 +9,7 @@ import { dockerFleetUpdateEngine, postRollLines, readPostRollResult, runFleetPos
|
|
|
9
9
|
import { runUpdate, sharedReleaseRead, updateReportJson, updateReportLines } from "./update.js";
|
|
10
10
|
import { effectivePolicy, readUpdatePolicy, setComponentPolicy } from "./update-policy.js";
|
|
11
11
|
import { resolveClaude } from "./update-plugin.js";
|
|
12
|
-
import {
|
|
12
|
+
import { windowBounds } from "./update-windows.js";
|
|
13
13
|
import { cmdRunnerLifecycle, RUNNER_LIFECYCLE_ACTIONS } from "./runner.js";
|
|
14
14
|
/** Set on the re-run, so it never re-runs itself again. */
|
|
15
15
|
export const CUSTODY_RERUN_ENV = "CATALYST_CUSTODY_NODE_RERUN";
|
|
@@ -156,16 +156,17 @@ export async function cmdRunner(args, ctx, deps = {}) {
|
|
|
156
156
|
};
|
|
157
157
|
// An owner's image hold stops this command's image work too, including the schedule's (CTC-6708).
|
|
158
158
|
const hold = check ? null : imageHold(ctx);
|
|
159
|
-
// The schedule's run takes a newer release
|
|
160
|
-
// once (CTC-
|
|
159
|
+
// The schedule's run takes a newer release at its next check, unless the owner saved update
|
|
160
|
+
// windows; then only in a window. An owner's own run applies at once (CTC-7465, update-windows.ts).
|
|
161
161
|
if (hold !== null) {
|
|
162
162
|
const retained = { outcome: "retained", detail: hold, generation: readReleaseState(dir()).generation, exitCode: hold === "owner_setting" ? 0 : 1 };
|
|
163
163
|
// Unreadable settings move nothing; a hold leaves the other components to the release check.
|
|
164
164
|
return print(retained, hold === "owner_setting" ? await components(undefined) : null);
|
|
165
165
|
}
|
|
166
|
+
const ownerWindows = auto && !check && !fleet ? readUpdatePolicy(ctx.home).windows : undefined;
|
|
166
167
|
const result = fleet
|
|
167
168
|
? await runFleetUpdate(deps.fleetEngine ?? dockerFleetUpdateEngine({ env: ctx.env }), { dir: dir(), check })
|
|
168
|
-
: await runRunnerUpdate(engine, { dir: dir(), check, ...(
|
|
169
|
+
: await runRunnerUpdate(engine, { dir: dir(), check, ...(ownerWindows ? { window: windowBounds(ctx.now().getTime(), ownerWindows) } : {}) });
|
|
169
170
|
// `runner update --check` also lists every installed component against the approved release, as
|
|
170
171
|
// `catalyst update --check` does. The image fields stay where scripts already read them.
|
|
171
172
|
if (check && !fleet && !auto) {
|
package/dist/update-command.js
CHANGED
|
@@ -10,7 +10,7 @@ import { UsageError } from "./errors.js";
|
|
|
10
10
|
import { dockerRunnerUpdateEngine, runnerDir } from "./runner-update.js";
|
|
11
11
|
import { policyLines, readEffectivePolicy, runUpdate, updateReportJson, updateReportLines } from "./update.js";
|
|
12
12
|
import { applySdkUpdate } from "./update-sdk.js";
|
|
13
|
-
import {
|
|
13
|
+
import { isTimeZone, normalizeWindowTimes } from "./update-windows.js";
|
|
14
14
|
import { canonicalProject, effectivePolicy, isUpdateComponent, readUpdatePolicy, setComponentPolicy, setProjectSdkPolicy, setWindowPolicy, UPDATE_COMPONENTS, } from "./update-policy.js";
|
|
15
15
|
const USAGE = "catalyst update [--check] [--project <absolute path>] [--dir <runner directory>] [--json] | update sdk --project <absolute path> | update policy [<component> on|off] | update policy sdk on|off --project <absolute path> | update policy windows <HH:MM,...>|default [--time-zone <zone>]";
|
|
16
16
|
/** How each component reads in a sentence. */
|
|
@@ -41,7 +41,7 @@ function cmdPolicy(parts, args, ctx) {
|
|
|
41
41
|
ctx.stdout(JSON.stringify({
|
|
42
42
|
components: UPDATE_COMPONENTS.map((id) => ({ id, ...effectivePolicy(policy, id) })),
|
|
43
43
|
projects: policy.projects.map((p) => ({ path: p.path, sdk: p.sdk, source: p.source })),
|
|
44
|
-
windows: { times: policy.windows?.times ?? [
|
|
44
|
+
windows: { times: policy.windows?.times ?? [], timeZone: policy.windows?.timeZone ?? null, source: policy.windows ? "owner" : "default" },
|
|
45
45
|
}));
|
|
46
46
|
else
|
|
47
47
|
for (const line of policyLines(policy))
|
|
@@ -81,7 +81,7 @@ function cmdPolicy(parts, args, ctx) {
|
|
|
81
81
|
return 0;
|
|
82
82
|
}
|
|
83
83
|
/** `update policy windows 03:00,11:00|default [--time-zone <zone>]`: when the schedule may take a
|
|
84
|
-
* newer runner release. `default` goes back to
|
|
84
|
+
* newer runner release. `default` goes back to no set times: the next check applies it. */
|
|
85
85
|
function cmdWindows(parts, args, ctx) {
|
|
86
86
|
const value = parts[2];
|
|
87
87
|
if (parts.length !== 3 || value === undefined)
|
|
@@ -101,12 +101,14 @@ function cmdWindows(parts, args, ctx) {
|
|
|
101
101
|
setWindowPolicy(ctx.home, { times, timeZone: zone ?? null });
|
|
102
102
|
}
|
|
103
103
|
const saved = readUpdatePolicy(ctx.home).windows;
|
|
104
|
-
const times = saved?.times ?? [
|
|
104
|
+
const times = saved?.times ?? [];
|
|
105
105
|
const timeZone = saved?.timeZone ?? null;
|
|
106
106
|
if (args.json)
|
|
107
107
|
ctx.stdout(JSON.stringify({ windows: { times, timeZone, source: saved ? "owner" : "default" } }));
|
|
108
|
-
else
|
|
108
|
+
else if (saved)
|
|
109
109
|
ctx.stdout(`Runner releases now apply at ${times.join(", ")} (${timeZone ?? "this machine's time zone"}). catalyst runner update still applies one at once.`);
|
|
110
|
+
else
|
|
111
|
+
ctx.stdout("Runner releases now apply at the next check after one is approved, with no set times. catalyst runner update still applies one at once.");
|
|
110
112
|
return 0;
|
|
111
113
|
}
|
|
112
114
|
async function cmdSdk(parts, args, ctx, deps) {
|
package/dist/update-policy.js
CHANGED
|
@@ -202,7 +202,7 @@ export function setProjectSdkPolicy(home, path, sdk) {
|
|
|
202
202
|
});
|
|
203
203
|
return saved ?? { ...project, sdk, source: "owner" };
|
|
204
204
|
}
|
|
205
|
-
/** Save the owner's update windows, or go back to
|
|
205
|
+
/** Save the owner's update windows, or go back to none with null. */
|
|
206
206
|
export function setWindowPolicy(home, windows) {
|
|
207
207
|
return updateUpdatePolicy(home, (policy) => {
|
|
208
208
|
if (windows === null)
|
package/dist/update-windows.js
CHANGED
|
@@ -1,15 +1,11 @@
|
|
|
1
|
-
// update-windows.ts — the set times of day a self-hosted machine
|
|
2
|
-
//
|
|
3
|
-
//
|
|
4
|
-
//
|
|
5
|
-
//
|
|
6
|
-
//
|
|
7
|
-
|
|
8
|
-
export const DEFAULT_WINDOW_TIMES = ["03:00", "11:00", "16:00", "22:00"];
|
|
1
|
+
// update-windows.ts — the set times of day an owner may choose for a self-hosted machine to take a
|
|
2
|
+
// new release (CTC-6709). By default there are none (CTC-7465): the 15-minute schedule applies a
|
|
3
|
+
// newer release at its next check, because an update restarts only the supervisor, in place, and
|
|
4
|
+
// every running job finishes on the image it started with. An owner who wants set times saves them
|
|
5
|
+
// with `catalyst update policy windows`. The schedule then applies a newer release only once a window
|
|
6
|
+
// has opened since the last window a run settled, and an owner's own `catalyst runner update` still
|
|
7
|
+
// applies at once. Windows are wall-clock times in the machine's time zone, or the zone its owner saved.
|
|
9
8
|
const TIME = /^([01][0-9]|2[0-3]):([0-5][0-9])$/;
|
|
10
|
-
export function defaultWindows() {
|
|
11
|
-
return { times: [...DEFAULT_WINDOW_TIMES], timeZone: null };
|
|
12
|
-
}
|
|
13
9
|
export function isWindowTime(value) {
|
|
14
10
|
return TIME.test(value);
|
|
15
11
|
}
|
|
@@ -60,7 +56,9 @@ function instantOf(year, month, day, hour, minute, timeZone) {
|
|
|
60
56
|
/** The window before and after `nowMs`. */
|
|
61
57
|
export function windowBounds(nowMs, windows) {
|
|
62
58
|
const timeZone = windows.timeZone ?? machineTimeZone();
|
|
63
|
-
const times = normalizeWindowTimes(windows.times)
|
|
59
|
+
const times = normalizeWindowTimes(windows.times);
|
|
60
|
+
if (times === null)
|
|
61
|
+
throw new Error(`update windows ${JSON.stringify(windows.times)} are not 24-hour times`);
|
|
64
62
|
const today = wallClock(nowMs, timeZone);
|
|
65
63
|
const candidates = [];
|
|
66
64
|
// Two calendar days either side of today's date in the zone. Stepping by date, not by 24 hours,
|
package/dist/update.js
CHANGED
|
@@ -21,7 +21,6 @@ import { applyCloudPluginUpdate, CLOUD_PLUGIN_COMMAND } from "./update-plugin.js
|
|
|
21
21
|
import { onboardStatePath, readOnboardJournal } from "./onboard.js";
|
|
22
22
|
import { effectivePolicy, projectIdentityHolds, readUpdatePolicy, UPDATE_COMPONENTS, withMigratedHolds, } from "./update-policy.js";
|
|
23
23
|
import { applySdkUpdate, inspectSdkProject } from "./update-sdk.js";
|
|
24
|
-
import { DEFAULT_WINDOW_TIMES } from "./update-windows.js";
|
|
25
24
|
import { decideRelease, isRecord, parseDesiredRelease, readReleaseState, RELEASE_COMPONENTS, runRunnerUpdate, updateReport, } from "./runner-update.js";
|
|
26
25
|
export const COMPONENT_LABELS = {
|
|
27
26
|
runner: "Runner",
|
|
@@ -597,6 +596,6 @@ export function policyLines(policy) {
|
|
|
597
596
|
for (const project of policy.projects)
|
|
598
597
|
lines.push(`${cell(`SDK ${project.path}`, 19)}${cell(project.sdk === "auto" ? "on" : "off", 5)}(${project.source}${project.sdk === "notify" ? ", notify only" : ""})`);
|
|
599
598
|
const windows = policy.windows;
|
|
600
|
-
lines.push(`Runner releases apply at ${
|
|
599
|
+
lines.push(windows ? `Runner releases apply at ${windows.times.join(", ")} (${windows.timeZone ?? "this machine's time zone"}; owner)` : "Runner releases apply at the next check, with no set times (default)");
|
|
601
600
|
return lines;
|
|
602
601
|
}
|
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.41 — 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.41 — 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.41 — 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.41 — 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.41 — 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.41 — 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.41 — 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.41 — written in this repository for customer accounts -->
|
|
8
8
|
|
|
9
9
|
# What's happening
|
|
10
10
|
|