@farthershore/cli 0.35.0 → 0.37.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/CHANGELOG.md CHANGED
@@ -1,9 +1,98 @@
1
1
  # Changelog — @farthershore/cli
2
2
 
3
- All notable changes to the `farthershore` CLI and its MCP server
4
- (`farthershore-mcp`) are documented here. The CLI versions independently from
5
- the SDKs. Pre-1.0: minor versions may include breaking changes. Releases
6
- before 0.35.0 are recorded only in the git history.
3
+ All notable changes to the `farthershore` CLI are documented here. The CLI
4
+ versions independently from the SDKs. Pre-1.0: minor versions may include
5
+ breaking changes. Releases before 0.35.0 are recorded only in the git history.
6
+
7
+ ## [Unreleased]
8
+
9
+ ## [0.37.0] - 2026-10-14
10
+
11
+ ### Changed
12
+
13
+ - `business status` reports `serving` (`status`, `coherent`, `message`) in
14
+ place of `edgeCoherence` (no generations, epochs or digests), and
15
+ `latestDeployment.publishStatus` in place of `edgePublishStatus`.
16
+ `business routes` lists each route once (no compiled row id);
17
+ `business contract` and `business config-attempts` print the closed public
18
+ shapes (no raw proposal text or payload). `validate --business` no longer
19
+ echoes the server's spec hash; a failure's `irHash` is the locally built IR's.
20
+ - `auth whoami` no longer prints a maker token's `authVersion` or a dashboard
21
+ session's identity-provider user id.
22
+ - `agents`, `bulletin`, `automation`, `knowledge`, `resource-count`,
23
+ `denial`, `dependents` and `workflow-control` print the closed public
24
+ shapes: an agent run names a failure by code with a fixed message and
25
+ carries no trace object key; a denial carries no internal decision or ledger
26
+ ids; a rollback preview reports `currentCommitSha`.
27
+ - The webhook commands print only the public webhook fields. Every endpoint
28
+ result carries the same fields (`failCount`, `disabledAt` and `updatedAt`
29
+ included); the signing secret appears only in `webhook create`,
30
+ `webhook rotate` and `webhook listen --print-secret`. A delivery's
31
+ `status` is `pending`, `success`, `failed` or `dead`, and `webhook test` /
32
+ `webhook trigger` results (and their `WEBHOOK_DELIVERY_FAILED` /
33
+ `WEBHOOK_REDIRECTED` errors) carry `deliveryId`, null when the attempt
34
+ could not be recorded.
35
+ - New `webhook delivery <business> <webhookId> <deliveryId>` shows one
36
+ delivery's status, attempts and HTTP status.
37
+ - `analytics log` events carry `request` (path, status code, subscriber, deny
38
+ code, gateway / backend timing) instead of the raw archived `payload`.
39
+ `usage summary` reports `activeApiKeys` (was `activeRuntimeKeys`) and no
40
+ business id. `stripe status` no longer prints the Stripe account id, and
41
+ `source` reads `business` | `organization`. `tax-settings show|update` print
42
+ `{ status, defaults: { taxBehavior, taxCode }, headOffice, missingFields }`
43
+ instead of the payment provider's settings object. `plan list` reads the
44
+ plan's `kind` and `isActive`.
45
+ - `variables` mutations and `variables status` print the public operation
46
+ (no `mutationId`, `state` or `result`; `impact` is integrations and
47
+ subscriber count; a failed attempt shows fixed copy; `generation` is
48
+ `version`, also on `variables list`). `frontend status`
49
+ prints `activeReleaseId` and each build's `releaseId`; `frontend rollback`
50
+ prints the release now serving with its `environmentId`.
51
+
52
+ - `agreements`, `promo-code` and `persona` print the closed public shapes:
53
+ no payment-provider ids on promo codes, no plan-version, user or membership
54
+ ids on personas, and `agreements pins` names the plan by key and version.
55
+ - `apply-timeline list` / `inspect` print the public entry: no build id, IR
56
+ hash or internal trigger; apply phases are `publish` and `billing`, and a
57
+ failed platform step reads as a code plus the id to quote to support.
58
+ `proposal create|preview|list|get` print the public ChangeSet (no rollback
59
+ plan, correlation id or simulation fingerprint; `resetReason` replaces
60
+ `failureReason`), and `proposal create --dry-run` prints what it would record.
61
+ An unknown `--env` name on the `apply-timeline` and `proposal` commands now
62
+ fails with `ENVIRONMENT_NOT_FOUND` (apply-timeline used to show production
63
+ entries).
64
+ - `env create` prints the full environment (now including `portalHostname`)
65
+ with `created` and `branchCreated`, and says when the environment already
66
+ existed. A failed `env delete` reports which cleanup steps did not finish
67
+ (`runtime`, `docs`, `branch`) instead of the underlying error text.
68
+ - `backend list` prints each backend's `status` straight from the server; the
69
+ backend and runtime-token commands print only the public fields (a backend's
70
+ internal origin host and raw provisioning / readiness state are no longer
71
+ returned). `backend tokens create` / `rotate` results carry `envVar` and the
72
+ one-time `token` as the server returns them.
73
+ - `business show`, `business list` and the other business reads print only the
74
+ public business fields. Internal platform state the server used to include
75
+ (release and sync bookkeeping, accepted specs, frontend activation details,
76
+ …) is no longer returned.
77
+
78
+ ## [0.36.0] - 2026-10-13
79
+
80
+ ### Changed
81
+
82
+ - **Breaking:** `farthershore create api` is now `farthershore backend scaffold`
83
+ (same flags), so it no longer reads like `farthershore api`. The top-level
84
+ `create` group is gone, and its error codes are renamed from `CREATE_API_*`
85
+ to `BACKEND_SCAFFOLD_*` (for example `BACKEND_SCAFFOLD_EXISTS`).
86
+ - Every command calls the `@farthershore/client` operation surface directly;
87
+ command output and flags are unchanged.
88
+
89
+ ### Removed
90
+
91
+ - **Breaking:** the local stdio MCP server and its `farthershore-mcp` binary
92
+ are gone. MCP launch configurations that run `farthershore-mcp` (or
93
+ `npx -p @farthershore/cli farthershore-mcp`) stop working on upgrade. Use
94
+ `farthershore code run` or `farthershore api` from an agent until the hosted
95
+ MCP server ships.
7
96
 
