command_tower 0.4.0 → 0.11.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.
Files changed (722) hide show
  1. checksums.yaml +4 -4
  2. data/README.md +106 -29
  3. data/app/auth/command_tower/auth/auth_context.rb +42 -0
  4. data/app/auth/command_tower/auth/password_recovery_session_context.rb +11 -0
  5. data/app/auth/command_tower/auth/signup_session_context.rb +11 -0
  6. data/app/controllers/command_tower/admin/application_controller.rb +27 -0
  7. data/app/controllers/command_tower/admin/audit/events_controller.rb +61 -0
  8. data/app/controllers/command_tower/admin/messaging/announcements_controller.rb +27 -0
  9. data/app/controllers/command_tower/admin/users/identities_controller.rb +77 -0
  10. data/app/controllers/command_tower/admin/users/impersonation_sessions_controller.rb +33 -0
  11. data/app/controllers/command_tower/admin/users/roles_controller.rb +40 -0
  12. data/app/controllers/command_tower/admin/users_controller.rb +46 -0
  13. data/app/controllers/command_tower/admin/workspace_controller.rb +15 -0
  14. data/app/controllers/command_tower/application_controller.rb +97 -15
  15. data/app/controllers/command_tower/auth/email/availability_controller.rb +35 -0
  16. data/app/controllers/command_tower/auth/email_verification/send_controller.rb +24 -0
  17. data/app/controllers/command_tower/auth/email_verification/verify_controller.rb +41 -0
  18. data/app/controllers/command_tower/auth/identity_policy_controller.rb +14 -0
  19. data/app/controllers/command_tower/auth/impersonation_session_controller.rb +27 -0
  20. data/app/controllers/command_tower/auth/logout_controller.rb +16 -0
  21. data/app/controllers/command_tower/auth/password_recovery_session/create_controller.rb +17 -0
  22. data/app/controllers/command_tower/auth/password_reset/reset_controller.rb +35 -0
  23. data/app/controllers/command_tower/auth/password_reset/send_controller.rb +40 -0
  24. data/app/controllers/command_tower/auth/password_reset/validate_controller.rb +35 -0
  25. data/app/controllers/command_tower/auth/plain_text/login_controller.rb +22 -0
  26. data/app/controllers/command_tower/auth/principal_capabilities_controller.rb +19 -0
  27. data/app/controllers/command_tower/auth/register_controller.rb +33 -0
  28. data/app/controllers/command_tower/auth/session_controller.rb +21 -0
  29. data/app/controllers/command_tower/auth/signup_session/create_controller.rb +17 -0
  30. data/app/controllers/command_tower/auth/username/availability_controller.rb +35 -0
  31. data/app/controllers/command_tower/me/audit_events_controller.rb +59 -0
  32. data/app/controllers/command_tower/me/inbox_controller.rb +85 -0
  33. data/app/controllers/command_tower/me/name_controller.rb +37 -0
  34. data/app/controllers/command_tower/me/password_controller.rb +37 -0
  35. data/app/controllers/command_tower/me/phone_controller.rb +44 -0
  36. data/app/controllers/command_tower/me/phone_verification/verifications_controller.rb +23 -0
  37. data/app/controllers/command_tower/me/phone_verification/verify_controller.rb +34 -0
  38. data/app/controllers/command_tower/me/preferences_controller.rb +46 -0
  39. data/app/controllers/command_tower/me/pushover/verifications_controller.rb +23 -0
  40. data/app/controllers/command_tower/me/pushover_controller.rb +66 -0
  41. data/app/controllers/command_tower/me_controller.rb +19 -0
  42. data/app/controllers/command_tower/profile_controller.rb +19 -0
  43. data/app/controllers/concerns/command_tower/api/application_response_renderer.rb +87 -0
  44. data/app/controllers/concerns/command_tower/api/deserializer_failure_details.rb +22 -0
  45. data/app/controllers/concerns/command_tower/auth/authentication_boundary.rb +35 -0
  46. data/app/controllers/concerns/command_tower/auth/authorization_boundary.rb +26 -0
  47. data/app/controllers/concerns/command_tower/auth/invalid_credentials_deserializer_renderer.rb +23 -0
  48. data/app/controllers/concerns/command_tower/auth/password_recovery_session_boundary.rb +29 -0
  49. data/app/controllers/concerns/command_tower/auth/signup_session_boundary.rb +29 -0
  50. data/app/controllers/concerns/command_tower/execution/http_boundary.rb +65 -0
  51. data/app/deserializers/command_tower/deserializers/admin/messaging/create_announcement_deserializer.rb +106 -0
  52. data/app/deserializers/command_tower/deserializers/admin/scope_parameter.rb +49 -0
  53. data/app/deserializers/command_tower/deserializers/admin/users.rb +218 -0
  54. data/app/deserializers/command_tower/deserializers/application_deserializer.rb +148 -0
  55. data/app/deserializers/command_tower/deserializers/audit/events.rb +224 -0
  56. data/app/deserializers/command_tower/deserializers/auth/email_availability_deserializer.rb +19 -0
  57. data/app/deserializers/command_tower/deserializers/auth/email_verification/verify_deserializer.rb +21 -0
  58. data/app/deserializers/command_tower/deserializers/auth/password_reset/reset_deserializer.rb +31 -0
  59. data/app/deserializers/command_tower/deserializers/auth/password_reset/send_deserializer.rb +21 -0
  60. data/app/deserializers/command_tower/deserializers/auth/password_reset/validate_deserializer.rb +23 -0
  61. data/app/deserializers/command_tower/deserializers/auth/plain_text/login_deserializer.rb +24 -0
  62. data/app/deserializers/command_tower/deserializers/auth/register_deserializer.rb +42 -0
  63. data/app/deserializers/command_tower/deserializers/auth/username_availability_deserializer.rb +19 -0
  64. data/app/deserializers/command_tower/deserializers/clients/errors.rb +45 -0
  65. data/app/deserializers/command_tower/deserializers/clients/missing.rb +10 -0
  66. data/app/deserializers/command_tower/deserializers/clients/payload.rb +21 -0
  67. data/app/deserializers/command_tower/deserializers/clients/result.rb +122 -0
  68. data/app/deserializers/command_tower/deserializers/clients/types.rb +219 -0
  69. data/app/deserializers/command_tower/deserializers/coercion_result.rb +35 -0
  70. data/app/deserializers/command_tower/deserializers/failure.rb +14 -0
  71. data/app/deserializers/command_tower/deserializers/me/change_password_deserializer.rb +41 -0
  72. data/app/deserializers/command_tower/deserializers/me/phone_verification/verify_deserializer.rb +29 -0
  73. data/app/deserializers/command_tower/deserializers/me/pushover/credentials_deserializer.rb +31 -0
  74. data/app/deserializers/command_tower/deserializers/me/update_name_deserializer.rb +22 -0
  75. data/app/deserializers/command_tower/deserializers/me/update_phone_deserializer.rb +22 -0
  76. data/app/deserializers/command_tower/deserializers/messaging/inbox.rb +77 -0
  77. data/app/deserializers/command_tower/deserializers/messaging/preferences/show_deserializer.rb +17 -0
  78. data/app/deserializers/command_tower/deserializers/messaging/preferences/update_deserializer.rb +97 -0
  79. data/app/errors/command_tower/errors/account/phone_already_verified_error.rb +17 -0
  80. data/app/errors/command_tower/errors/account/phone_missing_error.rb +17 -0
  81. data/app/errors/command_tower/errors/account/phone_verification_code_invalid_error.rb +17 -0
  82. data/app/errors/command_tower/errors/account/phone_verification_expired_error.rb +17 -0
  83. data/app/errors/command_tower/errors/account/phone_verification_send_failed_error.rb +25 -0
  84. data/app/errors/command_tower/errors/account/phone_verification_stale_error.rb +17 -0
  85. data/app/errors/command_tower/errors/account/phone_verification_throttled_error.rb +24 -0
  86. data/app/errors/command_tower/errors/account/pushover_already_configured_error.rb +21 -0
  87. data/app/errors/command_tower/errors/account/pushover_capability_unavailable_error.rb +21 -0
  88. data/app/errors/command_tower/errors/account/pushover_not_configured_error.rb +21 -0
  89. data/app/errors/command_tower/errors/account/pushover_provider_unavailable_error.rb +21 -0
  90. data/app/errors/command_tower/errors/account/pushover_verification_failed_error.rb +27 -0
  91. data/app/errors/command_tower/errors/account/sms_capability_unavailable_error.rb +21 -0
  92. data/app/errors/command_tower/errors/application_error.rb +27 -0
  93. data/app/errors/command_tower/errors/auth/admin_unavailable_during_impersonation_error.rb +17 -0
  94. data/app/errors/command_tower/errors/auth/csrf_mismatch_error.rb +17 -0
  95. data/app/errors/command_tower/errors/auth/csrf_missing_error.rb +17 -0
  96. data/app/errors/command_tower/errors/auth/default_membership_assignment_error.rb +17 -0
  97. data/app/errors/command_tower/errors/auth/email_already_registered_error.rb +17 -0
  98. data/app/errors/command_tower/errors/auth/email_verification_required_error.rb +21 -0
  99. data/app/errors/command_tower/errors/auth/impersonation_session_expired_error.rb +17 -0
  100. data/app/errors/command_tower/errors/auth/impersonation_session_missing_error.rb +21 -0
  101. data/app/errors/command_tower/errors/auth/invalid_credentials_error.rb +21 -0
  102. data/app/errors/command_tower/errors/auth/nested_impersonation_error.rb +17 -0
  103. data/app/errors/command_tower/errors/auth/password_recovery_ip_rate_limit_error.rb +25 -0
  104. data/app/errors/command_tower/errors/auth/password_recovery_session_expired_error.rb +21 -0
  105. data/app/errors/command_tower/errors/auth/password_recovery_session_invalid_error.rb +21 -0
  106. data/app/errors/command_tower/errors/auth/password_recovery_session_missing_error.rb +21 -0
  107. data/app/errors/command_tower/errors/auth/password_recovery_session_rate_limit_error.rb +25 -0
  108. data/app/errors/command_tower/errors/auth/password_reset_invalid_token_error.rb +21 -0
  109. data/app/errors/command_tower/errors/auth/password_reset_unavailable_error.rb +21 -0
  110. data/app/errors/command_tower/errors/auth/self_impersonation_error.rb +21 -0
  111. data/app/errors/command_tower/errors/auth/signup_ip_rate_limit_error.rb +25 -0
  112. data/app/errors/command_tower/errors/auth/signup_session_expired_error.rb +17 -0
  113. data/app/errors/command_tower/errors/auth/signup_session_invalid_error.rb +17 -0
  114. data/app/errors/command_tower/errors/auth/signup_session_missing_error.rb +17 -0
  115. data/app/errors/command_tower/errors/auth/signup_session_rate_limit_error.rb +25 -0
  116. data/app/errors/command_tower/errors/auth/verification_code_invalid_error.rb +17 -0
  117. data/app/errors/command_tower/errors/auth/verification_send_failed_error.rb +25 -0
  118. data/app/errors/command_tower/errors/continuation_exhausted_error.rb +25 -0
  119. data/app/errors/command_tower/errors/forbidden_error.rb +19 -0
  120. data/app/errors/command_tower/errors/internal_error.rb +19 -0
  121. data/app/errors/command_tower/errors/messaging/accept_rejected_error.rb +21 -0
  122. data/app/errors/command_tower/errors/messaging/idempotency_conflict_error.rb +21 -0
  123. data/app/errors/command_tower/errors/messaging/recipient_unresolved_error.rb +21 -0
  124. data/app/errors/command_tower/errors/not_found_error.rb +19 -0
  125. data/app/errors/command_tower/errors/unauthorized_error.rb +19 -0
  126. data/app/errors/command_tower/errors/validation_error.rb +15 -0
  127. data/app/jobs/command_tower/application_job.rb +7 -0
  128. data/app/jobs/command_tower/execution/job_boundary.rb +19 -0
  129. data/app/jobs/command_tower/messaging/channel_delivery_execution_job.rb +18 -0
  130. data/app/jobs/command_tower/messaging/communications/produce_recipient_job.rb +24 -0
  131. data/app/jobs/command_tower/messaging/execution_recovery_job.rb +13 -0
  132. data/app/jobs/command_tower/messaging/handoff_job.rb +15 -0
  133. data/app/jobs/command_tower/messaging/handoff_recovery_job.rb +13 -0
  134. data/app/mailers/command_tower/application_mailer.rb +11 -1
  135. data/app/mailers/command_tower/email_verification_mailer.rb +5 -3
  136. data/app/mailers/command_tower/messaging/channel_mailer.rb +24 -0
  137. data/app/mailers/command_tower/password_reset_mailer.rb +18 -0
  138. data/app/models/command_tower/audit/event.rb +36 -0
  139. data/app/models/command_tower/impersonation/session.rb +51 -0
  140. data/app/models/command_tower/messaging/channel_delivery.rb +45 -0
  141. data/app/models/command_tower/messaging/communication.rb +60 -0
  142. data/app/models/command_tower/messaging/delivery_attempt.rb +28 -0
  143. data/app/models/command_tower/messaging/destination_plan.rb +17 -0
  144. data/app/models/command_tower/messaging/endpoint.rb +98 -0
  145. data/app/models/command_tower/messaging/endpoint_pushover_credential.rb +18 -0
  146. data/app/models/command_tower/messaging/inbox_item.rb +52 -0
  147. data/app/models/command_tower/messaging/notification_preference.rb +21 -0
  148. data/app/models/user.rb +4 -1
  149. data/app/serializers/command_tower/serializers/admin/messaging/announcement_response_serializer.rb +41 -0
  150. data/app/serializers/command_tower/serializers/admin/users.rb +69 -0
  151. data/app/serializers/command_tower/serializers/admin/workspace/manifest_serializer.rb +58 -0
  152. data/app/serializers/command_tower/serializers/application/envelope_serializer.rb +25 -0
  153. data/app/serializers/command_tower/serializers/application/error_entry_serializer.rb +18 -0
  154. data/app/serializers/command_tower/serializers/application_serializer.rb +26 -0
  155. data/app/serializers/command_tower/serializers/audit/events/filter_options_serializer.rb +44 -0
  156. data/app/serializers/command_tower/serializers/audit/events.rb +42 -0
  157. data/app/serializers/command_tower/serializers/auth/email_availability_serializer.rb +17 -0
  158. data/app/serializers/command_tower/serializers/auth/email_verification/message_response_serializer.rb +15 -0
  159. data/app/serializers/command_tower/serializers/auth/identity_policy_serializer.rb +36 -0
  160. data/app/serializers/command_tower/serializers/auth/login_response_serializer.rb +17 -0
  161. data/app/serializers/command_tower/serializers/auth/logout_response_serializer.rb +13 -0
  162. data/app/serializers/command_tower/serializers/auth/password_recovery_session_response_serializer.rb +16 -0
  163. data/app/serializers/command_tower/serializers/auth/password_reset/message_response_serializer.rb +15 -0
  164. data/app/serializers/command_tower/serializers/auth/password_reset/validate_response_serializer.rb +22 -0
  165. data/app/serializers/command_tower/serializers/auth/principal_capabilities_serializer.rb +15 -0
  166. data/app/serializers/command_tower/serializers/auth/register_response_serializer.rb +16 -0
  167. data/app/serializers/command_tower/serializers/auth/session_response_serializer.rb +40 -0
  168. data/app/serializers/command_tower/serializers/auth/signup_session_response_serializer.rb +16 -0
  169. data/app/serializers/command_tower/serializers/auth/user_serializer.rb +21 -0
  170. data/app/serializers/command_tower/serializers/auth/username_availability_serializer.rb +17 -0
  171. data/app/serializers/command_tower/serializers/impersonation/session_serializer.rb +19 -0
  172. data/app/serializers/command_tower/serializers/me/account_serializer.rb +45 -0
  173. data/app/serializers/command_tower/serializers/me/change_password_response_serializer.rb +13 -0
  174. data/app/serializers/command_tower/serializers/me/pushover_serializer.rb +59 -0
  175. data/app/serializers/command_tower/serializers/messaging/inbox.rb +45 -0
  176. data/app/serializers/command_tower/serializers/messaging/preferences/catalog_serializer.rb +17 -0
  177. data/app/serializers/command_tower/serializers/messaging/preferences/category_serializer.rb +23 -0
  178. data/app/serializers/command_tower/serializers/messaging/preferences/notification_serializer.rb +30 -0
  179. data/app/serializers/command_tower/serializers/profile/profile_serializer.rb +13 -0
  180. data/app/services/command_tower/README.md +24 -14
  181. data/app/services/command_tower/auth/request_context.rb +21 -0
  182. data/app/services/command_tower/authorize/validate.rb +58 -19
  183. data/app/services/command_tower/clients/client_base.rb +183 -0
  184. data/app/services/command_tower/clients/client_result.rb +45 -0
  185. data/app/services/command_tower/clients/const_resolution.rb +32 -0
  186. data/app/services/command_tower/clients/decoded_response.rb +16 -0
  187. data/app/services/command_tower/clients/endpoint_base.rb +242 -0
  188. data/app/services/command_tower/clients/endpoint_input.rb +18 -0
  189. data/app/services/command_tower/clients/errors/authentication_error.rb +26 -0
  190. data/app/services/command_tower/clients/errors/configuration_error.rb +10 -0
  191. data/app/services/command_tower/clients/errors/deserialization_error.rb +26 -0
  192. data/app/services/command_tower/clients/errors/discovery_error.rb +10 -0
  193. data/app/services/command_tower/clients/errors/upstream_error.rb +26 -0
  194. data/app/services/command_tower/clients/invocation.rb +61 -0
  195. data/app/services/command_tower/clients/namespace_proxy.rb +75 -0
  196. data/app/services/command_tower/clients/scoped_client.rb +88 -0
  197. data/app/services/command_tower/clients/serialized_request.rb +17 -0
  198. data/app/services/command_tower/clients/transport/error.rb +18 -0
  199. data/app/services/command_tower/clients/transport/faraday_adapter.rb +129 -0
  200. data/app/services/command_tower/clients/transport/faraday_config.rb +45 -0
  201. data/app/services/command_tower/clients/transport/request.rb +50 -0
  202. data/app/services/command_tower/clients/transport/response.rb +22 -0
  203. data/app/services/command_tower/clients/url.rb +56 -0
  204. data/app/services/command_tower/identity/phone/normalizer.rb +41 -0
  205. data/app/services/command_tower/identity/phone_verification/sms_configuration.rb +58 -0
  206. data/app/services/command_tower/identity/phone_verification/sms_transport/adapters/fake_adapter.rb +35 -0
  207. data/app/services/command_tower/identity/phone_verification/sms_transport/adapters/log_adapter.rb +34 -0
  208. data/app/services/command_tower/identity/phone_verification/sms_transport/adapters/twilio_adapter.rb +60 -0
  209. data/app/services/command_tower/identity/phone_verification/sms_transport.rb +42 -0
  210. data/app/services/command_tower/jwt/authenticate_user.rb +67 -34
  211. data/app/services/command_tower/jwt/authentication_outcome.rb +37 -0
  212. data/app/services/command_tower/jwt/decode.rb +27 -8
  213. data/app/services/command_tower/jwt/encode.rb +4 -6
  214. data/app/services/command_tower/jwt/login_create.rb +10 -8
  215. data/app/services/command_tower/login_strategy/plain_text/email_verification/required.rb +11 -9
  216. data/app/services/command_tower/messaging/accept/channel_delivery_result.rb +13 -0
  217. data/app/services/command_tower/messaging/accept/coordinator.rb +166 -0
  218. data/app/services/command_tower/messaging/accept/error.rb +9 -0
  219. data/app/services/command_tower/messaging/accept/excluded_destination.rb +24 -0
  220. data/app/services/command_tower/messaging/accept/handoff_scheduler.rb +40 -0
  221. data/app/services/command_tower/messaging/accept/idempotency_conflict_error.rb +9 -0
  222. data/app/services/command_tower/messaging/accept/illegal_override_error.rb +9 -0
  223. data/app/services/command_tower/messaging/accept/impossible_mandatory_plan_error.rb +9 -0
  224. data/app/services/command_tower/messaging/accept/invalid_preference_error.rb +9 -0
  225. data/app/services/command_tower/messaging/accept/invariant_error.rb +9 -0
  226. data/app/services/command_tower/messaging/accept/operation_logger.rb +97 -0
  227. data/app/services/command_tower/messaging/accept/persistence_error.rb +9 -0
  228. data/app/services/command_tower/messaging/accept/persister.rb +90 -0
  229. data/app/services/command_tower/messaging/accept/request_normalizer.rb +100 -0
  230. data/app/services/command_tower/messaging/accept/result.rb +99 -0
  231. data/app/services/command_tower/messaging/accept/unknown_type_error.rb +9 -0
  232. data/app/services/command_tower/messaging/accept/validation_error.rb +9 -0
  233. data/app/services/command_tower/messaging/channel_detectors.rb +52 -0
  234. data/app/services/command_tower/messaging/channels/definition.rb +24 -0
  235. data/app/services/command_tower/messaging/channels/error.rb +9 -0
  236. data/app/services/command_tower/messaging/channels/unknown_channel_error.rb +9 -0
  237. data/app/services/command_tower/messaging/channels.rb +85 -0
  238. data/app/services/command_tower/messaging/contract/communications.rb +29 -0
  239. data/app/services/command_tower/messaging/contract/error.rb +9 -0
  240. data/app/services/command_tower/messaging/contract/internal/finder.rb +43 -0
  241. data/app/services/command_tower/messaging/contract/invariant_error.rb +9 -0
  242. data/app/services/command_tower/messaging/contract/mappers/channel_delivery_mapper.rb +53 -0
  243. data/app/services/command_tower/messaging/contract/mappers/communication_mapper.rb +61 -0
  244. data/app/services/command_tower/messaging/contract/mappers/delivery_attempt_mapper.rb +27 -0
  245. data/app/services/command_tower/messaging/contract/mappers/destination_plan_mapper.rb +17 -0
  246. data/app/services/command_tower/messaging/contract/mappers/inbox_item_mapper.rb +17 -0
  247. data/app/services/command_tower/messaging/contract/not_found_error.rb +9 -0
  248. data/app/services/command_tower/messaging/contract/observability/correlation.rb +19 -0
  249. data/app/services/command_tower/messaging/contract/observability/operation_logger.rb +101 -0
  250. data/app/services/command_tower/messaging/contract/observability/publisher.rb +44 -0
  251. data/app/services/command_tower/messaging/contract/requests/find_communication.rb +21 -0
  252. data/app/services/command_tower/messaging/contract/results/channel_delivery_result.rb +25 -0
  253. data/app/services/command_tower/messaging/contract/results/communication_result.rb +22 -0
  254. data/app/services/command_tower/messaging/contract/results/delivery_attempt_result.rb +21 -0
  255. data/app/services/command_tower/messaging/contract/results/destination_plan_result.rb +11 -0
  256. data/app/services/command_tower/messaging/contract/results/inbox_item_result.rb +11 -0
  257. data/app/services/command_tower/messaging/contract/validation_error.rb +9 -0
  258. data/app/services/command_tower/messaging/delivery_retry_policy.rb +30 -0
  259. data/app/services/command_tower/messaging/endpoints/begin_verification.rb +13 -0
  260. data/app/services/command_tower/messaging/endpoints/channel_gate.rb +39 -0
  261. data/app/services/command_tower/messaging/endpoints/conflict_error.rb +9 -0
  262. data/app/services/command_tower/messaging/endpoints/create.rb +181 -0
  263. data/app/services/command_tower/messaging/endpoints/error.rb +9 -0
  264. data/app/services/command_tower/messaging/endpoints/fingerprinter.rb +50 -0
  265. data/app/services/command_tower/messaging/endpoints/invalid_transition_error.rb +9 -0
  266. data/app/services/command_tower/messaging/endpoints/lifecycle.rb +37 -0
  267. data/app/services/command_tower/messaging/endpoints/mark_invalid.rb +32 -0
  268. data/app/services/command_tower/messaging/endpoints/mark_verification_failed.rb +13 -0
  269. data/app/services/command_tower/messaging/endpoints/mark_verified.rb +13 -0
  270. data/app/services/command_tower/messaging/endpoints/not_found_error.rb +9 -0
  271. data/app/services/command_tower/messaging/endpoints/persistence.rb +91 -0
  272. data/app/services/command_tower/messaging/endpoints/pushover/verify.rb +101 -0
  273. data/app/services/command_tower/messaging/endpoints/query.rb +28 -0
  274. data/app/services/command_tower/messaging/endpoints/replace.rb +181 -0
  275. data/app/services/command_tower/messaging/endpoints/reset_verification.rb +13 -0
  276. data/app/services/command_tower/messaging/endpoints/revoke.rb +40 -0
  277. data/app/services/command_tower/messaging/endpoints/safe_view.rb +50 -0
  278. data/app/services/command_tower/messaging/endpoints/secret_box.rb +86 -0
  279. data/app/services/command_tower/messaging/endpoints/secret_reader.rb +72 -0
  280. data/app/services/command_tower/messaging/endpoints/validation_error.rb +9 -0
  281. data/app/services/command_tower/messaging/endpoints/validators/push.rb +24 -0
  282. data/app/services/command_tower/messaging/endpoints/validators/pushover.rb +68 -0
  283. data/app/services/command_tower/messaging/endpoints/validators.rb +36 -0
  284. data/app/services/command_tower/messaging/endpoints/verification.rb +39 -0
  285. data/app/services/command_tower/messaging/endpoints/verification_failed_error.rb +18 -0
  286. data/app/services/command_tower/messaging/endpoints/verification_transition.rb +20 -0
  287. data/app/services/command_tower/messaging/endpoints.rb +55 -0
  288. data/app/services/command_tower/messaging/execution/adapter_request.rb +45 -0
  289. data/app/services/command_tower/messaging/execution/adapter_result.rb +81 -0
  290. data/app/services/command_tower/messaging/execution/adapters/email/adapter.rb +78 -0
  291. data/app/services/command_tower/messaging/execution/adapters/email/configuration.rb +55 -0
  292. data/app/services/command_tower/messaging/execution/adapters/fake_adapter.rb +34 -0
  293. data/app/services/command_tower/messaging/execution/adapters/pushover/adapter.rb +107 -0
  294. data/app/services/command_tower/messaging/execution/adapters/pushover/configuration.rb +30 -0
  295. data/app/services/command_tower/messaging/execution/adapters/sms/adapter.rb +90 -0
  296. data/app/services/command_tower/messaging/execution/adapters/sms/configuration.rb +58 -0
  297. data/app/services/command_tower/messaging/execution/adapters/sms/log_adapter.rb +34 -0
  298. data/app/services/command_tower/messaging/execution/adapters/sms/twilio_http_client.rb +70 -0
  299. data/app/services/command_tower/messaging/execution/adapters/unconfigured_adapter.rb +20 -0
  300. data/app/services/command_tower/messaging/execution/attempt_ledger.rb +146 -0
  301. data/app/services/command_tower/messaging/execution/claim.rb +35 -0
  302. data/app/services/command_tower/messaging/execution/invalid_adapter_contract_error.rb +9 -0
  303. data/app/services/command_tower/messaging/execution/operation_logger.rb +237 -0
  304. data/app/services/command_tower/messaging/execution/readiness_terminal_mapping.rb +37 -0
  305. data/app/services/command_tower/messaging/execution/recovery.rb +78 -0
  306. data/app/services/command_tower/messaging/execution/resolve_recipient_address.rb +58 -0
  307. data/app/services/command_tower/messaging/execution/revalidate_readiness.rb +73 -0
  308. data/app/services/command_tower/messaging/execution/scheduler.rb +38 -0
  309. data/app/services/command_tower/messaging/execution/select_adapter.rb +63 -0
  310. data/app/services/command_tower/messaging/handoff/advance_communication.rb +39 -0
  311. data/app/services/command_tower/messaging/handoff/operation_logger.rb +78 -0
  312. data/app/services/command_tower/messaging/handoff/recovery.rb +26 -0
  313. data/app/services/command_tower/messaging/inbox/bulk_result.rb +19 -0
  314. data/app/services/command_tower/messaging/inbox/error.rb +9 -0
  315. data/app/services/command_tower/messaging/inbox/invalid_bulk_items_error.rb +19 -0
  316. data/app/services/command_tower/messaging/inbox/invariant_error.rb +9 -0
  317. data/app/services/command_tower/messaging/inbox/item_result.rb +64 -0
  318. data/app/services/command_tower/messaging/inbox/list_result.rb +18 -0
  319. data/app/services/command_tower/messaging/inbox/mutator.rb +252 -0
  320. data/app/services/command_tower/messaging/inbox/not_found_error.rb +9 -0
  321. data/app/services/command_tower/messaging/inbox/operation_logger.rb +37 -0
  322. data/app/services/command_tower/messaging/inbox/reader.rb +117 -0
  323. data/app/services/command_tower/messaging/inbox/scope.rb +24 -0
  324. data/app/services/command_tower/messaging/inbox/unread_count_result.rb +16 -0
  325. data/app/services/command_tower/messaging/inbox/validation_error.rb +9 -0
  326. data/app/services/command_tower/messaging/inbox.rb +61 -0
  327. data/app/services/command_tower/messaging/notification_types/catalog_category.rb +19 -0
  328. data/app/services/command_tower/messaging/notification_types/declaration.rb +96 -0
  329. data/app/services/command_tower/messaging/notification_types/declaration_validator.rb +152 -0
  330. data/app/services/command_tower/messaging/notification_types/duplicate_type_error.rb +9 -0
  331. data/app/services/command_tower/messaging/notification_types/error.rb +9 -0
  332. data/app/services/command_tower/messaging/notification_types/invalid_declaration_error.rb +9 -0
  333. data/app/services/command_tower/messaging/notification_types/not_found_error.rb +9 -0
  334. data/app/services/command_tower/messaging/notification_types/registry.rb +103 -0
  335. data/app/services/command_tower/messaging/notification_types/sealed_registry_error.rb +9 -0
  336. data/app/services/command_tower/messaging/notification_types.rb +37 -0
  337. data/app/services/command_tower/messaging/planner/destination_plan.rb +41 -0
  338. data/app/services/command_tower/messaging/planner/error.rb +9 -0
  339. data/app/services/command_tower/messaging/planner/excluded_destination.rb +28 -0
  340. data/app/services/command_tower/messaging/planner/illegal_override_error.rb +9 -0
  341. data/app/services/command_tower/messaging/planner/impossible_mandatory_plan_error.rb +9 -0
  342. data/app/services/command_tower/messaging/planner/invalid_evaluation_error.rb +9 -0
  343. data/app/services/command_tower/messaging/planner/message_overrides.rb +33 -0
  344. data/app/services/command_tower/messaging/planner/operation_logger.rb +28 -0
  345. data/app/services/command_tower/messaging/planner/planner.rb +261 -0
  346. data/app/services/command_tower/messaging/planner/unknown_type_error.rb +9 -0
  347. data/app/services/command_tower/messaging/planner.rb +25 -0
  348. data/app/services/command_tower/messaging/preferences/catalog.rb +96 -0
  349. data/app/services/command_tower/messaging/preferences/catalog_category_result.rb +19 -0
  350. data/app/services/command_tower/messaging/preferences/catalog_notification_result.rb +55 -0
  351. data/app/services/command_tower/messaging/preferences/catalog_result.rb +13 -0
  352. data/app/services/command_tower/messaging/preferences/error.rb +9 -0
  353. data/app/services/command_tower/messaging/preferences/evaluation_result.rb +61 -0
  354. data/app/services/command_tower/messaging/preferences/evaluator.rb +194 -0
  355. data/app/services/command_tower/messaging/preferences/invalid_preference_state_error.rb +9 -0
  356. data/app/services/command_tower/messaging/preferences/invalid_preference_write_error.rb +10 -0
  357. data/app/services/command_tower/messaging/preferences/not_settings_visible_error.rb +10 -0
  358. data/app/services/command_tower/messaging/preferences/preference_state.rb +61 -0
  359. data/app/services/command_tower/messaging/preferences/reason_classes.rb +17 -0
  360. data/app/services/command_tower/messaging/preferences/resolve.rb +50 -0
  361. data/app/services/command_tower/messaging/preferences/store.rb +126 -0
  362. data/app/services/command_tower/messaging/preferences/store_error.rb +10 -0
  363. data/app/services/command_tower/messaging/preferences/suppressed_destination.rb +24 -0
  364. data/app/services/command_tower/messaging/preferences/unknown_type_error.rb +9 -0
  365. data/app/services/command_tower/messaging/preferences/update.rb +248 -0
  366. data/app/services/command_tower/messaging/preferences.rb +68 -0
  367. data/app/services/command_tower/messaging/pushover/adapters/disabled_adapter.rb +33 -0
  368. data/app/services/command_tower/messaging/pushover/adapters/fake_adapter.rb +90 -0
  369. data/app/services/command_tower/messaging/pushover/adapters/http_adapter.rb +145 -0
  370. data/app/services/command_tower/messaging/pushover/adapters/log_adapter.rb +52 -0
  371. data/app/services/command_tower/messaging/pushover/result.rb +34 -0
  372. data/app/services/command_tower/messaging/pushover/transport.rb +64 -0
  373. data/app/services/command_tower/messaging/recipient_readiness/channel_result.rb +55 -0
  374. data/app/services/command_tower/messaging/recipient_readiness/error.rb +9 -0
  375. data/app/services/command_tower/messaging/recipient_readiness/evaluate.rb +319 -0
  376. data/app/services/command_tower/messaging/recipient_readiness/identity_facts.rb +54 -0
  377. data/app/services/command_tower/messaging/recipient_readiness/reason_codes.rb +33 -0
  378. data/app/services/command_tower/messaging/recipient_readiness/recipient_not_found_error.rb +9 -0
  379. data/app/services/command_tower/messaging/recipient_readiness/recipient_result.rb +38 -0
  380. data/app/services/command_tower/messaging/recipient_readiness/unknown_channel_error.rb +9 -0
  381. data/app/services/command_tower/messaging/recipient_readiness.rb +26 -0
  382. data/app/services/command_tower/messaging/rendering/channel_renderer.rb +127 -0
  383. data/app/services/command_tower/messaging/rendering/render_error.rb +24 -0
  384. data/app/services/command_tower/messaging/rendering/rendered_payload.rb +44 -0
  385. data/app/services/command_tower/messaging/rendering/rendered_pushover_payload.rb +43 -0
  386. data/app/services/command_tower/messaging/rendering/rendered_sms_payload.rb +40 -0
  387. data/app/services/command_tower/messaging.rb +35 -0
  388. data/app/services/command_tower/secrets/cleanse.rb +19 -5
  389. data/app/services/command_tower/secrets/generate.rb +62 -27
  390. data/app/services/command_tower/secrets/verify.rb +46 -12
  391. data/app/services/command_tower/secrets.rb +2 -0
  392. data/app/services/command_tower/service_base.rb +30 -43
  393. data/app/services/command_tower/service_logging.rb +2 -36
  394. data/app/services/command_tower/services/account/clear_phone.rb +33 -0
  395. data/app/services/command_tower/services/account/phone_verification/send.rb +114 -0
  396. data/app/services/command_tower/services/account/phone_verification/verify.rb +89 -0
  397. data/app/services/command_tower/services/account/pushover/create.rb +28 -0
  398. data/app/services/command_tower/services/account/pushover/ct_support.rb +70 -0
  399. data/app/services/command_tower/services/account/pushover/destroy.rb +30 -0
  400. data/app/services/command_tower/services/account/pushover/replace.rb +28 -0
  401. data/app/services/command_tower/services/account/pushover/show.rb +19 -0
  402. data/app/services/command_tower/services/account/pushover/verify.rb +30 -0
  403. data/app/services/command_tower/services/account/update_phone.rb +58 -0
  404. data/app/services/command_tower/services/admin/users.rb +377 -0
  405. data/app/services/command_tower/services/admin/workspace/manifest.rb +49 -0
  406. data/app/services/command_tower/services/application_service.rb +58 -0
  407. data/app/services/command_tower/services/audit/events/filter_options.rb +75 -0
  408. data/app/services/command_tower/services/audit/events.rb +199 -0
  409. data/app/services/command_tower/services/auth/assign_default_membership_role.rb +44 -0
  410. data/app/services/command_tower/services/auth/authenticate_session.rb +132 -0
  411. data/app/services/command_tower/services/auth/authorize_request.rb +34 -0
  412. data/app/services/command_tower/services/auth/client_ip_resolver.rb +13 -0
  413. data/app/services/command_tower/services/auth/email_availability.rb +42 -0
  414. data/app/services/command_tower/services/auth/email_verification/send.rb +65 -0
  415. data/app/services/command_tower/services/auth/email_verification/verify.rb +53 -0
  416. data/app/services/command_tower/services/auth/identity_policy.rb +60 -0
  417. data/app/services/command_tower/services/auth/password_recovery/rate_limits/check_send.rb +48 -0
  418. data/app/services/command_tower/services/auth/password_recovery/rate_limits/check_token_issue.rb +35 -0
  419. data/app/services/command_tower/services/auth/password_recovery/rate_limits/enforcement.rb +53 -0
  420. data/app/services/command_tower/services/auth/password_recovery_session/create.rb +26 -0
  421. data/app/services/command_tower/services/auth/password_recovery_session/decode.rb +29 -0
  422. data/app/services/command_tower/services/auth/password_recovery_session/encode.rb +31 -0
  423. data/app/services/command_tower/services/auth/password_recovery_session/validate.rb +58 -0
  424. data/app/services/command_tower/services/auth/password_reset/reset.rb +75 -0
  425. data/app/services/command_tower/services/auth/password_reset/send.rb +77 -0
  426. data/app/services/command_tower/services/auth/password_reset/token_verification.rb +68 -0
  427. data/app/services/command_tower/services/auth/password_reset/validate.rb +29 -0
  428. data/app/services/command_tower/services/auth/plain_text/login.rb +52 -0
  429. data/app/services/command_tower/services/auth/principal_capabilities/project.rb +48 -0
  430. data/app/services/command_tower/services/auth/register.rb +77 -0
  431. data/app/services/command_tower/services/auth/signup_rate_limits/check_availability.rb +52 -0
  432. data/app/services/command_tower/services/auth/signup_rate_limits/check_register.rb +24 -0
  433. data/app/services/command_tower/services/auth/signup_rate_limits/check_token_issue.rb +33 -0
  434. data/app/services/command_tower/services/auth/signup_rate_limits/enforcement.rb +50 -0
  435. data/app/services/command_tower/services/auth/signup_session/create.rb +26 -0
  436. data/app/services/command_tower/services/auth/signup_session/decode.rb +29 -0
  437. data/app/services/command_tower/services/auth/signup_session/encode.rb +31 -0
  438. data/app/services/command_tower/services/auth/signup_session/validate.rb +58 -0
  439. data/app/services/command_tower/services/auth/username_availability.rb +28 -0
  440. data/app/services/command_tower/services/impersonation/create.rb +29 -0
  441. data/app/services/command_tower/services/impersonation/end.rb +28 -0
  442. data/app/services/command_tower/services/impersonation/record_activity.rb +30 -0
  443. data/app/services/command_tower/services/impersonation/terminate_open_sessions.rb +51 -0
  444. data/app/services/command_tower/services/me/capabilities.rb +43 -0
  445. data/app/services/command_tower/services/me/change_password.rb +96 -0
  446. data/app/services/command_tower/services/me/pushover_product_gate.rb +18 -0
  447. data/app/services/command_tower/services/me/sms_product_gate.rb +19 -0
  448. data/app/services/command_tower/services/me/update_name.rb +58 -0
  449. data/app/services/command_tower/services/messaging/communications/produce.rb +68 -0
  450. data/app/services/command_tower/services/messaging/communications/produce_many.rb +154 -0
  451. data/app/services/command_tower/services/messaging/inbox.rb +129 -0
  452. data/app/services/command_tower/services/messaging/preferences/platform_enabled_channels.rb +20 -0
  453. data/app/services/command_tower/services/messaging/preferences/show.rb +36 -0
  454. data/app/services/command_tower/services/messaging/preferences/update.rb +43 -0
  455. data/app/services/command_tower/services/messaging/recipients.rb +20 -0
  456. data/app/services/command_tower/services/rate_limits/check.rb +31 -0
  457. data/app/services/command_tower/services/service_result.rb +73 -0
  458. data/app/services/command_tower/user_attributes/mutate.rb +154 -0
  459. data/app/services/command_tower/username/available.rb +24 -11
  460. data/app/shared_sequences/command_tower/shared_sequences/admin/users/resolve_scoped_user.rb +42 -0
  461. data/app/views/command_tower/email_verification_mailer/verify_email.html.erb +70 -22
  462. data/app/views/command_tower/messaging/rendering/email.html.erb +28 -0
  463. data/app/views/command_tower/messaging/rendering/email.text.erb +7 -0
  464. data/app/views/command_tower/messaging/rendering/pushover.text.erb +1 -0
  465. data/app/views/command_tower/messaging/rendering/sms.text.erb +1 -0
  466. data/app/views/command_tower/password_reset_mailer/reset_password.html.erb +107 -0
  467. data/app/views/layouts/mailer.html.erb +13 -0
  468. data/app/views/layouts/mailer.text.erb +1 -0
  469. data/app/workflows/command_tower/transactional.rb +65 -0
  470. data/app/workflows/command_tower/workflows/admin/messaging/create_announcement_workflow.rb +73 -0
  471. data/app/workflows/command_tower/workflows/admin/scope_resolution.rb +17 -0
  472. data/app/workflows/command_tower/workflows/admin/users/error_mapping.rb +26 -0
  473. data/app/workflows/command_tower/workflows/admin/users/identity_mutation.rb +30 -0
  474. data/app/workflows/command_tower/workflows/admin/users/list_assignable_roles_workflow.rb +30 -0
  475. data/app/workflows/command_tower/workflows/admin/users/list_workflow.rb +54 -0
  476. data/app/workflows/command_tower/workflows/admin/users/set_email_validated_workflow.rb +45 -0
  477. data/app/workflows/command_tower/workflows/admin/users/show_workflow.rb +49 -0
  478. data/app/workflows/command_tower/workflows/admin/users/update_email_workflow.rb +45 -0
  479. data/app/workflows/command_tower/workflows/admin/users/update_name_workflow.rb +49 -0
  480. data/app/workflows/command_tower/workflows/admin/users/update_roles_workflow.rb +61 -0
  481. data/app/workflows/command_tower/workflows/admin/users/update_username_workflow.rb +45 -0
  482. data/app/workflows/command_tower/workflows/admin/workspace/manifest_workflow.rb +25 -0
  483. data/app/workflows/command_tower/workflows/application_workflow.rb +207 -0
  484. data/app/workflows/command_tower/workflows/audit/error_mapping.rb +24 -0
  485. data/app/workflows/command_tower/workflows/audit/events/filter_options_for_admin_workflow.rb +34 -0
  486. data/app/workflows/command_tower/workflows/audit/events/filter_options_for_user_workflow.rb +34 -0
  487. data/app/workflows/command_tower/workflows/audit/events/list_for_admin_workflow.rb +74 -0
  488. data/app/workflows/command_tower/workflows/audit/events/list_for_user_workflow.rb +45 -0
  489. data/app/workflows/command_tower/workflows/audit/events/show_for_admin_workflow.rb +54 -0
  490. data/app/workflows/command_tower/workflows/audit/events/show_for_user_workflow.rb +42 -0
  491. data/app/workflows/command_tower/workflows/auth/authenticate_request_workflow.rb +41 -0
  492. data/app/workflows/command_tower/workflows/auth/authentication_response_effects.rb +25 -0
  493. data/app/workflows/command_tower/workflows/auth/authorize_request_workflow.rb +28 -0
  494. data/app/workflows/command_tower/workflows/auth/email_availability_workflow.rb +39 -0
  495. data/app/workflows/command_tower/workflows/auth/email_verification/send_workflow.rb +32 -0
  496. data/app/workflows/command_tower/workflows/auth/email_verification/verify_workflow.rb +35 -0
  497. data/app/workflows/command_tower/workflows/auth/identity_error_status.rb +36 -0
  498. data/app/workflows/command_tower/workflows/auth/identity_policy_workflow.rb +26 -0
  499. data/app/workflows/command_tower/workflows/auth/logout_workflow.rb +59 -0
  500. data/app/workflows/command_tower/workflows/auth/password_recovery_session/authenticate_workflow.rb +49 -0
  501. data/app/workflows/command_tower/workflows/auth/password_recovery_session/create_workflow.rb +39 -0
  502. data/app/workflows/command_tower/workflows/auth/password_reset/reset_workflow.rb +40 -0
  503. data/app/workflows/command_tower/workflows/auth/password_reset/send_workflow.rb +45 -0
  504. data/app/workflows/command_tower/workflows/auth/password_reset/validate_workflow.rb +40 -0
  505. data/app/workflows/command_tower/workflows/auth/plain_text/login_workflow.rb +48 -0
  506. data/app/workflows/command_tower/workflows/auth/principal_capabilities/show_workflow.rb +27 -0
  507. data/app/workflows/command_tower/workflows/auth/register_workflow.rb +115 -0
  508. data/app/workflows/command_tower/workflows/auth/session/show_workflow.rb +58 -0
  509. data/app/workflows/command_tower/workflows/auth/session_error_status.rb +31 -0
  510. data/app/workflows/command_tower/workflows/auth/signup_error_status.rb +31 -0
  511. data/app/workflows/command_tower/workflows/auth/signup_session/authenticate_workflow.rb +49 -0
  512. data/app/workflows/command_tower/workflows/auth/signup_session/create_workflow.rb +37 -0
  513. data/app/workflows/command_tower/workflows/auth/username_availability_workflow.rb +39 -0
  514. data/app/workflows/command_tower/workflows/impersonation/error_mapping.rb +27 -0
  515. data/app/workflows/command_tower/workflows/impersonation/start_workflow.rb +97 -0
  516. data/app/workflows/command_tower/workflows/impersonation/stop_workflow.rb +66 -0
  517. data/app/workflows/command_tower/workflows/me/change_password_workflow.rb +34 -0
  518. data/app/workflows/command_tower/workflows/me/clear_phone_workflow.rb +52 -0
  519. data/app/workflows/command_tower/workflows/me/error_mapping.rb +46 -0
  520. data/app/workflows/command_tower/workflows/me/error_status.rb +28 -0
  521. data/app/workflows/command_tower/workflows/me/phone_verification/send_workflow.rb +65 -0
  522. data/app/workflows/command_tower/workflows/me/phone_verification/verify_workflow.rb +57 -0
  523. data/app/workflows/command_tower/workflows/me/pushover/create_workflow.rb +38 -0
  524. data/app/workflows/command_tower/workflows/me/pushover/destroy_workflow.rb +34 -0
  525. data/app/workflows/command_tower/workflows/me/pushover/replace_workflow.rb +38 -0
  526. data/app/workflows/command_tower/workflows/me/pushover/show_workflow.rb +34 -0
  527. data/app/workflows/command_tower/workflows/me/pushover/verify_workflow.rb +34 -0
  528. data/app/workflows/command_tower/workflows/me/pushover/workflow_support.rb +31 -0
  529. data/app/workflows/command_tower/workflows/me/show_workflow.rb +33 -0
  530. data/app/workflows/command_tower/workflows/me/update_name_workflow.rb +49 -0
  531. data/app/workflows/command_tower/workflows/me/update_phone_workflow.rb +55 -0
  532. data/app/workflows/command_tower/workflows/messaging/communications/produce_recipient_workflow.rb +60 -0
  533. data/app/workflows/command_tower/workflows/messaging/error_mapping.rb +26 -0
  534. data/app/workflows/command_tower/workflows/messaging/execution/deliver_workflow.rb +234 -0
  535. data/app/workflows/command_tower/workflows/messaging/handoff/process_workflow.rb +90 -0
  536. data/app/workflows/command_tower/workflows/messaging/inbox.rb +97 -0
  537. data/app/workflows/command_tower/workflows/messaging/preferences/show_workflow.rb +31 -0
  538. data/app/workflows/command_tower/workflows/messaging/preferences/update_workflow.rb +37 -0
  539. data/app/workflows/command_tower/workflows/profile/show_workflow.rb +28 -0
  540. data/app/workflows/command_tower/workflows/workflow_result.rb +58 -0
  541. data/config/routes.rb +105 -37
  542. data/db/migrate/{20241117043720_create_command_tower_users.rb → 20260805000001_create_command_tower_users.rb} +7 -9
  543. data/db/migrate/{20241204065708_create_command_tower_user_secrets.rb → 20260805000002_create_command_tower_user_secrets.rb} +3 -0
  544. data/db/migrate/20260805000003_create_command_tower_messaging_core.rb +90 -0
  545. data/db/migrate/20260805000004_create_messaging_notification_preferences.rb +17 -0
  546. data/db/migrate/20260805000005_create_messaging_endpoints_and_pushover_credentials.rb +72 -0
  547. data/db/migrate/20260816000001_create_command_tower_audit_events.rb +45 -0
  548. data/db/migrate/20260817000001_add_scope_columns_to_command_tower_audit_events.rb +34 -0
  549. data/db/migrate/20260817000003_create_command_tower_impersonation_sessions.rb +26 -0
  550. data/docs/admin_workspace.md +158 -0
  551. data/docs/api_reference.md +599 -0
  552. data/docs/architecture.md +35 -0
  553. data/docs/audit.md +195 -0
  554. data/docs/authentication.md +51 -0
  555. data/docs/authentication_authorization_guide.md +154 -0
  556. data/docs/authorization.md +55 -0
  557. data/docs/change_password_workflow.md +67 -0
  558. data/docs/controllers.md +41 -0
  559. data/docs/cookie_authentication_guide.md +167 -0
  560. data/docs/email_verification_workflow.md +58 -0
  561. data/docs/eventing.md +179 -0
  562. data/docs/extending.md +136 -0
  563. data/docs/host_integration_guide.md +249 -0
  564. data/docs/initializing.md +169 -0
  565. data/docs/messaging_integration_guide.md +87 -0
  566. data/docs/models.md +55 -0
  567. data/docs/pagination.md +47 -0
  568. data/docs/password_reset_workflow.md +82 -0
  569. data/docs/principal_capabilities.md +89 -0
  570. data/docs/sensitive_routes.md +47 -0
  571. data/docs/testing.md +74 -0
  572. data/docs/upgrades/0.10.0.md +58 -0
  573. data/docs/upgrades/0.11.0.md +92 -0
  574. data/docs/upgrades/README.md +10 -0
  575. data/lib/command_tower/admin_scope/apply_audit_scoping.rb +45 -0
  576. data/lib/command_tower/admin_scope/apply_users_narrowing.rb +21 -0
  577. data/lib/command_tower/admin_scope/manifest_projection.rb +102 -0
  578. data/lib/command_tower/admin_scope/resolve.rb +31 -0
  579. data/lib/command_tower/admin_scope/scope_context.rb +7 -0
  580. data/lib/command_tower/admin_scope/scope_option.rb +7 -0
  581. data/lib/command_tower/admin_scope.rb +20 -0
  582. data/lib/command_tower/admin_workspace.rb +16 -0
  583. data/lib/command_tower/audit/attribution.rb +90 -0
  584. data/lib/command_tower/audit/emit.rb +113 -0
  585. data/lib/command_tower/audit/masking.rb +41 -0
  586. data/lib/command_tower/audit/payload.rb +128 -0
  587. data/lib/command_tower/audit/persistence/subscriber.rb +85 -0
  588. data/lib/command_tower/audit.rb +27 -0
  589. data/lib/command_tower/authorization/assignable_roles.rb +36 -0
  590. data/lib/command_tower/authorization/default.yml +101 -35
  591. data/lib/command_tower/authorization/effective_entity_grants.rb +55 -0
  592. data/lib/command_tower/authorization/entity.rb +15 -5
  593. data/lib/command_tower/authorization/role.rb +5 -4
  594. data/lib/command_tower/authorization.rb +71 -10
  595. data/lib/command_tower/configuration/admin_scope/config.rb +104 -0
  596. data/lib/command_tower/configuration/admin_scope/tool_registration.rb +28 -0
  597. data/lib/command_tower/configuration/application/config.rb +2 -2
  598. data/lib/command_tower/configuration/authorization/config.rb +6 -0
  599. data/lib/command_tower/configuration/base.rb +0 -1
  600. data/lib/command_tower/configuration/config.rb +51 -1
  601. data/lib/command_tower/configuration/credentials/config.rb +33 -0
  602. data/lib/command_tower/configuration/credentials/smtp.rb +33 -0
  603. data/lib/command_tower/configuration/credentials/twilio.rb +33 -0
  604. data/lib/command_tower/configuration/email/config.rb +1 -18
  605. data/lib/command_tower/configuration/identity/config.rb +19 -0
  606. data/lib/command_tower/configuration/identity/phone_verification.rb +54 -0
  607. data/lib/command_tower/configuration/impersonation/config.rb +38 -0
  608. data/lib/command_tower/configuration/jwt/config.rb +7 -0
  609. data/lib/command_tower/configuration/jwt/cookie/config.rb +64 -0
  610. data/lib/command_tower/configuration/jwt/cookie/csrf/config.rb +72 -0
  611. data/lib/command_tower/configuration/login/strategy/plain_text/config.rb +6 -0
  612. data/lib/command_tower/configuration/login/strategy/plain_text/email_verify.rb +5 -0
  613. data/lib/command_tower/configuration/login/strategy/plain_text/password_reset.rb +49 -0
  614. data/lib/command_tower/configuration/messaging/config.rb +60 -0
  615. data/lib/command_tower/configuration/messaging/pushover.rb +42 -0
  616. data/lib/command_tower/configuration/messaging/sms.rb +32 -0
  617. data/lib/command_tower/configuration/password_recovery_session/config.rb +61 -0
  618. data/lib/command_tower/configuration/password_recovery_session/rate_limits.rb +33 -0
  619. data/lib/command_tower/configuration/registry/admin_workspace/config.rb +199 -0
  620. data/lib/command_tower/configuration/registry/admin_workspace/tool_definition.rb +150 -0
  621. data/lib/command_tower/configuration/registry/audit/config.rb +403 -0
  622. data/lib/command_tower/configuration/registry/audit/event_definition.rb +155 -0
  623. data/lib/command_tower/configuration/registry/config.rb +34 -0
  624. data/lib/command_tower/configuration/registry/principal_capabilities/capability_definition.rb +43 -0
  625. data/lib/command_tower/configuration/registry/principal_capabilities/config.rb +136 -0
  626. data/lib/command_tower/configuration/signup_session/config.rb +67 -0
  627. data/lib/command_tower/configuration/signup_session/email_availability.rb +18 -0
  628. data/lib/command_tower/configuration/signup_session/rate_limits.rb +48 -0
  629. data/lib/command_tower/configuration/user/config.rb +6 -5
  630. data/lib/command_tower/credential_resolution/env_backend.rb +25 -0
  631. data/lib/command_tower/credential_resolution/smtp_action_mailer_bridge.rb +24 -0
  632. data/lib/command_tower/credential_resolution/smtp_credentials.rb +26 -0
  633. data/lib/command_tower/credential_resolution/twilio_credentials.rb +26 -0
  634. data/lib/command_tower/credential_resolution.rb +78 -0
  635. data/lib/command_tower/current.rb +19 -0
  636. data/lib/command_tower/engine.rb +23 -5
  637. data/lib/command_tower/events.rb +184 -0
  638. data/lib/command_tower/execution.rb +111 -0
  639. data/lib/command_tower/impersonation/activity_declaration.rb +23 -0
  640. data/lib/command_tower/impersonation/apply_overlay.rb +88 -0
  641. data/lib/command_tower/impersonation/clear_overlay_for_audit.rb +23 -0
  642. data/lib/command_tower/impersonation/establish_identity.rb +44 -0
  643. data/lib/command_tower/install/baseline.rb +34 -0
  644. data/lib/command_tower/install/doctor.rb +227 -0
  645. data/lib/command_tower/jwt/authorization_helper.rb +136 -0
  646. data/lib/command_tower/jwt/csrf_helper.rb +138 -0
  647. data/lib/command_tower/logging/lifecycle_declaration.rb +27 -0
  648. data/lib/command_tower/logging/projection.rb +67 -0
  649. data/lib/command_tower/logging/subscriber.rb +103 -0
  650. data/lib/command_tower/password_recovery/authorization_helper.rb +25 -0
  651. data/lib/command_tower/principal_capabilities.rb +15 -0
  652. data/lib/command_tower/redis_connection.rb +21 -0
  653. data/lib/command_tower/schema/error/email_validation_required.rb +15 -0
  654. data/lib/command_tower/schema/shared/user.rb +32 -0
  655. data/lib/command_tower/schema.rb +2 -25
  656. data/lib/command_tower/signup/authorization_helper.rb +25 -0
  657. data/lib/command_tower/spec_helper.rb +58 -1
  658. data/lib/command_tower/testing.rb +62 -0
  659. data/lib/command_tower/version.rb +1 -1
  660. data/lib/command_tower.rb +32 -0
  661. data/lib/generators/command_tower/configure/USAGE +14 -2
  662. data/lib/generators/command_tower/configure/configure_generator.rb +29 -2
  663. data/lib/tasks/auto_annotate_models.rake +23 -55
  664. data/lib/tasks/install.rake +81 -0
  665. data/lib/tasks/users.rake +119 -0
  666. data/spec/factories/entity.rb +37 -0
  667. data/spec/factories/impersonation_session.rb +17 -0
  668. data/spec/factories/messaging.rb +156 -0
  669. data/spec/factories/role.rb +29 -0
  670. data/spec/factories/user.rb +69 -0
  671. data/spec/factories/user_secret.rb +12 -0
  672. metadata +686 -55
  673. data/app/controllers/command_tower/admin_controller.rb +0 -110
  674. data/app/controllers/command_tower/auth/plain_text_controller.rb +0 -133
  675. data/app/controllers/command_tower/inbox/message_blast_controller.rb +0 -89
  676. data/app/controllers/command_tower/inbox/message_controller.rb +0 -81
  677. data/app/controllers/command_tower/user_controller.rb +0 -49
  678. data/app/controllers/command_tower/username_controller.rb +0 -26
  679. data/app/helpers/command_tower/pagination_helper.rb +0 -40
  680. data/app/helpers/command_tower/schema_helper.rb +0 -29
  681. data/app/models/message.rb +0 -30
  682. data/app/models/message_blast.rb +0 -27
  683. data/app/services/command_tower/admin_service/users.rb +0 -27
  684. data/app/services/command_tower/inbox_service/blast/delete.rb +0 -23
  685. data/app/services/command_tower/inbox_service/blast/metadata.rb +0 -26
  686. data/app/services/command_tower/inbox_service/blast/new_user_blaster.rb +0 -24
  687. data/app/services/command_tower/inbox_service/blast/retrieve.rb +0 -30
  688. data/app/services/command_tower/inbox_service/blast/upsert.rb +0 -67
  689. data/app/services/command_tower/inbox_service/message/metadata.rb +0 -41
  690. data/app/services/command_tower/inbox_service/message/modify.rb +0 -44
  691. data/app/services/command_tower/inbox_service/message/retrieve.rb +0 -36
  692. data/app/services/command_tower/inbox_service/message/send.rb +0 -33
  693. data/app/services/command_tower/jwt/time_delay_token.rb +0 -17
  694. data/app/services/command_tower/login_strategy/plain_text/create.rb +0 -43
  695. data/app/services/command_tower/login_strategy/plain_text/email_verification/generate.rb +0 -29
  696. data/app/services/command_tower/login_strategy/plain_text/email_verification/send.rb +0 -23
  697. data/app/services/command_tower/login_strategy/plain_text/email_verification/verify.rb +0 -24
  698. data/app/services/command_tower/login_strategy/plain_text/login.rb +0 -50
  699. data/app/services/command_tower/pagination_service_helper.rb +0 -88
  700. data/app/services/command_tower/user_attributes/modify.rb +0 -68
  701. data/app/services/command_tower/user_attributes/roles.rb +0 -27
  702. data/db/migrate/20250223023306_create_command_tower_messages.rb +0 -12
  703. data/db/migrate/20250223023313_create_command_tower_message_blasts.rb +0 -14
  704. data/lib/command_tower/schema/admin/users.rb +0 -16
  705. data/lib/command_tower/schema/inbox/blast_request.rb +0 -15
  706. data/lib/command_tower/schema/inbox/blast_response.rb +0 -16
  707. data/lib/command_tower/schema/inbox/message_blast_entity.rb +0 -16
  708. data/lib/command_tower/schema/inbox/message_blast_metadata.rb +0 -16
  709. data/lib/command_tower/schema/inbox/message_entity.rb +0 -14
  710. data/lib/command_tower/schema/inbox/metadata.rb +0 -18
  711. data/lib/command_tower/schema/inbox/modified.rb +0 -13
  712. data/lib/command_tower/schema/page.rb +0 -11
  713. data/lib/command_tower/schema/pagination.rb +0 -16
  714. data/lib/command_tower/schema/plain_text/create_user_request.rb +0 -18
  715. data/lib/command_tower/schema/plain_text/create_user_response.rb +0 -17
  716. data/lib/command_tower/schema/plain_text/email_verify_request.rb +0 -11
  717. data/lib/command_tower/schema/plain_text/email_verify_response.rb +0 -11
  718. data/lib/command_tower/schema/plain_text/email_verify_send_request.rb +0 -9
  719. data/lib/command_tower/schema/plain_text/email_verify_send_response.rb +0 -11
  720. data/lib/command_tower/schema/plain_text/login_request.rb +0 -15
  721. data/lib/command_tower/schema/plain_text/login_response.rb +0 -16
  722. data/lib/command_tower/schema/user.rb +0 -28
