frontpage-host 0.3.1 → 0.3.3

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/AGENTS.md CHANGED
@@ -290,4 +290,6 @@ Group details Email and stage email tasks use the existing `frontpage mail save`
290
290
 
291
291
  People CRM has People and Groups tabs. Group details has Group details, Stages and Rules tabs. Group-entry emails remain rules with the same IDs. Stage Manage rules supports creating, placing, or attaching email without changing execution when placement changes. New attachments save paused.
292
292
 
293
- For a manual group, `groups.people` accepts `availability: "all" | "available" | "member"` through `--data`. The server applies saved membership before counts and paging. This filter never grants or requires email permission. Conditional groups use condition preview and do not accept manual additions.
293
+ For a manual group, `groups.people` accepts `availability: "all" | "available" | "member"` through `--data`. The server applies saved membership before counts and paging. This filter never grants or requires email permission. In the UI, conditional groups use condition preview instead of manual additions. Existing explicit owner-exception operations stay available through the advanced service.
294
+
295
+ Before a reviewed `groups.update`, read `groups.list` and pass its `emailVersion` as optional `expectedGroup`. A 409 means the saved settings changed; read and review again before writing. Membership counts do not change this version. For the UI's Add people CSV behavior, pass `manualGroupsOnly:true` to `import.start`. The job keeps this choice and reports rows if a destination becomes conditional before processing; it never creates an include exception from that request. Retry with the same accepted key/payload, and inspect the saved job. Existing explicit advanced imports keep their prior contract when the option is omitted.
package/MAIL.md CHANGED
@@ -29,7 +29,7 @@ For an existing record, supply `id` and `expectedUpdatedAt` from `mail template
29
29
 
30
30
  The response reports `complete:true` and the saved records. Keep the exact payload and requestKey after a lost response. Repeating it returns the saved IDs without adding another template or step. Do not reuse a key for different content. A 409 means the saved version changed: retain the draft, read the current records, review the changes, and use a new key for the revised save. A failed transaction saves neither half. Subject, preview text, name and valid content are required. Saving never activates a series or sends email. Queued emails keep their saved content.
31
31
 
32
- The workspace's Back button returns to the source series and keeps unfinished work. A test sends only to the signed-in account in the workspace, and does not complete a step task. CLI test recipients remain explicit and subject to the existing test restrictions.
32
+ The workspace's Back button returns to the source series. If template edits are unsaved, the shared modal offers Cancel or Discard and continue. Discard loses the template edits; the pending source series stays in memory while this task is open. Leaving the whole task discards its unfinished work. Save & return and Save email & add step save the template and pending series together; there is no second Save series step. A test sends only to the signed-in account in the workspace, and does not complete a step task. CLI test recipients remain explicit and subject to the existing test restrictions.
33
33
 
34
34
  ## Group and stage email tasks
35
35
 
@@ -67,7 +67,7 @@ The response returns `complete:true`, `document` and `rule`. Repeating the same
67
67
 
68
68
  To attach an existing source, omit `document`. Add either `attachment.templateId` or `attachment.seriesId` and its `expectedSourceUpdatedAt` from a fresh template/series get. A series needs at least one saved step. The result includes the source and paused rule. To edit shared content from an existing entry rule, supply the existing document with `expectedUpdatedAt`, plus `attachment.ruleId` and `expectedRevision` from `rules.get`. This saves the content while leaving the rule's conditions, actions, version, enabled state, activation time and history unchanged. Stale group, stage, source or rule checks return a conflict; keep the draft and review the saved records before making a revised request.
69
69
 
70
- The workspace uses the existing template editor and returns to the source group or Stages after Save & return. Group, rule, stage, picker and template drafts use private recovery scoped to the signed-in user, site and browser tab. Duplicated tabs copy the recovery snapshot once and then save separately. Cancel uses the shared unsaved-changes confirmation. An unconfirmed completion must be recovered before leaving its task. A self-test sends only test content and does not complete a pending group task.
70
+ The workspace uses the existing template editor and returns to the source group or Stages after Save & return. Unfinished group, rule, stage, picker and template edits stay in memory only. Leaving uses the shared unsaved-changes modal: Cancel keeps editing; Discard and continue loses those edits and leaves without a network request. Refresh or closing the tab discards unfinished work without a browser prompt. Clean navigation and opening saved records show no warning. There is no editor backup or Recover save action. A template task keeps its source context in memory during the active flow; a refreshed task must be reopened from its source. A self-test sends only test content and does not complete a pending group task. Retry a submitted save with the exact original key and payload after a lost response; this does not require an editor backup.
71
71
 
72
72
  Templates remain shared. Changes affect future uses; already queued messages keep their content snapshots. Template get exposes `ruleUsage`; the UI also shows rule usage beside existing dependencies. Deleting a template used by a live rule, including a paused rule, fails with a conflict naming the rule. Remove the template action or archive the rule first. Series, form and receipt dependencies still apply. Archiving a rule keeps its run history and saved actions. Never activate, enroll or send without the user's instruction.
73
73
 
package/PEOPLE.md CHANGED
@@ -72,6 +72,8 @@ frontpage people groups archive --id GROUP_ID --site YOUR_SITE --json
72
72
  frontpage people groups restore --id GROUP_ID --site YOUR_SITE --json
73
73
  ```
74
74
 
75
+ For a reviewed group edit, read `groups.list` and pass the saved `emailVersion` as `expectedGroup` through `--data` or `--file` with `groups.update`. The workspace does this automatically. A changed name, color, mode, conditions or archive state returns 409 before writing. Membership counts do not invalidate the version. Read the latest group and review the change before trying again; do not replace the version and silently overwrite another edit. The check is optional for existing API callers.
76
+
75
77
  ### Select people from a manual group
