omnibase_infra 0.2.1__py3-none-any.whl
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.
- omnibase_infra/__init__.py +101 -0
- omnibase_infra/cli/__init__.py +1 -0
- omnibase_infra/cli/commands.py +216 -0
- omnibase_infra/clients/__init__.py +0 -0
- omnibase_infra/contracts/handlers/filesystem/handler_contract.yaml +261 -0
- omnibase_infra/contracts/handlers/mcp/handler_contract.yaml +138 -0
- omnibase_infra/decorators/__init__.py +29 -0
- omnibase_infra/decorators/allow_any.py +109 -0
- omnibase_infra/dlq/__init__.py +90 -0
- omnibase_infra/dlq/constants_dlq.py +57 -0
- omnibase_infra/dlq/models/__init__.py +26 -0
- omnibase_infra/dlq/models/enum_replay_status.py +37 -0
- omnibase_infra/dlq/models/model_dlq_replay_record.py +135 -0
- omnibase_infra/dlq/models/model_dlq_tracking_config.py +184 -0
- omnibase_infra/dlq/service_dlq_tracking.py +611 -0
- omnibase_infra/enums/__init__.py +123 -0
- omnibase_infra/enums/enum_any_type_violation.py +104 -0
- omnibase_infra/enums/enum_backend_type.py +27 -0
- omnibase_infra/enums/enum_capture_outcome.py +42 -0
- omnibase_infra/enums/enum_capture_state.py +88 -0
- omnibase_infra/enums/enum_chain_violation_type.py +119 -0
- omnibase_infra/enums/enum_circuit_state.py +51 -0
- omnibase_infra/enums/enum_confirmation_event_type.py +27 -0
- omnibase_infra/enums/enum_contract_type.py +84 -0
- omnibase_infra/enums/enum_dedupe_strategy.py +46 -0
- omnibase_infra/enums/enum_dispatch_status.py +191 -0
- omnibase_infra/enums/enum_environment.py +46 -0
- omnibase_infra/enums/enum_execution_shape_violation.py +103 -0
- omnibase_infra/enums/enum_handler_error_type.py +101 -0
- omnibase_infra/enums/enum_handler_loader_error.py +178 -0
- omnibase_infra/enums/enum_handler_source_type.py +87 -0
- omnibase_infra/enums/enum_handler_type.py +77 -0
- omnibase_infra/enums/enum_handler_type_category.py +61 -0
- omnibase_infra/enums/enum_infra_transport_type.py +73 -0
- omnibase_infra/enums/enum_introspection_reason.py +154 -0
- omnibase_infra/enums/enum_message_category.py +213 -0
- omnibase_infra/enums/enum_node_archetype.py +74 -0
- omnibase_infra/enums/enum_node_output_type.py +185 -0
- omnibase_infra/enums/enum_non_retryable_error_category.py +224 -0
- omnibase_infra/enums/enum_policy_type.py +32 -0
- omnibase_infra/enums/enum_registration_state.py +261 -0
- omnibase_infra/enums/enum_registration_status.py +33 -0
- omnibase_infra/enums/enum_registry_response_status.py +28 -0
- omnibase_infra/enums/enum_response_status.py +26 -0
- omnibase_infra/enums/enum_retry_error_category.py +98 -0
- omnibase_infra/enums/enum_security_rule_id.py +103 -0
- omnibase_infra/enums/enum_selection_strategy.py +91 -0
- omnibase_infra/enums/enum_topic_standard.py +42 -0
- omnibase_infra/enums/enum_validation_severity.py +78 -0
- omnibase_infra/errors/__init__.py +156 -0
- omnibase_infra/errors/error_architecture_violation.py +152 -0
- omnibase_infra/errors/error_chain_propagation.py +188 -0
- omnibase_infra/errors/error_compute_registry.py +92 -0
- omnibase_infra/errors/error_consul.py +132 -0
- omnibase_infra/errors/error_container_wiring.py +243 -0
- omnibase_infra/errors/error_event_bus_registry.py +102 -0
- omnibase_infra/errors/error_infra.py +608 -0
- omnibase_infra/errors/error_message_type_registry.py +101 -0
- omnibase_infra/errors/error_policy_registry.py +112 -0
- omnibase_infra/errors/error_vault.py +123 -0
- omnibase_infra/event_bus/__init__.py +72 -0
- omnibase_infra/event_bus/configs/kafka_event_bus_config.yaml +86 -0
- omnibase_infra/event_bus/event_bus_inmemory.py +743 -0
- omnibase_infra/event_bus/event_bus_kafka.py +1658 -0
- omnibase_infra/event_bus/mixin_kafka_broadcast.py +184 -0
- omnibase_infra/event_bus/mixin_kafka_dlq.py +765 -0
- omnibase_infra/event_bus/models/__init__.py +29 -0
- omnibase_infra/event_bus/models/config/__init__.py +20 -0
- omnibase_infra/event_bus/models/config/model_kafka_event_bus_config.py +725 -0
- omnibase_infra/event_bus/models/model_dlq_event.py +206 -0
- omnibase_infra/event_bus/models/model_dlq_metrics.py +304 -0
- omnibase_infra/event_bus/models/model_event_headers.py +115 -0
- omnibase_infra/event_bus/models/model_event_message.py +60 -0
- omnibase_infra/event_bus/topic_constants.py +376 -0
- omnibase_infra/handlers/__init__.py +75 -0
- omnibase_infra/handlers/filesystem/__init__.py +48 -0
- omnibase_infra/handlers/filesystem/enum_file_system_operation.py +35 -0
- omnibase_infra/handlers/filesystem/model_file_system_request.py +298 -0
- omnibase_infra/handlers/filesystem/model_file_system_result.py +166 -0
- omnibase_infra/handlers/handler_consul.py +787 -0
- omnibase_infra/handlers/handler_db.py +1039 -0
- omnibase_infra/handlers/handler_filesystem.py +1478 -0
- omnibase_infra/handlers/handler_graph.py +1154 -0
- omnibase_infra/handlers/handler_http.py +920 -0
- omnibase_infra/handlers/handler_manifest_persistence.contract.yaml +184 -0
- omnibase_infra/handlers/handler_manifest_persistence.py +1539 -0
- omnibase_infra/handlers/handler_mcp.py +748 -0
- omnibase_infra/handlers/handler_qdrant.py +1076 -0
- omnibase_infra/handlers/handler_vault.py +422 -0
- omnibase_infra/handlers/mcp/__init__.py +19 -0
- omnibase_infra/handlers/mcp/adapter_onex_to_mcp.py +446 -0
- omnibase_infra/handlers/mcp/protocols.py +178 -0
- omnibase_infra/handlers/mcp/transport_streamable_http.py +352 -0
- omnibase_infra/handlers/mixins/__init__.py +42 -0
- omnibase_infra/handlers/mixins/mixin_consul_initialization.py +349 -0
- omnibase_infra/handlers/mixins/mixin_consul_kv.py +337 -0
- omnibase_infra/handlers/mixins/mixin_consul_service.py +277 -0
- omnibase_infra/handlers/mixins/mixin_vault_initialization.py +338 -0
- omnibase_infra/handlers/mixins/mixin_vault_retry.py +412 -0
- omnibase_infra/handlers/mixins/mixin_vault_secrets.py +450 -0
- omnibase_infra/handlers/mixins/mixin_vault_token.py +365 -0
- omnibase_infra/handlers/models/__init__.py +286 -0
- omnibase_infra/handlers/models/consul/__init__.py +81 -0
- omnibase_infra/handlers/models/consul/enum_consul_operation_type.py +57 -0
- omnibase_infra/handlers/models/consul/model_consul_deregister_payload.py +51 -0
- omnibase_infra/handlers/models/consul/model_consul_handler_config.py +153 -0
- omnibase_infra/handlers/models/consul/model_consul_handler_payload.py +89 -0
- omnibase_infra/handlers/models/consul/model_consul_kv_get_found_payload.py +55 -0
- omnibase_infra/handlers/models/consul/model_consul_kv_get_not_found_payload.py +49 -0
- omnibase_infra/handlers/models/consul/model_consul_kv_get_recurse_payload.py +50 -0
- omnibase_infra/handlers/models/consul/model_consul_kv_item.py +33 -0
- omnibase_infra/handlers/models/consul/model_consul_kv_put_payload.py +41 -0
- omnibase_infra/handlers/models/consul/model_consul_register_payload.py +53 -0
- omnibase_infra/handlers/models/consul/model_consul_retry_config.py +66 -0
- omnibase_infra/handlers/models/consul/model_payload_consul.py +66 -0
- omnibase_infra/handlers/models/consul/registry_payload_consul.py +214 -0
- omnibase_infra/handlers/models/graph/__init__.py +35 -0
- omnibase_infra/handlers/models/graph/enum_graph_operation_type.py +20 -0
- omnibase_infra/handlers/models/graph/model_graph_execute_payload.py +38 -0
- omnibase_infra/handlers/models/graph/model_graph_handler_config.py +54 -0
- omnibase_infra/handlers/models/graph/model_graph_handler_payload.py +44 -0
- omnibase_infra/handlers/models/graph/model_graph_query_payload.py +40 -0
- omnibase_infra/handlers/models/graph/model_graph_record.py +22 -0
- omnibase_infra/handlers/models/http/__init__.py +50 -0
- omnibase_infra/handlers/models/http/enum_http_operation_type.py +29 -0
- omnibase_infra/handlers/models/http/model_http_body_content.py +45 -0
- omnibase_infra/handlers/models/http/model_http_get_payload.py +88 -0
- omnibase_infra/handlers/models/http/model_http_handler_payload.py +90 -0
- omnibase_infra/handlers/models/http/model_http_post_payload.py +88 -0
- omnibase_infra/handlers/models/http/model_payload_http.py +66 -0
- omnibase_infra/handlers/models/http/registry_payload_http.py +212 -0
- omnibase_infra/handlers/models/mcp/__init__.py +23 -0
- omnibase_infra/handlers/models/mcp/enum_mcp_operation_type.py +24 -0
- omnibase_infra/handlers/models/mcp/model_mcp_handler_config.py +40 -0
- omnibase_infra/handlers/models/mcp/model_mcp_tool_call.py +32 -0
- omnibase_infra/handlers/models/mcp/model_mcp_tool_result.py +45 -0
- omnibase_infra/handlers/models/model_consul_handler_response.py +96 -0
- omnibase_infra/handlers/models/model_db_describe_response.py +83 -0
- omnibase_infra/handlers/models/model_db_query_payload.py +95 -0
- omnibase_infra/handlers/models/model_db_query_response.py +60 -0
- omnibase_infra/handlers/models/model_filesystem_config.py +98 -0
- omnibase_infra/handlers/models/model_filesystem_delete_payload.py +54 -0
- omnibase_infra/handlers/models/model_filesystem_delete_result.py +77 -0
- omnibase_infra/handlers/models/model_filesystem_directory_entry.py +75 -0
- omnibase_infra/handlers/models/model_filesystem_ensure_directory_payload.py +54 -0
- omnibase_infra/handlers/models/model_filesystem_ensure_directory_result.py +60 -0
- omnibase_infra/handlers/models/model_filesystem_list_directory_payload.py +60 -0
- omnibase_infra/handlers/models/model_filesystem_list_directory_result.py +68 -0
- omnibase_infra/handlers/models/model_filesystem_read_payload.py +62 -0
- omnibase_infra/handlers/models/model_filesystem_read_result.py +61 -0
- omnibase_infra/handlers/models/model_filesystem_write_payload.py +70 -0
- omnibase_infra/handlers/models/model_filesystem_write_result.py +55 -0
- omnibase_infra/handlers/models/model_graph_handler_response.py +98 -0
- omnibase_infra/handlers/models/model_handler_response.py +103 -0
- omnibase_infra/handlers/models/model_http_handler_response.py +101 -0
- omnibase_infra/handlers/models/model_manifest_metadata.py +75 -0
- omnibase_infra/handlers/models/model_manifest_persistence_config.py +62 -0
- omnibase_infra/handlers/models/model_manifest_query_payload.py +90 -0
- omnibase_infra/handlers/models/model_manifest_query_result.py +97 -0
- omnibase_infra/handlers/models/model_manifest_retrieve_payload.py +44 -0
- omnibase_infra/handlers/models/model_manifest_retrieve_result.py +98 -0
- omnibase_infra/handlers/models/model_manifest_store_payload.py +47 -0
- omnibase_infra/handlers/models/model_manifest_store_result.py +67 -0
- omnibase_infra/handlers/models/model_operation_context.py +187 -0
- omnibase_infra/handlers/models/model_qdrant_handler_response.py +98 -0
- omnibase_infra/handlers/models/model_retry_state.py +162 -0
- omnibase_infra/handlers/models/model_vault_handler_response.py +98 -0
- omnibase_infra/handlers/models/qdrant/__init__.py +44 -0
- omnibase_infra/handlers/models/qdrant/enum_qdrant_operation_type.py +26 -0
- omnibase_infra/handlers/models/qdrant/model_qdrant_collection_payload.py +42 -0
- omnibase_infra/handlers/models/qdrant/model_qdrant_delete_payload.py +36 -0
- omnibase_infra/handlers/models/qdrant/model_qdrant_handler_config.py +42 -0
- omnibase_infra/handlers/models/qdrant/model_qdrant_handler_payload.py +54 -0
- omnibase_infra/handlers/models/qdrant/model_qdrant_search_payload.py +42 -0
- omnibase_infra/handlers/models/qdrant/model_qdrant_search_result.py +30 -0
- omnibase_infra/handlers/models/qdrant/model_qdrant_upsert_payload.py +36 -0
- omnibase_infra/handlers/models/vault/__init__.py +69 -0
- omnibase_infra/handlers/models/vault/enum_vault_operation_type.py +35 -0
- omnibase_infra/handlers/models/vault/model_payload_vault.py +66 -0
- omnibase_infra/handlers/models/vault/model_vault_delete_payload.py +57 -0
- omnibase_infra/handlers/models/vault/model_vault_handler_config.py +148 -0
- omnibase_infra/handlers/models/vault/model_vault_handler_payload.py +101 -0
- omnibase_infra/handlers/models/vault/model_vault_list_payload.py +58 -0
- omnibase_infra/handlers/models/vault/model_vault_renew_token_payload.py +67 -0
- omnibase_infra/handlers/models/vault/model_vault_retry_config.py +66 -0
- omnibase_infra/handlers/models/vault/model_vault_secret_payload.py +106 -0
- omnibase_infra/handlers/models/vault/model_vault_write_payload.py +66 -0
- omnibase_infra/handlers/models/vault/registry_payload_vault.py +213 -0
- omnibase_infra/handlers/registration_storage/__init__.py +43 -0
- omnibase_infra/handlers/registration_storage/handler_registration_storage_mock.py +392 -0
- omnibase_infra/handlers/registration_storage/handler_registration_storage_postgres.py +915 -0
- omnibase_infra/handlers/registration_storage/models/__init__.py +23 -0
- omnibase_infra/handlers/registration_storage/models/model_delete_registration_request.py +58 -0
- omnibase_infra/handlers/registration_storage/models/model_update_registration_request.py +73 -0
- omnibase_infra/handlers/registration_storage/protocol_registration_persistence.py +191 -0
- omnibase_infra/handlers/service_discovery/__init__.py +43 -0
- omnibase_infra/handlers/service_discovery/handler_service_discovery_consul.py +747 -0
- omnibase_infra/handlers/service_discovery/handler_service_discovery_mock.py +258 -0
- omnibase_infra/handlers/service_discovery/models/__init__.py +22 -0
- omnibase_infra/handlers/service_discovery/models/model_discovery_result.py +64 -0
- omnibase_infra/handlers/service_discovery/models/model_registration_result.py +138 -0
- omnibase_infra/handlers/service_discovery/models/model_service_info.py +99 -0
- omnibase_infra/handlers/service_discovery/protocol_discovery_operations.py +170 -0
- omnibase_infra/idempotency/__init__.py +94 -0
- omnibase_infra/idempotency/models/__init__.py +43 -0
- omnibase_infra/idempotency/models/model_idempotency_check_result.py +85 -0
- omnibase_infra/idempotency/models/model_idempotency_guard_config.py +130 -0
- omnibase_infra/idempotency/models/model_idempotency_record.py +86 -0
- omnibase_infra/idempotency/models/model_idempotency_store_health_check_result.py +81 -0
- omnibase_infra/idempotency/models/model_idempotency_store_metrics.py +140 -0
- omnibase_infra/idempotency/models/model_postgres_idempotency_store_config.py +299 -0
- omnibase_infra/idempotency/protocol_idempotency_store.py +184 -0
- omnibase_infra/idempotency/store_inmemory.py +265 -0
- omnibase_infra/idempotency/store_postgres.py +923 -0
- omnibase_infra/infrastructure/__init__.py +0 -0
- omnibase_infra/mixins/__init__.py +71 -0
- omnibase_infra/mixins/mixin_async_circuit_breaker.py +655 -0
- omnibase_infra/mixins/mixin_dict_like_accessors.py +146 -0
- omnibase_infra/mixins/mixin_envelope_extraction.py +119 -0
- omnibase_infra/mixins/mixin_node_introspection.py +2465 -0
- omnibase_infra/mixins/mixin_retry_execution.py +386 -0
- omnibase_infra/mixins/protocol_circuit_breaker_aware.py +133 -0
- omnibase_infra/models/__init__.py +136 -0
- omnibase_infra/models/corpus/__init__.py +17 -0
- omnibase_infra/models/corpus/model_capture_config.py +133 -0
- omnibase_infra/models/corpus/model_capture_result.py +86 -0
- omnibase_infra/models/discovery/__init__.py +42 -0
- omnibase_infra/models/discovery/model_dependency_spec.py +319 -0
- omnibase_infra/models/discovery/model_discovered_capabilities.py +50 -0
- omnibase_infra/models/discovery/model_introspection_config.py +311 -0
- omnibase_infra/models/discovery/model_introspection_performance_metrics.py +169 -0
- omnibase_infra/models/discovery/model_introspection_task_config.py +116 -0
- omnibase_infra/models/dispatch/__init__.py +147 -0
- omnibase_infra/models/dispatch/model_dispatch_context.py +439 -0
- omnibase_infra/models/dispatch/model_dispatch_error.py +336 -0
- omnibase_infra/models/dispatch/model_dispatch_log_context.py +400 -0
- omnibase_infra/models/dispatch/model_dispatch_metadata.py +228 -0
- omnibase_infra/models/dispatch/model_dispatch_metrics.py +496 -0
- omnibase_infra/models/dispatch/model_dispatch_outcome.py +317 -0
- omnibase_infra/models/dispatch/model_dispatch_outputs.py +231 -0
- omnibase_infra/models/dispatch/model_dispatch_result.py +436 -0
- omnibase_infra/models/dispatch/model_dispatch_route.py +279 -0
- omnibase_infra/models/dispatch/model_dispatcher_metrics.py +275 -0
- omnibase_infra/models/dispatch/model_dispatcher_registration.py +352 -0
- omnibase_infra/models/dispatch/model_parsed_topic.py +135 -0
- omnibase_infra/models/dispatch/model_topic_parser.py +725 -0
- omnibase_infra/models/dispatch/model_tracing_context.py +285 -0
- omnibase_infra/models/errors/__init__.py +45 -0
- omnibase_infra/models/errors/model_handler_validation_error.py +594 -0
- omnibase_infra/models/errors/model_infra_error_context.py +99 -0
- omnibase_infra/models/errors/model_message_type_registry_error_context.py +71 -0
- omnibase_infra/models/errors/model_timeout_error_context.py +110 -0
- omnibase_infra/models/handlers/__init__.py +37 -0
- omnibase_infra/models/handlers/model_contract_discovery_result.py +80 -0
- omnibase_infra/models/handlers/model_handler_descriptor.py +185 -0
- omnibase_infra/models/handlers/model_handler_identifier.py +215 -0
- omnibase_infra/models/health/__init__.py +9 -0
- omnibase_infra/models/health/model_health_check_result.py +40 -0
- omnibase_infra/models/lifecycle/__init__.py +39 -0
- omnibase_infra/models/logging/__init__.py +51 -0
- omnibase_infra/models/logging/model_log_context.py +756 -0
- omnibase_infra/models/model_retry_error_classification.py +78 -0
- omnibase_infra/models/projection/__init__.py +43 -0
- omnibase_infra/models/projection/model_capability_fields.py +112 -0
- omnibase_infra/models/projection/model_registration_projection.py +434 -0
- omnibase_infra/models/projection/model_registration_snapshot.py +322 -0
- omnibase_infra/models/projection/model_sequence_info.py +182 -0
- omnibase_infra/models/projection/model_snapshot_topic_config.py +590 -0
- omnibase_infra/models/projectors/__init__.py +41 -0
- omnibase_infra/models/projectors/model_projector_column.py +289 -0
- omnibase_infra/models/projectors/model_projector_discovery_result.py +65 -0
- omnibase_infra/models/projectors/model_projector_index.py +270 -0
- omnibase_infra/models/projectors/model_projector_schema.py +415 -0
- omnibase_infra/models/projectors/model_projector_validation_error.py +63 -0
- omnibase_infra/models/projectors/util_sql_identifiers.py +115 -0
- omnibase_infra/models/registration/__init__.py +59 -0
- omnibase_infra/models/registration/commands/__init__.py +15 -0
- omnibase_infra/models/registration/commands/model_node_registration_acked.py +108 -0
- omnibase_infra/models/registration/events/__init__.py +56 -0
- omnibase_infra/models/registration/events/model_node_became_active.py +103 -0
- omnibase_infra/models/registration/events/model_node_liveness_expired.py +103 -0
- omnibase_infra/models/registration/events/model_node_registration_accepted.py +98 -0
- omnibase_infra/models/registration/events/model_node_registration_ack_received.py +98 -0
- omnibase_infra/models/registration/events/model_node_registration_ack_timed_out.py +112 -0
- omnibase_infra/models/registration/events/model_node_registration_initiated.py +107 -0
- omnibase_infra/models/registration/events/model_node_registration_rejected.py +104 -0
- omnibase_infra/models/registration/model_introspection_metrics.py +253 -0
- omnibase_infra/models/registration/model_node_capabilities.py +179 -0
- omnibase_infra/models/registration/model_node_heartbeat_event.py +126 -0
- omnibase_infra/models/registration/model_node_introspection_event.py +175 -0
- omnibase_infra/models/registration/model_node_metadata.py +79 -0
- omnibase_infra/models/registration/model_node_registration.py +162 -0
- omnibase_infra/models/registration/model_node_registration_record.py +162 -0
- omnibase_infra/models/registry/__init__.py +29 -0
- omnibase_infra/models/registry/model_domain_constraint.py +202 -0
- omnibase_infra/models/registry/model_message_type_entry.py +271 -0
- omnibase_infra/models/resilience/__init__.py +9 -0
- omnibase_infra/models/resilience/model_circuit_breaker_config.py +227 -0
- omnibase_infra/models/routing/__init__.py +25 -0
- omnibase_infra/models/routing/model_routing_entry.py +52 -0
- omnibase_infra/models/routing/model_routing_subcontract.py +70 -0
- omnibase_infra/models/runtime/__init__.py +40 -0
- omnibase_infra/models/runtime/model_contract_security_config.py +41 -0
- omnibase_infra/models/runtime/model_discovery_error.py +81 -0
- omnibase_infra/models/runtime/model_discovery_result.py +162 -0
- omnibase_infra/models/runtime/model_discovery_warning.py +74 -0
- omnibase_infra/models/runtime/model_failed_plugin_load.py +63 -0
- omnibase_infra/models/runtime/model_handler_contract.py +280 -0
- omnibase_infra/models/runtime/model_loaded_handler.py +120 -0
- omnibase_infra/models/runtime/model_plugin_load_context.py +93 -0
- omnibase_infra/models/runtime/model_plugin_load_summary.py +124 -0
- omnibase_infra/models/security/__init__.py +50 -0
- omnibase_infra/models/security/classification_levels.py +99 -0
- omnibase_infra/models/security/model_environment_policy.py +145 -0
- omnibase_infra/models/security/model_handler_security_policy.py +107 -0
- omnibase_infra/models/security/model_security_error.py +81 -0
- omnibase_infra/models/security/model_security_validation_result.py +328 -0
- omnibase_infra/models/security/model_security_warning.py +67 -0
- omnibase_infra/models/snapshot/__init__.py +27 -0
- omnibase_infra/models/snapshot/model_field_change.py +65 -0
- omnibase_infra/models/snapshot/model_snapshot.py +270 -0
- omnibase_infra/models/snapshot/model_snapshot_diff.py +203 -0
- omnibase_infra/models/snapshot/model_subject_ref.py +81 -0
- omnibase_infra/models/types/__init__.py +71 -0
- omnibase_infra/models/validation/__init__.py +89 -0
- omnibase_infra/models/validation/model_any_type_validation_result.py +118 -0
- omnibase_infra/models/validation/model_any_type_violation.py +141 -0
- omnibase_infra/models/validation/model_category_match_result.py +345 -0
- omnibase_infra/models/validation/model_chain_violation.py +166 -0
- omnibase_infra/models/validation/model_coverage_metrics.py +316 -0
- omnibase_infra/models/validation/model_execution_shape_rule.py +159 -0
- omnibase_infra/models/validation/model_execution_shape_validation.py +208 -0
- omnibase_infra/models/validation/model_execution_shape_validation_result.py +294 -0
- omnibase_infra/models/validation/model_execution_shape_violation.py +122 -0
- omnibase_infra/models/validation/model_localhandler_validation_result.py +139 -0
- omnibase_infra/models/validation/model_localhandler_violation.py +100 -0
- omnibase_infra/models/validation/model_output_validation_params.py +74 -0
- omnibase_infra/models/validation/model_validate_and_raise_params.py +84 -0
- omnibase_infra/models/validation/model_validation_error_params.py +84 -0
- omnibase_infra/models/validation/model_validation_outcome.py +287 -0
- omnibase_infra/nodes/__init__.py +48 -0
- omnibase_infra/nodes/architecture_validator/__init__.py +79 -0
- omnibase_infra/nodes/architecture_validator/contract.yaml +252 -0
- omnibase_infra/nodes/architecture_validator/contract_architecture_validator.yaml +208 -0
- omnibase_infra/nodes/architecture_validator/mixins/__init__.py +16 -0
- omnibase_infra/nodes/architecture_validator/mixins/mixin_file_path_rule.py +92 -0
- omnibase_infra/nodes/architecture_validator/models/__init__.py +36 -0
- omnibase_infra/nodes/architecture_validator/models/model_architecture_validation_request.py +56 -0
- omnibase_infra/nodes/architecture_validator/models/model_architecture_validation_result.py +311 -0
- omnibase_infra/nodes/architecture_validator/models/model_architecture_violation.py +163 -0
- omnibase_infra/nodes/architecture_validator/models/model_rule_check_result.py +265 -0
- omnibase_infra/nodes/architecture_validator/models/model_validation_request.py +105 -0
- omnibase_infra/nodes/architecture_validator/models/model_validation_result.py +314 -0
- omnibase_infra/nodes/architecture_validator/node.py +262 -0
- omnibase_infra/nodes/architecture_validator/node_architecture_validator.py +383 -0
- omnibase_infra/nodes/architecture_validator/protocols/__init__.py +9 -0
- omnibase_infra/nodes/architecture_validator/protocols/protocol_architecture_rule.py +225 -0
- omnibase_infra/nodes/architecture_validator/registry/__init__.py +28 -0
- omnibase_infra/nodes/architecture_validator/registry/registry_infra_architecture_validator.py +99 -0
- omnibase_infra/nodes/architecture_validator/validators/__init__.py +104 -0
- omnibase_infra/nodes/architecture_validator/validators/validator_no_direct_dispatch.py +422 -0
- omnibase_infra/nodes/architecture_validator/validators/validator_no_handler_publishing.py +481 -0
- omnibase_infra/nodes/architecture_validator/validators/validator_no_orchestrator_fsm.py +491 -0
- omnibase_infra/nodes/effects/README.md +358 -0
- omnibase_infra/nodes/effects/__init__.py +26 -0
- omnibase_infra/nodes/effects/contract.yaml +172 -0
- omnibase_infra/nodes/effects/models/__init__.py +32 -0
- omnibase_infra/nodes/effects/models/model_backend_result.py +190 -0
- omnibase_infra/nodes/effects/models/model_effect_idempotency_config.py +92 -0
- omnibase_infra/nodes/effects/models/model_registry_request.py +132 -0
- omnibase_infra/nodes/effects/models/model_registry_response.py +263 -0
- omnibase_infra/nodes/effects/protocol_consul_client.py +89 -0
- omnibase_infra/nodes/effects/protocol_effect_idempotency_store.py +143 -0
- omnibase_infra/nodes/effects/protocol_postgres_adapter.py +96 -0
- omnibase_infra/nodes/effects/registry_effect.py +525 -0
- omnibase_infra/nodes/effects/store_effect_idempotency_inmemory.py +425 -0
- omnibase_infra/nodes/node_registration_orchestrator/README.md +542 -0
- omnibase_infra/nodes/node_registration_orchestrator/__init__.py +120 -0
- omnibase_infra/nodes/node_registration_orchestrator/contract.yaml +475 -0
- omnibase_infra/nodes/node_registration_orchestrator/dispatchers/__init__.py +53 -0
- omnibase_infra/nodes/node_registration_orchestrator/dispatchers/dispatcher_node_introspected.py +376 -0
- omnibase_infra/nodes/node_registration_orchestrator/dispatchers/dispatcher_node_registration_acked.py +376 -0
- omnibase_infra/nodes/node_registration_orchestrator/dispatchers/dispatcher_runtime_tick.py +373 -0
- omnibase_infra/nodes/node_registration_orchestrator/handlers/__init__.py +62 -0
- omnibase_infra/nodes/node_registration_orchestrator/handlers/handler_node_heartbeat.py +376 -0
- omnibase_infra/nodes/node_registration_orchestrator/handlers/handler_node_introspected.py +609 -0
- omnibase_infra/nodes/node_registration_orchestrator/handlers/handler_node_registration_acked.py +458 -0
- omnibase_infra/nodes/node_registration_orchestrator/handlers/handler_runtime_tick.py +364 -0
- omnibase_infra/nodes/node_registration_orchestrator/introspection_event_router.py +544 -0
- omnibase_infra/nodes/node_registration_orchestrator/models/__init__.py +75 -0
- omnibase_infra/nodes/node_registration_orchestrator/models/model_consul_intent_payload.py +194 -0
- omnibase_infra/nodes/node_registration_orchestrator/models/model_consul_registration_intent.py +67 -0
- omnibase_infra/nodes/node_registration_orchestrator/models/model_intent_execution_result.py +50 -0
- omnibase_infra/nodes/node_registration_orchestrator/models/model_node_liveness_expired.py +107 -0
- omnibase_infra/nodes/node_registration_orchestrator/models/model_orchestrator_config.py +67 -0
- omnibase_infra/nodes/node_registration_orchestrator/models/model_orchestrator_input.py +41 -0
- omnibase_infra/nodes/node_registration_orchestrator/models/model_orchestrator_output.py +166 -0
- omnibase_infra/nodes/node_registration_orchestrator/models/model_postgres_intent_payload.py +235 -0
- omnibase_infra/nodes/node_registration_orchestrator/models/model_postgres_upsert_intent.py +68 -0
- omnibase_infra/nodes/node_registration_orchestrator/models/model_reducer_execution_result.py +384 -0
- omnibase_infra/nodes/node_registration_orchestrator/models/model_reducer_state.py +60 -0
- omnibase_infra/nodes/node_registration_orchestrator/models/model_registration_intent.py +177 -0
- omnibase_infra/nodes/node_registration_orchestrator/models/model_registry_intent.py +247 -0
- omnibase_infra/nodes/node_registration_orchestrator/node.py +195 -0
- omnibase_infra/nodes/node_registration_orchestrator/plugin.py +909 -0
- omnibase_infra/nodes/node_registration_orchestrator/protocols.py +439 -0
- omnibase_infra/nodes/node_registration_orchestrator/registry/__init__.py +41 -0
- omnibase_infra/nodes/node_registration_orchestrator/registry/registry_infra_node_registration_orchestrator.py +525 -0
- omnibase_infra/nodes/node_registration_orchestrator/timeout_coordinator.py +392 -0
- omnibase_infra/nodes/node_registration_orchestrator/wiring.py +742 -0
- omnibase_infra/nodes/node_registration_reducer/__init__.py +15 -0
- omnibase_infra/nodes/node_registration_reducer/contract.yaml +301 -0
- omnibase_infra/nodes/node_registration_reducer/models/__init__.py +38 -0
- omnibase_infra/nodes/node_registration_reducer/models/model_validation_result.py +113 -0
- omnibase_infra/nodes/node_registration_reducer/node.py +139 -0
- omnibase_infra/nodes/node_registration_reducer/registry/__init__.py +9 -0
- omnibase_infra/nodes/node_registration_reducer/registry/registry_infra_node_registration_reducer.py +79 -0
- omnibase_infra/nodes/node_registration_storage_effect/__init__.py +41 -0
- omnibase_infra/nodes/node_registration_storage_effect/contract.yaml +225 -0
- omnibase_infra/nodes/node_registration_storage_effect/models/__init__.py +44 -0
- omnibase_infra/nodes/node_registration_storage_effect/models/model_delete_result.py +132 -0
- omnibase_infra/nodes/node_registration_storage_effect/models/model_registration_record.py +199 -0
- omnibase_infra/nodes/node_registration_storage_effect/models/model_registration_update.py +155 -0
- omnibase_infra/nodes/node_registration_storage_effect/models/model_storage_health_check_details.py +123 -0
- omnibase_infra/nodes/node_registration_storage_effect/models/model_storage_health_check_result.py +117 -0
- omnibase_infra/nodes/node_registration_storage_effect/models/model_storage_query.py +100 -0
- omnibase_infra/nodes/node_registration_storage_effect/models/model_storage_result.py +136 -0
- omnibase_infra/nodes/node_registration_storage_effect/models/model_upsert_result.py +127 -0
- omnibase_infra/nodes/node_registration_storage_effect/node.py +109 -0
- omnibase_infra/nodes/node_registration_storage_effect/protocols/__init__.py +22 -0
- omnibase_infra/nodes/node_registration_storage_effect/protocols/protocol_registration_persistence.py +333 -0
- omnibase_infra/nodes/node_registration_storage_effect/registry/__init__.py +23 -0
- omnibase_infra/nodes/node_registration_storage_effect/registry/registry_infra_registration_storage.py +194 -0
- omnibase_infra/nodes/node_registry_effect/__init__.py +85 -0
- omnibase_infra/nodes/node_registry_effect/contract.yaml +682 -0
- omnibase_infra/nodes/node_registry_effect/handlers/__init__.py +70 -0
- omnibase_infra/nodes/node_registry_effect/handlers/handler_consul_deregister.py +211 -0
- omnibase_infra/nodes/node_registry_effect/handlers/handler_consul_register.py +212 -0
- omnibase_infra/nodes/node_registry_effect/handlers/handler_partial_retry.py +416 -0
- omnibase_infra/nodes/node_registry_effect/handlers/handler_postgres_deactivate.py +215 -0
- omnibase_infra/nodes/node_registry_effect/handlers/handler_postgres_upsert.py +208 -0
- omnibase_infra/nodes/node_registry_effect/models/__init__.py +43 -0
- omnibase_infra/nodes/node_registry_effect/models/model_partial_retry_request.py +92 -0
- omnibase_infra/nodes/node_registry_effect/node.py +165 -0
- omnibase_infra/nodes/node_registry_effect/registry/__init__.py +27 -0
- omnibase_infra/nodes/node_registry_effect/registry/registry_infra_registry_effect.py +196 -0
- omnibase_infra/nodes/node_service_discovery_effect/__init__.py +111 -0
- omnibase_infra/nodes/node_service_discovery_effect/contract.yaml +246 -0
- omnibase_infra/nodes/node_service_discovery_effect/models/__init__.py +67 -0
- omnibase_infra/nodes/node_service_discovery_effect/models/enum_health_status.py +72 -0
- omnibase_infra/nodes/node_service_discovery_effect/models/enum_service_discovery_operation.py +58 -0
- omnibase_infra/nodes/node_service_discovery_effect/models/model_discovery_query.py +99 -0
- omnibase_infra/nodes/node_service_discovery_effect/models/model_discovery_result.py +98 -0
- omnibase_infra/nodes/node_service_discovery_effect/models/model_health_check_config.py +121 -0
- omnibase_infra/nodes/node_service_discovery_effect/models/model_query_metadata.py +63 -0
- omnibase_infra/nodes/node_service_discovery_effect/models/model_registration_result.py +130 -0
- omnibase_infra/nodes/node_service_discovery_effect/models/model_service_discovery_health_check_details.py +111 -0
- omnibase_infra/nodes/node_service_discovery_effect/models/model_service_discovery_health_check_result.py +119 -0
- omnibase_infra/nodes/node_service_discovery_effect/models/model_service_info.py +106 -0
- omnibase_infra/nodes/node_service_discovery_effect/models/model_service_registration.py +121 -0
- omnibase_infra/nodes/node_service_discovery_effect/node.py +111 -0
- omnibase_infra/nodes/node_service_discovery_effect/protocols/__init__.py +14 -0
- omnibase_infra/nodes/node_service_discovery_effect/protocols/protocol_discovery_operations.py +279 -0
- omnibase_infra/nodes/node_service_discovery_effect/registry/__init__.py +13 -0
- omnibase_infra/nodes/node_service_discovery_effect/registry/registry_infra_service_discovery.py +214 -0
- omnibase_infra/nodes/reducers/__init__.py +30 -0
- omnibase_infra/nodes/reducers/models/__init__.py +32 -0
- omnibase_infra/nodes/reducers/models/model_payload_consul_register.py +76 -0
- omnibase_infra/nodes/reducers/models/model_payload_postgres_upsert_registration.py +60 -0
- omnibase_infra/nodes/reducers/models/model_registration_confirmation.py +166 -0
- omnibase_infra/nodes/reducers/models/model_registration_state.py +433 -0
- omnibase_infra/nodes/reducers/registration_reducer.py +1137 -0
- omnibase_infra/observability/__init__.py +143 -0
- omnibase_infra/observability/constants_metrics.py +91 -0
- omnibase_infra/observability/factory_observability_sink.py +525 -0
- omnibase_infra/observability/handlers/__init__.py +118 -0
- omnibase_infra/observability/handlers/handler_logging_structured.py +967 -0
- omnibase_infra/observability/handlers/handler_metrics_prometheus.py +1120 -0
- omnibase_infra/observability/handlers/model_logging_handler_config.py +71 -0
- omnibase_infra/observability/handlers/model_logging_handler_response.py +77 -0
- omnibase_infra/observability/handlers/model_metrics_handler_config.py +172 -0
- omnibase_infra/observability/handlers/model_metrics_handler_payload.py +135 -0
- omnibase_infra/observability/handlers/model_metrics_handler_response.py +101 -0
- omnibase_infra/observability/hooks/__init__.py +74 -0
- omnibase_infra/observability/hooks/hook_observability.py +1223 -0
- omnibase_infra/observability/models/__init__.py +30 -0
- omnibase_infra/observability/models/enum_required_log_context_key.py +77 -0
- omnibase_infra/observability/models/model_buffered_log_entry.py +117 -0
- omnibase_infra/observability/models/model_logging_sink_config.py +73 -0
- omnibase_infra/observability/models/model_metrics_sink_config.py +156 -0
- omnibase_infra/observability/sinks/__init__.py +69 -0
- omnibase_infra/observability/sinks/sink_logging_structured.py +809 -0
- omnibase_infra/observability/sinks/sink_metrics_prometheus.py +710 -0
- omnibase_infra/plugins/__init__.py +27 -0
- omnibase_infra/plugins/examples/__init__.py +28 -0
- omnibase_infra/plugins/examples/plugin_json_normalizer.py +271 -0
- omnibase_infra/plugins/examples/plugin_json_normalizer_error_handling.py +210 -0
- omnibase_infra/plugins/models/__init__.py +21 -0
- omnibase_infra/plugins/models/model_plugin_context.py +76 -0
- omnibase_infra/plugins/models/model_plugin_input_data.py +58 -0
- omnibase_infra/plugins/models/model_plugin_output_data.py +62 -0
- omnibase_infra/plugins/plugin_compute_base.py +435 -0
- omnibase_infra/projectors/__init__.py +30 -0
- omnibase_infra/projectors/contracts/__init__.py +63 -0
- omnibase_infra/projectors/contracts/registration_projector.yaml +370 -0
- omnibase_infra/projectors/projection_reader_registration.py +1559 -0
- omnibase_infra/projectors/snapshot_publisher_registration.py +1329 -0
- omnibase_infra/protocols/__init__.py +99 -0
- omnibase_infra/protocols/protocol_capability_projection.py +253 -0
- omnibase_infra/protocols/protocol_capability_query.py +251 -0
- omnibase_infra/protocols/protocol_event_bus_like.py +127 -0
- omnibase_infra/protocols/protocol_event_projector.py +96 -0
- omnibase_infra/protocols/protocol_idempotency_store.py +142 -0
- omnibase_infra/protocols/protocol_message_dispatcher.py +247 -0
- omnibase_infra/protocols/protocol_message_type_registry.py +306 -0
- omnibase_infra/protocols/protocol_plugin_compute.py +368 -0
- omnibase_infra/protocols/protocol_projector_schema_validator.py +82 -0
- omnibase_infra/protocols/protocol_registry_metrics.py +215 -0
- omnibase_infra/protocols/protocol_snapshot_publisher.py +396 -0
- omnibase_infra/protocols/protocol_snapshot_store.py +567 -0
- omnibase_infra/runtime/__init__.py +296 -0
- omnibase_infra/runtime/binding_config_resolver.py +2706 -0
- omnibase_infra/runtime/chain_aware_dispatch.py +467 -0
- omnibase_infra/runtime/contract_handler_discovery.py +582 -0
- omnibase_infra/runtime/contract_loaders/__init__.py +42 -0
- omnibase_infra/runtime/contract_loaders/handler_routing_loader.py +464 -0
- omnibase_infra/runtime/dispatch_context_enforcer.py +427 -0
- omnibase_infra/runtime/enums/__init__.py +18 -0
- omnibase_infra/runtime/enums/enum_config_ref_scheme.py +33 -0
- omnibase_infra/runtime/enums/enum_scheduler_status.py +170 -0
- omnibase_infra/runtime/envelope_validator.py +179 -0
- omnibase_infra/runtime/handler_contract_source.py +669 -0
- omnibase_infra/runtime/handler_plugin_loader.py +2029 -0
- omnibase_infra/runtime/handler_registry.py +321 -0
- omnibase_infra/runtime/invocation_security_enforcer.py +427 -0
- omnibase_infra/runtime/kernel.py +40 -0
- omnibase_infra/runtime/mixin_policy_validation.py +522 -0
- omnibase_infra/runtime/mixin_semver_cache.py +378 -0
- omnibase_infra/runtime/mixins/__init__.py +17 -0
- omnibase_infra/runtime/mixins/mixin_projector_sql_operations.py +757 -0
- omnibase_infra/runtime/models/__init__.py +192 -0
- omnibase_infra/runtime/models/model_batch_lifecycle_result.py +217 -0
- omnibase_infra/runtime/models/model_binding_config.py +168 -0
- omnibase_infra/runtime/models/model_binding_config_cache_stats.py +135 -0
- omnibase_infra/runtime/models/model_binding_config_resolver_config.py +329 -0
- omnibase_infra/runtime/models/model_cached_secret.py +138 -0
- omnibase_infra/runtime/models/model_compute_key.py +138 -0
- omnibase_infra/runtime/models/model_compute_registration.py +97 -0
- omnibase_infra/runtime/models/model_config_cache_entry.py +61 -0
- omnibase_infra/runtime/models/model_config_ref.py +331 -0
- omnibase_infra/runtime/models/model_config_ref_parse_result.py +125 -0
- omnibase_infra/runtime/models/model_domain_plugin_config.py +92 -0
- omnibase_infra/runtime/models/model_domain_plugin_result.py +270 -0
- omnibase_infra/runtime/models/model_duplicate_response.py +54 -0
- omnibase_infra/runtime/models/model_enabled_protocols_config.py +61 -0
- omnibase_infra/runtime/models/model_event_bus_config.py +54 -0
- omnibase_infra/runtime/models/model_failed_component.py +55 -0
- omnibase_infra/runtime/models/model_health_check_response.py +168 -0
- omnibase_infra/runtime/models/model_health_check_result.py +228 -0
- omnibase_infra/runtime/models/model_lifecycle_result.py +245 -0
- omnibase_infra/runtime/models/model_logging_config.py +42 -0
- omnibase_infra/runtime/models/model_optional_correlation_id.py +167 -0
- omnibase_infra/runtime/models/model_optional_string.py +94 -0
- omnibase_infra/runtime/models/model_optional_uuid.py +110 -0
- omnibase_infra/runtime/models/model_policy_context.py +100 -0
- omnibase_infra/runtime/models/model_policy_key.py +138 -0
- omnibase_infra/runtime/models/model_policy_registration.py +139 -0
- omnibase_infra/runtime/models/model_policy_result.py +103 -0
- omnibase_infra/runtime/models/model_policy_type_filter.py +157 -0
- omnibase_infra/runtime/models/model_projector_plugin_loader_config.py +47 -0
- omnibase_infra/runtime/models/model_protocol_registration_config.py +65 -0
- omnibase_infra/runtime/models/model_retry_policy.py +105 -0
- omnibase_infra/runtime/models/model_runtime_config.py +150 -0
- omnibase_infra/runtime/models/model_runtime_scheduler_config.py +624 -0
- omnibase_infra/runtime/models/model_runtime_scheduler_metrics.py +233 -0
- omnibase_infra/runtime/models/model_runtime_tick.py +193 -0
- omnibase_infra/runtime/models/model_secret_cache_stats.py +82 -0
- omnibase_infra/runtime/models/model_secret_mapping.py +63 -0
- omnibase_infra/runtime/models/model_secret_resolver_config.py +107 -0
- omnibase_infra/runtime/models/model_secret_resolver_metrics.py +111 -0
- omnibase_infra/runtime/models/model_secret_source_info.py +72 -0
- omnibase_infra/runtime/models/model_secret_source_spec.py +66 -0
- omnibase_infra/runtime/models/model_shutdown_batch_result.py +75 -0
- omnibase_infra/runtime/models/model_shutdown_config.py +94 -0
- omnibase_infra/runtime/projector_plugin_loader.py +1462 -0
- omnibase_infra/runtime/projector_schema_manager.py +565 -0
- omnibase_infra/runtime/projector_shell.py +1102 -0
- omnibase_infra/runtime/protocol_contract_descriptor.py +92 -0
- omnibase_infra/runtime/protocol_contract_source.py +92 -0
- omnibase_infra/runtime/protocol_domain_plugin.py +474 -0
- omnibase_infra/runtime/protocol_handler_discovery.py +221 -0
- omnibase_infra/runtime/protocol_handler_plugin_loader.py +327 -0
- omnibase_infra/runtime/protocol_lifecycle_executor.py +435 -0
- omnibase_infra/runtime/protocol_policy.py +366 -0
- omnibase_infra/runtime/protocols/__init__.py +27 -0
- omnibase_infra/runtime/protocols/protocol_runtime_scheduler.py +468 -0
- omnibase_infra/runtime/registry/__init__.py +93 -0
- omnibase_infra/runtime/registry/mixin_message_type_query.py +326 -0
- omnibase_infra/runtime/registry/mixin_message_type_registration.py +354 -0
- omnibase_infra/runtime/registry/registry_event_bus_binding.py +268 -0
- omnibase_infra/runtime/registry/registry_message_type.py +542 -0
- omnibase_infra/runtime/registry/registry_protocol_binding.py +444 -0
- omnibase_infra/runtime/registry_compute.py +1143 -0
- omnibase_infra/runtime/registry_dispatcher.py +678 -0
- omnibase_infra/runtime/registry_policy.py +1502 -0
- omnibase_infra/runtime/runtime_scheduler.py +1070 -0
- omnibase_infra/runtime/secret_resolver.py +2110 -0
- omnibase_infra/runtime/security_metadata_validator.py +776 -0
- omnibase_infra/runtime/service_kernel.py +1573 -0
- omnibase_infra/runtime/service_message_dispatch_engine.py +1805 -0
- omnibase_infra/runtime/service_runtime_host_process.py +2260 -0
- omnibase_infra/runtime/util_container_wiring.py +1123 -0
- omnibase_infra/runtime/util_validation.py +314 -0
- omnibase_infra/runtime/util_version.py +98 -0
- omnibase_infra/runtime/util_wiring.py +566 -0
- omnibase_infra/schemas/schema_registration_projection.sql +320 -0
- omnibase_infra/services/__init__.py +68 -0
- omnibase_infra/services/corpus_capture.py +678 -0
- omnibase_infra/services/service_capability_query.py +945 -0
- omnibase_infra/services/service_health.py +897 -0
- omnibase_infra/services/service_node_selector.py +530 -0
- omnibase_infra/services/service_timeout_emitter.py +682 -0
- omnibase_infra/services/service_timeout_scanner.py +390 -0
- omnibase_infra/services/snapshot/__init__.py +31 -0
- omnibase_infra/services/snapshot/service_snapshot.py +647 -0
- omnibase_infra/services/snapshot/store_inmemory.py +637 -0
- omnibase_infra/services/snapshot/store_postgres.py +1279 -0
- omnibase_infra/shared/__init__.py +8 -0
- omnibase_infra/testing/__init__.py +10 -0
- omnibase_infra/testing/utils.py +23 -0
- omnibase_infra/types/__init__.py +48 -0
- omnibase_infra/types/type_cache_info.py +49 -0
- omnibase_infra/types/type_dsn.py +173 -0
- omnibase_infra/types/type_infra_aliases.py +60 -0
- omnibase_infra/types/typed_dict/__init__.py +21 -0
- omnibase_infra/types/typed_dict/typed_dict_introspection_cache.py +128 -0
- omnibase_infra/types/typed_dict/typed_dict_performance_metrics_cache.py +140 -0
- omnibase_infra/types/typed_dict_capabilities.py +64 -0
- omnibase_infra/utils/__init__.py +89 -0
- omnibase_infra/utils/correlation.py +208 -0
- omnibase_infra/utils/util_datetime.py +372 -0
- omnibase_infra/utils/util_dsn_validation.py +333 -0
- omnibase_infra/utils/util_env_parsing.py +264 -0
- omnibase_infra/utils/util_error_sanitization.py +457 -0
- omnibase_infra/utils/util_pydantic_validators.py +477 -0
- omnibase_infra/utils/util_semver.py +233 -0
- omnibase_infra/validation/__init__.py +307 -0
- omnibase_infra/validation/enums/__init__.py +11 -0
- omnibase_infra/validation/enums/enum_contract_violation_severity.py +13 -0
- omnibase_infra/validation/infra_validators.py +1486 -0
- omnibase_infra/validation/linter_contract.py +907 -0
- omnibase_infra/validation/mixin_any_type_classification.py +120 -0
- omnibase_infra/validation/mixin_any_type_exemption.py +580 -0
- omnibase_infra/validation/mixin_any_type_reporting.py +106 -0
- omnibase_infra/validation/mixin_execution_shape_violation_checks.py +596 -0
- omnibase_infra/validation/mixin_node_archetype_detection.py +254 -0
- omnibase_infra/validation/models/__init__.py +15 -0
- omnibase_infra/validation/models/model_contract_lint_result.py +101 -0
- omnibase_infra/validation/models/model_contract_violation.py +41 -0
- omnibase_infra/validation/service_validation_aggregator.py +395 -0
- omnibase_infra/validation/validation_exemptions.yaml +1710 -0
- omnibase_infra/validation/validator_any_type.py +715 -0
- omnibase_infra/validation/validator_chain_propagation.py +839 -0
- omnibase_infra/validation/validator_execution_shape.py +465 -0
- omnibase_infra/validation/validator_localhandler.py +261 -0
- omnibase_infra/validation/validator_registration_security.py +410 -0
- omnibase_infra/validation/validator_routing_coverage.py +1020 -0
- omnibase_infra/validation/validator_runtime_shape.py +915 -0
- omnibase_infra/validation/validator_security.py +410 -0
- omnibase_infra/validation/validator_topic_category.py +1152 -0
- omnibase_infra-0.2.1.dist-info/METADATA +197 -0
- omnibase_infra-0.2.1.dist-info/RECORD +675 -0
- omnibase_infra-0.2.1.dist-info/WHEEL +4 -0
- omnibase_infra-0.2.1.dist-info/entry_points.txt +4 -0
- omnibase_infra-0.2.1.dist-info/licenses/LICENSE +21 -0
|
@@ -0,0 +1,909 @@
|
|
|
1
|
+
# SPDX-License-Identifier: MIT
|
|
2
|
+
# Copyright (c) 2025 OmniNode Team
|
|
3
|
+
"""Registration domain plugin for kernel-level initialization.
|
|
4
|
+
|
|
5
|
+
This module provides the PluginRegistration class, which implements
|
|
6
|
+
ProtocolDomainPlugin for the Registration domain. It encapsulates all
|
|
7
|
+
Registration-specific initialization code that was previously embedded
|
|
8
|
+
in kernel.py.
|
|
9
|
+
|
|
10
|
+
The plugin handles:
|
|
11
|
+
- PostgreSQL pool creation for registration projections
|
|
12
|
+
- Projector discovery and loading from contracts
|
|
13
|
+
- Schema initialization for registration projection table
|
|
14
|
+
- Consul handler initialization (optional)
|
|
15
|
+
- Handler wiring (HandlerNodeIntrospected, HandlerRuntimeTick, etc.)
|
|
16
|
+
- Dispatcher creation and introspection event consumer startup
|
|
17
|
+
|
|
18
|
+
Design Pattern:
|
|
19
|
+
The plugin pattern enables the kernel to remain generic while allowing
|
|
20
|
+
domain-specific initialization to be encapsulated in domain modules.
|
|
21
|
+
This follows the dependency inversion principle - the kernel depends
|
|
22
|
+
on the abstract ProtocolDomainPlugin protocol, not this concrete class.
|
|
23
|
+
|
|
24
|
+
Configuration:
|
|
25
|
+
The plugin activates based on environment variables:
|
|
26
|
+
- POSTGRES_HOST: Required for plugin activation
|
|
27
|
+
- POSTGRES_PORT: Optional (default: 5432)
|
|
28
|
+
- POSTGRES_USER: Optional (default: postgres)
|
|
29
|
+
- POSTGRES_PASSWORD: Required when POSTGRES_HOST is set
|
|
30
|
+
- POSTGRES_DATABASE: Optional (default: omninode_bridge)
|
|
31
|
+
- CONSUL_HOST: Optional, enables Consul dual-registration
|
|
32
|
+
- CONSUL_PORT: Optional (default: 8500)
|
|
33
|
+
|
|
34
|
+
Example Usage:
|
|
35
|
+
```python
|
|
36
|
+
from omnibase_infra.nodes.node_registration_orchestrator.plugin import (
|
|
37
|
+
PluginRegistration,
|
|
38
|
+
)
|
|
39
|
+
from omnibase_infra.runtime.protocol_domain_plugin import (
|
|
40
|
+
ModelDomainPluginConfig,
|
|
41
|
+
RegistryDomainPlugin,
|
|
42
|
+
)
|
|
43
|
+
|
|
44
|
+
# Register plugin
|
|
45
|
+
registry = RegistryDomainPlugin()
|
|
46
|
+
registry.register(PluginRegistration())
|
|
47
|
+
|
|
48
|
+
# During kernel bootstrap
|
|
49
|
+
config = ModelDomainPluginConfig(container=container, event_bus=event_bus, ...)
|
|
50
|
+
plugin = registry.get("registration")
|
|
51
|
+
|
|
52
|
+
if plugin and plugin.should_activate(config):
|
|
53
|
+
await plugin.initialize(config)
|
|
54
|
+
await plugin.wire_handlers(config)
|
|
55
|
+
await plugin.start_consumers(config)
|
|
56
|
+
```
|
|
57
|
+
|
|
58
|
+
Related:
|
|
59
|
+
- OMN-1346: Registration Code Extraction
|
|
60
|
+
- OMN-888: Registration Orchestrator
|
|
61
|
+
- OMN-892: 2-way Registration E2E Integration Test
|
|
62
|
+
"""
|
|
63
|
+
|
|
64
|
+
from __future__ import annotations
|
|
65
|
+
|
|
66
|
+
import logging
|
|
67
|
+
import os
|
|
68
|
+
import time
|
|
69
|
+
from pathlib import Path
|
|
70
|
+
from typing import TYPE_CHECKING
|
|
71
|
+
|
|
72
|
+
if TYPE_CHECKING:
|
|
73
|
+
import asyncpg
|
|
74
|
+
|
|
75
|
+
from omnibase_infra.handlers import HandlerConsul
|
|
76
|
+
from omnibase_infra.nodes.node_registration_orchestrator.dispatchers import (
|
|
77
|
+
DispatcherNodeIntrospected,
|
|
78
|
+
)
|
|
79
|
+
from omnibase_infra.runtime.projector_shell import ProjectorShell
|
|
80
|
+
|
|
81
|
+
from omnibase_infra.enums import EnumInfraTransportType
|
|
82
|
+
from omnibase_infra.errors import ContainerWiringError
|
|
83
|
+
from omnibase_infra.models.errors.model_infra_error_context import (
|
|
84
|
+
ModelInfraErrorContext,
|
|
85
|
+
)
|
|
86
|
+
from omnibase_infra.runtime.protocol_domain_plugin import (
|
|
87
|
+
ModelDomainPluginConfig,
|
|
88
|
+
ModelDomainPluginResult,
|
|
89
|
+
ProtocolDomainPlugin,
|
|
90
|
+
)
|
|
91
|
+
from omnibase_infra.utils.util_error_sanitization import sanitize_error_message
|
|
92
|
+
|
|
93
|
+
logger = logging.getLogger(__name__)
|
|
94
|
+
|
|
95
|
+
# =============================================================================
|
|
96
|
+
# Projector Discovery Configuration
|
|
97
|
+
# =============================================================================
|
|
98
|
+
|
|
99
|
+
|
|
100
|
+
# Default path for projector contract files, calculated using importlib.resources
|
|
101
|
+
# for robustness across different deployment scenarios (standard installs, frozen
|
|
102
|
+
# executables, various packaging tools).
|
|
103
|
+
#
|
|
104
|
+
# This path can be overridden via ONEX_PROJECTOR_CONTRACTS_DIR environment variable.
|
|
105
|
+
#
|
|
106
|
+
# Package structure assumption:
|
|
107
|
+
# omnibase_infra/
|
|
108
|
+
# projectors/
|
|
109
|
+
# contracts/
|
|
110
|
+
# registration_projector.yaml
|
|
111
|
+
#
|
|
112
|
+
# The default resolves to: <package_root>/projectors/contracts
|
|
113
|
+
def _get_default_projector_contracts_dir() -> Path:
|
|
114
|
+
"""Calculate default projector contracts directory from package root.
|
|
115
|
+
|
|
116
|
+
Uses importlib.resources for robust resource path resolution across different
|
|
117
|
+
deployment scenarios (standard pip installs, frozen executables, editable
|
|
118
|
+
installs, and various packaging tools).
|
|
119
|
+
|
|
120
|
+
Note:
|
|
121
|
+
Falls back to __file__-based resolution if importlib.resources path
|
|
122
|
+
is not a concrete filesystem path (e.g., in zip imports).
|
|
123
|
+
|
|
124
|
+
Returns:
|
|
125
|
+
Path to the projectors/contracts directory within omnibase_infra package.
|
|
126
|
+
"""
|
|
127
|
+
from importlib.resources import files
|
|
128
|
+
|
|
129
|
+
# Use importlib.resources for robust path resolution
|
|
130
|
+
resource_path = files("omnibase_infra").joinpath("projectors", "contracts")
|
|
131
|
+
|
|
132
|
+
# Convert to Path - handles both Traversable and actual Path objects
|
|
133
|
+
# Note: For zip imports, this may need special handling, but standard
|
|
134
|
+
# installs and editable installs will work correctly
|
|
135
|
+
try:
|
|
136
|
+
# Try to get a concrete filesystem path
|
|
137
|
+
return Path(str(resource_path))
|
|
138
|
+
except (TypeError, ValueError):
|
|
139
|
+
# Fallback for edge cases where path conversion fails
|
|
140
|
+
import omnibase_infra
|
|
141
|
+
|
|
142
|
+
package_root = Path(omnibase_infra.__file__).parent
|
|
143
|
+
return package_root / "projectors" / "contracts"
|
|
144
|
+
|
|
145
|
+
|
|
146
|
+
PROJECTOR_CONTRACTS_DEFAULT_DIR = _get_default_projector_contracts_dir()
|
|
147
|
+
|
|
148
|
+
|
|
149
|
+
class PluginRegistration:
|
|
150
|
+
"""Registration domain plugin for kernel initialization.
|
|
151
|
+
|
|
152
|
+
This plugin encapsulates all Registration-specific initialization that was
|
|
153
|
+
previously in kernel.py. It implements ProtocolDomainPlugin to provide
|
|
154
|
+
lifecycle hooks for the kernel bootstrap sequence.
|
|
155
|
+
|
|
156
|
+
Resources Created:
|
|
157
|
+
- PostgreSQL connection pool (asyncpg.Pool)
|
|
158
|
+
- ProjectorShell for registration projections
|
|
159
|
+
- HandlerConsul for dual-registration (optional)
|
|
160
|
+
- Introspection event consumer
|
|
161
|
+
|
|
162
|
+
Thread Safety:
|
|
163
|
+
This class is NOT thread-safe. The kernel calls plugin methods
|
|
164
|
+
sequentially during bootstrap. Resource access during runtime
|
|
165
|
+
should be via container-resolved handlers.
|
|
166
|
+
|
|
167
|
+
Attributes:
|
|
168
|
+
_pool: PostgreSQL connection pool (created in initialize())
|
|
169
|
+
_projector: ProjectorShell for projections (created in initialize())
|
|
170
|
+
_consul_handler: HandlerConsul for dual-registration (optional)
|
|
171
|
+
_introspection_dispatcher: Dispatcher for introspection events
|
|
172
|
+
"""
|
|
173
|
+
|
|
174
|
+
def __init__(self) -> None:
|
|
175
|
+
"""Initialize the plugin with empty state."""
|
|
176
|
+
self._pool: asyncpg.Pool | None = None
|
|
177
|
+
self._projector: ProjectorShell | None = None
|
|
178
|
+
self._consul_handler: HandlerConsul | None = None
|
|
179
|
+
self._introspection_dispatcher: DispatcherNodeIntrospected | None = None
|
|
180
|
+
self._shutdown_in_progress: bool = False
|
|
181
|
+
|
|
182
|
+
@property
|
|
183
|
+
def plugin_id(self) -> str:
|
|
184
|
+
"""Return unique identifier for this plugin."""
|
|
185
|
+
return "registration"
|
|
186
|
+
|
|
187
|
+
@property
|
|
188
|
+
def display_name(self) -> str:
|
|
189
|
+
"""Return human-readable name for this plugin."""
|
|
190
|
+
return "Registration"
|
|
191
|
+
|
|
192
|
+
@property
|
|
193
|
+
def postgres_pool(self) -> asyncpg.Pool | None:
|
|
194
|
+
"""Return the PostgreSQL pool (for external access)."""
|
|
195
|
+
return self._pool
|
|
196
|
+
|
|
197
|
+
@property
|
|
198
|
+
def projector(self) -> ProjectorShell | None:
|
|
199
|
+
"""Return the projector (for external access)."""
|
|
200
|
+
return self._projector
|
|
201
|
+
|
|
202
|
+
@property
|
|
203
|
+
def consul_handler(self) -> HandlerConsul | None:
|
|
204
|
+
"""Return the Consul handler (for external access)."""
|
|
205
|
+
return self._consul_handler
|
|
206
|
+
|
|
207
|
+
def should_activate(self, config: ModelDomainPluginConfig) -> bool:
|
|
208
|
+
"""Check if Registration should activate based on environment.
|
|
209
|
+
|
|
210
|
+
Returns True if POSTGRES_HOST is set, indicating PostgreSQL
|
|
211
|
+
is configured for registration support.
|
|
212
|
+
|
|
213
|
+
Args:
|
|
214
|
+
config: Plugin configuration (not used for this check).
|
|
215
|
+
|
|
216
|
+
Returns:
|
|
217
|
+
True if POSTGRES_HOST environment variable is set.
|
|
218
|
+
"""
|
|
219
|
+
postgres_host = os.getenv("POSTGRES_HOST")
|
|
220
|
+
if not postgres_host:
|
|
221
|
+
logger.debug(
|
|
222
|
+
"Registration plugin inactive: POSTGRES_HOST not set "
|
|
223
|
+
"(correlation_id=%s)",
|
|
224
|
+
config.correlation_id,
|
|
225
|
+
)
|
|
226
|
+
return False
|
|
227
|
+
return True
|
|
228
|
+
|
|
229
|
+
async def initialize(
|
|
230
|
+
self,
|
|
231
|
+
config: ModelDomainPluginConfig,
|
|
232
|
+
) -> ModelDomainPluginResult:
|
|
233
|
+
"""Initialize Registration resources.
|
|
234
|
+
|
|
235
|
+
Creates:
|
|
236
|
+
- PostgreSQL connection pool
|
|
237
|
+
- ProjectorShell from contract discovery
|
|
238
|
+
- Registration projection schema
|
|
239
|
+
- HandlerConsul (if CONSUL_HOST is set)
|
|
240
|
+
|
|
241
|
+
Args:
|
|
242
|
+
config: Plugin configuration with container and correlation_id.
|
|
243
|
+
|
|
244
|
+
Returns:
|
|
245
|
+
Result with resources_created list on success.
|
|
246
|
+
"""
|
|
247
|
+
import asyncpg
|
|
248
|
+
|
|
249
|
+
start_time = time.time()
|
|
250
|
+
resources_created: list[str] = []
|
|
251
|
+
correlation_id = config.correlation_id
|
|
252
|
+
|
|
253
|
+
try:
|
|
254
|
+
# 1. Create PostgreSQL pool
|
|
255
|
+
postgres_host = os.getenv("POSTGRES_HOST")
|
|
256
|
+
postgres_dsn = (
|
|
257
|
+
f"postgresql://{os.getenv('POSTGRES_USER', 'postgres')}:"
|
|
258
|
+
f"{os.getenv('POSTGRES_PASSWORD', '')}@"
|
|
259
|
+
f"{postgres_host}:"
|
|
260
|
+
f"{os.getenv('POSTGRES_PORT', '5432')}/"
|
|
261
|
+
f"{os.getenv('POSTGRES_DATABASE', 'omninode_bridge')}"
|
|
262
|
+
)
|
|
263
|
+
|
|
264
|
+
self._pool = await asyncpg.create_pool(
|
|
265
|
+
postgres_dsn,
|
|
266
|
+
min_size=2,
|
|
267
|
+
max_size=10,
|
|
268
|
+
)
|
|
269
|
+
# Validate pool creation succeeded - asyncpg.create_pool() can return None
|
|
270
|
+
# in edge cases (e.g., connection issues during pool warmup)
|
|
271
|
+
if self._pool is None:
|
|
272
|
+
context = ModelInfraErrorContext.with_correlation(
|
|
273
|
+
correlation_id=correlation_id,
|
|
274
|
+
transport_type=EnumInfraTransportType.DATABASE,
|
|
275
|
+
operation="create_postgres_pool",
|
|
276
|
+
)
|
|
277
|
+
raise ContainerWiringError(
|
|
278
|
+
"PostgreSQL pool creation returned None - connection may have failed",
|
|
279
|
+
context=context,
|
|
280
|
+
)
|
|
281
|
+
resources_created.append("postgres_pool")
|
|
282
|
+
logger.info(
|
|
283
|
+
"PostgreSQL pool created (correlation_id=%s)",
|
|
284
|
+
correlation_id,
|
|
285
|
+
extra={
|
|
286
|
+
"host": postgres_host,
|
|
287
|
+
"port": os.getenv("POSTGRES_PORT", "5432"),
|
|
288
|
+
"database": os.getenv("POSTGRES_DATABASE", "omninode_bridge"),
|
|
289
|
+
},
|
|
290
|
+
)
|
|
291
|
+
|
|
292
|
+
# 2. Load projectors from contracts via ProjectorPluginLoader
|
|
293
|
+
await self._load_projector(config)
|
|
294
|
+
if self._projector is not None:
|
|
295
|
+
resources_created.append("projector")
|
|
296
|
+
|
|
297
|
+
# 3. Initialize schema
|
|
298
|
+
await self._initialize_schema(config)
|
|
299
|
+
resources_created.append("registration_schema")
|
|
300
|
+
|
|
301
|
+
# 4. Initialize Consul handler (optional)
|
|
302
|
+
await self._initialize_consul_handler(config)
|
|
303
|
+
if self._consul_handler is not None:
|
|
304
|
+
resources_created.append("consul_handler")
|
|
305
|
+
|
|
306
|
+
duration = time.time() - start_time
|
|
307
|
+
# Use constructor directly for results with resources_created
|
|
308
|
+
return ModelDomainPluginResult(
|
|
309
|
+
plugin_id=self.plugin_id,
|
|
310
|
+
success=True,
|
|
311
|
+
message="Registration plugin initialized",
|
|
312
|
+
resources_created=resources_created,
|
|
313
|
+
duration_seconds=duration,
|
|
314
|
+
)
|
|
315
|
+
|
|
316
|
+
except Exception as e:
|
|
317
|
+
duration = time.time() - start_time
|
|
318
|
+
logger.exception(
|
|
319
|
+
"Failed to initialize Registration plugin (correlation_id=%s)",
|
|
320
|
+
correlation_id,
|
|
321
|
+
extra={"error_type": type(e).__name__},
|
|
322
|
+
)
|
|
323
|
+
# Clean up any resources created before failure
|
|
324
|
+
await self._cleanup_on_failure(config)
|
|
325
|
+
return ModelDomainPluginResult.failed(
|
|
326
|
+
plugin_id=self.plugin_id,
|
|
327
|
+
error_message=sanitize_error_message(e),
|
|
328
|
+
duration_seconds=duration,
|
|
329
|
+
)
|
|
330
|
+
|
|
331
|
+
async def _load_projector(self, config: ModelDomainPluginConfig) -> None:
|
|
332
|
+
"""Load projector from contracts via ProjectorPluginLoader."""
|
|
333
|
+
from omnibase_infra.runtime.models.model_projector_plugin_loader_config import (
|
|
334
|
+
ModelProjectorPluginLoaderConfig,
|
|
335
|
+
)
|
|
336
|
+
from omnibase_infra.runtime.projector_plugin_loader import (
|
|
337
|
+
ProjectorPluginLoader,
|
|
338
|
+
)
|
|
339
|
+
from omnibase_infra.runtime.projector_shell import ProjectorShell
|
|
340
|
+
|
|
341
|
+
correlation_id = config.correlation_id
|
|
342
|
+
|
|
343
|
+
# Configurable projector contracts directory (supports different deployment layouts)
|
|
344
|
+
# Environment variable allows overriding the default path when package structure differs
|
|
345
|
+
# Uses PROJECTOR_CONTRACTS_DEFAULT_DIR constant which is calculated from package root
|
|
346
|
+
# for robustness against internal directory restructuring
|
|
347
|
+
projector_contracts_dir = Path(
|
|
348
|
+
os.getenv(
|
|
349
|
+
"ONEX_PROJECTOR_CONTRACTS_DIR",
|
|
350
|
+
str(PROJECTOR_CONTRACTS_DEFAULT_DIR),
|
|
351
|
+
)
|
|
352
|
+
)
|
|
353
|
+
|
|
354
|
+
if not projector_contracts_dir.exists():
|
|
355
|
+
logger.debug(
|
|
356
|
+
"Projector contracts directory not found (correlation_id=%s)",
|
|
357
|
+
correlation_id,
|
|
358
|
+
extra={"contracts_dir": str(projector_contracts_dir)},
|
|
359
|
+
)
|
|
360
|
+
return
|
|
361
|
+
|
|
362
|
+
projector_loader = ProjectorPluginLoader(
|
|
363
|
+
config=ModelProjectorPluginLoaderConfig(graceful_mode=True),
|
|
364
|
+
container=config.container,
|
|
365
|
+
pool=self._pool,
|
|
366
|
+
)
|
|
367
|
+
|
|
368
|
+
try:
|
|
369
|
+
discovered_projectors = await projector_loader.load_from_directory(
|
|
370
|
+
projector_contracts_dir
|
|
371
|
+
)
|
|
372
|
+
if discovered_projectors:
|
|
373
|
+
logger.info(
|
|
374
|
+
"Discovered %d projector(s) from contracts (correlation_id=%s)",
|
|
375
|
+
len(discovered_projectors),
|
|
376
|
+
correlation_id,
|
|
377
|
+
extra={
|
|
378
|
+
"discovered_count": len(discovered_projectors),
|
|
379
|
+
"projector_ids": [
|
|
380
|
+
getattr(p, "projector_id", "unknown")
|
|
381
|
+
for p in discovered_projectors
|
|
382
|
+
],
|
|
383
|
+
},
|
|
384
|
+
)
|
|
385
|
+
|
|
386
|
+
# Extract registration projector
|
|
387
|
+
registration_projector_id = "registration-projector"
|
|
388
|
+
for discovered in discovered_projectors:
|
|
389
|
+
if (
|
|
390
|
+
getattr(discovered, "projector_id", None)
|
|
391
|
+
== registration_projector_id
|
|
392
|
+
):
|
|
393
|
+
if isinstance(discovered, ProjectorShell):
|
|
394
|
+
self._projector = discovered
|
|
395
|
+
logger.info(
|
|
396
|
+
"Using contract-loaded ProjectorShell for registration "
|
|
397
|
+
"(correlation_id=%s)",
|
|
398
|
+
correlation_id,
|
|
399
|
+
extra={
|
|
400
|
+
"projector_id": registration_projector_id,
|
|
401
|
+
"aggregate_type": self._projector.aggregate_type,
|
|
402
|
+
},
|
|
403
|
+
)
|
|
404
|
+
break
|
|
405
|
+
|
|
406
|
+
if self._projector is None:
|
|
407
|
+
logger.warning(
|
|
408
|
+
"Registration projector not found in contracts "
|
|
409
|
+
"(correlation_id=%s)",
|
|
410
|
+
correlation_id,
|
|
411
|
+
extra={
|
|
412
|
+
"expected_projector_id": registration_projector_id,
|
|
413
|
+
"discovered_count": len(discovered_projectors),
|
|
414
|
+
},
|
|
415
|
+
)
|
|
416
|
+
else:
|
|
417
|
+
logger.warning(
|
|
418
|
+
"No projector contracts found (correlation_id=%s)",
|
|
419
|
+
correlation_id,
|
|
420
|
+
extra={"contracts_dir": str(projector_contracts_dir)},
|
|
421
|
+
)
|
|
422
|
+
|
|
423
|
+
except Exception as discovery_error:
|
|
424
|
+
# Log warning but continue - projector discovery is best-effort
|
|
425
|
+
logger.warning(
|
|
426
|
+
"Projector contract discovery failed: %s (correlation_id=%s)",
|
|
427
|
+
sanitize_error_message(discovery_error),
|
|
428
|
+
correlation_id,
|
|
429
|
+
extra={
|
|
430
|
+
"error_type": type(discovery_error).__name__,
|
|
431
|
+
"contracts_dir": str(projector_contracts_dir),
|
|
432
|
+
},
|
|
433
|
+
)
|
|
434
|
+
|
|
435
|
+
async def _initialize_schema(self, config: ModelDomainPluginConfig) -> None:
|
|
436
|
+
"""Initialize registration projection schema."""
|
|
437
|
+
correlation_id = config.correlation_id
|
|
438
|
+
|
|
439
|
+
schema_file = (
|
|
440
|
+
Path(__file__).parent.parent.parent
|
|
441
|
+
/ "schemas"
|
|
442
|
+
/ "schema_registration_projection.sql"
|
|
443
|
+
)
|
|
444
|
+
|
|
445
|
+
if not schema_file.exists():
|
|
446
|
+
logger.warning(
|
|
447
|
+
"Schema file not found: %s (correlation_id=%s)",
|
|
448
|
+
schema_file,
|
|
449
|
+
correlation_id,
|
|
450
|
+
)
|
|
451
|
+
return
|
|
452
|
+
|
|
453
|
+
if self._pool is None:
|
|
454
|
+
logger.warning(
|
|
455
|
+
"Cannot initialize schema: pool is None (correlation_id=%s)",
|
|
456
|
+
correlation_id,
|
|
457
|
+
)
|
|
458
|
+
return
|
|
459
|
+
|
|
460
|
+
try:
|
|
461
|
+
schema_sql = schema_file.read_text()
|
|
462
|
+
async with self._pool.acquire() as conn:
|
|
463
|
+
await conn.execute(schema_sql)
|
|
464
|
+
logger.info(
|
|
465
|
+
"Registration projection schema initialized (correlation_id=%s)",
|
|
466
|
+
correlation_id,
|
|
467
|
+
)
|
|
468
|
+
except Exception as schema_error:
|
|
469
|
+
# Import asyncpg exceptions at runtime to check for duplicate object errors
|
|
470
|
+
# PostgreSQL error codes: 42P07 = duplicate_table, 42710 = duplicate_object
|
|
471
|
+
import asyncpg.exceptions
|
|
472
|
+
|
|
473
|
+
# Catch both DuplicateTableError (42P07) and DuplicateObjectError (42710)
|
|
474
|
+
# These are sibling classes covering tables and other schema objects (indexes, etc.)
|
|
475
|
+
#
|
|
476
|
+
# Note: isinstance is used here for exception type checking, which is standard
|
|
477
|
+
# Python practice and an accepted exception to the "duck typing, never isinstance"
|
|
478
|
+
# rule from CLAUDE.md. Exception handling inherently requires type discrimination
|
|
479
|
+
# since exceptions don't implement protocols for error categorization.
|
|
480
|
+
duplicate_errors = (
|
|
481
|
+
asyncpg.exceptions.DuplicateTableError,
|
|
482
|
+
asyncpg.exceptions.DuplicateObjectError,
|
|
483
|
+
)
|
|
484
|
+
if isinstance(schema_error, duplicate_errors):
|
|
485
|
+
# Expected for idempotent schema initialization - log at DEBUG
|
|
486
|
+
logger.debug(
|
|
487
|
+
"Schema already initialized (idempotent, correlation_id=%s)",
|
|
488
|
+
correlation_id,
|
|
489
|
+
extra={"error_type": type(schema_error).__name__},
|
|
490
|
+
)
|
|
491
|
+
else:
|
|
492
|
+
# Unexpected error - log at WARNING
|
|
493
|
+
logger.warning(
|
|
494
|
+
"Schema initialization encountered error: %s (correlation_id=%s)",
|
|
495
|
+
sanitize_error_message(schema_error),
|
|
496
|
+
correlation_id,
|
|
497
|
+
extra={"error_type": type(schema_error).__name__},
|
|
498
|
+
)
|
|
499
|
+
|
|
500
|
+
async def _initialize_consul_handler(self, config: ModelDomainPluginConfig) -> None:
|
|
501
|
+
"""Initialize Consul handler if configured."""
|
|
502
|
+
correlation_id = config.correlation_id
|
|
503
|
+
|
|
504
|
+
consul_host = os.getenv("CONSUL_HOST")
|
|
505
|
+
if not consul_host:
|
|
506
|
+
logger.debug(
|
|
507
|
+
"CONSUL_HOST not set, Consul registration disabled (correlation_id=%s)",
|
|
508
|
+
correlation_id,
|
|
509
|
+
)
|
|
510
|
+
return
|
|
511
|
+
|
|
512
|
+
consul_port = int(os.getenv("CONSUL_PORT", "8500"))
|
|
513
|
+
|
|
514
|
+
try:
|
|
515
|
+
# Deferred import: Only load HandlerConsul when Consul is configured
|
|
516
|
+
from omnibase_infra.handlers import HandlerConsul
|
|
517
|
+
|
|
518
|
+
self._consul_handler = HandlerConsul()
|
|
519
|
+
await self._consul_handler.initialize(
|
|
520
|
+
{"host": consul_host, "port": consul_port}
|
|
521
|
+
)
|
|
522
|
+
logger.info(
|
|
523
|
+
"HandlerConsul initialized for dual registration (correlation_id=%s)",
|
|
524
|
+
correlation_id,
|
|
525
|
+
extra={"consul_host": consul_host, "consul_port": consul_port},
|
|
526
|
+
)
|
|
527
|
+
except Exception as consul_error:
|
|
528
|
+
# Log warning but continue without Consul (PostgreSQL is source of truth)
|
|
529
|
+
logger.warning(
|
|
530
|
+
"Failed to initialize HandlerConsul, proceeding without Consul: %s "
|
|
531
|
+
"(correlation_id=%s)",
|
|
532
|
+
sanitize_error_message(consul_error),
|
|
533
|
+
correlation_id,
|
|
534
|
+
extra={"error_type": type(consul_error).__name__},
|
|
535
|
+
)
|
|
536
|
+
self._consul_handler = None
|
|
537
|
+
|
|
538
|
+
async def _cleanup_on_failure(self, config: ModelDomainPluginConfig) -> None:
|
|
539
|
+
"""Clean up resources if initialization fails."""
|
|
540
|
+
correlation_id = config.correlation_id
|
|
541
|
+
|
|
542
|
+
if self._pool is not None:
|
|
543
|
+
try:
|
|
544
|
+
await self._pool.close()
|
|
545
|
+
except Exception as cleanup_error:
|
|
546
|
+
logger.warning(
|
|
547
|
+
"Cleanup failed for PostgreSQL pool close: %s (correlation_id=%s)",
|
|
548
|
+
sanitize_error_message(cleanup_error),
|
|
549
|
+
correlation_id,
|
|
550
|
+
)
|
|
551
|
+
self._pool = None
|
|
552
|
+
|
|
553
|
+
self._projector = None
|
|
554
|
+
self._consul_handler = None
|
|
555
|
+
|
|
556
|
+
async def wire_handlers(
|
|
557
|
+
self,
|
|
558
|
+
config: ModelDomainPluginConfig,
|
|
559
|
+
) -> ModelDomainPluginResult:
|
|
560
|
+
"""Register Registration handlers with the container.
|
|
561
|
+
|
|
562
|
+
Calls wire_registration_handlers from the wiring module to register:
|
|
563
|
+
- ProjectionReaderRegistration
|
|
564
|
+
- HandlerNodeIntrospected
|
|
565
|
+
- HandlerRuntimeTick
|
|
566
|
+
- HandlerNodeRegistrationAcked
|
|
567
|
+
|
|
568
|
+
Args:
|
|
569
|
+
config: Plugin configuration with container.
|
|
570
|
+
|
|
571
|
+
Returns:
|
|
572
|
+
Result with services_registered list on success.
|
|
573
|
+
"""
|
|
574
|
+
from omnibase_infra.nodes.node_registration_orchestrator.wiring import (
|
|
575
|
+
wire_registration_handlers,
|
|
576
|
+
)
|
|
577
|
+
|
|
578
|
+
start_time = time.time()
|
|
579
|
+
correlation_id = config.correlation_id
|
|
580
|
+
|
|
581
|
+
if self._pool is None:
|
|
582
|
+
return ModelDomainPluginResult.failed(
|
|
583
|
+
plugin_id=self.plugin_id,
|
|
584
|
+
error_message="Cannot wire handlers: PostgreSQL pool not initialized",
|
|
585
|
+
)
|
|
586
|
+
|
|
587
|
+
try:
|
|
588
|
+
registration_summary = await wire_registration_handlers(
|
|
589
|
+
config.container,
|
|
590
|
+
self._pool,
|
|
591
|
+
projector=self._projector,
|
|
592
|
+
consul_handler=self._consul_handler,
|
|
593
|
+
correlation_id=correlation_id,
|
|
594
|
+
)
|
|
595
|
+
duration = time.time() - start_time
|
|
596
|
+
|
|
597
|
+
logger.info(
|
|
598
|
+
"Registration handlers wired (correlation_id=%s)",
|
|
599
|
+
correlation_id,
|
|
600
|
+
extra={"services": registration_summary["services"]},
|
|
601
|
+
)
|
|
602
|
+
|
|
603
|
+
# WiringResult TypedDict provides precise typing - direct key access is safe
|
|
604
|
+
return ModelDomainPluginResult(
|
|
605
|
+
plugin_id=self.plugin_id,
|
|
606
|
+
success=True,
|
|
607
|
+
message="Registration handlers wired",
|
|
608
|
+
services_registered=registration_summary["services"],
|
|
609
|
+
duration_seconds=duration,
|
|
610
|
+
)
|
|
611
|
+
|
|
612
|
+
except Exception as e:
|
|
613
|
+
duration = time.time() - start_time
|
|
614
|
+
logger.exception(
|
|
615
|
+
"Failed to wire Registration handlers (correlation_id=%s)",
|
|
616
|
+
correlation_id,
|
|
617
|
+
)
|
|
618
|
+
return ModelDomainPluginResult.failed(
|
|
619
|
+
plugin_id=self.plugin_id,
|
|
620
|
+
error_message=sanitize_error_message(e),
|
|
621
|
+
duration_seconds=duration,
|
|
622
|
+
)
|
|
623
|
+
|
|
624
|
+
async def wire_dispatchers(
|
|
625
|
+
self,
|
|
626
|
+
config: ModelDomainPluginConfig,
|
|
627
|
+
) -> ModelDomainPluginResult:
|
|
628
|
+
"""Create introspection dispatcher (no dispatch engine wiring).
|
|
629
|
+
|
|
630
|
+
Creates the introspection dispatcher from container-resolved handlers.
|
|
631
|
+
Note: This plugin does not register with MessageDispatchEngine directly;
|
|
632
|
+
introspection events are consumed via dedicated Kafka consumer.
|
|
633
|
+
|
|
634
|
+
Args:
|
|
635
|
+
config: Plugin configuration with container.
|
|
636
|
+
|
|
637
|
+
Returns:
|
|
638
|
+
Result indicating success/failure.
|
|
639
|
+
"""
|
|
640
|
+
start_time = time.time()
|
|
641
|
+
correlation_id = config.correlation_id
|
|
642
|
+
|
|
643
|
+
# Check if service_registry is available
|
|
644
|
+
if config.container.service_registry is None:
|
|
645
|
+
logger.warning(
|
|
646
|
+
"DEGRADED_MODE: ServiceRegistry not available, skipping introspection "
|
|
647
|
+
"dispatcher creation (correlation_id=%s)",
|
|
648
|
+
correlation_id,
|
|
649
|
+
)
|
|
650
|
+
return ModelDomainPluginResult.skipped(
|
|
651
|
+
plugin_id=self.plugin_id,
|
|
652
|
+
reason="ServiceRegistry not available",
|
|
653
|
+
)
|
|
654
|
+
|
|
655
|
+
try:
|
|
656
|
+
# Deferred import: HandlerNodeIntrospected depends on registration infra
|
|
657
|
+
from omnibase_infra.nodes.node_registration_orchestrator.dispatchers import (
|
|
658
|
+
DispatcherNodeIntrospected,
|
|
659
|
+
)
|
|
660
|
+
from omnibase_infra.nodes.node_registration_orchestrator.handlers import (
|
|
661
|
+
HandlerNodeIntrospected,
|
|
662
|
+
)
|
|
663
|
+
|
|
664
|
+
logger.debug(
|
|
665
|
+
"Resolving HandlerNodeIntrospected from container (correlation_id=%s)",
|
|
666
|
+
correlation_id,
|
|
667
|
+
)
|
|
668
|
+
|
|
669
|
+
handler_introspected: HandlerNodeIntrospected = (
|
|
670
|
+
await config.container.service_registry.resolve_service(
|
|
671
|
+
HandlerNodeIntrospected
|
|
672
|
+
)
|
|
673
|
+
)
|
|
674
|
+
|
|
675
|
+
self._introspection_dispatcher = DispatcherNodeIntrospected(
|
|
676
|
+
handler_introspected
|
|
677
|
+
)
|
|
678
|
+
|
|
679
|
+
duration = time.time() - start_time
|
|
680
|
+
logger.info(
|
|
681
|
+
"Introspection dispatcher created (correlation_id=%s)",
|
|
682
|
+
correlation_id,
|
|
683
|
+
extra={
|
|
684
|
+
"dispatcher_class": self._introspection_dispatcher.__class__.__name__,
|
|
685
|
+
"handler_class": handler_introspected.__class__.__name__,
|
|
686
|
+
},
|
|
687
|
+
)
|
|
688
|
+
|
|
689
|
+
# Use constructor directly for results with resources_created
|
|
690
|
+
return ModelDomainPluginResult(
|
|
691
|
+
plugin_id=self.plugin_id,
|
|
692
|
+
success=True,
|
|
693
|
+
message="Introspection dispatcher created",
|
|
694
|
+
resources_created=["introspection_dispatcher"],
|
|
695
|
+
duration_seconds=duration,
|
|
696
|
+
)
|
|
697
|
+
|
|
698
|
+
except Exception as e:
|
|
699
|
+
duration = time.time() - start_time
|
|
700
|
+
logger.exception(
|
|
701
|
+
"Failed to create introspection dispatcher (correlation_id=%s)",
|
|
702
|
+
correlation_id,
|
|
703
|
+
)
|
|
704
|
+
return ModelDomainPluginResult.failed(
|
|
705
|
+
plugin_id=self.plugin_id,
|
|
706
|
+
error_message=sanitize_error_message(e),
|
|
707
|
+
duration_seconds=duration,
|
|
708
|
+
)
|
|
709
|
+
|
|
710
|
+
async def start_consumers(
|
|
711
|
+
self,
|
|
712
|
+
config: ModelDomainPluginConfig,
|
|
713
|
+
) -> ModelDomainPluginResult:
|
|
714
|
+
"""Start introspection event consumer.
|
|
715
|
+
|
|
716
|
+
Subscribes to the input topic to route introspection events to
|
|
717
|
+
HandlerNodeIntrospected via IntrospectionEventRouter.
|
|
718
|
+
|
|
719
|
+
Note: Only starts consumer for KafkaEventBus, not InMemoryEventBus.
|
|
720
|
+
|
|
721
|
+
Args:
|
|
722
|
+
config: Plugin configuration with event_bus.
|
|
723
|
+
|
|
724
|
+
Returns:
|
|
725
|
+
Result with unsubscribe_callbacks for cleanup.
|
|
726
|
+
"""
|
|
727
|
+
from omnibase_infra.nodes.node_registration_orchestrator.introspection_event_router import (
|
|
728
|
+
IntrospectionEventRouter,
|
|
729
|
+
)
|
|
730
|
+
|
|
731
|
+
start_time = time.time()
|
|
732
|
+
correlation_id = config.correlation_id
|
|
733
|
+
|
|
734
|
+
if self._introspection_dispatcher is None:
|
|
735
|
+
return ModelDomainPluginResult.skipped(
|
|
736
|
+
plugin_id=self.plugin_id,
|
|
737
|
+
reason="Introspection dispatcher not available",
|
|
738
|
+
)
|
|
739
|
+
|
|
740
|
+
# Duck typing: check for subscribe capability rather than concrete type
|
|
741
|
+
# Per CLAUDE.md: "Protocol Resolution - Duck typing through protocols, never isinstance"
|
|
742
|
+
if not hasattr(config.event_bus, "subscribe"):
|
|
743
|
+
return ModelDomainPluginResult.skipped(
|
|
744
|
+
plugin_id=self.plugin_id,
|
|
745
|
+
reason="Event bus does not support subscribe",
|
|
746
|
+
)
|
|
747
|
+
|
|
748
|
+
try:
|
|
749
|
+
# Create event router with container-based DI pattern
|
|
750
|
+
introspection_event_router = IntrospectionEventRouter(
|
|
751
|
+
container=config.container,
|
|
752
|
+
dispatcher=self._introspection_dispatcher,
|
|
753
|
+
event_bus=config.event_bus,
|
|
754
|
+
output_topic=config.output_topic,
|
|
755
|
+
)
|
|
756
|
+
|
|
757
|
+
# Subscribe to input topic
|
|
758
|
+
logger.info(
|
|
759
|
+
"Subscribing to introspection events on Kafka (correlation_id=%s)",
|
|
760
|
+
correlation_id,
|
|
761
|
+
extra={
|
|
762
|
+
"topic": config.input_topic,
|
|
763
|
+
"consumer_group": f"{config.consumer_group}-introspection",
|
|
764
|
+
},
|
|
765
|
+
)
|
|
766
|
+
|
|
767
|
+
introspection_unsubscribe = await config.event_bus.subscribe(
|
|
768
|
+
topic=config.input_topic,
|
|
769
|
+
group_id=f"{config.consumer_group}-introspection",
|
|
770
|
+
on_message=introspection_event_router.handle_message,
|
|
771
|
+
)
|
|
772
|
+
|
|
773
|
+
duration = time.time() - start_time
|
|
774
|
+
logger.info(
|
|
775
|
+
"Introspection event consumer started (correlation_id=%s)",
|
|
776
|
+
correlation_id,
|
|
777
|
+
extra={
|
|
778
|
+
"subscribe_duration_seconds": duration,
|
|
779
|
+
},
|
|
780
|
+
)
|
|
781
|
+
|
|
782
|
+
# Use constructor directly since we need unsubscribe_callbacks
|
|
783
|
+
return ModelDomainPluginResult(
|
|
784
|
+
plugin_id=self.plugin_id,
|
|
785
|
+
success=True,
|
|
786
|
+
message="Introspection event consumer started",
|
|
787
|
+
duration_seconds=duration,
|
|
788
|
+
unsubscribe_callbacks=[introspection_unsubscribe],
|
|
789
|
+
)
|
|
790
|
+
|
|
791
|
+
except Exception as e:
|
|
792
|
+
duration = time.time() - start_time
|
|
793
|
+
logger.exception(
|
|
794
|
+
"Failed to start introspection consumer (correlation_id=%s)",
|
|
795
|
+
correlation_id,
|
|
796
|
+
)
|
|
797
|
+
return ModelDomainPluginResult.failed(
|
|
798
|
+
plugin_id=self.plugin_id,
|
|
799
|
+
error_message=sanitize_error_message(e),
|
|
800
|
+
duration_seconds=duration,
|
|
801
|
+
)
|
|
802
|
+
|
|
803
|
+
async def shutdown(
|
|
804
|
+
self,
|
|
805
|
+
config: ModelDomainPluginConfig,
|
|
806
|
+
) -> ModelDomainPluginResult:
|
|
807
|
+
"""Clean up Registration resources.
|
|
808
|
+
|
|
809
|
+
Closes the PostgreSQL pool. Other resources (handlers, dispatchers)
|
|
810
|
+
are managed by the container.
|
|
811
|
+
|
|
812
|
+
Thread Safety:
|
|
813
|
+
Guards against concurrent shutdown calls via _shutdown_in_progress flag.
|
|
814
|
+
While the kernel's LIFO shutdown prevents double-shutdown at the
|
|
815
|
+
orchestration level, this guard protects against direct concurrent
|
|
816
|
+
calls to the plugin's shutdown method.
|
|
817
|
+
|
|
818
|
+
Args:
|
|
819
|
+
config: Plugin configuration.
|
|
820
|
+
|
|
821
|
+
Returns:
|
|
822
|
+
Result indicating cleanup success/failure.
|
|
823
|
+
"""
|
|
824
|
+
# Guard against concurrent shutdown calls
|
|
825
|
+
if self._shutdown_in_progress:
|
|
826
|
+
return ModelDomainPluginResult.skipped(
|
|
827
|
+
plugin_id=self.plugin_id,
|
|
828
|
+
reason="Shutdown already in progress",
|
|
829
|
+
)
|
|
830
|
+
self._shutdown_in_progress = True
|
|
831
|
+
|
|
832
|
+
try:
|
|
833
|
+
return await self._do_shutdown(config)
|
|
834
|
+
finally:
|
|
835
|
+
self._shutdown_in_progress = False
|
|
836
|
+
|
|
837
|
+
async def _do_shutdown(
|
|
838
|
+
self,
|
|
839
|
+
config: ModelDomainPluginConfig,
|
|
840
|
+
) -> ModelDomainPluginResult:
|
|
841
|
+
"""Internal shutdown implementation.
|
|
842
|
+
|
|
843
|
+
Args:
|
|
844
|
+
config: Plugin configuration.
|
|
845
|
+
|
|
846
|
+
Returns:
|
|
847
|
+
Result indicating cleanup success/failure.
|
|
848
|
+
"""
|
|
849
|
+
start_time = time.time()
|
|
850
|
+
correlation_id = config.correlation_id
|
|
851
|
+
errors: list[str] = []
|
|
852
|
+
|
|
853
|
+
if self._pool is not None:
|
|
854
|
+
try:
|
|
855
|
+
await self._pool.close()
|
|
856
|
+
logger.debug(
|
|
857
|
+
"PostgreSQL pool closed (correlation_id=%s)",
|
|
858
|
+
correlation_id,
|
|
859
|
+
)
|
|
860
|
+
except Exception as pool_close_error:
|
|
861
|
+
error_msg = sanitize_error_message(pool_close_error)
|
|
862
|
+
errors.append(f"pool_close: {error_msg}")
|
|
863
|
+
logger.warning(
|
|
864
|
+
"Failed to close PostgreSQL pool: %s (correlation_id=%s)",
|
|
865
|
+
error_msg,
|
|
866
|
+
correlation_id,
|
|
867
|
+
)
|
|
868
|
+
self._pool = None
|
|
869
|
+
|
|
870
|
+
self._projector = None
|
|
871
|
+
self._consul_handler = None
|
|
872
|
+
self._introspection_dispatcher = None
|
|
873
|
+
|
|
874
|
+
duration = time.time() - start_time
|
|
875
|
+
|
|
876
|
+
if errors:
|
|
877
|
+
return ModelDomainPluginResult.failed(
|
|
878
|
+
plugin_id=self.plugin_id,
|
|
879
|
+
error_message="; ".join(errors),
|
|
880
|
+
duration_seconds=duration,
|
|
881
|
+
)
|
|
882
|
+
|
|
883
|
+
return ModelDomainPluginResult.succeeded(
|
|
884
|
+
plugin_id=self.plugin_id,
|
|
885
|
+
message="Registration resources cleaned up",
|
|
886
|
+
duration_seconds=duration,
|
|
887
|
+
)
|
|
888
|
+
|
|
889
|
+
def get_status_line(self) -> str:
|
|
890
|
+
"""Get status line for kernel banner.
|
|
891
|
+
|
|
892
|
+
Returns:
|
|
893
|
+
Status string indicating enabled state and backends.
|
|
894
|
+
"""
|
|
895
|
+
if self._pool is None:
|
|
896
|
+
return "disabled"
|
|
897
|
+
|
|
898
|
+
if self._consul_handler is not None:
|
|
899
|
+
return "enabled (PostgreSQL + Consul)"
|
|
900
|
+
return "enabled (PostgreSQL only)"
|
|
901
|
+
|
|
902
|
+
|
|
903
|
+
# Verify protocol compliance at module load time
|
|
904
|
+
_: ProtocolDomainPlugin = PluginRegistration()
|
|
905
|
+
|
|
906
|
+
__all__: list[str] = [
|
|
907
|
+
"PROJECTOR_CONTRACTS_DEFAULT_DIR",
|
|
908
|
+
"PluginRegistration",
|
|
909
|
+
]
|