metadata CHANGED
@@ -1,17 +1,17 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: command_tower
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.4.0
4
+ version: 0.11.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: 2025-05-08 00:00:00.000000000 Z
11
+ date: 2026-08-21 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
- name: rotp
14
+ name: phonelib
15
15
  requirement: !ruby/object:Gem::Requirement
16
16
  requirements:
17
17
  - - ">="
@@ -86,6 +86,20 @@ dependencies:
86
86
  - - ">="
87
87
  - !ruby/object:Gem::Version
88
88
  version: '0'
89
+ - !ruby/object:Gem::Dependency
90
+ name: redis
91
+ requirement: !ruby/object:Gem::Requirement
92
+ requirements:
93
+ - - ">="
94
+ - !ruby/object:Gem::Version
95
+ version: '4'
96
+ type: :runtime
97
+ prerelease: false
98
+ version_requirements: !ruby/object:Gem::Requirement
99
+ requirements:
100
+ - - ">="
101
+ - !ruby/object:Gem::Version
102
+ version: '4'
89
103
  - !ruby/object:Gem::Dependency
90
104
  name: class_composer
91
105
  requirement: !ruby/object:Gem::Requirement
@@ -114,6 +128,48 @@ dependencies:
114
128
  - - ">="
115
129
  - !ruby/object:Gem::Version
