@farthershore/cli 0.33.3 → 0.33.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/README.md +67 -11
- package/dist/index.js +162 -104
- package/dist/mcp.js +88 -60
- package/package.json +4 -3
package/README.md
CHANGED
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
Create and operate [FartherShore](https://farthershore.com) software businesses
|
|
4
4
|
from the terminal.
|
|
5
5
|
|
|
6
|
-
**Status: `0.33.
|
|
6
|
+
**Status: `0.33.5`.** Pre-1.0 — the command surface is stable but may still
|
|
7
7
|
change between minor versions. Pin an exact version in CI.
|
|
8
8
|
|
|
9
9
|
FartherShore lets you define a software business as code, then sells, meters,
|
|
@@ -21,19 +21,19 @@ the explicitly agent-operable subset of the CLI surface.
|
|
|
21
21
|
## Install
|
|
22
22
|
|
|
23
23
|
```bash
|
|
24
|
-
npm install -g @farthershore/cli@0.33.
|
|
24
|
+
npm install -g @farthershore/cli@0.33.5
|
|
25
25
|
```
|
|
26
26
|
|
|
27
27
|
Or run it directly with npx:
|
|
28
28
|
|
|
29
29
|
```bash
|
|
30
|
-
npx -p @farthershore/cli@0.33.
|
|
30
|
+
npx -p @farthershore/cli@0.33.5 farthershore --help
|
|
31
31
|
```
|
|
32
32
|
|
|
33
33
|
The package also ships an MCP stdio server for agents:
|
|
34
34
|
|
|
35
35
|
```bash
|
|
36
|
-
npx -p @farthershore/cli@0.33.
|
|
36
|
+
npx -p @farthershore/cli@0.33.5 farthershore-mcp
|
|
37
37
|
```
|
|
38
38
|
|
|
39
39
|
## Authentication
|
|
@@ -140,6 +140,31 @@ write commands cover **operational** state that lives outside the manifest
|
|
|
140
140
|
| `FARTHERSHORE_CONSUMER_TOKEN` | Ephemeral portal consumer session for `service-account`; never persisted |
|
|
141
141
|
| `FARTHERSHORE_ENVIRONMENT_ID` | Portal environment UUID fallback for `service-account` |
|
|
142
142
|
| `FARTHERSHORE_SUBSCRIBER_ORGANIZATION_ID` | Subscriber organization UUID fallback for `service-account` |
|
|
143
|
+
| `FS_CLI_CHANNEL` | `stage` enables stage-channel commands for one invocation (see below) |
|
|
144
|
+
| `FS_CLI_STAGE_HOSTS` | Extra hosts (comma separated) the stage-channel gate treats as stage |
|
|
145
|
+
|
|
146
|
+
## Stage-channel commands
|
|
147
|
+
|
|
148
|
+
A few operations exist only to service stage. `farthershore business delete` is
|
|
149
|
+
the only one today: deleting a business is unrecoverable, and there is no
|
|
150
|
+
builder reason to do it from a terminal against production — the dashboard owns
|
|
151
|
+
that path.
|
|
152
|
+
|
|
153
|
+
They are gated twice:
|
|
154
|
+
|
|
155
|
+
1. **Registration.** The command is registered only when the CLI runs in the
|
|
156
|
+
stage channel. `make cli-stage` writes `{"channel":"stage"}` into
|
|
157
|
+
`~/.farthershore/config.json` (`make cli-prod` writes `"prod"`), and
|
|
158
|
+
`FS_CLI_CHANNEL=stage` does the same for a single invocation. Without the
|
|
159
|
+
marker the command is **absent from `farthershore business --help`** and
|
|
160
|
+
invoking it is an unknown-command error — so the published CLI, as a builder
|
|
161
|
+
installs it, does not have it at all.
|
|
162
|
+
2. **Target.** Even in the stage channel, the command refuses when the api-url
|
|
163
|
+
it would call is not a stage host — `--api-url https://core.farthershore.com`,
|
|
164
|
+
or `FARTHERSHORE_API_URL` pointed at production. It exits **2** with
|
|
165
|
+
`COMMAND_NOT_AVAILABLE_IN_PRODUCTION` before any request is made.
|
|
166
|
+
|
|
167
|
+
Delete a production business from the dashboard instead.
|
|
143
168
|
|
|
144
169
|
## Commands
|
|
145
170
|
|
|
@@ -253,6 +278,16 @@ farthershore business create weather-api \
|
|
|
253
278
|
|
|
254
279
|
farthershore business publish weather-api --format json --idempotency-key <persisted-business-publish-attempt-key>
|
|
255
280
|
farthershore business rollback weather-api wfe_previous --reason "bad release" --format json --idempotency-key <persisted-business-rollback-attempt-key>
|
|
281
|
+
```
|
|
282
|
+
|
|
283
|
+
Deleting a business is **stage only** — the command is not registered in the
|
|
284
|
+
published CLI at all (see [Stage-channel commands](#stage-channel-commands)).
|
|
285
|
+
Run `make cli-stage` first; production businesses are deleted from the
|
|
286
|
+
dashboard.
|
|
287
|
+
|
|
288
|
+
<!-- cli-channel: stage -->
|
|
289
|
+
|
|
290
|
+
```bash
|
|
256
291
|
farthershore business delete weather-api --yes --format json
|
|
257
292
|
```
|
|
258
293
|
|
|
@@ -509,7 +544,25 @@ farthershore frontend dev # hot-reloading dev server,
|
|
|
509
544
|
farthershore frontend preview # production build served as-is, mock mode by default
|
|
510
545
|
farthershore frontend dev --live # against the real platform
|
|
511
546
|
farthershore frontend preview --core-url http://localhost:8787
|
|
512
|
-
|
|
547
|
+
|
|
548
|
+
# Local preview signed in as a test persona (hot reload against the real platform)
|
|
549
|
+
farthershore frontend dev --live --business acme --env preview --persona alice
|
|
550
|
+
farthershore frontend dev --live --business acme --env preview --persona persona_123 --port 4321
|
|
551
|
+
```
|
|
552
|
+
|
|
553
|
+
`--live --business --env --persona` (all three required, not combinable with
|
|
554
|
+
`--mock` or `--core-url`) opens `http://localhost:<port>` (default 5173)
|
|
555
|
+
already signed in as that test persona, exactly as the hosted portal would
|
|
556
|
+
be. The CLI issues a short-lived, origin-bound preview lease from Core and
|
|
557
|
+
holds it only in its own process memory; Vite runs on a private random
|
|
558
|
+
loopback port behind a CLI-owned proxy that attaches the lease to portal
|
|
559
|
+
requests and serves the secret-free sign-in bridge. Nothing secret ever
|
|
560
|
+
reaches the browser URL, DOM, storage, or logs — the browser only ever holds
|
|
561
|
+
the same HttpOnly session cookie the hosted portal uses. The lease renews
|
|
562
|
+
automatically while the command runs and is revoked when it exits (Ctrl-C
|
|
563
|
+
included); a lease that cannot be revoked expires within five minutes. Core
|
|
564
|
+
is always the one selected for the authenticated CLI (`--api-url` /
|
|
565
|
+
`FARTHERSHORE_API_URL`).
|
|
513
566
|
|
|
514
567
|
### `farthershore persona`
|
|
515
568
|
|
|
@@ -534,9 +587,12 @@ farthershore persona rotate weather-api <personaId> --env preview --format json
|
|
|
534
587
|
farthershore persona delete weather-api <personaId> --env preview --format json
|
|
535
588
|
```
|
|
536
589
|
|
|
537
|
-
Bootstrap and rotation return a key once. `login`
|
|
538
|
-
|
|
539
|
-
|
|
590
|
+
Bootstrap and rotation return a key once. `login` sends the 60-second,
|
|
591
|
+
single-use handoff only in the browser URL fragment to the platform-owned
|
|
592
|
+
`/persona-sign-in` bridge. The bridge establishes an HttpOnly browser session
|
|
593
|
+
and returns to the exact original portal path, query, and fragment. CLI output
|
|
594
|
+
contains portal metadata but never the handoff or a session bearer. Product
|
|
595
|
+
role keys must already exist in that subscriber's role catalog; omit `--role` to use its
|
|
540
596
|
configured default. Deletion tears down the temporary user and credential, and
|
|
541
597
|
deleting the environment also removes the remaining persona-owned workspace.
|
|
542
598
|
After an environment-branch apply, existing personas remain available but are
|
|
@@ -718,18 +774,18 @@ Use `--all-plans` to clear plan scoping.
|
|
|
718
774
|
Install or refresh the platform-verified skills bundle together. The platform
|
|
719
775
|
pins this immutable release, and CI plus a daily repository check compare it to
|
|
720
776
|
GitHub's latest stable release so the guidance cannot silently drift.
|
|
721
|
-
This command requires `@farthershore/cli` 0.33.
|
|
777
|
+
This command requires `@farthershore/cli` 0.33.5 or newer.
|
|
722
778
|
|
|
723
779
|
```bash
|
|
724
780
|
set -euo pipefail
|
|
725
781
|
CLI_VERSION=$(farthershore --version)
|
|
726
|
-
printf '%s' "$CLI_VERSION" | node -e 'let v=""; process.stdin.on("data", c => v += c).on("end", () => { const m = /^(0|[1-9][0-9]*)\.(0|[1-9][0-9]*)\.(0|[1-9][0-9]*)(?:\+[0-9A-Za-z.-]+)?$/.exec(v.trim()); if (!m || !(+m[1] > 0 || +m[2] > 33 || (+m[2] === 33 && +m[3] >=
|
|
782
|
+
printf '%s' "$CLI_VERSION" | node -e 'let v=""; process.stdin.on("data", c => v += c).on("end", () => { const m = /^(0|[1-9][0-9]*)\.(0|[1-9][0-9]*)\.(0|[1-9][0-9]*)(?:\+[0-9A-Za-z.-]+)?$/.exec(v.trim()); if (!m || !(+m[1] > 0 || +m[2] > 33 || (+m[2] === 33 && +m[3] >= 5))) { console.error("Stop: CLI 0.33.5 or newer is required; ask the human to upgrade."); process.exitCode = 1; } })'
|
|
727
783
|
farthershore skills install --help
|
|
728
784
|
farthershore skills install
|
|
729
785
|
```
|
|
730
786
|
|
|
731
787
|
If either prerequisite fails, stop and ask the human to run
|
|
732
|
-
`npm install -g @farthershore/cli@0.33.
|
|
788
|
+
`npm install -g @farthershore/cli@0.33.5`, then repeat the checks.
|
|
733
789
|
Do not install or upgrade global tooling autonomously.
|
|
734
790
|
|
|
735
791
|
The Farther Shore CLI downloads the exact installer archive and verifies this
|