@catalyst-cloud/cli 0.9.3 → 0.9.5
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 +20 -0
- package/README.md +35 -31
- package/dist/args.js +13 -1
- package/dist/ask.js +2 -2
- package/dist/capabilities.js +70 -0
- package/dist/cli.js +37 -29
- package/dist/config.js +1 -1
- package/dist/connections.js +5 -5
- package/dist/environment.js +4 -4
- package/dist/events.js +1 -1
- package/dist/execution.js +5 -4
- 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 +1 -1
- package/skills/catalyst-github/SKILL.md +1 -1
- package/skills/catalyst-linear/SKILL.md +1 -1
- package/skills/catalyst-onboard/SKILL.md +51 -35
- package/skills/catalyst-onboard/references/choosing-a-coding-account.md +52 -0
- package/skills/catalyst-onboard/references/declaring-a-repository.md +4 -2
- package/skills/catalyst-onboard/references/local-sync.md +3 -3
- package/skills/catalyst-onboard/references/replacing-a-credential.md +2 -2
- package/skills/catalyst-onboard/references/skill-sources.md +1 -1
- package/skills/catalyst-onboard/references/the-one-path.md +54 -86
- package/skills/catalyst-onboard/references/what-a-phase-needs.md +6 -6
- package/skills/catalyst-onboard/references/what-the-browser-owns.md +8 -10
- package/skills/catalyst-onboard/references/who-fixes-what.md +38 -18
- package/skills/catalyst-onboard/scripts/lib/cli.mjs +15 -1
- package/skills/catalyst-onboard/scripts/local-sync.mjs +6 -6
- package/skills/catalyst-onboard/scripts/where-am-i.mjs +294 -61
- package/skills/catalyst-setup/SKILL.md +1 -1
- package/skills/connect-me/SKILL.md +1 -1
- package/skills/how-catalyst-works/SKILL.md +2 -2
- package/skills/how-catalyst-works/references/what-runs-next.md +11 -0
- 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/whats-happening/SKILL.md +1 -1
- package/skills/whats-happening/references/reading-the-board.md +1 -1
- package/skills/whats-happening/references/why-is-it-stuck.md +1 -0
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,25 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## 0.9.5
|
|
4
|
+
|
|
5
|
+
The CLI calls itself `catalyst` everywhere: usage lines, every verb's `--help`, hints, remedies and errors. `catalyst-skills` still works as a deprecated alias. The npx form is `npx -p @catalyst-cloud/cli catalyst …`, because bare `npx @catalyst-cloud/cli` cannot pick a binary. A replica read on the `node:sqlite` fallback no longer prints a notice every time; `CATALYST_DEBUG=1` still shows it.
|
|
6
|
+
|
|
7
|
+
`catalyst team` sets up a Linear team as a Catalyst project from the terminal: `list`, `check`, `map`, `adopt`, `migrate` and `checklist`. Writes need a reviewed plan and the cloud's mapping, adoption or migration hash.
|
|
8
|
+
|
|
9
|
+
`catalyst capabilities` lists what this CLI can do, the role each verb needs (member or admin), and whether this cloud serves the route. It reads only the cached contract, so it never touches the network.
|
|
10
|
+
|
|
11
|
+
`/catalyst-onboard` runs `team check` and `team map` itself for an admin, where it used to send you to a page. It tells a member which role can run a step. With an older CLI or cloud it keeps the page, as before. A project whose readiness reads blocked is no longer counted as set up: the guide names the blocking checks and who fixes each.
|
|
12
|
+
|
|
13
|
+
The how-catalyst-works and whats-happening skills explain the WIP limit as the code applies it. The limit is per Catalyst project (the project's setting, else the tenant-wide value, else 12; 0 holds every new start). It holds only new starts, and a ticket already in progress keeps getting phases. `catalyst explain` prints the `wip_limit` reason in words.
|
|
14
|
+
|
|
15
|
+
## 0.9.4
|
|
16
|
+
|
|
17
|
+
`/catalyst-onboard` walks a new member through setup one step at a time, in the order a person can act on it: coding account, Linear integration, project, GitHub App and repository, connected accounts, the repository's `.catalyst/catalyst.toml` declaration, then the host, ending with one ticket moving. Each turn asks one question, says why in a line, and checks the result after. A new reference covers choosing a coding account (a Claude setup token, a Codex `auth.json`, or a GLM or Qwen API key), and it says plainly that a plain Anthropic or OpenAI API key cannot be enrolled today. Accounts are named by their label. The skills use the product's own nouns (workspace, project, repository, integration, connected account).
|
|
18
|
+
|
|
19
|
+
An ended or cancelled coding account is kept for reporting and not used. Onboarding no longer tells you to retire or delete it, and never to put another login's credential on it; reactivate it only if its subscription is live again. `catalyst accounts` marks it "subscription canceled — kept for reporting, not used".
|
|
20
|
+
|
|
21
|
+
The onboarding step engine never names a next step it cannot back with a check, and it says when a newer CLI is announced but not yet published.
|
|
22
|
+
|
|
3
23
|
## 0.9.3
|
|
4
24
|
|
|
5
25
|
A machine the Catalyst installer moved from `@catalyst-cloud/catalyst-skills` to `@catalyst-cloud/cli` works without logging in again. The recorded launcher pointed into the removed package, so `ready` failed its CLI-path check and skill scripts could not start the CLI; any command now repoints it at the launcher that is running. The CLI also leaves the installer's skills alone: it never writes through a symlinked skill folder, and when the installer owns skill placement it does not refresh skills at all. When a refresh does fail, it tells you to re-run the install command.
|
package/README.md
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
# @catalyst-cloud/
|
|
1
|
+
# @catalyst-cloud/cli
|
|
2
2
|
|
|
3
3
|
[](https://skills.sh/coalesce-labs/catalyst-cloud-skills)
|
|
4
4
|
|
|
@@ -69,17 +69,17 @@ Without `--all` the installer asks which skills to take and which agents to inst
|
|
|
69
69
|
The skills call one CLI, and the CLI holds your credential. Install it once and connect this machine — the keyless way logs you in as yourself, with nothing to mint or paste:
|
|
70
70
|
|
|
71
71
|
```sh
|
|
72
|
-
npm install -g @catalyst-cloud/
|
|
73
|
-
catalyst
|
|
74
|
-
catalyst
|
|
72
|
+
npm install -g @catalyst-cloud/cli
|
|
73
|
+
catalyst login
|
|
74
|
+
catalyst ready
|
|
75
75
|
```
|
|
76
76
|
|
|
77
|
-
`catalyst
|
|
77
|
+
`catalyst login` with no key opens a device-code login: it prints a short code and a URL, you approve it in your browser, and this machine is connected as you. On a machine with no browser (a remote box, a container) the code and URL still work — approve them from your phone. The short-lived session refreshes silently afterwards, so you log in about once a year. `npx -p @catalyst-cloud/cli catalyst login` works without the global install, and `bunx` works in place of `npx`. A non-default cloud is set with `CATALYST_CLOUD_BASE_URL` or `--base-url <url>`.
|
|
78
78
|
|
|
79
79
|
Prefer a key? Pass one instead — mint a **personal key** at Settings → API keys in the Catalyst Cloud app (every member can; no admin needed). The environment form keeps it out of your shell history:
|
|
80
80
|
|
|
81
81
|
```sh
|
|
82
|
-
CATALYST_CLOUD_TOKEN=<your-personal-key> catalyst
|
|
82
|
+
CATALYST_CLOUD_TOKEN=<your-personal-key> catalyst login
|
|
83
83
|
```
|
|
84
84
|
|
|
85
85
|
`--key <your-personal-key>` is the third form, for a script.
|
|
@@ -87,20 +87,22 @@ CATALYST_CLOUD_TOKEN=<your-personal-key> catalyst-skills login
|
|
|
87
87
|
After a tenant owner connects the tenant's Linear workspace, connect your personal Linear account. Connect your personal GitHub account only after the tenant's GitHub App is installed and its repository is registered. These personal grants are separate from the tenant's Linear connection and GitHub App installation. Your agent can start each connection and check whether it landed, but you approve each one in your browser:
|
|
88
88
|
|
|
89
89
|
```sh
|
|
90
|
-
catalyst
|
|
91
|
-
catalyst
|
|
90
|
+
catalyst connections personal linear start
|
|
91
|
+
catalyst connections personal linear status
|
|
92
92
|
# First install the tenant's GitHub App and register its repository in Settings.
|
|
93
|
-
catalyst
|
|
94
|
-
catalyst
|
|
93
|
+
catalyst connections personal github start
|
|
94
|
+
catalyst connections personal github status
|
|
95
95
|
```
|
|
96
96
|
|
|
97
97
|
Each `start` prints a short-lived URL and attempts to open your browser. On a remote machine, open the printed URL on your own device. `status --json` gives the same result to an agent; `start --wait 60` waits up to one minute for approval. A connected result is the proof that the grant landed. If a provider reports unavailable, retry status later rather than starting a second approval.
|
|
98
98
|
|
|
99
99
|
The `catalyst-onboard` skill checks both grants before taking you through the rest of tenant setup and the first ticket.
|
|
100
100
|
|
|
101
|
+
The command is `catalyst`. `catalyst-skills` still works as a deprecated alias, and `@catalyst-cloud/catalyst-skills` is the deprecated package name that forwards to this one.
|
|
102
|
+
|
|
101
103
|
## What this is
|
|
102
104
|
|
|
103
|
-
A set of skills that let your coding agent run your own Catalyst Cloud tenant (https://staging.catalystcloud.dev) from your seat: what is happening, what needs you, and what to do about it. They read your tenant through the Catalyst Cloud SDK, write to it through the tenant's agent proxy, and never compose a URL or run a tool of their own; every read, write and subscription is a `catalyst
|
|
105
|
+
A set of skills that let your coding agent run your own Catalyst Cloud tenant (https://staging.catalystcloud.dev) from your seat: what is happening, what needs you, and what to do about it. They read your tenant through the Catalyst Cloud SDK, write to it through the tenant's agent proxy, and never compose a URL or run a tool of their own; every read, write and subscription is a `catalyst` verb with `--help`. Every skill is plain Markdown under `skills/<name>/SKILL.md` in this repository, and your own login — a keyless device-code session, or a personal key — is the only credential. Your agent acts as you: the asks it raises and the comments it posts carry your name, and "what needs me" means you.
|
|
104
106
|
|
|
105
107
|
## What connecting does
|
|
106
108
|
|
|
@@ -108,13 +110,13 @@ A set of skills that let your coding agent run your own Catalyst Cloud tenant (h
|
|
|
108
110
|
|
|
109
111
|
A keyless session's access token is short-lived and rotates on its own: every request refreshes it within a minute of expiry and rewrites the config atomically, so you stay connected for months without logging in again. You only log in again if the session is revoked or you have been away long enough to lapse — then one clear line tells you to run `login`.
|
|
110
112
|
|
|
111
|
-
`login` does not install skills; the install command above did that. Re-running `login` after a key rotation, or to switch rails, rewrites the config. `catalyst
|
|
113
|
+
`login` does not install skills; the install command above did that. Re-running `login` after a key rotation, or to switch rails, rewrites the config. `catalyst status` prints which tenant this machine is connected to and as whom, `catalyst ready` prints one READY or NOT READY verdict with the fix for each failure and who can apply it, and `catalyst --version` prints the package version and its pinned tenant contract range.
|
|
112
114
|
|
|
113
115
|
The setup skill Catalyst seeds into your repository ends by pointing at this same command. That served skill lives in the Catalyst Cloud application, not here; this is the only connect step a customer runs. The tenant's **account key** (Settings → Account keys, admin-minted) is a different credential — for a host or daemon that runs unattended — and is not what a person connects their own agent with: it would strip your name from everything your agent writes, and `login` says so if you use one.
|
|
114
116
|
|
|
115
117
|
## Requirements
|
|
116
118
|
|
|
117
|
-
- Node 22.15 or newer (Node 26 works), or bun 1.4 or newer. The bundle uses Node's built-in SQLite module (and, on bun, bun's own `node:sqlite`) for the optional local replica, so there is no native dependency to build; if `better-sqlite3` resolves on the machine it is used instead. `catalyst
|
|
119
|
+
- Node 22.15 or newer (Node 26 works), or bun 1.4 or newer. The bundle uses Node's built-in SQLite module (and, on bun, bun's own `node:sqlite`) for the optional local replica, so there is no native dependency to build; if `better-sqlite3` resolves on the machine it is used instead. `catalyst ready` names the exact reason when the runtime is too old, and `catalyst runtime install` installs a pinned Node under this CLI's own cache — without touching your machine's default Node — if you would rather not upgrade it.
|
|
118
120
|
- Your personal key, minted by you at Settings → API keys. The key is the only tenant selector: you never type a tenant or account id. If your Linear identity is not matched yet, `login` says so; an admin matches it in Settings → Members, and until then "what needs me" shows everyone's asks.
|
|
119
121
|
- An agent that discovers skills. Claude Code loads the plugin; Codex, Cursor, OpenCode and the rest read the `skills/<name>/SKILL.md` files the `npx skills` installer writes.
|
|
120
122
|
- Bun is optional, only if you prefer `bunx` over `npx` — bun 1.4 or newer, which is when `node:sqlite` arrives; older bun cannot run this CLI at all.
|
|
@@ -128,6 +130,8 @@ Open a new session and ask about your own tenant. The skills read the config `lo
|
|
|
128
130
|
- Run this project for me until it closes.
|
|
129
131
|
- Am I set up?
|
|
130
132
|
|
|
133
|
+
`catalyst team list` inventories visible teams without running readiness checks. `team check ENG` prints readiness for one team; `team check --all` runs checks for every team. `team map ENG`, `team adopt ENG`, and `team migrate ENG` print a plan and exit 3 before changing configuration; review the plan and rerun the chosen command with `--yes --plan-hash <hash>` from that preview. `team adopt ENG --undo` previews the exact previously created stages, and `team migrate ENG --retire` requires its own confirmation after the ticket move. `team checklist ENG` prints the same manual setup lines as the browser. These commands use the member's own login; an admin or owner seat is required for setup, and Adopt and Migrate also need that member's personal Linear connection.
|
|
134
|
+
|
|
131
135
|
## What has to be running
|
|
132
136
|
|
|
133
137
|
Nothing, by default. After `login`, every read, write, ask and explanation goes to the cloud's origin-fresh API with the config file and the cached contract on disk. Two optional processes exist for people who want them:
|
|
@@ -135,12 +139,12 @@ Nothing, by default. After `login`, every read, write, ask and explanation goes
|
|
|
135
139
|
| process | needed for | what it holds on disk | lifetime |
|
|
136
140
|
| --- | --- | --- | --- |
|
|
137
141
|
| none | every read, write, ask and explain | `customer.json` and `contract.json` | the default after login |
|
|
138
|
-
| `catalyst
|
|
139
|
-
| `catalyst
|
|
142
|
+
| `catalyst replica start` | local SQL, cheap repeated reads, and local event `tail`, `wait-for`, and `query` | one SQLite file plus a bounded event cache under `$XDG_STATE_HOME/catalyst/events/` (fallback `~/.local/state/catalyst/events/`) | one long-running process; foreground by default, `--detach` writes a pidfile beside the database and returns; `login --start-replica` does the same at the end of login |
|
|
143
|
+
| `catalyst watch` | a project owner reacting to its scope | one cursor file (`~/.config/catalyst-cloud/watch-cursor.json`) stamped with the tenant | lives inside the session that armed it; exits with it |
|
|
140
144
|
|
|
141
|
-
The check every skill runs first is `catalyst
|
|
145
|
+
The check every skill runs first is `catalyst replica status`, which needs no network: is the pidfile's process alive, is the writer-lock heartbeat younger than the staleness threshold, and is the cursor non-empty. It exits `0` for fresh, `1` for present but stale, `2` for not connected, `3` for absent, and prints one line either way (`--json` for scripts). A fresh replica is used; anything else falls back to the API and the skill says so in its answer. A skill never refuses to work because the replica is down and never silently reads a stale one. `replica status --probe` compares the local cursor against the cloud's head for the honest "how far behind" number; that is the only form that touches the network. `catalyst replica stop` stops a detached writer.
|
|
142
146
|
|
|
143
|
-
`catalyst
|
|
147
|
+
`catalyst events status --probe` checks the event cache's own cursor and compares it with the cloud head; `replica status --probe` checks the separate entity-replica cursor. A fresh replica does not prove event freshness. `events tail` follows new cached events, `events wait-for --ticket ... --timeout ...` performs a bounded wait, and `events query` reads retained history. Those three commands only read the cache; `events status --probe` makes the cloud comparison. The replica process is the single writer and reports an event-sync failure without terminating a healthy entity replica. The event cache keeps closed daily segments for at most seven days or 256 MiB per tenant and reports an explicit gap when a requested sequence has retired.
|
|
144
148
|
|
|
145
149
|
The replica is a Node process, not a service: the supported path is the plain command, and `skills/connect-me/references/keeping-the-replica-running.md` gives launchd and systemd examples for people who want the writer to survive a reboot.
|
|
146
150
|
|
|
@@ -163,7 +167,7 @@ Some of these only read; the ones that write anything — or that drive you thro
|
|
|
163
167
|
|
|
164
168
|
## What a key cannot see yet
|
|
165
169
|
|
|
166
|
-
Your personal key reads everything the skills need — tickets, pull requests, the eligibility explainer, the dispatch queue, fleet activity, per-ticket execution history (`catalyst
|
|
170
|
+
Your personal key reads everything the skills need — tickets, pull requests, the eligibility explainer, the dispatch queue, fleet activity, per-ticket execution history (`catalyst explain --history <ticket>`: phase attempts, remediation rounds, park state) and coding-account status (`catalyst accounts`: provider, declared and observed state, window usage, walls, quarantine — never a credential; enrolling or pausing one is `<your cloud>/settings/coding-accounts`). It also releases a parked or held ticket once its cause is fixed: `catalyst release <ticket> --because <what changed>` (the `unstick` skill runs it), recorded against your name and shown in the ticket's history. And it declares what your containers need: `catalyst environment` reads the tenant-wide declaration, `environment propose --file <path> --approve` proposes and approves it in one compare-and-set, and the values behind the names stay in the cloud — reading needs any active seat, proposing and approving need an admin or owner one. An admin or owner can put a repository's values in from the terminal. `catalyst secret import .env --repo owner/name` stores every name in the file and lists the declared names that still have no value. `catalyst secret set NAME --repo owner/name --command 'op read op://Vault/item/field'` runs the command on your machine and stores its output; with no `--command` it reads the value from stdin, or asks for it without echoing. No value is ever printed, and the cloud's audit records the command, not its output. That is the account's own declaration — a repository's own `.catalyst/catalyst.toml`, which `catalyst-setup` already reports on, is a separate thing. One thing it cannot do, and the skills say so by name rather than guess:
|
|
167
171
|
|
|
168
172
|
- Read pull-request labels or the reviewer's reaction. The mirror does not carry them; GitHub's own page does.
|
|
169
173
|
|
|
@@ -182,35 +186,35 @@ The skill files themselves are written by whichever install command you ran, in
|
|
|
182
186
|
|
|
183
187
|
## Updating
|
|
184
188
|
|
|
185
|
-
A plugin install updates when we ship. Skills copied by `npx skills add` do not. After the source and destination check in Install, re-run the Cloud add command to refresh existing skills and pick up new ones. Update the CLI with `npm install -g @catalyst-cloud/
|
|
189
|
+
A plugin install updates when we ship. Skills copied by `npx skills add` do not. After the source and destination check in Install, re-run the Cloud add command to refresh existing skills and pick up new ones. Update the CLI with `npm install -g @catalyst-cloud/cli@latest && catalyst login` — the re-login rewrites the CLI path the skills spawn, so they stop running the old bundle. To run one command against the latest publish without installing, use `npx -p @catalyst-cloud/cli@latest catalyst login`. The next `catalyst` run prints a one-line notice:
|
|
186
190
|
|
|
187
191
|
```
|
|
188
|
-
[catalyst
|
|
192
|
+
[catalyst] updated 0.1.1 → 0.2.0: <that version's CHANGELOG.md summary> · update with: npm install -g @catalyst-cloud/cli@latest && catalyst login
|
|
189
193
|
```
|
|
190
194
|
|
|
191
|
-
A `customer.json` written by an older bundle is still read unchanged; it gains the CLI path and the cached contract the next time you run `catalyst
|
|
195
|
+
A `customer.json` written by an older bundle is still read unchanged; it gains the CLI path and the cached contract the next time you run `catalyst login`.
|
|
192
196
|
|
|
193
|
-
`catalyst
|
|
197
|
+
`catalyst ready` also says when either the installed skills or the CLI is behind the latest publish, naming both versions and the command for each; it is a note, never a failure, and `--offline` (or `CATALYST_SKILLS_OFFLINE=1`) skips the lookup.
|
|
194
198
|
|
|
195
199
|
## Uninstalling
|
|
196
200
|
|
|
197
201
|
Remove the skills the way you installed them: `/plugin uninstall catalyst@catalyst-cloud` in Claude Code, or delete the skill directories (`catalyst-github`, `catalyst-linear`, `catalyst-onboard`, `catalyst-setup`, `connect-me`, `how-catalyst-works`, `run-this-project`, `unstick`, `what-needs-me`, `whats-happening`) from wherever `npx skills add` wrote them. Then remove what the CLI wrote:
|
|
198
202
|
|
|
199
203
|
```sh
|
|
200
|
-
catalyst
|
|
204
|
+
catalyst replica stop
|
|
201
205
|
rm -f ~/.config/catalyst-cloud/customer.json ~/.config/catalyst-cloud/contract.json ~/.config/catalyst-cloud/published.json ~/.config/catalyst-cloud/watch-cursor.json
|
|
202
206
|
rm -f ~/.config/catalyst-cloud/replica.db ~/.config/catalyst-cloud/replica.db.pid ~/.config/catalyst-cloud/replica.db.writer.lock ~/.config/catalyst-cloud/replica.db.writer.state
|
|
203
207
|
rm -rf "${XDG_STATE_HOME:-$HOME/.local/state}/catalyst/events"
|
|
204
|
-
npm uninstall -g @catalyst-cloud/
|
|
208
|
+
npm uninstall -g @catalyst-cloud/cli
|
|
205
209
|
```
|
|
206
210
|
|
|
207
211
|
## If login fails
|
|
208
212
|
|
|
209
|
-
- `catalyst
|
|
210
|
-
- `catalyst
|
|
211
|
-
- `catalyst
|
|
213
|
+
- `catalyst: GET /me failed (401): credential not accepted — mint a personal key at Settings → API keys and log in again` — the key is stale, mistyped or revoked. Mint a new one, then run `login` again.
|
|
214
|
+
- `catalyst: GET /me failed (403): account-not-operational` — the tenant is suspended. This is an admin conversation on the tenant, not a local fix.
|
|
215
|
+
- `catalyst: could not reach <url>: <detail>` — the machine cannot reach the cloud. The URL is named in the message; check `CATALYST_CLOUD_BASE_URL` or `--base-url`.
|
|
212
216
|
- A line naming two contract versions after `Connected to` — the tenant serves a contract outside this bundle's `1.x || 2.x` range. The config is written; update the bundle before using the other skills.
|
|
213
|
-
- `[catalyst
|
|
217
|
+
- `[catalyst] GET /api/v1/agent/contract refused (403): this cloud is older than the bundle …` on stderr — the cloud has not yet deployed personal-key access to the contract. Update the cloud, or connect with the tenant's account key until it has.
|
|
214
218
|
|
|
215
219
|
## License
|
|
216
220
|
|
|
@@ -221,9 +225,9 @@ MIT — see [LICENSE](LICENSE). How to contribute and how releases happen are de
|
|
|
221
225
|
Personal Linear consent normally binds the provider viewer automatically. For an unmatched identity, inspect your choices and explicitly select yourself:
|
|
222
226
|
|
|
223
227
|
```sh
|
|
224
|
-
catalyst
|
|
225
|
-
catalyst
|
|
226
|
-
catalyst
|
|
228
|
+
catalyst identity linear status
|
|
229
|
+
catalyst identity linear options --json
|
|
230
|
+
catalyst identity linear set <linearUserId>
|
|
227
231
|
```
|
|
228
232
|
|
|
229
233
|
The command uses your personal credential and reads the result back after selection. It cannot change another member, replace an automatic match, or take an already-claimed identity. A missing options field means no choice was offered, which can include a temporarily unreadable roster. This command depends on the pending SDK 0.12.0 release with identity support.
|
package/dist/args.js
CHANGED
|
@@ -111,6 +111,15 @@ export const FLAG_TABLES = {
|
|
|
111
111
|
offline: { value: false, help: "skip the published-release check (no network)" },
|
|
112
112
|
},
|
|
113
113
|
accounts: {},
|
|
114
|
+
team: {
|
|
115
|
+
all: { value: false, help: "check every team, one request at a time" },
|
|
116
|
+
stage: { value: true, repeat: true, help: "map a role to a live Linear state name (role=StateName)" },
|
|
117
|
+
choice: { value: true, repeat: true, help: "migrate a source state to a destination (sourceId=destinationId)" },
|
|
118
|
+
yes: { value: false, help: "apply the plan you have reviewed with the person" },
|
|
119
|
+
"plan-hash": { value: true, help: "apply only the exact preview hash the person reviewed" },
|
|
120
|
+
undo: { value: false, help: "adopt: preview or archive stages a prior adoption created" },
|
|
121
|
+
retire: { value: false, help: "migrate: separately preview or retire emptied source stages" },
|
|
122
|
+
},
|
|
114
123
|
environment: {
|
|
115
124
|
file: { value: true, help: "propose: a JSON file holding the declaration" },
|
|
116
125
|
stdin: { value: false, help: "propose: read the declaration from stdin" },
|
|
@@ -125,6 +134,7 @@ export const FLAG_TABLES = {
|
|
|
125
134
|
rotate: { value: true, repeat: true, help: "import: replace this name if it is already set (repeatable)" },
|
|
126
135
|
},
|
|
127
136
|
identity: {},
|
|
137
|
+
capabilities: {},
|
|
128
138
|
connections: {
|
|
129
139
|
wait: { value: true, help: "start: wait up to this many seconds for browser approval (0-600)" },
|
|
130
140
|
},
|
|
@@ -158,9 +168,11 @@ export const VERB_USAGE = {
|
|
|
158
168
|
ready: "ready [--json] [--offline]",
|
|
159
169
|
accounts: "accounts [--json]",
|
|
160
170
|
mcp: "mcp <add <name> --url URL <--auth none|--bearer SECRET_NAME|--header NAME=SECRET_NAME...>|list|remove <name>> [--json]",
|
|
171
|
+
team: "team <list|check <KEY>|check --all|map <KEY> [--stage role=StateName]... [--yes --plan-hash H]|adopt <KEY> [--undo] [--yes --plan-hash H]|migrate <KEY> [--choice sourceId=destinationId]... [--retire] [--yes --plan-hash H]|checklist <KEY>> [--json]",
|
|
161
172
|
environment: "environment [read] [--json] | environment propose --file <path>|--stdin [--expect-revision N] [--approve] [--json] | environment approve [--revision N --hash H] [--json]",
|
|
162
173
|
secret: "secret set <NAME> --repo <owner/name> [--command '<cmd>'] [--json] (value from --command, stdin, or a hidden prompt) | secret import <file> --repo <owner/name> [--rotate NAME]... [--json]",
|
|
163
174
|
identity: "identity linear <status|options|set> [<linearUserId>] [--json]",
|
|
175
|
+
capabilities: "capabilities [--json]",
|
|
164
176
|
connections: "connections personal <linear|github> <start|status> [--wait <seconds>] [--json]",
|
|
165
177
|
release: "release <ticket> --because <what changed> [--retry-unchanged] [--dry-run] [--json] | release --class <failure-class> --team <K> --because <what changed> [--retry-unchanged] [--dry-run] [--limit N] [--json]",
|
|
166
178
|
};
|
|
@@ -277,7 +289,7 @@ export function flagInt(args, name, fallback) {
|
|
|
277
289
|
}
|
|
278
290
|
/** The help text for one verb: usage line, then every flag in its table and the global ones. */
|
|
279
291
|
export function verbHelp(verb) {
|
|
280
|
-
const lines = [`Usage: catalyst
|
|
292
|
+
const lines = [`Usage: catalyst ${VERB_USAGE[verb] ?? verb}`, ""];
|
|
281
293
|
const table = FLAG_TABLES[verb] ?? {};
|
|
282
294
|
const names = Object.keys(table);
|
|
283
295
|
if (names.length > 0) {
|
package/dist/ask.js
CHANGED
|
@@ -146,10 +146,10 @@ async function list(args, ctx, doc, api, cfg) {
|
|
|
146
146
|
return 0;
|
|
147
147
|
}
|
|
148
148
|
if (scope.kind === "unmatched") {
|
|
149
|
-
ctx.stderr(`[catalyst
|
|
149
|
+
ctx.stderr(`[catalyst] your Linear identity is not matched yet (an admin matches it in Settings → Members), so this is every open ask, not only yours`);
|
|
150
150
|
}
|
|
151
151
|
else if (scope.kind === "no-person") {
|
|
152
|
-
ctx.stderr(`[catalyst
|
|
152
|
+
ctx.stderr(`[catalyst] connected with the tenant's account key, which names no person — this is every open ask; log in with your personal key to see only yours`);
|
|
153
153
|
}
|
|
154
154
|
if (ranked.length === 0) {
|
|
155
155
|
ctx.stdout(scope.kind === "mine" ? `no open asks assigned to ${scope.label} (${all.length} open in the tenant — add --anyone to see them)` : "no open asks");
|
|
@@ -0,0 +1,70 @@
|
|
|
1
|
+
import { readManifest } from "./config.js";
|
|
2
|
+
import { readContractCache } from "./contract.js";
|
|
3
|
+
const agent = (method, name) => ({ method, path: `/api/v1/agent/${name}` });
|
|
4
|
+
/** ⭐ THE ONE PLACE THIS CLI SAYS WHAT IT CAN DO. Keep it in the order a setup walks: the machine,
|
|
5
|
+
* the person, the workspace, the project, the repository, then work. A new verb is a new row here
|
|
6
|
+
* in the same change, or `catalyst capabilities` lies to every guide that reads it. */
|
|
7
|
+
export const CAPABILITIES = [
|
|
8
|
+
{ verb: "status", does: "say whether this machine is connected, as whom, and to which cloud", needs: "member", routes: [], since: "0.1.0" },
|
|
9
|
+
{ verb: "me", does: "read the person's seat, role and Linear identity", needs: "member", routes: [], since: "0.1.0" },
|
|
10
|
+
{ verb: "ready", does: "read the machine and the workspace's per-project readiness in one verdict", needs: "member", routes: [], since: "0.1.0" },
|
|
11
|
+
{ verb: "contract", does: "read the workspace contract this cloud serves", needs: "member", routes: [agent("GET", "contract")], since: "0.1.0" },
|
|
12
|
+
{ verb: "capabilities", does: "list what this CLI can do, the role each needs, and whether this cloud serves it", needs: "member", routes: [], since: "0.9.5" },
|
|
13
|
+
{ verb: "connections personal linear start|status", does: "start and confirm the person's own Linear connected account (the consent itself is theirs, in a browser)", needs: "member", routes: [], since: "0.9.0" },
|
|
14
|
+
{ verb: "connections personal github start|status", does: "start and confirm the person's own GitHub connected account (the consent itself is theirs, in a browser)", needs: "member", routes: [], since: "0.9.0" },
|
|
15
|
+
{ verb: "identity linear status|options|set", does: "match the person's Linear identity from the roster", needs: "member", routes: [], since: "0.9.0" },
|
|
16
|
+
{ verb: "team list", does: "list the workspace's Linear teams and which are mapped as projects", needs: "member", routes: [agent("GET", "teams")], since: "0.9.5" },
|
|
17
|
+
{ verb: "team check", does: "run a project's readiness check now", needs: "admin", routes: [agent("POST", "team-workflow/check")], since: "0.9.5" },
|
|
18
|
+
{ verb: "team map", does: "map a project's stages, from a preview the person approves", needs: "admin", routes: [agent("GET", "team-workflow"), agent("POST", "team-workflow/save")], since: "0.9.5" },
|
|
19
|
+
{ verb: "team adopt", does: "create Catalyst's stages in a Linear team, from a preview the person approves", needs: "admin", routes: [agent("POST", "team-workflow/adopt")], since: "0.9.5" },
|
|
20
|
+
{ verb: "team migrate", does: "move tickets between stages, from a preview the person approves", needs: "admin", routes: [agent("POST", "team-workflow/migrate")], since: "0.9.5" },
|
|
21
|
+
{ verb: "team checklist", does: "print what adopting the workflow would do to a team", needs: "admin", routes: [agent("GET", "team-workflow")], since: "0.9.5" },
|
|
22
|
+
{ verb: "environment read", does: "read the workspace-wide environment declaration", needs: "member", routes: [agent("GET", "account-environment")], since: "0.8.0" },
|
|
23
|
+
{ verb: "environment propose", does: "propose the workspace-wide environment declaration (names only)", needs: "admin", routes: [agent("POST", "account-environment/propose")], since: "0.8.0" },
|
|
24
|
+
{ verb: "environment approve", does: "approve the workspace-wide environment declaration", needs: "admin", routes: [agent("POST", "account-environment/approve")], since: "0.8.0" },
|
|
25
|
+
{ verb: "secret set|import", does: "enter a repository secret's value from this terminal, never echoed", needs: "admin", routes: [], since: "0.8.0" },
|
|
26
|
+
{ verb: "accounts", does: "read the workspace's coding accounts and which can take work", needs: "member", routes: [], since: "0.5.0" },
|
|
27
|
+
{ verb: "explain|running|queue|history", does: "read why a ticket runs or waits, what runs now, and what is queued", needs: "member", routes: [], since: "0.1.0" },
|
|
28
|
+
{ verb: "write comment|state|label|create|reaction|attachment|session", does: "act on a ticket as the person, through the agent proxy", needs: "member", routes: [agent("POST", "issue-comment"), agent("POST", "issue-state"), agent("POST", "issue-label"), agent("POST", "issue-create")], since: "0.1.0" },
|
|
29
|
+
{ verb: "ask raise|accept|list", does: "raise a decision to a human, or answer one", needs: "member", routes: [agent("POST", "ask"), agent("POST", "ask-accept")], since: "0.1.0" },
|
|
30
|
+
{ verb: "release", does: "release a parked ticket or a whole failure class back to work", needs: "admin", routes: [agent("POST", "ticket-release"), agent("POST", "ticket-release-class")], since: "0.6.0" },
|
|
31
|
+
{ verb: "mcp add|list|remove", does: "register an MCP server for the workspace by vault-secret name", needs: "admin", routes: [agent("POST", "mcp")], since: "0.9.0" },
|
|
32
|
+
];
|
|
33
|
+
/** Judge each capability against the routes a contract serves. `null` means no contract is cached,
|
|
34
|
+
* so nothing that rides a route can be called available; local and read-plane verbs still are. */
|
|
35
|
+
export function reportCapabilities(routes) {
|
|
36
|
+
return CAPABILITIES.map((c) => {
|
|
37
|
+
if (c.routes.length === 0)
|
|
38
|
+
return { ...c, availability: "available", missing: [] };
|
|
39
|
+
if (routes === null)
|
|
40
|
+
return { ...c, availability: "cloud_unread", missing: [] };
|
|
41
|
+
const missing = c.routes.filter((r) => !routes.some((s) => s.method === r.method && s.path === r.path));
|
|
42
|
+
return { ...c, availability: missing.length === 0 ? "available" : "needs_newer_cloud", missing };
|
|
43
|
+
});
|
|
44
|
+
}
|
|
45
|
+
export async function cmdCapabilities(args, ctx) {
|
|
46
|
+
const manifest = readManifest();
|
|
47
|
+
const cache = readContractCache(ctx.home);
|
|
48
|
+
const report = reportCapabilities(cache === null ? null : cache.doc.routes);
|
|
49
|
+
if (args.json) {
|
|
50
|
+
ctx.stdout(JSON.stringify({
|
|
51
|
+
cli: { name: "catalyst", version: manifest.version },
|
|
52
|
+
contract: cache === null ? null : { version: cache.contractVersion, fetchedAt: cache.fetchedAt },
|
|
53
|
+
capabilities: report,
|
|
54
|
+
}));
|
|
55
|
+
return 0;
|
|
56
|
+
}
|
|
57
|
+
ctx.stdout(cache === null
|
|
58
|
+
? `catalyst ${manifest.version}; no contract cached yet, so nothing that rides a cloud route can be called available: run \`catalyst contract\` after connecting`
|
|
59
|
+
: `catalyst ${manifest.version} against contract ${cache.contractVersion} (cached ${cache.fetchedAt})`);
|
|
60
|
+
const width = Math.max(...report.map((r) => r.verb.length));
|
|
61
|
+
for (const r of report) {
|
|
62
|
+
const why = r.availability === "needs_newer_cloud"
|
|
63
|
+
? ` — this cloud does not serve ${r.missing.map((m) => `${m.method} ${m.path}`).join(", ")}`
|
|
64
|
+
: r.availability === "cloud_unread"
|
|
65
|
+
? " — rides a cloud route; no contract cached"
|
|
66
|
+
: "";
|
|
67
|
+
ctx.stdout(`${r.verb.padEnd(width)} ${r.needs.padEnd(6)} ${r.availability.padEnd(17)} ${r.does}${why}`);
|
|
68
|
+
}
|
|
69
|
+
return 0;
|
|
70
|
+
}
|
package/dist/cli.js
CHANGED
|
@@ -24,6 +24,8 @@ import { cmdMcp } from "./mcp.js";
|
|
|
24
24
|
import { cmdRelease } from "./release.js";
|
|
25
25
|
import { cmdEnvironment } from "./environment.js";
|
|
26
26
|
import { cmdSecret } from "./secret.js";
|
|
27
|
+
import { cmdTeam } from "./team.js";
|
|
28
|
+
import { cmdCapabilities } from "./capabilities.js";
|
|
27
29
|
import { cmdIdentity } from "./identity.js";
|
|
28
30
|
import { cmdConnections } from "./connections.js";
|
|
29
31
|
export { CONFIG_MODE, DEFAULT_BASE_URL, FIRST_STAMPED_VERSION, LEGACY_PACKAGE_NAME, PACKAGE_NAME, PROVENANCE_MARKER, CliError, MeError, UsageError, configPathFor, contractPathFor, defaultCtx, defaultReplicaDbFor, defaultSkillsDirFor, fetchMe, formatMode, installedBundleVersion, installSkills, loadConfig, modernCliPath, normalizeBaseUrl, parseArgs, parseChangelogEntry, parseProvenanceVersion, readChangelog, readManifest, resolveSkillsDir, saveConfig, skillsSourceDir, updateNoticeLine, writeConfig, };
|
|
@@ -49,26 +51,28 @@ export function usageText() {
|
|
|
49
51
|
`${PACKAGE_NAME} — the Catalyst Cloud customer CLI: connect to your tenant, read through the SDK, write through the agent proxy`,
|
|
50
52
|
"",
|
|
51
53
|
"Usage:",
|
|
52
|
-
" catalyst
|
|
53
|
-
" catalyst
|
|
54
|
-
" catalyst
|
|
55
|
-
" catalyst
|
|
56
|
-
" catalyst
|
|
57
|
-
" catalyst
|
|
58
|
-
" catalyst
|
|
59
|
-
" catalyst
|
|
60
|
-
" catalyst
|
|
61
|
-
" catalyst
|
|
62
|
-
" catalyst
|
|
63
|
-
" catalyst
|
|
64
|
-
" catalyst
|
|
65
|
-
" catalyst
|
|
66
|
-
" catalyst
|
|
67
|
-
" catalyst
|
|
68
|
-
" catalyst
|
|
69
|
-
" catalyst
|
|
70
|
-
" catalyst
|
|
71
|
-
" catalyst
|
|
54
|
+
" catalyst login [--base-url <url>] [--start-replica] (keyless: logs you in as yourself)",
|
|
55
|
+
" catalyst login --key <personal-key> [--base-url <url>] (or CATALYST_CLOUD_TOKEN, for a key)",
|
|
56
|
+
" catalyst join ... (deprecated alias of login; removed in the next minor version)",
|
|
57
|
+
" catalyst install [--skills-dir <dir>] [--force] (repair path; your agent's own command installs the skills)",
|
|
58
|
+
" catalyst status | notice | me | ready | accounts",
|
|
59
|
+
" catalyst mcp add|list|remove (vault references only)",
|
|
60
|
+
" catalyst contract [--refresh] [--path <a.b.c>]",
|
|
61
|
+
" catalyst query <issues|issue <id>|pulls|pull <id>|projects|cycles|search <terms>|changes --since <cursor|head>>",
|
|
62
|
+
" catalyst replica <start [--detach]|stop|status [--probe]|sql \"<select>\"|schema [table]>",
|
|
63
|
+
" catalyst runtime <status [--json]|install|path|uninstall> (a pinned Node this CLI manages itself)",
|
|
64
|
+
" catalyst events <tail|wait-for|query|status [--probe]> [--type NAME] [--ticket CTC-N] [--after SEQUENCE]",
|
|
65
|
+
" catalyst explain <ticket> | history <ticket> | running [--ticket T --phase P] | queue [--team K]",
|
|
66
|
+
" catalyst watch [--team K] [--ticket T]... [--project P] [--exec CMD]",
|
|
67
|
+
" catalyst write <comment|state|label|create|reaction|attachment|session> ...",
|
|
68
|
+
" catalyst ask <raise|accept|list> ...",
|
|
69
|
+
" catalyst release <ticket> --because <what changed> [--retry-unchanged] [--dry-run] | release --class <c> --team <K> ...",
|
|
70
|
+
" catalyst environment [read] | environment propose --file <path>|--stdin [--approve] | environment approve",
|
|
71
|
+
" catalyst secret set <NAME> --repo <owner/name> [--command '<cmd>'] | secret import <file> --repo <owner/name>",
|
|
72
|
+
" catalyst team <list|check|map|adopt|migrate|checklist> ...",
|
|
73
|
+
" catalyst capabilities [--json] (what this CLI can do, the role each verb needs, and whether this cloud serves it)",
|
|
74
|
+
" catalyst identity linear <status|options|set> [<linearUserId>] [--json]",
|
|
75
|
+
" catalyst connections personal <linear|github> <start|status> [--wait <seconds>] [--json]",
|
|
72
76
|
"",
|
|
73
77
|
"Every verb takes --help. --json makes the output machine-readable.",
|
|
74
78
|
"",
|
|
@@ -156,13 +160,13 @@ function maybePrintUpdateNotice(args, ctx) {
|
|
|
156
160
|
refreshed = installSkills(skillsDir, { force: false, onlyExisting: true });
|
|
157
161
|
}
|
|
158
162
|
catch (err) {
|
|
159
|
-
ctx.stderr(`[catalyst
|
|
163
|
+
ctx.stderr(`[catalyst] could not refresh the skills at ${skillsDir} (${err instanceof Error ? err.message : String(err)}) — the ${manifest.version} skills are not installed yet; re-run the install command: ${INSTALL_COMMAND}`);
|
|
160
164
|
return;
|
|
161
165
|
}
|
|
162
166
|
if (refreshed.installed.length > 0)
|
|
163
|
-
say(`[catalyst
|
|
167
|
+
say(`[catalyst] refreshed ${refreshed.installed.join(", ")} at ${skillsDir} to ${manifest.version}`);
|
|
164
168
|
for (const s of refreshed.skipped) {
|
|
165
|
-
say(`[catalyst
|
|
169
|
+
say(`[catalyst] left "${s.name}" alone: ${skillsDir}/${s.name} was not installed by this package (catalyst install --force to replace)`);
|
|
166
170
|
}
|
|
167
171
|
cfg.lastSkillBundleVersion = manifest.version;
|
|
168
172
|
cfg.skillsDir = skillsDir;
|
|
@@ -243,6 +247,10 @@ export async function main(argv, ctx = defaultCtx(), deps = {}) {
|
|
|
243
247
|
return await cmdEnvironment(args, ctx, deps.environment ?? {});
|
|
244
248
|
case "secret":
|
|
245
249
|
return await cmdSecret(args, ctx, deps.secret ?? {});
|
|
250
|
+
case "team":
|
|
251
|
+
return await cmdTeam(args, ctx, deps.team);
|
|
252
|
+
case "capabilities":
|
|
253
|
+
return await cmdCapabilities(args, ctx);
|
|
246
254
|
case "identity":
|
|
247
255
|
return await cmdIdentity(args, ctx, deps.identity ?? {});
|
|
248
256
|
case "connections":
|
|
@@ -260,17 +268,17 @@ export async function main(argv, ctx = defaultCtx(), deps = {}) {
|
|
|
260
268
|
return 1;
|
|
261
269
|
}
|
|
262
270
|
if (err instanceof CliError) {
|
|
263
|
-
ctx.stderr(`catalyst
|
|
271
|
+
ctx.stderr(`catalyst: ${err.message}`);
|
|
264
272
|
return err.exitCode;
|
|
265
273
|
}
|
|
266
274
|
if (err instanceof MeError) {
|
|
267
|
-
ctx.stderr(`catalyst
|
|
275
|
+
ctx.stderr(`catalyst: ${err.message}`);
|
|
268
276
|
return 2;
|
|
269
277
|
}
|
|
270
278
|
throw err;
|
|
271
279
|
}
|
|
272
280
|
}
|
|
273
|
-
const VERB_HELP_KNOWN = Object.fromEntries(["login", "join", "install", "status", "notice", "me", "contract", "query", "replica", "runtime", "events", "explain", "running", "queue", "watch", "write", "ask", "ready", "accounts", "release", "secret", "environment", "connections", "identity", "mcp"].map((v) => [v, true]));
|
|
281
|
+
const VERB_HELP_KNOWN = Object.fromEntries(["login", "join", "install", "status", "notice", "me", "contract", "query", "replica", "runtime", "events", "explain", "running", "queue", "watch", "write", "ask", "ready", "accounts", "release", "secret", "environment", "connections", "identity", "mcp", "team", "capabilities"].map((v) => [v, true]));
|
|
274
282
|
async function cmdLogin(args, ctx, deps) {
|
|
275
283
|
const manifest = readManifest();
|
|
276
284
|
const key = (args.key ?? ctx.env.CATALYST_CLOUD_TOKEN ?? "").trim();
|
|
@@ -317,7 +325,7 @@ async function cmdLogin(args, ctx, deps) {
|
|
|
317
325
|
ctx.stdout(`Connected as ${me.user.label} (${me.user.role})${me.user.linearUserId ? "" : " — your Linear identity is not matched yet, so \"what needs me\" will show everyone's asks until an admin matches it in Settings"}`);
|
|
318
326
|
}
|
|
319
327
|
else {
|
|
320
|
-
ctx.stderr(`[catalyst
|
|
328
|
+
ctx.stderr(`[catalyst] this is the tenant's account key (a host credential), not your own — the skills work, but nothing your agent writes will carry your name and "what needs me" cannot mean you. Mint a personal key at Settings → API keys and log in with that.`);
|
|
321
329
|
}
|
|
322
330
|
ctx.stdout(`Config written to ${written.path} (mode ${formatMode(written.mode)}, holds your ${auth ? "login session" : "key"} and the CLI path)${written.mode === CONFIG_MODE ? "" : ` — expected ${formatMode(CONFIG_MODE)}; chmod it by hand`}`);
|
|
323
331
|
ctx.stdout(`Tenant contract range: ${manifest.tenantContractRange}`);
|
|
@@ -327,7 +335,7 @@ async function cmdLogin(args, ctx, deps) {
|
|
|
327
335
|
}
|
|
328
336
|
catch (err) {
|
|
329
337
|
if (err instanceof CliError && (err.code === "contract-forbidden" || err.code === "contract-version")) {
|
|
330
|
-
ctx.stderr(`[catalyst
|
|
338
|
+
ctx.stderr(`[catalyst] ${err.message}`);
|
|
331
339
|
}
|
|
332
340
|
else {
|
|
333
341
|
throw err;
|
|
@@ -379,7 +387,7 @@ function cmdStatus(ctx) {
|
|
|
379
387
|
ctx.stdout(`Bundle: ${PACKAGE_NAME} ${manifest.version} (tenant contract range: ${manifest.tenantContractRange})`);
|
|
380
388
|
if (cfg.cliPath)
|
|
381
389
|
ctx.stdout(`CLI: ${cfg.cliPath}${existsSync(cfg.cliPath) ? "" : " (missing — re-run login)"}`);
|
|
382
|
-
ctx.stdout(`Contract: ${existsSync(contractPathFor(ctx.home)) ? contractPathFor(ctx.home) : "not cached (run: catalyst
|
|
390
|
+
ctx.stdout(`Contract: ${existsSync(contractPathFor(ctx.home)) ? contractPathFor(ctx.home) : "not cached (run: catalyst contract --refresh)"}`);
|
|
383
391
|
return 0;
|
|
384
392
|
}
|
|
385
393
|
/** A short human relative time for an ISO expiry, e.g. "in 14m", "in 2h", "in 6d", or "now" once past. */
|
package/dist/config.js
CHANGED
|
@@ -96,7 +96,7 @@ export const INSTALL_COMMAND = "curl -fsSL https://staging.catalystcloud.dev/ins
|
|
|
96
96
|
/** The one upgrade command every hint prints: update the installed package, then log in again so
|
|
97
97
|
* customer.json records the new launcher path. */
|
|
98
98
|
export function upgradeCommand(root) {
|
|
99
|
-
return `npm install -g ${updatePackageName(root)}@latest && catalyst
|
|
99
|
+
return `npm install -g ${updatePackageName(root)}@latest && catalyst login`;
|
|
100
100
|
}
|
|
101
101
|
/**
|
|
102
102
|
* CTC-3479 — logins before this release recorded bin/catalyst-skills.js as cliPath. That launcher is
|
package/dist/connections.js
CHANGED
|
@@ -24,9 +24,9 @@ function statusLine(provider, result) {
|
|
|
24
24
|
case "connected":
|
|
25
25
|
return `Personal ${name}: connected as ${result.provider === "linear" ? result.linearUserId : result.githubLogin}`;
|
|
26
26
|
case "absent":
|
|
27
|
-
return `Personal ${name}: not connected — run catalyst
|
|
27
|
+
return `Personal ${name}: not connected — run catalyst connections personal ${provider} start`;
|
|
28
28
|
case "lapsed":
|
|
29
|
-
return `Personal ${name}: connection expired — run catalyst
|
|
29
|
+
return `Personal ${name}: connection expired — run catalyst connections personal ${provider} start`;
|
|
30
30
|
case "unavailable":
|
|
31
31
|
return `Personal ${name}: temporarily unavailable — the grant state is unknown; retry status later`;
|
|
32
32
|
default:
|
|
@@ -40,7 +40,7 @@ export async function cmdConnections(args, ctx, deps = {}) {
|
|
|
40
40
|
const { provider, action, waitSeconds } = parseCommand(args);
|
|
41
41
|
const cfg = requireConfig(ctx);
|
|
42
42
|
if (!cfg.user)
|
|
43
|
-
throw new CliError("this machine uses a tenant account key, not a member credential — run catalyst
|
|
43
|
+
throw new CliError("this machine uses a tenant account key, not a member credential — run catalyst login as yourself", "member-required");
|
|
44
44
|
const createClient = deps.createClient ?? (async (options) => (await loadHttpSdk()).createTenantClient(options));
|
|
45
45
|
const client = await createClient({ key: await bearerFor(ctx, cfg), baseUrl: cfg.baseUrl, fetch: ctx.fetch });
|
|
46
46
|
if (action === "status") {
|
|
@@ -62,7 +62,7 @@ export async function cmdConnections(args, ctx, deps = {}) {
|
|
|
62
62
|
if (args.json)
|
|
63
63
|
ctx.stdout(JSON.stringify(started));
|
|
64
64
|
else
|
|
65
|
-
ctx.stdout(`After approval, run: catalyst
|
|
65
|
+
ctx.stdout(`After approval, run: catalyst connections personal ${provider} status`);
|
|
66
66
|
return 0;
|
|
67
67
|
}
|
|
68
68
|
const sleep = deps.sleep ?? ((ms) => new Promise((resolve) => setTimeout(resolve, ms)));
|
|
@@ -79,7 +79,7 @@ export async function cmdConnections(args, ctx, deps = {}) {
|
|
|
79
79
|
else {
|
|
80
80
|
ctx.stdout(statusLine(provider, status));
|
|
81
81
|
if (status.outcome === "absent" || status.outcome === "lapsed")
|
|
82
|
-
ctx.stdout(`Approval has not appeared yet; run catalyst
|
|
82
|
+
ctx.stdout(`Approval has not appeared yet; run catalyst connections personal ${provider} status later.`);
|
|
83
83
|
}
|
|
84
84
|
return status.outcome === "connected" ? 0 : status.outcome === "absent" || status.outcome === "lapsed" ? 2 : 1;
|
|
85
85
|
}
|
package/dist/environment.js
CHANGED
|
@@ -131,7 +131,7 @@ export async function cmdEnvironment(args, ctx, deps = {}) {
|
|
|
131
131
|
if (body.reason)
|
|
132
132
|
ctx.stdout(` reason: ${body.reason}`);
|
|
133
133
|
if (body.currentRevision !== undefined) {
|
|
134
|
-
ctx.stdout(` the declaration is now at revision ${body.currentRevision} — run \`catalyst
|
|
134
|
+
ctx.stdout(` the declaration is now at revision ${body.currentRevision} — run \`catalyst environment read\` and propose again from that`);
|
|
135
135
|
}
|
|
136
136
|
}
|
|
137
137
|
return 1;
|
|
@@ -144,14 +144,14 @@ export async function cmdEnvironment(args, ctx, deps = {}) {
|
|
|
144
144
|
if (args.json)
|
|
145
145
|
ctx.stdout(JSON.stringify(body));
|
|
146
146
|
else if (body.status !== "unchanged")
|
|
147
|
-
ctx.stdout("not delivered until it is approved: catalyst
|
|
147
|
+
ctx.stdout("not delivered until it is approved: catalyst environment approve");
|
|
148
148
|
return 0;
|
|
149
149
|
}
|
|
150
150
|
// ⭐ Approve exactly what propose just returned. The whole point of the CAS is that the approver
|
|
151
151
|
// saw the revision they are approving, and nothing here has to be copied by a human or a model.
|
|
152
152
|
const state = body.state;
|
|
153
153
|
if (!state) {
|
|
154
|
-
ctx.stderr("the cloud returned no state to approve — run: catalyst
|
|
154
|
+
ctx.stderr("the cloud returned no state to approve — run: catalyst environment read");
|
|
155
155
|
return 1;
|
|
156
156
|
}
|
|
157
157
|
const approved = await approveExact(api, routes, state.revision, state.canonicalHash);
|
|
@@ -172,7 +172,7 @@ export async function cmdEnvironment(args, ctx, deps = {}) {
|
|
|
172
172
|
if (revision === undefined || hash === undefined) {
|
|
173
173
|
const current = (await readState(api, routes)).current;
|
|
174
174
|
if (current === null || current === undefined) {
|
|
175
|
-
ctx.stdout("there is no declaration to approve — propose one first: catalyst
|
|
175
|
+
ctx.stdout("there is no declaration to approve — propose one first: catalyst environment propose --file <path>");
|
|
176
176
|
return 1;
|
|
177
177
|
}
|
|
178
178
|
revision = current.revision;
|
package/dist/events.js
CHANGED
|
@@ -71,7 +71,7 @@ export async function cmdEvents(args, ctx, deps = {}) {
|
|
|
71
71
|
if (controller.signal.aborted)
|
|
72
72
|
return sub === "wait-for" ? 1 : 0;
|
|
73
73
|
if (error.code === "ENOENT")
|
|
74
|
-
throw new CliError(`event cache is absent at ${directory} — start it with: catalyst
|
|
74
|
+
throw new CliError(`event cache is absent at ${directory} — start it with: catalyst replica start --detach`, "events-absent", 3);
|
|
75
75
|
throw error;
|
|
76
76
|
}
|
|
77
77
|
finally {
|