116
130
  version: '0.11'
131
+ - !ruby/object:Gem::Dependency
132
+ name: faraday
133
+ requirement: !ruby/object:Gem::Requirement
134
+ requirements:
135
+ - - "~>"
136
+ - !ruby/object:Gem::Version
137
+ version: '2.12'
138
+ type: :runtime
139
+ prerelease: false
140
+ version_requirements: !ruby/object:Gem::Requirement
141
+ requirements:
142
+ - - "~>"
143
+ - !ruby/object:Gem::Version
144
+ version: '2.12'
145
+ - !ruby/object:Gem::Dependency
146
+ name: faraday-net_http_persistent
147
+ requirement: !ruby/object:Gem::Requirement
148
+ requirements:
149
+ - - "~>"
150
+ - !ruby/object:Gem::Version
151
+ version: '2.3'
152
+ type: :runtime
153
+ prerelease: false
154
+ version_requirements: !ruby/object:Gem::Requirement
155
+ requirements:
156
+ - - "~>"
157
+ - !ruby/object:Gem::Version
158
+ version: '2.3'
159
+ - !ruby/object:Gem::Dependency
160
+ name: connection_pool
161
+ requirement: !ruby/object:Gem::Requirement
162
+ requirements:
163
+ - - "~>"
164
+ - !ruby/object:Gem::Version
165
+ version: '3.0'
166
+ type: :runtime
167
+ prerelease: false
168
+ version_requirements: !ruby/object:Gem::Requirement
169
+ requirements:
170
+ - - "~>"
171
+ - !ruby/object:Gem::Version
172
+ version: '3.0'
117
173
  description: CommandTower is the Base API to handle all the things you don't want
