@fluidgrids/cli 2026.1114.2 → 2026.1115.1

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 (3) hide show
  1. package/README.md +42 -0
  2. package/dist/cli.js +467 -155
  3. package/package.json +1 -1
package/README.md CHANGED
@@ -285,6 +285,43 @@ fluidgrids run lead-enrichment --workflow-id customer-7 --id-conflict use-existi
285
285
  - `push` also uploads the bundle's source map inside the source archive, so
286
286
  `runs stack` locations point at your sources.
287
287
 
288
+ ### Environments and promotion: `deploy`
289
+
290
+ `fluidgrids deploy` moves a workflow through DEV, STAGING and PROD the way the
291
+ builder's Environments panel does (spec `code-first` 06 §6, 07 §7):
292
+
293
+ ```bash
294
+ fluidgrids deploy approvals --env dev # the newest version (or --wf-version v4)
295
+ fluidgrids deploy approvals --env staging --note 'QA passed'
296
+ fluidgrids deploy approvals --env prod # waits for an approver
297
+ fluidgrids deploy approvals --env prod --ramp 10 # 10% of new PROD starts run the STAGING version
298
+ fluidgrids deploy approvals --env prod --ramp 100 # promote it in full
299
+ ```
300
+
301
+ - `--env dev` binds a version to DEV (`deployWorkflowVersionToDev`).
302
+ `--wf-version` names it; the default is the newest stored version, and
303
+ `active` names the ACTIVE one.
304
+ - `--env staging` promotes the version DEV holds, and `--env prod` the version
305
+ STAGING holds (`requestWorkflowPromotion`). With `--wf-version` the command
306
+ refuses unless the source environment holds that version.
307
+ - A promotion that needs an approver is polled (`workflowPromotionRequests`)
308
+ until it is applied, rejected or canceled. A rejected or canceled request
309
+ fails the command. After `--timeout` (default 15 minutes) the command fails
310
+ but the request stays open, and running the same command again waits on that
311
+ request instead of filing another. `--no-wait` returns as soon as the request
312
+ is made. The workspace policy decides who approves; the CLI never approves.
313
+ - `--ramp N` (PROD only, durable workflow functions, needs
314
+ `fluidgrids.durable-parity`) sets the PROD rollout so `N` percent of new
315
+ automatic starts run the STAGING version (`setWorkflowRollout`). `--ramp 0`
316
+ sends every start back to the ACTIVE version. `--ramp 100` is a full
317
+ promotion through `requestWorkflowPromotion`, so the PROD approval rule
318
+ applies, and applying it removes the rollout. A workspace that locks PROD to
319
+ approved promotions refuses ramps.
320
+ - A deploy whose target already holds the version writes nothing and reports
321
+ `UNCHANGED`, so a pipeline can rerun it. With `-f json` the result is
322
+ `{workflowKey, environment, version, action, promotion, rollout}`, where
323
+ `action` is `DEPLOYED`, `APPLIED`, `PENDING`, `RAMPED` or `UNCHANGED`.
324
+
288
325
  ### Workflow ids, rollouts and other parity features
289
326
 
290
327
  With the `fluidgrids.durable-parity` feature on the workspace (BOFF-9905 B19,
@@ -299,6 +336,7 @@ fluidgrids runs describe --workflow-id order-7 --key approvals --pending
299
336
  fluidgrids signal approve --workflow-id order-7 --key approvals --payload '{"by":"ana"}'
300
337
  fluidgrids runs result --workflow-id order-7 --key approvals --follow-runs
301
338
  fluidgrids runs count --key approvals --group-by status,task-queue
339
+ fluidgrids runs count --key approvals --group-by status --group-by-attribute customerId
302
340
  fluidgrids runs stack <runId> --metadata # also the run's __metadata
303
341
  fluidgrids versions rollout approvals --to v4 --percent 10
304
342
  fluidgrids versions rollout delete approvals
@@ -306,6 +344,10 @@ fluidgrids versions drainage approvals v3 # ACTIVE, DRAINING or DRAINED
306
344
  fluidgrids versions override <runId> --pin v3 # or --auto-upgrade, --clear
307
345
  ```
308
346
 
347
+ - `runs count --group-by-attribute <names>` groups by search attributes (KEYWORD,
348
+ INT, DOUBLE, BOOL or DATETIME) after the `--group-by` columns, two columns in
349
+ all. A run without the attribute counts in the `(none)` group. It needs
350
+ `fluidgrids.search-attributes`.
309
351
  - `--workflow-id <id> --key <workflowKey>` (with an optional `--first-run-id`)
310
352
  works on `runs describe|history|signal|cancel|terminate|stack|result`,
311
353
  `history`, `signal` and `versions override`, and reaches the latest run of