@farthershore/cli 0.36.0 → 0.38.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 +110 -0
- package/README.md +60 -21
- package/dist/index.js +5316 -607
- package/package.json +4 -4
package/CHANGELOG.md
CHANGED
|
@@ -4,6 +4,116 @@ All notable changes to the `farthershore` CLI are documented here. The CLI
|
|
|
4
4
|
versions independently from the SDKs. Pre-1.0: minor versions may include
|
|
5
5
|
breaking changes. Releases before 0.35.0 are recorded only in the git history.
|
|
6
6
|
|
|
7
|
+
## [Unreleased]
|
|
8
|
+
|
|
9
|
+
## [0.38.0] - 2026-10-14
|
|
10
|
+
|
|
11
|
+
### Changed
|
|
12
|
+
|
|
13
|
+
- **Breaking:** `validate` runs the server check by default; `--business` is
|
|
14
|
+
no longer required. It finds the business from `--business`, then
|
|
15
|
+
`FARTHERSHORE_BUSINESS` or the directory link (`farthershore link`, with its
|
|
16
|
+
environment), then the repository's `origin` remote matched against each
|
|
17
|
+
business's connected repository. When the server check can't run
|
|
18
|
+
(`--local-only`, not logged in, an expired login, or no business found) the
|
|
19
|
+
local build and determinism check still run and the output says the server
|
|
20
|
+
check was skipped, why, and how to turn it on
|
|
21
|
+
(`data.serverCheck.checked: "skipped"`). Only the compiled business
|
|
22
|
+
definition and `docs/` files are sent; `business/` source never leaves the
|
|
23
|
+
machine, and `--local-only` sends nothing. A one-line notice is printed the
|
|
24
|
+
first time a server check runs.
|
|
25
|
+
- **Breaking:** `validate` reports a **Business SDK** section and a **Docs**
|
|
26
|
+
section, laid out like the pull request comments, with one issue shape
|
|
27
|
+
(`{ code, message, file?, line?, column?, path? }`). JSON output carries
|
|
28
|
+
`businessSdk` and `docs`, each with `issues`, `checked` (`local`, `server`
|
|
29
|
+
or `skipped`) and a `reason` when skipped: in `data` on success, in
|
|
30
|
+
`error.details` on failure. Any problem in either section exits 2,
|
|
31
|
+
non-determinism included; a build that cannot run at all still exits 1.
|
|
32
|
+
- The "Not authenticated" error carries the code `AUTH_REQUIRED`.
|
|
33
|
+
- `promo-code update` sends only the flags you pass; omitted terms (cap,
|
|
34
|
+
expiry, plans, discount) are kept. It no longer requires the full spec
|
|
35
|
+
(`--kind`, `--duration-months`) for a partial edit.
|
|
36
|
+
|
|
37
|
+
### Added
|
|
38
|
+
|
|
39
|
+
- `validate` checks `docs/` on the server: it sends `docs/_index.yaml` and
|
|
40
|
+
every `docs/**/*.mdx` (the same set the pull request check reads) and lists
|
|
41
|
+
the result under **Docs**. A broken `business/` program doesn't stop the
|
|
42
|
+
docs check. Docs-only problems exit 2 with `DOCS_VALIDATION_FAILED`; no
|
|
43
|
+
`docs/` folder reports Docs as skipped. Requests over 500 files, 1 MB per
|
|
44
|
+
file or 10 MB in total are reported locally (`DOCS_TOO_MANY_FILES`,
|
|
45
|
+
`DOCS_FILE_TOO_LARGE`, `DOCS_TOO_LARGE`) and not sent. A busy check is
|
|
46
|
+
retried after `Retry-After`, then reported as `DOCS_CHECK_BUSY` (exit 5).
|
|
47
|
+
|
|
48
|
+
## [0.37.0] - 2026-10-14
|
|
49
|
+
|
|
50
|
+
### Changed
|
|
51
|
+
|
|
52
|
+
- `business status` reports `serving` (`status`, `coherent`, `message`) in
|
|
53
|
+
place of `edgeCoherence` (no generations, epochs or digests), and
|
|
54
|
+
`latestDeployment.publishStatus` in place of `edgePublishStatus`.
|
|
55
|
+
`business routes` lists each route once (no compiled row id);
|
|
56
|
+
`business contract` and `business config-attempts` print the closed public
|
|
57
|
+
shapes (no raw proposal text or payload). `validate --business` no longer
|
|
58
|
+
echoes the server's spec hash; a failure's `irHash` is the locally built IR's.
|
|
59
|
+
- `auth whoami` no longer prints a maker token's `authVersion` or a dashboard
|
|
60
|
+
session's identity-provider user id.
|
|
61
|
+
- `agents`, `bulletin`, `automation`, `knowledge`, `resource-count`,
|
|
62
|
+
`denial`, `dependents` and `workflow-control` print the closed public
|
|
63
|
+
shapes: an agent run names a failure by code with a fixed message and
|
|
64
|
+
carries no trace object key; a denial carries no internal decision or ledger
|
|
65
|
+
ids; a rollback preview reports `currentCommitSha`.
|
|
66
|
+
- The webhook commands print only the public webhook fields. Every endpoint
|
|
67
|
+
result carries the same fields (`failCount`, `disabledAt` and `updatedAt`
|
|
68
|
+
included); the signing secret appears only in `webhook create`,
|
|
69
|
+
`webhook rotate` and `webhook listen --print-secret`. A delivery's
|
|
70
|
+
`status` is `pending`, `success`, `failed` or `dead`, and `webhook test` /
|
|
71
|
+
`webhook trigger` results (and their `WEBHOOK_DELIVERY_FAILED` /
|
|
72
|
+
`WEBHOOK_REDIRECTED` errors) carry `deliveryId`, null when the attempt
|
|
73
|
+
could not be recorded.
|
|
74
|
+
- New `webhook delivery <business> <webhookId> <deliveryId>` shows one
|
|
75
|
+
delivery's status, attempts and HTTP status.
|
|
76
|
+
- `analytics log` events carry `request` (path, status code, subscriber, deny
|
|
77
|
+
code, gateway / backend timing) instead of the raw archived `payload`.
|
|
78
|
+
`usage summary` reports `activeApiKeys` (was `activeRuntimeKeys`) and no
|
|
79
|
+
business id. `stripe status` no longer prints the Stripe account id, and
|
|
80
|
+
`source` reads `business` | `organization`. `tax-settings show|update` print
|
|
81
|
+
`{ status, defaults: { taxBehavior, taxCode }, headOffice, missingFields }`
|
|
82
|
+
instead of the payment provider's settings object. `plan list` reads the
|
|
83
|
+
plan's `kind` and `isActive`.
|
|
84
|
+
- `variables` mutations and `variables status` print the public operation
|
|
85
|
+
(no `mutationId`, `state` or `result`; `impact` is integrations and
|
|
86
|
+
subscriber count; a failed attempt shows fixed copy; `generation` is
|
|
87
|
+
`version`, also on `variables list`). `frontend status`
|
|
88
|
+
prints `activeReleaseId` and each build's `releaseId`; `frontend rollback`
|
|
89
|
+
prints the release now serving with its `environmentId`.
|
|
90
|
+
|
|
91
|
+
- `agreements`, `promo-code` and `persona` print the closed public shapes:
|
|
92
|
+
no payment-provider ids on promo codes, no plan-version, user or membership
|
|
93
|
+
ids on personas, and `agreements pins` names the plan by key and version.
|
|
94
|
+
- `apply-timeline list` / `inspect` print the public entry: no build id, IR
|
|
95
|
+
hash or internal trigger; apply phases are `publish` and `billing`, and a
|
|
96
|
+
failed platform step reads as a code plus the id to quote to support.
|
|
97
|
+
`proposal create|preview|list|get` print the public ChangeSet (no rollback
|
|
98
|
+
plan, correlation id or simulation fingerprint; `resetReason` replaces
|
|
99
|
+
`failureReason`), and `proposal create --dry-run` prints what it would record.
|
|
100
|
+
An unknown `--env` name on the `apply-timeline` and `proposal` commands now
|
|
101
|
+
fails with `ENVIRONMENT_NOT_FOUND` (apply-timeline used to show production
|
|
102
|
+
entries).
|
|
103
|
+
- `env create` prints the full environment (now including `portalHostname`)
|
|
104
|
+
with `created` and `branchCreated`, and says when the environment already
|
|
105
|
+
existed. A failed `env delete` reports which cleanup steps did not finish
|
|
106
|
+
(`runtime`, `docs`, `branch`) instead of the underlying error text.
|
|
107
|
+
- `backend list` prints each backend's `status` straight from the server; the
|
|
108
|
+
backend and runtime-token commands print only the public fields (a backend's
|
|
109
|
+
internal origin host and raw provisioning / readiness state are no longer
|
|
110
|
+
returned). `backend tokens create` / `rotate` results carry `envVar` and the
|
|
111
|
+
one-time `token` as the server returns them.
|
|
112
|
+
- `business show`, `business list` and the other business reads print only the
|
|
113
|
+
public business fields. Internal platform state the server used to include
|
|
114
|
+
(release and sync bookkeeping, accepted specs, frontend activation details,
|
|
115
|
+
…) is no longer returned.
|
|
116
|
+
|
|
7
117
|
## [0.36.0] - 2026-10-13
|
|
8
118
|
|
|
9
119
|
### Changed
|
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.
|
|
6
|
+
**Status: `0.38.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,
|
|
@@ -20,13 +20,13 @@ takes `--format json` for non-interactive scripting.
|
|
|
20
20
|
## Install
|
|
21
21
|
|
|
22
22
|
```bash
|
|
23
|
-
npm install -g @farthershore/cli@0.
|
|
23
|
+
npm install -g @farthershore/cli@0.38.0
|
|
24
24
|
```
|
|
25
25
|
|
|
26
26
|
Or run it directly with npx:
|
|
27
27
|
|
|
28
28
|
```bash
|
|
29
|
-
npx -p @farthershore/cli@0.
|
|
29
|
+
npx -p @farthershore/cli@0.38.0 farthershore --help
|
|
30
30
|
```
|
|
31
31
|
|
|
32
32
|
## Authentication
|
|
@@ -89,7 +89,7 @@ cd weather-api
|
|
|
89
89
|
# ...author business/ with @farthershore/business...
|
|
90
90
|
|
|
91
91
|
# 3. Validate the same way the PR check will, before pushing
|
|
92
|
-
farthershore validate
|
|
92
|
+
farthershore validate
|
|
93
93
|
|
|
94
94
|
# 4. Push — the GitHub bot validates and records apply state
|
|
95
95
|
git push --set-upstream origin feature/pricing
|
|
@@ -168,14 +168,14 @@ anchors. Paths come from the published docs index, not your working directory.
|
|
|
168
168
|
|
|
169
169
|
```bash
|
|
170
170
|
farthershore docs ls --format json
|
|
171
|
-
farthershore docs ls
|
|
172
|
-
farthershore docs tree
|
|
173
|
-
farthershore docs ls
|
|
174
|
-
farthershore docs read
|
|
175
|
-
farthershore docs ls
|
|
171
|
+
farthershore docs ls sdks --format json
|
|
172
|
+
farthershore docs tree sdks --format json
|
|
173
|
+
farthershore docs ls sdks/connect-your-application --format json
|
|
174
|
+
farthershore docs read sdks/connect-your-application/metering --format json
|
|
175
|
+
farthershore docs ls sdks/connect-your-application/metering --format json
|
|
176
176
|
farthershore docs read backend/metering --section "choose-the-correct-metering-channel" --format json
|
|
177
|
-
farthershore docs search "runtime token" --collection
|
|
178
|
-
farthershore docs collection
|
|
177
|
+
farthershore docs search "runtime token" --collection sdks --limit 10 --format json
|
|
178
|
+
farthershore docs collection sdks --format json
|
|
179
179
|
```
|
|
180
180
|
|
|
181
181
|
Use an anchor returned by `docs ls <page>` for `--section`. `read` also accepts the canonical slug or an
|
|
@@ -235,15 +235,46 @@ farthershore build --format json
|
|
|
235
235
|
### `farthershore validate`
|
|
236
236
|
|
|
237
237
|
Run the same verdict the GitHub `farthershore/validate` PR check produces, before
|
|
238
|
-
you push. It builds
|
|
239
|
-
check the
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
238
|
+
you push. It builds `business/` on your machine twice and checks that both
|
|
239
|
+
builds match (the determinism check the PR check enforces). It then sends the
|
|
240
|
+
compiled business definition and your docs to the server, which checks them
|
|
241
|
+
with the newest checks and returns the PR check's verdict: problems, the change
|
|
242
|
+
summary, and whether the change is economic. Validation never accepts or
|
|
243
|
+
publishes anything, so it is safe to repeat.
|
|
244
|
+
|
|
245
|
+
What leaves your machine: only the compiled business definition (the output
|
|
246
|
+
of the local build) and your docs files (`docs/_index.yaml` and the `.mdx`
|
|
247
|
+
pages under `docs/`). Your `business/` source code never leaves it.
|
|
248
|
+
`--local-only` sends nothing. Without a `docs/` folder, nothing is sent for
|
|
249
|
+
docs. Docs over the size the check accepts (500 files, 1,000,000 bytes per file,
|
|
250
|
+
10,000,000 bytes in all) are reported as a Docs problem without being sent.
|
|
251
|
+
|
|
252
|
+
The server check runs by default against this repo's business: `--business`,
|
|
253
|
+
else `FARTHERSHORE_BUSINESS`, else the directory link (`farthershore link`),
|
|
254
|
+
else the business connected to the repo's GitHub `origin` remote. When none of
|
|
255
|
+
those resolves, or you are not logged in, the local checks still run and the
|
|
256
|
+
output says the server check was skipped and how to turn it on.
|
|
257
|
+
|
|
258
|
+
The output has the PR check's two sections, **Business SDK** and **Docs**,
|
|
259
|
+
each listing problems the way its PR comment does. Every problem has the same
|
|
260
|
+
fields as the comment's JSON: `code`, `message`, and where known `file`,
|
|
261
|
+
`line`, `column` and `path` (the location in the business definition). With
|
|
262
|
+
`--format json` they are in `data.businessSdk` / `data.docs` (or
|
|
263
|
+
`error.details.businessSdk` / `error.details.docs` when there are problems),
|
|
264
|
+
each `{ issues, checked }`, where `checked` is `local`, `server` or `skipped`.
|
|
265
|
+
Any problem in either section exits 2, whether the local build or the server
|
|
266
|
+
found it.
|
|
267
|
+
|
|
268
|
+
The docs check can also return warnings and info notes. They never fail
|
|
269
|
+
`farthershore validate`: the Docs section lists them after the problems,
|
|
270
|
+
labelled `Warning:` or `Info:`, and a run with only notes exits 0. In JSON they
|
|
271
|
+
are in the same `issues` list, after the problems, each with a `severity` of
|
|
272
|
+
`warning` or `info`; an issue without a `severity` is a problem. A build that could not run at all (for example, `business/`
|
|
273
|
+
dependencies not installed) exits 1.
|
|
243
274
|
|
|
244
275
|
```bash
|
|
245
|
-
farthershore validate
|
|
246
|
-
farthershore validate --business weather-api
|
|
276
|
+
farthershore validate # local build + server check
|
|
277
|
+
farthershore validate --business weather-api # check against a named business
|
|
247
278
|
farthershore validate --local-only --format json
|
|
248
279
|
```
|
|
249
280
|
|
|
@@ -708,6 +739,7 @@ farthershore webhook update weather-api <webhookId> --disable --format json
|
|
|
708
739
|
farthershore webhook test weather-api <webhookId> --format json
|
|
709
740
|
farthershore webhook trigger weather-api <webhookId> --type payment.failed --format json
|
|
710
741
|
farthershore webhook deliveries weather-api <webhookId> --limit 20 --format json
|
|
742
|
+
farthershore webhook delivery weather-api <webhookId> <deliveryId> --format json
|
|
711
743
|
farthershore webhook rotate weather-api <webhookId> --yes --format json
|
|
712
744
|
farthershore webhook delete weather-api <webhookId> --yes --format json
|
|
713
745
|
```
|
|
@@ -720,6 +752,13 @@ in the receiving app. In human mode they also print it as an
|
|
|
720
752
|
sends a signed, realistic sample of one catalog event (the deliveries log
|
|
721
753
|
records it under that type) so every handler branch can be exercised locally.
|
|
722
754
|
|
|
755
|
+
`webhook deliveries` lists recent attempts; `webhook delivery` shows one by its
|
|
756
|
+
id (the `webhook-id` header your endpoint received, also the `deliveryId` that
|
|
757
|
+
`webhook test` / `webhook trigger` return): its status, attempts, last HTTP
|
|
758
|
+
status and when the next attempt is due. A `failed` delivery with no next
|
|
759
|
+
attempt (a test send) is final. Neither returns the event payload or your
|
|
760
|
+
endpoint's response body.
|
|
761
|
+
|
|
723
762
|
For a receiver on your machine, `webhook listen` is the Stripe-CLI-style loop:
|
|
724
763
|
it opens a Cloudflare quick tunnel to `--forward-to`, creates a temporary
|
|
725
764
|
endpoint on it, prints the endpoint id / tunnel URL / (with `--print-secret`)
|
|
@@ -764,18 +803,18 @@ Use `--all-plans` to clear plan scoping.
|
|
|
764
803
|
Install or refresh the platform-verified skills bundle together. The platform
|
|
765
804
|
pins this immutable release, and CI plus a daily repository check compare it to
|
|
766
805
|
GitHub's latest stable release so the guidance cannot silently drift.
|
|
767
|
-
This command requires `@farthershore/cli` 0.
|
|
806
|
+
This command requires `@farthershore/cli` 0.38.0 or newer.
|
|
768
807
|
|
|
769
808
|
```bash
|
|
770
809
|
set -euo pipefail
|
|
771
810
|
CLI_VERSION=$(farthershore --version)
|
|
772
|
-
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] >
|
|
811
|
+
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] > 38 || (+m[2] === 38 && +m[3] >= 0))) { console.error("Stop: CLI 0.38.0 or newer is required; ask the human to upgrade."); process.exitCode = 1; } })'
|
|
773
812
|
farthershore skills install --help
|
|
774
813
|
farthershore skills install
|
|
775
814
|
```
|
|
776
815
|
|
|
777
816
|
If either prerequisite fails, stop and ask the human to run
|
|
778
|
-
`npm install -g @farthershore/cli@0.
|
|
817
|
+
`npm install -g @farthershore/cli@0.38.0`, then repeat the checks.
|
|
779
818
|
Do not install or upgrade global tooling autonomously.
|
|
780
819
|
|
|
781
820
|
The Farther Shore CLI downloads the exact installer archive and verifies this
|