118
174
  to for a Rails API only backend serving a Dedicated frontend
119
175
  email:
@@ -125,118 +181,693 @@ files:
125
181
  - MIT-LICENSE
126
182
  - README.md
127
183
  - Rakefile
128
- - app/controllers/command_tower/admin_controller.rb
184
+ - app/auth/command_tower/auth/auth_context.rb
185
+ - app/auth/command_tower/auth/password_recovery_session_context.rb
186
+ - app/auth/command_tower/auth/signup_session_context.rb
187
+ - app/controllers/command_tower/admin/application_controller.rb
188
+ - app/controllers/command_tower/admin/audit/events_controller.rb
189
+ - app/controllers/command_tower/admin/messaging/announcements_controller.rb
190
+ - app/controllers/command_tower/admin/users/identities_controller.rb
191
+ - app/controllers/command_tower/admin/users/impersonation_sessions_controller.rb
192
+ - app/controllers/command_tower/admin/users/roles_controller.rb
193
+ - app/controllers/command_tower/admin/users_controller.rb
194
+ - app/controllers/command_tower/admin/workspace_controller.rb
129
195
  - app/controllers/command_tower/application_controller.rb
130
- - app/controllers/command_tower/auth/plain_text_controller.rb
131
- - app/controllers/command_tower/inbox/message_blast_controller.rb
132
- - app/controllers/command_tower/inbox/message_controller.rb
133
- - app/controllers/command_tower/user_controller.rb
134
- - app/controllers/command_tower/username_controller.rb
196
+ - app/controllers/command_tower/auth/email/availability_controller.rb
197
+ - app/controllers/command_tower/auth/email_verification/send_controller.rb
198
+ - app/controllers/command_tower/auth/email_verification/verify_controller.rb
199
+ - app/controllers/command_tower/auth/identity_policy_controller.rb
200
+ - app/controllers/command_tower/auth/impersonation_session_controller.rb
201
+ - app/controllers/command_tower/auth/logout_controller.rb
202
+ - app/controllers/command_tower/auth/password_recovery_session/create_controller.rb
203
+ - app/controllers/command_tower/auth/password_reset/reset_controller.rb
204
+ - app/controllers/command_tower/auth/password_reset/send_controller.rb
205
+ - app/controllers/command_tower/auth/password_reset/validate_controller.rb
206
+ - app/controllers/command_tower/auth/plain_text/login_controller.rb
207
+ - app/controllers/command_tower/auth/principal_capabilities_controller.rb
208
+ - app/controllers/command_tower/auth/register_controller.rb
209
+ - app/controllers/command_tower/auth/session_controller.rb
210
+ - app/controllers/command_tower/auth/signup_session/create_controller.rb
211
+ - app/controllers/command_tower/auth/username/availability_controller.rb
212
+ - app/controllers/command_tower/me/audit_events_controller.rb
213
+ - app/controllers/command_tower/me/inbox_controller.rb
214
+ - app/controllers/command_tower/me/name_controller.rb
215
+ - app/controllers/command_tower/me/password_controller.rb
216
+ - app/controllers/command_tower/me/phone_controller.rb
217
+ - app/controllers/command_tower/me/phone_verification/verifications_controller.rb
218
+ - app/controllers/command_tower/me/phone_verification/verify_controller.rb
219
+ - app/controllers/command_tower/me/preferences_controller.rb
220
+ - app/controllers/command_tower/me/pushover/verifications_controller.rb
221
+ - app/controllers/command_tower/me/pushover_controller.rb
222
+ - app/controllers/command_tower/me_controller.rb
223
+ - app/controllers/command_tower/profile_controller.rb
224
+ - app/controllers/concerns/command_tower/api/application_response_renderer.rb
225
+ - app/controllers/concerns/command_tower/api/deserializer_failure_details.rb
226
+ - app/controllers/concerns/command_tower/auth/authentication_boundary.rb
227
+ - app/controllers/concerns/command_tower/auth/authorization_boundary.rb
228
+ - app/controllers/concerns/command_tower/auth/invalid_credentials_deserializer_renderer.rb
229
+ - app/controllers/concerns/command_tower/auth/password_recovery_session_boundary.rb
230
+ - app/controllers/concerns/command_tower/auth/signup_session_boundary.rb
231
+ - app/controllers/concerns/command_tower/execution/http_boundary.rb
232
+ - app/deserializers/command_tower/deserializers/admin/messaging/create_announcement_deserializer.rb
233
+ - app/deserializers/command_tower/deserializers/admin/scope_parameter.rb
234
+ - app/deserializers/command_tower/deserializers/admin/users.rb
235
+ - app/deserializers/command_tower/deserializers/application_deserializer.rb
236
+ - app/deserializers/command_tower/deserializers/audit/events.rb
237
+ - app/deserializers/command_tower/deserializers/auth/email_availability_deserializer.rb
238
+ - app/deserializers/command_tower/deserializers/auth/email_verification/verify_deserializer.rb
239
+ - app/deserializers/command_tower/deserializers/auth/password_reset/reset_deserializer.rb
240
+ - app/deserializers/command_tower/deserializers/auth/password_reset/send_deserializer.rb
241
+ - app/deserializers/command_tower/deserializers/auth/password_reset/validate_deserializer.rb
242
+ - app/deserializers/command_tower/deserializers/auth/plain_text/login_deserializer.rb
243
+ - app/deserializers/command_tower/deserializers/auth/register_deserializer.rb
244
+ - app/deserializers/command_tower/deserializers/auth/username_availability_deserializer.rb
245
+ - app/deserializers/command_tower/deserializers/clients/errors.rb
246
+ - app/deserializers/command_tower/deserializers/clients/missing.rb
247
+ - app/deserializers/command_tower/deserializers/clients/payload.rb
248
+ - app/deserializers/command_tower/deserializers/clients/result.rb
249
+ - app/deserializers/command_tower/deserializers/clients/types.rb
250
+ - app/deserializers/command_tower/deserializers/coercion_result.rb
251
+ - app/deserializers/command_tower/deserializers/failure.rb
252
+ - app/deserializers/command_tower/deserializers/me/change_password_deserializer.rb
253
+ - app/deserializers/command_tower/deserializers/me/phone_verification/verify_deserializer.rb
254
+ - app/deserializers/command_tower/deserializers/me/pushover/credentials_deserializer.rb
255
+ - app/deserializers/command_tower/deserializers/me/update_name_deserializer.rb
256
+ - app/deserializers/command_tower/deserializers/me/update_phone_deserializer.rb
257
+ - app/deserializers/command_tower/deserializers/messaging/inbox.rb
258
+ - app/deserializers/command_tower/deserializers/messaging/preferences/show_deserializer.rb
259
+ - app/deserializers/command_tower/deserializers/messaging/preferences/update_deserializer.rb
260
+ - app/errors/command_tower/errors/account/phone_already_verified_error.rb
261
+ - app/errors/command_tower/errors/account/phone_missing_error.rb
262
+ - app/errors/command_tower/errors/account/phone_verification_code_invalid_error.rb
263
+ - app/errors/command_tower/errors/account/phone_verification_expired_error.rb
264
+ - app/errors/command_tower/errors/account/phone_verification_send_failed_error.rb
265
+ - app/errors/command_tower/errors/account/phone_verification_stale_error.rb
266
+ - app/errors/command_tower/errors/account/phone_verification_throttled_error.rb
267
+ - app/errors/command_tower/errors/account/pushover_already_configured_error.rb
268
+ - app/errors/command_tower/errors/account/pushover_capability_unavailable_error.rb
269
+ - app/errors/command_tower/errors/account/pushover_not_configured_error.rb
270
+ - app/errors/command_tower/errors/account/pushover_provider_unavailable_error.rb
271
+ - app/errors/command_tower/errors/account/pushover_verification_failed_error.rb
272
+ - app/errors/command_tower/errors/account/sms_capability_unavailable_error.rb
273
+ - app/errors/command_tower/errors/application_error.rb
274
+ - app/errors/command_tower/errors/auth/admin_unavailable_during_impersonation_error.rb
275
+ - app/errors/command_tower/errors/auth/csrf_mismatch_error.rb
276
+ - app/errors/command_tower/errors/auth/csrf_missing_error.rb
277
+ - app/errors/command_tower/errors/auth/default_membership_assignment_error.rb
278
+ - app/errors/command_tower/errors/auth/email_already_registered_error.rb
279
+ - app/errors/command_tower/errors/auth/email_verification_required_error.rb
280
+ - app/errors/command_tower/errors/auth/impersonation_session_expired_error.rb
281
+ - app/errors/command_tower/errors/auth/impersonation_session_missing_error.rb
282
+ - app/errors/command_tower/errors/auth/invalid_credentials_error.rb
283
+ - app/errors/command_tower/errors/auth/nested_impersonation_error.rb
284
+ - app/errors/command_tower/errors/auth/password_recovery_ip_rate_limit_error.rb
285
+ - app/errors/command_tower/errors/auth/password_recovery_session_expired_error.rb
286
+ - app/errors/command_tower/errors/auth/password_recovery_session_invalid_error.rb
287
+ - app/errors/command_tower/errors/auth/password_recovery_session_missing_error.rb
288
+ - app/errors/command_tower/errors/auth/password_recovery_session_rate_limit_error.rb
289
+ - app/errors/command_tower/errors/auth/password_reset_invalid_token_error.rb
290
+ - app/errors/command_tower/errors/auth/password_reset_unavailable_error.rb
291
+ - app/errors/command_tower/errors/auth/self_impersonation_error.rb
292
+ - app/errors/command_tower/errors/auth/signup_ip_rate_limit_error.rb
293
+ - app/errors/command_tower/errors/auth/signup_session_expired_error.rb
294
+ - app/errors/command_tower/errors/auth/signup_session_invalid_error.rb
295
+ - app/errors/command_tower/errors/auth/signup_session_missing_error.rb
296
+ - app/errors/command_tower/errors/auth/signup_session_rate_limit_error.rb
297
+ - app/errors/command_tower/errors/auth/verification_code_invalid_error.rb
298
+ - app/errors/command_tower/errors/auth/verification_send_failed_error.rb
299
+ - app/errors/command_tower/errors/continuation_exhausted_error.rb
300
+ - app/errors/command_tower/errors/forbidden_error.rb
301
+ - app/errors/command_tower/errors/internal_error.rb
302
+ - app/errors/command_tower/errors/messaging/accept_rejected_error.rb
303
+ - app/errors/command_tower/errors/messaging/idempotency_conflict_error.rb
304
+ - app/errors/command_tower/errors/messaging/recipient_unresolved_error.rb
305
+ - app/errors/command_tower/errors/not_found_error.rb
306
+ - app/errors/command_tower/errors/unauthorized_error.rb
307
+ - app/errors/command_tower/errors/validation_error.rb
135
308
  - app/helpers/command_tower/application_helper.rb