8
97
  ## [0.35.0] - 2026-10-12
9
98
 
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.35.0`.** Pre-1.0 — the command surface is stable but may still
6
+ **Status: `0.37.0`.** 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,
@@ -15,25 +15,18 @@ This CLI is the tool layer around that repo: provision a managed business repo,
15
15
  validate it locally before you push, inspect publication state, and run
16
16
  day-to-day operations (consumers, secrets, backends, webhooks, promo codes,
17
17
  usage). It is designed to be safe for both humans and agents — every command
18
- takes `--format json` for non-interactive scripting, and the MCP server exposes
19
- the explicitly agent-operable subset of the CLI surface.
18
+ takes `--format json` for non-interactive scripting.
20
19
 
21
20
  ## Install
22
21
 
23
22
  ```bash
24
- npm install -g @farthershore/cli@0.35.0
23
+ npm install -g @farthershore/cli@0.37.0
25
24
  ```
26
25
 
27
26
  Or run it directly with npx:
28
27
 
29
28
  ```bash
30
- npx -p @farthershore/cli@0.35.0 farthershore --help
31
- ```
32
-
33
- The package also ships an MCP stdio server for agents:
34
-
35
- ```bash
36
- npx -p @farthershore/cli@0.35.0 farthershore-mcp
29
+ npx -p @farthershore/cli@0.37.0 farthershore --help
37
30
  ```
38
31
 
39
32
  ## Authentication
@@ -209,17 +202,17 @@ before pagination; the CLI does not sort or filter a partial page locally.
209
202
  Each command rejects fields outside its endpoint-specific allowlist shown by
210
203
  `--help`.
211
204
 
212
- ### `farthershore create`
205
+ ### `farthershore backend scaffold`
213
206
 
214
- Create local project components inside a managed builder repo. `create api`
215
- scaffolds a starter backend into `api/` by downloading the public Node template
216
- tarball, then patches the repo root `.gitignore`.
207
+ Scaffold a starter backend into `api/` inside a managed builder repo, by
208
+ downloading the public Node template tarball, then patch the repo root
209
+ `.gitignore`. It runs locally and needs no login.
217
210
 
218
211
  ```bash
