@radicaltools/cli 0.1.0 → 0.3.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/README.md +335 -25
- package/dist/hub-catalogue/concern/concern-api-evolution.radical +935 -0
- package/dist/hub-catalogue/concern/concern-architecture-style.radical +1112 -0
- package/dist/hub-catalogue/concern/concern-authentication.radical +685 -0
- package/dist/hub-catalogue/concern/concern-authorization.radical +1464 -0
- package/dist/hub-catalogue/concern/concern-availability.radical +804 -0
- package/dist/hub-catalogue/concern/concern-backend-stack.radical +1118 -0
- package/dist/hub-catalogue/concern/concern-backup-recovery.radical +1304 -0
- package/dist/hub-catalogue/concern/concern-capacity.radical +802 -0
- package/dist/hub-catalogue/concern/concern-communication-style.radical +1202 -0
- package/dist/hub-catalogue/concern/concern-data-consistency.radical +1081 -0
- package/dist/hub-catalogue/concern/concern-data-store.radical +960 -0
- package/dist/hub-catalogue/concern/concern-decomposition.radical +1143 -0
- package/dist/hub-catalogue/concern/concern-deployment.radical +952 -0
- package/dist/hub-catalogue/concern/concern-encryption.radical +1055 -0
- package/dist/hub-catalogue/concern/concern-frontend-stack.radical +1340 -0
- package/dist/hub-catalogue/concern/concern-infrastructure.radical +1151 -0
- package/dist/hub-catalogue/concern/concern-integration-resilience.radical +1079 -0
- package/dist/hub-catalogue/concern/concern-messaging.radical +940 -0
- package/dist/hub-catalogue/concern/concern-module-boundaries.radical +864 -0
- package/dist/hub-catalogue/concern/concern-observability.radical +1048 -0
- package/dist/hub-catalogue/concern/concern-personal-data.radical +1434 -0
- package/dist/hub-catalogue/concern/concern-rate-limiting.radical +1153 -0
- package/dist/hub-catalogue/concern/concern-secrets.radical +1026 -0
- package/dist/hub-catalogue/concern/concern-supply-chain.radical +1312 -0
- package/dist/hub-catalogue/concern/concern-tenant-isolation.radical +1306 -0
- package/dist/hub-catalogue/concern/concern-test-strategy.radical +1193 -0
- package/dist/index.js +9643 -1332
- package/package.json +6 -3
package/README.md
CHANGED
|
@@ -18,6 +18,176 @@ Or run it without a global install:
|
|
|
18
18
|
npx @radicaltools/cli check path/to/model
|
|
19
19
|
```
|
|
20
20
|
|
|
21
|
+
## radical setup
|
|
22
|
+
|
|
23
|
+
Connects your coding agents to a model folder, step by step:
|
|
24
|
+
|
|
25
|
+
```sh
|
|
26
|
+
npx @radicaltools/cli setup # asks for the folder, the agents and the hooks
|
|
27
|
+
npx @radicaltools/cli setup architecture --client claude-code --client codex --yes
|
|
28
|
+
```
|
|
29
|
+
|
|
30
|
+
No Node.js yet? Start from an empty folder with the launcher, which finds Node.js or
|
|
31
|
+
downloads it, then runs the CLI:
|
|
32
|
+
|
|
33
|
+
```sh
|
|
34
|
+
mkdir my-system && cd my-system
|
|
35
|
+
curl -fsSLO https://radical.tools/radical.sh && sh radical.sh setup # macOS, Linux
|
|
36
|
+
curl.exe -fsSLO https://radical.tools/radical.cmd && radical.cmd setup # Windows
|
|
37
|
+
```
|
|
38
|
+
|
|
39
|
+
The launcher (`radical.sh`, `radical.cmd`) takes Node.js 20.11 or later with `npx`
|
|
40
|
+
beside it from the `PATH`, else from `~/.radical/node`. With neither, it asks (or takes
|
|
41
|
+
`--yes`) and downloads the latest Node.js 24 for the platform from nodejs.org into
|
|
42
|
+
`~/.radical/node`, checked against its SHA-256 sum. It runs any command:
|
|
43
|
+
`sh radical.sh check architecture`, and `sh radical.sh mcp --folder …` runs the MCP
|
|
44
|
+
server without asking anything. `radical setup` run through it pins its version line
|
|
45
|
+
(`default_version`, `DEFAULT_VERSION` in `radical.cmd`) to the CLI's, makes `radical.sh`
|
|
46
|
+
executable, and has every agent and the git hooks start the server and the CLI through
|
|
47
|
+
it, so they find the same Node.js. Commit it with the model; `RADICAL_VERSION=latest sh
|
|
48
|
+
radical.sh setup` moves the project to the latest release. `RADICAL_HOME` and
|
|
49
|
+
`RADICAL_NODE_MIRROR` change where Node.js goes and where it comes from.
|
|
50
|
+
|
|
51
|
+
1. **Node**: checks the version (20.11 or later).
|
|
52
|
+
2. **Folder**: a missing or empty folder becomes a new model (`--metamodel radical`, the
|
|
53
|
+
default, or `c4`); a folder that holds other files and no `radical.md` is refused.
|
|
54
|
+
3. **Agents**: adds the MCP server for the folder to each agent's configuration, pinned
|
|
55
|
+
to the CLI's version (`@radicaltools/mcp@<version>`), keeping every other entry.
|
|
56
|
+
|
|
57
|
+
| Agent | File | Names |
|
|
58
|
+
| --- | --- | --- |
|
|
59
|
+
| Claude Code (`claude-code`) | `.mcp.json` at the top of the repository | `npx`, the folder by its path from the top |
|
|
60
|
+
| VS Code (`vscode`) | `.vscode/mcp.json` at the top of the repository | `npx`, `${workspaceFolder}/<folder>` |
|
|
61
|
+
| Claude Desktop (`claude-desktop`) | `claude_desktop_config.json` in the app's settings folder | `npx` by its absolute path, node's directory on `PATH`, the absolute folder |
|
|
62
|
+
| Cursor (`cursor`) | `~/.cursor/mcp.json` | as Claude Desktop |
|
|
63
|
+
| Codex (`codex`) | `~/.codex/config.toml` (or `$CODEX_HOME`) | as Claude Desktop, in `[mcp_servers.<name>]` |
|
|
64
|
+
|
|
65
|
+
The project files are meant to be committed, so teammates get the server too. A user
|
|
66
|
+
file is copied to `<file>.bak` before it changes. An entry that is already there is
|
|
67
|
+
left alone; another server of the same name is replaced only when you say so
|
|
68
|
+
(`--name <name>` adds this one beside it).
|
|
69
|
+
4. **Hooks**: `radical hooks install` for the folder, so Studio's *Changes on branch*
|
|
70
|
+
has the branch's base (`--no-hooks` leaves them alone). Outside a git repository it
|
|
71
|
+
asks, in a terminal, to start one in the working directory first.
|
|
72
|
+
5. **Check**: the checks of `--status` for the folder (`--no-check` skips them).
|
|
73
|
+
|
|
74
|
+
In a terminal each question shows its default; press Enter to take it. Without a
|
|
75
|
+
terminal, or with `--yes`, it asks nothing: the folder `architecture`, the agents it
|
|
76
|
+
finds installed, the hooks in a repository. `--dry-run` prints every change and writes
|
|
77
|
+
nothing. Exit status: 0 set up and checked, 1 a step or a check failed, 2 it could not run.
|
|
78
|
+
|
|
79
|
+
### radical setup --status
|
|
80
|
+
|
|
81
|
+
Checks what an agent needs to work on a model folder, and changes nothing:
|
|
82
|
+
|
|
83
|
+
```sh
|
|
84
|
+
npx @radicaltools/cli setup --status architecture
|
|
85
|
+
sh radical.sh setup --status # through the launcher
|
|
86
|
+
```
|
|
87
|
+
|
|
88
|
+
It reports Node and the CLI's version; whether the folder reads as a model and the git
|
|
89
|
+
hooks save its base; every agent configuration that holds a Radical MCP server, with the
|
|
90
|
+
folder it serves, a command or folder that is not there, and a server pinned to another
|
|
91
|
+
version than the CLI's; then it starts each server configured for the folder, with the
|
|
92
|
+
agent's own command, arguments and environment, and asks it for `get_model_summary`
|
|
93
|
+
over stdio. `--no-start` only reads the configurations; `--timeout <s>` (default 120,
|
|
94
|
+
as npx may download the package first) limits each server. Without a folder it checks
|
|
95
|
+
the working directory, or `architecture` in it, when it holds a model, else every Radical
|
|
96
|
+
server configured. `--status` takes no option that would change something.
|
|
97
|
+
Exit status: 0 nothing is broken (warnings, marked `!`, allowed), 1 something is
|
|
98
|
+
(marked `✗`), 2 it could not run.
|
|
99
|
+
|
|
100
|
+
## radical export confluence
|
|
101
|
+
|
|
102
|
+
Export a particular wiki view from a Radical Markdown model folder. The full
|
|
103
|
+
view is exported, including its filter chain (for example, requirements with
|
|
104
|
+
their verifying scenarios), readable requirement sentences, Markdown fields
|
|
105
|
+
and links between elements. The last focused page and Single/Multi page reading
|
|
106
|
+
mode do not truncate the export. Local exports are complete documents.
|
|
107
|
+
Publishing defaults to a **page tree**: a landing page, requirement pages,
|
|
108
|
+
then their verifying scenario pages (or the selected view's own hierarchy).
|
|
109
|
+
A shared element has one page beneath its first parent and links from every
|
|
110
|
+
other parent. `--structure document` publishes one document instead.
|
|
111
|
+
|
|
112
|
+
Studio and the CLI use the same pure `@radical/common/wikiDocument` content
|
|
113
|
+
builder for view scope, hierarchy, visible fields, requirement prose and
|
|
114
|
+
relationships. React renders editors; the CLI serializes the document and
|
|
115
|
+
publishes it through the Confluence adapter.
|
|
116
|
+
|
|
117
|
+
Find a view and preview it without Confluence credentials:
|
|
118
|
+
|
|
119
|
+
```sh
|
|
120
|
+
radical export confluence architecture --list-views
|
|
121
|
+
radical export confluence architecture --view "Specification" --format html --output wiki-preview.html
|
|
122
|
+
radical export confluence architecture --view "Specification" --format markdown --output wiki.md
|
|
123
|
+
```
|
|
124
|
+
|
|
125
|
+
`--view` accepts an exact view ID or an unambiguous name. `--format storage`
|
|
126
|
+
(the default) produces Confluence storage XHTML; `markdown` produces a portable
|
|
127
|
+
document and `html` a standalone browser preview. Without `--output`, local
|
|
128
|
+
exports go to stdout. Output files must be outside the model folder; existing
|
|
129
|
+
files are never overwritten. `--source-url` adds a link back to the source
|
|
130
|
+
model or Studio wiki, and `--title` overrides the document/page title.
|
|
131
|
+
|
|
132
|
+
To publish to Confluence Cloud, set `CONFLUENCE_URL`, `CONFLUENCE_EMAIL` and
|
|
133
|
+
`CONFLUENCE_API_TOKEN` in your shell or CI secret environment, then run:
|
|
134
|
+
|
|
135
|
+
```sh
|
|
136
|
+
radical export confluence architecture --view "Specification" --publish --space-id 123 --parent-id 456
|
|
137
|
+
```
|
|
138
|
+
|
|
139
|
+
Use the numeric space ID, not its key. `--parent-id` is optional. `--url` can
|
|
140
|
+
override `CONFLUENCE_URL`; use a site URL such as `https://company.atlassian.net`
|
|
141
|
+
or `https://company.atlassian.net/wiki`. Use an Atlassian API token suitable
|
|
142
|
+
for basic authentication at that site and an account that can read and
|
|
143
|
+
create/update pages in the space.
|
|
144
|
+
|
|
145
|
+
To use a token kept under another environment variable name, add
|
|
146
|
+
`--token-env TEST_WORKSPACE_ATTLASIAN_KEY` (or your chosen variable name).
|
|
147
|
+
|
|
148
|
+
The command creates a landing page with the wiki's name, then finds and
|
|
149
|
+
refreshes it on subsequent runs. Every element page carries its own export
|
|
150
|
+
marker. Stable element-to-page IDs live in small content-property buckets
|
|
151
|
+
on the landing page, so renames preserve page IDs and publication can resume
|
|
152
|
+
on another computer. Publication first creates or recovers every destination,
|
|
153
|
+
preserving existing bodies and marking new pages as publication in progress.
|
|
154
|
+
Once all destinations exist, it fills their linked content and writes the
|
|
155
|
+
landing page last. Up to four writes run concurrently, with checkpoints
|
|
156
|
+
between batches. A failed run prints the landing page ID for resuming with
|
|
157
|
+
`--page-id 789`. A title collision with a handwritten page fails without
|
|
158
|
+
changing it. Updates verify ownership, use the current Confluence version
|
|
159
|
+
and report concurrent-edit conflicts. Rate-limit responses get bounded retries;
|
|
160
|
+
uncertain network failures are not retried automatically.
|
|
161
|
+
|
|
162
|
+
To move an existing managed export under another page, pass its root page
|
|
163
|
+
ID with `--parent-id`; its children follow it:
|
|
164
|
+
|
|
165
|
+
```sh
|
|
166
|
+
radical export confluence architecture --view "Specification" --publish --page-id 789 --parent-id 456
|
|
167
|
+
```
|
|
168
|
+
|
|
169
|
+
Use a destination parent in the same Confluence space. Changing the view's
|
|
170
|
+
hierarchy also moves its managed element pages on the next publication.
|
|
171
|
+
Elements removed from the view are reported and their old pages are retained.
|
|
172
|
+
|
|
173
|
+
**Radical remains the source of truth.** Publishing replaces the managed
|
|
174
|
+
page's body, including edits made to that body in Confluence. It does not
|
|
175
|
+
import Confluence changes, write source model files, or delete pages. A
|
|
176
|
+
source-of-truth notice and optional source link sit at the bottom of every
|
|
177
|
+
exported page, in a native Confluence Info panel (a note in HTML previews and
|
|
178
|
+
a blockquote in Markdown). Unchanged element pages
|
|
179
|
+
are skipped when their source hash and published Confluence version match.
|
|
180
|
+
Exports made by the earlier single-pass publisher are refreshed once to resolve
|
|
181
|
+
their forward links before unchanged pages can be skipped again.
|
|
182
|
+
Switching from tree to document leaves previously published child pages in
|
|
183
|
+
place. Absolute HTTP(S) image URLs are preserved; local
|
|
184
|
+
images and interactive mockup wireframes are not uploaded, and the command
|
|
185
|
+
reports unsupported assets. Data Center is not supported in this version.
|
|
186
|
+
|
|
187
|
+
Exit status: 0 exported/published, 2 could not export/publish. Credentials
|
|
188
|
+
are not accepted as command-line arguments or included in error output.
|
|
189
|
+
The transport follows Atlassian's [Cloud page API](https://developer.atlassian.com/cloud/confluence/rest/v2/api-group-page/).
|
|
190
|
+
|
|
21
191
|
## radical diff
|
|
22
192
|
|
|
23
193
|
```sh
|
|
@@ -61,9 +231,13 @@ radical hooks install path/to/model
|
|
|
61
231
|
|
|
62
232
|
Adds one marked line to the repository's `post-checkout`, `post-commit`,
|
|
63
233
|
`post-merge` and `post-rewrite` hooks that runs `radical diff <folder> --save-base --quiet`, so
|
|
64
|
-
the base Studio compares with follows the branch checked out.
|
|
65
|
-
|
|
66
|
-
|
|
234
|
+
the base Studio compares with follows the branch checked out. The line goes
|
|
235
|
+
right after the hook's `#!` line, where an `exit` or `exec` further down
|
|
236
|
+
cannot skip it; what the hooks already do stays. Each model folder of the
|
|
237
|
+
repository has a line of its own, a second install adds nothing (or brings
|
|
238
|
+
the line up to date when the CLI or node moved), and the line never fails
|
|
239
|
+
the git command. A hook written in another language than sh (Python, say)
|
|
240
|
+
is left as it is: the command exits 2 and says what to call from it.
|
|
67
241
|
It runs the CLI that installed it, with the `node` on the PATH, else the one
|
|
68
242
|
that installed it. In this repository `npm run hooks` builds the CLI,
|
|
69
243
|
installs the hooks for `architecture/` and saves its base once.
|
|
@@ -112,7 +286,9 @@ rules by id, or one kind of metamodel issue by `metamodel/<code>`:
|
|
|
112
286
|
With `max`, up to that many findings pass as warnings and one more fails the
|
|
113
287
|
check, so an existing model can adopt a rule before every gap is closed.
|
|
114
288
|
`--ratchet` lowers each `max` to the count found now and writes the config
|
|
115
|
-
back; it never raises one.
|
|
289
|
+
back; it never raises one. A rule that did not run keeps its `max`: the
|
|
290
|
+
`test-*` rules without `--report` (the output marks them `–` and "not run"),
|
|
291
|
+
every rule but the folder's when the folder is no model.
|
|
116
292
|
|
|
117
293
|
### Goals
|
|
118
294
|
|
|
@@ -197,6 +373,134 @@ quality and Implementation show the result by dimension, and Settings edit
|
|
|
197
373
|
`check.json` (goals, severities, baselines), marking a change that loosens
|
|
198
374
|
the gate.
|
|
199
375
|
|
|
376
|
+
## radical fuzz
|
|
377
|
+
|
|
378
|
+
Runs a project's fuzz files (Radical Crucible): tests that do random sequences
|
|
379
|
+
of actions to a system and check its rules after every step. `crucible.json`
|
|
380
|
+
in the working directory lists them, and the folder findings go to:
|
|
381
|
+
|
|
382
|
+
```json
|
|
383
|
+
{
|
|
384
|
+
"findings": "crucible/findings",
|
|
385
|
+
"fuzz": [{ "file": "packages/ui/tests/invariants.test.ts", "cwd": "packages/ui" }]
|
|
386
|
+
}
|
|
387
|
+
```
|
|
388
|
+
|
|
389
|
+
Each file runs with `npx vitest run <file>` in its `cwd`, or with its own
|
|
390
|
+
`command` (a list). Paths are from the folder `crucible.json` is in.
|
|
391
|
+
|
|
392
|
+
```sh
|
|
393
|
+
radical fuzz # plan ci: each file's fixed seeds and runs
|
|
394
|
+
radical fuzz night # a random seed and 2000 runs of each world
|
|
395
|
+
radical fuzz --world bookstore --runs 300 --seed 7
|
|
396
|
+
radical fuzz night --survey # record each new failure as a finding
|
|
397
|
+
radical fuzz --replay F-0003 # run a finding again
|
|
398
|
+
radical fuzz --report reports # a Vitest JSON report per file, for radical check
|
|
399
|
+
```
|
|
400
|
+
|
|
401
|
+
`--survey` goes on after each failure and writes each one whose signature (its
|
|
402
|
+
rule, its last action and the shape of what differs, with the ids taken out) no
|
|
403
|
+
finding has yet as `crucible/findings/F-NNNN.md`, status `open`, with the
|
|
404
|
+
world, seed, path and length that replay it, the steps and what differs.
|
|
405
|
+
`--no-known` lets the fuzz files' known failures filter nothing, `--no-shrink`
|
|
406
|
+
reports the first failure as found.
|
|
407
|
+
|
|
408
|
+
A fuzz file is written with the engine, `@radical/crucible`, which is not
|
|
409
|
+
published yet: so far the fuzz files are this repository's own
|
|
410
|
+
(`packages/ui/tests/invariants.test.ts`). It reports a test case per world and
|
|
411
|
+
one per world and rule (`on the bookstore model: undoRestores holds`), which a
|
|
412
|
+
scenario or a fitness function can name in its Tests.
|
|
413
|
+
|
|
414
|
+
Exit status: 0 every file passed, 1 one failed, 2 radical fuzz could not run.
|
|
415
|
+
|
|
416
|
+
## radical harden
|
|
417
|
+
|
|
418
|
+
Turns a finding into a test bound to the model (Radical Crucible).
|
|
419
|
+
|
|
420
|
+
```sh
|
|
421
|
+
radical harden F-0003 --scenario "Undo is exact"
|
|
422
|
+
radical harden --gate F-0003
|
|
423
|
+
radical harden --gate --test "apps/e2e/tests/studio/views.spec.ts › a view keeps its places" --base main --runs 5
|
|
424
|
+
```
|
|
425
|
+
|
|
426
|
+
A fuzz finding is hardened by its own steps: the finding is marked `hardened`,
|
|
427
|
+
and its fuzz file replays the shrunk sequence as the test
|
|
428
|
+
`<fuzz file> › F-0003 stays fixed: <title>`, once and without the known
|
|
429
|
+
failures, so it fails until the bug is fixed. The command prints that test id
|
|
430
|
+
for the scenario's Tests and keeps the scenario's name in the finding; it does
|
|
431
|
+
not change the model's files.
|
|
432
|
+
|
|
433
|
+
`--gate` checks a test before it is bound: with the source files changed since
|
|
434
|
+
the base (default: the merge base with `origin/main`) set back to it, the test
|
|
435
|
+
must fail; put back, it must pass; and it must pass `--runs` runs at once
|
|
436
|
+
(default 5). Tests, findings and `crucible.json` are not set back, and the
|
|
437
|
+
working tree is left as it was (files are copied aside, never stashed), also
|
|
438
|
+
when the gate is interrupted: Ctrl+C, `kill` or a closed terminal stops the
|
|
439
|
+
test, puts the changed files back and ends with exit status 2. A test
|
|
440
|
+
runs through the runner `crucible.json` gives for its folder, else with
|
|
441
|
+
`npx vitest run <file> -t <name>` in the file's package:
|
|
442
|
+
|
|
443
|
+
```json
|
|
444
|
+
{ "runners": [{ "files": "apps/e2e/", "cwd": "apps/e2e",
|
|
445
|
+
"command": ["npx", "playwright", "test", "{file}", "-g", "{name}", "--reporter", "line"],
|
|
446
|
+
"build": [["npm", "run", "build:web"], ["npm", "run", "build:hub"]],
|
|
447
|
+
"repeat": ["npx", "playwright", "test", "{file}", "-g", "{name}",
|
|
448
|
+
"--repeat-each", "{runs}", "--workers", "{runs}", "--reporter", "line"] }] }
|
|
449
|
+
```
|
|
450
|
+
|
|
451
|
+
A runner's `build` (commands run from `crucible.json`'s folder) is made before
|
|
452
|
+
the run without the fix and before the run with it, so a test of a build (an
|
|
453
|
+
e2e test) runs on what the files are at each step; its `repeat` (with
|
|
454
|
+
`{runs}`) makes the runs at once one run of that command, for runs that
|
|
455
|
+
cannot go side by side (web servers on fixed ports). `--test` takes the
|
|
456
|
+
test's title with its describe blocks (`"<file> › <describe> › <name>"`);
|
|
457
|
+
Vitest and Playwright get the parts joined by spaces, as they match them.
|
|
458
|
+
|
|
459
|
+
Exit status: 0 done (the gate passed), 1 the gate failed, 2 radical harden
|
|
460
|
+
could not run or was interrupted.
|
|
461
|
+
|
|
462
|
+
## radical explore
|
|
463
|
+
|
|
464
|
+
An exploratory round (Radical Crucible): agents look for bugs no test
|
|
465
|
+
describes, each run in its own area. `radical explore` prepares the round and
|
|
466
|
+
checks what comes back; a coding agent's session starts the agents.
|
|
467
|
+
|
|
468
|
+
```sh
|
|
469
|
+
radical explore prepare --runs 5 --areas "layout under edits; milestones and undo"
|
|
470
|
+
radical explore verify 70 "f1-row.mjs 2" "f2-undo.mjs"
|
|
471
|
+
radical explore record .crucible/rounds/round-70-74/run-70/REPORT.md
|
|
472
|
+
```
|
|
473
|
+
|
|
474
|
+
`prepare` builds the project once, copies what the runs need into
|
|
475
|
+
`.crucible/rounds/round-<from>-<to>/build`, and gives each run a folder, its
|
|
476
|
+
ports (`<ports>+NN`, `+100+NN`, `+200+NN`) and a `PROMPT.md` with its area;
|
|
477
|
+
`BRIEF.md` names the commit, the commits and the model elements changed since
|
|
478
|
+
the last round (by area), the open findings, the setup, the rules and the
|
|
479
|
+
report's JSON form. `--since`, `--from` and `--no-build` change what it
|
|
480
|
+
counts from, the first run's number and whether it builds. The brief asks
|
|
481
|
+
that scripts name no absolute path (they find the repository by walking up to
|
|
482
|
+
`crucible.json`), since a finding's script is copied out of the round.
|
|
483
|
+
`verify` serves a run's build on its ports (each server `serve` lists, on the
|
|
484
|
+
run's port it names: `app`, `hub` or `other`), runs its scripts from its
|
|
485
|
+
folder and stops the servers. `record` writes a report's findings (`open`, or
|
|
486
|
+
`question`) with copies of their scripts and of the screenshot each names,
|
|
487
|
+
and warns about a copied script that names the repository's or the round's
|
|
488
|
+
absolute paths.
|
|
489
|
+
|
|
490
|
+
```json
|
|
491
|
+
{ "explore": {
|
|
492
|
+
"rounds": ".crucible/rounds", "brief": "docs/EXPLORATORY-TESTING.md",
|
|
493
|
+
"known": ["docs/IMPROVEMENTS.md"], "model": "architecture",
|
|
494
|
+
"build": [["npm", "run", "build:web"]],
|
|
495
|
+
"copy": { "renderer": "apps/studio/out/renderer" },
|
|
496
|
+
"serve": [
|
|
497
|
+
{ "cwd": "apps/studio", "command": ["npx", "vite", "preview", "--port", "{port}", "--strictPort", "--outDir", "{build}/renderer"] },
|
|
498
|
+
{ "cwd": "apps/hub", "command": ["npx", "vite", "preview", "--port", "{hubPort}", "--strictPort", "--outDir", "{build}/hub"], "port": "hub" } ],
|
|
499
|
+
"ports": 4500, "rules": ["…"] } }
|
|
500
|
+
```
|
|
501
|
+
|
|
502
|
+
Exit status: 0 done, 2 radical explore could not run.
|
|
503
|
+
|
|
200
504
|
## Publishing (maintainers)
|
|
201
505
|
|
|
202
506
|
The public npm package is `@radicaltools/cli`. Its private `@radical/*`
|
|
@@ -223,7 +527,7 @@ organization, then publish the verified first-release tarball:
|
|
|
223
527
|
```sh
|
|
224
528
|
npm login --auth-type=web
|
|
225
529
|
npm whoami
|
|
226
|
-
npm publish ./release/radicaltools-cli-0.
|
|
530
|
+
npm publish ./release/radicaltools-cli-0.2.0.tgz --access public
|
|
227
531
|
```
|
|
228
532
|
|
|
229
533
|
Complete npm's browser and 2FA prompts. When publishing directly from the
|
|
@@ -232,11 +536,11 @@ workspace, `prepublishOnly` runs the type check, unit tests and package check;
|
|
|
232
536
|
already verified tarball uploads that exact archive. The monorepo root and
|
|
233
537
|
the shared workspaces remain private.
|
|
234
538
|
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
539
|
+
The CLI shares one product version with the MCP server, the Desktop app and
|
|
540
|
+
the VS Code extension: set it for all of them with `npm run release` (see
|
|
541
|
+
*Releasing* in the root README), never in this workspace alone. `radical
|
|
542
|
+
--version` prints it, with the commit it was built from unless the build is the
|
|
543
|
+
release tagged `v<version>`.
|
|
240
544
|
|
|
241
545
|
Each package version can be published only once. After the first publish,
|
|
242
546
|
the npm organization's team settings can grant the `developers` team
|
|
@@ -244,31 +548,37 @@ read/write access to `@radicaltools/cli`.
|
|
|
244
548
|
|
|
245
549
|
### GitHub Actions with Trusted Publishing
|
|
246
550
|
|
|
247
|
-
The **Publish
|
|
248
|
-
|
|
551
|
+
The shared **Publish to npm** workflow (`.github/workflows/npm-publish.yml`)
|
|
552
|
+
publishes either CLI or MCP. After `@radicaltools/cli` exists on npm,
|
|
249
553
|
open its **Settings → Trusted publishing** and add GitHub Actions:
|
|
250
554
|
|
|
251
555
|
| Field | Value |
|
|
252
556
|
| --- | --- |
|
|
253
557
|
| Organization or user | `radicaltools` |
|
|
254
558
|
| Repository | `radical.tools` |
|
|
255
|
-
| Workflow filename | `
|
|
559
|
+
| Workflow filename | `npm-publish.yml` |
|
|
256
560
|
| Environment name | Leave empty |
|
|
257
561
|
| Allowed actions | Enable direct publishing with `npm publish` |
|
|
258
562
|
|
|
259
|
-
Configure this on
|
|
260
|
-
|
|
261
|
-
|
|
563
|
+
Configure this on each npm package that uses the workflow. If a trusted
|
|
564
|
+
publisher points at `cli-publish.yml` or `mcp-publish.yml`, replace it with
|
|
565
|
+
one using `npm-publish.yml` after merging this change. No npm token or GitHub
|
|
566
|
+
secret is needed. The workflow uses Node 24 and npm 11, with `id-token: write`
|
|
567
|
+
for its publish job.
|
|
568
|
+
Configure a new publisher when a release is ready: its first successful
|
|
569
|
+
publish must happen within two days; a dry run does not validate it.
|
|
262
570
|
See [npm's Trusted Publishing instructions](https://docs.npmjs.com/trusted-publishers/).
|
|
263
571
|
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
|
|
268
|
-
published once, so bump past any version already published locally.
|
|
269
|
-
|
|
270
|
-
The workflow type-checks and tests the monorepo, installs and checks the CLI
|
|
572
|
+
A release tag `v<version>` (see *Releasing* in the root README) starts the
|
|
573
|
+
workflow for the CLI and the MCP server together. It checks that the tagged
|
|
574
|
+
commit is on `main` and that the four released packages carry the tag's
|
|
575
|
+
version, type-checks and tests the monorepo, installs and checks the CLI
|
|
271
576
|
tarball outside the repository, uploads that archive as an artifact, and
|
|
272
|
-
publishes the same archive with provenance
|
|
273
|
-
|
|
577
|
+
publishes the same archive with provenance, on the dist-tag `next` for a
|
|
578
|
+
pre-release. A package version can only be published once; a version npm
|
|
579
|
+
already has is skipped, so a rerun publishes what is left.
|
|
580
|
+
|
|
581
|
+
To validate the archive without a release, use **Actions → Publish to npm →
|
|
582
|
+
Run workflow**, select `main`, choose **package: cli**, and leave **dry-run**
|
|
583
|
+
enabled. With **dry-run** disabled it publishes, but only from `main`.
|
|
274
584
|
|