136
- - app/helpers/command_tower/pagination_helper.rb
137
- - app/helpers/command_tower/schema_helper.rb
138
309
  - app/jobs/command_tower/application_job.rb
310
+ - app/jobs/command_tower/execution/job_boundary.rb
311
+ - app/jobs/command_tower/messaging/channel_delivery_execution_job.rb
312
+ - app/jobs/command_tower/messaging/communications/produce_recipient_job.rb
313
+ - app/jobs/command_tower/messaging/execution_recovery_job.rb
314
+ - app/jobs/command_tower/messaging/handoff_job.rb
315
+ - app/jobs/command_tower/messaging/handoff_recovery_job.rb
139
316
  - app/mailers/command_tower/application_mailer.rb
140
317
  - app/mailers/command_tower/email_verification_mailer.rb
318
+ - app/mailers/command_tower/messaging/channel_mailer.rb
319
+ - app/mailers/command_tower/password_reset_mailer.rb
141
320
  - app/models/command_tower/application_record.rb
142
- - app/models/message.rb
143
- - app/models/message_blast.rb
321
+ - app/models/command_tower/audit/event.rb
322
+ - app/models/command_tower/impersonation/session.rb
323
+ - app/models/command_tower/messaging/channel_delivery.rb
324
+ - app/models/command_tower/messaging/communication.rb
325
+ - app/models/command_tower/messaging/delivery_attempt.rb
326
+ - app/models/command_tower/messaging/destination_plan.rb
327
+ - app/models/command_tower/messaging/endpoint.rb
328
+ - app/models/command_tower/messaging/endpoint_pushover_credential.rb
329
+ - app/models/command_tower/messaging/inbox_item.rb
330
+ - app/models/command_tower/messaging/notification_preference.rb
144
331
  - app/models/user.rb
