@farthershore/cli 0.33.4 → 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 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.4`.** Pre-1.0 — the command surface is stable but may still
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.4
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.4 farthershore --help
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.4 farthershore-mcp
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
 
@@ -739,18 +774,18 @@ Use `--all-plans` to clear plan scoping.
739
774
  Install or refresh the platform-verified skills bundle together. The platform
740
775
  pins this immutable release, and CI plus a daily repository check compare it to
741
776
  GitHub's latest stable release so the guidance cannot silently drift.
742
- This command requires `@farthershore/cli` 0.33.4 or newer.
777
+ This command requires `@farthershore/cli` 0.33.5 or newer.
743
778
 
744
779
  ```bash
745
780
  set -euo pipefail
746
781
  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] >= 4))) { console.error("Stop: CLI 0.33.4 or newer is required; ask the human to upgrade."); process.exitCode = 1; } })'
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; } })'
748
783
  farthershore skills install --help
749
784
  farthershore skills install
750
785
  ```
751
786
 
752
787
  If either prerequisite fails, stop and ask the human to run
753
- `npm install -g @farthershore/cli@0.33.4`, then repeat the checks.
788
+ `npm install -g @farthershore/cli@0.33.5`, then repeat the checks.
754
789
  Do not install or upgrade global tooling autonomously.
755
790
 
756
791
  The Farther Shore CLI downloads the exact installer archive and verifies this