219
- farthershore create api
220
- farthershore create api --path ../weather-api
221
- farthershore create api --force
222
- farthershore create api --node --ref v0.1.0 --format json
212
+ farthershore backend scaffold
213
+ farthershore backend scaffold --path ../weather-api
214
+ farthershore backend scaffold --force
215
+ farthershore backend scaffold --node --ref v0.1.0 --format json
223
216
  ```
224
217
 
225
218
  `--node` is the default language today: Node (TypeScript + Express). `--ref`
@@ -385,8 +378,7 @@ default, and `--org <id>` overrides it for one command.
385
378
 
386
379
  Create and administer organization-owned MakerTokens. These commands require a
387
380
  signed-in user CLI session (`farthershore login`); an existing MakerToken cannot
388
- list, mint, approve, rotate, revoke, or otherwise administer credentials. The
389
- entire group is CLI-only and is deliberately absent from `farthershore-mcp`.
381
+ list, mint, approve, rotate, revoke, or otherwise administer credentials.
390
382
 
391
383
  ```bash
392
384
  # Exact permissions a human may delegate — read this before choosing --permissions.
@@ -470,8 +462,8 @@ never print `plaintext`. ACTIVE creates
470
462
  and rotations print the one-time key once. If one of these commands times out,
471
463
  run `service-account list` before trying again.
472
464
 
473
- This group is direct CLI-only and deliberately has no MCP projection: the MCP
474
- operation registry carries builder principals, not portal consumer sessions.
465
+ This group is registered directly rather than through the operation registry:
466
+ that registry carries builder principals, not portal consumer sessions.
475
467
 
476
468
  ### `farthershore limit`
477
469
 
@@ -522,8 +514,17 @@ portal renders locally exactly as it serves in production. Pass `--mock` to
522
514
  inject `{ mock: true }` instead of Core/Clerk config for local page inspection
523
515
  with placeholder data and auth bypassed.
524
516
 
517
+ A build is published only when its output ships the SDK's managed sign-in.
518
+ A refused build never replaces what is live; `frontend status` shows the
519
+ reason, and `builds[].diagnostics[].code` is `FRONTEND_SIGN_IN_MISSING` (mount
520
+ `<FartherShoreRoot>` and render `<FsSignIn />`) or `FRONTEND_SDK_TOO_OLD`
521
+ (upgrade `@farthershore/farthershore-js`). `--wait` exits `BUILD_FAILED` with
522
+ that code in `details.reasonCode`. Mock mode is for this local preview only: a
523
+ hosted portal ignores it, and always uses the platform's sign-in.
524
+
525
525
  ```bash
526
526
  farthershore frontend status weather-api --format json
527
+ farthershore frontend status weather-api --wait --ref <commitSha> --format json
527
528
  farthershore frontend rollback weather-api --release-id <hash> --yes --format json
528
529
 
529
530
  # Local preview (shells out to vite; needs a frontend/ project)
@@ -707,6 +708,7 @@ farthershore webhook update weather-api <webhookId> --disable --format json
707
708
  farthershore webhook test weather-api <webhookId> --format json
708
709
  farthershore webhook trigger weather-api <webhookId> --type payment.failed --format json
709
710
  farthershore webhook deliveries weather-api <webhookId> --limit 20 --format json
711
+ farthershore webhook delivery weather-api <webhookId> <deliveryId> --format json
710
712
  farthershore webhook rotate weather-api <webhookId> --yes --format json
711
713
  farthershore webhook delete weather-api <webhookId> --yes --format json
712
714
  ```
@@ -719,6 +721,13 @@ in the receiving app. In human mode they also print it as an
719
721
  sends a signed, realistic sample of one catalog event (the deliveries log
720
722
  records it under that type) so every handler branch can be exercised locally.
721
723
 
724
+ `webhook deliveries` lists recent attempts; `webhook delivery` shows one by its
725
+ id (the `webhook-id` header your endpoint received, also the `deliveryId` that
726
+ `webhook test` / `webhook trigger` return): its status, attempts, last HTTP
727
+ status and when the next attempt is due. A `failed` delivery with no next
728
+ attempt (a test send) is final. Neither returns the event payload or your
729
+ endpoint's response body.
730
+
722
731
  For a receiver on your machine, `webhook listen` is the Stripe-CLI-style loop:
723
732
  it opens a Cloudflare quick tunnel to `--forward-to`, creates a temporary
