@catalyst-cloud/cli 0.15.6 → 0.16.0
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/args.js +20 -1
- package/dist/ask.js +56 -0
- package/dist/onboard-github-copy.js +2 -0
- package/dist/onboard-github.js +2 -0
- package/dist/onboard-next.js +3 -2
- package/dist/onboard-ui.js +6 -1
- package/dist/onboard-workflow.js +32 -7
- package/package.json +8 -5
- 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/catalyst-onboard/references/declaring-a-repository.md +1 -1
- package/skills/catalyst-onboard/references/reading-ready.md +1 -1
- package/skills/catalyst-onboard/scripts/where-am-i.mjs +2 -2
- package/skills/run-this-project/SKILL.md +1 -1
- package/skills/unstick/SKILL.md +1 -1
- package/skills/what-needs-me/SKILL.md +2 -2
- package/skills/what-needs-me/references/raising-a-decision.md +11 -0
- package/skills/what-needs-me/scripts/raise.mjs +10 -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.0
|
|
4
|
+
|
|
5
|
+
The CLI, skills and plugin now share the 0.16 release line with the SDK and installer. The CLI installs the matching Node replica module for local cache commands. Update the CLI and update the Catalyst plugin through your agent's plugin manager.
|
|
6
|
+
|
|
3
7
|
## 0.15.6
|
|
4
8
|
|
|
5
9
|
Setup checks current readiness and waits up to one minute while Catalyst reads repository settings.
|
package/dist/args.js
CHANGED
|
@@ -280,6 +280,25 @@ export const FLAG_TABLES = {
|
|
|
280
280
|
value: false,
|
|
281
281
|
help: "raise: declare that nothing is blocked",
|
|
282
282
|
},
|
|
283
|
+
"gates-pr": {
|
|
284
|
+
value: true,
|
|
285
|
+
repeat: true,
|
|
286
|
+
help: "raise: a PR whose hold the answer releases (repeatable; needs --released-by)",
|
|
287
|
+
},
|
|
288
|
+
"gates-label": {
|
|
289
|
+
value: true,
|
|
290
|
+
repeat: true,
|
|
291
|
+
help: "raise: the hold label the answer removes: hold or hold:preview (repeatable; default hold)",
|
|
292
|
+
},
|
|
293
|
+
"released-by": {
|
|
294
|
+
value: true,
|
|
295
|
+
repeat: true,
|
|
296
|
+
help: "raise: an option letter whose answer releases the hold (repeatable)",
|
|
297
|
+
},
|
|
298
|
+
"gates-repo": {
|
|
299
|
+
value: true,
|
|
300
|
+
help: "raise: the --gates-pr repository as owner/name (default: the account's only repository)",
|
|
301
|
+
},
|
|
283
302
|
anyone: {
|
|
284
303
|
value: false,
|
|
285
304
|
help: "list: every open ask in the tenant, not only the ones assigned to you",
|
|
@@ -479,7 +498,7 @@ export const VERB_USAGE = {
|
|
|
479
498
|
queue: "queue [--team K] [--json]",
|
|
480
499
|
watch: "watch [--team K] [--ticket T]... [--project P] [--exec CMD] [--cursor-file <path>] [--from cursor|head]",
|
|
481
500
|
write: "write <comment <ticket> --body|--stdin [--parent] [--bookkeeping] [--as-user] | state <ticket> --slot|--state-id|--state-type | label <ticket> --add... --remove... | create --team --title [--description|--stdin] [--label] [--priority] | reaction <ticket>|--comment <id> --emoji <e> | attachment <ticket> --title --url | session <ticket> [--title] [--plan-file] [--activity]>",
|
|
482
|
-
ask: "ask <raise --team --title [--context] [--option]... [--default] --blocks <ticket>...|--nothing-to-block [--ask-key] | accept <askTicket> --answer <commentId> --role <role> | list [--anyone] [--json]>",
|
|
501
|
+
ask: "ask <raise --team --title [--context] [--option]... [--default] --blocks <ticket>...|--nothing-to-block [--ask-key] [--gates-pr <n>... --released-by <letter>... [--gates-label hold|hold:preview]... [--gates-repo <owner/name>]] | accept <askTicket> --answer <commentId> --role <role> | list [--anyone] [--json]>",
|
|
483
502
|
ready: "ready [--onboarding] [--local-sync] [--json] [--offline]",
|
|
484
503
|
accounts: "accounts [--json]",
|
|
485
504
|
mcp: "mcp <add <name> --url URL <--auth none|--bearer SECRET_NAME|--header NAME=SECRET_NAME...>|list|remove <name>> [--json]",
|
package/dist/ask.js
CHANGED
|
@@ -39,6 +39,7 @@ async function raise(args, ctx, doc, api) {
|
|
|
39
39
|
if (options.length > doc.askTemplate.maxLetteredOptions) {
|
|
40
40
|
throw new UsageError(`ask raise takes at most ${doc.askTemplate.maxLetteredOptions} options`);
|
|
41
41
|
}
|
|
42
|
+
const gates = askGates(args, options, doc);
|
|
42
43
|
const blocks = [];
|
|
43
44
|
for (const t of flagList(args, "blocks"))
|
|
44
45
|
blocks.push((await resolveIssue(api, t)).id);
|
|
@@ -55,10 +56,65 @@ async function raise(args, ctx, doc, api) {
|
|
|
55
56
|
body.nothingToBlock = true;
|
|
56
57
|
if (flagString(args, "ask-key"))
|
|
57
58
|
body.askKey = flagString(args, "ask-key");
|
|
59
|
+
if (gates)
|
|
60
|
+
body.gates = gates;
|
|
58
61
|
const result = await postAgent(api, doc, "ask", body);
|
|
59
62
|
ctx.stdout(args.json ? JSON.stringify(result) : `ask raised: ${String(result.identifier ?? result.id ?? "ok")}${blocks.length ? ` (blocks ${blocks.length})` : ""}`);
|
|
60
63
|
return 0;
|
|
61
64
|
}
|
|
65
|
+
/** The hold labels an answered ask may lift; the cloud's ask route refuses any other with a 400. */
|
|
66
|
+
const GATE_LABELS = ["hold", "hold:preview"];
|
|
67
|
+
const OWNER_NAME = /^[^/\s]+\/[^/\s]+$/;
|
|
68
|
+
/** CTC-5044 — the PR hold an answer releases. Absent unless --gates-pr is given, so an ask without it
|
|
69
|
+
* posts exactly the body it always did. Everything the route would refuse (a label outside
|
|
70
|
+
* {@link GATE_LABELS}, a letter that is not one of this ask's options) is refused here first, before
|
|
71
|
+
* any ticket is resolved or anything is posted. Options are lettered A, B, C in the order given. */
|
|
72
|
+
function askGates(args, options, doc) {
|
|
73
|
+
const prs = flagList(args, "gates-pr");
|
|
74
|
+
if (prs.length === 0) {
|
|
75
|
+
for (const f of ["released-by", "gates-label", "gates-repo"]) {
|
|
76
|
+
if (flagList(args, f).length || flagString(args, f))
|
|
77
|
+
throw new UsageError(`ask raise takes --${f} only with --gates-pr <n>`);
|
|
78
|
+
}
|
|
79
|
+
return undefined;
|
|
80
|
+
}
|
|
81
|
+
const pr = [...new Set(prs.map((n) => {
|
|
82
|
+
if (!/^[1-9]\d*$/.test(n))
|
|
83
|
+
throw new UsageError(`--gates-pr must be a PR number (got "${n}")`);
|
|
84
|
+
return Number(n);
|
|
85
|
+
}))];
|
|
86
|
+
const labels = [...new Set(flagList(args, "gates-label"))];
|
|
87
|
+
for (const l of labels) {
|
|
88
|
+
if (!GATE_LABELS.includes(l))
|
|
89
|
+
throw new UsageError(`--gates-label ${l} is not a hold an answer can release; use one of: ${GATE_LABELS.join(", ")}`);
|
|
90
|
+
}
|
|
91
|
+
const released = [...new Set(flagList(args, "released-by").map((l) => l.trim().toUpperCase()))];
|
|
92
|
+
if (released.length === 0)
|
|
93
|
+
throw new UsageError("--gates-pr needs --released-by <letter>: the option whose answer releases the hold");
|
|
94
|
+
const letters = options.map((_, i) => String.fromCharCode(65 + i));
|
|
95
|
+
for (const l of released) {
|
|
96
|
+
if (!letters.includes(l))
|
|
97
|
+
throw new UsageError(`--released-by ${l} is not one of this ask's options (${letters.length ? letters.join(", ") : "it has none; add --option"})`);
|
|
98
|
+
}
|
|
99
|
+
const registered = doc.merge.repositories.map((r) => `${r.owner}/${r.name}`);
|
|
100
|
+
const named = flagString(args, "gates-repo");
|
|
101
|
+
let repo;
|
|
102
|
+
if (named !== undefined) {
|
|
103
|
+
if (!OWNER_NAME.test(named))
|
|
104
|
+
throw new UsageError(`--gates-repo must be owner/name (got "${named}")`);
|
|
105
|
+
const match = registered.find((r) => r.toLowerCase() === named.toLowerCase());
|
|
106
|
+
if (registered.length && !match)
|
|
107
|
+
throw new UsageError(`--gates-repo ${named} is not a repository this account registers (${registered.join(", ")})`);
|
|
108
|
+
repo = match ?? named;
|
|
109
|
+
}
|
|
110
|
+
else if (registered.length === 1) {
|
|
111
|
+
repo = registered[0];
|
|
112
|
+
}
|
|
113
|
+
else {
|
|
114
|
+
throw new UsageError(`--gates-pr needs --gates-repo <owner/name>: this account registers ${registered.length ? registered.join(", ") : "no repository"}`);
|
|
115
|
+
}
|
|
116
|
+
return { repo, pr: pr.length === 1 ? pr[0] : pr, labels: labels.length ? labels : ["hold"], releasedBy: released };
|
|
117
|
+
}
|
|
62
118
|
async function accept(args, ctx, doc, api, rest) {
|
|
63
119
|
const askTicket = rest[0];
|
|
64
120
|
const answer = flagString(args, "answer");
|
package/dist/onboard-github.js
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { finishOnTheWeb } from "./consent-browser.js";
|
|
2
|
+
import { GITHUB_CONFIRM_ACCESS } from "./onboard-github-copy.js";
|
|
2
3
|
import { loadConfig, normalizeBaseUrl } from "./config.js";
|
|
3
4
|
import { pollConsent } from "./onboard-consent.js";
|
|
4
5
|
import { GITHUB_PERMISSION, githubInstallationPage, parsePermissions, } from "./onboard-permissions.js";
|
|
@@ -468,6 +469,7 @@ export function githubInstallationAdapter(options) {
|
|
|
468
469
|
reason: "github_installation_admin_required",
|
|
469
470
|
};
|
|
470
471
|
// The signed URL is transient credential material: only the browser receives it.
|
|
472
|
+
ctx.stderr(GITHUB_CONFIRM_ACCESS);
|
|
471
473
|
let browserUnavailable = false;
|
|
472
474
|
try {
|
|
473
475
|
await options.openBrowser(url, signal);
|
package/dist/onboard-next.js
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { nativeEgressInstallCommands } from "./onboard-runner-egress.js";
|
|
2
|
+
import { GITHUB_CONFIRM_ACCESS } from "./onboard-github-copy.js";
|
|
2
3
|
import { INSTALL_COMMAND, loadConfig, normalizeBaseUrl } from "./config.js";
|
|
3
4
|
import { githubInstallationPage } from "./onboard-permissions.js";
|
|
4
5
|
import { valuesFacts, valuesFix } from "./ready-copy.js";
|
|
@@ -138,7 +139,7 @@ const REASONS = {
|
|
|
138
139
|
runner_needs_runner_flag: "This machine was set up to run Catalyst's work, but its runner is not running or not enrolled. To bring it up, run catalyst onboard --runner.",
|
|
139
140
|
runner_capability_pending: "The runner enrolled but has not reported its capacity yet. Run catalyst onboard again in a minute.",
|
|
140
141
|
runner_admission_unverified: "Setup could not read whether the team's pool admits runner hosts. Run catalyst onboard again to retry.",
|
|
141
|
-
github_app_permissions_outdated:
|
|
142
|
+
github_app_permissions_outdated: `The existing GitHub App installation needs updated permissions accepted. ${GITHUB_CONFIRM_ACCESS} An organization owner on GitHub opens the App's installation page, chooses Review permissions, then Accept new permissions. Run catalyst onboard afterward.`,
|
|
142
143
|
github_app_repository_missing: "The GitHub App installation cannot reach a repository a project registers. An organization owner on GitHub adds it under the installation's Repository access, then run catalyst onboard.",
|
|
143
144
|
github_app_repository_not_installed: "No GitHub App installation can reach a repository a project registers. A workspace owner or administrator installs the GitHub App on its owner: run catalyst onboard.",
|
|
144
145
|
github_app_permissions_unverified: "The GitHub App installation works, but its granted permissions could not be checked. Run catalyst onboard to try again.",
|
|
@@ -246,7 +247,7 @@ function permissionText(step, baseUrl) {
|
|
|
246
247
|
case "github_app_permissions_outdated":
|
|
247
248
|
if (!url)
|
|
248
249
|
return undefined;
|
|
249
|
-
return `GitHub App
|
|
250
|
+
return `The existing GitHub App installation${org ? ` on ${org}` : ""} needs updated permissions accepted${missing ? `: ${missing}` : ""}. ${GITHUB_CONFIRM_ACCESS} ${github} chooses Review permissions, then Accept new permissions at ${url}. Run catalyst onboard afterward.`;
|
|
250
251
|
case "github_app_repository_missing":
|
|
251
252
|
if (!url || !repository)
|
|
252
253
|
return undefined;
|
package/dist/onboard-ui.js
CHANGED
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { GITHUB_CONFIRM_ACCESS } from "./onboard-github-copy.js";
|
|
1
2
|
import { COMPUTER_CHECKS, standalonePlan, standalonePlanNotes, pendingContinuation, } from "./onboard-standalone-copy.js";
|
|
2
3
|
import { trackedPrompt } from "./setup-prompt-frame.js";
|
|
3
4
|
import { createOnboardInterrupts } from "./onboard-interrupts.js";
|
|
@@ -157,11 +158,13 @@ export function createClackOnboardUi(prompts, streams, deps = {}) {
|
|
|
157
158
|
return;
|
|
158
159
|
if (renderer &&
|
|
159
160
|
currentStep === "linear.adopt" &&
|
|
160
|
-
text.endsWith("
|
|
161
|
+
text.endsWith("has every required state and label"))
|
|
161
162
|
return;
|
|
162
163
|
if (renderer) {
|
|
163
164
|
if (currentStep &&
|
|
164
165
|
setupBrowserInstruction(currentStep, deps.baseUrl?.())) {
|
|
166
|
+
if (currentStep === "github.install" && text === GITHUB_CONFIRM_ACCESS)
|
|
167
|
+
renderer.detail(text);
|
|
165
168
|
if (/no browser opened|could not open a browser/i.test(text))
|
|
166
169
|
browserOpened = false;
|
|
167
170
|
return;
|
|
@@ -1028,6 +1031,8 @@ export function createClackOnboardUi(prompts, streams, deps = {}) {
|
|
|
1028
1031
|
? status()
|
|
1029
1032
|
: "waiting for you, up to 10 minutes");
|
|
1030
1033
|
renderer.action(browser.instruction);
|
|
1034
|
+
if (currentStep === "github.install")
|
|
1035
|
+
renderer.detail(GITHUB_CONFIRM_ACCESS);
|
|
1031
1036
|
if (browser.url)
|
|
1032
1037
|
renderer.detail(renderer.link(browser.url));
|
|
1033
1038
|
renderer.detail(renderer.dim(interactive ? "Ctrl-C skips this step." : "Ctrl-C stops setup."));
|
package/dist/onboard-workflow.js
CHANGED
|
@@ -145,13 +145,36 @@ export function observeOnboardWorkflow(value, team, now) {
|
|
|
145
145
|
: {}),
|
|
146
146
|
};
|
|
147
147
|
}
|
|
148
|
-
const
|
|
148
|
+
const plainText = (text) => text
|
|
149
149
|
.replace(/[\u0000-\u001f\u007f-\u009f\u200b-\u200f\u2028-\u202e\u2066-\u2069\ufeff]/g, "")
|
|
150
|
-
.trim()
|
|
151
|
-
|
|
150
|
+
.trim();
|
|
151
|
+
const label = (text) => plainText(text).slice(0, 80);
|
|
152
152
|
const listed = (names) => names.length > 10
|
|
153
153
|
? `${names.slice(0, 10).join(", ")}, and ${names.length - 10} more`
|
|
154
154
|
: names.join(", ");
|
|
155
|
+
function unfinishedLabelLines(plan) {
|
|
156
|
+
return [
|
|
157
|
+
...plan.labels.filter((row) => row.outcome === "refused").map((row) => {
|
|
158
|
+
const name = plainText(row.name);
|
|
159
|
+
const reason = plainText(row.reason ?? "Linear did not supply a reason.");
|
|
160
|
+
const guidance = name === "review-followup"
|
|
161
|
+
? "Optional for the cloud workflow; no action is needed to finish setup."
|
|
162
|
+
: [
|
|
163
|
+
name === "catalyst-not-an-ask"
|
|
164
|
+
? "Required for the cloud workflow. Without this label, work held by the ask-shape check cannot be released."
|
|
165
|
+
: "Only missing required labels block workflow readiness.",
|
|
166
|
+
"Ask a Linear workspace administrator to resolve the reported refusal and make this label available to the team, then run catalyst onboard.",
|
|
167
|
+
].join(" ");
|
|
168
|
+
return `Linear refused label: ${name}. ${reason} ${guidance}`;
|
|
169
|
+
}),
|
|
170
|
+
...(plan.labelsNotCreated ?? []).map((row) => {
|
|
171
|
+
const entry = object(row);
|
|
172
|
+
const name = typeof entry?.name === "string" ? plainText(entry.name) : "";
|
|
173
|
+
const reason = typeof entry?.reason === "string" ? plainText(entry.reason) : "";
|
|
174
|
+
return `Label not added: ${name || "Unnamed label"}. ${reason || "The server did not supply a reason; run catalyst onboard again to retry."}`;
|
|
175
|
+
}),
|
|
176
|
+
];
|
|
177
|
+
}
|
|
155
178
|
/** The adopt preview in plain words: stages and labels it creates or keeps. Linear's names are data. */
|
|
156
179
|
export function adoptPlanLines(plan) {
|
|
157
180
|
const group = (rows, outcome) => rows.filter((row) => row.outcome === outcome).map((row) => label(row.name));
|
|
@@ -161,11 +184,10 @@ export function adoptPlanLines(plan) {
|
|
|
161
184
|
["Linear refused stages", group(plan.stages, "refused")],
|
|
162
185
|
["Create labels", group(plan.labels, "would-create")],
|
|
163
186
|
["Labels already present", group(plan.labels, "already-present")],
|
|
164
|
-
["Linear refused labels", group(plan.labels, "refused")],
|
|
165
187
|
]
|
|
166
188
|
.filter(([, names]) => names.length > 0)
|
|
167
189
|
.map(([title, names]) => `${title}: ${listed(names)}`)
|
|
168
|
-
.concat(plan.unfilledLoadBearing?.length ? [`Required work stages still missing: ${plan.unfilledLoadBearing.length}`] : [], (plan.provenanceGaps?.length ?? 0) + (plan.labelProvenanceGaps?.length ?? 0) ? ["Some existing states or labels have no recorded creator; setup keeps them"] : [], plan
|
|
190
|
+
.concat(plan.unfilledLoadBearing?.length ? [`Required work stages still missing: ${plan.unfilledLoadBearing.length}`] : [], (plan.provenanceGaps?.length ?? 0) + (plan.labelProvenanceGaps?.length ?? 0) ? ["Some existing states or labels have no recorded creator; setup keeps them"] : [], unfinishedLabelLines(plan));
|
|
169
191
|
}
|
|
170
192
|
/** The only adopt bodies setup sends: this team, and the approved mode and hash. */
|
|
171
193
|
export function adoptRequestAllowed(body, team, allow) {
|
|
@@ -391,7 +413,7 @@ export function onboardWorkflowVerificationAdapter(input = {}) {
|
|
|
391
413
|
: {}),
|
|
392
414
|
},
|
|
393
415
|
};
|
|
394
|
-
}, () => input.message?.(`${onboardTeamKey(journal) ?? "This team"}
|
|
416
|
+
}, () => input.message?.(`${onboardTeamKey(journal) ?? "This team"} has every required state and label`));
|
|
395
417
|
if (!adopts)
|
|
396
418
|
return { check };
|
|
397
419
|
// A local non-admin never gets here; a 403 means the seat changed after login.
|
|
@@ -440,7 +462,10 @@ export function onboardWorkflowVerificationAdapter(input = {}) {
|
|
|
440
462
|
}
|
|
441
463
|
const created = (rows) => rows.filter((row) => row.outcome === "created").length;
|
|
442
464
|
const stages = created(reply.stages), labels = created(reply.labels);
|
|
443
|
-
summary =
|
|
465
|
+
summary = [
|
|
466
|
+
`Applied the Catalyst workflow to ${key}: created ${stages} ${stages === 1 ? "stage" : "stages"} and ${labels} ${labels === 1 ? "label" : "labels"}.`,
|
|
467
|
+
...unfinishedLabelLines(reply),
|
|
468
|
+
].join("\n");
|
|
444
469
|
return { state: "done" };
|
|
445
470
|
}, () => input.message?.(summary));
|
|
446
471
|
// Only the server's own plan-stale answer plans again; a later identity refusal does not.
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@catalyst-cloud/cli",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.16.0",
|
|
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",
|
|
@@ -48,18 +48,21 @@
|
|
|
48
48
|
"paths:check": "node scripts/vendor-paths.mjs --check",
|
|
49
49
|
"prose:check": "node scripts/check-public-prose.mjs",
|
|
50
50
|
"settings:check": "node scripts/vendor-settings.mjs --check",
|
|
51
|
-
"self-host:check": "node scripts/vendor-self-host.mjs --check"
|
|
51
|
+
"self-host:check": "node scripts/vendor-self-host.mjs --check",
|
|
52
|
+
"release:check": "node scripts/release-train-check.mjs && node --test scripts/release-train-check.test.mjs",
|
|
53
|
+
"prepublishOnly": "node scripts/release-train-check.mjs --publish cli"
|
|
52
54
|
},
|
|
53
55
|
"dependencies": {
|
|
54
|
-
"@catalyst-cloud/sdk": "0.
|
|
56
|
+
"@catalyst-cloud/sdk": "0.16.0",
|
|
55
57
|
"@clack/prompts": "1.8.1",
|
|
56
58
|
"fast-string-width": "3.0.2",
|
|
57
59
|
"fast-wrap-ansi": "0.2.2",
|
|
58
60
|
"smol-toml": "^1.7.1",
|
|
59
|
-
"yaml": "^2.9.0"
|
|
61
|
+
"yaml": "^2.9.0",
|
|
62
|
+
"@catalyst-cloud/sdk-replica-node": "0.16.0"
|
|
60
63
|
},
|
|
61
64
|
"devDependencies": {
|
|
62
|
-
"@catalyst-cloud/schema": "0.
|
|
65
|
+
"@catalyst-cloud/schema": "0.16.0",
|
|
63
66
|
"@types/node": "^26.3.0",
|
|
64
67
|
"@vitest/coverage-v8": "^4.1.11",
|
|
65
68
|
"typescript": "^7.0.2",
|
|
@@ -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.
|
|
7
|
+
<!-- vendored-from: @catalyst-cloud/catalyst-skills@0.16.0 — 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.
|
|
7
|
+
<!-- vendored-from: @catalyst-cloud/catalyst-skills@0.16.0 — 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.
|
|
7
|
+
<!-- vendored-from: @catalyst-cloud/catalyst-skills@0.16.0 — written in this repository for customer accounts -->
|
|
8
8
|
|
|
9
9
|
# Onboard me
|
|
10
10
|
|
|
@@ -14,7 +14,7 @@ The assistant prepares `.catalyst/catalyst.toml` from the repository. Never ask
|
|
|
14
14
|
|
|
15
15
|
Show a short preview with the project/team, setup and verify commands, variable names, which are marked secret, and confirmation that every variable is optional. Do not include values. Ask the person to approve this exact draft. Before approval, do not write or replace `.catalyst/catalyst.toml`, remove `catalyst.env.json`, or open a settings PR.
|
|
16
16
|
|
|
17
|
-
After approval, write the validated file. When converting a legacy-only repository, remove `catalyst.env.json` in the same change. Open the settings PR, then offer to watch it merge.
|
|
17
|
+
After approval, write the validated file. When converting a legacy-only repository, remove `catalyst.env.json` in the same change. Open the settings PR, then offer to watch it merge. A reviewed merge is the approval. Catalyst approves the exact merged revision, with no second step, when someone other than the PR's author approved the merged head commit, or when a workspace owner or admin merged the PR. Tell the person this before they merge: the approving review is their consent to the setup commands and secret names in the file, so a reviewer should read it like code. A direct push, an unreviewed merge, or an approval left before the last commit leaves the revision proposed. Only then give an owner or admin a direct link to approve it at Settings → Your projects → the project → Repositories → the repository → Environment → Setup declaration → Approve this revision. The direct route is `/settings/projects/$projectId/repositories/$repoId/environment/declaration`; use the project and repository ids from Catalyst instead of guessing them.
|
|
18
18
|
|
|
19
19
|
## File shape
|
|
20
20
|
|
|
@@ -44,7 +44,7 @@ A team is `ready`, `degraded`, `blocked` or `unchecked` (no pass yet, a note). S
|
|
|
44
44
|
| `writes_land` | Catalyst has written to the team | `no_write_observed` clears on the first move; a refused write: check the connection and permissions | owner or admin when refused; otherwise nobody |
|
|
45
45
|
| `webhook_covers_team` | the team's events arrive | `no_delivery_observed` clears once a registered repository's events flow | owner or admin, by registering the repository |
|
|
46
46
|
| `hosts_current` | no connected host runs an older mapping | `references/what-a-phase-needs.md`; `no_host_connected` is waiting | whoever runs that host |
|
|
47
|
-
| `environment_declared` | the default repository's `.catalyst/catalyst.toml` is ingested, valid and approved | the reason names the step: register a default repository, commit or fix the file, or approve
|
|
47
|
+
| `environment_declared` | the default repository's `.catalyst/catalyst.toml` is ingested, valid and approved | the reason names the step: register a default repository, commit or fix the file through a reviewed pull request, or approve a revision that merged without one (`references/declaring-a-repository.md`) | owner or admin, except committing the file, which is whoever can push |
|
|
48
48
|
| `tools_resolvable` | every MCP server and CLI the declaration names resolves | `tool_reference_unresolved`: add the secret or fix the declaration; `toolchain_cli_missing` is not self-service | owner or admin, in the declaration or Settings → Environment |
|
|
49
49
|
| `reviewer_required` | the repository can merge under its policy | a strict policy with no reviewer: configure one at Settings → Your projects → the project → Repositories → the repository → Code reviews, or relax the policy; only the merge waits | owner or admin, in settings |
|
|
50
50
|
| `reviewer_configured` | a code reviewer is configured at all | configure one there; a fail never blocks or degrades | owner or admin, in settings; nobody is required when it fails |
|
|
@@ -1050,7 +1050,7 @@ const DECL_REASONS = {
|
|
|
1050
1050
|
page: null,
|
|
1051
1051
|
},
|
|
1052
1052
|
declaration_awaiting_approval: {
|
|
1053
|
-
text: "the declaration is proposed and waits for approval: Settings → Your projects → the project → Repositories → the repository → Environment → Setup declaration → Approve this revision",
|
|
1053
|
+
text: "the declaration is proposed and waits for approval, because no review approved it (a non-author approval of the merged head, or a merge by an owner or admin): approve it at Settings → Your projects → the project → Repositories → the repository → Environment → Setup declaration → Approve this revision",
|
|
1054
1054
|
who: "a workspace owner or admin",
|
|
1055
1055
|
page: "/settings/projects",
|
|
1056
1056
|
},
|
|
@@ -1058,7 +1058,7 @@ const DECL_REASONS = {
|
|
|
1058
1058
|
const DECL_DO =
|
|
1059
1059
|
"write .catalyst/catalyst.toml with references/declaring-a-repository.md, then open a pull request";
|
|
1060
1060
|
let declNext =
|
|
1061
|
-
"
|
|
1061
|
+
"merge .catalyst/catalyst.toml through a pull request that someone other than the author approves; that review approves it";
|
|
1062
1062
|
if (!connected) {
|
|
1063
1063
|
add(
|
|
1064
1064
|
"repository declarations",
|
|
@@ -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.
|
|
7
|
+
<!-- vendored-from: @catalyst-cloud/catalyst-skills@0.16.0 — 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.
|
|
7
|
+
<!-- vendored-from: @catalyst-cloud/catalyst-skills@0.16.0 — 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.
|
|
7
|
+
<!-- vendored-from: @catalyst-cloud/catalyst-skills@0.16.0 — written in this repository for customer accounts -->
|
|
8
8
|
|
|
9
9
|
# What needs me
|
|
10
10
|
|
|
@@ -15,7 +15,7 @@ An ask is one decision only the human can make, filed as a ticket in their own L
|
|
|
15
15
|
Scripts are run, never read. Each prints `--help`; exit 2 means this machine is not connected (the `catalyst-onboard` skill connects it), exit 1 means the check itself failed or an argument was missing.
|
|
16
16
|
|
|
17
17
|
- `node scripts/inbox.mjs --help`: the open asks assigned to the connected person, most open tickets held first, then the oldest; `--anyone` for everyone's; `--json` for `{scope, asks}`.
|
|
18
|
-
- `node scripts/raise.mjs --help`: file one decision: `--team`, `--title`, `--option` (repeated), `--default`, and `--blocks` (repeated) or `--nothing-to-block`.
|
|
18
|
+
- `node scripts/raise.mjs --help`: file one decision: `--team`, `--title`, `--option` (repeated), `--default`, and `--blocks` (repeated) or `--nothing-to-block`. When the ask decides whether a held PR may merge, `--gates-pr` (repeated) with `--released-by <letter>` makes the answer lift that PR's hold label.
|
|
19
19
|
- `node scripts/settle.mjs --help`: record the answering comment on an ask and post a release note on every ticket it held; `--close` moves the ask to the done slot.
|
|
20
20
|
|
|
21
21
|
## Load on demand
|
|
@@ -18,6 +18,17 @@ Brainstorming, design back-and-forth, a question the human asked first, a retry-
|
|
|
18
18
|
|
|
19
19
|
`--ask-key` is an idempotency key: a re-run with the same key does not file a second ask.
|
|
20
20
|
|
|
21
|
+
## When the answer releases a PR hold
|
|
22
|
+
|
|
23
|
+
When the decision is whether a held PR may merge, name the PR so the answer lifts the hold itself:
|
|
24
|
+
|
|
25
|
+
- `--gates-pr <n>` (repeated): each PR the answer releases.
|
|
26
|
+
- `--released-by <letter>` (repeated, required with `--gates-pr`): the option letters that release it. Options are lettered A, B, C in the order you gave them, and a letter outside that range is refused.
|
|
27
|
+
- `--gates-label hold|hold:preview` (repeated, default `hold`): the labels the answer removes. No other label is accepted.
|
|
28
|
+
- `--gates-repo <owner/name>`: the PR's repository. It defaults to the account's repository when the account registers exactly one, and must be one the account registers.
|
|
29
|
+
|
|
30
|
+
An answer with any other letter leaves the labels in place.
|
|
31
|
+
|
|
21
32
|
## One ask per decision
|
|
22
33
|
|
|
23
34
|
Run `node scripts/inbox.mjs` first. When the same decision is already open, attach the new held tickets to it (the `catalyst-linear` skill adds the relation or a comment) rather than filing a twin that splits its urgency.
|
|
@@ -14,12 +14,16 @@ const SPEC = {
|
|
|
14
14
|
blocks: { value: true, repeat: true, help: "a ticket this decision holds (repeat per ticket)" },
|
|
15
15
|
"nothing-to-block": { value: false, help: "declare that no ticket is held (the ask then never shows in Waiting on me)" },
|
|
16
16
|
"ask-key": { value: true, help: "idempotency key so a re-run does not file a second ask" },
|
|
17
|
+
"gates-pr": { value: true, repeat: true, help: "a PR whose hold label the answer removes (repeat per PR; needs --released-by)" },
|
|
18
|
+
"gates-label": { value: true, repeat: true, help: "the hold the answer removes: hold or hold:preview (repeatable; default hold)" },
|
|
19
|
+
"released-by": { value: true, repeat: true, help: "an option letter whose answer releases the hold (repeat per letter)" },
|
|
20
|
+
"gates-repo": { value: true, help: "the --gates-pr repository as owner/name (default: the account's only repository)" },
|
|
17
21
|
json: { value: false, help: "print the cloud's response as JSON" },
|
|
18
22
|
};
|
|
19
23
|
|
|
20
24
|
const { help, flags } = parseFlags(process.argv.slice(2), SPEC);
|
|
21
25
|
if (help) {
|
|
22
|
-
printHelp("node scripts/raise.mjs --team <key> --title <question> [--context <text>] [--option <text>]... [--default <text>] --blocks <ticket>... | --nothing-to-block [--ask-key <key>] [--json] [--help]", SPEC, [
|
|
26
|
+
printHelp("node scripts/raise.mjs --team <key> --title <question> [--context <text>] [--option <text>]... [--default <text>] --blocks <ticket>... | --nothing-to-block [--ask-key <key>] [--gates-pr <n>... --released-by <letter>... [--gates-label hold|hold:preview]... [--gates-repo <owner/name>]] [--json] [--help]", SPEC, [
|
|
23
27
|
"Search for an existing ask first (node scripts/inbox.mjs); one decision, one ask.",
|
|
24
28
|
"File BEFORE proceeding on the default. Cite the identifier only from this script's output.",
|
|
25
29
|
]);
|
|
@@ -41,6 +45,10 @@ if (flags.default) args.push("--default", flags.default);
|
|
|
41
45
|
for (const b of flags.blocks ?? []) args.push("--blocks", b);
|
|
42
46
|
if (flags["nothing-to-block"]) args.push("--nothing-to-block");
|
|
43
47
|
if (flags["ask-key"]) args.push("--ask-key", flags["ask-key"]);
|
|
48
|
+
for (const n of flags["gates-pr"] ?? []) args.push("--gates-pr", n);
|
|
49
|
+
for (const l of flags["gates-label"] ?? []) args.push("--gates-label", l);
|
|
50
|
+
for (const l of flags["released-by"] ?? []) args.push("--released-by", l);
|
|
51
|
+
if (flags["gates-repo"]) args.push("--gates-repo", flags["gates-repo"]);
|
|
44
52
|
args.push("--json");
|
|
45
53
|
|
|
46
54
|
const result = parseJson(mustRun(args, { quiet: true }).stdout, "ask raise");
|
|
@@ -49,5 +57,6 @@ if (flags.json) process.stdout.write(JSON.stringify(result) + "\n");
|
|
|
49
57
|
else {
|
|
50
58
|
process.stdout.write(`ask raised: ${id ?? "(no identifier returned)"}${flags.blocks ? ` — holds ${flags.blocks.join(", ")}` : " — holds nothing"}\n`);
|
|
51
59
|
if (flags.default) process.stdout.write(`default if silent: ${flags.default}\n`);
|
|
60
|
+
if (flags["gates-pr"]) process.stdout.write(`answer ${flags["released-by"].join(" or ")} releases the hold on PR ${flags["gates-pr"].map((n) => `#${n}`).join(", ")}\n`);
|
|
52
61
|
}
|
|
53
62
|
process.exit(0);
|
|
@@ -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.
|
|
7
|
+
<!-- vendored-from: @catalyst-cloud/catalyst-skills@0.16.0 — 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?", "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.
|
|
7
|
+
<!-- vendored-from: @catalyst-cloud/catalyst-skills@0.16.0 — written in this repository for customer accounts -->
|
|
8
8
|
|
|
9
9
|
# What's happening
|
|
10
10
|
|