@farthershore/cli 0.3.11 → 0.3.12

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.
Files changed (4) hide show
  1. package/README.md +35 -10
  2. package/dist/index.js +186 -159
  3. package/dist/mcp.js +92 -92
  4. package/package.json +2 -3
package/README.md CHANGED
@@ -107,13 +107,15 @@ farthershore product status --env preview --format json
107
107
 
108
108
  ### `farthershore product config`
109
109
 
110
- Print the latest accepted product config from FartherShore. GitHub, the
111
- UI, and the CLI are proposal surfaces; the accepted internal config is the
112
- valid source of truth.
110
+ Print the accepted or draft product config from FartherShore. GitHub,
111
+ the UI, MCP, and the CLI all write through the same validated internal
112
+ config path. Accepted config is live; draft config is staged until
113
+ `farthershore apply` publishes it.
113
114
 
114
115
  ```bash
115
116
  farthershore product config --format json
116
117
  farthershore product config --format yaml
118
+ farthershore product config --state draft --format json
117
119
  farthershore product config --env preview --format json
118
120
  ```
119
121
 
@@ -130,7 +132,7 @@ farthershore product attempts --env preview --format json
130
132
 
131
133
  ### `farthershore meter`
132
134
 
133
- Create and manage usage meters on the accepted product config.
135
+ Create and manage usage meters in the shared draft product config.
134
136
 
135
137
  ```bash
136
138
  farthershore meter add ai_tokens \
@@ -160,9 +162,10 @@ farthershore feature list --env preview --format json
160
162
 
161
163
  ### `farthershore plan`
162
164
 
163
- Create and update plans in the accepted product config. Server-side
165
+ Create and update plans in the shared draft product config. Server-side
164
166
  validation remains authoritative for rules like one free plan, duplicate
165
- paid prices, and product-level billing strategy consistency.
167
+ paid prices, and product-level billing strategy consistency before apply
168
+ can publish.
166
169
 
167
170
  ```bash
168
171
  farthershore plan add free \
@@ -224,18 +227,38 @@ farthershore validate path/to/product.yaml
224
227
 
225
228
  ### `farthershore apply [product]`
226
229
 
227
- Validate the current repo's `product.yaml` first when applying that repo's product, then run the server-side compiler against the pushed branch state for the product. Unpushed local edits are not part of the remote compile. Returns compilation errors and warnings. Exits with code 1 on failure — suitable for CI checks before merging.
230
+ Publish the shared server draft as one product release. Core accepts the
231
+ release only after schema validation, transition-safety validation, and a
232
+ compiler dry-run pass. Mutation commands such as `meter add`,
233
+ `feature add`, and `plan set-price` stage draft changes by default; they
234
+ do not create live product or plan versions until `apply`.
228
235
 
229
236
  ```bash
230
- # Inside a product repo (auto-detects from product.yaml)
237
+ # Publish the current shared draft
231
238
  farthershore apply
232
239
 
233
- # Or pass the product slug
240
+ # Or pass the product slug explicitly
234
241
  farthershore apply my-weather-api
235
242
 
236
- # Validate and remote-compile without applying
243
+ # Validate and compile the draft without publishing
237
244
  farthershore apply --dry-run --format json
238
245
  farthershore apply --env preview --dry-run --format json
246
+
247
+ # Submit a local product.yaml as a one-off proposal
248
+ farthershore apply --to product.yaml --dry-run --format json
249
+ farthershore apply --to product.yaml --format json
250
+
251
+ # Also save that local file as the shared draft before publishing
252
+ farthershore apply --to product.yaml --save-draft --format json
253
+ ```
254
+
255
+ Draft commands help agents inspect and control the release boundary:
256
+
257
+ ```bash
258
+ farthershore draft status --format json
259
+ farthershore draft diff --format json
260
+ farthershore draft validate --format json
261
+ farthershore draft reset --format json
239
262
  ```
240
263
 
241
264
  ## MCP tools
@@ -324,8 +347,10 @@ farthershore plan add pro \
324
347
  --meter ai_tokens \
325
348
  --feature chat_completions \
326
349
  --format json
350
+ farthershore draft validate --format json
327
351
  farthershore transition preview --format json
328
352
  farthershore apply --dry-run --format json
353
+ farthershore apply --format json
329
354
  farthershore product status --format json
330
355
  ```
331
356