@gravity-rail/cli 4.0.0 → 6.1.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/README.md CHANGED
@@ -109,17 +109,6 @@ For **non-interactive** use (CI, scripts, code-interpreter sandboxes, or any mac
109
109
  export GRAVITY_RAIL_API_KEY=your-api-key # set GRAVITY_RAIL_NO_BROWSER=1 to force the API-key hint
110
110
  ```
111
111
 
112
- ## Search the Documentation
113
-
114
- Search without signing in or selecting a Workspace:
115
-
116
- ```sh
117
- gr docs search -q "outbound workflow"
118
- gr docs search -q "webhook signing" -o json
119
- ```
120
-
121
- Table output shows page titles and URLs. JSON output includes `title`, `url`, `snippet`, and `score` for each result.
122
-
123
112
  ## Work with a Coding Agent
124
113
 
125
114
  Give an agent the CLI's bootstrap instructions, then use each domain's `--help` to discover its commands:
@@ -269,6 +258,13 @@ so the agent picks it up on its next turn. Manager (`gr manage`) and Concierge
269
258
  controls sends exactly what you typed. When stdin is not a TTY the prompt is
270
259
  printed and left unanswered, and the turn ends normally.
271
260
 
261
+ **Proposed messages.** When the Manager wants to send an email from your Gmail
262
+ or a Slack or Teams message, it does not send it and does not pause: the draft
263
+ arrives as a tool result. With a TTY, `gr manage` prints it and asks **Send**,
264
+ **Discard** or **Not now**. Send and Discard settle it once, for every
265
+ surface. Not now, and any run without a TTY, leaves the draft open; open the
266
+ Chat on the web to edit it or decide later.
267
+
272
268
  Approvals, access grants and checkout still **interrupt** the run and resume it
273
269
  in place; unsupported interrupt types exit `3` with the JSON contract below.
274
270
 
@@ -301,7 +297,7 @@ not forwarded, as it may contain sensitive data. Use `resume.chatUuid` /
301
297
  | `members` | Contacts and team — CRUD, labels, filters, roles, fields, import/export |
302
298
  | `workspaces` | Workspace management — CRUD, features, themes, invitations, export/import |
303
299
  | `workflows` | Conversational workflows — CRUD, notes, contributors, templates, analytics |
304
- | `journeys` | Journey definitions — CRUD, V2 authoring, drafts, clone |
300
+ | `journeys` | Journey definitions — CRUD, authoring, drafts |
305
301
  | `agents` | Autonomous AI members — CRUD, archive |
306
302
  | `assistants` | AI personas — CRUD with model and voice configuration |
307
303
  | `assignments` | Task-based conversations — CRUD, messages, tools |
@@ -313,7 +309,7 @@ not forwarded, as it may contain sensitive data. Use `resume.chatUuid` /
313
309
  | `data-types` | Schema-driven forms and records — CRUD, field indexing, computed fields |
314
310
  | `files` | Documents and folders — CRUD, sharing, semantic search, labels |
315
311
  | `sites` | Customer portals — CRUD, pages, menus, web crawling |
316
- | `events` | Automation rules — triggers, CEL conditions, delayed actions, webhooks |
312
+ | `events` | Event rules — triggers, CEL conditions, delayed actions |
317
313
  | `calendars` | Scheduling — calendars, events, event types, availability, Google sync |
318
314
  | `qualifications` | Workflow Scenarios, synthetic test runs, and criterion results |
319
315
  | `queries` | Unified Query Engine — fields, validate, preview, run, syntax reference |
@@ -366,7 +362,7 @@ not forwarded, as it may contain sensitive data. Use `resume.chatUuid` /
366
362
  | `apps` | OAuth app management |
367
363
  | `oauth` | OAuth provider connections |
368
364
  | `auth` | Two-factor authentication, credentials, and password management |
369
- | `org` | Organization membership, invitations, and org domains |
365
+ | `org` | Organization membership, invitations, org domains, and webhooks |
370
366
 
371
367
  ## Recipes
372
368
 
@@ -418,7 +414,7 @@ gr pronunciations create -w $WORKSPACE --term "GravityRail" --respelling "GRA-vi
418
414
  gr recordings download-url -w $WORKSPACE --chat-id 42
419
415
 
420
416
  # Or download the WAV straight to a file.
421
- gr recordings download -w $WORKSPACE --chat-id 42 -o call.wav
417
+ gr recordings download -w $WORKSPACE --chat-id 42 -o call.wav --allow-write
422
418
  ```
423
419
 
424
420
  ### Register and verify an org domain
@@ -529,21 +525,20 @@ gr concierge chat --sms --allow-write
529
525
 
530
526
  If the API returns **412** `account_phone_unverified`, run `gr account verify-phone` first.
531
527
 
532
- ## Journey V2 authoring
528
+ ## Journey authoring
533
529
 
534
530
  The same commands are available through the internal `yarn gr` entry point.
535
531
  All examples require workspace membership and `journeys:write` (which implies
536
532
  `journeys:read`, also checked when cloning).
537
533
 
538
534
  ```sh
539
- gr journeys create -w $WORKSPACE --data '{"name":"Onboarding V2","executionModel":"v2","status":"draft"}' --allow-write
535
+ gr journeys create -w $WORKSPACE --data '{"name":"Onboarding","status":"draft"}' --allow-write
540
536
  gr journeys authoring -w $WORKSPACE --id 42 -o json
541
- gr journeys v2 put -w $WORKSPACE --id 42 --file definition.json --allow-write
542
- gr journeys v2 validate -w $WORKSPACE --id 42 -o json
543
- gr journeys v2 clone -w $WORKSPACE --id 12 --allow-write
537
+ gr journeys definition put -w $WORKSPACE --id 42 --file definition.json --allow-write
538
+ gr journeys definition validate -w $WORKSPACE --id 42 -o json
544
539
  ```
545
540
 
546
- `v2 put` replaces the complete executable definition. Include `expectedUpdatedAt`
541
+ `definition put` replaces the complete executable definition. Include `expectedUpdatedAt`
547
542
  from the latest authoring read, ordered `touches`, and `endings`. Each touch can
548
543
  carry `eventRules`, an incoming `wait`, and a `branch` with ordered routes.
549
544
  Endings carry `celCondition` and/or `filterId` predicates and `eventRules`; they
@@ -585,8 +580,8 @@ owned by the route. For example, this branch selects Members with an email:
585
580
  Use this object as a touch's `branch` in the complete definition. The owned
586
581
  predicate is ANDed with any `filterId` and `celCondition`; it creates no saved
587
582
  MemberFilter. Reading or changing it additionally requires `members:read` and
588
- access to its fields. On `v2 put`, omission preserves an existing owned predicate
589
- and explicit `null` clears it. `v2 validate` reports
583
+ access to its fields. On `definition put`, omission preserves an existing owned predicate
584
+ and explicit `null` clears it. `definition validate` reports
590
585
  `decision_rule_predicate_invalid` when a stored owned predicate cannot compile.
591
586
 
592
587
  Existing steps and routes retain identity through their UUIDs. Omit a step or
@@ -599,9 +594,9 @@ To preserve an unfinished editor document without changing the executable
599
594
  Journey, use the separate draft commands:
600
595
 
601
596
  ```sh
602
- gr journeys v2 draft put -w $WORKSPACE --id 42 --file draft.json --allow-write
597
+ gr journeys draft put -w $WORKSPACE --id 42 --file draft.json --allow-write
603
598
  gr journeys authoring -w $WORKSPACE --id 42 -o json
604
- gr journeys v2 draft delete -w $WORKSPACE --id 42 --expected-updated-at '2026-09-26T00:00:00Z' --allow-write
599
+ gr journeys draft delete -w $WORKSPACE --id 42 --expected-updated-at '2026-09-26T00:00:00Z' --allow-write
605
600
  ```
606
601
 
607
602
  `draft.json` contains `expectedUpdatedAt` and `document` with `version`, `model`,
@@ -611,10 +606,25 @@ the executable definition. Neither draft command publishes a Journey.
611
606
 
612
607
  Use `journeys update --id 42 --data '{"status":"active"}' --allow-write` to
613
608
  publish, or `status: "paused"` to pause. Publishing runs server validation;
614
- `v2 validate` reports stored-definition issues without publishing. A stale
609
+ `definition validate` reports stored-definition issues without publishing. A stale
615
610
  `expectedUpdatedAt` is rejected: reload and reconcile rather than blindly retrying.
616
- `v2 clone` creates a separate draft from a supported legacy definition and leaves
617
- the source and enrollments unchanged; unsupported topologies are rejected.
611
+
612
+ Preview how a Journey would run for a Persona's test Member or a real Member.
613
+ The preview sends and writes nothing:
614
+
615
+ ```sh
616
+ gr journeys simulate -w $WORKSPACE --id 42 --persona 7
617
+ gr journeys simulate -w $WORKSPACE --id 42 --member 1001 --source enrollment --until 2026-12-01T00:00:00Z
618
+ gr journeys simulate -w $WORKSPACE --id 42 --persona 7 --changes what-if.json --conversation-default noReply -o json
619
+ ```
620
+
621
+ `--changes` holds an array of what-if changes, or an object with any of
622
+ `changes`, `conversationDefault` and `conversationOutcomes`. A change sets `target` to
623
+ `value` at `at`, or relative to a step or action with
624
+ `anchor: {kind: afterStep|afterAction|beforeStep, uuid, offsetSeconds?}`.
625
+ `--conversation-default` overrides the file. The default view prints one line
626
+ per event and the outcome, without values or message bodies; `-o json` prints
627
+ the full response.
618
628
 
619
629
  ## Workflow revision exports
620
630
 
@@ -702,24 +712,44 @@ not revoke the Bundle subscription.
702
712
  | Edit package metadata | `bundles update --bundle <uuid> --name "Starter Kit" --description "Contents"` |
703
713
  | Create a package | `bundles create --name "Starter Kit"` |
704
714
  | Inspect/edit the package draft | `bundles draft get/set --bundle <uuid>` |
705
- | Publish an immutable version | `bundles publish --bundle <uuid> --release-notes "What's new"` |
715
+ | See what the next version would change, publishing nothing | `bundles draft preview --bundle <uuid>` |
716
+ | Publish an immutable version: every Workflow's newest published revision and every other item as its source is now; prints what changes first | `bundles publish --bundle <uuid> --release-notes "What's new"` |
706
717
  | Inspect summary and latest content | `bundles get --bundle <uuid>` |
707
718
  | Inspect history or one version | `bundles versions/version --bundle <uuid>` |
708
719
  | Share within the publisher organization | `bundles grant --bundle <uuid> --to organization --uuid <organization>` |
709
- | Install the latest version (initially pinned) | `bundles install --bundle <uuid>` |
720
+ | Install the latest version (initially pinned; pre-selects the workspace default, when one exists and you hold `phones:read`, for phone slots the bindings leave out) | `bundles install --bundle <uuid>` |
710
721
  | Follow new releases | `bundles policy --installation <uuid> --set auto` |
711
722
  | Hold the installed release | `bundles policy --installation <uuid> --set pinned` |
712
723
  | Detach: stop updates, keep installed content, make its Workflows editable | `bundles unsubscribe --installation <uuid>` |
713
724
  | Preview an upgrade | `bundles preview --installation <uuid> --to 2` |
714
725
  | Apply an upgrade | `bundles upgrade --installation <uuid> --to 2` |
715
726
  | Inspect missing local dependencies | `bundles readiness --installation <uuid>` |
716
- | Supply local dependencies | `bundles bind --installation <uuid> --bindings bindings.json` |
727
+ | Supply local dependencies (`{"kind": "new_phone_number"}` creates the installation's phone number; `{"kind": "provider_phone_number", "uuid": "<uuid>"}` creates one and links one of the organization's numbers to it, listed by `phone-numbers linkable`; an `operator_groups.<key>` slot takes `{"kind": "operator_group", "id": <group id>}`) | `bundles bind --installation <uuid> --bindings bindings.json` |
728
+ | Fill an Inbox slot by creating its Inbox: with an address now, on the platform domain (`--create-inbox`, `{"kind": "new_inbox"}`), or with no address yet, for an address on your organization's domain later (`--create-inbox-without-address`, `{"kind": "new_inbox_without_address"}`; it sends and receives nothing until given an address in its settings, and readiness reports it as waiting) | `bundles bind --installation <uuid> --create-inbox-without-address program.inbox` |
729
+ | Read per-workspace Ability settings | `bundles settings --installation <uuid>` |
730
+ | Change a filled Ability setting, a shared install field (one value several settings hold, such as the Pathways practice ID a Site and an Ability share), a Workflow's Inbox or phone number, the phone number or Inbox a Bundle's routing answers on, or the operator group it rings (a group is bound with, or after, an endpoint that rings it), without detaching | `bundles bind --installation <uuid> --bindings setting.json --replace` |
717
731
 
718
732
  Commands require a workspace (`-w` or a workspace profile); mutations also require
719
733
  `--allow-write`. Draft item files contain `{ "items": [...] }`; Workflow items
720
- pin `workflowUuid` and `revisionUuid`, and Form/Site items carry definitions.
734
+ name `workflowUuid` and `revisionUuid`, and Form/Site items carry definitions.
721
735
  Configuration is reusable software. Records and credentials stay local.
722
736
 
737
+ Publishing does not ship the revision a draft names: each Workflow goes out at
738
+ its newest published revision, and each Data Type (kind `form`), Journey, saved
739
+ filter and routing item is read from its source again (a Data Type definition
740
+ in the file is replaced by the source Data Type's). `bundles publish` prints
741
+ each item the version adds, changes or removes, a Workflow's revision before
742
+ and after, and each item whose newest state cannot go into a Bundle with a
743
+ closed reason and its status: `held` (it stays as the last published version
744
+ carried it, which can still go) or `blocked` (fix or remove it first: an item
745
+ the last published version did not carry, and so every item of a first version,
746
+ blocks the version when it cannot go, and so does a carried one whose last
747
+ published state cannot go either). It then
748
+ publishes exactly that list and refuses if it changed in between, or if nothing
749
+ would change. With `-o json` the published version carries the list as
750
+ `publishPlan`. `bundles draft preview` prints the same list and publishes
751
+ nothing; it needs no `--allow-write`.
752
+
723
753
  For safe editing, retain `draftGeneration` from `bundles draft get -o json` and
724
754
  pass it as `--expected-generation` to `draft set` or `publish`. Omitting it reads
725
755
  the current generation just before the write and only detects changes during
@@ -746,6 +776,9 @@ unavailable while Form and Site definitions are copied at installation.
746
776
 
747
777
  Create a Persona and Scenario in the Workflow Evaluate screen, or use
748
778
  `gr personas create` and `gr qualifications scenarios create --file scenario.json`.
779
+ A Persona's test Member is created on first use; manage it with
780
+ `gr personas test-member get|create|reset --id <persona-id>` (`create` and `reset`
781
+ need `--allow-write`).
749
782
  Pick the intended Member role for the Persona. If the Persona has no role, test
750
783
  launch uses the workspace default Member role; missing or unsafe role setup must
751
784
  be corrected by an authorized workspace administrator. The CLI never changes a
@@ -1,10 +1,10 @@
1
1
  import {
2
2
  confirmAccountPhoneVerify,
3
- requireAuth,
4
3
  startAccountPhoneVerify
5
- } from "./chunk-JOXB4Y4Q.js";
6
- import "./chunk-KDWGBYCM.js";
7
- import "./chunk-3T7A5PSF.js";
4
+ } from "./chunk-LQLGLI4Q.js";
5
+ import {
6
+ requireAuth
7
+ } from "./chunk-HTPFRSPP.js";
8
8
 
9
9
  // src/commands/account-verify-phone.ts
10
10
  import * as readline from "readline/promises";
@@ -38,4 +38,4 @@ async function promptLine(question) {
38
38
  export {
39
39
  accountVerifyPhoneCommand
40
40
  };
41
- //# sourceMappingURL=account-verify-phone-VZYUPN64.js.map
41
+ //# sourceMappingURL=account-verify-phone-FUOCVZ55.js.map