open-loam 0.1.1 → 0.2.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/CHANGELOG.md +32 -8
- data/LICENSE +1 -1
- data/README.md +24 -24
- data/app/jobs/{loam → open_loam}/custom_field_reindex_job.rb +6 -6
- data/app/jobs/{loam → open_loam}/event_delivery_job.rb +8 -8
- data/app/jobs/{loam → open_loam}/event_redelivery_sweep_job.rb +4 -4
- data/app/jobs/{loam → open_loam}/webhook_delivery_job.rb +7 -7
- data/app/models/{loam → open_loam}/api_token.rb +7 -7
- data/app/models/{loam → open_loam}/audit_record.rb +3 -3
- data/app/models/{loam → open_loam}/auth_attempt.rb +5 -5
- data/app/models/{loam → open_loam}/business_rule.rb +10 -10
- data/app/models/{loam → open_loam}/business_rule_run.rb +5 -5
- data/app/models/{loam → open_loam}/comment.rb +9 -9
- data/app/models/{loam → open_loam}/config.rb +7 -7
- data/app/models/{loam → open_loam}/custom_field_value.rb +5 -5
- data/app/models/{loam → open_loam}/dashboard_widget.rb +5 -5
- data/app/models/open_loam/dictionary.rb +20 -0
- data/app/models/{loam → open_loam}/dictionary_entry.rb +7 -7
- data/app/models/{loam → open_loam}/event_delivery.rb +4 -4
- data/app/models/{loam → open_loam}/field_definition.rb +8 -8
- data/app/models/{loam → open_loam}/inbound_webhook_delivery.rb +4 -4
- data/app/models/{loam → open_loam}/inbound_webhook_source.rb +13 -13
- data/app/models/{loam → open_loam}/membership.rb +6 -6
- data/app/models/{loam → open_loam}/mfa_credential.rb +8 -8
- data/app/models/{loam → open_loam}/notification.rb +10 -10
- data/app/models/{loam → open_loam}/pending_action.rb +23 -23
- data/app/models/{loam → open_loam}/perspective.rb +5 -5
- data/app/models/{loam → open_loam}/progress_job.rb +7 -7
- data/app/models/{loam → open_loam}/record_lock.rb +5 -5
- data/app/models/{loam → open_loam}/scheduled_job.rb +7 -7
- data/app/models/open_loam/search_token.rb +9 -0
- data/app/models/{loam → open_loam}/sso_identity.rb +4 -4
- data/app/models/{loam → open_loam}/sso_provider.rb +8 -8
- data/app/models/open_loam/tenant.rb +20 -0
- data/app/models/{loam → open_loam}/translation.rb +5 -5
- data/app/models/{loam → open_loam}/webhook_endpoint.rb +6 -6
- data/app/views/{loam → open_loam}/attachments/_attachments.html.erb +1 -1
- data/app/views/{loam → open_loam}/comments/_comments.html.erb +1 -1
- data/app/views/{loam → open_loam}/custom_fields/_fields.html.erb +2 -2
- data/lib/generators/{loam → open_loam}/entity/entity_generator.rb +9 -9
- data/lib/generators/{loam → open_loam}/entity/templates/api_controller.rb +1 -1
- data/lib/generators/{loam → open_loam}/entity/templates/controller.rb +21 -21
- data/lib/generators/{loam → open_loam}/entity/templates/entity_test.rb +12 -12
- data/lib/generators/{loam → open_loam}/entity/templates/migration.rb +5 -5
- data/lib/generators/{loam → open_loam}/entity/templates/model.rb +10 -10
- data/lib/generators/{loam → open_loam}/entity/templates/policy.rb +1 -1
- data/lib/generators/{loam → open_loam}/entity/templates/views/_form.html.erb +4 -4
- data/lib/generators/{loam → open_loam}/entity/templates/views/deleted.html.erb +7 -7
- data/lib/generators/open_loam/entity/templates/views/edit.html.erb +3 -0
- data/lib/generators/open_loam/entity/templates/views/index.html.erb +90 -0
- data/lib/generators/open_loam/entity/templates/views/new.html.erb +3 -0
- data/lib/generators/open_loam/entity/templates/views/show.html.erb +36 -0
- data/lib/generators/{loam → open_loam}/install/install_generator.rb +47 -47
- data/lib/generators/open_loam/install/templates/AGENTS.md +341 -0
- data/lib/generators/{loam → open_loam}/install/templates/admin/api_docs_controller.rb +2 -2
- data/lib/generators/{loam → open_loam}/install/templates/admin/api_docs_index.html.erb +1 -1
- data/lib/generators/{loam → open_loam}/install/templates/admin/api_tokens_controller.rb +1 -1
- data/lib/generators/{loam → open_loam}/install/templates/admin/base_controller.rb +38 -38
- data/lib/generators/{loam → open_loam}/install/templates/admin/business_rules_controller.rb +7 -7
- data/lib/generators/{loam → open_loam}/install/templates/admin/business_rules_form.html.erb +2 -2
- data/lib/generators/{loam → open_loam}/install/templates/admin/comments_controller.rb +4 -4
- data/lib/generators/{loam → open_loam}/install/templates/admin/configs_controller.rb +9 -9
- data/lib/generators/open_loam/install/templates/admin/dashboard_controller.rb +10 -0
- data/lib/generators/{loam → open_loam}/install/templates/admin/dashboard_widgets_controller.rb +5 -5
- data/lib/generators/{loam → open_loam}/install/templates/admin/dictionaries_controller.rb +5 -5
- data/lib/generators/{loam → open_loam}/install/templates/admin/dictionaries_form.html.erb +1 -1
- data/lib/generators/{loam → open_loam}/install/templates/admin/dictionary_entries_controller.rb +2 -2
- data/lib/generators/{loam → open_loam}/install/templates/admin/event_deliveries_controller.rb +5 -5
- data/lib/generators/{loam → open_loam}/install/templates/admin/event_deliveries_index.html.erb +1 -1
- data/lib/generators/{loam → open_loam}/install/templates/admin/events_controller.rb +5 -5
- data/lib/generators/{loam → open_loam}/install/templates/admin/features_controller.rb +9 -9
- data/lib/generators/{loam → open_loam}/install/templates/admin/field_definitions_controller.rb +5 -5
- data/lib/generators/{loam → open_loam}/install/templates/admin/field_definitions_new.html.erb +2 -2
- data/lib/generators/{loam → open_loam}/install/templates/admin/history_controller.rb +7 -7
- data/lib/generators/{loam → open_loam}/install/templates/admin/history_index.html.erb +1 -1
- data/lib/generators/{loam → open_loam}/install/templates/admin/imports_controller.rb +12 -12
- data/lib/generators/{loam → open_loam}/install/templates/admin/inbound_webhook_sources_controller.rb +6 -6
- data/lib/generators/{loam → open_loam}/install/templates/admin/inbound_webhook_sources_new.html.erb +2 -2
- data/lib/generators/open_loam/install/templates/admin/layout.html.erb +76 -0
- data/lib/generators/{loam → open_loam}/install/templates/admin/mfa_controller.rb +6 -6
- data/lib/generators/{loam → open_loam}/install/templates/admin/notifications_controller.rb +3 -3
- data/lib/generators/{loam → open_loam}/install/templates/admin/overrides_controller.rb +3 -3
- data/lib/generators/{loam → open_loam}/install/templates/admin/overrides_index.html.erb +2 -2
- data/lib/generators/{loam → open_loam}/install/templates/admin/pending_actions_controller.rb +3 -3
- data/lib/generators/{loam → open_loam}/install/templates/admin/perspectives_controller.rb +7 -7
- data/lib/generators/{loam → open_loam}/install/templates/admin/perspectives_index.html.erb +1 -1
- data/lib/generators/open_loam/install/templates/admin/progress_jobs_controller.rb +19 -0
- data/lib/generators/{loam → open_loam}/install/templates/admin/progress_jobs_index.html.erb +1 -1
- data/lib/generators/{loam → open_loam}/install/templates/admin/record_locks_controller.rb +4 -4
- data/lib/generators/{loam → open_loam}/install/templates/admin/scheduled_jobs_controller.rb +7 -7
- data/lib/generators/{loam → open_loam}/install/templates/admin/scheduled_jobs_form.html.erb +1 -1
- data/lib/generators/{loam → open_loam}/install/templates/admin/scheduled_jobs_index.html.erb +1 -1
- data/lib/generators/{loam → open_loam}/install/templates/admin/search_controller.rb +5 -5
- data/lib/generators/{loam → open_loam}/install/templates/admin/sessions_controller.rb +32 -32
- data/lib/generators/{loam → open_loam}/install/templates/admin/sso_providers_controller.rb +6 -6
- data/lib/generators/{loam → open_loam}/install/templates/admin/sso_providers_form.html.erb +2 -2
- data/lib/generators/{loam → open_loam}/install/templates/admin/sudo_controller.rb +5 -5
- data/lib/generators/{loam → open_loam}/install/templates/admin/sudo_new.html.erb +1 -1
- data/lib/generators/{loam → open_loam}/install/templates/admin/translations_controller.rb +7 -7
- data/lib/generators/{loam → open_loam}/install/templates/admin/translations_index.html.erb +3 -3
- data/lib/generators/{loam → open_loam}/install/templates/admin/webhook_endpoints_controller.rb +4 -4
- data/lib/generators/{loam → open_loam}/install/templates/admin/webhook_endpoints_index.html.erb +1 -1
- data/lib/generators/{loam → open_loam}/install/templates/admin.css +1 -1
- data/lib/generators/{loam → open_loam}/install/templates/api_base_controller.rb +15 -15
- data/lib/generators/{loam → open_loam}/install/templates/guardrails_test.rb +17 -17
- data/lib/generators/{loam → open_loam}/install/templates/import_job.rb +7 -7
- data/lib/generators/{loam → open_loam}/install/templates/inbound_webhooks_controller.rb +4 -4
- data/lib/generators/{loam → open_loam}/install/templates/initializer.rb +74 -74
- data/lib/generators/open_loam/install/templates/migrations/create_open_loam_api_tokens.rb +15 -0
- data/lib/generators/open_loam/install/templates/migrations/create_open_loam_audit_records.rb +14 -0
- data/lib/generators/{loam/install/templates/migrations/create_loam_auth_attempts.rb → open_loam/install/templates/migrations/create_open_loam_auth_attempts.rb} +3 -3
- data/lib/generators/{loam/install/templates/migrations/create_loam_business_rules.rb → open_loam/install/templates/migrations/create_open_loam_business_rules.rb} +10 -10
- data/lib/generators/open_loam/install/templates/migrations/create_open_loam_comments.rb +13 -0
- data/lib/generators/{loam/install/templates/migrations/create_loam_configs.rb → open_loam/install/templates/migrations/create_open_loam_configs.rb} +7 -7
- data/lib/generators/open_loam/install/templates/migrations/create_open_loam_custom_field_values.rb +19 -0
- data/lib/generators/open_loam/install/templates/migrations/create_open_loam_dashboard_widgets.rb +12 -0
- data/lib/generators/open_loam/install/templates/migrations/create_open_loam_dictionaries.rb +11 -0
- data/lib/generators/{loam/install/templates/migrations/create_loam_dictionary_entries.rb → open_loam/install/templates/migrations/create_open_loam_dictionary_entries.rb} +6 -6
- data/lib/generators/{loam/install/templates/migrations/create_loam_event_deliveries.rb → open_loam/install/templates/migrations/create_open_loam_event_deliveries.rb} +5 -5
- data/lib/generators/{loam/install/templates/migrations/create_loam_field_definitions.rb → open_loam/install/templates/migrations/create_open_loam_field_definitions.rb} +4 -4
- data/lib/generators/{loam/install/templates/migrations/create_loam_inbound_webhooks.rb → open_loam/install/templates/migrations/create_open_loam_inbound_webhooks.rb} +9 -9
- data/lib/generators/open_loam/install/templates/migrations/create_open_loam_memberships.rb +11 -0
- data/lib/generators/{loam/install/templates/migrations/create_loam_mfa_credentials.rb → open_loam/install/templates/migrations/create_open_loam_mfa_credentials.rb} +4 -4
- data/lib/generators/open_loam/install/templates/migrations/create_open_loam_notifications.rb +15 -0
- data/lib/generators/{loam/install/templates/migrations/create_loam_pending_actions.rb → open_loam/install/templates/migrations/create_open_loam_pending_actions.rb} +9 -9
- data/lib/generators/{loam/install/templates/migrations/create_loam_perspectives.rb → open_loam/install/templates/migrations/create_open_loam_perspectives.rb} +5 -5
- data/lib/generators/{loam/install/templates/migrations/create_loam_progress_jobs.rb → open_loam/install/templates/migrations/create_open_loam_progress_jobs.rb} +5 -5
- data/lib/generators/open_loam/install/templates/migrations/create_open_loam_record_locks.rb +16 -0
- data/lib/generators/{loam/install/templates/migrations/create_loam_scheduled_jobs.rb → open_loam/install/templates/migrations/create_open_loam_scheduled_jobs.rb} +5 -5
- data/lib/generators/open_loam/install/templates/migrations/create_open_loam_search_tokens.rb +18 -0
- data/lib/generators/{loam/install/templates/migrations/create_loam_sso_providers.rb → open_loam/install/templates/migrations/create_open_loam_sso_providers.rb} +12 -12
- data/lib/generators/open_loam/install/templates/migrations/create_open_loam_tenants.rb +9 -0
- data/lib/generators/open_loam/install/templates/migrations/create_open_loam_translations.rb +15 -0
- data/lib/generators/open_loam/install/templates/migrations/create_open_loam_webhook_endpoints.rb +13 -0
- data/lib/generators/{loam → open_loam}/install/templates/migrations/create_users.rb +1 -1
- data/lib/generators/{loam → open_loam}/install/templates/user.rb +5 -5
- data/lib/generators/{loam → open_loam}/primary_key_options.rb +23 -23
- data/lib/open-loam.rb +2 -2
- data/lib/{loam → open_loam}/attachable.rb +4 -4
- data/lib/{loam → open_loam}/auditable.rb +23 -23
- data/lib/{loam → open_loam}/auth_throttle.rb +10 -10
- data/lib/{loam → open_loam}/base32.rb +1 -1
- data/lib/{loam → open_loam}/bulk.rb +7 -7
- data/lib/{loam → open_loam}/business_rules/actions.rb +7 -7
- data/lib/{loam → open_loam}/business_rules/condition.rb +5 -5
- data/lib/{loam → open_loam}/business_rules.rb +19 -19
- data/lib/{loam → open_loam}/commentable.rb +6 -6
- data/lib/{loam → open_loam}/configs.rb +19 -19
- data/lib/{loam → open_loam}/cron.rb +2 -2
- data/lib/{loam → open_loam}/csv.rb +2 -2
- data/lib/{loam → open_loam}/current.rb +5 -5
- data/lib/{loam → open_loam}/custom_field_index.rb +23 -23
- data/lib/{loam → open_loam}/custom_fields.rb +17 -17
- data/lib/{loam → open_loam}/dashboard.rb +5 -5
- data/lib/{loam → open_loam}/dictionaries.rb +12 -12
- data/lib/{loam → open_loam}/durable_events.rb +19 -19
- data/lib/{loam → open_loam}/encryptable.rb +33 -33
- data/lib/{loam → open_loam}/encryption/cipher.rb +3 -3
- data/lib/{loam → open_loam}/encryption/key_provider.rb +3 -3
- data/lib/{loam → open_loam}/encryption.rb +11 -11
- data/lib/open_loam/engine.rb +57 -0
- data/lib/{loam → open_loam}/enrichers.rb +5 -5
- data/lib/{loam → open_loam}/errors.rb +10 -10
- data/lib/{loam → open_loam}/eval.rb +2 -2
- data/lib/{loam → open_loam}/event_stream.rb +14 -14
- data/lib/{loam → open_loam}/eventful.rb +12 -12
- data/lib/{loam → open_loam}/events.rb +5 -5
- data/lib/{loam → open_loam}/export.rb +8 -8
- data/lib/{loam → open_loam}/features.rb +15 -15
- data/lib/{loam → open_loam}/generated_key.rb +6 -6
- data/lib/{loam → open_loam}/import.rb +12 -12
- data/lib/{loam → open_loam}/inbound_webhooks.rb +7 -7
- data/lib/{loam → open_loam}/lifecycle.rb +25 -25
- data/lib/{loam/locales/loam.en.yml → open_loam/locales/open_loam.en.yml} +5 -5
- data/lib/{loam → open_loam}/mcp/server.rb +9 -9
- data/lib/{loam → open_loam}/mcp.rb +21 -21
- data/lib/{loam → open_loam}/notifications.rb +5 -5
- data/lib/{loam → open_loam}/open_api.rb +16 -16
- data/lib/{loam → open_loam}/overrides.rb +10 -10
- data/lib/{loam → open_loam}/pending_actions.rb +9 -9
- data/lib/{loam → open_loam}/permissions.rb +8 -8
- data/lib/{loam → open_loam}/perspectives.rb +9 -9
- data/lib/{loam → open_loam}/policy.rb +6 -6
- data/lib/{loam → open_loam}/progress.rb +6 -6
- data/lib/{loam → open_loam}/record_locks.rb +9 -9
- data/lib/{loam → open_loam}/scheduler.rb +20 -20
- data/lib/{loam → open_loam}/search/driver.rb +3 -3
- data/lib/{loam → open_loam}/search/like_driver.rb +5 -5
- data/lib/{loam → open_loam}/search/token_driver.rb +15 -15
- data/lib/{loam → open_loam}/search.rb +5 -5
- data/lib/{loam → open_loam}/searchable.rb +22 -22
- data/lib/{loam → open_loam}/soft_deletable.rb +10 -10
- data/lib/{loam → open_loam}/sso/claims.rb +1 -1
- data/lib/{loam → open_loam}/sso/fake_provider.rb +1 -1
- data/lib/{loam → open_loam}/sso/http_client.rb +3 -3
- data/lib/{loam → open_loam}/sso/oidc_provider.rb +2 -2
- data/lib/{loam → open_loam}/sso.rb +17 -17
- data/lib/{loam → open_loam}/telemetry.rb +6 -6
- data/lib/{loam → open_loam}/tenant_record.rb +10 -10
- data/lib/{loam → open_loam}/test_helpers.rb +4 -4
- data/lib/{loam → open_loam}/totp.rb +3 -3
- data/lib/{loam → open_loam}/translatable.rb +24 -24
- data/lib/{loam → open_loam}/undo.rb +11 -11
- data/lib/open_loam/version.rb +3 -0
- data/lib/{loam → open_loam}/webhooks.rb +4 -4
- data/lib/{loam → open_loam}/widgets.rb +9 -9
- data/lib/{loam → open_loam}/workflow.rb +45 -45
- data/lib/open_loam.rb +122 -0
- data/lib/tasks/{loam.rake → open_loam.rake} +43 -43
- data/lib/tasks/{loam_eval.rake → open_loam_eval.rake} +7 -7
- data/lib/tasks/open_loam_mcp.rake +20 -0
- metadata +242 -242
- data/app/models/loam/dictionary.rb +0 -20
- data/app/models/loam/search_token.rb +0 -9
- data/app/models/loam/tenant.rb +0 -20
- data/lib/generators/loam/entity/templates/views/edit.html.erb +0 -3
- data/lib/generators/loam/entity/templates/views/index.html.erb +0 -90
- data/lib/generators/loam/entity/templates/views/new.html.erb +0 -3
- data/lib/generators/loam/entity/templates/views/show.html.erb +0 -36
- data/lib/generators/loam/install/templates/AGENTS.md +0 -341
- data/lib/generators/loam/install/templates/admin/dashboard_controller.rb +0 -10
- data/lib/generators/loam/install/templates/admin/layout.html.erb +0 -76
- data/lib/generators/loam/install/templates/admin/progress_jobs_controller.rb +0 -19
- data/lib/generators/loam/install/templates/migrations/create_loam_api_tokens.rb +0 -15
- data/lib/generators/loam/install/templates/migrations/create_loam_audit_records.rb +0 -14
- data/lib/generators/loam/install/templates/migrations/create_loam_comments.rb +0 -13
- data/lib/generators/loam/install/templates/migrations/create_loam_custom_field_values.rb +0 -19
- data/lib/generators/loam/install/templates/migrations/create_loam_dashboard_widgets.rb +0 -12
- data/lib/generators/loam/install/templates/migrations/create_loam_dictionaries.rb +0 -11
- data/lib/generators/loam/install/templates/migrations/create_loam_memberships.rb +0 -11
- data/lib/generators/loam/install/templates/migrations/create_loam_notifications.rb +0 -15
- data/lib/generators/loam/install/templates/migrations/create_loam_record_locks.rb +0 -16
- data/lib/generators/loam/install/templates/migrations/create_loam_search_tokens.rb +0 -18
- data/lib/generators/loam/install/templates/migrations/create_loam_tenants.rb +0 -9
- data/lib/generators/loam/install/templates/migrations/create_loam_translations.rb +0 -15
- data/lib/generators/loam/install/templates/migrations/create_loam_webhook_endpoints.rb +0 -13
- data/lib/loam/engine.rb +0 -57
- data/lib/loam/version.rb +0 -3
- data/lib/loam.rb +0 -122
- data/lib/tasks/loam_mcp.rake +0 -20
- /data/lib/generators/{loam → open_loam}/install/templates/admin/api_tokens_index.html.erb +0 -0
- /data/lib/generators/{loam → open_loam}/install/templates/admin/business_rules_edit.html.erb +0 -0
- /data/lib/generators/{loam → open_loam}/install/templates/admin/business_rules_index.html.erb +0 -0
- /data/lib/generators/{loam → open_loam}/install/templates/admin/business_rules_new.html.erb +0 -0
- /data/lib/generators/{loam → open_loam}/install/templates/admin/configs_edit.html.erb +0 -0
- /data/lib/generators/{loam → open_loam}/install/templates/admin/configs_index.html.erb +0 -0
- /data/lib/generators/{loam → open_loam}/install/templates/admin/dashboard_index.html.erb +0 -0
- /data/lib/generators/{loam → open_loam}/install/templates/admin/dashboard_widgets_index.html.erb +0 -0
- /data/lib/generators/{loam → open_loam}/install/templates/admin/dictionaries_edit.html.erb +0 -0
- /data/lib/generators/{loam → open_loam}/install/templates/admin/dictionaries_index.html.erb +0 -0
- /data/lib/generators/{loam → open_loam}/install/templates/admin/dictionaries_new.html.erb +0 -0
- /data/lib/generators/{loam → open_loam}/install/templates/admin/features_index.html.erb +0 -0
- /data/lib/generators/{loam → open_loam}/install/templates/admin/field_definitions_index.html.erb +0 -0
- /data/lib/generators/{loam → open_loam}/install/templates/admin/imports_new.html.erb +0 -0
- /data/lib/generators/{loam → open_loam}/install/templates/admin/imports_preview.html.erb +0 -0
- /data/lib/generators/{loam → open_loam}/install/templates/admin/imports_summary.html.erb +0 -0
- /data/lib/generators/{loam → open_loam}/install/templates/admin/inbound_webhook_sources_index.html.erb +0 -0
- /data/lib/generators/{loam → open_loam}/install/templates/admin/mfa_activated.html.erb +0 -0
- /data/lib/generators/{loam → open_loam}/install/templates/admin/mfa_new.html.erb +0 -0
- /data/lib/generators/{loam → open_loam}/install/templates/admin/mfa_show.html.erb +0 -0
- /data/lib/generators/{loam → open_loam}/install/templates/admin/notifications_index.html.erb +0 -0
- /data/lib/generators/{loam → open_loam}/install/templates/admin/pagination.rb +0 -0
- /data/lib/generators/{loam → open_loam}/install/templates/admin/pending_actions_index.html.erb +0 -0
- /data/lib/generators/{loam → open_loam}/install/templates/admin/scheduled_jobs_edit.html.erb +0 -0
- /data/lib/generators/{loam → open_loam}/install/templates/admin/scheduled_jobs_new.html.erb +0 -0
- /data/lib/generators/{loam → open_loam}/install/templates/admin/search_index.html.erb +0 -0
- /data/lib/generators/{loam → open_loam}/install/templates/admin/sessions_mfa_challenge.html.erb +0 -0
- /data/lib/generators/{loam → open_loam}/install/templates/admin/sessions_new.html.erb +0 -0
- /data/lib/generators/{loam → open_loam}/install/templates/admin/sso_providers_edit.html.erb +0 -0
- /data/lib/generators/{loam → open_loam}/install/templates/admin/sso_providers_index.html.erb +0 -0
- /data/lib/generators/{loam → open_loam}/install/templates/admin/sso_providers_new.html.erb +0 -0
- /data/lib/generators/{loam → open_loam}/install/templates/admin/webhook_endpoints_new.html.erb +0 -0
|
@@ -1,19 +0,0 @@
|
|
|
1
|
-
class CreateLoamCustomFieldValues < ActiveRecord::Migration[<%= ActiveRecord::VERSION::STRING.to_f %>]
|
|
2
|
-
def change
|
|
3
|
-
create_table :loam_custom_field_values<%= loam_id_option %> do |t|
|
|
4
|
-
t.references :tenant, null: false, foreign_key: { to_table: :loam_tenants }<%= loam_type_option %>
|
|
5
|
-
t.string :indexable_type, null: false
|
|
6
|
-
t.<%= loam_key_column_type %> :indexable_id<%= loam_key_limit_option %>, null: false
|
|
7
|
-
t.string :field_key, null: false
|
|
8
|
-
t.text :value_text # canonical string form (contains/present/eq)
|
|
9
|
-
t.decimal :value_number # integer/decimal fields (range queries)
|
|
10
|
-
t.boolean :value_boolean # boolean fields
|
|
11
|
-
t.datetime :value_datetime # date/datetime fields
|
|
12
|
-
t.timestamps
|
|
13
|
-
end
|
|
14
|
-
add_index :loam_custom_field_values, %i[indexable_type indexable_id field_key],
|
|
15
|
-
unique: true, name: "index_loam_cfv_unique"
|
|
16
|
-
add_index :loam_custom_field_values, %i[tenant_id indexable_type field_key value_text], name: "index_loam_cfv_text"
|
|
17
|
-
add_index :loam_custom_field_values, %i[tenant_id indexable_type field_key value_number], name: "index_loam_cfv_number"
|
|
18
|
-
end
|
|
19
|
-
end
|
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
class CreateLoamDashboardWidgets < ActiveRecord::Migration[<%= ActiveRecord::VERSION::STRING.to_f %>]
|
|
2
|
-
def change
|
|
3
|
-
create_table :loam_dashboard_widgets<%= loam_id_option %> do |t|
|
|
4
|
-
t.references :tenant, null: false, foreign_key: { to_table: :loam_tenants }<%= loam_type_option %>
|
|
5
|
-
t.string :widget_key, null: false # a registered Loam::Widgets key
|
|
6
|
-
t.integer :position, null: false, default: 0
|
|
7
|
-
t.boolean :active, null: false, default: true
|
|
8
|
-
t.timestamps
|
|
9
|
-
end
|
|
10
|
-
add_index :loam_dashboard_widgets, %i[tenant_id widget_key], unique: true
|
|
11
|
-
end
|
|
12
|
-
end
|
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
class CreateLoamDictionaries < ActiveRecord::Migration[<%= ActiveRecord::VERSION::STRING.to_f %>]
|
|
2
|
-
def change
|
|
3
|
-
create_table :loam_dictionaries<%= loam_id_option %> do |t|
|
|
4
|
-
t.references :tenant, null: false, foreign_key: { to_table: :loam_tenants }<%= loam_type_option %>
|
|
5
|
-
t.string :key, null: false # the code the field def / API references (e.g. "damage_severity")
|
|
6
|
-
t.string :name, null: false # human label for the list
|
|
7
|
-
t.timestamps
|
|
8
|
-
end
|
|
9
|
-
add_index :loam_dictionaries, %i[tenant_id key], unique: true
|
|
10
|
-
end
|
|
11
|
-
end
|
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
class CreateLoamMemberships < ActiveRecord::Migration[<%= ActiveRecord::VERSION::STRING.to_f %>]
|
|
2
|
-
def change
|
|
3
|
-
create_table :loam_memberships<%= loam_id_option %> do |t|
|
|
4
|
-
t.references :tenant, null: false, foreign_key: { to_table: :loam_tenants }<%= loam_type_option %>
|
|
5
|
-
t.references :user, null: false, foreign_key: true<%= loam_type_option %>
|
|
6
|
-
t.string :role, null: false
|
|
7
|
-
t.timestamps
|
|
8
|
-
end
|
|
9
|
-
add_index :loam_memberships, %i[tenant_id user_id], unique: true
|
|
10
|
-
end
|
|
11
|
-
end
|
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
class CreateLoamNotifications < ActiveRecord::Migration[<%= ActiveRecord::VERSION::STRING.to_f %>]
|
|
2
|
-
def change
|
|
3
|
-
create_table :loam_notifications<%= loam_id_option %> do |t|
|
|
4
|
-
t.references :tenant, null: false, foreign_key: { to_table: :loam_tenants }<%= loam_type_option %>
|
|
5
|
-
t.references :user, null: false, foreign_key: true<%= loam_type_option %>
|
|
6
|
-
t.string :title, null: false
|
|
7
|
-
t.text :body
|
|
8
|
-
t.datetime :read_at
|
|
9
|
-
t.string :source_type
|
|
10
|
-
t.<%= loam_key_column_type %> :source_id<%= loam_key_limit_option %>
|
|
11
|
-
t.timestamps
|
|
12
|
-
end
|
|
13
|
-
add_index :loam_notifications, %i[tenant_id user_id read_at]
|
|
14
|
-
end
|
|
15
|
-
end
|
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
class CreateLoamRecordLocks < ActiveRecord::Migration[<%= ActiveRecord::VERSION::STRING.to_f %>]
|
|
2
|
-
def change
|
|
3
|
-
create_table :loam_record_locks<%= loam_id_option %> do |t|
|
|
4
|
-
t.references :tenant, null: false, foreign_key: { to_table: :loam_tenants }<%= loam_type_option %>
|
|
5
|
-
t.string :lockable_type, null: false
|
|
6
|
-
t.<%= loam_key_column_type %> :lockable_id<%= loam_key_limit_option %>, null: false
|
|
7
|
-
t.references :locked_by, null: false, foreign_key: { to_table: :users }<%= loam_type_option %>
|
|
8
|
-
t.string :token, null: false
|
|
9
|
-
t.datetime :expires_at, null: false # TTL; an expired lock is treated as free
|
|
10
|
-
t.timestamps # updated_at is the heartbeat
|
|
11
|
-
end
|
|
12
|
-
# One advisory lock per record.
|
|
13
|
-
add_index :loam_record_locks, %i[tenant_id lockable_type lockable_id], unique: true,
|
|
14
|
-
name: "index_loam_record_locks_on_lockable"
|
|
15
|
-
end
|
|
16
|
-
end
|
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
class CreateLoamSearchTokens < ActiveRecord::Migration[<%= ActiveRecord::VERSION::STRING.to_f %>]
|
|
2
|
-
def change
|
|
3
|
-
create_table :loam_search_tokens<%= loam_id_option %> do |t|
|
|
4
|
-
t.references :tenant, null: false, foreign_key: { to_table: :loam_tenants }<%= loam_type_option %>
|
|
5
|
-
t.string :searchable_type, null: false # the entity class name (e.g. "Gadget")
|
|
6
|
-
t.<%= loam_key_column_type %> :searchable_id<%= loam_key_limit_option %>, null: false # the record it indexes
|
|
7
|
-
t.string :token, null: false # one normalized word
|
|
8
|
-
end
|
|
9
|
-
# The match subquery filters by (tenant, type, token); index maintenance
|
|
10
|
-
# deletes by (tenant, type, record). One index each — no timestamps: these
|
|
11
|
-
# are plumbing rows written with insert_all/delete_all.
|
|
12
|
-
#
|
|
13
|
-
# Shipped even though the default LikeDriver never uses it, so switching to
|
|
14
|
-
# Loam::Search::TokenDriver is a one-line initializer change, not a migration.
|
|
15
|
-
add_index :loam_search_tokens, %i[tenant_id searchable_type token]
|
|
16
|
-
add_index :loam_search_tokens, %i[tenant_id searchable_type searchable_id]
|
|
17
|
-
end
|
|
18
|
-
end
|
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
class CreateLoamTenants < ActiveRecord::Migration[<%= ActiveRecord::VERSION::STRING.to_f %>]
|
|
2
|
-
def change
|
|
3
|
-
create_table :loam_tenants<%= loam_id_option %> do |t|
|
|
4
|
-
t.string :name, null: false
|
|
5
|
-
t.string :slug, null: false, index: { unique: true }
|
|
6
|
-
t.timestamps
|
|
7
|
-
end
|
|
8
|
-
end
|
|
9
|
-
end
|
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
class CreateLoamTranslations < ActiveRecord::Migration[<%= ActiveRecord::VERSION::STRING.to_f %>]
|
|
2
|
-
def change
|
|
3
|
-
create_table :loam_translations<%= loam_id_option %> do |t|
|
|
4
|
-
t.references :tenant, null: false, foreign_key: { to_table: :loam_tenants }<%= loam_type_option %>
|
|
5
|
-
t.string :translatable_type, null: false
|
|
6
|
-
t.<%= loam_key_column_type %> :translatable_id<%= loam_key_limit_option %>, null: false
|
|
7
|
-
t.string :locale, null: false # "en", "de", "pl"
|
|
8
|
-
t.string :field, null: false # the translated attribute
|
|
9
|
-
t.text :value # the per-locale content
|
|
10
|
-
t.timestamps
|
|
11
|
-
end
|
|
12
|
-
add_index :loam_translations, %i[translatable_type translatable_id locale field],
|
|
13
|
-
unique: true, name: "index_loam_translations_unique"
|
|
14
|
-
end
|
|
15
|
-
end
|
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
class CreateLoamWebhookEndpoints < ActiveRecord::Migration[<%= ActiveRecord::VERSION::STRING.to_f %>]
|
|
2
|
-
def change
|
|
3
|
-
create_table :loam_webhook_endpoints<%= loam_id_option %> do |t|
|
|
4
|
-
t.references :tenant, null: false, foreign_key: { to_table: :loam_tenants }<%= loam_type_option %>
|
|
5
|
-
t.string :url, null: false
|
|
6
|
-
t.string :event_pattern, null: false
|
|
7
|
-
t.string :secret, null: false
|
|
8
|
-
t.boolean :active, null: false, default: true
|
|
9
|
-
t.timestamps
|
|
10
|
-
end
|
|
11
|
-
add_index :loam_webhook_endpoints, %i[tenant_id active]
|
|
12
|
-
end
|
|
13
|
-
end
|
data/lib/loam/engine.rb
DELETED
|
@@ -1,57 +0,0 @@
|
|
|
1
|
-
module Loam
|
|
2
|
-
class Engine < ::Rails::Engine
|
|
3
|
-
# Not isolated on purpose: Loam models live under the Loam:: namespace but
|
|
4
|
-
# share the host app's routes/helpers, keeping the prototype surface small.
|
|
5
|
-
|
|
6
|
-
# Webhook dispatch listens to every Loam event. Wired after initialization
|
|
7
|
-
# so the models it queries are loadable, and guarded against subscribing
|
|
8
|
-
# twice (see Loam::Webhooks.subscribe!).
|
|
9
|
-
config.after_initialize do
|
|
10
|
-
Loam::Webhooks.subscribe!
|
|
11
|
-
Loam::DurableEvents.subscribe! # persist + retry durable subscribers (L-706)
|
|
12
|
-
Loam::BusinessRules.subscribe!
|
|
13
|
-
Loam::Widgets.register_builtins! # the default dashboard widgets
|
|
14
|
-
Loam::Overrides.check! # warn about any stale disable/replace overrides
|
|
15
|
-
|
|
16
|
-
# The durability sweep runs per-tenant on a schedule (materialized into
|
|
17
|
-
# each tenant by Loam::Scheduler.sync_tenant). interval:300 = every 5 min.
|
|
18
|
-
Loam::Scheduler.register(
|
|
19
|
-
key: Loam::DurableEvents::SWEEP_KEY, name: "Event redelivery sweep",
|
|
20
|
-
job_class: "Loam::EventRedeliverySweepJob", schedule: "interval:300", scope: "tenant"
|
|
21
|
-
)
|
|
22
|
-
end
|
|
23
|
-
|
|
24
|
-
# Loam's Active Record layer — TenantRecord, Auditable, Eventful and the
|
|
25
|
-
# rest — is defined inside ActiveSupport.on_load(:active_record) in
|
|
26
|
-
# lib/loam.rb, so those constants exist only once something has referenced
|
|
27
|
-
# ActiveRecord::Base.
|
|
28
|
-
#
|
|
29
|
-
# Zeitwerk eager-loads app/models alphabetically. A host model that inherits
|
|
30
|
-
# from Loam::TenantRecord and sorts ahead of application_record.rb reaches
|
|
31
|
-
# the constant before anything has touched Base, and eager load dies with
|
|
32
|
-
# "uninitialized constant Loam::TenantRecord". Whether an app hits it
|
|
33
|
-
# depends on its model names, so it shows up on a rename rather than on the
|
|
34
|
-
# change that caused it.
|
|
35
|
-
#
|
|
36
|
-
# Referencing Base here fires the hook while load order is still the
|
|
37
|
-
# engine's to decide instead of each host app's. :eager_load! is late enough
|
|
38
|
-
# that every active_record.* initializer has applied its configuration, and
|
|
39
|
-
# it runs in every environment (in development it is a no-op that still
|
|
40
|
-
# executes), so lazily-loaded apps are settled by the same line.
|
|
41
|
-
initializer "loam.active_record_layer", before: :eager_load! do
|
|
42
|
-
ActiveRecord::Base
|
|
43
|
-
end
|
|
44
|
-
|
|
45
|
-
# Loam's own UI strings ship under lib/ (the gemspec packages lib/**/*), so
|
|
46
|
-
# register them on the app's I18n load path explicitly rather than relying on
|
|
47
|
-
# the default config/locales path (which the gem does not ship). An app
|
|
48
|
-
# overrides any key with its own config/locales/loam.<locale>.yml.
|
|
49
|
-
initializer "loam.i18n" do |app|
|
|
50
|
-
app.config.i18n.load_path += Dir[File.expand_path("locales/*.yml", __dir__)]
|
|
51
|
-
end
|
|
52
|
-
|
|
53
|
-
# lib/tasks/loam.rake (bin/rails loam:sync) is picked up by Rails::Engine's
|
|
54
|
-
# own lib/tasks loading. Loading it again from a `rake_tasks` block here
|
|
55
|
-
# would define the task twice and run its body twice.
|
|
56
|
-
end
|
|
57
|
-
end
|
data/lib/loam/version.rb
DELETED
data/lib/loam.rb
DELETED
|
@@ -1,122 +0,0 @@
|
|
|
1
|
-
require "loam/version"
|
|
2
|
-
require "loam/errors"
|
|
3
|
-
require "loam/current"
|
|
4
|
-
require "loam/events"
|
|
5
|
-
require "loam/policy"
|
|
6
|
-
require "loam/lifecycle"
|
|
7
|
-
require "loam/configs"
|
|
8
|
-
require "loam/features"
|
|
9
|
-
require "loam/auth_throttle"
|
|
10
|
-
require "loam/dictionaries"
|
|
11
|
-
require "loam/custom_field_index"
|
|
12
|
-
require "loam/undo"
|
|
13
|
-
require "loam/permissions"
|
|
14
|
-
require "loam/telemetry"
|
|
15
|
-
require "loam/eval"
|
|
16
|
-
require "loam/mcp"
|
|
17
|
-
require "loam/mcp/server"
|
|
18
|
-
require "loam/progress"
|
|
19
|
-
require "loam/cron"
|
|
20
|
-
require "loam/scheduler"
|
|
21
|
-
require "loam/csv"
|
|
22
|
-
require "loam/export"
|
|
23
|
-
require "loam/import"
|
|
24
|
-
require "loam/bulk"
|
|
25
|
-
require "loam/widgets"
|
|
26
|
-
require "loam/dashboard"
|
|
27
|
-
require "loam/overrides"
|
|
28
|
-
require "loam/open_api"
|
|
29
|
-
require "loam/encryption"
|
|
30
|
-
require "loam/base32"
|
|
31
|
-
require "loam/totp"
|
|
32
|
-
require "loam/pending_actions"
|
|
33
|
-
require "loam/perspectives"
|
|
34
|
-
require "loam/record_locks"
|
|
35
|
-
require "loam/event_stream"
|
|
36
|
-
require "loam/enrichers"
|
|
37
|
-
require "loam/search"
|
|
38
|
-
require "loam/search/driver"
|
|
39
|
-
require "loam/search/like_driver"
|
|
40
|
-
require "loam/search/token_driver"
|
|
41
|
-
require "loam/notifications"
|
|
42
|
-
require "loam/sso"
|
|
43
|
-
require "loam/business_rules"
|
|
44
|
-
require "loam/webhooks"
|
|
45
|
-
require "loam/inbound_webhooks"
|
|
46
|
-
require "loam/durable_events"
|
|
47
|
-
require "loam/engine" if defined?(Rails::Engine)
|
|
48
|
-
|
|
49
|
-
module Loam
|
|
50
|
-
# The current tenant, or a loud failure. This is THE guardrail: tenant-scoped
|
|
51
|
-
# code paths call this, so a missing tenant context can never silently widen
|
|
52
|
-
# a query to all tenants.
|
|
53
|
-
def self.tenant!
|
|
54
|
-
Current.tenant or raise MissingTenantError
|
|
55
|
-
end
|
|
56
|
-
|
|
57
|
-
def self.tenant
|
|
58
|
-
Current.tenant
|
|
59
|
-
end
|
|
60
|
-
|
|
61
|
-
def self.actor
|
|
62
|
-
Current.actor
|
|
63
|
-
end
|
|
64
|
-
|
|
65
|
-
# Feature-string permission check for the current actor's role (see
|
|
66
|
-
# Loam::Permissions) — deny-by-default, wildcard-aware. `role:` overrides the
|
|
67
|
-
# actor's role. Returns false with no actor/role.
|
|
68
|
-
def self.can?(permission, role: nil)
|
|
69
|
-
role ||= Current.actor && Loam::Membership.find_by(user_id: Current.actor.id)&.role
|
|
70
|
-
Loam::Permissions.allow?(role, permission)
|
|
71
|
-
end
|
|
72
|
-
|
|
73
|
-
# The approval-gate seam. When a caller runs under :confirm (an MCP tool acting
|
|
74
|
-
# for an AI agent), a write should be STAGED for human approval via
|
|
75
|
-
# Loam::PendingActions.stage instead of committed. Loam does not intercept
|
|
76
|
-
# Active Record globally — this is the documented hook a write path checks.
|
|
77
|
-
def self.mutation_mode
|
|
78
|
-
Current.mutation_mode || :direct
|
|
79
|
-
end
|
|
80
|
-
|
|
81
|
-
def self.require_confirmation?
|
|
82
|
-
mutation_mode == :confirm
|
|
83
|
-
end
|
|
84
|
-
|
|
85
|
-
# Run a block with writes gated for approval. The one blessed way to enter
|
|
86
|
-
# confirm-mode; restores the previous mode afterwards.
|
|
87
|
-
def self.with_confirmation
|
|
88
|
-
previous = Current.mutation_mode
|
|
89
|
-
Current.mutation_mode = :confirm
|
|
90
|
-
yield
|
|
91
|
-
ensure
|
|
92
|
-
Current.mutation_mode = previous
|
|
93
|
-
end
|
|
94
|
-
|
|
95
|
-
# Run a block inside a tenant (and optional actor) context, restoring the
|
|
96
|
-
# previous context afterwards. The one blessed way to switch tenants.
|
|
97
|
-
def self.as_tenant(tenant, actor: nil)
|
|
98
|
-
previous_tenant = Current.tenant
|
|
99
|
-
previous_actor = Current.actor
|
|
100
|
-
Current.tenant = tenant
|
|
101
|
-
Current.actor = actor if actor
|
|
102
|
-
yield
|
|
103
|
-
ensure
|
|
104
|
-
Current.tenant = previous_tenant
|
|
105
|
-
Current.actor = previous_actor
|
|
106
|
-
end
|
|
107
|
-
end
|
|
108
|
-
|
|
109
|
-
ActiveSupport.on_load(:active_record) do
|
|
110
|
-
require "loam/generated_key"
|
|
111
|
-
require "loam/tenant_record"
|
|
112
|
-
require "loam/auditable"
|
|
113
|
-
require "loam/soft_deletable"
|
|
114
|
-
require "loam/eventful"
|
|
115
|
-
require "loam/custom_fields"
|
|
116
|
-
require "loam/workflow"
|
|
117
|
-
require "loam/searchable"
|
|
118
|
-
require "loam/encryptable"
|
|
119
|
-
require "loam/translatable"
|
|
120
|
-
require "loam/commentable"
|
|
121
|
-
require "loam/attachable"
|
|
122
|
-
end
|
data/lib/tasks/loam_mcp.rake
DELETED
|
@@ -1,20 +0,0 @@
|
|
|
1
|
-
require "logger"
|
|
2
|
-
|
|
3
|
-
namespace :loam do
|
|
4
|
-
namespace :mcp do
|
|
5
|
-
# Serve the Loam MCP server over stdio. Point an MCP client (Claude Code,
|
|
6
|
-
# Cursor, Codex) at `bin/rails loam:mcp:serve` with LOAM_MCP_TOKEN set to a
|
|
7
|
-
# Loam API token — the agent then acts as that token's user, in that tenant.
|
|
8
|
-
#
|
|
9
|
-
# stdout carries JSON-RPC only; every log is sent to stderr so it can't
|
|
10
|
-
# corrupt the stream.
|
|
11
|
-
desc "Serve the Loam MCP server over stdio (auth via LOAM_MCP_TOKEN)"
|
|
12
|
-
task serve: :environment do
|
|
13
|
-
Rails.logger = Logger.new($stderr)
|
|
14
|
-
ActiveRecord::Base.logger = Rails.logger
|
|
15
|
-
$stdout.sync = true
|
|
16
|
-
|
|
17
|
-
Loam::Mcp::Server.new.run
|
|
18
|
-
end
|
|
19
|
-
end
|
|
20
|
-
end
|
|
File without changes
|
/data/lib/generators/{loam → open_loam}/install/templates/admin/business_rules_edit.html.erb
RENAMED
|
File without changes
|
/data/lib/generators/{loam → open_loam}/install/templates/admin/business_rules_index.html.erb
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
/data/lib/generators/{loam → open_loam}/install/templates/admin/dashboard_widgets_index.html.erb
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
/data/lib/generators/{loam → open_loam}/install/templates/admin/field_definitions_index.html.erb
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
/data/lib/generators/{loam → open_loam}/install/templates/admin/notifications_index.html.erb
RENAMED
|
File without changes
|
|
File without changes
|
/data/lib/generators/{loam → open_loam}/install/templates/admin/pending_actions_index.html.erb
RENAMED
|
File without changes
|
/data/lib/generators/{loam → open_loam}/install/templates/admin/scheduled_jobs_edit.html.erb
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
/data/lib/generators/{loam → open_loam}/install/templates/admin/sessions_mfa_challenge.html.erb
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
/data/lib/generators/{loam → open_loam}/install/templates/admin/sso_providers_index.html.erb
RENAMED
|
File without changes
|
|
File without changes
|
/data/lib/generators/{loam → open_loam}/install/templates/admin/webhook_endpoints_new.html.erb
RENAMED
|
File without changes
|