145
332
  - app/models/user_secret.rb
333
+ - app/serializers/command_tower/serializers/admin/messaging/announcement_response_serializer.rb
334
+ - app/serializers/command_tower/serializers/admin/users.rb
335
+ - app/serializers/command_tower/serializers/admin/workspace/manifest_serializer.rb
336
+ - app/serializers/command_tower/serializers/application/envelope_serializer.rb
337
+ - app/serializers/command_tower/serializers/application/error_entry_serializer.rb
338
+ - app/serializers/command_tower/serializers/application_serializer.rb
339
+ - app/serializers/command_tower/serializers/audit/events.rb
340
+ - app/serializers/command_tower/serializers/audit/events/filter_options_serializer.rb
341
+ - app/serializers/command_tower/serializers/auth/email_availability_serializer.rb
342
+ - app/serializers/command_tower/serializers/auth/email_verification/message_response_serializer.rb
343
+ - app/serializers/command_tower/serializers/auth/identity_policy_serializer.rb
344
+ - app/serializers/command_tower/serializers/auth/login_response_serializer.rb
345
+ - app/serializers/command_tower/serializers/auth/logout_response_serializer.rb
346
+ - app/serializers/command_tower/serializers/auth/password_recovery_session_response_serializer.rb
347
+ - app/serializers/command_tower/serializers/auth/password_reset/message_response_serializer.rb
348
+ - app/serializers/command_tower/serializers/auth/password_reset/validate_response_serializer.rb
349
+ - app/serializers/command_tower/serializers/auth/principal_capabilities_serializer.rb
350
+ - app/serializers/command_tower/serializers/auth/register_response_serializer.rb
351
+ - app/serializers/command_tower/serializers/auth/session_response_serializer.rb
352
+ - app/serializers/command_tower/serializers/auth/signup_session_response_serializer.rb
353
+ - app/serializers/command_tower/serializers/auth/user_serializer.rb
354
+ - app/serializers/command_tower/serializers/auth/username_availability_serializer.rb
355
+ - app/serializers/command_tower/serializers/impersonation/session_serializer.rb
356
+ - app/serializers/command_tower/serializers/me/account_serializer.rb
357
+ - app/serializers/command_tower/serializers/me/change_password_response_serializer.rb
358
+ - app/serializers/command_tower/serializers/me/pushover_serializer.rb
359
+ - app/serializers/command_tower/serializers/messaging/inbox.rb
360
+ - app/serializers/command_tower/serializers/messaging/preferences/catalog_serializer.rb
361
+ - app/serializers/command_tower/serializers/messaging/preferences/category_serializer.rb
362
+ - app/serializers/command_tower/serializers/messaging/preferences/notification_serializer.rb
363
+ - app/serializers/command_tower/serializers/profile/profile_serializer.rb
146
364
  - app/services/command_tower/README.md
147
- - app/services/command_tower/admin_service/users.rb
148
365
  - app/services/command_tower/argument_validation.rb
149
366
  - app/services/command_tower/argument_validation/README.md
150
367
  - app/services/command_tower/argument_validation/class_methods.rb
151
368
  - app/services/command_tower/argument_validation/instance_methods.rb
369
+ - app/services/command_tower/auth/request_context.rb
152
370
  - app/services/command_tower/authorize/validate.rb
153
- - app/services/command_tower/inbox_service/blast/delete.rb
154
- - app/services/command_tower/inbox_service/blast/metadata.rb
155
- - app/services/command_tower/inbox_service/blast/new_user_blaster.rb
156
- - app/services/command_tower/inbox_service/blast/retrieve.rb
157
- - app/services/command_tower/inbox_service/blast/upsert.rb
158
- - app/services/command_tower/inbox_service/message/metadata.rb
159
- - app/services/command_tower/inbox_service/message/modify.rb
160
- - app/services/command_tower/inbox_service/message/retrieve.rb
161
- - app/services/command_tower/inbox_service/message/send.rb
371
+ - app/services/command_tower/clients/client_base.rb
372
+ - app/services/command_tower/clients/client_result.rb
373
+ - app/services/command_tower/clients/const_resolution.rb
374
+ - app/services/command_tower/clients/decoded_response.rb
375
+ - app/services/command_tower/clients/endpoint_base.rb
376
+ - app/services/command_tower/clients/endpoint_input.rb
377
+ - app/services/command_tower/clients/errors/authentication_error.rb
378
+ - app/services/command_tower/clients/errors/configuration_error.rb
379
+ - app/services/command_tower/clients/errors/deserialization_error.rb
380
+ - app/services/command_tower/clients/errors/discovery_error.rb
381
+ - app/services/command_tower/clients/errors/upstream_error.rb
382
+ - app/services/command_tower/clients/invocation.rb
383
+ - app/services/command_tower/clients/namespace_proxy.rb
384
+ - app/services/command_tower/clients/scoped_client.rb
385
+ - app/services/command_tower/clients/serialized_request.rb
386
+ - app/services/command_tower/clients/transport/error.rb
387
+ - app/services/command_tower/clients/transport/faraday_adapter.rb
388
+ - app/services/command_tower/clients/transport/faraday_config.rb
389
+ - app/services/command_tower/clients/transport/request.rb
390
+ - app/services/command_tower/clients/transport/response.rb
391
+ - app/services/command_tower/clients/url.rb
392
+ - app/services/command_tower/identity/phone/normalizer.rb
393
+ - app/services/command_tower/identity/phone_verification/sms_configuration.rb
394
+ - app/services/command_tower/identity/phone_verification/sms_transport.rb
395
+ - app/services/command_tower/identity/phone_verification/sms_transport/adapters/fake_adapter.rb
396
+ - app/services/command_tower/identity/phone_verification/sms_transport/adapters/log_adapter.rb
397
+ - app/services/command_tower/identity/phone_verification/sms_transport/adapters/twilio_adapter.rb
162
398
  - app/services/command_tower/jwt/authenticate_user.rb
399
+ - app/services/command_tower/jwt/authentication_outcome.rb
163
400
  - app/services/command_tower/jwt/decode.rb
164
401
  - app/services/command_tower/jwt/encode.rb
165
402
  - app/services/command_tower/jwt/login_create.rb
166
- - app/services/command_tower/jwt/time_delay_token.rb
167
- - app/services/command_tower/login_strategy/plain_text/create.rb
168
- - app/services/command_tower/login_strategy/plain_text/email_verification/generate.rb
169
403
  - app/services/command_tower/login_strategy/plain_text/email_verification/required.rb