724
733
  endpoint on it, prints the endpoint id / tunnel URL / (with `--print-secret`)
@@ -734,8 +743,8 @@ farthershore webhook listen weather-api --forward-to localhost:3000/webhooks \
734
743
  ```
735
744
 
736
745
  `listen` needs `cloudflared` — bundled as an optional
737
- `@farthershore/cloudflared-<platform>` dependency, or on your PATH. It has no
738
- MCP tool (long-running, process-owning). A listener killed hard leaves an
746
+ `@farthershore/cloudflared-<platform>` dependency, or on your PATH. A listener
747
+ killed hard leaves an
739
748
  endpoint with a `*.trycloudflare.com` URL; `webhook delete --yes` removes it.
740
749
 
741
750
  ### `farthershore promo-code`
@@ -763,18 +772,18 @@ Use `--all-plans` to clear plan scoping.
763
772
  Install or refresh the platform-verified skills bundle together. The platform
764
773
  pins this immutable release, and CI plus a daily repository check compare it to
765
774
  GitHub's latest stable release so the guidance cannot silently drift.
766
- This command requires `@farthershore/cli` 0.35.0 or newer.
775
+ This command requires `@farthershore/cli` 0.37.0 or newer.
767
776
 
768
777
  ```bash
769
778
  set -euo pipefail
770
779
  CLI_VERSION=$(farthershore --version)
771
- 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] > 35 || (+m[2] === 35 && +m[3] >= 0))) { console.error("Stop: CLI 0.35.0 or newer is required; ask the human to upgrade."); process.exitCode = 1; } })'
780
+ 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] > 37 || (+m[2] === 37 && +m[3] >= 0))) { console.error("Stop: CLI 0.37.0 or newer is required; ask the human to upgrade."); process.exitCode = 1; } })'
772
781
  farthershore skills install --help
773
782
  farthershore skills install
774
783
  ```
775
784
 
776
785
  If either prerequisite fails, stop and ask the human to run
777
- `npm install -g @farthershore/cli@0.35.0`, then repeat the checks.
786
+ `npm install -g @farthershore/cli@0.37.0`, then repeat the checks.
778
787
  Do not install or upgrade global tooling autonomously.
779
788
 
780
789
  The Farther Shore CLI downloads the exact installer archive and verifies this
@@ -904,7 +913,8 @@ until, deadlineMs })`, `console`, `setTimeout` / `clearTimeout` and
904
913
  One-time secrets (minted or rotated credentials) come back to the script as
905
914
  `{ redacted: true, last4 }` unless you pass `--reveal-secrets`; a redacted
906
915
  secret cannot be shown again, so rotate with `--reveal-secrets` when you need
907
- the value. Other results pass the same credential masking as the MCP server.
916
+ the value. In every other result, credential-shaped strings (tokens, API keys,
917
+ JWTs) and known secret fields are masked before the script sees them.
908
918
 
909
919
  **Budgets:** `--max-calls` (200), `--max-writes` (20), `--timeout` (60s; `60`,
910
920
  `60s`, `500ms`, `2m`) and at most 4 calls in flight. Exceeding one stops the
@@ -973,25 +983,6 @@ MakerToken through `FARTHERSHORE_TOKEN`. Device login waits for human approval;
973
983
  `farthershore validate --local-only` need no network or auth and are safe to
974
984
  run in CI.
975
985
 
976
- ## MCP server
977
-
978
- The MCP server (`farthershore-mcp`) projects its tools from the same operation
979
- registry that defines the CLI commands. Every MCP tool has a CLI sibling, but
980
- not every CLI command is exposed through MCP. Tool names use the `fs_*` prefix
981
- and cover only operations explicitly marked agent-operable in that registry.
982
- Organization, role, member, invitation, and org MakerToken administration
983
- requires a live-user CLI session and is not projected into MCP; audit logs,
984
- notifications, and apply timelines are also CLI-only.
985
-
986
- The server resolves its target exactly as the CLI does: the stored login,
987
- `FARTHERSHORE_API_URL` (else the configured API URL), and the organization
988
- linked to its working directory, else the one chosen with
989
- `farthershore auth organization use`.
990
-
991
- ```bash
992
- farthershore-mcp
993
- ```
994
-
995
986
  ## Learn more
996
987
 
997
988
  - Platform documentation: [farthershore.com](https://farthershore.com)