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,544 @@
|
|
|
1
|
+
# SPDX-License-Identifier: MIT
|
|
2
|
+
# Copyright (c) 2025 OmniNode Team
|
|
3
|
+
"""Introspection event router for kernel event processing.
|
|
4
|
+
|
|
5
|
+
This module provides an extracted event router for routing introspection
|
|
6
|
+
events in the ONEX kernel. Extracted from kernel.py for better testability
|
|
7
|
+
and separation of concerns.
|
|
8
|
+
|
|
9
|
+
The router:
|
|
10
|
+
- Parses incoming event messages as ModelEventEnvelope
|
|
11
|
+
- Validates payload as ModelNodeIntrospectionEvent
|
|
12
|
+
- Routes to the introspection dispatcher
|
|
13
|
+
- Publishes output events to the configured output topic
|
|
14
|
+
|
|
15
|
+
Design:
|
|
16
|
+
This class encapsulates the message routing logic that was previously
|
|
17
|
+
a nested callback in kernel.py. By extracting it, we enable:
|
|
18
|
+
- Unit testing without full kernel bootstrap
|
|
19
|
+
- Mocking of dependencies for isolation
|
|
20
|
+
- Clearer separation between bootstrap and event routing
|
|
21
|
+
|
|
22
|
+
The router uses ProtocolEventBusLike for event publishing, enabling
|
|
23
|
+
duck typing with any event bus implementation (Kafka, InMemory, etc.).
|
|
24
|
+
|
|
25
|
+
Related:
|
|
26
|
+
- OMN-888: Registration Orchestrator
|
|
27
|
+
- OMN-892: 2-way Registration E2E Integration Test
|
|
28
|
+
"""
|
|
29
|
+
|
|
30
|
+
from __future__ import annotations
|
|
31
|
+
|
|
32
|
+
__all__ = ["IntrospectionEventRouter"]
|
|
33
|
+
|
|
34
|
+
import json
|
|
35
|
+
import logging
|
|
36
|
+
import time
|
|
37
|
+
from datetime import UTC, datetime
|
|
38
|
+
from typing import TYPE_CHECKING
|
|
39
|
+
from uuid import UUID, uuid4
|
|
40
|
+
|
|
41
|
+
from pydantic import ValidationError
|
|
42
|
+
|
|
43
|
+
from omnibase_core.container import ModelONEXContainer
|
|
44
|
+
from omnibase_core.models.events.model_event_envelope import ModelEventEnvelope
|
|
45
|
+
from omnibase_infra.event_bus.models.model_event_message import ModelEventMessage
|
|
46
|
+
from omnibase_infra.models.registration.model_node_introspection_event import (
|
|
47
|
+
ModelNodeIntrospectionEvent,
|
|
48
|
+
)
|
|
49
|
+
from omnibase_infra.utils import sanitize_error_message
|
|
50
|
+
|
|
51
|
+
if TYPE_CHECKING:
|
|
52
|
+
from omnibase_infra.nodes.node_registration_orchestrator.dispatchers import (
|
|
53
|
+
DispatcherNodeIntrospected,
|
|
54
|
+
)
|
|
55
|
+
from omnibase_infra.protocols import ProtocolEventBusLike
|
|
56
|
+
|
|
57
|
+
logger = logging.getLogger(__name__)
|
|
58
|
+
|
|
59
|
+
|
|
60
|
+
def _normalize_metadata(metadata: dict[str, object] | None) -> dict[str, object] | None:
|
|
61
|
+
"""Normalize metadata values, handling bytes to str conversion.
|
|
62
|
+
|
|
63
|
+
Kafka headers and metadata may arrive as bytes. This function defensively
|
|
64
|
+
converts bytes values to strings using UTF-8 decoding to ensure consistent
|
|
65
|
+
string-based metadata handling downstream.
|
|
66
|
+
|
|
67
|
+
Uses duck-typing (hasattr check for decode method) instead of isinstance
|
|
68
|
+
to align with protocol-based design principles.
|
|
69
|
+
|
|
70
|
+
Args:
|
|
71
|
+
metadata: Optional metadata dictionary with potentially mixed value types.
|
|
72
|
+
|
|
73
|
+
Returns:
|
|
74
|
+
Normalized metadata dict with bytes converted to str, or None if input is None.
|
|
75
|
+
"""
|
|
76
|
+
if metadata is None:
|
|
77
|
+
return None
|
|
78
|
+
|
|
79
|
+
normalized: dict[str, object] = {}
|
|
80
|
+
for key, value in metadata.items():
|
|
81
|
+
# Duck-type: check for decode method (bytes-like) instead of isinstance
|
|
82
|
+
if hasattr(value, "decode"):
|
|
83
|
+
try:
|
|
84
|
+
normalized[key] = value.decode("utf-8")
|
|
85
|
+
except (UnicodeDecodeError, AttributeError):
|
|
86
|
+
# If decoding fails, use repr as fallback
|
|
87
|
+
normalized[key] = repr(value)
|
|
88
|
+
else:
|
|
89
|
+
normalized[key] = value
|
|
90
|
+
return normalized
|
|
91
|
+
|
|
92
|
+
|
|
93
|
+
class IntrospectionEventRouter:
|
|
94
|
+
"""Router for introspection event messages from event bus.
|
|
95
|
+
|
|
96
|
+
This router handles incoming event messages, parses them as
|
|
97
|
+
ModelNodeIntrospectionEvent payloads wrapped in ModelEventEnvelope,
|
|
98
|
+
and routes them to the introspection dispatcher for registration
|
|
99
|
+
orchestration.
|
|
100
|
+
|
|
101
|
+
The router propagates correlation IDs from incoming messages for
|
|
102
|
+
distributed tracing. If no correlation ID is present, it generates
|
|
103
|
+
a new one to ensure all operations can be traced.
|
|
104
|
+
|
|
105
|
+
This class follows the container-based dependency injection pattern,
|
|
106
|
+
receiving a ModelONEXContainer for service resolution while also
|
|
107
|
+
accepting explicit dependencies for router-specific configuration.
|
|
108
|
+
|
|
109
|
+
Attributes:
|
|
110
|
+
_container: ONEX service container for dependency resolution.
|
|
111
|
+
_dispatcher: The DispatcherNodeIntrospected to route events to.
|
|
112
|
+
_event_bus: Event bus implementing ProtocolEventBusLike for publishing.
|
|
113
|
+
_output_topic: The topic to publish output events to.
|
|
114
|
+
|
|
115
|
+
Example:
|
|
116
|
+
>>> from omnibase_core.container import ModelONEXContainer
|
|
117
|
+
>>> container = ModelONEXContainer()
|
|
118
|
+
>>> router = IntrospectionEventRouter(
|
|
119
|
+
... container=container,
|
|
120
|
+
... dispatcher=introspection_dispatcher,
|
|
121
|
+
... event_bus=event_bus,
|
|
122
|
+
... output_topic="registration.output",
|
|
123
|
+
... )
|
|
124
|
+
>>> # Use as callback for event bus subscription
|
|
125
|
+
>>> await event_bus.subscribe(
|
|
126
|
+
... topic="registration.input",
|
|
127
|
+
... group_id="my-group",
|
|
128
|
+
... on_message=router.handle_message,
|
|
129
|
+
... )
|
|
130
|
+
|
|
131
|
+
See Also:
|
|
132
|
+
- docs/patterns/container_dependency_injection.md for detailed DI patterns.
|
|
133
|
+
"""
|
|
134
|
+
|
|
135
|
+
def __init__(
|
|
136
|
+
self,
|
|
137
|
+
container: ModelONEXContainer,
|
|
138
|
+
dispatcher: DispatcherNodeIntrospected,
|
|
139
|
+
event_bus: ProtocolEventBusLike,
|
|
140
|
+
output_topic: str,
|
|
141
|
+
) -> None:
|
|
142
|
+
"""Initialize IntrospectionEventRouter with container-based dependency injection.
|
|
143
|
+
|
|
144
|
+
Follows the ONEX container-based DI pattern where the container is passed
|
|
145
|
+
as the first parameter for service resolution, with additional explicit
|
|
146
|
+
parameters for router-specific configuration.
|
|
147
|
+
|
|
148
|
+
Args:
|
|
149
|
+
container: ONEX service container for dependency resolution. Provides
|
|
150
|
+
access to service_registry for resolving shared services.
|
|
151
|
+
dispatcher: The DispatcherNodeIntrospected to route events to.
|
|
152
|
+
event_bus: Event bus implementing ProtocolEventBusLike for publishing.
|
|
153
|
+
output_topic: The topic to publish output events to.
|
|
154
|
+
|
|
155
|
+
Raises:
|
|
156
|
+
ValueError: If output_topic is empty.
|
|
157
|
+
|
|
158
|
+
Example:
|
|
159
|
+
>>> from omnibase_core.container import ModelONEXContainer
|
|
160
|
+
>>> container = ModelONEXContainer()
|
|
161
|
+
>>> router = IntrospectionEventRouter(
|
|
162
|
+
... container=container,
|
|
163
|
+
... dispatcher=introspection_dispatcher,
|
|
164
|
+
... event_bus=event_bus,
|
|
165
|
+
... output_topic="registration.output",
|
|
166
|
+
... )
|
|
167
|
+
|
|
168
|
+
See Also:
|
|
169
|
+
- docs/patterns/container_dependency_injection.md for DI patterns.
|
|
170
|
+
"""
|
|
171
|
+
if not output_topic:
|
|
172
|
+
raise ValueError("output_topic cannot be empty")
|
|
173
|
+
|
|
174
|
+
self._container = container
|
|
175
|
+
self._dispatcher = dispatcher
|
|
176
|
+
self._event_bus = event_bus
|
|
177
|
+
self._output_topic = output_topic
|
|
178
|
+
|
|
179
|
+
logger.debug(
|
|
180
|
+
"IntrospectionEventRouter initialized",
|
|
181
|
+
extra={
|
|
182
|
+
"output_topic": output_topic,
|
|
183
|
+
"dispatcher_type": type(self._dispatcher).__name__,
|
|
184
|
+
"event_bus_type": type(self._event_bus).__name__,
|
|
185
|
+
},
|
|
186
|
+
)
|
|
187
|
+
|
|
188
|
+
@property
|
|
189
|
+
def container(self) -> ModelONEXContainer:
|
|
190
|
+
"""Return the ONEX service container.
|
|
191
|
+
|
|
192
|
+
The ModelONEXContainer provides protocol-based service resolution:
|
|
193
|
+
|
|
194
|
+
- get_service_async(protocol_type, service_name=None, correlation_id=None):
|
|
195
|
+
Async service resolution with caching and logging.
|
|
196
|
+
- get_service_sync(protocol_type, service_name=None):
|
|
197
|
+
Sync service resolution with optional performance monitoring.
|
|
198
|
+
- get_service(protocol_type, service_name=None):
|
|
199
|
+
Compatibility alias for get_service_sync().
|
|
200
|
+
- get_service_optional(protocol_type, service_name=None):
|
|
201
|
+
Returns None if service not found (non-throwing).
|
|
202
|
+
- service_registry property:
|
|
203
|
+
Direct access to ServiceRegistry for service registration.
|
|
204
|
+
|
|
205
|
+
Returns:
|
|
206
|
+
The ModelONEXContainer instance passed during initialization.
|
|
207
|
+
|
|
208
|
+
Example:
|
|
209
|
+
>>> # Resolve a service from the container by protocol (async)
|
|
210
|
+
>>> from omnibase_infra.runtime.protocol_policy import ProtocolPolicy
|
|
211
|
+
>>> policy = await router.container.get_service_async(ProtocolPolicy)
|
|
212
|
+
"""
|
|
213
|
+
return self._container
|
|
214
|
+
|
|
215
|
+
@property
|
|
216
|
+
def output_topic(self) -> str:
|
|
217
|
+
"""Return the configured output topic for event publishing."""
|
|
218
|
+
return self._output_topic
|
|
219
|
+
|
|
220
|
+
@property
|
|
221
|
+
def dispatcher(self) -> DispatcherNodeIntrospected:
|
|
222
|
+
"""Return the dispatcher instance."""
|
|
223
|
+
return self._dispatcher
|
|
224
|
+
|
|
225
|
+
@property
|
|
226
|
+
def event_bus(self) -> ProtocolEventBusLike:
|
|
227
|
+
"""Return the event bus instance."""
|
|
228
|
+
return self._event_bus
|
|
229
|
+
|
|
230
|
+
def _extract_correlation_id_from_message(self, msg: ModelEventMessage) -> UUID:
|
|
231
|
+
"""Extract correlation ID from message headers or generate new one.
|
|
232
|
+
|
|
233
|
+
Attempts to extract the correlation_id from message headers to ensure
|
|
234
|
+
proper propagation for distributed tracing. Falls back to generating
|
|
235
|
+
a new UUID if no correlation ID is found.
|
|
236
|
+
|
|
237
|
+
Uses duck-typing patterns for type detection instead of isinstance checks
|
|
238
|
+
to align with protocol-based design principles.
|
|
239
|
+
|
|
240
|
+
Args:
|
|
241
|
+
msg: The incoming event message.
|
|
242
|
+
|
|
243
|
+
Returns:
|
|
244
|
+
UUID: The extracted or generated correlation ID.
|
|
245
|
+
"""
|
|
246
|
+
# Try to extract from message headers if available
|
|
247
|
+
# ModelEventHeaders is a Pydantic model with typed attributes, not a dict/list
|
|
248
|
+
if hasattr(msg, "headers") and msg.headers is not None:
|
|
249
|
+
headers = msg.headers
|
|
250
|
+
if (
|
|
251
|
+
hasattr(headers, "correlation_id")
|
|
252
|
+
and headers.correlation_id is not None
|
|
253
|
+
):
|
|
254
|
+
# Duck-type: normalize correlation_id to UUID
|
|
255
|
+
# Works uniformly for UUID objects, strings, and bytes
|
|
256
|
+
try:
|
|
257
|
+
correlation_id = headers.correlation_id
|
|
258
|
+
# Check for bytes-like (has decode method) - duck typing
|
|
259
|
+
if hasattr(correlation_id, "decode"):
|
|
260
|
+
correlation_id = correlation_id.decode("utf-8")
|
|
261
|
+
# Convert to UUID (handles UUID objects via str() and strings directly)
|
|
262
|
+
return UUID(str(correlation_id))
|
|
263
|
+
except (ValueError, TypeError, UnicodeDecodeError, AttributeError):
|
|
264
|
+
pass # Fall through to try payload extraction
|
|
265
|
+
|
|
266
|
+
# If we can peek at the payload, try to extract correlation_id
|
|
267
|
+
# This happens when we can parse the message but before full validation
|
|
268
|
+
try:
|
|
269
|
+
if msg.value is not None:
|
|
270
|
+
# Duck-type: check for decode method (bytes-like) first
|
|
271
|
+
if hasattr(msg.value, "decode"):
|
|
272
|
+
payload_dict = json.loads(msg.value.decode("utf-8"))
|
|
273
|
+
else:
|
|
274
|
+
# Try JSON parsing (works for strings)
|
|
275
|
+
# Falls back to treating as dict-like if TypeError
|
|
276
|
+
try:
|
|
277
|
+
payload_dict = json.loads(msg.value)
|
|
278
|
+
except TypeError:
|
|
279
|
+
# Already a dict or dict-like object
|
|
280
|
+
payload_dict = msg.value
|
|
281
|
+
|
|
282
|
+
if payload_dict:
|
|
283
|
+
# Check envelope-level correlation_id first
|
|
284
|
+
if "correlation_id" in payload_dict:
|
|
285
|
+
return UUID(str(payload_dict["correlation_id"]))
|
|
286
|
+
# Check payload-level correlation_id (duck-type dict check via 'in')
|
|
287
|
+
payload_content = payload_dict.get("payload")
|
|
288
|
+
if payload_content and hasattr(payload_content, "get"):
|
|
289
|
+
nested_corr_id = payload_content.get("correlation_id")
|
|
290
|
+
if nested_corr_id is not None:
|
|
291
|
+
return UUID(str(nested_corr_id))
|
|
292
|
+
except (json.JSONDecodeError, ValueError, TypeError, KeyError, AttributeError):
|
|
293
|
+
pass # Fall through to generate new ID
|
|
294
|
+
|
|
295
|
+
# Generate new correlation ID as last resort
|
|
296
|
+
return uuid4()
|
|
297
|
+
|
|
298
|
+
async def handle_message(self, msg: ModelEventMessage) -> None:
|
|
299
|
+
"""Handle incoming introspection event message.
|
|
300
|
+
|
|
301
|
+
This callback is invoked for each message received on the input topic.
|
|
302
|
+
It parses the raw JSON payload as ModelNodeIntrospectionEvent and routes
|
|
303
|
+
it to the introspection dispatcher.
|
|
304
|
+
|
|
305
|
+
The method propagates the correlation_id from the incoming message
|
|
306
|
+
for distributed tracing. If no correlation_id is present in the message,
|
|
307
|
+
a new one is generated.
|
|
308
|
+
|
|
309
|
+
Args:
|
|
310
|
+
msg: The event message containing raw bytes in .value field.
|
|
311
|
+
"""
|
|
312
|
+
# Extract correlation_id from message for proper propagation
|
|
313
|
+
# This ensures distributed tracing continuity across service boundaries
|
|
314
|
+
callback_correlation_id = self._extract_correlation_id_from_message(msg)
|
|
315
|
+
callback_start_time = time.time()
|
|
316
|
+
|
|
317
|
+
logger.debug(
|
|
318
|
+
"Introspection message callback invoked (correlation_id=%s)",
|
|
319
|
+
callback_correlation_id,
|
|
320
|
+
extra={
|
|
321
|
+
"message_offset": getattr(msg, "offset", None),
|
|
322
|
+
"message_partition": getattr(msg, "partition", None),
|
|
323
|
+
"message_topic": getattr(msg, "topic", None),
|
|
324
|
+
},
|
|
325
|
+
)
|
|
326
|
+
|
|
327
|
+
try:
|
|
328
|
+
# ModelEventMessage has .value as bytes
|
|
329
|
+
if msg.value is None:
|
|
330
|
+
logger.debug(
|
|
331
|
+
"Message value is None, skipping (correlation_id=%s)",
|
|
332
|
+
callback_correlation_id,
|
|
333
|
+
)
|
|
334
|
+
return
|
|
335
|
+
|
|
336
|
+
# Parse message value using duck-typing patterns
|
|
337
|
+
# Check for bytes-like (has decode method) first
|
|
338
|
+
if hasattr(msg.value, "decode"):
|
|
339
|
+
logger.debug(
|
|
340
|
+
"Parsing message value as bytes-like (correlation_id=%s)",
|
|
341
|
+
callback_correlation_id,
|
|
342
|
+
extra={"value_length": len(msg.value)},
|
|
343
|
+
)
|
|
344
|
+
payload_dict = json.loads(msg.value.decode("utf-8"))
|
|
345
|
+
else:
|
|
346
|
+
# Try JSON parsing (works for strings)
|
|
347
|
+
try:
|
|
348
|
+
logger.debug(
|
|
349
|
+
"Parsing message value as string-like (correlation_id=%s)",
|
|
350
|
+
callback_correlation_id,
|
|
351
|
+
extra={
|
|
352
|
+
"value_length": len(msg.value)
|
|
353
|
+
if hasattr(msg.value, "__len__")
|
|
354
|
+
else None
|
|
355
|
+
},
|
|
356
|
+
)
|
|
357
|
+
payload_dict = json.loads(msg.value)
|
|
358
|
+
except TypeError:
|
|
359
|
+
# Already a dict-like object (has keys/items)
|
|
360
|
+
if hasattr(msg.value, "keys"):
|
|
361
|
+
logger.debug(
|
|
362
|
+
"Message value already dict-like (correlation_id=%s)",
|
|
363
|
+
callback_correlation_id,
|
|
364
|
+
)
|
|
365
|
+
payload_dict = msg.value
|
|
366
|
+
else:
|
|
367
|
+
logger.debug(
|
|
368
|
+
"Unexpected message value type: %s (correlation_id=%s)",
|
|
369
|
+
type(msg.value).__name__,
|
|
370
|
+
callback_correlation_id,
|
|
371
|
+
)
|
|
372
|
+
return
|
|
373
|
+
|
|
374
|
+
# Parse as ModelEventEnvelope containing ModelNodeIntrospectionEvent
|
|
375
|
+
logger.debug(
|
|
376
|
+
"Validating payload as ModelEventEnvelope (correlation_id=%s)",
|
|
377
|
+
callback_correlation_id,
|
|
378
|
+
)
|
|
379
|
+
|
|
380
|
+
raw_envelope = ModelEventEnvelope[dict].model_validate(payload_dict)
|
|
381
|
+
|
|
382
|
+
# Validate payload as ModelNodeIntrospectionEvent
|
|
383
|
+
introspection_event = ModelNodeIntrospectionEvent.model_validate(
|
|
384
|
+
raw_envelope.payload
|
|
385
|
+
)
|
|
386
|
+
# Create typed envelope with validated payload
|
|
387
|
+
# Note: Defensively normalize metadata to handle bytes values from Kafka
|
|
388
|
+
event_envelope = ModelEventEnvelope[ModelNodeIntrospectionEvent](
|
|
389
|
+
payload=introspection_event,
|
|
390
|
+
envelope_id=raw_envelope.envelope_id,
|
|
391
|
+
envelope_timestamp=raw_envelope.envelope_timestamp,
|
|
392
|
+
correlation_id=raw_envelope.correlation_id or callback_correlation_id,
|
|
393
|
+
source_tool=raw_envelope.source_tool,
|
|
394
|
+
target_tool=raw_envelope.target_tool,
|
|
395
|
+
metadata=_normalize_metadata(raw_envelope.metadata),
|
|
396
|
+
priority=raw_envelope.priority,
|
|
397
|
+
timeout_seconds=raw_envelope.timeout_seconds,
|
|
398
|
+
trace_id=raw_envelope.trace_id,
|
|
399
|
+
span_id=raw_envelope.span_id,
|
|
400
|
+
)
|
|
401
|
+
logger.info(
|
|
402
|
+
"Envelope parsed successfully (correlation_id=%s)",
|
|
403
|
+
callback_correlation_id,
|
|
404
|
+
extra={
|
|
405
|
+
"envelope_id": str(event_envelope.envelope_id),
|
|
406
|
+
"node_id": str(introspection_event.node_id),
|
|
407
|
+
"node_type": introspection_event.node_type,
|
|
408
|
+
"event_version": introspection_event.node_version,
|
|
409
|
+
},
|
|
410
|
+
)
|
|
411
|
+
|
|
412
|
+
# Route to dispatcher
|
|
413
|
+
logger.info(
|
|
414
|
+
"Routing to introspection dispatcher (correlation_id=%s)",
|
|
415
|
+
callback_correlation_id,
|
|
416
|
+
extra={
|
|
417
|
+
"envelope_correlation_id": str(event_envelope.correlation_id),
|
|
418
|
+
"node_id": introspection_event.node_id,
|
|
419
|
+
},
|
|
420
|
+
)
|
|
421
|
+
dispatcher_start_time = time.time()
|
|
422
|
+
result = await self._dispatcher.handle(event_envelope)
|
|
423
|
+
dispatcher_duration = time.time() - dispatcher_start_time
|
|
424
|
+
|
|
425
|
+
if result.is_successful():
|
|
426
|
+
logger.info(
|
|
427
|
+
"Introspection event processed successfully: node_id=%s in %.3fs "
|
|
428
|
+
"(correlation_id=%s)",
|
|
429
|
+
introspection_event.node_id,
|
|
430
|
+
dispatcher_duration,
|
|
431
|
+
callback_correlation_id,
|
|
432
|
+
extra={
|
|
433
|
+
"envelope_correlation_id": str(event_envelope.correlation_id),
|
|
434
|
+
"dispatcher_duration_seconds": dispatcher_duration,
|
|
435
|
+
"node_id": introspection_event.node_id,
|
|
436
|
+
"node_type": introspection_event.node_type,
|
|
437
|
+
},
|
|
438
|
+
)
|
|
439
|
+
|
|
440
|
+
# Publish output events to output_topic
|
|
441
|
+
if result.output_events:
|
|
442
|
+
for output_event in result.output_events:
|
|
443
|
+
# Wrap output event in envelope
|
|
444
|
+
output_envelope = ModelEventEnvelope(
|
|
445
|
+
payload=output_event,
|
|
446
|
+
correlation_id=event_envelope.correlation_id,
|
|
447
|
+
envelope_timestamp=datetime.now(UTC),
|
|
448
|
+
)
|
|
449
|
+
|
|
450
|
+
# Publish to output topic
|
|
451
|
+
await self._event_bus.publish_envelope(
|
|
452
|
+
envelope=output_envelope,
|
|
453
|
+
topic=self._output_topic,
|
|
454
|
+
)
|
|
455
|
+
|
|
456
|
+
logger.info(
|
|
457
|
+
"Published output event to %s (correlation_id=%s)",
|
|
458
|
+
self._output_topic,
|
|
459
|
+
callback_correlation_id,
|
|
460
|
+
extra={
|
|
461
|
+
"output_event_type": type(output_event).__name__,
|
|
462
|
+
"envelope_id": str(output_envelope.envelope_id),
|
|
463
|
+
"node_id": str(introspection_event.node_id),
|
|
464
|
+
},
|
|
465
|
+
)
|
|
466
|
+
|
|
467
|
+
logger.debug(
|
|
468
|
+
"Published %d output events to %s (correlation_id=%s)",
|
|
469
|
+
len(result.output_events),
|
|
470
|
+
self._output_topic,
|
|
471
|
+
callback_correlation_id,
|
|
472
|
+
)
|
|
473
|
+
else:
|
|
474
|
+
# No output events after successful processing - this may indicate
|
|
475
|
+
# the handler didn't produce expected completion events
|
|
476
|
+
logger.warning(
|
|
477
|
+
"Introspection event processed but no output events produced. "
|
|
478
|
+
"Handler may not have emitted completion events "
|
|
479
|
+
"(correlation_id=%s)",
|
|
480
|
+
callback_correlation_id,
|
|
481
|
+
extra={
|
|
482
|
+
"node_id": str(introspection_event.node_id),
|
|
483
|
+
"node_type": introspection_event.node_type,
|
|
484
|
+
"dispatcher_duration_seconds": dispatcher_duration,
|
|
485
|
+
},
|
|
486
|
+
)
|
|
487
|
+
else:
|
|
488
|
+
logger.warning(
|
|
489
|
+
"Introspection event processing failed: %s (correlation_id=%s)",
|
|
490
|
+
result.error_message,
|
|
491
|
+
callback_correlation_id,
|
|
492
|
+
extra={
|
|
493
|
+
"envelope_correlation_id": str(event_envelope.correlation_id),
|
|
494
|
+
"error_message": result.error_message,
|
|
495
|
+
"node_id": introspection_event.node_id,
|
|
496
|
+
"dispatcher_duration_seconds": dispatcher_duration,
|
|
497
|
+
},
|
|
498
|
+
)
|
|
499
|
+
|
|
500
|
+
except ValidationError as validation_error:
|
|
501
|
+
# Not an introspection event - skip silently
|
|
502
|
+
# (other message types on the topic are handled by RuntimeHostProcess)
|
|
503
|
+
logger.debug(
|
|
504
|
+
"Message is not a valid introspection event, skipping "
|
|
505
|
+
"(correlation_id=%s)",
|
|
506
|
+
callback_correlation_id,
|
|
507
|
+
extra={
|
|
508
|
+
"validation_error_count": validation_error.error_count(),
|
|
509
|
+
},
|
|
510
|
+
)
|
|
511
|
+
|
|
512
|
+
except json.JSONDecodeError as json_error:
|
|
513
|
+
logger.warning(
|
|
514
|
+
"Failed to decode JSON from message: %s (correlation_id=%s)",
|
|
515
|
+
sanitize_error_message(json_error),
|
|
516
|
+
callback_correlation_id,
|
|
517
|
+
extra={
|
|
518
|
+
"error_type": type(json_error).__name__,
|
|
519
|
+
"error_position": getattr(json_error, "pos", None),
|
|
520
|
+
},
|
|
521
|
+
)
|
|
522
|
+
|
|
523
|
+
except Exception as msg_error:
|
|
524
|
+
# Use warning instead of exception to avoid credential exposure
|
|
525
|
+
# in tracebacks (connection errors may contain DSN with password)
|
|
526
|
+
logger.warning(
|
|
527
|
+
"Failed to process introspection message: %s (correlation_id=%s)",
|
|
528
|
+
sanitize_error_message(msg_error),
|
|
529
|
+
callback_correlation_id,
|
|
530
|
+
extra={
|
|
531
|
+
"error_type": type(msg_error).__name__,
|
|
532
|
+
},
|
|
533
|
+
)
|
|
534
|
+
|
|
535
|
+
finally:
|
|
536
|
+
callback_duration = time.time() - callback_start_time
|
|
537
|
+
logger.debug(
|
|
538
|
+
"Introspection message callback completed in %.3fs (correlation_id=%s)",
|
|
539
|
+
callback_duration,
|
|
540
|
+
callback_correlation_id,
|
|
541
|
+
extra={
|
|
542
|
+
"callback_duration_seconds": callback_duration,
|
|
543
|
+
},
|
|
544
|
+
)
|
|
@@ -0,0 +1,75 @@
|
|
|
1
|
+
# SPDX-License-Identifier: MIT
|
|
2
|
+
# Copyright (c) 2025 OmniNode Team
|
|
3
|
+
"""Models for the registration orchestrator node.
|
|
4
|
+
|
|
5
|
+
This module exports all models used by the NodeRegistrationOrchestrator,
|
|
6
|
+
including configuration, input, output, intent, and timeout event models.
|
|
7
|
+
"""
|
|
8
|
+
|
|
9
|
+
from omnibase_infra.models.registration.events.model_node_registration_ack_timed_out import (
|
|
10
|
+
ModelNodeRegistrationAckTimedOut,
|
|
11
|
+
)
|
|
12
|
+
from omnibase_infra.nodes.node_registration_orchestrator.models.model_consul_intent_payload import (
|
|
13
|
+
ModelConsulIntentPayload,
|
|
14
|
+
)
|
|
15
|
+
from omnibase_infra.nodes.node_registration_orchestrator.models.model_consul_registration_intent import (
|
|
16
|
+
ModelConsulRegistrationIntent,
|
|
17
|
+
)
|
|
18
|
+
from omnibase_infra.nodes.node_registration_orchestrator.models.model_intent_execution_result import (
|
|
19
|
+
ModelIntentExecutionResult,
|
|
20
|
+
)
|
|
21
|
+
from omnibase_infra.nodes.node_registration_orchestrator.models.model_node_liveness_expired import (
|
|
22
|
+
ModelNodeLivenessExpired,
|
|
23
|
+
)
|
|
24
|
+
from omnibase_infra.nodes.node_registration_orchestrator.models.model_orchestrator_config import (
|
|
25
|
+
ModelOrchestratorConfig,
|
|
26
|
+
)
|
|
27
|
+
from omnibase_infra.nodes.node_registration_orchestrator.models.model_orchestrator_input import (
|
|
28
|
+
ModelOrchestratorInput,
|
|
29
|
+
)
|
|
30
|
+
from omnibase_infra.nodes.node_registration_orchestrator.models.model_orchestrator_output import (
|
|
31
|
+
ModelOrchestratorOutput,
|
|
32
|
+
)
|
|
33
|
+
from omnibase_infra.nodes.node_registration_orchestrator.models.model_postgres_intent_payload import (
|
|
34
|
+
ModelPostgresIntentPayload,
|
|
35
|
+
)
|
|
36
|
+
from omnibase_infra.nodes.node_registration_orchestrator.models.model_postgres_upsert_intent import (
|
|
37
|
+
ModelPostgresUpsertIntent,
|
|
38
|
+
)
|
|
39
|
+
from omnibase_infra.nodes.node_registration_orchestrator.models.model_reducer_execution_result import (
|
|
40
|
+
ModelReducerExecutionResult,
|
|
41
|
+
)
|
|
42
|
+
from omnibase_infra.nodes.node_registration_orchestrator.models.model_reducer_state import (
|
|
43
|
+
ModelReducerState,
|
|
44
|
+
)
|
|
45
|
+
from omnibase_infra.nodes.node_registration_orchestrator.models.model_registration_intent import (
|
|
46
|
+
IntentPayload,
|
|
47
|
+
ModelRegistrationIntent,
|
|
48
|
+
get_union_intent_types,
|
|
49
|
+
validate_union_registry_sync,
|
|
50
|
+
)
|
|
51
|
+
from omnibase_infra.nodes.node_registration_orchestrator.models.model_registry_intent import (
|
|
52
|
+
ModelRegistryIntent,
|
|
53
|
+
RegistryIntent,
|
|
54
|
+
)
|
|
55
|
+
|
|
56
|
+
__all__ = [
|
|
57
|
+
"IntentPayload",
|
|
58
|
+
"RegistryIntent",
|
|
59
|
+
"ModelConsulIntentPayload",
|
|
60
|
+
"ModelConsulRegistrationIntent",
|
|
61
|
+
"ModelIntentExecutionResult",
|
|
62
|
+
"ModelNodeLivenessExpired",
|
|
63
|
+
"ModelNodeRegistrationAckTimedOut",
|
|
64
|
+
"ModelOrchestratorConfig",
|
|
65
|
+
"ModelOrchestratorInput",
|
|
66
|
+
"ModelOrchestratorOutput",
|
|
67
|
+
"ModelPostgresIntentPayload",
|
|
68
|
+
"ModelPostgresUpsertIntent",
|
|
69
|
+
"ModelReducerExecutionResult",
|
|
70
|
+
"ModelReducerState",
|
|
71
|
+
"ModelRegistrationIntent",
|
|
72
|
+
"ModelRegistryIntent",
|
|
73
|
+
"get_union_intent_types",
|
|
74
|
+
"validate_union_registry_sync",
|
|
75
|
+
]
|