170
- - app/services/command_tower/login_strategy/plain_text/email_verification/send.rb
171
- - app/services/command_tower/login_strategy/plain_text/email_verification/verify.rb
172
- - app/services/command_tower/login_strategy/plain_text/login.rb
173
- - app/services/command_tower/pagination_service_helper.rb
404
+ - app/services/command_tower/messaging.rb
405
+ - app/services/command_tower/messaging/accept/channel_delivery_result.rb
406
+ - app/services/command_tower/messaging/accept/coordinator.rb
407
+ - app/services/command_tower/messaging/accept/error.rb
408
+ - app/services/command_tower/messaging/accept/excluded_destination.rb
409
+ - app/services/command_tower/messaging/accept/handoff_scheduler.rb
410
+ - app/services/command_tower/messaging/accept/idempotency_conflict_error.rb
411
+ - app/services/command_tower/messaging/accept/illegal_override_error.rb
412
+ - app/services/command_tower/messaging/accept/impossible_mandatory_plan_error.rb
413
+ - app/services/command_tower/messaging/accept/invalid_preference_error.rb
414
+ - app/services/command_tower/messaging/accept/invariant_error.rb
415
+ - app/services/command_tower/messaging/accept/operation_logger.rb
416
+ - app/services/command_tower/messaging/accept/persistence_error.rb
417
+ - app/services/command_tower/messaging/accept/persister.rb
418
+ - app/services/command_tower/messaging/accept/request_normalizer.rb
419
+ - app/services/command_tower/messaging/accept/result.rb
420
+ - app/services/command_tower/messaging/accept/unknown_type_error.rb
421
+ - app/services/command_tower/messaging/accept/validation_error.rb
422
+ - app/services/command_tower/messaging/channel_detectors.rb
423
+ - app/services/command_tower/messaging/channels.rb
424
+ - app/services/command_tower/messaging/channels/definition.rb
425
+ - app/services/command_tower/messaging/channels/error.rb
426
+ - app/services/command_tower/messaging/channels/unknown_channel_error.rb
427
+ - app/services/command_tower/messaging/contract/communications.rb
428
+ - app/services/command_tower/messaging/contract/error.rb
429
+ - app/services/command_tower/messaging/contract/internal/finder.rb
430
+ - app/services/command_tower/messaging/contract/invariant_error.rb
431
+ - app/services/command_tower/messaging/contract/mappers/channel_delivery_mapper.rb
432
+ - app/services/command_tower/messaging/contract/mappers/communication_mapper.rb
433
+ - app/services/command_tower/messaging/contract/mappers/delivery_attempt_mapper.rb
434
+ - app/services/command_tower/messaging/contract/mappers/destination_plan_mapper.rb
435
+ - app/services/command_tower/messaging/contract/mappers/inbox_item_mapper.rb
436
+ - app/services/command_tower/messaging/contract/not_found_error.rb
437
+ - app/services/command_tower/messaging/contract/observability/correlation.rb
438
+ - app/services/command_tower/messaging/contract/observability/operation_logger.rb
439
+ - app/services/command_tower/messaging/contract/observability/publisher.rb
440
+ - app/services/command_tower/messaging/contract/requests/find_communication.rb
441
+ - app/services/command_tower/messaging/contract/results/channel_delivery_result.rb
442
+ - app/services/command_tower/messaging/contract/results/communication_result.rb
443
+ - app/services/command_tower/messaging/contract/results/delivery_attempt_result.rb
444
+ - app/services/command_tower/messaging/contract/results/destination_plan_result.rb
445
+ - app/services/command_tower/messaging/contract/results/inbox_item_result.rb
446
+ - app/services/command_tower/messaging/contract/validation_error.rb
447
+ - app/services/command_tower/messaging/delivery_retry_policy.rb
448
+ - app/services/command_tower/messaging/endpoints.rb
449
+ - app/services/command_tower/messaging/endpoints/begin_verification.rb
450
+ - app/services/command_tower/messaging/endpoints/channel_gate.rb
451
+ - app/services/command_tower/messaging/endpoints/conflict_error.rb
452
+ - app/services/command_tower/messaging/endpoints/create.rb
453
+ - app/services/command_tower/messaging/endpoints/error.rb
454
+ - app/services/command_tower/messaging/endpoints/fingerprinter.rb
455
+ - app/services/command_tower/messaging/endpoints/invalid_transition_error.rb
456
+ - app/services/command_tower/messaging/endpoints/lifecycle.rb
457
+ - app/services/command_tower/messaging/endpoints/mark_invalid.rb
458
+ - app/services/command_tower/messaging/endpoints/mark_verification_failed.rb
459
+ - app/services/command_tower/messaging/endpoints/mark_verified.rb
460
+ - app/services/command_tower/messaging/endpoints/not_found_error.rb
461
+ - app/services/command_tower/messaging/endpoints/persistence.rb
462
+ - app/services/command_tower/messaging/endpoints/pushover/verify.rb
463
+ - app/services/command_tower/messaging/endpoints/query.rb
464
+ - app/services/command_tower/messaging/endpoints/replace.rb
465
+ - app/services/command_tower/messaging/endpoints/reset_verification.rb
466
+ - app/services/command_tower/messaging/endpoints/revoke.rb
467
+ - app/services/command_tower/messaging/endpoints/safe_view.rb
468
+ - app/services/command_tower/messaging/endpoints/secret_box.rb
469
+ - app/services/command_tower/messaging/endpoints/secret_reader.rb
470
+ - app/services/command_tower/messaging/endpoints/validation_error.rb
471
+ - app/services/command_tower/messaging/endpoints/validators.rb
472
+ - app/services/command_tower/messaging/endpoints/validators/push.rb
473
+ - app/services/command_tower/messaging/endpoints/validators/pushover.rb
474
+ - app/services/command_tower/messaging/endpoints/verification.rb
475
+ - app/services/command_tower/messaging/endpoints/verification_failed_error.rb
476
+ - app/services/command_tower/messaging/endpoints/verification_transition.rb
477
+ - app/services/command_tower/messaging/execution/adapter_request.rb
478
+ - app/services/command_tower/messaging/execution/adapter_result.rb
479
+ - app/services/command_tower/messaging/execution/adapters/email/adapter.rb
480
+ - app/services/command_tower/messaging/execution/adapters/email/configuration.rb
481
+ - app/services/command_tower/messaging/execution/adapters/fake_adapter.rb
482
+ - app/services/command_tower/messaging/execution/adapters/pushover/adapter.rb
483
+ - app/services/command_tower/messaging/execution/adapters/pushover/configuration.rb
484
+ - app/services/command_tower/messaging/execution/adapters/sms/adapter.rb
485
+ - app/services/command_tower/messaging/execution/adapters/sms/configuration.rb
486
+ - app/services/command_tower/messaging/execution/adapters/sms/log_adapter.rb
487
+ - app/services/command_tower/messaging/execution/adapters/sms/twilio_http_client.rb
488
+ - app/services/command_tower/messaging/execution/adapters/unconfigured_adapter.rb
489
+ - app/services/command_tower/messaging/execution/attempt_ledger.rb
490
+ - app/services/command_tower/messaging/execution/claim.rb
491
+ - app/services/command_tower/messaging/execution/invalid_adapter_contract_error.rb
492
+ - app/services/command_tower/messaging/execution/operation_logger.rb
493
+ - app/services/command_tower/messaging/execution/readiness_terminal_mapping.rb
494
+ - app/services/command_tower/messaging/execution/recovery.rb
495
+ - app/services/command_tower/messaging/execution/resolve_recipient_address.rb
496
+ - app/services/command_tower/messaging/execution/revalidate_readiness.rb
497
+ - app/services/command_tower/messaging/execution/scheduler.rb
498
+ - app/services/command_tower/messaging/execution/select_adapter.rb
499
+ - app/services/command_tower/messaging/handoff/advance_communication.rb
500
+ - app/services/command_tower/messaging/handoff/operation_logger.rb
501
+ - app/services/command_tower/messaging/handoff/recovery.rb
502
+ - app/services/command_tower/messaging/inbox.rb
503
+ - app/services/command_tower/messaging/inbox/bulk_result.rb
504
+ - app/services/command_tower/messaging/inbox/error.rb
505
+ - app/services/command_tower/messaging/inbox/invalid_bulk_items_error.rb
506
+ - app/services/command_tower/messaging/inbox/invariant_error.rb
507
+ - app/services/command_tower/messaging/inbox/item_result.rb
508
+ - app/services/command_tower/messaging/inbox/list_result.rb
509
+ - app/services/command_tower/messaging/inbox/mutator.rb
510
+ - app/services/command_tower/messaging/inbox/not_found_error.rb
511
+ - app/services/command_tower/messaging/inbox/operation_logger.rb
512
+ - app/services/command_tower/messaging/inbox/reader.rb
513
+ - app/services/command_tower/messaging/inbox/scope.rb
514
+ - app/services/command_tower/messaging/inbox/unread_count_result.rb
515
+ - app/services/command_tower/messaging/inbox/validation_error.rb
516
+ - app/services/command_tower/messaging/notification_types.rb
517
+ - app/services/command_tower/messaging/notification_types/catalog_category.rb
518
+ - app/services/command_tower/messaging/notification_types/declaration.rb
519
+ - app/services/command_tower/messaging/notification_types/declaration_validator.rb
520
+ - app/services/command_tower/messaging/notification_types/duplicate_type_error.rb
521
+ - app/services/command_tower/messaging/notification_types/error.rb
522
+ - app/services/command_tower/messaging/notification_types/invalid_declaration_error.rb
523
+ - app/services/command_tower/messaging/notification_types/not_found_error.rb
524
+ - app/services/command_tower/messaging/notification_types/registry.rb
525
+ - app/services/command_tower/messaging/notification_types/sealed_registry_error.rb
526
+ - app/services/command_tower/messaging/planner.rb
527
+ - app/services/command_tower/messaging/planner/destination_plan.rb
528
+ - app/services/command_tower/messaging/planner/error.rb
529
+ - app/services/command_tower/messaging/planner/excluded_destination.rb
530
+ - app/services/command_tower/messaging/planner/illegal_override_error.rb
531
+ - app/services/command_tower/messaging/planner/impossible_mandatory_plan_error.rb
532
+ - app/services/command_tower/messaging/planner/invalid_evaluation_error.rb
533
+ - app/services/command_tower/messaging/planner/message_overrides.rb
534
+ - app/services/command_tower/messaging/planner/operation_logger.rb
535
+ - app/services/command_tower/messaging/planner/planner.rb
536
+ - app/services/command_tower/messaging/planner/unknown_type_error.rb
537
+ - app/services/command_tower/messaging/preferences.rb
538
+ - app/services/command_tower/messaging/preferences/catalog.rb
539
+ - app/services/command_tower/messaging/preferences/catalog_category_result.rb
540
+ - app/services/command_tower/messaging/preferences/catalog_notification_result.rb
541
+ - app/services/command_tower/messaging/preferences/catalog_result.rb
542
+ - app/services/command_tower/messaging/preferences/error.rb
543
+ - app/services/command_tower/messaging/preferences/evaluation_result.rb
544
+ - app/services/command_tower/messaging/preferences/evaluator.rb
545
+ - app/services/command_tower/messaging/preferences/invalid_preference_state_error.rb
546
+ - app/services/command_tower/messaging/preferences/invalid_preference_write_error.rb
547
+ - app/services/command_tower/messaging/preferences/not_settings_visible_error.rb
548
+ - app/services/command_tower/messaging/preferences/preference_state.rb
549
+ - app/services/command_tower/messaging/preferences/reason_classes.rb
550
+ - app/services/command_tower/messaging/preferences/resolve.rb
551
+ - app/services/command_tower/messaging/preferences/store.rb
552
+ - app/services/command_tower/messaging/preferences/store_error.rb
553
+ - app/services/command_tower/messaging/preferences/suppressed_destination.rb
554
+ - app/services/command_tower/messaging/preferences/unknown_type_error.rb
555
+ - app/services/command_tower/messaging/preferences/update.rb
556
+ - app/services/command_tower/messaging/pushover/adapters/disabled_adapter.rb
557
+ - app/services/command_tower/messaging/pushover/adapters/fake_adapter.rb
558
+ - app/services/command_tower/messaging/pushover/adapters/http_adapter.rb
559
+ - app/services/command_tower/messaging/pushover/adapters/log_adapter.rb
560
+ - app/services/command_tower/messaging/pushover/result.rb
561
+ - app/services/command_tower/messaging/pushover/transport.rb
562
+ - app/services/command_tower/messaging/recipient_readiness.rb
563
+ - app/services/command_tower/messaging/recipient_readiness/channel_result.rb
564
+ - app/services/command_tower/messaging/recipient_readiness/error.rb
565
+ - app/services/command_tower/messaging/recipient_readiness/evaluate.rb
566
+ - app/services/command_tower/messaging/recipient_readiness/identity_facts.rb
567
+ - app/services/command_tower/messaging/recipient_readiness/reason_codes.rb
568
+ - app/services/command_tower/messaging/recipient_readiness/recipient_not_found_error.rb
569
+ - app/services/command_tower/messaging/recipient_readiness/recipient_result.rb
570
+ - app/services/command_tower/messaging/recipient_readiness/unknown_channel_error.rb
571
+ - app/services/command_tower/messaging/rendering/channel_renderer.rb
572
+ - app/services/command_tower/messaging/rendering/render_error.rb
573
+ - app/services/command_tower/messaging/rendering/rendered_payload.rb
574
+ - app/services/command_tower/messaging/rendering/rendered_pushover_payload.rb
575
+ - app/services/command_tower/messaging/rendering/rendered_sms_payload.rb
174
576
  - app/services/command_tower/secrets.rb
175
577
  - app/services/command_tower/secrets/cleanse.rb
176
578
  - app/services/command_tower/secrets/generate.rb
177
579
  - app/services/command_tower/secrets/verify.rb
178
580
  - app/services/command_tower/service_base.rb
179
581
  - app/services/command_tower/service_logging.rb
180
- - app/services/command_tower/user_attributes/modify.rb
181
- - app/services/command_tower/user_attributes/roles.rb
582
+ - app/services/command_tower/services/account/clear_phone.rb
583
+ - app/services/command_tower/services/account/phone_verification/send.rb
584
+ - app/services/command_tower/services/account/phone_verification/verify.rb
585
+ - app/services/command_tower/services/account/pushover/create.rb
586
+ - app/services/command_tower/services/account/pushover/ct_support.rb
587
+ - app/services/command_tower/services/account/pushover/destroy.rb
588
+ - app/services/command_tower/services/account/pushover/replace.rb
589
+ - app/services/command_tower/services/account/pushover/show.rb
590
+ - app/services/command_tower/services/account/pushover/verify.rb
591
+ - app/services/command_tower/services/account/update_phone.rb
592
+ - app/services/command_tower/services/admin/users.rb
593
+ - app/services/command_tower/services/admin/workspace/manifest.rb
594
+ - app/services/command_tower/services/application_service.rb
595
+ - app/services/command_tower/services/audit/events.rb
596
+ - app/services/command_tower/services/audit/events/filter_options.rb
597
+ - app/services/command_tower/services/auth/assign_default_membership_role.rb
598
+ - app/services/command_tower/services/auth/authenticate_session.rb
599
+ - app/services/command_tower/services/auth/authorize_request.rb
600
+ - app/services/command_tower/services/auth/client_ip_resolver.rb
601
+ - app/services/command_tower/services/auth/email_availability.rb
602
+ - app/services/command_tower/services/auth/email_verification/send.rb
603
+ - app/services/command_tower/services/auth/email_verification/verify.rb
604
+ - app/services/command_tower/services/auth/identity_policy.rb
605
+ - app/services/command_tower/services/auth/password_recovery/rate_limits/check_send.rb
606
+ - app/services/command_tower/services/auth/password_recovery/rate_limits/check_token_issue.rb
607
+ - app/services/command_tower/services/auth/password_recovery/rate_limits/enforcement.rb
608
+ - app/services/command_tower/services/auth/password_recovery_session/create.rb
609
+ - app/services/command_tower/services/auth/password_recovery_session/decode.rb
610
+ - app/services/command_tower/services/auth/password_recovery_session/encode.rb
611
+ - app/services/command_tower/services/auth/password_recovery_session/validate.rb
612
+ - app/services/command_tower/services/auth/password_reset/reset.rb
613
+ - app/services/command_tower/services/auth/password_reset/send.rb
614
+ - app/services/command_tower/services/auth/password_reset/token_verification.rb
615
+ - app/services/command_tower/services/auth/password_reset/validate.rb
616
+ - app/services/command_tower/services/auth/plain_text/login.rb
617
+ - app/services/command_tower/services/auth/principal_capabilities/project.rb
618
+ - app/services/command_tower/services/auth/register.rb
619
+ - app/services/command_tower/services/auth/signup_rate_limits/check_availability.rb
620
+ - app/services/command_tower/services/auth/signup_rate_limits/check_register.rb
621
+ - app/services/command_tower/services/auth/signup_rate_limits/check_token_issue.rb
622
+ - app/services/command_tower/services/auth/signup_rate_limits/enforcement.rb
623
+ - app/services/command_tower/services/auth/signup_session/create.rb
624
+ - app/services/command_tower/services/auth/signup_session/decode.rb
625
+ - app/services/command_tower/services/auth/signup_session/encode.rb
626
+ - app/services/command_tower/services/auth/signup_session/validate.rb
627
+ - app/services/command_tower/services/auth/username_availability.rb
628
+ - app/services/command_tower/services/impersonation/create.rb
629
+ - app/services/command_tower/services/impersonation/end.rb
630
+ - app/services/command_tower/services/impersonation/record_activity.rb
631
+ - app/services/command_tower/services/impersonation/terminate_open_sessions.rb
632
+ - app/services/command_tower/services/me/capabilities.rb
633
+ - app/services/command_tower/services/me/change_password.rb
634
+ - app/services/command_tower/services/me/pushover_product_gate.rb
635
+ - app/services/command_tower/services/me/sms_product_gate.rb
636
+ - app/services/command_tower/services/me/update_name.rb
637
+ - app/services/command_tower/services/messaging/communications/produce.rb
638
+ - app/services/command_tower/services/messaging/communications/produce_many.rb
639
+ - app/services/command_tower/services/messaging/inbox.rb
640
+ - app/services/command_tower/services/messaging/preferences/platform_enabled_channels.rb
641
+ - app/services/command_tower/services/messaging/preferences/show.rb
642
+ - app/services/command_tower/services/messaging/preferences/update.rb
643
+ - app/services/command_tower/services/messaging/recipients.rb
644
+ - app/services/command_tower/services/rate_limits/check.rb
645
+ - app/services/command_tower/services/service_result.rb
646
+ - app/services/command_tower/user_attributes/mutate.rb
182
647
  - app/services/command_tower/username/available.rb
648
+ - app/shared_sequences/command_tower/shared_sequences/admin/users/resolve_scoped_user.rb
183
649
  - app/views/command_tower/email_verification_mailer/verify_email.html.erb
