command_tower 0.17.0 → 0.19.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.
- checksums.yaml +4 -4
- data/README.md +8 -8
- data/app/controllers/command_tower/me/inbox_controller.rb +16 -0
- data/app/deserializers/command_tower/deserializers/messaging/inbox.rb +85 -0
- data/app/deserializers/command_tower/deserializers/messaging/preferences/update_deserializer.rb +10 -1
- data/app/errors/command_tower/errors/account/push_test_destination_error.rb +21 -0
- data/app/jobs/command_tower/messaging/communications/produce_recipient_job.rb +2 -0
- data/app/models/command_tower/messaging/communication.rb +31 -0
- data/app/models/command_tower/messaging/inbox_item.rb +6 -0
- data/app/serializers/command_tower/serializers/messaging/inbox.rb +44 -1
- data/app/serializers/command_tower/serializers/messaging/preferences/notification_serializer.rb +2 -0
- data/app/services/command_tower/messaging/accept/coordinator.rb +16 -1
- data/app/services/command_tower/messaging/accept/persister.rb +13 -0
- data/app/services/command_tower/messaging/contract/mappers/communication_mapper.rb +7 -0
- data/app/services/command_tower/messaging/contract/results/communication_result.rb +1 -0
- data/app/services/command_tower/messaging/execution/adapter_result.rb +11 -1
- data/app/services/command_tower/messaging/execution/adapters/expo/adapter.rb +146 -25
- data/app/services/command_tower/messaging/execution/adapters/expo/configuration.rb +5 -0
- data/app/services/command_tower/messaging/execution/adapters/expo/endpoint_ticket_history.rb +86 -0
- data/app/services/command_tower/messaging/execution/adapters/expo/interruption_level.rb +41 -0
- data/app/services/command_tower/messaging/execution/attempt_ledger.rb +3 -0
- data/app/services/command_tower/messaging/execution/expo_receipt_collection.rb +224 -0
- data/app/services/command_tower/messaging/execution/operation_logger.rb +55 -5
- data/app/services/command_tower/messaging/execution/recovery.rb +8 -0
- data/app/services/command_tower/messaging/inbox/conversation_result.rb +31 -0
- data/app/services/command_tower/messaging/inbox/entry_result.rb +36 -0
- data/app/services/command_tower/messaging/inbox/reader.rb +246 -20
- data/app/services/command_tower/messaging/inbox/unread_count_result.rb +3 -2
- data/app/services/command_tower/messaging/inbox.rb +4 -0
- data/app/services/command_tower/messaging/notification_types/declaration.rb +19 -1
- data/app/services/command_tower/messaging/notification_types/declaration_validator.rb +62 -0
- data/app/services/command_tower/messaging/notification_types/permitted_choice.rb +55 -0
- data/app/services/command_tower/messaging/notification_types/registry.rb +25 -0
- data/app/services/command_tower/messaging/notification_types.rb +3 -0
- data/app/services/command_tower/messaging/preferences/catalog.rb +7 -0
- data/app/services/command_tower/messaging/preferences/catalog_notification_result.rb +26 -1
- data/app/services/command_tower/messaging/preferences/effective_choice.rb +92 -0
- data/app/services/command_tower/messaging/preferences/preference_state.rb +24 -4
- data/app/services/command_tower/messaging/preferences/store.rb +10 -0
- data/app/services/command_tower/messaging/preferences/update.rb +36 -4
- data/app/services/command_tower/messaging/rendering/channel_renderer.rb +63 -3
- data/app/services/command_tower/messaging/rendering/inbox_document.rb +27 -0
- data/app/services/command_tower/messaging/rendering/inbox_document_renderer.rb +53 -36
- data/app/services/command_tower/messaging/rendering/inbox_presentation_resolver.rb +52 -0
- data/app/services/command_tower/messaging/rendering/inbox_presentation_snapshot.rb +64 -0
- data/app/services/command_tower/messaging/rendering/push_presentation.rb +90 -0
- data/app/services/command_tower/messaging/rendering/rendered_push_payload.rb +54 -6
- data/app/services/command_tower/messaging/sound_catalog.rb +85 -0
- data/app/services/command_tower/messaging.rb +5 -1
- data/app/services/command_tower/services/account/push/send_self_test.rb +7 -1
- data/app/services/command_tower/services/messaging/communications/produce.rb +31 -0
- data/app/services/command_tower/services/messaging/communications/produce_many.rb +6 -0
- data/app/services/command_tower/services/messaging/inbox.rb +52 -2
- data/app/workflows/command_tower/workflows/me/error_mapping.rb +1 -0
- data/app/workflows/command_tower/workflows/messaging/communications/produce_recipient_workflow.rb +5 -1
- data/app/workflows/command_tower/workflows/messaging/execution/deliver_workflow.rb +5 -1
- data/app/workflows/command_tower/workflows/messaging/inbox.rb +15 -1
- data/config/routes.rb +1 -0
- data/db/migrate/20261010000001_add_inbox_presentation_snapshot_to_messaging_communications.rb +7 -0
- data/db/migrate/20261010000002_add_conversation_identity_to_messaging_communications.rb +10 -0
- data/db/migrate/20261012000001_add_provider_metadata_to_messaging_delivery_attempts.rb +7 -0
- data/db/migrate/20261012000002_add_finished_at_index_to_messaging_delivery_attempts.rb +8 -0
- data/docs/authorization.md +1 -1
- data/docs/bootstrap/00-ownership.md +77 -0
- data/docs/bootstrap/01-docker-make-compose.md +267 -0
- data/docs/bootstrap/02-create-the-rails-app.md +75 -0
- data/docs/bootstrap/03-pin-the-gem.md +53 -0
- data/docs/bootstrap/04-secrets-and-env.md +59 -0
- data/docs/bootstrap/05-install-migrate-doctor.md +74 -0
- data/docs/bootstrap/06-mount-and-health.md +53 -0
- data/docs/bootstrap/07-execution-bases.md +38 -0
- data/docs/bootstrap/08-initializer.md +90 -0
- data/docs/bootstrap/09-rbac.md +83 -0
- data/docs/bootstrap/10-roles-and-gates.md +62 -0
- data/docs/bootstrap/11-auth-client-path.md +57 -0
- data/docs/bootstrap/12-smoke-check.md +81 -0
- data/docs/bootstrap/13-optional.md +50 -0
- data/docs/bootstrap/14-sanity-checks.md +44 -0
- data/docs/bootstrap/README.md +90 -0
- data/docs/cookie_authentication_guide.md +11 -0
- data/docs/extending.md +3 -3
- data/docs/host_integration_guide.md +3 -281
- data/docs/initializing.md +37 -28
- data/docs/messaging_integration_guide.md +1 -1
- data/docs/principal_capabilities.md +1 -1
- data/docs/upgrades/0.10.0.md +5 -5
- data/docs/upgrades/0.11.0.md +5 -5
- data/docs/upgrades/0.18.0.md +35 -0
- data/docs/upgrades/0.19.0.md +40 -0
- data/docs/upgrades/README.md +3 -1
- data/lib/command_tower/authorization/default.yml +1 -0
- data/lib/command_tower/configuration/messaging/config.rb +10 -0
- data/lib/command_tower/configuration/messaging/expo.rb +61 -0
- data/lib/command_tower/install/baseline.rb +4 -0
- data/lib/command_tower/version.rb +1 -1
- metadata +36 -2
|
@@ -86,4 +86,4 @@ Me/Auth route gates (`session`, `me`, …) and unimplemented Admin entities are
|
|
|
86
86
|
- [API reference](api_reference.md#get-authprincipal-capabilities)
|
|
87
87
|
- [Authorization](authorization.md)
|
|
88
88
|
- [Admin Workspace](admin_workspace.md) — tool manifest only; not a UI permission probe
|
|
89
|
-
- [
|
|
89
|
+
- [Bootstrap a new host](bootstrap/README.md)
|
data/docs/upgrades/0.10.0.md
CHANGED
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
**From:** `0.5.0` (and earlier SchemaHelper-era hosts on `main`)
|
|
4
4
|
**To:** `0.10.0`
|
|
5
5
|
|
|
6
|
-
This document summarizes **all changes from `main` through the `0.10.0` release** (committed work on `schematizing` plus the modern platform working tree). It is the durable upgrade / change SST for hosts. For a sequenced blank-host path, use [
|
|
6
|
+
This document summarizes **all changes from `main` through the `0.10.0` release** (committed work on `schematizing` plus the modern platform working tree). It is the durable upgrade / change SST for hosts. For a sequenced blank-host path, use [Bootstrap a new host](../bootstrap/README.md).
|
|
7
7
|
|
|
8
8
|
## Breaking / host-impact
|
|
9
9
|
|
|
@@ -31,15 +31,15 @@ This document summarizes **all changes from `main` through the `0.10.0` release*
|
|
|
31
31
|
## Documentation
|
|
32
32
|
|
|
33
33
|
- Canonical HTTP catalog: [API reference](../api_reference.md)
|
|
34
|
-
- Host start-here: [
|
|
34
|
+
- Host start-here: [Bootstrap a new host](../bootstrap/README.md)
|
|
35
35
|
- Install SST: [Initializing](../initializing.md)
|
|
36
36
|
- Auth/cookie/RBAC guides refreshed to modern routes
|
|
37
37
|
- Messaging and pagination aligned to Inbox + Produce contracts
|
|
38
38
|
|
|
39
39
|
## Upgrade checklist (existing hosts)
|
|
40
40
|
|
|
41
|
-
1. Bump gem to `0.10.0` and run `
|
|
42
|
-
2. Set JWT + signup/recovery session secrets; run `
|
|
41
|
+
1. Bump gem to `0.10.0` and run `make rails ARGS='command_tower:install:migrations'` (or `SKIP_CONFIGURE=1 make rails ARGS='command_tower:install'`) then `make migrate`.
|
|
42
|
+
2. Set JWT + signup/recovery session secrets; run `make doctor`.
|
|
43
43
|
3. Add host `rbac_groups.yml` with a product role (typically `member`) that **grants** CT-owned entity names; do not redefine engine `owner` or copy CT controller mappings. Operational Admin roles are host-owned.
|
|
44
44
|
4. Ensure users who need Me surfaces have the host `member` role (or equivalent).
|
|
45
45
|
5. Enable feature gates you rely on (`login.plain_text.enable`, password reset, email verify, availability).
|
|
@@ -47,7 +47,7 @@ This document summarizes **all changes from `main` through the `0.10.0` release*
|
|
|
47
47
|
7. Smoke: Bearer login → `GET /me` returns **200** (not **403**).
|
|
48
48
|
8. If emitting messages: catalog, channels, adapters; call Produce from host workflows.
|
|
49
49
|
|
|
50
|
-
New hosts: follow [
|
|
50
|
+
New hosts: follow [Bootstrap a new host](../bootstrap/README.md) end-to-end.
|
|
51
51
|
|
|
52
52
|
## Related
|
|
53
53
|
|
data/docs/upgrades/0.11.0.md
CHANGED
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
**From:** `0.10.0`
|
|
4
4
|
**To:** `0.11.0`
|
|
5
5
|
|
|
6
|
-
This document summarizes **host-visible changes from `0.10.0` through the `0.11.0` release**. It is the durable upgrade / change SST for hosts already on the Auth/Me/Messaging platform. For a sequenced blank-host path, use [
|
|
6
|
+
This document summarizes **host-visible changes from `0.10.0` through the `0.11.0` release**. It is the durable upgrade / change SST for hosts already on the Auth/Me/Messaging platform. For a sequenced blank-host path, use [Bootstrap a new host](../bootstrap/README.md).
|
|
7
7
|
|
|
8
8
|
## Breaking / host-impact
|
|
9
9
|
|
|
@@ -67,13 +67,13 @@ See dummy composition in `rails_app/config/rbac_groups.yml`.
|
|
|
67
67
|
- [Audit](../audit.md)
|
|
68
68
|
- [Admin Workspace](../admin_workspace.md)
|
|
69
69
|
- [Principal capabilities](../principal_capabilities.md)
|
|
70
|
-
- Host start-here: [
|
|
70
|
+
- Host start-here: [Bootstrap a new host](../bootstrap/README.md)
|
|
71
71
|
- Canonical HTTP catalog: [API reference](../api_reference.md)
|
|
72
72
|
|
|
73
73
|
## Upgrade checklist (existing 0.10.0 hosts)
|
|
74
74
|
|
|
75
|
-
1. Bump gem to `0.11.0` and run `
|
|
76
|
-
2. Run `
|
|
75
|
+
1. Bump gem to `0.11.0` and run `make rails ARGS='command_tower:install:migrations'` then `make migrate`.
|
|
76
|
+
2. Run `make doctor`.
|
|
77
77
|
3. Grant `principal_capabilities` (and `me_audit_events` if Account Activity is in product) on host `member` / equivalent.
|
|
78
78
|
4. Explicitly grant Admin entities to **host-owned** operator roles (`admin_workspace`, `admin_users`, `admin_users_update`, `admin_rbac_assignments`, `admin_audit_events`, `admin_impersonation`) — do not assume a platform `admin` role.
|
|
79
79
|
5. Point Admin FE gating at `GET /auth/principal-capabilities`, not `GET /admin/workspace`.
|
|
@@ -81,7 +81,7 @@ See dummy composition in `rails_app/config/rbac_groups.yml`.
|
|
|
81
81
|
7. Smoke: login → `GET /auth/principal-capabilities` **200**; operator with grants → `GET /admin/workspace` **200**; without grants → **403**.
|
|
82
82
|
8. Smoke: start impersonation → Admin routes **418**; `DELETE /auth/impersonation-session` restores actor.
|
|
83
83
|
|
|
84
|
-
New hosts: follow [
|
|
84
|
+
New hosts: follow [Bootstrap a new host](../bootstrap/README.md) end-to-end (includes 0.10.0 foundations plus this release).
|
|
85
85
|
|
|
86
86
|
## Related
|
|
87
87
|
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
# Upgrade: CommandTower 0.18.0
|
|
2
|
+
|
|
3
|
+
**From:** `0.17.0`
|
|
4
|
+
**To:** `0.18.0`
|
|
5
|
+
|
|
6
|
+
Minor release: inbox conversations. A host can stamp a stable key and title when it produces a message. The inbox list groups those messages. A conversation can be read as a window of at most 5 rendered documents. Accept stores the first presentation node's data so a later read does not recompute it. Two new migrations.
|
|
7
|
+
|
|
8
|
+
## Host-visible changes
|
|
9
|
+
|
|
10
|
+
| Change | Host impact |
|
|
11
|
+
|--------|-------------|
|
|
12
|
+
| `Produce` `conversation_key` / `conversation_title` | Optional pair. Both or neither. Stored on the Communication. Not part of the accept fingerprint or metadata. A replay keeps the first pair. A produce with no pair stays null and remains a standalone inbox row. |
|
|
13
|
+
| `GET /me/inbox` | One entry per standalone message or per `conversation_key` in the requested scope. Each entry has `kind` (`message` or `conversation`), `id`, `title`, `preview`, `messageCount`, `unreadCount`, `read`, and `inboxItemIds`. Title and preview come from the latest in-scope member. |
|
|
14
|
+
| `GET /me/inbox/conversation` | Members for `key` and `scope`, oldest first. Does not mark them viewed. `messageCount`, `unreadCount`, and `inboxItemIds` describe the whole scope. `messages` is the rendered slice. |
|
|
15
|
+
| Window params | Optional and mutually exclusive: `around=oldest_unread`, `around=<inbox item id>`, `before`, or `after`, plus `limit`. A window renders at most 5. The first `around` window includes the oldest unread member (or the latest when none are unread), at most 2 older members, then newer members until the total is 5. Omitting the window params returns every member and no `window` key. |
|
|
16
|
+
| Cursor errors | A cursor outside this recipient, key, and scope is `422`. An unknown key stays `404`. `limit` above 5, or combined cursors, is `422`. |
|
|
17
|
+
| `inbox_presentation_snapshot` | Nullable JSON on `messaging_communications`. Accept captures the first presentation node inside the existing transaction. A failed capture stores `{ "v": 1, "omitted": true }`. No presentation node leaves the column null. Inbox detail reads the stored payload. |
|
|
18
|
+
| RBAC | `conversation` is a new action on the existing Me inbox entity. |
|
|
19
|
+
|
|
20
|
+
## Host actions
|
|
21
|
+
|
|
22
|
+
1. Bump gem to `0.18.0` (or `>= 0.18.0`).
|
|
23
|
+
2. Install and migrate:
|
|
24
|
+
- `bundle exec rails command_tower:install:migrations`
|
|
25
|
+
- `bundle exec rails db:migrate`
|
|
26
|
+
- New files: `20261010000001_add_inbox_presentation_snapshot_to_messaging_communications`, `20261010000002_add_conversation_identity_to_messaging_communications`.
|
|
27
|
+
3. Pass `conversation_key` and `conversation_title` from Produce only when a message should join a conversation. Existing producers that omit the pair stay standalone. There is no backfill.
|
|
28
|
+
4. If the host copied the Me inbox action list instead of granting the entity, add `conversation`. An entity grant already includes the new action.
|
|
29
|
+
5. If the host parses `GET /me/inbox` items as one row per inbox item, read the grouped entry shape instead.
|
|
30
|
+
|
|
31
|
+
## Not in this release
|
|
32
|
+
|
|
33
|
+
- No backfill of historical conversation keys or presentation snapshots. Null stays null.
|
|
34
|
+
- No Conversation table. Grouping is the key column plus the list query.
|
|
35
|
+
- CommandTower frontend conversation feed, windowed scrolling, and narrow-web header. Those ship with the frontend package, not this gem.
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
# Upgrade: CommandTower 0.19.0
|
|
2
|
+
|
|
3
|
+
**From:** `0.18.0`
|
|
4
|
+
**To:** `0.19.0`
|
|
5
|
+
|
|
6
|
+
Minor release: how a push presents itself, and Expo ticket and receipt facts. Notification types can declare badge eligibility, urgency, sound, and a required deep link. Preferences can store urgency and sound. Expo send records provider metadata, and the existing recovery job collects receipts afterward. Two new migrations.
|
|
7
|
+
|
|
8
|
+
## Host-visible changes
|
|
9
|
+
|
|
10
|
+
| Change | Host impact |
|
|
11
|
+
|--------|-------------|
|
|
12
|
+
| Notification type declaration | Optional `badge_eligible` (default false), `urgency`, `sound`, and `deep_link_required` (default false). Omitted urgency and sound stay fixed at `normal` and `default`. |
|
|
13
|
+
| `config.messaging.sounds` | Host entries `{ id:, label:, asset: }` appended after System Default (`id: "default"`, no asset). Asset names end in `.wav`, `.aiff`, or `.caf`. Invalid catalogs fail registry seal. |
|
|
14
|
+
| `config.messaging.expo.home_deep_link` | String or zero-argument Proc. Required when a push-capable type is registered and the Expo adapter is not `disabled`. Used when a push has no metadata `deep_link` and no live inbox item. |
|
|
15
|
+
| `config.messaging.expo.self_test_deep_link` | String or zero-argument Proc. Resolved when `POST /me/push/test` runs. Blank fails the test before Produce. |
|
|
16
|
+
| `config.messaging.expo.interruption_levels` | Subset of `normal`, `time_sensitive`, `critical`. Default is `["normal"]`. A declared urgency above this set degrades `critical` → `time_sensitive` → `normal`. |
|
|
17
|
+
| Produce `metadata.deep_link` | Required when the type sets `deep_link_required` and the value is missing. Push-capable types that are not inbox-backed should set that flag. |
|
|
18
|
+
| Preferences | `GET` catalog entries include `urgency` and `sound`. `PATCH` accepts `preferences.urgency` and `preferences.sound` alongside inbox and channels. |
|
|
19
|
+
| Inbox unread | `Messaging::Inbox.unread_count` returns `count` and `badge_count`. `badge_count` is unread items whose type is badge-eligible. Expo `badge` is sent only for those types, including `0`. |
|
|
20
|
+
| Push thread | A communication with `conversation_key` sends that key as the push thread id. |
|
|
21
|
+
| Delivery attempts | Nullable `provider_metadata` JSON stores Expo ticket and receipt facts. `finished_at` is indexed for receipt collection. |
|
|
22
|
+
| Recovery | After the existing redrive, receipt collection runs. A collection error is logged and does not fail the redrive. |
|
|
23
|
+
|
|
24
|
+
## Host actions
|
|
25
|
+
|
|
26
|
+
1. Bump gem to `0.19.0` (or `>= 0.19.0`).
|
|
27
|
+
2. Install and migrate:
|
|
28
|
+
- `bundle exec rails command_tower:install:migrations`
|
|
29
|
+
- `bundle exec rails db:migrate`
|
|
30
|
+
- New files: `20261012000001_add_provider_metadata_to_messaging_delivery_attempts`, `20261012000002_add_finished_at_index_to_messaging_delivery_attempts`.
|
|
31
|
+
3. If Expo is not `disabled` and any type allows push, set `config.messaging.expo.home_deep_link`. Registry seal raises without it.
|
|
32
|
+
4. Set `self_test_deep_link` before members use push self-test.
|
|
33
|
+
5. Add `time_sensitive` to `interruption_levels` only after the shipped iOS binary has the Time Sensitive capability. Leave `critical` off unless Apple granted Critical Alerts.
|
|
34
|
+
6. Existing declarations that omit the new fields keep today's behavior: no badge, fixed normal urgency, System Default sound, deep link not required.
|
|
35
|
+
|
|
36
|
+
## Not in this release
|
|
37
|
+
|
|
38
|
+
- No host notification types. Hosts still register their own keys.
|
|
39
|
+
- No bundled custom sound files. The catalog stores the asset name. The app binary supplies the file.
|
|
40
|
+
- No backfill of `provider_metadata`. Existing attempts stay null.
|
data/docs/upgrades/README.md
CHANGED
|
@@ -4,6 +4,8 @@ Host-facing upgrade / change summaries for CommandTower releases.
|
|
|
4
4
|
|
|
5
5
|
| Version | Summary |
|
|
6
6
|
|---------|---------|
|
|
7
|
+
| [0.19.0](0.19.0.md) | Push presentation: badge, urgency, sound, deep links; Expo ticket and receipt metadata; preference urgency and sound |
|
|
8
|
+
| [0.18.0](0.18.0.md) | Inbox conversations: optional Produce identity, grouped list entries, `GET /me/inbox/conversation` window of at most 5, accept-time presentation snapshot |
|
|
7
9
|
| [0.17.0](0.17.0.md) | Client-version-compatibility gating (`observe`/`enforce`); Rich Messaging Inbox `content` documents; host-overridable rendering templates; shared email theming |
|
|
8
10
|
| [0.16.0](0.16.0.md) | Me experience-states (`GET`/`POST complete`); `host_key`; `user_experience_states` migration; `me_experience_states` RBAC |
|
|
9
11
|
| [0.15.0](0.15.0.md) | Me `POST /me/push/test` → Produce (`push_delivery_test`); configurable Expo self-test rate limit composers; `me_push#test` |
|
|
@@ -15,4 +17,4 @@ Host-facing upgrade / change summaries for CommandTower releases.
|
|
|
15
17
|
| [0.11.0](0.11.0.md) | Execution context, audit ledger, Admin Workspace, principal capabilities, impersonation, Admin Users |
|
|
16
18
|
| [0.10.0](0.10.0.md) | Modern Auth/Me/Messaging platform; SchemaHelper removal; host RBAC required |
|
|
17
19
|
|
|
18
|
-
New hosts should start with [
|
|
20
|
+
New hosts should start with [Bootstrap a new host](../bootstrap/README.md).
|
|
@@ -46,6 +46,16 @@ module CommandTower
|
|
|
46
46
|
default: ->(_selection) { [] },
|
|
47
47
|
default_shown: "->(_selection) { [] }"
|
|
48
48
|
|
|
49
|
+
add_composer :sounds,
|
|
50
|
+
desc: "Host-registered push sounds appended to the engine's System Default " \
|
|
51
|
+
"(id \"default\", no bundled asset). Array of { id:, label:, asset: } hashes; " \
|
|
52
|
+
"`asset` is the native file reference. Ids are lowercase snake_case and unique. " \
|
|
53
|
+
"Physical asset availability is verified by the iOS app, not here. " \
|
|
54
|
+
"Validated at notification-type registry seal.",
|
|
55
|
+
allowed: Array,
|
|
56
|
+
default: [],
|
|
57
|
+
default_shown: "[]"
|
|
58
|
+
|
|
49
59
|
add_composer :sms,
|
|
50
60
|
desc: "Messaging notification SMS delivery configuration (not Identity OTP)",
|
|
51
61
|
allowed: Sms,
|
|
@@ -9,6 +9,9 @@ module CommandTower
|
|
|
9
9
|
include ClassComposer::Generator
|
|
10
10
|
|
|
11
11
|
ADAPTERS = %w[disabled fake log http].freeze
|
|
12
|
+
# Mirrors Messaging::NotificationTypes::URGENCY_LEVELS. Kept literal because this file
|
|
13
|
+
# loads before the app's autoloaded constants; a spec keeps the two in step.
|
|
14
|
+
INTERRUPTION_LEVELS = %w[normal time_sensitive critical].freeze
|
|
12
15
|
|
|
13
16
|
add_composer :adapter,
|
|
14
17
|
desc: "Expo Push delivery: disabled | fake | log | http. Default disabled (fail closed).",
|
|
@@ -45,6 +48,64 @@ module CommandTower
|
|
|
45
48
|
"(default 3600 = one hour).",
|
|
46
49
|
allowed: Integer,
|
|
47
50
|
default: 3600
|
|
51
|
+
|
|
52
|
+
add_composer :home_deep_link,
|
|
53
|
+
desc: "Host Home deep link used when a push has no metadata deep_link and no live inbox item. " \
|
|
54
|
+
"String or zero-argument Proc. Seal checks presence and does not call a Proc. " \
|
|
55
|
+
"Required when a push-capable type is registered and the Expo adapter is not disabled.",
|
|
56
|
+
allowed: [String, Proc, NilClass],
|
|
57
|
+
default: nil
|
|
58
|
+
|
|
59
|
+
add_composer :self_test_deep_link,
|
|
60
|
+
desc: "Deep link for the account push self-test. String or zero-argument Proc. " \
|
|
61
|
+
"Resolved only when SendSelfTest runs. Blank fails the test before Produce.",
|
|
62
|
+
allowed: [String, Proc, NilClass],
|
|
63
|
+
default: nil
|
|
64
|
+
|
|
65
|
+
add_composer :interruption_levels,
|
|
66
|
+
desc: "Urgency levels this host's shipped iOS binary can honor, as Expo `interruptionLevel`. " \
|
|
67
|
+
"Subset of normal, time_sensitive, critical. `normal` is always supported. A declared " \
|
|
68
|
+
"urgency above this set degrades critical -> time_sensitive -> normal. Add `time_sensitive` " \
|
|
69
|
+
"only after the binary carries the Time Sensitive capability, and `critical` only with " \
|
|
70
|
+
"Apple's Critical Alerts entitlement. Default normal only.",
|
|
71
|
+
allowed: Array,
|
|
72
|
+
default: ["normal"],
|
|
73
|
+
default_shown: '["normal"]',
|
|
74
|
+
validator: ->(val) { val.all? { |level| INTERRUPTION_LEVELS.include?(level) } },
|
|
75
|
+
invalid_message: ->(val) { "Provided #{val.inspect}. Allowed levels: #{INTERRUPTION_LEVELS.join(', ')}" }
|
|
76
|
+
|
|
77
|
+
def home_deep_link_configured?
|
|
78
|
+
link_configured?(home_deep_link)
|
|
79
|
+
end
|
|
80
|
+
|
|
81
|
+
def resolve_home_deep_link
|
|
82
|
+
resolve_link(home_deep_link)
|
|
83
|
+
end
|
|
84
|
+
|
|
85
|
+
def self_test_deep_link_configured?
|
|
86
|
+
link_configured?(self_test_deep_link)
|
|
87
|
+
end
|
|
88
|
+
|
|
89
|
+
def resolve_self_test_deep_link
|
|
90
|
+
resolve_link(self_test_deep_link)
|
|
91
|
+
end
|
|
92
|
+
|
|
93
|
+
private
|
|
94
|
+
|
|
95
|
+
def link_configured?(value)
|
|
96
|
+
return true if value.respond_to?(:call)
|
|
97
|
+
return false unless value.is_a?(String)
|
|
98
|
+
|
|
99
|
+
!value.strip.empty?
|
|
100
|
+
end
|
|
101
|
+
|
|
102
|
+
def resolve_link(value)
|
|
103
|
+
resolved = value.respond_to?(:call) ? value.call : value
|
|
104
|
+
return nil unless resolved.is_a?(String)
|
|
105
|
+
|
|
106
|
+
stripped = resolved.strip
|
|
107
|
+
stripped.empty? ? nil : stripped
|
|
108
|
+
end
|
|
48
109
|
end
|
|
49
110
|
end
|
|
50
111
|
end
|
|
@@ -16,6 +16,10 @@ module CommandTower
|
|
|
16
16
|
20260817000003_create_command_tower_impersonation_sessions.rb
|
|
17
17
|
20260826140000_add_deleted_at_to_users.rb
|
|
18
18
|
20260906180000_create_user_experience_states.rb
|
|
19
|
+
20261010000001_add_inbox_presentation_snapshot_to_messaging_communications.rb
|
|
20
|
+
20261010000002_add_conversation_identity_to_messaging_communications.rb
|
|
21
|
+
20261012000001_add_provider_metadata_to_messaging_delivery_attempts.rb
|
|
22
|
+
20261012000002_add_finished_at_index_to_messaging_delivery_attempts.rb
|
|
19
23
|
].freeze
|
|
20
24
|
|
|
21
25
|
module_function
|
metadata
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: command_tower
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 0.
|
|
4
|
+
version: 0.19.0
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- matt-taylor
|
|
8
8
|
autorequire:
|
|
9
9
|
bindir: bin
|
|
10
10
|
cert_chain: []
|
|
11
|
-
date: 2026-
|
|
11
|
+
date: 2026-10-14 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: phonelib
|
|
@@ -275,6 +275,7 @@ files:
|
|
|
275
275
|
- app/errors/command_tower/errors/account/phone_verification_throttled_error.rb
|
|
276
276
|
- app/errors/command_tower/errors/account/push_capability_unavailable_error.rb
|
|
277
277
|
- app/errors/command_tower/errors/account/push_endpoint_not_found_error.rb
|
|
278
|
+
- app/errors/command_tower/errors/account/push_test_destination_error.rb
|
|
278
279
|
- app/errors/command_tower/errors/account/push_test_no_endpoint_error.rb
|
|
279
280
|
- app/errors/command_tower/errors/account/push_test_rate_limit_error.rb
|
|
280
281
|
- app/errors/command_tower/errors/account/pushover_already_configured_error.rb
|
|
@@ -503,7 +504,9 @@ files:
|
|
|
503
504
|
- app/services/command_tower/messaging/execution/adapters/email/configuration.rb
|
|
504
505
|
- app/services/command_tower/messaging/execution/adapters/expo/adapter.rb
|
|
505
506
|
- app/services/command_tower/messaging/execution/adapters/expo/configuration.rb
|
|
507
|
+
- app/services/command_tower/messaging/execution/adapters/expo/endpoint_ticket_history.rb
|
|
506
508
|
- app/services/command_tower/messaging/execution/adapters/expo/http_client.rb
|
|
509
|
+
- app/services/command_tower/messaging/execution/adapters/expo/interruption_level.rb
|
|
507
510
|
- app/services/command_tower/messaging/execution/adapters/fake_adapter.rb
|
|
508
511
|
- app/services/command_tower/messaging/execution/adapters/pushover/adapter.rb
|
|
509
512
|
- app/services/command_tower/messaging/execution/adapters/pushover/configuration.rb
|
|
@@ -514,6 +517,7 @@ files:
|
|
|
514
517
|
- app/services/command_tower/messaging/execution/adapters/unconfigured_adapter.rb
|
|
515
518
|
- app/services/command_tower/messaging/execution/attempt_ledger.rb
|
|
516
519
|
- app/services/command_tower/messaging/execution/claim.rb
|
|
520
|
+
- app/services/command_tower/messaging/execution/expo_receipt_collection.rb
|
|
517
521
|
- app/services/command_tower/messaging/execution/invalid_adapter_contract_error.rb
|
|
518
522
|
- app/services/command_tower/messaging/execution/operation_logger.rb
|
|
519
523
|
- app/services/command_tower/messaging/execution/readiness_terminal_mapping.rb
|
|
@@ -527,6 +531,8 @@ files:
|
|
|
527
531
|
- app/services/command_tower/messaging/handoff/recovery.rb
|
|
528
532
|
- app/services/command_tower/messaging/inbox.rb
|
|
529
533
|
- app/services/command_tower/messaging/inbox/bulk_result.rb
|
|
534
|
+
- app/services/command_tower/messaging/inbox/conversation_result.rb
|
|
535
|
+
- app/services/command_tower/messaging/inbox/entry_result.rb
|
|
530
536
|
- app/services/command_tower/messaging/inbox/error.rb
|
|
531
537
|
- app/services/command_tower/messaging/inbox/invalid_bulk_items_error.rb
|
|
532
538
|
- app/services/command_tower/messaging/inbox/invariant_error.rb
|
|
@@ -547,6 +553,7 @@ files:
|
|
|
547
553
|
- app/services/command_tower/messaging/notification_types/error.rb
|
|
548
554
|
- app/services/command_tower/messaging/notification_types/invalid_declaration_error.rb
|
|
549
555
|
- app/services/command_tower/messaging/notification_types/not_found_error.rb
|
|
556
|
+
- app/services/command_tower/messaging/notification_types/permitted_choice.rb
|
|
550
557
|
- app/services/command_tower/messaging/notification_types/registry.rb
|
|
551
558
|
- app/services/command_tower/messaging/notification_types/sealed_registry_error.rb
|
|
552
559
|
- app/services/command_tower/messaging/planner.rb
|
|
@@ -565,6 +572,7 @@ files:
|
|
|
565
572
|
- app/services/command_tower/messaging/preferences/catalog_category_result.rb
|
|
566
573
|
- app/services/command_tower/messaging/preferences/catalog_notification_result.rb
|
|
567
574
|
- app/services/command_tower/messaging/preferences/catalog_result.rb
|
|
575
|
+
- app/services/command_tower/messaging/preferences/effective_choice.rb
|
|
568
576
|
- app/services/command_tower/messaging/preferences/error.rb
|
|
569
577
|
- app/services/command_tower/messaging/preferences/evaluation_result.rb
|
|
570
578
|
- app/services/command_tower/messaging/preferences/evaluator.rb
|
|
@@ -597,12 +605,16 @@ files:
|
|
|
597
605
|
- app/services/command_tower/messaging/rendering/channel_renderer.rb
|
|
598
606
|
- app/services/command_tower/messaging/rendering/inbox_document.rb
|
|
599
607
|
- app/services/command_tower/messaging/rendering/inbox_document_renderer.rb
|
|
608
|
+
- app/services/command_tower/messaging/rendering/inbox_presentation_resolver.rb
|
|
609
|
+
- app/services/command_tower/messaging/rendering/inbox_presentation_snapshot.rb
|
|
610
|
+
- app/services/command_tower/messaging/rendering/push_presentation.rb
|
|
600
611
|
- app/services/command_tower/messaging/rendering/render_error.rb
|
|
601
612
|
- app/services/command_tower/messaging/rendering/rendered_payload.rb
|
|
602
613
|
- app/services/command_tower/messaging/rendering/rendered_push_payload.rb
|
|
603
614
|
- app/services/command_tower/messaging/rendering/rendered_pushover_payload.rb
|
|
604
615
|
- app/services/command_tower/messaging/rendering/rendered_sms_payload.rb
|
|
605
616
|
- app/services/command_tower/messaging/rendering/template_resolver.rb
|
|
617
|
+
- app/services/command_tower/messaging/sound_catalog.rb
|
|
606
618
|
- app/services/command_tower/secrets.rb
|
|
607
619
|
- app/services/command_tower/secrets/cleanse.rb
|
|
608
620
|
- app/services/command_tower/secrets/generate.rb
|
|
@@ -794,6 +806,10 @@ files:
|
|
|
794
806
|
- db/migrate/20260817000003_create_command_tower_impersonation_sessions.rb
|
|
795
807
|
- db/migrate/20260826140000_add_deleted_at_to_users.rb
|
|
796
808
|
- db/migrate/20260906180000_create_user_experience_states.rb
|
|
809
|
+
- db/migrate/20261010000001_add_inbox_presentation_snapshot_to_messaging_communications.rb
|
|
810
|
+
- db/migrate/20261010000002_add_conversation_identity_to_messaging_communications.rb
|
|
811
|
+
- db/migrate/20261012000001_add_provider_metadata_to_messaging_delivery_attempts.rb
|
|
812
|
+
- db/migrate/20261012000002_add_finished_at_index_to_messaging_delivery_attempts.rb
|
|
797
813
|
- docs/admin_workspace.md
|
|
798
814
|
- docs/api_reference.md
|
|
799
815
|
- docs/architecture.md
|
|
@@ -801,6 +817,22 @@ files:
|
|
|
801
817
|
- docs/authentication.md
|
|
802
818
|
- docs/authentication_authorization_guide.md
|
|
803
819
|
- docs/authorization.md
|
|
820
|
+
- docs/bootstrap/00-ownership.md
|
|
821
|
+
- docs/bootstrap/01-docker-make-compose.md
|
|
822
|
+
- docs/bootstrap/02-create-the-rails-app.md
|
|
823
|
+
- docs/bootstrap/03-pin-the-gem.md
|
|
824
|
+
- docs/bootstrap/04-secrets-and-env.md
|
|
825
|
+
- docs/bootstrap/05-install-migrate-doctor.md
|
|
826
|
+
- docs/bootstrap/06-mount-and-health.md
|
|
827
|
+
- docs/bootstrap/07-execution-bases.md
|
|
828
|
+
- docs/bootstrap/08-initializer.md
|
|
829
|
+
- docs/bootstrap/09-rbac.md
|
|
830
|
+
- docs/bootstrap/10-roles-and-gates.md
|
|
831
|
+
- docs/bootstrap/11-auth-client-path.md
|
|
832
|
+
- docs/bootstrap/12-smoke-check.md
|
|
833
|
+
- docs/bootstrap/13-optional.md
|
|
834
|
+
- docs/bootstrap/14-sanity-checks.md
|
|
835
|
+
- docs/bootstrap/README.md
|
|
804
836
|
- docs/change_password_workflow.md
|
|
805
837
|
- docs/controllers.md
|
|
806
838
|
- docs/cookie_authentication_guide.md
|
|
@@ -826,6 +858,8 @@ files:
|
|
|
826
858
|
- docs/upgrades/0.15.0.md
|
|
827
859
|
- docs/upgrades/0.16.0.md
|
|
828
860
|
- docs/upgrades/0.17.0.md
|
|
861
|
+
- docs/upgrades/0.18.0.md
|
|
862
|
+
- docs/upgrades/0.19.0.md
|
|
829
863
|
- docs/upgrades/README.md
|
|
830
864
|
- lib/command_tower.rb
|
|
831
865
|
- lib/command_tower/admin_scope.rb
|