@farthershore/cli 0.33.4 → 0.33.6
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 +49 -8
- package/dist/index.js +118 -90
- package/dist/mcp.js +89 -60
- package/package.json +6 -5
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.6`.** 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.6
|
|
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.6 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.6 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
|
|
|
@@ -556,7 +591,13 @@ Bootstrap and rotation return a key once. `login` sends the 60-second,
|
|
|
556
591
|
single-use handoff only in the browser URL fragment to the platform-owned
|
|
557
592
|
`/persona-sign-in` bridge. The bridge establishes an HttpOnly browser session
|
|
558
593
|
and returns to the exact original portal path, query, and fragment. CLI output
|
|
559
|
-
contains portal metadata but never the handoff or a session bearer.
|
|
594
|
+
contains portal metadata but never the handoff or a session bearer. `login`
|
|
595
|
+
emits `opened: true` only after the system browser launcher (`open` /
|
|
596
|
+
`xdg-open`) has exited successfully, so the URL has been handed off before the
|
|
597
|
+
command returns; a launcher failure is reported as an error. The wait is capped
|
|
598
|
+
at 20 seconds: a launcher still running then (for example `xdg-open` running
|
|
599
|
+
the browser in the foreground) is detached, and `login` emits `opened: false`
|
|
600
|
+
with a stderr notice instead of hanging until the browser closes. Product
|
|
560
601
|
role keys must already exist in that subscriber's role catalog; omit `--role` to use its
|
|
561
602
|
configured default. Deletion tears down the temporary user and credential, and
|
|
562
603
|
deleting the environment also removes the remaining persona-owned workspace.
|
|
@@ -739,18 +780,18 @@ Use `--all-plans` to clear plan scoping.
|
|
|
739
780
|
Install or refresh the platform-verified skills bundle together. The platform
|
|
740
781
|
pins this immutable release, and CI plus a daily repository check compare it to
|
|
741
782
|
GitHub's latest stable release so the guidance cannot silently drift.
|
|
742
|
-
This command requires `@farthershore/cli` 0.33.
|
|
783
|
+
This command requires `@farthershore/cli` 0.33.6 or newer.
|
|
743
784
|
|
|
744
785
|
```bash
|
|
745
786
|
set -euo pipefail
|
|
746
787
|
CLI_VERSION=$(farthershore --version)
|
|
747
|
-
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] >=
|
|
788
|
+
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] >= 6))) { console.error("Stop: CLI 0.33.6 or newer is required; ask the human to upgrade."); process.exitCode = 1; } })'
|
|
748
789
|
farthershore skills install --help
|
|
749
790
|
farthershore skills install
|
|
750
791
|
```
|
|
751
792
|
|
|
752
793
|
If either prerequisite fails, stop and ask the human to run
|
|
753
|
-
`npm install -g @farthershore/cli@0.33.
|
|
794
|
+
`npm install -g @farthershore/cli@0.33.6`, then repeat the checks.
|
|
754
795
|
Do not install or upgrade global tooling autonomously.
|
|
755
796
|
|
|
756
797
|
The Farther Shore CLI downloads the exact installer archive and verifies this
|