650
+ - app/views/command_tower/messaging/rendering/email.html.erb
651
+ - app/views/command_tower/messaging/rendering/email.text.erb
652
+ - app/views/command_tower/messaging/rendering/pushover.text.erb
653
+ - app/views/command_tower/messaging/rendering/sms.text.erb
654
+ - app/views/command_tower/password_reset_mailer/reset_password.html.erb
655
+ - app/views/layouts/mailer.html.erb
656
+ - app/views/layouts/mailer.text.erb
657
+ - app/workflows/command_tower/transactional.rb
658
+ - app/workflows/command_tower/workflows/admin/messaging/create_announcement_workflow.rb
659
+ - app/workflows/command_tower/workflows/admin/scope_resolution.rb
660
+ - app/workflows/command_tower/workflows/admin/users/error_mapping.rb
661
+ - app/workflows/command_tower/workflows/admin/users/identity_mutation.rb
662
+ - app/workflows/command_tower/workflows/admin/users/list_assignable_roles_workflow.rb
663
+ - app/workflows/command_tower/workflows/admin/users/list_workflow.rb
664
+ - app/workflows/command_tower/workflows/admin/users/set_email_validated_workflow.rb
665
+ - app/workflows/command_tower/workflows/admin/users/show_workflow.rb
666
+ - app/workflows/command_tower/workflows/admin/users/update_email_workflow.rb
667
+ - app/workflows/command_tower/workflows/admin/users/update_name_workflow.rb
668
+ - app/workflows/command_tower/workflows/admin/users/update_roles_workflow.rb
669
+ - app/workflows/command_tower/workflows/admin/users/update_username_workflow.rb
670
+ - app/workflows/command_tower/workflows/admin/workspace/manifest_workflow.rb
671
+ - app/workflows/command_tower/workflows/application_workflow.rb
672
+ - app/workflows/command_tower/workflows/audit/error_mapping.rb
673
+ - app/workflows/command_tower/workflows/audit/events/filter_options_for_admin_workflow.rb
674
+ - app/workflows/command_tower/workflows/audit/events/filter_options_for_user_workflow.rb
675
+ - app/workflows/command_tower/workflows/audit/events/list_for_admin_workflow.rb
676
+ - app/workflows/command_tower/workflows/audit/events/list_for_user_workflow.rb
677
+ - app/workflows/command_tower/workflows/audit/events/show_for_admin_workflow.rb
678
+ - app/workflows/command_tower/workflows/audit/events/show_for_user_workflow.rb
679
+ - app/workflows/command_tower/workflows/auth/authenticate_request_workflow.rb
680
+ - app/workflows/command_tower/workflows/auth/authentication_response_effects.rb
681
+ - app/workflows/command_tower/workflows/auth/authorize_request_workflow.rb
682
+ - app/workflows/command_tower/workflows/auth/email_availability_workflow.rb
683
+ - app/workflows/command_tower/workflows/auth/email_verification/send_workflow.rb
684
+ - app/workflows/command_tower/workflows/auth/email_verification/verify_workflow.rb
685
+ - app/workflows/command_tower/workflows/auth/identity_error_status.rb
686
+ - app/workflows/command_tower/workflows/auth/identity_policy_workflow.rb
687
+ - app/workflows/command_tower/workflows/auth/logout_workflow.rb
688
+ - app/workflows/command_tower/workflows/auth/password_recovery_session/authenticate_workflow.rb
689
+ - app/workflows/command_tower/workflows/auth/password_recovery_session/create_workflow.rb
690
+ - app/workflows/command_tower/workflows/auth/password_reset/reset_workflow.rb
691
+ - app/workflows/command_tower/workflows/auth/password_reset/send_workflow.rb
692
+ - app/workflows/command_tower/workflows/auth/password_reset/validate_workflow.rb
693
+ - app/workflows/command_tower/workflows/auth/plain_text/login_workflow.rb
694
+ - app/workflows/command_tower/workflows/auth/principal_capabilities/show_workflow.rb
695
+ - app/workflows/command_tower/workflows/auth/register_workflow.rb
696
+ - app/workflows/command_tower/workflows/auth/session/show_workflow.rb
697
+ - app/workflows/command_tower/workflows/auth/session_error_status.rb
698
+ - app/workflows/command_tower/workflows/auth/signup_error_status.rb
699
+ - app/workflows/command_tower/workflows/auth/signup_session/authenticate_workflow.rb
700
+ - app/workflows/command_tower/workflows/auth/signup_session/create_workflow.rb
701
+ - app/workflows/command_tower/workflows/auth/username_availability_workflow.rb
702
+ - app/workflows/command_tower/workflows/impersonation/error_mapping.rb
703
+ - app/workflows/command_tower/workflows/impersonation/start_workflow.rb
704
+ - app/workflows/command_tower/workflows/impersonation/stop_workflow.rb
705
+ - app/workflows/command_tower/workflows/me/change_password_workflow.rb
706
+ - app/workflows/command_tower/workflows/me/clear_phone_workflow.rb
707
+ - app/workflows/command_tower/workflows/me/error_mapping.rb
708
+ - app/workflows/command_tower/workflows/me/error_status.rb
709
+ - app/workflows/command_tower/workflows/me/phone_verification/send_workflow.rb
710
+ - app/workflows/command_tower/workflows/me/phone_verification/verify_workflow.rb
711
+ - app/workflows/command_tower/workflows/me/pushover/create_workflow.rb
712
+ - app/workflows/command_tower/workflows/me/pushover/destroy_workflow.rb
713
+ - app/workflows/command_tower/workflows/me/pushover/replace_workflow.rb
714
+ - app/workflows/command_tower/workflows/me/pushover/show_workflow.rb
715
+ - app/workflows/command_tower/workflows/me/pushover/verify_workflow.rb
716
+ - app/workflows/command_tower/workflows/me/pushover/workflow_support.rb
717
+ - app/workflows/command_tower/workflows/me/show_workflow.rb
718
+ - app/workflows/command_tower/workflows/me/update_name_workflow.rb
719
+ - app/workflows/command_tower/workflows/me/update_phone_workflow.rb
720
+ - app/workflows/command_tower/workflows/messaging/communications/produce_recipient_workflow.rb
721
+ - app/workflows/command_tower/workflows/messaging/error_mapping.rb
722
+ - app/workflows/command_tower/workflows/messaging/execution/deliver_workflow.rb
723
+ - app/workflows/command_tower/workflows/messaging/handoff/process_workflow.rb
724
+ - app/workflows/command_tower/workflows/messaging/inbox.rb
725
+ - app/workflows/command_tower/workflows/messaging/preferences/show_workflow.rb
726
+ - app/workflows/command_tower/workflows/messaging/preferences/update_workflow.rb
727
+ - app/workflows/command_tower/workflows/profile/show_workflow.rb
728
+ - app/workflows/command_tower/workflows/workflow_result.rb
184
729
  - config/routes.rb
185
- - db/migrate/20241117043720_create_command_tower_users.rb
186
- - db/migrate/20241204065708_create_command_tower_user_secrets.rb
187
- - db/migrate/20250223023306_create_command_tower_messages.rb
188
- - db/migrate/20250223023313_create_command_tower_message_blasts.rb
730
+ - db/migrate/20260805000001_create_command_tower_users.rb
731
+ - db/migrate/20260805000002_create_command_tower_user_secrets.rb
732
+ - db/migrate/20260805000003_create_command_tower_messaging_core.rb
733
+ - db/migrate/20260805000004_create_messaging_notification_preferences.rb
734
+ - db/migrate/20260805000005_create_messaging_endpoints_and_pushover_credentials.rb
735
+ - db/migrate/20260816000001_create_command_tower_audit_events.rb
736
+ - db/migrate/20260817000001_add_scope_columns_to_command_tower_audit_events.rb
737
+ - db/migrate/20260817000003_create_command_tower_impersonation_sessions.rb
738
+ - docs/admin_workspace.md
739
+ - docs/api_reference.md
740
+ - docs/architecture.md
741
+ - docs/audit.md
742
+ - docs/authentication.md
743
+ - docs/authentication_authorization_guide.md
744
+ - docs/authorization.md
745
+ - docs/change_password_workflow.md
746
+ - docs/controllers.md
747
+ - docs/cookie_authentication_guide.md
748
+ - docs/email_verification_workflow.md
749
+ - docs/eventing.md
750
+ - docs/extending.md
751
+ - docs/host_integration_guide.md
752
+ - docs/initializing.md
753
+ - docs/messaging_integration_guide.md
754
+ - docs/models.md
755
+ - docs/pagination.md
756
+ - docs/password_reset_workflow.md
757
+ - docs/principal_capabilities.md
758
+ - docs/sensitive_routes.md
759
+ - docs/testing.md
760
+ - docs/upgrades/0.10.0.md
761
+ - docs/upgrades/0.11.0.md
762
+ - docs/upgrades/README.md
189
763
  - lib/command_tower.rb
764
+ - lib/command_tower/admin_scope.rb
765
+ - lib/command_tower/admin_scope/apply_audit_scoping.rb
766
+ - lib/command_tower/admin_scope/apply_users_narrowing.rb
767
+ - lib/command_tower/admin_scope/manifest_projection.rb
768
+ - lib/command_tower/admin_scope/resolve.rb
769
+ - lib/command_tower/admin_scope/scope_context.rb
770
+ - lib/command_tower/admin_scope/scope_option.rb
771
+ - lib/command_tower/admin_workspace.rb
772
+ - lib/command_tower/audit.rb
773
+ - lib/command_tower/audit/attribution.rb
774
+ - lib/command_tower/audit/emit.rb
775
+ - lib/command_tower/audit/masking.rb
776
+ - lib/command_tower/audit/payload.rb
777
+ - lib/command_tower/audit/persistence/subscriber.rb
190
778
  - lib/command_tower/authorization.rb
779
+ - lib/command_tower/authorization/assignable_roles.rb
191
780
  - lib/command_tower/authorization/default.yml
781
+ - lib/command_tower/authorization/effective_entity_grants.rb
192
782
  - lib/command_tower/authorization/entity.rb
193
783
  - lib/command_tower/authorization/role.rb
194
784
  - lib/command_tower/configuration/admin/config.rb
785
+ - lib/command_tower/configuration/admin_scope/config.rb
786
+ - lib/command_tower/configuration/admin_scope/tool_registration.rb
195
787
  - lib/command_tower/configuration/application/config.rb
196
788
  - lib/command_tower/configuration/authorization/config.rb
197
789
  - lib/command_tower/configuration/base.rb
198
790
  - lib/command_tower/configuration/config.rb
791
+ - lib/command_tower/configuration/credentials/config.rb
792
+ - lib/command_tower/configuration/credentials/smtp.rb
793
+ - lib/command_tower/configuration/credentials/twilio.rb
199
794
  - lib/command_tower/configuration/email/config.rb
795
+ - lib/command_tower/configuration/identity/config.rb
796
+ - lib/command_tower/configuration/identity/phone_verification.rb
797
+ - lib/command_tower/configuration/impersonation/config.rb
200
798
  - lib/command_tower/configuration/jwt/config.rb
799
+ - lib/command_tower/configuration/jwt/cookie/config.rb
800
+ - lib/command_tower/configuration/jwt/cookie/csrf/config.rb
201
801
  - lib/command_tower/configuration/login/config.rb
202
802
  - lib/command_tower/configuration/login/strategy/plain_text/config.rb
203
803
  - lib/command_tower/configuration/login/strategy/plain_text/email_verify.rb
204
804
  - lib/command_tower/configuration/login/strategy/plain_text/lockable.rb
805
+ - lib/command_tower/configuration/login/strategy/plain_text/password_reset.rb
806
+ - lib/command_tower/configuration/messaging/config.rb
807
+ - lib/command_tower/configuration/messaging/pushover.rb
808
+ - lib/command_tower/configuration/messaging/sms.rb
205
809
  - lib/command_tower/configuration/otp/config.rb
206
810
  - lib/command_tower/configuration/pagination/config.rb
811
+ - lib/command_tower/configuration/password_recovery_session/config.rb
812
+ - lib/command_tower/configuration/password_recovery_session/rate_limits.rb
813
+ - lib/command_tower/configuration/registry/admin_workspace/config.rb
814
+ - lib/command_tower/configuration/registry/admin_workspace/tool_definition.rb
815
+ - lib/command_tower/configuration/registry/audit/config.rb
816
+ - lib/command_tower/configuration/registry/audit/event_definition.rb
817
+ - lib/command_tower/configuration/registry/config.rb
818
+ - lib/command_tower/configuration/registry/principal_capabilities/capability_definition.rb
819
+ - lib/command_tower/configuration/registry/principal_capabilities/config.rb
820
+ - lib/command_tower/configuration/signup_session/config.rb
821
+ - lib/command_tower/configuration/signup_session/email_availability.rb
822
+ - lib/command_tower/configuration/signup_session/rate_limits.rb
207
823
  - lib/command_tower/configuration/user/config.rb
208
824
  - lib/command_tower/configuration/username/check.rb
209
825
  - lib/command_tower/configuration/username/config.rb
826
+ - lib/command_tower/credential_resolution.rb
827
+ - lib/command_tower/credential_resolution/env_backend.rb
828
+ - lib/command_tower/credential_resolution/smtp_action_mailer_bridge.rb
829
+ - lib/command_tower/credential_resolution/smtp_credentials.rb
830
+ - lib/command_tower/credential_resolution/twilio_credentials.rb
831
+ - lib/command_tower/current.rb
210
832
  - lib/command_tower/engine.rb
211
833
  - lib/command_tower/error.rb
834
+ - lib/command_tower/events.rb
835
+ - lib/command_tower/execution.rb
836
+ - lib/command_tower/impersonation/activity_declaration.rb
837
+ - lib/command_tower/impersonation/apply_overlay.rb
838
+ - lib/command_tower/impersonation/clear_overlay_for_audit.rb
839
+ - lib/command_tower/impersonation/establish_identity.rb
840
+ - lib/command_tower/install/baseline.rb
841
+ - lib/command_tower/install/doctor.rb
842
+ - lib/command_tower/jwt/authorization_helper.rb
843
+ - lib/command_tower/jwt/csrf_helper.rb
844
+ - lib/command_tower/logging/lifecycle_declaration.rb
845
+ - lib/command_tower/logging/projection.rb
846
+ - lib/command_tower/logging/subscriber.rb
847
+ - lib/command_tower/password_recovery/authorization_helper.rb
848
+ - lib/command_tower/principal_capabilities.rb
849
+ - lib/command_tower/redis_connection.rb
212
850
  - lib/command_tower/schema.rb
213
- - lib/command_tower/schema/admin/users.rb
214
851
  - lib/command_tower/schema/error/base.rb
852
+ - lib/command_tower/schema/error/email_validation_required.rb
215
853
  - lib/command_tower/schema/error/invalid_argument.rb
216
854
  - lib/command_tower/schema/error/invalid_argument_response.rb
217
- - lib/command_tower/schema/inbox/blast_request.rb
218
- - lib/command_tower/schema/inbox/blast_response.rb
219
- - lib/command_tower/schema/inbox/message_blast_entity.rb
220
- - lib/command_tower/schema/inbox/message_blast_metadata.rb
221
- - lib/command_tower/schema/inbox/message_entity.rb
222
- - lib/command_tower/schema/inbox/metadata.rb
223
- - lib/command_tower/schema/inbox/modified.rb
224
- - lib/command_tower/schema/page.rb
225
- - lib/command_tower/schema/pagination.rb
226
- - lib/command_tower/schema/plain_text/create_user_request.rb
227
- - lib/command_tower/schema/plain_text/create_user_response.rb
228
- - lib/command_tower/schema/plain_text/email_verify_request.rb
229
- - lib/command_tower/schema/plain_text/email_verify_response.rb
230
- - lib/command_tower/schema/plain_text/email_verify_send_request.rb
231
- - lib/command_tower/schema/plain_text/email_verify_send_response.rb
232
- - lib/command_tower/schema/plain_text/login_request.rb
233
- - lib/command_tower/schema/plain_text/login_response.rb
234
- - lib/command_tower/schema/user.rb
855
+ - lib/command_tower/schema/shared/user.rb
856
+ - lib/command_tower/signup/authorization_helper.rb
235
857
  - lib/command_tower/spec_helper.rb
858
+ - lib/command_tower/testing.rb
236
859
  - lib/command_tower/version.rb
237
860
  - lib/generators/command_tower/configure/USAGE
238
861
  - lib/generators/command_tower/configure/configure_generator.rb
239
862
  - lib/tasks/auto_annotate_models.rake
863
+ - lib/tasks/install.rake
864
+ - lib/tasks/users.rake
865
+ - spec/factories/entity.rb
866
+ - spec/factories/impersonation_session.rb
867
+ - spec/factories/messaging.rb
868
+ - spec/factories/role.rb
869
+ - spec/factories/user.rb
870
+ - spec/factories/user_secret.rb
240
871
  homepage: https://github.com/matt-taylor/command_tower
241
872
  licenses:
242
873
  - MIT