vibrante-node-runtime 2.5.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.
- src/__init__.py +1 -0
- src/runtime/__init__.py +187 -0
- src/runtime/agent_runtime.py +315 -0
- src/runtime/ai_planner.py +371 -0
- src/runtime/approval_pipeline.py +237 -0
- src/runtime/architectural_features/__init__.py +68 -0
- src/runtime/architectural_features/architectural_feature_realizer.py +279 -0
- src/runtime/architectural_features/architectural_plan.py +421 -0
- src/runtime/architectural_features/architectural_plan_builder.py +428 -0
- src/runtime/architectural_features/environment_architecture_review.py +398 -0
- src/runtime/asset_identity/__init__.py +103 -0
- src/runtime/asset_identity/asset_identity_auditor.py +532 -0
- src/runtime/asset_identity/identity_review.py +248 -0
- src/runtime/asset_identity/identity_serializer.py +76 -0
- src/runtime/asset_identity/identity_statistics.py +132 -0
- src/runtime/asset_identity/opaque_id_detector.py +167 -0
- src/runtime/asset_identity/role_engine_validator.py +134 -0
- src/runtime/asset_identity/role_geometry_validator.py +161 -0
- src/runtime/asset_knowledge_graph.py +505 -0
- src/runtime/asset_staging_manager.py +350 -0
- src/runtime/assets/__init__.py +310 -0
- src/runtime/assets/acquisition/__init__.py +109 -0
- src/runtime/assets/acquisition/acquisition_manager.py +431 -0
- src/runtime/assets/acquisition/download_registry.py +324 -0
- src/runtime/assets/acquisition/fab_library_scanner.py +384 -0
- src/runtime/assets/acquisition/library_index.py +379 -0
- src/runtime/assets/acquisition/library_watcher.py +362 -0
- src/runtime/assets/acquisition/megascans_scanner.py +551 -0
- src/runtime/assets/acquisition_online/__init__.py +211 -0
- src/runtime/assets/acquisition_online/acquisition_pipeline.py +279 -0
- src/runtime/assets/acquisition_online/asset_cache_manager.py +265 -0
- src/runtime/assets/acquisition_online/asset_fetcher.py +361 -0
- src/runtime/assets/acquisition_online/asset_provenance_tracker.py +231 -0
- src/runtime/assets/acquisition_online/download_queue.py +297 -0
- src/runtime/assets/acquisition_online/download_review.py +253 -0
- src/runtime/assets/acquisition_online/download_scheduler.py +188 -0
- src/runtime/assets/acquisition_online/download_serializer.py +116 -0
- src/runtime/assets/acquisition_online/download_statistics.py +145 -0
- src/runtime/assets/acquisition_online/fab_socket_receiver.py +449 -0
- src/runtime/assets/acquisition_online/megascans_auth.py +408 -0
- src/runtime/assets/acquisition_online/megascans_download.py +391 -0
- src/runtime/assets/acquisition_online/megascans_search.py +313 -0
- src/runtime/assets/acquisition_online/project_asset_staging.py +221 -0
- src/runtime/assets/acquisition_online/provider_session_manager.py +182 -0
- src/runtime/assets/acquisition_online/quixel_bridge_client.py +380 -0
- src/runtime/assets/assembly/__init__.py +288 -0
- src/runtime/assets/assembly/anchor_asset_engine.py +387 -0
- src/runtime/assets/assembly/architectural_templates.py +493 -0
- src/runtime/assets/assembly/asset_clustering_engine.py +343 -0
- src/runtime/assets/assembly/asset_placement_engine.py +553 -0
- src/runtime/assets/assembly/asset_scale_analyzer.py +278 -0
- src/runtime/assets/assembly/bounding_box_extractor.py +227 -0
- src/runtime/assets/assembly/clearance_validator.py +204 -0
- src/runtime/assets/assembly/collision_detector.py +208 -0
- src/runtime/assets/assembly/composition_constraints.py +291 -0
- src/runtime/assets/assembly/decorative_population_engine.py +419 -0
- src/runtime/assets/assembly/environment_blueprint.py +92 -0
- src/runtime/assets/assembly/environment_builder.py +401 -0
- src/runtime/assets/assembly/environment_completeness_review.py +500 -0
- src/runtime/assets/assembly/environment_review.py +454 -0
- src/runtime/assets/assembly/environment_scale_review.py +490 -0
- src/runtime/assets/assembly/environment_structure_builder.py +344 -0
- src/runtime/assets/assembly/environment_zones.py +332 -0
- src/runtime/assets/assembly/footprint_calculator.py +181 -0
- src/runtime/assets/assembly/layout_spacing_engine.py +350 -0
- src/runtime/assets/assembly/placement_optimizer.py +272 -0
- src/runtime/assets/assembly/placement_relationships.py +380 -0
- src/runtime/assets/assembly/placement_templates.py +1024 -0
- src/runtime/assets/assembly/scene_population_engine.py +351 -0
- src/runtime/assets/assembly/semantic_placement_rules.py +323 -0
- src/runtime/assets/assembly/spatial_metadata.py +118 -0
- src/runtime/assets/assembly/spatial_review.py +304 -0
- src/runtime/assets/assembly/storytelling_layout_engine.py +768 -0
- src/runtime/assets/assembly/unit_normalizer.py +192 -0
- src/runtime/assets/cache/__init__.py +39 -0
- src/runtime/assets/cache/asset_cache.py +330 -0
- src/runtime/assets/cache/asset_storage.py +234 -0
- src/runtime/assets/cache/asset_sync.py +280 -0
- src/runtime/assets/discovery/__init__.py +17 -0
- src/runtime/assets/discovery/asset_discovery_engine.py +223 -0
- src/runtime/assets/download/__init__.py +24 -0
- src/runtime/assets/download/asset_download_manager.py +275 -0
- src/runtime/assets/geometry/__init__.py +149 -0
- src/runtime/assets/geometry/asset_metrics.py +476 -0
- src/runtime/assets/geometry/bounding_box_extractor.py +478 -0
- src/runtime/assets/geometry/geometry_analyzer.py +251 -0
- src/runtime/assets/geometry/geometry_review.py +463 -0
- src/runtime/assets/geometry/geometry_serializer.py +121 -0
- src/runtime/assets/geometry/geometry_statistics.py +206 -0
- src/runtime/assets/geometry/ground_contact_detector.py +277 -0
- src/runtime/assets/geometry/pivot_detector.py +248 -0
- src/runtime/assets/geometry/support_surface_detector.py +299 -0
- src/runtime/assets/logging/__init__.py +17 -0
- src/runtime/assets/logging/asset_logger.py +153 -0
- src/runtime/assets/metadata/__init__.py +65 -0
- src/runtime/assets/metadata/asset_metadata_enricher.py +215 -0
- src/runtime/assets/metadata/asset_provenance.py +273 -0
- src/runtime/assets/metadata/asset_semantic_mapper.py +265 -0
- src/runtime/assets/metadata/provider_normalizer.py +364 -0
- src/runtime/assets/providers/__init__.py +38 -0
- src/runtime/assets/providers/base.py +218 -0
- src/runtime/assets/providers/local_library_provider.py +209 -0
- src/runtime/assets/providers/polyhaven_provider.py +268 -0
- src/runtime/assets/providers/provider_manager.py +229 -0
- src/runtime/assets/providers/quixel_provider.py +277 -0
- src/runtime/assets/providers/sketchfab_live_provider.py +515 -0
- src/runtime/assets/providers/sketchfab_provider.py +327 -0
- src/runtime/assets/providers/studio_library_provider.py +323 -0
- src/runtime/assets/providers/usd_library_provider.py +310 -0
- src/runtime/assets/ranking/__init__.py +17 -0
- src/runtime/assets/ranking/asset_ranking_engine.py +365 -0
- src/runtime/assets/real_world_scale.py +189 -0
- src/runtime/assets/realization/__init__.py +162 -0
- src/runtime/assets/realization/asset_converter.py +282 -0
- src/runtime/assets/realization/asset_dependency_resolver.py +285 -0
- src/runtime/assets/realization/asset_importer.py +298 -0
- src/runtime/assets/realization/asset_instancer.py +269 -0
- src/runtime/assets/realization/asset_material_mapper.py +337 -0
- src/runtime/assets/realization/asset_normalizer.py +319 -0
- src/runtime/assets/realization/asset_realization_review.py +416 -0
- src/runtime/assets/realization/asset_validation_pipeline.py +316 -0
- src/runtime/assets/realization/realization_serializer.py +172 -0
- src/runtime/assets/realization/realization_statistics.py +265 -0
- src/runtime/assets/realization/scene_asset_realizer.py +405 -0
- src/runtime/assets/realization/usd_builder.py +272 -0
- src/runtime/assets/recommendations/__init__.py +17 -0
- src/runtime/assets/recommendations/asset_recommendation_engine.py +260 -0
- src/runtime/assets/schema/__init__.py +38 -0
- src/runtime/assets/schema/asset_descriptor.py +484 -0
- src/runtime/assets/semantic/__init__.py +234 -0
- src/runtime/assets/semantic/asset_catalog.py +368 -0
- src/runtime/assets/semantic/asset_catalog_review.py +266 -0
- src/runtime/assets/semantic/asset_catalog_serializer.py +103 -0
- src/runtime/assets/semantic/asset_catalog_statistics.py +130 -0
- src/runtime/assets/semantic/asset_catalog_sync.py +248 -0
- src/runtime/assets/semantic/asset_cinematic_mapper.py +156 -0
- src/runtime/assets/semantic/asset_environment_mapper.py +459 -0
- src/runtime/assets/semantic/asset_knowledge_graph.py +257 -0
- src/runtime/assets/semantic/asset_lookdev_mapper.py +180 -0
- src/runtime/assets/semantic/asset_manifest_reader.py +236 -0
- src/runtime/assets/semantic/asset_metadata_extractor.py +167 -0
- src/runtime/assets/semantic/asset_metadata_provider.py +231 -0
- src/runtime/assets/semantic/asset_query_engine.py +240 -0
- src/runtime/assets/semantic/asset_role_classifier.py +193 -0
- src/runtime/assets/semantic/asset_storytelling_mapper.py +163 -0
- src/runtime/assets/semantic/megascans_metadata_client.py +345 -0
- src/runtime/assets/semantic/semantic_asset_enricher.py +232 -0
- src/runtime/assets/serialization/__init__.py +15 -0
- src/runtime/assets/serialization/asset_serializer.py +201 -0
- src/runtime/assets/suitability/__init__.py +115 -0
- src/runtime/assets/suitability/asset_suitability_engine.py +345 -0
- src/runtime/assets/suitability/asset_suitability_review.py +193 -0
- src/runtime/assets/suitability/asset_suitability_serializer.py +67 -0
- src/runtime/assets/suitability/asset_suitability_statistics.py +141 -0
- src/runtime/assets/suitability/environment_affinity.py +290 -0
- src/runtime/assets/suitability/material_affinity.py +247 -0
- src/runtime/assets/suitability/placement_affinity.py +153 -0
- src/runtime/assets/suitability/role_affinity.py +205 -0
- src/runtime/assets/suitability/scale_affinity.py +150 -0
- src/runtime/assets/suitability/story_affinity.py +235 -0
- src/runtime/assets/suitability/style_affinity.py +252 -0
- src/runtime/assets/validation/__init__.py +17 -0
- src/runtime/assets/validation/asset_validation_engine.py +281 -0
- src/runtime/assets/vector_search/__init__.py +193 -0
- src/runtime/assets/vector_search/asset_embedding_builder.py +132 -0
- src/runtime/assets/vector_search/asset_vector_store.py +264 -0
- src/runtime/assets/vector_search/catalog_vector_index_builder.py +155 -0
- src/runtime/assets/vector_search/embedding_provider.py +294 -0
- src/runtime/assets/vector_search/hybrid_ranking_engine.py +241 -0
- src/runtime/assets/vector_search/intent_embedding_engine.py +99 -0
- src/runtime/assets/vector_search/intent_parser.py +462 -0
- src/runtime/assets/vector_search/retrieval_pipeline.py +275 -0
- src/runtime/assets/vector_search/retrieval_review.py +281 -0
- src/runtime/assets/vector_search/retrieval_serializer.py +91 -0
- src/runtime/assets/vector_search/retrieval_statistics.py +133 -0
- src/runtime/assets/vector_search/semantic_similarity.py +116 -0
- src/runtime/assets/vector_search/vector_search_engine.py +246 -0
- src/runtime/atmosphere_orchestrator.py +412 -0
- src/runtime/audit_store.py +230 -0
- src/runtime/capability_catalog.py +2324 -0
- src/runtime/capability_registry.py +225 -0
- src/runtime/cinematic_camera_engine.py +497 -0
- src/runtime/cinematic_composition.py +399 -0
- src/runtime/cinematic_scene_review.py +539 -0
- src/runtime/contextual_reasoning.py +286 -0
- src/runtime/dependency_graph.py +205 -0
- src/runtime/distributed_runtime.py +348 -0
- src/runtime/environment/__init__.py +189 -0
- src/runtime/environment/anchor_asset_builder.py +389 -0
- src/runtime/environment/atmosphere_builder.py +307 -0
- src/runtime/environment/decorative_population.py +320 -0
- src/runtime/environment/environment_blueprint.py +107 -0
- src/runtime/environment/environment_completeness.py +234 -0
- src/runtime/environment/environment_requirements.py +224 -0
- src/runtime/environment/environment_review.py +320 -0
- src/runtime/environment/environment_serializer.py +100 -0
- src/runtime/environment/environment_statistics.py +149 -0
- src/runtime/environment/environment_structure_builder.py +391 -0
- src/runtime/environment/environment_template_library.py +388 -0
- src/runtime/environment/environment_zone_builder.py +334 -0
- src/runtime/environment/support_asset_builder.py +243 -0
- src/runtime/environment_realization/__init__.py +177 -0
- src/runtime/environment_realization/architectural_constraint_solver.py +230 -0
- src/runtime/environment_realization/beam_builder.py +221 -0
- src/runtime/environment_realization/ceiling_builder.py +186 -0
- src/runtime/environment_realization/environment_execution_engine.py +228 -0
- src/runtime/environment_realization/environment_realization_engine.py +119 -0
- src/runtime/environment_realization/environment_review.py +250 -0
- src/runtime/environment_realization/environment_serializer.py +77 -0
- src/runtime/environment_realization/environment_statistics.py +134 -0
- src/runtime/environment_realization/floor_builder.py +198 -0
- src/runtime/environment_realization/opening_builder.py +224 -0
- src/runtime/environment_realization/room_shell_builder.py +215 -0
- src/runtime/environment_realization/room_shell_completeness_validator.py +303 -0
- src/runtime/environment_realization/structural_attachment_enforcer.py +386 -0
- src/runtime/environment_realization/structural_builder.py +314 -0
- src/runtime/environment_realization/structural_elements.py +258 -0
- src/runtime/environment_realization/structural_routing_engine.py +390 -0
- src/runtime/environment_realization/wall_builder.py +199 -0
- src/runtime/environment_rules.py +239 -0
- src/runtime/environment_shell/__init__.py +187 -0
- src/runtime/environment_shell/environment_readiness_gate.py +187 -0
- src/runtime/environment_shell/environment_shell_audit.py +184 -0
- src/runtime/environment_shell/environment_shell_blueprint.py +267 -0
- src/runtime/environment_shell/environment_shell_builder.py +265 -0
- src/runtime/environment_shell/environment_shell_state.py +133 -0
- src/runtime/environment_shell/shell_ceiling_builder.py +114 -0
- src/runtime/environment_shell/shell_floor_builder.py +96 -0
- src/runtime/environment_shell/shell_phase_result.py +66 -0
- src/runtime/environment_shell/shell_review.py +241 -0
- src/runtime/environment_shell/shell_serializer.py +67 -0
- src/runtime/environment_shell/shell_statistics.py +141 -0
- src/runtime/environment_shell/shell_validator.py +138 -0
- src/runtime/environment_shell/shell_wall_builder.py +156 -0
- src/runtime/environment_shell/structural_anchor_generator.py +200 -0
- src/runtime/environment_shell/structural_element_placer.py +193 -0
- src/runtime/environments/__init__.py +67 -0
- src/runtime/environments/environment_registry.py +1139 -0
- src/runtime/environments/environment_statistics.py +219 -0
- src/runtime/execution_explainer.py +399 -0
- src/runtime/execution_quality.py +258 -0
- src/runtime/execution_review.py +221 -0
- src/runtime/execution_scheduler.py +263 -0
- src/runtime/failure_intelligence.py +341 -0
- src/runtime/goal_decomposer.py +532 -0
- src/runtime/houdini_asset_realizer.py +329 -0
- src/runtime/houdini_runtime.py +992 -0
- src/runtime/intent_parser.py +275 -0
- src/runtime/knowledge_graph.py +310 -0
- src/runtime/layout/__init__.py +172 -0
- src/runtime/layout/affordance_engine.py +384 -0
- src/runtime/layout/anchor_layout_engine.py +244 -0
- src/runtime/layout/decoration_layout_engine.py +325 -0
- src/runtime/layout/furniture_cluster_builder.py +381 -0
- src/runtime/layout/layout_review.py +265 -0
- src/runtime/layout/layout_serializer.py +77 -0
- src/runtime/layout/layout_statistics.py +123 -0
- src/runtime/layout/relationship_graph.py +165 -0
- src/runtime/layout/relationship_graph_builder.py +699 -0
- src/runtime/layout/relationship_layout_engine.py +1101 -0
- src/runtime/layout/relationship_realization_auditor.py +849 -0
- src/runtime/layout/semantic_layout_engine.py +327 -0
- src/runtime/layout/surface_placement_engine.py +270 -0
- src/runtime/layout/wall_attachment_engine.py +243 -0
- src/runtime/layout_realization/__init__.py +183 -0
- src/runtime/layout_realization/cluster_realizer.py +212 -0
- src/runtime/layout_realization/collision_solver.py +359 -0
- src/runtime/layout_realization/identity_metadata_writer.py +257 -0
- src/runtime/layout_realization/layout_application_engine.py +242 -0
- src/runtime/layout_realization/layout_realization_engine.py +293 -0
- src/runtime/layout_realization/layout_validator.py +315 -0
- src/runtime/layout_realization/metadata_application_engine.py +187 -0
- src/runtime/layout_realization/realization_review.py +268 -0
- src/runtime/layout_realization/realization_serializer.py +77 -0
- src/runtime/layout_realization/realization_statistics.py +151 -0
- src/runtime/layout_realization/relationship_metadata_writer.py +305 -0
- src/runtime/layout_realization/relationship_persistence_auditor.py +426 -0
- src/runtime/layout_realization/relationship_realizer.py +294 -0
- src/runtime/layout_realization/scene_constraint_solver.py +317 -0
- src/runtime/layout_realization/surface_realizer.py +195 -0
- src/runtime/layout_realization/transform_resolver.py +268 -0
- src/runtime/layout_realization/wall_attachment_realizer.py +182 -0
- src/runtime/layout_transform_engine.py +341 -0
- src/runtime/lighting/__init__.py +215 -0
- src/runtime/lighting/lighting_color_engine.py +252 -0
- src/runtime/lighting/lighting_environment_mapper.py +792 -0
- src/runtime/lighting/lighting_exposure_engine.py +213 -0
- src/runtime/lighting/lighting_hierarchy_engine.py +248 -0
- src/runtime/lighting/lighting_knowledge.py +342 -0
- src/runtime/lighting/lighting_language.py +239 -0
- src/runtime/lighting/lighting_mood_engine.py +230 -0
- src/runtime/lighting/lighting_patterns.py +522 -0
- src/runtime/lighting/lighting_plan_builder.py +320 -0
- src/runtime/lighting/lighting_readability_engine.py +273 -0
- src/runtime/lighting/lighting_recommendation_engine.py +205 -0
- src/runtime/lighting/lighting_review.py +370 -0
- src/runtime/lighting/lighting_serializer.py +71 -0
- src/runtime/lighting/lighting_statistics.py +142 -0
- src/runtime/lighting/lighting_strategy_engine.py +239 -0
- src/runtime/lighting/lighting_validation.py +183 -0
- src/runtime/llm_provider.py +340 -0
- src/runtime/lookdev/__init__.py +137 -0
- src/runtime/lookdev/lookdev_patterns.py +216 -0
- src/runtime/lookdev/lookdev_review.py +389 -0
- src/runtime/lookdev/lookdev_serializer.py +71 -0
- src/runtime/lookdev/lookdev_statistics.py +133 -0
- src/runtime/lookdev/lookdev_validation.py +203 -0
- src/runtime/lookdev/material_assignment_engine.py +331 -0
- src/runtime/lookdev/material_knowledge.py +244 -0
- src/runtime/lookdev/material_library.py +311 -0
- src/runtime/lookdev/material_recommendation.py +394 -0
- src/runtime/lookdev/renderer_profiles.py +281 -0
- src/runtime/mcp_runtime.py +357 -0
- src/runtime/mcp_server_runtime.py +386 -0
- src/runtime/mcp_session.py +261 -0
- src/runtime/mcp_tool_registry.py +2169 -0
- src/runtime/mcp_transport.py +206 -0
- src/runtime/multi_dcc_runtime.py +316 -0
- src/runtime/orchestration_heuristics.py +360 -0
- src/runtime/pattern_library.py +344 -0
- src/runtime/plan_validator.py +314 -0
- src/runtime/planning/__init__.py +103 -0
- src/runtime/planning/camera/__init__.py +1 -0
- src/runtime/planning/camera/camera_planner.py +179 -0
- src/runtime/planning/composition/__init__.py +1 -0
- src/runtime/planning/composition/composition_planner.py +223 -0
- src/runtime/planning/logging/__init__.py +1 -0
- src/runtime/planning/logging/planning_logger.py +109 -0
- src/runtime/planning/planners/__init__.py +1 -0
- src/runtime/planning/planners/asset_query_generator.py +265 -0
- src/runtime/planning/planners/scene_planner.py +199 -0
- src/runtime/planning/planners/zone_planner.py +271 -0
- src/runtime/planning/recommendations/__init__.py +1 -0
- src/runtime/planning/recommendations/scene_plan_recommendation_engine.py +228 -0
- src/runtime/planning/schema/__init__.py +23 -0
- src/runtime/planning/schema/scene_plan.py +569 -0
- src/runtime/planning/serialization/__init__.py +1 -0
- src/runtime/planning/serialization/plan_serializer.py +147 -0
- src/runtime/planning/validators/__init__.py +1 -0
- src/runtime/planning/validators/scene_plan_validator.py +210 -0
- src/runtime/planning_memory.py +242 -0
- src/runtime/predictive_execution.py +393 -0
- src/runtime/procedural_scene_assembler.py +415 -0
- src/runtime/production_memory.py +309 -0
- src/runtime/production_scoring.py +422 -0
- src/runtime/reality/__init__.py +197 -0
- src/runtime/reality/architectural_integrity_validator.py +220 -0
- src/runtime/reality/beam_connection_validator.py +205 -0
- src/runtime/reality/composition_engine.py +206 -0
- src/runtime/reality/correction_applier.py +159 -0
- src/runtime/reality/correction_pass_engine.py +253 -0
- src/runtime/reality/density_engine.py +145 -0
- src/runtime/reality/floating_object_detector.py +206 -0
- src/runtime/reality/functional_zone_builder.py +260 -0
- src/runtime/reality/geometry_inspector.py +229 -0
- src/runtime/reality/human_reasoning_engine.py +284 -0
- src/runtime/reality/reality_intelligence_engine.py +182 -0
- src/runtime/reality/reality_scene_model.py +351 -0
- src/runtime/reality/reality_serializer.py +75 -0
- src/runtime/reality/reality_statistics.py +145 -0
- src/runtime/reality/support_rule_engine.py +248 -0
- src/runtime/reality/visual_review_engine.py +217 -0
- src/runtime/recommendation_engine.py +358 -0
- src/runtime/render_preparation_engine.py +463 -0
- src/runtime/resource_estimator.py +256 -0
- src/runtime/resource_optimizer.py +343 -0
- src/runtime/review_engine.py +768 -0
- src/runtime/review_feedback.py +325 -0
- src/runtime/runtime_analytics.py +330 -0
- src/runtime/runtime_bootstrap.py +137 -0
- src/runtime/runtime_constraints.py +317 -0
- src/runtime/runtime_federation_api.py +297 -0
- src/runtime/runtime_identity.py +70 -0
- src/runtime/runtime_narration.py +493 -0
- src/runtime/runtime_prompt_context.py +682 -0
- src/runtime/scene_awareness.py +559 -0
- src/runtime/scene_cache.py +277 -0
- src/runtime/scene_hierarchy_builder.py +258 -0
- src/runtime/scene_layout_planner.py +292 -0
- src/runtime/scene_realization_review.py +452 -0
- src/runtime/scene_recommendation_engine.py +398 -0
- src/runtime/scene_validation/__init__.py +118 -0
- src/runtime/scene_validation/occupancy_validator.py +176 -0
- src/runtime/scene_validation/orphan_detector.py +205 -0
- src/runtime/scene_validation/plausibility_engine.py +236 -0
- src/runtime/scene_validation/relationship_validator.py +238 -0
- src/runtime/scene_validation/routing_audit.py +556 -0
- src/runtime/scene_validation/scene_reality_validator.py +229 -0
- src/runtime/scene_validation/support_surface_validator.py +155 -0
- src/runtime/scene_validation/validation_review.py +207 -0
- src/runtime/scene_validation/validation_serializer.py +74 -0
- src/runtime/scene_validation/validation_statistics.py +142 -0
- src/runtime/semantic/__init__.py +113 -0
- src/runtime/semantic/enrichers/__init__.py +12 -0
- src/runtime/semantic/enrichers/scene_intent_enricher.py +305 -0
- src/runtime/semantic/logging/__init__.py +18 -0
- src/runtime/semantic/logging/semantic_logger.py +298 -0
- src/runtime/semantic/prompts/__init__.py +12 -0
- src/runtime/semantic/prompts/intent_prompt_builder.py +317 -0
- src/runtime/semantic/recommendations/__init__.py +17 -0
- src/runtime/semantic/recommendations/intent_recommendation_engine.py +434 -0
- src/runtime/semantic/scene_intent_extractor.py +455 -0
- src/runtime/semantic/schema/__init__.py +40 -0
- src/runtime/semantic/schema/scene_intent_schema.py +349 -0
- src/runtime/semantic/serialization/__init__.py +16 -0
- src/runtime/semantic/serialization/intent_serializer.py +248 -0
- src/runtime/semantic/validators/__init__.py +14 -0
- src/runtime/semantic/validators/scene_intent_validator.py +284 -0
- src/runtime/semantic_execution.py +348 -0
- src/runtime/semantic_import_controller.py +408 -0
- src/runtime/semantic_lighting_engine.py +566 -0
- src/runtime/semantic_memory.py +257 -0
- src/runtime/semantic_registry.py +386 -0
- src/runtime/semantic_scene_templates.py +387 -0
- src/runtime/storage/__init__.py +18 -0
- src/runtime/storage/memory_backend.py +294 -0
- src/runtime/storage/serialization.py +211 -0
- src/runtime/storage/sqlite_backend.py +365 -0
- src/runtime/structure/__init__.py +135 -0
- src/runtime/structure/environment_structural_affinity.py +254 -0
- src/runtime/structure/geometry_role_detector.py +182 -0
- src/runtime/structure/metadata_role_classifier.py +279 -0
- src/runtime/structure/structural_asset_classifier.py +331 -0
- src/runtime/structure/structural_placement_rules.py +326 -0
- src/runtime/structure/structural_review.py +682 -0
- src/runtime/structure/structural_serializer.py +113 -0
- src/runtime/structure/structural_statistics.py +209 -0
- src/runtime/studio/__init__.py +71 -0
- src/runtime/studio/cross_project_learning.py +263 -0
- src/runtime/studio/knowledge_recommendation.py +324 -0
- src/runtime/studio/knowledge_serializer.py +154 -0
- src/runtime/studio/knowledge_statistics.py +107 -0
- src/runtime/studio/production_benchmark.py +240 -0
- src/runtime/studio/project_memory.py +250 -0
- src/runtime/studio/review_analytics.py +166 -0
- src/runtime/studio/studio_knowledge.py +284 -0
- src/runtime/studio/studio_metrics.py +155 -0
- src/runtime/studio/studio_standards.py +262 -0
- src/runtime/studio_knowledge.py +328 -0
- src/runtime/transaction_manager.py +367 -0
- src/runtime/validation_engine.py +234 -0
- src/runtime/visual_hierarchy_engine.py +452 -0
- src/runtime/worker_runtime.py +236 -0
- src/runtime/workflow_federation.py +316 -0
- src/runtime/workflow_optimizer.py +407 -0
- src/runtime/workflow_templates.py +421 -0
- src/runtime/workflows/__init__.py +129 -0
- src/runtime/workflows/workflow_blueprint.py +394 -0
- src/runtime/workflows/workflow_executor.py +344 -0
- src/runtime/workflows/workflow_pack.py +403 -0
- src/runtime/workflows/workflow_recommendation.py +353 -0
- src/runtime/workflows/workflow_registry.py +165 -0
- src/runtime/workflows/workflow_review.py +336 -0
- src/runtime/workflows/workflow_serializer.py +149 -0
- src/runtime/workflows/workflow_statistics.py +205 -0
- src/runtime/workflows/workflow_validator.py +272 -0
- src/utils/__init__.py +0 -0
- src/utils/hou_bridge.py +262 -0
- src/utils/vibrante_config.py +272 -0
- vibrante_node_runtime-2.5.1.dist-info/METADATA +47 -0
- vibrante_node_runtime-2.5.1.dist-info/RECORD +472 -0
- vibrante_node_runtime-2.5.1.dist-info/WHEEL +5 -0
- vibrante_node_runtime-2.5.1.dist-info/licenses/CLA.md +96 -0
- vibrante_node_runtime-2.5.1.dist-info/licenses/COMMERCIAL_LICENSE.md +170 -0
- vibrante_node_runtime-2.5.1.dist-info/licenses/LICENSE +178 -0
- vibrante_node_runtime-2.5.1.dist-info/licenses/LICENSES/AGPL-3.0.txt +661 -0
- vibrante_node_runtime-2.5.1.dist-info/licenses/LICENSES/CC-BY-4.0-SCOPE.md +53 -0
- vibrante_node_runtime-2.5.1.dist-info/licenses/LICENSES/CC-BY-4.0.txt +396 -0
- vibrante_node_runtime-2.5.1.dist-info/licenses/LICENSES/GPL-3.0.txt +674 -0
- vibrante_node_runtime-2.5.1.dist-info/licenses/LICENSES/LGPL-3.0.txt +165 -0
- vibrante_node_runtime-2.5.1.dist-info/licenses/LICENSES/README.md +65 -0
- vibrante_node_runtime-2.5.1.dist-info/top_level.txt +1 -0
|
@@ -0,0 +1,103 @@
|
|
|
1
|
+
"""
|
|
2
|
+
Scene Planning Runtime (Tier 7)
|
|
3
|
+
================================
|
|
4
|
+
Transforms a SceneIntent into a deterministic, structured ScenePlan ready for
|
|
5
|
+
downstream asset discovery and scene assembly.
|
|
6
|
+
|
|
7
|
+
Pipeline:
|
|
8
|
+
SceneIntent → ZonePlanner → CompositionPlanner → CameraPlanner
|
|
9
|
+
→ AssetQueryGenerator → ScenePlanner (orchestrator)
|
|
10
|
+
→ ScenePlanValidator → ScenePlanRecommendationEngine
|
|
11
|
+
→ ScenePlan (typed JSON)
|
|
12
|
+
|
|
13
|
+
Design rules:
|
|
14
|
+
- LLM-free: all planning is deterministic keyword/rule-based.
|
|
15
|
+
- No bridge calls: no Houdini interaction at this layer.
|
|
16
|
+
- Structured output only: every field is typed.
|
|
17
|
+
- Provider-agnostic: asset queries reference categories, not provider APIs.
|
|
18
|
+
"""
|
|
19
|
+
|
|
20
|
+
from src.runtime.planning.schema.scene_plan import (
|
|
21
|
+
SCHEMA_VERSION,
|
|
22
|
+
AssetQuery,
|
|
23
|
+
CameraTarget,
|
|
24
|
+
CompositionRule,
|
|
25
|
+
PlacementHint,
|
|
26
|
+
SceneZonePlan,
|
|
27
|
+
ScenePlan,
|
|
28
|
+
PlanningResult,
|
|
29
|
+
)
|
|
30
|
+
from src.runtime.planning.planners.zone_planner import (
|
|
31
|
+
ZonePlanner,
|
|
32
|
+
get_zone_planner,
|
|
33
|
+
reset_zone_planner_for_tests,
|
|
34
|
+
)
|
|
35
|
+
from src.runtime.planning.composition.composition_planner import (
|
|
36
|
+
CompositionPlanner,
|
|
37
|
+
get_composition_planner,
|
|
38
|
+
reset_composition_planner_for_tests,
|
|
39
|
+
)
|
|
40
|
+
from src.runtime.planning.camera.camera_planner import (
|
|
41
|
+
CameraPlanner,
|
|
42
|
+
get_camera_planner,
|
|
43
|
+
reset_camera_planner_for_tests,
|
|
44
|
+
)
|
|
45
|
+
from src.runtime.planning.planners.asset_query_generator import (
|
|
46
|
+
AssetQueryGenerator,
|
|
47
|
+
get_asset_query_generator,
|
|
48
|
+
reset_asset_query_generator_for_tests,
|
|
49
|
+
)
|
|
50
|
+
from src.runtime.planning.planners.scene_planner import (
|
|
51
|
+
ScenePlanner,
|
|
52
|
+
get_scene_planner,
|
|
53
|
+
reset_scene_planner_for_tests,
|
|
54
|
+
)
|
|
55
|
+
from src.runtime.planning.validators.scene_plan_validator import (
|
|
56
|
+
ValidationReport,
|
|
57
|
+
ScenePlanValidator,
|
|
58
|
+
get_scene_plan_validator,
|
|
59
|
+
reset_scene_plan_validator_for_tests,
|
|
60
|
+
)
|
|
61
|
+
from src.runtime.planning.recommendations.scene_plan_recommendation_engine import (
|
|
62
|
+
ScenePlanRecommendationEngine,
|
|
63
|
+
get_scene_plan_recommendation_engine,
|
|
64
|
+
reset_scene_plan_recommendation_engine_for_tests,
|
|
65
|
+
)
|
|
66
|
+
from src.runtime.planning.serialization.plan_serializer import (
|
|
67
|
+
PlanSerializationError,
|
|
68
|
+
PlanSerializer,
|
|
69
|
+
get_plan_serializer,
|
|
70
|
+
reset_plan_serializer_for_tests,
|
|
71
|
+
)
|
|
72
|
+
from src.runtime.planning.logging.planning_logger import (
|
|
73
|
+
PlanLogEntry,
|
|
74
|
+
PlanningLogger,
|
|
75
|
+
get_planning_logger,
|
|
76
|
+
reset_planning_logger_for_tests,
|
|
77
|
+
)
|
|
78
|
+
|
|
79
|
+
__all__ = [
|
|
80
|
+
# Schema
|
|
81
|
+
"SCHEMA_VERSION",
|
|
82
|
+
"AssetQuery", "CameraTarget", "CompositionRule",
|
|
83
|
+
"PlacementHint", "SceneZonePlan", "ScenePlan", "PlanningResult",
|
|
84
|
+
# Planners
|
|
85
|
+
"ZonePlanner", "get_zone_planner", "reset_zone_planner_for_tests",
|
|
86
|
+
"CompositionPlanner", "get_composition_planner", "reset_composition_planner_for_tests",
|
|
87
|
+
"CameraPlanner", "get_camera_planner", "reset_camera_planner_for_tests",
|
|
88
|
+
"AssetQueryGenerator","get_asset_query_generator","reset_asset_query_generator_for_tests",
|
|
89
|
+
"ScenePlanner", "get_scene_planner", "reset_scene_planner_for_tests",
|
|
90
|
+
# Validator
|
|
91
|
+
"ValidationReport", "ScenePlanValidator",
|
|
92
|
+
"get_scene_plan_validator", "reset_scene_plan_validator_for_tests",
|
|
93
|
+
# Recommendations
|
|
94
|
+
"ScenePlanRecommendationEngine",
|
|
95
|
+
"get_scene_plan_recommendation_engine",
|
|
96
|
+
"reset_scene_plan_recommendation_engine_for_tests",
|
|
97
|
+
# Serializer
|
|
98
|
+
"PlanSerializationError", "PlanSerializer",
|
|
99
|
+
"get_plan_serializer", "reset_plan_serializer_for_tests",
|
|
100
|
+
# Logger
|
|
101
|
+
"PlanLogEntry", "PlanningLogger",
|
|
102
|
+
"get_planning_logger", "reset_planning_logger_for_tests",
|
|
103
|
+
]
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"""Camera Planner (Tier 7 — Scene Planning Runtime)."""
|
|
@@ -0,0 +1,179 @@
|
|
|
1
|
+
"""
|
|
2
|
+
Camera Planner (Tier 7 — Scene Planning Runtime)
|
|
3
|
+
=================================================
|
|
4
|
+
Generates CameraTarget objects from a SceneIntent and its zone list.
|
|
5
|
+
|
|
6
|
+
Targets specify WHAT to aim at and WHERE to place the camera — not the actual
|
|
7
|
+
camera transform values. Tier 3+ scene assembly nodes convert targets into
|
|
8
|
+
real Houdini camera rigs.
|
|
9
|
+
|
|
10
|
+
Rule: one establishing shot is always produced (full-scene context).
|
|
11
|
+
One hero target per high-priority zone (foreground/midground).
|
|
12
|
+
Mood-based extras (tension track, reaction angle).
|
|
13
|
+
|
|
14
|
+
DESIGN RULES:
|
|
15
|
+
- No bridge calls. No LLM calls.
|
|
16
|
+
- Deterministic: same intent + zones → same targets.
|
|
17
|
+
- Every target includes position_hint, look_at_hint, shot_type, importance.
|
|
18
|
+
|
|
19
|
+
Public API:
|
|
20
|
+
CameraPlanner
|
|
21
|
+
.plan_cameras(intent, zones) -> List[CameraTarget]
|
|
22
|
+
get_camera_planner() -> CameraPlanner (singleton)
|
|
23
|
+
reset_camera_planner_for_tests()
|
|
24
|
+
"""
|
|
25
|
+
|
|
26
|
+
from __future__ import annotations
|
|
27
|
+
|
|
28
|
+
import threading
|
|
29
|
+
from typing import Any, Dict, List, Optional, Tuple
|
|
30
|
+
|
|
31
|
+
from src.runtime.planning.schema.scene_plan import CameraTarget
|
|
32
|
+
|
|
33
|
+
# ---------------------------------------------------------------------------
|
|
34
|
+
# Zone → target mapping
|
|
35
|
+
# (zone_type, shot_type, position_hint, look_at_hint, base_importance)
|
|
36
|
+
# ---------------------------------------------------------------------------
|
|
37
|
+
|
|
38
|
+
_ZONE_TARGET_MAP: Dict[str, Tuple[str, str, str, float]] = {
|
|
39
|
+
"foreground": ("detail", "center", "center_mass", 0.70),
|
|
40
|
+
"midground": ("hero", "left_third", "center_mass", 0.85),
|
|
41
|
+
"background": ("establishing", "center", "horizon_center", 0.90),
|
|
42
|
+
"overhead": ("aerial", "center", "ground_center", 0.75),
|
|
43
|
+
"ground": ("detail", "center", "surface_detail", 0.60),
|
|
44
|
+
"interior_wall": ("detail", "right_third", "wall_feature", 0.55),
|
|
45
|
+
"ceiling": ("aerial", "center", "ceiling_feature",0.50),
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
# Establishing shot always present
|
|
49
|
+
_ESTABLISHING_TARGET: Tuple[str, str, str, str, float] = (
|
|
50
|
+
"scene_overview", "establishing", "center", "scene_center_mass", 0.95
|
|
51
|
+
)
|
|
52
|
+
|
|
53
|
+
# Mood-based extra targets
|
|
54
|
+
_MOOD_EXTRA_TARGETS: Dict[str, List[Tuple[str, str, str, str, float]]] = {
|
|
55
|
+
"tense": [
|
|
56
|
+
("tension_angle", "tracking", "right_third", "focal_element", 0.65),
|
|
57
|
+
],
|
|
58
|
+
"dramatic": [
|
|
59
|
+
("dramatic_low_angle", "hero", "left_third", "hero_silhouette", 0.80),
|
|
60
|
+
],
|
|
61
|
+
"chaotic": [
|
|
62
|
+
("chaotic_dutch_angle", "reaction", "center", "action_center", 0.70),
|
|
63
|
+
],
|
|
64
|
+
"mysterious": [
|
|
65
|
+
("mystery_reveal", "tracking", "right_third", "hidden_element", 0.65),
|
|
66
|
+
],
|
|
67
|
+
"triumphant": [
|
|
68
|
+
("triumph_low_angle", "hero", "center", "hero_element", 0.85),
|
|
69
|
+
],
|
|
70
|
+
"ominous": [
|
|
71
|
+
("ominous_wide_angle", "establishing", "center", "threat_source", 0.75),
|
|
72
|
+
],
|
|
73
|
+
}
|
|
74
|
+
|
|
75
|
+
# Environment-based look-at refinements
|
|
76
|
+
_ENV_LOOK_AT_HINTS: Dict[str, str] = {
|
|
77
|
+
"urban": "building_facade",
|
|
78
|
+
"industrial": "machinery_cluster",
|
|
79
|
+
"desert": "horizon_silhouette",
|
|
80
|
+
"forest": "tree_canopy",
|
|
81
|
+
"space": "station_module",
|
|
82
|
+
"underground": "cavern_feature",
|
|
83
|
+
"interior": "room_focal_element",
|
|
84
|
+
}
|
|
85
|
+
|
|
86
|
+
|
|
87
|
+
class CameraPlanner:
|
|
88
|
+
"""Generates CameraTarget list from a SceneIntent and zone list."""
|
|
89
|
+
|
|
90
|
+
def plan_cameras(self, intent: Any, zones: List[Any]) -> List[CameraTarget]:
|
|
91
|
+
"""Return camera targets for the given intent and zones.
|
|
92
|
+
|
|
93
|
+
Args:
|
|
94
|
+
intent: A SceneIntent (or duck-typed object with .mood, .environment).
|
|
95
|
+
zones: List of SceneZonePlan objects.
|
|
96
|
+
|
|
97
|
+
Returns:
|
|
98
|
+
List of :class:`CameraTarget`, sorted by importance desc.
|
|
99
|
+
"""
|
|
100
|
+
mood = (getattr(intent, "mood", None) or "").lower()
|
|
101
|
+
env = (getattr(intent, "environment", None) or "").lower()
|
|
102
|
+
env_look = _ENV_LOOK_AT_HINTS.get(env, "center_mass")
|
|
103
|
+
|
|
104
|
+
targets: List[CameraTarget] = []
|
|
105
|
+
seen_names: set = set()
|
|
106
|
+
|
|
107
|
+
# 1. Always: establishing shot (full-scene context)
|
|
108
|
+
name, shot_type, pos, look_at, importance = _ESTABLISHING_TARGET
|
|
109
|
+
targets.append(CameraTarget(
|
|
110
|
+
name=name,
|
|
111
|
+
zone="background",
|
|
112
|
+
position_hint=pos,
|
|
113
|
+
look_at_hint=env_look if env else look_at,
|
|
114
|
+
importance=importance,
|
|
115
|
+
shot_type=shot_type,
|
|
116
|
+
))
|
|
117
|
+
seen_names.add(name)
|
|
118
|
+
|
|
119
|
+
# 2. One target per zone (except background, which is establishing)
|
|
120
|
+
for zone in zones:
|
|
121
|
+
zt = getattr(zone, "zone_type", "")
|
|
122
|
+
if zt == "background":
|
|
123
|
+
continue
|
|
124
|
+
tpl = _ZONE_TARGET_MAP.get(zt)
|
|
125
|
+
if not tpl:
|
|
126
|
+
continue
|
|
127
|
+
shot_type, pos, look_at, importance = tpl
|
|
128
|
+
target_name = f"{zt}_{shot_type}"
|
|
129
|
+
if target_name in seen_names:
|
|
130
|
+
continue
|
|
131
|
+
seen_names.add(target_name)
|
|
132
|
+
targets.append(CameraTarget(
|
|
133
|
+
name=target_name,
|
|
134
|
+
zone=zt,
|
|
135
|
+
position_hint=pos,
|
|
136
|
+
look_at_hint=look_at,
|
|
137
|
+
importance=importance,
|
|
138
|
+
shot_type=shot_type,
|
|
139
|
+
))
|
|
140
|
+
|
|
141
|
+
# 3. Mood-based extras
|
|
142
|
+
for name, shot_type, pos, look_at, importance in _MOOD_EXTRA_TARGETS.get(mood, []):
|
|
143
|
+
if name not in seen_names:
|
|
144
|
+
seen_names.add(name)
|
|
145
|
+
targets.append(CameraTarget(
|
|
146
|
+
name=name,
|
|
147
|
+
zone="midground",
|
|
148
|
+
position_hint=pos,
|
|
149
|
+
look_at_hint=look_at,
|
|
150
|
+
importance=importance,
|
|
151
|
+
shot_type=shot_type,
|
|
152
|
+
))
|
|
153
|
+
|
|
154
|
+
return sorted(targets, key=lambda t: t.importance, reverse=True)
|
|
155
|
+
|
|
156
|
+
|
|
157
|
+
# ---------------------------------------------------------------------------
|
|
158
|
+
# Singleton
|
|
159
|
+
# ---------------------------------------------------------------------------
|
|
160
|
+
|
|
161
|
+
_INSTANCE: Optional[CameraPlanner] = None
|
|
162
|
+
_INSTANCE_LOCK = threading.Lock()
|
|
163
|
+
|
|
164
|
+
|
|
165
|
+
def get_camera_planner() -> CameraPlanner:
|
|
166
|
+
"""Return the module-level singleton CameraPlanner."""
|
|
167
|
+
global _INSTANCE
|
|
168
|
+
if _INSTANCE is None:
|
|
169
|
+
with _INSTANCE_LOCK:
|
|
170
|
+
if _INSTANCE is None:
|
|
171
|
+
_INSTANCE = CameraPlanner()
|
|
172
|
+
return _INSTANCE
|
|
173
|
+
|
|
174
|
+
|
|
175
|
+
def reset_camera_planner_for_tests() -> None:
|
|
176
|
+
"""Replace the singleton. For test isolation only."""
|
|
177
|
+
global _INSTANCE
|
|
178
|
+
with _INSTANCE_LOCK:
|
|
179
|
+
_INSTANCE = None
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"""Composition Planner (Tier 7 — Scene Planning Runtime)."""
|
|
@@ -0,0 +1,223 @@
|
|
|
1
|
+
"""
|
|
2
|
+
Composition Planner (Tier 7 — Scene Planning Runtime)
|
|
3
|
+
======================================================
|
|
4
|
+
Generates CompositionRule objects from a SceneIntent and its zone list.
|
|
5
|
+
|
|
6
|
+
Rules are procedural and inspectable — no AI-generated prose.
|
|
7
|
+
Every rule includes a description explaining WHY it applies to this scene.
|
|
8
|
+
|
|
9
|
+
DESIGN RULES:
|
|
10
|
+
- No bridge calls. No LLM calls.
|
|
11
|
+
- Deterministic: same intent + zones → same rules.
|
|
12
|
+
- All rules have named types from COMPOSITION_RULE_TYPES.
|
|
13
|
+
- camera_safe_zone is always included as a baseline rule.
|
|
14
|
+
|
|
15
|
+
Public API:
|
|
16
|
+
CompositionPlanner
|
|
17
|
+
.plan_composition(intent, zones) -> List[CompositionRule]
|
|
18
|
+
get_composition_planner() -> CompositionPlanner (singleton)
|
|
19
|
+
reset_composition_planner_for_tests()
|
|
20
|
+
"""
|
|
21
|
+
|
|
22
|
+
from __future__ import annotations
|
|
23
|
+
|
|
24
|
+
import threading
|
|
25
|
+
from typing import Any, Dict, List, Optional, Tuple
|
|
26
|
+
|
|
27
|
+
from src.runtime.planning.schema.scene_plan import CompositionRule
|
|
28
|
+
|
|
29
|
+
# ---------------------------------------------------------------------------
|
|
30
|
+
# Rule templates: (rule_type, applies_to, base_priority, description_template)
|
|
31
|
+
# ---------------------------------------------------------------------------
|
|
32
|
+
|
|
33
|
+
_STYLE_RULES: Dict[str, List[Tuple[str, str, float, str]]] = {
|
|
34
|
+
"cinematic": [
|
|
35
|
+
("layered_depth", "full_scene", 0.95,
|
|
36
|
+
"Cinematic style demands clear foreground/midground/background depth separation."),
|
|
37
|
+
("rule_of_thirds", "full_scene", 0.85,
|
|
38
|
+
"Cinematic framing uses rule of thirds to place the primary subject off-center."),
|
|
39
|
+
],
|
|
40
|
+
"noir": [
|
|
41
|
+
("high_contrast", "full_scene", 0.90,
|
|
42
|
+
"Noir style requires strong light/shadow contrast as the primary visual language."),
|
|
43
|
+
("shadow_framing", "foreground", 0.85,
|
|
44
|
+
"Noir silhouetting frames subjects with deep foreground shadows."),
|
|
45
|
+
("leading_lines", "full_scene", 0.75,
|
|
46
|
+
"Noir environments use architectural lines to guide the eye to focal points."),
|
|
47
|
+
],
|
|
48
|
+
"sci_fi": [
|
|
49
|
+
("geometric_lines", "full_scene", 0.85,
|
|
50
|
+
"Sci-fi environments use strong geometric lines and angular structures."),
|
|
51
|
+
("perspective_convergence", "midground", 0.80,
|
|
52
|
+
"Sci-fi corridors and structures create converging perspective lines."),
|
|
53
|
+
],
|
|
54
|
+
"photorealistic": [
|
|
55
|
+
("horizon_rule", "full_scene", 0.80,
|
|
56
|
+
"Photorealistic scenes need a clear horizon reference for depth calibration."),
|
|
57
|
+
],
|
|
58
|
+
"stylized": [
|
|
59
|
+
("asymmetric_balance", "full_scene", 0.75,
|
|
60
|
+
"Stylized scenes use deliberate asymmetric balance for visual interest."),
|
|
61
|
+
],
|
|
62
|
+
"abstract": [
|
|
63
|
+
("asymmetric_balance", "full_scene", 0.80,
|
|
64
|
+
"Abstract scenes leverage asymmetric balance as a primary compositional device."),
|
|
65
|
+
("depth_of_field_guidance", "full_scene", 0.75,
|
|
66
|
+
"Abstract scenes guide depth through selective focus areas."),
|
|
67
|
+
],
|
|
68
|
+
"fantasy": [
|
|
69
|
+
("layered_depth", "full_scene", 0.85,
|
|
70
|
+
"Fantasy environments use depth layering to create a sense of epic scale."),
|
|
71
|
+
("leading_lines", "full_scene", 0.75,
|
|
72
|
+
"Fantasy environments use natural leading lines (rivers, paths) to guide the viewer."),
|
|
73
|
+
],
|
|
74
|
+
"documentary": [
|
|
75
|
+
("horizon_rule", "full_scene", 0.85,
|
|
76
|
+
"Documentary framing maintains a clear horizon for spatial grounding."),
|
|
77
|
+
("rule_of_thirds", "full_scene", 0.80,
|
|
78
|
+
"Documentary style uses rule of thirds for naturalistic framing."),
|
|
79
|
+
],
|
|
80
|
+
}
|
|
81
|
+
|
|
82
|
+
_MOOD_RULES: Dict[str, List[Tuple[str, str, float, str]]] = {
|
|
83
|
+
"dramatic": [
|
|
84
|
+
("hero_focal_point", "full_scene", 0.95,
|
|
85
|
+
"Dramatic mood demands a single dominant hero focal point for maximum impact."),
|
|
86
|
+
("silhouette_preservation", "background", 0.85,
|
|
87
|
+
"Dramatic scenes preserve strong silhouettes against the background for contrast."),
|
|
88
|
+
],
|
|
89
|
+
"tense": [
|
|
90
|
+
("tension_diagonal", "full_scene", 0.85,
|
|
91
|
+
"Tense scenes use diagonal compositions to create visual unease."),
|
|
92
|
+
("silhouette_preservation", "background", 0.80,
|
|
93
|
+
"Tension is amplified by strong silhouettes in background elements."),
|
|
94
|
+
],
|
|
95
|
+
"peaceful": [
|
|
96
|
+
("symmetric_balance", "full_scene", 0.80,
|
|
97
|
+
"Peaceful scenes benefit from symmetric or near-symmetric balance."),
|
|
98
|
+
("horizon_rule", "full_scene", 0.75,
|
|
99
|
+
"Peaceful scenes use a clear, calm horizon as a compositional anchor."),
|
|
100
|
+
],
|
|
101
|
+
"chaotic": [
|
|
102
|
+
("tension_diagonal", "full_scene", 0.90,
|
|
103
|
+
"Chaotic mood amplifies instability with strong diagonal compositions."),
|
|
104
|
+
("asymmetric_balance", "full_scene", 0.85,
|
|
105
|
+
"Chaos is visually expressed through deliberate asymmetric imbalance."),
|
|
106
|
+
],
|
|
107
|
+
"melancholic": [
|
|
108
|
+
("symmetric_balance", "full_scene", 0.75,
|
|
109
|
+
"Melancholic scenes use near-symmetric balance to convey stillness."),
|
|
110
|
+
("layered_depth", "full_scene", 0.70,
|
|
111
|
+
"Melancholic depth uses layered distance to evoke loneliness."),
|
|
112
|
+
],
|
|
113
|
+
"triumphant": [
|
|
114
|
+
("hero_focal_point", "full_scene", 0.90,
|
|
115
|
+
"Triumphant mood places the hero element prominently at a focal point."),
|
|
116
|
+
("leading_lines", "full_scene", 0.80,
|
|
117
|
+
"Triumphant compositions use converging lines to draw attention to the hero."),
|
|
118
|
+
],
|
|
119
|
+
"ominous": [
|
|
120
|
+
("silhouette_preservation", "background", 0.90,
|
|
121
|
+
"Ominous scenes preserve threatening silhouettes in the background."),
|
|
122
|
+
("high_contrast", "full_scene", 0.85,
|
|
123
|
+
"Ominous atmosphere is reinforced by high-contrast lighting ratios."),
|
|
124
|
+
("shadow_framing", "foreground", 0.80,
|
|
125
|
+
"Ominous foregrounds use shadow framing to create a sense of enclosure."),
|
|
126
|
+
],
|
|
127
|
+
"neutral": [
|
|
128
|
+
("rule_of_thirds", "full_scene", 0.70,
|
|
129
|
+
"Neutral scenes use standard rule of thirds for competent framing."),
|
|
130
|
+
],
|
|
131
|
+
}
|
|
132
|
+
|
|
133
|
+
_ZONE_RULES: Dict[int, List[Tuple[str, str, float, str]]] = {
|
|
134
|
+
2: [
|
|
135
|
+
("layered_depth", "full_scene", 0.75,
|
|
136
|
+
"Two-zone scene benefits from layered depth to create separation."),
|
|
137
|
+
],
|
|
138
|
+
3: [
|
|
139
|
+
("layered_depth", "full_scene", 0.90,
|
|
140
|
+
"Three-zone scene requires explicit depth layering for visual clarity."),
|
|
141
|
+
("depth_of_field_guidance", "full_scene", 0.75,
|
|
142
|
+
"Three-zone depth is reinforced by depth-of-field focus guidance."),
|
|
143
|
+
],
|
|
144
|
+
}
|
|
145
|
+
|
|
146
|
+
_BASELINE_RULES: List[Tuple[str, str, float, str]] = [
|
|
147
|
+
("camera_safe_zone", "full_scene", 0.60,
|
|
148
|
+
"Camera safe zone ensures no critical elements are placed at screen edges."),
|
|
149
|
+
]
|
|
150
|
+
|
|
151
|
+
|
|
152
|
+
class CompositionPlanner:
|
|
153
|
+
"""Generates CompositionRule objects from a SceneIntent and its zone list."""
|
|
154
|
+
|
|
155
|
+
def plan_composition(self, intent: Any, zones: List[Any]) -> List[CompositionRule]:
|
|
156
|
+
"""Return composition rules for the given intent and zones.
|
|
157
|
+
|
|
158
|
+
Args:
|
|
159
|
+
intent: A SceneIntent (or duck-typed object with .style, .mood).
|
|
160
|
+
zones: List of SceneZonePlan objects.
|
|
161
|
+
|
|
162
|
+
Returns:
|
|
163
|
+
Deduplicated list of :class:`CompositionRule`, sorted by priority desc.
|
|
164
|
+
"""
|
|
165
|
+
style = (getattr(intent, "style", None) or "").lower()
|
|
166
|
+
mood = (getattr(intent, "mood", None) or "").lower()
|
|
167
|
+
|
|
168
|
+
raw: List[Tuple[str, str, float, str]] = []
|
|
169
|
+
|
|
170
|
+
# Style-based rules
|
|
171
|
+
raw.extend(_STYLE_RULES.get(style, []))
|
|
172
|
+
|
|
173
|
+
# Mood-based rules
|
|
174
|
+
raw.extend(_MOOD_RULES.get(mood, []))
|
|
175
|
+
|
|
176
|
+
# Zone-count rules
|
|
177
|
+
n_zones = len(zones)
|
|
178
|
+
for min_count, zone_rules in _ZONE_RULES.items():
|
|
179
|
+
if n_zones >= min_count:
|
|
180
|
+
raw.extend(zone_rules)
|
|
181
|
+
|
|
182
|
+
# Baseline (always present)
|
|
183
|
+
raw.extend(_BASELINE_RULES)
|
|
184
|
+
|
|
185
|
+
# Deduplicate by rule_type (first occurrence wins — highest priority first)
|
|
186
|
+
seen: set = set()
|
|
187
|
+
rules: List[CompositionRule] = []
|
|
188
|
+
for rule_type, applies_to, priority, description in raw:
|
|
189
|
+
if rule_type not in seen:
|
|
190
|
+
seen.add(rule_type)
|
|
191
|
+
rules.append(CompositionRule(
|
|
192
|
+
rule_type=rule_type,
|
|
193
|
+
description=description,
|
|
194
|
+
applies_to=applies_to,
|
|
195
|
+
priority=priority,
|
|
196
|
+
))
|
|
197
|
+
|
|
198
|
+
return sorted(rules, key=lambda r: r.priority, reverse=True)
|
|
199
|
+
|
|
200
|
+
|
|
201
|
+
# ---------------------------------------------------------------------------
|
|
202
|
+
# Singleton
|
|
203
|
+
# ---------------------------------------------------------------------------
|
|
204
|
+
|
|
205
|
+
_INSTANCE: Optional[CompositionPlanner] = None
|
|
206
|
+
_INSTANCE_LOCK = threading.Lock()
|
|
207
|
+
|
|
208
|
+
|
|
209
|
+
def get_composition_planner() -> CompositionPlanner:
|
|
210
|
+
"""Return the module-level singleton CompositionPlanner."""
|
|
211
|
+
global _INSTANCE
|
|
212
|
+
if _INSTANCE is None:
|
|
213
|
+
with _INSTANCE_LOCK:
|
|
214
|
+
if _INSTANCE is None:
|
|
215
|
+
_INSTANCE = CompositionPlanner()
|
|
216
|
+
return _INSTANCE
|
|
217
|
+
|
|
218
|
+
|
|
219
|
+
def reset_composition_planner_for_tests() -> None:
|
|
220
|
+
"""Replace the singleton. For test isolation only."""
|
|
221
|
+
global _INSTANCE
|
|
222
|
+
with _INSTANCE_LOCK:
|
|
223
|
+
_INSTANCE = None
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"""Planning Logger (Tier 7 — Scene Planning Runtime)."""
|
|
@@ -0,0 +1,109 @@
|
|
|
1
|
+
"""
|
|
2
|
+
Planning Logger (Tier 7 — Scene Planning Runtime)
|
|
3
|
+
==================================================
|
|
4
|
+
Lightweight structured log for the scene planning pipeline.
|
|
5
|
+
|
|
6
|
+
Records planning events as typed log entries. The log is in-memory only;
|
|
7
|
+
it can be drained for debugging or ignored in production.
|
|
8
|
+
|
|
9
|
+
Public API:
|
|
10
|
+
PlanLogEntry
|
|
11
|
+
PlanningLogger
|
|
12
|
+
.log(event_type, message, data=None)
|
|
13
|
+
.get_log() -> List[PlanLogEntry]
|
|
14
|
+
.clear()
|
|
15
|
+
.stats() -> dict
|
|
16
|
+
get_planning_logger() -> PlanningLogger (singleton)
|
|
17
|
+
reset_planning_logger_for_tests()
|
|
18
|
+
"""
|
|
19
|
+
|
|
20
|
+
from __future__ import annotations
|
|
21
|
+
|
|
22
|
+
import threading
|
|
23
|
+
import time
|
|
24
|
+
from dataclasses import dataclass, field
|
|
25
|
+
from typing import Any, Dict, List, Optional
|
|
26
|
+
|
|
27
|
+
_VALID_EVENT_TYPES = frozenset({
|
|
28
|
+
"planning_started",
|
|
29
|
+
"planning_completed",
|
|
30
|
+
"planning_failed",
|
|
31
|
+
"zone_planned",
|
|
32
|
+
"composition_planned",
|
|
33
|
+
"camera_planned",
|
|
34
|
+
"asset_query_generated",
|
|
35
|
+
"plan_validated",
|
|
36
|
+
"recommendation_applied",
|
|
37
|
+
"serialization",
|
|
38
|
+
"warning",
|
|
39
|
+
"error",
|
|
40
|
+
})
|
|
41
|
+
|
|
42
|
+
|
|
43
|
+
@dataclass
|
|
44
|
+
class PlanLogEntry:
|
|
45
|
+
event_type: str
|
|
46
|
+
message: str
|
|
47
|
+
data: Dict[str, Any] = field(default_factory=dict)
|
|
48
|
+
timestamp: float = field(default_factory=time.time)
|
|
49
|
+
|
|
50
|
+
def to_dict(self) -> Dict[str, Any]:
|
|
51
|
+
return {
|
|
52
|
+
"event_type": self.event_type,
|
|
53
|
+
"message": self.message,
|
|
54
|
+
"data": dict(self.data),
|
|
55
|
+
"timestamp": self.timestamp,
|
|
56
|
+
}
|
|
57
|
+
|
|
58
|
+
|
|
59
|
+
class PlanningLogger:
|
|
60
|
+
"""In-memory planning event logger."""
|
|
61
|
+
|
|
62
|
+
def __init__(self) -> None:
|
|
63
|
+
self._lock: threading.Lock = threading.Lock()
|
|
64
|
+
self._log: List[PlanLogEntry] = []
|
|
65
|
+
|
|
66
|
+
def log(
|
|
67
|
+
self,
|
|
68
|
+
event_type: str,
|
|
69
|
+
message: str,
|
|
70
|
+
data: Optional[Dict[str, Any]] = None,
|
|
71
|
+
) -> None:
|
|
72
|
+
et = event_type if event_type in _VALID_EVENT_TYPES else "warning"
|
|
73
|
+
entry = PlanLogEntry(event_type=et, message=message, data=dict(data or {}))
|
|
74
|
+
with self._lock:
|
|
75
|
+
self._log.append(entry)
|
|
76
|
+
|
|
77
|
+
def get_log(self) -> List[PlanLogEntry]:
|
|
78
|
+
with self._lock:
|
|
79
|
+
return list(self._log)
|
|
80
|
+
|
|
81
|
+
def clear(self) -> None:
|
|
82
|
+
with self._lock:
|
|
83
|
+
self._log.clear()
|
|
84
|
+
|
|
85
|
+
def stats(self) -> Dict[str, Any]:
|
|
86
|
+
with self._lock:
|
|
87
|
+
by_type: Dict[str, int] = {}
|
|
88
|
+
for entry in self._log:
|
|
89
|
+
by_type[entry.event_type] = by_type.get(entry.event_type, 0) + 1
|
|
90
|
+
return {"total": len(self._log), "by_type": by_type}
|
|
91
|
+
|
|
92
|
+
|
|
93
|
+
_INSTANCE: Optional[PlanningLogger] = None
|
|
94
|
+
_INSTANCE_LOCK = threading.Lock()
|
|
95
|
+
|
|
96
|
+
|
|
97
|
+
def get_planning_logger() -> PlanningLogger:
|
|
98
|
+
global _INSTANCE
|
|
99
|
+
if _INSTANCE is None:
|
|
100
|
+
with _INSTANCE_LOCK:
|
|
101
|
+
if _INSTANCE is None:
|
|
102
|
+
_INSTANCE = PlanningLogger()
|
|
103
|
+
return _INSTANCE
|
|
104
|
+
|
|
105
|
+
|
|
106
|
+
def reset_planning_logger_for_tests() -> None:
|
|
107
|
+
global _INSTANCE
|
|
108
|
+
with _INSTANCE_LOCK:
|
|
109
|
+
_INSTANCE = None
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"""Scene Planners (Tier 7 — Scene Planning Runtime)."""
|