@catalyst-cloud/cli 0.15.1 → 0.15.3
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 +15 -0
- package/README.md +13 -4
- package/dist/args.js +1 -1
- package/dist/capabilities.js +3 -1
- package/dist/cli.js +25 -30
- package/dist/consent-browser.js +3 -1
- package/dist/oauth.js +1 -1
- package/dist/onboard-accounts.js +67 -171
- package/dist/onboard-checklist.js +309 -0
- package/dist/onboard-existing.js +1 -1
- package/dist/onboard-first-ticket.js +199 -0
- package/dist/onboard-github.js +13 -1
- package/dist/onboard-headless.js +6 -4
- package/dist/onboard-housekeeping.js +93 -0
- package/dist/onboard-next.js +124 -13
- package/dist/onboard-ready.js +61 -0
- package/dist/onboard-runtime.js +117 -26
- package/dist/onboard-standalone-copy.js +73 -66
- package/dist/onboard-ui.js +189 -81
- package/dist/onboard-values.js +47 -0
- package/dist/onboard.js +59 -18
- package/dist/ready-copy.js +325 -0
- package/dist/ready.js +35 -98
- package/dist/setup-onboard-copy.js +262 -41
- package/dist/setup-render.js +73 -14
- package/dist/setup.js +6 -3
- package/package.json +2 -2
- package/skills/catalyst-github/SKILL.md +1 -1
- package/skills/catalyst-linear/SKILL.md +1 -1
- package/skills/catalyst-onboard/SKILL.md +3 -3
- package/skills/catalyst-onboard/references/replacing-a-credential.md +9 -15
- package/skills/catalyst-onboard/references/what-a-phase-needs.md +4 -11
- package/skills/catalyst-onboard/scripts/where-am-i.mjs +3 -2
- package/skills/run-this-project/SKILL.md +2 -2
- 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 +2 -2
- package/skills/whats-happening/references/coding-accounts.md +1 -1
- package/skills/whats-happening/scripts/snapshot.mjs +1 -1
|
@@ -1,60 +1,36 @@
|
|
|
1
|
-
import { setupStepView, SETUP_NUMBERS } from "./setup-onboard-copy.js";
|
|
1
|
+
import { setupPartHeading, setupStepView, SETUP_NUMBERS, SETUP_PART_NUMBERS, SETUP_PART_OF, } from "./setup-onboard-copy.js";
|
|
2
2
|
export const COMPUTER_CHECKS = ["machine", "cli", "skills", "legacy"];
|
|
3
3
|
const PLAN = [
|
|
4
4
|
["On this computer", "signin", "you approve once in your browser"],
|
|
5
|
-
[
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
"schedule the daily update, where supported",
|
|
9
|
-
],
|
|
10
|
-
[
|
|
11
|
-
"In Linear and GitHub",
|
|
12
|
-
"linear.workspace",
|
|
13
|
-
"an admin connects the workspace",
|
|
14
|
-
],
|
|
15
|
-
[
|
|
16
|
-
"In Linear and GitHub",
|
|
17
|
-
"linear.personal",
|
|
18
|
-
"you connect your own Linear account",
|
|
19
|
-
],
|
|
5
|
+
["On this computer", "housekeeping", "schedule the daily update"],
|
|
6
|
+
["In Linear and GitHub", "linear.workspace", "an admin connects the workspace"],
|
|
7
|
+
["In Linear and GitHub", "linear.personal", "you connect your own Linear account"],
|
|
20
8
|
["In Linear and GitHub", "linear.team", "you choose the team"],
|
|
21
|
-
[
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
],
|
|
26
|
-
[
|
|
27
|
-
"In Linear and GitHub",
|
|
28
|
-
"linear.automations",
|
|
29
|
-
"check how pull requests change issue states",
|
|
30
|
-
],
|
|
31
|
-
[
|
|
32
|
-
"In Linear and GitHub",
|
|
33
|
-
"github.install",
|
|
34
|
-
"an admin chooses access on GitHub",
|
|
35
|
-
],
|
|
36
|
-
[
|
|
37
|
-
"In Linear and GitHub",
|
|
38
|
-
"github.personal",
|
|
39
|
-
"you connect your own GitHub account",
|
|
40
|
-
],
|
|
41
|
-
[
|
|
42
|
-
"In Linear and GitHub",
|
|
43
|
-
"github.repos",
|
|
44
|
-
"you choose where Catalyst can work",
|
|
45
|
-
],
|
|
46
|
-
["Work", "accounts", "check a coding account"],
|
|
9
|
+
["In Linear and GitHub", "linear.adopt", "review any states and labels to add"],
|
|
10
|
+
["In Linear and GitHub", "linear.automations", "check how pull requests change issue states"],
|
|
11
|
+
["In Linear and GitHub", "github.install", "an admin chooses access on GitHub"],
|
|
12
|
+
["In Linear and GitHub", "github.personal", "you connect your own GitHub account"],
|
|
13
|
+
["In Linear and GitHub", "github.repos", "you choose where Catalyst can work"],
|
|
14
|
+
["Work", "accounts", "check an AI account"],
|
|
47
15
|
["Work", "capacity", "check which runners can take work"],
|
|
48
16
|
["Work", "settings", "you review settings before saving them"],
|
|
17
|
+
["Work", "values", "check every value the repositories need has one"],
|
|
49
18
|
["Work", "first-ticket", "you choose a ticket to start"],
|
|
50
19
|
];
|
|
51
|
-
|
|
20
|
+
/**
|
|
21
|
+
* The plan's rows. `parts` is what the terminal draws: part headings, numbers restarting in each
|
|
22
|
+
* part. `json` is the plain-text plan an agent reads beside `--json` (dry run, --json on stderr,
|
|
23
|
+
* headless): the older groups and the numbers JSON `actions[].number` reports (CTC-4680).
|
|
24
|
+
*/
|
|
25
|
+
export function standalonePlan(journal, scope, runnerSelected = false, numbering = "parts") {
|
|
26
|
+
const json = numbering === "json";
|
|
52
27
|
const includes = (id) => !scope || scope.includes(id);
|
|
53
28
|
const steps = new Map(journal.steps.map((step) => [step.id, step]));
|
|
54
29
|
const rows = [];
|
|
55
30
|
if (COMPUTER_CHECKS.some((id) => includes(id)))
|
|
56
31
|
rows.push({
|
|
57
|
-
group: "On this computer",
|
|
32
|
+
group: json ? "On this computer" : setupPartHeading(1, false),
|
|
33
|
+
part: 1,
|
|
58
34
|
number: 1,
|
|
59
35
|
title: "Check this computer",
|
|
60
36
|
detail: includes("legacy")
|
|
@@ -62,9 +38,31 @@ export function standalonePlan(journal, scope, runnerSelected = false) {
|
|
|
62
38
|
: "check the selected machine requirements",
|
|
63
39
|
});
|
|
64
40
|
for (const [group, id, detail] of PLAN) {
|
|
41
|
+
// The terminal gives this computer's runner its own row after "Check runners". The plain-text
|
|
42
|
+
// plan keeps it folded into that row, under the number JSON reports for both.
|
|
43
|
+
if (!json && id === "capacity") {
|
|
44
|
+
const row = (step, text) => rows.push({
|
|
45
|
+
group: setupPartHeading(3, false),
|
|
46
|
+
part: 3,
|
|
47
|
+
number: SETUP_PART_NUMBERS[step],
|
|
48
|
+
title: setupStepView({ id: step, state: "pending" }).title,
|
|
49
|
+
detail: steps.get(step)?.state === "done" ? `check again; ${text}` : text,
|
|
50
|
+
});
|
|
51
|
+
if (includes("capacity"))
|
|
52
|
+
row("capacity", detail);
|
|
53
|
+
if (includes("runner"))
|
|
54
|
+
row("runner", runnerSelected
|
|
55
|
+
? "start a Catalyst runner here with Docker"
|
|
56
|
+
: "optional; this computer takes work only if you choose it");
|
|
57
|
+
continue;
|
|
58
|
+
}
|
|
59
|
+
// The terminal gives repository values their own row; the plain-text plan keeps them folded
|
|
60
|
+
// into the settings row, under the number JSON reports for both.
|
|
61
|
+
if (json && id === "values")
|
|
62
|
+
continue;
|
|
65
63
|
if (!includes(id) &&
|
|
66
64
|
!(id === "capacity" && includes("runner")) &&
|
|
67
|
-
!(id === "settings" && includes("values")))
|
|
65
|
+
!(json && id === "settings" && includes("values")))
|
|
68
66
|
continue;
|
|
69
67
|
const reviewedDetail = id === "capacity" && includes("runner") && runnerSelected
|
|
70
68
|
? "start a Catalyst runner here with Docker"
|
|
@@ -72,8 +70,9 @@ export function standalonePlan(journal, scope, runnerSelected = false) {
|
|
|
72
70
|
? "review the optional runner on this machine; start only if selected"
|
|
73
71
|
: detail;
|
|
74
72
|
rows.push({
|
|
75
|
-
group,
|
|
76
|
-
|
|
73
|
+
group: json ? group : setupPartHeading(SETUP_PART_OF[id], false),
|
|
74
|
+
part: SETUP_PART_OF[id],
|
|
75
|
+
number: (json ? SETUP_NUMBERS : SETUP_PART_NUMBERS)[id],
|
|
77
76
|
title: setupStepView({ id, state: "pending" }).title,
|
|
78
77
|
detail: steps.get(id)?.state === "done"
|
|
79
78
|
? `check again; ${reviewedDetail}`
|
|
@@ -82,29 +81,37 @@ export function standalonePlan(journal, scope, runnerSelected = false) {
|
|
|
82
81
|
}
|
|
83
82
|
return rows;
|
|
84
83
|
}
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
84
|
+
/** What setup does next on its own, in the order it runs: steps not finished and not already listed
|
|
85
|
+
* as something a person must do (`listed`). A step setup never reached because it paused is here. */
|
|
86
|
+
const CONTINUES = [
|
|
87
|
+
[["linear.workspace"], "connects your Linear workspace"],
|
|
88
|
+
[["linear.personal"], "connects your Linear account"],
|
|
89
|
+
[["linear.team"], "chooses a Linear team"],
|
|
90
|
+
[["linear.adopt"], "sets up the team's workflow"],
|
|
91
|
+
[["linear.automations"], "checks Linear's pull request automations"],
|
|
92
|
+
[["github.install"], "installs Catalyst on GitHub"],
|
|
93
|
+
[["github.personal"], "connects your GitHub account"],
|
|
94
|
+
[["github.repos", "projects"], "chooses repositories"],
|
|
95
|
+
[["accounts"], "checks an AI account"],
|
|
96
|
+
[["capacity", "runner"], "checks runners"],
|
|
97
|
+
[["settings"], "reviews repository settings"],
|
|
98
|
+
[["values"], "checks repository values"],
|
|
99
|
+
[["first-ticket"], "starts a first ticket"],
|
|
100
|
+
];
|
|
101
|
+
export function pendingContinuation(journal, listed = new Set()) {
|
|
102
|
+
const unfinished = (ids) => !ids.some((id) => listed.has(id)) &&
|
|
103
|
+
ids.some((id) => {
|
|
104
|
+
const step = journal.steps.find((step) => step.id === id);
|
|
105
|
+
return (step &&
|
|
106
|
+
step.state !== "done" &&
|
|
107
|
+
setupStepView(step, journal).mark !== "skip");
|
|
108
|
+
});
|
|
109
|
+
const next = CONTINUES.filter(([ids]) => unfinished(ids)).map(([, words]) => words);
|
|
103
110
|
if (!next.length)
|
|
104
111
|
return null;
|
|
105
112
|
const last = next.pop();
|
|
106
113
|
return `Then setup ${next.length ? `${next.join(", ")} and ` : ""}${last}.`;
|
|
107
114
|
}
|
|
108
115
|
export function standalonePlanNotes(localSync) {
|
|
109
|
-
return `${localSync ? "Local sync is selected." : "Local sync stays off, so Catalyst reads from the cloud."}
|
|
116
|
+
return `${localSync ? "Local sync is selected." : "Local sync stays off, so Catalyst reads from the cloud."} Setup reads your AI accounts without sending them a request. Completed steps are checked again before work starts. Your code, git settings and other skills stay as they are.`;
|
|
110
117
|
}
|