76
78
 
77
79
  The group header offers **Add people** for manual groups and **View matching people** for conditional groups. Membership selection includes visible phone-only contacts and people without marketing permission. Current members are marked **Already in this group** and cannot be selected.
@@ -470,6 +472,8 @@ Use a saved CSV import for a new historical cohort. Its list-wide permission cho
470
472
 
471
473
  CSV imports accept up to 5 MB and 10,000 contact rows. Quoted commas, quoted newlines, UTF-8 BOM, and CRLF are supported. Larger lists need separate files; the UI does not render an unbounded list of failures.
472
474
 
475
+ The UI offers only Add people groups as import destinations and sends `manualGroupsOnly:true`. CLI and agent callers can pass the same option to `import.start`. The saved job retains it: if a selected group changes to Match conditions before processing, affected rows report an error instead of gaining an include exception. Completed rows stay saved. Restore Add people mode and retry the saved job, or preview a new import without that group. Omit this option only when deliberately using the existing advanced conditional-group include contract. Existing accepted jobs and saved exceptions keep their policy.
476
+
473
477
  ### 1. Upload and map columns
474
478
 
475
479
  ```
@@ -625,7 +629,7 @@ The agent can create and edit saved templates and series with the existing Email
625
629
  | groups.list | archived? | List groups; archived:true includes archived groups. |
626
630
  | groups.get | id | One group with its stages. |
627
631
  | groups.create | label, color?, mode?, conditions? | Create a group. |
628
- | groups.update | id, changed fields | Edit a group without changing its ID. |
632
+ | groups.update | id, changed fields, expectedGroup? | Edit a group; compare its saved emailVersion to reject a stale form before writes. |
629
633
  | groups.archive / groups.restore | id | Archive or restore a group. Related rules remain paused on restore. |
630
634
  | groups.preview | id or conditions; personId? or cursor? | Check conditions without changing membership. |
631
635
  | groups.people | groupId; q?, source?, sort?, page?, selectedOnly?, selected?, availability? | Read the manual-group picker, including phone-only contacts and current membership. |
@@ -655,7 +659,7 @@ The agent can create and edit saved templates and series with the existing Email
655
659
  | person.permission | personId, allowed; backfill?, expectedEmail?, evidence?, requestKey?; or backfill batch with people (1–25) | Record a decision or repair reviewed missing permission without automation. Unsubscribe and suppression still win. |
656
660
  | audience.preview | audience | Preview matched and eligible People for a campaign. |
657
661
  | import.preview | csv, mapping?, headersOnly? | Validate a CSV and match existing contacts; sends nothing. |
658
- | import.start | csv, mapping?, groupIds?, requestKey | Start a saved import. |
662
+ | import.start | csv, mapping?, groupIds?, requestKey, emailPermission?, manualGroupsOnly? | Start a saved import with frozen permission and optional manual-group policy. |
659
663
  | import.get | id | Read the import cursor, outcomes, and errors. |
660
664
  | import.retry | id | Retry failed rows after correcting saved identity conflicts. |
661
665
 
@@ -726,7 +730,7 @@ The response returns `complete:true`, `document` and `rule`. Repeating the same
726
730
 
727
731
  To attach an existing source, omit `document`. Add either `attachment.templateId` or `attachment.seriesId` and its `expectedSourceUpdatedAt` from a fresh template/series get. A series needs at least one saved step. The result includes the source and paused rule. To edit shared content from an existing entry rule, supply the existing document with `expectedUpdatedAt`, plus `attachment.ruleId` and `expectedRevision` from `rules.get`. This saves the content while leaving the rule's conditions, actions, version, enabled state, activation time and history unchanged. Stale group, stage, source or rule checks return a conflict; keep the draft and review the saved records before making a revised request.
728
732
 
729
- The workspace uses the existing template editor and returns to the source group or Stages after Save & return. Group, rule, stage, picker and template drafts use private recovery scoped to the signed-in user, site and browser tab. Duplicated tabs copy the recovery snapshot once and then save separately. Cancel uses the shared unsaved-changes confirmation. An unconfirmed completion must be recovered before leaving its task. A self-test sends only test content and does not complete a pending group task.
733
+ The workspace uses the existing template editor and returns to the source group or Stages after Save & return. Unfinished group, rule, stage, picker and template edits stay in memory only. Leaving uses the shared unsaved-changes modal: Cancel keeps editing; Discard and continue loses those edits and leaves without a network request. Refresh or closing the tab discards unfinished work without a browser prompt. Clean navigation and opening saved records show no warning. There is no editor backup or Recover save action. A template task keeps its source context in memory during the active flow; a refreshed task must be reopened from its source. A self-test sends only test content and does not complete a pending group task. Retry a submitted save with the exact original key and payload after a lost response; this does not require an editor backup.
730
734
 
731
735
  Templates remain shared. Changes affect future uses; already queued messages keep their content snapshots. Template get exposes `ruleUsage`; the UI also shows rule usage beside existing dependencies. Deleting a template used by a live rule, including a paused rule, fails with a conflict naming the rule. Remove the template action or archive the rule first. Series, form and receipt dependencies still apply. Archiving a rule keeps its run history and saved actions. Never activate, enroll or send without the user's instruction.
732
736
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "frontpage-host",
3
- "version": "0.3.1",
3
+ "version": "0.3.3",
4
4
  "description": "Frontpage CLI — manage your site from the terminal",
5
5
  "type": "module",
6
6
  "bin": {