@catalyst-cloud/cli 0.9.4 → 0.13.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 +34 -0
- package/README.md +38 -32
- package/dist/args.js +16 -2
- package/dist/ask.js +2 -2
- package/dist/capabilities.js +70 -0
- package/dist/cli.js +42 -29
- package/dist/config.js +1 -1
- package/dist/connections.js +5 -5
- package/dist/env/declaration-rules.js +163 -0
- package/dist/env/group.js +51 -0
- package/dist/env/inventory.js +102 -0
- package/dist/env/render.js +39 -0
- package/dist/env/scan-env-example.js +62 -0
- package/dist/env/scan-source.js +43 -0
- package/dist/env/scan-workflow.js +123 -0
- package/dist/env/scan-wrangler.js +120 -0
- package/dist/env/types.js +1 -0
- package/dist/env/walk.js +87 -0
- package/dist/env.js +76 -0
- package/dist/environment.js +4 -4
- package/dist/events.js +1 -1
- package/dist/execution.js +3 -2
- package/dist/identity.js +3 -3
- package/dist/oauth.js +3 -3
- package/dist/query.js +27 -1
- package/dist/ready.js +3 -3
- package/dist/release.js +1 -1
- package/dist/replica.js +9 -7
- package/dist/runtime-store.js +2 -2
- package/dist/runtime.js +1 -1
- package/dist/secret.js +1 -1
- package/dist/skills.js +1 -1
- package/dist/team.js +329 -0
- package/package.json +4 -4
- package/skills/catalyst-github/SKILL.md +1 -1
- package/skills/catalyst-linear/SKILL.md +1 -1
- package/skills/catalyst-onboard/SKILL.md +7 -7
- package/skills/catalyst-onboard/references/choosing-a-coding-account.md +2 -2
- package/skills/catalyst-onboard/references/declaring-a-repository.md +1 -1
- package/skills/catalyst-onboard/references/local-sync.md +3 -3
- package/skills/catalyst-onboard/references/skill-sources.md +1 -1
- package/skills/catalyst-onboard/references/the-one-path.md +12 -10
- package/skills/catalyst-onboard/references/what-a-phase-needs.md +5 -5
- package/skills/catalyst-onboard/references/what-the-browser-owns.md +6 -9
- package/skills/catalyst-onboard/references/who-fixes-what.md +35 -16
- package/skills/catalyst-onboard/scripts/local-sync.mjs +6 -6
- package/skills/catalyst-onboard/scripts/where-am-i.mjs +133 -54
- package/skills/catalyst-setup/SKILL.md +1 -1
- package/skills/connect-me/SKILL.md +3 -3
- package/skills/how-catalyst-works/SKILL.md +5 -3
- package/skills/how-catalyst-works/references/settings-and-where-they-live.md +20 -0
- package/skills/how-catalyst-works/references/what-runs-next.md +19 -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-needs-me/references/reading-the-inbox.md +4 -0
- package/skills/what-this-repo-needs/SKILL.md +40 -0
- package/skills/what-this-repo-needs/agents/openai.yaml +6 -0
- package/skills/what-this-repo-needs/agents/portability.yaml +4 -0
- package/skills/what-this-repo-needs/references/what-each-group-means.md +68 -0
- package/skills/what-this-repo-needs/scripts/check.mjs +64 -0
- package/skills/what-this-repo-needs/scripts/inventory.mjs +61 -0
- package/skills/what-this-repo-needs/scripts/lib/cli.mjs +114 -0
- package/skills/what-this-repo-needs/scripts/lib/credential.mjs +29 -0
- package/skills/whats-happening/SKILL.md +1 -1
- package/skills/whats-happening/references/reading-the-board.md +1 -1
- package/skills/whats-happening/references/reprioritising.md +1 -1
- package/skills/whats-happening/references/status-reply.md +2 -0
- package/skills/whats-happening/references/why-is-it-stuck.md +41 -33
|
@@ -8,13 +8,13 @@ These will never be a command, on any release. Each is an authorization a person
|
|
|
8
8
|
|
|
9
9
|
| step | where | what you say |
|
|
10
10
|
| -- | -- | -- |
|
|
11
|
-
| approving the login | the URL and short code that `catalyst
|
|
11
|
+
| approving the login | the URL and short code that `catalyst login` printed | "I have started the login. It printed this code and this URL — approve it in your browser, or on your phone, and tell me when it is done." |
|
|
12
12
|
| enrolling a coding account, or replacing its credential | the AI accounts page the script printed for the `coding accounts` part | "Choose the provider, give the account a label you will recognise, and paste the credential the page asks for. Nothing on this side sees it. Tell me when it is saved and I will read it back." |
|
|
13
13
|
| connecting the Linear integration | `<their cloud>/settings/connections` (the Integrations page; Settings labels it Connections today) | "Open this page and connect Linear. It will send you to Linear to authorize it and bring you back." |
|
|
14
14
|
| installing the GitHub App | `<their cloud>/settings/connections` | "Open the same page and install the GitHub App, granting it the repository you want worked and `<your GitHub org>/thoughts`." |
|
|
15
15
|
| creating or confirming `<your GitHub org>/thoughts`, and letting the GitHub App reach it | GitHub, then the GitHub App's installation page for that org | "Catalyst's cloud phases write their notes to `<your GitHub org>/thoughts`, in the org that owns the code repository. Check it exists. If not, create a private repository named `thoughts`, initialized with a README. Then, on the GitHub App's installation page for that org, choose All repositories, or add `thoughts` to the selected repositories." |
|
|
16
|
-
| connecting personal Linear | the URL printed by `catalyst
|
|
17
|
-
| connecting personal GitHub, after the tenant GitHub App is installed and its repository is registered | the URL printed by `catalyst
|
|
16
|
+
| connecting personal Linear | the URL printed by `catalyst connections personal linear start` | "Approve your own Linear account in this browser. I will check the grant status afterward." |
|
|
17
|
+
| connecting personal GitHub, after the tenant GitHub App is installed and its repository is registered | the URL printed by `catalyst connections personal github start` | "Approve your own GitHub account in this browser. I will check the grant status afterward." |
|
|
18
18
|
|
|
19
19
|
Say **by construction**, not "not supported yet". A person who thinks it is a missing feature will wait for it.
|
|
20
20
|
|
|
@@ -24,17 +24,14 @@ These are settings pages today because the routes behind them take a browser ses
|
|
|
24
24
|
|
|
25
25
|
| step | where | what you say |
|
|
26
26
|
| -- | -- | -- |
|
|
27
|
-
| seeing every project they could set up | `<their cloud>/settings/linear-teams` | "I can read the projects that are already mapped, but the full list is only on this page today. Open it and tell me the ones you see." |
|
|
28
|
-
| checking a project's readiness, or re-checking it | the same page | "I can read the verdict your tenant last stored, from the contract. Asking for a fresh check is on that page." |
|
|
29
|
-
| mapping stages, or adopting the workflow | the same page, per project | "Pick one project, then **Map my stages** — or **Adopt the Catalyst workflow** if you want Catalyst's stages created for you." |
|
|
30
27
|
| registering a repository | `<their cloud>/settings/repositories` | "Add the repository here, and attach it to the project you just mapped, in the same form." |
|
|
31
|
-
| approving the environment **for one repository**, and entering its values | that repository's Environment page under `<their cloud>/settings/repositories`: the Setup declaration tab's Approve this revision button approves, and the Environment variables and Secrets tabs take the values | "The names come from `.catalyst/catalyst.toml` in the repository, which I can write with you. Approving it and entering the values happen here, once, by you. Nothing I run ever sees a value." (Account-wide names are **not** on this list: `catalyst
|
|
28
|
+
| approving the environment **for one repository**, and entering its values | that repository's Environment page under `<their cloud>/settings/repositories`: the Setup declaration tab's Approve this revision button approves, and the Environment variables and Secrets tabs take the values | "The names come from `.catalyst/catalyst.toml` in the repository, which I can write with you. Approving it and entering the values happen here, once, by you. Nothing I run ever sees a value." (Account-wide names are **not** on this list: `catalyst environment` does those.) |
|
|
32
29
|
|
|
33
30
|
⛔ **Do not compose a request for any of these.** A skill script never makes a request of its own; only the CLI does, and the CLI has no verb for them. If you find yourself constructing a URL, stop.
|
|
34
31
|
|
|
35
32
|
## The URL to hand over
|
|
36
33
|
|
|
37
|
-
Never type a host from memory. `catalyst
|
|
34
|
+
Never type a host from memory. `catalyst status` prints the API it is connected to on its `API:` line, and `node scripts/where-am-i.mjs` prints ready-made links built from it. Use those. A person pointed at the wrong tenant's settings page has a worse afternoon than one pointed at no page at all.
|
|
38
35
|
|
|
39
36
|
## Handing over, and coming back
|
|
40
37
|
|
|
@@ -50,5 +47,5 @@ When they come back:
|
|
|
50
47
|
|
|
51
48
|
- Re-run `node scripts/where-am-i.mjs` and read them the part that should have changed.
|
|
52
49
|
- If it changed, say what it now says and move on.
|
|
53
|
-
- If it did not, refresh the contract once (`catalyst
|
|
50
|
+
- If it did not, refresh the contract once (`catalyst contract --refresh`) and read it again — the contract is cached, and a page can be ahead of it by a few seconds.
|
|
54
51
|
- If it still did not, report both: what the page told them, and what the instrument says. Ask what they saw. **Never mark a step done because the person said a page worked** — the instrument is the record, and this is exactly where a confident false "all set" costs them an hour later.
|
|
@@ -6,40 +6,59 @@ Setup is eight parts. Each has one instrument, and each instrument answers about
|
|
|
6
6
|
|
|
7
7
|
| part | instrument | what a pass proves | what it does **not** prove | who fixes a failure, and where |
|
|
8
8
|
| -- | -- | -- | -- | -- |
|
|
9
|
-
| **machine** | `catalyst
|
|
10
|
-
| **person** | `catalyst
|
|
11
|
-
| **account** | `catalyst
|
|
12
|
-
| **project** | `catalyst
|
|
13
|
-
| **repository** | `catalyst
|
|
14
|
-
| **coding accounts** | `codingAccounts` in `catalyst
|
|
15
|
-
| **repository declarations** | the `environment_declared` check in `catalyst
|
|
16
|
-
| **host** | the `hosts_current` check in `catalyst
|
|
9
|
+
| **machine** | `catalyst status`, and the non-team checks of `catalyst ready` | Node is new enough, this machine holds a credential, the CLI is where the config says, the contract is cached, the skills are on disk | anything at all about the tenant | the person at this keyboard, here |
|
|
10
|
+
| **person** | `catalyst me`, and `catalyst connections personal <linear|github> status` | the credential resolves to this person, shows their role and Linear identity match, and reports each personal grant's state | that their seat is active, or that they may change tenant settings | the member approves missing or expired personal grants in a browser; an owner or admin handles seat or identity conflicts in Settings → Members |
|
|
11
|
+
| **account** | `catalyst contract --path account` | a resolved Linear workspace means the tenant's Linear grant landed | that the GitHub App is installed — the contract does not carry it | a tenant owner or admin, `<their cloud>/settings/connections` |
|
|
12
|
+
| **project** | `catalyst team list`, then `team check <KEY>` and the `team:` checks of `ready` for the selected team | the live team list and the selected team's latest readiness verdict | that an unchecked team is ready | a tenant owner or admin, through `catalyst team` or `<their cloud>/settings/linear-teams` |
|
|
13
|
+
| **repository** | `catalyst contract --path merge.repositories` | the repository is registered to the account | that it is active, that a project can dispatch into it, or that its environment is declared | a tenant owner or admin, `<their cloud>/settings/repositories` |
|
|
14
|
+
| **coding accounts** | `codingAccounts` in `catalyst contract` (`catalyst accounts` on an older cloud) | an account is enrolled and active | that it has headroom left for the next phase | the enroller and page the contract names; see `references/what-a-phase-needs.md` |
|
|
15
|
+
| **repository declarations** | the `environment_declared` check in `catalyst contract --path teams`, and its per-repository notes | the project's default repository has a committed `.catalyst/catalyst.toml` in effect: ingested, valid, and its latest revision approved | that the values the names refer to exist; that any other repository is declared, unless its note says so | the person, with you, in the repository for the file; a tenant owner or admin for the approval, at the repository's Environment page under `<their cloud>/settings/repositories` |
|
|
16
|
+
| **host** | the `hosts_current` check in `catalyst contract --path teams` | no host is missing or behind, or the tenant runs none | anything before a project has been checked | the owner the contract names for `hosts_current`; see `references/what-a-phase-needs.md` |
|
|
17
17
|
|
|
18
18
|
`node scripts/where-am-i.mjs` runs all eight, in the order a person can act on them, and labels each finding with its part. Use it rather than composing this by hand.
|
|
19
19
|
|
|
20
20
|
## The two silences that are not absences
|
|
21
21
|
|
|
22
|
-
⛔ **An empty project list means nothing is mapped yet — it does not mean they have no projects.** The tenant contract carries a project only once someone has saved a stage mapping for it.
|
|
22
|
+
⛔ **An empty contract project list means nothing is mapped yet — it does not mean they have no projects.** The tenant contract carries a project only once someone has saved a stage mapping for it. Read the available team list with `catalyst team list`, choose one, then go to step 4. `team check --all` performs readiness checks and may create asks for every team.
|
|
23
23
|
|
|
24
|
-
⛔ **A registered repository is not a dispatchable one.** The contract's repository list carries no status and no project attachment, so a paused repository and an active one look identical there, and a repository registered without a project attached looks exactly like a correctly attached one. Registration is all it proves. If a card does not start, `catalyst
|
|
24
|
+
⛔ **A registered repository is not a dispatchable one.** The contract's repository list carries no status and no project attachment, so a paused repository and an active one look identical there, and a repository registered without a project attached looks exactly like a correctly attached one. Registration is all it proves. If a card does not start, `catalyst explain <ticket>` names the real reason; do not conclude anything about the repository from its presence in a list.
|
|
25
25
|
|
|
26
26
|
⭐ And the general form of both: **an instrument that answers about a part it does not own will answer confidently and wrongly.** When you are unsure which part something belongs to, look it up in the table above rather than guessing from the wording of an error.
|
|
27
27
|
|
|
28
28
|
## Triaging NOT READY
|
|
29
29
|
|
|
30
|
-
`catalyst
|
|
30
|
+
`catalyst ready` prints one verdict over every check, machine and project together. That single verdict is correct for "can work run?" and useless for "what should I do now?", because it folds two parts into one word. Split it before you act:
|
|
31
31
|
|
|
32
|
-
1. Run `catalyst
|
|
32
|
+
1. Run `catalyst ready --json`. Every check has an `id`.
|
|
33
33
|
2. A check whose id begins with `team:` is a **project** finding. Everything else is a **machine** finding.
|
|
34
34
|
3. Report the two groups separately, in that order, each with its own owner.
|
|
35
35
|
|
|
36
|
-
- **A machine check failed.** This is the person's, here, now. Each failing check carries its own `fix` line; read it and do it. A missing or partial skill set is `catalyst
|
|
37
|
-
- **A project check failed.**
|
|
38
|
-
- **A check is a note.** Notes never move the verdict. A stale or absent replica or event cache is optional; an unknown freshness probe means the cloud comparison could not be proved.
|
|
36
|
+
- **A machine check failed.** This is the person's, here, now. Each failing check carries its own `fix` line; read it and do it. A missing or partial skill set is `catalyst install`; a stale contract is `catalyst contract --refresh`; a missing CLI path is one more `catalyst login`.
|
|
37
|
+
- **A project check failed.** Name the check, the project, and the owner; the `who` field carries the workspace's own owners and admins. An admin or owner can run the check, preview a stage mapping, or adopt the workflow through `catalyst team`; some failures still need provider consent or a browser action, and `<their cloud>/settings/linear-teams` is where those live. Use the check's reason to choose the next action. Re-running `ready` alone does not fix it.
|
|
38
|
+
- **A check is a note.** Notes never move the verdict. A stale or absent replica or event cache is optional; an unknown freshness probe means the cloud comparison could not be proved. A check that has never been run is waiting, not failing; a check the engine could not run is unknown, which is not a pass and not a failure. Say which it is. The API-backed skills still work; ask before starting the optional writer.
|
|
39
39
|
|
|
40
40
|
## When to stop rather than continue
|
|
41
41
|
|
|
42
42
|
- **They have no account yet.** There is no self-serve sign-up. Coalesce Labs provisions each account, and a person joins one by invitation from its admin. Say so and stop; the next step is theirs.
|
|
43
43
|
- **The account is suspended.** Setup cannot proceed and no retry changes that. Say so and name the conversation they need to have.
|
|
44
44
|
- **Their seat is not active, or they are not an owner or admin where one is required.** Say who is, and what to ask for. Do not offer a workaround.
|
|
45
|
-
- **A page said it worked and the instrument still disagrees.** Refresh the contract once (`catalyst
|
|
45
|
+
- **A page said it worked and the instrument still disagrees.** Refresh the contract once (`catalyst contract --refresh`) and read it again. If it still disagrees, report both facts — what the page said and what the instrument says — and let the person decide. Do not pick one for them.
|
|
46
|
+
|
|
47
|
+
## What still happens in a browser, and why
|
|
48
|
+
|
|
49
|
+
Every step a key can do, the guide does. These are the ones it hands over, each with the reason; when a reason stops being true, the step moves to the CLI and this table changes in the same release.
|
|
50
|
+
|
|
51
|
+
| step | today | why it is still the person's |
|
|
52
|
+
| -- | -- | -- |
|
|
53
|
+
| install Node, or a coding agent | the person, on their machine | outside the CLI |
|
|
54
|
+
| approve the login | the code and URL `login` prints, in a browser | a grant only the person can give |
|
|
55
|
+
| connect the Linear integration | Settings → Connections | an OAuth grant, by construction |
|
|
56
|
+
| install the GitHub App | Settings → Connections | an OAuth grant, by construction |
|
|
57
|
+
| enrol a coding account, or replace its credential | Settings → AI accounts | the credential is theirs to paste; a CLI verb for the paste is being built |
|
|
58
|
+
| register a repository to a project | Settings → Repositories | the route exists; the CLI verb is being built |
|
|
59
|
+
| approve one repository's settings file | the repository's Environment page | the route for a key is being built |
|
|
60
|
+
| enter a secret's value | the repository's Environment page, or `secret set` | a value never passes through the agent |
|
|
61
|
+
| the person's own Linear and GitHub connected accounts | the link `connections personal … start` prints | a grant only the person can give |
|
|
62
|
+
| move the first ticket | Linear, or `write state` when they ask | their call which ticket runs first |
|
|
63
|
+
|
|
64
|
+
A project's readiness check, its stage mapping and adopting the workflow are CLI steps (`team check`, `team map`, `team adopt`) when `catalyst capabilities` says the installed CLI can run them for the person's role; the script names the command, and the page only for a person whose role cannot.
|
|
@@ -8,7 +8,7 @@ import { cliTarget } from "./lib/cli.mjs";
|
|
|
8
8
|
const STATUS_COMMAND = ["replica", "status", "--probe", "--json"];
|
|
9
9
|
const EVENTS_COMMAND = ["events", "status", "--probe", "--json"];
|
|
10
10
|
const START_COMMAND = ["replica", "start", "--detach"];
|
|
11
|
-
const RECOVERY_COMMAND = "catalyst
|
|
11
|
+
const RECOVERY_COMMAND = "catalyst replica start --detach";
|
|
12
12
|
|
|
13
13
|
function defaultRun(args) {
|
|
14
14
|
const target = cliTarget();
|
|
@@ -105,7 +105,7 @@ function readStatus(run) {
|
|
|
105
105
|
current: false,
|
|
106
106
|
reason: `replica status is unknown: ${replicaResult.error || replicaResult.stderr.trim() || "invalid JSON"}`,
|
|
107
107
|
},
|
|
108
|
-
recovery: replicaResult.code === 2 ? "catalyst
|
|
108
|
+
recovery: replicaResult.code === 2 ? "catalyst login" : "catalyst replica status --probe --json",
|
|
109
109
|
};
|
|
110
110
|
}
|
|
111
111
|
const eventsResult = run(EVENTS_COMMAND);
|
|
@@ -120,7 +120,7 @@ function readStatus(run) {
|
|
|
120
120
|
current: false,
|
|
121
121
|
reason: `event freshness is unknown: ${eventsResult.error || eventsResult.stderr.trim() || "invalid JSON"}`,
|
|
122
122
|
},
|
|
123
|
-
recovery: "catalyst
|
|
123
|
+
recovery: "catalyst events status --probe --json",
|
|
124
124
|
};
|
|
125
125
|
}
|
|
126
126
|
return { status, events, assessment: assessLocalSync(status, events) };
|
|
@@ -140,12 +140,12 @@ export async function runLocalSync({
|
|
|
140
140
|
if (reading.assessment.current || !start)
|
|
141
141
|
return { ...reading, started: false, recovery: reading.recovery ?? RECOVERY_COMMAND };
|
|
142
142
|
if (!reading.status)
|
|
143
|
-
return { ...reading, started: false, recovery: reading.recovery ?? "catalyst
|
|
143
|
+
return { ...reading, started: false, recovery: reading.recovery ?? "catalyst replica status --probe --json" };
|
|
144
144
|
if (
|
|
145
145
|
reading.status?.verdict === "not-configured" ||
|
|
146
146
|
reading.status?.dbPath == null
|
|
147
147
|
) {
|
|
148
|
-
return { ...reading, started: false, recovery: "catalyst
|
|
148
|
+
return { ...reading, started: false, recovery: "catalyst login" };
|
|
149
149
|
}
|
|
150
150
|
let started = false;
|
|
151
151
|
if (reading.status.writerAlive !== true && ["absent", "stale"].includes(reading.assessment.verdict)) {
|
|
@@ -177,7 +177,7 @@ export async function runLocalSync({
|
|
|
177
177
|
recovery: reading.assessment.verdict === "unknown"
|
|
178
178
|
? "node scripts/local-sync.mjs --json"
|
|
179
179
|
: reading.status?.writerAlive
|
|
180
|
-
? "catalyst
|
|
180
|
+
? "catalyst replica stop && catalyst replica start --detach"
|
|
181
181
|
: RECOVERY_COMMAND,
|
|
182
182
|
};
|
|
183
183
|
}
|